@standardbeagle/edit-db 0.4.416 → 0.4.417

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/editor.es.js CHANGED
@@ -34,10 +34,10 @@ function Pm() {
34
34
  {
35
35
  for (var k = arguments.length, D = new Array(k > 1 ? k - 1 : 0), Z = 1; Z < k; Z++)
36
36
  D[Z - 1] = arguments[Z];
37
- w("error", S, D);
37
+ C("error", S, D);
38
38
  }
39
39
  }
40
- function w(S, k, D) {
40
+ function C(S, k, D) {
41
41
  {
42
42
  var Z = y.ReactDebugCurrentFrame, he = Z.getStackAddendum();
43
43
  he !== "" && (k += "%s", D = D.concat([he]));
@@ -47,10 +47,10 @@ function Pm() {
47
47
  ye.unshift("Warning: " + k), Function.prototype.apply.call(console[S], console, ye);
48
48
  }
49
49
  }
50
- var _ = !1, R = !1, j = !1, E = !1, C = !1, N;
50
+ var _ = !1, R = !1, j = !1, E = !1, w = !1, N;
51
51
  N = /* @__PURE__ */ Symbol.for("react.module.reference");
52
52
  function M(S) {
53
- return !!(typeof S == "string" || typeof S == "function" || S === r || S === s || C || S === o || S === u || S === f || E || S === p || _ || R || j || typeof S == "object" && S !== null && (S.$$typeof === m || S.$$typeof === d || S.$$typeof === i || S.$$typeof === l || S.$$typeof === c || // This needs to include all possible module reference object
53
+ return !!(typeof S == "string" || typeof S == "function" || S === r || S === s || w || S === o || S === u || S === f || E || S === p || _ || R || j || typeof S == "object" && S !== null && (S.$$typeof === m || S.$$typeof === d || S.$$typeof === i || S.$$typeof === l || S.$$typeof === c || // This needs to include all possible module reference object
54
54
  // types supported by any Flight configuration anywhere since
55
55
  // we don't know which Flight build this will end up being used
56
56
  // with.
@@ -816,14 +816,14 @@ function pr(e, t, n, r) {
816
816
  }, h = [];
817
817
  m.forEach((x) => {
818
818
  const y = [...h].reverse()[0], b = x.column.depth === g.depth;
819
- let w, _ = !1;
820
- if (b && x.column.parent ? w = x.column.parent : (w = x.column, _ = !0), y && y?.column === w)
819
+ let C, _ = !1;
820
+ if (b && x.column.parent ? C = x.column.parent : (C = x.column, _ = !0), y && y?.column === C)
821
821
  y.subHeaders.push(x);
822
822
  else {
823
- const R = ha(n, w, {
824
- id: [r, p, w.id, x?.id].filter(Boolean).join("_"),
823
+ const R = ha(n, C, {
824
+ id: [r, p, C.id, x?.id].filter(Boolean).join("_"),
825
825
  isPlaceholder: _,
826
- placeholderId: _ ? `${h.filter((j) => j.column === w).length}` : void 0,
826
+ placeholderId: _ ? `${h.filter((j) => j.column === C).length}` : void 0,
827
827
  depth: p,
828
828
  index: h.length
829
829
  });
@@ -838,11 +838,11 @@ function pr(e, t, n, r) {
838
838
  u(f, i - 1), c.reverse();
839
839
  const d = (m) => m.filter((g) => g.column.getIsVisible()).map((g) => {
840
840
  let h = 0, x = 0, y = [0];
841
- g.subHeaders && g.subHeaders.length ? (y = [], d(g.subHeaders).forEach((w) => {
841
+ g.subHeaders && g.subHeaders.length ? (y = [], d(g.subHeaders).forEach((C) => {
842
842
  let {
843
843
  colSpan: _,
844
844
  rowSpan: R
845
- } = w;
845
+ } = C;
846
846
  h += _, y.push(R);
847
847
  })) : h = 1;
848
848
  const b = Math.min(...y);
@@ -1354,19 +1354,19 @@ const gr = {
1354
1354
  if (!r || !o || (s.persist == null || s.persist(), Uo(s) && s.touches && s.touches.length > 1))
1355
1355
  return;
1356
1356
  const i = e.getSize(), l = e ? e.getLeafHeaders().map((y) => [y.column.id, y.column.getSize()]) : [[r.id, r.getSize()]], c = Uo(s) ? Math.round(s.touches[0].clientX) : s.clientX, u = {}, f = (y, b) => {
1357
- typeof b == "number" && (t.setColumnSizingInfo((w) => {
1357
+ typeof b == "number" && (t.setColumnSizingInfo((C) => {
1358
1358
  var _, R;
1359
- const j = t.options.columnResizeDirection === "rtl" ? -1 : 1, E = (b - ((_ = w?.startOffset) != null ? _ : 0)) * j, C = Math.max(E / ((R = w?.startSize) != null ? R : 0), -0.999999);
1360
- return w.columnSizingStart.forEach((N) => {
1359
+ const j = t.options.columnResizeDirection === "rtl" ? -1 : 1, E = (b - ((_ = C?.startOffset) != null ? _ : 0)) * j, w = Math.max(E / ((R = C?.startSize) != null ? R : 0), -0.999999);
1360
+ return C.columnSizingStart.forEach((N) => {
1361
1361
  let [M, A] = N;
1362
- u[M] = Math.round(Math.max(A + A * C, 0) * 100) / 100;
1362
+ u[M] = Math.round(Math.max(A + A * w, 0) * 100) / 100;
1363
1363
  }), {
1364
- ...w,
1364
+ ...C,
1365
1365
  deltaOffset: E,
1366
- deltaPercentage: C
1366
+ deltaPercentage: w
1367
1367
  };
1368
- }), (t.options.columnResizeMode === "onChange" || y === "end") && t.setColumnSizing((w) => ({
1369
- ...w,
1368
+ }), (t.options.columnResizeMode === "onChange" || y === "end") && t.setColumnSizing((C) => ({
1369
+ ...C,
1370
1370
  ...u
1371
1371
  })));
1372
1372
  }, d = (y) => f("move", y), m = (y) => {
@@ -2194,8 +2194,8 @@ function yp(e) {
2194
2194
  getAllColumns: J(() => [o._getColumnDefs()], (m) => {
2195
2195
  const p = function(g, h, x) {
2196
2196
  return x === void 0 && (x = 0), g.map((y) => {
2197
- const b = Om(o, y, x, h), w = y;
2198
- return b.columns = w.columns ? p(w.columns, b, x + 1) : [], b;
2197
+ const b = Om(o, y, x, h), C = y;
2198
+ return b.columns = C.columns ? p(C.columns, b, x + 1) : [], b;
2199
2199
  });
2200
2200
  };
2201
2201
  return p(m);
@@ -2527,8 +2527,8 @@ const Sp = (e, t) => {
2527
2527
  if (y) {
2528
2528
  const E = h.substring(0, x);
2529
2529
  b = r(E);
2530
- const C = b && i[b] ? r(h) : void 0;
2531
- C && C !== b && (b = C, y = !1);
2530
+ const w = b && i[b] ? r(h) : void 0;
2531
+ w && w !== b && (b = w, y = !1);
2532
2532
  } else
2533
2533
  b = r(h);
2534
2534
  if (!b) {
@@ -2542,14 +2542,14 @@ const Sp = (e, t) => {
2542
2542
  }
2543
2543
  y = !1;
2544
2544
  }
2545
- const w = p.length === 0 ? "" : p.length === 1 ? p[0] : s(p).join(":"), _ = g ? w + ks : w, R = _ + b;
2545
+ const C = p.length === 0 ? "" : p.length === 1 ? p[0] : s(p).join(":"), _ = g ? C + ks : C, R = _ + b;
2546
2546
  if (l.indexOf(R) > -1)
2547
2547
  continue;
2548
2548
  l.push(R);
2549
2549
  const j = o(b, y);
2550
2550
  for (let E = 0; E < j.length; ++E) {
2551
- const C = j[E];
2552
- l.push(_ + C);
2551
+ const w = j[E];
2552
+ l.push(_ + w);
2553
2553
  }
2554
2554
  u = d + (u.length > 0 ? " " + u : u);
2555
2555
  }
@@ -2594,7 +2594,7 @@ const Sp = (e, t) => {
2594
2594
  const r = lc.exec(e);
2595
2595
  return r ? r[1] ? t(r[1]) : n : !1;
2596
2596
  }, uc = (e) => e === "position" || e === "percentage", dc = (e) => e === "image" || e === "url", fc = (e) => e === "length" || e === "size" || e === "bg-size", mc = (e) => e === "length", dg = (e) => e === "number", pc = (e) => e === "family-name", gc = (e) => e === "number" || e === "weight", hc = (e) => e === "shadow", fg = () => {
2597
- const e = _e("color"), t = _e("font"), n = _e("text"), r = _e("font-weight"), o = _e("tracking"), s = _e("leading"), i = _e("breakpoint"), l = _e("container"), c = _e("spacing"), u = _e("radius"), f = _e("shadow"), d = _e("inset-shadow"), m = _e("text-shadow"), p = _e("drop-shadow"), g = _e("blur"), h = _e("perspective"), x = _e("aspect"), y = _e("ease"), b = _e("animate"), w = () => ["auto", "avoid", "all", "avoid-page", "page", "left", "right", "column"], _ = () => [
2597
+ const e = _e("color"), t = _e("font"), n = _e("text"), r = _e("font-weight"), o = _e("tracking"), s = _e("leading"), i = _e("breakpoint"), l = _e("container"), c = _e("spacing"), u = _e("radius"), f = _e("shadow"), d = _e("inset-shadow"), m = _e("text-shadow"), p = _e("drop-shadow"), g = _e("blur"), h = _e("perspective"), x = _e("aspect"), y = _e("ease"), b = _e("animate"), C = () => ["auto", "avoid", "all", "avoid-page", "page", "left", "right", "column"], _ = () => [
2598
2598
  "center",
2599
2599
  "top",
2600
2600
  "bottom",
@@ -2612,9 +2612,9 @@ const Sp = (e, t) => {
2612
2612
  "bottom-left",
2613
2613
  // Deprecated since Tailwind CSS v4.1.0, see https://github.com/tailwindlabs/tailwindcss/pull/17378
2614
2614
  "left-bottom"
2615
- ], R = () => [..._(), H, z], j = () => ["auto", "hidden", "clip", "visible", "scroll"], E = () => ["auto", "contain", "none"], C = () => [H, z, c], N = () => [_t, "full", "auto", ...C()], M = () => [st, "none", "subgrid", H, z], A = () => ["auto", {
2615
+ ], R = () => [..._(), H, z], j = () => ["auto", "hidden", "clip", "visible", "scroll"], E = () => ["auto", "contain", "none"], w = () => [H, z, c], N = () => [_t, "full", "auto", ...w()], M = () => [st, "none", "subgrid", H, z], A = () => ["auto", {
2616
2616
  span: ["full", st, H, z]
2617
- }, st, H, z], G = () => [st, "auto", H, z], q = () => ["auto", "min", "max", "fr", H, z], L = () => ["start", "end", "center", "between", "around", "evenly", "stretch", "baseline", "center-safe", "end-safe"], W = () => ["start", "end", "center", "stretch", "center-safe", "end-safe"], O = () => ["auto", ...C()], U = () => [_t, "auto", "full", "dvw", "dvh", "lvw", "lvh", "svw", "svh", "min", "max", "fit", ...C()], V = () => [_t, "screen", "full", "dvw", "lvw", "svw", "min", "max", "fit", ...C()], F = () => [_t, "screen", "full", "lh", "dvh", "lvh", "svh", "min", "max", "fit", ...C()], P = () => [e, H, z], ge = () => [..._(), Sa, Ca, {
2617
+ }, st, H, z], G = () => [st, "auto", H, z], q = () => ["auto", "min", "max", "fr", H, z], L = () => ["start", "end", "center", "between", "around", "evenly", "stretch", "baseline", "center-safe", "end-safe"], W = () => ["start", "end", "center", "stretch", "center-safe", "end-safe"], O = () => ["auto", ...w()], U = () => [_t, "auto", "full", "dvw", "dvh", "lvw", "lvh", "svw", "svh", "min", "max", "fit", ...w()], V = () => [_t, "screen", "full", "dvw", "lvw", "svw", "min", "max", "fit", ...w()], F = () => [_t, "screen", "full", "lh", "dvh", "lvh", "svh", "min", "max", "fit", ...w()], P = () => [e, H, z], ge = () => [..._(), Sa, Ca, {
2618
2618
  position: [H, z]
2619
2619
  }], ce = () => ["no-repeat", {
2620
2620
  repeat: ["", "x", "y", "space", "round"]
@@ -2635,7 +2635,7 @@ const Sp = (e, t) => {
2635
2635
  g,
2636
2636
  H,
2637
2637
  z
2638
- ], T = () => ["none", ie, H, z], $ = () => ["none", ie, H, z], ue = () => [ie, H, z], we = () => [_t, "full", ...C()];
2638
+ ], T = () => ["none", ie, H, z], $ = () => ["none", ie, H, z], ue = () => [ie, H, z], we = () => [_t, "full", ...w()];
2639
2639
  return {
2640
2640
  cacheSize: 500,
2641
2641
  theme: {
@@ -2700,14 +2700,14 @@ const Sp = (e, t) => {
2700
2700
  * @see https://tailwindcss.com/docs/break-after
2701
2701
  */
2702
2702
  "break-after": [{
2703
- "break-after": w()
2703
+ "break-after": C()
2704
2704
  }],
2705
2705
  /**
2706
2706
  * Break Before
2707
2707
  * @see https://tailwindcss.com/docs/break-before
2708
2708
  */
2709
2709
  "break-before": [{
2710
- "break-before": w()
2710
+ "break-before": C()
2711
2711
  }],
2712
2712
  /**
2713
2713
  * Break Inside
@@ -2929,7 +2929,7 @@ const Sp = (e, t) => {
2929
2929
  * @see https://tailwindcss.com/docs/flex-basis
2930
2930
  */
2931
2931
  basis: [{
2932
- basis: [_t, "full", "auto", l, ...C()]
2932
+ basis: [_t, "full", "auto", l, ...w()]
2933
2933
  }],
2934
2934
  /**
2935
2935
  * Flex Direction
@@ -3055,21 +3055,21 @@ const Sp = (e, t) => {
3055
3055
  * @see https://tailwindcss.com/docs/gap
3056
3056
  */
3057
3057
  gap: [{
3058
- gap: C()
3058
+ gap: w()
3059
3059
  }],
3060
3060
  /**
3061
3061
  * Gap X
3062
3062
  * @see https://tailwindcss.com/docs/gap
3063
3063
  */
3064
3064
  "gap-x": [{
3065
- "gap-x": C()
3065
+ "gap-x": w()
3066
3066
  }],
3067
3067
  /**
3068
3068
  * Gap Y
3069
3069
  * @see https://tailwindcss.com/docs/gap
3070
3070
  */
3071
3071
  "gap-y": [{
3072
- "gap-y": C()
3072
+ "gap-y": w()
3073
3073
  }],
3074
3074
  /**
3075
3075
  * Justify Content
@@ -3144,77 +3144,77 @@ const Sp = (e, t) => {
3144
3144
  * @see https://tailwindcss.com/docs/padding
3145
3145
  */
3146
3146
  p: [{
3147
- p: C()
3147
+ p: w()
3148
3148
  }],
3149
3149
  /**
3150
3150
  * Padding Inline
3151
3151
  * @see https://tailwindcss.com/docs/padding
3152
3152
  */
3153
3153
  px: [{
3154
- px: C()
3154
+ px: w()
3155
3155
  }],
3156
3156
  /**
3157
3157
  * Padding Block
3158
3158
  * @see https://tailwindcss.com/docs/padding
3159
3159
  */
3160
3160
  py: [{
3161
- py: C()
3161
+ py: w()
3162
3162
  }],
3163
3163
  /**
3164
3164
  * Padding Inline Start
3165
3165
  * @see https://tailwindcss.com/docs/padding
3166
3166
  */
3167
3167
  ps: [{
3168
- ps: C()
3168
+ ps: w()
3169
3169
  }],
3170
3170
  /**
3171
3171
  * Padding Inline End
3172
3172
  * @see https://tailwindcss.com/docs/padding
3173
3173
  */
3174
3174
  pe: [{
3175
- pe: C()
3175
+ pe: w()
3176
3176
  }],
3177
3177
  /**
3178
3178
  * Padding Block Start
3179
3179
  * @see https://tailwindcss.com/docs/padding
3180
3180
  */
3181
3181
  pbs: [{
3182
- pbs: C()
3182
+ pbs: w()
3183
3183
  }],
3184
3184
  /**
3185
3185
  * Padding Block End
3186
3186
  * @see https://tailwindcss.com/docs/padding
3187
3187
  */
3188
3188
  pbe: [{
3189
- pbe: C()
3189
+ pbe: w()
3190
3190
  }],
3191
3191
  /**
3192
3192
  * Padding Top
3193
3193
  * @see https://tailwindcss.com/docs/padding
3194
3194
  */
3195
3195
  pt: [{
3196
- pt: C()
3196
+ pt: w()
3197
3197
  }],
3198
3198
  /**
3199
3199
  * Padding Right
3200
3200
  * @see https://tailwindcss.com/docs/padding
3201
3201
  */
3202
3202
  pr: [{
3203
- pr: C()
3203
+ pr: w()
3204
3204
  }],
3205
3205
  /**
3206
3206
  * Padding Bottom
3207
3207
  * @see https://tailwindcss.com/docs/padding
3208
3208
  */
3209
3209
  pb: [{
3210
- pb: C()
3210
+ pb: w()
3211
3211
  }],
3212
3212
  /**
3213
3213
  * Padding Left
3214
3214
  * @see https://tailwindcss.com/docs/padding
3215
3215
  */
3216
3216
  pl: [{
3217
- pl: C()
3217
+ pl: w()
3218
3218
  }],
3219
3219
  /**
3220
3220
  * Margin
@@ -3298,7 +3298,7 @@ const Sp = (e, t) => {
3298
3298
  * @see https://tailwindcss.com/docs/margin#adding-space-between-children
3299
3299
  */
3300
3300
  "space-x": [{
3301
- "space-x": C()
3301
+ "space-x": w()
3302
3302
  }],
3303
3303
  /**
3304
3304
  * Space Between X Reverse
@@ -3310,7 +3310,7 @@ const Sp = (e, t) => {
3310
3310
  * @see https://tailwindcss.com/docs/margin#adding-space-between-children
3311
3311
  */
3312
3312
  "space-y": [{
3313
- "space-y": C()
3313
+ "space-y": w()
3314
3314
  }],
3315
3315
  /**
3316
3316
  * Space Between Y Reverse
@@ -3528,7 +3528,7 @@ const Sp = (e, t) => {
3528
3528
  leading: [
3529
3529
  /** Deprecated since Tailwind CSS v4.0.0. @see https://github.com/tailwindlabs/tailwindcss.com/issues/2027#issuecomment-2620152757 */
3530
3530
  s,
3531
- ...C()
3531
+ ...w()
3532
3532
  ]
3533
3533
  }],
3534
3534
  /**
@@ -3629,7 +3629,7 @@ const Sp = (e, t) => {
3629
3629
  * @see https://tailwindcss.com/docs/text-indent
3630
3630
  */
3631
3631
  indent: [{
3632
- indent: C()
3632
+ indent: w()
3633
3633
  }],
3634
3634
  /**
3635
3635
  * Tab Size
@@ -4628,21 +4628,21 @@ const Sp = (e, t) => {
4628
4628
  * @see https://tailwindcss.com/docs/border-spacing
4629
4629
  */
4630
4630
  "border-spacing": [{
4631
- "border-spacing": C()
4631
+ "border-spacing": w()
4632
4632
  }],
4633
4633
  /**
4634
4634
  * Border Spacing X
4635
4635
  * @see https://tailwindcss.com/docs/border-spacing
4636
4636
  */
4637
4637
  "border-spacing-x": [{
4638
- "border-spacing-x": C()
4638
+ "border-spacing-x": w()
4639
4639
  }],
4640
4640
  /**
4641
4641
  * Border Spacing Y
4642
4642
  * @see https://tailwindcss.com/docs/border-spacing
4643
4643
  */
4644
4644
  "border-spacing-y": [{
4645
- "border-spacing-y": C()
4645
+ "border-spacing-y": w()
4646
4646
  }],
4647
4647
  /**
4648
4648
  * Table Layout
@@ -4969,154 +4969,154 @@ const Sp = (e, t) => {
4969
4969
  * @see https://tailwindcss.com/docs/scroll-margin
4970
4970
  */
4971
4971
  "scroll-m": [{
4972
- "scroll-m": C()
4972
+ "scroll-m": w()
4973
4973
  }],
4974
4974
  /**
4975
4975
  * Scroll Margin Inline
4976
4976
  * @see https://tailwindcss.com/docs/scroll-margin
4977
4977
  */
4978
4978
  "scroll-mx": [{
4979
- "scroll-mx": C()
4979
+ "scroll-mx": w()
4980
4980
  }],
4981
4981
  /**
4982
4982
  * Scroll Margin Block
4983
4983
  * @see https://tailwindcss.com/docs/scroll-margin
4984
4984
  */
4985
4985
  "scroll-my": [{
4986
- "scroll-my": C()
4986
+ "scroll-my": w()
4987
4987
  }],
4988
4988
  /**
4989
4989
  * Scroll Margin Inline Start
4990
4990
  * @see https://tailwindcss.com/docs/scroll-margin
4991
4991
  */
4992
4992
  "scroll-ms": [{
4993
- "scroll-ms": C()
4993
+ "scroll-ms": w()
4994
4994
  }],
4995
4995
  /**
4996
4996
  * Scroll Margin Inline End
4997
4997
  * @see https://tailwindcss.com/docs/scroll-margin
4998
4998
  */
4999
4999
  "scroll-me": [{
5000
- "scroll-me": C()
5000
+ "scroll-me": w()
5001
5001
  }],
5002
5002
  /**
5003
5003
  * Scroll Margin Block Start
5004
5004
  * @see https://tailwindcss.com/docs/scroll-margin
5005
5005
  */
5006
5006
  "scroll-mbs": [{
5007
- "scroll-mbs": C()
5007
+ "scroll-mbs": w()
5008
5008
  }],
5009
5009
  /**
5010
5010
  * Scroll Margin Block End
5011
5011
  * @see https://tailwindcss.com/docs/scroll-margin
5012
5012
  */
5013
5013
  "scroll-mbe": [{
5014
- "scroll-mbe": C()
5014
+ "scroll-mbe": w()
5015
5015
  }],
5016
5016
  /**
5017
5017
  * Scroll Margin Top
5018
5018
  * @see https://tailwindcss.com/docs/scroll-margin
5019
5019
  */
5020
5020
  "scroll-mt": [{
5021
- "scroll-mt": C()
5021
+ "scroll-mt": w()
5022
5022
  }],
5023
5023
  /**
5024
5024
  * Scroll Margin Right
5025
5025
  * @see https://tailwindcss.com/docs/scroll-margin
5026
5026
  */
5027
5027
  "scroll-mr": [{
5028
- "scroll-mr": C()
5028
+ "scroll-mr": w()
5029
5029
  }],
5030
5030
  /**
5031
5031
  * Scroll Margin Bottom
5032
5032
  * @see https://tailwindcss.com/docs/scroll-margin
5033
5033
  */
5034
5034
  "scroll-mb": [{
5035
- "scroll-mb": C()
5035
+ "scroll-mb": w()
5036
5036
  }],
5037
5037
  /**
5038
5038
  * Scroll Margin Left
5039
5039
  * @see https://tailwindcss.com/docs/scroll-margin
5040
5040
  */
5041
5041
  "scroll-ml": [{
5042
- "scroll-ml": C()
5042
+ "scroll-ml": w()
5043
5043
  }],
5044
5044
  /**
5045
5045
  * Scroll Padding
5046
5046
  * @see https://tailwindcss.com/docs/scroll-padding
5047
5047
  */
5048
5048
  "scroll-p": [{
5049
- "scroll-p": C()
5049
+ "scroll-p": w()
5050
5050
  }],
5051
5051
  /**
5052
5052
  * Scroll Padding Inline
5053
5053
  * @see https://tailwindcss.com/docs/scroll-padding
5054
5054
  */
5055
5055
  "scroll-px": [{
5056
- "scroll-px": C()
5056
+ "scroll-px": w()
5057
5057
  }],
5058
5058
  /**
5059
5059
  * Scroll Padding Block
5060
5060
  * @see https://tailwindcss.com/docs/scroll-padding
5061
5061
  */
5062
5062
  "scroll-py": [{
5063
- "scroll-py": C()
5063
+ "scroll-py": w()
5064
5064
  }],
5065
5065
  /**
5066
5066
  * Scroll Padding Inline Start
5067
5067
  * @see https://tailwindcss.com/docs/scroll-padding
5068
5068
  */
5069
5069
  "scroll-ps": [{
5070
- "scroll-ps": C()
5070
+ "scroll-ps": w()
5071
5071
  }],
5072
5072
  /**
5073
5073
  * Scroll Padding Inline End
5074
5074
  * @see https://tailwindcss.com/docs/scroll-padding
5075
5075
  */
5076
5076
  "scroll-pe": [{
5077
- "scroll-pe": C()
5077
+ "scroll-pe": w()
5078
5078
  }],
5079
5079
  /**
5080
5080
  * Scroll Padding Block Start
5081
5081
  * @see https://tailwindcss.com/docs/scroll-padding
5082
5082
  */
5083
5083
  "scroll-pbs": [{
5084
- "scroll-pbs": C()
5084
+ "scroll-pbs": w()
5085
5085
  }],
5086
5086
  /**
5087
5087
  * Scroll Padding Block End
5088
5088
  * @see https://tailwindcss.com/docs/scroll-padding
5089
5089
  */
5090
5090
  "scroll-pbe": [{
5091
- "scroll-pbe": C()
5091
+ "scroll-pbe": w()
5092
5092
  }],
5093
5093
  /**
5094
5094
  * Scroll Padding Top
5095
5095
  * @see https://tailwindcss.com/docs/scroll-padding
5096
5096
  */
5097
5097
  "scroll-pt": [{
5098
- "scroll-pt": C()
5098
+ "scroll-pt": w()
5099
5099
  }],
5100
5100
  /**
5101
5101
  * Scroll Padding Right
5102
5102
  * @see https://tailwindcss.com/docs/scroll-padding
5103
5103
  */
5104
5104
  "scroll-pr": [{
5105
- "scroll-pr": C()
5105
+ "scroll-pr": w()
5106
5106
  }],
5107
5107
  /**
5108
5108
  * Scroll Padding Bottom
5109
5109
  * @see https://tailwindcss.com/docs/scroll-padding
5110
5110
  */
5111
5111
  "scroll-pb": [{
5112
- "scroll-pb": C()
5112
+ "scroll-pb": w()
5113
5113
  }],
5114
5114
  /**
5115
5115
  * Scroll Padding Left
5116
5116
  * @see https://tailwindcss.com/docs/scroll-padding
5117
5117
  */
5118
5118
  "scroll-pl": [{
5119
- "scroll-pl": C()
5119
+ "scroll-pl": w()
5120
5120
  }],
5121
5121
  /**
5122
5122
  * Scroll Snap Align
@@ -5739,6 +5739,9 @@ query dbSchema {
5739
5739
  sourceColumnNames
5740
5740
  destinationTable
5741
5741
  destinationColumnNames
5742
+ isPolymorphic
5743
+ polymorphicTypeColumn
5744
+ polymorphicTypeValue
5742
5745
  }
5743
5746
  singleJoins {
5744
5747
  name
@@ -6736,21 +6739,21 @@ function xi(e) {
6736
6739
  t,
6737
6740
  { collectionRef: { current: null }, itemMap: /* @__PURE__ */ new Map() }
6738
6741
  ), i = (h) => {
6739
- const { scope: x, children: y } = h, b = Fe.useRef(null), w = Fe.useRef(/* @__PURE__ */ new Map()).current;
6740
- return /* @__PURE__ */ a.jsx(o, { scope: x, itemMap: w, collectionRef: b, children: y });
6742
+ const { scope: x, children: y } = h, b = Fe.useRef(null), C = Fe.useRef(/* @__PURE__ */ new Map()).current;
6743
+ return /* @__PURE__ */ a.jsx(o, { scope: x, itemMap: C, collectionRef: b, children: y });
6741
6744
  };
6742
6745
  i.displayName = t;
6743
6746
  const l = e + "CollectionSlot", c = /* @__PURE__ */ vn(l), u = Fe.forwardRef(
6744
6747
  (h, x) => {
6745
- const { scope: y, children: b } = h, w = s(l, y), _ = ve(x, w.collectionRef);
6748
+ const { scope: y, children: b } = h, C = s(l, y), _ = ve(x, C.collectionRef);
6746
6749
  return /* @__PURE__ */ a.jsx(c, { ref: _, children: b });
6747
6750
  }
6748
6751
  );
6749
6752
  u.displayName = l;
6750
6753
  const f = e + "CollectionItemSlot", d = "data-radix-collection-item", m = /* @__PURE__ */ vn(f), p = Fe.forwardRef(
6751
6754
  (h, x) => {
6752
- const { scope: y, children: b, ...w } = h, _ = Fe.useRef(null), R = ve(x, _), j = s(f, y);
6753
- return Fe.useEffect(() => (j.itemMap.set(_, { ref: _, ...w }), () => {
6755
+ const { scope: y, children: b, ...C } = h, _ = Fe.useRef(null), R = ve(x, _), j = s(f, y);
6756
+ return Fe.useEffect(() => (j.itemMap.set(_, { ref: _, ...C }), () => {
6754
6757
  j.itemMap.delete(_);
6755
6758
  })), /* @__PURE__ */ a.jsx(m, { [d]: "", ref: R, children: b });
6756
6759
  }
@@ -6761,9 +6764,9 @@ function xi(e) {
6761
6764
  return Fe.useCallback(() => {
6762
6765
  const b = x.collectionRef.current;
6763
6766
  if (!b) return [];
6764
- const w = Array.from(b.querySelectorAll(`[${d}]`));
6767
+ const C = Array.from(b.querySelectorAll(`[${d}]`));
6765
6768
  return Array.from(x.itemMap.values()).sort(
6766
- (j, E) => w.indexOf(j.ref.current) - w.indexOf(E.ref.current)
6769
+ (j, E) => C.indexOf(j.ref.current) - C.indexOf(E.ref.current)
6767
6770
  );
6768
6771
  }, [x.collectionRef, x.itemMap]);
6769
6772
  }
@@ -6933,12 +6936,12 @@ var rx = "DismissableLayer", Is = "dismissableLayer.update", ox = "dismissableLa
6933
6936
  onInteractOutside: i,
6934
6937
  onDismiss: l,
6935
6938
  ...c
6936
- } = e, u = v.useContext(Uc), [f, d] = v.useState(null), m = f?.ownerDocument ?? globalThis?.document, [, p] = v.useState({}), g = ve(t, (E) => d(E)), h = Array.from(u.layers), [x] = [...u.layersWithOutsidePointerEventsDisabled].slice(-1), y = h.indexOf(x), b = f ? h.indexOf(f) : -1, w = u.layersWithOutsidePointerEventsDisabled.size > 0, _ = b >= y, R = lx((E) => {
6937
- const C = E.target, N = [...u.branches].some((M) => M.contains(C));
6939
+ } = e, u = v.useContext(Uc), [f, d] = v.useState(null), m = f?.ownerDocument ?? globalThis?.document, [, p] = v.useState({}), g = ve(t, (E) => d(E)), h = Array.from(u.layers), [x] = [...u.layersWithOutsidePointerEventsDisabled].slice(-1), y = h.indexOf(x), b = f ? h.indexOf(f) : -1, C = u.layersWithOutsidePointerEventsDisabled.size > 0, _ = b >= y, R = lx((E) => {
6940
+ const w = E.target, N = [...u.branches].some((M) => M.contains(w));
6938
6941
  !_ || N || (o?.(E), i?.(E), E.defaultPrevented || l?.());
6939
6942
  }, m), j = cx((E) => {
6940
- const C = E.target;
6941
- [...u.branches].some((M) => M.contains(C)) || (s?.(E), i?.(E), E.defaultPrevented || l?.());
6943
+ const w = E.target;
6944
+ [...u.branches].some((M) => M.contains(w)) || (s?.(E), i?.(E), E.defaultPrevented || l?.());
6942
6945
  }, m);
6943
6946
  return nx((E) => {
6944
6947
  b === u.layers.size - 1 && (r?.(E), !E.defaultPrevented && l && (E.preventDefault(), l()));
@@ -6958,7 +6961,7 @@ var rx = "DismissableLayer", Is = "dismissableLayer.update", ox = "dismissableLa
6958
6961
  ...c,
6959
6962
  ref: g,
6960
6963
  style: {
6961
- pointerEvents: w ? _ ? "auto" : "none" : void 0,
6964
+ pointerEvents: C ? _ ? "auto" : "none" : void 0,
6962
6965
  ...e.style
6963
6966
  },
6964
6967
  onFocusCapture: B(e.onFocusCapture, j.onFocusCapture),
@@ -7053,17 +7056,17 @@ var rs = "focusScope.autoFocusOnMount", os = "focusScope.autoFocusOnUnmount", za
7053
7056
  }).current;
7054
7057
  v.useEffect(() => {
7055
7058
  if (r) {
7056
- let h = function(w) {
7059
+ let h = function(C) {
7057
7060
  if (p.paused || !l) return;
7058
- const _ = w.target;
7061
+ const _ = C.target;
7059
7062
  l.contains(_) ? d.current = _ : jt(d.current, { select: !0 });
7060
- }, x = function(w) {
7063
+ }, x = function(C) {
7061
7064
  if (p.paused || !l) return;
7062
- const _ = w.relatedTarget;
7065
+ const _ = C.relatedTarget;
7063
7066
  _ !== null && (l.contains(_) || jt(d.current, { select: !0 }));
7064
- }, y = function(w) {
7067
+ }, y = function(C) {
7065
7068
  if (document.activeElement === document.body)
7066
- for (const R of w)
7069
+ for (const R of C)
7067
7070
  R.removedNodes.length > 0 && jt(l);
7068
7071
  };
7069
7072
  document.addEventListener("focusin", h), document.addEventListener("focusout", x);
@@ -7093,8 +7096,8 @@ var rs = "focusScope.autoFocusOnMount", os = "focusScope.autoFocusOnUnmount", za
7093
7096
  if (!n && !r || p.paused) return;
7094
7097
  const x = h.key === "Tab" && !h.altKey && !h.ctrlKey && !h.metaKey, y = document.activeElement;
7095
7098
  if (x && y) {
7096
- const b = h.currentTarget, [w, _] = fx(b);
7097
- w && _ ? !h.shiftKey && y === _ ? (h.preventDefault(), n && jt(w, { select: !0 })) : h.shiftKey && y === w && (h.preventDefault(), n && jt(_, { select: !0 })) : y === b && h.preventDefault();
7099
+ const b = h.currentTarget, [C, _] = fx(b);
7100
+ C && _ ? !h.shiftKey && y === _ ? (h.preventDefault(), n && jt(C, { select: !0 })) : h.shiftKey && y === C && (h.preventDefault(), n && jt(_, { select: !0 })) : y === b && h.preventDefault();
7098
7101
  }
7099
7102
  },
7100
7103
  [n, r, p.paused]
@@ -7332,11 +7335,11 @@ var Zc = Rx(), as = function() {
7332
7335
  onScrollCapture: as,
7333
7336
  onWheelCapture: as,
7334
7337
  onTouchMoveCapture: as
7335
- }), o = r[0], s = r[1], i = e.forwardProps, l = e.children, c = e.className, u = e.removeScrollBar, f = e.enabled, d = e.shards, m = e.sideCar, p = e.noRelative, g = e.noIsolation, h = e.inert, x = e.allowPinchZoom, y = e.as, b = y === void 0 ? "div" : y, w = e.gapMode, _ = Xc(e, ["forwardProps", "children", "className", "removeScrollBar", "enabled", "shards", "sideCar", "noRelative", "noIsolation", "inert", "allowPinchZoom", "as", "gapMode"]), R = m, j = Sx([n, t]), E = at(at({}, _), o);
7338
+ }), o = r[0], s = r[1], i = e.forwardProps, l = e.children, c = e.className, u = e.removeScrollBar, f = e.enabled, d = e.shards, m = e.sideCar, p = e.noRelative, g = e.noIsolation, h = e.inert, x = e.allowPinchZoom, y = e.as, b = y === void 0 ? "div" : y, C = e.gapMode, _ = Xc(e, ["forwardProps", "children", "className", "removeScrollBar", "enabled", "shards", "sideCar", "noRelative", "noIsolation", "inert", "allowPinchZoom", "as", "gapMode"]), R = m, j = Sx([n, t]), E = at(at({}, _), o);
7336
7339
  return v.createElement(
7337
7340
  v.Fragment,
7338
7341
  null,
7339
- f && v.createElement(R, { sideCar: Zc, removeScrollBar: u, shards: d, noRelative: p, noIsolation: g, inert: h, setCallbacks: s, allowPinchZoom: !!x, lockRef: n, gapMode: w }),
7342
+ f && v.createElement(R, { sideCar: Zc, removeScrollBar: u, shards: d, noRelative: p, noIsolation: g, inert: h, setCallbacks: s, allowPinchZoom: !!x, lockRef: n, gapMode: C }),
7340
7343
  i ? v.cloneElement(v.Children.only(l), at(at({}, E), { ref: j })) : v.createElement(b, at({}, E, { className: c, ref: j }), l)
7341
7344
  );
7342
7345
  });
@@ -7583,10 +7586,10 @@ function Xx(e) {
7583
7586
  var l = v.useCallback(function(h, x) {
7584
7587
  if ("touches" in h && h.touches.length === 2 || h.type === "wheel" && h.ctrlKey)
7585
7588
  return !i.current.allowPinchZoom;
7586
- var y = wr(h), b = n.current, w = "deltaX" in h ? h.deltaX : b[0] - y[0], _ = "deltaY" in h ? h.deltaY : b[1] - y[1], R, j = h.target, E = Math.abs(w) > Math.abs(_) ? "h" : "v";
7589
+ var y = wr(h), b = n.current, C = "deltaX" in h ? h.deltaX : b[0] - y[0], _ = "deltaY" in h ? h.deltaY : b[1] - y[1], R, j = h.target, E = Math.abs(C) > Math.abs(_) ? "h" : "v";
7587
7590
  if ("touches" in h && E === "h" && j.type === "range")
7588
7591
  return !1;
7589
- var C = window.getSelection(), N = C && C.anchorNode, M = N ? N === j || N.contains(j) : !1;
7592
+ var w = window.getSelection(), N = w && w.anchorNode, M = N ? N === j || N.contains(j) : !1;
7590
7593
  if (M)
7591
7594
  return !1;
7592
7595
  var A = Ua(E, j);
@@ -7594,10 +7597,10 @@ function Xx(e) {
7594
7597
  return !0;
7595
7598
  if (A ? R = E : (R = E === "v" ? "h" : "v", A = Ua(E, j)), !A)
7596
7599
  return !1;
7597
- if (!r.current && "changedTouches" in h && (w || _) && (r.current = R), !R)
7600
+ if (!r.current && "changedTouches" in h && (C || _) && (r.current = R), !R)
7598
7601
  return !0;
7599
7602
  var G = r.current || R;
7600
- return Kx(G, x, h, G === "h" ? w : _);
7603
+ return Kx(G, x, h, G === "h" ? C : _);
7601
7604
  }, []), c = v.useCallback(function(h) {
7602
7605
  var x = h;
7603
7606
  if (!(!rn.length || rn[rn.length - 1] !== s)) {
@@ -7609,17 +7612,17 @@ function Xx(e) {
7609
7612
  return;
7610
7613
  }
7611
7614
  if (!b) {
7612
- var w = (i.current.shards || []).map(Ja).filter(Boolean).filter(function(R) {
7615
+ var C = (i.current.shards || []).map(Ja).filter(Boolean).filter(function(R) {
7613
7616
  return R.contains(x.target);
7614
- }), _ = w.length > 0 ? l(x, w[0]) : !i.current.noIsolation;
7617
+ }), _ = C.length > 0 ? l(x, C[0]) : !i.current.noIsolation;
7615
7618
  _ && x.cancelable && x.preventDefault();
7616
7619
  }
7617
7620
  }
7618
7621
  }, []), u = v.useCallback(function(h, x, y, b) {
7619
- var w = { name: h, delta: x, target: y, should: b, shadowParent: Qx(y) };
7620
- t.current.push(w), setTimeout(function() {
7622
+ var C = { name: h, delta: x, target: y, should: b, shadowParent: Qx(y) };
7623
+ t.current.push(C), setTimeout(function() {
7621
7624
  t.current = t.current.filter(function(_) {
7622
- return _ !== w;
7625
+ return _ !== C;
7623
7626
  });
7624
7627
  }, 1);
7625
7628
  }, []), f = v.useCallback(function(h) {
@@ -7908,7 +7911,7 @@ xu.displayName = vu;
7908
7911
  function _i(e) {
7909
7912
  return e ? "open" : "closed";
7910
7913
  }
7911
- var yu = "DialogTitleWarning", [K_, bu] = qv(yu, {
7914
+ var yu = "DialogTitleWarning", [X_, bu] = qv(yu, {
7912
7915
  contentName: Kt,
7913
7916
  titleName: Si,
7914
7917
  docsSlug: "dialog"
@@ -8073,7 +8076,7 @@ function vy(e) {
8073
8076
  defaultProp: o ?? !1,
8074
8077
  onChange: c,
8075
8078
  caller: wo
8076
- }), [g, h] = v.useState(null), [x, y] = v.useState(null), b = v.useRef(!1), w = g ? !!i || !!g.closest("form") : (
8079
+ }), [g, h] = v.useState(null), [x, y] = v.useState(null), b = v.useRef(!1), C = g ? !!i || !!g.closest("form") : (
8077
8080
  // We set this to true by default so that events bubble to forms without JS (SSR)
8078
8081
  !0
8079
8082
  ), _ = {
@@ -8088,7 +8091,7 @@ function vy(e) {
8088
8091
  hasConsumerStoppedPropagationRef: b,
8089
8092
  required: u,
8090
8093
  defaultChecked: Mt(o) ? !1 : o,
8091
- isFormControl: w,
8094
+ isFormControl: C,
8092
8095
  bubbleInput: x,
8093
8096
  setBubbleInput: y
8094
8097
  };
@@ -8232,8 +8235,8 @@ var Au = "CheckboxBubbleInput", $u = v.forwardRef(
8232
8235
  v.useEffect(() => {
8233
8236
  const b = m;
8234
8237
  if (!b) return;
8235
- const w = window.HTMLInputElement.prototype, R = Object.getOwnPropertyDescriptor(
8236
- w,
8238
+ const C = window.HTMLInputElement.prototype, R = Object.getOwnPropertyDescriptor(
8239
+ C,
8237
8240
  "checked"
8238
8241
  ).set, j = !o.current;
8239
8242
  if (h !== s && R) {
@@ -8460,7 +8463,7 @@ async function My(e, t) {
8460
8463
  y: o,
8461
8464
  width: i.floating.width,
8462
8465
  height: i.floating.height
8463
- } : i.reference, w = await (s.getOffsetParent == null ? void 0 : s.getOffsetParent(l.floating)), _ = await (s.isElement == null ? void 0 : s.isElement(w)) ? await (s.getScale == null ? void 0 : s.getScale(w)) || {
8466
+ } : i.reference, C = await (s.getOffsetParent == null ? void 0 : s.getOffsetParent(l.floating)), _ = await (s.isElement == null ? void 0 : s.isElement(C)) ? await (s.getScale == null ? void 0 : s.getScale(C)) || {
8464
8467
  x: 1,
8465
8468
  y: 1
8466
8469
  } : {
@@ -8469,7 +8472,7 @@ async function My(e, t) {
8469
8472
  }, R = Zr(s.convertOffsetParentRelativeRectToViewportRelativeRect ? await s.convertOffsetParentRelativeRectToViewportRelativeRect({
8470
8473
  elements: l,
8471
8474
  rect: b,
8472
- offsetParent: w,
8475
+ offsetParent: C,
8473
8476
  strategy: c
8474
8477
  }) : b);
8475
8478
  return {
@@ -8506,7 +8509,7 @@ const Ny = 50, Ty = async (e, t, n) => {
8506
8509
  name: y,
8507
8510
  fn: b
8508
8511
  } = x, {
8509
- x: w,
8512
+ x: C,
8510
8513
  y: _,
8511
8514
  data: R,
8512
8515
  reset: j
@@ -8524,7 +8527,7 @@ const Ny = 50, Ty = async (e, t, n) => {
8524
8527
  floating: t
8525
8528
  }
8526
8529
  });
8527
- f = w ?? f, d = _ ?? d, g[y] = {
8530
+ f = C ?? f, d = _ ?? d, g[y] = {
8528
8531
  ...g[y],
8529
8532
  ...R
8530
8533
  }, j && p < Ny && (p++, typeof j == "object" && (j.placement && (m = j.placement), j.rects && (u = j.rects === !0 ? await i.getElementRects({
@@ -8564,10 +8567,10 @@ const Ny = 50, Ty = async (e, t, n) => {
8564
8567
  const d = Du(f), m = {
8565
8568
  x: n,
8566
8569
  y: r
8567
- }, p = Mi(o), g = Ei(p), h = await i.getDimensions(u), x = p === "y", y = x ? "top" : "left", b = x ? "bottom" : "right", w = x ? "clientHeight" : "clientWidth", _ = s.reference[g] + s.reference[p] - m[p] - s.floating[g], R = m[p] - s.reference[p], j = await (i.getOffsetParent == null ? void 0 : i.getOffsetParent(u));
8568
- let E = j ? j[w] : 0;
8569
- (!E || !await (i.isElement == null ? void 0 : i.isElement(j))) && (E = l.floating[w] || s.floating[g]);
8570
- const C = _ / 2 - R / 2, N = E / 2 - h[g] / 2 - 1, M = kt(d[y], N), A = kt(d[b], N), G = M, q = E - h[g] - A, L = E / 2 - h[g] / 2 + C, W = $s(G, L, q), O = !c.arrow && Cn(o) != null && L !== W && s.reference[g] / 2 - (L < G ? M : A) - h[g] / 2 < 0, U = O ? L < G ? L - G : L - q : 0;
8570
+ }, p = Mi(o), g = Ei(p), h = await i.getDimensions(u), x = p === "y", y = x ? "top" : "left", b = x ? "bottom" : "right", C = x ? "clientHeight" : "clientWidth", _ = s.reference[g] + s.reference[p] - m[p] - s.floating[g], R = m[p] - s.reference[p], j = await (i.getOffsetParent == null ? void 0 : i.getOffsetParent(u));
8571
+ let E = j ? j[C] : 0;
8572
+ (!E || !await (i.isElement == null ? void 0 : i.isElement(j))) && (E = l.floating[C] || s.floating[g]);
8573
+ const w = _ / 2 - R / 2, N = E / 2 - h[g] / 2 - 1, M = kt(d[y], N), A = kt(d[b], N), G = M, q = E - h[g] - A, L = E / 2 - h[g] / 2 + w, W = $s(G, L, q), O = !c.arrow && Cn(o) != null && L !== W && s.reference[g] / 2 - (L < G ? M : A) - h[g] / 2 < 0, U = O ? L < G ? L - G : L - q : 0;
8571
8574
  return {
8572
8575
  [p]: m[p] + U,
8573
8576
  data: {
@@ -8604,13 +8607,13 @@ const Ny = 50, Ty = async (e, t, n) => {
8604
8607
  } = yt(e, t);
8605
8608
  if ((n = s.arrow) != null && n.alignmentOffset)
8606
8609
  return {};
8607
- const y = bt(o), b = lt(l), w = bt(l) === l, _ = await (c.isRTL == null ? void 0 : c.isRTL(u.floating)), R = m || (w || !h ? [Qr(l)] : Cy(l)), j = g !== "none";
8610
+ const y = bt(o), b = lt(l), C = bt(l) === l, _ = await (c.isRTL == null ? void 0 : c.isRTL(u.floating)), R = m || (C || !h ? [Qr(l)] : Cy(l)), j = g !== "none";
8608
8611
  !m && j && R.push(...Ry(l, h, g, _));
8609
- const E = [l, ...R], C = await c.detectOverflow(t, x), N = [];
8612
+ const E = [l, ...R], w = await c.detectOverflow(t, x), N = [];
8610
8613
  let M = ((r = s.flip) == null ? void 0 : r.overflows) || [];
8611
- if (f && N.push(C[y]), d) {
8614
+ if (f && N.push(w[y]), d) {
8612
8615
  const L = wy(o, i, _);
8613
- N.push(C[L[0]], C[L[1]]);
8616
+ N.push(w[L[0]], w[L[1]]);
8614
8617
  }
8615
8618
  if (M = [...M, {
8616
8619
  placement: o,
@@ -8782,11 +8785,11 @@ const Ay = function(e) {
8782
8785
  fn: (y) => {
8783
8786
  let {
8784
8787
  x: b,
8785
- y: w
8788
+ y: C
8786
8789
  } = y;
8787
8790
  return {
8788
8791
  x: b,
8789
- y: w
8792
+ y: C
8790
8793
  };
8791
8794
  }
8792
8795
  },
@@ -8797,12 +8800,12 @@ const Ay = function(e) {
8797
8800
  }, d = await s.detectOverflow(t, u), m = lt(bt(o)), p = Ri(m);
8798
8801
  let g = f[p], h = f[m];
8799
8802
  if (i) {
8800
- const y = p === "y" ? "top" : "left", b = p === "y" ? "bottom" : "right", w = g + d[y], _ = g - d[b];
8801
- g = $s(w, g, _);
8803
+ const y = p === "y" ? "top" : "left", b = p === "y" ? "bottom" : "right", C = g + d[y], _ = g - d[b];
8804
+ g = $s(C, g, _);
8802
8805
  }
8803
8806
  if (l) {
8804
- const y = m === "y" ? "top" : "left", b = m === "y" ? "bottom" : "right", w = h + d[y], _ = h - d[b];
8805
- h = $s(w, h, _);
8807
+ const y = m === "y" ? "top" : "left", b = m === "y" ? "bottom" : "right", C = h + d[y], _ = h - d[b];
8808
+ h = $s(C, h, _);
8806
8809
  }
8807
8810
  const x = c.fn({
8808
8811
  ...t,
@@ -8850,12 +8853,12 @@ const Ay = function(e) {
8850
8853
  ...h
8851
8854
  };
8852
8855
  if (c) {
8853
- const w = m === "y" ? "height" : "width", _ = s.reference[m] - s.floating[w] + x.mainAxis, R = s.reference[m] + s.reference[w] - x.mainAxis;
8856
+ const C = m === "y" ? "height" : "width", _ = s.reference[m] - s.floating[C] + x.mainAxis, R = s.reference[m] + s.reference[C] - x.mainAxis;
8854
8857
  p < _ ? p = _ : p > R && (p = R);
8855
8858
  }
8856
8859
  if (u) {
8857
8860
  var y, b;
8858
- const w = m === "y" ? "width" : "height", _ = Lu.has(bt(o)), R = s.reference[d] - s.floating[w] + (_ && ((y = i.offset) == null ? void 0 : y[d]) || 0) + (_ ? 0 : x.crossAxis), j = s.reference[d] + s.reference[w] + (_ ? 0 : ((b = i.offset) == null ? void 0 : b[d]) || 0) - (_ ? x.crossAxis : 0);
8861
+ const C = m === "y" ? "width" : "height", _ = Lu.has(bt(o)), R = s.reference[d] - s.floating[C] + (_ && ((y = i.offset) == null ? void 0 : y[d]) || 0) + (_ ? 0 : x.crossAxis), j = s.reference[d] + s.reference[C] + (_ ? 0 : ((b = i.offset) == null ? void 0 : b[d]) || 0) - (_ ? x.crossAxis : 0);
8859
8862
  g < R ? g = R : g > j && (g = j);
8860
8863
  }
8861
8864
  return {
@@ -8885,15 +8888,15 @@ const Ay = function(e) {
8885
8888
  } = s.floating;
8886
8889
  let x, y;
8887
8890
  d === "top" || d === "bottom" ? (x = d, y = m === (await (i.isRTL == null ? void 0 : i.isRTL(l.floating)) ? "start" : "end") ? "left" : "right") : (y = d, x = m === "end" ? "top" : "bottom");
8888
- const b = h - f.top - f.bottom, w = g - f.left - f.right, _ = kt(h - f[x], b), R = kt(g - f[y], w), j = !t.middlewareData.shift;
8889
- let E = _, C = R;
8890
- if ((n = t.middlewareData.shift) != null && n.enabled.x && (C = w), (r = t.middlewareData.shift) != null && r.enabled.y && (E = b), j && !m) {
8891
+ const b = h - f.top - f.bottom, C = g - f.left - f.right, _ = kt(h - f[x], b), R = kt(g - f[y], C), j = !t.middlewareData.shift;
8892
+ let E = _, w = R;
8893
+ if ((n = t.middlewareData.shift) != null && n.enabled.x && (w = C), (r = t.middlewareData.shift) != null && r.enabled.y && (E = b), j && !m) {
8891
8894
  const M = $e(f.left, 0), A = $e(f.right, 0), G = $e(f.top, 0), q = $e(f.bottom, 0);
8892
- p ? C = g - 2 * (M !== 0 || A !== 0 ? M + A : $e(f.left, f.right)) : E = h - 2 * (G !== 0 || q !== 0 ? G + q : $e(f.top, f.bottom));
8895
+ p ? w = g - 2 * (M !== 0 || A !== 0 ? M + A : $e(f.left, f.right)) : E = h - 2 * (G !== 0 || q !== 0 ? G + q : $e(f.top, f.bottom));
8893
8896
  }
8894
8897
  await c({
8895
8898
  ...t,
8896
- availableWidth: C,
8899
+ availableWidth: w,
8897
8900
  availableHeight: E
8898
8901
  });
8899
8902
  const N = await i.getDimensions(l.floating);
@@ -9069,8 +9072,8 @@ function Ut(e, t, n, r) {
9069
9072
  const m = De(s), p = r && tt(r) ? De(r) : r;
9070
9073
  let g = m, h = Ds(g);
9071
9074
  for (; h && r && p !== g; ) {
9072
- const x = mn(h), y = h.getBoundingClientRect(), b = nt(h), w = y.left + (h.clientLeft + parseFloat(b.paddingLeft)) * x.x, _ = y.top + (h.clientTop + parseFloat(b.paddingTop)) * x.y;
9073
- c *= x.x, u *= x.y, f *= x.x, d *= x.y, c += w, u += _, g = De(h), h = Ds(g);
9075
+ const x = mn(h), y = h.getBoundingClientRect(), b = nt(h), C = y.left + (h.clientLeft + parseFloat(b.paddingLeft)) * x.x, _ = y.top + (h.clientTop + parseFloat(b.paddingTop)) * x.y;
9076
+ c *= x.x, u *= x.y, f *= x.x, d *= x.y, c += C, u += _, g = De(h), h = Ds(g);
9074
9077
  }
9075
9078
  }
9076
9079
  return Zr({
@@ -9328,7 +9331,7 @@ function rb(e, t) {
9328
9331
  } = u;
9329
9332
  if (l || t(), !m || !p)
9330
9333
  return;
9331
- const g = jr(d), h = jr(o.clientWidth - (f + m)), x = jr(o.clientHeight - (d + p)), y = jr(f), w = {
9334
+ const g = jr(d), h = jr(o.clientWidth - (f + m)), x = jr(o.clientHeight - (d + p)), y = jr(f), C = {
9332
9335
  rootMargin: -g + "px " + -h + "px " + -x + "px " + -y + "px",
9333
9336
  threshold: $e(0, kt(1, c)) || 1
9334
9337
  };
@@ -9346,12 +9349,12 @@ function rb(e, t) {
9346
9349
  }
9347
9350
  try {
9348
9351
  n = new IntersectionObserver(R, {
9349
- ...w,
9352
+ ...C,
9350
9353
  // Handle <iframe>s
9351
9354
  root: o.ownerDocument
9352
9355
  });
9353
9356
  } catch {
9354
- n = new IntersectionObserver(R, w);
9357
+ n = new IntersectionObserver(R, C);
9355
9358
  }
9356
9359
  n.observe(e);
9357
9360
  }
@@ -9376,8 +9379,8 @@ function ob(e, t, n, r) {
9376
9379
  i && (p = new ResizeObserver((y) => {
9377
9380
  let [b] = y;
9378
9381
  b && b.target === u && p && t && (p.unobserve(t), cancelAnimationFrame(m), m = requestAnimationFrame(() => {
9379
- var w;
9380
- (w = p) == null || w.observe(t);
9382
+ var C;
9383
+ (C = p) == null || C.observe(t);
9381
9384
  })), n();
9382
9385
  }), u && !c && p.observe(u), t && p.observe(t));
9383
9386
  let g, h = c ? Ut(e) : null;
@@ -9476,9 +9479,9 @@ function pb(e) {
9476
9479
  eo(m, r) || p(r);
9477
9480
  const [g, h] = v.useState(null), [x, y] = v.useState(null), b = v.useCallback((V) => {
9478
9481
  V !== j.current && (j.current = V, h(V));
9479
- }, []), w = v.useCallback((V) => {
9482
+ }, []), C = v.useCallback((V) => {
9480
9483
  V !== E.current && (E.current = V, y(V));
9481
- }, []), _ = s || g, R = i || x, j = v.useRef(null), E = v.useRef(null), C = v.useRef(f), N = c != null, M = ps(c), A = ps(o), G = ps(u), q = v.useCallback(() => {
9484
+ }, []), _ = s || g, R = i || x, j = v.useRef(null), E = v.useRef(null), w = v.useRef(f), N = c != null, M = ps(c), A = ps(o), G = ps(u), q = v.useCallback(() => {
9482
9485
  if (!j.current || !E.current)
9483
9486
  return;
9484
9487
  const V = {
@@ -9495,13 +9498,13 @@ function pb(e) {
9495
9498
  // setting it to `true` when `open === false` (must be specified).
9496
9499
  isPositioned: G.current !== !1
9497
9500
  };
9498
- L.current && !eo(C.current, P) && (C.current = P, co.flushSync(() => {
9501
+ L.current && !eo(w.current, P) && (w.current = P, co.flushSync(() => {
9499
9502
  d(P);
9500
9503
  }));
9501
9504
  });
9502
9505
  }, [m, t, n, A, G]);
9503
9506
  Dr(() => {
9504
- u === !1 && C.current.isPositioned && (C.current.isPositioned = !1, d((V) => ({
9507
+ u === !1 && w.current.isPositioned && (w.current.isPositioned = !1, d((V) => ({
9505
9508
  ...V,
9506
9509
  isPositioned: !1
9507
9510
  })));
@@ -9520,8 +9523,8 @@ function pb(e) {
9520
9523
  reference: j,
9521
9524
  floating: E,
9522
9525
  setReference: b,
9523
- setFloating: w
9524
- }), [b, w]), O = v.useMemo(() => ({
9526
+ setFloating: C
9527
+ }), [b, C]), O = v.useMemo(() => ({
9525
9528
  reference: _,
9526
9529
  floating: R
9527
9530
  }), [_, R]), U = v.useMemo(() => {
@@ -9668,7 +9671,7 @@ var Fi = "PopperContent", [Rb, Eb] = Ju(Fi), td = v.forwardRef(
9668
9671
  updatePositionStrategy: p = "optimized",
9669
9672
  onPlaced: g,
9670
9673
  ...h
9671
- } = e, x = Xu(Fi, n), [y, b] = v.useState(null), w = ve(t, (I) => b(I)), [_, R] = v.useState(null), j = Nu(_), E = j?.width ?? 0, C = j?.height ?? 0, N = r + (s !== "center" ? "-" + s : ""), M = typeof f == "number" ? f : { top: 0, right: 0, bottom: 0, left: 0, ...f }, A = Array.isArray(u) ? u : [u], G = A.length > 0, q = {
9674
+ } = e, x = Xu(Fi, n), [y, b] = v.useState(null), C = ve(t, (I) => b(I)), [_, R] = v.useState(null), j = Nu(_), E = j?.width ?? 0, w = j?.height ?? 0, N = r + (s !== "center" ? "-" + s : ""), M = typeof f == "number" ? f : { top: 0, right: 0, bottom: 0, left: 0, ...f }, A = Array.isArray(u) ? u : [u], G = A.length > 0, q = {
9672
9675
  padding: M,
9673
9676
  boundary: A.filter(Nb),
9674
9677
  // with `strategy: 'fixed'`, this is the only way to get it to respect boundaries
@@ -9684,7 +9687,7 @@ var Fi = "PopperContent", [Rb, Eb] = Ju(Fi), td = v.forwardRef(
9684
9687
  reference: x.anchor
9685
9688
  },
9686
9689
  middleware: [
9687
- hb({ mainAxis: o + C, alignmentAxis: i }),
9690
+ hb({ mainAxis: o + w, alignmentAxis: i }),
9688
9691
  c && vb({
9689
9692
  mainAxis: !0,
9690
9693
  crossAxis: !1,
@@ -9700,7 +9703,7 @@ var Fi = "PopperContent", [Rb, Eb] = Ju(Fi), td = v.forwardRef(
9700
9703
  }
9701
9704
  }),
9702
9705
  _ && Cb({ element: _, padding: l }),
9703
- Tb({ arrowWidth: E, arrowHeight: C }),
9706
+ Tb({ arrowWidth: E, arrowHeight: w }),
9704
9707
  m && wb({ strategy: "referenceHidden", ...q })
9705
9708
  ]
9706
9709
  }), [F, P] = od(O), ge = et(g);
@@ -9749,7 +9752,7 @@ var Fi = "PopperContent", [Rb, Eb] = Ju(Fi), td = v.forwardRef(
9749
9752
  "data-side": F,
9750
9753
  "data-align": P,
9751
9754
  ...h,
9752
- ref: w,
9755
+ ref: C,
9753
9756
  style: {
9754
9757
  ...h.style,
9755
9758
  // if the PopperContent hasn't been placed yet (not all measurements done)
@@ -9856,12 +9859,12 @@ var $b = v.forwardRef((e, t) => {
9856
9859
  defaultProp: l ?? null,
9857
9860
  onChange: c,
9858
9861
  caller: tr
9859
- }), [y, b] = v.useState(!1), w = et(u), _ = sd(n), R = v.useRef(!1), [j, E] = v.useState(0);
9862
+ }), [y, b] = v.useState(!1), C = et(u), _ = sd(n), R = v.useRef(!1), [j, E] = v.useState(0);
9860
9863
  return v.useEffect(() => {
9861
- const C = m.current;
9862
- if (C)
9863
- return C.addEventListener(gs, w), () => C.removeEventListener(gs, w);
9864
- }, [w]), /* @__PURE__ */ a.jsx(
9864
+ const w = m.current;
9865
+ if (w)
9866
+ return w.addEventListener(gs, C), () => w.removeEventListener(gs, C);
9867
+ }, [C]), /* @__PURE__ */ a.jsx(
9865
9868
  Ib,
9866
9869
  {
9867
9870
  scope: n,
@@ -9870,16 +9873,16 @@ var $b = v.forwardRef((e, t) => {
9870
9873
  loop: o,
9871
9874
  currentTabStopId: h,
9872
9875
  onItemFocus: v.useCallback(
9873
- (C) => x(C),
9876
+ (w) => x(w),
9874
9877
  [x]
9875
9878
  ),
9876
9879
  onItemShiftTab: v.useCallback(() => b(!0), []),
9877
9880
  onFocusableItemAdd: v.useCallback(
9878
- () => E((C) => C + 1),
9881
+ () => E((w) => w + 1),
9879
9882
  []
9880
9883
  ),
9881
9884
  onFocusableItemRemove: v.useCallback(
9882
- () => E((C) => C - 1),
9885
+ () => E((w) => w - 1),
9883
9886
  []
9884
9887
  ),
9885
9888
  children: /* @__PURE__ */ a.jsx(
@@ -9893,11 +9896,11 @@ var $b = v.forwardRef((e, t) => {
9893
9896
  onMouseDown: B(e.onMouseDown, () => {
9894
9897
  R.current = !0;
9895
9898
  }),
9896
- onFocus: B(e.onFocus, (C) => {
9899
+ onFocus: B(e.onFocus, (w) => {
9897
9900
  const N = !R.current;
9898
- if (C.target === C.currentTarget && N && !y) {
9901
+ if (w.target === w.currentTarget && N && !y) {
9899
9902
  const M = new CustomEvent(gs, kb);
9900
- if (C.currentTarget.dispatchEvent(M), !M.defaultPrevented) {
9903
+ if (w.currentTarget.dispatchEvent(M), !M.defaultPrevented) {
9901
9904
  const A = _().filter((O) => O.focusable), G = A.find((O) => O.active), q = A.find((O) => O.id === h), W = [G, q, ...A].filter(
9902
9905
  Boolean
9903
9906
  ).map((O) => O.ref.current);
@@ -9952,14 +9955,14 @@ var $b = v.forwardRef((e, t) => {
9952
9955
  if (y !== void 0) {
9953
9956
  if (x.metaKey || x.ctrlKey || x.altKey || x.shiftKey) return;
9954
9957
  x.preventDefault();
9955
- let w = m().filter((_) => _.focusable).map((_) => _.ref.current);
9956
- if (y === "last") w.reverse();
9958
+ let C = m().filter((_) => _.focusable).map((_) => _.ref.current);
9959
+ if (y === "last") C.reverse();
9957
9960
  else if (y === "prev" || y === "next") {
9958
- y === "prev" && w.reverse();
9959
- const _ = w.indexOf(x.currentTarget);
9960
- w = f.loop ? Vb(w, _ + 1) : w.slice(_ + 1);
9961
+ y === "prev" && C.reverse();
9962
+ const _ = C.indexOf(x.currentTarget);
9963
+ C = f.loop ? Vb(C, _ + 1) : C.slice(_ + 1);
9961
9964
  }
9962
- setTimeout(() => ud(w));
9965
+ setTimeout(() => ud(C));
9963
9966
  }
9964
9967
  }),
9965
9968
  children: typeof i == "function" ? i({ isCurrentTabStop: d, hasTabStop: h != null }) : i
@@ -10110,7 +10113,7 @@ var He = "MenuContent", [Qb, Li] = Zt(He), xd = v.forwardRef(
10110
10113
  onDismiss: p,
10111
10114
  disableOutsideScroll: g,
10112
10115
  ...h
10113
- } = e, x = It(He, n), y = or(He, n), b = rr(n), w = md(n), _ = Kb(n), [R, j] = v.useState(null), E = v.useRef(null), C = ve(t, E, x.onContentChange), N = v.useRef(0), M = v.useRef(""), A = v.useRef(0), G = v.useRef(null), q = v.useRef("right"), L = v.useRef(0), W = g ? xo : v.Fragment, O = g ? { as: tw, allowPinchZoom: !0 } : void 0, U = (F) => {
10116
+ } = e, x = It(He, n), y = or(He, n), b = rr(n), C = md(n), _ = Kb(n), [R, j] = v.useState(null), E = v.useRef(null), w = ve(t, E, x.onContentChange), N = v.useRef(0), M = v.useRef(""), A = v.useRef(0), G = v.useRef(null), q = v.useRef("right"), L = v.useRef(0), W = g ? xo : v.Fragment, O = g ? { as: tw, allowPinchZoom: !0 } : void 0, U = (F) => {
10114
10117
  const P = M.current + F, ge = _().filter((I) => !I.disabled), ce = document.activeElement, me = ge.find((I) => I.ref.current === ce)?.textValue, xe = ge.map((I) => I.textValue), K = mw(xe, P, me), re = ge.find((I) => I.textValue === K)?.ref.current;
10115
10118
  (function I(oe) {
10116
10119
  M.current = oe, window.clearTimeout(N.current), oe !== "" && (N.current = window.setTimeout(() => I(""), 1e3));
@@ -10168,7 +10171,7 @@ var He = "MenuContent", [Qb, Li] = Zt(He), xd = v.forwardRef(
10168
10171
  zb,
10169
10172
  {
10170
10173
  asChild: !0,
10171
- ...w,
10174
+ ...C,
10172
10175
  dir: y.dir,
10173
10176
  orientation: "vertical",
10174
10177
  loop: r,
@@ -10188,7 +10191,7 @@ var He = "MenuContent", [Qb, Li] = Zt(He), xd = v.forwardRef(
10188
10191
  dir: y.dir,
10189
10192
  ...b,
10190
10193
  ...h,
10191
- ref: C,
10194
+ ref: w,
10192
10195
  style: { outline: "none", ...h.style },
10193
10196
  onKeyDown: B(h.onKeyDown, (F) => {
10194
10197
  const ge = F.target.closest("[data-radix-menu-content]") === F.currentTarget, ce = F.ctrlKey || F.altKey || F.metaKey, me = F.key.length === 1;
@@ -10956,7 +10959,7 @@ var CC = [" ", "Enter", "ArrowUp", "ArrowDown"], SC = [" ", "Enter"], Yt = "Sele
10956
10959
  disabled: m,
10957
10960
  required: p,
10958
10961
  form: g
10959
- } = e, h = Io(t), [x, y] = v.useState(null), [b, w] = v.useState(null), [_, R] = v.useState(!1), j = yi(u), [E, C] = Tt({
10962
+ } = e, h = Io(t), [x, y] = v.useState(null), [b, C] = v.useState(null), [_, R] = v.useState(!1), j = yi(u), [E, w] = Tt({
10960
10963
  prop: r,
10961
10964
  defaultProp: o ?? !1,
10962
10965
  onChange: s,
@@ -10975,14 +10978,14 @@ var CC = [" ", "Enter", "ArrowUp", "ArrowDown"], SC = [" ", "Enter"], Yt = "Sele
10975
10978
  trigger: x,
10976
10979
  onTriggerChange: y,
10977
10980
  valueNode: b,
10978
- onValueNodeChange: w,
10981
+ onValueNodeChange: C,
10979
10982
  valueNodeHasChildren: _,
10980
10983
  onValueNodeHasChildrenChange: R,
10981
10984
  contentId: Qe(),
10982
10985
  value: N,
10983
10986
  onValueChange: M,
10984
10987
  open: E,
10985
- onOpenChange: C,
10988
+ onOpenChange: w,
10986
10989
  dir: j,
10987
10990
  triggerPointerDownPosRef: A,
10988
10991
  disabled: m,
@@ -11030,7 +11033,7 @@ nf.displayName = Yt;
11030
11033
  var rf = "SelectTrigger", of = v.forwardRef(
11031
11034
  (e, t) => {
11032
11035
  const { __scopeSelect: n, disabled: r = !1, ...o } = e, s = Io(n), i = At(rf, n), l = i.disabled || r, c = ve(t, i.onTriggerChange), u = Fo(n), f = v.useRef("touch"), [d, m, p] = Ef((h) => {
11033
- const x = u().filter((w) => !w.disabled), y = x.find((w) => w.value === i.value), b = Mf(x, h, y);
11036
+ const x = u().filter((C) => !C.disabled), y = x.find((C) => C.value === i.value), b = Mf(x, h, y);
11034
11037
  b !== void 0 && i.onValueChange(b.value);
11035
11038
  }), g = (h) => {
11036
11039
  l || (i.onOpenChange(!0), p()), h && (i.triggerPointerDownPosRef.current = {
@@ -11135,12 +11138,12 @@ var Ue = 10, [df, $t] = jn(Jt), TC = "SelectContentImpl", kC = /* @__PURE__ */ v
11135
11138
  avoidCollisions: x,
11136
11139
  //
11137
11140
  ...y
11138
- } = e, b = At(Jt, n), [w, _] = v.useState(null), [R, j] = v.useState(null), E = ve(t, (I) => _(I)), [C, N] = v.useState(null), [M, A] = v.useState(
11141
+ } = e, b = At(Jt, n), [C, _] = v.useState(null), [R, j] = v.useState(null), E = ve(t, (I) => _(I)), [w, N] = v.useState(null), [M, A] = v.useState(
11139
11142
  null
11140
11143
  ), G = Fo(n), [q, L] = v.useState(!1), W = v.useRef(!1);
11141
11144
  v.useEffect(() => {
11142
- if (w) return wi(w);
11143
- }, [w]), bi();
11145
+ if (C) return wi(C);
11146
+ }, [C]), bi();
11144
11147
  const O = v.useCallback(
11145
11148
  (I) => {
11146
11149
  const [oe, ...ne] = G().map(($) => $.ref.current), [fe] = ne.slice(-1), T = document.activeElement;
@@ -11149,15 +11152,15 @@ var Ue = 10, [df, $t] = jn(Jt), TC = "SelectContentImpl", kC = /* @__PURE__ */ v
11149
11152
  },
11150
11153
  [G, R]
11151
11154
  ), U = v.useCallback(
11152
- () => O([C, w]),
11153
- [O, C, w]
11155
+ () => O([w, C]),
11156
+ [O, w, C]
11154
11157
  );
11155
11158
  v.useEffect(() => {
11156
11159
  q && U();
11157
11160
  }, [q, U]);
11158
11161
  const { onOpenChange: V, triggerPointerDownPosRef: F } = b;
11159
11162
  v.useEffect(() => {
11160
- if (w) {
11163
+ if (C) {
11161
11164
  let I = { x: 0, y: 0 };
11162
11165
  const oe = (fe) => {
11163
11166
  I = {
@@ -11165,13 +11168,13 @@ var Ue = 10, [df, $t] = jn(Jt), TC = "SelectContentImpl", kC = /* @__PURE__ */ v
11165
11168
  y: Math.abs(Math.round(fe.pageY) - (F.current?.y ?? 0))
11166
11169
  };
11167
11170
  }, ne = (fe) => {
11168
- I.x <= 10 && I.y <= 10 ? fe.preventDefault() : w.contains(fe.target) || V(!1), document.removeEventListener("pointermove", oe), F.current = null;
11171
+ I.x <= 10 && I.y <= 10 ? fe.preventDefault() : C.contains(fe.target) || V(!1), document.removeEventListener("pointermove", oe), F.current = null;
11169
11172
  };
11170
11173
  return F.current !== null && (document.addEventListener("pointermove", oe), document.addEventListener("pointerup", ne, { capture: !0, once: !0 })), () => {
11171
11174
  document.removeEventListener("pointermove", oe), document.removeEventListener("pointerup", ne, { capture: !0 });
11172
11175
  };
11173
11176
  }
11174
- }, [w, V, F]), v.useEffect(() => {
11177
+ }, [C, V, F]), v.useEffect(() => {
11175
11178
  const I = () => V(!1);
11176
11179
  return window.addEventListener("blur", I), window.addEventListener("resize", I), () => {
11177
11180
  window.removeEventListener("blur", I), window.removeEventListener("resize", I);
@@ -11186,7 +11189,7 @@ var Ue = 10, [df, $t] = jn(Jt), TC = "SelectContentImpl", kC = /* @__PURE__ */ v
11186
11189
  (b.value !== void 0 && b.value === oe || fe) && (N(I), fe && (W.current = !0));
11187
11190
  },
11188
11191
  [b.value]
11189
- ), me = v.useCallback(() => w?.focus(), [w]), xe = v.useCallback(
11192
+ ), me = v.useCallback(() => C?.focus(), [C]), xe = v.useCallback(
11190
11193
  (I, oe, ne) => {
11191
11194
  const fe = !W.current && !ne;
11192
11195
  (b.value !== void 0 && b.value === oe || fe) && A(I);
@@ -11208,11 +11211,11 @@ var Ue = 10, [df, $t] = jn(Jt), TC = "SelectContentImpl", kC = /* @__PURE__ */ v
11208
11211
  df,
11209
11212
  {
11210
11213
  scope: n,
11211
- content: w,
11214
+ content: C,
11212
11215
  viewport: R,
11213
11216
  onViewportChange: j,
11214
11217
  itemRefCallback: ce,
11215
- selectedItem: C,
11218
+ selectedItem: w,
11216
11219
  onItemLeave: me,
11217
11220
  itemTextRefCallback: xe,
11218
11221
  focusSelectedItem: U,
@@ -11283,11 +11286,11 @@ var Ue = 10, [df, $t] = jn(Jt), TC = "SelectContentImpl", kC = /* @__PURE__ */ v
11283
11286
  );
11284
11287
  ff.displayName = TC;
11285
11288
  var PC = "SelectItemAlignedPosition", mf = v.forwardRef((e, t) => {
11286
- const { __scopeSelect: n, onPlaced: r, ...o } = e, s = At(Jt, n), i = $t(Jt, n), [l, c] = v.useState(null), [u, f] = v.useState(null), d = ve(t, (E) => f(E)), m = Fo(n), p = v.useRef(!1), g = v.useRef(!0), { viewport: h, selectedItem: x, selectedItemText: y, focusSelectedItem: b } = i, w = v.useCallback(() => {
11289
+ const { __scopeSelect: n, onPlaced: r, ...o } = e, s = At(Jt, n), i = $t(Jt, n), [l, c] = v.useState(null), [u, f] = v.useState(null), d = ve(t, (E) => f(E)), m = Fo(n), p = v.useRef(!1), g = v.useRef(!0), { viewport: h, selectedItem: x, selectedItemText: y, focusSelectedItem: b } = i, C = v.useCallback(() => {
11287
11290
  if (s.trigger && s.valueNode && l && u && h && x && y) {
11288
- const E = s.trigger.getBoundingClientRect(), C = u.getBoundingClientRect(), N = s.valueNode.getBoundingClientRect(), M = y.getBoundingClientRect();
11291
+ const E = s.trigger.getBoundingClientRect(), w = u.getBoundingClientRect(), N = s.valueNode.getBoundingClientRect(), M = y.getBoundingClientRect();
11289
11292
  if (s.dir !== "rtl") {
11290
- const T = M.left - C.left, $ = N.left - T, ue = E.left - $, we = E.width + ue, Ne = Math.max(we, C.width), Ae = window.innerWidth - Ue, ht = fl($, [
11293
+ const T = M.left - w.left, $ = N.left - T, ue = E.left - $, we = E.width + ue, Ne = Math.max(we, w.width), Ae = window.innerWidth - Ue, ht = fl($, [
11291
11294
  Ue,
11292
11295
  // Prevents the content from going off the starting edge of the
11293
11296
  // viewport. It may still go off the ending edge, but this can be
@@ -11298,7 +11301,7 @@ var PC = "SelectItemAlignedPosition", mf = v.forwardRef((e, t) => {
11298
11301
  ]);
11299
11302
  l.style.minWidth = we + "px", l.style.left = ht + "px";
11300
11303
  } else {
11301
- const T = C.right - M.right, $ = window.innerWidth - N.right - T, ue = window.innerWidth - E.right - $, we = E.width + ue, Ne = Math.max(we, C.width), Ae = window.innerWidth - Ue, ht = fl($, [
11304
+ const T = w.right - M.right, $ = window.innerWidth - N.right - T, ue = window.innerWidth - E.right - $, we = E.width + ue, Ne = Math.max(we, w.width), Ae = window.innerWidth - Ue, ht = fl($, [
11302
11305
  Ue,
11303
11306
  Math.max(Ue, Ae - Ne)
11304
11307
  ]);
@@ -11338,16 +11341,16 @@ var PC = "SelectItemAlignedPosition", mf = v.forwardRef((e, t) => {
11338
11341
  s.dir,
11339
11342
  r
11340
11343
  ]);
11341
- Re(() => w(), [w]);
11344
+ Re(() => C(), [C]);
11342
11345
  const [_, R] = v.useState();
11343
11346
  Re(() => {
11344
11347
  u && R(window.getComputedStyle(u).zIndex);
11345
11348
  }, [u]);
11346
11349
  const j = v.useCallback(
11347
11350
  (E) => {
11348
- E && g.current === !0 && (w(), b?.(), g.current = !1);
11351
+ E && g.current === !0 && (C(), b?.(), g.current = !1);
11349
11352
  },
11350
- [w, b]
11353
+ [C, b]
11351
11354
  );
11352
11355
  return /* @__PURE__ */ a.jsx(
11353
11356
  IC,
@@ -11456,8 +11459,8 @@ var [IC, Wi] = jn(Jt, {}), Bs = "SelectViewport", pf = v.forwardRef(
11456
11459
  if (p > 0) {
11457
11460
  const g = window.innerHeight - Ue * 2, h = parseFloat(d.style.minHeight), x = parseFloat(d.style.height), y = Math.max(h, x);
11458
11461
  if (y < g) {
11459
- const b = y + p, w = Math.min(g, b), _ = b - w;
11460
- d.style.height = w + "px", d.style.bottom === "0px" && (f.scrollTop = _ > 0 ? _ : 0, d.style.justifyContent = "flex-end");
11462
+ const b = y + p, C = Math.min(g, b), _ = b - C;
11463
+ d.style.height = C + "px", d.style.bottom === "0px" && (f.scrollTop = _ > 0 ? _ : 0, d.style.justifyContent = "flex-end");
11461
11464
  }
11462
11465
  }
11463
11466
  }
@@ -11510,7 +11513,7 @@ var so = "SelectItem", [LC, vf] = jn(so), xf = v.forwardRef(
11510
11513
  textId: h,
11511
11514
  isSelected: u,
11512
11515
  onItemTextChange: v.useCallback((b) => {
11513
- d((w) => w || (b?.textContent ?? "").trim());
11516
+ d((C) => C || (b?.textContent ?? "").trim());
11514
11517
  }, []),
11515
11518
  children: /* @__PURE__ */ a.jsx(
11516
11519
  Po.ItemSlot,
@@ -12113,12 +12116,12 @@ function vs(e, t) {
12113
12116
  return Number.isNaN(n) ? null : n;
12114
12117
  }
12115
12118
  function c0({ column: e }) {
12116
- const n = (e.columnDef.meta?.filterOperators ?? []).filter((C) => C in pl), r = l0(e), o = e.getFilterValue(), s = o?.operator ?? "_eq", [i, l] = ee(s), [c, u] = ee(() => !o || o.operator === "_null" || o.operator === "_between" ? "" : String(o.value ?? "")), [f, d] = ee(() => o?.operator === "_between" && Array.isArray(o.value) ? String(o.value[0] ?? "") : ""), [m, p] = ee(() => o?.operator === "_between" && Array.isArray(o.value) ? String(o.value[1] ?? "") : ""), g = Ie();
12119
+ const n = (e.columnDef.meta?.filterOperators ?? []).filter((w) => w in pl), r = l0(e), o = e.getFilterValue(), s = o?.operator ?? "_eq", [i, l] = ee(s), [c, u] = ee(() => !o || o.operator === "_null" || o.operator === "_between" ? "" : String(o.value ?? "")), [f, d] = ee(() => o?.operator === "_between" && Array.isArray(o.value) ? String(o.value[0] ?? "") : ""), [m, p] = ee(() => o?.operator === "_between" && Array.isArray(o.value) ? String(o.value[1] ?? "") : ""), g = Ie();
12117
12120
  Oe(() => () => {
12118
12121
  g.current && clearTimeout(g.current);
12119
12122
  }, []);
12120
- const h = (C, N) => {
12121
- if (g.current && clearTimeout(g.current), C === "_null") {
12123
+ const h = (w, N) => {
12124
+ if (g.current && clearTimeout(g.current), w === "_null") {
12122
12125
  e.setFilterValue({ operator: "_null", value: !0 });
12123
12126
  return;
12124
12127
  }
@@ -12128,11 +12131,11 @@ function c0({ column: e }) {
12128
12131
  return;
12129
12132
  }
12130
12133
  g.current = setTimeout(() => {
12131
- e.setFilterValue({ operator: C, value: M });
12134
+ e.setFilterValue({ operator: w, value: M });
12132
12135
  }, gl);
12133
- }, x = (C, N) => {
12136
+ }, x = (w, N) => {
12134
12137
  g.current && clearTimeout(g.current);
12135
- const M = vs(C, r), A = vs(N, r);
12138
+ const M = vs(w, r), A = vs(N, r);
12136
12139
  if (M === null || A === null) {
12137
12140
  e.setFilterValue(void 0);
12138
12141
  return;
@@ -12140,14 +12143,14 @@ function c0({ column: e }) {
12140
12143
  g.current = setTimeout(() => {
12141
12144
  e.setFilterValue({ operator: "_between", value: [M, A] });
12142
12145
  }, gl);
12143
- }, y = (C) => {
12144
- l(C), C === "_null" ? (u(""), d(""), p(""), e.setFilterValue({ operator: "_null", value: !0 })) : C === "_between" ? (u(""), f && m ? x(f, m) : e.setFilterValue(void 0)) : (d(""), p(""), c ? h(C, c) : e.setFilterValue(void 0));
12145
- }, b = (C) => {
12146
- u(C), h(i, C);
12147
- }, w = (C) => {
12148
- d(C), x(C, m);
12149
- }, _ = (C) => {
12150
- p(C), x(f, C);
12146
+ }, y = (w) => {
12147
+ l(w), w === "_null" ? (u(""), d(""), p(""), e.setFilterValue({ operator: "_null", value: !0 })) : w === "_between" ? (u(""), f && m ? x(f, m) : e.setFilterValue(void 0)) : (d(""), p(""), c ? h(w, c) : e.setFilterValue(void 0));
12148
+ }, b = (w) => {
12149
+ u(w), h(i, w);
12150
+ }, C = (w) => {
12151
+ d(w), x(w, m);
12152
+ }, _ = (w) => {
12153
+ p(w), x(f, w);
12151
12154
  }, R = () => {
12152
12155
  g.current && clearTimeout(g.current), l("_eq"), u(""), d(""), p(""), e.setFilterValue(void 0);
12153
12156
  };
@@ -12156,7 +12159,7 @@ function c0({ column: e }) {
12156
12159
  return /* @__PURE__ */ a.jsxs("div", { className: "flex flex-col gap-2 p-2 min-w-[220px]", children: [
12157
12160
  /* @__PURE__ */ a.jsxs(ft, { value: i, onValueChange: y, children: [
12158
12161
  /* @__PURE__ */ a.jsx(pt, { size: "sm", className: "w-full text-xs", children: /* @__PURE__ */ a.jsx(mt, {}) }),
12159
- /* @__PURE__ */ a.jsx(gt, { children: n.map((C) => /* @__PURE__ */ a.jsx(We, { value: C, children: pl[C] }, C)) })
12162
+ /* @__PURE__ */ a.jsx(gt, { children: n.map((w) => /* @__PURE__ */ a.jsx(We, { value: w, children: pl[w] }, w)) })
12160
12163
  ] }),
12161
12164
  !E && !j && /* @__PURE__ */ a.jsx(
12162
12165
  Ze,
@@ -12164,7 +12167,7 @@ function c0({ column: e }) {
12164
12167
  type: "number",
12165
12168
  placeholder: "Filter value...",
12166
12169
  value: c,
12167
- onChange: (C) => b(C.target.value),
12170
+ onChange: (w) => b(w.target.value),
12168
12171
  className: "h-8 text-xs",
12169
12172
  autoFocus: !0
12170
12173
  }
@@ -12176,7 +12179,7 @@ function c0({ column: e }) {
12176
12179
  type: "number",
12177
12180
  placeholder: "Min",
12178
12181
  value: f,
12179
- onChange: (C) => w(C.target.value),
12182
+ onChange: (w) => C(w.target.value),
12180
12183
  className: "h-8 text-xs",
12181
12184
  autoFocus: !0
12182
12185
  }
@@ -12187,7 +12190,7 @@ function c0({ column: e }) {
12187
12190
  type: "number",
12188
12191
  placeholder: "Max",
12189
12192
  value: m,
12190
- onChange: (C) => _(C.target.value),
12193
+ onChange: (w) => _(w.target.value),
12191
12194
  className: "h-8 text-xs"
12192
12195
  }
12193
12196
  )
@@ -12242,7 +12245,7 @@ function u0({ column: e }) {
12242
12245
  f(j), g(j, d);
12243
12246
  }, b = (j) => {
12244
12247
  m(j), g(u, j);
12245
- }, w = () => {
12248
+ }, C = () => {
12246
12249
  i("_eq"), c(""), f(""), m(""), e.setFilterValue(void 0);
12247
12250
  };
12248
12251
  if (n.length === 0) return null;
@@ -12287,7 +12290,7 @@ function u0({ column: e }) {
12287
12290
  variant: "ghost",
12288
12291
  size: "sm",
12289
12292
  className: "h-7 text-xs justify-start",
12290
- onClick: w,
12293
+ onClick: C,
12291
12294
  children: [
12292
12295
  /* @__PURE__ */ a.jsx(qe, { className: "size-3" }),
12293
12296
  "Clear filter"
@@ -12905,18 +12908,33 @@ function Yi(e, t) {
12905
12908
  o[n[s]] = xl(r[s]);
12906
12909
  return o;
12907
12910
  }
12911
+ function K0(e) {
12912
+ return JSON.stringify(e);
12913
+ }
12914
+ function U0(e) {
12915
+ return !e.isPolymorphic || !e.polymorphicTypeColumn || e.polymorphicTypeValue == null ? null : `{${e.polymorphicTypeColumn}: {_eq: ${K0(e.polymorphicTypeValue)}}}`;
12916
+ }
12917
+ function Y0(e, t, n = "$id") {
12918
+ const r = `{ ${e}: { _eq: ${n}}}`, o = U0(t);
12919
+ return o ? `{and: [${r}, ${o}]}` : r;
12920
+ }
12921
+ function J0(e, t, n) {
12922
+ return e?.find(
12923
+ (r) => r.destinationTable === t && r.destinationColumnNames?.[0] === n
12924
+ );
12925
+ }
12908
12926
  const yl = {
12909
12927
  String: ["_eq", "_neq", "_contains", "_starts_with", "_ends_with", "_null"],
12910
12928
  Int: ["_eq", "_neq", "_gt", "_gte", "_lt", "_lte", "_between", "_null"],
12911
12929
  Float: ["_eq", "_neq", "_gt", "_gte", "_lt", "_lte", "_between", "_null"],
12912
12930
  Boolean: ["_eq", "_null"],
12913
12931
  DateTime: ["_eq", "_neq", "_gt", "_gte", "_lt", "_lte", "_between", "_null"]
12914
- }, K0 = /^[_A-Za-z][_0-9A-Za-z]*$/, U0 = /^[_A-Za-z][_0-9A-Za-z]*!?$/;
12932
+ }, X0 = /^[_A-Za-z][_0-9A-Za-z]*$/, Q0 = /^[_A-Za-z][_0-9A-Za-z]*!?$/;
12915
12933
  function If(e) {
12916
- return typeof e == "string" && K0.test(e);
12934
+ return typeof e == "string" && X0.test(e);
12917
12935
  }
12918
- function Y0(e) {
12919
- return typeof e == "string" && U0.test(e);
12936
+ function Z0(e) {
12937
+ return typeof e == "string" && Q0.test(e);
12920
12938
  }
12921
12939
  function Af(e, t) {
12922
12940
  return typeof e == "string" && $f(t).includes(e);
@@ -12929,7 +12947,7 @@ function Of(e) {
12929
12947
  try {
12930
12948
  if (!e) return { variables: {}, param: "", filterText: "" };
12931
12949
  const [t, n, r, o] = JSON.parse(e);
12932
- return !If(t) || !Y0(o) || !Af(n, o) ? { variables: {}, param: "", filterText: "" } : { variables: { filter: r }, param: `, $filter: ${o}`, filterText: `{${t}: {${n}: $filter} }` };
12950
+ return !If(t) || !Z0(o) || !Af(n, o) ? { variables: {}, param: "", filterText: "" } : { variables: { filter: r }, param: `, $filter: ${o}`, filterText: `{${t}: {${n}: $filter} }` };
12933
12951
  } catch {
12934
12952
  return { variables: {}, param: "", filterText: "" };
12935
12953
  }
@@ -12939,7 +12957,7 @@ function bl(e) {
12939
12957
  const t = new Date(e);
12940
12958
  return t.toString() === "Invalid Date" || t < /* @__PURE__ */ new Date("1973-01-01") ? "" : t.toLocaleString();
12941
12959
  }
12942
- function J0(e, t) {
12960
+ function eS(e, t) {
12943
12961
  const n = t.primaryKeys ?? [];
12944
12962
  return n.length === 0 ? String(e?.id ?? "") : n.length === 1 ? String(e?.[n[0]] ?? "") : lr(e, t, 0);
12945
12963
  }
@@ -12980,10 +12998,10 @@ function Lf(e, t) {
12980
12998
  }
12981
12999
  return { variables: n, params: r, filterTexts: o };
12982
13000
  }
12983
- function X0(e) {
13001
+ function tS(e) {
12984
13002
  return e.length === 0 ? "" : JSON.stringify(e.map((t) => [t.id, t.value.operator, t.value.value]));
12985
13003
  }
12986
- function Q0(e) {
13004
+ function nS(e) {
12987
13005
  try {
12988
13006
  return e ? JSON.parse(e).map(([n, r, o]) => ({ id: n, value: { operator: r, value: o } })) : [];
12989
13007
  } catch {
@@ -13002,7 +13020,7 @@ function wn(e) {
13002
13020
  gqlType: n.get(r)?.paramType?.replace("!", "") ?? "String"
13003
13021
  }));
13004
13022
  }
13005
- function Z0(e, t) {
13023
+ function rS(e, t) {
13006
13024
  if (e == null) return null;
13007
13025
  switch (t) {
13008
13026
  case "Int": {
@@ -13021,17 +13039,17 @@ function Z0(e, t) {
13021
13039
  }
13022
13040
  function wl(e, t) {
13023
13041
  if (wn(t).length <= 1)
13024
- return { id: Z0(e, Vf(t)) };
13042
+ return { id: rS(e, Vf(t)) };
13025
13043
  const r = Yi(e, t);
13026
13044
  return r ? Ff(r, t)?.variables ?? {} : {};
13027
13045
  }
13028
- function eS(e, t) {
13046
+ function oS(e, t) {
13029
13047
  return t.map((n) => {
13030
13048
  const r = e.findTable(n.destinationTable), o = r?.labelColumn ?? "id", i = [...r?.primaryKeys?.length ? r.primaryKeys : ["id"]];
13031
13049
  return o && !i.includes(o) && i.push(o), `${n.fieldName ?? n.destinationTable} { ${i.join(" ")} }`;
13032
13050
  }).join(" ");
13033
13051
  }
13034
- function tS(e, t, n, r, o, s, i) {
13052
+ function sS(e, t, n, r, o, s, i) {
13035
13053
  if (!e || !t?.data) return null;
13036
13054
  const l = t.findTable(e.graphQlName);
13037
13055
  if (!l) return null;
@@ -13042,49 +13060,51 @@ function tS(e, t, n, r, o, s, i) {
13042
13060
  const h = [];
13043
13061
  m && h.push(m), h.push(...g), h.length > 1 ? m = `{and: [${h.join(", ")}]}` : h.length === 1 ? m = h[0] : m = "";
13044
13062
  const x = /* @__PURE__ */ new Set(), y = e.columns.filter((_) => _?.joinTable === void 0).map((_) => {
13045
- const R = l.singleJoins.find((C) => C.sourceColumnNames?.[0] === _.name);
13063
+ const R = l.singleJoins.find((w) => w.sourceColumnNames?.[0] === _.name);
13046
13064
  if (!R) return _;
13047
13065
  const E = t.findTable(R.destinationTable)?.labelColumn ?? "id";
13048
13066
  return { ..._, joinTable: R, joinLabelColumn: E };
13049
13067
  }).map((_) => {
13050
13068
  if (_?.joinTable) {
13051
13069
  x.add(_.name);
13052
- const R = t.findTable(_.joinTable.destinationTable), j = R?.primaryKeys?.length ? R.primaryKeys : _.joinTable.destinationColumnNames, E = _.joinLabelColumn ?? "id", C = E && !j.includes(E) ? ` label: ${E}` : "";
13053
- return j.length === 1 ? `${_.name} ${_.joinTable.destinationTable} { id: ${j[0]}${C} }` : `${_.name} ${_.joinTable.destinationTable} { ${j.join(" ")}${C} }`;
13070
+ const R = t.findTable(_.joinTable.destinationTable), j = R?.primaryKeys?.length ? R.primaryKeys : _.joinTable.destinationColumnNames, E = _.joinLabelColumn ?? "id", w = E && !j.includes(E) ? ` label: ${E}` : "";
13071
+ return j.length === 1 ? `${_.name} ${_.joinTable.destinationTable} { id: ${j[0]}${w} }` : `${_.name} ${_.joinTable.destinationTable} { ${j.join(" ")}${w} }`;
13054
13072
  }
13055
13073
  return _.name;
13056
- }).join(" "), b = eS(t, l.multiJoins), w = b ? `${y} ${b}` : y;
13074
+ }).join(" "), b = oS(t, l.multiJoins), C = b ? `${y} ${b}` : y;
13057
13075
  if (o && !s && !i)
13058
13076
  u.length <= 1 ? (d = `, $id: ${c}`, m = `{ ${f}: { _eq: $id}}`) : (d = `, ${u.map((R) => `$pk_${R.name}: ${R.gqlType}`).join(", ")}`, m = `{and: [${u.map((R) => `{${R.name}: {_eq: $pk_${R.name}}}`).join(", ")}]}`);
13059
13077
  else if (o && (i || s)) {
13060
13078
  const _ = i ?? l.singleJoins.find((E) => E.destinationTable === s)?.sourceColumnNames?.[0], R = e.columns.find((E) => E.name === _), j = R ? Df(R.paramType) : "Int";
13061
- if (_)
13062
- d = `, $id: ${j}` + d, m ? m = `{and: [${m}, { ${_}: { _eq: $id}} ]}` : m = `{ ${_}: { _eq: $id}}`;
13063
- else {
13064
- const E = t.findTable(s), C = wn(E);
13065
- if (C.length <= 1) {
13066
- const N = C[0]?.name ?? "id";
13079
+ if (_) {
13080
+ d = `, $id: ${j}` + d;
13081
+ const E = s ? J0(t.findTable(s)?.multiJoins, e.graphQlName, _) : void 0, w = Y0(_, E ?? {});
13082
+ m ? m = `{and: [${m}, ${w} ]}` : m = w;
13083
+ } else {
13084
+ const E = t.findTable(s), w = wn(E);
13085
+ if (w.length <= 1) {
13086
+ const N = w[0]?.name ?? "id";
13067
13087
  d = `, $id: ${j}` + d;
13068
13088
  const M = `{ ${s}: { ${N}: { _eq: $id}}}`;
13069
13089
  m = m ? `{and: [${m}, ${M} ]}` : M;
13070
13090
  } else {
13071
- d = `, ${C.map((q) => `$pk_${q.name}: ${q.gqlType}`).join(", ")}` + d;
13072
- const A = `{and: [${C.map((q) => `{${q.name}: {_eq: $pk_${q.name}}}`).join(", ")}]}`, G = `{ ${s}: ${A}}`;
13091
+ d = `, ${w.map((q) => `$pk_${q.name}: ${q.gqlType}`).join(", ")}` + d;
13092
+ const A = `{and: [${w.map((q) => `{${q.name}: {_eq: $pk_${q.name}}}`).join(", ")}]}`, G = `{ ${s}: ${A}}`;
13073
13093
  m = m ? `{and: [${m}, ${G} ]}` : G;
13074
13094
  }
13075
13095
  }
13076
13096
  }
13077
- return m && (m = `filter: ${m}`), `query Get${e.name}($sort: [${e.graphQlName}SortEnum!], $limit: Int, $offset: Int ${d}) { ${e.name}(sort: $sort limit: $limit offset: $offset ${m}) { total offset limit data {${w}}}}`;
13097
+ return m && (m = `filter: ${m}`), `query Get${e.name}($sort: [${e.graphQlName}SortEnum!], $limit: Int, $offset: Int ${d}) { ${e.name}(sort: $sort limit: $limit offset: $offset ${m}) { total offset limit data {${C}}}}`;
13078
13098
  }
13079
13099
  const Cl = ["Int", "Int!", "Float", "Float!"];
13080
13100
  function Sl(e, t) {
13081
13101
  return e ? !t || (t.primaryKeys?.length ?? 0) <= 1 ? String(e?.id ?? "") : lr(e, t, 0) : "";
13082
13102
  }
13083
- function nS(e, t) {
13103
+ function iS(e, t) {
13084
13104
  const n = t.fieldName ?? t.destinationTable;
13085
13105
  return e[n] ?? [];
13086
13106
  }
13087
- const rS = (e, t, n, r) => {
13107
+ const aS = (e, t, n, r) => {
13088
13108
  if (!e || !t) return [];
13089
13109
  const o = e.columns.map((i) => {
13090
13110
  const l = e.singleJoins.find((d) => d.sourceColumnNames?.[0] === i.name), c = l ? void 0 : e.singleJoins.find((d) => (d.sourceColumnNames ?? []).includes(i.name)), u = $f(i.paramType);
@@ -13109,17 +13129,17 @@ const rS = (e, t, n, r) => {
13109
13129
  cell: ({ row: y }) => {
13110
13130
  const b = y.original[d];
13111
13131
  if (!b) return /* @__PURE__ */ a.jsx(bn, { kind: "null" });
13112
- const w = Sl(b, m);
13132
+ const C = Sl(b, m);
13113
13133
  return /* @__PURE__ */ a.jsxs("span", { className: "group/fk inline-flex items-center gap-0.5", children: [
13114
13134
  /* @__PURE__ */ a.jsx(
13115
13135
  A0,
13116
13136
  {
13117
13137
  tableName: l.destinationTable,
13118
- recordId: w,
13138
+ recordId: C,
13119
13139
  filterColumn: l.destinationColumnNames[0],
13120
13140
  join: l,
13121
13141
  sourceRow: y.original,
13122
- children: /* @__PURE__ */ a.jsx(dn, { to: "/" + m?.name + "/" + w, className: "text-primary hover:text-primary/80 hover:underline", children: b?.label })
13142
+ children: /* @__PURE__ */ a.jsx(dn, { to: "/" + m?.name + "/" + C, className: "text-primary hover:text-primary/80 hover:underline", children: b?.label })
13123
13143
  }
13124
13144
  ),
13125
13145
  r && /* @__PURE__ */ a.jsx(
@@ -13131,7 +13151,7 @@ const rS = (e, t, n, r) => {
13131
13151
  onClick: (_) => {
13132
13152
  _.stopPropagation(), r({
13133
13153
  tableName: l.destinationTable,
13134
- filterId: w
13154
+ filterId: C
13135
13155
  });
13136
13156
  },
13137
13157
  "aria-label": "Open in side column",
@@ -13216,7 +13236,7 @@ const rS = (e, t, n, r) => {
13216
13236
  enableSorting: !1,
13217
13237
  enableHiding: !0,
13218
13238
  cell: ({ row: d }) => {
13219
- const m = J0(d.original, e), p = nS(d.original, i), g = p.length;
13239
+ const m = eS(d.original, e), p = iS(d.original, i), g = p.length;
13220
13240
  if (g === 0)
13221
13241
  return /* @__PURE__ */ a.jsx("span", { className: "text-muted-foreground", children: "—" });
13222
13242
  const h = p.slice(0, 10).map((y) => String(y[c] ?? "")).filter(Boolean), x = l?.label ?? i.destinationTable;
@@ -13279,7 +13299,7 @@ const rS = (e, t, n, r) => {
13279
13299
  });
13280
13300
  return [...o, ...s];
13281
13301
  };
13282
- function oS(e, t, n, r, o) {
13302
+ function lS(e, t, n, r, o) {
13283
13303
  if (!r && !o)
13284
13304
  return wl(e, t);
13285
13305
  const s = n.findTable(t.graphQlName) ?? t, i = o ?? s.singleJoins.find((f) => f.destinationTable === r)?.sourceColumnNames?.[0];
@@ -13293,8 +13313,8 @@ function oS(e, t, n, r, o) {
13293
13313
  const c = l ? wn(l)[0]?.gqlType : void 0;
13294
13314
  return { id: (c ? Cl.includes(c) : !0) ? Number(e) : e };
13295
13315
  }
13296
- function sS(e, t, n, r, o, s) {
13297
- const { search: i } = Vg(), l = Kn(), c = i.get("filter") ?? "", u = i.get("cf") ?? "", { variables: f } = Of(c), d = Ve(), m = Ke(), [p, g] = ee([]), [h, x] = ee(() => Q0(u)), [y, b] = ee(0), [w, _] = ee(50), R = Ie(e);
13316
+ function cS(e, t, n, r, o, s) {
13317
+ const { search: i } = Vg(), l = Kn(), c = i.get("filter") ?? "", u = i.get("cf") ?? "", { variables: f } = Of(c), d = Ve(), m = Ke(), [p, g] = ee([]), [h, x] = ee(() => nS(u)), [y, b] = ee(0), [C, _] = ee(50), R = Ie(e);
13298
13318
  e && e !== R.current && (R.current = e, p.length > 0 && g([]), h.length > 0 && x([]), y !== 0 && b(0));
13299
13319
  const j = le(() => {
13300
13320
  if (p.length > 0 && e) {
@@ -13304,29 +13324,29 @@ function sS(e, t, n, r, o, s) {
13304
13324
  }
13305
13325
  return e ? [`${e.columns.at(0)?.name ?? "id"}_asc`] : [];
13306
13326
  }, [p, e]), E = le(
13307
- () => tS(e, d, c, h, t, n, r),
13327
+ () => sS(e, d, c, h, t, n, r),
13308
13328
  [e, d, c, h, t, n, r]
13309
- ), C = le(
13329
+ ), w = le(
13310
13330
  () => e ? Lf(h, e).variables : {},
13311
13331
  [h, e]
13312
- ), N = y * w, M = le(() => ({
13332
+ ), N = y * C, M = le(() => ({
13313
13333
  sort: j,
13314
- limit: w,
13334
+ limit: C,
13315
13335
  offset: N,
13316
- ...t && e ? oS(t, e, d, n, r) : {},
13336
+ ...t && e ? lS(t, e, d, n, r) : {},
13317
13337
  ...f,
13318
- ...C
13319
- }), [j, w, N, t, e, d, n, r, f, C]), { isLoading: A, error: G, data: q } = ut({
13338
+ ...w
13339
+ }), [j, C, N, t, e, d, n, r, f, w]), { isLoading: A, error: G, data: q } = ut({
13320
13340
  queryKey: ["tableData", e?.name, E, M],
13321
13341
  queryFn: () => m.query(E, M),
13322
13342
  enabled: !!E && !!e && j.length > 0
13323
13343
  }), L = le(
13324
- () => e ? rS(e, d, o, s) : [],
13344
+ () => e ? aS(e, d, o, s) : [],
13325
13345
  [e, d, o, s]
13326
- ), W = q?.[e?.name ?? ""], O = W?.data ?? [], U = W?.total ?? 0, V = Math.max(1, Math.ceil(U / w)), F = se((K) => {
13346
+ ), W = q?.[e?.name ?? ""], O = W?.data ?? [], U = W?.total ?? 0, V = Math.max(1, Math.ceil(U / C)), F = se((K) => {
13327
13347
  const re = new URLSearchParams(), I = i.get("filter");
13328
13348
  I && re.set("filter", I);
13329
- const oe = X0(K);
13349
+ const oe = tS(K);
13330
13350
  oe && re.set("cf", oe);
13331
13351
  const ne = re.toString();
13332
13352
  l(ne ? `?${ne}` : "?");
@@ -13345,7 +13365,7 @@ function sS(e, t, n, r, o, s) {
13345
13365
  columnFilters: h,
13346
13366
  primaryKeys: xe,
13347
13367
  pageIndex: y,
13348
- pageSize: w,
13368
+ pageSize: C,
13349
13369
  pageCount: V,
13350
13370
  rows: O,
13351
13371
  loading: A,
@@ -13356,7 +13376,7 @@ function sS(e, t, n, r, o, s) {
13356
13376
  onPageSizeChange: me
13357
13377
  };
13358
13378
  }
13359
- function iS(e) {
13379
+ function uS(e) {
13360
13380
  return typeof e == "object" && e !== null;
13361
13381
  }
13362
13382
  function _l(e, t) {
@@ -13383,7 +13403,7 @@ function zf(e) {
13383
13403
  return p.length > 0 ? p : ["id"];
13384
13404
  }, [e]), s = (p) => {
13385
13405
  const g = {};
13386
- if (iS(p)) {
13406
+ if (uS(p)) {
13387
13407
  for (const x of o)
13388
13408
  g[x] = _l(p[x], r.get(x));
13389
13409
  return g;
@@ -13441,7 +13461,7 @@ function Ks({
13441
13461
  }
13442
13462
  );
13443
13463
  }
13444
- function aS({ anchorEl: e, onEdit: t, onDelete: n, onMouseEnter: r, onDismiss: o }) {
13464
+ function dS({ anchorEl: e, onEdit: t, onDelete: n, onMouseEnter: r, onDismiss: o }) {
13445
13465
  const s = Ie(null);
13446
13466
  return Oe(() => {
13447
13467
  const i = s.current;
@@ -13493,7 +13513,7 @@ function aS({ anchorEl: e, onEdit: t, onDelete: n, onMouseEnter: r, onDismiss: o
13493
13513
  }
13494
13514
  );
13495
13515
  }
13496
- const jl = 60, lS = 450, cS = 150, Us = "bifrost-col-sizes:";
13516
+ const jl = 60, fS = 450, mS = 150, Us = "bifrost-col-sizes:";
13497
13517
  function Rl(e) {
13498
13518
  try {
13499
13519
  const t = localStorage.getItem(Us + e);
@@ -13502,14 +13522,14 @@ function Rl(e) {
13502
13522
  return {};
13503
13523
  }
13504
13524
  }
13505
- function uS(e, t) {
13525
+ function pS(e, t) {
13506
13526
  try {
13507
13527
  Object.keys(t).length === 0 ? localStorage.removeItem(Us + e) : localStorage.setItem(Us + e, JSON.stringify(t));
13508
13528
  } catch {
13509
13529
  }
13510
13530
  }
13511
- const dS = [10, 20, 30, 50, 100], xs = -1;
13512
- function fS({
13531
+ const gS = [10, 20, 30, 50, 100], xs = -1;
13532
+ function hS({
13513
13533
  columns: e,
13514
13534
  data: t,
13515
13535
  tableName: n,
@@ -13529,11 +13549,11 @@ function fS({
13529
13549
  onPageSizeChange: x,
13530
13550
  onEditRow: y,
13531
13551
  onDeleteRow: b,
13532
- onDeleteSelected: w
13552
+ onDeleteSelected: C
13533
13553
  }) {
13534
13554
  const [_, R] = ee(null), j = Ie(null), E = se((T, $) => {
13535
13555
  j.current && (clearTimeout(j.current), j.current = null), R({ rowId: T, el: $ });
13536
- }, []), C = se(() => {
13556
+ }, []), w = se(() => {
13537
13557
  j.current && clearTimeout(j.current), j.current = setTimeout(() => R(null), 150);
13538
13558
  }, []), N = se(() => {
13539
13559
  j.current && (clearTimeout(j.current), j.current = null);
@@ -13541,7 +13561,7 @@ function fS({
13541
13561
  () => n ? Rl(n) : {}
13542
13562
  ), [O, U] = ee(!0), V = Ie(null);
13543
13563
  Oe(() => {
13544
- n && uS(n, L);
13564
+ n && pS(n, L);
13545
13565
  }, [n, L]);
13546
13566
  const F = Ie(n);
13547
13567
  if (n && n !== F.current) {
@@ -13560,7 +13580,7 @@ function fS({
13560
13580
  const ht = Ae.scrollWidth + 4;
13561
13581
  ht > we && (we = ht);
13562
13582
  });
13563
- const Ne = Math.min(we, lS);
13583
+ const Ne = Math.min(we, fS);
13564
13584
  W((Ae) => ({ ...Ae, [T]: Ne }));
13565
13585
  }, []), ge = se(() => {
13566
13586
  W({});
@@ -13622,7 +13642,7 @@ function fS({
13622
13642
  },
13623
13643
  defaultColumn: {
13624
13644
  minSize: jl,
13625
- size: cS
13645
+ size: mS
13626
13646
  },
13627
13647
  columnResizeMode: "onChange",
13628
13648
  enableColumnResizing: !0,
@@ -13648,14 +13668,14 @@ function fS({
13648
13668
  manualFiltering: !0,
13649
13669
  manualPagination: !0
13650
13670
  }), re = Object.keys(G).length, I = se(() => {
13651
- if (!w) return;
13671
+ if (!C) return;
13652
13672
  const T = [];
13653
13673
  for (const $ of K.getSelectedRowModel().rows) {
13654
13674
  const ue = ao($.original, { primaryKeys: f });
13655
13675
  ue && T.push(ue);
13656
13676
  }
13657
- T.length > 0 && w(T);
13658
- }, [K, w, f]), oe = se((T) => {
13677
+ T.length > 0 && C(T);
13678
+ }, [K, C, f]), oe = se((T) => {
13659
13679
  const $ = K.getRow(T);
13660
13680
  return $ ? ao($.original, { primaryKeys: f }) : null;
13661
13681
  }, [K, f]), ne = se(() => {
@@ -13669,7 +13689,7 @@ function fS({
13669
13689
  }, [_, b, oe]);
13670
13690
  return /* @__PURE__ */ a.jsxs("div", { className: "flex flex-col w-full min-h-0 flex-1", children: [
13671
13691
  /* @__PURE__ */ a.jsxs("div", { className: "flex items-center justify-between py-1 px-2", children: [
13672
- /* @__PURE__ */ a.jsx("div", { className: "flex items-center gap-2", children: re > 0 && w && /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
13692
+ /* @__PURE__ */ a.jsx("div", { className: "flex items-center gap-2", children: re > 0 && C && /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
13673
13693
  /* @__PURE__ */ a.jsxs("span", { className: "text-xs text-muted-foreground", children: [
13674
13694
  re,
13675
13695
  " selected"
@@ -13737,7 +13757,7 @@ function fS({
13737
13757
  className: m ? "cursor-pointer group/row" : "group/row",
13738
13758
  onClick: m ? () => m($ ? null : T.id) : void 0,
13739
13759
  onMouseEnter: (ue) => E(T.id, ue.currentTarget),
13740
- onMouseLeave: C,
13760
+ onMouseLeave: w,
13741
13761
  children: T.getVisibleCells().map((ue) => /* @__PURE__ */ a.jsx(
13742
13762
  Ir,
13743
13763
  {
@@ -13753,13 +13773,13 @@ function fS({
13753
13773
  }) })
13754
13774
  ] }),
13755
13775
  _ && (y || b) && /* @__PURE__ */ a.jsx(
13756
- aS,
13776
+ dS,
13757
13777
  {
13758
13778
  anchorEl: _.el,
13759
13779
  onEdit: y ? ne : void 0,
13760
13780
  onDelete: b ? fe : void 0,
13761
13781
  onMouseEnter: N,
13762
- onDismiss: C
13782
+ onDismiss: w
13763
13783
  }
13764
13784
  )
13765
13785
  ] }),
@@ -13778,7 +13798,7 @@ function fS({
13778
13798
  /* @__PURE__ */ a.jsx(pt, { size: "sm", className: "w-auto h-7 text-xs", "aria-label": "Rows per page", children: /* @__PURE__ */ a.jsx(mt, { children: O ? "Fit" : s }) }),
13779
13799
  /* @__PURE__ */ a.jsxs(gt, { children: [
13780
13800
  /* @__PURE__ */ a.jsx(We, { value: String(xs), children: "Fit" }),
13781
- dS.map((T) => /* @__PURE__ */ a.jsx(We, { value: String(T), children: T }, T))
13801
+ gS.map((T) => /* @__PURE__ */ a.jsx(We, { value: String(T), children: T }, T))
13782
13802
  ] })
13783
13803
  ]
13784
13804
  }
@@ -13845,12 +13865,12 @@ function fS({
13845
13865
  }
13846
13866
  const cr = v.forwardRef(({ ...e }, t) => /* @__PURE__ */ a.jsx(wu, { "data-slot": "dialog", ...e }));
13847
13867
  cr.displayName = "Dialog";
13848
- const mS = v.forwardRef(({ ...e }, t) => /* @__PURE__ */ a.jsx(fy, { "data-slot": "dialog-trigger", ...e }));
13849
- mS.displayName = "DialogTrigger";
13868
+ const vS = v.forwardRef(({ ...e }, t) => /* @__PURE__ */ a.jsx(fy, { "data-slot": "dialog-trigger", ...e }));
13869
+ vS.displayName = "DialogTrigger";
13850
13870
  const Bf = v.forwardRef(({ ...e }, t) => /* @__PURE__ */ a.jsx(Cu, { "data-slot": "dialog-portal", ...e }));
13851
13871
  Bf.displayName = "DialogPortal";
13852
- const pS = v.forwardRef(({ ...e }, t) => /* @__PURE__ */ a.jsx(bo, { "data-slot": "dialog-close", ...e }));
13853
- pS.displayName = "DialogClose";
13872
+ const xS = v.forwardRef(({ ...e }, t) => /* @__PURE__ */ a.jsx(bo, { "data-slot": "dialog-close", ...e }));
13873
+ xS.displayName = "DialogClose";
13854
13874
  const Hf = v.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ a.jsx(
13855
13875
  Su,
13856
13876
  {
@@ -13941,7 +13961,7 @@ const Oo = v.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ a.jsx(
13941
13961
  }
13942
13962
  ));
13943
13963
  Oo.displayName = "DialogDescription";
13944
- function gS({
13964
+ function yS({
13945
13965
  open: e,
13946
13966
  onOpenChange: t,
13947
13967
  title: n,
@@ -13979,17 +13999,17 @@ function gS({
13979
13999
  ] })
13980
14000
  ] }) });
13981
14001
  }
13982
- function hS({
14002
+ function bS({
13983
14003
  ...e
13984
14004
  }) {
13985
14005
  return /* @__PURE__ */ a.jsx(wu, { "data-slot": "sheet", ...e });
13986
14006
  }
13987
- function vS({
14007
+ function wS({
13988
14008
  ...e
13989
14009
  }) {
13990
14010
  return /* @__PURE__ */ a.jsx(Cu, { "data-slot": "sheet-portal", ...e });
13991
14011
  }
13992
- function xS({
14012
+ function CS({
13993
14013
  className: e,
13994
14014
  ...t
13995
14015
  }) {
@@ -14005,14 +14025,14 @@ function xS({
14005
14025
  }
14006
14026
  );
14007
14027
  }
14008
- function yS({
14028
+ function SS({
14009
14029
  className: e,
14010
14030
  children: t,
14011
14031
  side: n = "right",
14012
14032
  ...r
14013
14033
  }) {
14014
- return /* @__PURE__ */ a.jsxs(vS, { children: [
14015
- /* @__PURE__ */ a.jsx(xS, {}),
14034
+ return /* @__PURE__ */ a.jsxs(wS, { children: [
14035
+ /* @__PURE__ */ a.jsx(CS, {}),
14016
14036
  /* @__PURE__ */ a.jsxs(
14017
14037
  _u,
14018
14038
  {
@@ -14045,7 +14065,7 @@ function yS({
14045
14065
  )
14046
14066
  ] });
14047
14067
  }
14048
- function bS({ className: e, ...t }) {
14068
+ function _S({ className: e, ...t }) {
14049
14069
  return /* @__PURE__ */ a.jsx(
14050
14070
  "div",
14051
14071
  {
@@ -14055,7 +14075,7 @@ function bS({ className: e, ...t }) {
14055
14075
  }
14056
14076
  );
14057
14077
  }
14058
- function wS({
14078
+ function jS({
14059
14079
  className: e,
14060
14080
  ...t
14061
14081
  }) {
@@ -14068,7 +14088,7 @@ function wS({
14068
14088
  }
14069
14089
  );
14070
14090
  }
14071
- function CS({
14091
+ function RS({
14072
14092
  className: e,
14073
14093
  ...t
14074
14094
  }) {
@@ -14081,14 +14101,14 @@ function CS({
14081
14101
  }
14082
14102
  );
14083
14103
  }
14084
- const SS = {
14104
+ const ES = {
14085
14105
  json: Ic,
14086
14106
  xml: $c,
14087
14107
  "php-serialized": zn,
14088
14108
  binary: po,
14089
14109
  longtext: Ur,
14090
14110
  text: Ur
14091
- }, _S = {
14111
+ }, MS = {
14092
14112
  json: "JSON",
14093
14113
  xml: "XML",
14094
14114
  "php-serialized": "PHP Serialized",
@@ -14096,7 +14116,7 @@ const SS = {
14096
14116
  longtext: "Text",
14097
14117
  text: "Text"
14098
14118
  };
14099
- function jS(e, t) {
14119
+ function NS(e, t) {
14100
14120
  if (t === "json")
14101
14121
  try {
14102
14122
  return JSON.stringify(JSON.parse(e), null, 2);
@@ -14106,7 +14126,7 @@ function jS(e, t) {
14106
14126
  return t === "xml" ? e.replace(/>\s*</g, `>
14107
14127
  <`).trim() : e;
14108
14128
  }
14109
- function RS({
14129
+ function TS({
14110
14130
  target: e,
14111
14131
  onClose: t,
14112
14132
  onNavigate: n,
@@ -14114,7 +14134,7 @@ function RS({
14114
14134
  canNavigatePrev: o,
14115
14135
  canNavigateNext: s
14116
14136
  }) {
14117
- const [i, l] = ee(!1), [c, u] = ee(!1), [f, d] = ee(""), [m, p] = ee(!1), g = Ie(null), h = e?.value ?? "", x = Ki(h, e?.dbType), y = SS[x], b = jS(h, x);
14137
+ const [i, l] = ee(!1), [c, u] = ee(!1), [f, d] = ee(""), [m, p] = ee(!1), g = Ie(null), h = e?.value ?? "", x = Ki(h, e?.dbType), y = ES[x], b = NS(h, x);
14118
14138
  Oe(() => {
14119
14139
  u(!1), d(""), p(!1);
14120
14140
  }, [e?.rowIndex, e?.columnName]), Oe(() => {
@@ -14124,7 +14144,7 @@ function RS({
14124
14144
  };
14125
14145
  return window.addEventListener("keydown", L), () => window.removeEventListener("keydown", L);
14126
14146
  }, [e, c, o, s, n]);
14127
- const w = se(() => {
14147
+ const C = se(() => {
14128
14148
  navigator.clipboard.writeText(h), p(!0), setTimeout(() => p(!1), 1500);
14129
14149
  }, [h]), _ = se(() => {
14130
14150
  d(b), u(!0), requestAnimationFrame(() => g.current?.focus());
@@ -14140,10 +14160,10 @@ function RS({
14140
14160
  }
14141
14161
  else x === "xml" && d(f.replace(/>\s*</g, `>
14142
14162
  <`).trim());
14143
- }, [f, x]), C = x === "json" || x === "xml", N = !e?.isReadOnly && x !== "binary", M = /* @__PURE__ */ a.jsxs("div", { className: "flex items-center gap-2 min-w-0", children: [
14163
+ }, [f, x]), w = x === "json" || x === "xml", N = !e?.isReadOnly && x !== "binary", M = /* @__PURE__ */ a.jsxs("div", { className: "flex items-center gap-2 min-w-0", children: [
14144
14164
  /* @__PURE__ */ a.jsx(y, { className: "size-4 text-muted-foreground shrink-0" }),
14145
14165
  /* @__PURE__ */ a.jsx("span", { className: "truncate font-semibold text-sm", children: e?.columnLabel }),
14146
- /* @__PURE__ */ a.jsx("span", { className: "text-xs text-muted-foreground shrink-0", children: _S[x] }),
14166
+ /* @__PURE__ */ a.jsx("span", { className: "text-xs text-muted-foreground shrink-0", children: MS[x] }),
14147
14167
  /* @__PURE__ */ a.jsxs("span", { className: "text-xs text-muted-foreground shrink-0", children: [
14148
14168
  h.length,
14149
14169
  " chars"
@@ -14156,7 +14176,7 @@ function RS({
14156
14176
  variant: "ghost",
14157
14177
  size: "sm",
14158
14178
  className: "h-7 text-xs px-2",
14159
- onClick: w,
14179
+ onClick: C,
14160
14180
  children: [
14161
14181
  m ? /* @__PURE__ */ a.jsx(go, { className: "size-3" }) : /* @__PURE__ */ a.jsx(kh, { className: "size-3" }),
14162
14182
  m ? "Copied" : "Copy"
@@ -14177,7 +14197,7 @@ function RS({
14177
14197
  ]
14178
14198
  }
14179
14199
  ),
14180
- c && C && /* @__PURE__ */ a.jsxs(
14200
+ c && w && /* @__PURE__ */ a.jsxs(
14181
14201
  Y,
14182
14202
  {
14183
14203
  type: "button",
@@ -14252,12 +14272,12 @@ function RS({
14252
14272
  ] })
14253
14273
  ] }) : /* @__PURE__ */ a.jsx("pre", { className: "text-xs font-mono leading-relaxed whitespace-pre-wrap break-all", children: b }) }), q = !!e;
14254
14274
  return /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
14255
- /* @__PURE__ */ a.jsx(hS, { open: q && !i, onOpenChange: (L) => {
14275
+ /* @__PURE__ */ a.jsx(bS, { open: q && !i, onOpenChange: (L) => {
14256
14276
  L || t();
14257
- }, children: /* @__PURE__ */ a.jsxs(yS, { side: "right", className: "w-[480px] max-w-[90vw]", children: [
14258
- /* @__PURE__ */ a.jsxs(bS, { children: [
14259
- /* @__PURE__ */ a.jsx(wS, { children: M }),
14260
- /* @__PURE__ */ a.jsx(CS, { className: "sr-only", children: "Content viewer panel" })
14277
+ }, children: /* @__PURE__ */ a.jsxs(SS, { side: "right", className: "w-[480px] max-w-[90vw]", children: [
14278
+ /* @__PURE__ */ a.jsxs(_S, { children: [
14279
+ /* @__PURE__ */ a.jsx(jS, { children: M }),
14280
+ /* @__PURE__ */ a.jsx(RS, { className: "sr-only", children: "Content viewer panel" })
14261
14281
  ] }),
14262
14282
  A,
14263
14283
  G
@@ -14284,12 +14304,12 @@ function Ji({ table: e, id: t, tableFilter: n, filterColumn: r, selectedRowId: o
14284
14304
  }, []), b = se((ce, me) => {
14285
14305
  g(ce), m(me);
14286
14306
  }, []), {
14287
- columns: w,
14307
+ columns: C,
14288
14308
  sorting: _,
14289
14309
  columnFilters: R,
14290
14310
  pageIndex: j,
14291
14311
  pageSize: E,
14292
- pageCount: C,
14312
+ pageCount: w,
14293
14313
  rows: N,
14294
14314
  loading: M,
14295
14315
  error: A,
@@ -14297,7 +14317,7 @@ function Ji({ table: e, id: t, tableFilter: n, filterColumn: r, selectedRowId: o
14297
14317
  onColumnFiltersChange: q,
14298
14318
  onPageIndexChange: L,
14299
14319
  onPageSizeChange: W
14300
- } = sS(e, t, n, r, b, i), O = se(async () => {
14320
+ } = cS(e, t, n, r, b, i), O = se(async () => {
14301
14321
  if (u)
14302
14322
  try {
14303
14323
  u.type === "single" ? await l.deleteRow(u.pk) : await l.deleteRows(u.pks), f(null);
@@ -14326,12 +14346,12 @@ function Ji({ table: e, id: t, tableFilter: n, filterColumn: r, selectedRowId: o
14326
14346
  const ge = e.isEditable !== !1;
14327
14347
  return /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
14328
14348
  /* @__PURE__ */ a.jsx(
14329
- fS,
14349
+ hS,
14330
14350
  {
14331
- columns: w,
14351
+ columns: C,
14332
14352
  data: N,
14333
14353
  tableName: e.name,
14334
- pageCount: C,
14354
+ pageCount: w,
14335
14355
  pageIndex: j,
14336
14356
  pageSize: E,
14337
14357
  sorting: _,
@@ -14351,7 +14371,7 @@ function Ji({ table: e, id: t, tableFilter: n, filterColumn: r, selectedRowId: o
14351
14371
  }
14352
14372
  ),
14353
14373
  /* @__PURE__ */ a.jsx(
14354
- gS,
14374
+ yS,
14355
14375
  {
14356
14376
  open: u !== null,
14357
14377
  onOpenChange: (ce) => {
@@ -14369,7 +14389,7 @@ function Ji({ table: e, id: t, tableFilter: n, filterColumn: r, selectedRowId: o
14369
14389
  }
14370
14390
  ),
14371
14391
  /* @__PURE__ */ a.jsx(
14372
- RS,
14392
+ TS,
14373
14393
  {
14374
14394
  target: V,
14375
14395
  onClose: F,
@@ -14380,7 +14400,7 @@ function Ji({ table: e, id: t, tableFilter: n, filterColumn: r, selectedRowId: o
14380
14400
  )
14381
14401
  ] });
14382
14402
  }
14383
- const El = ["Int", "Int!", "Float", "Float!", "BigInt", "BigInt!"], ES = ["Boolean", "Boolean!"];
14403
+ const El = ["Int", "Int!", "Float", "Float!", "BigInt", "BigInt!"], kS = ["Boolean", "Boolean!"];
14384
14404
  function Ml(e, t, n, r, o) {
14385
14405
  const s = { ...e };
14386
14406
  for (const { column: i } of t) {
@@ -14388,7 +14408,7 @@ function Ml(e, t, n, r, o) {
14388
14408
  const l = s[i.name];
14389
14409
  s[i.name] = l != null ? +l : void 0;
14390
14410
  }
14391
- ES.some((l) => l === i.paramType) && (s[i.name] = !!s[i.name]);
14411
+ kS.some((l) => l === i.paramType) && (s[i.name] = !!s[i.name]);
14392
14412
  }
14393
14413
  if (!o && r)
14394
14414
  for (const i of n) {
@@ -14428,12 +14448,12 @@ function qf(e, t, n, r) {
14428
14448
  error: g
14429
14449
  };
14430
14450
  }
14431
- const MS = /* @__PURE__ */ new Set(["Int", "Int!", "Float", "Float!"]);
14432
- function NS(e) {
14451
+ const PS = /* @__PURE__ */ new Set(["Int", "Int!", "Float", "Float!"]);
14452
+ function FS(e) {
14433
14453
  return new Set((e.manyToManyJoins ?? []).map((t) => t.junctionTable));
14434
14454
  }
14435
14455
  function Wf(e) {
14436
- const t = NS(e), n = e.multiJoins.filter((o) => !t.has(o.destinationTable)).map((o) => ({ kind: "child", key: `child:${o.fieldName ?? o.destinationTable}`, join: o })), r = (e.manyToManyJoins ?? []).map((o) => ({
14456
+ const t = FS(e), n = e.multiJoins.filter((o) => !t.has(o.destinationTable)).map((o) => ({ kind: "child", key: `child:${o.fieldName ?? o.destinationTable}`, join: o })), r = (e.manyToManyJoins ?? []).map((o) => ({
14437
14457
  kind: "m2m",
14438
14458
  key: `m2m:${o.junctionTable}:${o.targetTable}`,
14439
14459
  m2m: o
@@ -14444,29 +14464,29 @@ function Kf(e, t) {
14444
14464
  const n = /* @__PURE__ */ new Set([...t.junctionSourceColumnNames, ...t.junctionTargetColumnNames]);
14445
14465
  return e.columns.filter((r) => !r.isPrimaryKey && !n.has(r.name));
14446
14466
  }
14447
- function TS(e, t) {
14448
- return t && MS.has(t) ? Number(e) : e;
14467
+ function IS(e, t) {
14468
+ return t && PS.has(t) ? Number(e) : e;
14449
14469
  }
14450
- function kS(e, t, n, r) {
14470
+ function AS(e, t, n, r) {
14451
14471
  const o = n.junctionSourceColumnNames[0], s = e.columns.find((h) => h.name === o), i = s ? s.paramType.replace("!", "") : "Int", l = e.primaryKeys ?? [], c = Kf(e, n).map((h) => h.name), u = t.primaryKeys?.length ? t.primaryKeys : n.targetColumnNames, f = t.labelColumn, d = [...u];
14452
14472
  f && !u.includes(f) && d.push(`label: ${f}`);
14453
14473
  const m = `${n.junctionTargetField} { ${d.join(" ")} }`, p = [...l, ...c, m].join(" ");
14454
- return { query: `query GetLinks_${e.name}($id: ${i}, $limit: Int, $offset: Int) { ${e.name}(filter: { ${o}: { _eq: $id } } limit: $limit offset: $offset) { total offset limit data { ${p} } } }`, variables: { id: TS(r, i) } };
14474
+ return { query: `query GetLinks_${e.name}($id: ${i}, $limit: Int, $offset: Int) { ${e.name}(filter: { ${o}: { _eq: $id } } limit: $limit offset: $offset) { total offset limit data { ${p} } } }`, variables: { id: IS(r, i) } };
14455
14475
  }
14456
- function PS(e, t, n) {
14476
+ function $S(e, t, n) {
14457
14477
  const r = e[t.junctionTargetField];
14458
14478
  if (!r) return null;
14459
14479
  const o = lr(r, n, 0), s = r.label != null ? String(r.label) : o;
14460
14480
  return { id: o, label: s };
14461
14481
  }
14462
- function FS(e, t, n) {
14482
+ function OS(e, t, n) {
14463
14483
  return {
14464
14484
  [e.junctionSourceColumnNames[0]]: t,
14465
14485
  [e.junctionTargetColumnNames[0]]: n
14466
14486
  };
14467
14487
  }
14468
- function IS({ parentTable: e, m2m: t, parentRowId: n, onOpenColumn: r }) {
14469
- const o = Ve(), s = Ke(), i = ri(), [l, c] = ee(!1), [u, f] = ee(!1), d = o.findTable(t.junctionTable), m = o.findTable(t.targetTable), p = zf(d ?? e), { query: g, variables: h } = d && m ? kS(d, m, t, n) : { query: null, variables: {} }, x = ["m2mRows", t.junctionTable, t.targetTable, n], { data: y, isLoading: b, error: w } = ut({
14488
+ function DS({ parentTable: e, m2m: t, parentRowId: n, onOpenColumn: r }) {
14489
+ const o = Ve(), s = Ke(), i = ri(), [l, c] = ee(!1), [u, f] = ee(!1), d = o.findTable(t.junctionTable), m = o.findTable(t.targetTable), p = zf(d ?? e), { query: g, variables: h } = d && m ? AS(d, m, t, n) : { query: null, variables: {} }, x = ["m2mRows", t.junctionTable, t.targetTable, n], { data: y, isLoading: b, error: C } = ut({
14470
14490
  queryKey: x,
14471
14491
  queryFn: () => s.query(g, { ...h, limit: 200, offset: 0 }),
14472
14492
  enabled: !!g
@@ -14477,7 +14497,7 @@ function IS({ parentTable: e, m2m: t, parentRowId: n, onOpenColumn: r }) {
14477
14497
  }, [d, p, _]);
14478
14498
  if (!d || !m)
14479
14499
  return /* @__PURE__ */ a.jsx("div", { className: "p-4 text-sm text-muted-foreground", children: "Relationship schema unavailable." });
14480
- const j = y?.[d.name]?.data ?? [], E = Kf(d, t), C = E.length > 0, N = d.isEditable !== !1;
14500
+ const j = y?.[d.name]?.data ?? [], E = Kf(d, t), w = E.length > 0, N = d.isEditable !== !1;
14481
14501
  return /* @__PURE__ */ a.jsxs("div", { className: "flex flex-col min-h-0 flex-1 overflow-hidden", children: [
14482
14502
  /* @__PURE__ */ a.jsxs("div", { className: "flex items-center gap-2 px-2 py-1 bg-muted/20 border-b border-border shrink-0", children: [
14483
14503
  /* @__PURE__ */ a.jsxs("span", { className: "inline-flex items-center gap-1 rounded-full border border-border bg-muted/40 px-2 py-0.5 text-xs text-muted-foreground", title: `Linked through ${d.label}`, children: [
@@ -14485,7 +14505,7 @@ function IS({ parentTable: e, m2m: t, parentRowId: n, onOpenColumn: r }) {
14485
14505
  "via ",
14486
14506
  d.label
14487
14507
  ] }),
14488
- C && /* @__PURE__ */ a.jsxs(Y, { variant: "ghost", size: "sm", className: "h-7 px-2 text-xs", onClick: () => c((M) => !M), children: [
14508
+ w && /* @__PURE__ */ a.jsxs(Y, { variant: "ghost", size: "sm", className: "h-7 px-2 text-xs", onClick: () => c((M) => !M), children: [
14489
14509
  l ? "Hide" : "Show",
14490
14510
  " ",
14491
14511
  d.label,
@@ -14497,9 +14517,9 @@ function IS({ parentTable: e, m2m: t, parentRowId: n, onOpenColumn: r }) {
14497
14517
  ] })
14498
14518
  ] }),
14499
14519
  /* @__PURE__ */ a.jsxs("div", { className: "flex-1 min-h-0 overflow-auto", children: [
14500
- w && /* @__PURE__ */ a.jsxs("div", { className: "p-3 text-sm text-destructive", children: [
14520
+ C && /* @__PURE__ */ a.jsxs("div", { className: "p-3 text-sm text-destructive", children: [
14501
14521
  "Error: ",
14502
- w.message
14522
+ C.message
14503
14523
  ] }),
14504
14524
  b && /* @__PURE__ */ a.jsxs("div", { className: "flex items-center gap-2 p-3 text-sm text-muted-foreground", children: [
14505
14525
  /* @__PURE__ */ a.jsx(wt, { className: "size-4 animate-spin" }),
@@ -14517,7 +14537,7 @@ function IS({ parentTable: e, m2m: t, parentRowId: n, onOpenColumn: r }) {
14517
14537
  N && /* @__PURE__ */ a.jsx("th", { className: "px-2 py-1 w-8", "aria-label": "actions" })
14518
14538
  ] }) }),
14519
14539
  /* @__PURE__ */ a.jsx("tbody", { children: j.map((M, A) => {
14520
- const G = PS(M, t, m);
14540
+ const G = $S(M, t, m);
14521
14541
  return /* @__PURE__ */ a.jsxs("tr", { className: "border-b border-border/50 hover:bg-muted/30", children: [
14522
14542
  /* @__PURE__ */ a.jsx("td", { className: "px-2 py-1", children: G ? /* @__PURE__ */ a.jsxs("span", { className: "inline-flex items-center gap-1", children: [
14523
14543
  /* @__PURE__ */ a.jsx(dn, { to: `/${m.name}/${G.id}`, className: "text-primary hover:underline", children: G.label }),
@@ -14553,7 +14573,7 @@ function IS({ parentTable: e, m2m: t, parentRowId: n, onOpenColumn: r }) {
14553
14573
  ] })
14554
14574
  ] }),
14555
14575
  u && /* @__PURE__ */ a.jsx(
14556
- AS,
14576
+ LS,
14557
14577
  {
14558
14578
  target: m,
14559
14579
  junction: d,
@@ -14565,12 +14585,12 @@ function IS({ parentTable: e, m2m: t, parentRowId: n, onOpenColumn: r }) {
14565
14585
  )
14566
14586
  ] });
14567
14587
  }
14568
- function AS({ target: e, junction: t, m2m: n, parentRowId: r, onClose: o, onLinked: s }) {
14588
+ function LS({ target: e, junction: t, m2m: n, parentRowId: r, onClose: o, onLinked: s }) {
14569
14589
  const i = Ke(), l = t.columns.filter((R) => n.junctionSourceColumnNames.includes(R.name) || n.junctionTargetColumnNames.includes(R.name)).map((R) => ({ column: R })), c = qf(t, l, []), [u, f] = ee(""), d = wn(e)[0]?.name ?? n.targetColumnNames[0], m = e.labelColumn, p = m && m !== d ? `${d} label: ${m}` : `${d}`, g = `query PickTarget($limit: Int) { ${e.name}(limit: $limit sort: ["${m ?? d}_asc"]) { data { ${p} } } }`, { data: h, isLoading: x } = ut({
14570
14590
  queryKey: ["m2mTargets", e.name],
14571
14591
  queryFn: () => i.query(g, { limit: 500 })
14572
- }), y = h?.[e.name]?.data ?? [], b = u.trim().toLowerCase(), w = b ? y.filter((R) => String(R.label ?? R[d] ?? "").toLowerCase().includes(b)) : y, _ = se(async (R) => {
14573
- await c.insert(FS(n, r, R)), await s(), o();
14592
+ }), y = h?.[e.name]?.data ?? [], b = u.trim().toLowerCase(), C = b ? y.filter((R) => String(R.label ?? R[d] ?? "").toLowerCase().includes(b)) : y, _ = se(async (R) => {
14593
+ await c.insert(OS(n, r, R)), await s(), o();
14574
14594
  }, [c, n, r, s, o]);
14575
14595
  return /* @__PURE__ */ a.jsx(cr, { open: !0, onOpenChange: (R) => {
14576
14596
  R || o();
@@ -14590,9 +14610,9 @@ function AS({ target: e, junction: t, m2m: n, parentRowId: r, onClose: o, onLink
14590
14610
  /* @__PURE__ */ a.jsx(wt, { className: "size-4 animate-spin" }),
14591
14611
  " Loading…"
14592
14612
  ] }),
14593
- !x && w.length === 0 && /* @__PURE__ */ a.jsx("div", { className: "p-3 text-sm text-muted-foreground", children: "No matches." }),
14594
- w.map((R, j) => {
14595
- const E = String(R[d] ?? ""), C = R.label != null ? String(R.label) : E;
14613
+ !x && C.length === 0 && /* @__PURE__ */ a.jsx("div", { className: "p-3 text-sm text-muted-foreground", children: "No matches." }),
14614
+ C.map((R, j) => {
14615
+ const E = String(R[d] ?? ""), w = R.label != null ? String(R.label) : E;
14596
14616
  return /* @__PURE__ */ a.jsx(
14597
14617
  "button",
14598
14618
  {
@@ -14600,7 +14620,7 @@ function AS({ target: e, junction: t, m2m: n, parentRowId: r, onClose: o, onLink
14600
14620
  className: "block w-full text-left px-3 py-1.5 text-sm hover:bg-muted/50 disabled:opacity-50",
14601
14621
  disabled: c.isPending,
14602
14622
  onClick: () => _(E),
14603
- children: C
14623
+ children: w
14604
14624
  },
14605
14625
  j
14606
14626
  );
@@ -14611,7 +14631,7 @@ function AS({ target: e, junction: t, m2m: n, parentRowId: r, onClose: o, onLink
14611
14631
  function Nl(e) {
14612
14632
  return e.kind === "child" ? e.join.destinationTable : e.m2m.targetTable;
14613
14633
  }
14614
- function $S({ parentTable: e, selectedRowId: t, onClose: n, onOpenColumn: r }) {
14634
+ function VS({ parentTable: e, selectedRowId: t, onClose: n, onOpenColumn: r }) {
14615
14635
  const o = Ve(), s = Wf(e), [i, l] = ee(s[0]?.key ?? ""), [c, u] = ee(!1);
14616
14636
  if (s.length === 0 || !o.data) return null;
14617
14637
  const f = s.find((d) => d.key === i) ?? s[0];
@@ -14686,7 +14706,7 @@ function $S({ parentTable: e, selectedRowId: t, onClose: n, onOpenColumn: r }) {
14686
14706
  },
14687
14707
  `${f.key}-${t}`
14688
14708
  ) : /* @__PURE__ */ a.jsx(
14689
- IS,
14709
+ DS,
14690
14710
  {
14691
14711
  parentTable: e,
14692
14712
  m2m: f.m2m,
@@ -14697,7 +14717,7 @@ function $S({ parentTable: e, selectedRowId: t, onClose: n, onOpenColumn: r }) {
14697
14717
  ) })
14698
14718
  ] });
14699
14719
  }
14700
- const OS = {
14720
+ const zS = {
14701
14721
  mainTable: null,
14702
14722
  columns: [],
14703
14723
  focusedIndex: 0,
@@ -14705,10 +14725,10 @@ const OS = {
14705
14725
  },
14706
14726
  closeColumn: () => {
14707
14727
  }
14708
- }, Uf = Xt(OS), Yf = Xt({ register: () => {
14728
+ }, Uf = Xt(zS), Yf = Xt({ register: () => {
14709
14729
  }, unregister: () => {
14710
14730
  } });
14711
- function DS({ children: e }) {
14731
+ function BS({ children: e }) {
14712
14732
  const [t, n] = ee(null), [r, o] = ee(0), s = se((d) => {
14713
14733
  n(d);
14714
14734
  }, []), i = se(() => {
@@ -14731,25 +14751,25 @@ function DS({ children: e }) {
14731
14751
  };
14732
14752
  return /* @__PURE__ */ a.jsx(Yf.Provider, { value: { register: s, unregister: i }, children: /* @__PURE__ */ a.jsx(Uf.Provider, { value: f, children: e }) });
14733
14753
  }
14734
- function LS() {
14754
+ function HS() {
14735
14755
  return Ge(Uf);
14736
14756
  }
14737
- function VS() {
14757
+ function GS() {
14738
14758
  return Ge(Yf);
14739
14759
  }
14740
14760
  function Tl(e, t) {
14741
14761
  return e.tableName === t.tableName && e.filterTable === t.filterTable && e.filterId === t.filterId && e.filterColumn === t.filterColumn;
14742
14762
  }
14743
- function zS(e, t) {
14763
+ function qS(e, t) {
14744
14764
  const n = e[e.length - 1];
14745
14765
  if (n && Tl(n, t)) return e;
14746
14766
  const r = e.findIndex((o) => Tl(o, t));
14747
14767
  return r >= 0 ? e.slice(0, r + 1) : [...e, t];
14748
14768
  }
14749
- function BS(e, t) {
14769
+ function WS(e, t) {
14750
14770
  return t < 0 ? [] : t >= e.length ? e : e.slice(0, t);
14751
14771
  }
14752
- function HS(e, t, n) {
14772
+ function KS(e, t, n) {
14753
14773
  const r = (s) => n(s) ?? s, o = [
14754
14774
  { index: -1, label: r(e) }
14755
14775
  ];
@@ -14770,14 +14790,14 @@ function Ys(e, t) {
14770
14790
  function an() {
14771
14791
  const e = mi(), { table: t, id: n, filterTable: r } = e, { loading: o, error: s, data: i } = Ve(), [l, c] = ee(null), [u, f] = ee([]), d = Ie(t);
14772
14792
  t !== d.current && (d.current = t, u.length > 0 && f([]));
14773
- const { register: m, unregister: p } = VS(), g = Ie(null), h = Ie(/* @__PURE__ */ new Map()), x = le(() => i ? Ys(i, t) : void 0, [i, t]), y = x ? Wf(x).length > 0 : !1, b = se((j) => {
14774
- f((E) => zS(E, j));
14775
- }, []), w = se((j) => {
14776
- f((E) => E.filter((C, N) => N !== j));
14793
+ const { register: m, unregister: p } = GS(), g = Ie(null), h = Ie(/* @__PURE__ */ new Map()), x = le(() => i ? Ys(i, t) : void 0, [i, t]), y = x ? Wf(x).length > 0 : !1, b = se((j) => {
14794
+ f((E) => qS(E, j));
14795
+ }, []), C = se((j) => {
14796
+ f((E) => E.filter((w, N) => N !== j));
14777
14797
  }, []), _ = se((j) => {
14778
- f((E) => BS(E, j + 1));
14798
+ f((E) => WS(E, j + 1));
14779
14799
  }, []), R = le(
14780
- () => HS(t ?? "", u, (j) => {
14800
+ () => KS(t ?? "", u, (j) => {
14781
14801
  if (i)
14782
14802
  return Ys(i, j)?.label;
14783
14803
  }),
@@ -14792,9 +14812,9 @@ function an() {
14792
14812
  mainTable: t,
14793
14813
  columns: u,
14794
14814
  columnRefs: j,
14795
- onClose: w
14815
+ onClose: C
14796
14816
  }), () => p();
14797
- }, [t, u, m, p, w]), t ? o ? /* @__PURE__ */ a.jsxs("div", { className: "flex items-center justify-center gap-2 p-5", children: [
14817
+ }, [t, u, m, p, C]), t ? o ? /* @__PURE__ */ a.jsxs("div", { className: "flex items-center justify-center gap-2 p-5", children: [
14798
14818
  /* @__PURE__ */ a.jsx(wt, { className: "size-4 animate-spin text-muted-foreground" }),
14799
14819
  /* @__PURE__ */ a.jsx("span", { className: "text-sm text-muted-foreground", children: "Loading..." })
14800
14820
  ] }) : s ? /* @__PURE__ */ a.jsx(Yn, { variant: "destructive", className: "m-2", children: /* @__PURE__ */ a.jsxs(Jn, { children: [
@@ -14802,7 +14822,7 @@ function an() {
14802
14822
  s.message
14803
14823
  ] }) }) : x ? /* @__PURE__ */ a.jsxs("div", { className: "flex flex-col flex-1 min-h-0", children: [
14804
14824
  u.length > 0 && /* @__PURE__ */ a.jsx(
14805
- GS,
14825
+ US,
14806
14826
  {
14807
14827
  crumbs: R,
14808
14828
  onCrumbClick: _,
@@ -14823,7 +14843,7 @@ function an() {
14823
14843
  }
14824
14844
  ) }),
14825
14845
  y && l && /* @__PURE__ */ a.jsx("div", { className: "flex-1 min-h-0 overflow-hidden flex flex-col", children: /* @__PURE__ */ a.jsx(
14826
- $S,
14846
+ VS,
14827
14847
  {
14828
14848
  parentTable: x,
14829
14849
  selectedRowId: l,
@@ -14833,13 +14853,13 @@ function an() {
14833
14853
  ) })
14834
14854
  ] }),
14835
14855
  u.map((j, E) => /* @__PURE__ */ a.jsx(
14836
- qS,
14856
+ YS,
14837
14857
  {
14838
14858
  panel: j,
14839
- onClose: () => w(E),
14859
+ onClose: () => C(E),
14840
14860
  onOpenColumn: b,
14841
- onRef: (C) => {
14842
- h.current.set(E + 1, C);
14861
+ onRef: (w) => {
14862
+ h.current.set(E + 1, w);
14843
14863
  }
14844
14864
  },
14845
14865
  `${j.tableName}-${j.filterId ?? ""}-${j.filterColumn ?? ""}-${E}`
@@ -14847,7 +14867,7 @@ function an() {
14847
14867
  ] })
14848
14868
  ] }) : /* @__PURE__ */ a.jsx("div", { className: "p-5 text-center text-muted-foreground", children: "Table not found" }) : /* @__PURE__ */ a.jsx("div", { className: "p-5 text-center text-muted-foreground", children: "Table missing" });
14849
14869
  }
14850
- function GS({ crumbs: e, onCrumbClick: t, activeIndex: n }) {
14870
+ function US({ crumbs: e, onCrumbClick: t, activeIndex: n }) {
14851
14871
  return /* @__PURE__ */ a.jsx(
14852
14872
  "nav",
14853
14873
  {
@@ -14878,7 +14898,7 @@ function GS({ crumbs: e, onCrumbClick: t, activeIndex: n }) {
14878
14898
  }
14879
14899
  );
14880
14900
  }
14881
- function qS({ panel: e, onClose: t, onOpenColumn: n, onRef: r }) {
14901
+ function YS({ panel: e, onClose: t, onOpenColumn: n, onRef: r }) {
14882
14902
  const { data: o } = Ve(), s = le(() => o ? Ys(o, e.tableName) : void 0, [o, e.tableName]);
14883
14903
  return s ? /* @__PURE__ */ a.jsxs("div", { ref: r, className: "flex flex-col flex-1 min-h-0 min-w-0 border-l border-border", children: [
14884
14904
  /* @__PURE__ */ a.jsxs("div", { className: "flex items-center gap-1 px-2 py-1 bg-muted/30 border-b border-border shrink-0", children: [
@@ -14908,12 +14928,12 @@ function qS({ panel: e, onClose: t, onOpenColumn: n, onRef: r }) {
14908
14928
  ] }) : null;
14909
14929
  }
14910
14930
  function ys() {
14911
- const e = mi(), { loading: t, error: n, data: r } = Ve(), { mainTable: o, columns: s, focusedIndex: i, focusColumn: l, closeColumn: c } = LS(), [u, f] = ee(""), d = Kn(), { back: m, hasBack: p } = Lg(), g = e?.table, h = s.length > 0, x = le(() => r?.find((R) => R.graphQlName === g), [r, g]), y = le(
14931
+ const e = mi(), { loading: t, error: n, data: r } = Ve(), { mainTable: o, columns: s, focusedIndex: i, focusColumn: l, closeColumn: c } = HS(), [u, f] = ee(""), d = Kn(), { back: m, hasBack: p } = Lg(), g = e?.table, h = s.length > 0, x = le(() => r?.find((R) => R.graphQlName === g), [r, g]), y = le(
14912
14932
  () => x?.columns?.map((R) => ({ key: R.name, value: `${R.name},${R.paramType}`, label: R.label })),
14913
14933
  [x]
14914
- ), [b, w] = ee(y?.at(0)?.value ?? "");
14934
+ ), [b, C] = ee(y?.at(0)?.value ?? "");
14915
14935
  Oe(() => {
14916
- f(""), w(y?.at(0)?.value ?? "");
14936
+ f(""), C(y?.at(0)?.value ?? "");
14917
14937
  }, [y]);
14918
14938
  const _ = () => {
14919
14939
  if (!u) return;
@@ -14952,7 +14972,7 @@ function ys() {
14952
14972
  }
14953
14973
  ),
14954
14974
  s.map((R, j) => {
14955
- const C = r?.find((N) => N.graphQlName === R.panel.tableName)?.label ?? Kr(R.panel.tableName);
14975
+ const w = r?.find((N) => N.graphQlName === R.panel.tableName)?.label ?? Kr(R.panel.tableName);
14956
14976
  return /* @__PURE__ */ a.jsxs(
14957
14977
  "button",
14958
14978
  {
@@ -14960,7 +14980,7 @@ function ys() {
14960
14980
  onClick: () => l(j + 1),
14961
14981
  className: `flex items-center gap-1 px-2 py-0.5 rounded text-xs font-medium whitespace-nowrap transition-colors ${i === j + 1 ? "bg-primary text-primary-foreground" : "bg-muted/50 text-muted-foreground hover:bg-muted"}`,
14962
14982
  children: [
14963
- C,
14983
+ w,
14964
14984
  /* @__PURE__ */ a.jsx(
14965
14985
  "span",
14966
14986
  {
@@ -14973,7 +14993,7 @@ function ys() {
14973
14993
  (N.key === "Enter" || N.key === " ") && (N.stopPropagation(), c(j + 1));
14974
14994
  },
14975
14995
  className: "ml-0.5 rounded-sm hover:bg-background/50 p-px",
14976
- "aria-label": `Close ${C}`,
14996
+ "aria-label": `Close ${w}`,
14977
14997
  children: /* @__PURE__ */ a.jsx(qe, { className: "size-3" })
14978
14998
  }
14979
14999
  )
@@ -14986,7 +15006,7 @@ function ys() {
14986
15006
  ] }),
14987
15007
  y ? /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
14988
15008
  /* @__PURE__ */ a.jsxs("div", { className: "flex items-center border border-border rounded-md overflow-hidden", children: [
14989
- /* @__PURE__ */ a.jsxs(ft, { value: b, onValueChange: w, children: [
15009
+ /* @__PURE__ */ a.jsxs(ft, { value: b, onValueChange: C, children: [
14990
15010
  /* @__PURE__ */ a.jsx(pt, { size: "sm", className: "w-auto min-w-[120px] shrink-0 border-0 rounded-none border-r border-border h-8 text-xs", children: /* @__PURE__ */ a.jsx(mt, {}) }),
14991
15011
  /* @__PURE__ */ a.jsx(gt, { children: y.map((R) => /* @__PURE__ */ a.jsx(We, { value: R.value, children: R.label }, R.key)) })
14992
15012
  ] }),
@@ -15025,7 +15045,7 @@ function ys() {
15025
15045
  }
15026
15046
  var be = /* @__PURE__ */ ((e) => (e[e.None = 0] = "None", e[e.Mutable = 1] = "Mutable", e[e.Watching = 2] = "Watching", e[e.RecursedCheck = 4] = "RecursedCheck", e[e.Recursed = 8] = "Recursed", e[e.Dirty = 16] = "Dirty", e[e.Pending = 32] = "Pending", e))(be || {});
15027
15047
  // @__NO_SIDE_EFFECTS__
15028
- function WS({
15048
+ function JS({
15029
15049
  update: e,
15030
15050
  notify: t,
15031
15051
  unwatched: n
@@ -15159,7 +15179,7 @@ function Xi(e, t, n) {
15159
15179
  }
15160
15180
  const Js = [];
15161
15181
  let Lr = 0;
15162
- const { link: kl, unlink: KS, propagate: US, checkDirty: Jf, shallowPropagate: Pl } = /* @__PURE__ */ WS({
15182
+ const { link: kl, unlink: XS, propagate: QS, checkDirty: Jf, shallowPropagate: Pl } = /* @__PURE__ */ JS({
15163
15183
  update(e) {
15164
15184
  return e._update();
15165
15185
  },
@@ -15183,7 +15203,7 @@ function lo(e) {
15183
15203
  const t = e.depsTail;
15184
15204
  let n = t !== void 0 ? t.nextDep : e.deps;
15185
15205
  for (; n !== void 0; )
15186
- n = KS(n, e);
15206
+ n = XS(n, e);
15187
15207
  }
15188
15208
  function Xf() {
15189
15209
  if (!(Qs > 0)) {
@@ -15206,7 +15226,7 @@ function Qf(e, t) {
15206
15226
  return it !== void 0 && kl(o, it, Lr), o._snapshot;
15207
15227
  },
15208
15228
  subscribe(s) {
15209
- const i = Xi(s), l = { current: !1 }, c = YS(() => {
15229
+ const i = Xi(s), l = { current: !1 }, c = ZS(() => {
15210
15230
  o.get(), l.current ? i.next?.(o._snapshot) : l.current = !0;
15211
15231
  });
15212
15232
  return {
@@ -15242,11 +15262,11 @@ function Qf(e, t) {
15242
15262
  }) : o.set = function(s) {
15243
15263
  if (o._update(s)) {
15244
15264
  const i = o.subs;
15245
- i !== void 0 && (US(i), Pl(i), Xf());
15265
+ i !== void 0 && (QS(i), Pl(i), Xf());
15246
15266
  }
15247
15267
  }, o;
15248
15268
  }
15249
- function YS(e) {
15269
+ function ZS(e) {
15250
15270
  const t = () => {
15251
15271
  const r = it;
15252
15272
  it = n, ++Lr, n.depsTail = void 0, n.flags = be.Watching | be.RecursedCheck;
@@ -15271,7 +15291,7 @@ function YS(e) {
15271
15291
  };
15272
15292
  return t(), n;
15273
15293
  }
15274
- class JS {
15294
+ class e_ {
15275
15295
  constructor(t) {
15276
15296
  this.atom = Qf(
15277
15297
  t
@@ -15290,7 +15310,7 @@ class JS {
15290
15310
  return this.atom.subscribe(Xi(t));
15291
15311
  }
15292
15312
  }
15293
- class XS {
15313
+ class t_ {
15294
15314
  constructor(t) {
15295
15315
  this.atom = Qf(
15296
15316
  t
@@ -15307,9 +15327,9 @@ class XS {
15307
15327
  }
15308
15328
  }
15309
15329
  function Vr(e) {
15310
- return typeof e == "function" ? new XS(e) : new JS(e);
15330
+ return typeof e == "function" ? new t_(e) : new e_(e);
15311
15331
  }
15312
- var QS = class {
15332
+ var n_ = class {
15313
15333
  constructor(e, t) {
15314
15334
  this.fn = e, this.options = t, this.lastExecutionTime = 0, this.isPending = !1, this.maybeExecute = (...n) => {
15315
15335
  const r = Date.now() - this.lastExecutionTime;
@@ -15331,10 +15351,10 @@ var QS = class {
15331
15351
  }, this.options.leading === void 0 && this.options.trailing === void 0 && (this.options.leading = !0, this.options.trailing = !0);
15332
15352
  }
15333
15353
  };
15334
- function ZS(e, t) {
15335
- return new QS(e, t).maybeExecute;
15354
+ function r_(e, t) {
15355
+ return new n_(e, t).maybeExecute;
15336
15356
  }
15337
- class e_ {
15357
+ class o_ {
15338
15358
  #s = !0;
15339
15359
  #t;
15340
15360
  #e;
@@ -15509,7 +15529,7 @@ class e_ {
15509
15529
  );
15510
15530
  }
15511
15531
  }
15512
- class t_ extends e_ {
15532
+ class s_ extends o_ {
15513
15533
  constructor() {
15514
15534
  super({
15515
15535
  pluginId: "form-devtools",
@@ -15517,7 +15537,7 @@ class t_ extends e_ {
15517
15537
  });
15518
15538
  }
15519
15539
  }
15520
- const Be = new t_();
15540
+ const Be = new s_();
15521
15541
  function Do(e, t) {
15522
15542
  return typeof e == "function" ? e(t) : e;
15523
15543
  }
@@ -15553,7 +15573,7 @@ function An(e, t, n) {
15553
15573
  }
15554
15574
  return o(e);
15555
15575
  }
15556
- function n_(e, t) {
15576
+ function i_(e, t) {
15557
15577
  const n = Qi(t);
15558
15578
  function r(o) {
15559
15579
  if (!o) return;
@@ -15584,13 +15604,13 @@ function n_(e, t) {
15584
15604
  }
15585
15605
  return r(e);
15586
15606
  }
15587
- const r_ = /^(\d+)$/gm, o_ = /\.(\d+)(?=\.)/gm, s_ = /^(\d+)\./gm, i_ = /\.(\d+$)/gm, a_ = /\.{2,}/gm, Zs = "__int__", Mr = `${Zs}$1`;
15607
+ const a_ = /^(\d+)$/gm, l_ = /\.(\d+)(?=\.)/gm, c_ = /^(\d+)\./gm, u_ = /\.(\d+$)/gm, d_ = /\.{2,}/gm, Zs = "__int__", Mr = `${Zs}$1`;
15588
15608
  function Qi(e) {
15589
15609
  if (Array.isArray(e))
15590
15610
  return [...e];
15591
15611
  if (typeof e != "string")
15592
15612
  throw new Error("Path must be a string.");
15593
- return e.replace(/(^\[)|]/gm, "").replace(/\[/g, ".").replace(r_, Mr).replace(o_, `.${Mr}.`).replace(s_, `${Mr}.`).replace(i_, `.${Mr}`).replace(a_, ".").split(".").map((t) => {
15613
+ return e.replace(/(^\[)|]/gm, "").replace(/\[/g, ".").replace(a_, Mr).replace(l_, `.${Mr}.`).replace(c_, `${Mr}.`).replace(u_, `.${Mr}`).replace(d_, ".").split(".").map((t) => {
15594
15614
  if (t.startsWith(Zs)) {
15595
15615
  const n = t.substring(Zs.length), r = parseInt(n, 10);
15596
15616
  return String(r) === n ? r : n;
@@ -15598,7 +15618,7 @@ function Qi(e) {
15598
15618
  return t;
15599
15619
  });
15600
15620
  }
15601
- function l_(e) {
15621
+ function f_(e) {
15602
15622
  return !(Array.isArray(e) && e.length === 0);
15603
15623
  }
15604
15624
  function ei(e, t) {
@@ -15703,7 +15723,7 @@ function Zf() {
15703
15723
  t = Nr[Gt + e], e === 6 ? n += Br[t & 15 | 64] : e === 8 ? n += Br[t & 63 | 128] : n += Br[t], e & 1 && e > 1 && e < 11 && (n += "-");
15704
15724
  return Gt++, n;
15705
15725
  }
15706
- const c_ = ZS(
15726
+ const m_ = r_(
15707
15727
  (e) => Be.emit("form-state", {
15708
15728
  id: e.formId,
15709
15729
  state: e.store.state
@@ -15792,7 +15812,7 @@ const cn = (e) => {
15792
15812
  throw new Error(`Unknown validation event type: ${e.event.type}`);
15793
15813
  }
15794
15814
  };
15795
- function u_(e, t) {
15815
+ function p_(e, t) {
15796
15816
  const n = /* @__PURE__ */ new Map();
15797
15817
  for (const r of e) {
15798
15818
  const o = r.path ?? [];
@@ -15808,7 +15828,7 @@ function u_(e, t) {
15808
15828
  return Object.fromEntries(n);
15809
15829
  }
15810
15830
  const Al = (e, t) => {
15811
- const n = u_(e, t);
15831
+ const n = p_(e, t);
15812
15832
  return {
15813
15833
  form: n,
15814
15834
  fields: n
@@ -15859,17 +15879,17 @@ function zt(e) {
15859
15879
  for (let b = h; b <= x; b++)
15860
15880
  g.push(i(d, b));
15861
15881
  const y = Object.keys(e.fieldInfo).reduce(
15862
- (b, w) => (w.startsWith(i(d, m)) && b.set(
15863
- w,
15864
- e.getFieldMeta(w)
15882
+ (b, C) => (C.startsWith(i(d, m)) && b.set(
15883
+ C,
15884
+ e.getFieldMeta(C)
15865
15885
  ), b),
15866
15886
  /* @__PURE__ */ new Map()
15867
15887
  );
15868
15888
  u(g, m < p ? "up" : "down"), Object.keys(e.fieldInfo).filter((b) => b.startsWith(i(d, p))).forEach((b) => {
15869
- const w = b.replace(
15889
+ const C = b.replace(
15870
15890
  i(d, p),
15871
15891
  i(d, m)
15872
- ), _ = y.get(w);
15892
+ ), _ = y.get(C);
15873
15893
  _ && e.setFieldMeta(b, _);
15874
15894
  });
15875
15895
  }
@@ -15976,7 +15996,7 @@ class $l {
15976
15996
  constructor(t) {
15977
15997
  this.options = {}, this.fieldInfo = {}, this.mount = () => {
15978
15998
  const s = this.store.subscribe(() => {
15979
- c_(this);
15999
+ m_(this);
15980
16000
  }), i = Be.on(
15981
16001
  "request-form-state",
15982
16002
  (d) => {
@@ -16116,7 +16136,7 @@ class $l {
16116
16136
  if (this.baseStore.state.fieldMetaBase[y] === void 0 && !g?.[y])
16117
16137
  continue;
16118
16138
  const b = this.getFieldMeta(y) ?? Je, {
16119
- errorMap: w,
16139
+ errorMap: C,
16120
16140
  errorSourceMap: _
16121
16141
  } = b, R = g?.[y], { newErrorValue: j, newSource: E } = Fl({
16122
16142
  newFormValidatorError: R,
@@ -16126,19 +16146,19 @@ class $l {
16126
16146
  _?.[h] === "form"
16127
16147
  ),
16128
16148
  // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
16129
- previousErrorValue: w?.[h]
16149
+ previousErrorValue: C?.[h]
16130
16150
  });
16131
16151
  E === "form" && (c[y] = {
16132
16152
  ...c[y],
16133
16153
  [h]: R
16134
- }), w?.[h] !== j && this.setFieldMeta(y, (C = Je) => ({
16135
- ...C,
16154
+ }), C?.[h] !== j && this.setFieldMeta(y, (w = Je) => ({
16155
+ ...w,
16136
16156
  errorMap: {
16137
- ...C.errorMap,
16157
+ ...w.errorMap,
16138
16158
  [h]: j
16139
16159
  },
16140
16160
  errorSourceMap: {
16141
- ...C.errorSourceMap,
16161
+ ...w.errorSourceMap,
16142
16162
  [h]: E
16143
16163
  }
16144
16164
  }));
@@ -16219,7 +16239,7 @@ class $l {
16219
16239
  ...c,
16220
16240
  ...b
16221
16241
  } : b);
16222
- const w = $n(d.cause);
16242
+ const C = $n(d.cause);
16223
16243
  for (const _ of Object.keys(
16224
16244
  this.state.fieldMeta
16225
16245
  )) {
@@ -16230,25 +16250,25 @@ class $l {
16230
16250
  const {
16231
16251
  errorMap: j,
16232
16252
  errorSourceMap: E
16233
- } = R, C = c?.[_], { newErrorValue: N, newSource: M } = Fl({
16234
- newFormValidatorError: C,
16253
+ } = R, w = c?.[_], { newErrorValue: N, newSource: M } = Fl({
16254
+ newFormValidatorError: w,
16235
16255
  isPreviousErrorFromFormValidator: (
16236
16256
  // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
16237
- E?.[w] === "form"
16257
+ E?.[C] === "form"
16238
16258
  ),
16239
16259
  // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
16240
- previousErrorValue: j?.[w]
16260
+ previousErrorValue: j?.[C]
16241
16261
  });
16242
16262
  // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
16243
- j?.[w] !== N && this.setFieldMeta(_, (A) => ({
16263
+ j?.[C] !== N && this.setFieldMeta(_, (A) => ({
16244
16264
  ...A,
16245
16265
  errorMap: {
16246
16266
  ...A.errorMap,
16247
- [w]: N
16267
+ [C]: N
16248
16268
  },
16249
16269
  errorSourceMap: {
16250
16270
  ...A.errorSourceMap,
16251
- [w]: M
16271
+ [C]: M
16252
16272
  }
16253
16273
  }));
16254
16274
  }
@@ -16256,10 +16276,10 @@ class $l {
16256
16276
  ..._,
16257
16277
  errorMap: {
16258
16278
  ..._.errorMap,
16259
- [w]: y
16279
+ [C]: y
16260
16280
  }
16261
16281
  })), h(
16262
- c ? { fieldErrors: c, errorMapKey: w } : void 0
16282
+ c ? { fieldErrors: c, errorMapKey: C } : void 0
16263
16283
  );
16264
16284
  })
16265
16285
  );
@@ -16438,7 +16458,7 @@ class $l {
16438
16458
  this.baseStore.setState((c) => {
16439
16459
  const u = { ...c };
16440
16460
  return l.forEach((f) => {
16441
- u.values = n_(u.values, f), delete this.fieldInfo[f], delete u.fieldMetaBase[f];
16461
+ u.values = i_(u.values, f), delete this.fieldInfo[f], delete u.fieldMetaBase[f];
16442
16462
  }), u;
16443
16463
  });
16444
16464
  }, this.pushFieldValue = (s, i, l) => {
@@ -16629,12 +16649,12 @@ class $l {
16629
16649
  let g = m?.errors;
16630
16650
  if (!d || f.errorMap !== d.errorMap) {
16631
16651
  g = Object.values(f.errorMap ?? {}).filter(
16632
- (w) => w !== void 0
16652
+ (C) => C !== void 0
16633
16653
  );
16634
16654
  const b = this.getFieldInfo(u)?.instance;
16635
16655
  (!b || !b.options.disableErrorFlat) && (g = g.flat(1));
16636
16656
  }
16637
- const h = !l_(g), x = !f.isDirty, y = Ht(
16657
+ const h = !f_(g), x = !f.isDirty, y = Ht(
16638
16658
  p,
16639
16659
  // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
16640
16660
  this.getFieldInfo(u)?.instance?.options.defaultValue ?? Er(this.options.defaultValues, u)
@@ -16668,17 +16688,17 @@ class $l {
16668
16688
  ), h = c.some((M) => M.isDirty), x = !h, y = !!// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
16669
16689
  (i.errorMap?.onMount || // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
16670
16690
  c.some((M) => M?.errorMap?.onMount)), b = !!u;
16671
- let w = s?.errors ?? [];
16672
- (!o || i.errorMap !== o.errorMap) && (w = Object.values(i.errorMap).reduce((M, A) => A === void 0 ? M : A && zr(A) ? (M.push(A.form), M) : (M.push(A), M), []));
16673
- const _ = w.length === 0, R = f && _, j = this.options.canSubmitWhenInvalid ?? !1, E = i.submissionAttempts === 0 && !d && !y || !b && !i.isSubmitting && R || j;
16674
- let C = i.errorMap;
16675
- if (g && (w = w.filter((M) => M !== i.errorMap.onMount), C = Object.assign(C, { onMount: void 0 })), s && o && s.errorMap === C && s.fieldMeta === this.fieldMetaDerived.state && s.errors === w && s.isFieldsValidating === u && s.isFieldsValid === f && s.isFormValid === _ && s.isValid === R && s.canSubmit === E && s.isTouched === d && s.isBlurred === m && s.isPristine === x && s.isDefaultValue === p && s.isDirty === h && Ht(o, i))
16691
+ let C = s?.errors ?? [];
16692
+ (!o || i.errorMap !== o.errorMap) && (C = Object.values(i.errorMap).reduce((M, A) => A === void 0 ? M : A && zr(A) ? (M.push(A.form), M) : (M.push(A), M), []));
16693
+ const _ = C.length === 0, R = f && _, j = this.options.canSubmitWhenInvalid ?? !1, E = i.submissionAttempts === 0 && !d && !y || !b && !i.isSubmitting && R || j;
16694
+ let w = i.errorMap;
16695
+ if (g && (C = C.filter((M) => M !== i.errorMap.onMount), w = Object.assign(w, { onMount: void 0 })), s && o && s.errorMap === w && s.fieldMeta === this.fieldMetaDerived.state && s.errors === C && s.isFieldsValidating === u && s.isFieldsValid === f && s.isFormValid === _ && s.isValid === R && s.canSubmit === E && s.isTouched === d && s.isBlurred === m && s.isPristine === x && s.isDefaultValue === p && s.isDirty === h && Ht(o, i))
16676
16696
  return s;
16677
16697
  const N = {
16678
16698
  ...i,
16679
- errorMap: C,
16699
+ errorMap: w,
16680
16700
  fieldMeta: this.fieldMetaDerived.state,
16681
- errors: w,
16701
+ errors: C,
16682
16702
  isFieldsValidating: u,
16683
16703
  isFieldsValid: f,
16684
16704
  isFormValid: _,
@@ -16981,9 +17001,9 @@ class Ol {
16981
17001
  const d = (p, g, h) => {
16982
17002
  const x = Tr(g.cause), y = p.getInfo();
16983
17003
  y.validationMetaMap[x]?.lastAbortController.abort();
16984
- const w = new AbortController();
17004
+ const C = new AbortController();
16985
17005
  y.validationMetaMap[x] = {
16986
- lastAbortController: w
17006
+ lastAbortController: C
16987
17007
  }, h.push(
16988
17008
  new Promise(async (_) => {
16989
17009
  let R;
@@ -16991,7 +17011,7 @@ class Ol {
16991
17011
  R = await new Promise((M, A) => {
16992
17012
  p.timeoutIds.validations[g.cause] && clearTimeout(p.timeoutIds.validations[g.cause]), p.timeoutIds.validations[g.cause] = setTimeout(
16993
17013
  async () => {
16994
- if (w.signal.aborted) return M(void 0);
17014
+ if (C.signal.aborted) return M(void 0);
16995
17015
  try {
16996
17016
  M(
16997
17017
  await this.runValidator({
@@ -16999,7 +17019,7 @@ class Ol {
16999
17019
  value: {
17000
17020
  value: p.store.state.value,
17001
17021
  fieldApi: p,
17002
- signal: w.signal,
17022
+ signal: C.signal,
17003
17023
  validationSource: "field"
17004
17024
  },
17005
17025
  type: "validateAsync"
@@ -17015,8 +17035,8 @@ class Ol {
17015
17035
  } catch (M) {
17016
17036
  R = M;
17017
17037
  }
17018
- if (w.signal.aborted) return _(void 0);
17019
- const j = Dl(R), E = s[p.name]?.[x], { newErrorValue: C, newSource: N } = Il({
17038
+ if (C.signal.aborted) return _(void 0);
17039
+ const j = Dl(R), E = s[p.name]?.[x], { newErrorValue: w, newSource: N } = Il({
17020
17040
  formLevelError: E,
17021
17041
  fieldLevelError: j
17022
17042
  });
@@ -17027,13 +17047,13 @@ class Ol {
17027
17047
  errorMap: {
17028
17048
  // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
17029
17049
  ...M?.errorMap,
17030
- [x]: C
17050
+ [x]: w
17031
17051
  },
17032
17052
  errorSourceMap: {
17033
17053
  ...M.errorSourceMap,
17034
17054
  [x]: N
17035
17055
  }
17036
- })), _(C);
17056
+ })), _(w);
17037
17057
  })
17038
17058
  );
17039
17059
  };
@@ -17178,7 +17198,7 @@ function Tr(e) {
17178
17198
  return "onChange";
17179
17199
  }
17180
17200
  }
17181
- function d_(e, t) {
17201
+ function g_(e, t) {
17182
17202
  if (!t) return;
17183
17203
  const n = Object.assign({}, e, {
17184
17204
  state: Ln(e.state)
@@ -17202,7 +17222,7 @@ function d_(e, t) {
17202
17222
  }
17203
17223
  var kr = { exports: {} }, ws = {};
17204
17224
  var Ll;
17205
- function f_() {
17225
+ function h_() {
17206
17226
  if (Ll) return ws;
17207
17227
  Ll = 1;
17208
17228
  var e = Fe, t = Eu();
@@ -17220,18 +17240,18 @@ function f_() {
17220
17240
  function() {
17221
17241
  function y(j) {
17222
17242
  if (!b) {
17223
- if (b = !0, w = j, j = m(j), p !== void 0 && h.hasValue) {
17243
+ if (b = !0, C = j, j = m(j), p !== void 0 && h.hasValue) {
17224
17244
  var E = h.value;
17225
17245
  if (p(E, j))
17226
17246
  return _ = E;
17227
17247
  }
17228
17248
  return _ = j;
17229
17249
  }
17230
- if (E = _, r(w, j)) return E;
17231
- var C = m(j);
17232
- return p !== void 0 && p(E, C) ? (w = j, E) : (w = j, _ = C);
17250
+ if (E = _, r(C, j)) return E;
17251
+ var w = m(j);
17252
+ return p !== void 0 && p(E, w) ? (C = j, E) : (C = j, _ = w);
17233
17253
  }
17234
- var b = !1, w, _, R = d === void 0 ? null : d;
17254
+ var b = !1, C, _, R = d === void 0 ? null : d;
17235
17255
  return [
17236
17256
  function() {
17237
17257
  return y(f());
@@ -17254,7 +17274,7 @@ function f_() {
17254
17274
  }
17255
17275
  var Cs = {};
17256
17276
  var Vl;
17257
- function m_() {
17277
+ function v_() {
17258
17278
  return Vl || (Vl = 1, process.env.NODE_ENV !== "production" && (function() {
17259
17279
  function e(u, f) {
17260
17280
  return u === f && (u !== 0 || 1 / u === 1 / f) || u !== u && f !== f;
@@ -17271,19 +17291,19 @@ function m_() {
17271
17291
  function() {
17272
17292
  function y(j) {
17273
17293
  if (!b) {
17274
- if (b = !0, w = j, j = m(j), p !== void 0 && h.hasValue) {
17294
+ if (b = !0, C = j, j = m(j), p !== void 0 && h.hasValue) {
17275
17295
  var E = h.value;
17276
17296
  if (p(E, j))
17277
17297
  return _ = E;
17278
17298
  }
17279
17299
  return _ = j;
17280
17300
  }
17281
- if (E = _, r(w, j))
17301
+ if (E = _, r(C, j))
17282
17302
  return E;
17283
- var C = m(j);
17284
- return p !== void 0 && p(E, C) ? (w = j, E) : (w = j, _ = C);
17303
+ var w = m(j);
17304
+ return p !== void 0 && p(E, w) ? (C = j, E) : (C = j, _ = w);
17285
17305
  }
17286
- var b = !1, w, _, R = d === void 0 ? null : d;
17306
+ var b = !1, C, _, R = d === void 0 ? null : d;
17287
17307
  return [
17288
17308
  function() {
17289
17309
  return y(f());
@@ -17306,14 +17326,14 @@ function m_() {
17306
17326
  })()), Cs;
17307
17327
  }
17308
17328
  var zl;
17309
- function p_() {
17310
- return zl || (zl = 1, process.env.NODE_ENV === "production" ? kr.exports = f_() : kr.exports = m_()), kr.exports;
17329
+ function x_() {
17330
+ return zl || (zl = 1, process.env.NODE_ENV === "production" ? kr.exports = h_() : kr.exports = v_()), kr.exports;
17311
17331
  }
17312
- var g_ = p_();
17313
- function h_(e, t) {
17332
+ var y_ = x_();
17333
+ function b_(e, t) {
17314
17334
  return e === t;
17315
17335
  }
17316
- function Rt(e, t, n = h_) {
17336
+ function Rt(e, t, n = b_) {
17317
17337
  const r = se(
17318
17338
  (i) => {
17319
17339
  if (!e)
@@ -17324,7 +17344,7 @@ function Rt(e, t, n = h_) {
17324
17344
  },
17325
17345
  [e]
17326
17346
  ), o = se(() => e?.get(), [e]);
17327
- return g_.useSyncExternalStoreWithSelector(
17347
+ return y_.useSyncExternalStoreWithSelector(
17328
17348
  r,
17329
17349
  o,
17330
17350
  o,
@@ -17333,7 +17353,7 @@ function Rt(e, t, n = h_) {
17333
17353
  );
17334
17354
  }
17335
17355
  const un = typeof window < "u" ? Hl : Oe;
17336
- function v_(e) {
17356
+ function w_(e) {
17337
17357
  const [t, n] = ee(() => ({
17338
17358
  form: e.form,
17339
17359
  name: e.name
@@ -17401,21 +17421,21 @@ function v_(e) {
17401
17421
  r.update(e);
17402
17422
  }), m;
17403
17423
  }
17404
- const x_ = (({
17424
+ const C_ = (({
17405
17425
  children: e,
17406
17426
  ...t
17407
17427
  }) => {
17408
- const n = v_(t), r = le(
17428
+ const n = w_(t), r = le(
17409
17429
  () => Do(e, n),
17410
17430
  [e, n]
17411
17431
  );
17412
17432
  return /* @__PURE__ */ a.jsx(a.Fragment, { children: r });
17413
17433
  });
17414
- function y_() {
17434
+ function S_() {
17415
17435
  return ee(() => Zf())[0];
17416
17436
  }
17417
- const b_ = v, w_ = v.version.split(".")[0] === "17" ? y_ : b_.useId;
17418
- function C_({
17437
+ const __ = v, j_ = v.version.split(".")[0] === "17" ? S_ : __.useId;
17438
+ function R_({
17419
17439
  form: e,
17420
17440
  selector: t = (r) => r,
17421
17441
  children: n
@@ -17423,8 +17443,8 @@ function C_({
17423
17443
  const r = Rt(e.store, t);
17424
17444
  return /* @__PURE__ */ a.jsx(a.Fragment, { children: Do(n, r) });
17425
17445
  }
17426
- function S_(e) {
17427
- const t = w_(), [n, r] = ee(e?.formId), [o, s] = ee(() => new $l({ ...e, formId: e?.formId ?? t }));
17446
+ function E_(e) {
17447
+ const t = j_(), [n, r] = ee(e?.formId), [o, s] = ee(() => new $l({ ...e, formId: e?.formId ?? t }));
17428
17448
  if (n !== e?.formId) {
17429
17449
  const c = e?.formId ?? t;
17430
17450
  s(new $l({ ...e, formId: c })), r(c);
@@ -17442,10 +17462,10 @@ function S_(e) {
17442
17462
  }
17443
17463
  };
17444
17464
  return c.Field = function(f) {
17445
- return /* @__PURE__ */ a.jsx(x_, { ...f, form: o });
17465
+ return /* @__PURE__ */ a.jsx(C_, { ...f, form: o });
17446
17466
  }, c.Subscribe = function(f) {
17447
17467
  return /* @__PURE__ */ a.jsx(
17448
- C_,
17468
+ R_,
17449
17469
  {
17450
17470
  form: o,
17451
17471
  selector: f.selector,
@@ -17459,12 +17479,12 @@ function S_(e) {
17459
17479
  });
17460
17480
  const l = Ie(!1);
17461
17481
  return un(() => {
17462
- l.current && e?.transform && d_(o, e.transform);
17482
+ l.current && e?.transform && g_(o, e.transform);
17463
17483
  }, [o, e?.transform]), un(() => {
17464
17484
  l.current = !0;
17465
17485
  }), i;
17466
17486
  }
17467
- function __(e, t, n) {
17487
+ function M_(e, t, n) {
17468
17488
  const r = Ke(), o = le(
17469
17489
  () => e?.data?.find((u) => u.graphQlName === t),
17470
17490
  [e, t]
@@ -17486,8 +17506,8 @@ function __(e, t, n) {
17486
17506
  data: c?.values?.data ?? []
17487
17507
  };
17488
17508
  }
17489
- const j_ = 500;
17490
- function R_(e, t, n) {
17509
+ const N_ = 500;
17510
+ function T_(e, t, n) {
17491
17511
  const r = Ke(), o = le(
17492
17512
  () => e?.data?.find((d) => d.graphQlName === t),
17493
17513
  [e, t]
@@ -17495,7 +17515,7 @@ function R_(e, t, n) {
17495
17515
  if (!o) return "";
17496
17516
  const d = o.labelColumn ?? n[0], m = new Set(n);
17497
17517
  return m.add(d), Array.from(m).join(" ");
17498
- }, [o, n]), i = le(() => e.loading || e.error || !o || n.length === 0 ? null : `query Get_${t}_CompositeRef { values: ${t}(limit: ${j_}) { data { ${s} } } }`, [o, t, s, e.loading, e.error, n.length]), { isLoading: l, error: c, data: u } = ut({
17518
+ }, [o, n]), i = le(() => e.loading || e.error || !o || n.length === 0 ? null : `query Get_${t}_CompositeRef { values: ${t}(limit: ${N_}) { data { ${s} } } }`, [o, t, s, e.loading, e.error, n.length]), { isLoading: l, error: c, data: u } = ut({
17499
17519
  queryKey: ["compositeTableRef", t, n.join("|")],
17500
17520
  queryFn: () => r.query(i),
17501
17521
  enabled: !!i
@@ -17531,7 +17551,7 @@ function Rn({
17531
17551
  }
17532
17552
  );
17533
17553
  }
17534
- function E_({
17554
+ function k_({
17535
17555
  name: e,
17536
17556
  label: t,
17537
17557
  value: n,
@@ -17546,7 +17566,7 @@ function E_({
17546
17566
  b && (b.style.height = "auto", b.style.height = Math.min(b.scrollHeight, 400) + "px");
17547
17567
  }, []);
17548
17568
  if (Oe(g, [n, g]), c)
17549
- return /* @__PURE__ */ a.jsx(M_, { name: e, label: t, value: n });
17569
+ return /* @__PURE__ */ a.jsx(P_, { name: e, label: t, value: n });
17550
17570
  if (!u && f === "text")
17551
17571
  return null;
17552
17572
  const h = () => {
@@ -17627,7 +17647,7 @@ function E_({
17627
17647
  d && /* @__PURE__ */ a.jsx("p", { className: "text-xs text-destructive", children: d })
17628
17648
  ] });
17629
17649
  }
17630
- function M_({ name: e, label: t, value: n }) {
17650
+ function P_({ name: e, label: t, value: n }) {
17631
17651
  const r = n ? Math.ceil(n.length * 3 / 4) : 0, o = r < 1024 ? `${r} bytes` : r < 1024 * 1024 ? `${(r / 1024).toFixed(1)} KB` : `${(r / (1024 * 1024)).toFixed(1)} MB`, s = n ? n.slice(0, 256) + (n.length > 256 ? "..." : "") : "(empty)";
17632
17652
  return /* @__PURE__ */ a.jsxs("div", { className: "grid gap-2", children: [
17633
17653
  /* @__PURE__ */ a.jsxs(Rn, { htmlFor: e, className: "flex items-center gap-1.5", children: [
@@ -17643,8 +17663,8 @@ function M_({ name: e, label: t, value: n }) {
17643
17663
  /* @__PURE__ */ a.jsx("p", { className: "text-xs text-muted-foreground", children: "Binary fields are read-only in this editor." })
17644
17664
  ] });
17645
17665
  }
17646
- const Ss = ["Boolean", "Boolean!"], tm = ["DateTime", "DateTime!"], N_ = ["Int", "Int!", "Float", "Float!"], _s = { filterText: "", variables: {}, params: [] };
17647
- function T_(e, t) {
17666
+ const Ss = ["Boolean", "Boolean!"], tm = ["DateTime", "DateTime!"], F_ = ["Int", "Int!", "Float", "Float!"], _s = { filterText: "", variables: {}, params: [] };
17667
+ function I_(e, t) {
17648
17668
  return le(() => {
17649
17669
  const n = e?.data?.find((l) => l.graphQlName == t), o = n.columns.filter((l) => !l.isReadOnly && !l.isIdentity).map((l) => {
17650
17670
  const c = n.singleJoins.find((f) => f.sourceColumnNames[0] === l.graphQlName);
@@ -17664,14 +17684,14 @@ function T_(e, t) {
17664
17684
  ];
17665
17685
  }, [e, t]);
17666
17686
  }
17667
- function k_({ table: e, schema: t, editid: n }) {
17668
- const r = Kn(), o = Ke(), s = n === void 0 || n === "", [i, l, c] = T_(t, e), u = i.labelColumn, f = i.label, d = qf(i, l, c, n), m = le(() => {
17687
+ function A_({ table: e, schema: t, editid: n }) {
17688
+ const r = Kn(), o = Ke(), s = n === void 0 || n === "", [i, l, c] = I_(t, e), u = i.labelColumn, f = i.label, d = qf(i, l, c, n), m = le(() => {
17669
17689
  if (s) return _s;
17670
- const C = Yi(n, i);
17671
- return C ? Ff(C, i) ?? _s : _s;
17690
+ const w = Yi(n, i);
17691
+ return w ? Ff(w, i) ?? _s : _s;
17672
17692
  }, [s, n, i]), p = le(() => {
17673
- const C = m.params.length > 0 ? m.params.join(", ") : "";
17674
- return `query GetSingleEdit_${i.name}(${C}){
17693
+ const w = m.params.length > 0 ? m.params.join(", ") : "";
17694
+ return `query GetSingleEdit_${i.name}(${w}){
17675
17695
  value: ${i.name}(filter: ${m.filterText || "{}"}) {
17676
17696
  data { ${l.map(({ column: N }) => N.name).join(" ")} }
17677
17697
  }
@@ -17681,17 +17701,17 @@ function k_({ table: e, schema: t, editid: n }) {
17681
17701
  queryFn: () => o.query(p, m.variables),
17682
17702
  enabled: !!i && !s && m.filterText !== ""
17683
17703
  }), y = le(() => x?.value?.data?.at(0) ?? {}, [x]), b = le(() => {
17684
- const C = {};
17704
+ const w = {};
17685
17705
  for (const { column: N } of l)
17686
17706
  if (tm.some((M) => M === N.paramType)) {
17687
17707
  const M = y[N.name]?.split("T")?.[0];
17688
- C[N.name] = M === "0001-01-01" ? "" : M ?? "";
17689
- } else Ss.some((M) => M === N.paramType) ? C[N.name] = !!y[N.name] : C[N.name] = y[N.name] ?? "";
17690
- return C;
17691
- }, [y, l]), w = S_({
17708
+ w[N.name] = M === "0001-01-01" ? "" : M ?? "";
17709
+ } else Ss.some((M) => M === N.paramType) ? w[N.name] = !!y[N.name] : w[N.name] = y[N.name] ?? "";
17710
+ return w;
17711
+ }, [y, l]), C = E_({
17692
17712
  defaultValues: b,
17693
- onSubmit: async ({ value: C }) => {
17694
- await (s ? d.insert : d.update)({ ...C }), r("../..");
17713
+ onSubmit: async ({ value: w }) => {
17714
+ await (s ? d.insert : d.update)({ ...w }), r("../..");
17695
17715
  }
17696
17716
  });
17697
17717
  if (g && !s) return null;
@@ -17699,11 +17719,11 @@ function k_({ table: e, schema: t, editid: n }) {
17699
17719
  "Error: ",
17700
17720
  h.message
17701
17721
  ] });
17702
- const _ = y?.[u] ?? n, R = l.filter(({ column: C }) => Ss.some((N) => N === C.paramType)), j = l.filter(({ column: C }) => Wn(C.dbType) || io(C.dbType)), E = l.filter(
17703
- ({ column: C }) => !Ss.some((N) => N === C.paramType) && !Wn(C.dbType) && !io(C.dbType)
17722
+ const _ = y?.[u] ?? n, R = l.filter(({ column: w }) => Ss.some((N) => N === w.paramType)), j = l.filter(({ column: w }) => Wn(w.dbType) || io(w.dbType)), E = l.filter(
17723
+ ({ column: w }) => !Ss.some((N) => N === w.paramType) && !Wn(w.dbType) && !io(w.dbType)
17704
17724
  );
17705
- return /* @__PURE__ */ a.jsx(cr, { open: !0, onOpenChange: (C) => {
17706
- C || r("../..");
17725
+ return /* @__PURE__ */ a.jsx(cr, { open: !0, onOpenChange: (w) => {
17726
+ w || r("../..");
17707
17727
  }, children: /* @__PURE__ */ a.jsxs(
17708
17728
  ur,
17709
17729
  {
@@ -17739,25 +17759,25 @@ function k_({ table: e, schema: t, editid: n }) {
17739
17759
  /* @__PURE__ */ a.jsxs(
17740
17760
  "form",
17741
17761
  {
17742
- onSubmit: (C) => {
17743
- C.preventDefault(), C.stopPropagation(), w.handleSubmit();
17762
+ onSubmit: (w) => {
17763
+ w.preventDefault(), w.stopPropagation(), C.handleSubmit();
17744
17764
  },
17745
17765
  className: "flex flex-col flex-1 min-h-0",
17746
17766
  children: [
17747
17767
  /* @__PURE__ */ a.jsxs("div", { className: "flex-1 overflow-y-auto px-5 py-4", children: [
17748
- E.length > 0 && /* @__PURE__ */ a.jsx("div", { className: "grid grid-cols-1 sm:grid-cols-2 gap-x-4 gap-y-3", children: E.map(({ column: C, join: N, fkRole: M }) => /* @__PURE__ */ a.jsx(
17749
- I_,
17768
+ E.length > 0 && /* @__PURE__ */ a.jsx("div", { className: "grid grid-cols-1 sm:grid-cols-2 gap-x-4 gap-y-3", children: E.map(({ column: w, join: N, fkRole: M }) => /* @__PURE__ */ a.jsx(
17769
+ D_,
17750
17770
  {
17751
- column: C,
17771
+ column: w,
17752
17772
  join: N,
17753
17773
  fkRole: M,
17754
- form: w,
17774
+ form: C,
17755
17775
  schema: t
17756
17776
  },
17757
- C.name
17777
+ w.name
17758
17778
  )) }),
17759
- R.length > 0 && /* @__PURE__ */ a.jsx("div", { className: E.length > 0 ? "mt-4 pt-4 border-t border-border" : "", children: /* @__PURE__ */ a.jsx("div", { className: "flex flex-wrap gap-x-6 gap-y-2", children: R.map(({ column: C }) => /* @__PURE__ */ a.jsx($_, { column: C, form: w }, C.name)) }) }),
17760
- j.length > 0 && /* @__PURE__ */ a.jsx("div", { className: E.length > 0 || R.length > 0 ? "mt-4 pt-4 border-t border-border" : "", children: /* @__PURE__ */ a.jsx("div", { className: "grid gap-3", children: j.map(({ column: C }) => /* @__PURE__ */ a.jsx(O_, { column: C, form: w }, C.name)) }) })
17779
+ R.length > 0 && /* @__PURE__ */ a.jsx("div", { className: E.length > 0 ? "mt-4 pt-4 border-t border-border" : "", children: /* @__PURE__ */ a.jsx("div", { className: "flex flex-wrap gap-x-6 gap-y-2", children: R.map(({ column: w }) => /* @__PURE__ */ a.jsx(V_, { column: w, form: C }, w.name)) }) }),
17780
+ j.length > 0 && /* @__PURE__ */ a.jsx("div", { className: E.length > 0 || R.length > 0 ? "mt-4 pt-4 border-t border-border" : "", children: /* @__PURE__ */ a.jsx("div", { className: "grid gap-3", children: j.map(({ column: w }) => /* @__PURE__ */ a.jsx(z_, { column: w, form: C }, w.name)) }) })
17761
17781
  ] }),
17762
17782
  /* @__PURE__ */ a.jsxs("div", { className: "flex items-center justify-end gap-2 px-5 py-3 border-t border-border bg-muted/30 shrink-0", children: [
17763
17783
  /* @__PURE__ */ a.jsx(Y, { variant: "outline", size: "sm", asChild: !0, children: /* @__PURE__ */ a.jsx(dn, { to: "../..", children: "Cancel" }) }),
@@ -17778,9 +17798,9 @@ function Pr() {
17778
17798
  return e ? n.loading ? /* @__PURE__ */ a.jsx("div", { children: "Loading..." }) : n.error ? /* @__PURE__ */ a.jsxs("div", { children: [
17779
17799
  "Error: ",
17780
17800
  n.error.message
17781
- ] }) : /* @__PURE__ */ a.jsx(k_, { table: e, schema: n, editid: t ?? "" }) : /* @__PURE__ */ a.jsx("div", { children: "Table missing" });
17801
+ ] }) : /* @__PURE__ */ a.jsx(A_, { table: e, schema: n, editid: t ?? "" }) : /* @__PURE__ */ a.jsx("div", { children: "Table missing" });
17782
17802
  }
17783
- function P_({ current: e, max: t }) {
17803
+ function $_({ current: e, max: t }) {
17784
17804
  const n = t - e, r = n <= 10 && n > 0, o = n <= 0;
17785
17805
  return /* @__PURE__ */ a.jsx("div", { className: "text-xs text-right mt-0.5", "aria-live": "polite", children: /* @__PURE__ */ a.jsxs(
17786
17806
  "span",
@@ -17794,18 +17814,18 @@ function P_({ current: e, max: t }) {
17794
17814
  }
17795
17815
  ) });
17796
17816
  }
17797
- function F_({ min: e, max: t, step: n }) {
17817
+ function O_({ min: e, max: t, step: n }) {
17798
17818
  if (e === void 0 && t === void 0) return null;
17799
17819
  let r = "";
17800
17820
  return e != null && t !== void 0 && t !== null ? r = `Range: ${e} to ${t}` : e != null ? r = `Min: ${e}` : t != null && (r = `Max: ${t}`), n != null && n !== 1 && (r += ` (step: ${n})`), /* @__PURE__ */ a.jsx("div", { className: "text-xs text-muted-foreground mt-0.5", "aria-live": "polite", children: r });
17801
17821
  }
17802
- function I_({ column: e, join: t, fkRole: n, form: r, schema: o }) {
17822
+ function D_({ column: e, join: t, fkRole: n, form: r, schema: o }) {
17803
17823
  const s = e.name, i = !e.isNullable;
17804
17824
  if (n === "member-composite") return null;
17805
- const l = tm.some((m) => m === e.paramType), c = N_.some((m) => m === e.paramType), u = e.maxLength && e.maxLength > 0 && !l && !c;
17825
+ const l = tm.some((m) => m === e.paramType), c = F_.some((m) => m === e.paramType), u = e.maxLength && e.maxLength > 0 && !l && !c;
17806
17826
  if (e.enumValues && e.enumValues.length > 0)
17807
17827
  return /* @__PURE__ */ a.jsx(
17808
- A_,
17828
+ L_,
17809
17829
  {
17810
17830
  column: e,
17811
17831
  form: r,
@@ -17813,7 +17833,7 @@ function I_({ column: e, join: t, fkRole: n, form: r, schema: o }) {
17813
17833
  }
17814
17834
  );
17815
17835
  if (t && o)
17816
- return n === "anchor-composite" ? /* @__PURE__ */ a.jsx(L_, { column: e, join: t, form: r, schema: o, isRequired: i }) : /* @__PURE__ */ a.jsx(D_, { column: e, join: t, form: r, schema: o, isRequired: i });
17836
+ return n === "anchor-composite" ? /* @__PURE__ */ a.jsx(H_, { column: e, join: t, form: r, schema: o, isRequired: i }) : /* @__PURE__ */ a.jsx(B_, { column: e, join: t, form: r, schema: o, isRequired: i });
17817
17837
  const f = e.inputType || (l ? "date" : c ? "number" : "text"), d = {
17818
17838
  onSubmit: ({ value: m }) => {
17819
17839
  if (i && (m == null || m === ""))
@@ -17866,19 +17886,19 @@ function I_({ column: e, join: t, fkRole: n, form: r, schema: o }) {
17866
17886
  }
17867
17887
  ),
17868
17888
  u && /* @__PURE__ */ a.jsx(
17869
- P_,
17889
+ $_,
17870
17890
  {
17871
17891
  current: String(m.state.value ?? "").length,
17872
17892
  max: e.maxLength
17873
17893
  }
17874
17894
  ),
17875
- c && (e.min !== void 0 || e.max !== void 0) && /* @__PURE__ */ a.jsx(F_, { min: e.min, max: e.max, step: e.step }),
17895
+ c && (e.min !== void 0 || e.max !== void 0) && /* @__PURE__ */ a.jsx(O_, { min: e.min, max: e.max, step: e.step }),
17876
17896
  /* @__PURE__ */ a.jsx(Lo, { errors: m.state.meta.errors })
17877
17897
  ] })
17878
17898
  }
17879
17899
  );
17880
17900
  }
17881
- function A_({ column: e, form: t, isRequired: n }) {
17901
+ function L_({ column: e, form: t, isRequired: n }) {
17882
17902
  const r = e.name, o = e.enumValues || [], s = e.enumLabels || o;
17883
17903
  return /* @__PURE__ */ a.jsx(
17884
17904
  t.Field,
@@ -17911,7 +17931,7 @@ function A_({ column: e, form: t, isRequired: n }) {
17911
17931
  }
17912
17932
  );
17913
17933
  }
17914
- function $_({ column: e, form: t }) {
17934
+ function V_({ column: e, form: t }) {
17915
17935
  const n = e.name;
17916
17936
  return /* @__PURE__ */ a.jsx(
17917
17937
  t.Field,
@@ -17932,7 +17952,7 @@ function $_({ column: e, form: t }) {
17932
17952
  }
17933
17953
  );
17934
17954
  }
17935
- function O_({ column: e, form: t }) {
17955
+ function z_({ column: e, form: t }) {
17936
17956
  const n = e.name, r = !e.isNullable;
17937
17957
  return /* @__PURE__ */ a.jsx(
17938
17958
  t.Field,
@@ -17950,7 +17970,7 @@ function O_({ column: e, form: t }) {
17950
17970
  r && /* @__PURE__ */ a.jsx("span", { className: "text-destructive ml-0.5", children: "*" })
17951
17971
  ] }),
17952
17972
  /* @__PURE__ */ a.jsx(
17953
- E_,
17973
+ k_,
17954
17974
  {
17955
17975
  name: n,
17956
17976
  label: e.label,
@@ -17967,8 +17987,8 @@ function O_({ column: e, form: t }) {
17967
17987
  }
17968
17988
  );
17969
17989
  }
17970
- function D_({ column: e, join: t, form: n, schema: r, isRequired: o }) {
17971
- const s = e.name, i = __(r, t.destinationTable, t.destinationColumnNames[0]);
17990
+ function B_({ column: e, join: t, form: n, schema: r, isRequired: o }) {
17991
+ const s = e.name, i = M_(r, t.destinationTable, t.destinationColumnNames[0]);
17972
17992
  return /* @__PURE__ */ a.jsx(
17973
17993
  n.Field,
17974
17994
  {
@@ -18000,8 +18020,8 @@ function D_({ column: e, join: t, form: n, schema: r, isRequired: o }) {
18000
18020
  }
18001
18021
  );
18002
18022
  }
18003
- function L_({ column: e, join: t, form: n, schema: r, isRequired: o }) {
18004
- const s = t.sourceColumnNames ?? [], i = t.destinationColumnNames ?? [], l = R_(r, t.destinationTable, i), c = n.useStore((f) => {
18023
+ function H_({ column: e, join: t, form: n, schema: r, isRequired: o }) {
18024
+ const s = t.sourceColumnNames ?? [], i = t.destinationColumnNames ?? [], l = T_(r, t.destinationTable, i), c = n.useStore((f) => {
18005
18025
  const d = [];
18006
18026
  for (const m of s) {
18007
18027
  const p = f.values?.[m];
@@ -18074,7 +18094,7 @@ class Fr extends Em {
18074
18094
  ] }) }) : r;
18075
18095
  }
18076
18096
  }
18077
- function V_() {
18097
+ function G_() {
18078
18098
  const { loading: e, error: t, data: n } = Ve();
18079
18099
  return e ? /* @__PURE__ */ a.jsxs("div", { className: "flex flex-col items-center justify-center h-full gap-3 text-muted-foreground", children: [
18080
18100
  /* @__PURE__ */ a.jsx(zn, { className: "size-10 animate-pulse" }),
@@ -18115,7 +18135,7 @@ function V_() {
18115
18135
  ] })
18116
18136
  ] });
18117
18137
  }
18118
- function z_({ children: e }) {
18138
+ function q_({ children: e }) {
18119
18139
  const { loading: t, error: n } = Ve();
18120
18140
  return t ? /* @__PURE__ */ a.jsxs("div", { className: "flex items-center justify-center flex-1 gap-3 text-muted-foreground", children: [
18121
18141
  /* @__PURE__ */ a.jsx(wt, { className: "size-6 animate-spin" }),
@@ -18133,9 +18153,9 @@ const Bl = () => /* @__PURE__ */ a.jsxs("div", { className: "flex items-center j
18133
18153
  /* @__PURE__ */ a.jsx(wt, { className: "size-4 animate-spin text-muted-foreground" }),
18134
18154
  /* @__PURE__ */ a.jsx("span", { className: "text-sm text-muted-foreground", children: "Loading..." })
18135
18155
  ] });
18136
- function B_() {
18156
+ function W_() {
18137
18157
  const [e, t] = ee(!0);
18138
- return /* @__PURE__ */ a.jsx(z_, { children: /* @__PURE__ */ a.jsx(DS, { children: /* @__PURE__ */ a.jsxs("div", { className: `grid h-full flex-1 min-h-0 grid-rows-[auto_1fr] ${e ? "grid-cols-[minmax(150px,min-content)_1fr]" : "grid-cols-[0px_1fr]"} md:grid-cols-[minmax(150px,min-content)_1fr] transition-[grid-template-columns] duration-200`, children: [
18158
+ return /* @__PURE__ */ a.jsx(q_, { children: /* @__PURE__ */ a.jsx(BS, { children: /* @__PURE__ */ a.jsxs("div", { className: `grid h-full flex-1 min-h-0 grid-rows-[auto_1fr] ${e ? "grid-cols-[minmax(150px,min-content)_1fr]" : "grid-cols-[0px_1fr]"} md:grid-cols-[minmax(150px,min-content)_1fr] transition-[grid-template-columns] duration-200`, children: [
18139
18159
  /* @__PURE__ */ a.jsxs("div", { className: "col-span-full sticky top-0 z-50 bg-background border-b border-border flex items-center", children: [
18140
18160
  /* @__PURE__ */ a.jsx(
18141
18161
  Y,
@@ -18164,7 +18184,7 @@ function B_() {
18164
18184
  /* @__PURE__ */ a.jsx(ke, { path: "/:table/:id", element: /* @__PURE__ */ a.jsx(an, {}) }),
18165
18185
  /* @__PURE__ */ a.jsx(ke, { path: "/:table/edit/:editid", element: /* @__PURE__ */ a.jsx(an, {}) }),
18166
18186
  /* @__PURE__ */ a.jsx(ke, { path: "/:table", element: /* @__PURE__ */ a.jsx(an, {}) }),
18167
- /* @__PURE__ */ a.jsx(ke, { path: "/", element: /* @__PURE__ */ a.jsx(V_, {}) })
18187
+ /* @__PURE__ */ a.jsx(ke, { path: "/", element: /* @__PURE__ */ a.jsx(G_, {}) })
18168
18188
  ] }) }) }),
18169
18189
  /* @__PURE__ */ a.jsx(Fr, { section: "Data Edit", children: /* @__PURE__ */ a.jsx(fa, { fallback: /* @__PURE__ */ a.jsx(Bl, {}), children: /* @__PURE__ */ a.jsxs(ts, { children: [
18170
18190
  /* @__PURE__ */ a.jsx(ke, { path: "/:table/from/:filterTable/:id/edit/:editid", element: /* @__PURE__ */ a.jsx(Pr, {}) }),
@@ -18175,13 +18195,13 @@ function B_() {
18175
18195
  ] })
18176
18196
  ] }) }) });
18177
18197
  }
18178
- function H_({ onLocate: e }) {
18198
+ function K_({ onLocate: e }) {
18179
18199
  const t = Dg();
18180
18200
  return Oe(() => {
18181
18201
  e?.(t);
18182
- }, [t, e]), /* @__PURE__ */ a.jsx(B_, {});
18202
+ }, [t, e]), /* @__PURE__ */ a.jsx(W_, {});
18183
18203
  }
18184
- function U_({
18204
+ function Q_({
18185
18205
  uri: e,
18186
18206
  fetcher: t,
18187
18207
  uiPath: n,
@@ -18195,11 +18215,11 @@ function U_({
18195
18215
  }
18196
18216
  }
18197
18217
  }), []);
18198
- return o ? /* @__PURE__ */ a.jsx(Nm, { client: s, children: /* @__PURE__ */ a.jsx(Yg, { value: o, children: /* @__PURE__ */ a.jsx(zg, { path: n || "/", children: /* @__PURE__ */ a.jsx(Zg, { children: /* @__PURE__ */ a.jsx(H_, { onLocate: r }) }) }) }) }) : /* @__PURE__ */ a.jsx("section", { children: "CONFIG MISSING..." });
18218
+ return o ? /* @__PURE__ */ a.jsx(Nm, { client: s, children: /* @__PURE__ */ a.jsx(Yg, { value: o, children: /* @__PURE__ */ a.jsx(zg, { path: n || "/", children: /* @__PURE__ */ a.jsx(Zg, { children: /* @__PURE__ */ a.jsx(K_, { onLocate: r }) }) }) }) }) : /* @__PURE__ */ a.jsx("section", { children: "CONFIG MISSING..." });
18199
18219
  }
18200
18220
  export {
18201
- U_ as Editor,
18221
+ Q_ as Editor,
18202
18222
  Ug as HttpGraphQLFetcher,
18203
- U_ as default,
18223
+ Q_ as default,
18204
18224
  qf as useTableMutation
18205
18225
  };