lido-player 0.0.2-alpha-55-dev → 0.0.2-alpha-56-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 (96) hide show
  1. package/dist/cjs/index.cjs.js +1 -1
  2. package/dist/cjs/lido-avatar_22.cjs.entry.js +138 -22
  3. package/dist/cjs/lido-player.cjs.js +1 -1
  4. package/dist/cjs/loader.cjs.js +1 -1
  5. package/dist/cjs/{utils-4b44610b.js → utils-a61cfc6b.js} +18 -10
  6. package/dist/collection/components/home/lido-home.js +35 -6
  7. package/dist/collection/components/mathMatrix/lido-math-matrix.js +8 -6
  8. package/dist/collection/components/shape/lido-shape.css +90 -0
  9. package/dist/collection/components/shape/lido-shape.js +41 -6
  10. package/dist/collection/components/slideFill/lido-slide-fill.js +1 -1
  11. package/dist/collection/components/text/lido-text.js +26 -1
  12. package/dist/collection/components/trace/lido-trace.js +57 -4
  13. package/dist/collection/components/wrap/lido-wrap.js +1 -1
  14. package/dist/collection/stories/Templates/balancing/balancing.stories.js +1 -1
  15. package/dist/collection/stories/Templates/balloonPop/balloonPop.stories.js +2 -2
  16. package/dist/collection/stories/Templates/blender/blender.stories.js +3 -3
  17. package/dist/collection/stories/Templates/checker-block/checkerBlock.stories.js +6 -4
  18. package/dist/collection/stories/Templates/fillAnswer/fill-answer.stories.js +38 -32
  19. package/dist/collection/stories/Templates/multiplyBeeds/multiplyBeeds.stories.js +2 -2
  20. package/dist/collection/stories/Templates/numberBoardTwo/numberBoardTwo.stories.js +68 -60
  21. package/dist/collection/stories/Templates/questionBoard/questionBoard.stories.js +6 -5
  22. package/dist/collection/stories/Templates/quizMaths/quizMaths.stories.js +991 -0
  23. package/dist/collection/stories/Templates/sumTogether/sumTogether.stories.js +8 -8
  24. package/dist/collection/stories/Templates/tenBox/tenBox.stories.js +144 -0
  25. package/dist/collection/stories/Templates/writeNumber/writeNumber.stories.js +8 -4
  26. package/dist/collection/utils/constants.js +2 -0
  27. package/dist/collection/utils/utils.js +5 -1
  28. package/dist/collection/utils/utilsHandlers/clickHandler.js +1 -1
  29. package/dist/collection/utils/utilsHandlers/dragDropHandler.js +4 -1
  30. package/dist/collection/utils/utilsHandlers/lidoBalanceHandler.js +4 -5
  31. package/dist/components/index.js +1 -1
  32. package/dist/components/lido-avatar.js +1 -1
  33. package/dist/components/lido-balance.js +1 -1
  34. package/dist/components/lido-calculator.js +1 -1
  35. package/dist/components/lido-canvas.js +1 -1
  36. package/dist/components/lido-cell.js +1 -1
  37. package/dist/components/lido-col.js +1 -1
  38. package/dist/components/lido-container.js +1 -1
  39. package/dist/components/lido-flash-card.js +1 -1
  40. package/dist/components/lido-float.js +1 -1
  41. package/dist/components/lido-home.js +1 -1
  42. package/dist/components/lido-image.js +1 -1
  43. package/dist/components/lido-keyboard.js +1 -1
  44. package/dist/components/lido-math-matrix.js +1 -1
  45. package/dist/components/lido-pos.js +1 -1
  46. package/dist/components/lido-random.js +1 -1
  47. package/dist/components/lido-root.js +22 -22
  48. package/dist/components/lido-row.js +1 -1
  49. package/dist/components/lido-shape.js +1 -1
  50. package/dist/components/lido-slide-fill.js +1 -1
  51. package/dist/components/lido-text.js +1 -1
  52. package/dist/components/lido-trace.js +1 -1
  53. package/dist/components/lido-wrap.js +1 -1
  54. package/dist/components/{p-36c2e21a.js → p-0712a27e.js} +17 -11
  55. package/dist/components/{p-2c518dbe.js → p-0a41b2f8.js} +1 -1
  56. package/dist/components/{p-ca8aea4b.js → p-17f84b2f.js} +1 -1
  57. package/dist/components/{p-590ce2c9.js → p-21852d55.js} +1 -1
  58. package/dist/components/{p-de2193c5.js → p-2829c82c.js} +1 -1
  59. package/dist/components/{p-bc5202db.js → p-330caab8.js} +2 -2
  60. package/dist/components/{p-9acf0fcc.js → p-480f708a.js} +1 -1
  61. package/dist/components/{p-3fc01453.js → p-4d332eab.js} +1 -1
  62. package/dist/components/{p-2e023f67.js → p-4e041807.js} +2 -2
  63. package/dist/components/{p-0be6b5d5.js → p-7ab0a273.js} +26 -2
  64. package/dist/components/{p-67a24ad4.js → p-882b291d.js} +2 -2
  65. package/dist/components/{p-43d79c61.js → p-9104d427.js} +1 -1
  66. package/dist/components/{p-b847f269.js → p-b9875116.js} +57 -4
  67. package/dist/components/{p-73b2bd74.js → p-c4739621.js} +3 -3
  68. package/dist/components/p-cca36777.js +128 -0
  69. package/dist/components/{p-5078599e.js → p-d1b5079b.js} +1 -1
  70. package/dist/components/{p-b0dbee97.js → p-e1ba0c44.js} +38 -26
  71. package/dist/components/{p-72d6a594.js → p-eab0ebb7.js} +1 -1
  72. package/dist/components/{p-b095de27.js → p-f2b53e8e.js} +2 -2
  73. package/dist/components/{p-c296051d.js → p-f3bc4577.js} +1 -1
  74. package/dist/components/{p-c69ef266.js → p-ff801ba1.js} +1 -1
  75. package/dist/components/{p-e534ea52.js → p-ffc40642.js} +7 -5
  76. package/dist/esm/index.js +1 -1
  77. package/dist/esm/lido-avatar_22.entry.js +138 -22
  78. package/dist/esm/lido-player.js +1 -1
  79. package/dist/esm/loader.js +1 -1
  80. package/dist/esm/{utils-ae1eb036.js → utils-7ed76799.js} +17 -11
  81. package/dist/lido-player/index.esm.js +1 -1
  82. package/dist/lido-player/lido-player.esm.js +1 -1
  83. package/dist/lido-player/{p-a632e2ce.js → p-17d93181.js} +2 -2
  84. package/dist/lido-player/p-fa9dfdf8.entry.js +1 -0
  85. package/dist/types/components/home/lido-home.d.ts +3 -0
  86. package/dist/types/components/shape/lido-shape.d.ts +8 -2
  87. package/dist/types/components/text/lido-text.d.ts +1 -0
  88. package/dist/types/components/trace/lido-trace.d.ts +2 -1
  89. package/dist/types/components.d.ts +2 -0
  90. package/dist/types/stories/Templates/fillAnswer/fill-answer.stories.d.ts +1 -1
  91. package/dist/types/stories/Templates/quizMaths/quizMaths.stories.d.ts +16 -0
  92. package/dist/types/stories/Templates/tenBox/tenBox.stories.d.ts +4 -0
  93. package/dist/types/utils/constants.d.ts +2 -0
  94. package/package.json +1 -1
  95. package/dist/components/p-f8c00485.js +0 -100
  96. package/dist/lido-player/p-f1b879f6.entry.js +0 -1
@@ -1383,6 +1383,8 @@ const DropLength = 'dropLength';
1383
1383
  const DropToAttr = 'drop-to';
1384
1384
  const DropTimeAttr = 'drop-time';
1385
1385
  const LidoContainer = 'lido-container';
1386
+ const LIDO_COMMON_AUDIO_PATH = '__LIDO_COMMON_AUDIO_PATH__';
1387
+ const LIDO_COMMON_AUDIO_READY_EVENT = 'lidoCommonAudioPathReady';
1386
1388
  var TraceMode;
1387
1389
  (function (TraceMode) {
1388
1390
  TraceMode["NoFlow"] = "noFlow";
@@ -1614,7 +1616,7 @@ function updateBalanceOnDrop(dragElement, dropElement) {
1614
1616
  }
1615
1617
  function calculateValue(elements, operation) {
1616
1618
  if (elements.length === 0)
1617
- return 0;
1619
+ return null;
1618
1620
  if (operation === "count") {
1619
1621
  return elements.length;
1620
1622
  }
@@ -1646,18 +1648,15 @@ function calculateValue(elements, operation) {
1646
1648
  }
1647
1649
  }
1648
1650
  function balanceResult(container, objectiveString) {
1649
- var _a, _b, _c, _d, _e, _f;
1650
1651
  const additionalCheck = container.getAttribute('equationCheck');
1651
1652
  if (!additionalCheck)
1652
1653
  return false;
1653
1654
  const balanceEl = document.querySelector('lido-balance');
1654
1655
  if (!balanceEl)
1655
1656
  return false;
1656
- const leftVal = Number((_c = (_a = balanceEl.leftVal) !== null && _a !== void 0 ? _a : (_b = balanceEl.dataset) === null || _b === void 0 ? void 0 : _b.leftVal) !== null && _c !== void 0 ? _c : 0);
1657
- const rightVal = Number((_f = (_d = balanceEl.rightVal) !== null && _d !== void 0 ? _d : (_e = balanceEl.dataset) === null || _e === void 0 ? void 0 : _e.rightVal) !== null && _f !== void 0 ? _f : 0);
1658
- const hasLeft = !isNaN(leftVal);
1659
- const hasRight = !isNaN(rightVal);
1660
- if (!hasLeft || !hasRight) {
1657
+ const leftVal = balanceEl.leftVal;
1658
+ const rightVal = balanceEl.rightVal;
1659
+ if (leftVal == null || rightVal == null) {
1661
1660
  return false;
1662
1661
  }
1663
1662
  const symbol = leftVal > rightVal ? '>' : leftVal < rightVal ? '<' : '=';
@@ -1992,9 +1991,12 @@ function enableDraggingWithScaling(element) {
1992
1991
  otherElement.style.border = ''; // Reset border
1993
1992
  otherElement.style.backgroundColor = 'transparent'; // Reset background color
1994
1993
  }
1995
- if (otherElement.tagName.toLowerCase() === 'lido-image') {
1994
+ else if (otherElement.tagName.toLowerCase() === 'lido-image') {
1996
1995
  otherElement.style.opacity = '0';
1997
1996
  }
1997
+ else {
1998
+ otherElement.style.opacity = '1';
1999
+ }
1998
2000
  }
1999
2001
  }
2000
2002
  else {
@@ -4590,7 +4592,7 @@ function onTouchListenerForOnTouch(element) {
4590
4592
  return;
4591
4593
  const container = document.getElementById('lido-container');
4592
4594
  // const container = element.closest('lido-container') as HTMLElement;
4593
- if (container && container.getAttribute('disableSpeak') === 'true') {
4595
+ if (container && container.getAttribute('disable-speak') === 'true') {
4594
4596
  return;
4595
4597
  }
4596
4598
  // if (element.closest('[disableSpeak="true"]')) {
@@ -70661,6 +70663,7 @@ const validateObjectiveStatus = async () => {
70661
70663
  if (attach === 'true') {
70662
70664
  appendingDragElementsInDrop();
70663
70665
  }
70666
+ storingEachActivityScore(true);
70664
70667
  await executeActions(onCorrect, container);
70665
70668
  }
70666
70669
  if (container.getAttribute('dropAttr') === 'EnableAnimation') {
@@ -70676,12 +70679,12 @@ const validateObjectiveStatus = async () => {
70676
70679
  else {
70677
70680
  const isContinueOnCorrect = container.getAttribute('is-continue-on-correct') === 'true';
70678
70681
  if (!isContinueOnCorrect) {
70679
- triggerNextContainer();
70680
70682
  await calculateScore();
70681
70683
  triggerNextContainer();
70682
70684
  }
70683
70685
  else {
70684
70686
  const onInCorrect = container.getAttribute('onInCorrect');
70687
+ storingEachActivityScore(false);
70685
70688
  await executeActions(onInCorrect, container);
70686
70689
  }
70687
70690
  }
@@ -70704,6 +70707,9 @@ function convertUrlToRelative(url) {
70704
70707
  if ((url === null || url === void 0 ? void 0 : url.startsWith('http')) || (url === null || url === void 0 ? void 0 : url.startsWith('blob')) || (url === null || url === void 0 ? void 0 : url.startsWith('data'))) {
70705
70708
  return url;
70706
70709
  }
70710
+ if (url.startsWith('/Lido-CommonAudios/')) {
70711
+ return url;
70712
+ }
70707
70713
  if (baseUrl) {
70708
70714
  const newUrl = url.startsWith('/') ? url.slice(1) : url;
70709
70715
  if (newUrl.startsWith(baseUrl.replace(/^\/+|\/+$/g, '')))
@@ -71336,4 +71342,4 @@ const updateCalculatorAnswer = (el) => {
71336
71342
  el.setAttribute('string', value);
71337
71343
  };
71338
71344
 
71339
- export { ActivityScoreKey as A, AudioPlayer as B, generateUUIDFallback as C, exitUrl as D, prevUrl as E, nextUrl as F, speakUrl as G, H, getCancelBtnPopup as I, matchStringPattern as J, triggerNextContainer as K, LidoContainer as L, triggerPrevcontainer as M, NextContainerKey as N, setCancelBtnPopup as O, PrevContainerKey as P, getDefaultExportFromCjs as Q, RiveService as R, SelectedValuesKey as S, tinyColor as T, DropAction as U, validateObjectiveStatus as V, fraction as W, TraceMode as X, speakIcon as Y, fingerUrl as Z, setNonce as a, setPlatformOptions as b, commonjsGlobal as c, setVisibilityWithDelay as d, convertUrlToRelative as e, format as f, getAssetPath$1 as g, h, initEventsForElement as i, Host as j, parseProp as k, createEvent as l, equationCheck as m, storingEachActivityScore as n, executeActions as o, proxyCustomElement as p, calculateScore as q, handlingChildElements as r, setAssetPath as s, attachSpeakIcon as t, calculateScale as u, handleFloatElementPosition as v, handleElementClick as w, dispatchActivityChangeEvent as x, dispatchGameCompletedEvent as y, dispatchGameExitEvent as z };
71345
+ export { fingerUrl as $, ActivityScoreKey as A, dispatchGameExitEvent as B, AudioPlayer as C, generateUUIDFallback as D, exitUrl as E, prevUrl as F, nextUrl as G, H, speakUrl as I, LidoContainer as J, getCancelBtnPopup as K, LIDO_COMMON_AUDIO_READY_EVENT as L, matchStringPattern as M, NextContainerKey as N, triggerNextContainer as O, PrevContainerKey as P, triggerPrevcontainer as Q, RiveService as R, SelectedValuesKey as S, setCancelBtnPopup as T, getDefaultExportFromCjs as U, tinyColor as V, DropAction as W, validateObjectiveStatus as X, fraction as Y, TraceMode as Z, speakIcon as _, setNonce as a, setPlatformOptions as b, commonjsGlobal as c, setVisibilityWithDelay as d, convertUrlToRelative as e, format as f, getAssetPath$1 as g, h, initEventsForElement as i, Host as j, parseProp as k, createEvent as l, equationCheck as m, storingEachActivityScore as n, executeActions as o, proxyCustomElement as p, calculateScore as q, handlingChildElements as r, setAssetPath as s, attachSpeakIcon as t, LIDO_COMMON_AUDIO_PATH as u, calculateScale as v, handleFloatElementPosition as w, handleElementClick as x, dispatchActivityChangeEvent as y, dispatchGameCompletedEvent as z };
@@ -1,4 +1,4 @@
1
- import { c as commonjsGlobal, p as proxyCustomElement, H, g as getAssetPath, d as setVisibilityWithDelay, i as initEventsForElement, e as convertUrlToRelative, h, j as Host, R as RiveService } from './p-36c2e21a.js';
1
+ import { c as commonjsGlobal, p as proxyCustomElement, H, g as getAssetPath, d as setVisibilityWithDelay, i as initEventsForElement, e as convertUrlToRelative, h, j as Host, R as RiveService } from './p-0712a27e.js';
2
2
 
3
3
  var rive = {exports: {}};
4
4
 
@@ -1,4 +1,4 @@
1
- import { p as proxyCustomElement, H, d as setVisibilityWithDelay, i as initEventsForElement, v as handleFloatElementPosition, w as handleElementClick, k as parseProp, h, j as Host } from './p-36c2e21a.js';
1
+ import { p as proxyCustomElement, H, d as setVisibilityWithDelay, i as initEventsForElement, w as handleFloatElementPosition, x as handleElementClick, k as parseProp, h, j as Host } from './p-0712a27e.js';
2
2
 
3
3
  const lidoFloatCss = ".lido-float{position:relative}.lido-float>*{position:absolute;cursor:pointer}@keyframes float-up{from{top:var(--el-top)}to{top:-500px}}#removeShadow{box-shadow:unset !important}@keyframes float-lr{from{right:var(--el-left)}to{right:-500px}}";
4
4
  const LidoFloatStyle0 = lidoFloatCss;
@@ -1,4 +1,4 @@
1
- import { p as proxyCustomElement, H, i as initEventsForElement, k as parseProp, h, j as Host } from './p-36c2e21a.js';
1
+ import { p as proxyCustomElement, H, i as initEventsForElement, k as parseProp, h, j as Host } from './p-0712a27e.js';
2
2
 
3
3
  const lidoBalanceCss = "#lido-balance{position:relative;height:500px;width:1205px;top:20%;left:-91px;z-index:0}.lido-balance-symbol{position:absolute;top:64%;left:50%;transform:translate(-50%, -50%);font-size:5vw;font-weight:bold;color:black;pointer-events:none;z-index:999}@media (orientation: portrait){.lido-balance-shadow{height:100px;position:absolute;top:80%;left:28%}}@media (orientation: landscape){.lido-balance-shadow{height:100px;position:absolute;top:90%;left:33%}}@media (orientation: portrait){#pivotimg{position:absolute;height:auto;width:23%;bottom:18%;left:38%;z-index:100}}#pivotimg::after{content:\"\";position:absolute;bottom:-30px;left:50%;transform:translateX(-50%);width:120%;height:60px;background-image:url(\"https://aeakbcdznktpsbrfsgys.supabase.co/storage/v1/object/public/template-assets/balancing/Shadow.svg\");background-size:contain;background-repeat:no-repeat;background-position:center;pointer-events:none;z-index:10}@media (orientation: landscape){#pivotimg{position:absolute;height:auto;width:23%;bottom:8%;left:38%;z-index:100}}.lido-balance .pivot svg{width:100%;height:auto}#scaleimg{position:absolute;width:73%;height:auto;top:61%;left:14%;z-index:90}.lido-balance .scale svg{width:100%;height:auto}@media (orientation: landscape){#handlerimg{position:absolute;width:35%;height:auto;top:49%;left:2%}}@media (orientation:portrait ){#handlerimg{position:absolute;width:35%;height:auto;top:53%;left:2%}}.lido-balance .handler svg{width:100%;height:auto;fill:brown}@media (orientation: landscape){#handimg{position:absolute;width:35%;height:auto;top:49%;right:2%}}@media (orientation:portrait){#handimg{position:absolute;width:35%;height:auto;top:53%;right:2%}}.lido-balance .hand svg{width:100%;height:auto;fill:brown}.pivot svg path:nth-of-type(1){fill:brown}.pivot svg path[d^=\"M78.9414\"]{fill:white}";
4
4
  const LidoBalanceStyle0 = lidoBalanceCss;
@@ -1,4 +1,4 @@
1
- import { p as proxyCustomElement, H, i as initEventsForElement, r as handlingChildElements, t as attachSpeakIcon, k as parseProp, h, j as Host } from './p-36c2e21a.js';
1
+ import { p as proxyCustomElement, H, i as initEventsForElement, r as handlingChildElements, t as attachSpeakIcon, k as parseProp, h, j as Host } from './p-0712a27e.js';
2
2
 
3
3
  const lidoRowCss = ".lido-row{display:flex;justify-content:space-around;align-items:center;}.lido-row>*{}";
4
4
  const LidoRowStyle0 = lidoRowCss;
@@ -1,5 +1,5 @@
1
- import { p as proxyCustomElement, H, S as SelectedValuesKey, L as LidoContainer, o as executeActions, K as triggerNextContainer, v as handleFloatElementPosition, n as storingEachActivityScore, U as DropAction, k as parseProp, h, j as Host } from './p-36c2e21a.js';
2
- import { d as defineCustomElement$1 } from './p-0be6b5d5.js';
1
+ import { p as proxyCustomElement, H, S as SelectedValuesKey, J as LidoContainer, o as executeActions, O as triggerNextContainer, w as handleFloatElementPosition, n as storingEachActivityScore, W as DropAction, k as parseProp, h, j as Host } from './p-0712a27e.js';
2
+ import { d as defineCustomElement$1 } from './p-7ab0a273.js';
3
3
 
4
4
  const lidoKeyboardCss = ".lido-keyboard{display:flex;flex-direction:column;align-items:center;gap:30px}.input-area{display:flex;gap:15px}input[type=\"text\"]{font-size:30px;font-weight:600;padding-left:20px;width:300px;height:70px;border:2px solid;background:whitesmoke;border-radius:20px;text-align:center}.keyboard-wrapper{justify-content:center;width:700px}.disabled{opacity:0.5;pointer-events:none}.key-button{background:aquamarine;font-weight:600}";
5
5
  const LidoKeyboardStyle0 = lidoKeyboardCss;
@@ -1,4 +1,4 @@
1
- import { p as proxyCustomElement, H, k as parseProp, d as setVisibilityWithDelay, i as initEventsForElement, h, j as Host } from './p-36c2e21a.js';
1
+ import { p as proxyCustomElement, H, k as parseProp, d as setVisibilityWithDelay, i as initEventsForElement, h, j as Host } from './p-0712a27e.js';
2
2
 
3
3
  const lidoFlashCardCss = ".card{position:relative;width:100%;height:100%;transform-style:preserve-3d;transition:transform 0.6s ease;cursor:pointer}.card.flipped{transform:rotateY(180deg)}.card-face{position:absolute;width:100%;height:100%;backface-visibility:hidden;display:flex;align-items:center;justify-content:center}.card-back{transform:rotateY(180deg)}";
4
4
  const LidoFlashCardStyle0 = lidoFlashCardCss;
@@ -1,4 +1,4 @@
1
- import { p as proxyCustomElement, H, i as initEventsForElement, k as parseProp, h, j as Host } from './p-36c2e21a.js';
1
+ import { p as proxyCustomElement, H, i as initEventsForElement, k as parseProp, h, j as Host } from './p-0712a27e.js';
2
2
 
3
3
  const lidoPosCss = ".lido-pos{top:var(--y, 0);left:var(--x, 0);height:var(--height, 100%);width:var(--width, 100%);background-color:var(--bgColor, #eeeeee);display:flex;justify-content:space-around;flex-direction:column;position:fixed}.lido-pos>*{position:absolute}";
4
4
  const LidoPosStyle0 = lidoPosCss;
@@ -1,4 +1,4 @@
1
- import { p as proxyCustomElement, H, i as initEventsForElement, r as handlingChildElements, t as attachSpeakIcon, k as parseProp, h, j as Host } from './p-36c2e21a.js';
1
+ import { p as proxyCustomElement, H, i as initEventsForElement, r as handlingChildElements, t as attachSpeakIcon, k as parseProp, h, j as Host } from './p-0712a27e.js';
2
2
 
3
3
  const lidoWrapCss = ".lido-wrap{display:grid;grid-gap:10px;grid-template-columns:repeat(auto-fill, minmax(186px, auto))}.lido-wrap>*{padding:10px;background-color:var(--child-bg-color, #f0f0f0);box-sizing:border-box}.lido-flex{display:flex;flex-wrap:wrap;align-content:flex-start;gap:10px}";
4
4
  const LidoWrapStyle0 = lidoWrapCss;
@@ -78,7 +78,7 @@ const LidoWrap = /*@__PURE__*/ proxyCustomElement(class LidoWrap extends H {
78
78
  };
79
79
  }
80
80
  render() {
81
- return (h(Host, { key: '50bc5770105477d0ef7cb080957c8d00198c8b09', class: "lido-wrap", value: this.value, type: this.type, "tab-index": this.tabIndex, style: this.style, "aria-label": this.ariaLabel, "aria-hidden": this.ariaHidden, audio: this.audio, minDrops: this.minDrops, maxDrops: this.maxDrops, onTouch: this.onTouch, onCorrect: this.onCorrect, onInCorrect: this.onInCorrect, onEntry: this.onEntry, disableSpeak: this.disableSpeak }, h("slot", { key: 'fcd1f5801e34171d1925e39f6c543f229a5d42bd' })));
81
+ return (h(Host, { key: 'ba0767c8fb70d3c20dbcc0835794ec58d62078b3', class: "lido-wrap", value: this.value, type: this.type, "tab-index": this.tabIndex, style: this.style, "aria-label": this.ariaLabel, "aria-hidden": this.ariaHidden, audio: this.audio, minDrops: this.minDrops, maxDrops: this.maxDrops, onTouch: this.onTouch, onCorrect: this.onCorrect, onInCorrect: this.onInCorrect, onEntry: this.onEntry, disableSpeak: this.disableSpeak }, h("slot", { key: '359ff37390f0d20e650481cd8d531ad4da55b308' })));
82
82
  }
83
83
  get el() { return this; }
84
84
  static get style() { return LidoWrapStyle0; }
@@ -1,4 +1,4 @@
1
- import { p as proxyCustomElement, H, d as setVisibilityWithDelay, i as initEventsForElement, t as attachSpeakIcon, e as convertUrlToRelative, k as parseProp, h, j as Host } from './p-36c2e21a.js';
1
+ import { p as proxyCustomElement, H, d as setVisibilityWithDelay, i as initEventsForElement, t as attachSpeakIcon, L as LIDO_COMMON_AUDIO_READY_EVENT, e as convertUrlToRelative, k as parseProp, h, j as Host, u as LIDO_COMMON_AUDIO_PATH } from './p-0712a27e.js';
2
2
  import { i as instance } from './p-73e3f0f4.js';
3
3
 
4
4
  const lidoTextCss = ".lido-text{transition:background-color 0.3s ease;user-select:none;align-items:center;justify-content:center;text-align:center;border-radius:24px;color:#333;cursor:pointer;font-family:'Baloo Bhai 2', serif}.text-letters{transition:color 0.3s, text-shadow 0.3s;display:inline-block;padding:0 2px}.text-letters.letter-highlight{color:#8e24aa;background:none;border-radius:0;text-shadow:0 2px 8px #8e24aa88;animation:text-letter-bounce 0.4s}.text-words{transition:color 0.3s, text-shadow 0.3s;display:inline-block;padding:0 2px}.text-words.word-highlight{color:#8e24aa;background:none;border-radius:0;text-shadow:0 2px 8px #8e24aa88;animation:text-word-bounce 0.4s}@keyframes text-letter-bounce{0%{transform:scale(1)}60%{transform:scale(1.4)}100%{transform:scale(1)}}@keyframes text-word-bounce{0%{transform:scale(1)}60%{transform:scale(1.3)}100%{transform:scale(1)}}";
@@ -57,6 +57,30 @@ const LidoText = /*@__PURE__*/ proxyCustomElement(class LidoText extends H {
57
57
  if (this.showSpeakIcon) {
58
58
  attachSpeakIcon(this.el);
59
59
  }
60
+ if (!this.audio || this.audio.trim() === "") {
61
+ const applyAutoAudio = () => {
62
+ const autoAudio = this.resolveAutoAudio();
63
+ if (autoAudio) {
64
+ this.audio = autoAudio;
65
+ console.log("[LidoText] Auto audio applied:", autoAudio);
66
+ }
67
+ };
68
+ // If path is already available, apply immediately
69
+ if (window.__LIDO_COMMON_AUDIO_PATH__) {
70
+ applyAutoAudio();
71
+ }
72
+ else {
73
+ // Otherwise, wait for it
74
+ window.addEventListener(LIDO_COMMON_AUDIO_READY_EVENT, applyAutoAudio, { once: true });
75
+ }
76
+ }
77
+ }
78
+ resolveAutoAudio() {
79
+ const base = window[LIDO_COMMON_AUDIO_PATH];
80
+ if (!base || !this.string)
81
+ return null;
82
+ const fileName = this.string.toLowerCase().trim().replace(/\s+/g, "_").replace(/[^\w-]/g, "");
83
+ return `${base}/${fileName}.mp3`;
60
84
  }
61
85
  /**
62
86
  * Lifecycle method that runs before the component is rendered.
@@ -122,7 +146,7 @@ const LidoText = /*@__PURE__*/ proxyCustomElement(class LidoText extends H {
122
146
  }
123
147
  }
124
148
  render() {
125
- return (h(Host, { key: '89ed432cbbf1f3ca2cdcaf4df80628350badef6d', class: "lido-text", value: this.value, type: this.type, "tab-index": this.tabIndex, audio: this.audio, onTouch: this.onTouch, onCorrect: this.onCorrect, onInCorrect: this.onInCorrect, onEntry: this.onEntry, minDrops: this.minDrops, maxDrops: this.maxDrops, id: this.id, style: this.style, "aria-label": this.ariaLabel, "aria-hidden": this.ariaHidden, "span-type": this.spanType, "disable-speak": this.disableSpeak }, this.spanType !== '' ? h("div", { class: "lido-text-content" }, " ", instance.t(this.string)) : instance.t(this.string)));
149
+ return (h(Host, { key: '87d82cc0bf52e1eaba8f44d1bdd80c98e896ddbf', class: "lido-text", value: this.value, type: this.type, "tab-index": this.tabIndex, audio: this.audio, onTouch: this.onTouch, onCorrect: this.onCorrect, onInCorrect: this.onInCorrect, onEntry: this.onEntry, minDrops: this.minDrops, maxDrops: this.maxDrops, id: this.id, style: this.style, "aria-label": this.ariaLabel, "aria-hidden": this.ariaHidden, "span-type": this.spanType, "disable-speak": this.disableSpeak }, this.spanType !== '' ? h("div", { class: "lido-text-content" }, " ", instance.t(this.string)) : instance.t(this.string)));
126
150
  }
127
151
  get el() { return this; }
128
152
  static get style() { return LidoTextStyle0; }
@@ -1,5 +1,5 @@
1
- import { p as proxyCustomElement, H, k as parseProp, h, j as Host } from './p-36c2e21a.js';
2
- import { d as defineCustomElement$1 } from './p-0be6b5d5.js';
1
+ import { p as proxyCustomElement, H, k as parseProp, h, j as Host } from './p-0712a27e.js';
2
+ import { d as defineCustomElement$1 } from './p-7ab0a273.js';
3
3
 
4
4
  const lidoCanvasCss = ":host{display:flex;justify-content:center;align-items:center}.lido-canvas{background:red;border:2px solid #ccc;border-radius:8px;display:flex;flex-direction:column;overflow:hidden;position:relative}#lido-exit-button{padding:6px 14px;border:none;background:transparent;color:#fff;border-radius:6px;cursor:pointer;font-size:14px;position:relative;top:-43%;left:18%;z-index:10}canvas{touch-action:none;display:block}";
5
5
  const LidoCanvasStyle0 = lidoCanvasCss;
@@ -1,4 +1,4 @@
1
- import { p as proxyCustomElement, H, t as attachSpeakIcon, h, j as Host } from './p-36c2e21a.js';
1
+ import { p as proxyCustomElement, H, t as attachSpeakIcon, h, j as Host } from './p-0712a27e.js';
2
2
 
3
3
  const lidoRandomCss = ".lido-random{position:relative;width:100%;height:100%}.lido-random>*{position:absolute}";
4
4
  const LidoRandomStyle0 = lidoRandomCss;
@@ -1,4 +1,4 @@
1
- import { p as proxyCustomElement, H, X as TraceMode, e as convertUrlToRelative, d as setVisibilityWithDelay, Y as speakIcon, o as executeActions, K as triggerNextContainer, L as LidoContainer, k as parseProp, h, j as Host, Z as fingerUrl } from './p-36c2e21a.js';
1
+ import { p as proxyCustomElement, H, Z as TraceMode, e as convertUrlToRelative, d as setVisibilityWithDelay, _ as speakIcon, n as storingEachActivityScore, o as executeActions, q as calculateScore, O as triggerNextContainer, J as LidoContainer, k as parseProp, h, j as Host, $ as fingerUrl } from './p-0712a27e.js';
2
2
 
3
3
  const lidoTraceCss = ":host{display:block;position:relative}#lido-svgContainer{display:flex;justify-content:center;align-items:center;overflow:hidden}svg{width:100%;height:100%;touch-action:none}#lido-draggableCircle{cursor:pointer;fill:#CF1565;transition:fill 0.2s, r 0.2s}.lido-blindTracing{stroke:none !important}.lido-blindFreeTrace{stroke:none !important}.lido-hovered{cursor:grab;fill:darkred}#lido-controls{position:fixed;bottom:0;left:0;right:0;display:flex;justify-content:space-between;padding:10px;background-color:#f0f0f0;border-top:1px solid #ccc}button{padding:10px;font-size:16px}@media (max-width: 600px){button{padding:8px;font-size:14px}}.lido-trace-path-green{}.lido-flow-indicator{stroke:blue;stroke-width:2;stroke-dasharray:6, 6;fill:none}.lido-trace{height:700px;width:700px;z-index:1;justify-items:center;align-content:center}.trace-animate{animation:trace-bounce 0.5s}@keyframes trace-bounce{0%{transform:scale(1)}30%{transform:scale(1.05)}60%{transform:scale(0.95)}100%{transform:scale(1)}}";
4
4
  const LidoTraceStyle0 = lidoTraceCss;
@@ -389,7 +389,7 @@ const LidoTrace = /*@__PURE__*/ proxyCustomElement(class LidoTrace extends H {
389
389
  });
390
390
  }
391
391
  // Modified handlePointerMove function
392
- handlePointerMove(state) {
392
+ async handlePointerMove(state) {
393
393
  var _a, _b, _c, _d, _e, _f;
394
394
  if (!state.isDragging)
395
395
  return;
@@ -536,13 +536,15 @@ const LidoTrace = /*@__PURE__*/ proxyCustomElement(class LidoTrace extends H {
536
536
  }
537
537
  (_f = currentPath.greenPath) === null || _f === void 0 ? void 0 : _f.setAttribute('stroke-dashoffset', (state.totalPathLength - state.lastLength).toString());
538
538
  // Completion logic for closed paths: only allow completion if almost all points are traced
539
- const COMPLETION_THRESHOLD = 0.90; // 90% of the path must be traced
539
+ const COMPLETION_THRESHOLD = 0.95; // 95% of the path must be traced
540
540
  let percentComplete = state.lastLength / state.totalPathLength;
541
541
  let startPoint = currentPath.getPointAtLength(0);
542
542
  let endPoint = currentPath.getPointAtLength(currentPath.getTotalLength());
543
543
  let pathIsClosed = this.getDistanceSquared(startPoint, endPoint) < 200; // threshold for overlap
544
544
  if (pathIsClosed && state.totalPathLength > 50) {
545
545
  if (percentComplete >= COMPLETION_THRESHOLD) {
546
+ // Animate the draggable circle & green trace to the very end, then proceed
547
+ await this.animatePathToEnd(state, currentPath);
546
548
  if (state.currentPathIndex < state.paths.length - 1) {
547
549
  this.moveToNextPath(state);
548
550
  }
@@ -563,6 +565,55 @@ const LidoTrace = /*@__PURE__*/ proxyCustomElement(class LidoTrace extends H {
563
565
  }
564
566
  // this.resetIdleTimer(state); // ← keep timer alive
565
567
  }
568
+ // Smoothly animate the draggable circle + green stroke from current lastLength to totalPathLength
569
+ animatePathToEnd(state, path, duration = 300) {
570
+ if (!path || !state.svg)
571
+ return Promise.resolve();
572
+ if (state._animatingToEnd)
573
+ return Promise.resolve();
574
+ state._animatingToEnd = true;
575
+ const start = state.lastLength || 0;
576
+ const end = path.getTotalLength();
577
+ const startTime = performance.now();
578
+ // get greenPath safely: prefer the attached property, otherwise query by class near the original path
579
+ const greenPath = path.greenPath ||
580
+ (path.parentNode && path.parentNode.querySelector('.lido-trace-path-green'));
581
+ return new Promise(resolve => {
582
+ const step = (now) => {
583
+ const t = Math.min(1, (now - startTime) / duration);
584
+ const eased = t; // linear easing
585
+ const currentLen = start + (end - start) * eased;
586
+ state.lastLength = currentLen;
587
+ // update circle position and green path dashoffset
588
+ const pt = path.getPointAtLength(currentLen);
589
+ if (state.circle) {
590
+ state.circle.setAttribute('cx', pt.x.toString());
591
+ state.circle.setAttribute('cy', pt.y.toString());
592
+ }
593
+ if (greenPath) {
594
+ greenPath.setAttribute('stroke-dashoffset', (state.totalPathLength - currentLen).toString());
595
+ }
596
+ if (t < 1) {
597
+ requestAnimationFrame(step);
598
+ }
599
+ else {
600
+ // ensure fully complete
601
+ state.lastLength = end;
602
+ if (state.circle) {
603
+ const finalPt = path.getPointAtLength(end);
604
+ state.circle.setAttribute('cx', finalPt.x.toString());
605
+ state.circle.setAttribute('cy', finalPt.y.toString());
606
+ }
607
+ if (greenPath) {
608
+ greenPath.setAttribute('stroke-dashoffset', '0');
609
+ }
610
+ state._animatingToEnd = false;
611
+ resolve();
612
+ }
613
+ };
614
+ requestAnimationFrame(step);
615
+ });
616
+ }
566
617
  // Move to the next container after completing the current SVG
567
618
  async moveToNextContainer() {
568
619
  this.isDragging = false;
@@ -575,6 +626,7 @@ const LidoTrace = /*@__PURE__*/ proxyCustomElement(class LidoTrace extends H {
575
626
  if (this.animationTrace) {
576
627
  await this.playTraceAnimation();
577
628
  }
629
+ storingEachActivityScore(true);
578
630
  console.log(`Moving to next container after SVG index: ${this.currentSvgIndex}`);
579
631
  const delay = 1000; // milliseconds
580
632
  if (this.currentSvgIndex < this.svgUrls.length - 1) {
@@ -589,6 +641,7 @@ const LidoTrace = /*@__PURE__*/ proxyCustomElement(class LidoTrace extends H {
589
641
  if (this.el && this.onCorrect) {
590
642
  await executeActions(this.onCorrect, this.el);
591
643
  }
644
+ calculateScore();
592
645
  console.log('All SVGs completed, hiding component.');
593
646
  triggerNextContainer();
594
647
  }
@@ -789,7 +842,7 @@ const LidoTrace = /*@__PURE__*/ proxyCustomElement(class LidoTrace extends H {
789
842
  };
790
843
  }
791
844
  render() {
792
- return (h(Host, { key: '3f12119394502b6750874aaa50f43bf42e9f63cc', 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 }, h("div", { key: '4fddd90d12251c4020006690f8c769ab452c8f6a', style: this.style, id: "lido-svgContainer" })));
845
+ return (h(Host, { key: 'aef0bf373de0c1d6ac49e7782838d9679c2b093f', 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 }, h("div", { key: 'f5223ad78568213f7965b3ea7eeb56b1b965fe78', style: this.style, id: "lido-svgContainer" })));
793
846
  }
794
847
  static get assetsDirs() { return ["svg", "images"]; }
795
848
  get el() { return this; }
@@ -1,6 +1,6 @@
1
- import { p as proxyCustomElement, H, l as createEvent, m as equationCheck, n as storingEachActivityScore, o as executeActions, q as calculateScore, N as NextContainerKey, h, j as Host } from './p-36c2e21a.js';
2
- import { d as defineCustomElement$2 } from './p-c296051d.js';
3
- import { d as defineCustomElement$1 } from './p-0be6b5d5.js';
1
+ import { p as proxyCustomElement, H, l as createEvent, m as equationCheck, n as storingEachActivityScore, o as executeActions, q as calculateScore, N as NextContainerKey, h, j as Host } from './p-0712a27e.js';
2
+ import { d as defineCustomElement$2 } from './p-f3bc4577.js';
3
+ import { d as defineCustomElement$1 } from './p-7ab0a273.js';
4
4
 
5
5
  const lidoCalculatorCss = "#lidoCalculator{border-radius:19px;border:5px solid #029A9A;position:relative;display:flex;flex-direction:column;padding:2%;box-sizing:border-box}.lido-calculator-btn-special{background-color:#014D4D !important;--btn-shadow-color:#0a2f2f !important}.lido-calculator-btn-default{background-color:#029A9A !important;color:#000;--btn-shadow-color:#0f4242 !important}#lido-calculator-penIcon{--btn-bg-color:#FB7038 !important;--btn-shadow-px:0 8px 0 !important;--btn-shadow-color:#D74B12 !important;border-radius:5px !important}.lido-calculator-displayParent{width:89%;height:107px;background-color:rgb(68, 186, 186);border-radius:5px;margin:14px auto 17px auto;overflow:hidden;display:flex;align-items:end}.lido-calculator-display{width:97%;height:94px;background:#029A9A;color:#fff;text-align:right;display:flex;justify-content:flex-end;align-items:center;font-size:72px;font-weight:700;font-family:'Baloo Bhai 2', serif;border-radius:5px 0px 0px 5px;box-sizing:border-box;margin:0 0px -6px auto}.lido-calculator-buttons{flex:1;display:grid;grid-template-columns:repeat(3, 1fr);grid-auto-rows:1fr;gap:0%;width:100%;justify-items:center;align-items:center;position:relative;top:-1%}.lido-calculator-buttons lido-text{display:flex !important;justify-content:center;align-items:center;width:96px !important;height:80px !important;font-size:72px !important;font-weight:700 !important;color:#fff;border-radius:5px !important;cursor:pointer;text-align:center;line-height:1;box-sizing:border-box;transition:transform 0.1s}.lido-calculator-buttons lido-text:active{transform:scale(0.95)}";
6
6
  const LidoCalculatorStyle0 = lidoCalculatorCss;
@@ -0,0 +1,128 @@
1
+ import { p as proxyCustomElement, H, d as setVisibilityWithDelay, i as initEventsForElement, k as parseProp, h, j as Host } from './p-0712a27e.js';
2
+
3
+ const lidoShapeCss = ".lido-shape{position:absolute;top:var(--y);left:var(--x);display:var(--display);z-index:var(--z);justify-content:center;align-items:center}.lido-rectangle{border-radius:0}.lido-circle{width:var(--width);height:var(--width);border-radius:50%;background-color:var(--bgColor)}.lido-ellipse{width:var(--width);height:var(--height);border-radius:50%;background-color:var(--bgColor)}.lido-triangle{width:var(--triangleWidth);height:var(--triangleHeight);background-color:var(--bgColor);clip-path:polygon(50% 0%, 100% 100%, 0% 100%)}.lido-rightTriangle{width:var(--triangleWidth);height:var(--triangleHeight);background-color:var(--bgColor);clip-path:polygon(100% 0%, 100% 100%, 0% 100%)}.lido-leftTriangle{width:var(--triangleWidth);height:var(--triangleHeight);background-color:var(--triangleBgColor);clip-path:polygon(0% 0%, 100% 100%, 0% 100%)}.lido-parallelogram{width:var(--paralleWidth);height:var(--paralleHeight);transform:skew(20deg)}.lido-trapezoid{width:var(--trapezoidWidth);height:var(--trapezoidHeight);background-color:var(--bgColor);clip-path:polygon(\r\n 20% 0%, \r\n 80% 0%, \r\n 100% 100%,\r\n 0% 100% \r\n )}.lido-hexagon{width:var(--hexagonWidth);height:var(--hexagonHeight);background-color:var(--bgColor);clip-path:polygon(\r\n 25% 0%, \r\n 75% 0%, \r\n 100% 50%, \r\n 75% 100%, \r\n 25% 100%, \r\n 0% 50% \r\n )}.lido-cone{width:var(--coneWidth);height:var(--coneHeight);background-color:var(--bgColor);clip-path:polygon(\r\n \r\n 15% 10%,\r\n 25% 4%,\r\n 35% 1%,\r\n 50% 0%,\r\n 65% 1%,\r\n 75% 4%,\r\n 85% 10%,\r\n\r\n \r\n 50% 100%\r\n )}.lido-star{width:var(--starWidth);height:var(--starHeight);background-color:var(--starBgColor);clip-path:polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%)}.lido-pentagon{width:var(--pentagonWidth);height:var(--pentagonHeight);background-color:var(--pentagonBgColor);clip-path:polygon(50% 0%, 100% 38%, 82% 100%, 18% 100%, 0% 38%)}.lido-heptagon{width:var(--heptagonWidth);height:var(--heptagonHeight);background-color:var(--heptagonBgColor);clip-path:polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%)}.lido-octagon{width:var(--octagonWidth);height:var(--octagonHeight);background-color:var(--octagonBgColor);clip-path:polygon(25% 0%, 75% 0%, 100% 25%, 100% 75%, 75% 100%, 25% 100%, 0% 75%, 0% 25%)}.lido-rhombus{width:var(--rhombusWidth);height:var(--rhombusHeight);background-color:var(--rhombusBgColor);clip-path:polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%)}.lido-heart{height:var(--heartHeight);width:var(--heartWidth);border-image:radial-gradient(var(--heartBgColor) 69%, #0000 70%) 84.5%/50%;clip-path:polygon(-41% 0, 50% 91%, 141% 0)}.cube{width:100%;height:100%;position:relative;transform-style:preserve-3d;transform:rotateX(-20deg) rotateY(45deg)}.face{position:absolute;width:var(--face-width,150px);height:var(--face-width,150px);background:var(--face-bg-color,150px);box-shadow:inset -20px -20px 40px rgba(0,0,0,0.3)}.front{transform:rotateY( 0deg) translateZ(var(--face-translate, 75px))}.back{transform:rotateY(180deg) translateZ(var(--face-translate, 75px))}.right{transform:rotateY( 90deg) translateZ(var(--face-translate, 75px))}.left{transform:rotateY(-90deg) translateZ(var(--face-translate, 75px))}.top{transform:rotateX( 90deg) translateZ(var(--face-translate, 75px))}.bottom{transform:rotateX(-90deg) translateZ(var(--face-translate, 75px))}.lido-cylinder{width:var(--width);height:var(--height);border-radius:100% / 80px;background:radial-gradient(50% 40px at 50% 40px, #0003 99.99%, #0000 0),\r\n radial-gradient(50% 40px at 50% calc(100% - 40px), #fff3 99.99%, #0000 0),\r\n red}";
4
+ const LidoShapeStyle0 = lidoShapeCss;
5
+
6
+ const LidoShape = /*@__PURE__*/ proxyCustomElement(class LidoShape extends H {
7
+ constructor() {
8
+ super();
9
+ this.__registerHost();
10
+ this.id = '';
11
+ this.value = '';
12
+ this.height = 'auto';
13
+ this.width = 'auto';
14
+ this.ariaLabel = '';
15
+ this.ariaHidden = '';
16
+ this.x = '0px';
17
+ this.y = '0px';
18
+ this.z = '0';
19
+ this.bgColor = '';
20
+ this.type = '';
21
+ this.tabIndex = 0;
22
+ this.shapeType = 'circle';
23
+ this.visible = false;
24
+ this.audio = '';
25
+ this.onTouch = '';
26
+ this.onInCorrect = '';
27
+ this.onCorrect = '';
28
+ this.onEntry = '';
29
+ this.minDrops = 1;
30
+ this.maxDrops = 1;
31
+ this.margin = '';
32
+ this.delayVisible = '';
33
+ this.disableSpeak = false;
34
+ this.style = {};
35
+ }
36
+ /**
37
+ * Lifecycle hook that runs after the component is loaded into the DOM.
38
+ * It initializes custom events based on the `type` of the shape component.
39
+ */
40
+ componentDidLoad() {
41
+ setVisibilityWithDelay(this.el, this.delayVisible);
42
+ initEventsForElement(this.el, this.type);
43
+ this.updateStyles();
44
+ this.lido3DShapes();
45
+ }
46
+ updateStyles() {
47
+ const orientation = window.innerHeight > window.innerWidth ? 'portrait' : 'landscape';
48
+ this.style = {
49
+ x: parseProp(`${this.x}`, orientation),
50
+ y: parseProp(`${this.y}`, orientation),
51
+ height: parseProp(`${this.height}`, orientation),
52
+ width: parseProp(`${this.width}`, orientation),
53
+ };
54
+ }
55
+ lido3DShapes() {
56
+ const orientation = window.innerHeight > window.innerWidth ? 'portrait' : 'landscape';
57
+ if (this.shapeType === "lido-cube") {
58
+ const faces = this.el.querySelectorAll(".face");
59
+ faces.forEach(item => {
60
+ const face = item;
61
+ face.style.setProperty("--face-width", parseProp(`${this.width}`, orientation));
62
+ const translateValue = parseInt(parseProp(`${this.width}`, orientation)) / 2;
63
+ console.log("translate : ", translateValue);
64
+ face.style.setProperty("--face-translate", `${translateValue}px`);
65
+ face.style.setProperty("--face-bg-color", this.bgColor);
66
+ });
67
+ }
68
+ }
69
+ render() {
70
+ // Inline styles to position and size the shape component
71
+ const style = {
72
+ height: this.shapeType !== 'polygon' ? this.style.height : undefined, // Set height unless it's a polygon
73
+ width: this.shapeType !== 'polygon' ? this.style.width : undefined, // Set width unless it's a polygon
74
+ top: this.style.y,
75
+ left: this.style.x,
76
+ display: this.visible ? 'block' : 'none', // Toggle visibility
77
+ zIndex: this.z,
78
+ backgroundColor: this.shapeType !== 'polygon' ? this.bgColor : 'transparent', // Apply background only if not a polygon
79
+ margin: this.margin,
80
+ };
81
+ return (h(Host, { key: 'fde795dbc7c3a295a84bb1e5e74ff57cf3fe103a', class: `lido-shape ${this.shapeType}`, value: this.value, type: this.type, "tab-index": this.tabIndex, style: style, "aria-label": this.ariaLabel, "aria-hidden": this.ariaHidden, audio: this.audio, minDrops: this.minDrops, maxDrops: this.maxDrops, onTouch: this.onTouch, onCorrect: this.onCorrect, onInCorrect: this.onInCorrect, onEntry: this.onEntry, "disable-speak": this.disableSpeak }, this.shapeType === "lido-cube" &&
82
+ h("div", { key: '620b82948d6eea342a2e00fab780696fcd2d6794', class: "cube" }, h("div", { key: 'b505a156896edd12c8d686966945168c5eb056d7', class: "face top" }), h("div", { key: '806b4d6aec720340d7a207854b20f910bb845829', class: "face bottom" }), h("div", { key: 'd2619804cabb2761e624139e33d759992d632468', class: "face left" }), h("div", { key: '3874ba7bcbe3eebc133b107a4bfefb38638eeb0f', class: "face right" }), h("div", { key: '0e19cfb0feba399b9a98336b0f6c349ff22e29ed', class: "face front" }), h("div", { key: '9b1d9d75d8897756f32bc023533eb1dc025d8e2f', class: "face back" }))));
83
+ }
84
+ get el() { return this; }
85
+ static get style() { return LidoShapeStyle0; }
86
+ }, [0, "lido-shape", {
87
+ "id": [1],
88
+ "value": [1],
89
+ "height": [1],
90
+ "width": [1],
91
+ "ariaLabel": [1, "aria-label"],
92
+ "ariaHidden": [1, "aria-hidden"],
93
+ "x": [1],
94
+ "y": [1],
95
+ "z": [1],
96
+ "bgColor": [1, "bg-color"],
97
+ "type": [1],
98
+ "tabIndex": [2, "tab-index"],
99
+ "shapeType": [1, "shape-type"],
100
+ "visible": [4],
101
+ "audio": [1],
102
+ "onTouch": [1, "on-touch"],
103
+ "onInCorrect": [1, "on-in-correct"],
104
+ "onCorrect": [1, "on-correct"],
105
+ "onEntry": [1, "on-entry"],
106
+ "minDrops": [2, "min-drops"],
107
+ "maxDrops": [2, "max-drops"],
108
+ "margin": [1],
109
+ "delayVisible": [1, "delay-visible"],
110
+ "disableSpeak": [4, "disable-speak"],
111
+ "style": [32]
112
+ }]);
113
+ function defineCustomElement() {
114
+ if (typeof customElements === "undefined") {
115
+ return;
116
+ }
117
+ const components = ["lido-shape"];
118
+ components.forEach(tagName => { switch (tagName) {
119
+ case "lido-shape":
120
+ if (!customElements.get(tagName)) {
121
+ customElements.define(tagName, LidoShape);
122
+ }
123
+ break;
124
+ } });
125
+ }
126
+ defineCustomElement();
127
+
128
+ export { LidoShape as L, defineCustomElement as d };
@@ -1,4 +1,4 @@
1
- import { p as proxyCustomElement, H, u as calculateScale, e as convertUrlToRelative, i as initEventsForElement, h, j as Host } from './p-36c2e21a.js';
1
+ import { p as proxyCustomElement, H, v as calculateScale, e as convertUrlToRelative, i as initEventsForElement, h, j as Host } from './p-0712a27e.js';
2
2
  import { i as instance } from './p-73e3f0f4.js';
3
3
 
4
4
  const lidoContainerCss = ".lido-container{position:relative;height:100%;width:100%;background-color:var(--bgColor, transparent);display:flex;flex-direction:column;justify-content:center;align-items:center}";