@pie-element/ebsr 14.2.2-next.21 → 14.2.2-next.23
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/browser/author/index.js +1 -1
- package/dist/browser/controller/index.js +2 -2
- package/dist/browser/controller/index.js.map +1 -1
- package/dist/browser/delivery/index.js +2 -2
- package/dist/browser/{delivery-CZMH5za5.js → delivery-B_lBr7ub.js} +2 -2
- package/dist/browser/{delivery-CZMH5za5.js.map → delivery-B_lBr7ub.js.map} +1 -1
- package/dist/browser/editor-runtime/author/index.js +1 -1
- package/dist/browser/editor-runtime/controller/index.js +2 -2
- package/dist/browser/editor-runtime/controller/index.js.map +1 -1
- package/dist/browser/editor-runtime/delivery/index.js +2 -2
- package/dist/browser/editor-runtime/{delivery-edBBlfzN.js → delivery-Ds1r2pOg.js} +2 -2
- package/dist/browser/editor-runtime/{delivery-edBBlfzN.js.map → delivery-Ds1r2pOg.js.map} +1 -1
- package/dist/browser/editor-runtime/print/index.js +2 -2
- package/dist/browser/editor-runtime/{private-tags-BEb0kxjd.js → private-tags-DCe8DRO2.js} +12 -6
- package/dist/browser/editor-runtime/{private-tags-BEb0kxjd.js.map → private-tags-DCe8DRO2.js.map} +1 -1
- package/dist/browser/print/index.js +2 -2
- package/dist/browser/{private-tags-BjSAApWa.js → private-tags-Bahggn5q.js} +12 -6
- package/dist/browser/{private-tags-BjSAApWa.js.map → private-tags-Bahggn5q.js.map} +1 -1
- package/dist/index.iife.js +2 -2
- package/dist/private-tags.js +1 -1
- package/module/print.js +11 -5
- package/module/print.js.map +1 -1
- package/package.json +4 -4
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
(document.head || document.documentElement).appendChild(style);
|
|
17
17
|
}
|
|
18
18
|
})([["cb0f0518b022d739", (url) => "@font-face{font-family:Symbola;src:local(Symbola Regular),local(Symbola),url(\"" + url(() => new URL("../assets/Symbola-4c507403.woff2", import.meta.url)) + "\")format(\"woff2\")}.mq-editable-field{display:inline-block}.mq-editable-field .mq-cursor{z-index:1;border-left:1px solid #000;margin-left:-1px;padding:0;display:inline-block;position:relative}.mq-editable-field .mq-cursor.mq-blink{visibility:hidden}.mq-editable-field,.mq-math-mode .mq-editable-field{border:1px solid gray}.mq-editable-field.mq-focused,.mq-math-mode .mq-editable-field.mq-focused{border-color:#709ac0;border-radius:1px;box-shadow:0 0 1px 2px #8bd,inset 0 0 2px #6ae}.mq-math-mode .mq-editable-field{margin:1px}.mq-editable-field .mq-latex-command-input{color:inherit;border:1px solid gray;margin-left:2px;margin-right:1px;padding-right:1px;font-family:Courier New,monospace}.mq-editable-field .mq-latex-command-input.mq-empty{background:0 0}.mq-editable-field .mq-latex-command-input.mq-hasCursor{border-color:activeborder}.mq-editable-field.mq-empty:after,.mq-editable-field.mq-text-mode:after,.mq-math-mode .mq-empty:after,.mq-editable-field .mq-cursor:only-child:after,.mq-editable-field .mq-textarea+.mq-cursor:last-child:after{visibility:hidden;content:\"c\"}.mq-editable-field .mq-text-mode .mq-cursor:only-child:after{content:\"\"}.mq-editable-field.mq-text-mode{overflow:auto hidden}.mq-root-block,.mq-math-mode .mq-root-block{box-sizing:border-box;white-space:nowrap;vertical-align:middle;width:100%;padding:2px;display:inline-block;overflow:hidden}.mq-math-mode{font-variant:normal;font-size:115%;font-style:normal;font-weight:400;line-height:1;display:inline-block}.mq-math-mode .mq-non-leaf,.mq-math-mode .mq-scaled{display:inline-block}.mq-math-mode var,.mq-math-mode .mq-text-mode,.mq-math-mode .mq-nonSymbola{font-family:Times New Roman,Symbola,serif;line-height:.9}.mq-math-mode *{font-size:inherit;line-height:inherit;-webkit-user-select:none;user-select:none;box-sizing:border-box;border-color:#000;margin:0;padding:0}.mq-math-mode .mq-empty,.mq-math-mode.mq-empty{background:0 0}.mq-math-mode .mq-text-mode{white-space:pre;display:inline-block}.mq-math-mode .mq-text-mode.mq-hasCursor{min-width:1ex;margin:0 -.1em;padding:0 .1em;box-shadow:inset 0 .1em .2em #a9a9a9}.mq-math-mode .mq-font{font:1em Times New Roman,Symbola,serif}.mq-math-mode .mq-font *{font-family:inherit;font-style:inherit}.mq-math-mode b,.mq-math-mode b.mq-font{font-weight:bolder}.mq-math-mode var,.mq-math-mode i,.mq-math-mode i.mq-font{font-style:italic}.mq-math-mode var.mq-f{margin-left:.1em;margin-right:.2em}.mq-math-mode .mq-roman var.mq-f{margin:0}.mq-math-mode big{font-size:200%}.mq-math-mode .mq-int>big{vertical-align:-.16em;display:inline-block;transform:scaleX(.7)}.mq-math-mode .mq-int>.mq-supsub{vertical-align:-1.1em;padding-right:.2em;font-size:80%}.mq-math-mode .mq-int>.mq-supsub>.mq-sup>.mq-sup-inner{vertical-align:1.3em}.mq-math-mode .mq-int>.mq-supsub>.mq-sub{margin-left:-.35em}.mq-math-mode .mq-roman{font-style:normal}.mq-math-mode .mq-sans-serif{font-family:sans-serif,Symbola,serif}.mq-math-mode .mq-monospace{font-family:monospace,Symbola,serif}.mq-math-mode .mq-overleftrightarrow{margin-top:.35em;position:relative}.mq-math-mode .mq-overleftrightarrow .mq-overleftrightarrow-inner{text-align:center;border-top:.14em solid #4d4d4d;min-width:1em;margin:0 .1em;padding-top:.35em;display:inline-block;position:relative}.mq-math-mode .mq-overleftrightarrow .mq-overleftrightarrow-inner .mq-empty{min-width:1em;margin-top:.1em;display:inline-block}.mq-math-mode .mq-overleftrightarrow .mq-overleftrightarrow-inner .mq-overleftrightarrow-inner-right{text-align:right;font-family:LearnosityIconsRegular;font-size:.75em;line-height:1em;display:block;position:absolute;top:-.562em;right:-.4em}.mq-math-mode .mq-overleftrightarrow .mq-overleftrightarrow-inner .mq-overleftrightarrow-inner-left{text-align:left;font-family:LearnosityIconsRegular;font-size:.75em;line-height:1em;display:block;position:absolute;top:-.562em;left:-.4em}.mq-math-mode .mq-overline .mq-overline-inner{text-align:center;border-top:.14em solid #4d4d4d;margin-left:.1em;padding-top:.2em;padding-right:.1em;display:inline-block}.mq-math-mode .mq-overline .mq-overline-inner .mq-empty{min-width:1em;margin-top:.1em;display:inline-block}.mq-math-mode .mq-overline .mq-overline-inner .mq-overline-inner-right,.mq-math-mode .mq-overline .mq-overline-inner .mq-overline-inner-left{display:none}.mq-math-mode .mq-longdiv{padding-top:.2em}.mq-math-mode .mq-longdiv .mq-longdiv-curve-border{border-top-right-radius:100em;border-bottom-right-radius:100em;width:2px;max-width:2px;margin-right:-.12em;padding-top:.2em;font-size:1.4em;display:inline}.mq-math-mode .mq-longdiv .mq-longdiv-inner{text-align:center;border-top:1px solid gray;border-radius:0 0 0 10px;min-width:1em;margin-left:-.2em;margin-right:.15em;padding-top:.19em;padding-left:.44em;font-size:1em;display:inline}.mq-math-mode .mq-longdiv .mq-longdiv-inner .mq-empty{min-width:1.5em;display:inline-block}.mq-math-mode .mq-underline{border-bottom:1px solid #000;margin-bottom:1px}.mq-math-mode .mq-underline.mq-empty{min-width:1em}.mq-math-mode .mq-overarc{-moz-border-radius-topright:50% .3em;-moz-border-radius-topleft:50% .3em;border-top:1px solid #000;border-top-left-radius:50% .3em;border-top-right-radius:50% .3em;margin-top:1px;padding-top:.15em}.mq-math-mode .mq-overarrow{margin-top:.35em;position:relative}.mq-math-mode .mq-overarrow .mq-overarrow-inner{text-align:center;border-top:.14em solid #4d4d4d;min-width:1em;margin:0 .1em;padding-top:.35em;display:inline-block;position:relative}.mq-math-mode .mq-overarrow .mq-overarrow-inner .mq-empty{min-width:1em;margin-top:.1em;display:inline-block}.mq-math-mode .mq-overarrow .mq-overarrow-inner .mq-overarrow-inner-right{text-align:right;font-family:LearnosityIconsRegular;font-size:.75em;line-height:1em;display:block;position:absolute;top:-.562em;right:-.4em}.mq-math-mode .mq-overarrow .mq-overarrow-inner .mq-overarrow-inner-left{text-align:left;font-family:LearnosityIconsRegular;font-size:.75em;line-height:1em;display:none;position:absolute;top:-.562em;left:-.4em}.mq-math-mode .mq-overarrow.mq-arrow-left .mq-overarrow-inner .mq-overarrow-inner-right{display:none}.mq-math-mode .mq-overarrow.mq-arrow-left .mq-overarrow-inner .mq-overarrow-inner-left{display:block}.mq-math-mode .mq-overarrow.mq-arrow-both{vertical-align:text-bottom}.mq-math-mode .mq-overarrow.mq-arrow-both.mq-empty{min-height:1.23em}.mq-math-mode .mq-overarrow.mq-arrow-both.mq-empty:after{top:-.34em}.mq-math-mode .mq-overarrow.mq-arrow-both:before{filter:FlipH;-ms-filter:\"FlipH\";transform:scaleX(-1)}.mq-math-mode .mq-overarrow.mq-arrow-both:after{content:\"➤\";visibility:visible;text-align:right;font-size:.5em;line-height:0;display:block;position:relative;top:-2.3em}.mq-math-mode .mq-xarrow{text-align:center;vertical-align:.9em;padding:0 .2em;font-size:70%;position:relative}.mq-math-mode .mq-xarrow .mq-xarrow-over{border-bottom:1px solid #000;padding:.1em .1em .2em;display:block;position:relative}.mq-math-mode .mq-xarrow .mq-xarrow-under{float:left;margin-bottom:.2em;padding:0 .1em .2em;position:relative;top:.2em}.mq-math-mode .mq-xarrow .mq-xarrow-over:before{content:\"➤\";height:1em;font-size:.6em;display:block;position:absolute;bottom:-.62em;right:-.3em}.mq-math-mode .mq-xarrow.mq-arrow-left .mq-xarrow-over:before{filter:FlipH;-ms-filter:\"FlipH\";left:-.3em;right:auto;transform:scaleX(-1)}.mq-math-mode .mq-binary-operator{padding:0 .2em;display:inline-block}.mq-math-mode .mq-supsub{text-align:left;vertical-align:-.5em;font-size:90%}.mq-math-mode .mq-supsub.mq-sup-only{vertical-align:.5em}.mq-math-mode .mq-supsub.mq-sup-only .mq-sup{vertical-align:text-bottom;display:inline-block}.mq-math-mode .mq-supsub .mq-sup{display:block}.mq-math-mode .mq-supsub .mq-sub{float:left;display:block}.mq-math-mode .mq-supsub .mq-binary-operator{padding:0 .1em}.mq-math-mode .mq-supsub .mq-fraction{font-size:70%}.mq-math-mode sup.mq-nthroot{vertical-align:.8em;min-width:.5em;margin-left:.2em;margin-right:-.6em;font-size:80%}.mq-math-mode .mq-paren{vertical-align:top;transform-origin:50% .06em;padding:0 .1em}.mq-math-mode .mq-paren.mq-ghost{color:silver}.mq-math-mode .mq-paren+span{margin-top:.1em;margin-bottom:.1em}.mq-math-mode .mq-array{vertical-align:middle;text-align:center}.mq-math-mode .mq-array>span{display:block}.mq-math-mode .mq-operator-name{font-family:Symbola,Times New Roman,serif;font-style:normal;line-height:.9}.mq-math-mode var.mq-operator-name.mq-first{padding-left:.2em}.mq-math-mode var.mq-operator-name.mq-last,.mq-math-mode .mq-supsub.mq-after-operator-name{padding-right:.2em}.mq-math-mode .mq-fraction{text-align:center;vertical-align:-.4em;padding:0 .2em;font-size:90%}.mq-math-mode .mq-fraction,.mq-math-mode .mq-large-operator{display:-moz-groupbox}.mq-math-mode x:-moz-any-link{display:-moz-groupbox}.mq-math-mode .mq-fraction,.mq-math-mode .mq-large-operator,.mq-math-mode x:default{display:inline-block}.mq-math-mode x:-moz-any-link{display:inline-block}.mq-math-mode .mq-underset.mq-tilde-vector .mq-under{line-height:.6em}.mq-math-mode .mq-numerator,.mq-math-mode .mq-denominator,.mq-math-mode .mq-dot-recurring,.mq-math-mode .mq-over,.mq-math-mode .mq-under{display:block}.mq-math-mode .mq-numerator,.mq-math-mode .mq-over{margin-bottom:.2em;padding:0 .1em}.mq-math-mode .mq-denominator{float:right;border-top:1px solid;width:100%;padding:.3em .1em .1em}.mq-math-mode .mq-dot-recurring{text-align:center;height:.6em}.mq-math-mode .mq-overunder{text-align:center;position:relative;top:.01em}.mq-math-mode .mq-overunder .mq-font{font-family:inherit}.mq-math-mode .mq-overunder.mq-underset{vertical-align:text-top}.mq-math-mode .mq-overunder.mq-underset .mq-under,.mq-math-mode .mq-overunder.mq-overset .mq-over{font-size:.7em;display:block}.mq-math-mode .mq-sqrt-prefix{vertical-align:top;transform-origin:top;padding-top:0;position:relative;top:.1em}.mq-math-mode .mq-sqrt-stem{border-top:1px solid;margin-top:1px;margin-right:.1em;padding-top:1px;padding-left:.15em;padding-right:.2em}.mq-math-mode .mq-diacritic-above{text-align:center;line-height:.4em;display:block}.mq-math-mode .mq-diacritic-stem{text-align:center;display:block}.mq-math-mode .mq-hat-prefix{text-align:center;margin-bottom:-.7em;line-height:.95em;display:block;transform:scaleX(1.5)}.mq-math-mode .mq-hat-stem{display:block}.mq-math-mode .mq-large-operator{vertical-align:-.2em;text-align:center;vertical-align:middle;padding:.2em}.mq-math-mode .mq-large-operator .mq-from,.mq-math-mode .mq-large-operator big,.mq-math-mode .mq-large-operator .mq-to{display:block}.mq-math-mode .mq-large-operator .mq-from,.mq-math-mode .mq-large-operator .mq-to{font-size:80%}.mq-math-mode .mq-large-operator .mq-from{float:right;width:100%}.mq-math-mode .mq-lim{text-align:center}.mq-math-mode .mq-lim span{display:block}.mq-math-mode .mq-lim .mq-approaches{float:right;width:100%;font-size:80%}.mq-math-mode .mq-lim .mq-approaches span>span{display:inline}.mq-math-mode .mq-matrix{vertical-align:middle;margin-left:.1em;margin-right:.1em}.mq-math-mode .mq-matrix table{border-spacing:3px;border-collapse:separate;border-bottom:none;width:auto}.mq-math-mode .mq-matrix table.mq-rows-1{vertical-align:middle;margin-bottom:1px}.mq-math-mode .mq-matrix td{vertical-align:baseline;border:1px dotted #fff;width:auto;padding:.1em .3em}.mq-math-mode .mq-matrix td.mq-empty{border:1px dotted #000}.mq-math-mode .mq-abs{border-left:1px solid #000;border-right:1px solid #000;margin-left:.1em;margin-right:.1em;padding-left:.2em;padding-right:.2em}.mq-math-mode .mq-lrnplaceholder{margin-left:.05em;margin-right:.05em}.mq-math-mode .mq-parallelogram{margin-top:-.5em;line-height:1em;position:relative;overflow:hidden}.mq-math-mode .mq-parallelogram .mq-parallelogram-inner{font-size:2em;position:relative;top:.23em}.mq-math-mode,.mq-math-mode .mq-editable-field{cursor:text;font-family:Symbola,Times New Roman,serif}.mq-math-mode .mq-longdiv .mq-longdiv-curve-border,.mq-math-mode .mq-editable-field .mq-longdiv .mq-longdiv-curve-border{font-size:1.33em}.mq-overarrow{text-align:center;border-top:1px solid #000;min-width:.5em;margin-top:1px;padding-top:.2em}.mq-overarrow:before{content:\"➤\";text-align:right;font-size:.5em;line-height:0;display:block;position:relative;top:-.34em}.mq-overarrow.mq-arrow-left:before{filter:FlipH;-ms-filter:\"FlipH\";transform:scaleX(-1)}.mq-overarrow.mq-arrow-both{vertical-align:text-bottom}.mq-overarrow.mq-arrow-both.mq-empty{min-height:1.23em}.mq-overarrow.mq-arrow-both.mq-empty:after{top:-.34em}.mq-overarrow.mq-arrow-both:before{filter:FlipH;-ms-filter:\"FlipH\";transform:scaleX(-1)}.mq-overarrow.mq-arrow-both:after{content:\"➤\";visibility:visible;text-align:right;font-size:.5em;line-height:0;display:block;position:relative;top:-2.3em}.mq-math-mode .mq-selection,.mq-editable-field .mq-selection,.mq-math-mode .mq-selection .mq-non-leaf,.mq-editable-field .mq-selection .mq-non-leaf,.mq-math-mode .mq-selection .mq-scaled,.mq-editable-field .mq-selection .mq-scaled{color:highlighttext;border-color:highlighttext;background:highlight!important}.mq-math-mode .mq-selection .mq-matrixed,.mq-editable-field .mq-selection .mq-matrixed{background:#39f!important}.mq-math-mode .mq-selection .mq-matrixed-container,.mq-editable-field .mq-selection .mq-matrixed-container{filter:progid:DXImageTransform.Microsoft.Chroma(color=\"#3399FF\")!important}.mq-math-mode .mq-selection.mq-blur,.mq-editable-field .mq-selection.mq-blur,.mq-math-mode .mq-selection.mq-blur .mq-non-leaf,.mq-editable-field .mq-selection.mq-blur .mq-non-leaf,.mq-math-mode .mq-selection.mq-blur .mq-scaled,.mq-editable-field .mq-selection.mq-blur .mq-scaled,.mq-math-mode .mq-selection.mq-blur .mq-matrixed,.mq-editable-field .mq-selection.mq-blur .mq-matrixed{color:#000;border-color:#000;background:#d4d4d4!important}.mq-math-mode .mq-selection.mq-blur .mq-matrixed-container,.mq-editable-field .mq-selection.mq-blur .mq-matrixed-container{filter:progid:DXImageTransform.Microsoft.Chroma(color=\"#D4D4D4\")!important}.mq-editable-field .mq-textarea,.mq-math-mode .mq-textarea{-webkit-user-select:text;user-select:text;position:relative}.mq-editable-field .mq-textarea>textarea,.mq-math-mode .mq-textarea>textarea{opacity:0;overflow:hidden}.mq-editable-field .mq-textarea *,.mq-math-mode .mq-textarea *,.mq-editable-field .mq-selectable,.mq-math-mode .mq-selectable{-webkit-user-select:text;user-select:text;clip:rect(1em 1em 1em 1em);resize:none;box-sizing:content-box;width:1px;height:1px;position:absolute;transform:scale(0)}.mq-math-mode .mq-matrixed{background:#fff;display:inline-block}.mq-math-mode .mq-matrixed-container{filter:progid:DXImageTransform.Microsoft.Chroma(color=\"white\");margin-top:-.1em}.mq-math-mode .mq-matrix table{border-spacing:2px}button .mq-math-mode .mq-matrix table.mq-rows-2 td,button .mq-math-mode .mq-matrix table.mq-rows-3 td{width:.9em;font-size:.3em}button .mq-math-mode .mq-matrix table.mq-rows-2{margin-bottom:-2px}button .mq-math-mode .mq-matrix table.mq-rows-1{margin-bottom:3px}button .mq-math-mode .mq-matrix table.mq-rows-1 td{width:1.1em;margin-bottom:3px;font-size:.6em}button .mq-math-mode .mq-matrix .matrix-edit-content-row{text-align:center;vertical-align:middle;display:inline-block}button .mq-math-mode .mq-matrix .matrix-edit-content-row p{font-size:.7em}button .mq-math-mode .mq-matrix .matrix-edit-content-col{text-align:center;vertical-align:middle;display:inline-block}button .mq-math-mode .mq-matrix .matrix-edit-content-col p{padding:0 .15em;font-size:.7em}button .mq-math-mode .mq-matrix .mq-paren{padding:0;display:inline-block;transform:scale(1.13,1.77)}button .matrix-edit .mq-empty{width:.8em;margin:.1em;padding:.1em;font-size:.4em}\n"]]);
|
|
19
|
-
import { $ as e, A as t, At as n, B as r, Bt as i, C as a, Ct as o, D as s, Dt as c, Et as l, F as u, Ft as d, G as f, H as p, Ht as m, I as h, It as g, J as _, K as v, L as y, Lt as b, M as x, Mt as S, Nt as C, O as w, Ot as ee, P as T, Pt as te, Q as E, R as D, Rt as O, S as k, St as A, T as ne, Tt as re, U as ie, Ut as ae, V as oe, Vt as se, W as j, X as ce, Y as le, Z as ue, a as de, at as fe, b as pe, bt as me, c as he, ct as ge, d as _e, dt as ve, et as ye, f as be, ft as xe, gt as Se, ht as Ce, i as we, it as Te, j as Ee, jt as M, k as De, kt as Oe, l as ke, lt as Ae, m as je, mt as Me, nt as Ne, o as Pe, ot as Fe, p as Ie, pt as Le, q as Re, r as ze, rt as Be, s as Ve, st as He, t as Ue, tt as We, u as Ge, ut as Ke, w as qe, wt as Je, x as Ye, xt as N, y as Xe, z as Ze, zt as Qe } from "../private-tags-
|
|
19
|
+
import { $ as e, A as t, At as n, B as r, Bt as i, C as a, Ct as o, D as s, Dt as c, Et as l, F as u, Ft as d, G as f, H as p, Ht as m, I as h, It as g, J as _, K as v, L as y, Lt as b, M as x, Mt as S, Nt as C, O as w, Ot as ee, P as T, Pt as te, Q as E, R as D, Rt as O, S as k, St as A, T as ne, Tt as re, U as ie, Ut as ae, V as oe, Vt as se, W as j, X as ce, Y as le, Z as ue, a as de, at as fe, b as pe, bt as me, c as he, ct as ge, d as _e, dt as ve, et as ye, f as be, ft as xe, gt as Se, ht as Ce, i as we, it as Te, j as Ee, jt as M, k as De, kt as Oe, l as ke, lt as Ae, m as je, mt as Me, nt as Ne, o as Pe, ot as Fe, p as Ie, pt as Le, q as Re, r as ze, rt as Be, s as Ve, st as He, t as Ue, tt as We, u as Ge, ut as Ke, w as qe, wt as Je, x as Ye, xt as N, y as Xe, z as Ze, zt as Qe } from "../private-tags-Bahggn5q.js";
|
|
20
20
|
import { a as $e, c as et, d as tt, f as nt, h as rt, i as it, l as at, m as ot, n as st, o as ct, p as lt, r as ut, s as dt, t as ft, u as pt } from "../dist-CHbLnyuX.js";
|
|
21
21
|
import * as P from "react";
|
|
22
22
|
import F, { Component as mt, createContext as ht, createElement as gt, createRef as _t, forwardRef as vt, memo as yt, useCallback as bt, useContext as xt, useDebugValue as St, useEffect as Ct, useLayoutEffect as wt, useMemo as Tt, useRef as Et, useState as Dt, version as Ot } from "react";
|
|
@@ -55,7 +55,7 @@ async function d(e, t, n, r = "value") {
|
|
|
55
55
|
let a = l(e);
|
|
56
56
|
if (n && typeof n == "function") try {
|
|
57
57
|
let e = c(a.map((e) => e[r]));
|
|
58
|
-
u(e) ? console.error(`shuffledValues is an empty array - refusing to call updateSession. shuffledChoices: ${JSON.stringify(a)}, key: ${r}`) :
|
|
58
|
+
u(e) ? console.error(`shuffledValues is an empty array - refusing to call updateSession. shuffledChoices: ${JSON.stringify(a)}, key: ${r}`) : await n(t.id, t.element, { shuffledValues: e });
|
|
59
59
|
} catch (e) {
|
|
60
60
|
console.warn("Unable to save shuffled order for choices"), console.error(e);
|
|
61
61
|
}
|
|
@@ -63,7 +63,7 @@ async function d(e, t, n, r = "value") {
|
|
|
63
63
|
return a;
|
|
64
64
|
}
|
|
65
65
|
function f(e, t, n) {
|
|
66
|
-
return !!(e.lockChoiceOrder || n["@pie-element"]?.lockChoiceOrder
|
|
66
|
+
return !!(e.lockChoiceOrder || n?.["@pie-element"]?.lockChoiceOrder);
|
|
67
67
|
}
|
|
68
68
|
var p = /* @__PURE__ */ s({ enabled: () => m });
|
|
69
69
|
function m(e, t, n) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["../../../src/controller/defaults.ts","../../../../../shared/controller-utils/dist/index.js","../../../src/controller/utils.ts","../../../src/controller/index.ts"],"sourcesContent":["// @ts-nocheck\n/**\n * @synced-from pie-elements/packages/ebsr/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\nconst partModel = (base) => ({\n choiceMode: 'radio',\n choicePrefix: 'letters',\n choices: [],\n choicesLayout: 'vertical',\n feedbackEnabled: false,\n gridColumns: 2,\n prompt: '',\n promptEnabled: true,\n rationale: '',\n rationaleEnabled: true,\n spellCheckEnabled: true,\n studentInstructionsEnabled: true,\n teacherInstructions: '',\n teacherInstructionsEnabled: true,\n toolbarEditorPosition: 'bottom',\n ...base,\n});\n\nexport default {\n partLabels: true,\n partLabelType: 'Letters',\n partA: partModel(),\n partB: partModel(),\n};\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;\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;\n}\n//#endregion\nexport { a as getShuffledChoices, o as lockChoices, s as partialScoring };\n","// @ts-nocheck\n/**\n * @synced-from pie-elements/packages/ebsr/controller/src/utils.js\n * @auto-generated\n *\n * This file is automatically synced from pie-elements and converted to TypeScript.\n * Manual edits will be overwritten on next sync.\n * To make changes, edit the upstream JavaScript file and run sync again.\n */\n\nimport { isEqual } from '@pie-element/shared-lodash';\n\nexport const getCorrectResponse = (choices) =>\n choices &&\n choices\n .filter((c) => c.correct)\n .map((c) => c.value)\n .sort();\n\nexport const isResponseCorrect = (question, key, session) => {\n let correctResponse = getCorrectResponse(question.choices);\n\n if (session && session.value) {\n return isEqual((session.value[key].value || []).sort(), correctResponse);\n }\n\n return false;\n};\n","// @ts-nocheck\n/**\n * @synced-from pie-elements/packages/ebsr/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 defaults from './defaults.js';\nimport { lockChoices, getShuffledChoices, partialScoring } from '@pie-element/shared-controller-utils';\nimport { isResponseCorrect } from './utils.js';\nimport { get, isEmpty } from '@pie-element/shared-lodash';\nimport Translator from '@pie-lib/translator';\n\nconst { translator } = Translator;\n\nconst prepareChoice = (model, env, defaultFeedback) => (choice) => {\n const out = {\n label: choice.label,\n value: choice.value,\n };\n\n if (env.role === 'instructor' && (env.mode === 'view' || env.mode === 'evaluate')) {\n out.rationale = model.rationaleEnabled ? choice.rationale : null;\n } else {\n out.rationale = null;\n }\n\n if (env.mode === 'evaluate') {\n out.correct = !!choice.correct;\n\n if (model.feedbackEnabled) {\n const feedbackType = (choice.feedback && choice.feedback.type) || 'none';\n\n if (feedbackType === 'default') {\n out.feedback = defaultFeedback[choice.correct ? 'correct' : 'incorrect'];\n } else if (feedbackType === 'custom') {\n out.feedback = choice.feedback.value;\n }\n }\n }\n\n return out;\n};\n\nconst parsePart = (part, key, session, env) => {\n const defaultFeedback = Object.assign({ correct: 'Correct', incorrect: 'Incorrect' }, part.defaultFeedback);\n\n let choices = part.choices ? part.choices.map(prepareChoice(part, env, defaultFeedback)) : [];\n\n return {\n ...part,\n choices,\n disabled: env.mode !== 'gather',\n complete: {\n min: part.choices.filter((c) => c.correct).length,\n },\n responseCorrect: env.mode === 'evaluate' ? isResponseCorrect(part, key, session) : undefined,\n };\n};\n\nconst normalizePart = (model, base) => ({\n ...base,\n ...model,\n choicesLayout: model.choicesLayout || (model.verticalMode === false && 'horizontal') || 'vertical',\n});\n\nexport const normalize = ({ partA = {}, partB = {}, language, ...question }) => ({\n ...defaults,\n ...question,\n partA: normalizePart(partA, { ...defaults.partA, language }),\n partB: normalizePart(partB, { ...defaults.partB, language }),\n});\n\n/**\n *\n * @param {*} question\n * @param {*} session\n * @param {*} env\n * @param {*} updateSession - optional - a function that will set the properties passed into it on the session.\n */\nexport async function model(question, session, env, updateSession) {\n const normalizedQuestion = normalize(question);\n const partA = parsePart(normalizedQuestion.partA, 'partA', session, env);\n const partB = parsePart(normalizedQuestion.partB, 'partB', session, env);\n\n const shuffledValues = {};\n\n const us = (part) => (id, element, update) =>\n new Promise((resolve) => {\n shuffledValues[part] = update.shuffledValues;\n resolve();\n });\n\n const partASession = get(session, 'value.partA');\n const partALockChoiceOrder = lockChoices(normalizedQuestion.partA, partASession, env);\n\n const { choices: partAChoices } = partA || {};\n const { choices: partBChoices } = partB || {};\n\n if (!partALockChoiceOrder && partAChoices && partAChoices.length) {\n partA.choices = await getShuffledChoices(\n partAChoices,\n { shuffledValues: (session.shuffledValues || {}).partA },\n us('partA'),\n 'value',\n );\n }\n\n const partBSession = get(session, 'value.partB');\n const partBLockChoiceOrder = lockChoices(normalizedQuestion.partB, partBSession, env);\n\n if (!partBLockChoiceOrder && partBChoices && partBChoices.length) {\n partB.choices = await getShuffledChoices(\n partBChoices,\n { shuffledValues: (session.shuffledValues || {}).partB },\n us('partB'),\n 'value',\n );\n }\n\n if (!isEmpty(shuffledValues)) {\n if (updateSession && typeof updateSession === 'function') {\n updateSession(session.id, session.element, {\n shuffledValues,\n }).catch((e) => {\n // eslint-disable-next-line no-console\n console.error('update session failed', e);\n });\n }\n }\n\n if (normalizedQuestion.partLabels) {\n const language = normalizedQuestion.language;\n partA.partLabel = translator.t('ebsr.part', {\n lng: language,\n index: normalizedQuestion.partLabelType === 'Letters' ? 'A' : '1',\n });\n partB.partLabel = translator.t('ebsr.part', {\n lng: language,\n index: normalizedQuestion.partLabelType === 'Letters' ? 'B' : '2',\n });\n } else {\n partA.partLabel = undefined;\n partB.partLabel = undefined;\n }\n\n if (env.role === 'instructor' && (env.mode === 'view' || env.mode === 'evaluate')) {\n partA.teacherInstructions = normalizedQuestion.partA.teacherInstructionsEnabled\n ? normalizedQuestion.partA.teacherInstructions\n : null;\n partB.teacherInstructions = normalizedQuestion.partB.teacherInstructionsEnabled\n ? normalizedQuestion.partB.teacherInstructions\n : null;\n } else {\n partA.teacherInstructions = null;\n partB.teacherInstructions = null;\n }\n\n partA.prompt = normalizedQuestion.partA.promptEnabled ? normalizedQuestion.partA.prompt : null;\n partB.prompt = normalizedQuestion.partB.promptEnabled ? normalizedQuestion.partB.prompt : null;\n\n return new Promise((resolve) => {\n resolve({\n disabled: env.mode !== 'gather',\n mode: env.mode,\n extraCSSRules: normalizedQuestion.extraCSSRules,\n partA,\n partB,\n });\n });\n}\n\nexport const createDefaultModel = (model = {}) =>\n new Promise((resolve) => {\n resolve({\n ...defaults,\n ...model,\n });\n });\n\nconst isCorrect = (c) => c.correct === true;\n\nconst getScore = (config, sessionPart, key, partialScoringEnabled) => {\n const { choices = [] } = (config && config[key]) || {};\n const maxScore = choices.length;\n const { value: sessionPartValue } = sessionPart || {};\n\n const chosen = (c) => !!(sessionPartValue || []).find((v) => v === c.value);\n const correctAndNotChosen = (c) => isCorrect(c) && !chosen(c);\n const incorrectAndChosen = (c) => !isCorrect(c) && chosen(c);\n const correctChoices = choices.reduce((total, choice) => {\n if (correctAndNotChosen(choice) || incorrectAndChosen(choice)) {\n return total - 1;\n } else {\n return total;\n }\n }, choices.length);\n\n // determine score for a part\n if (!partialScoringEnabled && correctChoices < maxScore) {\n return 0;\n }\n\n return parseFloat(maxScore ? (correctChoices / maxScore).toFixed(2) : 0);\n};\n\n/**\n * Generates detailed trace log for math-templated scoring evaluation\n * @param {Object} question\n * @param {Object} session\n * @param {Object} env\n * @returns {Array<string>} traceLog\n */\nexport const getLogTrace = (question, session, env) => {\n const traceLog = [];\n\n if (!session || !session.value) {\n traceLog.push('Student did not answer the question.');\n return traceLog;\n }\n\n const { value } = session;\n const { partA, partB } = value;\n\n const partialScoringEnabled = partialScoring.enabled(question, env);\n\n traceLog.push(\n `Scoring method: ${partialScoringEnabled ? 'partial scoring' : 'all-or-nothing scoring'}.`\n );\n\n const partAquestionType =\n question.partA.choiceMode === 'radio'\n ? 'multiple-choice (radio)'\n : 'multiple-select (checkbox)';\n traceLog.push(`Part A question type: ${partAquestionType}.`);\n\n const partASelections = partA?.value || [];\n const partACorrectChoices = (question.partA.choices || []).filter((c) => c.correct);\n const partACorrectValues = partACorrectChoices.map((c) => c.value);\n const partACorrectSelected = partASelections.filter((v) => partACorrectValues.includes(v));\n const partAIncorrectSelected = partASelections.filter((v) => !partACorrectValues.includes(v));\n\n if (partASelections.length) {\n traceLog.push(\n `Part A: student selected ${partASelections.length} choice(s) (${partACorrectSelected.length} correct, ${partAIncorrectSelected.length} incorrect).`\n );\n }\n \n const scoreA = getScore(question, partA, 'partA', partialScoringEnabled);\n traceLog.push(`Part A score: ${scoreA}.`);\n\n const partBquestionType =\n question.partB.choiceMode === 'radio'\n ? 'multiple-choice (radio)'\n : 'multiple-select (checkbox)';\n traceLog.push(`Part B question type: ${partBquestionType}.`);\n\n const partBSelections = partB?.value || [];\n const partBCorrectChoices = (question.partB.choices || []).filter((c) => c.correct);\n const partBCorrectValues = partBCorrectChoices.map((c) => c.value);\n const correctSelected = partBSelections.filter((v) => partBCorrectValues.includes(v));\n const incorrectSelected = partBSelections.filter((v) => !partBCorrectValues.includes(v));\n\n if (partBSelections.length) {\n traceLog.push(\n `Part B: student selected ${partBSelections.length} choice(s) (${correctSelected.length} correct, ${incorrectSelected.length} incorrect).`\n );\n }\n\n const scoreB = getScore(question, partB, 'partB', partialScoringEnabled);\n traceLog.push(`Part B score: ${scoreB}.`);\n\n if (!partialScoringEnabled) {\n traceLog.push(\n 'Final score is awarded only if both Part A and Part B are completely correct.'\n );\n traceLog.push(`Final score: ${scoreA === 1 && scoreB === 1 ? 1 : 0}.`);\n } else {\n traceLog.push(\n 'With partial scoring enabled, Part A must be correct to earn any credit.'\n );\n\n let finalScore = 0;\n if (scoreA === 1 && scoreB === 1) {\n finalScore = 2;\n } else if (scoreA === 1 && scoreB < 1) {\n finalScore = 1;\n }\n\n traceLog.push(`Final score: ${finalScore}.`);\n }\n\n return traceLog;\n};\n\nexport function outcome(config, session, env) {\n return new Promise((resolve) => {\n const { value } = session || {};\n\n if (!session || !value) {\n resolve({ score: 0, scoreA: 0, scoreB: 0, empty: true, logTrace: ['Student did not answer the question.'] });\n }\n\n if (value) {\n const { partA, partB } = value || {};\n\n const partialScoringEnabled = partialScoring.enabled(config, env);\n\n const scoreA = getScore(config, partA, 'partA', partialScoringEnabled);\n const scoreB = getScore(config, partB, 'partB', partialScoringEnabled);\n const logTrace = getLogTrace(config, session, env);\n\n if (!partialScoringEnabled) {\n // The EBSR item is worth 1 point\n // That point is awarded if and only if both parts are fully correct, otherwise no points are awarded\n resolve({ score: scoreA === 1 && scoreB === 1 ? 1 : 0, scoreA, scoreB, max: 1, logTrace });\n } else {\n // The EBSR item is worth 2 points\n if (scoreA === 1) {\n if (scoreB === 1) {\n // If Part A and Part B are both correct, 2 points are awarded\n resolve({ score: 2, scoreA, scoreB, max: 2, logTrace });\n } else {\n // If Part A is correct and part B is incorrect, 1 point is awarded\n resolve({ score: 1, scoreA, scoreB, max: 2, logTrace });\n }\n } else {\n // For all other combinations, no points are awarded\n resolve({ score: 0, scoreA, scoreB, max: 2, logTrace });\n }\n }\n }\n });\n}\n\nconst returnPartCorrect = (choices) => {\n let answers = [];\n\n choices.forEach((i) => {\n const { correct, value } = i;\n if (correct) {\n answers.push(value);\n }\n });\n return answers;\n};\n\nexport const createCorrectResponseSession = (question, env) => {\n return new Promise((resolve) => {\n if (env.mode !== 'evaluate' && env.role === 'instructor') {\n const { partA, partB } = question;\n\n const partACorrect = returnPartCorrect(partA.choices);\n const partBCorrect = returnPartCorrect(partB.choices);\n\n resolve({\n value: {\n partA: {\n id: 'partA',\n value: partACorrect,\n },\n partB: {\n id: 'partB',\n value: partBCorrect,\n },\n },\n id: '1',\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\nconst validatePart = (model = {}, config = {}) => {\n const { choices } = model;\n const { minAnswerChoices = 2, maxAnswerChoices } = config;\n const reversedChoices = [...(choices || [])].reverse();\n const errors = {};\n const choicesErrors = {};\n const rationaleErrors = {};\n let hasCorrectResponse = false;\n\n ['teacherInstructions', 'prompt'].forEach((field) => {\n if (config[field]?.required && !getContent(model[field])) {\n errors[field] = 'This field is required.';\n }\n });\n\n reversedChoices.forEach((choice, index) => {\n const { correct, value, label, rationale } = choice;\n\n if (correct) {\n hasCorrectResponse = true;\n }\n\n if (!getContent(label)) {\n choicesErrors[value] = 'Content should not be empty.';\n } else {\n const identicalAnswer = reversedChoices.slice(index + 1).some((c) => c.label === label);\n\n if (identicalAnswer) {\n choicesErrors[value] = 'Content should be unique.';\n }\n }\n\n if (config.rationale?.required && !getContent(rationale)) {\n rationaleErrors[value] = 'This field is required.';\n }\n });\n\n const nbOfChoices = (choices || []).length;\n\n if (nbOfChoices < minAnswerChoices) {\n errors.answerChoices = `There should be at least ${minAnswerChoices} choices defined.`;\n } else if (nbOfChoices > maxAnswerChoices) {\n errors.answerChoices = `No more than ${maxAnswerChoices} choices should be defined.`;\n }\n\n if (!hasCorrectResponse) {\n errors.correctResponse = 'No correct response defined.';\n }\n\n if (!isEmpty(choicesErrors)) {\n errors.choices = choicesErrors;\n }\n\n if (!isEmpty(rationaleErrors)) {\n errors.rationale = rationaleErrors;\n }\n\n return errors;\n};\n\nexport const validate = (model = {}, config = {}) => {\n const { partA, partB } = model || {};\n const { partA: partAConfig, partB: partBConfig } = config || {};\n\n const partAErrors = validatePart(partA, partAConfig);\n const partBErrors = validatePart(partB, partBConfig);\n\n return { partA: partAErrors, partB: partBErrors };\n};\n"],"mappings":";;;AAUA,IAAM,KAAa,OAAU;CAC3B,YAAY;CACZ,cAAc;CACd,SAAS,CAAC;CACV,eAAe;CACf,iBAAiB;CACjB,aAAa;CACb,QAAQ;CACR,eAAe;CACf,WAAW;CACX,kBAAkB;CAClB,mBAAmB;CACnB,4BAA4B;CAC5B,qBAAqB;CACrB,4BAA4B;CAC5B,uBAAuB;CACvB,GAAG;AACL,IAEA,IAAe;CACb,YAAY;CACZ,eAAe;CACf,OAAO,EAAU;CACjB,OAAO,EAAU;AACnB,GCjCI,IAAI,OAAO,gBAAgB,KAAK,GAAG,MAAM;CAC5C,IAAI,IAAI,CAAC;CACT,KAAK,IAAI,KAAK,GAAG,EAAE,GAAG,GAAG;EACxB,KAAK,EAAE;EACP,YAAY,CAAC;CACd,CAAC;CACD,OAAO,KAAK,EAAE,GAAG,OAAO,aAAa,EAAE,OAAO,SAAS,CAAC,GAAG;AAC5D;AAGA,SAAS,EAAE,GAAG;CACb,OAAO,MAAM,QAAQ,CAAC,IAAI,EAAE,QAAQ,MAAM,KAAK,IAAI,IAAI,CAAC;AACzD;AACA,SAAS,EAAE,GAAG;CACb,IAAI,IAAI,CAAC,GAAG,CAAC;CACb,KAAK,IAAI,IAAI,EAAE,SAAS,GAAG,I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GAAI,KAAW,CAAC,CAAE,CAAC,CAAC,QAAQ,GAC/C,IAAS,CAAC,GACV,IAAgB,CAAC,GACjB,IAAkB,CAAC,GACrB,IAAqB;CAQzB,AANA,CAAC,uBAAuB,QAAQ,CAAC,CAAC,SAAS,MAAU;EACnD,AAAI,EAAO,EAAM,EAAE,YAAY,CAAC,EAAW,EAAM,EAAM,MACrD,EAAO,KAAS;CAEpB,CAAC,GAED,EAAgB,SAAS,GAAQ,MAAU;EACzC,IAAM,EAAE,YAAS,UAAO,UAAO,iBAAc;EAgB7C,AAdI,MACF,IAAqB,KAGlB,EAAW,CAAK,IAGK,EAAgB,MAAM,IAAQ,CAAC,CAAC,CAAC,MAAM,MAAM,EAAE,UAAU,CAE7E,MACF,EAAc,KAAS,+BALzB,EAAc,KAAS,gCASrB,EAAO,WAAW,YAAY,CAAC,EAAW,CAAS,MACrD,EAAgB,KAAS;CAE7B,CAAC;CAED,IAAM,KAAe,KAAW,CAAC,EAAA,CAAG;CAoBpC,OAlBI,IAAc,IAChB,EAAO,gBAAgB,4BAA4B,EAAiB,qBAC3D,IAAc,MACvB,EAAO,gBAAgB,gBAAgB,EAAiB,+BAGrD,MACH,EAAO,kBAAkB,iCAGtB,EAAQ,CAAa,MACxB,EAAO,UAAU,IAGd,EAAQ,CAAe,MAC1B,EAAO,YAAY,IAGd;AACT,GAEa,KAAY,IAAQ,CAAC,GAAG,IAAS,CAAC,MAAM;CACnD,IAAM,EAAE,UAAO,aAAU,KAAS,CAAC,GAC7B,EAAE,OAAO,GAAa,OAAO,MAAgB,KAAU,CAAC;CAK9D,OAAO;EAAE,OAHW,EAAa,GAAO,CAGxB;EAAa,OAFT,EAAa,GAAO,CAEJ;CAAY;AAClD"}
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../../src/controller/defaults.ts","../../../../../shared/controller-utils/dist/index.js","../../../src/controller/utils.ts","../../../src/controller/index.ts"],"sourcesContent":["// @ts-nocheck\n/**\n * @synced-from pie-elements/packages/ebsr/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\nconst partModel = (base) => ({\n choiceMode: 'radio',\n choicePrefix: 'letters',\n choices: [],\n choicesLayout: 'vertical',\n feedbackEnabled: false,\n gridColumns: 2,\n prompt: '',\n promptEnabled: true,\n rationale: '',\n rationaleEnabled: true,\n spellCheckEnabled: true,\n studentInstructionsEnabled: true,\n teacherInstructions: '',\n teacherInstructionsEnabled: true,\n toolbarEditorPosition: 'bottom',\n ...base,\n});\n\nexport default {\n partLabels: true,\n partLabelType: 'Letters',\n partA: partModel(),\n partB: partModel(),\n};\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;\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}`) : 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}\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;\n}\n//#endregion\nexport { a as getShuffledChoices, o as lockChoices, s as partialScoring };\n","// @ts-nocheck\n/**\n * @synced-from pie-elements/packages/ebsr/controller/src/utils.js\n * @auto-generated\n *\n * This file is automatically synced from pie-elements and converted to TypeScript.\n * Manual edits will be overwritten on next sync.\n * To make changes, edit the upstream JavaScript file and run sync again.\n */\n\nimport { isEqual } from '@pie-element/shared-lodash';\n\nexport const getCorrectResponse = (choices) =>\n choices &&\n choices\n .filter((c) => c.correct)\n .map((c) => c.value)\n .sort();\n\nexport const isResponseCorrect = (question, key, session) => {\n let correctResponse = getCorrectResponse(question.choices);\n\n if (session && session.value) {\n return isEqual((session.value[key].value || []).sort(), correctResponse);\n }\n\n return false;\n};\n","// @ts-nocheck\n/**\n * @synced-from pie-elements/packages/ebsr/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 defaults from './defaults.js';\nimport { lockChoices, getShuffledChoices, partialScoring } from '@pie-element/shared-controller-utils';\nimport { isResponseCorrect } from './utils.js';\nimport { get, isEmpty } from '@pie-element/shared-lodash';\nimport Translator from '@pie-lib/translator';\n\nconst { translator } = Translator;\n\nconst prepareChoice = (model, env, defaultFeedback) => (choice) => {\n const out = {\n label: choice.label,\n value: choice.value,\n };\n\n if (env.role === 'instructor' && (env.mode === 'view' || env.mode === 'evaluate')) {\n out.rationale = model.rationaleEnabled ? choice.rationale : null;\n } else {\n out.rationale = null;\n }\n\n if (env.mode === 'evaluate') {\n out.correct = !!choice.correct;\n\n if (model.feedbackEnabled) {\n const feedbackType = (choice.feedback && choice.feedback.type) || 'none';\n\n if (feedbackType === 'default') {\n out.feedback = defaultFeedback[choice.correct ? 'correct' : 'incorrect'];\n } else if (feedbackType === 'custom') {\n out.feedback = choice.feedback.value;\n }\n }\n }\n\n return out;\n};\n\nconst parsePart = (part, key, session, env) => {\n const defaultFeedback = Object.assign({ correct: 'Correct', incorrect: 'Incorrect' }, part.defaultFeedback);\n\n let choices = part.choices ? part.choices.map(prepareChoice(part, env, defaultFeedback)) : [];\n\n return {\n ...part,\n choices,\n disabled: env.mode !== 'gather',\n complete: {\n min: part.choices.filter((c) => c.correct).length,\n },\n responseCorrect: env.mode === 'evaluate' ? isResponseCorrect(part, key, session) : undefined,\n };\n};\n\nconst normalizePart = (model, base) => ({\n ...base,\n ...model,\n choicesLayout: model.choicesLayout || (model.verticalMode === false && 'horizontal') || 'vertical',\n});\n\nexport const normalize = ({ partA = {}, partB = {}, language, ...question }) => ({\n ...defaults,\n ...question,\n partA: normalizePart(partA, { ...defaults.partA, language }),\n partB: normalizePart(partB, { ...defaults.partB, language }),\n});\n\n/**\n *\n * @param {*} question\n * @param {*} session\n * @param {*} env\n * @param {*} updateSession - optional - a function that will set the properties passed into it on the session.\n */\nexport async function model(question, session, env, updateSession) {\n const normalizedQuestion = normalize(question);\n const partA = parsePart(normalizedQuestion.partA, 'partA', session, env);\n const partB = parsePart(normalizedQuestion.partB, 'partB', session, env);\n\n const shuffledValues = {};\n\n const us = (part) => (id, element, update) =>\n new Promise((resolve) => {\n shuffledValues[part] = update.shuffledValues;\n resolve();\n });\n\n const partASession = get(session, 'value.partA');\n const partALockChoiceOrder = lockChoices(normalizedQuestion.partA, partASession, env);\n\n const { choices: partAChoices } = partA || {};\n const { choices: partBChoices } = partB || {};\n\n if (!partALockChoiceOrder && partAChoices && partAChoices.length) {\n partA.choices = await getShuffledChoices(\n partAChoices,\n { shuffledValues: (session.shuffledValues || {}).partA },\n us('partA'),\n 'value',\n );\n }\n\n const partBSession = get(session, 'value.partB');\n const partBLockChoiceOrder = lockChoices(normalizedQuestion.partB, partBSession, env);\n\n if (!partBLockChoiceOrder && partBChoices && partBChoices.length) {\n partB.choices = await getShuffledChoices(\n partBChoices,\n { shuffledValues: (session.shuffledValues || {}).partB },\n us('partB'),\n 'value',\n );\n }\n\n if (!isEmpty(shuffledValues)) {\n if (updateSession && typeof updateSession === 'function') {\n updateSession(session.id, session.element, {\n shuffledValues,\n }).catch((e) => {\n // eslint-disable-next-line no-console\n console.error('update session failed', e);\n });\n }\n }\n\n if (normalizedQuestion.partLabels) {\n const language = normalizedQuestion.language;\n partA.partLabel = translator.t('ebsr.part', {\n lng: language,\n index: normalizedQuestion.partLabelType === 'Letters' ? 'A' : '1',\n });\n partB.partLabel = translator.t('ebsr.part', {\n lng: language,\n index: normalizedQuestion.partLabelType === 'Letters' ? 'B' : '2',\n });\n } else {\n partA.partLabel = undefined;\n partB.partLabel = undefined;\n }\n\n if (env.role === 'instructor' && (env.mode === 'view' || env.mode === 'evaluate')) {\n partA.teacherInstructions = normalizedQuestion.partA.teacherInstructionsEnabled\n ? normalizedQuestion.partA.teacherInstructions\n : null;\n partB.teacherInstructions = normalizedQuestion.partB.teacherInstructionsEnabled\n ? normalizedQuestion.partB.teacherInstructions\n : null;\n } else {\n partA.teacherInstructions = null;\n partB.teacherInstructions = null;\n }\n\n partA.prompt = normalizedQuestion.partA.promptEnabled ? normalizedQuestion.partA.prompt : null;\n partB.prompt = normalizedQuestion.partB.promptEnabled ? normalizedQuestion.partB.prompt : null;\n\n return new Promise((resolve) => {\n resolve({\n disabled: env.mode !== 'gather',\n mode: env.mode,\n extraCSSRules: normalizedQuestion.extraCSSRules,\n partA,\n partB,\n });\n });\n}\n\nexport const createDefaultModel = (model = {}) =>\n new Promise((resolve) => {\n resolve({\n ...defaults,\n ...model,\n });\n });\n\nconst isCorrect = (c) => c.correct === true;\n\nconst getScore = (config, sessionPart, key, partialScoringEnabled) => {\n const { choices = [] } = (config && config[key]) || {};\n const maxScore = choices.length;\n const { value: sessionPartValue } = sessionPart || {};\n\n const chosen = (c) => !!(sessionPartValue || []).find((v) => v === c.value);\n const correctAndNotChosen = (c) => isCorrect(c) && !chosen(c);\n const incorrectAndChosen = (c) => !isCorrect(c) && chosen(c);\n const correctChoices = choices.reduce((total, choice) => {\n if (correctAndNotChosen(choice) || incorrectAndChosen(choice)) {\n return total - 1;\n } else {\n return total;\n }\n }, choices.length);\n\n // determine score for a part\n if (!partialScoringEnabled && correctChoices < maxScore) {\n return 0;\n }\n\n return parseFloat(maxScore ? (correctChoices / maxScore).toFixed(2) : 0);\n};\n\n/**\n * Generates detailed trace log for math-templated scoring evaluation\n * @param {Object} question\n * @param {Object} session\n * @param {Object} env\n * @returns {Array<string>} traceLog\n */\nexport const getLogTrace = (question, session, env) => {\n const traceLog = [];\n\n if (!session || !session.value) {\n traceLog.push('Student did not answer the question.');\n return traceLog;\n }\n\n const { value } = session;\n const { partA, partB } = value;\n\n const partialScoringEnabled = partialScoring.enabled(question, env);\n\n traceLog.push(\n `Scoring method: ${partialScoringEnabled ? 'partial scoring' : 'all-or-nothing scoring'}.`\n );\n\n const partAquestionType =\n question.partA.choiceMode === 'radio'\n ? 'multiple-choice (radio)'\n : 'multiple-select (checkbox)';\n traceLog.push(`Part A question type: ${partAquestionType}.`);\n\n const partASelections = partA?.value || [];\n const partACorrectChoices = (question.partA.choices || []).filter((c) => c.correct);\n const partACorrectValues = partACorrectChoices.map((c) => c.value);\n const partACorrectSelected = partASelections.filter((v) => partACorrectValues.includes(v));\n const partAIncorrectSelected = partASelections.filter((v) => !partACorrectValues.includes(v));\n\n if (partASelections.length) {\n traceLog.push(\n `Part A: student selected ${partASelections.length} choice(s) (${partACorrectSelected.length} correct, ${partAIncorrectSelected.length} incorrect).`\n );\n }\n \n const scoreA = getScore(question, partA, 'partA', partialScoringEnabled);\n traceLog.push(`Part A score: ${scoreA}.`);\n\n const partBquestionType =\n question.partB.choiceMode === 'radio'\n ? 'multiple-choice (radio)'\n : 'multiple-select (checkbox)';\n traceLog.push(`Part B question type: ${partBquestionType}.`);\n\n const partBSelections = partB?.value || [];\n const partBCorrectChoices = (question.partB.choices || []).filter((c) => c.correct);\n const partBCorrectValues = partBCorrectChoices.map((c) => c.value);\n const correctSelected = partBSelections.filter((v) => partBCorrectValues.includes(v));\n const incorrectSelected = partBSelections.filter((v) => !partBCorrectValues.includes(v));\n\n if (partBSelections.length) {\n traceLog.push(\n `Part B: student selected ${partBSelections.length} choice(s) (${correctSelected.length} correct, ${incorrectSelected.length} incorrect).`\n );\n }\n\n const scoreB = getScore(question, partB, 'partB', partialScoringEnabled);\n traceLog.push(`Part B score: ${scoreB}.`);\n\n if (!partialScoringEnabled) {\n traceLog.push(\n 'Final score is awarded only if both Part A and Part B are completely correct.'\n );\n traceLog.push(`Final score: ${scoreA === 1 && scoreB === 1 ? 1 : 0}.`);\n } else {\n traceLog.push(\n 'With partial scoring enabled, Part A must be correct to earn any credit.'\n );\n\n let finalScore = 0;\n if (scoreA === 1 && scoreB === 1) {\n finalScore = 2;\n } else if (scoreA === 1 && scoreB < 1) {\n finalScore = 1;\n }\n\n traceLog.push(`Final score: ${finalScore}.`);\n }\n\n return traceLog;\n};\n\nexport function outcome(config, session, env) {\n return new Promise((resolve) => {\n const { value } = session || {};\n\n if (!session || !value) {\n resolve({ score: 0, scoreA: 0, scoreB: 0, empty: true, logTrace: ['Student did not answer the question.'] });\n }\n\n if (value) {\n const { partA, partB } = value || {};\n\n const partialScoringEnabled = partialScoring.enabled(config, env);\n\n const scoreA = getScore(config, partA, 'partA', partialScoringEnabled);\n const scoreB = getScore(config, partB, 'partB', partialScoringEnabled);\n const logTrace = getLogTrace(config, session, env);\n\n if (!partialScoringEnabled) {\n // The EBSR item is worth 1 point\n // That point is awarded if and only if both parts are fully correct, otherwise no points are awarded\n resolve({ score: scoreA === 1 && scoreB === 1 ? 1 : 0, scoreA, scoreB, max: 1, logTrace });\n } else {\n // The EBSR item is worth 2 points\n if (scoreA === 1) {\n if (scoreB === 1) {\n // If Part A and Part B are both correct, 2 points are awarded\n resolve({ score: 2, scoreA, scoreB, max: 2, logTrace });\n } else {\n // If Part A is correct and part B is incorrect, 1 point is awarded\n resolve({ score: 1, scoreA, scoreB, max: 2, logTrace });\n }\n } else {\n // For all other combinations, no points are awarded\n resolve({ score: 0, scoreA, scoreB, max: 2, logTrace });\n }\n }\n }\n });\n}\n\nconst returnPartCorrect = (choices) => {\n let answers = [];\n\n choices.forEach((i) => {\n const { correct, value } = i;\n if (correct) {\n answers.push(value);\n }\n });\n return answers;\n};\n\nexport const createCorrectResponseSession = (question, env) => {\n return new Promise((resolve) => {\n if (env.mode !== 'evaluate' && env.role === 'instructor') {\n const { partA, partB } = question;\n\n const partACorrect = returnPartCorrect(partA.choices);\n const partBCorrect = returnPartCorrect(partB.choices);\n\n resolve({\n value: {\n partA: {\n id: 'partA',\n value: partACorrect,\n },\n partB: {\n id: 'partB',\n value: partBCorrect,\n },\n },\n id: '1',\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\nconst validatePart = (model = {}, config = {}) => {\n const { choices } = model;\n const { minAnswerChoices = 2, maxAnswerChoices } = config;\n const reversedChoices = [...(choices || [])].reverse();\n const errors = {};\n const choicesErrors = {};\n const rationaleErrors = {};\n let hasCorrectResponse = false;\n\n ['teacherInstructions', 'prompt'].forEach((field) => {\n if (config[field]?.required && !getContent(model[field])) {\n errors[field] = 'This field is required.';\n }\n });\n\n reversedChoices.forEach((choice, index) => {\n const { correct, value, label, rationale } = choice;\n\n if (correct) {\n hasCorrectResponse = true;\n }\n\n if (!getContent(label)) {\n choicesErrors[value] = 'Content should not be empty.';\n } else {\n const identicalAnswer = reversedChoices.slice(index + 1).some((c) => c.label === label);\n\n if (identicalAnswer) {\n choicesErrors[value] = 'Content should be unique.';\n }\n }\n\n if (config.rationale?.required && !getContent(rationale)) {\n rationaleErrors[value] = 'This field is required.';\n }\n });\n\n const nbOfChoices = (choices || []).length;\n\n if (nbOfChoices < minAnswerChoices) {\n errors.answerChoices = `There should be at least ${minAnswerChoices} choices defined.`;\n } else if (nbOfChoices > maxAnswerChoices) {\n errors.answerChoices = `No more than ${maxAnswerChoices} choices should be defined.`;\n }\n\n if (!hasCorrectResponse) {\n errors.correctResponse = 'No correct response defined.';\n }\n\n if (!isEmpty(choicesErrors)) {\n errors.choices = choicesErrors;\n }\n\n if (!isEmpty(rationaleErrors)) {\n errors.rationale = rationaleErrors;\n }\n\n return errors;\n};\n\nexport const validate = (model = {}, config = {}) => {\n const { partA, partB } = model || {};\n const { partA: partAConfig, partB: partBConfig } = config || {};\n\n const partAErrors = validatePart(partA, partAConfig);\n const partBErrors = validatePart(partB, partBConfig);\n\n return { partA: partAErrors, partB: partBErrors };\n};\n"],"mappings":";;;AAUA,IAAM,KAAa,OAAU;CAC3B,YAAY;CACZ,cAAc;CACd,SAAS,CAAC;CACV,eAAe;CACf,iBAAiB;CACjB,aAAa;CACb,QAAQ;CACR,eAAe;CACf,WAAW;CACX,kBAAkB;CAClB,mBAAmB;CACnB,4BAA4B;CAC5B,qBAAqB;CACrB,4BAA4B;CAC5B,uBAAuB;CACvB,GAAG;AACL,IAEA,IAAe;CACb,YAAY;CACZ,eAAe;CACf,OAAO,EAAU;CACjB,OAAO,EAAU;AACnB,GCjCI,IAAI,OAAO,gBAAgB,KAAK,GAAG,MAAM;CAC5C,IAAI,IAAI,CAAC;CACT,KAAK,IAAI,KAAK,GAAG,EAAE,GAAG,GAAG;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Aa,OAAO,MAAgB,KAAU,CAAC;CAK9D,OAAO;EAAE,OAHW,EAAa,GAAO,CAGxB;EAAa,OAFT,EAAa,GAAO,CAEJ;CAAY;AAClD"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { L as e, Ut as t, n } from "../private-tags-
|
|
2
|
-
import { n as r, t as i } from "../delivery-
|
|
1
|
+
import { L as e, Ut as t, n } from "../private-tags-Bahggn5q.js";
|
|
2
|
+
import { n as r, t as i } from "../delivery-B_lBr7ub.js";
|
|
3
3
|
import { m as a } from "../dist-CHbLnyuX.js";
|
|
4
4
|
//#region src/delivery/index.tsx
|
|
5
5
|
var o = /* @__PURE__ */ t(e(), 1), s = r.TYPE, c = n, l = (0, o.default)("pie-elements:ebsr"), u = class extends i {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Bt as e, E as t, F as n, L as r, N as i, Rt as a, Ut as o, _ as s, _t as c, c as l, h as u, i as d, l as f, o as p, r as m, v as h, vt as g, xt as _, yt as v } from "./private-tags-
|
|
1
|
+
import { Bt as e, E as t, F as n, L as r, N as i, Rt as a, Ut as o, _ as s, _t as c, c as l, h as u, i as d, l as f, o as p, r as m, v as h, vt as g, xt as _, yt as v } from "./private-tags-Bahggn5q.js";
|
|
2
2
|
import { t as y } from "./dist-DCmVXYeO.js";
|
|
3
3
|
import { c as b } from "./dist-CHbLnyuX.js";
|
|
4
4
|
import x, { useRef as S } from "react";
|
|
@@ -1339,4 +1339,4 @@ var _t = class extends HTMLElement {
|
|
|
1339
1339
|
//#endregion
|
|
1340
1340
|
export { F as n, _t as t };
|
|
1341
1341
|
|
|
1342
|
-
//# sourceMappingURL=delivery-
|
|
1342
|
+
//# sourceMappingURL=delivery-B_lBr7ub.js.map
|