@cuemath/leap 3.5.17-as2 → 3.5.17-as3
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/timeline/comps/accordion-item/accordian-item-styled.js +26 -0
- package/dist/features/timeline/comps/accordion-item/accordian-item-styled.js.map +1 -0
- package/dist/features/timeline/comps/accordion-item/accordion-item.js +52 -41
- package/dist/features/timeline/comps/accordion-item/accordion-item.js.map +1 -1
- package/dist/features/ui/buttons/text-button/text-button-styled.js +9 -11
- package/dist/features/ui/buttons/text-button/text-button-styled.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import r from "styled-components";
|
|
2
|
+
import c from "../../../ui/text/text.js";
|
|
3
|
+
import { ClickableWrapper as d } from "../../../ui/buttons/clickable/clickable-styled.js";
|
|
4
|
+
const p = r(c)(({ theme: e, $buttonSize: n }) => {
|
|
5
|
+
const { textButton: i } = e, { underlineHeight: t, underlineOffset: o } = i.sizes[n];
|
|
6
|
+
return `
|
|
7
|
+
text-decoration: underline;
|
|
8
|
+
text-decoration-thickness: ${t}px;
|
|
9
|
+
text-underline-offset: ${o}px;
|
|
10
|
+
|
|
11
|
+
&:active {
|
|
12
|
+
text-decoration: underline;
|
|
13
|
+
text-decoration-thickness: ${t}px;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
${d}[aria-disabled='true'] & {
|
|
17
|
+
text-decoration: underline;
|
|
18
|
+
text-decoration-thickness: ${t}px;
|
|
19
|
+
opacity: 0.5;
|
|
20
|
+
}
|
|
21
|
+
`;
|
|
22
|
+
});
|
|
23
|
+
export {
|
|
24
|
+
p as Text
|
|
25
|
+
};
|
|
26
|
+
//# sourceMappingURL=accordian-item-styled.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"accordian-item-styled.js","sources":["../../../../../src/features/timeline/comps/accordion-item/accordian-item-styled.tsx"],"sourcesContent":["import styled from 'styled-components';\n\nimport UIText from '../../../ui/text/text';\nimport { type ITextButtonProps } from '../../../ui/buttons/text-button/text-button-types';\nimport { ClickableWrapper } from '../../../ui/buttons/clickable/clickable-styled';\n\ninterface IStyledTextProps {\n $buttonSize: NonNullable<ITextButtonProps['size']>;\n}\n\nexport const Text = styled(UIText)<IStyledTextProps>(({ theme, $buttonSize }) => {\n const { textButton } = theme;\n const { underlineHeight, underlineOffset } = textButton.sizes[$buttonSize];\n\n return `\n text-decoration: underline;\n text-decoration-thickness: ${underlineHeight}px;\n text-underline-offset: ${underlineOffset}px;\n\n &:active {\n text-decoration: underline;\n text-decoration-thickness: ${underlineHeight}px;\n }\n\n ${ClickableWrapper}[aria-disabled='true'] & {\n text-decoration: underline;\n text-decoration-thickness: ${underlineHeight}px;\n opacity: 0.5;\n }\n `;\n});\n"],"names":["Text","styled","UIText","theme","$buttonSize","textButton","underlineHeight","underlineOffset","ClickableWrapper"],"mappings":";;;AAUa,MAAAA,IAAOC,EAAOC,CAAM,EAAoB,CAAC,EAAE,OAAAC,GAAO,aAAAC,QAAkB;AACzE,QAAA,EAAE,YAAAC,EAAe,IAAAF,GACjB,EAAE,iBAAAG,GAAiB,iBAAAC,EAAA,IAAoBF,EAAW,MAAMD,CAAW;AAElE,SAAA;AAAA;AAAA,iCAEwBE,CAAe;AAAA,6BACnBC,CAAe;AAAA;AAAA;AAAA;AAAA,mCAITD,CAAe;AAAA;AAAA;AAAA,MAG5CE,CAAgB;AAAA;AAAA,mCAEaF,CAAe;AAAA;AAAA;AAAA;AAIlD,CAAC;"}
|
|
@@ -1,59 +1,70 @@
|
|
|
1
1
|
import { jsxs as t, jsx as e } from "react/jsx-runtime";
|
|
2
|
-
import { memo as
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
2
|
+
import { memo as R, useMemo as g, useCallback as E } from "react";
|
|
3
|
+
import { useTheme as z } from "styled-components";
|
|
4
|
+
import K from "../../../ui/buttons/text-button/text-button.js";
|
|
5
|
+
import i from "../../../ui/layout/flex-view.js";
|
|
6
|
+
import c from "../../../ui/text/text.js";
|
|
6
7
|
import { getStateConf as N } from "../utils.js";
|
|
7
|
-
import { BLOCK_TYPE as
|
|
8
|
+
import { BLOCK_TYPE as k } from "../../../chapters-v2/constants/block-constants.js";
|
|
8
9
|
import { CODING_ACTIVITY_NODE_TYPES as O } from "../constants.js";
|
|
9
|
-
import { NODE_STATE as
|
|
10
|
+
import { NODE_STATE as V, CARD_TYPE as P, USER_TYPE as l } from "../../daily-timeline-types.js";
|
|
10
11
|
import { NODE_TYPES as Y } from "../../../../types/models/worksheet.js";
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
12
|
+
import v from "../../../ui/buttons/clickable/clickable.js";
|
|
13
|
+
import { Text as G } from "./accordian-item-styled.js";
|
|
14
|
+
const M = R(
|
|
15
|
+
({ type: T, userType: o, card: d, onPuzzleClick: n, onReviewClick: m }) => {
|
|
16
|
+
const { textButton: p } = z(), {
|
|
17
|
+
label: A,
|
|
18
|
+
title: b,
|
|
19
|
+
state: u,
|
|
20
|
+
subtext: a,
|
|
21
|
+
user_node_id: _,
|
|
22
|
+
block_type: h,
|
|
23
|
+
user_block_id: $,
|
|
21
24
|
node_type: f
|
|
22
|
-
} =
|
|
25
|
+
} = d, s = h === k.SAT_MOCK_TEST, x = f === Y.PUZZLE_CARD, [C, w, B] = N(u), r = u === V.COMPLETED, L = g(() => T === P.CIRCLE ? !1 : o === l.TEACHER ? !s || r : o === l.STUDENT ? r && !O.includes(
|
|
23
26
|
f
|
|
24
|
-
) : !1, [o, T,
|
|
25
|
-
n == null || n(
|
|
26
|
-
}, [n,
|
|
27
|
-
m &&
|
|
28
|
-
}, [
|
|
29
|
-
return /* @__PURE__ */ t(
|
|
30
|
-
/* @__PURE__ */ e(
|
|
31
|
-
/* @__PURE__ */ t(
|
|
32
|
-
/* @__PURE__ */ t(
|
|
33
|
-
/* @__PURE__ */ t(
|
|
34
|
-
|
|
27
|
+
) : !1, [o, T, s, r, f]), S = r && (o === l.STUDENT || o === l.PARENT) || o === l.TEACHER, D = E(() => {
|
|
28
|
+
n == null || n(d);
|
|
29
|
+
}, [n, d]), I = E(() => {
|
|
30
|
+
m && _ && m(_, s, $);
|
|
31
|
+
}, [s, m, $, _]);
|
|
32
|
+
return /* @__PURE__ */ t(i, { $flexDirection: "row", $flexGapX: 1.5, children: [
|
|
33
|
+
/* @__PURE__ */ e(i, { $justifyContent: "flex-end", $height: 18, $background: "WHITE", children: /* @__PURE__ */ e(i, { $background: w, $borderColor: "BLACK_1", $borderRadiusX: 0.8, children: C && /* @__PURE__ */ e(C, { width: 14, height: 14, color: B }) }) }),
|
|
34
|
+
/* @__PURE__ */ t(i, { $flexRowGapX: 0.25, children: [
|
|
35
|
+
/* @__PURE__ */ t(c, { $renderAs: "ub2", $color: "BLACK_1", children: [
|
|
36
|
+
/* @__PURE__ */ t(c, { $renderAs: "ub2-bold", $inline: !0, $color: "BLACK_1", children: [
|
|
37
|
+
A,
|
|
35
38
|
":"
|
|
36
39
|
] }),
|
|
37
40
|
" ",
|
|
38
|
-
|
|
41
|
+
b
|
|
39
42
|
] }),
|
|
40
|
-
x ?
|
|
41
|
-
|
|
43
|
+
x ? S ? /* @__PURE__ */ e(
|
|
44
|
+
v,
|
|
42
45
|
{
|
|
43
46
|
label: r ? "View reviewed puzzle" : "View assigned puzzle",
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
+
onClick: D,
|
|
48
|
+
analyticsLabel: "puzzle_click",
|
|
49
|
+
children: /* @__PURE__ */ e(
|
|
50
|
+
G,
|
|
51
|
+
{
|
|
52
|
+
$color: "BLACK_T_60",
|
|
53
|
+
$renderAs: p.sizes.small.textVariant,
|
|
54
|
+
$buttonSize: "small",
|
|
55
|
+
children: r ? "View reviewed puzzle" : "View assigned puzzle"
|
|
56
|
+
}
|
|
57
|
+
)
|
|
47
58
|
}
|
|
48
|
-
) : /* @__PURE__ */ e(
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
59
|
+
) : /* @__PURE__ */ e(c, { $renderAs: "ub3", $color: "BLACK_T_60", children: a }) : /* @__PURE__ */ t(i, { $flexDirection: "row", $flexGapX: 0.75, $alignItems: "center", children: [
|
|
60
|
+
a && /* @__PURE__ */ e(c, { $renderAs: "ub3", $color: "BLACK_T_60", children: a }),
|
|
61
|
+
L && /* @__PURE__ */ e(
|
|
62
|
+
K,
|
|
52
63
|
{
|
|
53
64
|
label: "Review",
|
|
54
65
|
size: "small",
|
|
55
66
|
color: "BLACK_T_60",
|
|
56
|
-
onClick:
|
|
67
|
+
onClick: I
|
|
57
68
|
}
|
|
58
69
|
)
|
|
59
70
|
] })
|
|
@@ -61,8 +72,8 @@ const G = S(
|
|
|
61
72
|
] });
|
|
62
73
|
}
|
|
63
74
|
);
|
|
64
|
-
|
|
75
|
+
M.displayName = "AccordionItem";
|
|
65
76
|
export {
|
|
66
|
-
|
|
77
|
+
M as default
|
|
67
78
|
};
|
|
68
79
|
//# sourceMappingURL=accordion-item.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"accordion-item.js","sources":["../../../../../src/features/timeline/comps/accordion-item/accordion-item.tsx"],"sourcesContent":["import { memo, useCallback, useMemo, type FC } from 'react';\n\nimport TextButton from '../../../ui/buttons/text-button/text-button';\nimport FlexView from '../../../ui/layout/flex-view';\nimport Text from '../../../ui/text/text';\nimport type { IAccordionItemProps } from './accordion-item-types';\nimport { getStateConf } from '../utils';\nimport { BLOCK_TYPE } from '../../../chapters-v2/constants/block-constants';\nimport { type TColorNames } from '../../../ui/types';\nimport { CODING_ACTIVITY_NODE_TYPES } from '../constants';\nimport { CARD_TYPE, NODE_STATE, USER_TYPE } from '../../daily-timeline-types';\nimport { NODE_TYPES } from '../../../../types/models/worksheet';\n\nconst AccordionItem: FC<IAccordionItemProps> = memo(\n ({ type, userType, card, onPuzzleClick, onReviewClick }) => {\n const {\n label,\n title,\n state,\n subtext,\n user_node_id: userNodeId,\n block_type: blockType,\n user_block_id: userBlockId,\n node_type: nodeType,\n } = card;\n const isSatMockTestBlock = blockType === BLOCK_TYPE.SAT_MOCK_TEST;\n const isPuzzleCard = nodeType === NODE_TYPES.PUZZLE_CARD;\n const [Icon, bgColor, color] = getStateConf(state) as [\n FC<React.SVGProps<SVGSVGElement>>,\n TColorNames,\n TColorNames,\n ];\n const isCompleted = state === NODE_STATE.COMPLETED;\n const shouldShowReview = useMemo(() => {\n if (type === CARD_TYPE.CIRCLE) return false;\n\n if (userType === USER_TYPE.TEACHER) return !isSatMockTestBlock || isCompleted;\n\n if (userType === USER_TYPE.STUDENT)\n return (\n isCompleted &&\n !CODING_ACTIVITY_NODE_TYPES.includes(\n nodeType as (typeof CODING_ACTIVITY_NODE_TYPES)[number],\n )\n );\n\n return false;\n }, [userType, type, isSatMockTestBlock, isCompleted, nodeType]);\n\n const canReviewPuzzle =\n (isCompleted && (userType === USER_TYPE.STUDENT || userType === USER_TYPE.PARENT)) ||\n userType === USER_TYPE.TEACHER;\n\n const handlePuzzleClick = useCallback(() => {\n onPuzzleClick?.(card);\n }, [onPuzzleClick, card]);\n\n const handleReviewClick = useCallback(() => {\n if (onReviewClick && userNodeId) {\n onReviewClick(userNodeId, isSatMockTestBlock, userBlockId);\n }\n }, [isSatMockTestBlock, onReviewClick, userBlockId, userNodeId]);\n\n return (\n <FlexView $flexDirection=\"row\" $flexGapX={1.5}>\n <FlexView $justifyContent=\"flex-end\" $height={18} $background=\"WHITE\">\n <FlexView $background={bgColor} $borderColor=\"BLACK_1\" $borderRadiusX={0.8}>\n {Icon && <Icon width={14} height={14} color={color} />}\n </FlexView>\n </FlexView>\n <FlexView $flexRowGapX={0.25}>\n <Text $renderAs=\"ub2\" $color=\"BLACK_1\">\n <Text $renderAs=\"ub2-bold\" $inline $color=\"BLACK_1\">\n {label}:\n </Text>{' '}\n {title}\n </Text>\n {isPuzzleCard ? (\n canReviewPuzzle ? (\n <
|
|
1
|
+
{"version":3,"file":"accordion-item.js","sources":["../../../../../src/features/timeline/comps/accordion-item/accordion-item.tsx"],"sourcesContent":["import { memo, useCallback, useMemo, type FC } from 'react';\nimport { useTheme } from 'styled-components';\n\nimport TextButton from '../../../ui/buttons/text-button/text-button';\nimport FlexView from '../../../ui/layout/flex-view';\nimport Text from '../../../ui/text/text';\nimport type { IAccordionItemProps } from './accordion-item-types';\nimport { getStateConf } from '../utils';\nimport { BLOCK_TYPE } from '../../../chapters-v2/constants/block-constants';\nimport { type TColorNames } from '../../../ui/types';\nimport { CODING_ACTIVITY_NODE_TYPES } from '../constants';\nimport { CARD_TYPE, NODE_STATE, USER_TYPE } from '../../daily-timeline-types';\nimport { NODE_TYPES } from '../../../../types/models/worksheet';\nimport Clickable from '../../../ui/buttons/clickable/clickable';\nimport * as Styled from './accordian-item-styled';\n\nconst AccordionItem: FC<IAccordionItemProps> = memo(\n ({ type, userType, card, onPuzzleClick, onReviewClick }) => {\n const { textButton } = useTheme();\n\n const {\n label,\n title,\n state,\n subtext,\n user_node_id: userNodeId,\n block_type: blockType,\n user_block_id: userBlockId,\n node_type: nodeType,\n } = card;\n const isSatMockTestBlock = blockType === BLOCK_TYPE.SAT_MOCK_TEST;\n const isPuzzleCard = nodeType === NODE_TYPES.PUZZLE_CARD;\n const [Icon, bgColor, color] = getStateConf(state) as [\n FC<React.SVGProps<SVGSVGElement>>,\n TColorNames,\n TColorNames,\n ];\n const isCompleted = state === NODE_STATE.COMPLETED;\n const shouldShowReview = useMemo(() => {\n if (type === CARD_TYPE.CIRCLE) return false;\n\n if (userType === USER_TYPE.TEACHER) return !isSatMockTestBlock || isCompleted;\n\n if (userType === USER_TYPE.STUDENT)\n return (\n isCompleted &&\n !CODING_ACTIVITY_NODE_TYPES.includes(\n nodeType as (typeof CODING_ACTIVITY_NODE_TYPES)[number],\n )\n );\n\n return false;\n }, [userType, type, isSatMockTestBlock, isCompleted, nodeType]);\n\n const canReviewPuzzle =\n (isCompleted && (userType === USER_TYPE.STUDENT || userType === USER_TYPE.PARENT)) ||\n userType === USER_TYPE.TEACHER;\n\n const handlePuzzleClick = useCallback(() => {\n onPuzzleClick?.(card);\n }, [onPuzzleClick, card]);\n\n const handleReviewClick = useCallback(() => {\n if (onReviewClick && userNodeId) {\n onReviewClick(userNodeId, isSatMockTestBlock, userBlockId);\n }\n }, [isSatMockTestBlock, onReviewClick, userBlockId, userNodeId]);\n\n return (\n <FlexView $flexDirection=\"row\" $flexGapX={1.5}>\n <FlexView $justifyContent=\"flex-end\" $height={18} $background=\"WHITE\">\n <FlexView $background={bgColor} $borderColor=\"BLACK_1\" $borderRadiusX={0.8}>\n {Icon && <Icon width={14} height={14} color={color} />}\n </FlexView>\n </FlexView>\n <FlexView $flexRowGapX={0.25}>\n <Text $renderAs=\"ub2\" $color=\"BLACK_1\">\n <Text $renderAs=\"ub2-bold\" $inline $color=\"BLACK_1\">\n {label}:\n </Text>{' '}\n {title}\n </Text>\n {isPuzzleCard ? (\n canReviewPuzzle ? (\n <Clickable\n label={isCompleted ? 'View reviewed puzzle' : 'View assigned puzzle'}\n onClick={handlePuzzleClick}\n analyticsLabel=\"puzzle_click\"\n >\n <Styled.Text\n $color=\"BLACK_T_60\"\n $renderAs={textButton.sizes['small'].textVariant}\n $buttonSize=\"small\"\n >\n {isCompleted ? 'View reviewed puzzle' : 'View assigned puzzle'}\n </Styled.Text>\n </Clickable>\n ) : (\n <Text $renderAs=\"ub3\" $color=\"BLACK_T_60\">\n {subtext}\n </Text>\n )\n ) : (\n <FlexView $flexDirection=\"row\" $flexGapX={0.75} $alignItems=\"center\">\n {subtext && (\n <Text $renderAs=\"ub3\" $color=\"BLACK_T_60\">\n {subtext}\n </Text>\n )}\n {shouldShowReview && (\n <TextButton\n label=\"Review\"\n size=\"small\"\n color=\"BLACK_T_60\"\n onClick={handleReviewClick}\n />\n )}\n </FlexView>\n )}\n </FlexView>\n </FlexView>\n );\n },\n);\n\nAccordionItem.displayName = 'AccordionItem';\n\nexport default AccordionItem;\n"],"names":["AccordionItem","memo","type","userType","card","onPuzzleClick","onReviewClick","textButton","useTheme","label","title","state","subtext","userNodeId","blockType","userBlockId","nodeType","isSatMockTestBlock","BLOCK_TYPE","isPuzzleCard","NODE_TYPES","Icon","bgColor","color","getStateConf","isCompleted","NODE_STATE","shouldShowReview","useMemo","CARD_TYPE","USER_TYPE","CODING_ACTIVITY_NODE_TYPES","canReviewPuzzle","handlePuzzleClick","useCallback","handleReviewClick","jsxs","FlexView","jsx","Text","Clickable","Styled.Text","TextButton"],"mappings":"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"}
|
|
@@ -1,25 +1,23 @@
|
|
|
1
1
|
import i from "styled-components";
|
|
2
|
-
import
|
|
3
|
-
import { ClickableWrapper as
|
|
4
|
-
const p = i(
|
|
5
|
-
const { textButton:
|
|
2
|
+
import c from "../../text/text.js";
|
|
3
|
+
import { ClickableWrapper as d } from "../clickable/clickable-styled.js";
|
|
4
|
+
const p = i(c)(({ theme: t, $buttonSize: n }) => {
|
|
5
|
+
const { textButton: o } = t, { underlineHeight: e, underlineOffset: r } = o.sizes[n];
|
|
6
6
|
return `
|
|
7
7
|
text-decoration: underline;
|
|
8
8
|
text-decoration-thickness: ${e}px;
|
|
9
9
|
text-underline-offset: ${r}px;
|
|
10
10
|
|
|
11
|
+
&:hover {
|
|
12
|
+
text-decoration: none;
|
|
13
|
+
}
|
|
14
|
+
|
|
11
15
|
&:active {
|
|
12
16
|
text-decoration: underline;
|
|
13
17
|
text-decoration-thickness: ${e}px;
|
|
14
18
|
}
|
|
15
19
|
|
|
16
|
-
|
|
17
|
-
&:hover {
|
|
18
|
-
text-decoration: none;
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
${c}[aria-disabled='true'] & {
|
|
20
|
+
${d}[aria-disabled='true'] & {
|
|
23
21
|
text-decoration: underline;
|
|
24
22
|
text-decoration-thickness: ${e}px;
|
|
25
23
|
opacity: 0.5;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"text-button-styled.js","sources":["../../../../../src/features/ui/buttons/text-button/text-button-styled.tsx"],"sourcesContent":["import styled from 'styled-components';\n\nimport UIText from '../../text/text';\nimport { ClickableWrapper } from '../clickable/clickable-styled';\nimport type { ITextButtonProps } from './text-button-types';\n\ninterface IStyledTextProps {\n $buttonSize: NonNullable<ITextButtonProps['size']>;\n}\n\nconst Text = styled(UIText)<IStyledTextProps>(({ theme, $buttonSize }) => {\n const { textButton } = theme;\n const { underlineHeight, underlineOffset } = textButton.sizes[$buttonSize];\n\n return `\n text-decoration: underline;\n text-decoration-thickness: ${underlineHeight}px;\n text-underline-offset: ${underlineOffset}px;\n\n &:
|
|
1
|
+
{"version":3,"file":"text-button-styled.js","sources":["../../../../../src/features/ui/buttons/text-button/text-button-styled.tsx"],"sourcesContent":["import styled from 'styled-components';\n\nimport UIText from '../../text/text';\nimport { ClickableWrapper } from '../clickable/clickable-styled';\nimport type { ITextButtonProps } from './text-button-types';\n\ninterface IStyledTextProps {\n $buttonSize: NonNullable<ITextButtonProps['size']>;\n}\n\nconst Text = styled(UIText)<IStyledTextProps>(({ theme, $buttonSize }) => {\n const { textButton } = theme;\n const { underlineHeight, underlineOffset } = textButton.sizes[$buttonSize];\n\n return `\n text-decoration: underline;\n text-decoration-thickness: ${underlineHeight}px;\n text-underline-offset: ${underlineOffset}px;\n\n &:hover {\n text-decoration: none;\n }\n\n &:active {\n text-decoration: underline;\n text-decoration-thickness: ${underlineHeight}px;\n }\n\n ${ClickableWrapper}[aria-disabled='true'] & {\n text-decoration: underline;\n text-decoration-thickness: ${underlineHeight}px;\n opacity: 0.5;\n }\n `;\n});\n\nexport { Text };\n"],"names":["Text","styled","UIText","theme","$buttonSize","textButton","underlineHeight","underlineOffset","ClickableWrapper"],"mappings":";;;AAUM,MAAAA,IAAOC,EAAOC,CAAM,EAAoB,CAAC,EAAE,OAAAC,GAAO,aAAAC,QAAkB;AAClE,QAAA,EAAE,YAAAC,EAAe,IAAAF,GACjB,EAAE,iBAAAG,GAAiB,iBAAAC,EAAA,IAAoBF,EAAW,MAAMD,CAAW;AAElE,SAAA;AAAA;AAAA,iCAEwBE,CAAe;AAAA,6BACnBC,CAAe;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mCAQTD,CAAe;AAAA;AAAA;AAAA,MAG5CE,CAAgB;AAAA;AAAA,mCAEaF,CAAe;AAAA;AAAA;AAAA;AAIlD,CAAC;"}
|