@overmap-ai/forms 1.0.39 → 1.0.40-display-file-fix.0

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/forms.js CHANGED
@@ -1,7 +1,7 @@
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 _, jsx as p, Fragment as Je } from "react/jsx-runtime";
4
+ import { jsxs as A, jsx as p, Fragment as Je } from "react/jsx-runtime";
5
5
  import { Card as pt, LuIcon as T, 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 Ge, ToggleGroup as bn, useAlertDialog as qs } from "@overmap-ai/blocks";
6
6
  import { cx as Ct, cva as ri } from "class-variance-authority";
7
7
  import { forwardRef as ni, createElement as kn, memo as L, createContext as jr, useState as qe, 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";
@@ -653,7 +653,7 @@ const Fc = [
653
653
  ["path", { d: "m6 6 12 12", key: "d8bk6v" }]
654
654
  ], It = q("x", Fc), so = L((r) => {
655
655
  const { ref: e, file: t, className: n, error: i, rightSlot: a, size: o, ...s } = r;
656
- return /* @__PURE__ */ _(pt, { className: Ct(n, "flex w-full items-center gap-2"), ref: e, size: "xs", ...s, children: [
656
+ return /* @__PURE__ */ A(pt, { className: Ct(n, "flex w-full items-center gap-2"), ref: e, size: "xs", ...s, children: [
657
657
  i ? /* @__PURE__ */ p(T, { icon: Wl, color: "var(--base-a11)" }) : /* @__PURE__ */ p(T, { icon: Yl, color: "var(--base-a11)" }),
658
658
  i ? /* @__PURE__ */ p(pe, { accentColor: "danger", className: "truncate", size: o, children: i }) : t ? /* @__PURE__ */ p(pe, { className: "truncate", size: o, children: t.name }) : /* @__PURE__ */ p("div", { className: "flex w-full justify-center", children: /* @__PURE__ */ p(ti, {}) }),
659
659
  a
@@ -782,15 +782,15 @@ const uo = jr(() => {
782
782
  const { file: e, onClose: t } = r, n = b(() => {
783
783
  $a(e, e.name);
784
784
  }, [e]);
785
- return /* @__PURE__ */ p(xt.Root, { open: !0, onOpenChange: t, children: /* @__PURE__ */ _(xt.Content, { onOpenAutoFocus: Hs, children: [
786
- /* @__PURE__ */ _(
785
+ return /* @__PURE__ */ p(xt.Root, { open: !0, onOpenChange: t, children: /* @__PURE__ */ A(xt.Content, { onOpenAutoFocus: Hs, children: [
786
+ /* @__PURE__ */ A(
787
787
  ue,
788
788
  {
789
789
  className: "absolute right-0 top-0 flex items-center gap-2 p-2",
790
790
  accentColor: "base",
791
791
  variant: "ghost",
792
792
  children: [
793
- /* @__PURE__ */ _(Xt.Root, { children: [
793
+ /* @__PURE__ */ A(Xt.Root, { children: [
794
794
  /* @__PURE__ */ p(Xt.Trigger, { asChild: !0, children: /* @__PURE__ */ p(ne, { onClick: n, "aria-label": "download", children: /* @__PURE__ */ p(T, { icon: Ja }) }) }),
795
795
  /* @__PURE__ */ p(Xt.Content, { size: "sm", children: "Download" })
796
796
  ] }),
@@ -814,7 +814,7 @@ const Pc = L((r) => {
814
814
  ), o = b(() => {
815
815
  t && (t.onClose && t.onClose(), i());
816
816
  }, [i, t]);
817
- return /* @__PURE__ */ _(uo.Provider, { value: a, children: [
817
+ return /* @__PURE__ */ A(uo.Provider, { value: a, children: [
818
818
  e,
819
819
  t && /* @__PURE__ */ p(fo, { file: t.file, onClose: o })
820
820
  ] });
@@ -830,7 +830,7 @@ const Re = L((r) => {
830
830
  file: c
831
831
  }));
832
832
  }, [d, c]), h = i ? `${e} *` : e;
833
- return /* @__PURE__ */ _("div", { className: "flex flex-col gap-1", children: [
833
+ return /* @__PURE__ */ A("div", { className: "flex flex-col gap-1", children: [
834
834
  c && /* @__PURE__ */ p(
835
835
  Sr,
836
836
  {
@@ -839,7 +839,7 @@ const Re = L((r) => {
839
839
  onClick: f
840
840
  }
841
841
  ),
842
- (!!e || !!n) && /* @__PURE__ */ _("div", { className: "flex flex-col", children: [
842
+ (!!e || !!n) && /* @__PURE__ */ A("div", { className: "flex flex-col", children: [
843
843
  /* @__PURE__ */ p("label", { className: "w-max max-w-full", htmlFor: o, children: /* @__PURE__ */ p(pe, { size: l, className: "text-wrap", children: h }) }),
844
844
  !!n && /* @__PURE__ */ p(pe, { accentColor: "base", size: l, children: n })
845
845
  ] }),
@@ -901,10 +901,10 @@ const Bc = (r) => r.map((e) => /* @__PURE__ */ p(ii, { children: e.render() }, e
901
901
  N.splice(O, 0, F), h(N);
902
902
  },
903
903
  [h, n]
904
- ), A = b(() => {
904
+ ), _ = b(() => {
905
905
  a();
906
906
  }, [a]);
907
- return /* @__PURE__ */ p(rl, { onDragEnd: C, children: /* @__PURE__ */ _(
907
+ return /* @__PURE__ */ p(rl, { onDragEnd: C, children: /* @__PURE__ */ A(
908
908
  Re,
909
909
  {
910
910
  size: t,
@@ -915,7 +915,7 @@ const Bc = (r) => r.map((e) => /* @__PURE__ */ p(ii, { children: e.render() }, e
915
915
  error: d || s,
916
916
  image: e.image,
917
917
  children: [
918
- (!l || n.length === 0) && /* @__PURE__ */ _("div", { className: "flex gap-2", children: [
918
+ (!l || n.length === 0) && /* @__PURE__ */ A("div", { className: "flex gap-2", children: [
919
919
  /* @__PURE__ */ p(ge.Root, { className: "grow", accentColor: "base", variant: "surface", size: t, children: /* @__PURE__ */ p(
920
920
  ge.Field,
921
921
  {
@@ -924,7 +924,7 @@ const Bc = (r) => r.map((e) => /* @__PURE__ */ p(ii, { children: e.render() }, e
924
924
  onKeyDown: y,
925
925
  id: e.identifier,
926
926
  placeholder: e.placeholder,
927
- onBlur: A,
927
+ onBlur: _,
928
928
  name: i,
929
929
  disabled: l
930
930
  }
@@ -943,7 +943,7 @@ const Bc = (r) => r.map((e) => /* @__PURE__ */ p(ii, { children: e.render() }, e
943
943
  }
944
944
  )
945
945
  ] }),
946
- n.length !== 0 && /* @__PURE__ */ p(nl, { droppableId: `${e.identifier}-droppable`, children: (w) => /* @__PURE__ */ _(
946
+ n.length !== 0 && /* @__PURE__ */ p(nl, { droppableId: `${e.identifier}-droppable`, children: (w) => /* @__PURE__ */ A(
947
947
  "div",
948
948
  {
949
949
  className: "flex flex-col gap-1",
@@ -956,7 +956,7 @@ const Bc = (r) => r.map((e) => /* @__PURE__ */ p(ii, { children: e.render() }, e
956
956
  draggableId: `${S}-draggable`,
957
957
  index: O,
958
958
  isDragDisabled: l,
959
- children: ({ draggableProps: N, dragHandleProps: F, innerRef: z }) => /* @__PURE__ */ _(
959
+ children: ({ draggableProps: N, dragHandleProps: F, innerRef: z }) => /* @__PURE__ */ A(
960
960
  ye,
961
961
  {
962
962
  ...F,
@@ -1504,7 +1504,7 @@ const xo = L((r) => {
1504
1504
  values: n,
1505
1505
  onValuesChange: c,
1506
1506
  disabled: l,
1507
- children: e.options.map((d, f) => /* @__PURE__ */ _(
1507
+ children: e.options.map((d, f) => /* @__PURE__ */ A(
1508
1508
  "label",
1509
1509
  {
1510
1510
  className: "flex min-w-0 items-center gap-2",
@@ -1595,8 +1595,8 @@ const yo = L((r) => {
1595
1595
  required: e.required,
1596
1596
  error: s,
1597
1597
  image: e.image,
1598
- children: /* @__PURE__ */ _(xe.Root, { open: c, onOpenChange: f, children: [
1599
- /* @__PURE__ */ p(xe.Trigger, { asChild: !0, children: /* @__PURE__ */ _(
1598
+ children: /* @__PURE__ */ A(xe.Root, { open: c, onOpenChange: f, children: [
1599
+ /* @__PURE__ */ p(xe.Trigger, { asChild: !0, children: /* @__PURE__ */ A(
1600
1600
  B,
1601
1601
  {
1602
1602
  id: e.identifier,
@@ -1707,8 +1707,8 @@ const mo = L((r) => {
1707
1707
  required: e.required,
1708
1708
  error: s,
1709
1709
  image: e.image,
1710
- children: /* @__PURE__ */ _(D.Root, { onOpenChange: u, align: "start", children: [
1711
- /* @__PURE__ */ p(D.ClickTrigger, { children: /* @__PURE__ */ _(
1710
+ children: /* @__PURE__ */ A(D.Root, { onOpenChange: u, align: "start", children: [
1711
+ /* @__PURE__ */ p(D.ClickTrigger, { children: /* @__PURE__ */ A(
1712
1712
  B,
1713
1713
  {
1714
1714
  id: e.identifier,
@@ -1725,12 +1725,12 @@ const mo = L((r) => {
1725
1725
  ]
1726
1726
  }
1727
1727
  ) }),
1728
- /* @__PURE__ */ p(D.Content, { size: t, children: /* @__PURE__ */ p(D.Scroll, { children: /* @__PURE__ */ _(D.MultiSelectGroup, { values: n, onValuesChange: c, children: [
1729
- /* @__PURE__ */ _(D.SelectAllItem, { children: [
1728
+ /* @__PURE__ */ p(D.Content, { size: t, children: /* @__PURE__ */ p(D.Scroll, { children: /* @__PURE__ */ A(D.MultiSelectGroup, { values: n, onValuesChange: c, children: [
1729
+ /* @__PURE__ */ A(D.SelectAllItem, { children: [
1730
1730
  /* @__PURE__ */ p(D.CheckboxItemIndicator, { children: (d) => d ? /* @__PURE__ */ p(T, { icon: Gr }) : /* @__PURE__ */ p(T, { icon: et }) }),
1731
1731
  "Select all"
1732
1732
  ] }),
1733
- e.options.map((d, f) => /* @__PURE__ */ _(
1733
+ e.options.map((d, f) => /* @__PURE__ */ A(
1734
1734
  D.MultiSelectItem,
1735
1735
  {
1736
1736
  value: d.value,
@@ -1831,8 +1831,8 @@ const Co = L((r) => {
1831
1831
  required: e.required,
1832
1832
  error: s,
1833
1833
  image: e.image,
1834
- children: /* @__PURE__ */ _(D.Root, { onOpenChange: u, align: "start", children: [
1835
- /* @__PURE__ */ p(D.ClickTrigger, { children: /* @__PURE__ */ _(
1834
+ children: /* @__PURE__ */ A(D.Root, { onOpenChange: u, align: "start", children: [
1835
+ /* @__PURE__ */ p(D.ClickTrigger, { children: /* @__PURE__ */ A(
1836
1836
  B,
1837
1837
  {
1838
1838
  id: e.identifier,
@@ -1849,7 +1849,7 @@ const Co = L((r) => {
1849
1849
  ]
1850
1850
  }
1851
1851
  ) }),
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__ */ _(
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__ */ A(
1853
1853
  D.SelectItem,
1854
1854
  {
1855
1855
  value: f.value,
@@ -1942,7 +1942,7 @@ const wo = L((r) => {
1942
1942
  required: e.required,
1943
1943
  error: s,
1944
1944
  image: e.image,
1945
- children: /* @__PURE__ */ _(
1945
+ children: /* @__PURE__ */ A(
1946
1946
  Sn.Root,
1947
1947
  {
1948
1948
  id: e.identifier,
@@ -2153,7 +2153,7 @@ function li(r, e) {
2153
2153
  }
2154
2154
  const _o = L((r) => {
2155
2155
  const { ref: e, file: t, error: n, rightSlot: i, className: a, size: o, ...s } = r;
2156
- return /* @__PURE__ */ _(
2156
+ return /* @__PURE__ */ A(
2157
2157
  pt,
2158
2158
  {
2159
2159
  className: Ct(a, "p-0! relative flex h-48 w-full flex-col items-center"),
@@ -2164,7 +2164,7 @@ const _o = L((r) => {
2164
2164
  !t && !n && /* @__PURE__ */ p("div", { className: "absolute inset-0 flex grow items-center justify-center", children: /* @__PURE__ */ p(ti, {}) }),
2165
2165
  !!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
2166
  /* @__PURE__ */ p(Ft, { size: "full" }),
2167
- (!!t || !!n) && /* @__PURE__ */ _(
2167
+ (!!t || !!n) && /* @__PURE__ */ A(
2168
2168
  "div",
2169
2169
  {
2170
2170
  className: Ct("flex w-full items-center gap-2 self-end p-3", {
@@ -2189,7 +2189,7 @@ const Ao = L((r) => {
2189
2189
  Ao.displayName = "VideoFile";
2190
2190
  const Eo = L((r) => {
2191
2191
  const { ref: e, file: t, className: n, error: i, rightSlot: a, size: o, ...s } = r;
2192
- return /* @__PURE__ */ _(
2192
+ return /* @__PURE__ */ A(
2193
2193
  pt,
2194
2194
  {
2195
2195
  className: Ct(n, "p-0! relative flex h-48 w-full flex-col items-center"),
@@ -2200,7 +2200,7 @@ const Eo = L((r) => {
2200
2200
  !t && !i && /* @__PURE__ */ p("div", { className: "absolute inset-0 flex grow items-center justify-center", children: /* @__PURE__ */ p(ti, {}) }),
2201
2201
  !!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
2202
  /* @__PURE__ */ p(Ft, { size: "full" }),
2203
- (!!t || !!i) && /* @__PURE__ */ _(
2203
+ (!!t || !!i) && /* @__PURE__ */ A(
2204
2204
  "div",
2205
2205
  {
2206
2206
  className: Ct("flex w-full items-center gap-2 self-end p-3", {
@@ -2221,11 +2221,22 @@ Eo.displayName = "VideoCard";
2221
2221
  const ci = L((r) => {
2222
2222
  const { fileOrPromise: e, onRemove: t, disabled: n, size: i } = r, [a, o] = qe(null), [s, l] = qe(null), c = si();
2223
2223
  dt(() => {
2224
- e instanceof br ? e.then((m) => {
2225
- o(m);
2226
- }).catch((m) => {
2227
- l(m instanceof Error ? m.message : "Unknown error");
2228
- }) : o(e);
2224
+ let m = !0;
2225
+ return o(null), l(null), (async () => {
2226
+ if (e instanceof br)
2227
+ try {
2228
+ const _ = await e;
2229
+ if (!m) return;
2230
+ o(_);
2231
+ } catch (_) {
2232
+ if (!m) return;
2233
+ l(_ instanceof Error ? _.message : "Unknown error");
2234
+ }
2235
+ else
2236
+ o(e);
2237
+ })(), () => {
2238
+ m = !1;
2239
+ };
2229
2240
  }, [e]);
2230
2241
  const u = b(() => {
2231
2242
  if (!a) return;
@@ -2245,7 +2256,7 @@ const ci = L((r) => {
2245
2256
  }
2246
2257
  }));
2247
2258
  }, [n, d, c, a]), v = se(
2248
- () => /* @__PURE__ */ p("div", { className: "flex grow justify-end", children: /* @__PURE__ */ _(D.Root, { modal: !0, children: [
2259
+ () => /* @__PURE__ */ p("div", { className: "flex grow justify-end", children: /* @__PURE__ */ A(D.Root, { modal: !0, children: [
2249
2260
  /* @__PURE__ */ p(D.ClickTrigger, { children: /* @__PURE__ */ p(
2250
2261
  ne,
2251
2262
  {
@@ -2257,14 +2268,14 @@ const ci = L((r) => {
2257
2268
  children: /* @__PURE__ */ p(T, { icon: eo })
2258
2269
  }
2259
2270
  ) }),
2260
- /* @__PURE__ */ _(D.Content, { size: i, children: [
2261
- /* @__PURE__ */ _(D.Item, { onSelect: u, disabled: !a, children: [
2271
+ /* @__PURE__ */ A(D.Content, { size: i, children: [
2272
+ /* @__PURE__ */ A(D.Item, { onSelect: u, disabled: !a, children: [
2262
2273
  /* @__PURE__ */ p(T, { icon: Ja }),
2263
2274
  " Download"
2264
2275
  ] }),
2265
- n ? null : /* @__PURE__ */ _(Je, { children: [
2276
+ n ? null : /* @__PURE__ */ A(Je, { children: [
2266
2277
  /* @__PURE__ */ p(D.Separator, {}),
2267
- /* @__PURE__ */ _(D.Item, { onSelect: d, children: [
2278
+ /* @__PURE__ */ A(D.Item, { onSelect: d, children: [
2268
2279
  /* @__PURE__ */ p(T, { icon: Lt }),
2269
2280
  " Delete"
2270
2281
  ] })
@@ -2364,7 +2375,7 @@ const So = L((r) => {
2364
2375
  w.abort();
2365
2376
  };
2366
2377
  }, [a, n]);
2367
- const y = n.status && e.showNotesAndFilesOn.includes(n.status), m = `${e.identifier}-status`, C = `${e.identifier}-notes`, A = `${e.identifier}-files`;
2378
+ const y = n.status && e.showNotesAndFilesOn.includes(n.status), m = `${e.identifier}-status`, C = `${e.identifier}-notes`, _ = `${e.identifier}-files`;
2368
2379
  return /* @__PURE__ */ p(
2369
2380
  Re,
2370
2381
  {
@@ -2375,7 +2386,7 @@ const So = L((r) => {
2375
2386
  required: e.required,
2376
2387
  error: s,
2377
2388
  image: e.image,
2378
- children: /* @__PURE__ */ _("div", { className: "flex flex-col gap-2", children: [
2389
+ children: /* @__PURE__ */ A("div", { className: "flex flex-col gap-2", children: [
2379
2390
  /* @__PURE__ */ p(
2380
2391
  Wt.Root,
2381
2392
  {
@@ -2390,14 +2401,14 @@ const So = L((r) => {
2390
2401
  onValueChange: u,
2391
2402
  children: wr.map((w) => {
2392
2403
  const { label: S } = $t[w];
2393
- return /* @__PURE__ */ _("label", { className: "flex min-w-0 items-center gap-2", children: [
2404
+ return /* @__PURE__ */ A("label", { className: "flex min-w-0 items-center gap-2", children: [
2394
2405
  /* @__PURE__ */ p(Wt.Item, { value: w, children: /* @__PURE__ */ p(Wt.Indicator, { children: /* @__PURE__ */ p(T, { icon: Za, className: "fill-current" }) }) }),
2395
2406
  /* @__PURE__ */ p(pe, { size: t, accentColor: "base", className: "truncate", children: S })
2396
2407
  ] }, `${e.identifier}-${w}`);
2397
2408
  })
2398
2409
  }
2399
2410
  ),
2400
- y && /* @__PURE__ */ _(Je, { children: [
2411
+ y && /* @__PURE__ */ A(Je, { children: [
2401
2412
  /* @__PURE__ */ p("div", { children: /* @__PURE__ */ p(
2402
2413
  or,
2403
2414
  {
@@ -2415,8 +2426,8 @@ const So = L((r) => {
2415
2426
  disabled: l
2416
2427
  }
2417
2428
  ) }),
2418
- /* @__PURE__ */ _("div", { className: "flex flex-col gap-2", children: [
2419
- /* @__PURE__ */ _(
2429
+ /* @__PURE__ */ A("div", { className: "flex flex-col gap-2", children: [
2430
+ /* @__PURE__ */ A(
2420
2431
  B,
2421
2432
  {
2422
2433
  className: "w-max",
@@ -2435,7 +2446,7 @@ const So = L((r) => {
2435
2446
  /* @__PURE__ */ p(
2436
2447
  "input",
2437
2448
  {
2438
- id: A,
2449
+ id: _,
2439
2450
  name: i,
2440
2451
  type: "file",
2441
2452
  ref: c,
@@ -2605,7 +2616,7 @@ const Io = L((r) => {
2605
2616
  required: e.required,
2606
2617
  error: s,
2607
2618
  image: e.image,
2608
- children: /* @__PURE__ */ _(
2619
+ children: /* @__PURE__ */ A(
2609
2620
  Wt.Root,
2610
2621
  {
2611
2622
  id: e.identifier,
@@ -2618,7 +2629,7 @@ const Io = L((r) => {
2618
2629
  onValueChange: c,
2619
2630
  disabled: l,
2620
2631
  children: [
2621
- e.options.map((f, h) => /* @__PURE__ */ _(
2632
+ e.options.map((f, h) => /* @__PURE__ */ A(
2622
2633
  "label",
2623
2634
  {
2624
2635
  className: "flex min-w-0 items-center gap-2",
@@ -2629,7 +2640,7 @@ const Io = L((r) => {
2629
2640
  },
2630
2641
  `${e.identifier}-${f.value}-${h}`
2631
2642
  )),
2632
- !!n && /* @__PURE__ */ _(
2643
+ !!n && /* @__PURE__ */ A(
2633
2644
  B,
2634
2645
  {
2635
2646
  onClick: d,
@@ -2736,7 +2747,7 @@ const Xc = ri(
2736
2747
  required: e.required,
2737
2748
  error: s,
2738
2749
  image: e.image,
2739
- children: /* @__PURE__ */ _("div", { className: "flex flex-row items-center gap-1", children: [
2750
+ children: /* @__PURE__ */ A("div", { className: "flex flex-row items-center gap-1", children: [
2740
2751
  /* @__PURE__ */ p(
2741
2752
  Fi.Root,
2742
2753
  {
@@ -3541,8 +3552,8 @@ var Ee = (
3541
3552
  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) */
3542
3553
  239 && e[1] === /*(byte) */
3543
3554
  187 && e[2] === /*(byte) */
3544
- 191, A = 0; A < n && (i || a || o); A++) {
3545
- var w = e[A] & 255;
3555
+ 191, _ = 0; _ < n && (i || a || o); _++) {
3556
+ var w = e[_] & 255;
3546
3557
  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));
3547
3558
  }
3548
3559
  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;
@@ -3925,8 +3936,8 @@ var Ee = (
3925
3936
  var g = v << e.BLOCK_SIZE_POWER;
3926
3937
  g > u && (g = u);
3927
3938
  for (var y = e.cap(v, 2, n - 3), m = 0, C = -2; C <= 2; C++) {
3928
- var A = s[h + C];
3929
- m += A[y - 2] + A[y - 1] + A[y] + A[y + 1] + A[y + 2];
3939
+ var _ = s[h + C];
3940
+ m += _[y - 2] + _[y - 1] + _[y] + _[y + 1] + _[y + 2];
3930
3941
  }
3931
3942
  var w = m / 25;
3932
3943
  e.thresholdBlock(t, g, f, w, a, l);
@@ -3947,14 +3958,14 @@ var Ee = (
3947
3958
  var h = f << e.BLOCK_SIZE_POWER;
3948
3959
  h > l && (h = l);
3949
3960
  for (var v = 0, g = 255, y = 0, m = 0, C = d * a + h; m < e.BLOCK_SIZE; m++, C += a) {
3950
- for (var A = 0; A < e.BLOCK_SIZE; A++) {
3951
- var w = t[C + A] & 255;
3961
+ for (var _ = 0; _ < e.BLOCK_SIZE; _++) {
3962
+ var w = t[C + _] & 255;
3952
3963
  v += w, w < g && (g = w), w > y && (y = w);
3953
3964
  }
3954
3965
  if (y - g > e.MIN_DYNAMIC_RANGE)
3955
3966
  for (m++, C += a; m < e.BLOCK_SIZE; m++, C += a)
3956
- for (var A = 0; A < e.BLOCK_SIZE; A++)
3957
- v += t[C + A] & 255;
3967
+ for (var _ = 0; _ < e.BLOCK_SIZE; _++)
3968
+ v += t[C + _] & 255;
3958
3969
  }
3959
3970
  var S = v >> e.BLOCK_SIZE_POWER * 2;
3960
3971
  if (y - g <= e.MIN_DYNAMIC_RANGE && (S = g / 2, u > 0 && f > 0)) {
@@ -5105,8 +5116,8 @@ var en = (
5105
5116
  var m = c.getCoefficient(0);
5106
5117
  if (m === 0)
5107
5118
  throw new Dr("sigmaTilde(0) was zero");
5108
- var C = a.inverse(m), A = c.multiplyScalar(C), w = s.multiplyScalar(C);
5109
- return [A, w];
5119
+ var C = a.inverse(m), _ = c.multiplyScalar(C), w = s.multiplyScalar(C);
5120
+ return [_, w];
5110
5121
  }, r.prototype.findErrorLocations = function(e) {
5111
5122
  var t = e.getDegree();
5112
5123
  if (t === 1)
@@ -5568,9 +5579,9 @@ var zi = (
5568
5579
  o && (s = !0);
5569
5580
  }
5570
5581
  if (!a && s) {
5571
- for (var C = t - e, A = null, w = 1; A === null && w < C; w++)
5572
- A = this.getBlackPointOnSegment(e, i - w, e + w, i);
5573
- if (A == null)
5582
+ for (var C = t - e, _ = null, w = 1; _ === null && w < C; w++)
5583
+ _ = this.getBlackPointOnSegment(e, i - w, e + w, i);
5584
+ if (_ == null)
5574
5585
  throw new I();
5575
5586
  for (var S = null, w = 1; S === null && w < C; w++)
5576
5587
  S = this.getBlackPointOnSegment(e, n + w, e + w, n);
@@ -5584,7 +5595,7 @@ var zi = (
5584
5595
  N = this.getBlackPointOnSegment(t, i - w, t - w, i);
5585
5596
  if (N == null)
5586
5597
  throw new I();
5587
- return this.centerEdges(N, A, O, S);
5598
+ return this.centerEdges(N, _, O, S);
5588
5599
  } else
5589
5600
  throw new I();
5590
5601
  }, r.prototype.getBlackPointOnSegment = function(e, t, n, i) {
@@ -5696,8 +5707,8 @@ var zi = (
5696
5707
  function e() {
5697
5708
  return r !== null && r.apply(this, arguments) || this;
5698
5709
  }
5699
- return e.prototype.sampleGrid = function(t, n, i, a, o, s, l, c, u, d, f, h, v, g, y, m, C, A, w) {
5700
- var S = Do.quadrilateralToQuadrilateral(a, o, s, l, c, u, d, f, h, v, g, y, m, C, A, w);
5710
+ return e.prototype.sampleGrid = function(t, n, i, a, o, s, l, c, u, d, f, h, v, g, y, m, C, _, w) {
5711
+ var S = Do.quadrilateralToQuadrilateral(a, o, s, l, c, u, d, f, h, v, g, y, m, C, _, w);
5701
5712
  return this.sampleGridWithTransform(t, n, i, S);
5702
5713
  }, e.prototype.sampleGridWithTransform = function(t, n, i, a) {
5703
5714
  if (n <= 0 || i <= 0)
@@ -6003,10 +6014,10 @@ var be = (
6003
6014
  }
6004
6015
  for (var v = function(C) {
6005
6016
  if (C === 1 && (a.reverse(), t && t.get(ve.NEED_RESULT_POINT_CALLBACK) === !0)) {
6006
- var A = /* @__PURE__ */ new Map();
6017
+ var _ = /* @__PURE__ */ new Map();
6007
6018
  t.forEach(function(O, N) {
6008
- return A.set(N, O);
6009
- }), A.delete(ve.NEED_RESULT_POINT_CALLBACK), t = A;
6019
+ return _.set(N, O);
6020
+ }), _.delete(ve.NEED_RESULT_POINT_CALLBACK), t = _;
6010
6021
  }
6011
6022
  try {
6012
6023
  var w = g.decodeRow(h, a, t);
@@ -6131,9 +6142,9 @@ var be = (
6131
6142
  default:
6132
6143
  throw new M();
6133
6144
  }
6134
- 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, N = !1; !d; ) {
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, _ = s, w = 0, S = !0, O = !1, N = !1; !d; ) {
6135
6146
  var F = f;
6136
- 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) {
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++, _ += w * C), v = g, g += y.reduce(function(_n, An) {
6137
6148
  return _n + An;
6138
6149
  }, 0), C) {
6139
6150
  case e.CODE_START_A:
@@ -6225,7 +6236,7 @@ var be = (
6225
6236
  var z = g - v;
6226
6237
  if (g = n.getNextUnset(g), !n.isRange(g, Math.min(n.getSize(), g + (g - v) / 2), !1))
6227
6238
  throw new I();
6228
- if (A -= w * m, A % 103 !== m)
6239
+ if (_ -= w * m, _ % 103 !== m)
6229
6240
  throw new Te();
6230
6241
  var U = h.length;
6231
6242
  if (U === 0)
@@ -6405,11 +6416,11 @@ var be = (
6405
6416
  d = n.getNextSet(d);
6406
6417
  } while (h !== "*");
6407
6418
  this.decodeRowResult = this.decodeRowResult.substring(0, this.decodeRowResult.length - 1);
6408
- var A = 0;
6419
+ var _ = 0;
6409
6420
  try {
6410
6421
  for (var w = On(c), S = w.next(); !S.done; S = w.next()) {
6411
6422
  var C = S.value;
6412
- A += C;
6423
+ _ += C;
6413
6424
  }
6414
6425
  } catch (Z) {
6415
6426
  s = { error: Z };
@@ -6420,8 +6431,8 @@ var be = (
6420
6431
  if (s) throw s.error;
6421
6432
  }
6422
6433
  }
6423
- var O = d - v - A;
6424
- if (d !== f && O * 2 < A)
6434
+ var O = d - v - _;
6435
+ if (d !== f && O * 2 < _)
6425
6436
  throw new I();
6426
6437
  if (this.usingCheckDigit) {
6427
6438
  for (var N = this.decodeRowResult.length - 1, F = 0, z = 0; z < N; z++)
@@ -6434,7 +6445,7 @@ var be = (
6434
6445
  throw new I();
6435
6446
  var U;
6436
6447
  this.extendedMode ? U = e.decodeExtended(this.decodeRowResult) : U = this.decodeRowResult;
6437
- var Q = (u[1] + u[0]) / 2, X = v + A / 2;
6448
+ var Q = (u[1] + u[0]) / 2, X = v + _ / 2;
6438
6449
  return new Xe(U, null, 0, [new k(Q, t), new k(X, t)], P.CODE_39, (/* @__PURE__ */ new Date()).getTime());
6439
6450
  }, e.findAsteriskPattern = function(t, n) {
6440
6451
  for (var i = t.getSize(), a = t.getNextSet(0), o = 0, s = a, l = !1, c = n.length, u = a; u < i; u++)
@@ -6648,11 +6659,11 @@ var be = (
6648
6659
  u = n.getNextSet(u);
6649
6660
  } while (h !== "*");
6650
6661
  this.decodeRowResult = this.decodeRowResult.substring(0, this.decodeRowResult.length - 1);
6651
- var A = 0;
6662
+ var _ = 0;
6652
6663
  try {
6653
6664
  for (var w = Nn(f), S = w.next(); !S.done; S = w.next()) {
6654
6665
  var C = S.value;
6655
- A += C;
6666
+ _ += C;
6656
6667
  }
6657
6668
  } catch (z) {
6658
6669
  s = { error: z };
@@ -6668,7 +6679,7 @@ var be = (
6668
6679
  if (this.decodeRowResult.length < 2)
6669
6680
  throw new I();
6670
6681
  this.checkChecksums(this.decodeRowResult), this.decodeRowResult = this.decodeRowResult.substring(0, this.decodeRowResult.length - 2);
6671
- var O = this.decodeExtended(this.decodeRowResult), N = (c[1] + c[0]) / 2, F = v + A / 2;
6682
+ var O = this.decodeExtended(this.decodeRowResult), N = (c[1] + c[0]) / 2, F = v + _ / 2;
6672
6683
  return new Xe(O, null, 0, [new k(N, t), new k(F, t)], P.CODE_93, (/* @__PURE__ */ new Date()).getTime());
6673
6684
  }, e.prototype.findAsteriskPattern = function(t) {
6674
6685
  var n = t.getSize(), i = t.getNextSet(0);
@@ -6889,7 +6900,7 @@ var be = (
6889
6900
  }
6890
6901
  if (!h && f > v && (h = !0), !h)
6891
6902
  throw new M();
6892
- var C = [new k(s[1], t), new k(l[0], t)], A = new Xe(
6903
+ var C = [new k(s[1], t), new k(l[0], t)], _ = new Xe(
6893
6904
  u,
6894
6905
  null,
6895
6906
  // no natural byte representation for these barcodes
@@ -6898,7 +6909,7 @@ var be = (
6898
6909
  P.ITF,
6899
6910
  (/* @__PURE__ */ new Date()).getTime()
6900
6911
  );
6901
- return A;
6912
+ return _;
6902
6913
  }, e.decodeMiddle = function(t, n, i, a) {
6903
6914
  var o = new Int32Array(10), s = new Int32Array(5), l = new Int32Array(5);
6904
6915
  for (o.fill(0), s.fill(0), l.fill(0); n < i; ) {
@@ -7311,7 +7322,7 @@ var be = (
7311
7322
  throw new M();
7312
7323
  if (!e.checkChecksum(y))
7313
7324
  throw new Te();
7314
- 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 Xe(y, null, 0, w, A, (/* @__PURE__ */ new Date()).getTime()), O = 0;
7325
+ var m = (a[1] + a[0]) / 2, C = (f[1] + f[0]) / 2, _ = this.getBarcodeFormat(), w = [new k(m, t), new k(C, t)], S = new Xe(y, null, 0, w, _, (/* @__PURE__ */ new Date()).getTime()), O = 0;
7315
7326
  try {
7316
7327
  var N = ku.decodeRow(t, n, f[1]);
7317
7328
  S.putMetadata(ke.UPC_EAN_EXTENSION, N.getText()), S.putAllMetadata(N.getResultMetadata()), S.addResultPoints(N.getResultPoints()), O = N.getText().length;
@@ -7328,7 +7339,7 @@ var be = (
7328
7339
  if (!z)
7329
7340
  throw new I();
7330
7341
  }
7331
- return A === P.EAN_13 || P.UPC_A, S;
7342
+ return _ === P.EAN_13 || P.UPC_A, S;
7332
7343
  }, e.checkChecksum = function(t) {
7333
7344
  return e.checkStandardUPCEANChecksum(t);
7334
7345
  }, e.checkStandardUPCEANChecksum = function(t) {
@@ -7417,7 +7428,7 @@ var be = (
7417
7428
  var v = Ae.decodeDigit(t, c, d, Ae.L_PATTERNS);
7418
7429
  i += String.fromCharCode(48 + v);
7419
7430
  try {
7420
- for (var A = (s = void 0, Wi(c)), w = A.next(); !w.done; w = A.next()) {
7431
+ for (var _ = (s = void 0, Wi(c)), w = _.next(); !w.done; w = _.next()) {
7421
7432
  var m = w.value;
7422
7433
  d += m;
7423
7434
  }
@@ -7425,7 +7436,7 @@ var be = (
7425
7436
  s = { error: N };
7426
7437
  } finally {
7427
7438
  try {
7428
- w && !w.done && (l = A.return) && l.call(A);
7439
+ w && !w.done && (l = _.return) && l.call(_);
7429
7440
  } finally {
7430
7441
  if (s) throw s.error;
7431
7442
  }
@@ -7500,15 +7511,15 @@ var be = (
7500
7511
  var h = Ae.decodeDigit(t, c, d, Ae.L_PATTERNS);
7501
7512
  i += String.fromCharCode(48 + h);
7502
7513
  try {
7503
- for (var C = (s = void 0, $i(c)), A = C.next(); !A.done; A = C.next()) {
7504
- var y = A.value;
7514
+ for (var C = (s = void 0, $i(c)), _ = C.next(); !_.done; _ = C.next()) {
7515
+ var y = _.value;
7505
7516
  d += y;
7506
7517
  }
7507
7518
  } catch (O) {
7508
7519
  s = { error: O };
7509
7520
  } finally {
7510
7521
  try {
7511
- A && !A.done && (l = C.return) && l.call(C);
7522
+ _ && !_.done && (l = C.return) && l.call(C);
7512
7523
  } finally {
7513
7524
  if (s) throw s.error;
7514
7525
  }
@@ -8215,11 +8226,11 @@ var be = (
8215
8226
  }
8216
8227
  if (e.length < 4)
8217
8228
  throw new I();
8218
- var A = e.substring(0, 4);
8229
+ var _ = e.substring(0, 4);
8219
8230
  try {
8220
8231
  for (var w = Rr(r.FOUR_DIGIT_DATA_LENGTH), S = w.next(); !S.done; S = w.next()) {
8221
8232
  var h = S.value;
8222
- if (h[0] === A)
8233
+ if (h[0] === _)
8223
8234
  return h[1] === r.VARIABLE_LENGTH ? r.processVariableAI(4, h[2], e) : r.processFixedAI(4, h[1], e);
8224
8235
  }
8225
8236
  } catch (O) {
@@ -9206,8 +9217,8 @@ var Qi = (
9206
9217
  for (var v = (o = void 0, _t(f.getPairs())), g = v.next(); !g.done; g = v.next()) {
9207
9218
  var y = g.value, m = !1;
9208
9219
  try {
9209
- for (var C = (l = void 0, _t(t)), A = C.next(); !A.done; A = C.next()) {
9210
- var w = A.value;
9220
+ for (var C = (l = void 0, _t(t)), _ = C.next(); !_.done; _ = C.next()) {
9221
+ var w = _.value;
9211
9222
  if (Qi.equals(y, w)) {
9212
9223
  m = !0;
9213
9224
  break;
@@ -9217,7 +9228,7 @@ var Qi = (
9217
9228
  l = { error: S };
9218
9229
  } finally {
9219
9230
  try {
9220
- A && !A.done && (c = C.return) && c.call(C);
9231
+ _ && !_.done && (c = C.return) && c.call(C);
9221
9232
  } finally {
9222
9233
  if (l) throw l.error;
9223
9234
  }
@@ -9253,8 +9264,8 @@ var Qi = (
9253
9264
  for (var v = (o = void 0, _t(t)), g = v.next(); !g.done; g = v.next()) {
9254
9265
  var y = g.value, m = !1;
9255
9266
  try {
9256
- for (var C = (l = void 0, _t(f.getPairs())), A = C.next(); !A.done; A = C.next()) {
9257
- var w = A.value;
9267
+ for (var C = (l = void 0, _t(f.getPairs())), _ = C.next(); !_.done; _ = C.next()) {
9268
+ var w = _.value;
9258
9269
  if (y.equals(w)) {
9259
9270
  m = !0;
9260
9271
  break;
@@ -9264,7 +9275,7 @@ var Qi = (
9264
9275
  l = { error: S };
9265
9276
  } finally {
9266
9277
  try {
9267
- A && !A.done && (c = C.return) && c.call(C);
9278
+ _ && !_.done && (c = C.return) && c.call(C);
9268
9279
  } finally {
9269
9280
  if (l) throw l.error;
9270
9281
  }
@@ -9405,18 +9416,18 @@ var Qi = (
9405
9416
  if (Math.abs(f - h) / h > 0.3)
9406
9417
  throw new I();
9407
9418
  for (var v = this.getOddCounts(), g = this.getEvenCounts(), y = this.getOddRoundingErrors(), m = this.getEvenRoundingErrors(), l = 0; l < o.length; l++) {
9408
- var C = 1 * o[l] / f, A = C + 0.5;
9409
- if (A < 1) {
9419
+ var C = 1 * o[l] / f, _ = C + 0.5;
9420
+ if (_ < 1) {
9410
9421
  if (C < 0.3)
9411
9422
  throw new I();
9412
- A = 1;
9413
- } else if (A > 8) {
9423
+ _ = 1;
9424
+ } else if (_ > 8) {
9414
9425
  if (C > 8.7)
9415
9426
  throw new I();
9416
- A = 8;
9427
+ _ = 8;
9417
9428
  }
9418
9429
  var w = l / 2;
9419
- (l & 1) === 0 ? (v[w] = A, y[w] = C - A) : (g[w] = A, m[w] = C - A);
9430
+ (l & 1) === 0 ? (v[w] = _, y[w] = C - _) : (g[w] = _, m[w] = C - _);
9420
9431
  }
9421
9432
  this.adjustOddEvenCounts(d);
9422
9433
  for (var S = 4 * n.getValue() + (i ? 0 : 2) + (a ? 0 : 1) - 1, O = 0, N = 0, l = v.length - 1; l >= 0; l--) {
@@ -9768,15 +9779,15 @@ var Qi = (
9768
9779
  (s & 1) === 0 ? (f[C] = m, v[C] = y - m) : (h[C] = m, g[C] = y - m);
9769
9780
  }
9770
9781
  this.adjustOddEvenCounts(i, u);
9771
- for (var A = 0, w = 0, s = f.length - 1; s >= 0; s--)
9772
- w *= 9, w += f[s], A += f[s];
9782
+ for (var _ = 0, w = 0, s = f.length - 1; s >= 0; s--)
9783
+ w *= 9, w += f[s], _ += f[s];
9773
9784
  for (var S = 0, O = 0, s = h.length - 1; s >= 0; s--)
9774
9785
  S *= 9, S += h[s], O += h[s];
9775
9786
  var N = w + 3 * S;
9776
9787
  if (i) {
9777
- if ((A & 1) !== 0 || A > 12 || A < 4)
9788
+ if ((_ & 1) !== 0 || _ > 12 || _ < 4)
9778
9789
  throw new I();
9779
- var F = (12 - A) / 2, z = e.OUTSIDE_ODD_WIDEST[F], U = 9 - z, Q = Gt.getRSSvalue(f, z, !1), X = Gt.getRSSvalue(h, U, !0), Z = e.OUTSIDE_EVEN_TOTAL_SUBSET[F], Fe = e.OUTSIDE_GSUM[F];
9790
+ var F = (12 - _) / 2, z = e.OUTSIDE_ODD_WIDEST[F], U = 9 - z, Q = Gt.getRSSvalue(f, z, !1), X = Gt.getRSSvalue(h, U, !0), Z = e.OUTSIDE_EVEN_TOTAL_SUBSET[F], Fe = e.OUTSIDE_GSUM[F];
9780
9791
  return new Wr(Q * Z + X + Fe, N);
9781
9792
  } else {
9782
9793
  if ((O & 1) !== 0 || O > 10 || O < 4)
@@ -10118,8 +10129,8 @@ var ea = function(r) {
10118
10129
  for (var f = d * i, h = 0; h < s; ++h)
10119
10130
  for (var v = h * a, g = 0; g < i; ++g)
10120
10131
  for (var y = d * (i + 2) + 1 + g, m = f + g, C = 0; C < a; ++C) {
10121
- var A = h * (a + 2) + 1 + C;
10122
- if (e.get(A, y)) {
10132
+ var _ = h * (a + 2) + 1 + C;
10133
+ if (e.get(_, y)) {
10123
10134
  var w = v + C;
10124
10135
  u.set(w, m);
10125
10136
  }
@@ -10162,8 +10173,8 @@ var ea = function(r) {
10162
10173
  try {
10163
10174
  for (var g = ta(c), y = g.next(); !y.done; y = g.next())
10164
10175
  for (var f = y.value, m = 0; m < f.getCount(); m++) {
10165
- var C = f.getDataCodewords(), A = s.getECCodewords() + C;
10166
- h[v++] = new r(C, new Uint8Array(A));
10176
+ var C = f.getDataCodewords(), _ = s.getECCodewords() + C;
10177
+ h[v++] = new r(C, new Uint8Array(_));
10167
10178
  }
10168
10179
  } catch (Fe) {
10169
10180
  a = { error: Fe };
@@ -10651,8 +10662,8 @@ var Td = (
10651
10662
  var d = u.value;
10652
10663
  l += d.getNumDataCodewords();
10653
10664
  }
10654
- } catch (A) {
10655
- t = { error: A };
10665
+ } catch (_) {
10666
+ t = { error: _ };
10656
10667
  } finally {
10657
10668
  try {
10658
10669
  u && !u.done && (n = c.return) && n.call(c);
@@ -11323,8 +11334,8 @@ var ra = (
11323
11334
  try {
11324
11335
  for (var y = na(u), m = y.next(); !m.done; m = y.next())
11325
11336
  for (var h = m.value, C = 0; C < h.getCount(); C++) {
11326
- var A = h.getDataCodewords(), w = l.getECCodewordsPerBlock() + A;
11327
- v[g++] = new r(A, new Uint8Array(w));
11337
+ var _ = h.getDataCodewords(), w = l.getECCodewordsPerBlock() + _;
11338
+ v[g++] = new r(_, new Uint8Array(w));
11328
11339
  }
11329
11340
  } catch (Z) {
11330
11341
  o = { error: Z };
@@ -11617,10 +11628,10 @@ var he = (
11617
11628
  var g = new Uint8Array(d), y = 0;
11618
11629
  try {
11619
11630
  for (var m = ia(u), C = m.next(); !C.done; C = m.next()) {
11620
- var v = C.value, A = v.getCodewords(), w = v.getNumDataCodewords();
11621
- this.correctErrors(A, w);
11631
+ var v = C.value, _ = v.getCodewords(), w = v.getNumDataCodewords();
11632
+ this.correctErrors(_, w);
11622
11633
  for (var S = 0; S < w; S++)
11623
- g[y++] = A[S];
11634
+ g[y++] = _[S];
11624
11635
  }
11625
11636
  } catch (O) {
11626
11637
  a = { error: O };
@@ -12127,15 +12138,15 @@ var he = (
12127
12138
  if (o.length > 3) {
12128
12139
  var l = 0;
12129
12140
  try {
12130
- for (var C = dr(o), A = C.next(); !A.done; A = C.next()) {
12131
- var w = A.value;
12141
+ for (var C = dr(o), _ = C.next(); !_.done; _ = C.next()) {
12142
+ var w = _.value;
12132
12143
  l += w.getEstimatedModuleSize();
12133
12144
  }
12134
12145
  } catch (O) {
12135
12146
  n = { error: O };
12136
12147
  } finally {
12137
12148
  try {
12138
- A && !A.done && (i = C.return) && i.call(C);
12149
+ _ && !_.done && (i = C.return) && i.call(C);
12139
12150
  } finally {
12140
12151
  if (n) throw n.error;
12141
12152
  }
@@ -12194,9 +12205,9 @@ var he = (
12194
12205
  try {
12195
12206
  c = this.findAlignmentInRegion(a, h, v, g);
12196
12207
  break;
12197
- } catch (A) {
12198
- if (!(A instanceof I))
12199
- throw A;
12208
+ } catch (_) {
12209
+ if (!(_ instanceof I))
12210
+ throw _;
12200
12211
  }
12201
12212
  var y = r.createTransform(t, n, i, c, o), m = r.sampleGrid(this.image, y, o), C;
12202
12213
  return c === null ? C = [i, t, n] : C = [i, t, n, c], new fi(m, C);
@@ -18389,7 +18400,7 @@ var he = (
18389
18400
  if (i) throw i.error;
18390
18401
  }
18391
18402
  }
18392
- 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++) {
18403
+ for (var m = new Dt(this.field, s), C = this.runEuclideanAlgorithm(this.field.buildMonomial(t, 1), m, t), _ = C[0], w = C[1], S = this.findErrorLocations(_), O = this.findErrorMagnitudes(w, _, S), c = 0; c < S.length; c++) {
18393
18404
  var N = e.length - 1 - this.field.log(S[c]);
18394
18405
  if (N < 0)
18395
18406
  throw Te.getChecksumInstance();
@@ -18415,8 +18426,8 @@ var he = (
18415
18426
  var y = l.getCoefficient(0);
18416
18427
  if (y === 0)
18417
18428
  throw Te.getChecksumInstance();
18418
- var m = this.field.inverse(y), C = l.multiply(m), A = o.multiply(m);
18419
- return [C, A];
18429
+ var m = this.field.inverse(y), C = l.multiply(m), _ = o.multiply(m);
18430
+ return [C, _];
18420
18431
  }, r.prototype.findErrorLocations = function(e) {
18421
18432
  for (var t = e.getDegree(), n = new Int32Array(t), i = 0, a = 1; a < this.field.getSize() && i < t; a++)
18422
18433
  e.evaluateAt(a) === 0 && (n[i] = this.field.inverse(a), i++);
@@ -19692,14 +19703,14 @@ var If = (
19692
19703
  void 0) {
19693
19704
  var C = void 0;
19694
19705
  m === 0 || m === v ? C = new aa(l, m === 0) : C = new ko(l), d.setDetectionResultColumn(m, C);
19695
- for (var A = -1, w = A, S = l.getMinY(); S <= l.getMaxY(); S++) {
19696
- if (A = r.getStartColumn(d, m, S, g), A < 0 || A > l.getMaxX()) {
19706
+ for (var _ = -1, w = _, S = l.getMinY(); S <= l.getMaxY(); S++) {
19707
+ if (_ = r.getStartColumn(d, m, S, g), _ < 0 || _ > l.getMaxX()) {
19697
19708
  if (w === -1)
19698
19709
  continue;
19699
- A = w;
19710
+ _ = w;
19700
19711
  }
19701
- var O = r.detectCodeword(e, l.getMinX(), l.getMaxX(), g, A, S, o, s);
19702
- O != null && (C.setCodeword(S, O), w = A, o = Math.min(o, O.getWidth()), s = Math.max(s, O.getWidth()));
19712
+ var O = r.detectCodeword(e, l.getMinX(), l.getMaxX(), g, _, S, o, s);
19713
+ O != null && (C.setCodeword(S, O), w = _, o = Math.min(o, O.getWidth()), s = Math.max(s, O.getWidth()));
19703
19714
  }
19704
19715
  }
19705
19716
  }
@@ -20713,7 +20724,7 @@ var zo = (
20713
20724
  this.terminateBits(y, h);
20714
20725
  var m = this.interleaveWithECBytes(h, u.getTotalCodewords(), y, g.getNumBlocks()), C = new Qn();
20715
20726
  C.setECLevel(t), C.setMode(o), C.setVersion(u);
20716
- var A = u.getDimensionForVersion(), w = new Pf(A, A), S = this.chooseMaskPattern(m, t, u, w);
20727
+ var _ = u.getDimensionForVersion(), w = new Pf(_, _), S = this.chooseMaskPattern(m, t, u, w);
20717
20728
  return C.setMaskPattern(S), ca.buildMatrix(m, t, u, S, w), C.setMatrix(w), C;
20718
20729
  }, r.recommendVersion = function(e, t, n, i) {
20719
20730
  var a = this.calculateBitsNeeded(t, n, i, Rt.getVersionForNumber(1)), o = this.chooseVersion(a, e), s = this.calculateBitsNeeded(t, n, i, o);
@@ -20807,11 +20818,11 @@ var zo = (
20807
20818
  }
20808
20819
  if (n !== c)
20809
20820
  throw new fe("Data bytes does not match offset");
20810
- for (var A = new De(), h = 0; h < u; ++h)
20821
+ for (var _ = new De(), h = 0; h < u; ++h)
20811
20822
  try {
20812
20823
  for (var w = (a = void 0, ua(f)), S = w.next(); !S.done; S = w.next()) {
20813
20824
  var O = S.value, m = O.getDataBytes();
20814
- h < m.length && A.appendBits(m[h], 8);
20825
+ h < m.length && _.appendBits(m[h], 8);
20815
20826
  }
20816
20827
  } catch (U) {
20817
20828
  a = { error: U };
@@ -20826,7 +20837,7 @@ var zo = (
20826
20837
  try {
20827
20838
  for (var N = (s = void 0, ua(f)), F = N.next(); !F.done; F = N.next()) {
20828
20839
  var O = F.value, C = O.getErrorCorrectionBytes();
20829
- h < C.length && A.appendBits(C[h], 8);
20840
+ h < C.length && _.appendBits(C[h], 8);
20830
20841
  }
20831
20842
  } catch (U) {
20832
20843
  s = { error: U };
@@ -20837,9 +20848,9 @@ var zo = (
20837
20848
  if (s) throw s.error;
20838
20849
  }
20839
20850
  }
20840
- if (t !== A.getSizeInBytes())
20841
- throw new fe("Interleaving error: " + t + " and " + A.getSizeInBytes() + " differ.");
20842
- return A;
20851
+ if (t !== _.getSizeInBytes())
20852
+ throw new fe("Interleaving error: " + t + " and " + _.getSizeInBytes() + " differ.");
20853
+ return _;
20843
20854
  }, r.generateECBytes = function(e, t) {
20844
20855
  for (var n = e.length, i = new Int32Array(n + t), a = 0; a < n; a++)
20845
20856
  i[a] = e[a] & 255;
@@ -21964,7 +21975,7 @@ var fa = 129, Uo = 230, Wf = 231, $f = 235, jf = 236, Yf = 237, Zf = 238, Kf = 2
21964
21975
  }
21965
21976
  if (!h)
21966
21977
  try {
21967
- for (var A = (o = void 0, Vn(this.ENCODERS)), w = A.next(); !w.done; w = A.next()) {
21978
+ for (var _ = (o = void 0, Vn(this.ENCODERS)), w = _.next(); !w.done; w = _.next()) {
21968
21979
  var y = w.value;
21969
21980
  if (y.canEncode(e.charAt(f))) {
21970
21981
  u.push(y), h = !0;
@@ -21975,7 +21986,7 @@ var fa = 129, Uo = 230, Wf = 231, $f = 235, jf = 236, Yf = 237, Zf = 238, Kf = 2
21975
21986
  o = { error: z };
21976
21987
  } finally {
21977
21988
  try {
21978
- w && !w.done && (s = A.return) && s.call(A);
21989
+ w && !w.done && (s = _.return) && s.call(_);
21979
21990
  } finally {
21980
21991
  if (o) throw o.error;
21981
21992
  }
@@ -22704,34 +22715,34 @@ var Pn = O1(Se.createInt32Array(5, 256)), Fr = function(r) {
22704
22715
  }
22705
22716
  }
22706
22717
  }
22707
- 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;
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), _;
22708
22719
  if (s) {
22709
- A = m;
22720
+ _ = m;
22710
22721
  for (var h = 0; h < C.length; h++)
22711
22722
  C[h] = h;
22712
22723
  } else {
22713
- A = m + 1 + 2 * j.truncDivision(j.truncDivision(m, 2) - 1, 15);
22714
- for (var w = j.truncDivision(m, 2), S = j.truncDivision(A, 2), h = 0; h < w; h++) {
22724
+ _ = m + 1 + 2 * j.truncDivision(j.truncDivision(m, 2) - 1, 15);
22725
+ for (var w = j.truncDivision(m, 2), S = j.truncDivision(_, 2), h = 0; h < w; h++) {
22715
22726
  var O = h + j.truncDivision(h, 15);
22716
22727
  C[w - h - 1] = S - O - 1, C[w + h] = S + O + 1;
22717
22728
  }
22718
22729
  }
22719
- for (var N = new vt(A), h = 0, F = 0; h < l; h++) {
22730
+ for (var N = new vt(_), h = 0, F = 0; h < l; h++) {
22720
22731
  for (var z = (l - h) * 4 + (s ? 9 : 12), U = 0; U < z; U++)
22721
22732
  for (var Q = U * 2, X = 0; X < 2; X++)
22722
22733
  v.get(F + Q + X) && N.set(C[h * 2 + X], C[h * 2 + U]), v.get(F + z * 2 + Q + X) && N.set(C[h * 2 + U], C[m - 1 - h * 2 - X]), v.get(F + z * 4 + Q + X) && N.set(C[m - 1 - h * 2 - X], C[m - 1 - h * 2 - U]), v.get(F + z * 6 + Q + X) && N.set(C[m - 1 - h * 2 - U], C[h * 2 + X]);
22723
22734
  F += z * 8;
22724
22735
  }
22725
- if (r.drawModeMessage(N, s, A, y), s)
22726
- r.drawBullsEye(N, j.truncDivision(A, 2), 5);
22736
+ if (r.drawModeMessage(N, s, _, y), s)
22737
+ r.drawBullsEye(N, j.truncDivision(_, 2), 5);
22727
22738
  else {
22728
- r.drawBullsEye(N, j.truncDivision(A, 2), 7);
22739
+ r.drawBullsEye(N, j.truncDivision(_, 2), 7);
22729
22740
  for (var h = 0, U = 0; h < j.truncDivision(m, 2) - 1; h += 15, U += 16)
22730
- for (var X = j.truncDivision(A, 2) & 1; X < A; X += 2)
22731
- N.set(j.truncDivision(A, 2) - U, X), N.set(j.truncDivision(A, 2) + U, X), N.set(X, j.truncDivision(A, 2) - U), N.set(X, j.truncDivision(A, 2) + U);
22741
+ for (var X = j.truncDivision(_, 2) & 1; X < _; X += 2)
22742
+ N.set(j.truncDivision(_, 2) - U, X), N.set(j.truncDivision(_, 2) + U, X), N.set(X, j.truncDivision(_, 2) - U), N.set(X, j.truncDivision(_, 2) + U);
22732
22743
  }
22733
22744
  var Z = new g1();
22734
- return Z.setCompact(s), Z.setSize(A), Z.setLayers(l), Z.setCodeWords(g), Z.setMatrix(N), Z;
22745
+ return Z.setCompact(s), Z.setSize(_), Z.setLayers(l), Z.setCodeWords(g), Z.setMatrix(N), Z;
22735
22746
  }, r.drawBullsEye = function(e, t, n) {
22736
22747
  for (var i = 0; i < n; i += 2)
22737
22748
  for (var a = t - i; a <= t + i; a++)
@@ -22873,9 +22884,9 @@ const D1 = /* @__PURE__ */ new Map([
22873
22884
  modal: a,
22874
22885
  ...o
22875
22886
  } = r;
22876
- return /* @__PURE__ */ _(xt.Root, { open: t, onOpenChange: n, defaultOpen: i, modal: a, children: [
22887
+ return /* @__PURE__ */ A(xt.Root, { open: t, onOpenChange: n, defaultOpen: i, modal: a, children: [
22877
22888
  !!e && /* @__PURE__ */ p(xt.Trigger, { asChild: !0, children: e }),
22878
- /* @__PURE__ */ _(xt.Content, { children: [
22889
+ /* @__PURE__ */ A(xt.Content, { children: [
22879
22890
  /* @__PURE__ */ p(xt.Title, { className: "sr-only", children: "Scanner" }),
22880
22891
  /* @__PURE__ */ p(xt.Description, { className: "sr-only", children: "Scan a barcode or a qr code." }),
22881
22892
  /* @__PURE__ */ p(qo, { ...o })
@@ -22892,7 +22903,7 @@ const qo = L((r) => {
22892
22903
  onError: a,
22893
22904
  hints: D1
22894
22905
  });
22895
- return /* @__PURE__ */ _("div", { className: "bg-(--color-background) flex size-full flex-col justify-center overflow-hidden", children: [
22906
+ return /* @__PURE__ */ A("div", { className: "bg-(--color-background) flex size-full flex-col justify-center overflow-hidden", children: [
22896
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(T, { icon: It }) }) }) }),
22897
22908
  /* @__PURE__ */ p("div", { className: "max-h-full w-full grow overflow-hidden p-4", children: /* @__PURE__ */ p("video", { className: "size-full", ref: o }) })
22898
22909
  ] });
@@ -22909,7 +22920,7 @@ const R1 = L((r) => {
22909
22920
  ), o = b(() => {
22910
22921
  t && (t.onClose && t.onClose(), i());
22911
22922
  }, [i, t]);
22912
- return /* @__PURE__ */ _(No.Provider, { value: a, children: [
22923
+ return /* @__PURE__ */ A(No.Provider, { value: a, children: [
22913
22924
  e,
22914
22925
  t && /* @__PURE__ */ p(yi, { open: !0, onOpenChange: o, ...t })
22915
22926
  ] });
@@ -22934,7 +22945,7 @@ const Xo = L((r) => {
22934
22945
  }, []), g = b(() => {
22935
22946
  u(!1), a();
22936
22947
  }, [a]);
22937
- return /* @__PURE__ */ _(
22948
+ return /* @__PURE__ */ A(
22938
22949
  Re,
22939
22950
  {
22940
22951
  size: t,
@@ -22961,7 +22972,7 @@ const Xo = L((r) => {
22961
22972
  disabled: l
22962
22973
  }
22963
22974
  ),
22964
- /* @__PURE__ */ _(
22975
+ /* @__PURE__ */ A(
22965
22976
  B,
22966
22977
  {
22967
22978
  onClick: v,
@@ -23263,7 +23274,7 @@ const rn = (r) => {
23263
23274
  },
23264
23275
  [n]
23265
23276
  );
23266
- return /* @__PURE__ */ _("div", { className: "flex min-w-0 gap-2", children: [
23277
+ return /* @__PURE__ */ A("div", { className: "flex min-w-0 gap-2", children: [
23267
23278
  /* @__PURE__ */ p(ge.Root, { className: "min-w-0 grow", accentColor: "base", variant: "surface", size: a, children: /* @__PURE__ */ p(
23268
23279
  ge.Field,
23269
23280
  {
@@ -23283,8 +23294,8 @@ const rn = (r) => {
23283
23294
  disabled: i
23284
23295
  }
23285
23296
  ) }),
23286
- /* @__PURE__ */ _(D.Root, { align: "end", onOpenChange: h, children: [
23287
- /* @__PURE__ */ p(D.ClickTrigger, { children: /* @__PURE__ */ _(
23297
+ /* @__PURE__ */ A(D.Root, { align: "end", onOpenChange: h, children: [
23298
+ /* @__PURE__ */ p(D.ClickTrigger, { children: /* @__PURE__ */ A(
23288
23299
  B,
23289
23300
  {
23290
23301
  type: "button",
@@ -23305,7 +23316,7 @@ const rn = (r) => {
23305
23316
  required: !0,
23306
23317
  value: c == null ? void 0 : c.utcOffset,
23307
23318
  onValueChange: f,
23308
- children: jo.map((v) => /* @__PURE__ */ _(D.SelectItem, { value: v, children: [
23319
+ children: jo.map((v) => /* @__PURE__ */ A(D.SelectItem, { value: v, children: [
23309
23320
  /* @__PURE__ */ p(D.SelectedIndicator, { children: /* @__PURE__ */ p(T, { icon: et }) }),
23310
23321
  ei(v)
23311
23322
  ] }, v))
@@ -23403,11 +23414,11 @@ const Ko = L((r) => {
23403
23414
  a();
23404
23415
  return;
23405
23416
  }
23406
- const C = Array.from(m).map((w) => Bt.from(G(), w)), A = [...n, ...C];
23407
- o(A), a();
23417
+ const C = Array.from(m).map((w) => Bt.from(G(), w)), _ = [...n, ...C];
23418
+ o(_), a();
23408
23419
  }, [a, o, n]), f = b(
23409
23420
  (m) => {
23410
- const C = n.filter(({ uuid: A }) => A !== m.uuid);
23421
+ const C = n.filter(({ uuid: _ }) => _ !== m.uuid);
23411
23422
  o(C), a();
23412
23423
  },
23413
23424
  [n, o, a]
@@ -23428,7 +23439,7 @@ const Ko = L((r) => {
23428
23439
  };
23429
23440
  }, [a, n]);
23430
23441
  const g = e.maxFiles > 1 ? "Select files" : "Select a file";
23431
- return /* @__PURE__ */ _(
23442
+ return /* @__PURE__ */ A(
23432
23443
  Re,
23433
23444
  {
23434
23445
  size: t,
@@ -23439,7 +23450,7 @@ const Ko = L((r) => {
23439
23450
  error: s,
23440
23451
  image: e.image,
23441
23452
  children: [
23442
- /* @__PURE__ */ _(
23453
+ /* @__PURE__ */ A(
23443
23454
  B,
23444
23455
  {
23445
23456
  className: "w-max",
@@ -23645,7 +23656,7 @@ const Qo = L((r) => {
23645
23656
  required: e.required,
23646
23657
  error: s,
23647
23658
  image: e.image,
23648
- children: /* @__PURE__ */ _("div", { className: "flex w-full gap-2", children: [
23659
+ children: /* @__PURE__ */ A("div", { className: "flex w-full gap-2", children: [
23649
23660
  /* @__PURE__ */ p(ge.Root, { className: "grow", accentColor: "base", variant: "surface", size: t, children: /* @__PURE__ */ p(
23650
23661
  ge.Field,
23651
23662
  {
@@ -24224,10 +24235,10 @@ class ze extends Kr {
24224
24235
  }
24225
24236
  const ds = L, kt = ds(function(r) {
24226
24237
  const { ref: e, children: t, ...n } = r, i = b(
24227
- (a) => typeof t == "function" ? /* @__PURE__ */ _(Je, { children: [
24238
+ (a) => typeof t == "function" ? /* @__PURE__ */ A(Je, { children: [
24228
24239
  t(a),
24229
24240
  /* @__PURE__ */ p(D.SelectedIndicator, { className: "ml-[auto]", children: /* @__PURE__ */ p(T, { icon: et }) })
24230
- ] }) : /* @__PURE__ */ _(Je, { children: [
24241
+ ] }) : /* @__PURE__ */ A(Je, { children: [
24231
24242
  t,
24232
24243
  /* @__PURE__ */ p(D.SelectedIndicator, { className: "ml-[auto]", children: /* @__PURE__ */ p(T, { icon: et }) })
24233
24244
  ] }),
@@ -24236,10 +24247,10 @@ const ds = L, kt = ds(function(r) {
24236
24247
  return /* @__PURE__ */ p(D.SelectItem, { ref: e, ...n, children: i });
24237
24248
  }), fs = ds(function(r) {
24238
24249
  const { ref: e, children: t, ...n } = r, i = b(
24239
- (a) => typeof t == "function" ? /* @__PURE__ */ _(Je, { children: [
24250
+ (a) => typeof t == "function" ? /* @__PURE__ */ A(Je, { children: [
24240
24251
  t(a),
24241
24252
  /* @__PURE__ */ p(D.SelectedIndicator, { className: "ml-auto", children: /* @__PURE__ */ p(T, { icon: et }) })
24242
- ] }) : /* @__PURE__ */ _(Je, { children: [
24253
+ ] }) : /* @__PURE__ */ A(Je, { children: [
24243
24254
  t,
24244
24255
  /* @__PURE__ */ p(D.SelectedIndicator, { className: "ml-auto", children: /* @__PURE__ */ p(T, { icon: et }) })
24245
24256
  ] }),
@@ -24248,10 +24259,10 @@ const ds = L, kt = ds(function(r) {
24248
24259
  return /* @__PURE__ */ p(D.MultiSelectItem, { ref: e, ...n, children: i });
24249
24260
  }), bi = L((r) => {
24250
24261
  const { ref: e, children: t, ...n } = r, i = b(
24251
- (a) => typeof t == "function" ? /* @__PURE__ */ _(Je, { children: [
24262
+ (a) => typeof t == "function" ? /* @__PURE__ */ A(Je, { children: [
24252
24263
  t(a),
24253
24264
  /* @__PURE__ */ p(D.CheckboxItemIndicator, { className: "ml-[auto]", children: (o) => o ? /* @__PURE__ */ p(T, { icon: Gr }) : /* @__PURE__ */ p(T, { icon: et }) })
24254
- ] }) : /* @__PURE__ */ _(Je, { children: [
24265
+ ] }) : /* @__PURE__ */ A(Je, { children: [
24255
24266
  t,
24256
24267
  /* @__PURE__ */ p(D.CheckboxItemIndicator, { className: "ml-[auto]", children: (o) => o ? /* @__PURE__ */ p(T, { icon: Gr }) : /* @__PURE__ */ p(T, { icon: et }) })
24257
24268
  ] }),
@@ -24267,13 +24278,13 @@ const Ue = (r) => {
24267
24278
  },
24268
24279
  [t]
24269
24280
  );
24270
- return /* @__PURE__ */ _(D.Root, { align: "start", children: [
24281
+ return /* @__PURE__ */ A(D.Root, { align: "start", children: [
24271
24282
  /* @__PURE__ */ p(D.ClickTrigger, { children: e }),
24272
24283
  /* @__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)) }) })
24273
24284
  ] });
24274
24285
  }, zr = L((r) => {
24275
24286
  const { children: e, open: t, onOpenChange: n, defaultOpen: i, modal: a, size: o, align: s, accentColor: l = "base", ...c } = r;
24276
- return /* @__PURE__ */ _(xe.Root, { open: t, onOpenChange: n, defaultOpen: i, modal: a, children: [
24287
+ return /* @__PURE__ */ A(xe.Root, { open: t, onOpenChange: n, defaultOpen: i, modal: a, children: [
24277
24288
  /* @__PURE__ */ p(xe.Trigger, { asChild: !0, children: e }),
24278
24289
  /* @__PURE__ */ p(xe.Content, { size: o, align: s, children: /* @__PURE__ */ p(za, { size: o, accentColor: l, ...c }) })
24279
24290
  ] });
@@ -24303,15 +24314,15 @@ const hs = L((r) => {
24303
24314
  c([...l, f]), h("");
24304
24315
  }, [f, c, l]), m = b(
24305
24316
  (C) => {
24306
- const A = [...l];
24307
- A.splice(C, 1), c(A);
24317
+ const _ = [...l];
24318
+ _.splice(C, 1), c(_);
24308
24319
  },
24309
24320
  [c, l]
24310
24321
  );
24311
- return /* @__PURE__ */ _(xe.Root, { open: t, onOpenChange: n, defaultOpen: i, modal: a, children: [
24322
+ return /* @__PURE__ */ A(xe.Root, { open: t, onOpenChange: n, defaultOpen: i, modal: a, children: [
24312
24323
  /* @__PURE__ */ p(xe.Trigger, { asChild: !0, children: e }),
24313
- /* @__PURE__ */ p(xe.Content, { size: o, onClick: mt, accentColor: s, ...d, children: /* @__PURE__ */ _("div", { className: "flex flex-col gap-2", children: [
24314
- /* @__PURE__ */ _("div", { className: "flex gap-2", children: [
24324
+ /* @__PURE__ */ p(xe.Content, { size: o, onClick: mt, accentColor: s, ...d, children: /* @__PURE__ */ A("div", { className: "flex flex-col gap-2", children: [
24325
+ /* @__PURE__ */ A("div", { className: "flex gap-2", children: [
24315
24326
  /* @__PURE__ */ p(ge.Root, { className: "grow", accentColor: "base", variant: "outline", size: "sm", children: /* @__PURE__ */ p(
24316
24327
  ge.Field,
24317
24328
  {
@@ -24334,7 +24345,7 @@ const hs = L((r) => {
24334
24345
  }
24335
24346
  )
24336
24347
  ] }),
24337
- l.length > 0 && /* @__PURE__ */ p("div", { className: "flex flex-col gap-1", children: l.map((C, A) => /* @__PURE__ */ _(
24348
+ l.length > 0 && /* @__PURE__ */ p("div", { className: "flex flex-col gap-1", children: l.map((C, _) => /* @__PURE__ */ A(
24338
24349
  ye,
24339
24350
  {
24340
24351
  className: "flex items-center justify-between gap-2",
@@ -24351,14 +24362,14 @@ const hs = L((r) => {
24351
24362
  type: "button",
24352
24363
  accentColor: "base",
24353
24364
  onClick: () => {
24354
- m(A);
24365
+ m(_);
24355
24366
  },
24356
24367
  children: /* @__PURE__ */ p(T, { icon: It })
24357
24368
  }
24358
24369
  )
24359
24370
  ]
24360
24371
  },
24361
- `${C}-${A}`
24372
+ `${C}-${_}`
24362
24373
  )) })
24363
24374
  ] }) })
24364
24375
  ] });
@@ -24391,7 +24402,7 @@ const Vt = L((r) => {
24391
24402
  },
24392
24403
  [c]
24393
24404
  );
24394
- return /* @__PURE__ */ _(xe.Root, { open: t, onOpenChange: n, defaultOpen: i, modal: a, children: [
24405
+ return /* @__PURE__ */ A(xe.Root, { open: t, onOpenChange: n, defaultOpen: i, modal: a, children: [
24395
24406
  /* @__PURE__ */ p(xe.Trigger, { asChild: !0, children: e }),
24396
24407
  /* @__PURE__ */ p(xe.Content, { size: o, onClick: mt, ...d, children: /* @__PURE__ */ p(ge.Root, { size: o, accentColor: s, children: /* @__PURE__ */ p(
24397
24408
  ge.Field,
@@ -24420,7 +24431,7 @@ const Tr = L((r) => {
24420
24431
  label: a
24421
24432
  } : a
24422
24433
  ), [t]);
24423
- return /* @__PURE__ */ _(D.MultiSelectGroup, { ref: e, ...n, children: [
24434
+ return /* @__PURE__ */ A(D.MultiSelectGroup, { ref: e, ...n, children: [
24424
24435
  /* @__PURE__ */ p(bi, { children: "Select all" }),
24425
24436
  i.map((a) => /* @__PURE__ */ p(fs, { value: a.value, children: /* @__PURE__ */ p("span", { className: "truncate", children: a.label }) }, a.value))
24426
24437
  ] });
@@ -24460,7 +24471,7 @@ const lr = L((r) => {
24460
24471
  );
24461
24472
  return dt(() => {
24462
24473
  l && h(l);
24463
- }, [l]), /* @__PURE__ */ _(xe.Root, { open: t, onOpenChange: n, defaultOpen: i, modal: a, children: [
24474
+ }, [l]), /* @__PURE__ */ A(xe.Root, { open: t, onOpenChange: n, defaultOpen: i, modal: a, children: [
24464
24475
  /* @__PURE__ */ p(xe.Trigger, { asChild: !0, children: e }),
24465
24476
  /* @__PURE__ */ p(xe.Content, { size: o, onClick: mt, ...d, children: /* @__PURE__ */ p(ge.Root, { size: o, accentColor: s, children: /* @__PURE__ */ p(
24466
24477
  ge.Field,
@@ -24488,7 +24499,7 @@ const Ur = L((r) => {
24488
24499
  onValueChange: c,
24489
24500
  ...u
24490
24501
  } = r;
24491
- return /* @__PURE__ */ _(xe.Root, { open: t, onOpenChange: n, defaultOpen: i, modal: a, children: [
24502
+ return /* @__PURE__ */ A(xe.Root, { open: t, onOpenChange: n, defaultOpen: i, modal: a, children: [
24492
24503
  /* @__PURE__ */ p(xe.Trigger, { asChild: !0, children: e }),
24493
24504
  /* @__PURE__ */ p(xe.Content, { size: o, onClick: mt, accentColor: s, ...u, children: /* @__PURE__ */ p(Ci, { compact: !0, size: o, value: l, onChange: c }) })
24494
24505
  ] });
@@ -24507,15 +24518,15 @@ const c0 = (r) => {
24507
24518
  return "empty";
24508
24519
  }
24509
24520
  };
24510
- return /* @__PURE__ */ _(ue, { className: "flex w-max min-w-0 max-w-full gap-0.5", size: "sm", variant: "fill", accentColor: "base", children: [
24511
- /* @__PURE__ */ _(ye, { className: "shrink-1 min-w-0", size: "sm", variant: "fill", accentColor: "base", children: [
24521
+ return /* @__PURE__ */ A(ue, { className: "flex w-max min-w-0 max-w-full gap-0.5", size: "sm", variant: "fill", accentColor: "base", children: [
24522
+ /* @__PURE__ */ A(ye, { className: "shrink-1 min-w-0", size: "sm", variant: "fill", accentColor: "base", children: [
24512
24523
  /* @__PURE__ */ p(T, { icon: me[e.field.type].icon }),
24513
24524
  /* @__PURE__ */ p("span", { className: "truncate", children: e.field.label || Me })
24514
24525
  ] }),
24515
24526
  /* @__PURE__ */ p(Ue, { condition: e, children: /* @__PURE__ */ p(B, { type: "button", children: e.modifiers[i].modifier.label }) }),
24516
- /* @__PURE__ */ _(D.Root, { children: [
24527
+ /* @__PURE__ */ A(D.Root, { children: [
24517
24528
  /* @__PURE__ */ p(D.ClickTrigger, { children: /* @__PURE__ */ p(B, { type: "button", className: "shrink-1 min-w-0 grow", children: a() }) }),
24518
- /* @__PURE__ */ p(D.Content, { size: "sm", children: /* @__PURE__ */ _(
24529
+ /* @__PURE__ */ p(D.Content, { size: "sm", children: /* @__PURE__ */ A(
24519
24530
  D.SelectGroup,
24520
24531
  {
24521
24532
  required: !0,
@@ -24574,13 +24585,13 @@ const cr = [], u0 = (r) => {
24574
24585
  return `${i.length} options`;
24575
24586
  }
24576
24587
  };
24577
- return /* @__PURE__ */ _(ue, { className: "flex w-max min-w-0 max-w-full gap-0.5", size: "sm", variant: "soft", accentColor: "base", children: [
24578
- /* @__PURE__ */ _(ye, { className: "shrink-1 min-w-0", size: "sm", variant: "soft", accentColor: "base", children: [
24588
+ return /* @__PURE__ */ A(ue, { className: "flex w-max min-w-0 max-w-full gap-0.5", size: "sm", variant: "soft", accentColor: "base", children: [
24589
+ /* @__PURE__ */ A(ye, { className: "shrink-1 min-w-0", size: "sm", variant: "soft", accentColor: "base", children: [
24579
24590
  /* @__PURE__ */ p(T, { icon: me[n.type].icon }),
24580
24591
  /* @__PURE__ */ p("span", { className: "truncate", children: n.label || Me })
24581
24592
  ] }),
24582
24593
  /* @__PURE__ */ p(Ue, { condition: e, children: /* @__PURE__ */ p(B, { type: "button", children: e.modifiers[a].modifier.label }) }),
24583
- /* @__PURE__ */ _(D.Root, { children: [
24594
+ /* @__PURE__ */ A(D.Root, { children: [
24584
24595
  /* @__PURE__ */ p(D.ClickTrigger, { children: /* @__PURE__ */ p(B, { type: "button", className: "truncate", children: s() }) }),
24585
24596
  /* @__PURE__ */ p(D.Content, { size: "sm", children: /* @__PURE__ */ p(
24586
24597
  Tr,
@@ -24725,8 +24736,8 @@ const dh = (r, e) => se(() => {
24725
24736
  }
24726
24737
  }
24727
24738
  };
24728
- return /* @__PURE__ */ _(ue, { className: "flex w-max min-w-0 max-w-full gap-0.5", size: "sm", variant: "fill", accentColor: "base", children: [
24729
- /* @__PURE__ */ _(ye, { className: "shrink-1 min-w-0", size: "sm", variant: "fill", accentColor: "base", children: [
24739
+ return /* @__PURE__ */ A(ue, { className: "flex w-max min-w-0 max-w-full gap-0.5", size: "sm", variant: "fill", accentColor: "base", children: [
24740
+ /* @__PURE__ */ A(ye, { className: "shrink-1 min-w-0", size: "sm", variant: "fill", accentColor: "base", children: [
24730
24741
  /* @__PURE__ */ p(T, { icon: me[e.field.type].icon }),
24731
24742
  /* @__PURE__ */ p("span", { className: "truncate", children: e.field.label || Me })
24732
24743
  ] }),
@@ -24804,13 +24815,13 @@ const f0 = (r) => {
24804
24815
  return `${i.length} options`;
24805
24816
  }
24806
24817
  };
24807
- return /* @__PURE__ */ _(ue, { className: "flex w-max min-w-0 max-w-full gap-0.5", size: "sm", variant: "fill", accentColor: "base", children: [
24808
- /* @__PURE__ */ _(ye, { className: "shrink-1 min-w-0", size: "sm", variant: "fill", accentColor: "base", children: [
24818
+ return /* @__PURE__ */ A(ue, { className: "flex w-max min-w-0 max-w-full gap-0.5", size: "sm", variant: "fill", accentColor: "base", children: [
24819
+ /* @__PURE__ */ A(ye, { className: "shrink-1 min-w-0", size: "sm", variant: "fill", accentColor: "base", children: [
24809
24820
  /* @__PURE__ */ p(T, { icon: me[n.type].icon }),
24810
24821
  /* @__PURE__ */ p("span", { className: "truncate", children: n.label || Me })
24811
24822
  ] }),
24812
24823
  /* @__PURE__ */ p(Ue, { condition: e, children: /* @__PURE__ */ p(B, { type: "button", children: e.modifiers[a].modifier.label }) }),
24813
- /* @__PURE__ */ _(D.Root, { children: [
24824
+ /* @__PURE__ */ A(D.Root, { children: [
24814
24825
  /* @__PURE__ */ p(D.ClickTrigger, { children: /* @__PURE__ */ p(B, { type: "button", className: "truncate", children: s() }) }),
24815
24826
  /* @__PURE__ */ p(D.Content, { size: "sm", children: /* @__PURE__ */ p(
24816
24827
  Tr,
@@ -24886,8 +24897,8 @@ const h0 = (r) => {
24886
24897
  return `${i.length} values`;
24887
24898
  }
24888
24899
  };
24889
- return /* @__PURE__ */ _(ue, { className: "flex w-max min-w-0 max-w-full gap-0.5", size: "sm", variant: "fill", accentColor: "base", children: [
24890
- /* @__PURE__ */ _(ye, { className: "shrink-1 min-w-0", size: "sm", variant: "fill", accentColor: "base", children: [
24900
+ return /* @__PURE__ */ A(ue, { className: "flex w-max min-w-0 max-w-full gap-0.5", size: "sm", variant: "fill", accentColor: "base", children: [
24901
+ /* @__PURE__ */ A(ye, { className: "shrink-1 min-w-0", size: "sm", variant: "fill", accentColor: "base", children: [
24891
24902
  /* @__PURE__ */ p(T, { icon: me[n.type].icon }),
24892
24903
  /* @__PURE__ */ p("span", { className: "truncate", children: n.label || Me })
24893
24904
  ] }),
@@ -24967,7 +24978,7 @@ const p0 = (r) => {
24967
24978
  case "inRange":
24968
24979
  case "notInRange": {
24969
24980
  const l = e.modifiers.inRange, c = i !== void 0 && l.isConditionValueValid(i) ? i : void 0;
24970
- return /* @__PURE__ */ _(Je, { children: [
24981
+ return /* @__PURE__ */ A(Je, { children: [
24971
24982
  /* @__PURE__ */ p(
24972
24983
  Vt,
24973
24984
  {
@@ -25000,8 +25011,8 @@ const p0 = (r) => {
25000
25011
  }
25001
25012
  }
25002
25013
  };
25003
- return /* @__PURE__ */ _(ue, { className: "flex w-max min-w-0 max-w-full gap-0.5", size: "sm", variant: "fill", accentColor: "base", children: [
25004
- /* @__PURE__ */ _(ye, { className: "shrink-1 min-w-0", size: "sm", variant: "fill", accentColor: "base", children: [
25014
+ return /* @__PURE__ */ A(ue, { className: "flex w-max min-w-0 max-w-full gap-0.5", size: "sm", variant: "fill", accentColor: "base", children: [
25015
+ /* @__PURE__ */ A(ye, { className: "shrink-1 min-w-0", size: "sm", variant: "fill", accentColor: "base", children: [
25005
25016
  /* @__PURE__ */ p(T, { icon: me[n.type].icon }),
25006
25017
  /* @__PURE__ */ p("span", { className: "truncate", children: n.label || Me })
25007
25018
  ] }),
@@ -25093,8 +25104,8 @@ const v0 = (r) => {
25093
25104
  );
25094
25105
  }
25095
25106
  };
25096
- return /* @__PURE__ */ _(ue, { className: "flex w-max min-w-0 max-w-full gap-0.5", size: "sm", variant: "fill", accentColor: "base", children: [
25097
- /* @__PURE__ */ _(ye, { className: "shrink-1 min-w-0", size: "sm", variant: "fill", accentColor: "base", children: [
25107
+ return /* @__PURE__ */ A(ue, { className: "flex w-max min-w-0 max-w-full gap-0.5", size: "sm", variant: "fill", accentColor: "base", children: [
25108
+ /* @__PURE__ */ A(ye, { className: "shrink-1 min-w-0", size: "sm", variant: "fill", accentColor: "base", children: [
25098
25109
  /* @__PURE__ */ p(T, { icon: me[n.type].icon }),
25099
25110
  /* @__PURE__ */ p("span", { className: "truncate", children: n.label || Me })
25100
25111
  ] }),
@@ -25147,7 +25158,7 @@ const g0 = (r) => {
25147
25158
  case "equals":
25148
25159
  case "notEquals": {
25149
25160
  const s = e.modifiers.equals, l = i !== void 0 && s.isConditionValueValid(i) ? i : void 0;
25150
- return /* @__PURE__ */ _(D.Root, { children: [
25161
+ return /* @__PURE__ */ A(D.Root, { children: [
25151
25162
  /* @__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" : "..." }) }) }),
25152
25163
  /* @__PURE__ */ p(D.Content, { size: "sm", children: /* @__PURE__ */ p(
25153
25164
  D.SelectGroup,
@@ -25166,9 +25177,9 @@ const g0 = (r) => {
25166
25177
  case "includes":
25167
25178
  case "excludes": {
25168
25179
  const s = e.modifiers.includes, l = i !== void 0 && s.isConditionValueValid(i) ? i : void 0;
25169
- return /* @__PURE__ */ _(D.Root, { children: [
25180
+ return /* @__PURE__ */ A(D.Root, { children: [
25170
25181
  /* @__PURE__ */ p(D.ClickTrigger, { children: /* @__PURE__ */ p(B, { type: "button", children: l ? `${l.length} statuses` : "..." }) }),
25171
- /* @__PURE__ */ p(D.Content, { size: "sm", children: /* @__PURE__ */ _(
25182
+ /* @__PURE__ */ p(D.Content, { size: "sm", children: /* @__PURE__ */ A(
25172
25183
  D.MultiSelectGroup,
25173
25184
  {
25174
25185
  values: l ?? cr,
@@ -25177,7 +25188,7 @@ const g0 = (r) => {
25177
25188
  /* @__PURE__ */ p(bi, { children: "Select all" }),
25178
25189
  wr.map((c) => {
25179
25190
  const { label: u, icon: d } = $t[c];
25180
- return /* @__PURE__ */ _(fs, { value: c, children: [
25191
+ return /* @__PURE__ */ A(fs, { value: c, children: [
25181
25192
  /* @__PURE__ */ p(T, { icon: d }),
25182
25193
  /* @__PURE__ */ p("span", { className: "truncate", children: u })
25183
25194
  ] }, c);
@@ -25189,8 +25200,8 @@ const g0 = (r) => {
25189
25200
  }
25190
25201
  }
25191
25202
  };
25192
- return /* @__PURE__ */ _(ue, { className: "flex w-max min-w-0 max-w-full gap-0.5", size: "sm", variant: "fill", accentColor: "base", children: [
25193
- /* @__PURE__ */ _(ye, { className: "shrink-1 min-w-0", size: "sm", variant: "fill", accentColor: "base", children: [
25203
+ return /* @__PURE__ */ A(ue, { className: "flex w-max min-w-0 max-w-full gap-0.5", size: "sm", variant: "fill", accentColor: "base", children: [
25204
+ /* @__PURE__ */ A(ye, { className: "shrink-1 min-w-0", size: "sm", variant: "fill", accentColor: "base", children: [
25194
25205
  /* @__PURE__ */ p(T, { icon: me[n.type].icon }),
25195
25206
  /* @__PURE__ */ p("span", { className: "truncate", children: n.label || Me })
25196
25207
  ] }),
@@ -25259,7 +25270,7 @@ const x0 = (r) => {
25259
25270
  case "equals":
25260
25271
  case "notEquals": {
25261
25272
  const c = e.modifiers.equals, u = i !== void 0 && c.isConditionValueValid(i) ? i : void 0;
25262
- return /* @__PURE__ */ _(D.Root, { children: [
25273
+ return /* @__PURE__ */ A(D.Root, { children: [
25263
25274
  /* @__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" : "..." }) }) }),
25264
25275
  /* @__PURE__ */ p(D.Content, { size: "sm", children: /* @__PURE__ */ p(
25265
25276
  Ii,
@@ -25275,7 +25286,7 @@ const x0 = (r) => {
25275
25286
  case "includes":
25276
25287
  case "excludes": {
25277
25288
  const c = e.modifiers.includes, u = i !== void 0 && c.isConditionValueValid(i) ? i : void 0;
25278
- return /* @__PURE__ */ _(D.Root, { children: [
25289
+ return /* @__PURE__ */ A(D.Root, { children: [
25279
25290
  /* @__PURE__ */ p(D.ClickTrigger, { children: /* @__PURE__ */ p(B, { type: "button", children: u ? `${u.length} options` : "..." }) }),
25280
25291
  /* @__PURE__ */ p(D.Content, { size: "sm", children: /* @__PURE__ */ p(
25281
25292
  Tr,
@@ -25289,8 +25300,8 @@ const x0 = (r) => {
25289
25300
  }
25290
25301
  }
25291
25302
  };
25292
- return /* @__PURE__ */ _(ue, { className: "flex w-max min-w-0 max-w-full gap-0.5", size: "sm", variant: "fill", accentColor: "base", children: [
25293
- /* @__PURE__ */ _(ye, { className: "shrink-1 min-w-0", size: "sm", variant: "fill", accentColor: "base", children: [
25303
+ return /* @__PURE__ */ A(ue, { className: "flex w-max min-w-0 max-w-full gap-0.5", size: "sm", variant: "fill", accentColor: "base", children: [
25304
+ /* @__PURE__ */ A(ye, { className: "shrink-1 min-w-0", size: "sm", variant: "fill", accentColor: "base", children: [
25294
25305
  /* @__PURE__ */ p(T, { icon: me[n.type].icon }),
25295
25306
  /* @__PURE__ */ p("span", { className: "truncate", children: n.label || Me })
25296
25307
  ] }),
@@ -25363,7 +25374,7 @@ const y0 = (r) => {
25363
25374
  case "inRange":
25364
25375
  case "notInRange": {
25365
25376
  const s = e.modifiers.inRange, l = i !== void 0 && s.isConditionValueValid(i) ? i : void 0;
25366
- return /* @__PURE__ */ _(Je, { children: [
25377
+ return /* @__PURE__ */ A(Je, { children: [
25367
25378
  /* @__PURE__ */ p(
25368
25379
  Vt,
25369
25380
  {
@@ -25396,8 +25407,8 @@ const y0 = (r) => {
25396
25407
  }
25397
25408
  }
25398
25409
  };
25399
- return /* @__PURE__ */ _(ue, { className: "flex w-max min-w-0 max-w-full gap-0.5", size: "sm", variant: "fill", accentColor: "base", children: [
25400
- /* @__PURE__ */ _(ye, { className: "shrink-1 min-w-0", size: "sm", variant: "fill", accentColor: "base", children: [
25410
+ return /* @__PURE__ */ A(ue, { className: "flex w-max min-w-0 max-w-full gap-0.5", size: "sm", variant: "fill", accentColor: "base", children: [
25411
+ /* @__PURE__ */ A(ye, { className: "shrink-1 min-w-0", size: "sm", variant: "fill", accentColor: "base", children: [
25401
25412
  /* @__PURE__ */ p(T, { icon: me[n.type].icon }),
25402
25413
  /* @__PURE__ */ p("span", { className: "truncate", children: n.label || Me })
25403
25414
  ] }),
@@ -25489,8 +25500,8 @@ const m0 = (r) => {
25489
25500
  );
25490
25501
  }
25491
25502
  };
25492
- return /* @__PURE__ */ _(ue, { className: "flex w-max min-w-0 max-w-full gap-0.5", size: "sm", variant: "fill", accentColor: "base", children: [
25493
- /* @__PURE__ */ _(ye, { className: "shrink-1 min-w-0", size: "sm", variant: "fill", accentColor: "base", children: [
25503
+ return /* @__PURE__ */ A(ue, { className: "flex w-max min-w-0 max-w-full gap-0.5", size: "sm", variant: "fill", accentColor: "base", children: [
25504
+ /* @__PURE__ */ A(ye, { className: "shrink-1 min-w-0", size: "sm", variant: "fill", accentColor: "base", children: [
25494
25505
  /* @__PURE__ */ p(T, { icon: me[n.type].icon }),
25495
25506
  /* @__PURE__ */ p("span", { className: "truncate", children: n.label || Me })
25496
25507
  ] }),
@@ -25558,7 +25569,7 @@ const C0 = (r) => {
25558
25569
  case "equals":
25559
25570
  case "notEquals": {
25560
25571
  const u = e.modifiers.equals, d = i !== void 0 && u.isConditionValueValid(i) ? i : void 0;
25561
- return /* @__PURE__ */ _(D.Root, { children: [
25572
+ return /* @__PURE__ */ A(D.Root, { children: [
25562
25573
  /* @__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" : "..." }) }) }),
25563
25574
  /* @__PURE__ */ p(D.Content, { size: "sm", children: /* @__PURE__ */ p(
25564
25575
  Ii,
@@ -25574,7 +25585,7 @@ const C0 = (r) => {
25574
25585
  case "includes":
25575
25586
  case "excludes": {
25576
25587
  const u = e.modifiers.includes, d = i !== void 0 && u.isConditionValueValid(i) ? i : void 0;
25577
- return /* @__PURE__ */ _(D.Root, { children: [
25588
+ return /* @__PURE__ */ A(D.Root, { children: [
25578
25589
  /* @__PURE__ */ p(D.ClickTrigger, { children: /* @__PURE__ */ p(B, { type: "button", children: d ? `${d.length} options` : "..." }) }),
25579
25590
  /* @__PURE__ */ p(D.Content, { size: "sm", children: /* @__PURE__ */ p(
25580
25591
  Tr,
@@ -25588,8 +25599,8 @@ const C0 = (r) => {
25588
25599
  }
25589
25600
  }
25590
25601
  };
25591
- return /* @__PURE__ */ _(ue, { className: "flex w-max min-w-0 max-w-full gap-0.5", size: "sm", variant: "fill", accentColor: "base", children: [
25592
- /* @__PURE__ */ _(ye, { className: "shrink-1 min-w-0", size: "sm", variant: "fill", accentColor: "base", children: [
25602
+ return /* @__PURE__ */ A(ue, { className: "flex w-max min-w-0 max-w-full gap-0.5", size: "sm", variant: "fill", accentColor: "base", children: [
25603
+ /* @__PURE__ */ A(ye, { className: "shrink-1 min-w-0", size: "sm", variant: "fill", accentColor: "base", children: [
25593
25604
  /* @__PURE__ */ p(T, { icon: me[n.type].icon }),
25594
25605
  /* @__PURE__ */ p("span", { className: "truncate", children: n.label || Me })
25595
25606
  ] }),
@@ -25657,8 +25668,8 @@ const w0 = (r) => {
25657
25668
  );
25658
25669
  }
25659
25670
  };
25660
- return /* @__PURE__ */ _(ue, { className: "flex w-max min-w-0 max-w-full gap-0.5", size: "sm", variant: "fill", accentColor: "base", children: [
25661
- /* @__PURE__ */ _(ye, { className: "shrink-1 min-w-0", size: "sm", variant: "fill", accentColor: "base", children: [
25671
+ return /* @__PURE__ */ A(ue, { className: "flex w-max min-w-0 max-w-full gap-0.5", size: "sm", variant: "fill", accentColor: "base", children: [
25672
+ /* @__PURE__ */ A(ye, { className: "shrink-1 min-w-0", size: "sm", variant: "fill", accentColor: "base", children: [
25662
25673
  /* @__PURE__ */ p(T, { icon: me[n.type].icon }),
25663
25674
  /* @__PURE__ */ p("span", { className: "truncate", children: n.label || Me })
25664
25675
  ] }),
@@ -25723,8 +25734,8 @@ const _0 = (r) => {
25723
25734
  );
25724
25735
  }
25725
25736
  };
25726
- return /* @__PURE__ */ _(ue, { className: "flex w-max min-w-0 max-w-full gap-0.5", size: "sm", variant: "fill", accentColor: "base", children: [
25727
- /* @__PURE__ */ _(ye, { className: "shrink-1 min-w-0", size: "sm", variant: "fill", accentColor: "base", children: [
25737
+ return /* @__PURE__ */ A(ue, { className: "flex w-max min-w-0 max-w-full gap-0.5", size: "sm", variant: "fill", accentColor: "base", children: [
25738
+ /* @__PURE__ */ A(ye, { className: "shrink-1 min-w-0", size: "sm", variant: "fill", accentColor: "base", children: [
25728
25739
  /* @__PURE__ */ p(T, { icon: me[n.type].icon }),
25729
25740
  /* @__PURE__ */ p("span", { className: "truncate", children: n.label || Me })
25730
25741
  ] }),
@@ -25794,7 +25805,7 @@ const A0 = (r) => {
25794
25805
  const o = n && typeof n == "object" ? n : void 0, s = (l) => {
25795
25806
  e.setConditionValue(l.from || l.to ? l : void 0);
25796
25807
  };
25797
- return /* @__PURE__ */ _(Je, { children: [
25808
+ return /* @__PURE__ */ A(Je, { children: [
25798
25809
  /* @__PURE__ */ p(
25799
25810
  Ur,
25800
25811
  {
@@ -25817,8 +25828,8 @@ const A0 = (r) => {
25817
25828
  }
25818
25829
  }
25819
25830
  };
25820
- return /* @__PURE__ */ _(ue, { className: "flex w-max min-w-0 max-w-full gap-0.5", size: "sm", variant: "fill", accentColor: "base", children: [
25821
- /* @__PURE__ */ _(ye, { className: "shrink-1 min-w-0", size: "sm", variant: "fill", accentColor: "base", children: [
25831
+ return /* @__PURE__ */ A(ue, { className: "flex w-max min-w-0 max-w-full gap-0.5", size: "sm", variant: "fill", accentColor: "base", children: [
25832
+ /* @__PURE__ */ A(ye, { className: "shrink-1 min-w-0", size: "sm", variant: "fill", accentColor: "base", children: [
25822
25833
  /* @__PURE__ */ p(T, { icon: me[e.field.type].icon }),
25823
25834
  /* @__PURE__ */ p("span", { className: "truncate", children: e.field.label || Me })
25824
25835
  ] }),
@@ -25893,15 +25904,15 @@ const E0 = (r) => {
25893
25904
  return "empty";
25894
25905
  }
25895
25906
  };
25896
- return /* @__PURE__ */ _(ue, { className: "flex w-max min-w-0 max-w-full gap-0.5", size: "sm", variant: "fill", accentColor: "base", children: [
25897
- /* @__PURE__ */ _(ye, { className: "shrink-1 min-w-0", size: "sm", variant: "fill", accentColor: "base", children: [
25907
+ return /* @__PURE__ */ A(ue, { className: "flex w-max min-w-0 max-w-full gap-0.5", size: "sm", variant: "fill", accentColor: "base", children: [
25908
+ /* @__PURE__ */ A(ye, { className: "shrink-1 min-w-0", size: "sm", variant: "fill", accentColor: "base", children: [
25898
25909
  /* @__PURE__ */ p(T, { icon: me[n.type].icon }),
25899
25910
  /* @__PURE__ */ p("span", { className: "truncate", children: n.label || Me })
25900
25911
  ] }),
25901
25912
  /* @__PURE__ */ p(Ue, { condition: e, children: /* @__PURE__ */ p(B, { type: "button", children: e.modifiers[a].modifier.label }) }),
25902
- /* @__PURE__ */ _(D.Root, { children: [
25913
+ /* @__PURE__ */ A(D.Root, { children: [
25903
25914
  /* @__PURE__ */ p(D.ClickTrigger, { children: /* @__PURE__ */ p(B, { type: "button", className: "shrink-1 min-w-0 grow", children: o() }) }),
25904
- /* @__PURE__ */ p(D.Content, { size: "sm", children: /* @__PURE__ */ _(
25915
+ /* @__PURE__ */ p(D.Content, { size: "sm", children: /* @__PURE__ */ A(
25905
25916
  D.SelectGroup,
25906
25917
  {
25907
25918
  required: !0,
@@ -25961,8 +25972,8 @@ const S0 = (r) => {
25961
25972
  );
25962
25973
  }
25963
25974
  };
25964
- return /* @__PURE__ */ _(ue, { className: "flex w-max min-w-0 max-w-full gap-0.5", size: "sm", variant: "fill", accentColor: "base", children: [
25965
- /* @__PURE__ */ _(ye, { className: "shrink-1 min-w-0", size: "sm", variant: "fill", accentColor: "base", children: [
25975
+ return /* @__PURE__ */ A(ue, { className: "flex w-max min-w-0 max-w-full gap-0.5", size: "sm", variant: "fill", accentColor: "base", children: [
25976
+ /* @__PURE__ */ A(ye, { className: "shrink-1 min-w-0", size: "sm", variant: "fill", accentColor: "base", children: [
25966
25977
  /* @__PURE__ */ p(T, { icon: me[n.type].icon }),
25967
25978
  /* @__PURE__ */ p("span", { className: "truncate", children: n.label || Me })
25968
25979
  ] }),
@@ -26208,10 +26219,10 @@ const V0 = (r, e) => {
26208
26219
  const h = f.getConditions(e.identifier);
26209
26220
  return new Oi(h).applyConditions(i);
26210
26221
  }), [c, e, i]), d = Ln(e.fields);
26211
- return u ? /* @__PURE__ */ _(Je, { children: [
26222
+ return u ? /* @__PURE__ */ A(Je, { children: [
26212
26223
  l !== 0 ? /* @__PURE__ */ p(Ft, { size: "full" }) : null,
26213
- /* @__PURE__ */ _("div", { className: "flex flex-col gap-4", children: [
26214
- (t || n) && /* @__PURE__ */ p(Je, { children: /* @__PURE__ */ _("div", { className: "flex flex-col gap-1", children: [
26224
+ /* @__PURE__ */ A("div", { className: "flex flex-col gap-4", children: [
26225
+ (t || n) && /* @__PURE__ */ p(Je, { children: /* @__PURE__ */ A("div", { className: "flex flex-col gap-1", children: [
26215
26226
  /* @__PURE__ */ p(Gs, { size: o, children: t }),
26216
26227
  n && /* @__PURE__ */ p(pe, { accentColor: "base", size: o, children: n })
26217
26228
  ] }) }),
@@ -26376,11 +26387,11 @@ const gt = jr({}), wn = L((r) => {
26376
26387
  }
26377
26388
  return l;
26378
26389
  }, []);
26379
- return /* @__PURE__ */ _(D.Root, { ...o, children: [
26390
+ return /* @__PURE__ */ A(D.Root, { ...o, children: [
26380
26391
  /* @__PURE__ */ p(D.ClickTrigger, { children: e }),
26381
26392
  /* @__PURE__ */ p(D.Content, { variant: t, size: n, accentColor: i, children: /* @__PURE__ */ p(D.Scroll, { children: Object.entries(s).map(([l, c]) => {
26382
26393
  const { name: u } = z1[l];
26383
- return c.length === 0 ? null : /* @__PURE__ */ _(D.Group, { children: [
26394
+ return c.length === 0 ? null : /* @__PURE__ */ A(D.Group, { children: [
26384
26395
  /* @__PURE__ */ p(D.Label, { children: u }),
26385
26396
  c.map((d) => /* @__PURE__ */ p(
26386
26397
  ws,
@@ -26399,7 +26410,7 @@ const ws = L((r) => {
26399
26410
  const { fieldType: e, onSelectFieldType: t } = r, n = b(() => {
26400
26411
  t(e);
26401
26412
  }, [e, t]), { icon: i, name: a } = me[e];
26402
- return /* @__PURE__ */ _(D.Item, { onSelect: n, children: [
26413
+ return /* @__PURE__ */ A(D.Item, { onSelect: n, children: [
26403
26414
  /* @__PURE__ */ p(T, { icon: i }),
26404
26415
  /* @__PURE__ */ p(pe, { className: "truncate", children: a })
26405
26416
  ] });
@@ -26663,8 +26674,8 @@ const Ri = (r) => {
26663
26674
  }
26664
26675
  }, Es = L((r) => {
26665
26676
  const { popoverInputs: e, ...t } = r;
26666
- return /* @__PURE__ */ _(xe.Root, { children: [
26667
- /* @__PURE__ */ p(xe.Trigger, { asChild: !0, children: /* @__PURE__ */ _(B, { variant: "soft", type: "button", size: "sm", accentColor: "base", children: [
26677
+ return /* @__PURE__ */ A(xe.Root, { children: [
26678
+ /* @__PURE__ */ p(xe.Trigger, { asChild: !0, children: /* @__PURE__ */ A(B, { variant: "soft", type: "button", size: "sm", accentColor: "base", children: [
26668
26679
  /* @__PURE__ */ p(T, { icon: wc }),
26669
26680
  "Settings"
26670
26681
  ] }) }),
@@ -26703,15 +26714,15 @@ const Ss = L((r) => {
26703
26714
  n.setOptions({ description: w.target.value });
26704
26715
  },
26705
26716
  [n]
26706
- ), { icon: C, name: A } = me[n.type];
26707
- return /* @__PURE__ */ _("div", { className: "flex w-full grow flex-col gap-4", children: [
26708
- /* @__PURE__ */ _("div", { className: "flex w-full justify-between gap-2", children: [
26709
- /* @__PURE__ */ _("div", { className: "flex items-center gap-2", children: [
26710
- /* @__PURE__ */ _(ye, { accentColor: "base", variant: "soft", size: "sm", children: [
26717
+ ), { icon: C, name: _ } = me[n.type];
26718
+ return /* @__PURE__ */ A("div", { className: "flex w-full grow flex-col gap-4", children: [
26719
+ /* @__PURE__ */ A("div", { className: "flex w-full justify-between gap-2", children: [
26720
+ /* @__PURE__ */ A("div", { className: "flex items-center gap-2", children: [
26721
+ /* @__PURE__ */ A(ye, { accentColor: "base", variant: "soft", size: "sm", children: [
26711
26722
  /* @__PURE__ */ p(T, { icon: C }),
26712
- A
26723
+ _
26713
26724
  ] }),
26714
- !a && /* @__PURE__ */ _("div", { className: "flex items-center gap-2", children: [
26725
+ !a && /* @__PURE__ */ A("div", { className: "flex items-center gap-2", children: [
26715
26726
  /* @__PURE__ */ p(
26716
26727
  Hr.Root,
26717
26728
  {
@@ -26726,7 +26737,7 @@ const Ss = L((r) => {
26726
26737
  ] }),
26727
26738
  h && /* @__PURE__ */ p(Es, { popoverInputs: f, align: "end" })
26728
26739
  ] }),
26729
- o && /* @__PURE__ */ _("div", { className: "group relative inline-block w-full min-w-[300px]", children: [
26740
+ o && /* @__PURE__ */ A("div", { className: "group relative inline-block w-full min-w-[300px]", children: [
26730
26741
  /* @__PURE__ */ p(
26731
26742
  Sr,
26732
26743
  {
@@ -26749,7 +26760,7 @@ const Ss = L((r) => {
26749
26760
  }
26750
26761
  )
26751
26762
  ] }),
26752
- /* @__PURE__ */ _("div", { className: "flex w-full flex-col gap-2 overflow-hidden", children: [
26763
+ /* @__PURE__ */ A("div", { className: "flex w-full flex-col gap-2 overflow-hidden", children: [
26753
26764
  /* @__PURE__ */ p(ge.Root, { variant: "outline", size: "md", children: /* @__PURE__ */ p(
26754
26765
  ge.Field,
26755
26766
  {
@@ -26819,9 +26830,9 @@ const Mi = L((r) => {
26819
26830
  }, []), v = b(() => {
26820
26831
  t.removeField(e);
26821
26832
  }, [e, t]);
26822
- return /* @__PURE__ */ _(pt, { className: "flex w-full items-center justify-between gap-4", size: "sm", children: [
26833
+ return /* @__PURE__ */ A(pt, { className: "flex w-full items-center justify-between gap-4", size: "sm", children: [
26823
26834
  /* @__PURE__ */ p(Ss, { fieldIndex: n, field: e, parentPath: o }),
26824
- /* @__PURE__ */ _(ue, { className: "flex flex-col gap-0.5", variant: "ghost", accentColor: "base", size: "sm", children: [
26835
+ /* @__PURE__ */ A(ue, { className: "flex flex-col gap-0.5", variant: "ghost", accentColor: "base", size: "sm", children: [
26825
26836
  /* @__PURE__ */ p(wn, { onSelectFieldType: s, size: "sm", children: /* @__PURE__ */ p(ne, { type: "button", children: /* @__PURE__ */ p(T, { icon: ft }) }) }),
26826
26837
  /* @__PURE__ */ p(ne, { type: "button", onClick: d, children: /* @__PURE__ */ p(T, { icon: ao }) }),
26827
26838
  /* @__PURE__ */ p(ne, { type: "button", onClick: f, children: /* @__PURE__ */ p(T, { icon: io }) }),
@@ -26835,7 +26846,7 @@ const Mi = L((r) => {
26835
26846
  Mi.displayName = "FieldBuilderWithActions";
26836
26847
  const Vi = L((r) => {
26837
26848
  const { children: e, variant: t, size: n, accentColor: i, fields: a, onSelectField: o, ...s } = r;
26838
- return /* @__PURE__ */ _(D.Root, { ...s, children: [
26849
+ return /* @__PURE__ */ A(D.Root, { ...s, children: [
26839
26850
  /* @__PURE__ */ p(D.ClickTrigger, { children: e }),
26840
26851
  /* @__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)) }) })
26841
26852
  ] });
@@ -26845,7 +26856,7 @@ const bs = L((r) => {
26845
26856
  const { field: e, onSelectField: t } = r, n = b(() => {
26846
26857
  t(e);
26847
26858
  }, [e, t]);
26848
- return /* @__PURE__ */ _(D.Item, { onSelect: n, children: [
26859
+ return /* @__PURE__ */ A(D.Item, { onSelect: n, children: [
26849
26860
  /* @__PURE__ */ p(T, { icon: me[e.type].icon }),
26850
26861
  e.label || Me
26851
26862
  ] });
@@ -26853,7 +26864,7 @@ const bs = L((r) => {
26853
26864
  bs.displayName = "FieldDropdownMenuItem";
26854
26865
  const Is = L((r) => {
26855
26866
  const { children: e, variant: t, size: n, accentColor: i, fieldSections: a, onSelectFieldSection: o, ...s } = r;
26856
- return /* @__PURE__ */ _(D.Root, { ...s, children: [
26867
+ return /* @__PURE__ */ A(D.Root, { ...s, children: [
26857
26868
  /* @__PURE__ */ p(D.ClickTrigger, { children: e }),
26858
26869
  /* @__PURE__ */ p(D.Content, { variant: t, size: n, accentColor: i, children: a.map((l) => /* @__PURE__ */ p(
26859
26870
  Os,
@@ -26870,7 +26881,7 @@ const Os = L((r) => {
26870
26881
  const { fieldSection: e, onSelectFieldSection: t } = r, n = b(() => {
26871
26882
  t(e);
26872
26883
  }, [e, t]);
26873
- return /* @__PURE__ */ _(D.Item, { onSelect: n, children: [
26884
+ return /* @__PURE__ */ A(D.Item, { onSelect: n, children: [
26874
26885
  /* @__PURE__ */ p(T, { icon: no }),
26875
26886
  e.label || es
26876
26887
  ] });
@@ -26880,13 +26891,13 @@ const Ns = L((r) => {
26880
26891
  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(() => {
26881
26892
  u.removeConditional(c.identifier);
26882
26893
  }, [u, c.identifier]), v = b(
26883
- (A) => {
26884
- u.addCondition(c.identifier, _s(A));
26894
+ (_) => {
26895
+ u.addCondition(c.identifier, _s(_));
26885
26896
  },
26886
26897
  [u, c.identifier]
26887
26898
  ), g = b(
26888
- (A) => {
26889
- u.removeCondition(c.identifier, A);
26899
+ (_) => {
26900
+ u.removeCondition(c.identifier, _);
26890
26901
  },
26891
26902
  [u, c.identifier]
26892
26903
  ), [y, m, C] = $s({
@@ -26897,9 +26908,9 @@ const Ns = L((r) => {
26897
26908
  targetY: a,
26898
26909
  targetPosition: d === "LR" ? yt.Left : yt.Top
26899
26910
  });
26900
- return /* @__PURE__ */ _(Je, { children: [
26911
+ return /* @__PURE__ */ A(Je, { children: [
26901
26912
  /* @__PURE__ */ p(js, { id: e, path: y, style: o, markerEnd: s, labelX: m, labelY: C }),
26902
- /* @__PURE__ */ p(Ys, { children: /* @__PURE__ */ _(
26913
+ /* @__PURE__ */ p(Ys, { children: /* @__PURE__ */ A(
26903
26914
  pt,
26904
26915
  {
26905
26916
  size: "xs",
@@ -26910,9 +26921,9 @@ const Ns = L((r) => {
26910
26921
  "data-floating-content": "",
26911
26922
  style: { transform: `translate(-50%, -50%) translate(${m}px, ${C}px)` },
26912
26923
  children: [
26913
- /* @__PURE__ */ _("div", { className: "flex items-center gap-2", children: [
26924
+ /* @__PURE__ */ A("div", { className: "flex items-center gap-2", children: [
26914
26925
  /* @__PURE__ */ p(pe, { size: "xs", className: "max-w-[280px] truncate", children: u.label || "Untitled section" }),
26915
- /* @__PURE__ */ _("div", { className: "ml-auto flex items-center gap-1", children: [
26926
+ /* @__PURE__ */ A("div", { className: "ml-auto flex items-center gap-1", children: [
26916
26927
  /* @__PURE__ */ p(Vi, { fields: u.fields, onSelectField: v, children: /* @__PURE__ */ p(
26917
26928
  ne,
26918
26929
  {
@@ -26924,7 +26935,7 @@ const Ns = L((r) => {
26924
26935
  children: /* @__PURE__ */ p(T, { icon: ft })
26925
26936
  }
26926
26937
  ) }),
26927
- /* @__PURE__ */ _(Xt.Root, { children: [
26938
+ /* @__PURE__ */ A(Xt.Root, { children: [
26928
26939
  /* @__PURE__ */ p(Xt.Trigger, { asChild: !0, children: /* @__PURE__ */ p(
26929
26940
  ne,
26930
26941
  {
@@ -26942,9 +26953,9 @@ const Ns = L((r) => {
26942
26953
  ] })
26943
26954
  ] })
26944
26955
  ] }),
26945
- 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({
26956
+ f.length > 0 && /* @__PURE__ */ p("div", { className: "flex h-max w-full flex-col flex-wrap gap-1", children: f.map((_) => /* @__PURE__ */ p(ii, { children: _.render({
26946
26957
  onRemove: g
26947
- }) }, A.id)) })
26958
+ }) }, _.id)) })
26948
26959
  ]
26949
26960
  }
26950
26961
  ) })
@@ -26975,7 +26986,7 @@ const Ts = L((r) => {
26975
26986
  },
26976
26987
  [n]
26977
26988
  );
26978
- return /* @__PURE__ */ _(
26989
+ return /* @__PURE__ */ A(
26979
26990
  pt,
26980
26991
  {
26981
26992
  variant: "surface",
@@ -26983,8 +26994,8 @@ const Ts = L((r) => {
26983
26994
  size: "sm",
26984
26995
  "data-selected": t ? "true" : void 0,
26985
26996
  children: [
26986
- /* @__PURE__ */ _("div", { className: "flex flex-col gap-3", children: [
26987
- /* @__PURE__ */ _("div", { className: "flex w-full flex-col gap-2 overflow-hidden", children: [
26997
+ /* @__PURE__ */ A("div", { className: "flex flex-col gap-3", children: [
26998
+ /* @__PURE__ */ A("div", { className: "flex w-full flex-col gap-2 overflow-hidden", children: [
26988
26999
  /* @__PURE__ */ p(ge.Root, { variant: "outline", size: "md", accentColor: "base", children: /* @__PURE__ */ p(
26989
27000
  ge.Field,
26990
27001
  {
@@ -27007,9 +27018,9 @@ const Ts = L((r) => {
27007
27018
  }
27008
27019
  )
27009
27020
  ] }),
27010
- /* @__PURE__ */ _("div", { className: "flex items-center justify-between", children: [
27021
+ /* @__PURE__ */ A("div", { className: "flex items-center justify-between", children: [
27011
27022
  /* @__PURE__ */ p(pe, { weight: "bold", children: "Fields" }),
27012
- /* @__PURE__ */ p(wn, { onSelectFieldType: l, size: "sm", children: /* @__PURE__ */ _(B, { type: "button", variant: "soft", size: "sm", accentColor: "base", children: [
27023
+ /* @__PURE__ */ p(wn, { onSelectFieldType: l, size: "sm", children: /* @__PURE__ */ A(B, { type: "button", variant: "soft", size: "sm", accentColor: "base", children: [
27013
27024
  /* @__PURE__ */ p(T, { icon: ft }),
27014
27025
  " Add field"
27015
27026
  ] }) })
@@ -27032,7 +27043,7 @@ const Ts = L((r) => {
27032
27043
  className: "bg-(--base-2) flex flex-col items-center gap-1 p-1",
27033
27044
  size: "xs",
27034
27045
  onClick: mt,
27035
- children: /* @__PURE__ */ _(ue, { className: "flex flex-col gap-2", variant: "surface", size: "xs", accentColor: "base", children: [
27046
+ children: /* @__PURE__ */ A(ue, { className: "flex flex-col gap-2", variant: "surface", size: "xs", accentColor: "base", children: [
27036
27047
  /* @__PURE__ */ p(ne, { type: "button", onClick: c, children: /* @__PURE__ */ p(T, { icon: Kl }) }),
27037
27048
  /* @__PURE__ */ p(ne, { type: "button", onClick: u, children: /* @__PURE__ */ p(T, { icon: ai }) }),
27038
27049
  /* @__PURE__ */ p(ne, { type: "button", onClick: s, children: /* @__PURE__ */ p(T, { icon: Lt }) })
@@ -27140,7 +27151,7 @@ const L0 = {
27140
27151
  }, [u, h]), dt(() => {
27141
27152
  y(d);
27142
27153
  }, [d, y]);
27143
- const [C, A] = se(() => U0(f, g, l), [g, l, f]), w = b(() => {
27154
+ const [C, _] = se(() => U0(f, g, l), [g, l, f]), w = b(() => {
27144
27155
  i.addFieldSection(new ot({ identifier: G(), fields: [] }));
27145
27156
  }, [i]), S = b(
27146
27157
  (Q) => {
@@ -27166,8 +27177,8 @@ const L0 = {
27166
27177
  }, [o]), z = b(() => {
27167
27178
  o == null || o.fitView();
27168
27179
  }, [o]);
27169
- return /* @__PURE__ */ _("form", { className: "flex size-full flex-col gap-4", onSubmit: e(t), children: [
27170
- /* @__PURE__ */ _(pt, { className: "relative size-full", variant: "outline", children: [
27180
+ return /* @__PURE__ */ A("form", { className: "flex size-full flex-col gap-4", onSubmit: e(t), children: [
27181
+ /* @__PURE__ */ A(pt, { className: "relative size-full", variant: "outline", children: [
27171
27182
  /* @__PURE__ */ p(
27172
27183
  el,
27173
27184
  {
@@ -27175,7 +27186,7 @@ const L0 = {
27175
27186
  onInit: s,
27176
27187
  nodes: C,
27177
27188
  onNodesChange: v,
27178
- edges: A,
27189
+ edges: _,
27179
27190
  onEdgesChange: m,
27180
27191
  nodeTypes: L0,
27181
27192
  edgeTypes: z0,
@@ -27187,12 +27198,12 @@ const L0 = {
27187
27198
  proOptions: H0
27188
27199
  }
27189
27200
  ),
27190
- /* @__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: [
27201
+ /* @__PURE__ */ p(In, { position: "top-left", children: /* @__PURE__ */ p(ue, { className: "flex items-center justify-end gap-2", size: "sm", children: /* @__PURE__ */ A(B, { type: "button", variant: "surface", onClick: w, children: [
27191
27202
  /* @__PURE__ */ p(T, { icon: ft }),
27192
27203
  " Add section"
27193
27204
  ] }) }) }),
27194
- /* @__PURE__ */ _(In, { position: "top-right", className: "flex flex-col items-center gap-2", children: [
27195
- /* @__PURE__ */ _(
27205
+ /* @__PURE__ */ A(In, { position: "top-right", className: "flex flex-col items-center gap-2", children: [
27206
+ /* @__PURE__ */ A(
27196
27207
  bn.Root,
27197
27208
  {
27198
27209
  className: "flex flex-col",
@@ -27208,13 +27219,13 @@ const L0 = {
27208
27219
  }
27209
27220
  ),
27210
27221
  /* @__PURE__ */ p(Ft, { size: "sm" }),
27211
- /* @__PURE__ */ _(ue, { className: "flex flex-col", size: "sm", accentColor: "base", variant: "soft", children: [
27222
+ /* @__PURE__ */ A(ue, { className: "flex flex-col", size: "sm", accentColor: "base", variant: "soft", children: [
27212
27223
  /* @__PURE__ */ p(ne, { className: "rounded-b-none", onClick: F, type: "button", children: /* @__PURE__ */ p(T, { icon: ft }) }),
27213
27224
  /* @__PURE__ */ p(ne, { onClick: N, radius: "none", type: "button", children: /* @__PURE__ */ p(T, { icon: Gr }) }),
27214
27225
  /* @__PURE__ */ p(ne, { className: "rounded-t-none", onClick: z, type: "button", children: /* @__PURE__ */ p(T, { icon: Sc }) })
27215
27226
  ] })
27216
27227
  ] }),
27217
- /* @__PURE__ */ p(In, { position: "bottom-right", children: /* @__PURE__ */ _(ue, { className: "flex items-center justify-end gap-2", size: "sm", children: [
27228
+ /* @__PURE__ */ p(In, { position: "bottom-right", children: /* @__PURE__ */ A(ue, { className: "flex items-center justify-end gap-2", size: "sm", children: [
27218
27229
  n && /* @__PURE__ */ p(B, { type: "button", variant: "soft", accentColor: "base", onClick: n, children: "Cancel" }),
27219
27230
  /* @__PURE__ */ p(B, { type: "submit", variant: "surface", children: "Save" })
27220
27231
  ] }) })
@@ -27441,15 +27452,15 @@ const Ms = L((r) => {
27441
27452
  },
27442
27453
  [e, t.identifier]
27443
27454
  );
27444
- return /* @__PURE__ */ _(pt, { className: "flex flex-col gap-2", size: "sm", children: [
27445
- /* @__PURE__ */ _(ue, { className: "flex justify-between gap-2", size: "sm", accentColor: "base", variant: "soft", children: [
27446
- /* @__PURE__ */ _(ye, { accentColor: "base", variant: "soft", size: "sm", children: [
27455
+ return /* @__PURE__ */ A(pt, { className: "flex flex-col gap-2", size: "sm", children: [
27456
+ /* @__PURE__ */ A(ue, { className: "flex justify-between gap-2", size: "sm", accentColor: "base", variant: "soft", children: [
27457
+ /* @__PURE__ */ A(ye, { accentColor: "base", variant: "soft", size: "sm", children: [
27447
27458
  /* @__PURE__ */ p(T, { icon: no }),
27448
27459
  e.label ?? es
27449
27460
  ] }),
27450
27461
  /* @__PURE__ */ p(ne, { type: "button", onClick: i, variant: "ghost", children: /* @__PURE__ */ p(T, { icon: Lt }) })
27451
27462
  ] }),
27452
- /* @__PURE__ */ _("div", { className: "flex h-max w-full flex-wrap gap-2", children: [
27463
+ /* @__PURE__ */ A("div", { className: "flex h-max w-full flex-wrap gap-2", children: [
27453
27464
  n.map((s) => s.render({
27454
27465
  onRemove: o
27455
27466
  })),
@@ -27480,8 +27491,8 @@ const Vs = L((r) => {
27480
27491
  (c) => !Ua(l, c.identifier, e.identifier)
27481
27492
  );
27482
27493
  }, [e.identifier, t]);
27483
- return /* @__PURE__ */ _("div", { className: "flex w-full grow flex-col gap-4", children: [
27484
- /* @__PURE__ */ _("div", { className: "flex w-full flex-col gap-2 overflow-hidden", children: [
27494
+ return /* @__PURE__ */ A("div", { className: "flex w-full grow flex-col gap-4", children: [
27495
+ /* @__PURE__ */ A("div", { className: "flex w-full flex-col gap-2 overflow-hidden", children: [
27485
27496
  /* @__PURE__ */ p(ge.Root, { variant: "outline", size: "md", children: /* @__PURE__ */ p(
27486
27497
  ge.Field,
27487
27498
  {
@@ -27505,15 +27516,15 @@ const Vs = L((r) => {
27505
27516
  )
27506
27517
  ] }),
27507
27518
  /* @__PURE__ */ p(Ft, { size: "full" }),
27508
- /* @__PURE__ */ _("div", { className: "flex flex-col gap-2", children: [
27509
- /* @__PURE__ */ _("div", { className: "flex justify-between gap-2", children: [
27519
+ /* @__PURE__ */ A("div", { className: "flex flex-col gap-2", children: [
27520
+ /* @__PURE__ */ A("div", { className: "flex justify-between gap-2", children: [
27510
27521
  /* @__PURE__ */ p(pe, { accentColor: "base", children: "Conditions" }),
27511
27522
  /* @__PURE__ */ p(
27512
27523
  Is,
27513
27524
  {
27514
27525
  fieldSections: s,
27515
27526
  onSelectFieldSection: i,
27516
- children: /* @__PURE__ */ _(B, { type: "button", variant: "soft", size: "sm", className: "w-max", children: [
27527
+ children: /* @__PURE__ */ A(B, { type: "button", variant: "soft", size: "sm", className: "w-max", children: [
27517
27528
  /* @__PURE__ */ p(T, { icon: ft }),
27518
27529
  "Add condition"
27519
27530
  ] })
@@ -27559,7 +27570,7 @@ const Fs = L((r) => {
27559
27570
  }), m = JSON.stringify(y);
27560
27571
  await navigator.clipboard.writeText(m), Ge.success({ title: "Section copied" });
27561
27572
  }, [e]), f = b(async () => {
27562
- const y = n.getDependenciesOfSection(e.identifier).map((A) => A.serialize()), m = ar.reseedFieldSections(y, {
27573
+ const y = n.getDependenciesOfSection(e.identifier).map((_) => _.serialize()), m = ar.reseedFieldSections(y, {
27563
27574
  conditions: !0
27564
27575
  }), C = JSON.stringify(m);
27565
27576
  await navigator.clipboard.writeText(C), Ge.success({ title: "Section copied" });
@@ -27593,7 +27604,7 @@ const Fs = L((r) => {
27593
27604
  Ge.error({ title: "Invalid JSON", description: "Check the JSON and try again." });
27594
27605
  return;
27595
27606
  }
27596
- const C = Array.isArray(m) ? m : [m], A = [];
27607
+ const C = Array.isArray(m) ? m : [m], _ = [];
27597
27608
  for (const w of C) {
27598
27609
  if (!w || typeof w != "object") continue;
27599
27610
  const S = w;
@@ -27607,25 +27618,25 @@ const Fs = L((r) => {
27607
27618
  fields: S.fields
27608
27619
  };
27609
27620
  try {
27610
- A.push(ot.deserialize(O));
27621
+ _.push(ot.deserialize(O));
27611
27622
  } catch {
27612
27623
  }
27613
27624
  }
27614
- if (A.length === 0) {
27625
+ if (_.length === 0) {
27615
27626
  Ge.error({ title: "Paste failed", description: "No valid sections found in the JSON." });
27616
27627
  return;
27617
27628
  }
27618
- A.forEach((w, S) => {
27629
+ _.forEach((w, S) => {
27619
27630
  n.addFieldSection(w, t + 1 + S);
27620
27631
  }), Ge.success({ title: "Section pasted", description: "Serialized JSON imported successfully." });
27621
27632
  }, [n, t]);
27622
- return /* @__PURE__ */ _(pt, { variant: "outline", className: "flex w-full items-center justify-between gap-4", size: "sm", children: [
27623
- /* @__PURE__ */ _("div", { className: "flex w-full grow flex-col gap-4", children: [
27633
+ return /* @__PURE__ */ A(pt, { variant: "outline", className: "flex w-full items-center justify-between gap-4", size: "sm", children: [
27634
+ /* @__PURE__ */ A("div", { className: "flex w-full grow flex-col gap-4", children: [
27624
27635
  /* @__PURE__ */ p(Vs, { fieldSection: e }),
27625
- /* @__PURE__ */ _("div", { className: "flex w-full flex-col gap-2", children: [
27626
- /* @__PURE__ */ _("div", { className: "flex justify-between gap-2", children: [
27636
+ /* @__PURE__ */ A("div", { className: "flex w-full flex-col gap-2", children: [
27637
+ /* @__PURE__ */ A("div", { className: "flex justify-between gap-2", children: [
27627
27638
  /* @__PURE__ */ p(pe, { accentColor: "base", size: "md", children: "Fields" }),
27628
- /* @__PURE__ */ p(wn, { onSelectFieldType: l, size: "sm", children: /* @__PURE__ */ _(B, { type: "button", variant: "soft", size: "sm", children: [
27639
+ /* @__PURE__ */ p(wn, { onSelectFieldType: l, size: "sm", children: /* @__PURE__ */ A(B, { type: "button", variant: "soft", size: "sm", children: [
27629
27640
  /* @__PURE__ */ p(T, { icon: ft }),
27630
27641
  " Add field"
27631
27642
  ] }) })
@@ -27642,25 +27653,25 @@ const Fs = L((r) => {
27642
27653
  ))
27643
27654
  ] })
27644
27655
  ] }),
27645
- /* @__PURE__ */ _(ue, { className: "flex flex-col gap-0.5", variant: "ghost", accentColor: "base", size: "sm", children: [
27656
+ /* @__PURE__ */ A(ue, { className: "flex flex-col gap-0.5", variant: "ghost", accentColor: "base", size: "sm", children: [
27646
27657
  /* @__PURE__ */ p(ne, { type: "button", onClick: c, children: /* @__PURE__ */ p(T, { icon: ao }) }),
27647
27658
  /* @__PURE__ */ p(ne, { type: "button", onClick: u, children: /* @__PURE__ */ p(T, { icon: io }) }),
27648
- /* @__PURE__ */ _(D.Root, { align: "end", children: [
27659
+ /* @__PURE__ */ A(D.Root, { align: "end", children: [
27649
27660
  /* @__PURE__ */ p(D.ClickTrigger, { children: /* @__PURE__ */ p(ne, { type: "button", children: /* @__PURE__ */ p(T, { icon: eo }) }) }),
27650
- /* @__PURE__ */ _(D.Content, { size: "sm", children: [
27651
- /* @__PURE__ */ _(D.Item, { onSelect: s, children: [
27661
+ /* @__PURE__ */ A(D.Content, { size: "sm", children: [
27662
+ /* @__PURE__ */ A(D.Item, { onSelect: s, children: [
27652
27663
  /* @__PURE__ */ p(T, { icon: ai }),
27653
27664
  "Duplicate section"
27654
27665
  ] }),
27655
- /* @__PURE__ */ _(D.Item, { onSelect: h, children: [
27666
+ /* @__PURE__ */ A(D.Item, { onSelect: h, children: [
27656
27667
  /* @__PURE__ */ p(T, { icon: Ka }),
27657
27668
  "Copy JSON"
27658
27669
  ] }),
27659
- /* @__PURE__ */ _(D.Item, { onSelect: v, children: [
27670
+ /* @__PURE__ */ A(D.Item, { onSelect: v, children: [
27660
27671
  /* @__PURE__ */ p(T, { icon: Qa }),
27661
27672
  "Paste JSON"
27662
27673
  ] }),
27663
- /* @__PURE__ */ _(D.Item, { onSelect: a, children: [
27674
+ /* @__PURE__ */ A(D.Item, { onSelect: a, children: [
27664
27675
  /* @__PURE__ */ p(T, { icon: Lt }),
27665
27676
  "Delete section"
27666
27677
  ] })
@@ -27728,14 +27739,14 @@ const Ps = L(() => {
27728
27739
  i.addFieldSection(g, v + y);
27729
27740
  }), Ge.success({ title: "Sections pasted", description: "Serialized JSON imported successfully." });
27730
27741
  }, [i]);
27731
- return /* @__PURE__ */ _("form", { className: "flex flex-col gap-4", onSubmit: r(t), children: [
27732
- /* @__PURE__ */ _("div", { className: "flex flex-col gap-4", children: [
27733
- /* @__PURE__ */ _("div", { className: "flex items-center justify-end gap-2", children: [
27734
- /* @__PURE__ */ _(B, { type: "button", variant: "soft", size: "sm", onClick: o, children: [
27742
+ return /* @__PURE__ */ A("form", { className: "flex flex-col gap-4", onSubmit: r(t), children: [
27743
+ /* @__PURE__ */ A("div", { className: "flex flex-col gap-4", children: [
27744
+ /* @__PURE__ */ A("div", { className: "flex items-center justify-end gap-2", children: [
27745
+ /* @__PURE__ */ A(B, { type: "button", variant: "soft", size: "sm", onClick: o, children: [
27735
27746
  /* @__PURE__ */ p(T, { icon: Ka }),
27736
27747
  " Copy JSON"
27737
27748
  ] }),
27738
- /* @__PURE__ */ _(B, { type: "button", variant: "soft", size: "sm", onClick: s, children: [
27749
+ /* @__PURE__ */ A(B, { type: "button", variant: "soft", size: "sm", onClick: s, children: [
27739
27750
  /* @__PURE__ */ p(T, { icon: Qa }),
27740
27751
  " Paste JSON"
27741
27752
  ] })
@@ -27748,7 +27759,7 @@ const Ps = L(() => {
27748
27759
  },
27749
27760
  c.identifier
27750
27761
  )),
27751
- /* @__PURE__ */ _(
27762
+ /* @__PURE__ */ A(
27752
27763
  B,
27753
27764
  {
27754
27765
  className: "mb-4",
@@ -27765,7 +27776,7 @@ const Ps = L(() => {
27765
27776
  )
27766
27777
  ] }),
27767
27778
  !!((l = e.fields) != null && l.message) && /* @__PURE__ */ p(pe, { size: "xs", accentColor: "danger", children: e.fields.message }),
27768
- /* @__PURE__ */ _(ue, { className: "flex items-center justify-end gap-2", size: "sm", children: [
27779
+ /* @__PURE__ */ A(ue, { className: "flex items-center justify-end gap-2", size: "sm", children: [
27769
27780
  n && /* @__PURE__ */ p(B, { type: "button", variant: "soft", accentColor: "base", onClick: n, children: "Cancel" }),
27770
27781
  /* @__PURE__ */ p(B, { type: "submit", variant: "surface", children: "Save" })
27771
27782
  ] })
@@ -27834,23 +27845,23 @@ const X0 = L(
27834
27845
  N();
27835
27846
  };
27836
27847
  }, [m, C]);
27837
- const A = Bc(n.getFieldSections()), w = se(
27848
+ const _ = Bc(n.getFieldSections()), w = se(
27838
27849
  () => ({
27839
27850
  fieldSchema: n,
27840
27851
  size: v
27841
27852
  }),
27842
27853
  [n, v]
27843
27854
  ), S = !d && !!u, O = !l;
27844
- return /* @__PURE__ */ p(Wa, { ...m, children: /* @__PURE__ */ p(Ce, { value: w, children: /* @__PURE__ */ _(
27855
+ return /* @__PURE__ */ p(Wa, { ...m, children: /* @__PURE__ */ p(Ce, { value: w, children: /* @__PURE__ */ A(
27845
27856
  "form",
27846
27857
  {
27847
27858
  ref: e,
27848
27859
  className: Ct(f, "flex flex-col gap-4"),
27849
27860
  onSubmit: m.handleSubmit(y),
27850
27861
  children: [
27851
- /* @__PURE__ */ p("div", { className: k0({ size: v }), children: A }),
27852
- !t && (S || O) ? /* @__PURE__ */ _(ue, { className: "flex items-center justify-end gap-2", size: v, children: [
27853
- S ? /* @__PURE__ */ _(
27862
+ /* @__PURE__ */ p("div", { className: k0({ size: v }), children: _ }),
27863
+ !t && (S || O) ? /* @__PURE__ */ A(ue, { className: "flex items-center justify-end gap-2", size: v, children: [
27864
+ S ? /* @__PURE__ */ A(
27854
27865
  B,
27855
27866
  {
27856
27867
  ...h,
@@ -27864,7 +27875,7 @@ const X0 = L(
27864
27875
  ]
27865
27876
  }
27866
27877
  ) : null,
27867
- O ? /* @__PURE__ */ _(B, { ...h, type: "submit", accentColor: "primary", variant: "surface", children: [
27878
+ O ? /* @__PURE__ */ A(B, { ...h, type: "submit", accentColor: "primary", variant: "surface", children: [
27868
27879
  /* @__PURE__ */ p(T, { icon: et }),
27869
27880
  s
27870
27881
  ] }) : null
@@ -27880,13 +27891,13 @@ const X0 = L(
27880
27891
  ks.displayName = "FormBuilderPreview";
27881
27892
  const Ls = L((r) => {
27882
27893
  const { children: e, initialFields: t, onSave: n, onCancel: i, disableRequiredFields: a = !1 } = r, o = b((v) => {
27883
- var A;
27894
+ var _;
27884
27895
  const g = {};
27885
27896
  (!v.fields || v.fields.length === 0) && (g.fields = "At least one field is required.");
27886
27897
  const y = [];
27887
27898
  for (const [w, S] of v.fields.entries())
27888
27899
  for (const [O, N] of S.fields.entries()) {
27889
- const F = ((A = As(N.type, `fields.${w}.fields.${O}`)) == null ? void 0 : A.map(
27900
+ const F = ((_ = As(N.type, `fields.${w}.fields.${O}`)) == null ? void 0 : _.map(
27890
27901
  ({ field: z }) => z
27891
27902
  )) ?? [];
27892
27903
  y.push(...F);