@overmap-ai/forms 1.0.40-display-file-fix.0 → 1.0.40-file-component-improvements.1
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/form/renderer/FieldsRenderer.d.ts +4 -3
- package/dist/forms.js +809 -794
- package/dist/forms.umd.cjs +17 -17
- package/package.json +1 -1
package/dist/forms.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
var zs = Object.defineProperty;
|
|
2
2
|
var Us = (r, e, t) => e in r ? zs(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t;
|
|
3
3
|
var R = (r, e, t) => Us(r, typeof e != "symbol" ? e + "" : e, t);
|
|
4
|
-
import { jsxs as
|
|
5
|
-
import { Card as pt, LuIcon as
|
|
4
|
+
import { jsxs as _, Fragment as Le, jsx as p } from "react/jsx-runtime";
|
|
5
|
+
import { Card as pt, LuIcon as N, Text as pe, Spinner as ti, Overlay as xt, preventDefault as Hs, ButtonGroup as ue, Tooltip as Xt, IconButton as ne, Separator as Ft, Input as ge, Badge as ye, Checkbox as Hr, CheckboxGroup as En, Popover as xe, Button as B, DayPicker as za, Menu as D, OneTimePasswordField as Sn, stopPropagation as mt, RadioGroup as Wt, TextArea as or, Rating as Fi, Heading as Gs, toast as qe, ToggleGroup as bn, useAlertDialog as qs } from "@overmap-ai/blocks";
|
|
6
6
|
import { cx as Ct, cva as ri } from "class-variance-authority";
|
|
7
|
-
import { forwardRef as ni, createElement as kn, memo as L, createContext as jr, useState as
|
|
7
|
+
import { forwardRef as ni, createElement as kn, memo as L, createContext as jr, useState as Xe, useEffect as dt, useContext as Xs, useCallback as b, Fragment as ii, use as ce, useMemo as se, useRef as Yr, useLayoutEffect as Ws } from "react";
|
|
8
8
|
import "@xyflow/react/dist/style.css";
|
|
9
9
|
import { getBezierPath as $s, Position as yt, BaseEdge as js, EdgeLabelRenderer as Ys, NodeToolbar as Zs, Handle as Pi, MarkerType as Ks, useNodesState as Qs, useEdgesState as Js, ReactFlow as el, Panel as In } from "@xyflow/react";
|
|
10
10
|
import { willCreateCycle as Ua } from "graphology-dag";
|
|
@@ -177,8 +177,9 @@ const El = [["path", { d: "m6 9 6 6 6-6", key: "qrunsl" }]], Zr = q("chevron-dow
|
|
|
177
177
|
*/
|
|
178
178
|
const Sl = [
|
|
179
179
|
["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
|
|
180
|
-
["
|
|
181
|
-
|
|
180
|
+
["line", { x1: "12", x2: "12", y1: "8", y2: "12", key: "1pkeuh" }],
|
|
181
|
+
["line", { x1: "12", x2: "12.01", y1: "16", y2: "16", key: "4dfq90" }]
|
|
182
|
+
], bl = q("circle-alert", Sl);
|
|
182
183
|
/**
|
|
183
184
|
* @license lucide-react v0.542.0 - ISC
|
|
184
185
|
*
|
|
@@ -187,8 +188,8 @@ const Sl = [
|
|
|
187
188
|
*/
|
|
188
189
|
const Il = [
|
|
189
190
|
["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
|
|
190
|
-
["
|
|
191
|
-
], Ol = q("circle-
|
|
191
|
+
["path", { d: "m9 12 2 2 4-4", key: "dzmm74" }]
|
|
192
|
+
], Ol = q("circle-check", Il);
|
|
192
193
|
/**
|
|
193
194
|
* @license lucide-react v0.542.0 - ISC
|
|
194
195
|
*
|
|
@@ -196,48 +197,58 @@ const Il = [
|
|
|
196
197
|
* See the LICENSE file in the root directory of this source tree.
|
|
197
198
|
*/
|
|
198
199
|
const Nl = [
|
|
200
|
+
["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
|
|
201
|
+
["circle", { cx: "12", cy: "12", r: "1", key: "41hilf" }]
|
|
202
|
+
], Tl = q("circle-dot", Nl);
|
|
203
|
+
/**
|
|
204
|
+
* @license lucide-react v0.542.0 - ISC
|
|
205
|
+
*
|
|
206
|
+
* This source code is licensed under the ISC license.
|
|
207
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
208
|
+
*/
|
|
209
|
+
const Dl = [
|
|
199
210
|
["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
|
|
200
211
|
["path", { d: "M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3", key: "1u773s" }],
|
|
201
212
|
["path", { d: "M12 17h.01", key: "p32p05" }]
|
|
202
|
-
],
|
|
213
|
+
], Rl = q("circle-question-mark", Dl);
|
|
203
214
|
/**
|
|
204
215
|
* @license lucide-react v0.542.0 - ISC
|
|
205
216
|
*
|
|
206
217
|
* This source code is licensed under the ISC license.
|
|
207
218
|
* See the LICENSE file in the root directory of this source tree.
|
|
208
219
|
*/
|
|
209
|
-
const
|
|
220
|
+
const Ml = [
|
|
210
221
|
["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
|
|
211
222
|
["path", { d: "m15 9-6 6", key: "1uzhvr" }],
|
|
212
223
|
["path", { d: "m9 9 6 6", key: "z0biqf" }]
|
|
213
|
-
],
|
|
224
|
+
], Vl = q("circle-x", Ml);
|
|
214
225
|
/**
|
|
215
226
|
* @license lucide-react v0.542.0 - ISC
|
|
216
227
|
*
|
|
217
228
|
* This source code is licensed under the ISC license.
|
|
218
229
|
* See the LICENSE file in the root directory of this source tree.
|
|
219
230
|
*/
|
|
220
|
-
const
|
|
231
|
+
const Fl = [["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }]], Za = q("circle", Fl);
|
|
221
232
|
/**
|
|
222
233
|
* @license lucide-react v0.542.0 - ISC
|
|
223
234
|
*
|
|
224
235
|
* This source code is licensed under the ISC license.
|
|
225
236
|
* See the LICENSE file in the root directory of this source tree.
|
|
226
237
|
*/
|
|
227
|
-
const
|
|
238
|
+
const Pl = [
|
|
228
239
|
["rect", { width: "8", height: "4", x: "8", y: "2", rx: "1", ry: "1", key: "tgr4d6" }],
|
|
229
240
|
["path", { d: "M8 4H6a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-2", key: "4jdomd" }],
|
|
230
241
|
["path", { d: "M16 4h2a2 2 0 0 1 2 2v4", key: "3hqy98" }],
|
|
231
242
|
["path", { d: "M21 14H11", key: "1bme5i" }],
|
|
232
243
|
["path", { d: "m15 10-4 4 4 4", key: "5dvupr" }]
|
|
233
|
-
], Ka = q("clipboard-copy",
|
|
244
|
+
], Ka = q("clipboard-copy", Pl);
|
|
234
245
|
/**
|
|
235
246
|
* @license lucide-react v0.542.0 - ISC
|
|
236
247
|
*
|
|
237
248
|
* This source code is licensed under the ISC license.
|
|
238
249
|
* See the LICENSE file in the root directory of this source tree.
|
|
239
250
|
*/
|
|
240
|
-
const
|
|
251
|
+
const Bl = [
|
|
241
252
|
["rect", { width: "8", height: "4", x: "8", y: "2", rx: "1", ry: "1", key: "tgr4d6" }],
|
|
242
253
|
[
|
|
243
254
|
"path",
|
|
@@ -250,85 +261,74 @@ const Fl = [
|
|
|
250
261
|
["path", { d: "M12 16h4", key: "n85exb" }],
|
|
251
262
|
["path", { d: "M8 11h.01", key: "1dfujw" }],
|
|
252
263
|
["path", { d: "M8 16h.01", key: "18s6g9" }]
|
|
253
|
-
],
|
|
264
|
+
], kl = q("clipboard-list", Bl);
|
|
254
265
|
/**
|
|
255
266
|
* @license lucide-react v0.542.0 - ISC
|
|
256
267
|
*
|
|
257
268
|
* This source code is licensed under the ISC license.
|
|
258
269
|
* See the LICENSE file in the root directory of this source tree.
|
|
259
270
|
*/
|
|
260
|
-
const
|
|
271
|
+
const Ll = [
|
|
261
272
|
["path", { d: "M11 14h10", key: "1w8e9d" }],
|
|
262
273
|
["path", { d: "M16 4h2a2 2 0 0 1 2 2v1.344", key: "1e62lh" }],
|
|
263
274
|
["path", { d: "m17 18 4-4-4-4", key: "z2g111" }],
|
|
264
275
|
["path", { d: "M8 4H6a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h12a2 2 0 0 0 1.793-1.113", key: "bjbb7m" }],
|
|
265
276
|
["rect", { x: "8", y: "2", width: "8", height: "4", rx: "1", key: "ublpy" }]
|
|
266
|
-
], Qa = q("clipboard-paste",
|
|
277
|
+
], Qa = q("clipboard-paste", Ll);
|
|
267
278
|
/**
|
|
268
279
|
* @license lucide-react v0.542.0 - ISC
|
|
269
280
|
*
|
|
270
281
|
* This source code is licensed under the ISC license.
|
|
271
282
|
* See the LICENSE file in the root directory of this source tree.
|
|
272
283
|
*/
|
|
273
|
-
const
|
|
284
|
+
const zl = [
|
|
274
285
|
["path", { d: "m12 15 2 2 4-4", key: "2c609p" }],
|
|
275
286
|
["rect", { width: "14", height: "14", x: "8", y: "8", rx: "2", ry: "2", key: "17jyea" }],
|
|
276
287
|
["path", { d: "M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2", key: "zix9uf" }]
|
|
277
|
-
],
|
|
288
|
+
], Ul = q("copy-check", zl);
|
|
278
289
|
/**
|
|
279
290
|
* @license lucide-react v0.542.0 - ISC
|
|
280
291
|
*
|
|
281
292
|
* This source code is licensed under the ISC license.
|
|
282
293
|
* See the LICENSE file in the root directory of this source tree.
|
|
283
294
|
*/
|
|
284
|
-
const
|
|
295
|
+
const Hl = [
|
|
285
296
|
["rect", { width: "14", height: "14", x: "8", y: "8", rx: "2", ry: "2", key: "17jyea" }],
|
|
286
297
|
["path", { d: "M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2", key: "zix9uf" }]
|
|
287
|
-
], ai = q("copy",
|
|
298
|
+
], ai = q("copy", Hl);
|
|
288
299
|
/**
|
|
289
300
|
* @license lucide-react v0.542.0 - ISC
|
|
290
301
|
*
|
|
291
302
|
* This source code is licensed under the ISC license.
|
|
292
303
|
* See the LICENSE file in the root directory of this source tree.
|
|
293
304
|
*/
|
|
294
|
-
const
|
|
305
|
+
const Gl = [
|
|
295
306
|
["path", { d: "M12 15V3", key: "m9g1x1" }],
|
|
296
307
|
["path", { d: "M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4", key: "ih7n3h" }],
|
|
297
308
|
["path", { d: "m7 10 5 5 5-5", key: "brsn70" }]
|
|
298
|
-
], Ja = q("download",
|
|
309
|
+
], Ja = q("download", Gl);
|
|
299
310
|
/**
|
|
300
311
|
* @license lucide-react v0.542.0 - ISC
|
|
301
312
|
*
|
|
302
313
|
* This source code is licensed under the ISC license.
|
|
303
314
|
* See the LICENSE file in the root directory of this source tree.
|
|
304
315
|
*/
|
|
305
|
-
const
|
|
316
|
+
const ql = [
|
|
306
317
|
["circle", { cx: "12", cy: "12", r: "1", key: "41hilf" }],
|
|
307
318
|
["circle", { cx: "19", cy: "12", r: "1", key: "1wjl8i" }],
|
|
308
319
|
["circle", { cx: "5", cy: "12", r: "1", key: "1pcz8c" }]
|
|
309
|
-
], eo = q("ellipsis",
|
|
320
|
+
], eo = q("ellipsis", ql);
|
|
310
321
|
/**
|
|
311
322
|
* @license lucide-react v0.542.0 - ISC
|
|
312
323
|
*
|
|
313
324
|
* This source code is licensed under the ISC license.
|
|
314
325
|
* See the LICENSE file in the root directory of this source tree.
|
|
315
326
|
*/
|
|
316
|
-
const
|
|
327
|
+
const Xl = [
|
|
317
328
|
["path", { d: "M15 3h6v6", key: "1q9fwt" }],
|
|
318
329
|
["path", { d: "M10 14 21 3", key: "gplh6r" }],
|
|
319
330
|
["path", { d: "M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6", key: "a6xqqp" }]
|
|
320
|
-
],
|
|
321
|
-
/**
|
|
322
|
-
* @license lucide-react v0.542.0 - ISC
|
|
323
|
-
*
|
|
324
|
-
* This source code is licensed under the ISC license.
|
|
325
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
326
|
-
*/
|
|
327
|
-
const Xl = [
|
|
328
|
-
["path", { d: "M12 17h.01", key: "p32p05" }],
|
|
329
|
-
["path", { d: "M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7z", key: "1mlx9k" }],
|
|
330
|
-
["path", { d: "M9.1 9a3 3 0 0 1 5.82 1c0 2-3 3-3 3", key: "mhlwft" }]
|
|
331
|
-
], Wl = q("file-question-mark", Xl);
|
|
331
|
+
], Wl = q("external-link", Xl);
|
|
332
332
|
/**
|
|
333
333
|
* @license lucide-react v0.542.0 - ISC
|
|
334
334
|
*
|
|
@@ -652,10 +652,15 @@ const Fc = [
|
|
|
652
652
|
["path", { d: "M18 6 6 18", key: "1bl5f8" }],
|
|
653
653
|
["path", { d: "m6 6 12 12", key: "d8bk6v" }]
|
|
654
654
|
], It = q("x", Fc), so = L((r) => {
|
|
655
|
-
const { ref: e, file: t, className: n, error: i, rightSlot: a, size: o, ...s } = r
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
655
|
+
const { ref: e, file: t, className: n, error: i, rightSlot: a, size: o, ...s } = r, l = () => i ? /* @__PURE__ */ _(Le, { children: [
|
|
656
|
+
/* @__PURE__ */ p(N, { icon: bl, color: "var(--base-a11)" }),
|
|
657
|
+
/* @__PURE__ */ p(pe, { accentColor: "base", className: "truncate", size: o, children: i })
|
|
658
|
+
] }) : t ? /* @__PURE__ */ _(Le, { children: [
|
|
659
|
+
/* @__PURE__ */ p(N, { icon: Yl, color: "var(--base-a11)" }),
|
|
660
|
+
/* @__PURE__ */ p(pe, { className: "truncate", size: o, children: t.name })
|
|
661
|
+
] }) : /* @__PURE__ */ p(Le, { children: /* @__PURE__ */ p("div", { className: "flex w-full justify-center", children: /* @__PURE__ */ p(ti, { size: o }) }) });
|
|
662
|
+
return /* @__PURE__ */ _(pt, { className: Ct(n, "flex w-full items-center gap-2"), ref: e, size: "xs", ...s, children: [
|
|
663
|
+
l(),
|
|
659
664
|
a
|
|
660
665
|
] });
|
|
661
666
|
});
|
|
@@ -764,7 +769,7 @@ class tt extends lo {
|
|
|
764
769
|
}
|
|
765
770
|
}
|
|
766
771
|
const Ce = jr({}), co = (r) => {
|
|
767
|
-
const [e, t] =
|
|
772
|
+
const [e, t] = Xe(null);
|
|
768
773
|
return dt(() => {
|
|
769
774
|
const n = URL.createObjectURL(r);
|
|
770
775
|
return t(n), () => {
|
|
@@ -782,20 +787,20 @@ const uo = jr(() => {
|
|
|
782
787
|
const { file: e, onClose: t } = r, n = b(() => {
|
|
783
788
|
$a(e, e.name);
|
|
784
789
|
}, [e]);
|
|
785
|
-
return /* @__PURE__ */ p(xt.Root, { open: !0, onOpenChange: t, children: /* @__PURE__ */
|
|
786
|
-
/* @__PURE__ */
|
|
790
|
+
return /* @__PURE__ */ p(xt.Root, { open: !0, onOpenChange: t, children: /* @__PURE__ */ _(xt.Content, { onOpenAutoFocus: Hs, children: [
|
|
791
|
+
/* @__PURE__ */ _(
|
|
787
792
|
ue,
|
|
788
793
|
{
|
|
789
794
|
className: "absolute right-0 top-0 flex items-center gap-2 p-2",
|
|
790
795
|
accentColor: "base",
|
|
791
796
|
variant: "ghost",
|
|
792
797
|
children: [
|
|
793
|
-
/* @__PURE__ */
|
|
794
|
-
/* @__PURE__ */ p(Xt.Trigger, { asChild: !0, children: /* @__PURE__ */ p(ne, { onClick: n, "aria-label": "download", children: /* @__PURE__ */ p(
|
|
798
|
+
/* @__PURE__ */ _(Xt.Root, { children: [
|
|
799
|
+
/* @__PURE__ */ p(Xt.Trigger, { asChild: !0, children: /* @__PURE__ */ p(ne, { onClick: n, "aria-label": "download", children: /* @__PURE__ */ p(N, { icon: Ja }) }) }),
|
|
795
800
|
/* @__PURE__ */ p(Xt.Content, { size: "sm", children: "Download" })
|
|
796
801
|
] }),
|
|
797
802
|
/* @__PURE__ */ p(Ft, { orientation: "vertical", size: "sm" }),
|
|
798
|
-
/* @__PURE__ */ p(xt.Close, { asChild: !0, children: /* @__PURE__ */ p(ne, { onClick: t, "aria-label": "close", children: /* @__PURE__ */ p(
|
|
803
|
+
/* @__PURE__ */ p(xt.Close, { asChild: !0, children: /* @__PURE__ */ p(ne, { onClick: t, "aria-label": "close", children: /* @__PURE__ */ p(N, { icon: It }) }) })
|
|
799
804
|
]
|
|
800
805
|
}
|
|
801
806
|
),
|
|
@@ -804,7 +809,7 @@ const uo = jr(() => {
|
|
|
804
809
|
});
|
|
805
810
|
fo.displayName = "ImageViewer";
|
|
806
811
|
const Pc = L((r) => {
|
|
807
|
-
const { children: e } = r, [t, n] =
|
|
812
|
+
const { children: e } = r, [t, n] = Xe(null), i = b(() => {
|
|
808
813
|
n(null);
|
|
809
814
|
}, []), a = b(
|
|
810
815
|
(s) => {
|
|
@@ -814,14 +819,14 @@ const Pc = L((r) => {
|
|
|
814
819
|
), o = b(() => {
|
|
815
820
|
t && (t.onClose && t.onClose(), i());
|
|
816
821
|
}, [i, t]);
|
|
817
|
-
return /* @__PURE__ */
|
|
822
|
+
return /* @__PURE__ */ _(uo.Provider, { value: a, children: [
|
|
818
823
|
e,
|
|
819
824
|
t && /* @__PURE__ */ p(fo, { file: t.file, onClose: o })
|
|
820
825
|
] });
|
|
821
826
|
});
|
|
822
827
|
Pc.displayName = "FileViewerProvider";
|
|
823
828
|
const Re = L((r) => {
|
|
824
|
-
const { label: e, error: t, description: n, required: i, children: a, inputId: o, image: s, size: l } = r, [c, u] =
|
|
829
|
+
const { label: e, error: t, description: n, required: i, children: a, inputId: o, image: s, size: l } = r, [c, u] = Xe(void 0), d = si();
|
|
825
830
|
dt(() => {
|
|
826
831
|
s instanceof Promise ? s.then(u).catch(console.error) : u(s);
|
|
827
832
|
}, [s]);
|
|
@@ -830,7 +835,7 @@ const Re = L((r) => {
|
|
|
830
835
|
file: c
|
|
831
836
|
}));
|
|
832
837
|
}, [d, c]), h = i ? `${e} *` : e;
|
|
833
|
-
return /* @__PURE__ */
|
|
838
|
+
return /* @__PURE__ */ _("div", { className: "flex flex-col gap-1", children: [
|
|
834
839
|
c && /* @__PURE__ */ p(
|
|
835
840
|
Sr,
|
|
836
841
|
{
|
|
@@ -839,7 +844,7 @@ const Re = L((r) => {
|
|
|
839
844
|
onClick: f
|
|
840
845
|
}
|
|
841
846
|
),
|
|
842
|
-
(!!e || !!n) && /* @__PURE__ */
|
|
847
|
+
(!!e || !!n) && /* @__PURE__ */ _("div", { className: "flex flex-col", children: [
|
|
843
848
|
/* @__PURE__ */ p("label", { className: "w-max max-w-full", htmlFor: o, children: /* @__PURE__ */ p(pe, { size: l, className: "text-wrap", children: h }) }),
|
|
844
849
|
!!n && /* @__PURE__ */ p(pe, { accentColor: "base", size: l, children: n })
|
|
845
850
|
] }),
|
|
@@ -848,7 +853,7 @@ const Re = L((r) => {
|
|
|
848
853
|
] });
|
|
849
854
|
});
|
|
850
855
|
Re.displayName = "InputWithLabel";
|
|
851
|
-
const Bc = (r) => r.map((e) => /* @__PURE__ */ p(ii, { children: e.render() }, e.identifier)), Ln = (r) => r.map((e) => /* @__PURE__ */ p(ii, { children: e.render() }, e.identifier)),
|
|
856
|
+
const Bc = (r) => r.map((e) => /* @__PURE__ */ p(ii, { children: e.render() }, e.identifier)), Ln = (r) => r.map((e) => /* @__PURE__ */ p(ii, { children: e.render() }, e.identifier)), ze = (r) => {
|
|
852
857
|
const { field: e } = r, {
|
|
853
858
|
field: { value: t, name: n, onChange: i, onBlur: a, disabled: o },
|
|
854
859
|
fieldState: { isTouched: s, error: l }
|
|
@@ -865,7 +870,7 @@ const Bc = (r) => r.map((e) => /* @__PURE__ */ p(ii, { children: e.render() }, e
|
|
|
865
870
|
onBlur: a
|
|
866
871
|
};
|
|
867
872
|
}, ho = L((r) => {
|
|
868
|
-
const { field: e } = r, { size: t } = ce(Ce), { value: n, name: i, onBlur: a, onChange: o, error: s, disabled: l } =
|
|
873
|
+
const { field: e } = r, { size: t } = ce(Ce), { value: n, name: i, onBlur: a, onChange: o, error: s, disabled: l } = ze({ field: e }), [c, u] = Xe(""), [d, f] = Xe(""), h = b(
|
|
869
874
|
(w) => {
|
|
870
875
|
o(w), a();
|
|
871
876
|
},
|
|
@@ -897,14 +902,14 @@ const Bc = (r) => r.map((e) => /* @__PURE__ */ p(ii, { children: e.render() }, e
|
|
|
897
902
|
), C = b(
|
|
898
903
|
(w) => {
|
|
899
904
|
if (!w.destination) return;
|
|
900
|
-
const S = w.source.index, O = w.destination.index,
|
|
901
|
-
|
|
905
|
+
const S = w.source.index, O = w.destination.index, T = Array.from(n), [F] = T.splice(S, 1);
|
|
906
|
+
T.splice(O, 0, F), h(T);
|
|
902
907
|
},
|
|
903
908
|
[h, n]
|
|
904
|
-
),
|
|
909
|
+
), A = b(() => {
|
|
905
910
|
a();
|
|
906
911
|
}, [a]);
|
|
907
|
-
return /* @__PURE__ */ p(rl, { onDragEnd: C, children: /* @__PURE__ */
|
|
912
|
+
return /* @__PURE__ */ p(rl, { onDragEnd: C, children: /* @__PURE__ */ _(
|
|
908
913
|
Re,
|
|
909
914
|
{
|
|
910
915
|
size: t,
|
|
@@ -915,7 +920,7 @@ const Bc = (r) => r.map((e) => /* @__PURE__ */ p(ii, { children: e.render() }, e
|
|
|
915
920
|
error: d || s,
|
|
916
921
|
image: e.image,
|
|
917
922
|
children: [
|
|
918
|
-
(!l || n.length === 0) && /* @__PURE__ */
|
|
923
|
+
(!l || n.length === 0) && /* @__PURE__ */ _("div", { className: "flex gap-2", children: [
|
|
919
924
|
/* @__PURE__ */ p(ge.Root, { className: "grow", accentColor: "base", variant: "surface", size: t, children: /* @__PURE__ */ p(
|
|
920
925
|
ge.Field,
|
|
921
926
|
{
|
|
@@ -924,7 +929,7 @@ const Bc = (r) => r.map((e) => /* @__PURE__ */ p(ii, { children: e.render() }, e
|
|
|
924
929
|
onKeyDown: y,
|
|
925
930
|
id: e.identifier,
|
|
926
931
|
placeholder: e.placeholder,
|
|
927
|
-
onBlur:
|
|
932
|
+
onBlur: A,
|
|
928
933
|
name: i,
|
|
929
934
|
disabled: l
|
|
930
935
|
}
|
|
@@ -939,11 +944,11 @@ const Bc = (r) => r.map((e) => /* @__PURE__ */ p(ii, { children: e.render() }, e
|
|
|
939
944
|
"aria-label": "Add option",
|
|
940
945
|
disabled: !!d || l,
|
|
941
946
|
onClick: g,
|
|
942
|
-
children: /* @__PURE__ */ p(
|
|
947
|
+
children: /* @__PURE__ */ p(N, { icon: ft })
|
|
943
948
|
}
|
|
944
949
|
)
|
|
945
950
|
] }),
|
|
946
|
-
n.length !== 0 && /* @__PURE__ */ p(nl, { droppableId: `${e.identifier}-droppable`, children: (w) => /* @__PURE__ */
|
|
951
|
+
n.length !== 0 && /* @__PURE__ */ p(nl, { droppableId: `${e.identifier}-droppable`, children: (w) => /* @__PURE__ */ _(
|
|
947
952
|
"div",
|
|
948
953
|
{
|
|
949
954
|
className: "flex flex-col gap-1",
|
|
@@ -956,11 +961,11 @@ const Bc = (r) => r.map((e) => /* @__PURE__ */ p(ii, { children: e.render() }, e
|
|
|
956
961
|
draggableId: `${S}-draggable`,
|
|
957
962
|
index: O,
|
|
958
963
|
isDragDisabled: l,
|
|
959
|
-
children: ({ draggableProps:
|
|
964
|
+
children: ({ draggableProps: T, dragHandleProps: F, innerRef: z }) => /* @__PURE__ */ _(
|
|
960
965
|
ye,
|
|
961
966
|
{
|
|
962
967
|
...F,
|
|
963
|
-
...
|
|
968
|
+
...T,
|
|
964
969
|
ref: z,
|
|
965
970
|
className: "flex items-center justify-between gap-2",
|
|
966
971
|
accentColor: "base",
|
|
@@ -986,7 +991,7 @@ const Bc = (r) => r.map((e) => /* @__PURE__ */ p(ii, { children: e.render() }, e
|
|
|
986
991
|
onClick: () => {
|
|
987
992
|
m(O);
|
|
988
993
|
},
|
|
989
|
-
children: /* @__PURE__ */ p(
|
|
994
|
+
children: /* @__PURE__ */ p(N, { icon: It })
|
|
990
995
|
}
|
|
991
996
|
)
|
|
992
997
|
]
|
|
@@ -1123,7 +1128,7 @@ class Qr extends tt {
|
|
|
1123
1128
|
}
|
|
1124
1129
|
}
|
|
1125
1130
|
const po = L((r) => {
|
|
1126
|
-
const { field: e } = r, { size: t } = ce(Ce), { value: n, name: i, onBlur: a, onChange: o, error: s, disabled: l } =
|
|
1131
|
+
const { field: e } = r, { size: t } = ce(Ce), { value: n, name: i, onBlur: a, onChange: o, error: s, disabled: l } = ze({ field: e }), c = b(
|
|
1127
1132
|
(d) => {
|
|
1128
1133
|
o(!!d), a();
|
|
1129
1134
|
},
|
|
@@ -1153,7 +1158,7 @@ const po = L((r) => {
|
|
|
1153
1158
|
accentColor: "base",
|
|
1154
1159
|
variant: "surface",
|
|
1155
1160
|
disabled: l,
|
|
1156
|
-
children: /* @__PURE__ */ p(Hr.Indicator, { children: /* @__PURE__ */ p(
|
|
1161
|
+
children: /* @__PURE__ */ p(Hr.Indicator, { children: /* @__PURE__ */ p(N, { icon: et }) })
|
|
1157
1162
|
}
|
|
1158
1163
|
)
|
|
1159
1164
|
}
|
|
@@ -1212,7 +1217,7 @@ class Yt extends tt {
|
|
|
1212
1217
|
}
|
|
1213
1218
|
}
|
|
1214
1219
|
const vo = L((r) => {
|
|
1215
|
-
const { field: e } = r, { size: t } = ce(Ce), { value: n, name: i, onBlur: a, onChange: o, error: s, disabled: l } =
|
|
1220
|
+
const { field: e } = r, { size: t } = ce(Ce), { value: n, name: i, onBlur: a, onChange: o, error: s, disabled: l } = ze({ field: e }), c = b(
|
|
1216
1221
|
(f) => {
|
|
1217
1222
|
const h = f.target.valueAsNumber, v = isNaN(h) ? null : h;
|
|
1218
1223
|
o(v);
|
|
@@ -1254,7 +1259,7 @@ const vo = L((r) => {
|
|
|
1254
1259
|
);
|
|
1255
1260
|
});
|
|
1256
1261
|
vo.displayName = "NumberFieldInput";
|
|
1257
|
-
class
|
|
1262
|
+
class Je extends tt {
|
|
1258
1263
|
constructor(t) {
|
|
1259
1264
|
const {
|
|
1260
1265
|
minimum: n = Number.MIN_SAFE_INTEGER,
|
|
@@ -1275,7 +1280,7 @@ class Qe extends tt {
|
|
|
1275
1280
|
const n = t && `${t}.`;
|
|
1276
1281
|
return [
|
|
1277
1282
|
{
|
|
1278
|
-
field: new
|
|
1283
|
+
field: new Je({
|
|
1279
1284
|
label: "Minimum",
|
|
1280
1285
|
description: "Minimum value",
|
|
1281
1286
|
integers: !0,
|
|
@@ -1285,7 +1290,7 @@ class Qe extends tt {
|
|
|
1285
1290
|
showDirectly: !1
|
|
1286
1291
|
},
|
|
1287
1292
|
{
|
|
1288
|
-
field: new
|
|
1293
|
+
field: new Je({
|
|
1289
1294
|
label: "Maximum",
|
|
1290
1295
|
description: "Maximum value",
|
|
1291
1296
|
integers: !0,
|
|
@@ -1337,7 +1342,7 @@ class Qe extends tt {
|
|
|
1337
1342
|
};
|
|
1338
1343
|
}
|
|
1339
1344
|
duplicate(t) {
|
|
1340
|
-
return new
|
|
1345
|
+
return new Je({
|
|
1341
1346
|
...this.getOptions(),
|
|
1342
1347
|
identifier: t
|
|
1343
1348
|
});
|
|
@@ -1347,7 +1352,7 @@ class Qe extends tt {
|
|
|
1347
1352
|
this.minimum = n ?? this.minimum, this.maximum = i ?? this.maximum, this.integers = a ?? this.integers, this.placeholder = o ?? this.placeholder, super.setOptions(s);
|
|
1348
1353
|
}
|
|
1349
1354
|
static deserialize(t) {
|
|
1350
|
-
return new
|
|
1355
|
+
return new Je(t);
|
|
1351
1356
|
}
|
|
1352
1357
|
serializeValue(t) {
|
|
1353
1358
|
return t;
|
|
@@ -1391,7 +1396,7 @@ class go extends tt {
|
|
|
1391
1396
|
const n = t && `${t}.`;
|
|
1392
1397
|
return [
|
|
1393
1398
|
{
|
|
1394
|
-
field: new
|
|
1399
|
+
field: new Je({
|
|
1395
1400
|
label: "Minimum length",
|
|
1396
1401
|
description: "Minimum number of characters",
|
|
1397
1402
|
required: !1,
|
|
@@ -1403,7 +1408,7 @@ class go extends tt {
|
|
|
1403
1408
|
showDirectly: !1
|
|
1404
1409
|
},
|
|
1405
1410
|
{
|
|
1406
|
-
field: new
|
|
1411
|
+
field: new Je({
|
|
1407
1412
|
label: "Maximum length",
|
|
1408
1413
|
description: "Maximum number of characters",
|
|
1409
1414
|
required: !1,
|
|
@@ -1474,7 +1479,7 @@ class go extends tt {
|
|
|
1474
1479
|
}
|
|
1475
1480
|
}
|
|
1476
1481
|
const xo = L((r) => {
|
|
1477
|
-
const { field: e } = r, { size: t } = ce(Ce), { value: n, name: i, onBlur: a, onChange: o, error: s, disabled: l } =
|
|
1482
|
+
const { field: e } = r, { size: t } = ce(Ce), { value: n, name: i, onBlur: a, onChange: o, error: s, disabled: l } = ze({ field: e }), c = b(
|
|
1478
1483
|
(d) => {
|
|
1479
1484
|
o(d), a();
|
|
1480
1485
|
},
|
|
@@ -1504,12 +1509,12 @@ const xo = L((r) => {
|
|
|
1504
1509
|
values: n,
|
|
1505
1510
|
onValuesChange: c,
|
|
1506
1511
|
disabled: l,
|
|
1507
|
-
children: e.options.map((d, f) => /* @__PURE__ */
|
|
1512
|
+
children: e.options.map((d, f) => /* @__PURE__ */ _(
|
|
1508
1513
|
"label",
|
|
1509
1514
|
{
|
|
1510
1515
|
className: "flex min-w-0 items-center gap-2",
|
|
1511
1516
|
children: [
|
|
1512
|
-
/* @__PURE__ */ p(En.Item, { value: d.value, onBlur: u, children: /* @__PURE__ */ p(En.ItemIndicator, { children: /* @__PURE__ */ p(
|
|
1517
|
+
/* @__PURE__ */ p(En.Item, { value: d.value, onBlur: u, children: /* @__PURE__ */ p(En.ItemIndicator, { children: /* @__PURE__ */ p(N, { icon: et }) }) }),
|
|
1513
1518
|
/* @__PURE__ */ p(pe, { size: t, accentColor: "base", className: "truncate", children: d.label })
|
|
1514
1519
|
]
|
|
1515
1520
|
},
|
|
@@ -1574,7 +1579,7 @@ class Zt extends Qr {
|
|
|
1574
1579
|
}
|
|
1575
1580
|
}
|
|
1576
1581
|
const yo = L((r) => {
|
|
1577
|
-
const { field: e } = r, { size: t } = ce(Ce), { value: n, name: i, onBlur: a, onChange: o, error: s, disabled: l } =
|
|
1582
|
+
const { field: e } = r, { size: t } = ce(Ce), { value: n, name: i, onBlur: a, onChange: o, error: s, disabled: l } = ze({ field: e }), [c, u] = Xe(!1), d = b(
|
|
1578
1583
|
(h) => {
|
|
1579
1584
|
o(h ?? null), a(), u(!1);
|
|
1580
1585
|
},
|
|
@@ -1595,8 +1600,8 @@ const yo = L((r) => {
|
|
|
1595
1600
|
required: e.required,
|
|
1596
1601
|
error: s,
|
|
1597
1602
|
image: e.image,
|
|
1598
|
-
children: /* @__PURE__ */
|
|
1599
|
-
/* @__PURE__ */ p(xe.Trigger, { asChild: !0, children: /* @__PURE__ */
|
|
1603
|
+
children: /* @__PURE__ */ _(xe.Root, { open: c, onOpenChange: f, children: [
|
|
1604
|
+
/* @__PURE__ */ p(xe.Trigger, { asChild: !0, children: /* @__PURE__ */ _(
|
|
1600
1605
|
B,
|
|
1601
1606
|
{
|
|
1602
1607
|
id: e.identifier,
|
|
@@ -1613,7 +1618,7 @@ const yo = L((r) => {
|
|
|
1613
1618
|
month: "2-digit",
|
|
1614
1619
|
day: "2-digit"
|
|
1615
1620
|
}) : "yyyy-mm-dd" }),
|
|
1616
|
-
/* @__PURE__ */ p(
|
|
1621
|
+
/* @__PURE__ */ p(N, { icon: Zr })
|
|
1617
1622
|
]
|
|
1618
1623
|
}
|
|
1619
1624
|
) }),
|
|
@@ -1686,7 +1691,7 @@ class Cr extends tt {
|
|
|
1686
1691
|
}
|
|
1687
1692
|
var J = /* @__PURE__ */ ((r) => (r.Text = "text", r.Selection = "selection", r.Numeric = "numeric", r.Temporal = "temporal", r.Capture = "capture", r.Assessment = "assessment", r.Verification = "verification", r))(J || {});
|
|
1688
1693
|
const mo = L((r) => {
|
|
1689
|
-
const { field: e } = r, { size: t } = ce(Ce), { value: n, name: i, onBlur: a, onChange: o, error: s, disabled: l } =
|
|
1694
|
+
const { field: e } = r, { size: t } = ce(Ce), { value: n, name: i, onBlur: a, onChange: o, error: s, disabled: l } = ze({ field: e }), c = b(
|
|
1690
1695
|
(d) => {
|
|
1691
1696
|
o(d), a();
|
|
1692
1697
|
},
|
|
@@ -1707,8 +1712,8 @@ const mo = L((r) => {
|
|
|
1707
1712
|
required: e.required,
|
|
1708
1713
|
error: s,
|
|
1709
1714
|
image: e.image,
|
|
1710
|
-
children: /* @__PURE__ */
|
|
1711
|
-
/* @__PURE__ */ p(D.ClickTrigger, { children: /* @__PURE__ */
|
|
1715
|
+
children: /* @__PURE__ */ _(D.Root, { onOpenChange: u, align: "start", children: [
|
|
1716
|
+
/* @__PURE__ */ p(D.ClickTrigger, { children: /* @__PURE__ */ _(
|
|
1712
1717
|
B,
|
|
1713
1718
|
{
|
|
1714
1719
|
id: e.identifier,
|
|
@@ -1721,21 +1726,21 @@ const mo = L((r) => {
|
|
|
1721
1726
|
disabled: l,
|
|
1722
1727
|
children: [
|
|
1723
1728
|
/* @__PURE__ */ p(pe, { className: "truncate", highContrast: n && n.length > 0, children: n && n.length > 0 ? n.join(", ") : e.placeholder ?? "Select one or more..." }),
|
|
1724
|
-
/* @__PURE__ */ p(
|
|
1729
|
+
/* @__PURE__ */ p(N, { icon: Zr })
|
|
1725
1730
|
]
|
|
1726
1731
|
}
|
|
1727
1732
|
) }),
|
|
1728
|
-
/* @__PURE__ */ p(D.Content, { size: t, children: /* @__PURE__ */ p(D.Scroll, { children: /* @__PURE__ */
|
|
1729
|
-
/* @__PURE__ */
|
|
1730
|
-
/* @__PURE__ */ p(D.CheckboxItemIndicator, { children: (d) => d ? /* @__PURE__ */ p(
|
|
1733
|
+
/* @__PURE__ */ p(D.Content, { size: t, children: /* @__PURE__ */ p(D.Scroll, { children: /* @__PURE__ */ _(D.MultiSelectGroup, { values: n, onValuesChange: c, children: [
|
|
1734
|
+
/* @__PURE__ */ _(D.SelectAllItem, { children: [
|
|
1735
|
+
/* @__PURE__ */ p(D.CheckboxItemIndicator, { children: (d) => d ? /* @__PURE__ */ p(N, { icon: Gr }) : /* @__PURE__ */ p(N, { icon: et }) }),
|
|
1731
1736
|
"Select all"
|
|
1732
1737
|
] }),
|
|
1733
|
-
e.options.map((d, f) => /* @__PURE__ */
|
|
1738
|
+
e.options.map((d, f) => /* @__PURE__ */ _(
|
|
1734
1739
|
D.MultiSelectItem,
|
|
1735
1740
|
{
|
|
1736
1741
|
value: d.value,
|
|
1737
1742
|
children: [
|
|
1738
|
-
/* @__PURE__ */ p(D.SelectedIndicator, { children: /* @__PURE__ */ p(
|
|
1743
|
+
/* @__PURE__ */ p(D.SelectedIndicator, { children: /* @__PURE__ */ p(N, { icon: et }) }),
|
|
1739
1744
|
d.label
|
|
1740
1745
|
]
|
|
1741
1746
|
},
|
|
@@ -1810,7 +1815,7 @@ class bt extends Qr {
|
|
|
1810
1815
|
}
|
|
1811
1816
|
}
|
|
1812
1817
|
const Co = L((r) => {
|
|
1813
|
-
const { field: e } = r, { size: t } = ce(Ce), { value: n, name: i, onBlur: a, onChange: o, error: s, disabled: l } =
|
|
1818
|
+
const { field: e } = r, { size: t } = ce(Ce), { value: n, name: i, onBlur: a, onChange: o, error: s, disabled: l } = ze({ field: e }), c = b(
|
|
1814
1819
|
(f) => {
|
|
1815
1820
|
o(f ?? null), a();
|
|
1816
1821
|
},
|
|
@@ -1831,8 +1836,8 @@ const Co = L((r) => {
|
|
|
1831
1836
|
required: e.required,
|
|
1832
1837
|
error: s,
|
|
1833
1838
|
image: e.image,
|
|
1834
|
-
children: /* @__PURE__ */
|
|
1835
|
-
/* @__PURE__ */ p(D.ClickTrigger, { children: /* @__PURE__ */
|
|
1839
|
+
children: /* @__PURE__ */ _(D.Root, { onOpenChange: u, align: "start", children: [
|
|
1840
|
+
/* @__PURE__ */ p(D.ClickTrigger, { children: /* @__PURE__ */ _(
|
|
1836
1841
|
B,
|
|
1837
1842
|
{
|
|
1838
1843
|
id: e.identifier,
|
|
@@ -1845,16 +1850,16 @@ const Co = L((r) => {
|
|
|
1845
1850
|
disabled: l,
|
|
1846
1851
|
children: [
|
|
1847
1852
|
/* @__PURE__ */ p(pe, { className: "truncate", highContrast: !!d, children: d ? d.label : e.placeholder ?? "Select one..." }),
|
|
1848
|
-
/* @__PURE__ */ p(
|
|
1853
|
+
/* @__PURE__ */ p(N, { icon: Zr })
|
|
1849
1854
|
]
|
|
1850
1855
|
}
|
|
1851
1856
|
) }),
|
|
1852
|
-
/* @__PURE__ */ p(D.Content, { size: t, children: /* @__PURE__ */ p(D.Scroll, { children: /* @__PURE__ */ p(D.SelectGroup, { required: !1, value: n ?? void 0, onValueChange: c, children: e.options.map((f, h) => /* @__PURE__ */
|
|
1857
|
+
/* @__PURE__ */ p(D.Content, { size: t, children: /* @__PURE__ */ p(D.Scroll, { children: /* @__PURE__ */ p(D.SelectGroup, { required: !1, value: n ?? void 0, onValueChange: c, children: e.options.map((f, h) => /* @__PURE__ */ _(
|
|
1853
1858
|
D.SelectItem,
|
|
1854
1859
|
{
|
|
1855
1860
|
value: f.value,
|
|
1856
1861
|
children: [
|
|
1857
|
-
/* @__PURE__ */ p(D.SelectedIndicator, { children: /* @__PURE__ */ p(
|
|
1862
|
+
/* @__PURE__ */ p(D.SelectedIndicator, { children: /* @__PURE__ */ p(N, { icon: et }) }),
|
|
1858
1863
|
f.label
|
|
1859
1864
|
]
|
|
1860
1865
|
},
|
|
@@ -1924,7 +1929,7 @@ class Pt extends Qr {
|
|
|
1924
1929
|
}
|
|
1925
1930
|
}
|
|
1926
1931
|
const wo = L((r) => {
|
|
1927
|
-
const { field: e } = r, { size: t } = ce(Ce), { value: n, name: i, onBlur: a, onChange: o, error: s, disabled: l } =
|
|
1932
|
+
const { field: e } = r, { size: t } = ce(Ce), { value: n, name: i, onBlur: a, onChange: o, error: s, disabled: l } = ze({ field: e }), c = b(
|
|
1928
1933
|
(f) => {
|
|
1929
1934
|
o(f);
|
|
1930
1935
|
},
|
|
@@ -1942,7 +1947,7 @@ const wo = L((r) => {
|
|
|
1942
1947
|
required: e.required,
|
|
1943
1948
|
error: s,
|
|
1944
1949
|
image: e.image,
|
|
1945
|
-
children: /* @__PURE__ */
|
|
1950
|
+
children: /* @__PURE__ */ _(
|
|
1946
1951
|
Sn.Root,
|
|
1947
1952
|
{
|
|
1948
1953
|
id: e.identifier,
|
|
@@ -1986,7 +1991,7 @@ class Kt extends tt {
|
|
|
1986
1991
|
return [
|
|
1987
1992
|
// TODO: Need Number field for selecting length
|
|
1988
1993
|
{
|
|
1989
|
-
field: new
|
|
1994
|
+
field: new Je({
|
|
1990
1995
|
label: "Length",
|
|
1991
1996
|
integers: !0,
|
|
1992
1997
|
required: !1,
|
|
@@ -2089,15 +2094,15 @@ class Kt extends tt {
|
|
|
2089
2094
|
const $t = {
|
|
2090
2095
|
pass: {
|
|
2091
2096
|
label: "Pass",
|
|
2092
|
-
icon:
|
|
2097
|
+
icon: Ol
|
|
2093
2098
|
},
|
|
2094
2099
|
fail: {
|
|
2095
2100
|
label: "Fail",
|
|
2096
|
-
icon:
|
|
2101
|
+
icon: Vl
|
|
2097
2102
|
},
|
|
2098
2103
|
na: {
|
|
2099
2104
|
label: "N/A",
|
|
2100
|
-
icon:
|
|
2105
|
+
icon: Rl
|
|
2101
2106
|
}
|
|
2102
2107
|
}, wr = Object.keys($t);
|
|
2103
2108
|
class Bt extends File {
|
|
@@ -2153,7 +2158,7 @@ function li(r, e) {
|
|
|
2153
2158
|
}
|
|
2154
2159
|
const _o = L((r) => {
|
|
2155
2160
|
const { ref: e, file: t, error: n, rightSlot: i, className: a, size: o, ...s } = r;
|
|
2156
|
-
return /* @__PURE__ */
|
|
2161
|
+
return /* @__PURE__ */ _(
|
|
2157
2162
|
pt,
|
|
2158
2163
|
{
|
|
2159
2164
|
className: Ct(a, "p-0! relative flex h-48 w-full flex-col items-center"),
|
|
@@ -2164,14 +2169,14 @@ const _o = L((r) => {
|
|
|
2164
2169
|
!t && !n && /* @__PURE__ */ p("div", { className: "absolute inset-0 flex grow items-center justify-center", children: /* @__PURE__ */ p(ti, {}) }),
|
|
2165
2170
|
!!t && !n && /* @__PURE__ */ p("div", { className: "flex w-full grow items-center justify-center overflow-hidden bg-clip-padding p-3", children: /* @__PURE__ */ p(Sr, { className: "size-full max-w-full object-cover", file: t }) }),
|
|
2166
2171
|
/* @__PURE__ */ p(Ft, { size: "full" }),
|
|
2167
|
-
(!!t || !!n) && /* @__PURE__ */
|
|
2172
|
+
(!!t || !!n) && /* @__PURE__ */ _(
|
|
2168
2173
|
"div",
|
|
2169
2174
|
{
|
|
2170
2175
|
className: Ct("flex w-full items-center gap-2 self-end p-3", {
|
|
2171
2176
|
"bg-transparent": !t
|
|
2172
2177
|
}),
|
|
2173
2178
|
children: [
|
|
2174
|
-
n ? /* @__PURE__ */ p(
|
|
2179
|
+
n ? /* @__PURE__ */ p(N, { color: "var(--base-11)", icon: to }) : t && /* @__PURE__ */ p(N, { color: "var(--base-11)", icon: ro }),
|
|
2175
2180
|
/* @__PURE__ */ p(pe, { className: "truncate", size: o, children: n ?? (t == null ? void 0 : t.name) }),
|
|
2176
2181
|
i
|
|
2177
2182
|
]
|
|
@@ -2189,7 +2194,7 @@ const Ao = L((r) => {
|
|
|
2189
2194
|
Ao.displayName = "VideoFile";
|
|
2190
2195
|
const Eo = L((r) => {
|
|
2191
2196
|
const { ref: e, file: t, className: n, error: i, rightSlot: a, size: o, ...s } = r;
|
|
2192
|
-
return /* @__PURE__ */
|
|
2197
|
+
return /* @__PURE__ */ _(
|
|
2193
2198
|
pt,
|
|
2194
2199
|
{
|
|
2195
2200
|
className: Ct(n, "p-0! relative flex h-48 w-full flex-col items-center"),
|
|
@@ -2200,14 +2205,14 @@ const Eo = L((r) => {
|
|
|
2200
2205
|
!t && !i && /* @__PURE__ */ p("div", { className: "absolute inset-0 flex grow items-center justify-center", children: /* @__PURE__ */ p(ti, {}) }),
|
|
2201
2206
|
!!t && !i && /* @__PURE__ */ p("div", { className: "flex w-full grow items-center justify-center overflow-hidden bg-clip-padding p-3", children: /* @__PURE__ */ p(Ao, { className: "size-full max-w-full object-cover", file: t, controls: !0 }) }),
|
|
2202
2207
|
/* @__PURE__ */ p(Ft, { size: "full" }),
|
|
2203
|
-
(!!t || !!i) && /* @__PURE__ */
|
|
2208
|
+
(!!t || !!i) && /* @__PURE__ */ _(
|
|
2204
2209
|
"div",
|
|
2205
2210
|
{
|
|
2206
2211
|
className: Ct("flex w-full items-center gap-2 self-end p-3", {
|
|
2207
2212
|
"bg-transparent": !t
|
|
2208
2213
|
}),
|
|
2209
2214
|
children: [
|
|
2210
|
-
i ? /* @__PURE__ */ p(
|
|
2215
|
+
i ? /* @__PURE__ */ p(N, { color: "var(--base-11)", icon: to }) : t && /* @__PURE__ */ p(N, { color: "var(--base-11)", icon: Vc }),
|
|
2211
2216
|
/* @__PURE__ */ p(pe, { className: "truncate", size: o, children: i ?? (t == null ? void 0 : t.name) }),
|
|
2212
2217
|
a
|
|
2213
2218
|
]
|
|
@@ -2219,18 +2224,18 @@ const Eo = L((r) => {
|
|
|
2219
2224
|
});
|
|
2220
2225
|
Eo.displayName = "VideoCard";
|
|
2221
2226
|
const ci = L((r) => {
|
|
2222
|
-
const { fileOrPromise: e, onRemove: t, disabled: n, size: i } = r, [a, o] =
|
|
2227
|
+
const { fileOrPromise: e, onRemove: t, disabled: n, size: i } = r, [a, o] = Xe(null), [s, l] = Xe(null), c = si();
|
|
2223
2228
|
dt(() => {
|
|
2224
2229
|
let m = !0;
|
|
2225
2230
|
return o(null), l(null), (async () => {
|
|
2226
2231
|
if (e instanceof br)
|
|
2227
2232
|
try {
|
|
2228
|
-
const
|
|
2233
|
+
const A = await e;
|
|
2229
2234
|
if (!m) return;
|
|
2230
|
-
o(
|
|
2231
|
-
} catch (
|
|
2235
|
+
o(A);
|
|
2236
|
+
} catch (A) {
|
|
2232
2237
|
if (!m) return;
|
|
2233
|
-
l(
|
|
2238
|
+
l(A instanceof Error ? A.message : "Unknown error");
|
|
2234
2239
|
}
|
|
2235
2240
|
else
|
|
2236
2241
|
o(e);
|
|
@@ -2256,7 +2261,7 @@ const ci = L((r) => {
|
|
|
2256
2261
|
}
|
|
2257
2262
|
}));
|
|
2258
2263
|
}, [n, d, c, a]), v = se(
|
|
2259
|
-
() => /* @__PURE__ */ p("div", { className: "flex grow justify-end", children: /* @__PURE__ */
|
|
2264
|
+
() => /* @__PURE__ */ p("div", { className: "flex grow justify-end", children: /* @__PURE__ */ _(D.Root, { modal: !0, children: [
|
|
2260
2265
|
/* @__PURE__ */ p(D.ClickTrigger, { children: /* @__PURE__ */ p(
|
|
2261
2266
|
ne,
|
|
2262
2267
|
{
|
|
@@ -2265,18 +2270,18 @@ const ci = L((r) => {
|
|
|
2265
2270
|
variant: "ghost",
|
|
2266
2271
|
accentColor: "base",
|
|
2267
2272
|
size: i,
|
|
2268
|
-
children: /* @__PURE__ */ p(
|
|
2273
|
+
children: /* @__PURE__ */ p(N, { icon: eo })
|
|
2269
2274
|
}
|
|
2270
2275
|
) }),
|
|
2271
|
-
/* @__PURE__ */
|
|
2272
|
-
/* @__PURE__ */
|
|
2273
|
-
/* @__PURE__ */ p(
|
|
2276
|
+
/* @__PURE__ */ _(D.Content, { size: i, children: [
|
|
2277
|
+
/* @__PURE__ */ _(D.Item, { onSelect: u, disabled: !a, children: [
|
|
2278
|
+
/* @__PURE__ */ p(N, { icon: Ja }),
|
|
2274
2279
|
" Download"
|
|
2275
2280
|
] }),
|
|
2276
|
-
n ? null : /* @__PURE__ */
|
|
2281
|
+
n ? null : /* @__PURE__ */ _(Le, { children: [
|
|
2277
2282
|
/* @__PURE__ */ p(D.Separator, {}),
|
|
2278
|
-
/* @__PURE__ */
|
|
2279
|
-
/* @__PURE__ */ p(
|
|
2283
|
+
/* @__PURE__ */ _(D.Item, { onSelect: d, children: [
|
|
2284
|
+
/* @__PURE__ */ p(N, { icon: Lt }),
|
|
2280
2285
|
" Delete"
|
|
2281
2286
|
] })
|
|
2282
2287
|
] })
|
|
@@ -2318,7 +2323,7 @@ const ci = L((r) => {
|
|
|
2318
2323
|
});
|
|
2319
2324
|
ci.displayName = "DisplayFile";
|
|
2320
2325
|
const So = L((r) => {
|
|
2321
|
-
const { field: e } = r, { size: t } = ce(Ce), { value: n, name: i, onBlur: a, onChange: o, error: s, disabled: l } =
|
|
2326
|
+
const { field: e } = r, { size: t } = ce(Ce), { value: n, name: i, onBlur: a, onChange: o, error: s, disabled: l } = ze({ field: e }), c = Yr(null), u = b(
|
|
2322
2327
|
(w) => {
|
|
2323
2328
|
const S = e.cleanValue({
|
|
2324
2329
|
...n,
|
|
@@ -2352,7 +2357,7 @@ const So = L((r) => {
|
|
|
2352
2357
|
(w = c.current) == null || w.click();
|
|
2353
2358
|
}, []), g = b(
|
|
2354
2359
|
(w) => {
|
|
2355
|
-
const S = Array.from(w.target.files ?? []).map((
|
|
2360
|
+
const S = Array.from(w.target.files ?? []).map((T) => Bt.from(G(), T)), O = {
|
|
2356
2361
|
...n,
|
|
2357
2362
|
files: [...n.files, ...S]
|
|
2358
2363
|
};
|
|
@@ -2375,7 +2380,7 @@ const So = L((r) => {
|
|
|
2375
2380
|
w.abort();
|
|
2376
2381
|
};
|
|
2377
2382
|
}, [a, n]);
|
|
2378
|
-
const y = n.status && e.showNotesAndFilesOn.includes(n.status), m = `${e.identifier}-status`, C = `${e.identifier}-notes`,
|
|
2383
|
+
const y = n.status && e.showNotesAndFilesOn.includes(n.status), m = `${e.identifier}-status`, C = `${e.identifier}-notes`, A = `${e.identifier}-files`;
|
|
2379
2384
|
return /* @__PURE__ */ p(
|
|
2380
2385
|
Re,
|
|
2381
2386
|
{
|
|
@@ -2386,7 +2391,7 @@ const So = L((r) => {
|
|
|
2386
2391
|
required: e.required,
|
|
2387
2392
|
error: s,
|
|
2388
2393
|
image: e.image,
|
|
2389
|
-
children: /* @__PURE__ */
|
|
2394
|
+
children: /* @__PURE__ */ _("div", { className: "flex flex-col gap-2", children: [
|
|
2390
2395
|
/* @__PURE__ */ p(
|
|
2391
2396
|
Wt.Root,
|
|
2392
2397
|
{
|
|
@@ -2401,14 +2406,14 @@ const So = L((r) => {
|
|
|
2401
2406
|
onValueChange: u,
|
|
2402
2407
|
children: wr.map((w) => {
|
|
2403
2408
|
const { label: S } = $t[w];
|
|
2404
|
-
return /* @__PURE__ */
|
|
2405
|
-
/* @__PURE__ */ p(Wt.Item, { value: w, children: /* @__PURE__ */ p(Wt.Indicator, { children: /* @__PURE__ */ p(
|
|
2409
|
+
return /* @__PURE__ */ _("label", { className: "flex min-w-0 items-center gap-2", children: [
|
|
2410
|
+
/* @__PURE__ */ p(Wt.Item, { value: w, children: /* @__PURE__ */ p(Wt.Indicator, { children: /* @__PURE__ */ p(N, { icon: Za, className: "fill-current" }) }) }),
|
|
2406
2411
|
/* @__PURE__ */ p(pe, { size: t, accentColor: "base", className: "truncate", children: S })
|
|
2407
2412
|
] }, `${e.identifier}-${w}`);
|
|
2408
2413
|
})
|
|
2409
2414
|
}
|
|
2410
2415
|
),
|
|
2411
|
-
y && /* @__PURE__ */
|
|
2416
|
+
y && /* @__PURE__ */ _(Le, { children: [
|
|
2412
2417
|
/* @__PURE__ */ p("div", { children: /* @__PURE__ */ p(
|
|
2413
2418
|
or,
|
|
2414
2419
|
{
|
|
@@ -2426,8 +2431,8 @@ const So = L((r) => {
|
|
|
2426
2431
|
disabled: l
|
|
2427
2432
|
}
|
|
2428
2433
|
) }),
|
|
2429
|
-
/* @__PURE__ */
|
|
2430
|
-
/* @__PURE__ */
|
|
2434
|
+
/* @__PURE__ */ _("div", { className: "flex flex-col gap-2", children: [
|
|
2435
|
+
/* @__PURE__ */ _(
|
|
2431
2436
|
B,
|
|
2432
2437
|
{
|
|
2433
2438
|
className: "w-max",
|
|
@@ -2438,7 +2443,7 @@ const So = L((r) => {
|
|
|
2438
2443
|
type: "button",
|
|
2439
2444
|
disabled: l,
|
|
2440
2445
|
children: [
|
|
2441
|
-
/* @__PURE__ */ p(
|
|
2446
|
+
/* @__PURE__ */ p(N, { icon: oi }),
|
|
2442
2447
|
"Select files"
|
|
2443
2448
|
]
|
|
2444
2449
|
}
|
|
@@ -2446,7 +2451,7 @@ const So = L((r) => {
|
|
|
2446
2451
|
/* @__PURE__ */ p(
|
|
2447
2452
|
"input",
|
|
2448
2453
|
{
|
|
2449
|
-
id:
|
|
2454
|
+
id: A,
|
|
2450
2455
|
name: i,
|
|
2451
2456
|
type: "file",
|
|
2452
2457
|
ref: c,
|
|
@@ -2596,7 +2601,7 @@ class Qt extends tt {
|
|
|
2596
2601
|
}
|
|
2597
2602
|
}
|
|
2598
2603
|
const Io = L((r) => {
|
|
2599
|
-
const { field: e } = r, { size: t } = ce(Ce), { value: n, name: i, onBlur: a, onChange: o, error: s, disabled: l } =
|
|
2604
|
+
const { field: e } = r, { size: t } = ce(Ce), { value: n, name: i, onBlur: a, onChange: o, error: s, disabled: l } = ze({ field: e }), c = b(
|
|
2600
2605
|
(f) => {
|
|
2601
2606
|
o(f), a();
|
|
2602
2607
|
},
|
|
@@ -2616,7 +2621,7 @@ const Io = L((r) => {
|
|
|
2616
2621
|
required: e.required,
|
|
2617
2622
|
error: s,
|
|
2618
2623
|
image: e.image,
|
|
2619
|
-
children: /* @__PURE__ */
|
|
2624
|
+
children: /* @__PURE__ */ _(
|
|
2620
2625
|
Wt.Root,
|
|
2621
2626
|
{
|
|
2622
2627
|
id: e.identifier,
|
|
@@ -2629,18 +2634,18 @@ const Io = L((r) => {
|
|
|
2629
2634
|
onValueChange: c,
|
|
2630
2635
|
disabled: l,
|
|
2631
2636
|
children: [
|
|
2632
|
-
e.options.map((f, h) => /* @__PURE__ */
|
|
2637
|
+
e.options.map((f, h) => /* @__PURE__ */ _(
|
|
2633
2638
|
"label",
|
|
2634
2639
|
{
|
|
2635
2640
|
className: "flex min-w-0 items-center gap-2",
|
|
2636
2641
|
children: [
|
|
2637
|
-
/* @__PURE__ */ p(Wt.Item, { value: f.value, onBlur: u, children: /* @__PURE__ */ p(Wt.Indicator, { children: /* @__PURE__ */ p(
|
|
2642
|
+
/* @__PURE__ */ p(Wt.Item, { value: f.value, onBlur: u, children: /* @__PURE__ */ p(Wt.Indicator, { children: /* @__PURE__ */ p(N, { icon: Za, className: "fill-current" }) }) }),
|
|
2638
2643
|
/* @__PURE__ */ p(pe, { size: t, accentColor: "base", className: "truncate", children: f.label })
|
|
2639
2644
|
]
|
|
2640
2645
|
},
|
|
2641
2646
|
`${e.identifier}-${f.value}-${h}`
|
|
2642
2647
|
)),
|
|
2643
|
-
!!n && /* @__PURE__ */
|
|
2648
|
+
!!n && /* @__PURE__ */ _(
|
|
2644
2649
|
B,
|
|
2645
2650
|
{
|
|
2646
2651
|
onClick: d,
|
|
@@ -2650,7 +2655,7 @@ const Io = L((r) => {
|
|
|
2650
2655
|
accentColor: "base",
|
|
2651
2656
|
size: t,
|
|
2652
2657
|
children: [
|
|
2653
|
-
/* @__PURE__ */ p(
|
|
2658
|
+
/* @__PURE__ */ p(N, { icon: It }),
|
|
2654
2659
|
"Clear"
|
|
2655
2660
|
]
|
|
2656
2661
|
}
|
|
@@ -2729,7 +2734,7 @@ const Xc = ri(
|
|
|
2729
2734
|
}
|
|
2730
2735
|
}
|
|
2731
2736
|
), Oo = L((r) => {
|
|
2732
|
-
const { field: e } = r, { size: t } = ce(Ce), { value: n, name: i, onBlur: a, onChange: o, error: s, disabled: l } =
|
|
2737
|
+
const { field: e } = r, { size: t } = ce(Ce), { value: n, name: i, onBlur: a, onChange: o, error: s, disabled: l } = ze({ field: e }), c = b(
|
|
2733
2738
|
(f) => {
|
|
2734
2739
|
o(f), a();
|
|
2735
2740
|
},
|
|
@@ -2747,7 +2752,7 @@ const Xc = ri(
|
|
|
2747
2752
|
required: e.required,
|
|
2748
2753
|
error: s,
|
|
2749
2754
|
image: e.image,
|
|
2750
|
-
children: /* @__PURE__ */
|
|
2755
|
+
children: /* @__PURE__ */ _("div", { className: "flex flex-row items-center gap-1", children: [
|
|
2751
2756
|
/* @__PURE__ */ p(
|
|
2752
2757
|
Fi.Root,
|
|
2753
2758
|
{
|
|
@@ -2762,13 +2767,13 @@ const Xc = ri(
|
|
|
2762
2767
|
{
|
|
2763
2768
|
value: f,
|
|
2764
2769
|
className: Xc({ size: t }),
|
|
2765
|
-
children: /* @__PURE__ */ p(
|
|
2770
|
+
children: /* @__PURE__ */ p(N, { icon: oo, className: "size-full group-data-[active=true]:fill-current" })
|
|
2766
2771
|
},
|
|
2767
2772
|
`${e.identifier}-${f}`
|
|
2768
2773
|
))
|
|
2769
2774
|
}
|
|
2770
2775
|
),
|
|
2771
|
-
!l && n !== null && /* @__PURE__ */ p(ne, { onClick: u, type: "button", variant: "ghost", accentColor: "base", size: t, children: /* @__PURE__ */ p(
|
|
2776
|
+
!l && n !== null && /* @__PURE__ */ p(ne, { onClick: u, type: "button", variant: "ghost", accentColor: "base", size: t, children: /* @__PURE__ */ p(N, { icon: It }) })
|
|
2772
2777
|
] })
|
|
2773
2778
|
}
|
|
2774
2779
|
);
|
|
@@ -2786,7 +2791,7 @@ class er extends tt {
|
|
|
2786
2791
|
const n = t && `${t}.`;
|
|
2787
2792
|
return [
|
|
2788
2793
|
{
|
|
2789
|
-
field: new
|
|
2794
|
+
field: new Je({
|
|
2790
2795
|
label: "Max Rating",
|
|
2791
2796
|
description: "Maximum rating value",
|
|
2792
2797
|
integers: !0,
|
|
@@ -3552,8 +3557,8 @@ var Ee = (
|
|
|
3552
3557
|
for (var n = e.length, i = !0, a = !0, o = !0, s = 0, l = 0, c = 0, u = 0, d = 0, f = 0, h = 0, v = 0, g = 0, y = 0, m = 0, C = e.length > 3 && e[0] === /*(byte) */
|
|
3553
3558
|
239 && e[1] === /*(byte) */
|
|
3554
3559
|
187 && e[2] === /*(byte) */
|
|
3555
|
-
191,
|
|
3556
|
-
var w = e[
|
|
3560
|
+
191, A = 0; A < n && (i || a || o); A++) {
|
|
3561
|
+
var w = e[A] & 255;
|
|
3557
3562
|
o && (s > 0 ? (w & 128) === 0 ? o = !1 : s-- : (w & 128) !== 0 && ((w & 64) === 0 ? o = !1 : (s++, (w & 32) === 0 ? l++ : (s++, (w & 16) === 0 ? c++ : (s++, (w & 8) === 0 ? u++ : o = !1))))), i && (w > 127 && w < 160 ? i = !1 : w > 159 && (w < 192 || w === 215 || w === 247) && m++), a && (d > 0 ? w < 64 || w === 127 || w > 252 ? a = !1 : d-- : w === 128 || w === 160 || w > 239 ? a = !1 : w > 160 && w < 224 ? (f++, v = 0, h++, h > g && (g = h)) : w > 127 ? (d++, h = 0, v++, v > y && (y = v)) : (h = 0, v = 0));
|
|
3558
3563
|
}
|
|
3559
3564
|
return o && s > 0 && (o = !1), a && d > 0 && (a = !1), o && (C || l + c + u > 0) ? r.UTF8 : a && (r.ASSUME_SHIFT_JIS || g >= 3 || y >= 3) ? r.SHIFT_JIS : i && a ? g === 2 && f === 2 || m * 10 >= n ? r.SHIFT_JIS : r.ISO88591 : i ? r.ISO88591 : a ? r.SHIFT_JIS : o ? r.UTF8 : r.PLATFORM_DEFAULT_ENCODING;
|
|
@@ -3936,8 +3941,8 @@ var Ee = (
|
|
|
3936
3941
|
var g = v << e.BLOCK_SIZE_POWER;
|
|
3937
3942
|
g > u && (g = u);
|
|
3938
3943
|
for (var y = e.cap(v, 2, n - 3), m = 0, C = -2; C <= 2; C++) {
|
|
3939
|
-
var
|
|
3940
|
-
m +=
|
|
3944
|
+
var A = s[h + C];
|
|
3945
|
+
m += A[y - 2] + A[y - 1] + A[y] + A[y + 1] + A[y + 2];
|
|
3941
3946
|
}
|
|
3942
3947
|
var w = m / 25;
|
|
3943
3948
|
e.thresholdBlock(t, g, f, w, a, l);
|
|
@@ -3958,14 +3963,14 @@ var Ee = (
|
|
|
3958
3963
|
var h = f << e.BLOCK_SIZE_POWER;
|
|
3959
3964
|
h > l && (h = l);
|
|
3960
3965
|
for (var v = 0, g = 255, y = 0, m = 0, C = d * a + h; m < e.BLOCK_SIZE; m++, C += a) {
|
|
3961
|
-
for (var
|
|
3962
|
-
var w = t[C +
|
|
3966
|
+
for (var A = 0; A < e.BLOCK_SIZE; A++) {
|
|
3967
|
+
var w = t[C + A] & 255;
|
|
3963
3968
|
v += w, w < g && (g = w), w > y && (y = w);
|
|
3964
3969
|
}
|
|
3965
3970
|
if (y - g > e.MIN_DYNAMIC_RANGE)
|
|
3966
3971
|
for (m++, C += a; m < e.BLOCK_SIZE; m++, C += a)
|
|
3967
|
-
for (var
|
|
3968
|
-
v += t[C +
|
|
3972
|
+
for (var A = 0; A < e.BLOCK_SIZE; A++)
|
|
3973
|
+
v += t[C + A] & 255;
|
|
3969
3974
|
}
|
|
3970
3975
|
var S = v >> e.BLOCK_SIZE_POWER * 2;
|
|
3971
3976
|
if (y - g <= e.MIN_DYNAMIC_RANGE && (S = g / 2, u > 0 && f > 0)) {
|
|
@@ -4153,7 +4158,7 @@ var Ee = (
|
|
|
4153
4158
|
};
|
|
4154
4159
|
}, r;
|
|
4155
4160
|
}()
|
|
4156
|
-
),
|
|
4161
|
+
), $e = function(r, e, t, n) {
|
|
4157
4162
|
function i(a) {
|
|
4158
4163
|
return a instanceof t ? a : new t(function(o) {
|
|
4159
4164
|
o(a);
|
|
@@ -4179,7 +4184,7 @@ var Ee = (
|
|
|
4179
4184
|
}
|
|
4180
4185
|
c((n = n.apply(r, e || [])).next());
|
|
4181
4186
|
});
|
|
4182
|
-
},
|
|
4187
|
+
}, je = function(r, e) {
|
|
4183
4188
|
var t = { label: 0, sent: function() {
|
|
4184
4189
|
if (a[0] & 1) throw a[1];
|
|
4185
4190
|
return a[1];
|
|
@@ -4311,9 +4316,9 @@ var Ee = (
|
|
|
4311
4316
|
enumerable: !1,
|
|
4312
4317
|
configurable: !0
|
|
4313
4318
|
}), r.prototype.listVideoInputDevices = function() {
|
|
4314
|
-
return
|
|
4319
|
+
return $e(this, void 0, void 0, function() {
|
|
4315
4320
|
var e, t, n, i, a, o, s, l, c, u, d, f;
|
|
4316
|
-
return
|
|
4321
|
+
return je(this, function(h) {
|
|
4317
4322
|
switch (h.label) {
|
|
4318
4323
|
case 0:
|
|
4319
4324
|
if (!this.hasNavigator)
|
|
@@ -4340,9 +4345,9 @@ var Ee = (
|
|
|
4340
4345
|
});
|
|
4341
4346
|
});
|
|
4342
4347
|
}, r.prototype.getVideoInputDevices = function() {
|
|
4343
|
-
return
|
|
4348
|
+
return $e(this, void 0, void 0, function() {
|
|
4344
4349
|
var e;
|
|
4345
|
-
return
|
|
4350
|
+
return je(this, function(t) {
|
|
4346
4351
|
switch (t.label) {
|
|
4347
4352
|
case 0:
|
|
4348
4353
|
return [4, this.listVideoInputDevices()];
|
|
@@ -4354,9 +4359,9 @@ var Ee = (
|
|
|
4354
4359
|
});
|
|
4355
4360
|
});
|
|
4356
4361
|
}, r.prototype.findDeviceById = function(e) {
|
|
4357
|
-
return
|
|
4362
|
+
return $e(this, void 0, void 0, function() {
|
|
4358
4363
|
var t;
|
|
4359
|
-
return
|
|
4364
|
+
return je(this, function(n) {
|
|
4360
4365
|
switch (n.label) {
|
|
4361
4366
|
case 0:
|
|
4362
4367
|
return [4, this.listVideoInputDevices()];
|
|
@@ -4368,8 +4373,8 @@ var Ee = (
|
|
|
4368
4373
|
});
|
|
4369
4374
|
});
|
|
4370
4375
|
}, r.prototype.decodeFromInputVideoDevice = function(e, t) {
|
|
4371
|
-
return
|
|
4372
|
-
return
|
|
4376
|
+
return $e(this, void 0, void 0, function() {
|
|
4377
|
+
return je(this, function(n) {
|
|
4373
4378
|
switch (n.label) {
|
|
4374
4379
|
case 0:
|
|
4375
4380
|
return [4, this.decodeOnceFromVideoDevice(e, t)];
|
|
@@ -4379,9 +4384,9 @@ var Ee = (
|
|
|
4379
4384
|
});
|
|
4380
4385
|
});
|
|
4381
4386
|
}, r.prototype.decodeOnceFromVideoDevice = function(e, t) {
|
|
4382
|
-
return
|
|
4387
|
+
return $e(this, void 0, void 0, function() {
|
|
4383
4388
|
var n, i;
|
|
4384
|
-
return
|
|
4389
|
+
return je(this, function(a) {
|
|
4385
4390
|
switch (a.label) {
|
|
4386
4391
|
case 0:
|
|
4387
4392
|
return this.reset(), e ? n = { deviceId: { exact: e } } : n = { facingMode: "environment" }, i = { video: n }, [4, this.decodeOnceFromConstraints(i, t)];
|
|
@@ -4391,9 +4396,9 @@ var Ee = (
|
|
|
4391
4396
|
});
|
|
4392
4397
|
});
|
|
4393
4398
|
}, r.prototype.decodeOnceFromConstraints = function(e, t) {
|
|
4394
|
-
return
|
|
4399
|
+
return $e(this, void 0, void 0, function() {
|
|
4395
4400
|
var n;
|
|
4396
|
-
return
|
|
4401
|
+
return je(this, function(i) {
|
|
4397
4402
|
switch (i.label) {
|
|
4398
4403
|
case 0:
|
|
4399
4404
|
return [4, navigator.mediaDevices.getUserMedia(e)];
|
|
@@ -4405,9 +4410,9 @@ var Ee = (
|
|
|
4405
4410
|
});
|
|
4406
4411
|
});
|
|
4407
4412
|
}, r.prototype.decodeOnceFromStream = function(e, t) {
|
|
4408
|
-
return
|
|
4413
|
+
return $e(this, void 0, void 0, function() {
|
|
4409
4414
|
var n, i;
|
|
4410
|
-
return
|
|
4415
|
+
return je(this, function(a) {
|
|
4411
4416
|
switch (a.label) {
|
|
4412
4417
|
case 0:
|
|
4413
4418
|
return this.reset(), [4, this.attachStreamToVideo(e, t)];
|
|
@@ -4419,8 +4424,8 @@ var Ee = (
|
|
|
4419
4424
|
});
|
|
4420
4425
|
});
|
|
4421
4426
|
}, r.prototype.decodeFromInputVideoDeviceContinuously = function(e, t, n) {
|
|
4422
|
-
return
|
|
4423
|
-
return
|
|
4427
|
+
return $e(this, void 0, void 0, function() {
|
|
4428
|
+
return je(this, function(i) {
|
|
4424
4429
|
switch (i.label) {
|
|
4425
4430
|
case 0:
|
|
4426
4431
|
return [4, this.decodeFromVideoDevice(e, t, n)];
|
|
@@ -4430,9 +4435,9 @@ var Ee = (
|
|
|
4430
4435
|
});
|
|
4431
4436
|
});
|
|
4432
4437
|
}, r.prototype.decodeFromVideoDevice = function(e, t, n) {
|
|
4433
|
-
return
|
|
4438
|
+
return $e(this, void 0, void 0, function() {
|
|
4434
4439
|
var i, a;
|
|
4435
|
-
return
|
|
4440
|
+
return je(this, function(o) {
|
|
4436
4441
|
switch (o.label) {
|
|
4437
4442
|
case 0:
|
|
4438
4443
|
return e ? i = { deviceId: { exact: e } } : i = { facingMode: "environment" }, a = { video: i }, [4, this.decodeFromConstraints(a, t, n)];
|
|
@@ -4442,9 +4447,9 @@ var Ee = (
|
|
|
4442
4447
|
});
|
|
4443
4448
|
});
|
|
4444
4449
|
}, r.prototype.decodeFromConstraints = function(e, t, n) {
|
|
4445
|
-
return
|
|
4450
|
+
return $e(this, void 0, void 0, function() {
|
|
4446
4451
|
var i;
|
|
4447
|
-
return
|
|
4452
|
+
return je(this, function(a) {
|
|
4448
4453
|
switch (a.label) {
|
|
4449
4454
|
case 0:
|
|
4450
4455
|
return [4, navigator.mediaDevices.getUserMedia(e)];
|
|
@@ -4456,9 +4461,9 @@ var Ee = (
|
|
|
4456
4461
|
});
|
|
4457
4462
|
});
|
|
4458
4463
|
}, r.prototype.decodeFromStream = function(e, t, n) {
|
|
4459
|
-
return
|
|
4464
|
+
return $e(this, void 0, void 0, function() {
|
|
4460
4465
|
var i;
|
|
4461
|
-
return
|
|
4466
|
+
return je(this, function(a) {
|
|
4462
4467
|
switch (a.label) {
|
|
4463
4468
|
case 0:
|
|
4464
4469
|
return this.reset(), [4, this.attachStreamToVideo(e, t)];
|
|
@@ -4474,9 +4479,9 @@ var Ee = (
|
|
|
4474
4479
|
}, r.prototype.stopContinuousDecode = function() {
|
|
4475
4480
|
this._stopContinuousDecode = !0;
|
|
4476
4481
|
}, r.prototype.attachStreamToVideo = function(e, t) {
|
|
4477
|
-
return
|
|
4482
|
+
return $e(this, void 0, void 0, function() {
|
|
4478
4483
|
var n;
|
|
4479
|
-
return
|
|
4484
|
+
return je(this, function(i) {
|
|
4480
4485
|
switch (i.label) {
|
|
4481
4486
|
case 0:
|
|
4482
4487
|
return n = this.prepareVideoElement(t), this.addVideoSource(n, e), this.videoElement = n, this.stream = e, [4, this.playVideoOnLoadAsync(n)];
|
|
@@ -4502,8 +4507,8 @@ var Ee = (
|
|
|
4502
4507
|
}, r.prototype.isVideoPlaying = function(e) {
|
|
4503
4508
|
return e.currentTime > 0 && !e.paused && !e.ended && e.readyState > 2;
|
|
4504
4509
|
}, r.prototype.tryPlayVideo = function(e) {
|
|
4505
|
-
return
|
|
4506
|
-
return
|
|
4510
|
+
return $e(this, void 0, void 0, function() {
|
|
4511
|
+
return je(this, function(t) {
|
|
4507
4512
|
switch (t.label) {
|
|
4508
4513
|
case 0:
|
|
4509
4514
|
if (this.isVideoPlaying(e))
|
|
@@ -4593,8 +4598,8 @@ var Ee = (
|
|
|
4593
4598
|
}, e.addEventListener("load", t.imageLoadedListener);
|
|
4594
4599
|
});
|
|
4595
4600
|
}, r.prototype._decodeOnLoadVideo = function(e) {
|
|
4596
|
-
return
|
|
4597
|
-
return
|
|
4601
|
+
return $e(this, void 0, void 0, function() {
|
|
4602
|
+
return je(this, function(t) {
|
|
4598
4603
|
switch (t.label) {
|
|
4599
4604
|
case 0:
|
|
4600
4605
|
return [4, this.playVideoOnLoadAsync(e)];
|
|
@@ -4606,8 +4611,8 @@ var Ee = (
|
|
|
4606
4611
|
});
|
|
4607
4612
|
});
|
|
4608
4613
|
}, r.prototype._decodeOnLoadVideoContinuously = function(e, t) {
|
|
4609
|
-
return
|
|
4610
|
-
return
|
|
4614
|
+
return $e(this, void 0, void 0, function() {
|
|
4615
|
+
return je(this, function(n) {
|
|
4611
4616
|
switch (n.label) {
|
|
4612
4617
|
case 0:
|
|
4613
4618
|
return [4, this.playVideoOnLoadAsync(e)];
|
|
@@ -4746,7 +4751,7 @@ var Ee = (
|
|
|
4746
4751
|
this.videoElement.removeAttribute("src");
|
|
4747
4752
|
}, r;
|
|
4748
4753
|
}()
|
|
4749
|
-
),
|
|
4754
|
+
), We = (
|
|
4750
4755
|
/** @class */
|
|
4751
4756
|
function() {
|
|
4752
4757
|
function r(e, t, n, i, a, o) {
|
|
@@ -4989,7 +4994,7 @@ var en = (
|
|
|
4989
4994
|
}
|
|
4990
4995
|
e.prototype = t === null ? Object.create(t) : (n.prototype = t.prototype, new n());
|
|
4991
4996
|
};
|
|
4992
|
-
}(),
|
|
4997
|
+
}(), Qe = (
|
|
4993
4998
|
/** @class */
|
|
4994
4999
|
function(r) {
|
|
4995
5000
|
mu(e, r);
|
|
@@ -5094,7 +5099,7 @@ var en = (
|
|
|
5094
5099
|
var g = e.length - 1 - n.log(h[s]);
|
|
5095
5100
|
if (g < 0)
|
|
5096
5101
|
throw new Dr("Bad error location");
|
|
5097
|
-
e[g] =
|
|
5102
|
+
e[g] = Qe.addOrSubtract(e[g], v[s]);
|
|
5098
5103
|
}
|
|
5099
5104
|
}, r.prototype.runEuclideanAlgorithm = function(e, t, n) {
|
|
5100
5105
|
if (e.getDegree() < t.getDegree()) {
|
|
@@ -5116,8 +5121,8 @@ var en = (
|
|
|
5116
5121
|
var m = c.getCoefficient(0);
|
|
5117
5122
|
if (m === 0)
|
|
5118
5123
|
throw new Dr("sigmaTilde(0) was zero");
|
|
5119
|
-
var C = a.inverse(m),
|
|
5120
|
-
return [
|
|
5124
|
+
var C = a.inverse(m), A = c.multiplyScalar(C), w = s.multiplyScalar(C);
|
|
5125
|
+
return [A, w];
|
|
5121
5126
|
}, r.prototype.findErrorLocations = function(e) {
|
|
5122
5127
|
var t = e.getDegree();
|
|
5123
5128
|
if (t === 1)
|
|
@@ -5218,7 +5223,7 @@ var zi = (
|
|
|
5218
5223
|
}
|
|
5219
5224
|
}, r.prototype.correctBits = function(e) {
|
|
5220
5225
|
var t, n;
|
|
5221
|
-
this.ddata.getNbLayers() <= 2 ? (n = 6, t =
|
|
5226
|
+
this.ddata.getNbLayers() <= 2 ? (n = 6, t = Qe.AZTEC_DATA_6) : this.ddata.getNbLayers() <= 8 ? (n = 8, t = Qe.AZTEC_DATA_8) : this.ddata.getNbLayers() <= 22 ? (n = 10, t = Qe.AZTEC_DATA_10) : (n = 12, t = Qe.AZTEC_DATA_12);
|
|
5222
5227
|
var i = this.ddata.getNbDatablocks(), a = e.length / n;
|
|
5223
5228
|
if (a < i)
|
|
5224
5229
|
throw new M();
|
|
@@ -5579,9 +5584,9 @@ var zi = (
|
|
|
5579
5584
|
o && (s = !0);
|
|
5580
5585
|
}
|
|
5581
5586
|
if (!a && s) {
|
|
5582
|
-
for (var C = t - e,
|
|
5583
|
-
|
|
5584
|
-
if (
|
|
5587
|
+
for (var C = t - e, A = null, w = 1; A === null && w < C; w++)
|
|
5588
|
+
A = this.getBlackPointOnSegment(e, i - w, e + w, i);
|
|
5589
|
+
if (A == null)
|
|
5585
5590
|
throw new I();
|
|
5586
5591
|
for (var S = null, w = 1; S === null && w < C; w++)
|
|
5587
5592
|
S = this.getBlackPointOnSegment(e, n + w, e + w, n);
|
|
@@ -5591,11 +5596,11 @@ var zi = (
|
|
|
5591
5596
|
O = this.getBlackPointOnSegment(t, n + w, t - w, n);
|
|
5592
5597
|
if (O == null)
|
|
5593
5598
|
throw new I();
|
|
5594
|
-
for (var
|
|
5595
|
-
|
|
5596
|
-
if (
|
|
5599
|
+
for (var T = null, w = 1; T === null && w < C; w++)
|
|
5600
|
+
T = this.getBlackPointOnSegment(t, i - w, t - w, i);
|
|
5601
|
+
if (T == null)
|
|
5597
5602
|
throw new I();
|
|
5598
|
-
return this.centerEdges(
|
|
5603
|
+
return this.centerEdges(T, A, O, S);
|
|
5599
5604
|
} else
|
|
5600
5605
|
throw new I();
|
|
5601
5606
|
}, r.prototype.getBlackPointOnSegment = function(e, t, n, i) {
|
|
@@ -5707,8 +5712,8 @@ var zi = (
|
|
|
5707
5712
|
function e() {
|
|
5708
5713
|
return r !== null && r.apply(this, arguments) || this;
|
|
5709
5714
|
}
|
|
5710
|
-
return e.prototype.sampleGrid = function(t, n, i, a, o, s, l, c, u, d, f, h, v, g, y, m, C,
|
|
5711
|
-
var S = Do.quadrilateralToQuadrilateral(a, o, s, l, c, u, d, f, h, v, g, y, m, C,
|
|
5715
|
+
return e.prototype.sampleGrid = function(t, n, i, a, o, s, l, c, u, d, f, h, v, g, y, m, C, A, w) {
|
|
5716
|
+
var S = Do.quadrilateralToQuadrilateral(a, o, s, l, c, u, d, f, h, v, g, y, m, C, A, w);
|
|
5712
5717
|
return this.sampleGridWithTransform(t, n, i, S);
|
|
5713
5718
|
}, e.prototype.sampleGridWithTransform = function(t, n, i, a) {
|
|
5714
5719
|
if (n <= 0 || i <= 0)
|
|
@@ -5738,7 +5743,7 @@ var zi = (
|
|
|
5738
5743
|
return r.gridSampler;
|
|
5739
5744
|
}, r.gridSampler = new Su(), r;
|
|
5740
5745
|
}()
|
|
5741
|
-
),
|
|
5746
|
+
), Ke = (
|
|
5742
5747
|
/** @class */
|
|
5743
5748
|
function() {
|
|
5744
5749
|
function r(e, t) {
|
|
@@ -5807,7 +5812,7 @@ var zi = (
|
|
|
5807
5812
|
for (var a = n - i, o = new Int32Array(n), s = n - 1; s >= 0; --s)
|
|
5808
5813
|
o[s] = e & 15, e >>= 4;
|
|
5809
5814
|
try {
|
|
5810
|
-
var l = new tn(
|
|
5815
|
+
var l = new tn(Qe.AZTEC_PARAM);
|
|
5811
5816
|
l.decode(o, a);
|
|
5812
5817
|
} catch {
|
|
5813
5818
|
throw new I();
|
|
@@ -5838,16 +5843,16 @@ var zi = (
|
|
|
5838
5843
|
e = a[0], t = a[1], n = a[2], i = a[3];
|
|
5839
5844
|
} catch {
|
|
5840
5845
|
var o = this.image.getWidth() / 2, s = this.image.getHeight() / 2;
|
|
5841
|
-
e = this.getFirstDifferent(new
|
|
5846
|
+
e = this.getFirstDifferent(new Ke(o + 7, s - 7), !1, 1, -1).toResultPoint(), t = this.getFirstDifferent(new Ke(o + 7, s + 7), !1, 1, 1).toResultPoint(), n = this.getFirstDifferent(new Ke(o - 7, s + 7), !1, -1, 1).toResultPoint(), i = this.getFirstDifferent(new Ke(o - 7, s - 7), !1, -1, -1).toResultPoint();
|
|
5842
5847
|
}
|
|
5843
5848
|
var l = ee.round((e.getX() + i.getX() + t.getX() + n.getX()) / 4), c = ee.round((e.getY() + i.getY() + t.getY() + n.getY()) / 4);
|
|
5844
5849
|
try {
|
|
5845
5850
|
var a = new qn(this.image, 15, l, c).detect();
|
|
5846
5851
|
e = a[0], t = a[1], n = a[2], i = a[3];
|
|
5847
5852
|
} catch {
|
|
5848
|
-
e = this.getFirstDifferent(new
|
|
5853
|
+
e = this.getFirstDifferent(new Ke(l + 7, c - 7), !1, 1, -1).toResultPoint(), t = this.getFirstDifferent(new Ke(l + 7, c + 7), !1, 1, 1).toResultPoint(), n = this.getFirstDifferent(new Ke(l - 7, c + 7), !1, -1, 1).toResultPoint(), i = this.getFirstDifferent(new Ke(l - 7, c - 7), !1, -1, -1).toResultPoint();
|
|
5849
5854
|
}
|
|
5850
|
-
return l = ee.round((e.getX() + i.getX() + t.getX() + n.getX()) / 4), c = ee.round((e.getY() + i.getY() + t.getY() + n.getY()) / 4), new
|
|
5855
|
+
return l = ee.round((e.getX() + i.getX() + t.getX() + n.getX()) / 4), c = ee.round((e.getY() + i.getY() + t.getY() + n.getY()) / 4), new Ke(l, c);
|
|
5851
5856
|
}, r.prototype.getMatrixCornerPoints = function(e) {
|
|
5852
5857
|
return this.expandSquare(e, 2 * this.nbCenterLayers, this.getDimension());
|
|
5853
5858
|
}, r.prototype.sampleGrid = function(e, t, n, i, a) {
|
|
@@ -5883,7 +5888,7 @@ var zi = (
|
|
|
5883
5888
|
return i;
|
|
5884
5889
|
}, r.prototype.isWhiteOrBlackRectangle = function(e, t, n, i) {
|
|
5885
5890
|
var a = 3;
|
|
5886
|
-
e = new
|
|
5891
|
+
e = new Ke(e.getX() - a, e.getY() + a), t = new Ke(t.getX() - a, t.getY() - a), n = new Ke(n.getX() + a, n.getY() - a), i = new Ke(i.getX() + a, i.getY() + a);
|
|
5887
5892
|
var o = this.getColor(i, e);
|
|
5888
5893
|
if (o === 0)
|
|
5889
5894
|
return !1;
|
|
@@ -5901,7 +5906,7 @@ var zi = (
|
|
|
5901
5906
|
a += n;
|
|
5902
5907
|
for (a -= n; this.isValid(a, o) && this.image.get(a, o) === t; )
|
|
5903
5908
|
o += i;
|
|
5904
|
-
return o -= i, new
|
|
5909
|
+
return o -= i, new Ke(a, o);
|
|
5905
5910
|
}, r.prototype.expandSquare = function(e, t, n) {
|
|
5906
5911
|
var i = n / (2 * t), a = e[0].getX() - e[2].getX(), o = e[0].getY() - e[2].getY(), s = (e[0].getX() + e[2].getX()) / 2, l = (e[0].getY() + e[2].getY()) / 2, c = new k(s + i * a, l + i * o), u = new k(s - i * a, l - i * o);
|
|
5907
5912
|
a = e[1].getX() - e[3].getX(), o = e[1].getY() - e[3].getY(), s = (e[1].getX() + e[3].getX()) / 2, l = (e[1].getY() + e[3].getY()) / 2;
|
|
@@ -5941,7 +5946,7 @@ var zi = (
|
|
|
5941
5946
|
} catch (d) {
|
|
5942
5947
|
throw n ?? d;
|
|
5943
5948
|
}
|
|
5944
|
-
var l = new
|
|
5949
|
+
var l = new We(o.getText(), o.getRawBytes(), o.getNumBits(), a, P.AZTEC, de.currentTimeMillis()), c = o.getByteSegments();
|
|
5945
5950
|
c != null && l.putMetadata(ke.BYTE_SEGMENTS, c);
|
|
5946
5951
|
var u = o.getECLevel();
|
|
5947
5952
|
return u != null && l.putMetadata(ke.ERROR_CORRECTION_LEVEL, u), l;
|
|
@@ -6014,10 +6019,10 @@ var be = (
|
|
|
6014
6019
|
}
|
|
6015
6020
|
for (var v = function(C) {
|
|
6016
6021
|
if (C === 1 && (a.reverse(), t && t.get(ve.NEED_RESULT_POINT_CALLBACK) === !0)) {
|
|
6017
|
-
var
|
|
6018
|
-
t.forEach(function(O,
|
|
6019
|
-
return
|
|
6020
|
-
}),
|
|
6022
|
+
var A = /* @__PURE__ */ new Map();
|
|
6023
|
+
t.forEach(function(O, T) {
|
|
6024
|
+
return A.set(T, O);
|
|
6025
|
+
}), A.delete(ve.NEED_RESULT_POINT_CALLBACK), t = A;
|
|
6021
6026
|
}
|
|
6022
6027
|
try {
|
|
6023
6028
|
var w = g.decodeRow(h, a, t);
|
|
@@ -6142,9 +6147,9 @@ var be = (
|
|
|
6142
6147
|
default:
|
|
6143
6148
|
throw new M();
|
|
6144
6149
|
}
|
|
6145
|
-
for (var d = !1, f = !1, h = "", v = o[0], g = o[1], y = Int32Array.from([0, 0, 0, 0, 0, 0]), m = 0, C = 0,
|
|
6150
|
+
for (var d = !1, f = !1, h = "", v = o[0], g = o[1], y = Int32Array.from([0, 0, 0, 0, 0, 0]), m = 0, C = 0, A = s, w = 0, S = !0, O = !1, T = !1; !d; ) {
|
|
6146
6151
|
var F = f;
|
|
6147
|
-
switch (f = !1, m = C, C = e.decodeCode(n, y, g), c[l++] = C, C !== e.CODE_STOP && (S = !0), C !== e.CODE_STOP && (w++,
|
|
6152
|
+
switch (f = !1, m = C, C = e.decodeCode(n, y, g), c[l++] = C, C !== e.CODE_STOP && (S = !0), C !== e.CODE_STOP && (w++, A += w * C), v = g, g += y.reduce(function(_n, An) {
|
|
6148
6153
|
return _n + An;
|
|
6149
6154
|
}, 0), C) {
|
|
6150
6155
|
case e.CODE_START_A:
|
|
@@ -6155,9 +6160,9 @@ var be = (
|
|
|
6155
6160
|
switch (u) {
|
|
6156
6161
|
case e.CODE_CODE_A:
|
|
6157
6162
|
if (C < 64)
|
|
6158
|
-
|
|
6163
|
+
T === O ? h += String.fromCharCode(32 + C) : h += String.fromCharCode(32 + C + 128), T = !1;
|
|
6159
6164
|
else if (C < 96)
|
|
6160
|
-
|
|
6165
|
+
T === O ? h += String.fromCharCode(C - 64) : h += String.fromCharCode(C + 64), T = !1;
|
|
6161
6166
|
else
|
|
6162
6167
|
switch (C !== e.CODE_STOP && (S = !1), C) {
|
|
6163
6168
|
case e.CODE_FNC_1:
|
|
@@ -6167,7 +6172,7 @@ var be = (
|
|
|
6167
6172
|
case e.CODE_FNC_3:
|
|
6168
6173
|
break;
|
|
6169
6174
|
case e.CODE_FNC_4_A:
|
|
6170
|
-
!O &&
|
|
6175
|
+
!O && T ? (O = !0, T = !1) : O && T ? (O = !1, T = !1) : T = !0;
|
|
6171
6176
|
break;
|
|
6172
6177
|
case e.CODE_SHIFT:
|
|
6173
6178
|
f = !0, u = e.CODE_CODE_B;
|
|
@@ -6185,7 +6190,7 @@ var be = (
|
|
|
6185
6190
|
break;
|
|
6186
6191
|
case e.CODE_CODE_B:
|
|
6187
6192
|
if (C < 96)
|
|
6188
|
-
|
|
6193
|
+
T === O ? h += String.fromCharCode(32 + C) : h += String.fromCharCode(32 + C + 128), T = !1;
|
|
6189
6194
|
else
|
|
6190
6195
|
switch (C !== e.CODE_STOP && (S = !1), C) {
|
|
6191
6196
|
case e.CODE_FNC_1:
|
|
@@ -6195,7 +6200,7 @@ var be = (
|
|
|
6195
6200
|
case e.CODE_FNC_3:
|
|
6196
6201
|
break;
|
|
6197
6202
|
case e.CODE_FNC_4_B:
|
|
6198
|
-
!O &&
|
|
6203
|
+
!O && T ? (O = !0, T = !1) : O && T ? (O = !1, T = !1) : T = !0;
|
|
6199
6204
|
break;
|
|
6200
6205
|
case e.CODE_SHIFT:
|
|
6201
6206
|
f = !0, u = e.CODE_CODE_A;
|
|
@@ -6236,16 +6241,16 @@ var be = (
|
|
|
6236
6241
|
var z = g - v;
|
|
6237
6242
|
if (g = n.getNextUnset(g), !n.isRange(g, Math.min(n.getSize(), g + (g - v) / 2), !1))
|
|
6238
6243
|
throw new I();
|
|
6239
|
-
if (
|
|
6244
|
+
if (A -= w * m, A % 103 !== m)
|
|
6240
6245
|
throw new Te();
|
|
6241
6246
|
var U = h.length;
|
|
6242
6247
|
if (U === 0)
|
|
6243
6248
|
throw new I();
|
|
6244
6249
|
U > 0 && S && (u === e.CODE_CODE_C ? h = h.substring(0, U - 2) : h = h.substring(0, U - 1));
|
|
6245
|
-
for (var
|
|
6246
|
-
Fe[
|
|
6247
|
-
var ur = [new k(
|
|
6248
|
-
return new
|
|
6250
|
+
for (var Z = (o[1] + o[0]) / 2, X = v + z / 2, K = c.length, Fe = new Uint8Array(K), Ze = 0; Ze < K; Ze++)
|
|
6251
|
+
Fe[Ze] = c[Ze];
|
|
6252
|
+
var ur = [new k(Z, t), new k(X, t)];
|
|
6253
|
+
return new We(h, Fe, 0, ur, P.CODE_128, (/* @__PURE__ */ new Date()).getTime());
|
|
6249
6254
|
}, e.CODE_PATTERNS = [
|
|
6250
6255
|
Int32Array.from([2, 1, 2, 2, 2, 2]),
|
|
6251
6256
|
Int32Array.from([2, 2, 2, 1, 2, 2]),
|
|
@@ -6404,8 +6409,8 @@ var be = (
|
|
|
6404
6409
|
var C = m.value;
|
|
6405
6410
|
d += C;
|
|
6406
6411
|
}
|
|
6407
|
-
} catch (
|
|
6408
|
-
a = { error:
|
|
6412
|
+
} catch (K) {
|
|
6413
|
+
a = { error: K };
|
|
6409
6414
|
} finally {
|
|
6410
6415
|
try {
|
|
6411
6416
|
m && !m.done && (o = y.return) && o.call(y);
|
|
@@ -6416,14 +6421,14 @@ var be = (
|
|
|
6416
6421
|
d = n.getNextSet(d);
|
|
6417
6422
|
} while (h !== "*");
|
|
6418
6423
|
this.decodeRowResult = this.decodeRowResult.substring(0, this.decodeRowResult.length - 1);
|
|
6419
|
-
var
|
|
6424
|
+
var A = 0;
|
|
6420
6425
|
try {
|
|
6421
6426
|
for (var w = On(c), S = w.next(); !S.done; S = w.next()) {
|
|
6422
6427
|
var C = S.value;
|
|
6423
|
-
|
|
6428
|
+
A += C;
|
|
6424
6429
|
}
|
|
6425
|
-
} catch (
|
|
6426
|
-
s = { error:
|
|
6430
|
+
} catch (K) {
|
|
6431
|
+
s = { error: K };
|
|
6427
6432
|
} finally {
|
|
6428
6433
|
try {
|
|
6429
6434
|
S && !S.done && (l = w.return) && l.call(w);
|
|
@@ -6431,22 +6436,22 @@ var be = (
|
|
|
6431
6436
|
if (s) throw s.error;
|
|
6432
6437
|
}
|
|
6433
6438
|
}
|
|
6434
|
-
var O = d - v -
|
|
6435
|
-
if (d !== f && O * 2 <
|
|
6439
|
+
var O = d - v - A;
|
|
6440
|
+
if (d !== f && O * 2 < A)
|
|
6436
6441
|
throw new I();
|
|
6437
6442
|
if (this.usingCheckDigit) {
|
|
6438
|
-
for (var
|
|
6443
|
+
for (var T = this.decodeRowResult.length - 1, F = 0, z = 0; z < T; z++)
|
|
6439
6444
|
F += e.ALPHABET_STRING.indexOf(this.decodeRowResult.charAt(z));
|
|
6440
|
-
if (this.decodeRowResult.charAt(
|
|
6445
|
+
if (this.decodeRowResult.charAt(T) !== e.ALPHABET_STRING.charAt(F % 43))
|
|
6441
6446
|
throw new Te();
|
|
6442
|
-
this.decodeRowResult = this.decodeRowResult.substring(0,
|
|
6447
|
+
this.decodeRowResult = this.decodeRowResult.substring(0, T);
|
|
6443
6448
|
}
|
|
6444
6449
|
if (this.decodeRowResult.length === 0)
|
|
6445
6450
|
throw new I();
|
|
6446
6451
|
var U;
|
|
6447
6452
|
this.extendedMode ? U = e.decodeExtended(this.decodeRowResult) : U = this.decodeRowResult;
|
|
6448
|
-
var
|
|
6449
|
-
return new
|
|
6453
|
+
var Z = (u[1] + u[0]) / 2, X = v + A / 2;
|
|
6454
|
+
return new We(U, null, 0, [new k(Z, t), new k(X, t)], P.CODE_39, (/* @__PURE__ */ new Date()).getTime());
|
|
6450
6455
|
}, e.findAsteriskPattern = function(t, n) {
|
|
6451
6456
|
for (var i = t.getSize(), a = t.getNextSet(0), o = 0, s = a, l = !1, c = n.length, u = a; u < i; u++)
|
|
6452
6457
|
if (t.get(u) !== l)
|
|
@@ -6659,11 +6664,11 @@ var be = (
|
|
|
6659
6664
|
u = n.getNextSet(u);
|
|
6660
6665
|
} while (h !== "*");
|
|
6661
6666
|
this.decodeRowResult = this.decodeRowResult.substring(0, this.decodeRowResult.length - 1);
|
|
6662
|
-
var
|
|
6667
|
+
var A = 0;
|
|
6663
6668
|
try {
|
|
6664
6669
|
for (var w = Nn(f), S = w.next(); !S.done; S = w.next()) {
|
|
6665
6670
|
var C = S.value;
|
|
6666
|
-
|
|
6671
|
+
A += C;
|
|
6667
6672
|
}
|
|
6668
6673
|
} catch (z) {
|
|
6669
6674
|
s = { error: z };
|
|
@@ -6679,8 +6684,8 @@ var be = (
|
|
|
6679
6684
|
if (this.decodeRowResult.length < 2)
|
|
6680
6685
|
throw new I();
|
|
6681
6686
|
this.checkChecksums(this.decodeRowResult), this.decodeRowResult = this.decodeRowResult.substring(0, this.decodeRowResult.length - 2);
|
|
6682
|
-
var O = this.decodeExtended(this.decodeRowResult),
|
|
6683
|
-
return new
|
|
6687
|
+
var O = this.decodeExtended(this.decodeRowResult), T = (c[1] + c[0]) / 2, F = v + A / 2;
|
|
6688
|
+
return new We(O, null, 0, [new k(T, t), new k(F, t)], P.CODE_93, (/* @__PURE__ */ new Date()).getTime());
|
|
6684
6689
|
}, e.prototype.findAsteriskPattern = function(t) {
|
|
6685
6690
|
var n = t.getSize(), i = t.getNextSet(0);
|
|
6686
6691
|
this.counters.fill(0);
|
|
@@ -6900,7 +6905,7 @@ var be = (
|
|
|
6900
6905
|
}
|
|
6901
6906
|
if (!h && f > v && (h = !0), !h)
|
|
6902
6907
|
throw new M();
|
|
6903
|
-
var C = [new k(s[1], t), new k(l[0], t)],
|
|
6908
|
+
var C = [new k(s[1], t), new k(l[0], t)], A = new We(
|
|
6904
6909
|
u,
|
|
6905
6910
|
null,
|
|
6906
6911
|
// no natural byte representation for these barcodes
|
|
@@ -6909,7 +6914,7 @@ var be = (
|
|
|
6909
6914
|
P.ITF,
|
|
6910
6915
|
(/* @__PURE__ */ new Date()).getTime()
|
|
6911
6916
|
);
|
|
6912
|
-
return
|
|
6917
|
+
return A;
|
|
6913
6918
|
}, e.decodeMiddle = function(t, n, i, a) {
|
|
6914
6919
|
var o = new Int32Array(10), s = new Int32Array(5), l = new Int32Array(5);
|
|
6915
6920
|
for (o.fill(0), s.fill(0), l.fill(0); n < i; ) {
|
|
@@ -7124,7 +7129,7 @@ var be = (
|
|
|
7124
7129
|
var i = this.decodeRowStringBuffer, a = this.decodeMiddle(t, n, i), o = i.toString(), s = r.parseExtensionString(o), l = [
|
|
7125
7130
|
new k((n[0] + n[1]) / 2, e),
|
|
7126
7131
|
new k(a, e)
|
|
7127
|
-
], c = new
|
|
7132
|
+
], c = new We(o, null, 0, l, P.UPC_EAN_EXTENSION, (/* @__PURE__ */ new Date()).getTime());
|
|
7128
7133
|
return s != null && c.putAllMetadata(s), c;
|
|
7129
7134
|
}, r.prototype.decodeMiddle = function(e, t, n) {
|
|
7130
7135
|
var i, a, o = this.decodeMiddleCounters;
|
|
@@ -7218,7 +7223,7 @@ var be = (
|
|
|
7218
7223
|
var i = this.decodeRowStringBuffer, a = this.decodeMiddle(t, n, i), o = i.toString(), s = r.parseExtensionString(o), l = [
|
|
7219
7224
|
new k((n[0] + n[1]) / 2, e),
|
|
7220
7225
|
new k(a, e)
|
|
7221
|
-
], c = new
|
|
7226
|
+
], c = new We(o, null, 0, l, P.UPC_EAN_EXTENSION, (/* @__PURE__ */ new Date()).getTime());
|
|
7222
7227
|
return s != null && c.putAllMetadata(s), c;
|
|
7223
7228
|
}, r.prototype.decodeMiddle = function(e, t, n) {
|
|
7224
7229
|
var i, a, o = this.decodeMiddleCounters;
|
|
@@ -7322,10 +7327,10 @@ var be = (
|
|
|
7322
7327
|
throw new M();
|
|
7323
7328
|
if (!e.checkChecksum(y))
|
|
7324
7329
|
throw new Te();
|
|
7325
|
-
var m = (a[1] + a[0]) / 2, C = (f[1] + f[0]) / 2,
|
|
7330
|
+
var m = (a[1] + a[0]) / 2, C = (f[1] + f[0]) / 2, A = this.getBarcodeFormat(), w = [new k(m, t), new k(C, t)], S = new We(y, null, 0, w, A, (/* @__PURE__ */ new Date()).getTime()), O = 0;
|
|
7326
7331
|
try {
|
|
7327
|
-
var
|
|
7328
|
-
S.putMetadata(ke.UPC_EAN_EXTENSION,
|
|
7332
|
+
var T = ku.decodeRow(t, n, f[1]);
|
|
7333
|
+
S.putMetadata(ke.UPC_EAN_EXTENSION, T.getText()), S.putAllMetadata(T.getResultMetadata()), S.addResultPoints(T.getResultPoints()), O = T.getText().length;
|
|
7329
7334
|
} catch {
|
|
7330
7335
|
}
|
|
7331
7336
|
var F = i == null ? null : i.get(ve.ALLOWED_EAN_EXTENSIONS);
|
|
@@ -7339,7 +7344,7 @@ var be = (
|
|
|
7339
7344
|
if (!z)
|
|
7340
7345
|
throw new I();
|
|
7341
7346
|
}
|
|
7342
|
-
return
|
|
7347
|
+
return A === P.EAN_13 || P.UPC_A, S;
|
|
7343
7348
|
}, e.checkChecksum = function(t) {
|
|
7344
7349
|
return e.checkStandardUPCEANChecksum(t);
|
|
7345
7350
|
}, e.checkStandardUPCEANChecksum = function(t) {
|
|
@@ -7428,15 +7433,15 @@ var be = (
|
|
|
7428
7433
|
var v = Ae.decodeDigit(t, c, d, Ae.L_PATTERNS);
|
|
7429
7434
|
i += String.fromCharCode(48 + v);
|
|
7430
7435
|
try {
|
|
7431
|
-
for (var
|
|
7436
|
+
for (var A = (s = void 0, Wi(c)), w = A.next(); !w.done; w = A.next()) {
|
|
7432
7437
|
var m = w.value;
|
|
7433
7438
|
d += m;
|
|
7434
7439
|
}
|
|
7435
|
-
} catch (
|
|
7436
|
-
s = { error:
|
|
7440
|
+
} catch (T) {
|
|
7441
|
+
s = { error: T };
|
|
7437
7442
|
} finally {
|
|
7438
7443
|
try {
|
|
7439
|
-
w && !w.done && (l =
|
|
7444
|
+
w && !w.done && (l = A.return) && l.call(A);
|
|
7440
7445
|
} finally {
|
|
7441
7446
|
if (s) throw s.error;
|
|
7442
7447
|
}
|
|
@@ -7511,15 +7516,15 @@ var be = (
|
|
|
7511
7516
|
var h = Ae.decodeDigit(t, c, d, Ae.L_PATTERNS);
|
|
7512
7517
|
i += String.fromCharCode(48 + h);
|
|
7513
7518
|
try {
|
|
7514
|
-
for (var C = (s = void 0, $i(c)),
|
|
7515
|
-
var y =
|
|
7519
|
+
for (var C = (s = void 0, $i(c)), A = C.next(); !A.done; A = C.next()) {
|
|
7520
|
+
var y = A.value;
|
|
7516
7521
|
d += y;
|
|
7517
7522
|
}
|
|
7518
7523
|
} catch (O) {
|
|
7519
7524
|
s = { error: O };
|
|
7520
7525
|
} finally {
|
|
7521
7526
|
try {
|
|
7522
|
-
|
|
7527
|
+
A && !A.done && (l = C.return) && l.call(C);
|
|
7523
7528
|
} finally {
|
|
7524
7529
|
if (s) throw s.error;
|
|
7525
7530
|
}
|
|
@@ -7564,7 +7569,7 @@ var be = (
|
|
|
7564
7569
|
}, e.prototype.maybeReturnResult = function(t) {
|
|
7565
7570
|
var n = t.getText();
|
|
7566
7571
|
if (n.charAt(0) === "0") {
|
|
7567
|
-
var i = new
|
|
7572
|
+
var i = new We(n.substring(1), null, null, t.getResultPoints(), P.UPC_A);
|
|
7568
7573
|
return t.getResultMetadata() != null && i.putAllMetadata(t.getResultMetadata()), i;
|
|
7569
7574
|
} else
|
|
7570
7575
|
throw new I();
|
|
@@ -7720,7 +7725,7 @@ var be = (
|
|
|
7720
7725
|
try {
|
|
7721
7726
|
var u = c.decodeRow(t, n, i), d = u.getBarcodeFormat() === P.EAN_13 && u.getText().charAt(0) === "0", f = i == null ? null : i.get(ve.POSSIBLE_FORMATS), h = f == null || f.includes(P.UPC_A);
|
|
7722
7727
|
if (d && h) {
|
|
7723
|
-
var v = u.getRawBytes(), g = new
|
|
7728
|
+
var v = u.getRawBytes(), g = new We(u.getText().substring(1), v, v ? v.length : null, u.getResultPoints(), P.UPC_A);
|
|
7724
7729
|
return g.putAllMetadata(u.getResultMetadata()), g;
|
|
7725
7730
|
}
|
|
7726
7731
|
return u;
|
|
@@ -7806,7 +7811,7 @@ var be = (
|
|
|
7806
7811
|
var o = this.codaBarDecodeRow(a.row);
|
|
7807
7812
|
if (!o)
|
|
7808
7813
|
throw new I();
|
|
7809
|
-
return new
|
|
7814
|
+
return new We(o, null, 0, [new k(a.left, t), new k(a.right, t)], P.CODABAR, (/* @__PURE__ */ new Date()).getTime());
|
|
7810
7815
|
}, e.prototype.getValidRowData = function(t) {
|
|
7811
7816
|
var n = t.toArray(), i = n.indexOf(!0);
|
|
7812
7817
|
if (i === -1)
|
|
@@ -8226,11 +8231,11 @@ var be = (
|
|
|
8226
8231
|
}
|
|
8227
8232
|
if (e.length < 4)
|
|
8228
8233
|
throw new I();
|
|
8229
|
-
var
|
|
8234
|
+
var A = e.substring(0, 4);
|
|
8230
8235
|
try {
|
|
8231
8236
|
for (var w = Rr(r.FOUR_DIGIT_DATA_LENGTH), S = w.next(); !S.done; S = w.next()) {
|
|
8232
8237
|
var h = S.value;
|
|
8233
|
-
if (h[0] ===
|
|
8238
|
+
if (h[0] === A)
|
|
8234
8239
|
return h[1] === r.VARIABLE_LENGTH ? r.processVariableAI(4, h[2], e) : r.processFixedAI(4, h[1], e);
|
|
8235
8240
|
}
|
|
8236
8241
|
} catch (O) {
|
|
@@ -9217,8 +9222,8 @@ var Qi = (
|
|
|
9217
9222
|
for (var v = (o = void 0, _t(f.getPairs())), g = v.next(); !g.done; g = v.next()) {
|
|
9218
9223
|
var y = g.value, m = !1;
|
|
9219
9224
|
try {
|
|
9220
|
-
for (var C = (l = void 0, _t(t)),
|
|
9221
|
-
var w =
|
|
9225
|
+
for (var C = (l = void 0, _t(t)), A = C.next(); !A.done; A = C.next()) {
|
|
9226
|
+
var w = A.value;
|
|
9222
9227
|
if (Qi.equals(y, w)) {
|
|
9223
9228
|
m = !0;
|
|
9224
9229
|
break;
|
|
@@ -9228,7 +9233,7 @@ var Qi = (
|
|
|
9228
9233
|
l = { error: S };
|
|
9229
9234
|
} finally {
|
|
9230
9235
|
try {
|
|
9231
|
-
|
|
9236
|
+
A && !A.done && (c = C.return) && c.call(C);
|
|
9232
9237
|
} finally {
|
|
9233
9238
|
if (l) throw l.error;
|
|
9234
9239
|
}
|
|
@@ -9264,8 +9269,8 @@ var Qi = (
|
|
|
9264
9269
|
for (var v = (o = void 0, _t(t)), g = v.next(); !g.done; g = v.next()) {
|
|
9265
9270
|
var y = g.value, m = !1;
|
|
9266
9271
|
try {
|
|
9267
|
-
for (var C = (l = void 0, _t(f.getPairs())),
|
|
9268
|
-
var w =
|
|
9272
|
+
for (var C = (l = void 0, _t(f.getPairs())), A = C.next(); !A.done; A = C.next()) {
|
|
9273
|
+
var w = A.value;
|
|
9269
9274
|
if (y.equals(w)) {
|
|
9270
9275
|
m = !0;
|
|
9271
9276
|
break;
|
|
@@ -9275,7 +9280,7 @@ var Qi = (
|
|
|
9275
9280
|
l = { error: S };
|
|
9276
9281
|
} finally {
|
|
9277
9282
|
try {
|
|
9278
|
-
|
|
9283
|
+
A && !A.done && (c = C.return) && c.call(C);
|
|
9279
9284
|
} finally {
|
|
9280
9285
|
if (l) throw l.error;
|
|
9281
9286
|
}
|
|
@@ -9311,7 +9316,7 @@ var Qi = (
|
|
|
9311
9316
|
return this.rows;
|
|
9312
9317
|
}, e.constructResult = function(t) {
|
|
9313
9318
|
var n = Ku.buildBitArray(t), i = yd(n), a = i.parseInformation(), o = t[0].getFinderPattern().getResultPoints(), s = t[t.length - 1].getFinderPattern().getResultPoints(), l = [o[0], o[1], s[0], s[1]];
|
|
9314
|
-
return new
|
|
9319
|
+
return new We(a, null, null, l, P.RSS_EXPANDED, null);
|
|
9315
9320
|
}, e.prototype.checkChecksum = function() {
|
|
9316
9321
|
var t = this.pairs.get(0), n = t.getLeftChar(), i = t.getRightChar();
|
|
9317
9322
|
if (i === null)
|
|
@@ -9416,24 +9421,24 @@ var Qi = (
|
|
|
9416
9421
|
if (Math.abs(f - h) / h > 0.3)
|
|
9417
9422
|
throw new I();
|
|
9418
9423
|
for (var v = this.getOddCounts(), g = this.getEvenCounts(), y = this.getOddRoundingErrors(), m = this.getEvenRoundingErrors(), l = 0; l < o.length; l++) {
|
|
9419
|
-
var C = 1 * o[l] / f,
|
|
9420
|
-
if (
|
|
9424
|
+
var C = 1 * o[l] / f, A = C + 0.5;
|
|
9425
|
+
if (A < 1) {
|
|
9421
9426
|
if (C < 0.3)
|
|
9422
9427
|
throw new I();
|
|
9423
|
-
|
|
9424
|
-
} else if (
|
|
9428
|
+
A = 1;
|
|
9429
|
+
} else if (A > 8) {
|
|
9425
9430
|
if (C > 8.7)
|
|
9426
9431
|
throw new I();
|
|
9427
|
-
|
|
9432
|
+
A = 8;
|
|
9428
9433
|
}
|
|
9429
9434
|
var w = l / 2;
|
|
9430
|
-
(l & 1) === 0 ? (v[w] =
|
|
9435
|
+
(l & 1) === 0 ? (v[w] = A, y[w] = C - A) : (g[w] = A, m[w] = C - A);
|
|
9431
9436
|
}
|
|
9432
9437
|
this.adjustOddEvenCounts(d);
|
|
9433
|
-
for (var S = 4 * n.getValue() + (i ? 0 : 2) + (a ? 0 : 1) - 1, O = 0,
|
|
9438
|
+
for (var S = 4 * n.getValue() + (i ? 0 : 2) + (a ? 0 : 1) - 1, O = 0, T = 0, l = v.length - 1; l >= 0; l--) {
|
|
9434
9439
|
if (e.isNotA1left(n, i, a)) {
|
|
9435
9440
|
var F = e.WEIGHTS[S][2 * l];
|
|
9436
|
-
|
|
9441
|
+
T += v[l] * F;
|
|
9437
9442
|
}
|
|
9438
9443
|
O += v[l];
|
|
9439
9444
|
}
|
|
@@ -9442,10 +9447,10 @@ var Qi = (
|
|
|
9442
9447
|
var F = e.WEIGHTS[S][2 * l + 1];
|
|
9443
9448
|
z += g[l] * F;
|
|
9444
9449
|
}
|
|
9445
|
-
var U =
|
|
9450
|
+
var U = T + z;
|
|
9446
9451
|
if ((O & 1) !== 0 || O > 13 || O < 4)
|
|
9447
9452
|
throw new I();
|
|
9448
|
-
var
|
|
9453
|
+
var Z = (13 - O) / 2, X = e.SYMBOL_WIDEST[Z], K = 9 - X, Fe = Gt.getRSSvalue(v, X, !0), Ze = Gt.getRSSvalue(g, K, !1), ur = e.EVEN_TOTAL_SUBSET[Z], _n = e.GSUM[Z], An = Fe * ur + Ze + _n;
|
|
9449
9454
|
return new Wr(An, U);
|
|
9450
9455
|
}, e.isNotA1left = function(t, n, i) {
|
|
9451
9456
|
return !(t.getValue() === 0 && n && i);
|
|
@@ -9744,7 +9749,7 @@ var Qi = (
|
|
|
9744
9749
|
}
|
|
9745
9750
|
l = 10 - l % 10, l === 10 && (l = 0), o.append(l.toString());
|
|
9746
9751
|
var u = t.getFinderPattern().getResultPoints(), d = n.getFinderPattern().getResultPoints();
|
|
9747
|
-
return new
|
|
9752
|
+
return new We(o.toString(), null, 0, [u[0], u[1], d[0], d[1]], P.RSS_14, (/* @__PURE__ */ new Date()).getTime());
|
|
9748
9753
|
}, e.checkChecksum = function(t, n) {
|
|
9749
9754
|
var i = (t.getChecksumPortion() + 16 * n.getChecksumPortion()) % 79, a = 9 * t.getFinderPattern().getValue() + n.getFinderPattern().getValue();
|
|
9750
9755
|
return a > 72 && a--, a > 8 && a--, i === a;
|
|
@@ -9779,21 +9784,21 @@ var Qi = (
|
|
|
9779
9784
|
(s & 1) === 0 ? (f[C] = m, v[C] = y - m) : (h[C] = m, g[C] = y - m);
|
|
9780
9785
|
}
|
|
9781
9786
|
this.adjustOddEvenCounts(i, u);
|
|
9782
|
-
for (var
|
|
9783
|
-
w *= 9, w += f[s],
|
|
9787
|
+
for (var A = 0, w = 0, s = f.length - 1; s >= 0; s--)
|
|
9788
|
+
w *= 9, w += f[s], A += f[s];
|
|
9784
9789
|
for (var S = 0, O = 0, s = h.length - 1; s >= 0; s--)
|
|
9785
9790
|
S *= 9, S += h[s], O += h[s];
|
|
9786
|
-
var
|
|
9791
|
+
var T = w + 3 * S;
|
|
9787
9792
|
if (i) {
|
|
9788
|
-
if ((
|
|
9793
|
+
if ((A & 1) !== 0 || A > 12 || A < 4)
|
|
9789
9794
|
throw new I();
|
|
9790
|
-
var F = (12 -
|
|
9791
|
-
return new Wr(
|
|
9795
|
+
var F = (12 - A) / 2, z = e.OUTSIDE_ODD_WIDEST[F], U = 9 - z, Z = Gt.getRSSvalue(f, z, !1), X = Gt.getRSSvalue(h, U, !0), K = e.OUTSIDE_EVEN_TOTAL_SUBSET[F], Fe = e.OUTSIDE_GSUM[F];
|
|
9796
|
+
return new Wr(Z * K + X + Fe, T);
|
|
9792
9797
|
} else {
|
|
9793
9798
|
if ((O & 1) !== 0 || O > 10 || O < 4)
|
|
9794
9799
|
throw new I();
|
|
9795
|
-
var F = (10 - O) / 2, z = e.INSIDE_ODD_WIDEST[F], U = 9 - z,
|
|
9796
|
-
return new Wr(X *
|
|
9800
|
+
var F = (10 - O) / 2, z = e.INSIDE_ODD_WIDEST[F], U = 9 - z, Z = Gt.getRSSvalue(f, z, !0), X = Gt.getRSSvalue(h, U, !1), Ze = e.INSIDE_ODD_TOTAL_SUBSET[F], Fe = e.INSIDE_GSUM[F];
|
|
9801
|
+
return new Wr(X * Ze + Z + Fe, T);
|
|
9797
9802
|
}
|
|
9798
9803
|
}, e.prototype.findFinderPattern = function(t, n) {
|
|
9799
9804
|
var i = this.getDecodeFinderCounters();
|
|
@@ -10129,8 +10134,8 @@ var ea = function(r) {
|
|
|
10129
10134
|
for (var f = d * i, h = 0; h < s; ++h)
|
|
10130
10135
|
for (var v = h * a, g = 0; g < i; ++g)
|
|
10131
10136
|
for (var y = d * (i + 2) + 1 + g, m = f + g, C = 0; C < a; ++C) {
|
|
10132
|
-
var
|
|
10133
|
-
if (e.get(
|
|
10137
|
+
var A = h * (a + 2) + 1 + C;
|
|
10138
|
+
if (e.get(A, y)) {
|
|
10134
10139
|
var w = v + C;
|
|
10135
10140
|
u.set(w, m);
|
|
10136
10141
|
}
|
|
@@ -10173,8 +10178,8 @@ var ea = function(r) {
|
|
|
10173
10178
|
try {
|
|
10174
10179
|
for (var g = ta(c), y = g.next(); !y.done; y = g.next())
|
|
10175
10180
|
for (var f = y.value, m = 0; m < f.getCount(); m++) {
|
|
10176
|
-
var C = f.getDataCodewords(),
|
|
10177
|
-
h[v++] = new r(C, new Uint8Array(
|
|
10181
|
+
var C = f.getDataCodewords(), A = s.getECCodewords() + C;
|
|
10182
|
+
h[v++] = new r(C, new Uint8Array(A));
|
|
10178
10183
|
}
|
|
10179
10184
|
} catch (Fe) {
|
|
10180
10185
|
a = { error: Fe };
|
|
@@ -10185,17 +10190,17 @@ var ea = function(r) {
|
|
|
10185
10190
|
if (a) throw a.error;
|
|
10186
10191
|
}
|
|
10187
10192
|
}
|
|
10188
|
-
for (var w = h[0].codewords.length, S = w - s.getECCodewords(), O = S - 1,
|
|
10193
|
+
for (var w = h[0].codewords.length, S = w - s.getECCodewords(), O = S - 1, T = 0, m = 0; m < O; m++)
|
|
10189
10194
|
for (var F = 0; F < v; F++)
|
|
10190
|
-
h[F].codewords[m] = e[
|
|
10195
|
+
h[F].codewords[m] = e[T++];
|
|
10191
10196
|
for (var z = t.getVersionNumber() === 24, U = z ? 8 : v, F = 0; F < U; F++)
|
|
10192
|
-
h[F].codewords[S - 1] = e[
|
|
10193
|
-
for (var
|
|
10197
|
+
h[F].codewords[S - 1] = e[T++];
|
|
10198
|
+
for (var Z = h[0].codewords.length, m = S; m < Z; m++)
|
|
10194
10199
|
for (var F = 0; F < v; F++) {
|
|
10195
|
-
var X = z ? (F + 8) % v : F,
|
|
10196
|
-
h[X].codewords[
|
|
10200
|
+
var X = z ? (F + 8) % v : F, K = z && X > 7 ? m - 1 : m;
|
|
10201
|
+
h[X].codewords[K] = e[T++];
|
|
10197
10202
|
}
|
|
10198
|
-
if (
|
|
10203
|
+
if (T !== e.length)
|
|
10199
10204
|
throw new H();
|
|
10200
10205
|
return h;
|
|
10201
10206
|
}, r.prototype.getNumDataCodewords = function() {
|
|
@@ -10653,7 +10658,7 @@ var Td = (
|
|
|
10653
10658
|
/** @class */
|
|
10654
10659
|
function() {
|
|
10655
10660
|
function r() {
|
|
10656
|
-
this.rsDecoder = new tn(
|
|
10661
|
+
this.rsDecoder = new tn(Qe.DATA_MATRIX_FIELD_256);
|
|
10657
10662
|
}
|
|
10658
10663
|
return r.prototype.decode = function(e) {
|
|
10659
10664
|
var t, n, i = new Od(e), a = i.getVersion(), o = i.readCodewords(), s = Nd.getDataBlocks(o, a), l = 0;
|
|
@@ -10662,8 +10667,8 @@ var Td = (
|
|
|
10662
10667
|
var d = u.value;
|
|
10663
10668
|
l += d.getNumDataCodewords();
|
|
10664
10669
|
}
|
|
10665
|
-
} catch (
|
|
10666
|
-
t = { error:
|
|
10670
|
+
} catch (A) {
|
|
10671
|
+
t = { error: A };
|
|
10667
10672
|
} finally {
|
|
10668
10673
|
try {
|
|
10669
10674
|
u && !u.done && (n = c.return) && n.call(c);
|
|
@@ -10771,7 +10776,7 @@ var Td = (
|
|
|
10771
10776
|
var o = new Md(e.getBlackMatrix()).detect();
|
|
10772
10777
|
n = this.decoder.decode(o.getBits()), i = o.getPoints();
|
|
10773
10778
|
}
|
|
10774
|
-
var s = n.getRawBytes(), l = new
|
|
10779
|
+
var s = n.getRawBytes(), l = new We(n.getText(), s, 8 * s.length, i, P.DATA_MATRIX, de.currentTimeMillis()), c = n.getByteSegments();
|
|
10775
10780
|
c != null && l.putMetadata(ke.BYTE_SEGMENTS, c);
|
|
10776
10781
|
var u = n.getECLevel();
|
|
10777
10782
|
return u != null && l.putMetadata(ke.ERROR_CORRECTION_LEVEL, u), l;
|
|
@@ -11321,8 +11326,8 @@ var ra = (
|
|
|
11321
11326
|
var h = f.value;
|
|
11322
11327
|
c += h.getCount();
|
|
11323
11328
|
}
|
|
11324
|
-
} catch (
|
|
11325
|
-
i = { error:
|
|
11329
|
+
} catch (K) {
|
|
11330
|
+
i = { error: K };
|
|
11326
11331
|
} finally {
|
|
11327
11332
|
try {
|
|
11328
11333
|
f && !f.done && (a = d.return) && a.call(d);
|
|
@@ -11334,11 +11339,11 @@ var ra = (
|
|
|
11334
11339
|
try {
|
|
11335
11340
|
for (var y = na(u), m = y.next(); !m.done; m = y.next())
|
|
11336
11341
|
for (var h = m.value, C = 0; C < h.getCount(); C++) {
|
|
11337
|
-
var
|
|
11338
|
-
v[g++] = new r(
|
|
11342
|
+
var A = h.getDataCodewords(), w = l.getECCodewordsPerBlock() + A;
|
|
11343
|
+
v[g++] = new r(A, new Uint8Array(w));
|
|
11339
11344
|
}
|
|
11340
|
-
} catch (
|
|
11341
|
-
o = { error:
|
|
11345
|
+
} catch (K) {
|
|
11346
|
+
o = { error: K };
|
|
11342
11347
|
} finally {
|
|
11343
11348
|
try {
|
|
11344
11349
|
m && !m.done && (s = y.return) && s.call(y);
|
|
@@ -11347,8 +11352,8 @@ var ra = (
|
|
|
11347
11352
|
}
|
|
11348
11353
|
}
|
|
11349
11354
|
for (var S = v[0].codewords.length, O = v.length - 1; O >= 0; ) {
|
|
11350
|
-
var
|
|
11351
|
-
if (
|
|
11355
|
+
var T = v[O].codewords.length;
|
|
11356
|
+
if (T === S)
|
|
11352
11357
|
break;
|
|
11353
11358
|
O--;
|
|
11354
11359
|
}
|
|
@@ -11358,7 +11363,7 @@ var ra = (
|
|
|
11358
11363
|
v[U].codewords[C] = e[z++];
|
|
11359
11364
|
for (var U = O; U < g; U++)
|
|
11360
11365
|
v[U].codewords[F] = e[z++];
|
|
11361
|
-
for (var
|
|
11366
|
+
for (var Z = v[0].codewords.length, C = F; C < Z; C++)
|
|
11362
11367
|
for (var U = 0; U < g; U++) {
|
|
11363
11368
|
var X = U < O ? C : C + 1;
|
|
11364
11369
|
v[U].codewords[X] = e[z++];
|
|
@@ -11591,7 +11596,7 @@ var he = (
|
|
|
11591
11596
|
/** @class */
|
|
11592
11597
|
function() {
|
|
11593
11598
|
function r() {
|
|
11594
|
-
this.rsDecoder = new tn(
|
|
11599
|
+
this.rsDecoder = new tn(Qe.QR_CODE_FIELD_256);
|
|
11595
11600
|
}
|
|
11596
11601
|
return r.prototype.decodeBooleanArray = function(e, t) {
|
|
11597
11602
|
return this.decodeBitMatrix(vt.parseFromBooleanArray(e), t);
|
|
@@ -11628,10 +11633,10 @@ var he = (
|
|
|
11628
11633
|
var g = new Uint8Array(d), y = 0;
|
|
11629
11634
|
try {
|
|
11630
11635
|
for (var m = ia(u), C = m.next(); !C.done; C = m.next()) {
|
|
11631
|
-
var v = C.value,
|
|
11632
|
-
this.correctErrors(
|
|
11636
|
+
var v = C.value, A = v.getCodewords(), w = v.getNumDataCodewords();
|
|
11637
|
+
this.correctErrors(A, w);
|
|
11633
11638
|
for (var S = 0; S < w; S++)
|
|
11634
|
-
g[y++] =
|
|
11639
|
+
g[y++] = A[S];
|
|
11635
11640
|
}
|
|
11636
11641
|
} catch (O) {
|
|
11637
11642
|
a = { error: O };
|
|
@@ -12126,8 +12131,8 @@ var he = (
|
|
|
12126
12131
|
*/
|
|
12127
12132
|
// FurthestFromAverageComparator implements Comparator<FinderPattern>
|
|
12128
12133
|
function(S, O) {
|
|
12129
|
-
var
|
|
12130
|
-
return
|
|
12134
|
+
var T = Math.abs(O.getEstimatedModuleSize() - s), F = Math.abs(S.getEstimatedModuleSize() - s);
|
|
12135
|
+
return T < F ? -1 : T > F ? 1 : 0;
|
|
12131
12136
|
}
|
|
12132
12137
|
);
|
|
12133
12138
|
for (var g = Math.max(0.2 * s, v), y = 0; y < o.length && o.length > 3; y++) {
|
|
@@ -12138,15 +12143,15 @@ var he = (
|
|
|
12138
12143
|
if (o.length > 3) {
|
|
12139
12144
|
var l = 0;
|
|
12140
12145
|
try {
|
|
12141
|
-
for (var C = dr(o),
|
|
12142
|
-
var w =
|
|
12146
|
+
for (var C = dr(o), A = C.next(); !A.done; A = C.next()) {
|
|
12147
|
+
var w = A.value;
|
|
12143
12148
|
l += w.getEstimatedModuleSize();
|
|
12144
12149
|
}
|
|
12145
12150
|
} catch (O) {
|
|
12146
12151
|
n = { error: O };
|
|
12147
12152
|
} finally {
|
|
12148
12153
|
try {
|
|
12149
|
-
|
|
12154
|
+
A && !A.done && (i = C.return) && i.call(C);
|
|
12150
12155
|
} finally {
|
|
12151
12156
|
if (n) throw n.error;
|
|
12152
12157
|
}
|
|
@@ -12156,12 +12161,12 @@ var he = (
|
|
|
12156
12161
|
* <p>Orders by {@link FinderPattern#getCount()}, descending.</p>
|
|
12157
12162
|
*/
|
|
12158
12163
|
// CenterComparator implements Comparator<FinderPattern>
|
|
12159
|
-
function(O,
|
|
12160
|
-
if (
|
|
12161
|
-
var F = Math.abs(
|
|
12164
|
+
function(O, T) {
|
|
12165
|
+
if (T.getCount() === O.getCount()) {
|
|
12166
|
+
var F = Math.abs(T.getEstimatedModuleSize() - s), z = Math.abs(O.getEstimatedModuleSize() - s);
|
|
12162
12167
|
return F < z ? 1 : F > z ? -1 : 0;
|
|
12163
12168
|
} else
|
|
12164
|
-
return
|
|
12169
|
+
return T.getCount() - O.getCount();
|
|
12165
12170
|
}
|
|
12166
12171
|
), o.splice(3);
|
|
12167
12172
|
}
|
|
@@ -12205,9 +12210,9 @@ var he = (
|
|
|
12205
12210
|
try {
|
|
12206
12211
|
c = this.findAlignmentInRegion(a, h, v, g);
|
|
12207
12212
|
break;
|
|
12208
|
-
} catch (
|
|
12209
|
-
if (!(
|
|
12210
|
-
throw
|
|
12213
|
+
} catch (A) {
|
|
12214
|
+
if (!(A instanceof I))
|
|
12215
|
+
throw A;
|
|
12211
12216
|
}
|
|
12212
12217
|
var y = r.createTransform(t, n, i, c, o), m = r.sampleGrid(this.image, y, o), C;
|
|
12213
12218
|
return c === null ? C = [i, t, n] : C = [i, t, n, c], new fi(m, C);
|
|
@@ -12320,7 +12325,7 @@ var he = (
|
|
|
12320
12325
|
n = this.decoder.decodeBitMatrix(o.getBits(), t), i = o.getPoints();
|
|
12321
12326
|
}
|
|
12322
12327
|
n.getOther() instanceof Bo && n.getOther().applyMirroredCorrection(i);
|
|
12323
|
-
var s = new
|
|
12328
|
+
var s = new We(n.getText(), n.getRawBytes(), void 0, i, P.QR_CODE, void 0), l = n.getByteSegments();
|
|
12324
12329
|
l !== null && s.putMetadata(ke.BYTE_SEGMENTS, l);
|
|
12325
12330
|
var c = n.getECLevel();
|
|
12326
12331
|
return c !== null && s.putMetadata(ke.ERROR_CORRECTION_LEVEL, c), n.hasStructuredAppend() && (s.putMetadata(ke.STRUCTURED_APPEND_SEQUENCE, n.getStructuredAppendSequenceNumber()), s.putMetadata(ke.STRUCTURED_APPEND_PARITY, n.getStructuredAppendParity())), s;
|
|
@@ -12387,7 +12392,7 @@ var he = (
|
|
|
12387
12392
|
}
|
|
12388
12393
|
};
|
|
12389
12394
|
throw new TypeError(e ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
12390
|
-
},
|
|
12395
|
+
}, Q = (
|
|
12391
12396
|
/** @class */
|
|
12392
12397
|
function() {
|
|
12393
12398
|
function r() {
|
|
@@ -18360,7 +18365,7 @@ var he = (
|
|
|
18360
18365
|
return this.zero;
|
|
18361
18366
|
var i = new Int32Array(t + 1);
|
|
18362
18367
|
return i[0] = n, new Dt(this, i);
|
|
18363
|
-
}, e.PDF417_GF = new e(
|
|
18368
|
+
}, e.PDF417_GF = new e(Q.NUMBER_OF_CODEWORDS, 3), e;
|
|
18364
18369
|
}(nf)
|
|
18365
18370
|
), sf = function(r) {
|
|
18366
18371
|
var e = typeof Symbol == "function" && Symbol.iterator, t = e && r[e], n = 0;
|
|
@@ -18400,11 +18405,11 @@ var he = (
|
|
|
18400
18405
|
if (i) throw i.error;
|
|
18401
18406
|
}
|
|
18402
18407
|
}
|
|
18403
|
-
for (var m = new Dt(this.field, s), C = this.runEuclideanAlgorithm(this.field.buildMonomial(t, 1), m, t),
|
|
18404
|
-
var
|
|
18405
|
-
if (
|
|
18408
|
+
for (var m = new Dt(this.field, s), C = this.runEuclideanAlgorithm(this.field.buildMonomial(t, 1), m, t), A = C[0], w = C[1], S = this.findErrorLocations(A), O = this.findErrorMagnitudes(w, A, S), c = 0; c < S.length; c++) {
|
|
18409
|
+
var T = e.length - 1 - this.field.log(S[c]);
|
|
18410
|
+
if (T < 0)
|
|
18406
18411
|
throw Te.getChecksumInstance();
|
|
18407
|
-
e[
|
|
18412
|
+
e[T] = this.field.subtract(e[T], O[c]);
|
|
18408
18413
|
}
|
|
18409
18414
|
return S.length;
|
|
18410
18415
|
}, r.prototype.runEuclideanAlgorithm = function(e, t, n) {
|
|
@@ -18426,8 +18431,8 @@ var he = (
|
|
|
18426
18431
|
var y = l.getCoefficient(0);
|
|
18427
18432
|
if (y === 0)
|
|
18428
18433
|
throw Te.getChecksumInstance();
|
|
18429
|
-
var m = this.field.inverse(y), C = l.multiply(m),
|
|
18430
|
-
return [C,
|
|
18434
|
+
var m = this.field.inverse(y), C = l.multiply(m), A = o.multiply(m);
|
|
18435
|
+
return [C, A];
|
|
18431
18436
|
}, r.prototype.findErrorLocations = function(e) {
|
|
18432
18437
|
for (var t = e.getDegree(), n = new Int32Array(t), i = 0, a = 1; a < this.field.getSize() && i < t; a++)
|
|
18433
18438
|
e.evaluateAt(a) === 0 && (n[i] = this.field.inverse(a), i++);
|
|
@@ -18682,7 +18687,7 @@ var he = (
|
|
|
18682
18687
|
if (e) throw e.error;
|
|
18683
18688
|
}
|
|
18684
18689
|
}
|
|
18685
|
-
return
|
|
18690
|
+
return Q.toIntArray(i);
|
|
18686
18691
|
}, r.prototype.getConfidence = function(e) {
|
|
18687
18692
|
return this.values.get(e);
|
|
18688
18693
|
}, r;
|
|
@@ -18819,7 +18824,7 @@ var he = (
|
|
|
18819
18824
|
if (t) throw t.error;
|
|
18820
18825
|
}
|
|
18821
18826
|
}
|
|
18822
|
-
if (a.getValue().length === 0 || o.getValue().length === 0 || s.getValue().length === 0 || l.getValue().length === 0 || a.getValue()[0] < 1 || o.getValue()[0] + s.getValue()[0] <
|
|
18827
|
+
if (a.getValue().length === 0 || o.getValue().length === 0 || s.getValue().length === 0 || l.getValue().length === 0 || a.getValue()[0] < 1 || o.getValue()[0] + s.getValue()[0] < Q.MIN_ROWS_IN_BARCODE || o.getValue()[0] + s.getValue()[0] > Q.MAX_ROWS_IN_BARCODE)
|
|
18823
18828
|
return null;
|
|
18824
18829
|
var v = new cf(a.getValue()[0], o.getValue()[0], s.getValue()[0], l.getValue()[0]);
|
|
18825
18830
|
return this.removeIncorrectCodewords(i, v), v;
|
|
@@ -18869,7 +18874,7 @@ var he = (
|
|
|
18869
18874
|
}
|
|
18870
18875
|
return r.prototype.getDetectionResultColumns = function() {
|
|
18871
18876
|
this.adjustIndicatorColumnRowNumbers(this.detectionResultColumns[0]), this.adjustIndicatorColumnRowNumbers(this.detectionResultColumns[this.barcodeColumnCount + 1]);
|
|
18872
|
-
var e =
|
|
18877
|
+
var e = Q.MAX_CODEWORDS_IN_BARCODE, t;
|
|
18873
18878
|
do
|
|
18874
18879
|
t = e, e = this.adjustRowNumbersAndGetCount();
|
|
18875
18880
|
while (e > 0 && e < t);
|
|
@@ -19016,25 +19021,25 @@ var he = (
|
|
|
19016
19021
|
function r() {
|
|
19017
19022
|
}
|
|
19018
19023
|
return r.initialize = function() {
|
|
19019
|
-
for (var e = 0; e <
|
|
19020
|
-
for (var t =
|
|
19024
|
+
for (var e = 0; e < Q.SYMBOL_TABLE.length; e++)
|
|
19025
|
+
for (var t = Q.SYMBOL_TABLE[e], n = t & 1, i = 0; i < Q.BARS_IN_MODULE; i++) {
|
|
19021
19026
|
for (var a = 0; (t & 1) === n; )
|
|
19022
19027
|
a += 1, t >>= 1;
|
|
19023
|
-
n = t & 1, r.RATIOS_TABLE[e] || (r.RATIOS_TABLE[e] = new Array(
|
|
19028
|
+
n = t & 1, r.RATIOS_TABLE[e] || (r.RATIOS_TABLE[e] = new Array(Q.BARS_IN_MODULE)), r.RATIOS_TABLE[e][Q.BARS_IN_MODULE - i - 1] = Math.fround(a / Q.MODULES_IN_CODEWORD);
|
|
19024
19029
|
}
|
|
19025
19030
|
this.bSymbolTableReady = !0;
|
|
19026
19031
|
}, r.getDecodedValue = function(e) {
|
|
19027
19032
|
var t = r.getDecodedCodewordValue(r.sampleBitCounts(e));
|
|
19028
19033
|
return t !== -1 ? t : r.getClosestDecodedValue(e);
|
|
19029
19034
|
}, r.sampleBitCounts = function(e) {
|
|
19030
|
-
for (var t = ee.sum(e), n = new Int32Array(
|
|
19031
|
-
var s = t / (2 *
|
|
19035
|
+
for (var t = ee.sum(e), n = new Int32Array(Q.BARS_IN_MODULE), i = 0, a = 0, o = 0; o < Q.MODULES_IN_CODEWORD; o++) {
|
|
19036
|
+
var s = t / (2 * Q.MODULES_IN_CODEWORD) + o * t / Q.MODULES_IN_CODEWORD;
|
|
19032
19037
|
a + e[i] <= s && (a += e[i], i++), n[i]++;
|
|
19033
19038
|
}
|
|
19034
19039
|
return n;
|
|
19035
19040
|
}, r.getDecodedCodewordValue = function(e) {
|
|
19036
19041
|
var t = r.getBitValue(e);
|
|
19037
|
-
return
|
|
19042
|
+
return Q.getCodeword(t) === -1 ? -1 : t;
|
|
19038
19043
|
}, r.getBitValue = function(e) {
|
|
19039
19044
|
for (var t = (
|
|
19040
19045
|
/*long*/
|
|
@@ -19044,23 +19049,23 @@ var he = (
|
|
|
19044
19049
|
t = t << 1 | (n % 2 === 0 ? 1 : 0);
|
|
19045
19050
|
return Math.trunc(t);
|
|
19046
19051
|
}, r.getClosestDecodedValue = function(e) {
|
|
19047
|
-
var t = ee.sum(e), n = new Array(
|
|
19052
|
+
var t = ee.sum(e), n = new Array(Q.BARS_IN_MODULE);
|
|
19048
19053
|
if (t > 1)
|
|
19049
19054
|
for (var i = 0; i < n.length; i++)
|
|
19050
19055
|
n[i] = Math.fround(e[i] / t);
|
|
19051
19056
|
var a = Gn.MAX_VALUE, o = -1;
|
|
19052
19057
|
this.bSymbolTableReady || r.initialize();
|
|
19053
19058
|
for (var s = 0; s < r.RATIOS_TABLE.length; s++) {
|
|
19054
|
-
for (var l = 0, c = r.RATIOS_TABLE[s], u = 0; u <
|
|
19059
|
+
for (var l = 0, c = r.RATIOS_TABLE[s], u = 0; u < Q.BARS_IN_MODULE; u++) {
|
|
19055
19060
|
var d = Math.fround(c[u] - n[u]);
|
|
19056
19061
|
if (l += Math.fround(d * d), l >= a)
|
|
19057
19062
|
break;
|
|
19058
19063
|
}
|
|
19059
|
-
l < a && (a = l, o =
|
|
19064
|
+
l < a && (a = l, o = Q.SYMBOL_TABLE[s]);
|
|
19060
19065
|
}
|
|
19061
19066
|
return o;
|
|
19062
|
-
}, r.bSymbolTableReady = !1, r.RATIOS_TABLE = new Array(
|
|
19063
|
-
return new Array(
|
|
19067
|
+
}, r.bSymbolTableReady = !1, r.RATIOS_TABLE = new Array(Q.SYMBOL_TABLE.length).map(function(e) {
|
|
19068
|
+
return new Array(Q.BARS_IN_MODULE);
|
|
19064
19069
|
}), r;
|
|
19065
19070
|
}()
|
|
19066
19071
|
), yf = (
|
|
@@ -19703,14 +19708,14 @@ var If = (
|
|
|
19703
19708
|
void 0) {
|
|
19704
19709
|
var C = void 0;
|
|
19705
19710
|
m === 0 || m === v ? C = new aa(l, m === 0) : C = new ko(l), d.setDetectionResultColumn(m, C);
|
|
19706
|
-
for (var
|
|
19707
|
-
if (
|
|
19711
|
+
for (var A = -1, w = A, S = l.getMinY(); S <= l.getMaxY(); S++) {
|
|
19712
|
+
if (A = r.getStartColumn(d, m, S, g), A < 0 || A > l.getMaxX()) {
|
|
19708
19713
|
if (w === -1)
|
|
19709
19714
|
continue;
|
|
19710
|
-
|
|
19715
|
+
A = w;
|
|
19711
19716
|
}
|
|
19712
|
-
var O = r.detectCodeword(e, l.getMinX(), l.getMaxX(), g,
|
|
19713
|
-
O != null && (C.setCodeword(S, O), w =
|
|
19717
|
+
var O = r.detectCodeword(e, l.getMinX(), l.getMaxX(), g, A, S, o, s);
|
|
19718
|
+
O != null && (C.setCodeword(S, O), w = A, o = Math.min(o, O.getWidth()), s = Math.max(s, O.getWidth()));
|
|
19714
19719
|
}
|
|
19715
19720
|
}
|
|
19716
19721
|
}
|
|
@@ -19786,7 +19791,7 @@ var If = (
|
|
|
19786
19791
|
}, r.adjustCodewordCount = function(e, t) {
|
|
19787
19792
|
var n = t[0][1], i = n.getValue(), a = e.getBarcodeColumnCount() * e.getBarcodeRowCount() - r.getNumberOfECCodeWords(e.getBarcodeECLevel());
|
|
19788
19793
|
if (i.length === 0) {
|
|
19789
|
-
if (a < 1 || a >
|
|
19794
|
+
if (a < 1 || a > Q.MAX_CODEWORDS_IN_BARCODE)
|
|
19790
19795
|
throw I.getNotFoundInstance();
|
|
19791
19796
|
n.setValue(a);
|
|
19792
19797
|
} else i[0] !== a && n.setValue(a);
|
|
@@ -19806,7 +19811,7 @@ var If = (
|
|
|
19806
19811
|
}
|
|
19807
19812
|
for (var d = new Array(a.length), f = 0; f < d.length; f++)
|
|
19808
19813
|
d[f] = a[f];
|
|
19809
|
-
return r.createDecoderResultFromAmbiguousValues(e.getBarcodeECLevel(), i,
|
|
19814
|
+
return r.createDecoderResultFromAmbiguousValues(e.getBarcodeECLevel(), i, Q.toIntArray(n), Q.toIntArray(o), d);
|
|
19810
19815
|
}, r.createDecoderResultFromAmbiguousValues = function(e, t, n, i, a) {
|
|
19811
19816
|
for (var o = new Int32Array(i.length), s = 100; s-- > 0; ) {
|
|
19812
19817
|
for (var l = 0; l < o.length; l++)
|
|
@@ -19919,7 +19924,7 @@ var If = (
|
|
|
19919
19924
|
}
|
|
19920
19925
|
if (!r.checkCodewordSkew(d, s, l))
|
|
19921
19926
|
return null;
|
|
19922
|
-
var v = xf.getDecodedValue(c), g =
|
|
19927
|
+
var v = xf.getDecodedValue(c), g = Q.getCodeword(v);
|
|
19923
19928
|
return g === -1 ? null : new gf(a, u, r.getCodewordBucketNumber(v), g);
|
|
19924
19929
|
}, r.getModuleBitCount = function(e, t, n, i, a, o) {
|
|
19925
19930
|
for (var s = a, l = new Int32Array(8), c = 0, u = i ? 1 : -1, d = i; (i ? s < n : s >= t) && c < l.length; )
|
|
@@ -20014,7 +20019,7 @@ var If = (
|
|
|
20014
20019
|
var i, a, o = new Array(), s = tf.detectMultiple(e, t, n);
|
|
20015
20020
|
try {
|
|
20016
20021
|
for (var l = Nf(s.getPoints()), c = l.next(); !c.done; c = l.next()) {
|
|
20017
|
-
var u = c.value, d = Of.decode(s.getBits(), u[4], u[5], u[6], u[7], r.getMinCodewordWidth(u), r.getMaxCodewordWidth(u)), f = new
|
|
20022
|
+
var u = c.value, d = Of.decode(s.getBits(), u[4], u[5], u[6], u[7], r.getMinCodewordWidth(u), r.getMaxCodewordWidth(u)), f = new We(d.getText(), d.getRawBytes(), void 0, u, P.PDF_417);
|
|
20018
20023
|
f.putMetadata(ke.ERROR_CORRECTION_LEVEL, d.getECLevel());
|
|
20019
20024
|
var h = d.getOther();
|
|
20020
20025
|
h != null && f.putMetadata(ke.PDF417_EXTRA_METADATA, h), o.push(f);
|
|
@@ -20036,9 +20041,9 @@ var If = (
|
|
|
20036
20041
|
}, r.getMinWidth = function(e, t) {
|
|
20037
20042
|
return e == null || t == null ? j.MAX_VALUE : Math.trunc(Math.abs(e.getX() - t.getX()));
|
|
20038
20043
|
}, r.getMaxCodewordWidth = function(e) {
|
|
20039
|
-
return Math.floor(Math.max(Math.max(r.getMaxWidth(e[0], e[4]), r.getMaxWidth(e[6], e[2]) *
|
|
20044
|
+
return Math.floor(Math.max(Math.max(r.getMaxWidth(e[0], e[4]), r.getMaxWidth(e[6], e[2]) * Q.MODULES_IN_CODEWORD / Q.MODULES_IN_STOP_PATTERN), Math.max(r.getMaxWidth(e[1], e[5]), r.getMaxWidth(e[7], e[3]) * Q.MODULES_IN_CODEWORD / Q.MODULES_IN_STOP_PATTERN)));
|
|
20040
20045
|
}, r.getMinCodewordWidth = function(e) {
|
|
20041
|
-
return Math.floor(Math.min(Math.min(r.getMinWidth(e[0], e[4]), r.getMinWidth(e[6], e[2]) *
|
|
20046
|
+
return Math.floor(Math.min(Math.min(r.getMinWidth(e[0], e[4]), r.getMinWidth(e[6], e[2]) * Q.MODULES_IN_CODEWORD / Q.MODULES_IN_STOP_PATTERN), Math.min(r.getMinWidth(e[1], e[5]), r.getMinWidth(e[7], e[3]) * Q.MODULES_IN_CODEWORD / Q.MODULES_IN_STOP_PATTERN)));
|
|
20042
20047
|
}, r.prototype.reset = function() {
|
|
20043
20048
|
}, r;
|
|
20044
20049
|
}()
|
|
@@ -20724,7 +20729,7 @@ var zo = (
|
|
|
20724
20729
|
this.terminateBits(y, h);
|
|
20725
20730
|
var m = this.interleaveWithECBytes(h, u.getTotalCodewords(), y, g.getNumBlocks()), C = new Qn();
|
|
20726
20731
|
C.setECLevel(t), C.setMode(o), C.setVersion(u);
|
|
20727
|
-
var
|
|
20732
|
+
var A = u.getDimensionForVersion(), w = new Pf(A, A), S = this.chooseMaskPattern(m, t, u, w);
|
|
20728
20733
|
return C.setMaskPattern(S), ca.buildMatrix(m, t, u, S, w), C.setMatrix(w), C;
|
|
20729
20734
|
}, r.recommendVersion = function(e, t, n, i) {
|
|
20730
20735
|
var a = this.calculateBitsNeeded(t, n, i, Rt.getVersionForNumber(1)), o = this.chooseVersion(a, e), s = this.calculateBitsNeeded(t, n, i, o);
|
|
@@ -20818,11 +20823,11 @@ var zo = (
|
|
|
20818
20823
|
}
|
|
20819
20824
|
if (n !== c)
|
|
20820
20825
|
throw new fe("Data bytes does not match offset");
|
|
20821
|
-
for (var
|
|
20826
|
+
for (var A = new De(), h = 0; h < u; ++h)
|
|
20822
20827
|
try {
|
|
20823
20828
|
for (var w = (a = void 0, ua(f)), S = w.next(); !S.done; S = w.next()) {
|
|
20824
20829
|
var O = S.value, m = O.getDataBytes();
|
|
20825
|
-
h < m.length &&
|
|
20830
|
+
h < m.length && A.appendBits(m[h], 8);
|
|
20826
20831
|
}
|
|
20827
20832
|
} catch (U) {
|
|
20828
20833
|
a = { error: U };
|
|
@@ -20835,26 +20840,26 @@ var zo = (
|
|
|
20835
20840
|
}
|
|
20836
20841
|
for (var h = 0; h < d; ++h)
|
|
20837
20842
|
try {
|
|
20838
|
-
for (var
|
|
20843
|
+
for (var T = (s = void 0, ua(f)), F = T.next(); !F.done; F = T.next()) {
|
|
20839
20844
|
var O = F.value, C = O.getErrorCorrectionBytes();
|
|
20840
|
-
h < C.length &&
|
|
20845
|
+
h < C.length && A.appendBits(C[h], 8);
|
|
20841
20846
|
}
|
|
20842
20847
|
} catch (U) {
|
|
20843
20848
|
s = { error: U };
|
|
20844
20849
|
} finally {
|
|
20845
20850
|
try {
|
|
20846
|
-
F && !F.done && (l =
|
|
20851
|
+
F && !F.done && (l = T.return) && l.call(T);
|
|
20847
20852
|
} finally {
|
|
20848
20853
|
if (s) throw s.error;
|
|
20849
20854
|
}
|
|
20850
20855
|
}
|
|
20851
|
-
if (t !==
|
|
20852
|
-
throw new fe("Interleaving error: " + t + " and " +
|
|
20853
|
-
return
|
|
20856
|
+
if (t !== A.getSizeInBytes())
|
|
20857
|
+
throw new fe("Interleaving error: " + t + " and " + A.getSizeInBytes() + " differ.");
|
|
20858
|
+
return A;
|
|
20854
20859
|
}, r.generateECBytes = function(e, t) {
|
|
20855
20860
|
for (var n = e.length, i = new Int32Array(n + t), a = 0; a < n; a++)
|
|
20856
20861
|
i[a] = e[a] & 255;
|
|
20857
|
-
new zo(
|
|
20862
|
+
new zo(Qe.QR_CODE_FIELD_256).encode(i, t);
|
|
20858
20863
|
for (var o = new Uint8Array(t), a = 0; a < t; a++)
|
|
20859
20864
|
o[a] = /*(byte) */
|
|
20860
20865
|
i[n + a];
|
|
@@ -21216,7 +21221,7 @@ var da;
|
|
|
21216
21221
|
(function(r) {
|
|
21217
21222
|
r[r.FORCE_NONE = 0] = "FORCE_NONE", r[r.FORCE_SQUARE = 1] = "FORCE_SQUARE", r[r.FORCE_RECTANGLE = 2] = "FORCE_RECTANGLE";
|
|
21218
21223
|
})(da || (da = {}));
|
|
21219
|
-
var fa = 129, Uo = 230, Wf = 231, $f = 235, jf = 236, Yf = 237, Zf = 238, Kf = 239, Qf = 240, Mn = 254, Jf = 254, ha = "[)>05", pa = "[)>06", va = "", oe = 0, Be = 1,
|
|
21224
|
+
var fa = 129, Uo = 230, Wf = 231, $f = 235, jf = 236, Yf = 237, Zf = 238, Kf = 239, Qf = 240, Mn = 254, Jf = 254, ha = "[)>05", pa = "[)>06", va = "", oe = 0, Be = 1, Ye = 2, _e = 3, Oe = 4, Ge = 5, e1 = (
|
|
21220
21225
|
/** @class */
|
|
21221
21226
|
function() {
|
|
21222
21227
|
function r() {
|
|
@@ -21231,8 +21236,8 @@ var fa = 129, Uo = 230, Wf = 231, $f = 235, jf = 236, Yf = 237, Zf = 238, Kf = 2
|
|
|
21231
21236
|
var n = e.getCurrentChar(), i = ut.lookAheadTest(e.getMessage(), e.pos, this.getEncodingMode());
|
|
21232
21237
|
if (i !== this.getEncodingMode())
|
|
21233
21238
|
switch (i) {
|
|
21234
|
-
case
|
|
21235
|
-
e.writeCodeword(Wf), e.signalEncoderChange(
|
|
21239
|
+
case Ge:
|
|
21240
|
+
e.writeCodeword(Wf), e.signalEncoderChange(Ge);
|
|
21236
21241
|
return;
|
|
21237
21242
|
case Be:
|
|
21238
21243
|
e.writeCodeword(Uo), e.signalEncoderChange(Be);
|
|
@@ -21240,8 +21245,8 @@ var fa = 129, Uo = 230, Wf = 231, $f = 235, jf = 236, Yf = 237, Zf = 238, Kf = 2
|
|
|
21240
21245
|
case _e:
|
|
21241
21246
|
e.writeCodeword(Zf), e.signalEncoderChange(_e);
|
|
21242
21247
|
break;
|
|
21243
|
-
case
|
|
21244
|
-
e.writeCodeword(Kf), e.signalEncoderChange(
|
|
21248
|
+
case Ye:
|
|
21249
|
+
e.writeCodeword(Kf), e.signalEncoderChange(Ye);
|
|
21245
21250
|
break;
|
|
21246
21251
|
case Oe:
|
|
21247
21252
|
e.writeCodeword(Qf), e.signalEncoderChange(Oe);
|
|
@@ -21265,7 +21270,7 @@ var fa = 129, Uo = 230, Wf = 231, $f = 235, jf = 236, Yf = 237, Zf = 238, Kf = 2
|
|
|
21265
21270
|
function r() {
|
|
21266
21271
|
}
|
|
21267
21272
|
return r.prototype.getEncodingMode = function() {
|
|
21268
|
-
return
|
|
21273
|
+
return Ge;
|
|
21269
21274
|
}, r.prototype.encode = function(e) {
|
|
21270
21275
|
var t = new $();
|
|
21271
21276
|
for (t.append(0); e.hasMoreCharacters(); ) {
|
|
@@ -21739,7 +21744,7 @@ var fa = 129, Uo = 230, Wf = 231, $f = 235, jf = 236, Yf = 237, Zf = 238, Kf = 2
|
|
|
21739
21744
|
return r !== null && r.apply(this, arguments) || this;
|
|
21740
21745
|
}
|
|
21741
21746
|
return e.prototype.getEncodingMode = function() {
|
|
21742
|
-
return
|
|
21747
|
+
return Ye;
|
|
21743
21748
|
}, e.prototype.encodeChar = function(t, n) {
|
|
21744
21749
|
if (t === 32)
|
|
21745
21750
|
return n.append(3), 1;
|
|
@@ -21791,7 +21796,7 @@ var fa = 129, Uo = 230, Wf = 231, $f = 235, jf = 236, Yf = 237, Zf = 238, Kf = 2
|
|
|
21791
21796
|
var u = l.getCodewordCount();
|
|
21792
21797
|
l.updateSymbolInfo();
|
|
21793
21798
|
var d = l.getSymbolInfo().getDataCapacity();
|
|
21794
|
-
u < d && c !== oe && c !==
|
|
21799
|
+
u < d && c !== oe && c !== Ge && c !== Oe && l.writeCodeword("þ");
|
|
21795
21800
|
var f = l.getCodewords();
|
|
21796
21801
|
for (f.length() < d && f.append(fa); f.length() < d; )
|
|
21797
21802
|
f.append(this.randomize253State(f.length() + 1));
|
|
@@ -21820,30 +21825,30 @@ var fa = 129, Uo = 230, Wf = 231, $f = 235, jf = 236, Yf = 237, Zf = 238, Kf = 2
|
|
|
21820
21825
|
if (s[oe] === l)
|
|
21821
21826
|
return oe;
|
|
21822
21827
|
if (c === 1) {
|
|
21823
|
-
if (o[
|
|
21824
|
-
return
|
|
21828
|
+
if (o[Ge] > 0)
|
|
21829
|
+
return Ge;
|
|
21825
21830
|
if (o[Oe] > 0)
|
|
21826
21831
|
return Oe;
|
|
21827
|
-
if (o[
|
|
21828
|
-
return
|
|
21832
|
+
if (o[Ye] > 0)
|
|
21833
|
+
return Ye;
|
|
21829
21834
|
if (o[_e] > 0)
|
|
21830
21835
|
return _e;
|
|
21831
21836
|
}
|
|
21832
21837
|
return Be;
|
|
21833
21838
|
}
|
|
21834
21839
|
var u = e.charCodeAt(t + a);
|
|
21835
|
-
if (a++, this.isDigit(u) ? i[oe] += 0.5 : this.isExtendedASCII(u) ? (i[oe] = Math.ceil(i[oe]), i[oe] += 2) : (i[oe] = Math.ceil(i[oe]), i[oe]++), this.isNativeC40(u) ? i[Be] += 2 / 3 : this.isExtendedASCII(u) ? i[Be] += 8 / 3 : i[Be] += 4 / 3, this.isNativeText(u) ? i[
|
|
21836
|
-
if (Se.fill(o, 0), Se.fill(s, 0), this.findMinimums(i, s, j.MAX_VALUE, o), s[oe] < this.min(s[
|
|
21840
|
+
if (a++, this.isDigit(u) ? i[oe] += 0.5 : this.isExtendedASCII(u) ? (i[oe] = Math.ceil(i[oe]), i[oe] += 2) : (i[oe] = Math.ceil(i[oe]), i[oe]++), this.isNativeC40(u) ? i[Be] += 2 / 3 : this.isExtendedASCII(u) ? i[Be] += 8 / 3 : i[Be] += 4 / 3, this.isNativeText(u) ? i[Ye] += 2 / 3 : this.isExtendedASCII(u) ? i[Ye] += 8 / 3 : i[Ye] += 4 / 3, this.isNativeX12(u) ? i[_e] += 2 / 3 : this.isExtendedASCII(u) ? i[_e] += 13 / 3 : i[_e] += 10 / 3, this.isNativeEDIFACT(u) ? i[Oe] += 3 / 4 : this.isExtendedASCII(u) ? i[Oe] += 17 / 4 : i[Oe] += 13 / 4, this.isSpecialB256(u) ? i[Ge] += 4 : i[Ge]++, a >= 4) {
|
|
21841
|
+
if (Se.fill(o, 0), Se.fill(s, 0), this.findMinimums(i, s, j.MAX_VALUE, o), s[oe] < this.min(s[Ge], s[Be], s[Ye], s[_e], s[Oe]))
|
|
21837
21842
|
return oe;
|
|
21838
|
-
if (s[
|
|
21839
|
-
return
|
|
21840
|
-
if (s[Oe] + 1 < this.min(s[
|
|
21843
|
+
if (s[Ge] < s[oe] || s[Ge] + 1 < this.min(s[Be], s[Ye], s[_e], s[Oe]))
|
|
21844
|
+
return Ge;
|
|
21845
|
+
if (s[Oe] + 1 < this.min(s[Ge], s[Be], s[Ye], s[_e], s[oe]))
|
|
21841
21846
|
return Oe;
|
|
21842
|
-
if (s[
|
|
21843
|
-
return
|
|
21844
|
-
if (s[_e] + 1 < this.min(s[
|
|
21847
|
+
if (s[Ye] + 1 < this.min(s[Ge], s[Be], s[Oe], s[_e], s[oe]))
|
|
21848
|
+
return Ye;
|
|
21849
|
+
if (s[_e] + 1 < this.min(s[Ge], s[Be], s[Oe], s[Ye], s[oe]))
|
|
21845
21850
|
return _e;
|
|
21846
|
-
if (s[Be] + 1 < this.min(s[oe], s[
|
|
21851
|
+
if (s[Be] + 1 < this.min(s[oe], s[Ge], s[Oe], s[Ye])) {
|
|
21847
21852
|
if (s[Be] < s[_e])
|
|
21848
21853
|
return Be;
|
|
21849
21854
|
if (s[Be] === s[_e]) {
|
|
@@ -21975,7 +21980,7 @@ var fa = 129, Uo = 230, Wf = 231, $f = 235, jf = 236, Yf = 237, Zf = 238, Kf = 2
|
|
|
21975
21980
|
}
|
|
21976
21981
|
if (!h)
|
|
21977
21982
|
try {
|
|
21978
|
-
for (var
|
|
21983
|
+
for (var A = (o = void 0, Vn(this.ENCODERS)), w = A.next(); !w.done; w = A.next()) {
|
|
21979
21984
|
var y = w.value;
|
|
21980
21985
|
if (y.canEncode(e.charAt(f))) {
|
|
21981
21986
|
u.push(y), h = !0;
|
|
@@ -21986,7 +21991,7 @@ var fa = 129, Uo = 230, Wf = 231, $f = 235, jf = 236, Yf = 237, Zf = 238, Kf = 2
|
|
|
21986
21991
|
o = { error: z };
|
|
21987
21992
|
} finally {
|
|
21988
21993
|
try {
|
|
21989
|
-
w && !w.done && (s =
|
|
21994
|
+
w && !w.done && (s = A.return) && s.call(A);
|
|
21990
21995
|
} finally {
|
|
21991
21996
|
if (o) throw o.error;
|
|
21992
21997
|
}
|
|
@@ -21999,15 +22004,15 @@ var fa = 129, Uo = 230, Wf = 231, $f = 235, jf = 236, Yf = 237, Zf = 238, Kf = 2
|
|
|
21999
22004
|
this.encoders = [];
|
|
22000
22005
|
var S = 0;
|
|
22001
22006
|
try {
|
|
22002
|
-
for (var O = Vn(u),
|
|
22003
|
-
var y =
|
|
22007
|
+
for (var O = Vn(u), T = O.next(); !T.done; T = O.next()) {
|
|
22008
|
+
var y = T.value;
|
|
22004
22009
|
this.encoders[S++] = y;
|
|
22005
22010
|
}
|
|
22006
22011
|
} catch (z) {
|
|
22007
22012
|
l = { error: z };
|
|
22008
22013
|
} finally {
|
|
22009
22014
|
try {
|
|
22010
|
-
|
|
22015
|
+
T && !T.done && (c = O.return) && c.call(O);
|
|
22011
22016
|
} finally {
|
|
22012
22017
|
if (l) throw l.error;
|
|
22013
22018
|
}
|
|
@@ -22715,34 +22720,34 @@ var Pn = O1(Se.createInt32Array(5, 256)), Fr = function(r) {
|
|
|
22715
22720
|
}
|
|
22716
22721
|
}
|
|
22717
22722
|
}
|
|
22718
|
-
var v = r.generateCheckWords(d, c, u), g = d.getSize() / u, y = r.generateModeMessage(s, l, g), m = (s ? 11 : 14) + l * 4, C = new Int32Array(m),
|
|
22723
|
+
var v = r.generateCheckWords(d, c, u), g = d.getSize() / u, y = r.generateModeMessage(s, l, g), m = (s ? 11 : 14) + l * 4, C = new Int32Array(m), A;
|
|
22719
22724
|
if (s) {
|
|
22720
|
-
|
|
22725
|
+
A = m;
|
|
22721
22726
|
for (var h = 0; h < C.length; h++)
|
|
22722
22727
|
C[h] = h;
|
|
22723
22728
|
} else {
|
|
22724
|
-
|
|
22725
|
-
for (var w = j.truncDivision(m, 2), S = j.truncDivision(
|
|
22729
|
+
A = m + 1 + 2 * j.truncDivision(j.truncDivision(m, 2) - 1, 15);
|
|
22730
|
+
for (var w = j.truncDivision(m, 2), S = j.truncDivision(A, 2), h = 0; h < w; h++) {
|
|
22726
22731
|
var O = h + j.truncDivision(h, 15);
|
|
22727
22732
|
C[w - h - 1] = S - O - 1, C[w + h] = S + O + 1;
|
|
22728
22733
|
}
|
|
22729
22734
|
}
|
|
22730
|
-
for (var
|
|
22735
|
+
for (var T = new vt(A), h = 0, F = 0; h < l; h++) {
|
|
22731
22736
|
for (var z = (l - h) * 4 + (s ? 9 : 12), U = 0; U < z; U++)
|
|
22732
|
-
for (var
|
|
22733
|
-
v.get(F +
|
|
22737
|
+
for (var Z = U * 2, X = 0; X < 2; X++)
|
|
22738
|
+
v.get(F + Z + X) && T.set(C[h * 2 + X], C[h * 2 + U]), v.get(F + z * 2 + Z + X) && T.set(C[h * 2 + U], C[m - 1 - h * 2 - X]), v.get(F + z * 4 + Z + X) && T.set(C[m - 1 - h * 2 - X], C[m - 1 - h * 2 - U]), v.get(F + z * 6 + Z + X) && T.set(C[m - 1 - h * 2 - U], C[h * 2 + X]);
|
|
22734
22739
|
F += z * 8;
|
|
22735
22740
|
}
|
|
22736
|
-
if (r.drawModeMessage(
|
|
22737
|
-
r.drawBullsEye(
|
|
22741
|
+
if (r.drawModeMessage(T, s, A, y), s)
|
|
22742
|
+
r.drawBullsEye(T, j.truncDivision(A, 2), 5);
|
|
22738
22743
|
else {
|
|
22739
|
-
r.drawBullsEye(
|
|
22744
|
+
r.drawBullsEye(T, j.truncDivision(A, 2), 7);
|
|
22740
22745
|
for (var h = 0, U = 0; h < j.truncDivision(m, 2) - 1; h += 15, U += 16)
|
|
22741
|
-
for (var X = j.truncDivision(
|
|
22742
|
-
|
|
22746
|
+
for (var X = j.truncDivision(A, 2) & 1; X < A; X += 2)
|
|
22747
|
+
T.set(j.truncDivision(A, 2) - U, X), T.set(j.truncDivision(A, 2) + U, X), T.set(X, j.truncDivision(A, 2) - U), T.set(X, j.truncDivision(A, 2) + U);
|
|
22743
22748
|
}
|
|
22744
|
-
var
|
|
22745
|
-
return
|
|
22749
|
+
var K = new g1();
|
|
22750
|
+
return K.setCompact(s), K.setSize(A), K.setLayers(l), K.setCodeWords(g), K.setMatrix(T), K;
|
|
22746
22751
|
}, r.drawBullsEye = function(e, t, n) {
|
|
22747
22752
|
for (var i = 0; i < n; i += 2)
|
|
22748
22753
|
for (var a = t - i; a <= t + i; a++)
|
|
@@ -22794,15 +22799,15 @@ var Pn = O1(Se.createInt32Array(5, 256)), Fr = function(r) {
|
|
|
22794
22799
|
}, r.getGF = function(e) {
|
|
22795
22800
|
switch (e) {
|
|
22796
22801
|
case 4:
|
|
22797
|
-
return
|
|
22802
|
+
return Qe.AZTEC_PARAM;
|
|
22798
22803
|
case 6:
|
|
22799
|
-
return
|
|
22804
|
+
return Qe.AZTEC_DATA_6;
|
|
22800
22805
|
case 8:
|
|
22801
|
-
return
|
|
22806
|
+
return Qe.AZTEC_DATA_8;
|
|
22802
22807
|
case 10:
|
|
22803
|
-
return
|
|
22808
|
+
return Qe.AZTEC_DATA_10;
|
|
22804
22809
|
case 12:
|
|
22805
|
-
return
|
|
22810
|
+
return Qe.AZTEC_DATA_12;
|
|
22806
22811
|
default:
|
|
22807
22812
|
throw new H("Unsupported word size " + e);
|
|
22808
22813
|
}
|
|
@@ -22884,9 +22889,9 @@ const D1 = /* @__PURE__ */ new Map([
|
|
|
22884
22889
|
modal: a,
|
|
22885
22890
|
...o
|
|
22886
22891
|
} = r;
|
|
22887
|
-
return /* @__PURE__ */
|
|
22892
|
+
return /* @__PURE__ */ _(xt.Root, { open: t, onOpenChange: n, defaultOpen: i, modal: a, children: [
|
|
22888
22893
|
!!e && /* @__PURE__ */ p(xt.Trigger, { asChild: !0, children: e }),
|
|
22889
|
-
/* @__PURE__ */
|
|
22894
|
+
/* @__PURE__ */ _(xt.Content, { children: [
|
|
22890
22895
|
/* @__PURE__ */ p(xt.Title, { className: "sr-only", children: "Scanner" }),
|
|
22891
22896
|
/* @__PURE__ */ p(xt.Description, { className: "sr-only", children: "Scan a barcode or a qr code." }),
|
|
22892
22897
|
/* @__PURE__ */ p(qo, { ...o })
|
|
@@ -22903,14 +22908,14 @@ const qo = L((r) => {
|
|
|
22903
22908
|
onError: a,
|
|
22904
22909
|
hints: D1
|
|
22905
22910
|
});
|
|
22906
|
-
return /* @__PURE__ */
|
|
22907
|
-
/* @__PURE__ */ p("div", { className: "flex w-full justify-end p-4", children: /* @__PURE__ */ p(xt.Close, { asChild: !0, children: /* @__PURE__ */ p(ne, { "aria-label": "close", variant: "soft", accentColor: "base", children: /* @__PURE__ */ p(
|
|
22911
|
+
return /* @__PURE__ */ _("div", { className: "bg-(--color-background) flex size-full flex-col justify-center overflow-hidden", children: [
|
|
22912
|
+
/* @__PURE__ */ p("div", { className: "flex w-full justify-end p-4", children: /* @__PURE__ */ p(xt.Close, { asChild: !0, children: /* @__PURE__ */ p(ne, { "aria-label": "close", variant: "soft", accentColor: "base", children: /* @__PURE__ */ p(N, { icon: It }) }) }) }),
|
|
22908
22913
|
/* @__PURE__ */ p("div", { className: "max-h-full w-full grow overflow-hidden p-4", children: /* @__PURE__ */ p("video", { className: "size-full", ref: o }) })
|
|
22909
22914
|
] });
|
|
22910
22915
|
});
|
|
22911
22916
|
qo.displayName = "ScannerInternal";
|
|
22912
22917
|
const R1 = L((r) => {
|
|
22913
|
-
const { children: e } = r, [t, n] =
|
|
22918
|
+
const { children: e } = r, [t, n] = Xe(null), i = b(() => {
|
|
22914
22919
|
n(null);
|
|
22915
22920
|
}, []), a = b(
|
|
22916
22921
|
(s) => {
|
|
@@ -22920,14 +22925,14 @@ const R1 = L((r) => {
|
|
|
22920
22925
|
), o = b(() => {
|
|
22921
22926
|
t && (t.onClose && t.onClose(), i());
|
|
22922
22927
|
}, [i, t]);
|
|
22923
|
-
return /* @__PURE__ */
|
|
22928
|
+
return /* @__PURE__ */ _(No.Provider, { value: a, children: [
|
|
22924
22929
|
e,
|
|
22925
22930
|
t && /* @__PURE__ */ p(yi, { open: !0, onOpenChange: o, ...t })
|
|
22926
22931
|
] });
|
|
22927
22932
|
});
|
|
22928
22933
|
R1.displayName = "FileViewerProvider";
|
|
22929
22934
|
const Xo = L((r) => {
|
|
22930
|
-
const { field: e } = r, { size: t } = ce(Ce), { value: n, name: i, onBlur: a, onChange: o, error: s, disabled: l } =
|
|
22935
|
+
const { field: e } = r, { size: t } = ce(Ce), { value: n, name: i, onBlur: a, onChange: o, error: s, disabled: l } = ze({ field: e }), [c, u] = Xe(!1), d = b(
|
|
22931
22936
|
(y) => {
|
|
22932
22937
|
const m = y.target.value;
|
|
22933
22938
|
o(m);
|
|
@@ -22945,7 +22950,7 @@ const Xo = L((r) => {
|
|
|
22945
22950
|
}, []), g = b(() => {
|
|
22946
22951
|
u(!1), a();
|
|
22947
22952
|
}, [a]);
|
|
22948
|
-
return /* @__PURE__ */
|
|
22953
|
+
return /* @__PURE__ */ _(
|
|
22949
22954
|
Re,
|
|
22950
22955
|
{
|
|
22951
22956
|
size: t,
|
|
@@ -22972,7 +22977,7 @@ const Xo = L((r) => {
|
|
|
22972
22977
|
disabled: l
|
|
22973
22978
|
}
|
|
22974
22979
|
),
|
|
22975
|
-
/* @__PURE__ */
|
|
22980
|
+
/* @__PURE__ */ _(
|
|
22976
22981
|
B,
|
|
22977
22982
|
{
|
|
22978
22983
|
onClick: v,
|
|
@@ -22983,7 +22988,7 @@ const Xo = L((r) => {
|
|
|
22983
22988
|
accentColor: "base",
|
|
22984
22989
|
disabled: l,
|
|
22985
22990
|
children: [
|
|
22986
|
-
/* @__PURE__ */ p(
|
|
22991
|
+
/* @__PURE__ */ p(N, { icon: dc }),
|
|
22987
22992
|
"Scan"
|
|
22988
22993
|
]
|
|
22989
22994
|
}
|
|
@@ -23046,7 +23051,7 @@ class _r extends tt {
|
|
|
23046
23051
|
}
|
|
23047
23052
|
}
|
|
23048
23053
|
const Ca = 500, Wo = L((r) => {
|
|
23049
|
-
const { field: e } = r, { size: t } = ce(Ce), { value: n, name: i, onBlur: a, onChange: o, error: s, disabled: l } =
|
|
23054
|
+
const { field: e } = r, { size: t } = ce(Ce), { value: n, name: i, onBlur: a, onChange: o, error: s, disabled: l } = ze({ field: e }), c = b(
|
|
23050
23055
|
(f) => {
|
|
23051
23056
|
const h = f.target.value;
|
|
23052
23057
|
o(h);
|
|
@@ -23121,7 +23126,7 @@ class rr extends go {
|
|
|
23121
23126
|
}
|
|
23122
23127
|
}
|
|
23123
23128
|
const $o = L((r) => {
|
|
23124
|
-
const { field: e } = r, { size: t } = ce(Ce), { value: n, name: i, onBlur: a, onChange: o, error: s, disabled: l } =
|
|
23129
|
+
const { field: e } = r, { size: t } = ce(Ce), { value: n, name: i, onBlur: a, onChange: o, error: s, disabled: l } = ze({ field: e }), c = b(
|
|
23125
23130
|
(d) => {
|
|
23126
23131
|
const f = d.target.value;
|
|
23127
23132
|
o(f);
|
|
@@ -23274,7 +23279,7 @@ const rn = (r) => {
|
|
|
23274
23279
|
},
|
|
23275
23280
|
[n]
|
|
23276
23281
|
);
|
|
23277
|
-
return /* @__PURE__ */
|
|
23282
|
+
return /* @__PURE__ */ _("div", { className: "flex min-w-0 gap-2", children: [
|
|
23278
23283
|
/* @__PURE__ */ p(ge.Root, { className: "min-w-0 grow", accentColor: "base", variant: "surface", size: a, children: /* @__PURE__ */ p(
|
|
23279
23284
|
ge.Field,
|
|
23280
23285
|
{
|
|
@@ -23294,8 +23299,8 @@ const rn = (r) => {
|
|
|
23294
23299
|
disabled: i
|
|
23295
23300
|
}
|
|
23296
23301
|
) }),
|
|
23297
|
-
/* @__PURE__ */
|
|
23298
|
-
/* @__PURE__ */ p(D.ClickTrigger, { children: /* @__PURE__ */
|
|
23302
|
+
/* @__PURE__ */ _(D.Root, { align: "end", onOpenChange: h, children: [
|
|
23303
|
+
/* @__PURE__ */ p(D.ClickTrigger, { children: /* @__PURE__ */ _(
|
|
23299
23304
|
B,
|
|
23300
23305
|
{
|
|
23301
23306
|
type: "button",
|
|
@@ -23306,7 +23311,7 @@ const rn = (r) => {
|
|
|
23306
23311
|
disabled: i || !c,
|
|
23307
23312
|
children: [
|
|
23308
23313
|
/* @__PURE__ */ p(pe, { className: "truncate", highContrast: !!c, children: c ? ei(c.utcOffset) : "UTC offset" }),
|
|
23309
|
-
/* @__PURE__ */ p(
|
|
23314
|
+
/* @__PURE__ */ p(N, { icon: Zr })
|
|
23310
23315
|
]
|
|
23311
23316
|
}
|
|
23312
23317
|
) }),
|
|
@@ -23316,8 +23321,8 @@ const rn = (r) => {
|
|
|
23316
23321
|
required: !0,
|
|
23317
23322
|
value: c == null ? void 0 : c.utcOffset,
|
|
23318
23323
|
onValueChange: f,
|
|
23319
|
-
children: jo.map((v) => /* @__PURE__ */
|
|
23320
|
-
/* @__PURE__ */ p(D.SelectedIndicator, { children: /* @__PURE__ */ p(
|
|
23324
|
+
children: jo.map((v) => /* @__PURE__ */ _(D.SelectItem, { value: v, children: [
|
|
23325
|
+
/* @__PURE__ */ p(D.SelectedIndicator, { children: /* @__PURE__ */ p(N, { icon: et }) }),
|
|
23321
23326
|
ei(v)
|
|
23322
23327
|
] }, v))
|
|
23323
23328
|
}
|
|
@@ -23327,7 +23332,7 @@ const rn = (r) => {
|
|
|
23327
23332
|
});
|
|
23328
23333
|
Ci.displayName = "TimeFieldControl";
|
|
23329
23334
|
const Zo = L((r) => {
|
|
23330
|
-
const { field: e } = r, { size: t } = ce(Ce), { value: n, name: i, onBlur: a, onChange: o, error: s, disabled: l } =
|
|
23335
|
+
const { field: e } = r, { size: t } = ce(Ce), { value: n, name: i, onBlur: a, onChange: o, error: s, disabled: l } = ze({ field: e });
|
|
23331
23336
|
return /* @__PURE__ */ p(
|
|
23332
23337
|
Re,
|
|
23333
23338
|
{
|
|
@@ -23404,7 +23409,7 @@ class Ar extends tt {
|
|
|
23404
23409
|
}
|
|
23405
23410
|
const Ko = L((r) => {
|
|
23406
23411
|
var y;
|
|
23407
|
-
const { field: e } = r, { size: t } = ce(Ce), { value: n, name: i, onBlur: a, onChange: o, error: s, disabled: l } =
|
|
23412
|
+
const { field: e } = r, { size: t } = ce(Ce), { value: n, name: i, onBlur: a, onChange: o, error: s, disabled: l } = ze({ field: e }), c = Yr(null), u = b(() => {
|
|
23408
23413
|
var m;
|
|
23409
23414
|
(m = c.current) == null || m.click();
|
|
23410
23415
|
}, []), d = b(() => {
|
|
@@ -23414,11 +23419,11 @@ const Ko = L((r) => {
|
|
|
23414
23419
|
a();
|
|
23415
23420
|
return;
|
|
23416
23421
|
}
|
|
23417
|
-
const C = Array.from(m).map((w) => Bt.from(G(), w)),
|
|
23418
|
-
o(
|
|
23422
|
+
const C = Array.from(m).map((w) => Bt.from(G(), w)), A = [...n, ...C];
|
|
23423
|
+
o(A), a();
|
|
23419
23424
|
}, [a, o, n]), f = b(
|
|
23420
23425
|
(m) => {
|
|
23421
|
-
const C = n.filter(({ uuid:
|
|
23426
|
+
const C = n.filter(({ uuid: A }) => A !== m.uuid);
|
|
23422
23427
|
o(C), a();
|
|
23423
23428
|
},
|
|
23424
23429
|
[n, o, a]
|
|
@@ -23439,7 +23444,7 @@ const Ko = L((r) => {
|
|
|
23439
23444
|
};
|
|
23440
23445
|
}, [a, n]);
|
|
23441
23446
|
const g = e.maxFiles > 1 ? "Select files" : "Select a file";
|
|
23442
|
-
return /* @__PURE__ */
|
|
23447
|
+
return /* @__PURE__ */ _(
|
|
23443
23448
|
Re,
|
|
23444
23449
|
{
|
|
23445
23450
|
size: t,
|
|
@@ -23450,7 +23455,7 @@ const Ko = L((r) => {
|
|
|
23450
23455
|
error: s,
|
|
23451
23456
|
image: e.image,
|
|
23452
23457
|
children: [
|
|
23453
|
-
/* @__PURE__ */
|
|
23458
|
+
/* @__PURE__ */ _(
|
|
23454
23459
|
B,
|
|
23455
23460
|
{
|
|
23456
23461
|
className: "w-max",
|
|
@@ -23461,7 +23466,7 @@ const Ko = L((r) => {
|
|
|
23461
23466
|
type: "button",
|
|
23462
23467
|
disabled: l,
|
|
23463
23468
|
children: [
|
|
23464
|
-
/* @__PURE__ */ p(
|
|
23469
|
+
/* @__PURE__ */ p(N, { icon: oi }),
|
|
23465
23470
|
g
|
|
23466
23471
|
]
|
|
23467
23472
|
}
|
|
@@ -23509,7 +23514,7 @@ class ir extends tt {
|
|
|
23509
23514
|
const n = t && `${t}.`;
|
|
23510
23515
|
return [
|
|
23511
23516
|
{
|
|
23512
|
-
field: new
|
|
23517
|
+
field: new Je({
|
|
23513
23518
|
label: "How many files can be uploaded?",
|
|
23514
23519
|
description: "By default, only one file can be uploaded.",
|
|
23515
23520
|
required: !1,
|
|
@@ -23521,7 +23526,7 @@ class ir extends tt {
|
|
|
23521
23526
|
showDirectly: !1
|
|
23522
23527
|
},
|
|
23523
23528
|
{
|
|
23524
|
-
field: new
|
|
23529
|
+
field: new Je({
|
|
23525
23530
|
label: "What is the maximum size of each file?",
|
|
23526
23531
|
description: `Maximum file size in megabytes (between 1MB–${yr}MB).`,
|
|
23527
23532
|
required: !1,
|
|
@@ -23633,7 +23638,7 @@ class ir extends tt {
|
|
|
23633
23638
|
}
|
|
23634
23639
|
}
|
|
23635
23640
|
const Qo = L((r) => {
|
|
23636
|
-
const { field: e } = r, { size: t } = ce(Ce), { value: n, name: i, onBlur: a, onChange: o, error: s, disabled: l } =
|
|
23641
|
+
const { field: e } = r, { size: t } = ce(Ce), { value: n, name: i, onBlur: a, onChange: o, error: s, disabled: l } = ze({ field: e }), c = b(
|
|
23637
23642
|
(h) => {
|
|
23638
23643
|
const v = h.target.value;
|
|
23639
23644
|
v !== "" && !URL.canParse(v) || o(v !== "" ? new URL(v) : null);
|
|
@@ -23656,7 +23661,7 @@ const Qo = L((r) => {
|
|
|
23656
23661
|
required: e.required,
|
|
23657
23662
|
error: s,
|
|
23658
23663
|
image: e.image,
|
|
23659
|
-
children: /* @__PURE__ */
|
|
23664
|
+
children: /* @__PURE__ */ _("div", { className: "flex w-full gap-2", children: [
|
|
23660
23665
|
/* @__PURE__ */ p(ge.Root, { className: "grow", accentColor: "base", variant: "surface", size: t, children: /* @__PURE__ */ p(
|
|
23661
23666
|
ge.Field,
|
|
23662
23667
|
{
|
|
@@ -23682,7 +23687,7 @@ const Qo = L((r) => {
|
|
|
23682
23687
|
type: "button",
|
|
23683
23688
|
disabled: n === null,
|
|
23684
23689
|
onClick: f,
|
|
23685
|
-
children: /* @__PURE__ */ p(
|
|
23690
|
+
children: /* @__PURE__ */ p(N, { icon: Wl })
|
|
23686
23691
|
}
|
|
23687
23692
|
)
|
|
23688
23693
|
] })
|
|
@@ -23754,7 +23759,7 @@ class Er extends tt {
|
|
|
23754
23759
|
const Jo = {
|
|
23755
23760
|
date: Cr,
|
|
23756
23761
|
time: Ar,
|
|
23757
|
-
number:
|
|
23762
|
+
number: Je,
|
|
23758
23763
|
boolean: Yt,
|
|
23759
23764
|
select: Pt,
|
|
23760
23765
|
string: rr,
|
|
@@ -23773,7 +23778,7 @@ const Jo = {
|
|
|
23773
23778
|
"checkbox-list": {
|
|
23774
23779
|
description: "Allows the user to select a multiple options from a list.",
|
|
23775
23780
|
group: J.Selection,
|
|
23776
|
-
icon:
|
|
23781
|
+
icon: Ul,
|
|
23777
23782
|
name: "Checkbox list"
|
|
23778
23783
|
},
|
|
23779
23784
|
"multi-select": {
|
|
@@ -23791,7 +23796,7 @@ const Jo = {
|
|
|
23791
23796
|
"pass-fail": {
|
|
23792
23797
|
description: "Track pass, fail, or N/A outcome.",
|
|
23793
23798
|
group: J.Assessment,
|
|
23794
|
-
icon:
|
|
23799
|
+
icon: kl,
|
|
23795
23800
|
name: "Pass - Fail"
|
|
23796
23801
|
},
|
|
23797
23802
|
boolean: {
|
|
@@ -23833,7 +23838,7 @@ const Jo = {
|
|
|
23833
23838
|
radio: {
|
|
23834
23839
|
description: "Allows the user to select a single option from a list of options.",
|
|
23835
23840
|
group: J.Selection,
|
|
23836
|
-
icon:
|
|
23841
|
+
icon: Tl,
|
|
23837
23842
|
name: "Option list"
|
|
23838
23843
|
},
|
|
23839
23844
|
rating: {
|
|
@@ -24190,7 +24195,7 @@ const G1 = W.create({
|
|
|
24190
24195
|
serialize: (r) => r,
|
|
24191
24196
|
deserialize: (r) => r
|
|
24192
24197
|
}), V = (r) => r;
|
|
24193
|
-
class
|
|
24198
|
+
class Ue extends Kr {
|
|
24194
24199
|
constructor(t) {
|
|
24195
24200
|
const { id: n, field: i, conditionValue: a, conditionModifier: o } = t;
|
|
24196
24201
|
super();
|
|
@@ -24235,56 +24240,56 @@ class ze extends Kr {
|
|
|
24235
24240
|
}
|
|
24236
24241
|
const ds = L, kt = ds(function(r) {
|
|
24237
24242
|
const { ref: e, children: t, ...n } = r, i = b(
|
|
24238
|
-
(a) => typeof t == "function" ? /* @__PURE__ */
|
|
24243
|
+
(a) => typeof t == "function" ? /* @__PURE__ */ _(Le, { children: [
|
|
24239
24244
|
t(a),
|
|
24240
|
-
/* @__PURE__ */ p(D.SelectedIndicator, { className: "ml-[auto]", children: /* @__PURE__ */ p(
|
|
24241
|
-
] }) : /* @__PURE__ */
|
|
24245
|
+
/* @__PURE__ */ p(D.SelectedIndicator, { className: "ml-[auto]", children: /* @__PURE__ */ p(N, { icon: et }) })
|
|
24246
|
+
] }) : /* @__PURE__ */ _(Le, { children: [
|
|
24242
24247
|
t,
|
|
24243
|
-
/* @__PURE__ */ p(D.SelectedIndicator, { className: "ml-[auto]", children: /* @__PURE__ */ p(
|
|
24248
|
+
/* @__PURE__ */ p(D.SelectedIndicator, { className: "ml-[auto]", children: /* @__PURE__ */ p(N, { icon: et }) })
|
|
24244
24249
|
] }),
|
|
24245
24250
|
[t]
|
|
24246
24251
|
);
|
|
24247
24252
|
return /* @__PURE__ */ p(D.SelectItem, { ref: e, ...n, children: i });
|
|
24248
24253
|
}), fs = ds(function(r) {
|
|
24249
24254
|
const { ref: e, children: t, ...n } = r, i = b(
|
|
24250
|
-
(a) => typeof t == "function" ? /* @__PURE__ */
|
|
24255
|
+
(a) => typeof t == "function" ? /* @__PURE__ */ _(Le, { children: [
|
|
24251
24256
|
t(a),
|
|
24252
|
-
/* @__PURE__ */ p(D.SelectedIndicator, { className: "ml-auto", children: /* @__PURE__ */ p(
|
|
24253
|
-
] }) : /* @__PURE__ */
|
|
24257
|
+
/* @__PURE__ */ p(D.SelectedIndicator, { className: "ml-auto", children: /* @__PURE__ */ p(N, { icon: et }) })
|
|
24258
|
+
] }) : /* @__PURE__ */ _(Le, { children: [
|
|
24254
24259
|
t,
|
|
24255
|
-
/* @__PURE__ */ p(D.SelectedIndicator, { className: "ml-auto", children: /* @__PURE__ */ p(
|
|
24260
|
+
/* @__PURE__ */ p(D.SelectedIndicator, { className: "ml-auto", children: /* @__PURE__ */ p(N, { icon: et }) })
|
|
24256
24261
|
] }),
|
|
24257
24262
|
[t]
|
|
24258
24263
|
);
|
|
24259
24264
|
return /* @__PURE__ */ p(D.MultiSelectItem, { ref: e, ...n, children: i });
|
|
24260
24265
|
}), bi = L((r) => {
|
|
24261
24266
|
const { ref: e, children: t, ...n } = r, i = b(
|
|
24262
|
-
(a) => typeof t == "function" ? /* @__PURE__ */
|
|
24267
|
+
(a) => typeof t == "function" ? /* @__PURE__ */ _(Le, { children: [
|
|
24263
24268
|
t(a),
|
|
24264
|
-
/* @__PURE__ */ p(D.CheckboxItemIndicator, { className: "ml-[auto]", children: (o) => o ? /* @__PURE__ */ p(
|
|
24265
|
-
] }) : /* @__PURE__ */
|
|
24269
|
+
/* @__PURE__ */ p(D.CheckboxItemIndicator, { className: "ml-[auto]", children: (o) => o ? /* @__PURE__ */ p(N, { icon: Gr }) : /* @__PURE__ */ p(N, { icon: et }) })
|
|
24270
|
+
] }) : /* @__PURE__ */ _(Le, { children: [
|
|
24266
24271
|
t,
|
|
24267
|
-
/* @__PURE__ */ p(D.CheckboxItemIndicator, { className: "ml-[auto]", children: (o) => o ? /* @__PURE__ */ p(
|
|
24272
|
+
/* @__PURE__ */ p(D.CheckboxItemIndicator, { className: "ml-[auto]", children: (o) => o ? /* @__PURE__ */ p(N, { icon: Gr }) : /* @__PURE__ */ p(N, { icon: et }) })
|
|
24268
24273
|
] }),
|
|
24269
24274
|
[t]
|
|
24270
24275
|
);
|
|
24271
24276
|
return /* @__PURE__ */ p(D.SelectAllItem, { ref: e, ...n, children: i });
|
|
24272
24277
|
});
|
|
24273
24278
|
bi.displayName = "SelectAllItemTemplate";
|
|
24274
|
-
const
|
|
24279
|
+
const He = (r) => {
|
|
24275
24280
|
const { children: e, condition: t, size: n = "sm", variant: i, accentColor: a, radius: o } = r, s = b(
|
|
24276
24281
|
(l) => {
|
|
24277
24282
|
t.setConditionModifier(l);
|
|
24278
24283
|
},
|
|
24279
24284
|
[t]
|
|
24280
24285
|
);
|
|
24281
|
-
return /* @__PURE__ */
|
|
24286
|
+
return /* @__PURE__ */ _(D.Root, { align: "start", children: [
|
|
24282
24287
|
/* @__PURE__ */ p(D.ClickTrigger, { children: e }),
|
|
24283
24288
|
/* @__PURE__ */ p(D.Content, { size: n, variant: i, radius: o, accentColor: a, children: /* @__PURE__ */ p(D.SelectGroup, { required: !0, value: t.getConditionModifier(), onValueChange: s, children: t.getConditionModifiers().map(([l, c]) => /* @__PURE__ */ p(kt, { value: l, children: c.modifier.label }, l)) }) })
|
|
24284
24289
|
] });
|
|
24285
24290
|
}, zr = L((r) => {
|
|
24286
24291
|
const { children: e, open: t, onOpenChange: n, defaultOpen: i, modal: a, size: o, align: s, accentColor: l = "base", ...c } = r;
|
|
24287
|
-
return /* @__PURE__ */
|
|
24292
|
+
return /* @__PURE__ */ _(xe.Root, { open: t, onOpenChange: n, defaultOpen: i, modal: a, children: [
|
|
24288
24293
|
/* @__PURE__ */ p(xe.Trigger, { asChild: !0, children: e }),
|
|
24289
24294
|
/* @__PURE__ */ p(xe.Content, { size: o, align: s, children: /* @__PURE__ */ p(za, { size: o, accentColor: l, ...c }) })
|
|
24290
24295
|
] });
|
|
@@ -24303,7 +24308,7 @@ const hs = L((r) => {
|
|
|
24303
24308
|
onValuesChange: c,
|
|
24304
24309
|
placeholder: u = "Enter text",
|
|
24305
24310
|
...d
|
|
24306
|
-
} = r, [f, h] =
|
|
24311
|
+
} = r, [f, h] = Xe(""), v = b((C) => {
|
|
24307
24312
|
h(C.target.value);
|
|
24308
24313
|
}, []), g = b(
|
|
24309
24314
|
(C) => {
|
|
@@ -24314,15 +24319,15 @@ const hs = L((r) => {
|
|
|
24314
24319
|
c([...l, f]), h("");
|
|
24315
24320
|
}, [f, c, l]), m = b(
|
|
24316
24321
|
(C) => {
|
|
24317
|
-
const
|
|
24318
|
-
|
|
24322
|
+
const A = [...l];
|
|
24323
|
+
A.splice(C, 1), c(A);
|
|
24319
24324
|
},
|
|
24320
24325
|
[c, l]
|
|
24321
24326
|
);
|
|
24322
|
-
return /* @__PURE__ */
|
|
24327
|
+
return /* @__PURE__ */ _(xe.Root, { open: t, onOpenChange: n, defaultOpen: i, modal: a, children: [
|
|
24323
24328
|
/* @__PURE__ */ p(xe.Trigger, { asChild: !0, children: e }),
|
|
24324
|
-
/* @__PURE__ */ p(xe.Content, { size: o, onClick: mt, accentColor: s, ...d, children: /* @__PURE__ */
|
|
24325
|
-
/* @__PURE__ */
|
|
24329
|
+
/* @__PURE__ */ p(xe.Content, { size: o, onClick: mt, accentColor: s, ...d, children: /* @__PURE__ */ _("div", { className: "flex flex-col gap-2", children: [
|
|
24330
|
+
/* @__PURE__ */ _("div", { className: "flex gap-2", children: [
|
|
24326
24331
|
/* @__PURE__ */ p(ge.Root, { className: "grow", accentColor: "base", variant: "outline", size: "sm", children: /* @__PURE__ */ p(
|
|
24327
24332
|
ge.Field,
|
|
24328
24333
|
{
|
|
@@ -24341,11 +24346,11 @@ const hs = L((r) => {
|
|
|
24341
24346
|
variant: "soft",
|
|
24342
24347
|
type: "button",
|
|
24343
24348
|
onClick: y,
|
|
24344
|
-
children: /* @__PURE__ */ p(
|
|
24349
|
+
children: /* @__PURE__ */ p(N, { icon: ft })
|
|
24345
24350
|
}
|
|
24346
24351
|
)
|
|
24347
24352
|
] }),
|
|
24348
|
-
l.length > 0 && /* @__PURE__ */ p("div", { className: "flex flex-col gap-1", children: l.map((C,
|
|
24353
|
+
l.length > 0 && /* @__PURE__ */ p("div", { className: "flex flex-col gap-1", children: l.map((C, A) => /* @__PURE__ */ _(
|
|
24349
24354
|
ye,
|
|
24350
24355
|
{
|
|
24351
24356
|
className: "flex items-center justify-between gap-2",
|
|
@@ -24362,14 +24367,14 @@ const hs = L((r) => {
|
|
|
24362
24367
|
type: "button",
|
|
24363
24368
|
accentColor: "base",
|
|
24364
24369
|
onClick: () => {
|
|
24365
|
-
m(
|
|
24370
|
+
m(A);
|
|
24366
24371
|
},
|
|
24367
|
-
children: /* @__PURE__ */ p(
|
|
24372
|
+
children: /* @__PURE__ */ p(N, { icon: It })
|
|
24368
24373
|
}
|
|
24369
24374
|
)
|
|
24370
24375
|
]
|
|
24371
24376
|
},
|
|
24372
|
-
`${C}-${
|
|
24377
|
+
`${C}-${A}`
|
|
24373
24378
|
)) })
|
|
24374
24379
|
] }) })
|
|
24375
24380
|
] });
|
|
@@ -24388,7 +24393,7 @@ const Vt = L((r) => {
|
|
|
24388
24393
|
onValueChange: c,
|
|
24389
24394
|
placeholder: u = "Enter a number",
|
|
24390
24395
|
...d
|
|
24391
|
-
} = r, [f, h] =
|
|
24396
|
+
} = r, [f, h] = Xe(null);
|
|
24392
24397
|
dt(() => {
|
|
24393
24398
|
l !== void 0 && h(l);
|
|
24394
24399
|
}, [l]);
|
|
@@ -24402,7 +24407,7 @@ const Vt = L((r) => {
|
|
|
24402
24407
|
},
|
|
24403
24408
|
[c]
|
|
24404
24409
|
);
|
|
24405
|
-
return /* @__PURE__ */
|
|
24410
|
+
return /* @__PURE__ */ _(xe.Root, { open: t, onOpenChange: n, defaultOpen: i, modal: a, children: [
|
|
24406
24411
|
/* @__PURE__ */ p(xe.Trigger, { asChild: !0, children: e }),
|
|
24407
24412
|
/* @__PURE__ */ p(xe.Content, { size: o, onClick: mt, ...d, children: /* @__PURE__ */ p(ge.Root, { size: o, accentColor: s, children: /* @__PURE__ */ p(
|
|
24408
24413
|
ge.Field,
|
|
@@ -24421,7 +24426,7 @@ const Ve = (r) => {
|
|
|
24421
24426
|
const { condition: e, onClick: t, ...n } = r, i = b(() => {
|
|
24422
24427
|
t(e);
|
|
24423
24428
|
}, [e, t]);
|
|
24424
|
-
return /* @__PURE__ */ p(ne, { onClick: i, ...n, children: /* @__PURE__ */ p(
|
|
24429
|
+
return /* @__PURE__ */ p(ne, { onClick: i, ...n, children: /* @__PURE__ */ p(N, { icon: It }) });
|
|
24425
24430
|
};
|
|
24426
24431
|
Ve.displayName = "RemoveConditionButton";
|
|
24427
24432
|
const Tr = L((r) => {
|
|
@@ -24431,7 +24436,7 @@ const Tr = L((r) => {
|
|
|
24431
24436
|
label: a
|
|
24432
24437
|
} : a
|
|
24433
24438
|
), [t]);
|
|
24434
|
-
return /* @__PURE__ */
|
|
24439
|
+
return /* @__PURE__ */ _(D.MultiSelectGroup, { ref: e, ...n, children: [
|
|
24435
24440
|
/* @__PURE__ */ p(bi, { children: "Select all" }),
|
|
24436
24441
|
i.map((a) => /* @__PURE__ */ p(fs, { value: a.value, children: /* @__PURE__ */ p("span", { className: "truncate", children: a.label }) }, a.value))
|
|
24437
24442
|
] });
|
|
@@ -24460,7 +24465,7 @@ const lr = L((r) => {
|
|
|
24460
24465
|
onValueChange: c,
|
|
24461
24466
|
placeholder: u = "Enter text",
|
|
24462
24467
|
...d
|
|
24463
|
-
} = r, [f, h] =
|
|
24468
|
+
} = r, [f, h] = Xe(""), v = b((y) => {
|
|
24464
24469
|
h(y.target.value);
|
|
24465
24470
|
}, []), g = b(
|
|
24466
24471
|
(y) => {
|
|
@@ -24471,7 +24476,7 @@ const lr = L((r) => {
|
|
|
24471
24476
|
);
|
|
24472
24477
|
return dt(() => {
|
|
24473
24478
|
l && h(l);
|
|
24474
|
-
}, [l]), /* @__PURE__ */
|
|
24479
|
+
}, [l]), /* @__PURE__ */ _(xe.Root, { open: t, onOpenChange: n, defaultOpen: i, modal: a, children: [
|
|
24475
24480
|
/* @__PURE__ */ p(xe.Trigger, { asChild: !0, children: e }),
|
|
24476
24481
|
/* @__PURE__ */ p(xe.Content, { size: o, onClick: mt, ...d, children: /* @__PURE__ */ p(ge.Root, { size: o, accentColor: s, children: /* @__PURE__ */ p(
|
|
24477
24482
|
ge.Field,
|
|
@@ -24499,7 +24504,7 @@ const Ur = L((r) => {
|
|
|
24499
24504
|
onValueChange: c,
|
|
24500
24505
|
...u
|
|
24501
24506
|
} = r;
|
|
24502
|
-
return /* @__PURE__ */
|
|
24507
|
+
return /* @__PURE__ */ _(xe.Root, { open: t, onOpenChange: n, defaultOpen: i, modal: a, children: [
|
|
24503
24508
|
/* @__PURE__ */ p(xe.Trigger, { asChild: !0, children: e }),
|
|
24504
24509
|
/* @__PURE__ */ p(xe.Content, { size: o, onClick: mt, accentColor: s, ...u, children: /* @__PURE__ */ p(Ci, { compact: !0, size: o, value: l, onChange: c }) })
|
|
24505
24510
|
] });
|
|
@@ -24518,15 +24523,15 @@ const c0 = (r) => {
|
|
|
24518
24523
|
return "empty";
|
|
24519
24524
|
}
|
|
24520
24525
|
};
|
|
24521
|
-
return /* @__PURE__ */
|
|
24522
|
-
/* @__PURE__ */
|
|
24523
|
-
/* @__PURE__ */ p(
|
|
24526
|
+
return /* @__PURE__ */ _(ue, { className: "flex w-max min-w-0 max-w-full gap-0.5", size: "sm", variant: "fill", accentColor: "base", children: [
|
|
24527
|
+
/* @__PURE__ */ _(ye, { className: "shrink-1 min-w-0", size: "sm", variant: "fill", accentColor: "base", children: [
|
|
24528
|
+
/* @__PURE__ */ p(N, { icon: me[e.field.type].icon }),
|
|
24524
24529
|
/* @__PURE__ */ p("span", { className: "truncate", children: e.field.label || Me })
|
|
24525
24530
|
] }),
|
|
24526
|
-
/* @__PURE__ */ p(
|
|
24527
|
-
/* @__PURE__ */
|
|
24531
|
+
/* @__PURE__ */ p(He, { condition: e, children: /* @__PURE__ */ p(B, { type: "button", children: e.modifiers[i].modifier.label }) }),
|
|
24532
|
+
/* @__PURE__ */ _(D.Root, { children: [
|
|
24528
24533
|
/* @__PURE__ */ p(D.ClickTrigger, { children: /* @__PURE__ */ p(B, { type: "button", className: "shrink-1 min-w-0 grow", children: a() }) }),
|
|
24529
|
-
/* @__PURE__ */ p(D.Content, { size: "sm", children: /* @__PURE__ */
|
|
24534
|
+
/* @__PURE__ */ p(D.Content, { size: "sm", children: /* @__PURE__ */ _(
|
|
24530
24535
|
D.SelectGroup,
|
|
24531
24536
|
{
|
|
24532
24537
|
required: !0,
|
|
@@ -24555,7 +24560,7 @@ const c0 = (r) => {
|
|
|
24555
24560
|
isSerializedValueValid: (r) => !0
|
|
24556
24561
|
})
|
|
24557
24562
|
};
|
|
24558
|
-
class nn extends
|
|
24563
|
+
class nn extends Ue {
|
|
24559
24564
|
constructor(t) {
|
|
24560
24565
|
super(t);
|
|
24561
24566
|
R(this, "modifiers", Aa);
|
|
@@ -24585,13 +24590,13 @@ const cr = [], u0 = (r) => {
|
|
|
24585
24590
|
return `${i.length} options`;
|
|
24586
24591
|
}
|
|
24587
24592
|
};
|
|
24588
|
-
return /* @__PURE__ */
|
|
24589
|
-
/* @__PURE__ */
|
|
24590
|
-
/* @__PURE__ */ p(
|
|
24593
|
+
return /* @__PURE__ */ _(ue, { className: "flex w-max min-w-0 max-w-full gap-0.5", size: "sm", variant: "soft", accentColor: "base", children: [
|
|
24594
|
+
/* @__PURE__ */ _(ye, { className: "shrink-1 min-w-0", size: "sm", variant: "soft", accentColor: "base", children: [
|
|
24595
|
+
/* @__PURE__ */ p(N, { icon: me[n.type].icon }),
|
|
24591
24596
|
/* @__PURE__ */ p("span", { className: "truncate", children: n.label || Me })
|
|
24592
24597
|
] }),
|
|
24593
|
-
/* @__PURE__ */ p(
|
|
24594
|
-
/* @__PURE__ */
|
|
24598
|
+
/* @__PURE__ */ p(He, { condition: e, children: /* @__PURE__ */ p(B, { type: "button", children: e.modifiers[a].modifier.label }) }),
|
|
24599
|
+
/* @__PURE__ */ _(D.Root, { children: [
|
|
24595
24600
|
/* @__PURE__ */ p(D.ClickTrigger, { children: /* @__PURE__ */ p(B, { type: "button", className: "truncate", children: s() }) }),
|
|
24596
24601
|
/* @__PURE__ */ p(D.Content, { size: "sm", children: /* @__PURE__ */ p(
|
|
24597
24602
|
Tr,
|
|
@@ -24636,7 +24641,7 @@ const cr = [], u0 = (r) => {
|
|
|
24636
24641
|
isSerializedValueValid: (r) => !0
|
|
24637
24642
|
})
|
|
24638
24643
|
};
|
|
24639
|
-
class an extends
|
|
24644
|
+
class an extends Ue {
|
|
24640
24645
|
constructor(t) {
|
|
24641
24646
|
super(t);
|
|
24642
24647
|
R(this, "modifiers", Ea);
|
|
@@ -24736,12 +24741,12 @@ const dh = (r, e) => se(() => {
|
|
|
24736
24741
|
}
|
|
24737
24742
|
}
|
|
24738
24743
|
};
|
|
24739
|
-
return /* @__PURE__ */
|
|
24740
|
-
/* @__PURE__ */
|
|
24741
|
-
/* @__PURE__ */ p(
|
|
24744
|
+
return /* @__PURE__ */ _(ue, { className: "flex w-max min-w-0 max-w-full gap-0.5", size: "sm", variant: "fill", accentColor: "base", children: [
|
|
24745
|
+
/* @__PURE__ */ _(ye, { className: "shrink-1 min-w-0", size: "sm", variant: "fill", accentColor: "base", children: [
|
|
24746
|
+
/* @__PURE__ */ p(N, { icon: me[e.field.type].icon }),
|
|
24742
24747
|
/* @__PURE__ */ p("span", { className: "truncate", children: e.field.label || Me })
|
|
24743
24748
|
] }),
|
|
24744
|
-
/* @__PURE__ */ p(
|
|
24749
|
+
/* @__PURE__ */ p(He, { condition: e, children: /* @__PURE__ */ p(B, { type: "button", children: e.modifiers[i].modifier.label }) }),
|
|
24745
24750
|
a(),
|
|
24746
24751
|
/* @__PURE__ */ p(Ve, { condition: e, onClick: t })
|
|
24747
24752
|
] });
|
|
@@ -24783,7 +24788,7 @@ const dh = (r, e) => se(() => {
|
|
|
24783
24788
|
isSerializedValueValid: (r) => typeof r == "object" && "to" in r && "from" in r
|
|
24784
24789
|
})
|
|
24785
24790
|
};
|
|
24786
|
-
class on extends
|
|
24791
|
+
class on extends Ue {
|
|
24787
24792
|
constructor(t) {
|
|
24788
24793
|
super(t);
|
|
24789
24794
|
R(this, "modifiers", Sa);
|
|
@@ -24815,13 +24820,13 @@ const f0 = (r) => {
|
|
|
24815
24820
|
return `${i.length} options`;
|
|
24816
24821
|
}
|
|
24817
24822
|
};
|
|
24818
|
-
return /* @__PURE__ */
|
|
24819
|
-
/* @__PURE__ */
|
|
24820
|
-
/* @__PURE__ */ p(
|
|
24823
|
+
return /* @__PURE__ */ _(ue, { className: "flex w-max min-w-0 max-w-full gap-0.5", size: "sm", variant: "fill", accentColor: "base", children: [
|
|
24824
|
+
/* @__PURE__ */ _(ye, { className: "shrink-1 min-w-0", size: "sm", variant: "fill", accentColor: "base", children: [
|
|
24825
|
+
/* @__PURE__ */ p(N, { icon: me[n.type].icon }),
|
|
24821
24826
|
/* @__PURE__ */ p("span", { className: "truncate", children: n.label || Me })
|
|
24822
24827
|
] }),
|
|
24823
|
-
/* @__PURE__ */ p(
|
|
24824
|
-
/* @__PURE__ */
|
|
24828
|
+
/* @__PURE__ */ p(He, { condition: e, children: /* @__PURE__ */ p(B, { type: "button", children: e.modifiers[a].modifier.label }) }),
|
|
24829
|
+
/* @__PURE__ */ _(D.Root, { children: [
|
|
24825
24830
|
/* @__PURE__ */ p(D.ClickTrigger, { children: /* @__PURE__ */ p(B, { type: "button", className: "truncate", children: s() }) }),
|
|
24826
24831
|
/* @__PURE__ */ p(D.Content, { size: "sm", children: /* @__PURE__ */ p(
|
|
24827
24832
|
Tr,
|
|
@@ -24866,7 +24871,7 @@ const f0 = (r) => {
|
|
|
24866
24871
|
isSerializedValueValid: (r) => !0
|
|
24867
24872
|
})
|
|
24868
24873
|
};
|
|
24869
|
-
class sn extends
|
|
24874
|
+
class sn extends Ue {
|
|
24870
24875
|
constructor(t) {
|
|
24871
24876
|
super(t);
|
|
24872
24877
|
R(this, "modifiers", ba);
|
|
@@ -24897,12 +24902,12 @@ const h0 = (r) => {
|
|
|
24897
24902
|
return `${i.length} values`;
|
|
24898
24903
|
}
|
|
24899
24904
|
};
|
|
24900
|
-
return /* @__PURE__ */
|
|
24901
|
-
/* @__PURE__ */
|
|
24902
|
-
/* @__PURE__ */ p(
|
|
24905
|
+
return /* @__PURE__ */ _(ue, { className: "flex w-max min-w-0 max-w-full gap-0.5", size: "sm", variant: "fill", accentColor: "base", children: [
|
|
24906
|
+
/* @__PURE__ */ _(ye, { className: "shrink-1 min-w-0", size: "sm", variant: "fill", accentColor: "base", children: [
|
|
24907
|
+
/* @__PURE__ */ p(N, { icon: me[n.type].icon }),
|
|
24903
24908
|
/* @__PURE__ */ p("span", { className: "truncate", children: n.label || Me })
|
|
24904
24909
|
] }),
|
|
24905
|
-
/* @__PURE__ */ p(
|
|
24910
|
+
/* @__PURE__ */ p(He, { condition: e, children: /* @__PURE__ */ p(B, { type: "button", children: e.modifiers[a].modifier.label }) }),
|
|
24906
24911
|
/* @__PURE__ */ p(hs, { values: i ?? cr, onValuesChange: o, children: /* @__PURE__ */ p(B, { type: "button", className: "truncate", children: s() }) }),
|
|
24907
24912
|
/* @__PURE__ */ p(Ve, { condition: e, onClick: t })
|
|
24908
24913
|
] });
|
|
@@ -24938,7 +24943,7 @@ const h0 = (r) => {
|
|
|
24938
24943
|
isSerializedValueValid: (r) => !0
|
|
24939
24944
|
})
|
|
24940
24945
|
};
|
|
24941
|
-
class ln extends
|
|
24946
|
+
class ln extends Ue {
|
|
24942
24947
|
constructor(t) {
|
|
24943
24948
|
super(t);
|
|
24944
24949
|
R(this, "modifiers", Ia);
|
|
@@ -24978,7 +24983,7 @@ const p0 = (r) => {
|
|
|
24978
24983
|
case "inRange":
|
|
24979
24984
|
case "notInRange": {
|
|
24980
24985
|
const l = e.modifiers.inRange, c = i !== void 0 && l.isConditionValueValid(i) ? i : void 0;
|
|
24981
|
-
return /* @__PURE__ */
|
|
24986
|
+
return /* @__PURE__ */ _(Le, { children: [
|
|
24982
24987
|
/* @__PURE__ */ p(
|
|
24983
24988
|
Vt,
|
|
24984
24989
|
{
|
|
@@ -25011,12 +25016,12 @@ const p0 = (r) => {
|
|
|
25011
25016
|
}
|
|
25012
25017
|
}
|
|
25013
25018
|
};
|
|
25014
|
-
return /* @__PURE__ */
|
|
25015
|
-
/* @__PURE__ */
|
|
25016
|
-
/* @__PURE__ */ p(
|
|
25019
|
+
return /* @__PURE__ */ _(ue, { className: "flex w-max min-w-0 max-w-full gap-0.5", size: "sm", variant: "fill", accentColor: "base", children: [
|
|
25020
|
+
/* @__PURE__ */ _(ye, { className: "shrink-1 min-w-0", size: "sm", variant: "fill", accentColor: "base", children: [
|
|
25021
|
+
/* @__PURE__ */ p(N, { icon: me[n.type].icon }),
|
|
25017
25022
|
/* @__PURE__ */ p("span", { className: "truncate", children: n.label || Me })
|
|
25018
25023
|
] }),
|
|
25019
|
-
/* @__PURE__ */ p(
|
|
25024
|
+
/* @__PURE__ */ p(He, { condition: e, children: /* @__PURE__ */ p(B, { type: "button", children: e.modifiers[a].modifier.label }) }),
|
|
25020
25025
|
s(),
|
|
25021
25026
|
/* @__PURE__ */ p(Ve, { condition: e, onClick: t })
|
|
25022
25027
|
] });
|
|
@@ -25070,7 +25075,7 @@ const p0 = (r) => {
|
|
|
25070
25075
|
isSerializedValueValid: (r) => typeof r == "object"
|
|
25071
25076
|
})
|
|
25072
25077
|
};
|
|
25073
|
-
class cn extends
|
|
25078
|
+
class cn extends Ue {
|
|
25074
25079
|
constructor(t) {
|
|
25075
25080
|
super(t);
|
|
25076
25081
|
R(this, "modifiers", Oa);
|
|
@@ -25104,12 +25109,12 @@ const v0 = (r) => {
|
|
|
25104
25109
|
);
|
|
25105
25110
|
}
|
|
25106
25111
|
};
|
|
25107
|
-
return /* @__PURE__ */
|
|
25108
|
-
/* @__PURE__ */
|
|
25109
|
-
/* @__PURE__ */ p(
|
|
25112
|
+
return /* @__PURE__ */ _(ue, { className: "flex w-max min-w-0 max-w-full gap-0.5", size: "sm", variant: "fill", accentColor: "base", children: [
|
|
25113
|
+
/* @__PURE__ */ _(ye, { className: "shrink-1 min-w-0", size: "sm", variant: "fill", accentColor: "base", children: [
|
|
25114
|
+
/* @__PURE__ */ p(N, { icon: me[n.type].icon }),
|
|
25110
25115
|
/* @__PURE__ */ p("span", { className: "truncate", children: n.label || Me })
|
|
25111
25116
|
] }),
|
|
25112
|
-
/* @__PURE__ */ p(
|
|
25117
|
+
/* @__PURE__ */ p(He, { condition: e, children: /* @__PURE__ */ p(B, { type: "button", children: e.modifiers[a].modifier.label }) }),
|
|
25113
25118
|
o(),
|
|
25114
25119
|
/* @__PURE__ */ p(Ve, { condition: e, onClick: t })
|
|
25115
25120
|
] });
|
|
@@ -25139,7 +25144,7 @@ const v0 = (r) => {
|
|
|
25139
25144
|
isSerializedValueValid: (r) => !0
|
|
25140
25145
|
})
|
|
25141
25146
|
};
|
|
25142
|
-
class un extends
|
|
25147
|
+
class un extends Ue {
|
|
25143
25148
|
constructor(t) {
|
|
25144
25149
|
super(t);
|
|
25145
25150
|
R(this, "modifiers", Na);
|
|
@@ -25158,7 +25163,7 @@ const g0 = (r) => {
|
|
|
25158
25163
|
case "equals":
|
|
25159
25164
|
case "notEquals": {
|
|
25160
25165
|
const s = e.modifiers.equals, l = i !== void 0 && s.isConditionValueValid(i) ? i : void 0;
|
|
25161
|
-
return /* @__PURE__ */
|
|
25166
|
+
return /* @__PURE__ */ _(D.Root, { children: [
|
|
25162
25167
|
/* @__PURE__ */ p(D.ClickTrigger, { children: /* @__PURE__ */ p(B, { type: "button", className: "shrink-1 min-w-0 grow", children: /* @__PURE__ */ p("span", { className: "truncate", children: l !== void 0 ? l ? $t[l].label : "empty" : "..." }) }) }),
|
|
25163
25168
|
/* @__PURE__ */ p(D.Content, { size: "sm", children: /* @__PURE__ */ p(
|
|
25164
25169
|
D.SelectGroup,
|
|
@@ -25177,9 +25182,9 @@ const g0 = (r) => {
|
|
|
25177
25182
|
case "includes":
|
|
25178
25183
|
case "excludes": {
|
|
25179
25184
|
const s = e.modifiers.includes, l = i !== void 0 && s.isConditionValueValid(i) ? i : void 0;
|
|
25180
|
-
return /* @__PURE__ */
|
|
25185
|
+
return /* @__PURE__ */ _(D.Root, { children: [
|
|
25181
25186
|
/* @__PURE__ */ p(D.ClickTrigger, { children: /* @__PURE__ */ p(B, { type: "button", children: l ? `${l.length} statuses` : "..." }) }),
|
|
25182
|
-
/* @__PURE__ */ p(D.Content, { size: "sm", children: /* @__PURE__ */
|
|
25187
|
+
/* @__PURE__ */ p(D.Content, { size: "sm", children: /* @__PURE__ */ _(
|
|
25183
25188
|
D.MultiSelectGroup,
|
|
25184
25189
|
{
|
|
25185
25190
|
values: l ?? cr,
|
|
@@ -25188,8 +25193,8 @@ const g0 = (r) => {
|
|
|
25188
25193
|
/* @__PURE__ */ p(bi, { children: "Select all" }),
|
|
25189
25194
|
wr.map((c) => {
|
|
25190
25195
|
const { label: u, icon: d } = $t[c];
|
|
25191
|
-
return /* @__PURE__ */
|
|
25192
|
-
/* @__PURE__ */ p(
|
|
25196
|
+
return /* @__PURE__ */ _(fs, { value: c, children: [
|
|
25197
|
+
/* @__PURE__ */ p(N, { icon: d }),
|
|
25193
25198
|
/* @__PURE__ */ p("span", { className: "truncate", children: u })
|
|
25194
25199
|
] }, c);
|
|
25195
25200
|
})
|
|
@@ -25200,12 +25205,12 @@ const g0 = (r) => {
|
|
|
25200
25205
|
}
|
|
25201
25206
|
}
|
|
25202
25207
|
};
|
|
25203
|
-
return /* @__PURE__ */
|
|
25204
|
-
/* @__PURE__ */
|
|
25205
|
-
/* @__PURE__ */ p(
|
|
25208
|
+
return /* @__PURE__ */ _(ue, { className: "flex w-max min-w-0 max-w-full gap-0.5", size: "sm", variant: "fill", accentColor: "base", children: [
|
|
25209
|
+
/* @__PURE__ */ _(ye, { className: "shrink-1 min-w-0", size: "sm", variant: "fill", accentColor: "base", children: [
|
|
25210
|
+
/* @__PURE__ */ p(N, { icon: me[n.type].icon }),
|
|
25206
25211
|
/* @__PURE__ */ p("span", { className: "truncate", children: n.label || Me })
|
|
25207
25212
|
] }),
|
|
25208
|
-
/* @__PURE__ */ p(
|
|
25213
|
+
/* @__PURE__ */ p(He, { condition: e, children: /* @__PURE__ */ p(B, { type: "button", children: e.modifiers[a].modifier.label }) }),
|
|
25209
25214
|
o(),
|
|
25210
25215
|
/* @__PURE__ */ p(Ve, { condition: e, onClick: t })
|
|
25211
25216
|
] });
|
|
@@ -25235,7 +25240,7 @@ const g0 = (r) => {
|
|
|
25235
25240
|
isSerializedValueValid: (r) => Array.isArray(r)
|
|
25236
25241
|
})
|
|
25237
25242
|
};
|
|
25238
|
-
class dn extends
|
|
25243
|
+
class dn extends Ue {
|
|
25239
25244
|
constructor(t) {
|
|
25240
25245
|
super(t);
|
|
25241
25246
|
R(this, "modifiers", Ta);
|
|
@@ -25270,7 +25275,7 @@ const x0 = (r) => {
|
|
|
25270
25275
|
case "equals":
|
|
25271
25276
|
case "notEquals": {
|
|
25272
25277
|
const c = e.modifiers.equals, u = i !== void 0 && c.isConditionValueValid(i) ? i : void 0;
|
|
25273
|
-
return /* @__PURE__ */
|
|
25278
|
+
return /* @__PURE__ */ _(D.Root, { children: [
|
|
25274
25279
|
/* @__PURE__ */ p(D.ClickTrigger, { children: /* @__PURE__ */ p(B, { type: "button", className: "shrink-1 min-w-0 grow", children: /* @__PURE__ */ p("span", { className: "truncate", children: u !== void 0 ? u ? s[u] : "empty" : "..." }) }) }),
|
|
25275
25280
|
/* @__PURE__ */ p(D.Content, { size: "sm", children: /* @__PURE__ */ p(
|
|
25276
25281
|
Ii,
|
|
@@ -25286,7 +25291,7 @@ const x0 = (r) => {
|
|
|
25286
25291
|
case "includes":
|
|
25287
25292
|
case "excludes": {
|
|
25288
25293
|
const c = e.modifiers.includes, u = i !== void 0 && c.isConditionValueValid(i) ? i : void 0;
|
|
25289
|
-
return /* @__PURE__ */
|
|
25294
|
+
return /* @__PURE__ */ _(D.Root, { children: [
|
|
25290
25295
|
/* @__PURE__ */ p(D.ClickTrigger, { children: /* @__PURE__ */ p(B, { type: "button", children: u ? `${u.length} options` : "..." }) }),
|
|
25291
25296
|
/* @__PURE__ */ p(D.Content, { size: "sm", children: /* @__PURE__ */ p(
|
|
25292
25297
|
Tr,
|
|
@@ -25300,12 +25305,12 @@ const x0 = (r) => {
|
|
|
25300
25305
|
}
|
|
25301
25306
|
}
|
|
25302
25307
|
};
|
|
25303
|
-
return /* @__PURE__ */
|
|
25304
|
-
/* @__PURE__ */
|
|
25305
|
-
/* @__PURE__ */ p(
|
|
25308
|
+
return /* @__PURE__ */ _(ue, { className: "flex w-max min-w-0 max-w-full gap-0.5", size: "sm", variant: "fill", accentColor: "base", children: [
|
|
25309
|
+
/* @__PURE__ */ _(ye, { className: "shrink-1 min-w-0", size: "sm", variant: "fill", accentColor: "base", children: [
|
|
25310
|
+
/* @__PURE__ */ p(N, { icon: me[n.type].icon }),
|
|
25306
25311
|
/* @__PURE__ */ p("span", { className: "truncate", children: n.label || Me })
|
|
25307
25312
|
] }),
|
|
25308
|
-
/* @__PURE__ */ p(
|
|
25313
|
+
/* @__PURE__ */ p(He, { condition: e, children: /* @__PURE__ */ p(B, { type: "button", children: e.modifiers[a].modifier.label }) }),
|
|
25309
25314
|
l(),
|
|
25310
25315
|
/* @__PURE__ */ p(Ve, { condition: e, onClick: t })
|
|
25311
25316
|
] });
|
|
@@ -25335,7 +25340,7 @@ const x0 = (r) => {
|
|
|
25335
25340
|
isSerializedValueValid: (r) => Array.isArray(r)
|
|
25336
25341
|
})
|
|
25337
25342
|
};
|
|
25338
|
-
class fn extends
|
|
25343
|
+
class fn extends Ue {
|
|
25339
25344
|
constructor(t) {
|
|
25340
25345
|
super(t);
|
|
25341
25346
|
R(this, "modifiers", Da);
|
|
@@ -25374,7 +25379,7 @@ const y0 = (r) => {
|
|
|
25374
25379
|
case "inRange":
|
|
25375
25380
|
case "notInRange": {
|
|
25376
25381
|
const s = e.modifiers.inRange, l = i !== void 0 && s.isConditionValueValid(i) ? i : void 0;
|
|
25377
|
-
return /* @__PURE__ */
|
|
25382
|
+
return /* @__PURE__ */ _(Le, { children: [
|
|
25378
25383
|
/* @__PURE__ */ p(
|
|
25379
25384
|
Vt,
|
|
25380
25385
|
{
|
|
@@ -25407,12 +25412,12 @@ const y0 = (r) => {
|
|
|
25407
25412
|
}
|
|
25408
25413
|
}
|
|
25409
25414
|
};
|
|
25410
|
-
return /* @__PURE__ */
|
|
25411
|
-
/* @__PURE__ */
|
|
25412
|
-
/* @__PURE__ */ p(
|
|
25415
|
+
return /* @__PURE__ */ _(ue, { className: "flex w-max min-w-0 max-w-full gap-0.5", size: "sm", variant: "fill", accentColor: "base", children: [
|
|
25416
|
+
/* @__PURE__ */ _(ye, { className: "shrink-1 min-w-0", size: "sm", variant: "fill", accentColor: "base", children: [
|
|
25417
|
+
/* @__PURE__ */ p(N, { icon: me[n.type].icon }),
|
|
25413
25418
|
/* @__PURE__ */ p("span", { className: "truncate", children: n.label || Me })
|
|
25414
25419
|
] }),
|
|
25415
|
-
/* @__PURE__ */ p(
|
|
25420
|
+
/* @__PURE__ */ p(He, { condition: e, children: /* @__PURE__ */ p(B, { type: "button", children: e.modifiers[a].modifier.label }) }),
|
|
25416
25421
|
o(),
|
|
25417
25422
|
/* @__PURE__ */ p(Ve, { condition: e, onClick: t })
|
|
25418
25423
|
] });
|
|
@@ -25466,7 +25471,7 @@ const y0 = (r) => {
|
|
|
25466
25471
|
isSerializedValueValid: (r) => typeof r == "object"
|
|
25467
25472
|
})
|
|
25468
25473
|
};
|
|
25469
|
-
class hn extends
|
|
25474
|
+
class hn extends Ue {
|
|
25470
25475
|
constructor(t) {
|
|
25471
25476
|
super(t);
|
|
25472
25477
|
R(this, "modifiers", Ra);
|
|
@@ -25500,12 +25505,12 @@ const m0 = (r) => {
|
|
|
25500
25505
|
);
|
|
25501
25506
|
}
|
|
25502
25507
|
};
|
|
25503
|
-
return /* @__PURE__ */
|
|
25504
|
-
/* @__PURE__ */
|
|
25505
|
-
/* @__PURE__ */ p(
|
|
25508
|
+
return /* @__PURE__ */ _(ue, { className: "flex w-max min-w-0 max-w-full gap-0.5", size: "sm", variant: "fill", accentColor: "base", children: [
|
|
25509
|
+
/* @__PURE__ */ _(ye, { className: "shrink-1 min-w-0", size: "sm", variant: "fill", accentColor: "base", children: [
|
|
25510
|
+
/* @__PURE__ */ p(N, { icon: me[n.type].icon }),
|
|
25506
25511
|
/* @__PURE__ */ p("span", { className: "truncate", children: n.label || Me })
|
|
25507
25512
|
] }),
|
|
25508
|
-
/* @__PURE__ */ p(
|
|
25513
|
+
/* @__PURE__ */ p(He, { condition: e, children: /* @__PURE__ */ p(B, { type: "button", children: e.modifiers[a].modifier.label }) }),
|
|
25509
25514
|
o(),
|
|
25510
25515
|
/* @__PURE__ */ p(Ve, { condition: e, onClick: t })
|
|
25511
25516
|
] });
|
|
@@ -25535,7 +25540,7 @@ const m0 = (r) => {
|
|
|
25535
25540
|
isSerializedValueValid: (r) => !0
|
|
25536
25541
|
})
|
|
25537
25542
|
};
|
|
25538
|
-
class pn extends
|
|
25543
|
+
class pn extends Ue {
|
|
25539
25544
|
constructor(t) {
|
|
25540
25545
|
super(t);
|
|
25541
25546
|
R(this, "modifiers", Ma);
|
|
@@ -25569,7 +25574,7 @@ const C0 = (r) => {
|
|
|
25569
25574
|
case "equals":
|
|
25570
25575
|
case "notEquals": {
|
|
25571
25576
|
const u = e.modifiers.equals, d = i !== void 0 && u.isConditionValueValid(i) ? i : void 0;
|
|
25572
|
-
return /* @__PURE__ */
|
|
25577
|
+
return /* @__PURE__ */ _(D.Root, { children: [
|
|
25573
25578
|
/* @__PURE__ */ p(D.ClickTrigger, { children: /* @__PURE__ */ p(B, { type: "button", className: "shrink-1 min-w-0 grow", children: /* @__PURE__ */ p("span", { className: "truncate", children: d !== void 0 ? d ? s[d] : "empty" : "..." }) }) }),
|
|
25574
25579
|
/* @__PURE__ */ p(D.Content, { size: "sm", children: /* @__PURE__ */ p(
|
|
25575
25580
|
Ii,
|
|
@@ -25585,7 +25590,7 @@ const C0 = (r) => {
|
|
|
25585
25590
|
case "includes":
|
|
25586
25591
|
case "excludes": {
|
|
25587
25592
|
const u = e.modifiers.includes, d = i !== void 0 && u.isConditionValueValid(i) ? i : void 0;
|
|
25588
|
-
return /* @__PURE__ */
|
|
25593
|
+
return /* @__PURE__ */ _(D.Root, { children: [
|
|
25589
25594
|
/* @__PURE__ */ p(D.ClickTrigger, { children: /* @__PURE__ */ p(B, { type: "button", children: d ? `${d.length} options` : "..." }) }),
|
|
25590
25595
|
/* @__PURE__ */ p(D.Content, { size: "sm", children: /* @__PURE__ */ p(
|
|
25591
25596
|
Tr,
|
|
@@ -25599,12 +25604,12 @@ const C0 = (r) => {
|
|
|
25599
25604
|
}
|
|
25600
25605
|
}
|
|
25601
25606
|
};
|
|
25602
|
-
return /* @__PURE__ */
|
|
25603
|
-
/* @__PURE__ */
|
|
25604
|
-
/* @__PURE__ */ p(
|
|
25607
|
+
return /* @__PURE__ */ _(ue, { className: "flex w-max min-w-0 max-w-full gap-0.5", size: "sm", variant: "fill", accentColor: "base", children: [
|
|
25608
|
+
/* @__PURE__ */ _(ye, { className: "shrink-1 min-w-0", size: "sm", variant: "fill", accentColor: "base", children: [
|
|
25609
|
+
/* @__PURE__ */ p(N, { icon: me[n.type].icon }),
|
|
25605
25610
|
/* @__PURE__ */ p("span", { className: "truncate", children: n.label || Me })
|
|
25606
25611
|
] }),
|
|
25607
|
-
/* @__PURE__ */ p(
|
|
25612
|
+
/* @__PURE__ */ p(He, { condition: e, children: /* @__PURE__ */ p(B, { type: "button", children: e.modifiers[a].modifier.label }) }),
|
|
25608
25613
|
c(),
|
|
25609
25614
|
/* @__PURE__ */ p(Ve, { condition: e, onClick: t })
|
|
25610
25615
|
] });
|
|
@@ -25634,7 +25639,7 @@ const C0 = (r) => {
|
|
|
25634
25639
|
isSerializedValueValid: (r) => Array.isArray(r)
|
|
25635
25640
|
})
|
|
25636
25641
|
};
|
|
25637
|
-
class vn extends
|
|
25642
|
+
class vn extends Ue {
|
|
25638
25643
|
constructor(t) {
|
|
25639
25644
|
super(t);
|
|
25640
25645
|
R(this, "modifiers", Va);
|
|
@@ -25668,12 +25673,12 @@ const w0 = (r) => {
|
|
|
25668
25673
|
);
|
|
25669
25674
|
}
|
|
25670
25675
|
};
|
|
25671
|
-
return /* @__PURE__ */
|
|
25672
|
-
/* @__PURE__ */
|
|
25673
|
-
/* @__PURE__ */ p(
|
|
25676
|
+
return /* @__PURE__ */ _(ue, { className: "flex w-max min-w-0 max-w-full gap-0.5", size: "sm", variant: "fill", accentColor: "base", children: [
|
|
25677
|
+
/* @__PURE__ */ _(ye, { className: "shrink-1 min-w-0", size: "sm", variant: "fill", accentColor: "base", children: [
|
|
25678
|
+
/* @__PURE__ */ p(N, { icon: me[n.type].icon }),
|
|
25674
25679
|
/* @__PURE__ */ p("span", { className: "truncate", children: n.label || Me })
|
|
25675
25680
|
] }),
|
|
25676
|
-
/* @__PURE__ */ p(
|
|
25681
|
+
/* @__PURE__ */ p(He, { condition: e, children: /* @__PURE__ */ p(B, { type: "button", children: e.modifiers[a].modifier.label }) }),
|
|
25677
25682
|
o(),
|
|
25678
25683
|
/* @__PURE__ */ p(Ve, { condition: e, onClick: t })
|
|
25679
25684
|
] });
|
|
@@ -25703,7 +25708,7 @@ const w0 = (r) => {
|
|
|
25703
25708
|
isSerializedValueValid: (r) => !0
|
|
25704
25709
|
})
|
|
25705
25710
|
};
|
|
25706
|
-
class gn extends
|
|
25711
|
+
class gn extends Ue {
|
|
25707
25712
|
constructor(t) {
|
|
25708
25713
|
super(t);
|
|
25709
25714
|
R(this, "modifiers", Fa);
|
|
@@ -25734,12 +25739,12 @@ const _0 = (r) => {
|
|
|
25734
25739
|
);
|
|
25735
25740
|
}
|
|
25736
25741
|
};
|
|
25737
|
-
return /* @__PURE__ */
|
|
25738
|
-
/* @__PURE__ */
|
|
25739
|
-
/* @__PURE__ */ p(
|
|
25742
|
+
return /* @__PURE__ */ _(ue, { className: "flex w-max min-w-0 max-w-full gap-0.5", size: "sm", variant: "fill", accentColor: "base", children: [
|
|
25743
|
+
/* @__PURE__ */ _(ye, { className: "shrink-1 min-w-0", size: "sm", variant: "fill", accentColor: "base", children: [
|
|
25744
|
+
/* @__PURE__ */ p(N, { icon: me[n.type].icon }),
|
|
25740
25745
|
/* @__PURE__ */ p("span", { className: "truncate", children: n.label || Me })
|
|
25741
25746
|
] }),
|
|
25742
|
-
/* @__PURE__ */ p(
|
|
25747
|
+
/* @__PURE__ */ p(He, { condition: e, children: /* @__PURE__ */ p(B, { type: "button", children: e.modifiers[a].modifier.label }) }),
|
|
25743
25748
|
o(),
|
|
25744
25749
|
/* @__PURE__ */ p(Ve, { condition: e, onClick: t })
|
|
25745
25750
|
] });
|
|
@@ -25769,7 +25774,7 @@ const _0 = (r) => {
|
|
|
25769
25774
|
isSerializedValueValid: (r) => !0
|
|
25770
25775
|
})
|
|
25771
25776
|
};
|
|
25772
|
-
class xn extends
|
|
25777
|
+
class xn extends Ue {
|
|
25773
25778
|
constructor(t) {
|
|
25774
25779
|
super(t);
|
|
25775
25780
|
R(this, "modifiers", Pa);
|
|
@@ -25805,7 +25810,7 @@ const A0 = (r) => {
|
|
|
25805
25810
|
const o = n && typeof n == "object" ? n : void 0, s = (l) => {
|
|
25806
25811
|
e.setConditionValue(l.from || l.to ? l : void 0);
|
|
25807
25812
|
};
|
|
25808
|
-
return /* @__PURE__ */
|
|
25813
|
+
return /* @__PURE__ */ _(Le, { children: [
|
|
25809
25814
|
/* @__PURE__ */ p(
|
|
25810
25815
|
Ur,
|
|
25811
25816
|
{
|
|
@@ -25828,12 +25833,12 @@ const A0 = (r) => {
|
|
|
25828
25833
|
}
|
|
25829
25834
|
}
|
|
25830
25835
|
};
|
|
25831
|
-
return /* @__PURE__ */
|
|
25832
|
-
/* @__PURE__ */
|
|
25833
|
-
/* @__PURE__ */ p(
|
|
25836
|
+
return /* @__PURE__ */ _(ue, { className: "flex w-max min-w-0 max-w-full gap-0.5", size: "sm", variant: "fill", accentColor: "base", children: [
|
|
25837
|
+
/* @__PURE__ */ _(ye, { className: "shrink-1 min-w-0", size: "sm", variant: "fill", accentColor: "base", children: [
|
|
25838
|
+
/* @__PURE__ */ p(N, { icon: me[e.field.type].icon }),
|
|
25834
25839
|
/* @__PURE__ */ p("span", { className: "truncate", children: e.field.label || Me })
|
|
25835
25840
|
] }),
|
|
25836
|
-
/* @__PURE__ */ p(
|
|
25841
|
+
/* @__PURE__ */ p(He, { condition: e, children: /* @__PURE__ */ p(B, { type: "button", children: e.modifiers[i].modifier.label }) }),
|
|
25837
25842
|
a(),
|
|
25838
25843
|
/* @__PURE__ */ p(Ve, { condition: e, onClick: t })
|
|
25839
25844
|
] });
|
|
@@ -25875,7 +25880,7 @@ const A0 = (r) => {
|
|
|
25875
25880
|
isSerializedValueValid: (r) => Pr(r)
|
|
25876
25881
|
})
|
|
25877
25882
|
};
|
|
25878
|
-
class yn extends
|
|
25883
|
+
class yn extends Ue {
|
|
25879
25884
|
constructor(t) {
|
|
25880
25885
|
super(t);
|
|
25881
25886
|
R(this, "modifiers", Ba);
|
|
@@ -25904,15 +25909,15 @@ const E0 = (r) => {
|
|
|
25904
25909
|
return "empty";
|
|
25905
25910
|
}
|
|
25906
25911
|
};
|
|
25907
|
-
return /* @__PURE__ */
|
|
25908
|
-
/* @__PURE__ */
|
|
25909
|
-
/* @__PURE__ */ p(
|
|
25912
|
+
return /* @__PURE__ */ _(ue, { className: "flex w-max min-w-0 max-w-full gap-0.5", size: "sm", variant: "fill", accentColor: "base", children: [
|
|
25913
|
+
/* @__PURE__ */ _(ye, { className: "shrink-1 min-w-0", size: "sm", variant: "fill", accentColor: "base", children: [
|
|
25914
|
+
/* @__PURE__ */ p(N, { icon: me[n.type].icon }),
|
|
25910
25915
|
/* @__PURE__ */ p("span", { className: "truncate", children: n.label || Me })
|
|
25911
25916
|
] }),
|
|
25912
|
-
/* @__PURE__ */ p(
|
|
25913
|
-
/* @__PURE__ */
|
|
25917
|
+
/* @__PURE__ */ p(He, { condition: e, children: /* @__PURE__ */ p(B, { type: "button", children: e.modifiers[a].modifier.label }) }),
|
|
25918
|
+
/* @__PURE__ */ _(D.Root, { children: [
|
|
25914
25919
|
/* @__PURE__ */ p(D.ClickTrigger, { children: /* @__PURE__ */ p(B, { type: "button", className: "shrink-1 min-w-0 grow", children: o() }) }),
|
|
25915
|
-
/* @__PURE__ */ p(D.Content, { size: "sm", children: /* @__PURE__ */
|
|
25920
|
+
/* @__PURE__ */ p(D.Content, { size: "sm", children: /* @__PURE__ */ _(
|
|
25916
25921
|
D.SelectGroup,
|
|
25917
25922
|
{
|
|
25918
25923
|
required: !0,
|
|
@@ -25941,7 +25946,7 @@ const E0 = (r) => {
|
|
|
25941
25946
|
isSerializedValueValid: (r) => !0
|
|
25942
25947
|
})
|
|
25943
25948
|
};
|
|
25944
|
-
class mn extends
|
|
25949
|
+
class mn extends Ue {
|
|
25945
25950
|
constructor(t) {
|
|
25946
25951
|
super(t);
|
|
25947
25952
|
R(this, "modifiers", ka);
|
|
@@ -25972,12 +25977,12 @@ const S0 = (r) => {
|
|
|
25972
25977
|
);
|
|
25973
25978
|
}
|
|
25974
25979
|
};
|
|
25975
|
-
return /* @__PURE__ */
|
|
25976
|
-
/* @__PURE__ */
|
|
25977
|
-
/* @__PURE__ */ p(
|
|
25980
|
+
return /* @__PURE__ */ _(ue, { className: "flex w-max min-w-0 max-w-full gap-0.5", size: "sm", variant: "fill", accentColor: "base", children: [
|
|
25981
|
+
/* @__PURE__ */ _(ye, { className: "shrink-1 min-w-0", size: "sm", variant: "fill", accentColor: "base", children: [
|
|
25982
|
+
/* @__PURE__ */ p(N, { icon: me[n.type].icon }),
|
|
25978
25983
|
/* @__PURE__ */ p("span", { className: "truncate", children: n.label || Me })
|
|
25979
25984
|
] }),
|
|
25980
|
-
/* @__PURE__ */ p(
|
|
25985
|
+
/* @__PURE__ */ p(He, { condition: e, children: /* @__PURE__ */ p(B, { type: "button", children: e.modifiers[a].modifier.label }) }),
|
|
25981
25986
|
o(),
|
|
25982
25987
|
/* @__PURE__ */ p(Ve, { condition: e, onClick: t })
|
|
25983
25988
|
] });
|
|
@@ -26007,7 +26012,7 @@ const S0 = (r) => {
|
|
|
26007
26012
|
isSerializedValueValid: (r) => !0
|
|
26008
26013
|
})
|
|
26009
26014
|
};
|
|
26010
|
-
class Cn extends
|
|
26015
|
+
class Cn extends Ue {
|
|
26011
26016
|
constructor(t) {
|
|
26012
26017
|
super(t);
|
|
26013
26018
|
R(this, "modifiers", La);
|
|
@@ -26219,10 +26224,10 @@ const V0 = (r, e) => {
|
|
|
26219
26224
|
const h = f.getConditions(e.identifier);
|
|
26220
26225
|
return new Oi(h).applyConditions(i);
|
|
26221
26226
|
}), [c, e, i]), d = Ln(e.fields);
|
|
26222
|
-
return u ? /* @__PURE__ */
|
|
26227
|
+
return u ? /* @__PURE__ */ _(Le, { children: [
|
|
26223
26228
|
l !== 0 ? /* @__PURE__ */ p(Ft, { size: "full" }) : null,
|
|
26224
|
-
/* @__PURE__ */
|
|
26225
|
-
(t || n) && /* @__PURE__ */ p(
|
|
26229
|
+
/* @__PURE__ */ _("div", { className: "flex flex-col gap-4", children: [
|
|
26230
|
+
(t || n) && /* @__PURE__ */ p(Le, { children: /* @__PURE__ */ _("div", { className: "flex flex-col gap-1", children: [
|
|
26226
26231
|
/* @__PURE__ */ p(Gs, { size: o, children: t }),
|
|
26227
26232
|
n && /* @__PURE__ */ p(pe, { accentColor: "base", size: o, children: n })
|
|
26228
26233
|
] }) }),
|
|
@@ -26387,11 +26392,11 @@ const gt = jr({}), wn = L((r) => {
|
|
|
26387
26392
|
}
|
|
26388
26393
|
return l;
|
|
26389
26394
|
}, []);
|
|
26390
|
-
return /* @__PURE__ */
|
|
26395
|
+
return /* @__PURE__ */ _(D.Root, { ...o, children: [
|
|
26391
26396
|
/* @__PURE__ */ p(D.ClickTrigger, { children: e }),
|
|
26392
26397
|
/* @__PURE__ */ p(D.Content, { variant: t, size: n, accentColor: i, children: /* @__PURE__ */ p(D.Scroll, { children: Object.entries(s).map(([l, c]) => {
|
|
26393
26398
|
const { name: u } = z1[l];
|
|
26394
|
-
return c.length === 0 ? null : /* @__PURE__ */
|
|
26399
|
+
return c.length === 0 ? null : /* @__PURE__ */ _(D.Group, { children: [
|
|
26395
26400
|
/* @__PURE__ */ p(D.Label, { children: u }),
|
|
26396
26401
|
c.map((d) => /* @__PURE__ */ p(
|
|
26397
26402
|
ws,
|
|
@@ -26410,8 +26415,8 @@ const ws = L((r) => {
|
|
|
26410
26415
|
const { fieldType: e, onSelectFieldType: t } = r, n = b(() => {
|
|
26411
26416
|
t(e);
|
|
26412
26417
|
}, [e, t]), { icon: i, name: a } = me[e];
|
|
26413
|
-
return /* @__PURE__ */
|
|
26414
|
-
/* @__PURE__ */ p(
|
|
26418
|
+
return /* @__PURE__ */ _(D.Item, { onSelect: n, children: [
|
|
26419
|
+
/* @__PURE__ */ p(N, { icon: i }),
|
|
26415
26420
|
/* @__PURE__ */ p(pe, { className: "truncate", children: a })
|
|
26416
26421
|
] });
|
|
26417
26422
|
});
|
|
@@ -26427,7 +26432,7 @@ const Ri = (r) => {
|
|
|
26427
26432
|
identifier: G()
|
|
26428
26433
|
});
|
|
26429
26434
|
case "number":
|
|
26430
|
-
return new
|
|
26435
|
+
return new Je({
|
|
26431
26436
|
label: "",
|
|
26432
26437
|
required: !1,
|
|
26433
26438
|
identifier: G()
|
|
@@ -26652,7 +26657,7 @@ const Ri = (r) => {
|
|
|
26652
26657
|
case "multi-select":
|
|
26653
26658
|
return bt.getFieldCreationSchema(e);
|
|
26654
26659
|
case "number":
|
|
26655
|
-
return
|
|
26660
|
+
return Je.getFieldCreationSchema(e);
|
|
26656
26661
|
case "radio":
|
|
26657
26662
|
return Jt.getFieldCreationSchema(e);
|
|
26658
26663
|
case "select":
|
|
@@ -26674,9 +26679,9 @@ const Ri = (r) => {
|
|
|
26674
26679
|
}
|
|
26675
26680
|
}, Es = L((r) => {
|
|
26676
26681
|
const { popoverInputs: e, ...t } = r;
|
|
26677
|
-
return /* @__PURE__ */
|
|
26678
|
-
/* @__PURE__ */ p(xe.Trigger, { asChild: !0, children: /* @__PURE__ */
|
|
26679
|
-
/* @__PURE__ */ p(
|
|
26682
|
+
return /* @__PURE__ */ _(xe.Root, { children: [
|
|
26683
|
+
/* @__PURE__ */ p(xe.Trigger, { asChild: !0, children: /* @__PURE__ */ _(B, { variant: "soft", type: "button", size: "sm", accentColor: "base", children: [
|
|
26684
|
+
/* @__PURE__ */ p(N, { icon: wc }),
|
|
26680
26685
|
"Settings"
|
|
26681
26686
|
] }) }),
|
|
26682
26687
|
/* @__PURE__ */ p(xe.Content, { size: "sm", ...t, children: /* @__PURE__ */ p("div", { className: Ct("flex w-full max-w-[350px] flex-col", Di({ size: "sm" })), children: e }) })
|
|
@@ -26684,7 +26689,7 @@ const Ri = (r) => {
|
|
|
26684
26689
|
});
|
|
26685
26690
|
Es.displayName = "FieldSettingsPopover";
|
|
26686
26691
|
const Ss = L((r) => {
|
|
26687
|
-
const { parentPath: e, fieldIndex: t, field: n } = r, i = si(), { disableRequiredFields: a } = ce(gt), [o, s] =
|
|
26692
|
+
const { parentPath: e, fieldIndex: t, field: n } = r, i = si(), { disableRequiredFields: a } = ce(gt), [o, s] = Xe(void 0);
|
|
26688
26693
|
dt(() => {
|
|
26689
26694
|
n.image instanceof Promise ? n.image.then(s).catch(console.error) : s(n.image);
|
|
26690
26695
|
}, [n]);
|
|
@@ -26692,8 +26697,8 @@ const Ss = L((r) => {
|
|
|
26692
26697
|
n.setOptions({ image: void 0 });
|
|
26693
26698
|
}, [n]), [c, u] = se(() => {
|
|
26694
26699
|
const w = [], S = [], O = As(n.type, `${e}.${t}`) ?? [];
|
|
26695
|
-
for (const
|
|
26696
|
-
|
|
26700
|
+
for (const T of O)
|
|
26701
|
+
T.showDirectly ? w.push(T.field) : S.push(T.field);
|
|
26697
26702
|
return [w, S];
|
|
26698
26703
|
}, [n, e, t]), d = Ln(c), f = Ln(u), h = u.length > 0, v = b(() => {
|
|
26699
26704
|
o && i(() => ({
|
|
@@ -26714,22 +26719,22 @@ const Ss = L((r) => {
|
|
|
26714
26719
|
n.setOptions({ description: w.target.value });
|
|
26715
26720
|
},
|
|
26716
26721
|
[n]
|
|
26717
|
-
), { icon: C, name:
|
|
26718
|
-
return /* @__PURE__ */
|
|
26719
|
-
/* @__PURE__ */
|
|
26720
|
-
/* @__PURE__ */
|
|
26721
|
-
/* @__PURE__ */
|
|
26722
|
-
/* @__PURE__ */ p(
|
|
26723
|
-
|
|
26722
|
+
), { icon: C, name: A } = me[n.type];
|
|
26723
|
+
return /* @__PURE__ */ _("div", { className: "flex w-full grow flex-col gap-4", children: [
|
|
26724
|
+
/* @__PURE__ */ _("div", { className: "flex w-full justify-between gap-2", children: [
|
|
26725
|
+
/* @__PURE__ */ _("div", { className: "flex items-center gap-2", children: [
|
|
26726
|
+
/* @__PURE__ */ _(ye, { accentColor: "base", variant: "soft", size: "sm", children: [
|
|
26727
|
+
/* @__PURE__ */ p(N, { icon: C }),
|
|
26728
|
+
A
|
|
26724
26729
|
] }),
|
|
26725
|
-
!a && /* @__PURE__ */
|
|
26730
|
+
!a && /* @__PURE__ */ _("div", { className: "flex items-center gap-2", children: [
|
|
26726
26731
|
/* @__PURE__ */ p(
|
|
26727
26732
|
Hr.Root,
|
|
26728
26733
|
{
|
|
26729
26734
|
checked: n.required,
|
|
26730
26735
|
onCheckedChange: g,
|
|
26731
26736
|
size: "sm",
|
|
26732
|
-
children: /* @__PURE__ */ p(Hr.Indicator, { children: /* @__PURE__ */ p(
|
|
26737
|
+
children: /* @__PURE__ */ p(Hr.Indicator, { children: /* @__PURE__ */ p(N, { icon: et }) })
|
|
26733
26738
|
}
|
|
26734
26739
|
),
|
|
26735
26740
|
/* @__PURE__ */ p(pe, { size: "sm", accentColor: "base", children: "Required" })
|
|
@@ -26737,7 +26742,7 @@ const Ss = L((r) => {
|
|
|
26737
26742
|
] }),
|
|
26738
26743
|
h && /* @__PURE__ */ p(Es, { popoverInputs: f, align: "end" })
|
|
26739
26744
|
] }),
|
|
26740
|
-
o && /* @__PURE__ */
|
|
26745
|
+
o && /* @__PURE__ */ _("div", { className: "group relative inline-block w-full min-w-[300px]", children: [
|
|
26741
26746
|
/* @__PURE__ */ p(
|
|
26742
26747
|
Sr,
|
|
26743
26748
|
{
|
|
@@ -26756,11 +26761,11 @@ const Ss = L((r) => {
|
|
|
26756
26761
|
"aria-label": "delete",
|
|
26757
26762
|
onClick: l,
|
|
26758
26763
|
size: "sm",
|
|
26759
|
-
children: /* @__PURE__ */ p(
|
|
26764
|
+
children: /* @__PURE__ */ p(N, { icon: Lt })
|
|
26760
26765
|
}
|
|
26761
26766
|
)
|
|
26762
26767
|
] }),
|
|
26763
|
-
/* @__PURE__ */
|
|
26768
|
+
/* @__PURE__ */ _("div", { className: "flex w-full flex-col gap-2 overflow-hidden", children: [
|
|
26764
26769
|
/* @__PURE__ */ p(ge.Root, { variant: "outline", size: "md", children: /* @__PURE__ */ p(
|
|
26765
26770
|
ge.Field,
|
|
26766
26771
|
{
|
|
@@ -26808,7 +26813,7 @@ const Mi = L((r) => {
|
|
|
26808
26813
|
const m = y.item(0);
|
|
26809
26814
|
if (m) {
|
|
26810
26815
|
if (m.size > H1) {
|
|
26811
|
-
|
|
26816
|
+
qe.error({
|
|
26812
26817
|
title: "File upload error",
|
|
26813
26818
|
description: `The file ${m.name} exceeded the maximum file size`
|
|
26814
26819
|
});
|
|
@@ -26830,15 +26835,15 @@ const Mi = L((r) => {
|
|
|
26830
26835
|
}, []), v = b(() => {
|
|
26831
26836
|
t.removeField(e);
|
|
26832
26837
|
}, [e, t]);
|
|
26833
|
-
return /* @__PURE__ */
|
|
26838
|
+
return /* @__PURE__ */ _(pt, { className: "flex w-full items-center justify-between gap-4", size: "sm", children: [
|
|
26834
26839
|
/* @__PURE__ */ p(Ss, { fieldIndex: n, field: e, parentPath: o }),
|
|
26835
|
-
/* @__PURE__ */
|
|
26836
|
-
/* @__PURE__ */ p(wn, { onSelectFieldType: s, size: "sm", children: /* @__PURE__ */ p(ne, { type: "button", children: /* @__PURE__ */ p(
|
|
26837
|
-
/* @__PURE__ */ p(ne, { type: "button", onClick: d, children: /* @__PURE__ */ p(
|
|
26838
|
-
/* @__PURE__ */ p(ne, { type: "button", onClick: f, children: /* @__PURE__ */ p(
|
|
26839
|
-
/* @__PURE__ */ p(ne, { type: "button", onClick: l, children: /* @__PURE__ */ p(
|
|
26840
|
-
/* @__PURE__ */ p(ne, { type: "button", onClick: h, children: /* @__PURE__ */ p(
|
|
26841
|
-
/* @__PURE__ */ p(ne, { type: "button", onClick: v, children: /* @__PURE__ */ p(
|
|
26840
|
+
/* @__PURE__ */ _(ue, { className: "flex flex-col gap-0.5", variant: "ghost", accentColor: "base", size: "sm", children: [
|
|
26841
|
+
/* @__PURE__ */ p(wn, { onSelectFieldType: s, size: "sm", children: /* @__PURE__ */ p(ne, { type: "button", children: /* @__PURE__ */ p(N, { icon: ft }) }) }),
|
|
26842
|
+
/* @__PURE__ */ p(ne, { type: "button", onClick: d, children: /* @__PURE__ */ p(N, { icon: ao }) }),
|
|
26843
|
+
/* @__PURE__ */ p(ne, { type: "button", onClick: f, children: /* @__PURE__ */ p(N, { icon: io }) }),
|
|
26844
|
+
/* @__PURE__ */ p(ne, { type: "button", onClick: l, children: /* @__PURE__ */ p(N, { icon: ai }) }),
|
|
26845
|
+
/* @__PURE__ */ p(ne, { type: "button", onClick: h, children: /* @__PURE__ */ p(N, { icon: ro }) }),
|
|
26846
|
+
/* @__PURE__ */ p(ne, { type: "button", onClick: v, children: /* @__PURE__ */ p(N, { icon: Lt }) })
|
|
26842
26847
|
] }),
|
|
26843
26848
|
/* @__PURE__ */ p("input", { className: "hidden", ref: a, type: "file", accept: "image/*", onChange: u })
|
|
26844
26849
|
] });
|
|
@@ -26846,7 +26851,7 @@ const Mi = L((r) => {
|
|
|
26846
26851
|
Mi.displayName = "FieldBuilderWithActions";
|
|
26847
26852
|
const Vi = L((r) => {
|
|
26848
26853
|
const { children: e, variant: t, size: n, accentColor: i, fields: a, onSelectField: o, ...s } = r;
|
|
26849
|
-
return /* @__PURE__ */
|
|
26854
|
+
return /* @__PURE__ */ _(D.Root, { ...s, children: [
|
|
26850
26855
|
/* @__PURE__ */ p(D.ClickTrigger, { children: e }),
|
|
26851
26856
|
/* @__PURE__ */ p(D.Content, { variant: t, size: n, accentColor: i, children: /* @__PURE__ */ p(D.Scroll, { children: a.map((l) => /* @__PURE__ */ p(bs, { field: l, onSelectField: o }, l.identifier)) }) })
|
|
26852
26857
|
] });
|
|
@@ -26856,15 +26861,15 @@ const bs = L((r) => {
|
|
|
26856
26861
|
const { field: e, onSelectField: t } = r, n = b(() => {
|
|
26857
26862
|
t(e);
|
|
26858
26863
|
}, [e, t]);
|
|
26859
|
-
return /* @__PURE__ */
|
|
26860
|
-
/* @__PURE__ */ p(
|
|
26864
|
+
return /* @__PURE__ */ _(D.Item, { onSelect: n, children: [
|
|
26865
|
+
/* @__PURE__ */ p(N, { icon: me[e.type].icon }),
|
|
26861
26866
|
e.label || Me
|
|
26862
26867
|
] });
|
|
26863
26868
|
});
|
|
26864
26869
|
bs.displayName = "FieldDropdownMenuItem";
|
|
26865
26870
|
const Is = L((r) => {
|
|
26866
26871
|
const { children: e, variant: t, size: n, accentColor: i, fieldSections: a, onSelectFieldSection: o, ...s } = r;
|
|
26867
|
-
return /* @__PURE__ */
|
|
26872
|
+
return /* @__PURE__ */ _(D.Root, { ...s, children: [
|
|
26868
26873
|
/* @__PURE__ */ p(D.ClickTrigger, { children: e }),
|
|
26869
26874
|
/* @__PURE__ */ p(D.Content, { variant: t, size: n, accentColor: i, children: a.map((l) => /* @__PURE__ */ p(
|
|
26870
26875
|
Os,
|
|
@@ -26881,8 +26886,8 @@ const Os = L((r) => {
|
|
|
26881
26886
|
const { fieldSection: e, onSelectFieldSection: t } = r, n = b(() => {
|
|
26882
26887
|
t(e);
|
|
26883
26888
|
}, [e, t]);
|
|
26884
|
-
return /* @__PURE__ */
|
|
26885
|
-
/* @__PURE__ */ p(
|
|
26889
|
+
return /* @__PURE__ */ _(D.Item, { onSelect: n, children: [
|
|
26890
|
+
/* @__PURE__ */ p(N, { icon: no }),
|
|
26886
26891
|
e.label || es
|
|
26887
26892
|
] });
|
|
26888
26893
|
});
|
|
@@ -26891,13 +26896,13 @@ const Ns = L((r) => {
|
|
|
26891
26896
|
const { id: e, sourceX: t, sourceY: n, targetX: i, targetY: a, style: o, markerEnd: s, data: l } = r, { targetSection: c, sourceSection: u, layoutDirection: d } = l, f = se(() => u.getConditions(c.identifier), [u, c.identifier]), h = b(() => {
|
|
26892
26897
|
u.removeConditional(c.identifier);
|
|
26893
26898
|
}, [u, c.identifier]), v = b(
|
|
26894
|
-
(
|
|
26895
|
-
u.addCondition(c.identifier, _s(
|
|
26899
|
+
(A) => {
|
|
26900
|
+
u.addCondition(c.identifier, _s(A));
|
|
26896
26901
|
},
|
|
26897
26902
|
[u, c.identifier]
|
|
26898
26903
|
), g = b(
|
|
26899
|
-
(
|
|
26900
|
-
u.removeCondition(c.identifier,
|
|
26904
|
+
(A) => {
|
|
26905
|
+
u.removeCondition(c.identifier, A);
|
|
26901
26906
|
},
|
|
26902
26907
|
[u, c.identifier]
|
|
26903
26908
|
), [y, m, C] = $s({
|
|
@@ -26908,9 +26913,9 @@ const Ns = L((r) => {
|
|
|
26908
26913
|
targetY: a,
|
|
26909
26914
|
targetPosition: d === "LR" ? yt.Left : yt.Top
|
|
26910
26915
|
});
|
|
26911
|
-
return /* @__PURE__ */
|
|
26916
|
+
return /* @__PURE__ */ _(Le, { children: [
|
|
26912
26917
|
/* @__PURE__ */ p(js, { id: e, path: y, style: o, markerEnd: s, labelX: m, labelY: C }),
|
|
26913
|
-
/* @__PURE__ */ p(Ys, { children: /* @__PURE__ */
|
|
26918
|
+
/* @__PURE__ */ p(Ys, { children: /* @__PURE__ */ _(
|
|
26914
26919
|
pt,
|
|
26915
26920
|
{
|
|
26916
26921
|
size: "xs",
|
|
@@ -26921,9 +26926,9 @@ const Ns = L((r) => {
|
|
|
26921
26926
|
"data-floating-content": "",
|
|
26922
26927
|
style: { transform: `translate(-50%, -50%) translate(${m}px, ${C}px)` },
|
|
26923
26928
|
children: [
|
|
26924
|
-
/* @__PURE__ */
|
|
26929
|
+
/* @__PURE__ */ _("div", { className: "flex items-center gap-2", children: [
|
|
26925
26930
|
/* @__PURE__ */ p(pe, { size: "xs", className: "max-w-[280px] truncate", children: u.label || "Untitled section" }),
|
|
26926
|
-
/* @__PURE__ */
|
|
26931
|
+
/* @__PURE__ */ _("div", { className: "ml-auto flex items-center gap-1", children: [
|
|
26927
26932
|
/* @__PURE__ */ p(Vi, { fields: u.fields, onSelectField: v, children: /* @__PURE__ */ p(
|
|
26928
26933
|
ne,
|
|
26929
26934
|
{
|
|
@@ -26932,10 +26937,10 @@ const Ns = L((r) => {
|
|
|
26932
26937
|
variant: "surface",
|
|
26933
26938
|
size: "xs",
|
|
26934
26939
|
accentColor: "base",
|
|
26935
|
-
children: /* @__PURE__ */ p(
|
|
26940
|
+
children: /* @__PURE__ */ p(N, { icon: ft })
|
|
26936
26941
|
}
|
|
26937
26942
|
) }),
|
|
26938
|
-
/* @__PURE__ */
|
|
26943
|
+
/* @__PURE__ */ _(Xt.Root, { children: [
|
|
26939
26944
|
/* @__PURE__ */ p(Xt.Trigger, { asChild: !0, children: /* @__PURE__ */ p(
|
|
26940
26945
|
ne,
|
|
26941
26946
|
{
|
|
@@ -26946,16 +26951,16 @@ const Ns = L((r) => {
|
|
|
26946
26951
|
accentColor: "base",
|
|
26947
26952
|
color: "danger",
|
|
26948
26953
|
onClick: h,
|
|
26949
|
-
children: /* @__PURE__ */ p(
|
|
26954
|
+
children: /* @__PURE__ */ p(N, { icon: Lt })
|
|
26950
26955
|
}
|
|
26951
26956
|
) }),
|
|
26952
26957
|
/* @__PURE__ */ p(Xt.Content, { size: "sm", children: "Remove conditional logic" })
|
|
26953
26958
|
] })
|
|
26954
26959
|
] })
|
|
26955
26960
|
] }),
|
|
26956
|
-
f.length > 0 && /* @__PURE__ */ p("div", { className: "flex h-max w-full flex-col flex-wrap gap-1", children: f.map((
|
|
26961
|
+
f.length > 0 && /* @__PURE__ */ p("div", { className: "flex h-max w-full flex-col flex-wrap gap-1", children: f.map((A) => /* @__PURE__ */ p(ii, { children: A.render({
|
|
26957
26962
|
onRemove: g
|
|
26958
|
-
}) },
|
|
26963
|
+
}) }, A.id)) })
|
|
26959
26964
|
]
|
|
26960
26965
|
}
|
|
26961
26966
|
) })
|
|
@@ -26986,7 +26991,7 @@ const Ts = L((r) => {
|
|
|
26986
26991
|
},
|
|
26987
26992
|
[n]
|
|
26988
26993
|
);
|
|
26989
|
-
return /* @__PURE__ */
|
|
26994
|
+
return /* @__PURE__ */ _(
|
|
26990
26995
|
pt,
|
|
26991
26996
|
{
|
|
26992
26997
|
variant: "surface",
|
|
@@ -26994,8 +26999,8 @@ const Ts = L((r) => {
|
|
|
26994
26999
|
size: "sm",
|
|
26995
27000
|
"data-selected": t ? "true" : void 0,
|
|
26996
27001
|
children: [
|
|
26997
|
-
/* @__PURE__ */
|
|
26998
|
-
/* @__PURE__ */
|
|
27002
|
+
/* @__PURE__ */ _("div", { className: "flex flex-col gap-3", children: [
|
|
27003
|
+
/* @__PURE__ */ _("div", { className: "flex w-full flex-col gap-2 overflow-hidden", children: [
|
|
26999
27004
|
/* @__PURE__ */ p(ge.Root, { variant: "outline", size: "md", accentColor: "base", children: /* @__PURE__ */ p(
|
|
27000
27005
|
ge.Field,
|
|
27001
27006
|
{
|
|
@@ -27018,10 +27023,10 @@ const Ts = L((r) => {
|
|
|
27018
27023
|
}
|
|
27019
27024
|
)
|
|
27020
27025
|
] }),
|
|
27021
|
-
/* @__PURE__ */
|
|
27026
|
+
/* @__PURE__ */ _("div", { className: "flex items-center justify-between", children: [
|
|
27022
27027
|
/* @__PURE__ */ p(pe, { weight: "bold", children: "Fields" }),
|
|
27023
|
-
/* @__PURE__ */ p(wn, { onSelectFieldType: l, size: "sm", children: /* @__PURE__ */
|
|
27024
|
-
/* @__PURE__ */ p(
|
|
27028
|
+
/* @__PURE__ */ p(wn, { onSelectFieldType: l, size: "sm", children: /* @__PURE__ */ _(B, { type: "button", variant: "soft", size: "sm", accentColor: "base", children: [
|
|
27029
|
+
/* @__PURE__ */ p(N, { icon: ft }),
|
|
27025
27030
|
" Add field"
|
|
27026
27031
|
] }) })
|
|
27027
27032
|
] }),
|
|
@@ -27043,10 +27048,10 @@ const Ts = L((r) => {
|
|
|
27043
27048
|
className: "bg-(--base-2) flex flex-col items-center gap-1 p-1",
|
|
27044
27049
|
size: "xs",
|
|
27045
27050
|
onClick: mt,
|
|
27046
|
-
children: /* @__PURE__ */
|
|
27047
|
-
/* @__PURE__ */ p(ne, { type: "button", onClick: c, children: /* @__PURE__ */ p(
|
|
27048
|
-
/* @__PURE__ */ p(ne, { type: "button", onClick: u, children: /* @__PURE__ */ p(
|
|
27049
|
-
/* @__PURE__ */ p(ne, { type: "button", onClick: s, children: /* @__PURE__ */ p(
|
|
27051
|
+
children: /* @__PURE__ */ _(ue, { className: "flex flex-col gap-2", variant: "surface", size: "xs", accentColor: "base", children: [
|
|
27052
|
+
/* @__PURE__ */ p(ne, { type: "button", onClick: c, children: /* @__PURE__ */ p(N, { icon: Kl }) }),
|
|
27053
|
+
/* @__PURE__ */ p(ne, { type: "button", onClick: u, children: /* @__PURE__ */ p(N, { icon: ai }) }),
|
|
27054
|
+
/* @__PURE__ */ p(ne, { type: "button", onClick: s, children: /* @__PURE__ */ p(N, { icon: Lt }) })
|
|
27050
27055
|
] })
|
|
27051
27056
|
}
|
|
27052
27057
|
) }),
|
|
@@ -27105,17 +27110,17 @@ const L0 = {
|
|
|
27105
27110
|
hideAttribution: !0
|
|
27106
27111
|
}, Ds = L(() => {
|
|
27107
27112
|
var U;
|
|
27108
|
-
const { errors: r } = Ga(), { handleSubmit: e } = qa(), { onSave: t, onCancel: n } = ce(gt), { fieldSchema: i } = ce(gt), a = Yr(null), [o, s] =
|
|
27113
|
+
const { errors: r } = Ga(), { handleSubmit: e } = qa(), { onSave: t, onCancel: n } = ce(gt), { fieldSchema: i } = ce(gt), a = Yr(null), [o, s] = Xe(), [l, c] = Xe("TB");
|
|
27109
27114
|
Ws(() => {
|
|
27110
27115
|
a.current && a.current.classList.remove("light");
|
|
27111
27116
|
}, []);
|
|
27112
27117
|
const u = se(
|
|
27113
|
-
() => i.fieldSections.map((
|
|
27114
|
-
id:
|
|
27118
|
+
() => i.fieldSections.map((Z, X) => ({
|
|
27119
|
+
id: Z.identifier,
|
|
27115
27120
|
position: { x: 0, y: 0 },
|
|
27116
27121
|
data: {
|
|
27117
27122
|
index: X,
|
|
27118
|
-
fieldSection:
|
|
27123
|
+
fieldSection: Z,
|
|
27119
27124
|
layoutDirection: l
|
|
27120
27125
|
},
|
|
27121
27126
|
draggable: !0,
|
|
@@ -27123,19 +27128,19 @@ const L0 = {
|
|
|
27123
27128
|
})),
|
|
27124
27129
|
[i.fieldSections, l]
|
|
27125
27130
|
), d = se(() => {
|
|
27126
|
-
const
|
|
27127
|
-
for (const
|
|
27128
|
-
X[
|
|
27129
|
-
for (const
|
|
27130
|
-
const Fe =
|
|
27131
|
-
for (const [
|
|
27132
|
-
|
|
27133
|
-
id: `${
|
|
27134
|
-
source:
|
|
27135
|
-
target:
|
|
27131
|
+
const Z = [], X = {};
|
|
27132
|
+
for (const K of i.fieldSections)
|
|
27133
|
+
X[K.identifier] = K;
|
|
27134
|
+
for (const K of i.fieldSections) {
|
|
27135
|
+
const Fe = K.conditions;
|
|
27136
|
+
for (const [Ze, ur] of Object.entries(Fe))
|
|
27137
|
+
Z.push({
|
|
27138
|
+
id: `${K.identifier}-${Ze}`,
|
|
27139
|
+
source: K.identifier,
|
|
27140
|
+
target: Ze,
|
|
27136
27141
|
data: {
|
|
27137
|
-
targetSection: X[
|
|
27138
|
-
sourceSection:
|
|
27142
|
+
targetSection: X[Ze],
|
|
27143
|
+
sourceSection: K,
|
|
27139
27144
|
layoutDirection: l
|
|
27140
27145
|
},
|
|
27141
27146
|
animated: ur.length > 0,
|
|
@@ -27144,41 +27149,41 @@ const L0 = {
|
|
|
27144
27149
|
type: "fieldSectionCondition"
|
|
27145
27150
|
});
|
|
27146
27151
|
}
|
|
27147
|
-
return
|
|
27152
|
+
return Z;
|
|
27148
27153
|
}, [i.fieldSections, l]), [f, h, v] = Qs(u), [g, y, m] = Js(d);
|
|
27149
27154
|
dt(() => {
|
|
27150
27155
|
h(u);
|
|
27151
27156
|
}, [u, h]), dt(() => {
|
|
27152
27157
|
y(d);
|
|
27153
27158
|
}, [d, y]);
|
|
27154
|
-
const [C,
|
|
27159
|
+
const [C, A] = se(() => U0(f, g, l), [g, l, f]), w = b(() => {
|
|
27155
27160
|
i.addFieldSection(new ot({ identifier: G(), fields: [] }));
|
|
27156
27161
|
}, [i]), S = b(
|
|
27157
|
-
(
|
|
27158
|
-
const { source: X, target:
|
|
27162
|
+
(Z) => {
|
|
27163
|
+
const { source: X, target: K } = Z, Fe = i.fieldSections.find(({ identifier: Ze }) => Ze === X);
|
|
27159
27164
|
Fe.setOptions({
|
|
27160
27165
|
conditions: {
|
|
27161
27166
|
...Fe.conditions,
|
|
27162
|
-
[
|
|
27167
|
+
[K]: []
|
|
27163
27168
|
}
|
|
27164
27169
|
});
|
|
27165
27170
|
},
|
|
27166
27171
|
[i.fieldSections]
|
|
27167
27172
|
), O = b(
|
|
27168
|
-
(
|
|
27173
|
+
(Z) => {
|
|
27169
27174
|
const X = i.getSectionDependencyGraph();
|
|
27170
|
-
return !Ua(X,
|
|
27175
|
+
return !Ua(X, Z.source, Z.target);
|
|
27171
27176
|
},
|
|
27172
27177
|
[i]
|
|
27173
|
-
),
|
|
27178
|
+
), T = b(() => {
|
|
27174
27179
|
o == null || o.zoomOut();
|
|
27175
27180
|
}, [o]), F = b(() => {
|
|
27176
27181
|
o == null || o.zoomIn();
|
|
27177
27182
|
}, [o]), z = b(() => {
|
|
27178
27183
|
o == null || o.fitView();
|
|
27179
27184
|
}, [o]);
|
|
27180
|
-
return /* @__PURE__ */
|
|
27181
|
-
/* @__PURE__ */
|
|
27185
|
+
return /* @__PURE__ */ _("form", { className: "flex size-full flex-col gap-4", onSubmit: e(t), children: [
|
|
27186
|
+
/* @__PURE__ */ _(pt, { className: "relative size-full", variant: "outline", children: [
|
|
27182
27187
|
/* @__PURE__ */ p(
|
|
27183
27188
|
el,
|
|
27184
27189
|
{
|
|
@@ -27186,7 +27191,7 @@ const L0 = {
|
|
|
27186
27191
|
onInit: s,
|
|
27187
27192
|
nodes: C,
|
|
27188
27193
|
onNodesChange: v,
|
|
27189
|
-
edges:
|
|
27194
|
+
edges: A,
|
|
27190
27195
|
onEdgesChange: m,
|
|
27191
27196
|
nodeTypes: L0,
|
|
27192
27197
|
edgeTypes: z0,
|
|
@@ -27198,12 +27203,12 @@ const L0 = {
|
|
|
27198
27203
|
proOptions: H0
|
|
27199
27204
|
}
|
|
27200
27205
|
),
|
|
27201
|
-
/* @__PURE__ */ p(In, { position: "top-left", children: /* @__PURE__ */ p(ue, { className: "flex items-center justify-end gap-2", size: "sm", children: /* @__PURE__ */
|
|
27202
|
-
/* @__PURE__ */ p(
|
|
27206
|
+
/* @__PURE__ */ p(In, { position: "top-left", children: /* @__PURE__ */ p(ue, { className: "flex items-center justify-end gap-2", size: "sm", children: /* @__PURE__ */ _(B, { type: "button", variant: "surface", onClick: w, children: [
|
|
27207
|
+
/* @__PURE__ */ p(N, { icon: ft }),
|
|
27203
27208
|
" Add section"
|
|
27204
27209
|
] }) }) }),
|
|
27205
|
-
/* @__PURE__ */
|
|
27206
|
-
/* @__PURE__ */
|
|
27210
|
+
/* @__PURE__ */ _(In, { position: "top-right", className: "flex flex-col items-center gap-2", children: [
|
|
27211
|
+
/* @__PURE__ */ _(
|
|
27207
27212
|
bn.Root,
|
|
27208
27213
|
{
|
|
27209
27214
|
className: "flex flex-col",
|
|
@@ -27213,19 +27218,19 @@ const L0 = {
|
|
|
27213
27218
|
value: l,
|
|
27214
27219
|
onValueChange: c,
|
|
27215
27220
|
children: [
|
|
27216
|
-
/* @__PURE__ */ p(bn.IconItem, { className: "rounded-b-none", value: "LR", type: "button", children: /* @__PURE__ */ p(
|
|
27217
|
-
/* @__PURE__ */ p(bn.IconItem, { className: "rounded-t-none", value: "TB", type: "button", children: /* @__PURE__ */ p(
|
|
27221
|
+
/* @__PURE__ */ p(bn.IconItem, { className: "rounded-b-none", value: "LR", type: "button", children: /* @__PURE__ */ p(N, { icon: Cl }) }),
|
|
27222
|
+
/* @__PURE__ */ p(bn.IconItem, { className: "rounded-t-none", value: "TB", type: "button", children: /* @__PURE__ */ p(N, { icon: yl }) })
|
|
27218
27223
|
]
|
|
27219
27224
|
}
|
|
27220
27225
|
),
|
|
27221
27226
|
/* @__PURE__ */ p(Ft, { size: "sm" }),
|
|
27222
|
-
/* @__PURE__ */
|
|
27223
|
-
/* @__PURE__ */ p(ne, { className: "rounded-b-none", onClick: F, type: "button", children: /* @__PURE__ */ p(
|
|
27224
|
-
/* @__PURE__ */ p(ne, { onClick:
|
|
27225
|
-
/* @__PURE__ */ p(ne, { className: "rounded-t-none", onClick: z, type: "button", children: /* @__PURE__ */ p(
|
|
27227
|
+
/* @__PURE__ */ _(ue, { className: "flex flex-col", size: "sm", accentColor: "base", variant: "soft", children: [
|
|
27228
|
+
/* @__PURE__ */ p(ne, { className: "rounded-b-none", onClick: F, type: "button", children: /* @__PURE__ */ p(N, { icon: ft }) }),
|
|
27229
|
+
/* @__PURE__ */ p(ne, { onClick: T, radius: "none", type: "button", children: /* @__PURE__ */ p(N, { icon: Gr }) }),
|
|
27230
|
+
/* @__PURE__ */ p(ne, { className: "rounded-t-none", onClick: z, type: "button", children: /* @__PURE__ */ p(N, { icon: Sc }) })
|
|
27226
27231
|
] })
|
|
27227
27232
|
] }),
|
|
27228
|
-
/* @__PURE__ */ p(In, { position: "bottom-right", children: /* @__PURE__ */
|
|
27233
|
+
/* @__PURE__ */ p(In, { position: "bottom-right", children: /* @__PURE__ */ _(ue, { className: "flex items-center justify-end gap-2", size: "sm", children: [
|
|
27229
27234
|
n && /* @__PURE__ */ p(B, { type: "button", variant: "soft", accentColor: "base", onClick: n, children: "Cancel" }),
|
|
27230
27235
|
/* @__PURE__ */ p(B, { type: "submit", variant: "surface", children: "Save" })
|
|
27231
27236
|
] }) })
|
|
@@ -27452,19 +27457,19 @@ const Ms = L((r) => {
|
|
|
27452
27457
|
},
|
|
27453
27458
|
[e, t.identifier]
|
|
27454
27459
|
);
|
|
27455
|
-
return /* @__PURE__ */
|
|
27456
|
-
/* @__PURE__ */
|
|
27457
|
-
/* @__PURE__ */
|
|
27458
|
-
/* @__PURE__ */ p(
|
|
27460
|
+
return /* @__PURE__ */ _(pt, { className: "flex flex-col gap-2", size: "sm", children: [
|
|
27461
|
+
/* @__PURE__ */ _(ue, { className: "flex justify-between gap-2", size: "sm", accentColor: "base", variant: "soft", children: [
|
|
27462
|
+
/* @__PURE__ */ _(ye, { accentColor: "base", variant: "soft", size: "sm", children: [
|
|
27463
|
+
/* @__PURE__ */ p(N, { icon: no }),
|
|
27459
27464
|
e.label ?? es
|
|
27460
27465
|
] }),
|
|
27461
|
-
/* @__PURE__ */ p(ne, { type: "button", onClick: i, variant: "ghost", children: /* @__PURE__ */ p(
|
|
27466
|
+
/* @__PURE__ */ p(ne, { type: "button", onClick: i, variant: "ghost", children: /* @__PURE__ */ p(N, { icon: Lt }) })
|
|
27462
27467
|
] }),
|
|
27463
|
-
/* @__PURE__ */
|
|
27468
|
+
/* @__PURE__ */ _("div", { className: "flex h-max w-full flex-wrap gap-2", children: [
|
|
27464
27469
|
n.map((s) => s.render({
|
|
27465
27470
|
onRemove: o
|
|
27466
27471
|
})),
|
|
27467
|
-
/* @__PURE__ */ p(Vi, { fields: e.fields, onSelectField: a, align: "start", children: /* @__PURE__ */ p(ne, { type: "button", size: "sm", variant: "soft", accentColor: "base", children: /* @__PURE__ */ p(
|
|
27472
|
+
/* @__PURE__ */ p(Vi, { fields: e.fields, onSelectField: a, align: "start", children: /* @__PURE__ */ p(ne, { type: "button", size: "sm", variant: "soft", accentColor: "base", children: /* @__PURE__ */ p(N, { icon: ft }) }) })
|
|
27468
27473
|
] })
|
|
27469
27474
|
] });
|
|
27470
27475
|
});
|
|
@@ -27491,8 +27496,8 @@ const Vs = L((r) => {
|
|
|
27491
27496
|
(c) => !Ua(l, c.identifier, e.identifier)
|
|
27492
27497
|
);
|
|
27493
27498
|
}, [e.identifier, t]);
|
|
27494
|
-
return /* @__PURE__ */
|
|
27495
|
-
/* @__PURE__ */
|
|
27499
|
+
return /* @__PURE__ */ _("div", { className: "flex w-full grow flex-col gap-4", children: [
|
|
27500
|
+
/* @__PURE__ */ _("div", { className: "flex w-full flex-col gap-2 overflow-hidden", children: [
|
|
27496
27501
|
/* @__PURE__ */ p(ge.Root, { variant: "outline", size: "md", children: /* @__PURE__ */ p(
|
|
27497
27502
|
ge.Field,
|
|
27498
27503
|
{
|
|
@@ -27516,16 +27521,16 @@ const Vs = L((r) => {
|
|
|
27516
27521
|
)
|
|
27517
27522
|
] }),
|
|
27518
27523
|
/* @__PURE__ */ p(Ft, { size: "full" }),
|
|
27519
|
-
/* @__PURE__ */
|
|
27520
|
-
/* @__PURE__ */
|
|
27524
|
+
/* @__PURE__ */ _("div", { className: "flex flex-col gap-2", children: [
|
|
27525
|
+
/* @__PURE__ */ _("div", { className: "flex justify-between gap-2", children: [
|
|
27521
27526
|
/* @__PURE__ */ p(pe, { accentColor: "base", children: "Conditions" }),
|
|
27522
27527
|
/* @__PURE__ */ p(
|
|
27523
27528
|
Is,
|
|
27524
27529
|
{
|
|
27525
27530
|
fieldSections: s,
|
|
27526
27531
|
onSelectFieldSection: i,
|
|
27527
|
-
children: /* @__PURE__ */
|
|
27528
|
-
/* @__PURE__ */ p(
|
|
27532
|
+
children: /* @__PURE__ */ _(B, { type: "button", variant: "soft", size: "sm", className: "w-max", children: [
|
|
27533
|
+
/* @__PURE__ */ p(N, { icon: ft }),
|
|
27529
27534
|
"Add condition"
|
|
27530
27535
|
] })
|
|
27531
27536
|
}
|
|
@@ -27568,12 +27573,12 @@ const Fs = L((r) => {
|
|
|
27568
27573
|
const g = [e.serialize()], y = ar.reseedFieldSections(g, {
|
|
27569
27574
|
conditions: !1
|
|
27570
27575
|
}), m = JSON.stringify(y);
|
|
27571
|
-
await navigator.clipboard.writeText(m),
|
|
27576
|
+
await navigator.clipboard.writeText(m), qe.success({ title: "Section copied" });
|
|
27572
27577
|
}, [e]), f = b(async () => {
|
|
27573
|
-
const y = n.getDependenciesOfSection(e.identifier).map((
|
|
27578
|
+
const y = n.getDependenciesOfSection(e.identifier).map((A) => A.serialize()), m = ar.reseedFieldSections(y, {
|
|
27574
27579
|
conditions: !0
|
|
27575
27580
|
}), C = JSON.stringify(m);
|
|
27576
|
-
await navigator.clipboard.writeText(C),
|
|
27581
|
+
await navigator.clipboard.writeText(C), qe.success({ title: "Section copied" });
|
|
27577
27582
|
}, [e, n]), h = b(async () => {
|
|
27578
27583
|
const g = n.getDependenciesOfSection(e.identifier), y = g.length > 1, m = g.length - 1;
|
|
27579
27584
|
y ? i({
|
|
@@ -27589,22 +27594,22 @@ const Fs = L((r) => {
|
|
|
27589
27594
|
try {
|
|
27590
27595
|
g = await navigator.clipboard.readText();
|
|
27591
27596
|
} catch {
|
|
27592
|
-
|
|
27597
|
+
qe.error({ title: "Paste failed", description: "Unable to read clipboard contents." });
|
|
27593
27598
|
return;
|
|
27594
27599
|
}
|
|
27595
27600
|
const y = g.trim();
|
|
27596
27601
|
if (!y) {
|
|
27597
|
-
|
|
27602
|
+
qe.error({ title: "Paste failed", description: "Clipboard is empty." });
|
|
27598
27603
|
return;
|
|
27599
27604
|
}
|
|
27600
27605
|
let m;
|
|
27601
27606
|
try {
|
|
27602
27607
|
m = JSON.parse(y);
|
|
27603
27608
|
} catch {
|
|
27604
|
-
|
|
27609
|
+
qe.error({ title: "Invalid JSON", description: "Check the JSON and try again." });
|
|
27605
27610
|
return;
|
|
27606
27611
|
}
|
|
27607
|
-
const C = Array.isArray(m) ? m : [m],
|
|
27612
|
+
const C = Array.isArray(m) ? m : [m], A = [];
|
|
27608
27613
|
for (const w of C) {
|
|
27609
27614
|
if (!w || typeof w != "object") continue;
|
|
27610
27615
|
const S = w;
|
|
@@ -27618,26 +27623,26 @@ const Fs = L((r) => {
|
|
|
27618
27623
|
fields: S.fields
|
|
27619
27624
|
};
|
|
27620
27625
|
try {
|
|
27621
|
-
|
|
27626
|
+
A.push(ot.deserialize(O));
|
|
27622
27627
|
} catch {
|
|
27623
27628
|
}
|
|
27624
27629
|
}
|
|
27625
|
-
if (
|
|
27626
|
-
|
|
27630
|
+
if (A.length === 0) {
|
|
27631
|
+
qe.error({ title: "Paste failed", description: "No valid sections found in the JSON." });
|
|
27627
27632
|
return;
|
|
27628
27633
|
}
|
|
27629
|
-
|
|
27634
|
+
A.forEach((w, S) => {
|
|
27630
27635
|
n.addFieldSection(w, t + 1 + S);
|
|
27631
|
-
}),
|
|
27636
|
+
}), qe.success({ title: "Section pasted", description: "Serialized JSON imported successfully." });
|
|
27632
27637
|
}, [n, t]);
|
|
27633
|
-
return /* @__PURE__ */
|
|
27634
|
-
/* @__PURE__ */
|
|
27638
|
+
return /* @__PURE__ */ _(pt, { variant: "outline", className: "flex w-full items-center justify-between gap-4", size: "sm", children: [
|
|
27639
|
+
/* @__PURE__ */ _("div", { className: "flex w-full grow flex-col gap-4", children: [
|
|
27635
27640
|
/* @__PURE__ */ p(Vs, { fieldSection: e }),
|
|
27636
|
-
/* @__PURE__ */
|
|
27637
|
-
/* @__PURE__ */
|
|
27641
|
+
/* @__PURE__ */ _("div", { className: "flex w-full flex-col gap-2", children: [
|
|
27642
|
+
/* @__PURE__ */ _("div", { className: "flex justify-between gap-2", children: [
|
|
27638
27643
|
/* @__PURE__ */ p(pe, { accentColor: "base", size: "md", children: "Fields" }),
|
|
27639
|
-
/* @__PURE__ */ p(wn, { onSelectFieldType: l, size: "sm", children: /* @__PURE__ */
|
|
27640
|
-
/* @__PURE__ */ p(
|
|
27644
|
+
/* @__PURE__ */ p(wn, { onSelectFieldType: l, size: "sm", children: /* @__PURE__ */ _(B, { type: "button", variant: "soft", size: "sm", children: [
|
|
27645
|
+
/* @__PURE__ */ p(N, { icon: ft }),
|
|
27641
27646
|
" Add field"
|
|
27642
27647
|
] }) })
|
|
27643
27648
|
] }),
|
|
@@ -27653,26 +27658,26 @@ const Fs = L((r) => {
|
|
|
27653
27658
|
))
|
|
27654
27659
|
] })
|
|
27655
27660
|
] }),
|
|
27656
|
-
/* @__PURE__ */
|
|
27657
|
-
/* @__PURE__ */ p(ne, { type: "button", onClick: c, children: /* @__PURE__ */ p(
|
|
27658
|
-
/* @__PURE__ */ p(ne, { type: "button", onClick: u, children: /* @__PURE__ */ p(
|
|
27659
|
-
/* @__PURE__ */
|
|
27660
|
-
/* @__PURE__ */ p(D.ClickTrigger, { children: /* @__PURE__ */ p(ne, { type: "button", children: /* @__PURE__ */ p(
|
|
27661
|
-
/* @__PURE__ */
|
|
27662
|
-
/* @__PURE__ */
|
|
27663
|
-
/* @__PURE__ */ p(
|
|
27661
|
+
/* @__PURE__ */ _(ue, { className: "flex flex-col gap-0.5", variant: "ghost", accentColor: "base", size: "sm", children: [
|
|
27662
|
+
/* @__PURE__ */ p(ne, { type: "button", onClick: c, children: /* @__PURE__ */ p(N, { icon: ao }) }),
|
|
27663
|
+
/* @__PURE__ */ p(ne, { type: "button", onClick: u, children: /* @__PURE__ */ p(N, { icon: io }) }),
|
|
27664
|
+
/* @__PURE__ */ _(D.Root, { align: "end", children: [
|
|
27665
|
+
/* @__PURE__ */ p(D.ClickTrigger, { children: /* @__PURE__ */ p(ne, { type: "button", children: /* @__PURE__ */ p(N, { icon: eo }) }) }),
|
|
27666
|
+
/* @__PURE__ */ _(D.Content, { size: "sm", children: [
|
|
27667
|
+
/* @__PURE__ */ _(D.Item, { onSelect: s, children: [
|
|
27668
|
+
/* @__PURE__ */ p(N, { icon: ai }),
|
|
27664
27669
|
"Duplicate section"
|
|
27665
27670
|
] }),
|
|
27666
|
-
/* @__PURE__ */
|
|
27667
|
-
/* @__PURE__ */ p(
|
|
27671
|
+
/* @__PURE__ */ _(D.Item, { onSelect: h, children: [
|
|
27672
|
+
/* @__PURE__ */ p(N, { icon: Ka }),
|
|
27668
27673
|
"Copy JSON"
|
|
27669
27674
|
] }),
|
|
27670
|
-
/* @__PURE__ */
|
|
27671
|
-
/* @__PURE__ */ p(
|
|
27675
|
+
/* @__PURE__ */ _(D.Item, { onSelect: v, children: [
|
|
27676
|
+
/* @__PURE__ */ p(N, { icon: Qa }),
|
|
27672
27677
|
"Paste JSON"
|
|
27673
27678
|
] }),
|
|
27674
|
-
/* @__PURE__ */
|
|
27675
|
-
/* @__PURE__ */ p(
|
|
27679
|
+
/* @__PURE__ */ _(D.Item, { onSelect: a, children: [
|
|
27680
|
+
/* @__PURE__ */ p(N, { icon: Lt }),
|
|
27676
27681
|
"Delete section"
|
|
27677
27682
|
] })
|
|
27678
27683
|
] })
|
|
@@ -27688,28 +27693,28 @@ const Ps = L(() => {
|
|
|
27688
27693
|
}, [i]), o = b(async () => {
|
|
27689
27694
|
try {
|
|
27690
27695
|
const c = i.serialize(), u = ar.reseedFieldSections(c), d = JSON.stringify(u);
|
|
27691
|
-
await navigator.clipboard.writeText(d),
|
|
27696
|
+
await navigator.clipboard.writeText(d), qe.success({ title: "Sections copied", description: "All sections JSON copied to clipboard." });
|
|
27692
27697
|
} catch {
|
|
27693
|
-
|
|
27698
|
+
qe.error({ title: "Copy failed", description: "Unable to copy the sections JSON." });
|
|
27694
27699
|
}
|
|
27695
27700
|
}, [i]), s = b(async () => {
|
|
27696
27701
|
let c = "";
|
|
27697
27702
|
try {
|
|
27698
27703
|
c = await navigator.clipboard.readText();
|
|
27699
27704
|
} catch {
|
|
27700
|
-
|
|
27705
|
+
qe.error({ title: "Paste failed", description: "Unable to read clipboard contents." });
|
|
27701
27706
|
return;
|
|
27702
27707
|
}
|
|
27703
27708
|
const u = c.trim();
|
|
27704
27709
|
if (!u) {
|
|
27705
|
-
|
|
27710
|
+
qe.error({ title: "Paste failed", description: "Clipboard is empty." });
|
|
27706
27711
|
return;
|
|
27707
27712
|
}
|
|
27708
27713
|
let d;
|
|
27709
27714
|
try {
|
|
27710
27715
|
d = JSON.parse(u);
|
|
27711
27716
|
} catch {
|
|
27712
|
-
|
|
27717
|
+
qe.error({ title: "Invalid JSON", description: "Check the JSON and try again." });
|
|
27713
27718
|
return;
|
|
27714
27719
|
}
|
|
27715
27720
|
const f = Array.isArray(d) ? d : [d], h = [];
|
|
@@ -27731,23 +27736,23 @@ const Ps = L(() => {
|
|
|
27731
27736
|
}
|
|
27732
27737
|
}
|
|
27733
27738
|
if (h.length === 0) {
|
|
27734
|
-
|
|
27739
|
+
qe.error({ title: "Paste failed", description: "No valid sections found in the JSON." });
|
|
27735
27740
|
return;
|
|
27736
27741
|
}
|
|
27737
27742
|
const v = i.fieldSections.length;
|
|
27738
27743
|
h.forEach((g, y) => {
|
|
27739
27744
|
i.addFieldSection(g, v + y);
|
|
27740
|
-
}),
|
|
27745
|
+
}), qe.success({ title: "Sections pasted", description: "Serialized JSON imported successfully." });
|
|
27741
27746
|
}, [i]);
|
|
27742
|
-
return /* @__PURE__ */
|
|
27743
|
-
/* @__PURE__ */
|
|
27744
|
-
/* @__PURE__ */
|
|
27745
|
-
/* @__PURE__ */
|
|
27746
|
-
/* @__PURE__ */ p(
|
|
27747
|
+
return /* @__PURE__ */ _("form", { className: "flex flex-col gap-4", onSubmit: r(t), children: [
|
|
27748
|
+
/* @__PURE__ */ _("div", { className: "flex flex-col gap-4", children: [
|
|
27749
|
+
/* @__PURE__ */ _("div", { className: "flex items-center justify-end gap-2", children: [
|
|
27750
|
+
/* @__PURE__ */ _(B, { type: "button", variant: "soft", size: "sm", onClick: o, children: [
|
|
27751
|
+
/* @__PURE__ */ p(N, { icon: Ka }),
|
|
27747
27752
|
" Copy JSON"
|
|
27748
27753
|
] }),
|
|
27749
|
-
/* @__PURE__ */
|
|
27750
|
-
/* @__PURE__ */ p(
|
|
27754
|
+
/* @__PURE__ */ _(B, { type: "button", variant: "soft", size: "sm", onClick: s, children: [
|
|
27755
|
+
/* @__PURE__ */ p(N, { icon: Qa }),
|
|
27751
27756
|
" Paste JSON"
|
|
27752
27757
|
] })
|
|
27753
27758
|
] }),
|
|
@@ -27759,7 +27764,7 @@ const Ps = L(() => {
|
|
|
27759
27764
|
},
|
|
27760
27765
|
c.identifier
|
|
27761
27766
|
)),
|
|
27762
|
-
/* @__PURE__ */
|
|
27767
|
+
/* @__PURE__ */ _(
|
|
27763
27768
|
B,
|
|
27764
27769
|
{
|
|
27765
27770
|
className: "mb-4",
|
|
@@ -27769,14 +27774,14 @@ const Ps = L(() => {
|
|
|
27769
27774
|
size: "sm",
|
|
27770
27775
|
onClick: a,
|
|
27771
27776
|
children: [
|
|
27772
|
-
/* @__PURE__ */ p(
|
|
27777
|
+
/* @__PURE__ */ p(N, { icon: ft }),
|
|
27773
27778
|
" Add section"
|
|
27774
27779
|
]
|
|
27775
27780
|
}
|
|
27776
27781
|
)
|
|
27777
27782
|
] }),
|
|
27778
27783
|
!!((l = e.fields) != null && l.message) && /* @__PURE__ */ p(pe, { size: "xs", accentColor: "danger", children: e.fields.message }),
|
|
27779
|
-
/* @__PURE__ */
|
|
27784
|
+
/* @__PURE__ */ _(ue, { className: "flex items-center justify-end gap-2", size: "sm", children: [
|
|
27780
27785
|
n && /* @__PURE__ */ p(B, { type: "button", variant: "soft", accentColor: "base", onClick: n, children: "Cancel" }),
|
|
27781
27786
|
/* @__PURE__ */ p(B, { type: "submit", variant: "surface", children: "Save" })
|
|
27782
27787
|
] })
|
|
@@ -27809,76 +27814,86 @@ const X0 = L(
|
|
|
27809
27814
|
onCancel: u,
|
|
27810
27815
|
hideCancel: d = !1,
|
|
27811
27816
|
className: f,
|
|
27812
|
-
|
|
27813
|
-
|
|
27814
|
-
|
|
27815
|
-
|
|
27816
|
-
|
|
27817
|
+
submitButtonProps: h,
|
|
27818
|
+
cancelButtonProps: v,
|
|
27819
|
+
size: g = "md"
|
|
27820
|
+
} = r, y = se(() => n.initializeValues(i), [n, i]), m = b(
|
|
27821
|
+
(F) => {
|
|
27822
|
+
o == null || o(F);
|
|
27817
27823
|
},
|
|
27818
27824
|
[o]
|
|
27819
|
-
),
|
|
27820
|
-
values:
|
|
27825
|
+
), C = Xa({
|
|
27826
|
+
values: y,
|
|
27821
27827
|
mode: "onBlur",
|
|
27822
27828
|
criteriaMode: "all",
|
|
27823
27829
|
disabled: t,
|
|
27824
|
-
resolver: (
|
|
27825
|
-
const
|
|
27826
|
-
return Object.keys(
|
|
27830
|
+
resolver: (F) => {
|
|
27831
|
+
const z = n.validateValues(F), U = Bs(z);
|
|
27832
|
+
return Object.keys(z).length > 0 ? {
|
|
27827
27833
|
values: {},
|
|
27828
|
-
errors:
|
|
27834
|
+
errors: U
|
|
27829
27835
|
} : {
|
|
27830
|
-
values:
|
|
27836
|
+
values: F,
|
|
27831
27837
|
errors: {}
|
|
27832
27838
|
};
|
|
27833
27839
|
}
|
|
27834
|
-
}),
|
|
27835
|
-
(
|
|
27836
|
-
a == null || a(
|
|
27840
|
+
}), A = b(
|
|
27841
|
+
(F) => {
|
|
27842
|
+
a == null || a(F);
|
|
27837
27843
|
},
|
|
27838
27844
|
[a]
|
|
27839
27845
|
);
|
|
27840
27846
|
dt(() => {
|
|
27841
|
-
const { unsubscribe:
|
|
27842
|
-
|
|
27847
|
+
const { unsubscribe: F } = C.watch((z, { type: U }) => {
|
|
27848
|
+
U === "change" && A(z);
|
|
27843
27849
|
});
|
|
27844
27850
|
return () => {
|
|
27845
|
-
|
|
27851
|
+
F();
|
|
27846
27852
|
};
|
|
27847
|
-
}, [
|
|
27848
|
-
const
|
|
27853
|
+
}, [C, A]);
|
|
27854
|
+
const w = Bc(n.getFieldSections()), S = se(
|
|
27849
27855
|
() => ({
|
|
27850
27856
|
fieldSchema: n,
|
|
27851
|
-
size:
|
|
27857
|
+
size: g
|
|
27852
27858
|
}),
|
|
27853
|
-
[n,
|
|
27854
|
-
),
|
|
27855
|
-
return /* @__PURE__ */ p(Wa, { ...
|
|
27859
|
+
[n, g]
|
|
27860
|
+
), O = !d && !!u, T = !l;
|
|
27861
|
+
return /* @__PURE__ */ p(Wa, { ...C, children: /* @__PURE__ */ p(Ce, { value: S, children: /* @__PURE__ */ _(
|
|
27856
27862
|
"form",
|
|
27857
27863
|
{
|
|
27858
27864
|
ref: e,
|
|
27859
27865
|
className: Ct(f, "flex flex-col gap-4"),
|
|
27860
|
-
onSubmit:
|
|
27866
|
+
onSubmit: C.handleSubmit(m),
|
|
27861
27867
|
children: [
|
|
27862
|
-
/* @__PURE__ */ p("div", { className: k0({ size:
|
|
27863
|
-
!t && (
|
|
27864
|
-
|
|
27868
|
+
/* @__PURE__ */ p("div", { className: k0({ size: g }), children: w }),
|
|
27869
|
+
!t && (O || T) ? /* @__PURE__ */ _(ue, { className: "flex items-center justify-end gap-2", size: g, children: [
|
|
27870
|
+
O ? /* @__PURE__ */ _(
|
|
27865
27871
|
B,
|
|
27866
27872
|
{
|
|
27867
|
-
...h,
|
|
27868
27873
|
accentColor: "base",
|
|
27869
27874
|
type: "button",
|
|
27870
27875
|
variant: "soft",
|
|
27871
27876
|
onClick: u,
|
|
27877
|
+
...v,
|
|
27872
27878
|
children: [
|
|
27873
|
-
/* @__PURE__ */ p(
|
|
27879
|
+
/* @__PURE__ */ p(N, { icon: It }),
|
|
27874
27880
|
c
|
|
27875
27881
|
]
|
|
27876
27882
|
}
|
|
27877
27883
|
) : null,
|
|
27878
|
-
|
|
27879
|
-
|
|
27880
|
-
|
|
27881
|
-
|
|
27884
|
+
T ? /* @__PURE__ */ _(
|
|
27885
|
+
B,
|
|
27886
|
+
{
|
|
27887
|
+
type: "submit",
|
|
27888
|
+
accentColor: "primary",
|
|
27889
|
+
variant: "surface",
|
|
27890
|
+
...h,
|
|
27891
|
+
children: [
|
|
27892
|
+
/* @__PURE__ */ p(N, { icon: et }),
|
|
27893
|
+
s
|
|
27894
|
+
]
|
|
27895
|
+
}
|
|
27896
|
+
) : null
|
|
27882
27897
|
] }) : null
|
|
27883
27898
|
]
|
|
27884
27899
|
}
|
|
@@ -27891,13 +27906,13 @@ const X0 = L(
|
|
|
27891
27906
|
ks.displayName = "FormBuilderPreview";
|
|
27892
27907
|
const Ls = L((r) => {
|
|
27893
27908
|
const { children: e, initialFields: t, onSave: n, onCancel: i, disableRequiredFields: a = !1 } = r, o = b((v) => {
|
|
27894
|
-
var
|
|
27909
|
+
var A;
|
|
27895
27910
|
const g = {};
|
|
27896
27911
|
(!v.fields || v.fields.length === 0) && (g.fields = "At least one field is required.");
|
|
27897
27912
|
const y = [];
|
|
27898
27913
|
for (const [w, S] of v.fields.entries())
|
|
27899
|
-
for (const [O,
|
|
27900
|
-
const F = ((
|
|
27914
|
+
for (const [O, T] of S.fields.entries()) {
|
|
27915
|
+
const F = ((A = As(T.type, `fields.${w}.fields.${O}`)) == null ? void 0 : A.map(
|
|
27901
27916
|
({ field: z }) => z
|
|
27902
27917
|
)) ?? [];
|
|
27903
27918
|
y.push(...F);
|
|
@@ -27906,7 +27921,7 @@ const Ls = L((r) => {
|
|
|
27906
27921
|
for (const w of y)
|
|
27907
27922
|
m[w.identifier] = ja(v, w.identifier);
|
|
27908
27923
|
const C = Rs(y, m);
|
|
27909
|
-
return Object.keys(C).length > 0 && (g.fields = C.fields), Object.keys(g).length > 0 &&
|
|
27924
|
+
return Object.keys(C).length > 0 && (g.fields = C.fields), Object.keys(g).length > 0 && qe.error({
|
|
27910
27925
|
title: "Some form settings are invalid",
|
|
27911
27926
|
description: "Please check settings highlighted in red."
|
|
27912
27927
|
}), g;
|
|
@@ -27963,7 +27978,7 @@ const yh = {
|
|
|
27963
27978
|
Preview: ks
|
|
27964
27979
|
};
|
|
27965
27980
|
export {
|
|
27966
|
-
|
|
27981
|
+
Ue as BaseCondition,
|
|
27967
27982
|
tt as BaseField,
|
|
27968
27983
|
lo as BaseFormElement,
|
|
27969
27984
|
Qr as BaseOptionsField,
|
|
@@ -28015,7 +28030,7 @@ export {
|
|
|
28015
28030
|
h0 as MultiStringFieldConditionCell,
|
|
28016
28031
|
ho as MultiStringFieldInput,
|
|
28017
28032
|
ts as NumberEqualsConditionModifier,
|
|
28018
|
-
|
|
28033
|
+
Je as NumberField,
|
|
28019
28034
|
cn as NumberFieldCondition,
|
|
28020
28035
|
p0 as NumberFieldConditionCell,
|
|
28021
28036
|
vo as NumberFieldInput,
|
|
@@ -28162,7 +28177,7 @@ export {
|
|
|
28162
28177
|
Uc as serializePassFailFieldValue,
|
|
28163
28178
|
P0 as unchangedFieldValues,
|
|
28164
28179
|
dh as useConditionManager,
|
|
28165
|
-
|
|
28180
|
+
ze as useFieldInput,
|
|
28166
28181
|
Ln as useFieldInputs,
|
|
28167
28182
|
Bc as useFieldSectionInputs,
|
|
28168
28183
|
si as useImageViewer,
|