@pie-element/explicit-constructed-response 11.1.2-next.3 → 11.1.2-next.32
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/author.js +2 -0
- package/dist/author/alternateResponses.js +2 -2
- package/dist/author/alternateSection.js +34 -33
- package/dist/author/defaults.js +1 -1
- package/dist/author/ecr-toolbar.js +1 -1
- package/dist/author/index.d.ts +1 -0
- package/dist/author/index.js +5 -2
- package/dist/author/main.js +3 -3
- package/dist/author/markupUtils.js +1 -1
- package/dist/browser/assets/Symbola-4c507403.woff2 +0 -0
- package/dist/browser/author/index.js +15 -12
- package/dist/browser/author/index.js.map +1 -1
- package/dist/browser/{browser-BC3WygxE.js → browser-xPiwYICU.js} +6 -2
- package/dist/browser/browser-xPiwYICU.js.map +1 -0
- package/dist/browser/controller/index.js +5 -5
- package/dist/browser/controller/index.js.map +1 -1
- package/dist/browser/delivery/index.js +71 -11
- package/dist/browser/delivery/index.js.map +1 -1
- package/dist/browser/{dist-D9ARZhQk.js → dist-DCmVXYeO.js} +109 -7
- package/dist/browser/dist-DCmVXYeO.js.map +1 -0
- package/dist/browser/dist-DZ6SLI-a.js +41122 -0
- package/dist/browser/dist-DZ6SLI-a.js.map +1 -0
- package/dist/browser/editor-runtime/assets/Symbola-4c507403.woff2 +0 -0
- package/dist/browser/editor-runtime/author/index.js +3381 -0
- package/dist/browser/editor-runtime/author/index.js.map +1 -0
- package/dist/browser/editor-runtime/browser-Dj-HJ-qm.js +364 -0
- package/dist/browser/editor-runtime/browser-Dj-HJ-qm.js.map +1 -0
- package/dist/browser/editor-runtime/controller/index.js +4152 -0
- package/dist/browser/editor-runtime/controller/index.js.map +1 -0
- package/dist/browser/editor-runtime/delivery/index.js +156 -0
- package/dist/browser/editor-runtime/delivery/index.js.map +1 -0
- package/dist/browser/editor-runtime/dist-DCmVXYeO.js +1528 -0
- package/dist/browser/editor-runtime/dist-DCmVXYeO.js.map +1 -0
- package/dist/browser/editor-runtime/dist-KQHUaPGT.js +24713 -0
- package/dist/browser/editor-runtime/dist-KQHUaPGT.js.map +1 -0
- package/dist/browser/{main-Cek7SQzj.js → editor-runtime/main-3Z9osroR.js} +250 -255
- package/dist/browser/editor-runtime/main-3Z9osroR.js.map +1 -0
- package/dist/browser/editor-runtime/print/index.js +42 -0
- package/dist/browser/editor-runtime/print/index.js.map +1 -0
- package/dist/browser/main-BeVh5h6j.js +954 -0
- package/dist/browser/main-BeVh5h6j.js.map +1 -0
- package/dist/browser/print/index.js +7 -5
- package/dist/browser/print/index.js.map +1 -1
- package/dist/controller/defaults.js +1 -1
- package/dist/controller/index.d.ts +1 -1
- package/dist/controller/index.js +1 -1
- package/dist/delivery/index.js +19 -9
- package/dist/delivery/main.d.ts +0 -2
- package/dist/delivery/main.js +36 -38
- package/dist/index.iife.js +102 -146
- package/dist/print/index.js +5 -3
- package/module/assets/Symbola-4c507403.woff2 +0 -0
- package/{dist/browser/dist-DGLbICOs.js → module/print.js} +41065 -42849
- package/module/print.js.map +1 -0
- package/package.json +45 -28
- package/print.js +2 -0
- package/dist/browser/browser-BC3WygxE.js.map +0 -1
- package/dist/browser/dist-D9ARZhQk.js.map +0 -1
- package/dist/browser/dist-DGLbICOs.js.map +0 -1
- package/dist/browser/explicit-constructed-response.css +0 -2
- package/dist/browser/main-Cek7SQzj.js.map +0 -1
|
@@ -1,9 +1,59 @@
|
|
|
1
|
-
import { at as e } from "../dist-
|
|
2
|
-
import { t } from "../main-
|
|
1
|
+
import { at as e } from "../dist-DZ6SLI-a.js";
|
|
2
|
+
import { t } from "../main-BeVh5h6j.js";
|
|
3
3
|
import n from "react";
|
|
4
4
|
import { createRoot as r } from "react-dom/client";
|
|
5
5
|
//#region ../../shared/player-events/dist/index.js
|
|
6
|
-
var i =
|
|
6
|
+
var i = "commitPendingSession", a = /* @__PURE__ */ new WeakMap();
|
|
7
|
+
function o(e, t) {
|
|
8
|
+
let n = a.get(e);
|
|
9
|
+
n || (n = /* @__PURE__ */ new Set(), a.set(e, n)), n.add(t);
|
|
10
|
+
}
|
|
11
|
+
function s(e) {
|
|
12
|
+
return Object.getOwnPropertyDescriptor(e, i) !== void 0;
|
|
13
|
+
}
|
|
14
|
+
function c(e) {
|
|
15
|
+
if (s(e)) return;
|
|
16
|
+
let t = e[i];
|
|
17
|
+
Object.defineProperty(e, i, {
|
|
18
|
+
value: () => {
|
|
19
|
+
if (typeof t == "function") try {
|
|
20
|
+
t.call(e);
|
|
21
|
+
} catch {}
|
|
22
|
+
u(e);
|
|
23
|
+
},
|
|
24
|
+
configurable: !0,
|
|
25
|
+
enumerable: !1,
|
|
26
|
+
writable: !0
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
function l(e, t, n = {}) {
|
|
30
|
+
let r = n.delayMs, i = typeof r == "function" ? r : () => r ?? 0, a = n.maxWaitMs, s = null, l = null, u = !1, d = () => {
|
|
31
|
+
s !== null && (clearTimeout(s), s = null), l !== null && (clearTimeout(l), l = null);
|
|
32
|
+
}, f = () => {
|
|
33
|
+
d(), u && (u = !1, t());
|
|
34
|
+
}, p = {
|
|
35
|
+
notify() {
|
|
36
|
+
u = !0, s !== null && clearTimeout(s), s = setTimeout(f, Math.max(0, i())), a !== void 0 && l === null && (l = setTimeout(f, Math.max(0, a)));
|
|
37
|
+
},
|
|
38
|
+
flush() {
|
|
39
|
+
if (!u) {
|
|
40
|
+
d();
|
|
41
|
+
return;
|
|
42
|
+
}
|
|
43
|
+
try {
|
|
44
|
+
f();
|
|
45
|
+
} catch (e) {
|
|
46
|
+
console.warn("[session-notifier] a committed session-changed dispatch threw", e);
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
};
|
|
50
|
+
return o(e, p), c(e), p;
|
|
51
|
+
}
|
|
52
|
+
function u(e) {
|
|
53
|
+
let t = a.get(e);
|
|
54
|
+
if (t) for (let e of [...t]) e.flush();
|
|
55
|
+
}
|
|
56
|
+
var d = class e extends CustomEvent {
|
|
7
57
|
static {
|
|
8
58
|
this.TYPE = "model-set";
|
|
9
59
|
}
|
|
@@ -18,7 +68,7 @@ var i = class e extends CustomEvent {
|
|
|
18
68
|
}
|
|
19
69
|
}), this.component = t, this.complete = n;
|
|
20
70
|
}
|
|
21
|
-
},
|
|
71
|
+
}, f = class e extends CustomEvent {
|
|
22
72
|
static {
|
|
23
73
|
this.TYPE = "session-changed";
|
|
24
74
|
}
|
|
@@ -32,16 +82,26 @@ var i = class e extends CustomEvent {
|
|
|
32
82
|
}
|
|
33
83
|
}), this.component = t, this.complete = n;
|
|
34
84
|
}
|
|
35
|
-
},
|
|
85
|
+
}, p = 200;
|
|
86
|
+
function m(e) {
|
|
87
|
+
let t = e && e.maxLengthPerChoice;
|
|
88
|
+
return Array.isArray(t) && t.length > 0 && t.every((e) => e === 1) ? 0 : p;
|
|
89
|
+
}
|
|
90
|
+
var h = class extends HTMLElement {
|
|
36
91
|
constructor() {
|
|
37
|
-
super(), this._model = null, this._session = null, this._root = null
|
|
92
|
+
super(), this._model = null, this._session = null, this._root = null, this._sessionNotifier = l(this, () => {
|
|
93
|
+
this.dispatchChangedEvent(), this._render();
|
|
94
|
+
}, {
|
|
95
|
+
delayMs: () => m(this._model),
|
|
96
|
+
maxWaitMs: p
|
|
97
|
+
});
|
|
38
98
|
}
|
|
39
99
|
setLangAttribute() {
|
|
40
100
|
let e = this._model && typeof this._model.language ? this._model.language : "", t = e ? e.slice(0, 2) : "en";
|
|
41
101
|
this.setAttribute("lang", t);
|
|
42
102
|
}
|
|
43
103
|
set model(e) {
|
|
44
|
-
this._model = e, this.dispatchEvent(new
|
|
104
|
+
this._model = e, this.dispatchEvent(new d(this.tagName.toLowerCase(), this.session && !!this.session.value, !!this._model)), this.setLangAttribute(), this._render();
|
|
45
105
|
}
|
|
46
106
|
set session(e) {
|
|
47
107
|
this._session = e, this._render();
|
|
@@ -78,19 +138,19 @@ var i = class e extends CustomEvent {
|
|
|
78
138
|
}
|
|
79
139
|
};
|
|
80
140
|
dispatchChangedEvent = () => {
|
|
81
|
-
this.dispatchEvent(new
|
|
141
|
+
this.dispatchEvent(new f(this.tagName.toLowerCase(), this.session && !!this.session.value));
|
|
82
142
|
};
|
|
83
143
|
changeSession = (e) => {
|
|
84
|
-
this.session.value = e, this.
|
|
144
|
+
this.session.value = e, this._sessionNotifier.notify();
|
|
85
145
|
};
|
|
86
146
|
connectedCallback() {
|
|
87
147
|
this.setAttribute("aria-label", "Fill in the Blank Question"), this.setAttribute("role", "region"), this._render();
|
|
88
148
|
}
|
|
89
149
|
disconnectedCallback() {
|
|
90
|
-
this._root
|
|
150
|
+
u(this), this._root &&= (this._root.unmount(), null);
|
|
91
151
|
}
|
|
92
152
|
};
|
|
93
153
|
//#endregion
|
|
94
|
-
export {
|
|
154
|
+
export { h as default };
|
|
95
155
|
|
|
96
156
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["../../../../../shared/player-events/dist/index.js","../../../src/delivery/index.ts"],"sourcesContent":["//#region src/index.ts\nvar e = class e extends CustomEvent {\n\tstatic {\n\t\tthis.TYPE = \"model-set\";\n\t}\n\tconstructor(t, n, r) {\n\t\tsuper(e.TYPE, {\n\t\t\tbubbles: !0,\n\t\t\tcomposed: !0,\n\t\t\tdetail: {\n\t\t\t\tcomplete: n,\n\t\t\t\tcomponent: t,\n\t\t\t\thasModel: r\n\t\t\t}\n\t\t}), this.component = t, this.complete = n;\n\t}\n}, t = class e extends CustomEvent {\n\tstatic {\n\t\tthis.TYPE = \"session-changed\";\n\t}\n\tconstructor(t, n) {\n\t\tsuper(e.TYPE, {\n\t\t\tbubbles: !0,\n\t\t\tcomposed: !0,\n\t\t\tdetail: {\n\t\t\t\tcomplete: n,\n\t\t\t\tcomponent: t\n\t\t\t}\n\t\t}), this.component = t, this.complete = n;\n\t}\n};\n//#endregion\nexport { e as ModelSetEvent, t as SessionChangedEvent };\n","// @ts-nocheck\n/**\n * @synced-from pie-elements/packages/explicit-constructed-response/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 { ModelSetEvent, SessionChangedEvent } from '@pie-element/shared-player-events';\nimport { renderMath } from '@pie-element/shared-math-rendering-mathjax';\n\nimport Main from './main.js';\n\nexport default class InlineDropdown extends HTMLElement {\n constructor() {\n super();\n this._model = null;\n this._session = null;\n this._root = null;\n }\n\n setLangAttribute() {\n const language = this._model && typeof this._model.language ? this._model.language : '';\n const lang = language ? language.slice(0, 2) : 'en';\n this.setAttribute('lang', lang);\n }\n\n set model(m) {\n this._model = m;\n this.dispatchEvent(\n new ModelSetEvent(this.tagName.toLowerCase(), this.session && !!this.session.value, !!this._model),\n );\n this.setLangAttribute();\n\n this._render();\n }\n\n set session(s) {\n this._session = s;\n this._render();\n }\n\n get session() {\n return this._session;\n }\n\n _render: any = () => {\n if (this._model && this._session) {\n let elem = React.createElement(Main, {\n choices: this._model.choices,\n disabled: this._model.disabled,\n displayType: this._model.displayType,\n feedback: this._model.feedback,\n language: this._model.language,\n markup: this._model.markup,\n maxLengthPerChoice: this._model.maxLengthPerChoice,\n maxLengthPerChoiceEnabled: this._model.maxLengthPerChoiceEnabled,\n mode: this._model.mode,\n note: this._model.note,\n onChange: this.changeSession,\n playerSpellCheckEnabled: this._model.playerSpellCheckEnabled,\n prompt: this._model.prompt,\n rationale: this._model.rationale,\n role: this._model.role,\n showNote: this._model.showNote,\n teacherInstructions: this._model.teacherInstructions,\n value: this._session.value,\n responseAreaInputConfiguration: this._model.responseAreaInputConfiguration,\n });\n\n if (!this._root) {\n this._root = createRoot(this);\n }\n this._root.render(elem);\n queueMicrotask(() => {\n renderMath(this);\n });\n }\n };\n\n dispatchChangedEvent: any = () => {\n this.dispatchEvent(new SessionChangedEvent(this.tagName.toLowerCase(), this.session && !!this.session.value));\n };\n\n changeSession: any = (value) => {\n this.session.value = value;\n this.dispatchChangedEvent();\n this._render();\n };\n\n connectedCallback() {\n this.setAttribute('aria-label', 'Fill in the Blank Question');\n this.setAttribute('role', 'region');\n\n this._render();\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,GAAG,GAAG;EACpB,MAAM,EAAE,MAAM;GACb,SAAS,CAAC;GACV,UAAU,CAAC;GACX,QAAQ;IACP,UAAU;IACV,WAAW;IACX,UAAU;GACX;EACD,CAAC,GAAG,KAAK,YAAY,GAAG,KAAK,WAAW;CACzC;AACD,GAAG,IAAI,MAAM,UAAU,YAAY;CAClC;EACC,KAAK,OAAO;CACb;CACA,YAAY,GAAG,GAAG;EACjB,MAAM,EAAE,MAAM;GACb,SAAS,CAAC;GACV,UAAU,CAAC;GACX,QAAQ;IACP,UAAU;IACV,WAAW;GACZ;EACD,CAAC,GAAG,KAAK,YAAY,GAAG,KAAK,WAAW;CACzC;AACD,GCbqB,IAArB,cAA4C,YAAY;CACtD,cAAc;EAIZ,AAHA,MAAM,GACN,KAAK,SAAS,MACd,KAAK,WAAW,MAChB,KAAK,QAAQ;CACf;CAEA,mBAAmB;EACjB,IAAM,IAAW,KAAK,UAAU,OAAO,KAAK,OAAO,WAAW,KAAK,OAAO,WAAW,IAC/E,IAAO,IAAW,EAAS,MAAM,GAAG,CAAC,IAAI;EAC/C,KAAK,aAAa,QAAQ,CAAI;CAChC;CAEA,IAAI,MAAM,GAAG;EAOX,AANA,KAAK,SAAS,GACd,KAAK,cACH,IAAI,EAAc,KAAK,QAAQ,YAAY,GAAG,KAAK,WAAW,CAAC,CAAC,KAAK,QAAQ,OAAO,CAAC,CAAC,KAAK,MAAM,CACnG,GACA,KAAK,iBAAiB,GAEtB,KAAK,QAAQ;CACf;CAEA,IAAI,QAAQ,GAAG;EAEb,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/player-events/dist/index.js","../../../src/delivery/index.ts"],"sourcesContent":["//#region src/session-notifier.ts\nvar e = \"commitPendingSession\", t = /* @__PURE__ */ new WeakMap();\nfunction n(e, n) {\n\tlet r = t.get(e);\n\tr || (r = /* @__PURE__ */ new Set(), t.set(e, r)), r.add(n);\n}\nfunction r(t) {\n\treturn Object.getOwnPropertyDescriptor(t, e) !== void 0;\n}\nfunction i(t) {\n\tif (r(t)) return;\n\tlet n = t[e];\n\tObject.defineProperty(t, e, {\n\t\tvalue: () => {\n\t\t\tif (typeof n == \"function\") try {\n\t\t\t\tn.call(t);\n\t\t\t} catch {}\n\t\t\to(t);\n\t\t},\n\t\tconfigurable: !0,\n\t\tenumerable: !1,\n\t\twritable: !0\n\t});\n}\nfunction a(e, t, r = {}) {\n\tlet a = r.delayMs, o = typeof a == \"function\" ? a : () => a ?? 0, s = r.maxWaitMs, c = null, l = null, u = !1, d = () => {\n\t\tc !== null && (clearTimeout(c), c = null), l !== null && (clearTimeout(l), l = null);\n\t}, f = () => {\n\t\td(), u && (u = !1, t());\n\t}, p = {\n\t\tnotify() {\n\t\t\tu = !0, c !== null && clearTimeout(c), c = setTimeout(f, Math.max(0, o())), s !== void 0 && l === null && (l = setTimeout(f, Math.max(0, s)));\n\t\t},\n\t\tflush() {\n\t\t\tif (!u) {\n\t\t\t\td();\n\t\t\t\treturn;\n\t\t\t}\n\t\t\ttry {\n\t\t\t\tf();\n\t\t\t} catch (e) {\n\t\t\t\tconsole.warn(\"[session-notifier] a committed session-changed dispatch threw\", e);\n\t\t\t}\n\t\t}\n\t};\n\treturn n(e, p), i(e), p;\n}\nfunction o(e) {\n\tlet n = t.get(e);\n\tif (n) for (let e of [...n]) e.flush();\n}\n//#endregion\n//#region src/index.ts\nvar s = class e extends CustomEvent {\n\tstatic {\n\t\tthis.TYPE = \"model-set\";\n\t}\n\tconstructor(t, n, r) {\n\t\tsuper(e.TYPE, {\n\t\t\tbubbles: !0,\n\t\t\tcomposed: !0,\n\t\t\tdetail: {\n\t\t\t\tcomplete: n,\n\t\t\t\tcomponent: t,\n\t\t\t\thasModel: r\n\t\t\t}\n\t\t}), this.component = t, this.complete = n;\n\t}\n}, c = class e extends CustomEvent {\n\tstatic {\n\t\tthis.TYPE = \"session-changed\";\n\t}\n\tconstructor(t, n) {\n\t\tsuper(e.TYPE, {\n\t\t\tbubbles: !0,\n\t\t\tcomposed: !0,\n\t\t\tdetail: {\n\t\t\t\tcomplete: n,\n\t\t\t\tcomponent: t\n\t\t\t}\n\t\t}), this.component = t, this.complete = n;\n\t}\n};\n//#endregion\nexport { s as ModelSetEvent, e as SESSION_COMMIT_METHOD, c as SessionChangedEvent, a as createSessionNotifier, o as flushSessionNotifiers };\n","// @ts-nocheck\n/**\n * @synced-from pie-elements/packages/explicit-constructed-response/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 ModelSetEvent,\n SessionChangedEvent,\n createSessionNotifier,\n flushSessionNotifiers,\n} from '@pie-element/shared-player-events';\nimport { renderMath } from '@pie-element/shared-math-rendering-mathjax';\n\nimport Main from './main.js';\n\nconst SESSION_NOTIFY_DELAY_MS = 200;\n\n// Every blank capped at one character means each keystroke is a whole response,\n// so there is nothing to coalesce and the dispatch goes out on the next tick.\nfunction notifyDelayForModel(model) {\n const lengths = model && model.maxLengthPerChoice;\n const singleCharacterBlanks =\n Array.isArray(lengths) && lengths.length > 0 && lengths.every((length) => length === 1);\n return singleCharacterBlanks ? 0 : SESSION_NOTIFY_DELAY_MS;\n}\n\nexport default class InlineDropdown extends HTMLElement {\n constructor() {\n super();\n this._model = null;\n this._session = null;\n this._root = null;\n\n // The session is written synchronously on commit; the dispatch and the\n // re-render are what get coalesced, which keeps the render cadence the\n // value-path debounce used to set while leaving `.session` readable at any\n // point. `disconnectedCallback` flushes what is still pending.\n this._sessionNotifier = createSessionNotifier(\n this,\n () => {\n this.dispatchChangedEvent();\n this._render();\n },\n { delayMs: () => notifyDelayForModel(this._model), maxWaitMs: SESSION_NOTIFY_DELAY_MS },\n );\n }\n\n setLangAttribute() {\n const language = this._model && typeof this._model.language ? this._model.language : '';\n const lang = language ? language.slice(0, 2) : 'en';\n this.setAttribute('lang', lang);\n }\n\n set model(m) {\n this._model = m;\n this.dispatchEvent(\n new ModelSetEvent(this.tagName.toLowerCase(), this.session && !!this.session.value, !!this._model),\n );\n this.setLangAttribute();\n\n this._render();\n }\n\n set session(s) {\n this._session = s;\n this._render();\n }\n\n get session() {\n return this._session;\n }\n\n _render: any = () => {\n if (this._model && this._session) {\n let elem = React.createElement(Main, {\n choices: this._model.choices,\n disabled: this._model.disabled,\n displayType: this._model.displayType,\n feedback: this._model.feedback,\n language: this._model.language,\n markup: this._model.markup,\n maxLengthPerChoice: this._model.maxLengthPerChoice,\n maxLengthPerChoiceEnabled: this._model.maxLengthPerChoiceEnabled,\n mode: this._model.mode,\n note: this._model.note,\n onChange: this.changeSession,\n playerSpellCheckEnabled: this._model.playerSpellCheckEnabled,\n prompt: this._model.prompt,\n rationale: this._model.rationale,\n role: this._model.role,\n showNote: this._model.showNote,\n teacherInstructions: this._model.teacherInstructions,\n value: this._session.value,\n responseAreaInputConfiguration: this._model.responseAreaInputConfiguration,\n });\n\n if (!this._root) {\n this._root = createRoot(this);\n }\n this._root.render(elem);\n queueMicrotask(() => {\n renderMath(this);\n });\n }\n };\n\n dispatchChangedEvent: any = () => {\n this.dispatchEvent(new SessionChangedEvent(this.tagName.toLowerCase(), this.session && !!this.session.value));\n };\n\n changeSession: any = (value) => {\n this.session.value = value;\n this._sessionNotifier.notify();\n };\n\n connectedCallback() {\n this.setAttribute('aria-label', 'Fill in the Blank Question');\n this.setAttribute('role', 'region');\n\n this._render();\n }\n\n disconnectedCallback() {\n flushSessionNotifiers(this);\n\n if (this._root) {\n this._root.unmount();\n this._root = null;\n }\n }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AK,WAAW,CAAC,CAAC,KAAK,QAAQ,KAAK,CAAC;CAC9G;CAEA,iBAAsB,MAAU;EAE9B,AADA,KAAK,QAAQ,QAAQ,GACrB,KAAK,iBAAiB,OAAO;CAC/B;CAEA,oBAAoB;EAIlB,AAHA,KAAK,aAAa,cAAc,4BAA4B,GAC5D,KAAK,aAAa,QAAQ,QAAQ,GAElC,KAAK,QAAQ;CACf;CAEA,uBAAuB;EAGrB,AAFA,EAAsB,IAAI,GAE1B,AAEE,KAAK,WADL,KAAK,MAAM,QAAQ,GACN;CAEjB;AACF"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
//#region ../../
|
|
1
|
+
//#region ../../shared/translator/dist/en.js
|
|
2
2
|
var e = {
|
|
3
3
|
translation: {
|
|
4
4
|
categorize: {
|
|
@@ -61,6 +61,23 @@ var e = {
|
|
|
61
61
|
reset: "Reset"
|
|
62
62
|
},
|
|
63
63
|
mathInline: { primaryCorrectWithAlternates: "Note: The answer shown above is the primary correct answer specified by the author for this item, but other answers may also be recognized as correct." },
|
|
64
|
+
mcPopulatedBlank: {
|
|
65
|
+
answerChoices: "Answer choices",
|
|
66
|
+
blankLabel: "blank",
|
|
67
|
+
emptyBlank: "(blank)",
|
|
68
|
+
blankPreSelectionHint: "The answer you choose will appear on the blank line above.",
|
|
69
|
+
correctAnswerSelected: "Correct answer selected",
|
|
70
|
+
incorrectAnswerSelected: "Incorrect answer selected",
|
|
71
|
+
selectedAnswerImage: "Selected answer image",
|
|
72
|
+
choiceImage: "Choice {{id}}",
|
|
73
|
+
clickToEnableAutoplay: "Click to enable audio autoplay",
|
|
74
|
+
audioResourceUnavailable: "Audio is enabled but no playable audio URL is configured.",
|
|
75
|
+
listen: "Listen",
|
|
76
|
+
listenSilentAlt: "Repeat instructions",
|
|
77
|
+
listenPlayingAlt: "Instructions are playing",
|
|
78
|
+
printAudio: "Audio:",
|
|
79
|
+
printTranscript: "Transcript:"
|
|
80
|
+
},
|
|
64
81
|
multipleChoice: {
|
|
65
82
|
minSelections: "Select at least {{minSelections}}.",
|
|
66
83
|
maxSelections_one: "Only {{maxSelections}} answer is allowed.",
|
|
@@ -73,6 +90,38 @@ var e = {
|
|
|
73
90
|
correctAnswerNotSelected: "Correct Answer Not Selected",
|
|
74
91
|
incorrectSelection: "Incorrect Selection",
|
|
75
92
|
key: "Key"
|
|
93
|
+
},
|
|
94
|
+
simpleCloze: {
|
|
95
|
+
correctAnswerShown: "Correct answer",
|
|
96
|
+
correct: "Correct",
|
|
97
|
+
incorrect: "Incorrect",
|
|
98
|
+
unanswered: "No answer",
|
|
99
|
+
placeholder: "Enter your answer...",
|
|
100
|
+
answerInput: "Your answer",
|
|
101
|
+
printCorrectAnswer: "Correct answer:",
|
|
102
|
+
printAnswerBlank: "Answer blank"
|
|
103
|
+
},
|
|
104
|
+
vennClassification: {
|
|
105
|
+
tray: "Tiles to classify",
|
|
106
|
+
unknownTarget: "unknown",
|
|
107
|
+
cancelled: "Cancelled",
|
|
108
|
+
returnedToTray: "{{name}} returned to tray",
|
|
109
|
+
placedIn: "{{name}} placed in {{target}}",
|
|
110
|
+
pickedUp: "Picked up {{name}}",
|
|
111
|
+
pickedUpWithKeyboard: "Picked up {{name}}, drop target: {{target}}. Use arrow keys to choose a drop target, Enter to drop, Escape to cancel.",
|
|
112
|
+
dropTarget: "Drop target: {{target}}",
|
|
113
|
+
unsupportedCircles_one: "This diagram cannot be shown: it has {{count}} circle, and only {{supported}} are supported.",
|
|
114
|
+
unsupportedCircles_other: "This diagram cannot be shown: it has {{count}} circles, and only {{supported}} are supported.",
|
|
115
|
+
setNumber: "Set {{number}}",
|
|
116
|
+
regionOnly: "{{set}} only",
|
|
117
|
+
regionNeither: "Neither {{first}} nor {{second}}",
|
|
118
|
+
regionNoneOf: "None of {{sets}}",
|
|
119
|
+
regionAndSeparator: " and ",
|
|
120
|
+
tileFallbackName: "Tile",
|
|
121
|
+
tileNotPlaced: "not placed",
|
|
122
|
+
tileInRegion: "in {{region}}",
|
|
123
|
+
tileCorrect: "correct",
|
|
124
|
+
tileIncorrect: "incorrect"
|
|
76
125
|
}
|
|
77
126
|
},
|
|
78
127
|
common: {
|
|
@@ -82,6 +131,8 @@ var e = {
|
|
|
82
131
|
incorrect: "Incorrect",
|
|
83
132
|
showCorrectAnswer: "Show correct answer",
|
|
84
133
|
hideCorrectAnswer: "Hide correct answer",
|
|
134
|
+
showTeacherInstructions: "Show Teacher Instructions",
|
|
135
|
+
hideTeacherInstructions: "Hide Teacher Instructions",
|
|
85
136
|
commonCorrectAnswerWithAlternates: "Note: The answer shown above is the most common correct answer for this item. One or more additional correct answers are also defined, and will also be recognized as correct.",
|
|
86
137
|
warning: "Warning",
|
|
87
138
|
showNote: "Show Note",
|
|
@@ -150,6 +201,23 @@ var e = {
|
|
|
150
201
|
reset: "Reiniciar"
|
|
151
202
|
},
|
|
152
203
|
mathInline: { primaryCorrectWithAlternates: "Nota: La respuesta que se muestra arriba es la respuesta correcta principal especificada por el autor para esta pregunta, pero también se pueden reconocer otras respuestas como correctas." },
|
|
204
|
+
mcPopulatedBlank: {
|
|
205
|
+
answerChoices: "Opciones de respuesta",
|
|
206
|
+
blankLabel: "espacio en blanco",
|
|
207
|
+
emptyBlank: "(en blanco)",
|
|
208
|
+
blankPreSelectionHint: "La respuesta que elijas aparecerá en la línea en blanco de arriba.",
|
|
209
|
+
correctAnswerSelected: "Respuesta correcta seleccionada",
|
|
210
|
+
incorrectAnswerSelected: "Respuesta incorrecta seleccionada",
|
|
211
|
+
selectedAnswerImage: "Imagen de la respuesta seleccionada",
|
|
212
|
+
choiceImage: "Opción {{id}}",
|
|
213
|
+
clickToEnableAutoplay: "Haz clic para activar la reproducción automática del audio",
|
|
214
|
+
audioResourceUnavailable: "El audio está activado, pero no hay una URL de audio reproducible configurada.",
|
|
215
|
+
listen: "Escuchar",
|
|
216
|
+
listenSilentAlt: "Escuchar. Repetir las instrucciones.",
|
|
217
|
+
listenPlayingAlt: "Escuchar. Estas son las instrucciones.",
|
|
218
|
+
printAudio: "Audio:",
|
|
219
|
+
printTranscript: "Transcripción:"
|
|
220
|
+
},
|
|
153
221
|
multipleChoice: {
|
|
154
222
|
minSelections: "Seleccione al menos {{minSelections}}.",
|
|
155
223
|
maxSelections_one: "Sólo se permite {{maxSelections}} respuesta.",
|
|
@@ -162,15 +230,49 @@ var e = {
|
|
|
162
230
|
correctAnswerNotSelected: "Respuesta Correcta No Seleccionada",
|
|
163
231
|
incorrectSelection: "Selección Incorrecta",
|
|
164
232
|
key: "Clave"
|
|
233
|
+
},
|
|
234
|
+
simpleCloze: {
|
|
235
|
+
correctAnswerShown: "Respuesta correcta",
|
|
236
|
+
correct: "Correcto",
|
|
237
|
+
incorrect: "Incorrecto",
|
|
238
|
+
unanswered: "Sin respuesta",
|
|
239
|
+
placeholder: "Escribe tu respuesta...",
|
|
240
|
+
answerInput: "Tu respuesta",
|
|
241
|
+
printCorrectAnswer: "Respuesta correcta:",
|
|
242
|
+
printAnswerBlank: "Espacio para la respuesta"
|
|
243
|
+
},
|
|
244
|
+
vennClassification: {
|
|
245
|
+
tray: "Fichas para clasificar",
|
|
246
|
+
unknownTarget: "desconocido",
|
|
247
|
+
cancelled: "Cancelado",
|
|
248
|
+
returnedToTray: "Se devolvió {{name}} a la bandeja",
|
|
249
|
+
placedIn: "Se colocó {{name}} en {{target}}",
|
|
250
|
+
pickedUp: "Se tomó {{name}}",
|
|
251
|
+
pickedUpWithKeyboard: "Se tomó {{name}}, destino: {{target}}. Usa las flechas para elegir un destino, Enter para soltar y Escape para cancelar.",
|
|
252
|
+
dropTarget: "Destino: {{target}}",
|
|
253
|
+
unsupportedCircles_one: "No se puede mostrar este diagrama: tiene {{count}} círculo, y solo se admiten {{supported}}.",
|
|
254
|
+
unsupportedCircles_other: "No se puede mostrar este diagrama: tiene {{count}} círculos, y solo se admiten {{supported}}.",
|
|
255
|
+
setNumber: "Conjunto {{number}}",
|
|
256
|
+
regionOnly: "Solo {{set}}",
|
|
257
|
+
regionNeither: "Ni {{first}} ni {{second}}",
|
|
258
|
+
regionNoneOf: "Ninguno de {{sets}}",
|
|
259
|
+
regionAndSeparator: " y ",
|
|
260
|
+
tileFallbackName: "Ficha",
|
|
261
|
+
tileNotPlaced: "sin colocar",
|
|
262
|
+
tileInRegion: "en {{region}}",
|
|
263
|
+
tileCorrect: "correcta",
|
|
264
|
+
tileIncorrect: "incorrecta"
|
|
165
265
|
}
|
|
166
266
|
},
|
|
167
267
|
common: {
|
|
168
268
|
undo: "Deshacer",
|
|
169
269
|
clearAll: "Borrar todo",
|
|
170
|
-
correct: "
|
|
171
|
-
incorrect: "
|
|
270
|
+
correct: "Correcto",
|
|
271
|
+
incorrect: "Incorrecto",
|
|
172
272
|
showCorrectAnswer: "Mostrar respuesta correcta",
|
|
173
273
|
hideCorrectAnswer: "Ocultar respuesta correcta",
|
|
274
|
+
showTeacherInstructions: "Mostrar instrucciones para el maestro",
|
|
275
|
+
hideTeacherInstructions: "Ocultar instrucciones para el maestro",
|
|
174
276
|
commonCorrectAnswerWithAlternates: "Nota: La respuesta que se muestra arriba es la respuesta correcta más común para esta pregunta. También se definen una o más respuestas correctas adicionales, y también se reconocerán como correctas.",
|
|
175
277
|
warning: "Advertencia",
|
|
176
278
|
showNote: "Mostrar Nota",
|
|
@@ -789,7 +891,7 @@ var M = {}, N = (e) => !n(e) && typeof e != "boolean" && typeof e != "number", P
|
|
|
789
891
|
init(e = {}) {
|
|
790
892
|
e.interpolation ||= { escapeValue: !0 };
|
|
791
893
|
let { escape: t, escapeValue: n, useRawValueToEscape: r, prefix: i, prefixEscaped: a, suffix: o, suffixEscaped: s, formatSeparator: c, unescapeSuffix: l, unescapePrefix: u, nestingPrefix: d, nestingPrefixEscaped: f, nestingSuffix: p, nestingSuffixEscaped: m, nestingOptionsSeparator: g, maxReplaces: v, alwaysFormat: y } = e.interpolation;
|
|
792
|
-
this.escape = t === void 0 ? _ : t, this.escapeValue = n === void 0
|
|
894
|
+
this.escape = t === void 0 ? _ : t, this.escapeValue = n === void 0 || n, this.useRawValueToEscape = r !== void 0 && r, this.prefix = i ? h(i) : a || "{{", this.suffix = o ? h(o) : s || "}}", this.formatSeparator = c || ",", this.unescapePrefix = l ? "" : u || "-", this.unescapeSuffix = this.unescapePrefix ? "" : l || "", this.nestingPrefix = d ? h(d) : f || h("$t("), this.nestingSuffix = p ? h(p) : m || h(")"), this.nestingOptionsSeparator = g || ",", this.maxReplaces = v || 1e3, this.alwaysFormat = y !== void 0 && y, this.resetRegExp();
|
|
793
895
|
}
|
|
794
896
|
reset() {
|
|
795
897
|
this.options && this.init(this.options);
|
|
@@ -1378,11 +1480,11 @@ var M = {}, N = (e) => !n(e) && typeof e != "boolean" && typeof e != "number", P
|
|
|
1378
1480
|
}
|
|
1379
1481
|
}.createInstance();
|
|
1380
1482
|
//#endregion
|
|
1381
|
-
//#region ../../
|
|
1483
|
+
//#region ../../shared/translator/dist/index.js
|
|
1382
1484
|
$.createInstance, $.dir, $.init, $.loadResources, $.reloadResources, $.use, $.changeLanguage, $.getFixedT, $.t, $.exists, $.setDefaultNamespace, $.hasLoadedNamespace, $.loadNamespaces, $.loadLanguages, $.init({
|
|
1383
1485
|
fallbackLng: "en",
|
|
1384
1486
|
lng: "en",
|
|
1385
|
-
|
|
1487
|
+
showSupportNotice: !1,
|
|
1386
1488
|
resources: {
|
|
1387
1489
|
en: e,
|
|
1388
1490
|
es: t
|
|
@@ -1423,4 +1525,4 @@ var re = {
|
|
|
1423
1525
|
//#endregion
|
|
1424
1526
|
export { re as t };
|
|
1425
1527
|
|
|
1426
|
-
//# sourceMappingURL=dist-
|
|
1528
|
+
//# sourceMappingURL=dist-DCmVXYeO.js.map
|