@pie-element/math-inline 13.0.1-next.20261005143122 → 13.0.1-next.20261005184705

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (26) hide show
  1. package/dist/browser/author/index.js +114 -114
  2. package/dist/browser/controller/index.js +1790 -1783
  3. package/dist/browser/controller/index.js.map +1 -1
  4. package/dist/browser/delivery/index.js +2 -2
  5. package/dist/browser/{dist-DlDszPNG.js → dist-BSMFBCe4.js} +134 -80
  6. package/dist/browser/{dist-DlDszPNG.js.map → dist-BSMFBCe4.js.map} +1 -1
  7. package/dist/browser/{dist-DSPzw5it.js → dist-y7zGmIaN.js} +19 -19
  8. package/dist/browser/{dist-DSPzw5it.js.map → dist-y7zGmIaN.js.map} +1 -1
  9. package/dist/browser/editor-runtime/author/index.js +99 -99
  10. package/dist/browser/editor-runtime/controller/index.js +1790 -1783
  11. package/dist/browser/editor-runtime/controller/index.js.map +1 -1
  12. package/dist/browser/editor-runtime/delivery/index.js +2 -2
  13. package/dist/browser/editor-runtime/{dist-B4CCFlXQ.js → dist-CtQy-p2t.js} +134 -80
  14. package/dist/browser/editor-runtime/{dist-B4CCFlXQ.js.map → dist-CtQy-p2t.js.map} +1 -1
  15. package/dist/browser/editor-runtime/{dist-BnPPzKvW.js → dist-DFdq_uix.js} +19 -19
  16. package/dist/browser/editor-runtime/{dist-BnPPzKvW.js.map → dist-DFdq_uix.js.map} +1 -1
  17. package/dist/browser/editor-runtime/{main-DVHHj2aw.js → main-DKbNiOUm.js} +23 -23
  18. package/dist/browser/editor-runtime/{main-DVHHj2aw.js.map → main-DKbNiOUm.js.map} +1 -1
  19. package/dist/browser/editor-runtime/print/index.js +5 -5
  20. package/dist/browser/{main-XWAUep8c.js → main-DvE7ImL0.js} +23 -23
  21. package/dist/browser/{main-XWAUep8c.js.map → main-DvE7ImL0.js.map} +1 -1
  22. package/dist/browser/print/index.js +5 -5
  23. package/dist/index.iife.js +11 -11
  24. package/module/print.js +5698 -5690
  25. package/module/print.js.map +1 -1
  26. package/package.json +9 -9
@@ -1,6 +1,6 @@
1
1
  import { i as e, o as t, t as n } from "../rolldown-runtime-DY7j01NX.js";
2
- import { a as r, d as i, i as a, m as o, n as s, o as c, p as l, r as u, s as d, t as f, u as p } from "../dist-DlDszPNG.js";
3
- import { $ as m, A as h, At as g, B as _, Ct as v, D as y, Dt as b, E as x, Et as S, F as C, G as w, H as ee, I as T, J as E, K as D, N as te, O, Ot as ne, P as re, Q as ie, R as ae, St as oe, Tt as k, U as se, V as ce, W as le, X as ue, Y as A, Z as de, _t as fe, a as pe, at as me, b as he, bt as ge, c as _e, ct as ve, d as ye, dt as be, et as xe, g as Se, gt as j, h as Ce, ht as we, i as M, it as Te, j as Ee, k as De, kt as Oe, l as ke, lt as Ae, m as je, n as Me, nt as Ne, o as Pe, ot as Fe, p as Ie, pt as N, q as Le, r as Re, rt as ze, s as Be, st as Ve, t as He, tt as P, u as Ue, ut as We, v as Ge, vt as Ke, wt as qe, x as Je, xt as Ye, y as Xe, yt as Ze, z as Qe } from "../dist-DSPzw5it.js";
2
+ import { c as r, f as i, i as a, l as o, m as s, o as c, p as l, r as u, s as d, t as f, u as p } from "../dist-BSMFBCe4.js";
3
+ import { $ as m, A as h, At as g, B as _, Ct as v, D as y, Dt as b, E as x, Et as S, F as C, G as w, H as ee, I as T, J as E, K as D, N as te, O, Ot as ne, P as re, Q as ie, R as ae, St as oe, Tt as k, U as se, V as ce, W as le, X as ue, Y as A, Z as de, _t as fe, a as pe, at as me, b as he, bt as ge, c as _e, ct as ve, d as ye, dt as be, et as xe, g as Se, gt as j, h as Ce, ht as we, i as M, it as Te, j as Ee, k as De, kt as Oe, l as ke, lt as Ae, m as je, n as Me, nt as Ne, o as Pe, ot as Fe, p as Ie, pt as N, q as Le, r as Re, rt as ze, s as Be, st as Ve, t as He, tt as P, u as Ue, ut as We, v as Ge, vt as Ke, wt as qe, x as Je, xt as Ye, y as Xe, yt as Ze, z as Qe } from "../dist-y7zGmIaN.js";
4
4
  import * as F from "react";
5
5
  import I, { Component as $e, createContext as et, createElement as tt, createRef as nt, forwardRef as rt, memo as it, useCallback as at, useContext as ot, useDebugValue as st, useEffect as L, useId as ct, useLayoutEffect as lt, useMemo as ut, useRef as dt, useState as ft, version as pt } from "react";
6
6
  import { createRoot as mt } from "react-dom/client";
@@ -159,7 +159,7 @@ var bt = {
159
159
  ...m.style
160
160
  }
161
161
  });
162
- }), B = /* @__PURE__ */ t(g(), 1), Et = /* @__PURE__ */ t(o(), 1), { commonMqFontStyles: Dt, longdivStyles: Ot, supsubStyles: kt } = je.CommonMqStyles, At = (0, Et.default)("@pie-lib:math-toolbar:math-preview"), jt = j("div")(({ theme: e, isSelected: t }) => ({
162
+ }), B = /* @__PURE__ */ t(g(), 1), Et = /* @__PURE__ */ t(s(), 1), { commonMqFontStyles: Dt, longdivStyles: Ot, supsubStyles: kt } = je.CommonMqStyles, At = (0, Et.default)("@pie-lib:math-toolbar:math-preview"), jt = j("div")(({ theme: e, isSelected: t }) => ({
163
163
  display: "inline-flex",
164
164
  alignItems: "center",
165
165
  position: "relative",
@@ -3599,30 +3599,30 @@ var Qi = (0, Et.default)("@pie-lib:editable-html:plugins"), $i = [
3599
3599
  "blockquote"
3600
3600
  ].includes(e)), na = (e, t, n) => {
3601
3601
  Qi("[buildPlugins] opts: ", n), e ||= ta;
3602
- let i = (t, n = !0) => e.includes(t) && n && t, a = n.image && n.image.delete, o = n.math, s = n.responseArea && n.responseArea.type, c = !r(n.extraCSSRules), l = n?.languageCharacters || [];
3602
+ let r = (t, n = !0) => e.includes(t) && n && t, i = n.image && n.image.delete, a = n.math, o = n.responseArea && n.responseArea.type, s = !u(n.extraCSSRules), c = n?.languageCharacters || [];
3603
3603
  return p([
3604
- i("table"),
3605
- i("bold"),
3606
- i("italic"),
3607
- i("strikethrough"),
3608
- i("underline"),
3609
- i("superscript"),
3610
- i("subscript"),
3611
- i("image", !!a),
3612
- i("video"),
3613
- i("audio"),
3614
- i("math", !!o),
3615
- ...l.map((e) => i("languageCharacters", e)),
3616
- i("text-align"),
3617
- i("blockquote"),
3618
- i("h3"),
3619
- i("bulleted-list"),
3620
- i("numbered-list"),
3621
- i("undo"),
3622
- i("redo"),
3623
- i("responseArea", !!s),
3624
- i("css", !!c),
3625
- i("html", !!n.html)
3604
+ r("table"),
3605
+ r("bold"),
3606
+ r("italic"),
3607
+ r("strikethrough"),
3608
+ r("underline"),
3609
+ r("superscript"),
3610
+ r("subscript"),
3611
+ r("image", !!i),
3612
+ r("video"),
3613
+ r("audio"),
3614
+ r("math", !!a),
3615
+ ...c.map((e) => r("languageCharacters", e)),
3616
+ r("text-align"),
3617
+ r("blockquote"),
3618
+ r("h3"),
3619
+ r("bulleted-list"),
3620
+ r("numbered-list"),
3621
+ r("undo"),
3622
+ r("redo"),
3623
+ r("responseArea", !!o),
3624
+ r("css", !!s),
3625
+ r("html", !!n.html)
3626
3626
  ]);
3627
3627
  }, ra = /mso-list:\s*(l\d+)\s+level(\d+)/i, ia = /^\(?(?:\d+(?:\.\d+)*|[a-z]+|[A-Z]+)[.)]$|^\d+(?:\.\d+)+$/, aa = /^[ivxlcdm]+$/i, oa = {
3628
3628
  i: 1,
@@ -18667,7 +18667,7 @@ var Nw = (e, t, n, r) => {
18667
18667
  }), i.isDone = !0, e.view.dispatch(i);
18668
18668
  }, Pw = (e, t, n) => {
18669
18669
  let { tr: r } = e.state;
18670
- r.setNodeMarkup(n.pos, void 0, c(t.attrs, ["value", "id"])), r.isDone = !0, e.view.dispatch(r);
18670
+ r.setNodeMarkup(n.pos, void 0, o(t.attrs, ["value", "id"])), r.isDone = !0, e.view.dispatch(r);
18671
18671
  }, Fw = (e) => {
18672
18672
  let { editor: t, node: n, getPos: r, options: i, selected: a } = e, { attrs: o } = n, { inTable: s } = o, c = r();
18673
18673
  return /* @__PURE__ */ R(RS, {
@@ -19667,7 +19667,7 @@ var bT = j(kr, { shouldForwardProp: (e) => e !== "hideProgress" })(({ hideProgre
19667
19667
  display: "none"
19668
19668
  })), TT = (e) => e ? `${e}px` : "calc(20px)";
19669
19669
  function ET(e) {
19670
- let { node: t, editor: n, attributes: r, onFocus: i, getPos: a, selected: o, options: s, maxImageWidth: c = 700, maxImageHeight: l = 900 } = e, { alt: u } = t.attrs, d = a(), p = n.state.selection.from, m = n.state.selection.to, h = ut(() => p + t.nodeSize === m, [
19670
+ let { node: t, editor: n, attributes: r, onFocus: i, getPos: o, selected: s, options: c, maxImageWidth: l = 700, maxImageHeight: u = 900 } = e, { alt: d } = t.attrs, f = o(), p = n.state.selection.from, m = n.state.selection.to, h = ut(() => p + t.nodeSize === m, [
19671
19671
  p,
19672
19672
  m,
19673
19673
  t.nodeSize
@@ -19698,13 +19698,13 @@ function ET(e) {
19698
19698
  L(() => {
19699
19699
  v.current = {
19700
19700
  ...t,
19701
- pos: d
19701
+ pos: f
19702
19702
  };
19703
- }, [t, d]), L(() => {
19704
- o ? h && n.isEditable && (!String(t.attrs?.src ?? "").trim() && s.imageHandling?.insertImageRequested && s.imageHandling.insertImageRequested(n, [t, d], (e) => new lT(n, [t, d], e)), _(o)) : _(o);
19703
+ }, [t, f]), L(() => {
19704
+ s ? h && n.isEditable && (!String(t.attrs?.src ?? "").trim() && c.imageHandling?.insertImageRequested && c.imageHandling.insertImageRequested(n, [t, f], (e) => new lT(n, [t, f], e)), _(s)) : _(s);
19705
19705
  }, [
19706
19706
  h,
19707
- o,
19707
+ s,
19708
19708
  n.isEditable
19709
19709
  ]), L(() => {
19710
19710
  ee();
@@ -19718,13 +19718,13 @@ function ET(e) {
19718
19718
  let T = at(() => {
19719
19719
  let e = y.current;
19720
19720
  if (e && (!e.style.width || e.style.width === "calc(20px)")) {
19721
- let n = Math.min(e.naturalWidth, c), r = Math.min(e.naturalHeight, l);
19721
+ let n = Math.min(e.naturalWidth, l), r = Math.min(e.naturalHeight, u);
19722
19722
  e.style.width = `${n}px`, e.style.height = `${r}px`;
19723
19723
  let i = {
19724
19724
  width: n,
19725
19725
  height: r
19726
19726
  };
19727
- f(i, {
19727
+ a(i, {
19728
19728
  width: t.attrs.width,
19729
19729
  height: t.attrs.height
19730
19730
  }) || w(i);
@@ -19732,8 +19732,8 @@ function ET(e) {
19732
19732
  }, [
19733
19733
  t.attrs.width,
19734
19734
  t.attrs.height,
19735
- c,
19736
19735
  l,
19736
+ u,
19737
19737
  w
19738
19738
  ]), E = (e, t, n = !0, r) => {
19739
19739
  if (n) {
@@ -19789,7 +19789,7 @@ function ET(e) {
19789
19789
  onDragStart: (e) => e.preventDefault(),
19790
19790
  children: [/* @__PURE__ */ R(CT, {
19791
19791
  ...r,
19792
- active: o && t.attrs.loaded,
19792
+ active: s && t.attrs.loaded,
19793
19793
  draggable: !1,
19794
19794
  ref: y,
19795
19795
  src: t.attrs.src,
@@ -19813,16 +19813,16 @@ function ET(e) {
19813
19813
  children: /* @__PURE__ */ R(vx, {
19814
19814
  showDone: !0,
19815
19815
  deletable: !0,
19816
- toolbarOpts: s.toolbarOpts || {},
19816
+ toolbarOpts: c.toolbarOpts || {},
19817
19817
  onDelete: () => {
19818
19818
  let e = C();
19819
- e !== null && (s.imageHandling?.onDelete?.(v.current), n.view.dispatch(n.state.tr.delete(e, e + n.state.doc.nodeAt(e).nodeSize)), _(!1), n.commands.focus());
19819
+ e !== null && (c.imageHandling?.onDelete?.(v.current), n.view.dispatch(n.state.tr.delete(e, e + n.state.doc.nodeAt(e).nodeSize)), _(!1), n.commands.focus());
19820
19820
  },
19821
19821
  onDone: () => {
19822
- _(!1), s.imageHandling?.onDone?.(n), n.commands.focus("end");
19822
+ _(!1), c.imageHandling?.onDone?.(n), n.commands.focus("end");
19823
19823
  },
19824
19824
  children: /* @__PURE__ */ R(yT, {
19825
- disableImageAlignmentButtons: s.imageHandling?.disableImageAlignmentButtons,
19825
+ disableImageAlignmentButtons: c.imageHandling?.disableImageAlignmentButtons,
19826
19826
  alt: t.attrs.alt,
19827
19827
  imageLoaded: t.attrs.loaded,
19828
19828
  alignment: t.attrs.alignment || "left",
@@ -22193,51 +22193,51 @@ var aD = DE.extend({ content: "(div | paragraph | heading | bulletList | ordered
22193
22193
  kD.propTypes = { letter: B.default.string };
22194
22194
  function AD({ editor: e, opts: t, onClose: n }) {
22195
22195
  if (!t?.characters?.length) return null;
22196
- let r = dt(null), a = dt(n), [o, s] = ft({
22196
+ let r = dt(null), i = dt(n), [a, o] = ft({
22197
22197
  top: 0,
22198
22198
  left: 0
22199
- }), [c, l] = ft(null);
22200
- a.current = n;
22201
- let u = ut(() => {
22199
+ }), [s, c] = ft(null);
22200
+ i.current = n;
22201
+ let l = ut(() => {
22202
22202
  if (!t) return uD;
22203
22203
  switch (!0) {
22204
22204
  case t.language === "spanish": return uD;
22205
22205
  case t.language === "special": return dD;
22206
22206
  default: return t;
22207
22207
  }
22208
- }, [t]), d = ut(() => u.characters.reduce((e, t) => (t.length >= e.columns && (e.columns = t.length), e), {
22209
- rows: u.characters.length,
22208
+ }, [t]), u = ut(() => l.characters.reduce((e, t) => (t.length >= e.columns && (e.columns = t.length), e), {
22209
+ rows: l.characters.length,
22210
22210
  columns: 0
22211
- }), [u]), f = () => l(null);
22211
+ }), [l]), f = () => c(null);
22212
22212
  L(() => () => {
22213
22213
  f();
22214
22214
  }, []), L(() => {
22215
22215
  if (!e) return;
22216
- let t = e.options.element, n = e.view.dom, i = () => {
22216
+ let t = e.options.element, n = e.view.dom, a = () => {
22217
22217
  if (!r.current) return;
22218
- let n = t.getBoundingClientRect(), { from: i } = e.state.selection, a = e.view.coordsAtPos(i), o = r.current.offsetHeight, c = r.current.offsetWidth, l = window.innerHeight - (n.bottom + 60) >= o || n.top < o + 80 ? n.bottom + 60 : n.top - o - 20, u = a.left;
22219
- l = Math.max(8, Math.min(l, window.innerHeight - o - 8)), u = Math.max(8, Math.min(u, window.innerWidth - c - 8)), s({
22218
+ let n = t.getBoundingClientRect(), { from: i } = e.state.selection, a = e.view.coordsAtPos(i), s = r.current.offsetHeight, c = r.current.offsetWidth, l = window.innerHeight - (n.bottom + 60) >= s || n.top < s + 80 ? n.bottom + 60 : n.top - s - 20, u = a.left;
22219
+ l = Math.max(8, Math.min(l, window.innerHeight - s - 8)), u = Math.max(8, Math.min(u, window.innerWidth - c - 8)), o({
22220
22220
  top: l,
22221
22221
  left: u
22222
22222
  });
22223
22223
  };
22224
- i();
22225
- let o = null, c = () => {
22226
- o === null && (o = requestAnimationFrame(() => {
22227
- o = null, i();
22224
+ a();
22225
+ let s = null, c = () => {
22226
+ s === null && (s = requestAnimationFrame(() => {
22227
+ s = null, a();
22228
22228
  }));
22229
22229
  };
22230
22230
  window.addEventListener("scroll", c, !0), window.addEventListener("resize", c);
22231
22231
  let l = (e) => {
22232
- r.current && !r.current.contains(e.target) && !n.contains(e.target) && a.current();
22232
+ r.current && !r.current.contains(e.target) && !n.contains(e.target) && i.current();
22233
22233
  }, u = setTimeout(() => {
22234
22234
  document.addEventListener("click", l);
22235
22235
  });
22236
22236
  return () => {
22237
- clearTimeout(u), o !== null && cancelAnimationFrame(o), window.removeEventListener("scroll", c, !0), window.removeEventListener("resize", c), document.removeEventListener("click", l);
22237
+ clearTimeout(u), s !== null && cancelAnimationFrame(s), window.removeEventListener("scroll", c, !0), window.removeEventListener("resize", c), document.removeEventListener("click", l);
22238
22238
  };
22239
22239
  }, [e]);
22240
- let p = (e, t) => l({
22240
+ let p = (e, t) => c({
22241
22241
  anchorEl: e.currentTarget,
22242
22242
  el: t
22243
22243
  });
@@ -22246,10 +22246,10 @@ function AD({ editor: e, opts: t, onClose: n }) {
22246
22246
  className: "insert-character-dialog",
22247
22247
  "data-toolbar-for": e.instanceId,
22248
22248
  style: {
22249
- visibility: o.top === 0 && o.left === 0 ? "hidden" : "initial",
22249
+ visibility: a.top === 0 && a.left === 0 ? "hidden" : "initial",
22250
22250
  position: "fixed",
22251
- top: `${o.top}px`,
22252
- left: `${o.left}px`,
22251
+ top: `${a.top}px`,
22252
+ left: `${a.left}px`,
22253
22253
  maxWidth: "500px",
22254
22254
  zIndex: 1e3
22255
22255
  },
@@ -22261,11 +22261,11 @@ function AD({ editor: e, opts: t, onClose: n }) {
22261
22261
  hideInput: !0,
22262
22262
  noLatexHandling: !0,
22263
22263
  hideDoneButtonBackground: !0,
22264
- layoutForKeyPad: d,
22265
- additionalKeys: u.characters.reduce((e, t) => (e = [...e, ...t.map((e) => ({
22266
- name: i(e, "name") || e,
22267
- write: i(e, "write") || e,
22268
- label: i(e, "label") || e,
22264
+ layoutForKeyPad: u,
22265
+ additionalKeys: l.characters.reduce((e, t) => (e = [...e, ...t.map((e) => ({
22266
+ name: d(e, "name") || e,
22267
+ write: d(e, "write") || e,
22268
+ label: d(e, "label") || e,
22269
22269
  category: "character",
22270
22270
  extraClass: "character",
22271
22271
  extraProps: {
@@ -22275,7 +22275,7 @@ function AD({ editor: e, opts: t, onClose: n }) {
22275
22275
  border: "1px solid #000"
22276
22276
  }
22277
22277
  },
22278
- ...u.hasPreview ? { actions: {
22278
+ ...l.hasPreview ? { actions: {
22279
22279
  onMouseEnter: (t) => p(t, e),
22280
22280
  onMouseLeave: f
22281
22281
  } } : {}
@@ -22286,24 +22286,24 @@ function AD({ editor: e, opts: t, onClose: n }) {
22286
22286
  },
22287
22287
  onDone: n
22288
22288
  }) })
22289
- }), document.body), c && gt.createPortal(/* @__PURE__ */ z(OD, {
22289
+ }), document.body), s && gt.createPortal(/* @__PURE__ */ z(OD, {
22290
22290
  onClose: f,
22291
- anchorEl: c.anchorEl,
22291
+ anchorEl: s.anchorEl,
22292
22292
  children: [
22293
- /* @__PURE__ */ R("div", { children: c.el.label }),
22293
+ /* @__PURE__ */ R("div", { children: s.el.label }),
22294
22294
  /* @__PURE__ */ R("div", {
22295
22295
  style: {
22296
22296
  fontSize: 20,
22297
22297
  lineHeight: "20px"
22298
22298
  },
22299
- children: c.el.description
22299
+ children: s.el.description
22300
22300
  }),
22301
22301
  /* @__PURE__ */ R("div", {
22302
22302
  style: {
22303
22303
  fontSize: 20,
22304
22304
  lineHeight: "20px"
22305
22305
  },
22306
- children: c.el.unicode
22306
+ children: s.el.unicode
22307
22307
  })
22308
22308
  ]
22309
22309
  }), document.body)] });
@@ -26083,27 +26083,27 @@ var xM = Z.create({
26083
26083
  ...t && { "aria-label": t },
26084
26084
  ...n && { "aria-labelledby": n }
26085
26085
  }), KM = ["aria-label", "aria-labelledby"], qM = (e) => {
26086
- let { showParagraphs: t, separateParagraphs: n } = e.pluginProps || {}, [r, i] = ft([]), [a, o] = ft(!1), { toolbarOpts: s } = e, c = at((e) => {
26087
- i((t) => {
26086
+ let { showParagraphs: t, separateParagraphs: n } = e.pluginProps || {}, [r, a] = ft([]), [o, s] = ft(!1), { toolbarOpts: c } = e, l = at((e) => {
26087
+ a((t) => {
26088
26088
  let n = t.filter((t) => t.pos !== e);
26089
- return n.length === 0 && o(!1), n;
26089
+ return n.length === 0 && s(!1), n;
26090
26090
  });
26091
- }, [i]), l = {
26091
+ }, [a]), u = {
26092
26092
  ...BM,
26093
- ...s
26094
- }, u = at((t) => {
26093
+ ...c
26094
+ }, d = at((t) => {
26095
26095
  let n = t.getHTML();
26096
- e.markup !== n && e.onChange?.(n), l.doneOn === "blur" && e.onDone?.(n);
26096
+ e.markup !== n && e.onChange?.(n), u.doneOn === "blur" && e.onDone?.(n);
26097
26097
  }, [
26098
26098
  e.markup,
26099
26099
  e.onChange,
26100
26100
  e.onDone,
26101
- l.doneOn
26101
+ u.doneOn
26102
26102
  ]), f = ut(() => ({
26103
26103
  ...VM,
26104
26104
  ...e.responseAreaProps,
26105
- onInlineDropdownToolbarClose: u
26106
- }), [e.responseAreaProps, u]), p = ut(() => {
26105
+ onInlineDropdownToolbarClose: d
26106
+ }), [e.responseAreaProps, d]), p = ut(() => {
26107
26107
  let { customPlugins: t, ...n } = e.pluginProps || {};
26108
26108
  t ||= [];
26109
26109
  let r = (e.activePlugins || HM)?.filter((e) => {
@@ -26186,38 +26186,38 @@ var xM = Z.create({
26186
26186
  Qw.configure(f),
26187
26187
  Xw.configure(f),
26188
26188
  iT.configure({
26189
- toolbarOpts: l,
26189
+ toolbarOpts: u,
26190
26190
  math: e.pluginProps?.math || {}
26191
26191
  }),
26192
26192
  FM,
26193
26193
  PM,
26194
26194
  RM,
26195
26195
  DT.configure({
26196
- toolbarOpts: l,
26196
+ toolbarOpts: u,
26197
26197
  imageHandling: {
26198
26198
  disableImageAlignmentButtons: e.disableImageAlignmentButtons,
26199
26199
  onDone: (t) => e.onDone?.(t.getHTML()),
26200
26200
  onDelete: e.imageSupport && e.imageSupport.delete && ((t) => {
26201
26201
  let { src: n } = t.attrs;
26202
26202
  e.imageSupport.delete(n, (e) => {
26203
- c(t.pos);
26203
+ l(t.pos);
26204
26204
  });
26205
26205
  }),
26206
26206
  insertImageRequested: e.imageSupport && ((t, n, r) => {
26207
- let [o, s] = n, l = (n) => {
26207
+ let [s, c] = n, u = (n) => {
26208
26208
  let r;
26209
- a && n && (r = e.onChange), c(s), r?.(t.getHTML());
26209
+ o && n && (r = e.onChange), l(c), r?.(t.getHTML());
26210
26210
  };
26211
- t._insertingImage = !0, i((e) => [...e, o]), (() => {
26212
- let n = r(l), i = d(() => {
26213
- let e = () => window.removeEventListener("focus", i);
26211
+ t._insertingImage = !0, a((e) => [...e, s]), (() => {
26212
+ let n = r(u), a = i(() => {
26213
+ let e = () => window.removeEventListener("focus", a);
26214
26214
  if (!t._insertingImage) {
26215
26215
  e();
26216
26216
  return;
26217
26217
  }
26218
- c(s), t._insertingImage = !1, e();
26218
+ l(c), t._insertingImage = !1, e();
26219
26219
  }, 500);
26220
- window.addEventListener("focus", i), e.imageSupport.add(n);
26220
+ window.addEventListener("focus", a), e.imageSupport.add(n);
26221
26221
  })();
26222
26222
  }),
26223
26223
  maxImageWidth: e.maxImageWidth,
@@ -26242,7 +26242,7 @@ var xM = Z.create({
26242
26242
  n.isDone && e.onChange?.(t.getHTML());
26243
26243
  },
26244
26244
  onBlur: ({ editor: e }) => {
26245
- e._insertingImage || e._toolbarOpened || e.isActive("inline_dropdown") || e.isActive("explicit_constructed_response") || !e.schema || u(e);
26245
+ e._insertingImage || e._toolbarOpened || e.isActive("inline_dropdown") || e.isActive("explicit_constructed_response") || !e.schema || d(e);
26246
26246
  }
26247
26247
  }, [e.charactersLimit]);
26248
26248
  L(() => {
@@ -26292,7 +26292,7 @@ var xM = Z.create({
26292
26292
  return /* @__PURE__ */ R(nO, {
26293
26293
  ...e,
26294
26294
  activePlugins: p,
26295
- toolbarOpts: l,
26295
+ toolbarOpts: u,
26296
26296
  editorState: b,
26297
26297
  editor: y,
26298
26298
  children: y && /* @__PURE__ */ R(JM, {
@@ -26424,7 +26424,7 @@ var QM = ZM(x, "InputContainer") || ZM(tN.InputContainer, "InputContainer"), $M
26424
26424
  })), pN = j(Gt)(() => ({
26425
26425
  paddingTop: 0,
26426
26426
  paddingBottom: 0
26427
- })), mN = (e) => s({}, {
26427
+ })), mN = (e) => c({}, {
26428
26428
  correct: {
26429
26429
  type: "default",
26430
26430
  default: "Correct"
@@ -26598,9 +26598,9 @@ var xN = (0, Et.default)("@pie-lib:config-ui:number-text-field"), SN = j(Wi)(({
26598
26598
  padding: "6px 0 7px"
26599
26599
  }
26600
26600
  })), CN = (e, t) => {
26601
- if (!a(e) && !a(t)) return 0;
26602
- if (!a(e) && a(t)) return t;
26603
- if (a(e)) return e;
26601
+ if (!f(e) && !f(t)) return 0;
26602
+ if (!f(e) && f(t)) return t;
26603
+ if (f(e)) return e;
26604
26604
  }, wN = class extends I.Component {
26605
26605
  static propTypes = {
26606
26606
  disabled: B.default.bool,
@@ -26627,7 +26627,7 @@ var xN = (0, Et.default)("@pie-lib:config-ui:number-text-field"), SN = j(Wi)(({
26627
26627
  this.setState({ value: t });
26628
26628
  }
26629
26629
  clamp(e, t = this.props.min, n = this.props.max) {
26630
- return a(e) ? (a(n) && (e = Math.min(e, n)), a(t) && (e = Math.max(e, t)), e) : CN(t, n);
26630
+ return f(e) ? (f(n) && (e = Math.min(e, n)), f(t) && (e = Math.max(e, t)), e) : CN(t, n);
26631
26631
  }
26632
26632
  onBlur = (e) => {
26633
26633
  let t = e.target.value, n = parseFloat(t);
@@ -27525,23 +27525,23 @@ var tF = {
27525
27525
  fontSize: e.typography.fontSize,
27526
27526
  marginBottom: 0
27527
27527
  })), aF = (e) => {
27528
- let { model: t, label: n, group: r, configuration: a, onChange: o } = e, s = (e, n, r) => {
27529
- let { isConfigProperty: s, ...c } = i(e, r || n), l = i(s ? a : t, n), u = {
27530
- ...c,
27528
+ let { model: t, label: n, group: r, configuration: i, onChange: a } = e, o = (e, n, r) => {
27529
+ let { isConfigProperty: o, ...s } = d(e, r || n), c = d(o ? i : t, n), l = {
27530
+ ...s,
27531
27531
  key: n,
27532
- value: l
27533
- }, d = tF[u.type];
27534
- return /* @__PURE__ */ R(d, {
27535
- ...u,
27536
- onChange: (e) => o(n, e, s)
27532
+ value: c
27533
+ }, u = tF[l.type];
27534
+ return /* @__PURE__ */ R(u, {
27535
+ ...l,
27536
+ onChange: (e) => a(n, e, o)
27537
27537
  }, n);
27538
- }, c = (e, t) => {
27538
+ }, s = (e, t) => {
27539
27539
  let n = e[t];
27540
27540
  if (!n) return null;
27541
- let { type: r, label: i, fields: a, choices: o } = n;
27542
- return r === "numberFields" ? /* @__PURE__ */ z("div", { children: [/* @__PURE__ */ R(iF, { children: i }), Object.keys(a).map((n) => s(e, `${t}.${n}`, `${t}.fields.${n}`))] }, `numberField-${i}`) : r === "checkboxes" ? /* @__PURE__ */ z("div", { children: [/* @__PURE__ */ R("p", { children: i }), Object.keys(o).map((n) => s(e, `${t}.${n}`, `${t}.choices.${n}`))] }, `checkbox-${i}`) : s(e, t);
27541
+ let { type: r, label: i, fields: a, choices: s } = n;
27542
+ return r === "numberFields" ? /* @__PURE__ */ z("div", { children: [/* @__PURE__ */ R(iF, { children: i }), Object.keys(a).map((n) => o(e, `${t}.${n}`, `${t}.fields.${n}`))] }, `numberField-${i}`) : r === "checkboxes" ? /* @__PURE__ */ z("div", { children: [/* @__PURE__ */ R("p", { children: i }), Object.keys(s).map((n) => o(e, `${t}.${n}`, `${t}.choices.${n}`))] }, `checkbox-${i}`) : o(e, t);
27543
27543
  };
27544
- return /* @__PURE__ */ z(nF, { children: [/* @__PURE__ */ R(rF, { children: n }), Object.keys(r).map((e) => c(r, e))] });
27544
+ return /* @__PURE__ */ z(nF, { children: [/* @__PURE__ */ R(rF, { children: n }), Object.keys(r).map((e) => s(r, e))] });
27545
27545
  };
27546
27546
  aF.propTypes = {
27547
27547
  model: B.default.object,
@@ -27565,8 +27565,8 @@ var oF = class extends I.Component {
27565
27565
  };
27566
27566
  change = (e, t, n = !1) => {
27567
27567
  BP("[changeModel]", e, t);
27568
- let { onChangeModel: r, onChangeConfiguration: i } = this.props, a = { ...this.props.model }, o = { ...this.props.configuration };
27569
- n ? (u(o, e, t), i(o, e)) : (u(a, e, t), r(a, e));
27568
+ let { onChangeModel: i, onChangeConfiguration: a } = this.props, o = { ...this.props.model }, s = { ...this.props.configuration };
27569
+ n ? (r(s, e, t), a(s, e)) : (r(o, e, t), i(o, e));
27570
27570
  };
27571
27571
  render() {
27572
27572
  let { groups: e, model: t, configuration: n, modal: r } = this.props;
@@ -28002,7 +28002,7 @@ var iI = class extends F.Component {
28002
28002
  t[`r${n++}`] = { value: "" };
28003
28003
  });
28004
28004
  }
28005
- f(t, this.state.responseAreas) || this.setState({ responseAreas: t }, () => {
28005
+ a(t, this.state.responseAreas) || this.setState({ responseAreas: t }, () => {
28006
28006
  this.root && Object.keys(t).length && Object.keys(t).forEach((e, t) => {
28007
28007
  let n = this.root.querySelector(`[data-answer-block="${e}"]`), r = this.root.querySelector(`[data-answer-block-index="${e}"]`);
28008
28008
  n && (Ce(n), r.textContent = `R${t + 1}`);
@@ -28542,7 +28542,7 @@ var iI = class extends F.Component {
28542
28542
  }
28543
28543
  }
28544
28544
  }, yI = (0, Et.default)("pie-elements:math-inline:configure"), bI = class e extends HTMLElement {
28545
- static createDefaultModel = (e = {}) => (r(e.responses) || (e.responses = e.responses.map((e) => ({
28545
+ static createDefaultModel = (e = {}) => (u(e.responses) || (e.responses = e.responses.map((e) => ({
28546
28546
  ...e,
28547
28547
  validation: e.validation || vI.model.validationDefault,
28548
28548
  allowTrailingZeros: e.allowTrailingZeros || vI.model.allowTrailingZerosDefault,