@adstore/templates 2.18.11 → 2.18.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -125,7 +125,7 @@ function cr(t, n, e) {
125
125
  }
126
126
  return o.__N || o.__;
127
127
  }
128
- function z(t, n) {
128
+ function K(t, n) {
129
129
  var e = te(Ut++, 3);
130
130
  !B.__s && on(e.__H, n) && (e.__ = t, e.i = n, U.__H.__h.push(e));
131
131
  }
@@ -133,7 +133,7 @@ function To(t, n) {
133
133
  var e = te(Ut++, 4);
134
134
  !B.__s && on(e.__H, n) && (e.__ = t, e.i = n, U.__h.push(e));
135
135
  }
136
- function K(t) {
136
+ function q(t) {
137
137
  return Xt = 5, Nt(function() {
138
138
  return { current: t };
139
139
  }, []);
@@ -1323,7 +1323,7 @@ const Zo = ar(), Ht = ({
1323
1323
  borderLeftStyle: "solid"
1324
1324
  }, l = {
1325
1325
  left: (f = o == null ? void 0 : o.container) == null ? void 0 : f.left
1326
- }, i = (((S = o == null ? void 0 : o.icon) == null ? void 0 : S.animations) || []).map((q) => e[q]).join(", "), _ = W((O = o == null ? void 0 : o.icon) == null ? void 0 : O.gradientColor) && ((I = o == null ? void 0 : o.icon) != null && I.animations.includes("gradient")) ? {
1326
+ }, i = (((S = o == null ? void 0 : o.icon) == null ? void 0 : S.animations) || []).map((z) => e[z]).join(", "), _ = W((O = o == null ? void 0 : o.icon) == null ? void 0 : O.gradientColor) && ((I = o == null ? void 0 : o.icon) != null && I.animations.includes("gradient")) ? {
1327
1327
  background: `linear-gradient(-90deg, ${(D = o.icon) == null ? void 0 : D.backgroundColor} 0%, ${(k = o == null ? void 0 : o.icon) == null ? void 0 : k.gradientColor} 100%) 0% 0% / 400% 400%`,
1328
1328
  backgroundSize: "400% 400%"
1329
1329
  } : o == null ? void 0 : o.icon, u = C(T(C({}, (o == null ? void 0 : o.icon) || {}), {
@@ -1350,7 +1350,7 @@ const Zo = ar(), Ht = ({
1350
1350
  rel: "stylesheet",
1351
1351
  href: `https://fonts.googleapis.com/css?family=${o}:${[...r, ...qe].join(",")}&display=swap`
1352
1352
  })), [n]);
1353
- z(() => {
1353
+ K(() => {
1354
1354
  e.forEach(_d);
1355
1355
  }, [e]);
1356
1356
  }, iu = ({
@@ -1362,7 +1362,7 @@ const Zo = ar(), Ht = ({
1362
1362
  onClickIcon: s
1363
1363
  }) => {
1364
1364
  var J, x, w, $, M, b, N, L, R, H, j, P;
1365
- const l = K(null), [i, _] = Ce(), u = Z(), c = Pt({
1365
+ const l = q(null), [i, _] = Ce(), u = Z(), c = Pt({
1366
1366
  targetRef: l,
1367
1367
  id: t
1368
1368
  }), p = Dt(u, c), d = G(p), {
@@ -1389,7 +1389,7 @@ const Zo = ar(), Ht = ({
1389
1389
  paddingRight: 10,
1390
1390
  paddingBottom: 7,
1391
1391
  paddingLeft: 10
1392
- }, D = v(d, "legal.isSlideMode", !1), k = v(d, "legal.slideDuration", 1e3), q = v(d, "legal.slideDelay", 1e3);
1392
+ }, D = v(d, "legal.isSlideMode", !1), k = v(d, "legal.slideDuration", 1e3), z = v(d, "legal.slideDelay", 1e3);
1393
1393
  return a("div", {
1394
1394
  className: A(V.root, {
1395
1395
  [V.legalOpen]: i,
@@ -1454,7 +1454,7 @@ const Zo = ar(), Ht = ({
1454
1454
  style: T(C(C({}, d == null ? void 0 : d.legal), I), {
1455
1455
  animationName: V["fade-in-out"],
1456
1456
  animationDuration: `${k}ms`,
1457
- animationDelay: `${q}ms`
1457
+ animationDelay: `${z}ms`
1458
1458
  }),
1459
1459
  children: a("div", {
1460
1460
  className: V.slideLegalText,
@@ -1571,7 +1571,7 @@ const Zo = ar(), Ht = ({
1571
1571
  onClickClose: s
1572
1572
  }) => {
1573
1573
  var S, O, I;
1574
- const l = K(null), i = Z(), _ = Pt({
1574
+ const l = q(null), i = Z(), _ = Pt({
1575
1575
  targetRef: l,
1576
1576
  id: t
1577
1577
  }), u = Dt(i, _), c = G(u);
@@ -1684,14 +1684,14 @@ const Zo = ar(), Ht = ({
1684
1684
  })
1685
1685
  });
1686
1686
  }, un = (t, n = 0, e = !1) => {
1687
- const o = K(cn()), [r, s] = mt(!1), [l, i] = mt(), [_, u] = mt(e), c = (y) => o.current.on("visible", y), p = (y) => o.current.on("click", y), d = (y) => o.current.on("clickHide", y), g = () => ke(void 0, null, function* () {
1688
- yield hd(+n), s(!0);
1689
- }), h = () => s(!1), m = () => {
1687
+ const o = q(cn()), [r, s] = mt(!1), [l, i] = mt(), [_, u] = mt(e), c = (y) => o.current.on("visible", y), p = (y) => o.current.on("click", y), d = (y) => o.current.on("clickHide", y), g = () => ke(void 0, null, function* () {
1688
+ yield hd(+n), s(!0), o.current.emit("visible", !0);
1689
+ }), h = () => {
1690
+ s(!1), o.current.emit("visible", !1);
1691
+ }, m = () => {
1690
1692
  o.current.emit("clickHide"), h();
1691
1693
  };
1692
- return z(() => {
1693
- _ && o.current.emit("visible", r);
1694
- }, [r]), nn(t, () => ({
1694
+ return nn(t, () => ({
1695
1695
  onVisible: c,
1696
1696
  onClick: p,
1697
1697
  onClickHide: d,
@@ -1699,7 +1699,7 @@ const Zo = ar(), Ht = ({
1699
1699
  hide: h,
1700
1700
  setApiHost: i,
1701
1701
  resetListeners: o.current.reset
1702
- })), z(() => o.current.reset, []), {
1702
+ })), K(() => o.current.reset, []), {
1703
1703
  isReady: _,
1704
1704
  isOpen: r,
1705
1705
  apiHost: l,
@@ -1727,10 +1727,10 @@ const Zo = ar(), Ht = ({
1727
1727
  medium: "#F8CC11",
1728
1728
  high: "#00C85D"
1729
1729
  }, pp = (t = 5e3, n = "default", e) => {
1730
- const o = n === "default" ? dp : up, [r, s] = mt(+t), l = K(), i = r / +t * 100, _ = i > 66 ? o.low : i > 33 ? o.medium : o.high;
1731
- return z(() => {
1730
+ const o = n === "default" ? dp : up, [r, s] = mt(+t), l = q(), i = r / +t * 100, _ = i > 66 ? o.low : i > 33 ? o.medium : o.high;
1731
+ return K(() => {
1732
1732
  r <= 0 && clearInterval(l.current);
1733
- }, [r]), z(() => (s(t), l.current = setInterval(() => s((u) => u - 1e3), 1e3), () => clearInterval(l.current)), [t, n]), z(() => {
1733
+ }, [r]), K(() => (s(t), l.current = setInterval(() => s((u) => u - 1e3), 1e3), () => clearInterval(l.current)), [t, n]), K(() => {
1734
1734
  e(r);
1735
1735
  }, [r]), {
1736
1736
  color: _,
@@ -1810,7 +1810,7 @@ const gp = ee(({
1810
1810
  className: n
1811
1811
  }, e) => {
1812
1812
  var N, L, R, H, j, P, lt, ot;
1813
- const [o, r] = mt(1 / 0), s = K(null), l = K(null), i = Pt({
1813
+ const [o, r] = mt(1 / 0), s = q(null), l = q(null), i = Pt({
1814
1814
  targetRef: s,
1815
1815
  id: t
1816
1816
  }), _ = Z(), u = Dt(_, i);
@@ -1822,7 +1822,7 @@ const gp = ee(({
1822
1822
  clickHide: m,
1823
1823
  click: y
1824
1824
  } = un(e, p), f = v(c, "close.variant", "default"), S = v(c, "close.radius", 21), O = v(c, "close.colorDirection", "default"), I = v(c, "close.timeoutLock", !1), D = f === "timer" ? o <= 0 : !0, k = f === "timer" && I && o > 0 ? "div" : "a";
1825
- z(() => {
1825
+ K(() => {
1826
1826
  const rt = l.current;
1827
1827
  if (!rt)
1828
1828
  return;
@@ -1835,7 +1835,7 @@ const gp = ee(({
1835
1835
  rt.removeEventListener("load", pt);
1836
1836
  };
1837
1837
  }, [c]);
1838
- const q = {
1838
+ const z = {
1839
1839
  alignItems: jt((R = c.root) == null ? void 0 : R.align)
1840
1840
  }, J = T(C({}, c == null ? void 0 : c.button), {
1841
1841
  justifyContent: jt((H = c.root) == null ? void 0 : H.textAlign)
@@ -1899,7 +1899,7 @@ const gp = ee(({
1899
1899
  style: M
1900
1900
  }), a("div", {
1901
1901
  className: ut.body,
1902
- style: q,
1902
+ style: z,
1903
1903
  children: [a("div", {
1904
1904
  className: ut.logo,
1905
1905
  style: c.logo
@@ -2037,7 +2037,7 @@ const Up = {
2037
2037
  id: t
2038
2038
  }, n) => {
2039
2039
  var O, I;
2040
- const [e, o] = mt(1 / 0), r = K(null), s = Pt({
2040
+ const [e, o] = mt(1 / 0), r = q(null), s = Pt({
2041
2041
  targetRef: r,
2042
2042
  id: t,
2043
2043
  breakpoints: Up
@@ -2446,7 +2446,7 @@ const Nf = new Set(Object.keys(tr)), wt = ({
2446
2446
  country: r
2447
2447
  }) => {
2448
2448
  var l, i;
2449
- const s = K(null);
2449
+ const s = q(null);
2450
2450
  if (o === "tennis" && r) {
2451
2451
  let _ = r.logo;
2452
2452
  if (!_) {
@@ -2627,7 +2627,7 @@ var St = {}, Kf = {
2627
2627
  } }, y = { name: "en", weekdays: "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"), months: "January_February_March_April_May_June_July_August_September_October_November_December".split("_") }, f = "en", S = {};
2628
2628
  S[f] = y;
2629
2629
  var O = function(x) {
2630
- return x instanceof q;
2630
+ return x instanceof z;
2631
2631
  }, I = function(x, w, $) {
2632
2632
  var M;
2633
2633
  if (!x)
@@ -2643,12 +2643,12 @@ var St = {}, Kf = {
2643
2643
  if (O(x))
2644
2644
  return x.clone();
2645
2645
  var $ = typeof w == "object" ? w : {};
2646
- return $.date = x, $.args = arguments, new q($);
2646
+ return $.date = x, $.args = arguments, new z($);
2647
2647
  }, k = m;
2648
2648
  k.l = I, k.i = O, k.w = function(x, w) {
2649
2649
  return D(x, { locale: w.$L, utc: w.$u, $offset: w.$offset });
2650
2650
  };
2651
- var q = function() {
2651
+ var z = function() {
2652
2652
  function x($) {
2653
2653
  this.$L = this.$L || I($.locale, null, !0), this.parse($);
2654
2654
  }
@@ -2791,13 +2791,13 @@ var St = {}, Kf = {
2791
2791
  }, w.toString = function() {
2792
2792
  return this.$d.toUTCString();
2793
2793
  }, x;
2794
- }(), J = q.prototype;
2794
+ }(), J = z.prototype;
2795
2795
  return D.prototype = J, [["$ms", e], ["$s", o], ["$m", r], ["$H", s], ["$W", l], ["$M", _], ["$y", c], ["$D", p]].forEach(function(x) {
2796
2796
  J[x[1]] = function(w) {
2797
2797
  return this.$g(w, x[0], x[1]);
2798
2798
  };
2799
2799
  }), D.extend = function(x, w) {
2800
- return x(w, q, D), D;
2800
+ return x(w, z, D), D;
2801
2801
  }, D.locale = I, D.isDayjs = O, D.unix = function(x) {
2802
2802
  return D(1e3 * x);
2803
2803
  }, D.en = S[f], D.Ls = S, D;
@@ -3122,7 +3122,7 @@ const mo = (t, n = "DD.MM.YYYY", e = "en") => t ? Zf(t).locale(e).format(n) : ""
3122
3122
  });
3123
3123
  d && (Me.set(p, d.data), _(d.data)), l(!1);
3124
3124
  }), [u, n, o, r]);
3125
- return z(() => {
3125
+ return K(() => {
3126
3126
  n || c();
3127
3127
  }, [u, n]), {
3128
3128
  data: i,
@@ -3131,8 +3131,8 @@ const mo = (t, n = "DD.MM.YYYY", e = "en") => t ? Zf(t).locale(e).format(n) : ""
3131
3131
  };
3132
3132
  };
3133
3133
  function Ge(t) {
3134
- const n = K();
3135
- return z(() => {
3134
+ const n = q();
3135
+ return K(() => {
3136
3136
  n.current = t;
3137
3137
  }, [t]), n.current;
3138
3138
  }
@@ -3190,7 +3190,7 @@ const sg = (t) => {
3190
3190
  withPrediction: o === "prediction",
3191
3191
  pause: _
3192
3192
  }), p = u[0];
3193
- return z(() => {
3193
+ return K(() => {
3194
3194
  Ve(r, n) || l();
3195
3195
  }, [n]), {
3196
3196
  match: Nt(() => n.slug ? s : o === "prediction" ? s != null && s.prediction ? s : p : s != null ? s : p, [n, s, p, o]),
@@ -3222,7 +3222,7 @@ const sg = (t) => {
3222
3222
  apiHost: n,
3223
3223
  match: e
3224
3224
  });
3225
- z(() => {
3225
+ K(() => {
3226
3226
  Ve(l, s) || _();
3227
3227
  }, [s, e]);
3228
3228
  const c = r.map((p) => {
@@ -3244,7 +3244,7 @@ const sg = (t) => {
3244
3244
  oddFormatter: e
3245
3245
  }, o) => {
3246
3246
  var lt, ot, rt, pt, vt, X, ft, Yt, Rt, ie, le, ce, _e, de, dt;
3247
- const [r, s] = mt(1 / 0), l = K(null), i = Pt({
3247
+ const [r, s] = mt(1 / 0), l = q(null), i = Pt({
3248
3248
  targetRef: l,
3249
3249
  id: t
3250
3250
  }), _ = Z(), u = Dt(_, i);
@@ -3256,7 +3256,7 @@ const sg = (t) => {
3256
3256
  apiHost: m,
3257
3257
  clickHide: y,
3258
3258
  click: f
3259
- } = un(o, p, !0), S = v(c, "close.variant", "default"), O = v(c, "close.radius", 21), I = v(c, "close.colorDirection", "default"), D = v(c, "close.timeoutLock", !1), k = S === "timer" ? r <= 0 : !0, q = S === "timer" && D && r > 0 ? "div" : "a", {
3259
+ } = un(o, p, !0), S = v(c, "close.variant", "default"), O = v(c, "close.radius", 21), I = v(c, "close.colorDirection", "default"), D = v(c, "close.timeoutLock", !1), k = S === "timer" ? r <= 0 : !0, z = S === "timer" && D && r > 0 ? "div" : "a", {
3260
3260
  expressMatches: J,
3261
3261
  autoMatch: x
3262
3262
  } = ig(u, m, g ? n : void 0);
@@ -3319,12 +3319,12 @@ const sg = (t) => {
3319
3319
  className: nt.promotion,
3320
3320
  style: c.promotion,
3321
3321
  children: (ie = c.promotion) == null ? void 0 : ie.children
3322
- }), a(q, {
3322
+ }), a(z, {
3323
3323
  ref: l,
3324
3324
  href: (le = c.root) == null ? void 0 : le.offer,
3325
3325
  target: "_blank",
3326
3326
  rel: "nofollow noopener noreferrer",
3327
- onClick: () => q === "a" && f(c.id),
3327
+ onClick: () => z === "a" && f(c.id),
3328
3328
  children: a("div", {
3329
3329
  className: nt.body,
3330
3330
  style: w,
@@ -3417,7 +3417,7 @@ const sg = (t) => {
3417
3417
  apiHost: t,
3418
3418
  onClick: n
3419
3419
  }) => {
3420
- var p, d, g, h, m, y, f, S, O, I, D, k, q;
3420
+ var p, d, g, h, m, y, f, S, O, I, D, k, z;
3421
3421
  const e = Z(), o = G(e), {
3422
3422
  promotionValues: r
3423
3423
  } = $g(t), [s, l] = Ce(), i = !!((p = o.legalInfoButton) != null && p.closeText && ((g = (d = o.legalInfoButton) == null ? void 0 : d.closeText) == null ? void 0 : g.length) > 0), _ = me((h = o.rowFirst) == null ? void 0 : h.children, r, {
@@ -3475,17 +3475,17 @@ const sg = (t) => {
3475
3475
  className: yt.legalButton,
3476
3476
  style: o.legalInfoButton,
3477
3477
  onClick: l,
3478
- children: s ? (k = o.legalInfoButton) == null ? void 0 : k.openText : (q = o.legalInfoButton) == null ? void 0 : q.closeText
3478
+ children: s ? (k = o.legalInfoButton) == null ? void 0 : k.openText : (z = o.legalInfoButton) == null ? void 0 : z.closeText
3479
3479
  })]
3480
3480
  })]
3481
3481
  });
3482
3482
  }, wg = (t) => {
3483
- const n = K(cn()), e = (o) => n.current.on("click", o);
3483
+ const n = q(cn()), e = (o) => n.current.on("click", o);
3484
3484
  return nn(t, () => ({
3485
3485
  promoId: "ContentCards",
3486
3486
  onClick: e,
3487
3487
  resetListeners: n.current.reset
3488
- })), z(() => n.current.reset, []), {
3488
+ })), K(() => n.current.reset, []), {
3489
3489
  click: (...o) => n.current.emit("click", ...o),
3490
3490
  onClick: e
3491
3491
  };
@@ -3521,7 +3521,7 @@ const sg = (t) => {
3521
3521
  apiHost: t,
3522
3522
  limit: n
3523
3523
  }, e) => {
3524
- const o = K(null), r = Z(), l = Dt(r, "mobile"), i = G(l);
3524
+ const o = q(null), r = Z(), l = Dt(r, "mobile"), i = G(l);
3525
3525
  It(l);
3526
3526
  const {
3527
3527
  click: _
@@ -3575,7 +3575,7 @@ const sg = (t) => {
3575
3575
  pause: e = !1
3576
3576
  }) => {
3577
3577
  const [o, r] = mt(0), [s, l] = mt(!1);
3578
- return z(() => {
3578
+ return K(() => {
3579
3579
  if (e)
3580
3580
  l(!1);
3581
3581
  else {
@@ -3590,7 +3590,7 @@ const sg = (t) => {
3590
3590
  clearTimeout(_), clearTimeout(i);
3591
3591
  };
3592
3592
  }
3593
- }, [o, e]), z(() => () => {
3593
+ }, [o, e]), K(() => () => {
3594
3594
  r(0);
3595
3595
  }, [e]), s;
3596
3596
  }, xe = 1e3, yo = 1300, bo = 0, zg = ({
@@ -3598,7 +3598,7 @@ const sg = (t) => {
3598
3598
  pause: n,
3599
3599
  deps: e = []
3600
3600
  }) => {
3601
- const o = K(null), r = Gt({
3601
+ const o = q(null), r = Gt({
3602
3602
  pause: n,
3603
3603
  duration: xe,
3604
3604
  delay: (i) => i > 0 ? yo : bo
@@ -3610,7 +3610,7 @@ const sg = (t) => {
3610
3610
  const c = typeof i == "string" ? document.createElement("span") : i;
3611
3611
  return typeof i == "string" && (c.textContent = i), c.classList.add(vo.word), c.style.animationDelay = `${_ * u}ms`, c.style.animationDuration = `${u}ms`, c;
3612
3612
  };
3613
- return z(() => {
3613
+ return K(() => {
3614
3614
  var i;
3615
3615
  if (!n) {
3616
3616
  const _ = (i = o.current) == null ? void 0 : i.childNodes[0];
@@ -3881,8 +3881,8 @@ const sg = (t) => {
3881
3881
  });
3882
3882
  }, xm = (t = [], n = !1) => {
3883
3883
  var i;
3884
- const e = K(0), o = t.length, [r, s] = mt(0), l = (i = t[r || 0]) == null ? void 0 : i.animationDuration;
3885
- return z(() => {
3884
+ const e = q(0), o = t.length, [r, s] = mt(0), l = (i = t[r || 0]) == null ? void 0 : i.animationDuration;
3885
+ return K(() => {
3886
3886
  const _ = () => {
3887
3887
  s((u) => u + 1 < o ? u + 1 : 0), e.current += 1;
3888
3888
  };
@@ -3892,7 +3892,7 @@ const sg = (t) => {
3892
3892
  clearTimeout(u);
3893
3893
  };
3894
3894
  }
3895
- }, [s, o, l, r, n]), z(() => () => {
3895
+ }, [s, o, l, r, n]), K(() => () => {
3896
3896
  e.current = 0;
3897
3897
  }, []), {
3898
3898
  animatedIdx: r,
@@ -3934,7 +3934,7 @@ const sg = (t) => {
3934
3934
  bookmaker: l == null ? void 0 : l.bookmaker
3935
3935
  })
3936
3936
  });
3937
- return z(() => {
3937
+ return K(() => {
3938
3938
  Ve(i, s) || u();
3939
3939
  }, [s]), r.map((d) => {
3940
3940
  var g, h;
@@ -4033,8 +4033,8 @@ const sg = (t) => {
4033
4033
  onClose: i,
4034
4034
  onClick: _
4035
4035
  }) => {
4036
- var q, J, x, w, $, M;
4037
- const u = K(null), c = Z(), p = Pt({
4036
+ var z, J, x, w, $, M;
4037
+ const u = q(null), c = Z(), p = Pt({
4038
4038
  id: t,
4039
4039
  targetRef: u
4040
4040
  }), d = Dt(c, p), g = G(d);
@@ -4059,7 +4059,7 @@ const sg = (t) => {
4059
4059
  }), {
4060
4060
  animatedIdx: f,
4061
4061
  countOfTick: S
4062
- } = xm(y, o), O = G(y[f] || {}), I = (y == null ? void 0 : y.length) > 1, D = Ot(g.root, ...Tt), k = (q = O == null ? void 0 : O.root) != null && q.hasCustomBackground ? Vt((O == null ? void 0 : O.root) || {}, ...Tt) : Vt(g.root, ...Tt);
4062
+ } = xm(y, o), O = G(y[f] || {}), I = (y == null ? void 0 : y.length) > 1, D = Ot(g.root, ...Tt), k = (z = O == null ? void 0 : O.root) != null && z.hasCustomBackground ? Vt((O == null ? void 0 : O.root) || {}, ...Tt) : Vt(g.root, ...Tt);
4063
4063
  return a("div", {
4064
4064
  ref: u,
4065
4065
  className: A(ct.root, n == null ? void 0 : n.root, {
@@ -4313,22 +4313,22 @@ const sg = (t) => {
4313
4313
  })]
4314
4314
  });
4315
4315
  }, w1 = (t) => {
4316
- const n = K(cn()), e = (r) => n.current.on("click", r), o = (r) => n.current.on("visible", r);
4316
+ const n = q(cn()), e = (r) => n.current.on("click", r), o = (r) => n.current.on("visible", r);
4317
4317
  return nn(t, () => ({
4318
4318
  promoId: "ContentCards",
4319
4319
  onClick: e,
4320
4320
  onVisible: o,
4321
4321
  resetListeners: n.current.reset
4322
- })), z(() => {
4322
+ })), K(() => {
4323
4323
  n.current.emit("visible");
4324
- }, []), z(() => n.current.reset, []), {
4324
+ }, []), K(() => n.current.reset, []), {
4325
4325
  click: (...r) => n.current.emit("click", ...r),
4326
4326
  onClick: e
4327
4327
  };
4328
4328
  }, k1 = ee(({
4329
4329
  id: t
4330
4330
  }, n) => {
4331
- const e = K(null), o = Z(), r = Pt({
4331
+ const e = q(null), o = Z(), r = Pt({
4332
4332
  targetRef: e,
4333
4333
  id: t
4334
4334
  }), s = Dt(o, r), l = G(s);
@@ -4376,7 +4376,7 @@ const sg = (t) => {
4376
4376
  onClick: n
4377
4377
  }, e) => {
4378
4378
  var c, p, d, g, h, m, y, f, S, O, I;
4379
- const [o, r] = Ce(), s = K(null), l = Z(), i = Pt({
4379
+ const [o, r] = Ce(), s = q(null), l = Z(), i = Pt({
4380
4380
  targetRef: s,
4381
4381
  id: t
4382
4382
  }), _ = Dt(l, i), u = G(_);
@@ -4513,7 +4513,7 @@ const sg = (t) => {
4513
4513
  bookmaker: l == null ? void 0 : l.bookmaker
4514
4514
  })
4515
4515
  });
4516
- z(() => {
4516
+ K(() => {
4517
4517
  Ve(i, s) || c();
4518
4518
  }, [s]);
4519
4519
  const h = r.map((m) => {
@@ -4530,9 +4530,9 @@ const sg = (t) => {
4530
4530
  return;
4531
4531
  const k = be(I, {
4532
4532
  markets: O
4533
- }), q = dn(k, m.root.customMatch, (J, [x, w]) => W(w));
4533
+ }), z = dn(k, m.root.customMatch, (J, [x, w]) => W(w));
4534
4534
  return T(C({}, m), {
4535
- match: q
4535
+ match: z
4536
4536
  });
4537
4537
  }
4538
4538
  return m;
@@ -4668,8 +4668,8 @@ const sg = (t) => {
4668
4668
  prefix: t,
4669
4669
  pause: n = !1
4670
4670
  }) => {
4671
- const e = Mn(), o = Mn(), r = K(null), s = K(null), l = K(null), i = K(null), _ = (u) => `${t}_${u}`;
4672
- return z(() => {
4671
+ const e = Mn(), o = Mn(), r = q(null), s = q(null), l = q(null), i = q(null), _ = (u) => `${t}_${u}`;
4672
+ return K(() => {
4673
4673
  n || [r, s, l, i].forEach((u) => {
4674
4674
  var c;
4675
4675
  return (c = u == null ? void 0 : u.current) == null ? void 0 : c.beginElement();
@@ -4912,7 +4912,7 @@ const sg = (t) => {
4912
4912
  onClick: u
4913
4913
  }) => {
4914
4914
  var w, $, M, b, N, L, R, H, j, P, lt, ot, rt, pt, vt, X, ft, Yt, Rt, ie, le, ce, _e, de;
4915
- const c = K(null), p = Z(), d = Pt({
4915
+ const c = q(null), p = Z(), d = Pt({
4916
4916
  targetRef: c,
4917
4917
  id: t,
4918
4918
  breakpoints: en
@@ -4935,7 +4935,7 @@ const sg = (t) => {
4935
4935
  delay: (dt) => s0(O, dt)
4936
4936
  }), k = T(C({}, f == null ? void 0 : f.container), {
4937
4937
  alignItems: jt((j = f == null ? void 0 : f.container) == null ? void 0 : j.align)
4938
- }), q = !!(h != null && h.some((dt) => dt.name === "bonus")), J = (dt) => ({
4938
+ }), z = !!(h != null && h.some((dt) => dt.name === "bonus")), J = (dt) => ({
4939
4939
  match: a(Ah, {
4940
4940
  oddFormatter: o,
4941
4941
  device: d,
@@ -4948,9 +4948,9 @@ const sg = (t) => {
4948
4948
  onClick: (ue) => u(p, ue)
4949
4949
  })
4950
4950
  })[dt];
4951
- z(() => {
4951
+ K(() => {
4952
4952
  l && l(p);
4953
- }, []), z(() => {
4953
+ }, []), K(() => {
4954
4954
  g && (i && y && !m && (h != null && h.length) ? i({
4955
4955
  readyPayload: s,
4956
4956
  willWithMatches: y
@@ -4963,7 +4963,7 @@ const sg = (t) => {
4963
4963
  return a("div", {
4964
4964
  className: A(Y.root, Y[d], {
4965
4965
  [Y.withoutLegal]: !S,
4966
- [Y.isBonuses]: q,
4966
+ [Y.isBonuses]: z,
4967
4967
  [Y.isColumn]: tn.includes(d)
4968
4968
  }),
4969
4969
  children: [a("div", {
@@ -5020,7 +5020,7 @@ const sg = (t) => {
5020
5020
  })
5021
5021
  }), (((ft = (X = f == null ? void 0 : f.text) == null ? void 0 : X.children) == null ? void 0 : ft.length) === 0 || ((Yt = f == null ? void 0 : f.text) == null ? void 0 : Yt.hidden)) && a("div", {
5022
5022
  className: A(Y.containerInner, {
5023
- [Y.containerBonuses]: q
5023
+ [Y.containerBonuses]: z
5024
5024
  }),
5025
5025
  children: (h || []).map((dt) => a(Ht, {
5026
5026
  value: T(C({}, dt), {
@@ -5070,12 +5070,12 @@ const sg = (t) => {
5070
5070
  onClick: e
5071
5071
  }) => {
5072
5072
  var _, u, c, p, d;
5073
- const o = K(null), r = Z(), s = Pt({
5073
+ const o = q(null), r = Z(), s = Pt({
5074
5074
  targetRef: o,
5075
5075
  id: t,
5076
5076
  breakpoints: wo
5077
5077
  }), l = Dt(r, s, wo), i = G(l);
5078
- return It(l), z(() => {
5078
+ return It(l), K(() => {
5079
5079
  n && n(r);
5080
5080
  }, []), a("div", {
5081
5081
  ref: o,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@adstore/templates",
3
3
  "private": false,
4
- "version": "2.18.11",
4
+ "version": "2.18.13",
5
5
  "type": "module",
6
6
  "files": [
7
7
  "dist"
@@ -31,7 +31,7 @@
31
31
  "@testing-library/preact": "^3.2.3",
32
32
  "jsdom": "^22.1.0",
33
33
  "typescript": "^5.0.2",
34
- "vite": "^4.3.2",
34
+ "vite": "^6.3.5",
35
35
  "vite-tsconfig-paths": "^4.2.0",
36
36
  "vitest": "^0.32.0"
37
37
  }
@@ -1,515 +0,0 @@
1
- var resizeObservers = [];
2
- var hasActiveObservations = function() {
3
- return resizeObservers.some(function(ro) {
4
- return ro.activeTargets.length > 0;
5
- });
6
- };
7
- var hasSkippedObservations = function() {
8
- return resizeObservers.some(function(ro) {
9
- return ro.skippedTargets.length > 0;
10
- });
11
- };
12
- var msg = "ResizeObserver loop completed with undelivered notifications.";
13
- var deliverResizeLoopError = function() {
14
- var event;
15
- if (typeof ErrorEvent === "function") {
16
- event = new ErrorEvent("error", {
17
- message: msg
18
- });
19
- } else {
20
- event = document.createEvent("Event");
21
- event.initEvent("error", false, false);
22
- event.message = msg;
23
- }
24
- window.dispatchEvent(event);
25
- };
26
- var ResizeObserverBoxOptions;
27
- (function(ResizeObserverBoxOptions2) {
28
- ResizeObserverBoxOptions2["BORDER_BOX"] = "border-box";
29
- ResizeObserverBoxOptions2["CONTENT_BOX"] = "content-box";
30
- ResizeObserverBoxOptions2["DEVICE_PIXEL_CONTENT_BOX"] = "device-pixel-content-box";
31
- })(ResizeObserverBoxOptions || (ResizeObserverBoxOptions = {}));
32
- var freeze = function(obj) {
33
- return Object.freeze(obj);
34
- };
35
- var ResizeObserverSize = function() {
36
- function ResizeObserverSize2(inlineSize, blockSize) {
37
- this.inlineSize = inlineSize;
38
- this.blockSize = blockSize;
39
- freeze(this);
40
- }
41
- return ResizeObserverSize2;
42
- }();
43
- var DOMRectReadOnly = function() {
44
- function DOMRectReadOnly2(x, y, width, height) {
45
- this.x = x;
46
- this.y = y;
47
- this.width = width;
48
- this.height = height;
49
- this.top = this.y;
50
- this.left = this.x;
51
- this.bottom = this.top + this.height;
52
- this.right = this.left + this.width;
53
- return freeze(this);
54
- }
55
- DOMRectReadOnly2.prototype.toJSON = function() {
56
- var _a = this, x = _a.x, y = _a.y, top = _a.top, right = _a.right, bottom = _a.bottom, left = _a.left, width = _a.width, height = _a.height;
57
- return { x, y, top, right, bottom, left, width, height };
58
- };
59
- DOMRectReadOnly2.fromRect = function(rectangle) {
60
- return new DOMRectReadOnly2(rectangle.x, rectangle.y, rectangle.width, rectangle.height);
61
- };
62
- return DOMRectReadOnly2;
63
- }();
64
- var isSVG = function(target) {
65
- return target instanceof SVGElement && "getBBox" in target;
66
- };
67
- var isHidden = function(target) {
68
- if (isSVG(target)) {
69
- var _a = target.getBBox(), width = _a.width, height = _a.height;
70
- return !width && !height;
71
- }
72
- var _b = target, offsetWidth = _b.offsetWidth, offsetHeight = _b.offsetHeight;
73
- return !(offsetWidth || offsetHeight || target.getClientRects().length);
74
- };
75
- var isElement = function(obj) {
76
- var _a;
77
- if (obj instanceof Element) {
78
- return true;
79
- }
80
- var scope = (_a = obj === null || obj === void 0 ? void 0 : obj.ownerDocument) === null || _a === void 0 ? void 0 : _a.defaultView;
81
- return !!(scope && obj instanceof scope.Element);
82
- };
83
- var isReplacedElement = function(target) {
84
- switch (target.tagName) {
85
- case "INPUT":
86
- if (target.type !== "image") {
87
- break;
88
- }
89
- case "VIDEO":
90
- case "AUDIO":
91
- case "EMBED":
92
- case "OBJECT":
93
- case "CANVAS":
94
- case "IFRAME":
95
- case "IMG":
96
- return true;
97
- }
98
- return false;
99
- };
100
- var global = typeof window !== "undefined" ? window : {};
101
- var cache = /* @__PURE__ */ new WeakMap();
102
- var scrollRegexp = /auto|scroll/;
103
- var verticalRegexp = /^tb|vertical/;
104
- var IE = /msie|trident/i.test(global.navigator && global.navigator.userAgent);
105
- var parseDimension = function(pixel) {
106
- return parseFloat(pixel || "0");
107
- };
108
- var size = function(inlineSize, blockSize, switchSizes) {
109
- if (inlineSize === void 0) {
110
- inlineSize = 0;
111
- }
112
- if (blockSize === void 0) {
113
- blockSize = 0;
114
- }
115
- if (switchSizes === void 0) {
116
- switchSizes = false;
117
- }
118
- return new ResizeObserverSize((switchSizes ? blockSize : inlineSize) || 0, (switchSizes ? inlineSize : blockSize) || 0);
119
- };
120
- var zeroBoxes = freeze({
121
- devicePixelContentBoxSize: size(),
122
- borderBoxSize: size(),
123
- contentBoxSize: size(),
124
- contentRect: new DOMRectReadOnly(0, 0, 0, 0)
125
- });
126
- var calculateBoxSizes = function(target, forceRecalculation) {
127
- if (forceRecalculation === void 0) {
128
- forceRecalculation = false;
129
- }
130
- if (cache.has(target) && !forceRecalculation) {
131
- return cache.get(target);
132
- }
133
- if (isHidden(target)) {
134
- cache.set(target, zeroBoxes);
135
- return zeroBoxes;
136
- }
137
- var cs = getComputedStyle(target);
138
- var svg = isSVG(target) && target.ownerSVGElement && target.getBBox();
139
- var removePadding = !IE && cs.boxSizing === "border-box";
140
- var switchSizes = verticalRegexp.test(cs.writingMode || "");
141
- var canScrollVertically = !svg && scrollRegexp.test(cs.overflowY || "");
142
- var canScrollHorizontally = !svg && scrollRegexp.test(cs.overflowX || "");
143
- var paddingTop = svg ? 0 : parseDimension(cs.paddingTop);
144
- var paddingRight = svg ? 0 : parseDimension(cs.paddingRight);
145
- var paddingBottom = svg ? 0 : parseDimension(cs.paddingBottom);
146
- var paddingLeft = svg ? 0 : parseDimension(cs.paddingLeft);
147
- var borderTop = svg ? 0 : parseDimension(cs.borderTopWidth);
148
- var borderRight = svg ? 0 : parseDimension(cs.borderRightWidth);
149
- var borderBottom = svg ? 0 : parseDimension(cs.borderBottomWidth);
150
- var borderLeft = svg ? 0 : parseDimension(cs.borderLeftWidth);
151
- var horizontalPadding = paddingLeft + paddingRight;
152
- var verticalPadding = paddingTop + paddingBottom;
153
- var horizontalBorderArea = borderLeft + borderRight;
154
- var verticalBorderArea = borderTop + borderBottom;
155
- var horizontalScrollbarThickness = !canScrollHorizontally ? 0 : target.offsetHeight - verticalBorderArea - target.clientHeight;
156
- var verticalScrollbarThickness = !canScrollVertically ? 0 : target.offsetWidth - horizontalBorderArea - target.clientWidth;
157
- var widthReduction = removePadding ? horizontalPadding + horizontalBorderArea : 0;
158
- var heightReduction = removePadding ? verticalPadding + verticalBorderArea : 0;
159
- var contentWidth = svg ? svg.width : parseDimension(cs.width) - widthReduction - verticalScrollbarThickness;
160
- var contentHeight = svg ? svg.height : parseDimension(cs.height) - heightReduction - horizontalScrollbarThickness;
161
- var borderBoxWidth = contentWidth + horizontalPadding + verticalScrollbarThickness + horizontalBorderArea;
162
- var borderBoxHeight = contentHeight + verticalPadding + horizontalScrollbarThickness + verticalBorderArea;
163
- var boxes = freeze({
164
- devicePixelContentBoxSize: size(Math.round(contentWidth * devicePixelRatio), Math.round(contentHeight * devicePixelRatio), switchSizes),
165
- borderBoxSize: size(borderBoxWidth, borderBoxHeight, switchSizes),
166
- contentBoxSize: size(contentWidth, contentHeight, switchSizes),
167
- contentRect: new DOMRectReadOnly(paddingLeft, paddingTop, contentWidth, contentHeight)
168
- });
169
- cache.set(target, boxes);
170
- return boxes;
171
- };
172
- var calculateBoxSize = function(target, observedBox, forceRecalculation) {
173
- var _a = calculateBoxSizes(target, forceRecalculation), borderBoxSize = _a.borderBoxSize, contentBoxSize = _a.contentBoxSize, devicePixelContentBoxSize = _a.devicePixelContentBoxSize;
174
- switch (observedBox) {
175
- case ResizeObserverBoxOptions.DEVICE_PIXEL_CONTENT_BOX:
176
- return devicePixelContentBoxSize;
177
- case ResizeObserverBoxOptions.BORDER_BOX:
178
- return borderBoxSize;
179
- default:
180
- return contentBoxSize;
181
- }
182
- };
183
- var ResizeObserverEntry = function() {
184
- function ResizeObserverEntry2(target) {
185
- var boxes = calculateBoxSizes(target);
186
- this.target = target;
187
- this.contentRect = boxes.contentRect;
188
- this.borderBoxSize = freeze([boxes.borderBoxSize]);
189
- this.contentBoxSize = freeze([boxes.contentBoxSize]);
190
- this.devicePixelContentBoxSize = freeze([boxes.devicePixelContentBoxSize]);
191
- }
192
- return ResizeObserverEntry2;
193
- }();
194
- var calculateDepthForNode = function(node) {
195
- if (isHidden(node)) {
196
- return Infinity;
197
- }
198
- var depth = 0;
199
- var parent = node.parentNode;
200
- while (parent) {
201
- depth += 1;
202
- parent = parent.parentNode;
203
- }
204
- return depth;
205
- };
206
- var broadcastActiveObservations = function() {
207
- var shallowestDepth = Infinity;
208
- var callbacks2 = [];
209
- resizeObservers.forEach(function processObserver(ro) {
210
- if (ro.activeTargets.length === 0) {
211
- return;
212
- }
213
- var entries = [];
214
- ro.activeTargets.forEach(function processTarget(ot) {
215
- var entry = new ResizeObserverEntry(ot.target);
216
- var targetDepth = calculateDepthForNode(ot.target);
217
- entries.push(entry);
218
- ot.lastReportedSize = calculateBoxSize(ot.target, ot.observedBox);
219
- if (targetDepth < shallowestDepth) {
220
- shallowestDepth = targetDepth;
221
- }
222
- });
223
- callbacks2.push(function resizeObserverCallback() {
224
- ro.callback.call(ro.observer, entries, ro.observer);
225
- });
226
- ro.activeTargets.splice(0, ro.activeTargets.length);
227
- });
228
- for (var _i = 0, callbacks_1 = callbacks2; _i < callbacks_1.length; _i++) {
229
- var callback = callbacks_1[_i];
230
- callback();
231
- }
232
- return shallowestDepth;
233
- };
234
- var gatherActiveObservationsAtDepth = function(depth) {
235
- resizeObservers.forEach(function processObserver(ro) {
236
- ro.activeTargets.splice(0, ro.activeTargets.length);
237
- ro.skippedTargets.splice(0, ro.skippedTargets.length);
238
- ro.observationTargets.forEach(function processTarget(ot) {
239
- if (ot.isActive()) {
240
- if (calculateDepthForNode(ot.target) > depth) {
241
- ro.activeTargets.push(ot);
242
- } else {
243
- ro.skippedTargets.push(ot);
244
- }
245
- }
246
- });
247
- });
248
- };
249
- var process = function() {
250
- var depth = 0;
251
- gatherActiveObservationsAtDepth(depth);
252
- while (hasActiveObservations()) {
253
- depth = broadcastActiveObservations();
254
- gatherActiveObservationsAtDepth(depth);
255
- }
256
- if (hasSkippedObservations()) {
257
- deliverResizeLoopError();
258
- }
259
- return depth > 0;
260
- };
261
- var trigger;
262
- var callbacks = [];
263
- var notify = function() {
264
- return callbacks.splice(0).forEach(function(cb) {
265
- return cb();
266
- });
267
- };
268
- var queueMicroTask = function(callback) {
269
- if (!trigger) {
270
- var toggle_1 = 0;
271
- var el_1 = document.createTextNode("");
272
- var config = { characterData: true };
273
- new MutationObserver(function() {
274
- return notify();
275
- }).observe(el_1, config);
276
- trigger = function() {
277
- el_1.textContent = "".concat(toggle_1 ? toggle_1-- : toggle_1++);
278
- };
279
- }
280
- callbacks.push(callback);
281
- trigger();
282
- };
283
- var queueResizeObserver = function(cb) {
284
- queueMicroTask(function ResizeObserver2() {
285
- requestAnimationFrame(cb);
286
- });
287
- };
288
- var watching = 0;
289
- var isWatching = function() {
290
- return !!watching;
291
- };
292
- var CATCH_PERIOD = 250;
293
- var observerConfig = { attributes: true, characterData: true, childList: true, subtree: true };
294
- var events = [
295
- "resize",
296
- "load",
297
- "transitionend",
298
- "animationend",
299
- "animationstart",
300
- "animationiteration",
301
- "keyup",
302
- "keydown",
303
- "mouseup",
304
- "mousedown",
305
- "mouseover",
306
- "mouseout",
307
- "blur",
308
- "focus"
309
- ];
310
- var time = function(timeout) {
311
- if (timeout === void 0) {
312
- timeout = 0;
313
- }
314
- return Date.now() + timeout;
315
- };
316
- var scheduled = false;
317
- var Scheduler = function() {
318
- function Scheduler2() {
319
- var _this = this;
320
- this.stopped = true;
321
- this.listener = function() {
322
- return _this.schedule();
323
- };
324
- }
325
- Scheduler2.prototype.run = function(timeout) {
326
- var _this = this;
327
- if (timeout === void 0) {
328
- timeout = CATCH_PERIOD;
329
- }
330
- if (scheduled) {
331
- return;
332
- }
333
- scheduled = true;
334
- var until = time(timeout);
335
- queueResizeObserver(function() {
336
- var elementsHaveResized = false;
337
- try {
338
- elementsHaveResized = process();
339
- } finally {
340
- scheduled = false;
341
- timeout = until - time();
342
- if (!isWatching()) {
343
- return;
344
- }
345
- if (elementsHaveResized) {
346
- _this.run(1e3);
347
- } else if (timeout > 0) {
348
- _this.run(timeout);
349
- } else {
350
- _this.start();
351
- }
352
- }
353
- });
354
- };
355
- Scheduler2.prototype.schedule = function() {
356
- this.stop();
357
- this.run();
358
- };
359
- Scheduler2.prototype.observe = function() {
360
- var _this = this;
361
- var cb = function() {
362
- return _this.observer && _this.observer.observe(document.body, observerConfig);
363
- };
364
- document.body ? cb() : global.addEventListener("DOMContentLoaded", cb);
365
- };
366
- Scheduler2.prototype.start = function() {
367
- var _this = this;
368
- if (this.stopped) {
369
- this.stopped = false;
370
- this.observer = new MutationObserver(this.listener);
371
- this.observe();
372
- events.forEach(function(name) {
373
- return global.addEventListener(name, _this.listener, true);
374
- });
375
- }
376
- };
377
- Scheduler2.prototype.stop = function() {
378
- var _this = this;
379
- if (!this.stopped) {
380
- this.observer && this.observer.disconnect();
381
- events.forEach(function(name) {
382
- return global.removeEventListener(name, _this.listener, true);
383
- });
384
- this.stopped = true;
385
- }
386
- };
387
- return Scheduler2;
388
- }();
389
- var scheduler = new Scheduler();
390
- var updateCount = function(n) {
391
- !watching && n > 0 && scheduler.start();
392
- watching += n;
393
- !watching && scheduler.stop();
394
- };
395
- var skipNotifyOnElement = function(target) {
396
- return !isSVG(target) && !isReplacedElement(target) && getComputedStyle(target).display === "inline";
397
- };
398
- var ResizeObservation = function() {
399
- function ResizeObservation2(target, observedBox) {
400
- this.target = target;
401
- this.observedBox = observedBox || ResizeObserverBoxOptions.CONTENT_BOX;
402
- this.lastReportedSize = {
403
- inlineSize: 0,
404
- blockSize: 0
405
- };
406
- }
407
- ResizeObservation2.prototype.isActive = function() {
408
- var size2 = calculateBoxSize(this.target, this.observedBox, true);
409
- if (skipNotifyOnElement(this.target)) {
410
- this.lastReportedSize = size2;
411
- }
412
- if (this.lastReportedSize.inlineSize !== size2.inlineSize || this.lastReportedSize.blockSize !== size2.blockSize) {
413
- return true;
414
- }
415
- return false;
416
- };
417
- return ResizeObservation2;
418
- }();
419
- var ResizeObserverDetail = function() {
420
- function ResizeObserverDetail2(resizeObserver, callback) {
421
- this.activeTargets = [];
422
- this.skippedTargets = [];
423
- this.observationTargets = [];
424
- this.observer = resizeObserver;
425
- this.callback = callback;
426
- }
427
- return ResizeObserverDetail2;
428
- }();
429
- var observerMap = /* @__PURE__ */ new WeakMap();
430
- var getObservationIndex = function(observationTargets, target) {
431
- for (var i = 0; i < observationTargets.length; i += 1) {
432
- if (observationTargets[i].target === target) {
433
- return i;
434
- }
435
- }
436
- return -1;
437
- };
438
- var ResizeObserverController = function() {
439
- function ResizeObserverController2() {
440
- }
441
- ResizeObserverController2.connect = function(resizeObserver, callback) {
442
- var detail = new ResizeObserverDetail(resizeObserver, callback);
443
- observerMap.set(resizeObserver, detail);
444
- };
445
- ResizeObserverController2.observe = function(resizeObserver, target, options) {
446
- var detail = observerMap.get(resizeObserver);
447
- var firstObservation = detail.observationTargets.length === 0;
448
- if (getObservationIndex(detail.observationTargets, target) < 0) {
449
- firstObservation && resizeObservers.push(detail);
450
- detail.observationTargets.push(new ResizeObservation(target, options && options.box));
451
- updateCount(1);
452
- scheduler.schedule();
453
- }
454
- };
455
- ResizeObserverController2.unobserve = function(resizeObserver, target) {
456
- var detail = observerMap.get(resizeObserver);
457
- var index = getObservationIndex(detail.observationTargets, target);
458
- var lastObservation = detail.observationTargets.length === 1;
459
- if (index >= 0) {
460
- lastObservation && resizeObservers.splice(resizeObservers.indexOf(detail), 1);
461
- detail.observationTargets.splice(index, 1);
462
- updateCount(-1);
463
- }
464
- };
465
- ResizeObserverController2.disconnect = function(resizeObserver) {
466
- var _this = this;
467
- var detail = observerMap.get(resizeObserver);
468
- detail.observationTargets.slice().forEach(function(ot) {
469
- return _this.unobserve(resizeObserver, ot.target);
470
- });
471
- detail.activeTargets.splice(0, detail.activeTargets.length);
472
- };
473
- return ResizeObserverController2;
474
- }();
475
- var ResizeObserver = function() {
476
- function ResizeObserver2(callback) {
477
- if (arguments.length === 0) {
478
- throw new TypeError("Failed to construct 'ResizeObserver': 1 argument required, but only 0 present.");
479
- }
480
- if (typeof callback !== "function") {
481
- throw new TypeError("Failed to construct 'ResizeObserver': The callback provided as parameter 1 is not a function.");
482
- }
483
- ResizeObserverController.connect(this, callback);
484
- }
485
- ResizeObserver2.prototype.observe = function(target, options) {
486
- if (arguments.length === 0) {
487
- throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': 1 argument required, but only 0 present.");
488
- }
489
- if (!isElement(target)) {
490
- throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element");
491
- }
492
- ResizeObserverController.observe(this, target, options);
493
- };
494
- ResizeObserver2.prototype.unobserve = function(target) {
495
- if (arguments.length === 0) {
496
- throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': 1 argument required, but only 0 present.");
497
- }
498
- if (!isElement(target)) {
499
- throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element");
500
- }
501
- ResizeObserverController.unobserve(this, target);
502
- };
503
- ResizeObserver2.prototype.disconnect = function() {
504
- ResizeObserverController.disconnect(this);
505
- };
506
- ResizeObserver2.toString = function() {
507
- return "function ResizeObserver () { [polyfill code] }";
508
- };
509
- return ResizeObserver2;
510
- }();
511
- export {
512
- ResizeObserver,
513
- ResizeObserverEntry,
514
- ResizeObserverSize
515
- };