@pie-element/extended-text-entry 15.1.2-next.4 → 15.1.2-next.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,10 +1,2125 @@
1
- import { a as e } from "../browser-kkT1XVKw.js";
2
- import { _ as t, a as n, b as r, g as i, h as a, i as o, n as s, r as c, t as l } from "../dist-Cv1iX7rJ.js";
3
- import u from "react";
4
- import { jsx as d, jsxs as f } from "react/jsx-runtime";
5
- import { createRoot as p } from "react-dom/client";
6
- //#region ../../shared/configure-events/dist/index.js
7
- var m = class e extends CustomEvent {
1
+ import { a as e, t } from "../browser-kkT1XVKw.js";
2
+ import { A as n, B as r, C as i, D as a, E as o, F as s, G as c, H as l, I as u, J as d, L as f, M as p, N as m, O as h, P as g, R as _, S as v, T as y, U as b, V as x, W as S, Y as C, a as w, b as T, c as E, d as D, f as O, h as k, i as A, j, k as M, l as N, m as P, n as F, o as I, p as L, r as R, s as z, t as ee, w as te, z as B } from "../dist-BbUdUT_D.js";
3
+ import * as V from "react";
4
+ import H, { Component as ne, createElement as re } from "react";
5
+ import { jsx as U, jsxs as W } from "react/jsx-runtime";
6
+ import { createRoot as ie } from "react-dom/client";
7
+ //#region ../../../node_modules/.bun/@mui+material@7.3.11+eb26afe407ed7030/node_modules/@mui/material/esm/utils/createChainedFunction.js
8
+ var ae = a;
9
+ //#endregion
10
+ //#region ../../../node_modules/.bun/@mui+material@7.3.11+eb26afe407ed7030/node_modules/@mui/material/esm/internal/switchBaseClasses.js
11
+ function oe(e) {
12
+ return r("PrivateSwitchBase", e);
13
+ }
14
+ B("PrivateSwitchBase", [
15
+ "root",
16
+ "checked",
17
+ "disabled",
18
+ "input",
19
+ "edgeStart",
20
+ "edgeEnd"
21
+ ]);
22
+ //#endregion
23
+ //#region ../../../node_modules/.bun/@mui+material@7.3.11+eb26afe407ed7030/node_modules/@mui/material/esm/internal/SwitchBase.js
24
+ var se = (e) => {
25
+ let { classes: t, checked: n, disabled: r, edge: i } = e;
26
+ return l({
27
+ root: [
28
+ "root",
29
+ n && "checked",
30
+ r && "disabled",
31
+ i && `edge${p(i)}`
32
+ ],
33
+ input: ["input"]
34
+ }, oe, t);
35
+ }, ce = s(i, { name: "MuiSwitchBase" })({
36
+ padding: 9,
37
+ borderRadius: "50%",
38
+ variants: [
39
+ {
40
+ props: {
41
+ edge: "start",
42
+ size: "small"
43
+ },
44
+ style: { marginLeft: -3 }
45
+ },
46
+ {
47
+ props: ({ edge: e, ownerState: t }) => e === "start" && t.size !== "small",
48
+ style: { marginLeft: -12 }
49
+ },
50
+ {
51
+ props: {
52
+ edge: "end",
53
+ size: "small"
54
+ },
55
+ style: { marginRight: -3 }
56
+ },
57
+ {
58
+ props: ({ edge: e, ownerState: t }) => e === "end" && t.size !== "small",
59
+ style: { marginRight: -12 }
60
+ }
61
+ ]
62
+ }), le = s("input", {
63
+ name: "MuiSwitchBase",
64
+ shouldForwardProp: u
65
+ })({
66
+ cursor: "inherit",
67
+ position: "absolute",
68
+ opacity: 0,
69
+ width: "100%",
70
+ height: "100%",
71
+ top: 0,
72
+ left: 0,
73
+ margin: 0,
74
+ padding: 0,
75
+ zIndex: 1
76
+ }), ue = /*#__PURE__*/ V.forwardRef(function(e, t) {
77
+ let { autoFocus: n, checked: r, checkedIcon: i, defaultChecked: a, disabled: o, disableFocusRipple: s = !1, edge: c = !1, icon: l, id: u, inputProps: d, inputRef: f, name: p, onBlur: m, onChange: h, onFocus: g, readOnly: _, required: v = !1, tabIndex: b, type: x, value: S, slots: C = {}, slotProps: w = {}, ...E } = e, [D, O] = y({
78
+ controlled: r,
79
+ default: !!a,
80
+ name: "SwitchBase",
81
+ state: "checked"
82
+ }), k = L(), A = (e) => {
83
+ g && g(e), k && k.onFocus && k.onFocus(e);
84
+ }, j = (e) => {
85
+ m && m(e), k && k.onBlur && k.onBlur(e);
86
+ }, M = (e) => {
87
+ if (e.nativeEvent.defaultPrevented || _) return;
88
+ let t = e.target.checked;
89
+ O(t), h && h(e, t);
90
+ }, N = o;
91
+ k && N === void 0 && (N = k.disabled);
92
+ let P = x === "checkbox" || x === "radio", F = {
93
+ ...e,
94
+ checked: D,
95
+ disabled: N,
96
+ disableFocusRipple: s,
97
+ edge: c
98
+ }, I = se(F), R = {
99
+ slots: C,
100
+ slotProps: {
101
+ input: d,
102
+ ...w
103
+ }
104
+ }, [z, ee] = T("root", {
105
+ ref: t,
106
+ elementType: ce,
107
+ className: I.root,
108
+ shouldForwardComponentProp: !0,
109
+ externalForwardedProps: {
110
+ ...R,
111
+ component: "span",
112
+ ...E
113
+ },
114
+ getSlotProps: (e) => ({
115
+ ...e,
116
+ onFocus: (t) => {
117
+ e.onFocus?.(t), A(t);
118
+ },
119
+ onBlur: (t) => {
120
+ e.onBlur?.(t), j(t);
121
+ }
122
+ }),
123
+ ownerState: F,
124
+ additionalProps: {
125
+ centerRipple: !0,
126
+ focusRipple: !s,
127
+ role: void 0,
128
+ tabIndex: null
129
+ }
130
+ }), [te, B] = T("input", {
131
+ ref: f,
132
+ elementType: le,
133
+ className: I.input,
134
+ externalForwardedProps: R,
135
+ getSlotProps: (e) => ({
136
+ ...e,
137
+ onChange: (t) => {
138
+ e.onChange?.(t), M(t);
139
+ }
140
+ }),
141
+ ownerState: F,
142
+ additionalProps: {
143
+ autoFocus: n,
144
+ checked: r,
145
+ defaultChecked: a,
146
+ disabled: N,
147
+ id: P ? u : void 0,
148
+ name: p,
149
+ readOnly: _,
150
+ required: v,
151
+ tabIndex: b,
152
+ type: x,
153
+ ...x === "checkbox" && S === void 0 ? {} : { value: S }
154
+ }
155
+ });
156
+ return /*#__PURE__*/ W(z, {
157
+ ...ee,
158
+ children: [/*#__PURE__*/ U(te, { ...B }), D ? i : l]
159
+ });
160
+ }), de = o(/*#__PURE__*/ U("path", { d: "M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z" }), "CheckBoxOutlineBlank"), fe = o(/*#__PURE__*/ U("path", { d: "M19 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.11 0 2-.9 2-2V5c0-1.1-.89-2-2-2zm-9 14l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z" }), "CheckBox"), pe = o(/*#__PURE__*/ U("path", { d: "M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-2 10H7v-2h10v2z" }), "IndeterminateCheckBox");
161
+ //#endregion
162
+ //#region ../../../node_modules/.bun/@mui+material@7.3.11+eb26afe407ed7030/node_modules/@mui/material/esm/Checkbox/checkboxClasses.js
163
+ function me(e) {
164
+ return r("MuiCheckbox", e);
165
+ }
166
+ var he = B("MuiCheckbox", [
167
+ "root",
168
+ "checked",
169
+ "disabled",
170
+ "indeterminate",
171
+ "colorPrimary",
172
+ "colorSecondary",
173
+ "sizeSmall",
174
+ "sizeMedium"
175
+ ]), ge = (e) => {
176
+ let { classes: t, indeterminate: n, color: r, size: i } = e, a = l({ root: [
177
+ "root",
178
+ n && "indeterminate",
179
+ `color${p(r)}`,
180
+ `size${p(i)}`
181
+ ] }, me, t);
182
+ return {
183
+ ...t,
184
+ ...a
185
+ };
186
+ }, _e = s(ue, {
187
+ shouldForwardProp: (e) => u(e) || e === "classes",
188
+ name: "MuiCheckbox",
189
+ slot: "Root",
190
+ overridesResolver: (e, t) => {
191
+ let { ownerState: n } = e;
192
+ return [
193
+ t.root,
194
+ n.indeterminate && t.indeterminate,
195
+ t[`size${p(n.size)}`],
196
+ n.color !== "default" && t[`color${p(n.color)}`]
197
+ ];
198
+ }
199
+ })(g(({ theme: e }) => ({
200
+ color: (e.vars || e).palette.text.secondary,
201
+ variants: [
202
+ {
203
+ props: {
204
+ color: "default",
205
+ disableRipple: !1
206
+ },
207
+ style: { "&:hover": { backgroundColor: e.alpha((e.vars || e).palette.action.active, (e.vars || e).palette.action.hoverOpacity) } }
208
+ },
209
+ ...Object.entries(e.palette).filter(j()).map(([t]) => ({
210
+ props: {
211
+ color: t,
212
+ disableRipple: !1
213
+ },
214
+ style: { "&:hover": { backgroundColor: e.alpha((e.vars || e).palette[t].main, (e.vars || e).palette.action.hoverOpacity) } }
215
+ })),
216
+ ...Object.entries(e.palette).filter(j()).map(([t]) => ({
217
+ props: { color: t },
218
+ style: {
219
+ [`&.${he.checked}, &.${he.indeterminate}`]: { color: (e.vars || e).palette[t].main },
220
+ [`&.${he.disabled}`]: { color: (e.vars || e).palette.action.disabled }
221
+ }
222
+ })),
223
+ {
224
+ props: { disableRipple: !1 },
225
+ style: { "&:hover": { "@media (hover: none)": { backgroundColor: "transparent" } } }
226
+ }
227
+ ]
228
+ }))), ve = /*#__PURE__*/ U(fe, {}), ye = /*#__PURE__*/ U(de, {}), be = /*#__PURE__*/ U(pe, {}), xe = /*#__PURE__*/ V.forwardRef(function(e, t) {
229
+ let n = m({
230
+ props: e,
231
+ name: "MuiCheckbox"
232
+ }), { checkedIcon: r = ve, color: i = "primary", icon: a = ye, indeterminate: o = !1, indeterminateIcon: s = be, inputProps: c, size: l = "medium", disableRipple: u = !1, className: d, slots: f = {}, slotProps: p = {}, ...h } = n, g = o ? s : a, _ = o ? s : r, v = {
233
+ ...n,
234
+ disableRipple: u,
235
+ color: i,
236
+ indeterminate: o,
237
+ size: l
238
+ }, y = ge(v), x = p.input ?? c, [S, C] = T("root", {
239
+ ref: t,
240
+ elementType: _e,
241
+ className: b(y.root, d),
242
+ shouldForwardComponentProp: !0,
243
+ externalForwardedProps: {
244
+ slots: f,
245
+ slotProps: p,
246
+ ...h
247
+ },
248
+ ownerState: v,
249
+ additionalProps: {
250
+ type: "checkbox",
251
+ icon: /*#__PURE__*/ V.cloneElement(g, { fontSize: g.props.fontSize ?? l }),
252
+ checkedIcon: /*#__PURE__*/ V.cloneElement(_, { fontSize: _.props.fontSize ?? l }),
253
+ disableRipple: u,
254
+ slots: f,
255
+ slotProps: { input: te(typeof x == "function" ? x(v) : x, {
256
+ "data-indeterminate": o,
257
+ "aria-checked": o ? "mixed" : void 0
258
+ }) }
259
+ }
260
+ });
261
+ return /*#__PURE__*/ U(S, {
262
+ ...C,
263
+ classes: y
264
+ });
265
+ });
266
+ //#endregion
267
+ //#region ../../../node_modules/.bun/@mui+material@7.3.11+eb26afe407ed7030/node_modules/@mui/material/esm/FormControlLabel/formControlLabelClasses.js
268
+ function Se(e) {
269
+ return r("MuiFormControlLabel", e);
270
+ }
271
+ var G = B("MuiFormControlLabel", [
272
+ "root",
273
+ "labelPlacementStart",
274
+ "labelPlacementTop",
275
+ "labelPlacementBottom",
276
+ "disabled",
277
+ "label",
278
+ "error",
279
+ "required",
280
+ "asterisk"
281
+ ]), Ce = (e) => {
282
+ let { classes: t, disabled: n, labelPlacement: r, error: i, required: a } = e;
283
+ return l({
284
+ root: [
285
+ "root",
286
+ n && "disabled",
287
+ `labelPlacement${p(r)}`,
288
+ i && "error",
289
+ a && "required"
290
+ ],
291
+ label: ["label", n && "disabled"],
292
+ asterisk: ["asterisk", i && "error"]
293
+ }, Se, t);
294
+ }, we = s("label", {
295
+ name: "MuiFormControlLabel",
296
+ slot: "Root",
297
+ overridesResolver: (e, t) => {
298
+ let { ownerState: n } = e;
299
+ return [
300
+ { [`& .${G.label}`]: t.label },
301
+ t.root,
302
+ t[`labelPlacement${p(n.labelPlacement)}`]
303
+ ];
304
+ }
305
+ })(g(({ theme: e }) => ({
306
+ display: "inline-flex",
307
+ alignItems: "center",
308
+ cursor: "pointer",
309
+ verticalAlign: "middle",
310
+ WebkitTapHighlightColor: "transparent",
311
+ marginLeft: -11,
312
+ marginRight: 16,
313
+ [`&.${G.disabled}`]: { cursor: "default" },
314
+ [`& .${G.label}`]: { [`&.${G.disabled}`]: { color: (e.vars || e).palette.text.disabled } },
315
+ variants: [
316
+ {
317
+ props: { labelPlacement: "start" },
318
+ style: {
319
+ flexDirection: "row-reverse",
320
+ marginRight: -11
321
+ }
322
+ },
323
+ {
324
+ props: { labelPlacement: "top" },
325
+ style: { flexDirection: "column-reverse" }
326
+ },
327
+ {
328
+ props: { labelPlacement: "bottom" },
329
+ style: { flexDirection: "column" }
330
+ },
331
+ {
332
+ props: ({ labelPlacement: e }) => e === "start" || e === "top" || e === "bottom",
333
+ style: { marginLeft: 16 }
334
+ }
335
+ ]
336
+ }))), Te = s("span", {
337
+ name: "MuiFormControlLabel",
338
+ slot: "Asterisk"
339
+ })(g(({ theme: e }) => ({ [`&.${G.error}`]: { color: (e.vars || e).palette.error.main } }))), Ee = /*#__PURE__*/ V.forwardRef(function(e, t) {
340
+ let r = m({
341
+ props: e,
342
+ name: "MuiFormControlLabel"
343
+ }), { checked: i, className: a, componentsProps: o = {}, control: s, disabled: c, disableTypography: l, inputRef: u, label: d, labelPlacement: f = "end", name: p, onChange: h, required: g, slots: _ = {}, slotProps: v = {}, value: y, ...x } = r, S = L(), C = c ?? s.props.disabled ?? S?.disabled, w = g ?? s.props.required, E = {
344
+ disabled: C,
345
+ required: w
346
+ };
347
+ [
348
+ "checked",
349
+ "name",
350
+ "onChange",
351
+ "value",
352
+ "inputRef"
353
+ ].forEach((e) => {
354
+ s.props[e] === void 0 && r[e] !== void 0 && (E[e] = r[e]);
355
+ });
356
+ let D = k({
357
+ props: r,
358
+ muiFormControl: S,
359
+ states: ["error"]
360
+ }), O = {
361
+ ...r,
362
+ disabled: C,
363
+ labelPlacement: f,
364
+ required: w,
365
+ error: D.error
366
+ }, A = Ce(O), [j, M] = T("typography", {
367
+ elementType: n,
368
+ externalForwardedProps: {
369
+ slots: _,
370
+ slotProps: {
371
+ ...o,
372
+ ...v
373
+ }
374
+ },
375
+ ownerState: O
376
+ }), N = d;
377
+ return N != null && N.type !== n && !l && (N = /*#__PURE__*/ U(j, {
378
+ component: "span",
379
+ ...M,
380
+ className: b(A.label, M?.className),
381
+ children: N
382
+ })), /*#__PURE__*/ W(we, {
383
+ className: b(A.root, a),
384
+ ownerState: O,
385
+ ref: t,
386
+ ...x,
387
+ children: [/*#__PURE__*/ V.cloneElement(s, E), w ? /*#__PURE__*/ W("div", { children: [N, /*#__PURE__*/ W(Te, {
388
+ ownerState: O,
389
+ "aria-hidden": !0,
390
+ className: A.asterisk,
391
+ children: [" ", "*"]
392
+ })] }) : N]
393
+ });
394
+ });
395
+ //#endregion
396
+ //#region ../../../node_modules/.bun/@mui+material@7.3.11+eb26afe407ed7030/node_modules/@mui/material/esm/InputAdornment/inputAdornmentClasses.js
397
+ function De(e) {
398
+ return r("MuiInputAdornment", e);
399
+ }
400
+ var Oe = B("MuiInputAdornment", [
401
+ "root",
402
+ "filled",
403
+ "standard",
404
+ "outlined",
405
+ "positionStart",
406
+ "positionEnd",
407
+ "disablePointerEvents",
408
+ "hiddenLabel",
409
+ "sizeSmall"
410
+ ]), ke, Ae = (e, t) => {
411
+ let { ownerState: n } = e;
412
+ return [
413
+ t.root,
414
+ t[`position${p(n.position)}`],
415
+ n.disablePointerEvents === !0 && t.disablePointerEvents,
416
+ t[n.variant]
417
+ ];
418
+ }, je = (e) => {
419
+ let { classes: t, disablePointerEvents: n, hiddenLabel: r, position: i, size: a, variant: o } = e;
420
+ return l({ root: [
421
+ "root",
422
+ n && "disablePointerEvents",
423
+ i && `position${p(i)}`,
424
+ o,
425
+ r && "hiddenLabel",
426
+ a && `size${p(a)}`
427
+ ] }, De, t);
428
+ }, Me = s("div", {
429
+ name: "MuiInputAdornment",
430
+ slot: "Root",
431
+ overridesResolver: Ae
432
+ })(g(({ theme: e }) => ({
433
+ display: "flex",
434
+ maxHeight: "2em",
435
+ alignItems: "center",
436
+ whiteSpace: "nowrap",
437
+ color: (e.vars || e).palette.action.active,
438
+ variants: [
439
+ {
440
+ props: { variant: "filled" },
441
+ style: { [`&.${Oe.positionStart}&:not(.${Oe.hiddenLabel})`]: { marginTop: 16 } }
442
+ },
443
+ {
444
+ props: { position: "start" },
445
+ style: { marginRight: 8 }
446
+ },
447
+ {
448
+ props: { position: "end" },
449
+ style: { marginLeft: 8 }
450
+ },
451
+ {
452
+ props: { disablePointerEvents: !0 },
453
+ style: { pointerEvents: "none" }
454
+ }
455
+ ]
456
+ }))), Ne = /*#__PURE__*/ V.forwardRef(function(e, t) {
457
+ let r = m({
458
+ props: e,
459
+ name: "MuiInputAdornment"
460
+ }), { children: i, className: a, component: o = "div", disablePointerEvents: s = !1, disableTypography: c = !1, position: l, variant: u, ...d } = r, f = L() || {}, p = u;
461
+ u && f.variant, f && !p && (p = f.variant);
462
+ let h = {
463
+ ...r,
464
+ hiddenLabel: f.hiddenLabel,
465
+ size: f.size,
466
+ disablePointerEvents: s,
467
+ position: l,
468
+ variant: p
469
+ }, g = je(h);
470
+ return /*#__PURE__*/ U(P.Provider, {
471
+ value: null,
472
+ children: /*#__PURE__*/ U(Me, {
473
+ as: o,
474
+ ownerState: h,
475
+ className: b(g.root, a),
476
+ ref: t,
477
+ ...d,
478
+ children: typeof i == "string" && !c ? /*#__PURE__*/ U(n, {
479
+ color: "textSecondary",
480
+ children: i
481
+ }) : /*#__PURE__*/ W(V.Fragment, { children: [l === "start" ? ke ||= /*#__PURE__*/ U("span", {
482
+ className: "notranslate",
483
+ "aria-hidden": !0,
484
+ children: "​"
485
+ }) : null, i] })
486
+ })
487
+ });
488
+ }), Pe = o(/*#__PURE__*/ U("path", { d: "M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z" }), "RadioButtonUnchecked"), Fe = o(/*#__PURE__*/ U("path", { d: "M8.465 8.465C9.37 7.56 10.62 7 12 7C14.76 7 17 9.24 17 12C17 13.38 16.44 14.63 15.535 15.535C14.63 16.44 13.38 17 12 17C9.24 17 7 14.76 7 12C7 10.62 7.56 9.37 8.465 8.465Z" }), "RadioButtonChecked"), Ie = s("span", {
489
+ name: "MuiRadioButtonIcon",
490
+ shouldForwardProp: u
491
+ })({
492
+ position: "relative",
493
+ display: "flex"
494
+ }), Le = s(Pe, { name: "MuiRadioButtonIcon" })({ transform: "scale(1)" }), Re = s(Fe, { name: "MuiRadioButtonIcon" })(g(({ theme: e }) => ({
495
+ left: 0,
496
+ position: "absolute",
497
+ transform: "scale(0)",
498
+ transition: e.transitions.create("transform", {
499
+ easing: e.transitions.easing.easeIn,
500
+ duration: e.transitions.duration.shortest
501
+ }),
502
+ variants: [{
503
+ props: { checked: !0 },
504
+ style: {
505
+ transform: "scale(1)",
506
+ transition: e.transitions.create("transform", {
507
+ easing: e.transitions.easing.easeOut,
508
+ duration: e.transitions.duration.shortest
509
+ })
510
+ }
511
+ }]
512
+ })));
513
+ function ze(e) {
514
+ let { checked: t = !1, classes: n = {}, fontSize: r } = e, i = {
515
+ ...e,
516
+ checked: t
517
+ };
518
+ return /*#__PURE__*/ W(Ie, {
519
+ className: n.root,
520
+ ownerState: i,
521
+ children: [/*#__PURE__*/ U(Le, {
522
+ fontSize: r,
523
+ className: n.background,
524
+ ownerState: i
525
+ }), /*#__PURE__*/ U(Re, {
526
+ fontSize: r,
527
+ className: n.dot,
528
+ ownerState: i
529
+ })]
530
+ });
531
+ }
532
+ //#endregion
533
+ //#region ../../../node_modules/.bun/@mui+material@7.3.11+eb26afe407ed7030/node_modules/@mui/material/esm/RadioGroup/RadioGroupContext.js
534
+ var Be = /*#__PURE__*/ V.createContext(void 0);
535
+ //#endregion
536
+ //#region ../../../node_modules/.bun/@mui+material@7.3.11+eb26afe407ed7030/node_modules/@mui/material/esm/RadioGroup/useRadioGroup.js
537
+ function Ve() {
538
+ return V.useContext(Be);
539
+ }
540
+ //#endregion
541
+ //#region ../../../node_modules/.bun/@mui+material@7.3.11+eb26afe407ed7030/node_modules/@mui/material/esm/Radio/radioClasses.js
542
+ function He(e) {
543
+ return r("MuiRadio", e);
544
+ }
545
+ var Ue = B("MuiRadio", [
546
+ "root",
547
+ "checked",
548
+ "disabled",
549
+ "colorPrimary",
550
+ "colorSecondary",
551
+ "sizeSmall"
552
+ ]), We = (e) => {
553
+ let { classes: t, color: n, size: r } = e, i = { root: [
554
+ "root",
555
+ `color${p(n)}`,
556
+ r !== "medium" && `size${p(r)}`
557
+ ] };
558
+ return {
559
+ ...t,
560
+ ...l(i, He, t)
561
+ };
562
+ }, Ge = s(ue, {
563
+ shouldForwardProp: (e) => u(e) || e === "classes",
564
+ name: "MuiRadio",
565
+ slot: "Root",
566
+ overridesResolver: (e, t) => {
567
+ let { ownerState: n } = e;
568
+ return [
569
+ t.root,
570
+ n.size !== "medium" && t[`size${p(n.size)}`],
571
+ t[`color${p(n.color)}`]
572
+ ];
573
+ }
574
+ })(g(({ theme: e }) => ({
575
+ color: (e.vars || e).palette.text.secondary,
576
+ [`&.${Ue.disabled}`]: { color: (e.vars || e).palette.action.disabled },
577
+ variants: [
578
+ {
579
+ props: {
580
+ color: "default",
581
+ disabled: !1,
582
+ disableRipple: !1
583
+ },
584
+ style: { "&:hover": { backgroundColor: e.alpha((e.vars || e).palette.action.active, (e.vars || e).palette.action.hoverOpacity) } }
585
+ },
586
+ ...Object.entries(e.palette).filter(j()).map(([t]) => ({
587
+ props: {
588
+ color: t,
589
+ disabled: !1,
590
+ disableRipple: !1
591
+ },
592
+ style: { "&:hover": { backgroundColor: e.alpha((e.vars || e).palette[t].main, (e.vars || e).palette.action.hoverOpacity) } }
593
+ })),
594
+ ...Object.entries(e.palette).filter(j()).map(([t]) => ({
595
+ props: {
596
+ color: t,
597
+ disabled: !1
598
+ },
599
+ style: { [`&.${Ue.checked}`]: { color: (e.vars || e).palette[t].main } }
600
+ })),
601
+ {
602
+ props: { disableRipple: !1 },
603
+ style: { "&:hover": { "@media (hover: none)": { backgroundColor: "transparent" } } }
604
+ }
605
+ ]
606
+ })));
607
+ function Ke(e, t) {
608
+ return typeof t == "object" && t ? e === t : String(e) === String(t);
609
+ }
610
+ var qe = /*#__PURE__*/ U(ze, { checked: !0 }), Je = /*#__PURE__*/ U(ze, {}), Ye = /*#__PURE__*/ V.forwardRef(function(e, t) {
611
+ let n = m({
612
+ props: e,
613
+ name: "MuiRadio"
614
+ }), { checked: r, checkedIcon: i = qe, color: a = "primary", icon: o = Je, name: s, onChange: c, size: l = "medium", className: u, disabled: d, disableRipple: f = !1, slots: p = {}, slotProps: h = {}, inputProps: g, ..._ } = n, v = L(), y = d;
615
+ v && y === void 0 && (y = v.disabled), y ??= !1;
616
+ let x = {
617
+ ...n,
618
+ disabled: y,
619
+ disableRipple: f,
620
+ color: a,
621
+ size: l
622
+ }, S = We(x), C = Ve(), w = r, E = ae(c, C && C.onChange), D = s;
623
+ C && (w === void 0 && (w = Ke(C.value, n.value)), D === void 0 && (D = C.name));
624
+ let O = h.input ?? g, [k, A] = T("root", {
625
+ ref: t,
626
+ elementType: Ge,
627
+ className: b(S.root, u),
628
+ shouldForwardComponentProp: !0,
629
+ externalForwardedProps: {
630
+ slots: p,
631
+ slotProps: h,
632
+ ..._
633
+ },
634
+ getSlotProps: (e) => ({
635
+ ...e,
636
+ onChange: (t, ...n) => {
637
+ e.onChange?.(t, ...n), E(t, ...n);
638
+ }
639
+ }),
640
+ ownerState: x,
641
+ additionalProps: {
642
+ type: "radio",
643
+ icon: /*#__PURE__*/ V.cloneElement(o, { fontSize: o.props.fontSize ?? l }),
644
+ checkedIcon: /*#__PURE__*/ V.cloneElement(i, { fontSize: i.props.fontSize ?? l }),
645
+ disabled: y,
646
+ name: D,
647
+ checked: w,
648
+ slots: p,
649
+ slotProps: { input: typeof O == "function" ? O(x) : O }
650
+ }
651
+ });
652
+ return /*#__PURE__*/ U(k, {
653
+ ...A,
654
+ classes: S
655
+ });
656
+ });
657
+ //#endregion
658
+ //#region ../../../node_modules/.bun/@mui+material@7.3.11+eb26afe407ed7030/node_modules/@mui/material/esm/Switch/switchClasses.js
659
+ function Xe(e) {
660
+ return r("MuiSwitch", e);
661
+ }
662
+ var K = B("MuiSwitch", [
663
+ "root",
664
+ "edgeStart",
665
+ "edgeEnd",
666
+ "switchBase",
667
+ "colorPrimary",
668
+ "colorSecondary",
669
+ "sizeSmall",
670
+ "sizeMedium",
671
+ "checked",
672
+ "disabled",
673
+ "input",
674
+ "thumb",
675
+ "track"
676
+ ]), Ze = (e) => {
677
+ let { classes: t, edge: n, size: r, color: i, checked: a, disabled: o } = e, s = l({
678
+ root: [
679
+ "root",
680
+ n && `edge${p(n)}`,
681
+ `size${p(r)}`
682
+ ],
683
+ switchBase: [
684
+ "switchBase",
685
+ `color${p(i)}`,
686
+ a && "checked",
687
+ o && "disabled"
688
+ ],
689
+ thumb: ["thumb"],
690
+ track: ["track"],
691
+ input: ["input"]
692
+ }, Xe, t);
693
+ return {
694
+ ...t,
695
+ ...s
696
+ };
697
+ }, Qe = s("span", {
698
+ name: "MuiSwitch",
699
+ slot: "Root",
700
+ overridesResolver: (e, t) => {
701
+ let { ownerState: n } = e;
702
+ return [
703
+ t.root,
704
+ n.edge && t[`edge${p(n.edge)}`],
705
+ t[`size${p(n.size)}`]
706
+ ];
707
+ }
708
+ })({
709
+ display: "inline-flex",
710
+ width: 58,
711
+ height: 38,
712
+ overflow: "hidden",
713
+ padding: 12,
714
+ boxSizing: "border-box",
715
+ position: "relative",
716
+ flexShrink: 0,
717
+ zIndex: 0,
718
+ verticalAlign: "middle",
719
+ "@media print": { colorAdjust: "exact" },
720
+ variants: [
721
+ {
722
+ props: { edge: "start" },
723
+ style: { marginLeft: -8 }
724
+ },
725
+ {
726
+ props: { edge: "end" },
727
+ style: { marginRight: -8 }
728
+ },
729
+ {
730
+ props: { size: "small" },
731
+ style: {
732
+ width: 40,
733
+ height: 24,
734
+ padding: 7,
735
+ [`& .${K.thumb}`]: {
736
+ width: 16,
737
+ height: 16
738
+ },
739
+ [`& .${K.switchBase}`]: {
740
+ padding: 4,
741
+ [`&.${K.checked}`]: { transform: "translateX(16px)" }
742
+ }
743
+ }
744
+ }
745
+ ]
746
+ }), $e = s(ue, {
747
+ name: "MuiSwitch",
748
+ slot: "SwitchBase",
749
+ overridesResolver: (e, t) => {
750
+ let { ownerState: n } = e;
751
+ return [
752
+ t.switchBase,
753
+ { [`& .${K.input}`]: t.input },
754
+ n.color !== "default" && t[`color${p(n.color)}`]
755
+ ];
756
+ }
757
+ })(g(({ theme: e }) => ({
758
+ position: "absolute",
759
+ top: 0,
760
+ left: 0,
761
+ zIndex: 1,
762
+ color: e.vars ? e.vars.palette.Switch.defaultColor : `${e.palette.mode === "light" ? e.palette.common.white : e.palette.grey[300]}`,
763
+ transition: e.transitions.create(["left", "transform"], { duration: e.transitions.duration.shortest }),
764
+ [`&.${K.checked}`]: { transform: "translateX(20px)" },
765
+ [`&.${K.disabled}`]: { color: e.vars ? e.vars.palette.Switch.defaultDisabledColor : `${e.palette.mode === "light" ? e.palette.grey[100] : e.palette.grey[600]}` },
766
+ [`&.${K.checked} + .${K.track}`]: { opacity: .5 },
767
+ [`&.${K.disabled} + .${K.track}`]: { opacity: e.vars ? e.vars.opacity.switchTrackDisabled : `${e.palette.mode === "light" ? .12 : .2}` },
768
+ [`& .${K.input}`]: {
769
+ left: "-100%",
770
+ width: "300%"
771
+ }
772
+ })), g(({ theme: e }) => ({
773
+ "&:hover": {
774
+ backgroundColor: e.alpha((e.vars || e).palette.action.active, (e.vars || e).palette.action.hoverOpacity),
775
+ "@media (hover: none)": { backgroundColor: "transparent" }
776
+ },
777
+ variants: [...Object.entries(e.palette).filter(j(["light"])).map(([t]) => ({
778
+ props: { color: t },
779
+ style: {
780
+ [`&.${K.checked}`]: {
781
+ color: (e.vars || e).palette[t].main,
782
+ "&:hover": {
783
+ backgroundColor: e.alpha((e.vars || e).palette[t].main, (e.vars || e).palette.action.hoverOpacity),
784
+ "@media (hover: none)": { backgroundColor: "transparent" }
785
+ },
786
+ [`&.${K.disabled}`]: { color: e.vars ? e.vars.palette.Switch[`${t}DisabledColor`] : `${e.palette.mode === "light" ? e.lighten(e.palette[t].main, .62) : e.darken(e.palette[t].main, .55)}` }
787
+ },
788
+ [`&.${K.checked} + .${K.track}`]: { backgroundColor: (e.vars || e).palette[t].main }
789
+ }
790
+ }))]
791
+ }))), et = s("span", {
792
+ name: "MuiSwitch",
793
+ slot: "Track"
794
+ })(g(({ theme: e }) => ({
795
+ height: "100%",
796
+ width: "100%",
797
+ borderRadius: 14 / 2,
798
+ boxSizing: "border-box",
799
+ border: "1px solid transparent",
800
+ zIndex: -1,
801
+ transition: e.transitions.create(["opacity", "background-color"], { duration: e.transitions.duration.shortest }),
802
+ backgroundColor: e.vars ? e.vars.palette.common.onBackground : `${e.palette.mode === "light" ? e.palette.common.black : e.palette.common.white}`,
803
+ opacity: e.vars ? e.vars.opacity.switchTrack : `${e.palette.mode === "light" ? .38 : .3}`
804
+ }))), tt = s("span", {
805
+ name: "MuiSwitch",
806
+ slot: "Thumb"
807
+ })(g(({ theme: e }) => ({
808
+ boxShadow: (e.vars || e).shadows[1],
809
+ backgroundColor: "currentColor",
810
+ boxSizing: "border-box",
811
+ border: "1px solid transparent",
812
+ width: 20,
813
+ height: 20,
814
+ borderRadius: "50%"
815
+ }))), nt = /*#__PURE__*/ V.forwardRef(function(e, t) {
816
+ let n = m({
817
+ props: e,
818
+ name: "MuiSwitch"
819
+ }), { className: r, color: i = "primary", edge: a = !1, size: o = "medium", sx: s, slots: c = {}, slotProps: l = {}, ...u } = n, d = {
820
+ ...n,
821
+ color: i,
822
+ edge: a,
823
+ size: o
824
+ }, f = Ze(d), p = l.input, h = {
825
+ slots: c,
826
+ slotProps: l
827
+ }, [g, _] = T("root", {
828
+ className: b(f.root, r),
829
+ elementType: Qe,
830
+ externalForwardedProps: h,
831
+ ownerState: d,
832
+ additionalProps: { sx: s }
833
+ }), [v, y] = T("thumb", {
834
+ className: f.thumb,
835
+ elementType: tt,
836
+ externalForwardedProps: h,
837
+ ownerState: d
838
+ }), x = /*#__PURE__*/ U(v, { ...y }), [S, C] = T("track", {
839
+ className: f.track,
840
+ elementType: et,
841
+ externalForwardedProps: h,
842
+ ownerState: d
843
+ });
844
+ return /*#__PURE__*/ W(g, {
845
+ ..._,
846
+ children: [/*#__PURE__*/ U($e, {
847
+ type: "checkbox",
848
+ icon: x,
849
+ checkedIcon: x,
850
+ ref: t,
851
+ ownerState: d,
852
+ ...u,
853
+ classes: {
854
+ ...f,
855
+ root: f.switchBase
856
+ },
857
+ slots: {
858
+ ...c.switchBase && { root: c.switchBase },
859
+ ...c.input && { input: c.input }
860
+ },
861
+ slotProps: {
862
+ ...l.switchBase && { root: typeof l.switchBase == "function" ? l.switchBase(d) : l.switchBase },
863
+ input: te(typeof p == "function" ? p(d) : p, { role: "switch" })
864
+ }
865
+ }), /*#__PURE__*/ U(S, { ...C })]
866
+ });
867
+ }), q = /* @__PURE__ */ e(C(), 1), rt = s(Ee)(() => ({ "& .MuiFormControlLabel-label": {
868
+ left: "-5px",
869
+ position: "relative"
870
+ } })), it = s(Ye)(() => ({ color: `${v.tertiary()} !important` })), at = ({ label: e, value: t, checked: n, onChange: r }) => /* @__PURE__ */ U(rt, {
871
+ value: t,
872
+ control: /* @__PURE__ */ U(it, {
873
+ checked: n,
874
+ onChange: r
875
+ }),
876
+ label: e
877
+ });
878
+ at.propTypes = {
879
+ label: q.default.string,
880
+ value: q.default.string,
881
+ checked: q.default.bool,
882
+ onChange: q.default.func
883
+ };
884
+ //#endregion
885
+ //#region ../../lib-react/config-ui/dist/feedback-config/group.js
886
+ var ot = s("div")(() => ({
887
+ display: "flex",
888
+ alignItems: "center"
889
+ })), st = s("div")(() => ({
890
+ display: "flex",
891
+ alignItems: "center"
892
+ })), ct = s(at)(({ theme: e }) => ({ "& .MuiFormControlLabel-label": { fontSize: e.typography.fontSize - 2 } })), lt = (e) => {
893
+ let { feedbackLabels: t, value: n, className: r, onChange: i, keys: a } = e;
894
+ return /* @__PURE__ */ U(ot, {
895
+ className: r,
896
+ children: a.map((e) => /* @__PURE__ */ U(st, { children: /* @__PURE__ */ U(ct, {
897
+ value: e,
898
+ checked: n === e,
899
+ onChange: (e) => i(e.currentTarget.value),
900
+ label: t[e]
901
+ }) }, e))
902
+ });
903
+ };
904
+ lt.propTypes = {
905
+ className: q.default.string,
906
+ feedbackLabels: q.default.object.isRequired,
907
+ value: q.default.string.isRequired,
908
+ keys: q.default.arrayOf(q.default.string),
909
+ onChange: q.default.func
910
+ };
911
+ //#endregion
912
+ //#region ../../lib-react/config-ui/dist/feedback-config/feedback-selector.js
913
+ function J(e) {
914
+ return typeof e == "function" || typeof e == "object" && !!e && typeof e.$$typeof == "symbol";
915
+ }
916
+ function ut(e, t) {
917
+ return !e || J(e) ? e : J(e.default) ? e.default : t && J(e[t]) ? e[t] : t && J(e[t]?.default) ? e[t].default : e;
918
+ }
919
+ var dt = ut(D, "InputContainer") || ut(mt.InputContainer, "InputContainer"), ft = N, pt = ft.default, mt = pt && typeof pt == "object" ? pt : ft, ht = s(F)(({ theme: e }) => ({ fontFamily: e.typography.fontFamily })), gt = {
920
+ default: "Simple Feedback",
921
+ none: "No Feedback",
922
+ custom: "Customized Feedback"
923
+ }, _t = s("div")(({ theme: e }) => ({ marginBottom: e.spacing(1) })), vt = s(dt)(() => ({ paddingBottom: 0 })), yt = s("div")(({ theme: e }) => ({
924
+ marginTop: "0px",
925
+ background: v.backgroundDark(),
926
+ padding: 0,
927
+ marginBottom: e.spacing(2),
928
+ borderRadius: "4px"
929
+ })), bt = s("div")(({ theme: e }) => ({
930
+ marginTop: "0px",
931
+ background: v.backgroundDark(),
932
+ padding: e.spacing(2),
933
+ marginBottom: e.spacing(2),
934
+ borderRadius: "4px",
935
+ fontFamily: e.typography.fontFamily,
936
+ cursor: "default"
937
+ })), xt = s(lt)(({ theme: e }) => ({ paddingTop: e.spacing(1) })), St = {
938
+ type: q.default.oneOf([
939
+ "default",
940
+ "custom",
941
+ "none"
942
+ ]),
943
+ default: q.default.string,
944
+ custom: q.default.string
945
+ }, Ct = class extends H.Component {
946
+ static propTypes = {
947
+ keys: q.default.arrayOf(q.default.string),
948
+ label: q.default.string.isRequired,
949
+ feedback: q.default.shape(St).isRequired,
950
+ onChange: q.default.func.isRequired,
951
+ toolbarOpts: q.default.object,
952
+ mathMlOptions: q.default.object
953
+ };
954
+ changeType = (e) => {
955
+ let { onChange: t, feedback: n } = this.props;
956
+ t({
957
+ ...n,
958
+ type: e
959
+ });
960
+ };
961
+ changeCustom = (e) => {
962
+ let { onChange: t, feedback: n } = this.props;
963
+ t({
964
+ ...n,
965
+ type: "custom",
966
+ custom: e
967
+ });
968
+ };
969
+ render() {
970
+ let { keys: e, label: t, feedback: n, toolbarOpts: r, mathMlOptions: i = {} } = this.props;
971
+ return /* @__PURE__ */ W(_t, { children: [
972
+ /* @__PURE__ */ U(vt, {
973
+ label: t,
974
+ extraClasses: { label: { transform: "translateY(-20%)" } },
975
+ children: /* @__PURE__ */ U(xt, {
976
+ keys: e || Object.keys(gt),
977
+ label: t,
978
+ value: n.type,
979
+ onChange: this.changeType,
980
+ feedbackLabels: gt
981
+ })
982
+ }),
983
+ n.type === "custom" && /* @__PURE__ */ U(yt, { children: /* @__PURE__ */ U(ht, {
984
+ onChange: this.changeCustom,
985
+ markup: n.custom || "",
986
+ toolbarOpts: r,
987
+ languageCharactersProps: [{ language: "spanish" }, { language: "special" }],
988
+ mathMlOptions: i
989
+ }) }),
990
+ n.type === "default" && /* @__PURE__ */ W(bt, { children: [" ", n.default] })
991
+ ] });
992
+ }
993
+ }, wt = s(R)(() => ({})), Tt = class extends H.Component {
994
+ static propTypes = {
995
+ className: q.default.string,
996
+ contentClassName: q.default.string,
997
+ contentStyle: q.default.object,
998
+ children: q.default.oneOfType([q.default.arrayOf(q.default.node), q.default.node]).isRequired
999
+ };
1000
+ constructor(e) {
1001
+ super(e), this.state = { value: 0 };
1002
+ }
1003
+ handleChange = (e, t) => {
1004
+ this.setState({ value: t });
1005
+ };
1006
+ render() {
1007
+ let { value: e } = this.state, { children: t, className: n, contentClassName: r, contentStyle: i = {} } = this.props;
1008
+ return /* @__PURE__ */ W("div", {
1009
+ className: n,
1010
+ children: [/* @__PURE__ */ U(A, {
1011
+ indicatorColor: "primary",
1012
+ value: e,
1013
+ onChange: this.handleChange,
1014
+ children: H.Children.map(t, (e, t) => e && e.props.title ? /* @__PURE__ */ U(wt, { label: e.props.title }, t) : null)
1015
+ }), /* @__PURE__ */ U("div", {
1016
+ className: r,
1017
+ style: i,
1018
+ children: t[e]
1019
+ })]
1020
+ });
1021
+ }
1022
+ }, Et = s(Ee)(({ theme: e, mini: t }) => ({
1023
+ margin: 0,
1024
+ marginLeft: 0,
1025
+ padding: 0,
1026
+ "& .MuiFormControlLabel-label": {
1027
+ fontSize: e.typography.fontSize - 1,
1028
+ transform: "translate(-4%, 2%)",
1029
+ color: "rgba(0,0,0,1.0)",
1030
+ ...t && {
1031
+ marginLeft: e.spacing(1),
1032
+ color: _[700],
1033
+ fontSize: e.typography.fontSize - 3
1034
+ }
1035
+ }
1036
+ })), Dt = s(xe)(({ theme: e, mini: t, error: n }) => ({
1037
+ color: `${v.tertiary()} !important`,
1038
+ ...t && {
1039
+ margin: 0,
1040
+ padding: 0,
1041
+ width: e.spacing(3),
1042
+ height: e.spacing(3)
1043
+ },
1044
+ ...n && { color: `${e.palette.error.main} !important` }
1045
+ })), Ot = ({ mini: e, checked: t, onChange: n, value: r, label: i, error: a }) => /* @__PURE__ */ U(Et, {
1046
+ mini: e,
1047
+ control: /* @__PURE__ */ U(Dt, {
1048
+ checked: t,
1049
+ onChange: n,
1050
+ value: r,
1051
+ mini: e,
1052
+ error: a
1053
+ }),
1054
+ label: i
1055
+ });
1056
+ Ot.propTypes = {
1057
+ mini: q.default.bool,
1058
+ checked: q.default.bool.isRequired,
1059
+ onChange: q.default.func.isRequired,
1060
+ value: q.default.string,
1061
+ label: q.default.string.isRequired,
1062
+ error: q.default.bool
1063
+ }, Ot.defaultProps = {
1064
+ value: "",
1065
+ mini: !1,
1066
+ error: !1
1067
+ };
1068
+ //#endregion
1069
+ //#region ../../lib-react/config-ui/dist/number-text-field.js
1070
+ var kt = /* @__PURE__ */ e(t(), 1), At = (0, kt.default)("@pie-lib:config-ui:number-text-field"), jt = s(w)(({ theme: e }) => ({
1071
+ marginRight: e.spacing(1),
1072
+ "& .MuiInputLabel-root": {
1073
+ width: "auto",
1074
+ minWidth: "max-content",
1075
+ maxWidth: "none",
1076
+ whiteSpace: "nowrap",
1077
+ overflow: "visible",
1078
+ transform: "translate(0, 8px) scale(0.75)",
1079
+ transformOrigin: "top left",
1080
+ position: "relative"
1081
+ },
1082
+ "& .MuiInputBase-root, & .MuiInput-root, & .MuiFilledInput-root, & .MuiOutlinedInput-root": {
1083
+ height: "auto",
1084
+ minHeight: "auto",
1085
+ marginTop: 0
1086
+ },
1087
+ "& .MuiInputBase-input": {
1088
+ height: "auto",
1089
+ minHeight: "auto",
1090
+ padding: "6px 0 7px"
1091
+ }
1092
+ })), Mt = (e, t) => {
1093
+ if (!c(e) && !c(t)) return 0;
1094
+ if (!c(e) && c(t)) return t;
1095
+ if (c(e)) return e;
1096
+ }, Nt = class extends H.Component {
1097
+ static propTypes = {
1098
+ disabled: q.default.bool,
1099
+ className: q.default.string,
1100
+ inputClassName: q.default.string,
1101
+ onChange: q.default.func.isRequired,
1102
+ value: q.default.number,
1103
+ min: q.default.number,
1104
+ max: q.default.number,
1105
+ label: q.default.string,
1106
+ suffix: q.default.string,
1107
+ showErrorWhenOutsideRange: q.default.bool,
1108
+ disableUnderline: q.default.bool,
1109
+ variant: q.default.string
1110
+ };
1111
+ static defaultProps = { showErrorWhenOutsideRange: !1 };
1112
+ constructor(e) {
1113
+ super(e);
1114
+ let t = this.clamp(e.value);
1115
+ this.state = { value: t }, t !== e.value && this.props.onChange({}, t), this.onChange = this.onChange.bind(this);
1116
+ }
1117
+ UNSAFE_componentWillReceiveProps(e) {
1118
+ let t = this.clamp(e.value, e.min, e.max);
1119
+ this.setState({ value: t });
1120
+ }
1121
+ clamp(e, t = this.props.min, n = this.props.max) {
1122
+ return c(e) ? (c(n) && (e = Math.min(e, n)), c(t) && (e = Math.max(e, t)), e) : Mt(t, n);
1123
+ }
1124
+ onBlur = (e) => {
1125
+ let t = e.target.value, n = parseFloat(t);
1126
+ At("rawNumber: ", n);
1127
+ let r = this.clamp(n);
1128
+ At("number: ", r), r !== this.state.value && (At("trigger update..."), this.setState({ value: r.toString() }, () => {
1129
+ this.props.onChange(e, r);
1130
+ }));
1131
+ };
1132
+ onChange(e) {
1133
+ let t = e.target.value;
1134
+ this.setState({ value: t });
1135
+ }
1136
+ errorMessage = () => {
1137
+ let { min: e, max: t } = this.props;
1138
+ if (e && t) return `The value must be between ${e} and ${t}`;
1139
+ if (e) return `The value must be greater than ${e}`;
1140
+ if (t) return `The value must be less than ${t}`;
1141
+ };
1142
+ getError = () => {
1143
+ let { value: e } = this.state, t = parseFloat(e);
1144
+ if (this.clamp(t) !== t) return this.errorMessage();
1145
+ };
1146
+ render() {
1147
+ 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();
1148
+ return /* @__PURE__ */ U(jt, {
1149
+ variant: s ? "filled" : l || "standard",
1150
+ inputRef: (e) => {
1151
+ this.inputRef = e;
1152
+ },
1153
+ disabled: n,
1154
+ label: t,
1155
+ InputLabelProps: { shrink: !0 },
1156
+ value: this.state.value,
1157
+ error: !!u,
1158
+ helperText: u,
1159
+ onChange: this.onChange,
1160
+ onBlur: this.onBlur,
1161
+ onKeyDown: (e) => {
1162
+ e.key === "Enter" && this.inputRef && this.inputRef.blur();
1163
+ },
1164
+ type: "number",
1165
+ className: e,
1166
+ slotProps: { input: {
1167
+ endAdornment: r && /* @__PURE__ */ U(Ne, {
1168
+ position: "end",
1169
+ children: r
1170
+ }),
1171
+ className: o,
1172
+ inputProps: {
1173
+ min: i,
1174
+ max: a
1175
+ }
1176
+ } },
1177
+ margin: "normal"
1178
+ });
1179
+ }
1180
+ };
1181
+ //#endregion
1182
+ //#region ../../lib-react/config-ui/dist/two-choice.js
1183
+ function Y(e) {
1184
+ return typeof e == "function" || typeof e == "object" && !!e && typeof e.$$typeof == "symbol";
1185
+ }
1186
+ function Pt(e, t) {
1187
+ return !e || Y(e) ? e : Y(e.default) ? e.default : t && Y(e[t]) ? e[t] : t && Y(e[t]?.default) ? e[t].default : e;
1188
+ }
1189
+ var Ft = Pt(D, "InputContainer") || Pt(Rt.InputContainer, "InputContainer"), It = N, Lt = It.default, Rt = Lt && typeof Lt == "object" ? Lt : It, zt = s("div")(({ theme: e, direction: t }) => ({
1190
+ display: "flex",
1191
+ flexWrap: "wrap",
1192
+ paddingLeft: 0,
1193
+ marginTop: e.spacing(1),
1194
+ ...t === "vertical" && { flexDirection: "column" }
1195
+ })), Bt = class extends H.Component {
1196
+ static propTypes = {
1197
+ header: q.default.string.isRequired,
1198
+ className: q.default.string,
1199
+ customLabel: q.default.func,
1200
+ opts: q.default.array.isRequired,
1201
+ value: q.default.string,
1202
+ onChange: q.default.func.isRequired,
1203
+ direction: q.default.oneOf(["horizontal", "vertical"])
1204
+ };
1205
+ handleChange = (e) => {
1206
+ this.props.onChange(e.currentTarget.value);
1207
+ };
1208
+ render() {
1209
+ let { header: e, className: t, customLabel: n, opts: r, value: i, direction: a } = this.props, o = r.map((e) => typeof e == "string" ? {
1210
+ label: e,
1211
+ value: e
1212
+ } : e), s = n || at;
1213
+ return /* @__PURE__ */ U(Ft, {
1214
+ label: e,
1215
+ className: t,
1216
+ children: /* @__PURE__ */ U(zt, {
1217
+ direction: a,
1218
+ children: o.map((e, t) => /* @__PURE__ */ U(s, {
1219
+ value: e.value,
1220
+ checked: e.value === i,
1221
+ onChange: this.handleChange,
1222
+ label: e.label
1223
+ }, t))
1224
+ })
1225
+ });
1226
+ }
1227
+ }, Vt = q.default.shape({
1228
+ label: q.default.string,
1229
+ value: q.default.string
1230
+ });
1231
+ (class extends H.Component {
1232
+ static propTypes = {
1233
+ header: q.default.string.isRequired,
1234
+ value: q.default.string.isRequired,
1235
+ onChange: q.default.func.isRequired,
1236
+ one: q.default.oneOfType([Vt, q.default.string]),
1237
+ two: q.default.oneOfType([Vt, q.default.string]),
1238
+ className: q.default.string,
1239
+ customLabel: q.default.func
1240
+ };
1241
+ render() {
1242
+ let { one: e, two: t, header: n, className: r, customLabel: i, value: a, onChange: o } = this.props;
1243
+ return /* @__PURE__ */ U(Bt, {
1244
+ customLabel: i,
1245
+ header: n,
1246
+ className: r,
1247
+ opts: [e, t],
1248
+ value: a,
1249
+ onChange: o
1250
+ });
1251
+ }
1252
+ });
1253
+ //#endregion
1254
+ //#region ../../lib-react/config-ui/dist/_virtual/_rolldown/runtime.js
1255
+ var Ht = Object.defineProperty, Ut = (e, t) => {
1256
+ let n = {};
1257
+ for (var r in e) Ht(n, r, {
1258
+ get: e[r],
1259
+ enumerable: !0
1260
+ });
1261
+ return t || Ht(n, Symbol.toStringTag, { value: "Module" }), n;
1262
+ }, Wt = s("div")(() => ({
1263
+ display: "flex",
1264
+ flexDirection: "column",
1265
+ position: "relative"
1266
+ })), Gt = s("div")(() => ({
1267
+ display: "flex",
1268
+ justifyContent: "space-between"
1269
+ })), Kt = s("div")(({ theme: e }) => ({ padding: `${e.spacing(2)} 0` })), qt = s("div")(() => ({ flex: "1" })), Jt = s("div")(({ theme: e }) => ({ marginLeft: e.spacing(2) })), Yt = class extends H.Component {
1270
+ static propTypes = {
1271
+ mode: q.default.oneOf(["tabbed", "inline"]),
1272
+ secondary: q.default.oneOfType([q.default.arrayOf(q.default.node), q.default.node]),
1273
+ children: q.default.oneOfType([q.default.arrayOf(q.default.node), q.default.node]),
1274
+ dimensions: q.default.object
1275
+ };
1276
+ getConfiguration = () => {
1277
+ let { secondary: e } = this.props;
1278
+ return e?.props?.configuration || e?.props?.children?.props?.configuration || void 0;
1279
+ };
1280
+ render() {
1281
+ let { mode: e, secondary: t, children: n, dimensions: r } = this.props, { minHeight: i, minWidth: a, maxHeight: o, maxWidth: s } = r || {}, c = this.getConfiguration(), l = Object.entries(c || {}).some(([, e]) => !!e?.settings);
1282
+ if (!l) try {
1283
+ l = JSON.stringify(c)?.match(/settings":true/)?.length;
1284
+ } catch (e) {
1285
+ console.log(e.toString());
1286
+ }
1287
+ return /* @__PURE__ */ W(Wt, {
1288
+ style: {
1289
+ minHeight: i,
1290
+ minWidth: a,
1291
+ maxHeight: o,
1292
+ maxWidth: s
1293
+ },
1294
+ children: [
1295
+ e === "inline" && /* @__PURE__ */ W(Gt, { children: [/* @__PURE__ */ U(qt, {
1296
+ className: "design-container",
1297
+ children: n
1298
+ }), l && /* @__PURE__ */ U(Jt, {
1299
+ className: "settings-container",
1300
+ children: t
1301
+ })] }),
1302
+ e === "tabbed" && l && /* @__PURE__ */ W(Tt, {
1303
+ onChange: this.onTabsChange,
1304
+ contentClassName: "content-container",
1305
+ indicatorColor: "primary",
1306
+ children: [/* @__PURE__ */ U(Kt, {
1307
+ title: "Design",
1308
+ className: "design-container",
1309
+ children: n
1310
+ }), /* @__PURE__ */ U(Kt, {
1311
+ title: "Settings",
1312
+ className: "settings-container",
1313
+ children: t
1314
+ })]
1315
+ }),
1316
+ e === "tabbed" && !l && /* @__PURE__ */ U(Kt, {
1317
+ className: "design-container",
1318
+ children: n
1319
+ })
1320
+ ]
1321
+ });
1322
+ }
1323
+ };
1324
+ //#endregion
1325
+ //#region ../../lib-react/config-ui/dist/node_modules/.bun/@babel_runtime@7.29.7/node_modules/@babel/runtime/helpers/esm/extends.js
1326
+ function Xt() {
1327
+ return Xt = Object.assign ? Object.assign.bind() : function(e) {
1328
+ for (var t = 1; t < arguments.length; t++) {
1329
+ var n = arguments[t];
1330
+ for (var r in n) ({}).hasOwnProperty.call(n, r) && (e[r] = n[r]);
1331
+ }
1332
+ return e;
1333
+ }, Xt.apply(null, arguments);
1334
+ }
1335
+ //#endregion
1336
+ //#region ../../lib-react/config-ui/dist/node_modules/.bun/@babel_runtime@7.29.7/node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js
1337
+ function Zt(e, t) {
1338
+ if (e == null) return {};
1339
+ var n = {};
1340
+ for (var r in e) if ({}.hasOwnProperty.call(e, r)) {
1341
+ if (t.indexOf(r) !== -1) continue;
1342
+ n[r] = e[r];
1343
+ }
1344
+ return n;
1345
+ }
1346
+ //#endregion
1347
+ //#region ../../lib-react/config-ui/dist/node_modules/.bun/@babel_runtime@7.29.7/node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js
1348
+ function Qt(e, t) {
1349
+ return Qt = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(e, t) {
1350
+ return e.__proto__ = t, e;
1351
+ }, Qt(e, t);
1352
+ }
1353
+ //#endregion
1354
+ //#region ../../lib-react/config-ui/dist/node_modules/.bun/@babel_runtime@7.29.7/node_modules/@babel/runtime/helpers/esm/inheritsLoose.js
1355
+ function $t(e, t) {
1356
+ e.prototype = Object.create(t.prototype), e.prototype.constructor = e, Qt(e, t);
1357
+ }
1358
+ //#endregion
1359
+ //#region ../../lib-react/config-ui/dist/node_modules/.bun/resize-observer-polyfill@1.5.1/node_modules/resize-observer-polyfill/dist/ResizeObserver.es.js
1360
+ var en = (function() {
1361
+ if (typeof Map < "u") return Map;
1362
+ function e(e, t) {
1363
+ var n = -1;
1364
+ return e.some(function(e, r) {
1365
+ return e[0] === t ? (n = r, !0) : !1;
1366
+ }), n;
1367
+ }
1368
+ return function() {
1369
+ function t() {
1370
+ this.__entries__ = [];
1371
+ }
1372
+ return Object.defineProperty(t.prototype, "size", {
1373
+ get: function() {
1374
+ return this.__entries__.length;
1375
+ },
1376
+ enumerable: !0,
1377
+ configurable: !0
1378
+ }), t.prototype.get = function(t) {
1379
+ var n = e(this.__entries__, t), r = this.__entries__[n];
1380
+ return r && r[1];
1381
+ }, t.prototype.set = function(t, n) {
1382
+ var r = e(this.__entries__, t);
1383
+ ~r ? this.__entries__[r][1] = n : this.__entries__.push([t, n]);
1384
+ }, t.prototype.delete = function(t) {
1385
+ var n = this.__entries__, r = e(n, t);
1386
+ ~r && n.splice(r, 1);
1387
+ }, t.prototype.has = function(t) {
1388
+ return !!~e(this.__entries__, t);
1389
+ }, t.prototype.clear = function() {
1390
+ this.__entries__.splice(0);
1391
+ }, t.prototype.forEach = function(e, t) {
1392
+ t === void 0 && (t = null);
1393
+ for (var n = 0, r = this.__entries__; n < r.length; n++) {
1394
+ var i = r[n];
1395
+ e.call(t, i[1], i[0]);
1396
+ }
1397
+ }, t;
1398
+ }();
1399
+ })(), tn = typeof window < "u" && typeof document < "u" && window.document === document, X = (function() {
1400
+ 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")();
1401
+ })(), nn = (function() {
1402
+ return typeof requestAnimationFrame == "function" ? requestAnimationFrame.bind(X) : function(e) {
1403
+ return setTimeout(function() {
1404
+ return e(Date.now());
1405
+ }, 1e3 / 60);
1406
+ };
1407
+ })(), rn = 2;
1408
+ function an(e, t) {
1409
+ var n = !1, r = !1, i = 0;
1410
+ function a() {
1411
+ n && (n = !1, e()), r && s();
1412
+ }
1413
+ function o() {
1414
+ nn(a);
1415
+ }
1416
+ function s() {
1417
+ var e = Date.now();
1418
+ if (n) {
1419
+ if (e - i < rn) return;
1420
+ r = !0;
1421
+ } else n = !0, r = !1, setTimeout(o, t);
1422
+ i = e;
1423
+ }
1424
+ return s;
1425
+ }
1426
+ var on = 20, sn = [
1427
+ "top",
1428
+ "right",
1429
+ "bottom",
1430
+ "left",
1431
+ "width",
1432
+ "height",
1433
+ "size",
1434
+ "weight"
1435
+ ], cn = typeof MutationObserver < "u", ln = function() {
1436
+ function e() {
1437
+ this.connected_ = !1, this.mutationEventsAdded_ = !1, this.mutationsObserver_ = null, this.observers_ = [], this.onTransitionEnd_ = this.onTransitionEnd_.bind(this), this.refresh = an(this.refresh.bind(this), on);
1438
+ }
1439
+ return e.prototype.addObserver = function(e) {
1440
+ ~this.observers_.indexOf(e) || this.observers_.push(e), this.connected_ || this.connect_();
1441
+ }, e.prototype.removeObserver = function(e) {
1442
+ var t = this.observers_, n = t.indexOf(e);
1443
+ ~n && t.splice(n, 1), !t.length && this.connected_ && this.disconnect_();
1444
+ }, e.prototype.refresh = function() {
1445
+ this.updateObservers_() && this.refresh();
1446
+ }, e.prototype.updateObservers_ = function() {
1447
+ var e = this.observers_.filter(function(e) {
1448
+ return e.gatherActive(), e.hasActive();
1449
+ });
1450
+ return e.forEach(function(e) {
1451
+ return e.broadcastActive();
1452
+ }), e.length > 0;
1453
+ }, e.prototype.connect_ = function() {
1454
+ !tn || this.connected_ || (document.addEventListener("transitionend", this.onTransitionEnd_), window.addEventListener("resize", this.refresh), cn ? (this.mutationsObserver_ = new MutationObserver(this.refresh), this.mutationsObserver_.observe(document, {
1455
+ attributes: !0,
1456
+ childList: !0,
1457
+ characterData: !0,
1458
+ subtree: !0
1459
+ })) : (document.addEventListener("DOMSubtreeModified", this.refresh), this.mutationEventsAdded_ = !0), this.connected_ = !0);
1460
+ }, e.prototype.disconnect_ = function() {
1461
+ !tn || !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);
1462
+ }, e.prototype.onTransitionEnd_ = function(e) {
1463
+ var t = e.propertyName, n = t === void 0 ? "" : t;
1464
+ sn.some(function(e) {
1465
+ return !!~n.indexOf(e);
1466
+ }) && this.refresh();
1467
+ }, e.getInstance = function() {
1468
+ return this.instance_ ||= new e(), this.instance_;
1469
+ }, e.instance_ = null, e;
1470
+ }(), un = (function(e, t) {
1471
+ for (var n = 0, r = Object.keys(t); n < r.length; n++) {
1472
+ var i = r[n];
1473
+ Object.defineProperty(e, i, {
1474
+ value: t[i],
1475
+ enumerable: !1,
1476
+ writable: !1,
1477
+ configurable: !0
1478
+ });
1479
+ }
1480
+ return e;
1481
+ }), Z = (function(e) {
1482
+ return e && e.ownerDocument && e.ownerDocument.defaultView || X;
1483
+ }), dn = xn(0, 0, 0, 0);
1484
+ function fn(e) {
1485
+ return parseFloat(e) || 0;
1486
+ }
1487
+ function pn(e) {
1488
+ return [...arguments].slice(1).reduce(function(t, n) {
1489
+ var r = e["border-" + n + "-width"];
1490
+ return t + fn(r);
1491
+ }, 0);
1492
+ }
1493
+ function mn(e) {
1494
+ for (var t = [
1495
+ "top",
1496
+ "right",
1497
+ "bottom",
1498
+ "left"
1499
+ ], n = {}, r = 0, i = t; r < i.length; r++) {
1500
+ var a = i[r], o = e["padding-" + a];
1501
+ n[a] = fn(o);
1502
+ }
1503
+ return n;
1504
+ }
1505
+ function hn(e) {
1506
+ var t = e.getBBox();
1507
+ return xn(0, 0, t.width, t.height);
1508
+ }
1509
+ function gn(e) {
1510
+ var t = e.clientWidth, n = e.clientHeight;
1511
+ if (!t && !n) return dn;
1512
+ var r = Z(e).getComputedStyle(e), i = mn(r), a = i.left + i.right, o = i.top + i.bottom, s = fn(r.width), c = fn(r.height);
1513
+ if (r.boxSizing === "border-box" && (Math.round(s + a) !== t && (s -= pn(r, "left", "right") + a), Math.round(c + o) !== n && (c -= pn(r, "top", "bottom") + o)), !vn(e)) {
1514
+ var l = Math.round(s + a) - t, u = Math.round(c + o) - n;
1515
+ Math.abs(l) !== 1 && (s -= l), Math.abs(u) !== 1 && (c -= u);
1516
+ }
1517
+ return xn(i.left, i.top, s, c);
1518
+ }
1519
+ var _n = (function() {
1520
+ return typeof SVGGraphicsElement < "u" ? function(e) {
1521
+ return e instanceof Z(e).SVGGraphicsElement;
1522
+ } : function(e) {
1523
+ return e instanceof Z(e).SVGElement && typeof e.getBBox == "function";
1524
+ };
1525
+ })();
1526
+ function vn(e) {
1527
+ return e === Z(e).document.documentElement;
1528
+ }
1529
+ function yn(e) {
1530
+ return tn ? _n(e) ? hn(e) : gn(e) : dn;
1531
+ }
1532
+ function bn(e) {
1533
+ var t = e.x, n = e.y, r = e.width, i = e.height, a = Object.create((typeof DOMRectReadOnly < "u" ? DOMRectReadOnly : Object).prototype);
1534
+ return un(a, {
1535
+ x: t,
1536
+ y: n,
1537
+ width: r,
1538
+ height: i,
1539
+ top: n,
1540
+ right: t + r,
1541
+ bottom: i + n,
1542
+ left: t
1543
+ }), a;
1544
+ }
1545
+ function xn(e, t, n, r) {
1546
+ return {
1547
+ x: e,
1548
+ y: t,
1549
+ width: n,
1550
+ height: r
1551
+ };
1552
+ }
1553
+ var Sn = function() {
1554
+ function e(e) {
1555
+ this.broadcastWidth = 0, this.broadcastHeight = 0, this.contentRect_ = xn(0, 0, 0, 0), this.target = e;
1556
+ }
1557
+ return e.prototype.isActive = function() {
1558
+ var e = yn(this.target);
1559
+ return this.contentRect_ = e, e.width !== this.broadcastWidth || e.height !== this.broadcastHeight;
1560
+ }, e.prototype.broadcastRect = function() {
1561
+ var e = this.contentRect_;
1562
+ return this.broadcastWidth = e.width, this.broadcastHeight = e.height, e;
1563
+ }, e;
1564
+ }(), Cn = function() {
1565
+ function e(e, t) {
1566
+ var n = bn(t);
1567
+ un(this, {
1568
+ target: e,
1569
+ contentRect: n
1570
+ });
1571
+ }
1572
+ return e;
1573
+ }(), wn = function() {
1574
+ function e(e, t, n) {
1575
+ if (this.activeObservations_ = [], this.observations_ = new en(), typeof e != "function") throw TypeError("The callback provided as parameter 1 is not a function.");
1576
+ this.callback_ = e, this.controller_ = t, this.callbackCtx_ = n;
1577
+ }
1578
+ return e.prototype.observe = function(e) {
1579
+ if (!arguments.length) throw TypeError("1 argument required, but only 0 present.");
1580
+ if (!(typeof Element > "u" || !(Element instanceof Object))) {
1581
+ if (!(e instanceof Z(e).Element)) throw TypeError("parameter 1 is not of type \"Element\".");
1582
+ var t = this.observations_;
1583
+ t.has(e) || (t.set(e, new Sn(e)), this.controller_.addObserver(this), this.controller_.refresh());
1584
+ }
1585
+ }, e.prototype.unobserve = function(e) {
1586
+ if (!arguments.length) throw TypeError("1 argument required, but only 0 present.");
1587
+ if (!(typeof Element > "u" || !(Element instanceof Object))) {
1588
+ if (!(e instanceof Z(e).Element)) throw TypeError("parameter 1 is not of type \"Element\".");
1589
+ var t = this.observations_;
1590
+ t.has(e) && (t.delete(e), t.size || this.controller_.removeObserver(this));
1591
+ }
1592
+ }, e.prototype.disconnect = function() {
1593
+ this.clearActive(), this.observations_.clear(), this.controller_.removeObserver(this);
1594
+ }, e.prototype.gatherActive = function() {
1595
+ var e = this;
1596
+ this.clearActive(), this.observations_.forEach(function(t) {
1597
+ t.isActive() && e.activeObservations_.push(t);
1598
+ });
1599
+ }, e.prototype.broadcastActive = function() {
1600
+ if (this.hasActive()) {
1601
+ var e = this.callbackCtx_, t = this.activeObservations_.map(function(e) {
1602
+ return new Cn(e.target, e.broadcastRect());
1603
+ });
1604
+ this.callback_.call(e, t, e), this.clearActive();
1605
+ }
1606
+ }, e.prototype.clearActive = function() {
1607
+ this.activeObservations_.splice(0);
1608
+ }, e.prototype.hasActive = function() {
1609
+ return this.activeObservations_.length > 0;
1610
+ }, e;
1611
+ }(), Tn = typeof WeakMap < "u" ? /* @__PURE__ */ new WeakMap() : new en(), En = function() {
1612
+ function e(t) {
1613
+ if (!(this instanceof e)) throw TypeError("Cannot call a class as a function.");
1614
+ if (!arguments.length) throw TypeError("1 argument required, but only 0 present.");
1615
+ var n = new wn(t, ln.getInstance(), this);
1616
+ Tn.set(this, n);
1617
+ }
1618
+ return e;
1619
+ }();
1620
+ [
1621
+ "observe",
1622
+ "unobserve",
1623
+ "disconnect"
1624
+ ].forEach(function(e) {
1625
+ En.prototype[e] = function() {
1626
+ var t;
1627
+ return (t = Tn.get(this))[e].apply(t, arguments);
1628
+ };
1629
+ });
1630
+ var Dn = (function() {
1631
+ return X.ResizeObserver === void 0 ? En : X.ResizeObserver;
1632
+ })(), On = [
1633
+ "client",
1634
+ "offset",
1635
+ "scroll",
1636
+ "bounds",
1637
+ "margin"
1638
+ ];
1639
+ function kn(e) {
1640
+ var t = [];
1641
+ return On.forEach(function(n) {
1642
+ e[n] && t.push(n);
1643
+ }), t;
1644
+ }
1645
+ function An(e, t) {
1646
+ var n = {};
1647
+ if (t.indexOf("client") > -1 && (n.client = {
1648
+ top: e.clientTop,
1649
+ left: e.clientLeft,
1650
+ width: e.clientWidth,
1651
+ height: e.clientHeight
1652
+ }), t.indexOf("offset") > -1 && (n.offset = {
1653
+ top: e.offsetTop,
1654
+ left: e.offsetLeft,
1655
+ width: e.offsetWidth,
1656
+ height: e.offsetHeight
1657
+ }), t.indexOf("scroll") > -1 && (n.scroll = {
1658
+ top: e.scrollTop,
1659
+ left: e.scrollLeft,
1660
+ width: e.scrollWidth,
1661
+ height: e.scrollHeight
1662
+ }), t.indexOf("bounds") > -1) {
1663
+ var r = e.getBoundingClientRect();
1664
+ n.bounds = {
1665
+ top: r.top,
1666
+ right: r.right,
1667
+ bottom: r.bottom,
1668
+ left: r.left,
1669
+ width: r.width,
1670
+ height: r.height
1671
+ };
1672
+ }
1673
+ if (t.indexOf("margin") > -1) {
1674
+ var i = getComputedStyle(e);
1675
+ n.margin = {
1676
+ top: i ? parseInt(i.marginTop) : 0,
1677
+ right: i ? parseInt(i.marginRight) : 0,
1678
+ bottom: i ? parseInt(i.marginBottom) : 0,
1679
+ left: i ? parseInt(i.marginLeft) : 0
1680
+ };
1681
+ }
1682
+ return n;
1683
+ }
1684
+ function jn(e) {
1685
+ return e && e.ownerDocument && e.ownerDocument.defaultView || window;
1686
+ }
1687
+ function Mn(e) {
1688
+ return function(t) {
1689
+ var n, r;
1690
+ return r = n = /*#__PURE__*/ function(n) {
1691
+ $t(r, n);
1692
+ function r() {
1693
+ var t, r = [...arguments];
1694
+ return t = n.call.apply(n, [this].concat(r)) || this, t.state = { contentRect: {
1695
+ entry: {},
1696
+ client: {},
1697
+ offset: {},
1698
+ scroll: {},
1699
+ bounds: {},
1700
+ margin: {}
1701
+ } }, t._animationFrameID = null, t._resizeObserver = null, t._node = null, t._window = null, t.measure = function(n) {
1702
+ var r = An(t._node, e || kn(t.props));
1703
+ n && (r.entry = n[0].contentRect), t._animationFrameID = t._window.requestAnimationFrame(function() {
1704
+ t._resizeObserver !== null && (t.setState({ contentRect: r }), typeof t.props.onResize == "function" && t.props.onResize(r));
1705
+ });
1706
+ }, t._handleRef = function(e) {
1707
+ t._resizeObserver !== null && t._node !== null && t._resizeObserver.unobserve(t._node), t._node = e, t._window = jn(t._node);
1708
+ var n = t.props.innerRef;
1709
+ n && (typeof n == "function" ? n(t._node) : n.current = t._node), t._resizeObserver !== null && t._node !== null && t._resizeObserver.observe(t._node);
1710
+ }, t;
1711
+ }
1712
+ var i = r.prototype;
1713
+ return i.componentDidMount = function() {
1714
+ this._resizeObserver = this._window !== null && this._window.ResizeObserver ? new this._window.ResizeObserver(this.measure) : new Dn(this.measure), this._node !== null && (this._resizeObserver.observe(this._node), typeof this.props.onResize == "function" && this.props.onResize(An(this._node, e || kn(this.props))));
1715
+ }, i.componentWillUnmount = function() {
1716
+ this._window !== null && this._window.cancelAnimationFrame(this._animationFrameID), this._resizeObserver !== null && (this._resizeObserver.disconnect(), this._resizeObserver = null);
1717
+ }, i.render = function() {
1718
+ var e = this.props;
1719
+ return e.innerRef, e.onResize, re(t, Xt({}, Zt(e, ["innerRef", "onResize"]), {
1720
+ measureRef: this._handleRef,
1721
+ measure: this.measure,
1722
+ contentRect: this.state.contentRect
1723
+ }));
1724
+ }, r;
1725
+ }(ne), n.propTypes = {
1726
+ client: q.default.bool,
1727
+ offset: q.default.bool,
1728
+ scroll: q.default.bool,
1729
+ bounds: q.default.bool,
1730
+ margin: q.default.bool,
1731
+ innerRef: q.default.oneOfType([q.default.object, q.default.func]),
1732
+ onResize: q.default.func
1733
+ }, r;
1734
+ };
1735
+ }
1736
+ var Nn = Mn()(function(e) {
1737
+ var t = e.measure, n = e.measureRef, r = e.contentRect, i = e.children;
1738
+ return i({
1739
+ measure: t,
1740
+ measureRef: n,
1741
+ contentRect: r
1742
+ });
1743
+ });
1744
+ Nn.displayName = "Measure", Nn.propTypes.children = q.default.func;
1745
+ //#endregion
1746
+ //#region ../../lib-react/config-ui/dist/layout/settings-box.js
1747
+ var Pn = s("div")(() => ({
1748
+ backgroundColor: v.white(),
1749
+ border: `2px solid ${v.border()}`,
1750
+ display: "flex",
1751
+ flexDirection: "column",
1752
+ justifyContent: "flex-start",
1753
+ minWidth: "275px",
1754
+ maxWidth: "300px",
1755
+ padding: "20px 4px 4px 20px",
1756
+ zIndex: 99
1757
+ })), Fn = class extends H.Component {
1758
+ static propTypes = {
1759
+ className: q.default.string,
1760
+ children: q.default.oneOfType([q.default.arrayOf(q.default.node), q.default.node]).isRequired
1761
+ };
1762
+ static defaultProps = {};
1763
+ render() {
1764
+ let { className: e, children: t } = this.props;
1765
+ return /* @__PURE__ */ U(Pn, {
1766
+ className: e,
1767
+ children: t
1768
+ });
1769
+ }
1770
+ }, In = f({
1771
+ typography: { fontFamily: "inherit" },
1772
+ components: { MuiButton: { styleOverrides: { contained: {
1773
+ backgroundColor: "#e0e0e0",
1774
+ color: "#000000",
1775
+ "&:hover": { backgroundColor: "#bdbdbd" }
1776
+ } } } }
1777
+ }), Ln = class extends H.Component {
1778
+ static propTypes = {
1779
+ children: q.default.oneOfType([
1780
+ q.default.string,
1781
+ q.default.arrayOf(q.default.element),
1782
+ q.default.element
1783
+ ]),
1784
+ className: q.default.string,
1785
+ dimensions: q.default.object,
1786
+ settings: q.default.element,
1787
+ sidePanelMinWidth: q.default.number,
1788
+ hideSettings: q.default.bool,
1789
+ extraCSSRules: q.default.shape({
1790
+ names: q.default.arrayOf(q.default.string),
1791
+ rules: q.default.string
1792
+ })
1793
+ };
1794
+ static defaultProps = {
1795
+ sidePanelMinWidth: 1135,
1796
+ hideSettings: !1,
1797
+ dimensions: {}
1798
+ };
1799
+ constructor(...e) {
1800
+ super(...e), this.state = { layoutMode: void 0 };
1801
+ }
1802
+ onResize = (e) => {
1803
+ let { bounds: t } = e, { sidePanelMinWidth: n, dimensions: r } = this.props, { maxWidth: i } = r || {}, a = t.width > n && (!i || i > n) ? "inline" : "tabbed";
1804
+ a !== this.state.layoutMode && this.setState({ layoutMode: a });
1805
+ };
1806
+ render() {
1807
+ return /* @__PURE__ */ U(x, {
1808
+ injectFirst: !0,
1809
+ children: /* @__PURE__ */ U(M, {
1810
+ theme: In,
1811
+ children: /* @__PURE__ */ U(Nn, {
1812
+ bounds: !0,
1813
+ onResize: this.onResize,
1814
+ children: ({ measureRef: e }) => {
1815
+ let { children: t, settings: n, hideSettings: r, dimensions: i, extraCSSRules: a } = this.props, { layoutMode: o } = this.state, s = r ? null : o === "inline" ? /* @__PURE__ */ U(Fn, {
1816
+ className: "settings-box",
1817
+ children: n
1818
+ }) : n;
1819
+ return /* @__PURE__ */ W("div", {
1820
+ ref: e,
1821
+ className: "main-container extraCSSRules",
1822
+ children: [a?.rules ? /* @__PURE__ */ U("style", { dangerouslySetInnerHTML: { __html: `.extraCSSRules { ${a.rules} }` } }) : null, /* @__PURE__ */ U(Yt, {
1823
+ mode: o,
1824
+ secondary: s,
1825
+ dimensions: i,
1826
+ children: t
1827
+ })]
1828
+ });
1829
+ }
1830
+ })
1831
+ })
1832
+ });
1833
+ }
1834
+ }, Rn = Mn("bounds")(Ln), zn = /* @__PURE__ */ Ut({
1835
+ ConfigLayout: () => Rn,
1836
+ LayoutContents: () => Yt
1837
+ }), Bn = s("div")(() => ({
1838
+ display: "flex",
1839
+ width: "100%",
1840
+ justifyContent: "space-between"
1841
+ })), Vn = s(O)(({ theme: e }) => ({
1842
+ color: "rgba(0, 0, 0, 0.89)",
1843
+ fontSize: e.typography.fontSize,
1844
+ paddingTop: e.spacing(2)
1845
+ })), Hn = s(nt)(({ checked: e }) => ({
1846
+ "&.Mui-checked .MuiSwitch-thumb": { color: `${v.tertiary()} !important` },
1847
+ "&.Mui-checked .MuiSwitch-track": { backgroundColor: `${v.tertiaryLight()} !important` },
1848
+ "& .MuiSwitch-track": { backgroundColor: e ? `${v.tertiaryLight()} !important` : void 0 }
1849
+ })), Un = ({ checked: e, disabled: t, label: n, toggle: r }) => /* @__PURE__ */ W(Bn, { children: [/* @__PURE__ */ U(Vn, { children: n }), /* @__PURE__ */ U(Hn, {
1850
+ checked: e,
1851
+ disabled: t,
1852
+ onChange: (e) => r(e.target.checked)
1853
+ })] });
1854
+ Un.propTypes = {
1855
+ checked: q.default.bool,
1856
+ disabled: q.default.bool,
1857
+ label: q.default.string.isRequired,
1858
+ toggle: q.default.func.isRequired
1859
+ };
1860
+ //#endregion
1861
+ //#region ../../lib-react/config-ui/dist/settings/settings-radio-label.js
1862
+ var Wn = s(Ee)(({ theme: e }) => ({ "& .MuiFormControlLabel-label": {
1863
+ color: "rgba(0, 0, 0, 0.89)",
1864
+ fontSize: e.typography.fontSize - 2,
1865
+ left: "-5px",
1866
+ position: "relative"
1867
+ } })), Gn = s(Ye)(() => ({ color: `${v.tertiary()} !important` })), Kn = ({ label: e, value: t, checked: n, onChange: r }) => /* @__PURE__ */ U(Wn, {
1868
+ value: t,
1869
+ control: /* @__PURE__ */ U(Gn, {
1870
+ checked: n,
1871
+ onChange: r
1872
+ }),
1873
+ label: e
1874
+ });
1875
+ Kn.propTypes = {
1876
+ label: q.default.string,
1877
+ value: q.default.string,
1878
+ checked: q.default.bool,
1879
+ onChange: q.default.func
1880
+ };
1881
+ //#endregion
1882
+ //#region ../../lib-react/config-ui/dist/settings/panel.js
1883
+ var qn = (0, kt.default)("pie-lib:config-ui:settings:panel"), Jn = {
1884
+ label: q.default.string,
1885
+ value: q.default.string
1886
+ }, Q = {
1887
+ label: q.default.string,
1888
+ value: q.default.string,
1889
+ onChange: q.default.func
1890
+ }, Yn = ({ label: e, value: t, onChange: n }) => /* @__PURE__ */ U(Ot, {
1891
+ checked: t,
1892
+ label: e,
1893
+ onChange: (e) => {
1894
+ n(e.target.checked);
1895
+ }
1896
+ });
1897
+ Yn.propTypes = {
1898
+ label: q.default.string,
1899
+ value: q.default.bool,
1900
+ onChange: q.default.func
1901
+ };
1902
+ var Xn = s(Bt)(({ theme: e }) => ({
1903
+ marginTop: e.spacing(.5),
1904
+ paddingBottom: e.spacing(.5),
1905
+ width: "100%",
1906
+ "& > label": {
1907
+ color: "rgba(0, 0, 0, 0.89)",
1908
+ transform: "translate(0, 10px) scale(1)",
1909
+ fontSize: "18px",
1910
+ marginTop: e.spacing(2.5)
1911
+ },
1912
+ "& > div": { marginTop: e.spacing(2.5) }
1913
+ })), Zn = ({ label: e, value: t, onChange: n, choices: r }) => /* @__PURE__ */ U(Xn, {
1914
+ direction: "horizontal",
1915
+ customLabel: Kn,
1916
+ value: t,
1917
+ header: e,
1918
+ opts: r,
1919
+ onChange: n
1920
+ });
1921
+ Zn.propTypes = {
1922
+ ...Q,
1923
+ choices: q.default.arrayOf(q.default.shape(Jn))
1924
+ };
1925
+ var Qn = Zn, $n = s("p")(({ theme: e }) => ({
1926
+ margin: 0,
1927
+ fontSize: e.typography.fontSize
1928
+ })), er = s(z)(({ theme: e }) => ({
1929
+ marginTop: e.spacing(.5),
1930
+ border: "2px solid lightgrey",
1931
+ padding: `0 ${e.spacing(1)}`,
1932
+ borderRadius: "4px"
1933
+ })), tr = ({ label: e, value: t, onChange: n, choices: r = [] }) => {
1934
+ let i = (e) => typeof e == "string" ? e : e.label, a = (e) => typeof e == "string" ? e : e.value;
1935
+ return /* @__PURE__ */ W("div", { children: [e && /* @__PURE__ */ U($n, { children: e }), /* @__PURE__ */ U(er, {
1936
+ value: t || r && r[0],
1937
+ onChange: ({ target: e }) => n(e.value),
1938
+ input: /* @__PURE__ */ U(E, { id: `dropdown-${e}` }),
1939
+ disableUnderline: !0,
1940
+ MenuProps: { transitionDuration: {
1941
+ enter: 225,
1942
+ exit: 195
1943
+ } },
1944
+ children: r.map((e, t) => /* @__PURE__ */ U(I, {
1945
+ value: a(e),
1946
+ children: i(e)
1947
+ }, t))
1948
+ })] });
1949
+ };
1950
+ tr.propTypes = {
1951
+ ...Q,
1952
+ choices: q.default.arrayOf(q.default.string)
1953
+ };
1954
+ var nr = s(n)(({ theme: e }) => ({
1955
+ marginRight: e.spacing(3),
1956
+ marginTop: e.spacing(1)
1957
+ })), rr = ({ label: e }) => /* @__PURE__ */ U(nr, { children: e }), ir = s(Nt)(({ theme: e }) => ({
1958
+ width: "35%",
1959
+ marginRight: e.spacing(3),
1960
+ marginTop: e.spacing(1),
1961
+ "& .MuiInputBase-root": {
1962
+ marginTop: e.spacing(.5),
1963
+ border: "2px solid lightgrey",
1964
+ borderRadius: "4px",
1965
+ padding: `0 ${e.spacing(1)}`,
1966
+ backgroundColor: "transparent"
1967
+ }
1968
+ })), ar = ({ label: e, value: t, onChange: n = () => {}, suffix: r, min: i, max: a }) => /* @__PURE__ */ U(ir, {
1969
+ variant: "standard",
1970
+ label: e || "Label",
1971
+ value: t,
1972
+ max: a,
1973
+ min: i,
1974
+ onChange: (e, t) => n(t),
1975
+ suffix: r,
1976
+ showErrorWhenOutsideRange: !0,
1977
+ disableUnderline: !0
1978
+ });
1979
+ ar.propTypes = {
1980
+ ...Q,
1981
+ suffix: q.default.string,
1982
+ min: q.default.number,
1983
+ max: q.default.number,
1984
+ value: q.default.number
1985
+ }, rr.propTypes = { ...Q };
1986
+ var or = ({ disabled: e, label: t, value: n, onChange: r }) => /* @__PURE__ */ U(Un, {
1987
+ label: t,
1988
+ checked: !!n,
1989
+ disabled: !!e,
1990
+ toggle: r
1991
+ });
1992
+ or.propTypes = {
1993
+ ...Q,
1994
+ value: q.default.bool
1995
+ };
1996
+ var sr = {
1997
+ toggle: or,
1998
+ radio: Qn,
1999
+ dropdown: tr,
2000
+ numberField: ar,
2001
+ checkbox: Yn,
2002
+ textField: rr
2003
+ }, cr = s("div")(({ theme: e }) => ({ margin: `0 0 ${e.spacing(2)} 0` })), lr = s("div")(({ theme: e }) => ({
2004
+ color: "#495B8F",
2005
+ fontSize: e.typography.fontSize + 2,
2006
+ fontWeight: 600,
2007
+ marginBottom: e.spacing(1)
2008
+ })), ur = s("p")(({ theme: e }) => ({
2009
+ fontSize: e.typography.fontSize,
2010
+ marginBottom: 0
2011
+ })), dr = (e) => {
2012
+ let { model: t, label: n, group: r, configuration: i, onChange: a } = e, o = (e, n, r) => {
2013
+ let { isConfigProperty: o, ...s } = d(e, r || n), c = d(o ? i : t, n), l = {
2014
+ ...s,
2015
+ key: n,
2016
+ value: c
2017
+ }, u = sr[l.type];
2018
+ return /* @__PURE__ */ U(u, {
2019
+ ...l,
2020
+ onChange: (e) => a(n, e, o)
2021
+ }, n);
2022
+ }, s = (e, t) => {
2023
+ let n = e[t];
2024
+ if (!n) return null;
2025
+ let { type: r, label: i, fields: a, choices: s } = n;
2026
+ return r === "numberFields" ? /* @__PURE__ */ W("div", { children: [/* @__PURE__ */ U(ur, { children: i }), Object.keys(a).map((n) => o(e, `${t}.${n}`, `${t}.fields.${n}`))] }, `numberField-${i}`) : r === "checkboxes" ? /* @__PURE__ */ W("div", { children: [/* @__PURE__ */ U("p", { children: i }), Object.keys(s).map((n) => o(e, `${t}.${n}`, `${t}.choices.${n}`))] }, `checkbox-${i}`) : o(e, t);
2027
+ };
2028
+ return /* @__PURE__ */ W(cr, { children: [/* @__PURE__ */ U(lr, { children: n }), Object.keys(r).map((e) => s(r, e))] });
2029
+ };
2030
+ dr.propTypes = {
2031
+ model: q.default.object,
2032
+ label: q.default.string,
2033
+ group: q.default.object,
2034
+ configuration: q.default.object,
2035
+ onChange: q.default.func
2036
+ };
2037
+ var fr = class extends H.Component {
2038
+ static propTypes = {
2039
+ model: q.default.object,
2040
+ configuration: q.default.object,
2041
+ groups: q.default.object,
2042
+ onChangeModel: q.default.func,
2043
+ onChangeConfiguration: q.default.func,
2044
+ modal: q.default.object
2045
+ };
2046
+ static defaultProps = {
2047
+ onChangeModel: () => {},
2048
+ onChangeConfiguration: () => {}
2049
+ };
2050
+ change = (e, t, n = !1) => {
2051
+ qn("[changeModel]", e, t);
2052
+ let { onChangeModel: r, onChangeConfiguration: i } = this.props, a = { ...this.props.model }, o = { ...this.props.configuration };
2053
+ n ? (S(o, e, t), i(o, e)) : (S(a, e, t), r(a, e));
2054
+ };
2055
+ render() {
2056
+ let { groups: e, model: t, configuration: n, modal: r } = this.props;
2057
+ return qn("render:", t), /* @__PURE__ */ W("div", { children: [Object.keys(e || {}).map((r) => Object.entries(e[r]).some(([, e]) => !!e) ? /* @__PURE__ */ U(dr, {
2058
+ label: r,
2059
+ model: t,
2060
+ configuration: n,
2061
+ group: e[r],
2062
+ onChange: this.change
2063
+ }, r) : null), r] });
2064
+ }
2065
+ }, pr = /* @__PURE__ */ Ut({
2066
+ Panel: () => fr,
2067
+ checkbox: () => xr,
2068
+ checkboxes: () => Sr,
2069
+ dropdown: () => vr,
2070
+ numberField: () => yr,
2071
+ numberFields: () => br,
2072
+ radio: () => _r,
2073
+ textField: () => mr,
2074
+ toggle: () => hr
2075
+ }), mr = (e, t = !0) => ({
2076
+ label: e,
2077
+ type: "textField",
2078
+ isConfigProperty: t
2079
+ }), hr = (e, t = !1, n = !1) => ({
2080
+ type: "toggle",
2081
+ label: e,
2082
+ isConfigProperty: t,
2083
+ disabled: n
2084
+ }), gr = (e) => typeof e == "string" ? {
2085
+ label: e,
2086
+ value: e
2087
+ } : e, _r = function() {
2088
+ let [e, t, n = !1] = Array.prototype.slice.call(arguments);
2089
+ return {
2090
+ type: "radio",
2091
+ label: e,
2092
+ choices: t && t.map((e) => gr(e)),
2093
+ isConfigProperty: n
2094
+ };
2095
+ }, vr = (e, t, n = !1) => ({
2096
+ type: "dropdown",
2097
+ label: e,
2098
+ choices: t,
2099
+ isConfigProperty: n
2100
+ }), yr = (e, t, n = !1) => ({
2101
+ ...t,
2102
+ label: e,
2103
+ type: "numberField",
2104
+ isConfigProperty: n
2105
+ }), br = (e, t, n = !1) => (Object.keys(t).map((e) => {
2106
+ t[e] = yr(t[e].label, t[e], n);
2107
+ }), {
2108
+ type: "numberFields",
2109
+ label: e,
2110
+ fields: t
2111
+ }), xr = (e, t, n = !1) => ({
2112
+ ...t,
2113
+ label: e,
2114
+ type: "checkbox",
2115
+ isConfigProperty: n
2116
+ }), Sr = (e, t, n = !1) => (Object.keys(t).map((e) => {
2117
+ t[e] = xr(t[e].label, t[e], n);
2118
+ }), {
2119
+ type: "checkboxes",
2120
+ label: e,
2121
+ choices: t
2122
+ }), Cr = class e extends CustomEvent {
8
2123
  static {
9
2124
  this.TYPE = "model.updated";
10
2125
  }
@@ -17,7 +2132,7 @@ var m = class e extends CustomEvent {
17
2132
  }
18
2133
  }), this.update = t, this.reset = n;
19
2134
  }
20
- }, h = class e extends CustomEvent {
2135
+ }, wr = class e extends CustomEvent {
21
2136
  static {
22
2137
  this.TYPE = "delete.image";
23
2138
  }
@@ -30,7 +2145,7 @@ var m = class e extends CustomEvent {
30
2145
  }
31
2146
  }), this.src = t, this.done = n;
32
2147
  }
33
- }, g = class e extends CustomEvent {
2148
+ }, Tr = class e extends CustomEvent {
34
2149
  static {
35
2150
  this.TYPE = "insert.image";
36
2151
  }
@@ -40,7 +2155,7 @@ var m = class e extends CustomEvent {
40
2155
  detail: t
41
2156
  }), this.handler = t;
42
2157
  }
43
- }, _ = class e extends CustomEvent {
2158
+ }, Er = class e extends CustomEvent {
44
2159
  static {
45
2160
  this.TYPE = "delete.sound";
46
2161
  }
@@ -53,7 +2168,7 @@ var m = class e extends CustomEvent {
53
2168
  }
54
2169
  }), this.src = t, this.done = n;
55
2170
  }
56
- }, v = class e extends CustomEvent {
2171
+ }, Dr = class e extends CustomEvent {
57
2172
  static {
58
2173
  this.TYPE = "insert.sound";
59
2174
  }
@@ -63,26 +2178,26 @@ var m = class e extends CustomEvent {
63
2178
  detail: t
64
2179
  }), this.handler = t;
65
2180
  }
66
- }, y = /* @__PURE__ */ e(r(), 1), { Panel: b, toggle: x, numberFields: S, dropdown: C } = s, w = {
2181
+ }, { Panel: Or, toggle: $, numberFields: kr, dropdown: Ar } = pr, jr = {
67
2182
  type: "default",
68
2183
  default: "Your answer has been submitted"
69
- }, T = t(i)(({ theme: e }) => ({ paddingBottom: e.spacing(1) })), E = t(l)(({ theme: e }) => ({
2184
+ }, Mr = s(n)(({ theme: e }) => ({ paddingBottom: e.spacing(1) })), Nr = s(ee)(({ theme: e }) => ({
70
2185
  paddingTop: e.spacing(1),
71
2186
  marginTop: e.spacing(2),
72
2187
  marginBottom: e.spacing(2),
73
2188
  width: "100%"
74
- })), D = t("div")(({ theme: e }) => ({
2189
+ })), Pr = s("div")(({ theme: e }) => ({
75
2190
  fontSize: e.typography.fontSize - 2,
76
2191
  color: e.palette.error.main,
77
2192
  paddingTop: e.spacing(1)
78
- })), O = class extends u.Component {
2193
+ })), Fr = class extends H.Component {
79
2194
  static propTypes = {
80
- onModelChanged: y.default.func.isRequired,
81
- onConfigurationChanged: y.default.func,
82
- model: y.default.object.isRequired,
83
- configuration: y.default.object.isRequired,
84
- imageSupport: y.default.object.isRequired,
85
- uploadSoundSupport: y.default.object.isRequired
2195
+ onModelChanged: q.default.func.isRequired,
2196
+ onConfigurationChanged: q.default.func,
2197
+ model: q.default.object.isRequired,
2198
+ configuration: q.default.object.isRequired,
2199
+ imageSupport: q.default.object.isRequired,
2200
+ uploadSoundSupport: q.default.object.isRequired
86
2201
  };
87
2202
  constructor(e) {
88
2203
  super(e), this.state = { setDimensions: !0 };
@@ -109,9 +2224,9 @@ var m = class e extends CustomEvent {
109
2224
  });
110
2225
  };
111
2226
  render() {
112
- let { model: e, configuration: t, imageSupport: r, onConfigurationChanged: i, onModelChanged: s, uploadSoundSupport: l } = this.props, { annotations: p = {}, contentDimensions: m = {}, dimensions: h = {}, equationEditor: g = {}, feedback: _ = {}, playerSpellCheck: v = {}, prompt: y = {}, settingsPanelDisabled: O, spanishInput: k = {}, specialInput: A = {}, spellCheck: j = {}, studentInstructions: M = {}, teacherInstructions: N = {}, mathInput: P = {}, maxImageWidth: F = {}, maxImageHeight: I = {}, multiple: L = {}, withRubric: R = {}, mathMlOptions: z = {}, baseInputConfiguration: B = {} } = t || {}, { errors: V = {}, extraCSSRules: H, feedbackEnabled: U, promptEnabled: W, spellCheckEnabled: G, teacherInstructionsEnabled: K, toolbarEditorPosition: q } = e || {}, { prompt: J, teacherInstructions: Y } = V, X = F && F.prompt, Z = I && I.prompt, Q = { position: q === "top" ? "top" : "bottom" }, ee = {
113
- mathInput: P.settings && x(P.label),
114
- equationEditor: g.enabled && e.mathInput && C(g.label, [
2227
+ let { model: e, configuration: t, imageSupport: n, onConfigurationChanged: r, onModelChanged: i, uploadSoundSupport: a } = this.props, { annotations: o = {}, contentDimensions: s = {}, dimensions: c = {}, equationEditor: l = {}, feedback: u = {}, playerSpellCheck: d = {}, prompt: f = {}, settingsPanelDisabled: p, spanishInput: m = {}, specialInput: g = {}, spellCheck: _ = {}, studentInstructions: v = {}, teacherInstructions: y = {}, mathInput: b = {}, maxImageWidth: x = {}, maxImageHeight: S = {}, multiple: C = {}, withRubric: w = {}, mathMlOptions: T = {}, baseInputConfiguration: E = {} } = t || {}, { errors: D = {}, extraCSSRules: O, feedbackEnabled: k, promptEnabled: A, spellCheckEnabled: j, teacherInstructionsEnabled: M, toolbarEditorPosition: N } = e || {}, { prompt: P, teacherInstructions: I } = D, L = x && x.prompt, R = S && S.prompt, z = { position: N === "top" ? "top" : "bottom" }, ee = {
2228
+ mathInput: b.settings && $(b.label),
2229
+ equationEditor: l.enabled && e.mathInput && Ar(l.label, [
115
2230
  "non-negative-integers",
116
2231
  "integers",
117
2232
  "decimals",
@@ -125,9 +2240,9 @@ var m = class e extends CustomEvent {
125
2240
  "statistics",
126
2241
  "item-authoring"
127
2242
  ]),
128
- spanishInput: k.settings && x(k.label),
129
- specialInput: A.settings && x(A.label),
130
- dimensions: h.settings && S(h.label, {
2243
+ spanishInput: m.settings && $(m.label),
2244
+ specialInput: g.settings && $(g.label),
2245
+ dimensions: c.settings && kr(c.label, {
131
2246
  width: {
132
2247
  label: "Width (px)",
133
2248
  suffix: "px",
@@ -141,84 +2256,84 @@ var m = class e extends CustomEvent {
141
2256
  max: 500
142
2257
  }
143
2258
  }),
144
- "multiple.enabled": L.settings && x(L.label, !0),
145
- promptEnabled: y.settings && x(y.label),
146
- feedbackEnabled: _.settings && x(_.label),
147
- annotationsEnabled: p.settings && x(p.label),
148
- spellCheckEnabled: j.settings && x(j.label),
149
- playerSpellCheckDisabled: v.settings && x(v.label)
2259
+ "multiple.enabled": C.settings && $(C.label, !0),
2260
+ promptEnabled: f.settings && $(f.label),
2261
+ feedbackEnabled: u.settings && $(u.label),
2262
+ annotationsEnabled: o.settings && $(o.label),
2263
+ spellCheckEnabled: _.settings && $(_.label),
2264
+ playerSpellCheckDisabled: d.settings && $(d.label)
150
2265
  }, te = {
151
- teacherInstructionsEnabled: N.settings && x(N.label),
152
- studentInstructionsEnabled: M.settings && x(M.label),
153
- rubricEnabled: R?.settings && x(R?.label)
154
- }, $ = (e) => Object.assign({ ...B }, e || {});
155
- return /* @__PURE__ */ f(c.ConfigLayout, {
156
- extraCSSRules: H,
157
- dimensions: m,
158
- hideSettings: O,
159
- settings: /* @__PURE__ */ d(b, {
2266
+ teacherInstructionsEnabled: y.settings && $(y.label),
2267
+ studentInstructionsEnabled: v.settings && $(v.label),
2268
+ rubricEnabled: w?.settings && $(w?.label)
2269
+ }, B = (e) => Object.assign({ ...E }, e || {});
2270
+ return /* @__PURE__ */ W(zn.ConfigLayout, {
2271
+ extraCSSRules: O,
2272
+ dimensions: s,
2273
+ hideSettings: p,
2274
+ settings: /* @__PURE__ */ U(Or, {
160
2275
  model: e,
161
2276
  configuration: t,
162
- onChangeModel: (e) => s(e),
163
- onChangeConfiguration: (e) => i(e),
2277
+ onChangeModel: (e) => i(e),
2278
+ onChangeConfiguration: (e) => r(e),
164
2279
  groups: {
165
2280
  Settings: ee,
166
2281
  Properties: te
167
2282
  }
168
2283
  }),
169
2284
  children: [
170
- K && /* @__PURE__ */ f(E, {
171
- label: N.label,
172
- children: [/* @__PURE__ */ d(n, {
2285
+ M && /* @__PURE__ */ W(Nr, {
2286
+ label: y.label,
2287
+ children: [/* @__PURE__ */ U(F, {
173
2288
  className: "prompt",
174
2289
  markup: e.teacherInstructions || "",
175
2290
  onChange: this.changeTeacherInstructions,
176
- imageSupport: r,
2291
+ imageSupport: n,
177
2292
  nonEmpty: !1,
178
- error: Y,
179
- toolbarOpts: Q,
180
- spellCheck: G,
181
- maxImageWidth: F && F.teacherInstructions || X,
182
- maxImageHeight: I && I.teacherInstructions || Z,
183
- uploadSoundSupport: l,
2293
+ error: I,
2294
+ toolbarOpts: z,
2295
+ spellCheck: j,
2296
+ maxImageWidth: x && x.teacherInstructions || L,
2297
+ maxImageHeight: S && S.teacherInstructions || R,
2298
+ uploadSoundSupport: a,
184
2299
  languageCharactersProps: [{ language: "spanish" }, { language: "special" }],
185
- mathMlOptions: z,
186
- pluginProps: $(N?.inputConfiguration)
187
- }), Y && /* @__PURE__ */ d(D, { children: Y })]
2300
+ mathMlOptions: T,
2301
+ pluginProps: B(y?.inputConfiguration)
2302
+ }), I && /* @__PURE__ */ U(Pr, { children: I })]
188
2303
  }),
189
- W && /* @__PURE__ */ f(E, {
190
- label: y.label,
191
- children: [/* @__PURE__ */ d(n, {
192
- activePlugins: a,
2304
+ A && /* @__PURE__ */ W(Nr, {
2305
+ label: f.label,
2306
+ children: [/* @__PURE__ */ U(F, {
2307
+ activePlugins: h,
193
2308
  className: "prompt",
194
2309
  markup: e.prompt || "",
195
2310
  onChange: this.onPromptChange,
196
- imageSupport: r,
2311
+ imageSupport: n,
197
2312
  nonEmpty: !1,
198
- error: J,
199
- toolbarOpts: Q,
200
- spellCheck: G,
201
- maxImageWidth: X,
202
- maxImageHeight: Z,
203
- uploadSoundSupport: l,
2313
+ error: P,
2314
+ toolbarOpts: z,
2315
+ spellCheck: j,
2316
+ maxImageWidth: L,
2317
+ maxImageHeight: R,
2318
+ uploadSoundSupport: a,
204
2319
  languageCharactersProps: [{ language: "spanish" }, { language: "special" }],
205
- mathMlOptions: z,
206
- pluginProps: $(y?.inputConfiguration)
207
- }), J && /* @__PURE__ */ d(D, { children: J })]
2320
+ mathMlOptions: T,
2321
+ pluginProps: B(f?.inputConfiguration)
2322
+ }), P && /* @__PURE__ */ U(Pr, { children: P })]
208
2323
  }),
209
- U && /* @__PURE__ */ f(u.Fragment, { children: [/* @__PURE__ */ d(T, {
2324
+ k && /* @__PURE__ */ W(H.Fragment, { children: [/* @__PURE__ */ U(Mr, {
210
2325
  variant: "h6",
211
2326
  children: "Feedback"
212
- }), /* @__PURE__ */ d(o, {
2327
+ }), /* @__PURE__ */ U(Ct, {
213
2328
  label: "When submitted, show",
214
- feedback: e.feedback || w,
2329
+ feedback: e.feedback || jr,
215
2330
  onChange: this.changeFeedback,
216
- toolbarOpts: Q
2331
+ toolbarOpts: z
217
2332
  })] })
218
2333
  ]
219
2334
  });
220
2335
  }
221
- }, k = {
2336
+ }, Ir = {
222
2337
  model: {
223
2338
  annotationsEnabled: !1,
224
2339
  dimensions: {
@@ -423,52 +2538,52 @@ var m = class e extends CustomEvent {
423
2538
  mmlEditing: !1
424
2539
  }
425
2540
  }
426
- }, A = class e extends HTMLElement {
2541
+ }, Lr = class e extends HTMLElement {
427
2542
  static createDefaultModel = (e = {}, t) => {
428
2543
  let n = {
429
- ...k.model,
2544
+ ...Ir.model,
430
2545
  ...e
431
2546
  };
432
2547
  return t?.withRubric?.forceEnabled && !n.rubricEnabled && (n.rubricEnabled = !0), n;
433
2548
  };
434
2549
  constructor() {
435
- super(), this._root = null, this._configuration = k.configuration, this._configuration.withRubric?.forceEnabled && (this._configuration.withRubric.settings = !1), this._model = e.createDefaultModel({}, this._configuration);
2550
+ super(), this._root = null, this._configuration = Ir.configuration, this._configuration.withRubric?.forceEnabled && (this._configuration.withRubric.settings = !1), this._model = e.createDefaultModel({}, this._configuration);
436
2551
  }
437
2552
  set model(t) {
438
2553
  this._model = e.createDefaultModel(t, this._configuration), this.render();
439
2554
  }
440
2555
  set configuration(e) {
441
2556
  this._configuration = {
442
- ...k.configuration,
2557
+ ...Ir.configuration,
443
2558
  ...e
444
2559
  };
445
2560
  let { withRubric: t = {} } = e || {};
446
2561
  t?.forceEnabled && (this._configuration.withRubric.settings = !1, this._model.rubricEnabled || (this._model.rubricEnabled = !0)), this.render();
447
2562
  }
448
2563
  onModelChanged(e) {
449
- this._model = e, this.render(), this.dispatchEvent(new m(this._model, !1));
2564
+ this._model = e, this.render(), this.dispatchEvent(new Cr(this._model, !1));
450
2565
  }
451
2566
  onConfigurationChanged(e) {
452
2567
  this._configuration = {
453
- ...k.configuration,
2568
+ ...Ir.configuration,
454
2569
  ...e
455
2570
  }, this._model && this.onModelChanged(this._model), this.render();
456
2571
  }
457
2572
  insertImage(e) {
458
- this.dispatchEvent(new g(e));
2573
+ this.dispatchEvent(new Tr(e));
459
2574
  }
460
2575
  onDeleteImage(e, t) {
461
- this.dispatchEvent(new h(e, t));
2576
+ this.dispatchEvent(new wr(e, t));
462
2577
  }
463
2578
  insertSound(e) {
464
- this.dispatchEvent(new v(e));
2579
+ this.dispatchEvent(new Dr(e));
465
2580
  }
466
2581
  onDeleteSound(e, t) {
467
- this.dispatchEvent(new _(e, t));
2582
+ this.dispatchEvent(new Er(e, t));
468
2583
  }
469
2584
  render() {
470
2585
  if (this._model) {
471
- let e = u.createElement(O, {
2586
+ let e = H.createElement(Fr, {
472
2587
  model: this._model,
473
2588
  configuration: this._configuration,
474
2589
  onModelChanged: this.onModelChanged.bind(this),
@@ -482,14 +2597,17 @@ var m = class e extends CustomEvent {
482
2597
  delete: this.onDeleteSound.bind(this)
483
2598
  }
484
2599
  });
485
- this._root ||= p(this), this._root.render(e);
2600
+ this._root ||= ie(this), this._root.render(e);
486
2601
  }
487
2602
  }
2603
+ connectedCallback() {
2604
+ this.render();
2605
+ }
488
2606
  disconnectedCallback() {
489
- this._root && this._root.unmount();
2607
+ this._root &&= (this._root.unmount(), null);
490
2608
  }
491
2609
  };
492
2610
  //#endregion
493
- export { A as default };
2611
+ export { Lr as default };
494
2612
 
495
2613
  //# sourceMappingURL=index.js.map