lido-player 0.0.2-beta-19-dev → 0.0.2-beta-21-dev

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.
Files changed (34) hide show
  1. package/dist/cjs/{decode-Bny56MQ9.js → decode-Buln7Iaf.js} +1 -1
  2. package/dist/cjs/{index-BY9fvbr8.js → index-Bb_TFgTA.js} +1 -1
  3. package/dist/cjs/{index-DjsCseV8.js → index-DBCFoh1I.js} +19 -66
  4. package/dist/cjs/index.cjs.js +2 -2
  5. package/dist/cjs/lido-avatar_22.cjs.entry.js +110 -21
  6. package/dist/cjs/lido-player.cjs.js +2 -2
  7. package/dist/cjs/loader.cjs.js +1 -1
  8. package/dist/collection/collection-manifest.json +1 -1
  9. package/dist/collection/components/trace/lido-trace.js +107 -18
  10. package/dist/components/index.js +1 -1
  11. package/dist/components/lido-home.js +1 -1
  12. package/dist/components/lido-root.js +1 -1
  13. package/dist/components/lido-trace.js +1 -1
  14. package/dist/components/p-BAfFgI9q.js +1 -0
  15. package/dist/components/{p-CWwymnbk.js → p-wF7SBGpr.js} +2 -2
  16. package/dist/esm/{decode-Buyq-Iy5.js → decode-B_VrYFdJ.js} +1 -1
  17. package/dist/esm/{index-CQXciux9.js → index-B-VyHxJa.js} +1 -1
  18. package/dist/esm/{index-DQZfuGjI.js → index-mMpK8062.js} +19 -66
  19. package/dist/esm/index.js +2 -2
  20. package/dist/esm/lido-avatar_22.entry.js +110 -21
  21. package/dist/esm/lido-player.js +3 -3
  22. package/dist/esm/loader.js +2 -2
  23. package/dist/lido-player/index.esm.js +1 -1
  24. package/dist/lido-player/lido-player.esm.js +1 -1
  25. package/dist/lido-player/{p-37736e11.entry.js → p-744dee1c.entry.js} +2 -2
  26. package/dist/lido-player/{p-3Ry570XH.js → p-BK926Rl3.js} +1 -1
  27. package/dist/lido-player/{p-CFtq4Thh.js → p-Cw84dpIR.js} +1 -1
  28. package/dist/lido-player/p-mMpK8062.js +2 -0
  29. package/dist/types/components/trace/lido-trace.d.ts +9 -1
  30. package/dist/types/stencil-public-runtime.d.ts +55 -73
  31. package/loader/index.d.ts +1 -1
  32. package/package.json +3 -3
  33. package/dist/components/p-DYFVwyRr.js +0 -1
  34. package/dist/lido-player/p-DQZfuGjI.js +0 -3
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var index = require('./index-BY9fvbr8.js');
3
+ var index = require('./index-Bb_TFgTA.js');
4
4
 
5
5
  function _mergeNamespaces(n, m) {
6
6
  m.forEach(function (e) {
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var index$1 = require('./index-DjsCseV8.js');
3
+ var index$1 = require('./index-DBCFoh1I.js');
4
4
 
5
5
  const DragMapKey = 'lidoDragMap';
6
6
  const SelectedValuesKey = 'lidoSelectedValues';
@@ -25,7 +25,7 @@ const globalScripts = () => {};
25
25
  const globalStyles = "@font-face{font-family:'Baloo Bhai 2';font-style:normal;font-weight:400 800;font-display:swap;src:url('../assets/offline-assets/fonts/Baloo-Bhai-2/Baloo-Bhai-2-Variable.woff2') format('woff2')}body{overflow:hidden;background-position:center;background-size:cover;background-repeat:no-repeat;height:100vh}*{user-select:none}.lido-disable-check-button{pointer-events:none;background-color:#9393935c !important;color:white}.lido-element-selected{border:2px solid;background-color:#ffdf7d !important}.diagonal-target,.diagonal-drop *{transform:scale(0.8) !important;opacity:1 !important}.cloned-element{display:flex !important;position:absolute !important;filter:grayscale(100%);pointer-events:none}.removeShadow{box-shadow:0px 0px 0px 0px #ff8900 !important}.highlight-element{border:2px solid white;box-shadow:rgb(243, 77, 8) 0px 0px 40px !important}.drop-element.empty{border:4px dashed #f34d08 !important}.drop-element.filled{border:'none' !important}.drag-element{box-shadow:0px 15px 11px rgba(43, 0, 0, 0.3) !important}.drag-element.dropped{box-shadow:none !important}.click-element{background-color:var(--btn-bg-color, rgba(255, 172, 76, 1)) !important;box-shadow:var(--btn-shadow-px) var(--btn-shadow-color, rgba(225, 121, 76, 1)) !important;cursor:pointer;transition:box-shadow 0.1s ease-out, transform 0.2s ease-out;}.click-element:active{box-shadow:0px 0px 0px var(--btn-shadow-color, rgba(225, 121, 76, 1)) !important;transform:translateY(var(--btn-active));}.click-element:focus{outline:2px solid dodgerblue;outline-offset:3px}.after-drop-popup-container{width:200%;height:200%;background-color:rgba(0, 0, 0, 0.8);position:absolute;display:flex;flex-direction:row-reverse;align-items:center;justify-content:center !important;gap:80px}.after-drop-popup-drag-element{scale:1.5;border-radius:8px;transform:none !important;position:unset !important}.after-drop-popup-drop-element{scale:1.5;border:unset;border-radius:8px;transform:none !important;position:unset !important}@keyframes zoomFadeIn{0%{transform:scale(0.6);opacity:0}100%{transform:scale(1);opacity:1}}.zoom-fade-in{animation:zoomFadeIn 0.8s ease-out forwards}@keyframes zoomFadeOut{0%{transform:scale(1);opacity:1}100%{transform:scale(0.6);opacity:0}}.zoom-fade-out{animation:zoomFadeOut 0.8s ease-in forwards}.slide-numbers{width:70px;height:70px;border:1px solid #f57139;background-color:white;font-weight:500;color:#f57139;font-size:44px;border-radius:40px;display:flex;align-items:center;justify-content:center;font-family:'Baloo Bhai 2', serif}.slide-numbers-bottom{position:absolute;display:flex;justify-content:space-around;align-items:center;bottom:-25px;width:100%;height:50px}.slide-numbers-left{position:absolute;display:flex;flex-direction:column;justify-content:space-around;height:100%;width:50px;left:-25px;bottom:0px}.lido-speak-icon{width:56px;height:56px;position:absolute;top:-25px;right:-25px;z-index:10;background-color:white;border:4px solid #F34D08;border-radius:16px;box-shadow:0px 4px 0px 0px #F34D08;background-size:contain;background-repeat:no-repeat;cursor:pointer}.lido-speak-icon:active{transform:translateY(8px);box-shadow:0px 0px 0px 0px !important}.lido-strong-shake{animation:strongShake 0.3s ease}.lido-scaled-shake{animation:scaledShake 0.6s ease-in-out}.lido-horizontal-shake{animation:horizontalShake 0.6s ease-in-out;border-radius:20px}.lido-vertical-shake{animation:verticalShake 0.6s ease-in-out;border-radius:20px}.lido-diagonal-shake{animation:diagonalShake 0.5s ease-in-out;border-radius:20px;will-change:transform}.lido-glow{animation:glowPulse 1s infinite alternate;transition:opacity 0.5s ease-in-out}.lido-box-highlight{animation:topToPlace 0.3s linear}.lido-display-hiddenvalue{position:absolute;top:0;left:0;width:100%;height:100%;display:flex;align-items:center;justify-content:center;font-size:80px;font-weight:1000;color:brown;-webkit-text-stroke:2px white;font-family:'Baloo Bhai 2', sans-serif;pointer-events:none}.lido-image-colorize{position:relative;display:inline-block}.lido-image-colorize::after{content:'';position:absolute;inset:0;background:var(--tint-color);mix-blend-mode:multiply;opacity:0.8;pointer-events:none;mask-image:var(--mask-url);mask-size:cover;mask-repeat:no-repeat;mask-position:center}.lido-tts-highlight-overlay{position:fixed;left:0;top:0;pointer-events:none;z-index:9999;background:linear-gradient(\n 180deg,\n rgba(255, 235, 59, 0.95),\n rgba(255, 214, 0, 0.95)\n );border-radius:6px;box-shadow:0 2px 6px rgba(0, 0, 0, 0.18),\n inset 0 -1px 0 rgba(255, 255, 255, 0.25);transition:width 25ms ease-out,\n height 25ms ease-out,\n opacity 80ms ease-out;opacity:0.95;will-change:transform, width, height;contain:layout paint style}.category-dropped-onCorrect{box-shadow:rgba(129, 193, 39, 1) 0px 8px 8px 0px !important}.category-dropped-onInCorrect{box-shadow:rgba(255, 4, 16, 1) 0px 8px 8px 0px !important}";
26
26
 
27
27
  /*
28
- Stencil Client Platform v4.45.1 | MIT Licensed | https://stenciljs.com
28
+ Stencil Client Platform v4.43.5 | MIT Licensed | https://stenciljs.com
29
29
  */
30
30
 
31
31
 
@@ -113,9 +113,7 @@ var consoleError = (e, el) => (0, console.error)(e, el);
113
113
 
114
114
  // src/client/client-load-module.ts
115
115
  var cmpModules = /* @__PURE__ */ new Map();
116
- var failedLoadAttempts = /* @__PURE__ */ new Map();
117
116
  var loadModule = (cmpMeta, hostRef, hmrVersionId) => {
118
- var _a;
119
117
  const exportName = cmpMeta.$tagName$.replace(/-/g, "_");
120
118
  const bundleId = cmpMeta.$lazyBundleId$;
121
119
  if (!bundleId) {
@@ -125,11 +123,6 @@ var loadModule = (cmpMeta, hostRef, hmrVersionId) => {
125
123
  if (module) {
126
124
  return module[exportName];
127
125
  }
128
- const retryCount = (_a = failedLoadAttempts.get(bundleId)) != null ? _a : 0;
129
- const cacheBustParams = [
130
- retryCount > 0 ? `s-retry=${retryCount}` : "",
131
- ""
132
- ].filter(Boolean).join("&");
133
126
 
134
127
  if (!hmrVersionId || !BUILD.hotModuleReplacement) {
135
128
  const processMod = importedModule => {
@@ -149,17 +142,15 @@ var loadModule = (cmpMeta, hostRef, hmrVersionId) => {
149
142
  /* webpackInclude: /\.entry\.js$/ */
150
143
  /* webpackExclude: /\.system\.entry\.js$/ */
151
144
  /* webpackMode: "lazy" */
152
- `./${bundleId}.entry.js${cacheBustParams ? "?" + cacheBustParams : ""}`
145
+ `./${bundleId}.entry.js${""}`
153
146
  ).then(
154
147
  (importedModule) => {
155
148
  {
156
- failedLoadAttempts.delete(bundleId);
157
149
  cmpModules.set(bundleId, importedModule);
158
150
  }
159
151
  return importedModule[exportName];
160
152
  },
161
153
  (e) => {
162
- failedLoadAttempts.set(bundleId, retryCount + 1);
163
154
  consoleError(e, hostRef.$hostElement$);
164
155
  }
165
156
  );
@@ -170,8 +161,6 @@ var styles = /* @__PURE__ */ new Map();
170
161
  var HYDRATED_CSS = "{visibility:hidden}.hydrated{visibility:inherit}";
171
162
  var SLOT_FB_CSS = "slot-fb{display:contents}slot-fb[hidden]{display:none}";
172
163
  var XLINK_NS = "http://www.w3.org/1999/xlink";
173
- var MAX_LAZY_LOAD_RETRIES = 3;
174
- var LAZY_LOAD_RETRY_INTERVAL_MS = 1e3;
175
164
  var win = typeof window !== "undefined" ? window : {};
176
165
  var plt = {
177
166
  $flags$: 0,
@@ -198,10 +187,6 @@ var supportsMutableAdoptedStyleSheets = supportsConstructableStylesheets ? /* @_
198
187
  var queuePending = false;
199
188
  var queueDomReads = [];
200
189
  var queueDomWrites = [];
201
- var scheduleFlush = () => {
202
- var _a;
203
- return ((_a = win.document) == null ? void 0 : _a.hidden) ? nextTick(flush) : plt.raf(flush);
204
- };
205
190
  var queueTask = (queue, write) => (cb) => {
206
191
  queue.push(cb);
207
192
  if (!queuePending) {
@@ -209,7 +194,7 @@ var queueTask = (queue, write) => (cb) => {
209
194
  if (write && plt.$flags$ & 4 /* queueSync */) {
210
195
  nextTick(flush);
211
196
  } else {
212
- scheduleFlush();
197
+ plt.raf(flush);
213
198
  }
214
199
  }
215
200
  };
@@ -228,7 +213,7 @@ var flush = () => {
228
213
  {
229
214
  consume(queueDomWrites);
230
215
  if (queuePending = queueDomReads.length > 0) {
231
- scheduleFlush();
216
+ plt.raf(flush);
232
217
  }
233
218
  }
234
219
  };
@@ -309,7 +294,7 @@ function getHostSlotNodes(childNodes, hostName, slotName) {
309
294
  slottedNodes.push(childNode);
310
295
  if (typeof slotName !== "undefined") return slottedNodes;
311
296
  }
312
- slottedNodes = [...slottedNodes, ...getHostSlotNodes(internalCall(childNode, "childNodes"), hostName, slotName)];
297
+ slottedNodes = [...slottedNodes, ...getHostSlotNodes(childNode.childNodes, hostName, slotName)];
313
298
  }
314
299
  return slottedNodes;
315
300
  }
@@ -553,11 +538,6 @@ var h = (nodeName, vnodeData, ...children) => {
553
538
  } else if (child != null && typeof child !== "boolean") {
554
539
  if (simple = typeof nodeName !== "function" && !isComplexType(child)) {
555
540
  child = String(child);
556
- } else if (typeof nodeName !== "function" && child.$flags$ === void 0) {
557
- {
558
- consoleError("Invalid vNode child");
559
- }
560
- continue;
561
541
  }
562
542
  if (simple && lastSimple) {
563
543
  vNodeChildren[vNodeChildren.length - 1].$text$ += child;
@@ -802,7 +782,7 @@ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags, initialRen
802
782
  }
803
783
  }
804
784
  if (newValue == null || newValue === false) {
805
- if (newValue !== false || elm.getAttribute(memberName) === "" || flags & 4 /* isHost */ && !isEnumeratedAttribute(memberName)) {
785
+ if (newValue !== false || elm.getAttribute(memberName) === "") {
806
786
  if (xlink) {
807
787
  elm.removeAttributeNS(XLINK_NS, memberName);
808
788
  } else {
@@ -819,8 +799,6 @@ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags, initialRen
819
799
  }
820
800
  }
821
801
  };
822
- var ENUMERATED_ATTRIBUTES = /* @__PURE__ */ new Set(["draggable", "contenteditable", "spellcheck"]);
823
- var isEnumeratedAttribute = (attrName) => ENUMERATED_ATTRIBUTES.has(attrName) || attrName.startsWith("aria-");
824
802
  var parseClassListRegex = /\s/;
825
803
  var parseClassList = (value) => {
826
804
  if (typeof value === "object" && value && "baseVal" in value) {
@@ -1089,7 +1067,7 @@ var updateChildren = (parentElm, oldCh, newVNode2, newCh, isInitialRender = fals
1089
1067
  if (idxInOld >= 0) {
1090
1068
  elmToMove = oldCh[idxInOld];
1091
1069
  if (elmToMove.$tag$ !== newStartVnode.$tag$) {
1092
- node = createElm(oldCh && oldCh[newStartIdx], newVNode2, newStartIdx);
1070
+ node = createElm(oldCh && oldCh[newStartIdx], newVNode2, idxInOld);
1093
1071
  } else {
1094
1072
  patch(elmToMove, newStartVnode, isInitialRender);
1095
1073
  oldCh[idxInOld] = void 0;
@@ -1188,10 +1166,7 @@ var markSlotContentForRelocation = (elm) => {
1188
1166
  const slotName = childNode["s-sn"];
1189
1167
  for (j = hostContentNodes.length - 1; j >= 0; j--) {
1190
1168
  node = hostContentNodes[j];
1191
- if (!node["s-cn"] && !node["s-nr"] && node["s-hn"] !== childNode["s-hn"] && // let an exact named-slot match override a stale default-slot claim. Skip this for
1192
- // `slotName === ''` itself - a matched default node's cached `s-sn` is `''` too, which
1193
- // would trivially "match" on every re-render and force pointless re-insertion.
1194
- (!node["s-sh"] || node["s-sh"] !== childNode["s-hn"] || slotName !== "" && getSlotName(node) === slotName)) {
1169
+ if (!node["s-cn"] && !node["s-nr"] && node["s-hn"] !== childNode["s-hn"] && (!node["s-sh"] || node["s-sh"] !== childNode["s-hn"])) {
1195
1170
  if (isNodeLocatedInSlot(node, slotName)) {
1196
1171
  let relocateNodeData = relocateNodes.find((r) => r.$nodeToRelocate$ === node);
1197
1172
  checkSlotFallbackVisibility = true;
@@ -1259,7 +1234,7 @@ var insertBefore = (parent, newNode, reference, isInitialLoad) => {
1259
1234
  return newNode;
1260
1235
  }
1261
1236
  }
1262
- if ((parent == null ? void 0 : parent.__insertBefore)) {
1237
+ if (parent.__insertBefore) {
1263
1238
  return parent.__insertBefore(newNode, reference);
1264
1239
  } else {
1265
1240
  return parent == null ? void 0 : parent.insertBefore(newNode, reference);
@@ -1626,7 +1601,6 @@ var setValue = (ref, propName, newVal, cmpMeta) => {
1626
1601
  };
1627
1602
 
1628
1603
  // src/runtime/proxy-component.ts
1629
- var reflectedAttrValue = (propValue) => propValue == null || propValue === false ? null : propValue === true ? "" : String(propValue);
1630
1604
  var proxyComponent = (Cstr, cmpMeta, flags) => {
1631
1605
  var _a, _b;
1632
1606
  const prototype = Cstr.prototype;
@@ -1697,26 +1671,21 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
1697
1671
  }
1698
1672
  return;
1699
1673
  }
1700
- const parsedValue = parsePropertyValue(
1701
- newValue,
1702
- memberFlags);
1703
- const setterSetVal = (val) => {
1674
+ const setterSetVal = () => {
1704
1675
  const currentValue = ref.$lazyInstance$[memberName];
1705
1676
  if (!ref.$instanceValues$.get(memberName) && currentValue) {
1706
1677
  ref.$instanceValues$.set(memberName, currentValue);
1707
1678
  }
1708
- ref.$lazyInstance$[memberName] = val;
1679
+ ref.$lazyInstance$[memberName] = parsePropertyValue(
1680
+ newValue,
1681
+ memberFlags);
1709
1682
  setValue(this, memberName, ref.$lazyInstance$[memberName], cmpMeta);
1710
1683
  };
1711
1684
  if (ref.$lazyInstance$) {
1712
- setterSetVal(parsedValue);
1685
+ setterSetVal();
1713
1686
  } else {
1714
- ref.$instanceValues$.set(memberName, parsedValue);
1715
1687
  ref.$fetchedCbList$.push(() => {
1716
- const pendingValue = ref.$instanceValues$.get(memberName);
1717
- if (ref.$lazyInstance$[memberName] !== pendingValue) {
1718
- setterSetVal(pendingValue);
1719
- }
1688
+ setterSetVal();
1720
1689
  });
1721
1690
  }
1722
1691
  }
@@ -1764,20 +1733,13 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
1764
1733
  return;
1765
1734
  }
1766
1735
  const propFlags = members.find(([m]) => m === propName);
1767
- const propMemberFlags = propFlags ? propFlags[1][0] : 0;
1768
- const isBooleanTarget = propMemberFlags & 4 /* Boolean */;
1769
- if (propMemberFlags & 512 /* ReflectAttr */ && propMemberFlags & 8 /* Any */ && // a complex value is never written to an attribute, so a change while the prop holds
1770
- // one is always external
1771
- !isComplexType(this[propName]) && reflectedAttrValue(this[propName]) === newValue) {
1772
- return;
1773
- }
1736
+ const isBooleanTarget = propFlags && propFlags[1][0] & 4 /* Boolean */;
1774
1737
  const isSpuriousBooleanRemoval = isBooleanTarget && newValue === null && this[propName] === void 0;
1775
1738
  if (isBooleanTarget) {
1776
1739
  newValue = newValue === null || newValue === "false" ? false : true;
1777
1740
  }
1778
- const currentValue = propMemberFlags & 4096 /* Setter */ ? hostRef.$instanceValues$.get(propName) : this[propName];
1779
1741
  const propDesc = Object.getOwnPropertyDescriptor(prototype, propName);
1780
- if (!isSpuriousBooleanRemoval && newValue != currentValue && (!propDesc.get || !!propDesc.set)) {
1742
+ if (!isSpuriousBooleanRemoval && newValue != this[propName] && (!propDesc.get || !!propDesc.set)) {
1781
1743
  this[propName] = newValue;
1782
1744
  }
1783
1745
  });
@@ -1803,12 +1765,10 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
1803
1765
 
1804
1766
  // src/runtime/initialize-component.ts
1805
1767
  var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
1806
- var _a;
1807
1768
  let Cstr;
1808
1769
  try {
1809
1770
  if ((hostRef.$flags$ & 32 /* hasInitializedComponent */) === 0) {
1810
1771
  hostRef.$flags$ |= 32 /* hasInitializedComponent */;
1811
- hostRef.$flags$ &= -1025 /* hasFailedLoad */;
1812
1772
  const bundleId = cmpMeta.$lazyBundleId$;
1813
1773
  if (bundleId) {
1814
1774
  const CstrImport = loadModule(cmpMeta, hostRef);
@@ -1820,11 +1780,6 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
1820
1780
  Cstr = CstrImport;
1821
1781
  }
1822
1782
  if (!Cstr) {
1823
- hostRef.$flags$ &= -33 /* hasInitializedComponent */;
1824
- hostRef.$loadRetryCount$ = ((_a = hostRef.$loadRetryCount$) != null ? _a : 0) + 1;
1825
- if (hostRef.$loadRetryCount$ < MAX_LAZY_LOAD_RETRIES) {
1826
- hostRef.$flags$ |= 1024 /* hasFailedLoad */;
1827
- }
1828
1783
  throw new Error(`Constructor for "${cmpMeta.$tagName$}#${hostRef.$modeName$}" was not found`);
1829
1784
  }
1830
1785
  if (!Cstr.isProxied) {
@@ -1889,7 +1844,7 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
1889
1844
  hostRef.$onRenderResolve$();
1890
1845
  hostRef.$onRenderResolve$ = void 0;
1891
1846
  }
1892
- if (hostRef.$onReadyResolve$ && !(hostRef.$flags$ & 1024 /* hasFailedLoad */)) {
1847
+ if (hostRef.$onReadyResolve$) {
1893
1848
  hostRef.$onReadyResolve$(elm);
1894
1849
  }
1895
1850
  }
@@ -1941,8 +1896,6 @@ var connectedCallback = (elm) => {
1941
1896
  } else {
1942
1897
  if (hostRef == null ? void 0 : hostRef.$lazyInstance$) {
1943
1898
  fireConnectedCallback(hostRef.$lazyInstance$, elm);
1944
- } else if (hostRef.$flags$ & 1024 /* hasFailedLoad */) {
1945
- setTimeout(() => initializeComponent(elm, hostRef, cmpMeta), LAZY_LOAD_RETRY_INTERVAL_MS);
1946
1899
  } else if (hostRef == null ? void 0 : hostRef.$onReadyPromise$) {
1947
1900
  hostRef.$onReadyPromise$.then(() => fireConnectedCallback(hostRef.$lazyInstance$, elm));
1948
1901
  }
@@ -2069,7 +2022,7 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
2069
2022
  }
2070
2023
  disconnectedCallback() {
2071
2024
  plt.jmp(() => disconnectedCallback(this));
2072
- nextTick(() => {
2025
+ plt.raf(() => {
2073
2026
  var _a3;
2074
2027
  const hostRef = getHostRef(this);
2075
2028
  if (!hostRef) {
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
- var index = require('./index-BY9fvbr8.js');
4
- require('./index-DjsCseV8.js');
3
+ var index = require('./index-Bb_TFgTA.js');
4
+ require('./index-DBCFoh1I.js');
5
5
 
6
6
 
7
7
 
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
- var index = require('./index-DjsCseV8.js');
4
- var index$1 = require('./index-BY9fvbr8.js');
3
+ var index = require('./index-DBCFoh1I.js');
4
+ var index$1 = require('./index-Bb_TFgTA.js');
5
5
 
6
6
  var rive$1 = {exports: {}};
7
7
 
@@ -12954,7 +12954,7 @@ const LidoHome = class {
12954
12954
  }
12955
12955
  // Pure-JS fallback (no wasm asset required)
12956
12956
  try {
12957
- const brotliDecodeModule = await Promise.resolve().then(function () { return require('./decode-Bny56MQ9.js'); }).then(function (n) { return n.decode; });
12957
+ const brotliDecodeModule = await Promise.resolve().then(function () { return require('./decode-Buln7Iaf.js'); }).then(function (n) { return n.decode; });
12958
12958
  const brotliDecompressBuffer = brotliDecodeModule.BrotliDecompressBuffer || ((_a = brotliDecodeModule.default) === null || _a === void 0 ? void 0 : _a.BrotliDecompressBuffer);
12959
12959
  if (typeof brotliDecompressBuffer !== 'function') {
12960
12960
  throw new Error('BrotliDecompressBuffer function not found in brotli/dec/decode');
@@ -18181,6 +18181,7 @@ const LidoTrace = class {
18181
18181
  this.fileIndex = -1;
18182
18182
  this.isDragging = false;
18183
18183
  this.activePointerId = null;
18184
+ this.activeTraceState = null;
18184
18185
  // Counter for throttling free trace updates
18185
18186
  // This is only an internal counter. Keeping it out of @State prevents a
18186
18187
  // Stencil component re-render while the user is dragging.
@@ -18195,6 +18196,7 @@ const LidoTrace = class {
18195
18196
  // Handle the pointermove event with optimizations
18196
18197
  // Update the path trace as the red circle moves
18197
18198
  async initializeSVG() {
18199
+ this.cleanupTraceState(this.activeTraceState);
18198
18200
  let state = {
18199
18201
  fileIndex: -1,
18200
18202
  currentPathIndex: 0,
@@ -18217,7 +18219,10 @@ const LidoTrace = class {
18217
18219
  dragOffset: null,
18218
18220
  isCompletingPath: false,
18219
18221
  touchProximityThreshold: null,
18222
+ pointerTransform: null,
18223
+ pointerRect: null,
18220
18224
  };
18225
+ this.activeTraceState = state;
18221
18226
  const url = this.svgUrls[this.currentSvgIndex];
18222
18227
  if (!url || url.trim() === '') {
18223
18228
  console.error('No SVG URL provided or index out of bounds.');
@@ -18244,6 +18249,27 @@ const LidoTrace = class {
18244
18249
  disconnectedCallback() {
18245
18250
  window.removeEventListener('resize', this.handleWindowResize);
18246
18251
  window.removeEventListener('load', this.handleWindowLoad);
18252
+ this.cleanupTraceState(this.activeTraceState);
18253
+ this.activeTraceState = null;
18254
+ }
18255
+ /** Release listeners, pending frames, timers, and cached SVG geometry. */
18256
+ cleanupTraceState(state) {
18257
+ var _a;
18258
+ if (!state)
18259
+ return;
18260
+ (_a = state.cleanup) === null || _a === void 0 ? void 0 : _a.call(state);
18261
+ if (state.rafId)
18262
+ cancelAnimationFrame(state.rafId);
18263
+ state.rafId = null;
18264
+ state.pointerMoveEvent = null;
18265
+ state.pathSamples = [];
18266
+ state.paths = [];
18267
+ state.svg = null;
18268
+ if (this.idleTimer !== null) {
18269
+ clearTimeout(this.idleTimer);
18270
+ this.idleTimer = null;
18271
+ }
18272
+ this.hideFingerHint();
18247
18273
  }
18248
18274
  /** ───────────────────────────────────────────────────────────
18249
18275
  * Idle‑timer helpers
@@ -18442,6 +18468,18 @@ const LidoTrace = class {
18442
18468
  path._lidoTraceStart = path.getPointAtLength(0);
18443
18469
  path._lidoTraceEnd = path.getPointAtLength(pathLength);
18444
18470
  path._lidoTraceIsClosed = this.getDistanceSquared(path._lidoTraceStart, path._lidoTraceEnd) < 200;
18471
+ // Index the path once. Repeated getPointAtLength calls are expensive on
18472
+ // low-end SVG implementations and used to dominate every pointer frame.
18473
+ const sampleCount = 192;
18474
+ const sampleStep = pathLength / sampleCount || 1;
18475
+ const samples = [];
18476
+ for (let sampleIndex = 0; sampleIndex <= sampleCount; sampleIndex++) {
18477
+ const length = Math.min(pathLength, sampleIndex * sampleStep);
18478
+ const point = path.getPointAtLength(length);
18479
+ samples.push({ x: point.x, y: point.y, length });
18480
+ }
18481
+ path._lidoTraceSamples = samples;
18482
+ path._lidoTraceSampleStep = sampleStep;
18445
18483
  // /** give every path an id so <mpath> can follow it */
18446
18484
  path.setAttribute('id', 'lido-path-' + index); // ← NEW
18447
18485
  // Create green path for tracing effect
@@ -18476,7 +18514,7 @@ const LidoTrace = class {
18476
18514
  state.flowMarkers = this.createFlowMarkersForPath(path);
18477
18515
  }
18478
18516
  });
18479
- state.totalPathLength = state.paths[state.currentPathIndex].getTotalLength();
18517
+ state.totalPathLength = state.paths[state.currentPathIndex]._lidoTraceLength;
18480
18518
  }
18481
18519
  // Set up the draggable circle at the start of the first path
18482
18520
  setupDraggableCircle(state) {
@@ -18501,10 +18539,14 @@ const LidoTrace = class {
18501
18539
  return;
18502
18540
  state.svg.style.touchAction = 'none';
18503
18541
  state.circle.style.touchAction = 'none';
18504
- // Handle pointerdown on the circle to start dragging
18505
- state.circle.addEventListener('pointerdown', (evt) => {
18542
+ // Keep named handlers so the detached SVG can be fully released when the
18543
+ // next trace starts. Anonymous handlers here previously retained every
18544
+ // completed trace for the lifetime of the page.
18545
+ const onPointerDown = (evt) => {
18506
18546
  evt.preventDefault(); // Prevent default actions like text selection
18507
- const pointerPos = this.getPointerPosition(evt, state.svg);
18547
+ state.pointerRect = state.svg.getBoundingClientRect();
18548
+ state.pointerTransform = this.getSvgViewBoxTransform(state.svg, state.pointerRect);
18549
+ const pointerPos = this.getPointerPosition(evt, state.svg, state.pointerTransform, state.pointerRect);
18508
18550
  const circlePos = {
18509
18551
  x: parseFloat(state.circle.getAttribute('cx')),
18510
18552
  y: parseFloat(state.circle.getAttribute('cy')),
@@ -18529,9 +18571,9 @@ const LidoTrace = class {
18529
18571
  }
18530
18572
  this.hideFingerHint(); // ← NEW
18531
18573
  this.resetIdleTimer(state); // ← NEW
18532
- }, { passive: false });
18574
+ };
18533
18575
  // Handle pointermove on the SVG to update the circle position
18534
- (_a = state.svg) === null || _a === void 0 ? void 0 : _a.addEventListener('pointermove', (evt) => {
18576
+ const onPointerMove = (evt) => {
18535
18577
  if (!state.isDragging || evt.pointerId !== state.activePointerId)
18536
18578
  return;
18537
18579
  evt.preventDefault();
@@ -18542,7 +18584,7 @@ const LidoTrace = class {
18542
18584
  state.rafId = null;
18543
18585
  });
18544
18586
  }
18545
- });
18587
+ };
18546
18588
  // Handle pointerup and pointercancel on the SVG to stop dragging
18547
18589
  const endDrag = (evt) => {
18548
18590
  if (evt.pointerId === state.activePointerId) {
@@ -18554,12 +18596,25 @@ const LidoTrace = class {
18554
18596
  this.resetIdleTimer(state); // ← NEW
18555
18597
  }
18556
18598
  };
18557
- (_b = state.svg) === null || _b === void 0 ? void 0 : _b.addEventListener('pointerup', endDrag);
18558
- (_c = state.svg) === null || _c === void 0 ? void 0 : _c.addEventListener('pointercancel', endDrag);
18599
+ (_a = state.svg) === null || _a === void 0 ? void 0 : _a.addEventListener('pointerup', endDrag);
18600
+ (_b = state.svg) === null || _b === void 0 ? void 0 : _b.addEventListener('pointercancel', endDrag);
18559
18601
  // Optional: Prevent context menu on long press
18560
- (_d = state.svg) === null || _d === void 0 ? void 0 : _d.addEventListener('contextmenu', (evt) => {
18602
+ const onContextMenu = (evt) => {
18561
18603
  evt.preventDefault();
18562
- });
18604
+ };
18605
+ state.circle.addEventListener('pointerdown', onPointerDown, { passive: false });
18606
+ (_c = state.svg) === null || _c === void 0 ? void 0 : _c.addEventListener('pointermove', onPointerMove);
18607
+ (_d = state.svg) === null || _d === void 0 ? void 0 : _d.addEventListener('contextmenu', onContextMenu);
18608
+ state.cleanup = () => {
18609
+ var _a, _b, _c, _d, _e;
18610
+ (_a = state.circle) === null || _a === void 0 ? void 0 : _a.removeEventListener('pointerdown', onPointerDown);
18611
+ (_b = state.svg) === null || _b === void 0 ? void 0 : _b.removeEventListener('pointermove', onPointerMove);
18612
+ (_c = state.svg) === null || _c === void 0 ? void 0 : _c.removeEventListener('pointerup', endDrag);
18613
+ (_d = state.svg) === null || _d === void 0 ? void 0 : _d.removeEventListener('pointercancel', endDrag);
18614
+ (_e = state.svg) === null || _e === void 0 ? void 0 : _e.removeEventListener('contextmenu', onContextMenu);
18615
+ state.isDragging = false;
18616
+ state.activePointerId = null;
18617
+ };
18563
18618
  }
18564
18619
  // Modified handlePointerMove function
18565
18620
  async handlePointerMove(state) {
@@ -18572,7 +18627,7 @@ const LidoTrace = class {
18572
18627
  return;
18573
18628
  this.hideFingerHint(); // user is active, remove hint
18574
18629
  const evt = state.pointerMoveEvent;
18575
- const rawPointerPos = this.getPointerPosition(evt, state.svg);
18630
+ const rawPointerPos = this.getPointerPosition(evt, state.svg, state.pointerTransform, state.pointerRect);
18576
18631
  const pointerPos = state.dragOffset
18577
18632
  ? {
18578
18633
  x: rawPointerPos.x - state.dragOffset.x,
@@ -18836,9 +18891,9 @@ const LidoTrace = class {
18836
18891
  index$1.triggerNextContainer();
18837
18892
  }
18838
18893
  // Get the pointer position relative to the SVG
18839
- getPointerPosition(evt, svg) {
18894
+ getPointerPosition(evt, svg, cachedTransform, cachedRect) {
18840
18895
  var _a;
18841
- const viewBoxPoint = this.getPointerPositionFromViewBox(evt, svg);
18896
+ const viewBoxPoint = this.getPointerPositionFromViewBox(evt, svg, cachedTransform, cachedRect);
18842
18897
  if (viewBoxPoint)
18843
18898
  return viewBoxPoint;
18844
18899
  const svgPoint = svg.createSVGPoint();
@@ -18847,13 +18902,13 @@ const LidoTrace = class {
18847
18902
  const ctm = (_a = svg.getScreenCTM()) === null || _a === void 0 ? void 0 : _a.inverse();
18848
18903
  return ctm ? svgPoint.matrixTransform(ctm) : { x: evt.clientX, y: evt.clientY };
18849
18904
  }
18850
- getPointerPositionFromViewBox(evt, svg) {
18851
- const rect = svg.getBoundingClientRect();
18905
+ getPointerPositionFromViewBox(evt, svg, cachedTransform, cachedRect) {
18906
+ const rect = cachedRect || svg.getBoundingClientRect();
18852
18907
  const viewBox = svg.viewBox.baseVal;
18853
18908
  if (!rect.width || !rect.height || !viewBox.width || !viewBox.height) {
18854
18909
  return null;
18855
18910
  }
18856
- const { offsetX, offsetY, scaleX, scaleY } = this.getSvgViewBoxTransform(svg, rect);
18911
+ const { offsetX, offsetY, scaleX, scaleY } = cachedTransform || this.getSvgViewBoxTransform(svg, rect);
18857
18912
  return {
18858
18913
  x: viewBox.x + (evt.clientX - rect.left - offsetX) / scaleX,
18859
18914
  y: viewBox.y + (evt.clientY - rect.top - offsetY) / scaleY,
@@ -18913,6 +18968,40 @@ const LidoTrace = class {
18913
18968
  getClosestPointOnPath(pathNode, point, lastLength) {
18914
18969
  var _a;
18915
18970
  const pathLength = (_a = pathNode._lidoTraceLength) !== null && _a !== void 0 ? _a : pathNode.getTotalLength();
18971
+ const samples = pathNode._lidoTraceSamples;
18972
+ const sampleStep = pathNode._lidoTraceSampleStep;
18973
+ if ((samples === null || samples === void 0 ? void 0 : samples.length) && sampleStep) {
18974
+ const searchWindow = lastLength === undefined ? pathLength : 150;
18975
+ const searchStart = lastLength === undefined ? 0 : Math.max(0, lastLength - searchWindow);
18976
+ const searchEnd = lastLength === undefined ? pathLength : Math.min(pathLength, lastLength + searchWindow);
18977
+ let nearest = samples[Math.max(0, Math.min(samples.length - 1, Math.round((lastLength || 0) / sampleStep)))];
18978
+ let nearestDistance = Infinity;
18979
+ for (const sample of samples) {
18980
+ if (sample.length < searchStart || sample.length > searchEnd)
18981
+ continue;
18982
+ const distance = this.getDistanceSquared(point, sample);
18983
+ if (distance < nearestDistance) {
18984
+ nearestDistance = distance;
18985
+ nearest = sample;
18986
+ }
18987
+ }
18988
+ // Refine only around the cached winner. This keeps the path accurate
18989
+ // while reducing hot-path geometry calls from roughly 50 to a handful.
18990
+ const refinementStep = 6;
18991
+ const refineStart = Math.max(searchStart, nearest.length - sampleStep);
18992
+ const refineEnd = Math.min(searchEnd, nearest.length + sampleStep);
18993
+ let closestPoint = Object.assign({}, nearest);
18994
+ let minDistanceSquared = nearestDistance;
18995
+ for (let length = refineStart; length <= refineEnd; length += refinementStep) {
18996
+ const candidate = pathNode.getPointAtLength(length);
18997
+ const distance = this.getDistanceSquared(point, candidate);
18998
+ if (distance < minDistanceSquared) {
18999
+ minDistanceSquared = distance;
19000
+ closestPoint = { x: candidate.x, y: candidate.y, length };
19001
+ }
19002
+ }
19003
+ return closestPoint;
19004
+ }
18916
19005
  let closestPoint = { x: 0, y: 0, length: 0 };
18917
19006
  let minDistanceSquared = Infinity;
18918
19007
  const coarseStep = 40;
@@ -19105,7 +19194,7 @@ const LidoTrace = class {
19105
19194
  };
19106
19195
  }
19107
19196
  render() {
19108
- return (index.h(index.Host, { key: '2f62ab117a595ba9af7f926ad7240902caf7fd99', class: "lido-trace", id: this.id, audio: this.audio, onCorrect: this.onCorrect, onInCorrect: this.onInCorrect, style: this.style, "aria-label": this.ariaLabel, "aria-hidden": this.ariaHidden, tabindex: this.tabIndex, "disable-speak": this.disableSpeak }, index.h("div", { key: '5a14b9bc1ff4d71ffc740c8afaa1d07754044a9d', style: this.style, id: "lido-svgContainer" })));
19197
+ return (index.h(index.Host, { key: 'f4c270d9319e1115d966a6d9b697a4413ca87885', class: "lido-trace", id: this.id, audio: this.audio, onCorrect: this.onCorrect, onInCorrect: this.onInCorrect, style: this.style, "aria-label": this.ariaLabel, "aria-hidden": this.ariaHidden, tabindex: this.tabIndex, "disable-speak": this.disableSpeak }, index.h("div", { key: 'efbbaf5c796c9cfe8516fe5d47265e3a01b28a25', style: this.style, id: "lido-svgContainer" })));
19109
19198
  }
19110
19199
  static get assetsDirs() { return ["assets"]; }
19111
19200
  get el() { return index.getElement(this); }
@@ -1,10 +1,10 @@
1
1
  'use strict';
2
2
 
3
- var index = require('./index-DjsCseV8.js');
3
+ var index = require('./index-DBCFoh1I.js');
4
4
 
5
5
  var _documentCurrentScript = typeof document !== 'undefined' ? document.currentScript : null;
6
6
  /*
7
- Stencil Client Patch Browser v4.45.1 | MIT Licensed | https://stenciljs.com
7
+ Stencil Client Patch Browser v4.43.5 | MIT Licensed | https://stenciljs.com
8
8
  */
9
9
 
10
10
  var patchBrowser = () => {
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var index = require('./index-DjsCseV8.js');
3
+ var index = require('./index-DBCFoh1I.js');
4
4
 
5
5
  const defineCustomElements = async (win, options) => {
6
6
  if (typeof window === 'undefined') return undefined;
@@ -26,7 +26,7 @@
26
26
  "mixins": [],
27
27
  "compiler": {
28
28
  "name": "@stencil/core",
29
- "version": "4.45.1",
29
+ "version": "4.43.5",
30
30
  "typescriptVersion": "5.8.3"
31
31
  },
32
32
  "collections": [],