@pie-element/charting 12.1.2-next.1 → 12.1.2-next.11
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/author/charting-config.js +4 -4
- package/dist/author/configure.js +3 -3
- package/dist/author/correct-response.js +4 -4
- package/dist/author/index.d.ts +1 -0
- package/dist/author/index.js +5 -2
- package/dist/author/utils.js +1 -1
- package/dist/browser/author/index.js +2245 -301
- package/dist/browser/author/index.js.map +1 -1
- package/dist/browser/{chart-AvFvbpGV.js → chart-CqKCTwCe.js} +29051 -27671
- package/dist/browser/chart-CqKCTwCe.js.map +1 -0
- package/dist/browser/controller/index.js +3 -3
- package/dist/browser/controller/index.js.map +1 -1
- package/dist/browser/delivery/index.js +104 -86
- package/dist/browser/delivery/index.js.map +1 -1
- package/dist/browser/{dist-CA-Ok7CW.js → dist-D6aoYeoC.js} +6 -2
- package/dist/browser/{dist-CA-Ok7CW.js.map → dist-D6aoYeoC.js.map} +1 -1
- package/dist/controller/index.js +1 -1
- package/dist/delivery/index.d.ts +3 -0
- package/dist/delivery/index.js +25 -7
- package/dist/delivery/main.js +1 -1
- package/dist/index.iife.js +111 -107
- package/package.json +17 -18
- package/dist/browser/chart-AvFvbpGV.js.map +0 -1
|
@@ -1,16 +1,1957 @@
|
|
|
1
|
-
import { S as e, f as t,
|
|
2
|
-
import { D as
|
|
3
|
-
import * as
|
|
4
|
-
import
|
|
5
|
-
import { createRoot as
|
|
6
|
-
import { jsx as
|
|
7
|
-
//#region
|
|
8
|
-
var
|
|
1
|
+
import { S as e, f as t, g as n, i as r, r as i, t as a, v as o } from "../dist-D6aoYeoC.js";
|
|
2
|
+
import { A as s, C as c, D as l, E 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, T as w, U as T, V as E, W as D, X as O, Y as k, Z as A, _ as j, a as M, c as ee, d as N, f as P, h as F, i as I, l as L, m as te, o as R, p as z, q as B, r as V, t as ne, u as re, v as ie, w as ae, z as H } from "../chart-CqKCTwCe.js";
|
|
3
|
+
import * as U from "react";
|
|
4
|
+
import W, { Component as G, createElement as oe, useEffect as se, useState as ce } from "react";
|
|
5
|
+
import { createRoot as le } from "react-dom/client";
|
|
6
|
+
import { jsx as K, jsxs as q } from "react/jsx-runtime";
|
|
7
|
+
//#region ../../../node_modules/.bun/@mui+material@7.3.11+eb26afe407ed7030/node_modules/@mui/material/esm/utils/createChainedFunction.js
|
|
8
|
+
var ue = m;
|
|
9
|
+
//#endregion
|
|
10
|
+
//#region ../../../node_modules/.bun/@mui+material@7.3.11+eb26afe407ed7030/node_modules/@mui/material/esm/FormControlLabel/formControlLabelClasses.js
|
|
11
|
+
function de(e) {
|
|
12
|
+
return k("MuiFormControlLabel", e);
|
|
13
|
+
}
|
|
14
|
+
var J = h("MuiFormControlLabel", [
|
|
15
|
+
"root",
|
|
16
|
+
"labelPlacementStart",
|
|
17
|
+
"labelPlacementTop",
|
|
18
|
+
"labelPlacementBottom",
|
|
19
|
+
"disabled",
|
|
20
|
+
"label",
|
|
21
|
+
"error",
|
|
22
|
+
"required",
|
|
23
|
+
"asterisk"
|
|
24
|
+
]), fe = (e) => {
|
|
25
|
+
let { classes: t, disabled: n, labelPlacement: r, error: i, required: a } = e;
|
|
26
|
+
return B({
|
|
27
|
+
root: [
|
|
28
|
+
"root",
|
|
29
|
+
n && "disabled",
|
|
30
|
+
`labelPlacement${d(r)}`,
|
|
31
|
+
i && "error",
|
|
32
|
+
a && "required"
|
|
33
|
+
],
|
|
34
|
+
label: ["label", n && "disabled"],
|
|
35
|
+
asterisk: ["asterisk", i && "error"]
|
|
36
|
+
}, de, t);
|
|
37
|
+
}, pe = T("label", {
|
|
38
|
+
name: "MuiFormControlLabel",
|
|
39
|
+
slot: "Root",
|
|
40
|
+
overridesResolver: (e, t) => {
|
|
41
|
+
let { ownerState: n } = e;
|
|
42
|
+
return [
|
|
43
|
+
{ [`& .${J.label}`]: t.label },
|
|
44
|
+
t.root,
|
|
45
|
+
t[`labelPlacement${d(n.labelPlacement)}`]
|
|
46
|
+
];
|
|
47
|
+
}
|
|
48
|
+
})(C(({ theme: e }) => ({
|
|
49
|
+
display: "inline-flex",
|
|
50
|
+
alignItems: "center",
|
|
51
|
+
cursor: "pointer",
|
|
52
|
+
verticalAlign: "middle",
|
|
53
|
+
WebkitTapHighlightColor: "transparent",
|
|
54
|
+
marginLeft: -11,
|
|
55
|
+
marginRight: 16,
|
|
56
|
+
[`&.${J.disabled}`]: { cursor: "default" },
|
|
57
|
+
[`& .${J.label}`]: { [`&.${J.disabled}`]: { color: (e.vars || e).palette.text.disabled } },
|
|
58
|
+
variants: [
|
|
59
|
+
{
|
|
60
|
+
props: { labelPlacement: "start" },
|
|
61
|
+
style: {
|
|
62
|
+
flexDirection: "row-reverse",
|
|
63
|
+
marginRight: -11
|
|
64
|
+
}
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
props: { labelPlacement: "top" },
|
|
68
|
+
style: { flexDirection: "column-reverse" }
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
props: { labelPlacement: "bottom" },
|
|
72
|
+
style: { flexDirection: "column" }
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
props: ({ labelPlacement: e }) => e === "start" || e === "top" || e === "bottom",
|
|
76
|
+
style: { marginLeft: 16 }
|
|
77
|
+
}
|
|
78
|
+
]
|
|
79
|
+
}))), me = T("span", {
|
|
80
|
+
name: "MuiFormControlLabel",
|
|
81
|
+
slot: "Asterisk"
|
|
82
|
+
})(C(({ theme: e }) => ({ [`&.${J.error}`]: { color: (e.vars || e).palette.error.main } }))), he = /*#__PURE__*/ U.forwardRef(function(e, t) {
|
|
83
|
+
let n = H({
|
|
84
|
+
props: e,
|
|
85
|
+
name: "MuiFormControlLabel"
|
|
86
|
+
}), { checked: r, className: i, componentsProps: a = {}, control: o, disabled: s, disableTypography: c, inputRef: l, label: d, labelPlacement: f = "end", name: p, onChange: m, required: h, slots: g = {}, slotProps: v = {}, value: y, ...x } = n, S = u(), C = s ?? o.props.disabled ?? S?.disabled, w = h ?? o.props.required, T = {
|
|
87
|
+
disabled: C,
|
|
88
|
+
required: w
|
|
89
|
+
};
|
|
90
|
+
[
|
|
91
|
+
"checked",
|
|
92
|
+
"name",
|
|
93
|
+
"onChange",
|
|
94
|
+
"value",
|
|
95
|
+
"inputRef"
|
|
96
|
+
].forEach((e) => {
|
|
97
|
+
o.props[e] === void 0 && n[e] !== void 0 && (T[e] = n[e]);
|
|
98
|
+
});
|
|
99
|
+
let E = b({
|
|
100
|
+
props: n,
|
|
101
|
+
muiFormControl: S,
|
|
102
|
+
states: ["error"]
|
|
103
|
+
}), D = {
|
|
104
|
+
...n,
|
|
105
|
+
disabled: C,
|
|
106
|
+
labelPlacement: f,
|
|
107
|
+
required: w,
|
|
108
|
+
error: E.error
|
|
109
|
+
}, k = fe(D), [A, j] = _("typography", {
|
|
110
|
+
elementType: F,
|
|
111
|
+
externalForwardedProps: {
|
|
112
|
+
slots: g,
|
|
113
|
+
slotProps: {
|
|
114
|
+
...a,
|
|
115
|
+
...v
|
|
116
|
+
}
|
|
117
|
+
},
|
|
118
|
+
ownerState: D
|
|
119
|
+
}), M = d;
|
|
120
|
+
return M != null && M.type !== F && !c && (M = /*#__PURE__*/ K(A, {
|
|
121
|
+
component: "span",
|
|
122
|
+
...j,
|
|
123
|
+
className: O(k.label, j?.className),
|
|
124
|
+
children: M
|
|
125
|
+
})), /*#__PURE__*/ q(pe, {
|
|
126
|
+
className: O(k.root, i),
|
|
127
|
+
ownerState: D,
|
|
128
|
+
ref: t,
|
|
129
|
+
...x,
|
|
130
|
+
children: [/*#__PURE__*/ U.cloneElement(o, T), w ? /*#__PURE__*/ q("div", { children: [M, /*#__PURE__*/ q(me, {
|
|
131
|
+
ownerState: D,
|
|
132
|
+
"aria-hidden": !0,
|
|
133
|
+
className: k.asterisk,
|
|
134
|
+
children: [" ", "*"]
|
|
135
|
+
})] }) : M]
|
|
136
|
+
});
|
|
137
|
+
});
|
|
138
|
+
//#endregion
|
|
139
|
+
//#region ../../../node_modules/.bun/@mui+material@7.3.11+eb26afe407ed7030/node_modules/@mui/material/esm/InputAdornment/inputAdornmentClasses.js
|
|
140
|
+
function ge(e) {
|
|
141
|
+
return k("MuiInputAdornment", e);
|
|
142
|
+
}
|
|
143
|
+
var _e = h("MuiInputAdornment", [
|
|
144
|
+
"root",
|
|
145
|
+
"filled",
|
|
146
|
+
"standard",
|
|
147
|
+
"outlined",
|
|
148
|
+
"positionStart",
|
|
149
|
+
"positionEnd",
|
|
150
|
+
"disablePointerEvents",
|
|
151
|
+
"hiddenLabel",
|
|
152
|
+
"sizeSmall"
|
|
153
|
+
]), ve, ye = (e, t) => {
|
|
154
|
+
let { ownerState: n } = e;
|
|
155
|
+
return [
|
|
156
|
+
t.root,
|
|
157
|
+
t[`position${d(n.position)}`],
|
|
158
|
+
n.disablePointerEvents === !0 && t.disablePointerEvents,
|
|
159
|
+
t[n.variant]
|
|
160
|
+
];
|
|
161
|
+
}, be = (e) => {
|
|
162
|
+
let { classes: t, disablePointerEvents: n, hiddenLabel: r, position: i, size: a, variant: o } = e;
|
|
163
|
+
return B({ root: [
|
|
164
|
+
"root",
|
|
165
|
+
n && "disablePointerEvents",
|
|
166
|
+
i && `position${d(i)}`,
|
|
167
|
+
o,
|
|
168
|
+
r && "hiddenLabel",
|
|
169
|
+
a && `size${d(a)}`
|
|
170
|
+
] }, ge, t);
|
|
171
|
+
}, xe = T("div", {
|
|
172
|
+
name: "MuiInputAdornment",
|
|
173
|
+
slot: "Root",
|
|
174
|
+
overridesResolver: ye
|
|
175
|
+
})(C(({ theme: e }) => ({
|
|
176
|
+
display: "flex",
|
|
177
|
+
maxHeight: "2em",
|
|
178
|
+
alignItems: "center",
|
|
179
|
+
whiteSpace: "nowrap",
|
|
180
|
+
color: (e.vars || e).palette.action.active,
|
|
181
|
+
variants: [
|
|
182
|
+
{
|
|
183
|
+
props: { variant: "filled" },
|
|
184
|
+
style: { [`&.${_e.positionStart}&:not(.${_e.hiddenLabel})`]: { marginTop: 16 } }
|
|
185
|
+
},
|
|
186
|
+
{
|
|
187
|
+
props: { position: "start" },
|
|
188
|
+
style: { marginRight: 8 }
|
|
189
|
+
},
|
|
190
|
+
{
|
|
191
|
+
props: { position: "end" },
|
|
192
|
+
style: { marginLeft: 8 }
|
|
193
|
+
},
|
|
194
|
+
{
|
|
195
|
+
props: { disablePointerEvents: !0 },
|
|
196
|
+
style: { pointerEvents: "none" }
|
|
197
|
+
}
|
|
198
|
+
]
|
|
199
|
+
}))), Se = /*#__PURE__*/ U.forwardRef(function(e, t) {
|
|
200
|
+
let n = H({
|
|
201
|
+
props: e,
|
|
202
|
+
name: "MuiInputAdornment"
|
|
203
|
+
}), { children: r, className: i, component: a = "div", disablePointerEvents: o = !1, disableTypography: s = !1, position: c, variant: d, ...f } = n, p = u() || {}, m = d;
|
|
204
|
+
d && p.variant, p && !m && (m = p.variant);
|
|
205
|
+
let h = {
|
|
206
|
+
...n,
|
|
207
|
+
hiddenLabel: p.hiddenLabel,
|
|
208
|
+
size: p.size,
|
|
209
|
+
disablePointerEvents: o,
|
|
210
|
+
position: c,
|
|
211
|
+
variant: m
|
|
212
|
+
}, g = be(h);
|
|
213
|
+
return /*#__PURE__*/ K(l.Provider, {
|
|
214
|
+
value: null,
|
|
215
|
+
children: /*#__PURE__*/ K(xe, {
|
|
216
|
+
as: a,
|
|
217
|
+
ownerState: h,
|
|
218
|
+
className: O(g.root, i),
|
|
219
|
+
ref: t,
|
|
220
|
+
...f,
|
|
221
|
+
children: typeof r == "string" && !s ? /*#__PURE__*/ K(F, {
|
|
222
|
+
color: "textSecondary",
|
|
223
|
+
children: r
|
|
224
|
+
}) : /*#__PURE__*/ q(U.Fragment, { children: [c === "start" ? ve ||= /*#__PURE__*/ K("span", {
|
|
225
|
+
className: "notranslate",
|
|
226
|
+
"aria-hidden": !0,
|
|
227
|
+
children: ""
|
|
228
|
+
}) : null, r] })
|
|
229
|
+
})
|
|
230
|
+
});
|
|
231
|
+
}), Ce = x(/*#__PURE__*/ K("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"), we = x(/*#__PURE__*/ K("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"), Te = T("span", {
|
|
232
|
+
name: "MuiRadioButtonIcon",
|
|
233
|
+
shouldForwardProp: D
|
|
234
|
+
})({
|
|
235
|
+
position: "relative",
|
|
236
|
+
display: "flex"
|
|
237
|
+
}), Ee = T(Ce, { name: "MuiRadioButtonIcon" })({ transform: "scale(1)" }), De = T(we, { name: "MuiRadioButtonIcon" })(C(({ theme: e }) => ({
|
|
238
|
+
left: 0,
|
|
239
|
+
position: "absolute",
|
|
240
|
+
transform: "scale(0)",
|
|
241
|
+
transition: e.transitions.create("transform", {
|
|
242
|
+
easing: e.transitions.easing.easeIn,
|
|
243
|
+
duration: e.transitions.duration.shortest
|
|
244
|
+
}),
|
|
245
|
+
variants: [{
|
|
246
|
+
props: { checked: !0 },
|
|
247
|
+
style: {
|
|
248
|
+
transform: "scale(1)",
|
|
249
|
+
transition: e.transitions.create("transform", {
|
|
250
|
+
easing: e.transitions.easing.easeOut,
|
|
251
|
+
duration: e.transitions.duration.shortest
|
|
252
|
+
})
|
|
253
|
+
}
|
|
254
|
+
}]
|
|
255
|
+
})));
|
|
256
|
+
function Oe(e) {
|
|
257
|
+
let { checked: t = !1, classes: n = {}, fontSize: r } = e, i = {
|
|
258
|
+
...e,
|
|
259
|
+
checked: t
|
|
260
|
+
};
|
|
261
|
+
return /*#__PURE__*/ q(Te, {
|
|
262
|
+
className: n.root,
|
|
263
|
+
ownerState: i,
|
|
264
|
+
children: [/*#__PURE__*/ K(Ee, {
|
|
265
|
+
fontSize: r,
|
|
266
|
+
className: n.background,
|
|
267
|
+
ownerState: i
|
|
268
|
+
}), /*#__PURE__*/ K(De, {
|
|
269
|
+
fontSize: r,
|
|
270
|
+
className: n.dot,
|
|
271
|
+
ownerState: i
|
|
272
|
+
})]
|
|
273
|
+
});
|
|
274
|
+
}
|
|
275
|
+
//#endregion
|
|
276
|
+
//#region ../../../node_modules/.bun/@mui+material@7.3.11+eb26afe407ed7030/node_modules/@mui/material/esm/RadioGroup/RadioGroupContext.js
|
|
277
|
+
var ke = /*#__PURE__*/ U.createContext(void 0);
|
|
278
|
+
//#endregion
|
|
279
|
+
//#region ../../../node_modules/.bun/@mui+material@7.3.11+eb26afe407ed7030/node_modules/@mui/material/esm/RadioGroup/useRadioGroup.js
|
|
280
|
+
function Ae() {
|
|
281
|
+
return U.useContext(ke);
|
|
282
|
+
}
|
|
283
|
+
//#endregion
|
|
284
|
+
//#region ../../../node_modules/.bun/@mui+material@7.3.11+eb26afe407ed7030/node_modules/@mui/material/esm/Radio/radioClasses.js
|
|
285
|
+
function je(e) {
|
|
286
|
+
return k("MuiRadio", e);
|
|
287
|
+
}
|
|
288
|
+
var Me = h("MuiRadio", [
|
|
289
|
+
"root",
|
|
290
|
+
"checked",
|
|
291
|
+
"disabled",
|
|
292
|
+
"colorPrimary",
|
|
293
|
+
"colorSecondary",
|
|
294
|
+
"sizeSmall"
|
|
295
|
+
]), Ne = (e) => {
|
|
296
|
+
let { classes: t, color: n, size: r } = e, i = { root: [
|
|
297
|
+
"root",
|
|
298
|
+
`color${d(n)}`,
|
|
299
|
+
r !== "medium" && `size${d(r)}`
|
|
300
|
+
] };
|
|
301
|
+
return {
|
|
302
|
+
...t,
|
|
303
|
+
...B(i, je, t)
|
|
304
|
+
};
|
|
305
|
+
}, Pe = T(M, {
|
|
306
|
+
shouldForwardProp: (e) => D(e) || e === "classes",
|
|
307
|
+
name: "MuiRadio",
|
|
308
|
+
slot: "Root",
|
|
309
|
+
overridesResolver: (e, t) => {
|
|
310
|
+
let { ownerState: n } = e;
|
|
311
|
+
return [
|
|
312
|
+
t.root,
|
|
313
|
+
n.size !== "medium" && t[`size${d(n.size)}`],
|
|
314
|
+
t[`color${d(n.color)}`]
|
|
315
|
+
];
|
|
316
|
+
}
|
|
317
|
+
})(C(({ theme: e }) => ({
|
|
318
|
+
color: (e.vars || e).palette.text.secondary,
|
|
319
|
+
[`&.${Me.disabled}`]: { color: (e.vars || e).palette.action.disabled },
|
|
320
|
+
variants: [
|
|
321
|
+
{
|
|
322
|
+
props: {
|
|
323
|
+
color: "default",
|
|
324
|
+
disabled: !1,
|
|
325
|
+
disableRipple: !1
|
|
326
|
+
},
|
|
327
|
+
style: { "&:hover": { backgroundColor: e.alpha((e.vars || e).palette.action.active, (e.vars || e).palette.action.hoverOpacity) } }
|
|
328
|
+
},
|
|
329
|
+
...Object.entries(e.palette).filter(s()).map(([t]) => ({
|
|
330
|
+
props: {
|
|
331
|
+
color: t,
|
|
332
|
+
disabled: !1,
|
|
333
|
+
disableRipple: !1
|
|
334
|
+
},
|
|
335
|
+
style: { "&:hover": { backgroundColor: e.alpha((e.vars || e).palette[t].main, (e.vars || e).palette.action.hoverOpacity) } }
|
|
336
|
+
})),
|
|
337
|
+
...Object.entries(e.palette).filter(s()).map(([t]) => ({
|
|
338
|
+
props: {
|
|
339
|
+
color: t,
|
|
340
|
+
disabled: !1
|
|
341
|
+
},
|
|
342
|
+
style: { [`&.${Me.checked}`]: { color: (e.vars || e).palette[t].main } }
|
|
343
|
+
})),
|
|
344
|
+
{
|
|
345
|
+
props: { disableRipple: !1 },
|
|
346
|
+
style: { "&:hover": { "@media (hover: none)": { backgroundColor: "transparent" } } }
|
|
347
|
+
}
|
|
348
|
+
]
|
|
349
|
+
})));
|
|
350
|
+
function Fe(e, t) {
|
|
351
|
+
return typeof t == "object" && t ? e === t : String(e) === String(t);
|
|
352
|
+
}
|
|
353
|
+
var Ie = /*#__PURE__*/ K(Oe, { checked: !0 }), Le = /*#__PURE__*/ K(Oe, {}), Re = /*#__PURE__*/ U.forwardRef(function(e, t) {
|
|
354
|
+
let n = H({
|
|
355
|
+
props: e,
|
|
356
|
+
name: "MuiRadio"
|
|
357
|
+
}), { checked: r, checkedIcon: i = Ie, color: a = "primary", icon: o = Le, name: s, onChange: c, size: l = "medium", className: d, disabled: f, disableRipple: p = !1, slots: m = {}, slotProps: h = {}, inputProps: g, ...v } = n, y = u(), b = f;
|
|
358
|
+
y && b === void 0 && (b = y.disabled), b ??= !1;
|
|
359
|
+
let x = {
|
|
360
|
+
...n,
|
|
361
|
+
disabled: b,
|
|
362
|
+
disableRipple: p,
|
|
363
|
+
color: a,
|
|
364
|
+
size: l
|
|
365
|
+
}, S = Ne(x), C = Ae(), w = r, T = ue(c, C && C.onChange), E = s;
|
|
366
|
+
C && (w === void 0 && (w = Fe(C.value, n.value)), E === void 0 && (E = C.name));
|
|
367
|
+
let D = h.input ?? g, [k, A] = _("root", {
|
|
368
|
+
ref: t,
|
|
369
|
+
elementType: Pe,
|
|
370
|
+
className: O(S.root, d),
|
|
371
|
+
shouldForwardComponentProp: !0,
|
|
372
|
+
externalForwardedProps: {
|
|
373
|
+
slots: m,
|
|
374
|
+
slotProps: h,
|
|
375
|
+
...v
|
|
376
|
+
},
|
|
377
|
+
getSlotProps: (e) => ({
|
|
378
|
+
...e,
|
|
379
|
+
onChange: (t, ...n) => {
|
|
380
|
+
e.onChange?.(t, ...n), T(t, ...n);
|
|
381
|
+
}
|
|
382
|
+
}),
|
|
383
|
+
ownerState: x,
|
|
384
|
+
additionalProps: {
|
|
385
|
+
type: "radio",
|
|
386
|
+
icon: /*#__PURE__*/ U.cloneElement(o, { fontSize: o.props.fontSize ?? l }),
|
|
387
|
+
checkedIcon: /*#__PURE__*/ U.cloneElement(i, { fontSize: i.props.fontSize ?? l }),
|
|
388
|
+
disabled: b,
|
|
389
|
+
name: E,
|
|
390
|
+
checked: w,
|
|
391
|
+
slots: m,
|
|
392
|
+
slotProps: { input: typeof D == "function" ? D(x) : D }
|
|
393
|
+
}
|
|
394
|
+
});
|
|
395
|
+
return /*#__PURE__*/ K(k, {
|
|
396
|
+
...A,
|
|
397
|
+
classes: S
|
|
398
|
+
});
|
|
399
|
+
});
|
|
400
|
+
//#endregion
|
|
401
|
+
//#region ../../../node_modules/.bun/@mui+material@7.3.11+eb26afe407ed7030/node_modules/@mui/material/esm/Switch/switchClasses.js
|
|
402
|
+
function ze(e) {
|
|
403
|
+
return k("MuiSwitch", e);
|
|
404
|
+
}
|
|
405
|
+
var Y = h("MuiSwitch", [
|
|
406
|
+
"root",
|
|
407
|
+
"edgeStart",
|
|
408
|
+
"edgeEnd",
|
|
409
|
+
"switchBase",
|
|
410
|
+
"colorPrimary",
|
|
411
|
+
"colorSecondary",
|
|
412
|
+
"sizeSmall",
|
|
413
|
+
"sizeMedium",
|
|
414
|
+
"checked",
|
|
415
|
+
"disabled",
|
|
416
|
+
"input",
|
|
417
|
+
"thumb",
|
|
418
|
+
"track"
|
|
419
|
+
]), Be = (e) => {
|
|
420
|
+
let { classes: t, edge: n, size: r, color: i, checked: a, disabled: o } = e, s = B({
|
|
421
|
+
root: [
|
|
422
|
+
"root",
|
|
423
|
+
n && `edge${d(n)}`,
|
|
424
|
+
`size${d(r)}`
|
|
425
|
+
],
|
|
426
|
+
switchBase: [
|
|
427
|
+
"switchBase",
|
|
428
|
+
`color${d(i)}`,
|
|
429
|
+
a && "checked",
|
|
430
|
+
o && "disabled"
|
|
431
|
+
],
|
|
432
|
+
thumb: ["thumb"],
|
|
433
|
+
track: ["track"],
|
|
434
|
+
input: ["input"]
|
|
435
|
+
}, ze, t);
|
|
436
|
+
return {
|
|
437
|
+
...t,
|
|
438
|
+
...s
|
|
439
|
+
};
|
|
440
|
+
}, Ve = T("span", {
|
|
441
|
+
name: "MuiSwitch",
|
|
442
|
+
slot: "Root",
|
|
443
|
+
overridesResolver: (e, t) => {
|
|
444
|
+
let { ownerState: n } = e;
|
|
445
|
+
return [
|
|
446
|
+
t.root,
|
|
447
|
+
n.edge && t[`edge${d(n.edge)}`],
|
|
448
|
+
t[`size${d(n.size)}`]
|
|
449
|
+
];
|
|
450
|
+
}
|
|
451
|
+
})({
|
|
452
|
+
display: "inline-flex",
|
|
453
|
+
width: 58,
|
|
454
|
+
height: 38,
|
|
455
|
+
overflow: "hidden",
|
|
456
|
+
padding: 12,
|
|
457
|
+
boxSizing: "border-box",
|
|
458
|
+
position: "relative",
|
|
459
|
+
flexShrink: 0,
|
|
460
|
+
zIndex: 0,
|
|
461
|
+
verticalAlign: "middle",
|
|
462
|
+
"@media print": { colorAdjust: "exact" },
|
|
463
|
+
variants: [
|
|
464
|
+
{
|
|
465
|
+
props: { edge: "start" },
|
|
466
|
+
style: { marginLeft: -8 }
|
|
467
|
+
},
|
|
468
|
+
{
|
|
469
|
+
props: { edge: "end" },
|
|
470
|
+
style: { marginRight: -8 }
|
|
471
|
+
},
|
|
472
|
+
{
|
|
473
|
+
props: { size: "small" },
|
|
474
|
+
style: {
|
|
475
|
+
width: 40,
|
|
476
|
+
height: 24,
|
|
477
|
+
padding: 7,
|
|
478
|
+
[`& .${Y.thumb}`]: {
|
|
479
|
+
width: 16,
|
|
480
|
+
height: 16
|
|
481
|
+
},
|
|
482
|
+
[`& .${Y.switchBase}`]: {
|
|
483
|
+
padding: 4,
|
|
484
|
+
[`&.${Y.checked}`]: { transform: "translateX(16px)" }
|
|
485
|
+
}
|
|
486
|
+
}
|
|
487
|
+
}
|
|
488
|
+
]
|
|
489
|
+
}), He = T(M, {
|
|
490
|
+
name: "MuiSwitch",
|
|
491
|
+
slot: "SwitchBase",
|
|
492
|
+
overridesResolver: (e, t) => {
|
|
493
|
+
let { ownerState: n } = e;
|
|
494
|
+
return [
|
|
495
|
+
t.switchBase,
|
|
496
|
+
{ [`& .${Y.input}`]: t.input },
|
|
497
|
+
n.color !== "default" && t[`color${d(n.color)}`]
|
|
498
|
+
];
|
|
499
|
+
}
|
|
500
|
+
})(C(({ theme: e }) => ({
|
|
501
|
+
position: "absolute",
|
|
502
|
+
top: 0,
|
|
503
|
+
left: 0,
|
|
504
|
+
zIndex: 1,
|
|
505
|
+
color: e.vars ? e.vars.palette.Switch.defaultColor : `${e.palette.mode === "light" ? e.palette.common.white : e.palette.grey[300]}`,
|
|
506
|
+
transition: e.transitions.create(["left", "transform"], { duration: e.transitions.duration.shortest }),
|
|
507
|
+
[`&.${Y.checked}`]: { transform: "translateX(20px)" },
|
|
508
|
+
[`&.${Y.disabled}`]: { color: e.vars ? e.vars.palette.Switch.defaultDisabledColor : `${e.palette.mode === "light" ? e.palette.grey[100] : e.palette.grey[600]}` },
|
|
509
|
+
[`&.${Y.checked} + .${Y.track}`]: { opacity: .5 },
|
|
510
|
+
[`&.${Y.disabled} + .${Y.track}`]: { opacity: e.vars ? e.vars.opacity.switchTrackDisabled : `${e.palette.mode === "light" ? .12 : .2}` },
|
|
511
|
+
[`& .${Y.input}`]: {
|
|
512
|
+
left: "-100%",
|
|
513
|
+
width: "300%"
|
|
514
|
+
}
|
|
515
|
+
})), C(({ theme: e }) => ({
|
|
516
|
+
"&:hover": {
|
|
517
|
+
backgroundColor: e.alpha((e.vars || e).palette.action.active, (e.vars || e).palette.action.hoverOpacity),
|
|
518
|
+
"@media (hover: none)": { backgroundColor: "transparent" }
|
|
519
|
+
},
|
|
520
|
+
variants: [...Object.entries(e.palette).filter(s(["light"])).map(([t]) => ({
|
|
521
|
+
props: { color: t },
|
|
522
|
+
style: {
|
|
523
|
+
[`&.${Y.checked}`]: {
|
|
524
|
+
color: (e.vars || e).palette[t].main,
|
|
525
|
+
"&:hover": {
|
|
526
|
+
backgroundColor: e.alpha((e.vars || e).palette[t].main, (e.vars || e).palette.action.hoverOpacity),
|
|
527
|
+
"@media (hover: none)": { backgroundColor: "transparent" }
|
|
528
|
+
},
|
|
529
|
+
[`&.${Y.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)}` }
|
|
530
|
+
},
|
|
531
|
+
[`&.${Y.checked} + .${Y.track}`]: { backgroundColor: (e.vars || e).palette[t].main }
|
|
532
|
+
}
|
|
533
|
+
}))]
|
|
534
|
+
}))), Ue = T("span", {
|
|
535
|
+
name: "MuiSwitch",
|
|
536
|
+
slot: "Track"
|
|
537
|
+
})(C(({ theme: e }) => ({
|
|
538
|
+
height: "100%",
|
|
539
|
+
width: "100%",
|
|
540
|
+
borderRadius: 14 / 2,
|
|
541
|
+
boxSizing: "border-box",
|
|
542
|
+
border: "1px solid transparent",
|
|
543
|
+
zIndex: -1,
|
|
544
|
+
transition: e.transitions.create(["opacity", "background-color"], { duration: e.transitions.duration.shortest }),
|
|
545
|
+
backgroundColor: e.vars ? e.vars.palette.common.onBackground : `${e.palette.mode === "light" ? e.palette.common.black : e.palette.common.white}`,
|
|
546
|
+
opacity: e.vars ? e.vars.opacity.switchTrack : `${e.palette.mode === "light" ? .38 : .3}`
|
|
547
|
+
}))), We = T("span", {
|
|
548
|
+
name: "MuiSwitch",
|
|
549
|
+
slot: "Thumb"
|
|
550
|
+
})(C(({ theme: e }) => ({
|
|
551
|
+
boxShadow: (e.vars || e).shadows[1],
|
|
552
|
+
backgroundColor: "currentColor",
|
|
553
|
+
boxSizing: "border-box",
|
|
554
|
+
border: "1px solid transparent",
|
|
555
|
+
width: 20,
|
|
556
|
+
height: 20,
|
|
557
|
+
borderRadius: "50%"
|
|
558
|
+
}))), Ge = /*#__PURE__*/ U.forwardRef(function(e, t) {
|
|
559
|
+
let n = H({
|
|
560
|
+
props: e,
|
|
561
|
+
name: "MuiSwitch"
|
|
562
|
+
}), { className: r, color: i = "primary", edge: a = !1, size: o = "medium", sx: s, slots: c = {}, slotProps: l = {}, ...u } = n, d = {
|
|
563
|
+
...n,
|
|
564
|
+
color: i,
|
|
565
|
+
edge: a,
|
|
566
|
+
size: o
|
|
567
|
+
}, f = Be(d), p = l.input, m = {
|
|
568
|
+
slots: c,
|
|
569
|
+
slotProps: l
|
|
570
|
+
}, [h, g] = _("root", {
|
|
571
|
+
className: O(f.root, r),
|
|
572
|
+
elementType: Ve,
|
|
573
|
+
externalForwardedProps: m,
|
|
574
|
+
ownerState: d,
|
|
575
|
+
additionalProps: { sx: s }
|
|
576
|
+
}), [v, b] = _("thumb", {
|
|
577
|
+
className: f.thumb,
|
|
578
|
+
elementType: We,
|
|
579
|
+
externalForwardedProps: m,
|
|
580
|
+
ownerState: d
|
|
581
|
+
}), x = /*#__PURE__*/ K(v, { ...b }), [S, C] = _("track", {
|
|
582
|
+
className: f.track,
|
|
583
|
+
elementType: Ue,
|
|
584
|
+
externalForwardedProps: m,
|
|
585
|
+
ownerState: d
|
|
586
|
+
});
|
|
587
|
+
return /*#__PURE__*/ q(h, {
|
|
588
|
+
...g,
|
|
589
|
+
children: [/*#__PURE__*/ K(He, {
|
|
590
|
+
type: "checkbox",
|
|
591
|
+
icon: x,
|
|
592
|
+
checkedIcon: x,
|
|
593
|
+
ref: t,
|
|
594
|
+
ownerState: d,
|
|
595
|
+
...u,
|
|
596
|
+
classes: {
|
|
597
|
+
...f,
|
|
598
|
+
root: f.switchBase
|
|
599
|
+
},
|
|
600
|
+
slots: {
|
|
601
|
+
...c.switchBase && { root: c.switchBase },
|
|
602
|
+
...c.input && { input: c.input }
|
|
603
|
+
},
|
|
604
|
+
slotProps: {
|
|
605
|
+
...l.switchBase && { root: typeof l.switchBase == "function" ? l.switchBase(d) : l.switchBase },
|
|
606
|
+
input: y(typeof p == "function" ? p(d) : p, { role: "switch" })
|
|
607
|
+
}
|
|
608
|
+
}), /*#__PURE__*/ K(S, { ...C })]
|
|
609
|
+
});
|
|
610
|
+
}), Ke = /* @__PURE__ */ e(o(), 1), X = /* @__PURE__ */ e(S(), 1), qe = T(he)(() => ({ "& .MuiFormControlLabel-label": {
|
|
611
|
+
left: "-5px",
|
|
612
|
+
position: "relative"
|
|
613
|
+
} })), Je = T(Re)(() => ({ color: `${E.tertiary()} !important` })), Ye = ({ label: e, value: t, checked: n, onChange: r }) => /* @__PURE__ */ K(qe, {
|
|
614
|
+
value: t,
|
|
615
|
+
control: /* @__PURE__ */ K(Je, {
|
|
616
|
+
checked: n,
|
|
617
|
+
onChange: r
|
|
618
|
+
}),
|
|
619
|
+
label: e
|
|
620
|
+
});
|
|
621
|
+
Ye.propTypes = {
|
|
622
|
+
label: X.default.string,
|
|
623
|
+
value: X.default.string,
|
|
624
|
+
checked: X.default.bool,
|
|
625
|
+
onChange: X.default.func
|
|
626
|
+
};
|
|
627
|
+
//#endregion
|
|
628
|
+
//#region ../../lib-react/config-ui/dist/tabs/index.js
|
|
629
|
+
var Xe = T(L)(() => ({})), Ze = class extends W.Component {
|
|
630
|
+
static propTypes = {
|
|
631
|
+
className: X.default.string,
|
|
632
|
+
contentClassName: X.default.string,
|
|
633
|
+
contentStyle: X.default.object,
|
|
634
|
+
children: X.default.oneOfType([X.default.arrayOf(X.default.node), X.default.node]).isRequired
|
|
635
|
+
};
|
|
636
|
+
constructor(e) {
|
|
637
|
+
super(e), this.state = { value: 0 };
|
|
638
|
+
}
|
|
639
|
+
handleChange = (e, t) => {
|
|
640
|
+
this.setState({ value: t });
|
|
641
|
+
};
|
|
642
|
+
render() {
|
|
643
|
+
let { value: e } = this.state, { children: t, className: n, contentClassName: r, contentStyle: i = {} } = this.props;
|
|
644
|
+
return /* @__PURE__ */ q("div", {
|
|
645
|
+
className: n,
|
|
646
|
+
children: [/* @__PURE__ */ K(re, {
|
|
647
|
+
indicatorColor: "primary",
|
|
648
|
+
value: e,
|
|
649
|
+
onChange: this.handleChange,
|
|
650
|
+
children: W.Children.map(t, (e, t) => e && e.props.title ? /* @__PURE__ */ K(Xe, { label: e.props.title }, t) : null)
|
|
651
|
+
}), /* @__PURE__ */ K("div", {
|
|
652
|
+
className: r,
|
|
653
|
+
style: i,
|
|
654
|
+
children: t[e]
|
|
655
|
+
})]
|
|
656
|
+
});
|
|
657
|
+
}
|
|
658
|
+
}, Qe = T(he)(({ theme: e, mini: t }) => ({
|
|
659
|
+
margin: 0,
|
|
660
|
+
marginLeft: 0,
|
|
661
|
+
padding: 0,
|
|
662
|
+
"& .MuiFormControlLabel-label": {
|
|
663
|
+
fontSize: e.typography.fontSize - 1,
|
|
664
|
+
transform: "translate(-4%, 2%)",
|
|
665
|
+
color: "rgba(0,0,0,1.0)",
|
|
666
|
+
...t && {
|
|
667
|
+
marginLeft: e.spacing(1),
|
|
668
|
+
color: g[700],
|
|
669
|
+
fontSize: e.typography.fontSize - 3
|
|
670
|
+
}
|
|
671
|
+
}
|
|
672
|
+
})), $e = T(I)(({ theme: e, mini: t, error: n }) => ({
|
|
673
|
+
color: `${E.tertiary()} !important`,
|
|
674
|
+
...t && {
|
|
675
|
+
margin: 0,
|
|
676
|
+
padding: 0,
|
|
677
|
+
width: e.spacing(3),
|
|
678
|
+
height: e.spacing(3)
|
|
679
|
+
},
|
|
680
|
+
...n && { color: `${e.palette.error.main} !important` }
|
|
681
|
+
})), et = ({ mini: e, checked: t, onChange: n, value: r, label: i, error: a }) => /* @__PURE__ */ K(Qe, {
|
|
682
|
+
mini: e,
|
|
683
|
+
control: /* @__PURE__ */ K($e, {
|
|
684
|
+
checked: t,
|
|
685
|
+
onChange: n,
|
|
686
|
+
value: r,
|
|
687
|
+
mini: e,
|
|
688
|
+
error: a
|
|
689
|
+
}),
|
|
690
|
+
label: i
|
|
691
|
+
});
|
|
692
|
+
et.propTypes = {
|
|
693
|
+
mini: X.default.bool,
|
|
694
|
+
checked: X.default.bool.isRequired,
|
|
695
|
+
onChange: X.default.func.isRequired,
|
|
696
|
+
value: X.default.string,
|
|
697
|
+
label: X.default.string.isRequired,
|
|
698
|
+
error: X.default.bool
|
|
699
|
+
}, et.defaultProps = {
|
|
700
|
+
value: "",
|
|
701
|
+
mini: !1,
|
|
702
|
+
error: !1
|
|
703
|
+
};
|
|
704
|
+
//#endregion
|
|
705
|
+
//#region ../../lib-react/config-ui/dist/number-text-field.js
|
|
706
|
+
var tt = (0, Ke.default)("@pie-lib:config-ui:number-text-field"), nt = T(N)(({ theme: e }) => ({
|
|
707
|
+
marginRight: e.spacing(1),
|
|
708
|
+
"& .MuiInputLabel-root": {
|
|
709
|
+
width: "auto",
|
|
710
|
+
minWidth: "max-content",
|
|
711
|
+
maxWidth: "none",
|
|
712
|
+
whiteSpace: "nowrap",
|
|
713
|
+
overflow: "visible",
|
|
714
|
+
transform: "translate(0, 8px) scale(0.75)",
|
|
715
|
+
transformOrigin: "top left",
|
|
716
|
+
position: "relative"
|
|
717
|
+
},
|
|
718
|
+
"& .MuiInputBase-root, & .MuiInput-root, & .MuiFilledInput-root, & .MuiOutlinedInput-root": {
|
|
719
|
+
height: "auto",
|
|
720
|
+
minHeight: "auto",
|
|
721
|
+
marginTop: 0
|
|
722
|
+
},
|
|
723
|
+
"& .MuiInputBase-input": {
|
|
724
|
+
height: "auto",
|
|
725
|
+
minHeight: "auto",
|
|
726
|
+
padding: "6px 0 7px"
|
|
727
|
+
}
|
|
728
|
+
})), rt = (e, t) => {
|
|
729
|
+
if (!r(e) && !r(t)) return 0;
|
|
730
|
+
if (!r(e) && r(t)) return t;
|
|
731
|
+
if (r(e)) return e;
|
|
732
|
+
}, it = class extends W.Component {
|
|
733
|
+
static propTypes = {
|
|
734
|
+
disabled: X.default.bool,
|
|
735
|
+
className: X.default.string,
|
|
736
|
+
inputClassName: X.default.string,
|
|
737
|
+
onChange: X.default.func.isRequired,
|
|
738
|
+
value: X.default.number,
|
|
739
|
+
min: X.default.number,
|
|
740
|
+
max: X.default.number,
|
|
741
|
+
label: X.default.string,
|
|
742
|
+
suffix: X.default.string,
|
|
743
|
+
showErrorWhenOutsideRange: X.default.bool,
|
|
744
|
+
disableUnderline: X.default.bool,
|
|
745
|
+
variant: X.default.string
|
|
746
|
+
};
|
|
747
|
+
static defaultProps = { showErrorWhenOutsideRange: !1 };
|
|
748
|
+
constructor(e) {
|
|
749
|
+
super(e);
|
|
750
|
+
let t = this.clamp(e.value);
|
|
751
|
+
this.state = { value: t }, t !== e.value && this.props.onChange({}, t), this.onChange = this.onChange.bind(this);
|
|
752
|
+
}
|
|
753
|
+
UNSAFE_componentWillReceiveProps(e) {
|
|
754
|
+
let t = this.clamp(e.value, e.min, e.max);
|
|
755
|
+
this.setState({ value: t });
|
|
756
|
+
}
|
|
757
|
+
clamp(e, t = this.props.min, n = this.props.max) {
|
|
758
|
+
return r(e) ? (r(n) && (e = Math.min(e, n)), r(t) && (e = Math.max(e, t)), e) : rt(t, n);
|
|
759
|
+
}
|
|
760
|
+
onBlur = (e) => {
|
|
761
|
+
let t = e.target.value, n = parseFloat(t);
|
|
762
|
+
tt("rawNumber: ", n);
|
|
763
|
+
let r = this.clamp(n);
|
|
764
|
+
tt("number: ", r), r !== this.state.value && (tt("trigger update..."), this.setState({ value: r.toString() }, () => {
|
|
765
|
+
this.props.onChange(e, r);
|
|
766
|
+
}));
|
|
767
|
+
};
|
|
768
|
+
onChange(e) {
|
|
769
|
+
let t = e.target.value;
|
|
770
|
+
this.setState({ value: t });
|
|
771
|
+
}
|
|
772
|
+
errorMessage = () => {
|
|
773
|
+
let { min: e, max: t } = this.props;
|
|
774
|
+
if (e && t) return `The value must be between ${e} and ${t}`;
|
|
775
|
+
if (e) return `The value must be greater than ${e}`;
|
|
776
|
+
if (t) return `The value must be less than ${t}`;
|
|
777
|
+
};
|
|
778
|
+
getError = () => {
|
|
779
|
+
let { value: e } = this.state, t = parseFloat(e);
|
|
780
|
+
if (this.clamp(t) !== t) return this.errorMessage();
|
|
781
|
+
};
|
|
782
|
+
render() {
|
|
783
|
+
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();
|
|
784
|
+
return /* @__PURE__ */ K(nt, {
|
|
785
|
+
variant: s ? "filled" : l || "standard",
|
|
786
|
+
inputRef: (e) => {
|
|
787
|
+
this.inputRef = e;
|
|
788
|
+
},
|
|
789
|
+
disabled: n,
|
|
790
|
+
label: t,
|
|
791
|
+
InputLabelProps: { shrink: !0 },
|
|
792
|
+
value: this.state.value,
|
|
793
|
+
error: !!u,
|
|
794
|
+
helperText: u,
|
|
795
|
+
onChange: this.onChange,
|
|
796
|
+
onBlur: this.onBlur,
|
|
797
|
+
onKeyDown: (e) => {
|
|
798
|
+
e.key === "Enter" && this.inputRef && this.inputRef.blur();
|
|
799
|
+
},
|
|
800
|
+
type: "number",
|
|
801
|
+
className: e,
|
|
802
|
+
slotProps: { input: {
|
|
803
|
+
endAdornment: r && /* @__PURE__ */ K(Se, {
|
|
804
|
+
position: "end",
|
|
805
|
+
children: r
|
|
806
|
+
}),
|
|
807
|
+
className: o,
|
|
808
|
+
inputProps: {
|
|
809
|
+
min: i,
|
|
810
|
+
max: a
|
|
811
|
+
}
|
|
812
|
+
} },
|
|
813
|
+
margin: "normal"
|
|
814
|
+
});
|
|
815
|
+
}
|
|
816
|
+
}, at = (e) => typeof e == "object" && !!e && typeof e.n == "number" && typeof e.d == "number", ot = (e) => {
|
|
817
|
+
if (typeof e == "number") return e;
|
|
818
|
+
if (at(e)) return (e.s ?? 1) * e.n / e.d;
|
|
819
|
+
let t = String(e).trim(), n = t.match(/^([+-]?\d+)\s*\/\s*([+-]?\d+)$/);
|
|
820
|
+
return n ? Number.parseInt(n[1] ?? "0", 10) / Number.parseInt(n[2] ?? "1", 10) : Number(t);
|
|
821
|
+
}, st = x(/*#__PURE__*/ K("path", { d: "M19 13H5v-2h14z" }), "Remove"), ct = x(/*#__PURE__*/ K("path", { d: "M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6z" }), "Add"), lt = T(N)(() => ({
|
|
822
|
+
"& input[type=number]": { MozAppearance: "textfield" },
|
|
823
|
+
"& input[type=number]::-webkit-outer-spin-button": {
|
|
824
|
+
WebkitAppearance: "none",
|
|
825
|
+
margin: 0
|
|
826
|
+
},
|
|
827
|
+
"& input[type=number]::-webkit-inner-spin-button": {
|
|
828
|
+
WebkitAppearance: "none",
|
|
829
|
+
margin: 0
|
|
830
|
+
}
|
|
831
|
+
})), ut = T(j)(() => ({ padding: "2px" })), dt = (e, t) => {
|
|
832
|
+
if (!r(e) && !r(t)) return 0;
|
|
833
|
+
if (!r(e) && r(t)) return t;
|
|
834
|
+
if (r(e)) return e;
|
|
835
|
+
}, ft = class extends W.Component {
|
|
836
|
+
static propTypes = {
|
|
837
|
+
className: X.default.string,
|
|
838
|
+
customValues: X.default.array,
|
|
839
|
+
disabled: X.default.bool,
|
|
840
|
+
error: X.default.bool,
|
|
841
|
+
inputClassName: X.default.string,
|
|
842
|
+
helperText: X.default.string,
|
|
843
|
+
onChange: X.default.func.isRequired,
|
|
844
|
+
onlyIntegersAllowed: X.default.bool,
|
|
845
|
+
value: X.default.any,
|
|
846
|
+
min: X.default.number,
|
|
847
|
+
max: X.default.number,
|
|
848
|
+
step: X.default.number,
|
|
849
|
+
label: X.default.string,
|
|
850
|
+
disableUnderline: X.default.bool,
|
|
851
|
+
textAlign: X.default.string,
|
|
852
|
+
variant: X.default.string,
|
|
853
|
+
type: X.default.string
|
|
854
|
+
};
|
|
855
|
+
static defaultProps = {
|
|
856
|
+
step: 1,
|
|
857
|
+
customValues: [],
|
|
858
|
+
textAlign: "center",
|
|
859
|
+
variant: "standard",
|
|
860
|
+
onlyIntegersAllowed: !1
|
|
861
|
+
};
|
|
862
|
+
constructor(e) {
|
|
863
|
+
super(e);
|
|
864
|
+
let { value: t, currentIndex: n } = this.normalizeValueAndIndex(e.customValues, e.value);
|
|
865
|
+
this.state = {
|
|
866
|
+
value: t,
|
|
867
|
+
currentIndex: n
|
|
868
|
+
}, t !== e.value && this.props.onChange({}, t), this.onChange = this.onChange.bind(this);
|
|
869
|
+
}
|
|
870
|
+
UNSAFE_componentWillReceiveProps(e) {
|
|
871
|
+
let { value: t, currentIndex: n } = this.normalizeValueAndIndex(e.customValues, e.value, e.min, e.max);
|
|
872
|
+
this.setState({
|
|
873
|
+
value: t,
|
|
874
|
+
currentIndex: n
|
|
875
|
+
});
|
|
876
|
+
}
|
|
877
|
+
clamp(e, t = this.props.min, n = this.props.max) {
|
|
878
|
+
let { customValues: i } = this.props;
|
|
879
|
+
return (i || []).length > 0 ? e : r(e) ? (r(n) && (e = Math.min(e, n)), r(t) && (e = Math.max(e, t)), e) : dt(t, n);
|
|
880
|
+
}
|
|
881
|
+
normalizeValueAndIndex = (e, t, n, r) => {
|
|
882
|
+
let { type: i } = this.props, a = this.clamp(t, n, r), o = (e || []).findIndex((e) => e === a);
|
|
883
|
+
if ((e || []).length > 0 && o === -1) {
|
|
884
|
+
let t = i === "text" ? this.getClosestFractionValue(e, a) : this.getClosestValue(e, a);
|
|
885
|
+
return {
|
|
886
|
+
value: t.value,
|
|
887
|
+
currentIndex: t.index
|
|
888
|
+
};
|
|
889
|
+
}
|
|
890
|
+
return {
|
|
891
|
+
value: a,
|
|
892
|
+
currentIndex: o
|
|
893
|
+
};
|
|
894
|
+
};
|
|
895
|
+
getClosestValue = (e, t) => e.reduce((e, n, r) => Math.abs(n - t) < Math.abs(e.value - t) ? {
|
|
896
|
+
value: n,
|
|
897
|
+
index: r
|
|
898
|
+
} : e, {
|
|
899
|
+
value: e[0],
|
|
900
|
+
index: 0
|
|
901
|
+
});
|
|
902
|
+
getClosestFractionValue = (e, t) => e.reduce((e, n, r) => Math.abs(ot(n) - ot(t)) < Math.abs(ot(e.value) - ot(t)) ? {
|
|
903
|
+
value: n,
|
|
904
|
+
index: r
|
|
905
|
+
} : e, {
|
|
906
|
+
value: e[0],
|
|
907
|
+
index: 0
|
|
908
|
+
});
|
|
909
|
+
getValidFraction = (e) => {
|
|
910
|
+
if (this.isPositiveInteger(e.trim())) return e.trim();
|
|
911
|
+
if (e.trim() === "" || e.trim().split("/").length !== 2) return !1;
|
|
912
|
+
let [t, n] = e.trim().split("/");
|
|
913
|
+
return isNaN(t) || isNaN(n) || (t = parseFloat(t), n = parseFloat(n), !Number.isInteger(t) || !Number.isInteger(n)) || t < 0 || n < 1 ? !1 : t + "/" + n;
|
|
914
|
+
};
|
|
915
|
+
isPositiveInteger = (e) => e >>> 0 === parseFloat(e);
|
|
916
|
+
onBlur = (e) => {
|
|
917
|
+
let { customValues: t, onlyIntegersAllowed: n, type: r } = this.props, { value: i } = e.target;
|
|
918
|
+
r === "text" && (i = this.getValidFraction(i) || this.props.value);
|
|
919
|
+
let a = n ? Math.round(parseFloat(i)) : parseFloat(i);
|
|
920
|
+
r === "text" && (a = i.trim());
|
|
921
|
+
let { value: o, currentIndex: s } = this.normalizeValueAndIndex(t, a);
|
|
922
|
+
this.setState({
|
|
923
|
+
value: o.toString(),
|
|
924
|
+
currentIndex: s
|
|
925
|
+
}, () => this.props.onChange(e, o));
|
|
926
|
+
};
|
|
927
|
+
onChange(e) {
|
|
928
|
+
let { type: t } = this.props, { value: n } = e.target;
|
|
929
|
+
t !== "text" && typeof n == "string" && n.trim() === "" || this.setState({ value: n });
|
|
930
|
+
}
|
|
931
|
+
changeValue(e, t = 1, n = !1) {
|
|
932
|
+
e.preventDefault();
|
|
933
|
+
let { customValues: r, step: i, onlyIntegersAllowed: a, onChange: o } = this.props, { currentIndex: s, value: c } = this.state, l = s + t * 1, u;
|
|
934
|
+
if (r.length > 0) {
|
|
935
|
+
if (l < 0 || l >= r.length) return;
|
|
936
|
+
u = r[l];
|
|
937
|
+
} else {
|
|
938
|
+
let e = ((a ? parseInt(c) : parseFloat(c)) * 1e4 + i * t * 1e4) / 1e4;
|
|
939
|
+
u = this.clamp(e);
|
|
940
|
+
}
|
|
941
|
+
this.setState({
|
|
942
|
+
value: u.toString(),
|
|
943
|
+
currentIndex: l
|
|
944
|
+
}, () => {
|
|
945
|
+
n && o(e, u);
|
|
946
|
+
});
|
|
947
|
+
}
|
|
948
|
+
render() {
|
|
949
|
+
let { className: e, label: t, disabled: n, error: i, min: a, max: o, customValues: s, inputClassName: c, disableUnderline: l, helperText: u, variant: d, textAlign: f, type: p = "number" } = this.props, { value: m } = this.state, h = e, g = !1, _ = !1;
|
|
950
|
+
return s.length > 0 ? (g = m === s[0], _ = m === s[s.length - 1]) : r(a) && r(o) && (g = m === a, _ = m === o), /* @__PURE__ */ K(lt, {
|
|
951
|
+
variant: d,
|
|
952
|
+
inputRef: (e) => this.inputRef = e,
|
|
953
|
+
disabled: n,
|
|
954
|
+
label: t,
|
|
955
|
+
value: m,
|
|
956
|
+
error: i,
|
|
957
|
+
helperText: u,
|
|
958
|
+
onChange: this.onChange,
|
|
959
|
+
onBlur: this.onBlur,
|
|
960
|
+
onKeyPress: (e) => {
|
|
961
|
+
e.key === "Enter" && this.inputRef && this.inputRef.blur();
|
|
962
|
+
},
|
|
963
|
+
onKeyDown: (e) => {
|
|
964
|
+
e.key === "ArrowUp" && this.changeValue(e), e.key === "ArrowDown" && this.changeValue(e, -1);
|
|
965
|
+
},
|
|
966
|
+
title: "",
|
|
967
|
+
type: p,
|
|
968
|
+
className: h,
|
|
969
|
+
InputProps: {
|
|
970
|
+
className: c,
|
|
971
|
+
disableUnderline: l,
|
|
972
|
+
startAdornment: /* @__PURE__ */ K(Se, {
|
|
973
|
+
position: "start",
|
|
974
|
+
children: /* @__PURE__ */ K(ut, {
|
|
975
|
+
disabled: n || g,
|
|
976
|
+
onClick: (e) => this.changeValue(e, -1, !0),
|
|
977
|
+
size: "large",
|
|
978
|
+
children: /* @__PURE__ */ K(st, { fontSize: "small" })
|
|
979
|
+
})
|
|
980
|
+
}),
|
|
981
|
+
endAdornment: /* @__PURE__ */ K(Se, {
|
|
982
|
+
position: "end",
|
|
983
|
+
children: /* @__PURE__ */ K(ut, {
|
|
984
|
+
disabled: n || _,
|
|
985
|
+
onClick: (e) => this.changeValue(e, 1, !0),
|
|
986
|
+
size: "large",
|
|
987
|
+
children: /* @__PURE__ */ K(ct, { fontSize: "small" })
|
|
988
|
+
})
|
|
989
|
+
})
|
|
990
|
+
},
|
|
991
|
+
inputProps: {
|
|
992
|
+
style: { textAlign: f },
|
|
993
|
+
min: a,
|
|
994
|
+
max: o
|
|
995
|
+
}
|
|
996
|
+
});
|
|
997
|
+
}
|
|
998
|
+
};
|
|
999
|
+
//#endregion
|
|
1000
|
+
//#region ../../lib-react/config-ui/dist/two-choice.js
|
|
1001
|
+
function pt(e) {
|
|
1002
|
+
return typeof e == "function" || typeof e == "object" && !!e && typeof e.$$typeof == "symbol";
|
|
1003
|
+
}
|
|
1004
|
+
function mt(e, t) {
|
|
1005
|
+
return !e || pt(e) ? e : pt(e.default) ? e.default : t && pt(e[t]) ? e[t] : t && pt(e[t]?.default) ? e[t].default : e;
|
|
1006
|
+
}
|
|
1007
|
+
var ht = mt(c, "InputContainer") || mt(vt.InputContainer, "InputContainer"), gt = ie, _t = gt.default, vt = _t && typeof _t == "object" ? _t : gt, yt = T("div")(({ theme: e, direction: t }) => ({
|
|
1008
|
+
display: "flex",
|
|
1009
|
+
flexWrap: "wrap",
|
|
1010
|
+
paddingLeft: 0,
|
|
1011
|
+
marginTop: e.spacing(1),
|
|
1012
|
+
...t === "vertical" && { flexDirection: "column" }
|
|
1013
|
+
})), bt = class extends W.Component {
|
|
1014
|
+
static propTypes = {
|
|
1015
|
+
header: X.default.string.isRequired,
|
|
1016
|
+
className: X.default.string,
|
|
1017
|
+
customLabel: X.default.func,
|
|
1018
|
+
opts: X.default.array.isRequired,
|
|
1019
|
+
value: X.default.string,
|
|
1020
|
+
onChange: X.default.func.isRequired,
|
|
1021
|
+
direction: X.default.oneOf(["horizontal", "vertical"])
|
|
1022
|
+
};
|
|
1023
|
+
handleChange = (e) => {
|
|
1024
|
+
this.props.onChange(e.currentTarget.value);
|
|
1025
|
+
};
|
|
1026
|
+
render() {
|
|
1027
|
+
let { header: e, className: t, customLabel: n, opts: r, value: i, direction: a } = this.props, o = r.map((e) => typeof e == "string" ? {
|
|
1028
|
+
label: e,
|
|
1029
|
+
value: e
|
|
1030
|
+
} : e), s = n || Ye;
|
|
1031
|
+
return /* @__PURE__ */ K(ht, {
|
|
1032
|
+
label: e,
|
|
1033
|
+
className: t,
|
|
1034
|
+
children: /* @__PURE__ */ K(yt, {
|
|
1035
|
+
direction: a,
|
|
1036
|
+
children: o.map((e, t) => /* @__PURE__ */ K(s, {
|
|
1037
|
+
value: e.value,
|
|
1038
|
+
checked: e.value === i,
|
|
1039
|
+
onChange: this.handleChange,
|
|
1040
|
+
label: e.label
|
|
1041
|
+
}, t))
|
|
1042
|
+
})
|
|
1043
|
+
});
|
|
1044
|
+
}
|
|
1045
|
+
}, xt = X.default.shape({
|
|
1046
|
+
label: X.default.string,
|
|
1047
|
+
value: X.default.string
|
|
1048
|
+
});
|
|
1049
|
+
(class extends W.Component {
|
|
1050
|
+
static propTypes = {
|
|
1051
|
+
header: X.default.string.isRequired,
|
|
1052
|
+
value: X.default.string.isRequired,
|
|
1053
|
+
onChange: X.default.func.isRequired,
|
|
1054
|
+
one: X.default.oneOfType([xt, X.default.string]),
|
|
1055
|
+
two: X.default.oneOfType([xt, X.default.string]),
|
|
1056
|
+
className: X.default.string,
|
|
1057
|
+
customLabel: X.default.func
|
|
1058
|
+
};
|
|
1059
|
+
render() {
|
|
1060
|
+
let { one: e, two: t, header: n, className: r, customLabel: i, value: a, onChange: o } = this.props;
|
|
1061
|
+
return /* @__PURE__ */ K(bt, {
|
|
1062
|
+
customLabel: i,
|
|
1063
|
+
header: n,
|
|
1064
|
+
className: r,
|
|
1065
|
+
opts: [e, t],
|
|
1066
|
+
value: a,
|
|
1067
|
+
onChange: o
|
|
1068
|
+
});
|
|
1069
|
+
}
|
|
1070
|
+
});
|
|
1071
|
+
//#endregion
|
|
1072
|
+
//#region ../../lib-react/config-ui/dist/_virtual/_rolldown/runtime.js
|
|
1073
|
+
var St = Object.defineProperty, Ct = (e, t) => {
|
|
1074
|
+
let n = {};
|
|
1075
|
+
for (var r in e) St(n, r, {
|
|
1076
|
+
get: e[r],
|
|
1077
|
+
enumerable: !0
|
|
1078
|
+
});
|
|
1079
|
+
return t || St(n, Symbol.toStringTag, { value: "Module" }), n;
|
|
1080
|
+
}, wt = T("div")(() => ({
|
|
1081
|
+
display: "flex",
|
|
1082
|
+
flexDirection: "column",
|
|
1083
|
+
position: "relative"
|
|
1084
|
+
})), Tt = T("div")(() => ({
|
|
1085
|
+
display: "flex",
|
|
1086
|
+
justifyContent: "space-between"
|
|
1087
|
+
})), Et = T("div")(({ theme: e }) => ({ padding: `${e.spacing(2)} 0` })), Dt = T("div")(() => ({ flex: "1" })), Ot = T("div")(({ theme: e }) => ({ marginLeft: e.spacing(2) })), kt = class extends W.Component {
|
|
1088
|
+
static propTypes = {
|
|
1089
|
+
mode: X.default.oneOf(["tabbed", "inline"]),
|
|
1090
|
+
secondary: X.default.oneOfType([X.default.arrayOf(X.default.node), X.default.node]),
|
|
1091
|
+
children: X.default.oneOfType([X.default.arrayOf(X.default.node), X.default.node]),
|
|
1092
|
+
dimensions: X.default.object
|
|
1093
|
+
};
|
|
1094
|
+
getConfiguration = () => {
|
|
1095
|
+
let { secondary: e } = this.props;
|
|
1096
|
+
return e?.props?.configuration || e?.props?.children?.props?.configuration || void 0;
|
|
1097
|
+
};
|
|
1098
|
+
render() {
|
|
1099
|
+
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);
|
|
1100
|
+
if (!l) try {
|
|
1101
|
+
l = JSON.stringify(c)?.match(/settings":true/)?.length;
|
|
1102
|
+
} catch (e) {
|
|
1103
|
+
console.log(e.toString());
|
|
1104
|
+
}
|
|
1105
|
+
return /* @__PURE__ */ q(wt, {
|
|
1106
|
+
style: {
|
|
1107
|
+
minHeight: i,
|
|
1108
|
+
minWidth: a,
|
|
1109
|
+
maxHeight: o,
|
|
1110
|
+
maxWidth: s
|
|
1111
|
+
},
|
|
1112
|
+
children: [
|
|
1113
|
+
e === "inline" && /* @__PURE__ */ q(Tt, { children: [/* @__PURE__ */ K(Dt, {
|
|
1114
|
+
className: "design-container",
|
|
1115
|
+
children: n
|
|
1116
|
+
}), l && /* @__PURE__ */ K(Ot, {
|
|
1117
|
+
className: "settings-container",
|
|
1118
|
+
children: t
|
|
1119
|
+
})] }),
|
|
1120
|
+
e === "tabbed" && l && /* @__PURE__ */ q(Ze, {
|
|
1121
|
+
onChange: this.onTabsChange,
|
|
1122
|
+
contentClassName: "content-container",
|
|
1123
|
+
indicatorColor: "primary",
|
|
1124
|
+
children: [/* @__PURE__ */ K(Et, {
|
|
1125
|
+
title: "Design",
|
|
1126
|
+
className: "design-container",
|
|
1127
|
+
children: n
|
|
1128
|
+
}), /* @__PURE__ */ K(Et, {
|
|
1129
|
+
title: "Settings",
|
|
1130
|
+
className: "settings-container",
|
|
1131
|
+
children: t
|
|
1132
|
+
})]
|
|
1133
|
+
}),
|
|
1134
|
+
e === "tabbed" && !l && /* @__PURE__ */ K(Et, {
|
|
1135
|
+
className: "design-container",
|
|
1136
|
+
children: n
|
|
1137
|
+
})
|
|
1138
|
+
]
|
|
1139
|
+
});
|
|
1140
|
+
}
|
|
1141
|
+
};
|
|
1142
|
+
//#endregion
|
|
1143
|
+
//#region ../../lib-react/config-ui/dist/node_modules/.bun/@babel_runtime@7.29.7/node_modules/@babel/runtime/helpers/esm/extends.js
|
|
1144
|
+
function At() {
|
|
1145
|
+
return At = Object.assign ? Object.assign.bind() : function(e) {
|
|
1146
|
+
for (var t = 1; t < arguments.length; t++) {
|
|
1147
|
+
var n = arguments[t];
|
|
1148
|
+
for (var r in n) ({}).hasOwnProperty.call(n, r) && (e[r] = n[r]);
|
|
1149
|
+
}
|
|
1150
|
+
return e;
|
|
1151
|
+
}, At.apply(null, arguments);
|
|
1152
|
+
}
|
|
1153
|
+
//#endregion
|
|
1154
|
+
//#region ../../lib-react/config-ui/dist/node_modules/.bun/@babel_runtime@7.29.7/node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js
|
|
1155
|
+
function jt(e, t) {
|
|
1156
|
+
if (e == null) return {};
|
|
1157
|
+
var n = {};
|
|
1158
|
+
for (var r in e) if ({}.hasOwnProperty.call(e, r)) {
|
|
1159
|
+
if (t.indexOf(r) !== -1) continue;
|
|
1160
|
+
n[r] = e[r];
|
|
1161
|
+
}
|
|
1162
|
+
return n;
|
|
1163
|
+
}
|
|
1164
|
+
//#endregion
|
|
1165
|
+
//#region ../../lib-react/config-ui/dist/node_modules/.bun/@babel_runtime@7.29.7/node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js
|
|
1166
|
+
function Mt(e, t) {
|
|
1167
|
+
return Mt = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(e, t) {
|
|
1168
|
+
return e.__proto__ = t, e;
|
|
1169
|
+
}, Mt(e, t);
|
|
1170
|
+
}
|
|
1171
|
+
//#endregion
|
|
1172
|
+
//#region ../../lib-react/config-ui/dist/node_modules/.bun/@babel_runtime@7.29.7/node_modules/@babel/runtime/helpers/esm/inheritsLoose.js
|
|
1173
|
+
function Nt(e, t) {
|
|
1174
|
+
e.prototype = Object.create(t.prototype), e.prototype.constructor = e, Mt(e, t);
|
|
1175
|
+
}
|
|
1176
|
+
//#endregion
|
|
1177
|
+
//#region ../../lib-react/config-ui/dist/node_modules/.bun/resize-observer-polyfill@1.5.1/node_modules/resize-observer-polyfill/dist/ResizeObserver.es.js
|
|
1178
|
+
var Pt = (function() {
|
|
1179
|
+
if (typeof Map < "u") return Map;
|
|
1180
|
+
function e(e, t) {
|
|
1181
|
+
var n = -1;
|
|
1182
|
+
return e.some(function(e, r) {
|
|
1183
|
+
return e[0] === t ? (n = r, !0) : !1;
|
|
1184
|
+
}), n;
|
|
1185
|
+
}
|
|
1186
|
+
return function() {
|
|
1187
|
+
function t() {
|
|
1188
|
+
this.__entries__ = [];
|
|
1189
|
+
}
|
|
1190
|
+
return Object.defineProperty(t.prototype, "size", {
|
|
1191
|
+
get: function() {
|
|
1192
|
+
return this.__entries__.length;
|
|
1193
|
+
},
|
|
1194
|
+
enumerable: !0,
|
|
1195
|
+
configurable: !0
|
|
1196
|
+
}), t.prototype.get = function(t) {
|
|
1197
|
+
var n = e(this.__entries__, t), r = this.__entries__[n];
|
|
1198
|
+
return r && r[1];
|
|
1199
|
+
}, t.prototype.set = function(t, n) {
|
|
1200
|
+
var r = e(this.__entries__, t);
|
|
1201
|
+
~r ? this.__entries__[r][1] = n : this.__entries__.push([t, n]);
|
|
1202
|
+
}, t.prototype.delete = function(t) {
|
|
1203
|
+
var n = this.__entries__, r = e(n, t);
|
|
1204
|
+
~r && n.splice(r, 1);
|
|
1205
|
+
}, t.prototype.has = function(t) {
|
|
1206
|
+
return !!~e(this.__entries__, t);
|
|
1207
|
+
}, t.prototype.clear = function() {
|
|
1208
|
+
this.__entries__.splice(0);
|
|
1209
|
+
}, t.prototype.forEach = function(e, t) {
|
|
1210
|
+
t === void 0 && (t = null);
|
|
1211
|
+
for (var n = 0, r = this.__entries__; n < r.length; n++) {
|
|
1212
|
+
var i = r[n];
|
|
1213
|
+
e.call(t, i[1], i[0]);
|
|
1214
|
+
}
|
|
1215
|
+
}, t;
|
|
1216
|
+
}();
|
|
1217
|
+
})(), Ft = typeof window < "u" && typeof document < "u" && window.document === document, It = (function() {
|
|
1218
|
+
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")();
|
|
1219
|
+
})(), Lt = (function() {
|
|
1220
|
+
return typeof requestAnimationFrame == "function" ? requestAnimationFrame.bind(It) : function(e) {
|
|
1221
|
+
return setTimeout(function() {
|
|
1222
|
+
return e(Date.now());
|
|
1223
|
+
}, 1e3 / 60);
|
|
1224
|
+
};
|
|
1225
|
+
})(), Rt = 2;
|
|
1226
|
+
function zt(e, t) {
|
|
1227
|
+
var n = !1, r = !1, i = 0;
|
|
1228
|
+
function a() {
|
|
1229
|
+
n && (n = !1, e()), r && s();
|
|
1230
|
+
}
|
|
1231
|
+
function o() {
|
|
1232
|
+
Lt(a);
|
|
1233
|
+
}
|
|
1234
|
+
function s() {
|
|
1235
|
+
var e = Date.now();
|
|
1236
|
+
if (n) {
|
|
1237
|
+
if (e - i < Rt) return;
|
|
1238
|
+
r = !0;
|
|
1239
|
+
} else n = !0, r = !1, setTimeout(o, t);
|
|
1240
|
+
i = e;
|
|
1241
|
+
}
|
|
1242
|
+
return s;
|
|
1243
|
+
}
|
|
1244
|
+
var Bt = 20, Vt = [
|
|
1245
|
+
"top",
|
|
1246
|
+
"right",
|
|
1247
|
+
"bottom",
|
|
1248
|
+
"left",
|
|
1249
|
+
"width",
|
|
1250
|
+
"height",
|
|
1251
|
+
"size",
|
|
1252
|
+
"weight"
|
|
1253
|
+
], Ht = typeof MutationObserver < "u", Ut = function() {
|
|
1254
|
+
function e() {
|
|
1255
|
+
this.connected_ = !1, this.mutationEventsAdded_ = !1, this.mutationsObserver_ = null, this.observers_ = [], this.onTransitionEnd_ = this.onTransitionEnd_.bind(this), this.refresh = zt(this.refresh.bind(this), Bt);
|
|
1256
|
+
}
|
|
1257
|
+
return e.prototype.addObserver = function(e) {
|
|
1258
|
+
~this.observers_.indexOf(e) || this.observers_.push(e), this.connected_ || this.connect_();
|
|
1259
|
+
}, e.prototype.removeObserver = function(e) {
|
|
1260
|
+
var t = this.observers_, n = t.indexOf(e);
|
|
1261
|
+
~n && t.splice(n, 1), !t.length && this.connected_ && this.disconnect_();
|
|
1262
|
+
}, e.prototype.refresh = function() {
|
|
1263
|
+
this.updateObservers_() && this.refresh();
|
|
1264
|
+
}, e.prototype.updateObservers_ = function() {
|
|
1265
|
+
var e = this.observers_.filter(function(e) {
|
|
1266
|
+
return e.gatherActive(), e.hasActive();
|
|
1267
|
+
});
|
|
1268
|
+
return e.forEach(function(e) {
|
|
1269
|
+
return e.broadcastActive();
|
|
1270
|
+
}), e.length > 0;
|
|
1271
|
+
}, e.prototype.connect_ = function() {
|
|
1272
|
+
!Ft || this.connected_ || (document.addEventListener("transitionend", this.onTransitionEnd_), window.addEventListener("resize", this.refresh), Ht ? (this.mutationsObserver_ = new MutationObserver(this.refresh), this.mutationsObserver_.observe(document, {
|
|
1273
|
+
attributes: !0,
|
|
1274
|
+
childList: !0,
|
|
1275
|
+
characterData: !0,
|
|
1276
|
+
subtree: !0
|
|
1277
|
+
})) : (document.addEventListener("DOMSubtreeModified", this.refresh), this.mutationEventsAdded_ = !0), this.connected_ = !0);
|
|
1278
|
+
}, e.prototype.disconnect_ = function() {
|
|
1279
|
+
!Ft || !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);
|
|
1280
|
+
}, e.prototype.onTransitionEnd_ = function(e) {
|
|
1281
|
+
var t = e.propertyName, n = t === void 0 ? "" : t;
|
|
1282
|
+
Vt.some(function(e) {
|
|
1283
|
+
return !!~n.indexOf(e);
|
|
1284
|
+
}) && this.refresh();
|
|
1285
|
+
}, e.getInstance = function() {
|
|
1286
|
+
return this.instance_ ||= new e(), this.instance_;
|
|
1287
|
+
}, e.instance_ = null, e;
|
|
1288
|
+
}(), Wt = (function(e, t) {
|
|
1289
|
+
for (var n = 0, r = Object.keys(t); n < r.length; n++) {
|
|
1290
|
+
var i = r[n];
|
|
1291
|
+
Object.defineProperty(e, i, {
|
|
1292
|
+
value: t[i],
|
|
1293
|
+
enumerable: !1,
|
|
1294
|
+
writable: !1,
|
|
1295
|
+
configurable: !0
|
|
1296
|
+
});
|
|
1297
|
+
}
|
|
1298
|
+
return e;
|
|
1299
|
+
}), Z = (function(e) {
|
|
1300
|
+
return e && e.ownerDocument && e.ownerDocument.defaultView || It;
|
|
1301
|
+
}), Gt = tn(0, 0, 0, 0);
|
|
1302
|
+
function Kt(e) {
|
|
1303
|
+
return parseFloat(e) || 0;
|
|
1304
|
+
}
|
|
1305
|
+
function qt(e) {
|
|
1306
|
+
return [...arguments].slice(1).reduce(function(t, n) {
|
|
1307
|
+
var r = e["border-" + n + "-width"];
|
|
1308
|
+
return t + Kt(r);
|
|
1309
|
+
}, 0);
|
|
1310
|
+
}
|
|
1311
|
+
function Jt(e) {
|
|
1312
|
+
for (var t = [
|
|
1313
|
+
"top",
|
|
1314
|
+
"right",
|
|
1315
|
+
"bottom",
|
|
1316
|
+
"left"
|
|
1317
|
+
], n = {}, r = 0, i = t; r < i.length; r++) {
|
|
1318
|
+
var a = i[r], o = e["padding-" + a];
|
|
1319
|
+
n[a] = Kt(o);
|
|
1320
|
+
}
|
|
1321
|
+
return n;
|
|
1322
|
+
}
|
|
1323
|
+
function Yt(e) {
|
|
1324
|
+
var t = e.getBBox();
|
|
1325
|
+
return tn(0, 0, t.width, t.height);
|
|
1326
|
+
}
|
|
1327
|
+
function Xt(e) {
|
|
1328
|
+
var t = e.clientWidth, n = e.clientHeight;
|
|
1329
|
+
if (!t && !n) return Gt;
|
|
1330
|
+
var r = Z(e).getComputedStyle(e), i = Jt(r), a = i.left + i.right, o = i.top + i.bottom, s = Kt(r.width), c = Kt(r.height);
|
|
1331
|
+
if (r.boxSizing === "border-box" && (Math.round(s + a) !== t && (s -= qt(r, "left", "right") + a), Math.round(c + o) !== n && (c -= qt(r, "top", "bottom") + o)), !Qt(e)) {
|
|
1332
|
+
var l = Math.round(s + a) - t, u = Math.round(c + o) - n;
|
|
1333
|
+
Math.abs(l) !== 1 && (s -= l), Math.abs(u) !== 1 && (c -= u);
|
|
1334
|
+
}
|
|
1335
|
+
return tn(i.left, i.top, s, c);
|
|
1336
|
+
}
|
|
1337
|
+
var Zt = (function() {
|
|
1338
|
+
return typeof SVGGraphicsElement < "u" ? function(e) {
|
|
1339
|
+
return e instanceof Z(e).SVGGraphicsElement;
|
|
1340
|
+
} : function(e) {
|
|
1341
|
+
return e instanceof Z(e).SVGElement && typeof e.getBBox == "function";
|
|
1342
|
+
};
|
|
1343
|
+
})();
|
|
1344
|
+
function Qt(e) {
|
|
1345
|
+
return e === Z(e).document.documentElement;
|
|
1346
|
+
}
|
|
1347
|
+
function $t(e) {
|
|
1348
|
+
return Ft ? Zt(e) ? Yt(e) : Xt(e) : Gt;
|
|
1349
|
+
}
|
|
1350
|
+
function en(e) {
|
|
1351
|
+
var t = e.x, n = e.y, r = e.width, i = e.height, a = Object.create((typeof DOMRectReadOnly < "u" ? DOMRectReadOnly : Object).prototype);
|
|
1352
|
+
return Wt(a, {
|
|
1353
|
+
x: t,
|
|
1354
|
+
y: n,
|
|
1355
|
+
width: r,
|
|
1356
|
+
height: i,
|
|
1357
|
+
top: n,
|
|
1358
|
+
right: t + r,
|
|
1359
|
+
bottom: i + n,
|
|
1360
|
+
left: t
|
|
1361
|
+
}), a;
|
|
1362
|
+
}
|
|
1363
|
+
function tn(e, t, n, r) {
|
|
1364
|
+
return {
|
|
1365
|
+
x: e,
|
|
1366
|
+
y: t,
|
|
1367
|
+
width: n,
|
|
1368
|
+
height: r
|
|
1369
|
+
};
|
|
1370
|
+
}
|
|
1371
|
+
var nn = function() {
|
|
1372
|
+
function e(e) {
|
|
1373
|
+
this.broadcastWidth = 0, this.broadcastHeight = 0, this.contentRect_ = tn(0, 0, 0, 0), this.target = e;
|
|
1374
|
+
}
|
|
1375
|
+
return e.prototype.isActive = function() {
|
|
1376
|
+
var e = $t(this.target);
|
|
1377
|
+
return this.contentRect_ = e, e.width !== this.broadcastWidth || e.height !== this.broadcastHeight;
|
|
1378
|
+
}, e.prototype.broadcastRect = function() {
|
|
1379
|
+
var e = this.contentRect_;
|
|
1380
|
+
return this.broadcastWidth = e.width, this.broadcastHeight = e.height, e;
|
|
1381
|
+
}, e;
|
|
1382
|
+
}(), rn = function() {
|
|
1383
|
+
function e(e, t) {
|
|
1384
|
+
var n = en(t);
|
|
1385
|
+
Wt(this, {
|
|
1386
|
+
target: e,
|
|
1387
|
+
contentRect: n
|
|
1388
|
+
});
|
|
1389
|
+
}
|
|
1390
|
+
return e;
|
|
1391
|
+
}(), an = function() {
|
|
1392
|
+
function e(e, t, n) {
|
|
1393
|
+
if (this.activeObservations_ = [], this.observations_ = new Pt(), typeof e != "function") throw TypeError("The callback provided as parameter 1 is not a function.");
|
|
1394
|
+
this.callback_ = e, this.controller_ = t, this.callbackCtx_ = n;
|
|
1395
|
+
}
|
|
1396
|
+
return e.prototype.observe = function(e) {
|
|
1397
|
+
if (!arguments.length) throw TypeError("1 argument required, but only 0 present.");
|
|
1398
|
+
if (!(typeof Element > "u" || !(Element instanceof Object))) {
|
|
1399
|
+
if (!(e instanceof Z(e).Element)) throw TypeError("parameter 1 is not of type \"Element\".");
|
|
1400
|
+
var t = this.observations_;
|
|
1401
|
+
t.has(e) || (t.set(e, new nn(e)), this.controller_.addObserver(this), this.controller_.refresh());
|
|
1402
|
+
}
|
|
1403
|
+
}, e.prototype.unobserve = function(e) {
|
|
1404
|
+
if (!arguments.length) throw TypeError("1 argument required, but only 0 present.");
|
|
1405
|
+
if (!(typeof Element > "u" || !(Element instanceof Object))) {
|
|
1406
|
+
if (!(e instanceof Z(e).Element)) throw TypeError("parameter 1 is not of type \"Element\".");
|
|
1407
|
+
var t = this.observations_;
|
|
1408
|
+
t.has(e) && (t.delete(e), t.size || this.controller_.removeObserver(this));
|
|
1409
|
+
}
|
|
1410
|
+
}, e.prototype.disconnect = function() {
|
|
1411
|
+
this.clearActive(), this.observations_.clear(), this.controller_.removeObserver(this);
|
|
1412
|
+
}, e.prototype.gatherActive = function() {
|
|
1413
|
+
var e = this;
|
|
1414
|
+
this.clearActive(), this.observations_.forEach(function(t) {
|
|
1415
|
+
t.isActive() && e.activeObservations_.push(t);
|
|
1416
|
+
});
|
|
1417
|
+
}, e.prototype.broadcastActive = function() {
|
|
1418
|
+
if (this.hasActive()) {
|
|
1419
|
+
var e = this.callbackCtx_, t = this.activeObservations_.map(function(e) {
|
|
1420
|
+
return new rn(e.target, e.broadcastRect());
|
|
1421
|
+
});
|
|
1422
|
+
this.callback_.call(e, t, e), this.clearActive();
|
|
1423
|
+
}
|
|
1424
|
+
}, e.prototype.clearActive = function() {
|
|
1425
|
+
this.activeObservations_.splice(0);
|
|
1426
|
+
}, e.prototype.hasActive = function() {
|
|
1427
|
+
return this.activeObservations_.length > 0;
|
|
1428
|
+
}, e;
|
|
1429
|
+
}(), on = typeof WeakMap < "u" ? /* @__PURE__ */ new WeakMap() : new Pt(), sn = function() {
|
|
1430
|
+
function e(t) {
|
|
1431
|
+
if (!(this instanceof e)) throw TypeError("Cannot call a class as a function.");
|
|
1432
|
+
if (!arguments.length) throw TypeError("1 argument required, but only 0 present.");
|
|
1433
|
+
var n = new an(t, Ut.getInstance(), this);
|
|
1434
|
+
on.set(this, n);
|
|
1435
|
+
}
|
|
1436
|
+
return e;
|
|
1437
|
+
}();
|
|
1438
|
+
[
|
|
1439
|
+
"observe",
|
|
1440
|
+
"unobserve",
|
|
1441
|
+
"disconnect"
|
|
1442
|
+
].forEach(function(e) {
|
|
1443
|
+
sn.prototype[e] = function() {
|
|
1444
|
+
var t;
|
|
1445
|
+
return (t = on.get(this))[e].apply(t, arguments);
|
|
1446
|
+
};
|
|
1447
|
+
});
|
|
1448
|
+
var cn = (function() {
|
|
1449
|
+
return It.ResizeObserver === void 0 ? sn : It.ResizeObserver;
|
|
1450
|
+
})(), ln = [
|
|
1451
|
+
"client",
|
|
1452
|
+
"offset",
|
|
1453
|
+
"scroll",
|
|
1454
|
+
"bounds",
|
|
1455
|
+
"margin"
|
|
1456
|
+
];
|
|
1457
|
+
function un(e) {
|
|
1458
|
+
var t = [];
|
|
1459
|
+
return ln.forEach(function(n) {
|
|
1460
|
+
e[n] && t.push(n);
|
|
1461
|
+
}), t;
|
|
1462
|
+
}
|
|
1463
|
+
function dn(e, t) {
|
|
1464
|
+
var n = {};
|
|
1465
|
+
if (t.indexOf("client") > -1 && (n.client = {
|
|
1466
|
+
top: e.clientTop,
|
|
1467
|
+
left: e.clientLeft,
|
|
1468
|
+
width: e.clientWidth,
|
|
1469
|
+
height: e.clientHeight
|
|
1470
|
+
}), t.indexOf("offset") > -1 && (n.offset = {
|
|
1471
|
+
top: e.offsetTop,
|
|
1472
|
+
left: e.offsetLeft,
|
|
1473
|
+
width: e.offsetWidth,
|
|
1474
|
+
height: e.offsetHeight
|
|
1475
|
+
}), t.indexOf("scroll") > -1 && (n.scroll = {
|
|
1476
|
+
top: e.scrollTop,
|
|
1477
|
+
left: e.scrollLeft,
|
|
1478
|
+
width: e.scrollWidth,
|
|
1479
|
+
height: e.scrollHeight
|
|
1480
|
+
}), t.indexOf("bounds") > -1) {
|
|
1481
|
+
var r = e.getBoundingClientRect();
|
|
1482
|
+
n.bounds = {
|
|
1483
|
+
top: r.top,
|
|
1484
|
+
right: r.right,
|
|
1485
|
+
bottom: r.bottom,
|
|
1486
|
+
left: r.left,
|
|
1487
|
+
width: r.width,
|
|
1488
|
+
height: r.height
|
|
1489
|
+
};
|
|
1490
|
+
}
|
|
1491
|
+
if (t.indexOf("margin") > -1) {
|
|
1492
|
+
var i = getComputedStyle(e);
|
|
1493
|
+
n.margin = {
|
|
1494
|
+
top: i ? parseInt(i.marginTop) : 0,
|
|
1495
|
+
right: i ? parseInt(i.marginRight) : 0,
|
|
1496
|
+
bottom: i ? parseInt(i.marginBottom) : 0,
|
|
1497
|
+
left: i ? parseInt(i.marginLeft) : 0
|
|
1498
|
+
};
|
|
1499
|
+
}
|
|
1500
|
+
return n;
|
|
1501
|
+
}
|
|
1502
|
+
function fn(e) {
|
|
1503
|
+
return e && e.ownerDocument && e.ownerDocument.defaultView || window;
|
|
1504
|
+
}
|
|
1505
|
+
function pn(e) {
|
|
1506
|
+
return function(t) {
|
|
1507
|
+
var n, r;
|
|
1508
|
+
return r = n = /*#__PURE__*/ function(n) {
|
|
1509
|
+
Nt(r, n);
|
|
1510
|
+
function r() {
|
|
1511
|
+
var t, r = [...arguments];
|
|
1512
|
+
return t = n.call.apply(n, [this].concat(r)) || this, t.state = { contentRect: {
|
|
1513
|
+
entry: {},
|
|
1514
|
+
client: {},
|
|
1515
|
+
offset: {},
|
|
1516
|
+
scroll: {},
|
|
1517
|
+
bounds: {},
|
|
1518
|
+
margin: {}
|
|
1519
|
+
} }, t._animationFrameID = null, t._resizeObserver = null, t._node = null, t._window = null, t.measure = function(n) {
|
|
1520
|
+
var r = dn(t._node, e || un(t.props));
|
|
1521
|
+
n && (r.entry = n[0].contentRect), t._animationFrameID = t._window.requestAnimationFrame(function() {
|
|
1522
|
+
t._resizeObserver !== null && (t.setState({ contentRect: r }), typeof t.props.onResize == "function" && t.props.onResize(r));
|
|
1523
|
+
});
|
|
1524
|
+
}, t._handleRef = function(e) {
|
|
1525
|
+
t._resizeObserver !== null && t._node !== null && t._resizeObserver.unobserve(t._node), t._node = e, t._window = fn(t._node);
|
|
1526
|
+
var n = t.props.innerRef;
|
|
1527
|
+
n && (typeof n == "function" ? n(t._node) : n.current = t._node), t._resizeObserver !== null && t._node !== null && t._resizeObserver.observe(t._node);
|
|
1528
|
+
}, t;
|
|
1529
|
+
}
|
|
1530
|
+
var i = r.prototype;
|
|
1531
|
+
return i.componentDidMount = function() {
|
|
1532
|
+
this._resizeObserver = this._window !== null && this._window.ResizeObserver ? new this._window.ResizeObserver(this.measure) : new cn(this.measure), this._node !== null && (this._resizeObserver.observe(this._node), typeof this.props.onResize == "function" && this.props.onResize(dn(this._node, e || un(this.props))));
|
|
1533
|
+
}, i.componentWillUnmount = function() {
|
|
1534
|
+
this._window !== null && this._window.cancelAnimationFrame(this._animationFrameID), this._resizeObserver !== null && (this._resizeObserver.disconnect(), this._resizeObserver = null);
|
|
1535
|
+
}, i.render = function() {
|
|
1536
|
+
var e = this.props;
|
|
1537
|
+
return e.innerRef, e.onResize, oe(t, At({}, jt(e, ["innerRef", "onResize"]), {
|
|
1538
|
+
measureRef: this._handleRef,
|
|
1539
|
+
measure: this.measure,
|
|
1540
|
+
contentRect: this.state.contentRect
|
|
1541
|
+
}));
|
|
1542
|
+
}, r;
|
|
1543
|
+
}(G), n.propTypes = {
|
|
1544
|
+
client: X.default.bool,
|
|
1545
|
+
offset: X.default.bool,
|
|
1546
|
+
scroll: X.default.bool,
|
|
1547
|
+
bounds: X.default.bool,
|
|
1548
|
+
margin: X.default.bool,
|
|
1549
|
+
innerRef: X.default.oneOfType([X.default.object, X.default.func]),
|
|
1550
|
+
onResize: X.default.func
|
|
1551
|
+
}, r;
|
|
1552
|
+
};
|
|
1553
|
+
}
|
|
1554
|
+
var mn = pn()(function(e) {
|
|
1555
|
+
var t = e.measure, n = e.measureRef, r = e.contentRect, i = e.children;
|
|
1556
|
+
return i({
|
|
1557
|
+
measure: t,
|
|
1558
|
+
measureRef: n,
|
|
1559
|
+
contentRect: r
|
|
1560
|
+
});
|
|
1561
|
+
});
|
|
1562
|
+
mn.displayName = "Measure", mn.propTypes.children = X.default.func;
|
|
1563
|
+
//#endregion
|
|
1564
|
+
//#region ../../lib-react/config-ui/dist/layout/settings-box.js
|
|
1565
|
+
var hn = T("div")(() => ({
|
|
1566
|
+
backgroundColor: E.white(),
|
|
1567
|
+
border: `2px solid ${E.border()}`,
|
|
1568
|
+
display: "flex",
|
|
1569
|
+
flexDirection: "column",
|
|
1570
|
+
justifyContent: "flex-start",
|
|
1571
|
+
minWidth: "275px",
|
|
1572
|
+
maxWidth: "300px",
|
|
1573
|
+
padding: "20px 4px 4px 20px",
|
|
1574
|
+
zIndex: 99
|
|
1575
|
+
})), gn = class extends W.Component {
|
|
1576
|
+
static propTypes = {
|
|
1577
|
+
className: X.default.string,
|
|
1578
|
+
children: X.default.oneOfType([X.default.arrayOf(X.default.node), X.default.node]).isRequired
|
|
1579
|
+
};
|
|
1580
|
+
static defaultProps = {};
|
|
1581
|
+
render() {
|
|
1582
|
+
let { className: e, children: t } = this.props;
|
|
1583
|
+
return /* @__PURE__ */ K(hn, {
|
|
1584
|
+
className: e,
|
|
1585
|
+
children: t
|
|
1586
|
+
});
|
|
1587
|
+
}
|
|
1588
|
+
}, _n = f({
|
|
1589
|
+
typography: { fontFamily: "inherit" },
|
|
1590
|
+
components: { MuiButton: { styleOverrides: { contained: {
|
|
1591
|
+
backgroundColor: "#e0e0e0",
|
|
1592
|
+
color: "#000000",
|
|
1593
|
+
"&:hover": { backgroundColor: "#bdbdbd" }
|
|
1594
|
+
} } } }
|
|
1595
|
+
}), vn = class extends W.Component {
|
|
1596
|
+
static propTypes = {
|
|
1597
|
+
children: X.default.oneOfType([
|
|
1598
|
+
X.default.string,
|
|
1599
|
+
X.default.arrayOf(X.default.element),
|
|
1600
|
+
X.default.element
|
|
1601
|
+
]),
|
|
1602
|
+
className: X.default.string,
|
|
1603
|
+
dimensions: X.default.object,
|
|
1604
|
+
settings: X.default.element,
|
|
1605
|
+
sidePanelMinWidth: X.default.number,
|
|
1606
|
+
hideSettings: X.default.bool,
|
|
1607
|
+
extraCSSRules: X.default.shape({
|
|
1608
|
+
names: X.default.arrayOf(X.default.string),
|
|
1609
|
+
rules: X.default.string
|
|
1610
|
+
})
|
|
1611
|
+
};
|
|
1612
|
+
static defaultProps = {
|
|
1613
|
+
sidePanelMinWidth: 1135,
|
|
1614
|
+
hideSettings: !1,
|
|
1615
|
+
dimensions: {}
|
|
1616
|
+
};
|
|
1617
|
+
constructor(...e) {
|
|
1618
|
+
super(...e), this.state = { layoutMode: void 0 };
|
|
1619
|
+
}
|
|
1620
|
+
onResize = (e) => {
|
|
1621
|
+
let { bounds: t } = e, { sidePanelMinWidth: n, dimensions: r } = this.props, { maxWidth: i } = r || {}, a = t.width > n && (!i || i > n) ? "inline" : "tabbed";
|
|
1622
|
+
a !== this.state.layoutMode && this.setState({ layoutMode: a });
|
|
1623
|
+
};
|
|
1624
|
+
render() {
|
|
1625
|
+
return /* @__PURE__ */ K(A, {
|
|
1626
|
+
injectFirst: !0,
|
|
1627
|
+
children: /* @__PURE__ */ K(p, {
|
|
1628
|
+
theme: _n,
|
|
1629
|
+
children: /* @__PURE__ */ K(mn, {
|
|
1630
|
+
bounds: !0,
|
|
1631
|
+
onResize: this.onResize,
|
|
1632
|
+
children: ({ measureRef: e }) => {
|
|
1633
|
+
let { children: t, settings: n, hideSettings: r, dimensions: i, extraCSSRules: a } = this.props, { layoutMode: o } = this.state, s = r ? null : o === "inline" ? /* @__PURE__ */ K(gn, {
|
|
1634
|
+
className: "settings-box",
|
|
1635
|
+
children: n
|
|
1636
|
+
}) : n;
|
|
1637
|
+
return /* @__PURE__ */ q("div", {
|
|
1638
|
+
ref: e,
|
|
1639
|
+
className: "main-container extraCSSRules",
|
|
1640
|
+
children: [a?.rules ? /* @__PURE__ */ K("style", { dangerouslySetInnerHTML: { __html: `.extraCSSRules { ${a.rules} }` } }) : null, /* @__PURE__ */ K(kt, {
|
|
1641
|
+
mode: o,
|
|
1642
|
+
secondary: s,
|
|
1643
|
+
dimensions: i,
|
|
1644
|
+
children: t
|
|
1645
|
+
})]
|
|
1646
|
+
});
|
|
1647
|
+
}
|
|
1648
|
+
})
|
|
1649
|
+
})
|
|
1650
|
+
});
|
|
1651
|
+
}
|
|
1652
|
+
}, yn = pn("bounds")(vn), bn = /* @__PURE__ */ Ct({
|
|
1653
|
+
ConfigLayout: () => yn,
|
|
1654
|
+
LayoutContents: () => kt
|
|
1655
|
+
}), xn = T("div")(() => ({
|
|
1656
|
+
display: "flex",
|
|
1657
|
+
width: "100%",
|
|
1658
|
+
justifyContent: "space-between"
|
|
1659
|
+
})), Sn = T(w)(({ theme: e }) => ({
|
|
1660
|
+
color: "rgba(0, 0, 0, 0.89)",
|
|
1661
|
+
fontSize: e.typography.fontSize,
|
|
1662
|
+
paddingTop: e.spacing(2)
|
|
1663
|
+
})), Cn = T(Ge)(({ checked: e }) => ({
|
|
1664
|
+
"&.Mui-checked .MuiSwitch-thumb": { color: `${E.tertiary()} !important` },
|
|
1665
|
+
"&.Mui-checked .MuiSwitch-track": { backgroundColor: `${E.tertiaryLight()} !important` },
|
|
1666
|
+
"& .MuiSwitch-track": { backgroundColor: e ? `${E.tertiaryLight()} !important` : void 0 }
|
|
1667
|
+
})), wn = ({ checked: e, disabled: t, label: n, toggle: r }) => /* @__PURE__ */ q(xn, { children: [/* @__PURE__ */ K(Sn, { children: n }), /* @__PURE__ */ K(Cn, {
|
|
1668
|
+
checked: e,
|
|
1669
|
+
disabled: t,
|
|
1670
|
+
onChange: (e) => r(e.target.checked)
|
|
1671
|
+
})] });
|
|
1672
|
+
wn.propTypes = {
|
|
1673
|
+
checked: X.default.bool,
|
|
1674
|
+
disabled: X.default.bool,
|
|
1675
|
+
label: X.default.string.isRequired,
|
|
1676
|
+
toggle: X.default.func.isRequired
|
|
1677
|
+
};
|
|
1678
|
+
//#endregion
|
|
1679
|
+
//#region ../../lib-react/config-ui/dist/settings/settings-radio-label.js
|
|
1680
|
+
var Tn = T(he)(({ theme: e }) => ({ "& .MuiFormControlLabel-label": {
|
|
1681
|
+
color: "rgba(0, 0, 0, 0.89)",
|
|
1682
|
+
fontSize: e.typography.fontSize - 2,
|
|
1683
|
+
left: "-5px",
|
|
1684
|
+
position: "relative"
|
|
1685
|
+
} })), En = T(Re)(() => ({ color: `${E.tertiary()} !important` })), Dn = ({ label: e, value: t, checked: n, onChange: r }) => /* @__PURE__ */ K(Tn, {
|
|
1686
|
+
value: t,
|
|
1687
|
+
control: /* @__PURE__ */ K(En, {
|
|
1688
|
+
checked: n,
|
|
1689
|
+
onChange: r
|
|
1690
|
+
}),
|
|
1691
|
+
label: e
|
|
1692
|
+
});
|
|
1693
|
+
Dn.propTypes = {
|
|
1694
|
+
label: X.default.string,
|
|
1695
|
+
value: X.default.string,
|
|
1696
|
+
checked: X.default.bool,
|
|
1697
|
+
onChange: X.default.func
|
|
1698
|
+
};
|
|
1699
|
+
//#endregion
|
|
1700
|
+
//#region ../../lib-react/config-ui/dist/settings/panel.js
|
|
1701
|
+
var On = (0, Ke.default)("pie-lib:config-ui:settings:panel"), kn = {
|
|
1702
|
+
label: X.default.string,
|
|
1703
|
+
value: X.default.string
|
|
1704
|
+
}, Q = {
|
|
1705
|
+
label: X.default.string,
|
|
1706
|
+
value: X.default.string,
|
|
1707
|
+
onChange: X.default.func
|
|
1708
|
+
}, An = ({ label: e, value: t, onChange: n }) => /* @__PURE__ */ K(et, {
|
|
1709
|
+
checked: t,
|
|
1710
|
+
label: e,
|
|
1711
|
+
onChange: (e) => {
|
|
1712
|
+
n(e.target.checked);
|
|
1713
|
+
}
|
|
1714
|
+
});
|
|
1715
|
+
An.propTypes = {
|
|
1716
|
+
label: X.default.string,
|
|
1717
|
+
value: X.default.bool,
|
|
1718
|
+
onChange: X.default.func
|
|
1719
|
+
};
|
|
1720
|
+
var jn = T(bt)(({ theme: e }) => ({
|
|
1721
|
+
marginTop: e.spacing(.5),
|
|
1722
|
+
paddingBottom: e.spacing(.5),
|
|
1723
|
+
width: "100%",
|
|
1724
|
+
"& > label": {
|
|
1725
|
+
color: "rgba(0, 0, 0, 0.89)",
|
|
1726
|
+
transform: "translate(0, 10px) scale(1)",
|
|
1727
|
+
fontSize: "18px",
|
|
1728
|
+
marginTop: e.spacing(2.5)
|
|
1729
|
+
},
|
|
1730
|
+
"& > div": { marginTop: e.spacing(2.5) }
|
|
1731
|
+
})), Mn = ({ label: e, value: t, onChange: n, choices: r }) => /* @__PURE__ */ K(jn, {
|
|
1732
|
+
direction: "horizontal",
|
|
1733
|
+
customLabel: Dn,
|
|
1734
|
+
value: t,
|
|
1735
|
+
header: e,
|
|
1736
|
+
opts: r,
|
|
1737
|
+
onChange: n
|
|
1738
|
+
});
|
|
1739
|
+
Mn.propTypes = {
|
|
1740
|
+
...Q,
|
|
1741
|
+
choices: X.default.arrayOf(X.default.shape(kn))
|
|
1742
|
+
};
|
|
1743
|
+
var Nn = Mn, Pn = T("p")(({ theme: e }) => ({
|
|
1744
|
+
margin: 0,
|
|
1745
|
+
fontSize: e.typography.fontSize
|
|
1746
|
+
})), Fn = T(z)(({ theme: e }) => ({
|
|
1747
|
+
marginTop: e.spacing(.5),
|
|
1748
|
+
border: "2px solid lightgrey",
|
|
1749
|
+
padding: `0 ${e.spacing(1)}`,
|
|
1750
|
+
borderRadius: "4px"
|
|
1751
|
+
})), In = ({ label: e, value: t, onChange: n, choices: r = [] }) => {
|
|
1752
|
+
let i = (e) => typeof e == "string" ? e : e.label, a = (e) => typeof e == "string" ? e : e.value;
|
|
1753
|
+
return /* @__PURE__ */ q("div", { children: [e && /* @__PURE__ */ K(Pn, { children: e }), /* @__PURE__ */ K(Fn, {
|
|
1754
|
+
value: t || r && r[0],
|
|
1755
|
+
onChange: ({ target: e }) => n(e.value),
|
|
1756
|
+
input: /* @__PURE__ */ K(te, { id: `dropdown-${e}` }),
|
|
1757
|
+
disableUnderline: !0,
|
|
1758
|
+
MenuProps: { transitionDuration: {
|
|
1759
|
+
enter: 225,
|
|
1760
|
+
exit: 195
|
|
1761
|
+
} },
|
|
1762
|
+
children: r.map((e, t) => /* @__PURE__ */ K(P, {
|
|
1763
|
+
value: a(e),
|
|
1764
|
+
children: i(e)
|
|
1765
|
+
}, t))
|
|
1766
|
+
})] });
|
|
1767
|
+
};
|
|
1768
|
+
In.propTypes = {
|
|
1769
|
+
...Q,
|
|
1770
|
+
choices: X.default.arrayOf(X.default.string)
|
|
1771
|
+
};
|
|
1772
|
+
var Ln = T(F)(({ theme: e }) => ({
|
|
1773
|
+
marginRight: e.spacing(3),
|
|
1774
|
+
marginTop: e.spacing(1)
|
|
1775
|
+
})), Rn = ({ label: e }) => /* @__PURE__ */ K(Ln, { children: e }), zn = T(it)(({ theme: e }) => ({
|
|
1776
|
+
width: "35%",
|
|
1777
|
+
marginRight: e.spacing(3),
|
|
1778
|
+
marginTop: e.spacing(1),
|
|
1779
|
+
"& .MuiInputBase-root": {
|
|
1780
|
+
marginTop: e.spacing(.5),
|
|
1781
|
+
border: "2px solid lightgrey",
|
|
1782
|
+
borderRadius: "4px",
|
|
1783
|
+
padding: `0 ${e.spacing(1)}`,
|
|
1784
|
+
backgroundColor: "transparent"
|
|
1785
|
+
}
|
|
1786
|
+
})), Bn = ({ label: e, value: t, onChange: n = () => {}, suffix: r, min: i, max: a }) => /* @__PURE__ */ K(zn, {
|
|
1787
|
+
variant: "standard",
|
|
1788
|
+
label: e || "Label",
|
|
1789
|
+
value: t,
|
|
1790
|
+
max: a,
|
|
1791
|
+
min: i,
|
|
1792
|
+
onChange: (e, t) => n(t),
|
|
1793
|
+
suffix: r,
|
|
1794
|
+
showErrorWhenOutsideRange: !0,
|
|
1795
|
+
disableUnderline: !0
|
|
1796
|
+
});
|
|
1797
|
+
Bn.propTypes = {
|
|
1798
|
+
...Q,
|
|
1799
|
+
suffix: X.default.string,
|
|
1800
|
+
min: X.default.number,
|
|
1801
|
+
max: X.default.number,
|
|
1802
|
+
value: X.default.number
|
|
1803
|
+
}, Rn.propTypes = { ...Q };
|
|
1804
|
+
var Vn = ({ disabled: e, label: t, value: n, onChange: r }) => /* @__PURE__ */ K(wn, {
|
|
1805
|
+
label: t,
|
|
1806
|
+
checked: !!n,
|
|
1807
|
+
disabled: !!e,
|
|
1808
|
+
toggle: r
|
|
1809
|
+
});
|
|
1810
|
+
Vn.propTypes = {
|
|
1811
|
+
...Q,
|
|
1812
|
+
value: X.default.bool
|
|
1813
|
+
};
|
|
1814
|
+
var Hn = {
|
|
1815
|
+
toggle: Vn,
|
|
1816
|
+
radio: Nn,
|
|
1817
|
+
dropdown: In,
|
|
1818
|
+
numberField: Bn,
|
|
1819
|
+
checkbox: An,
|
|
1820
|
+
textField: Rn
|
|
1821
|
+
}, Un = T("div")(({ theme: e }) => ({ margin: `0 0 ${e.spacing(2)} 0` })), Wn = T("div")(({ theme: e }) => ({
|
|
1822
|
+
color: "#495B8F",
|
|
1823
|
+
fontSize: e.typography.fontSize + 2,
|
|
1824
|
+
fontWeight: 600,
|
|
1825
|
+
marginBottom: e.spacing(1)
|
|
1826
|
+
})), Gn = T("p")(({ theme: e }) => ({
|
|
1827
|
+
fontSize: e.typography.fontSize,
|
|
1828
|
+
marginBottom: 0
|
|
1829
|
+
})), Kn = (e) => {
|
|
1830
|
+
let { model: t, label: r, group: i, configuration: a, onChange: o } = e, s = (e, r, i) => {
|
|
1831
|
+
let { isConfigProperty: s, ...c } = n(e, i || r), l = n(s ? a : t, r), u = {
|
|
1832
|
+
...c,
|
|
1833
|
+
key: r,
|
|
1834
|
+
value: l
|
|
1835
|
+
}, d = Hn[u.type];
|
|
1836
|
+
return /* @__PURE__ */ K(d, {
|
|
1837
|
+
...u,
|
|
1838
|
+
onChange: (e) => o(r, e, s)
|
|
1839
|
+
}, r);
|
|
1840
|
+
}, c = (e, t) => {
|
|
1841
|
+
let n = e[t];
|
|
1842
|
+
if (!n) return null;
|
|
1843
|
+
let { type: r, label: i, fields: a, choices: o } = n;
|
|
1844
|
+
return r === "numberFields" ? /* @__PURE__ */ q("div", { children: [/* @__PURE__ */ K(Gn, { children: i }), Object.keys(a).map((n) => s(e, `${t}.${n}`, `${t}.fields.${n}`))] }, `numberField-${i}`) : r === "checkboxes" ? /* @__PURE__ */ q("div", { children: [/* @__PURE__ */ K("p", { children: i }), Object.keys(o).map((n) => s(e, `${t}.${n}`, `${t}.choices.${n}`))] }, `checkbox-${i}`) : s(e, t);
|
|
1845
|
+
};
|
|
1846
|
+
return /* @__PURE__ */ q(Un, { children: [/* @__PURE__ */ K(Wn, { children: r }), Object.keys(i).map((e) => c(i, e))] });
|
|
1847
|
+
};
|
|
1848
|
+
Kn.propTypes = {
|
|
1849
|
+
model: X.default.object,
|
|
1850
|
+
label: X.default.string,
|
|
1851
|
+
group: X.default.object,
|
|
1852
|
+
configuration: X.default.object,
|
|
1853
|
+
onChange: X.default.func
|
|
1854
|
+
};
|
|
1855
|
+
var qn = class extends W.Component {
|
|
1856
|
+
static propTypes = {
|
|
1857
|
+
model: X.default.object,
|
|
1858
|
+
configuration: X.default.object,
|
|
1859
|
+
groups: X.default.object,
|
|
1860
|
+
onChangeModel: X.default.func,
|
|
1861
|
+
onChangeConfiguration: X.default.func,
|
|
1862
|
+
modal: X.default.object
|
|
1863
|
+
};
|
|
1864
|
+
static defaultProps = {
|
|
1865
|
+
onChangeModel: () => {},
|
|
1866
|
+
onChangeConfiguration: () => {}
|
|
1867
|
+
};
|
|
1868
|
+
change = (e, t, n = !1) => {
|
|
1869
|
+
On("[changeModel]", e, t);
|
|
1870
|
+
let { onChangeModel: r, onChangeConfiguration: a } = this.props, o = { ...this.props.model }, s = { ...this.props.configuration };
|
|
1871
|
+
n ? (i(s, e, t), a(s, e)) : (i(o, e, t), r(o, e));
|
|
1872
|
+
};
|
|
1873
|
+
render() {
|
|
1874
|
+
let { groups: e, model: t, configuration: n, modal: r } = this.props;
|
|
1875
|
+
return On("render:", t), /* @__PURE__ */ q("div", { children: [Object.keys(e || {}).map((r) => Object.entries(e[r]).some(([, e]) => !!e) ? /* @__PURE__ */ K(Kn, {
|
|
1876
|
+
label: r,
|
|
1877
|
+
model: t,
|
|
1878
|
+
configuration: n,
|
|
1879
|
+
group: e[r],
|
|
1880
|
+
onChange: this.change
|
|
1881
|
+
}, r) : null), r] });
|
|
1882
|
+
}
|
|
1883
|
+
}, Jn = /* @__PURE__ */ Ct({
|
|
1884
|
+
Panel: () => qn,
|
|
1885
|
+
checkbox: () => nr,
|
|
1886
|
+
checkboxes: () => rr,
|
|
1887
|
+
dropdown: () => $n,
|
|
1888
|
+
numberField: () => er,
|
|
1889
|
+
numberFields: () => tr,
|
|
1890
|
+
radio: () => Qn,
|
|
1891
|
+
textField: () => Yn,
|
|
1892
|
+
toggle: () => Xn
|
|
1893
|
+
}), Yn = (e, t = !0) => ({
|
|
1894
|
+
label: e,
|
|
1895
|
+
type: "textField",
|
|
1896
|
+
isConfigProperty: t
|
|
1897
|
+
}), Xn = (e, t = !1, n = !1) => ({
|
|
1898
|
+
type: "toggle",
|
|
1899
|
+
label: e,
|
|
1900
|
+
isConfigProperty: t,
|
|
1901
|
+
disabled: n
|
|
1902
|
+
}), Zn = (e) => typeof e == "string" ? {
|
|
1903
|
+
label: e,
|
|
1904
|
+
value: e
|
|
1905
|
+
} : e, Qn = function() {
|
|
1906
|
+
let [e, t, n = !1] = Array.prototype.slice.call(arguments);
|
|
1907
|
+
return {
|
|
1908
|
+
type: "radio",
|
|
1909
|
+
label: e,
|
|
1910
|
+
choices: t && t.map((e) => Zn(e)),
|
|
1911
|
+
isConfigProperty: n
|
|
1912
|
+
};
|
|
1913
|
+
}, $n = (e, t, n = !1) => ({
|
|
1914
|
+
type: "dropdown",
|
|
1915
|
+
label: e,
|
|
1916
|
+
choices: t,
|
|
1917
|
+
isConfigProperty: n
|
|
1918
|
+
}), er = (e, t, n = !1) => ({
|
|
1919
|
+
...t,
|
|
1920
|
+
label: e,
|
|
1921
|
+
type: "numberField",
|
|
1922
|
+
isConfigProperty: n
|
|
1923
|
+
}), tr = (e, t, n = !1) => (Object.keys(t).map((e) => {
|
|
1924
|
+
t[e] = er(t[e].label, t[e], n);
|
|
1925
|
+
}), {
|
|
1926
|
+
type: "numberFields",
|
|
1927
|
+
label: e,
|
|
1928
|
+
fields: t
|
|
1929
|
+
}), nr = (e, t, n = !1) => ({
|
|
1930
|
+
...t,
|
|
1931
|
+
label: e,
|
|
1932
|
+
type: "checkbox",
|
|
1933
|
+
isConfigProperty: n
|
|
1934
|
+
}), rr = (e, t, n = !1) => (Object.keys(t).map((e) => {
|
|
1935
|
+
t[e] = nr(t[e].label, t[e], n);
|
|
1936
|
+
}), {
|
|
1937
|
+
type: "checkboxes",
|
|
1938
|
+
label: e,
|
|
1939
|
+
choices: t
|
|
1940
|
+
});
|
|
1941
|
+
//#endregion
|
|
1942
|
+
//#region ../../lib-react/config-ui/dist/index.js
|
|
1943
|
+
function ir(e) {
|
|
1944
|
+
return typeof e == "function" || typeof e == "object" && !!e && typeof e.$$typeof == "symbol";
|
|
1945
|
+
}
|
|
1946
|
+
function ar(e, t) {
|
|
1947
|
+
return !e || ir(e) ? e : ir(e.default) ? e.default : t && ir(e[t]) ? e[t] : t && ir(e[t]?.default) ? e[t].default : e;
|
|
1948
|
+
}
|
|
1949
|
+
var or = ar(c, "InputContainer") || ar(lr.InputContainer, "InputContainer"), sr = ie, cr = sr.default, lr = cr && typeof cr == "object" ? cr : sr, ur = T("div")(() => ({ width: "160px" })), dr = T(ae)(() => ({ width: "160px" })), fr = T(w)(() => ({ backgroundColor: "transparent" })), pr = ({ onChange: e, value: t, availableChartTypes: n, chartTypeLabel: r }) => /* @__PURE__ */ K(ur, { children: /* @__PURE__ */ q(dr, {
|
|
9
1950
|
variant: "outlined",
|
|
10
|
-
children: [/* @__PURE__ */
|
|
1951
|
+
children: [/* @__PURE__ */ K(fr, {
|
|
11
1952
|
id: "type-helper-label",
|
|
12
1953
|
children: r
|
|
13
|
-
}), /* @__PURE__ */
|
|
1954
|
+
}), /* @__PURE__ */ q(z, {
|
|
14
1955
|
labelId: "type-helper-label",
|
|
15
1956
|
id: "type-helper-label-select",
|
|
16
1957
|
name: "chartType",
|
|
@@ -22,49 +1963,49 @@ var O = /* @__PURE__ */ e(p(), 1), k = a("div")(() => ({ width: "160px" })), A =
|
|
|
22
1963
|
exit: 195
|
|
23
1964
|
} },
|
|
24
1965
|
children: [
|
|
25
|
-
n?.histogram && /* @__PURE__ */
|
|
1966
|
+
n?.histogram && /* @__PURE__ */ K(P, {
|
|
26
1967
|
value: "histogram",
|
|
27
1968
|
children: n.histogram
|
|
28
1969
|
}),
|
|
29
|
-
n?.bar && /* @__PURE__ */
|
|
1970
|
+
n?.bar && /* @__PURE__ */ K(P, {
|
|
30
1971
|
value: "bar",
|
|
31
1972
|
children: n.bar
|
|
32
1973
|
}),
|
|
33
|
-
n?.lineDot && /* @__PURE__ */
|
|
1974
|
+
n?.lineDot && /* @__PURE__ */ K(P, {
|
|
34
1975
|
value: "lineDot",
|
|
35
1976
|
children: n.lineDot
|
|
36
1977
|
}),
|
|
37
|
-
n?.lineCross && /* @__PURE__ */
|
|
1978
|
+
n?.lineCross && /* @__PURE__ */ K(P, {
|
|
38
1979
|
value: "lineCross",
|
|
39
1980
|
children: n.lineCross
|
|
40
1981
|
}),
|
|
41
|
-
n?.dotPlot && /* @__PURE__ */
|
|
1982
|
+
n?.dotPlot && /* @__PURE__ */ K(P, {
|
|
42
1983
|
value: "dotPlot",
|
|
43
1984
|
children: n.dotPlot
|
|
44
1985
|
}),
|
|
45
|
-
n?.linePlot && /* @__PURE__ */
|
|
1986
|
+
n?.linePlot && /* @__PURE__ */ K(P, {
|
|
46
1987
|
value: "linePlot",
|
|
47
1988
|
children: n.linePlot
|
|
48
1989
|
})
|
|
49
1990
|
]
|
|
50
1991
|
})]
|
|
51
1992
|
}) });
|
|
52
|
-
|
|
53
|
-
onChange:
|
|
54
|
-
value:
|
|
55
|
-
availableChartTypes:
|
|
56
|
-
histogram:
|
|
57
|
-
bar:
|
|
58
|
-
lineDot:
|
|
59
|
-
lineCross:
|
|
60
|
-
dotPlot:
|
|
61
|
-
linePlot:
|
|
1993
|
+
pr.propTypes = {
|
|
1994
|
+
onChange: X.default.func.isRequired,
|
|
1995
|
+
value: X.default.string.isRequired,
|
|
1996
|
+
availableChartTypes: X.default.shape({
|
|
1997
|
+
histogram: X.default.string,
|
|
1998
|
+
bar: X.default.string,
|
|
1999
|
+
lineDot: X.default.string,
|
|
2000
|
+
lineCross: X.default.string,
|
|
2001
|
+
dotPlot: X.default.string,
|
|
2002
|
+
linePlot: X.default.string
|
|
62
2003
|
}),
|
|
63
|
-
chartTypeLabel:
|
|
2004
|
+
chartTypeLabel: X.default.string
|
|
64
2005
|
};
|
|
65
2006
|
//#endregion
|
|
66
2007
|
//#region ../../lib-react/charting/dist/chart-setup.js
|
|
67
|
-
var
|
|
2008
|
+
var mr = (e, t, n, r, i) => {
|
|
68
2009
|
(e || []).forEach((e) => {
|
|
69
2010
|
let t = Math.round(e.value * 10) % Math.round(n.step * 10) / 10;
|
|
70
2011
|
(e.value > n.max || t !== 0) && (e.value = 0);
|
|
@@ -72,143 +2013,143 @@ var N = (e, t, n, r, i) => {
|
|
|
72
2013
|
...i,
|
|
73
2014
|
data: e
|
|
74
2015
|
});
|
|
75
|
-
},
|
|
2016
|
+
}, hr = T("div")(() => ({ width: "450px" })), gr = T("div")(({ theme: e }) => ({
|
|
76
2017
|
display: "flex",
|
|
77
2018
|
flexDirection: "column",
|
|
78
2019
|
width: "100%",
|
|
79
2020
|
marginTop: e.spacing(3)
|
|
80
|
-
})),
|
|
2021
|
+
})), _r = T("div")(() => ({
|
|
81
2022
|
display: "flex",
|
|
82
2023
|
flexDirection: "column",
|
|
83
2024
|
alignItems: "center"
|
|
84
|
-
})),
|
|
2025
|
+
})), vr = T("div")(() => ({
|
|
85
2026
|
display: "flex",
|
|
86
2027
|
justifyContent: "space-around",
|
|
87
2028
|
alignItems: "center"
|
|
88
|
-
})),
|
|
2029
|
+
})), yr = T(ft)(({ theme: e }) => ({
|
|
89
2030
|
width: "130px",
|
|
90
2031
|
margin: `${e.spacing(1)} ${e.spacing(.5)}`
|
|
91
|
-
})),
|
|
2032
|
+
})), br = T(ft)(({ theme: e }) => ({
|
|
92
2033
|
width: "160px",
|
|
93
2034
|
margin: `${e.spacing(1)} ${e.spacing(.5)}`
|
|
94
|
-
})),
|
|
2035
|
+
})), xr = T("div")(({ theme: e }) => ({
|
|
95
2036
|
display: "flex",
|
|
96
2037
|
justifyContent: "space-between",
|
|
97
2038
|
alignItems: "center",
|
|
98
2039
|
margin: `${e.spacing(3)} 0`
|
|
99
|
-
})),
|
|
100
|
-
let { model: t, onChange: n, chartDimensions: r, gridValues: i = {}, labelValues: a = {}, studentNewCategoryDefaultLabel: o = {}, availableChartTypes: s = {}, chartTypeLabel: c } = e, [l, u] =
|
|
2040
|
+
})), Sr = T(F)(() => ({ color: E.disabled() })), Cr = (e) => {
|
|
2041
|
+
let { model: t, onChange: n, chartDimensions: r, gridValues: i = {}, labelValues: a = {}, studentNewCategoryDefaultLabel: o = {}, availableChartTypes: s = {}, chartTypeLabel: c } = e, [l, u] = ce({
|
|
101
2042
|
open: !1,
|
|
102
2043
|
title: "",
|
|
103
2044
|
text: "",
|
|
104
2045
|
onClose: null,
|
|
105
2046
|
onConfirm: null
|
|
106
|
-
}), [d, f] =
|
|
107
|
-
min:
|
|
108
|
-
max:
|
|
109
|
-
step:
|
|
110
|
-
},
|
|
111
|
-
min:
|
|
112
|
-
max:
|
|
113
|
-
step:
|
|
114
|
-
},
|
|
2047
|
+
}), [d, f] = ce(!1), [p, m] = ce(""), [h, g] = ce(0), { range: _ = {}, correctAnswer: v, changeInteractiveEnabled: y, changeEditableEnabled: b } = t, x = t.graph, { showInConfigPanel: S, width: C, height: w } = r || {}, T = {
|
|
2048
|
+
min: C?.min ? Math.max(50, C.min) : 50,
|
|
2049
|
+
max: C?.max ? Math.min(700, C.max) : 700,
|
|
2050
|
+
step: C?.step >= 1 ? Math.min(200, C.step) : 20
|
|
2051
|
+
}, E = {
|
|
2052
|
+
min: w?.min ? Math.max(400, w.min) : 400,
|
|
2053
|
+
max: w?.max ? Math.min(700, w.max) : 700,
|
|
2054
|
+
step: w?.step >= 1 ? Math.min(200, w.step) : 20
|
|
2055
|
+
}, D = i && i.range ? { customValues: i.range } : {
|
|
115
2056
|
min: 0,
|
|
116
2057
|
max: 1e4
|
|
117
|
-
},
|
|
2058
|
+
}, O = a && a.range ? { customValues: a.range } : {
|
|
118
2059
|
min: 0,
|
|
119
2060
|
max: 1e4
|
|
120
|
-
},
|
|
2061
|
+
}, k = /* @__PURE__ */ q(vr, { children: [/* @__PURE__ */ K(br, {
|
|
121
2062
|
label: "Grid Interval",
|
|
122
|
-
value:
|
|
2063
|
+
value: _.step,
|
|
123
2064
|
variant: "outlined",
|
|
124
|
-
onChange: (e, t) =>
|
|
125
|
-
...
|
|
126
|
-
}), /* @__PURE__ */
|
|
2065
|
+
onChange: (e, t) => L("step", t, e),
|
|
2066
|
+
...D
|
|
2067
|
+
}), /* @__PURE__ */ K(br, {
|
|
127
2068
|
label: "Label Interval",
|
|
128
|
-
value:
|
|
2069
|
+
value: _.labelStep,
|
|
129
2070
|
variant: "outlined",
|
|
130
|
-
onChange: (e, t) =>
|
|
131
|
-
...
|
|
132
|
-
})] }),
|
|
2071
|
+
onChange: (e, t) => L("labelStep", t, e),
|
|
2072
|
+
...O
|
|
2073
|
+
})] }), A = (e) => {
|
|
133
2074
|
u((t) => ({
|
|
134
2075
|
...t,
|
|
135
2076
|
open: e
|
|
136
2077
|
})), f(e);
|
|
137
|
-
},
|
|
2078
|
+
}, j = (e, t) => e.map((e) => (Object.prototype.hasOwnProperty.call(e, t) && (e[t] = t == "interactive"), e)), M = (e) => {
|
|
138
2079
|
let { correctAnswer: r, data: i } = t;
|
|
139
|
-
|
|
140
|
-
},
|
|
2080
|
+
y === !1 && j(i, "interactive"), b === !1 && j(i, "editable"), mr(i, e, _, n, t), mr(r.data, !1, _, n, t);
|
|
2081
|
+
}, ee = () => {
|
|
141
2082
|
let e = o?.label;
|
|
142
2083
|
n({
|
|
143
2084
|
...t,
|
|
144
2085
|
studentCategoryDefaultLabel: e
|
|
145
2086
|
});
|
|
146
|
-
},
|
|
2087
|
+
}, N = (e) => e.includes("Plot") ? {
|
|
147
2088
|
min: 3,
|
|
148
2089
|
max: 10
|
|
149
2090
|
} : {
|
|
150
2091
|
min: .05,
|
|
151
2092
|
max: 1e4
|
|
152
|
-
},
|
|
2093
|
+
}, P = (e, r) => {
|
|
153
2094
|
let i = {
|
|
154
|
-
...
|
|
2095
|
+
...x,
|
|
155
2096
|
[e]: r
|
|
156
2097
|
};
|
|
157
2098
|
n({
|
|
158
2099
|
...t,
|
|
159
2100
|
graph: i
|
|
160
2101
|
});
|
|
161
|
-
},
|
|
162
|
-
_
|
|
2102
|
+
}, I = (e, t) => (e || []).find((e) => e.value > t.max || e.value - t.step * Math.floor(e.value / t.step) !== 0), L = (e, r, i) => {
|
|
2103
|
+
g(_[e]), m(e), _[e] = r, (e === "max" || e === "step") && (I(t.data, _) || I(t.correctAnswer.data, _)) && i?.target ? f(!0) : n({
|
|
163
2104
|
...t,
|
|
164
|
-
range:
|
|
2105
|
+
range: _
|
|
165
2106
|
});
|
|
166
2107
|
};
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
}, []),
|
|
2108
|
+
se(() => {
|
|
2109
|
+
M(!0), ee();
|
|
2110
|
+
}, []), se(() => {
|
|
170
2111
|
d && u({
|
|
171
2112
|
open: !0,
|
|
172
2113
|
title: "Warning",
|
|
173
2114
|
text: "This change will remove values defined for one or more categories",
|
|
174
2115
|
onConfirm: () => {
|
|
175
|
-
|
|
2116
|
+
M(), A(!1), n({
|
|
176
2117
|
...t,
|
|
177
|
-
range:
|
|
178
|
-
correctAnswer:
|
|
2118
|
+
range: _,
|
|
2119
|
+
correctAnswer: v
|
|
179
2120
|
});
|
|
180
2121
|
},
|
|
181
2122
|
onClose: () => {
|
|
182
|
-
|
|
2123
|
+
_[p] = h, A(!1);
|
|
183
2124
|
}
|
|
184
2125
|
});
|
|
185
2126
|
}, [d]);
|
|
186
|
-
let
|
|
187
|
-
|
|
2127
|
+
let te = _.step === 1 && _.labelStep === 1 && 3 <= _.max && _.max <= 10, R = () => {
|
|
2128
|
+
N.min = 3, N.max = 10, _.max = 10, _.step = 1, _.labelStep = 1, n({
|
|
188
2129
|
...t,
|
|
189
|
-
range:
|
|
2130
|
+
range: _
|
|
190
2131
|
});
|
|
191
|
-
},
|
|
2132
|
+
}, z = (e) => {
|
|
192
2133
|
if (e.includes("Plot")) {
|
|
193
|
-
if (!
|
|
2134
|
+
if (!te) {
|
|
194
2135
|
u({
|
|
195
2136
|
open: !0,
|
|
196
2137
|
title: "Warning",
|
|
197
2138
|
text: "The selected chart type does not support the current chart configuration. Reset chart configuration?",
|
|
198
2139
|
onConfirm: () => {
|
|
199
|
-
|
|
2140
|
+
R(), M(), A(!1), n({
|
|
200
2141
|
...t,
|
|
201
|
-
range:
|
|
2142
|
+
range: _,
|
|
202
2143
|
chartType: e
|
|
203
2144
|
});
|
|
204
2145
|
},
|
|
205
2146
|
onClose: () => {
|
|
206
|
-
|
|
2147
|
+
A(!1);
|
|
207
2148
|
}
|
|
208
2149
|
});
|
|
209
2150
|
return;
|
|
210
2151
|
}
|
|
211
|
-
|
|
2152
|
+
N.min = 3, N.max = 10, n({
|
|
212
2153
|
...t,
|
|
213
2154
|
chartType: e
|
|
214
2155
|
});
|
|
@@ -219,49 +2160,49 @@ var N = (e, t, n, r, i) => {
|
|
|
219
2160
|
chartType: e
|
|
220
2161
|
});
|
|
221
2162
|
};
|
|
222
|
-
return /* @__PURE__ */
|
|
223
|
-
/* @__PURE__ */
|
|
2163
|
+
return /* @__PURE__ */ q(hr, { children: [
|
|
2164
|
+
/* @__PURE__ */ K(F, {
|
|
224
2165
|
variant: "subtitle1",
|
|
225
2166
|
children: "Configure Chart"
|
|
226
2167
|
}),
|
|
227
|
-
/* @__PURE__ */
|
|
228
|
-
/* @__PURE__ */
|
|
2168
|
+
/* @__PURE__ */ q(gr, { children: [
|
|
2169
|
+
/* @__PURE__ */ q(vr, { children: [/* @__PURE__ */ K(pr, {
|
|
229
2170
|
value: t.chartType,
|
|
230
|
-
onChange: (e) =>
|
|
2171
|
+
onChange: (e) => z(e.target.value),
|
|
231
2172
|
availableChartTypes: s,
|
|
232
2173
|
chartTypeLabel: c
|
|
233
|
-
}), /* @__PURE__ */
|
|
2174
|
+
}), /* @__PURE__ */ K(br, {
|
|
234
2175
|
label: "Max Value",
|
|
235
|
-
value:
|
|
236
|
-
min:
|
|
237
|
-
max:
|
|
2176
|
+
value: _.max,
|
|
2177
|
+
min: N(t.chartType).min,
|
|
2178
|
+
max: N(t.chartType).max,
|
|
238
2179
|
variant: "outlined",
|
|
239
|
-
onChange: (e, t) =>
|
|
2180
|
+
onChange: (e, t) => L("max", t, e)
|
|
240
2181
|
})] }),
|
|
241
|
-
!t.chartType.includes("Plot") &&
|
|
242
|
-
|
|
243
|
-
/* @__PURE__ */
|
|
244
|
-
/* @__PURE__ */
|
|
2182
|
+
!t.chartType.includes("Plot") && k,
|
|
2183
|
+
S && /* @__PURE__ */ q(xr, { children: [
|
|
2184
|
+
/* @__PURE__ */ K("div", { children: /* @__PURE__ */ K(F, { children: "Dimensions(px)" }) }),
|
|
2185
|
+
/* @__PURE__ */ q(_r, { children: [/* @__PURE__ */ K(yr, {
|
|
245
2186
|
label: "Width",
|
|
246
|
-
value:
|
|
247
|
-
min:
|
|
248
|
-
max:
|
|
249
|
-
step:
|
|
2187
|
+
value: x.width,
|
|
2188
|
+
min: T.min,
|
|
2189
|
+
max: T.max,
|
|
2190
|
+
step: T.step,
|
|
250
2191
|
variant: "outlined",
|
|
251
|
-
onChange: (e, t) =>
|
|
252
|
-
}), /* @__PURE__ */
|
|
253
|
-
/* @__PURE__ */
|
|
2192
|
+
onChange: (e, t) => P("width", t)
|
|
2193
|
+
}), /* @__PURE__ */ K(Sr, { children: "Min 50, Max 700" })] }),
|
|
2194
|
+
/* @__PURE__ */ q(_r, { children: [/* @__PURE__ */ K(yr, {
|
|
254
2195
|
label: "Height",
|
|
255
|
-
value:
|
|
256
|
-
min:
|
|
257
|
-
max:
|
|
258
|
-
step:
|
|
2196
|
+
value: x.height,
|
|
2197
|
+
min: E.min,
|
|
2198
|
+
max: E.max,
|
|
2199
|
+
step: E.step,
|
|
259
2200
|
variant: "outlined",
|
|
260
|
-
onChange: (e, t) =>
|
|
261
|
-
}), /* @__PURE__ */
|
|
2201
|
+
onChange: (e, t) => P("height", t)
|
|
2202
|
+
}), /* @__PURE__ */ K(Sr, { children: "Min 400, Max 700" })] })
|
|
262
2203
|
] })
|
|
263
2204
|
] }),
|
|
264
|
-
/* @__PURE__ */
|
|
2205
|
+
/* @__PURE__ */ K(V, {
|
|
265
2206
|
open: l.open,
|
|
266
2207
|
title: l.title,
|
|
267
2208
|
text: l.text,
|
|
@@ -270,23 +2211,23 @@ var N = (e, t, n, r, i) => {
|
|
|
270
2211
|
})
|
|
271
2212
|
] });
|
|
272
2213
|
};
|
|
273
|
-
|
|
274
|
-
chartDimensions:
|
|
275
|
-
domain:
|
|
276
|
-
gridValues:
|
|
277
|
-
labelValues:
|
|
278
|
-
model:
|
|
279
|
-
onChange:
|
|
280
|
-
range:
|
|
281
|
-
chartDimension:
|
|
282
|
-
size:
|
|
283
|
-
studentNewCategoryDefaultLabel:
|
|
284
|
-
availableChartTypes:
|
|
285
|
-
chartTypeLabel:
|
|
2214
|
+
Cr.propTypes = {
|
|
2215
|
+
chartDimensions: X.default.object,
|
|
2216
|
+
domain: X.default.object,
|
|
2217
|
+
gridValues: X.default.object,
|
|
2218
|
+
labelValues: X.default.object,
|
|
2219
|
+
model: X.default.object,
|
|
2220
|
+
onChange: X.default.func,
|
|
2221
|
+
range: X.default.object,
|
|
2222
|
+
chartDimension: X.default.object,
|
|
2223
|
+
size: X.default.object,
|
|
2224
|
+
studentNewCategoryDefaultLabel: X.default.object,
|
|
2225
|
+
availableChartTypes: X.default.object,
|
|
2226
|
+
chartTypeLabel: X.default.string
|
|
286
2227
|
};
|
|
287
2228
|
//#endregion
|
|
288
2229
|
//#region ../../shared/configure-events/dist/index.js
|
|
289
|
-
var
|
|
2230
|
+
var wr = class e extends CustomEvent {
|
|
290
2231
|
static {
|
|
291
2232
|
this.TYPE = "model.updated";
|
|
292
2233
|
}
|
|
@@ -299,7 +2240,7 @@ var z = class e extends CustomEvent {
|
|
|
299
2240
|
}
|
|
300
2241
|
}), this.update = t, this.reset = n;
|
|
301
2242
|
}
|
|
302
|
-
},
|
|
2243
|
+
}, Tr = class e extends CustomEvent {
|
|
303
2244
|
static {
|
|
304
2245
|
this.TYPE = "delete.image";
|
|
305
2246
|
}
|
|
@@ -312,7 +2253,7 @@ var z = class e extends CustomEvent {
|
|
|
312
2253
|
}
|
|
313
2254
|
}), this.src = t, this.done = n;
|
|
314
2255
|
}
|
|
315
|
-
},
|
|
2256
|
+
}, Er = class e extends CustomEvent {
|
|
316
2257
|
static {
|
|
317
2258
|
this.TYPE = "insert.image";
|
|
318
2259
|
}
|
|
@@ -322,7 +2263,7 @@ var z = class e extends CustomEvent {
|
|
|
322
2263
|
detail: t
|
|
323
2264
|
}), this.handler = t;
|
|
324
2265
|
}
|
|
325
|
-
},
|
|
2266
|
+
}, Dr = class e extends CustomEvent {
|
|
326
2267
|
static {
|
|
327
2268
|
this.TYPE = "delete.sound";
|
|
328
2269
|
}
|
|
@@ -335,7 +2276,7 @@ var z = class e extends CustomEvent {
|
|
|
335
2276
|
}
|
|
336
2277
|
}), this.src = t, this.done = n;
|
|
337
2278
|
}
|
|
338
|
-
},
|
|
2279
|
+
}, Or = class e extends CustomEvent {
|
|
339
2280
|
static {
|
|
340
2281
|
this.TYPE = "insert.sound";
|
|
341
2282
|
}
|
|
@@ -345,32 +2286,32 @@ var z = class e extends CustomEvent {
|
|
|
345
2286
|
detail: t
|
|
346
2287
|
}), this.handler = t;
|
|
347
2288
|
}
|
|
348
|
-
},
|
|
2289
|
+
}, kr = T("div")(({ theme: e }) => ({
|
|
349
2290
|
marginBottom: e.spacing(2.5),
|
|
350
2291
|
display: "flex",
|
|
351
2292
|
flex: 1
|
|
352
|
-
})),
|
|
2293
|
+
})), Ar = T("div")(({ theme: e }) => ({ marginBottom: e.spacing(1) })), jr = T("div")({ flex: 1 }), Mr = T(I)({ color: `${E.tertiary()} !important` }), Nr = (e, t) => {
|
|
353
2294
|
if (!e) return t;
|
|
354
2295
|
let n = [];
|
|
355
2296
|
return (t || []).forEach((t, r) => {
|
|
356
|
-
let { editable: i, interactive: a } = t;
|
|
2297
|
+
let { editable: i, interactive: a } = t, o = i && e[r]?.label ? e[r].label : t.label, s = a && e[r]?.value ? e[r].value : t.value;
|
|
357
2298
|
n[r] = {
|
|
358
|
-
label:
|
|
359
|
-
value:
|
|
2299
|
+
label: o,
|
|
2300
|
+
value: s,
|
|
360
2301
|
editable: t.editable,
|
|
361
2302
|
interactive: t.interactive
|
|
362
2303
|
};
|
|
363
2304
|
}), n;
|
|
364
|
-
},
|
|
2305
|
+
}, Pr = class extends U.Component {
|
|
365
2306
|
static propTypes = {
|
|
366
|
-
model:
|
|
367
|
-
onChange:
|
|
368
|
-
charts:
|
|
369
|
-
labelsPlaceholders:
|
|
370
|
-
titlePlaceholder:
|
|
371
|
-
showPixelGuides:
|
|
372
|
-
authorNewCategoryDefaults:
|
|
373
|
-
chartingOptions:
|
|
2307
|
+
model: X.default.object.isRequired,
|
|
2308
|
+
onChange: X.default.func.isRequired,
|
|
2309
|
+
charts: X.default.array,
|
|
2310
|
+
labelsPlaceholders: X.default.object,
|
|
2311
|
+
titlePlaceholder: X.default.object,
|
|
2312
|
+
showPixelGuides: X.default.bool,
|
|
2313
|
+
authorNewCategoryDefaults: X.default.object,
|
|
2314
|
+
chartingOptions: X.default.object
|
|
374
2315
|
};
|
|
375
2316
|
constructor(e) {
|
|
376
2317
|
super(e), this.state = { dialog: { open: !1 } };
|
|
@@ -381,7 +2322,7 @@ var z = class e extends CustomEvent {
|
|
|
381
2322
|
data: e
|
|
382
2323
|
});
|
|
383
2324
|
changeAddRemoveEnabled = (e) => {
|
|
384
|
-
let { model: t } = this.props, n =
|
|
2325
|
+
let { model: t } = this.props, n = Nr(t.correctAnswer.data, t.data);
|
|
385
2326
|
e ? this.props.onChange({
|
|
386
2327
|
...this.props.model,
|
|
387
2328
|
addCategoryEnabled: e
|
|
@@ -410,13 +2351,13 @@ var z = class e extends CustomEvent {
|
|
|
410
2351
|
});
|
|
411
2352
|
render() {
|
|
412
2353
|
let { model: e, charts: t, labelsPlaceholders: n, titlePlaceholder: r, showPixelGuides: i, authorNewCategoryDefaults: a, chartingOptions: o, mathMlOptions: s = {}, labelsCharactersLimit: c } = this.props, { dialog: l } = this.state, { domain: u = {}, range: d = {} } = e || {};
|
|
413
|
-
return /* @__PURE__ */
|
|
414
|
-
/* @__PURE__ */
|
|
2354
|
+
return /* @__PURE__ */ q("div", { children: [/* @__PURE__ */ K(Ar, { children: "Define Initial Chart Attributes" }), /* @__PURE__ */ K(kr, { children: /* @__PURE__ */ q(jr, { children: [
|
|
2355
|
+
/* @__PURE__ */ K(F, {
|
|
415
2356
|
component: "div",
|
|
416
2357
|
type: "body1",
|
|
417
|
-
children: /* @__PURE__ */
|
|
2358
|
+
children: /* @__PURE__ */ K("span", { children: "Use the tools below to set up the chart as it will initially appear to students." })
|
|
418
2359
|
}),
|
|
419
|
-
/* @__PURE__ */
|
|
2360
|
+
/* @__PURE__ */ K(ne, {
|
|
420
2361
|
defineChart: !0,
|
|
421
2362
|
chartingOptions: o,
|
|
422
2363
|
showPixelGuides: i,
|
|
@@ -443,13 +2384,13 @@ var z = class e extends CustomEvent {
|
|
|
443
2384
|
mathMlOptions: s,
|
|
444
2385
|
labelsCharactersLimit: c
|
|
445
2386
|
}),
|
|
446
|
-
e.changeAddCategoryEnabled && /* @__PURE__ */
|
|
2387
|
+
e.changeAddCategoryEnabled && /* @__PURE__ */ q("div", { children: [/* @__PURE__ */ K(Mr, {
|
|
447
2388
|
checked: e.addCategoryEnabled,
|
|
448
2389
|
onChange: (e) => {
|
|
449
2390
|
this.changeAddRemoveEnabled(e.target.checked);
|
|
450
2391
|
}
|
|
451
2392
|
}), o?.addCategory?.authoringLabel] }),
|
|
452
|
-
/* @__PURE__ */
|
|
2393
|
+
/* @__PURE__ */ K(V, {
|
|
453
2394
|
open: l.open,
|
|
454
2395
|
title: l.title,
|
|
455
2396
|
text: l.text,
|
|
@@ -458,58 +2399,58 @@ var z = class e extends CustomEvent {
|
|
|
458
2399
|
})
|
|
459
2400
|
] }, "graph") })] });
|
|
460
2401
|
}
|
|
461
|
-
},
|
|
2402
|
+
}, Fr = T("div")(({ theme: e }) => ({
|
|
462
2403
|
marginBottom: e.spacing(2.5),
|
|
463
2404
|
display: "flex",
|
|
464
2405
|
flex: 1
|
|
465
|
-
})),
|
|
2406
|
+
})), Ir = T("div")({ flex: 1 }), Lr = T("div")(({ theme: e }) => ({ border: `2px solid ${e.palette.error.main}` })), Rr = T(F)(({ theme: e }) => ({
|
|
466
2407
|
fontSize: e.typography.fontSize - 2,
|
|
467
2408
|
color: e.palette.error.main,
|
|
468
2409
|
paddingTop: e.spacing(1)
|
|
469
|
-
})),
|
|
2410
|
+
})), zr = T("div")(({ theme: e }) => ({ marginBottom: e.spacing(1) })), Br = (e, t) => e.map((e, n) => ({
|
|
470
2411
|
...e,
|
|
471
2412
|
editable: n < t.length ? t[n].editable : !0,
|
|
472
2413
|
interactive: n < t.length ? t[n].interactive : !0,
|
|
473
2414
|
deletable: n >= t.length
|
|
474
|
-
})),
|
|
2415
|
+
})), Vr = (e, t) => {
|
|
475
2416
|
if (!e) return t;
|
|
476
2417
|
let n = [...e], r = [];
|
|
477
2418
|
if ((t || []).forEach((t, n) => {
|
|
478
|
-
let i = t.editable, a = t.interactive;
|
|
2419
|
+
let i = t.editable, a = t.interactive, o = i && e[n]?.label ? e[n].label : t.label, s = a && e[n]?.value || a && e[n]?.value == 0 ? e[n].value : t.value;
|
|
479
2420
|
r[n] = {
|
|
480
|
-
label:
|
|
481
|
-
value:
|
|
2421
|
+
label: o,
|
|
2422
|
+
value: s,
|
|
482
2423
|
editable: t.editable,
|
|
483
2424
|
interactive: t.interactive
|
|
484
2425
|
};
|
|
485
2426
|
}), r.length < e.length) {
|
|
486
2427
|
let i = (n || []).slice(r.length, e.length);
|
|
487
|
-
return
|
|
2428
|
+
return Br((r || []).concat(i), t);
|
|
488
2429
|
}
|
|
489
2430
|
return r;
|
|
490
|
-
},
|
|
2431
|
+
}, Hr = (e, t) => {
|
|
491
2432
|
let n = t.length - 1, { editable: r, interactive: i, deletable: a, ...o } = t[t.length - 1];
|
|
492
|
-
return (e || []).splice(n, 0, o),
|
|
493
|
-
},
|
|
2433
|
+
return (e || []).splice(n, 0, o), Br([...e], t);
|
|
2434
|
+
}, Ur = (e, t, n) => ((e || []).splice(n, 1), Br([...e], t)), Wr = (e, n, r) => {
|
|
494
2435
|
let i = e && e.model && e.model.data || [], a = n && n.model && n.model.data || [], o = t(e && e.model && e.model.correctAnswer && e.model.correctAnswer.data || []), s = t(r ? r.categories : []), c = [];
|
|
495
|
-
if (i.length > a.length) return c =
|
|
2436
|
+
if (i.length > a.length) return c = Hr(o, i), c;
|
|
496
2437
|
if (i.length < a.length) {
|
|
497
2438
|
let e = i.length;
|
|
498
2439
|
for (let t = 0; t < i.length; t++) if (i[t].index !== t) {
|
|
499
2440
|
e = t;
|
|
500
2441
|
break;
|
|
501
2442
|
}
|
|
502
|
-
return c =
|
|
2443
|
+
return c = Ur(s, i, e), c;
|
|
503
2444
|
}
|
|
504
|
-
return c =
|
|
505
|
-
},
|
|
2445
|
+
return c = Vr(o, i), c;
|
|
2446
|
+
}, Gr = class extends U.Component {
|
|
506
2447
|
static propTypes = {
|
|
507
|
-
correctAnswerErrors:
|
|
508
|
-
studentNewCategoryDefaultLabel:
|
|
509
|
-
model:
|
|
510
|
-
onChange:
|
|
511
|
-
charts:
|
|
512
|
-
error:
|
|
2448
|
+
correctAnswerErrors: X.default.object,
|
|
2449
|
+
studentNewCategoryDefaultLabel: X.default.string,
|
|
2450
|
+
model: X.default.object.isRequired,
|
|
2451
|
+
onChange: X.default.func.isRequired,
|
|
2452
|
+
charts: X.default.array,
|
|
2453
|
+
error: X.default.string
|
|
513
2454
|
};
|
|
514
2455
|
constructor(e) {
|
|
515
2456
|
super(e), this.state = { categories: [] };
|
|
@@ -525,22 +2466,22 @@ var z = class e extends CustomEvent {
|
|
|
525
2466
|
});
|
|
526
2467
|
};
|
|
527
2468
|
componentDidMount() {
|
|
528
|
-
let e =
|
|
529
|
-
this.setState({ categories: e ||
|
|
2469
|
+
let e = Wr(this.props, this.props, null);
|
|
2470
|
+
this.setState({ categories: e || Vr(this.props.model.correctAnswer.data, this.props.model.data) });
|
|
530
2471
|
}
|
|
531
2472
|
componentDidUpdate(e, t) {
|
|
532
|
-
let
|
|
533
|
-
|
|
2473
|
+
let n = Wr(this.props, e, t);
|
|
2474
|
+
n && !a(n, this.state.categories) && (this.changeData(n), this.setState({ categories: n }));
|
|
534
2475
|
}
|
|
535
2476
|
render() {
|
|
536
2477
|
let { model: e, charts: t, error: n, studentNewCategoryDefaultLabel: r, correctAnswerErrors: i, mathMlOptions: a = {}, labelsPlaceholders: o = {} } = this.props, { categories: s } = this.state, { domain: c = {}, range: l = {} } = e || {}, { identicalError: u, categoriesError: d } = i || {};
|
|
537
|
-
return /* @__PURE__ */
|
|
538
|
-
/* @__PURE__ */
|
|
2478
|
+
return /* @__PURE__ */ q("div", { children: [/* @__PURE__ */ K(zr, { children: "Define Correct Response" }), /* @__PURE__ */ K(Fr, { children: /* @__PURE__ */ q(Ir, { children: [
|
|
2479
|
+
/* @__PURE__ */ K(F, {
|
|
539
2480
|
component: "div",
|
|
540
2481
|
type: "body1",
|
|
541
|
-
children: /* @__PURE__ */
|
|
2482
|
+
children: /* @__PURE__ */ K("span", { children: "Use the tools below to define the correct answer." })
|
|
542
2483
|
}),
|
|
543
|
-
|
|
2484
|
+
K(u || d ? Lr : "div", { children: /* @__PURE__ */ K(ne, {
|
|
544
2485
|
chartType: e.chartType,
|
|
545
2486
|
size: e.graph,
|
|
546
2487
|
domain: c,
|
|
@@ -555,14 +2496,14 @@ var z = class e extends CustomEvent {
|
|
|
555
2496
|
mathMlOptions: a,
|
|
556
2497
|
labelsPlaceholders: o
|
|
557
2498
|
}) }, `correct-response-graph-${e.correctAnswer.name}`),
|
|
558
|
-
(u || d) && /* @__PURE__ */
|
|
2499
|
+
(u || d) && /* @__PURE__ */ K(Rr, {
|
|
559
2500
|
component: "div",
|
|
560
2501
|
type: "body1",
|
|
561
|
-
children: /* @__PURE__ */
|
|
2502
|
+
children: /* @__PURE__ */ K("span", { children: u || d })
|
|
562
2503
|
})
|
|
563
2504
|
] }, "graph") })] });
|
|
564
2505
|
}
|
|
565
|
-
},
|
|
2506
|
+
}, Kr = [
|
|
566
2507
|
.01,
|
|
567
2508
|
.02,
|
|
568
2509
|
.04,
|
|
@@ -589,7 +2530,7 @@ var z = class e extends CustomEvent {
|
|
|
589
2530
|
100,
|
|
590
2531
|
500,
|
|
591
2532
|
1e3
|
|
592
|
-
],
|
|
2533
|
+
], qr = [
|
|
593
2534
|
.01,
|
|
594
2535
|
.02,
|
|
595
2536
|
.05,
|
|
@@ -606,7 +2547,7 @@ var z = class e extends CustomEvent {
|
|
|
606
2547
|
100,
|
|
607
2548
|
500,
|
|
608
2549
|
1e3
|
|
609
|
-
],
|
|
2550
|
+
], Jr = {
|
|
610
2551
|
.01: [
|
|
611
2552
|
0,
|
|
612
2553
|
.01,
|
|
@@ -785,50 +2726,50 @@ var z = class e extends CustomEvent {
|
|
|
785
2726
|
4e3,
|
|
786
2727
|
5e3
|
|
787
2728
|
]
|
|
788
|
-
},
|
|
789
|
-
let r = 10 * (e.max - e.min) / t, i = r * 10, a = n && !
|
|
790
|
-
return (!n || a ?
|
|
791
|
-
},
|
|
792
|
-
let
|
|
793
|
-
if (!n
|
|
794
|
-
let n =
|
|
795
|
-
return e.step = n, o =
|
|
796
|
-
gridValues:
|
|
2729
|
+
}, Yr = (e, t, n = !1) => {
|
|
2730
|
+
let r = 10 * (e.max - e.min) / t, i = r * 10, a = n && !qr.includes(e.step) && Kr.includes(e.step);
|
|
2731
|
+
return (!n || a ? Kr : qr).filter((e) => e >= r && e <= i);
|
|
2732
|
+
}, Xr = (e) => Jr[e] || [], Zr = (e, t, n, r) => {
|
|
2733
|
+
let i = Yr(e, t), o = Xr(e.step || 1);
|
|
2734
|
+
if (!a(n, i) && !i.includes(e.step)) {
|
|
2735
|
+
let n = Yr(e, t, !0)[0] || 1;
|
|
2736
|
+
return e.step = n, o = Xr(n), o.includes(e.labelStep) || (e.labelStep = n), {
|
|
2737
|
+
gridValues: i,
|
|
797
2738
|
labelValues: o
|
|
798
2739
|
};
|
|
799
2740
|
}
|
|
800
|
-
return !
|
|
801
|
-
gridValues:
|
|
2741
|
+
return !a(r, o) && !o.includes(e.labelStep) && (e.labelStep = e.step), {
|
|
2742
|
+
gridValues: i,
|
|
802
2743
|
labelValues: o
|
|
803
2744
|
};
|
|
804
|
-
},
|
|
2745
|
+
}, Qr = (0, Ke.default)("@pie-element:graphing:configure"), { Panel: $r, toggle: $, radio: ei, dropdown: ti, textField: ni } = Jn, ri = T(or)(({ theme: e }) => ({
|
|
805
2746
|
width: "100%",
|
|
806
2747
|
paddingTop: e.spacing(2),
|
|
807
2748
|
marginBottom: e.spacing(2)
|
|
808
|
-
})),
|
|
2749
|
+
})), ii = T(F)(({ theme: e }) => ({ marginBottom: e.spacing(2.5) })), ai = T("div")(({ theme: e }) => ({
|
|
809
2750
|
fontSize: e.typography.fontSize - 2,
|
|
810
2751
|
color: e.palette.error.main,
|
|
811
2752
|
paddingTop: e.spacing(1)
|
|
812
|
-
})),
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
],
|
|
2753
|
+
})), oi = [
|
|
2754
|
+
R.Bar(),
|
|
2755
|
+
R.Histogram(),
|
|
2756
|
+
R.LineDot(),
|
|
2757
|
+
R.LineCross(),
|
|
2758
|
+
R.DotPlot(),
|
|
2759
|
+
R.LinePlot()
|
|
2760
|
+
], si = class extends W.Component {
|
|
820
2761
|
static propTypes = {
|
|
821
|
-
onModelChanged:
|
|
822
|
-
onConfigurationChanged:
|
|
823
|
-
imageSupport:
|
|
824
|
-
uploadSoundSupport:
|
|
825
|
-
model:
|
|
826
|
-
configuration:
|
|
827
|
-
chartingOptions:
|
|
2762
|
+
onModelChanged: X.default.func,
|
|
2763
|
+
onConfigurationChanged: X.default.func,
|
|
2764
|
+
imageSupport: X.default.object,
|
|
2765
|
+
uploadSoundSupport: X.default.object,
|
|
2766
|
+
model: X.default.object.isRequired,
|
|
2767
|
+
configuration: X.default.object.isRequired,
|
|
2768
|
+
chartingOptions: X.default.object
|
|
828
2769
|
};
|
|
829
2770
|
constructor(e) {
|
|
830
2771
|
super(e);
|
|
831
|
-
let { range: t = {}, graph: n } = e.model || {}, r = { range:
|
|
2772
|
+
let { range: t = {}, graph: n } = e.model || {}, r = { range: Yr(t, n.height, !0) }, i = { range: Xr(t.step || 1) };
|
|
832
2773
|
this.state = {
|
|
833
2774
|
gridValues: r,
|
|
834
2775
|
labelValues: i
|
|
@@ -854,7 +2795,7 @@ var z = class e extends CustomEvent {
|
|
|
854
2795
|
let { model: t, onModelChanged: n } = this.props, { gridValues: r, labelValues: i } = this.state, a = {
|
|
855
2796
|
...t,
|
|
856
2797
|
...e
|
|
857
|
-
}, { graph: o, range: s } = a, c = {}, l = {}, u =
|
|
2798
|
+
}, { graph: o, range: s } = a, c = {}, l = {}, u = Zr(s, o.height, r.range, i.range);
|
|
858
2799
|
c.range = u.gridValues, l.range = u.labelValues, this.setState({
|
|
859
2800
|
gridValues: c,
|
|
860
2801
|
labelValues: l
|
|
@@ -862,135 +2803,135 @@ var z = class e extends CustomEvent {
|
|
|
862
2803
|
};
|
|
863
2804
|
render() {
|
|
864
2805
|
let { configuration: e, imageSupport: t, model: n, onConfigurationChanged: r, onModelChanged: i, uploadSoundSupport: a } = this.props;
|
|
865
|
-
|
|
866
|
-
let { graph: o } = n, { baseInputConfiguration: s = {}, contentDimensions:
|
|
867
|
-
changeInteractiveEnabled:
|
|
868
|
-
changeEditableEnabled:
|
|
869
|
-
changeAddCategoryEnabled:
|
|
870
|
-
},
|
|
871
|
-
teacherInstructionsEnabled:
|
|
872
|
-
studentInstructionsEnabled:
|
|
873
|
-
rationaleEnabled:
|
|
874
|
-
spellCheckEnabled:
|
|
875
|
-
promptEnabled:
|
|
876
|
-
scoringType:
|
|
877
|
-
rubricEnabled:
|
|
878
|
-
"language.enabled":
|
|
879
|
-
language:
|
|
880
|
-
instruction:
|
|
881
|
-
},
|
|
2806
|
+
Qr("[render] model", n);
|
|
2807
|
+
let { graph: o } = n, { baseInputConfiguration: s = {}, contentDimensions: c = {}, chartDimensions: l = {}, authorNewCategoryDefaults: u = {}, labelsPlaceholders: d = {}, instruction: f = {}, maxImageWidth: p = {}, maxImageHeight: m = {}, prompt: h = {}, rationale: g = {}, scoringType: _ = {}, settingsPanelDisabled: v, spellCheck: y = {}, studentInstructions: b = {}, teacherInstructions: x = {}, titlePlaceholder: S = {}, withRubric: C = {}, chartingOptions: w = {}, availableChartTypes: T = {}, mathMlOptions: E = {}, chartTypeLabel: D, language: O = {}, languageChoices: k = {}, labelsCharactersLimit: A } = e || {}, { errors: j, extraCSSRules: M, promptEnabled: N, rationaleEnabled: P, spellCheckEnabled: F, teacherInstructionsEnabled: I, studentNewCategoryDefaultLabel: L } = n || {}, { categoryErrors: te, correctAnswerErrors: R, prompt: z, rationale: B, teacherInstructions: V } = j || {}, { gridValues: ne, labelValues: re } = this.state, ie = l.showInConfigPanel || !0, ae = p && p.prompt, H = m && m.prompt, U = {
|
|
2808
|
+
changeInteractiveEnabled: w.changeInteractive?.settings && $(w.changeInteractive.settingsLabel),
|
|
2809
|
+
changeEditableEnabled: w.changeEditable?.settings && $(w.changeEditable.settingsLabel),
|
|
2810
|
+
changeAddCategoryEnabled: w.addCategory?.settings && $(w.addCategory.settingsLabel)
|
|
2811
|
+
}, W = {
|
|
2812
|
+
teacherInstructionsEnabled: x.settings && $(x.label),
|
|
2813
|
+
studentInstructionsEnabled: b.settings && $(b.label),
|
|
2814
|
+
rationaleEnabled: g.settings && $(g.label),
|
|
2815
|
+
spellCheckEnabled: y.settings && $(y.label),
|
|
2816
|
+
promptEnabled: h.settings && $(h.label),
|
|
2817
|
+
scoringType: _.settings && ei(_.label, ["all or nothing", "partial scoring"]),
|
|
2818
|
+
rubricEnabled: C?.settings && $(C?.label),
|
|
2819
|
+
"language.enabled": O.settings && $(O.label, !0),
|
|
2820
|
+
language: O.settings && O.enabled && ti(k.label, k.options),
|
|
2821
|
+
instruction: f.settings && ni(f.label)
|
|
2822
|
+
}, G = (e = {}) => ({
|
|
882
2823
|
...s,
|
|
883
2824
|
...e
|
|
884
2825
|
});
|
|
885
|
-
return /* @__PURE__ */
|
|
886
|
-
extraCSSRules:
|
|
887
|
-
dimensions:
|
|
888
|
-
hideSettings:
|
|
889
|
-
settings: /* @__PURE__ */
|
|
2826
|
+
return /* @__PURE__ */ q(bn.ConfigLayout, {
|
|
2827
|
+
extraCSSRules: M,
|
|
2828
|
+
dimensions: c,
|
|
2829
|
+
hideSettings: v,
|
|
2830
|
+
settings: /* @__PURE__ */ K($r, {
|
|
890
2831
|
model: n,
|
|
891
2832
|
configuration: e,
|
|
892
2833
|
onChangeModel: i,
|
|
893
2834
|
onChangeConfiguration: r,
|
|
894
2835
|
groups: {
|
|
895
|
-
Settings:
|
|
896
|
-
Properties:
|
|
2836
|
+
Settings: U,
|
|
2837
|
+
Properties: W
|
|
897
2838
|
}
|
|
898
2839
|
}),
|
|
899
2840
|
children: [
|
|
900
|
-
/* @__PURE__ */
|
|
2841
|
+
/* @__PURE__ */ K(ii, {
|
|
901
2842
|
component: "div",
|
|
902
2843
|
type: "body1",
|
|
903
|
-
children:
|
|
2844
|
+
children: f?.label || ""
|
|
904
2845
|
}),
|
|
905
|
-
I && /* @__PURE__ */
|
|
906
|
-
label:
|
|
907
|
-
children: [/* @__PURE__ */
|
|
2846
|
+
I && /* @__PURE__ */ q(ri, {
|
|
2847
|
+
label: x.label,
|
|
2848
|
+
children: [/* @__PURE__ */ K(ee, {
|
|
908
2849
|
markup: n.teacherInstructions || "",
|
|
909
2850
|
onChange: this.onTeacherInstructionsChange,
|
|
910
2851
|
imageSupport: t,
|
|
911
2852
|
nonEmpty: !1,
|
|
912
|
-
error:
|
|
2853
|
+
error: V,
|
|
913
2854
|
spellCheck: F,
|
|
914
|
-
pluginProps:
|
|
915
|
-
maxImageWidth:
|
|
916
|
-
maxImageHeight:
|
|
2855
|
+
pluginProps: G(x?.inputConfiguration),
|
|
2856
|
+
maxImageWidth: p && p.teacherInstructions || ae,
|
|
2857
|
+
maxImageHeight: m && m.teacherInstructions || H,
|
|
917
2858
|
uploadSoundSupport: a,
|
|
918
2859
|
languageCharactersProps: [{ language: "spanish" }, { language: "special" }],
|
|
919
|
-
mathMlOptions:
|
|
920
|
-
}),
|
|
2860
|
+
mathMlOptions: E
|
|
2861
|
+
}), V && /* @__PURE__ */ K(ai, { children: V })]
|
|
921
2862
|
}),
|
|
922
|
-
|
|
923
|
-
label:
|
|
924
|
-
children: [/* @__PURE__ */
|
|
2863
|
+
N && /* @__PURE__ */ q(ri, {
|
|
2864
|
+
label: h.label,
|
|
2865
|
+
children: [/* @__PURE__ */ K(ee, {
|
|
925
2866
|
markup: n.prompt,
|
|
926
2867
|
onChange: this.onPromptChange,
|
|
927
2868
|
imageSupport: t,
|
|
928
2869
|
nonEmpty: !1,
|
|
929
|
-
error:
|
|
2870
|
+
error: z,
|
|
930
2871
|
spellCheck: F,
|
|
931
2872
|
disableUnderline: !0,
|
|
932
|
-
pluginProps:
|
|
933
|
-
maxImageWidth:
|
|
934
|
-
maxImageHeight:
|
|
2873
|
+
pluginProps: G(h?.inputConfiguration),
|
|
2874
|
+
maxImageWidth: ae,
|
|
2875
|
+
maxImageHeight: H,
|
|
935
2876
|
uploadSoundSupport: a,
|
|
936
2877
|
languageCharactersProps: [{ language: "spanish" }, { language: "special" }],
|
|
937
|
-
mathMlOptions:
|
|
938
|
-
}),
|
|
2878
|
+
mathMlOptions: E
|
|
2879
|
+
}), z && /* @__PURE__ */ K(ai, { children: z })]
|
|
939
2880
|
}),
|
|
940
|
-
/* @__PURE__ */
|
|
2881
|
+
/* @__PURE__ */ K(Cr, {
|
|
941
2882
|
model: n,
|
|
942
2883
|
onChange: this.onConfigChange,
|
|
943
|
-
gridValues:
|
|
944
|
-
labelValues:
|
|
945
|
-
chartDimensions:
|
|
946
|
-
charts:
|
|
2884
|
+
gridValues: ne,
|
|
2885
|
+
labelValues: re,
|
|
2886
|
+
chartDimensions: l,
|
|
2887
|
+
charts: oi,
|
|
947
2888
|
studentNewCategoryDefaultLabel: L,
|
|
948
|
-
availableChartTypes:
|
|
949
|
-
chartTypeLabel:
|
|
2889
|
+
availableChartTypes: T,
|
|
2890
|
+
chartTypeLabel: D
|
|
950
2891
|
}),
|
|
951
|
-
/* @__PURE__ */
|
|
2892
|
+
/* @__PURE__ */ K(Pr, {
|
|
952
2893
|
model: n,
|
|
953
2894
|
onChange: i,
|
|
954
|
-
charts:
|
|
955
|
-
labelsPlaceholders:
|
|
956
|
-
titlePlaceholder:
|
|
957
|
-
showPixelGuides:
|
|
958
|
-
authorNewCategoryDefaults:
|
|
959
|
-
chartingOptions:
|
|
960
|
-
mathMlOptions:
|
|
961
|
-
labelsCharactersLimit:
|
|
2895
|
+
charts: oi,
|
|
2896
|
+
labelsPlaceholders: d,
|
|
2897
|
+
titlePlaceholder: S,
|
|
2898
|
+
showPixelGuides: ie,
|
|
2899
|
+
authorNewCategoryDefaults: u,
|
|
2900
|
+
chartingOptions: w,
|
|
2901
|
+
mathMlOptions: E,
|
|
2902
|
+
labelsCharactersLimit: A
|
|
962
2903
|
}),
|
|
963
|
-
/* @__PURE__ */
|
|
2904
|
+
/* @__PURE__ */ K(Gr, {
|
|
964
2905
|
config: o,
|
|
965
2906
|
model: n,
|
|
966
2907
|
onChange: i,
|
|
967
|
-
charts:
|
|
968
|
-
error:
|
|
969
|
-
correctAnswerErrors:
|
|
2908
|
+
charts: oi,
|
|
2909
|
+
error: te,
|
|
2910
|
+
correctAnswerErrors: R,
|
|
970
2911
|
studentNewCategoryDefaultLabel: L,
|
|
971
|
-
mathMlOptions:
|
|
972
|
-
labelsPlaceholders:
|
|
2912
|
+
mathMlOptions: E,
|
|
2913
|
+
labelsPlaceholders: d
|
|
973
2914
|
}),
|
|
974
|
-
|
|
975
|
-
label:
|
|
976
|
-
children: [/* @__PURE__ */
|
|
2915
|
+
P && /* @__PURE__ */ q(ri, {
|
|
2916
|
+
label: g.label || "Rationale",
|
|
2917
|
+
children: [/* @__PURE__ */ K(ee, {
|
|
977
2918
|
markup: n.rationale || "",
|
|
978
2919
|
onChange: this.onRationaleChange,
|
|
979
2920
|
imageSupport: t,
|
|
980
|
-
error:
|
|
2921
|
+
error: B,
|
|
981
2922
|
spellCheck: F,
|
|
982
|
-
pluginProps:
|
|
983
|
-
maxImageWidth:
|
|
984
|
-
maxImageHeight:
|
|
2923
|
+
pluginProps: G(g?.inputConfiguration),
|
|
2924
|
+
maxImageWidth: p && p.rationale || ae,
|
|
2925
|
+
maxImageHeight: m && m.rationale || H,
|
|
985
2926
|
uploadSoundSupport: a,
|
|
986
2927
|
languageCharactersProps: [{ language: "spanish" }, { language: "special" }],
|
|
987
|
-
mathMlOptions:
|
|
988
|
-
}),
|
|
2928
|
+
mathMlOptions: E
|
|
2929
|
+
}), B && /* @__PURE__ */ K(ai, { children: B })]
|
|
989
2930
|
})
|
|
990
2931
|
]
|
|
991
2932
|
});
|
|
992
2933
|
}
|
|
993
|
-
},
|
|
2934
|
+
}, ci = {
|
|
994
2935
|
model: {
|
|
995
2936
|
addCategoryEnabled: !0,
|
|
996
2937
|
changeAddCategoryEnabled: !1,
|
|
@@ -1172,20 +3113,20 @@ var z = class e extends CustomEvent {
|
|
|
1172
3113
|
}
|
|
1173
3114
|
}
|
|
1174
3115
|
}
|
|
1175
|
-
},
|
|
3116
|
+
}, li = (0, Ke.default)("pie-elements:graphing:configure"), ui = class e extends HTMLElement {
|
|
1176
3117
|
static createDefaultModel = (e = {}) => ({
|
|
1177
|
-
...
|
|
3118
|
+
...ci.model,
|
|
1178
3119
|
...e
|
|
1179
3120
|
});
|
|
1180
3121
|
constructor() {
|
|
1181
|
-
super(), this._root = null, this._model = e.createDefaultModel(), this._configuration =
|
|
3122
|
+
super(), this._root = null, this._model = e.createDefaultModel(), this._configuration = ci.configuration;
|
|
1182
3123
|
}
|
|
1183
3124
|
set model(t) {
|
|
1184
3125
|
this._model = e.createDefaultModel(t), this._render();
|
|
1185
3126
|
}
|
|
1186
3127
|
set configuration(e) {
|
|
1187
3128
|
let t = {
|
|
1188
|
-
...
|
|
3129
|
+
...ci.configuration,
|
|
1189
3130
|
...e
|
|
1190
3131
|
};
|
|
1191
3132
|
this._configuration = t, t?.language?.enabled ? t?.languageChoices?.options?.length && (this._model.language = t?.languageChoices.options[0].value) : t.language.settings && this._model.language ? (this._configuration.language.enabled = !0, (!this._configuration.languageChoices.options || !this._configuration.languageChoices.options.length) && (this._configuration.languageChoices.options = []), this._configuration.languageChoices.options.find((e) => e.value === this._model.language) || this._configuration.languageChoices.options.push({
|
|
@@ -1194,26 +3135,26 @@ var z = class e extends CustomEvent {
|
|
|
1194
3135
|
})) : delete this._model.language, this._render();
|
|
1195
3136
|
}
|
|
1196
3137
|
onModelChanged(e) {
|
|
1197
|
-
this._model = e, this._render(),
|
|
3138
|
+
this._model = e, this._render(), li("[onModelChanged]: ", this._model), this.dispatchEvent(new wr(this._model));
|
|
1198
3139
|
}
|
|
1199
3140
|
onConfigurationChanged(e) {
|
|
1200
3141
|
this._configuration = e, this._render();
|
|
1201
3142
|
}
|
|
1202
3143
|
insertImage(e) {
|
|
1203
|
-
this.dispatchEvent(new
|
|
3144
|
+
this.dispatchEvent(new Er(e));
|
|
1204
3145
|
}
|
|
1205
3146
|
onDeleteImage(e, t) {
|
|
1206
|
-
this.dispatchEvent(new
|
|
3147
|
+
this.dispatchEvent(new Tr(e, t));
|
|
1207
3148
|
}
|
|
1208
3149
|
insertSound(e) {
|
|
1209
|
-
this.dispatchEvent(new
|
|
3150
|
+
this.dispatchEvent(new Or(e));
|
|
1210
3151
|
}
|
|
1211
3152
|
onDeleteSound(e, t) {
|
|
1212
|
-
this.dispatchEvent(new
|
|
3153
|
+
this.dispatchEvent(new Dr(e, t));
|
|
1213
3154
|
}
|
|
1214
3155
|
_render() {
|
|
1215
3156
|
if (this._model) {
|
|
1216
|
-
let e =
|
|
3157
|
+
let e = W.createElement(si, {
|
|
1217
3158
|
onModelChanged: this.onModelChanged.bind(this),
|
|
1218
3159
|
onConfigurationChanged: this.onConfigurationChanged.bind(this),
|
|
1219
3160
|
model: this._model,
|
|
@@ -1227,16 +3168,19 @@ var z = class e extends CustomEvent {
|
|
|
1227
3168
|
delete: this.onDeleteSound.bind(this)
|
|
1228
3169
|
}
|
|
1229
3170
|
});
|
|
1230
|
-
this._root ||=
|
|
1231
|
-
|
|
3171
|
+
this._root ||= le(this), this._root.render(e), queueMicrotask(() => {
|
|
3172
|
+
v(this);
|
|
1232
3173
|
});
|
|
1233
3174
|
}
|
|
1234
3175
|
}
|
|
3176
|
+
connectedCallback() {
|
|
3177
|
+
this._render();
|
|
3178
|
+
}
|
|
1235
3179
|
disconnectedCallback() {
|
|
1236
|
-
this._root
|
|
3180
|
+
this._root &&= (this._root.unmount(), null);
|
|
1237
3181
|
}
|
|
1238
3182
|
};
|
|
1239
3183
|
//#endregion
|
|
1240
|
-
export {
|
|
3184
|
+
export { ui as default };
|
|
1241
3185
|
|
|
1242
3186
|
//# sourceMappingURL=index.js.map
|