@snowcone-app/canvas 0.33.1 → 0.34.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (29) hide show
  1. package/dist/{ContextualToolbars-BrllZJTn.js → ContextualToolbars-BxnFwtTH.js} +3 -3
  2. package/dist/{ContextualToolbars-BrllZJTn.js.map → ContextualToolbars-BxnFwtTH.js.map} +1 -1
  3. package/dist/{EditorCanvasImpl-BiNG1dIj.js → EditorCanvasImpl-B9GjC1h6.js} +5 -5
  4. package/dist/{EditorCanvasImpl-BiNG1dIj.js.map → EditorCanvasImpl-B9GjC1h6.js.map} +1 -1
  5. package/dist/ImagePanel-Ih9e9cOQ.js +984 -0
  6. package/dist/ImagePanel-Ih9e9cOQ.js.map +1 -0
  7. package/dist/{SnowconeCanvas-DjQFFTDh.js → SnowconeCanvas-B4Nhk7JQ.js} +6 -6
  8. package/dist/{SnowconeCanvas-DjQFFTDh.js.map → SnowconeCanvas-B4Nhk7JQ.js.map} +1 -1
  9. package/dist/advanced.mjs +7 -7
  10. package/dist/components/ImageBrowserDrawer.d.ts +4 -1
  11. package/dist/contexts/CanvasServicesContext.d.ts +17 -1
  12. package/dist/{custom-icons-QEBlxVyq.js → custom-icons-CblWjgt-.js} +2 -2
  13. package/dist/{custom-icons-QEBlxVyq.js.map → custom-icons-CblWjgt-.js.map} +1 -1
  14. package/dist/{embed-C6kwN09N.js → embed-CxSoTDTw.js} +5 -5
  15. package/dist/{embed-C6kwN09N.js.map → embed-CxSoTDTw.js.map} +1 -1
  16. package/dist/embed.mjs +3 -3
  17. package/dist/index.mjs +5 -5
  18. package/dist/services/imageSearch.d.ts +24 -0
  19. package/dist/style.css +1 -1
  20. package/dist/{template-fields-xVQZRXvc.js → template-fields-ClO9mflO.js} +2 -2
  21. package/dist/{template-fields-xVQZRXvc.js.map → template-fields-ClO9mflO.js.map} +1 -1
  22. package/dist/{useCommands-DmewMc5w.js → useCommands-Bj9QHZ35.js} +513 -495
  23. package/dist/{useCommands-DmewMc5w.js.map → useCommands-Bj9QHZ35.js.map} +1 -1
  24. package/dist/{validation-CA6cMSOX.js → validation-BU8STi7a.js} +7 -7
  25. package/dist/{validation-CA6cMSOX.js.map → validation-BU8STi7a.js.map} +1 -1
  26. package/example/package.json +1 -1
  27. package/package.json +1 -1
  28. package/dist/ImagePanel-Ckpc6QqR.js +0 -951
  29. package/dist/ImagePanel-Ckpc6QqR.js.map +0 -1
@@ -2,7 +2,7 @@ import { jsx as f, jsxs as j, Fragment as an } from "react/jsx-runtime";
2
2
  import * as F from "react";
3
3
  import ne, { useRef as V, useState as B, useCallback as N, useMemo as J, useEffect as Y, forwardRef as $n, createElement as En, useLayoutEffect as Hn, memo as ei, useReducer as ti, useContext as Be, createContext as Xe, cloneElement as ni, useId as Pr, useSyncExternalStore as $r } from "react";
4
4
  import { u as qt, k as ri, r as oi, m as Hr, f as ii, i as si } from "./design-builder-D4izkvlb.js";
5
- import { G as Re, c as Qe, E as rt, D as ai, H as ln, I as li, P as ci, S as di, T as ui, J as fi, C as hi, K as pi, L as gi, U as sr } from "./FontAnalyzer-BrKY6XYn.js";
5
+ import { G as Ie, c as Qe, E as rt, D as ai, H as ln, I as li, P as ci, S as di, T as ui, J as fi, C as hi, K as gi, L as pi, U as sr } from "./FontAnalyzer-BrKY6XYn.js";
6
6
  import { g as mi, I as cn, E as dn } from "./ExportManager-Ci81K6xA.js";
7
7
  import { createPortal as Bn, unstable_batchedUpdates as Ft } from "react-dom";
8
8
  import { clsx as Br } from "clsx";
@@ -566,9 +566,9 @@ async function ar(e, t = 64, n = "transparent") {
566
566
  function _r(e, t, n, r, o, i = 0, s = null) {
567
567
  return (i > 0 ? e : e.filter((l) => {
568
568
  const c = l.parentId ?? null;
569
- return l instanceof Re, c === null;
569
+ return l instanceof Ie, c === null;
570
570
  })).map((l) => {
571
- const c = l instanceof Re, u = t === l.id || n.includes(l.id), d = {
571
+ const c = l instanceof Ie, u = t === l.id || n.includes(l.id), d = {
572
572
  id: l.id,
573
573
  name: l.name || `Layer ${l.id.slice(0, 8)}`,
574
574
  type: l.transformType,
@@ -583,7 +583,7 @@ function _r(e, t, n, r, o, i = 0, s = null) {
583
583
  await o(l.id);
584
584
  }
585
585
  };
586
- return c && l instanceof Re && (d.children = _r(
586
+ return c && l instanceof Ie && (d.children = _r(
587
587
  l.children,
588
588
  t,
589
589
  n,
@@ -616,29 +616,29 @@ function xi(e = {}) {
616
616
  handleSelectionChange: u,
617
617
  handleElementUpdate: d,
618
618
  setMultiSelection: h,
619
- executeAddElement: g,
619
+ executeAddElement: p,
620
620
  executeRemoveElement: k,
621
621
  executeReorderElement: y
622
- } = qt(), p = V(/* @__PURE__ */ new Map()), [m, S] = B(0), M = c.getActiveArtboardId(), L = t !== void 0 ? t : M, R = L ? (Oe = c.getArtboard) == null ? void 0 : Oe.call(c, L) : null, b = o ?? (R == null ? void 0 : R.backgroundColor) ?? "transparent", E = N(async (x) => {
622
+ } = qt(), g = V(/* @__PURE__ */ new Map()), [m, S] = B(0), M = c.getActiveArtboardId(), L = t !== void 0 ? t : M, I = L ? (Oe = c.getArtboard) == null ? void 0 : Oe.call(c, L) : null, b = o ?? (I == null ? void 0 : I.backgroundColor) ?? "transparent", E = N(async (x) => {
623
623
  const C = s.find((z) => z.id === x);
624
624
  if (!C) return;
625
- const I = await ar(C, r, b);
626
- p.current.set(x, I), S((z) => z + 1);
625
+ const R = await ar(C, r, b);
626
+ g.current.set(x, R), S((z) => z + 1);
627
627
  }, [s, r, b]), v = J(() => {
628
628
  let x = s;
629
629
  if (L) {
630
630
  const C = c.getElementsOnArtboard(L);
631
- x = x.filter((I) => C.includes(I.id));
631
+ x = x.filter((R) => C.includes(R.id));
632
632
  }
633
633
  return n || (x = x.filter((C) => C.visible !== !1)), x;
634
634
  }, [s, L, n, c]), D = J(() => _r(
635
635
  v,
636
636
  a,
637
637
  l,
638
- p.current,
638
+ g.current,
639
639
  E
640
640
  ), [v, a, l, E, m]), w = J(() => Wr(D), [D]), A = J(() => w.filter((x) => x.isSelected), [w]), T = N((x, C = !1) => {
641
- C ? l.includes(x) ? h(l.filter((I) => I !== x)) : h([...l, x]) : u(x);
641
+ C ? l.includes(x) ? h(l.filter((R) => R !== x)) : h([...l, x]) : u(x);
642
642
  }, [l, h, u]), O = N((x) => {
643
643
  h(x);
644
644
  }, [h]), W = N(() => {
@@ -646,25 +646,25 @@ function xi(e = {}) {
646
646
  }, [u, h]), ae = N((x) => {
647
647
  const C = s.find((z) => z.id === x);
648
648
  if (!C) return;
649
- const I = C.clone();
650
- I.visible = !(C.visible ?? !0), d(I);
649
+ const R = C.clone();
650
+ R.visible = !(C.visible ?? !0), d(R);
651
651
  }, [s, d]), _ = N((x) => {
652
652
  const C = s.find((z) => z.id === x);
653
653
  if (!C) return;
654
- const I = C.clone();
655
- I.locked = !(C.locked ?? !1), d(I);
654
+ const R = C.clone();
655
+ R.locked = !(C.locked ?? !1), d(R);
656
656
  }, [s, d]), X = N((x, C) => {
657
- const I = s.find((Z) => Z.id === x);
658
- if (!I) return;
659
- const z = I.clone();
657
+ const R = s.find((Z) => Z.id === x);
658
+ if (!R) return;
659
+ const z = R.clone();
660
660
  z.name = C, d(z);
661
661
  }, [s, d]), q = N((x) => {
662
- const C = s.find((I) => I.id === x);
662
+ const C = s.find((R) => R.id === x);
663
663
  if (!C) {
664
664
  re.warn(`Element ${x} not found for deletion`);
665
665
  return;
666
666
  }
667
- k(C), (a === x || l.includes(x)) && (u(null), h(l.filter((I) => I !== x)));
667
+ k(C), (a === x || l.includes(x)) && (u(null), h(l.filter((R) => R !== x)));
668
668
  }, [s, k, a, l, u, h]), te = N((x) => {
669
669
  const C = s.find((fe) => fe.id === x);
670
670
  if (!C) {
@@ -680,8 +680,8 @@ function xi(e = {}) {
680
680
  re.warn(`Element ${x} not associated with any artboard`);
681
681
  return;
682
682
  }
683
- g(H, Q, x), u(H.id);
684
- }, [s, c, g, u]), ge = N((x, C) => {
683
+ p(H, Q, x), u(H.id);
684
+ }, [s, c, p, u]), pe = N((x, C) => {
685
685
  if (x === C) return;
686
686
  if (x < 0 || x >= v.length) {
687
687
  re.warn(`Invalid fromIndex: ${x}`);
@@ -691,30 +691,30 @@ function xi(e = {}) {
691
691
  re.warn(`Invalid toIndex: ${C}`);
692
692
  return;
693
693
  }
694
- const I = v[x], z = v[C], Z = x < C ? "after" : "before";
695
- y(I.id, z.id, Z);
694
+ const R = v[x], z = v[C], Z = x < C ? "after" : "before";
695
+ y(R.id, z.id, Z);
696
696
  }, [v, y]), xe = N((x) => {
697
- const C = w.findIndex((I) => I.id === x);
697
+ const C = w.findIndex((R) => R.id === x);
698
698
  if (C < 0) {
699
699
  re.warn(`Layer ${x} not found`);
700
700
  return;
701
701
  }
702
- C >= w.length - 1 || ge(C, C + 1);
703
- }, [w, ge]), ie = N((x) => {
704
- const C = w.findIndex((I) => I.id === x);
702
+ C >= w.length - 1 || pe(C, C + 1);
703
+ }, [w, pe]), ie = N((x) => {
704
+ const C = w.findIndex((R) => R.id === x);
705
705
  if (C < 0) {
706
706
  re.warn(`Layer ${x} not found`);
707
707
  return;
708
708
  }
709
- C <= 0 || ge(C, C - 1);
710
- }, [w, ge]), de = N((x) => {
709
+ C <= 0 || pe(C, C - 1);
710
+ }, [w, pe]), de = N((x) => {
711
711
  const C = v[v.length - 1];
712
712
  if (!C) {
713
713
  re.warn(`Layer ${x} not found`);
714
714
  return;
715
715
  }
716
716
  if (C.id !== x) {
717
- if (!v.some((I) => I.id === x)) {
717
+ if (!v.some((R) => R.id === x)) {
718
718
  re.warn(`Layer ${x} not found`);
719
719
  return;
720
720
  }
@@ -727,7 +727,7 @@ function xi(e = {}) {
727
727
  return;
728
728
  }
729
729
  if (C.id !== x) {
730
- if (!v.some((I) => I.id === x)) {
730
+ if (!v.some((R) => R.id === x)) {
731
731
  re.warn(`Layer ${x} not found`);
732
732
  return;
733
733
  }
@@ -745,7 +745,7 @@ function xi(e = {}) {
745
745
  re.warn("Need at least 2 groupable elements (shapes cannot be grouped)");
746
746
  return;
747
747
  }
748
- const I = C.map((oe) => c.getArtboardIdForElement(oe.id)), z = [...new Set(I)];
748
+ const R = C.map((oe) => c.getArtboardIdForElement(oe.id)), z = [...new Set(R)];
749
749
  if (z.length !== 1 || !z[0]) {
750
750
  re.warn("All elements must be on the same artboard to group");
751
751
  return;
@@ -755,26 +755,26 @@ function xi(e = {}) {
755
755
  re.warn("Could not calculate bounding boxes for group");
756
756
  return;
757
757
  }
758
- const Q = Math.min(...H.map((oe) => oe.x)), fe = Math.min(...H.map((oe) => oe.y)), Le = new Re({
758
+ const Q = Math.min(...H.map((oe) => oe.x)), fe = Math.min(...H.map((oe) => oe.y)), Le = new Ie({
759
759
  x: Q,
760
760
  y: fe
761
761
  });
762
762
  Le.children = C.map((oe) => {
763
763
  const Se = oe.clone();
764
764
  return Se.x = oe.x - Q, Se.y = oe.y - fe, Se;
765
- }), C.forEach((oe) => k(oe)), g(Le, Z), u(Le.id), h([]);
766
- }, [s, c, k, g, u, h]), le = N((x) => {
765
+ }), C.forEach((oe) => k(oe)), p(Le, Z), u(Le.id), h([]);
766
+ }, [s, c, k, p, u, h]), le = N((x) => {
767
767
  const C = s.find((H) => H.id === x);
768
768
  if (!C) {
769
769
  re.warn(`Element ${x} not found for ungrouping`);
770
770
  return;
771
771
  }
772
- if (!(C instanceof Re)) {
772
+ if (!(C instanceof Ie)) {
773
773
  re.warn(`Element ${x} is not a group`);
774
774
  return;
775
775
  }
776
- const I = C;
777
- if (!I.children || I.children.length === 0) {
776
+ const R = C;
777
+ if (!R.children || R.children.length === 0) {
778
778
  re.warn(`Group ${x} has no children`);
779
779
  return;
780
780
  }
@@ -783,19 +783,19 @@ function xi(e = {}) {
783
783
  re.warn(`Group ${x} not associated with any artboard`);
784
784
  return;
785
785
  }
786
- const Z = I.children.map((H) => {
786
+ const Z = R.children.map((H) => {
787
787
  const Q = H.clone();
788
- return Q.x = H.x + I.x, Q.y = H.y + I.y, Q;
788
+ return Q.x = H.x + R.x, Q.y = H.y + R.y, Q;
789
789
  });
790
- k(I), Z.forEach((H) => g(H, z)), Z.length > 0 && u(Z[0].id), h([]);
791
- }, [s, c, k, g, u, h]), De = N(async (x = r) => {
792
- const C = async (I) => {
793
- for (const z of I) {
790
+ k(R), Z.forEach((H) => p(H, z)), Z.length > 0 && u(Z[0].id), h([]);
791
+ }, [s, c, k, p, u, h]), De = N(async (x = r) => {
792
+ const C = async (R) => {
793
+ for (const z of R) {
794
794
  const Z = await ar(z, x, b);
795
- p.current.set(z.id, Z), z instanceof Re && z.children.length > 0 && await C(z.children);
795
+ g.current.set(z.id, Z), z instanceof Ie && z.children.length > 0 && await C(z.children);
796
796
  }
797
797
  };
798
- await C(v), S((I) => I + 1);
798
+ await C(v), S((R) => R + 1);
799
799
  }, [r, b, v]);
800
800
  Y(() => {
801
801
  if (!i) return;
@@ -805,16 +805,16 @@ function xi(e = {}) {
805
805
  return () => clearTimeout(x);
806
806
  }, [i, De]);
807
807
  const ee = N(() => {
808
- p.current.clear();
808
+ g.current.clear();
809
809
  }, []), se = N(
810
- (x, C, I) => {
811
- y(x, C, I);
810
+ (x, C, R) => {
811
+ y(x, C, R);
812
812
  },
813
813
  [y]
814
814
  ), P = N(
815
- (x, C, I, z) => {
815
+ (x, C, R, z) => {
816
816
  const Z = s.find((ye) => ye.id === z);
817
- if (!Z || !(Z instanceof Re)) {
817
+ if (!Z || !(Z instanceof Ie)) {
818
818
  re.warn(`Group ${z} not found for reorder`);
819
819
  return;
820
820
  }
@@ -823,7 +823,7 @@ function xi(e = {}) {
823
823
  re.warn(`Children not found in group for reorder: ${x}, ${C}`);
824
824
  return;
825
825
  }
826
- const [Le] = H.children.splice(Q, 1), oe = H.children.findIndex((ye) => ye.id === C), Se = I === "before" ? oe : oe + 1;
826
+ const [Le] = H.children.splice(Q, 1), oe = H.children.findIndex((ye) => ye.id === C), Se = R === "before" ? oe : oe + 1;
827
827
  H.children.splice(Se, 0, Le), d(H);
828
828
  },
829
829
  [s, d]
@@ -831,9 +831,9 @@ function xi(e = {}) {
831
831
  (x) => {
832
832
  for (const C of s) {
833
833
  if (C.id === x) return C;
834
- if (C instanceof Re) {
835
- const I = C.children.find((z) => z.id === x);
836
- if (I) return I;
834
+ if (C instanceof Ie) {
835
+ const R = C.children.find((z) => z.id === x);
836
+ if (R) return R;
837
837
  }
838
838
  }
839
839
  return null;
@@ -842,25 +842,25 @@ function xi(e = {}) {
842
842
  ), ve = N(
843
843
  (x) => {
844
844
  for (const C of s)
845
- if (C instanceof Re && C.children.some((I) => I.id === x))
845
+ if (C instanceof Ie && C.children.some((R) => R.id === x))
846
846
  return C;
847
847
  return null;
848
848
  },
849
849
  [s]
850
850
  ), Ze = N(
851
851
  (x, C) => {
852
- const I = s.find((fe) => fe.id === x), z = s.find((fe) => fe.id === C);
853
- if (!I || !z || !(z instanceof Re)) {
852
+ const R = s.find((fe) => fe.id === x), z = s.find((fe) => fe.id === C);
853
+ if (!R || !z || !(z instanceof Ie)) {
854
854
  re.warn(`Cannot add ${x} to group ${C}`);
855
855
  return;
856
856
  }
857
857
  if (!c.getArtboardIdForElement(x)) return;
858
- const H = z.clone(), Q = I.clone();
859
- Q.x = I.x, Q.y = I.y, H.addChild(Q), k(I), d(H);
858
+ const H = z.clone(), Q = R.clone();
859
+ Q.x = R.x, Q.y = R.y, H.addChild(Q), k(R), d(H);
860
860
  },
861
861
  [s, c, k, d]
862
862
  ), ue = N(
863
- (x, C, I) => {
863
+ (x, C, R) => {
864
864
  const z = ve(x);
865
865
  if (!z) {
866
866
  re.warn(`Element ${x} is not inside a group`);
@@ -871,22 +871,22 @@ function xi(e = {}) {
871
871
  const H = c.getArtboardIdForElement(z.id);
872
872
  if (!H) return;
873
873
  const Q = Z.clone(), fe = z.clone();
874
- fe.removeChild(x), d(fe), C && I ? g(Q, H, I === "after" ? C : void 0, I === "before" ? C : void 0) : g(Q, H, void 0, z.id), u(Q.id);
874
+ fe.removeChild(x), d(fe), C && R ? p(Q, H, R === "after" ? C : void 0, R === "before" ? C : void 0) : p(Q, H, void 0, z.id), u(Q.id);
875
875
  },
876
- [ve, c, k, d, g, u]
876
+ [ve, c, k, d, p, u]
877
877
  ), Ve = N(() => {
878
878
  const x = c.getActiveArtboardId();
879
879
  if (!x) {
880
880
  re.warn("No active artboard for creating a group");
881
881
  return;
882
882
  }
883
- const C = new Re({
883
+ const C = new Ie({
884
884
  x: 0,
885
885
  y: 0,
886
886
  name: "New Group"
887
887
  });
888
- g(C, x), u(C.id);
889
- }, [c, g, u]);
888
+ p(C, x), u(C.id);
889
+ }, [c, p, u]);
890
890
  return {
891
891
  layers: D,
892
892
  flatLayers: w,
@@ -899,7 +899,7 @@ function xi(e = {}) {
899
899
  renameLayer: X,
900
900
  deleteLayer: q,
901
901
  duplicateLayer: te,
902
- reorderLayers: ge,
902
+ reorderLayers: pe,
903
903
  reorderById: se,
904
904
  reorderWithinGroup: P,
905
905
  moveLayerForward: xe,
@@ -1140,12 +1140,12 @@ function Ti(e, t = "defs") {
1140
1140
  content: e
1141
1141
  };
1142
1142
  }
1143
- function Ri(e, t) {
1143
+ function Ii(e, t) {
1144
1144
  return e ? "<defs>" + e + "</defs>" + t : t;
1145
1145
  }
1146
- function Ii(e, t, n) {
1146
+ function Ri(e, t, n) {
1147
1147
  const r = Ti(e);
1148
- return Ri(r.defs, t + r.content + n);
1148
+ return Ii(r.defs, t + r.content + n);
1149
1149
  }
1150
1150
  const Ni = (e) => e === "unset" || e === "undefined" || e === "none";
1151
1151
  function ro(e, t) {
@@ -1163,30 +1163,30 @@ function ro(e, t) {
1163
1163
  };
1164
1164
  let i = n.body;
1165
1165
  [n, r].forEach((y) => {
1166
- const p = [], m = y.hFlip, S = y.vFlip;
1166
+ const g = [], m = y.hFlip, S = y.vFlip;
1167
1167
  let M = y.rotate;
1168
- m ? S ? M += 2 : (p.push("translate(" + (o.width + o.left).toString() + " " + (0 - o.top).toString() + ")"), p.push("scale(-1 1)"), o.top = o.left = 0) : S && (p.push("translate(" + (0 - o.left).toString() + " " + (o.height + o.top).toString() + ")"), p.push("scale(1 -1)"), o.top = o.left = 0);
1168
+ m ? S ? M += 2 : (g.push("translate(" + (o.width + o.left).toString() + " " + (0 - o.top).toString() + ")"), g.push("scale(-1 1)"), o.top = o.left = 0) : S && (g.push("translate(" + (0 - o.left).toString() + " " + (o.height + o.top).toString() + ")"), g.push("scale(1 -1)"), o.top = o.left = 0);
1169
1169
  let L;
1170
1170
  switch (M < 0 && (M -= Math.floor(M / 4) * 4), M = M % 4, M) {
1171
1171
  case 1:
1172
- L = o.height / 2 + o.top, p.unshift("rotate(90 " + L.toString() + " " + L.toString() + ")");
1172
+ L = o.height / 2 + o.top, g.unshift("rotate(90 " + L.toString() + " " + L.toString() + ")");
1173
1173
  break;
1174
1174
  case 2:
1175
- p.unshift("rotate(180 " + (o.width / 2 + o.left).toString() + " " + (o.height / 2 + o.top).toString() + ")");
1175
+ g.unshift("rotate(180 " + (o.width / 2 + o.left).toString() + " " + (o.height / 2 + o.top).toString() + ")");
1176
1176
  break;
1177
1177
  case 3:
1178
- L = o.width / 2 + o.left, p.unshift("rotate(-90 " + L.toString() + " " + L.toString() + ")");
1178
+ L = o.width / 2 + o.left, g.unshift("rotate(-90 " + L.toString() + " " + L.toString() + ")");
1179
1179
  break;
1180
1180
  }
1181
- M % 2 === 1 && (o.left !== o.top && (L = o.left, o.left = o.top, o.top = L), o.width !== o.height && (L = o.width, o.width = o.height, o.height = L)), p.length && (i = Ii(i, '<g transform="' + p.join(" ") + '">', "</g>"));
1181
+ M % 2 === 1 && (o.left !== o.top && (L = o.left, o.left = o.top, o.top = L), o.width !== o.height && (L = o.width, o.width = o.height, o.height = L)), g.length && (i = Ri(i, '<g transform="' + g.join(" ") + '">', "</g>"));
1182
1182
  });
1183
1183
  const s = r.width, a = r.height, l = o.width, c = o.height;
1184
1184
  let u, d;
1185
1185
  s === null ? (d = a === null ? "1em" : a === "auto" ? c : a, u = Mn(d, l / c)) : (u = s === "auto" ? l : s, d = a === null ? Mn(u, c / l) : a === "auto" ? c : a);
1186
- const h = {}, g = (y, p) => {
1187
- Ni(p) || (h[y] = p.toString());
1186
+ const h = {}, p = (y, g) => {
1187
+ Ni(g) || (h[y] = g.toString());
1188
1188
  };
1189
- g("width", u), g("height", d);
1189
+ p("width", u), p("height", d);
1190
1190
  const k = [
1191
1191
  o.left,
1192
1192
  o.top,
@@ -1444,8 +1444,8 @@ function Xi(e, t, n, r) {
1444
1444
  s = s.concat(b);
1445
1445
  } else s = e.resources.slice(i).concat(e.resources.slice(0, i));
1446
1446
  const a = Date.now();
1447
- let l = "pending", c = 0, u, d = null, h = [], g = [];
1448
- typeof r == "function" && g.push(r);
1447
+ let l = "pending", c = 0, u, d = null, h = [], p = [];
1448
+ typeof r == "function" && p.push(r);
1449
1449
  function k() {
1450
1450
  d && (clearTimeout(d), d = null);
1451
1451
  }
@@ -1454,8 +1454,8 @@ function Xi(e, t, n, r) {
1454
1454
  b.status === "pending" && (b.status = "aborted");
1455
1455
  }), h = [];
1456
1456
  }
1457
- function p(b, E) {
1458
- E && (g = []), typeof b == "function" && g.push(b);
1457
+ function g(b, E) {
1458
+ E && (p = []), typeof b == "function" && p.push(b);
1459
1459
  }
1460
1460
  function m() {
1461
1461
  return {
@@ -1464,12 +1464,12 @@ function Xi(e, t, n, r) {
1464
1464
  status: l,
1465
1465
  queriesSent: c,
1466
1466
  queriesPending: h.length,
1467
- subscribe: p,
1467
+ subscribe: g,
1468
1468
  abort: y
1469
1469
  };
1470
1470
  }
1471
1471
  function S() {
1472
- l = "failed", g.forEach((b) => {
1472
+ l = "failed", p.forEach((b) => {
1473
1473
  b(void 0, u);
1474
1474
  });
1475
1475
  }
@@ -1494,18 +1494,18 @@ function Xi(e, t, n, r) {
1494
1494
  return;
1495
1495
  }
1496
1496
  if (D) {
1497
- u = v, h.length || (s.length ? R() : S());
1497
+ u = v, h.length || (s.length ? I() : S());
1498
1498
  return;
1499
1499
  }
1500
1500
  if (k(), M(), !e.random) {
1501
1501
  const w = e.resources.indexOf(b.resource);
1502
1502
  w !== -1 && w !== e.index && (e.index = w);
1503
1503
  }
1504
- l = "completed", g.forEach((w) => {
1504
+ l = "completed", p.forEach((w) => {
1505
1505
  w(v);
1506
1506
  });
1507
1507
  }
1508
- function R() {
1508
+ function I() {
1509
1509
  if (l !== "pending") return;
1510
1510
  k();
1511
1511
  const b = s.shift();
@@ -1526,9 +1526,9 @@ function Xi(e, t, n, r) {
1526
1526
  L(E, v, D);
1527
1527
  }
1528
1528
  };
1529
- h.push(E), c++, d = setTimeout(R, e.rotate), n(b, t, E.callback);
1529
+ h.push(E), c++, d = setTimeout(I, e.rotate), n(b, t, E.callback);
1530
1530
  }
1531
- return setTimeout(R), m;
1531
+ return setTimeout(I), m;
1532
1532
  }
1533
1533
  function ao(e) {
1534
1534
  const t = {
@@ -1608,7 +1608,7 @@ function ts(e) {
1608
1608
  invalid: n
1609
1609
  };
1610
1610
  }
1611
- function pt(e, t, n) {
1611
+ function gt(e, t, n) {
1612
1612
  function r() {
1613
1613
  const o = e.pendingIcons;
1614
1614
  t.forEach((i) => {
@@ -1625,7 +1625,7 @@ function pt(e, t, n) {
1625
1625
  }
1626
1626
  r(), es(e);
1627
1627
  }
1628
- function pr(e, t) {
1628
+ function gr(e, t) {
1629
1629
  e instanceof Promise ? e.then((n) => {
1630
1630
  t(n);
1631
1631
  }).catch(() => {
@@ -1639,34 +1639,34 @@ function ns(e, t) {
1639
1639
  if (delete e.iconsToLoad, !o || !o.length) return;
1640
1640
  const i = e.loadIcon;
1641
1641
  if (e.loadIcons && (o.length > 1 || !i)) {
1642
- pr(e.loadIcons(o, r, n), (u) => {
1643
- pt(e, o, u);
1642
+ gr(e.loadIcons(o, r, n), (u) => {
1643
+ gt(e, o, u);
1644
1644
  });
1645
1645
  return;
1646
1646
  }
1647
1647
  if (i) {
1648
1648
  o.forEach((u) => {
1649
1649
  const d = i(u, r, n);
1650
- pr(d, (h) => {
1651
- const g = h ? {
1650
+ gr(d, (h) => {
1651
+ const p = h ? {
1652
1652
  prefix: r,
1653
1653
  icons: { [u]: h }
1654
1654
  } : null;
1655
- pt(e, [u], g);
1655
+ gt(e, [u], p);
1656
1656
  });
1657
1657
  });
1658
1658
  return;
1659
1659
  }
1660
1660
  const { valid: s, invalid: a } = ts(o);
1661
- if (a.length && pt(e, a, null), !s.length) return;
1661
+ if (a.length && gt(e, a, null), !s.length) return;
1662
1662
  const l = r.match(Xr) ? Ln(n) : null;
1663
1663
  if (!l) {
1664
- pt(e, s, null);
1664
+ gt(e, s, null);
1665
1665
  return;
1666
1666
  }
1667
1667
  l.prepare(n, r, s).forEach((u) => {
1668
1668
  Zi(n, u, (d) => {
1669
- pt(e, u.icons, d);
1669
+ gt(e, u.icons, d);
1670
1670
  });
1671
1671
  });
1672
1672
  }));
@@ -1690,8 +1690,8 @@ const lo = (e, t) => {
1690
1690
  const d = o[c] || (o[c] = /* @__PURE__ */ Object.create(null));
1691
1691
  d[u] || (d[u] = []);
1692
1692
  }), r.pending.forEach((l) => {
1693
- const { provider: c, prefix: u, name: d } = l, h = it(c, u), g = h.pendingIcons || (h.pendingIcons = /* @__PURE__ */ new Set());
1694
- g.has(d) || (g.add(d), o[c][u].push(d));
1693
+ const { provider: c, prefix: u, name: d } = l, h = it(c, u), p = h.pendingIcons || (h.pendingIcons = /* @__PURE__ */ new Set());
1694
+ p.has(d) || (p.add(d), o[c][u].push(d));
1695
1695
  }), i.forEach((l) => {
1696
1696
  const c = o[l.provider][l.prefix];
1697
1697
  c.length && ns(l, c);
@@ -1776,13 +1776,13 @@ const co = {
1776
1776
  xmlnsXlink: "http://www.w3.org/1999/xlink",
1777
1777
  "aria-hidden": !0,
1778
1778
  role: "img"
1779
- }, ps = {
1779
+ }, gs = {
1780
1780
  display: "inline-block"
1781
1781
  }, Tn = {
1782
1782
  backgroundColor: "currentColor"
1783
1783
  }, uo = {
1784
1784
  backgroundColor: "transparent"
1785
- }, gr = {
1785
+ }, pr = {
1786
1786
  Image: "var(--svg)",
1787
1787
  Repeat: "no-repeat",
1788
1788
  Size: "100% 100%"
@@ -1793,10 +1793,10 @@ const co = {
1793
1793
  };
1794
1794
  for (const e in mr) {
1795
1795
  const t = mr[e];
1796
- for (const n in gr)
1797
- t[e + n] = gr[n];
1796
+ for (const n in pr)
1797
+ t[e + n] = pr[n];
1798
1798
  }
1799
- const gs = {
1799
+ const ps = {
1800
1800
  ...co,
1801
1801
  inline: !0
1802
1802
  };
@@ -1804,25 +1804,25 @@ function vr(e) {
1804
1804
  return e + (e.match(/^[-0-9.]+$/) ? "px" : "");
1805
1805
  }
1806
1806
  const ms = (e, t, n) => {
1807
- const r = t.inline ? gs : co, o = rs(r, t), i = t.mode || "svg", s = {}, a = t.style || {}, l = {
1807
+ const r = t.inline ? ps : co, o = rs(r, t), i = t.mode || "svg", s = {}, a = t.style || {}, l = {
1808
1808
  ...i === "svg" ? hs : {}
1809
1809
  };
1810
1810
  if (n) {
1811
- const p = Kt(n, !1, !0);
1812
- if (p) {
1811
+ const g = Kt(n, !1, !0);
1812
+ if (g) {
1813
1813
  const m = ["iconify"], S = [
1814
1814
  "provider",
1815
1815
  "prefix"
1816
1816
  ];
1817
1817
  for (const M of S)
1818
- p[M] && m.push("iconify--" + p[M]);
1818
+ g[M] && m.push("iconify--" + g[M]);
1819
1819
  l.className = m.join(" ");
1820
1820
  }
1821
1821
  }
1822
- for (let p in t) {
1823
- const m = t[p];
1822
+ for (let g in t) {
1823
+ const m = t[g];
1824
1824
  if (m !== void 0)
1825
- switch (p) {
1825
+ switch (g) {
1826
1826
  // Properties to ignore
1827
1827
  case "icon":
1828
1828
  case "style":
@@ -1838,13 +1838,13 @@ const ms = (e, t, n) => {
1838
1838
  break;
1839
1839
  // Merge class names
1840
1840
  case "className":
1841
- l[p] = (l[p] ? l[p] + " " : "") + m;
1841
+ l[g] = (l[g] ? l[g] + " " : "") + m;
1842
1842
  break;
1843
1843
  // Boolean attributes
1844
1844
  case "inline":
1845
1845
  case "hFlip":
1846
1846
  case "vFlip":
1847
- o[p] = m === !0 || m === "true" || m === 1;
1847
+ o[g] = m === !0 || m === "true" || m === 1;
1848
1848
  break;
1849
1849
  // Flip as string: 'horizontal,vertical'
1850
1850
  case "flip":
@@ -1856,7 +1856,7 @@ const ms = (e, t, n) => {
1856
1856
  break;
1857
1857
  // Rotation as string
1858
1858
  case "rotate":
1859
- typeof m == "string" ? o[p] = ss(m) : typeof m == "number" && (o[p] = m);
1859
+ typeof m == "string" ? o[g] = ss(m) : typeof m == "number" && (o[g] = m);
1860
1860
  break;
1861
1861
  // Remove aria-hidden
1862
1862
  case "ariaHidden":
@@ -1865,7 +1865,7 @@ const ms = (e, t, n) => {
1865
1865
  break;
1866
1866
  // Copy missing property if it does not exist in customisations
1867
1867
  default:
1868
- r[p] === void 0 && (l[p] = m);
1868
+ r[g] === void 0 && (l[g] = m);
1869
1869
  }
1870
1870
  }
1871
1871
  const c = ro(e, o), u = c.attributes;
@@ -1874,22 +1874,22 @@ const ms = (e, t, n) => {
1874
1874
  ...s,
1875
1875
  ...a
1876
1876
  }, Object.assign(l, u);
1877
- let p = 0, m = t.id;
1877
+ let g = 0, m = t.id;
1878
1878
  return typeof m == "string" && (m = m.replace(/-/g, "_")), l.dangerouslySetInnerHTML = {
1879
- __html: fs(oo(c.body, m ? () => m + "ID" + p++ : "iconifyReact"))
1879
+ __html: fs(oo(c.body, m ? () => m + "ID" + g++ : "iconifyReact"))
1880
1880
  }, En("svg", l);
1881
1881
  }
1882
- const { body: d, width: h, height: g } = e, k = i === "mask" || (i === "bg" ? !1 : d.indexOf("currentColor") !== -1), y = as(d, {
1882
+ const { body: d, width: h, height: p } = e, k = i === "mask" || (i === "bg" ? !1 : d.indexOf("currentColor") !== -1), y = as(d, {
1883
1883
  ...u,
1884
1884
  width: h + "",
1885
- height: g + ""
1885
+ height: p + ""
1886
1886
  });
1887
1887
  return l.style = {
1888
1888
  ...s,
1889
1889
  "--svg": ds(y),
1890
1890
  width: vr(u.width),
1891
1891
  height: vr(u.height),
1892
- ...ps,
1892
+ ...gs,
1893
1893
  ...k ? Tn : uo,
1894
1894
  ...a
1895
1895
  }, En("span", l);
@@ -1929,8 +1929,8 @@ if (typeof document < "u" && typeof window < "u") {
1929
1929
  }
1930
1930
  function fo(e) {
1931
1931
  const [t, n] = B(!!e.ssr), [r, o] = B({});
1932
- function i(g) {
1933
- if (g) {
1932
+ function i(p) {
1933
+ if (p) {
1934
1934
  const k = e.icon;
1935
1935
  if (typeof k == "object")
1936
1936
  return {
@@ -1950,15 +1950,15 @@ function fo(e) {
1950
1950
  }
1951
1951
  const [s, a] = B(i(!!e.ssr));
1952
1952
  function l() {
1953
- const g = r.callback;
1954
- g && (g(), o({}));
1953
+ const p = r.callback;
1954
+ p && (p(), o({}));
1955
1955
  }
1956
- function c(g) {
1957
- if (JSON.stringify(s) !== JSON.stringify(g))
1958
- return l(), a(g), !0;
1956
+ function c(p) {
1957
+ if (JSON.stringify(s) !== JSON.stringify(p))
1958
+ return l(), a(p), !0;
1959
1959
  }
1960
1960
  function u() {
1961
- var g;
1961
+ var p;
1962
1962
  const k = e.icon;
1963
1963
  if (typeof k == "object") {
1964
1964
  c({
@@ -1973,11 +1973,11 @@ function fo(e) {
1973
1973
  data: y
1974
1974
  }))
1975
1975
  if (y === void 0) {
1976
- const p = lo([k], u);
1976
+ const g = lo([k], u);
1977
1977
  o({
1978
- callback: p
1978
+ callback: g
1979
1979
  });
1980
- } else y && ((g = e.onLoad) === null || g === void 0 || g.call(e, k));
1980
+ } else y && ((p = e.onLoad) === null || p === void 0 || p.call(e, k));
1981
1981
  }
1982
1982
  Y(() => (n(!0), l), []), Y(() => {
1983
1983
  t && u();
@@ -2045,7 +2045,7 @@ class ys {
2045
2045
  }
2046
2046
  }
2047
2047
  const bs = new ys(), ws = Vr({ prefix: "sc" });
2048
- function Ie(...e) {
2048
+ function Re(...e) {
2049
2049
  return ws(Br(e));
2050
2050
  }
2051
2051
  const ho = F.createContext({ variant: "transparent" });
@@ -2063,13 +2063,13 @@ const ks = Ur("", {
2063
2063
  defaultVariants: {
2064
2064
  variant: "default"
2065
2065
  }
2066
- }), po = F.forwardRef(
2066
+ }), go = F.forwardRef(
2067
2067
  ({ className: e, variant: t = "default", asChild: n = !1, children: r, ...o }, i) => {
2068
2068
  const s = n ? vi : "div";
2069
- return /* @__PURE__ */ f(ho.Provider, { value: { variant: t ?? "default" }, children: /* @__PURE__ */ f(s, { ref: i, className: Ie(ks({ variant: t }), e), ...o, children: r }) });
2069
+ return /* @__PURE__ */ f(ho.Provider, { value: { variant: t ?? "default" }, children: /* @__PURE__ */ f(s, { ref: i, className: Re(ks({ variant: t }), e), ...o, children: r }) });
2070
2070
  }
2071
2071
  );
2072
- po.displayName = "Surface";
2072
+ go.displayName = "Surface";
2073
2073
  const Cs = Ur(
2074
2074
  "sc:inline-flex sc:items-center sc:justify-center sc:gap-2 sc:rounded-button sc:text-sm sc:transition-colors sc:focus-visible:outline-none sc:disabled:pointer-events-none sc:disabled:opacity-50 sc:font-button",
2075
2075
  {
@@ -2117,18 +2117,18 @@ const Cs = Ur(
2117
2117
  }
2118
2118
  ), st = F.forwardRef(
2119
2119
  ({ className: e, variant: t, size: n, onPress: r, isPending: o, onClick: i, disabled: s, selected: a, children: l, ...c }, u) => {
2120
- const { variant: d } = xs(), h = d === "default", g = d === "secondary", k = (p) => {
2121
- r && r(p), i && i(p);
2120
+ const { variant: d } = xs(), h = d === "default", p = d === "secondary", k = (g) => {
2121
+ r && r(g), i && i(g);
2122
2122
  }, y = {
2123
- secondary: t === "secondary" && (g ? "sc:bg-[var(--color-default-on-surface)] sc:hover:bg-[var(--color-default-on-surface)]/80" : h ? "sc:dark:bg-[var(--color-default-on-surface)] sc:dark:hover:bg-[var(--color-default-on-surface)]/80" : !1),
2124
- field: t === "field" && (g ? "sc:bg-[var(--color-field-on-surface)] sc:hover:bg-[var(--color-field-on-surface)]/80" : h ? "sc:dark:bg-[var(--color-field-on-surface)] sc:dark:hover:bg-[var(--color-field-on-surface)]/80" : !1),
2125
- ghost: t === "ghost" && (h || g) && "sc:hover:bg-[var(--color-default-on-surface)]",
2126
- outline: t === "outline" && (h || g) && "sc:hover:bg-[var(--color-default-on-surface)]"
2123
+ secondary: t === "secondary" && (p ? "sc:bg-[var(--color-default-on-surface)] sc:hover:bg-[var(--color-default-on-surface)]/80" : h ? "sc:dark:bg-[var(--color-default-on-surface)] sc:dark:hover:bg-[var(--color-default-on-surface)]/80" : !1),
2124
+ field: t === "field" && (p ? "sc:bg-[var(--color-field-on-surface)] sc:hover:bg-[var(--color-field-on-surface)]/80" : h ? "sc:dark:bg-[var(--color-field-on-surface)] sc:dark:hover:bg-[var(--color-field-on-surface)]/80" : !1),
2125
+ ghost: t === "ghost" && (h || p) && "sc:hover:bg-[var(--color-default-on-surface)]",
2126
+ outline: t === "outline" && (h || p) && "sc:hover:bg-[var(--color-default-on-surface)]"
2127
2127
  };
2128
2128
  return /* @__PURE__ */ f(
2129
2129
  "button",
2130
2130
  {
2131
- className: Ie(
2131
+ className: Re(
2132
2132
  Cs({ variant: t, size: n }),
2133
2133
  y.secondary,
2134
2134
  y.field,
@@ -2147,9 +2147,9 @@ const Cs = Ur(
2147
2147
  }
2148
2148
  );
2149
2149
  st.displayName = "Button";
2150
- const go = F.createContext(null);
2150
+ const po = F.createContext(null);
2151
2151
  function Wn() {
2152
- const e = F.useContext(go);
2152
+ const e = F.useContext(po);
2153
2153
  if (!e)
2154
2154
  throw new Error("Drawer components must be used within a Drawer");
2155
2155
  return e;
@@ -2174,7 +2174,7 @@ function mo({
2174
2174
  }, c);
2175
2175
  return () => clearTimeout(d);
2176
2176
  } else u.current && (u.current = !1, document.documentElement.hasAttribute("data-drawer-open") && (document.documentElement.removeAttribute("data-drawer-open"), window.dispatchEvent(new CustomEvent("drawer-close"))));
2177
- }, [a]), /* @__PURE__ */ f(go.Provider, { value: { open: a, onOpenChange: l }, children: r });
2177
+ }, [a]), /* @__PURE__ */ f(po.Provider, { value: { open: a, onOpenChange: l }, children: r });
2178
2178
  }
2179
2179
  mo.displayName = "Drawer";
2180
2180
  const Ss = F.forwardRef(
@@ -2220,14 +2220,14 @@ const vo = F.forwardRef(
2220
2220
  lockBodyScroll: u = !0,
2221
2221
  useDialogRole: d = !0,
2222
2222
  disableSwipeGestures: h = !1,
2223
- animationDuration: g = 500,
2223
+ animationDuration: p = 500,
2224
2224
  showScrollFade: k = !0,
2225
2225
  scrollFadeColor: y,
2226
- heightRatio: p,
2226
+ heightRatio: g,
2227
2227
  safeAreaPadding: m = !1,
2228
2228
  ...S
2229
2229
  }, M) => {
2230
- const { open: L, onOpenChange: R } = Wn(), [b, E] = F.useState(!1), [v, D] = F.useState(0), [w, A] = F.useState(!1), [T, O] = F.useState(!1), [W, ae] = F.useState(!1), [_, X] = F.useState(!1), q = F.useRef(null), te = F.useRef(null), ge = F.useRef(0), xe = F.useRef(0), [ie, de] = F.useState(!1), [je, ze] = F.useState(!1), le = F.useRef(!1), De = F.useRef(!0), ee = F.useRef(null), se = 120;
2230
+ const { open: L, onOpenChange: I } = Wn(), [b, E] = F.useState(!1), [v, D] = F.useState(0), [w, A] = F.useState(!1), [T, O] = F.useState(!1), [W, ae] = F.useState(!1), [_, X] = F.useState(!1), q = F.useRef(null), te = F.useRef(null), pe = F.useRef(0), xe = F.useRef(0), [ie, de] = F.useState(!1), [je, ze] = F.useState(!1), le = F.useRef(!1), De = F.useRef(!0), ee = F.useRef(null), se = 120;
2231
2231
  F.useEffect(() => {
2232
2232
  if (L) {
2233
2233
  const K = setTimeout(() => X(!0), se);
@@ -2270,11 +2270,11 @@ const vo = F.forwardRef(
2270
2270
  }, [L]);
2271
2271
  const ke = ie ? 10 : 0, ve = 50, Ze = 10, ue = F.useRef(null), Ve = F.useCallback(
2272
2272
  (K, he) => {
2273
- const be = window.scrollY, Rt = K - be, on = performance.now(), It = (ct) => {
2273
+ const be = window.scrollY, It = K - be, on = performance.now(), Rt = (ct) => {
2274
2274
  const Nt = ct - on, zt = Math.min(Nt / he, 1), Ot = 1 - Math.pow(1 - zt, 3);
2275
- window.scrollTo(0, be + Rt * Ot), zt < 1 && requestAnimationFrame(It);
2275
+ window.scrollTo(0, be + It * Ot), zt < 1 && requestAnimationFrame(Rt);
2276
2276
  };
2277
- requestAnimationFrame(It);
2277
+ requestAnimationFrame(Rt);
2278
2278
  },
2279
2279
  []
2280
2280
  ), Oe = 10;
@@ -2296,7 +2296,7 @@ const vo = F.forwardRef(
2296
2296
  ue.current = null, document.body.style.overflow = "", window.scrollTo(0, K);
2297
2297
  }
2298
2298
  }, [L, w]);
2299
- const x = 300, C = 200, I = 250, z = 150, Z = I + z, H = 50, Q = F.useCallback(() => {
2299
+ const x = 300, C = 200, R = 250, z = 150, Z = R + z, H = 50, Q = F.useCallback(() => {
2300
2300
  setTimeout(() => {
2301
2301
  A(!0), setTimeout(() => {
2302
2302
  document.body.style.overflow = "";
@@ -2306,11 +2306,11 @@ const vo = F.forwardRef(
2306
2306
  document.documentElement.removeAttribute("data-drawer-open"), window.dispatchEvent(new CustomEvent("drawer-close"));
2307
2307
  }, C), setTimeout(() => {
2308
2308
  O(!0);
2309
- }, I), setTimeout(() => {
2310
- A(!1), O(!1), R(!1);
2309
+ }, R), setTimeout(() => {
2310
+ A(!1), O(!1), I(!1);
2311
2311
  }, Z);
2312
2312
  }, H);
2313
- }, [R]);
2313
+ }, [I]);
2314
2314
  F.useEffect(() => {
2315
2315
  const K = (he) => {
2316
2316
  he.key === "Escape" && L && !w && Q();
@@ -2319,23 +2319,23 @@ const vo = F.forwardRef(
2319
2319
  }, [L, w, Q]);
2320
2320
  const fe = F.useCallback(
2321
2321
  (K) => {
2322
- h || (ge.current = K.touches[0].clientY, xe.current = 0, q.current && (q.current.style.transition = "none"));
2322
+ h || (pe.current = K.touches[0].clientY, xe.current = 0, q.current && (q.current.style.transition = "none"));
2323
2323
  },
2324
2324
  [h]
2325
2325
  ), Le = F.useCallback(
2326
2326
  (K) => {
2327
2327
  if (h) return;
2328
- const he = K.touches[0].clientY - ge.current;
2328
+ const he = K.touches[0].clientY - pe.current;
2329
2329
  xe.current = Math.max(0, he), q.current && (q.current.style.transform = `translateY(${xe.current}px)`);
2330
2330
  },
2331
2331
  [h]
2332
2332
  ), oe = F.useCallback(() => {
2333
2333
  if (h) return;
2334
- q.current && (q.current.style.transition = `transform ${g}ms cubic-bezier(0.32, 0.72, 0, 1)`, q.current.style.transform = ""), xe.current > 100 && Q();
2335
- }, [h, Q, g]);
2334
+ q.current && (q.current.style.transition = `transform ${p}ms cubic-bezier(0.32, 0.72, 0, 1)`, q.current.style.transform = ""), xe.current > 100 && Q();
2335
+ }, [h, Q, p]);
2336
2336
  if (!b || !L && !w) return null;
2337
2337
  const Se = _ || w, ye = {
2338
- "--animation-duration": `${g}ms`
2338
+ "--animation-duration": `${p}ms`
2339
2339
  };
2340
2340
  return Bn(
2341
2341
  // The .sc-root wrapper is load-bearing: a body portal escapes the
@@ -2359,7 +2359,7 @@ const vo = F.forwardRef(
2359
2359
  "div",
2360
2360
  {
2361
2361
  onClick: Q,
2362
- className: Ie(
2362
+ className: Re(
2363
2363
  "sc:absolute sc:inset-0 sc:backdrop-blur-lg",
2364
2364
  T && "sc:animate-out sc:fade-out"
2365
2365
  ),
@@ -2385,7 +2385,7 @@ const vo = F.forwardRef(
2385
2385
  Se && /* @__PURE__ */ f(
2386
2386
  "div",
2387
2387
  {
2388
- className: Ie(
2388
+ className: Re(
2389
2389
  "sc:sticky sc:left-0 sc:w-full sc:flex sc:pointer-events-none",
2390
2390
  n === "bottom" && "sc:items-end sc:justify-center",
2391
2391
  // Side drawers: stretch to full height unless custom height is set (then top-align with padding)
@@ -2397,18 +2397,18 @@ const vo = F.forwardRef(
2397
2397
  top: n === "bottom" ? ke : 0,
2398
2398
  transition: "top 10ms ease-out"
2399
2399
  },
2400
- children: /* @__PURE__ */ f(po, { asChild: !0, variant: "default", children: /* @__PURE__ */ j(
2400
+ children: /* @__PURE__ */ f(go, { asChild: !0, variant: "default", children: /* @__PURE__ */ j(
2401
2401
  "div",
2402
2402
  {
2403
2403
  ref: q,
2404
- className: Ie(
2404
+ className: Re(
2405
2405
  "sc:flex sc:flex-col sc:shadow-2xl sc:pointer-events-auto",
2406
2406
  // Bottom drawer: rounded top, full width
2407
2407
  n === "bottom" && "sc:rounded-t-3xl sc:w-full",
2408
2408
  // Left drawer: rounded right side, full height unless custom height
2409
- n === "left" && Ie("sc:rounded-r-2xl", !r && "sc:h-full"),
2409
+ n === "left" && Re("sc:rounded-r-2xl", !r && "sc:h-full"),
2410
2410
  // Right drawer: rounded left side, full height unless custom height
2411
- n === "right" && Ie("sc:rounded-l-2xl", !r && "sc:h-full"),
2411
+ n === "right" && Re("sc:rounded-l-2xl", !r && "sc:h-full"),
2412
2412
  // Animations based on placement
2413
2413
  n === "bottom" && (w ? "sc:animate-out sc:slide-out-to-bottom" : "sc:animate-in sc:slide-in-from-bottom"),
2414
2414
  n === "left" && (w ? "sc:animate-out sc:slide-out-to-left" : "sc:animate-in sc:slide-in-from-left"),
@@ -2418,8 +2418,8 @@ const vo = F.forwardRef(
2418
2418
  style: {
2419
2419
  // Bottom drawer: use height/maxHeight
2420
2420
  ...n === "bottom" ? {
2421
- height: p ? `${p * 100}vh` : r,
2422
- maxHeight: p || r ? void 0 : o
2421
+ height: g ? `${g * 100}vh` : r,
2422
+ maxHeight: g || r ? void 0 : o
2423
2423
  } : {},
2424
2424
  // Side drawers: use width/maxWidth, custom height or full height
2425
2425
  ...n !== "bottom" ? {
@@ -2427,7 +2427,7 @@ const vo = F.forwardRef(
2427
2427
  maxWidth: s,
2428
2428
  height: r || "100%"
2429
2429
  } : {},
2430
- animationDuration: w ? `${x}ms` : `${g}ms`,
2430
+ animationDuration: w ? `${x}ms` : `${p}ms`,
2431
2431
  animationTimingFunction: w ? "ease-in" : "cubic-bezier(0.32, 0.72, 0, 1)",
2432
2432
  animationFillMode: "forwards",
2433
2433
  ...ye
@@ -2441,7 +2441,7 @@ const vo = F.forwardRef(
2441
2441
  onTouchStart: fe,
2442
2442
  onTouchMove: Le,
2443
2443
  onTouchEnd: oe,
2444
- className: Ie(
2444
+ className: Re(
2445
2445
  "sc:cursor-grab sc:active:cursor-grabbing sc:flex-shrink-0",
2446
2446
  l && "sc:absolute sc:top-0 sc:left-0 sc:right-0 sc:h-8 sc:z-10"
2447
2447
  ),
@@ -2472,7 +2472,7 @@ const vo = F.forwardRef(
2472
2472
  k && /* @__PURE__ */ f(
2473
2473
  "div",
2474
2474
  {
2475
- className: Ie(
2475
+ className: Re(
2476
2476
  "sc:absolute sc:bottom-0 sc:left-0 sc:right-0 sc:h-20 sc:pointer-events-none sc:transition-opacity sc:duration-300 sc:z-10",
2477
2477
  W ? "sc:opacity-0" : "sc:opacity-100"
2478
2478
  ),
@@ -2507,7 +2507,7 @@ const yo = F.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ f(
2507
2507
  "h2",
2508
2508
  {
2509
2509
  ref: n,
2510
- className: Ie(
2510
+ className: Re(
2511
2511
  "sc:text-lg sc:font-semibold sc:leading-none sc:tracking-tight",
2512
2512
  e
2513
2513
  ),
@@ -2519,7 +2519,7 @@ const bo = F.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ f(
2519
2519
  "p",
2520
2520
  {
2521
2521
  ref: n,
2522
- className: Ie("sc:text-sm sc:text-muted-foreground", e),
2522
+ className: Re("sc:text-sm sc:text-muted-foreground", e),
2523
2523
  ...t
2524
2524
  }
2525
2525
  ));
@@ -2529,7 +2529,7 @@ const As = ot.Provider, Ms = ot.Root, Jt = ot.Trigger, At = F.forwardRef(({ clas
2529
2529
  {
2530
2530
  ref: r,
2531
2531
  sideOffset: t,
2532
- className: Ie(
2532
+ className: Re(
2533
2533
  "sc:z-tooltip sc:overflow-hidden sc:rounded-tooltip sc:bg-popover sc:px-3 sc:py-1.5 sc:text-xs sc:text-popover-foreground sc:shadow-md sc:animate-in sc:fade-in-0 sc:zoom-in-95 sc:font-caption",
2534
2534
  "sc:data-[state=closed]:animate-out sc:data-[state=closed]:fade-out-0 sc:data-[state=closed]:zoom-out-95",
2535
2535
  "sc:data-[side=bottom]:slide-in-from-top-2 sc:data-[side=left]:slide-in-from-right-2 sc:data-[side=right]:slide-in-from-left-2 sc:data-[side=top]:slide-in-from-bottom-2",
@@ -2543,7 +2543,7 @@ const Ds = ({ children: e, delayDuration: t, delay: n, ...r }) => /* @__PURE__ *
2543
2543
  Trigger: Jt,
2544
2544
  Content: At
2545
2545
  }), Ls = Vr({ prefix: "sc" });
2546
- function Rn(...e) {
2546
+ function In(...e) {
2547
2547
  return Ls(Br(e));
2548
2548
  }
2549
2549
  const Ts = {
@@ -2564,7 +2564,7 @@ const Ts = {
2564
2564
  // Filled variants are heavy
2565
2565
  "simple-icons": 0.95,
2566
2566
  "eos-icons": 1
2567
- }, Rs = 1, Is = {
2567
+ }, Is = 1, Rs = {
2568
2568
  "gravity-ui:arrow-rotate-left": { x: 4, y: 4 },
2569
2569
  "gravity-ui:arrow-rotate-right": { x: -4, y: 4 },
2570
2570
  "gravity-ui:sparkles": { x: 2, y: -2 }
@@ -2581,12 +2581,12 @@ function zs(e) {
2581
2581
  return t === -1 ? "" : e.substring(0, t);
2582
2582
  }
2583
2583
  function Os(e) {
2584
- return Ts[e] ?? Rs;
2584
+ return Ts[e] ?? Is;
2585
2585
  }
2586
2586
  function Fs(e) {
2587
- return Is[e] ?? null;
2587
+ return Rs[e] ?? null;
2588
2588
  }
2589
- function pn(e, t) {
2589
+ function gn(e, t) {
2590
2590
  const n = Os(t);
2591
2591
  return Math.round(e * n);
2592
2592
  }
@@ -2597,14 +2597,14 @@ const wo = ({
2597
2597
  }) => {
2598
2598
  const r = zs(e), o = Ns[t], i = Fs(e);
2599
2599
  if (typeof o == "object") {
2600
- const l = pn(o.mobile, r), c = pn(o.desktop, r), u = i ? {
2600
+ const l = gn(o.mobile, r), c = gn(o.desktop, r), u = i ? {
2601
2601
  x: i.x * l / 20,
2602
2602
  y: i.y * l / 20
2603
2603
  } : null;
2604
2604
  return /* @__PURE__ */ f(
2605
2605
  "span",
2606
2606
  {
2607
- className: Rn("sc-normalized-icon-responsive sc:inline-flex", n),
2607
+ className: In("sc-normalized-icon-responsive sc:inline-flex", n),
2608
2608
  style: {
2609
2609
  "--icon-size-mobile": `${l}px`,
2610
2610
  "--icon-size-desktop": `${c}px`,
@@ -2623,14 +2623,14 @@ const wo = ({
2623
2623
  }
2624
2624
  );
2625
2625
  }
2626
- const s = pn(o, r), a = i ? {
2626
+ const s = gn(o, r), a = i ? {
2627
2627
  x: i.x * s / 20,
2628
2628
  y: i.y * s / 20
2629
2629
  } : null;
2630
2630
  return /* @__PURE__ */ f(
2631
2631
  "span",
2632
2632
  {
2633
- className: Rn("sc:inline-flex", n),
2633
+ className: In("sc:inline-flex", n),
2634
2634
  style: { width: `${s}px`, height: `${s}px` },
2635
2635
  children: /* @__PURE__ */ f(
2636
2636
  $,
@@ -2645,7 +2645,7 @@ const wo = ({
2645
2645
  );
2646
2646
  };
2647
2647
  wo.displayName = "NormalizedIcon";
2648
- const In = ne.forwardRef(
2648
+ const Rn = ne.forwardRef(
2649
2649
  ({
2650
2650
  icon: e,
2651
2651
  onClick: t,
@@ -2672,7 +2672,7 @@ const In = ne.forwardRef(
2672
2672
  "data-active": n,
2673
2673
  "data-testid": a,
2674
2674
  onMouseLeave: u,
2675
- className: Rn(c),
2675
+ className: In(c),
2676
2676
  children: typeof e == "string" ? /* @__PURE__ */ f(wo, { icon: e, size: "toolbar" }) : e
2677
2677
  }
2678
2678
  );
@@ -2682,7 +2682,7 @@ const In = ne.forwardRef(
2682
2682
  ] });
2683
2683
  }
2684
2684
  );
2685
- In.displayName = "ToolbarButton";
2685
+ Rn.displayName = "ToolbarButton";
2686
2686
  const G = {
2687
2687
  // Navigation/Actions
2688
2688
  plus: "lucide:plus",
@@ -2781,25 +2781,25 @@ const G = {
2781
2781
  n && /* @__PURE__ */ f("span", { className: "sc:ml-auto sc:text-sm sc:text-text-muted", children: n }),
2782
2782
  r && !n && /* @__PURE__ */ f("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", className: "sc:ml-auto sc:shrink-0", children: /* @__PURE__ */ f("path", { d: "M13 4L6 11L3 8", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }) })
2783
2783
  ] });
2784
- }, gn = Qe("useArtboards"), js = () => {
2784
+ }, pn = Qe("useArtboards"), js = () => {
2785
2785
  const {
2786
2786
  artboards: e,
2787
2787
  artboardManager: t,
2788
2788
  refreshArtboards: n,
2789
2789
  setSelectedId: r,
2790
2790
  setMultiSelection: o
2791
- } = qt(), i = t.getActiveArtboardId(), s = t.getActiveArtboard(), a = J(() => e.map((p) => {
2792
- const S = t.getElementsOnArtboard(p.id).length;
2791
+ } = qt(), i = t.getActiveArtboardId(), s = t.getActiveArtboard(), a = J(() => e.map((g) => {
2792
+ const S = t.getElementsOnArtboard(g.id).length;
2793
2793
  return {
2794
- id: p.id,
2795
- name: p.name,
2796
- x: p.x,
2797
- y: p.y,
2798
- width: p.width,
2799
- height: p.height,
2800
- backgroundColor: p.backgroundColor,
2801
- clipShape: p.clipShape,
2802
- isActive: p.id === i,
2794
+ id: g.id,
2795
+ name: g.name,
2796
+ x: g.x,
2797
+ y: g.y,
2798
+ width: g.width,
2799
+ height: g.height,
2800
+ backgroundColor: g.backgroundColor,
2801
+ clipShape: g.clipShape,
2802
+ isActive: g.id === i,
2803
2803
  elementCount: S
2804
2804
  };
2805
2805
  }), [e, t, i]), l = J(() => {
@@ -2817,19 +2817,19 @@ const G = {
2817
2817
  isActive: !0,
2818
2818
  elementCount: m
2819
2819
  };
2820
- }, [s, t]), c = N((p = 1200, m = 1200, S) => {
2820
+ }, [s, t]), c = N((g = 1200, m = 1200, S) => {
2821
2821
  const M = {
2822
- width: p,
2822
+ width: g,
2823
2823
  height: m,
2824
2824
  ...S
2825
2825
  };
2826
2826
  t.createArtboard(M), n();
2827
- }, [t, n]), u = N((p) => {
2828
- t.deleteArtboard(p), n();
2829
- }, [t, n]), d = N((p) => {
2830
- const m = e.find((S) => S.id === p);
2827
+ }, [t, n]), u = N((g) => {
2828
+ t.deleteArtboard(g), n();
2829
+ }, [t, n]), d = N((g) => {
2830
+ const m = e.find((S) => S.id === g);
2831
2831
  if (!m) {
2832
- gn.warn(`[useArtboards] Artboard ${p} not found`);
2832
+ pn.warn(`[useArtboards] Artboard ${g} not found`);
2833
2833
  return;
2834
2834
  }
2835
2835
  t.createArtboard({
@@ -2839,24 +2839,24 @@ const G = {
2839
2839
  backgroundColor: m.backgroundColor,
2840
2840
  clipShape: m.clipShape
2841
2841
  }), n();
2842
- }, [e, t, n]), h = N((p, m) => {
2843
- const S = e.find((M) => M.id === p);
2842
+ }, [e, t, n]), h = N((g, m) => {
2843
+ const S = e.find((M) => M.id === g);
2844
2844
  if (!S) {
2845
- gn.warn(`[useArtboards] Artboard ${p} not found`);
2845
+ pn.warn(`[useArtboards] Artboard ${g} not found`);
2846
2846
  return;
2847
2847
  }
2848
2848
  S.name = m, n();
2849
- }, [e, n]), g = N((p, m) => {
2850
- const S = e.find((M) => M.id === p);
2849
+ }, [e, n]), p = N((g, m) => {
2850
+ const S = e.find((M) => M.id === g);
2851
2851
  if (!S) {
2852
- gn.warn(`[useArtboards] Artboard ${p} not found`);
2852
+ pn.warn(`[useArtboards] Artboard ${g} not found`);
2853
2853
  return;
2854
2854
  }
2855
2855
  m.name !== void 0 && (S.name = m.name), m.width !== void 0 && (S.width = m.width), m.height !== void 0 && (S.height = m.height), m.backgroundColor !== void 0 && (S.backgroundColor = m.backgroundColor), m.clipShape !== void 0 && (S.clipShape = m.clipShape), "distressTexture" in m && (S.distressTexture = m.distressTexture ? { ...m.distressTexture } : void 0), n();
2856
- }, [e, n]), k = N((p) => {
2857
- r(null), o([]), t.setActiveArtboard(p), n();
2858
- }, [t, n, r, o]), y = N((p, m) => {
2859
- p !== m && (p < 0 || p >= e.length || m < 0 || m >= e.length || ([...e], t.reorderArtboards(p, m), n()));
2856
+ }, [e, n]), k = N((g) => {
2857
+ r(null), o([]), t.setActiveArtboard(g), n();
2858
+ }, [t, n, r, o]), y = N((g, m) => {
2859
+ g !== m && (g < 0 || g >= e.length || m < 0 || m >= e.length || ([...e], t.reorderArtboards(g, m), n()));
2860
2860
  }, [e, t, n]);
2861
2861
  return {
2862
2862
  artboards: e,
@@ -2868,7 +2868,7 @@ const G = {
2868
2868
  deleteArtboard: u,
2869
2869
  duplicateArtboard: d,
2870
2870
  renameArtboard: h,
2871
- updateArtboard: g,
2871
+ updateArtboard: p,
2872
2872
  selectArtboard: k,
2873
2873
  reorderArtboards: y,
2874
2874
  count: e.length
@@ -3200,41 +3200,41 @@ function Js(e) {
3200
3200
  onDragMove(d) {
3201
3201
  let {
3202
3202
  active: h,
3203
- over: g
3203
+ over: p
3204
3204
  } = d;
3205
3205
  t.onDragMove && i(t.onDragMove({
3206
3206
  active: h,
3207
- over: g
3207
+ over: p
3208
3208
  }));
3209
3209
  },
3210
3210
  onDragOver(d) {
3211
3211
  let {
3212
3212
  active: h,
3213
- over: g
3213
+ over: p
3214
3214
  } = d;
3215
3215
  i(t.onDragOver({
3216
3216
  active: h,
3217
- over: g
3217
+ over: p
3218
3218
  }));
3219
3219
  },
3220
3220
  onDragEnd(d) {
3221
3221
  let {
3222
3222
  active: h,
3223
- over: g
3223
+ over: p
3224
3224
  } = d;
3225
3225
  i(t.onDragEnd({
3226
3226
  active: h,
3227
- over: g
3227
+ over: p
3228
3228
  }));
3229
3229
  },
3230
3230
  onDragCancel(d) {
3231
3231
  let {
3232
3232
  active: h,
3233
- over: g
3233
+ over: p
3234
3234
  } = d;
3235
3235
  i(t.onDragCancel({
3236
3236
  active: h,
3237
- over: g
3237
+ over: p
3238
3238
  }));
3239
3239
  }
3240
3240
  }), [i, t])), !l)
@@ -3382,7 +3382,7 @@ const ea = (e) => {
3382
3382
  id: a
3383
3383
  } = s, l = n.get(a);
3384
3384
  if (l) {
3385
- const c = Nn(l), u = o.reduce((h, g, k) => h + Xn(c[k], g), 0), d = Number((u / 4).toFixed(4));
3385
+ const c = Nn(l), u = o.reduce((h, p, k) => h + Xn(c[k], p), 0), d = Number((u / 4).toFixed(4));
3386
3386
  i.push({
3387
3387
  id: a,
3388
3388
  data: {
@@ -3619,14 +3619,14 @@ function zn(e) {
3619
3619
  y: Lo(e)
3620
3620
  };
3621
3621
  }
3622
- var pe;
3622
+ var ge;
3623
3623
  (function(e) {
3624
3624
  e[e.Forward = 1] = "Forward", e[e.Backward = -1] = "Backward";
3625
- })(pe || (pe = {}));
3625
+ })(ge || (ge = {}));
3626
3626
  function To(e) {
3627
3627
  return !Xt || !e ? !1 : e === document.scrollingElement;
3628
3628
  }
3629
- function Ro(e) {
3629
+ function Io(e) {
3630
3630
  const t = {
3631
3631
  x: 0,
3632
3632
  y: 0
@@ -3649,24 +3649,24 @@ function Ro(e) {
3649
3649
  minScroll: t
3650
3650
  };
3651
3651
  }
3652
- const pa = {
3652
+ const ga = {
3653
3653
  x: 0.2,
3654
3654
  y: 0.2
3655
3655
  };
3656
- function ga(e, t, n, r, o) {
3656
+ function pa(e, t, n, r, o) {
3657
3657
  let {
3658
3658
  top: i,
3659
3659
  left: s,
3660
3660
  right: a,
3661
3661
  bottom: l
3662
3662
  } = n;
3663
- r === void 0 && (r = 10), o === void 0 && (o = pa);
3663
+ r === void 0 && (r = 10), o === void 0 && (o = ga);
3664
3664
  const {
3665
3665
  isTop: c,
3666
3666
  isBottom: u,
3667
3667
  isLeft: d,
3668
3668
  isRight: h
3669
- } = Ro(e), g = {
3669
+ } = Io(e), p = {
3670
3670
  x: 0,
3671
3671
  y: 0
3672
3672
  }, k = {
@@ -3676,8 +3676,8 @@ function ga(e, t, n, r, o) {
3676
3676
  height: t.height * o.y,
3677
3677
  width: t.width * o.x
3678
3678
  };
3679
- return !c && i <= t.top + y.height ? (g.y = pe.Backward, k.y = r * Math.abs((t.top + y.height - i) / y.height)) : !u && l >= t.bottom - y.height && (g.y = pe.Forward, k.y = r * Math.abs((t.bottom - y.height - l) / y.height)), !h && a >= t.right - y.width ? (g.x = pe.Forward, k.x = r * Math.abs((t.right - y.width - a) / y.width)) : !d && s <= t.left + y.width && (g.x = pe.Backward, k.x = r * Math.abs((t.left + y.width - s) / y.width)), {
3680
- direction: g,
3679
+ return !c && i <= t.top + y.height ? (p.y = ge.Backward, k.y = r * Math.abs((t.top + y.height - i) / y.height)) : !u && l >= t.bottom - y.height && (p.y = ge.Forward, k.y = r * Math.abs((t.bottom - y.height - l) / y.height)), !h && a >= t.right - y.width ? (p.x = ge.Forward, k.x = r * Math.abs((t.right - y.width - a) / y.width)) : !d && s <= t.left + y.width && (p.x = ge.Backward, k.x = r * Math.abs((t.left + y.width - s) / y.width)), {
3680
+ direction: p,
3681
3681
  speed: k
3682
3682
  };
3683
3683
  }
@@ -3711,7 +3711,7 @@ function ma(e) {
3711
3711
  height: e.clientHeight
3712
3712
  };
3713
3713
  }
3714
- function Io(e) {
3714
+ function Ro(e) {
3715
3715
  return e.reduce((t, n) => nt(t, zn(n)), Fe);
3716
3716
  }
3717
3717
  function va(e) {
@@ -3738,7 +3738,7 @@ const ba = [["x", ["left", "right"], va], ["y", ["top", "bottom"], ya]];
3738
3738
  class Zn {
3739
3739
  constructor(t, n) {
3740
3740
  this.rect = void 0, this.width = void 0, this.height = void 0, this.top = void 0, this.bottom = void 0, this.right = void 0, this.left = void 0;
3741
- const r = en(n), o = Io(r);
3741
+ const r = en(n), o = Ro(r);
3742
3742
  this.rect = {
3743
3743
  ...t
3744
3744
  }, this.width = t.width, this.height = t.height;
@@ -3879,26 +3879,26 @@ class er {
3879
3879
  currentCoordinates: u
3880
3880
  });
3881
3881
  if (d) {
3882
- const h = Ct(d, u), g = {
3882
+ const h = Ct(d, u), p = {
3883
3883
  x: 0,
3884
3884
  y: 0
3885
3885
  }, {
3886
3886
  scrollableAncestors: k
3887
3887
  } = r.current;
3888
3888
  for (const y of k) {
3889
- const p = t.code, {
3889
+ const g = t.code, {
3890
3890
  isTop: m,
3891
3891
  isRight: S,
3892
3892
  isLeft: M,
3893
3893
  isBottom: L,
3894
- maxScroll: R,
3894
+ maxScroll: I,
3895
3895
  minScroll: b
3896
- } = Ro(y), E = ma(y), v = {
3897
- x: Math.min(p === U.Right ? E.right - E.width / 2 : E.right, Math.max(p === U.Right ? E.left : E.left + E.width / 2, d.x)),
3898
- y: Math.min(p === U.Down ? E.bottom - E.height / 2 : E.bottom, Math.max(p === U.Down ? E.top : E.top + E.height / 2, d.y))
3899
- }, D = p === U.Right && !S || p === U.Left && !M, w = p === U.Down && !L || p === U.Up && !m;
3896
+ } = Io(y), E = ma(y), v = {
3897
+ x: Math.min(g === U.Right ? E.right - E.width / 2 : E.right, Math.max(g === U.Right ? E.left : E.left + E.width / 2, d.x)),
3898
+ y: Math.min(g === U.Down ? E.bottom - E.height / 2 : E.bottom, Math.max(g === U.Down ? E.top : E.top + E.height / 2, d.y))
3899
+ }, D = g === U.Right && !S || g === U.Left && !M, w = g === U.Down && !L || g === U.Up && !m;
3900
3900
  if (D && v.x !== d.x) {
3901
- const A = y.scrollLeft + h.x, T = p === U.Right && A <= R.x || p === U.Left && A >= b.x;
3901
+ const A = y.scrollLeft + h.x, T = g === U.Right && A <= I.x || g === U.Left && A >= b.x;
3902
3902
  if (T && !h.y) {
3903
3903
  y.scrollTo({
3904
3904
  left: A,
@@ -3906,13 +3906,13 @@ class er {
3906
3906
  });
3907
3907
  return;
3908
3908
  }
3909
- T ? g.x = y.scrollLeft - A : g.x = p === U.Right ? y.scrollLeft - R.x : y.scrollLeft - b.x, g.x && y.scrollBy({
3910
- left: -g.x,
3909
+ T ? p.x = y.scrollLeft - A : p.x = g === U.Right ? y.scrollLeft - I.x : y.scrollLeft - b.x, p.x && y.scrollBy({
3910
+ left: -p.x,
3911
3911
  behavior: a
3912
3912
  });
3913
3913
  break;
3914
3914
  } else if (w && v.y !== d.y) {
3915
- const A = y.scrollTop + h.y, T = p === U.Down && A <= R.y || p === U.Up && A >= b.y;
3915
+ const A = y.scrollTop + h.y, T = g === U.Down && A <= I.y || g === U.Up && A >= b.y;
3916
3916
  if (T && !h.x) {
3917
3917
  y.scrollTo({
3918
3918
  top: A,
@@ -3920,14 +3920,14 @@ class er {
3920
3920
  });
3921
3921
  return;
3922
3922
  }
3923
- T ? g.y = y.scrollTop - A : g.y = p === U.Down ? y.scrollTop - R.y : y.scrollTop - b.y, g.y && y.scrollBy({
3924
- top: -g.y,
3923
+ T ? p.y = y.scrollTop - A : p.y = g === U.Down ? y.scrollTop - I.y : y.scrollTop - b.y, p.y && y.scrollBy({
3924
+ top: -p.y,
3925
3925
  behavior: a
3926
3926
  });
3927
3927
  break;
3928
3928
  }
3929
3929
  }
3930
- this.handleMove(t, nt(Ct(d, this.referenceCoordinates), g));
3930
+ this.handleMove(t, nt(Ct(d, this.referenceCoordinates), p));
3931
3931
  }
3932
3932
  }
3933
3933
  }
@@ -4219,10 +4219,10 @@ function Ma(e) {
4219
4219
  delta: d,
4220
4220
  threshold: h
4221
4221
  } = e;
4222
- const g = La({
4222
+ const p = La({
4223
4223
  delta: d,
4224
4224
  disabled: !i
4225
- }), [k, y] = Ps(), p = V({
4225
+ }), [k, y] = Ps(), g = V({
4226
4226
  x: 0,
4227
4227
  y: 0
4228
4228
  }), m = V({
@@ -4244,16 +4244,16 @@ function Ma(e) {
4244
4244
  const b = M.current;
4245
4245
  if (!b)
4246
4246
  return;
4247
- const E = p.current.x * m.current.x, v = p.current.y * m.current.y;
4247
+ const E = g.current.x * m.current.x, v = g.current.y * m.current.y;
4248
4248
  b.scrollBy(E, v);
4249
- }, []), R = J(() => a === Wt.TreeOrder ? [...c].reverse() : c, [a, c]);
4249
+ }, []), I = J(() => a === Wt.TreeOrder ? [...c].reverse() : c, [a, c]);
4250
4250
  Y(
4251
4251
  () => {
4252
4252
  if (!i || !c.length || !S) {
4253
4253
  y();
4254
4254
  return;
4255
4255
  }
4256
- for (const b of R) {
4256
+ for (const b of I) {
4257
4257
  if ((r == null ? void 0 : r(b)) === !1)
4258
4258
  continue;
4259
4259
  const E = c.indexOf(b), v = u[E];
@@ -4262,15 +4262,15 @@ function Ma(e) {
4262
4262
  const {
4263
4263
  direction: D,
4264
4264
  speed: w
4265
- } = ga(b, v, S, t, h);
4265
+ } = pa(b, v, S, t, h);
4266
4266
  for (const A of ["x", "y"])
4267
- g[A][D[A]] || (w[A] = 0, D[A] = 0);
4267
+ p[A][D[A]] || (w[A] = 0, D[A] = 0);
4268
4268
  if (w.x > 0 || w.y > 0) {
4269
- y(), M.current = b, k(L, s), p.current = w, m.current = D;
4269
+ y(), M.current = b, k(L, s), g.current = w, m.current = D;
4270
4270
  return;
4271
4271
  }
4272
4272
  }
4273
- p.current = {
4273
+ g.current = {
4274
4274
  x: 0,
4275
4275
  y: 0
4276
4276
  }, m.current = {
@@ -4289,10 +4289,10 @@ function Ma(e) {
4289
4289
  // eslint-disable-next-line react-hooks/exhaustive-deps
4290
4290
  JSON.stringify(S),
4291
4291
  // eslint-disable-next-line react-hooks/exhaustive-deps
4292
- JSON.stringify(g),
4292
+ JSON.stringify(p),
4293
4293
  k,
4294
4294
  c,
4295
- R,
4295
+ I,
4296
4296
  u,
4297
4297
  // eslint-disable-next-line react-hooks/exhaustive-deps
4298
4298
  JSON.stringify(h)
@@ -4301,12 +4301,12 @@ function Ma(e) {
4301
4301
  }
4302
4302
  const Da = {
4303
4303
  x: {
4304
- [pe.Backward]: !1,
4305
- [pe.Forward]: !1
4304
+ [ge.Backward]: !1,
4305
+ [ge.Forward]: !1
4306
4306
  },
4307
4307
  y: {
4308
- [pe.Backward]: !1,
4309
- [pe.Forward]: !1
4308
+ [ge.Backward]: !1,
4309
+ [ge.Forward]: !1
4310
4310
  }
4311
4311
  };
4312
4312
  function La(e) {
@@ -4324,12 +4324,12 @@ function La(e) {
4324
4324
  };
4325
4325
  return {
4326
4326
  x: {
4327
- [pe.Backward]: o.x[pe.Backward] || i.x === -1,
4328
- [pe.Forward]: o.x[pe.Forward] || i.x === 1
4327
+ [ge.Backward]: o.x[ge.Backward] || i.x === -1,
4328
+ [ge.Forward]: o.x[ge.Forward] || i.x === 1
4329
4329
  },
4330
4330
  y: {
4331
- [pe.Backward]: o.y[pe.Backward] || i.y === -1,
4332
- [pe.Forward]: o.y[pe.Forward] || i.y === 1
4331
+ [ge.Backward]: o.y[ge.Backward] || i.y === -1,
4332
+ [ge.Forward]: o.y[ge.Forward] || i.y === 1
4333
4333
  }
4334
4334
  };
4335
4335
  }, [n, t, r]);
@@ -4341,7 +4341,7 @@ function Ta(e, t) {
4341
4341
  return t == null ? null : (i = r ?? o) != null ? i : null;
4342
4342
  }, [r, t]);
4343
4343
  }
4344
- function Ra(e, t) {
4344
+ function Ia(e, t) {
4345
4345
  return J(() => e.reduce((n, r) => {
4346
4346
  const {
4347
4347
  sensor: o
@@ -4361,7 +4361,7 @@ var Fn;
4361
4361
  e.Optimized = "optimized";
4362
4362
  })(Fn || (Fn = {}));
4363
4363
  const Er = /* @__PURE__ */ new Map();
4364
- function Ia(e, t) {
4364
+ function Ra(e, t) {
4365
4365
  let {
4366
4366
  dragging: n,
4367
4367
  dependencies: r,
@@ -4371,7 +4371,7 @@ function Ia(e, t) {
4371
4371
  frequency: a,
4372
4372
  measure: l,
4373
4373
  strategy: c
4374
- } = o, u = V(e), d = p(), h = kt(d), g = N(function(m) {
4374
+ } = o, u = V(e), d = g(), h = kt(d), p = N(function(m) {
4375
4375
  m === void 0 && (m = []), !h.current && s((S) => S === null ? m : S.concat(m.filter((M) => !S.includes(M))));
4376
4376
  }, [h]), k = V(null), y = Dt((m) => {
4377
4377
  if (d && !n)
@@ -4385,8 +4385,8 @@ function Ia(e, t) {
4385
4385
  S.set(M.id, M.rect.current);
4386
4386
  continue;
4387
4387
  }
4388
- const L = M.node.current, R = L ? new Zn(l(L), L) : null;
4389
- M.rect.current = R, R && S.set(M.id, R);
4388
+ const L = M.node.current, I = L ? new Zn(l(L), L) : null;
4389
+ M.rect.current = I, I && S.set(M.id, I);
4390
4390
  }
4391
4391
  return S;
4392
4392
  }
@@ -4396,7 +4396,7 @@ function Ia(e, t) {
4396
4396
  u.current = e;
4397
4397
  }, [e]), Y(
4398
4398
  () => {
4399
- d || g();
4399
+ d || p();
4400
4400
  },
4401
4401
  // eslint-disable-next-line react-hooks/exhaustive-deps
4402
4402
  [n, d]
@@ -4409,17 +4409,17 @@ function Ia(e, t) {
4409
4409
  ), Y(
4410
4410
  () => {
4411
4411
  d || typeof a != "number" || k.current !== null || (k.current = setTimeout(() => {
4412
- g(), k.current = null;
4412
+ p(), k.current = null;
4413
4413
  }, a));
4414
4414
  },
4415
4415
  // eslint-disable-next-line react-hooks/exhaustive-deps
4416
- [a, d, g, ...r]
4416
+ [a, d, p, ...r]
4417
4417
  ), {
4418
4418
  droppableRects: y,
4419
- measureDroppableContainers: g,
4419
+ measureDroppableContainers: p,
4420
4420
  measuringScheduled: i != null
4421
4421
  };
4422
- function p() {
4422
+ function g() {
4423
4423
  switch (c) {
4424
4424
  case Et.Always:
4425
4425
  return !1;
@@ -4549,7 +4549,7 @@ function Pa(e) {
4549
4549
  c == null || c.removeEventListener("scroll", o);
4550
4550
  });
4551
4551
  }
4552
- }, [o, e]), J(() => e.length ? t ? Array.from(t.values()).reduce((i, s) => nt(i, s), Fe) : Io(e) : Fe, [e, t]);
4552
+ }, [o, e]), J(() => e.length ? t ? Array.from(t.values()).reduce((i, s) => nt(i, s), Fe) : Ro(e) : Fe, [e, t]);
4553
4553
  }
4554
4554
  function Dr(e, t) {
4555
4555
  t === void 0 && (t = []);
@@ -4968,10 +4968,10 @@ const Xa = /* @__PURE__ */ ei(function(t) {
4968
4968
  sensors: u = Ua,
4969
4969
  collisionDetection: d = ra,
4970
4970
  measuring: h,
4971
- modifiers: g,
4971
+ modifiers: p,
4972
4972
  ...k
4973
4973
  } = t;
4974
- const y = ti(Ya, void 0, Wa), [p, m] = y, [S, M] = Ys(), [L, R] = B(Ke.Uninitialized), b = L === Ke.Initialized, {
4974
+ const y = ti(Ya, void 0, Wa), [g, m] = y, [S, M] = Ys(), [L, I] = B(Ke.Uninitialized), b = L === Ke.Initialized, {
4975
4975
  draggable: {
4976
4976
  active: E,
4977
4977
  nodes: v,
@@ -4980,7 +4980,7 @@ const Xa = /* @__PURE__ */ ei(function(t) {
4980
4980
  droppable: {
4981
4981
  containers: w
4982
4982
  }
4983
- } = p, A = E != null ? v.get(E) : null, T = V({
4983
+ } = g, A = E != null ? v.get(E) : null, T = V({
4984
4984
  initial: null,
4985
4985
  translated: null
4986
4986
  }), O = J(() => {
@@ -4991,11 +4991,11 @@ const Xa = /* @__PURE__ */ ei(function(t) {
4991
4991
  data: (we = A == null ? void 0 : A.data) != null ? we : Ga,
4992
4992
  rect: T
4993
4993
  } : null;
4994
- }, [E, A]), W = V(null), [ae, _] = B(null), [X, q] = B(null), te = kt(k, Object.values(k)), ge = Zt("DndDescribedBy", s), xe = J(() => w.getEnabled(), [w]), ie = Ka(h), {
4994
+ }, [E, A]), W = V(null), [ae, _] = B(null), [X, q] = B(null), te = kt(k, Object.values(k)), pe = Zt("DndDescribedBy", s), xe = J(() => w.getEnabled(), [w]), ie = Ka(h), {
4995
4995
  droppableRects: de,
4996
4996
  measureDroppableContainers: je,
4997
4997
  measuringScheduled: ze
4998
- } = Ia(xe, {
4998
+ } = Ra(xe, {
4999
4999
  dragging: b,
5000
5000
  dependencies: [D.x, D.y],
5001
5001
  config: ie.droppable
@@ -5022,7 +5022,7 @@ const Xa = /* @__PURE__ */ ei(function(t) {
5022
5022
  scrollAdjustedTranslate: null
5023
5023
  }), Ze = w.getNodeFor((n = ve.current.over) == null ? void 0 : n.id), ue = Va({
5024
5024
  measure: ie.dragOverlay.measure
5025
- }), Ve = (r = ue.nodeRef.current) != null ? r : le, Oe = b ? (o = ue.rect) != null ? o : P : null, x = !!(ue.nodeRef.current && ue.rect), C = Fa(x ? null : P), I = Oo(Ve ? Ce(Ve) : null), z = ja(b ? Ze ?? le : null), Z = Ba(z), H = $o(g, {
5025
+ }), Ve = (r = ue.nodeRef.current) != null ? r : le, Oe = b ? (o = ue.rect) != null ? o : P : null, x = !!(ue.nodeRef.current && ue.rect), C = Fa(x ? null : P), R = Oo(Ve ? Ce(Ve) : null), z = ja(b ? Ze ?? le : null), Z = Ba(z), H = $o(p, {
5026
5026
  transform: {
5027
5027
  x: D.x - C.x,
5028
5028
  y: D.y - C.y,
@@ -5038,14 +5038,14 @@ const Xa = /* @__PURE__ */ ei(function(t) {
5038
5038
  overlayNodeRect: ue.rect,
5039
5039
  scrollableAncestors: z,
5040
5040
  scrollableAncestorRects: Z,
5041
- windowRect: I
5041
+ windowRect: R
5042
5042
  }), Q = De ? nt(De, D) : null, fe = Pa(z), Le = Dr(fe), oe = Dr(fe, [P]), Se = nt(H, Le), ye = Oe ? la(Oe, H) : null, K = O && ye ? d({
5043
5043
  active: O,
5044
5044
  collisionRect: ye,
5045
5045
  droppableRects: de,
5046
5046
  droppableContainers: xe,
5047
5047
  pointerCoordinates: Q
5048
- }) : null, he = So(K, "id"), [be, Rt] = B(null), on = x ? H : nt(H, oe), It = sa(on, (i = be == null ? void 0 : be.rect) != null ? i : null, P), ct = V(null), Nt = N(
5048
+ }) : null, he = So(K, "id"), [be, It] = B(null), on = x ? H : nt(H, oe), Rt = sa(on, (i = be == null ? void 0 : be.rect) != null ? i : null, P), ct = V(null), Nt = N(
5049
5049
  (we, Ee) => {
5050
5050
  let {
5051
5051
  sensor: Ae,
@@ -5111,7 +5111,7 @@ const Xa = /* @__PURE__ */ ei(function(t) {
5111
5111
  }
5112
5112
  };
5113
5113
  Ft(() => {
5114
- Ue == null || Ue(dt), R(Ke.Initializing), m({
5114
+ Ue == null || Ue(dt), I(Ke.Initializing), m({
5115
5115
  type: ce.DragStart,
5116
5116
  initialCoordinates: me,
5117
5117
  active: Ye
@@ -5155,7 +5155,7 @@ const Xa = /* @__PURE__ */ ei(function(t) {
5155
5155
  W.current = null, Ft(() => {
5156
5156
  m({
5157
5157
  type: me
5158
- }), R(Ke.Uninitialized), Rt(null), _(null), q(null), ct.current = null;
5158
+ }), I(Ke.Uninitialized), It(null), _(null), q(null), ct.current = null;
5159
5159
  const ft = me === ce.DragEnd ? "onDragEnd" : "onDragCancel";
5160
5160
  if (qe) {
5161
5161
  const sn = te.current[ft];
@@ -5185,9 +5185,9 @@ const Xa = /* @__PURE__ */ ei(function(t) {
5185
5185
  we(Ae, Ee.options, Pe) === !0 && (Te.dndKit = {
5186
5186
  capturedBy: Ee.sensor
5187
5187
  }, W.current = We, Nt(Ae, Ee));
5188
- }, [v, Nt]), Ot = Ra(u, zt);
5188
+ }, [v, Nt]), Ot = Ia(u, zt);
5189
5189
  $a(u), _e(() => {
5190
- P && L === Ke.Initializing && R(Ke.Initialized);
5190
+ P && L === Ke.Initializing && I(Ke.Initialized);
5191
5191
  }, [P, L]), Y(
5192
5192
  () => {
5193
5193
  const {
@@ -5248,7 +5248,7 @@ const Xa = /* @__PURE__ */ ei(function(t) {
5248
5248
  over: et
5249
5249
  };
5250
5250
  Ft(() => {
5251
- Rt(et), Me == null || Me(me), S({
5251
+ It(et), Me == null || Me(me), S({
5252
5252
  type: "onDragOver",
5253
5253
  event: me
5254
5254
  });
@@ -5300,20 +5300,20 @@ const Xa = /* @__PURE__ */ ei(function(t) {
5300
5300
  scrollableAncestorRects: Z,
5301
5301
  measuringConfiguration: ie,
5302
5302
  measuringScheduled: ze,
5303
- windowRect: I
5304
- }), [O, le, P, X, K, ke, ue, v, w, de, be, je, z, Z, ie, ze, I]), Qo = J(() => ({
5303
+ windowRect: R
5304
+ }), [O, le, P, X, K, ke, ue, v, w, de, be, je, z, Z, ie, ze, R]), Qo = J(() => ({
5305
5305
  activatorEvent: X,
5306
5306
  activators: Ot,
5307
5307
  active: O,
5308
5308
  activeNodeRect: P,
5309
5309
  ariaDescribedById: {
5310
- draggable: ge
5310
+ draggable: pe
5311
5311
  },
5312
5312
  dispatch: m,
5313
5313
  draggableNodes: v,
5314
5314
  over: be,
5315
5315
  measureDroppableContainers: je
5316
- }), [X, Ot, O, P, m, ge, v, be, je]);
5316
+ }), [X, Ot, O, P, m, pe, v, be, je]);
5317
5317
  return ne.createElement(Co.Provider, {
5318
5318
  value: M
5319
5319
  }, ne.createElement(Tt.Provider, {
@@ -5321,12 +5321,12 @@ const Xa = /* @__PURE__ */ ei(function(t) {
5321
5321
  }, ne.createElement(Po.Provider, {
5322
5322
  value: Xo
5323
5323
  }, ne.createElement(nn.Provider, {
5324
- value: It
5324
+ value: Rt
5325
5325
  }, c)), ne.createElement(qa, {
5326
5326
  disabled: (a == null ? void 0 : a.restoreFocus) === !1
5327
5327
  })), ne.createElement(Js, {
5328
5328
  ...a,
5329
- hiddenTextDescribedById: ge
5329
+ hiddenTextDescribedById: pe
5330
5330
  }));
5331
5331
  function Zo() {
5332
5332
  const we = (ae == null ? void 0 : ae.autoScrollEnabled) === !1, Ee = typeof l == "object" ? l.enabled === !1 : l === !1, Ae = b && !we && !Ee;
@@ -5354,10 +5354,10 @@ function el(e) {
5354
5354
  draggableNodes: d,
5355
5355
  over: h
5356
5356
  } = Be(Tt), {
5357
- role: g = Tr,
5357
+ role: p = Tr,
5358
5358
  roleDescription: k = "draggable",
5359
5359
  tabIndex: y = 0
5360
- } = o ?? {}, p = (l == null ? void 0 : l.id) === t, m = Be(p ? nn : Qa), [S, M] = Vt(), [L, R] = Vt(), b = Ha(s, t), E = kt(n);
5360
+ } = o ?? {}, g = (l == null ? void 0 : l.id) === t, m = Be(g ? nn : Qa), [S, M] = Vt(), [L, I] = Vt(), b = Ha(s, t), E = kt(n);
5361
5361
  _e(
5362
5362
  () => (d.set(t, {
5363
5363
  id: t,
@@ -5373,24 +5373,24 @@ function el(e) {
5373
5373
  [d, t]
5374
5374
  );
5375
5375
  const v = J(() => ({
5376
- role: g,
5376
+ role: p,
5377
5377
  tabIndex: y,
5378
5378
  "aria-disabled": r,
5379
- "aria-pressed": p && g === Tr ? !0 : void 0,
5379
+ "aria-pressed": g && p === Tr ? !0 : void 0,
5380
5380
  "aria-roledescription": k,
5381
5381
  "aria-describedby": u.draggable
5382
- }), [r, g, y, p, k, u.draggable]);
5382
+ }), [r, p, y, g, k, u.draggable]);
5383
5383
  return {
5384
5384
  active: l,
5385
5385
  activatorEvent: a,
5386
5386
  activeNodeRect: c,
5387
5387
  attributes: v,
5388
- isDragging: p,
5388
+ isDragging: g,
5389
5389
  listeners: r ? void 0 : b,
5390
5390
  node: S,
5391
5391
  over: h,
5392
5392
  setNodeRef: M,
5393
- setActivatorNodeRef: R,
5393
+ setActivatorNodeRef: I,
5394
5394
  transform: m
5395
5395
  };
5396
5396
  }
@@ -5414,10 +5414,10 @@ function Ho(e) {
5414
5414
  measureDroppableContainers: c
5415
5415
  } = Be(Tt), u = V({
5416
5416
  disabled: n
5417
- }), d = V(!1), h = V(null), g = V(null), {
5417
+ }), d = V(!1), h = V(null), p = V(null), {
5418
5418
  disabled: k,
5419
5419
  updateMeasurementsFor: y,
5420
- timeout: p
5420
+ timeout: g
5421
5421
  } = {
5422
5422
  ...rl,
5423
5423
  ...o
@@ -5427,28 +5427,28 @@ function Ho(e) {
5427
5427
  d.current = !0;
5428
5428
  return;
5429
5429
  }
5430
- g.current != null && clearTimeout(g.current), g.current = setTimeout(() => {
5431
- c(Array.isArray(m.current) ? m.current : [m.current]), g.current = null;
5432
- }, p);
5430
+ p.current != null && clearTimeout(p.current), p.current = setTimeout(() => {
5431
+ c(Array.isArray(m.current) ? m.current : [m.current]), p.current = null;
5432
+ }, g);
5433
5433
  },
5434
5434
  //eslint-disable-next-line react-hooks/exhaustive-deps
5435
- [p]
5435
+ [g]
5436
5436
  ), M = tn({
5437
5437
  callback: S,
5438
5438
  disabled: k || !s
5439
5439
  }), L = N((v, D) => {
5440
5440
  M && (D && (M.unobserve(D), d.current = !1), v && M.observe(v));
5441
- }, [M]), [R, b] = Vt(L), E = kt(t);
5441
+ }, [M]), [I, b] = Vt(L), E = kt(t);
5442
5442
  return Y(() => {
5443
- !M || !R.current || (M.disconnect(), d.current = !1, M.observe(R.current));
5444
- }, [R, M]), Y(
5443
+ !M || !I.current || (M.disconnect(), d.current = !1, M.observe(I.current));
5444
+ }, [I, M]), Y(
5445
5445
  () => (a({
5446
5446
  type: ce.RegisterDroppable,
5447
5447
  element: {
5448
5448
  id: r,
5449
5449
  key: i,
5450
5450
  disabled: n,
5451
- node: R,
5451
+ node: I,
5452
5452
  rect: h,
5453
5453
  data: E
5454
5454
  }
@@ -5470,7 +5470,7 @@ function Ho(e) {
5470
5470
  active: s,
5471
5471
  rect: h,
5472
5472
  isOver: (l == null ? void 0 : l.id) === r,
5473
- node: R,
5473
+ node: I,
5474
5474
  over: l,
5475
5475
  setNodeRef: b
5476
5476
  };
@@ -5617,7 +5617,7 @@ function hl(e) {
5617
5617
  } = Ce(s).getComputedStyle(s), d = Ao(u);
5618
5618
  if (!d)
5619
5619
  return;
5620
- const h = typeof t == "function" ? t : pl(t);
5620
+ const h = typeof t == "function" ? t : gl(t);
5621
5621
  return No(l, o.draggable.measure), h({
5622
5622
  active: {
5623
5623
  id: i,
@@ -5636,7 +5636,7 @@ function hl(e) {
5636
5636
  });
5637
5637
  });
5638
5638
  }
5639
- function pl(e) {
5639
+ function gl(e) {
5640
5640
  const {
5641
5641
  duration: t,
5642
5642
  easing: n,
@@ -5665,7 +5665,7 @@ function pl(e) {
5665
5665
  x: l.x - u.x,
5666
5666
  y: l.y - u.y,
5667
5667
  ...d
5668
- }, g = o({
5668
+ }, p = o({
5669
5669
  ...c,
5670
5670
  active: s,
5671
5671
  dragOverlay: a,
@@ -5673,30 +5673,30 @@ function pl(e) {
5673
5673
  initial: l,
5674
5674
  final: h
5675
5675
  }
5676
- }), [k] = g, y = g[g.length - 1];
5676
+ }), [k] = p, y = p[p.length - 1];
5677
5677
  if (JSON.stringify(k) === JSON.stringify(y))
5678
5678
  return;
5679
- const p = r == null ? void 0 : r({
5679
+ const g = r == null ? void 0 : r({
5680
5680
  active: s,
5681
5681
  dragOverlay: a,
5682
5682
  ...c
5683
- }), m = a.node.animate(g, {
5683
+ }), m = a.node.animate(p, {
5684
5684
  duration: t,
5685
5685
  easing: n,
5686
5686
  fill: "forwards"
5687
5687
  });
5688
5688
  return new Promise((S) => {
5689
5689
  m.onfinish = () => {
5690
- p == null || p(), S();
5690
+ g == null || g(), S();
5691
5691
  };
5692
5692
  });
5693
5693
  };
5694
5694
  }
5695
- let Rr = 0;
5696
- function gl(e) {
5695
+ let Ir = 0;
5696
+ function pl(e) {
5697
5697
  return J(() => {
5698
5698
  if (e != null)
5699
- return Rr++, Rr;
5699
+ return Ir++, Ir;
5700
5700
  }, [e]);
5701
5701
  }
5702
5702
  const ml = /* @__PURE__ */ ne.memo((e) => {
@@ -5715,33 +5715,33 @@ const ml = /* @__PURE__ */ ne.memo((e) => {
5715
5715
  activatorEvent: u,
5716
5716
  active: d,
5717
5717
  activeNodeRect: h,
5718
- containerNodeRect: g,
5718
+ containerNodeRect: p,
5719
5719
  draggableNodes: k,
5720
5720
  droppableContainers: y,
5721
- dragOverlay: p,
5721
+ dragOverlay: g,
5722
5722
  over: m,
5723
5723
  measuringConfiguration: S,
5724
5724
  scrollableAncestors: M,
5725
5725
  scrollableAncestorRects: L,
5726
- windowRect: R
5727
- } = tl(), b = Be(nn), E = gl(d == null ? void 0 : d.id), v = $o(s, {
5726
+ windowRect: I
5727
+ } = tl(), b = Be(nn), E = pl(d == null ? void 0 : d.id), v = $o(s, {
5728
5728
  activatorEvent: u,
5729
5729
  active: d,
5730
5730
  activeNodeRect: h,
5731
- containerNodeRect: g,
5732
- draggingNodeRect: p.rect,
5731
+ containerNodeRect: p,
5732
+ draggingNodeRect: g.rect,
5733
5733
  over: m,
5734
- overlayNodeRect: p.rect,
5734
+ overlayNodeRect: g.rect,
5735
5735
  scrollableAncestors: M,
5736
5736
  scrollableAncestorRects: L,
5737
5737
  transform: b,
5738
- windowRect: R
5738
+ windowRect: I
5739
5739
  }), D = rr(h), w = hl({
5740
5740
  config: r,
5741
5741
  draggableNodes: k,
5742
5742
  droppableContainers: y,
5743
5743
  measuringConfiguration: S
5744
- }), A = D ? p.setRef : void 0;
5744
+ }), A = D ? g.setRef : void 0;
5745
5745
  return ne.createElement(sl, null, ne.createElement(ol, {
5746
5746
  animation: w
5747
5747
  }, d && E ? ne.createElement(cl, {
@@ -5809,17 +5809,17 @@ const vl = [U.Down, U.Right, U.Up, U.Left], yl = (e, t) => {
5809
5809
  });
5810
5810
  let u = So(c, "id");
5811
5811
  if (u === (s == null ? void 0 : s.id) && c.length > 1 && (u = c[1].id), u != null) {
5812
- const d = i.get(n.id), h = i.get(u), g = h ? o.get(h.id) : null, k = h == null ? void 0 : h.node.current;
5813
- if (k && g && d && h) {
5814
- const p = en(k).some((b, E) => a[E] !== b), m = Bo(d, h), S = bl(d, h), M = p || !m ? {
5812
+ const d = i.get(n.id), h = i.get(u), p = h ? o.get(h.id) : null, k = h == null ? void 0 : h.node.current;
5813
+ if (k && p && d && h) {
5814
+ const g = en(k).some((b, E) => a[E] !== b), m = Bo(d, h), S = bl(d, h), M = g || !m ? {
5815
5815
  x: 0,
5816
5816
  y: 0
5817
5817
  } : {
5818
- x: S ? r.width - g.width : 0,
5819
- y: S ? r.height - g.height : 0
5818
+ x: S ? r.width - p.width : 0,
5819
+ y: S ? r.height - p.height : 0
5820
5820
  }, L = {
5821
- x: g.left,
5822
- y: g.top
5821
+ x: p.left,
5822
+ y: p.top
5823
5823
  };
5824
5824
  return M.x && M.y ? L : Ct(L, M);
5825
5825
  }
@@ -5832,7 +5832,7 @@ function Bo(e, t) {
5832
5832
  function bl(e, t) {
5833
5833
  return !Yt(e) || !Yt(t) || !Bo(e, t) ? !1 : e.data.current.sortable.index < t.data.current.sortable.index;
5834
5834
  }
5835
- function Ir(e) {
5835
+ function Rr(e) {
5836
5836
  var n;
5837
5837
  if (!e || e.length === 0) return null;
5838
5838
  const t = (n = e[0].data) == null ? void 0 : n.zone;
@@ -5846,7 +5846,7 @@ function wl(e) {
5846
5846
  onDropIntoGroupAtPosition: o,
5847
5847
  onRemoveFromGroup: i,
5848
5848
  findParentGroup: s
5849
- } = e, [a, l] = B(null), [c, u] = B(null), [d, h] = B(null), g = V(null), k = Xs(
5849
+ } = e, [a, l] = B(null), [c, u] = B(null), [d, h] = B(null), p = V(null), k = Xs(
5850
5850
  br(nr, {
5851
5851
  activationConstraint: {
5852
5852
  distance: 5
@@ -5855,27 +5855,27 @@ function wl(e) {
5855
5855
  br(er, {
5856
5856
  coordinateGetter: yl
5857
5857
  })
5858
- ), y = N((R) => {
5859
- l(String(R.active.id));
5860
- }, []), p = N(
5861
- (R) => {
5862
- const { over: b, collisions: E } = R;
5858
+ ), y = N((I) => {
5859
+ l(String(I.active.id));
5860
+ }, []), g = N(
5861
+ (I) => {
5862
+ const { over: b, collisions: E } = I;
5863
5863
  u(b ? String(b.id) : null);
5864
- const v = Ir(E);
5865
- g.current = v, h(v);
5864
+ const v = Rr(E);
5865
+ p.current = v, h(v);
5866
5866
  },
5867
5867
  []
5868
5868
  ), m = N(
5869
- (R) => {
5870
- const { collisions: b } = R, E = Ir(b);
5871
- g.current = E, h(E);
5869
+ (I) => {
5870
+ const { collisions: b } = I, E = Rr(b);
5871
+ p.current = E, h(E);
5872
5872
  },
5873
5873
  []
5874
5874
  ), S = N(() => {
5875
- g.current = null, l(null), u(null), h(null);
5875
+ p.current = null, l(null), u(null), h(null);
5876
5876
  }, []), M = N(
5877
- (R) => {
5878
- const { active: b, over: E } = R, v = g.current;
5877
+ (I) => {
5878
+ const { active: b, over: E } = I, v = p.current;
5879
5879
  if (!E || b.id === E.id || !v) {
5880
5880
  S();
5881
5881
  return;
@@ -5913,13 +5913,13 @@ function wl(e) {
5913
5913
  sensors: k,
5914
5914
  onDragStart: y,
5915
5915
  onDragMove: m,
5916
- onDragOver: p,
5916
+ onDragOver: g,
5917
5917
  onDragEnd: M,
5918
5918
  onDragCancel: L
5919
5919
  };
5920
5920
  }
5921
5921
  const xl = (e) => {
5922
- var h, g;
5922
+ var h, p;
5923
5923
  const { pointerCoordinates: t, droppableContainers: n, droppableRects: r } = e;
5924
5924
  let o = ia(e);
5925
5925
  if (o.length === 0 && (o = ea(e)), o.length === 0 || !t) return o;
@@ -5928,7 +5928,7 @@ const xl = (e) => {
5928
5928
  return [{ ...i, data: { ...i.data, zone: "after" } }];
5929
5929
  const s = r.get(i.id);
5930
5930
  if (!s) return o;
5931
- const a = t.y - s.top, l = s.height, c = n.find((k) => k.id === i.id), u = ((g = (h = c == null ? void 0 : c.data) == null ? void 0 : h.current) == null ? void 0 : g.isGroup) === !0;
5931
+ const a = t.y - s.top, l = s.height, c = n.find((k) => k.id === i.id), u = ((p = (h = c == null ? void 0 : c.data) == null ? void 0 : h.current) == null ? void 0 : p.isGroup) === !0;
5932
5932
  let d;
5933
5933
  return u ? a < l * 0.25 ? d = "before" : a > l * 0.75 ? d = "after" : d = "into" : d = a < l / 2 ? "before" : "after", [{
5934
5934
  ...i,
@@ -5948,9 +5948,9 @@ const xl = (e) => {
5948
5948
  onDelete: u,
5949
5949
  deleteSuppressed: d
5950
5950
  }) => {
5951
- const { attributes: h, listeners: g, setNodeRef: k, isDragging: y } = el({ id: e.id }), { setNodeRef: p } = Ho({ id: e.id, data: { isGroup: !!e.isGroup } }), m = N((D) => {
5952
- k(D), p(D);
5953
- }, [k, p]), S = e.isGroup, M = e.depth > 0, L = M ? e.depth * 24 : 0, R = {
5951
+ const { attributes: h, listeners: p, setNodeRef: k, isDragging: y } = el({ id: e.id }), { setNodeRef: g } = Ho({ id: e.id, data: { isGroup: !!e.isGroup } }), m = N((D) => {
5952
+ k(D), g(D);
5953
+ }, [k, g]), S = e.isGroup, M = e.depth > 0, L = M ? e.depth * 24 : 0, I = {
5954
5954
  opacity: y ? 0.3 : 1,
5955
5955
  paddingLeft: L + 8,
5956
5956
  paddingRight: 8,
@@ -5964,14 +5964,14 @@ const xl = (e) => {
5964
5964
  position: "relative",
5965
5965
  touchAction: "manipulation"
5966
5966
  };
5967
- (M || S) && (R.backgroundColor = "var(--surface-secondary, rgba(0,0,0,0.04))"), t && !y && (n === "before" ? R.borderTop = "2px solid var(--primary, var(--accent-primary, #007AFF))" : n === "after" ? R.borderBottom = "2px solid var(--primary, var(--accent-primary, #007AFF))" : n === "into" && (R.outline = "2px solid var(--primary, var(--accent-primary, #007AFF))", R.outlineOffset = "-2px", R.backgroundColor = "var(--accent-primary-alpha, rgba(0, 122, 255, 0.08))"));
5967
+ (M || S) && (I.backgroundColor = "var(--surface-secondary, rgba(0,0,0,0.04))"), t && !y && (n === "before" ? I.borderTop = "2px solid var(--primary, var(--accent-primary, #007AFF))" : n === "after" ? I.borderBottom = "2px solid var(--primary, var(--accent-primary, #007AFF))" : n === "into" && (I.outline = "2px solid var(--primary, var(--accent-primary, #007AFF))", I.outlineOffset = "-2px", I.backgroundColor = "var(--accent-primary-alpha, rgba(0, 122, 255, 0.08))"));
5968
5968
  const b = e.isSelected ? {
5969
5969
  outline: "3px solid var(--primary, var(--accent-primary, #007AFF))",
5970
5970
  outlineOffset: "2px"
5971
5971
  } : {}, E = () => s(e.id), v = /* @__PURE__ */ f(
5972
5972
  "span",
5973
5973
  {
5974
- ...g,
5974
+ ...p,
5975
5975
  "aria-label": "Drag to reorder",
5976
5976
  title: "Drag to reorder",
5977
5977
  style: {
@@ -5995,7 +5995,7 @@ const xl = (e) => {
5995
5995
  children: /* @__PURE__ */ f($, { icon: "lucide:grip-vertical", style: { fontSize: 24 } })
5996
5996
  }
5997
5997
  );
5998
- return S ? /* @__PURE__ */ j("div", { ref: m, style: R, ...h, children: [
5998
+ return S ? /* @__PURE__ */ j("div", { ref: m, style: I, ...h, children: [
5999
5999
  v,
6000
6000
  /* @__PURE__ */ f(
6001
6001
  $,
@@ -6030,7 +6030,7 @@ const xl = (e) => {
6030
6030
  children: /* @__PURE__ */ f($, { icon: G.trash, className: "sc:size-6" })
6031
6031
  }
6032
6032
  ) })
6033
- ] }) : /* @__PURE__ */ j("div", { ref: m, style: R, ...h, children: [
6033
+ ] }) : /* @__PURE__ */ j("div", { ref: m, style: I, ...h, children: [
6034
6034
  v,
6035
6035
  o && e.previewUrl ? /* @__PURE__ */ f(
6036
6036
  "img",
@@ -6197,15 +6197,15 @@ const xl = (e) => {
6197
6197
  ...l
6198
6198
  }) => {
6199
6199
  const { activeArtboard: c } = js(), u = (c == null ? void 0 : c.previewBackgroundColor) || (c == null ? void 0 : c.backgroundColor) || "transparent", d = 80, h = 160, {
6200
- layers: g,
6200
+ layers: p,
6201
6201
  flatLayers: k,
6202
6202
  selectLayer: y,
6203
- toggleVisibility: p,
6203
+ toggleVisibility: g,
6204
6204
  toggleLock: m,
6205
6205
  deleteLayer: S,
6206
6206
  duplicateLayer: M,
6207
6207
  reorderById: L,
6208
- reorderWithinGroup: R,
6208
+ reorderWithinGroup: I,
6209
6209
  addToGroup: b,
6210
6210
  removeFromGroup: E,
6211
6211
  createEmptyGroup: v,
@@ -6231,8 +6231,8 @@ const xl = (e) => {
6231
6231
  for (const ke of P)
6232
6232
  ee.set(ke.id, ke), ke.children && se(ke.children);
6233
6233
  };
6234
- return se(g), ee;
6235
- }, [g]), ae = N(
6234
+ return se(p), ee;
6235
+ }, [p]), ae = N(
6236
6236
  (ee, se, P) => {
6237
6237
  const ke = w(ee), ve = w(se);
6238
6238
  ke && !ve ? E(ee, se, P) : L(ee, se, P);
@@ -6242,7 +6242,7 @@ const xl = (e) => {
6242
6242
  onReorder: ae,
6243
6243
  onDropIntoGroup: b,
6244
6244
  onDropIntoGroupAtPosition: (ee, se) => b(ee, se),
6245
- onGroupReorder: R,
6245
+ onGroupReorder: I,
6246
6246
  onRemoveFromGroup: E,
6247
6247
  findParentGroup: w
6248
6248
  }), X = (ee) => [...ee].reverse().map((P) => /* @__PURE__ */ j(ne.Fragment, { children: [
@@ -6256,7 +6256,7 @@ const xl = (e) => {
6256
6256
  showPreviewImages: n,
6257
6257
  previewDisplaySize: d,
6258
6258
  onSelect: y,
6259
- onToggleVisibility: p,
6259
+ onToggleVisibility: g,
6260
6260
  onToggleLock: m,
6261
6261
  onDuplicate: M,
6262
6262
  onDelete: S,
@@ -6280,7 +6280,7 @@ const xl = (e) => {
6280
6280
  showPreviewImages: n,
6281
6281
  previewDisplaySize: d,
6282
6282
  onSelect: y,
6283
- onToggleVisibility: p,
6283
+ onToggleVisibility: g,
6284
6284
  onToggleLock: m,
6285
6285
  onDuplicate: M,
6286
6286
  onDelete: S,
@@ -6288,7 +6288,7 @@ const xl = (e) => {
6288
6288
  }
6289
6289
  ),
6290
6290
  P.children && q(P.children)
6291
- ] }, P.id)), te = _.activeId ? W.get(_.activeId) : null, { width: ge, height: xe, flex: ie, ...de } = i, je = ge || (s.includes("w-full") ? "100%" : e ? `${e}px` : void 0), ze = t || xe || void 0, De = ie !== void 0 ? ie : ze === "100%" || ze === "100vh" ? 1 : void 0;
6291
+ ] }, P.id)), te = _.activeId ? W.get(_.activeId) : null, { width: pe, height: xe, flex: ie, ...de } = i, je = pe || (s.includes("w-full") ? "100%" : e ? `${e}px` : void 0), ze = t || xe || void 0, De = ie !== void 0 ? ie : ze === "100%" || ze === "100vh" ? 1 : void 0;
6292
6292
  return /* @__PURE__ */ j(
6293
6293
  "div",
6294
6294
  {
@@ -6350,7 +6350,7 @@ const xl = (e) => {
6350
6350
  }
6351
6351
  ),
6352
6352
  /* @__PURE__ */ j("div", { style: { flex: 1, overflow: "auto", minHeight: 0 }, children: [
6353
- g.length > 0 ? r ? /* @__PURE__ */ j(
6353
+ p.length > 0 ? r ? /* @__PURE__ */ j(
6354
6354
  Xa,
6355
6355
  {
6356
6356
  sensors: _.sensors,
@@ -6361,7 +6361,7 @@ const xl = (e) => {
6361
6361
  onDragEnd: _.onDragEnd,
6362
6362
  onDragCancel: _.onDragCancel,
6363
6363
  children: [
6364
- X(g),
6364
+ X(p),
6365
6365
  /* @__PURE__ */ f(ml, { dropAnimation: null, children: te ? /* @__PURE__ */ f(
6366
6366
  Sl,
6367
6367
  {
@@ -6372,7 +6372,7 @@ const xl = (e) => {
6372
6372
  ) : null })
6373
6373
  ]
6374
6374
  }
6375
- ) : q(g) : /* @__PURE__ */ f(
6375
+ ) : q(p) : /* @__PURE__ */ f(
6376
6376
  "div",
6377
6377
  {
6378
6378
  style: {
@@ -6384,7 +6384,7 @@ const xl = (e) => {
6384
6384
  children: "No layers"
6385
6385
  }
6386
6386
  ),
6387
- r && g.length > 1 && /* @__PURE__ */ f(
6387
+ r && p.length > 1 && /* @__PURE__ */ f(
6388
6388
  "div",
6389
6389
  {
6390
6390
  style: {
@@ -6485,7 +6485,7 @@ const xl = (e) => {
6485
6485
  ] })
6486
6486
  ] }, e.id);
6487
6487
  };
6488
- class gc {
6488
+ class mc {
6489
6489
  constructor() {
6490
6490
  this.canvasIds = /* @__PURE__ */ new Set(), this.requirements = /* @__PURE__ */ new Map(), this.textFields = /* @__PURE__ */ new Map(), this.controls = /* @__PURE__ */ new Map(), this.parts = /* @__PURE__ */ new Map(), this.bridge = null, this.listeners = /* @__PURE__ */ new Set(), this.version = 0, this.getVersion = () => this.version, this.subscribe = (t) => (this.listeners.add(t), () => this.listeners.delete(t));
6491
6491
  }
@@ -6617,7 +6617,7 @@ function rn(e, t) {
6617
6617
  return r.registerPart(o, e, a);
6618
6618
  }, [r, o, e, a]);
6619
6619
  }
6620
- function mc(e) {
6620
+ function vc(e) {
6621
6621
  return {
6622
6622
  reportInvariant(t) {
6623
6623
  if (ai()) throw t;
@@ -6701,7 +6701,7 @@ function Tl({
6701
6701
  }
6702
6702
  );
6703
6703
  }
6704
- function vc({
6704
+ function yc({
6705
6705
  direction: e = "vertical",
6706
6706
  className: t,
6707
6707
  style: n
@@ -6727,7 +6727,7 @@ const Uo = ({
6727
6727
  className: l = "",
6728
6728
  contentClassName: c = ""
6729
6729
  }) => {
6730
- const u = V(null), d = V(null), h = V(null), [g, k] = B({}), [y, p] = B(!1), m = (M) => {
6730
+ const u = V(null), d = V(null), h = V(null), [p, k] = B({}), [y, g] = B(!1), m = (M) => {
6731
6731
  M.stopPropagation(), !n && a && bs.protectNextClick(), r(!n);
6732
6732
  };
6733
6733
  Y(() => {
@@ -6735,12 +6735,12 @@ const Uo = ({
6735
6735
  let M = () => {
6736
6736
  };
6737
6737
  const L = setTimeout(() => {
6738
- const R = (b) => {
6738
+ const I = (b) => {
6739
6739
  var w, A;
6740
6740
  const E = b.target, v = (w = u.current) == null ? void 0 : w.contains(E), D = (A = h.current) == null ? void 0 : A.contains(E);
6741
6741
  !v && !D && r(!1);
6742
6742
  };
6743
- document.addEventListener("mousedown", R), M = () => document.removeEventListener("mousedown", R);
6743
+ document.addEventListener("mousedown", I), M = () => document.removeEventListener("mousedown", I);
6744
6744
  }, 0);
6745
6745
  return () => {
6746
6746
  clearTimeout(L), M();
@@ -6748,10 +6748,10 @@ const Uo = ({
6748
6748
  }, [n, r]), Y(() => {
6749
6749
  if (!n) return;
6750
6750
  const M = (L) => {
6751
- var R;
6751
+ var I;
6752
6752
  if (L.key === "Escape") {
6753
6753
  L.stopPropagation(), L.preventDefault(), r(!1);
6754
- const b = (R = d.current) == null ? void 0 : R.querySelector(
6754
+ const b = (I = d.current) == null ? void 0 : I.querySelector(
6755
6755
  'button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])'
6756
6756
  );
6757
6757
  b == null || b.focus();
@@ -6759,13 +6759,13 @@ const Uo = ({
6759
6759
  };
6760
6760
  return document.addEventListener("keydown", M), () => document.removeEventListener("keydown", M);
6761
6761
  }, [n, r]), Y(() => {
6762
- n || p(!1);
6762
+ n || g(!1);
6763
6763
  }, [n]), Y(() => {
6764
6764
  if (!n || !d.current || !h.current) return;
6765
6765
  requestAnimationFrame(() => {
6766
- const L = d.current, R = h.current;
6767
- if (!L || !R) return;
6768
- const b = L.getBoundingClientRect(), E = R.getBoundingClientRect(), v = window.innerWidth, D = window.innerHeight, w = 16;
6766
+ const L = d.current, I = h.current;
6767
+ if (!L || !I) return;
6768
+ const b = L.getBoundingClientRect(), E = I.getBoundingClientRect(), v = window.innerWidth, D = window.innerHeight, w = 16;
6769
6769
  let A = 0, T = 0;
6770
6770
  if (o === "bottom" || o === "top" ? (o === "bottom" ? A = b.bottom + s : A = b.top - E.height - s, i === "start" ? T = b.left : i === "end" ? T = b.right - E.width : i === "center" && (T = b.left + (b.width - E.width) / 2)) : (o === "left" || o === "right") && (o === "left" ? T = b.left - E.width - s : T = b.right + s, i === "start" ? A = b.top : i === "end" ? A = b.bottom - E.height : i === "center" && (A = b.top + (b.height - E.height) / 2)), i !== "end" && T + E.width > v - w && (T = v - E.width - w), T < w && (T = w), A + E.height > D - w) {
6771
6771
  const W = b.top, ae = D - b.bottom;
@@ -6773,7 +6773,7 @@ const Uo = ({
6773
6773
  }
6774
6774
  A < w && (A = w);
6775
6775
  const O = v - w * 2;
6776
- p(!0), k({
6776
+ g(!0), k({
6777
6777
  position: "fixed",
6778
6778
  top: `${A}px`,
6779
6779
  left: `${T}px`,
@@ -6788,7 +6788,7 @@ const Uo = ({
6788
6788
  ref: h,
6789
6789
  className: `sc:z-dropdown ${c}`.trim(),
6790
6790
  "data-preserve-selection": !0,
6791
- style: y ? g : {
6791
+ style: y ? p : {
6792
6792
  // Initially hidden and positioned off-screen until useEffect calculates position
6793
6793
  position: "fixed",
6794
6794
  visibility: "hidden",
@@ -6824,7 +6824,7 @@ const Uo = ({
6824
6824
  { type: "wave", label: "Wave Text", icon: /* @__PURE__ */ f($, { icon: "lucide:waves", className: "sc:size-[18px]" }) },
6825
6825
  { type: "arch", label: "Arch Text", icon: /* @__PURE__ */ f($, { icon: "lucide:arrow-up-from-dot", className: "sc:size-[18px]" }) }
6826
6826
  ];
6827
- function Rl() {
6827
+ function Il() {
6828
6828
  const [e, t] = ne.useState(!1);
6829
6829
  return ne.useEffect(() => {
6830
6830
  if (typeof document > "u") return;
@@ -6837,7 +6837,7 @@ function Rl() {
6837
6837
  }), () => r.disconnect();
6838
6838
  }, []), e;
6839
6839
  }
6840
- const Il = ({
6840
+ const Rl = ({
6841
6841
  isOpen: e,
6842
6842
  onClose: t,
6843
6843
  title: n,
@@ -6851,12 +6851,12 @@ const Il = ({
6851
6851
  showCloseButton: u = !0,
6852
6852
  headerActions: d,
6853
6853
  hideVisibleTitle: h = !1,
6854
- hideHandle: g = !1,
6854
+ hideHandle: p = !1,
6855
6855
  disableScrollWrapper: k = !1,
6856
6856
  disableOverflowHidden: y = !1,
6857
- "data-testid": p
6857
+ "data-testid": g
6858
6858
  }) => {
6859
- const m = i === "bottom" ? s || a : void 0, M = Rl() ? 0.65 : 0.4;
6859
+ const m = i === "bottom" ? s || a : void 0, M = Il() ? 0.65 : 0.4;
6860
6860
  return /* @__PURE__ */ f(
6861
6861
  mo,
6862
6862
  {
@@ -6868,7 +6868,7 @@ const Il = ({
6868
6868
  placement: i,
6869
6869
  width: l,
6870
6870
  maxWidth: c,
6871
- hideHandle: g || i !== "bottom",
6871
+ hideHandle: p || i !== "bottom",
6872
6872
  showOverlay: !0,
6873
6873
  overlayOpacity: M,
6874
6874
  className: y ? "" : "sc:overflow-hidden",
@@ -6878,7 +6878,7 @@ const Il = ({
6878
6878
  // Canvas uses custom z-index variables
6879
6879
  zIndex: "var(--sc-z-drawer, 10002)"
6880
6880
  },
6881
- "data-testid": p,
6881
+ "data-testid": g,
6882
6882
  "data-preserve-selection": !0,
6883
6883
  children: [
6884
6884
  /* @__PURE__ */ f(yo, { className: "sc:sr-only", children: n }),
@@ -6975,7 +6975,7 @@ const Il = ({
6975
6975
  n(a), t();
6976
6976
  };
6977
6977
  return /* @__PURE__ */ j(
6978
- Il,
6978
+ Rl,
6979
6979
  {
6980
6980
  isOpen: e,
6981
6981
  onClose: t,
@@ -7049,14 +7049,14 @@ const Il = ({
7049
7049
  className: s
7050
7050
  }) => {
7051
7051
  var E;
7052
- const { get: a } = Hr(), [l, c] = B(!1), [u, d] = B(!1), [h, g] = B(!1), k = V(null), y = async () => {
7052
+ const { get: a } = Hr(), [l, c] = B(!1), [u, d] = B(!1), [h, p] = B(!1), k = V(null), y = async () => {
7053
7053
  try {
7054
7054
  const { ExportManager: v } = await import("./ExportManager-Ci81K6xA.js").then((T) => T.Z), { artboardManager: D, elements: w } = a(), A = D.getAllArtboards();
7055
7055
  v.exportToJSON(A, w, D), c(!1);
7056
7056
  } catch (v) {
7057
7057
  wn.error("Failed to save workspace:", v), alert("Failed to save workspace. Please try again.");
7058
7058
  }
7059
- }, p = () => {
7059
+ }, g = () => {
7060
7060
  var v;
7061
7061
  (v = k.current) == null || v.click(), c(!1);
7062
7062
  }, m = async (v) => {
@@ -7120,13 +7120,13 @@ This will replace your current workspace. Continue?`
7120
7120
  return;
7121
7121
  }
7122
7122
  if (v === "shape") {
7123
- c(!1), d(!1), g(!0);
7123
+ c(!1), d(!1), p(!0);
7124
7124
  return;
7125
7125
  }
7126
7126
  await a().handleAddElement(v), c(!1), d(!1);
7127
7127
  }, L = async (v) => {
7128
- g(!1), await a().handleAddElement("shape", { shapeType: v });
7129
- }, R = Go, b = () => /* @__PURE__ */ f("div", { className: "sc:my-xs sc:h-px sc:bg-border-primary" });
7128
+ p(!1), await a().handleAddElement("shape", { shapeType: v });
7129
+ }, I = Go, b = () => /* @__PURE__ */ f("div", { className: "sc:my-xs sc:h-px sc:bg-border-primary" });
7130
7130
  return /* @__PURE__ */ j(an, { children: [
7131
7131
  /* @__PURE__ */ f(
7132
7132
  Uo,
@@ -7166,7 +7166,7 @@ This will replace your current workspace. Continue?`
7166
7166
  top: 0,
7167
7167
  zIndex: "var(--sc-z-sticky)"
7168
7168
  },
7169
- children: /* @__PURE__ */ f(jn, { minWidth: "180px", children: R.map((v) => /* @__PURE__ */ f(
7169
+ children: /* @__PURE__ */ f(jn, { minWidth: "180px", children: I.map((v) => /* @__PURE__ */ f(
7170
7170
  Je,
7171
7171
  {
7172
7172
  icon: v.icon,
@@ -7182,7 +7182,7 @@ This will replace your current workspace. Continue?`
7182
7182
  ),
7183
7183
  /* @__PURE__ */ f(b, {}),
7184
7184
  /* @__PURE__ */ f(Je, { icon: /* @__PURE__ */ f($, { icon: G.save, className: "sc:size-[18px]" }), label: "Save", onClick: y }),
7185
- /* @__PURE__ */ f(Je, { icon: /* @__PURE__ */ f($, { icon: G.folderOpen, className: "sc:size-[18px]" }), label: "Open", onClick: p }),
7185
+ /* @__PURE__ */ f(Je, { icon: /* @__PURE__ */ f($, { icon: G.folderOpen, className: "sc:size-[18px]" }), label: "Open", onClick: g }),
7186
7186
  /* @__PURE__ */ f(
7187
7187
  Je,
7188
7188
  {
@@ -7226,7 +7226,7 @@ This will replace your current workspace. Continue?`
7226
7226
  _o,
7227
7227
  {
7228
7228
  isOpen: h,
7229
- onClose: () => g(!1),
7229
+ onClose: () => p(!1),
7230
7230
  onSelectType: L
7231
7231
  }
7232
7232
  )
@@ -7241,7 +7241,7 @@ function Wo({
7241
7241
  return Y(() => {
7242
7242
  if (!t || o) return;
7243
7243
  let s = !1;
7244
- return import("./ImagePanel-Ckpc6QqR.js").then(
7244
+ return import("./ImagePanel-Ih9e9cOQ.js").then(
7245
7245
  (a) => {
7246
7246
  s || i(() => a.ImagePanel);
7247
7247
  },
@@ -7259,7 +7259,7 @@ function Wo({
7259
7259
  };
7260
7260
  }, [t, o, r]), o ? /* @__PURE__ */ f(o, { isOpen: t, onOpenChange: n }) : null;
7261
7261
  }
7262
- function yc({ className: e, style: t }) {
7262
+ function bc({ className: e, style: t }) {
7263
7263
  ir("Editor.Menu"), rn("Editor.Menu");
7264
7264
  const [n, r] = B(!1);
7265
7265
  return /* @__PURE__ */ j("div", { "data-sc-part": "menu", className: e, style: t, children: [
@@ -7278,7 +7278,7 @@ const jl = () => {
7278
7278
  const { undo: e, redo: t, canUndo: n, canRedo: r } = ii();
7279
7279
  return /* @__PURE__ */ j("div", { className: "sc-undo-redo", style: { display: "inline-flex", gap: 4 }, children: [
7280
7280
  /* @__PURE__ */ f(
7281
- In,
7281
+ Rn,
7282
7282
  {
7283
7283
  icon: G.undo,
7284
7284
  onClick: e,
@@ -7288,7 +7288,7 @@ const jl = () => {
7288
7288
  }
7289
7289
  ),
7290
7290
  /* @__PURE__ */ f(
7291
- In,
7291
+ Rn,
7292
7292
  {
7293
7293
  icon: G.redo,
7294
7294
  onClick: t,
@@ -7299,10 +7299,10 @@ const jl = () => {
7299
7299
  )
7300
7300
  ] });
7301
7301
  };
7302
- function bc({ className: e, style: t }) {
7302
+ function wc({ className: e, style: t }) {
7303
7303
  return ir("Editor.History"), rn("Editor.History"), /* @__PURE__ */ f("div", { "data-sc-part": "history", className: e, style: t, children: /* @__PURE__ */ f(jl, {}) });
7304
7304
  }
7305
- function wc({ className: e, style: t }) {
7305
+ function xc({ className: e, style: t }) {
7306
7306
  ir("Editor.Add"), rn("Editor.Add");
7307
7307
  const { get: n } = Hr(), [r, o] = B(!1), [i, s] = B(!1), [a, l] = B(!1), c = async (d) => {
7308
7308
  if (o(!1), d === "shape") {
@@ -7359,17 +7359,17 @@ function wc({ className: e, style: t }) {
7359
7359
  ] });
7360
7360
  }
7361
7361
  const Pl = Qe("useExport");
7362
- function xc() {
7362
+ function kc() {
7363
7363
  const {
7364
7364
  artboards: e,
7365
7365
  artboardManager: t,
7366
7366
  elements: n,
7367
7367
  canvasRef: r
7368
- } = qt(), [o, i] = B(!1), [s, a] = B(!1), [l, c] = B([]), [u, d] = B({}), [h, g] = B({
7368
+ } = qt(), [o, i] = B(!1), [s, a] = B(!1), [l, c] = B([]), [u, d] = B({}), [h, p] = B({
7369
7369
  totalExports: 0,
7370
7370
  avgExportTime: 0,
7371
7371
  isWorkerActive: !1
7372
- }), k = V(0), y = V(null), p = dn.supportsWorkerExport(), m = N(async (v, D = {}) => {
7372
+ }), k = V(0), y = V(null), g = dn.supportsWorkerExport(), m = N(async (v, D = {}) => {
7373
7373
  const w = e.find((T) => T.id === v);
7374
7374
  if (!w)
7375
7375
  throw new Error(`[useExport] Artboard ${v} not found`);
@@ -7398,10 +7398,10 @@ function xc() {
7398
7398
  ), X = Date.now() - T;
7399
7399
  return c((q) => q.map(
7400
7400
  (te) => te.artboardId === v ? { ...te, status: "complete", progress: 100, dataUrl: _, timestamp: Date.now() } : te
7401
- )), d((q) => ({ ...q, [v]: _ })), g((q) => ({
7401
+ )), d((q) => ({ ...q, [v]: _ })), p((q) => ({
7402
7402
  totalExports: q.totalExports + 1,
7403
7403
  avgExportTime: (q.avgExportTime * q.totalExports + X) / (q.totalExports + 1),
7404
- isWorkerActive: p
7404
+ isWorkerActive: g
7405
7405
  })), _;
7406
7406
  } catch (T) {
7407
7407
  throw c((O) => O.map(
@@ -7410,7 +7410,7 @@ function xc() {
7410
7410
  } finally {
7411
7411
  i(!1);
7412
7412
  }
7413
- }, [e, t, n, r, p]), S = N(async (v = {}) => {
7413
+ }, [e, t, n, r, g]), S = N(async (v = {}) => {
7414
7414
  i(!0);
7415
7415
  try {
7416
7416
  const D = e.map(async (T) => {
@@ -7448,7 +7448,7 @@ function xc() {
7448
7448
  } finally {
7449
7449
  i(!1);
7450
7450
  }
7451
- }, [e, t, n, r]), R = N(async (v = {}) => {
7451
+ }, [e, t, n, r]), I = N(async (v = {}) => {
7452
7452
  i(!0);
7453
7453
  try {
7454
7454
  const D = e.map(async (T) => {
@@ -7482,8 +7482,8 @@ function xc() {
7482
7482
  transparentBackground: !0
7483
7483
  });
7484
7484
  return { id: ie.id, dataUrl: de };
7485
- }), ge = await Promise.all(te), xe = {};
7486
- for (const { id: ie, dataUrl: de } of ge)
7485
+ }), pe = await Promise.all(te), xe = {};
7486
+ for (const { id: ie, dataUrl: de } of pe)
7487
7487
  xe[ie] = de;
7488
7488
  d((ie) => ({ ...ie, ...xe })), W && W(xe);
7489
7489
  } catch (te) {
@@ -7501,14 +7501,14 @@ function xc() {
7501
7501
  exportArtboard: m,
7502
7502
  exportArtboardAsBlob: L,
7503
7503
  exportAllArtboards: S,
7504
- exportAllArtboardsAsBlobs: R,
7504
+ exportAllArtboardsAsBlobs: I,
7505
7505
  startContinuousExport: E,
7506
7506
  stopContinuousExport: b,
7507
7507
  isExporting: o,
7508
7508
  isContinuousExporting: s,
7509
7509
  progress: l,
7510
7510
  latestExports: u,
7511
- supportsWorkerExport: p,
7511
+ supportsWorkerExport: g,
7512
7512
  workerStats: h
7513
7513
  };
7514
7514
  }
@@ -7596,13 +7596,28 @@ function Vl(e) {
7596
7596
  return i.imageUrl;
7597
7597
  };
7598
7598
  }
7599
+ function Ul(e) {
7600
+ return async function(n) {
7601
+ if (!/^https?:\/\//.test(n)) return n;
7602
+ const r = await fetch(e, {
7603
+ method: "POST",
7604
+ credentials: "same-origin",
7605
+ headers: { "Content-Type": "application/json" },
7606
+ body: JSON.stringify({ url: n })
7607
+ }), o = await r.json().catch(() => null);
7608
+ if (!r.ok || !(o != null && o.imageUrl))
7609
+ throw new Error((o == null ? void 0 : o.error) || (o == null ? void 0 : o.message) || `Image ingest failed (${r.status})`);
7610
+ return o.imageUrl;
7611
+ };
7612
+ }
7599
7613
  const qo = {}, Ko = Xe(qo);
7600
- function kc({ services: e, children: t }) {
7614
+ function Cc({ services: e, children: t }) {
7601
7615
  const n = J(() => e ? {
7602
7616
  imageSearch: e.imageSearch ?? (e.imageSearchUrl ? $l(e.imageSearchUrl) : void 0),
7603
7617
  generate: e.generate ?? (e.generateUrl ? Hl(e.generateUrl) : void 0),
7604
7618
  vectors: e.vectors,
7605
7619
  removeBackground: e.removeBackground ?? (e.bgRemoveUrl ? Vl(e.bgRemoveUrl) : void 0),
7620
+ ingestImage: e.ingestImage ?? (e.ingestImageUrl ? Ul(e.ingestImageUrl) : void 0),
7606
7621
  onFontUpload: e.onFontUpload
7607
7622
  } : qo, [
7608
7623
  e == null ? void 0 : e.imageSearch,
@@ -7612,17 +7627,19 @@ function kc({ services: e, children: t }) {
7612
7627
  e == null ? void 0 : e.vectors,
7613
7628
  e == null ? void 0 : e.bgRemoveUrl,
7614
7629
  e == null ? void 0 : e.removeBackground,
7630
+ e == null ? void 0 : e.ingestImageUrl,
7631
+ e == null ? void 0 : e.ingestImage,
7615
7632
  e == null ? void 0 : e.onFontUpload
7616
7633
  ]);
7617
7634
  return /* @__PURE__ */ f(Ko.Provider, { value: n, children: t });
7618
7635
  }
7619
- function Cc() {
7636
+ function Sc() {
7620
7637
  return Be(Ko);
7621
7638
  }
7622
7639
  const Nr = Qe("GoogleFontsService");
7623
- let tt = [], gt = null;
7624
- async function Ul() {
7625
- return tt.length > 0 ? tt : gt || (gt = fetch("/google-fonts.json").then((e) => {
7640
+ let tt = [], pt = null;
7641
+ async function Gl() {
7642
+ return tt.length > 0 ? tt : pt || (pt = fetch("/google-fonts.json").then((e) => {
7626
7643
  if (!e.ok)
7627
7644
  throw new Error(`HTTP error! status: ${e.status}`);
7628
7645
  return e.json();
@@ -7632,12 +7649,12 @@ async function Ul() {
7632
7649
  subsets: t.subsets || [],
7633
7650
  variants: t.variants || [],
7634
7651
  popularity: t.popularity
7635
- })) : Nr.error("Unexpected API response structure:", e), tt)).catch((e) => (Nr.error("Error fetching Google Fonts:", e), gt = null, [])), gt);
7652
+ })) : Nr.error("Unexpected API response structure:", e), tt)).catch((e) => (Nr.error("Error fetching Google Fonts:", e), pt = null, [])), pt);
7636
7653
  }
7637
7654
  function xn() {
7638
7655
  return tt;
7639
7656
  }
7640
- function Gl() {
7657
+ function _l() {
7641
7658
  return tt.length > 0;
7642
7659
  }
7643
7660
  function zr(e) {
@@ -7650,7 +7667,7 @@ function zr(e) {
7650
7667
  }[e.toLowerCase()] || "display";
7651
7668
  }
7652
7669
  const Or = Qe("UnifiedFontService");
7653
- class _l {
7670
+ class Wl {
7654
7671
  constructor() {
7655
7672
  this.searchCache = /* @__PURE__ */ new Map(), this.previewFontLinks = /* @__PURE__ */ new Set();
7656
7673
  }
@@ -7662,7 +7679,7 @@ class _l {
7662
7679
  */
7663
7680
  async initialize() {
7664
7681
  try {
7665
- await Ul();
7682
+ await Gl();
7666
7683
  } catch (t) {
7667
7684
  Or.error("Failed to initialize UnifiedFontService:", t);
7668
7685
  }
@@ -7671,7 +7688,7 @@ class _l {
7671
7688
  * Check if fonts are loaded
7672
7689
  */
7673
7690
  isFontsLoaded() {
7674
- return Gl();
7691
+ return _l();
7675
7692
  }
7676
7693
  // ========================================
7677
7694
  // Font Retrieval
@@ -7855,29 +7872,29 @@ class _l {
7855
7872
  };
7856
7873
  }
7857
7874
  }
7858
- const Sc = new _l();
7875
+ const Ec = new Wl();
7859
7876
  function Jo(e) {
7860
7877
  return e instanceof ui;
7861
7878
  }
7862
- function Wl(e) {
7863
- return e instanceof li;
7864
- }
7865
7879
  function Yl(e) {
7866
- return e instanceof di;
7880
+ return e instanceof li;
7867
7881
  }
7868
7882
  function ql(e) {
7869
- return e instanceof Re;
7883
+ return e instanceof di;
7870
7884
  }
7871
7885
  function Kl(e) {
7872
- return e instanceof ci;
7886
+ return e instanceof Ie;
7873
7887
  }
7874
7888
  function Jl(e) {
7875
- return Jo(e) ? "text" : Wl(e) ? "image" : Yl(e) ? "shape" : ql(e) ? "group" : Kl(e) ? "path" : null;
7889
+ return e instanceof ci;
7876
7890
  }
7877
- const mt = ["x", "y", "rotation", "opacity", "name", "visible", "locked"], Xl = ["text", "fontSize", "color", "fontFamily", "bold", "italic", "textAlign"], Ql = ["fillColor", "fill", "width", "height"], Zl = ["imageUrl", "width", "height", "adjustments"], ec = {
7878
- text: [...mt, ...Xl],
7879
- shape: [...mt, ...Ql],
7880
- image: [...mt, ...Zl],
7891
+ function Xl(e) {
7892
+ return Jo(e) ? "text" : Yl(e) ? "image" : ql(e) ? "shape" : Kl(e) ? "group" : Jl(e) ? "path" : null;
7893
+ }
7894
+ const mt = ["x", "y", "rotation", "opacity", "name", "visible", "locked"], Ql = ["text", "fontSize", "color", "fontFamily", "bold", "italic", "textAlign"], Zl = ["fillColor", "fill", "width", "height"], ec = ["imageUrl", "width", "height", "adjustments"], tc = {
7895
+ text: [...mt, ...Ql],
7896
+ shape: [...mt, ...Zl],
7897
+ image: [...mt, ...ec],
7881
7898
  group: [...mt],
7882
7899
  path: [...mt]
7883
7900
  }, kn = ["left", "center", "right"], jt = ["brightness", "contrast", "saturation"], Cn = 3;
@@ -7898,7 +7915,7 @@ function Fr(e, t, n, r) {
7898
7915
  { key: e, kind: r, value: t }
7899
7916
  );
7900
7917
  }
7901
- function tc(e, t) {
7918
+ function nc(e, t) {
7902
7919
  const n = si(t), r = n ? t.name : t;
7903
7920
  if (!n) {
7904
7921
  const a = e.get(r);
@@ -7913,11 +7930,11 @@ function tc(e, t) {
7913
7930
  { layerName: r, validNames: s, validIds: i.map((a) => a.id), docSlug: "embed-mode" }
7914
7931
  );
7915
7932
  }
7916
- function nc(e, t) {
7917
- const n = Jl(e);
7933
+ function rc(e, t) {
7934
+ const n = Xl(e);
7918
7935
  if (!n)
7919
7936
  throw He("target is not a patchable editor element.", { kind: null });
7920
- const r = ec[n];
7937
+ const r = tc[n];
7921
7938
  for (const [o, i] of Object.entries(t))
7922
7939
  if (i !== void 0) {
7923
7940
  if (!r.includes(o))
@@ -7995,7 +8012,7 @@ function nc(e, t) {
7995
8012
  }
7996
8013
  return n;
7997
8014
  }
7998
- function rc(e, t) {
8015
+ function oc(e, t) {
7999
8016
  let n = !1;
8000
8017
  if (t.x !== void 0 && (e.x = t.x), t.y !== void 0 && (e.y = t.y), t.rotation !== void 0 && e.setRotation(t.rotation), t.opacity !== void 0 && (e.opacity = t.opacity), t.name !== void 0 && (e.name = t.name), t.visible !== void 0 && (e.visible = t.visible), t.locked !== void 0 && (e.locked = t.locked), Jo(e))
8001
8018
  return t.text !== void 0 && e.setText(t.text), t.fontSize !== void 0 && e.setFontSize(t.fontSize), t.color !== void 0 && e.setColor(t.color), t.fontFamily !== void 0 && t.fontFamily !== e.fontFamily && (hi.clearCache(e.fontFamily), e.fontFamily = t.fontFamily), t.bold !== void 0 && (e.bold = t.bold), t.italic !== void 0 && (e.italic = t.italic), t.textAlign !== void 0 && (e.textAlign = t.textAlign), { needsImageLoad: n };
@@ -8004,8 +8021,8 @@ function rc(e, t) {
8004
8021
  const o = e.transformData;
8005
8022
  o.fillColor = t.fillColor, delete o.fill;
8006
8023
  }
8007
- if (t.fill !== void 0 && (e.transformData.fill = pi(t.fill)), t.adjustments !== void 0) {
8008
- const o = e, i = gi(t.adjustments);
8024
+ if (t.fill !== void 0 && (e.transformData.fill = gi(t.fill)), t.adjustments !== void 0) {
8025
+ const o = e, i = pi(t.adjustments);
8009
8026
  i ? o.transformData.adjustments = i : delete o.transformData.adjustments;
8010
8027
  }
8011
8028
  if (t.imageUrl !== void 0) {
@@ -8015,7 +8032,7 @@ function rc(e, t) {
8015
8032
  return { needsImageLoad: n };
8016
8033
  }
8017
8034
  const jr = Qe("useCommands");
8018
- function Ec() {
8035
+ function Ac() {
8019
8036
  const e = qt(), {
8020
8037
  undo: t,
8021
8038
  redo: n,
@@ -8029,10 +8046,10 @@ function Ec() {
8029
8046
  executeCreateArtboard: u,
8030
8047
  executeDeleteArtboard: d,
8031
8048
  executeUpdateArtboard: h,
8032
- addElement: g,
8049
+ addElement: p,
8033
8050
  elementStore: k,
8034
8051
  artboardManager: y,
8035
- historyManager: p
8052
+ historyManager: g
8036
8053
  } = e, m = V(k);
8037
8054
  m.current = k;
8038
8055
  const S = V(i);
@@ -8040,10 +8057,10 @@ function Ec() {
8040
8057
  const M = V(null), L = N(
8041
8058
  (E, v, D) => {
8042
8059
  const w = m.current;
8043
- let A = tc(w, E);
8044
- const T = y.getArtboardIdForElement(A.id) ?? y.getActiveArtboardId(), O = T ? p.peekArtboard(T) : null;
8045
- O instanceof sr && O.elementId === A.id && O.newElement && (A = O.newElement), nc(A, v);
8046
- const W = A.clone(), { needsImageLoad: ae } = rc(W, v);
8060
+ let A = nc(w, E);
8061
+ const T = y.getArtboardIdForElement(A.id) ?? y.getActiveArtboardId(), O = T ? g.peekArtboard(T) : null;
8062
+ O instanceof sr && O.elementId === A.id && O.newElement && (A = O.newElement), rc(A, v);
8063
+ const W = A.clone(), { needsImageLoad: ae } = oc(W, v);
8047
8064
  if (ae) {
8048
8065
  const X = W;
8049
8066
  X.onLoadCallback = (q) => {
@@ -8057,13 +8074,13 @@ function Ec() {
8057
8074
  return;
8058
8075
  }
8059
8076
  if (S.current(A, W), D != null && D.coalesce && T) {
8060
- const X = p.peekArtboard(T);
8077
+ const X = g.peekArtboard(T);
8061
8078
  M.current = X instanceof sr ? { elementId: A.id, command: X } : null;
8062
8079
  } else
8063
8080
  M.current = null;
8064
8081
  },
8065
- [y, p]
8066
- ), R = N(() => {
8082
+ [y, g]
8083
+ ), I = N(() => {
8067
8084
  jr.warn("[useCommands] clearHistory is not yet implemented in EditorContext");
8068
8085
  }, []), b = N((E) => {
8069
8086
  jr.warn("[useCommands] clearArtboardHistory is not yet implemented in EditorContext");
@@ -8075,11 +8092,11 @@ function Ec() {
8075
8092
  canUndo: r,
8076
8093
  canRedo: o,
8077
8094
  // History management
8078
- clearHistory: R,
8095
+ clearHistory: I,
8079
8096
  clearArtboardHistory: b,
8080
8097
  // Declarative element write path
8081
8098
  updateElement: L,
8082
- addElement: g,
8099
+ addElement: p,
8083
8100
  // Command execution
8084
8101
  executeElementUpdate: i,
8085
8102
  executeAddElement: s,
@@ -8093,57 +8110,58 @@ function Ec() {
8093
8110
  };
8094
8111
  }
8095
8112
  export {
8096
- Jl as A,
8113
+ Xl as A,
8097
8114
  st as B,
8098
- kc as C,
8115
+ Cc as C,
8099
8116
  Uo as D,
8100
- gc as E,
8101
- ql as F,
8102
- Wl as G,
8103
- Kl as H,
8117
+ mc as E,
8118
+ Kl as F,
8119
+ Yl as G,
8120
+ Jl as H,
8104
8121
  $ as I,
8105
- Yl as J,
8122
+ ql as J,
8106
8123
  Jo as K,
8107
8124
  El as L,
8108
8125
  Fl as M,
8109
- Ie as N,
8126
+ Re as N,
8110
8127
  G as O,
8111
8128
  As as P,
8112
8129
  mo as Q,
8113
8130
  vo as R,
8114
8131
  _o as S,
8115
8132
  Yn as T,
8116
- Sc as U,
8133
+ Ec as U,
8117
8134
  yo as V,
8118
- Il as W,
8119
- ho as X,
8120
- Rn as Y,
8135
+ Rl as W,
8136
+ Ul as X,
8137
+ ho as Y,
8121
8138
  In as Z,
8139
+ Rn as _,
8122
8140
  Hl as a,
8123
8141
  $l as b,
8124
8142
  Vl as c,
8125
- Cc as d,
8143
+ Sc as d,
8126
8144
  pc as e,
8127
- Ec as f,
8128
- xc as g,
8145
+ Ac as f,
8146
+ kc as g,
8129
8147
  xi as h,
8130
8148
  Jt as i,
8131
8149
  At as j,
8132
8150
  bs as k,
8133
8151
  jn as l,
8134
8152
  Je as m,
8135
- po as n,
8153
+ go as n,
8136
8154
  xs as o,
8137
- mc as p,
8155
+ vc as p,
8138
8156
  Vo as q,
8139
8157
  or as r,
8140
8158
  ks as s,
8141
8159
  rn as t,
8142
8160
  js as u,
8143
8161
  ir as v,
8144
- wc as w,
8145
- yc as x,
8146
- bc as y,
8147
- vc as z
8162
+ xc as w,
8163
+ bc as x,
8164
+ wc as y,
8165
+ yc as z
8148
8166
  };
8149
- //# sourceMappingURL=useCommands-DmewMc5w.js.map
8167
+ //# sourceMappingURL=useCommands-Bj9QHZ35.js.map