@pie-element/categorize 13.1.2-next.1 → 13.1.2

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 (158) hide show
  1. package/CHANGELOG.json +1637 -0
  2. package/CHANGELOG.md +2542 -0
  3. package/LICENSE.md +5 -0
  4. package/README.md +5 -0
  5. package/configure/CHANGELOG.json +1202 -0
  6. package/configure/CHANGELOG.md +2125 -0
  7. package/configure/lib/defaults.js +222 -0
  8. package/configure/lib/defaults.js.map +1 -0
  9. package/configure/lib/design/builder.js +55 -0
  10. package/configure/lib/design/builder.js.map +1 -0
  11. package/configure/lib/design/buttons.js +59 -0
  12. package/configure/lib/design/buttons.js.map +1 -0
  13. package/configure/lib/design/categories/RowLabel.js +66 -0
  14. package/configure/lib/design/categories/RowLabel.js.map +1 -0
  15. package/configure/lib/design/categories/alternateResponses.js +116 -0
  16. package/configure/lib/design/categories/alternateResponses.js.map +1 -0
  17. package/configure/lib/design/categories/category.js +153 -0
  18. package/configure/lib/design/categories/category.js.map +1 -0
  19. package/configure/lib/design/categories/choice-preview.js +79 -0
  20. package/configure/lib/design/categories/choice-preview.js.map +1 -0
  21. package/configure/lib/design/categories/droppable-placeholder.js +93 -0
  22. package/configure/lib/design/categories/droppable-placeholder.js.map +1 -0
  23. package/configure/lib/design/categories/index.js +256 -0
  24. package/configure/lib/design/categories/index.js.map +1 -0
  25. package/configure/lib/design/choices/choice.js +187 -0
  26. package/configure/lib/design/choices/choice.js.map +1 -0
  27. package/configure/lib/design/choices/config.js +58 -0
  28. package/configure/lib/design/choices/config.js.map +1 -0
  29. package/configure/lib/design/choices/index.js +197 -0
  30. package/configure/lib/design/choices/index.js.map +1 -0
  31. package/configure/lib/design/header.js +71 -0
  32. package/configure/lib/design/header.js.map +1 -0
  33. package/configure/lib/design/index.js +727 -0
  34. package/configure/lib/design/index.js.map +1 -0
  35. package/configure/lib/design/input-header.js +105 -0
  36. package/configure/lib/design/input-header.js.map +1 -0
  37. package/configure/lib/design/utils.js +12 -0
  38. package/configure/lib/design/utils.js.map +1 -0
  39. package/configure/lib/index.js +147 -0
  40. package/configure/lib/index.js.map +1 -0
  41. package/configure/lib/main.js +44 -0
  42. package/configure/lib/main.js.map +1 -0
  43. package/configure/lib/utils.js +43 -0
  44. package/configure/lib/utils.js.map +1 -0
  45. package/configure/package.json +32 -0
  46. package/controller/CHANGELOG.json +452 -0
  47. package/controller/CHANGELOG.md +1377 -0
  48. package/controller/lib/defaults.js +33 -0
  49. package/controller/lib/defaults.js.map +1 -0
  50. package/controller/lib/index.js +479 -0
  51. package/controller/lib/index.js.map +1 -0
  52. package/controller/lib/utils.js +69 -0
  53. package/controller/lib/utils.js.map +1 -0
  54. package/controller/package.json +18 -0
  55. package/docs/config-schema.json +2897 -0
  56. package/docs/config-schema.json.md +2138 -0
  57. package/docs/demo/config.js +8 -0
  58. package/docs/demo/generate.js +357 -0
  59. package/docs/demo/index.html +1 -0
  60. package/docs/demo/session.js +12 -0
  61. package/docs/pie-schema.json +1784 -0
  62. package/docs/pie-schema.json.md +1046 -0
  63. package/lib/categorize/categories.js +135 -0
  64. package/lib/categorize/categories.js.map +1 -0
  65. package/lib/categorize/category.js +67 -0
  66. package/lib/categorize/category.js.map +1 -0
  67. package/lib/categorize/choice.js +140 -0
  68. package/lib/categorize/choice.js.map +1 -0
  69. package/lib/categorize/choices.js +99 -0
  70. package/lib/categorize/choices.js.map +1 -0
  71. package/lib/categorize/droppable-placeholder.js +84 -0
  72. package/lib/categorize/droppable-placeholder.js.map +1 -0
  73. package/lib/categorize/grid-content.js +55 -0
  74. package/lib/categorize/grid-content.js.map +1 -0
  75. package/lib/categorize/index.js +450 -0
  76. package/lib/categorize/index.js.map +1 -0
  77. package/lib/index.js +316 -0
  78. package/lib/index.js.map +1 -0
  79. package/package.json +22 -86
  80. package/configure.js +0 -2
  81. package/controller.js +0 -1
  82. package/dist/author/defaults.d.ts +0 -223
  83. package/dist/author/defaults.js +0 -170
  84. package/dist/author/design/builder.d.ts +0 -10
  85. package/dist/author/design/builder.js +0 -24
  86. package/dist/author/design/buttons.d.ts +0 -28
  87. package/dist/author/design/buttons.js +0 -36
  88. package/dist/author/design/categories/RowLabel.d.ts +0 -23
  89. package/dist/author/design/categories/RowLabel.js +0 -47
  90. package/dist/author/design/categories/alternateResponses.d.ts +0 -31
  91. package/dist/author/design/categories/alternateResponses.js +0 -62
  92. package/dist/author/design/categories/category.d.ts +0 -44
  93. package/dist/author/design/categories/category.js +0 -98
  94. package/dist/author/design/categories/choice-preview.d.ts +0 -25
  95. package/dist/author/design/categories/choice-preview.js +0 -60
  96. package/dist/author/design/categories/droppable-placeholder.d.ts +0 -11
  97. package/dist/author/design/categories/droppable-placeholder.js +0 -71
  98. package/dist/author/design/categories/index.d.ts +0 -41
  99. package/dist/author/design/categories/index.js +0 -146
  100. package/dist/author/design/choices/choice.d.ts +0 -11
  101. package/dist/author/design/choices/choice.js +0 -129
  102. package/dist/author/design/choices/config.d.ts +0 -21
  103. package/dist/author/design/choices/config.js +0 -33
  104. package/dist/author/design/choices/index.d.ts +0 -41
  105. package/dist/author/design/choices/index.js +0 -110
  106. package/dist/author/design/header.d.ts +0 -24
  107. package/dist/author/design/header.js +0 -49
  108. package/dist/author/design/index.d.ts +0 -52
  109. package/dist/author/design/index.js +0 -417
  110. package/dist/author/design/input-header.d.ts +0 -39
  111. package/dist/author/design/input-header.js +0 -69
  112. package/dist/author/design/utils.d.ts +0 -9
  113. package/dist/author/design/utils.js +0 -7
  114. package/dist/author/index.d.ts +0 -51
  115. package/dist/author/index.js +0 -87
  116. package/dist/author/main.d.ts +0 -23
  117. package/dist/author/main.js +0 -30
  118. package/dist/author/utils.d.ts +0 -16
  119. package/dist/author/utils.js +0 -17
  120. package/dist/browser/author/index.js +0 -2041
  121. package/dist/browser/author/index.js.map +0 -1
  122. package/dist/browser/categorize.css +0 -2
  123. package/dist/browser/controller/index.js +0 -299
  124. package/dist/browser/controller/index.js.map +0 -1
  125. package/dist/browser/delivery/index.js +0 -1051
  126. package/dist/browser/delivery/index.js.map +0 -1
  127. package/dist/browser/dist-BINEJ0Vp.js +0 -1954
  128. package/dist/browser/dist-BINEJ0Vp.js.map +0 -1
  129. package/dist/browser/dist-C19vRASu.js +0 -49795
  130. package/dist/browser/dist-C19vRASu.js.map +0 -1
  131. package/dist/controller/defaults.d.ts +0 -34
  132. package/dist/controller/defaults.js +0 -29
  133. package/dist/controller/index.d.ts +0 -61
  134. package/dist/controller/index.js +0 -155
  135. package/dist/controller/utils.d.ts +0 -20
  136. package/dist/controller/utils.js +0 -35
  137. package/dist/delivery/categorize/categories.d.ts +0 -34
  138. package/dist/delivery/categorize/categories.js +0 -66
  139. package/dist/delivery/categorize/category.d.ts +0 -28
  140. package/dist/delivery/categorize/category.js +0 -48
  141. package/dist/delivery/categorize/choice.d.ts +0 -27
  142. package/dist/delivery/categorize/choice.js +0 -94
  143. package/dist/delivery/categorize/choices.d.ts +0 -39
  144. package/dist/delivery/categorize/choices.js +0 -51
  145. package/dist/delivery/categorize/droppable-placeholder.d.ts +0 -32
  146. package/dist/delivery/categorize/droppable-placeholder.js +0 -64
  147. package/dist/delivery/categorize/grid-content.d.ts +0 -25
  148. package/dist/delivery/categorize/grid-content.js +0 -39
  149. package/dist/delivery/categorize/index.d.ts +0 -57
  150. package/dist/delivery/categorize/index.js +0 -260
  151. package/dist/delivery/index.d.ts +0 -27
  152. package/dist/delivery/index.js +0 -152
  153. package/dist/index.d.ts +0 -1
  154. package/dist/index.iife.d.ts +0 -8
  155. package/dist/index.iife.js +0 -152
  156. package/dist/index.js +0 -2
  157. package/dist/runtime-support.d.ts +0 -12
  158. package/dist/runtime-support.js +0 -12
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","names":["useUtilityClasses","capitalize","React","useControlled","useId","useEventCallback","useForkRef"],"sources":["../../../../../lib-react/drag/dist/draggable-choice.js","../../../../../../node_modules/.bun/@mui+material@7.3.11+eb26afe407ed7030/node_modules/@mui/material/esm/CardActions/cardActionsClasses.js","../../../../../../node_modules/.bun/@mui+material@7.3.11+eb26afe407ed7030/node_modules/@mui/material/esm/CardActions/CardActions.js","../../../../../../node_modules/.bun/@mui+material@7.3.11+eb26afe407ed7030/node_modules/@mui/material/esm/Tooltip/tooltipClasses.js","../../../../../../node_modules/.bun/@mui+material@7.3.11+eb26afe407ed7030/node_modules/@mui/material/esm/Tooltip/Tooltip.js","../../../../../shared/configure-events/dist/index.js","../../../src/author/design/utils.ts","../../../../../../node_modules/.bun/@mui+icons-material@7.3.11+44ccb211c00abd9d/node_modules/@mui/icons-material/esm/Info.js","../../../src/author/design/input-header.tsx","../../../src/author/design/buttons.tsx","../../../../../../node_modules/.bun/@mui+icons-material@7.3.11+44ccb211c00abd9d/node_modules/@mui/icons-material/esm/RemoveCircleOutline.js","../../../src/author/design/categories/choice-preview.tsx","../../../src/author/design/categories/droppable-placeholder.tsx","../../../src/author/design/categories/category.tsx","../../../src/author/design/header.tsx","../../../src/author/utils.ts","../../../src/author/design/categories/RowLabel.tsx","../../../src/author/design/categories/index.tsx","../../../src/author/design/categories/alternateResponses.tsx","../../../../../../node_modules/.bun/@mui+icons-material@7.3.11+44ccb211c00abd9d/node_modules/@mui/icons-material/esm/DragHandle.js","../../../src/author/design/choices/choice.tsx","../../../src/author/design/choices/config.tsx","../../../src/author/design/choices/index.tsx","../../../src/author/design/builder.ts","../../../src/author/design/index.tsx","../../../src/author/main.tsx","../../../src/author/defaults.ts","../../../src/author/index.ts"],"sourcesContent":["import \"react\";\nimport { styled as e } from \"@mui/material/styles\";\nimport t from \"prop-types\";\nimport { grey as n } from \"@mui/material/colors\";\nimport { jsx as r } from \"react/jsx-runtime\";\nimport { useDraggable as i } from \"@dnd-kit/core\";\n//#region src/draggable-choice.tsx\nvar a = e(\"div\")(({ theme: e }) => ({\n\tbackgroundColor: e.palette.background.paper,\n\tborder: `solid 1px ${n[400]}`,\n\tpadding: e.spacing(1),\n\tminHeight: \"30px\",\n\tminWidth: e.spacing(20),\n\tmaxWidth: e.spacing(75),\n\tcursor: \"grab\",\n\t\"& p\": { margin: 0 },\n\t\"& p *\": { margin: 0 },\n\t\"&:active\": { cursor: \"grabbing\" }\n}));\nfunction o({ choice: e, children: t, className: n, disabled: o, category: s, alternateResponseIndex: c, choiceIndex: l, onRemoveChoice: u, type: d, id: f }) {\n\tlet { attributes: p, listeners: m, setNodeRef: h, isDragging: g } = i({\n\t\tid: f || e.id,\n\t\tdisabled: o,\n\t\tcategoryId: s?.id,\n\t\talternateResponseIndex: c,\n\t\tdata: {\n\t\t\tid: e.id,\n\t\t\tvalue: e.value,\n\t\t\tchoiceId: e.id,\n\t\t\tfrom: s?.id,\n\t\t\tcategoryId: s?.id,\n\t\t\talternateResponseIndex: c,\n\t\t\tchoiceIndex: l,\n\t\t\tonRemoveChoice: u,\n\t\t\ttype: d\n\t\t}\n\t});\n\treturn /* @__PURE__ */ r(a, {\n\t\tref: h,\n\t\tclassName: n,\n\t\tisDragging: g,\n\t\t...p,\n\t\t...m,\n\t\tchildren: t\n\t});\n}\no.propTypes = {\n\tchoice: t.shape({\n\t\tid: t.oneOfType([t.string, t.number]).isRequired,\n\t\tvalue: t.any\n\t}).isRequired,\n\tchildren: t.oneOfType([t.arrayOf(t.node), t.node]),\n\tclassName: t.string,\n\tdisabled: t.bool,\n\tcategory: t.shape({ id: t.oneOfType([t.string, t.number]) }),\n\talternateResponseIndex: t.number,\n\tchoiceIndex: t.number,\n\tonRemoveChoice: t.func,\n\ttype: t.string,\n\tid: t.string\n};\n//#endregion\nexport { o as default };\n","import generateUtilityClasses from '@mui/utils/generateUtilityClasses';\nimport generateUtilityClass from '@mui/utils/generateUtilityClass';\nexport function getCardActionsUtilityClass(slot) {\n return generateUtilityClass('MuiCardActions', slot);\n}\nconst cardActionsClasses = generateUtilityClasses('MuiCardActions', ['root', 'spacing']);\nexport default cardActionsClasses;","'use client';\n\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport composeClasses from '@mui/utils/composeClasses';\nimport { styled } from \"../zero-styled/index.js\";\nimport { useDefaultProps } from \"../DefaultPropsProvider/index.js\";\nimport { getCardActionsUtilityClass } from \"./cardActionsClasses.js\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst useUtilityClasses = ownerState => {\n const {\n classes,\n disableSpacing\n } = ownerState;\n const slots = {\n root: ['root', !disableSpacing && 'spacing']\n };\n return composeClasses(slots, getCardActionsUtilityClass, classes);\n};\nconst CardActionsRoot = styled('div', {\n name: 'MuiCardActions',\n slot: 'Root',\n overridesResolver: (props, styles) => {\n const {\n ownerState\n } = props;\n return [styles.root, !ownerState.disableSpacing && styles.spacing];\n }\n})({\n display: 'flex',\n alignItems: 'center',\n padding: 8,\n variants: [{\n props: {\n disableSpacing: false\n },\n style: {\n '& > :not(style) ~ :not(style)': {\n marginLeft: 8\n }\n }\n }]\n});\nconst CardActions = /*#__PURE__*/React.forwardRef(function CardActions(inProps, ref) {\n const props = useDefaultProps({\n props: inProps,\n name: 'MuiCardActions'\n });\n const {\n disableSpacing = false,\n className,\n ...other\n } = props;\n const ownerState = {\n ...props,\n disableSpacing\n };\n const classes = useUtilityClasses(ownerState);\n return /*#__PURE__*/_jsx(CardActionsRoot, {\n className: clsx(classes.root, className),\n ownerState: ownerState,\n ref: ref,\n ...other\n });\n});\nprocess.env.NODE_ENV !== \"production\" ? CardActions.propTypes /* remove-proptypes */ = {\n // ┌────────────────────────────── Warning ──────────────────────────────┐\n // │ These PropTypes are generated from the TypeScript type definitions. │\n // │ To update them, edit the d.ts file and run `pnpm proptypes`. │\n // └─────────────────────────────────────────────────────────────────────┘\n /**\n * The content of the component.\n */\n children: PropTypes.node,\n /**\n * Override or extend the styles applied to the component.\n */\n classes: PropTypes.object,\n /**\n * @ignore\n */\n className: PropTypes.string,\n /**\n * If `true`, the actions do not have additional margin.\n * @default false\n */\n disableSpacing: PropTypes.bool,\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object])\n} : void 0;\nexport default CardActions;","import generateUtilityClasses from '@mui/utils/generateUtilityClasses';\nimport generateUtilityClass from '@mui/utils/generateUtilityClass';\nexport function getTooltipUtilityClass(slot) {\n return generateUtilityClass('MuiTooltip', slot);\n}\nconst tooltipClasses = generateUtilityClasses('MuiTooltip', ['popper', 'popperInteractive', 'popperArrow', 'popperClose', 'tooltip', 'tooltipArrow', 'touch', 'tooltipPlacementLeft', 'tooltipPlacementRight', 'tooltipPlacementTop', 'tooltipPlacementBottom', 'arrow']);\nexport default tooltipClasses;","'use client';\n\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport useTimeout, { Timeout } from '@mui/utils/useTimeout';\nimport elementAcceptingRef from '@mui/utils/elementAcceptingRef';\nimport composeClasses from '@mui/utils/composeClasses';\nimport { useRtl } from '@mui/system/RtlProvider';\nimport isFocusVisible from '@mui/utils/isFocusVisible';\nimport getReactElementRef from '@mui/utils/getReactElementRef';\nimport { styled, useTheme } from \"../zero-styled/index.js\";\nimport memoTheme from \"../utils/memoTheme.js\";\nimport { useDefaultProps } from \"../DefaultPropsProvider/index.js\";\nimport capitalize from \"../utils/capitalize.js\";\nimport Grow from \"../Grow/index.js\";\nimport Popper from \"../Popper/index.js\";\nimport useEventCallback from \"../utils/useEventCallback.js\";\nimport useForkRef from \"../utils/useForkRef.js\";\nimport useId from \"../utils/useId.js\";\nimport useControlled from \"../utils/useControlled.js\";\nimport useSlot from \"../utils/useSlot.js\";\nimport tooltipClasses, { getTooltipUtilityClass } from \"./tooltipClasses.js\";\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nfunction round(value) {\n return Math.round(value * 1e5) / 1e5;\n}\nconst useUtilityClasses = ownerState => {\n const {\n classes,\n disableInteractive,\n arrow,\n touch,\n placement\n } = ownerState;\n const slots = {\n popper: ['popper', !disableInteractive && 'popperInteractive', arrow && 'popperArrow'],\n tooltip: ['tooltip', arrow && 'tooltipArrow', touch && 'touch', `tooltipPlacement${capitalize(placement.split('-')[0])}`],\n arrow: ['arrow']\n };\n return composeClasses(slots, getTooltipUtilityClass, classes);\n};\nconst TooltipPopper = styled(Popper, {\n name: 'MuiTooltip',\n slot: 'Popper',\n overridesResolver: (props, styles) => {\n const {\n ownerState\n } = props;\n return [styles.popper, !ownerState.disableInteractive && styles.popperInteractive, ownerState.arrow && styles.popperArrow, !ownerState.open && styles.popperClose];\n }\n})(memoTheme(({\n theme\n}) => ({\n zIndex: (theme.vars || theme).zIndex.tooltip,\n pointerEvents: 'none',\n variants: [{\n props: ({\n ownerState\n }) => !ownerState.disableInteractive,\n style: {\n pointerEvents: 'auto'\n }\n }, {\n props: ({\n open\n }) => !open,\n style: {\n pointerEvents: 'none'\n }\n }, {\n props: ({\n ownerState\n }) => ownerState.arrow,\n style: {\n [`&[data-popper-placement*=\"bottom\"] .${tooltipClasses.arrow}`]: {\n top: 0,\n marginTop: '-0.71em',\n '&::before': {\n transformOrigin: '0 100%'\n }\n },\n [`&[data-popper-placement*=\"top\"] .${tooltipClasses.arrow}`]: {\n bottom: 0,\n marginBottom: '-0.71em',\n '&::before': {\n transformOrigin: '100% 0'\n }\n },\n [`&[data-popper-placement*=\"right\"] .${tooltipClasses.arrow}`]: {\n height: '1em',\n width: '0.71em',\n '&::before': {\n transformOrigin: '100% 100%'\n }\n },\n [`&[data-popper-placement*=\"left\"] .${tooltipClasses.arrow}`]: {\n height: '1em',\n width: '0.71em',\n '&::before': {\n transformOrigin: '0 0'\n }\n }\n }\n }, {\n props: ({\n ownerState\n }) => ownerState.arrow && !ownerState.isRtl,\n style: {\n [`&[data-popper-placement*=\"right\"] .${tooltipClasses.arrow}`]: {\n left: 0,\n marginLeft: '-0.71em'\n }\n }\n }, {\n props: ({\n ownerState\n }) => ownerState.arrow && !!ownerState.isRtl,\n style: {\n [`&[data-popper-placement*=\"right\"] .${tooltipClasses.arrow}`]: {\n right: 0,\n marginRight: '-0.71em'\n }\n }\n }, {\n props: ({\n ownerState\n }) => ownerState.arrow && !ownerState.isRtl,\n style: {\n [`&[data-popper-placement*=\"left\"] .${tooltipClasses.arrow}`]: {\n right: 0,\n marginRight: '-0.71em'\n }\n }\n }, {\n props: ({\n ownerState\n }) => ownerState.arrow && !!ownerState.isRtl,\n style: {\n [`&[data-popper-placement*=\"left\"] .${tooltipClasses.arrow}`]: {\n left: 0,\n marginLeft: '-0.71em'\n }\n }\n }]\n})));\nconst TooltipTooltip = styled('div', {\n name: 'MuiTooltip',\n slot: 'Tooltip',\n overridesResolver: (props, styles) => {\n const {\n ownerState\n } = props;\n return [styles.tooltip, ownerState.touch && styles.touch, ownerState.arrow && styles.tooltipArrow, styles[`tooltipPlacement${capitalize(ownerState.placement.split('-')[0])}`]];\n }\n})(memoTheme(({\n theme\n}) => ({\n backgroundColor: theme.vars ? theme.vars.palette.Tooltip.bg : theme.alpha(theme.palette.grey[700], 0.92),\n borderRadius: (theme.vars || theme).shape.borderRadius,\n color: (theme.vars || theme).palette.common.white,\n fontFamily: theme.typography.fontFamily,\n padding: '4px 8px',\n fontSize: theme.typography.pxToRem(11),\n maxWidth: 300,\n margin: 2,\n wordWrap: 'break-word',\n fontWeight: theme.typography.fontWeightMedium,\n [`.${tooltipClasses.popper}[data-popper-placement*=\"left\"] &`]: {\n transformOrigin: 'right center'\n },\n [`.${tooltipClasses.popper}[data-popper-placement*=\"right\"] &`]: {\n transformOrigin: 'left center'\n },\n [`.${tooltipClasses.popper}[data-popper-placement*=\"top\"] &`]: {\n transformOrigin: 'center bottom',\n marginBottom: '14px'\n },\n [`.${tooltipClasses.popper}[data-popper-placement*=\"bottom\"] &`]: {\n transformOrigin: 'center top',\n marginTop: '14px'\n },\n variants: [{\n props: ({\n ownerState\n }) => ownerState.arrow,\n style: {\n position: 'relative',\n margin: 0\n }\n }, {\n props: ({\n ownerState\n }) => ownerState.touch,\n style: {\n padding: '8px 16px',\n fontSize: theme.typography.pxToRem(14),\n lineHeight: `${round(16 / 14)}em`,\n fontWeight: theme.typography.fontWeightRegular\n }\n }, {\n props: ({\n ownerState\n }) => !ownerState.isRtl,\n style: {\n [`.${tooltipClasses.popper}[data-popper-placement*=\"left\"] &`]: {\n marginRight: '14px'\n },\n [`.${tooltipClasses.popper}[data-popper-placement*=\"right\"] &`]: {\n marginLeft: '14px'\n }\n }\n }, {\n props: ({\n ownerState\n }) => !ownerState.isRtl && ownerState.touch,\n style: {\n [`.${tooltipClasses.popper}[data-popper-placement*=\"left\"] &`]: {\n marginRight: '24px'\n },\n [`.${tooltipClasses.popper}[data-popper-placement*=\"right\"] &`]: {\n marginLeft: '24px'\n }\n }\n }, {\n props: ({\n ownerState\n }) => !!ownerState.isRtl,\n style: {\n [`.${tooltipClasses.popper}[data-popper-placement*=\"left\"] &`]: {\n marginLeft: '14px'\n },\n [`.${tooltipClasses.popper}[data-popper-placement*=\"right\"] &`]: {\n marginRight: '14px'\n }\n }\n }, {\n props: ({\n ownerState\n }) => !!ownerState.isRtl && ownerState.touch,\n style: {\n [`.${tooltipClasses.popper}[data-popper-placement*=\"left\"] &`]: {\n marginLeft: '24px'\n },\n [`.${tooltipClasses.popper}[data-popper-placement*=\"right\"] &`]: {\n marginRight: '24px'\n }\n }\n }, {\n props: ({\n ownerState\n }) => ownerState.touch,\n style: {\n [`.${tooltipClasses.popper}[data-popper-placement*=\"top\"] &`]: {\n marginBottom: '24px'\n }\n }\n }, {\n props: ({\n ownerState\n }) => ownerState.touch,\n style: {\n [`.${tooltipClasses.popper}[data-popper-placement*=\"bottom\"] &`]: {\n marginTop: '24px'\n }\n }\n }]\n})));\nconst TooltipArrow = styled('span', {\n name: 'MuiTooltip',\n slot: 'Arrow'\n})(memoTheme(({\n theme\n}) => ({\n overflow: 'hidden',\n position: 'absolute',\n width: '1em',\n height: '0.71em' /* = width / sqrt(2) = (length of the hypotenuse) */,\n boxSizing: 'border-box',\n color: theme.vars ? theme.vars.palette.Tooltip.bg : theme.alpha(theme.palette.grey[700], 0.9),\n '&::before': {\n content: '\"\"',\n margin: 'auto',\n display: 'block',\n width: '100%',\n height: '100%',\n backgroundColor: 'currentColor',\n transform: 'rotate(45deg)'\n }\n})));\nlet hystersisOpen = false;\nconst hystersisTimer = new Timeout();\nlet cursorPosition = {\n x: 0,\n y: 0\n};\nexport function testReset() {\n hystersisOpen = false;\n hystersisTimer.clear();\n}\nfunction composeEventHandler(handler, eventHandler) {\n return (event, ...params) => {\n if (eventHandler) {\n eventHandler(event, ...params);\n }\n handler(event, ...params);\n };\n}\n\n// TODO v6: Remove PopperComponent, PopperProps, TransitionComponent and TransitionProps.\nconst Tooltip = /*#__PURE__*/React.forwardRef(function Tooltip(inProps, ref) {\n const props = useDefaultProps({\n props: inProps,\n name: 'MuiTooltip'\n });\n const {\n arrow = false,\n children: childrenProp,\n classes: classesProp,\n components = {},\n componentsProps = {},\n describeChild = false,\n disableFocusListener = false,\n disableHoverListener = false,\n disableInteractive: disableInteractiveProp = false,\n disableTouchListener = false,\n enterDelay = 100,\n enterNextDelay = 0,\n enterTouchDelay = 700,\n followCursor = false,\n id: idProp,\n leaveDelay = 0,\n leaveTouchDelay = 1500,\n onClose,\n onOpen,\n open: openProp,\n placement = 'bottom',\n PopperComponent: PopperComponentProp,\n PopperProps = {},\n slotProps = {},\n slots = {},\n title,\n TransitionComponent: TransitionComponentProp,\n TransitionProps,\n ...other\n } = props;\n\n // to prevent runtime errors, developers will need to provide a child as a React element anyway.\n const children = /*#__PURE__*/React.isValidElement(childrenProp) ? childrenProp : /*#__PURE__*/_jsx(\"span\", {\n children: childrenProp\n });\n const theme = useTheme();\n const isRtl = useRtl();\n const [childNode, setChildNode] = React.useState();\n const [arrowRef, setArrowRef] = React.useState(null);\n const ignoreNonTouchEvents = React.useRef(false);\n const disableInteractive = disableInteractiveProp || followCursor;\n const closeTimer = useTimeout();\n const enterTimer = useTimeout();\n const leaveTimer = useTimeout();\n const touchTimer = useTimeout();\n const [openState, setOpenState] = useControlled({\n controlled: openProp,\n default: false,\n name: 'Tooltip',\n state: 'open'\n });\n let open = openState;\n if (process.env.NODE_ENV !== 'production') {\n // TODO: uncomment once we enable eslint-plugin-react-compiler // eslint-disable-next-line react-compiler/react-compiler\n // eslint-disable-next-line react-hooks/rules-of-hooks -- process.env never changes\n const {\n current: isControlled\n } = React.useRef(openProp !== undefined);\n\n // TODO: uncomment once we enable eslint-plugin-react-compiler // eslint-disable-next-line react-compiler/react-compiler\n // eslint-disable-next-line react-hooks/rules-of-hooks -- process.env never changes\n React.useEffect(() => {\n if (childNode && childNode.disabled && !isControlled && title !== '' && childNode.tagName.toLowerCase() === 'button') {\n console.warn(['MUI: You are providing a disabled `button` child to the Tooltip component.', 'A disabled element does not fire events.', \"Tooltip needs to listen to the child element's events to display the title.\", '', 'Add a simple wrapper element, such as a `span`.'].join('\\n'));\n }\n }, [title, childNode, isControlled]);\n }\n const id = useId(idProp);\n const prevUserSelect = React.useRef();\n const stopTouchInteraction = useEventCallback(() => {\n if (prevUserSelect.current !== undefined) {\n document.body.style.WebkitUserSelect = prevUserSelect.current;\n prevUserSelect.current = undefined;\n }\n touchTimer.clear();\n });\n React.useEffect(() => stopTouchInteraction, [stopTouchInteraction]);\n const handleOpen = event => {\n hystersisTimer.clear();\n hystersisOpen = true;\n\n // The mouseover event will trigger for every nested element in the tooltip.\n // We can skip rerendering when the tooltip is already open.\n // We are using the mouseover event instead of the mouseenter event to fix a hide/show issue.\n setOpenState(true);\n if (onOpen && !open) {\n onOpen(event);\n }\n };\n const handleClose = useEventCallback(\n /**\n * @param {React.SyntheticEvent | Event} event\n */\n event => {\n hystersisTimer.start(800 + leaveDelay, () => {\n hystersisOpen = false;\n });\n setOpenState(false);\n if (onClose && open) {\n onClose(event);\n }\n closeTimer.start(theme.transitions.duration.shortest, () => {\n ignoreNonTouchEvents.current = false;\n });\n });\n const handleMouseOver = event => {\n if (ignoreNonTouchEvents.current && event.type !== 'touchstart') {\n return;\n }\n\n // Remove the title ahead of time.\n // We don't want to wait for the next render commit.\n // We would risk displaying two tooltips at the same time (native + this one).\n if (childNode) {\n childNode.removeAttribute('title');\n }\n enterTimer.clear();\n leaveTimer.clear();\n if (enterDelay || hystersisOpen && enterNextDelay) {\n enterTimer.start(hystersisOpen ? enterNextDelay : enterDelay, () => {\n handleOpen(event);\n });\n } else {\n handleOpen(event);\n }\n };\n const handleMouseLeave = event => {\n enterTimer.clear();\n leaveTimer.start(leaveDelay, () => {\n handleClose(event);\n });\n };\n const [, setChildIsFocusVisible] = React.useState(false);\n const handleBlur = event => {\n // Needed for https://github.com/mui/material-ui/issues/45373\n const target = event?.target ?? childNode;\n if (!target || !isFocusVisible(target)) {\n setChildIsFocusVisible(false);\n\n // InputBase can call onBlur() without an event when the input becomes disabled.\n // Tooltip must not assume an event object exists.\n const closeEvent = event ?? new Event('blur');\n\n // `new Event('blur')` has `target/currentTarget === null`, but Tooltip's close logic\n // (and user callbacks like onClose) may expect them to reference the anchor element.\n if (!event && target) {\n Object.defineProperty(closeEvent, 'target', {\n value: target\n });\n Object.defineProperty(closeEvent, 'currentTarget', {\n value: target\n });\n }\n handleMouseLeave(closeEvent);\n }\n };\n const handleFocus = event => {\n // Workaround for https://github.com/facebook/react/issues/7769\n // The autoFocus of React might trigger the event before the componentDidMount.\n // We need to account for this eventuality.\n if (!childNode) {\n setChildNode(event.currentTarget);\n }\n if (isFocusVisible(event.target)) {\n setChildIsFocusVisible(true);\n handleMouseOver(event);\n }\n };\n const detectTouchStart = event => {\n ignoreNonTouchEvents.current = true;\n const childrenProps = children.props;\n if (childrenProps.onTouchStart) {\n childrenProps.onTouchStart(event);\n }\n };\n const handleTouchStart = event => {\n detectTouchStart(event);\n leaveTimer.clear();\n closeTimer.clear();\n stopTouchInteraction();\n prevUserSelect.current = document.body.style.WebkitUserSelect;\n // Prevent iOS text selection on long-tap.\n document.body.style.WebkitUserSelect = 'none';\n touchTimer.start(enterTouchDelay, () => {\n document.body.style.WebkitUserSelect = prevUserSelect.current;\n handleMouseOver(event);\n });\n };\n const handleTouchEnd = event => {\n if (children.props.onTouchEnd) {\n children.props.onTouchEnd(event);\n }\n stopTouchInteraction();\n leaveTimer.start(leaveTouchDelay, () => {\n handleClose(event);\n });\n };\n React.useEffect(() => {\n if (!open) {\n return undefined;\n }\n\n /**\n * @param {KeyboardEvent} nativeEvent\n */\n function handleKeyDown(nativeEvent) {\n if (nativeEvent.key === 'Escape') {\n handleClose(nativeEvent);\n }\n }\n document.addEventListener('keydown', handleKeyDown);\n return () => {\n document.removeEventListener('keydown', handleKeyDown);\n };\n }, [handleClose, open]);\n const handleRef = useForkRef(getReactElementRef(children), setChildNode, ref);\n\n // There is no point in displaying an empty tooltip.\n // So we exclude all falsy values, except 0, which is valid.\n if (!title && title !== 0) {\n open = false;\n }\n const popperRef = React.useRef();\n const handleMouseMove = event => {\n const childrenProps = children.props;\n if (childrenProps.onMouseMove) {\n childrenProps.onMouseMove(event);\n }\n cursorPosition = {\n x: event.clientX,\n y: event.clientY\n };\n if (popperRef.current) {\n popperRef.current.update();\n }\n };\n const nameOrDescProps = {};\n const titleIsString = typeof title === 'string';\n if (describeChild) {\n nameOrDescProps.title = !open && titleIsString && !disableHoverListener ? title : null;\n nameOrDescProps['aria-describedby'] = open ? id : null;\n } else {\n nameOrDescProps['aria-label'] = titleIsString ? title : null;\n nameOrDescProps['aria-labelledby'] = open && !titleIsString ? id : null;\n }\n const childrenProps = {\n ...nameOrDescProps,\n ...other,\n ...children.props,\n className: clsx(other.className, children.props.className),\n onTouchStart: detectTouchStart,\n ref: handleRef,\n ...(followCursor ? {\n onMouseMove: handleMouseMove\n } : {})\n };\n if (process.env.NODE_ENV !== 'production') {\n childrenProps['data-mui-internal-clone-element'] = true;\n\n // TODO: uncomment once we enable eslint-plugin-react-compiler // eslint-disable-next-line react-compiler/react-compiler\n // eslint-disable-next-line react-hooks/rules-of-hooks -- process.env never changes\n React.useEffect(() => {\n if (childNode && !childNode.getAttribute('data-mui-internal-clone-element')) {\n console.error(['MUI: The `children` component of the Tooltip is not forwarding its props correctly.', 'Please make sure that props are spread on the same element that the ref is applied to.'].join('\\n'));\n }\n }, [childNode]);\n }\n const interactiveWrapperListeners = {};\n if (!disableTouchListener) {\n childrenProps.onTouchStart = handleTouchStart;\n childrenProps.onTouchEnd = handleTouchEnd;\n }\n if (!disableHoverListener) {\n childrenProps.onMouseOver = composeEventHandler(handleMouseOver, childrenProps.onMouseOver);\n childrenProps.onMouseLeave = composeEventHandler(handleMouseLeave, childrenProps.onMouseLeave);\n if (!disableInteractive) {\n interactiveWrapperListeners.onMouseOver = handleMouseOver;\n interactiveWrapperListeners.onMouseLeave = handleMouseLeave;\n }\n }\n if (!disableFocusListener) {\n childrenProps.onFocus = composeEventHandler(handleFocus, childrenProps.onFocus);\n childrenProps.onBlur = composeEventHandler(handleBlur, childrenProps.onBlur);\n if (!disableInteractive) {\n interactiveWrapperListeners.onFocus = handleFocus;\n interactiveWrapperListeners.onBlur = handleBlur;\n }\n }\n if (process.env.NODE_ENV !== 'production') {\n if (children.props.title) {\n console.error(['MUI: You have provided a `title` prop to the child of <Tooltip />.', `Remove this title prop \\`${children.props.title}\\` or the Tooltip component.`].join('\\n'));\n }\n }\n const ownerState = {\n ...props,\n isRtl,\n arrow,\n disableInteractive,\n placement,\n PopperComponentProp,\n touch: ignoreNonTouchEvents.current\n };\n const resolvedPopperProps = typeof slotProps.popper === 'function' ? slotProps.popper(ownerState) : slotProps.popper;\n const popperOptions = React.useMemo(() => {\n let tooltipModifiers = [{\n name: 'arrow',\n enabled: Boolean(arrowRef),\n options: {\n element: arrowRef,\n padding: 4\n }\n }];\n if (PopperProps.popperOptions?.modifiers) {\n tooltipModifiers = tooltipModifiers.concat(PopperProps.popperOptions.modifiers);\n }\n if (resolvedPopperProps?.popperOptions?.modifiers) {\n tooltipModifiers = tooltipModifiers.concat(resolvedPopperProps.popperOptions.modifiers);\n }\n return {\n ...PopperProps.popperOptions,\n ...resolvedPopperProps?.popperOptions,\n modifiers: tooltipModifiers\n };\n }, [arrowRef, PopperProps.popperOptions, resolvedPopperProps?.popperOptions]);\n const classes = useUtilityClasses(ownerState);\n const resolvedTransitionProps = typeof slotProps.transition === 'function' ? slotProps.transition(ownerState) : slotProps.transition;\n const externalForwardedProps = {\n slots: {\n popper: components.Popper,\n transition: components.Transition ?? TransitionComponentProp,\n tooltip: components.Tooltip,\n arrow: components.Arrow,\n ...slots\n },\n slotProps: {\n arrow: slotProps.arrow ?? componentsProps.arrow,\n popper: {\n ...PopperProps,\n ...(resolvedPopperProps ?? componentsProps.popper)\n },\n // resolvedPopperProps can be spread because it's already an object\n tooltip: slotProps.tooltip ?? componentsProps.tooltip,\n transition: {\n ...TransitionProps,\n ...(resolvedTransitionProps ?? componentsProps.transition)\n }\n }\n };\n const [PopperSlot, popperSlotProps] = useSlot('popper', {\n elementType: TooltipPopper,\n externalForwardedProps,\n ownerState,\n className: clsx(classes.popper, PopperProps?.className)\n });\n const [TransitionSlot, transitionSlotProps] = useSlot('transition', {\n elementType: Grow,\n externalForwardedProps,\n ownerState\n });\n const [TooltipSlot, tooltipSlotProps] = useSlot('tooltip', {\n elementType: TooltipTooltip,\n className: classes.tooltip,\n externalForwardedProps,\n ownerState\n });\n const [ArrowSlot, arrowSlotProps] = useSlot('arrow', {\n elementType: TooltipArrow,\n className: classes.arrow,\n externalForwardedProps,\n ownerState,\n ref: setArrowRef\n });\n return /*#__PURE__*/_jsxs(React.Fragment, {\n children: [/*#__PURE__*/React.cloneElement(children, childrenProps), /*#__PURE__*/_jsx(PopperSlot, {\n as: PopperComponentProp ?? Popper,\n placement: placement,\n anchorEl: followCursor ? {\n getBoundingClientRect: () => ({\n top: cursorPosition.y,\n left: cursorPosition.x,\n right: cursorPosition.x,\n bottom: cursorPosition.y,\n width: 0,\n height: 0\n })\n } : childNode,\n popperRef: popperRef,\n open: childNode ? open : false,\n id: id,\n transition: true,\n ...interactiveWrapperListeners,\n ...popperSlotProps,\n popperOptions: popperOptions,\n children: ({\n TransitionProps: TransitionPropsInner\n }) => /*#__PURE__*/_jsx(TransitionSlot, {\n timeout: theme.transitions.duration.shorter,\n ...TransitionPropsInner,\n ...transitionSlotProps,\n children: /*#__PURE__*/_jsxs(TooltipSlot, {\n ...tooltipSlotProps,\n children: [title, arrow ? /*#__PURE__*/_jsx(ArrowSlot, {\n ...arrowSlotProps\n }) : null]\n })\n })\n })]\n });\n});\nprocess.env.NODE_ENV !== \"production\" ? Tooltip.propTypes /* remove-proptypes */ = {\n // ┌────────────────────────────── Warning ──────────────────────────────┐\n // │ These PropTypes are generated from the TypeScript type definitions. │\n // │ To update them, edit the d.ts file and run `pnpm proptypes`. │\n // └─────────────────────────────────────────────────────────────────────┘\n /**\n * If `true`, adds an arrow to the tooltip.\n * @default false\n */\n arrow: PropTypes.bool,\n /**\n * Tooltip reference element.\n */\n children: elementAcceptingRef.isRequired,\n /**\n * Override or extend the styles applied to the component.\n */\n classes: PropTypes.object,\n /**\n * @ignore\n */\n className: PropTypes.string,\n /**\n * The components used for each slot inside.\n *\n * @deprecated use the `slots` prop instead. This prop will be removed in a future major release. See [Migrating from deprecated APIs](https://mui.com/material-ui/migration/migrating-from-deprecated-apis/) for more details.\n *\n * @default {}\n */\n components: PropTypes.shape({\n Arrow: PropTypes.elementType,\n Popper: PropTypes.elementType,\n Tooltip: PropTypes.elementType,\n Transition: PropTypes.elementType\n }),\n /**\n * The extra props for the slot components.\n * You can override the existing props or add new ones.\n *\n * @deprecated use the `slotProps` prop instead. This prop will be removed in a future major release. See [Migrating from deprecated APIs](https://mui.com/material-ui/migration/migrating-from-deprecated-apis/) for more details.\n *\n * @default {}\n */\n componentsProps: PropTypes.shape({\n arrow: PropTypes.object,\n popper: PropTypes.object,\n tooltip: PropTypes.object,\n transition: PropTypes.object\n }),\n /**\n * Set to `true` if the `title` acts as an accessible description.\n * By default the `title` acts as an accessible label for the child.\n * @default false\n */\n describeChild: PropTypes.bool,\n /**\n * Do not respond to focus-visible events.\n * @default false\n */\n disableFocusListener: PropTypes.bool,\n /**\n * Do not respond to hover events.\n * @default false\n */\n disableHoverListener: PropTypes.bool,\n /**\n * Makes a tooltip not interactive, i.e. it will close when the user\n * hovers over the tooltip before the `leaveDelay` is expired.\n * @default false\n */\n disableInteractive: PropTypes.bool,\n /**\n * Do not respond to long press touch events.\n * @default false\n */\n disableTouchListener: PropTypes.bool,\n /**\n * The number of milliseconds to wait before showing the tooltip.\n * This prop won't impact the enter touch delay (`enterTouchDelay`).\n * @default 100\n */\n enterDelay: PropTypes.number,\n /**\n * The number of milliseconds to wait before showing the tooltip when one was already recently opened.\n * @default 0\n */\n enterNextDelay: PropTypes.number,\n /**\n * The number of milliseconds a user must touch the element before showing the tooltip.\n * @default 700\n */\n enterTouchDelay: PropTypes.number,\n /**\n * If `true`, the tooltip follow the cursor over the wrapped element.\n * @default false\n */\n followCursor: PropTypes.bool,\n /**\n * This prop is used to help implement the accessibility logic.\n * If you don't provide this prop. It falls back to a randomly generated id.\n */\n id: PropTypes.string,\n /**\n * The number of milliseconds to wait before hiding the tooltip.\n * This prop won't impact the leave touch delay (`leaveTouchDelay`).\n * @default 0\n */\n leaveDelay: PropTypes.number,\n /**\n * The number of milliseconds after the user stops touching an element before hiding the tooltip.\n * @default 1500\n */\n leaveTouchDelay: PropTypes.number,\n /**\n * Callback fired when the component requests to be closed.\n *\n * @param {React.SyntheticEvent} event The event source of the callback.\n */\n onClose: PropTypes.func,\n /**\n * Callback fired when the component requests to be open.\n *\n * @param {React.SyntheticEvent} event The event source of the callback.\n */\n onOpen: PropTypes.func,\n /**\n * If `true`, the component is shown.\n */\n open: PropTypes.bool,\n /**\n * Tooltip placement.\n * @default 'bottom'\n */\n placement: PropTypes.oneOf(['auto-end', 'auto-start', 'auto', 'bottom-end', 'bottom-start', 'bottom', 'left-end', 'left-start', 'left', 'right-end', 'right-start', 'right', 'top-end', 'top-start', 'top']),\n /**\n * The component used for the popper.\n * @deprecated use the `slots.popper` prop instead. This prop will be removed in a future major release. See [Migrating from deprecated APIs](https://mui.com/material-ui/migration/migrating-from-deprecated-apis/) for more details.\n */\n PopperComponent: PropTypes.elementType,\n /**\n * Props applied to the [`Popper`](https://mui.com/material-ui/api/popper/) element.\n * @deprecated use the `slotProps.popper` prop instead. This prop will be removed in a future major release. See [Migrating from deprecated APIs](https://mui.com/material-ui/migration/migrating-from-deprecated-apis/) for more details.\n * @default {}\n */\n PopperProps: PropTypes.object,\n /**\n * The props used for each slot inside.\n * @default {}\n */\n slotProps: PropTypes.shape({\n arrow: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),\n popper: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),\n tooltip: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),\n transition: PropTypes.oneOfType([PropTypes.func, PropTypes.object])\n }),\n /**\n * The components used for each slot inside.\n * @default {}\n */\n slots: PropTypes.shape({\n arrow: PropTypes.elementType,\n popper: PropTypes.elementType,\n tooltip: PropTypes.elementType,\n transition: PropTypes.elementType\n }),\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),\n /**\n * Tooltip title. Zero-length titles string, undefined, null and false are never displayed.\n */\n title: PropTypes.node,\n /**\n * The component used for the transition.\n * [Follow this guide](https://mui.com/material-ui/transitions/#transitioncomponent-prop) to learn more about the requirements for this component.\n * @deprecated use the `slots.transition` prop instead. This prop will be removed in a future major release. See [Migrating from deprecated APIs](https://mui.com/material-ui/migration/migrating-from-deprecated-apis/) for more details.\n */\n TransitionComponent: PropTypes.elementType,\n /**\n * Props applied to the transition element.\n * By default, the element is based on this [`Transition`](https://reactcommunity.org/react-transition-group/transition/) component.\n * @deprecated use the `slotProps.transition` prop instead. This prop will be removed in a future major release. See [Migrating from deprecated APIs](https://mui.com/material-ui/migration/migrating-from-deprecated-apis/) for more details.\n * @default {}\n */\n TransitionProps: PropTypes.object\n} : void 0;\nexport default Tooltip;","//#region src/index.ts\nvar e = class e extends CustomEvent {\n\tstatic {\n\t\tthis.TYPE = \"model.updated\";\n\t}\n\tconstructor(t, n = !1) {\n\t\tsuper(e.TYPE, {\n\t\t\tbubbles: !0,\n\t\t\tdetail: {\n\t\t\t\tupdate: t,\n\t\t\t\treset: n\n\t\t\t}\n\t\t}), this.update = t, this.reset = n;\n\t}\n}, t = class e extends CustomEvent {\n\tstatic {\n\t\tthis.TYPE = \"delete.image\";\n\t}\n\tconstructor(t, n) {\n\t\tsuper(e.TYPE, {\n\t\t\tbubbles: !0,\n\t\t\tdetail: {\n\t\t\t\tsrc: t,\n\t\t\t\tdone: n\n\t\t\t}\n\t\t}), this.src = t, this.done = n;\n\t}\n}, n = class e extends CustomEvent {\n\tstatic {\n\t\tthis.TYPE = \"insert.image\";\n\t}\n\tconstructor(t) {\n\t\tsuper(e.TYPE, {\n\t\t\tbubbles: !0,\n\t\t\tdetail: t\n\t\t}), this.handler = t;\n\t}\n}, r = class e extends CustomEvent {\n\tstatic {\n\t\tthis.TYPE = \"delete.sound\";\n\t}\n\tconstructor(t, n) {\n\t\tsuper(e.TYPE, {\n\t\t\tbubbles: !0,\n\t\t\tdetail: {\n\t\t\t\tsrc: t,\n\t\t\t\tdone: n\n\t\t\t}\n\t\t}), this.src = t, this.done = n;\n\t}\n}, i = class e extends CustomEvent {\n\tstatic {\n\t\tthis.TYPE = \"insert.sound\";\n\t}\n\tconstructor(t) {\n\t\tsuper(e.TYPE, {\n\t\t\tbubbles: !0,\n\t\t\tdetail: t\n\t\t}), this.handler = t;\n\t}\n};\n//#endregion\nexport { t as DeleteImageEvent, r as DeleteSoundEvent, n as InsertImageEvent, i as InsertSoundEvent, e as ModelUpdatedEvent };\n","// @ts-nocheck\n/**\n * @synced-from pie-elements/packages/categorize/configure/src/design/utils.js\n * @auto-generated\n *\n * This file is automatically synced from pie-elements and converted to TypeScript.\n * Manual edits will be overwritten on next sync.\n * To make changes, edit the upstream JavaScript file and run sync again.\n */\n\nexport const getPluginProps = (props = {}, baseInputConfiguration = {}) => ({\n ...baseInputConfiguration,\n ...props,\n});\n","\"use client\";\n\nimport createSvgIcon from \"./utils/createSvgIcon.js\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport default createSvgIcon(/*#__PURE__*/_jsx(\"path\", {\n d: \"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m1 15h-2v-6h2zm0-8h-2V7h2z\"\n}), 'Info');","// @ts-nocheck\n/**\n * @synced-from pie-elements/packages/categorize/configure/src/design/input-header.jsx\n * @auto-generated\n *\n * This file is automatically synced from pie-elements and converted to TypeScript.\n * Manual edits will be overwritten on next sync.\n * To make changes, edit the upstream JavaScript file and run sync again.\n */\n\nimport { getPluginProps } from './utils.js';\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport { styled } from '@mui/material/styles';\nimport EditableHtml from '@pie-lib/editable-html-tip-tap';\n\nconst StyledEditableHtml: any = styled(EditableHtml)({\n flex: '1',\n maxWidth: '100%',\n});\n\nconst InputHeaderContainer: any = styled('div')(({ theme }) => ({\n display: 'flex',\n justifyContent: 'space-between',\n paddingBottom: theme.spacing(1),\n}));\n\nexport class InputHeader extends React.Component {\n static propTypes = {\n configuration: PropTypes.object.isRequired,\n deleteFocusedEl: PropTypes.func,\n disabled: PropTypes.bool,\n focusedEl: PropTypes.number,\n index: PropTypes.number,\n label: PropTypes.string,\n maxImageWidth: PropTypes.object,\n maxImageHeight: PropTypes.object,\n onChange: PropTypes.func,\n onDelete: PropTypes.func,\n imageSupport: PropTypes.shape({\n add: PropTypes.func.isRequired,\n delete: PropTypes.func.isRequired,\n }),\n uploadSoundSupport: PropTypes.shape({\n add: PropTypes.func.isRequired,\n delete: PropTypes.func.isRequired,\n }),\n toolbarOpts: PropTypes.object,\n error: PropTypes.string,\n spellCheck: PropTypes.bool,\n };\n\n static defaultProps = {};\n\n constructor(props) {\n super(props);\n }\n\n render() {\n const {\n onChange,\n configuration,\n label,\n deleteFocusedEl,\n disabled,\n imageSupport,\n toolbarOpts,\n spellCheck,\n error,\n maxImageWidth,\n maxImageHeight,\n uploadSoundSupport,\n mathMlOptions = {},\n focusedEl,\n index,\n } = this.props;\n\n const { headers, baseInputConfiguration } = configuration;\n const shouldAutoFocus = focusedEl !== null && focusedEl !== undefined && focusedEl === index;\n\n return (\n <InputHeaderContainer>\n <StyledEditableHtml\n imageSupport={imageSupport}\n disabled={disabled}\n autoFocus={shouldAutoFocus}\n autoWidthToolbar\n label={'label'}\n markup={label}\n onChange={onChange}\n pluginProps={getPluginProps(headers?.inputConfiguration, baseInputConfiguration)}\n toolbarOpts={toolbarOpts}\n spellCheck={spellCheck}\n error={error}\n maxImageWidth={maxImageWidth}\n maxImageHeight={maxImageHeight}\n uploadSoundSupport={uploadSoundSupport}\n languageCharactersProps={[{ language: 'spanish' }, { language: 'special' }]}\n onDone={() => {\n deleteFocusedEl && deleteFocusedEl();\n }}\n mathMlOptions={mathMlOptions}\n />\n </InputHeaderContainer>\n );\n }\n}\n\nexport default InputHeader;\n","// @ts-nocheck\n/**\n * @synced-from pie-elements/packages/categorize/configure/src/design/buttons.jsx\n * @auto-generated\n *\n * This file is automatically synced from pie-elements and converted to TypeScript.\n * Manual edits will be overwritten on next sync.\n * To make changes, edit the upstream JavaScript file and run sync again.\n */\n\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport { styled } from '@mui/material/styles';\nimport Button from '@mui/material/Button';\n\nconst StyledAddButton: any = styled(Button)(({ theme }) => ({\n height: theme.spacing(4),\n}));\n\nexport class RawAddButton extends React.Component {\n static propTypes = {\n label: PropTypes.string,\n onClick: PropTypes.func,\n disabled: PropTypes.bool,\n };\n\n static defaultProps = {\n label: 'Add',\n };\n\n render() {\n const { label, onClick, disabled } = this.props;\n return (\n <StyledAddButton\n onClick={onClick}\n disabled={disabled}\n size=\"small\"\n variant=\"contained\"\n color=\"primary\"\n >\n {label}\n </StyledAddButton>\n );\n }\n}\n\nconst AddButton = RawAddButton;\n\nconst StyledDeleteButton: any = styled(Button)({\n margin: 0,\n padding: 0,\n});\n\nconst DeleteButton = ({ label, onClick, disabled }) => (\n <StyledDeleteButton onClick={onClick} size=\"small\" color=\"primary\" disabled={disabled}>\n {label}\n </StyledDeleteButton>\n);\n\nexport { AddButton, DeleteButton };\n","\"use client\";\n\nimport createSvgIcon from \"./utils/createSvgIcon.js\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport default createSvgIcon(/*#__PURE__*/_jsx(\"path\", {\n d: \"M7 11v2h10v-2zm5-9C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8\"\n}), 'RemoveCircleOutline');","// @ts-nocheck\n/**\n * @synced-from pie-elements/packages/categorize/configure/src/design/categories/choice-preview.jsx\n * @auto-generated\n *\n * This file is automatically synced from pie-elements and converted to TypeScript.\n * Manual edits will be overwritten on next sync.\n * To make changes, edit the upstream JavaScript file and run sync again.\n */\n\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport { styled } from '@mui/material/styles';\nimport { DraggableChoice } from '@pie-lib/drag';\nimport IconButton from '@mui/material/IconButton';\nimport RemoveCircleOutlineIcon from '@mui/icons-material/RemoveCircleOutline';\nimport { HtmlAndMath as HtmlAndMathImport } from '@pie-lib/render-ui';\n\nfunction isRenderableReactInteropType(value: any) {\n return (\n typeof value === 'function' ||\n (typeof value === 'object' && value !== null && typeof value.$$typeof === 'symbol')\n );\n}\n\nfunction unwrapReactInteropSymbol(maybeSymbol: any, namedExport?: string) {\n if (!maybeSymbol) return maybeSymbol;\n if (isRenderableReactInteropType(maybeSymbol)) return maybeSymbol;\n if (isRenderableReactInteropType(maybeSymbol.default)) return maybeSymbol.default;\n if (namedExport && isRenderableReactInteropType(maybeSymbol[namedExport])) {\n return maybeSymbol[namedExport];\n }\n if (namedExport && isRenderableReactInteropType(maybeSymbol[namedExport]?.default)) {\n return maybeSymbol[namedExport].default;\n }\n return maybeSymbol;\n}\nconst HtmlAndMath = unwrapReactInteropSymbol(HtmlAndMathImport, 'HtmlAndMath') || unwrapReactInteropSymbol(renderUi.HtmlAndMath, 'HtmlAndMath');\nimport * as RenderUiNamespace from '@pie-lib/render-ui';\nconst renderUiNamespaceAny = RenderUiNamespace as any;\nconst renderUiDefaultMaybe = renderUiNamespaceAny['default'];\nconst renderUi =\n renderUiDefaultMaybe && typeof renderUiDefaultMaybe === 'object'\n ? renderUiDefaultMaybe\n : renderUiNamespaceAny;\nimport { color } from '@pie-lib/render-ui';\n\nconst ChoicePreviewContainer: any = styled('div')({\n position: 'relative',\n overflow: 'auto',\n touchAction: 'none',\n});\n\nconst DeleteIconButton: any = styled(IconButton)({\n position: 'absolute',\n right: 0,\n top: 0,\n color: `${color.tertiary()} !important`,\n});\n\nexport class ChoicePreview extends React.Component {\n static propTypes = {\n alternateResponseIndex: PropTypes.number,\n category: PropTypes.object,\n choice: PropTypes.object.isRequired,\n choiceIndex: PropTypes.number,\n onDelete: PropTypes.func,\n };\n static defaultProps = {\n onDelete: () => {},\n };\n\n delete: any = () => {\n const { onDelete, choice } = this.props;\n onDelete(choice);\n };\n\n render() {\n const { alternateResponseIndex, category, choice, choiceIndex } = this.props;\n\n // Generate unique ID for each instance to distinguish multiple instances of the same choice\n const categoryId = category && category.id;\n const uniqueId =\n alternateResponseIndex !== undefined\n ? `${choice.id}-${categoryId}-${choiceIndex}-alt-${alternateResponseIndex}`\n : `${choice.id}-${categoryId}-${choiceIndex}`;\n\n return (\n <ChoicePreviewContainer>\n {choice ? (\n <DraggableChoice\n alternateResponseIndex={alternateResponseIndex}\n category={category}\n choice={choice}\n choiceIndex={choiceIndex}\n onRemoveChoice={this.delete}\n type={'choice-preview'}\n id={uniqueId}\n categoryId={categoryId}\n >\n <HtmlAndMath html={choice?.content} />\n </DraggableChoice>\n ) : null}\n <DeleteIconButton aria-label=\"delete\" onClick={this.delete} size=\"large\">\n <RemoveCircleOutlineIcon />\n </DeleteIconButton>\n </ChoicePreviewContainer>\n );\n }\n}\n\nexport default ChoicePreview;\n","// @ts-nocheck\n/**\n * @synced-from pie-elements/packages/categorize/configure/src/design/categories/droppable-placeholder.jsx\n * @auto-generated\n *\n * This file is automatically synced from pie-elements and converted to TypeScript.\n * Manual edits will be overwritten on next sync.\n * To make changes, edit the upstream JavaScript file and run sync again.\n */\n\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport { styled } from '@mui/material/styles';\nimport ChoicePreview from './choice-preview.js';\nimport { useDroppable } from '@dnd-kit/core';\nimport { uid, PlaceHolder } from '@pie-lib/drag';\nimport debug from 'debug';\n\nconst log = debug('@pie-element:categorize:configure');\n\nconst HelperText: any = styled('div')(({ theme }) => ({\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n fontSize: theme.typography.fontSize - 2,\n color: `rgba(${theme.palette.common.black}, 0.4)`,\n width: '100%',\n height: '100%',\n}));\n\nconst Helper = () => <HelperText>Drag your correct answers here</HelperText>;\n\nconst Previews = ({ alternateResponseIndex, category, choices, onDeleteChoice }) => (\n <React.Fragment>\n {(choices || []).map((c, index) =>\n c && (\n <ChoicePreview\n alternateResponseIndex={alternateResponseIndex}\n category={category}\n choice={c}\n key={index}\n choiceIndex={index}\n onDelete={(choice) => onDeleteChoice(choice, index)}\n />\n )\n )}\n </React.Fragment>\n);\n\nPreviews.propTypes = {\n alternateResponseIndex: PropTypes.number,\n category: PropTypes.object,\n choices: PropTypes.array,\n onDeleteChoice: PropTypes.func,\n};\n\nconst DroppablePlaceHolder = ({\n alternateResponseIndex,\n category,\n choices,\n onDeleteChoice,\n categoryId,\n isAlternate\n}) => {\n const { setNodeRef, isOver } = useDroppable({\n id: `${categoryId}-${isAlternate ? 'alternate' : 'standard'}`,\n data: {\n accepts: ['choice', 'choice-preview'],\n alternateResponseIndex,\n categoryId,\n type: isAlternate ? 'category-alternate' : 'category',\n id: categoryId,\n },\n });\n\n return (\n <div ref={setNodeRef}>\n <PlaceHolder\n isOver={isOver}\n extraStyles={{\n width: '100%',\n minHeight: '100px',\n height: 'auto',\n }}>\n {(choices || []).length === 0 ? (\n <Helper />\n ) : (\n <Previews\n alternateResponseIndex={alternateResponseIndex}\n category={category}\n choices={choices}\n onDeleteChoice={onDeleteChoice}\n />\n )}\n </PlaceHolder>\n </div>\n );\n};\n\nDroppablePlaceHolder.propTypes = {\n alternateResponseIndex: PropTypes.number,\n category: PropTypes.object,\n choices: PropTypes.array,\n onDeleteChoice: PropTypes.func,\n categoryId: PropTypes.string.isRequired,\n isAlternate: PropTypes.bool,\n};\n\nexport default uid.withUid(DroppablePlaceHolder);\n","// @ts-nocheck\n/**\n * @synced-from pie-elements/packages/categorize/configure/src/design/categories/category.jsx\n * @auto-generated\n *\n * This file is automatically synced from pie-elements and converted to TypeScript.\n * Manual edits will be overwritten on next sync.\n * To make changes, edit the upstream JavaScript file and run sync again.\n */\n\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport { styled } from '@mui/material/styles';\nimport Card from '@mui/material/Card';\nimport CardActions from '@mui/material/CardActions';\n\nimport InputHeader from '../input-header.js';\nimport { DeleteButton } from '../buttons.js';\nimport PlaceHolder from './droppable-placeholder.js';\n\nconst StyledCard: any = styled(Card, {\n shouldForwardProp: (prop) => prop !== 'isDuplicated',\n})(({ theme, isDuplicated }) => ({\n minWidth: '196px',\n padding: theme.spacing(1),\n overflow: 'visible',\n ...(isDuplicated && {\n border: '1px solid red',\n }),\n}));\n\nconst StyledCardActions: any = styled(CardActions)(({ theme }) => ({\n padding: `${theme.spacing(1)} 0 0`,\n}));\n\nconst CategoryHeader: any = styled('div')(({ theme }) => ({\n padding: theme.spacing(2),\n '& p': {\n margin: 0,\n },\n}));\n\nconst ErrorText: any = styled('div')(({ theme }) => ({\n fontSize: theme.typography.fontSize - 2,\n color: theme.palette.error.main,\n paddingBottom: theme.spacing(1),\n}));\n\nexport class Category extends React.Component {\n static propTypes = {\n alternateResponseIndex: PropTypes.number,\n category: PropTypes.object.isRequired,\n configuration: PropTypes.object.isRequired,\n defaultImageMaxHeight: PropTypes.number,\n defaultImageMaxWidth: PropTypes.number,\n deleteFocusedEl: PropTypes.func,\n focusedEl: PropTypes.number,\n index: PropTypes.number,\n error: PropTypes.string,\n isDuplicated: PropTypes.bool,\n maxImageWidth: PropTypes.object,\n maxImageHeight: PropTypes.object,\n onChange: PropTypes.func,\n onDelete: PropTypes.func,\n onDeleteChoice: PropTypes.func,\n imageSupport: PropTypes.shape({\n add: PropTypes.func.isRequired,\n delete: PropTypes.func.isRequired,\n }),\n toolbarOpts: PropTypes.object,\n spellCheck: PropTypes.bool,\n uploadSoundSupport: PropTypes.shape({\n add: PropTypes.func.isRequired,\n delete: PropTypes.func.isRequired,\n }),\n isAlternate: PropTypes.bool,\n };\n\n static defaultProps = {};\n\n changeLabel: any = (l) => {\n const { category, onChange } = this.props;\n category.label = l;\n onChange(category);\n };\n\n render() {\n const {\n alternateResponseIndex,\n category,\n configuration,\n deleteFocusedEl,\n focusedEl,\n index,\n error,\n isDuplicated,\n onDelete,\n onDeleteChoice,\n imageSupport,\n spellCheck,\n toolbarOpts,\n maxImageWidth,\n maxImageHeight,\n uploadSoundSupport,\n mathMlOptions = {},\n } = this.props;\n const isCategoryHeaderDisabled = !!alternateResponseIndex || alternateResponseIndex === 0;\n\n return (\n <StyledCard isDuplicated={isDuplicated}>\n <span>\n {!isCategoryHeaderDisabled ? (\n <InputHeader\n label={category.label}\n focusedEl={focusedEl}\n deleteFocusedEl={deleteFocusedEl}\n index={index}\n disabled={!!alternateResponseIndex || alternateResponseIndex === 0}\n error={error}\n onChange={this.changeLabel}\n onDelete={onDelete}\n imageSupport={imageSupport}\n toolbarOpts={toolbarOpts}\n spellCheck={spellCheck}\n maxImageWidth={maxImageWidth}\n maxImageHeight={maxImageHeight}\n uploadSoundSupport={uploadSoundSupport}\n mathMlOptions={mathMlOptions}\n configuration={configuration}\n />\n ) : (\n <CategoryHeader\n dangerouslySetInnerHTML={{\n __html: category.label,\n }}\n />\n )}\n {error && <ErrorText>{error}</ErrorText>}\n </span>\n <PlaceHolder\n alternateResponseIndex={alternateResponseIndex}\n category={category}\n choices={category.choices}\n onDeleteChoice={onDeleteChoice}\n categoryId={category.id}\n extraStyles={{ minHeight: '100px', }}\n isAlternate={this.props.isAlternate}\n />\n {onDelete && (\n <StyledCardActions>\n <DeleteButton label={'delete'} onClick={onDelete} />\n </StyledCardActions>\n )}\n </StyledCard>\n );\n }\n}\n\nexport default Category;\n","// @ts-nocheck\n/**\n * @synced-from pie-elements/packages/categorize/configure/src/design/header.jsx\n * @auto-generated\n *\n * This file is automatically synced from pie-elements and converted to TypeScript.\n * Manual edits will be overwritten on next sync.\n * To make changes, edit the upstream JavaScript file and run sync again.\n */\n\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport Tooltip from '@mui/material/Tooltip';\nimport Typography from '@mui/material/Typography';\nimport { styled } from '@mui/material/styles';\nimport { AddButton } from './buttons.js';\n\nconst HeaderContainer: any = styled('div')(({ theme }) => ({\n display: 'flex',\n justifyContent: 'space-between',\n marginBottom: theme.spacing(1),\n}));\n\nconst TitleContainer: any = styled('div')({\n display: 'flex',\n alignItems: 'center',\n});\n\nconst StyledTooltip: any = styled(Tooltip)(({ theme }) => ({\n '& .MuiTooltip-tooltip': {\n fontSize: theme.typography.fontSize - 2,\n whiteSpace: 'pre',\n maxWidth: '500px',\n },\n}));\n\nexport class Header extends React.Component {\n static propTypes = {\n buttonLabel: PropTypes.string,\n onAdd: PropTypes.func.isRequired,\n label: PropTypes.string.isRequired,\n info: PropTypes.any,\n buttonDisabled: PropTypes.bool,\n variant: PropTypes.string,\n tooltip: PropTypes.string,\n };\n\n static defaultProps = {};\n\n render() {\n const { onAdd, label, buttonLabel, info, buttonDisabled, variant, tooltip } = this.props;\n return (\n <HeaderContainer>\n <TitleContainer>\n <Typography variant={variant || 'title'}>\n {label}\n </Typography>\n {info}\n </TitleContainer>\n <StyledTooltip\n title={tooltip || ''}\n enterTouchDelay={50}\n leaveTouchDelay={3000}\n >\n <span>\n <AddButton onClick={onAdd} label={buttonLabel} disabled={buttonDisabled} />\n </span>\n </StyledTooltip>\n </HeaderContainer>\n );\n }\n}\n\nexport default Header;\n","// @ts-nocheck\n/**\n * @synced-from pie-elements/packages/categorize/configure/src/utils.js\n * @auto-generated\n *\n * This file is automatically synced from pie-elements and converted to TypeScript.\n * Manual edits will be overwritten on next sync.\n * To make changes, edit the upstream JavaScript file and run sync again.\n */\n\nexport const generateValidationMessage = (config) => {\n let { minChoices, maxChoices, maxCategories } = config || {};\n minChoices = minChoices || 1;\n\n const validationMessage =\n '\\nThe choices content should ' +\n 'not be empty and should be unique.\\nThere should be at least 1 ' +\n (maxCategories ? `and at most ${maxCategories} ` : '') +\n 'category' +\n (maxCategories ? 's' : '') +\n ' defined.' +\n (minChoices ? `\\nThere should be at least ${minChoices} choices defined.` : '') +\n (maxChoices ? `\\nNo more than ${maxChoices} choices should be defined.` : '') +\n '\\nAt least one token should be assigned to at least one category.';\n\n return 'Validation requirements:' + validationMessage;\n};\n\n// used in controller too, for consistency modify it there too\nexport const multiplePlacements = { enabled: 'Yes', disabled: 'No', perChoice: 'Set Per Choice' };\n\n// Find the length of the largest array from an array\nexport const maxLength = (array) =>\n (array || []).reduce((max, arr) => {\n return Math.max(max, arr.length);\n }, 0);\n\nexport const getMaxCategoryChoices = (model) => {\n const { correctResponse = [] } = model || {};\n return correctResponse.reduce((max, correctRes) => {\n const correctRespLength = correctRes?.choices?.length || 0;\n const alternates = correctRes?.alternateResponses || [];\n const maxChoices = Math.max(correctRespLength, maxLength(alternates));\n return maxChoices > max ? maxChoices : max;\n }, 0);\n};\n","// @ts-nocheck\n/**\n * @synced-from pie-elements/packages/categorize/configure/src/design/categories/RowLabel.jsx\n * @auto-generated\n *\n * This file is automatically synced from pie-elements and converted to TypeScript.\n * Manual edits will be overwritten on next sync.\n * To make changes, edit the upstream JavaScript file and run sync again.\n */\n\nimport { getPluginProps } from '../utils.js';\nimport React from 'react';\nimport { styled } from '@mui/material/styles';\nimport EditableHtml from '@pie-lib/editable-html-tip-tap';\nimport { InputContainer as InputContainerImport } from '@pie-lib/render-ui';\n\nfunction isRenderableReactInteropType(value: any) {\n return (\n typeof value === 'function' ||\n (typeof value === 'object' && value !== null && typeof value.$$typeof === 'symbol')\n );\n}\n\nfunction unwrapReactInteropSymbol(maybeSymbol: any, namedExport?: string) {\n if (!maybeSymbol) return maybeSymbol;\n if (isRenderableReactInteropType(maybeSymbol)) return maybeSymbol;\n if (isRenderableReactInteropType(maybeSymbol.default)) return maybeSymbol.default;\n if (namedExport && isRenderableReactInteropType(maybeSymbol[namedExport])) {\n return maybeSymbol[namedExport];\n }\n if (namedExport && isRenderableReactInteropType(maybeSymbol[namedExport]?.default)) {\n return maybeSymbol[namedExport].default;\n }\n return maybeSymbol;\n}\nconst InputContainer = unwrapReactInteropSymbol(InputContainerImport, 'InputContainer') || unwrapReactInteropSymbol(renderUi.InputContainer, 'InputContainer');\nimport * as RenderUiNamespace from '@pie-lib/render-ui';\nconst renderUiNamespaceAny = RenderUiNamespace as any;\nconst renderUiDefaultMaybe = renderUiNamespaceAny['default'];\nconst renderUi =\n renderUiDefaultMaybe && typeof renderUiDefaultMaybe === 'object'\n ? renderUiDefaultMaybe\n : renderUiNamespaceAny;\nconst RowLabelContainer: any = styled(InputContainer)(({ theme }) => ({\n width: '100%',\n paddingTop: theme.spacing(1),\n marginTop: theme.spacing(1),\n}));\n\nexport const RowLabel = ({\n categoriesPerRow,\n configuration,\n disabled,\n markup,\n imageSupport,\n onChange,\n toolbarOpts,\n spellCheck,\n maxImageWidth,\n maxImageHeight,\n uploadSoundSupport,\n mathMlOptions = {},\n }) => {\n const { rowLabels, baseInputConfiguration } = configuration;\n\n return (\n <div\n style={{\n gridColumn: `1/${categoriesPerRow + 1}`,\n width: '100%',\n }}\n >\n <RowLabelContainer label=\"Row Label\">\n <EditableHtml\n disabled={disabled}\n markup={markup}\n onChange={onChange}\n imageSupport={imageSupport}\n nonEmpty={false}\n toolbarOpts={toolbarOpts}\n pluginProps={getPluginProps(rowLabels?.inputConfiguration, baseInputConfiguration)}\n spellCheck={spellCheck}\n maxImageWidth={maxImageWidth}\n maxImageHeight={maxImageHeight}\n uploadSoundSupport={uploadSoundSupport}\n languageCharactersProps={[{ language: 'spanish' }, { language: 'special' }]}\n mathMlOptions={mathMlOptions}\n />\n </RowLabelContainer>\n </div>\n );\n };\n","// @ts-nocheck\n/**\n * @synced-from pie-elements/packages/categorize/configure/src/design/categories/index.jsx\n * @auto-generated\n *\n * This file is automatically synced from pie-elements and converted to TypeScript.\n * Manual edits will be overwritten on next sync.\n * To make changes, edit the upstream JavaScript file and run sync again.\n */\n\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport { styled } from '@mui/material/styles';\nimport { choiceUtils as utils } from '@pie-lib/config-ui';\nimport Info from '@mui/icons-material/Info';\nimport Tooltip from '@mui/material/Tooltip';\nimport {\n removeCategory,\n removeChoiceFromCategory,\n} from '@pie-lib/categorize';\n\nimport Category from './category.js';\nimport Header from '../header.js';\nimport { generateValidationMessage } from '../../utils.js';\nimport { RowLabel } from './RowLabel.js';\n\nconst CategoriesContainer: any = styled('div')(({ theme }) => ({\n marginBottom: theme.spacing(3),\n}));\n\nconst CategoriesHolder: any = styled('div')(({ theme }) => ({\n display: 'grid',\n gridRowGap: theme.spacing(1),\n gridColumnGap: theme.spacing(1),\n}));\n\nconst StyledTooltip: any = styled(Tooltip)(({ theme }) => ({\n '& .MuiTooltip-tooltip': {\n fontSize: theme.typography.fontSize - 2,\n whiteSpace: 'pre',\n maxWidth: '500px',\n },\n}));\n\nconst ErrorText: any = styled('div')(({ theme }) => ({\n fontSize: theme.typography.fontSize - 2,\n color: theme.palette.error.main,\n paddingTop: theme.spacing(0.5),\n}));\n\nexport class Categories extends React.Component {\n static propTypes = {\n defaultImageMaxHeight: PropTypes.number,\n defaultImageMaxWidth: PropTypes.number,\n imageSupport: PropTypes.shape({\n add: PropTypes.func.isRequired,\n delete: PropTypes.func.isRequired,\n }),\n uploadSoundSupport: PropTypes.shape({\n add: PropTypes.func.isRequired,\n delete: PropTypes.func.isRequired,\n }),\n categories: PropTypes.array,\n onModelChanged: PropTypes.func,\n model: PropTypes.object.isRequired,\n configuration: PropTypes.object.isRequired,\n toolbarOpts: PropTypes.object,\n spellCheck: PropTypes.bool,\n };\n\n state = {\n focusedEl: null,\n };\n\n add: any = () => {\n const { model, categories: oldCategories } = this.props;\n const { categoriesPerRow, correctResponse, allowAlternateEnabled } = model;\n\n const id = utils.firstAvailableIndex(\n model.categories.map((a) => a.id),\n 1,\n );\n const data = { id, label: 'Category ' + id };\n const addRowLabel = model.categories.length % categoriesPerRow === 0;\n const rowLabels = [...model.rowLabels];\n\n if (addRowLabel) {\n rowLabels.push('');\n }\n\n this.setState(\n {\n focusedEl: oldCategories.length,\n },\n () => {\n this.props.onModelChanged({\n rowLabels,\n categories: model.categories.concat([data]),\n correctResponse: allowAlternateEnabled\n ? [...correctResponse, { category: id, choices: [], alternateResponses: [] }]\n : correctResponse,\n });\n },\n );\n };\n\n deleteFocusedEl: any = () => {\n this.setState({\n focusedEl: null,\n });\n };\n\n delete: any = (category) => {\n const { model, onModelChanged } = this.props;\n const index = model.categories.findIndex((a) => a.id === category.id);\n\n if (index !== -1) {\n model.categories.splice(index, 1);\n model.correctResponse = removeCategory(category.id, model.correctResponse);\n onModelChanged(model);\n }\n };\n\n change: any = (c) => {\n const { categories } = this.props;\n const index = categories.findIndex((a) => a.id === c.id);\n\n if (index !== -1) {\n categories.splice(index, 1, c);\n this.props.onModelChanged({ categories });\n }\n };\n\n deleteChoiceFromCategory: any = (category, choice, choiceIndex) => {\n const { model, onModelChanged } = this.props;\n const correctResponse = removeChoiceFromCategory(choice.id, category.id, choiceIndex, model.correctResponse);\n\n onModelChanged({ correctResponse });\n };\n\n changeRowLabel: any = (val, index) => {\n const { model } = this.props;\n const { rowLabels } = model;\n const newRowLabels = [...rowLabels];\n\n if (newRowLabels.length < index) {\n newRowLabels.push(val);\n } else {\n newRowLabels[index] = val;\n }\n\n this.props.onModelChanged({\n rowLabels: newRowLabels,\n });\n };\n\n render() {\n const {\n model,\n categories,\n imageSupport,\n uploadSoundSupport,\n toolbarOpts,\n spellCheck,\n configuration,\n defaultImageMaxHeight,\n defaultImageMaxWidth,\n mathMlOptions = {},\n } = this.props;\n\n const { categoriesPerRow, rowLabels, errors } = model;\n const { associationError, categoriesError, categoriesErrors } = errors || {};\n const { maxCategories, maxImageWidth = {}, maxImageHeight = {} } = configuration || {};\n const holderStyle = {\n gridTemplateColumns: `repeat(${categoriesPerRow}, 1fr)`,\n };\n\n const validationMessage = generateValidationMessage(configuration);\n\n return (\n <CategoriesContainer>\n <Header\n label=\"Categories\"\n buttonLabel=\"ADD A CATEGORY\"\n onAdd={this.add}\n info={\n <StyledTooltip\n disableFocusListener\n disableTouchListener\n placement={'right'}\n title={validationMessage}\n >\n <Info fontSize={'small'} color={'primary'} style={{ marginLeft: '5px' }} />\n </StyledTooltip>\n }\n buttonDisabled={maxCategories && categories && maxCategories === categories.length}\n />\n\n <CategoriesHolder style={holderStyle}>\n {categories.map((category, index) => {\n const hasRowLabel = index % categoriesPerRow === 0;\n const rowIndex = index / categoriesPerRow;\n\n return (\n <React.Fragment key={index}>\n {hasRowLabel && (\n <RowLabel\n categoriesPerRow={categoriesPerRow}\n disabled={false}\n rowIndex={rowIndex}\n markup={rowLabels[rowIndex] || ''}\n onChange={(val) => this.changeRowLabel(val, rowIndex)}\n imageSupport={imageSupport}\n toolbarOpts={toolbarOpts}\n spellCheck={spellCheck}\n maxImageWidth={(maxImageWidth && maxImageWidth.rowLabel) || defaultImageMaxWidth}\n maxImageHeight={(maxImageHeight && maxImageHeight.rowLabel) || defaultImageMaxHeight}\n uploadSoundSupport={uploadSoundSupport}\n mathMlOptions={mathMlOptions}\n configuration={configuration}\n />\n )}\n\n <Category\n imageSupport={imageSupport}\n focusedEl={this.state.focusedEl}\n deleteFocusedEl={this.deleteFocusedEl}\n index={index}\n category={category}\n error={categoriesErrors && categoriesErrors[category.id]}\n onChange={this.change}\n onDelete={() => this.delete(category)}\n toolbarOpts={toolbarOpts}\n spellCheck={spellCheck}\n onDeleteChoice={(choice, choiceIndex) => this.deleteChoiceFromCategory(category, choice, choiceIndex)}\n maxImageWidth={(maxImageWidth && maxImageWidth.categoryLabel) || defaultImageMaxWidth}\n maxImageHeight={(maxImageHeight && maxImageHeight.categoryLabel) || defaultImageMaxHeight}\n uploadSoundSupport={uploadSoundSupport}\n configuration={configuration}\n alternateResponseIndex={undefined}\n />\n </React.Fragment>\n );\n })}\n </CategoriesHolder>\n\n {associationError && <ErrorText>{associationError}</ErrorText>}\n {categoriesError && <ErrorText>{categoriesError}</ErrorText>}\n </CategoriesContainer>\n );\n }\n}\n\nexport default Categories;\n","// @ts-nocheck\n/**\n * @synced-from pie-elements/packages/categorize/configure/src/design/categories/alternateResponses.jsx\n * @auto-generated\n *\n * This file is automatically synced from pie-elements and converted to TypeScript.\n * Manual edits will be overwritten on next sync.\n * To make changes, edit the upstream JavaScript file and run sync again.\n */\n\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport { styled } from '@mui/material/styles';\nimport { removeChoiceFromAlternate } from '@pie-lib/categorize';\n\nimport Category from './category.js';\n\nconst CategoriesContainer: any = styled('div')(({ theme }) => ({\n marginBottom: theme.spacing(2.5),\n}));\n\nconst CategoriesHolder: any = styled('div')(({ theme }) => ({\n display: 'grid',\n gridRowGap: theme.spacing(1),\n gridColumnGap: theme.spacing(1),\n}));\n\nconst RowLabel: any = styled('div')({\n gridColumn: '1 / 3',\n});\n\nexport class AlternateResponses extends React.Component {\n static propTypes = {\n altIndex: PropTypes.number.isRequired,\n configuration: PropTypes.object,\n imageSupport: PropTypes.shape({\n add: PropTypes.func.isRequired,\n delete: PropTypes.func.isRequired,\n }),\n categories: PropTypes.array,\n onModelChanged: PropTypes.func,\n model: PropTypes.object.isRequired,\n uploadSoundSupport: PropTypes.shape({\n add: PropTypes.func.isRequired,\n delete: PropTypes.func.isRequired,\n }),\n spellCheck: PropTypes.bool,\n };\n\n\n deleteChoiceFromCategory: any = (category, choice, choiceIndex) => {\n const { model, altIndex, onModelChanged } = this.props;\n\n const correctResponse = removeChoiceFromAlternate(\n choice.id,\n category.id,\n choiceIndex,\n altIndex,\n model.correctResponse,\n );\n\n onModelChanged({ correctResponse });\n };\n\n render() {\n const {\n altIndex,\n model,\n configuration,\n categories,\n imageSupport,\n spellCheck,\n uploadSoundSupport,\n mathMlOptions = {},\n } = this.props;\n const { categoriesPerRow, errors, rowLabels } = model;\n const { duplicateAlternate } = errors || {};\n\n const holderStyle = {\n gridTemplateColumns: `repeat(${categoriesPerRow}, 1fr)`,\n };\n const isDuplicated = duplicateAlternate ? duplicateAlternate.index === altIndex : false;\n\n return (\n <CategoriesContainer>\n <CategoriesHolder style={holderStyle}>\n {categories.map((category, index) => {\n const hasRowLabel = index % categoriesPerRow === 0;\n const rowIndex = index / categoriesPerRow;\n\n return (\n <React.Fragment key={index}>\n {hasRowLabel && (\n <RowLabel\n style={{\n gridColumn: `1/${categoriesPerRow + 1}`,\n width: '100%',\n }}\n dangerouslySetInnerHTML={{\n __html: rowLabels[rowIndex] || '',\n }}\n />\n )}\n\n <Category\n key={index}\n alternateResponseIndex={altIndex}\n imageSupport={imageSupport}\n isDuplicated={isDuplicated && duplicateAlternate.category === category.id}\n category={category}\n spellCheck={spellCheck}\n onDeleteChoice={(choice, choiceIndex) => this.deleteChoiceFromCategory(category, choice, choiceIndex)}\n uploadSoundSupport={uploadSoundSupport}\n mathMlOptions={mathMlOptions}\n configuration={configuration}\n isAlternate={true}\n />\n </React.Fragment>\n );\n })}\n </CategoriesHolder>\n </CategoriesContainer>\n );\n }\n}\n\nexport default AlternateResponses;\n","\"use client\";\n\nimport createSvgIcon from \"./utils/createSvgIcon.js\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport default createSvgIcon(/*#__PURE__*/_jsx(\"path\", {\n d: \"M20 9H4v2h16zM4 15h16v-2H4z\"\n}), 'DragHandle');","// @ts-nocheck\n/**\n * @synced-from pie-elements/packages/categorize/configure/src/design/choices/choice.jsx\n * @auto-generated\n *\n * This file is automatically synced from pie-elements and converted to TypeScript.\n * Manual edits will be overwritten on next sync.\n * To make changes, edit the upstream JavaScript file and run sync again.\n */\n\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport { styled } from '@mui/material/styles';\nimport Card from '@mui/material/Card';\nimport CardActions from '@mui/material/CardActions';\nimport InputHeader from '../input-header.js';\nimport { Checkbox } from '@pie-lib/config-ui';\nimport { DeleteButton } from '../buttons.js';\nimport DragHandle from '@mui/icons-material/DragHandle';\nimport { useDraggable, useDroppable } from '@dnd-kit/core';\nimport debug from 'debug';\nimport { uid } from '@pie-lib/drag';\nimport { multiplePlacements } from '../../utils.js';\n\nconst log = debug('@pie-element:categorize:configure:choice');\n\nconst canDrag = (props) => {\n if (props.lockChoiceOrder) {\n return true;\n }\n const count = props.choice.categoryCount || 0;\n if (count === 0) {\n return true;\n } else {\n return props.correctResponseCount < count;\n }\n};\n\nconst StyledCard: any = styled(Card)(({ theme }) => ({\n minWidth: '196px',\n padding: theme.spacing(1),\n overflow: 'visible',\n}));\n\nconst StyledCardActions: any = styled(CardActions)({\n padding: 0,\n justifyContent: 'space-between',\n});\n\nconst DragHandleContainer: any = styled('span', {\n shouldForwardProp: (prop) => prop !== 'draggable',\n})(({ draggable }) => ({\n cursor: draggable ? 'move' : 'inherit',\n touchAction: 'none',\n}));\n\nconst ErrorText: any = styled('div')(({ theme }) => ({\n fontSize: theme.typography.fontSize - 2,\n color: theme.palette.error.main,\n paddingBottom: theme.spacing(1),\n}));\n\nconst Choice = ({\n allowMultiplePlacements,\n configuration,\n choice,\n deleteFocusedEl,\n focusedEl,\n index,\n onDelete,\n onChange,\n correctResponseCount,\n lockChoiceOrder,\n imageSupport,\n spellCheck,\n toolbarOpts,\n error,\n maxImageWidth,\n maxImageHeight,\n uploadSoundSupport,\n}) => {\n const draggable = canDrag({ choice, correctResponseCount, lockChoiceOrder });\n\n const {\n attributes: dragAttributes,\n listeners: dragListeners,\n setNodeRef: setDragNodeRef,\n isDragging,\n } = useDraggable({\n id: `choice-${choice.id}`,\n data: {\n id: choice.id,\n index,\n type: 'choice',\n },\n disabled: !draggable,\n });\n\n const {\n setNodeRef: setDropNodeRef,\n } = useDroppable({\n id: `choice-drop-${choice.id}`,\n data: {\n id: choice.id,\n index,\n type: 'choice',\n },\n });\n\n const changeContent = (content) => {\n choice.content = content;\n onChange(choice);\n };\n\n const changeCategoryCount = () => {\n if (choice.categoryCount === 1) {\n choice.categoryCount = 0;\n } else {\n choice.categoryCount = 1;\n }\n onChange(choice);\n };\n\n const isCheckboxShown = (allowMultiplePlacements) => allowMultiplePlacements === multiplePlacements.perChoice;\n\n const showRemoveAfterPlacing = isCheckboxShown(allowMultiplePlacements);\n\n const setNodeRef = (element) => {\n setDragNodeRef(element);\n setDropNodeRef(element);\n };\n\n return (\n <StyledCard ref={setNodeRef} style={{ opacity: isDragging ? 0.5 : 1 }}>\n <StyledCardActions>\n <DragHandleContainer draggable={draggable} {...dragAttributes} {...dragListeners}>\n <DragHandle color={draggable ? 'primary' : 'disabled'} />\n </DragHandleContainer>\n </StyledCardActions>\n <InputHeader\n imageSupport={imageSupport}\n focusedEl={focusedEl}\n deleteFocusedEl={deleteFocusedEl}\n index={index}\n label={choice.content}\n onChange={changeContent}\n onDelete={onDelete}\n toolbarOpts={toolbarOpts}\n spellCheck={spellCheck}\n error={error}\n maxImageWidth={maxImageWidth}\n maxImageHeight={maxImageHeight}\n uploadSoundSupport={uploadSoundSupport}\n configuration={configuration}\n />\n {error && <ErrorText>{error}</ErrorText>}\n\n <StyledCardActions>\n <DeleteButton label={'delete'} onClick={onDelete} />\n {showRemoveAfterPlacing && (\n <Checkbox\n mini\n label={'Remove after placing'}\n checked={choice.categoryCount === 1}\n onChange={changeCategoryCount}\n />\n )}\n </StyledCardActions>\n </StyledCard>\n );\n};\n\nChoice.propTypes = {\n allowMultiplePlacements: PropTypes.string,\n configuration: PropTypes.object.isRequired,\n choice: PropTypes.object.isRequired,\n deleteFocusedEl: PropTypes.func,\n focusedEl: PropTypes.number,\n index: PropTypes.number,\n lockChoiceOrder: PropTypes.bool,\n maxImageHeight: PropTypes.object,\n maxImageWidth: PropTypes.object,\n onChange: PropTypes.func.isRequired,\n onDelete: PropTypes.func.isRequired,\n correctResponseCount: PropTypes.number.isRequired,\n imageSupport: PropTypes.shape({\n add: PropTypes.func.isRequired,\n delete: PropTypes.func.isRequired,\n }),\n toolbarOpts: PropTypes.object,\n error: PropTypes.string,\n uploadSoundSupport: PropTypes.shape({\n add: PropTypes.func.isRequired,\n delete: PropTypes.func.isRequired,\n }),\n spellCheck: PropTypes.bool,\n rearrangeChoices: PropTypes.func,\n};\n\nexport default uid.withUid(Choice);\n","// @ts-nocheck\n/**\n * @synced-from pie-elements/packages/categorize/configure/src/design/choices/config.jsx\n * @auto-generated\n *\n * This file is automatically synced from pie-elements and converted to TypeScript.\n * Manual edits will be overwritten on next sync.\n * To make changes, edit the upstream JavaScript file and run sync again.\n */\n\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport { styled } from '@mui/material/styles';\nimport TextField from '@mui/material/TextField';\n\nconst ConfigContainer: any = styled('div')(({ theme }) => ({\n paddingTop: theme.spacing(1),\n marginBottom: theme.spacing(1),\n}));\n\nconst StyledTextField: any = styled(TextField)({\n width: '100%',\n});\n\nexport class Config extends React.Component {\n static propTypes = {\n config: PropTypes.object,\n onModelChanged: PropTypes.func,\n spellCheck: PropTypes.bool,\n };\n\n static defaultProps = {};\n\n changeLabel: any = ({ target }) => {\n this.props.onModelChanged({ choicesLabel: target.value });\n };\n\n render() {\n const { config, spellCheck } = this.props;\n\n return (\n <ConfigContainer>\n <StyledTextField\n InputLabelProps={{\n shrink: true,\n }}\n variant=\"outlined\"\n label=\"Label\"\n value={config.choicesLabel}\n onChange={this.changeLabel}\n spellCheck={spellCheck}\n />\n </ConfigContainer>\n );\n }\n}\n\nexport default Config;\n","// @ts-nocheck\n/**\n * @synced-from pie-elements/packages/categorize/configure/src/design/choices/index.jsx\n * @auto-generated\n *\n * This file is automatically synced from pie-elements and converted to TypeScript.\n * Manual edits will be overwritten on next sync.\n * To make changes, edit the upstream JavaScript file and run sync again.\n */\n\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport { styled } from '@mui/material/styles';\nimport Choice from './choice.js';\nimport Header from '../header.js';\nimport Config from './config.js';\nimport { choiceUtils as utils } from '@pie-lib/config-ui';\nimport { removeAllChoices } from '@pie-lib/categorize';\n\nconst ChoicesContainer: any = styled('div')(({ theme }) => ({\n marginBottom: theme.spacing(2.5),\n}));\n\nconst ChoiceHolder: any = styled('div')(({ theme }) => ({\n paddingTop: theme.spacing(1),\n paddingBottom: theme.spacing(1),\n display: 'grid',\n gridRowGap: theme.spacing(1),\n gridColumnGap: theme.spacing(1),\n}));\n\nconst ErrorText: any = styled('div')(({ theme }) => ({\n fontSize: theme.typography.fontSize - 2,\n color: theme.palette.error.main,\n paddingTop: theme.spacing(0.5),\n}));\n\nexport class Choices extends React.Component {\n static propTypes = {\n model: PropTypes.object.isRequired,\n configuration: PropTypes.object.isRequired,\n choices: PropTypes.array.isRequired,\n defaultImageMaxWidth: PropTypes.number,\n defaultImageMaxHeight: PropTypes.number,\n onModelChanged: PropTypes.func.isRequired,\n imageSupport: PropTypes.shape({\n add: PropTypes.func.isRequired,\n delete: PropTypes.func.isRequired,\n }),\n uploadSoundSupport: PropTypes.shape({\n add: PropTypes.func.isRequired,\n delete: PropTypes.func.isRequired,\n }),\n toolbarOpts: PropTypes.object,\n spellCheck: PropTypes.bool,\n };\n\n static defaultProps = {};\n\n state = {\n focusedEl: null,\n };\n\n changeChoice: any = (choice) => {\n const { choices, onModelChanged } = this.props;\n const index = choices.findIndex((h) => h.id === choice.id);\n if (index !== -1) {\n choices.splice(index, 1, choice);\n onModelChanged({ choices });\n }\n };\n\n allChoicesHaveCount: any = (count) => {\n const { choices } = this.props;\n return Array.isArray(choices) && choices.every((c) => c.categoryCount === count);\n };\n\n addChoice: any = () => {\n const { onModelChanged, model, choices: oldChoices } = this.props;\n let { maxAnswerChoices } = model || {};\n\n if (maxAnswerChoices && model.choices?.length >= maxAnswerChoices) {\n return;\n }\n\n const id = utils.firstAvailableIndex(\n model.choices.map((a) => a.id),\n 1,\n );\n const data = { id, content: 'Choice ' + id };\n\n this.setState(\n {\n focusedEl: oldChoices.length,\n },\n () => {\n onModelChanged({ choices: model.choices.concat([data]) });\n },\n );\n };\n\n deleteFocusedEl: any = () => {\n this.setState({\n focusedEl: null,\n });\n };\n\n deleteChoice: any = (choice) => {\n const { model, onModelChanged } = this.props;\n const index = model.choices.findIndex((a) => a.id === choice.id);\n if (index !== -1) {\n model.choices.splice(index, 1);\n model.correctResponse = removeAllChoices(choice.id, model.correctResponse);\n onModelChanged(model);\n }\n };\n\n render() {\n const { focusedEl } = this.state;\n const {\n choices,\n model,\n imageSupport,\n uploadSoundSupport,\n onModelChanged,\n spellCheck,\n toolbarOpts,\n configuration,\n defaultImageMaxWidth,\n defaultImageMaxHeight,\n } = this.props;\n const { errors, allowMultiplePlacementsEnabled, lockChoiceOrder, maxAnswerChoices } = model;\n const { choicesError, choicesErrors } = errors || {};\n const { maxImageWidth = {}, maxImageHeight = {} } = configuration || {};\n const choiceHolderStyle = {\n gridTemplateColumns: `repeat(${model.categoriesPerRow}, 1fr)`,\n };\n const addChoiceButtonTooltip =\n maxAnswerChoices && choices?.length >= maxAnswerChoices ? `Only ${maxAnswerChoices} allowed maximum` : '';\n\n return (\n <ChoicesContainer>\n <Header\n label=\"Choices\"\n buttonLabel=\"ADD A CHOICE\"\n onAdd={this.addChoice}\n buttonDisabled={maxAnswerChoices && choices && choices?.length >= maxAnswerChoices}\n tooltip={addChoiceButtonTooltip}\n />\n\n <Config config={model} onModelChanged={onModelChanged} spellCheck={spellCheck} />\n\n <ChoiceHolder style={choiceHolderStyle}>\n {choices.map((h, index) => {\n return (\n <Choice\n key={h.id}\n choice={h}\n focusedEl={focusedEl}\n deleteFocusedEl={this.deleteFocusedEl}\n correctResponseCount={h.correctResponseCount}\n allowMultiplePlacements={allowMultiplePlacementsEnabled}\n lockChoiceOrder={lockChoiceOrder}\n index={index}\n imageSupport={imageSupport}\n onChange={this.changeChoice}\n onDelete={() => this.deleteChoice(h)}\n toolbarOpts={toolbarOpts}\n spellCheck={spellCheck}\n error={choicesErrors && choicesErrors[h.id]}\n maxImageWidth={(maxImageWidth && maxImageWidth.choice) || defaultImageMaxWidth}\n maxImageHeight={(maxImageHeight && maxImageHeight.choice) || defaultImageMaxHeight}\n uploadSoundSupport={uploadSoundSupport}\n configuration={configuration}\n />\n );\n })}\n </ChoiceHolder>\n {choicesError && <ErrorText>{choicesError}</ErrorText>}\n </ChoicesContainer>\n );\n }\n}\n\nexport default Choices;\n","// @ts-nocheck\n/**\n * @synced-from pie-elements/packages/categorize/configure/src/design/builder.js\n * @auto-generated\n *\n * This file is automatically synced from pie-elements and converted to TypeScript.\n * Manual edits will be overwritten on next sync.\n * To make changes, edit the upstream JavaScript file and run sync again.\n */\n\nimport { cloneDeep } from '@pie-element/shared-lodash';\n\nexport const buildCategories = (categories, choices, correctResponse) => {\n const clonedCategories = cloneDeep(categories);\n\n return clonedCategories.map((category) => {\n const cr = correctResponse.find((cr) => cr.category === category.id);\n\n if (cr) {\n category.choices = (cr.choices || []).map((choiceId) => {\n const choice = choices.find((h) => h.id === choiceId);\n if (choice) {\n return Object.assign({}, { id: choice.id, content: choice.content });\n }\n });\n }\n\n return category;\n });\n};\n\nconst getChoices = (cat, choices, index) => {\n if (!cat.alternateResponses || cat.alternateResponses.length === 0) {\n return [];\n }\n\n return (cat.alternateResponses[index] || []).map((alt) => {\n return choices.find((ch) => ch.id === alt);\n });\n};\n\nexport const buildAlternateResponses = (categories, choices, correctResponse) => {\n const mostAlternates = correctResponse.reduce((mostAlt, cat) => {\n if (cat.alternateResponses && cat.alternateResponses.length >= mostAlt) {\n return cat.alternateResponses.length;\n }\n\n return mostAlt;\n }, 0);\n const alternatesArray = new Array(mostAlternates).fill(0);\n\n return alternatesArray.map((val, index) => {\n return correctResponse.map((cat, catIndex) => {\n const currentCategory = categories[catIndex];\n\n return {\n id: currentCategory.id,\n label: currentCategory.label,\n choices: getChoices(cat, choices, index),\n };\n });\n });\n};\n","// @ts-nocheck\n/**\n * @synced-from pie-elements/packages/categorize/configure/src/design/index.jsx\n * @auto-generated\n *\n * This file is automatically synced from pie-elements and converted to TypeScript.\n * Manual edits will be overwritten on next sync.\n * To make changes, edit the upstream JavaScript file and run sync again.\n */\n\nimport { getPluginProps } from './utils.js';\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport { styled } from '@mui/material/styles';\nimport { DragOverlay } from '@dnd-kit/core';\nimport { FeedbackConfig, InputContainer, layout, settings } from '@pie-lib/config-ui';\nimport {\n countInAnswer,\n ensureNoExtraChoicesInAnswer,\n ensureNoExtraChoicesInAlternate,\n moveChoiceToCategory,\n moveChoiceToAlternate,\n removeChoiceFromCategory,\n removeChoiceFromAlternate,\n verifyAllowMultiplePlacements,\n} from '@pie-lib/categorize';\nimport EditableHtml from '@pie-lib/editable-html-tip-tap';\nimport { DragProvider, uid } from '@pie-lib/drag';\nimport { renderMath } from '@pie-element/shared-math-rendering-mathjax';\n\nimport Categories from './categories/index.js';\nimport AlternateResponses from './categories/alternateResponses.js';\nimport Choices from './choices/index.js';\nimport Choice from './choices/choice.js';\nimport ChoicePreview from './categories/choice-preview.js';\nimport { buildAlternateResponses, buildCategories } from './builder.js';\nimport Header from './header.js';\nimport { getMaxCategoryChoices, multiplePlacements } from '../utils.js';\nimport { AlertDialog } from '@pie-lib/config-ui';\nimport Translator from '@pie-lib/translator';\n\nconst { translator } = Translator;\nconst { dropdown, Panel, toggle, radio, numberField } = settings;\nconst { Provider: IdProvider } = uid;\n\n// Simple wrapper to render math in DragOverlay portal\nclass DragPreviewWrapper extends React.Component {\n containerRef = React.createRef();\n\n componentDidMount() {\n if (this.containerRef.current) {\n setTimeout(() => renderMath(this.containerRef.current), 0);\n }\n }\n\n render() {\n return <div ref={this.containerRef}>{this.props.children}</div>;\n }\n}\n\nconst StyledHeader: any = styled(Header)(({ theme }) => ({\n marginBottom: theme.spacing(2),\n}));\n\nconst StyledInputContainer: any = styled(InputContainer)(({ theme }) => ({\n width: '100%',\n paddingTop: theme.spacing(1),\n marginTop: theme.spacing(1),\n marginBottom: theme.spacing(2),\n}));\n\nconst ErrorText: any = styled('div')(({ theme }) => ({\n fontSize: theme.typography.fontSize - 2,\n color: theme.palette.error.main,\n paddingTop: theme.spacing(1),\n}));\n\nexport class Design extends React.Component {\n static propTypes = {\n configuration: PropTypes.object,\n className: PropTypes.string,\n onConfigurationChanged: PropTypes.func,\n model: PropTypes.object.isRequired,\n onChange: PropTypes.func.isRequired,\n uid: PropTypes.string,\n imageSupport: PropTypes.shape({\n add: PropTypes.func.isRequired,\n delete: PropTypes.func.isRequired,\n }),\n uploadSoundSupport: PropTypes.shape({\n add: PropTypes.func.isRequired,\n delete: PropTypes.func.isRequired,\n }),\n };\n\n constructor(props) {\n super(props);\n this.uid = props.uid || uid.generateId();\n this.state = {\n activeDragItem: null,\n };\n }\n\n updateModel: any = (props) => {\n const { model, onChange } = this.props;\n\n const updatedModel = {\n ...model,\n ...props,\n };\n\n updatedModel.choices = updatedModel.choices.map((c) => ({\n ...c,\n categoryCount: this.checkAllowMultiplePlacements(updatedModel.allowMultiplePlacementsEnabled, c),\n }));\n\n //Ensure that there are no extra choices in correctResponse, if the user has decided that only one choice may be used.\n updatedModel.correctResponse = ensureNoExtraChoicesInAnswer(\n updatedModel.correctResponse || [],\n updatedModel.choices,\n );\n\n //Ensure that there are no extra choices in alternate responses, if the user has decided that only one choice may be used.\n updatedModel.correctResponse = ensureNoExtraChoicesInAlternate(\n updatedModel.correctResponse || [],\n updatedModel.choices,\n );\n\n //clean categories\n updatedModel.categories = updatedModel.categories.map((c) => ({\n id: c.id,\n label: c.label,\n }));\n\n updatedModel.choices = updatedModel.choices.map((h) => ({\n id: h.id,\n content: h.content,\n categoryCount: h.categoryCount,\n }));\n\n // ensure that maxChoicesPerCategory is reset if author switch back the corresponding switch (allowMaxChoicesPerCategory)\n updatedModel.maxChoicesPerCategory = updatedModel.allowMaxChoicesPerCategory\n ? updatedModel.maxChoicesPerCategory\n : 0;\n\n onChange(updatedModel);\n };\n\n changeRationale: any = (rationale) => {\n const { model, onChange } = this.props;\n\n onChange({\n ...model,\n rationale,\n });\n };\n\n changeTeacherInstructions: any = (teacherInstructions) => {\n const { model, onChange } = this.props;\n\n onChange({\n ...model,\n teacherInstructions,\n });\n };\n\n changeFeedback: any = (feedback) => {\n this.updateModel({ feedback });\n };\n\n onAddAlternateResponse: any = () => {\n const {\n model: { correctResponse },\n } = this.props;\n\n this.updateModel({\n correctResponse: (correctResponse || []).map((cr) => ({\n ...cr,\n alternateResponses: [...(cr.alternateResponses || []), []],\n })),\n });\n };\n\n onPromptChanged = (prompt) => this.updateModel({ prompt });\n\n onRemoveAlternateResponse: any = (index) => {\n const {\n model: { correctResponse },\n } = this.props;\n\n this.updateModel({\n correctResponse: (correctResponse || []).map((cr) => ({\n ...cr,\n alternateResponses: (cr.alternateResponses || []).filter((alt, altIndex) => altIndex !== index),\n })),\n });\n };\n\n countChoiceInCorrectResponse: any = (choice) => {\n const { model } = this.props;\n\n return countInAnswer(choice.id, model.correctResponse);\n };\n\n checkAllowMultiplePlacements: any = (allowMultiplePlacements, c) => {\n if (allowMultiplePlacements === multiplePlacements.enabled) {\n return 0;\n }\n\n if (allowMultiplePlacements === multiplePlacements.disabled) {\n return 1;\n }\n\n return c.categoryCount || 0;\n };\n\n isAlertModalOpened: any = () => {\n const { model } = this.props;\n const { maxChoicesPerCategory = 0 } = model || {};\n const maxChoices = getMaxCategoryChoices(model);\n // when maxChoicesPerCategory is set to 0, there is no limit so modal should not be opened\n return maxChoicesPerCategory !== 0 ? maxChoices > maxChoicesPerCategory : false;\n };\n\n onAlertModalCancel: any = () => {\n const { model } = this.props;\n const maxChoices = getMaxCategoryChoices(model);\n this.updateModel({ maxChoicesPerCategory: maxChoices });\n };\n\n onDragStart: any = (event) => {\n const { active } = event;\n const draggedItem = active.data.current;\n\n this.setState({\n activeDragItem: draggedItem,\n });\n };\n\n onDragEnd: any = ({ active, over }) => {\n // scrolls back to the original draggable element (scrollIntoViewIfNeeded).\n const scrollX = window.scrollX;\n const scrollY = window.scrollY;\n\n this.setState({ activeDragItem: null });\n if (!active) {\n return;\n }\n\n // Restore scroll position after dnd-kit's drop animation fires scrollIntoViewIfNeeded.\n // Two rAF frames are needed: dnd-kit uses one rAF internally for focus/scroll restoration.\n requestAnimationFrame(() => {\n requestAnimationFrame(() => {\n window.scrollTo(scrollX, scrollY);\n });\n });\n\n const { model } = this.props;\n const { allowAlternateEnabled, categories = [], choices = [] } = model;\n\n const activeData = active?.data?.current;\n const overData = over?.data?.current;\n\n if (!activeData) return;\n\n const choiceIndex = activeData.choiceIndex || 0;\n const overType = overData?.type;\n const isPreview = activeData.type === 'choice-preview';\n const isNewChoice = activeData.type === 'choice';\n\n const choiceId =\n activeData.choice?.id || (typeof activeData.id === 'string' ? activeData.id.split('-')[0] : activeData.id);\n\n if (isPreview && (!overData || overType === 'choice')) {\n this.removeChoiceFromSource(activeData, choiceIndex, { allowAlternateEnabled, categories, choices });\n return;\n }\n\n if (isPreview && overType === 'category') {\n return this.moveChoice(choiceId, activeData.categoryId, overData.id, choiceIndex);\n }\n\n if (isNewChoice && overType === 'category') {\n return this.addChoiceToCategory({ id: activeData.id }, overData.id);\n }\n\n if (isPreview && overType === 'category-alternate') {\n return this.moveChoiceInAlternate(\n choiceId,\n activeData.categoryId,\n overData.id,\n choiceIndex,\n overData.alternateResponseIndex,\n );\n }\n\n if (allowAlternateEnabled && isNewChoice && overType === 'category-alternate') {\n return this.addChoiceToAlternateCategory({ id: activeData.id }, overData.id, overData.alternateResponseIndex);\n }\n };\n\n removeChoiceFromSource: any = (activeData, choiceIndex, { allowAlternateEnabled, categories, choices }) => {\n const isAlternateSource = activeData.alternateResponseIndex !== undefined;\n\n if (!isAlternateSource) {\n this.deleteChoiceFromCategory(activeData.categoryId, activeData.choiceId, choiceIndex);\n return;\n }\n\n if (!allowAlternateEnabled) return;\n\n const category = categories?.find((c) => c.id === activeData.categoryId);\n const choice = choices?.find((c) => c.id === activeData.choiceId);\n\n if (category && choice) {\n this.deleteChoiceFromAlternateCategory(category, choice, choiceIndex, activeData.alternateResponseIndex);\n }\n };\n\n addChoiceToCategory: any = (addedChoice, categoryId) => {\n const { model } = this.props;\n let { choices = [], correctResponse = [], maxChoicesPerCategory = 0 } = model || {};\n const choice = (choices || []).find((choice) => choice.id === addedChoice.id);\n\n let newCorrectResponse = moveChoiceToCategory(addedChoice.id, undefined, categoryId, 0, correctResponse);\n\n if (choice.categoryCount !== 0) {\n newCorrectResponse = verifyAllowMultiplePlacements(addedChoice, categoryId, newCorrectResponse);\n }\n const maxCategoryChoices = getMaxCategoryChoices(model);\n\n this.updateModel({\n correctResponse: newCorrectResponse,\n maxChoicesPerCategory:\n maxChoicesPerCategory !== 0 && maxChoicesPerCategory < maxCategoryChoices\n ? maxChoicesPerCategory + 1\n : maxChoicesPerCategory,\n });\n };\n\n deleteChoiceFromCategory: any = (categoryId, choiceId, choiceIndex) => {\n const { model } = this.props;\n const correctResponse = removeChoiceFromCategory(choiceId, categoryId, choiceIndex, model.correctResponse);\n\n this.updateModel({ correctResponse });\n };\n\n moveChoice: any = (choiceId, from, to, choiceIndex) => {\n const { model } = this.props;\n let { choices, correctResponse = [], maxChoicesPerCategory = 0 } = model || {};\n const choice = (choices || []).find((choice) => choice.id === choiceId);\n if (to === from || !choice) {\n return;\n }\n if (choice.categoryCount !== 0) {\n correctResponse = moveChoiceToCategory(choice.id, from, to, choiceIndex, correctResponse);\n correctResponse = verifyAllowMultiplePlacements(choice, to, correctResponse);\n } else if (choice.categoryCount === 0) {\n correctResponse = moveChoiceToCategory(choice.id, undefined, to, 0, correctResponse);\n }\n const maxCategoryChoices = getMaxCategoryChoices(model);\n // when maxChoicesPerCategory is set to 0, there is no limit so it should not be updated\n this.updateModel({\n correctResponse,\n maxChoicesPerCategory:\n maxChoicesPerCategory !== 0 && maxChoicesPerCategory < maxCategoryChoices\n ? maxChoicesPerCategory + 1\n : maxChoicesPerCategory,\n });\n };\n\n // methods for alternate responses\n addChoiceToAlternateCategory: any = (addedChoice, categoryId, altIndex) => {\n const { model } = this.props;\n const { correctResponse, choices, maxChoicesPerCategory = 0 } = model;\n\n const choice = choices.find((c) => c.id === addedChoice.id);\n\n correctResponse.forEach((a) => {\n if (a.category === categoryId) {\n a.alternateResponses = a.alternateResponses || [];\n\n if (a.alternateResponses[altIndex] === undefined) {\n a.alternateResponses[altIndex] = [];\n }\n\n a.alternateResponses[altIndex].push(addedChoice.id);\n if (choice.categoryCount && choice.categoryCount !== 0) {\n a.alternateResponses[altIndex] = a.alternateResponses[altIndex].reduce((acc, currentValue) => {\n if (currentValue === choice.id) {\n const foundIndex = acc.findIndex((c) => c === choice.id);\n if (foundIndex === -1) {\n acc.push(currentValue);\n }\n } else {\n acc.push(currentValue);\n }\n\n return acc;\n }, []);\n }\n\n return a;\n } else {\n if (a.alternateResponses[altIndex] && choice.categoryCount !== 0) {\n a.alternateResponses[altIndex] = a.alternateResponses[altIndex].filter((c) => c !== addedChoice.id);\n return a;\n }\n }\n\n return a;\n });\n\n const maxCategoryChoices = getMaxCategoryChoices(model);\n // when maxChoicesPerCategory is set to 0, there is no limit so it should not be updated\n this.updateModel({\n correctResponse,\n maxChoicesPerCategory:\n maxChoicesPerCategory !== 0 && maxChoicesPerCategory < maxCategoryChoices\n ? maxChoicesPerCategory + 1\n : maxChoicesPerCategory,\n });\n };\n\n moveChoiceInAlternate: any = (choiceId, from, to, choiceIndex, alternateIndex) => {\n const { model } = this.props;\n let { choices, correctResponse = [], maxChoicesPerCategory = 0 } = model || {};\n const choice = (choices || []).find((choice) => choice.id === choiceId);\n correctResponse = moveChoiceToAlternate(\n choiceId,\n from,\n to,\n choiceIndex,\n correctResponse,\n alternateIndex,\n choice?.categoryCount,\n );\n\n const maxCategoryChoices = getMaxCategoryChoices(model);\n // when maxChoicesPerCategory is set to 0, there is no limit so it should not be updated\n this.updateModel({\n correctResponse,\n maxChoicesPerCategory:\n maxChoicesPerCategory !== 0 && maxChoicesPerCategory < maxCategoryChoices\n ? maxChoicesPerCategory + 1\n : maxChoicesPerCategory,\n });\n };\n\n deleteChoiceFromAlternateCategory: any = (category, choice, choiceIndex, altIndex) => {\n const { model } = this.props;\n\n const correctResponse = removeChoiceFromAlternate(\n choice.id,\n category.id,\n choiceIndex,\n altIndex,\n model.correctResponse,\n );\n\n this.updateModel({ correctResponse });\n };\n\n renderDragOverlay: any = () => {\n const { activeDragItem } = this.state;\n const { model, configuration } = this.props;\n\n if (!activeDragItem) return null;\n\n if (activeDragItem.type === 'choice') {\n const choice = model.choices?.find((c) => c.id === activeDragItem.id);\n if (!choice) return null;\n\n return <Choice choice={choice} configuration={configuration} />;\n } else if (activeDragItem.type === 'choice-preview' && activeDragItem.alternateResponseIndex === undefined) {\n const choice = model.choices?.find((c) => c.id === activeDragItem.id);\n if (!choice) return null;\n return <ChoicePreview choice={choice} />;\n } else if (activeDragItem.type === 'choice-preview' && activeDragItem.alternateResponseIndex !== undefined) {\n const choice = model.choices?.find((c) => c.id === activeDragItem.id);\n if (!choice) return null;\n return <ChoicePreview choice={choice} alternateResponseIndex={activeDragItem.alternateResponseIndex} />;\n }\n\n return null;\n };\n\n render() {\n const { configuration, imageSupport, model, uploadSoundSupport, onConfigurationChanged } = this.props;\n const {\n allowAlternate = {},\n allowMultiplePlacements = {},\n baseInputConfiguration = {},\n categoriesPerRow = {},\n choicesPosition = {},\n contentDimensions = {},\n feedback = {},\n lockChoiceOrder = {},\n maxImageHeight = {},\n maxImageWidth = {},\n maxPlacements = {},\n minCategoriesPerRow = 1,\n partialScoring = {},\n prompt = {},\n rationale = {},\n scoringType = {},\n settingsPanelDisabled,\n spellCheck = {},\n studentInstructions = {},\n teacherInstructions = {},\n withRubric = {},\n mathMlOptions = {},\n language = {},\n languageChoices = {},\n allowMaxAnswerChoices = {},\n } = configuration || {};\n const {\n allowAlternateEnabled,\n allowMaxChoicesPerCategory,\n errors,\n feedbackEnabled,\n maxChoicesPerCategory,\n promptEnabled,\n rationaleEnabled,\n spellCheckEnabled,\n teacherInstructionsEnabled,\n toolbarEditorPosition,\n extraCSSRules,\n } = model || {};\n const {\n prompt: promptError,\n rationale: rationaleError,\n teacherInstructions: teacherInstructionsError,\n } = errors || {};\n\n const toolbarOpts = {\n position: toolbarEditorPosition === 'top' ? 'top' : 'bottom',\n };\n\n const config = model.config || {};\n config.choices = config.choices || { label: '', columns: 2 };\n\n const categories = buildCategories(model.categories || [], model.choices || [], model.correctResponse || []);\n\n const alternateResponses = buildAlternateResponses(\n model.categories || [],\n model.choices || [],\n model.correctResponse || [],\n );\n\n const choices = model.choices.map((c) => {\n c.correctResponseCount = this.countChoiceInCorrectResponse(c);\n // ensure categoryCount is set even though updatedModel hasn't been called\n c.categoryCount = this.checkAllowMultiplePlacements(model.allowMultiplePlacementsEnabled, c);\n return c;\n });\n\n const defaultImageMaxWidth = maxImageWidth && maxImageWidth.prompt;\n const defaultImageMaxHeight = maxImageHeight && maxImageHeight.prompt;\n\n const panelSettings = {\n partialScoring: partialScoring.settings && toggle(partialScoring.label),\n lockChoiceOrder: lockChoiceOrder.settings && toggle(lockChoiceOrder.label),\n categoriesPerRow:\n categoriesPerRow.settings &&\n numberField(categoriesPerRow.label, {\n label: categoriesPerRow.label,\n min: minCategoriesPerRow,\n max: 6,\n }),\n choicesPosition: choicesPosition.settings && radio(choicesPosition.label, ['below', 'above', 'left', 'right']),\n allowMultiplePlacementsEnabled:\n allowMultiplePlacements.settings &&\n dropdown(allowMultiplePlacements.label, [\n multiplePlacements.enabled,\n multiplePlacements.disabled,\n multiplePlacements.perChoice,\n ]),\n maxAnswerChoices:\n allowMaxAnswerChoices.settings &&\n numberField(allowMaxAnswerChoices.label, {\n label: '',\n min: choices?.length || 0,\n max: 30,\n }),\n allowMaxChoicesPerCategory: maxPlacements.settings && toggle(maxPlacements.label),\n maxChoicesPerCategory:\n allowMaxChoicesPerCategory === true &&\n numberField(maxPlacements.label, {\n label: '',\n min: 0,\n max: 30,\n }),\n promptEnabled: prompt.settings && toggle(prompt.label),\n feedbackEnabled: feedback.settings && toggle(feedback.label),\n allowAlternateEnabled: allowAlternate.settings && toggle(allowAlternate.label),\n 'language.enabled': language.settings && toggle(language.label, true),\n language: language.settings && language.enabled && dropdown(languageChoices.label, languageChoices.options),\n };\n\n const panelProperties = {\n teacherInstructionsEnabled: teacherInstructions.settings && toggle(teacherInstructions.label),\n studentInstructionsEnabled: studentInstructions.settings && toggle(studentInstructions.label),\n rationaleEnabled: rationale.settings && toggle(rationale.label),\n spellCheckEnabled: spellCheck.settings && toggle(spellCheck.label),\n scoringType: scoringType.settings && radio(scoringType.label, ['auto', 'rubric']),\n rubricEnabled: withRubric?.settings && toggle(withRubric?.label),\n };\n\n const isOpened = this.isAlertModalOpened();\n const alertMaxChoicesMsg = translator.t('translation:categorize:maxChoicesPerCategoryRestriction', {\n lng: model.language,\n maxChoicesPerCategory,\n });\n\n return (\n <DragProvider onDragStart={this.onDragStart} onDragEnd={this.onDragEnd}>\n <IdProvider value={this.uid}>\n <layout.ConfigLayout\n extraCSSRules={extraCSSRules}\n dimensions={contentDimensions}\n hideSettings={settingsPanelDisabled}\n settings={\n <Panel\n model={model}\n onChangeModel={this.updateModel}\n configuration={configuration}\n onChangeConfiguration={onConfigurationChanged}\n groups={{\n Settings: panelSettings,\n Properties: panelProperties,\n }}\n modal={\n <AlertDialog\n title={'Warning'}\n text={alertMaxChoicesMsg}\n open={isOpened}\n onClose={this.onAlertModalCancel}\n />\n }\n />\n }\n >\n {teacherInstructionsEnabled && (\n <StyledInputContainer label={teacherInstructions.label}>\n <EditableHtml\n markup={model.teacherInstructions || ''}\n onChange={this.changeTeacherInstructions}\n imageSupport={imageSupport}\n error={teacherInstructionsError}\n nonEmpty={false}\n toolbarOpts={toolbarOpts}\n pluginProps={getPluginProps(teacherInstructions?.inputConfiguration, baseInputConfiguration)}\n spellCheck={spellCheckEnabled}\n maxImageWidth={(maxImageWidth && maxImageWidth.teacherInstructions) || defaultImageMaxWidth}\n maxImageHeight={(maxImageHeight && maxImageHeight.teacherInstructions) || defaultImageMaxHeight}\n uploadSoundSupport={uploadSoundSupport}\n languageCharactersProps={[{ language: 'spanish' }, { language: 'special' }]}\n mathMlOptions={mathMlOptions}\n />\n {teacherInstructionsError && <ErrorText>{teacherInstructionsError}</ErrorText>}\n </StyledInputContainer>\n )}\n\n {promptEnabled && (\n <StyledInputContainer label={prompt.label}>\n <EditableHtml\n markup={model.prompt || ''}\n onChange={this.onPromptChanged}\n imageSupport={imageSupport}\n error={promptError}\n nonEmpty={false}\n disableUnderline\n toolbarOpts={toolbarOpts}\n pluginProps={getPluginProps(prompt?.inputConfiguration, baseInputConfiguration)}\n spellCheck={spellCheckEnabled}\n maxImageWidth={maxImageWidth && maxImageWidth.prompt}\n maxImageHeight={maxImageHeight && maxImageHeight.prompt}\n uploadSoundSupport={uploadSoundSupport}\n languageCharactersProps={[{ language: 'spanish' }, { language: 'special' }]}\n mathMlOptions={mathMlOptions}\n />\n {promptError && <ErrorText>{promptError}</ErrorText>}\n </StyledInputContainer>\n )}\n\n <Categories\n imageSupport={imageSupport}\n uploadSoundSupport={uploadSoundSupport}\n model={model}\n categories={categories || []}\n onModelChanged={this.updateModel}\n toolbarOpts={toolbarOpts}\n spellCheck={spellCheckEnabled}\n configuration={configuration}\n defaultImageMaxWidth={defaultImageMaxWidth}\n defaultImageMaxHeight={defaultImageMaxHeight}\n mathMlOptions={mathMlOptions}\n />\n\n <Choices\n imageSupport={imageSupport}\n uploadSoundSupport={uploadSoundSupport}\n choices={choices}\n model={model}\n onModelChanged={this.updateModel}\n toolbarOpts={toolbarOpts}\n spellCheck={spellCheckEnabled}\n configuration={configuration}\n defaultImageMaxWidth={defaultImageMaxWidth}\n defaultImageMaxHeight={defaultImageMaxHeight}\n />\n\n {allowAlternateEnabled && (\n <StyledHeader\n label=\"Alternate Responses\"\n buttonLabel=\"ADD AN ALTERNATE RESPONSE\"\n onAdd={this.onAddAlternateResponse}\n />\n )}\n {allowAlternateEnabled &&\n alternateResponses.map((categoriesList, index) => {\n return (\n <React.Fragment key={index}>\n <StyledHeader\n variant={'subtitle1'}\n label=\"Alternate Response\"\n buttonLabel=\"REMOVE ALTERNATE RESPONSE\"\n onAdd={() => this.onRemoveAlternateResponse(index)}\n />\n <AlternateResponses\n altIndex={index}\n imageSupport={imageSupport}\n model={model}\n configuration={configuration}\n categories={categoriesList}\n onModelChanged={this.updateModel}\n uploadSoundSupport={uploadSoundSupport}\n mathMlOptions={mathMlOptions}\n />\n </React.Fragment>\n );\n })}\n\n {rationaleEnabled && (\n <StyledInputContainer label={rationale.label}>\n <EditableHtml\n markup={model.rationale || ''}\n onChange={this.changeRationale}\n imageSupport={imageSupport}\n error={rationaleError}\n nonEmpty={false}\n toolbarOpts={toolbarOpts}\n pluginProps={getPluginProps(prompt?.inputConfiguration, baseInputConfiguration)}\n spellCheck={spellCheckEnabled}\n maxImageWidth={(maxImageWidth && maxImageWidth.rationale) || defaultImageMaxWidth}\n maxImageHeight={(maxImageHeight && maxImageHeight.rationale) || defaultImageMaxHeight}\n uploadSoundSupport={uploadSoundSupport}\n languageCharactersProps={[{ language: 'spanish' }, { language: 'special' }]}\n mathMlOptions={mathMlOptions}\n />\n {rationaleError && <ErrorText>{rationaleError}</ErrorText>}\n </StyledInputContainer>\n )}\n\n {feedbackEnabled && (\n <FeedbackConfig feedback={model.feedback} onChange={this.changeFeedback} toolbarOpts={toolbarOpts} />\n )}\n </layout.ConfigLayout>\n <DragOverlay>\n <DragPreviewWrapper>{this.renderDragOverlay()}</DragPreviewWrapper>\n </DragOverlay>\n </IdProvider>\n </DragProvider>\n );\n }\n}\n\nexport default Design;\n","// @ts-nocheck\n/**\n * @synced-from pie-elements/packages/categorize/configure/src/main.jsx\n * @auto-generated\n *\n * This file is automatically synced from pie-elements and converted to TypeScript.\n * Manual edits will be overwritten on next sync.\n * To make changes, edit the upstream JavaScript file and run sync again.\n */\n\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport Design from './design/index.js';\n\nexport class Main extends React.Component {\n static propTypes = {\n configuration: PropTypes.object,\n onConfigurationChanged: PropTypes.func,\n model: PropTypes.object.isRequired,\n onModelChanged: PropTypes.func.isRequired,\n imageSupport: PropTypes.object,\n uploadSoundSupport: PropTypes.object,\n };\n\n static defaultProps = {};\n\n render() {\n const { model, onModelChanged, configuration, onConfigurationChanged, imageSupport, uploadSoundSupport } =\n this.props;\n\n return (\n <Design\n imageSupport={imageSupport}\n uploadSoundSupport={uploadSoundSupport}\n title=\"Design\"\n model={model}\n configuration={configuration}\n onChange={onModelChanged}\n onConfigurationChanged={onConfigurationChanged}\n />\n );\n }\n}\n\nexport default Main;\n","// @ts-nocheck\n/**\n * @synced-from pie-elements/packages/categorize/configure/src/defaults.js\n * @auto-generated\n *\n * This file is automatically synced from pie-elements and converted to TypeScript.\n * Manual edits will be overwritten on next sync.\n * To make changes, edit the upstream JavaScript file and run sync again.\n */\n\nimport { multiplePlacements } from './utils.js';\n\nexport default {\n model: {\n allowAlternateEnabled: true,\n allowMaxChoicesPerCategory: false,\n allowMultiplePlacementsEnabled: multiplePlacements.enabled,\n alternates: [],\n categories: [],\n categoriesPerRow: 2,\n choices: [],\n choicesLabel: '',\n choicesPosition: 'below',\n correctResponse: [],\n feedbackEnabled: false,\n lockChoiceOrder: true,\n maxAnswerChoices: 6,\n maxChoicesPerCategory: 0,\n partialScoring: true,\n promptEnabled: true,\n rationaleEnabled: true,\n rowLabels: [''],\n studentInstructionsEnabled: true,\n teacherInstructionsEnabled: true,\n toolbarEditorPosition: 'bottom',\n minRowHeight: '80px',\n },\n configuration: {\n baseInputConfiguration: {\n h3: { disabled: true },\n audio: { disabled: false },\n video: { disabled: false },\n image: { disabled: false },\n textAlign: { disabled: true },\n showParagraphs: { disabled: false },\n separateParagraphs: { disabled: true },\n },\n spellCheck: {\n label: 'Spellcheck',\n settings: false,\n enabled: true,\n },\n feedback: {\n settings: true,\n label: 'Feedback',\n enabled: true,\n },\n lockChoiceOrder: {\n settings: true,\n label: 'Lock Choice Order',\n },\n choicesPosition: {\n settings: true,\n label: 'Choices Position',\n },\n allowMultiplePlacements: {\n settings: true,\n label: 'Allow Multiple Placements',\n },\n maxPlacements: {\n settings: true,\n label: 'Max choices per category',\n },\n allowAlternate: {\n settings: true,\n label: 'Allow Alternate Correct Answers',\n },\n categoriesPerRow: {\n settings: true,\n label: 'Categories per row',\n },\n partialScoring: {\n settings: false,\n label: 'Allow Partial Scoring',\n },\n prompt: {\n settings: true,\n label: 'Prompt',\n required: false,\n inputConfiguration: {\n audio: { disabled: false },\n video: { disabled: false },\n image: { disabled: false },\n },\n },\n rationale: {\n settings: true,\n label: 'Rationale',\n required: false,\n inputConfiguration: {\n audio: { disabled: false },\n video: { disabled: false },\n image: { disabled: false },\n },\n },\n scoringType: {\n settings: false,\n label: 'Scoring Type',\n },\n settingsPanelDisabled: false,\n studentInstructions: {\n settings: false,\n label: 'Student Instructions',\n },\n teacherInstructions: {\n settings: true,\n label: 'Teacher Instructions',\n required: false,\n inputConfiguration: {\n audio: { disabled: false },\n video: { disabled: false },\n image: { disabled: false },\n },\n },\n headers: {\n inputConfiguration: {\n audio: { disabled: true },\n video: { disabled: true },\n image: { disabled: false },\n },\n },\n rowLabels: {\n inputConfiguration: {\n audio: { disabled: false },\n video: { disabled: false },\n image: { disabled: false },\n },\n },\n toolbarEditorPosition: {\n settings: false,\n label: 'Toolbar Editor Position',\n },\n maxImageWidth: {\n teacherInstructions: 300,\n prompt: 300,\n rationale: 300,\n rowLabel: 200,\n categoryLabel: 260,\n choices: 240,\n },\n maxImageHeight: {\n teacherInstructions: 300,\n prompt: 300,\n rationale: 300,\n rowLabel: 100,\n categoryLabel: 100,\n choices: 150,\n },\n withRubric: {\n settings: false,\n label: 'Add Rubric',\n },\n minCategoriesPerRow: 1,\n allowMaxAnswerChoices: {\n settings: true,\n label: 'Max answer choices',\n },\n mathMlOptions: {\n mmlOutput: false,\n mmlEditing: false,\n },\n language: {\n settings: false,\n label: 'Specify Language',\n enabled: false,\n },\n languageChoices: {\n label: 'Language Choices',\n options: [],\n },\n },\n};\n","// @ts-nocheck\n/**\n * @synced-from pie-elements/packages/categorize/configure/src/index.js\n * @auto-generated\n *\n * This file is automatically synced from pie-elements and converted to TypeScript.\n * Manual edits will be overwritten on next sync.\n * To make changes, edit the upstream JavaScript file and run sync again.\n */\n\nimport React from 'react';\nimport { createRoot } from 'react-dom/client';\nimport {\n ModelUpdatedEvent,\n DeleteImageEvent,\n InsertImageEvent,\n InsertSoundEvent,\n DeleteSoundEvent,\n} from '@pie-element/shared-configure-events';\nimport { renderMath } from '@pie-element/shared-math-rendering-mathjax';\n\nimport Main from './main.js';\n\nimport defaults from './defaults.js';\n\nexport default class CategorizeConfigure extends HTMLElement {\n static createDefaultModel = (model = {}) => ({\n ...defaults.model,\n ...model,\n });\n\n // PD-2960: make sure we don't have alternates in model or possibility to add them (temporary solution)\n // this function is used in controller, too\n static disableAlternateResponses = (m) => {\n let { correctResponse } = m || {};\n correctResponse = correctResponse || [];\n const mappedCorrectResponse = correctResponse.map((cr) => {\n const { alternateResponses, ...response } = cr;\n return response;\n });\n return {\n ...m,\n correctResponse: mappedCorrectResponse,\n allowAlternateEnabled: false,\n };\n };\n\n constructor() {\n super();\n this._root = null;\n this._model = CategorizeConfigure.createDefaultModel();\n this._configuration = defaults.configuration;\n }\n\n set model(m) {\n this._model = CategorizeConfigure.createDefaultModel(m);\n\n if (m.choices && m.choices.length >= m.maxAnswerChoices) {\n this._model.maxAnswerChoices = m.choices.length;\n console.warn(\"Max Answer Choices can't be less than choices length!\");\n }\n\n this.render();\n }\n\n set configuration(c) {\n const newConfiguration = {\n ...defaults.configuration,\n ...c,\n };\n\n this._configuration = newConfiguration;\n\n // if language:enabled is true, then the corresponding default item model should include a language value;\n // if it is false, then the language field should be omitted from the item model.\n // if a default item model includes a language value (e.g., en_US) and the corresponding authoring view settings have language:settings = true,\n // then (a) language:enabled should also be true, and (b) that default language value should be represented in languageChoices[] (as a key).\n if (newConfiguration?.language?.enabled) {\n if (newConfiguration?.languageChoices?.options?.length) {\n this._model.language = newConfiguration?.languageChoices.options[0].value;\n }\n } else if (newConfiguration.language.settings && this._model.language) {\n this._configuration.language.enabled = true;\n\n if (!this._configuration.languageChoices.options || !this._configuration.languageChoices.options.length) {\n this._configuration.languageChoices.options = [];\n }\n\n // check if the language is already included in the languageChoices.options array\n // and if not, then add it.\n if (!this._configuration.languageChoices.options.find((option) => option.value === this._model.language)) {\n this._configuration.languageChoices.options.push({\n value: this._model.language,\n label: this._model.language,\n });\n }\n } else {\n delete this._model.language;\n }\n\n this.render();\n }\n\n onModelChanged(m) {\n this._model = m;\n\n this.render();\n this.dispatchEvent(new ModelUpdatedEvent(this._model, false));\n }\n\n onConfigurationChanged(c) {\n this._configuration = c;\n this.render();\n }\n\n connectedCallback() {\n this.render();\n }\n\n /**\n *\n * @param {done, progress, file} handler\n */\n insertImage(handler) {\n this.dispatchEvent(new InsertImageEvent(handler));\n }\n\n onDeleteImage(src, done) {\n this.dispatchEvent(new DeleteImageEvent(src, done));\n }\n\n insertSound(handler) {\n this.dispatchEvent(new InsertSoundEvent(handler));\n }\n\n onDeleteSound(src, done) {\n this.dispatchEvent(new DeleteSoundEvent(src, done));\n }\n\n render() {\n const el = React.createElement(Main, {\n model: this._model,\n configuration: this._configuration,\n onModelChanged: this.onModelChanged.bind(this),\n onConfigurationChanged: this.onConfigurationChanged.bind(this),\n imageSupport: {\n add: this.insertImage.bind(this),\n delete: this.onDeleteImage.bind(this),\n },\n uploadSoundSupport: {\n add: this.insertSound.bind(this),\n delete: this.onDeleteSound.bind(this),\n },\n });\n\n if (!this._root) {\n this._root = createRoot(this);\n }\n this._root.render(el);\n\n setTimeout(() => {\n renderMath(this);\n }, 0);\n }\n\n disconnectedCallback() {\n if (this._root) {\n this._root.unmount();\n }\n }\n}\n"],"x_google_ignoreList":[1,2,3,4,7,10,19],"mappings":";;;;;;;oCAOI,KAAI,EAAE,KAAK,GAAG,EAAE,OAAO,SAAS;CACnC,iBAAiB,EAAE,QAAQ,WAAW;CACtC,QAAQ,aAAa,GAAE;CACvB,SAAS,EAAE,QAAQ,CAAC;CACpB,WAAW;CACX,UAAU,EAAE,QAAQ,EAAE;CACtB,UAAU,EAAE,QAAQ,EAAE;CACtB,QAAQ;CACR,OAAO,EAAE,QAAQ,EAAE;CACnB,SAAS,EAAE,QAAQ,EAAE;CACrB,YAAY,EAAE,QAAQ,WAAW;AAClC,EAAE;AACF,SAAS,EAAE,EAAE,QAAQ,GAAG,UAAU,GAAG,WAAW,GAAG,UAAU,GAAG,UAAU,GAAG,wBAAwB,GAAG,aAAa,GAAG,gBAAgB,GAAG,MAAM,GAAG,IAAI,KAAK;CAC5J,IAAI,EAAE,YAAY,GAAG,WAAW,GAAG,YAAY,GAAG,YAAY,MAAM,GAAE;EACrE,IAAI,KAAK,EAAE;EACX,UAAU;EACV,YAAY,GAAG;EACf,wBAAwB;EACxB,MAAM;GACL,IAAI,EAAE;GACN,OAAO,EAAE;GACT,UAAU,EAAE;GACZ,MAAM,GAAG;GACT,YAAY,GAAG;GACf,wBAAwB;GACxB,aAAa;GACb,gBAAgB;GAChB,MAAM;EACP;CACD,CAAC;CACD,OAAuB,kBAAE,IAAG;EAC3B,KAAK;EACL,WAAW;EACX,YAAY;EACZ,GAAG;EACH,GAAG;EACH,UAAU;CACX,CAAC;AACF;AACA,EAAE,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