@pie-element/extended-text-entry 15.1.2-next.1 → 15.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.
- package/CHANGELOG.json +1282 -0
- package/CHANGELOG.md +2270 -0
- package/LICENSE.md +5 -0
- package/README.md +1 -0
- package/configure/CHANGELOG.json +922 -0
- package/configure/CHANGELOG.md +1959 -0
- package/configure/lib/defaults.js +224 -0
- package/configure/lib/defaults.js.map +1 -0
- package/configure/lib/index.js +125 -0
- package/configure/lib/index.js.map +1 -0
- package/configure/lib/main.js +247 -0
- package/configure/lib/main.js.map +1 -0
- package/configure/package.json +23 -0
- package/controller/CHANGELOG.json +362 -0
- package/controller/CHANGELOG.md +1183 -0
- package/controller/lib/defaults.js +91 -0
- package/controller/lib/defaults.js.map +1 -0
- package/controller/lib/index.js +101 -0
- package/controller/lib/index.js.map +1 -0
- package/controller/package.json +16 -0
- package/docs/config-schema.json +1782 -0
- package/docs/config-schema.json.md +1333 -0
- package/docs/demo/config.js +7 -0
- package/docs/demo/generate.js +14 -0
- package/docs/demo/index.html +3 -0
- package/docs/demo/session.js +7 -0
- package/docs/pie-schema.json +954 -0
- package/docs/pie-schema.json.md +717 -0
- package/lib/annotation/annotation-editor.js +636 -0
- package/lib/annotation/annotation-editor.js.map +1 -0
- package/lib/annotation/annotation-menu.js +147 -0
- package/lib/annotation/annotation-menu.js.map +1 -0
- package/lib/annotation/annotation-utils.js +205 -0
- package/lib/annotation/annotation-utils.js.map +1 -0
- package/lib/annotation/freeform-editor.js +241 -0
- package/lib/annotation/freeform-editor.js.map +1 -0
- package/lib/index.js +108 -0
- package/lib/index.js.map +1 -0
- package/lib/main.js +205 -0
- package/lib/main.js.map +1 -0
- package/lib/print.js +86 -0
- package/lib/print.js.map +1 -0
- package/module/configure.js +1 -0
- package/module/controller.js +139 -0
- package/module/demo.js +38 -0
- package/module/element.js +1 -0
- package/module/index.html +21 -0
- package/module/manifest.json +22 -0
- package/module/print-demo.js +76 -0
- package/module/print.html +18 -0
- package/module/print.js +1 -0
- package/package.json +22 -88
- package/configure.js +0 -2
- package/controller.js +0 -1
- package/dist/author/defaults.d.ts +0 -166
- package/dist/author/defaults.js +0 -209
- package/dist/author/index.d.ts +0 -52
- package/dist/author/index.js +0 -74
- package/dist/author/main.d.ts +0 -26
- package/dist/author/main.js +0 -166
- package/dist/browser/author/index.js +0 -495
- package/dist/browser/author/index.js.map +0 -1
- package/dist/browser/browser-kkT1XVKw.js +0 -219
- package/dist/browser/browser-kkT1XVKw.js.map +0 -1
- package/dist/browser/controller/index.js +0 -184
- package/dist/browser/controller/index.js.map +0 -1
- package/dist/browser/delivery/index.js +0 -98
- package/dist/browser/delivery/index.js.map +0 -1
- package/dist/browser/dist-CfUys1Kx.js +0 -47872
- package/dist/browser/dist-CfUys1Kx.js.map +0 -1
- package/dist/browser/extended-text-entry.css +0 -2
- package/dist/browser/main-BVg6yw7a.js +0 -714
- package/dist/browser/main-BVg6yw7a.js.map +0 -1
- package/dist/browser/print/index.js +0 -48
- package/dist/browser/print/index.js.map +0 -1
- package/dist/controller/defaults.d.ts +0 -33
- package/dist/controller/defaults.js +0 -104
- package/dist/controller/index.d.ts +0 -59
- package/dist/controller/index.js +0 -72
- package/dist/delivery/annotation/annotation-editor.d.ts +0 -47
- package/dist/delivery/annotation/annotation-editor.js +0 -296
- package/dist/delivery/annotation/annotation-menu.d.ts +0 -25
- package/dist/delivery/annotation/annotation-menu.js +0 -113
- package/dist/delivery/annotation/annotation-utils.d.ts +0 -20
- package/dist/delivery/annotation/annotation-utils.js +0 -65
- package/dist/delivery/annotation/freeform-editor.d.ts +0 -30
- package/dist/delivery/annotation/freeform-editor.js +0 -143
- package/dist/delivery/index.d.ts +0 -23
- package/dist/delivery/index.js +0 -68
- package/dist/delivery/main.d.ts +0 -27
- package/dist/delivery/main.js +0 -134
- package/dist/extended-text-entry.css +0 -2
- package/dist/index.d.ts +0 -1
- package/dist/index.iife.d.ts +0 -8
- package/dist/index.iife.js +0 -403
- package/dist/index.js +0 -2
- package/dist/print/index.d.ts +0 -15
- package/dist/print/index.js +0 -48
- package/dist/runtime-support.d.ts +0 -12
- package/dist/runtime-support.js +0 -12
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["../../../../../shared/configure-events/dist/index.js","../../../src/author/main.tsx","../../../src/author/defaults.ts","../../../src/author/index.ts"],"sourcesContent":["//#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/extended-text-entry/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 { FeedbackSelector, InputContainer, settings, layout } from '@pie-lib/config-ui';\nimport PropTypes from 'prop-types';\nimport Typography from '@mui/material/Typography';\nimport { styled } from '@mui/material/styles';\nimport EditableHtml, { ALL_PLUGINS } from '@pie-lib/editable-html-tip-tap';\n\nconst { Panel, toggle, numberFields, dropdown } = settings;\n\nconst defaultFeedback = {\n type: 'default',\n default: 'Your answer has been submitted',\n};\n\nconst StyledHeader: any = styled(Typography)(({ theme }) => ({\n paddingBottom: theme.spacing(1),\n}));\n\nconst PromptContainer: any = styled(InputContainer)(({ theme }) => ({\n paddingTop: theme.spacing(1),\n marginTop: theme.spacing(2),\n marginBottom: theme.spacing(2),\n width: '100%',\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 Main extends React.Component {\n static propTypes = {\n onModelChanged: PropTypes.func.isRequired,\n onConfigurationChanged: PropTypes.func,\n model: PropTypes.object.isRequired,\n configuration: PropTypes.object.isRequired,\n imageSupport: PropTypes.object.isRequired,\n uploadSoundSupport: PropTypes.object.isRequired,\n };\n\n constructor(props) {\n super(props);\n this.state = { setDimensions: true };\n }\n\n onPromptChange: any = (markup) => {\n const { onModelChanged, model } = this.props;\n\n onModelChanged({ ...model, prompt: markup });\n };\n\n changeFeedback: any = (feedback) => {\n const { model, onModelChanged } = this.props;\n const update = { ...model, feedback };\n\n onModelChanged(update);\n };\n\n changeTeacherInstructions: any = (teacherInstructions) => {\n const { model, onModelChanged } = this.props;\n const update = { ...model, teacherInstructions };\n\n onModelChanged(update);\n };\n\n render() {\n const { model, configuration, imageSupport, onConfigurationChanged, onModelChanged, uploadSoundSupport } =\n this.props;\n const {\n annotations = {},\n contentDimensions = {},\n dimensions = {},\n equationEditor = {},\n feedback = {},\n playerSpellCheck = {},\n prompt = {},\n settingsPanelDisabled,\n spanishInput = {},\n specialInput = {},\n spellCheck = {},\n studentInstructions = {},\n teacherInstructions = {},\n mathInput = {},\n maxImageWidth = {},\n maxImageHeight = {},\n multiple = {},\n withRubric = {},\n mathMlOptions = {},\n baseInputConfiguration = {},\n } = configuration || {};\n const {\n errors = {},\n extraCSSRules,\n feedbackEnabled,\n promptEnabled,\n spellCheckEnabled,\n teacherInstructionsEnabled,\n toolbarEditorPosition,\n } = model || {};\n const { prompt: promptError, teacherInstructions: teacherInstructionsError } = errors;\n\n const defaultImageMaxWidth = maxImageWidth && maxImageWidth.prompt;\n const defaultImageMaxHeight = maxImageHeight && maxImageHeight.prompt;\n\n const toolbarOpts = {\n position: toolbarEditorPosition === 'top' ? 'top' : 'bottom',\n };\n\n const panelSettings = {\n mathInput: mathInput.settings && toggle(mathInput.label),\n equationEditor:\n equationEditor.enabled &&\n model.mathInput &&\n dropdown(equationEditor.label, [\n 'non-negative-integers',\n 'integers',\n 'decimals',\n 'fractions',\n 'Grade 1 - 2',\n 'Grade 3 - 5',\n 'Grade 6 - 7',\n 'Grade 8 - HS',\n 'geometry',\n 'advanced-algebra',\n 'statistics',\n 'item-authoring',\n ]),\n spanishInput: spanishInput.settings && toggle(spanishInput.label),\n specialInput: specialInput.settings && toggle(specialInput.label),\n dimensions:\n dimensions.settings &&\n numberFields(dimensions.label, {\n width: { label: 'Width (px)', suffix: 'px', min: 100, max: 1200 },\n height: { label: 'Height (px)', suffix: 'px', min: 100, max: 500 },\n }),\n 'multiple.enabled': multiple.settings && toggle(multiple.label, true),\n promptEnabled: prompt.settings && toggle(prompt.label),\n feedbackEnabled: feedback.settings && toggle(feedback.label),\n annotationsEnabled: annotations.settings && toggle(annotations.label),\n spellCheckEnabled: spellCheck.settings && toggle(spellCheck.label),\n playerSpellCheckDisabled: playerSpellCheck.settings && toggle(playerSpellCheck.label),\n };\n const panelProperties = {\n teacherInstructionsEnabled: teacherInstructions.settings && toggle(teacherInstructions.label),\n studentInstructionsEnabled: studentInstructions.settings && toggle(studentInstructions.label),\n rubricEnabled: withRubric?.settings && toggle(withRubric?.label),\n };\n\n const getPluginProps = (props) => {\n return Object.assign(\n {\n ...baseInputConfiguration,\n },\n props || {},\n );\n };\n\n return (\n <layout.ConfigLayout\n extraCSSRules={extraCSSRules}\n dimensions={contentDimensions}\n hideSettings={settingsPanelDisabled}\n settings={\n <Panel\n model={model}\n configuration={configuration}\n onChangeModel={(model) => onModelChanged(model)}\n onChangeConfiguration={(config) => onConfigurationChanged(config)}\n groups={{\n Settings: panelSettings,\n Properties: panelProperties,\n }}\n />\n }\n >\n {teacherInstructionsEnabled && (\n <PromptContainer label={teacherInstructions.label}>\n <EditableHtml\n className=\"prompt\"\n markup={model.teacherInstructions || ''}\n onChange={this.changeTeacherInstructions}\n imageSupport={imageSupport}\n nonEmpty={false}\n error={teacherInstructionsError}\n toolbarOpts={toolbarOpts}\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 pluginProps={getPluginProps(teacherInstructions?.inputConfiguration)}\n />\n {teacherInstructionsError && <ErrorText>{teacherInstructionsError}</ErrorText>}\n </PromptContainer>\n )}\n\n {promptEnabled && (\n <PromptContainer label={prompt.label}>\n <EditableHtml\n activePlugins={ALL_PLUGINS}\n className=\"prompt\"\n markup={model.prompt || ''}\n onChange={this.onPromptChange}\n imageSupport={imageSupport}\n nonEmpty={false}\n error={promptError}\n toolbarOpts={toolbarOpts}\n spellCheck={spellCheckEnabled}\n maxImageWidth={defaultImageMaxWidth}\n maxImageHeight={defaultImageMaxHeight}\n uploadSoundSupport={uploadSoundSupport}\n languageCharactersProps={[{ language: 'spanish' }, { language: 'special' }]}\n mathMlOptions={mathMlOptions}\n pluginProps={getPluginProps(prompt?.inputConfiguration)}\n />\n {promptError && <ErrorText>{promptError}</ErrorText>}\n </PromptContainer>\n )}\n\n {feedbackEnabled && (\n <React.Fragment>\n <StyledHeader variant=\"h6\">\n Feedback\n </StyledHeader>\n\n <FeedbackSelector\n label=\"When submitted, show\"\n feedback={model.feedback || defaultFeedback}\n onChange={this.changeFeedback}\n toolbarOpts={toolbarOpts}\n />\n </React.Fragment>\n )}\n </layout.ConfigLayout>\n );\n }\n}\n\nexport default Main;\n","// @ts-nocheck\n/**\n * @synced-from pie-elements/packages/extended-text-entry/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\nexport default {\n model: {\n annotationsEnabled: false,\n dimensions: { height: 100, width: 500 },\n equationEditor: 'Grade 8 - HS',\n feedbackEnabled: false,\n mathInput: false,\n playerSpellCheckDisabled: true,\n predefinedAnnotations: [\n { label: 'good', text: 'good', type: 'positive' },\n { label: '★', text: '★', type: 'positive' },\n { label: ':-)', text: ':-)', type: 'positive' },\n { label: 'creative', text: 'creative', type: 'positive' },\n { label: 'run-on', text: 'run-on', type: 'negative' },\n { label: 'frag', text: 'fragment', type: 'negative' },\n { label: 'tran', text: 'transition', type: 'negative' },\n { label: 'supp', text: 'support needed', type: 'negative' },\n { label: 'punc', text: 'punctuation', type: 'negative' },\n { label: 'agr', text: 'agreement wrong', type: 'negative' },\n { label: 'unclear', text: 'unclear', type: 'negative' },\n { label: 'cut', text: 'cut', type: 'negative' },\n { label: 'sp', text: 'spelling', type: 'negative' },\n { label: 'cap', text: 'capitalization', type: 'negative' },\n { label: 'inf', text: 'informal', type: 'negative' },\n { label: 'awk', text: 'awkward', type: 'negative' },\n ],\n prompt: '',\n promptEnabled: true,\n rationale: '',\n rationaleEnabled: true,\n spanishInput: false,\n specialInput: false,\n spellCheckEnabled: true,\n studentInstructionsEnabled: true,\n teacherInstructions: '',\n teacherInstructionsEnabled: true,\n toolbarEditorPosition: 'bottom',\n },\n configuration: {\n annotations: {\n settings: false,\n label: 'Annotations',\n },\n baseInputConfiguration: {\n audio: { disabled: false },\n video: { disabled: false },\n image: { disabled: false },\n h3: { disabled: true },\n blockquote: { disabled: true },\n textAlign: { disabled: true },\n showParagraphs: { disabled: false },\n separateParagraphs: { disabled: true },\n },\n dimensions: {\n settings: true,\n label: 'Text-Entry Display Size',\n },\n spellCheck: {\n label: 'Spellcheck',\n settings: false,\n enabled: true,\n },\n playerSpellCheck: {\n label: 'Disable Student Spellcheck',\n settings: true,\n enabled: true,\n },\n equationEditor: {\n settings: false,\n label: 'Equation Editor',\n enabled: true,\n },\n feedback: {\n settings: true,\n label: 'Feedback',\n },\n mathInput: {\n settings: true,\n label: 'Student response can include math notation',\n enabled: false,\n },\n settingsPanelDisabled: false,\n spanishInput: {\n settings: true,\n label: 'Students can insert Spanish',\n enabled: false,\n },\n specialInput: {\n settings: true,\n label: 'Students can insert Special Characters',\n enabled: false,\n },\n multiple: {\n settings: false,\n label: 'Multiple Parts',\n enabled: false,\n },\n studentInstructions: {\n settings: false,\n label: 'Student Instructions',\n },\n prompt: {\n settings: true,\n label: 'Prompt',\n inputConfiguration: {\n audio: { disabled: false },\n video: { disabled: false },\n image: { disabled: false },\n },\n required: false,\n },\n teacherInstructions: {\n settings: true,\n label: 'Teacher Instructions',\n inputConfiguration: {\n audio: { disabled: false },\n video: { disabled: false },\n image: { disabled: false },\n },\n required: false,\n },\n maxImageWidth: {\n teacherInstructions: 300,\n prompt: 300,\n },\n maxImageHeight: {\n teacherInstructions: 300,\n prompt: 300,\n },\n withRubric: {\n settings: false,\n label: 'Add Rubric',\n },\n mathMlOptions: {\n mmlOutput: false,\n mmlEditing: false,\n },\n },\n};\n","// @ts-nocheck\n/**\n * @synced-from pie-elements/packages/extended-text-entry/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 {\n ModelUpdatedEvent,\n DeleteImageEvent,\n InsertImageEvent,\n InsertSoundEvent,\n DeleteSoundEvent,\n} from '@pie-element/shared-configure-events';\nimport React from 'react';\nimport { createRoot } from 'react-dom/client';\nimport Main from './main.js';\n\nimport defaults from './defaults.js';\n\nexport default class ExtendedTextEntry extends HTMLElement {\n static createDefaultModel = (model = {}, config) => {\n const defaultModel = { ...defaults.model, ...model };\n\n // if configuration.withRubric.forceEnabled is true, then we update the model (rubricEnabled)\n // without triggering the Model Updated event (for more details, check documentation)\n if (config?.withRubric?.forceEnabled && !defaultModel.rubricEnabled) {\n defaultModel.rubricEnabled = true;\n }\n\n return defaultModel;\n };\n\n constructor() {\n super();\n this._root = null;\n this._configuration = defaults.configuration;\n\n // if configuration.withRubric.forceEnabled is true, then we\n // update the configuration (we do not want to display the toggle in the Settings Panel)\n if (this._configuration.withRubric?.forceEnabled) {\n this._configuration.withRubric.settings = false;\n }\n\n this._model = ExtendedTextEntry.createDefaultModel({}, this._configuration);\n }\n\n set model(m) {\n this._model = ExtendedTextEntry.createDefaultModel(m, this._configuration);\n this.render();\n }\n\n set configuration(c) {\n this._configuration = {\n ...defaults.configuration,\n ...c,\n };\n\n const { withRubric = {} } = c || {};\n\n // if configuration.withRubric.forceEnabled is true, then we update the model (rubricEnabled)\n // without triggering the Model Updated event (for more details, check documentation)\n // and also update the configuration (we do not want to display the toggle in the Settings Panel)\n if (withRubric?.forceEnabled) {\n this._configuration.withRubric.settings = false;\n\n if (!this._model.rubricEnabled) {\n this._model.rubricEnabled = true;\n }\n }\n\n this.render();\n }\n\n onModelChanged(m) {\n this._model = m;\n this.render();\n this.dispatchEvent(new ModelUpdatedEvent(this._model, false));\n }\n\n onConfigurationChanged(c) {\n this._configuration = {\n ...defaults.configuration,\n ...c,\n };\n\n if (this._model) {\n this.onModelChanged(this._model);\n }\n\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 if (this._model) {\n const element = 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(element);\n }\n }\n\n disconnectedCallback() {\n if (this._root) {\n this._root.unmount();\n }\n }\n}\n"],"mappings":";;;;;;AACA,IAAI,IAAI,MAAM,UAAU,YAAY;CACnC;EACC,KAAK,OAAO;CACb;CACA,YAAY,GAAG,IAAI,CAAC,GAAG;EACtB,MAAM,EAAE,MAAM;GACb,SAAS,CAAC;GACV,QAAQ;IACP,QAAQ;IACR,OAAO;GACR;EACD,CAAC,GAAG,KAAK,SAAS,GAAG,KAAK,QAAQ;CACnC;AACD,GAAG,IAAI,MAAM,UAAU,YAAY;CAClC;EACC,KAAK,OAAO;CACb;CACA,YAAY,GAAG,GAAG;EACjB,MAAM,EAAE,MAAM;GACb,SAAS,CAAC;GACV,QAAQ;IACP,KAAK;IACL,MAAM;GACP;EACD,CAAC,G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IACA,oBAAoB;KAClB,KAAK,KAAK,YAAY,KAAK,IAAI;KAC/B,QAAQ,KAAK,cAAc,KAAK,IAAI;IACtC;GACF,CAAC;GAKD,AAHA,AACE,KAAK,UAAQ,EAAW,IAAI,GAE9B,KAAK,MAAM,OAAO,CAAO;EAC3B;CACF;CAEA,uBAAuB;EACrB,AAAI,KAAK,SACP,KAAK,MAAM,QAAQ;CAEvB;AACF"}
|
|
@@ -1,219 +0,0 @@
|
|
|
1
|
-
import * as __pieBrowserCjsReactRequire from "react";
|
|
2
|
-
const __pieBrowserCjsRequire = (specifier) => {
|
|
3
|
-
switch (specifier) {
|
|
4
|
-
case "react": return __pieBrowserCjsReactRequire;
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
default:
|
|
10
|
-
throw new Error(`Unsupported browser CJS require: ${specifier}`);
|
|
11
|
-
}
|
|
12
|
-
};
|
|
13
|
-
//#region \0rolldown/runtime.js
|
|
14
|
-
var e = Object.create, t = Object.defineProperty, n = Object.getOwnPropertyDescriptor, r = Object.getOwnPropertyNames, i = Object.getPrototypeOf, a = Object.prototype.hasOwnProperty, o = (e, t) => () => (t || (e((t = { exports: {} }).exports, t), e = null), t.exports), s = (e, n) => {
|
|
15
|
-
let r = {};
|
|
16
|
-
for (var i in e) t(r, i, {
|
|
17
|
-
get: e[i],
|
|
18
|
-
enumerable: !0
|
|
19
|
-
});
|
|
20
|
-
return n || t(r, Symbol.toStringTag, { value: "Module" }), r;
|
|
21
|
-
}, c = (e, i, o, s) => {
|
|
22
|
-
if (i && typeof i == "object" || typeof i == "function") for (var c = r(i), l = 0, u = c.length, d; l < u; l++) d = c[l], !a.call(e, d) && d !== o && t(e, d, {
|
|
23
|
-
get: ((e) => i[e]).bind(null, d),
|
|
24
|
-
enumerable: !(s = n(i, d)) || s.enumerable
|
|
25
|
-
});
|
|
26
|
-
return e;
|
|
27
|
-
}, l = (n, r, a) => (a = n == null ? {} : e(i(n)), c(r || !n || !n.__esModule ? t(a, "default", {
|
|
28
|
-
value: n,
|
|
29
|
-
enumerable: !0
|
|
30
|
-
}) : a, n)), u = __pieBrowserCjsRequire, d = /* @__PURE__ */ o(((e, t) => {
|
|
31
|
-
var n = 1e3, r = n * 60, i = r * 60, a = i * 24, o = a * 7, s = a * 365.25;
|
|
32
|
-
t.exports = function(e, t) {
|
|
33
|
-
t ||= {};
|
|
34
|
-
var n = typeof e;
|
|
35
|
-
if (n === "string" && e.length > 0) return c(e);
|
|
36
|
-
if (n === "number" && isFinite(e)) return t.long ? u(e) : l(e);
|
|
37
|
-
throw Error("val is not a non-empty string or a valid number. val=" + JSON.stringify(e));
|
|
38
|
-
};
|
|
39
|
-
function c(e) {
|
|
40
|
-
if (e = String(e), !(e.length > 100)) {
|
|
41
|
-
var t = /^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);
|
|
42
|
-
if (t) {
|
|
43
|
-
var c = parseFloat(t[1]);
|
|
44
|
-
switch ((t[2] || "ms").toLowerCase()) {
|
|
45
|
-
case "years":
|
|
46
|
-
case "year":
|
|
47
|
-
case "yrs":
|
|
48
|
-
case "yr":
|
|
49
|
-
case "y": return c * s;
|
|
50
|
-
case "weeks":
|
|
51
|
-
case "week":
|
|
52
|
-
case "w": return c * o;
|
|
53
|
-
case "days":
|
|
54
|
-
case "day":
|
|
55
|
-
case "d": return c * a;
|
|
56
|
-
case "hours":
|
|
57
|
-
case "hour":
|
|
58
|
-
case "hrs":
|
|
59
|
-
case "hr":
|
|
60
|
-
case "h": return c * i;
|
|
61
|
-
case "minutes":
|
|
62
|
-
case "minute":
|
|
63
|
-
case "mins":
|
|
64
|
-
case "min":
|
|
65
|
-
case "m": return c * r;
|
|
66
|
-
case "seconds":
|
|
67
|
-
case "second":
|
|
68
|
-
case "secs":
|
|
69
|
-
case "sec":
|
|
70
|
-
case "s": return c * n;
|
|
71
|
-
case "milliseconds":
|
|
72
|
-
case "millisecond":
|
|
73
|
-
case "msecs":
|
|
74
|
-
case "msec":
|
|
75
|
-
case "ms": return c;
|
|
76
|
-
default: return;
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
function l(e) {
|
|
82
|
-
var t = Math.abs(e);
|
|
83
|
-
return t >= a ? Math.round(e / a) + "d" : t >= i ? Math.round(e / i) + "h" : t >= r ? Math.round(e / r) + "m" : t >= n ? Math.round(e / n) + "s" : e + "ms";
|
|
84
|
-
}
|
|
85
|
-
function u(e) {
|
|
86
|
-
var t = Math.abs(e);
|
|
87
|
-
return t >= a ? d(e, t, a, "day") : t >= i ? d(e, t, i, "hour") : t >= r ? d(e, t, r, "minute") : t >= n ? d(e, t, n, "second") : e + " ms";
|
|
88
|
-
}
|
|
89
|
-
function d(e, t, n, r) {
|
|
90
|
-
var i = t >= n * 1.5;
|
|
91
|
-
return Math.round(e / n) + " " + r + (i ? "s" : "");
|
|
92
|
-
}
|
|
93
|
-
})), f = /* @__PURE__ */ o(((e, t) => {
|
|
94
|
-
function n(e) {
|
|
95
|
-
n.debug = n, n.default = n, n.coerce = c, n.disable = o, n.enable = i, n.enabled = s, n.humanize = d(), n.destroy = l, Object.keys(e).forEach((t) => {
|
|
96
|
-
n[t] = e[t];
|
|
97
|
-
}), n.names = [], n.skips = [], n.formatters = {};
|
|
98
|
-
function t(e) {
|
|
99
|
-
let t = 0;
|
|
100
|
-
for (let n = 0; n < e.length; n++) t = (t << 5) - t + e.charCodeAt(n), t |= 0;
|
|
101
|
-
return n.colors[Math.abs(t) % n.colors.length];
|
|
102
|
-
}
|
|
103
|
-
n.selectColor = t;
|
|
104
|
-
function n(e) {
|
|
105
|
-
let t, i = null, a, o;
|
|
106
|
-
function s(...e) {
|
|
107
|
-
if (!s.enabled) return;
|
|
108
|
-
let r = s, i = Number(/* @__PURE__ */ new Date());
|
|
109
|
-
r.diff = i - (t || i), r.prev = t, r.curr = i, t = i, e[0] = n.coerce(e[0]), typeof e[0] != "string" && e.unshift("%O");
|
|
110
|
-
let a = 0;
|
|
111
|
-
e[0] = e[0].replace(/%([a-zA-Z%])/g, (t, i) => {
|
|
112
|
-
if (t === "%%") return "%";
|
|
113
|
-
a++;
|
|
114
|
-
let o = n.formatters[i];
|
|
115
|
-
if (typeof o == "function") {
|
|
116
|
-
let n = e[a];
|
|
117
|
-
t = o.call(r, n), e.splice(a, 1), a--;
|
|
118
|
-
}
|
|
119
|
-
return t;
|
|
120
|
-
}), n.formatArgs.call(r, e), (r.log || n.log).apply(r, e);
|
|
121
|
-
}
|
|
122
|
-
return s.namespace = e, s.useColors = n.useColors(), s.color = n.selectColor(e), s.extend = r, s.destroy = n.destroy, Object.defineProperty(s, "enabled", {
|
|
123
|
-
enumerable: !0,
|
|
124
|
-
configurable: !1,
|
|
125
|
-
get: () => i === null ? (a !== n.namespaces && (a = n.namespaces, o = n.enabled(e)), o) : i,
|
|
126
|
-
set: (e) => {
|
|
127
|
-
i = e;
|
|
128
|
-
}
|
|
129
|
-
}), typeof n.init == "function" && n.init(s), s;
|
|
130
|
-
}
|
|
131
|
-
function r(e, t) {
|
|
132
|
-
let r = n(this.namespace + (t === void 0 ? ":" : t) + e);
|
|
133
|
-
return r.log = this.log, r;
|
|
134
|
-
}
|
|
135
|
-
function i(e) {
|
|
136
|
-
n.save(e), n.namespaces = e, n.names = [], n.skips = [];
|
|
137
|
-
let t = (typeof e == "string" ? e : "").trim().replace(/\s+/g, ",").split(",").filter(Boolean);
|
|
138
|
-
for (let e of t) e[0] === "-" ? n.skips.push(e.slice(1)) : n.names.push(e);
|
|
139
|
-
}
|
|
140
|
-
function a(e, t) {
|
|
141
|
-
let n = 0, r = 0, i = -1, a = 0;
|
|
142
|
-
for (; n < e.length;) if (r < t.length && (t[r] === e[n] || t[r] === "*")) t[r] === "*" ? (i = r, a = n, r++) : (n++, r++);
|
|
143
|
-
else if (i !== -1) r = i + 1, a++, n = a;
|
|
144
|
-
else return !1;
|
|
145
|
-
for (; r < t.length && t[r] === "*";) r++;
|
|
146
|
-
return r === t.length;
|
|
147
|
-
}
|
|
148
|
-
function o() {
|
|
149
|
-
let e = [...n.names, ...n.skips.map((e) => "-" + e)].join(",");
|
|
150
|
-
return n.enable(""), e;
|
|
151
|
-
}
|
|
152
|
-
function s(e) {
|
|
153
|
-
for (let t of n.skips) if (a(e, t)) return !1;
|
|
154
|
-
for (let t of n.names) if (a(e, t)) return !0;
|
|
155
|
-
return !1;
|
|
156
|
-
}
|
|
157
|
-
function c(e) {
|
|
158
|
-
return e instanceof Error ? e.stack || e.message : e;
|
|
159
|
-
}
|
|
160
|
-
function l() {
|
|
161
|
-
console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");
|
|
162
|
-
}
|
|
163
|
-
return n.enable(n.load()), n;
|
|
164
|
-
}
|
|
165
|
-
t.exports = n;
|
|
166
|
-
})), p = /* @__PURE__ */ o(((e, t) => {
|
|
167
|
-
e.formatArgs = r, e.save = i, e.load = a, e.useColors = n, e.storage = o(), e.destroy = (() => {
|
|
168
|
-
let e = !1;
|
|
169
|
-
return () => {
|
|
170
|
-
e || (e = !0, console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."));
|
|
171
|
-
};
|
|
172
|
-
})(), e.colors = /* @__PURE__ */ "#0000CC.#0000FF.#0033CC.#0033FF.#0066CC.#0066FF.#0099CC.#0099FF.#00CC00.#00CC33.#00CC66.#00CC99.#00CCCC.#00CCFF.#3300CC.#3300FF.#3333CC.#3333FF.#3366CC.#3366FF.#3399CC.#3399FF.#33CC00.#33CC33.#33CC66.#33CC99.#33CCCC.#33CCFF.#6600CC.#6600FF.#6633CC.#6633FF.#66CC00.#66CC33.#9900CC.#9900FF.#9933CC.#9933FF.#99CC00.#99CC33.#CC0000.#CC0033.#CC0066.#CC0099.#CC00CC.#CC00FF.#CC3300.#CC3333.#CC3366.#CC3399.#CC33CC.#CC33FF.#CC6600.#CC6633.#CC9900.#CC9933.#CCCC00.#CCCC33.#FF0000.#FF0033.#FF0066.#FF0099.#FF00CC.#FF00FF.#FF3300.#FF3333.#FF3366.#FF3399.#FF33CC.#FF33FF.#FF6600.#FF6633.#FF9900.#FF9933.#FFCC00.#FFCC33".split(".");
|
|
173
|
-
function n() {
|
|
174
|
-
if (typeof window < "u" && window.process && (window.process.type === "renderer" || window.process.__nwjs)) return !0;
|
|
175
|
-
if (typeof navigator < "u" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)) return !1;
|
|
176
|
-
let e;
|
|
177
|
-
return typeof document < "u" && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance || typeof window < "u" && window.console && (window.console.firebug || window.console.exception && window.console.table) || typeof navigator < "u" && navigator.userAgent && (e = navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)) && parseInt(e[1], 10) >= 31 || typeof navigator < "u" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/);
|
|
178
|
-
}
|
|
179
|
-
function r(e) {
|
|
180
|
-
if (e[0] = (this.useColors ? "%c" : "") + this.namespace + (this.useColors ? " %c" : " ") + e[0] + (this.useColors ? "%c " : " ") + "+" + t.exports.humanize(this.diff), !this.useColors) return;
|
|
181
|
-
let n = "color: " + this.color;
|
|
182
|
-
e.splice(1, 0, n, "color: inherit");
|
|
183
|
-
let r = 0, i = 0;
|
|
184
|
-
e[0].replace(/%[a-zA-Z%]/g, (e) => {
|
|
185
|
-
e !== "%%" && (r++, e === "%c" && (i = r));
|
|
186
|
-
}), e.splice(i, 0, n);
|
|
187
|
-
}
|
|
188
|
-
e.log = console.debug || console.log || (() => {});
|
|
189
|
-
function i(t) {
|
|
190
|
-
try {
|
|
191
|
-
t ? e.storage.setItem("debug", t) : e.storage.removeItem("debug");
|
|
192
|
-
} catch {}
|
|
193
|
-
}
|
|
194
|
-
function a() {
|
|
195
|
-
let t;
|
|
196
|
-
try {
|
|
197
|
-
t = e.storage.getItem("debug") || e.storage.getItem("DEBUG");
|
|
198
|
-
} catch {}
|
|
199
|
-
return !t && typeof process < "u" && "env" in process && (t = process.env.DEBUG), t;
|
|
200
|
-
}
|
|
201
|
-
function o() {
|
|
202
|
-
try {
|
|
203
|
-
return localStorage;
|
|
204
|
-
} catch {}
|
|
205
|
-
}
|
|
206
|
-
t.exports = f()(e);
|
|
207
|
-
var { formatters: s } = t.exports;
|
|
208
|
-
s.j = function(e) {
|
|
209
|
-
try {
|
|
210
|
-
return JSON.stringify(e);
|
|
211
|
-
} catch (e) {
|
|
212
|
-
return "[UnexpectedJSONParseError]: " + e.message;
|
|
213
|
-
}
|
|
214
|
-
};
|
|
215
|
-
}));
|
|
216
|
-
//#endregion
|
|
217
|
-
export { l as a, u as i, o as n, s as r, p as t };
|
|
218
|
-
|
|
219
|
-
//# sourceMappingURL=browser-kkT1XVKw.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"browser-kkT1XVKw.js","names":[],"sources":["../../../../../node_modules/.bun/ms@2.1.3/node_modules/ms/index.js","../../../../../node_modules/.bun/debug@4.4.3/node_modules/debug/src/common.js","../../../../../node_modules/.bun/debug@4.4.3/node_modules/debug/src/browser.js"],"sourcesContent":["/**\n * Helpers.\n */\n\nvar s = 1000;\nvar m = s * 60;\nvar h = m * 60;\nvar d = h * 24;\nvar w = d * 7;\nvar y = d * 365.25;\n\n/**\n * Parse or format the given `val`.\n *\n * Options:\n *\n * - `long` verbose formatting [false]\n *\n * @param {String|Number} val\n * @param {Object} [options]\n * @throws {Error} throw an error if val is not a non-empty string or a number\n * @return {String|Number}\n * @api public\n */\n\nmodule.exports = function (val, options) {\n options = options || {};\n var type = typeof val;\n if (type === 'string' && val.length > 0) {\n return parse(val);\n } else if (type === 'number' && isFinite(val)) {\n return options.long ? fmtLong(val) : fmtShort(val);\n }\n throw new Error(\n 'val is not a non-empty string or a valid number. val=' +\n JSON.stringify(val)\n );\n};\n\n/**\n * Parse the given `str` and return milliseconds.\n *\n * @param {String} str\n * @return {Number}\n * @api private\n */\n\nfunction parse(str) {\n str = String(str);\n if (str.length > 100) {\n return;\n }\n var match = /^(-?(?:\\d+)?\\.?\\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(\n str\n );\n if (!match) {\n return;\n }\n var n = parseFloat(match[1]);\n var type = (match[2] || 'ms').toLowerCase();\n switch (type) {\n case 'years':\n case 'year':\n case 'yrs':\n case 'yr':\n case 'y':\n return n * y;\n case 'weeks':\n case 'week':\n case 'w':\n return n * w;\n case 'days':\n case 'day':\n case 'd':\n return n * d;\n case 'hours':\n case 'hour':\n case 'hrs':\n case 'hr':\n case 'h':\n return n * h;\n case 'minutes':\n case 'minute':\n case 'mins':\n case 'min':\n case 'm':\n return n * m;\n case 'seconds':\n case 'second':\n case 'secs':\n case 'sec':\n case 's':\n return n * s;\n case 'milliseconds':\n case 'millisecond':\n case 'msecs':\n case 'msec':\n case 'ms':\n return n;\n default:\n return undefined;\n }\n}\n\n/**\n * Short format for `ms`.\n *\n * @param {Number} ms\n * @return {String}\n * @api private\n */\n\nfunction fmtShort(ms) {\n var msAbs = Math.abs(ms);\n if (msAbs >= d) {\n return Math.round(ms / d) + 'd';\n }\n if (msAbs >= h) {\n return Math.round(ms / h) + 'h';\n }\n if (msAbs >= m) {\n return Math.round(ms / m) + 'm';\n }\n if (msAbs >= s) {\n return Math.round(ms / s) + 's';\n }\n return ms + 'ms';\n}\n\n/**\n * Long format for `ms`.\n *\n * @param {Number} ms\n * @return {String}\n * @api private\n */\n\nfunction fmtLong(ms) {\n var msAbs = Math.abs(ms);\n if (msAbs >= d) {\n return plural(ms, msAbs, d, 'day');\n }\n if (msAbs >= h) {\n return plural(ms, msAbs, h, 'hour');\n }\n if (msAbs >= m) {\n return plural(ms, msAbs, m, 'minute');\n }\n if (msAbs >= s) {\n return plural(ms, msAbs, s, 'second');\n }\n return ms + ' ms';\n}\n\n/**\n * Pluralization helper.\n */\n\nfunction plural(ms, msAbs, n, name) {\n var isPlural = msAbs >= n * 1.5;\n return Math.round(ms / n) + ' ' + name + (isPlural ? 's' : '');\n}\n","\n/**\n * This is the common logic for both the Node.js and web browser\n * implementations of `debug()`.\n */\n\nfunction setup(env) {\n\tcreateDebug.debug = createDebug;\n\tcreateDebug.default = createDebug;\n\tcreateDebug.coerce = coerce;\n\tcreateDebug.disable = disable;\n\tcreateDebug.enable = enable;\n\tcreateDebug.enabled = enabled;\n\tcreateDebug.humanize = require('ms');\n\tcreateDebug.destroy = destroy;\n\n\tObject.keys(env).forEach(key => {\n\t\tcreateDebug[key] = env[key];\n\t});\n\n\t/**\n\t* The currently active debug mode names, and names to skip.\n\t*/\n\n\tcreateDebug.names = [];\n\tcreateDebug.skips = [];\n\n\t/**\n\t* Map of special \"%n\" handling functions, for the debug \"format\" argument.\n\t*\n\t* Valid key names are a single, lower or upper-case letter, i.e. \"n\" and \"N\".\n\t*/\n\tcreateDebug.formatters = {};\n\n\t/**\n\t* Selects a color for a debug namespace\n\t* @param {String} namespace The namespace string for the debug instance to be colored\n\t* @return {Number|String} An ANSI color code for the given namespace\n\t* @api private\n\t*/\n\tfunction selectColor(namespace) {\n\t\tlet hash = 0;\n\n\t\tfor (let i = 0; i < namespace.length; i++) {\n\t\t\thash = ((hash << 5) - hash) + namespace.charCodeAt(i);\n\t\t\thash |= 0; // Convert to 32bit integer\n\t\t}\n\n\t\treturn createDebug.colors[Math.abs(hash) % createDebug.colors.length];\n\t}\n\tcreateDebug.selectColor = selectColor;\n\n\t/**\n\t* Create a debugger with the given `namespace`.\n\t*\n\t* @param {String} namespace\n\t* @return {Function}\n\t* @api public\n\t*/\n\tfunction createDebug(namespace) {\n\t\tlet prevTime;\n\t\tlet enableOverride = null;\n\t\tlet namespacesCache;\n\t\tlet enabledCache;\n\n\t\tfunction debug(...args) {\n\t\t\t// Disabled?\n\t\t\tif (!debug.enabled) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst self = debug;\n\n\t\t\t// Set `diff` timestamp\n\t\t\tconst curr = Number(new Date());\n\t\t\tconst ms = curr - (prevTime || curr);\n\t\t\tself.diff = ms;\n\t\t\tself.prev = prevTime;\n\t\t\tself.curr = curr;\n\t\t\tprevTime = curr;\n\n\t\t\targs[0] = createDebug.coerce(args[0]);\n\n\t\t\tif (typeof args[0] !== 'string') {\n\t\t\t\t// Anything else let's inspect with %O\n\t\t\t\targs.unshift('%O');\n\t\t\t}\n\n\t\t\t// Apply any `formatters` transformations\n\t\t\tlet index = 0;\n\t\t\targs[0] = args[0].replace(/%([a-zA-Z%])/g, (match, format) => {\n\t\t\t\t// If we encounter an escaped % then don't increase the array index\n\t\t\t\tif (match === '%%') {\n\t\t\t\t\treturn '%';\n\t\t\t\t}\n\t\t\t\tindex++;\n\t\t\t\tconst formatter = createDebug.formatters[format];\n\t\t\t\tif (typeof formatter === 'function') {\n\t\t\t\t\tconst val = args[index];\n\t\t\t\t\tmatch = formatter.call(self, val);\n\n\t\t\t\t\t// Now we need to remove `args[index]` since it's inlined in the `format`\n\t\t\t\t\targs.splice(index, 1);\n\t\t\t\t\tindex--;\n\t\t\t\t}\n\t\t\t\treturn match;\n\t\t\t});\n\n\t\t\t// Apply env-specific formatting (colors, etc.)\n\t\t\tcreateDebug.formatArgs.call(self, args);\n\n\t\t\tconst logFn = self.log || createDebug.log;\n\t\t\tlogFn.apply(self, args);\n\t\t}\n\n\t\tdebug.namespace = namespace;\n\t\tdebug.useColors = createDebug.useColors();\n\t\tdebug.color = createDebug.selectColor(namespace);\n\t\tdebug.extend = extend;\n\t\tdebug.destroy = createDebug.destroy; // XXX Temporary. Will be removed in the next major release.\n\n\t\tObject.defineProperty(debug, 'enabled', {\n\t\t\tenumerable: true,\n\t\t\tconfigurable: false,\n\t\t\tget: () => {\n\t\t\t\tif (enableOverride !== null) {\n\t\t\t\t\treturn enableOverride;\n\t\t\t\t}\n\t\t\t\tif (namespacesCache !== createDebug.namespaces) {\n\t\t\t\t\tnamespacesCache = createDebug.namespaces;\n\t\t\t\t\tenabledCache = createDebug.enabled(namespace);\n\t\t\t\t}\n\n\t\t\t\treturn enabledCache;\n\t\t\t},\n\t\t\tset: v => {\n\t\t\t\tenableOverride = v;\n\t\t\t}\n\t\t});\n\n\t\t// Env-specific initialization logic for debug instances\n\t\tif (typeof createDebug.init === 'function') {\n\t\t\tcreateDebug.init(debug);\n\t\t}\n\n\t\treturn debug;\n\t}\n\n\tfunction extend(namespace, delimiter) {\n\t\tconst newDebug = createDebug(this.namespace + (typeof delimiter === 'undefined' ? ':' : delimiter) + namespace);\n\t\tnewDebug.log = this.log;\n\t\treturn newDebug;\n\t}\n\n\t/**\n\t* Enables a debug mode by namespaces. This can include modes\n\t* separated by a colon and wildcards.\n\t*\n\t* @param {String} namespaces\n\t* @api public\n\t*/\n\tfunction enable(namespaces) {\n\t\tcreateDebug.save(namespaces);\n\t\tcreateDebug.namespaces = namespaces;\n\n\t\tcreateDebug.names = [];\n\t\tcreateDebug.skips = [];\n\n\t\tconst split = (typeof namespaces === 'string' ? namespaces : '')\n\t\t\t.trim()\n\t\t\t.replace(/\\s+/g, ',')\n\t\t\t.split(',')\n\t\t\t.filter(Boolean);\n\n\t\tfor (const ns of split) {\n\t\t\tif (ns[0] === '-') {\n\t\t\t\tcreateDebug.skips.push(ns.slice(1));\n\t\t\t} else {\n\t\t\t\tcreateDebug.names.push(ns);\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Checks if the given string matches a namespace template, honoring\n\t * asterisks as wildcards.\n\t *\n\t * @param {String} search\n\t * @param {String} template\n\t * @return {Boolean}\n\t */\n\tfunction matchesTemplate(search, template) {\n\t\tlet searchIndex = 0;\n\t\tlet templateIndex = 0;\n\t\tlet starIndex = -1;\n\t\tlet matchIndex = 0;\n\n\t\twhile (searchIndex < search.length) {\n\t\t\tif (templateIndex < template.length && (template[templateIndex] === search[searchIndex] || template[templateIndex] === '*')) {\n\t\t\t\t// Match character or proceed with wildcard\n\t\t\t\tif (template[templateIndex] === '*') {\n\t\t\t\t\tstarIndex = templateIndex;\n\t\t\t\t\tmatchIndex = searchIndex;\n\t\t\t\t\ttemplateIndex++; // Skip the '*'\n\t\t\t\t} else {\n\t\t\t\t\tsearchIndex++;\n\t\t\t\t\ttemplateIndex++;\n\t\t\t\t}\n\t\t\t} else if (starIndex !== -1) { // eslint-disable-line no-negated-condition\n\t\t\t\t// Backtrack to the last '*' and try to match more characters\n\t\t\t\ttemplateIndex = starIndex + 1;\n\t\t\t\tmatchIndex++;\n\t\t\t\tsearchIndex = matchIndex;\n\t\t\t} else {\n\t\t\t\treturn false; // No match\n\t\t\t}\n\t\t}\n\n\t\t// Handle trailing '*' in template\n\t\twhile (templateIndex < template.length && template[templateIndex] === '*') {\n\t\t\ttemplateIndex++;\n\t\t}\n\n\t\treturn templateIndex === template.length;\n\t}\n\n\t/**\n\t* Disable debug output.\n\t*\n\t* @return {String} namespaces\n\t* @api public\n\t*/\n\tfunction disable() {\n\t\tconst namespaces = [\n\t\t\t...createDebug.names,\n\t\t\t...createDebug.skips.map(namespace => '-' + namespace)\n\t\t].join(',');\n\t\tcreateDebug.enable('');\n\t\treturn namespaces;\n\t}\n\n\t/**\n\t* Returns true if the given mode name is enabled, false otherwise.\n\t*\n\t* @param {String} name\n\t* @return {Boolean}\n\t* @api public\n\t*/\n\tfunction enabled(name) {\n\t\tfor (const skip of createDebug.skips) {\n\t\t\tif (matchesTemplate(name, skip)) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\tfor (const ns of createDebug.names) {\n\t\t\tif (matchesTemplate(name, ns)) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}\n\n\t/**\n\t* Coerce `val`.\n\t*\n\t* @param {Mixed} val\n\t* @return {Mixed}\n\t* @api private\n\t*/\n\tfunction coerce(val) {\n\t\tif (val instanceof Error) {\n\t\t\treturn val.stack || val.message;\n\t\t}\n\t\treturn val;\n\t}\n\n\t/**\n\t* XXX DO NOT USE. This is a temporary stub function.\n\t* XXX It WILL be removed in the next major release.\n\t*/\n\tfunction destroy() {\n\t\tconsole.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.');\n\t}\n\n\tcreateDebug.enable(createDebug.load());\n\n\treturn createDebug;\n}\n\nmodule.exports = setup;\n","/* eslint-env browser */\n\n/**\n * This is the web browser implementation of `debug()`.\n */\n\nexports.formatArgs = formatArgs;\nexports.save = save;\nexports.load = load;\nexports.useColors = useColors;\nexports.storage = localstorage();\nexports.destroy = (() => {\n\tlet warned = false;\n\n\treturn () => {\n\t\tif (!warned) {\n\t\t\twarned = true;\n\t\t\tconsole.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.');\n\t\t}\n\t};\n})();\n\n/**\n * Colors.\n */\n\nexports.colors = [\n\t'#0000CC',\n\t'#0000FF',\n\t'#0033CC',\n\t'#0033FF',\n\t'#0066CC',\n\t'#0066FF',\n\t'#0099CC',\n\t'#0099FF',\n\t'#00CC00',\n\t'#00CC33',\n\t'#00CC66',\n\t'#00CC99',\n\t'#00CCCC',\n\t'#00CCFF',\n\t'#3300CC',\n\t'#3300FF',\n\t'#3333CC',\n\t'#3333FF',\n\t'#3366CC',\n\t'#3366FF',\n\t'#3399CC',\n\t'#3399FF',\n\t'#33CC00',\n\t'#33CC33',\n\t'#33CC66',\n\t'#33CC99',\n\t'#33CCCC',\n\t'#33CCFF',\n\t'#6600CC',\n\t'#6600FF',\n\t'#6633CC',\n\t'#6633FF',\n\t'#66CC00',\n\t'#66CC33',\n\t'#9900CC',\n\t'#9900FF',\n\t'#9933CC',\n\t'#9933FF',\n\t'#99CC00',\n\t'#99CC33',\n\t'#CC0000',\n\t'#CC0033',\n\t'#CC0066',\n\t'#CC0099',\n\t'#CC00CC',\n\t'#CC00FF',\n\t'#CC3300',\n\t'#CC3333',\n\t'#CC3366',\n\t'#CC3399',\n\t'#CC33CC',\n\t'#CC33FF',\n\t'#CC6600',\n\t'#CC6633',\n\t'#CC9900',\n\t'#CC9933',\n\t'#CCCC00',\n\t'#CCCC33',\n\t'#FF0000',\n\t'#FF0033',\n\t'#FF0066',\n\t'#FF0099',\n\t'#FF00CC',\n\t'#FF00FF',\n\t'#FF3300',\n\t'#FF3333',\n\t'#FF3366',\n\t'#FF3399',\n\t'#FF33CC',\n\t'#FF33FF',\n\t'#FF6600',\n\t'#FF6633',\n\t'#FF9900',\n\t'#FF9933',\n\t'#FFCC00',\n\t'#FFCC33'\n];\n\n/**\n * Currently only WebKit-based Web Inspectors, Firefox >= v31,\n * and the Firebug extension (any Firefox version) are known\n * to support \"%c\" CSS customizations.\n *\n * TODO: add a `localStorage` variable to explicitly enable/disable colors\n */\n\n// eslint-disable-next-line complexity\nfunction useColors() {\n\t// NB: In an Electron preload script, document will be defined but not fully\n\t// initialized. Since we know we're in Chrome, we'll just detect this case\n\t// explicitly\n\tif (typeof window !== 'undefined' && window.process && (window.process.type === 'renderer' || window.process.__nwjs)) {\n\t\treturn true;\n\t}\n\n\t// Internet Explorer and Edge do not support colors.\n\tif (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\\/(\\d+)/)) {\n\t\treturn false;\n\t}\n\n\tlet m;\n\n\t// Is webkit? http://stackoverflow.com/a/16459606/376773\n\t// document is undefined in react-native: https://github.com/facebook/react-native/pull/1632\n\t// eslint-disable-next-line no-return-assign\n\treturn (typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance) ||\n\t\t// Is firebug? http://stackoverflow.com/a/398120/376773\n\t\t(typeof window !== 'undefined' && window.console && (window.console.firebug || (window.console.exception && window.console.table))) ||\n\t\t// Is firefox >= v31?\n\t\t// https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages\n\t\t(typeof navigator !== 'undefined' && navigator.userAgent && (m = navigator.userAgent.toLowerCase().match(/firefox\\/(\\d+)/)) && parseInt(m[1], 10) >= 31) ||\n\t\t// Double check webkit in userAgent just in case we are in a worker\n\t\t(typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\\/(\\d+)/));\n}\n\n/**\n * Colorize log arguments if enabled.\n *\n * @api public\n */\n\nfunction formatArgs(args) {\n\targs[0] = (this.useColors ? '%c' : '') +\n\t\tthis.namespace +\n\t\t(this.useColors ? ' %c' : ' ') +\n\t\targs[0] +\n\t\t(this.useColors ? '%c ' : ' ') +\n\t\t'+' + module.exports.humanize(this.diff);\n\n\tif (!this.useColors) {\n\t\treturn;\n\t}\n\n\tconst c = 'color: ' + this.color;\n\targs.splice(1, 0, c, 'color: inherit');\n\n\t// The final \"%c\" is somewhat tricky, because there could be other\n\t// arguments passed either before or after the %c, so we need to\n\t// figure out the correct index to insert the CSS into\n\tlet index = 0;\n\tlet lastC = 0;\n\targs[0].replace(/%[a-zA-Z%]/g, match => {\n\t\tif (match === '%%') {\n\t\t\treturn;\n\t\t}\n\t\tindex++;\n\t\tif (match === '%c') {\n\t\t\t// We only are interested in the *last* %c\n\t\t\t// (the user may have provided their own)\n\t\t\tlastC = index;\n\t\t}\n\t});\n\n\targs.splice(lastC, 0, c);\n}\n\n/**\n * Invokes `console.debug()` when available.\n * No-op when `console.debug` is not a \"function\".\n * If `console.debug` is not available, falls back\n * to `console.log`.\n *\n * @api public\n */\nexports.log = console.debug || console.log || (() => {});\n\n/**\n * Save `namespaces`.\n *\n * @param {String} namespaces\n * @api private\n */\nfunction save(namespaces) {\n\ttry {\n\t\tif (namespaces) {\n\t\t\texports.storage.setItem('debug', namespaces);\n\t\t} else {\n\t\t\texports.storage.removeItem('debug');\n\t\t}\n\t} catch (error) {\n\t\t// Swallow\n\t\t// XXX (@Qix-) should we be logging these?\n\t}\n}\n\n/**\n * Load `namespaces`.\n *\n * @return {String} returns the previously persisted debug modes\n * @api private\n */\nfunction load() {\n\tlet r;\n\ttry {\n\t\tr = exports.storage.getItem('debug') || exports.storage.getItem('DEBUG') ;\n\t} catch (error) {\n\t\t// Swallow\n\t\t// XXX (@Qix-) should we be logging these?\n\t}\n\n\t// If debug isn't set in LS, and we're in Electron, try to load $DEBUG\n\tif (!r && typeof process !== 'undefined' && 'env' in process) {\n\t\tr = process.env.DEBUG;\n\t}\n\n\treturn r;\n}\n\n/**\n * Localstorage attempts to return the localstorage.\n *\n * This is necessary because safari throws\n * when a user disables cookies/localstorage\n * and you attempt to access it.\n *\n * @return {LocalStorage}\n * @api private\n */\n\nfunction localstorage() {\n\ttry {\n\t\t// TVMLKit (Apple TV JS Runtime) does not have a window object, just localStorage in the global context\n\t\t// The Browser also has localStorage in the global context.\n\t\treturn localStorage;\n\t} catch (error) {\n\t\t// Swallow\n\t\t// XXX (@Qix-) should we be logging these?\n\t}\n}\n\nmodule.exports = require('./common')(exports);\n\nconst {formatters} = module.exports;\n\n/**\n * Map %j to `JSON.stringify()`, since no Web Inspectors do that by default.\n */\n\nformatters.j = function (v) {\n\ttry {\n\t\treturn JSON.stringify(v);\n\t} catch (error) {\n\t\treturn '[UnexpectedJSONParseError]: ' + error.message;\n\t}\n};\n"],"x_google_ignoreList":[0,1,2],"mappings":";;;;;;;;;;;;;;;;;;;;;CAIA,IAAI,IAAI,KACJ,IAAI,IAAI,IACR,IAAI,IAAI,IACR,IAAI,IAAI,IACR,IAAI,IAAI,GACR,IAAI,IAAI;CAgBZ,EAAO,UAAU,SAAU,GAAK,GAAS;EACvC,MAAqB,CAAC;EACtB,IAAI,IAAO,OAAO;EAClB,IAAI,MAAS,YAAY,EAAI,SAAS,GACpC,OAAO,EAAM,CAAG;EACX,IAAI,MAAS,YAAY,SAAS,CAAG,GAC1C,OAAO,EAAQ,OAAO,EAAQ,CAAG,IAAI,EAAS,CAAG;EAEnD,MAAU,MACR,0DACE,KAAK,UAAU,CAAG,CACtB;CACF;CAUA,SAAS,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AI;EACJ,IAAI;GACH,IAAI,EAAQ,QAAQ,QAAQ,OAAO,KAAK,EAAQ,QAAQ,QAAQ,OAAO;EACxE,QAAgB,CAGhB;EAOA,OAJI,CAAC,KAAK,OAAO,UAAY,OAAe,SAAS,YACpD,IAAI,QAAQ,IAAI,QAGV;CACR;CAaA,SAAS,IAAe;EACvB,IAAI;GAGH,OAAO;EACR,QAAgB,CAGhB;CACD;CAEA,EAAO,UAAA,EAAA,EAA8B,CAAO;CAE5C,IAAM,EAAC,kBAAc,EAAO;CAM5B,EAAW,IAAI,SAAU,GAAG;EAC3B,IAAI;GACH,OAAO,KAAK,UAAU,CAAC;EACxB,SAAS,GAAO;GACf,OAAO,iCAAiC,EAAM;EAC/C;CACD"}
|
|
@@ -1,184 +0,0 @@
|
|
|
1
|
-
import { a as e, t } from "../browser-kkT1XVKw.js";
|
|
2
|
-
//#region ../../shared/feedback/dist/index.js
|
|
3
|
-
var n = /* @__PURE__ */ e(t(), 1);
|
|
4
|
-
function r(e, t) {
|
|
5
|
-
return new Promise((n) => {
|
|
6
|
-
if (!e || e.type === "none") {
|
|
7
|
-
n(void 0);
|
|
8
|
-
return;
|
|
9
|
-
}
|
|
10
|
-
n(e[e.type] || t);
|
|
11
|
-
});
|
|
12
|
-
}
|
|
13
|
-
//#endregion
|
|
14
|
-
//#region src/controller/defaults.ts
|
|
15
|
-
var i = {
|
|
16
|
-
annotationsEnabled: !1,
|
|
17
|
-
dimensions: {
|
|
18
|
-
height: 100,
|
|
19
|
-
width: 500
|
|
20
|
-
},
|
|
21
|
-
equationEditor: "Grade 8 - HS",
|
|
22
|
-
feedbackEnabled: !1,
|
|
23
|
-
mathInput: !1,
|
|
24
|
-
playerSpellCheckDisabled: !0,
|
|
25
|
-
predefinedAnnotations: [
|
|
26
|
-
{
|
|
27
|
-
label: "good",
|
|
28
|
-
text: "good",
|
|
29
|
-
type: "positive"
|
|
30
|
-
},
|
|
31
|
-
{
|
|
32
|
-
label: "★",
|
|
33
|
-
text: "★",
|
|
34
|
-
type: "positive"
|
|
35
|
-
},
|
|
36
|
-
{
|
|
37
|
-
label: ":-)",
|
|
38
|
-
text: ":-)",
|
|
39
|
-
type: "positive"
|
|
40
|
-
},
|
|
41
|
-
{
|
|
42
|
-
label: "creative",
|
|
43
|
-
text: "creative",
|
|
44
|
-
type: "positive"
|
|
45
|
-
},
|
|
46
|
-
{
|
|
47
|
-
label: "run-on",
|
|
48
|
-
text: "run-on",
|
|
49
|
-
type: "negative"
|
|
50
|
-
},
|
|
51
|
-
{
|
|
52
|
-
label: "frag",
|
|
53
|
-
text: "fragment",
|
|
54
|
-
type: "negative"
|
|
55
|
-
},
|
|
56
|
-
{
|
|
57
|
-
label: "tran",
|
|
58
|
-
text: "transition",
|
|
59
|
-
type: "negative"
|
|
60
|
-
},
|
|
61
|
-
{
|
|
62
|
-
label: "supp",
|
|
63
|
-
text: "support needed",
|
|
64
|
-
type: "negative"
|
|
65
|
-
},
|
|
66
|
-
{
|
|
67
|
-
label: "punc",
|
|
68
|
-
text: "punctuation",
|
|
69
|
-
type: "negative"
|
|
70
|
-
},
|
|
71
|
-
{
|
|
72
|
-
label: "agr",
|
|
73
|
-
text: "agreement wrong",
|
|
74
|
-
type: "negative"
|
|
75
|
-
},
|
|
76
|
-
{
|
|
77
|
-
label: "unclear",
|
|
78
|
-
text: "unclear",
|
|
79
|
-
type: "negative"
|
|
80
|
-
},
|
|
81
|
-
{
|
|
82
|
-
label: "cut",
|
|
83
|
-
text: "cut",
|
|
84
|
-
type: "negative"
|
|
85
|
-
},
|
|
86
|
-
{
|
|
87
|
-
label: "sp",
|
|
88
|
-
text: "spelling",
|
|
89
|
-
type: "negative"
|
|
90
|
-
},
|
|
91
|
-
{
|
|
92
|
-
label: "cap",
|
|
93
|
-
text: "capitalization",
|
|
94
|
-
type: "negative"
|
|
95
|
-
},
|
|
96
|
-
{
|
|
97
|
-
label: "inf",
|
|
98
|
-
text: "informal",
|
|
99
|
-
type: "negative"
|
|
100
|
-
},
|
|
101
|
-
{
|
|
102
|
-
label: "awk",
|
|
103
|
-
text: "awkward",
|
|
104
|
-
type: "negative"
|
|
105
|
-
}
|
|
106
|
-
],
|
|
107
|
-
prompt: "",
|
|
108
|
-
promptEnabled: !0,
|
|
109
|
-
rationale: "",
|
|
110
|
-
rationaleEnabled: !0,
|
|
111
|
-
studentInstructionsEnabled: !0,
|
|
112
|
-
teacherInstructions: "",
|
|
113
|
-
teacherInstructionsEnabled: !0,
|
|
114
|
-
toolbarEditorPosition: "bottom"
|
|
115
|
-
}, a = (0, n.default)("@pie-element:extended-text-entry:controller");
|
|
116
|
-
async function o(e = {}) {
|
|
117
|
-
return a("[createDefaultModel]", e), {
|
|
118
|
-
...i,
|
|
119
|
-
...e
|
|
120
|
-
};
|
|
121
|
-
}
|
|
122
|
-
var s = (e) => ({
|
|
123
|
-
...i,
|
|
124
|
-
...e
|
|
125
|
-
});
|
|
126
|
-
async function c(e, t, n) {
|
|
127
|
-
a("[question]", e);
|
|
128
|
-
let i = s(e), o = n.mode === "evaluate" && i.feedbackEnabled ? r(i.feedback, "Your answer has been submitted") : Promise.resolve(void 0), c = null;
|
|
129
|
-
c = n.role === "instructor" && (n.mode === "view" || n.mode === "evaluate") && i.teacherInstructionsEnabled ? i.teacherInstructions : null;
|
|
130
|
-
let l = i.equationEditor || "miscellaneous";
|
|
131
|
-
switch (i.equationEditor) {
|
|
132
|
-
case "Grade 1 - 2":
|
|
133
|
-
l = 1;
|
|
134
|
-
break;
|
|
135
|
-
case "Grade 3 - 5":
|
|
136
|
-
l = 3;
|
|
137
|
-
break;
|
|
138
|
-
case "Grade 6 - 7":
|
|
139
|
-
l = 6;
|
|
140
|
-
break;
|
|
141
|
-
case "Grade 8 - HS":
|
|
142
|
-
l = 8;
|
|
143
|
-
break;
|
|
144
|
-
default: break;
|
|
145
|
-
}
|
|
146
|
-
let u = i.annotationsEnabled && (n.role === "instructor" || n.mode === "evaluate");
|
|
147
|
-
return o.then((e) => ({
|
|
148
|
-
prompt: i.promptEnabled ? i.prompt : null,
|
|
149
|
-
dimensions: i.dimensions,
|
|
150
|
-
customKeys: i.customKeys || [],
|
|
151
|
-
id: i.id,
|
|
152
|
-
disabled: n.mode !== "gather",
|
|
153
|
-
feedback: e,
|
|
154
|
-
teacherInstructions: c,
|
|
155
|
-
language: i.language,
|
|
156
|
-
mathInput: i.mathInput,
|
|
157
|
-
spanishInput: i.spanishInput,
|
|
158
|
-
specialInput: i.specialInput,
|
|
159
|
-
equationEditor: l,
|
|
160
|
-
spellCheckEnabled: !i.playerSpellCheckDisabled,
|
|
161
|
-
playersToolbarPosition: i.playersToolbarPosition || "bottom",
|
|
162
|
-
annotatorMode: u,
|
|
163
|
-
disabledAnnotator: i.annotationsEnabled ? n.role !== "instructor" : !0,
|
|
164
|
-
predefinedAnnotations: i.annotationsEnabled ? i.predefinedAnnotations : [],
|
|
165
|
-
extraCSSRules: i.extraCSSRules
|
|
166
|
-
}));
|
|
167
|
-
}
|
|
168
|
-
async function l() {
|
|
169
|
-
return {
|
|
170
|
-
score: 0,
|
|
171
|
-
completed: "n/a",
|
|
172
|
-
note: "Requires manual scoring"
|
|
173
|
-
};
|
|
174
|
-
}
|
|
175
|
-
var u = (e) => (e || "").replace(/(<(?!img|iframe|source)([^>]+)>)/gi, ""), d = (e = {}, t = {}) => {
|
|
176
|
-
let n = {};
|
|
177
|
-
return ["teacherInstructions", "prompt"].forEach((r) => {
|
|
178
|
-
t[r]?.required && !u(e[r]) && (n[r] = "This field is required.");
|
|
179
|
-
}), n;
|
|
180
|
-
};
|
|
181
|
-
//#endregion
|
|
182
|
-
export { o as createDefaultModel, c as model, s as normalize, l as outcome, d as validate };
|
|
183
|
-
|
|
184
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["../../../../../shared/feedback/dist/index.js","../../../src/controller/defaults.ts","../../../src/controller/index.ts"],"sourcesContent":["//#region src/defaults.ts\nvar e = {\n\tcorrect: {\n\t\ttype: \"default\",\n\t\tdefault: \"Correct\",\n\t\tcustom: \"Correct\"\n\t},\n\tincorrect: {\n\t\ttype: \"default\",\n\t\tdefault: \"Incorrect\",\n\t\tcustom: \"Incorrect\"\n\t},\n\tpartial: {\n\t\ttype: \"default\",\n\t\tdefault: \"Nearly\",\n\t\tcustom: \"Nearly\"\n\t},\n\tunanswered: {\n\t\ttype: \"default\",\n\t\tdefault: \"You have not entered a response\",\n\t\tcustom: \"You have not entered a response\"\n\t}\n};\n//#endregion\n//#region src/utils.ts\nfunction t(e) {\n\treturn e === \"partially-correct\" ? \"partial\" : e;\n}\n//#endregion\n//#region src/index.ts\nfunction n(n, i = {}) {\n\treturn new Promise((a) => {\n\t\tlet o = {\n\t\t\t...e,\n\t\t\t...i\n\t\t}, s = t(n), c = o[s], l = e[s];\n\t\tr(c, l[c.type]).then(a);\n\t});\n}\nfunction r(e, t) {\n\treturn new Promise((n) => {\n\t\tif (!e || e.type === \"none\") {\n\t\t\tn(void 0);\n\t\t\treturn;\n\t\t}\n\t\tn(e[e.type] || t);\n\t});\n}\nfunction i(n, r = {}) {\n\tlet i = {\n\t\t...e,\n\t\t...r\n\t}, o = t(n), s = i[o], c = e[o];\n\treturn a(s, c[s.type]);\n}\nfunction a(e, t) {\n\tif (!(!e || e.type === \"none\")) return e[e.type] || t;\n}\n//#endregion\nexport { e as defaultFeedback, a as getActualFeedback, i as getActualFeedbackForCorrectness, r as getFeedback, n as getFeedbackForCorrectness, t as normalizeCorrectness };\n","// @ts-nocheck\n/**\n * @synced-from pie-elements/packages/extended-text-entry/controller/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\nexport default {\n annotationsEnabled: false,\n dimensions: { height: 100, width: 500 },\n equationEditor: 'Grade 8 - HS',\n feedbackEnabled: false,\n mathInput: false,\n playerSpellCheckDisabled: true,\n predefinedAnnotations: [\n { label: 'good', text: 'good', type: 'positive' },\n { label: '★', text: '★', type: 'positive' },\n { label: ':-)', text: ':-)', type: 'positive' },\n { label: 'creative', text: 'creative', type: 'positive' },\n { label: 'run-on', text: 'run-on', type: 'negative' },\n { label: 'frag', text: 'fragment', type: 'negative' },\n { label: 'tran', text: 'transition', type: 'negative' },\n { label: 'supp', text: 'support needed', type: 'negative' },\n { label: 'punc', text: 'punctuation', type: 'negative' },\n { label: 'agr', text: 'agreement wrong', type: 'negative' },\n { label: 'unclear', text: 'unclear', type: 'negative' },\n { label: 'cut', text: 'cut', type: 'negative' },\n { label: 'sp', text: 'spelling', type: 'negative' },\n { label: 'cap', text: 'capitalization', type: 'negative' },\n { label: 'inf', text: 'informal', type: 'negative' },\n { label: 'awk', text: 'awkward', type: 'negative' },\n ],\n prompt: '',\n promptEnabled: true,\n rationale: '',\n rationaleEnabled: true,\n studentInstructionsEnabled: true,\n teacherInstructions: '',\n teacherInstructionsEnabled: true,\n toolbarEditorPosition: 'bottom',\n};\n","// @ts-nocheck\n/**\n * @synced-from pie-elements/packages/extended-text-entry/controller/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 debug from 'debug';\nimport { getFeedback } from '@pie-element/shared-feedback';\nimport defaults from './defaults.js';\n\nconst log = debug('@pie-element:extended-text-entry:controller');\n\nexport async function createDefaultModel(model = {}) {\n log('[createDefaultModel]', model);\n\n return { ...defaults, ...model };\n}\n\nexport const normalize = (question) => ({ ...defaults, ...question });\n\nexport async function model(question, session, env) {\n log('[question]', question);\n const normalizedQuestion = normalize(question);\n\n const fb =\n env.mode === 'evaluate' && normalizedQuestion.feedbackEnabled\n ? getFeedback(normalizedQuestion.feedback, 'Your answer has been submitted')\n : Promise.resolve(undefined);\n\n let teacherInstructions = null;\n if (env.role === 'instructor' && (env.mode === 'view' || env.mode === 'evaluate')) {\n teacherInstructions = normalizedQuestion.teacherInstructionsEnabled ? normalizedQuestion.teacherInstructions : null;\n } else {\n teacherInstructions = null;\n }\n\n let equationEditor = normalizedQuestion.equationEditor || 'miscellaneous';\n\n switch (normalizedQuestion.equationEditor) {\n case 'Grade 1 - 2':\n equationEditor = 1;\n break;\n case 'Grade 3 - 5':\n equationEditor = 3;\n break;\n case 'Grade 6 - 7':\n equationEditor = 6;\n break;\n case 'Grade 8 - HS':\n equationEditor = 8;\n break;\n default:\n break;\n }\n\n const annotatorMode = normalizedQuestion.annotationsEnabled && (env.role === 'instructor' || env.mode === 'evaluate');\n\n return fb.then((feedback) => ({\n prompt: normalizedQuestion.promptEnabled ? normalizedQuestion.prompt : null,\n dimensions: normalizedQuestion.dimensions,\n customKeys: normalizedQuestion.customKeys || [],\n id: normalizedQuestion.id,\n disabled: env.mode !== 'gather',\n feedback,\n teacherInstructions,\n language: normalizedQuestion.language,\n mathInput: normalizedQuestion.mathInput,\n spanishInput: normalizedQuestion.spanishInput,\n specialInput: normalizedQuestion.specialInput,\n equationEditor,\n spellCheckEnabled: !normalizedQuestion.playerSpellCheckDisabled,\n playersToolbarPosition: normalizedQuestion.playersToolbarPosition || 'bottom',\n annotatorMode,\n disabledAnnotator: normalizedQuestion.annotationsEnabled ? env.role !== 'instructor' : true,\n predefinedAnnotations: normalizedQuestion.annotationsEnabled ? normalizedQuestion.predefinedAnnotations : [],\n extraCSSRules: normalizedQuestion.extraCSSRules,\n }));\n}\n\nexport async function outcome(/*question, session, env*/) {\n return {\n score: 0,\n completed: 'n/a',\n note: 'Requires manual scoring',\n };\n}\n\n// remove all html tags\nconst getInnerText = (html) => (html || '').replaceAll(/<[^>]*>/g, '');\n\n// remove all html tags except img, iframe and source tag for audio\nconst getContent = (html) => (html || '').replace(/(<(?!img|iframe|source)([^>]+)>)/gi, '');\n\nexport const validate = (model = {}, config = {}) => {\n const errors = {};\n\n ['teacherInstructions', 'prompt'].forEach((field) => {\n if (config[field]?.required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OAAO;EACL,OAAO;EACP,WAAW;EACX,MAAM;CACR;AACF;AAMA,IAAM,KAAc,OAAU,KAAQ,IAAI,QAAQ,sCAAsC,EAAE,GAE7E,KAAY,IAAQ,CAAC,GAAG,IAAS,CAAC,MAAM;CACnD,IAAM,IAAS,CAAC;CAQhB,OANA,CAAC,uBAAuB,QAAQ,EAAE,SAAS,MAAU;EACnD,AAAI,EAAO,IAAQ,YAAY,CAAC,EAAW,EAAM,EAAM,MACrD,EAAO,KAAS;CAEpB,CAAC,GAEM;AACT"}
|
|
@@ -1,98 +0,0 @@
|
|
|
1
|
-
import { a as e, t } from "../browser-kkT1XVKw.js";
|
|
2
|
-
import { d as n } from "../dist-CfUys1Kx.js";
|
|
3
|
-
import { t as r } from "../main-BVg6yw7a.js";
|
|
4
|
-
import i from "react";
|
|
5
|
-
import { createRoot as a } from "react-dom/client";
|
|
6
|
-
//#region ../../shared/player-events/dist/index.js
|
|
7
|
-
var o = /* @__PURE__ */ e(t(), 1), s = class e extends CustomEvent {
|
|
8
|
-
static {
|
|
9
|
-
this.TYPE = "model-set";
|
|
10
|
-
}
|
|
11
|
-
constructor(t, n, r) {
|
|
12
|
-
super(e.TYPE, {
|
|
13
|
-
bubbles: !0,
|
|
14
|
-
composed: !0,
|
|
15
|
-
detail: {
|
|
16
|
-
complete: n,
|
|
17
|
-
component: t,
|
|
18
|
-
hasModel: r
|
|
19
|
-
}
|
|
20
|
-
}), this.component = t, this.complete = n;
|
|
21
|
-
}
|
|
22
|
-
}, c = class e extends CustomEvent {
|
|
23
|
-
static {
|
|
24
|
-
this.TYPE = "session-changed";
|
|
25
|
-
}
|
|
26
|
-
constructor(t, n) {
|
|
27
|
-
super(e.TYPE, {
|
|
28
|
-
bubbles: !0,
|
|
29
|
-
composed: !0,
|
|
30
|
-
detail: {
|
|
31
|
-
complete: n,
|
|
32
|
-
component: t
|
|
33
|
-
}
|
|
34
|
-
}), this.component = t, this.complete = n;
|
|
35
|
-
}
|
|
36
|
-
}, l = (0, o.default)("@pie-elements:extended-text-entry"), u = new DOMParser();
|
|
37
|
-
function d(e) {
|
|
38
|
-
if (typeof e == "string") try {
|
|
39
|
-
return u.parseFromString(e, "text/html").body.textContent;
|
|
40
|
-
} catch {
|
|
41
|
-
return l("tried to parse as dom and failed", e), e;
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
function f(e) {
|
|
45
|
-
let t = d(e);
|
|
46
|
-
return t !== void 0 && t.length > 0;
|
|
47
|
-
}
|
|
48
|
-
var p = class extends HTMLElement {
|
|
49
|
-
constructor() {
|
|
50
|
-
super(), this._model = null, this._session = null, this._root = null;
|
|
51
|
-
}
|
|
52
|
-
setLangAttribute() {
|
|
53
|
-
let e = this._model && typeof this._model.language ? this._model.language : "", t = e ? e.slice(0, 2) : "en";
|
|
54
|
-
this.setAttribute("lang", t);
|
|
55
|
-
}
|
|
56
|
-
set model(e) {
|
|
57
|
-
this._model = e, this.dispatchEvent(new s(this.tagName.toLowerCase(), !1, !!this._model)), this.render();
|
|
58
|
-
}
|
|
59
|
-
set session(e) {
|
|
60
|
-
this._session = e, this.render();
|
|
61
|
-
}
|
|
62
|
-
get session() {
|
|
63
|
-
return this._session;
|
|
64
|
-
}
|
|
65
|
-
valueChange(e) {
|
|
66
|
-
this._session.value = e, this.dispatchEvent(new c(this.tagName.toLowerCase(), f(e))), this.render();
|
|
67
|
-
}
|
|
68
|
-
annotationsChange(e) {
|
|
69
|
-
this._session.annotations = e, this.dispatchEvent(new c(this.tagName.toLowerCase(), !0)), this.render();
|
|
70
|
-
}
|
|
71
|
-
commentChange(e) {
|
|
72
|
-
this._session.comment = e, this.dispatchEvent(new c(this.tagName.toLowerCase(), f(e))), this.render();
|
|
73
|
-
}
|
|
74
|
-
connectedCallback() {
|
|
75
|
-
this.setAttribute("aria-label", "Written Response Question"), this.setAttribute("role", "region"), this.render();
|
|
76
|
-
}
|
|
77
|
-
render() {
|
|
78
|
-
if (this._model && this._session) {
|
|
79
|
-
let e = i.createElement(r, {
|
|
80
|
-
model: this._model,
|
|
81
|
-
session: this._session,
|
|
82
|
-
onValueChange: this.valueChange.bind(this),
|
|
83
|
-
onAnnotationsChange: this.annotationsChange.bind(this),
|
|
84
|
-
onCommentChange: this.commentChange.bind(this)
|
|
85
|
-
});
|
|
86
|
-
this.setLangAttribute(), this._root ||= a(this), this._root.render(e), queueMicrotask(() => {
|
|
87
|
-
n(this);
|
|
88
|
-
});
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
|
-
disconnectedCallback() {
|
|
92
|
-
this._root && this._root.unmount();
|
|
93
|
-
}
|
|
94
|
-
};
|
|
95
|
-
//#endregion
|
|
96
|
-
export { p as default, f as isComplete, d as textContent };
|
|
97
|
-
|
|
98
|
-
//# sourceMappingURL=index.js.map
|