@pie-element/drawing-response 12.1.2-next.7 → 12.1.2-next.9

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.
@@ -1,5 +1,5 @@
1
1
  import { a as e, i as t, n, t as r } from "../browser-kkT1XVKw.js";
2
- import { $ as i, A as a, B as o, Ct as s, D as c, Dt as l, E as u, Et as d, F as f, G as p, H as m, I as h, J as g, K as _, L as v, M as y, N as b, O as x, Ot as S, P as C, Q as w, R as T, S as E, St as ee, T as te, Tt as D, U as ne, V as re, W as ie, X as ae, Y as oe, Z as se, _t as ce, a as le, at as ue, b as de, bt as fe, c as pe, ct as me, d as he, dt as ge, et as _e, f as ve, ft as ye, g as be, gt as xe, h as Se, ht as Ce, i as we, it as Te, j as Ee, k as De, kt as Oe, l as ke, lt as Ae, m as je, mt as Me, n as Ne, nt as Pe, o as Fe, ot as Ie, p as Le, pt as O, q as Re, r as ze, rt as Be, s as Ve, st as He, t as Ue, tt as We, ut as Ge, v as Ke, vt as qe, w as Je, wt as Ye, x as Xe, xt as Ze, y as Qe, yt as $e, z as et } from "../MenuItem-DVFofzMc.js";
2
+ import { $ as i, A as a, B as o, Ct as s, D as c, Dt as l, E as u, Et as d, F as f, G as p, H as m, I as h, J as g, K as _, L as v, M as y, N as b, O as x, Ot as S, P as C, Q as w, R as T, S as E, St as ee, T as te, Tt as D, U as ne, V as re, W as ie, X as ae, Y as oe, Z as se, _t as ce, a as le, at as ue, b as de, bt as fe, c as pe, ct as me, d as he, dt as ge, et as _e, f as ve, ft as ye, g as be, gt as xe, h as Se, ht as Ce, i as we, it as Te, j as Ee, k as De, kt as Oe, l as ke, lt as Ae, m as je, mt as Me, n as Ne, nt as Pe, o as Fe, ot as Ie, p as Le, pt as O, q as Re, r as ze, rt as Be, s as Ve, st as He, t as Ue, tt as We, ut as Ge, v as Ke, vt as qe, w as Je, wt as Ye, x as Xe, xt as Ze, y as Qe, yt as $e, z as et } from "../MenuItem-CiWoKjIT.js";
3
3
  import * as k from "react";
4
4
  import A, { Component as tt, createContext as nt, createElement as rt, createRef as it, forwardRef as at, memo as ot, useCallback as st, useContext as ct, useDebugValue as lt, useEffect as ut, useLayoutEffect as dt, useMemo as ft, useRef as pt, useState as mt, version as ht } from "react";
5
5
  import { createRoot as gt } from "react-dom/client";
@@ -38149,8 +38149,8 @@ Iy.create({
38149
38149
  })) ?? null };
38150
38150
  }
38151
38151
  });
38152
- var BK = "placeholder", VK = new Ul("tiptap__placeholder"), HK = 200;
38153
- function UK(e) {
38152
+ var BK = "placeholder", VK = new Ul("tiptap__placeholder");
38153
+ function HK(e) {
38154
38154
  let { editor: t, placeholder: n, dataAttribute: r, pos: i, node: a, isEmptyDoc: o, hasAnchor: s, classes: { emptyNode: c, emptyEditor: l } } = e, u = [c];
38155
38155
  return o && u.push(l), zh.node(i, i + a.nodeSize, {
38156
38156
  class: u.join(" "),
@@ -38162,156 +38162,198 @@ function UK(e) {
38162
38162
  }) : n
38163
38163
  });
38164
38164
  }
38165
- function WK({ editor: e, options: t, dataAttribute: n, doc: r, selection: i }) {
38165
+ function UK(e, t) {
38166
+ return typeof e == "function" ? e(t) : e;
38167
+ }
38168
+ function WK({ editor: e, options: t, dataAttribute: n, doc: r, selection: i, from: a, to: o }) {
38169
+ let { anchor: s } = i, c = [], l = e.isEmpty;
38170
+ return r.nodesBetween(a, o, (r, i) => {
38171
+ let a = s >= i && s <= i + r.nodeSize, o = !r.isLeaf && Wv(r);
38172
+ return r.type.isTextblock && (a || !t.showOnlyCurrent) && o && c.push(HK({
38173
+ editor: e,
38174
+ isEmptyDoc: l,
38175
+ dataAttribute: n,
38176
+ hasAnchor: a,
38177
+ placeholder: t.placeholder,
38178
+ classes: {
38179
+ emptyEditor: t.emptyEditorClass,
38180
+ emptyNode: UK(t.emptyNodeClass, {
38181
+ editor: e,
38182
+ node: r,
38183
+ pos: i,
38184
+ hasAnchor: a
38185
+ })
38186
+ },
38187
+ node: r,
38188
+ pos: i
38189
+ })), t.includeChildren;
38190
+ }), c;
38191
+ }
38192
+ function GK({ editor: e, options: t, dataAttribute: n, doc: r, selection: i }) {
38166
38193
  if (!(e.isEditable || !t.showOnlyWhenEditable)) return null;
38167
- let { anchor: a } = i, o = [], s = e.isEmpty, c = {
38168
- emptyEditor: t.emptyEditorClass,
38169
- emptyNode: t.emptyNodeClass
38170
- };
38194
+ let { anchor: a } = i, o = [], s = e.isEmpty;
38171
38195
  if (t.showOnlyCurrent && !t.includeChildren) {
38172
- let i = r.resolve(a), l = i.depth > 0 ? i.node(1) : i.nodeAfter, u = i.depth > 0 ? i.before(1) : a;
38173
- if (l && l.type.isTextblock && Wv(l)) {
38174
- let r = a >= u && a <= u + l.nodeSize;
38175
- o.push(UK({
38196
+ let i = r.resolve(a), c = i.depth > 0 ? i.node(1) : i.nodeAfter, l = i.depth > 0 ? i.before(1) : a;
38197
+ if (c && c.type.isTextblock && Wv(c)) {
38198
+ let r = a >= l && a <= l + c.nodeSize;
38199
+ o.push(HK({
38176
38200
  editor: e,
38177
38201
  isEmptyDoc: s,
38178
38202
  dataAttribute: n,
38179
38203
  hasAnchor: r,
38180
38204
  placeholder: t.placeholder,
38181
- classes: c,
38182
- node: l,
38183
- pos: u
38205
+ classes: {
38206
+ emptyEditor: t.emptyEditorClass,
38207
+ emptyNode: UK(t.emptyNodeClass, {
38208
+ editor: e,
38209
+ node: c,
38210
+ pos: l,
38211
+ hasAnchor: r
38212
+ })
38213
+ },
38214
+ node: c,
38215
+ pos: l
38184
38216
  }));
38185
38217
  }
38186
- } else {
38187
- let i = VK.getState(e.state), l = i?.topPos ?? 0, u = i?.bottomPos ?? r.content.size;
38188
- r.nodesBetween(l, u, (r, i) => {
38189
- let l = a >= i && a <= i + r.nodeSize, u = !r.isLeaf && Wv(r);
38190
- return r.type.isTextblock && (l || !t.showOnlyCurrent) && u && o.push(UK({
38191
- editor: e,
38192
- isEmptyDoc: s,
38193
- dataAttribute: n,
38194
- hasAnchor: l,
38195
- placeholder: t.placeholder,
38196
- classes: c,
38197
- node: r,
38198
- pos: i
38199
- })), t.includeChildren;
38200
- });
38201
- }
38218
+ } else o.push(...WK({
38219
+ editor: e,
38220
+ options: t,
38221
+ dataAttribute: n,
38222
+ doc: r,
38223
+ selection: i,
38224
+ from: 0,
38225
+ to: r.content.size
38226
+ }));
38202
38227
  return Hh.create(r, o);
38203
38228
  }
38204
- function GK(e) {
38205
- return e.replace(/\s+/g, "-").replace(/[^a-zA-Z0-9-]/g, "").replace(/^[0-9-]+/, "").replace(/^-+/, "").toLowerCase();
38229
+ function KK(e, t) {
38230
+ let n = e.resolve(t);
38231
+ if (n.depth === 0) {
38232
+ let e = n.nodeAfter ?? n.nodeBefore;
38233
+ if (!e) return {
38234
+ from: t,
38235
+ to: t
38236
+ };
38237
+ let r = n.nodeAfter ? t : t - e.nodeSize;
38238
+ return {
38239
+ from: r,
38240
+ to: r + e.nodeSize
38241
+ };
38242
+ }
38243
+ let r = n.before(1);
38244
+ return {
38245
+ from: r,
38246
+ to: r + n.node(1).nodeSize
38247
+ };
38206
38248
  }
38207
- function KK(e) {
38208
- let t = getComputedStyle(e), n = `${t.overflow} ${t.overflowY} ${t.overflowX}`;
38209
- return /auto|scroll|overlay/.test(n);
38249
+ function qK(e, t) {
38250
+ return {
38251
+ from: Math.max(0, t.from - 1),
38252
+ to: Math.min(e.content.size, t.to - 1)
38253
+ };
38210
38254
  }
38211
- function qK(e) {
38212
- let t = e;
38213
- for (; t;) {
38214
- if (KK(t)) return t;
38215
- let e = t.parentElement;
38216
- if (!e) {
38217
- let e = t.getRootNode();
38218
- if (e instanceof ShadowRoot) {
38219
- t = e.host;
38220
- continue;
38221
- }
38222
- return window;
38223
- }
38224
- t = e;
38255
+ function JK(e, t, n) {
38256
+ let r = [];
38257
+ return e.forEach((e, i) => {
38258
+ let a = i, o = a + e.nodeSize, s = a + 1, c = o + 1;
38259
+ s < n && c > t && r.push({
38260
+ from: a,
38261
+ to: o
38262
+ });
38263
+ }), r;
38264
+ }
38265
+ function YK(e) {
38266
+ if (e.length === 0) return [];
38267
+ let t = [...e].sort((e, t) => e.from - t.from), n = [{ ...t[0] }];
38268
+ for (let e = 1; e < t.length; e += 1) {
38269
+ let r = n[n.length - 1], i = t[e];
38270
+ i.from <= r.to ? r.to = Math.max(r.to, i.to) : n.push({ ...i });
38225
38271
  }
38226
- return window;
38272
+ return n;
38227
38273
  }
38228
- function JK(e) {
38229
- return e === window ? {
38230
- top: 0,
38231
- bottom: window.innerHeight
38232
- } : e.getBoundingClientRect();
38274
+ function XK(e, t) {
38275
+ let n = JK(e, t.from, t.to);
38276
+ return n.push(qK(e, KK(e, t.from))), t.to > t.from ? n.push(qK(e, KK(e, Math.min(t.to, e.content.size + 1) - 1))) : t.from < e.content.size + 1 && n.push(qK(e, KK(e, Math.min(t.from + 1, e.content.size)))), n;
38233
38277
  }
38234
- function YK({ doc: e, view: t, scrollContainer: n }) {
38235
- let r = t.dom.getBoundingClientRect(), i = n ? JK(n) : {
38236
- top: 0,
38237
- bottom: window.innerHeight
38238
- }, a = Math.max(r.top, i.top) - HK, o = Math.min(r.bottom, i.bottom) + HK;
38239
- if (a >= o) return {
38240
- top: 0,
38241
- bottom: e.content.size
38242
- };
38243
- let s = getComputedStyle(t.dom).direction === "rtl" ? Math.max(r.right - 2, r.left + 2) : r.left + 2, c = t.posAtCoords({
38244
- left: s,
38245
- top: a + 2
38246
- }), l = t.posAtCoords({
38247
- left: s,
38248
- top: o - 2
38249
- });
38250
- return {
38251
- top: c ? c.pos : 0,
38252
- bottom: l ? l.pos : e.content.size
38253
- };
38278
+ function ZK(e, t, n) {
38279
+ let r = [];
38280
+ if (e.docChanged) {
38281
+ let t = Nv(e);
38282
+ for (let e of t) r.push(...XK(n.doc, e.newRange));
38283
+ }
38284
+ return e.selectionSet && (r.push(qK(n.doc, KK(n.doc, e.mapping.map(t.selection.anchor)))), r.push(qK(n.doc, KK(n.doc, n.selection.anchor)))), YK(r);
38254
38285
  }
38255
- var XK = {
38256
- init() {
38257
- return {
38258
- topPos: null,
38259
- bottomPos: null
38260
- };
38261
- },
38262
- apply(e, t) {
38263
- let n = e.getMeta(VK);
38264
- return n?.positions ? {
38265
- topPos: n.positions.top,
38266
- bottomPos: n.positions.bottom
38267
- } : e.docChanged ? {
38268
- topPos: t.topPos === null ? null : e.mapping.map(t.topPos),
38269
- bottomPos: t.bottomPos === null ? null : e.mapping.map(t.bottomPos)
38270
- } : t;
38286
+ function QK(e, t, n) {
38287
+ let r = Math.max(0, Math.min(e, n.content.size));
38288
+ return {
38289
+ from: r,
38290
+ to: Math.max(r, Math.min(t, n.content.size))
38291
+ };
38292
+ }
38293
+ function $K({ decorations: e, ranges: t, editor: n, options: r, dataAttribute: i, doc: a, selection: o }) {
38294
+ let s = e;
38295
+ for (let e of t) {
38296
+ let { from: t, to: c } = QK(e.from, e.to, a), l = s.find(t, c).filter((e) => e.from >= t && e.to <= c);
38297
+ l.length && (s = s.remove(l));
38298
+ let u = WK({
38299
+ editor: n,
38300
+ options: r,
38301
+ dataAttribute: i,
38302
+ doc: a,
38303
+ selection: o,
38304
+ from: t,
38305
+ to: c
38306
+ });
38307
+ u.length && (s = s.add(a, u));
38271
38308
  }
38272
- };
38273
- function ZK(e) {
38274
- let t = qK(e.dom), n = () => {
38275
- let n = YK({
38276
- view: e,
38277
- doc: e.state.doc,
38278
- scrollContainer: t
38279
- }), r = VK.getState(e.state);
38280
- if (r?.topPos === n.top && r?.bottomPos === n.bottom) return;
38281
- let i = e.state.tr.setMeta(VK, { positions: n });
38282
- e.dispatch(i);
38283
- }, r = null, i = 0, a = () => {
38284
- r === null && (r = requestAnimationFrame(() => {
38285
- r = null;
38286
- let e = performance.now();
38287
- e - i >= 150 ? (i = e, n()) : a();
38288
- }));
38289
- };
38290
- return t.addEventListener("scroll", a, { passive: !0 }), n(), {
38291
- update(t, n) {
38292
- e.state.doc.content.size !== n.doc.content.size && a();
38309
+ return s;
38310
+ }
38311
+ function eq({ editor: e, options: t, dataAttribute: n }) {
38312
+ return {
38313
+ init(r, i) {
38314
+ return GK({
38315
+ editor: e,
38316
+ options: t,
38317
+ dataAttribute: n,
38318
+ doc: i.doc,
38319
+ selection: i.selection
38320
+ }) ?? Hh.empty;
38293
38321
  },
38294
- destroy: () => {
38295
- r !== null && cancelAnimationFrame(r), t.removeEventListener("scroll", a);
38322
+ apply(r, i, a, o) {
38323
+ return !r.docChanged && !r.selectionSet ? i : $K({
38324
+ decorations: i.map(r.mapping, r.doc),
38325
+ ranges: ZK(r, a, o),
38326
+ editor: e,
38327
+ options: t,
38328
+ dataAttribute: n,
38329
+ doc: o.doc,
38330
+ selection: o.selection
38331
+ });
38296
38332
  }
38297
38333
  };
38298
38334
  }
38299
- function QK({ editor: e, options: t }) {
38300
- let n = t.dataAttribute ? `data-${GK(t.dataAttribute)}` : `data-${BK}`;
38335
+ function tq(e) {
38336
+ return e.replace(/\s+/g, "-").replace(/[^a-zA-Z0-9-]/g, "").replace(/^[0-9-]+/, "").replace(/^-+/, "").toLowerCase();
38337
+ }
38338
+ function nq({ editor: e, options: t }) {
38339
+ let n = t.dataAttribute ? `data-${tq(t.dataAttribute)}` : `data-${BK}`, r = t.showOnlyCurrent && !t.includeChildren;
38301
38340
  return new z({
38302
38341
  key: VK,
38303
- state: XK,
38304
- view: ZK,
38305
- props: { decorations: ({ doc: r, selection: i }) => WK({
38342
+ ...r ? {} : { state: eq({
38343
+ editor: e,
38344
+ options: t,
38345
+ dataAttribute: n
38346
+ }) },
38347
+ props: { decorations: r ? ({ doc: r, selection: i }) => GK({
38306
38348
  editor: e,
38307
38349
  options: t,
38308
38350
  dataAttribute: n,
38309
38351
  doc: r,
38310
38352
  selection: i
38311
- }) }
38353
+ }) : (n) => t.showOnlyWhenEditable && !e.isEditable ? Hh.empty : VK.getState(n) ?? Hh.empty }
38312
38354
  });
38313
38355
  }
38314
- var $K = Iy.create({
38356
+ var rq = Iy.create({
38315
38357
  name: "placeholder",
38316
38358
  addOptions() {
38317
38359
  return {
@@ -38325,12 +38367,25 @@ var $K = Iy.create({
38325
38367
  };
38326
38368
  },
38327
38369
  addProseMirrorPlugins() {
38328
- return [QK({
38370
+ return [nq({
38329
38371
  editor: this.editor,
38330
38372
  options: this.options
38331
38373
  })];
38332
38374
  }
38333
38375
  });
38376
+ function iq(e, t) {
38377
+ return !e.selection.empty && !Gv(e.selection) && t.isEditable;
38378
+ }
38379
+ function aq(e, t) {
38380
+ return iq(e, t) && !t.isFocused && !t.view.dragging;
38381
+ }
38382
+ function oq() {
38383
+ var e;
38384
+ (e = window.getSelection()) == null || e.removeAllRanges();
38385
+ }
38386
+ function sq(e) {
38387
+ e.focus();
38388
+ }
38334
38389
  Iy.create({
38335
38390
  name: "selection",
38336
38391
  addOptions() {
@@ -38340,13 +38395,25 @@ Iy.create({
38340
38395
  let { editor: e, options: t } = this;
38341
38396
  return [new z({
38342
38397
  key: new Ul("selection"),
38343
- props: { decorations(n) {
38344
- return n.selection.empty || e.isFocused || !e.isEditable || Gv(n.selection) || e.view.dragging ? null : Hh.create(n.doc, [zh.inline(n.selection.from, n.selection.to, { class: t.className })]);
38345
- } }
38398
+ props: {
38399
+ decorations(n) {
38400
+ return aq(n, e) ? Hh.create(n.doc, [zh.inline(n.selection.from, n.selection.to, { class: t.className })]) : null;
38401
+ },
38402
+ handleDOMEvents: {
38403
+ blur(t) {
38404
+ return iq(t.state, e) && oq(), !1;
38405
+ },
38406
+ focus(t) {
38407
+ return iq(t.state, e) && requestAnimationFrame(() => {
38408
+ !e.isDestroyed && t.hasFocus() && sq(t);
38409
+ }), !1;
38410
+ }
38411
+ }
38412
+ }
38346
38413
  })];
38347
38414
  }
38348
38415
  });
38349
- function eq({ types: e, node: t }) {
38416
+ function cq({ types: e, node: t }) {
38350
38417
  return t && Array.isArray(e) && e.includes(t.type) || t?.type === e;
38351
38418
  }
38352
38419
  Iy.create({
@@ -38368,7 +38435,7 @@ Iy.create({
38368
38435
  state: {
38369
38436
  init: (e, t) => {
38370
38437
  let r = t.tr.doc.lastChild;
38371
- return !eq({
38438
+ return !cq({
38372
38439
  node: r,
38373
38440
  types: n
38374
38441
  });
@@ -38376,7 +38443,7 @@ Iy.create({
38376
38443
  apply: (e, t) => {
38377
38444
  if (!e.docChanged || e.getMeta("__uniqueIDTransaction")) return t;
38378
38445
  let r = e.doc.lastChild;
38379
- return !eq({
38446
+ return !cq({
38380
38447
  node: r,
38381
38448
  types: n
38382
38449
  });
@@ -38411,7 +38478,7 @@ Iy.create({
38411
38478
  };
38412
38479
  }
38413
38480
  });
38414
- var tq = Oy.create({
38481
+ var lq = Oy.create({
38415
38482
  name: "superscript",
38416
38483
  addOptions() {
38417
38484
  return { HTMLAttributes: {} };
@@ -38441,7 +38508,7 @@ var tq = Oy.create({
38441
38508
  addKeyboardShortcuts() {
38442
38509
  return { "Mod-.": () => this.editor.commands.toggleSuperscript() };
38443
38510
  }
38444
- }), nq = Oy.create({
38511
+ }), uq = Oy.create({
38445
38512
  name: "subscript",
38446
38513
  addOptions() {
38447
38514
  return { HTMLAttributes: {} };
@@ -38471,7 +38538,7 @@ var tq = Oy.create({
38471
38538
  addKeyboardShortcuts() {
38472
38539
  return { "Mod-,": () => this.editor.commands.toggleSubscript() };
38473
38540
  }
38474
- }), rq = Iy.create({
38541
+ }), dq = Iy.create({
38475
38542
  name: "textAlign",
38476
38543
  addOptions() {
38477
38544
  return {
@@ -38513,7 +38580,7 @@ var tq = Oy.create({
38513
38580
  "Mod-Shift-j": () => this.editor.commands.setTextAlign("justify")
38514
38581
  };
38515
38582
  }
38516
- }), iq = /(?:^|\s)(!\[(.+|:?)]\((\S+)(?:(?:\s+)["'](\S+)["'])?\))$/, aq = fb.create({
38583
+ }), fq = /(?:^|\s)(!\[(.+|:?)]\((\S+)(?:(?:\s+)["'](\S+)["'])?\))$/, pq = fb.create({
38517
38584
  name: "image",
38518
38585
  addOptions() {
38519
38586
  return {
@@ -38556,34 +38623,55 @@ var tq = Oy.create({
38556
38623
  },
38557
38624
  addNodeView() {
38558
38625
  if (!this.options.resize || !this.options.resize.enabled || typeof document > "u") return null;
38559
- let { directions: e, minWidth: t, minHeight: n, alwaysPreserveAspectRatio: r } = this.options.resize;
38560
- return ({ node: i, getPos: a, HTMLAttributes: o, editor: s }) => {
38561
- let c = document.createElement("img");
38562
- Object.entries(o).forEach(([e, t]) => {
38626
+ let { directions: e, minWidth: t, minHeight: n, alwaysPreserveAspectRatio: r } = this.options.resize, i = /* @__PURE__ */ new Set([
38627
+ "src",
38628
+ "width",
38629
+ "height"
38630
+ ]);
38631
+ return ({ node: a, getPos: o, HTMLAttributes: s, editor: c }) => {
38632
+ let l = document.createElement("img");
38633
+ l.draggable = !1;
38634
+ let u = gv(this.options.HTMLAttributes, s);
38635
+ Object.entries(u).forEach(([e, t]) => {
38563
38636
  if (t != null) switch (e) {
38637
+ case "src":
38564
38638
  case "width":
38565
38639
  case "height": break;
38566
- default:
38567
- c.setAttribute(e, t);
38568
- break;
38640
+ default: l.setAttribute(e, t);
38569
38641
  }
38570
- }), c.src = o.src;
38571
- let l = new tb({
38572
- element: c,
38573
- editor: s,
38574
- node: i,
38575
- getPos: a,
38642
+ }), u.src !== null && (l.src = u.src);
38643
+ let d = { ...s }, f = (e) => {
38644
+ if (typeof e == "string" && e !== "") {
38645
+ l.getAttribute("src") !== e && (l.src = e);
38646
+ return;
38647
+ }
38648
+ l.hasAttribute("src") && l.removeAttribute("src"), l.src !== "" && (l.src = "");
38649
+ };
38650
+ f(s.src);
38651
+ let p = new tb({
38652
+ element: l,
38653
+ editor: c,
38654
+ node: a,
38655
+ getPos: o,
38576
38656
  onResize: (e, t) => {
38577
- c.style.width = `${e}px`, c.style.height = `${t}px`;
38657
+ l.style.width = `${e}px`, l.style.height = `${t}px`;
38578
38658
  },
38579
38659
  onCommit: (e, t) => {
38580
- let n = a();
38660
+ let n = o();
38581
38661
  n !== void 0 && this.editor.chain().setNodeSelection(n).updateAttributes(this.name, {
38582
38662
  width: e,
38583
38663
  height: t
38584
38664
  }).run();
38585
38665
  },
38586
- onUpdate: (e, t, n) => e.type === i.type,
38666
+ onUpdate: (e) => {
38667
+ if (e.type !== a.type) return !1;
38668
+ let t = _v(e, c.extensionManager.attributes.filter((t) => t.type === e.type.name));
38669
+ return Object.keys(d).forEach((e) => {
38670
+ !i.has(e) && !(e in t) && l.removeAttribute(e);
38671
+ }), Object.entries(t).forEach(([e, t]) => {
38672
+ i.has(e) || (t == null ? l.removeAttribute(e) : l.setAttribute(e, t));
38673
+ }), f(t.src), d = t, !0;
38674
+ },
38587
38675
  options: {
38588
38676
  directions: e,
38589
38677
  min: {
@@ -38592,10 +38680,10 @@ var tq = Oy.create({
38592
38680
  },
38593
38681
  preserveAspectRatio: r === !0
38594
38682
  }
38595
- }), u = l.dom;
38596
- return u.style.visibility = "hidden", u.style.pointerEvents = "none", c.onload = () => {
38597
- u.style.visibility = "", u.style.pointerEvents = "";
38598
- }, l;
38683
+ }), m = p.dom, h = () => {
38684
+ m.style.visibility = "", m.style.pointerEvents = "";
38685
+ };
38686
+ return m.style.visibility = "hidden", m.style.pointerEvents = "none", l.complete && l.naturalWidth > 0 ? h() : (l.onload = h, l.onerror = h), p;
38599
38687
  };
38600
38688
  },
38601
38689
  addCommands() {
@@ -38606,7 +38694,7 @@ var tq = Oy.create({
38606
38694
  },
38607
38695
  addInputRules() {
38608
38696
  return [Qy({
38609
- find: iq,
38697
+ find: fq,
38610
38698
  type: this.type,
38611
38699
  getAttributes: (e) => {
38612
38700
  let [, , t, n, r] = e;
@@ -38618,17 +38706,17 @@ var tq = Oy.create({
38618
38706
  }
38619
38707
  })];
38620
38708
  }
38621
- }), oq = $K, sq = {
38709
+ }), mq = rq, hq = {
38622
38710
  position: "bottom",
38623
38711
  alignment: "left",
38624
38712
  alwaysVisible: !1,
38625
38713
  showDone: !0,
38626
38714
  doneOn: "blur"
38627
- }, cq = {
38715
+ }, gq = {
38628
38716
  options: {},
38629
38717
  respAreaToolbar: () => {},
38630
38718
  onHandleAreaChange: () => {}
38631
- }, lq = [
38719
+ }, _q = [
38632
38720
  "bold",
38633
38721
  "italic",
38634
38722
  "underline",
@@ -38650,7 +38738,7 @@ var tq = Oy.create({
38650
38738
  "h3",
38651
38739
  "undo",
38652
38740
  "redo"
38653
- ], uq = {
38741
+ ], vq = {
38654
38742
  "--white": "#fff",
38655
38743
  "--black": "#2e2b29",
38656
38744
  "--black-contrast": "#110f0e",
@@ -38669,14 +38757,18 @@ var tq = Oy.create({
38669
38757
  "--red": "#ff5c33",
38670
38758
  "--red-light": "#ffebe5",
38671
38759
  "--shadow": "0px 12px 33px 0px rgba(0, 0, 0, .06),\n 0px 3.618px 9.949px 0px rgba(0, 0, 0, .04)"
38672
- }, dq = (e) => {
38760
+ }, yq = (e) => ({
38761
+ spellcheck: e ? "true" : "false",
38762
+ autocorrect: e ? "on" : "off",
38763
+ autocapitalize: e ? "on" : "off"
38764
+ }), bq = (e) => {
38673
38765
  let { showParagraphs: t, separateParagraphs: n } = e.pluginProps || {}, [r, i] = mt([]), [a, o] = mt(!1), { toolbarOpts: c } = e, l = st((e) => {
38674
38766
  i((t) => {
38675
38767
  let n = t.filter((t) => t.pos !== e);
38676
38768
  return n.length === 0 && o(!1), n;
38677
38769
  });
38678
38770
  }, [i]), u = {
38679
- ...sq,
38771
+ ...hq,
38680
38772
  ...c
38681
38773
  }, d = st((t) => {
38682
38774
  let n = t.getHTML();
@@ -38687,13 +38779,13 @@ var tq = Oy.create({
38687
38779
  e.onDone,
38688
38780
  u.doneOn
38689
38781
  ]), f = ft(() => ({
38690
- ...cq,
38782
+ ...gq,
38691
38783
  ...e.responseAreaProps,
38692
38784
  onInlineDropdownToolbarClose: d
38693
38785
  }), [e.responseAreaProps, d]), p = ft(() => {
38694
38786
  let { customPlugins: t, ...n } = e.pluginProps || {};
38695
38787
  t ||= [];
38696
- let r = (e.activePlugins || lq)?.filter((e) => {
38788
+ let r = (e.activePlugins || _q)?.filter((e) => {
38697
38789
  let t = No[e] || e, r = n[t] || {};
38698
38790
  return !r || !r.disabled;
38699
38791
  });
@@ -38711,103 +38803,112 @@ var tq = Oy.create({
38711
38803
  setKeypadInteraction: {},
38712
38804
  media: {}
38713
38805
  });
38714
- }, [e, f.type]), m = vO({
38715
- extensions: [
38716
- rq.configure({
38717
- types: [
38718
- "heading",
38719
- "paragraph",
38720
- "div",
38721
- "headingParagraph",
38722
- "h1",
38723
- "h2",
38724
- "h3",
38725
- "h4",
38726
- "h5",
38727
- "h6",
38728
- "td",
38729
- "th"
38730
- ],
38731
- alignments: [
38732
- "left",
38733
- "right",
38734
- "center",
38735
- "justify"
38736
- ]
38737
- }),
38738
- RK,
38739
- zK.configure({ limit: e.charactersLimit || 1e6 }),
38740
- OK.configure({ trailingNode: {
38806
+ }, [e, f.type]), m = [
38807
+ dq.configure({
38808
+ types: [
38809
+ "heading",
38810
+ "paragraph",
38811
+ "div",
38812
+ "headingParagraph",
38813
+ "h1",
38814
+ "h2",
38815
+ "h3",
38816
+ "h4",
38817
+ "h5",
38818
+ "h6",
38819
+ "td",
38820
+ "th"
38821
+ ],
38822
+ alignments: [
38823
+ "left",
38824
+ "right",
38825
+ "center",
38826
+ "justify"
38827
+ ]
38828
+ }),
38829
+ RK,
38830
+ zK.configure({ limit: e.charactersLimit || 1e6 }),
38831
+ OK.configure({
38832
+ trailingNode: {
38741
38833
  node: "paragraph",
38742
38834
  notAfter: ["paragraph", "div"]
38743
- } }),
38744
- ML,
38745
- WE,
38746
- NL,
38747
- GE,
38748
- KE,
38749
- oq.configure({
38750
- placeholder: e.placeholder,
38751
- showOnlyWhenEditable: !0,
38752
- showOnlyCurrent: !1,
38753
- includeChildren: !0
38754
- }),
38755
- BE,
38756
- wE,
38757
- UE,
38758
- HE,
38759
- gF.configure(f),
38760
- _F.configure(f),
38761
- yF.configure(f),
38762
- bF.configure(f),
38763
- vF.configure(f),
38764
- rI.configure({
38765
- toolbarOpts: u,
38766
- math: e.pluginProps?.math || {}
38767
- }),
38768
- nq,
38769
- tq,
38770
- aq,
38771
- wI.configure({
38772
- toolbarOpts: u,
38773
- imageHandling: {
38774
- disableImageAlignmentButtons: e.disableImageAlignmentButtons,
38775
- onDone: (t) => e.onDone?.(t.getHTML()),
38776
- onDelete: e.imageSupport && e.imageSupport.delete && ((t) => {
38777
- let { src: n } = t.attrs;
38778
- e.imageSupport.delete(n, (e) => {
38779
- l(t.pos);
38780
- });
38781
- }),
38782
- insertImageRequested: e.imageSupport && ((t, n, r) => {
38783
- let [o, c] = n, u = (n) => {
38784
- let r;
38785
- a && n && (r = e.onChange), l(c), r?.(t.getHTML());
38786
- };
38787
- t._insertingImage = !0, i((e) => [...e, o]), (() => {
38788
- let n = r(u), i = s(() => {
38789
- let e = () => window.removeEventListener("focus", i);
38790
- if (!t._insertingImage) {
38791
- e();
38792
- return;
38793
- }
38794
- l(c), t._insertingImage = !1, e();
38795
- }, 500);
38796
- window.addEventListener("focus", i), e.imageSupport.add(n);
38797
- })();
38798
- }),
38799
- maxImageWidth: e.maxImageWidth,
38800
- maxImageHeight: e.maxImageHeight
38801
- },
38802
- limit: 3
38803
- }),
38804
- GI.configure({ uploadSoundSupport: e.uploadSoundSupport }),
38805
- ZI.configure({ extraCSSRules: e.extraCSSRules })
38806
- ],
38835
+ },
38836
+ link: {
38837
+ autolink: !1,
38838
+ linkOnPaste: !1
38839
+ }
38840
+ }),
38841
+ ML,
38842
+ WE,
38843
+ NL,
38844
+ GE,
38845
+ KE,
38846
+ mq.configure({
38847
+ placeholder: e.placeholder,
38848
+ showOnlyWhenEditable: !0,
38849
+ showOnlyCurrent: !1,
38850
+ includeChildren: !0
38851
+ }),
38852
+ BE,
38853
+ wE,
38854
+ UE,
38855
+ HE,
38856
+ gF.configure(f),
38857
+ _F.configure(f),
38858
+ yF.configure(f),
38859
+ bF.configure(f),
38860
+ vF.configure(f),
38861
+ rI.configure({
38862
+ toolbarOpts: u,
38863
+ math: e.pluginProps?.math || {}
38864
+ }),
38865
+ uq,
38866
+ lq,
38867
+ pq,
38868
+ wI.configure({
38869
+ toolbarOpts: u,
38870
+ imageHandling: {
38871
+ disableImageAlignmentButtons: e.disableImageAlignmentButtons,
38872
+ onDone: (t) => e.onDone?.(t.getHTML()),
38873
+ onDelete: e.imageSupport && e.imageSupport.delete && ((t) => {
38874
+ let { src: n } = t.attrs;
38875
+ e.imageSupport.delete(n, (e) => {
38876
+ l(t.pos);
38877
+ });
38878
+ }),
38879
+ insertImageRequested: e.imageSupport && ((t, n, r) => {
38880
+ let [o, c] = n, u = (n) => {
38881
+ let r;
38882
+ a && n && (r = e.onChange), l(c), r?.(t.getHTML());
38883
+ };
38884
+ t._insertingImage = !0, i((e) => [...e, o]), (() => {
38885
+ let n = r(u), i = s(() => {
38886
+ let e = () => window.removeEventListener("focus", i);
38887
+ if (!t._insertingImage) {
38888
+ e();
38889
+ return;
38890
+ }
38891
+ l(c), t._insertingImage = !1, e();
38892
+ }, 500);
38893
+ window.addEventListener("focus", i), e.imageSupport.add(n);
38894
+ })();
38895
+ }),
38896
+ maxImageWidth: e.maxImageWidth,
38897
+ maxImageHeight: e.maxImageHeight
38898
+ },
38899
+ limit: 3
38900
+ }),
38901
+ GI.configure({ uploadSoundSupport: e.uploadSoundSupport }),
38902
+ ZI.configure({ extraCSSRules: e.extraCSSRules })
38903
+ ], h = e.spellCheck !== !1, g = vO({
38904
+ extensions: m,
38807
38905
  immediatelyRender: !1,
38808
- editorProps: { handleKeyDown(t, n) {
38809
- return e.onKeyDown ? e.onKeyDown(n) : !1;
38810
- } },
38906
+ editorProps: {
38907
+ attributes: yq(h),
38908
+ handleKeyDown(t, n) {
38909
+ return e.onKeyDown ? e.onKeyDown(n) : !1;
38910
+ }
38911
+ },
38811
38912
  editable: !e.disabled,
38812
38913
  content: Ro(e.markup),
38813
38914
  onUpdate: ({ editor: t, transaction: n }) => {
@@ -38818,22 +38919,29 @@ var tq = Oy.create({
38818
38919
  }
38819
38920
  }, [e.charactersLimit]);
38820
38921
  ut(() => {
38821
- e.editorRef && e.editorRef(m);
38822
- }, [e.editorRef, m]), ut(() => {
38823
- m?.setEditable(!e.disabled);
38824
- }, [e.disabled, m]), ut(() => {
38825
- if (!m) return;
38922
+ e.editorRef && e.editorRef(g);
38923
+ }, [e.editorRef, g]), ut(() => {
38924
+ g?.setEditable(!e.disabled);
38925
+ }, [e.disabled, g]), ut(() => {
38926
+ if (!g) return;
38927
+ let e = g.options?.editorProps, t = yq(h);
38928
+ e?.attributes?.spellcheck !== t.spellcheck && g.setOptions({ editorProps: {
38929
+ ...e,
38930
+ attributes: t
38931
+ } });
38932
+ }, [h, g]), ut(() => {
38933
+ if (!g) return;
38826
38934
  let t = Ro(e.markup);
38827
- t !== m.getHTML() && m.commands.setContent(t, { emitUpdate: !1 });
38828
- }, [e.markup, m]), ut(() => {
38829
- Object.entries(uq).forEach(([e, t]) => {
38935
+ t !== g.getHTML() && g.commands.setContent(t, { emitUpdate: !1 });
38936
+ }, [e.markup, g]), ut(() => {
38937
+ Object.entries(vq).forEach(([e, t]) => {
38830
38938
  document.documentElement.style.setProperty(e, t);
38831
38939
  });
38832
38940
  }, []);
38833
- let h = mO({
38834
- editor: m,
38941
+ let _ = mO({
38942
+ editor: g,
38835
38943
  selector: (e) => ({ isFocused: e.editor?.isFocused })
38836
- }), g = ft(() => {
38944
+ }), v = ft(() => {
38837
38945
  let { minWidth: t, width: n, maxWidth: r, minHeight: i, height: a, maxHeight: o } = e;
38838
38946
  return {
38839
38947
  width: PL(n),
@@ -38848,20 +38956,20 @@ var tq = Oy.create({
38848
38956
  ...e,
38849
38957
  activePlugins: p,
38850
38958
  toolbarOpts: u,
38851
- editorState: h,
38852
- editor: m,
38853
- children: m && /* @__PURE__ */ j(fq, {
38959
+ editorState: _,
38960
+ editor: g,
38961
+ children: g && /* @__PURE__ */ j(xq, {
38854
38962
  style: {
38855
- minHeight: g.minHeight,
38856
- height: g.height,
38857
- maxHeight: g.maxHeight
38963
+ minHeight: v.minHeight,
38964
+ height: v.height,
38965
+ maxHeight: v.maxHeight
38858
38966
  },
38859
38967
  showParagraph: t && !t.disabled,
38860
38968
  separateParagraph: n && !n.disabled,
38861
- editor: m
38969
+ editor: g
38862
38970
  })
38863
38971
  });
38864
- }, fq = i(dO, { shouldForwardProp: (e) => !["showParagraph", "separateParagraph"].includes(e) })(({ showParagraph: e, separateParagraph: t }) => ({
38972
+ }, xq = i(dO, { shouldForwardProp: (e) => !["showParagraph", "separateParagraph"].includes(e) })(({ showParagraph: e, separateParagraph: t }) => ({
38865
38973
  display: "flex",
38866
38974
  outline: "none !important",
38867
38975
  "& .ProseMirror": {
@@ -38889,7 +38997,7 @@ var tq = Oy.create({
38889
38997
  } },
38890
38998
  ...t && { "& > p:has(+ p)": { marginBottom: "1em" } }
38891
38999
  }
38892
- })), pq = dq, mq = i(Xa)(() => ({})), hq = class extends A.Component {
39000
+ })), Sq = bq, Cq = i(Xa)(() => ({})), wq = class extends A.Component {
38893
39001
  static propTypes = {
38894
39002
  className: N.default.string,
38895
39003
  contentClassName: N.default.string,
@@ -38910,7 +39018,7 @@ var tq = Oy.create({
38910
39018
  indicatorColor: "primary",
38911
39019
  value: e,
38912
39020
  onChange: this.handleChange,
38913
- children: A.Children.map(t, (e, t) => e && e.props.title ? /* @__PURE__ */ j(mq, { label: e.props.title }, t) : null)
39021
+ children: A.Children.map(t, (e, t) => e && e.props.title ? /* @__PURE__ */ j(Cq, { label: e.props.title }, t) : null)
38914
39022
  }), /* @__PURE__ */ j("div", {
38915
39023
  className: r,
38916
39024
  style: i,
@@ -38918,7 +39026,7 @@ var tq = Oy.create({
38918
39026
  })]
38919
39027
  });
38920
39028
  }
38921
- }, gq = i(Ii)(({ theme: e, mini: t }) => ({
39029
+ }, Tq = i(Ii)(({ theme: e, mini: t }) => ({
38922
39030
  margin: 0,
38923
39031
  marginLeft: 0,
38924
39032
  padding: 0,
@@ -38932,7 +39040,7 @@ var tq = Oy.create({
38932
39040
  fontSize: e.typography.fontSize - 3
38933
39041
  }
38934
39042
  }
38935
- })), _q = i(ii)(({ theme: e, mini: t, error: n }) => ({
39043
+ })), Eq = i(ii)(({ theme: e, mini: t, error: n }) => ({
38936
39044
  color: `${O.tertiary()} !important`,
38937
39045
  ...t && {
38938
39046
  margin: 0,
@@ -38941,9 +39049,9 @@ var tq = Oy.create({
38941
39049
  height: e.spacing(3)
38942
39050
  },
38943
39051
  ...n && { color: `${e.palette.error.main} !important` }
38944
- })), vq = ({ mini: e, checked: t, onChange: n, value: r, label: i, error: a }) => /* @__PURE__ */ j(gq, {
39052
+ })), Dq = ({ mini: e, checked: t, onChange: n, value: r, label: i, error: a }) => /* @__PURE__ */ j(Tq, {
38945
39053
  mini: e,
38946
- control: /* @__PURE__ */ j(_q, {
39054
+ control: /* @__PURE__ */ j(Eq, {
38947
39055
  checked: t,
38948
39056
  onChange: n,
38949
39057
  value: r,
@@ -38952,21 +39060,21 @@ var tq = Oy.create({
38952
39060
  }),
38953
39061
  label: i
38954
39062
  });
38955
- vq.propTypes = {
39063
+ Dq.propTypes = {
38956
39064
  mini: N.default.bool,
38957
39065
  checked: N.default.bool.isRequired,
38958
39066
  onChange: N.default.func.isRequired,
38959
39067
  value: N.default.string,
38960
39068
  label: N.default.string.isRequired,
38961
39069
  error: N.default.bool
38962
- }, vq.defaultProps = {
39070
+ }, Dq.defaultProps = {
38963
39071
  value: "",
38964
39072
  mini: !1,
38965
39073
  error: !1
38966
39074
  };
38967
39075
  //#endregion
38968
39076
  //#region ../../lib-react/config-ui/dist/number-text-field.js
38969
- var yq = (0, Do.default)("@pie-lib:config-ui:number-text-field"), bq = i(Eo)(({ theme: e }) => ({
39077
+ var Oq = (0, Do.default)("@pie-lib:config-ui:number-text-field"), kq = i(Eo)(({ theme: e }) => ({
38970
39078
  marginRight: e.spacing(1),
38971
39079
  "& .MuiInputLabel-root": {
38972
39080
  width: "auto",
@@ -38988,11 +39096,11 @@ var yq = (0, Do.default)("@pie-lib:config-ui:number-text-field"), bq = i(Eo)(({
38988
39096
  minHeight: "auto",
38989
39097
  padding: "6px 0 7px"
38990
39098
  }
38991
- })), xq = (e, t) => {
39099
+ })), Aq = (e, t) => {
38992
39100
  if (!fe(e) && !fe(t)) return 0;
38993
39101
  if (!fe(e) && fe(t)) return t;
38994
39102
  if (fe(e)) return e;
38995
- }, Sq = class extends A.Component {
39103
+ }, jq = class extends A.Component {
38996
39104
  static propTypes = {
38997
39105
  disabled: N.default.bool,
38998
39106
  className: N.default.string,
@@ -39018,13 +39126,13 @@ var yq = (0, Do.default)("@pie-lib:config-ui:number-text-field"), bq = i(Eo)(({
39018
39126
  this.setState({ value: t });
39019
39127
  }
39020
39128
  clamp(e, t = this.props.min, n = this.props.max) {
39021
- return fe(e) ? (fe(n) && (e = Math.min(e, n)), fe(t) && (e = Math.max(e, t)), e) : xq(t, n);
39129
+ return fe(e) ? (fe(n) && (e = Math.min(e, n)), fe(t) && (e = Math.max(e, t)), e) : Aq(t, n);
39022
39130
  }
39023
39131
  onBlur = (e) => {
39024
39132
  let t = e.target.value, n = parseFloat(t);
39025
- yq("rawNumber: ", n);
39133
+ Oq("rawNumber: ", n);
39026
39134
  let r = this.clamp(n);
39027
- yq("number: ", r), r !== this.state.value && (yq("trigger update..."), this.setState({ value: r.toString() }, () => {
39135
+ Oq("number: ", r), r !== this.state.value && (Oq("trigger update..."), this.setState({ value: r.toString() }, () => {
39028
39136
  this.props.onChange(e, r);
39029
39137
  }));
39030
39138
  };
@@ -39044,7 +39152,7 @@ var yq = (0, Do.default)("@pie-lib:config-ui:number-text-field"), bq = i(Eo)(({
39044
39152
  };
39045
39153
  render() {
39046
39154
  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();
39047
- return /* @__PURE__ */ j(bq, {
39155
+ return /* @__PURE__ */ j(kq, {
39048
39156
  variant: s ? "filled" : l || "standard",
39049
39157
  inputRef: (e) => {
39050
39158
  this.inputRef = e;
@@ -39079,19 +39187,19 @@ var yq = (0, Do.default)("@pie-lib:config-ui:number-text-field"), bq = i(Eo)(({
39079
39187
  };
39080
39188
  //#endregion
39081
39189
  //#region ../../lib-react/config-ui/dist/two-choice.js
39082
- function Cq(e) {
39190
+ function Mq(e) {
39083
39191
  return typeof e == "function" || typeof e == "object" && !!e && typeof e.$$typeof == "symbol";
39084
39192
  }
39085
- function wq(e, t) {
39086
- return !e || Cq(e) ? e : Cq(e.default) ? e.default : t && Cq(e[t]) ? e[t] : t && Cq(e[t]?.default) ? e[t].default : e;
39193
+ function Nq(e, t) {
39194
+ return !e || Mq(e) ? e : Mq(e.default) ? e.default : t && Mq(e[t]) ? e[t] : t && Mq(e[t]?.default) ? e[t].default : e;
39087
39195
  }
39088
- var Tq = wq(he, "InputContainer") || wq(Oq.InputContainer, "InputContainer"), Eq = Fe, Dq = Eq.default, Oq = Dq && typeof Dq == "object" ? Dq : Eq, kq = i("div")(({ theme: e, direction: t }) => ({
39196
+ var Pq = Nq(he, "InputContainer") || Nq(Lq.InputContainer, "InputContainer"), Fq = Fe, Iq = Fq.default, Lq = Iq && typeof Iq == "object" ? Iq : Fq, Rq = i("div")(({ theme: e, direction: t }) => ({
39089
39197
  display: "flex",
39090
39198
  flexWrap: "wrap",
39091
39199
  paddingLeft: 0,
39092
39200
  marginTop: e.spacing(1),
39093
39201
  ...t === "vertical" && { flexDirection: "column" }
39094
- })), Aq = class extends A.Component {
39202
+ })), zq = class extends A.Component {
39095
39203
  static propTypes = {
39096
39204
  header: N.default.string.isRequired,
39097
39205
  className: N.default.string,
@@ -39109,10 +39217,10 @@ var Tq = wq(he, "InputContainer") || wq(Oq.InputContainer, "InputContainer"), Eq
39109
39217
  label: e,
39110
39218
  value: e
39111
39219
  } : e), s = n || Ao;
39112
- return /* @__PURE__ */ j(Tq, {
39220
+ return /* @__PURE__ */ j(Pq, {
39113
39221
  label: e,
39114
39222
  className: t,
39115
- children: /* @__PURE__ */ j(kq, {
39223
+ children: /* @__PURE__ */ j(Rq, {
39116
39224
  direction: a,
39117
39225
  children: o.map((e, t) => /* @__PURE__ */ j(s, {
39118
39226
  value: e.value,
@@ -39123,7 +39231,7 @@ var Tq = wq(he, "InputContainer") || wq(Oq.InputContainer, "InputContainer"), Eq
39123
39231
  })
39124
39232
  });
39125
39233
  }
39126
- }, jq = N.default.shape({
39234
+ }, Bq = N.default.shape({
39127
39235
  label: N.default.string,
39128
39236
  value: N.default.string
39129
39237
  });
@@ -39132,14 +39240,14 @@ var Tq = wq(he, "InputContainer") || wq(Oq.InputContainer, "InputContainer"), Eq
39132
39240
  header: N.default.string.isRequired,
39133
39241
  value: N.default.string.isRequired,
39134
39242
  onChange: N.default.func.isRequired,
39135
- one: N.default.oneOfType([jq, N.default.string]),
39136
- two: N.default.oneOfType([jq, N.default.string]),
39243
+ one: N.default.oneOfType([Bq, N.default.string]),
39244
+ two: N.default.oneOfType([Bq, N.default.string]),
39137
39245
  className: N.default.string,
39138
39246
  customLabel: N.default.func
39139
39247
  };
39140
39248
  render() {
39141
39249
  let { one: e, two: t, header: n, className: r, customLabel: i, value: a, onChange: o } = this.props;
39142
- return /* @__PURE__ */ j(Aq, {
39250
+ return /* @__PURE__ */ j(zq, {
39143
39251
  customLabel: i,
39144
39252
  header: n,
39145
39253
  className: r,
@@ -39151,21 +39259,21 @@ var Tq = wq(he, "InputContainer") || wq(Oq.InputContainer, "InputContainer"), Eq
39151
39259
  });
39152
39260
  //#endregion
39153
39261
  //#region ../../lib-react/config-ui/dist/_virtual/_rolldown/runtime.js
39154
- var Mq = Object.defineProperty, Nq = (e, t) => {
39262
+ var Vq = Object.defineProperty, Hq = (e, t) => {
39155
39263
  let n = {};
39156
- for (var r in e) Mq(n, r, {
39264
+ for (var r in e) Vq(n, r, {
39157
39265
  get: e[r],
39158
39266
  enumerable: !0
39159
39267
  });
39160
- return t || Mq(n, Symbol.toStringTag, { value: "Module" }), n;
39161
- }, Pq = i("div")(() => ({
39268
+ return t || Vq(n, Symbol.toStringTag, { value: "Module" }), n;
39269
+ }, Uq = i("div")(() => ({
39162
39270
  display: "flex",
39163
39271
  flexDirection: "column",
39164
39272
  position: "relative"
39165
- })), Fq = i("div")(() => ({
39273
+ })), Wq = i("div")(() => ({
39166
39274
  display: "flex",
39167
39275
  justifyContent: "space-between"
39168
- })), Iq = i("div")(({ theme: e }) => ({ padding: `${e.spacing(2)} 0` })), Lq = i("div")(() => ({ flex: "1" })), Rq = i("div")(({ theme: e }) => ({ marginLeft: e.spacing(2) })), zq = class extends A.Component {
39276
+ })), Gq = i("div")(({ theme: e }) => ({ padding: `${e.spacing(2)} 0` })), Kq = i("div")(() => ({ flex: "1" })), qq = i("div")(({ theme: e }) => ({ marginLeft: e.spacing(2) })), Jq = class extends A.Component {
39169
39277
  static propTypes = {
39170
39278
  mode: N.default.oneOf(["tabbed", "inline"]),
39171
39279
  secondary: N.default.oneOfType([N.default.arrayOf(N.default.node), N.default.node]),
@@ -39183,7 +39291,7 @@ var Mq = Object.defineProperty, Nq = (e, t) => {
39183
39291
  } catch (e) {
39184
39292
  console.log(e.toString());
39185
39293
  }
39186
- return /* @__PURE__ */ M(Pq, {
39294
+ return /* @__PURE__ */ M(Uq, {
39187
39295
  style: {
39188
39296
  minHeight: i,
39189
39297
  minWidth: a,
@@ -39191,28 +39299,28 @@ var Mq = Object.defineProperty, Nq = (e, t) => {
39191
39299
  maxWidth: s
39192
39300
  },
39193
39301
  children: [
39194
- e === "inline" && /* @__PURE__ */ M(Fq, { children: [/* @__PURE__ */ j(Lq, {
39302
+ e === "inline" && /* @__PURE__ */ M(Wq, { children: [/* @__PURE__ */ j(Kq, {
39195
39303
  className: "design-container",
39196
39304
  children: n
39197
- }), l && /* @__PURE__ */ j(Rq, {
39305
+ }), l && /* @__PURE__ */ j(qq, {
39198
39306
  className: "settings-container",
39199
39307
  children: t
39200
39308
  })] }),
39201
- e === "tabbed" && l && /* @__PURE__ */ M(hq, {
39309
+ e === "tabbed" && l && /* @__PURE__ */ M(wq, {
39202
39310
  onChange: this.onTabsChange,
39203
39311
  contentClassName: "content-container",
39204
39312
  indicatorColor: "primary",
39205
- children: [/* @__PURE__ */ j(Iq, {
39313
+ children: [/* @__PURE__ */ j(Gq, {
39206
39314
  title: "Design",
39207
39315
  className: "design-container",
39208
39316
  children: n
39209
- }), /* @__PURE__ */ j(Iq, {
39317
+ }), /* @__PURE__ */ j(Gq, {
39210
39318
  title: "Settings",
39211
39319
  className: "settings-container",
39212
39320
  children: t
39213
39321
  })]
39214
39322
  }),
39215
- e === "tabbed" && !l && /* @__PURE__ */ j(Iq, {
39323
+ e === "tabbed" && !l && /* @__PURE__ */ j(Gq, {
39216
39324
  className: "design-container",
39217
39325
  children: n
39218
39326
  })
@@ -39222,18 +39330,18 @@ var Mq = Object.defineProperty, Nq = (e, t) => {
39222
39330
  };
39223
39331
  //#endregion
39224
39332
  //#region ../../lib-react/config-ui/dist/node_modules/.bun/@babel_runtime@7.29.7/node_modules/@babel/runtime/helpers/esm/extends.js
39225
- function Bq() {
39226
- return Bq = Object.assign ? Object.assign.bind() : function(e) {
39333
+ function Yq() {
39334
+ return Yq = Object.assign ? Object.assign.bind() : function(e) {
39227
39335
  for (var t = 1; t < arguments.length; t++) {
39228
39336
  var n = arguments[t];
39229
39337
  for (var r in n) ({}).hasOwnProperty.call(n, r) && (e[r] = n[r]);
39230
39338
  }
39231
39339
  return e;
39232
- }, Bq.apply(null, arguments);
39340
+ }, Yq.apply(null, arguments);
39233
39341
  }
39234
39342
  //#endregion
39235
39343
  //#region ../../lib-react/config-ui/dist/node_modules/.bun/@babel_runtime@7.29.7/node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js
39236
- function Vq(e, t) {
39344
+ function Xq(e, t) {
39237
39345
  if (e == null) return {};
39238
39346
  var n = {};
39239
39347
  for (var r in e) if ({}.hasOwnProperty.call(e, r)) {
@@ -39244,19 +39352,19 @@ function Vq(e, t) {
39244
39352
  }
39245
39353
  //#endregion
39246
39354
  //#region ../../lib-react/config-ui/dist/node_modules/.bun/@babel_runtime@7.29.7/node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js
39247
- function Hq(e, t) {
39248
- return Hq = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(e, t) {
39355
+ function Zq(e, t) {
39356
+ return Zq = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(e, t) {
39249
39357
  return e.__proto__ = t, e;
39250
- }, Hq(e, t);
39358
+ }, Zq(e, t);
39251
39359
  }
39252
39360
  //#endregion
39253
39361
  //#region ../../lib-react/config-ui/dist/node_modules/.bun/@babel_runtime@7.29.7/node_modules/@babel/runtime/helpers/esm/inheritsLoose.js
39254
- function Uq(e, t) {
39255
- e.prototype = Object.create(t.prototype), e.prototype.constructor = e, Hq(e, t);
39362
+ function Qq(e, t) {
39363
+ e.prototype = Object.create(t.prototype), e.prototype.constructor = e, Zq(e, t);
39256
39364
  }
39257
39365
  //#endregion
39258
39366
  //#region ../../lib-react/config-ui/dist/node_modules/.bun/resize-observer-polyfill@1.5.1/node_modules/resize-observer-polyfill/dist/ResizeObserver.es.js
39259
- var Wq = (function() {
39367
+ var $q = (function() {
39260
39368
  if (typeof Map < "u") return Map;
39261
39369
  function e(e, t) {
39262
39370
  var n = -1;
@@ -39295,34 +39403,34 @@ var Wq = (function() {
39295
39403
  }
39296
39404
  }, t;
39297
39405
  }();
39298
- })(), Gq = typeof window < "u" && typeof document < "u" && window.document === document, Kq = (function() {
39406
+ })(), eJ = typeof window < "u" && typeof document < "u" && window.document === document, tJ = (function() {
39299
39407
  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")();
39300
- })(), qq = (function() {
39301
- return typeof requestAnimationFrame == "function" ? requestAnimationFrame.bind(Kq) : function(e) {
39408
+ })(), nJ = (function() {
39409
+ return typeof requestAnimationFrame == "function" ? requestAnimationFrame.bind(tJ) : function(e) {
39302
39410
  return setTimeout(function() {
39303
39411
  return e(Date.now());
39304
39412
  }, 1e3 / 60);
39305
39413
  };
39306
- })(), Jq = 2;
39307
- function Yq(e, t) {
39414
+ })(), rJ = 2;
39415
+ function iJ(e, t) {
39308
39416
  var n = !1, r = !1, i = 0;
39309
39417
  function a() {
39310
39418
  n && (n = !1, e()), r && s();
39311
39419
  }
39312
39420
  function o() {
39313
- qq(a);
39421
+ nJ(a);
39314
39422
  }
39315
39423
  function s() {
39316
39424
  var e = Date.now();
39317
39425
  if (n) {
39318
- if (e - i < Jq) return;
39426
+ if (e - i < rJ) return;
39319
39427
  r = !0;
39320
39428
  } else n = !0, r = !1, setTimeout(o, t);
39321
39429
  i = e;
39322
39430
  }
39323
39431
  return s;
39324
39432
  }
39325
- var Xq = 20, Zq = [
39433
+ var aJ = 20, oJ = [
39326
39434
  "top",
39327
39435
  "right",
39328
39436
  "bottom",
@@ -39331,9 +39439,9 @@ var Xq = 20, Zq = [
39331
39439
  "height",
39332
39440
  "size",
39333
39441
  "weight"
39334
- ], Qq = typeof MutationObserver < "u", $q = function() {
39442
+ ], sJ = typeof MutationObserver < "u", cJ = function() {
39335
39443
  function e() {
39336
- this.connected_ = !1, this.mutationEventsAdded_ = !1, this.mutationsObserver_ = null, this.observers_ = [], this.onTransitionEnd_ = this.onTransitionEnd_.bind(this), this.refresh = Yq(this.refresh.bind(this), Xq);
39444
+ this.connected_ = !1, this.mutationEventsAdded_ = !1, this.mutationsObserver_ = null, this.observers_ = [], this.onTransitionEnd_ = this.onTransitionEnd_.bind(this), this.refresh = iJ(this.refresh.bind(this), aJ);
39337
39445
  }
39338
39446
  return e.prototype.addObserver = function(e) {
39339
39447
  ~this.observers_.indexOf(e) || this.observers_.push(e), this.connected_ || this.connect_();
@@ -39350,23 +39458,23 @@ var Xq = 20, Zq = [
39350
39458
  return e.broadcastActive();
39351
39459
  }), e.length > 0;
39352
39460
  }, e.prototype.connect_ = function() {
39353
- !Gq || this.connected_ || (document.addEventListener("transitionend", this.onTransitionEnd_), window.addEventListener("resize", this.refresh), Qq ? (this.mutationsObserver_ = new MutationObserver(this.refresh), this.mutationsObserver_.observe(document, {
39461
+ !eJ || this.connected_ || (document.addEventListener("transitionend", this.onTransitionEnd_), window.addEventListener("resize", this.refresh), sJ ? (this.mutationsObserver_ = new MutationObserver(this.refresh), this.mutationsObserver_.observe(document, {
39354
39462
  attributes: !0,
39355
39463
  childList: !0,
39356
39464
  characterData: !0,
39357
39465
  subtree: !0
39358
39466
  })) : (document.addEventListener("DOMSubtreeModified", this.refresh), this.mutationEventsAdded_ = !0), this.connected_ = !0);
39359
39467
  }, e.prototype.disconnect_ = function() {
39360
- !Gq || !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);
39468
+ !eJ || !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);
39361
39469
  }, e.prototype.onTransitionEnd_ = function(e) {
39362
39470
  var t = e.propertyName, n = t === void 0 ? "" : t;
39363
- Zq.some(function(e) {
39471
+ oJ.some(function(e) {
39364
39472
  return !!~n.indexOf(e);
39365
39473
  }) && this.refresh();
39366
39474
  }, e.getInstance = function() {
39367
39475
  return this.instance_ ||= new e(), this.instance_;
39368
39476
  }, e.instance_ = null, e;
39369
- }(), eJ = (function(e, t) {
39477
+ }(), lJ = (function(e, t) {
39370
39478
  for (var n = 0, r = Object.keys(t); n < r.length; n++) {
39371
39479
  var i = r[n];
39372
39480
  Object.defineProperty(e, i, {
@@ -39377,19 +39485,19 @@ var Xq = 20, Zq = [
39377
39485
  });
39378
39486
  }
39379
39487
  return e;
39380
- }), tJ = (function(e) {
39381
- return e && e.ownerDocument && e.ownerDocument.defaultView || Kq;
39382
- }), nJ = fJ(0, 0, 0, 0);
39383
- function rJ(e) {
39488
+ }), uJ = (function(e) {
39489
+ return e && e.ownerDocument && e.ownerDocument.defaultView || tJ;
39490
+ }), dJ = xJ(0, 0, 0, 0);
39491
+ function fJ(e) {
39384
39492
  return parseFloat(e) || 0;
39385
39493
  }
39386
- function iJ(e) {
39494
+ function pJ(e) {
39387
39495
  return [...arguments].slice(1).reduce(function(t, n) {
39388
39496
  var r = e["border-" + n + "-width"];
39389
- return t + rJ(r);
39497
+ return t + fJ(r);
39390
39498
  }, 0);
39391
39499
  }
39392
- function aJ(e) {
39500
+ function mJ(e) {
39393
39501
  for (var t = [
39394
39502
  "top",
39395
39503
  "right",
@@ -39397,40 +39505,40 @@ function aJ(e) {
39397
39505
  "left"
39398
39506
  ], n = {}, r = 0, i = t; r < i.length; r++) {
39399
39507
  var a = i[r], o = e["padding-" + a];
39400
- n[a] = rJ(o);
39508
+ n[a] = fJ(o);
39401
39509
  }
39402
39510
  return n;
39403
39511
  }
39404
- function oJ(e) {
39512
+ function hJ(e) {
39405
39513
  var t = e.getBBox();
39406
- return fJ(0, 0, t.width, t.height);
39514
+ return xJ(0, 0, t.width, t.height);
39407
39515
  }
39408
- function sJ(e) {
39516
+ function gJ(e) {
39409
39517
  var t = e.clientWidth, n = e.clientHeight;
39410
- if (!t && !n) return nJ;
39411
- var r = tJ(e).getComputedStyle(e), i = aJ(r), a = i.left + i.right, o = i.top + i.bottom, s = rJ(r.width), c = rJ(r.height);
39412
- if (r.boxSizing === "border-box" && (Math.round(s + a) !== t && (s -= iJ(r, "left", "right") + a), Math.round(c + o) !== n && (c -= iJ(r, "top", "bottom") + o)), !lJ(e)) {
39518
+ if (!t && !n) return dJ;
39519
+ var r = uJ(e).getComputedStyle(e), i = mJ(r), a = i.left + i.right, o = i.top + i.bottom, s = fJ(r.width), c = fJ(r.height);
39520
+ if (r.boxSizing === "border-box" && (Math.round(s + a) !== t && (s -= pJ(r, "left", "right") + a), Math.round(c + o) !== n && (c -= pJ(r, "top", "bottom") + o)), !vJ(e)) {
39413
39521
  var l = Math.round(s + a) - t, u = Math.round(c + o) - n;
39414
39522
  Math.abs(l) !== 1 && (s -= l), Math.abs(u) !== 1 && (c -= u);
39415
39523
  }
39416
- return fJ(i.left, i.top, s, c);
39524
+ return xJ(i.left, i.top, s, c);
39417
39525
  }
39418
- var cJ = (function() {
39526
+ var _J = (function() {
39419
39527
  return typeof SVGGraphicsElement < "u" ? function(e) {
39420
- return e instanceof tJ(e).SVGGraphicsElement;
39528
+ return e instanceof uJ(e).SVGGraphicsElement;
39421
39529
  } : function(e) {
39422
- return e instanceof tJ(e).SVGElement && typeof e.getBBox == "function";
39530
+ return e instanceof uJ(e).SVGElement && typeof e.getBBox == "function";
39423
39531
  };
39424
39532
  })();
39425
- function lJ(e) {
39426
- return e === tJ(e).document.documentElement;
39533
+ function vJ(e) {
39534
+ return e === uJ(e).document.documentElement;
39427
39535
  }
39428
- function uJ(e) {
39429
- return Gq ? cJ(e) ? oJ(e) : sJ(e) : nJ;
39536
+ function yJ(e) {
39537
+ return eJ ? _J(e) ? hJ(e) : gJ(e) : dJ;
39430
39538
  }
39431
- function dJ(e) {
39539
+ function bJ(e) {
39432
39540
  var t = e.x, n = e.y, r = e.width, i = e.height, a = Object.create((typeof DOMRectReadOnly < "u" ? DOMRectReadOnly : Object).prototype);
39433
- return eJ(a, {
39541
+ return lJ(a, {
39434
39542
  x: t,
39435
39543
  y: n,
39436
39544
  width: r,
@@ -39441,7 +39549,7 @@ function dJ(e) {
39441
39549
  left: t
39442
39550
  }), a;
39443
39551
  }
39444
- function fJ(e, t, n, r) {
39552
+ function xJ(e, t, n, r) {
39445
39553
  return {
39446
39554
  x: e,
39447
39555
  y: t,
@@ -39449,42 +39557,42 @@ function fJ(e, t, n, r) {
39449
39557
  height: r
39450
39558
  };
39451
39559
  }
39452
- var pJ = function() {
39560
+ var SJ = function() {
39453
39561
  function e(e) {
39454
- this.broadcastWidth = 0, this.broadcastHeight = 0, this.contentRect_ = fJ(0, 0, 0, 0), this.target = e;
39562
+ this.broadcastWidth = 0, this.broadcastHeight = 0, this.contentRect_ = xJ(0, 0, 0, 0), this.target = e;
39455
39563
  }
39456
39564
  return e.prototype.isActive = function() {
39457
- var e = uJ(this.target);
39565
+ var e = yJ(this.target);
39458
39566
  return this.contentRect_ = e, e.width !== this.broadcastWidth || e.height !== this.broadcastHeight;
39459
39567
  }, e.prototype.broadcastRect = function() {
39460
39568
  var e = this.contentRect_;
39461
39569
  return this.broadcastWidth = e.width, this.broadcastHeight = e.height, e;
39462
39570
  }, e;
39463
- }(), mJ = function() {
39571
+ }(), CJ = function() {
39464
39572
  function e(e, t) {
39465
- var n = dJ(t);
39466
- eJ(this, {
39573
+ var n = bJ(t);
39574
+ lJ(this, {
39467
39575
  target: e,
39468
39576
  contentRect: n
39469
39577
  });
39470
39578
  }
39471
39579
  return e;
39472
- }(), hJ = function() {
39580
+ }(), wJ = function() {
39473
39581
  function e(e, t, n) {
39474
- if (this.activeObservations_ = [], this.observations_ = new Wq(), typeof e != "function") throw TypeError("The callback provided as parameter 1 is not a function.");
39582
+ if (this.activeObservations_ = [], this.observations_ = new $q(), typeof e != "function") throw TypeError("The callback provided as parameter 1 is not a function.");
39475
39583
  this.callback_ = e, this.controller_ = t, this.callbackCtx_ = n;
39476
39584
  }
39477
39585
  return e.prototype.observe = function(e) {
39478
39586
  if (!arguments.length) throw TypeError("1 argument required, but only 0 present.");
39479
39587
  if (!(typeof Element > "u" || !(Element instanceof Object))) {
39480
- if (!(e instanceof tJ(e).Element)) throw TypeError("parameter 1 is not of type \"Element\".");
39588
+ if (!(e instanceof uJ(e).Element)) throw TypeError("parameter 1 is not of type \"Element\".");
39481
39589
  var t = this.observations_;
39482
- t.has(e) || (t.set(e, new pJ(e)), this.controller_.addObserver(this), this.controller_.refresh());
39590
+ t.has(e) || (t.set(e, new SJ(e)), this.controller_.addObserver(this), this.controller_.refresh());
39483
39591
  }
39484
39592
  }, e.prototype.unobserve = function(e) {
39485
39593
  if (!arguments.length) throw TypeError("1 argument required, but only 0 present.");
39486
39594
  if (!(typeof Element > "u" || !(Element instanceof Object))) {
39487
- if (!(e instanceof tJ(e).Element)) throw TypeError("parameter 1 is not of type \"Element\".");
39595
+ if (!(e instanceof uJ(e).Element)) throw TypeError("parameter 1 is not of type \"Element\".");
39488
39596
  var t = this.observations_;
39489
39597
  t.has(e) && (t.delete(e), t.size || this.controller_.removeObserver(this));
39490
39598
  }
@@ -39498,7 +39606,7 @@ var pJ = function() {
39498
39606
  }, e.prototype.broadcastActive = function() {
39499
39607
  if (this.hasActive()) {
39500
39608
  var e = this.callbackCtx_, t = this.activeObservations_.map(function(e) {
39501
- return new mJ(e.target, e.broadcastRect());
39609
+ return new CJ(e.target, e.broadcastRect());
39502
39610
  });
39503
39611
  this.callback_.call(e, t, e), this.clearActive();
39504
39612
  }
@@ -39507,12 +39615,12 @@ var pJ = function() {
39507
39615
  }, e.prototype.hasActive = function() {
39508
39616
  return this.activeObservations_.length > 0;
39509
39617
  }, e;
39510
- }(), gJ = typeof WeakMap < "u" ? /* @__PURE__ */ new WeakMap() : new Wq(), _J = function() {
39618
+ }(), TJ = typeof WeakMap < "u" ? /* @__PURE__ */ new WeakMap() : new $q(), EJ = function() {
39511
39619
  function e(t) {
39512
39620
  if (!(this instanceof e)) throw TypeError("Cannot call a class as a function.");
39513
39621
  if (!arguments.length) throw TypeError("1 argument required, but only 0 present.");
39514
- var n = new hJ(t, $q.getInstance(), this);
39515
- gJ.set(this, n);
39622
+ var n = new wJ(t, cJ.getInstance(), this);
39623
+ TJ.set(this, n);
39516
39624
  }
39517
39625
  return e;
39518
39626
  }();
@@ -39521,27 +39629,27 @@ var pJ = function() {
39521
39629
  "unobserve",
39522
39630
  "disconnect"
39523
39631
  ].forEach(function(e) {
39524
- _J.prototype[e] = function() {
39632
+ EJ.prototype[e] = function() {
39525
39633
  var t;
39526
- return (t = gJ.get(this))[e].apply(t, arguments);
39634
+ return (t = TJ.get(this))[e].apply(t, arguments);
39527
39635
  };
39528
39636
  });
39529
- var vJ = (function() {
39530
- return Kq.ResizeObserver === void 0 ? _J : Kq.ResizeObserver;
39531
- })(), yJ = [
39637
+ var DJ = (function() {
39638
+ return tJ.ResizeObserver === void 0 ? EJ : tJ.ResizeObserver;
39639
+ })(), OJ = [
39532
39640
  "client",
39533
39641
  "offset",
39534
39642
  "scroll",
39535
39643
  "bounds",
39536
39644
  "margin"
39537
39645
  ];
39538
- function bJ(e) {
39646
+ function kJ(e) {
39539
39647
  var t = [];
39540
- return yJ.forEach(function(n) {
39648
+ return OJ.forEach(function(n) {
39541
39649
  e[n] && t.push(n);
39542
39650
  }), t;
39543
39651
  }
39544
- function xJ(e, t) {
39652
+ function AJ(e, t) {
39545
39653
  var n = {};
39546
39654
  if (t.indexOf("client") > -1 && (n.client = {
39547
39655
  top: e.clientTop,
@@ -39580,14 +39688,14 @@ function xJ(e, t) {
39580
39688
  }
39581
39689
  return n;
39582
39690
  }
39583
- function SJ(e) {
39691
+ function jJ(e) {
39584
39692
  return e && e.ownerDocument && e.ownerDocument.defaultView || window;
39585
39693
  }
39586
- function CJ(e) {
39694
+ function MJ(e) {
39587
39695
  return function(t) {
39588
39696
  var n, r;
39589
39697
  return r = n = /*#__PURE__*/ function(n) {
39590
- Uq(r, n);
39698
+ Qq(r, n);
39591
39699
  function r() {
39592
39700
  var t, r = [...arguments];
39593
39701
  return t = n.call.apply(n, [this].concat(r)) || this, t.state = { contentRect: {
@@ -39598,24 +39706,24 @@ function CJ(e) {
39598
39706
  bounds: {},
39599
39707
  margin: {}
39600
39708
  } }, t._animationFrameID = null, t._resizeObserver = null, t._node = null, t._window = null, t.measure = function(n) {
39601
- var r = xJ(t._node, e || bJ(t.props));
39709
+ var r = AJ(t._node, e || kJ(t.props));
39602
39710
  n && (r.entry = n[0].contentRect), t._animationFrameID = t._window.requestAnimationFrame(function() {
39603
39711
  t._resizeObserver !== null && (t.setState({ contentRect: r }), typeof t.props.onResize == "function" && t.props.onResize(r));
39604
39712
  });
39605
39713
  }, t._handleRef = function(e) {
39606
- t._resizeObserver !== null && t._node !== null && t._resizeObserver.unobserve(t._node), t._node = e, t._window = SJ(t._node);
39714
+ t._resizeObserver !== null && t._node !== null && t._resizeObserver.unobserve(t._node), t._node = e, t._window = jJ(t._node);
39607
39715
  var n = t.props.innerRef;
39608
39716
  n && (typeof n == "function" ? n(t._node) : n.current = t._node), t._resizeObserver !== null && t._node !== null && t._resizeObserver.observe(t._node);
39609
39717
  }, t;
39610
39718
  }
39611
39719
  var i = r.prototype;
39612
39720
  return i.componentDidMount = function() {
39613
- this._resizeObserver = this._window !== null && this._window.ResizeObserver ? new this._window.ResizeObserver(this.measure) : new vJ(this.measure), this._node !== null && (this._resizeObserver.observe(this._node), typeof this.props.onResize == "function" && this.props.onResize(xJ(this._node, e || bJ(this.props))));
39721
+ this._resizeObserver = this._window !== null && this._window.ResizeObserver ? new this._window.ResizeObserver(this.measure) : new DJ(this.measure), this._node !== null && (this._resizeObserver.observe(this._node), typeof this.props.onResize == "function" && this.props.onResize(AJ(this._node, e || kJ(this.props))));
39614
39722
  }, i.componentWillUnmount = function() {
39615
39723
  this._window !== null && this._window.cancelAnimationFrame(this._animationFrameID), this._resizeObserver !== null && (this._resizeObserver.disconnect(), this._resizeObserver = null);
39616
39724
  }, i.render = function() {
39617
39725
  var e = this.props;
39618
- return e.innerRef, e.onResize, rt(t, Bq({}, Vq(e, ["innerRef", "onResize"]), {
39726
+ return e.innerRef, e.onResize, rt(t, Yq({}, Xq(e, ["innerRef", "onResize"]), {
39619
39727
  measureRef: this._handleRef,
39620
39728
  measure: this.measure,
39621
39729
  contentRect: this.state.contentRect
@@ -39632,7 +39740,7 @@ function CJ(e) {
39632
39740
  }, r;
39633
39741
  };
39634
39742
  }
39635
- var wJ = CJ()(function(e) {
39743
+ var NJ = MJ()(function(e) {
39636
39744
  var t = e.measure, n = e.measureRef, r = e.contentRect, i = e.children;
39637
39745
  return i({
39638
39746
  measure: t,
@@ -39640,10 +39748,10 @@ var wJ = CJ()(function(e) {
39640
39748
  contentRect: r
39641
39749
  });
39642
39750
  });
39643
- wJ.displayName = "Measure", wJ.propTypes.children = N.default.func;
39751
+ NJ.displayName = "Measure", NJ.propTypes.children = N.default.func;
39644
39752
  //#endregion
39645
39753
  //#region ../../lib-react/config-ui/dist/layout/settings-box.js
39646
- var TJ = i("div")(() => ({
39754
+ var PJ = i("div")(() => ({
39647
39755
  backgroundColor: O.white(),
39648
39756
  border: `2px solid ${O.border()}`,
39649
39757
  display: "flex",
@@ -39653,7 +39761,7 @@ var TJ = i("div")(() => ({
39653
39761
  maxWidth: "300px",
39654
39762
  padding: "20px 4px 4px 20px",
39655
39763
  zIndex: 99
39656
- })), EJ = class extends A.Component {
39764
+ })), FJ = class extends A.Component {
39657
39765
  static propTypes = {
39658
39766
  className: N.default.string,
39659
39767
  children: N.default.oneOfType([N.default.arrayOf(N.default.node), N.default.node]).isRequired
@@ -39661,19 +39769,19 @@ var TJ = i("div")(() => ({
39661
39769
  static defaultProps = {};
39662
39770
  render() {
39663
39771
  let { className: e, children: t } = this.props;
39664
- return /* @__PURE__ */ j(TJ, {
39772
+ return /* @__PURE__ */ j(PJ, {
39665
39773
  className: e,
39666
39774
  children: t
39667
39775
  });
39668
39776
  }
39669
- }, DJ = Pe({
39777
+ }, IJ = Pe({
39670
39778
  typography: { fontFamily: "inherit" },
39671
39779
  components: { MuiButton: { styleOverrides: { contained: {
39672
39780
  backgroundColor: "#e0e0e0",
39673
39781
  color: "#000000",
39674
39782
  "&:hover": { backgroundColor: "#bdbdbd" }
39675
39783
  } } } }
39676
- }), OJ = class extends A.Component {
39784
+ }), LJ = class extends A.Component {
39677
39785
  static propTypes = {
39678
39786
  children: N.default.oneOfType([
39679
39787
  N.default.string,
@@ -39706,19 +39814,19 @@ var TJ = i("div")(() => ({
39706
39814
  return /* @__PURE__ */ j(Ge, {
39707
39815
  injectFirst: !0,
39708
39816
  children: /* @__PURE__ */ j(w, {
39709
- theme: DJ,
39710
- children: /* @__PURE__ */ j(wJ, {
39817
+ theme: IJ,
39818
+ children: /* @__PURE__ */ j(NJ, {
39711
39819
  bounds: !0,
39712
39820
  onResize: this.onResize,
39713
39821
  children: ({ measureRef: e }) => {
39714
- let { children: t, settings: n, hideSettings: r, dimensions: i, extraCSSRules: a } = this.props, { layoutMode: o } = this.state, s = r ? null : o === "inline" ? /* @__PURE__ */ j(EJ, {
39822
+ let { children: t, settings: n, hideSettings: r, dimensions: i, extraCSSRules: a } = this.props, { layoutMode: o } = this.state, s = r ? null : o === "inline" ? /* @__PURE__ */ j(FJ, {
39715
39823
  className: "settings-box",
39716
39824
  children: n
39717
39825
  }) : n;
39718
39826
  return /* @__PURE__ */ M("div", {
39719
39827
  ref: e,
39720
39828
  className: "main-container extraCSSRules",
39721
- children: [a?.rules ? /* @__PURE__ */ j("style", { dangerouslySetInnerHTML: { __html: `.extraCSSRules { ${a.rules} }` } }) : null, /* @__PURE__ */ j(zq, {
39829
+ children: [a?.rules ? /* @__PURE__ */ j("style", { dangerouslySetInnerHTML: { __html: `.extraCSSRules { ${a.rules} }` } }) : null, /* @__PURE__ */ j(Jq, {
39722
39830
  mode: o,
39723
39831
  secondary: s,
39724
39832
  dimensions: i,
@@ -39730,27 +39838,27 @@ var TJ = i("div")(() => ({
39730
39838
  })
39731
39839
  });
39732
39840
  }
39733
- }, kJ = CJ("bounds")(OJ), AJ = /* @__PURE__ */ Nq({
39734
- ConfigLayout: () => kJ,
39735
- LayoutContents: () => zq
39736
- }), jJ = i("div")(() => ({
39841
+ }, RJ = MJ("bounds")(LJ), zJ = /* @__PURE__ */ Hq({
39842
+ ConfigLayout: () => RJ,
39843
+ LayoutContents: () => Jq
39844
+ }), BJ = i("div")(() => ({
39737
39845
  display: "flex",
39738
39846
  width: "100%",
39739
39847
  justifyContent: "space-between"
39740
- })), MJ = i(Le)(({ theme: e }) => ({
39848
+ })), VJ = i(Le)(({ theme: e }) => ({
39741
39849
  color: "rgba(0, 0, 0, 0.89)",
39742
39850
  fontSize: e.typography.fontSize,
39743
39851
  paddingTop: e.spacing(2)
39744
- })), NJ = i(Ga)(({ checked: e }) => ({
39852
+ })), HJ = i(Ga)(({ checked: e }) => ({
39745
39853
  "&.Mui-checked .MuiSwitch-thumb": { color: `${O.tertiary()} !important` },
39746
39854
  "&.Mui-checked .MuiSwitch-track": { backgroundColor: `${O.tertiaryLight()} !important` },
39747
39855
  "& .MuiSwitch-track": { backgroundColor: e ? `${O.tertiaryLight()} !important` : void 0 }
39748
- })), PJ = ({ checked: e, disabled: t, label: n, toggle: r }) => /* @__PURE__ */ M(jJ, { children: [/* @__PURE__ */ j(MJ, { children: n }), /* @__PURE__ */ j(NJ, {
39856
+ })), UJ = ({ checked: e, disabled: t, label: n, toggle: r }) => /* @__PURE__ */ M(BJ, { children: [/* @__PURE__ */ j(VJ, { children: n }), /* @__PURE__ */ j(HJ, {
39749
39857
  checked: e,
39750
39858
  disabled: t,
39751
39859
  onChange: (e) => r(e.target.checked)
39752
39860
  })] });
39753
- PJ.propTypes = {
39861
+ UJ.propTypes = {
39754
39862
  checked: N.default.bool,
39755
39863
  disabled: N.default.bool,
39756
39864
  label: N.default.string.isRequired,
@@ -39758,20 +39866,20 @@ PJ.propTypes = {
39758
39866
  };
39759
39867
  //#endregion
39760
39868
  //#region ../../lib-react/config-ui/dist/settings/settings-radio-label.js
39761
- var FJ = i(Ii)(({ theme: e }) => ({ "& .MuiFormControlLabel-label": {
39869
+ var WJ = i(Ii)(({ theme: e }) => ({ "& .MuiFormControlLabel-label": {
39762
39870
  color: "rgba(0, 0, 0, 0.89)",
39763
39871
  fontSize: e.typography.fontSize - 2,
39764
39872
  left: "-5px",
39765
39873
  position: "relative"
39766
- } })), IJ = i(La)(() => ({ color: `${O.tertiary()} !important` })), LJ = ({ label: e, value: t, checked: n, onChange: r }) => /* @__PURE__ */ j(FJ, {
39874
+ } })), GJ = i(La)(() => ({ color: `${O.tertiary()} !important` })), KJ = ({ label: e, value: t, checked: n, onChange: r }) => /* @__PURE__ */ j(WJ, {
39767
39875
  value: t,
39768
- control: /* @__PURE__ */ j(IJ, {
39876
+ control: /* @__PURE__ */ j(GJ, {
39769
39877
  checked: n,
39770
39878
  onChange: r
39771
39879
  }),
39772
39880
  label: e
39773
39881
  });
39774
- LJ.propTypes = {
39882
+ KJ.propTypes = {
39775
39883
  label: N.default.string,
39776
39884
  value: N.default.string,
39777
39885
  checked: N.default.bool,
@@ -39779,26 +39887,26 @@ LJ.propTypes = {
39779
39887
  };
39780
39888
  //#endregion
39781
39889
  //#region ../../lib-react/config-ui/dist/settings/panel.js
39782
- var RJ = (0, Do.default)("pie-lib:config-ui:settings:panel"), zJ = {
39890
+ var qJ = (0, Do.default)("pie-lib:config-ui:settings:panel"), JJ = {
39783
39891
  label: N.default.string,
39784
39892
  value: N.default.string
39785
- }, BJ = {
39893
+ }, YJ = {
39786
39894
  label: N.default.string,
39787
39895
  value: N.default.string,
39788
39896
  onChange: N.default.func
39789
- }, VJ = ({ label: e, value: t, onChange: n }) => /* @__PURE__ */ j(vq, {
39897
+ }, XJ = ({ label: e, value: t, onChange: n }) => /* @__PURE__ */ j(Dq, {
39790
39898
  checked: t,
39791
39899
  label: e,
39792
39900
  onChange: (e) => {
39793
39901
  n(e.target.checked);
39794
39902
  }
39795
39903
  });
39796
- VJ.propTypes = {
39904
+ XJ.propTypes = {
39797
39905
  label: N.default.string,
39798
39906
  value: N.default.bool,
39799
39907
  onChange: N.default.func
39800
39908
  };
39801
- var HJ = i(Aq)(({ theme: e }) => ({
39909
+ var ZJ = i(zq)(({ theme: e }) => ({
39802
39910
  marginTop: e.spacing(.5),
39803
39911
  paddingBottom: e.spacing(.5),
39804
39912
  width: "100%",
@@ -39809,29 +39917,29 @@ var HJ = i(Aq)(({ theme: e }) => ({
39809
39917
  marginTop: e.spacing(2.5)
39810
39918
  },
39811
39919
  "& > div": { marginTop: e.spacing(2.5) }
39812
- })), UJ = ({ label: e, value: t, onChange: n, choices: r }) => /* @__PURE__ */ j(HJ, {
39920
+ })), QJ = ({ label: e, value: t, onChange: n, choices: r }) => /* @__PURE__ */ j(ZJ, {
39813
39921
  direction: "horizontal",
39814
- customLabel: LJ,
39922
+ customLabel: KJ,
39815
39923
  value: t,
39816
39924
  header: e,
39817
39925
  opts: r,
39818
39926
  onChange: n
39819
39927
  });
39820
- UJ.propTypes = {
39821
- ...BJ,
39822
- choices: N.default.arrayOf(N.default.shape(zJ))
39928
+ QJ.propTypes = {
39929
+ ...YJ,
39930
+ choices: N.default.arrayOf(N.default.shape(JJ))
39823
39931
  };
39824
- var WJ = UJ, GJ = i("p")(({ theme: e }) => ({
39932
+ var $J = QJ, eY = i("p")(({ theme: e }) => ({
39825
39933
  margin: 0,
39826
39934
  fontSize: e.typography.fontSize
39827
- })), KJ = i(Ne)(({ theme: e }) => ({
39935
+ })), tY = i(Ne)(({ theme: e }) => ({
39828
39936
  marginTop: e.spacing(.5),
39829
39937
  border: "2px solid lightgrey",
39830
39938
  padding: `0 ${e.spacing(1)}`,
39831
39939
  borderRadius: "4px"
39832
- })), qJ = ({ label: e, value: t, onChange: n, choices: r = [] }) => {
39940
+ })), nY = ({ label: e, value: t, onChange: n, choices: r = [] }) => {
39833
39941
  let i = (e) => typeof e == "string" ? e : e.label, a = (e) => typeof e == "string" ? e : e.value;
39834
- return /* @__PURE__ */ M("div", { children: [e && /* @__PURE__ */ j(GJ, { children: e }), /* @__PURE__ */ j(KJ, {
39942
+ return /* @__PURE__ */ M("div", { children: [e && /* @__PURE__ */ j(eY, { children: e }), /* @__PURE__ */ j(tY, {
39835
39943
  value: t || r && r[0],
39836
39944
  onChange: ({ target: e }) => n(e.value),
39837
39945
  input: /* @__PURE__ */ j(le, { id: `dropdown-${e}` }),
@@ -39846,14 +39954,14 @@ var WJ = UJ, GJ = i("p")(({ theme: e }) => ({
39846
39954
  }, t))
39847
39955
  })] });
39848
39956
  };
39849
- qJ.propTypes = {
39850
- ...BJ,
39957
+ nY.propTypes = {
39958
+ ...YJ,
39851
39959
  choices: N.default.arrayOf(N.default.string)
39852
39960
  };
39853
- var JJ = i(Dt)(({ theme: e }) => ({
39961
+ var rY = i(Dt)(({ theme: e }) => ({
39854
39962
  marginRight: e.spacing(3),
39855
39963
  marginTop: e.spacing(1)
39856
- })), YJ = ({ label: e }) => /* @__PURE__ */ j(JJ, { children: e }), XJ = i(Sq)(({ theme: e }) => ({
39964
+ })), iY = ({ label: e }) => /* @__PURE__ */ j(rY, { children: e }), aY = i(jq)(({ theme: e }) => ({
39857
39965
  width: "35%",
39858
39966
  marginRight: e.spacing(3),
39859
39967
  marginTop: e.spacing(1),
@@ -39864,7 +39972,7 @@ var JJ = i(Dt)(({ theme: e }) => ({
39864
39972
  padding: `0 ${e.spacing(1)}`,
39865
39973
  backgroundColor: "transparent"
39866
39974
  }
39867
- })), ZJ = ({ label: e, value: t, onChange: n = () => {}, suffix: r, min: i, max: a }) => /* @__PURE__ */ j(XJ, {
39975
+ })), oY = ({ label: e, value: t, onChange: n = () => {}, suffix: r, min: i, max: a }) => /* @__PURE__ */ j(aY, {
39868
39976
  variant: "standard",
39869
39977
  label: e || "Label",
39870
39978
  value: t,
@@ -39875,45 +39983,45 @@ var JJ = i(Dt)(({ theme: e }) => ({
39875
39983
  showErrorWhenOutsideRange: !0,
39876
39984
  disableUnderline: !0
39877
39985
  });
39878
- ZJ.propTypes = {
39879
- ...BJ,
39986
+ oY.propTypes = {
39987
+ ...YJ,
39880
39988
  suffix: N.default.string,
39881
39989
  min: N.default.number,
39882
39990
  max: N.default.number,
39883
39991
  value: N.default.number
39884
- }, YJ.propTypes = { ...BJ };
39885
- var QJ = ({ disabled: e, label: t, value: n, onChange: r }) => /* @__PURE__ */ j(PJ, {
39992
+ }, iY.propTypes = { ...YJ };
39993
+ var sY = ({ disabled: e, label: t, value: n, onChange: r }) => /* @__PURE__ */ j(UJ, {
39886
39994
  label: t,
39887
39995
  checked: !!n,
39888
39996
  disabled: !!e,
39889
39997
  toggle: r
39890
39998
  });
39891
- QJ.propTypes = {
39892
- ...BJ,
39999
+ sY.propTypes = {
40000
+ ...YJ,
39893
40001
  value: N.default.bool
39894
40002
  };
39895
- var $J = {
39896
- toggle: QJ,
39897
- radio: WJ,
39898
- dropdown: qJ,
39899
- numberField: ZJ,
39900
- checkbox: VJ,
39901
- textField: YJ
39902
- }, eY = i("div")(({ theme: e }) => ({ margin: `0 0 ${e.spacing(2)} 0` })), tY = i("div")(({ theme: e }) => ({
40003
+ var cY = {
40004
+ toggle: sY,
40005
+ radio: $J,
40006
+ dropdown: nY,
40007
+ numberField: oY,
40008
+ checkbox: XJ,
40009
+ textField: iY
40010
+ }, lY = i("div")(({ theme: e }) => ({ margin: `0 0 ${e.spacing(2)} 0` })), uY = i("div")(({ theme: e }) => ({
39903
40011
  color: "#495B8F",
39904
40012
  fontSize: e.typography.fontSize + 2,
39905
40013
  fontWeight: 600,
39906
40014
  marginBottom: e.spacing(1)
39907
- })), nY = i("p")(({ theme: e }) => ({
40015
+ })), dY = i("p")(({ theme: e }) => ({
39908
40016
  fontSize: e.typography.fontSize,
39909
40017
  marginBottom: 0
39910
- })), rY = (e) => {
40018
+ })), fY = (e) => {
39911
40019
  let { model: t, label: n, group: r, configuration: i, onChange: a } = e, o = (e, n, r) => {
39912
40020
  let { isConfigProperty: o, ...s } = S(e, r || n), c = S(o ? i : t, n), l = {
39913
40021
  ...s,
39914
40022
  key: n,
39915
40023
  value: c
39916
- }, u = $J[l.type];
40024
+ }, u = cY[l.type];
39917
40025
  return /* @__PURE__ */ j(u, {
39918
40026
  ...l,
39919
40027
  onChange: (e) => a(n, e, o)
@@ -39922,18 +40030,18 @@ var $J = {
39922
40030
  let n = e[t];
39923
40031
  if (!n) return null;
39924
40032
  let { type: r, label: i, fields: a, choices: s } = n;
39925
- return r === "numberFields" ? /* @__PURE__ */ M("div", { children: [/* @__PURE__ */ j(nY, { children: i }), Object.keys(a).map((n) => o(e, `${t}.${n}`, `${t}.fields.${n}`))] }, `numberField-${i}`) : r === "checkboxes" ? /* @__PURE__ */ M("div", { children: [/* @__PURE__ */ j("p", { children: i }), Object.keys(s).map((n) => o(e, `${t}.${n}`, `${t}.choices.${n}`))] }, `checkbox-${i}`) : o(e, t);
40033
+ return r === "numberFields" ? /* @__PURE__ */ M("div", { children: [/* @__PURE__ */ j(dY, { children: i }), Object.keys(a).map((n) => o(e, `${t}.${n}`, `${t}.fields.${n}`))] }, `numberField-${i}`) : r === "checkboxes" ? /* @__PURE__ */ M("div", { children: [/* @__PURE__ */ j("p", { children: i }), Object.keys(s).map((n) => o(e, `${t}.${n}`, `${t}.choices.${n}`))] }, `checkbox-${i}`) : o(e, t);
39926
40034
  };
39927
- return /* @__PURE__ */ M(eY, { children: [/* @__PURE__ */ j(tY, { children: n }), Object.keys(r).map((e) => s(r, e))] });
40035
+ return /* @__PURE__ */ M(lY, { children: [/* @__PURE__ */ j(uY, { children: n }), Object.keys(r).map((e) => s(r, e))] });
39928
40036
  };
39929
- rY.propTypes = {
40037
+ fY.propTypes = {
39930
40038
  model: N.default.object,
39931
40039
  label: N.default.string,
39932
40040
  group: N.default.object,
39933
40041
  configuration: N.default.object,
39934
40042
  onChange: N.default.func
39935
40043
  };
39936
- var iY = class extends A.Component {
40044
+ var pY = class extends A.Component {
39937
40045
  static propTypes = {
39938
40046
  model: N.default.object,
39939
40047
  configuration: N.default.object,
@@ -39947,13 +40055,13 @@ var iY = class extends A.Component {
39947
40055
  onChangeConfiguration: () => {}
39948
40056
  };
39949
40057
  change = (e, t, n = !1) => {
39950
- RJ("[changeModel]", e, t);
40058
+ qJ("[changeModel]", e, t);
39951
40059
  let { onChangeModel: r, onChangeConfiguration: i } = this.props, a = { ...this.props.model }, o = { ...this.props.configuration };
39952
40060
  n ? ($e(o, e, t), i(o, e)) : ($e(a, e, t), r(a, e));
39953
40061
  };
39954
40062
  render() {
39955
40063
  let { groups: e, model: t, configuration: n, modal: r } = this.props;
39956
- return RJ("render:", t), /* @__PURE__ */ M("div", { children: [Object.keys(e || {}).map((r) => Object.entries(e[r]).some(([, e]) => !!e) ? /* @__PURE__ */ j(rY, {
40064
+ return qJ("render:", t), /* @__PURE__ */ M("div", { children: [Object.keys(e || {}).map((r) => Object.entries(e[r]).some(([, e]) => !!e) ? /* @__PURE__ */ j(fY, {
39957
40065
  label: r,
39958
40066
  model: t,
39959
40067
  configuration: n,
@@ -39961,59 +40069,59 @@ var iY = class extends A.Component {
39961
40069
  onChange: this.change
39962
40070
  }, r) : null), r] });
39963
40071
  }
39964
- }, aY = /* @__PURE__ */ Nq({
39965
- Panel: () => iY,
39966
- checkbox: () => pY,
39967
- checkboxes: () => mY,
39968
- dropdown: () => uY,
39969
- numberField: () => dY,
39970
- numberFields: () => fY,
39971
- radio: () => lY,
39972
- textField: () => oY,
39973
- toggle: () => sY
39974
- }), oY = (e, t = !0) => ({
40072
+ }, mY = /* @__PURE__ */ Hq({
40073
+ Panel: () => pY,
40074
+ checkbox: () => SY,
40075
+ checkboxes: () => CY,
40076
+ dropdown: () => yY,
40077
+ numberField: () => bY,
40078
+ numberFields: () => xY,
40079
+ radio: () => vY,
40080
+ textField: () => hY,
40081
+ toggle: () => gY
40082
+ }), hY = (e, t = !0) => ({
39975
40083
  label: e,
39976
40084
  type: "textField",
39977
40085
  isConfigProperty: t
39978
- }), sY = (e, t = !1, n = !1) => ({
40086
+ }), gY = (e, t = !1, n = !1) => ({
39979
40087
  type: "toggle",
39980
40088
  label: e,
39981
40089
  isConfigProperty: t,
39982
40090
  disabled: n
39983
- }), cY = (e) => typeof e == "string" ? {
40091
+ }), _Y = (e) => typeof e == "string" ? {
39984
40092
  label: e,
39985
40093
  value: e
39986
- } : e, lY = function() {
40094
+ } : e, vY = function() {
39987
40095
  let [e, t, n = !1] = Array.prototype.slice.call(arguments);
39988
40096
  return {
39989
40097
  type: "radio",
39990
40098
  label: e,
39991
- choices: t && t.map((e) => cY(e)),
40099
+ choices: t && t.map((e) => _Y(e)),
39992
40100
  isConfigProperty: n
39993
40101
  };
39994
- }, uY = (e, t, n = !1) => ({
40102
+ }, yY = (e, t, n = !1) => ({
39995
40103
  type: "dropdown",
39996
40104
  label: e,
39997
40105
  choices: t,
39998
40106
  isConfigProperty: n
39999
- }), dY = (e, t, n = !1) => ({
40107
+ }), bY = (e, t, n = !1) => ({
40000
40108
  ...t,
40001
40109
  label: e,
40002
40110
  type: "numberField",
40003
40111
  isConfigProperty: n
40004
- }), fY = (e, t, n = !1) => (Object.keys(t).map((e) => {
40005
- t[e] = dY(t[e].label, t[e], n);
40112
+ }), xY = (e, t, n = !1) => (Object.keys(t).map((e) => {
40113
+ t[e] = bY(t[e].label, t[e], n);
40006
40114
  }), {
40007
40115
  type: "numberFields",
40008
40116
  label: e,
40009
40117
  fields: t
40010
- }), pY = (e, t, n = !1) => ({
40118
+ }), SY = (e, t, n = !1) => ({
40011
40119
  ...t,
40012
40120
  label: e,
40013
40121
  type: "checkbox",
40014
40122
  isConfigProperty: n
40015
- }), mY = (e, t, n = !1) => (Object.keys(t).map((e) => {
40016
- t[e] = pY(t[e].label, t[e], n);
40123
+ }), CY = (e, t, n = !1) => (Object.keys(t).map((e) => {
40124
+ t[e] = SY(t[e].label, t[e], n);
40017
40125
  }), {
40018
40126
  type: "checkboxes",
40019
40127
  label: e,
@@ -40021,24 +40129,24 @@ var iY = class extends A.Component {
40021
40129
  });
40022
40130
  //#endregion
40023
40131
  //#region ../../lib-react/config-ui/dist/index.js
40024
- function hY(e) {
40132
+ function wY(e) {
40025
40133
  return typeof e == "function" || typeof e == "object" && !!e && typeof e.$$typeof == "symbol";
40026
40134
  }
40027
- function gY(e, t) {
40028
- 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;
40135
+ function TY(e, t) {
40136
+ 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;
40029
40137
  }
40030
- var _Y = gY(he, "InputContainer") || gY(bY.InputContainer, "InputContainer"), vY = Fe, yY = vY.default, bY = yY && typeof yY == "object" ? yY : vY, xY = i(Qe)({ marginLeft: 8 }), SY = ({ label: e, onClick: t, disabled: n }) => /* @__PURE__ */ j(xY, {
40138
+ var EY = TY(he, "InputContainer") || TY(kY.InputContainer, "InputContainer"), DY = Fe, OY = DY.default, kY = OY && typeof OY == "object" ? OY : DY, AY = i(Qe)({ marginLeft: 8 }), jY = ({ label: e, onClick: t, disabled: n }) => /* @__PURE__ */ j(AY, {
40031
40139
  onClick: t,
40032
40140
  disabled: n,
40033
40141
  size: "small",
40034
40142
  variant: "contained",
40035
40143
  children: e
40036
40144
  });
40037
- SY.propTypes = {
40145
+ jY.propTypes = {
40038
40146
  disabled: N.default.bool,
40039
40147
  label: N.default.string,
40040
40148
  onClick: N.default.func
40041
- }, SY.defaultProps = {
40149
+ }, jY.defaultProps = {
40042
40150
  className: "",
40043
40151
  disabled: !1,
40044
40152
  label: "Add",
@@ -40046,22 +40154,22 @@ SY.propTypes = {
40046
40154
  };
40047
40155
  //#endregion
40048
40156
  //#region src/author/image-container.tsx
40049
- var CY = (e) => e.type.match(/image.*/), wY = i("div")(({ theme: e }) => ({ marginTop: e.spacing(1) })), TY = i("div")(({ active: e }) => ({
40157
+ var MY = (e) => e.type.match(/image.*/), NY = i("div")(({ theme: e }) => ({ marginTop: e.spacing(1) })), PY = i("div")(({ active: e }) => ({
40050
40158
  border: e ? "1px solid #0032C2" : "1px solid #E0E1E6",
40051
40159
  borderRadius: "5px"
40052
- })), EY = i("div")({
40160
+ })), FY = i("div")({
40053
40161
  alignItems: "center",
40054
40162
  display: "flex",
40055
40163
  flexDirection: "column",
40056
40164
  justifyContent: "center"
40057
- }), DY = i("div")({ minHeight: 350 }), OY = i("img")({
40165
+ }), IY = i("div")({ minHeight: 350 }), LY = i("img")({
40058
40166
  alignItems: "center",
40059
40167
  display: "flex",
40060
40168
  justifyContent: "center"
40061
- }), kY = i("div")({
40169
+ }), RY = i("div")({
40062
40170
  position: "relative",
40063
40171
  width: "fit-content"
40064
- }), AY = i("div")({
40172
+ }), zY = i("div")({
40065
40173
  borderBottom: "1px solid #727272",
40066
40174
  borderRight: "1px solid #727272",
40067
40175
  bottom: "-10px",
@@ -40070,14 +40178,14 @@ var CY = (e) => e.type.match(/image.*/), wY = i("div")(({ theme: e }) => ({ marg
40070
40178
  position: "absolute",
40071
40179
  right: "-10px",
40072
40180
  width: "10px"
40073
- }), jY = i("input")({ display: "none" }), MY = i("div")({
40181
+ }), BY = i("input")({ display: "none" }), VY = i("div")({
40074
40182
  backgroundColor: "#ECEDF1",
40075
40183
  borderBottom: "1px solid #E0E1E6",
40076
40184
  borderTopLeftRadius: "5px",
40077
40185
  borderTopRightRadius: "5px",
40078
40186
  display: "flex",
40079
40187
  padding: "12px 8px"
40080
- }), NY = class extends tt {
40188
+ }), HY = class extends tt {
40081
40189
  static propTypes = { imageDimensions: N.default.object };
40082
40190
  static defaultProps = {};
40083
40191
  constructor(e) {
@@ -40122,8 +40230,8 @@ var CY = (e) => e.type.match(/image.*/), wY = i("div")(({ theme: e }) => ({ marg
40122
40230
  let { items: t, files: n } = e.dataTransfer;
40123
40231
  if (t && t[0].kind === "file") {
40124
40232
  let e = t[0].getAsFile();
40125
- CY(e) && this.handleFileRead(e);
40126
- } else CY(n[0]) && this.handleFileRead(n[0]);
40233
+ MY(e) && this.handleFileRead(e);
40234
+ } else MY(n[0]) && this.handleFileRead(n[0]);
40127
40235
  this.makeDropzoneInactive();
40128
40236
  };
40129
40237
  handleOnDragOver = (e) => {
@@ -40162,10 +40270,10 @@ var CY = (e) => e.type.match(/image.*/), wY = i("div")(({ theme: e }) => ({ marg
40162
40270
  } })), this.handleDisableDrag();
40163
40271
  };
40164
40272
  renderUploadControl(e) {
40165
- return /* @__PURE__ */ M("div", { children: [/* @__PURE__ */ j(SY, {
40273
+ return /* @__PURE__ */ M("div", { children: [/* @__PURE__ */ j(jY, {
40166
40274
  label: e,
40167
40275
  onClick: this.handleInputClick
40168
- }), /* @__PURE__ */ j(jY, {
40276
+ }), /* @__PURE__ */ j(BY, {
40169
40277
  accept: "image/*",
40170
40278
  onChange: this.handleUploadImage,
40171
40279
  ref: (e) => {
@@ -40176,7 +40284,7 @@ var CY = (e) => e.type.match(/image.*/), wY = i("div")(({ theme: e }) => ({ marg
40176
40284
  }
40177
40285
  render() {
40178
40286
  let { imageUrl: e, imageDimensions: t } = this.props, { dropzoneActive: n, dragEnabled: r, maxImageHeight: i, maxImageWidth: a } = this.state;
40179
- return /* @__PURE__ */ j(wY, { children: /* @__PURE__ */ M(TY, {
40287
+ return /* @__PURE__ */ j(NY, { children: /* @__PURE__ */ M(PY, {
40180
40288
  active: n,
40181
40289
  ...r ? {
40182
40290
  onDragExit: this.handleOnDragExit,
@@ -40184,11 +40292,11 @@ var CY = (e) => e.type.match(/image.*/), wY = i("div")(({ theme: e }) => ({ marg
40184
40292
  onDragOver: this.handleOnDragOver,
40185
40293
  onDrop: this.handleOnDrop
40186
40294
  } : {},
40187
- children: [/* @__PURE__ */ j(MY, { children: this.renderUploadControl(e ? "Replace Image" : "Upload Image") }), /* @__PURE__ */ j(DY, {
40295
+ children: [/* @__PURE__ */ j(VY, { children: this.renderUploadControl(e ? "Replace Image" : "Upload Image") }), /* @__PURE__ */ j(IY, {
40188
40296
  ref: (e) => {
40189
40297
  this.imageSection = e;
40190
40298
  },
40191
- children: e ? /* @__PURE__ */ M(kY, { children: [/* @__PURE__ */ j(OY, {
40299
+ children: e ? /* @__PURE__ */ M(RY, { children: [/* @__PURE__ */ j(LY, {
40192
40300
  height: "auto",
40193
40301
  onLoad: this.handleOnImageLoad,
40194
40302
  ref: (e) => {
@@ -40201,10 +40309,10 @@ var CY = (e) => e.type.match(/image.*/), wY = i("div")(({ theme: e }) => ({ marg
40201
40309
  maxHeight: i
40202
40310
  },
40203
40311
  alt: ""
40204
- }), /* @__PURE__ */ j(AY, { ref: (e) => {
40312
+ }), /* @__PURE__ */ j(zY, { ref: (e) => {
40205
40313
  this.resize = e;
40206
- } })] }) : /* @__PURE__ */ M(DY, {
40207
- as: EY,
40314
+ } })] }) : /* @__PURE__ */ M(IY, {
40315
+ as: FY,
40208
40316
  children: [
40209
40317
  /* @__PURE__ */ j("label", { children: "Drag and drop or upload image from computer" }),
40210
40318
  /* @__PURE__ */ j("br", {}),
@@ -40215,7 +40323,7 @@ var CY = (e) => e.type.match(/image.*/), wY = i("div")(({ theme: e }) => ({ marg
40215
40323
  }) });
40216
40324
  }
40217
40325
  };
40218
- NY.propTypes = {
40326
+ HY.propTypes = {
40219
40327
  imageUrl: N.default.string.isRequired,
40220
40328
  onImageUpload: N.default.func.isRequired,
40221
40329
  onUpdateImageDimension: N.default.func.isRequired,
@@ -40223,16 +40331,16 @@ NY.propTypes = {
40223
40331
  };
40224
40332
  //#endregion
40225
40333
  //#region src/author/root.tsx
40226
- var { Panel: PY, toggle: FY, dropdown: IY } = aY, LY = i(_Y)(({ theme: e }) => ({
40334
+ var { Panel: UY, toggle: WY, dropdown: GY } = mY, KY = i(EY)(({ theme: e }) => ({
40227
40335
  paddingTop: e.spacing(1),
40228
40336
  marginTop: e.spacing(2),
40229
40337
  marginBottom: e.spacing(1),
40230
40338
  width: "100%"
40231
- })), RY = i("div")(({ theme: e }) => ({
40339
+ })), qY = i("div")(({ theme: e }) => ({
40232
40340
  fontSize: e.typography.fontSize - 2,
40233
40341
  color: e.palette.error.main,
40234
40342
  paddingTop: e.spacing(1)
40235
- })), zY = class extends A.Component {
40343
+ })), JY = class extends A.Component {
40236
40344
  onPromptChanged = (e) => {
40237
40345
  let { model: t, onModelChanged: n } = this.props;
40238
40346
  n({
@@ -40263,23 +40371,23 @@ var { Panel: PY, toggle: FY, dropdown: IY } = aY, LY = i(_Y)(({ theme: e }) => (
40263
40371
  };
40264
40372
  render() {
40265
40373
  let { configuration: e, imageSupport: t, model: n, onConfigurationChanged: r, onModelChanged: i, uploadSoundSupport: a } = this.props, { baseInputConfiguration: o = {}, backgroundImage: s = {}, contentDimensions: c = {}, maxImageWidth: l = {}, maxImageHeight: u = {}, prompt: d = {}, settingsPanelDisabled: f, spellCheck: p = {}, teacherInstructions: m = {}, withRubric: h = {}, language: g = {}, languageChoices: _ = {}, mathMlOptions: v = {} } = e || {}, { backgroundImageEnabled: y, errors: b = {}, extraCSSRules: x, promptEnabled: S, spellCheckEnabled: C, teacherInstructionsEnabled: w, toolbarEditorPosition: T } = n || {}, { prompt: E, teacherInstructions: ee } = b, te = l && l.prompt, D = u && u.prompt, ne = { position: T === "top" ? "top" : "bottom" }, re = {
40266
- backgroundImageEnabled: s.settings && FY(s.label),
40267
- promptEnabled: d.settings && FY(d.label),
40268
- "language.enabled": g.settings && FY(g.label, !0),
40269
- language: g.settings && g.enabled && IY(_.label, _.options)
40374
+ backgroundImageEnabled: s.settings && WY(s.label),
40375
+ promptEnabled: d.settings && WY(d.label),
40376
+ "language.enabled": g.settings && WY(g.label, !0),
40377
+ language: g.settings && g.enabled && GY(_.label, _.options)
40270
40378
  }, ie = {
40271
- teacherInstructionsEnabled: m.settings && FY(m.label),
40272
- spellCheckEnabled: p.settings && FY(p.label),
40273
- rubricEnabled: h?.settings && FY(h?.label)
40379
+ teacherInstructionsEnabled: m.settings && WY(m.label),
40380
+ spellCheckEnabled: p.settings && WY(p.label),
40381
+ rubricEnabled: h?.settings && WY(h?.label)
40274
40382
  }, ae = (e = {}) => ({
40275
40383
  ...o,
40276
40384
  ...e
40277
40385
  });
40278
- return /* @__PURE__ */ M(AJ.ConfigLayout, {
40386
+ return /* @__PURE__ */ M(zJ.ConfigLayout, {
40279
40387
  extraCSSRules: x,
40280
40388
  dimensions: c,
40281
40389
  hideSettings: f,
40282
- settings: /* @__PURE__ */ j(PY, {
40390
+ settings: /* @__PURE__ */ j(UY, {
40283
40391
  model: n,
40284
40392
  onChangeModel: i,
40285
40393
  configuration: e,
@@ -40290,9 +40398,9 @@ var { Panel: PY, toggle: FY, dropdown: IY } = aY, LY = i(_Y)(({ theme: e }) => (
40290
40398
  }
40291
40399
  }),
40292
40400
  children: [
40293
- w && /* @__PURE__ */ M(LY, {
40401
+ w && /* @__PURE__ */ M(KY, {
40294
40402
  label: m.label,
40295
- children: [/* @__PURE__ */ j(pq, {
40403
+ children: [/* @__PURE__ */ j(Sq, {
40296
40404
  markup: n.teacherInstructions || "",
40297
40405
  onChange: this.onTeacherInstructionsChanged,
40298
40406
  imageSupport: t,
@@ -40306,11 +40414,11 @@ var { Panel: PY, toggle: FY, dropdown: IY } = aY, LY = i(_Y)(({ theme: e }) => (
40306
40414
  uploadSoundSupport: a,
40307
40415
  languageCharactersProps: [{ language: "spanish" }, { language: "special" }],
40308
40416
  mathMlOptions: v
40309
- }), ee && /* @__PURE__ */ j(RY, { children: ee })]
40417
+ }), ee && /* @__PURE__ */ j(qY, { children: ee })]
40310
40418
  }),
40311
- S && /* @__PURE__ */ M(LY, {
40419
+ S && /* @__PURE__ */ M(KY, {
40312
40420
  label: "Item Stem",
40313
- children: [/* @__PURE__ */ j(pq, {
40421
+ children: [/* @__PURE__ */ j(Sq, {
40314
40422
  markup: n.prompt,
40315
40423
  onChange: this.onPromptChanged,
40316
40424
  error: E,
@@ -40323,12 +40431,12 @@ var { Panel: PY, toggle: FY, dropdown: IY } = aY, LY = i(_Y)(({ theme: e }) => (
40323
40431
  uploadSoundSupport: a,
40324
40432
  languageCharactersProps: [{ language: "spanish" }, { language: "special" }],
40325
40433
  mathMlOptions: v
40326
- }), E && /* @__PURE__ */ j(RY, { children: E })]
40434
+ }), E && /* @__PURE__ */ j(qY, { children: E })]
40327
40435
  }),
40328
40436
  y && /* @__PURE__ */ M(A.Fragment, { children: [/* @__PURE__ */ j(Dt, {
40329
40437
  variant: "h6",
40330
40438
  children: "Define Background Image"
40331
- }), /* @__PURE__ */ j(NY, {
40439
+ }), /* @__PURE__ */ j(HY, {
40332
40440
  imageUrl: n.imageUrl,
40333
40441
  onUpdateImageDimension: this.onUpdateImageDimension,
40334
40442
  onImageUpload: this.onImageUpload,
@@ -40339,7 +40447,7 @@ var { Panel: PY, toggle: FY, dropdown: IY } = aY, LY = i(_Y)(({ theme: e }) => (
40339
40447
  });
40340
40448
  }
40341
40449
  };
40342
- zY.propTypes = {
40450
+ JY.propTypes = {
40343
40451
  configuration: N.default.object,
40344
40452
  model: N.default.object.isRequired,
40345
40453
  imageSupport: N.default.shape({
@@ -40355,7 +40463,7 @@ zY.propTypes = {
40355
40463
  };
40356
40464
  //#endregion
40357
40465
  //#region src/author/defaults.ts
40358
- var BY = {
40466
+ var YY = {
40359
40467
  model: {
40360
40468
  backgroundImageEnabled: !0,
40361
40469
  imageDimensions: {
@@ -40437,23 +40545,23 @@ var BY = {
40437
40545
  options: []
40438
40546
  }
40439
40547
  }
40440
- }, VY = (0, Do.default)("hotspot:configure"), HY = class e extends HTMLElement {
40548
+ }, XY = (0, Do.default)("hotspot:configure"), ZY = class e extends HTMLElement {
40441
40549
  static createDefaultModel = (e = {}, t) => {
40442
40550
  let n = {
40443
- ...BY.model,
40551
+ ...YY.model,
40444
40552
  ...e
40445
40553
  };
40446
40554
  return t?.withRubric?.forceEnabled && !n.rubricEnabled && (n.rubricEnabled = !0), n;
40447
40555
  };
40448
40556
  constructor() {
40449
- super(), this._root = null, this._configuration = BY.configuration, this._configuration.withRubric?.forceEnabled && (this._configuration.withRubric.settings = !1), this._model = e.createDefaultModel({}, this._configuration), this.onModelChanged = this.onModelChanged.bind(this);
40557
+ super(), this._root = null, this._configuration = YY.configuration, this._configuration.withRubric?.forceEnabled && (this._configuration.withRubric.settings = !1), this._model = e.createDefaultModel({}, this._configuration), this.onModelChanged = this.onModelChanged.bind(this);
40450
40558
  }
40451
40559
  set model(t) {
40452
40560
  this._model = e.createDefaultModel(t, this._configuration), this._render();
40453
40561
  }
40454
40562
  set configuration(e) {
40455
40563
  let t = {
40456
- ...BY.configuration,
40564
+ ...YY.configuration,
40457
40565
  ...e
40458
40566
  };
40459
40567
  this._configuration = t;
@@ -40486,8 +40594,8 @@ var BY = {
40486
40594
  this.dispatchEvent(new jt(e, t));
40487
40595
  }
40488
40596
  _render() {
40489
- VY("_render");
40490
- let e = A.createElement(zY, {
40597
+ XY("_render");
40598
+ let e = A.createElement(JY, {
40491
40599
  model: this._model,
40492
40600
  configuration: this._configuration,
40493
40601
  onModelChanged: this.onModelChanged,
@@ -40511,6 +40619,6 @@ var BY = {
40511
40619
  }
40512
40620
  };
40513
40621
  //#endregion
40514
- export { HY as default };
40622
+ export { ZY as default };
40515
40623
 
40516
40624
  //# sourceMappingURL=index.js.map