@pie-element/placement-ordering 14.1.2-next.7 → 14.1.2-next.8

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.
@@ -40544,8 +40544,8 @@ xS.create({
40544
40544
  })) ?? null };
40545
40545
  }
40546
40546
  });
40547
- var lJ = "placeholder", uJ = new kf("tiptap__placeholder"), dJ = 200;
40548
- function fJ(e) {
40547
+ var lJ = "placeholder", uJ = new kf("tiptap__placeholder");
40548
+ function dJ(e) {
40549
40549
  let { editor: t, placeholder: n, dataAttribute: r, pos: i, node: a, isEmptyDoc: o, hasAnchor: s, classes: { emptyNode: c, emptyEditor: l } } = e, u = [c];
40550
40550
  return o && u.push(l), wv.node(i, i + a.nodeSize, {
40551
40551
  class: u.join(" "),
@@ -40557,156 +40557,198 @@ function fJ(e) {
40557
40557
  }) : n
40558
40558
  });
40559
40559
  }
40560
- function pJ({ editor: e, options: t, dataAttribute: n, doc: r, selection: i }) {
40560
+ function fJ(e, t) {
40561
+ return typeof e == "function" ? e(t) : e;
40562
+ }
40563
+ function pJ({ editor: e, options: t, dataAttribute: n, doc: r, selection: i, from: a, to: o }) {
40564
+ let { anchor: s } = i, c = [], l = e.isEmpty;
40565
+ return r.nodesBetween(a, o, (r, i) => {
40566
+ let a = s >= i && s <= i + r.nodeSize, o = !r.isLeaf && kx(r);
40567
+ return r.type.isTextblock && (a || !t.showOnlyCurrent) && o && c.push(dJ({
40568
+ editor: e,
40569
+ isEmptyDoc: l,
40570
+ dataAttribute: n,
40571
+ hasAnchor: a,
40572
+ placeholder: t.placeholder,
40573
+ classes: {
40574
+ emptyEditor: t.emptyEditorClass,
40575
+ emptyNode: fJ(t.emptyNodeClass, {
40576
+ editor: e,
40577
+ node: r,
40578
+ pos: i,
40579
+ hasAnchor: a
40580
+ })
40581
+ },
40582
+ node: r,
40583
+ pos: i
40584
+ })), t.includeChildren;
40585
+ }), c;
40586
+ }
40587
+ function mJ({ editor: e, options: t, dataAttribute: n, doc: r, selection: i }) {
40561
40588
  if (!(e.isEditable || !t.showOnlyWhenEditable)) return null;
40562
- let { anchor: a } = i, o = [], s = e.isEmpty, c = {
40563
- emptyEditor: t.emptyEditorClass,
40564
- emptyNode: t.emptyNodeClass
40565
- };
40589
+ let { anchor: a } = i, o = [], s = e.isEmpty;
40566
40590
  if (t.showOnlyCurrent && !t.includeChildren) {
40567
- let i = r.resolve(a), l = i.depth > 0 ? i.node(1) : i.nodeAfter, u = i.depth > 0 ? i.before(1) : a;
40568
- if (l && l.type.isTextblock && kx(l)) {
40569
- let r = a >= u && a <= u + l.nodeSize;
40570
- o.push(fJ({
40591
+ let i = r.resolve(a), c = i.depth > 0 ? i.node(1) : i.nodeAfter, l = i.depth > 0 ? i.before(1) : a;
40592
+ if (c && c.type.isTextblock && kx(c)) {
40593
+ let r = a >= l && a <= l + c.nodeSize;
40594
+ o.push(dJ({
40571
40595
  editor: e,
40572
40596
  isEmptyDoc: s,
40573
40597
  dataAttribute: n,
40574
40598
  hasAnchor: r,
40575
40599
  placeholder: t.placeholder,
40576
- classes: c,
40577
- node: l,
40578
- pos: u
40600
+ classes: {
40601
+ emptyEditor: t.emptyEditorClass,
40602
+ emptyNode: fJ(t.emptyNodeClass, {
40603
+ editor: e,
40604
+ node: c,
40605
+ pos: l,
40606
+ hasAnchor: r
40607
+ })
40608
+ },
40609
+ node: c,
40610
+ pos: l
40579
40611
  }));
40580
40612
  }
40581
- } else {
40582
- let i = uJ.getState(e.state), l = i?.topPos ?? 0, u = i?.bottomPos ?? r.content.size;
40583
- r.nodesBetween(l, u, (r, i) => {
40584
- let l = a >= i && a <= i + r.nodeSize, u = !r.isLeaf && kx(r);
40585
- return r.type.isTextblock && (l || !t.showOnlyCurrent) && u && o.push(fJ({
40586
- editor: e,
40587
- isEmptyDoc: s,
40588
- dataAttribute: n,
40589
- hasAnchor: l,
40590
- placeholder: t.placeholder,
40591
- classes: c,
40592
- node: r,
40593
- pos: i
40594
- })), t.includeChildren;
40595
- });
40596
- }
40613
+ } else o.push(...pJ({
40614
+ editor: e,
40615
+ options: t,
40616
+ dataAttribute: n,
40617
+ doc: r,
40618
+ selection: i,
40619
+ from: 0,
40620
+ to: r.content.size
40621
+ }));
40597
40622
  return Dv.create(r, o);
40598
40623
  }
40599
- function mJ(e) {
40600
- return e.replace(/\s+/g, "-").replace(/[^a-zA-Z0-9-]/g, "").replace(/^[0-9-]+/, "").replace(/^-+/, "").toLowerCase();
40624
+ function hJ(e, t) {
40625
+ let n = e.resolve(t);
40626
+ if (n.depth === 0) {
40627
+ let e = n.nodeAfter ?? n.nodeBefore;
40628
+ if (!e) return {
40629
+ from: t,
40630
+ to: t
40631
+ };
40632
+ let r = n.nodeAfter ? t : t - e.nodeSize;
40633
+ return {
40634
+ from: r,
40635
+ to: r + e.nodeSize
40636
+ };
40637
+ }
40638
+ let r = n.before(1);
40639
+ return {
40640
+ from: r,
40641
+ to: r + n.node(1).nodeSize
40642
+ };
40601
40643
  }
40602
- function hJ(e) {
40603
- let t = getComputedStyle(e), n = `${t.overflow} ${t.overflowY} ${t.overflowX}`;
40604
- return /auto|scroll|overlay/.test(n);
40644
+ function gJ(e, t) {
40645
+ return {
40646
+ from: Math.max(0, t.from - 1),
40647
+ to: Math.min(e.content.size, t.to - 1)
40648
+ };
40605
40649
  }
40606
- function gJ(e) {
40607
- let t = e;
40608
- for (; t;) {
40609
- if (hJ(t)) return t;
40610
- let e = t.parentElement;
40611
- if (!e) {
40612
- let e = t.getRootNode();
40613
- if (e instanceof ShadowRoot) {
40614
- t = e.host;
40615
- continue;
40616
- }
40617
- return window;
40618
- }
40619
- t = e;
40650
+ function _J(e, t, n) {
40651
+ let r = [];
40652
+ return e.forEach((e, i) => {
40653
+ let a = i, o = a + e.nodeSize, s = a + 1, c = o + 1;
40654
+ s < n && c > t && r.push({
40655
+ from: a,
40656
+ to: o
40657
+ });
40658
+ }), r;
40659
+ }
40660
+ function vJ(e) {
40661
+ if (e.length === 0) return [];
40662
+ let t = [...e].sort((e, t) => e.from - t.from), n = [{ ...t[0] }];
40663
+ for (let e = 1; e < t.length; e += 1) {
40664
+ let r = n[n.length - 1], i = t[e];
40665
+ i.from <= r.to ? r.to = Math.max(r.to, i.to) : n.push({ ...i });
40620
40666
  }
40621
- return window;
40667
+ return n;
40622
40668
  }
40623
- function _J(e) {
40624
- return e === window ? {
40625
- top: 0,
40626
- bottom: window.innerHeight
40627
- } : e.getBoundingClientRect();
40669
+ function yJ(e, t) {
40670
+ let n = _J(e, t.from, t.to);
40671
+ return n.push(gJ(e, hJ(e, t.from))), t.to > t.from ? n.push(gJ(e, hJ(e, Math.min(t.to, e.content.size + 1) - 1))) : t.from < e.content.size + 1 && n.push(gJ(e, hJ(e, Math.min(t.from + 1, e.content.size)))), n;
40628
40672
  }
40629
- function vJ({ doc: e, view: t, scrollContainer: n }) {
40630
- let r = t.dom.getBoundingClientRect(), i = n ? _J(n) : {
40631
- top: 0,
40632
- bottom: window.innerHeight
40633
- }, a = Math.max(r.top, i.top) - dJ, o = Math.min(r.bottom, i.bottom) + dJ;
40634
- if (a >= o) return {
40635
- top: 0,
40636
- bottom: e.content.size
40637
- };
40638
- let s = getComputedStyle(t.dom).direction === "rtl" ? Math.max(r.right - 2, r.left + 2) : r.left + 2, c = t.posAtCoords({
40639
- left: s,
40640
- top: a + 2
40641
- }), l = t.posAtCoords({
40642
- left: s,
40643
- top: o - 2
40644
- });
40645
- return {
40646
- top: c ? c.pos : 0,
40647
- bottom: l ? l.pos : e.content.size
40648
- };
40673
+ function bJ(e, t, n) {
40674
+ let r = [];
40675
+ if (e.docChanged) {
40676
+ let t = vx(e);
40677
+ for (let e of t) r.push(...yJ(n.doc, e.newRange));
40678
+ }
40679
+ return e.selectionSet && (r.push(gJ(n.doc, hJ(n.doc, e.mapping.map(t.selection.anchor)))), r.push(gJ(n.doc, hJ(n.doc, n.selection.anchor)))), vJ(r);
40649
40680
  }
40650
- var yJ = {
40651
- init() {
40652
- return {
40653
- topPos: null,
40654
- bottomPos: null
40655
- };
40656
- },
40657
- apply(e, t) {
40658
- let n = e.getMeta(uJ);
40659
- return n?.positions ? {
40660
- topPos: n.positions.top,
40661
- bottomPos: n.positions.bottom
40662
- } : e.docChanged ? {
40663
- topPos: t.topPos === null ? null : e.mapping.map(t.topPos),
40664
- bottomPos: t.bottomPos === null ? null : e.mapping.map(t.bottomPos)
40665
- } : t;
40681
+ function xJ(e, t, n) {
40682
+ let r = Math.max(0, Math.min(e, n.content.size));
40683
+ return {
40684
+ from: r,
40685
+ to: Math.max(r, Math.min(t, n.content.size))
40686
+ };
40687
+ }
40688
+ function SJ({ decorations: e, ranges: t, editor: n, options: r, dataAttribute: i, doc: a, selection: o }) {
40689
+ let s = e;
40690
+ for (let e of t) {
40691
+ let { from: t, to: c } = xJ(e.from, e.to, a), l = s.find(t, c).filter((e) => e.from >= t && e.to <= c);
40692
+ l.length && (s = s.remove(l));
40693
+ let u = pJ({
40694
+ editor: n,
40695
+ options: r,
40696
+ dataAttribute: i,
40697
+ doc: a,
40698
+ selection: o,
40699
+ from: t,
40700
+ to: c
40701
+ });
40702
+ u.length && (s = s.add(a, u));
40666
40703
  }
40667
- };
40668
- function bJ(e) {
40669
- let t = gJ(e.dom), n = () => {
40670
- let n = vJ({
40671
- view: e,
40672
- doc: e.state.doc,
40673
- scrollContainer: t
40674
- }), r = uJ.getState(e.state);
40675
- if (r?.topPos === n.top && r?.bottomPos === n.bottom) return;
40676
- let i = e.state.tr.setMeta(uJ, { positions: n });
40677
- e.dispatch(i);
40678
- }, r = null, i = 0, a = () => {
40679
- r === null && (r = requestAnimationFrame(() => {
40680
- r = null;
40681
- let e = performance.now();
40682
- e - i >= 150 ? (i = e, n()) : a();
40683
- }));
40684
- };
40685
- return t.addEventListener("scroll", a, { passive: !0 }), n(), {
40686
- update(t, n) {
40687
- e.state.doc.content.size !== n.doc.content.size && a();
40688
- },
40689
- destroy: () => {
40690
- r !== null && cancelAnimationFrame(r), t.removeEventListener("scroll", a);
40704
+ return s;
40705
+ }
40706
+ function CJ({ editor: e, options: t, dataAttribute: n }) {
40707
+ return {
40708
+ init(r, i) {
40709
+ return mJ({
40710
+ editor: e,
40711
+ options: t,
40712
+ dataAttribute: n,
40713
+ doc: i.doc,
40714
+ selection: i.selection
40715
+ }) ?? Dv.empty;
40716
+ },
40717
+ apply(r, i, a, o) {
40718
+ return !r.docChanged && !r.selectionSet ? i : SJ({
40719
+ decorations: i.map(r.mapping, r.doc),
40720
+ ranges: bJ(r, a, o),
40721
+ editor: e,
40722
+ options: t,
40723
+ dataAttribute: n,
40724
+ doc: o.doc,
40725
+ selection: o.selection
40726
+ });
40691
40727
  }
40692
40728
  };
40693
40729
  }
40694
- function xJ({ editor: e, options: t }) {
40695
- let n = t.dataAttribute ? `data-${mJ(t.dataAttribute)}` : `data-${lJ}`;
40730
+ function wJ(e) {
40731
+ return e.replace(/\s+/g, "-").replace(/[^a-zA-Z0-9-]/g, "").replace(/^[0-9-]+/, "").replace(/^-+/, "").toLowerCase();
40732
+ }
40733
+ function TJ({ editor: e, options: t }) {
40734
+ let n = t.dataAttribute ? `data-${wJ(t.dataAttribute)}` : `data-${lJ}`, r = t.showOnlyCurrent && !t.includeChildren;
40696
40735
  return new Ef({
40697
40736
  key: uJ,
40698
- state: yJ,
40699
- view: bJ,
40700
- props: { decorations: ({ doc: r, selection: i }) => pJ({
40737
+ ...r ? {} : { state: CJ({
40738
+ editor: e,
40739
+ options: t,
40740
+ dataAttribute: n
40741
+ }) },
40742
+ props: { decorations: r ? ({ doc: r, selection: i }) => mJ({
40701
40743
  editor: e,
40702
40744
  options: t,
40703
40745
  dataAttribute: n,
40704
40746
  doc: r,
40705
40747
  selection: i
40706
- }) }
40748
+ }) : (n) => t.showOnlyWhenEditable && !e.isEditable ? Dv.empty : uJ.getState(n) ?? Dv.empty }
40707
40749
  });
40708
40750
  }
40709
- var SJ = xS.create({
40751
+ var EJ = xS.create({
40710
40752
  name: "placeholder",
40711
40753
  addOptions() {
40712
40754
  return {
@@ -40720,12 +40762,25 @@ var SJ = xS.create({
40720
40762
  };
40721
40763
  },
40722
40764
  addProseMirrorPlugins() {
40723
- return [xJ({
40765
+ return [TJ({
40724
40766
  editor: this.editor,
40725
40767
  options: this.options
40726
40768
  })];
40727
40769
  }
40728
40770
  });
40771
+ function DJ(e, t) {
40772
+ return !e.selection.empty && !Ax(e.selection) && t.isEditable;
40773
+ }
40774
+ function OJ(e, t) {
40775
+ return DJ(e, t) && !t.isFocused && !t.view.dragging;
40776
+ }
40777
+ function kJ() {
40778
+ var e;
40779
+ (e = window.getSelection()) == null || e.removeAllRanges();
40780
+ }
40781
+ function AJ(e) {
40782
+ e.focus();
40783
+ }
40729
40784
  xS.create({
40730
40785
  name: "selection",
40731
40786
  addOptions() {
@@ -40735,13 +40790,25 @@ xS.create({
40735
40790
  let { editor: e, options: t } = this;
40736
40791
  return [new Ef({
40737
40792
  key: new kf("selection"),
40738
- props: { decorations(n) {
40739
- return n.selection.empty || e.isFocused || !e.isEditable || Ax(n.selection) || e.view.dragging ? null : Dv.create(n.doc, [wv.inline(n.selection.from, n.selection.to, { class: t.className })]);
40740
- } }
40793
+ props: {
40794
+ decorations(n) {
40795
+ return OJ(n, e) ? Dv.create(n.doc, [wv.inline(n.selection.from, n.selection.to, { class: t.className })]) : null;
40796
+ },
40797
+ handleDOMEvents: {
40798
+ blur(t) {
40799
+ return DJ(t.state, e) && kJ(), !1;
40800
+ },
40801
+ focus(t) {
40802
+ return DJ(t.state, e) && requestAnimationFrame(() => {
40803
+ !e.isDestroyed && t.hasFocus() && AJ(t);
40804
+ }), !1;
40805
+ }
40806
+ }
40807
+ }
40741
40808
  })];
40742
40809
  }
40743
40810
  });
40744
- function CJ({ types: e, node: t }) {
40811
+ function jJ({ types: e, node: t }) {
40745
40812
  return t && Array.isArray(e) && e.includes(t.type) || t?.type === e;
40746
40813
  }
40747
40814
  xS.create({
@@ -40763,7 +40830,7 @@ xS.create({
40763
40830
  state: {
40764
40831
  init: (e, t) => {
40765
40832
  let r = t.tr.doc.lastChild;
40766
- return !CJ({
40833
+ return !jJ({
40767
40834
  node: r,
40768
40835
  types: n
40769
40836
  });
@@ -40771,7 +40838,7 @@ xS.create({
40771
40838
  apply: (e, t) => {
40772
40839
  if (!e.docChanged || e.getMeta("__uniqueIDTransaction")) return t;
40773
40840
  let r = e.doc.lastChild;
40774
- return !CJ({
40841
+ return !jJ({
40775
40842
  node: r,
40776
40843
  types: n
40777
40844
  });
@@ -40806,7 +40873,7 @@ xS.create({
40806
40873
  };
40807
40874
  }
40808
40875
  });
40809
- var wJ = pS.create({
40876
+ var MJ = pS.create({
40810
40877
  name: "superscript",
40811
40878
  addOptions() {
40812
40879
  return { HTMLAttributes: {} };
@@ -40836,7 +40903,7 @@ var wJ = pS.create({
40836
40903
  addKeyboardShortcuts() {
40837
40904
  return { "Mod-.": () => this.editor.commands.toggleSuperscript() };
40838
40905
  }
40839
- }), TJ = pS.create({
40906
+ }), NJ = pS.create({
40840
40907
  name: "subscript",
40841
40908
  addOptions() {
40842
40909
  return { HTMLAttributes: {} };
@@ -40866,7 +40933,7 @@ var wJ = pS.create({
40866
40933
  addKeyboardShortcuts() {
40867
40934
  return { "Mod-,": () => this.editor.commands.toggleSubscript() };
40868
40935
  }
40869
- }), EJ = xS.create({
40936
+ }), PJ = xS.create({
40870
40937
  name: "textAlign",
40871
40938
  addOptions() {
40872
40939
  return {
@@ -40908,7 +40975,7 @@ var wJ = pS.create({
40908
40975
  "Mod-Shift-j": () => this.editor.commands.setTextAlign("justify")
40909
40976
  };
40910
40977
  }
40911
- }), DJ = /(?:^|\s)(!\[(.+|:?)]\((\S+)(?:(?:\s+)["'](\S+)["'])?\))$/, OJ = ZS.create({
40978
+ }), FJ = /(?:^|\s)(!\[(.+|:?)]\((\S+)(?:(?:\s+)["'](\S+)["'])?\))$/, IJ = ZS.create({
40912
40979
  name: "image",
40913
40980
  addOptions() {
40914
40981
  return {
@@ -41001,7 +41068,7 @@ var wJ = pS.create({
41001
41068
  },
41002
41069
  addInputRules() {
41003
41070
  return [LS({
41004
- find: DJ,
41071
+ find: FJ,
41005
41072
  type: this.type,
41006
41073
  getAttributes: (e) => {
41007
41074
  let [, , t, n, r] = e;
@@ -41013,17 +41080,17 @@ var wJ = pS.create({
41013
41080
  }
41014
41081
  })];
41015
41082
  }
41016
- }), kJ = SJ, AJ = {
41083
+ }), LJ = EJ, RJ = {
41017
41084
  position: "bottom",
41018
41085
  alignment: "left",
41019
41086
  alwaysVisible: !1,
41020
41087
  showDone: !0,
41021
41088
  doneOn: "blur"
41022
- }, jJ = {
41089
+ }, zJ = {
41023
41090
  options: {},
41024
41091
  respAreaToolbar: () => {},
41025
41092
  onHandleAreaChange: () => {}
41026
- }, MJ = [
41093
+ }, BJ = [
41027
41094
  "bold",
41028
41095
  "italic",
41029
41096
  "underline",
@@ -41045,7 +41112,7 @@ var wJ = pS.create({
41045
41112
  "h3",
41046
41113
  "undo",
41047
41114
  "redo"
41048
- ], NJ = {
41115
+ ], VJ = {
41049
41116
  "--white": "#fff",
41050
41117
  "--black": "#2e2b29",
41051
41118
  "--black-contrast": "#110f0e",
@@ -41064,14 +41131,18 @@ var wJ = pS.create({
41064
41131
  "--red": "#ff5c33",
41065
41132
  "--red-light": "#ffebe5",
41066
41133
  "--shadow": "0px 12px 33px 0px rgba(0, 0, 0, .06),\n 0px 3.618px 9.949px 0px rgba(0, 0, 0, .04)"
41067
- }, PJ = (e) => {
41134
+ }, HJ = (e) => ({
41135
+ spellcheck: e ? "true" : "false",
41136
+ autocorrect: e ? "on" : "off",
41137
+ autocapitalize: e ? "on" : "off"
41138
+ }), UJ = (e) => {
41068
41139
  let { showParagraphs: t, separateParagraphs: n } = e.pluginProps || {}, [r, i] = Dt([]), [a, o] = Dt(!1), { toolbarOpts: s } = e, c = bt((e) => {
41069
41140
  i((t) => {
41070
41141
  let n = t.filter((t) => t.pos !== e);
41071
41142
  return n.length === 0 && o(!1), n;
41072
41143
  });
41073
41144
  }, [i]), l = {
41074
- ...AJ,
41145
+ ...RJ,
41075
41146
  ...s
41076
41147
  }, u = bt((t) => {
41077
41148
  let n = t.getHTML();
@@ -41082,13 +41153,13 @@ var wJ = pS.create({
41082
41153
  e.onDone,
41083
41154
  l.doneOn
41084
41155
  ]), d = Tt(() => ({
41085
- ...jJ,
41156
+ ...zJ,
41086
41157
  ...e.responseAreaProps,
41087
41158
  onInlineDropdownToolbarClose: u
41088
41159
  }), [e.responseAreaProps, u]), f = Tt(() => {
41089
41160
  let { customPlugins: t, ...n } = e.pluginProps || {};
41090
41161
  t ||= [];
41091
- let r = (e.activePlugins || MJ)?.filter((e) => {
41162
+ let r = (e.activePlugins || BJ)?.filter((e) => {
41092
41163
  let t = vl[e] || e, r = n[t] || {};
41093
41164
  return !r || !r.disabled;
41094
41165
  });
@@ -41106,103 +41177,112 @@ var wJ = pS.create({
41106
41177
  setKeypadInteraction: {},
41107
41178
  media: {}
41108
41179
  });
41109
- }, [e, d.type]), m = rj({
41110
- extensions: [
41111
- EJ.configure({
41112
- types: [
41113
- "heading",
41114
- "paragraph",
41115
- "div",
41116
- "headingParagraph",
41117
- "h1",
41118
- "h2",
41119
- "h3",
41120
- "h4",
41121
- "h5",
41122
- "h6",
41123
- "td",
41124
- "th"
41125
- ],
41126
- alignments: [
41127
- "left",
41128
- "right",
41129
- "center",
41130
- "justify"
41131
- ]
41132
- }),
41133
- sJ,
41134
- cJ.configure({ limit: e.charactersLimit || 1e6 }),
41135
- Zq.configure({ trailingNode: {
41180
+ }, [e, d.type]), m = [
41181
+ PJ.configure({
41182
+ types: [
41183
+ "heading",
41184
+ "paragraph",
41185
+ "div",
41186
+ "headingParagraph",
41187
+ "h1",
41188
+ "h2",
41189
+ "h3",
41190
+ "h4",
41191
+ "h5",
41192
+ "h6",
41193
+ "td",
41194
+ "th"
41195
+ ],
41196
+ alignments: [
41197
+ "left",
41198
+ "right",
41199
+ "center",
41200
+ "justify"
41201
+ ]
41202
+ }),
41203
+ sJ,
41204
+ cJ.configure({ limit: e.charactersLimit || 1e6 }),
41205
+ Zq.configure({
41206
+ trailingNode: {
41136
41207
  node: "paragraph",
41137
41208
  notAfter: ["paragraph", "div"]
41138
- } }),
41139
- tz,
41140
- kk,
41141
- nz,
41142
- Ak,
41143
- jk,
41144
- kJ.configure({
41145
- placeholder: e.placeholder,
41146
- showOnlyWhenEditable: !0,
41147
- showOnlyCurrent: !1,
41148
- includeChildren: !0
41149
- }),
41150
- Tk,
41151
- lk,
41152
- Ok,
41153
- Dk,
41154
- zI.configure(d),
41155
- BI.configure(d),
41156
- HI.configure(d),
41157
- UI.configure(d),
41158
- VI.configure(d),
41159
- EL.configure({
41160
- toolbarOpts: l,
41161
- math: e.pluginProps?.math || {}
41162
- }),
41163
- TJ,
41164
- wJ,
41165
- OJ,
41166
- qL.configure({
41167
- toolbarOpts: l,
41168
- imageHandling: {
41169
- disableImageAlignmentButtons: e.disableImageAlignmentButtons,
41170
- onDone: (t) => e.onDone?.(t.getHTML()),
41171
- onDelete: e.imageSupport && e.imageSupport.delete && ((t) => {
41172
- let { src: n } = t.attrs;
41173
- e.imageSupport.delete(n, (e) => {
41174
- c(t.pos);
41175
- });
41176
- }),
41177
- insertImageRequested: e.imageSupport && ((t, n, r) => {
41178
- let [o, s] = n, l = (n) => {
41179
- let r;
41180
- a && n && (r = e.onChange), c(s), r?.(t.getHTML());
41181
- };
41182
- t._insertingImage = !0, i((e) => [...e, o]), (() => {
41183
- let n = r(l), i = p(() => {
41184
- let e = () => window.removeEventListener("focus", i);
41185
- if (!t._insertingImage) {
41186
- e();
41187
- return;
41188
- }
41189
- c(s), t._insertingImage = !1, e();
41190
- }, 500);
41191
- window.addEventListener("focus", i), e.imageSupport.add(n);
41192
- })();
41193
- }),
41194
- maxImageWidth: e.maxImageWidth,
41195
- maxImageHeight: e.maxImageHeight
41196
- },
41197
- limit: 3
41198
- }),
41199
- mR.configure({ uploadSoundSupport: e.uploadSoundSupport }),
41200
- bR.configure({ extraCSSRules: e.extraCSSRules })
41201
- ],
41209
+ },
41210
+ link: {
41211
+ autolink: !1,
41212
+ linkOnPaste: !1
41213
+ }
41214
+ }),
41215
+ tz,
41216
+ kk,
41217
+ nz,
41218
+ Ak,
41219
+ jk,
41220
+ LJ.configure({
41221
+ placeholder: e.placeholder,
41222
+ showOnlyWhenEditable: !0,
41223
+ showOnlyCurrent: !1,
41224
+ includeChildren: !0
41225
+ }),
41226
+ Tk,
41227
+ lk,
41228
+ Ok,
41229
+ Dk,
41230
+ zI.configure(d),
41231
+ BI.configure(d),
41232
+ HI.configure(d),
41233
+ UI.configure(d),
41234
+ VI.configure(d),
41235
+ EL.configure({
41236
+ toolbarOpts: l,
41237
+ math: e.pluginProps?.math || {}
41238
+ }),
41239
+ NJ,
41240
+ MJ,
41241
+ IJ,
41242
+ qL.configure({
41243
+ toolbarOpts: l,
41244
+ imageHandling: {
41245
+ disableImageAlignmentButtons: e.disableImageAlignmentButtons,
41246
+ onDone: (t) => e.onDone?.(t.getHTML()),
41247
+ onDelete: e.imageSupport && e.imageSupport.delete && ((t) => {
41248
+ let { src: n } = t.attrs;
41249
+ e.imageSupport.delete(n, (e) => {
41250
+ c(t.pos);
41251
+ });
41252
+ }),
41253
+ insertImageRequested: e.imageSupport && ((t, n, r) => {
41254
+ let [o, s] = n, l = (n) => {
41255
+ let r;
41256
+ a && n && (r = e.onChange), c(s), r?.(t.getHTML());
41257
+ };
41258
+ t._insertingImage = !0, i((e) => [...e, o]), (() => {
41259
+ let n = r(l), i = p(() => {
41260
+ let e = () => window.removeEventListener("focus", i);
41261
+ if (!t._insertingImage) {
41262
+ e();
41263
+ return;
41264
+ }
41265
+ c(s), t._insertingImage = !1, e();
41266
+ }, 500);
41267
+ window.addEventListener("focus", i), e.imageSupport.add(n);
41268
+ })();
41269
+ }),
41270
+ maxImageWidth: e.maxImageWidth,
41271
+ maxImageHeight: e.maxImageHeight
41272
+ },
41273
+ limit: 3
41274
+ }),
41275
+ mR.configure({ uploadSoundSupport: e.uploadSoundSupport }),
41276
+ bR.configure({ extraCSSRules: e.extraCSSRules })
41277
+ ], h = e.spellCheck !== !1, g = rj({
41278
+ extensions: m,
41202
41279
  immediatelyRender: !1,
41203
- editorProps: { handleKeyDown(t, n) {
41204
- return e.onKeyDown ? e.onKeyDown(n) : !1;
41205
- } },
41280
+ editorProps: {
41281
+ attributes: HJ(h),
41282
+ handleKeyDown(t, n) {
41283
+ return e.onKeyDown ? e.onKeyDown(n) : !1;
41284
+ }
41285
+ },
41206
41286
  editable: !e.disabled,
41207
41287
  content: Cl(e.markup),
41208
41288
  onUpdate: ({ editor: t, transaction: n }) => {
@@ -41213,22 +41293,29 @@ var wJ = pS.create({
41213
41293
  }
41214
41294
  }, [e.charactersLimit]);
41215
41295
  Ct(() => {
41216
- e.editorRef && e.editorRef(m);
41217
- }, [e.editorRef, m]), Ct(() => {
41218
- m?.setEditable(!e.disabled);
41219
- }, [e.disabled, m]), Ct(() => {
41220
- if (!m) return;
41296
+ e.editorRef && e.editorRef(g);
41297
+ }, [e.editorRef, g]), Ct(() => {
41298
+ g?.setEditable(!e.disabled);
41299
+ }, [e.disabled, g]), Ct(() => {
41300
+ if (!g) return;
41301
+ let e = g.options?.editorProps, t = HJ(h);
41302
+ e?.attributes?.spellcheck !== t.spellcheck && g.setOptions({ editorProps: {
41303
+ ...e,
41304
+ attributes: t
41305
+ } });
41306
+ }, [h, g]), Ct(() => {
41307
+ if (!g) return;
41221
41308
  let t = Cl(e.markup);
41222
- t !== m.getHTML() && m.commands.setContent(t, { emitUpdate: !1 });
41223
- }, [e.markup, m]), Ct(() => {
41224
- Object.entries(NJ).forEach(([e, t]) => {
41309
+ t !== g.getHTML() && g.commands.setContent(t, { emitUpdate: !1 });
41310
+ }, [e.markup, g]), Ct(() => {
41311
+ Object.entries(VJ).forEach(([e, t]) => {
41225
41312
  document.documentElement.style.setProperty(e, t);
41226
41313
  });
41227
41314
  }, []);
41228
- let h = $A({
41229
- editor: m,
41315
+ let _ = $A({
41316
+ editor: g,
41230
41317
  selector: (e) => ({ isFocused: e.editor?.isFocused })
41231
- }), g = Tt(() => {
41318
+ }), v = Tt(() => {
41232
41319
  let { minWidth: t, width: n, maxWidth: r, minHeight: i, height: a, maxHeight: o } = e;
41233
41320
  return {
41234
41321
  width: rz(n),
@@ -41243,20 +41330,20 @@ var wJ = pS.create({
41243
41330
  ...e,
41244
41331
  activePlugins: f,
41245
41332
  toolbarOpts: l,
41246
- editorState: h,
41247
- editor: m,
41248
- children: m && /* @__PURE__ */ F(FJ, {
41333
+ editorState: _,
41334
+ editor: g,
41335
+ children: g && /* @__PURE__ */ F(WJ, {
41249
41336
  style: {
41250
- minHeight: g.minHeight,
41251
- height: g.height,
41252
- maxHeight: g.maxHeight
41337
+ minHeight: v.minHeight,
41338
+ height: v.height,
41339
+ maxHeight: v.maxHeight
41253
41340
  },
41254
41341
  showParagraph: t && !t.disabled,
41255
41342
  separateParagraph: n && !n.disabled,
41256
- editor: m
41343
+ editor: g
41257
41344
  })
41258
41345
  });
41259
- }, FJ = M(XA, { shouldForwardProp: (e) => !["showParagraph", "separateParagraph"].includes(e) })(({ showParagraph: e, separateParagraph: t }) => ({
41346
+ }, WJ = M(XA, { shouldForwardProp: (e) => !["showParagraph", "separateParagraph"].includes(e) })(({ showParagraph: e, separateParagraph: t }) => ({
41260
41347
  display: "flex",
41261
41348
  outline: "none !important",
41262
41349
  "& .ProseMirror": {
@@ -41284,26 +41371,26 @@ var wJ = pS.create({
41284
41371
  } },
41285
41372
  ...t && { "& > p:has(+ p)": { marginBottom: "1em" } }
41286
41373
  }
41287
- })), IJ = PJ;
41374
+ })), GJ = UJ;
41288
41375
  //#endregion
41289
41376
  //#region ../../lib-react/config-ui/dist/feedback-config/feedback-selector.js
41290
- function LJ(e) {
41377
+ function KJ(e) {
41291
41378
  return typeof e == "function" || typeof e == "object" && !!e && typeof e.$$typeof == "symbol";
41292
41379
  }
41293
- function RJ(e, t) {
41294
- return !e || LJ(e) ? e : LJ(e.default) ? e.default : t && LJ(e[t]) ? e[t] : t && LJ(e[t]?.default) ? e[t].default : e;
41380
+ function qJ(e, t) {
41381
+ return !e || KJ(e) ? e : KJ(e.default) ? e.default : t && KJ(e[t]) ? e[t] : t && KJ(e[t]?.default) ? e[t].default : e;
41295
41382
  }
41296
- var zJ = RJ(Me, "InputContainer") || RJ(HJ.InputContainer, "InputContainer"), BJ = Je, VJ = BJ.default, HJ = VJ && typeof VJ == "object" ? VJ : BJ, UJ = M(IJ)(({ theme: e }) => ({ fontFamily: e.typography.fontFamily })), WJ = {
41383
+ var JJ = qJ(Me, "InputContainer") || qJ(ZJ.InputContainer, "InputContainer"), YJ = Je, XJ = YJ.default, ZJ = XJ && typeof XJ == "object" ? XJ : YJ, QJ = M(GJ)(({ theme: e }) => ({ fontFamily: e.typography.fontFamily })), $J = {
41297
41384
  default: "Simple Feedback",
41298
41385
  none: "No Feedback",
41299
41386
  custom: "Customized Feedback"
41300
- }, GJ = M("div")(({ theme: e }) => ({ marginBottom: e.spacing(1) })), KJ = M(zJ)(() => ({ paddingBottom: 0 })), qJ = M("div")(({ theme: e }) => ({
41387
+ }, eY = M("div")(({ theme: e }) => ({ marginBottom: e.spacing(1) })), tY = M(JJ)(() => ({ paddingBottom: 0 })), nY = M("div")(({ theme: e }) => ({
41301
41388
  marginTop: "0px",
41302
41389
  background: N.backgroundDark(),
41303
41390
  padding: 0,
41304
41391
  marginBottom: e.spacing(2),
41305
41392
  borderRadius: "4px"
41306
- })), JJ = M("div")(({ theme: e }) => ({
41393
+ })), rY = M("div")(({ theme: e }) => ({
41307
41394
  marginTop: "0px",
41308
41395
  background: N.backgroundDark(),
41309
41396
  padding: e.spacing(2),
@@ -41311,7 +41398,7 @@ var zJ = RJ(Me, "InputContainer") || RJ(HJ.InputContainer, "InputContainer"), BJ
41311
41398
  borderRadius: "4px",
41312
41399
  fontFamily: e.typography.fontFamily,
41313
41400
  cursor: "default"
41314
- })), YJ = M(hl)(({ theme: e }) => ({ paddingTop: e.spacing(1) })), XJ = {
41401
+ })), iY = M(hl)(({ theme: e }) => ({ paddingTop: e.spacing(1) })), aY = {
41315
41402
  type: L.default.oneOf([
41316
41403
  "default",
41317
41404
  "custom",
@@ -41319,11 +41406,11 @@ var zJ = RJ(Me, "InputContainer") || RJ(HJ.InputContainer, "InputContainer"), BJ
41319
41406
  ]),
41320
41407
  default: L.default.string,
41321
41408
  custom: L.default.string
41322
- }, ZJ = class extends pt.Component {
41409
+ }, oY = class extends pt.Component {
41323
41410
  static propTypes = {
41324
41411
  keys: L.default.arrayOf(L.default.string),
41325
41412
  label: L.default.string.isRequired,
41326
- feedback: L.default.shape(XJ).isRequired,
41413
+ feedback: L.default.shape(aY).isRequired,
41327
41414
  onChange: L.default.func.isRequired,
41328
41415
  toolbarOpts: L.default.object,
41329
41416
  mathMlOptions: L.default.object
@@ -41345,36 +41432,36 @@ var zJ = RJ(Me, "InputContainer") || RJ(HJ.InputContainer, "InputContainer"), BJ
41345
41432
  };
41346
41433
  render() {
41347
41434
  let { keys: e, label: t, feedback: n, toolbarOpts: r, mathMlOptions: i = {} } = this.props;
41348
- return /* @__PURE__ */ I(GJ, { children: [
41349
- /* @__PURE__ */ F(KJ, {
41435
+ return /* @__PURE__ */ I(eY, { children: [
41436
+ /* @__PURE__ */ F(tY, {
41350
41437
  label: t,
41351
41438
  extraClasses: { label: { transform: "translateY(-20%)" } },
41352
- children: /* @__PURE__ */ F(YJ, {
41353
- keys: e || Object.keys(WJ),
41439
+ children: /* @__PURE__ */ F(iY, {
41440
+ keys: e || Object.keys($J),
41354
41441
  label: t,
41355
41442
  value: n.type,
41356
41443
  onChange: this.changeType,
41357
- feedbackLabels: WJ
41444
+ feedbackLabels: $J
41358
41445
  })
41359
41446
  }),
41360
- n.type === "custom" && /* @__PURE__ */ F(qJ, { children: /* @__PURE__ */ F(UJ, {
41447
+ n.type === "custom" && /* @__PURE__ */ F(nY, { children: /* @__PURE__ */ F(QJ, {
41361
41448
  onChange: this.changeCustom,
41362
41449
  markup: n.custom || "",
41363
41450
  toolbarOpts: r,
41364
41451
  languageCharactersProps: [{ language: "spanish" }, { language: "special" }],
41365
41452
  mathMlOptions: i
41366
41453
  }) }),
41367
- n.type === "default" && /* @__PURE__ */ I(JJ, { children: [" ", n.default] })
41454
+ n.type === "default" && /* @__PURE__ */ I(rY, { children: [" ", n.default] })
41368
41455
  ] });
41369
41456
  }
41370
- }, QJ = O(/*#__PURE__*/ F("path", { d: "M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z" }), "ExpandMore"), $J = M("div")(() => ({
41457
+ }, sY = O(/*#__PURE__*/ F("path", { d: "M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z" }), "ExpandMore"), cY = M("div")(() => ({
41371
41458
  display: "flex",
41372
41459
  flex: 1,
41373
41460
  flexDirection: "column"
41374
- })), eY = M(Ti)(() => ({
41461
+ })), lY = M(Ti)(() => ({
41375
41462
  paddingTop: 0,
41376
41463
  paddingBottom: 0
41377
- })), tY = (e) => l({}, {
41464
+ })), uY = (e) => l({}, {
41378
41465
  correct: {
41379
41466
  type: "default",
41380
41467
  default: "Correct"
@@ -41387,21 +41474,21 @@ var zJ = RJ(Me, "InputContainer") || RJ(HJ.InputContainer, "InputContainer"), BJ
41387
41474
  type: "default",
41388
41475
  default: "Nearly"
41389
41476
  }
41390
- }, e), nY = class extends pt.Component {
41477
+ }, e), dY = class extends pt.Component {
41391
41478
  static propTypes = {
41392
41479
  allowPartial: L.default.bool,
41393
41480
  className: L.default.string,
41394
41481
  feedback: L.default.shape({
41395
- correct: L.default.shape(XJ),
41396
- incorrect: L.default.shape(XJ),
41397
- partial: L.default.shape(XJ)
41482
+ correct: L.default.shape(aY),
41483
+ incorrect: L.default.shape(aY),
41484
+ partial: L.default.shape(aY)
41398
41485
  }),
41399
41486
  onChange: L.default.func.isRequired,
41400
41487
  toolbarOpts: L.default.object
41401
41488
  };
41402
41489
  static defaultProps = {
41403
41490
  allowPartial: !0,
41404
- feedback: tY()
41491
+ feedback: uY()
41405
41492
  };
41406
41493
  onChange(e, t) {
41407
41494
  let { feedback: n, onChange: r } = this.props;
@@ -41423,22 +41510,22 @@ var zJ = RJ(Me, "InputContainer") || RJ(HJ.InputContainer, "InputContainer"), BJ
41423
41510
  exit: 195
41424
41511
  } } },
41425
41512
  children: [/* @__PURE__ */ F(Mi, {
41426
- expandIcon: /* @__PURE__ */ F(QJ, {}),
41513
+ expandIcon: /* @__PURE__ */ F(sY, {}),
41427
41514
  children: /* @__PURE__ */ F(Gi, { children: "Feedback" })
41428
- }), /* @__PURE__ */ F(eY, { children: /* @__PURE__ */ I($J, { children: [
41429
- /* @__PURE__ */ F(ZJ, {
41515
+ }), /* @__PURE__ */ F(lY, { children: /* @__PURE__ */ I(cY, { children: [
41516
+ /* @__PURE__ */ F(oY, {
41430
41517
  label: "If correct, show",
41431
41518
  feedback: n.correct,
41432
41519
  onChange: this.onCorrectChange,
41433
41520
  toolbarOpts: r
41434
41521
  }),
41435
- t && /* @__PURE__ */ F(ZJ, {
41522
+ t && /* @__PURE__ */ F(oY, {
41436
41523
  label: "If partially correct, show",
41437
41524
  feedback: n.partial,
41438
41525
  onChange: this.onPartialChange,
41439
41526
  toolbarOpts: r
41440
41527
  }),
41441
- /* @__PURE__ */ F(ZJ, {
41528
+ /* @__PURE__ */ F(oY, {
41442
41529
  label: "If incorrect, show",
41443
41530
  feedback: n.incorrect,
41444
41531
  onChange: this.onIncorrectChange,
@@ -41448,7 +41535,7 @@ var zJ = RJ(Me, "InputContainer") || RJ(HJ.InputContainer, "InputContainer"), BJ
41448
41535
  })
41449
41536
  });
41450
41537
  }
41451
- }, rY = M(Ac)(() => ({})), iY = class extends pt.Component {
41538
+ }, fY = M(Ac)(() => ({})), pY = class extends pt.Component {
41452
41539
  static propTypes = {
41453
41540
  className: L.default.string,
41454
41541
  contentClassName: L.default.string,
@@ -41469,7 +41556,7 @@ var zJ = RJ(Me, "InputContainer") || RJ(HJ.InputContainer, "InputContainer"), BJ
41469
41556
  indicatorColor: "primary",
41470
41557
  value: e,
41471
41558
  onChange: this.handleChange,
41472
- children: pt.Children.map(t, (e, t) => e && e.props.title ? /* @__PURE__ */ F(rY, { label: e.props.title }, t) : null)
41559
+ children: pt.Children.map(t, (e, t) => e && e.props.title ? /* @__PURE__ */ F(fY, { label: e.props.title }, t) : null)
41473
41560
  }), /* @__PURE__ */ F("div", {
41474
41561
  className: r,
41475
41562
  style: i,
@@ -41477,7 +41564,7 @@ var zJ = RJ(Me, "InputContainer") || RJ(HJ.InputContainer, "InputContainer"), BJ
41477
41564
  })]
41478
41565
  });
41479
41566
  }
41480
- }, aY = M(yo)(({ theme: e, mini: t }) => ({
41567
+ }, mY = M(yo)(({ theme: e, mini: t }) => ({
41481
41568
  margin: 0,
41482
41569
  marginLeft: 0,
41483
41570
  padding: 0,
@@ -41491,7 +41578,7 @@ var zJ = RJ(Me, "InputContainer") || RJ(HJ.InputContainer, "InputContainer"), BJ
41491
41578
  fontSize: e.typography.fontSize - 3
41492
41579
  }
41493
41580
  }
41494
- })), oY = M(Fa)(({ theme: e, mini: t, error: n }) => ({
41581
+ })), hY = M(Fa)(({ theme: e, mini: t, error: n }) => ({
41495
41582
  color: `${N.tertiary()} !important`,
41496
41583
  ...t && {
41497
41584
  margin: 0,
@@ -41500,9 +41587,9 @@ var zJ = RJ(Me, "InputContainer") || RJ(HJ.InputContainer, "InputContainer"), BJ
41500
41587
  height: e.spacing(3)
41501
41588
  },
41502
41589
  ...n && { color: `${e.palette.error.main} !important` }
41503
- })), sY = ({ mini: e, checked: t, onChange: n, value: r, label: i, error: a }) => /* @__PURE__ */ F(aY, {
41590
+ })), gY = ({ mini: e, checked: t, onChange: n, value: r, label: i, error: a }) => /* @__PURE__ */ F(mY, {
41504
41591
  mini: e,
41505
- control: /* @__PURE__ */ F(oY, {
41592
+ control: /* @__PURE__ */ F(hY, {
41506
41593
  checked: t,
41507
41594
  onChange: n,
41508
41595
  value: r,
@@ -41511,32 +41598,32 @@ var zJ = RJ(Me, "InputContainer") || RJ(HJ.InputContainer, "InputContainer"), BJ
41511
41598
  }),
41512
41599
  label: i
41513
41600
  });
41514
- sY.propTypes = {
41601
+ gY.propTypes = {
41515
41602
  mini: L.default.bool,
41516
41603
  checked: L.default.bool.isRequired,
41517
41604
  onChange: L.default.func.isRequired,
41518
41605
  value: L.default.string,
41519
41606
  label: L.default.string.isRequired,
41520
41607
  error: L.default.bool
41521
- }, sY.defaultProps = {
41608
+ }, gY.defaultProps = {
41522
41609
  value: "",
41523
41610
  mini: !1,
41524
41611
  error: !1
41525
41612
  };
41526
41613
  //#endregion
41527
41614
  //#region ../../lib-react/config-ui/dist/form-section.js
41528
- var cY = M("div")(({ theme: e }) => ({
41615
+ var _Y = M("div")(({ theme: e }) => ({
41529
41616
  marginTop: e.spacing(2),
41530
41617
  marginBottom: e.spacing(2)
41531
- })), lY = M(Gi)(({ theme: e }) => ({ marginBottom: e.spacing(1) })), uY = ({ className: e, label: t, children: n, labelExtraStyle: r }) => /* @__PURE__ */ I(cY, {
41618
+ })), vY = M(Gi)(({ theme: e }) => ({ marginBottom: e.spacing(1) })), yY = ({ className: e, label: t, children: n, labelExtraStyle: r }) => /* @__PURE__ */ I(_Y, {
41532
41619
  className: e,
41533
- children: [/* @__PURE__ */ F(lY, {
41620
+ children: [/* @__PURE__ */ F(vY, {
41534
41621
  variant: "subtitle1",
41535
41622
  style: r,
41536
41623
  children: t
41537
41624
  }), n]
41538
41625
  });
41539
- uY.propTypes = {
41626
+ yY.propTypes = {
41540
41627
  className: L.default.string,
41541
41628
  label: L.default.string,
41542
41629
  children: L.default.node,
@@ -41544,7 +41631,7 @@ uY.propTypes = {
41544
41631
  };
41545
41632
  //#endregion
41546
41633
  //#region ../../lib-react/config-ui/dist/number-text-field.js
41547
- var dY = (0, Jt.default)("@pie-lib:config-ui:number-text-field"), fY = M(al)(({ theme: e }) => ({
41634
+ var bY = (0, Jt.default)("@pie-lib:config-ui:number-text-field"), xY = M(al)(({ theme: e }) => ({
41548
41635
  marginRight: e.spacing(1),
41549
41636
  "& .MuiInputLabel-root": {
41550
41637
  width: "auto",
@@ -41566,11 +41653,11 @@ var dY = (0, Jt.default)("@pie-lib:config-ui:number-text-field"), fY = M(al)(({
41566
41653
  minHeight: "auto",
41567
41654
  padding: "6px 0 7px"
41568
41655
  }
41569
- })), pY = (e, t) => {
41656
+ })), SY = (e, t) => {
41570
41657
  if (!o(e) && !o(t)) return 0;
41571
41658
  if (!o(e) && o(t)) return t;
41572
41659
  if (o(e)) return e;
41573
- }, mY = class extends pt.Component {
41660
+ }, CY = class extends pt.Component {
41574
41661
  static propTypes = {
41575
41662
  disabled: L.default.bool,
41576
41663
  className: L.default.string,
@@ -41596,13 +41683,13 @@ var dY = (0, Jt.default)("@pie-lib:config-ui:number-text-field"), fY = M(al)(({
41596
41683
  this.setState({ value: t });
41597
41684
  }
41598
41685
  clamp(e, t = this.props.min, n = this.props.max) {
41599
- return o(e) ? (o(n) && (e = Math.min(e, n)), o(t) && (e = Math.max(e, t)), e) : pY(t, n);
41686
+ return o(e) ? (o(n) && (e = Math.min(e, n)), o(t) && (e = Math.max(e, t)), e) : SY(t, n);
41600
41687
  }
41601
41688
  onBlur = (e) => {
41602
41689
  let t = e.target.value, n = parseFloat(t);
41603
- dY("rawNumber: ", n);
41690
+ bY("rawNumber: ", n);
41604
41691
  let r = this.clamp(n);
41605
- dY("number: ", r), r !== this.state.value && (dY("trigger update..."), this.setState({ value: r.toString() }, () => {
41692
+ bY("number: ", r), r !== this.state.value && (bY("trigger update..."), this.setState({ value: r.toString() }, () => {
41606
41693
  this.props.onChange(e, r);
41607
41694
  }));
41608
41695
  };
@@ -41622,7 +41709,7 @@ var dY = (0, Jt.default)("@pie-lib:config-ui:number-text-field"), fY = M(al)(({
41622
41709
  };
41623
41710
  render() {
41624
41711
  let { className: e, label: t, disabled: n, suffix: r, min: i, max: a, inputClassName: o, disableUnderline: s, showErrorWhenOutsideRange: c, variant: l } = this.props, u = c && this.getError();
41625
- return /* @__PURE__ */ F(fY, {
41712
+ return /* @__PURE__ */ F(xY, {
41626
41713
  variant: s ? "filled" : l || "standard",
41627
41714
  inputRef: (e) => {
41628
41715
  this.inputRef = e;
@@ -41657,19 +41744,19 @@ var dY = (0, Jt.default)("@pie-lib:config-ui:number-text-field"), fY = M(al)(({
41657
41744
  };
41658
41745
  //#endregion
41659
41746
  //#region ../../lib-react/config-ui/dist/two-choice.js
41660
- function hY(e) {
41747
+ function wY(e) {
41661
41748
  return typeof e == "function" || typeof e == "object" && !!e && typeof e.$$typeof == "symbol";
41662
41749
  }
41663
- function gY(e, t) {
41664
- return !e || hY(e) ? e : hY(e.default) ? e.default : t && hY(e[t]) ? e[t] : t && hY(e[t]?.default) ? e[t].default : e;
41750
+ function TY(e, t) {
41751
+ return !e || wY(e) ? e : wY(e.default) ? e.default : t && wY(e[t]) ? e[t] : t && wY(e[t]?.default) ? e[t].default : e;
41665
41752
  }
41666
- var _Y = gY(Me, "InputContainer") || gY(bY.InputContainer, "InputContainer"), vY = Je, yY = vY.default, bY = yY && typeof yY == "object" ? yY : vY, xY = M("div")(({ theme: e, direction: t }) => ({
41753
+ var EY = TY(Me, "InputContainer") || TY(kY.InputContainer, "InputContainer"), DY = Je, OY = DY.default, kY = OY && typeof OY == "object" ? OY : DY, AY = M("div")(({ theme: e, direction: t }) => ({
41667
41754
  display: "flex",
41668
41755
  flexWrap: "wrap",
41669
41756
  paddingLeft: 0,
41670
41757
  marginTop: e.spacing(1),
41671
41758
  ...t === "vertical" && { flexDirection: "column" }
41672
- })), SY = class extends pt.Component {
41759
+ })), jY = class extends pt.Component {
41673
41760
  static propTypes = {
41674
41761
  header: L.default.string.isRequired,
41675
41762
  className: L.default.string,
@@ -41687,10 +41774,10 @@ var _Y = gY(Me, "InputContainer") || gY(bY.InputContainer, "InputContainer"), vY
41687
41774
  label: e,
41688
41775
  value: e
41689
41776
  } : e), s = n || dl;
41690
- return /* @__PURE__ */ F(_Y, {
41777
+ return /* @__PURE__ */ F(EY, {
41691
41778
  label: e,
41692
41779
  className: t,
41693
- children: /* @__PURE__ */ F(xY, {
41780
+ children: /* @__PURE__ */ F(AY, {
41694
41781
  direction: a,
41695
41782
  children: o.map((e, t) => /* @__PURE__ */ F(s, {
41696
41783
  value: e.value,
@@ -41701,7 +41788,7 @@ var _Y = gY(Me, "InputContainer") || gY(bY.InputContainer, "InputContainer"), vY
41701
41788
  })
41702
41789
  });
41703
41790
  }
41704
- }, CY = L.default.shape({
41791
+ }, MY = L.default.shape({
41705
41792
  label: L.default.string,
41706
41793
  value: L.default.string
41707
41794
  });
@@ -41710,14 +41797,14 @@ var _Y = gY(Me, "InputContainer") || gY(bY.InputContainer, "InputContainer"), vY
41710
41797
  header: L.default.string.isRequired,
41711
41798
  value: L.default.string.isRequired,
41712
41799
  onChange: L.default.func.isRequired,
41713
- one: L.default.oneOfType([CY, L.default.string]),
41714
- two: L.default.oneOfType([CY, L.default.string]),
41800
+ one: L.default.oneOfType([MY, L.default.string]),
41801
+ two: L.default.oneOfType([MY, L.default.string]),
41715
41802
  className: L.default.string,
41716
41803
  customLabel: L.default.func
41717
41804
  };
41718
41805
  render() {
41719
41806
  let { one: e, two: t, header: n, className: r, customLabel: i, value: a, onChange: o } = this.props;
41720
- return /* @__PURE__ */ F(SY, {
41807
+ return /* @__PURE__ */ F(jY, {
41721
41808
  customLabel: i,
41722
41809
  header: n,
41723
41810
  className: r,
@@ -41729,21 +41816,21 @@ var _Y = gY(Me, "InputContainer") || gY(bY.InputContainer, "InputContainer"), vY
41729
41816
  });
41730
41817
  //#endregion
41731
41818
  //#region ../../lib-react/config-ui/dist/_virtual/_rolldown/runtime.js
41732
- var wY = Object.defineProperty, TY = (e, t) => {
41819
+ var NY = Object.defineProperty, PY = (e, t) => {
41733
41820
  let n = {};
41734
- for (var r in e) wY(n, r, {
41821
+ for (var r in e) NY(n, r, {
41735
41822
  get: e[r],
41736
41823
  enumerable: !0
41737
41824
  });
41738
- return t || wY(n, Symbol.toStringTag, { value: "Module" }), n;
41739
- }, EY = M("div")(() => ({
41825
+ return t || NY(n, Symbol.toStringTag, { value: "Module" }), n;
41826
+ }, FY = M("div")(() => ({
41740
41827
  display: "flex",
41741
41828
  flexDirection: "column",
41742
41829
  position: "relative"
41743
- })), DY = M("div")(() => ({
41830
+ })), IY = M("div")(() => ({
41744
41831
  display: "flex",
41745
41832
  justifyContent: "space-between"
41746
- })), OY = M("div")(({ theme: e }) => ({ padding: `${e.spacing(2)} 0` })), kY = M("div")(() => ({ flex: "1" })), AY = M("div")(({ theme: e }) => ({ marginLeft: e.spacing(2) })), jY = class extends pt.Component {
41833
+ })), LY = M("div")(({ theme: e }) => ({ padding: `${e.spacing(2)} 0` })), RY = M("div")(() => ({ flex: "1" })), zY = M("div")(({ theme: e }) => ({ marginLeft: e.spacing(2) })), BY = class extends pt.Component {
41747
41834
  static propTypes = {
41748
41835
  mode: L.default.oneOf(["tabbed", "inline"]),
41749
41836
  secondary: L.default.oneOfType([L.default.arrayOf(L.default.node), L.default.node]),
@@ -41761,7 +41848,7 @@ var wY = Object.defineProperty, TY = (e, t) => {
41761
41848
  } catch (e) {
41762
41849
  console.log(e.toString());
41763
41850
  }
41764
- return /* @__PURE__ */ I(EY, {
41851
+ return /* @__PURE__ */ I(FY, {
41765
41852
  style: {
41766
41853
  minHeight: i,
41767
41854
  minWidth: a,
@@ -41769,28 +41856,28 @@ var wY = Object.defineProperty, TY = (e, t) => {
41769
41856
  maxWidth: s
41770
41857
  },
41771
41858
  children: [
41772
- e === "inline" && /* @__PURE__ */ I(DY, { children: [/* @__PURE__ */ F(kY, {
41859
+ e === "inline" && /* @__PURE__ */ I(IY, { children: [/* @__PURE__ */ F(RY, {
41773
41860
  className: "design-container",
41774
41861
  children: n
41775
- }), l && /* @__PURE__ */ F(AY, {
41862
+ }), l && /* @__PURE__ */ F(zY, {
41776
41863
  className: "settings-container",
41777
41864
  children: t
41778
41865
  })] }),
41779
- e === "tabbed" && l && /* @__PURE__ */ I(iY, {
41866
+ e === "tabbed" && l && /* @__PURE__ */ I(pY, {
41780
41867
  onChange: this.onTabsChange,
41781
41868
  contentClassName: "content-container",
41782
41869
  indicatorColor: "primary",
41783
- children: [/* @__PURE__ */ F(OY, {
41870
+ children: [/* @__PURE__ */ F(LY, {
41784
41871
  title: "Design",
41785
41872
  className: "design-container",
41786
41873
  children: n
41787
- }), /* @__PURE__ */ F(OY, {
41874
+ }), /* @__PURE__ */ F(LY, {
41788
41875
  title: "Settings",
41789
41876
  className: "settings-container",
41790
41877
  children: t
41791
41878
  })]
41792
41879
  }),
41793
- e === "tabbed" && !l && /* @__PURE__ */ F(OY, {
41880
+ e === "tabbed" && !l && /* @__PURE__ */ F(LY, {
41794
41881
  className: "design-container",
41795
41882
  children: n
41796
41883
  })
@@ -41800,18 +41887,18 @@ var wY = Object.defineProperty, TY = (e, t) => {
41800
41887
  };
41801
41888
  //#endregion
41802
41889
  //#region ../../lib-react/config-ui/dist/node_modules/.bun/@babel_runtime@7.29.7/node_modules/@babel/runtime/helpers/esm/extends.js
41803
- function MY() {
41804
- return MY = Object.assign ? Object.assign.bind() : function(e) {
41890
+ function VY() {
41891
+ return VY = Object.assign ? Object.assign.bind() : function(e) {
41805
41892
  for (var t = 1; t < arguments.length; t++) {
41806
41893
  var n = arguments[t];
41807
41894
  for (var r in n) ({}).hasOwnProperty.call(n, r) && (e[r] = n[r]);
41808
41895
  }
41809
41896
  return e;
41810
- }, MY.apply(null, arguments);
41897
+ }, VY.apply(null, arguments);
41811
41898
  }
41812
41899
  //#endregion
41813
41900
  //#region ../../lib-react/config-ui/dist/node_modules/.bun/@babel_runtime@7.29.7/node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js
41814
- function NY(e, t) {
41901
+ function HY(e, t) {
41815
41902
  if (e == null) return {};
41816
41903
  var n = {};
41817
41904
  for (var r in e) if ({}.hasOwnProperty.call(e, r)) {
@@ -41822,19 +41909,19 @@ function NY(e, t) {
41822
41909
  }
41823
41910
  //#endregion
41824
41911
  //#region ../../lib-react/config-ui/dist/node_modules/.bun/@babel_runtime@7.29.7/node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js
41825
- function PY(e, t) {
41826
- return PY = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(e, t) {
41912
+ function UY(e, t) {
41913
+ return UY = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(e, t) {
41827
41914
  return e.__proto__ = t, e;
41828
- }, PY(e, t);
41915
+ }, UY(e, t);
41829
41916
  }
41830
41917
  //#endregion
41831
41918
  //#region ../../lib-react/config-ui/dist/node_modules/.bun/@babel_runtime@7.29.7/node_modules/@babel/runtime/helpers/esm/inheritsLoose.js
41832
- function FY(e, t) {
41833
- e.prototype = Object.create(t.prototype), e.prototype.constructor = e, PY(e, t);
41919
+ function WY(e, t) {
41920
+ e.prototype = Object.create(t.prototype), e.prototype.constructor = e, UY(e, t);
41834
41921
  }
41835
41922
  //#endregion
41836
41923
  //#region ../../lib-react/config-ui/dist/node_modules/.bun/resize-observer-polyfill@1.5.1/node_modules/resize-observer-polyfill/dist/ResizeObserver.es.js
41837
- var IY = (function() {
41924
+ var GY = (function() {
41838
41925
  if (typeof Map < "u") return Map;
41839
41926
  function e(e, t) {
41840
41927
  var n = -1;
@@ -41873,34 +41960,34 @@ var IY = (function() {
41873
41960
  }
41874
41961
  }, t;
41875
41962
  }();
41876
- })(), LY = typeof window < "u" && typeof document < "u" && window.document === document, RY = (function() {
41963
+ })(), KY = typeof window < "u" && typeof document < "u" && window.document === document, qY = (function() {
41877
41964
  return typeof global < "u" && global.Math === Math ? global : typeof self < "u" && self.Math === Math ? self : typeof window < "u" && window.Math === Math ? window : Function("return this")();
41878
- })(), zY = (function() {
41879
- return typeof requestAnimationFrame == "function" ? requestAnimationFrame.bind(RY) : function(e) {
41965
+ })(), JY = (function() {
41966
+ return typeof requestAnimationFrame == "function" ? requestAnimationFrame.bind(qY) : function(e) {
41880
41967
  return setTimeout(function() {
41881
41968
  return e(Date.now());
41882
41969
  }, 1e3 / 60);
41883
41970
  };
41884
- })(), BY = 2;
41885
- function VY(e, t) {
41971
+ })(), YY = 2;
41972
+ function XY(e, t) {
41886
41973
  var n = !1, r = !1, i = 0;
41887
41974
  function a() {
41888
41975
  n && (n = !1, e()), r && s();
41889
41976
  }
41890
41977
  function o() {
41891
- zY(a);
41978
+ JY(a);
41892
41979
  }
41893
41980
  function s() {
41894
41981
  var e = Date.now();
41895
41982
  if (n) {
41896
- if (e - i < BY) return;
41983
+ if (e - i < YY) return;
41897
41984
  r = !0;
41898
41985
  } else n = !0, r = !1, setTimeout(o, t);
41899
41986
  i = e;
41900
41987
  }
41901
41988
  return s;
41902
41989
  }
41903
- var HY = 20, UY = [
41990
+ var ZY = 20, QY = [
41904
41991
  "top",
41905
41992
  "right",
41906
41993
  "bottom",
@@ -41909,9 +41996,9 @@ var HY = 20, UY = [
41909
41996
  "height",
41910
41997
  "size",
41911
41998
  "weight"
41912
- ], WY = typeof MutationObserver < "u", GY = function() {
41999
+ ], $Y = typeof MutationObserver < "u", eX = function() {
41913
42000
  function e() {
41914
- this.connected_ = !1, this.mutationEventsAdded_ = !1, this.mutationsObserver_ = null, this.observers_ = [], this.onTransitionEnd_ = this.onTransitionEnd_.bind(this), this.refresh = VY(this.refresh.bind(this), HY);
42001
+ this.connected_ = !1, this.mutationEventsAdded_ = !1, this.mutationsObserver_ = null, this.observers_ = [], this.onTransitionEnd_ = this.onTransitionEnd_.bind(this), this.refresh = XY(this.refresh.bind(this), ZY);
41915
42002
  }
41916
42003
  return e.prototype.addObserver = function(e) {
41917
42004
  ~this.observers_.indexOf(e) || this.observers_.push(e), this.connected_ || this.connect_();
@@ -41928,23 +42015,23 @@ var HY = 20, UY = [
41928
42015
  return e.broadcastActive();
41929
42016
  }), e.length > 0;
41930
42017
  }, e.prototype.connect_ = function() {
41931
- !LY || this.connected_ || (document.addEventListener("transitionend", this.onTransitionEnd_), window.addEventListener("resize", this.refresh), WY ? (this.mutationsObserver_ = new MutationObserver(this.refresh), this.mutationsObserver_.observe(document, {
42018
+ !KY || this.connected_ || (document.addEventListener("transitionend", this.onTransitionEnd_), window.addEventListener("resize", this.refresh), $Y ? (this.mutationsObserver_ = new MutationObserver(this.refresh), this.mutationsObserver_.observe(document, {
41932
42019
  attributes: !0,
41933
42020
  childList: !0,
41934
42021
  characterData: !0,
41935
42022
  subtree: !0
41936
42023
  })) : (document.addEventListener("DOMSubtreeModified", this.refresh), this.mutationEventsAdded_ = !0), this.connected_ = !0);
41937
42024
  }, e.prototype.disconnect_ = function() {
41938
- !LY || !this.connected_ || (document.removeEventListener("transitionend", this.onTransitionEnd_), window.removeEventListener("resize", this.refresh), this.mutationsObserver_ && this.mutationsObserver_.disconnect(), this.mutationEventsAdded_ && document.removeEventListener("DOMSubtreeModified", this.refresh), this.mutationsObserver_ = null, this.mutationEventsAdded_ = !1, this.connected_ = !1);
42025
+ !KY || !this.connected_ || (document.removeEventListener("transitionend", this.onTransitionEnd_), window.removeEventListener("resize", this.refresh), this.mutationsObserver_ && this.mutationsObserver_.disconnect(), this.mutationEventsAdded_ && document.removeEventListener("DOMSubtreeModified", this.refresh), this.mutationsObserver_ = null, this.mutationEventsAdded_ = !1, this.connected_ = !1);
41939
42026
  }, e.prototype.onTransitionEnd_ = function(e) {
41940
42027
  var t = e.propertyName, n = t === void 0 ? "" : t;
41941
- UY.some(function(e) {
42028
+ QY.some(function(e) {
41942
42029
  return !!~n.indexOf(e);
41943
42030
  }) && this.refresh();
41944
42031
  }, e.getInstance = function() {
41945
42032
  return this.instance_ ||= new e(), this.instance_;
41946
42033
  }, e.instance_ = null, e;
41947
- }(), KY = (function(e, t) {
42034
+ }(), tX = (function(e, t) {
41948
42035
  for (var n = 0, r = Object.keys(t); n < r.length; n++) {
41949
42036
  var i = r[n];
41950
42037
  Object.defineProperty(e, i, {
@@ -41955,19 +42042,19 @@ var HY = 20, UY = [
41955
42042
  });
41956
42043
  }
41957
42044
  return e;
41958
- }), qY = (function(e) {
41959
- return e && e.ownerDocument && e.ownerDocument.defaultView || RY;
41960
- }), JY = iX(0, 0, 0, 0);
41961
- function YY(e) {
42045
+ }), nX = (function(e) {
42046
+ return e && e.ownerDocument && e.ownerDocument.defaultView || qY;
42047
+ }), rX = pX(0, 0, 0, 0);
42048
+ function iX(e) {
41962
42049
  return parseFloat(e) || 0;
41963
42050
  }
41964
- function XY(e) {
42051
+ function aX(e) {
41965
42052
  return [...arguments].slice(1).reduce(function(t, n) {
41966
42053
  var r = e["border-" + n + "-width"];
41967
- return t + YY(r);
42054
+ return t + iX(r);
41968
42055
  }, 0);
41969
42056
  }
41970
- function ZY(e) {
42057
+ function oX(e) {
41971
42058
  for (var t = [
41972
42059
  "top",
41973
42060
  "right",
@@ -41975,40 +42062,40 @@ function ZY(e) {
41975
42062
  "left"
41976
42063
  ], n = {}, r = 0, i = t; r < i.length; r++) {
41977
42064
  var a = i[r], o = e["padding-" + a];
41978
- n[a] = YY(o);
42065
+ n[a] = iX(o);
41979
42066
  }
41980
42067
  return n;
41981
42068
  }
41982
- function QY(e) {
42069
+ function sX(e) {
41983
42070
  var t = e.getBBox();
41984
- return iX(0, 0, t.width, t.height);
42071
+ return pX(0, 0, t.width, t.height);
41985
42072
  }
41986
- function $Y(e) {
42073
+ function cX(e) {
41987
42074
  var t = e.clientWidth, n = e.clientHeight;
41988
- if (!t && !n) return JY;
41989
- var r = qY(e).getComputedStyle(e), i = ZY(r), a = i.left + i.right, o = i.top + i.bottom, s = YY(r.width), c = YY(r.height);
41990
- if (r.boxSizing === "border-box" && (Math.round(s + a) !== t && (s -= XY(r, "left", "right") + a), Math.round(c + o) !== n && (c -= XY(r, "top", "bottom") + o)), !tX(e)) {
42075
+ if (!t && !n) return rX;
42076
+ var r = nX(e).getComputedStyle(e), i = oX(r), a = i.left + i.right, o = i.top + i.bottom, s = iX(r.width), c = iX(r.height);
42077
+ if (r.boxSizing === "border-box" && (Math.round(s + a) !== t && (s -= aX(r, "left", "right") + a), Math.round(c + o) !== n && (c -= aX(r, "top", "bottom") + o)), !uX(e)) {
41991
42078
  var l = Math.round(s + a) - t, u = Math.round(c + o) - n;
41992
42079
  Math.abs(l) !== 1 && (s -= l), Math.abs(u) !== 1 && (c -= u);
41993
42080
  }
41994
- return iX(i.left, i.top, s, c);
42081
+ return pX(i.left, i.top, s, c);
41995
42082
  }
41996
- var eX = (function() {
42083
+ var lX = (function() {
41997
42084
  return typeof SVGGraphicsElement < "u" ? function(e) {
41998
- return e instanceof qY(e).SVGGraphicsElement;
42085
+ return e instanceof nX(e).SVGGraphicsElement;
41999
42086
  } : function(e) {
42000
- return e instanceof qY(e).SVGElement && typeof e.getBBox == "function";
42087
+ return e instanceof nX(e).SVGElement && typeof e.getBBox == "function";
42001
42088
  };
42002
42089
  })();
42003
- function tX(e) {
42004
- return e === qY(e).document.documentElement;
42090
+ function uX(e) {
42091
+ return e === nX(e).document.documentElement;
42005
42092
  }
42006
- function nX(e) {
42007
- return LY ? eX(e) ? QY(e) : $Y(e) : JY;
42093
+ function dX(e) {
42094
+ return KY ? lX(e) ? sX(e) : cX(e) : rX;
42008
42095
  }
42009
- function rX(e) {
42096
+ function fX(e) {
42010
42097
  var t = e.x, n = e.y, r = e.width, i = e.height, a = Object.create((typeof DOMRectReadOnly < "u" ? DOMRectReadOnly : Object).prototype);
42011
- return KY(a, {
42098
+ return tX(a, {
42012
42099
  x: t,
42013
42100
  y: n,
42014
42101
  width: r,
@@ -42019,7 +42106,7 @@ function rX(e) {
42019
42106
  left: t
42020
42107
  }), a;
42021
42108
  }
42022
- function iX(e, t, n, r) {
42109
+ function pX(e, t, n, r) {
42023
42110
  return {
42024
42111
  x: e,
42025
42112
  y: t,
@@ -42027,42 +42114,42 @@ function iX(e, t, n, r) {
42027
42114
  height: r
42028
42115
  };
42029
42116
  }
42030
- var aX = function() {
42117
+ var mX = function() {
42031
42118
  function e(e) {
42032
- this.broadcastWidth = 0, this.broadcastHeight = 0, this.contentRect_ = iX(0, 0, 0, 0), this.target = e;
42119
+ this.broadcastWidth = 0, this.broadcastHeight = 0, this.contentRect_ = pX(0, 0, 0, 0), this.target = e;
42033
42120
  }
42034
42121
  return e.prototype.isActive = function() {
42035
- var e = nX(this.target);
42122
+ var e = dX(this.target);
42036
42123
  return this.contentRect_ = e, e.width !== this.broadcastWidth || e.height !== this.broadcastHeight;
42037
42124
  }, e.prototype.broadcastRect = function() {
42038
42125
  var e = this.contentRect_;
42039
42126
  return this.broadcastWidth = e.width, this.broadcastHeight = e.height, e;
42040
42127
  }, e;
42041
- }(), oX = function() {
42128
+ }(), hX = function() {
42042
42129
  function e(e, t) {
42043
- var n = rX(t);
42044
- KY(this, {
42130
+ var n = fX(t);
42131
+ tX(this, {
42045
42132
  target: e,
42046
42133
  contentRect: n
42047
42134
  });
42048
42135
  }
42049
42136
  return e;
42050
- }(), sX = function() {
42137
+ }(), gX = function() {
42051
42138
  function e(e, t, n) {
42052
- if (this.activeObservations_ = [], this.observations_ = new IY(), typeof e != "function") throw TypeError("The callback provided as parameter 1 is not a function.");
42139
+ if (this.activeObservations_ = [], this.observations_ = new GY(), typeof e != "function") throw TypeError("The callback provided as parameter 1 is not a function.");
42053
42140
  this.callback_ = e, this.controller_ = t, this.callbackCtx_ = n;
42054
42141
  }
42055
42142
  return e.prototype.observe = function(e) {
42056
42143
  if (!arguments.length) throw TypeError("1 argument required, but only 0 present.");
42057
42144
  if (!(typeof Element > "u" || !(Element instanceof Object))) {
42058
- if (!(e instanceof qY(e).Element)) throw TypeError("parameter 1 is not of type \"Element\".");
42145
+ if (!(e instanceof nX(e).Element)) throw TypeError("parameter 1 is not of type \"Element\".");
42059
42146
  var t = this.observations_;
42060
- t.has(e) || (t.set(e, new aX(e)), this.controller_.addObserver(this), this.controller_.refresh());
42147
+ t.has(e) || (t.set(e, new mX(e)), this.controller_.addObserver(this), this.controller_.refresh());
42061
42148
  }
42062
42149
  }, e.prototype.unobserve = function(e) {
42063
42150
  if (!arguments.length) throw TypeError("1 argument required, but only 0 present.");
42064
42151
  if (!(typeof Element > "u" || !(Element instanceof Object))) {
42065
- if (!(e instanceof qY(e).Element)) throw TypeError("parameter 1 is not of type \"Element\".");
42152
+ if (!(e instanceof nX(e).Element)) throw TypeError("parameter 1 is not of type \"Element\".");
42066
42153
  var t = this.observations_;
42067
42154
  t.has(e) && (t.delete(e), t.size || this.controller_.removeObserver(this));
42068
42155
  }
@@ -42076,7 +42163,7 @@ var aX = function() {
42076
42163
  }, e.prototype.broadcastActive = function() {
42077
42164
  if (this.hasActive()) {
42078
42165
  var e = this.callbackCtx_, t = this.activeObservations_.map(function(e) {
42079
- return new oX(e.target, e.broadcastRect());
42166
+ return new hX(e.target, e.broadcastRect());
42080
42167
  });
42081
42168
  this.callback_.call(e, t, e), this.clearActive();
42082
42169
  }
@@ -42085,12 +42172,12 @@ var aX = function() {
42085
42172
  }, e.prototype.hasActive = function() {
42086
42173
  return this.activeObservations_.length > 0;
42087
42174
  }, e;
42088
- }(), cX = typeof WeakMap < "u" ? /* @__PURE__ */ new WeakMap() : new IY(), lX = function() {
42175
+ }(), _X = typeof WeakMap < "u" ? /* @__PURE__ */ new WeakMap() : new GY(), vX = function() {
42089
42176
  function e(t) {
42090
42177
  if (!(this instanceof e)) throw TypeError("Cannot call a class as a function.");
42091
42178
  if (!arguments.length) throw TypeError("1 argument required, but only 0 present.");
42092
- var n = new sX(t, GY.getInstance(), this);
42093
- cX.set(this, n);
42179
+ var n = new gX(t, eX.getInstance(), this);
42180
+ _X.set(this, n);
42094
42181
  }
42095
42182
  return e;
42096
42183
  }();
@@ -42099,27 +42186,27 @@ var aX = function() {
42099
42186
  "unobserve",
42100
42187
  "disconnect"
42101
42188
  ].forEach(function(e) {
42102
- lX.prototype[e] = function() {
42189
+ vX.prototype[e] = function() {
42103
42190
  var t;
42104
- return (t = cX.get(this))[e].apply(t, arguments);
42191
+ return (t = _X.get(this))[e].apply(t, arguments);
42105
42192
  };
42106
42193
  });
42107
- var uX = (function() {
42108
- return RY.ResizeObserver === void 0 ? lX : RY.ResizeObserver;
42109
- })(), dX = [
42194
+ var yX = (function() {
42195
+ return qY.ResizeObserver === void 0 ? vX : qY.ResizeObserver;
42196
+ })(), bX = [
42110
42197
  "client",
42111
42198
  "offset",
42112
42199
  "scroll",
42113
42200
  "bounds",
42114
42201
  "margin"
42115
42202
  ];
42116
- function fX(e) {
42203
+ function xX(e) {
42117
42204
  var t = [];
42118
- return dX.forEach(function(n) {
42205
+ return bX.forEach(function(n) {
42119
42206
  e[n] && t.push(n);
42120
42207
  }), t;
42121
42208
  }
42122
- function pX(e, t) {
42209
+ function SX(e, t) {
42123
42210
  var n = {};
42124
42211
  if (t.indexOf("client") > -1 && (n.client = {
42125
42212
  top: e.clientTop,
@@ -42158,14 +42245,14 @@ function pX(e, t) {
42158
42245
  }
42159
42246
  return n;
42160
42247
  }
42161
- function mX(e) {
42248
+ function CX(e) {
42162
42249
  return e && e.ownerDocument && e.ownerDocument.defaultView || window;
42163
42250
  }
42164
- function hX(e) {
42251
+ function wX(e) {
42165
42252
  return function(t) {
42166
42253
  var n, r;
42167
42254
  return r = n = /*#__PURE__*/ function(n) {
42168
- FY(r, n);
42255
+ WY(r, n);
42169
42256
  function r() {
42170
42257
  var t, r = [...arguments];
42171
42258
  return t = n.call.apply(n, [this].concat(r)) || this, t.state = { contentRect: {
@@ -42176,24 +42263,24 @@ function hX(e) {
42176
42263
  bounds: {},
42177
42264
  margin: {}
42178
42265
  } }, t._animationFrameID = null, t._resizeObserver = null, t._node = null, t._window = null, t.measure = function(n) {
42179
- var r = pX(t._node, e || fX(t.props));
42266
+ var r = SX(t._node, e || xX(t.props));
42180
42267
  n && (r.entry = n[0].contentRect), t._animationFrameID = t._window.requestAnimationFrame(function() {
42181
42268
  t._resizeObserver !== null && (t.setState({ contentRect: r }), typeof t.props.onResize == "function" && t.props.onResize(r));
42182
42269
  });
42183
42270
  }, t._handleRef = function(e) {
42184
- t._resizeObserver !== null && t._node !== null && t._resizeObserver.unobserve(t._node), t._node = e, t._window = mX(t._node);
42271
+ t._resizeObserver !== null && t._node !== null && t._resizeObserver.unobserve(t._node), t._node = e, t._window = CX(t._node);
42185
42272
  var n = t.props.innerRef;
42186
42273
  n && (typeof n == "function" ? n(t._node) : n.current = t._node), t._resizeObserver !== null && t._node !== null && t._resizeObserver.observe(t._node);
42187
42274
  }, t;
42188
42275
  }
42189
42276
  var i = r.prototype;
42190
42277
  return i.componentDidMount = function() {
42191
- this._resizeObserver = this._window !== null && this._window.ResizeObserver ? new this._window.ResizeObserver(this.measure) : new uX(this.measure), this._node !== null && (this._resizeObserver.observe(this._node), typeof this.props.onResize == "function" && this.props.onResize(pX(this._node, e || fX(this.props))));
42278
+ this._resizeObserver = this._window !== null && this._window.ResizeObserver ? new this._window.ResizeObserver(this.measure) : new yX(this.measure), this._node !== null && (this._resizeObserver.observe(this._node), typeof this.props.onResize == "function" && this.props.onResize(SX(this._node, e || xX(this.props))));
42192
42279
  }, i.componentWillUnmount = function() {
42193
42280
  this._window !== null && this._window.cancelAnimationFrame(this._animationFrameID), this._resizeObserver !== null && (this._resizeObserver.disconnect(), this._resizeObserver = null);
42194
42281
  }, i.render = function() {
42195
42282
  var e = this.props;
42196
- return e.innerRef, e.onResize, gt(t, MY({}, NY(e, ["innerRef", "onResize"]), {
42283
+ return e.innerRef, e.onResize, gt(t, VY({}, HY(e, ["innerRef", "onResize"]), {
42197
42284
  measureRef: this._handleRef,
42198
42285
  measure: this.measure,
42199
42286
  contentRect: this.state.contentRect
@@ -42210,7 +42297,7 @@ function hX(e) {
42210
42297
  }, r;
42211
42298
  };
42212
42299
  }
42213
- var gX = hX()(function(e) {
42300
+ var TX = wX()(function(e) {
42214
42301
  var t = e.measure, n = e.measureRef, r = e.contentRect, i = e.children;
42215
42302
  return i({
42216
42303
  measure: t,
@@ -42218,10 +42305,10 @@ var gX = hX()(function(e) {
42218
42305
  contentRect: r
42219
42306
  });
42220
42307
  });
42221
- gX.displayName = "Measure", gX.propTypes.children = L.default.func;
42308
+ TX.displayName = "Measure", TX.propTypes.children = L.default.func;
42222
42309
  //#endregion
42223
42310
  //#region ../../lib-react/config-ui/dist/layout/settings-box.js
42224
- var _X = M("div")(() => ({
42311
+ var EX = M("div")(() => ({
42225
42312
  backgroundColor: N.white(),
42226
42313
  border: `2px solid ${N.border()}`,
42227
42314
  display: "flex",
@@ -42231,7 +42318,7 @@ var _X = M("div")(() => ({
42231
42318
  maxWidth: "300px",
42232
42319
  padding: "20px 4px 4px 20px",
42233
42320
  zIndex: 99
42234
- })), vX = class extends pt.Component {
42321
+ })), DX = class extends pt.Component {
42235
42322
  static propTypes = {
42236
42323
  className: L.default.string,
42237
42324
  children: L.default.oneOfType([L.default.arrayOf(L.default.node), L.default.node]).isRequired
@@ -42239,19 +42326,19 @@ var _X = M("div")(() => ({
42239
42326
  static defaultProps = {};
42240
42327
  render() {
42241
42328
  let { className: e, children: t } = this.props;
42242
- return /* @__PURE__ */ F(_X, {
42329
+ return /* @__PURE__ */ F(EX, {
42243
42330
  className: e,
42244
42331
  children: t
42245
42332
  });
42246
42333
  }
42247
- }, yX = ut({
42334
+ }, OX = ut({
42248
42335
  typography: { fontFamily: "inherit" },
42249
42336
  components: { MuiButton: { styleOverrides: { contained: {
42250
42337
  backgroundColor: "#e0e0e0",
42251
42338
  color: "#000000",
42252
42339
  "&:hover": { backgroundColor: "#bdbdbd" }
42253
42340
  } } } }
42254
- }), bX = class extends pt.Component {
42341
+ }), kX = class extends pt.Component {
42255
42342
  static propTypes = {
42256
42343
  children: L.default.oneOfType([
42257
42344
  L.default.string,
@@ -42284,19 +42371,19 @@ var _X = M("div")(() => ({
42284
42371
  return /* @__PURE__ */ F(de, {
42285
42372
  injectFirst: !0,
42286
42373
  children: /* @__PURE__ */ F(Qe, {
42287
- theme: yX,
42288
- children: /* @__PURE__ */ F(gX, {
42374
+ theme: OX,
42375
+ children: /* @__PURE__ */ F(TX, {
42289
42376
  bounds: !0,
42290
42377
  onResize: this.onResize,
42291
42378
  children: ({ measureRef: e }) => {
42292
- let { children: t, settings: n, hideSettings: r, dimensions: i, extraCSSRules: a } = this.props, { layoutMode: o } = this.state, s = r ? null : o === "inline" ? /* @__PURE__ */ F(vX, {
42379
+ let { children: t, settings: n, hideSettings: r, dimensions: i, extraCSSRules: a } = this.props, { layoutMode: o } = this.state, s = r ? null : o === "inline" ? /* @__PURE__ */ F(DX, {
42293
42380
  className: "settings-box",
42294
42381
  children: n
42295
42382
  }) : n;
42296
42383
  return /* @__PURE__ */ I("div", {
42297
42384
  ref: e,
42298
42385
  className: "main-container extraCSSRules",
42299
- children: [a?.rules ? /* @__PURE__ */ F("style", { dangerouslySetInnerHTML: { __html: `.extraCSSRules { ${a.rules} }` } }) : null, /* @__PURE__ */ F(jY, {
42386
+ children: [a?.rules ? /* @__PURE__ */ F("style", { dangerouslySetInnerHTML: { __html: `.extraCSSRules { ${a.rules} }` } }) : null, /* @__PURE__ */ F(BY, {
42300
42387
  mode: o,
42301
42388
  secondary: s,
42302
42389
  dimensions: i,
@@ -42308,27 +42395,27 @@ var _X = M("div")(() => ({
42308
42395
  })
42309
42396
  });
42310
42397
  }
42311
- }, xX = hX("bounds")(bX), SX = /* @__PURE__ */ TY({
42312
- ConfigLayout: () => xX,
42313
- LayoutContents: () => jY
42314
- }), CX = M("div")(() => ({
42398
+ }, AX = wX("bounds")(kX), jX = /* @__PURE__ */ PY({
42399
+ ConfigLayout: () => AX,
42400
+ LayoutContents: () => BY
42401
+ }), MX = M("div")(() => ({
42315
42402
  display: "flex",
42316
42403
  width: "100%",
42317
42404
  justifyContent: "space-between"
42318
- })), wX = M(qe)(({ theme: e }) => ({
42405
+ })), NX = M(qe)(({ theme: e }) => ({
42319
42406
  color: "rgba(0, 0, 0, 0.89)",
42320
42407
  fontSize: e.typography.fontSize,
42321
42408
  paddingTop: e.spacing(2)
42322
- })), TX = M(Tc)(({ checked: e }) => ({
42409
+ })), PX = M(Tc)(({ checked: e }) => ({
42323
42410
  "&.Mui-checked .MuiSwitch-thumb": { color: `${N.tertiary()} !important` },
42324
42411
  "&.Mui-checked .MuiSwitch-track": { backgroundColor: `${N.tertiaryLight()} !important` },
42325
42412
  "& .MuiSwitch-track": { backgroundColor: e ? `${N.tertiaryLight()} !important` : void 0 }
42326
- })), EX = ({ checked: e, disabled: t, label: n, toggle: r }) => /* @__PURE__ */ I(CX, { children: [/* @__PURE__ */ F(wX, { children: n }), /* @__PURE__ */ F(TX, {
42413
+ })), FX = ({ checked: e, disabled: t, label: n, toggle: r }) => /* @__PURE__ */ I(MX, { children: [/* @__PURE__ */ F(NX, { children: n }), /* @__PURE__ */ F(PX, {
42327
42414
  checked: e,
42328
42415
  disabled: t,
42329
42416
  onChange: (e) => r(e.target.checked)
42330
42417
  })] });
42331
- EX.propTypes = {
42418
+ FX.propTypes = {
42332
42419
  checked: L.default.bool,
42333
42420
  disabled: L.default.bool,
42334
42421
  label: L.default.string.isRequired,
@@ -42336,20 +42423,20 @@ EX.propTypes = {
42336
42423
  };
42337
42424
  //#endregion
42338
42425
  //#region ../../lib-react/config-ui/dist/settings/settings-radio-label.js
42339
- var DX = M(yo)(({ theme: e }) => ({ "& .MuiFormControlLabel-label": {
42426
+ var IX = M(yo)(({ theme: e }) => ({ "& .MuiFormControlLabel-label": {
42340
42427
  color: "rgba(0, 0, 0, 0.89)",
42341
42428
  fontSize: e.typography.fontSize - 2,
42342
42429
  left: "-5px",
42343
42430
  position: "relative"
42344
- } })), OX = M(_c)(() => ({ color: `${N.tertiary()} !important` })), kX = ({ label: e, value: t, checked: n, onChange: r }) => /* @__PURE__ */ F(DX, {
42431
+ } })), LX = M(_c)(() => ({ color: `${N.tertiary()} !important` })), RX = ({ label: e, value: t, checked: n, onChange: r }) => /* @__PURE__ */ F(IX, {
42345
42432
  value: t,
42346
- control: /* @__PURE__ */ F(OX, {
42433
+ control: /* @__PURE__ */ F(LX, {
42347
42434
  checked: n,
42348
42435
  onChange: r
42349
42436
  }),
42350
42437
  label: e
42351
42438
  });
42352
- kX.propTypes = {
42439
+ RX.propTypes = {
42353
42440
  label: L.default.string,
42354
42441
  value: L.default.string,
42355
42442
  checked: L.default.bool,
@@ -42357,26 +42444,26 @@ kX.propTypes = {
42357
42444
  };
42358
42445
  //#endregion
42359
42446
  //#region ../../lib-react/config-ui/dist/settings/panel.js
42360
- var AX = (0, Jt.default)("pie-lib:config-ui:settings:panel"), jX = {
42447
+ var zX = (0, Jt.default)("pie-lib:config-ui:settings:panel"), BX = {
42361
42448
  label: L.default.string,
42362
42449
  value: L.default.string
42363
- }, MX = {
42450
+ }, VX = {
42364
42451
  label: L.default.string,
42365
42452
  value: L.default.string,
42366
42453
  onChange: L.default.func
42367
- }, NX = ({ label: e, value: t, onChange: n }) => /* @__PURE__ */ F(sY, {
42454
+ }, HX = ({ label: e, value: t, onChange: n }) => /* @__PURE__ */ F(gY, {
42368
42455
  checked: t,
42369
42456
  label: e,
42370
42457
  onChange: (e) => {
42371
42458
  n(e.target.checked);
42372
42459
  }
42373
42460
  });
42374
- NX.propTypes = {
42461
+ HX.propTypes = {
42375
42462
  label: L.default.string,
42376
42463
  value: L.default.bool,
42377
42464
  onChange: L.default.func
42378
42465
  };
42379
- var PX = M(SY)(({ theme: e }) => ({
42466
+ var UX = M(jY)(({ theme: e }) => ({
42380
42467
  marginTop: e.spacing(.5),
42381
42468
  paddingBottom: e.spacing(.5),
42382
42469
  width: "100%",
@@ -42387,29 +42474,29 @@ var PX = M(SY)(({ theme: e }) => ({
42387
42474
  marginTop: e.spacing(2.5)
42388
42475
  },
42389
42476
  "& > div": { marginTop: e.spacing(2.5) }
42390
- })), FX = ({ label: e, value: t, onChange: n, choices: r }) => /* @__PURE__ */ F(PX, {
42477
+ })), WX = ({ label: e, value: t, onChange: n, choices: r }) => /* @__PURE__ */ F(UX, {
42391
42478
  direction: "horizontal",
42392
- customLabel: kX,
42479
+ customLabel: RX,
42393
42480
  value: t,
42394
42481
  header: e,
42395
42482
  opts: r,
42396
42483
  onChange: n
42397
42484
  });
42398
- FX.propTypes = {
42399
- ...MX,
42400
- choices: L.default.arrayOf(L.default.shape(jX))
42485
+ WX.propTypes = {
42486
+ ...VX,
42487
+ choices: L.default.arrayOf(L.default.shape(BX))
42401
42488
  };
42402
- var IX = FX, LX = M("p")(({ theme: e }) => ({
42489
+ var GX = WX, KX = M("p")(({ theme: e }) => ({
42403
42490
  margin: 0,
42404
42491
  fontSize: e.typography.fontSize
42405
- })), RX = M(Xs)(({ theme: e }) => ({
42492
+ })), qX = M(Xs)(({ theme: e }) => ({
42406
42493
  marginTop: e.spacing(.5),
42407
42494
  border: "2px solid lightgrey",
42408
42495
  padding: `0 ${e.spacing(1)}`,
42409
42496
  borderRadius: "4px"
42410
- })), zX = ({ label: e, value: t, onChange: n, choices: r = [] }) => {
42497
+ })), JX = ({ label: e, value: t, onChange: n, choices: r = [] }) => {
42411
42498
  let i = (e) => typeof e == "string" ? e : e.label, a = (e) => typeof e == "string" ? e : e.value;
42412
- return /* @__PURE__ */ I("div", { children: [e && /* @__PURE__ */ F(LX, { children: e }), /* @__PURE__ */ F(RX, {
42499
+ return /* @__PURE__ */ I("div", { children: [e && /* @__PURE__ */ F(KX, { children: e }), /* @__PURE__ */ F(qX, {
42413
42500
  value: t || r && r[0],
42414
42501
  onChange: ({ target: e }) => n(e.value),
42415
42502
  input: /* @__PURE__ */ F(ko, { id: `dropdown-${e}` }),
@@ -42424,14 +42511,14 @@ var IX = FX, LX = M("p")(({ theme: e }) => ({
42424
42511
  }, t))
42425
42512
  })] });
42426
42513
  };
42427
- zX.propTypes = {
42428
- ...MX,
42514
+ JX.propTypes = {
42515
+ ...VX,
42429
42516
  choices: L.default.arrayOf(L.default.string)
42430
42517
  };
42431
- var BX = M(Gi)(({ theme: e }) => ({
42518
+ var YX = M(Gi)(({ theme: e }) => ({
42432
42519
  marginRight: e.spacing(3),
42433
42520
  marginTop: e.spacing(1)
42434
- })), VX = ({ label: e }) => /* @__PURE__ */ F(BX, { children: e }), HX = M(mY)(({ theme: e }) => ({
42521
+ })), XX = ({ label: e }) => /* @__PURE__ */ F(YX, { children: e }), ZX = M(CY)(({ theme: e }) => ({
42435
42522
  width: "35%",
42436
42523
  marginRight: e.spacing(3),
42437
42524
  marginTop: e.spacing(1),
@@ -42442,7 +42529,7 @@ var BX = M(Gi)(({ theme: e }) => ({
42442
42529
  padding: `0 ${e.spacing(1)}`,
42443
42530
  backgroundColor: "transparent"
42444
42531
  }
42445
- })), UX = ({ label: e, value: t, onChange: n = () => {}, suffix: r, min: i, max: a }) => /* @__PURE__ */ F(HX, {
42532
+ })), QX = ({ label: e, value: t, onChange: n = () => {}, suffix: r, min: i, max: a }) => /* @__PURE__ */ F(ZX, {
42446
42533
  variant: "standard",
42447
42534
  label: e || "Label",
42448
42535
  value: t,
@@ -42453,45 +42540,45 @@ var BX = M(Gi)(({ theme: e }) => ({
42453
42540
  showErrorWhenOutsideRange: !0,
42454
42541
  disableUnderline: !0
42455
42542
  });
42456
- UX.propTypes = {
42457
- ...MX,
42543
+ QX.propTypes = {
42544
+ ...VX,
42458
42545
  suffix: L.default.string,
42459
42546
  min: L.default.number,
42460
42547
  max: L.default.number,
42461
42548
  value: L.default.number
42462
- }, VX.propTypes = { ...MX };
42463
- var WX = ({ disabled: e, label: t, value: n, onChange: r }) => /* @__PURE__ */ F(EX, {
42549
+ }, XX.propTypes = { ...VX };
42550
+ var $X = ({ disabled: e, label: t, value: n, onChange: r }) => /* @__PURE__ */ F(FX, {
42464
42551
  label: t,
42465
42552
  checked: !!n,
42466
42553
  disabled: !!e,
42467
42554
  toggle: r
42468
42555
  });
42469
- WX.propTypes = {
42470
- ...MX,
42556
+ $X.propTypes = {
42557
+ ...VX,
42471
42558
  value: L.default.bool
42472
42559
  };
42473
- var GX = {
42474
- toggle: WX,
42475
- radio: IX,
42476
- dropdown: zX,
42477
- numberField: UX,
42478
- checkbox: NX,
42479
- textField: VX
42480
- }, KX = M("div")(({ theme: e }) => ({ margin: `0 0 ${e.spacing(2)} 0` })), qX = M("div")(({ theme: e }) => ({
42560
+ var eZ = {
42561
+ toggle: $X,
42562
+ radio: GX,
42563
+ dropdown: JX,
42564
+ numberField: QX,
42565
+ checkbox: HX,
42566
+ textField: XX
42567
+ }, tZ = M("div")(({ theme: e }) => ({ margin: `0 0 ${e.spacing(2)} 0` })), nZ = M("div")(({ theme: e }) => ({
42481
42568
  color: "#495B8F",
42482
42569
  fontSize: e.typography.fontSize + 2,
42483
42570
  fontWeight: 600,
42484
42571
  marginBottom: e.spacing(1)
42485
- })), JX = M("p")(({ theme: e }) => ({
42572
+ })), rZ = M("p")(({ theme: e }) => ({
42486
42573
  fontSize: e.typography.fontSize,
42487
42574
  marginBottom: 0
42488
- })), YX = (e) => {
42575
+ })), iZ = (e) => {
42489
42576
  let { model: t, label: n, group: r, configuration: i, onChange: a } = e, o = (e, n, r) => {
42490
42577
  let { isConfigProperty: o, ...s } = g(e, r || n), c = g(o ? i : t, n), l = {
42491
42578
  ...s,
42492
42579
  key: n,
42493
42580
  value: c
42494
- }, u = GX[l.type];
42581
+ }, u = eZ[l.type];
42495
42582
  return /* @__PURE__ */ F(u, {
42496
42583
  ...l,
42497
42584
  onChange: (e) => a(n, e, o)
@@ -42500,18 +42587,18 @@ var GX = {
42500
42587
  let n = e[t];
42501
42588
  if (!n) return null;
42502
42589
  let { type: r, label: i, fields: a, choices: s } = n;
42503
- return r === "numberFields" ? /* @__PURE__ */ I("div", { children: [/* @__PURE__ */ F(JX, { children: i }), Object.keys(a).map((n) => o(e, `${t}.${n}`, `${t}.fields.${n}`))] }, `numberField-${i}`) : r === "checkboxes" ? /* @__PURE__ */ I("div", { children: [/* @__PURE__ */ F("p", { children: i }), Object.keys(s).map((n) => o(e, `${t}.${n}`, `${t}.choices.${n}`))] }, `checkbox-${i}`) : o(e, t);
42590
+ return r === "numberFields" ? /* @__PURE__ */ I("div", { children: [/* @__PURE__ */ F(rZ, { children: i }), Object.keys(a).map((n) => o(e, `${t}.${n}`, `${t}.fields.${n}`))] }, `numberField-${i}`) : r === "checkboxes" ? /* @__PURE__ */ I("div", { children: [/* @__PURE__ */ F("p", { children: i }), Object.keys(s).map((n) => o(e, `${t}.${n}`, `${t}.choices.${n}`))] }, `checkbox-${i}`) : o(e, t);
42504
42591
  };
42505
- return /* @__PURE__ */ I(KX, { children: [/* @__PURE__ */ F(qX, { children: n }), Object.keys(r).map((e) => s(r, e))] });
42592
+ return /* @__PURE__ */ I(tZ, { children: [/* @__PURE__ */ F(nZ, { children: n }), Object.keys(r).map((e) => s(r, e))] });
42506
42593
  };
42507
- YX.propTypes = {
42594
+ iZ.propTypes = {
42508
42595
  model: L.default.object,
42509
42596
  label: L.default.string,
42510
42597
  group: L.default.object,
42511
42598
  configuration: L.default.object,
42512
42599
  onChange: L.default.func
42513
42600
  };
42514
- var XX = class extends pt.Component {
42601
+ var aZ = class extends pt.Component {
42515
42602
  static propTypes = {
42516
42603
  model: L.default.object,
42517
42604
  configuration: L.default.object,
@@ -42525,13 +42612,13 @@ var XX = class extends pt.Component {
42525
42612
  onChangeConfiguration: () => {}
42526
42613
  };
42527
42614
  change = (e, t, n = !1) => {
42528
- AX("[changeModel]", e, t);
42615
+ zX("[changeModel]", e, t);
42529
42616
  let { onChangeModel: r, onChangeConfiguration: i } = this.props, a = { ...this.props.model }, o = { ...this.props.configuration };
42530
42617
  n ? (f(o, e, t), i(o, e)) : (f(a, e, t), r(a, e));
42531
42618
  };
42532
42619
  render() {
42533
42620
  let { groups: e, model: t, configuration: n, modal: r } = this.props;
42534
- return AX("render:", t), /* @__PURE__ */ I("div", { children: [Object.keys(e || {}).map((r) => Object.entries(e[r]).some(([, e]) => !!e) ? /* @__PURE__ */ F(YX, {
42621
+ return zX("render:", t), /* @__PURE__ */ I("div", { children: [Object.keys(e || {}).map((r) => Object.entries(e[r]).some(([, e]) => !!e) ? /* @__PURE__ */ F(iZ, {
42535
42622
  label: r,
42536
42623
  model: t,
42537
42624
  configuration: n,
@@ -42539,59 +42626,59 @@ var XX = class extends pt.Component {
42539
42626
  onChange: this.change
42540
42627
  }, r) : null), r] });
42541
42628
  }
42542
- }, ZX = /* @__PURE__ */ TY({
42543
- Panel: () => XX,
42544
- checkbox: () => aZ,
42545
- checkboxes: () => oZ,
42546
- dropdown: () => nZ,
42547
- numberField: () => rZ,
42548
- numberFields: () => iZ,
42549
- radio: () => tZ,
42550
- textField: () => QX,
42551
- toggle: () => $X
42552
- }), QX = (e, t = !0) => ({
42629
+ }, oZ = /* @__PURE__ */ PY({
42630
+ Panel: () => aZ,
42631
+ checkbox: () => mZ,
42632
+ checkboxes: () => hZ,
42633
+ dropdown: () => dZ,
42634
+ numberField: () => fZ,
42635
+ numberFields: () => pZ,
42636
+ radio: () => uZ,
42637
+ textField: () => sZ,
42638
+ toggle: () => cZ
42639
+ }), sZ = (e, t = !0) => ({
42553
42640
  label: e,
42554
42641
  type: "textField",
42555
42642
  isConfigProperty: t
42556
- }), $X = (e, t = !1, n = !1) => ({
42643
+ }), cZ = (e, t = !1, n = !1) => ({
42557
42644
  type: "toggle",
42558
42645
  label: e,
42559
42646
  isConfigProperty: t,
42560
42647
  disabled: n
42561
- }), eZ = (e) => typeof e == "string" ? {
42648
+ }), lZ = (e) => typeof e == "string" ? {
42562
42649
  label: e,
42563
42650
  value: e
42564
- } : e, tZ = function() {
42651
+ } : e, uZ = function() {
42565
42652
  let [e, t, n = !1] = Array.prototype.slice.call(arguments);
42566
42653
  return {
42567
42654
  type: "radio",
42568
42655
  label: e,
42569
- choices: t && t.map((e) => eZ(e)),
42656
+ choices: t && t.map((e) => lZ(e)),
42570
42657
  isConfigProperty: n
42571
42658
  };
42572
- }, nZ = (e, t, n = !1) => ({
42659
+ }, dZ = (e, t, n = !1) => ({
42573
42660
  type: "dropdown",
42574
42661
  label: e,
42575
42662
  choices: t,
42576
42663
  isConfigProperty: n
42577
- }), rZ = (e, t, n = !1) => ({
42664
+ }), fZ = (e, t, n = !1) => ({
42578
42665
  ...t,
42579
42666
  label: e,
42580
42667
  type: "numberField",
42581
42668
  isConfigProperty: n
42582
- }), iZ = (e, t, n = !1) => (Object.keys(t).map((e) => {
42583
- t[e] = rZ(t[e].label, t[e], n);
42669
+ }), pZ = (e, t, n = !1) => (Object.keys(t).map((e) => {
42670
+ t[e] = fZ(t[e].label, t[e], n);
42584
42671
  }), {
42585
42672
  type: "numberFields",
42586
42673
  label: e,
42587
42674
  fields: t
42588
- }), aZ = (e, t, n = !1) => ({
42675
+ }), mZ = (e, t, n = !1) => ({
42589
42676
  ...t,
42590
42677
  label: e,
42591
42678
  type: "checkbox",
42592
42679
  isConfigProperty: n
42593
- }), oZ = (e, t, n = !1) => (Object.keys(t).map((e) => {
42594
- t[e] = aZ(t[e].label, t[e], n);
42680
+ }), hZ = (e, t, n = !1) => (Object.keys(t).map((e) => {
42681
+ t[e] = mZ(t[e].label, t[e], n);
42595
42682
  }), {
42596
42683
  type: "checkboxes",
42597
42684
  label: e,
@@ -42599,36 +42686,36 @@ var XX = class extends pt.Component {
42599
42686
  });
42600
42687
  //#endregion
42601
42688
  //#region ../../lib-react/config-ui/dist/index.js
42602
- function sZ(e) {
42689
+ function gZ(e) {
42603
42690
  return typeof e == "function" || typeof e == "object" && !!e && typeof e.$$typeof == "symbol";
42604
42691
  }
42605
- function cZ(e, t) {
42606
- return !e || sZ(e) ? e : sZ(e.default) ? e.default : t && sZ(e[t]) ? e[t] : t && sZ(e[t]?.default) ? e[t].default : e;
42692
+ function _Z(e, t) {
42693
+ return !e || gZ(e) ? e : gZ(e.default) ? e.default : t && gZ(e[t]) ? e[t] : t && gZ(e[t]?.default) ? e[t].default : e;
42607
42694
  }
42608
- var lZ = cZ(Me, "InputContainer") || cZ(fZ.InputContainer, "InputContainer"), uZ = Je, dZ = uZ.default, fZ = dZ && typeof dZ == "object" ? dZ : uZ, pZ = O(/*#__PURE__*/ F("path", { d: "M20 9H4v2h16zM4 15h16v-2H4z" }), "DragHandle"), mZ = O(/*#__PURE__*/ F("path", { d: "M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m5 11H7v-2h10z" }), "RemoveCircle");
42695
+ var vZ = _Z(Me, "InputContainer") || _Z(xZ.InputContainer, "InputContainer"), yZ = Je, bZ = yZ.default, xZ = bZ && typeof bZ == "object" ? bZ : yZ, SZ = O(/*#__PURE__*/ F("path", { d: "M20 9H4v2h16zM4 15h16v-2H4z" }), "DragHandle"), CZ = O(/*#__PURE__*/ F("path", { d: "M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m5 11H7v-2h10z" }), "RemoveCircle");
42609
42696
  //#endregion
42610
42697
  //#region src/author/choice-tile.tsx
42611
42698
  (0, Jt.default)("@pie-element:placement-ordering:configure:choice-tile");
42612
- var hZ = M("div")(({ theme: e }) => ({
42699
+ var wZ = M("div")(({ theme: e }) => ({
42613
42700
  margin: `${e.spacing(1)} 0`,
42614
42701
  backgroundColor: e.palette.background.paper,
42615
42702
  display: "flex",
42616
42703
  flexDirection: "column",
42617
42704
  cursor: "move",
42618
42705
  touchAction: "none"
42619
- })), gZ = M(IJ)(({ theme: e, isTargetPrompt: t }) => ({
42706
+ })), TZ = M(GJ)(({ theme: e, isTargetPrompt: t }) => ({
42620
42707
  width: "80%",
42621
42708
  borderRadius: "4px",
42622
42709
  ...t && { backgroundColor: e.palette.error.light }
42623
- })), _Z = M("div")(() => ({
42710
+ })), EZ = M("div")(() => ({
42624
42711
  display: "flex",
42625
42712
  justifyContent: "flex-end"
42626
- })), vZ = M(pZ)(({ theme: e }) => ({ color: e.palette.error[400] })), yZ = M("div")(({ theme: e }) => ({
42713
+ })), DZ = M(SZ)(({ theme: e }) => ({ color: e.palette.error[400] })), OZ = M("div")(({ theme: e }) => ({
42627
42714
  fontSize: e.typography.fontSize - 2,
42628
42715
  color: e.palette.error.main,
42629
42716
  marginLeft: e.spacing(5),
42630
42717
  marginTop: e.spacing(1)
42631
- })), bZ = M(mZ)(({ theme: e }) => ({ fill: e.palette.error[500] })), xZ = M(Ri)({ color: `${N.tertiary()} !important` }), SZ = (e) => {
42718
+ })), kZ = M(CZ)(({ theme: e }) => ({ fill: e.palette.error[500] })), AZ = M(Ri)({ color: `${N.tertiary()} !important` }), jZ = (e) => {
42632
42719
  let { choice: t, index: n, onChoiceChange: r, onDelete: i, imageSupport: a, spellCheck: o, toolbarOpts: s, pluginProps: c, maxImageWidth: l, maxImageHeight: u, error: d, mathMlOptions: f = {} } = e, { label: p, editable: m, type: h } = t, g = `${h}-${t.id}`, _ = `${h}-drop-${t.id}`, { attributes: v, listeners: y, setNodeRef: b, transform: x, isDragging: S } = Ne({
42633
42720
  id: g,
42634
42721
  data: {
@@ -42662,7 +42749,7 @@ var hZ = M("div")(({ theme: e }) => ({
42662
42749
  te(e.target) || y?.onPointerDown?.(e);
42663
42750
  },
42664
42751
  ...v,
42665
- children: /* @__PURE__ */ I(hZ, {
42752
+ children: /* @__PURE__ */ I(wZ, {
42666
42753
  style: ee,
42667
42754
  children: [/* @__PURE__ */ I("div", {
42668
42755
  style: {
@@ -42671,8 +42758,8 @@ var hZ = M("div")(({ theme: e }) => ({
42671
42758
  alignItems: "center"
42672
42759
  },
42673
42760
  children: [
42674
- /* @__PURE__ */ F(ya, { children: /* @__PURE__ */ F(vZ, {}) }),
42675
- /* @__PURE__ */ F(gZ, {
42761
+ /* @__PURE__ */ F(ya, { children: /* @__PURE__ */ F(DZ, {}) }),
42762
+ /* @__PURE__ */ F(TZ, {
42676
42763
  disabled: !m,
42677
42764
  placeholder: h !== "target" && !p.includes("data-latex") ? "Enter a choice" : "",
42678
42765
  markup: p,
@@ -42689,18 +42776,18 @@ var hZ = M("div")(({ theme: e }) => ({
42689
42776
  error: m && d,
42690
42777
  mathMlOptions: f
42691
42778
  }),
42692
- m && /* @__PURE__ */ F(_Z, { children: /* @__PURE__ */ F(xZ, {
42779
+ m && /* @__PURE__ */ F(EZ, { children: /* @__PURE__ */ F(AZ, {
42693
42780
  onClick: i,
42694
42781
  size: "large",
42695
- children: /* @__PURE__ */ F(bZ, {})
42782
+ children: /* @__PURE__ */ F(kZ, {})
42696
42783
  }) })
42697
42784
  ]
42698
- }), m && d && /* @__PURE__ */ F(yZ, { children: d })]
42785
+ }), m && d && /* @__PURE__ */ F(OZ, { children: d })]
42699
42786
  })
42700
42787
  })
42701
42788
  });
42702
42789
  };
42703
- SZ.propTypes = {
42790
+ jZ.propTypes = {
42704
42791
  id: L.default.any,
42705
42792
  maxImageHeight: L.default.object,
42706
42793
  maxImageWidth: L.default.object,
@@ -42728,24 +42815,24 @@ SZ.propTypes = {
42728
42815
  };
42729
42816
  //#endregion
42730
42817
  //#region src/author/choice-editor.tsx
42731
- function CZ(e) {
42818
+ function MZ(e) {
42732
42819
  return typeof e == "function" || typeof e == "object" && !!e && typeof e.$$typeof == "symbol";
42733
42820
  }
42734
- function wZ(e, t) {
42735
- return !e || CZ(e) ? e : CZ(e.default) ? e.default : t && CZ(e[t]) ? e[t] : t && CZ(e[t]?.default) ? e[t].default : e;
42821
+ function NZ(e, t) {
42822
+ return !e || MZ(e) ? e : MZ(e.default) ? e.default : t && MZ(e[t]) ? e[t] : t && MZ(e[t]?.default) ? e[t].default : e;
42736
42823
  }
42737
- var TZ = wZ(Me, "InputContainer") || wZ(OZ.InputContainer, "InputContainer"), EZ = Je, DZ = EZ.default, OZ = DZ && typeof DZ == "object" ? DZ : EZ;
42738
- function kZ(e) {
42824
+ var PZ = NZ(Me, "InputContainer") || NZ(LZ.InputContainer, "InputContainer"), FZ = Je, IZ = FZ.default, LZ = IZ && typeof IZ == "object" ? IZ : FZ;
42825
+ function RZ(e) {
42739
42826
  let t = 1, n = e.map((e) => e.id);
42740
42827
  for (; n.includes(`c${t}`);) t++;
42741
42828
  return t;
42742
42829
  }
42743
42830
  (0, Jt.default)("@pie-element:placement-ordering:configure:choice-editor");
42744
- var AZ = M("div")({
42831
+ var zZ = M("div")({
42745
42832
  display: "flex",
42746
42833
  alignItems: "center",
42747
42834
  justifyContent: "space-between"
42748
- }), jZ = M(Ae)(({ theme: e }) => ({
42835
+ }), BZ = M(Ae)(({ theme: e }) => ({
42749
42836
  marginTop: e.spacing(2.5),
42750
42837
  paddingLeft: e.spacing(1.5),
42751
42838
  paddingRight: e.spacing(1.5),
@@ -42753,19 +42840,19 @@ var AZ = M("div")({
42753
42840
  transition: "opacity 200ms linear",
42754
42841
  "&:hover": { opacity: .3 }
42755
42842
  }
42756
- })), MZ = M("div")({
42843
+ })), VZ = M("div")({
42757
42844
  gridAutoFlow: "column",
42758
42845
  display: "grid",
42759
42846
  gridGap: "10px",
42760
42847
  alignItems: "center"
42761
- }), NZ = M(TZ)(({ theme: e }) => ({
42848
+ }), HZ = M(PZ)(({ theme: e }) => ({
42762
42849
  width: "100%",
42763
42850
  paddingTop: e.spacing(2)
42764
- })), PZ = M("div")(({ theme: e }) => ({
42851
+ })), UZ = M("div")(({ theme: e }) => ({
42765
42852
  fontSize: e.typography.fontSize - 2,
42766
42853
  color: e.palette.error.main,
42767
42854
  paddingTop: e.spacing(1)
42768
- })), FZ = class extends pt.Component {
42855
+ })), WZ = class extends pt.Component {
42769
42856
  static propTypes = {
42770
42857
  correctResponse: L.default.array.isRequired,
42771
42858
  choices: L.default.array.isRequired,
@@ -42806,7 +42893,7 @@ var AZ = M("div")({
42806
42893
  text: `There can be maximum 10 ${r}.`
42807
42894
  } });
42808
42895
  else {
42809
- let r = `c${kZ(e)}`, i = {
42896
+ let r = `c${RZ(e)}`, i = {
42810
42897
  id: r,
42811
42898
  label: ""
42812
42899
  }, a = {
@@ -42826,13 +42913,13 @@ var AZ = M("div")({
42826
42913
  gridTemplateRows: `repeat(${t.length}, auto)`
42827
42914
  };
42828
42915
  return /* @__PURE__ */ I("div", { children: [
42829
- /* @__PURE__ */ I(MZ, {
42916
+ /* @__PURE__ */ I(VZ, {
42830
42917
  style: { gridTemplateColumns: "repeat(2, 1fr)" },
42831
- children: [/* @__PURE__ */ F(NZ, { label: `Student ${s || "Choices"}` }), /* @__PURE__ */ F(NZ, { label: "Correct Order" })]
42918
+ children: [/* @__PURE__ */ F(HZ, { label: `Student ${s || "Choices"}` }), /* @__PURE__ */ F(HZ, { label: "Correct Order" })]
42832
42919
  }),
42833
- /* @__PURE__ */ F(MZ, {
42920
+ /* @__PURE__ */ F(VZ, {
42834
42921
  style: _,
42835
- children: p.tiles.map((e, a) => /* @__PURE__ */ F(SZ, {
42922
+ children: p.tiles.map((e, a) => /* @__PURE__ */ F(jZ, {
42836
42923
  choice: e,
42837
42924
  index: a,
42838
42925
  imageSupport: n,
@@ -42849,13 +42936,13 @@ var AZ = M("div")({
42849
42936
  mathMlOptions: f
42850
42937
  }, `${e.type}-${e.id}`))
42851
42938
  }),
42852
- g && /* @__PURE__ */ F(PZ, { children: g }),
42853
- /* @__PURE__ */ I(AZ, { children: [/* @__PURE__ */ F(jZ, {
42939
+ g && /* @__PURE__ */ F(UZ, { children: g }),
42940
+ /* @__PURE__ */ I(zZ, { children: [/* @__PURE__ */ F(BZ, {
42854
42941
  onClick: this.shuffleChoices,
42855
42942
  size: "small",
42856
42943
  variant: "contained",
42857
42944
  children: `SHUFFLE ${o}`.toUpperCase()
42858
- }), /* @__PURE__ */ F(jZ, {
42945
+ }), /* @__PURE__ */ F(BZ, {
42859
42946
  onClick: this.addChoice,
42860
42947
  size: "small",
42861
42948
  variant: "contained",
@@ -42869,11 +42956,11 @@ var AZ = M("div")({
42869
42956
  })
42870
42957
  ] });
42871
42958
  }
42872
- }, IZ = () => "Validation requirements:\nThere should be at least 3 tokens.\nThe tokens should not be empty and should be unique.\nThe correct ordering should not be identical to the initial ordering.";
42873
- function LZ(e, t) {
42959
+ }, GZ = () => "Validation requirements:\nThere should be at least 3 tokens.\nThe tokens should not be empty and should be unique.\nThe correct ordering should not be identical to the initial ordering.";
42960
+ function KZ(e, t) {
42874
42961
  return e.type === "target" ? t.response.findIndex((t) => t.id === e.id) : e.type === "choice" ? t.choices.findIndex((t) => t.id === e.id) : -1;
42875
42962
  }
42876
- function RZ(e, t, n, r) {
42963
+ function qZ(e, t, n, r) {
42877
42964
  let { type: i, index: o } = n, { type: s, index: c } = r;
42878
42965
  if (i === "target" && s === "target") {
42879
42966
  let { movedItem: n, remainingItems: r } = (a(e) || []).reduce((e, t, n) => (n === o ? e.movedItem = t : e.remainingItems.push(t), e), {
@@ -42909,7 +42996,7 @@ function RZ(e, t, n, r) {
42909
42996
  choices: t
42910
42997
  };
42911
42998
  }
42912
- function zZ(e, t) {
42999
+ function JZ(e, t) {
42913
43000
  let n = t.map((t, n) => {
42914
43001
  let r = t && t.id;
42915
43002
  return {
@@ -42929,32 +43016,32 @@ function zZ(e, t) {
42929
43016
  }
42930
43017
  //#endregion
42931
43018
  //#region src/author/design.tsx
42932
- var BZ = (0, Jt.default)("@pie-element:placement-ordering:design"), { Panel: VZ, toggle: HZ, radio: UZ, dropdown: WZ } = ZX, GZ = (e) => Xt.default.isPlural(e) ? {
43019
+ var YZ = (0, Jt.default)("@pie-element:placement-ordering:design"), { Panel: XZ, toggle: ZZ, radio: QZ, dropdown: $Z } = oZ, eQ = (e) => Xt.default.isPlural(e) ? {
42933
43020
  singularLabel: Xt.default.singular(e),
42934
43021
  pluralLabel: e
42935
43022
  } : {
42936
43023
  singularLabel: e,
42937
43024
  pluralLabel: (0, Xt.default)(e)
42938
- }, KZ = M(lZ)(({ theme: e }) => ({
43025
+ }, tQ = M(vZ)(({ theme: e }) => ({
42939
43026
  width: "100%",
42940
43027
  paddingTop: e.spacing(2),
42941
43028
  marginBottom: e.spacing(2)
42942
- })), qZ = M("div")({
43029
+ })), nQ = M("div")({
42943
43030
  display: "grid",
42944
43031
  gridAutoFlow: "column",
42945
43032
  gridAutoColumns: "1fr",
42946
43033
  gridGap: "8px"
42947
- }), JZ = M(uY)(({ theme: e }) => ({
43034
+ }), rQ = M(yY)(({ theme: e }) => ({
42948
43035
  marginTop: 0,
42949
43036
  marginBottom: e.spacing(2.5)
42950
- })), YZ = M("div")({
43037
+ })), iQ = M("div")({
42951
43038
  display: "inline-flex",
42952
43039
  position: "absolute"
42953
- }), XZ = M("div")(({ theme: e }) => ({
43040
+ }), aQ = M("div")(({ theme: e }) => ({
42954
43041
  fontSize: e.typography.fontSize - 2,
42955
43042
  color: e.palette.error.main,
42956
43043
  paddingTop: e.spacing(1)
42957
- })), ZZ = class extends pt.Component {
43044
+ })), oQ = class extends pt.Component {
42958
43045
  static propTypes = { uploadSoundSupport: L.default.object };
42959
43046
  static defaultProps = {};
42960
43047
  constructor(e) {
@@ -42962,7 +43049,7 @@ var BZ = (0, Jt.default)("@pie-element:placement-ordering:design"), { Panel: VZ,
42962
43049
  let { model: t, onModelChanged: n } = this.props;
42963
43050
  n(e(a(t)));
42964
43051
  }, this.changeHandler = (e, t) => (n) => {
42965
- BZ("[changeHandler] value: ", n);
43052
+ YZ("[changeHandler] value: ", n);
42966
43053
  let r = t ? (0, Yt.get)(n, t) : n;
42967
43054
  this.applyUpdate((t) => ((0, Yt.set)(t, e, r), t));
42968
43055
  }, this.onPromptChange = this.changeHandler("prompt"), this.onTeacherInstructionsChange = this.changeHandler("teacherInstructions"), this.onRationaleChange = this.changeHandler("rationale"), this.onChoiceAreaLabelChange = this.changeHandler("choiceLabel", "target.value"), this.onAnswerAreaLabelChange = this.changeHandler("targetLabel", "target.value"), this.onFeedbackChange = this.changeHandler("feedback"), this.onChoiceEditorChange = (e, t) => {
@@ -42979,47 +43066,47 @@ var BZ = (0, Jt.default)("@pie-element:placement-ordering:design"), { Panel: VZ,
42979
43066
  if (!r || !n) return;
42980
43067
  let i = r.data.current, a = n.data.current, o = t.tiles.find((e) => e.id === a.id && e.type === a.type), s = i, c = {
42981
43068
  ...o,
42982
- index: LZ(o, t)
43069
+ index: KZ(o, t)
42983
43070
  }, l = {
42984
43071
  ...s,
42985
- index: LZ(s, t)
42986
- }, { response: u, choices: d } = RZ(t.response, t.choices, c, l);
43072
+ index: KZ(s, t)
43073
+ }, { response: u, choices: d } = qZ(t.response, t.choices, c, l);
42987
43074
  this.onChoiceEditorChange(d, u);
42988
43075
  };
42989
43076
  render() {
42990
43077
  let { model: e, imageSupport: t, uploadSoundSupport: n, onModelChanged: r, configuration: i, onConfigurationChanged: a } = this.props, { baseInputConfiguration: o = {}, choiceLabel: s = {}, choices: c = {}, contentDimensions: l = {}, feedback: u = {}, prompt: f = {}, placementArea: p = {}, maxImageWidth: m = {}, maxImageHeight: h = {}, numberedGuides: g = {}, orientation: _ = {}, partialScoring: v = {}, rationale: y = {}, removeTilesAfterPlacing: b = {}, settingsPanelDisabled: x, studentInstructions: S = {}, spellCheck: C = {}, scoringType: w = {}, targetLabel: ee = {}, teacherInstructions: T = {}, withRubric: te = {}, mathMlOptions: E = {}, language: ne = {}, languageChoices: re = {} } = i || {}, { choiceLabelEnabled: ie, errors: D, extraCSSRules: ae, feedbackEnabled: oe, promptEnabled: se, rationaleEnabled: ce, spellCheckEnabled: le, teacherInstructionsEnabled: ue, toolbarEditorPosition: O, correctResponse: de } = e || {}, { prompt: k, rationale: fe, teacherInstructions: pe } = D || {}, me = {
42991
43078
  choices: e.choices,
42992
43079
  response: !de || d(de) ? Array(e.choices.length) : de,
42993
- tiles: zZ(e.choices, de)
42994
- }, he = IZ(), { singularLabel: ge = "", pluralLabel: _e = "" } = c?.label && GZ(c.label) || {}, ve = m && m.prompt, ye = h && h.prompt, be = m && e.placementArea ? m.choicesWithPlacementArea : m.choicesWithoutPlacementArea || ve, xe = h && h.choices || ye, A = { position: O === "top" ? "top" : "bottom" }, Se = {
42995
- choiceLabelEnabled: s.settings && HZ(s.label),
42996
- placementArea: p.settings && HZ(p.label),
42997
- numberedGuides: g.settings && e.placementArea && HZ(g.label),
42998
- orientation: _.settings && UZ(_.label, ["vertical", "horizontal"]),
42999
- removeTilesAfterPlacing: b.settings && HZ(b.label),
43000
- partialScoring: v.settings && HZ(v.label),
43001
- feedbackEnabled: u.settings && HZ(u.label),
43002
- "language.enabled": ne.settings && HZ(ne.label, !0),
43003
- language: ne.settings && ne.enabled && WZ(re.label, re.options)
43080
+ tiles: JZ(e.choices, de)
43081
+ }, he = GZ(), { singularLabel: ge = "", pluralLabel: _e = "" } = c?.label && eQ(c.label) || {}, ve = m && m.prompt, ye = h && h.prompt, be = m && e.placementArea ? m.choicesWithPlacementArea : m.choicesWithoutPlacementArea || ve, xe = h && h.choices || ye, A = { position: O === "top" ? "top" : "bottom" }, Se = {
43082
+ choiceLabelEnabled: s.settings && ZZ(s.label),
43083
+ placementArea: p.settings && ZZ(p.label),
43084
+ numberedGuides: g.settings && e.placementArea && ZZ(g.label),
43085
+ orientation: _.settings && QZ(_.label, ["vertical", "horizontal"]),
43086
+ removeTilesAfterPlacing: b.settings && ZZ(b.label),
43087
+ partialScoring: v.settings && ZZ(v.label),
43088
+ feedbackEnabled: u.settings && ZZ(u.label),
43089
+ "language.enabled": ne.settings && ZZ(ne.label, !0),
43090
+ language: ne.settings && ne.enabled && $Z(re.label, re.options)
43004
43091
  }, j = {
43005
- teacherInstructionsEnabled: T.settings && HZ(T.label),
43006
- studentInstructionsEnabled: S.settings && HZ(S.label),
43007
- rationaleEnabled: y.settings && HZ(y.label),
43008
- promptEnabled: f.settings && HZ(f.label),
43009
- spellCheckEnabled: C.settings && HZ(C.label),
43010
- scoringType: w.settings && UZ(w.label, ["auto", "rubric"]),
43011
- rubricEnabled: te?.settings && HZ(te?.label)
43092
+ teacherInstructionsEnabled: T.settings && ZZ(T.label),
43093
+ studentInstructionsEnabled: S.settings && ZZ(S.label),
43094
+ rationaleEnabled: y.settings && ZZ(y.label),
43095
+ promptEnabled: f.settings && ZZ(f.label),
43096
+ spellCheckEnabled: C.settings && ZZ(C.label),
43097
+ scoringType: w.settings && QZ(w.label, ["auto", "rubric"]),
43098
+ rubricEnabled: te?.settings && ZZ(te?.label)
43012
43099
  }, Ce = (e = {}) => ({
43013
43100
  ...o,
43014
43101
  ...e
43015
43102
  });
43016
43103
  return /* @__PURE__ */ F(nt, {
43017
43104
  onDragEnd: (e) => this.onDragEnd(e, me),
43018
- children: /* @__PURE__ */ I(SX.ConfigLayout, {
43105
+ children: /* @__PURE__ */ I(jX.ConfigLayout, {
43019
43106
  extraCSSRules: ae,
43020
43107
  dimensions: l,
43021
43108
  hideSettings: x,
43022
- settings: /* @__PURE__ */ F(VZ, {
43109
+ settings: /* @__PURE__ */ F(XZ, {
43023
43110
  model: e,
43024
43111
  configuration: i,
43025
43112
  onChangeModel: (e) => r(e),
@@ -43030,9 +43117,9 @@ var BZ = (0, Jt.default)("@pie-element:placement-ordering:design"), { Panel: VZ,
43030
43117
  }
43031
43118
  }),
43032
43119
  children: [
43033
- ue && /* @__PURE__ */ I(KZ, {
43120
+ ue && /* @__PURE__ */ I(tQ, {
43034
43121
  label: T.label,
43035
- children: [/* @__PURE__ */ F(IJ, {
43122
+ children: [/* @__PURE__ */ F(GJ, {
43036
43123
  className: "prompt",
43037
43124
  markup: e.teacherInstructions || "",
43038
43125
  onChange: this.onTeacherInstructionsChange,
@@ -43052,9 +43139,9 @@ var BZ = (0, Jt.default)("@pie-element:placement-ordering:design"), { Panel: VZ,
43052
43139
  children: pe
43053
43140
  })]
43054
43141
  }),
43055
- se && /* @__PURE__ */ I(KZ, {
43142
+ se && /* @__PURE__ */ I(tQ, {
43056
43143
  label: f && f.label,
43057
- children: [/* @__PURE__ */ F(IJ, {
43144
+ children: [/* @__PURE__ */ F(GJ, {
43058
43145
  className: "prompt",
43059
43146
  markup: e.prompt,
43060
43147
  onChange: this.onPromptChange,
@@ -43073,11 +43160,11 @@ var BZ = (0, Jt.default)("@pie-element:placement-ordering:design"), { Panel: VZ,
43073
43160
  children: k
43074
43161
  })]
43075
43162
  }),
43076
- /* @__PURE__ */ I(JZ, {
43163
+ /* @__PURE__ */ I(rQ, {
43077
43164
  label: `Define ${_e}`,
43078
43165
  labelExtraStyle: { display: "inline-flex" },
43079
43166
  children: [
43080
- /* @__PURE__ */ F(YZ, { children: /* @__PURE__ */ F(pi, {
43167
+ /* @__PURE__ */ F(iQ, { children: /* @__PURE__ */ F(pi, {
43081
43168
  slotProps: { tooltip: { sx: {
43082
43169
  fontSize: 14,
43083
43170
  whiteSpace: "pre",
@@ -43093,9 +43180,9 @@ var BZ = (0, Jt.default)("@pie-element:placement-ordering:design"), { Panel: VZ,
43093
43180
  style: { marginLeft: "8px" }
43094
43181
  })
43095
43182
  }) }),
43096
- /* @__PURE__ */ I(qZ, { children: [ie && /* @__PURE__ */ F(KZ, {
43183
+ /* @__PURE__ */ I(nQ, { children: [ie && /* @__PURE__ */ F(tQ, {
43097
43184
  label: s && s.label && `${ge} label`,
43098
- children: /* @__PURE__ */ F(IJ, {
43185
+ children: /* @__PURE__ */ F(GJ, {
43099
43186
  ...e.placementArea && { autoWidthToolbar: !0 },
43100
43187
  className: "prompt",
43101
43188
  markup: e.choiceLabel,
@@ -43109,9 +43196,9 @@ var BZ = (0, Jt.default)("@pie-element:placement-ordering:design"), { Panel: VZ,
43109
43196
  languageCharactersProps: [{ language: "spanish" }, { language: "special" }],
43110
43197
  mathMlOptions: E
43111
43198
  })
43112
- }), ee.settings && e.placementArea && /* @__PURE__ */ F(KZ, {
43199
+ }), ee.settings && e.placementArea && /* @__PURE__ */ F(tQ, {
43113
43200
  label: ee && ee.label && ee.label,
43114
- children: /* @__PURE__ */ F(IJ, {
43201
+ children: /* @__PURE__ */ F(GJ, {
43115
43202
  autoWidthToolbar: !0,
43116
43203
  className: "prompt",
43117
43204
  markup: e.targetLabel,
@@ -43125,7 +43212,7 @@ var BZ = (0, Jt.default)("@pie-element:placement-ordering:design"), { Panel: VZ,
43125
43212
  mathMlOptions: E
43126
43213
  })
43127
43214
  })] }),
43128
- c.settings && /* @__PURE__ */ F(FZ, {
43215
+ c.settings && /* @__PURE__ */ F(WZ, {
43129
43216
  correctResponse: de,
43130
43217
  choices: e.choices,
43131
43218
  onChange: this.onChoiceEditorChange,
@@ -43145,9 +43232,9 @@ var BZ = (0, Jt.default)("@pie-element:placement-ordering:design"), { Panel: VZ,
43145
43232
  })
43146
43233
  ]
43147
43234
  }),
43148
- ce && /* @__PURE__ */ I(KZ, {
43235
+ ce && /* @__PURE__ */ I(tQ, {
43149
43236
  label: y.label,
43150
- children: [/* @__PURE__ */ F(IJ, {
43237
+ children: [/* @__PURE__ */ F(GJ, {
43151
43238
  className: "prompt",
43152
43239
  markup: e.rationale || "",
43153
43240
  onChange: this.onRationaleChange,
@@ -43161,9 +43248,9 @@ var BZ = (0, Jt.default)("@pie-element:placement-ordering:design"), { Panel: VZ,
43161
43248
  uploadSoundSupport: n,
43162
43249
  languageCharactersProps: [{ language: "spanish" }, { language: "special" }],
43163
43250
  mathMlOptions: E
43164
- }), fe && /* @__PURE__ */ F(XZ, { children: fe })]
43251
+ }), fe && /* @__PURE__ */ F(aQ, { children: fe })]
43165
43252
  }),
43166
- oe && /* @__PURE__ */ F(nY, {
43253
+ oe && /* @__PURE__ */ F(dY, {
43167
43254
  feedback: e.feedback,
43168
43255
  onChange: this.onFeedbackChange,
43169
43256
  imageSupport: t,
@@ -43174,10 +43261,10 @@ var BZ = (0, Jt.default)("@pie-element:placement-ordering:design"), { Panel: VZ,
43174
43261
  });
43175
43262
  }
43176
43263
  };
43177
- ZZ.defaultProps = {
43264
+ oQ.defaultProps = {
43178
43265
  onModelChanged: () => {},
43179
43266
  onConfigurationChanged: () => {}
43180
- }, ZZ.propTypes = {
43267
+ }, oQ.propTypes = {
43181
43268
  model: L.default.object.isRequired,
43182
43269
  configuration: L.default.object.isRequired,
43183
43270
  onModelChanged: L.default.func,
@@ -43186,7 +43273,7 @@ ZZ.defaultProps = {
43186
43273
  };
43187
43274
  //#endregion
43188
43275
  //#region src/author/defaults.ts
43189
- var QZ = {
43276
+ var sQ = {
43190
43277
  model: {
43191
43278
  choiceLabel: "",
43192
43279
  choiceLabelEnabled: !0,
@@ -43341,31 +43428,31 @@ var QZ = {
43341
43428
  options: []
43342
43429
  }
43343
43430
  }
43344
- }, $Z = (e, t) => ({
43345
- configuration: r(e, QZ.configuration),
43431
+ }, cQ = (e, t) => ({
43432
+ configuration: r(e, sQ.configuration),
43346
43433
  model: t
43347
- }), eQ = (e) => e && e.map((e) => e.weight === void 0 ? {
43434
+ }), lQ = (e) => e && e.map((e) => e.weight === void 0 ? {
43348
43435
  id: e.id || e,
43349
43436
  weight: 0
43350
43437
  } : {
43351
43438
  id: e.id,
43352
43439
  weight: e.weight
43353
- }), tQ = class e extends HTMLElement {
43440
+ }), uQ = class e extends HTMLElement {
43354
43441
  static createDefaultModel = (e = {}) => {
43355
- let t = eQ(e.correctResponse) || ((e) => e && e.map((e) => ({
43442
+ let t = lQ(e.correctResponse) || ((e) => e && e.map((e) => ({
43356
43443
  id: e.id,
43357
43444
  weight: 0
43358
43445
  })))(e.choices), n = {
43359
- ...QZ.model,
43446
+ ...sQ.model,
43360
43447
  ...e
43361
43448
  };
43362
43449
  return t && (n.correctResponse = t), n;
43363
43450
  };
43364
43451
  constructor() {
43365
- super(), this._root = null, this._model = e.createDefaultModel(), this._configuration = QZ.configuration, this.onModelChanged = (e, t) => {
43452
+ super(), this._root = null, this._model = e.createDefaultModel(), this._configuration = sQ.configuration, this.onModelChanged = (e, t) => {
43366
43453
  this._model = e, this._rerender(), this.dispatchUpdate(t);
43367
43454
  }, this.onConfigurationChanged = (e) => {
43368
- this._configuration = $Z(e).configuration, this.onModelChanged(this._model), this._rerender();
43455
+ this._configuration = cQ(e).configuration, this.onModelChanged(this._model), this._rerender();
43369
43456
  }, this.insertImage = (e) => {
43370
43457
  this.dispatchEvent(new Ut(e));
43371
43458
  }, this.deleteImage = (e, t) => {
@@ -43379,10 +43466,10 @@ var QZ = {
43379
43466
  this._model = e.createDefaultModel(t), this._rerender();
43380
43467
  }
43381
43468
  set configuration(e) {
43382
- let t = $Z(e, this._model);
43469
+ let t = cQ(e, this._model);
43383
43470
  this.onModelChanged(t.model);
43384
43471
  let n = {
43385
- ...QZ.configuration,
43472
+ ...sQ.configuration,
43386
43473
  ...t.configuration
43387
43474
  };
43388
43475
  this._configuration = n, n?.language?.enabled ? n?.languageChoices?.options?.length && (this._model.language = n?.languageChoices.options[0].value) : n.language.settings && this._model.language ? (this._configuration.language.enabled = !0, (!this._configuration.languageChoices.options || !this._configuration.languageChoices.options.length) && (this._configuration.languageChoices.options = []), this._configuration.languageChoices.options.find((e) => e.value === this._model.language) || this._configuration.languageChoices.options.push({
@@ -43397,7 +43484,7 @@ var QZ = {
43397
43484
  this.dispatchEvent(new Wt(e, t));
43398
43485
  }
43399
43486
  _rerender() {
43400
- let e = pt.createElement(ZZ, {
43487
+ let e = pt.createElement(oQ, {
43401
43488
  model: this._model,
43402
43489
  configuration: this._configuration,
43403
43490
  onModelChanged: this.onModelChanged,
@@ -43421,6 +43508,6 @@ var QZ = {
43421
43508
  }
43422
43509
  };
43423
43510
  //#endregion
43424
- export { eQ as addWeightToCorrectResponse, tQ as default };
43511
+ export { lQ as addWeightToCorrectResponse, uQ as default };
43425
43512
 
43426
43513
  //# sourceMappingURL=index.js.map