@pie-element/passage 7.1.2-next.7 → 7.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.
- package/dist/browser/author/index.js +636 -528
- package/dist/browser/author/index.js.map +1 -1
- package/dist/browser/delivery/index.js +2 -2
- package/dist/browser/{dist-CufhtHcn.js → dist-CxgsQCZ6.js} +490 -488
- package/dist/browser/{dist-CufhtHcn.js.map → dist-CxgsQCZ6.js.map} +1 -1
- package/dist/browser/print/index.js +2 -2
- package/dist/browser/{stimulus-tabs-cEUGjTUU.js → stimulus-tabs-oPcoac4V.js} +2 -2
- package/dist/browser/{stimulus-tabs-cEUGjTUU.js.map → stimulus-tabs-oPcoac4V.js.map} +1 -1
- package/dist/index.iife.js +7 -7
- package/module/print.js +15770 -0
- package/module/print.js.map +1 -0
- package/package.json +5 -5
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { i as e, r as t, t as n } from "../rolldown-runtime-CWhphoD1.js";
|
|
2
|
-
import { $ as r, A as i, B as a, C as o, Ct as s, D as c, E as l, Et as u, F as d, G as f, H as p, I as m, J as h, K as g, L as _, M as v, N as y, O as b, P as x, Q as S, R as C, S as w, St as T, T as E, Tt as ee, U as te, V as ne, W as re, X as D, Y as ie, Z as O, _ as ae, _t as oe, at as se, bt as ce, c as le, ct as k, d as ue, dt as de, et as fe, f as pe, ft as me, g as he, gt as ge, ht as _e, i as ve, it as ye, j as be, k as xe, l as Se, lt as Ce, m as we, mt as Te, n as Ee, nt as De, ot as Oe, p as ke, pt as Ae, q as je, r as Me, rt as Ne, st as Pe, t as Fe, tt as Ie, u as Le, ut as Re, v as ze, vt as Be, w as Ve, wt as He, x as Ue, xt as We, y as Ge, yt as Ke, z as qe } from "../dist-
|
|
2
|
+
import { $ as r, A as i, B as a, C as o, Ct as s, D as c, E as l, Et as u, F as d, G as f, H as p, I as m, J as h, K as g, L as _, M as v, N as y, O as b, P as x, Q as S, R as C, S as w, St as T, T as E, Tt as ee, U as te, V as ne, W as re, X as D, Y as ie, Z as O, _ as ae, _t as oe, at as se, bt as ce, c as le, ct as k, d as ue, dt as de, et as fe, f as pe, ft as me, g as he, gt as ge, ht as _e, i as ve, it as ye, j as be, k as xe, l as Se, lt as Ce, m as we, mt as Te, n as Ee, nt as De, ot as Oe, p as ke, pt as Ae, q as je, r as Me, rt as Ne, st as Pe, t as Fe, tt as Ie, u as Le, ut as Re, v as ze, vt as Be, w as Ve, wt as He, x as Ue, xt as We, y as Ge, yt as Ke, z as qe } from "../dist-CxgsQCZ6.js";
|
|
3
3
|
import { a as Je, c as Ye, d as Xe, i as Ze, l as Qe, n as $e, o as et, r as tt, s as nt, t as rt, u as it } from "../dist-CiWlBjsz.js";
|
|
4
4
|
import * as A from "react";
|
|
5
5
|
import at, { Component as ot, createContext as st, createElement as ct, createRef as lt, forwardRef as ut, memo as dt, useCallback as ft, useContext as pt, useDebugValue as mt, useEffect as ht, useLayoutEffect as gt, useMemo as _t, useRef as vt, useState as yt, version as bt } from "react";
|
|
@@ -39183,8 +39183,8 @@ Wb.create({
|
|
|
39183
39183
|
})) ?? null };
|
|
39184
39184
|
}
|
|
39185
39185
|
});
|
|
39186
|
-
var Jq = "placeholder", Yq = new Zu("tiptap__placeholder")
|
|
39187
|
-
function
|
|
39186
|
+
var Jq = "placeholder", Yq = new Zu("tiptap__placeholder");
|
|
39187
|
+
function Xq(e) {
|
|
39188
39188
|
let { editor: t, placeholder: n, dataAttribute: r, pos: i, node: a, isEmptyDoc: o, hasAnchor: s, classes: { emptyNode: c, emptyEditor: l } } = e, u = [c];
|
|
39189
39189
|
return o && u.push(l), qg.node(i, i + a.nodeSize, {
|
|
39190
39190
|
class: u.join(" "),
|
|
@@ -39196,156 +39196,198 @@ function Zq(e) {
|
|
|
39196
39196
|
}) : n
|
|
39197
39197
|
});
|
|
39198
39198
|
}
|
|
39199
|
-
function
|
|
39199
|
+
function Zq(e, t) {
|
|
39200
|
+
return typeof e == "function" ? e(t) : e;
|
|
39201
|
+
}
|
|
39202
|
+
function Qq({ editor: e, options: t, dataAttribute: n, doc: r, selection: i, from: a, to: o }) {
|
|
39203
|
+
let { anchor: s } = i, c = [], l = e.isEmpty;
|
|
39204
|
+
return r.nodesBetween(a, o, (r, i) => {
|
|
39205
|
+
let a = s >= i && s <= i + r.nodeSize, o = !r.isLeaf && Qy(r);
|
|
39206
|
+
return r.type.isTextblock && (a || !t.showOnlyCurrent) && o && c.push(Xq({
|
|
39207
|
+
editor: e,
|
|
39208
|
+
isEmptyDoc: l,
|
|
39209
|
+
dataAttribute: n,
|
|
39210
|
+
hasAnchor: a,
|
|
39211
|
+
placeholder: t.placeholder,
|
|
39212
|
+
classes: {
|
|
39213
|
+
emptyEditor: t.emptyEditorClass,
|
|
39214
|
+
emptyNode: Zq(t.emptyNodeClass, {
|
|
39215
|
+
editor: e,
|
|
39216
|
+
node: r,
|
|
39217
|
+
pos: i,
|
|
39218
|
+
hasAnchor: a
|
|
39219
|
+
})
|
|
39220
|
+
},
|
|
39221
|
+
node: r,
|
|
39222
|
+
pos: i
|
|
39223
|
+
})), t.includeChildren;
|
|
39224
|
+
}), c;
|
|
39225
|
+
}
|
|
39226
|
+
function $q({ editor: e, options: t, dataAttribute: n, doc: r, selection: i }) {
|
|
39200
39227
|
if (!(e.isEditable || !t.showOnlyWhenEditable)) return null;
|
|
39201
|
-
let { anchor: a } = i, o = [], s = e.isEmpty
|
|
39202
|
-
emptyEditor: t.emptyEditorClass,
|
|
39203
|
-
emptyNode: t.emptyNodeClass
|
|
39204
|
-
};
|
|
39228
|
+
let { anchor: a } = i, o = [], s = e.isEmpty;
|
|
39205
39229
|
if (t.showOnlyCurrent && !t.includeChildren) {
|
|
39206
|
-
let i = r.resolve(a),
|
|
39207
|
-
if (
|
|
39208
|
-
let r = a >=
|
|
39209
|
-
o.push(
|
|
39230
|
+
let i = r.resolve(a), c = i.depth > 0 ? i.node(1) : i.nodeAfter, l = i.depth > 0 ? i.before(1) : a;
|
|
39231
|
+
if (c && c.type.isTextblock && Qy(c)) {
|
|
39232
|
+
let r = a >= l && a <= l + c.nodeSize;
|
|
39233
|
+
o.push(Xq({
|
|
39210
39234
|
editor: e,
|
|
39211
39235
|
isEmptyDoc: s,
|
|
39212
39236
|
dataAttribute: n,
|
|
39213
39237
|
hasAnchor: r,
|
|
39214
39238
|
placeholder: t.placeholder,
|
|
39215
|
-
classes:
|
|
39216
|
-
|
|
39217
|
-
|
|
39239
|
+
classes: {
|
|
39240
|
+
emptyEditor: t.emptyEditorClass,
|
|
39241
|
+
emptyNode: Zq(t.emptyNodeClass, {
|
|
39242
|
+
editor: e,
|
|
39243
|
+
node: c,
|
|
39244
|
+
pos: l,
|
|
39245
|
+
hasAnchor: r
|
|
39246
|
+
})
|
|
39247
|
+
},
|
|
39248
|
+
node: c,
|
|
39249
|
+
pos: l
|
|
39218
39250
|
}));
|
|
39219
39251
|
}
|
|
39220
|
-
} else {
|
|
39221
|
-
|
|
39222
|
-
|
|
39223
|
-
|
|
39224
|
-
|
|
39225
|
-
|
|
39226
|
-
|
|
39227
|
-
|
|
39228
|
-
|
|
39229
|
-
placeholder: t.placeholder,
|
|
39230
|
-
classes: c,
|
|
39231
|
-
node: r,
|
|
39232
|
-
pos: i
|
|
39233
|
-
})), t.includeChildren;
|
|
39234
|
-
});
|
|
39235
|
-
}
|
|
39252
|
+
} else o.push(...Qq({
|
|
39253
|
+
editor: e,
|
|
39254
|
+
options: t,
|
|
39255
|
+
dataAttribute: n,
|
|
39256
|
+
doc: r,
|
|
39257
|
+
selection: i,
|
|
39258
|
+
from: 0,
|
|
39259
|
+
to: r.content.size
|
|
39260
|
+
}));
|
|
39236
39261
|
return Xg.create(r, o);
|
|
39237
39262
|
}
|
|
39238
|
-
function
|
|
39239
|
-
|
|
39263
|
+
function eJ(e, t) {
|
|
39264
|
+
let n = e.resolve(t);
|
|
39265
|
+
if (n.depth === 0) {
|
|
39266
|
+
let e = n.nodeAfter ?? n.nodeBefore;
|
|
39267
|
+
if (!e) return {
|
|
39268
|
+
from: t,
|
|
39269
|
+
to: t
|
|
39270
|
+
};
|
|
39271
|
+
let r = n.nodeAfter ? t : t - e.nodeSize;
|
|
39272
|
+
return {
|
|
39273
|
+
from: r,
|
|
39274
|
+
to: r + e.nodeSize
|
|
39275
|
+
};
|
|
39276
|
+
}
|
|
39277
|
+
let r = n.before(1);
|
|
39278
|
+
return {
|
|
39279
|
+
from: r,
|
|
39280
|
+
to: r + n.node(1).nodeSize
|
|
39281
|
+
};
|
|
39240
39282
|
}
|
|
39241
|
-
function
|
|
39242
|
-
|
|
39243
|
-
|
|
39283
|
+
function tJ(e, t) {
|
|
39284
|
+
return {
|
|
39285
|
+
from: Math.max(0, t.from - 1),
|
|
39286
|
+
to: Math.min(e.content.size, t.to - 1)
|
|
39287
|
+
};
|
|
39244
39288
|
}
|
|
39245
|
-
function
|
|
39246
|
-
let
|
|
39247
|
-
|
|
39248
|
-
|
|
39249
|
-
|
|
39250
|
-
|
|
39251
|
-
|
|
39252
|
-
|
|
39253
|
-
|
|
39254
|
-
|
|
39255
|
-
|
|
39256
|
-
|
|
39257
|
-
|
|
39258
|
-
|
|
39289
|
+
function nJ(e, t, n) {
|
|
39290
|
+
let r = [];
|
|
39291
|
+
return e.forEach((e, i) => {
|
|
39292
|
+
let a = i, o = a + e.nodeSize, s = a + 1, c = o + 1;
|
|
39293
|
+
s < n && c > t && r.push({
|
|
39294
|
+
from: a,
|
|
39295
|
+
to: o
|
|
39296
|
+
});
|
|
39297
|
+
}), r;
|
|
39298
|
+
}
|
|
39299
|
+
function rJ(e) {
|
|
39300
|
+
if (e.length === 0) return [];
|
|
39301
|
+
let t = [...e].sort((e, t) => e.from - t.from), n = [{ ...t[0] }];
|
|
39302
|
+
for (let e = 1; e < t.length; e += 1) {
|
|
39303
|
+
let r = n[n.length - 1], i = t[e];
|
|
39304
|
+
i.from <= r.to ? r.to = Math.max(r.to, i.to) : n.push({ ...i });
|
|
39259
39305
|
}
|
|
39260
|
-
return
|
|
39306
|
+
return n;
|
|
39261
39307
|
}
|
|
39262
|
-
function
|
|
39263
|
-
|
|
39264
|
-
|
|
39265
|
-
bottom: window.innerHeight
|
|
39266
|
-
} : e.getBoundingClientRect();
|
|
39308
|
+
function iJ(e, t) {
|
|
39309
|
+
let n = nJ(e, t.from, t.to);
|
|
39310
|
+
return n.push(tJ(e, eJ(e, t.from))), t.to > t.from ? n.push(tJ(e, eJ(e, Math.min(t.to, e.content.size + 1) - 1))) : t.from < e.content.size + 1 && n.push(tJ(e, eJ(e, Math.min(t.from + 1, e.content.size)))), n;
|
|
39267
39311
|
}
|
|
39268
|
-
function
|
|
39269
|
-
let r =
|
|
39270
|
-
|
|
39271
|
-
|
|
39272
|
-
|
|
39273
|
-
|
|
39274
|
-
|
|
39275
|
-
bottom: e.content.size
|
|
39276
|
-
};
|
|
39277
|
-
let s = getComputedStyle(t.dom).direction === "rtl" ? Math.max(r.right - 2, r.left + 2) : r.left + 2, c = t.posAtCoords({
|
|
39278
|
-
left: s,
|
|
39279
|
-
top: a + 2
|
|
39280
|
-
}), l = t.posAtCoords({
|
|
39281
|
-
left: s,
|
|
39282
|
-
top: o - 2
|
|
39283
|
-
});
|
|
39284
|
-
return {
|
|
39285
|
-
top: c ? c.pos : 0,
|
|
39286
|
-
bottom: l ? l.pos : e.content.size
|
|
39287
|
-
};
|
|
39312
|
+
function aJ(e, t, n) {
|
|
39313
|
+
let r = [];
|
|
39314
|
+
if (e.docChanged) {
|
|
39315
|
+
let t = Vy(e);
|
|
39316
|
+
for (let e of t) r.push(...iJ(n.doc, e.newRange));
|
|
39317
|
+
}
|
|
39318
|
+
return e.selectionSet && (r.push(tJ(n.doc, eJ(n.doc, e.mapping.map(t.selection.anchor)))), r.push(tJ(n.doc, eJ(n.doc, n.selection.anchor)))), rJ(r);
|
|
39288
39319
|
}
|
|
39289
|
-
|
|
39290
|
-
|
|
39291
|
-
|
|
39292
|
-
|
|
39293
|
-
|
|
39294
|
-
|
|
39295
|
-
|
|
39296
|
-
|
|
39297
|
-
|
|
39298
|
-
|
|
39299
|
-
|
|
39300
|
-
|
|
39301
|
-
|
|
39302
|
-
|
|
39303
|
-
|
|
39304
|
-
|
|
39320
|
+
function oJ(e, t, n) {
|
|
39321
|
+
let r = Math.max(0, Math.min(e, n.content.size));
|
|
39322
|
+
return {
|
|
39323
|
+
from: r,
|
|
39324
|
+
to: Math.max(r, Math.min(t, n.content.size))
|
|
39325
|
+
};
|
|
39326
|
+
}
|
|
39327
|
+
function sJ({ decorations: e, ranges: t, editor: n, options: r, dataAttribute: i, doc: a, selection: o }) {
|
|
39328
|
+
let s = e;
|
|
39329
|
+
for (let e of t) {
|
|
39330
|
+
let { from: t, to: c } = oJ(e.from, e.to, a), l = s.find(t, c).filter((e) => e.from >= t && e.to <= c);
|
|
39331
|
+
l.length && (s = s.remove(l));
|
|
39332
|
+
let u = Qq({
|
|
39333
|
+
editor: n,
|
|
39334
|
+
options: r,
|
|
39335
|
+
dataAttribute: i,
|
|
39336
|
+
doc: a,
|
|
39337
|
+
selection: o,
|
|
39338
|
+
from: t,
|
|
39339
|
+
to: c
|
|
39340
|
+
});
|
|
39341
|
+
u.length && (s = s.add(a, u));
|
|
39305
39342
|
}
|
|
39306
|
-
|
|
39307
|
-
|
|
39308
|
-
|
|
39309
|
-
|
|
39310
|
-
|
|
39311
|
-
|
|
39312
|
-
|
|
39313
|
-
|
|
39314
|
-
|
|
39315
|
-
|
|
39316
|
-
|
|
39317
|
-
|
|
39318
|
-
r === null && (r = requestAnimationFrame(() => {
|
|
39319
|
-
r = null;
|
|
39320
|
-
let e = performance.now();
|
|
39321
|
-
e - i >= 150 ? (i = e, n()) : a();
|
|
39322
|
-
}));
|
|
39323
|
-
};
|
|
39324
|
-
return t.addEventListener("scroll", a, { passive: !0 }), n(), {
|
|
39325
|
-
update(t, n) {
|
|
39326
|
-
e.state.doc.content.size !== n.doc.content.size && a();
|
|
39343
|
+
return s;
|
|
39344
|
+
}
|
|
39345
|
+
function cJ({ editor: e, options: t, dataAttribute: n }) {
|
|
39346
|
+
return {
|
|
39347
|
+
init(r, i) {
|
|
39348
|
+
return $q({
|
|
39349
|
+
editor: e,
|
|
39350
|
+
options: t,
|
|
39351
|
+
dataAttribute: n,
|
|
39352
|
+
doc: i.doc,
|
|
39353
|
+
selection: i.selection
|
|
39354
|
+
}) ?? Xg.empty;
|
|
39327
39355
|
},
|
|
39328
|
-
|
|
39329
|
-
r
|
|
39356
|
+
apply(r, i, a, o) {
|
|
39357
|
+
return !r.docChanged && !r.selectionSet ? i : sJ({
|
|
39358
|
+
decorations: i.map(r.mapping, r.doc),
|
|
39359
|
+
ranges: aJ(r, a, o),
|
|
39360
|
+
editor: e,
|
|
39361
|
+
options: t,
|
|
39362
|
+
dataAttribute: n,
|
|
39363
|
+
doc: o.doc,
|
|
39364
|
+
selection: o.selection
|
|
39365
|
+
});
|
|
39330
39366
|
}
|
|
39331
39367
|
};
|
|
39332
39368
|
}
|
|
39333
|
-
function
|
|
39334
|
-
|
|
39369
|
+
function lJ(e) {
|
|
39370
|
+
return e.replace(/\s+/g, "-").replace(/[^a-zA-Z0-9-]/g, "").replace(/^[0-9-]+/, "").replace(/^-+/, "").toLowerCase();
|
|
39371
|
+
}
|
|
39372
|
+
function uJ({ editor: e, options: t }) {
|
|
39373
|
+
let n = t.dataAttribute ? `data-${lJ(t.dataAttribute)}` : `data-${Jq}`, r = t.showOnlyCurrent && !t.includeChildren;
|
|
39335
39374
|
return new z({
|
|
39336
39375
|
key: Yq,
|
|
39337
|
-
state:
|
|
39338
|
-
|
|
39339
|
-
|
|
39376
|
+
...r ? {} : { state: cJ({
|
|
39377
|
+
editor: e,
|
|
39378
|
+
options: t,
|
|
39379
|
+
dataAttribute: n
|
|
39380
|
+
}) },
|
|
39381
|
+
props: { decorations: r ? ({ doc: r, selection: i }) => $q({
|
|
39340
39382
|
editor: e,
|
|
39341
39383
|
options: t,
|
|
39342
39384
|
dataAttribute: n,
|
|
39343
39385
|
doc: r,
|
|
39344
39386
|
selection: i
|
|
39345
|
-
}) }
|
|
39387
|
+
}) : (n) => t.showOnlyWhenEditable && !e.isEditable ? Xg.empty : Yq.getState(n) ?? Xg.empty }
|
|
39346
39388
|
});
|
|
39347
39389
|
}
|
|
39348
|
-
var
|
|
39390
|
+
var dJ = Wb.create({
|
|
39349
39391
|
name: "placeholder",
|
|
39350
39392
|
addOptions() {
|
|
39351
39393
|
return {
|
|
@@ -39359,12 +39401,25 @@ var sJ = Wb.create({
|
|
|
39359
39401
|
};
|
|
39360
39402
|
},
|
|
39361
39403
|
addProseMirrorPlugins() {
|
|
39362
|
-
return [
|
|
39404
|
+
return [uJ({
|
|
39363
39405
|
editor: this.editor,
|
|
39364
39406
|
options: this.options
|
|
39365
39407
|
})];
|
|
39366
39408
|
}
|
|
39367
39409
|
});
|
|
39410
|
+
function fJ(e, t) {
|
|
39411
|
+
return !e.selection.empty && !$y(e.selection) && t.isEditable;
|
|
39412
|
+
}
|
|
39413
|
+
function pJ(e, t) {
|
|
39414
|
+
return fJ(e, t) && !t.isFocused && !t.view.dragging;
|
|
39415
|
+
}
|
|
39416
|
+
function mJ() {
|
|
39417
|
+
var e;
|
|
39418
|
+
(e = window.getSelection()) == null || e.removeAllRanges();
|
|
39419
|
+
}
|
|
39420
|
+
function hJ(e) {
|
|
39421
|
+
e.focus();
|
|
39422
|
+
}
|
|
39368
39423
|
Wb.create({
|
|
39369
39424
|
name: "selection",
|
|
39370
39425
|
addOptions() {
|
|
@@ -39374,13 +39429,25 @@ Wb.create({
|
|
|
39374
39429
|
let { editor: e, options: t } = this;
|
|
39375
39430
|
return [new z({
|
|
39376
39431
|
key: new Zu("selection"),
|
|
39377
|
-
props: {
|
|
39378
|
-
|
|
39379
|
-
|
|
39432
|
+
props: {
|
|
39433
|
+
decorations(n) {
|
|
39434
|
+
return pJ(n, e) ? Xg.create(n.doc, [qg.inline(n.selection.from, n.selection.to, { class: t.className })]) : null;
|
|
39435
|
+
},
|
|
39436
|
+
handleDOMEvents: {
|
|
39437
|
+
blur(t) {
|
|
39438
|
+
return fJ(t.state, e) && mJ(), !1;
|
|
39439
|
+
},
|
|
39440
|
+
focus(t) {
|
|
39441
|
+
return fJ(t.state, e) && requestAnimationFrame(() => {
|
|
39442
|
+
!e.isDestroyed && t.hasFocus() && hJ(t);
|
|
39443
|
+
}), !1;
|
|
39444
|
+
}
|
|
39445
|
+
}
|
|
39446
|
+
}
|
|
39380
39447
|
})];
|
|
39381
39448
|
}
|
|
39382
39449
|
});
|
|
39383
|
-
function
|
|
39450
|
+
function gJ({ types: e, node: t }) {
|
|
39384
39451
|
return t && Array.isArray(e) && e.includes(t.type) || t?.type === e;
|
|
39385
39452
|
}
|
|
39386
39453
|
Wb.create({
|
|
@@ -39402,7 +39469,7 @@ Wb.create({
|
|
|
39402
39469
|
state: {
|
|
39403
39470
|
init: (e, t) => {
|
|
39404
39471
|
let r = t.tr.doc.lastChild;
|
|
39405
|
-
return !
|
|
39472
|
+
return !gJ({
|
|
39406
39473
|
node: r,
|
|
39407
39474
|
types: n
|
|
39408
39475
|
});
|
|
@@ -39410,7 +39477,7 @@ Wb.create({
|
|
|
39410
39477
|
apply: (e, t) => {
|
|
39411
39478
|
if (!e.docChanged || e.getMeta("__uniqueIDTransaction")) return t;
|
|
39412
39479
|
let r = e.doc.lastChild;
|
|
39413
|
-
return !
|
|
39480
|
+
return !gJ({
|
|
39414
39481
|
node: r,
|
|
39415
39482
|
types: n
|
|
39416
39483
|
});
|
|
@@ -39445,7 +39512,7 @@ Wb.create({
|
|
|
39445
39512
|
};
|
|
39446
39513
|
}
|
|
39447
39514
|
});
|
|
39448
|
-
var
|
|
39515
|
+
var _J = Ib.create({
|
|
39449
39516
|
name: "superscript",
|
|
39450
39517
|
addOptions() {
|
|
39451
39518
|
return { HTMLAttributes: {} };
|
|
@@ -39475,7 +39542,7 @@ var lJ = Ib.create({
|
|
|
39475
39542
|
addKeyboardShortcuts() {
|
|
39476
39543
|
return { "Mod-.": () => this.editor.commands.toggleSuperscript() };
|
|
39477
39544
|
}
|
|
39478
|
-
}),
|
|
39545
|
+
}), vJ = Ib.create({
|
|
39479
39546
|
name: "subscript",
|
|
39480
39547
|
addOptions() {
|
|
39481
39548
|
return { HTMLAttributes: {} };
|
|
@@ -39505,7 +39572,7 @@ var lJ = Ib.create({
|
|
|
39505
39572
|
addKeyboardShortcuts() {
|
|
39506
39573
|
return { "Mod-,": () => this.editor.commands.toggleSubscript() };
|
|
39507
39574
|
}
|
|
39508
|
-
}),
|
|
39575
|
+
}), yJ = Wb.create({
|
|
39509
39576
|
name: "textAlign",
|
|
39510
39577
|
addOptions() {
|
|
39511
39578
|
return {
|
|
@@ -39547,7 +39614,7 @@ var lJ = Ib.create({
|
|
|
39547
39614
|
"Mod-Shift-j": () => this.editor.commands.setTextAlign("justify")
|
|
39548
39615
|
};
|
|
39549
39616
|
}
|
|
39550
|
-
}),
|
|
39617
|
+
}), bJ = /(?:^|\s)(!\[(.+|:?)]\((\S+)(?:(?:\s+)["'](\S+)["'])?\))$/, xJ = bx.create({
|
|
39551
39618
|
name: "image",
|
|
39552
39619
|
addOptions() {
|
|
39553
39620
|
return {
|
|
@@ -39590,34 +39657,55 @@ var lJ = Ib.create({
|
|
|
39590
39657
|
},
|
|
39591
39658
|
addNodeView() {
|
|
39592
39659
|
if (!this.options.resize || !this.options.resize.enabled || typeof document > "u") return null;
|
|
39593
|
-
let { directions: e, minWidth: t, minHeight: n, alwaysPreserveAspectRatio: r } = this.options.resize
|
|
39594
|
-
|
|
39595
|
-
|
|
39596
|
-
|
|
39660
|
+
let { directions: e, minWidth: t, minHeight: n, alwaysPreserveAspectRatio: r } = this.options.resize, i = /* @__PURE__ */ new Set([
|
|
39661
|
+
"src",
|
|
39662
|
+
"width",
|
|
39663
|
+
"height"
|
|
39664
|
+
]);
|
|
39665
|
+
return ({ node: a, getPos: o, HTMLAttributes: s, editor: c }) => {
|
|
39666
|
+
let l = document.createElement("img");
|
|
39667
|
+
l.draggable = !1;
|
|
39668
|
+
let u = wy(this.options.HTMLAttributes, s);
|
|
39669
|
+
Object.entries(u).forEach(([e, t]) => {
|
|
39597
39670
|
if (t != null) switch (e) {
|
|
39671
|
+
case "src":
|
|
39598
39672
|
case "width":
|
|
39599
39673
|
case "height": break;
|
|
39600
|
-
default:
|
|
39601
|
-
c.setAttribute(e, t);
|
|
39602
|
-
break;
|
|
39674
|
+
default: l.setAttribute(e, t);
|
|
39603
39675
|
}
|
|
39604
|
-
}),
|
|
39605
|
-
let
|
|
39606
|
-
|
|
39607
|
-
|
|
39608
|
-
|
|
39609
|
-
|
|
39676
|
+
}), u.src !== null && (l.src = u.src);
|
|
39677
|
+
let d = { ...s }, f = (e) => {
|
|
39678
|
+
if (typeof e == "string" && e !== "") {
|
|
39679
|
+
l.getAttribute("src") !== e && (l.src = e);
|
|
39680
|
+
return;
|
|
39681
|
+
}
|
|
39682
|
+
l.hasAttribute("src") && l.removeAttribute("src"), l.src !== "" && (l.src = "");
|
|
39683
|
+
};
|
|
39684
|
+
f(s.src);
|
|
39685
|
+
let p = new lx({
|
|
39686
|
+
element: l,
|
|
39687
|
+
editor: c,
|
|
39688
|
+
node: a,
|
|
39689
|
+
getPos: o,
|
|
39610
39690
|
onResize: (e, t) => {
|
|
39611
|
-
|
|
39691
|
+
l.style.width = `${e}px`, l.style.height = `${t}px`;
|
|
39612
39692
|
},
|
|
39613
39693
|
onCommit: (e, t) => {
|
|
39614
|
-
let n =
|
|
39694
|
+
let n = o();
|
|
39615
39695
|
n !== void 0 && this.editor.chain().setNodeSelection(n).updateAttributes(this.name, {
|
|
39616
39696
|
width: e,
|
|
39617
39697
|
height: t
|
|
39618
39698
|
}).run();
|
|
39619
39699
|
},
|
|
39620
|
-
onUpdate: (e
|
|
39700
|
+
onUpdate: (e) => {
|
|
39701
|
+
if (e.type !== a.type) return !1;
|
|
39702
|
+
let t = Ty(e, c.extensionManager.attributes.filter((t) => t.type === e.type.name));
|
|
39703
|
+
return Object.keys(d).forEach((e) => {
|
|
39704
|
+
!i.has(e) && !(e in t) && l.removeAttribute(e);
|
|
39705
|
+
}), Object.entries(t).forEach(([e, t]) => {
|
|
39706
|
+
i.has(e) || (t == null ? l.removeAttribute(e) : l.setAttribute(e, t));
|
|
39707
|
+
}), f(t.src), d = t, !0;
|
|
39708
|
+
},
|
|
39621
39709
|
options: {
|
|
39622
39710
|
directions: e,
|
|
39623
39711
|
min: {
|
|
@@ -39626,10 +39714,10 @@ var lJ = Ib.create({
|
|
|
39626
39714
|
},
|
|
39627
39715
|
preserveAspectRatio: r === !0
|
|
39628
39716
|
}
|
|
39629
|
-
}),
|
|
39630
|
-
|
|
39631
|
-
|
|
39632
|
-
|
|
39717
|
+
}), m = p.dom, h = () => {
|
|
39718
|
+
m.style.visibility = "", m.style.pointerEvents = "";
|
|
39719
|
+
};
|
|
39720
|
+
return m.style.visibility = "hidden", m.style.pointerEvents = "none", l.complete && l.naturalWidth > 0 ? h() : (l.onload = h, l.onerror = h), p;
|
|
39633
39721
|
};
|
|
39634
39722
|
},
|
|
39635
39723
|
addCommands() {
|
|
@@ -39640,7 +39728,7 @@ var lJ = Ib.create({
|
|
|
39640
39728
|
},
|
|
39641
39729
|
addInputRules() {
|
|
39642
39730
|
return [ox({
|
|
39643
|
-
find:
|
|
39731
|
+
find: bJ,
|
|
39644
39732
|
type: this.type,
|
|
39645
39733
|
getAttributes: (e) => {
|
|
39646
39734
|
let [, , t, n, r] = e;
|
|
@@ -39652,17 +39740,17 @@ var lJ = Ib.create({
|
|
|
39652
39740
|
}
|
|
39653
39741
|
})];
|
|
39654
39742
|
}
|
|
39655
|
-
}),
|
|
39743
|
+
}), SJ = dJ, CJ = {
|
|
39656
39744
|
position: "bottom",
|
|
39657
39745
|
alignment: "left",
|
|
39658
39746
|
alwaysVisible: !1,
|
|
39659
39747
|
showDone: !0,
|
|
39660
39748
|
doneOn: "blur"
|
|
39661
|
-
},
|
|
39749
|
+
}, wJ = {
|
|
39662
39750
|
options: {},
|
|
39663
39751
|
respAreaToolbar: () => {},
|
|
39664
39752
|
onHandleAreaChange: () => {}
|
|
39665
|
-
},
|
|
39753
|
+
}, TJ = [
|
|
39666
39754
|
"bold",
|
|
39667
39755
|
"italic",
|
|
39668
39756
|
"underline",
|
|
@@ -39684,7 +39772,7 @@ var lJ = Ib.create({
|
|
|
39684
39772
|
"h3",
|
|
39685
39773
|
"undo",
|
|
39686
39774
|
"redo"
|
|
39687
|
-
],
|
|
39775
|
+
], EJ = {
|
|
39688
39776
|
"--white": "#fff",
|
|
39689
39777
|
"--black": "#2e2b29",
|
|
39690
39778
|
"--black-contrast": "#110f0e",
|
|
@@ -39703,14 +39791,18 @@ var lJ = Ib.create({
|
|
|
39703
39791
|
"--red": "#ff5c33",
|
|
39704
39792
|
"--red-light": "#ffebe5",
|
|
39705
39793
|
"--shadow": "0px 12px 33px 0px rgba(0, 0, 0, .06),\n 0px 3.618px 9.949px 0px rgba(0, 0, 0, .04)"
|
|
39706
|
-
},
|
|
39794
|
+
}, DJ = (e) => ({
|
|
39795
|
+
spellcheck: e ? "true" : "false",
|
|
39796
|
+
autocorrect: e ? "on" : "off",
|
|
39797
|
+
autocapitalize: e ? "on" : "off"
|
|
39798
|
+
}), OJ = (e) => {
|
|
39707
39799
|
let { showParagraphs: t, separateParagraphs: n } = e.pluginProps || {}, [r, i] = yt([]), [a, o] = yt(!1), { toolbarOpts: s } = e, c = ft((e) => {
|
|
39708
39800
|
i((t) => {
|
|
39709
39801
|
let n = t.filter((t) => t.pos !== e);
|
|
39710
39802
|
return n.length === 0 && o(!1), n;
|
|
39711
39803
|
});
|
|
39712
39804
|
}, [i]), l = {
|
|
39713
|
-
...
|
|
39805
|
+
...CJ,
|
|
39714
39806
|
...s
|
|
39715
39807
|
}, u = ft((t) => {
|
|
39716
39808
|
let n = t.getHTML();
|
|
@@ -39721,13 +39813,13 @@ var lJ = Ib.create({
|
|
|
39721
39813
|
e.onDone,
|
|
39722
39814
|
l.doneOn
|
|
39723
39815
|
]), d = _t(() => ({
|
|
39724
|
-
...
|
|
39816
|
+
...wJ,
|
|
39725
39817
|
...e.responseAreaProps,
|
|
39726
39818
|
onInlineDropdownToolbarClose: u
|
|
39727
39819
|
}), [e.responseAreaProps, u]), f = _t(() => {
|
|
39728
39820
|
let { customPlugins: t, ...n } = e.pluginProps || {};
|
|
39729
39821
|
t ||= [];
|
|
39730
|
-
let r = (e.activePlugins ||
|
|
39822
|
+
let r = (e.activePlugins || TJ)?.filter((e) => {
|
|
39731
39823
|
let t = Hs[e] || e, r = n[t] || {};
|
|
39732
39824
|
return !r || !r.disabled;
|
|
39733
39825
|
});
|
|
@@ -39745,103 +39837,112 @@ var lJ = Ib.create({
|
|
|
39745
39837
|
setKeypadInteraction: {},
|
|
39746
39838
|
media: {}
|
|
39747
39839
|
});
|
|
39748
|
-
}, [e, d.type]), p =
|
|
39749
|
-
|
|
39750
|
-
|
|
39751
|
-
|
|
39752
|
-
|
|
39753
|
-
|
|
39754
|
-
|
|
39755
|
-
|
|
39756
|
-
|
|
39757
|
-
|
|
39758
|
-
|
|
39759
|
-
|
|
39760
|
-
|
|
39761
|
-
|
|
39762
|
-
|
|
39763
|
-
|
|
39764
|
-
|
|
39765
|
-
|
|
39766
|
-
|
|
39767
|
-
|
|
39768
|
-
|
|
39769
|
-
|
|
39770
|
-
|
|
39771
|
-
|
|
39772
|
-
|
|
39773
|
-
|
|
39774
|
-
|
|
39840
|
+
}, [e, d.type]), p = [
|
|
39841
|
+
yJ.configure({
|
|
39842
|
+
types: [
|
|
39843
|
+
"heading",
|
|
39844
|
+
"paragraph",
|
|
39845
|
+
"div",
|
|
39846
|
+
"headingParagraph",
|
|
39847
|
+
"h1",
|
|
39848
|
+
"h2",
|
|
39849
|
+
"h3",
|
|
39850
|
+
"h4",
|
|
39851
|
+
"h5",
|
|
39852
|
+
"h6",
|
|
39853
|
+
"td",
|
|
39854
|
+
"th"
|
|
39855
|
+
],
|
|
39856
|
+
alignments: [
|
|
39857
|
+
"left",
|
|
39858
|
+
"right",
|
|
39859
|
+
"center",
|
|
39860
|
+
"justify"
|
|
39861
|
+
]
|
|
39862
|
+
}),
|
|
39863
|
+
Kq,
|
|
39864
|
+
qq.configure({ limit: e.charactersLimit || 1e6 }),
|
|
39865
|
+
Iq.configure({
|
|
39866
|
+
trailingNode: {
|
|
39775
39867
|
node: "paragraph",
|
|
39776
39868
|
notAfter: ["paragraph", "div"]
|
|
39777
|
-
}
|
|
39778
|
-
|
|
39779
|
-
|
|
39780
|
-
|
|
39781
|
-
|
|
39782
|
-
|
|
39783
|
-
|
|
39784
|
-
|
|
39785
|
-
|
|
39786
|
-
|
|
39787
|
-
|
|
39788
|
-
|
|
39789
|
-
|
|
39790
|
-
|
|
39791
|
-
|
|
39792
|
-
|
|
39793
|
-
|
|
39794
|
-
|
|
39795
|
-
|
|
39796
|
-
|
|
39797
|
-
|
|
39798
|
-
|
|
39799
|
-
|
|
39800
|
-
|
|
39801
|
-
|
|
39802
|
-
|
|
39803
|
-
|
|
39804
|
-
|
|
39805
|
-
|
|
39806
|
-
|
|
39807
|
-
|
|
39808
|
-
|
|
39809
|
-
|
|
39810
|
-
|
|
39811
|
-
|
|
39812
|
-
|
|
39813
|
-
|
|
39814
|
-
|
|
39815
|
-
|
|
39816
|
-
|
|
39817
|
-
|
|
39818
|
-
|
|
39819
|
-
|
|
39820
|
-
|
|
39821
|
-
|
|
39822
|
-
|
|
39823
|
-
|
|
39824
|
-
|
|
39825
|
-
|
|
39826
|
-
|
|
39827
|
-
|
|
39828
|
-
|
|
39829
|
-
|
|
39830
|
-
|
|
39831
|
-
|
|
39832
|
-
|
|
39833
|
-
|
|
39834
|
-
|
|
39835
|
-
|
|
39836
|
-
|
|
39837
|
-
|
|
39838
|
-
|
|
39839
|
-
|
|
39840
|
-
|
|
39869
|
+
},
|
|
39870
|
+
link: {
|
|
39871
|
+
autolink: !1,
|
|
39872
|
+
linkOnPaste: !1
|
|
39873
|
+
}
|
|
39874
|
+
}),
|
|
39875
|
+
BR,
|
|
39876
|
+
QD,
|
|
39877
|
+
VR,
|
|
39878
|
+
$D,
|
|
39879
|
+
eO,
|
|
39880
|
+
SJ.configure({
|
|
39881
|
+
placeholder: e.placeholder,
|
|
39882
|
+
showOnlyWhenEditable: !0,
|
|
39883
|
+
showOnlyCurrent: !1,
|
|
39884
|
+
includeChildren: !0
|
|
39885
|
+
}),
|
|
39886
|
+
JD,
|
|
39887
|
+
MD,
|
|
39888
|
+
ZD,
|
|
39889
|
+
XD,
|
|
39890
|
+
wI.configure(d),
|
|
39891
|
+
TI.configure(d),
|
|
39892
|
+
DI.configure(d),
|
|
39893
|
+
OI.configure(d),
|
|
39894
|
+
EI.configure(d),
|
|
39895
|
+
dL.configure({
|
|
39896
|
+
toolbarOpts: l,
|
|
39897
|
+
math: e.pluginProps?.math || {}
|
|
39898
|
+
}),
|
|
39899
|
+
vJ,
|
|
39900
|
+
_J,
|
|
39901
|
+
xJ,
|
|
39902
|
+
ML.configure({
|
|
39903
|
+
toolbarOpts: l,
|
|
39904
|
+
imageHandling: {
|
|
39905
|
+
disableImageAlignmentButtons: e.disableImageAlignmentButtons,
|
|
39906
|
+
onDone: (t) => e.onDone?.(t.getHTML()),
|
|
39907
|
+
onDelete: e.imageSupport && e.imageSupport.delete && ((t) => {
|
|
39908
|
+
let { src: n } = t.attrs;
|
|
39909
|
+
e.imageSupport.delete(n, (e) => {
|
|
39910
|
+
c(t.pos);
|
|
39911
|
+
});
|
|
39912
|
+
}),
|
|
39913
|
+
insertImageRequested: e.imageSupport && ((t, n, r) => {
|
|
39914
|
+
let [o, s] = n, l = (n) => {
|
|
39915
|
+
let r;
|
|
39916
|
+
a && n && (r = e.onChange), c(s), r?.(t.getHTML());
|
|
39917
|
+
};
|
|
39918
|
+
t._insertingImage = !0, i((e) => [...e, o]), (() => {
|
|
39919
|
+
let n = r(l), i = et(() => {
|
|
39920
|
+
let e = () => window.removeEventListener("focus", i);
|
|
39921
|
+
if (!t._insertingImage) {
|
|
39922
|
+
e();
|
|
39923
|
+
return;
|
|
39924
|
+
}
|
|
39925
|
+
c(s), t._insertingImage = !1, e();
|
|
39926
|
+
}, 500);
|
|
39927
|
+
window.addEventListener("focus", i), e.imageSupport.add(n);
|
|
39928
|
+
})();
|
|
39929
|
+
}),
|
|
39930
|
+
maxImageWidth: e.maxImageWidth,
|
|
39931
|
+
maxImageHeight: e.maxImageHeight
|
|
39932
|
+
},
|
|
39933
|
+
limit: 3
|
|
39934
|
+
}),
|
|
39935
|
+
$L.configure({ uploadSoundSupport: e.uploadSoundSupport }),
|
|
39936
|
+
aR.configure({ extraCSSRules: e.extraCSSRules })
|
|
39937
|
+
], m = e.spellCheck !== !1, h = Ek({
|
|
39938
|
+
extensions: p,
|
|
39841
39939
|
immediatelyRender: !1,
|
|
39842
|
-
editorProps: {
|
|
39843
|
-
|
|
39844
|
-
|
|
39940
|
+
editorProps: {
|
|
39941
|
+
attributes: DJ(m),
|
|
39942
|
+
handleKeyDown(t, n) {
|
|
39943
|
+
return e.onKeyDown ? e.onKeyDown(n) : !1;
|
|
39944
|
+
}
|
|
39945
|
+
},
|
|
39845
39946
|
editable: !e.disabled,
|
|
39846
39947
|
content: qs(e.markup),
|
|
39847
39948
|
onUpdate: ({ editor: t, transaction: n }) => {
|
|
@@ -39852,22 +39953,29 @@ var lJ = Ib.create({
|
|
|
39852
39953
|
}
|
|
39853
39954
|
}, [e.charactersLimit]);
|
|
39854
39955
|
ht(() => {
|
|
39855
|
-
e.editorRef && e.editorRef(
|
|
39856
|
-
}, [e.editorRef,
|
|
39857
|
-
|
|
39858
|
-
}, [e.disabled,
|
|
39859
|
-
if (!
|
|
39956
|
+
e.editorRef && e.editorRef(h);
|
|
39957
|
+
}, [e.editorRef, h]), ht(() => {
|
|
39958
|
+
h?.setEditable(!e.disabled);
|
|
39959
|
+
}, [e.disabled, h]), ht(() => {
|
|
39960
|
+
if (!h) return;
|
|
39961
|
+
let e = h.options?.editorProps, t = DJ(m);
|
|
39962
|
+
e?.attributes?.spellcheck !== t.spellcheck && h.setOptions({ editorProps: {
|
|
39963
|
+
...e,
|
|
39964
|
+
attributes: t
|
|
39965
|
+
} });
|
|
39966
|
+
}, [m, h]), ht(() => {
|
|
39967
|
+
if (!h) return;
|
|
39860
39968
|
let t = qs(e.markup);
|
|
39861
|
-
t !==
|
|
39862
|
-
}, [e.markup,
|
|
39863
|
-
Object.entries(
|
|
39969
|
+
t !== h.getHTML() && h.commands.setContent(t, { emitUpdate: !1 });
|
|
39970
|
+
}, [e.markup, h]), ht(() => {
|
|
39971
|
+
Object.entries(EJ).forEach(([e, t]) => {
|
|
39864
39972
|
document.documentElement.style.setProperty(e, t);
|
|
39865
39973
|
});
|
|
39866
39974
|
}, []);
|
|
39867
|
-
let
|
|
39868
|
-
editor:
|
|
39975
|
+
let g = Sk({
|
|
39976
|
+
editor: h,
|
|
39869
39977
|
selector: (e) => ({ isFocused: e.editor?.isFocused })
|
|
39870
|
-
}),
|
|
39978
|
+
}), _ = _t(() => {
|
|
39871
39979
|
let { minWidth: t, width: n, maxWidth: r, minHeight: i, height: a, maxHeight: o } = e;
|
|
39872
39980
|
return {
|
|
39873
39981
|
width: HR(n),
|
|
@@ -39882,20 +39990,20 @@ var lJ = Ib.create({
|
|
|
39882
39990
|
...e,
|
|
39883
39991
|
activePlugins: f,
|
|
39884
39992
|
toolbarOpts: l,
|
|
39885
|
-
editorState:
|
|
39886
|
-
editor:
|
|
39887
|
-
children:
|
|
39993
|
+
editorState: g,
|
|
39994
|
+
editor: h,
|
|
39995
|
+
children: h && /* @__PURE__ */ j(kJ, {
|
|
39888
39996
|
style: {
|
|
39889
|
-
minHeight:
|
|
39890
|
-
height:
|
|
39891
|
-
maxHeight:
|
|
39997
|
+
minHeight: _.minHeight,
|
|
39998
|
+
height: _.height,
|
|
39999
|
+
maxHeight: _.maxHeight
|
|
39892
40000
|
},
|
|
39893
40001
|
showParagraph: t && !t.disabled,
|
|
39894
40002
|
separateParagraph: n && !n.disabled,
|
|
39895
|
-
editor:
|
|
40003
|
+
editor: h
|
|
39896
40004
|
})
|
|
39897
40005
|
});
|
|
39898
|
-
},
|
|
40006
|
+
}, kJ = S(yk, { shouldForwardProp: (e) => !["showParagraph", "separateParagraph"].includes(e) })(({ showParagraph: e, separateParagraph: t }) => ({
|
|
39899
40007
|
display: "flex",
|
|
39900
40008
|
outline: "none !important",
|
|
39901
40009
|
"& .ProseMirror": {
|
|
@@ -39923,7 +40031,7 @@ var lJ = Ib.create({
|
|
|
39923
40031
|
} },
|
|
39924
40032
|
...t && { "& > p:has(+ p)": { marginBottom: "1em" } }
|
|
39925
40033
|
}
|
|
39926
|
-
})),
|
|
40034
|
+
})), AJ = OJ, jJ = S(v)(() => ({})), MJ = class extends at.Component {
|
|
39927
40035
|
static propTypes = {
|
|
39928
40036
|
className: N.default.string,
|
|
39929
40037
|
contentClassName: N.default.string,
|
|
@@ -39944,7 +40052,7 @@ var lJ = Ib.create({
|
|
|
39944
40052
|
indicatorColor: "primary",
|
|
39945
40053
|
value: e,
|
|
39946
40054
|
onChange: this.handleChange,
|
|
39947
|
-
children: at.Children.map(t, (e, t) => e && e.props.title ? /* @__PURE__ */ j(
|
|
40055
|
+
children: at.Children.map(t, (e, t) => e && e.props.title ? /* @__PURE__ */ j(jJ, { label: e.props.title }, t) : null)
|
|
39948
40056
|
}), /* @__PURE__ */ j("div", {
|
|
39949
40057
|
className: r,
|
|
39950
40058
|
style: i,
|
|
@@ -39952,7 +40060,7 @@ var lJ = Ib.create({
|
|
|
39952
40060
|
})]
|
|
39953
40061
|
});
|
|
39954
40062
|
}
|
|
39955
|
-
},
|
|
40063
|
+
}, NJ = S(Ca)(({ theme: e, mini: t }) => ({
|
|
39956
40064
|
margin: 0,
|
|
39957
40065
|
marginLeft: 0,
|
|
39958
40066
|
padding: 0,
|
|
@@ -39966,7 +40074,7 @@ var lJ = Ib.create({
|
|
|
39966
40074
|
fontSize: e.typography.fontSize - 3
|
|
39967
40075
|
}
|
|
39968
40076
|
}
|
|
39969
|
-
})),
|
|
40077
|
+
})), PJ = S(Bi)(({ theme: e, mini: t, error: n }) => ({
|
|
39970
40078
|
color: `${i.tertiary()} !important`,
|
|
39971
40079
|
...t && {
|
|
39972
40080
|
margin: 0,
|
|
@@ -39975,9 +40083,9 @@ var lJ = Ib.create({
|
|
|
39975
40083
|
height: e.spacing(3)
|
|
39976
40084
|
},
|
|
39977
40085
|
...n && { color: `${e.palette.error.main} !important` }
|
|
39978
|
-
})),
|
|
40086
|
+
})), FJ = ({ mini: e, checked: t, onChange: n, value: r, label: i, error: a }) => /* @__PURE__ */ j(NJ, {
|
|
39979
40087
|
mini: e,
|
|
39980
|
-
control: /* @__PURE__ */ j(
|
|
40088
|
+
control: /* @__PURE__ */ j(PJ, {
|
|
39981
40089
|
checked: t,
|
|
39982
40090
|
onChange: n,
|
|
39983
40091
|
value: r,
|
|
@@ -39986,21 +40094,21 @@ var lJ = Ib.create({
|
|
|
39986
40094
|
}),
|
|
39987
40095
|
label: i
|
|
39988
40096
|
});
|
|
39989
|
-
|
|
40097
|
+
FJ.propTypes = {
|
|
39990
40098
|
mini: N.default.bool,
|
|
39991
40099
|
checked: N.default.bool.isRequired,
|
|
39992
40100
|
onChange: N.default.func.isRequired,
|
|
39993
40101
|
value: N.default.string,
|
|
39994
40102
|
label: N.default.string.isRequired,
|
|
39995
40103
|
error: N.default.bool
|
|
39996
|
-
},
|
|
40104
|
+
}, FJ.defaultProps = {
|
|
39997
40105
|
value: "",
|
|
39998
40106
|
mini: !1,
|
|
39999
40107
|
error: !1
|
|
40000
40108
|
};
|
|
40001
40109
|
//#endregion
|
|
40002
40110
|
//#region ../../lib-react/config-ui/dist/number-text-field.js
|
|
40003
|
-
var
|
|
40111
|
+
var IJ = (0, Is.default)("@pie-lib:config-ui:number-text-field"), LJ = S(Fs)(({ theme: e }) => ({
|
|
40004
40112
|
marginRight: e.spacing(1),
|
|
40005
40113
|
"& .MuiInputLabel-root": {
|
|
40006
40114
|
width: "auto",
|
|
@@ -40022,11 +40130,11 @@ var DJ = (0, Is.default)("@pie-lib:config-ui:number-text-field"), OJ = S(Fs)(({
|
|
|
40022
40130
|
minHeight: "auto",
|
|
40023
40131
|
padding: "6px 0 7px"
|
|
40024
40132
|
}
|
|
40025
|
-
})),
|
|
40133
|
+
})), RJ = (e, t) => {
|
|
40026
40134
|
if (!tt(e) && !tt(t)) return 0;
|
|
40027
40135
|
if (!tt(e) && tt(t)) return t;
|
|
40028
40136
|
if (tt(e)) return e;
|
|
40029
|
-
},
|
|
40137
|
+
}, zJ = class extends at.Component {
|
|
40030
40138
|
static propTypes = {
|
|
40031
40139
|
disabled: N.default.bool,
|
|
40032
40140
|
className: N.default.string,
|
|
@@ -40052,13 +40160,13 @@ var DJ = (0, Is.default)("@pie-lib:config-ui:number-text-field"), OJ = S(Fs)(({
|
|
|
40052
40160
|
this.setState({ value: t });
|
|
40053
40161
|
}
|
|
40054
40162
|
clamp(e, t = this.props.min, n = this.props.max) {
|
|
40055
|
-
return tt(e) ? (tt(n) && (e = Math.min(e, n)), tt(t) && (e = Math.max(e, t)), e) :
|
|
40163
|
+
return tt(e) ? (tt(n) && (e = Math.min(e, n)), tt(t) && (e = Math.max(e, t)), e) : RJ(t, n);
|
|
40056
40164
|
}
|
|
40057
40165
|
onBlur = (e) => {
|
|
40058
40166
|
let t = e.target.value, n = parseFloat(t);
|
|
40059
|
-
|
|
40167
|
+
IJ("rawNumber: ", n);
|
|
40060
40168
|
let r = this.clamp(n);
|
|
40061
|
-
|
|
40169
|
+
IJ("number: ", r), r !== this.state.value && (IJ("trigger update..."), this.setState({ value: r.toString() }, () => {
|
|
40062
40170
|
this.props.onChange(e, r);
|
|
40063
40171
|
}));
|
|
40064
40172
|
};
|
|
@@ -40078,7 +40186,7 @@ var DJ = (0, Is.default)("@pie-lib:config-ui:number-text-field"), OJ = S(Fs)(({
|
|
|
40078
40186
|
};
|
|
40079
40187
|
render() {
|
|
40080
40188
|
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();
|
|
40081
|
-
return /* @__PURE__ */ j(
|
|
40189
|
+
return /* @__PURE__ */ j(LJ, {
|
|
40082
40190
|
variant: s ? "filled" : l || "standard",
|
|
40083
40191
|
inputRef: (e) => {
|
|
40084
40192
|
this.inputRef = e;
|
|
@@ -40113,19 +40221,19 @@ var DJ = (0, Is.default)("@pie-lib:config-ui:number-text-field"), OJ = S(Fs)(({
|
|
|
40113
40221
|
};
|
|
40114
40222
|
//#endregion
|
|
40115
40223
|
//#region ../../lib-react/config-ui/dist/two-choice.js
|
|
40116
|
-
function
|
|
40224
|
+
function BJ(e) {
|
|
40117
40225
|
return typeof e == "function" || typeof e == "object" && !!e && typeof e.$$typeof == "symbol";
|
|
40118
40226
|
}
|
|
40119
|
-
function
|
|
40120
|
-
return !e ||
|
|
40227
|
+
function VJ(e, t) {
|
|
40228
|
+
return !e || BJ(e) ? e : BJ(e.default) ? e.default : t && BJ(e[t]) ? e[t] : t && BJ(e[t]?.default) ? e[t].default : e;
|
|
40121
40229
|
}
|
|
40122
|
-
var
|
|
40230
|
+
var HJ = VJ(le, "InputContainer") || VJ(GJ.InputContainer, "InputContainer"), UJ = Fe, WJ = UJ.default, GJ = WJ && typeof WJ == "object" ? WJ : UJ, KJ = S("div")(({ theme: e, direction: t }) => ({
|
|
40123
40231
|
display: "flex",
|
|
40124
40232
|
flexWrap: "wrap",
|
|
40125
40233
|
paddingLeft: 0,
|
|
40126
40234
|
marginTop: e.spacing(1),
|
|
40127
40235
|
...t === "vertical" && { flexDirection: "column" }
|
|
40128
|
-
})),
|
|
40236
|
+
})), qJ = class extends at.Component {
|
|
40129
40237
|
static propTypes = {
|
|
40130
40238
|
header: N.default.string.isRequired,
|
|
40131
40239
|
className: N.default.string,
|
|
@@ -40143,10 +40251,10 @@ var NJ = MJ(le, "InputContainer") || MJ(IJ.InputContainer, "InputContainer"), PJ
|
|
|
40143
40251
|
label: e,
|
|
40144
40252
|
value: e
|
|
40145
40253
|
} : e), s = n || zs;
|
|
40146
|
-
return /* @__PURE__ */ j(
|
|
40254
|
+
return /* @__PURE__ */ j(HJ, {
|
|
40147
40255
|
label: e,
|
|
40148
40256
|
className: t,
|
|
40149
|
-
children: /* @__PURE__ */ j(
|
|
40257
|
+
children: /* @__PURE__ */ j(KJ, {
|
|
40150
40258
|
direction: a,
|
|
40151
40259
|
children: o.map((e, t) => /* @__PURE__ */ j(s, {
|
|
40152
40260
|
value: e.value,
|
|
@@ -40157,7 +40265,7 @@ var NJ = MJ(le, "InputContainer") || MJ(IJ.InputContainer, "InputContainer"), PJ
|
|
|
40157
40265
|
})
|
|
40158
40266
|
});
|
|
40159
40267
|
}
|
|
40160
|
-
},
|
|
40268
|
+
}, JJ = N.default.shape({
|
|
40161
40269
|
label: N.default.string,
|
|
40162
40270
|
value: N.default.string
|
|
40163
40271
|
});
|
|
@@ -40166,14 +40274,14 @@ var NJ = MJ(le, "InputContainer") || MJ(IJ.InputContainer, "InputContainer"), PJ
|
|
|
40166
40274
|
header: N.default.string.isRequired,
|
|
40167
40275
|
value: N.default.string.isRequired,
|
|
40168
40276
|
onChange: N.default.func.isRequired,
|
|
40169
|
-
one: N.default.oneOfType([
|
|
40170
|
-
two: N.default.oneOfType([
|
|
40277
|
+
one: N.default.oneOfType([JJ, N.default.string]),
|
|
40278
|
+
two: N.default.oneOfType([JJ, N.default.string]),
|
|
40171
40279
|
className: N.default.string,
|
|
40172
40280
|
customLabel: N.default.func
|
|
40173
40281
|
};
|
|
40174
40282
|
render() {
|
|
40175
40283
|
let { one: e, two: t, header: n, className: r, customLabel: i, value: a, onChange: o } = this.props;
|
|
40176
|
-
return /* @__PURE__ */ j(
|
|
40284
|
+
return /* @__PURE__ */ j(qJ, {
|
|
40177
40285
|
customLabel: i,
|
|
40178
40286
|
header: n,
|
|
40179
40287
|
className: r,
|
|
@@ -40185,21 +40293,21 @@ var NJ = MJ(le, "InputContainer") || MJ(IJ.InputContainer, "InputContainer"), PJ
|
|
|
40185
40293
|
});
|
|
40186
40294
|
//#endregion
|
|
40187
40295
|
//#region ../../lib-react/config-ui/dist/_virtual/_rolldown/runtime.js
|
|
40188
|
-
var
|
|
40296
|
+
var YJ = Object.defineProperty, XJ = (e, t) => {
|
|
40189
40297
|
let n = {};
|
|
40190
|
-
for (var r in e)
|
|
40298
|
+
for (var r in e) YJ(n, r, {
|
|
40191
40299
|
get: e[r],
|
|
40192
40300
|
enumerable: !0
|
|
40193
40301
|
});
|
|
40194
|
-
return t ||
|
|
40195
|
-
},
|
|
40302
|
+
return t || YJ(n, Symbol.toStringTag, { value: "Module" }), n;
|
|
40303
|
+
}, ZJ = S("div")(() => ({
|
|
40196
40304
|
display: "flex",
|
|
40197
40305
|
flexDirection: "column",
|
|
40198
40306
|
position: "relative"
|
|
40199
|
-
})),
|
|
40307
|
+
})), QJ = S("div")(() => ({
|
|
40200
40308
|
display: "flex",
|
|
40201
40309
|
justifyContent: "space-between"
|
|
40202
|
-
})),
|
|
40310
|
+
})), $J = S("div")(({ theme: e }) => ({ padding: `${e.spacing(2)} 0` })), eY = S("div")(() => ({ flex: "1" })), tY = S("div")(({ theme: e }) => ({ marginLeft: e.spacing(2) })), nY = class extends at.Component {
|
|
40203
40311
|
static propTypes = {
|
|
40204
40312
|
mode: N.default.oneOf(["tabbed", "inline"]),
|
|
40205
40313
|
secondary: N.default.oneOfType([N.default.arrayOf(N.default.node), N.default.node]),
|
|
@@ -40217,7 +40325,7 @@ var BJ = Object.defineProperty, VJ = (e, t) => {
|
|
|
40217
40325
|
} catch (e) {
|
|
40218
40326
|
console.log(e.toString());
|
|
40219
40327
|
}
|
|
40220
|
-
return /* @__PURE__ */ M(
|
|
40328
|
+
return /* @__PURE__ */ M(ZJ, {
|
|
40221
40329
|
style: {
|
|
40222
40330
|
minHeight: i,
|
|
40223
40331
|
minWidth: a,
|
|
@@ -40225,28 +40333,28 @@ var BJ = Object.defineProperty, VJ = (e, t) => {
|
|
|
40225
40333
|
maxWidth: s
|
|
40226
40334
|
},
|
|
40227
40335
|
children: [
|
|
40228
|
-
e === "inline" && /* @__PURE__ */ M(
|
|
40336
|
+
e === "inline" && /* @__PURE__ */ M(QJ, { children: [/* @__PURE__ */ j(eY, {
|
|
40229
40337
|
className: "design-container",
|
|
40230
40338
|
children: n
|
|
40231
|
-
}), l && /* @__PURE__ */ j(
|
|
40339
|
+
}), l && /* @__PURE__ */ j(tY, {
|
|
40232
40340
|
className: "settings-container",
|
|
40233
40341
|
children: t
|
|
40234
40342
|
})] }),
|
|
40235
|
-
e === "tabbed" && l && /* @__PURE__ */ M(
|
|
40343
|
+
e === "tabbed" && l && /* @__PURE__ */ M(MJ, {
|
|
40236
40344
|
onChange: this.onTabsChange,
|
|
40237
40345
|
contentClassName: "content-container",
|
|
40238
40346
|
indicatorColor: "primary",
|
|
40239
|
-
children: [/* @__PURE__ */ j(
|
|
40347
|
+
children: [/* @__PURE__ */ j($J, {
|
|
40240
40348
|
title: "Design",
|
|
40241
40349
|
className: "design-container",
|
|
40242
40350
|
children: n
|
|
40243
|
-
}), /* @__PURE__ */ j(
|
|
40351
|
+
}), /* @__PURE__ */ j($J, {
|
|
40244
40352
|
title: "Settings",
|
|
40245
40353
|
className: "settings-container",
|
|
40246
40354
|
children: t
|
|
40247
40355
|
})]
|
|
40248
40356
|
}),
|
|
40249
|
-
e === "tabbed" && !l && /* @__PURE__ */ j(
|
|
40357
|
+
e === "tabbed" && !l && /* @__PURE__ */ j($J, {
|
|
40250
40358
|
className: "design-container",
|
|
40251
40359
|
children: n
|
|
40252
40360
|
})
|
|
@@ -40256,18 +40364,18 @@ var BJ = Object.defineProperty, VJ = (e, t) => {
|
|
|
40256
40364
|
};
|
|
40257
40365
|
//#endregion
|
|
40258
40366
|
//#region ../../lib-react/config-ui/dist/node_modules/.bun/@babel_runtime@7.29.7/node_modules/@babel/runtime/helpers/esm/extends.js
|
|
40259
|
-
function
|
|
40260
|
-
return
|
|
40367
|
+
function rY() {
|
|
40368
|
+
return rY = Object.assign ? Object.assign.bind() : function(e) {
|
|
40261
40369
|
for (var t = 1; t < arguments.length; t++) {
|
|
40262
40370
|
var n = arguments[t];
|
|
40263
40371
|
for (var r in n) ({}).hasOwnProperty.call(n, r) && (e[r] = n[r]);
|
|
40264
40372
|
}
|
|
40265
40373
|
return e;
|
|
40266
|
-
},
|
|
40374
|
+
}, rY.apply(null, arguments);
|
|
40267
40375
|
}
|
|
40268
40376
|
//#endregion
|
|
40269
40377
|
//#region ../../lib-react/config-ui/dist/node_modules/.bun/@babel_runtime@7.29.7/node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js
|
|
40270
|
-
function
|
|
40378
|
+
function iY(e, t) {
|
|
40271
40379
|
if (e == null) return {};
|
|
40272
40380
|
var n = {};
|
|
40273
40381
|
for (var r in e) if ({}.hasOwnProperty.call(e, r)) {
|
|
@@ -40278,19 +40386,19 @@ function YJ(e, t) {
|
|
|
40278
40386
|
}
|
|
40279
40387
|
//#endregion
|
|
40280
40388
|
//#region ../../lib-react/config-ui/dist/node_modules/.bun/@babel_runtime@7.29.7/node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js
|
|
40281
|
-
function
|
|
40282
|
-
return
|
|
40389
|
+
function aY(e, t) {
|
|
40390
|
+
return aY = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(e, t) {
|
|
40283
40391
|
return e.__proto__ = t, e;
|
|
40284
|
-
},
|
|
40392
|
+
}, aY(e, t);
|
|
40285
40393
|
}
|
|
40286
40394
|
//#endregion
|
|
40287
40395
|
//#region ../../lib-react/config-ui/dist/node_modules/.bun/@babel_runtime@7.29.7/node_modules/@babel/runtime/helpers/esm/inheritsLoose.js
|
|
40288
|
-
function
|
|
40289
|
-
e.prototype = Object.create(t.prototype), e.prototype.constructor = e,
|
|
40396
|
+
function oY(e, t) {
|
|
40397
|
+
e.prototype = Object.create(t.prototype), e.prototype.constructor = e, aY(e, t);
|
|
40290
40398
|
}
|
|
40291
40399
|
//#endregion
|
|
40292
40400
|
//#region ../../lib-react/config-ui/dist/node_modules/.bun/resize-observer-polyfill@1.5.1/node_modules/resize-observer-polyfill/dist/ResizeObserver.es.js
|
|
40293
|
-
var
|
|
40401
|
+
var sY = (function() {
|
|
40294
40402
|
if (typeof Map < "u") return Map;
|
|
40295
40403
|
function e(e, t) {
|
|
40296
40404
|
var n = -1;
|
|
@@ -40329,34 +40437,34 @@ var QJ = (function() {
|
|
|
40329
40437
|
}
|
|
40330
40438
|
}, t;
|
|
40331
40439
|
}();
|
|
40332
|
-
})(),
|
|
40440
|
+
})(), cY = typeof window < "u" && typeof document < "u" && window.document === document, lY = (function() {
|
|
40333
40441
|
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")();
|
|
40334
|
-
})(),
|
|
40335
|
-
return typeof requestAnimationFrame == "function" ? requestAnimationFrame.bind(
|
|
40442
|
+
})(), uY = (function() {
|
|
40443
|
+
return typeof requestAnimationFrame == "function" ? requestAnimationFrame.bind(lY) : function(e) {
|
|
40336
40444
|
return setTimeout(function() {
|
|
40337
40445
|
return e(Date.now());
|
|
40338
40446
|
}, 1e3 / 60);
|
|
40339
40447
|
};
|
|
40340
|
-
})(),
|
|
40341
|
-
function
|
|
40448
|
+
})(), dY = 2;
|
|
40449
|
+
function fY(e, t) {
|
|
40342
40450
|
var n = !1, r = !1, i = 0;
|
|
40343
40451
|
function a() {
|
|
40344
40452
|
n && (n = !1, e()), r && s();
|
|
40345
40453
|
}
|
|
40346
40454
|
function o() {
|
|
40347
|
-
|
|
40455
|
+
uY(a);
|
|
40348
40456
|
}
|
|
40349
40457
|
function s() {
|
|
40350
40458
|
var e = Date.now();
|
|
40351
40459
|
if (n) {
|
|
40352
|
-
if (e - i <
|
|
40460
|
+
if (e - i < dY) return;
|
|
40353
40461
|
r = !0;
|
|
40354
40462
|
} else n = !0, r = !1, setTimeout(o, t);
|
|
40355
40463
|
i = e;
|
|
40356
40464
|
}
|
|
40357
40465
|
return s;
|
|
40358
40466
|
}
|
|
40359
|
-
var
|
|
40467
|
+
var pY = 20, mY = [
|
|
40360
40468
|
"top",
|
|
40361
40469
|
"right",
|
|
40362
40470
|
"bottom",
|
|
@@ -40365,9 +40473,9 @@ var iY = 20, aY = [
|
|
|
40365
40473
|
"height",
|
|
40366
40474
|
"size",
|
|
40367
40475
|
"weight"
|
|
40368
|
-
],
|
|
40476
|
+
], hY = typeof MutationObserver < "u", gY = function() {
|
|
40369
40477
|
function e() {
|
|
40370
|
-
this.connected_ = !1, this.mutationEventsAdded_ = !1, this.mutationsObserver_ = null, this.observers_ = [], this.onTransitionEnd_ = this.onTransitionEnd_.bind(this), this.refresh =
|
|
40478
|
+
this.connected_ = !1, this.mutationEventsAdded_ = !1, this.mutationsObserver_ = null, this.observers_ = [], this.onTransitionEnd_ = this.onTransitionEnd_.bind(this), this.refresh = fY(this.refresh.bind(this), pY);
|
|
40371
40479
|
}
|
|
40372
40480
|
return e.prototype.addObserver = function(e) {
|
|
40373
40481
|
~this.observers_.indexOf(e) || this.observers_.push(e), this.connected_ || this.connect_();
|
|
@@ -40384,23 +40492,23 @@ var iY = 20, aY = [
|
|
|
40384
40492
|
return e.broadcastActive();
|
|
40385
40493
|
}), e.length > 0;
|
|
40386
40494
|
}, e.prototype.connect_ = function() {
|
|
40387
|
-
|
|
40495
|
+
!cY || this.connected_ || (document.addEventListener("transitionend", this.onTransitionEnd_), window.addEventListener("resize", this.refresh), hY ? (this.mutationsObserver_ = new MutationObserver(this.refresh), this.mutationsObserver_.observe(document, {
|
|
40388
40496
|
attributes: !0,
|
|
40389
40497
|
childList: !0,
|
|
40390
40498
|
characterData: !0,
|
|
40391
40499
|
subtree: !0
|
|
40392
40500
|
})) : (document.addEventListener("DOMSubtreeModified", this.refresh), this.mutationEventsAdded_ = !0), this.connected_ = !0);
|
|
40393
40501
|
}, e.prototype.disconnect_ = function() {
|
|
40394
|
-
|
|
40502
|
+
!cY || !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);
|
|
40395
40503
|
}, e.prototype.onTransitionEnd_ = function(e) {
|
|
40396
40504
|
var t = e.propertyName, n = t === void 0 ? "" : t;
|
|
40397
|
-
|
|
40505
|
+
mY.some(function(e) {
|
|
40398
40506
|
return !!~n.indexOf(e);
|
|
40399
40507
|
}) && this.refresh();
|
|
40400
40508
|
}, e.getInstance = function() {
|
|
40401
40509
|
return this.instance_ ||= new e(), this.instance_;
|
|
40402
40510
|
}, e.instance_ = null, e;
|
|
40403
|
-
}(),
|
|
40511
|
+
}(), _Y = (function(e, t) {
|
|
40404
40512
|
for (var n = 0, r = Object.keys(t); n < r.length; n++) {
|
|
40405
40513
|
var i = r[n];
|
|
40406
40514
|
Object.defineProperty(e, i, {
|
|
@@ -40411,19 +40519,19 @@ var iY = 20, aY = [
|
|
|
40411
40519
|
});
|
|
40412
40520
|
}
|
|
40413
40521
|
return e;
|
|
40414
|
-
}),
|
|
40415
|
-
return e && e.ownerDocument && e.ownerDocument.defaultView ||
|
|
40416
|
-
}),
|
|
40417
|
-
function
|
|
40522
|
+
}), vY = (function(e) {
|
|
40523
|
+
return e && e.ownerDocument && e.ownerDocument.defaultView || lY;
|
|
40524
|
+
}), yY = kY(0, 0, 0, 0);
|
|
40525
|
+
function bY(e) {
|
|
40418
40526
|
return parseFloat(e) || 0;
|
|
40419
40527
|
}
|
|
40420
|
-
function
|
|
40528
|
+
function xY(e) {
|
|
40421
40529
|
return [...arguments].slice(1).reduce(function(t, n) {
|
|
40422
40530
|
var r = e["border-" + n + "-width"];
|
|
40423
|
-
return t +
|
|
40531
|
+
return t + bY(r);
|
|
40424
40532
|
}, 0);
|
|
40425
40533
|
}
|
|
40426
|
-
function
|
|
40534
|
+
function SY(e) {
|
|
40427
40535
|
for (var t = [
|
|
40428
40536
|
"top",
|
|
40429
40537
|
"right",
|
|
@@ -40431,40 +40539,40 @@ function pY(e) {
|
|
|
40431
40539
|
"left"
|
|
40432
40540
|
], n = {}, r = 0, i = t; r < i.length; r++) {
|
|
40433
40541
|
var a = i[r], o = e["padding-" + a];
|
|
40434
|
-
n[a] =
|
|
40542
|
+
n[a] = bY(o);
|
|
40435
40543
|
}
|
|
40436
40544
|
return n;
|
|
40437
40545
|
}
|
|
40438
|
-
function
|
|
40546
|
+
function CY(e) {
|
|
40439
40547
|
var t = e.getBBox();
|
|
40440
|
-
return
|
|
40548
|
+
return kY(0, 0, t.width, t.height);
|
|
40441
40549
|
}
|
|
40442
|
-
function
|
|
40550
|
+
function wY(e) {
|
|
40443
40551
|
var t = e.clientWidth, n = e.clientHeight;
|
|
40444
|
-
if (!t && !n) return
|
|
40445
|
-
var r =
|
|
40446
|
-
if (r.boxSizing === "border-box" && (Math.round(s + a) !== t && (s -=
|
|
40552
|
+
if (!t && !n) return yY;
|
|
40553
|
+
var r = vY(e).getComputedStyle(e), i = SY(r), a = i.left + i.right, o = i.top + i.bottom, s = bY(r.width), c = bY(r.height);
|
|
40554
|
+
if (r.boxSizing === "border-box" && (Math.round(s + a) !== t && (s -= xY(r, "left", "right") + a), Math.round(c + o) !== n && (c -= xY(r, "top", "bottom") + o)), !EY(e)) {
|
|
40447
40555
|
var l = Math.round(s + a) - t, u = Math.round(c + o) - n;
|
|
40448
40556
|
Math.abs(l) !== 1 && (s -= l), Math.abs(u) !== 1 && (c -= u);
|
|
40449
40557
|
}
|
|
40450
|
-
return
|
|
40558
|
+
return kY(i.left, i.top, s, c);
|
|
40451
40559
|
}
|
|
40452
|
-
var
|
|
40560
|
+
var TY = (function() {
|
|
40453
40561
|
return typeof SVGGraphicsElement < "u" ? function(e) {
|
|
40454
|
-
return e instanceof
|
|
40562
|
+
return e instanceof vY(e).SVGGraphicsElement;
|
|
40455
40563
|
} : function(e) {
|
|
40456
|
-
return e instanceof
|
|
40564
|
+
return e instanceof vY(e).SVGElement && typeof e.getBBox == "function";
|
|
40457
40565
|
};
|
|
40458
40566
|
})();
|
|
40459
|
-
function
|
|
40460
|
-
return e ===
|
|
40567
|
+
function EY(e) {
|
|
40568
|
+
return e === vY(e).document.documentElement;
|
|
40461
40569
|
}
|
|
40462
|
-
function
|
|
40463
|
-
return
|
|
40570
|
+
function DY(e) {
|
|
40571
|
+
return cY ? TY(e) ? CY(e) : wY(e) : yY;
|
|
40464
40572
|
}
|
|
40465
|
-
function
|
|
40573
|
+
function OY(e) {
|
|
40466
40574
|
var t = e.x, n = e.y, r = e.width, i = e.height, a = Object.create((typeof DOMRectReadOnly < "u" ? DOMRectReadOnly : Object).prototype);
|
|
40467
|
-
return
|
|
40575
|
+
return _Y(a, {
|
|
40468
40576
|
x: t,
|
|
40469
40577
|
y: n,
|
|
40470
40578
|
width: r,
|
|
@@ -40475,7 +40583,7 @@ function yY(e) {
|
|
|
40475
40583
|
left: t
|
|
40476
40584
|
}), a;
|
|
40477
40585
|
}
|
|
40478
|
-
function
|
|
40586
|
+
function kY(e, t, n, r) {
|
|
40479
40587
|
return {
|
|
40480
40588
|
x: e,
|
|
40481
40589
|
y: t,
|
|
@@ -40483,42 +40591,42 @@ function bY(e, t, n, r) {
|
|
|
40483
40591
|
height: r
|
|
40484
40592
|
};
|
|
40485
40593
|
}
|
|
40486
|
-
var
|
|
40594
|
+
var AY = function() {
|
|
40487
40595
|
function e(e) {
|
|
40488
|
-
this.broadcastWidth = 0, this.broadcastHeight = 0, this.contentRect_ =
|
|
40596
|
+
this.broadcastWidth = 0, this.broadcastHeight = 0, this.contentRect_ = kY(0, 0, 0, 0), this.target = e;
|
|
40489
40597
|
}
|
|
40490
40598
|
return e.prototype.isActive = function() {
|
|
40491
|
-
var e =
|
|
40599
|
+
var e = DY(this.target);
|
|
40492
40600
|
return this.contentRect_ = e, e.width !== this.broadcastWidth || e.height !== this.broadcastHeight;
|
|
40493
40601
|
}, e.prototype.broadcastRect = function() {
|
|
40494
40602
|
var e = this.contentRect_;
|
|
40495
40603
|
return this.broadcastWidth = e.width, this.broadcastHeight = e.height, e;
|
|
40496
40604
|
}, e;
|
|
40497
|
-
}(),
|
|
40605
|
+
}(), jY = function() {
|
|
40498
40606
|
function e(e, t) {
|
|
40499
|
-
var n =
|
|
40500
|
-
|
|
40607
|
+
var n = OY(t);
|
|
40608
|
+
_Y(this, {
|
|
40501
40609
|
target: e,
|
|
40502
40610
|
contentRect: n
|
|
40503
40611
|
});
|
|
40504
40612
|
}
|
|
40505
40613
|
return e;
|
|
40506
|
-
}(),
|
|
40614
|
+
}(), MY = function() {
|
|
40507
40615
|
function e(e, t, n) {
|
|
40508
|
-
if (this.activeObservations_ = [], this.observations_ = new
|
|
40616
|
+
if (this.activeObservations_ = [], this.observations_ = new sY(), typeof e != "function") throw TypeError("The callback provided as parameter 1 is not a function.");
|
|
40509
40617
|
this.callback_ = e, this.controller_ = t, this.callbackCtx_ = n;
|
|
40510
40618
|
}
|
|
40511
40619
|
return e.prototype.observe = function(e) {
|
|
40512
40620
|
if (!arguments.length) throw TypeError("1 argument required, but only 0 present.");
|
|
40513
40621
|
if (!(typeof Element > "u" || !(Element instanceof Object))) {
|
|
40514
|
-
if (!(e instanceof
|
|
40622
|
+
if (!(e instanceof vY(e).Element)) throw TypeError("parameter 1 is not of type \"Element\".");
|
|
40515
40623
|
var t = this.observations_;
|
|
40516
|
-
t.has(e) || (t.set(e, new
|
|
40624
|
+
t.has(e) || (t.set(e, new AY(e)), this.controller_.addObserver(this), this.controller_.refresh());
|
|
40517
40625
|
}
|
|
40518
40626
|
}, e.prototype.unobserve = function(e) {
|
|
40519
40627
|
if (!arguments.length) throw TypeError("1 argument required, but only 0 present.");
|
|
40520
40628
|
if (!(typeof Element > "u" || !(Element instanceof Object))) {
|
|
40521
|
-
if (!(e instanceof
|
|
40629
|
+
if (!(e instanceof vY(e).Element)) throw TypeError("parameter 1 is not of type \"Element\".");
|
|
40522
40630
|
var t = this.observations_;
|
|
40523
40631
|
t.has(e) && (t.delete(e), t.size || this.controller_.removeObserver(this));
|
|
40524
40632
|
}
|
|
@@ -40532,7 +40640,7 @@ var xY = function() {
|
|
|
40532
40640
|
}, e.prototype.broadcastActive = function() {
|
|
40533
40641
|
if (this.hasActive()) {
|
|
40534
40642
|
var e = this.callbackCtx_, t = this.activeObservations_.map(function(e) {
|
|
40535
|
-
return new
|
|
40643
|
+
return new jY(e.target, e.broadcastRect());
|
|
40536
40644
|
});
|
|
40537
40645
|
this.callback_.call(e, t, e), this.clearActive();
|
|
40538
40646
|
}
|
|
@@ -40541,12 +40649,12 @@ var xY = function() {
|
|
|
40541
40649
|
}, e.prototype.hasActive = function() {
|
|
40542
40650
|
return this.activeObservations_.length > 0;
|
|
40543
40651
|
}, e;
|
|
40544
|
-
}(),
|
|
40652
|
+
}(), NY = typeof WeakMap < "u" ? /* @__PURE__ */ new WeakMap() : new sY(), PY = function() {
|
|
40545
40653
|
function e(t) {
|
|
40546
40654
|
if (!(this instanceof e)) throw TypeError("Cannot call a class as a function.");
|
|
40547
40655
|
if (!arguments.length) throw TypeError("1 argument required, but only 0 present.");
|
|
40548
|
-
var n = new
|
|
40549
|
-
|
|
40656
|
+
var n = new MY(t, gY.getInstance(), this);
|
|
40657
|
+
NY.set(this, n);
|
|
40550
40658
|
}
|
|
40551
40659
|
return e;
|
|
40552
40660
|
}();
|
|
@@ -40555,27 +40663,27 @@ var xY = function() {
|
|
|
40555
40663
|
"unobserve",
|
|
40556
40664
|
"disconnect"
|
|
40557
40665
|
].forEach(function(e) {
|
|
40558
|
-
|
|
40666
|
+
PY.prototype[e] = function() {
|
|
40559
40667
|
var t;
|
|
40560
|
-
return (t =
|
|
40668
|
+
return (t = NY.get(this))[e].apply(t, arguments);
|
|
40561
40669
|
};
|
|
40562
40670
|
});
|
|
40563
|
-
var
|
|
40564
|
-
return
|
|
40565
|
-
})(),
|
|
40671
|
+
var FY = (function() {
|
|
40672
|
+
return lY.ResizeObserver === void 0 ? PY : lY.ResizeObserver;
|
|
40673
|
+
})(), IY = [
|
|
40566
40674
|
"client",
|
|
40567
40675
|
"offset",
|
|
40568
40676
|
"scroll",
|
|
40569
40677
|
"bounds",
|
|
40570
40678
|
"margin"
|
|
40571
40679
|
];
|
|
40572
|
-
function
|
|
40680
|
+
function LY(e) {
|
|
40573
40681
|
var t = [];
|
|
40574
|
-
return
|
|
40682
|
+
return IY.forEach(function(n) {
|
|
40575
40683
|
e[n] && t.push(n);
|
|
40576
40684
|
}), t;
|
|
40577
40685
|
}
|
|
40578
|
-
function
|
|
40686
|
+
function RY(e, t) {
|
|
40579
40687
|
var n = {};
|
|
40580
40688
|
if (t.indexOf("client") > -1 && (n.client = {
|
|
40581
40689
|
top: e.clientTop,
|
|
@@ -40614,14 +40722,14 @@ function kY(e, t) {
|
|
|
40614
40722
|
}
|
|
40615
40723
|
return n;
|
|
40616
40724
|
}
|
|
40617
|
-
function
|
|
40725
|
+
function zY(e) {
|
|
40618
40726
|
return e && e.ownerDocument && e.ownerDocument.defaultView || window;
|
|
40619
40727
|
}
|
|
40620
|
-
function
|
|
40728
|
+
function BY(e) {
|
|
40621
40729
|
return function(t) {
|
|
40622
40730
|
var n, r;
|
|
40623
40731
|
return r = n = /*#__PURE__*/ function(n) {
|
|
40624
|
-
|
|
40732
|
+
oY(r, n);
|
|
40625
40733
|
function r() {
|
|
40626
40734
|
var t, r = [...arguments];
|
|
40627
40735
|
return t = n.call.apply(n, [this].concat(r)) || this, t.state = { contentRect: {
|
|
@@ -40632,24 +40740,24 @@ function jY(e) {
|
|
|
40632
40740
|
bounds: {},
|
|
40633
40741
|
margin: {}
|
|
40634
40742
|
} }, t._animationFrameID = null, t._resizeObserver = null, t._node = null, t._window = null, t.measure = function(n) {
|
|
40635
|
-
var r =
|
|
40743
|
+
var r = RY(t._node, e || LY(t.props));
|
|
40636
40744
|
n && (r.entry = n[0].contentRect), t._animationFrameID = t._window.requestAnimationFrame(function() {
|
|
40637
40745
|
t._resizeObserver !== null && (t.setState({ contentRect: r }), typeof t.props.onResize == "function" && t.props.onResize(r));
|
|
40638
40746
|
});
|
|
40639
40747
|
}, t._handleRef = function(e) {
|
|
40640
|
-
t._resizeObserver !== null && t._node !== null && t._resizeObserver.unobserve(t._node), t._node = e, t._window =
|
|
40748
|
+
t._resizeObserver !== null && t._node !== null && t._resizeObserver.unobserve(t._node), t._node = e, t._window = zY(t._node);
|
|
40641
40749
|
var n = t.props.innerRef;
|
|
40642
40750
|
n && (typeof n == "function" ? n(t._node) : n.current = t._node), t._resizeObserver !== null && t._node !== null && t._resizeObserver.observe(t._node);
|
|
40643
40751
|
}, t;
|
|
40644
40752
|
}
|
|
40645
40753
|
var i = r.prototype;
|
|
40646
40754
|
return i.componentDidMount = function() {
|
|
40647
|
-
this._resizeObserver = this._window !== null && this._window.ResizeObserver ? new this._window.ResizeObserver(this.measure) : new
|
|
40755
|
+
this._resizeObserver = this._window !== null && this._window.ResizeObserver ? new this._window.ResizeObserver(this.measure) : new FY(this.measure), this._node !== null && (this._resizeObserver.observe(this._node), typeof this.props.onResize == "function" && this.props.onResize(RY(this._node, e || LY(this.props))));
|
|
40648
40756
|
}, i.componentWillUnmount = function() {
|
|
40649
40757
|
this._window !== null && this._window.cancelAnimationFrame(this._animationFrameID), this._resizeObserver !== null && (this._resizeObserver.disconnect(), this._resizeObserver = null);
|
|
40650
40758
|
}, i.render = function() {
|
|
40651
40759
|
var e = this.props;
|
|
40652
|
-
return e.innerRef, e.onResize, ct(t,
|
|
40760
|
+
return e.innerRef, e.onResize, ct(t, rY({}, iY(e, ["innerRef", "onResize"]), {
|
|
40653
40761
|
measureRef: this._handleRef,
|
|
40654
40762
|
measure: this.measure,
|
|
40655
40763
|
contentRect: this.state.contentRect
|
|
@@ -40666,7 +40774,7 @@ function jY(e) {
|
|
|
40666
40774
|
}, r;
|
|
40667
40775
|
};
|
|
40668
40776
|
}
|
|
40669
|
-
var
|
|
40777
|
+
var VY = BY()(function(e) {
|
|
40670
40778
|
var t = e.measure, n = e.measureRef, r = e.contentRect, i = e.children;
|
|
40671
40779
|
return i({
|
|
40672
40780
|
measure: t,
|
|
@@ -40674,10 +40782,10 @@ var MY = jY()(function(e) {
|
|
|
40674
40782
|
contentRect: r
|
|
40675
40783
|
});
|
|
40676
40784
|
});
|
|
40677
|
-
|
|
40785
|
+
VY.displayName = "Measure", VY.propTypes.children = N.default.func;
|
|
40678
40786
|
//#endregion
|
|
40679
40787
|
//#region ../../lib-react/config-ui/dist/layout/settings-box.js
|
|
40680
|
-
var
|
|
40788
|
+
var HY = S("div")(() => ({
|
|
40681
40789
|
backgroundColor: i.white(),
|
|
40682
40790
|
border: `2px solid ${i.border()}`,
|
|
40683
40791
|
display: "flex",
|
|
@@ -40687,7 +40795,7 @@ var NY = S("div")(() => ({
|
|
|
40687
40795
|
maxWidth: "300px",
|
|
40688
40796
|
padding: "20px 4px 4px 20px",
|
|
40689
40797
|
zIndex: 99
|
|
40690
|
-
})),
|
|
40798
|
+
})), UY = class extends at.Component {
|
|
40691
40799
|
static propTypes = {
|
|
40692
40800
|
className: N.default.string,
|
|
40693
40801
|
children: N.default.oneOfType([N.default.arrayOf(N.default.node), N.default.node]).isRequired
|
|
@@ -40695,19 +40803,19 @@ var NY = S("div")(() => ({
|
|
|
40695
40803
|
static defaultProps = {};
|
|
40696
40804
|
render() {
|
|
40697
40805
|
let { className: e, children: t } = this.props;
|
|
40698
|
-
return /* @__PURE__ */ j(
|
|
40806
|
+
return /* @__PURE__ */ j(HY, {
|
|
40699
40807
|
className: e,
|
|
40700
40808
|
children: t
|
|
40701
40809
|
});
|
|
40702
40810
|
}
|
|
40703
|
-
},
|
|
40811
|
+
}, WY = ye({
|
|
40704
40812
|
typography: { fontFamily: "inherit" },
|
|
40705
40813
|
components: { MuiButton: { styleOverrides: { contained: {
|
|
40706
40814
|
backgroundColor: "#e0e0e0",
|
|
40707
40815
|
color: "#000000",
|
|
40708
40816
|
"&:hover": { backgroundColor: "#bdbdbd" }
|
|
40709
40817
|
} } } }
|
|
40710
|
-
}),
|
|
40818
|
+
}), GY = class extends at.Component {
|
|
40711
40819
|
static propTypes = {
|
|
40712
40820
|
children: N.default.oneOfType([
|
|
40713
40821
|
N.default.string,
|
|
@@ -40740,19 +40848,19 @@ var NY = S("div")(() => ({
|
|
|
40740
40848
|
return /* @__PURE__ */ j(de, {
|
|
40741
40849
|
injectFirst: !0,
|
|
40742
40850
|
children: /* @__PURE__ */ j(be, {
|
|
40743
|
-
theme:
|
|
40744
|
-
children: /* @__PURE__ */ j(
|
|
40851
|
+
theme: WY,
|
|
40852
|
+
children: /* @__PURE__ */ j(VY, {
|
|
40745
40853
|
bounds: !0,
|
|
40746
40854
|
onResize: this.onResize,
|
|
40747
40855
|
children: ({ measureRef: e }) => {
|
|
40748
|
-
let { children: t, settings: n, hideSettings: r, dimensions: i, extraCSSRules: a } = this.props, { layoutMode: o } = this.state, s = r ? null : o === "inline" ? /* @__PURE__ */ j(
|
|
40856
|
+
let { children: t, settings: n, hideSettings: r, dimensions: i, extraCSSRules: a } = this.props, { layoutMode: o } = this.state, s = r ? null : o === "inline" ? /* @__PURE__ */ j(UY, {
|
|
40749
40857
|
className: "settings-box",
|
|
40750
40858
|
children: n
|
|
40751
40859
|
}) : n;
|
|
40752
40860
|
return /* @__PURE__ */ M("div", {
|
|
40753
40861
|
ref: e,
|
|
40754
40862
|
className: "main-container extraCSSRules",
|
|
40755
|
-
children: [a?.rules ? /* @__PURE__ */ j("style", { dangerouslySetInnerHTML: { __html: `.extraCSSRules { ${a.rules} }` } }) : null, /* @__PURE__ */ j(
|
|
40863
|
+
children: [a?.rules ? /* @__PURE__ */ j("style", { dangerouslySetInnerHTML: { __html: `.extraCSSRules { ${a.rules} }` } }) : null, /* @__PURE__ */ j(nY, {
|
|
40756
40864
|
mode: o,
|
|
40757
40865
|
secondary: s,
|
|
40758
40866
|
dimensions: i,
|
|
@@ -40764,27 +40872,27 @@ var NY = S("div")(() => ({
|
|
|
40764
40872
|
})
|
|
40765
40873
|
});
|
|
40766
40874
|
}
|
|
40767
|
-
},
|
|
40768
|
-
ConfigLayout: () =>
|
|
40769
|
-
LayoutContents: () =>
|
|
40770
|
-
}),
|
|
40875
|
+
}, KY = BY("bounds")(GY), qY = /* @__PURE__ */ XJ({
|
|
40876
|
+
ConfigLayout: () => KY,
|
|
40877
|
+
LayoutContents: () => nY
|
|
40878
|
+
}), JY = S("div")(() => ({
|
|
40771
40879
|
display: "flex",
|
|
40772
40880
|
width: "100%",
|
|
40773
40881
|
justifyContent: "space-between"
|
|
40774
|
-
})),
|
|
40882
|
+
})), YY = S(ue)(({ theme: e }) => ({
|
|
40775
40883
|
color: "rgba(0, 0, 0, 0.89)",
|
|
40776
40884
|
fontSize: e.typography.fontSize,
|
|
40777
40885
|
paddingTop: e.spacing(2)
|
|
40778
|
-
})),
|
|
40886
|
+
})), XY = S(As)(({ checked: e }) => ({
|
|
40779
40887
|
"&.Mui-checked .MuiSwitch-thumb": { color: `${i.tertiary()} !important` },
|
|
40780
40888
|
"&.Mui-checked .MuiSwitch-track": { backgroundColor: `${i.tertiaryLight()} !important` },
|
|
40781
40889
|
"& .MuiSwitch-track": { backgroundColor: e ? `${i.tertiaryLight()} !important` : void 0 }
|
|
40782
|
-
})),
|
|
40890
|
+
})), ZY = ({ checked: e, disabled: t, label: n, toggle: r }) => /* @__PURE__ */ M(JY, { children: [/* @__PURE__ */ j(YY, { children: n }), /* @__PURE__ */ j(XY, {
|
|
40783
40891
|
checked: e,
|
|
40784
40892
|
disabled: t,
|
|
40785
40893
|
onChange: (e) => r(e.target.checked)
|
|
40786
40894
|
})] });
|
|
40787
|
-
|
|
40895
|
+
ZY.propTypes = {
|
|
40788
40896
|
checked: N.default.bool,
|
|
40789
40897
|
disabled: N.default.bool,
|
|
40790
40898
|
label: N.default.string.isRequired,
|
|
@@ -40792,20 +40900,20 @@ HY.propTypes = {
|
|
|
40792
40900
|
};
|
|
40793
40901
|
//#endregion
|
|
40794
40902
|
//#region ../../lib-react/config-ui/dist/settings/settings-radio-label.js
|
|
40795
|
-
var
|
|
40903
|
+
var QY = S(Ca)(({ theme: e }) => ({ "& .MuiFormControlLabel-label": {
|
|
40796
40904
|
color: "rgba(0, 0, 0, 0.89)",
|
|
40797
40905
|
fontSize: e.typography.fontSize - 2,
|
|
40798
40906
|
left: "-5px",
|
|
40799
40907
|
position: "relative"
|
|
40800
|
-
} })),
|
|
40908
|
+
} })), $Y = S(Ss)(() => ({ color: `${i.tertiary()} !important` })), eX = ({ label: e, value: t, checked: n, onChange: r }) => /* @__PURE__ */ j(QY, {
|
|
40801
40909
|
value: t,
|
|
40802
|
-
control: /* @__PURE__ */ j(
|
|
40910
|
+
control: /* @__PURE__ */ j($Y, {
|
|
40803
40911
|
checked: n,
|
|
40804
40912
|
onChange: r
|
|
40805
40913
|
}),
|
|
40806
40914
|
label: e
|
|
40807
40915
|
});
|
|
40808
|
-
|
|
40916
|
+
eX.propTypes = {
|
|
40809
40917
|
label: N.default.string,
|
|
40810
40918
|
value: N.default.string,
|
|
40811
40919
|
checked: N.default.bool,
|
|
@@ -40813,26 +40921,26 @@ GY.propTypes = {
|
|
|
40813
40921
|
};
|
|
40814
40922
|
//#endregion
|
|
40815
40923
|
//#region ../../lib-react/config-ui/dist/settings/panel.js
|
|
40816
|
-
var
|
|
40924
|
+
var tX = (0, Is.default)("pie-lib:config-ui:settings:panel"), nX = {
|
|
40817
40925
|
label: N.default.string,
|
|
40818
40926
|
value: N.default.string
|
|
40819
|
-
},
|
|
40927
|
+
}, rX = {
|
|
40820
40928
|
label: N.default.string,
|
|
40821
40929
|
value: N.default.string,
|
|
40822
40930
|
onChange: N.default.func
|
|
40823
|
-
},
|
|
40931
|
+
}, iX = ({ label: e, value: t, onChange: n }) => /* @__PURE__ */ j(FJ, {
|
|
40824
40932
|
checked: t,
|
|
40825
40933
|
label: e,
|
|
40826
40934
|
onChange: (e) => {
|
|
40827
40935
|
n(e.target.checked);
|
|
40828
40936
|
}
|
|
40829
40937
|
});
|
|
40830
|
-
|
|
40938
|
+
iX.propTypes = {
|
|
40831
40939
|
label: N.default.string,
|
|
40832
40940
|
value: N.default.bool,
|
|
40833
40941
|
onChange: N.default.func
|
|
40834
40942
|
};
|
|
40835
|
-
var
|
|
40943
|
+
var aX = S(qJ)(({ theme: e }) => ({
|
|
40836
40944
|
marginTop: e.spacing(.5),
|
|
40837
40945
|
paddingBottom: e.spacing(.5),
|
|
40838
40946
|
width: "100%",
|
|
@@ -40843,29 +40951,29 @@ var XY = S(RJ)(({ theme: e }) => ({
|
|
|
40843
40951
|
marginTop: e.spacing(2.5)
|
|
40844
40952
|
},
|
|
40845
40953
|
"& > div": { marginTop: e.spacing(2.5) }
|
|
40846
|
-
})),
|
|
40954
|
+
})), oX = ({ label: e, value: t, onChange: n, choices: r }) => /* @__PURE__ */ j(aX, {
|
|
40847
40955
|
direction: "horizontal",
|
|
40848
|
-
customLabel:
|
|
40956
|
+
customLabel: eX,
|
|
40849
40957
|
value: t,
|
|
40850
40958
|
header: e,
|
|
40851
40959
|
opts: r,
|
|
40852
40960
|
onChange: n
|
|
40853
40961
|
});
|
|
40854
|
-
|
|
40855
|
-
...
|
|
40856
|
-
choices: N.default.arrayOf(N.default.shape(
|
|
40962
|
+
oX.propTypes = {
|
|
40963
|
+
...rX,
|
|
40964
|
+
choices: N.default.arrayOf(N.default.shape(nX))
|
|
40857
40965
|
};
|
|
40858
|
-
var
|
|
40966
|
+
var sX = oX, cX = S("p")(({ theme: e }) => ({
|
|
40859
40967
|
margin: 0,
|
|
40860
40968
|
fontSize: e.typography.fontSize
|
|
40861
|
-
})),
|
|
40969
|
+
})), lX = S(es)(({ theme: e }) => ({
|
|
40862
40970
|
marginTop: e.spacing(.5),
|
|
40863
40971
|
border: "2px solid lightgrey",
|
|
40864
40972
|
padding: `0 ${e.spacing(1)}`,
|
|
40865
40973
|
borderRadius: "4px"
|
|
40866
|
-
})),
|
|
40974
|
+
})), uX = ({ label: e, value: t, onChange: n, choices: r = [] }) => {
|
|
40867
40975
|
let i = (e) => typeof e == "string" ? e : e.label, a = (e) => typeof e == "string" ? e : e.value;
|
|
40868
|
-
return /* @__PURE__ */ M("div", { children: [e && /* @__PURE__ */ j(
|
|
40976
|
+
return /* @__PURE__ */ M("div", { children: [e && /* @__PURE__ */ j(cX, { children: e }), /* @__PURE__ */ j(lX, {
|
|
40869
40977
|
value: t || r && r[0],
|
|
40870
40978
|
onChange: ({ target: e }) => n(e.value),
|
|
40871
40979
|
input: /* @__PURE__ */ j(Na, { id: `dropdown-${e}` }),
|
|
@@ -40880,14 +40988,14 @@ var QY = ZY, $Y = S("p")(({ theme: e }) => ({
|
|
|
40880
40988
|
}, t))
|
|
40881
40989
|
})] });
|
|
40882
40990
|
};
|
|
40883
|
-
|
|
40884
|
-
...
|
|
40991
|
+
uX.propTypes = {
|
|
40992
|
+
...rX,
|
|
40885
40993
|
choices: N.default.arrayOf(N.default.string)
|
|
40886
40994
|
};
|
|
40887
|
-
var
|
|
40995
|
+
var dX = S(Xt)(({ theme: e }) => ({
|
|
40888
40996
|
marginRight: e.spacing(3),
|
|
40889
40997
|
marginTop: e.spacing(1)
|
|
40890
|
-
})),
|
|
40998
|
+
})), fX = ({ label: e }) => /* @__PURE__ */ j(dX, { children: e }), pX = S(zJ)(({ theme: e }) => ({
|
|
40891
40999
|
width: "35%",
|
|
40892
41000
|
marginRight: e.spacing(3),
|
|
40893
41001
|
marginTop: e.spacing(1),
|
|
@@ -40898,7 +41006,7 @@ var nX = S(Xt)(({ theme: e }) => ({
|
|
|
40898
41006
|
padding: `0 ${e.spacing(1)}`,
|
|
40899
41007
|
backgroundColor: "transparent"
|
|
40900
41008
|
}
|
|
40901
|
-
})),
|
|
41009
|
+
})), mX = ({ label: e, value: t, onChange: n = () => {}, suffix: r, min: i, max: a }) => /* @__PURE__ */ j(pX, {
|
|
40902
41010
|
variant: "standard",
|
|
40903
41011
|
label: e || "Label",
|
|
40904
41012
|
value: t,
|
|
@@ -40909,45 +41017,45 @@ var nX = S(Xt)(({ theme: e }) => ({
|
|
|
40909
41017
|
showErrorWhenOutsideRange: !0,
|
|
40910
41018
|
disableUnderline: !0
|
|
40911
41019
|
});
|
|
40912
|
-
|
|
40913
|
-
...
|
|
41020
|
+
mX.propTypes = {
|
|
41021
|
+
...rX,
|
|
40914
41022
|
suffix: N.default.string,
|
|
40915
41023
|
min: N.default.number,
|
|
40916
41024
|
max: N.default.number,
|
|
40917
41025
|
value: N.default.number
|
|
40918
|
-
},
|
|
40919
|
-
var
|
|
41026
|
+
}, fX.propTypes = { ...rX };
|
|
41027
|
+
var hX = ({ disabled: e, label: t, value: n, onChange: r }) => /* @__PURE__ */ j(ZY, {
|
|
40920
41028
|
label: t,
|
|
40921
41029
|
checked: !!n,
|
|
40922
41030
|
disabled: !!e,
|
|
40923
41031
|
toggle: r
|
|
40924
41032
|
});
|
|
40925
|
-
|
|
40926
|
-
...
|
|
41033
|
+
hX.propTypes = {
|
|
41034
|
+
...rX,
|
|
40927
41035
|
value: N.default.bool
|
|
40928
41036
|
};
|
|
40929
|
-
var
|
|
40930
|
-
toggle:
|
|
40931
|
-
radio:
|
|
40932
|
-
dropdown:
|
|
40933
|
-
numberField:
|
|
40934
|
-
checkbox:
|
|
40935
|
-
textField:
|
|
40936
|
-
},
|
|
41037
|
+
var gX = {
|
|
41038
|
+
toggle: hX,
|
|
41039
|
+
radio: sX,
|
|
41040
|
+
dropdown: uX,
|
|
41041
|
+
numberField: mX,
|
|
41042
|
+
checkbox: iX,
|
|
41043
|
+
textField: fX
|
|
41044
|
+
}, _X = S("div")(({ theme: e }) => ({ margin: `0 0 ${e.spacing(2)} 0` })), vX = S("div")(({ theme: e }) => ({
|
|
40937
41045
|
color: "#495B8F",
|
|
40938
41046
|
fontSize: e.typography.fontSize + 2,
|
|
40939
41047
|
fontWeight: 600,
|
|
40940
41048
|
marginBottom: e.spacing(1)
|
|
40941
|
-
})),
|
|
41049
|
+
})), yX = S("p")(({ theme: e }) => ({
|
|
40942
41050
|
fontSize: e.typography.fontSize,
|
|
40943
41051
|
marginBottom: 0
|
|
40944
|
-
})),
|
|
41052
|
+
})), bX = (e) => {
|
|
40945
41053
|
let { model: t, label: n, group: r, configuration: i, onChange: a } = e, o = (e, n, r) => {
|
|
40946
41054
|
let { isConfigProperty: o, ...s } = it(e, r || n), c = it(o ? i : t, n), l = {
|
|
40947
41055
|
...s,
|
|
40948
41056
|
key: n,
|
|
40949
41057
|
value: c
|
|
40950
|
-
}, u =
|
|
41058
|
+
}, u = gX[l.type];
|
|
40951
41059
|
return /* @__PURE__ */ j(u, {
|
|
40952
41060
|
...l,
|
|
40953
41061
|
onChange: (e) => a(n, e, o)
|
|
@@ -40956,18 +41064,18 @@ var sX = {
|
|
|
40956
41064
|
let n = e[t];
|
|
40957
41065
|
if (!n) return null;
|
|
40958
41066
|
let { type: r, label: i, fields: a, choices: s } = n;
|
|
40959
|
-
return r === "numberFields" ? /* @__PURE__ */ M("div", { children: [/* @__PURE__ */ j(
|
|
41067
|
+
return r === "numberFields" ? /* @__PURE__ */ M("div", { children: [/* @__PURE__ */ j(yX, { 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);
|
|
40960
41068
|
};
|
|
40961
|
-
return /* @__PURE__ */ M(
|
|
41069
|
+
return /* @__PURE__ */ M(_X, { children: [/* @__PURE__ */ j(vX, { children: n }), Object.keys(r).map((e) => s(r, e))] });
|
|
40962
41070
|
};
|
|
40963
|
-
|
|
41071
|
+
bX.propTypes = {
|
|
40964
41072
|
model: N.default.object,
|
|
40965
41073
|
label: N.default.string,
|
|
40966
41074
|
group: N.default.object,
|
|
40967
41075
|
configuration: N.default.object,
|
|
40968
41076
|
onChange: N.default.func
|
|
40969
41077
|
};
|
|
40970
|
-
var
|
|
41078
|
+
var xX = class extends at.Component {
|
|
40971
41079
|
static propTypes = {
|
|
40972
41080
|
model: N.default.object,
|
|
40973
41081
|
configuration: N.default.object,
|
|
@@ -40981,13 +41089,13 @@ var fX = class extends at.Component {
|
|
|
40981
41089
|
onChangeConfiguration: () => {}
|
|
40982
41090
|
};
|
|
40983
41091
|
change = (e, t, n = !1) => {
|
|
40984
|
-
|
|
41092
|
+
tX("[changeModel]", e, t);
|
|
40985
41093
|
let { onChangeModel: r, onChangeConfiguration: i } = this.props, a = { ...this.props.model }, o = { ...this.props.configuration };
|
|
40986
41094
|
n ? ($e(o, e, t), i(o, e)) : ($e(a, e, t), r(a, e));
|
|
40987
41095
|
};
|
|
40988
41096
|
render() {
|
|
40989
41097
|
let { groups: e, model: t, configuration: n, modal: r } = this.props;
|
|
40990
|
-
return
|
|
41098
|
+
return tX("render:", t), /* @__PURE__ */ M("div", { children: [Object.keys(e || {}).map((r) => Object.entries(e[r]).some(([, e]) => !!e) ? /* @__PURE__ */ j(bX, {
|
|
40991
41099
|
label: r,
|
|
40992
41100
|
model: t,
|
|
40993
41101
|
configuration: n,
|
|
@@ -40995,59 +41103,59 @@ var fX = class extends at.Component {
|
|
|
40995
41103
|
onChange: this.change
|
|
40996
41104
|
}, r) : null), r] });
|
|
40997
41105
|
}
|
|
40998
|
-
},
|
|
40999
|
-
Panel: () =>
|
|
41000
|
-
checkbox: () =>
|
|
41001
|
-
checkboxes: () =>
|
|
41002
|
-
dropdown: () =>
|
|
41003
|
-
numberField: () =>
|
|
41004
|
-
numberFields: () =>
|
|
41005
|
-
radio: () =>
|
|
41006
|
-
textField: () =>
|
|
41007
|
-
toggle: () =>
|
|
41008
|
-
}),
|
|
41106
|
+
}, SX = /* @__PURE__ */ XJ({
|
|
41107
|
+
Panel: () => xX,
|
|
41108
|
+
checkbox: () => AX,
|
|
41109
|
+
checkboxes: () => jX,
|
|
41110
|
+
dropdown: () => DX,
|
|
41111
|
+
numberField: () => OX,
|
|
41112
|
+
numberFields: () => kX,
|
|
41113
|
+
radio: () => EX,
|
|
41114
|
+
textField: () => CX,
|
|
41115
|
+
toggle: () => wX
|
|
41116
|
+
}), CX = (e, t = !0) => ({
|
|
41009
41117
|
label: e,
|
|
41010
41118
|
type: "textField",
|
|
41011
41119
|
isConfigProperty: t
|
|
41012
|
-
}),
|
|
41120
|
+
}), wX = (e, t = !1, n = !1) => ({
|
|
41013
41121
|
type: "toggle",
|
|
41014
41122
|
label: e,
|
|
41015
41123
|
isConfigProperty: t,
|
|
41016
41124
|
disabled: n
|
|
41017
|
-
}),
|
|
41125
|
+
}), TX = (e) => typeof e == "string" ? {
|
|
41018
41126
|
label: e,
|
|
41019
41127
|
value: e
|
|
41020
|
-
} : e,
|
|
41128
|
+
} : e, EX = function() {
|
|
41021
41129
|
let [e, t, n = !1] = Array.prototype.slice.call(arguments);
|
|
41022
41130
|
return {
|
|
41023
41131
|
type: "radio",
|
|
41024
41132
|
label: e,
|
|
41025
|
-
choices: t && t.map((e) =>
|
|
41133
|
+
choices: t && t.map((e) => TX(e)),
|
|
41026
41134
|
isConfigProperty: n
|
|
41027
41135
|
};
|
|
41028
|
-
},
|
|
41136
|
+
}, DX = (e, t, n = !1) => ({
|
|
41029
41137
|
type: "dropdown",
|
|
41030
41138
|
label: e,
|
|
41031
41139
|
choices: t,
|
|
41032
41140
|
isConfigProperty: n
|
|
41033
|
-
}),
|
|
41141
|
+
}), OX = (e, t, n = !1) => ({
|
|
41034
41142
|
...t,
|
|
41035
41143
|
label: e,
|
|
41036
41144
|
type: "numberField",
|
|
41037
41145
|
isConfigProperty: n
|
|
41038
|
-
}),
|
|
41039
|
-
t[e] =
|
|
41146
|
+
}), kX = (e, t, n = !1) => (Object.keys(t).map((e) => {
|
|
41147
|
+
t[e] = OX(t[e].label, t[e], n);
|
|
41040
41148
|
}), {
|
|
41041
41149
|
type: "numberFields",
|
|
41042
41150
|
label: e,
|
|
41043
41151
|
fields: t
|
|
41044
|
-
}),
|
|
41152
|
+
}), AX = (e, t, n = !1) => ({
|
|
41045
41153
|
...t,
|
|
41046
41154
|
label: e,
|
|
41047
41155
|
type: "checkbox",
|
|
41048
41156
|
isConfigProperty: n
|
|
41049
|
-
}),
|
|
41050
|
-
t[e] =
|
|
41157
|
+
}), jX = (e, t, n = !1) => (Object.keys(t).map((e) => {
|
|
41158
|
+
t[e] = AX(t[e].label, t[e], n);
|
|
41051
41159
|
}), {
|
|
41052
41160
|
type: "checkboxes",
|
|
41053
41161
|
label: e,
|
|
@@ -41055,17 +41163,17 @@ var fX = class extends at.Component {
|
|
|
41055
41163
|
});
|
|
41056
41164
|
//#endregion
|
|
41057
41165
|
//#region ../../lib-react/config-ui/dist/index.js
|
|
41058
|
-
function
|
|
41166
|
+
function MX(e) {
|
|
41059
41167
|
return typeof e == "function" || typeof e == "object" && !!e && typeof e.$$typeof == "symbol";
|
|
41060
41168
|
}
|
|
41061
|
-
function
|
|
41062
|
-
return !e ||
|
|
41169
|
+
function NX(e, t) {
|
|
41170
|
+
return !e || MX(e) ? e : MX(e.default) ? e.default : t && MX(e[t]) ? e[t] : t && MX(e[t]?.default) ? e[t].default : e;
|
|
41063
41171
|
}
|
|
41064
|
-
var
|
|
41172
|
+
var PX = NX(le, "InputContainer") || NX(LX.InputContainer, "InputContainer"), FX = Fe, IX = FX.default, LX = IX && typeof IX == "object" ? IX : FX, RX = g(/*#__PURE__*/ j("path", { d: "M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m5 11H7v-2h10z" }), "RemoveCircle"), zX = g(/*#__PURE__*/ j("path", { d: "M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m5 11h-4v4h-2v-4H7v-2h4V7h2v4h4z" }), "AddCircle"), BX = S(({ label: e, type: t = "add", onClick: n }) => /* @__PURE__ */ M(ae, {
|
|
41065
41173
|
color: "primary",
|
|
41066
41174
|
size: "small",
|
|
41067
41175
|
onClick: n,
|
|
41068
|
-
children: [/* @__PURE__ */ j(t === "add" ?
|
|
41176
|
+
children: [/* @__PURE__ */ j(t === "add" ? zX : RX, {
|
|
41069
41177
|
fontSize: "small",
|
|
41070
41178
|
color: "primary",
|
|
41071
41179
|
style: { marginRight: 4 }
|
|
@@ -41078,7 +41186,7 @@ var TX = wX(le, "InputContainer") || wX(OX.InputContainer, "InputContainer"), EX
|
|
|
41078
41186
|
},
|
|
41079
41187
|
display: "flex",
|
|
41080
41188
|
alignItems: "center"
|
|
41081
|
-
}),
|
|
41189
|
+
}), VX = ({ content: e, cancel: t, title: n, ok: r, open: i, onOk: a, onCancel: o }) => /* @__PURE__ */ M(Yi, {
|
|
41082
41190
|
open: i,
|
|
41083
41191
|
children: [
|
|
41084
41192
|
/* @__PURE__ */ j(fa, { children: n }),
|
|
@@ -41094,7 +41202,7 @@ var TX = wX(le, "InputContainer") || wX(OX.InputContainer, "InputContainer"), EX
|
|
|
41094
41202
|
})] })
|
|
41095
41203
|
]
|
|
41096
41204
|
});
|
|
41097
|
-
|
|
41205
|
+
VX.propTypes = {
|
|
41098
41206
|
content: N.default.string.isRequired,
|
|
41099
41207
|
title: N.default.string.isRequired,
|
|
41100
41208
|
cancel: N.default.string.isRequired,
|
|
@@ -41105,15 +41213,15 @@ MX.propTypes = {
|
|
|
41105
41213
|
};
|
|
41106
41214
|
//#endregion
|
|
41107
41215
|
//#region src/author/passage.tsx
|
|
41108
|
-
var
|
|
41216
|
+
var HX = S(PX)(({ theme: e }) => ({
|
|
41109
41217
|
paddingTop: e.spacing(2),
|
|
41110
41218
|
marginBottom: e.spacing(2),
|
|
41111
41219
|
width: "100%"
|
|
41112
|
-
})),
|
|
41220
|
+
})), UX = S("div")(({ theme: e }) => ({
|
|
41113
41221
|
fontSize: e.typography.fontSize - 2,
|
|
41114
41222
|
color: e.palette.error.main,
|
|
41115
41223
|
paddingTop: e.spacing(1)
|
|
41116
|
-
})),
|
|
41224
|
+
})), WX = class extends at.Component {
|
|
41117
41225
|
static propTypes = {
|
|
41118
41226
|
onModelChanged: N.default.func.isRequired,
|
|
41119
41227
|
model: N.default.object.isRequired,
|
|
@@ -41149,9 +41257,9 @@ var NX = S(TX)(({ theme: e }) => ({
|
|
|
41149
41257
|
"numbered-list"
|
|
41150
41258
|
].includes(e));
|
|
41151
41259
|
return /* @__PURE__ */ M(at.Fragment, { children: [
|
|
41152
|
-
g && /* @__PURE__ */ M(
|
|
41260
|
+
g && /* @__PURE__ */ M(HX, {
|
|
41153
41261
|
label: l.label,
|
|
41154
|
-
children: [/* @__PURE__ */ j(
|
|
41262
|
+
children: [/* @__PURE__ */ j(AJ, {
|
|
41155
41263
|
activePlugins: Vs,
|
|
41156
41264
|
markup: h[r].teacherInstructions || "",
|
|
41157
41265
|
onChange: (e) => this.handleChange("teacherInstructions", e),
|
|
@@ -41162,11 +41270,11 @@ var NX = S(TX)(({ theme: e }) => ({
|
|
|
41162
41270
|
mathMlOptions: s,
|
|
41163
41271
|
languageCharactersProps: [{ language: "spanish" }, { language: "special" }],
|
|
41164
41272
|
pluginProps: ne(l?.inputConfiguration)
|
|
41165
|
-
}), S && /* @__PURE__ */ j(
|
|
41273
|
+
}), S && /* @__PURE__ */ j(UX, { children: S })]
|
|
41166
41274
|
}),
|
|
41167
|
-
_ && /* @__PURE__ */ M(
|
|
41275
|
+
_ && /* @__PURE__ */ M(HX, {
|
|
41168
41276
|
label: u.label,
|
|
41169
|
-
children: [/* @__PURE__ */ j(
|
|
41277
|
+
children: [/* @__PURE__ */ j(AJ, {
|
|
41170
41278
|
activePlugins: re,
|
|
41171
41279
|
markup: h[r].title || "",
|
|
41172
41280
|
onChange: (e) => this.handleChange("title", e),
|
|
@@ -41175,11 +41283,11 @@ var NX = S(TX)(({ theme: e }) => ({
|
|
|
41175
41283
|
mathMlOptions: s,
|
|
41176
41284
|
languageCharactersProps: [{ language: "spanish" }, { language: "special" }],
|
|
41177
41285
|
pluginProps: ne(u?.inputConfiguration)
|
|
41178
|
-
}), C && /* @__PURE__ */ j(
|
|
41286
|
+
}), C && /* @__PURE__ */ j(UX, { children: C })]
|
|
41179
41287
|
}),
|
|
41180
|
-
v && /* @__PURE__ */ M(
|
|
41288
|
+
v && /* @__PURE__ */ M(HX, {
|
|
41181
41289
|
label: d.label,
|
|
41182
|
-
children: [/* @__PURE__ */ j(
|
|
41290
|
+
children: [/* @__PURE__ */ j(AJ, {
|
|
41183
41291
|
activePlugins: re,
|
|
41184
41292
|
markup: h[r].subtitle || "",
|
|
41185
41293
|
onChange: (e) => this.handleChange("subtitle", e),
|
|
@@ -41188,11 +41296,11 @@ var NX = S(TX)(({ theme: e }) => ({
|
|
|
41188
41296
|
mathMlOptions: s,
|
|
41189
41297
|
languageCharactersProps: [{ language: "spanish" }, { language: "special" }],
|
|
41190
41298
|
pluginProps: ne(d?.inputConfiguration)
|
|
41191
|
-
}), w && /* @__PURE__ */ j(
|
|
41299
|
+
}), w && /* @__PURE__ */ j(UX, { children: w })]
|
|
41192
41300
|
}),
|
|
41193
|
-
y && /* @__PURE__ */ M(
|
|
41301
|
+
y && /* @__PURE__ */ M(HX, {
|
|
41194
41302
|
label: p.label,
|
|
41195
|
-
children: [/* @__PURE__ */ j(
|
|
41303
|
+
children: [/* @__PURE__ */ j(AJ, {
|
|
41196
41304
|
activePlugins: re,
|
|
41197
41305
|
markup: h[r].author || "",
|
|
41198
41306
|
onChange: (e) => this.handleChange("author", e),
|
|
@@ -41201,11 +41309,11 @@ var NX = S(TX)(({ theme: e }) => ({
|
|
|
41201
41309
|
mathMlOptions: s,
|
|
41202
41310
|
languageCharactersProps: [{ language: "spanish" }, { language: "special" }],
|
|
41203
41311
|
pluginProps: ne(p?.inputConfiguration)
|
|
41204
|
-
}), T && /* @__PURE__ */ j(
|
|
41312
|
+
}), T && /* @__PURE__ */ j(UX, { children: T })]
|
|
41205
41313
|
}),
|
|
41206
|
-
b && /* @__PURE__ */ M(
|
|
41314
|
+
b && /* @__PURE__ */ M(HX, {
|
|
41207
41315
|
label: f.label,
|
|
41208
|
-
children: [/* @__PURE__ */ j(
|
|
41316
|
+
children: [/* @__PURE__ */ j(AJ, {
|
|
41209
41317
|
activePlugins: Vs,
|
|
41210
41318
|
markup: h[r].text || "",
|
|
41211
41319
|
onChange: (e) => this.handleChange("text", e),
|
|
@@ -41218,14 +41326,14 @@ var NX = S(TX)(({ theme: e }) => ({
|
|
|
41218
41326
|
mathMlOptions: s,
|
|
41219
41327
|
languageCharactersProps: [{ language: "spanish" }, { language: "special" }],
|
|
41220
41328
|
pluginProps: ne(f?.inputConfiguration)
|
|
41221
|
-
}), E && /* @__PURE__ */ j(
|
|
41329
|
+
}), E && /* @__PURE__ */ j(UX, { children: E })]
|
|
41222
41330
|
})
|
|
41223
41331
|
] });
|
|
41224
41332
|
}
|
|
41225
|
-
}, { Panel:
|
|
41333
|
+
}, { Panel: GX, toggle: KX, dropdown: qX } = SX, JX = S(Xt)(({ theme: e }) => ({
|
|
41226
41334
|
paddingTop: e.spacing(2),
|
|
41227
41335
|
marginBottom: e.spacing(2)
|
|
41228
|
-
})),
|
|
41336
|
+
})), YX = class extends at.Component {
|
|
41229
41337
|
static propTypes = {
|
|
41230
41338
|
onModelChanged: N.default.func.isRequired,
|
|
41231
41339
|
onConfigurationChanged: N.default.func,
|
|
@@ -41274,20 +41382,20 @@ var NX = S(TX)(({ theme: e }) => ({
|
|
|
41274
41382
|
};
|
|
41275
41383
|
render() {
|
|
41276
41384
|
let { model: e, configuration: t, imageSupport: n, onConfigurationChanged: r, onModelChanged: i, uploadSoundSupport: a } = this.props, { settingsPanelDisabled: o, language: s = {}, languageChoices: c = {}, teacherInstructions: l = {}, title: u = {}, subtitle: d = {}, text: f = {}, author: p = {}, additionalPassage: m = {} } = t || {}, { extraCSSRules: h, passages: g } = e || {}, _ = {
|
|
41277
|
-
titleEnabled: u && u.settings &&
|
|
41278
|
-
subtitleEnabled: d && d.settings &&
|
|
41279
|
-
authorEnabled: p && p.settings &&
|
|
41280
|
-
textEnabled: f && f.settings &&
|
|
41281
|
-
"additionalPassage.enabled": m && m.settings &&
|
|
41385
|
+
titleEnabled: u && u.settings && KX(u.label),
|
|
41386
|
+
subtitleEnabled: d && d.settings && KX(d.label),
|
|
41387
|
+
authorEnabled: p && p.settings && KX(p.label),
|
|
41388
|
+
textEnabled: f && f.settings && KX(f.label),
|
|
41389
|
+
"additionalPassage.enabled": m && m.settings && KX(m.label, !0)
|
|
41282
41390
|
}, v = {
|
|
41283
|
-
teacherInstructionsEnabled: l && l.settings &&
|
|
41284
|
-
"language.enabled": s && s.settings &&
|
|
41285
|
-
language: s && s.settings && s.enabled &&
|
|
41391
|
+
teacherInstructionsEnabled: l && l.settings && KX(l.label),
|
|
41392
|
+
"language.enabled": s && s.settings && KX(s.label, !0),
|
|
41393
|
+
language: s && s.settings && s.enabled && qX(c.label, c.options)
|
|
41286
41394
|
}, y = `${m.label} will be deleted`, { indexToRemove: b, showConfirmationDialog: x } = this.state;
|
|
41287
|
-
return /* @__PURE__ */ M(
|
|
41395
|
+
return /* @__PURE__ */ M(qY.ConfigLayout, {
|
|
41288
41396
|
extraCSSRules: h,
|
|
41289
41397
|
hideSettings: o,
|
|
41290
|
-
settings: /* @__PURE__ */ j(
|
|
41398
|
+
settings: /* @__PURE__ */ j(GX, {
|
|
41291
41399
|
model: e,
|
|
41292
41400
|
configuration: t,
|
|
41293
41401
|
onChangeModel: (e) => i(e),
|
|
@@ -41298,11 +41406,11 @@ var NX = S(TX)(({ theme: e }) => ({
|
|
|
41298
41406
|
}
|
|
41299
41407
|
}),
|
|
41300
41408
|
children: [g.map((r, o) => /* @__PURE__ */ M(at.Fragment, { children: [
|
|
41301
|
-
o > 0 && /* @__PURE__ */ j(
|
|
41409
|
+
o > 0 && /* @__PURE__ */ j(JX, {
|
|
41302
41410
|
variant: "h5",
|
|
41303
41411
|
children: m.label
|
|
41304
41412
|
}),
|
|
41305
|
-
/* @__PURE__ */ j(
|
|
41413
|
+
/* @__PURE__ */ j(WX, {
|
|
41306
41414
|
imageSupport: n,
|
|
41307
41415
|
uploadSoundSupport: a,
|
|
41308
41416
|
model: e,
|
|
@@ -41310,16 +41418,16 @@ var NX = S(TX)(({ theme: e }) => ({
|
|
|
41310
41418
|
passageIndex: o,
|
|
41311
41419
|
onModelChanged: i
|
|
41312
41420
|
}),
|
|
41313
|
-
o > 0 && m.enabled && /* @__PURE__ */ j(
|
|
41421
|
+
o > 0 && m.enabled && /* @__PURE__ */ j(BX, {
|
|
41314
41422
|
type: "remove",
|
|
41315
41423
|
label: `Remove ${m.label}`,
|
|
41316
41424
|
onClick: () => this.removeAdditionalPassage(o)
|
|
41317
41425
|
}),
|
|
41318
|
-
o === 0 && m.enabled && g.length < 2 && /* @__PURE__ */ j(
|
|
41426
|
+
o === 0 && m.enabled && g.length < 2 && /* @__PURE__ */ j(BX, {
|
|
41319
41427
|
label: `Add ${m.label}`,
|
|
41320
41428
|
onClick: this.addAdditionalPassage
|
|
41321
41429
|
})
|
|
41322
|
-
] }, o)), /* @__PURE__ */ j(
|
|
41430
|
+
] }, o)), /* @__PURE__ */ j(VX, {
|
|
41323
41431
|
open: x,
|
|
41324
41432
|
title: "Warning",
|
|
41325
41433
|
content: y,
|
|
@@ -41330,7 +41438,7 @@ var NX = S(TX)(({ theme: e }) => ({
|
|
|
41330
41438
|
})]
|
|
41331
41439
|
});
|
|
41332
41440
|
}
|
|
41333
|
-
},
|
|
41441
|
+
}, XX = {
|
|
41334
41442
|
model: {
|
|
41335
41443
|
authorEnabled: !0,
|
|
41336
41444
|
passages: [{
|
|
@@ -41439,13 +41547,13 @@ var NX = S(TX)(({ theme: e }) => ({
|
|
|
41439
41547
|
enabled: !1
|
|
41440
41548
|
}
|
|
41441
41549
|
}
|
|
41442
|
-
},
|
|
41550
|
+
}, ZX = class e extends HTMLElement {
|
|
41443
41551
|
static createDefaultModel = (e = {}) => ({
|
|
41444
|
-
...
|
|
41552
|
+
...XX.model,
|
|
41445
41553
|
...e
|
|
41446
41554
|
});
|
|
41447
41555
|
constructor() {
|
|
41448
|
-
super(), this._root = null, this._model = e.createDefaultModel(), this._configuration =
|
|
41556
|
+
super(), this._root = null, this._model = e.createDefaultModel(), this._configuration = XX.configuration;
|
|
41449
41557
|
}
|
|
41450
41558
|
set model(t) {
|
|
41451
41559
|
this._model = e.createDefaultModel(t), this.render();
|
|
@@ -41476,7 +41584,7 @@ var NX = S(TX)(({ theme: e }) => ({
|
|
|
41476
41584
|
}
|
|
41477
41585
|
render() {
|
|
41478
41586
|
if (this._model) {
|
|
41479
|
-
let e = at.createElement(
|
|
41587
|
+
let e = at.createElement(YX, {
|
|
41480
41588
|
model: this._model,
|
|
41481
41589
|
configuration: this._configuration,
|
|
41482
41590
|
onModelChanged: this.modelChanged.bind(this),
|
|
@@ -41498,6 +41606,6 @@ var NX = S(TX)(({ theme: e }) => ({
|
|
|
41498
41606
|
}
|
|
41499
41607
|
};
|
|
41500
41608
|
//#endregion
|
|
41501
|
-
export {
|
|
41609
|
+
export { ZX as default };
|
|
41502
41610
|
|
|
41503
41611
|
//# sourceMappingURL=index.js.map
|