@cuemath/leap 2.9.7-hg2 → 2.9.7-hg4
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.
- package/dist/features/circle-games/games/tutorial/tutorial.js.map +1 -1
- package/dist/features/circle-games/games/web-view/web-view.js +38 -36
- package/dist/features/circle-games/games/web-view/web-view.js.map +1 -1
- package/dist/features/circle-games/leaderboard/comps/banner/banner.js.map +1 -1
- package/dist/features/circle-games/leaderboard/comps/navigation-button/navigation-button.js.map +1 -1
- package/dist/features/circle-games/sign-up/comp/circular-steps/circular-steps.js.map +1 -1
- package/dist/features/circle-games/sign-up/constants.js +9 -9
- package/dist/features/circle-games/sign-up/constants.js.map +1 -1
- package/dist/features/ui/arc-button/arc-button.js.map +1 -1
- package/package.json +1 -1
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"tutorial.js","sources":["../../../../../src/features/circle-games/games/tutorial/tutorial.tsx"],"sourcesContent":["import type { ITutorialProps } from './tutorial-types';\nimport type { ChangeEvent } from 'react';\n\nimport { useCallback, useRef, useState } from 'react';\n\nimport CrossIcon from '../../../../assets/line-icons/icons/cross';\nimport Text from '../../../ui/text/text';\nimport * as Styled from './tutorial-styled';\n\
|
1
|
+
{"version":3,"file":"tutorial.js","sources":["../../../../../src/features/circle-games/games/tutorial/tutorial.tsx"],"sourcesContent":["import type { ITutorialProps } from './tutorial-types';\nimport type { ChangeEvent } from 'react';\n\nimport { useCallback, useRef, useState } from 'react';\n\nimport CrossIcon from '../../../../assets/line-icons/icons/cross';\nimport Text from '../../../ui/text/text';\nimport * as Styled from './tutorial-styled';\n\nexport const Tutorial = ({\n src,\n title,\n onCross,\n showProgress = true,\n onTutorialPlayedOnce,\n}: ITutorialProps) => {\n const [progress, setProgress] = useState(0);\n const hasVideoEnded = useRef(false);\n\n const onProgress = useCallback(\n (e: ChangeEvent<HTMLVideoElement>) => {\n const p = ((e.target.currentTime || 0) / (e.target.duration || 1)) * 100;\n\n if (p >= 90 && !hasVideoEnded.current) {\n hasVideoEnded.current = true;\n onTutorialPlayedOnce?.();\n }\n\n setProgress(p);\n },\n [onTutorialPlayedOnce],\n );\n\n return (\n <Styled.GameTutorialWrapper>\n {(title || onCross) && (\n <Styled.GameTutorialHeader>\n {title && (\n <Text $renderAs=\"ac3\" $color=\"WHITE\" $align=\"center\">\n {title}\n </Text>\n )}\n {onCross && (\n <Styled.HeaderIconContainer>\n <CrossIcon color=\"#fff\" onClick={onCross} />\n </Styled.HeaderIconContainer>\n )}\n </Styled.GameTutorialHeader>\n )}\n\n <Styled.GameTutorialContainer>\n <Styled.VideoContainer>\n <video\n loop={true}\n autoPlay={true}\n muted={true}\n src={src}\n onTimeUpdate={onProgress}\n disablePictureInPicture={true}\n itemType=\"video/mp4\"\n playsInline\n />\n </Styled.VideoContainer>\n </Styled.GameTutorialContainer>\n\n {showProgress && (\n <Styled.VideoProgressWrapper>\n <Styled.VideoProgressContainer>\n {progress > 0 && <Styled.VideoProgress $width={progress} />}\n </Styled.VideoProgressContainer>\n </Styled.VideoProgressWrapper>\n )}\n </Styled.GameTutorialWrapper>\n );\n};\n"],"names":["Tutorial","src","title","onCross","showProgress","onTutorialPlayedOnce","progress","setProgress","useState","hasVideoEnded","useRef","onProgress","useCallback","e","p","jsxs","Styled.GameTutorialWrapper","Styled.GameTutorialHeader","jsx","Text","Styled.HeaderIconContainer","CrossIcon","Styled.GameTutorialContainer","Styled.VideoContainer","Styled.VideoProgressWrapper","Styled.VideoProgressContainer","Styled.VideoProgress"],"mappings":";;;;;AASO,MAAMA,IAAW,CAAC;AAAA,EACvB,KAAAC;AAAA,EACA,OAAAC;AAAA,EACA,SAAAC;AAAA,EACA,cAAAC,IAAe;AAAA,EACf,sBAAAC;AACF,MAAsB;AACpB,QAAM,CAACC,GAAUC,CAAW,IAAIC,EAAS,CAAC,GACpCC,IAAgBC,EAAO,EAAK,GAE5BC,IAAaC;AAAA,IACjB,CAACC,MAAqC;AAC9B,YAAAC,KAAMD,EAAE,OAAO,eAAe,MAAMA,EAAE,OAAO,YAAY,KAAM;AAErE,MAAIC,KAAK,MAAM,CAACL,EAAc,YAC5BA,EAAc,UAAU,IACDJ,KAAA,QAAAA,MAGzBE,EAAYO,CAAC;AAAA,IACf;AAAA,IACA,CAACT,CAAoB;AAAA,EAAA;AAIrB,SAAA,gBAAAU,EAACC,GAAA,EACG,UAAA;AAAA,KAAAd,KAASC,MACT,gBAAAY,EAACE,GAAA,EACE,UAAA;AAAA,MACCf,KAAA,gBAAAgB,EAACC,KAAK,WAAU,OAAM,QAAO,SAAQ,QAAO,UACzC,UACHjB,EAAA,CAAA;AAAA,MAEDC,KACE,gBAAAe,EAAAE,GAAA,EACC,UAAC,gBAAAF,EAAAG,GAAA,EAAU,OAAM,QAAO,SAASlB,EAAA,CAAS,EAC5C,CAAA;AAAA,IAAA,GAEJ;AAAA,sBAGDmB,GAAA,EACC,UAAC,gBAAAJ,EAAAK,GAAA,EACC,UAAA,gBAAAL;AAAA,MAAC;AAAA,MAAA;AAAA,QACC,MAAM;AAAA,QACN,UAAU;AAAA,QACV,OAAO;AAAA,QACP,KAAAjB;AAAA,QACA,cAAcU;AAAA,QACd,yBAAyB;AAAA,QACzB,UAAS;AAAA,QACT,aAAW;AAAA,MAAA;AAAA,OAEf,EACF,CAAA;AAAA,IAECP,KACE,gBAAAc,EAAAM,GAAA,EACC,UAAA,gBAAAN,EAACO,GAAA,EACE,UAAWnB,IAAA,uBAAMoB,GAAA,EAAqB,QAAQpB,EAAU,CAAA,EAC3D,CAAA,GACF;AAAA,EAEJ,EAAA,CAAA;AAEJ;"}
|
@@ -1,25 +1,25 @@
|
|
1
1
|
import { jsx as P } from "react/jsx-runtime";
|
2
|
-
import { forwardRef as V, useRef as G, useMemo as
|
2
|
+
import { forwardRef as V, useRef as G, useMemo as _, useCallback as v, useImperativeHandle as $, useEffect as B } from "react";
|
3
3
|
import { useUIContext as J } from "../../../ui/context/context.js";
|
4
|
-
import { ALLOWED_ORIGIN as
|
4
|
+
import { ALLOWED_ORIGIN as b } from "./constants.js";
|
5
5
|
import { ProjectType as s } from "./enums/project-type-enum.js";
|
6
6
|
import { WebViewEvent as o } from "./enums/web-view-events-enum.js";
|
7
|
-
const Z = V((
|
7
|
+
const Z = V((R, C) => {
|
8
8
|
const {
|
9
9
|
baseUrl: y,
|
10
10
|
projectDetails: T,
|
11
|
-
playerDetails:
|
11
|
+
playerDetails: E,
|
12
12
|
onGameLoad: a,
|
13
|
-
onGamePlayFinish:
|
14
|
-
handleInfoMessage:
|
13
|
+
onGamePlayFinish: p,
|
14
|
+
handleInfoMessage: c,
|
15
15
|
onBack: f,
|
16
16
|
parentDomain: g,
|
17
17
|
...L
|
18
|
-
} =
|
18
|
+
} = R, m = G(null), I = _(() => E, [E]), t = _(() => T, [T]);
|
19
19
|
let A = "";
|
20
|
-
const { onEvent:
|
20
|
+
const { onEvent: N } = J();
|
21
21
|
t.projectType === s.LESSON && (A = t.miniGameIdentifier);
|
22
|
-
const
|
22
|
+
const l = v(() => {
|
23
23
|
const { enableCloseButton: i = !0 } = t;
|
24
24
|
let e = {
|
25
25
|
enableCloseButton: i
|
@@ -38,57 +38,59 @@ const Z = V((I, b) => {
|
|
38
38
|
...t
|
39
39
|
}), e;
|
40
40
|
}, [t]), d = v(() => {
|
41
|
-
var e,
|
42
|
-
const i =
|
43
|
-
(
|
41
|
+
var e, n;
|
42
|
+
const i = l();
|
43
|
+
(n = (e = m.current) == null ? void 0 : e.contentWindow) == null || n.postMessage(
|
44
44
|
JSON.stringify({
|
45
45
|
event: o.GAME_DATA,
|
46
46
|
payload: i
|
47
47
|
}),
|
48
|
-
|
48
|
+
b
|
49
49
|
);
|
50
|
-
}, [
|
51
|
-
var e,
|
52
|
-
const i =
|
53
|
-
(
|
50
|
+
}, [l]), O = v(() => {
|
51
|
+
var e, n;
|
52
|
+
const i = l();
|
53
|
+
(n = (e = m.current) == null ? void 0 : e.contentWindow) == null || n.postMessage(
|
54
54
|
JSON.stringify({
|
55
55
|
event: o.SET_CONFIG,
|
56
56
|
payload: {
|
57
|
-
user:
|
57
|
+
user: I,
|
58
58
|
projectConfig: i,
|
59
|
-
parentDomain: g
|
59
|
+
parentDomain: g,
|
60
|
+
topInset: window.topInset || 0,
|
61
|
+
bottomInset: window.bottomInset || 0
|
60
62
|
}
|
61
63
|
}),
|
62
|
-
|
64
|
+
b
|
63
65
|
);
|
64
|
-
}, [
|
65
|
-
$(
|
66
|
+
}, [I, l, g]);
|
67
|
+
$(C, () => m.current, []), B(() => {
|
66
68
|
const i = (e) => {
|
67
|
-
var
|
68
|
-
const
|
69
|
-
if (
|
70
|
-
const { pattern: u } =
|
71
|
-
window.ReactNativeWebView ? window.ReactNativeWebView.postMessage(JSON.stringify(
|
69
|
+
var S, j;
|
70
|
+
const n = e.data, D = typeof n == "string" ? JSON.parse(n) : n, { event: r, payload: w = null } = D;
|
71
|
+
if (r === o.VIBRATE) {
|
72
|
+
const { pattern: u } = w;
|
73
|
+
window.ReactNativeWebView ? window.ReactNativeWebView.postMessage(JSON.stringify(D)) : (j = (S = window.navigator).vibrate) == null || j.call(S, u);
|
72
74
|
}
|
73
|
-
if (
|
74
|
-
const { eventName: u, properties: W } =
|
75
|
-
|
75
|
+
if (r === o.GAME_BACK && (f == null || f()), r === o.HIDE_LOADER && (a == null || a()), r === o.LOAD_DATA_FROM_APP && (d == null || d()), r === o.GET_CONFIG && O(), r === o.UPDATE_STATS && (p == null || p(w)), r === o.SHOW_SNACKBAR && (c == null || c(w)), r === o.TRACK_EVENT) {
|
76
|
+
const { eventName: u, properties: W } = w;
|
77
|
+
N(u, W);
|
76
78
|
}
|
77
79
|
};
|
78
80
|
return window.addEventListener("message", i), () => {
|
79
81
|
window.removeEventListener("message", i);
|
80
82
|
};
|
81
83
|
}, [
|
82
|
-
p,
|
83
|
-
f,
|
84
84
|
c,
|
85
|
+
f,
|
86
|
+
p,
|
85
87
|
a,
|
86
|
-
|
88
|
+
O,
|
87
89
|
d,
|
88
|
-
|
90
|
+
N
|
89
91
|
]);
|
90
|
-
const M =
|
91
|
-
return /* @__PURE__ */ P("iframe", { ...L, ref:
|
92
|
+
const M = E.isAdmin ? y : `${y}/play-game/${t.projectId}/${t.variant}${A ? `/${A}` : ""}`;
|
93
|
+
return /* @__PURE__ */ P("iframe", { ...L, ref: m, src: `${M}?version=2`, allow: "autoplay" });
|
92
94
|
});
|
93
95
|
export {
|
94
96
|
Z as WebView
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"web-view.js","sources":["../../../../../src/features/circle-games/games/web-view/web-view.tsx"],"sourcesContent":["
|
1
|
+
{"version":3,"file":"web-view.js","sources":["../../../../../src/features/circle-games/games/web-view/web-view.tsx"],"sourcesContent":["import type {\n IInfoMessage,\n ILessonWebGameProps,\n IMessageProps,\n IMultiplayerWebGameProps,\n IPlayerStats,\n IPuzzleWebGameProps,\n ITableWebGameProps,\n IVibrationPattern,\n IWebViewProps,\n} from './web-view-types';\nimport type { ForwardedRef } from 'react';\n\nimport { forwardRef, useCallback, useEffect, useImperativeHandle, useMemo, useRef } from 'react';\n\nimport { useUIContext } from '../../../ui/context/context';\nimport { ALLOWED_ORIGIN } from './constants';\nimport { ProjectType, WebViewEvent } from './enums';\n\nexport const WebView = forwardRef((props: IWebViewProps, ref: ForwardedRef<HTMLIFrameElement>) => {\n const {\n baseUrl,\n projectDetails,\n playerDetails,\n onGameLoad,\n onGamePlayFinish,\n handleInfoMessage,\n onBack,\n parentDomain,\n ...rest\n } = props;\n const webViewRef = useRef<HTMLIFrameElement>(null);\n const memoizedPlayerDetails = useMemo(() => playerDetails, [playerDetails]);\n const memoizedProjectDetails = useMemo(() => projectDetails, [projectDetails]);\n\n let miniGameIdentifier = '';\n const { onEvent: trackEvent } = useUIContext();\n\n if (memoizedProjectDetails.projectType === ProjectType.LESSON) {\n miniGameIdentifier = (memoizedProjectDetails as ILessonWebGameProps).miniGameIdentifier;\n }\n\n const getProjectDetails = useCallback(() => {\n const { enableCloseButton = true } = memoizedProjectDetails;\n\n let payload = {\n enableCloseButton,\n } as IMultiplayerWebGameProps | IPuzzleWebGameProps | ILessonWebGameProps;\n\n if (memoizedProjectDetails.projectType === ProjectType.GAME) {\n payload = {\n ...payload,\n ...memoizedProjectDetails,\n } as IMultiplayerWebGameProps;\n }\n\n if (memoizedProjectDetails.projectType === ProjectType.PUZZLE) {\n payload = {\n ...payload,\n ...memoizedProjectDetails,\n } as IPuzzleWebGameProps;\n }\n\n if (memoizedProjectDetails.projectType === ProjectType.LESSON) {\n payload = {\n ...payload,\n ...memoizedProjectDetails,\n } as ILessonWebGameProps;\n }\n\n if (memoizedProjectDetails.projectType === ProjectType.TABLE) {\n payload = {\n ...payload,\n ...memoizedProjectDetails,\n } as ITableWebGameProps;\n }\n\n return payload;\n }, [memoizedProjectDetails]);\n\n const sendGamesData = useCallback(() => {\n const payload = getProjectDetails();\n\n webViewRef.current?.contentWindow?.postMessage(\n JSON.stringify({\n event: WebViewEvent.GAME_DATA,\n payload,\n }),\n ALLOWED_ORIGIN,\n );\n }, [getProjectDetails]);\n\n const setConfig = useCallback(() => {\n const projectConfig = getProjectDetails();\n\n webViewRef.current?.contentWindow?.postMessage(\n JSON.stringify({\n event: WebViewEvent.SET_CONFIG,\n payload: {\n user: memoizedPlayerDetails,\n projectConfig,\n parentDomain,\n topInset: window.topInset || 0,\n bottomInset: window.bottomInset || 0,\n },\n }),\n ALLOWED_ORIGIN,\n );\n }, [memoizedPlayerDetails, getProjectDetails, parentDomain]);\n\n useImperativeHandle(ref, () => webViewRef.current as HTMLIFrameElement, []);\n\n useEffect(() => {\n const handleMessage = (e: MessageEvent) => {\n const data: string = e.data;\n const parsedData = typeof data === 'string' ? JSON.parse(data) : (data as IMessageProps);\n\n const { event, payload = null } = parsedData;\n\n if (event === WebViewEvent.VIBRATE) {\n const { pattern } = payload as IVibrationPattern;\n\n if (window.ReactNativeWebView) {\n window.ReactNativeWebView.postMessage(JSON.stringify(parsedData));\n } else {\n window.navigator.vibrate?.(pattern);\n }\n }\n\n if (event === WebViewEvent.GAME_BACK) {\n onBack?.();\n }\n\n if (event === WebViewEvent.HIDE_LOADER) {\n onGameLoad?.();\n }\n\n if (event === WebViewEvent.LOAD_DATA_FROM_APP) {\n sendGamesData?.();\n }\n\n if (event === WebViewEvent.GET_CONFIG) {\n setConfig();\n }\n\n if (event === WebViewEvent.UPDATE_STATS) {\n onGamePlayFinish?.(payload as IPlayerStats);\n }\n\n if (event === WebViewEvent.SHOW_SNACKBAR) {\n handleInfoMessage?.(payload as IInfoMessage);\n }\n\n if (event === WebViewEvent.TRACK_EVENT) {\n const { eventName, properties } = payload;\n\n trackEvent(eventName, properties);\n }\n };\n\n window.addEventListener('message', handleMessage);\n\n return () => {\n window.removeEventListener('message', handleMessage);\n };\n }, [\n handleInfoMessage,\n onBack,\n onGamePlayFinish,\n onGameLoad,\n setConfig,\n sendGamesData,\n trackEvent,\n ]);\n\n const url = playerDetails.isAdmin\n ? baseUrl\n : `${baseUrl}/play-game/${memoizedProjectDetails.projectId}/${memoizedProjectDetails.variant}${\n miniGameIdentifier ? `/${miniGameIdentifier}` : ''\n }`;\n\n return <iframe {...rest} ref={webViewRef} src={`${url}?version=2`} allow=\"autoplay\" />;\n});\n"],"names":["WebView","forwardRef","props","ref","baseUrl","projectDetails","playerDetails","onGameLoad","onGamePlayFinish","handleInfoMessage","onBack","parentDomain","rest","webViewRef","useRef","memoizedPlayerDetails","useMemo","memoizedProjectDetails","miniGameIdentifier","trackEvent","useUIContext","ProjectType","getProjectDetails","useCallback","enableCloseButton","payload","sendGamesData","_b","_a","WebViewEvent","ALLOWED_ORIGIN","setConfig","projectConfig","useImperativeHandle","useEffect","handleMessage","data","parsedData","event","pattern","eventName","properties","url","jsx"],"mappings":";;;;;;AAmBO,MAAMA,IAAUC,EAAW,CAACC,GAAsBC,MAAyC;AAC1F,QAAA;AAAA,IACJ,SAAAC;AAAA,IACA,gBAAAC;AAAA,IACA,eAAAC;AAAA,IACA,YA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AWC,CAAU;AAAA,MAClC;AAAA,IAAA;AAGK,kBAAA,iBAAiB,WAAWN,CAAa,GAEzC,MAAM;AACJ,aAAA,oBAAoB,WAAWA,CAAa;AAAA,IAAA;AAAA,EACrD,GACC;AAAA,IACD1B;AAAA,IACAC;AAAA,IACAF;AAAA,IACAD;AAAA,IACAwB;AAAA,IACAL;AAAA,IACAP;AAAA,EAAA,CACD;AAED,QAAMuB,IAAMpC,EAAc,UACtBF,IACA,GAAGA,CAAO,cAAca,EAAuB,SAAS,IAAIA,EAAuB,OAAO,GACxFC,IAAqB,IAAIA,CAAkB,KAAK,EAClD;AAEG,SAAA,gBAAAyB,EAAC,UAAQ,EAAA,GAAG/B,GAAM,KAAKC,GAAY,KAAK,GAAG6B,CAAG,cAAc,OAAM,WAAW,CAAA;AACtF,CAAC;"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"banner.js","sources":["../../../../../../src/features/circle-games/leaderboard/comps/banner/banner.tsx"],"sourcesContent":["import type { IBannerProps } from './banner-types';\nimport type { FC } from 'react';\n\nimport { memo } from 'react';\n\nimport LottieAnimation from '../../../../ui/lottie-animation/lottie-animation';\nimport Separator from '../../../../ui/separator/separator';\nimport Text from '../../../../ui/text/text';\nimport * as Styled from './banner-styled';\n\
|
1
|
+
{"version":3,"file":"banner.js","sources":["../../../../../../src/features/circle-games/leaderboard/comps/banner/banner.tsx"],"sourcesContent":["import type { IBannerProps } from './banner-types';\nimport type { FC } from 'react';\n\nimport { memo } from 'react';\n\nimport LottieAnimation from '../../../../ui/lottie-animation/lottie-animation';\nimport Separator from '../../../../ui/separator/separator';\nimport Text from '../../../../ui/text/text';\nimport * as Styled from './banner-styled';\n\nconst animationSettings = { renderer: 'canvas' };\n\nexport const Banner: FC<IBannerProps> = memo(\n ({\n primaryText,\n secondaryText,\n topInset = window.topInset || 0,\n isLoading = false,\n lottiePath,\n bgFromTopPosition = 0,\n bgFromRightPosition = 0,\n custEle,\n }) => (\n <Styled.BannerContainer topInset={topInset}>\n <Styled.CircleLottieView\n topInset={topInset}\n bgFromTopPosition={bgFromTopPosition}\n bgFromRightPosition={bgFromRightPosition}\n >\n <LottieAnimation src={lottiePath} settings={animationSettings} />\n </Styled.CircleLottieView>\n\n <Styled.BannerTextContainer>\n <Styled.CountTextWrapper topInset={topInset}>\n <Text $renderAs=\"ac4\" $color=\"WHITE\">\n {primaryText}\n </Text>\n <Separator height={4} />\n <Text $renderAs=\"ah4\" $color=\"WHITE\">\n {isLoading ? '__' : secondaryText}\n </Text>\n </Styled.CountTextWrapper>\n\n {custEle}\n </Styled.BannerTextContainer>\n </Styled.BannerContainer>\n ),\n);\n"],"names":["animationSettings","Banner","memo","primaryText","secondaryText","topInset","isLoading","lottiePath","bgFromTopPosition","bgFromRightPosition","custEle","jsxs","Styled.BannerContainer","jsx","Styled.CircleLottieView","LottieAnimation","Styled.BannerTextContainer","Styled.CountTextWrapper","Text","Separator"],"mappings":";;;;;;AAUA,MAAMA,IAAoB,EAAE,UAAU,YAEzBC,IAA2BC;AAAA,EACtC,CAAC;AAAA,IACC,aAAAC;AAAA,IACA,eAAAC;AAAA,IACA,UAAAC,IAAW,OAAO,YAAY;AAAA,IAC9B,WAAAC,IAAY;AAAA,IACZ,YAAAC;AAAA,IACA,mBAAAC,IAAoB;AAAA,IACpB,qBAAAC,IAAsB;AAAA,IACtB,SAAAC;AAAA,EAEA,MAAA,gBAAAC,EAACC,GAAA,EAAuB,UAAAP,GACtB,UAAA;AAAA,IAAA,gBAAAQ;AAAA,MAACC;AAAAA,MAAA;AAAA,QACC,UAAAT;AAAA,QACA,mBAAAG;AAAA,QACA,qBAAAC;AAAA,QAEA,UAAC,gBAAAI,EAAAE,GAAA,EAAgB,KAAKR,GAAY,UAAUP,GAAmB;AAAA,MAAA;AAAA,IACjE;AAAA,IAEA,gBAAAW,EAACK,GAAA,EACC,UAAA;AAAA,MAAC,gBAAAL,EAAAM,GAAA,EAAwB,UAAAZ,GACvB,UAAA;AAAA,QAAA,gBAAAQ,EAACK,GAAK,EAAA,WAAU,OAAM,QAAO,SAC1B,UACHf,GAAA;AAAA,QACA,gBAAAU,EAACM,GAAU,EAAA,QAAQ,EAAG,CAAA;AAAA,QACtB,gBAAAN,EAACK,KAAK,WAAU,OAAM,QAAO,SAC1B,UAAAZ,IAAY,OAAOF,EACtB,CAAA;AAAA,MAAA,GACF;AAAA,MAECM;AAAA,IAAA,GACH;AAAA,EAAA,GACF;AAEJ;"}
|
package/dist/features/circle-games/leaderboard/comps/navigation-button/navigation-button.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"navigation-button.js","sources":["../../../../../../src/features/circle-games/leaderboard/comps/navigation-button/navigation-button.tsx"],"sourcesContent":["import type { INavigationButtonProps } from './navigation-button-types';\n\nimport React, { memo } from 'react';\n\nimport CrossIcon from '../../../../../assets/line-icons/icons/cross';\nimport LeftIcon from '../../../../../assets/line-icons/icons/left';\nimport RightIcon from '../../../../../assets/line-icons/icons/right';\nimport { ArcButton } from '../../../../ui/arc-button/arc-button';\nimport IconButton from '../../../../ui/buttons/icon-button/icon-button';\nimport { LEADERBOARD_ANALYTICS_EVENTS } from '../../leaderboard-analytics-events';\nimport * as Styled from './navigation-button-styled';\n\
|
1
|
+
{"version":3,"file":"navigation-button.js","sources":["../../../../../../src/features/circle-games/leaderboard/comps/navigation-button/navigation-button.tsx"],"sourcesContent":["import type { INavigationButtonProps } from './navigation-button-types';\n\nimport React, { memo } from 'react';\n\nimport CrossIcon from '../../../../../assets/line-icons/icons/cross';\nimport LeftIcon from '../../../../../assets/line-icons/icons/left';\nimport RightIcon from '../../../../../assets/line-icons/icons/right';\nimport { ArcButton } from '../../../../ui/arc-button/arc-button';\nimport IconButton from '../../../../ui/buttons/icon-button/icon-button';\nimport { LEADERBOARD_ANALYTICS_EVENTS } from '../../leaderboard-analytics-events';\nimport * as Styled from './navigation-button-styled';\n\nexport const NavigationButton: React.FC<INavigationButtonProps> = memo(\n ({ labels, onLeftClick, onRightClick, currIndex, onClose, disableSwipe }) => {\n return (\n <Styled.NavigationActionWrapper>\n <Styled.ExtendedIconButton align=\"left\">\n <IconButton\n Icon={LeftIcon}\n size=\"small\"\n onClick={onLeftClick}\n renderAs=\"secondary\"\n analyticsLabel={LEADERBOARD_ANALYTICS_EVENTS.PREV_ON_LEADERBOARD}\n disabled={disableSwipe || currIndex === 0}\n />\n </Styled.ExtendedIconButton>\n {/* Right Navigation IconButton */}\n <Styled.ExtendedIconButton align=\"right\">\n <IconButton\n Icon={RightIcon}\n size=\"small\"\n onClick={onRightClick}\n renderAs=\"secondary\"\n analyticsLabel={LEADERBOARD_ANALYTICS_EVENTS.NEXT_ON_LEADERBOARD}\n disabled={disableSwipe || currIndex === labels.length - 1}\n />\n </Styled.ExtendedIconButton>\n\n <ArcButton\n renderAs=\"primary\"\n onClick={onClose}\n analyticsLabel={LEADERBOARD_ANALYTICS_EVENTS.LEADERBOARD_CLOSED}\n >\n {/* Left Navigation IconButton */}\n <CrossIcon color=\"WHITE\" />\n </ArcButton>\n </Styled.NavigationActionWrapper>\n );\n },\n);\n"],"names":["NavigationButton","memo","labels","onLeftClick","onRightClick","currIndex","onClose","disableSwipe","jsxs","Styled.NavigationActionWrapper","jsx","Styled.ExtendedIconButton","IconButton","LeftIcon","LEADERBOARD_ANALYTICS_EVENTS","RightIcon","ArcButton","CrossIcon"],"mappings":";;;;;;;;;AAYO,MAAMA,IAAqDC;AAAA,EAChE,CAAC,EAAE,QAAAC,GAAQ,aAAAC,GAAa,cAAAC,GAAc,WAAAC,GAAW,SAAAC,GAAS,cAAAC,QAEtD,gBAAAC,EAACC,GAAA,EACC,UAAA;AAAA,IAAA,gBAAAC,EAACC,GAAA,EAA0B,OAAM,QAC/B,UAAA,gBAAAD;AAAA,MAACE;AAAA,MAAA;AAAA,QACC,MAAMC;AAAA,QACN,MAAK;AAAA,QACL,SAASV;AAAA,QACT,UAAS;AAAA,QACT,gBAAgBW,EAA6B;AAAA,QAC7C,UAAUP,KAAgBF,MAAc;AAAA,MAAA;AAAA,IAAA,GAE5C;AAAA,IAEC,gBAAAK,EAAAC,GAAA,EAA0B,OAAM,SAC/B,UAAA,gBAAAD;AAAA,MAACE;AAAA,MAAA;AAAA,QACC,MAAMG;AAAA,QACN,MAAK;AAAA,QACL,SAASX;AAAA,QACT,UAAS;AAAA,QACT,gBAAgBU,EAA6B;AAAA,QAC7C,UAAUP,KAAgBF,MAAcH,EAAO,SAAS;AAAA,MAAA;AAAA,IAAA,GAE5D;AAAA,IAEA,gBAAAQ;AAAA,MAACM;AAAA,MAAA;AAAA,QACC,UAAS;AAAA,QACT,SAASV;AAAA,QACT,gBAAgBQ,EAA6B;AAAA,QAG7C,UAAA,gBAAAJ,EAACO,GAAU,EAAA,OAAM,QAAQ,CAAA;AAAA,MAAA;AAAA,IAC3B;AAAA,EACF,EAAA,CAAA;AAGN;"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"circular-steps.js","sources":["../../../../../../src/features/circle-games/sign-up/comp/circular-steps/circular-steps.tsx"],"sourcesContent":["import type { ILottieAnimationRef } from '../../../../ui/lottie-animation/types';\nimport type { ICircularStepsProps } from './circular-steps-types';\nimport type { FC } from 'react';\n\nimport { useCallback, useRef } from 'react';\n\nimport CircleBackIcon from '../../../../../assets/line-icons/icons/circle-back';\nimport { LOTTIE } from '../../../../../assets/lottie/lottie';\nimport LottieAnimation from '../../../../ui/lottie-animation/lottie-animation';\nimport Text from '../../../../ui/text/text';\nimport * as Styled from './circular-steps-styled';\nimport { TOTAL_FRAMES } from './constants';\n\
|
1
|
+
{"version":3,"file":"circular-steps.js","sources":["../../../../../../src/features/circle-games/sign-up/comp/circular-steps/circular-steps.tsx"],"sourcesContent":["import type { ILottieAnimationRef } from '../../../../ui/lottie-animation/types';\nimport type { ICircularStepsProps } from './circular-steps-types';\nimport type { FC } from 'react';\n\nimport { useCallback, useRef } from 'react';\n\nimport CircleBackIcon from '../../../../../assets/line-icons/icons/circle-back';\nimport { LOTTIE } from '../../../../../assets/lottie/lottie';\nimport LottieAnimation from '../../../../ui/lottie-animation/lottie-animation';\nimport Text from '../../../../ui/text/text';\nimport * as Styled from './circular-steps-styled';\nimport { TOTAL_FRAMES } from './constants';\n\nexport const BackgroundImage = ({ img }: { img: React.ReactNode }) => {\n return <Styled.BackgroundImage>{img}</Styled.BackgroundImage>;\n};\n\nconst animationSettings = {\n autoplay: false,\n loop: false,\n renderer: 'canvas',\n};\n\nexport const CircularSteps: FC<ICircularStepsProps> = ({ steps, currentStepIndex, dimensions }) => {\n const { width, height } = dimensions;\n\n const step = steps[currentStepIndex];\n const animationRef = useRef<ILottieAnimationRef | null>(null);\n const previousStepIndex = useRef<number>(-1);\n\n const handleBack = () => {\n steps[currentStepIndex]?.onBack?.();\n };\n\n const onLottieRender = useCallback(() => {\n if (animationRef.current && step?.isProgressAnimationRequired) {\n const actualSteps = steps.filter(_step => _step.isProgressAnimationRequired);\n const stepSize = TOTAL_FRAMES / actualSteps.length;\n\n const validPreviousIndex = previousStepIndex.current >= 0 ? previousStepIndex.current : 0;\n\n const fromFrame = Math.round(validPreviousIndex * stepSize + 1);\n const toFrame = Math.round(currentStepIndex * stepSize);\n\n previousStepIndex.current = currentStepIndex;\n animationRef.current.playSegments([fromFrame, toFrame], true);\n }\n }, [currentStepIndex, step?.isProgressAnimationRequired, steps]);\n\n return (\n <>\n {step ? (\n <Styled.ScreenWrapper width={width} height={height}>\n {step.onBack ? (\n <Styled.TransparentIconButton>\n <CircleBackIcon onClick={handleBack} />\n </Styled.TransparentIconButton>\n ) : null}\n {step.background ? <BackgroundImage img={step.background} /> : null}\n <Styled.CircularStepsContainer>\n <Styled.CircularStepsWrapper>\n {step.custEle ? (\n <Styled.CustEleContainer>{step.custEle}</Styled.CustEleContainer>\n ) : null}\n\n {/*circular data container*/}\n {step.custEleInsideStep ? (\n <Styled.CircularProgressContainer width={width} height={height}>\n {step.isProgressAnimationRequired ? (\n <Styled.CircularProgress>\n <LottieAnimation\n ref={animationRef}\n src={LOTTIE.LEVELUP_RINGS}\n settings={animationSettings}\n onRender={onLottieRender}\n />\n </Styled.CircularProgress>\n ) : null}\n\n {step.label ? (\n <Styled.Label>\n <Text $renderAs=\"ab2\" $color=\"WHITE\">\n {step.label}\n </Text>\n </Styled.Label>\n ) : null}\n {step.custEleInsideStep}\n </Styled.CircularProgressContainer>\n ) : null}\n </Styled.CircularStepsWrapper>\n </Styled.CircularStepsContainer>\n {/* custom data container below circle */}\n {step.custEleBelowStep ? (\n <Styled.CustomDataContainer>{step.custEleBelowStep}</Styled.CustomDataContainer>\n ) : null}\n </Styled.ScreenWrapper>\n ) : null}\n </>\n );\n};\n"],"names":["BackgroundImage","img","jsx","Styled.BackgroundImage","animationSettings","CircularSteps","steps","currentStepIndex","dimensions","width","height","step","animationRef","useRef","previousStepIndex","handleBack","_b","_a","onLottieRender","useCallback","actualSteps","_step","stepSize","TOTAL_FRAMES","validPreviousIndex","fromFrame","toFrame","jsxs","Styled.ScreenWrapper","Styled.TransparentIconButton","CircleBackIcon","Styled.CircularStepsContainer","Styled.CircularStepsWrapper","Styled.CustEleContainer","Styled.CircularProgressContainer","Styled.CircularProgress","LottieAnimation","LOTTIE","Styled.Label","Text","Styled.CustomDataContainer"],"mappings":";;;;;;;;AAaO,MAAMA,IAAkB,CAAC,EAAE,KAAAC,QACxB,gBAAAC,EAAAC,GAAA,EAAwB,UAAIF,EAAA,CAAA,GAGhCG,IAAoB;AAAA,EACxB,UAAU;AAAA,EACV,MAAM;AAAA,EACN,UAAU;AACZ,GAEaC,IAAyC,CAAC,EAAE,OAAAC,GAAO,kBAAAC,GAAkB,YAAAC,QAAiB;AAC3F,QAAA,EAAE,OAAAC,GAAO,QAAAC,EAAW,IAAAF,GAEpBG,IAAOL,EAAMC,CAAgB,GAC7BK,IAAeC,EAAmC,IAAI,GACtDC,IAAoBD,EAAe,EAAE,GAErCE,IAAa,MAAM;;AACjB,KAAAC,KAAAC,IAAAX,EAAAC,CAAgB,MAAhB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AA,UAAA;AAAA,WAEd,IACE;AAAA,QAEHP,EAAK,QACH,gBAAAT,EAAAoC,GAAA,EACC,UAAA,gBAAApC,EAACqC,GAAK,EAAA,WAAU,OAAM,QAAO,SAC1B,UAAK5B,EAAA,MACR,CAAA,EACF,CAAA,IACE;AAAA,QACHA,EAAK;AAAA,MAAA,EAAA,CACR,IACE;AAAA,IAAA,EAAA,CACN,EACF,CAAA;AAAA,IAECA,EAAK,mBACH,gBAAAT,EAAAsC,GAAA,EAA4B,UAAA7B,EAAK,iBAAiB,CAAA,IACjD;AAAA,EAAA,GACN,IACE,KACN,CAAA;AAEJ;"}
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { State as e } from "./sign-up-types.js";
|
2
|
-
const
|
2
|
+
const a = [e.ACTIVE, e.PAUSED, e.PAID], i = [e.TRIAL, e.DEMO], o = [
|
3
3
|
{ label: "2", key: "2", sup: "nd" },
|
4
4
|
{ label: "3", key: "3", sup: "rd" },
|
5
5
|
{ label: "4", key: "4", sup: "th" },
|
@@ -11,14 +11,14 @@ const n = [e.ACTIVE, e.PAUSED, e.PAID], o = [e.TRIAL, e.DEMO], p = [
|
|
11
11
|
{ label: "10", key: "10", sup: "th" },
|
12
12
|
{ label: "11", key: "11", sup: "th" },
|
13
13
|
{ label: "12", key: "12", sup: "th" }
|
14
|
-
],
|
14
|
+
], s = 440, t = 640, l = window.innerHeight / t, h = window.ReactNativeWebView ? window.innerHeight : Math.min(t * l, t), b = window.ReactNativeWebView ? window.innerWidth : Math.min(s * l, s);
|
15
15
|
export {
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
16
|
+
t as ACTUAL_HEIGHT,
|
17
|
+
s as ACTUAL_WIDTH,
|
18
|
+
h as CONTAINER_HEIGHT,
|
19
|
+
b as CONTAINER_WIDTH,
|
20
|
+
o as GRADES,
|
21
|
+
a as userIsEnrolledCases,
|
22
|
+
i as userIsOnTrialCases
|
23
23
|
};
|
24
24
|
//# sourceMappingURL=constants.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"constants.js","sources":["../../../../src/features/circle-games/sign-up/constants.ts"],"sourcesContent":["import type { Grade } from './comp/grade-input/grade-input-types';\n\nimport { State } from './sign-up-types';\n\nexport const userIsEnrolledCases = [State.ACTIVE, State.PAUSED, State.PAID];\nexport const userIsOnTrialCases = [State.TRIAL, State.DEMO];\n\nexport const GRADES: Grade[] = [\n { label: '2', key: '2', sup: 'nd' },\n { label: '3', key: '3', sup: 'rd' },\n { label: '4', key: '4', sup: 'th' },\n { label: '5', key: '5', sup: 'th' },\n { label: '6', key: '6', sup: 'th' },\n { label: '7', key: '7', sup: 'th' },\n { label: '8', key: '8', sup: 'th' },\n { label: '9', key: '9', sup: 'th' },\n { label: '10', key: '10', sup: 'th' },\n { label: '11', key: '11', sup: 'th' },\n { label: '12', key: '12', sup: 'th' },\n];\n\nexport const MIN_HEIGHT_TO_SUPPORT = 540;\nexport const ACTUAL_WIDTH = 440;\nexport const ACTUAL_HEIGHT = 640;\n\nconst ratio = window.innerHeight / ACTUAL_HEIGHT;\n\nexport const CONTAINER_HEIGHT = Math.min(ACTUAL_HEIGHT * ratio, ACTUAL_HEIGHT);\nexport const CONTAINER_WIDTH = Math.min(ACTUAL_WIDTH * ratio, ACTUAL_WIDTH);\n"],"names":["userIsEnrolledCases","State","userIsOnTrialCases","GRADES","ACTUAL_WIDTH","ACTUAL_HEIGHT","ratio","CONTAINER_HEIGHT","CONTAINER_WIDTH"],"mappings":";AAIO,MAAMA,IAAsB,CAACC,EAAM,QAAQA,EAAM,QAAQA,EAAM,IAAI,GAC7DC,IAAqB,CAACD,EAAM,OAAOA,EAAM,IAAI,GAE7CE,IAAkB;AAAA,EAC7B,EAAE,OAAO,KAAK,KAAK,KAAK,KAAK,KAAK;AAAA,EAClC,EAAE,OAAO,KAAK,KAAK,KAAK,KAAK,KAAK;AAAA,EAClC,EAAE,OAAO,KAAK,KAAK,KAAK,KAAK,KAAK;AAAA,EAClC,EAAE,OAAO,KAAK,KAAK,KAAK,KAAK,KAAK;AAAA,EAClC,EAAE,OAAO,KAAK,KAAK,KAAK,KAAK,KAAK;AAAA,EAClC,EAAE,OAAO,KAAK,KAAK,KAAK,KAAK,KAAK;AAAA,EAClC,EAAE,OAAO,KAAK,KAAK,KAAK,KAAK,KAAK;AAAA,EAClC,EAAE,OAAO,KAAK,KAAK,KAAK,KAAK,KAAK;AAAA,EAClC,EAAE,OAAO,MAAM,KAAK,MAAM,KAAK,KAAK;AAAA,EACpC,EAAE,OAAO,MAAM,KAAK,MAAM,KAAK,KAAK;AAAA,EACpC,EAAE,OAAO,MAAM,KAAK,MAAM,KAAK,KAAK;AACtC,GAGaC,IAAe,KACfC,IAAgB,KAEvBC,IAAQ,OAAO,cAAcD,GAEtBE,IAAmB,KAAK,IAAIF,IAAgBC,GAAOD,CAAa,
|
1
|
+
{"version":3,"file":"constants.js","sources":["../../../../src/features/circle-games/sign-up/constants.ts"],"sourcesContent":["import type { Grade } from './comp/grade-input/grade-input-types';\n\nimport { State } from './sign-up-types';\n\nexport const userIsEnrolledCases = [State.ACTIVE, State.PAUSED, State.PAID];\nexport const userIsOnTrialCases = [State.TRIAL, State.DEMO];\n\nexport const GRADES: Grade[] = [\n { label: '2', key: '2', sup: 'nd' },\n { label: '3', key: '3', sup: 'rd' },\n { label: '4', key: '4', sup: 'th' },\n { label: '5', key: '5', sup: 'th' },\n { label: '6', key: '6', sup: 'th' },\n { label: '7', key: '7', sup: 'th' },\n { label: '8', key: '8', sup: 'th' },\n { label: '9', key: '9', sup: 'th' },\n { label: '10', key: '10', sup: 'th' },\n { label: '11', key: '11', sup: 'th' },\n { label: '12', key: '12', sup: 'th' },\n];\n\nexport const MIN_HEIGHT_TO_SUPPORT = 540;\nexport const ACTUAL_WIDTH = 440;\nexport const ACTUAL_HEIGHT = 640;\n\nconst ratio = window.innerHeight / ACTUAL_HEIGHT;\n\nexport const CONTAINER_HEIGHT = window.ReactNativeWebView\n ? window.innerHeight\n : Math.min(ACTUAL_HEIGHT * ratio, ACTUAL_HEIGHT);\nexport const CONTAINER_WIDTH = window.ReactNativeWebView\n ? window.innerWidth\n : Math.min(ACTUAL_WIDTH * ratio, ACTUAL_WIDTH);\n"],"names":["userIsEnrolledCases","State","userIsOnTrialCases","GRADES","ACTUAL_WIDTH","ACTUAL_HEIGHT","ratio","CONTAINER_HEIGHT","CONTAINER_WIDTH"],"mappings":";AAIO,MAAMA,IAAsB,CAACC,EAAM,QAAQA,EAAM,QAAQA,EAAM,IAAI,GAC7DC,IAAqB,CAACD,EAAM,OAAOA,EAAM,IAAI,GAE7CE,IAAkB;AAAA,EAC7B,EAAE,OAAO,KAAK,KAAK,KAAK,KAAK,KAAK;AAAA,EAClC,EAAE,OAAO,KAAK,KAAK,KAAK,KAAK,KAAK;AAAA,EAClC,EAAE,OAAO,KAAK,KAAK,KAAK,KAAK,KAAK;AAAA,EAClC,EAAE,OAAO,KAAK,KAAK,KAAK,KAAK,KAAK;AAAA,EAClC,EAAE,OAAO,KAAK,KAAK,KAAK,KAAK,KAAK;AAAA,EAClC,EAAE,OAAO,KAAK,KAAK,KAAK,KAAK,KAAK;AAAA,EAClC,EAAE,OAAO,KAAK,KAAK,KAAK,KAAK,KAAK;AAAA,EAClC,EAAE,OAAO,KAAK,KAAK,KAAK,KAAK,KAAK;AAAA,EAClC,EAAE,OAAO,MAAM,KAAK,MAAM,KAAK,KAAK;AAAA,EACpC,EAAE,OAAO,MAAM,KAAK,MAAM,KAAK,KAAK;AAAA,EACpC,EAAE,OAAO,MAAM,KAAK,MAAM,KAAK,KAAK;AACtC,GAGaC,IAAe,KACfC,IAAgB,KAEvBC,IAAQ,OAAO,cAAcD,GAEtBE,IAAmB,OAAO,qBACnC,OAAO,cACP,KAAK,IAAIF,IAAgBC,GAAOD,CAAa,GACpCG,IAAkB,OAAO,qBAClC,OAAO,aACP,KAAK,IAAIJ,IAAeE,GAAOF,CAAY;"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"arc-button.js","sources":["../../../../src/features/ui/arc-button/arc-button.tsx"],"sourcesContent":["import type { IArcButtonProps } from './arc-button-types';\nimport type { PropsWithChildren } from 'react';\n\nimport { memo, forwardRef, useCallback, useImperativeHandle, useRef } from 'react';\n\nimport { useCircleSounds } from '../../circle-games/hooks/use-circle-sounds/use-circle-sounds';\nimport useClickHandler from '../hooks/use-click-handler';\nimport * as Styled from './arc-button-styled';\n\
|
1
|
+
{"version":3,"file":"arc-button.js","sources":["../../../../src/features/ui/arc-button/arc-button.tsx"],"sourcesContent":["import type { IArcButtonProps } from './arc-button-types';\nimport type { PropsWithChildren } from 'react';\n\nimport { memo, forwardRef, useCallback, useImperativeHandle, useRef } from 'react';\n\nimport { useCircleSounds } from '../../circle-games/hooks/use-circle-sounds/use-circle-sounds';\nimport useClickHandler from '../hooks/use-click-handler';\nimport * as Styled from './arc-button-styled';\n\nexport const ArcButton = memo(\n forwardRef<HTMLDivElement, PropsWithChildren<IArcButtonProps>>(\n (\n { onClick, renderAs = 'primary', children, analyticsLabel, analyticsProps, disabled },\n ref,\n ) => {\n const { playButtonSound } = useCircleSounds();\n const { handleClick } = useClickHandler({ analyticsLabel, analyticsProps }, onClick);\n\n const buttonRef = useRef<HTMLDivElement>(null);\n\n useImperativeHandle(ref, () => buttonRef.current!, [buttonRef]);\n\n const handleOnClick = useCallback(() => {\n playButtonSound();\n handleClick();\n }, [playButtonSound, handleClick]);\n\n return (\n <Styled.ButtonWrapper>\n <Styled.ButtonShape\n ref={buttonRef}\n $renderAs={renderAs}\n onClick={!disabled ? handleOnClick : undefined}\n />\n <Styled.ButtonContentContainer>\n <Styled.ButtonLabelWrapper>{children}</Styled.ButtonLabelWrapper>\n </Styled.ButtonContentContainer>\n </Styled.ButtonWrapper>\n );\n },\n ),\n);\n"],"names":["ArcButton","memo","forwardRef","onClick","renderAs","children","analyticsLabel","analyticsProps","disabled","ref","playButtonSound","useCircleSounds","handleClick","useClickHandler","buttonRef","useRef","useImperativeHandle","handleOnClick","useCallback","jsxs","Styled.ButtonWrapper","jsx","Styled.ButtonShape","Styled.ButtonContentContainer","Styled.ButtonLabelWrapper"],"mappings":";;;;;AASO,MAAMA,IAAYC;AAAA,EACvBC;AAAA,IACE,CACE,EAAE,SAAAC,GAAS,UAAAC,IAAW,WAAW,UAAAC,GAAU,gBAAAC,GAAgB,gBAAAC,GAAgB,UAAAC,EAAS,GACpFC,MACG;AACG,YAAA,EAAE,iBAAAC,MAAoBC,KACtB,EAAE,aAAAC,MAAgBC,EAAgB,EAAE,gBAAAP,GAAgB,gBAAAC,EAAA,GAAkBJ,CAAO,GAE7EW,IAAYC,EAAuB,IAAI;AAE7C,MAAAC,EAAoBP,GAAK,MAAMK,EAAU,SAAU,CAACA,CAAS,CAAC;AAExD,YAAAG,IAAgBC,EAAY,MAAM;AACtB,QAAAR,KACJE;MAAA,GACX,CAACF,GAAiBE,CAAW,CAAC;AAG/B,aAAA,gBAAAO,EAACC,GAAA,EACC,UAAA;AAAA,QAAA,gBAAAC;AAAA,UAACC;AAAAA,UAAA;AAAA,YACC,KAAKR;AAAA,YACL,WAAWV;AAAA,YACX,SAAUI,IAA2B,SAAhBS;AAAA,UAAgB;AAAA,QACvC;AAAA,QACA,gBAAAI,EAACE,GAAA,EACC,4BAACC,GAAA,EAA2B,UAAAnB,EAAS,CAAA,GACvC;AAAA,MACF,EAAA,CAAA;AAAA,IAEJ;AAAA,EACF;AACF;"}
|