@pie-element/select-text 13.1.1-next.11 → 13.1.2-next.0
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/configure.js +2 -0
- package/controller.js +1 -0
- package/dist/author/defaultConfiguration.d.ts +179 -0
- package/dist/author/defaultConfiguration.js +141 -0
- package/dist/author/design.d.ts +38 -0
- package/dist/author/design.js +264 -0
- package/dist/author/index.d.ts +27 -0
- package/dist/author/index.js +74 -0
- package/dist/author/utils.d.ts +10 -0
- package/dist/author/utils.js +50 -0
- package/dist/browser/Check-CXevxzJJ.js +9941 -0
- package/dist/browser/Check-CXevxzJJ.js.map +1 -0
- package/dist/browser/_getTag-x1UozeM0.js +381 -0
- package/dist/browser/_getTag-x1UozeM0.js.map +1 -0
- package/dist/browser/author/index.js +41566 -0
- package/dist/browser/author/index.js.map +1 -0
- package/dist/browser/controller/index.js +195 -0
- package/dist/browser/controller/index.js.map +1 -0
- package/dist/browser/debounce-CUpLfqAu.js +86 -0
- package/dist/browser/debounce-CUpLfqAu.js.map +1 -0
- package/dist/browser/delivery/index.js +89 -0
- package/dist/browser/delivery/index.js.map +1 -0
- package/dist/browser/isEmpty-Bsms1e2W.js +16 -0
- package/dist/browser/isEmpty-Bsms1e2W.js.map +1 -0
- package/dist/browser/main-4aycOoI5.js +4804 -0
- package/dist/browser/main-4aycOoI5.js.map +1 -0
- package/dist/browser/print/index.js +42 -0
- package/dist/browser/print/index.js.map +1 -0
- package/dist/browser/select-text.css +2 -0
- package/dist/controller/defaults.d.ts +27 -0
- package/dist/controller/defaults.js +21 -0
- package/dist/controller/index.d.ts +25 -0
- package/dist/controller/index.js +121 -0
- package/dist/delivery/index.d.ts +19 -0
- package/dist/delivery/index.js +60 -0
- package/dist/delivery/main.d.ts +34 -0
- package/dist/delivery/main.js +136 -0
- package/dist/delivery/utils.d.ts +10 -0
- package/dist/delivery/utils.js +47 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.iife.d.ts +8 -0
- package/dist/index.iife.js +167 -0
- package/dist/index.js +2 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_DataView.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Hash.js +16 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_ListCache.js +16 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Map.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_MapCache.js +16 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Promise.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Set.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Stack.js +14 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Symbol.js +5 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Uint8Array.js +5 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_WeakMap.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arrayEach.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arrayFilter.js +10 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arrayLikeKeys.js +15 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arrayPush.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_assignValue.js +10 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_assocIndexOf.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseAssign.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseAssignIn.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseAssignValue.js +12 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseClone.js +57 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseCreate.js +14 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseGetAllKeys.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseGetTag.js +10 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsArguments.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsMap.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsNative.js +11 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsSet.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsTypedArray.js +11 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseKeys.js +12 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseKeysIn.js +13 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseTimes.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseTrim.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseUnary.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cloneArrayBuffer.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cloneBuffer.js +10 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cloneDataView.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cloneRegExp.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cloneSymbol.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_cloneTypedArray.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_copyArray.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_copyObject.js +14 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_copySymbols.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_copySymbolsIn.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_coreJsData.js +5 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_defineProperty.js +10 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_freeGlobal.js +4 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getAllKeys.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getAllKeysIn.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getMapData.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getNative.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getPrototype.js +5 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getRawTag.js +14 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getSymbols.js +10 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getSymbolsIn.js +11 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getTag.js +23 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getValue.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_hashClear.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_hashDelete.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_hashGet.js +13 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_hashHas.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_hashSet.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_initCloneArray.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_initCloneByTag.js +33 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_initCloneObject.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isIndex.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isKeyable.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isMasked.js +11 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isPrototype.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_listCacheClear.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_listCacheDelete.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_listCacheGet.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_listCacheHas.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_listCacheSet.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_mapCacheClear.js +13 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_mapCacheDelete.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_mapCacheGet.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_mapCacheHas.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_mapCacheSet.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_nativeCreate.js +5 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_nativeKeys.js +5 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_nativeKeysIn.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_nodeUtil.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_objectToString.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_overArg.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_root.js +5 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_stackClear.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_stackDelete.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_stackGet.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_stackHas.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_stackSet.js +16 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_toSource.js +15 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_trimmedEndIndex.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/cloneDeep.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/debounce.js +50 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/eq.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isArguments.js +10 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isArray.js +4 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isArrayLike.js +8 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isBuffer.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isEmpty.js +21 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isFunction.js +11 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isLength.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isMap.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isObject.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isObjectLike.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isSet.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isSymbol.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isTypedArray.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/keys.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/keysIn.js +9 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/now.js +7 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/stubArray.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/stubFalse.js +6 -0
- package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/toNumber.js +19 -0
- package/dist/print/index.d.ts +15 -0
- package/dist/print/index.js +41 -0
- package/package.json +87 -21
- package/CHANGELOG.json +0 -1422
- package/CHANGELOG.md +0 -2278
- package/LICENSE.md +0 -5
- package/README.md +0 -5
- package/configure/CHANGELOG.json +0 -1032
- package/configure/CHANGELOG.md +0 -2013
- package/configure/lib/defaultConfiguration.js +0 -177
- package/configure/lib/defaultConfiguration.js.map +0 -1
- package/configure/lib/design.js +0 -406
- package/configure/lib/design.js.map +0 -1
- package/configure/lib/index.js +0 -128
- package/configure/lib/index.js.map +0 -1
- package/configure/lib/utils.js +0 -92
- package/configure/lib/utils.js.map +0 -1
- package/configure/package.json +0 -25
- package/controller/CHANGELOG.json +0 -442
- package/controller/CHANGELOG.md +0 -1464
- package/controller/lib/defaults.js +0 -25
- package/controller/lib/defaults.js.map +0 -1
- package/controller/lib/index.js +0 -258
- package/controller/lib/index.js.map +0 -1
- package/controller/package.json +0 -16
- package/docs/config-schema.json +0 -2135
- package/docs/config-schema.json.md +0 -1579
- package/docs/demo/config.js +0 -8
- package/docs/demo/generate.js +0 -823
- package/docs/demo/index.html +0 -1
- package/docs/demo/session.js +0 -24
- package/docs/pie-schema.json +0 -1248
- package/docs/pie-schema.json.md +0 -711
- package/lib/index.js +0 -103
- package/lib/index.js.map +0 -1
- package/lib/main.js +0 -191
- package/lib/main.js.map +0 -1
- package/lib/print.js +0 -87
- package/lib/print.js.map +0 -1
- package/lib/utils.js +0 -80
- package/lib/utils.js.map +0 -1
|
@@ -0,0 +1,195 @@
|
|
|
1
|
+
import { b as e, w as t } from "../_getTag-x1UozeM0.js";
|
|
2
|
+
import { t as n } from "../isEmpty-Bsms1e2W.js";
|
|
3
|
+
//#region ../../shared/feedback/dist/index.js
|
|
4
|
+
var r = /* @__PURE__ */ t(e(), 1), i = {
|
|
5
|
+
correct: {
|
|
6
|
+
type: "default",
|
|
7
|
+
default: "Correct",
|
|
8
|
+
custom: "Correct"
|
|
9
|
+
},
|
|
10
|
+
incorrect: {
|
|
11
|
+
type: "default",
|
|
12
|
+
default: "Incorrect",
|
|
13
|
+
custom: "Incorrect"
|
|
14
|
+
},
|
|
15
|
+
partial: {
|
|
16
|
+
type: "default",
|
|
17
|
+
default: "Nearly",
|
|
18
|
+
custom: "Nearly"
|
|
19
|
+
},
|
|
20
|
+
unanswered: {
|
|
21
|
+
type: "default",
|
|
22
|
+
default: "You have not entered a response",
|
|
23
|
+
custom: "You have not entered a response"
|
|
24
|
+
}
|
|
25
|
+
};
|
|
26
|
+
function a(e) {
|
|
27
|
+
return e === "partially-correct" ? "partial" : e;
|
|
28
|
+
}
|
|
29
|
+
function o(e, t = {}) {
|
|
30
|
+
return new Promise((n) => {
|
|
31
|
+
let r = {
|
|
32
|
+
...i,
|
|
33
|
+
...t
|
|
34
|
+
}, o = a(e), c = r[o], l = i[o];
|
|
35
|
+
s(c, l[c.type]).then(n);
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
function s(e, t) {
|
|
39
|
+
return new Promise((n) => {
|
|
40
|
+
if (!e || e.type === "none") {
|
|
41
|
+
n(void 0);
|
|
42
|
+
return;
|
|
43
|
+
}
|
|
44
|
+
n(e[e.type] || t);
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
//#endregion
|
|
48
|
+
//#region ../../shared/controller-utils/dist/index.js
|
|
49
|
+
var c = Object.defineProperty, l = /* @__PURE__ */ ((e, t) => {
|
|
50
|
+
let n = {};
|
|
51
|
+
for (var r in e) c(n, r, {
|
|
52
|
+
get: e[r],
|
|
53
|
+
enumerable: !0
|
|
54
|
+
});
|
|
55
|
+
return t || c(n, Symbol.toStringTag, { value: "Module" }), n;
|
|
56
|
+
})({ enabled: () => u });
|
|
57
|
+
function u(e, t, n) {
|
|
58
|
+
return e?.partialScoring === !1 || t?.partialScoring === !1 ? !1 : typeof n == "boolean" ? n : !0;
|
|
59
|
+
}
|
|
60
|
+
//#endregion
|
|
61
|
+
//#region src/controller/defaults.ts
|
|
62
|
+
var d = {
|
|
63
|
+
feedbackEnabled: !1,
|
|
64
|
+
highlightChoices: !1,
|
|
65
|
+
maxSelections: 0,
|
|
66
|
+
mode: "sentence",
|
|
67
|
+
partialScoring: !1,
|
|
68
|
+
prompt: "",
|
|
69
|
+
promptEnabled: !0,
|
|
70
|
+
rationale: "",
|
|
71
|
+
rationaleEnabled: !0,
|
|
72
|
+
scoringType: "auto",
|
|
73
|
+
studentInstructionsEnabled: !0,
|
|
74
|
+
teacherInstructions: "",
|
|
75
|
+
teacherInstructionsEnabled: !0,
|
|
76
|
+
text: "",
|
|
77
|
+
tokens: [],
|
|
78
|
+
toolbarEditorPosition: "bottom"
|
|
79
|
+
}, f = (0, r.default)("@pie-element:select-text:controller"), p = (e = {}, t = {}) => e?.start === t?.start && e?.end === t?.end || e?.start === t?.oldStart && e?.end === t?.oldEnd, m = (e = [], t = [], n = !1) => (e || []).map((e) => {
|
|
80
|
+
let r = !!e.correct, i = r && !(t || []).find((t) => p(e, t));
|
|
81
|
+
return {
|
|
82
|
+
...e,
|
|
83
|
+
correct: n ? r : void 0,
|
|
84
|
+
isMissing: n ? i : void 0
|
|
85
|
+
};
|
|
86
|
+
}), h = (e, t) => {
|
|
87
|
+
let n = e.filter((e) => e.correct === !0);
|
|
88
|
+
if (n.length === 0) return "unknown";
|
|
89
|
+
let r = g(e, t);
|
|
90
|
+
if (r.length === t.length) {
|
|
91
|
+
if (r.length === n.length) return "correct";
|
|
92
|
+
if (r.length > 0) return "partially-correct";
|
|
93
|
+
}
|
|
94
|
+
return r.length > 0 ? "partially-correct" : "incorrect";
|
|
95
|
+
}, g = (e, t) => (t || []).filter((t) => e.findIndex((e) => e.correct && p(e, t)) !== -1), _ = (e, t, r) => {
|
|
96
|
+
if (!t || n(t)) return 0;
|
|
97
|
+
let i = g(e.tokens, t.selectedTokens).length, a = (e.tokens || []).filter((e) => e.correct === !0), o = i - (t.selectedTokens && t.selectedTokens.length > a.length ? t.selectedTokens && t.selectedTokens.length - i : 0), s = o < 0 ? 0 : o;
|
|
98
|
+
return r.length ? parseFloat((s / r.length).toFixed(2)) : 0;
|
|
99
|
+
}, v = (e, t, n) => {
|
|
100
|
+
let r = [], i = t?.selectedTokens || [], a = e?.tokens || [];
|
|
101
|
+
if (i.length === 0) return r.push("Student did not select any token."), r;
|
|
102
|
+
r.push(`Student selected ${i.length} token(s).`);
|
|
103
|
+
let o = 0, s = 0, c = 0;
|
|
104
|
+
for (let e = 0; e < a.length; e++) {
|
|
105
|
+
let t = a[e];
|
|
106
|
+
t.correct && (o++, i.some((e) => p(t, e)) ? s++ : c++);
|
|
107
|
+
}
|
|
108
|
+
let u = i.length - s;
|
|
109
|
+
s > 0 && r.push(`${s} correct token(s) selected.`), u > 0 && r.push(`${u} incorrect token(s) selected.`), c > 0 && r.push(`${c} required correct token(s) were not selected.`);
|
|
110
|
+
let d = l.enabled(e, n, !0);
|
|
111
|
+
d ? (r.push("Score calculated using partial scoring."), r.push("Score is based on the number of correct minus incorrect selections, divided by the total number of correct tokens."), u > 0 && i.length > o && r.push("Extra selected tokens beyond the correct set reduce the score.")) : (r.push("Score calculated using all-or-nothing scoring."), r.push("Student must select all correct tokens and no incorrect tokens to receive full credit."));
|
|
112
|
+
let f = _(e, t, a.filter((e) => e.correct)), m = d ? f : +(f === 1);
|
|
113
|
+
return r.push(`Final score: ${m}.`), r;
|
|
114
|
+
}, y = (e, t, r) => new Promise((i) => {
|
|
115
|
+
if ((!t || n(t)) && i({
|
|
116
|
+
score: 0,
|
|
117
|
+
empty: !0,
|
|
118
|
+
logTrace: ["Student did not select any token."]
|
|
119
|
+
}), t = x(t), r.mode !== "evaluate") i({
|
|
120
|
+
score: void 0,
|
|
121
|
+
completed: void 0,
|
|
122
|
+
logTrace: []
|
|
123
|
+
});
|
|
124
|
+
else {
|
|
125
|
+
let n = l.enabled(e, r, !0), a = e.tokens.filter((e) => e.correct), o = _(e, t, a);
|
|
126
|
+
i({
|
|
127
|
+
score: n ? o : +(o === 1),
|
|
128
|
+
logTrace: v(e, t, r)
|
|
129
|
+
});
|
|
130
|
+
}
|
|
131
|
+
});
|
|
132
|
+
function b(e = {}) {
|
|
133
|
+
return new Promise((t) => {
|
|
134
|
+
t({
|
|
135
|
+
...d,
|
|
136
|
+
...e
|
|
137
|
+
});
|
|
138
|
+
});
|
|
139
|
+
}
|
|
140
|
+
var x = (e) => ({
|
|
141
|
+
selectedTokens: [],
|
|
142
|
+
...e
|
|
143
|
+
}), S = (e) => ({
|
|
144
|
+
...d,
|
|
145
|
+
...e
|
|
146
|
+
}), C = (e, t, n) => {
|
|
147
|
+
t ||= { selectedToken: [] }, t.selectedTokens = t.selectedTokens || [];
|
|
148
|
+
let r = S(e);
|
|
149
|
+
return new Promise((e) => {
|
|
150
|
+
f("[model]", "normalizedQuestion: ", r), f("[model]", "session: ", t);
|
|
151
|
+
let i = m(r.tokens, t.selectedTokens, n.mode === "evaluate");
|
|
152
|
+
f("[model] tokens:", i);
|
|
153
|
+
let a = n.mode === "evaluate" ? h(r.tokens, t.selectedTokens) : void 0;
|
|
154
|
+
(n.mode === "evaluate" && r.feedbackEnabled ? o(a, r.feedback) : Promise.resolve(void 0)).then((t) => {
|
|
155
|
+
let o = {
|
|
156
|
+
tokens: i,
|
|
157
|
+
highlightChoices: r.highlightChoices,
|
|
158
|
+
prompt: r.promptEnabled ? r.prompt : null,
|
|
159
|
+
text: r.text,
|
|
160
|
+
disabled: n.mode !== "gather",
|
|
161
|
+
maxSelections: r.maxSelections,
|
|
162
|
+
correctness: a,
|
|
163
|
+
env: n,
|
|
164
|
+
feedback: t,
|
|
165
|
+
incorrect: n.mode === "evaluate" ? a !== "correct" : void 0,
|
|
166
|
+
language: r.language,
|
|
167
|
+
extraCSSRules: r.extraCSSRules
|
|
168
|
+
};
|
|
169
|
+
n.role === "instructor" && (n.mode === "view" || n.mode === "evaluate") ? (o.rationale = r.rationaleEnabled ? r.rationale : null, o.teacherInstructions = r.teacherInstructionsEnabled ? r.teacherInstructions : null) : (o.rationale = null, o.teacherInstructions = null), e(o);
|
|
170
|
+
});
|
|
171
|
+
});
|
|
172
|
+
}, w = (e, t) => new Promise((n) => {
|
|
173
|
+
if (t.mode !== "evaluate" && t.role === "instructor") {
|
|
174
|
+
let { tokens: t } = e;
|
|
175
|
+
n({
|
|
176
|
+
id: "1",
|
|
177
|
+
selectedTokens: t.filter((e) => e.correct)
|
|
178
|
+
});
|
|
179
|
+
} else n(null);
|
|
180
|
+
}), T = (e) => (e || "").replace(/(<(?!img|iframe|source)([^>]+)>)/gi, ""), E = (e = {}, t = {}) => {
|
|
181
|
+
let { tokens: n } = e, { minTokens: r = 2, maxTokens: i, maxSelections: a } = t, o = {}, s = (n || []).length;
|
|
182
|
+
[
|
|
183
|
+
"teacherInstructions",
|
|
184
|
+
"prompt",
|
|
185
|
+
"rationale"
|
|
186
|
+
].forEach((n) => {
|
|
187
|
+
t[n]?.required && !T(e[n]) && (o[n] = "This field is required.");
|
|
188
|
+
});
|
|
189
|
+
let c = (n || []).reduce((e, t) => t.correct ? e + 1 : e, 0);
|
|
190
|
+
return s < r ? o.tokensError = `There should be at least ${r} tokens defined.` : s > i && (o.tokensError = `No more than ${i} tokens should be defined.`), c < 1 ? o.selectionsError = "There should be at least 1 token selected." : c > a && (o.selectionsError = `No more than ${a} tokens should be selected.`), o;
|
|
191
|
+
};
|
|
192
|
+
//#endregion
|
|
193
|
+
export { w as createCorrectResponseSession, b as createDefaultModel, h as getCorrectness, v as getLogTrace, _ as getPartialScore, C as model, S as normalize, x as normalizeSession, y as outcome, E as validate };
|
|
194
|
+
|
|
195
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../../../../shared/feedback/dist/index.js","../../../../../shared/controller-utils/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","//#region \\0rolldown/runtime.js\nvar e = Object.defineProperty, t = (t, n) => {\n\tlet r = {};\n\tfor (var i in t) e(r, i, {\n\t\tget: t[i],\n\t\tenumerable: !0\n\t});\n\treturn n || e(r, Symbol.toStringTag, { value: \"Module\" }), r;\n};\n//#endregion\n//#region src/persistence.ts\nfunction n(e) {\n\treturn Array.isArray(e) ? e.filter((e) => e != null) : [];\n}\nfunction r(e) {\n\tlet t = [...e];\n\tfor (let e = t.length - 1; e > 0; e--) {\n\t\tlet n = Math.floor(Math.random() * (e + 1));\n\t\t[t[e], t[n]] = [t[n], t[e]];\n\t}\n\treturn t;\n}\nfunction i(e) {\n\treturn e == null ? !0 : Array.isArray(e) ? e.length === 0 : typeof e == \"object\" ? Object.keys(e).length === 0 : !1;\n}\nasync function a(e, t, a, o = \"value\") {\n\tlet s = n(t?.data?.shuffledValues ?? t?.shuffledValues ?? []);\n\tif (!t) {\n\t\tconsole.warn(\"Unable to save shuffled choices because there's no session.\");\n\t\treturn;\n\t}\n\tif (!i(s)) return n(s.map((t) => e.find((e) => e[o] === t)));\n\tlet c = r(e);\n\tif (a && typeof a == \"function\") try {\n\t\tlet e = n(c.map((e) => e[o]));\n\t\ti(e) ? console.error(`shuffledValues is an empty array - refusing to call updateSession. shuffledChoices: ${JSON.stringify(c)}, key: ${o}`) : t.id && t.element && await a(t.id, t.element, { shuffledValues: e });\n\t} catch (e) {\n\t\tconsole.warn(\"Unable to save shuffled order for choices\"), console.error(e);\n\t}\n\telse console.warn(\"Unable to save shuffled choices, shuffle will happen every time.\");\n\treturn c;\n}\nfunction o(e, t, n) {\n\treturn !!(e.lockChoiceOrder || n[\"@pie-element\"]?.lockChoiceOrder || (n.role ?? \"student\") === \"instructor\");\n}\n//#endregion\n//#region src/partial-scoring.ts\nvar s = /* @__PURE__ */ t({ enabled: () => c });\nfunction c(e, t, n) {\n\treturn e?.partialScoring === !1 || t?.partialScoring === !1 ? !1 : typeof n == \"boolean\" ? n : !0;\n}\n//#endregion\nexport { a as getShuffledChoices, o as lockChoices, s as partialScoring };\n","// @ts-nocheck\n/**\n * @synced-from pie-elements/packages/select-text/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 feedbackEnabled: false,\n highlightChoices: false,\n maxSelections: 0,\n mode: 'sentence',\n partialScoring: false,\n prompt: '',\n promptEnabled: true,\n rationale: '',\n rationaleEnabled: true,\n scoringType: 'auto',\n studentInstructionsEnabled: true,\n teacherInstructions: '',\n teacherInstructionsEnabled: true,\n text: '',\n tokens: [],\n toolbarEditorPosition: 'bottom',\n};\n","// @ts-nocheck\n/**\n * @synced-from pie-elements/packages/select-text/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 { isEmpty } from 'lodash-es';\nimport { getFeedbackForCorrectness } from '@pie-element/shared-feedback';\nimport { partialScoring } from '@pie-element/shared-controller-utils';\nimport defaults from './defaults.js';\n\nconst log = debug('@pie-element:select-text:controller');\n\nconst equalTokens = (token1 = {}, token2 = {}) =>\n (token1?.start === token2?.start && token1?.end === token2?.end) ||\n // this case is used for the cases when the token's start & end were recalculated\n (token1?.start === token2?.oldStart && token1?.end === token2?.oldEnd);\n\nconst normalizeTokens = (tokens = [], selectedTokens = [], evaluateMode = false) =>\n (tokens || []).map((token) => {\n const isCorrect = !!token.correct;\n // search if correct token is missing from session\n const isMissing = isCorrect && !(selectedTokens || []).find((selectedToken) => equalTokens(token, selectedToken));\n\n return {\n ...token,\n correct: evaluateMode ? isCorrect : undefined,\n isMissing: evaluateMode ? isMissing : undefined,\n };\n });\n\nexport const getCorrectness = (tokens, selected) => {\n const correct = tokens.filter((t) => t.correct === true);\n\n if (correct.length === 0) {\n return 'unknown';\n }\n\n const correctSelected = getCorrectSelected(tokens, selected);\n\n if (correctSelected.length === selected.length) {\n if (correctSelected.length === correct.length) {\n return 'correct';\n } else if (correctSelected.length > 0) {\n return 'partially-correct';\n }\n }\n\n if (correctSelected.length > 0) {\n return 'partially-correct';\n }\n\n return 'incorrect';\n};\n\nconst getCorrectSelected = (tokens, selected) =>\n (selected || []).filter((s) => tokens.findIndex((token) => token.correct && equalTokens(token, s)) !== -1);\n\nexport const getPartialScore = (question, session, totalCorrect) => {\n if (!session || isEmpty(session)) {\n return 0;\n }\n\n const correctCount = getCorrectSelected(question.tokens, session.selectedTokens).length;\n const correctTokens = (question.tokens || []).filter((t) => t.correct === true);\n const extraSelected = session.selectedTokens ? session.selectedTokens.length > correctTokens.length : 0;\n const incorrectCount = extraSelected ? session.selectedTokens && session.selectedTokens.length - correctCount : 0;\n const count = correctCount - incorrectCount;\n const positiveCount = count < 0 ? 0 : count;\n\n return totalCorrect.length ? parseFloat((positiveCount / totalCorrect.length).toFixed(2)) : 0;\n};\n\n/**\n * Generates detailed trace log for select-text scoring evaluation\n * @param {Object} question - the question model\n * @param {Object} session - the student session\n * @param {Object} env - the environment\n * @returns {Array<string>} traceLog\n */\nexport const getLogTrace = (question, session, env) => {\n const traceLog = [];\n\n const selectedTokens = session?.selectedTokens || [];\n const tokens = question?.tokens || [];\n\n if (selectedTokens.length === 0) {\n traceLog.push('Student did not select any token.');\n return traceLog;\n }\n\n traceLog.push(`Student selected ${selectedTokens.length} token(s).`);\n\n let totalCorrectTokens = 0;\n let correctSelected = 0;\n let missingCount = 0;\n\n for (let i = 0; i < tokens.length; i++) {\n const token = tokens[i];\n if (token.correct) {\n totalCorrectTokens++;\n const matched = selectedTokens.some((s) => equalTokens(token, s));\n if (matched) {\n correctSelected++;\n } else {\n missingCount++;\n }\n }\n }\n\n const incorrectSelected = selectedTokens.length - correctSelected;\n\n if (correctSelected > 0) {\n traceLog.push(`${correctSelected} correct token(s) selected.`);\n }\n\n if (incorrectSelected > 0) {\n traceLog.push(`${incorrectSelected} incorrect token(s) selected.`);\n }\n\n if (missingCount > 0) {\n traceLog.push(`${missingCount} required correct token(s) were not selected.`);\n }\n\n const partialScoringEnabled = partialScoring.enabled(question, env, true);\n\n if (partialScoringEnabled) {\n traceLog.push('Score calculated using partial scoring.');\n traceLog.push(\n 'Score is based on the number of correct minus incorrect selections, divided by the total number of correct tokens.',\n );\n\n if (incorrectSelected > 0 && selectedTokens.length > totalCorrectTokens) {\n traceLog.push(\n 'Extra selected tokens beyond the correct set reduce the score.',\n );\n }\n } else {\n traceLog.push('Score calculated using all-or-nothing scoring.');\n traceLog.push(\n 'Student must select all correct tokens and no incorrect tokens to receive full credit.',\n );\n }\n\n const rawScore = getPartialScore(question, session, tokens.filter((t) => t.correct));\n const finalScore = partialScoringEnabled ? rawScore : rawScore === 1 ? 1 : 0;\n\n traceLog.push(`Final score: ${finalScore}.`);\n\n return traceLog;\n};\n\nexport const outcome = (question, session, env) =>\n new Promise((resolve) => {\n if (!session || isEmpty(session)) {\n resolve({ score: 0, empty: true, logTrace: ['Student did not select any token.'] });\n }\n\n session = normalizeSession(session);\n\n if (env.mode !== 'evaluate') {\n resolve({ score: undefined, completed: undefined, logTrace: [] });\n } else {\n const enabled = partialScoring.enabled(question, env, true);\n const totalCorrect = question.tokens.filter((t) => t.correct);\n const score = getPartialScore(question, session, totalCorrect);\n resolve({\n score: enabled ? score : score === 1 ? 1 : 0,\n logTrace: getLogTrace(question, session, env),\n });\n }\n });\n\nexport function createDefaultModel(model = {}) {\n return new Promise((resolve) => {\n resolve({ ...defaults, ...model });\n });\n}\n\nexport const normalizeSession = (session) => ({ selectedTokens: [], ...session });\n\nexport const normalize = (question) => ({ ...defaults, ...question });\n\nexport const model = (question, session, env) => {\n session = session || { selectedToken: [] };\n session.selectedTokens = session.selectedTokens || [];\n const normalizedQuestion = normalize(question);\n\n return new Promise((resolve) => {\n log('[model]', 'normalizedQuestion: ', normalizedQuestion);\n log('[model]', 'session: ', session);\n\n const tokens = normalizeTokens(normalizedQuestion.tokens, session.selectedTokens, env.mode === 'evaluate');\n log('[model] tokens:', tokens);\n\n const correctness =\n env.mode === 'evaluate' ? getCorrectness(normalizedQuestion.tokens, session.selectedTokens) : undefined;\n\n const fb =\n env.mode === 'evaluate' && normalizedQuestion.feedbackEnabled\n ? getFeedbackForCorrectness(correctness, normalizedQuestion.feedback)\n : Promise.resolve(undefined);\n\n fb.then((feedback) => {\n const out = {\n tokens,\n highlightChoices: normalizedQuestion.highlightChoices,\n prompt: normalizedQuestion.promptEnabled ? normalizedQuestion.prompt : null,\n text: normalizedQuestion.text,\n disabled: env.mode !== 'gather',\n maxSelections: normalizedQuestion.maxSelections,\n correctness,\n env,\n feedback,\n incorrect: env.mode === 'evaluate' ? correctness !== 'correct' : undefined,\n language: normalizedQuestion.language,\n extraCSSRules: normalizedQuestion.extraCSSRules,\n };\n\n if (env.role === 'instructor' && (env.mode === 'view' || env.mode === 'evaluate')) {\n out.rationale = normalizedQuestion.rationaleEnabled ? normalizedQuestion.rationale : null;\n out.teacherInstructions = normalizedQuestion.teacherInstructionsEnabled\n ? normalizedQuestion.teacherInstructions\n : null;\n } else {\n out.rationale = null;\n out.teacherInstructions = null;\n }\n\n resolve(out);\n });\n });\n};\n\nexport const createCorrectResponseSession = (question, env) => {\n return new Promise((resolve) => {\n if (env.mode !== 'evaluate' && env.role === 'instructor') {\n const { tokens } = question;\n const selectedTokens = tokens.filter((t) => t.correct);\n\n resolve({\n id: '1',\n selectedTokens,\n });\n } else {\n resolve(null);\n }\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 { tokens } = model;\n const { minTokens = 2, maxTokens, maxSelections } = config;\n const errors = {};\n const nbOfTokens = (tokens || []).length;\n\n ['teacherInstructions', 'prompt', 'rationale'].forEach((field) => {\n if (config[field]?.required && !getContent(model[field])) {\n errors[field] = 'This field is required.';\n }\n });\n\n const nbOfSelections = (tokens || []).reduce((acc, token) => (token.correct ? acc + 1 : acc), 0);\n\n if (nbOfTokens < minTokens) {\n errors.tokensError = `There should be at least ${minTokens} tokens defined.`;\n } else if (nbOfTokens > maxTokens) {\n errors.tokensError = `No more than ${maxTokens} tokens should be defined.`;\n }\n\n if (nbOfSelections < 1) {\n errors.selectionsError = 'There should be at least 1 token selected.';\n } else if (nbOfSelections > maxSelections) {\n errors.selectionsError = `No more than ${maxSelections} tokens should be selected.`;\n }\n\n return errors;\n};\n"],"mappings":";;;mCACA,IAAA;;;;;;;;;;;;;;;;;;;;;AAqBA;AAGA,SAAA,EAAA,GAAA;;AAEA;AAGA,SAAA,EAAA,GAAA,I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mB,sBACnB,SAEJ,EAAI,YAAY,MAChB,EAAI,sBAAsB,OAG5B,EAAQ,CAAG;EACb,CAAC;CACH,CAAC;AACH,GAEa,KAAgC,GAAU,MAC9C,IAAI,SAAS,MAAY;CAC9B,IAAI,EAAI,SAAS,cAAc,EAAI,SAAS,cAAc;EACxD,IAAM,EAAE,cAAW;EAGnB,EAAQ;GACN,IAAI;GACJ,gBAJqB,EAAO,QAAQ,MAAM,EAAE,OAI5C;EACF,CAAC;CACH,OACE,EAAQ,IAAI;AAEhB,CAAC,GAOG,KAAc,OAAU,KAAQ,IAAI,QAAQ,sCAAsC,EAAE,GAE7E,KAAY,IAAQ,CAAC,GAAG,IAAS,CAAC,MAAM;CACnD,IAAM,EAAE,cAAW,GACb,EAAE,eAAY,GAAG,cAAW,qBAAkB,GAC9C,IAAS,CAAC,GACV,KAAc,KAAU,CAAC,GAAG;CAElC;EAAC;EAAuB;EAAU;CAAW,EAAE,SAAS,MAAU;EAChE,AAAI,EAAO,IAAQ,YAAY,CAAC,EAAW,EAAM,EAAM,MACrD,EAAO,KAAS;CAEpB,CAAC;CAED,IAAM,KAAkB,KAAU,CAAC,GAAG,QAAQ,GAAK,MAAW,EAAM,UAAU,IAAM,IAAI,GAAM,CAAC;CAc/F,OAZI,IAAa,IACf,EAAO,cAAc,4BAA4B,EAAU,oBAClD,IAAa,MACtB,EAAO,cAAc,gBAAgB,EAAU,8BAG7C,IAAiB,IACnB,EAAO,kBAAkB,+CAChB,IAAiB,MAC1B,EAAO,kBAAkB,gBAAgB,EAAc,+BAGlD;AACT"}
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import { _ as e, g as t, m as n, y as r } from "./_getTag-x1UozeM0.js";
|
|
2
|
+
//#region ../../../node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isSymbol.js
|
|
3
|
+
var i = "[object Symbol]";
|
|
4
|
+
function a(n) {
|
|
5
|
+
return typeof n == "symbol" || t(n) && e(n) == i;
|
|
6
|
+
}
|
|
7
|
+
//#endregion
|
|
8
|
+
//#region ../../../node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_trimmedEndIndex.js
|
|
9
|
+
var o = /\s/;
|
|
10
|
+
function s(e) {
|
|
11
|
+
for (var t = e.length; t-- && o.test(e.charAt(t)););
|
|
12
|
+
return t;
|
|
13
|
+
}
|
|
14
|
+
//#endregion
|
|
15
|
+
//#region ../../../node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseTrim.js
|
|
16
|
+
var c = /^\s+/;
|
|
17
|
+
function l(e) {
|
|
18
|
+
return e && e.slice(0, s(e) + 1).replace(c, "");
|
|
19
|
+
}
|
|
20
|
+
//#endregion
|
|
21
|
+
//#region ../../../node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/toNumber.js
|
|
22
|
+
var u = NaN, d = /^[-+]0x[0-9a-f]+$/i, f = /^0b[01]+$/i, p = /^0o[0-7]+$/i, m = parseInt;
|
|
23
|
+
function h(e) {
|
|
24
|
+
if (typeof e == "number") return e;
|
|
25
|
+
if (a(e)) return u;
|
|
26
|
+
if (n(e)) {
|
|
27
|
+
var t = typeof e.valueOf == "function" ? e.valueOf() : e;
|
|
28
|
+
e = n(t) ? t + "" : t;
|
|
29
|
+
}
|
|
30
|
+
if (typeof e != "string") return e === 0 ? e : +e;
|
|
31
|
+
e = l(e);
|
|
32
|
+
var r = f.test(e);
|
|
33
|
+
return r || p.test(e) ? m(e.slice(2), r ? 2 : 8) : d.test(e) ? u : +e;
|
|
34
|
+
}
|
|
35
|
+
//#endregion
|
|
36
|
+
//#region ../../../node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/now.js
|
|
37
|
+
var g = function() {
|
|
38
|
+
return r.Date.now();
|
|
39
|
+
}, _ = "Expected a function", v = Math.max, y = Math.min;
|
|
40
|
+
function b(e, t, r) {
|
|
41
|
+
var i, a, o, s, c, l, u = 0, d = !1, f = !1, p = !0;
|
|
42
|
+
if (typeof e != "function") throw TypeError(_);
|
|
43
|
+
t = h(t) || 0, n(r) && (d = !!r.leading, f = "maxWait" in r, o = f ? v(h(r.maxWait) || 0, t) : o, p = "trailing" in r ? !!r.trailing : p);
|
|
44
|
+
function m(t) {
|
|
45
|
+
var n = i, r = a;
|
|
46
|
+
return i = a = void 0, u = t, s = e.apply(r, n), s;
|
|
47
|
+
}
|
|
48
|
+
function b(e) {
|
|
49
|
+
return u = e, c = setTimeout(C, t), d ? m(e) : s;
|
|
50
|
+
}
|
|
51
|
+
function x(e) {
|
|
52
|
+
var n = e - l, r = e - u, i = t - n;
|
|
53
|
+
return f ? y(i, o - r) : i;
|
|
54
|
+
}
|
|
55
|
+
function S(e) {
|
|
56
|
+
var n = e - l, r = e - u;
|
|
57
|
+
return l === void 0 || n >= t || n < 0 || f && r >= o;
|
|
58
|
+
}
|
|
59
|
+
function C() {
|
|
60
|
+
var e = g();
|
|
61
|
+
if (S(e)) return w(e);
|
|
62
|
+
c = setTimeout(C, x(e));
|
|
63
|
+
}
|
|
64
|
+
function w(e) {
|
|
65
|
+
return c = void 0, p && i ? m(e) : (i = a = void 0, s);
|
|
66
|
+
}
|
|
67
|
+
function T() {
|
|
68
|
+
c !== void 0 && clearTimeout(c), u = 0, i = l = a = c = void 0;
|
|
69
|
+
}
|
|
70
|
+
function E() {
|
|
71
|
+
return c === void 0 ? s : w(g());
|
|
72
|
+
}
|
|
73
|
+
function D() {
|
|
74
|
+
var e = g(), n = S(e);
|
|
75
|
+
if (i = arguments, a = this, l = e, n) {
|
|
76
|
+
if (c === void 0) return b(l);
|
|
77
|
+
if (f) return clearTimeout(c), c = setTimeout(C, t), m(l);
|
|
78
|
+
}
|
|
79
|
+
return c === void 0 && (c = setTimeout(C, t)), s;
|
|
80
|
+
}
|
|
81
|
+
return D.cancel = T, D.flush = E, D;
|
|
82
|
+
}
|
|
83
|
+
//#endregion
|
|
84
|
+
export { h as n, a as r, b as t };
|
|
85
|
+
|
|
86
|
+
//# sourceMappingURL=debounce-CUpLfqAu.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"debounce-CUpLfqAu.js","names":[],"sources":["../../../../../node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isSymbol.js","../../../../../node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_trimmedEndIndex.js","../../../../../node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseTrim.js","../../../../../node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/toNumber.js","../../../../../node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/now.js","../../../../../node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/debounce.js"],"sourcesContent":["import baseGetTag from './_baseGetTag.js';\nimport isObjectLike from './isObjectLike.js';\n\n/** `Object#toString` result references. */\nvar symbolTag = '[object Symbol]';\n\n/**\n * Checks if `value` is classified as a `Symbol` primitive or object.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.\n * @example\n *\n * _.isSymbol(Symbol.iterator);\n * // => true\n *\n * _.isSymbol('abc');\n * // => false\n */\nfunction isSymbol(value) {\n return typeof value == 'symbol' ||\n (isObjectLike(value) && baseGetTag(value) == symbolTag);\n}\n\nexport default isSymbol;\n","/** Used to match a single whitespace character. */\nvar reWhitespace = /\\s/;\n\n/**\n * Used by `_.trim` and `_.trimEnd` to get the index of the last non-whitespace\n * character of `string`.\n *\n * @private\n * @param {string} string The string to inspect.\n * @returns {number} Returns the index of the last non-whitespace character.\n */\nfunction trimmedEndIndex(string) {\n var index = string.length;\n\n while (index-- && reWhitespace.test(string.charAt(index))) {}\n return index;\n}\n\nexport default trimmedEndIndex;\n","import trimmedEndIndex from './_trimmedEndIndex.js';\n\n/** Used to match leading whitespace. */\nvar reTrimStart = /^\\s+/;\n\n/**\n * The base implementation of `_.trim`.\n *\n * @private\n * @param {string} string The string to trim.\n * @returns {string} Returns the trimmed string.\n */\nfunction baseTrim(string) {\n return string\n ? string.slice(0, trimmedEndIndex(string) + 1).replace(reTrimStart, '')\n : string;\n}\n\nexport default baseTrim;\n","import baseTrim from './_baseTrim.js';\nimport isObject from './isObject.js';\nimport isSymbol from './isSymbol.js';\n\n/** Used as references for various `Number` constants. */\nvar NAN = 0 / 0;\n\n/** Used to detect bad signed hexadecimal string values. */\nvar reIsBadHex = /^[-+]0x[0-9a-f]+$/i;\n\n/** Used to detect binary string values. */\nvar reIsBinary = /^0b[01]+$/i;\n\n/** Used to detect octal string values. */\nvar reIsOctal = /^0o[0-7]+$/i;\n\n/** Built-in method references without a dependency on `root`. */\nvar freeParseInt = parseInt;\n\n/**\n * Converts `value` to a number.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to process.\n * @returns {number} Returns the number.\n * @example\n *\n * _.toNumber(3.2);\n * // => 3.2\n *\n * _.toNumber(Number.MIN_VALUE);\n * // => 5e-324\n *\n * _.toNumber(Infinity);\n * // => Infinity\n *\n * _.toNumber('3.2');\n * // => 3.2\n */\nfunction toNumber(value) {\n if (typeof value == 'number') {\n return value;\n }\n if (isSymbol(value)) {\n return NAN;\n }\n if (isObject(value)) {\n var other = typeof value.valueOf == 'function' ? value.valueOf() : value;\n value = isObject(other) ? (other + '') : other;\n }\n if (typeof value != 'string') {\n return value === 0 ? value : +value;\n }\n value = baseTrim(value);\n var isBinary = reIsBinary.test(value);\n return (isBinary || reIsOctal.test(value))\n ? freeParseInt(value.slice(2), isBinary ? 2 : 8)\n : (reIsBadHex.test(value) ? NAN : +value);\n}\n\nexport default toNumber;\n","import root from './_root.js';\n\n/**\n * Gets the timestamp of the number of milliseconds that have elapsed since\n * the Unix epoch (1 January 1970 00:00:00 UTC).\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Date\n * @returns {number} Returns the timestamp.\n * @example\n *\n * _.defer(function(stamp) {\n * console.log(_.now() - stamp);\n * }, _.now());\n * // => Logs the number of milliseconds it took for the deferred invocation.\n */\nvar now = function() {\n return root.Date.now();\n};\n\nexport default now;\n","import isObject from './isObject.js';\nimport now from './now.js';\nimport toNumber from './toNumber.js';\n\n/** Error message constants. */\nvar FUNC_ERROR_TEXT = 'Expected a function';\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeMax = Math.max,\n nativeMin = Math.min;\n\n/**\n * Creates a debounced function that delays invoking `func` until after `wait`\n * milliseconds have elapsed since the last time the debounced function was\n * invoked. The debounced function comes with a `cancel` method to cancel\n * delayed `func` invocations and a `flush` method to immediately invoke them.\n * Provide `options` to indicate whether `func` should be invoked on the\n * leading and/or trailing edge of the `wait` timeout. The `func` is invoked\n * with the last arguments provided to the debounced function. Subsequent\n * calls to the debounced function return the result of the last `func`\n * invocation.\n *\n * **Note:** If `leading` and `trailing` options are `true`, `func` is\n * invoked on the trailing edge of the timeout only if the debounced function\n * is invoked more than once during the `wait` timeout.\n *\n * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred\n * until to the next tick, similar to `setTimeout` with a timeout of `0`.\n *\n * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)\n * for details over the differences between `_.debounce` and `_.throttle`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to debounce.\n * @param {number} [wait=0] The number of milliseconds to delay.\n * @param {Object} [options={}] The options object.\n * @param {boolean} [options.leading=false]\n * Specify invoking on the leading edge of the timeout.\n * @param {number} [options.maxWait]\n * The maximum time `func` is allowed to be delayed before it's invoked.\n * @param {boolean} [options.trailing=true]\n * Specify invoking on the trailing edge of the timeout.\n * @returns {Function} Returns the new debounced function.\n * @example\n *\n * // Avoid costly calculations while the window size is in flux.\n * jQuery(window).on('resize', _.debounce(calculateLayout, 150));\n *\n * // Invoke `sendMail` when clicked, debouncing subsequent calls.\n * jQuery(element).on('click', _.debounce(sendMail, 300, {\n * 'leading': true,\n * 'trailing': false\n * }));\n *\n * // Ensure `batchLog` is invoked once after 1 second of debounced calls.\n * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 });\n * var source = new EventSource('/stream');\n * jQuery(source).on('message', debounced);\n *\n * // Cancel the trailing debounced invocation.\n * jQuery(window).on('popstate', debounced.cancel);\n */\nfunction debounce(func, wait, options) {\n var lastArgs,\n lastThis,\n maxWait,\n result,\n timerId,\n lastCallTime,\n lastInvokeTime = 0,\n leading = false,\n maxing = false,\n trailing = true;\n\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n wait = toNumber(wait) || 0;\n if (isObject(options)) {\n leading = !!options.leading;\n maxing = 'maxWait' in options;\n maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;\n trailing = 'trailing' in options ? !!options.trailing : trailing;\n }\n\n function invokeFunc(time) {\n var args = lastArgs,\n thisArg = lastThis;\n\n lastArgs = lastThis = undefined;\n lastInvokeTime = time;\n result = func.apply(thisArg, args);\n return result;\n }\n\n function leadingEdge(time) {\n // Reset any `maxWait` timer.\n lastInvokeTime = time;\n // Start the timer for the trailing edge.\n timerId = setTimeout(timerExpired, wait);\n // Invoke the leading edge.\n return leading ? invokeFunc(time) : result;\n }\n\n function remainingWait(time) {\n var timeSinceLastCall = time - lastCallTime,\n timeSinceLastInvoke = time - lastInvokeTime,\n timeWaiting = wait - timeSinceLastCall;\n\n return maxing\n ? nativeMin(timeWaiting, maxWait - timeSinceLastInvoke)\n : timeWaiting;\n }\n\n function shouldInvoke(time) {\n var timeSinceLastCall = time - lastCallTime,\n timeSinceLastInvoke = time - lastInvokeTime;\n\n // Either this is the first call, activity has stopped and we're at the\n // trailing edge, the system time has gone backwards and we're treating\n // it as the trailing edge, or we've hit the `maxWait` limit.\n return (lastCallTime === undefined || (timeSinceLastCall >= wait) ||\n (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait));\n }\n\n function timerExpired() {\n var time = now();\n if (shouldInvoke(time)) {\n return trailingEdge(time);\n }\n // Restart the timer.\n timerId = setTimeout(timerExpired, remainingWait(time));\n }\n\n function trailingEdge(time) {\n timerId = undefined;\n\n // Only invoke if we have `lastArgs` which means `func` has been\n // debounced at least once.\n if (trailing && lastArgs) {\n return invokeFunc(time);\n }\n lastArgs = lastThis = undefined;\n return result;\n }\n\n function cancel() {\n if (timerId !== undefined) {\n clearTimeout(timerId);\n }\n lastInvokeTime = 0;\n lastArgs = lastCallTime = lastThis = timerId = undefined;\n }\n\n function flush() {\n return timerId === undefined ? result : trailingEdge(now());\n }\n\n function debounced() {\n var time = now(),\n isInvoking = shouldInvoke(time);\n\n lastArgs = arguments;\n lastThis = this;\n lastCallTime = time;\n\n if (isInvoking) {\n if (timerId === undefined) {\n return leadingEdge(lastCallTime);\n }\n if (maxing) {\n // Handle invocations in a tight loop.\n clearTimeout(timerId);\n timerId = setTimeout(timerExpired, wait);\n return invokeFunc(lastCallTime);\n }\n }\n if (timerId === undefined) {\n timerId = setTimeout(timerExpired, wait);\n }\n return result;\n }\n debounced.cancel = cancel;\n debounced.flush = flush;\n return debounced;\n}\n\nexport default debounce;\n"],"x_google_ignoreList":[0,1,2,3,4,5],"mappings":";;AAIA,IAAI,IAAY;AAmBhB,SAAS,EAAS,GAAO;CACvB,OAAO,OAAO,KAAS,YACpB,EAAa,CAAK,KAAK,EAAW,CAAK,KAAK;AACjD;;;ACzBA,IAAI,IAAe;AAUnB,SAAS,EAAgB,GAAQ;CAG/B,KAFA,IAAI,IAAQ,EAAO,QAEZ,OAAW,EAAa,KAAK,EAAO,OAAO,CAAK,CAAC;CACxD,OAAO;AACT;;;ACbA,IAAI,IAAc;AASlB,SAAS,EAAS,GAAQ;CACxB,OAAO,KACH,EAAO,MAAM,GAAG,EAAgB,CAAM,IAAI,CAAC,EAAE,QAAQ,GAAa,EAAE;AAE1E;;;ACXA,IAAI,IAAM,KAGN,IAAa,sBAGb,IAAa,cAGb,IAAY,eAGZ,IAAe;AAyBnB,SAAS,EAAS,GAAO;CACvB,IAAI,OAAO,KAAS,UAClB,OAAO;CAET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,IAAI,IAAoB,IAAO,GAC3B,IAAsB,IAAO,GAC7B,IAAc,IAAO;EAEzB,OAAO,IACH,EAAU,GAAa,IAAU,CAAmB,IACpD;CACN;CAEA,SAAS,EAAa,GAAM;EAC1B,IAAI,IAAoB,IAAO,GAC3B,IAAsB,IAAO;EAKjC,OAAQ,MAAiB,KAAA,KAAc,KAAqB,KACzD,IAAoB,KAAO,KAAU,KAAuB;CACjE;CAEA,SAAS,IAAe;EACtB,IAAI,IAAO,EAAI;EACf,IAAI,EAAa,CAAI,GACnB,OAAO,EAAa,CAAI;EAG1B,IAAU,WAAW,GAAc,EAAc,CAAI,CAAC;CACxD;CAEA,SAAS,EAAa,GAAM;EAS1B,OARA,IAAU,KAAA,GAIN,KAAY,IACP,EAAW,CAAI,KAExB,IAAW,IAAW,KAAA,GACf;CACT;CAEA,SAAS,IAAS;EAKhB,AAJI,MAAY,KAAA,KACd,aAAa,CAAO,GAEtB,IAAiB,GACjB,IAAW,IAAe,IAAW,IAAU,KAAA;CACjD;CAEA,SAAS,IAAQ;EACf,OAAO,MAAY,KAAA,IAAY,IAAS,EAAa,EAAI,CAAC;CAC5D;CAEA,SAAS,IAAY;EACnB,IAAI,IAAO,EAAI,GACX,IAAa,EAAa,CAAI;EAMlC,IAJA,IAAW,WACX,IAAW,MACX,IAAe,GAEX,GAAY;GACd,IAAI,MAAY,KAAA,GACd,OAAO,EAAY,CAAY;GAEjC,IAAI,GAIF,OAFA,aAAa,CAAO,GACpB,IAAU,WAAW,GAAc,CAAI,GAChC,EAAW,CAAY;EAElC;EAIA,OAHI,MAAY,KAAA,MACd,IAAU,WAAW,GAAc,CAAI,IAElC;CACT;CAGA,OAFA,EAAU,SAAS,GACnB,EAAU,QAAQ,GACX;AACT"}
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import { q as e } from "../Check-CXevxzJJ.js";
|
|
2
|
+
import { n as t, t as n } from "../main-4aycOoI5.js";
|
|
3
|
+
import r from "react";
|
|
4
|
+
import { createRoot as i } from "react-dom/client";
|
|
5
|
+
//#region ../../shared/player-events/dist/index.js
|
|
6
|
+
var a = class e extends CustomEvent {
|
|
7
|
+
static {
|
|
8
|
+
this.TYPE = "model-set";
|
|
9
|
+
}
|
|
10
|
+
constructor(t, n, r) {
|
|
11
|
+
super(e.TYPE, {
|
|
12
|
+
bubbles: !0,
|
|
13
|
+
composed: !0,
|
|
14
|
+
detail: {
|
|
15
|
+
complete: n,
|
|
16
|
+
component: t,
|
|
17
|
+
hasModel: r
|
|
18
|
+
}
|
|
19
|
+
}), this.component = t, this.complete = n;
|
|
20
|
+
}
|
|
21
|
+
}, o = class e extends CustomEvent {
|
|
22
|
+
static {
|
|
23
|
+
this.TYPE = "session-changed";
|
|
24
|
+
}
|
|
25
|
+
constructor(t, n) {
|
|
26
|
+
super(e.TYPE, {
|
|
27
|
+
bubbles: !0,
|
|
28
|
+
composed: !0,
|
|
29
|
+
detail: {
|
|
30
|
+
complete: n,
|
|
31
|
+
component: t
|
|
32
|
+
}
|
|
33
|
+
}), this.component = t, this.complete = n;
|
|
34
|
+
}
|
|
35
|
+
}, s = class extends HTMLElement {
|
|
36
|
+
constructor() {
|
|
37
|
+
super(), this._root = null;
|
|
38
|
+
}
|
|
39
|
+
set model(e) {
|
|
40
|
+
this._model = e, this.render(), this.dispatchEvent(new a(this.tagName.toLowerCase(), this.isSessionComplete(), this._model !== void 0));
|
|
41
|
+
}
|
|
42
|
+
set session(e) {
|
|
43
|
+
if (this._session = e, this._model) {
|
|
44
|
+
let { tokens: n } = t(this._model) || {}, { selectedTokens: r } = e || {};
|
|
45
|
+
r ||= [];
|
|
46
|
+
let i = (e) => n.find(({ start: t, end: n }) => e.start === t && e.end === n);
|
|
47
|
+
if (!r.reduce((e, t) => e && i(t), !0)) {
|
|
48
|
+
let { tokens: e } = t({
|
|
49
|
+
...this._model,
|
|
50
|
+
tokens: r
|
|
51
|
+
}) || {};
|
|
52
|
+
e && (this._session.selectedTokens = e);
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
Array.isArray(this._session.selectedTokens) || (this._session.selectedTokens = []), this.render();
|
|
56
|
+
}
|
|
57
|
+
get session() {
|
|
58
|
+
return this._session;
|
|
59
|
+
}
|
|
60
|
+
isSessionComplete() {
|
|
61
|
+
let { selectedTokens: e } = this._session || {};
|
|
62
|
+
return Array.isArray(e) && e.length > 0;
|
|
63
|
+
}
|
|
64
|
+
selectionChanged(e) {
|
|
65
|
+
this._session.selectedTokens = e, this.dispatchEvent(new o(this.tagName.toLowerCase(), this.isSessionComplete()));
|
|
66
|
+
}
|
|
67
|
+
connectedCallback() {
|
|
68
|
+
this.render();
|
|
69
|
+
}
|
|
70
|
+
render() {
|
|
71
|
+
if (this._model && this._session) {
|
|
72
|
+
let t = r.createElement(n, {
|
|
73
|
+
model: this._model,
|
|
74
|
+
session: this._session,
|
|
75
|
+
onSelectionChange: this.selectionChanged.bind(this)
|
|
76
|
+
});
|
|
77
|
+
this._root ||= i(this), this._root.render(t), queueMicrotask(() => {
|
|
78
|
+
e(this);
|
|
79
|
+
});
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
disconnectedCallback() {
|
|
83
|
+
this._root && this._root.unmount();
|
|
84
|
+
}
|
|
85
|
+
};
|
|
86
|
+
//#endregion
|
|
87
|
+
export { s as default };
|
|
88
|
+
|
|
89
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +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/select-text/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 { SessionChangedEvent, ModelSetEvent } from '@pie-element/shared-player-events';\nimport Main from './main.js';\nimport { renderMath } from '@pie-element/shared-math-rendering-mathjax';\nimport generateModel from './utils.js';\n\nexport default class SelectText extends HTMLElement {\n constructor() {\n super();\n this._root = null;\n }\n\n set model(m) {\n this._model = m;\n\n this.render();\n this.dispatchEvent(\n new ModelSetEvent(this.tagName.toLowerCase(), this.isSessionComplete(), this._model !== undefined),\n );\n }\n\n set session(s) {\n this._session = s;\n\n if (this._model) {\n const generatedModel = generateModel(this._model) || {};\n const { tokens } = generatedModel;\n let { selectedTokens } = s || {};\n\n selectedTokens = selectedTokens || [];\n\n // This case was introduced mostly for createCorrectSession:\n // make sure initial session tokens are parsed and have correct start and end (according to the regenerated model)\n const selectedTokenExistsInGeneratedTokens = (s) =>\n tokens.find(({ start: tStart, end: tEnd }) => s.start === tStart && s.end === tEnd);\n\n // check if ALL the selectedTokens have the correct start and end\n const allAreCorrect = selectedTokens.reduce(\n (acc, selectedToken) => acc && selectedTokenExistsInGeneratedTokens(selectedToken),\n true,\n );\n\n if (!allAreCorrect) {\n // otherwise, make sure to parse selectedTokens as well\n const generatedModel = generateModel({ ...this._model, tokens: selectedTokens }) || {};\n const { tokens } = generatedModel;\n\n if (tokens) {\n this._session.selectedTokens = tokens;\n }\n }\n }\n\n if (!Array.isArray(this._session.selectedTokens)) {\n this._session.selectedTokens = [];\n }\n this.render();\n }\n\n get session() {\n return this._session;\n }\n\n isSessionComplete() {\n const { selectedTokens } = this._session || {};\n return Array.isArray(selectedTokens) && selectedTokens.length > 0;\n }\n\n selectionChanged(selection) {\n this._session.selectedTokens = selection;\n\n this.dispatchEvent(new SessionChangedEvent(this.tagName.toLowerCase(), this.isSessionComplete()));\n }\n\n connectedCallback() {\n this.render();\n }\n\n render() {\n if (this._model && this._session) {\n const el = React.createElement(Main, {\n model: this._model,\n session: this._session,\n onSelectionChange: this.selectionChanged.bind(this),\n });\n\n if (!this._root) {\n this._root = createRoot(this);\n }\n this._root.render(el);\n queueMicrotask(() => {\n renderMath(this);\n });\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,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,cAAwC,YAAY;CAClD,cAAc;EAEZ,AADA,MAAM,GACN,KAAK,QAAQ;CACf;CAEA,IAAI,MAAM,GAAG;EAIX,AAHA,KAAK,SAAS,GAEd,KAAK,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,AAJA,AACE,KAAK,UAAQ,EAAW,IAAI,GAE9B,KAAK,MAAM,OAAO,CAAE,GACpB,qBAAqB;IACnB,EAAW,IAAI;GACjB,CAAC;EACH;CACF;CAEA,uBAAuB;EACrB,AAAI,KAAK,SACP,KAAK,MAAM,QAAQ;CAEvB;AACF"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { a as e, c as t, d as n, h as r, l as i, r as a, t as o, u as s } from "./_getTag-x1UozeM0.js";
|
|
2
|
+
//#region ../../../node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isEmpty.js
|
|
3
|
+
var c = "[object Map]", l = "[object Set]", u = Object.prototype.hasOwnProperty;
|
|
4
|
+
function d(d) {
|
|
5
|
+
if (d == null) return !0;
|
|
6
|
+
if (n(d) && (r(d) || typeof d == "string" || typeof d.splice == "function" || t(d) || e(d) || i(d))) return !d.length;
|
|
7
|
+
var f = o(d);
|
|
8
|
+
if (f == c || f == l) return !d.size;
|
|
9
|
+
if (s(d)) return !a(d).length;
|
|
10
|
+
for (var p in d) if (u.call(d, p)) return !1;
|
|
11
|
+
return !0;
|
|
12
|
+
}
|
|
13
|
+
//#endregion
|
|
14
|
+
export { d as t };
|
|
15
|
+
|
|
16
|
+
//# sourceMappingURL=isEmpty-Bsms1e2W.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"isEmpty-Bsms1e2W.js","names":["getTag"],"sources":["../../../../../node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isEmpty.js"],"sourcesContent":["import baseKeys from './_baseKeys.js';\nimport getTag from './_getTag.js';\nimport isArguments from './isArguments.js';\nimport isArray from './isArray.js';\nimport isArrayLike from './isArrayLike.js';\nimport isBuffer from './isBuffer.js';\nimport isPrototype from './_isPrototype.js';\nimport isTypedArray from './isTypedArray.js';\n\n/** `Object#toString` result references. */\nvar mapTag = '[object Map]',\n setTag = '[object Set]';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Checks if `value` is an empty object, collection, map, or set.\n *\n * Objects are considered empty if they have no own enumerable string keyed\n * properties.\n *\n * Array-like values such as `arguments` objects, arrays, buffers, strings, or\n * jQuery-like collections are considered empty if they have a `length` of `0`.\n * Similarly, maps and sets are considered empty if they have a `size` of `0`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is empty, else `false`.\n * @example\n *\n * _.isEmpty(null);\n * // => true\n *\n * _.isEmpty(true);\n * // => true\n *\n * _.isEmpty(1);\n * // => true\n *\n * _.isEmpty([1, 2, 3]);\n * // => false\n *\n * _.isEmpty({ 'a': 1 });\n * // => false\n */\nfunction isEmpty(value) {\n if (value == null) {\n return true;\n }\n if (isArrayLike(value) &&\n (isArray(value) || typeof value == 'string' || typeof value.splice == 'function' ||\n isBuffer(value) || isTypedArray(value) || isArguments(value))) {\n return !value.length;\n }\n var tag = getTag(value);\n if (tag == mapTag || tag == setTag) {\n return !value.size;\n }\n if (isPrototype(value)) {\n return !baseKeys(value).length;\n }\n for (var key in value) {\n if (hasOwnProperty.call(value, key)) {\n return false;\n }\n }\n return true;\n}\n\nexport default isEmpty;\n"],"x_google_ignoreList":[0],"mappings":";;AAUA,IAAI,IAAS,gBACT,IAAS,gBAMT,IAHc,OAAO,UAGQ;AAmCjC,SAAS,EAAQ,GAAO;CACtB,IAAI,KAAS,MACX,OAAO;CAET,IAAI,EAAY,CAAK,MAChB,EAAQ,CAAK,KAAK,OAAO,KAAS,YAAY,OAAO,EAAM,UAAU,cACpE,EAAS,CAAK,KAAK,EAAa,CAAK,KAAK,EAAY,CAAK,IAC/D,OAAO,CAAC,EAAM;CAEhB,IAAI,IAAMA,EAAO,CAAK;CACtB,IAAI,KAAO,KAAU,KAAO,GAC1B,OAAO,CAAC,EAAM;CAEhB,IAAI,EAAY,CAAK,GACnB,OAAO,CAAC,EAAS,CAAK,EAAE;CAE1B,KAAK,IAAI,KAAO,GACd,IAAI,EAAe,KAAK,GAAO,CAAG,GAChC,OAAO;CAGX,OAAO;AACT"}
|