@cuemath/leap 2.8.60-beta-0.1 → 2.8.60-gs1

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 (44) hide show
  1. package/dist/assets/line-icons/icons/bin2.js +7 -8
  2. package/dist/assets/line-icons/icons/bin2.js.map +1 -1
  3. package/dist/assets/line-icons/icons/skip-colored.js +43 -0
  4. package/dist/assets/line-icons/icons/skip-colored.js.map +1 -0
  5. package/dist/features/chapters/chapters-list/chapter-item/chapter-item.js +1 -1
  6. package/dist/features/chapters/chapters-list/chapter-item/chapter-item.js.map +1 -1
  7. package/dist/features/chapters-v2/chapter-details/chapter-details.js +24 -24
  8. package/dist/features/chapters-v2/chapter-details/chapter-details.js.map +1 -1
  9. package/dist/features/chapters-v2/comps/node-card/student-actions/student-actions.js +76 -72
  10. package/dist/features/chapters-v2/comps/node-card/student-actions/student-actions.js.map +1 -1
  11. package/dist/features/circle-games/game-launcher/comps/segmented-game-card/segmented-game-card.js +62 -75
  12. package/dist/features/circle-games/game-launcher/comps/segmented-game-card/segmented-game-card.js.map +1 -1
  13. package/dist/features/circle-games/game-launcher/comps/tables-card/tables-card.js +127 -110
  14. package/dist/features/circle-games/game-launcher/comps/tables-card/tables-card.js.map +1 -1
  15. package/dist/features/milestone/create/comps/chapters-selection-step/chapters-selection-step-styled.js +12 -4
  16. package/dist/features/milestone/create/comps/chapters-selection-step/chapters-selection-step-styled.js.map +1 -1
  17. package/dist/features/milestone/create/comps/chapters-selection-step/chapters-selection-step.js +128 -105
  18. package/dist/features/milestone/create/comps/chapters-selection-step/chapters-selection-step.js.map +1 -1
  19. package/dist/features/milestone/create/milestone-create.js +49 -43
  20. package/dist/features/milestone/create/milestone-create.js.map +1 -1
  21. package/dist/features/milestone/edit/comps/edit-milestone-modal/api/get-milestone.js +1 -1
  22. package/dist/features/milestone/edit/comps/edit-milestone-modal/api/get-milestone.js.map +1 -1
  23. package/dist/features/milestone/edit/goal-drafts/goal-draft-edit-container.js +42 -40
  24. package/dist/features/milestone/edit/goal-drafts/goal-draft-edit-container.js.map +1 -1
  25. package/dist/features/milestone/edit/goal-edit-container.js +64 -62
  26. package/dist/features/milestone/edit/goal-edit-container.js.map +1 -1
  27. package/dist/features/milestone/edit/milestone-edit-container.js +54 -52
  28. package/dist/features/milestone/edit/milestone-edit-container.js.map +1 -1
  29. package/dist/features/milestone/milestone-list-container/milestone-list/milestone-list.js +61 -52
  30. package/dist/features/milestone/milestone-list-container/milestone-list/milestone-list.js.map +1 -1
  31. package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/goals/goal-action-ctas.js +28 -28
  32. package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/goals/goal-action-ctas.js.map +1 -1
  33. package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/milestone-info.js +120 -111
  34. package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/milestone-info.js.map +1 -1
  35. package/dist/features/milestone/milestone-tests/tests-creation/tests-creation.js +16 -18
  36. package/dist/features/milestone/milestone-tests/tests-creation/tests-creation.js.map +1 -1
  37. package/dist/features/ui/lottie-animation/lottie-animation.js +39 -24
  38. package/dist/features/ui/lottie-animation/lottie-animation.js.map +1 -1
  39. package/dist/features/ui/theme/button.js +5 -5
  40. package/dist/features/ui/theme/button.js.map +1 -1
  41. package/dist/index.d.ts +6 -2
  42. package/dist/index.js +369 -367
  43. package/dist/index.js.map +1 -1
  44. package/package.json +1 -1
@@ -1,118 +1,105 @@
1
- import { jsxs as I, jsx as t } from "react/jsx-runtime";
2
- import v from "lottie-web";
3
- import { memo as H, forwardRef as w, useRef as T, useState as h, useCallback as c, useImperativeHandle as F, useMemo as E, useEffect as G } from "react";
4
- import $ from "../../../../../assets/line-icons/icons/check.js";
5
- import { LOTTIE as j } from "../../../../../assets/lottie/lottie.js";
6
- import { fetchLottie as O } from "../../../../ui/lottie-animation/helper.js";
7
- import U from "../../../../ui/lottie-animation/lottie-animation.js";
8
- import { CardContainer as x } from "../card-container/card-container.js";
9
- import { CircularProgressLottieContainer as B, SegmentLeft as D, SegmentRight as N, SegmentBottom as q, SegmentContainer as z, SegmentContentContainer as J, SegmentAssetContainer as K, SegmentOverlay as Q, IconWrapper as X } from "./segmented-game-card-styled.js";
10
- const S = ({
11
- segmentType: e,
12
- isCompleted: i,
13
- card: m,
14
- name: l,
15
- onMouseEnter: s
16
- }) => {
17
- const a = T(null);
18
- G(() => {
19
- let o = null;
20
- return (async () => {
21
- const p = await O(m);
22
- o = v.loadAnimation({
23
- container: a.current,
24
- renderer: "canvas",
25
- loop: !0,
26
- autoplay: !0,
27
- animationData: p
28
- });
29
- })(), () => o == null ? void 0 : o.destroy();
30
- }, [m]);
31
- const d = c(() => s(l), [s, l]);
32
- return /* @__PURE__ */ t(z, { children: /* @__PURE__ */ I(J, { $segmentType: e, onMouseEnter: d, children: [
33
- /* @__PURE__ */ t(K, { ref: a, $segmentType: e }),
34
- i && /* @__PURE__ */ t(Q, { $segmentType: e, children: /* @__PURE__ */ t(X, { children: /* @__PURE__ */ t($, { color: "#fff", height: 40, width: 40 }) }) })
35
- ] }) });
36
- }, Y = ({ data: e, label: i, initialValue: m = 0, value: l, maxValue: s = 1 }, a) => {
37
- const d = T(null), o = T(null), [u, p] = h(i), [L, y] = h(!1), [R, P] = h("WHITE_T_87"), _ = u !== i, C = c((n) => {
38
- p(n);
39
- }, []), b = c(() => {
40
- p(i);
41
- }, [i]), g = c(
42
- (n) => {
43
- var r, f;
44
- (f = (r = e[n]) == null ? void 0 : r.onPress) == null || f.call(r);
1
+ import { jsx as n, jsxs as L } from "react/jsx-runtime";
2
+ import { memo as P, useCallback as m, forwardRef as O, useRef as E, useState as f, useImperativeHandle as F, useMemo as A } from "react";
3
+ import G from "../../../../../assets/line-icons/icons/check.js";
4
+ import { LOTTIE as $ } from "../../../../../assets/lottie/lottie.js";
5
+ import R from "../../../../ui/lottie-animation/lottie-animation.js";
6
+ import { CardContainer as j } from "../card-container/card-container.js";
7
+ import { SegmentContainer as w, SegmentContentContainer as U, SegmentAssetContainer as x, SegmentOverlay as B, IconWrapper as N, CircularProgressLottieContainer as q, SegmentLeft as z, SegmentRight as D, SegmentBottom as J } from "./segmented-game-card-styled.js";
8
+ const K = { renderer: "canvas", loop: !0 }, C = P(
9
+ ({ segmentType: e, isCompleted: o, card: c, name: i, onMouseEnter: s }) => {
10
+ const a = m(() => s(i), [s, i]);
11
+ return /* @__PURE__ */ n(w, { children: /* @__PURE__ */ L(U, { $segmentType: e, onMouseEnter: a, children: [
12
+ /* @__PURE__ */ n(x, { $segmentType: e, children: /* @__PURE__ */ n(R, { src: c, settings: K, animateOnIntersect: !0 }) }),
13
+ o && /* @__PURE__ */ n(B, { $segmentType: e, children: /* @__PURE__ */ n(N, { children: /* @__PURE__ */ n(G, { color: "#fff", height: 40, width: 40 }) }) })
14
+ ] }) });
15
+ }
16
+ ), Q = ({ data: e, label: o, initialValue: c = 0, value: i, maxValue: s = 1 }, a) => {
17
+ const g = E(null), h = E(null), [u, S] = f(o), [T, _] = f(!1), [b, M] = f("WHITE_T_87"), W = u !== o, d = m((t) => {
18
+ S(t);
19
+ }, []), k = m(() => {
20
+ S(o);
21
+ }, [o]), p = m(
22
+ (t) => {
23
+ var r, l;
24
+ (l = (r = e[t]) == null ? void 0 : r.onPress) == null || l.call(r);
45
25
  },
46
26
  [e]
47
- ), M = c((n) => {
48
- y(!0), P(n);
27
+ ), v = m((t) => {
28
+ _(!0), M(t);
49
29
  }, []);
50
30
  F(a, () => ({
51
- labelRef: d,
52
- segmentedCardWrapperRef: o,
53
- startLabelAnimation: M
31
+ labelRef: g,
32
+ segmentedCardWrapperRef: h,
33
+ startLabelAnimation: v
54
34
  }));
55
- const A = E(() => {
35
+ const I = A(() => {
56
36
  if (s <= 0)
57
37
  return;
58
- const n = 92, r = n / s, f = Math.min(r * m, n), k = Math.min(r * l + 1, n);
59
- return [f, k];
60
- }, [m, s, l]), W = E(
38
+ const t = 92, r = t / s, l = Math.min(r * c, t), H = Math.min(r * i + 1, t);
39
+ return [l, H];
40
+ }, [c, s, i]), y = A(
61
41
  () => ({
62
42
  renderer: "canvas",
63
43
  autoplay: !0,
64
44
  loop: !1,
65
- initialSegment: A
45
+ initialSegment: I
66
46
  }),
67
- [A]
47
+ [I]
68
48
  );
69
- return /* @__PURE__ */ I(
70
- x,
49
+ return /* @__PURE__ */ L(
50
+ j,
71
51
  {
72
- ref: o,
73
- labelRef: d,
52
+ ref: h,
53
+ labelRef: g,
74
54
  label: u,
75
- isAnimated: L,
76
- onMouseLeave: b,
77
- labelColor: L ? R : _ ? "WHITE_T_87" : "WHITE_T_60",
55
+ isAnimated: T,
56
+ onMouseLeave: k,
57
+ labelColor: T ? b : W ? "WHITE_T_87" : "WHITE_T_60",
78
58
  children: [
79
- /* @__PURE__ */ t(B, { children: /* @__PURE__ */ t(U, { src: j.LEVELUP_RINGS, settings: W }) }),
80
- /* @__PURE__ */ t(D, { onClick: () => g(0), children: /* @__PURE__ */ t(
81
- S,
59
+ /* @__PURE__ */ n(q, { children: /* @__PURE__ */ n(
60
+ R,
61
+ {
62
+ src: $.LEVELUP_RINGS,
63
+ settings: y,
64
+ animateOnIntersect: !0
65
+ }
66
+ ) }),
67
+ /* @__PURE__ */ n(z, { onClick: () => p(0), children: /* @__PURE__ */ n(
68
+ C,
82
69
  {
83
70
  segmentType: "left",
84
71
  card: e[0].card,
85
72
  name: e[0].name,
86
73
  isCompleted: e[0].isCompleted,
87
- onMouseEnter: C
74
+ onMouseEnter: d
88
75
  }
89
76
  ) }),
90
- /* @__PURE__ */ t(N, { onClick: () => g(1), children: /* @__PURE__ */ t(
91
- S,
77
+ /* @__PURE__ */ n(D, { onClick: () => p(1), children: /* @__PURE__ */ n(
78
+ C,
92
79
  {
93
80
  segmentType: "right",
94
81
  card: e[1].card,
95
82
  name: e[1].name,
96
83
  isCompleted: e[1].isCompleted,
97
- onMouseEnter: C
84
+ onMouseEnter: d
98
85
  }
99
86
  ) }),
100
- /* @__PURE__ */ t(q, { onClick: () => g(2), children: /* @__PURE__ */ t(
101
- S,
87
+ /* @__PURE__ */ n(J, { onClick: () => p(2), children: /* @__PURE__ */ n(
88
+ C,
102
89
  {
103
90
  segmentType: "bottom",
104
91
  card: e[2].card,
105
92
  name: e[2].name,
106
93
  isCompleted: e[2].isCompleted,
107
- onMouseEnter: C
94
+ onMouseEnter: d
108
95
  }
109
96
  ) })
110
97
  ]
111
98
  }
112
99
  );
113
- }, me = H(w(Y));
100
+ }, re = P(O(Q));
114
101
  export {
115
- S as SegmentContent,
116
- me as SegmentedGameCard
102
+ C as SegmentContent,
103
+ re as SegmentedGameCard
117
104
  };
118
105
  //# sourceMappingURL=segmented-game-card.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"segmented-game-card.js","sources":["../../../../../../src/features/circle-games/game-launcher/comps/segmented-game-card/segmented-game-card.tsx"],"sourcesContent":["import type { TColorNames } from '../../../../ui/types';\nimport type {\n IGameCardSegmentContentProps,\n ISegmentedGameCardProps,\n ISegmentedGameCardRefs,\n} from './segmented-game-card-types';\nimport type { AnimationItem } from 'lottie-web';\nimport type { FC, ForwardRefRenderFunction } from 'react';\n\nimport Lottie from 'lottie-web';\nimport {\n forwardRef,\n memo,\n useCallback,\n useEffect,\n useImperativeHandle,\n useMemo,\n useRef,\n useState,\n} from 'react';\n\nimport CheckIcon from '../../../../../assets/line-icons/icons/check';\nimport { LOTTIE } from '../../../../../assets/lottie/lottie';\nimport { fetchLottie } from '../../../../ui/lottie-animation/helper';\nimport LottieAnimation from '../../../../ui/lottie-animation/lottie-animation';\nimport { CardContainer } from '../card-container/card-container';\nimport * as Styled from './segmented-game-card-styled';\n\nexport const SegmentContent: FC<IGameCardSegmentContentProps> = ({\n segmentType,\n isCompleted,\n card,\n name,\n onMouseEnter,\n}) => {\n const lottieAnimationRef = useRef<HTMLDivElement>(null);\n\n useEffect(() => {\n let animation: AnimationItem | null = null;\n\n const loadLottie = async () => {\n const lottie = await fetchLottie(card);\n\n animation = Lottie.loadAnimation({\n container: lottieAnimationRef.current as Element,\n renderer: 'canvas',\n loop: true,\n autoplay: true,\n animationData: lottie,\n });\n };\n\n loadLottie();\n\n return () => {\n return animation?.destroy();\n };\n }, [card]);\n\n const handleMouseEnter = useCallback(() => onMouseEnter(name), [onMouseEnter, name]);\n\n return (\n <Styled.SegmentContainer>\n <Styled.SegmentContentContainer $segmentType={segmentType} onMouseEnter={handleMouseEnter}>\n <Styled.SegmentAssetContainer ref={lottieAnimationRef} $segmentType={segmentType} />\n {isCompleted && (\n <Styled.SegmentOverlay $segmentType={segmentType}>\n <Styled.IconWrapper>\n <CheckIcon color=\"#fff\" height={40} width={40} />\n </Styled.IconWrapper>\n </Styled.SegmentOverlay>\n )}\n </Styled.SegmentContentContainer>\n </Styled.SegmentContainer>\n );\n};\n\nconst SegmentedGameCardComponent: ForwardRefRenderFunction<\n ISegmentedGameCardRefs,\n ISegmentedGameCardProps\n> = ({ data, label: gameCategoryLabel, initialValue = 0, value, maxValue = 1 }, ref) => {\n const labelRef = useRef<HTMLDivElement>(null);\n const cardWrapperRef = useRef<HTMLDivElement>(null);\n\n const [label, setLabel] = useState<string>(gameCategoryLabel);\n const [isAnimated, setIsAnimated] = useState(false);\n const [animatedColor, setAnimatedColor] = useState<TColorNames>('WHITE_T_87');\n\n const isLabelHighlighted = label !== gameCategoryLabel;\n\n const onMouseEnter = useCallback((gameName: string) => {\n setLabel(gameName);\n }, []);\n\n const onMouseLeave = useCallback(() => {\n setLabel(gameCategoryLabel);\n }, [gameCategoryLabel]);\n\n const onSegmentPress = useCallback(\n (index: number) => {\n data[index]?.onPress?.();\n },\n [data],\n );\n\n const startLabelAnimation = useCallback((color: TColorNames) => {\n setIsAnimated(true);\n setAnimatedColor(color);\n }, []);\n\n useImperativeHandle(ref, () => ({\n labelRef,\n segmentedCardWrapperRef: cardWrapperRef,\n startLabelAnimation,\n }));\n\n const animationSegments: [number, number] | undefined = useMemo(() => {\n if (maxValue <= 0) {\n return;\n }\n\n const totalFrames = 92;\n const framesPerValue = totalFrames / maxValue;\n\n const initialFrameToPlay = Math.min(framesPerValue * initialValue, totalFrames);\n const finalFrameToPlay = Math.min(framesPerValue * value + 1, totalFrames);\n\n return [initialFrameToPlay, finalFrameToPlay];\n }, [initialValue, maxValue, value]);\n\n const levelUpAnimationSettings = useMemo(\n () => ({\n renderer: 'canvas',\n autoplay: true,\n loop: false,\n initialSegment: animationSegments,\n }),\n [animationSegments],\n );\n\n return (\n <CardContainer\n ref={cardWrapperRef}\n labelRef={labelRef}\n label={label}\n isAnimated={isAnimated}\n onMouseLeave={onMouseLeave}\n labelColor={isAnimated ? animatedColor : isLabelHighlighted ? 'WHITE_T_87' : 'WHITE_T_60'}\n >\n <Styled.CircularProgressLottieContainer>\n <LottieAnimation src={LOTTIE.LEVELUP_RINGS} settings={levelUpAnimationSettings} />\n </Styled.CircularProgressLottieContainer>\n {/* left segment */}\n <Styled.SegmentLeft onClick={() => onSegmentPress(0)}>\n <SegmentContent\n segmentType={'left'}\n card={data[0]!.card}\n name={data[0]!.name}\n isCompleted={data[0]!.isCompleted}\n onMouseEnter={onMouseEnter}\n />\n </Styled.SegmentLeft>\n\n {/* right segment */}\n <Styled.SegmentRight onClick={() => onSegmentPress(1)}>\n <SegmentContent\n segmentType={'right'}\n card={data[1]!.card}\n name={data[1]!.name}\n isCompleted={data[1]!.isCompleted}\n onMouseEnter={onMouseEnter}\n />\n </Styled.SegmentRight>\n\n {/* bottom segment */}\n <Styled.SegmentBottom onClick={() => onSegmentPress(2)}>\n <SegmentContent\n segmentType={'bottom'}\n card={data[2]!.card}\n name={data[2]!.name}\n isCompleted={data[2]!.isCompleted}\n onMouseEnter={onMouseEnter}\n />\n </Styled.SegmentBottom>\n </CardContainer>\n );\n};\n\nexport const SegmentedGameCard = memo(forwardRef(SegmentedGameCardComponent));\n"],"names":["SegmentContent","segmentType","isCompleted","card","name","onMouseEnter","lottieAnimationRef","useRef","useEffect","animation","lottie","fetchLottie","Lottie","handleMouseEnter","useCallback","jsx","Styled.SegmentContainer","jsxs","Styled.SegmentContentContainer","Styled.SegmentAssetContainer","Styled.SegmentOverlay","Styled.IconWrapper","CheckIcon","SegmentedGameCardComponent","data","gameCategoryLabel","initialValue","value","maxValue","ref","labelRef","cardWrapperRef","label","setLabel","useState","isAnimated","setIsAnimated","animatedColor","setAnimatedColor","isLabelHighlighted","gameName","onMouseLeave","onSegmentPress","index","_b","_a","startLabelAnimation","color","useImperativeHandle","animationSegments","useMemo","totalFrames","framesPerValue","initialFrameToPlay","finalFrameToPlay","levelUpAnimationSettings","CardContainer","Styled.CircularProgressLottieContainer","LottieAnimation","LOTTIE","Styled.SegmentLeft","Styled.SegmentRight","Styled.SegmentBottom","SegmentedGameCard","memo","forwardRef"],"mappings":";;;;;;;;;AA4BO,MAAMA,IAAmD,CAAC;AAAA,EAC/D,aAAAC;AAAA,EACA,aAAAC;AAAA,EACA,MAAAC;AAAA,EACA,MAAAC;AAAA,EACA,cAAAC;AACF,MAAM;AACE,QAAAC,IAAqBC,EAAuB,IAAI;AAEtD,EAAAC,EAAU,MAAM;AACd,QAAIC,IAAkC;AAc3B,YAZQ,YAAY;AACvB,YAAAC,IAAS,MAAMC,EAAYR,CAAI;AAErC,MAAAM,IAAYG,EAAO,cAAc;AAAA,QAC/B,WAAWN,EAAmB;AAAA,QAC9B,UAAU;AAAA,QACV,MAAM;AAAA,QACN,UAAU;AAAA,QACV,eAAeI;AAAA,MAAA,CAChB;AAAA,IAAA,MAKI,MACED,KAAA,gBAAAA,EAAW;AAAA,EACpB,GACC,CAACN,CAAI,CAAC;AAEH,QAAAU,IAAmBC,EAAY,MAAMT,EAAaD,CAAI,GAAG,CAACC,GAAcD,CAAI,CAAC;AAGjF,SAAA,gBAAAW,EAACC,GAAA,EACC,UAAA,gBAAAC,EAACC,GAAA,EAA+B,cAAcjB,GAAa,cAAcY,GACvE,UAAA;AAAA,IAAA,gBAAAE,EAACI,GAAA,EAA6B,KAAKb,GAA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AC,EAAG;AAAA,YACf,aAAaA,EAAK,CAAC,EAAG;AAAA,YACtB,cAAAnB;AAAA,UAAA;AAAA,QAAA,GAEJ;AAAA,QAGA,gBAAAU,EAAC+C,GAAA,EAAqB,SAAS,MAAMpB,EAAe,CAAC,GACnD,UAAA,gBAAA3B;AAAA,UAACf;AAAA,UAAA;AAAA,YACC,aAAa;AAAA,YACb,MAAMwB,EAAK,CAAC,EAAG;AAAA,YACf,MAAMA,EAAK,CAAC,EAAG;AAAA,YACf,aAAaA,EAAK,CAAC,EAAG;AAAA,YACtB,cAAAnB;AAAA,UAAA;AAAA,QAAA,GAEJ;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAGN,GAEa0D,KAAoBC,EAAKC,EAAW1C,CAA0B,CAAC;"}
1
+ {"version":3,"file":"segmented-game-card.js","sources":["../../../../../../src/features/circle-games/game-launcher/comps/segmented-game-card/segmented-game-card.tsx"],"sourcesContent":["import type { TColorNames } from '../../../../ui/types';\nimport type {\n IGameCardSegmentContentProps,\n ISegmentedGameCardProps,\n ISegmentedGameCardRefs,\n} from './segmented-game-card-types';\nimport type { ForwardRefRenderFunction } from 'react';\n\nimport {\n forwardRef,\n memo,\n useCallback,\n useImperativeHandle,\n useMemo,\n useRef,\n useState,\n} from 'react';\n\nimport CheckIcon from '../../../../../assets/line-icons/icons/check';\nimport { LOTTIE } from '../../../../../assets/lottie/lottie';\nimport LottieAnimation from '../../../../ui/lottie-animation/lottie-animation';\nimport { CardContainer } from '../card-container/card-container';\nimport * as Styled from './segmented-game-card-styled';\n\nconst renderSettings = { renderer: 'canvas', loop: true };\n\nexport const SegmentContent = memo(\n ({ segmentType, isCompleted, card, name, onMouseEnter }: IGameCardSegmentContentProps) => {\n const handleMouseEnter = useCallback(() => onMouseEnter(name), [onMouseEnter, name]);\n\n return (\n <Styled.SegmentContainer>\n <Styled.SegmentContentContainer $segmentType={segmentType} onMouseEnter={handleMouseEnter}>\n <Styled.SegmentAssetContainer $segmentType={segmentType}>\n <LottieAnimation src={card} settings={renderSettings} animateOnIntersect />\n </Styled.SegmentAssetContainer>\n\n {isCompleted && (\n <Styled.SegmentOverlay $segmentType={segmentType}>\n <Styled.IconWrapper>\n <CheckIcon color=\"#fff\" height={40} width={40} />\n </Styled.IconWrapper>\n </Styled.SegmentOverlay>\n )}\n </Styled.SegmentContentContainer>\n </Styled.SegmentContainer>\n );\n },\n);\n\nconst SegmentedGameCardComponent: ForwardRefRenderFunction<\n ISegmentedGameCardRefs,\n ISegmentedGameCardProps\n> = ({ data, label: gameCategoryLabel, initialValue = 0, value, maxValue = 1 }, ref) => {\n const labelRef = useRef<HTMLDivElement>(null);\n const cardWrapperRef = useRef<HTMLDivElement>(null);\n\n const [label, setLabel] = useState<string>(gameCategoryLabel);\n const [isAnimated, setIsAnimated] = useState(false);\n const [animatedColor, setAnimatedColor] = useState<TColorNames>('WHITE_T_87');\n\n const isLabelHighlighted = label !== gameCategoryLabel;\n\n const onMouseEnter = useCallback((gameName: string) => {\n setLabel(gameName);\n }, []);\n\n const onMouseLeave = useCallback(() => {\n setLabel(gameCategoryLabel);\n }, [gameCategoryLabel]);\n\n const onSegmentPress = useCallback(\n (index: number) => {\n data[index]?.onPress?.();\n },\n [data],\n );\n\n const startLabelAnimation = useCallback((color: TColorNames) => {\n setIsAnimated(true);\n setAnimatedColor(color);\n }, []);\n\n useImperativeHandle(ref, () => ({\n labelRef,\n segmentedCardWrapperRef: cardWrapperRef,\n startLabelAnimation,\n }));\n\n const animationSegments: [number, number] | undefined = useMemo(() => {\n if (maxValue <= 0) {\n return;\n }\n\n const totalFrames = 92;\n const framesPerValue = totalFrames / maxValue;\n\n const initialFrameToPlay = Math.min(framesPerValue * initialValue, totalFrames);\n const finalFrameToPlay = Math.min(framesPerValue * value + 1, totalFrames);\n\n return [initialFrameToPlay, finalFrameToPlay];\n }, [initialValue, maxValue, value]);\n\n const levelUpAnimationSettings = useMemo(\n () => ({\n renderer: 'canvas',\n autoplay: true,\n loop: false,\n initialSegment: animationSegments,\n }),\n [animationSegments],\n );\n\n return (\n <CardContainer\n ref={cardWrapperRef}\n labelRef={labelRef}\n label={label}\n isAnimated={isAnimated}\n onMouseLeave={onMouseLeave}\n labelColor={isAnimated ? animatedColor : isLabelHighlighted ? 'WHITE_T_87' : 'WHITE_T_60'}\n >\n <Styled.CircularProgressLottieContainer>\n <LottieAnimation\n src={LOTTIE.LEVELUP_RINGS}\n settings={levelUpAnimationSettings}\n animateOnIntersect\n />\n </Styled.CircularProgressLottieContainer>\n {/* left segment */}\n <Styled.SegmentLeft onClick={() => onSegmentPress(0)}>\n <SegmentContent\n segmentType={'left'}\n card={data[0]!.card}\n name={data[0]!.name}\n isCompleted={data[0]!.isCompleted}\n onMouseEnter={onMouseEnter}\n />\n </Styled.SegmentLeft>\n\n {/* right segment */}\n <Styled.SegmentRight onClick={() => onSegmentPress(1)}>\n <SegmentContent\n segmentType={'right'}\n card={data[1]!.card}\n name={data[1]!.name}\n isCompleted={data[1]!.isCompleted}\n onMouseEnter={onMouseEnter}\n />\n </Styled.SegmentRight>\n\n {/* bottom segment */}\n <Styled.SegmentBottom onClick={() => onSegmentPress(2)}>\n <SegmentContent\n segmentType={'bottom'}\n card={data[2]!.card}\n name={data[2]!.name}\n isCompleted={data[2]!.isCompleted}\n onMouseEnter={onMouseEnter}\n />\n </Styled.SegmentBottom>\n </CardContainer>\n );\n};\n\nexport const SegmentedGameCard = memo(forwardRef(SegmentedGameCardComponent));\n"],"names":["renderSettings","SegmentContent","memo","segmentType","isCompleted","card","name","onMouseEnter","handleMouseEnter","useCallback","jsx","Styled.SegmentContainer","jsxs","Styled.SegmentContentContainer","Styled.SegmentAssetContainer","LottieAnimation","Styled.SegmentOverlay","Styled.IconWrapper","CheckIcon","SegmentedGameCardComponent","data","gameCategoryLabel","initialValue","value","maxValue","ref","labelRef","useRef","cardWrapperRef","label","setLabel","useState","isAnimated","setIsAnimated","animatedColor","setAnimatedColor","isLabelHighlighted","gameName","onMouseLeave","onSegmentPress","index","_b","_a","startLabelAnimation","color","useImperativeHandle","animationSegments","useMemo","totalFrames","framesPerValue","initialFrameToPlay","finalFrameToPlay","levelUpAnimationSettings","CardContainer","Styled.CircularProgressLottieContainer","LOTTIE","Styled.SegmentLeft","Styled.SegmentRight","Styled.SegmentBottom","SegmentedGameCard","forwardRef"],"mappings":";;;;;;;AAwBA,MAAMA,IAAiB,EAAE,UAAU,UAAU,MAAM,GAAK,GAE3CC,IAAiBC;AAAA,EAC5B,CAAC,EAAE,aAAAC,GAAa,aAAAC,GAAa,MAAAC,GAAM,MAAAC,GAAM,cAAAC,QAAiD;AAClF,UAAAC,IAAmBC,EAAY,MAAMF,EAAaD,CAAI,GAAG,CAACC,GAAcD,CAAI,CAAC;AAGjF,WAAA,gBAAAI,EAACC,GAAA,EACC,UAAA,gBAAAC,EAACC,GAAA,EAA+B,cAAcV,GAAa,cAAcK,GACvE,UAAA;AAAA,MAAA,gBAAAE,EAACI,GAAA,EAA6B,cAAcX,GAC1C,UAAA,gBAAAO,EAACK,GAAgB,EAAA,KAAKV,GAAM,UAAUL,GAAgB,oBAAkB,GAAC,CAAA,GAC3E;AAAA,MAECI,uBACEY,GAAA,EAAsB,cAAcb,GACnC,4BAACc,GAAA,EACC,UAAC,gBAAAP,EAAAQ,GAAA,EAAU,OAAM,QAAO,QAAQ,IAAI,OAAO,GAAA,CAAI,EACjD,CAAA,GACF;AAAA,IAAA,EAEJ,CAAA,EACF,CAAA;AAAA,EAEJ;AACF,GAEMC,IAGF,CAAC,EAAE,MAAAC,GAAM,OAAOC,GAAmB,cAAAC,IAAe,GAAG,OAAAC,GAAO,UAAAC,IAAW,EAAE,GAAGC,MAAQ;AAChF,QAAAC,IAAWC,EAAuB,IAAI,GACtCC,IAAiBD,EAAuB,IAAI,GAE5C,CAACE,GAAOC,CAAQ,IAAIC,EAAiBV,CAAiB,GACtD,CAACW,GAAYC,CAAa,IAAIF,EAAS,EAAK,GAC5C,CAACG,GAAeC,CAAgB,IAAIJ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89 @@
1
1
  import { jsx as t, jsxs as a } from "react/jsx-runtime";
2
- import he, { forwardRef as Ae, useState as o, useRef as p, useCallback as i, useMemo as Z, useImperativeHandle as be, useEffect as z, memo as Ee } from "react";
2
+ import Ae, { forwardRef as be, useState as o, useRef as N, useCallback as i, useMemo as z, useImperativeHandle as Ee, useEffect as K, memo as ge } from "react";
3
3
  import Ne from "../../../../../assets/line-icons/icons/back2.js";
4
4
  import { LOTTIE as R } from "../../../../../assets/lottie/lottie.js";
5
5
  import pe from "../../../../ui/arrow-tooltip/arrow-tooltip.js";
6
6
  import { useUIContext as Ce } from "../../../../ui/context/context.js";
7
- import ge from "../../../../ui/layout/flex-view.js";
7
+ import Se from "../../../../ui/layout/flex-view.js";
8
8
  import w from "../../../../ui/lottie-animation/lottie-animation.js";
9
- import Se from "../../../../ui/separator/separator.js";
10
- import K from "../../../../ui/text/text.js";
9
+ import Ie from "../../../../ui/separator/separator.js";
10
+ import F from "../../../../ui/text/text.js";
11
11
  import { useCircleSounds as Le } from "../../../hooks/use-circle-sounds/use-circle-sounds.js";
12
12
  import { GAME_LAUNCHER_ANALYTICS_EVENTS as fe } from "../../game-launcher-analytics-events.js";
13
13
  import { CardContainer as ve } from "../card-container/card-container.js";
14
- import { GAME_LAUNCHER_SIZE as C, GAME_LAUNCHER_SIZE_LARGE as Ie } from "../card-container/constants.js";
15
- import { TABLE_REVEAL_ANIMATION as g, TABLE_MODE_LABEL_COLOR as _e } from "./constants.js";
16
- import Te from "./table-mode/table-mode.js";
17
- import He from "./table-segment-star/table-segment-star.js";
18
- import { CardWrapper as $e, TableSegmentsWrapper as Re, InfiniteButtonWrapper as we, AbsoluteView as S, TableSegmentCardShadowContainer as ye, TableSegment as We, TableNumber as Be, TableModeContainer as De, TableModeWrapper as Pe, AnimatedView as ke, ModeOverlay as Ve, IconWrapper as xe } from "./tables-card-styled.js";
19
- const Ue = {
14
+ import { GAME_LAUNCHER_SIZE as p, GAME_LAUNCHER_SIZE_LARGE as _e } from "../card-container/constants.js";
15
+ import { TABLE_REVEAL_ANIMATION as C, TABLE_MODE_LABEL_COLOR as Te } from "./constants.js";
16
+ import He from "./table-mode/table-mode.js";
17
+ import $e from "./table-segment-star/table-segment-star.js";
18
+ import { CardWrapper as Re, TableSegmentsWrapper as we, InfiniteButtonWrapper as ye, AbsoluteView as S, TableSegmentCardShadowContainer as We, TableSegment as Be, TableNumber as De, TableModeContainer as Pe, TableModeWrapper as ke, AnimatedView as Ve, ModeOverlay as xe, IconWrapper as Ue } from "./tables-card-styled.js";
19
+ const y = {
20
+ renderer: "svg"
21
+ }, qe = {
20
22
  loop: !1,
21
23
  autoplay: !1,
22
- render: "svg"
23
- }, qe = Ae(
24
+ ...y
25
+ }, je = be(
24
26
  ({
25
- data: s,
26
- label: y,
27
+ data: l,
28
+ label: W,
27
29
  onPress: b,
28
30
  openModesOfTable: r,
29
31
  defaultTable: E,
30
- onGoBackFromTableLevel: N,
31
- onPressTableSegment: L
32
- }, F) => {
33
- var j;
34
- const { onEvent: W } = Ce(), { playButtonSound: m } = Le(), [u, f] = o(!0), [d, h] = o(
32
+ onGoBackFromTableLevel: g,
33
+ onPressTableSegment: I
34
+ }, G) => {
35
+ var Y;
36
+ const { onEvent: B } = Ce(), { playButtonSound: m } = Le(), [u, L] = o(!0), [d, h] = o(
35
37
  (r == null ? void 0 : r.tableNumber) ?? null
36
- ), [v, B] = o(null), [G, A] = o("WHITE_T_60"), [c, I] = o({
37
- stars: ((j = s.tableList.find((e) => e.tableNumber === (r == null ? void 0 : r.tableNumber))) == null ? void 0 : j.stars) ?? [],
38
+ ), [f, D] = o(null), [J, A] = o("WHITE_T_60"), [c, v] = o({
39
+ stars: ((Y = l.tableList.find((e) => e.tableNumber === (r == null ? void 0 : r.tableNumber))) == null ? void 0 : Y.stars) ?? [],
38
40
  tableNumber: (r == null ? void 0 : r.tableNumber) ?? 0
39
- }), [J, Q] = o(!0), [_, D] = o(!1), [P, X] = o("WHITE_T_60"), k = p(null), V = p(null), [x, M] = o((r == null ? void 0 : r.rewardStar) ?? []), [U] = o(!1), T = p(null), H = p(), q = i(
41
+ }), [Q, X] = o(!0), [_, P] = o(!1), [k, M] = o("WHITE_T_60"), V = N(null), x = N(null), [U, O] = o((r == null ? void 0 : r.rewardStar) ?? []), [q] = o(!1), T = N(null), H = N(), j = i(
40
42
  (e) => {
41
- if (L) {
42
- L(e);
43
+ if (I) {
44
+ I(e);
43
45
  return;
44
46
  }
45
- m(), f(!0), h(e.tableNumber), I({ ...e }), M([]), W(fe.TABLE_SELECTED, {
47
+ m(), L(!0), h(e.tableNumber), v({ ...e }), O([]), B(fe.TABLE_SELECTED, {
46
48
  meta: {
47
49
  table_of: e.tableNumber
48
50
  }
49
51
  });
50
52
  },
51
- [L, m, W]
52
- ), O = i(
53
+ [I, m, B]
54
+ ), ee = i(
53
55
  (e) => {
54
- A(_ ? P : "WHITE_T_60"), h(e.tableNumber);
56
+ A(_ ? k : "WHITE_T_60"), h(e.tableNumber);
55
57
  },
56
- [P, _]
57
- ), ee = i(() => {
58
+ [k, _]
59
+ ), te = i(() => {
58
60
  A("WHITE_T_60"), !c.tableNumber && h(null);
59
- }, [c.tableNumber]), te = i(() => {
61
+ }, [c.tableNumber]), re = i(() => {
60
62
  var n;
61
- N == null || N(), m(), f(!1), h(null);
62
- const e = (g.DISAPPEAR[1] - g.DISAPPEAR[0]) / 30;
63
- (n = T.current) == null || n.playSegments(g.DISAPPEAR, !0), H.current = setTimeout(() => {
64
- I({ stars: [], tableNumber: 0 });
63
+ g == null || g(), m(), L(!1), h(null);
64
+ const e = (C.DISAPPEAR[1] - C.DISAPPEAR[0]) / 30;
65
+ (n = T.current) == null || n.playSegments(C.DISAPPEAR, !0), H.current = setTimeout(() => {
66
+ v({ stars: [], tableNumber: 0 });
65
67
  }, e * 1e3);
66
- }, [N, m]), re = i(() => {
68
+ }, [g, m]), ie = i(() => {
67
69
  var e;
68
- (e = T.current) == null || e.playSegments(g.REVEAL, !0);
69
- }, []), ie = i((e) => {
70
+ (e = T.current) == null || e.playSegments(C.REVEAL, !0);
71
+ }, []), ne = i((e) => {
70
72
  const n = {
71
73
  sequence: 1,
72
74
  random: 2,
73
75
  advance: 3
74
76
  };
75
- A(_e[e] ?? "WHITE_T_60"), B(n[e] ?? 0);
76
- }, []), ne = i(() => {
77
- B(null), A("WHITE_T_60");
78
- }, []), l = Z(() => c, [c]), oe = Z(() => [
77
+ A(Te[e] ?? "WHITE_T_60"), D(n[e] ?? 0);
78
+ }, []), oe = i(() => {
79
+ D(null), A("WHITE_T_60");
80
+ }, []), s = z(() => c, [c]), se = z(() => [
79
81
  {
80
82
  top: 20,
81
83
  left: 10.5,
82
84
  type: "sequence",
83
- tableNumber: l.tableNumber,
84
- isStarAchieved: l.stars.includes("sequence"),
85
+ tableNumber: s.tableNumber,
86
+ isStarAchieved: s.stars.includes("sequence"),
85
87
  semicirclePosiiionTop: "-19%",
86
88
  semicirclePosiiionLeft: "-43%",
87
89
  semicircleHoverColor: "#B259004D"
@@ -90,8 +92,8 @@ const Ue = {
90
92
  top: 20,
91
93
  left: 65.5,
92
94
  type: "random",
93
- tableNumber: l.tableNumber,
94
- isStarAchieved: l.stars.includes("random"),
95
+ tableNumber: s.tableNumber,
96
+ isStarAchieved: s.stars.includes("random"),
95
97
  semicirclePosiiionTop: "-19%",
96
98
  semicirclePosiiionLeft: "65%",
97
99
  semicircleHoverColor: "#0055CC4D"
@@ -100,18 +102,18 @@ const Ue = {
100
102
  top: 66,
101
103
  left: 38,
102
104
  type: "advance",
103
- tableNumber: l.tableNumber,
104
- isStarAchieved: l.stars.includes("advance"),
105
+ tableNumber: s.tableNumber,
106
+ isStarAchieved: s.stars.includes("advance"),
105
107
  semicirclePosiiionTop: "74%",
106
108
  semicirclePosiiionLeft: "11%",
107
109
  semicircleHoverColor: "#A9099C4D"
108
110
  }
109
- ], [l.tableNumber, l.stars]), le = i(() => {
111
+ ], [s.tableNumber, s.stars]), le = i(() => {
110
112
  b({
111
113
  mode: "infinite",
112
- infiniteModeHighScore: s.infiniteModeHighScore
114
+ infiniteModeHighScore: l.infiniteModeHighScore
113
115
  });
114
- }, [b, s.infiniteModeHighScore]), se = i(
116
+ }, [b, l.infiniteModeHighScore]), ce = i(
115
117
  (e, n) => {
116
118
  b({
117
119
  mode: e,
@@ -120,77 +122,91 @@ const Ue = {
120
122
  });
121
123
  },
122
124
  [b, c.tableNumber]
123
- ), ce = i(() => v ? `${d}× LEVEL${v}` : d ? `${d}× Table` : y, [v, d, y]), ae = i((e) => {
124
- A(e), X(e), D(!0);
125
- }, []), me = i(() => D(!1), []), ue = i((e) => Q(e), []);
126
- return be(F, () => ({
127
- labelRef: k,
128
- segmentedCardWrapperRef: V,
129
- startLabelAnimation: ae,
130
- stopLabelAnimation: me,
131
- setLabelVisiblity: ue,
132
- handleTableSegmentClick: q
133
- })), z(() => () => {
125
+ ), ae = i(() => f ? `${d}× LEVEL${f}` : d ? `${d}× Table` : W, [f, d, W]), me = i((e) => {
126
+ A(e), M(e), P(!0);
127
+ }, []), ue = i(() => P(!1), []), de = i((e) => X(e), []);
128
+ return Ee(G, () => ({
129
+ labelRef: V,
130
+ segmentedCardWrapperRef: x,
131
+ startLabelAnimation: me,
132
+ stopLabelAnimation: ue,
133
+ setLabelVisiblity: de,
134
+ handleTableSegmentClick: j
135
+ })), K(() => () => {
134
136
  H.current && clearTimeout(H.current);
135
- }, []), z(() => {
136
- E && (m(), f(!0), h(E.tableNumber), I({ ...E }));
137
+ }, []), K(() => {
138
+ E && (m(), L(!0), h(E.tableNumber), v({ ...E }));
137
139
  }, [E, m]), /* @__PURE__ */ t(
138
140
  ve,
139
141
  {
140
- labelRef: k,
141
- ref: V,
142
+ labelRef: V,
143
+ ref: x,
142
144
  strokeColor: "WHITE",
143
- label: ce(),
144
- labelColor: G,
145
+ label: ae(),
146
+ labelColor: J,
145
147
  isAnimated: _,
146
- showLabel: J,
147
- children: /* @__PURE__ */ a($e, { children: [
148
- /* @__PURE__ */ a(Re, { children: [
148
+ showLabel: Q,
149
+ children: /* @__PURE__ */ a(Re, { children: [
150
+ /* @__PURE__ */ a(we, { children: [
149
151
  /* @__PURE__ */ t(
150
152
  pe,
151
153
  {
152
154
  renderAs: "primary",
153
155
  position: "top",
154
- hidden: U,
155
- tooltipItem: /* @__PURE__ */ t(K, { $renderAs: "ab3", $color: "WHITE", children: "Coming Soon" }),
156
+ hidden: q,
157
+ tooltipItem: /* @__PURE__ */ t(F, { $renderAs: "ab3", $color: "WHITE", children: "Coming Soon" }),
156
158
  children: /* @__PURE__ */ a(
157
- we,
159
+ ye,
158
160
  {
159
- onClick: U ? le : void 0,
161
+ onClick: q ? le : void 0,
160
162
  children: [
161
- /* @__PURE__ */ t(S, { children: /* @__PURE__ */ t(w, { src: R.INFINITE_BUTTON_BG }) }),
162
- /* @__PURE__ */ t(S, { children: /* @__PURE__ */ t(w, { src: R.INFINITE_BUTTON_SYMBOL }) })
163
+ /* @__PURE__ */ t(S, { children: /* @__PURE__ */ t(
164
+ w,
165
+ {
166
+ src: R.INFINITE_BUTTON_BG,
167
+ settings: y,
168
+ animateOnIntersect: !0
169
+ }
170
+ ) }),
171
+ /* @__PURE__ */ t(S, { children: /* @__PURE__ */ t(
172
+ w,
173
+ {
174
+ src: R.INFINITE_BUTTON_SYMBOL,
175
+ settings: y,
176
+ animateOnIntersect: !0
177
+ }
178
+ ) })
163
179
  ]
164
180
  }
165
181
  )
166
182
  }
167
183
  ),
168
- /* @__PURE__ */ t(ye, {}),
169
- s.tableList.map((e, n) => {
170
- const de = 360 / s.tableList.length, Y = -(90 + 360 / (2 * s.tableList.length)) + de * (n + 1);
184
+ /* @__PURE__ */ t(We, {}),
185
+ l.tableList.map((e, n) => {
186
+ const he = 360 / l.tableList.length, Z = -(90 + 360 / (2 * l.tableList.length)) + he * (n + 1);
171
187
  return /* @__PURE__ */ t(
172
- We,
188
+ Be,
173
189
  {
174
- $angle: Y,
175
- $totalSegments: s.tableList.length,
190
+ $angle: Z,
191
+ $totalSegments: l.tableList.length,
176
192
  $zIndex: n + 1,
177
- onClick: () => q(e),
178
- onMouseOver: () => O(e),
179
- onMouseLeave: ee,
180
- children: /* @__PURE__ */ a(ge, { $flexDirection: "row", $justifyContent: "center", $alignItems: "center", children: [
193
+ onClick: () => j(e),
194
+ onMouseOver: () => ee(e),
195
+ onMouseLeave: te,
196
+ children: /* @__PURE__ */ a(Se, { $flexDirection: "row", $justifyContent: "center", $alignItems: "center", children: [
181
197
  ["sequence", "random", "advance"].map(($) => /* @__PURE__ */ t(
182
- He,
198
+ $e,
183
199
  {
184
200
  isStarAchieved: e.stars.includes($),
185
- rewardStar: !u && (r == null ? void 0 : r.tableNumber) === e.tableNumber ? x.includes($) : void 0
201
+ rewardStar: !u && (r == null ? void 0 : r.tableNumber) === e.tableNumber ? U.includes($) : void 0
186
202
  },
187
203
  $
188
204
  )),
189
- /* @__PURE__ */ t(Se, { width: C * 0.055 }),
190
- /* @__PURE__ */ t(Be, { $angle: -Y, children: /* @__PURE__ */ t(
191
- K,
205
+ /* @__PURE__ */ t(Ie, { width: p * 0.055 }),
206
+ /* @__PURE__ */ t(De, { $angle: -Z, children: /* @__PURE__ */ t(
207
+ F,
192
208
  {
193
- $renderAs: C === Ie ? "ac3-black" : "ac4-black",
209
+ $renderAs: p === _e ? "ac3-black" : "ac4-black",
194
210
  $color: d === e.tableNumber ? "BLACK_1" : "WHITE",
195
211
  children: e.tableNumber
196
212
  }
@@ -201,18 +217,18 @@ const Ue = {
201
217
  );
202
218
  })
203
219
  ] }),
204
- c.tableNumber > 0 && /* @__PURE__ */ t(De, { children: /* @__PURE__ */ a(Pe, { children: [
205
- /* @__PURE__ */ a(ke, { animation: u ? "fade-in" : "fade-out", children: [
206
- oe.map((e, n) => /* @__PURE__ */ a(he.Fragment, { children: [
220
+ c.tableNumber > 0 && /* @__PURE__ */ t(Pe, { children: /* @__PURE__ */ a(ke, { children: [
221
+ /* @__PURE__ */ a(Ve, { animation: u ? "fade-in" : "fade-out", children: [
222
+ se.map((e, n) => /* @__PURE__ */ a(Ae.Fragment, { children: [
207
223
  /* @__PURE__ */ t(
208
- Ve,
224
+ xe,
209
225
  {
210
226
  $top: e.semicirclePosiiionTop,
211
227
  $left: e.semicirclePosiiionLeft,
212
228
  $hoverColor: e.semicircleHoverColor,
213
- onClick: () => u ? se(e.type, e.isStarAchieved) : void 0,
214
- onMouseOver: () => u ? ie(e.type) : void 0,
215
- onMouseLeave: u ? ne : void 0
229
+ onClick: () => u ? ce(e.type, e.isStarAchieved) : void 0,
230
+ onMouseOver: () => u ? ne(e.type) : void 0,
231
+ onMouseLeave: u ? oe : void 0
216
232
  }
217
233
  ),
218
234
  /* @__PURE__ */ t(
@@ -222,23 +238,23 @@ const Ue = {
222
238
  $left: e.left,
223
239
  $isPointerEventsNone: !0,
224
240
  children: /* @__PURE__ */ t(
225
- Te,
241
+ He,
226
242
  {
227
243
  tableNumber: e.tableNumber,
228
244
  isStarAchieved: e.isStarAchieved,
229
245
  type: e.type,
230
- rewardStar: x.includes(e.type)
246
+ rewardStar: U.includes(e.type)
231
247
  }
232
248
  )
233
249
  }
234
250
  )
235
251
  ] }, n)),
236
- /* @__PURE__ */ t(S, { $top: 50, $left: 50, $alignCenter: !0, children: /* @__PURE__ */ t(xe, { children: /* @__PURE__ */ t(
252
+ /* @__PURE__ */ t(S, { $top: 50, $left: 50, $alignCenter: !0, children: /* @__PURE__ */ t(Ue, { children: /* @__PURE__ */ t(
237
253
  Ne,
238
254
  {
239
- onClick: te,
240
- height: C * 0.1,
241
- width: C * 0.1
255
+ onClick: re,
256
+ height: p * 0.1,
257
+ width: p * 0.1
242
258
  }
243
259
  ) }) })
244
260
  ] }),
@@ -247,8 +263,9 @@ const Ue = {
247
263
  {
248
264
  src: R.TABLE_MODE_REVEAL,
249
265
  ref: T,
250
- settings: Ue,
251
- onRender: re
266
+ settings: qe,
267
+ onRender: ie,
268
+ animateOnIntersect: !0
252
269
  }
253
270
  )
254
271
  ] }) })
@@ -256,8 +273,8 @@ const Ue = {
256
273
  }
257
274
  );
258
275
  }
259
- ), st = Ee(qe);
276
+ ), ct = ge(je);
260
277
  export {
261
- st as TablesCard
278
+ ct as TablesCard
262
279
  };
263
280
  //# sourceMappingURL=tables-card.js.map