@snowcone-app/canvas 0.27.0 → 0.28.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 (61) hide show
  1. package/ERROR_CONTRACT.md +13 -0
  2. package/dist/{CanvasRenderer-yszzrDfo.js → CanvasRenderer-B_3GISlW.js} +1124 -1068
  3. package/dist/CanvasRenderer-B_3GISlW.js.map +1 -0
  4. package/dist/{CanvasStateV1-BTbCD_xC.js → CanvasStateV1-kL09wsAn.js} +3 -3
  5. package/dist/{CanvasStateV1-BTbCD_xC.js.map → CanvasStateV1-kL09wsAn.js.map} +1 -1
  6. package/dist/ContextualToolbars-C69oYLdw.js +5771 -0
  7. package/dist/ContextualToolbars-C69oYLdw.js.map +1 -0
  8. package/dist/{EditorCanvasImpl-Ui8Ceb-h.js → EditorCanvasImpl-CrI9C_xM.js} +8 -8
  9. package/dist/{EditorCanvasImpl-Ui8Ceb-h.js.map → EditorCanvasImpl-CrI9C_xM.js.map} +1 -1
  10. package/dist/{ExportManager-BTcyj4cf.js → ExportManager-J2xK86uq.js} +12 -16
  11. package/dist/ExportManager-J2xK86uq.js.map +1 -0
  12. package/dist/{FontAnalyzer-EF3gLPr8.js → FontAnalyzer-PE6nysqE.js} +658 -639
  13. package/dist/FontAnalyzer-PE6nysqE.js.map +1 -0
  14. package/dist/{ImagePanel-CIk6z41z.js → ImagePanel-CmQCxBGm.js} +6 -6
  15. package/dist/{ImagePanel-CIk6z41z.js.map → ImagePanel-CmQCxBGm.js.map} +1 -1
  16. package/dist/{SnowconeCanvas-DuWALOAt.js → SnowconeCanvas-CQiFVR0X.js} +10 -10
  17. package/dist/{SnowconeCanvas-DuWALOAt.js.map → SnowconeCanvas-CQiFVR0X.js.map} +1 -1
  18. package/dist/{UnifiedFontService-CHVYDBDW.js → UnifiedFontService-BJzoqfBF.js} +755 -713
  19. package/dist/UnifiedFontService-BJzoqfBF.js.map +1 -0
  20. package/dist/advanced.mjs +14 -14
  21. package/dist/components/MultiSelectionToolbar.d.ts +18 -0
  22. package/dist/components/ui/toolbar-button.d.ts +2 -0
  23. package/dist/core/GestureConstraints.d.ts +92 -0
  24. package/dist/core/InteractionStateMachine.d.ts +16 -2
  25. package/dist/core/ResizeHandler.d.ts +4 -1
  26. package/dist/core/ResizePipeline.d.ts +3 -0
  27. package/dist/{custom-icons-CcLMyybv.js → custom-icons-BWiUGqD6.js} +2 -2
  28. package/dist/{custom-icons-CcLMyybv.js.map → custom-icons-BWiUGqD6.js.map} +1 -1
  29. package/dist/{design-builder-cZY958Rw.js → design-builder-bquxIHct.js} +2 -2
  30. package/dist/{design-builder-cZY958Rw.js.map → design-builder-bquxIHct.js.map} +1 -1
  31. package/dist/{editorErrors-BhrZ_nwj.js → editorErrors-8uDRMhow.js} +2 -2
  32. package/dist/editorErrors-8uDRMhow.js.map +1 -0
  33. package/dist/{embed-CJswRZte.js → embed-L3oRIgsj.js} +10 -10
  34. package/dist/{embed-CJswRZte.js.map → embed-L3oRIgsj.js.map} +1 -1
  35. package/dist/embed.mjs +6 -6
  36. package/dist/errors/editorError.d.ts +7 -1
  37. package/dist/{guards-DIX8aXWM.js → guards-BlbhM5MX.js} +2 -2
  38. package/dist/{guards-DIX8aXWM.js.map → guards-BlbhM5MX.js.map} +1 -1
  39. package/dist/hooks/index.d.ts +2 -0
  40. package/dist/hooks/useAlignDistribute.d.ts +19 -0
  41. package/dist/index.mjs +8 -8
  42. package/dist/internals.mjs +5 -5
  43. package/dist/{template-fields-BXl29sgh.js → template-fields-ai7vnW8g.js} +6 -6
  44. package/dist/{template-fields-BXl29sgh.js.map → template-fields-ai7vnW8g.js.map} +1 -1
  45. package/dist/testing.mjs +4 -4
  46. package/dist/{usePieceGuideBundle-DE21DQGZ.js → usePieceGuideBundle-CMe5br2a.js} +2 -2
  47. package/dist/{usePieceGuideBundle-DE21DQGZ.js.map → usePieceGuideBundle-CMe5br2a.js.map} +1 -1
  48. package/dist/utils/alignDistribute.d.ts +41 -0
  49. package/dist/{validation-DGXAQmUC.js → validation-B8kIYutI.js} +2592 -2562
  50. package/dist/validation-B8kIYutI.js.map +1 -0
  51. package/dist/workers/export-worker.bundle.string.d.ts +1 -1
  52. package/example/package.json +1 -1
  53. package/package.json +1 -1
  54. package/dist/CanvasRenderer-yszzrDfo.js.map +0 -1
  55. package/dist/ContextualToolbars-BHjYsril.js +0 -5556
  56. package/dist/ContextualToolbars-BHjYsril.js.map +0 -1
  57. package/dist/ExportManager-BTcyj4cf.js.map +0 -1
  58. package/dist/FontAnalyzer-EF3gLPr8.js.map +0 -1
  59. package/dist/UnifiedFontService-CHVYDBDW.js.map +0 -1
  60. package/dist/editorErrors-BhrZ_nwj.js.map +0 -1
  61. package/dist/validation-DGXAQmUC.js.map +0 -1
@@ -1,14 +1,14 @@
1
1
  import { jsx as f, jsxs as j, Fragment as nn } from "react/jsx-runtime";
2
- import * as O from "react";
3
- import te, { useRef as G, useState as H, useCallback as N, useMemo as q, useEffect as W, forwardRef as In, createElement as yn, useLayoutEffect as Nn, memo as Go, useReducer as Wo, useContext as je, createContext as Xe, cloneElement as _o, useId as Lr, useSyncExternalStore as Rr } from "react";
4
- import { u as On, h as qo, g as Pt, r as Yo, j as Ko, k as Tr, d as Xo } from "./editorErrors-BhrZ_nwj.js";
5
- import { G as Ie, c as ot, C as rn } from "./FontAnalyzer-EF3gLPr8.js";
6
- import { g as Jo, I as on, E as sn } from "./ExportManager-BTcyj4cf.js";
7
- import { createPortal as zn, unstable_batchedUpdates as Nt } from "react-dom";
2
+ import * as z from "react";
3
+ import te, { useRef as G, useState as B, useCallback as N, useMemo as q, useEffect as W, forwardRef as In, createElement as yn, useLayoutEffect as Nn, memo as Go, useReducer as Wo, useContext as je, createContext as Xe, cloneElement as _o, useId as Lr, useSyncExternalStore as Rr } from "react";
4
+ import { u as zn, h as qo, g as Pt, r as Yo, j as Ko, k as Tr, d as Xo } from "./editorErrors-8uDRMhow.js";
5
+ import { G as Ie, c as ot, C as rn } from "./FontAnalyzer-PE6nysqE.js";
6
+ import { g as Jo, I as on, E as sn } from "./ExportManager-J2xK86uq.js";
7
+ import { createPortal as On, unstable_batchedUpdates as Nt } from "react-dom";
8
8
  import { clsx as Ir } from "clsx";
9
9
  import { extendTailwindMerge as Nr } from "tailwind-merge";
10
10
  import { Slot as Qo } from "@radix-ui/react-slot";
11
- import { cva as Or } from "class-variance-authority";
11
+ import { cva as zr } from "class-variance-authority";
12
12
  import * as tt from "@radix-ui/react-tooltip";
13
13
  const Zo = {
14
14
  "eos-icons:loading": {
@@ -101,6 +101,46 @@ const Zo = {
101
101
  width: 24,
102
102
  height: 24
103
103
  },
104
+ "gravity-ui:objects-align-bottom": {
105
+ body: '<path fill="currentColor" fill-rule="evenodd" d="M1.75 14a.75.75 0 0 1 0-1.5h12.5a.75.75 0 0 1 0 1.5zM5.5 9.5H4a.5.5 0 0 1-.5-.5V3.5A.5.5 0 0 1 4 3h1.5a.5.5 0 0 1 .5.5V9a.5.5 0 0 1-.5.5M4 11a2 2 0 0 1-2-2V3.5a2 2 0 0 1 2-2h1.5a2 2 0 0 1 2 2V9a2 2 0 0 1-2 2zm8-1.5h-1.5A.5.5 0 0 1 10 9V7a.5.5 0 0 1 .5-.5H12a.5.5 0 0 1 .5.5v2a.5.5 0 0 1-.5.5M10.5 11a2 2 0 0 1-2-2V7a2 2 0 0 1 2-2H12a2 2 0 0 1 2 2v2a2 2 0 0 1-2 2z" clip-rule="evenodd"/>',
106
+ width: 24,
107
+ height: 24
108
+ },
109
+ "gravity-ui:objects-align-center-horizontal": {
110
+ body: '<path fill="currentColor" fill-rule="evenodd" d="M13 5.5V4a.5.5 0 0 0-.5-.5h-9A.5.5 0 0 0 3 4v1.5a.5.5 0 0 0 .5.5h9a.5.5 0 0 0 .5-.5m-4.25 2h3.75a2 2 0 0 0 2-2V4a2 2 0 0 0-2-2H8.75v-.25a.75.75 0 0 0-1.5 0V2H3.5a2 2 0 0 0-2 2v1.5a2 2 0 0 0 2 2h3.75v1H6a2 2 0 0 0-2 2V12a2 2 0 0 0 2 2h1.25v.25a.75.75 0 0 0 1.5 0V14H10a2 2 0 0 0 2-2v-1.5a2 2 0 0 0-2-2H8.75zM8 10H6a.5.5 0 0 0-.5.5V12a.5.5 0 0 0 .5.5h4a.5.5 0 0 0 .5-.5v-1.5a.5.5 0 0 0-.5-.5z" clip-rule="evenodd"/>',
111
+ width: 24,
112
+ height: 24
113
+ },
114
+ "gravity-ui:objects-align-center-vertical": {
115
+ body: '<path fill="currentColor" fill-rule="evenodd" d="M5.5 3H4a.5.5 0 0 0-.5.5v9a.5.5 0 0 0 .5.5h1.5a.5.5 0 0 0 .5-.5v-9a.5.5 0 0 0-.5-.5m2 4.25V3.5a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2v3.75h-.25a.75.75 0 0 0 0 1.5H2v3.75a2 2 0 0 0 2 2h1.5a2 2 0 0 0 2-2V8.75h1V10a2 2 0 0 0 2 2H12a2 2 0 0 0 2-2V8.75h.25a.75.75 0 0 0 0-1.5H14V6a2 2 0 0 0-2-2h-1.5a2 2 0 0 0-2 2v1.25zM10 8v2a.5.5 0 0 0 .5.5H12a.5.5 0 0 0 .5-.5V6a.5.5 0 0 0-.5-.5h-1.5a.5.5 0 0 0-.5.5z" clip-rule="evenodd"/>',
116
+ width: 24,
117
+ height: 24
118
+ },
119
+ "gravity-ui:objects-align-justify-horizontal": {
120
+ body: '<path fill="currentColor" fill-rule="evenodd" d="M14.25 1a.75.75 0 0 1 .75.75v12.5a.75.75 0 0 1-1.5 0V1.75a.75.75 0 0 1 .75-.75M11 4v1.5a.5.5 0 0 1-.5.5h-5a.5.5 0 0 1-.5-.5V4a.5.5 0 0 1 .5-.5h5a.5.5 0 0 1 .5.5m-.5-2a2 2 0 0 1 2 2v1.5a2 2 0 0 1-2 2h-5a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2zm.5 8.5V12a.5.5 0 0 1-.5.5h-5A.5.5 0 0 1 5 12v-1.5a.5.5 0 0 1 .5-.5h5a.5.5 0 0 1 .5.5m-.5-2a2 2 0 0 1 2 2V12a2 2 0 0 1-2 2h-5a2 2 0 0 1-2-2v-1.5a2 2 0 0 1 2-2zM1 1.75a.75.75 0 0 1 1.5 0v12.5a.75.75 0 0 1-1.5 0z" clip-rule="evenodd"/>',
121
+ width: 24,
122
+ height: 24
123
+ },
124
+ "gravity-ui:objects-align-justify-vertical": {
125
+ body: '<path fill="currentColor" fill-rule="evenodd" d="M15 14.25a.75.75 0 0 1-.75.75H1.75a.75.75 0 0 1 0-1.5h12.5a.75.75 0 0 1 .75.75M12 11h-1.5a.5.5 0 0 1-.5-.5v-5a.5.5 0 0 1 .5-.5H12a.5.5 0 0 1 .5.5v5a.5.5 0 0 1-.5.5m2-.5a2 2 0 0 1-2 2h-1.5a2 2 0 0 1-2-2v-5a2 2 0 0 1 2-2H12a2 2 0 0 1 2 2zm-8.5.5H4a.5.5 0 0 1-.5-.5v-5A.5.5 0 0 1 4 5h1.5a.5.5 0 0 1 .5.5v5a.5.5 0 0 1-.5.5m2-.5a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2v-5a2 2 0 0 1 2-2h1.5a2 2 0 0 1 2 2zM14.25 1a.75.75 0 0 1 0 1.5H1.75a.75.75 0 0 1 0-1.5z" clip-rule="evenodd"/>',
126
+ width: 24,
127
+ height: 24
128
+ },
129
+ "gravity-ui:objects-align-left": {
130
+ body: '<path fill="currentColor" fill-rule="evenodd" d="M2 1.75a.75.75 0 0 1 1.5 0v12.5a.75.75 0 0 1-1.5 0zM6.5 5.5V4a.5.5 0 0 1 .5-.5h5.5a.5.5 0 0 1 .5.5v1.5a.5.5 0 0 1-.5.5H7a.5.5 0 0 1-.5-.5M5 4a2 2 0 0 1 2-2h5.5a2 2 0 0 1 2 2v1.5a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2zm1.5 8v-1.5A.5.5 0 0 1 7 10h2a.5.5 0 0 1 .5.5V12a.5.5 0 0 1-.5.5H7a.5.5 0 0 1-.5-.5M5 10.5a2 2 0 0 1 2-2h2a2 2 0 0 1 2 2V12a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2z" clip-rule="evenodd"/>',
131
+ width: 24,
132
+ height: 24
133
+ },
134
+ "gravity-ui:objects-align-right": {
135
+ body: '<path fill="currentColor" fill-rule="evenodd" d="M14 1.75a.75.75 0 0 0-1.5 0v12.5a.75.75 0 0 0 1.5 0zM9.5 5.5V4a.5.5 0 0 0-.5-.5H3.5A.5.5 0 0 0 3 4v1.5a.5.5 0 0 0 .5.5H9a.5.5 0 0 0 .5-.5M11 4a2 2 0 0 0-2-2H3.5a2 2 0 0 0-2 2v1.5a2 2 0 0 0 2 2H9a2 2 0 0 0 2-2zm-1.5 8v-1.5A.5.5 0 0 0 9 10H7a.5.5 0 0 0-.5.5V12a.5.5 0 0 0 .5.5h2a.5.5 0 0 0 .5-.5m1.5-1.5a2 2 0 0 0-2-2H7a2 2 0 0 0-2 2V12a2 2 0 0 0 2 2h2a2 2 0 0 0 2-2z" clip-rule="evenodd"/>',
136
+ width: 24,
137
+ height: 24
138
+ },
139
+ "gravity-ui:objects-align-top": {
140
+ body: '<path fill="currentColor" fill-rule="evenodd" d="M1.75 2a.75.75 0 0 0 0 1.5h12.5a.75.75 0 0 0 0-1.5zM5.5 6.5H4a.5.5 0 0 0-.5.5v5.5a.5.5 0 0 0 .5.5h1.5a.5.5 0 0 0 .5-.5V7a.5.5 0 0 0-.5-.5M4 5a2 2 0 0 0-2 2v5.5a2 2 0 0 0 2 2h1.5a2 2 0 0 0 2-2V7a2 2 0 0 0-2-2zm8 1.5h-1.5a.5.5 0 0 0-.5.5v2a.5.5 0 0 0 .5.5H12a.5.5 0 0 0 .5-.5V7a.5.5 0 0 0-.5-.5M10.5 5a2 2 0 0 0-2 2v2a2 2 0 0 0 2 2H12a2 2 0 0 0 2-2V7a2 2 0 0 0-2-2z" clip-rule="evenodd"/>',
141
+ width: 24,
142
+ height: 24
143
+ },
104
144
  "gravity-ui:pencil": {
105
145
  body: '<path fill="currentColor" fill-rule="evenodd" d="M11.423 1A3.577 3.577 0 0 1 15 4.577c0 .27-.108.53-.3.722l-.528.529l-1.971 1.971l-5.059 5.059a3 3 0 0 1-1.533.82l-2.638.528a1 1 0 0 1-1.177-1.177l.528-2.638a3 3 0 0 1 .82-1.533l5.059-5.059l2.5-2.5c.191-.191.451-.299.722-.299m-2.31 4.009l-4.91 4.91a1.5 1.5 0 0 0-.41.766l-.38 1.903l1.902-.38a1.5 1.5 0 0 0 .767-.41l4.91-4.91a2.08 2.08 0 0 0-1.88-1.88m3.098.658a3.6 3.6 0 0 0-1.878-1.879l1.28-1.28c.995.09 1.788.884 1.878 1.88z" clip-rule="evenodd"/>',
106
146
  width: 24,
@@ -476,16 +516,16 @@ const Zo = {
476
516
  width: 15,
477
517
  height: 15
478
518
  }
479
- }, zr = typeof window < "u";
519
+ }, Or = typeof window < "u";
480
520
  async function ei() {
481
- if (!zr) return;
521
+ if (!Or) return;
482
522
  const { addIcon: e } = await Promise.resolve().then(() => Qi);
483
523
  for (const [t, n] of Object.entries(Zo))
484
524
  e(t, n);
485
525
  }
486
526
  let an = !1;
487
527
  function Pl() {
488
- an || !zr || (an = !0, ei().catch(() => {
528
+ an || !Or || (an = !0, ei().catch(() => {
489
529
  an = !1;
490
530
  }));
491
531
  }
@@ -559,112 +599,112 @@ function ni(e = {}) {
559
599
  executeAddElement: g,
560
600
  executeRemoveElement: x,
561
601
  executeReorderElement: w
562
- } = On(), p = G(/* @__PURE__ */ new Map()), [m, E] = H(0), A = c.getActiveArtboardId(), M = t !== void 0 ? t : A, T = M ? (ce = c.getArtboard) == null ? void 0 : ce.call(c, M) : null, y = o ?? (T == null ? void 0 : T.backgroundColor) ?? "transparent", S = N(async (k) => {
563
- const C = s.find((z) => z.id === k);
564
- if (!C) return;
565
- const I = await er(C, r, y);
566
- p.current.set(k, I), E((z) => z + 1);
602
+ } = zn(), p = G(/* @__PURE__ */ new Map()), [m, E] = B(0), A = c.getActiveArtboardId(), D = t !== void 0 ? t : A, T = D ? (ce = c.getArtboard) == null ? void 0 : ce.call(c, D) : null, y = o ?? (T == null ? void 0 : T.backgroundColor) ?? "transparent", S = N(async (C) => {
603
+ const k = s.find((O) => O.id === C);
604
+ if (!k) return;
605
+ const I = await er(k, r, y);
606
+ p.current.set(C, I), E((O) => O + 1);
567
607
  }, [s, r, y]), v = q(() => {
568
- let k = s;
569
- if (M) {
570
- const C = c.getElementsOnArtboard(M);
571
- k = k.filter((I) => C.includes(I.id));
608
+ let C = s;
609
+ if (D) {
610
+ const k = c.getElementsOnArtboard(D);
611
+ C = C.filter((I) => k.includes(I.id));
572
612
  }
573
- return n || (k = k.filter((C) => C.visible !== !1)), k;
574
- }, [s, M, n, c]), L = q(() => Fr(
613
+ return n || (C = C.filter((k) => k.visible !== !1)), C;
614
+ }, [s, D, n, c]), L = q(() => Fr(
575
615
  v,
576
616
  a,
577
617
  l,
578
618
  p.current,
579
619
  S
580
- ), [v, a, l, S, m]), b = q(() => Pr(L), [L]), D = q(() => b.filter((k) => k.isSelected), [b]), R = N((k, C = !1) => {
581
- C ? l.includes(k) ? h(l.filter((I) => I !== k)) : h([...l, k]) : u(k);
582
- }, [l, h, u]), F = N((k) => {
583
- h(k);
620
+ ), [v, a, l, S, m]), b = q(() => Pr(L), [L]), M = q(() => b.filter((C) => C.isSelected), [b]), R = N((C, k = !1) => {
621
+ k ? l.includes(C) ? h(l.filter((I) => I !== C)) : h([...l, C]) : u(C);
622
+ }, [l, h, u]), F = N((C) => {
623
+ h(C);
584
624
  }, [h]), X = N(() => {
585
625
  u(null), h([]);
586
- }, [u, h]), pe = N((k) => {
587
- const C = s.find((z) => z.id === k);
588
- if (!C) return;
589
- const I = C.clone();
590
- I.visible = !(C.visible ?? !0), d(I);
591
- }, [s, d]), J = N((k) => {
592
- const C = s.find((z) => z.id === k);
593
- if (!C) return;
594
- const I = C.clone();
595
- I.locked = !(C.locked ?? !1), d(I);
596
- }, [s, d]), re = N((k, C) => {
597
- const I = s.find((K) => K.id === k);
626
+ }, [u, h]), pe = N((C) => {
627
+ const k = s.find((O) => O.id === C);
628
+ if (!k) return;
629
+ const I = k.clone();
630
+ I.visible = !(k.visible ?? !0), d(I);
631
+ }, [s, d]), J = N((C) => {
632
+ const k = s.find((O) => O.id === C);
633
+ if (!k) return;
634
+ const I = k.clone();
635
+ I.locked = !(k.locked ?? !1), d(I);
636
+ }, [s, d]), re = N((C, k) => {
637
+ const I = s.find((K) => K.id === C);
598
638
  if (!I) return;
599
- const z = I.clone();
600
- z.name = C, d(z);
601
- }, [s, d]), Y = N((k) => {
602
- const C = s.find((I) => I.id === k);
603
- if (!C) {
604
- ie.warn(`Element ${k} not found for deletion`);
639
+ const O = I.clone();
640
+ O.name = k, d(O);
641
+ }, [s, d]), Y = N((C) => {
642
+ const k = s.find((I) => I.id === C);
643
+ if (!k) {
644
+ ie.warn(`Element ${C} not found for deletion`);
605
645
  return;
606
646
  }
607
- x(C), (a === k || l.includes(k)) && (u(null), h(l.filter((I) => I !== k)));
608
- }, [s, x, a, l, u, h]), ee = N((k) => {
609
- const C = s.find((ae) => ae.id === k);
610
- if (!C) {
611
- ie.warn(`Element ${k} not found for duplication`);
647
+ x(k), (a === C || l.includes(C)) && (u(null), h(l.filter((I) => I !== C)));
648
+ }, [s, x, a, l, u, h]), ee = N((C) => {
649
+ const k = s.find((ae) => ae.id === C);
650
+ if (!k) {
651
+ ie.warn(`Element ${C} not found for duplication`);
612
652
  return;
613
653
  }
614
- const z = C.clone().toJSON();
615
- delete z.id;
616
- const K = C.constructor, P = new K(z);
617
- P.x = C.x + 20, P.y = C.y + 20;
618
- const Z = c.getArtboardIdForElement(k);
654
+ const O = k.clone().toJSON();
655
+ delete O.id;
656
+ const K = k.constructor, P = new K(O);
657
+ P.x = k.x + 20, P.y = k.y + 20;
658
+ const Z = c.getArtboardIdForElement(C);
619
659
  if (!Z) {
620
- ie.warn(`Element ${k} not associated with any artboard`);
660
+ ie.warn(`Element ${C} not associated with any artboard`);
621
661
  return;
622
662
  }
623
- g(P, Z, k), u(P.id);
624
- }, [s, c, g, u]), ge = N((k, C) => {
625
- if (k === C) return;
626
- if (k < 0 || k >= v.length) {
627
- ie.warn(`Invalid fromIndex: ${k}`);
663
+ g(P, Z, C), u(P.id);
664
+ }, [s, c, g, u]), ge = N((C, k) => {
665
+ if (C === k) return;
666
+ if (C < 0 || C >= v.length) {
667
+ ie.warn(`Invalid fromIndex: ${C}`);
628
668
  return;
629
669
  }
630
- if (C < 0 || C >= v.length) {
631
- ie.warn(`Invalid toIndex: ${C}`);
670
+ if (k < 0 || k >= v.length) {
671
+ ie.warn(`Invalid toIndex: ${k}`);
632
672
  return;
633
673
  }
634
- const I = v[k], z = v[C], K = k < C ? "after" : "before";
635
- w(I.id, z.id, K);
636
- }, [v, w]), we = N((k) => {
637
- const C = b.findIndex((I) => I.id === k);
638
- if (C < 0) {
639
- ie.warn(`Layer ${k} not found`);
674
+ const I = v[C], O = v[k], K = C < k ? "after" : "before";
675
+ w(I.id, O.id, K);
676
+ }, [v, w]), we = N((C) => {
677
+ const k = b.findIndex((I) => I.id === C);
678
+ if (k < 0) {
679
+ ie.warn(`Layer ${C} not found`);
640
680
  return;
641
681
  }
642
- C >= b.length - 1 || ge(C, C + 1);
643
- }, [b, ge]), oe = N((k) => {
644
- const C = b.findIndex((I) => I.id === k);
645
- if (C < 0) {
646
- ie.warn(`Layer ${k} not found`);
682
+ k >= b.length - 1 || ge(k, k + 1);
683
+ }, [b, ge]), oe = N((C) => {
684
+ const k = b.findIndex((I) => I.id === C);
685
+ if (k < 0) {
686
+ ie.warn(`Layer ${C} not found`);
647
687
  return;
648
688
  }
649
- C <= 0 || ge(C, C - 1);
650
- }, [b, ge]), ue = N((k) => {
651
- if (k.length < 2) {
689
+ k <= 0 || ge(k, k - 1);
690
+ }, [b, ge]), ue = N((C) => {
691
+ if (C.length < 2) {
652
692
  ie.warn("Need at least 2 elements to create a group");
653
693
  return;
654
694
  }
655
- const C = s.filter(
656
- (ne) => k.includes(ne.id) && ne.transformType !== "shape"
695
+ const k = s.filter(
696
+ (ne) => C.includes(ne.id) && ne.transformType !== "shape"
657
697
  );
658
- if (C.length < 2) {
698
+ if (k.length < 2) {
659
699
  ie.warn("Need at least 2 groupable elements (shapes cannot be grouped)");
660
700
  return;
661
701
  }
662
- const I = C.map((ne) => c.getArtboardIdForElement(ne.id)), z = [...new Set(I)];
663
- if (z.length !== 1 || !z[0]) {
702
+ const I = k.map((ne) => c.getArtboardIdForElement(ne.id)), O = [...new Set(I)];
703
+ if (O.length !== 1 || !O[0]) {
664
704
  ie.warn("All elements must be on the same artboard to group");
665
705
  return;
666
706
  }
667
- const K = z[0], P = C.map((ne) => ne.getBoundingBox()).filter(Boolean);
707
+ const K = O[0], P = k.map((ne) => ne.getBoundingBox()).filter(Boolean);
668
708
  if (P.length === 0) {
669
709
  ie.warn("Could not calculate bounding boxes for group");
670
710
  return;
@@ -673,138 +713,138 @@ function ni(e = {}) {
673
713
  x: Z,
674
714
  y: ae
675
715
  });
676
- me.children = C.map((ne) => {
677
- const $e = ne.clone();
678
- return $e.x = ne.x - Z, $e.y = ne.y - ae, $e;
679
- }), C.forEach((ne) => x(ne)), g(me, K), u(me.id), h([]);
680
- }, [s, c, x, g, u, h]), Oe = N((k) => {
681
- const C = s.find((P) => P.id === k);
682
- if (!C) {
683
- ie.warn(`Element ${k} not found for ungrouping`);
716
+ me.children = k.map((ne) => {
717
+ const He = ne.clone();
718
+ return He.x = ne.x - Z, He.y = ne.y - ae, He;
719
+ }), k.forEach((ne) => x(ne)), g(me, K), u(me.id), h([]);
720
+ }, [s, c, x, g, u, h]), ze = N((C) => {
721
+ const k = s.find((P) => P.id === C);
722
+ if (!k) {
723
+ ie.warn(`Element ${C} not found for ungrouping`);
684
724
  return;
685
725
  }
686
- if (!(C instanceof Ie)) {
687
- ie.warn(`Element ${k} is not a group`);
726
+ if (!(k instanceof Ie)) {
727
+ ie.warn(`Element ${C} is not a group`);
688
728
  return;
689
729
  }
690
- const I = C;
730
+ const I = k;
691
731
  if (!I.children || I.children.length === 0) {
692
- ie.warn(`Group ${k} has no children`);
732
+ ie.warn(`Group ${C} has no children`);
693
733
  return;
694
734
  }
695
- const z = c.getArtboardIdForElement(k);
696
- if (!z) {
697
- ie.warn(`Group ${k} not associated with any artboard`);
735
+ const O = c.getArtboardIdForElement(C);
736
+ if (!O) {
737
+ ie.warn(`Group ${C} not associated with any artboard`);
698
738
  return;
699
739
  }
700
740
  const K = I.children.map((P) => {
701
741
  const Z = P.clone();
702
742
  return Z.x = P.x + I.x, Z.y = P.y + I.y, Z;
703
743
  });
704
- x(I), K.forEach((P) => g(P, z)), K.length > 0 && u(K[0].id), h([]);
705
- }, [s, c, x, g, u, h]), Se = N(async (k = r) => {
706
- const C = async (I) => {
707
- for (const z of I) {
708
- const K = await er(z, k, y);
709
- p.current.set(z.id, K), z instanceof Ie && z.children.length > 0 && await C(z.children);
744
+ x(I), K.forEach((P) => g(P, O)), K.length > 0 && u(K[0].id), h([]);
745
+ }, [s, c, x, g, u, h]), Se = N(async (C = r) => {
746
+ const k = async (I) => {
747
+ for (const O of I) {
748
+ const K = await er(O, C, y);
749
+ p.current.set(O.id, K), O instanceof Ie && O.children.length > 0 && await k(O.children);
710
750
  }
711
751
  };
712
- await C(v), E((I) => I + 1);
752
+ await k(v), E((I) => I + 1);
713
753
  }, [r, y, v]);
714
754
  W(() => {
715
755
  if (!i) return;
716
- const k = setTimeout(() => {
756
+ const C = setTimeout(() => {
717
757
  Se();
718
758
  }, ti);
719
- return () => clearTimeout(k);
759
+ return () => clearTimeout(C);
720
760
  }, [i, Se]);
721
761
  const le = N(() => {
722
762
  p.current.clear();
723
- }, []), ze = N(
724
- (k, C, I) => {
725
- w(k, C, I);
763
+ }, []), Oe = N(
764
+ (C, k, I) => {
765
+ w(C, k, I);
726
766
  },
727
767
  [w]
728
768
  ), Q = N(
729
- (k, C, I, z) => {
730
- const K = s.find((Te) => Te.id === z);
769
+ (C, k, I, O) => {
770
+ const K = s.find((Te) => Te.id === O);
731
771
  if (!K || !(K instanceof Ie)) {
732
- ie.warn(`Group ${z} not found for reorder`);
772
+ ie.warn(`Group ${O} not found for reorder`);
733
773
  return;
734
774
  }
735
- const P = K.clone(), Z = P.children.findIndex((Te) => Te.id === k), ae = P.children.findIndex((Te) => Te.id === C);
775
+ const P = K.clone(), Z = P.children.findIndex((Te) => Te.id === C), ae = P.children.findIndex((Te) => Te.id === k);
736
776
  if (Z === -1 || ae === -1) {
737
- ie.warn(`Children not found in group for reorder: ${k}, ${C}`);
777
+ ie.warn(`Children not found in group for reorder: ${C}, ${k}`);
738
778
  return;
739
779
  }
740
- const [me] = P.children.splice(Z, 1), ne = P.children.findIndex((Te) => Te.id === C), $e = I === "before" ? ne : ne + 1;
741
- P.children.splice($e, 0, me), d(P);
780
+ const [me] = P.children.splice(Z, 1), ne = P.children.findIndex((Te) => Te.id === k), He = I === "before" ? ne : ne + 1;
781
+ P.children.splice(He, 0, me), d(P);
742
782
  },
743
783
  [s, d]
744
784
  ), se = N(
745
- (k) => {
746
- for (const C of s) {
747
- if (C.id === k) return C;
748
- if (C instanceof Ie) {
749
- const I = C.children.find((z) => z.id === k);
785
+ (C) => {
786
+ for (const k of s) {
787
+ if (k.id === C) return k;
788
+ if (k instanceof Ie) {
789
+ const I = k.children.find((O) => O.id === C);
750
790
  if (I) return I;
751
791
  }
752
792
  }
753
793
  return null;
754
794
  },
755
795
  [s]
756
- ), $ = N(
757
- (k) => {
758
- for (const C of s)
759
- if (C instanceof Ie && C.children.some((I) => I.id === k))
760
- return C;
796
+ ), H = N(
797
+ (C) => {
798
+ for (const k of s)
799
+ if (k instanceof Ie && k.children.some((I) => I.id === C))
800
+ return k;
761
801
  return null;
762
802
  },
763
803
  [s]
764
804
  ), xe = N(
765
- (k, C) => {
766
- const I = s.find((ae) => ae.id === k), z = s.find((ae) => ae.id === C);
767
- if (!I || !z || !(z instanceof Ie)) {
768
- ie.warn(`Cannot add ${k} to group ${C}`);
805
+ (C, k) => {
806
+ const I = s.find((ae) => ae.id === C), O = s.find((ae) => ae.id === k);
807
+ if (!I || !O || !(O instanceof Ie)) {
808
+ ie.warn(`Cannot add ${C} to group ${k}`);
769
809
  return;
770
810
  }
771
- if (!c.getArtboardIdForElement(k)) return;
772
- const P = z.clone(), Z = I.clone();
811
+ if (!c.getArtboardIdForElement(C)) return;
812
+ const P = O.clone(), Z = I.clone();
773
813
  Z.x = I.x, Z.y = I.y, P.addChild(Z), x(I), d(P);
774
814
  },
775
815
  [s, c, x, d]
776
- ), Ce = N(
777
- (k, C, I) => {
778
- const z = $(k);
779
- if (!z) {
780
- ie.warn(`Element ${k} is not inside a group`);
816
+ ), ke = N(
817
+ (C, k, I) => {
818
+ const O = H(C);
819
+ if (!O) {
820
+ ie.warn(`Element ${C} is not inside a group`);
781
821
  return;
782
822
  }
783
- const K = z.children.find((me) => me.id === k);
823
+ const K = O.children.find((me) => me.id === C);
784
824
  if (!K) return;
785
- const P = c.getArtboardIdForElement(z.id);
825
+ const P = c.getArtboardIdForElement(O.id);
786
826
  if (!P) return;
787
- const Z = K.clone(), ae = z.clone();
788
- ae.removeChild(k), d(ae), C && I ? g(Z, P, I === "after" ? C : void 0, I === "before" ? C : void 0) : g(Z, P, void 0, z.id), u(Z.id);
827
+ const Z = K.clone(), ae = O.clone();
828
+ ae.removeChild(C), d(ae), k && I ? g(Z, P, I === "after" ? k : void 0, I === "before" ? k : void 0) : g(Z, P, void 0, O.id), u(Z.id);
789
829
  },
790
- [$, c, x, d, g, u]
830
+ [H, c, x, d, g, u]
791
831
  ), Je = N(() => {
792
- const k = c.getActiveArtboardId();
793
- if (!k) {
832
+ const C = c.getActiveArtboardId();
833
+ if (!C) {
794
834
  ie.warn("No active artboard for creating a group");
795
835
  return;
796
836
  }
797
- const C = new Ie({
837
+ const k = new Ie({
798
838
  x: 0,
799
839
  y: 0,
800
840
  name: "New Group"
801
841
  });
802
- g(C, k), u(C.id);
842
+ g(k, C), u(k.id);
803
843
  }, [c, g, u]);
804
844
  return {
805
845
  layers: L,
806
846
  flatLayers: b,
807
- selectedLayers: D,
847
+ selectedLayers: M,
808
848
  selectLayer: R,
809
849
  selectMultipleLayers: F,
810
850
  clearSelection: X,
@@ -814,20 +854,20 @@ function ni(e = {}) {
814
854
  deleteLayer: Y,
815
855
  duplicateLayer: ee,
816
856
  reorderLayers: ge,
817
- reorderById: ze,
857
+ reorderById: Oe,
818
858
  reorderWithinGroup: Q,
819
859
  moveLayerForward: we,
820
860
  moveLayerBackward: oe,
821
861
  groupLayers: ue,
822
- ungroupLayer: Oe,
862
+ ungroupLayer: ze,
823
863
  addToGroup: xe,
824
- removeFromGroup: Ce,
864
+ removeFromGroup: ke,
825
865
  createEmptyGroup: Je,
826
866
  findElementById: se,
827
- findParentGroup: $,
867
+ findParentGroup: H,
828
868
  generateAllPreviews: Se,
829
869
  clearPreviewCache: le,
830
- artboardId: M,
870
+ artboardId: D,
831
871
  artboardManager: c,
832
872
  layerCount: b.length
833
873
  };
@@ -881,7 +921,7 @@ function ii(e, t, n) {
881
921
  }
882
922
  return s(t), n.forEach(s), tr(e, i);
883
923
  }
884
- function $r(e, t) {
924
+ function Hr(e, t) {
885
925
  const n = [];
886
926
  if (typeof e != "object" || typeof e.icons != "object") return n;
887
927
  e.not_found instanceof Array && e.not_found.forEach((o) => {
@@ -904,7 +944,7 @@ function ln(e, t) {
904
944
  for (const n in t) if (n in e && typeof e[n] != typeof t[n]) return !1;
905
945
  return !0;
906
946
  }
907
- function Br(e) {
947
+ function $r(e) {
908
948
  if (typeof e != "object" || e === null) return null;
909
949
  const t = e;
910
950
  if (typeof t.prefix != "string" || !e.icons || typeof e.icons != "object" || !ln(e, si)) return null;
@@ -933,8 +973,8 @@ function nt(e, t) {
933
973
  const n = nr[e] || (nr[e] = /* @__PURE__ */ Object.create(null));
934
974
  return n[t] || (n[t] = ai(e, t));
935
975
  }
936
- function Hr(e, t) {
937
- return Br(t) ? $r(t, (n, r) => {
976
+ function Br(e, t) {
977
+ return $r(t) ? Hr(t, (n, r) => {
938
978
  r ? e.icons[n] = r : e.missing.add(n);
939
979
  }) : [];
940
980
  }
@@ -946,7 +986,7 @@ function li(e, t, n) {
946
986
  }
947
987
  return !1;
948
988
  }
949
- const Ur = /^[a-z0-9]+(-[a-z0-9]+)*$/, Wt = (e, t, n, r = "") => {
989
+ const Vr = /^[a-z0-9]+(-[a-z0-9]+)*$/, Wt = (e, t, n, r = "") => {
950
990
  const o = e.split(":");
951
991
  if (e.slice(0, 1) === "@") {
952
992
  if (o.length < 2 || o.length > 3) return null;
@@ -959,7 +999,7 @@ const Ur = /^[a-z0-9]+(-[a-z0-9]+)*$/, Wt = (e, t, n, r = "") => {
959
999
  prefix: l,
960
1000
  name: a
961
1001
  };
962
- return t && !Ot(c) ? null : c;
1002
+ return t && !zt(c) ? null : c;
963
1003
  }
964
1004
  const i = o[0], s = i.split("-");
965
1005
  if (s.length > 1) {
@@ -968,7 +1008,7 @@ const Ur = /^[a-z0-9]+(-[a-z0-9]+)*$/, Wt = (e, t, n, r = "") => {
968
1008
  prefix: s.shift(),
969
1009
  name: s.join("-")
970
1010
  };
971
- return t && !Ot(a) ? null : a;
1011
+ return t && !zt(a) ? null : a;
972
1012
  }
973
1013
  if (n && r === "") {
974
1014
  const a = {
@@ -976,12 +1016,12 @@ const Ur = /^[a-z0-9]+(-[a-z0-9]+)*$/, Wt = (e, t, n, r = "") => {
976
1016
  prefix: "",
977
1017
  name: i
978
1018
  };
979
- return t && !Ot(a, n) ? null : a;
1019
+ return t && !zt(a, n) ? null : a;
980
1020
  }
981
1021
  return null;
982
- }, Ot = (e, t) => e ? !!((t && e.prefix === "" || e.prefix) && e.name) : !1;
1022
+ }, zt = (e, t) => e ? !!((t && e.prefix === "" || e.prefix) && e.name) : !1;
983
1023
  let yt = !1;
984
- function Vr(e) {
1024
+ function Ur(e) {
985
1025
  return typeof e == "boolean" && (yt = e), yt;
986
1026
  }
987
1027
  function rr(e) {
@@ -1001,17 +1041,17 @@ function Wr(e, t) {
1001
1041
  if (typeof e != "object") return !1;
1002
1042
  if (typeof t != "string" && (t = e.provider || ""), yt && !t && !e.prefix) {
1003
1043
  let o = !1;
1004
- return Br(e) && (e.prefix = "", $r(e, (i, s) => {
1044
+ return $r(e) && (e.prefix = "", Hr(e, (i, s) => {
1005
1045
  Gr(i, s) && (o = !0);
1006
1046
  })), o;
1007
1047
  }
1008
1048
  const n = e.prefix;
1009
- if (!Ot({
1049
+ if (!zt({
1010
1050
  prefix: n,
1011
1051
  name: "a"
1012
1052
  })) return !1;
1013
1053
  const r = nt(t, n);
1014
- return !!Hr(r, e);
1054
+ return !!Br(r, e);
1015
1055
  }
1016
1056
  const _r = Object.freeze({
1017
1057
  width: null,
@@ -1078,19 +1118,19 @@ function Yr(e, t) {
1078
1118
  const p = [], m = w.hFlip, E = w.vFlip;
1079
1119
  let A = w.rotate;
1080
1120
  m ? E ? A += 2 : (p.push("translate(" + (o.width + o.left).toString() + " " + (0 - o.top).toString() + ")"), p.push("scale(-1 1)"), o.top = o.left = 0) : E && (p.push("translate(" + (0 - o.left).toString() + " " + (o.height + o.top).toString() + ")"), p.push("scale(1 -1)"), o.top = o.left = 0);
1081
- let M;
1121
+ let D;
1082
1122
  switch (A < 0 && (A -= Math.floor(A / 4) * 4), A = A % 4, A) {
1083
1123
  case 1:
1084
- M = o.height / 2 + o.top, p.unshift("rotate(90 " + M.toString() + " " + M.toString() + ")");
1124
+ D = o.height / 2 + o.top, p.unshift("rotate(90 " + D.toString() + " " + D.toString() + ")");
1085
1125
  break;
1086
1126
  case 2:
1087
1127
  p.unshift("rotate(180 " + (o.width / 2 + o.left).toString() + " " + (o.height / 2 + o.top).toString() + ")");
1088
1128
  break;
1089
1129
  case 3:
1090
- M = o.width / 2 + o.left, p.unshift("rotate(-90 " + M.toString() + " " + M.toString() + ")");
1130
+ D = o.width / 2 + o.left, p.unshift("rotate(-90 " + D.toString() + " " + D.toString() + ")");
1091
1131
  break;
1092
1132
  }
1093
- A % 2 === 1 && (o.left !== o.top && (M = o.left, o.left = o.top, o.top = M), o.width !== o.height && (M = o.width, o.width = o.height, o.height = M)), p.length && (i = hi(i, '<g transform="' + p.join(" ") + '">', "</g>"));
1133
+ A % 2 === 1 && (o.left !== o.top && (D = o.left, o.left = o.top, o.top = D), o.width !== o.height && (D = o.width, o.width = o.height, o.height = D)), p.length && (i = hi(i, '<g transform="' + p.join(" ") + '">', "</g>"));
1094
1134
  });
1095
1135
  const s = r.width, a = r.height, l = o.width, c = o.height;
1096
1136
  let u, d;
@@ -1128,7 +1168,7 @@ const xn = /* @__PURE__ */ Object.create(null);
1128
1168
  function yi(e, t) {
1129
1169
  xn[e] = t;
1130
1170
  }
1131
- function kn(e) {
1171
+ function Cn(e) {
1132
1172
  return xn[e] || xn[""];
1133
1173
  }
1134
1174
  function Pn(e) {
@@ -1146,14 +1186,14 @@ function Pn(e) {
1146
1186
  dataAfterTimeout: e.dataAfterTimeout !== !1
1147
1187
  };
1148
1188
  }
1149
- const jn = /* @__PURE__ */ Object.create(null), ut = ["https://api.simplesvg.com", "https://api.unisvg.com"], zt = [];
1150
- for (; ut.length > 0; ) ut.length === 1 || Math.random() > 0.5 ? zt.push(ut.shift()) : zt.push(ut.pop());
1151
- jn[""] = Pn({ resources: ["https://api.iconify.design"].concat(zt) });
1189
+ const jn = /* @__PURE__ */ Object.create(null), ut = ["https://api.simplesvg.com", "https://api.unisvg.com"], Ot = [];
1190
+ for (; ut.length > 0; ) ut.length === 1 || Math.random() > 0.5 ? Ot.push(ut.shift()) : Ot.push(ut.pop());
1191
+ jn[""] = Pn({ resources: ["https://api.iconify.design"].concat(Ot) });
1152
1192
  function Xr(e, t) {
1153
1193
  const n = Pn(t);
1154
1194
  return n === null ? !1 : (jn[e] = n, !0);
1155
1195
  }
1156
- function $n(e) {
1196
+ function Hn(e) {
1157
1197
  return jn[e];
1158
1198
  }
1159
1199
  const bi = () => {
@@ -1165,7 +1205,7 @@ const bi = () => {
1165
1205
  };
1166
1206
  let or = bi();
1167
1207
  function wi(e, t) {
1168
- const n = $n(e);
1208
+ const n = Hn(e);
1169
1209
  if (!n) return 0;
1170
1210
  let r;
1171
1211
  if (!n.maxURL) r = 0;
@@ -1182,7 +1222,7 @@ function wi(e, t) {
1182
1222
  function xi(e) {
1183
1223
  return e === 404;
1184
1224
  }
1185
- const ki = (e, t, n) => {
1225
+ const Ci = (e, t, n) => {
1186
1226
  const r = [], o = wi(e, t), i = "icons";
1187
1227
  let s = {
1188
1228
  type: i,
@@ -1199,9 +1239,9 @@ const ki = (e, t, n) => {
1199
1239
  }, a = l.length), s.icons.push(l);
1200
1240
  }), r.push(s), r;
1201
1241
  };
1202
- function Ci(e) {
1242
+ function ki(e) {
1203
1243
  if (typeof e == "string") {
1204
- const t = $n(e);
1244
+ const t = Hn(e);
1205
1245
  if (t) return t.path;
1206
1246
  }
1207
1247
  return "/";
@@ -1211,7 +1251,7 @@ const Si = (e, t, n) => {
1211
1251
  n("abort", 424);
1212
1252
  return;
1213
1253
  }
1214
- let r = Ci(t.provider);
1254
+ let r = ki(t.provider);
1215
1255
  switch (t.type) {
1216
1256
  case "icons": {
1217
1257
  const i = t.prefix, a = t.icons.join(","), l = new URLSearchParams({ icons: a });
@@ -1251,7 +1291,7 @@ const Si = (e, t, n) => {
1251
1291
  n("next", o);
1252
1292
  });
1253
1293
  }, Ei = {
1254
- prepare: ki,
1294
+ prepare: Ci,
1255
1295
  send: Si
1256
1296
  };
1257
1297
  function Jr(e, t) {
@@ -1289,9 +1329,9 @@ function Ai(e) {
1289
1329
  });
1290
1330
  }));
1291
1331
  }
1292
- let Di = 0;
1293
- function Mi(e, t, n) {
1294
- const r = Di++, o = Jr.bind(null, n, r);
1332
+ let Mi = 0;
1333
+ function Di(e, t, n) {
1334
+ const r = Mi++, o = Jr.bind(null, n, r);
1295
1335
  if (!t.pending.length) return o;
1296
1336
  const i = {
1297
1337
  id: r,
@@ -1390,7 +1430,7 @@ function Ii(e, t, n, r) {
1390
1430
  y.status === "pending" && (y.status = "aborted");
1391
1431
  }), h = [];
1392
1432
  }
1393
- function M(y, S, v) {
1433
+ function D(y, S, v) {
1394
1434
  const L = S !== "success";
1395
1435
  switch (h = h.filter((b) => b !== y), l) {
1396
1436
  case "pending":
@@ -1435,7 +1475,7 @@ function Ii(e, t, n, r) {
1435
1475
  status: "pending",
1436
1476
  resource: y,
1437
1477
  callback: (v, L) => {
1438
- M(S, v, L);
1478
+ D(S, v, L);
1439
1479
  }
1440
1480
  };
1441
1481
  h.push(S), c++, d = setTimeout(T, e.rotate), n(y, t, S.callback);
@@ -1475,7 +1515,7 @@ function ir() {
1475
1515
  const cn = /* @__PURE__ */ Object.create(null);
1476
1516
  function Ni(e) {
1477
1517
  if (!cn[e]) {
1478
- const t = $n(e);
1518
+ const t = Hn(e);
1479
1519
  if (!t) return;
1480
1520
  const n = Qr(t), r = {
1481
1521
  config: t,
@@ -1485,10 +1525,10 @@ function Ni(e) {
1485
1525
  }
1486
1526
  return cn[e];
1487
1527
  }
1488
- function Oi(e, t, n) {
1528
+ function zi(e, t, n) {
1489
1529
  let r, o;
1490
1530
  if (typeof e == "string") {
1491
- const i = kn(e);
1531
+ const i = Cn(e);
1492
1532
  if (!i)
1493
1533
  return n(void 0, 424), ir;
1494
1534
  o = i.send;
@@ -1498,7 +1538,7 @@ function Oi(e, t, n) {
1498
1538
  const i = Pn(e);
1499
1539
  if (i) {
1500
1540
  r = Qr(i);
1501
- const s = e.resources ? e.resources[0] : "", a = kn(s);
1541
+ const s = e.resources ? e.resources[0] : "", a = Cn(s);
1502
1542
  a && (o = a.send);
1503
1543
  }
1504
1544
  }
@@ -1506,7 +1546,7 @@ function Oi(e, t, n) {
1506
1546
  }
1507
1547
  function sr() {
1508
1548
  }
1509
- function zi(e) {
1549
+ function Oi(e) {
1510
1550
  e.iconsLoaderFlag || (e.iconsLoaderFlag = !0, setTimeout(() => {
1511
1551
  e.iconsLoaderFlag = !1, Ai(e);
1512
1552
  }));
@@ -1514,7 +1554,7 @@ function zi(e) {
1514
1554
  function Fi(e) {
1515
1555
  const t = [], n = [];
1516
1556
  return e.forEach((r) => {
1517
- (r.match(Ur) ? t : n).push(r);
1557
+ (r.match(Vr) ? t : n).push(r);
1518
1558
  }), {
1519
1559
  valid: t,
1520
1560
  invalid: n
@@ -1528,14 +1568,14 @@ function ft(e, t, n) {
1528
1568
  });
1529
1569
  }
1530
1570
  if (n && typeof n == "object") try {
1531
- if (!Hr(e, n).length) {
1571
+ if (!Br(e, n).length) {
1532
1572
  r();
1533
1573
  return;
1534
1574
  }
1535
1575
  } catch (o) {
1536
1576
  console.error(o);
1537
1577
  }
1538
- r(), zi(e);
1578
+ r(), Oi(e);
1539
1579
  }
1540
1580
  function ar(e, t) {
1541
1581
  e instanceof Promise ? e.then((n) => {
@@ -1571,20 +1611,20 @@ function Pi(e, t) {
1571
1611
  }
1572
1612
  const { valid: s, invalid: a } = Fi(o);
1573
1613
  if (a.length && ft(e, a, null), !s.length) return;
1574
- const l = r.match(Ur) ? kn(n) : null;
1614
+ const l = r.match(Vr) ? Cn(n) : null;
1575
1615
  if (!l) {
1576
1616
  ft(e, s, null);
1577
1617
  return;
1578
1618
  }
1579
1619
  l.prepare(n, r, s).forEach((u) => {
1580
- Oi(n, u, (d) => {
1620
+ zi(n, u, (d) => {
1581
1621
  ft(e, u.icons, d);
1582
1622
  });
1583
1623
  });
1584
1624
  }));
1585
1625
  }
1586
1626
  const Zr = (e, t) => {
1587
- const n = Ri(e, !0, Vr()), r = Li(n);
1627
+ const n = Ri(e, !0, Ur()), r = Li(n);
1588
1628
  if (!r.pending.length) {
1589
1629
  let l = !0;
1590
1630
  return t && setTimeout(() => {
@@ -1607,7 +1647,7 @@ const Zr = (e, t) => {
1607
1647
  }), i.forEach((l) => {
1608
1648
  const c = o[l.provider][l.prefix];
1609
1649
  c.length && Pi(l, c);
1610
- }), t ? Mi(t, r, i) : sr;
1650
+ }), t ? Di(t, r, i) : sr;
1611
1651
  };
1612
1652
  function ji(e, t) {
1613
1653
  const n = { ...e };
@@ -1617,9 +1657,9 @@ function ji(e, t) {
1617
1657
  }
1618
1658
  return n;
1619
1659
  }
1620
- const $i = /[\s,]+/;
1621
- function Bi(e, t) {
1622
- t.split($i).forEach((n) => {
1660
+ const Hi = /[\s,]+/;
1661
+ function $i(e, t) {
1662
+ t.split(Hi).forEach((n) => {
1623
1663
  switch (n.trim()) {
1624
1664
  case "horizontal":
1625
1665
  e.hFlip = !0;
@@ -1630,7 +1670,7 @@ function Bi(e, t) {
1630
1670
  }
1631
1671
  });
1632
1672
  }
1633
- function Hi(e, t = 0) {
1673
+ function Bi(e, t = 0) {
1634
1674
  const n = e.replace(/^-?[0-9.]*/, "");
1635
1675
  function r(o) {
1636
1676
  for (; o < 0; ) o += 4;
@@ -1655,16 +1695,16 @@ function Hi(e, t = 0) {
1655
1695
  }
1656
1696
  return t;
1657
1697
  }
1658
- function Ui(e, t) {
1698
+ function Vi(e, t) {
1659
1699
  let n = e.indexOf("xlink:") === -1 ? "" : ' xmlns:xlink="http://www.w3.org/1999/xlink"';
1660
1700
  for (const r in t) n += " " + r + '="' + t[r] + '"';
1661
1701
  return '<svg xmlns="http://www.w3.org/2000/svg"' + n + ">" + e + "</svg>";
1662
1702
  }
1663
- function Vi(e) {
1703
+ function Ui(e) {
1664
1704
  return e.replace(/"/g, "'").replace(/%/g, "%25").replace(/#/g, "%23").replace(/</g, "%3C").replace(/>/g, "%3E").replace(/\s+/g, " ");
1665
1705
  }
1666
1706
  function Gi(e) {
1667
- return "data:image/svg+xml," + Vi(e);
1707
+ return "data:image/svg+xml," + Ui(e);
1668
1708
  }
1669
1709
  function Wi(e) {
1670
1710
  return 'url("' + Gi(e) + '")';
@@ -1690,7 +1730,7 @@ const eo = {
1690
1730
  role: "img"
1691
1731
  }, Ki = {
1692
1732
  display: "inline-block"
1693
- }, Cn = {
1733
+ }, kn = {
1694
1734
  backgroundColor: "currentColor"
1695
1735
  }, to = {
1696
1736
  backgroundColor: "transparent"
@@ -1699,8 +1739,8 @@ const eo = {
1699
1739
  Repeat: "no-repeat",
1700
1740
  Size: "100% 100%"
1701
1741
  }, cr = {
1702
- WebkitMask: Cn,
1703
- mask: Cn,
1742
+ WebkitMask: kn,
1743
+ mask: kn,
1704
1744
  background: to
1705
1745
  };
1706
1746
  for (const e in cr) {
@@ -1760,7 +1800,7 @@ const Ji = (e, t, n) => {
1760
1800
  break;
1761
1801
  // Flip as string: 'horizontal,vertical'
1762
1802
  case "flip":
1763
- typeof m == "string" && Bi(o, m);
1803
+ typeof m == "string" && $i(o, m);
1764
1804
  break;
1765
1805
  // Color: copy to style
1766
1806
  case "color":
@@ -1768,7 +1808,7 @@ const Ji = (e, t, n) => {
1768
1808
  break;
1769
1809
  // Rotation as string
1770
1810
  case "rotate":
1771
- typeof m == "string" ? o[p] = Hi(m) : typeof m == "number" && (o[p] = m);
1811
+ typeof m == "string" ? o[p] = Bi(m) : typeof m == "number" && (o[p] = m);
1772
1812
  break;
1773
1813
  // Remove aria-hidden
1774
1814
  case "ariaHidden":
@@ -1791,7 +1831,7 @@ const Ji = (e, t, n) => {
1791
1831
  __html: qi(Kr(c.body, m ? () => m + "ID" + p++ : "iconifyReact"))
1792
1832
  }, yn("svg", l);
1793
1833
  }
1794
- const { body: d, width: h, height: g } = e, x = i === "mask" || (i === "bg" ? !1 : d.indexOf("currentColor") !== -1), w = Ui(d, {
1834
+ const { body: d, width: h, height: g } = e, x = i === "mask" || (i === "bg" ? !1 : d.indexOf("currentColor") !== -1), w = Vi(d, {
1795
1835
  ...u,
1796
1836
  width: h + "",
1797
1837
  height: g + ""
@@ -1802,11 +1842,11 @@ const Ji = (e, t, n) => {
1802
1842
  width: dr(u.width),
1803
1843
  height: dr(u.height),
1804
1844
  ...Ki,
1805
- ...x ? Cn : to,
1845
+ ...x ? kn : to,
1806
1846
  ...a
1807
1847
  }, yn("span", l);
1808
1848
  };
1809
- Vr(!0);
1849
+ Ur(!0);
1810
1850
  yi("", Ei);
1811
1851
  if (typeof document < "u" && typeof window < "u") {
1812
1852
  const e = window;
@@ -1840,7 +1880,7 @@ if (typeof document < "u" && typeof window < "u") {
1840
1880
  }
1841
1881
  }
1842
1882
  function no(e) {
1843
- const [t, n] = H(!!e.ssr), [r, o] = H({});
1883
+ const [t, n] = B(!!e.ssr), [r, o] = B({});
1844
1884
  function i(g) {
1845
1885
  if (g) {
1846
1886
  const x = e.icon;
@@ -1860,7 +1900,7 @@ function no(e) {
1860
1900
  name: ""
1861
1901
  };
1862
1902
  }
1863
- const [s, a] = H(i(!!e.ssr));
1903
+ const [s, a] = B(i(!!e.ssr));
1864
1904
  function l() {
1865
1905
  const g = r.callback;
1866
1906
  g && (g(), o({}));
@@ -1900,7 +1940,7 @@ function no(e) {
1900
1940
  ...h
1901
1941
  }, e, d) : e.children ? e.children : e.fallback ? e.fallback : yn("span", {});
1902
1942
  }
1903
- const B = In((e, t) => no({
1943
+ const $ = In((e, t) => no({
1904
1944
  ...e,
1905
1945
  _ref: t
1906
1946
  }));
@@ -1911,7 +1951,7 @@ In((e, t) => no({
1911
1951
  }));
1912
1952
  const Qi = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1913
1953
  __proto__: null,
1914
- Icon: B,
1954
+ Icon: $,
1915
1955
  addAPIProvider: Xr,
1916
1956
  addCollection: Wr,
1917
1957
  addIcon: Gr,
@@ -1960,11 +2000,11 @@ const es = new Zi(), ts = Nr({ prefix: "sc" });
1960
2000
  function Le(...e) {
1961
2001
  return ts(Ir(e));
1962
2002
  }
1963
- const ro = O.createContext({ variant: "transparent" });
2003
+ const ro = z.createContext({ variant: "transparent" });
1964
2004
  function ns() {
1965
- return O.useContext(ro);
2005
+ return z.useContext(ro);
1966
2006
  }
1967
- const rs = Or("", {
2007
+ const rs = zr("", {
1968
2008
  variants: {
1969
2009
  variant: {
1970
2010
  transparent: "sc:bg-transparent",
@@ -1975,14 +2015,14 @@ const rs = Or("", {
1975
2015
  defaultVariants: {
1976
2016
  variant: "default"
1977
2017
  }
1978
- }), oo = O.forwardRef(
2018
+ }), oo = z.forwardRef(
1979
2019
  ({ className: e, variant: t = "default", asChild: n = !1, children: r, ...o }, i) => {
1980
2020
  const s = n ? Qo : "div";
1981
2021
  return /* @__PURE__ */ f(ro.Provider, { value: { variant: t ?? "default" }, children: /* @__PURE__ */ f(s, { ref: i, className: Le(rs({ variant: t }), e), ...o, children: r }) });
1982
2022
  }
1983
2023
  );
1984
2024
  oo.displayName = "Surface";
1985
- const os = Or(
2025
+ const os = zr(
1986
2026
  "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",
1987
2027
  {
1988
2028
  variants: {
@@ -2027,7 +2067,7 @@ const os = Or(
2027
2067
  size: "default"
2028
2068
  }
2029
2069
  }
2030
- ), rt = O.forwardRef(
2070
+ ), rt = z.forwardRef(
2031
2071
  ({ className: e, variant: t, size: n, onPress: r, isPending: o, onClick: i, disabled: s, selected: a, children: l, ...c }, u) => {
2032
2072
  const { variant: d } = ns(), h = d === "default", g = d === "secondary", x = (p) => {
2033
2073
  r && r(p), i && i(p);
@@ -2059,9 +2099,9 @@ const os = Or(
2059
2099
  }
2060
2100
  );
2061
2101
  rt.displayName = "Button";
2062
- const io = O.createContext(null);
2063
- function Bn() {
2064
- const e = O.useContext(io);
2102
+ const io = z.createContext(null);
2103
+ function $n() {
2104
+ const e = z.useContext(io);
2065
2105
  if (!e)
2066
2106
  throw new Error("Drawer components must be used within a Drawer");
2067
2107
  return e;
@@ -2072,13 +2112,13 @@ function so({
2072
2112
  onOpenChange: n,
2073
2113
  children: r
2074
2114
  }) {
2075
- const [o, i] = O.useState(t), s = e !== void 0, a = s ? e : o, l = O.useCallback(
2115
+ const [o, i] = z.useState(t), s = e !== void 0, a = s ? e : o, l = z.useCallback(
2076
2116
  (d) => {
2077
2117
  s || i(d), n == null || n(d);
2078
2118
  },
2079
2119
  [s, n]
2080
- ), c = 10, u = O.useRef(!1);
2081
- return O.useLayoutEffect(() => {
2120
+ ), c = 10, u = z.useRef(!1);
2121
+ return z.useLayoutEffect(() => {
2082
2122
  if (a) {
2083
2123
  u.current = !0, document.documentElement.setAttribute("data-drawer-open", "true");
2084
2124
  const d = setTimeout(() => {
@@ -2089,12 +2129,12 @@ function so({
2089
2129
  }, [a]), /* @__PURE__ */ f(io.Provider, { value: { open: a, onOpenChange: l }, children: r });
2090
2130
  }
2091
2131
  so.displayName = "Drawer";
2092
- const is = O.forwardRef(
2132
+ const is = z.forwardRef(
2093
2133
  ({ asChild: e, onClick: t, children: n, ...r }, o) => {
2094
- const { onOpenChange: i } = Bn(), s = (a) => {
2134
+ const { onOpenChange: i } = $n(), s = (a) => {
2095
2135
  t == null || t(a), i(!0);
2096
2136
  };
2097
- return e && O.isValidElement(n) ? O.cloneElement(
2137
+ return e && z.isValidElement(n) ? z.cloneElement(
2098
2138
  n,
2099
2139
  {
2100
2140
  onClick: s
@@ -2103,12 +2143,12 @@ const is = O.forwardRef(
2103
2143
  }
2104
2144
  );
2105
2145
  is.displayName = "DrawerTrigger";
2106
- const ss = O.forwardRef(
2146
+ const ss = z.forwardRef(
2107
2147
  ({ asChild: e, onClick: t, children: n, ...r }, o) => {
2108
- const { onOpenChange: i } = Bn(), s = (a) => {
2148
+ const { onOpenChange: i } = $n(), s = (a) => {
2109
2149
  t == null || t(a), i(!1);
2110
2150
  };
2111
- return e && O.isValidElement(n) ? O.cloneElement(
2151
+ return e && z.isValidElement(n) ? z.cloneElement(
2112
2152
  n,
2113
2153
  {
2114
2154
  onClick: s
@@ -2117,7 +2157,7 @@ const ss = O.forwardRef(
2117
2157
  }
2118
2158
  );
2119
2159
  ss.displayName = "DrawerClose";
2120
- const ao = O.forwardRef(
2160
+ const ao = z.forwardRef(
2121
2161
  ({
2122
2162
  className: e,
2123
2163
  children: t,
@@ -2139,38 +2179,38 @@ const ao = O.forwardRef(
2139
2179
  safeAreaPadding: m = !1,
2140
2180
  ...E
2141
2181
  }, A) => {
2142
- const { open: M, onOpenChange: T } = Bn(), [y, S] = O.useState(!1), [v, L] = O.useState(0), [b, D] = O.useState(!1), [R, F] = O.useState(!1), [X, pe] = O.useState(!1), [J, re] = O.useState(!1), Y = O.useRef(null), ee = O.useRef(null), ge = O.useRef(0), we = O.useRef(0), [oe, ue] = O.useState(!1), [Oe, Se] = O.useState(!1), le = O.useRef(!1), ze = O.useRef(!0), Q = O.useRef(null), se = 120;
2143
- O.useEffect(() => {
2144
- if (M) {
2182
+ const { open: D, onOpenChange: T } = $n(), [y, S] = z.useState(!1), [v, L] = z.useState(0), [b, M] = z.useState(!1), [R, F] = z.useState(!1), [X, pe] = z.useState(!1), [J, re] = z.useState(!1), Y = z.useRef(null), ee = z.useRef(null), ge = z.useRef(0), we = z.useRef(0), [oe, ue] = z.useState(!1), [ze, Se] = z.useState(!1), le = z.useRef(!1), Oe = z.useRef(!0), Q = z.useRef(null), se = 120;
2183
+ z.useEffect(() => {
2184
+ if (D) {
2145
2185
  const _ = setTimeout(() => re(!0), se);
2146
2186
  return () => clearTimeout(_);
2147
2187
  } else
2148
2188
  re(!1);
2149
- }, [M]);
2150
- const $ = O.useCallback(
2189
+ }, [D]);
2190
+ const H = z.useCallback(
2151
2191
  (_) => {
2152
2192
  const fe = _.target, ye = fe.scrollHeight - fe.scrollTop - fe.clientHeight < 20;
2153
2193
  pe(ye);
2154
2194
  },
2155
2195
  []
2156
2196
  );
2157
- O.useImperativeHandle(A, () => Y.current), O.useEffect(() => {
2197
+ z.useImperativeHandle(A, () => Y.current), z.useEffect(() => {
2158
2198
  S(!0), L(document.body.clientHeight);
2159
2199
  const _ = () => L(document.body.clientHeight);
2160
2200
  return window.addEventListener("resize", _), () => {
2161
2201
  window.removeEventListener("resize", _);
2162
2202
  };
2163
- }, []), O.useEffect(() => (M && u ? document.body.style.overflow = "hidden" : u && (document.body.style.overflow = ""), () => {
2203
+ }, []), z.useEffect(() => (D && u ? document.body.style.overflow = "hidden" : u && (document.body.style.overflow = ""), () => {
2164
2204
  u && (document.body.style.overflow = "");
2165
- }), [M, u]), O.useLayoutEffect(() => {
2166
- if (!M) {
2167
- le.current = !1, ze.current = !0, ue(!1);
2205
+ }), [D, u]), z.useLayoutEffect(() => {
2206
+ if (!D) {
2207
+ le.current = !1, Oe.current = !0, ue(!1);
2168
2208
  return;
2169
2209
  }
2170
2210
  const _ = setTimeout(() => {
2171
- le.current = !0, ze.current = !1;
2211
+ le.current = !0, Oe.current = !1;
2172
2212
  }, 200), fe = () => {
2173
- !le.current || ze.current || (Q.current && clearTimeout(Q.current), Se(!0), ue(!0), Q.current = setTimeout(() => {
2213
+ !le.current || Oe.current || (Q.current && clearTimeout(Q.current), Se(!0), ue(!0), Q.current = setTimeout(() => {
2174
2214
  Se(!1), Q.current = null;
2175
2215
  }, 60));
2176
2216
  }, ye = () => {
@@ -2179,77 +2219,77 @@ const ao = O.forwardRef(
2179
2219
  return window.addEventListener("drawer-open", fe), window.addEventListener("drawer-close", ye), () => {
2180
2220
  clearTimeout(_), Q.current && (clearTimeout(Q.current), Q.current = null), window.removeEventListener("drawer-open", fe), window.removeEventListener("drawer-close", ye);
2181
2221
  };
2182
- }, [M]);
2183
- const xe = oe ? 10 : 0, Ce = 50, Je = 10, ce = O.useRef(null), k = O.useCallback(
2222
+ }, [D]);
2223
+ const xe = oe ? 10 : 0, ke = 50, Je = 10, ce = z.useRef(null), C = z.useCallback(
2184
2224
  (_, fe) => {
2185
- const ye = window.scrollY, Mt = _ - ye, en = performance.now(), Lt = (at) => {
2225
+ const ye = window.scrollY, Dt = _ - ye, en = performance.now(), Lt = (at) => {
2186
2226
  const Rt = at - en, Tt = Math.min(Rt / fe, 1), It = 1 - Math.pow(1 - Tt, 3);
2187
- window.scrollTo(0, ye + Mt * It), Tt < 1 && requestAnimationFrame(Lt);
2227
+ window.scrollTo(0, ye + Dt * It), Tt < 1 && requestAnimationFrame(Lt);
2188
2228
  };
2189
2229
  requestAnimationFrame(Lt);
2190
2230
  },
2191
2231
  []
2192
- ), C = 10;
2193
- O.useEffect(() => {
2194
- if (M && !b) {
2195
- if (ce.current = document.documentElement.scrollTop, ce.current > Ce)
2232
+ ), k = 10;
2233
+ z.useEffect(() => {
2234
+ if (D && !b) {
2235
+ if (ce.current = document.documentElement.scrollTop, ce.current > ke)
2196
2236
  return;
2197
2237
  const _ = setTimeout(() => {
2198
- k(
2199
- ce.current + Ce,
2238
+ C(
2239
+ ce.current + ke,
2200
2240
  Je
2201
2241
  );
2202
- }, C);
2242
+ }, k);
2203
2243
  return () => clearTimeout(_);
2204
2244
  }
2205
- }, [M, b, k]), O.useEffect(() => {
2206
- if (!M && !b && ce.current !== null) {
2245
+ }, [D, b, C]), z.useEffect(() => {
2246
+ if (!D && !b && ce.current !== null) {
2207
2247
  const _ = ce.current;
2208
2248
  ce.current = null, document.body.style.overflow = "", window.scrollTo(0, _);
2209
2249
  }
2210
- }, [M, b]);
2211
- const I = 300, z = 200, K = 250, P = 150, Z = K + P, ae = 50, me = O.useCallback(() => {
2250
+ }, [D, b]);
2251
+ const I = 300, O = 200, K = 250, P = 150, Z = K + P, ae = 50, me = z.useCallback(() => {
2212
2252
  setTimeout(() => {
2213
- D(!0), setTimeout(() => {
2253
+ M(!0), setTimeout(() => {
2214
2254
  document.body.style.overflow = "";
2215
2255
  const fe = ce.current;
2216
2256
  fe !== null && (ce.current = null, window.scrollTo(0, fe));
2217
2257
  }, 150), setTimeout(() => {
2218
2258
  document.documentElement.removeAttribute("data-drawer-open"), window.dispatchEvent(new CustomEvent("drawer-close"));
2219
- }, z), setTimeout(() => {
2259
+ }, O), setTimeout(() => {
2220
2260
  F(!0);
2221
2261
  }, K), setTimeout(() => {
2222
- D(!1), F(!1), T(!1);
2262
+ M(!1), F(!1), T(!1);
2223
2263
  }, Z);
2224
2264
  }, ae);
2225
2265
  }, [T]);
2226
- O.useEffect(() => {
2266
+ z.useEffect(() => {
2227
2267
  const _ = (fe) => {
2228
- fe.key === "Escape" && M && !b && me();
2268
+ fe.key === "Escape" && D && !b && me();
2229
2269
  };
2230
2270
  return document.addEventListener("keydown", _), () => document.removeEventListener("keydown", _);
2231
- }, [M, b, me]);
2232
- const ne = O.useCallback(
2271
+ }, [D, b, me]);
2272
+ const ne = z.useCallback(
2233
2273
  (_) => {
2234
2274
  h || (ge.current = _.touches[0].clientY, we.current = 0, Y.current && (Y.current.style.transition = "none"));
2235
2275
  },
2236
2276
  [h]
2237
- ), $e = O.useCallback(
2277
+ ), He = z.useCallback(
2238
2278
  (_) => {
2239
2279
  if (h) return;
2240
2280
  const fe = _.touches[0].clientY - ge.current;
2241
2281
  we.current = Math.max(0, fe), Y.current && (Y.current.style.transform = `translateY(${we.current}px)`);
2242
2282
  },
2243
2283
  [h]
2244
- ), Te = O.useCallback(() => {
2284
+ ), Te = z.useCallback(() => {
2245
2285
  if (h) return;
2246
2286
  Y.current && (Y.current.style.transition = `transform ${g}ms cubic-bezier(0.32, 0.72, 0, 1)`, Y.current.style.transform = ""), we.current > 100 && me();
2247
2287
  }, [h, me, g]);
2248
- if (!y || !M && !b) return null;
2249
- const Ve = J || b, Ge = {
2288
+ if (!y || !D && !b) return null;
2289
+ const Ue = J || b, Ge = {
2250
2290
  "--animation-duration": `${g}ms`
2251
2291
  };
2252
- return zn(
2292
+ return On(
2253
2293
  // The .sc-root wrapper is load-bearing: a body portal escapes the
2254
2294
  // editor's .sc-root scope, so without it every scoped theme token
2255
2295
  // (--sc-spacing-*, --sc-color-*, --sc-z-*) inside the drawer resolves
@@ -2282,7 +2322,7 @@ const ao = O.forwardRef(
2282
2322
  "aria-hidden": "true"
2283
2323
  }
2284
2324
  ),
2285
- Oe && /* @__PURE__ */ f(
2325
+ ze && /* @__PURE__ */ f(
2286
2326
  "div",
2287
2327
  {
2288
2328
  className: "sc:fixed sc:w-full sc:bg-surface",
@@ -2294,7 +2334,7 @@ const ao = O.forwardRef(
2294
2334
  }
2295
2335
  }
2296
2336
  ),
2297
- Ve && /* @__PURE__ */ f(
2337
+ Ue && /* @__PURE__ */ f(
2298
2338
  "div",
2299
2339
  {
2300
2340
  className: Le(
@@ -2351,7 +2391,7 @@ const ao = O.forwardRef(
2351
2391
  "div",
2352
2392
  {
2353
2393
  onTouchStart: ne,
2354
- onTouchMove: $e,
2394
+ onTouchMove: He,
2355
2395
  onTouchEnd: Te,
2356
2396
  className: Le(
2357
2397
  "sc:cursor-grab sc:active:cursor-grabbing sc:flex-shrink-0",
@@ -2377,7 +2417,7 @@ const ao = O.forwardRef(
2377
2417
  WebkitOverflowScrolling: "touch",
2378
2418
  overscrollBehavior: "contain"
2379
2419
  },
2380
- onScroll: $,
2420
+ onScroll: H,
2381
2421
  children: t
2382
2422
  }
2383
2423
  ),
@@ -2415,7 +2455,7 @@ const ao = O.forwardRef(
2415
2455
  }
2416
2456
  );
2417
2457
  ao.displayName = "DrawerContent";
2418
- const lo = O.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ f(
2458
+ const lo = z.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ f(
2419
2459
  "h2",
2420
2460
  {
2421
2461
  ref: n,
@@ -2427,7 +2467,7 @@ const lo = O.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ f(
2427
2467
  }
2428
2468
  ));
2429
2469
  lo.displayName = "DrawerTitle";
2430
- const co = O.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ f(
2470
+ const co = z.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ f(
2431
2471
  "p",
2432
2472
  {
2433
2473
  ref: n,
@@ -2436,7 +2476,7 @@ const co = O.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ f(
2436
2476
  }
2437
2477
  ));
2438
2478
  co.displayName = "DrawerDescription";
2439
- const as = tt.Provider, ls = tt.Root, _t = tt.Trigger, Ct = O.forwardRef(({ className: e, sideOffset: t = 4, ...n }, r) => /* @__PURE__ */ f(tt.Portal, { children: /* @__PURE__ */ f(
2479
+ const as = tt.Provider, ls = tt.Root, _t = tt.Trigger, kt = z.forwardRef(({ className: e, sideOffset: t = 4, ...n }, r) => /* @__PURE__ */ f(tt.Portal, { children: /* @__PURE__ */ f(
2440
2480
  tt.Content,
2441
2481
  {
2442
2482
  ref: r,
@@ -2450,10 +2490,10 @@ const as = tt.Provider, ls = tt.Root, _t = tt.Trigger, Ct = O.forwardRef(({ clas
2450
2490
  ...n
2451
2491
  }
2452
2492
  ) }));
2453
- Ct.displayName = tt.Content.displayName;
2454
- const cs = ({ children: e, delayDuration: t, delay: n, ...r }) => /* @__PURE__ */ f(as, { children: /* @__PURE__ */ f(ls, { delayDuration: n ?? t ?? 200, ...r, children: e }) }), Hn = Object.assign(cs, {
2493
+ kt.displayName = tt.Content.displayName;
2494
+ const cs = ({ children: e, delayDuration: t, delay: n, ...r }) => /* @__PURE__ */ f(as, { children: /* @__PURE__ */ f(ls, { delayDuration: n ?? t ?? 200, ...r, children: e }) }), Bn = Object.assign(cs, {
2455
2495
  Trigger: _t,
2456
- Content: Ct
2496
+ Content: kt
2457
2497
  }), ds = Nr({ prefix: "sc" });
2458
2498
  function Sn(...e) {
2459
2499
  return ds(Ir(e));
@@ -2524,7 +2564,7 @@ const uo = ({
2524
2564
  height: `${l}px`
2525
2565
  },
2526
2566
  children: /* @__PURE__ */ f(
2527
- B,
2567
+ $,
2528
2568
  {
2529
2569
  icon: e,
2530
2570
  width: "100%",
@@ -2545,7 +2585,7 @@ const uo = ({
2545
2585
  className: Sn("sc:inline-flex", n),
2546
2586
  style: { width: `${s}px`, height: `${s}px` },
2547
2587
  children: /* @__PURE__ */ f(
2548
- B,
2588
+ $,
2549
2589
  {
2550
2590
  icon: e,
2551
2591
  width: "100%",
@@ -2568,12 +2608,13 @@ const En = te.forwardRef(
2568
2608
  "aria-label": s,
2569
2609
  disabled: a = !1,
2570
2610
  className: l,
2571
- onMouseLeave: c
2572
- }, u) => {
2573
- const d = /* @__PURE__ */ f(
2611
+ onMouseLeave: c,
2612
+ "data-testid": u
2613
+ }, d) => {
2614
+ const h = /* @__PURE__ */ f(
2574
2615
  rt,
2575
2616
  {
2576
- ref: u,
2617
+ ref: d,
2577
2618
  variant: "ghost",
2578
2619
  size: "toolbar",
2579
2620
  onClick: t,
@@ -2581,19 +2622,20 @@ const En = te.forwardRef(
2581
2622
  "aria-label": s || r,
2582
2623
  "aria-pressed": n,
2583
2624
  "data-active": n,
2625
+ "data-testid": u,
2584
2626
  onMouseLeave: c,
2585
2627
  className: Sn(l),
2586
2628
  children: typeof e == "string" ? /* @__PURE__ */ f(uo, { icon: e, size: "toolbar" }) : e
2587
2629
  }
2588
2630
  );
2589
- return !r || i ? d : /* @__PURE__ */ j(Hn, { delay: o, children: [
2590
- /* @__PURE__ */ f(_t, { asChild: !0, children: d }),
2591
- /* @__PURE__ */ f(Ct, { children: r })
2631
+ return !r || i ? h : /* @__PURE__ */ j(Bn, { delay: o, children: [
2632
+ /* @__PURE__ */ f(_t, { asChild: !0, children: h }),
2633
+ /* @__PURE__ */ f(kt, { children: r })
2592
2634
  ] });
2593
2635
  }
2594
2636
  );
2595
2637
  En.displayName = "ToolbarButton";
2596
- const V = {
2638
+ const U = {
2597
2639
  // Navigation/Actions
2598
2640
  plus: "lucide:plus",
2599
2641
  minus: "lucide:minus",
@@ -2658,7 +2700,7 @@ const V = {
2658
2700
  refreshArtboards: n,
2659
2701
  setSelectedId: r,
2660
2702
  setMultiSelection: o
2661
- } = On(), i = t.getActiveArtboardId(), s = t.getActiveArtboard(), a = q(() => e.map((p) => {
2703
+ } = zn(), i = t.getActiveArtboardId(), s = t.getActiveArtboard(), a = q(() => e.map((p) => {
2662
2704
  const E = t.getElementsOnArtboard(p.id).length;
2663
2705
  return {
2664
2706
  id: p.id,
@@ -2749,32 +2791,32 @@ function it(e) {
2749
2791
  return t === "[object Window]" || // In Electron context the Window object serializes to [object global]
2750
2792
  t === "[object global]";
2751
2793
  }
2752
- function Un(e) {
2794
+ function Vn(e) {
2753
2795
  return "nodeType" in e;
2754
2796
  }
2755
- function ke(e) {
2797
+ function Ce(e) {
2756
2798
  var t, n;
2757
- return e ? it(e) ? e : Un(e) && (t = (n = e.ownerDocument) == null ? void 0 : n.defaultView) != null ? t : window : window;
2799
+ return e ? it(e) ? e : Vn(e) && (t = (n = e.ownerDocument) == null ? void 0 : n.defaultView) != null ? t : window : window;
2758
2800
  }
2759
- function Vn(e) {
2801
+ function Un(e) {
2760
2802
  const {
2761
2803
  Document: t
2762
- } = ke(e);
2804
+ } = Ce(e);
2763
2805
  return e instanceof t;
2764
2806
  }
2765
2807
  function St(e) {
2766
- return it(e) ? !1 : e instanceof ke(e).HTMLElement;
2808
+ return it(e) ? !1 : e instanceof Ce(e).HTMLElement;
2767
2809
  }
2768
2810
  function fo(e) {
2769
- return e instanceof ke(e).SVGElement;
2811
+ return e instanceof Ce(e).SVGElement;
2770
2812
  }
2771
2813
  function st(e) {
2772
- return e ? it(e) ? e.document : Un(e) ? Vn(e) ? e : St(e) || fo(e) ? e.ownerDocument : document : document : document;
2814
+ return e ? it(e) ? e.document : Vn(e) ? Un(e) ? e : St(e) || fo(e) ? e.ownerDocument : document : document : document;
2773
2815
  }
2774
- const Ue = qt ? Nn : W;
2816
+ const Ve = qt ? Nn : W;
2775
2817
  function Yt(e) {
2776
2818
  const t = G(e);
2777
- return Ue(() => {
2819
+ return Ve(() => {
2778
2820
  t.current = e;
2779
2821
  }), N(function() {
2780
2822
  for (var n = arguments.length, r = new Array(n), o = 0; o < n; o++)
@@ -2793,7 +2835,7 @@ function bs() {
2793
2835
  function bt(e, t) {
2794
2836
  t === void 0 && (t = [e]);
2795
2837
  const n = G(e);
2796
- return Ue(() => {
2838
+ return Ve(() => {
2797
2839
  n.current !== e && (n.current = e);
2798
2840
  }, t), n;
2799
2841
  }
@@ -2808,7 +2850,7 @@ function Et(e, t) {
2808
2850
  [...t]
2809
2851
  );
2810
2852
  }
2811
- function $t(e) {
2853
+ function Ht(e) {
2812
2854
  const t = Yt(e), n = G(null), r = N(
2813
2855
  (o) => {
2814
2856
  o !== n.current && (t == null || t(o, n.current)), n.current = o;
@@ -2818,7 +2860,7 @@ function $t(e) {
2818
2860
  );
2819
2861
  return [n, r];
2820
2862
  }
2821
- function Bt(e) {
2863
+ function $t(e) {
2822
2864
  const t = G();
2823
2865
  return W(() => {
2824
2866
  t.current = e;
@@ -2858,7 +2900,7 @@ function Gn(e) {
2858
2900
  return !1;
2859
2901
  const {
2860
2902
  KeyboardEvent: t
2861
- } = ke(e.target);
2903
+ } = Ce(e.target);
2862
2904
  return t && e instanceof t;
2863
2905
  }
2864
2906
  function xs(e) {
@@ -2866,10 +2908,10 @@ function xs(e) {
2866
2908
  return !1;
2867
2909
  const {
2868
2910
  TouchEvent: t
2869
- } = ke(e.target);
2911
+ } = Ce(e.target);
2870
2912
  return t && e instanceof t;
2871
2913
  }
2872
- function Ht(e) {
2914
+ function Bt(e) {
2873
2915
  if (xs(e)) {
2874
2916
  if (e.touches && e.touches.length) {
2875
2917
  const {
@@ -2936,10 +2978,10 @@ const xt = /* @__PURE__ */ Object.freeze({
2936
2978
  }
2937
2979
  }
2938
2980
  }), ur = "a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";
2939
- function ks(e) {
2981
+ function Cs(e) {
2940
2982
  return e.matches(ur) ? e : e.querySelector(ur);
2941
2983
  }
2942
- const Cs = {
2984
+ const ks = {
2943
2985
  display: "none"
2944
2986
  };
2945
2987
  function Ss(e) {
@@ -2949,7 +2991,7 @@ function Ss(e) {
2949
2991
  } = e;
2950
2992
  return te.createElement("div", {
2951
2993
  id: t,
2952
- style: Cs
2994
+ style: ks
2953
2995
  }, n);
2954
2996
  }
2955
2997
  function Es(e) {
@@ -2981,7 +3023,7 @@ function Es(e) {
2981
3023
  }, n);
2982
3024
  }
2983
3025
  function As() {
2984
- const [e, t] = H("");
3026
+ const [e, t] = B("");
2985
3027
  return {
2986
3028
  announce: N((r) => {
2987
3029
  r != null && t(r);
@@ -2990,7 +3032,7 @@ function As() {
2990
3032
  };
2991
3033
  }
2992
3034
  const po = /* @__PURE__ */ Xe(null);
2993
- function Ds(e) {
3035
+ function Ms(e) {
2994
3036
  const t = je(po);
2995
3037
  W(() => {
2996
3038
  if (!t)
@@ -2998,8 +3040,8 @@ function Ds(e) {
2998
3040
  return t(e);
2999
3041
  }, [e, t]);
3000
3042
  }
3001
- function Ms() {
3002
- const [e] = H(() => /* @__PURE__ */ new Set()), t = N((r) => (e.add(r), () => e.delete(r)), [e]);
3043
+ function Ds() {
3044
+ const [e] = B(() => /* @__PURE__ */ new Set()), t = N((r) => (e.add(r), () => e.delete(r)), [e]);
3003
3045
  return [N((r) => {
3004
3046
  let {
3005
3047
  type: o,
@@ -3055,10 +3097,10 @@ function Ts(e) {
3055
3097
  const {
3056
3098
  announce: i,
3057
3099
  announcement: s
3058
- } = As(), a = Kt("DndLiveRegion"), [l, c] = H(!1);
3100
+ } = As(), a = Kt("DndLiveRegion"), [l, c] = B(!1);
3059
3101
  if (W(() => {
3060
3102
  c(!0);
3061
- }, []), Ds(q(() => ({
3103
+ }, []), Ms(q(() => ({
3062
3104
  onDragStart(d) {
3063
3105
  let {
3064
3106
  active: h
@@ -3116,13 +3158,13 @@ function Ts(e) {
3116
3158
  id: a,
3117
3159
  announcement: s
3118
3160
  }));
3119
- return n ? zn(u, n) : u;
3161
+ return n ? On(u, n) : u;
3120
3162
  }
3121
3163
  var de;
3122
3164
  (function(e) {
3123
3165
  e.DragStart = "dragStart", e.DragMove = "dragMove", e.DragEnd = "dragEnd", e.DragCancel = "dragCancel", e.DragOver = "dragOver", e.RegisterDroppable = "registerDroppable", e.SetDroppableDisabled = "setDroppableDisabled", e.UnregisterDroppable = "unregisterDroppable";
3124
3166
  })(de || (de = {}));
3125
- function Ut() {
3167
+ function Vt() {
3126
3168
  }
3127
3169
  function fr(e, t) {
3128
3170
  return q(
@@ -3151,7 +3193,7 @@ function Wn(e, t) {
3151
3193
  return Math.sqrt(Math.pow(e.x - t.x, 2) + Math.pow(e.y - t.y, 2));
3152
3194
  }
3153
3195
  function Ns(e, t) {
3154
- const n = Ht(e);
3196
+ const n = Bt(e);
3155
3197
  if (!n)
3156
3198
  return "0 0";
3157
3199
  const r = {
@@ -3172,7 +3214,7 @@ function _n(e, t) {
3172
3214
  } = t;
3173
3215
  return n - r;
3174
3216
  }
3175
- function Os(e, t) {
3217
+ function zs(e, t) {
3176
3218
  let {
3177
3219
  data: {
3178
3220
  value: n
@@ -3217,7 +3259,7 @@ function hr(e, t, n) {
3217
3259
  y: n + e.height * 0.5
3218
3260
  };
3219
3261
  }
3220
- const zs = (e) => {
3262
+ const Os = (e) => {
3221
3263
  let {
3222
3264
  collisionRect: t,
3223
3265
  droppableRects: n,
@@ -3294,9 +3336,9 @@ const js = (e) => {
3294
3336
  });
3295
3337
  }
3296
3338
  }
3297
- return o.sort(Os);
3339
+ return o.sort(zs);
3298
3340
  };
3299
- function $s(e, t) {
3341
+ function Hs(e, t) {
3300
3342
  const {
3301
3343
  top: n,
3302
3344
  left: r,
@@ -3305,7 +3347,7 @@ function $s(e, t) {
3305
3347
  } = t;
3306
3348
  return n <= e.y && e.y <= o && r <= e.x && e.x <= i;
3307
3349
  }
3308
- const Bs = (e) => {
3350
+ const $s = (e) => {
3309
3351
  let {
3310
3352
  droppableContainers: t,
3311
3353
  droppableRects: n,
@@ -3318,7 +3360,7 @@ const Bs = (e) => {
3318
3360
  const {
3319
3361
  id: s
3320
3362
  } = i, a = n.get(s);
3321
- if (a && $s(r, a)) {
3363
+ if (a && Hs(r, a)) {
3322
3364
  const c = An(a).reduce((d, h) => d + Wn(r, h), 0), u = Number((c / 4).toFixed(4));
3323
3365
  o.push({
3324
3366
  id: s,
@@ -3331,7 +3373,7 @@ const Bs = (e) => {
3331
3373
  }
3332
3374
  return o.sort(_n);
3333
3375
  };
3334
- function Hs(e, t, n) {
3376
+ function Bs(e, t, n) {
3335
3377
  return {
3336
3378
  ...e,
3337
3379
  scaleX: t && n ? t.width / n.width : 1,
@@ -3344,7 +3386,7 @@ function mo(e, t) {
3344
3386
  y: e.top - t.top
3345
3387
  } : Ne;
3346
3388
  }
3347
- function Us(e) {
3389
+ function Vs(e) {
3348
3390
  return function(n) {
3349
3391
  for (var r = arguments.length, o = new Array(r > 1 ? r - 1 : 0), i = 1; i < r; i++)
3350
3392
  o[i - 1] = arguments[i];
@@ -3359,7 +3401,7 @@ function Us(e) {
3359
3401
  });
3360
3402
  };
3361
3403
  }
3362
- const Vs = /* @__PURE__ */ Us(1);
3404
+ const Us = /* @__PURE__ */ Vs(1);
3363
3405
  function vo(e) {
3364
3406
  if (e.startsWith("matrix3d(")) {
3365
3407
  const t = e.slice(9, -1).split(/, /);
@@ -3409,7 +3451,7 @@ function At(e, t) {
3409
3451
  const {
3410
3452
  transform: c,
3411
3453
  transformOrigin: u
3412
- } = ke(e).getComputedStyle(e);
3454
+ } = Ce(e).getComputedStyle(e);
3413
3455
  c && (n = Gs(n, c, u));
3414
3456
  }
3415
3457
  const {
@@ -3446,10 +3488,10 @@ function _s(e) {
3446
3488
  };
3447
3489
  }
3448
3490
  function qs(e, t) {
3449
- return t === void 0 && (t = ke(e).getComputedStyle(e)), t.position === "fixed";
3491
+ return t === void 0 && (t = Ce(e).getComputedStyle(e)), t.position === "fixed";
3450
3492
  }
3451
3493
  function Ys(e, t) {
3452
- t === void 0 && (t = ke(e).getComputedStyle(e));
3494
+ t === void 0 && (t = Ce(e).getComputedStyle(e));
3453
3495
  const n = /(auto|scroll|overlay)/;
3454
3496
  return ["overflow", "overflowX", "overflowY"].some((o) => {
3455
3497
  const i = t[o];
@@ -3461,11 +3503,11 @@ function Xt(e, t) {
3461
3503
  function r(o) {
3462
3504
  if (t != null && n.length >= t || !o)
3463
3505
  return n;
3464
- if (Vn(o) && o.scrollingElement != null && !n.includes(o.scrollingElement))
3506
+ if (Un(o) && o.scrollingElement != null && !n.includes(o.scrollingElement))
3465
3507
  return n.push(o.scrollingElement), n;
3466
3508
  if (!St(o) || fo(o) || n.includes(o))
3467
3509
  return n;
3468
- const i = ke(e).getComputedStyle(o);
3510
+ const i = Ce(e).getComputedStyle(o);
3469
3511
  return o !== e && Ys(o, i) && n.push(o), qs(o, i) ? n : r(o.parentNode);
3470
3512
  }
3471
3513
  return e ? r(e) : n;
@@ -3475,7 +3517,7 @@ function yo(e) {
3475
3517
  return t ?? null;
3476
3518
  }
3477
3519
  function hn(e) {
3478
- return !qt || !e ? null : it(e) ? e : Un(e) ? Vn(e) || e === st(e).scrollingElement ? window : St(e) ? e : null : null;
3520
+ return !qt || !e ? null : it(e) ? e : Vn(e) ? Un(e) || e === st(e).scrollingElement ? window : St(e) ? e : null : null;
3479
3521
  }
3480
3522
  function bo(e) {
3481
3523
  return it(e) ? e.scrollX : e.scrollLeft;
@@ -3483,7 +3525,7 @@ function bo(e) {
3483
3525
  function wo(e) {
3484
3526
  return it(e) ? e.scrollY : e.scrollTop;
3485
3527
  }
3486
- function Dn(e) {
3528
+ function Mn(e) {
3487
3529
  return {
3488
3530
  x: bo(e),
3489
3531
  y: wo(e)
@@ -3496,7 +3538,7 @@ var he;
3496
3538
  function xo(e) {
3497
3539
  return !qt || !e ? !1 : e === document.scrollingElement;
3498
3540
  }
3499
- function ko(e) {
3541
+ function Co(e) {
3500
3542
  const t = {
3501
3543
  x: 0,
3502
3544
  y: 0
@@ -3536,7 +3578,7 @@ function Xs(e, t, n, r, o) {
3536
3578
  isBottom: u,
3537
3579
  isLeft: d,
3538
3580
  isRight: h
3539
- } = ko(e), g = {
3581
+ } = Co(e), g = {
3540
3582
  x: 0,
3541
3583
  y: 0
3542
3584
  }, x = {
@@ -3581,8 +3623,8 @@ function Js(e) {
3581
3623
  height: e.clientHeight
3582
3624
  };
3583
3625
  }
3584
- function Co(e) {
3585
- return e.reduce((t, n) => et(t, Dn(n)), Ne);
3626
+ function ko(e) {
3627
+ return e.reduce((t, n) => et(t, Mn(n)), Ne);
3586
3628
  }
3587
3629
  function Qs(e) {
3588
3630
  return e.reduce((t, n) => t + bo(n), 0);
@@ -3608,7 +3650,7 @@ const ea = [["x", ["left", "right"], Qs], ["y", ["top", "bottom"], Zs]];
3608
3650
  class qn {
3609
3651
  constructor(t, n) {
3610
3652
  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;
3611
- const r = Xt(n), o = Co(r);
3653
+ const r = Xt(n), o = ko(r);
3612
3654
  this.rect = {
3613
3655
  ...t
3614
3656
  }, this.width = t.width, this.height = t.height;
@@ -3643,7 +3685,7 @@ class gt {
3643
3685
  function ta(e) {
3644
3686
  const {
3645
3687
  EventTarget: t
3646
- } = ke(e);
3688
+ } = Ce(e);
3647
3689
  return e instanceof t ? e : st(e);
3648
3690
  }
3649
3691
  function pn(e, t) {
@@ -3660,35 +3702,35 @@ function gr(e) {
3660
3702
  function na(e) {
3661
3703
  e.stopPropagation();
3662
3704
  }
3663
- var U;
3705
+ var V;
3664
3706
  (function(e) {
3665
3707
  e.Space = "Space", e.Down = "ArrowDown", e.Right = "ArrowRight", e.Left = "ArrowLeft", e.Up = "ArrowUp", e.Esc = "Escape", e.Enter = "Enter", e.Tab = "Tab";
3666
- })(U || (U = {}));
3708
+ })(V || (V = {}));
3667
3709
  const Eo = {
3668
- start: [U.Space, U.Enter],
3669
- cancel: [U.Esc],
3670
- end: [U.Space, U.Enter, U.Tab]
3710
+ start: [V.Space, V.Enter],
3711
+ cancel: [V.Esc],
3712
+ end: [V.Space, V.Enter, V.Tab]
3671
3713
  }, ra = (e, t) => {
3672
3714
  let {
3673
3715
  currentCoordinates: n
3674
3716
  } = t;
3675
3717
  switch (e.code) {
3676
- case U.Right:
3718
+ case V.Right:
3677
3719
  return {
3678
3720
  ...n,
3679
3721
  x: n.x + 25
3680
3722
  };
3681
- case U.Left:
3723
+ case V.Left:
3682
3724
  return {
3683
3725
  ...n,
3684
3726
  x: n.x - 25
3685
3727
  };
3686
- case U.Down:
3728
+ case V.Down:
3687
3729
  return {
3688
3730
  ...n,
3689
3731
  y: n.y + 25
3690
3732
  };
3691
- case U.Up:
3733
+ case V.Up:
3692
3734
  return {
3693
3735
  ...n,
3694
3736
  y: n.y - 25
@@ -3703,7 +3745,7 @@ class Yn {
3703
3745
  target: n
3704
3746
  }
3705
3747
  } = t;
3706
- this.props = t, this.listeners = new gt(st(n)), this.windowListeners = new gt(ke(n)), this.handleKeyDown = this.handleKeyDown.bind(this), this.handleCancel = this.handleCancel.bind(this), this.attach();
3748
+ this.props = t, this.listeners = new gt(st(n)), this.windowListeners = new gt(Ce(n)), this.handleKeyDown = this.handleKeyDown.bind(this), this.handleCancel = this.handleCancel.bind(this), this.attach();
3707
3749
  }
3708
3750
  attach() {
3709
3751
  this.handleStart(), this.windowListeners.add(Re.Resize, this.handleCancel), this.windowListeners.add(Re.VisibilityChange, this.handleCancel), setTimeout(() => this.listeners.add(Re.Keydown, this.handleKeyDown));
@@ -3760,37 +3802,37 @@ class Yn {
3760
3802
  isTop: m,
3761
3803
  isRight: E,
3762
3804
  isLeft: A,
3763
- isBottom: M,
3805
+ isBottom: D,
3764
3806
  maxScroll: T,
3765
3807
  minScroll: y
3766
- } = ko(w), S = Js(w), v = {
3767
- x: Math.min(p === U.Right ? S.right - S.width / 2 : S.right, Math.max(p === U.Right ? S.left : S.left + S.width / 2, d.x)),
3768
- y: Math.min(p === U.Down ? S.bottom - S.height / 2 : S.bottom, Math.max(p === U.Down ? S.top : S.top + S.height / 2, d.y))
3769
- }, L = p === U.Right && !E || p === U.Left && !A, b = p === U.Down && !M || p === U.Up && !m;
3808
+ } = Co(w), S = Js(w), v = {
3809
+ x: Math.min(p === V.Right ? S.right - S.width / 2 : S.right, Math.max(p === V.Right ? S.left : S.left + S.width / 2, d.x)),
3810
+ y: Math.min(p === V.Down ? S.bottom - S.height / 2 : S.bottom, Math.max(p === V.Down ? S.top : S.top + S.height / 2, d.y))
3811
+ }, L = p === V.Right && !E || p === V.Left && !A, b = p === V.Down && !D || p === V.Up && !m;
3770
3812
  if (L && v.x !== d.x) {
3771
- const D = w.scrollLeft + h.x, R = p === U.Right && D <= T.x || p === U.Left && D >= y.x;
3813
+ const M = w.scrollLeft + h.x, R = p === V.Right && M <= T.x || p === V.Left && M >= y.x;
3772
3814
  if (R && !h.y) {
3773
3815
  w.scrollTo({
3774
- left: D,
3816
+ left: M,
3775
3817
  behavior: a
3776
3818
  });
3777
3819
  return;
3778
3820
  }
3779
- R ? g.x = w.scrollLeft - D : g.x = p === U.Right ? w.scrollLeft - T.x : w.scrollLeft - y.x, g.x && w.scrollBy({
3821
+ R ? g.x = w.scrollLeft - M : g.x = p === V.Right ? w.scrollLeft - T.x : w.scrollLeft - y.x, g.x && w.scrollBy({
3780
3822
  left: -g.x,
3781
3823
  behavior: a
3782
3824
  });
3783
3825
  break;
3784
3826
  } else if (b && v.y !== d.y) {
3785
- const D = w.scrollTop + h.y, R = p === U.Down && D <= T.y || p === U.Up && D >= y.y;
3827
+ const M = w.scrollTop + h.y, R = p === V.Down && M <= T.y || p === V.Up && M >= y.y;
3786
3828
  if (R && !h.x) {
3787
3829
  w.scrollTo({
3788
- top: D,
3830
+ top: M,
3789
3831
  behavior: a
3790
3832
  });
3791
3833
  return;
3792
3834
  }
3793
- R ? g.y = w.scrollTop - D : g.y = p === U.Down ? w.scrollTop - T.y : w.scrollTop - y.y, g.y && w.scrollBy({
3835
+ R ? g.y = w.scrollTop - M : g.y = p === V.Down ? w.scrollTop - T.y : w.scrollTop - y.y, g.y && w.scrollBy({
3794
3836
  top: -g.y,
3795
3837
  behavior: a
3796
3838
  });
@@ -3859,7 +3901,7 @@ class Kn {
3859
3901
  } = t, {
3860
3902
  target: s
3861
3903
  } = i;
3862
- this.props = t, this.events = n, this.document = st(s), this.documentListeners = new gt(this.document), this.listeners = new gt(r), this.windowListeners = new gt(ke(s)), this.initialCoordinates = (o = Ht(i)) != null ? o : Ne, this.handleStart = this.handleStart.bind(this), this.handleMove = this.handleMove.bind(this), this.handleEnd = this.handleEnd.bind(this), this.handleCancel = this.handleCancel.bind(this), this.handleKeydown = this.handleKeydown.bind(this), this.removeTextSelection = this.removeTextSelection.bind(this), this.attach();
3904
+ this.props = t, this.events = n, this.document = st(s), this.documentListeners = new gt(this.document), this.listeners = new gt(r), this.windowListeners = new gt(Ce(s)), this.initialCoordinates = (o = Bt(i)) != null ? o : Ne, this.handleStart = this.handleStart.bind(this), this.handleMove = this.handleMove.bind(this), this.handleEnd = this.handleEnd.bind(this), this.handleCancel = this.handleCancel.bind(this), this.handleKeydown = this.handleKeydown.bind(this), this.removeTextSelection = this.removeTextSelection.bind(this), this.attach();
3863
3905
  }
3864
3906
  attach() {
3865
3907
  const {
@@ -3925,7 +3967,7 @@ class Kn {
3925
3967
  } = i;
3926
3968
  if (!o)
3927
3969
  return;
3928
- const l = (n = Ht(t)) != null ? n : Ne, c = wt(o, l);
3970
+ const l = (n = Bt(t)) != null ? n : Ne, c = wt(o, l);
3929
3971
  if (!r && a) {
3930
3972
  if (mr(a)) {
3931
3973
  if (a.tolerance != null && pn(c, a.tolerance))
@@ -3955,7 +3997,7 @@ class Kn {
3955
3997
  this.detach(), this.activated || t(this.props.active), n();
3956
3998
  }
3957
3999
  handleKeydown(t) {
3958
- t.code === U.Esc && this.handleCancel();
4000
+ t.code === V.Esc && this.handleCancel();
3959
4001
  }
3960
4002
  removeTextSelection() {
3961
4003
  var t;
@@ -4002,10 +4044,10 @@ const ia = {
4002
4044
  name: "mouseup"
4003
4045
  }
4004
4046
  };
4005
- var Mn;
4047
+ var Dn;
4006
4048
  (function(e) {
4007
4049
  e[e.RightClick = 2] = "RightClick";
4008
- })(Mn || (Mn = {}));
4050
+ })(Dn || (Dn = {}));
4009
4051
  class sa extends Kn {
4010
4052
  constructor(t) {
4011
4053
  super(t, ia, st(t.event.target));
@@ -4019,7 +4061,7 @@ sa.activators = [{
4019
4061
  } = e, {
4020
4062
  onActivation: r
4021
4063
  } = t;
4022
- return n.button === Mn.RightClick ? !1 : (r == null || r({
4064
+ return n.button === Dn.RightClick ? !1 : (r == null || r({
4023
4065
  event: n
4024
4066
  }), !0);
4025
4067
  }
@@ -4070,10 +4112,10 @@ var mt;
4070
4112
  (function(e) {
4071
4113
  e[e.Pointer = 0] = "Pointer", e[e.DraggableRect = 1] = "DraggableRect";
4072
4114
  })(mt || (mt = {}));
4073
- var Vt;
4115
+ var Ut;
4074
4116
  (function(e) {
4075
4117
  e[e.TreeOrder = 0] = "TreeOrder", e[e.ReversedTreeOrder = 1] = "ReversedTreeOrder";
4076
- })(Vt || (Vt = {}));
4118
+ })(Ut || (Ut = {}));
4077
4119
  function la(e) {
4078
4120
  let {
4079
4121
  acceleration: t,
@@ -4082,7 +4124,7 @@ function la(e) {
4082
4124
  draggingRect: o,
4083
4125
  enabled: i,
4084
4126
  interval: s = 5,
4085
- order: a = Vt.TreeOrder,
4127
+ order: a = Ut.TreeOrder,
4086
4128
  pointerCoordinates: l,
4087
4129
  scrollableAncestors: c,
4088
4130
  scrollableAncestorRects: u,
@@ -4110,13 +4152,13 @@ function la(e) {
4110
4152
  case mt.DraggableRect:
4111
4153
  return o;
4112
4154
  }
4113
- }, [n, o, l]), A = G(null), M = N(() => {
4155
+ }, [n, o, l]), A = G(null), D = N(() => {
4114
4156
  const y = A.current;
4115
4157
  if (!y)
4116
4158
  return;
4117
4159
  const S = p.current.x * m.current.x, v = p.current.y * m.current.y;
4118
4160
  y.scrollBy(S, v);
4119
- }, []), T = q(() => a === Vt.TreeOrder ? [...c].reverse() : c, [a, c]);
4161
+ }, []), T = q(() => a === Ut.TreeOrder ? [...c].reverse() : c, [a, c]);
4120
4162
  W(
4121
4163
  () => {
4122
4164
  if (!i || !c.length || !E) {
@@ -4133,10 +4175,10 @@ function la(e) {
4133
4175
  direction: L,
4134
4176
  speed: b
4135
4177
  } = Xs(y, v, E, t, h);
4136
- for (const D of ["x", "y"])
4137
- g[D][L[D]] || (b[D] = 0, L[D] = 0);
4178
+ for (const M of ["x", "y"])
4179
+ g[M][L[M]] || (b[M] = 0, L[M] = 0);
4138
4180
  if (b.x > 0 || b.y > 0) {
4139
- w(), A.current = y, x(M, s), p.current = b, m.current = L;
4181
+ w(), A.current = y, x(D, s), p.current = b, m.current = L;
4140
4182
  return;
4141
4183
  }
4142
4184
  }
@@ -4151,7 +4193,7 @@ function la(e) {
4151
4193
  // eslint-disable-next-line react-hooks/exhaustive-deps
4152
4194
  [
4153
4195
  t,
4154
- M,
4196
+ D,
4155
4197
  r,
4156
4198
  w,
4157
4199
  i,
@@ -4184,7 +4226,7 @@ function da(e) {
4184
4226
  delta: t,
4185
4227
  disabled: n
4186
4228
  } = e;
4187
- const r = Bt(t);
4229
+ const r = $t(t);
4188
4230
  return Et((o) => {
4189
4231
  if (n || !r || !o)
4190
4232
  return ca;
@@ -4222,10 +4264,10 @@ function fa(e, t) {
4222
4264
  return [...n, ...i];
4223
4265
  }, []), [e, t]);
4224
4266
  }
4225
- var kt;
4267
+ var Ct;
4226
4268
  (function(e) {
4227
4269
  e[e.Always = 0] = "Always", e[e.BeforeDragging = 1] = "BeforeDragging", e[e.WhileDragging = 2] = "WhileDragging";
4228
- })(kt || (kt = {}));
4270
+ })(Ct || (Ct = {}));
4229
4271
  var Ln;
4230
4272
  (function(e) {
4231
4273
  e.Optimized = "optimized";
@@ -4237,7 +4279,7 @@ function ha(e, t) {
4237
4279
  dependencies: r,
4238
4280
  config: o
4239
4281
  } = t;
4240
- const [i, s] = H(null), {
4282
+ const [i, s] = B(null), {
4241
4283
  frequency: a,
4242
4284
  measure: l,
4243
4285
  strategy: c
@@ -4255,7 +4297,7 @@ function ha(e, t) {
4255
4297
  E.set(A.id, A.rect.current);
4256
4298
  continue;
4257
4299
  }
4258
- const M = A.node.current, T = M ? new qn(l(M), M) : null;
4300
+ const D = A.node.current, T = D ? new qn(l(D), D) : null;
4259
4301
  A.rect.current = T, T && E.set(A.id, T);
4260
4302
  }
4261
4303
  return E;
@@ -4291,9 +4333,9 @@ function ha(e, t) {
4291
4333
  };
4292
4334
  function p() {
4293
4335
  switch (c) {
4294
- case kt.Always:
4336
+ case Ct.Always:
4295
4337
  return !1;
4296
- case kt.BeforeDragging:
4338
+ case Ct.BeforeDragging:
4297
4339
  return n;
4298
4340
  default:
4299
4341
  return !n;
@@ -4345,7 +4387,7 @@ function ma(e) {
4345
4387
  }
4346
4388
  function br(e, t, n) {
4347
4389
  t === void 0 && (t = ma);
4348
- const [r, o] = H(null);
4390
+ const [r, o] = B(null);
4349
4391
  function i() {
4350
4392
  o((l) => {
4351
4393
  if (!e)
@@ -4375,7 +4417,7 @@ function br(e, t, n) {
4375
4417
  }), a = Jt({
4376
4418
  callback: i
4377
4419
  });
4378
- return Ue(() => {
4420
+ return Ve(() => {
4379
4421
  i(), e ? (a == null || a.observe(e), s == null || s.observe(document.body, {
4380
4422
  childList: !0,
4381
4423
  subtree: !0
@@ -4394,9 +4436,9 @@ function ya(e) {
4394
4436
  }, [e]), n;
4395
4437
  }
4396
4438
  function ba(e) {
4397
- const [t, n] = H(null), r = G(e), o = N((i) => {
4439
+ const [t, n] = B(null), r = G(e), o = N((i) => {
4398
4440
  const s = hn(i.target);
4399
- s && n((a) => a ? (a.set(s, Dn(s)), new Map(a)) : null);
4441
+ s && n((a) => a ? (a.set(s, Mn(s)), new Map(a)) : null);
4400
4442
  }, []);
4401
4443
  return W(() => {
4402
4444
  const i = r.current;
@@ -4406,7 +4448,7 @@ function ba(e) {
4406
4448
  const c = hn(l);
4407
4449
  return c ? (c.addEventListener("scroll", o, {
4408
4450
  passive: !0
4409
- }), [c, Dn(c)]) : null;
4451
+ }), [c, Mn(c)]) : null;
4410
4452
  }).filter((l) => l != null);
4411
4453
  n(a.length ? new Map(a) : null), r.current = e;
4412
4454
  }
@@ -4419,7 +4461,7 @@ function ba(e) {
4419
4461
  c == null || c.removeEventListener("scroll", o);
4420
4462
  });
4421
4463
  }
4422
- }, [o, e]), q(() => e.length ? t ? Array.from(t.values()).reduce((i, s) => et(i, s), Ne) : Co(e) : Ne, [e, t]);
4464
+ }, [o, e]), q(() => e.length ? t ? Array.from(t.values()).reduce((i, s) => et(i, s), Ne) : ko(e) : Ne, [e, t]);
4423
4465
  }
4424
4466
  function xr(e, t) {
4425
4467
  t === void 0 && (t = []);
@@ -4475,21 +4517,21 @@ function xa(e, t) {
4475
4517
  function Ao(e) {
4476
4518
  return q(() => e ? _s(e) : null, [e]);
4477
4519
  }
4478
- const kr = [];
4479
- function ka(e, t) {
4520
+ const Cr = [];
4521
+ function Ca(e, t) {
4480
4522
  t === void 0 && (t = At);
4481
- const [n] = e, r = Ao(n ? ke(n) : null), [o, i] = H(kr);
4523
+ const [n] = e, r = Ao(n ? Ce(n) : null), [o, i] = B(Cr);
4482
4524
  function s() {
4483
- i(() => e.length ? e.map((l) => xo(l) ? r : new qn(t(l), l)) : kr);
4525
+ i(() => e.length ? e.map((l) => xo(l) ? r : new qn(t(l), l)) : Cr);
4484
4526
  }
4485
4527
  const a = Jt({
4486
4528
  callback: s
4487
4529
  });
4488
- return Ue(() => {
4530
+ return Ve(() => {
4489
4531
  a == null || a.disconnect(), s(), e.forEach((l) => a == null ? void 0 : a.observe(l));
4490
4532
  }, [e]), o;
4491
4533
  }
4492
- function Do(e) {
4534
+ function Mo(e) {
4493
4535
  if (!e)
4494
4536
  return null;
4495
4537
  if (e.children.length > 1)
@@ -4497,11 +4539,11 @@ function Do(e) {
4497
4539
  const t = e.children[0];
4498
4540
  return St(t) ? t : e;
4499
4541
  }
4500
- function Ca(e) {
4542
+ function ka(e) {
4501
4543
  let {
4502
4544
  measure: t
4503
4545
  } = e;
4504
- const [n, r] = H(null), o = N((c) => {
4546
+ const [n, r] = B(null), o = N((c) => {
4505
4547
  for (const {
4506
4548
  target: u
4507
4549
  } of c)
@@ -4519,9 +4561,9 @@ function Ca(e) {
4519
4561
  }, [t]), i = Jt({
4520
4562
  callback: o
4521
4563
  }), s = N((c) => {
4522
- const u = Do(c);
4564
+ const u = Mo(c);
4523
4565
  i == null || i.disconnect(), u && (i == null || i.observe(u)), r(u ? t(u) : null);
4524
- }, [t, i]), [a, l] = $t(s);
4566
+ }, [t, i]), [a, l] = Ht(s);
4525
4567
  return q(() => ({
4526
4568
  nodeRef: a,
4527
4569
  rect: n,
@@ -4542,7 +4584,7 @@ const Sa = [{
4542
4584
  },
4543
4585
  droppable: {
4544
4586
  measure: pr,
4545
- strategy: kt.WhileDragging,
4587
+ strategy: Ct.WhileDragging,
4546
4588
  frequency: Ln.Optimized
4547
4589
  },
4548
4590
  dragOverlay: {
@@ -4586,15 +4628,15 @@ const Aa = {
4586
4628
  current: null
4587
4629
  },
4588
4630
  rect: null,
4589
- setRef: Ut
4631
+ setRef: Vt
4590
4632
  },
4591
4633
  scrollableAncestors: [],
4592
4634
  scrollableAncestorRects: [],
4593
4635
  measuringConfiguration: Ft,
4594
- measureDroppableContainers: Ut,
4636
+ measureDroppableContainers: Vt,
4595
4637
  windowRect: null,
4596
4638
  measuringScheduled: !1
4597
- }, Mo = {
4639
+ }, Do = {
4598
4640
  activatorEvent: null,
4599
4641
  activators: [],
4600
4642
  active: null,
@@ -4602,12 +4644,12 @@ const Aa = {
4602
4644
  ariaDescribedById: {
4603
4645
  draggable: ""
4604
4646
  },
4605
- dispatch: Ut,
4647
+ dispatch: Vt,
4606
4648
  draggableNodes: /* @__PURE__ */ new Map(),
4607
4649
  over: null,
4608
- measureDroppableContainers: Ut
4609
- }, Dt = /* @__PURE__ */ Xe(Mo), Lo = /* @__PURE__ */ Xe(Aa);
4610
- function Da() {
4650
+ measureDroppableContainers: Vt
4651
+ }, Mt = /* @__PURE__ */ Xe(Do), Lo = /* @__PURE__ */ Xe(Aa);
4652
+ function Ma() {
4611
4653
  return {
4612
4654
  draggable: {
4613
4655
  active: null,
@@ -4626,7 +4668,7 @@ function Da() {
4626
4668
  }
4627
4669
  };
4628
4670
  }
4629
- function Ma(e, t) {
4671
+ function Da(e, t) {
4630
4672
  switch (t.type) {
4631
4673
  case de.DragStart:
4632
4674
  return {
@@ -4727,7 +4769,7 @@ function La(e) {
4727
4769
  active: n,
4728
4770
  activatorEvent: r,
4729
4771
  draggableNodes: o
4730
- } = je(Dt), i = Bt(r), s = Bt(n == null ? void 0 : n.id);
4772
+ } = je(Mt), i = $t(r), s = $t(n == null ? void 0 : n.id);
4731
4773
  return W(() => {
4732
4774
  if (!t && !r && i && s != null) {
4733
4775
  if (!Gn(i) || document.activeElement === i.target)
@@ -4745,7 +4787,7 @@ function La(e) {
4745
4787
  for (const u of [l.current, c.current]) {
4746
4788
  if (!u)
4747
4789
  continue;
4748
- const d = ks(u);
4790
+ const d = Cs(u);
4749
4791
  if (d) {
4750
4792
  d.focus();
4751
4793
  break;
@@ -4799,7 +4841,7 @@ function Ta(e) {
4799
4841
  x: o,
4800
4842
  y: o
4801
4843
  } : o;
4802
- Ue(() => {
4844
+ Ve(() => {
4803
4845
  if (!s && !a || !t) {
4804
4846
  i.current = !1;
4805
4847
  return;
@@ -4841,7 +4883,7 @@ const Ia = /* @__PURE__ */ Go(function(t) {
4841
4883
  modifiers: g,
4842
4884
  ...x
4843
4885
  } = t;
4844
- const w = Wo(Ma, void 0, Da), [p, m] = w, [E, A] = Ms(), [M, T] = H(Ye.Uninitialized), y = M === Ye.Initialized, {
4886
+ const w = Wo(Da, void 0, Ma), [p, m] = w, [E, A] = Ds(), [D, T] = B(Ye.Uninitialized), y = D === Ye.Initialized, {
4845
4887
  draggable: {
4846
4888
  active: S,
4847
4889
  nodes: v,
@@ -4850,7 +4892,7 @@ const Ia = /* @__PURE__ */ Go(function(t) {
4850
4892
  droppable: {
4851
4893
  containers: b
4852
4894
  }
4853
- } = p, D = S != null ? v.get(S) : null, R = G({
4895
+ } = p, M = S != null ? v.get(S) : null, R = G({
4854
4896
  initial: null,
4855
4897
  translated: null
4856
4898
  }), F = q(() => {
@@ -4858,25 +4900,25 @@ const Ia = /* @__PURE__ */ Go(function(t) {
4858
4900
  return S != null ? {
4859
4901
  id: S,
4860
4902
  // It's possible for the active node to unmount while dragging
4861
- data: (be = D == null ? void 0 : D.data) != null ? be : Ea,
4903
+ data: (be = M == null ? void 0 : M.data) != null ? be : Ea,
4862
4904
  rect: R
4863
4905
  } : null;
4864
- }, [S, D]), X = G(null), [pe, J] = H(null), [re, Y] = H(null), ee = bt(x, Object.values(x)), ge = Kt("DndDescribedBy", s), we = q(() => b.getEnabled(), [b]), oe = Ra(h), {
4906
+ }, [S, M]), X = G(null), [pe, J] = B(null), [re, Y] = B(null), ee = bt(x, Object.values(x)), ge = Kt("DndDescribedBy", s), we = q(() => b.getEnabled(), [b]), oe = Ra(h), {
4865
4907
  droppableRects: ue,
4866
- measureDroppableContainers: Oe,
4908
+ measureDroppableContainers: ze,
4867
4909
  measuringScheduled: Se
4868
4910
  } = ha(we, {
4869
4911
  dragging: y,
4870
4912
  dependencies: [L.x, L.y],
4871
4913
  config: oe.droppable
4872
- }), le = ua(v, S), ze = q(() => re ? Ht(re) : null, [re]), Q = Vo(), se = pa(le, oe.draggable.measure);
4914
+ }), le = ua(v, S), Oe = q(() => re ? Bt(re) : null, [re]), Q = Uo(), se = pa(le, oe.draggable.measure);
4873
4915
  Ta({
4874
4916
  activeNode: S != null ? v.get(S) : null,
4875
4917
  config: Q.layoutShiftCompensation,
4876
4918
  initialRect: se,
4877
4919
  measure: oe.draggable.measure
4878
4920
  });
4879
- const $ = br(le, oe.draggable.measure, se), xe = br(le ? le.parentElement : null), Ce = G({
4921
+ const H = br(le, oe.draggable.measure, se), xe = br(le ? le.parentElement : null), ke = G({
4880
4922
  activatorEvent: null,
4881
4923
  active: null,
4882
4924
  activeNode: le,
@@ -4890,32 +4932,32 @@ const Ia = /* @__PURE__ */ Go(function(t) {
4890
4932
  over: null,
4891
4933
  scrollableAncestors: [],
4892
4934
  scrollAdjustedTranslate: null
4893
- }), Je = b.getNodeFor((n = Ce.current.over) == null ? void 0 : n.id), ce = Ca({
4935
+ }), Je = b.getNodeFor((n = ke.current.over) == null ? void 0 : n.id), ce = ka({
4894
4936
  measure: oe.dragOverlay.measure
4895
- }), k = (r = ce.nodeRef.current) != null ? r : le, C = y ? (o = ce.rect) != null ? o : $ : null, I = !!(ce.nodeRef.current && ce.rect), z = va(I ? null : $), K = Ao(k ? ke(k) : null), P = ya(y ? Je ?? le : null), Z = ka(P), ae = Ro(g, {
4937
+ }), C = (r = ce.nodeRef.current) != null ? r : le, k = y ? (o = ce.rect) != null ? o : H : null, I = !!(ce.nodeRef.current && ce.rect), O = va(I ? null : H), K = Ao(C ? Ce(C) : null), P = ya(y ? Je ?? le : null), Z = Ca(P), ae = Ro(g, {
4896
4938
  transform: {
4897
- x: L.x - z.x,
4898
- y: L.y - z.y,
4939
+ x: L.x - O.x,
4940
+ y: L.y - O.y,
4899
4941
  scaleX: 1,
4900
4942
  scaleY: 1
4901
4943
  },
4902
4944
  activatorEvent: re,
4903
4945
  active: F,
4904
- activeNodeRect: $,
4946
+ activeNodeRect: H,
4905
4947
  containerNodeRect: xe,
4906
- draggingNodeRect: C,
4907
- over: Ce.current.over,
4948
+ draggingNodeRect: k,
4949
+ over: ke.current.over,
4908
4950
  overlayNodeRect: ce.rect,
4909
4951
  scrollableAncestors: P,
4910
4952
  scrollableAncestorRects: Z,
4911
4953
  windowRect: K
4912
- }), me = ze ? et(ze, L) : null, ne = ba(P), $e = xr(ne), Te = xr(ne, [$]), Ve = et(ae, $e), Ge = C ? Vs(C, ae) : null, _ = F && Ge ? d({
4954
+ }), me = Oe ? et(Oe, L) : null, ne = ba(P), He = xr(ne), Te = xr(ne, [H]), Ue = et(ae, He), Ge = k ? Us(k, ae) : null, _ = F && Ge ? d({
4913
4955
  active: F,
4914
4956
  collisionRect: Ge,
4915
4957
  droppableRects: ue,
4916
4958
  droppableContainers: we,
4917
4959
  pointerCoordinates: me
4918
- }) : null, fe = go(_, "id"), [ye, Mt] = H(null), en = I ? ae : et(ae, Te), Lt = Hs(en, (i = ye == null ? void 0 : ye.rect) != null ? i : null, $), at = G(null), Rt = N(
4960
+ }) : null, fe = go(_, "id"), [ye, Dt] = B(null), en = I ? ae : et(ae, Te), Lt = Bs(en, (i = ye == null ? void 0 : ye.rect) != null ? i : null, H), at = G(null), Rt = N(
4919
4961
  (be, Ee) => {
4920
4962
  let {
4921
4963
  sensor: Ae,
@@ -4923,31 +4965,31 @@ const Ia = /* @__PURE__ */ Go(function(t) {
4923
4965
  } = Ee;
4924
4966
  if (X.current == null)
4925
4967
  return;
4926
- const Me = v.get(X.current);
4927
- if (!Me)
4968
+ const De = v.get(X.current);
4969
+ if (!De)
4928
4970
  return;
4929
- const De = be.nativeEvent, Fe = new Ae({
4971
+ const Me = be.nativeEvent, Fe = new Ae({
4930
4972
  active: X.current,
4931
- activeNode: Me,
4932
- event: De,
4973
+ activeNode: De,
4974
+ event: Me,
4933
4975
  options: We,
4934
4976
  // Sensors need to be instantiated with refs for arguments that change over time
4935
4977
  // otherwise they are frozen in time with the stale arguments
4936
- context: Ce,
4978
+ context: ke,
4937
4979
  onAbort(ve) {
4938
4980
  if (!v.get(ve))
4939
4981
  return;
4940
4982
  const {
4941
4983
  onDragAbort: Pe
4942
- } = ee.current, Be = {
4984
+ } = ee.current, $e = {
4943
4985
  id: ve
4944
4986
  };
4945
- Pe == null || Pe(Be), E({
4987
+ Pe == null || Pe($e), E({
4946
4988
  type: "onDragAbort",
4947
- event: Be
4989
+ event: $e
4948
4990
  });
4949
4991
  },
4950
- onPending(ve, _e, Pe, Be) {
4992
+ onPending(ve, _e, Pe, $e) {
4951
4993
  if (!v.get(ve))
4952
4994
  return;
4953
4995
  const {
@@ -4956,7 +4998,7 @@ const Ia = /* @__PURE__ */ Go(function(t) {
4956
4998
  id: ve,
4957
4999
  constraint: _e,
4958
5000
  initialCoordinates: Pe,
4959
- offset: Be
5001
+ offset: $e
4960
5002
  };
4961
5003
  ct == null || ct(qe), E({
4962
5004
  type: "onDragPending",
@@ -4971,9 +5013,9 @@ const Ia = /* @__PURE__ */ Go(function(t) {
4971
5013
  if (!Pe)
4972
5014
  return;
4973
5015
  const {
4974
- onDragStart: Be
5016
+ onDragStart: $e
4975
5017
  } = ee.current, lt = {
4976
- activatorEvent: De,
5018
+ activatorEvent: Me,
4977
5019
  active: {
4978
5020
  id: _e,
4979
5021
  data: Pe.data,
@@ -4981,14 +5023,14 @@ const Ia = /* @__PURE__ */ Go(function(t) {
4981
5023
  }
4982
5024
  };
4983
5025
  Nt(() => {
4984
- Be == null || Be(lt), T(Ye.Initializing), m({
5026
+ $e == null || $e(lt), T(Ye.Initializing), m({
4985
5027
  type: de.DragStart,
4986
5028
  initialCoordinates: ve,
4987
5029
  active: _e
4988
5030
  }), E({
4989
5031
  type: "onDragStart",
4990
5032
  event: lt
4991
- }), J(at.current), Y(De);
5033
+ }), J(at.current), Y(Me);
4992
5034
  });
4993
5035
  },
4994
5036
  onMove(ve) {
@@ -5005,19 +5047,19 @@ const Ia = /* @__PURE__ */ Go(function(t) {
5005
5047
  return async function() {
5006
5048
  const {
5007
5049
  active: Pe,
5008
- collisions: Be,
5050
+ collisions: $e,
5009
5051
  over: lt,
5010
5052
  scrollAdjustedTranslate: ct
5011
- } = Ce.current;
5053
+ } = ke.current;
5012
5054
  let qe = null;
5013
5055
  if (Pe && ct) {
5014
5056
  const {
5015
5057
  cancelDrop: dt
5016
5058
  } = ee.current;
5017
5059
  qe = {
5018
- activatorEvent: De,
5060
+ activatorEvent: Me,
5019
5061
  active: Pe,
5020
- collisions: Be,
5062
+ collisions: $e,
5021
5063
  delta: ct,
5022
5064
  over: lt
5023
5065
  }, ve === de.DragEnd && typeof dt == "function" && await Promise.resolve(dt(qe)) && (ve = de.DragCancel);
@@ -5025,7 +5067,7 @@ const Ia = /* @__PURE__ */ Go(function(t) {
5025
5067
  X.current = null, Nt(() => {
5026
5068
  m({
5027
5069
  type: ve
5028
- }), T(Ye.Uninitialized), Mt(null), J(null), Y(null), at.current = null;
5070
+ }), T(Ye.Uninitialized), Dt(null), J(null), Y(null), at.current = null;
5029
5071
  const dt = ve === de.DragEnd ? "onDragEnd" : "onDragCancel";
5030
5072
  if (qe) {
5031
5073
  const tn = ee.current[dt];
@@ -5041,24 +5083,24 @@ const Ia = /* @__PURE__ */ Go(function(t) {
5041
5083
  // eslint-disable-next-line react-hooks/exhaustive-deps
5042
5084
  [v]
5043
5085
  ), Tt = N((be, Ee) => (Ae, We) => {
5044
- const Me = Ae.nativeEvent, De = v.get(We);
5086
+ const De = Ae.nativeEvent, Me = v.get(We);
5045
5087
  if (
5046
5088
  // Another sensor is already instantiating
5047
5089
  X.current !== null || // No active draggable
5048
- !De || // Event has already been captured
5049
- Me.dndKit || Me.defaultPrevented
5090
+ !Me || // Event has already been captured
5091
+ De.dndKit || De.defaultPrevented
5050
5092
  )
5051
5093
  return;
5052
5094
  const Fe = {
5053
- active: De
5095
+ active: Me
5054
5096
  };
5055
- be(Ae, Ee.options, Fe) === !0 && (Me.dndKit = {
5097
+ be(Ae, Ee.options, Fe) === !0 && (De.dndKit = {
5056
5098
  capturedBy: Ee.sensor
5057
5099
  }, X.current = We, Rt(Ae, Ee));
5058
5100
  }, [v, Rt]), It = fa(u, Tt);
5059
- wa(u), Ue(() => {
5060
- $ && M === Ye.Initializing && T(Ye.Initialized);
5061
- }, [$, M]), W(
5101
+ wa(u), Ve(() => {
5102
+ H && D === Ye.Initializing && T(Ye.Initialized);
5103
+ }, [H, D]), W(
5062
5104
  () => {
5063
5105
  const {
5064
5106
  onDragMove: be
@@ -5066,29 +5108,29 @@ const Ia = /* @__PURE__ */ Go(function(t) {
5066
5108
  active: Ee,
5067
5109
  activatorEvent: Ae,
5068
5110
  collisions: We,
5069
- over: Me
5070
- } = Ce.current;
5111
+ over: De
5112
+ } = ke.current;
5071
5113
  if (!Ee || !Ae)
5072
5114
  return;
5073
- const De = {
5115
+ const Me = {
5074
5116
  active: Ee,
5075
5117
  activatorEvent: Ae,
5076
5118
  collisions: We,
5077
5119
  delta: {
5078
- x: Ve.x,
5079
- y: Ve.y
5120
+ x: Ue.x,
5121
+ y: Ue.y
5080
5122
  },
5081
- over: Me
5123
+ over: De
5082
5124
  };
5083
5125
  Nt(() => {
5084
- be == null || be(De), E({
5126
+ be == null || be(Me), E({
5085
5127
  type: "onDragMove",
5086
- event: De
5128
+ event: Me
5087
5129
  });
5088
5130
  });
5089
5131
  },
5090
5132
  // eslint-disable-next-line react-hooks/exhaustive-deps
5091
- [Ve.x, Ve.y]
5133
+ [Ue.x, Ue.y]
5092
5134
  ), W(
5093
5135
  () => {
5094
5136
  const {
@@ -5096,12 +5138,12 @@ const Ia = /* @__PURE__ */ Go(function(t) {
5096
5138
  activatorEvent: Ee,
5097
5139
  collisions: Ae,
5098
5140
  droppableContainers: We,
5099
- scrollAdjustedTranslate: Me
5100
- } = Ce.current;
5101
- if (!be || X.current == null || !Ee || !Me)
5141
+ scrollAdjustedTranslate: De
5142
+ } = ke.current;
5143
+ if (!be || X.current == null || !Ee || !De)
5102
5144
  return;
5103
5145
  const {
5104
- onDragOver: De
5146
+ onDragOver: Me
5105
5147
  } = ee.current, Fe = We.get(fe), Qe = Fe && Fe.rect.current ? {
5106
5148
  id: Fe.id,
5107
5149
  rect: Fe.rect.current,
@@ -5112,13 +5154,13 @@ const Ia = /* @__PURE__ */ Go(function(t) {
5112
5154
  activatorEvent: Ee,
5113
5155
  collisions: Ae,
5114
5156
  delta: {
5115
- x: Me.x,
5116
- y: Me.y
5157
+ x: De.x,
5158
+ y: De.y
5117
5159
  },
5118
5160
  over: Qe
5119
5161
  };
5120
5162
  Nt(() => {
5121
- Mt(Qe), De == null || De(ve), E({
5163
+ Dt(Qe), Me == null || Me(ve), E({
5122
5164
  type: "onDragOver",
5123
5165
  event: ve
5124
5166
  });
@@ -5126,8 +5168,8 @@ const Ia = /* @__PURE__ */ Go(function(t) {
5126
5168
  },
5127
5169
  // eslint-disable-next-line react-hooks/exhaustive-deps
5128
5170
  [fe]
5129
- ), Ue(() => {
5130
- Ce.current = {
5171
+ ), Ve(() => {
5172
+ ke.current = {
5131
5173
  activatorEvent: re,
5132
5174
  active: F,
5133
5175
  activeNode: le,
@@ -5135,17 +5177,17 @@ const Ia = /* @__PURE__ */ Go(function(t) {
5135
5177
  collisions: _,
5136
5178
  droppableRects: ue,
5137
5179
  draggableNodes: v,
5138
- draggingNode: k,
5139
- draggingNodeRect: C,
5180
+ draggingNode: C,
5181
+ draggingNodeRect: k,
5140
5182
  droppableContainers: b,
5141
5183
  over: ye,
5142
5184
  scrollableAncestors: P,
5143
- scrollAdjustedTranslate: Ve
5185
+ scrollAdjustedTranslate: Ue
5144
5186
  }, R.current = {
5145
- initial: C,
5187
+ initial: k,
5146
5188
  translated: Ge
5147
5189
  };
5148
- }, [F, le, _, Ge, v, k, C, ue, b, ye, P, Ve]), la({
5190
+ }, [F, le, _, Ge, v, C, k, ue, b, ye, P, Ue]), la({
5149
5191
  ...Q,
5150
5192
  delta: L,
5151
5193
  draggingRect: Ge,
@@ -5153,10 +5195,10 @@ const Ia = /* @__PURE__ */ Go(function(t) {
5153
5195
  scrollableAncestors: P,
5154
5196
  scrollableAncestorRects: Z
5155
5197
  });
5156
- const Ho = q(() => ({
5198
+ const Bo = q(() => ({
5157
5199
  active: F,
5158
5200
  activeNode: le,
5159
- activeNodeRect: $,
5201
+ activeNodeRect: H,
5160
5202
  activatorEvent: re,
5161
5203
  collisions: _,
5162
5204
  containerNodeRect: xe,
@@ -5165,31 +5207,31 @@ const Ia = /* @__PURE__ */ Go(function(t) {
5165
5207
  droppableContainers: b,
5166
5208
  droppableRects: ue,
5167
5209
  over: ye,
5168
- measureDroppableContainers: Oe,
5210
+ measureDroppableContainers: ze,
5169
5211
  scrollableAncestors: P,
5170
5212
  scrollableAncestorRects: Z,
5171
5213
  measuringConfiguration: oe,
5172
5214
  measuringScheduled: Se,
5173
5215
  windowRect: K
5174
- }), [F, le, $, re, _, xe, ce, v, b, ue, ye, Oe, P, Z, oe, Se, K]), Uo = q(() => ({
5216
+ }), [F, le, H, re, _, xe, ce, v, b, ue, ye, ze, P, Z, oe, Se, K]), Vo = q(() => ({
5175
5217
  activatorEvent: re,
5176
5218
  activators: It,
5177
5219
  active: F,
5178
- activeNodeRect: $,
5220
+ activeNodeRect: H,
5179
5221
  ariaDescribedById: {
5180
5222
  draggable: ge
5181
5223
  },
5182
5224
  dispatch: m,
5183
5225
  draggableNodes: v,
5184
5226
  over: ye,
5185
- measureDroppableContainers: Oe
5186
- }), [re, It, F, $, m, ge, v, ye, Oe]);
5227
+ measureDroppableContainers: ze
5228
+ }), [re, It, F, H, m, ge, v, ye, ze]);
5187
5229
  return te.createElement(po.Provider, {
5188
5230
  value: A
5189
- }, te.createElement(Dt.Provider, {
5190
- value: Uo
5231
+ }, te.createElement(Mt.Provider, {
5232
+ value: Vo
5191
5233
  }, te.createElement(Lo.Provider, {
5192
- value: Ho
5234
+ value: Bo
5193
5235
  }, te.createElement(Qt.Provider, {
5194
5236
  value: Lt
5195
5237
  }, c)), te.createElement(La, {
@@ -5198,7 +5240,7 @@ const Ia = /* @__PURE__ */ Go(function(t) {
5198
5240
  ...a,
5199
5241
  hiddenTextDescribedById: ge
5200
5242
  }));
5201
- function Vo() {
5243
+ function Uo() {
5202
5244
  const be = (pe == null ? void 0 : pe.autoScrollEnabled) === !1, Ee = typeof l == "object" ? l.enabled === !1 : l === !1, Ae = y && !be && !Ee;
5203
5245
  return typeof l == "object" ? {
5204
5246
  ...l,
@@ -5207,15 +5249,15 @@ const Ia = /* @__PURE__ */ Go(function(t) {
5207
5249
  enabled: Ae
5208
5250
  };
5209
5251
  }
5210
- }), Na = /* @__PURE__ */ Xe(null), Cr = "button", Oa = "Draggable";
5211
- function za(e) {
5252
+ }), Na = /* @__PURE__ */ Xe(null), kr = "button", za = "Draggable";
5253
+ function Oa(e) {
5212
5254
  let {
5213
5255
  id: t,
5214
5256
  data: n,
5215
5257
  disabled: r = !1,
5216
5258
  attributes: o
5217
5259
  } = e;
5218
- const i = Kt(Oa), {
5260
+ const i = Kt(za), {
5219
5261
  activators: s,
5220
5262
  activatorEvent: a,
5221
5263
  active: l,
@@ -5223,17 +5265,17 @@ function za(e) {
5223
5265
  ariaDescribedById: u,
5224
5266
  draggableNodes: d,
5225
5267
  over: h
5226
- } = je(Dt), {
5227
- role: g = Cr,
5268
+ } = je(Mt), {
5269
+ role: g = kr,
5228
5270
  roleDescription: x = "draggable",
5229
5271
  tabIndex: w = 0
5230
- } = o ?? {}, p = (l == null ? void 0 : l.id) === t, m = je(p ? Qt : Na), [E, A] = $t(), [M, T] = $t(), y = xa(s, t), S = bt(n);
5231
- Ue(
5272
+ } = o ?? {}, p = (l == null ? void 0 : l.id) === t, m = je(p ? Qt : Na), [E, A] = Ht(), [D, T] = Ht(), y = xa(s, t), S = bt(n);
5273
+ Ve(
5232
5274
  () => (d.set(t, {
5233
5275
  id: t,
5234
5276
  key: i,
5235
5277
  node: E,
5236
- activatorNode: M,
5278
+ activatorNode: D,
5237
5279
  data: S
5238
5280
  }), () => {
5239
5281
  const L = d.get(t);
@@ -5246,7 +5288,7 @@ function za(e) {
5246
5288
  role: g,
5247
5289
  tabIndex: w,
5248
5290
  "aria-disabled": r,
5249
- "aria-pressed": p && g === Cr ? !0 : void 0,
5291
+ "aria-pressed": p && g === kr ? !0 : void 0,
5250
5292
  "aria-roledescription": x,
5251
5293
  "aria-describedby": u.draggable
5252
5294
  }), [r, g, w, p, x, u.draggable]);
@@ -5282,7 +5324,7 @@ function To(e) {
5282
5324
  dispatch: a,
5283
5325
  over: l,
5284
5326
  measureDroppableContainers: c
5285
- } = je(Dt), u = G({
5327
+ } = je(Mt), u = G({
5286
5328
  disabled: n
5287
5329
  }), d = G(!1), h = G(null), g = G(null), {
5288
5330
  disabled: x,
@@ -5306,9 +5348,9 @@ function To(e) {
5306
5348
  ), A = Jt({
5307
5349
  callback: E,
5308
5350
  disabled: x || !s
5309
- }), M = N((v, L) => {
5351
+ }), D = N((v, L) => {
5310
5352
  A && (L && (A.unobserve(L), d.current = !1), v && A.observe(v));
5311
- }, [A]), [T, y] = $t(M), S = bt(t);
5353
+ }, [A]), [T, y] = Ht(D), S = bt(t);
5312
5354
  return W(() => {
5313
5355
  !A || !T.current || (A.disconnect(), d.current = !1, A.observe(T.current));
5314
5356
  }, [T, A]), W(
@@ -5345,13 +5387,13 @@ function To(e) {
5345
5387
  setNodeRef: y
5346
5388
  };
5347
5389
  }
5348
- function $a(e) {
5390
+ function Ha(e) {
5349
5391
  let {
5350
5392
  animation: t,
5351
5393
  children: n
5352
5394
  } = e;
5353
- const [r, o] = H(null), [i, s] = H(null), a = Bt(n);
5354
- return !n && !r && a && o(a), Ue(() => {
5395
+ const [r, o] = B(null), [i, s] = B(null), a = $t(n);
5396
+ return !n && !r && a && o(a), Ve(() => {
5355
5397
  if (!i)
5356
5398
  return;
5357
5399
  const l = r == null ? void 0 : r.key, c = r == null ? void 0 : r.props.id;
@@ -5366,26 +5408,26 @@ function $a(e) {
5366
5408
  ref: s
5367
5409
  }) : null);
5368
5410
  }
5369
- const Ba = {
5411
+ const $a = {
5370
5412
  x: 0,
5371
5413
  y: 0,
5372
5414
  scaleX: 1,
5373
5415
  scaleY: 1
5374
5416
  };
5375
- function Ha(e) {
5417
+ function Ba(e) {
5376
5418
  let {
5377
5419
  children: t
5378
5420
  } = e;
5379
- return te.createElement(Dt.Provider, {
5380
- value: Mo
5421
+ return te.createElement(Mt.Provider, {
5422
+ value: Do
5381
5423
  }, te.createElement(Qt.Provider, {
5382
- value: Ba
5424
+ value: $a
5383
5425
  }, t));
5384
5426
  }
5385
- const Ua = {
5427
+ const Va = {
5386
5428
  position: "fixed",
5387
5429
  touchAction: "none"
5388
- }, Va = (e) => Gn(e) ? "transform 250ms ease" : void 0, Ga = /* @__PURE__ */ In((e, t) => {
5430
+ }, Ua = (e) => Gn(e) ? "transform 250ms ease" : void 0, Ga = /* @__PURE__ */ In((e, t) => {
5389
5431
  let {
5390
5432
  as: n,
5391
5433
  activatorEvent: r,
@@ -5395,7 +5437,7 @@ const Ua = {
5395
5437
  rect: a,
5396
5438
  style: l,
5397
5439
  transform: c,
5398
- transition: u = Va
5440
+ transition: u = Ua
5399
5441
  } = e;
5400
5442
  if (!a)
5401
5443
  return null;
@@ -5404,7 +5446,7 @@ const Ua = {
5404
5446
  scaleX: 1,
5405
5447
  scaleY: 1
5406
5448
  }, h = {
5407
- ...Ua,
5449
+ ...Va,
5408
5450
  width: a.width,
5409
5451
  height: a.height,
5410
5452
  top: a.top,
@@ -5479,12 +5521,12 @@ function Ya(e) {
5479
5521
  const l = a.node.current;
5480
5522
  if (!l)
5481
5523
  return;
5482
- const c = Do(s);
5524
+ const c = Mo(s);
5483
5525
  if (!c)
5484
5526
  return;
5485
5527
  const {
5486
5528
  transform: u
5487
- } = ke(s).getComputedStyle(s), d = vo(u);
5529
+ } = Ce(s).getComputedStyle(s), d = vo(u);
5488
5530
  if (!d)
5489
5531
  return;
5490
5532
  const h = typeof t == "function" ? t : Ka(t);
@@ -5592,7 +5634,7 @@ const Ja = /* @__PURE__ */ te.memo((e) => {
5592
5634
  over: m,
5593
5635
  measuringConfiguration: E,
5594
5636
  scrollableAncestors: A,
5595
- scrollableAncestorRects: M,
5637
+ scrollableAncestorRects: D,
5596
5638
  windowRect: T
5597
5639
  } = Fa(), y = je(Qt), S = Xa(d == null ? void 0 : d.id), v = Ro(s, {
5598
5640
  activatorEvent: u,
@@ -5603,7 +5645,7 @@ const Ja = /* @__PURE__ */ te.memo((e) => {
5603
5645
  over: m,
5604
5646
  overlayNodeRect: p.rect,
5605
5647
  scrollableAncestors: A,
5606
- scrollableAncestorRects: M,
5648
+ scrollableAncestorRects: D,
5607
5649
  transform: y,
5608
5650
  windowRect: T
5609
5651
  }), L = Jn(h), b = Ya({
@@ -5611,13 +5653,13 @@ const Ja = /* @__PURE__ */ te.memo((e) => {
5611
5653
  draggableNodes: x,
5612
5654
  droppableContainers: w,
5613
5655
  measuringConfiguration: E
5614
- }), D = L ? p.setRef : void 0;
5615
- return te.createElement(Ha, null, te.createElement($a, {
5656
+ }), M = L ? p.setRef : void 0;
5657
+ return te.createElement(Ba, null, te.createElement(Ha, {
5616
5658
  animation: b
5617
5659
  }, d && S ? te.createElement(Ga, {
5618
5660
  key: S,
5619
5661
  id: d.id,
5620
- ref: D,
5662
+ ref: M,
5621
5663
  as: a,
5622
5664
  activatorEvent: u,
5623
5665
  adjustScale: t,
@@ -5637,7 +5679,7 @@ function Gt(e) {
5637
5679
  const t = e.data.current;
5638
5680
  return !!(t && "sortable" in t && typeof t.sortable == "object" && "containerId" in t.sortable && "items" in t.sortable && "index" in t.sortable);
5639
5681
  }
5640
- const Qa = [U.Down, U.Right, U.Up, U.Left], Za = (e, t) => {
5682
+ const Qa = [V.Down, V.Right, V.Up, V.Left], Za = (e, t) => {
5641
5683
  let {
5642
5684
  context: {
5643
5685
  active: n,
@@ -5658,16 +5700,16 @@ const Qa = [U.Down, U.Right, U.Up, U.Left], Za = (e, t) => {
5658
5700
  const h = o.get(d.id);
5659
5701
  if (h)
5660
5702
  switch (e.code) {
5661
- case U.Down:
5703
+ case V.Down:
5662
5704
  r.top < h.top && l.push(d);
5663
5705
  break;
5664
- case U.Up:
5706
+ case V.Up:
5665
5707
  r.top > h.top && l.push(d);
5666
5708
  break;
5667
- case U.Left:
5709
+ case V.Left:
5668
5710
  r.left > h.left && l.push(d);
5669
5711
  break;
5670
- case U.Right:
5712
+ case V.Right:
5671
5713
  r.left < h.left && l.push(d);
5672
5714
  break;
5673
5715
  }
@@ -5687,11 +5729,11 @@ const Qa = [U.Down, U.Right, U.Up, U.Left], Za = (e, t) => {
5687
5729
  } : {
5688
5730
  x: E ? r.width - g.width : 0,
5689
5731
  y: E ? r.height - g.height : 0
5690
- }, M = {
5732
+ }, D = {
5691
5733
  x: g.left,
5692
5734
  y: g.top
5693
5735
  };
5694
- return A.x && A.y ? M : wt(M, A);
5736
+ return A.x && A.y ? D : wt(D, A);
5695
5737
  }
5696
5738
  }
5697
5739
  }
@@ -5716,7 +5758,7 @@ function tl(e) {
5716
5758
  onDropIntoGroupAtPosition: o,
5717
5759
  onRemoveFromGroup: i,
5718
5760
  findParentGroup: s
5719
- } = e, [a, l] = H(null), [c, u] = H(null), [d, h] = H(null), g = G(null), x = Is(
5761
+ } = e, [a, l] = B(null), [c, u] = B(null), [d, h] = B(null), g = G(null), x = Is(
5720
5762
  fr(Xn, {
5721
5763
  activationConstraint: {
5722
5764
  distance: 5
@@ -5752,15 +5794,15 @@ function tl(e) {
5752
5794
  }
5753
5795
  const L = String(y.id), b = String(S.id);
5754
5796
  if (b.startsWith("group-footer::")) {
5755
- const D = b.replace("group-footer::", ""), R = s == null ? void 0 : s(L);
5756
- R && R.id === D ? i == null || i(L) : t(L, D, "before"), E();
5797
+ const M = b.replace("group-footer::", ""), R = s == null ? void 0 : s(L);
5798
+ R && R.id === M ? i == null || i(L) : t(L, M, "before"), E();
5757
5799
  return;
5758
5800
  }
5759
5801
  if (v === "into")
5760
5802
  r == null || r(L, b);
5761
5803
  else {
5762
- const D = v === "before" ? "after" : "before", R = s == null ? void 0 : s(L), F = s == null ? void 0 : s(b);
5763
- R && F && R.id === F.id ? n == null || n(L, b, D, R.id) : !R && F && o ? o(L, F.id, b, D) : t(L, b, D);
5804
+ const M = v === "before" ? "after" : "before", R = s == null ? void 0 : s(L), F = s == null ? void 0 : s(b);
5805
+ R && F && R.id === F.id ? n == null || n(L, b, M, R.id) : !R && F && o ? o(L, F.id, b, M) : t(L, b, M);
5764
5806
  }
5765
5807
  E();
5766
5808
  },
@@ -5773,7 +5815,7 @@ function tl(e) {
5773
5815
  s,
5774
5816
  E
5775
5817
  ]
5776
- ), M = N(() => {
5818
+ ), D = N(() => {
5777
5819
  E();
5778
5820
  }, [E]);
5779
5821
  return {
@@ -5785,14 +5827,14 @@ function tl(e) {
5785
5827
  onDragMove: m,
5786
5828
  onDragOver: p,
5787
5829
  onDragEnd: A,
5788
- onDragCancel: M
5830
+ onDragCancel: D
5789
5831
  };
5790
5832
  }
5791
5833
  const nl = (e) => {
5792
5834
  var h, g;
5793
5835
  const { pointerCoordinates: t, droppableContainers: n, droppableRects: r } = e;
5794
- let o = Bs(e);
5795
- if (o.length === 0 && (o = zs(e)), o.length === 0 || !t) return o;
5836
+ let o = $s(e);
5837
+ if (o.length === 0 && (o = Os(e)), o.length === 0 || !t) return o;
5796
5838
  const i = o[0];
5797
5839
  if (String(i.id).startsWith("group-footer::"))
5798
5840
  return [{ ...i, data: { ...i.data, zone: "after" } }];
@@ -5818,11 +5860,11 @@ const nl = (e) => {
5818
5860
  onDelete: u,
5819
5861
  deleteSuppressed: d
5820
5862
  }) => {
5821
- const { attributes: h, listeners: g, setNodeRef: x, isDragging: w } = za({ id: e.id }), { setNodeRef: p } = To({ id: e.id, data: { isGroup: !!e.isGroup } }), m = N((L) => {
5863
+ const { attributes: h, listeners: g, setNodeRef: x, isDragging: w } = Oa({ id: e.id }), { setNodeRef: p } = To({ id: e.id, data: { isGroup: !!e.isGroup } }), m = N((L) => {
5822
5864
  x(L), p(L);
5823
- }, [x, p]), E = e.isGroup, A = e.depth > 0, M = A ? e.depth * 24 : 0, T = {
5865
+ }, [x, p]), E = e.isGroup, A = e.depth > 0, D = A ? e.depth * 24 : 0, T = {
5824
5866
  opacity: w ? 0.3 : 1,
5825
- paddingLeft: M + 8,
5867
+ paddingLeft: D + 8,
5826
5868
  paddingRight: 8,
5827
5869
  paddingTop: E ? 6 : 8,
5828
5870
  paddingBottom: E ? 6 : 8,
@@ -5862,13 +5904,13 @@ const nl = (e) => {
5862
5904
  color: "var(--text-secondary, #888)",
5863
5905
  opacity: 0.6
5864
5906
  },
5865
- children: /* @__PURE__ */ f(B, { icon: "lucide:grip-vertical", style: { fontSize: 24 } })
5907
+ children: /* @__PURE__ */ f($, { icon: "lucide:grip-vertical", style: { fontSize: 24 } })
5866
5908
  }
5867
5909
  );
5868
5910
  return E ? /* @__PURE__ */ j("div", { ref: m, style: T, ...h, children: [
5869
5911
  v,
5870
5912
  /* @__PURE__ */ f(
5871
- B,
5913
+ $,
5872
5914
  {
5873
5915
  icon: "lucide:folder-open",
5874
5916
  style: { fontSize: 18, color: "var(--text-secondary, #888)", flexShrink: 0 }
@@ -5892,12 +5934,12 @@ const nl = (e) => {
5892
5934
  }
5893
5935
  ),
5894
5936
  !r && !d && (!e.children || e.children.length === 0) && /* @__PURE__ */ f("div", { style: { display: "flex", gap: 4, flexShrink: 0 }, children: /* @__PURE__ */ f(
5895
- He,
5937
+ Be,
5896
5938
  {
5897
5939
  title: "Delete Group",
5898
5940
  onClick: () => u(e.id),
5899
5941
  style: { color: "var(--error, #ef4444)" },
5900
- children: /* @__PURE__ */ f(B, { icon: V.trash, className: "sc:size-6" })
5942
+ children: /* @__PURE__ */ f($, { icon: U.trash, className: "sc:size-6" })
5901
5943
  }
5902
5944
  ) })
5903
5945
  ] }) : /* @__PURE__ */ j("div", { ref: m, style: T, ...h, children: [
@@ -5937,42 +5979,42 @@ const nl = (e) => {
5937
5979
  ...y
5938
5980
  },
5939
5981
  onClick: S,
5940
- children: /* @__PURE__ */ f(B, { icon: V.fileText })
5982
+ children: /* @__PURE__ */ f($, { icon: U.fileText })
5941
5983
  }
5942
5984
  ),
5943
5985
  /* @__PURE__ */ f("div", { style: { flex: 1, minWidth: 0 }, onClick: S }),
5944
5986
  !r && /* @__PURE__ */ j("div", { style: { display: "flex", gap: 4, flexShrink: 0 }, children: [
5945
5987
  /* @__PURE__ */ f(
5946
- He,
5988
+ Be,
5947
5989
  {
5948
5990
  title: e.visible ? "Hide" : "Show",
5949
5991
  onClick: () => a(e.id),
5950
5992
  style: { opacity: e.visible ? 1 : 0.4 },
5951
- children: /* @__PURE__ */ f(B, { icon: e.visible ? V.eye : V.eyeOff, className: "sc:size-6" })
5993
+ children: /* @__PURE__ */ f($, { icon: e.visible ? U.eye : U.eyeOff, className: "sc:size-6" })
5952
5994
  }
5953
5995
  ),
5954
5996
  /* @__PURE__ */ f(
5955
- He,
5997
+ Be,
5956
5998
  {
5957
5999
  title: e.locked ? "Unlock" : "Lock",
5958
6000
  onClick: () => l(e.id),
5959
6001
  style: { opacity: e.locked ? 1 : 0.4 },
5960
- children: /* @__PURE__ */ f(B, { icon: e.locked ? V.lock : V.lockOpen, className: "sc:size-6" })
6002
+ children: /* @__PURE__ */ f($, { icon: e.locked ? U.lock : U.lockOpen, className: "sc:size-6" })
5961
6003
  }
5962
6004
  ),
5963
- /* @__PURE__ */ f(He, { title: "Duplicate", onClick: () => c(e.id), children: /* @__PURE__ */ f(B, { icon: V.copy, className: "sc:size-6" }) }),
6005
+ /* @__PURE__ */ f(Be, { title: "Duplicate", onClick: () => c(e.id), children: /* @__PURE__ */ f($, { icon: U.copy, className: "sc:size-6" }) }),
5964
6006
  !d && /* @__PURE__ */ f(
5965
- He,
6007
+ Be,
5966
6008
  {
5967
6009
  title: "Delete",
5968
6010
  onClick: () => u(e.id),
5969
6011
  style: { color: "var(--error, #ef4444)" },
5970
- children: /* @__PURE__ */ f(B, { icon: V.trash, className: "sc:size-6" })
6012
+ children: /* @__PURE__ */ f($, { icon: U.trash, className: "sc:size-6" })
5971
6013
  }
5972
6014
  )
5973
6015
  ] })
5974
6016
  ] });
5975
- }, He = ({ title: e, onClick: t, style: n, children: r }) => /* @__PURE__ */ f(
6017
+ }, Be = ({ title: e, onClick: t, style: n, children: r }) => /* @__PURE__ */ f(
5976
6018
  "button",
5977
6019
  {
5978
6020
  onClick: (o) => {
@@ -6022,7 +6064,7 @@ const nl = (e) => {
6022
6064
  opacity: 0.9
6023
6065
  },
6024
6066
  children: [
6025
- e.isGroup ? /* @__PURE__ */ f(B, { icon: "lucide:folder-open", style: { fontSize: 18, color: "var(--text-secondary, #888)" } }) : t && e.previewUrl ? /* @__PURE__ */ f(
6067
+ e.isGroup ? /* @__PURE__ */ f($, { icon: "lucide:folder-open", style: { fontSize: 18, color: "var(--text-secondary, #888)" } }) : t && e.previewUrl ? /* @__PURE__ */ f(
6026
6068
  "img",
6027
6069
  {
6028
6070
  src: e.previewUrl,
@@ -6049,7 +6091,7 @@ const nl = (e) => {
6049
6091
  border: "1px solid var(--border-primary, #e5e5e5)",
6050
6092
  borderRadius: 4
6051
6093
  },
6052
- children: /* @__PURE__ */ f(B, { icon: V.fileText })
6094
+ children: /* @__PURE__ */ f($, { icon: U.fileText })
6053
6095
  }
6054
6096
  ),
6055
6097
  /* @__PURE__ */ f("span", { style: { fontSize: 13, color: "var(--foreground, #333)" }, children: e.name })
@@ -6074,22 +6116,22 @@ const nl = (e) => {
6074
6116
  toggleLock: m,
6075
6117
  deleteLayer: E,
6076
6118
  duplicateLayer: A,
6077
- reorderById: M,
6119
+ reorderById: D,
6078
6120
  reorderWithinGroup: T,
6079
6121
  addToGroup: y,
6080
6122
  removeFromGroup: S,
6081
6123
  createEmptyGroup: v,
6082
6124
  findElementById: L,
6083
6125
  findParentGroup: b,
6084
- generateAllPreviews: D
6126
+ generateAllPreviews: M
6085
6127
  } = ni({
6086
6128
  ...l,
6087
6129
  previewSize: h,
6088
6130
  previewBackgroundColor: u
6089
6131
  });
6090
6132
  W(() => {
6091
- n && x.length > 0 && D();
6092
- }, [n, x.length, u, D]);
6133
+ n && x.length > 0 && M();
6134
+ }, [n, x.length, u, M]);
6093
6135
  const R = qo(), F = N(
6094
6136
  (Q) => {
6095
6137
  var se;
@@ -6097,17 +6139,17 @@ const nl = (e) => {
6097
6139
  },
6098
6140
  [R, L]
6099
6141
  ), X = q(() => {
6100
- const Q = /* @__PURE__ */ new Map(), se = ($) => {
6101
- for (const xe of $)
6142
+ const Q = /* @__PURE__ */ new Map(), se = (H) => {
6143
+ for (const xe of H)
6102
6144
  Q.set(xe.id, xe), xe.children && se(xe.children);
6103
6145
  };
6104
6146
  return se(g), Q;
6105
6147
  }, [g]), pe = N(
6106
- (Q, se, $) => {
6107
- const xe = b(Q), Ce = b(se);
6108
- xe && !Ce ? S(Q, se, $) : M(Q, se, $);
6148
+ (Q, se, H) => {
6149
+ const xe = b(Q), ke = b(se);
6150
+ xe && !ke ? S(Q, se, H) : D(Q, se, H);
6109
6151
  },
6110
- [b, S, M]
6152
+ [b, S, D]
6111
6153
  ), J = tl({
6112
6154
  onReorder: pe,
6113
6155
  onDropIntoGroup: y,
@@ -6115,13 +6157,13 @@ const nl = (e) => {
6115
6157
  onGroupReorder: T,
6116
6158
  onRemoveFromGroup: S,
6117
6159
  findParentGroup: b
6118
- }), re = (Q) => [...Q].reverse().map(($) => /* @__PURE__ */ j(te.Fragment, { children: [
6160
+ }), re = (Q) => [...Q].reverse().map((H) => /* @__PURE__ */ j(te.Fragment, { children: [
6119
6161
  /* @__PURE__ */ f(
6120
6162
  rl,
6121
6163
  {
6122
- layer: $,
6123
- isOver: J.overId === $.id,
6124
- dropPosition: J.overId === $.id ? J.dropPosition : null,
6164
+ layer: H,
6165
+ isOver: J.overId === H.id,
6166
+ dropPosition: J.overId === H.id ? J.dropPosition : null,
6125
6167
  isDragActive: !!J.activeId,
6126
6168
  showPreviewImages: n,
6127
6169
  previewDisplaySize: d,
@@ -6130,23 +6172,23 @@ const nl = (e) => {
6130
6172
  onToggleLock: m,
6131
6173
  onDuplicate: A,
6132
6174
  onDelete: E,
6133
- deleteSuppressed: F($)
6175
+ deleteSuppressed: F(H)
6134
6176
  }
6135
6177
  ),
6136
- $.children && re($.children),
6137
- $.isGroup && /* @__PURE__ */ f(
6178
+ H.children && re(H.children),
6179
+ H.isGroup && /* @__PURE__ */ f(
6138
6180
  ol,
6139
6181
  {
6140
- groupId: $.id,
6141
- isOver: J.overId === `group-footer::${$.id}`,
6142
- depth: $.depth
6182
+ groupId: H.id,
6183
+ isOver: J.overId === `group-footer::${H.id}`,
6184
+ depth: H.depth
6143
6185
  }
6144
6186
  )
6145
- ] }, $.id)), Y = (Q) => [...Q].reverse().map(($) => /* @__PURE__ */ j(te.Fragment, { children: [
6187
+ ] }, H.id)), Y = (Q) => [...Q].reverse().map((H) => /* @__PURE__ */ j(te.Fragment, { children: [
6146
6188
  /* @__PURE__ */ f(
6147
6189
  al,
6148
6190
  {
6149
- layer: $,
6191
+ layer: H,
6150
6192
  showPreviewImages: n,
6151
6193
  previewDisplaySize: d,
6152
6194
  onSelect: w,
@@ -6154,19 +6196,19 @@ const nl = (e) => {
6154
6196
  onToggleLock: m,
6155
6197
  onDuplicate: A,
6156
6198
  onDelete: E,
6157
- deleteSuppressed: F($)
6199
+ deleteSuppressed: F(H)
6158
6200
  }
6159
6201
  ),
6160
- $.children && Y($.children)
6161
- ] }, $.id)), ee = J.activeId ? X.get(J.activeId) : null, { width: ge, height: we, flex: oe, ...ue } = i, Oe = ge || (s.includes("w-full") ? "100%" : e ? `${e}px` : void 0), Se = t || we || void 0, ze = oe !== void 0 ? oe : Se === "100%" || Se === "100vh" ? 1 : void 0;
6202
+ H.children && Y(H.children)
6203
+ ] }, H.id)), ee = J.activeId ? X.get(J.activeId) : null, { width: ge, height: we, flex: oe, ...ue } = i, ze = ge || (s.includes("w-full") ? "100%" : e ? `${e}px` : void 0), Se = t || we || void 0, Oe = oe !== void 0 ? oe : Se === "100%" || Se === "100vh" ? 1 : void 0;
6162
6204
  return /* @__PURE__ */ j(
6163
6205
  "div",
6164
6206
  {
6165
6207
  className: `sc-layers-panel ${s}`,
6166
6208
  style: {
6167
- width: Oe,
6209
+ width: ze,
6168
6210
  height: Se,
6169
- flex: ze,
6211
+ flex: Oe,
6170
6212
  display: "flex",
6171
6213
  flexDirection: "column",
6172
6214
  backgroundColor: "transparent",
@@ -6211,7 +6253,7 @@ const nl = (e) => {
6211
6253
  gap: 4
6212
6254
  },
6213
6255
  children: [
6214
- /* @__PURE__ */ f(B, { icon: "lucide:folder-plus", style: { fontSize: 16 } }),
6256
+ /* @__PURE__ */ f($, { icon: "lucide:folder-plus", style: { fontSize: 16 } }),
6215
6257
  "Add Group"
6216
6258
  ]
6217
6259
  }
@@ -6283,7 +6325,7 @@ const nl = (e) => {
6283
6325
  cursor: "pointer"
6284
6326
  };
6285
6327
  return (c || e.isGroup) && (h.backgroundColor = "var(--surface-secondary, rgba(0,0,0,0.04))"), e.isGroup ? /* @__PURE__ */ j("div", { style: h, children: [
6286
- /* @__PURE__ */ f(B, { icon: "lucide:folder-open", style: { fontSize: 18, color: "var(--text-secondary, #888)" } }),
6328
+ /* @__PURE__ */ f($, { icon: "lucide:folder-open", style: { fontSize: 18, color: "var(--text-secondary, #888)" } }),
6287
6329
  /* @__PURE__ */ f("span", { onClick: () => r(e.id), style: { fontSize: 13, fontWeight: 600, flex: 1 }, children: e.name })
6288
6330
  ] }, e.id) : /* @__PURE__ */ j("div", { style: h, children: [
6289
6331
  t && e.previewUrl ? /* @__PURE__ */ f(
@@ -6319,37 +6361,37 @@ const nl = (e) => {
6319
6361
  ...d
6320
6362
  },
6321
6363
  onClick: () => r(e.id),
6322
- children: /* @__PURE__ */ f(B, { icon: V.fileText })
6364
+ children: /* @__PURE__ */ f($, { icon: U.fileText })
6323
6365
  }
6324
6366
  ),
6325
6367
  /* @__PURE__ */ f("div", { style: { flex: 1 }, onClick: () => r(e.id) }),
6326
6368
  /* @__PURE__ */ j("div", { style: { display: "flex", gap: 4 }, children: [
6327
6369
  /* @__PURE__ */ f(
6328
- He,
6370
+ Be,
6329
6371
  {
6330
6372
  title: e.visible ? "Hide" : "Show",
6331
6373
  onClick: () => o(e.id),
6332
6374
  style: { opacity: e.visible ? 1 : 0.4 },
6333
- children: /* @__PURE__ */ f(B, { icon: e.visible ? V.eye : V.eyeOff, className: "sc:size-6" })
6375
+ children: /* @__PURE__ */ f($, { icon: e.visible ? U.eye : U.eyeOff, className: "sc:size-6" })
6334
6376
  }
6335
6377
  ),
6336
6378
  /* @__PURE__ */ f(
6337
- He,
6379
+ Be,
6338
6380
  {
6339
6381
  title: e.locked ? "Unlock" : "Lock",
6340
6382
  onClick: () => i(e.id),
6341
6383
  style: { opacity: e.locked ? 1 : 0.4 },
6342
- children: /* @__PURE__ */ f(B, { icon: e.locked ? V.lock : V.lockOpen, className: "sc:size-6" })
6384
+ children: /* @__PURE__ */ f($, { icon: e.locked ? U.lock : U.lockOpen, className: "sc:size-6" })
6343
6385
  }
6344
6386
  ),
6345
- /* @__PURE__ */ f(He, { title: "Duplicate", onClick: () => s(e.id), children: /* @__PURE__ */ f(B, { icon: V.copy, className: "sc:size-6" }) }),
6387
+ /* @__PURE__ */ f(Be, { title: "Duplicate", onClick: () => s(e.id), children: /* @__PURE__ */ f($, { icon: U.copy, className: "sc:size-6" }) }),
6346
6388
  !l && /* @__PURE__ */ f(
6347
- He,
6389
+ Be,
6348
6390
  {
6349
6391
  title: "Delete",
6350
6392
  onClick: () => a(e.id),
6351
6393
  style: { color: "var(--error, #ef4444)" },
6352
- children: /* @__PURE__ */ f(B, { icon: V.trash, className: "sc:size-6" })
6394
+ children: /* @__PURE__ */ f($, { icon: U.trash, className: "sc:size-6" })
6353
6395
  }
6354
6396
  )
6355
6397
  ] })
@@ -6487,7 +6529,7 @@ function Zt(e, t) {
6487
6529
  return r.registerPart(o, e, a);
6488
6530
  }, [r, o, e, a]);
6489
6531
  }
6490
- function $l(e) {
6532
+ function Hl(e) {
6491
6533
  return {
6492
6534
  reportInvariant(t) {
6493
6535
  if (Ko()) throw t;
@@ -6520,7 +6562,7 @@ function cl(e) {
6520
6562
  return Rr(e.subscribe, n, n);
6521
6563
  }
6522
6564
  function dl(e) {
6523
- return e === "image" ? V.image : e === "shape" ? V.shapes : e === "group" ? "lucide:folder-open" : V.text;
6565
+ return e === "image" ? U.image : e === "shape" ? U.shapes : e === "group" ? "lucide:folder-open" : U.text;
6524
6566
  }
6525
6567
  function ul({
6526
6568
  store: e,
@@ -6550,7 +6592,7 @@ function ul({
6550
6592
  opacity: o.visible ? 1 : 0.4
6551
6593
  },
6552
6594
  children: [
6553
- /* @__PURE__ */ f(B, { icon: dl(o.kind), style: { fontSize: 18, color: "var(--text-secondary, #888)", flexShrink: 0 } }),
6595
+ /* @__PURE__ */ f($, { icon: dl(o.kind), style: { fontSize: 18, color: "var(--text-secondary, #888)", flexShrink: 0 } }),
6554
6596
  /* @__PURE__ */ f(
6555
6597
  "span",
6556
6598
  {
@@ -6571,7 +6613,7 @@ function ul({
6571
6613
  }
6572
6614
  );
6573
6615
  }
6574
- function Bl({
6616
+ function $l({
6575
6617
  direction: e = "vertical",
6576
6618
  className: t,
6577
6619
  style: n
@@ -6585,7 +6627,7 @@ function Bl({
6585
6627
  );
6586
6628
  return /* @__PURE__ */ f("div", { "data-sc-part": "layers", "data-sc-direction": e, className: t, style: n, children: i ? /* @__PURE__ */ f(sl, { style: { width: "100%" } }) : /* @__PURE__ */ f(ul, { store: r.store, direction: e }) });
6587
6629
  }
6588
- const Oo = ({
6630
+ const zo = ({
6589
6631
  trigger: e,
6590
6632
  children: t,
6591
6633
  isOpen: n,
@@ -6597,30 +6639,30 @@ const Oo = ({
6597
6639
  className: l = "",
6598
6640
  contentClassName: c = ""
6599
6641
  }) => {
6600
- const u = G(null), d = G(null), h = G(null), [g, x] = H({}), [w, p] = H(!1), m = (A) => {
6642
+ const u = G(null), d = G(null), h = G(null), [g, x] = B({}), [w, p] = B(!1), m = (A) => {
6601
6643
  A.stopPropagation(), !n && a && es.protectNextClick(), r(!n);
6602
6644
  };
6603
6645
  W(() => {
6604
6646
  if (!n) return;
6605
6647
  let A = () => {
6606
6648
  };
6607
- const M = setTimeout(() => {
6649
+ const D = setTimeout(() => {
6608
6650
  const T = (y) => {
6609
- var b, D;
6610
- const S = y.target, v = (b = u.current) == null ? void 0 : b.contains(S), L = (D = h.current) == null ? void 0 : D.contains(S);
6651
+ var b, M;
6652
+ const S = y.target, v = (b = u.current) == null ? void 0 : b.contains(S), L = (M = h.current) == null ? void 0 : M.contains(S);
6611
6653
  !v && !L && r(!1);
6612
6654
  };
6613
6655
  document.addEventListener("mousedown", T), A = () => document.removeEventListener("mousedown", T);
6614
6656
  }, 0);
6615
6657
  return () => {
6616
- clearTimeout(M), A();
6658
+ clearTimeout(D), A();
6617
6659
  };
6618
6660
  }, [n, r]), W(() => {
6619
6661
  if (!n) return;
6620
- const A = (M) => {
6662
+ const A = (D) => {
6621
6663
  var T;
6622
- if (M.key === "Escape") {
6623
- M.stopPropagation(), M.preventDefault(), r(!1);
6664
+ if (D.key === "Escape") {
6665
+ D.stopPropagation(), D.preventDefault(), r(!1);
6624
6666
  const y = (T = d.current) == null ? void 0 : T.querySelector(
6625
6667
  'button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])'
6626
6668
  );
@@ -6633,19 +6675,19 @@ const Oo = ({
6633
6675
  }, [n]), W(() => {
6634
6676
  if (!n || !d.current || !h.current) return;
6635
6677
  requestAnimationFrame(() => {
6636
- const M = d.current, T = h.current;
6637
- if (!M || !T) return;
6638
- const y = M.getBoundingClientRect(), S = T.getBoundingClientRect(), v = window.innerWidth, L = window.innerHeight, b = 16;
6639
- let D = 0, R = 0;
6640
- if (o === "bottom" || o === "top" ? (o === "bottom" ? D = y.bottom + s : D = y.top - S.height - s, i === "start" ? R = y.left : i === "end" ? R = y.right - S.width : i === "center" && (R = y.left + (y.width - S.width) / 2)) : (o === "left" || o === "right") && (o === "left" ? R = y.left - S.width - s : R = y.right + s, i === "start" ? D = y.top : i === "end" ? D = y.bottom - S.height : i === "center" && (D = y.top + (y.height - S.height) / 2)), i !== "end" && R + S.width > v - b && (R = v - S.width - b), R < b && (R = b), D + S.height > L - b) {
6678
+ const D = d.current, T = h.current;
6679
+ if (!D || !T) return;
6680
+ const y = D.getBoundingClientRect(), S = T.getBoundingClientRect(), v = window.innerWidth, L = window.innerHeight, b = 16;
6681
+ let M = 0, R = 0;
6682
+ if (o === "bottom" || o === "top" ? (o === "bottom" ? M = y.bottom + s : M = y.top - S.height - s, i === "start" ? R = y.left : i === "end" ? R = y.right - S.width : i === "center" && (R = y.left + (y.width - S.width) / 2)) : (o === "left" || o === "right") && (o === "left" ? R = y.left - S.width - s : R = y.right + s, i === "start" ? M = y.top : i === "end" ? M = y.bottom - S.height : i === "center" && (M = y.top + (y.height - S.height) / 2)), i !== "end" && R + S.width > v - b && (R = v - S.width - b), R < b && (R = b), M + S.height > L - b) {
6641
6683
  const X = y.top, pe = L - y.bottom;
6642
- X > pe && (D = y.top - S.height - s);
6684
+ X > pe && (M = y.top - S.height - s);
6643
6685
  }
6644
- D < b && (D = b);
6686
+ M < b && (M = b);
6645
6687
  const F = v - b * 2;
6646
6688
  p(!0), x({
6647
6689
  position: "fixed",
6648
- top: `${D}px`,
6690
+ top: `${M}px`,
6649
6691
  left: `${R}px`,
6650
6692
  maxWidth: `${F}px`,
6651
6693
  visibility: "visible"
@@ -6670,7 +6712,7 @@ const Oo = ({
6670
6712
  );
6671
6713
  return /* @__PURE__ */ j("div", { className: `sc:relative sc:inline-flex ${l}`.trim(), ref: u, children: [
6672
6714
  /* @__PURE__ */ f("div", { ref: d, onClick: m, children: e }),
6673
- E && zn(
6715
+ E && On(
6674
6716
  /* @__PURE__ */ f("div", { className: "sc-root", style: { display: "contents" }, children: E }),
6675
6717
  document.body
6676
6718
  )
@@ -6718,13 +6760,13 @@ const Oo = ({
6718
6760
  n && /* @__PURE__ */ f("span", { className: "sc:ml-auto sc:text-sm sc:text-text-muted", children: n }),
6719
6761
  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" }) })
6720
6762
  ] });
6721
- }, zo = [
6722
- { type: "custom", label: "Text", icon: /* @__PURE__ */ f(B, { icon: V.text, className: "sc:size-[18px]" }) },
6723
- { type: "image", label: "Image", icon: /* @__PURE__ */ f(B, { icon: V.image, className: "sc:size-[18px]" }) },
6724
- { type: "shape", label: "Shape", icon: /* @__PURE__ */ f(B, { icon: V.shapes, className: "sc:size-[18px]" }) },
6725
- { type: "circle", label: "Circle Text", icon: /* @__PURE__ */ f(B, { icon: "lucide:circle", className: "sc:size-[18px]" }) },
6726
- { type: "wave", label: "Wave Text", icon: /* @__PURE__ */ f(B, { icon: "lucide:waves", className: "sc:size-[18px]" }) },
6727
- { type: "arch", label: "Arch Text", icon: /* @__PURE__ */ f(B, { icon: "lucide:arrow-up-from-dot", className: "sc:size-[18px]" }) }
6763
+ }, Oo = [
6764
+ { type: "custom", label: "Text", icon: /* @__PURE__ */ f($, { icon: U.text, className: "sc:size-[18px]" }) },
6765
+ { type: "image", label: "Image", icon: /* @__PURE__ */ f($, { icon: U.image, className: "sc:size-[18px]" }) },
6766
+ { type: "shape", label: "Shape", icon: /* @__PURE__ */ f($, { icon: U.shapes, className: "sc:size-[18px]" }) },
6767
+ { type: "circle", label: "Circle Text", icon: /* @__PURE__ */ f($, { icon: "lucide:circle", className: "sc:size-[18px]" }) },
6768
+ { type: "wave", label: "Wave Text", icon: /* @__PURE__ */ f($, { icon: "lucide:waves", className: "sc:size-[18px]" }) },
6769
+ { type: "arch", label: "Arch Text", icon: /* @__PURE__ */ f($, { icon: "lucide:arrow-up-from-dot", className: "sc:size-[18px]" }) }
6728
6770
  ];
6729
6771
  function fl() {
6730
6772
  const [e, t] = te.useState(!1);
@@ -6763,7 +6805,7 @@ const hl = ({
6763
6805
  so,
6764
6806
  {
6765
6807
  open: e,
6766
- onOpenChange: (M) => !M && t(),
6808
+ onOpenChange: (D) => !D && t(),
6767
6809
  children: /* @__PURE__ */ j(
6768
6810
  ao,
6769
6811
  {
@@ -6800,7 +6842,7 @@ const hl = ({
6800
6842
  onClick: t,
6801
6843
  className: "sc:min-w-8 sc:px-2",
6802
6844
  "aria-label": "Close drawer",
6803
- children: /* @__PURE__ */ f(B, { icon: V.close, className: "sc:size-6" })
6845
+ children: /* @__PURE__ */ f($, { icon: U.close, className: "sc:size-6" })
6804
6846
  }
6805
6847
  )
6806
6848
  ] })
@@ -6822,7 +6864,7 @@ const hl = ({
6822
6864
  onClick: t,
6823
6865
  className: "sc:min-w-8 sc:px-2",
6824
6866
  "aria-label": "Close drawer",
6825
- children: /* @__PURE__ */ f(B, { icon: V.close, className: "sc:size-6" })
6867
+ children: /* @__PURE__ */ f($, { icon: U.close, className: "sc:size-6" })
6826
6868
  }
6827
6869
  )
6828
6870
  ] })
@@ -6897,7 +6939,7 @@ const hl = ({
6897
6939
  onClick: t,
6898
6940
  className: "sc:size-11 sc:rounded-full sc:hover:bg-foreground/[0.06] sc:flex sc:items-center sc:justify-center sc:text-foreground/70 sc:-mr-2",
6899
6941
  "aria-label": "Close",
6900
- children: /* @__PURE__ */ f(B, { icon: V.close, className: "sc:size-5" })
6942
+ children: /* @__PURE__ */ f($, { icon: U.close, className: "sc:size-5" })
6901
6943
  }
6902
6944
  )
6903
6945
  ] }),
@@ -6921,7 +6963,7 @@ const hl = ({
6921
6963
  "span",
6922
6964
  {
6923
6965
  className: l ? "sc:text-primary" : "sc:text-foreground/85",
6924
- children: a.reactIcon ? a.reactIcon : /* @__PURE__ */ f(B, { icon: a.icon, className: Tn })
6966
+ children: a.reactIcon ? a.reactIcon : /* @__PURE__ */ f($, { icon: a.icon, className: Tn })
6925
6967
  }
6926
6968
  ),
6927
6969
  /* @__PURE__ */ f(
@@ -6946,15 +6988,15 @@ const hl = ({
6946
6988
  onToggleLayersPanel: t,
6947
6989
  onOpenImageBrowser: n,
6948
6990
  additionalItems: r,
6949
- icon: o = /* @__PURE__ */ f(B, { icon: V.menu, className: "sc:size-6" }),
6991
+ icon: o = /* @__PURE__ */ f($, { icon: U.menu, className: "sc:size-6" }),
6950
6992
  tooltip: i = "Menu",
6951
6993
  className: s
6952
6994
  }) => {
6953
6995
  var S;
6954
- const { get: a } = Tr(), [l, c] = H(!1), [u, d] = H(!1), [h, g] = H(!1), x = G(null), w = async () => {
6996
+ const { get: a } = Tr(), [l, c] = B(!1), [u, d] = B(!1), [h, g] = B(!1), x = G(null), w = async () => {
6955
6997
  try {
6956
- const { ExportManager: v } = await import("./ExportManager-BTcyj4cf.js").then((R) => R.S), { artboardManager: L, elements: b } = a(), D = L.getAllArtboards();
6957
- v.exportToJSON(D, b, L), c(!1);
6998
+ const { ExportManager: v } = await import("./ExportManager-J2xK86uq.js").then((R) => R.S), { artboardManager: L, elements: b } = a(), M = L.getAllArtboards();
6999
+ v.exportToJSON(M, b, L), c(!1);
6958
7000
  } catch (v) {
6959
7001
  mn.error("Failed to save workspace:", v), alert("Failed to save workspace. Please try again.");
6960
7002
  }
@@ -6966,9 +7008,9 @@ const hl = ({
6966
7008
  const L = (b = v.target.files) == null ? void 0 : b[0];
6967
7009
  if (L) {
6968
7010
  try {
6969
- const D = await on.importFromJSON(L);
6970
- if (D.success && D.artboards && D.elements) {
6971
- const R = on.validateImportedData(D.artboards, D.elements);
7011
+ const M = await on.importFromJSON(L);
7012
+ if (M.success && M.artboards && M.elements) {
7013
+ const R = on.validateImportedData(M.artboards, M.elements);
6972
7014
  if (!R.valid && !confirm(
6973
7015
  `Found ${R.errors.length} issue(s) in the file:
6974
7016
 
@@ -6979,7 +7021,7 @@ const hl = ({
6979
7021
  Do you want to load anyway?`
6980
7022
  ))
6981
7023
  return;
6982
- const F = on.getImportSummary(D.artboards, D.elements);
7024
+ const F = on.getImportSummary(M.artboards, M.elements);
6983
7025
  confirm(
6984
7026
  `Load workspace with:
6985
7027
 
@@ -6987,11 +7029,11 @@ Do you want to load anyway?`
6987
7029
  • ${F.elementCount} element(s)
6988
7030
 
6989
7031
  This will replace your current workspace. Continue?`
6990
- ) && a().handleLoadWorkspace(D.artboards, D.elements, D.activeArtboardId || null);
7032
+ ) && a().handleLoadWorkspace(M.artboards, M.elements, M.activeArtboardId || null);
6991
7033
  } else
6992
- alert(`Failed to load: ${D.error || "Unknown error"}`);
6993
- } catch (D) {
6994
- mn.error("Failed to load workspace:", D), alert("Failed to load workspace. Please check the file and try again.");
7034
+ alert(`Failed to load: ${M.error || "Unknown error"}`);
7035
+ } catch (M) {
7036
+ mn.error("Failed to load workspace:", M), alert("Failed to load workspace. Please check the file and try again.");
6995
7037
  }
6996
7038
  x.current && (x.current.value = "");
6997
7039
  }
@@ -7001,14 +7043,14 @@ This will replace your current workspace. Continue?`
7001
7043
  alert("Canvas not available for export");
7002
7044
  return;
7003
7045
  }
7004
- const D = v.getActiveArtboard();
7005
- if (!D) {
7046
+ const M = v.getActiveArtboard();
7047
+ if (!M) {
7006
7048
  alert("No active artboard to export");
7007
7049
  return;
7008
7050
  }
7009
7051
  try {
7010
- const { ExportManager: R } = await import("./ExportManager-BTcyj4cf.js").then((F) => F.S);
7011
- await R.exportArtboardToImage(D, L, b.current, {
7052
+ const { ExportManager: R } = await import("./ExportManager-J2xK86uq.js").then((F) => F.S);
7053
+ await R.exportArtboardToImage(M, L, b.current, {
7012
7054
  format: "png",
7013
7055
  scale: 2,
7014
7056
  transparentBackground: !1
@@ -7026,14 +7068,14 @@ This will replace your current workspace. Continue?`
7026
7068
  return;
7027
7069
  }
7028
7070
  await a().handleAddElement(v), c(!1), d(!1);
7029
- }, M = async (v) => {
7071
+ }, D = async (v) => {
7030
7072
  g(!1), await a().handleAddElement("shape", { shapeType: v });
7031
- }, T = zo, y = () => /* @__PURE__ */ f("div", { className: "sc:my-xs sc:h-px sc:bg-border-primary" });
7073
+ }, T = Oo, y = () => /* @__PURE__ */ f("div", { className: "sc:my-xs sc:h-px sc:bg-border-primary" });
7032
7074
  return /* @__PURE__ */ j(nn, { children: [
7033
7075
  /* @__PURE__ */ f(
7034
- Oo,
7076
+ zo,
7035
7077
  {
7036
- trigger: /* @__PURE__ */ j(Hn, { delayDuration: 0, children: [
7078
+ trigger: /* @__PURE__ */ j(Bn, { delayDuration: 0, children: [
7037
7079
  /* @__PURE__ */ f(_t, { asChild: !0, children: /* @__PURE__ */ f(
7038
7080
  rt,
7039
7081
  {
@@ -7044,7 +7086,7 @@ This will replace your current workspace. Continue?`
7044
7086
  children: o
7045
7087
  }
7046
7088
  ) }),
7047
- /* @__PURE__ */ f(Ct, { children: /* @__PURE__ */ f("p", { children: i }) })
7089
+ /* @__PURE__ */ f(kt, { children: /* @__PURE__ */ f("p", { children: i }) })
7048
7090
  ] }),
7049
7091
  isOpen: l,
7050
7092
  onToggle: c,
@@ -7058,7 +7100,7 @@ This will replace your current workspace. Continue?`
7058
7100
  onMouseEnter: () => d(!0),
7059
7101
  onMouseLeave: () => d(!1),
7060
7102
  children: [
7061
- /* @__PURE__ */ f(Ke, { icon: /* @__PURE__ */ f(B, { icon: V.plus, className: "sc:size-[18px]" }), label: "Add Element" }),
7103
+ /* @__PURE__ */ f(Ke, { icon: /* @__PURE__ */ f($, { icon: U.plus, className: "sc:size-[18px]" }), label: "Add Element" }),
7062
7104
  u && /* @__PURE__ */ f(
7063
7105
  "div",
7064
7106
  {
@@ -7083,12 +7125,12 @@ This will replace your current workspace. Continue?`
7083
7125
  }
7084
7126
  ),
7085
7127
  /* @__PURE__ */ f(y, {}),
7086
- /* @__PURE__ */ f(Ke, { icon: /* @__PURE__ */ f(B, { icon: V.save, className: "sc:size-[18px]" }), label: "Save", onClick: w }),
7087
- /* @__PURE__ */ f(Ke, { icon: /* @__PURE__ */ f(B, { icon: V.folderOpen, className: "sc:size-[18px]" }), label: "Open", onClick: p }),
7128
+ /* @__PURE__ */ f(Ke, { icon: /* @__PURE__ */ f($, { icon: U.save, className: "sc:size-[18px]" }), label: "Save", onClick: w }),
7129
+ /* @__PURE__ */ f(Ke, { icon: /* @__PURE__ */ f($, { icon: U.folderOpen, className: "sc:size-[18px]" }), label: "Open", onClick: p }),
7088
7130
  /* @__PURE__ */ f(
7089
7131
  Ke,
7090
7132
  {
7091
- icon: /* @__PURE__ */ f(B, { icon: V.download, className: "sc:size-[18px]" }),
7133
+ icon: /* @__PURE__ */ f($, { icon: U.download, className: "sc:size-[18px]" }),
7092
7134
  label: "Export Image",
7093
7135
  onClick: E,
7094
7136
  disabled: !((S = a().canvasRef) != null && S.current)
@@ -7099,7 +7141,7 @@ This will replace your current workspace. Continue?`
7099
7141
  /* @__PURE__ */ f(
7100
7142
  Ke,
7101
7143
  {
7102
- icon: /* @__PURE__ */ f(B, { icon: V.layers, className: "sc:size-[18px]" }),
7144
+ icon: /* @__PURE__ */ f($, { icon: U.layers, className: "sc:size-[18px]" }),
7103
7145
  label: `${e ? "Hide" : "Show"} Layers`,
7104
7146
  onClick: () => {
7105
7147
  t(), c(!1);
@@ -7129,7 +7171,7 @@ This will replace your current workspace. Continue?`
7129
7171
  {
7130
7172
  isOpen: h,
7131
7173
  onClose: () => g(!1),
7132
- onSelectType: M
7174
+ onSelectType: D
7133
7175
  }
7134
7176
  )
7135
7177
  ] });
@@ -7139,11 +7181,11 @@ function Po({
7139
7181
  isOpen: t,
7140
7182
  onOpenChange: n
7141
7183
  }) {
7142
- const r = Qn(e), [o, i] = H(null);
7184
+ const r = Qn(e), [o, i] = B(null);
7143
7185
  return W(() => {
7144
7186
  if (!t || o) return;
7145
7187
  let s = !1;
7146
- return import("./ImagePanel-CIk6z41z.js").then(
7188
+ return import("./ImagePanel-CmQCxBGm.js").then(
7147
7189
  (a) => {
7148
7190
  s || i(() => a.ImagePanel);
7149
7191
  },
@@ -7161,9 +7203,9 @@ function Po({
7161
7203
  };
7162
7204
  }, [t, o, r]), o ? /* @__PURE__ */ f(o, { isOpen: t, onOpenChange: n }) : null;
7163
7205
  }
7164
- function Hl({ className: e, style: t }) {
7206
+ function Bl({ className: e, style: t }) {
7165
7207
  Zn("Editor.Menu"), Zt("Editor.Menu");
7166
- const [n, r] = H(!1);
7208
+ const [n, r] = B(!1);
7167
7209
  return /* @__PURE__ */ j("div", { "data-sc-part": "menu", className: e, style: t, children: [
7168
7210
  /* @__PURE__ */ f(vl, { onOpenImageBrowser: () => r(!0) }),
7169
7211
  /* @__PURE__ */ f(
@@ -7182,7 +7224,7 @@ const yl = () => {
7182
7224
  /* @__PURE__ */ f(
7183
7225
  En,
7184
7226
  {
7185
- icon: V.undo,
7227
+ icon: U.undo,
7186
7228
  onClick: e,
7187
7229
  disabled: !n,
7188
7230
  tooltip: "Undo",
@@ -7192,7 +7234,7 @@ const yl = () => {
7192
7234
  /* @__PURE__ */ f(
7193
7235
  En,
7194
7236
  {
7195
- icon: V.redo,
7237
+ icon: U.redo,
7196
7238
  onClick: t,
7197
7239
  disabled: !r,
7198
7240
  tooltip: "Redo",
@@ -7201,12 +7243,12 @@ const yl = () => {
7201
7243
  )
7202
7244
  ] });
7203
7245
  };
7204
- function Ul({ className: e, style: t }) {
7246
+ function Vl({ className: e, style: t }) {
7205
7247
  return Zn("Editor.History"), Zt("Editor.History"), /* @__PURE__ */ f("div", { "data-sc-part": "history", className: e, style: t, children: /* @__PURE__ */ f(yl, {}) });
7206
7248
  }
7207
- function Vl({ className: e, style: t }) {
7249
+ function Ul({ className: e, style: t }) {
7208
7250
  Zn("Editor.Add"), Zt("Editor.Add");
7209
- const { get: n } = Tr(), [r, o] = H(!1), [i, s] = H(!1), [a, l] = H(!1), c = async (d) => {
7251
+ const { get: n } = Tr(), [r, o] = B(!1), [i, s] = B(!1), [a, l] = B(!1), c = async (d) => {
7210
7252
  if (o(!1), d === "shape") {
7211
7253
  s(!0);
7212
7254
  return;
@@ -7221,17 +7263,17 @@ function Vl({ className: e, style: t }) {
7221
7263
  };
7222
7264
  return /* @__PURE__ */ j("div", { "data-sc-part": "add", className: e, style: t, children: [
7223
7265
  /* @__PURE__ */ f(
7224
- Oo,
7266
+ zo,
7225
7267
  {
7226
- trigger: /* @__PURE__ */ j(Hn, { delayDuration: 0, children: [
7227
- /* @__PURE__ */ f(_t, { asChild: !0, children: /* @__PURE__ */ f(rt, { variant: "ghost", size: "icon", "aria-label": "Add element", children: /* @__PURE__ */ f(B, { icon: V.plus, className: "sc:size-6" }) }) }),
7228
- /* @__PURE__ */ f(Ct, { children: /* @__PURE__ */ f("p", { children: "Add element" }) })
7268
+ trigger: /* @__PURE__ */ j(Bn, { delayDuration: 0, children: [
7269
+ /* @__PURE__ */ f(_t, { asChild: !0, children: /* @__PURE__ */ f(rt, { variant: "ghost", size: "icon", "aria-label": "Add element", children: /* @__PURE__ */ f($, { icon: U.plus, className: "sc:size-6" }) }) }),
7270
+ /* @__PURE__ */ f(kt, { children: /* @__PURE__ */ f("p", { children: "Add element" }) })
7229
7271
  ] }),
7230
7272
  isOpen: r,
7231
7273
  onToggle: o,
7232
7274
  position: "bottom",
7233
7275
  align: "start",
7234
- children: /* @__PURE__ */ f(Rn, { minWidth: "180px", children: zo.map((d) => /* @__PURE__ */ f(
7276
+ children: /* @__PURE__ */ f(Rn, { minWidth: "180px", children: Oo.map((d) => /* @__PURE__ */ f(
7235
7277
  Ke,
7236
7278
  {
7237
7279
  icon: d.icon,
@@ -7267,7 +7309,7 @@ function Gl() {
7267
7309
  artboardManager: t,
7268
7310
  elements: n,
7269
7311
  canvasRef: r
7270
- } = On(), [o, i] = H(!1), [s, a] = H(!1), [l, c] = H([]), [u, d] = H({}), [h, g] = H({
7312
+ } = zn(), [o, i] = B(!1), [s, a] = B(!1), [l, c] = B([]), [u, d] = B({}), [h, g] = B({
7271
7313
  totalExports: 0,
7272
7314
  avgExportTime: 0,
7273
7315
  isWorkerActive: !1
@@ -7278,14 +7320,14 @@ function Gl() {
7278
7320
  if (!r.current)
7279
7321
  throw new Error("[useExport] Canvas ref not available");
7280
7322
  i(!0);
7281
- const D = {
7323
+ const M = {
7282
7324
  artboardId: v,
7283
7325
  artboardName: b.name,
7284
7326
  status: "rendering",
7285
7327
  progress: 0,
7286
7328
  timestamp: Date.now()
7287
7329
  };
7288
- c((R) => [...R, D]);
7330
+ c((R) => [...R, M]);
7289
7331
  try {
7290
7332
  const R = Date.now(), F = A.current, X = t.getElementsOnArtboard(v), pe = F.filter((Y) => X.includes(Y.id)), J = await sn.exportArtboardToDataURL(
7291
7333
  b,
@@ -7318,24 +7360,24 @@ function Gl() {
7318
7360
  const L = e.map(async (R) => {
7319
7361
  const F = await m(R.id, v);
7320
7362
  return { id: R.id, dataUrl: F };
7321
- }), b = await Promise.all(L), D = {};
7363
+ }), b = await Promise.all(L), M = {};
7322
7364
  for (const { id: R, dataUrl: F } of b)
7323
- D[R] = F;
7324
- return D;
7365
+ M[R] = F;
7366
+ return M;
7325
7367
  } finally {
7326
7368
  i(!1);
7327
7369
  }
7328
7370
  }, [e, m]), A = G(n);
7329
7371
  A.current = n;
7330
- const M = N(async (v, L = {}) => {
7331
- const b = e.find((D) => D.id === v);
7372
+ const D = N(async (v, L = {}) => {
7373
+ const b = e.find((M) => M.id === v);
7332
7374
  if (!b)
7333
7375
  throw new Error(`[useExport] Artboard ${v} not found`);
7334
7376
  if (!r.current)
7335
7377
  throw new Error("[useExport] Canvas ref not available");
7336
7378
  i(!0);
7337
7379
  try {
7338
- const D = A.current, R = t.getElementsOnArtboard(v), F = D.filter((pe) => R.includes(pe.id));
7380
+ const M = A.current, R = t.getElementsOnArtboard(v), F = M.filter((pe) => R.includes(pe.id));
7339
7381
  return await sn.exportArtboardToBlob(
7340
7382
  b,
7341
7383
  F,
@@ -7354,16 +7396,16 @@ function Gl() {
7354
7396
  i(!0);
7355
7397
  try {
7356
7398
  const L = e.map(async (R) => {
7357
- const F = await M(R.id, v);
7399
+ const F = await D(R.id, v);
7358
7400
  return { id: R.id, blob: F };
7359
- }), b = await Promise.all(L), D = {};
7401
+ }), b = await Promise.all(L), M = {};
7360
7402
  for (const { id: R, blob: F } of b)
7361
- D[R] = F;
7362
- return D;
7403
+ M[R] = F;
7404
+ return M;
7363
7405
  } finally {
7364
7406
  i(!1);
7365
7407
  }
7366
- }, [e, M]), y = N(() => {
7408
+ }, [e, D]), y = N(() => {
7367
7409
  x.current++, a(!1), w.current = null;
7368
7410
  }, []), S = N((v) => {
7369
7411
  x.current++;
@@ -7371,7 +7413,7 @@ function Gl() {
7371
7413
  w.current = v, a(!0);
7372
7414
  const {
7373
7415
  artboardIds: b,
7374
- interval: D = 500,
7416
+ interval: M = 500,
7375
7417
  scale: R = 3,
7376
7418
  format: F = "png",
7377
7419
  onChange: X
@@ -7393,7 +7435,7 @@ function Gl() {
7393
7435
  }
7394
7436
  };
7395
7437
  (async () => {
7396
- for (await re(); J() && (await new Promise((ee) => setTimeout(ee, D)), !!J()); )
7438
+ for (await re(); J() && (await new Promise((ee) => setTimeout(ee, M)), !!J()); )
7397
7439
  await re();
7398
7440
  })();
7399
7441
  }, [e, m]);
@@ -7401,7 +7443,7 @@ function Gl() {
7401
7443
  y();
7402
7444
  }, [y]), {
7403
7445
  exportArtboard: m,
7404
- exportArtboardAsBlob: M,
7446
+ exportArtboardAsBlob: D,
7405
7447
  exportAllArtboards: E,
7406
7448
  exportAllArtboardsAsBlobs: T,
7407
7449
  startContinuousExport: S,
@@ -7473,7 +7515,7 @@ function xl(e) {
7473
7515
  }
7474
7516
  };
7475
7517
  }
7476
- function kl(e) {
7518
+ function Cl(e) {
7477
7519
  const t = "/api/image-proxy?url=";
7478
7520
  if (!e || !e.startsWith(t)) return e;
7479
7521
  try {
@@ -7482,9 +7524,9 @@ function kl(e) {
7482
7524
  return e;
7483
7525
  }
7484
7526
  }
7485
- function Cl(e) {
7527
+ function kl(e) {
7486
7528
  return async function(n) {
7487
- const r = kl(n);
7529
+ const r = Cl(n);
7488
7530
  if (!/^https?:\/\//.test(r))
7489
7531
  throw new Error("Background removal isn't available for this image yet");
7490
7532
  const o = await fetch(e, {
@@ -7498,14 +7540,14 @@ function Cl(e) {
7498
7540
  return i.imageUrl;
7499
7541
  };
7500
7542
  }
7501
- const $o = {}, Bo = Xe($o);
7543
+ const Ho = {}, $o = Xe(Ho);
7502
7544
  function Wl({ services: e, children: t }) {
7503
7545
  const n = q(() => e ? {
7504
7546
  imageSearch: e.imageSearch ?? (e.imageSearchUrl ? wl(e.imageSearchUrl) : void 0),
7505
7547
  generate: e.generate ?? (e.generateUrl ? xl(e.generateUrl) : void 0),
7506
7548
  vectors: e.vectors,
7507
- removeBackground: e.removeBackground ?? (e.bgRemoveUrl ? Cl(e.bgRemoveUrl) : void 0)
7508
- } : $o, [
7549
+ removeBackground: e.removeBackground ?? (e.bgRemoveUrl ? kl(e.bgRemoveUrl) : void 0)
7550
+ } : Ho, [
7509
7551
  e == null ? void 0 : e.imageSearch,
7510
7552
  e == null ? void 0 : e.imageSearchUrl,
7511
7553
  e == null ? void 0 : e.generate,
@@ -7514,10 +7556,10 @@ function Wl({ services: e, children: t }) {
7514
7556
  e == null ? void 0 : e.bgRemoveUrl,
7515
7557
  e == null ? void 0 : e.removeBackground
7516
7558
  ]);
7517
- return /* @__PURE__ */ f(Bo.Provider, { value: n, children: t });
7559
+ return /* @__PURE__ */ f($o.Provider, { value: n, children: t });
7518
7560
  }
7519
7561
  function _l() {
7520
- return je(Bo);
7562
+ return je($o);
7521
7563
  }
7522
7564
  const Ar = ot("GoogleFontsService");
7523
7565
  let Ze = [], ht = null;
@@ -7540,7 +7582,7 @@ function vn() {
7540
7582
  function El() {
7541
7583
  return Ze.length > 0;
7542
7584
  }
7543
- function Dr(e) {
7585
+ function Mr(e) {
7544
7586
  return {
7545
7587
  "sans serif": "sans-serif",
7546
7588
  serif: "serif",
@@ -7549,7 +7591,7 @@ function Dr(e) {
7549
7591
  monospace: "monospace"
7550
7592
  }[e.toLowerCase()] || "display";
7551
7593
  }
7552
- const Mr = ot("UnifiedFontService");
7594
+ const Dr = ot("UnifiedFontService");
7553
7595
  class Al {
7554
7596
  constructor() {
7555
7597
  this.searchCache = /* @__PURE__ */ new Map(), this.previewFontLinks = /* @__PURE__ */ new Set();
@@ -7564,7 +7606,7 @@ class Al {
7564
7606
  try {
7565
7607
  await Sl();
7566
7608
  } catch (t) {
7567
- Mr.error("Failed to initialize UnifiedFontService:", t);
7609
+ Dr.error("Failed to initialize UnifiedFontService:", t);
7568
7610
  }
7569
7611
  }
7570
7612
  /**
@@ -7614,7 +7656,7 @@ class Al {
7614
7656
  const n = `category:${t}`;
7615
7657
  if (this.searchCache.has(n))
7616
7658
  return this.searchCache.get(n);
7617
- const r = vn().filter((i) => Dr(i.category) === t).map((i) => this.mapGoogleFont(i)), o = this.mergeFonts(r);
7659
+ const r = vn().filter((i) => Mr(i.category) === t).map((i) => this.mapGoogleFont(i)), o = this.mergeFonts(r);
7618
7660
  return this.searchCache.set(n, o), o;
7619
7661
  }
7620
7662
  /**
@@ -7637,7 +7679,7 @@ class Al {
7637
7679
  try {
7638
7680
  t.googleFont && this.loadGoogleFont(t.name);
7639
7681
  } catch (n) {
7640
- Mr.error(`Failed to load font ${t.name}:`, n);
7682
+ Dr.error(`Failed to load font ${t.name}:`, n);
7641
7683
  }
7642
7684
  }
7643
7685
  /**
@@ -7698,7 +7740,7 @@ class Al {
7698
7740
  var n;
7699
7741
  return {
7700
7742
  name: t.family,
7701
- category: Dr(t.category),
7743
+ category: Mr(t.category),
7702
7744
  googleFont: !0,
7703
7745
  source: "google",
7704
7746
  weights: ((n = t.variants) == null ? void 0 : n.map((r) => {
@@ -7760,13 +7802,13 @@ export {
7760
7802
  as as A,
7761
7803
  rt as B,
7762
7804
  Wl as C,
7763
- Oo as D,
7805
+ zo as D,
7764
7806
  jl as E,
7765
7807
  so as F,
7766
7808
  ao as G,
7767
7809
  lo as H,
7768
- B as I,
7769
- V as J,
7810
+ $ as I,
7811
+ U as J,
7770
7812
  hl as K,
7771
7813
  sl as L,
7772
7814
  vl as M,
@@ -7774,33 +7816,33 @@ export {
7774
7816
  Sn as O,
7775
7817
  En as P,
7776
7818
  Fo as S,
7777
- Hn as T,
7819
+ Bn as T,
7778
7820
  ql as U,
7779
7821
  xl as a,
7780
7822
  wl as b,
7781
- Cl as c,
7823
+ kl as c,
7782
7824
  _l as d,
7783
7825
  Pl as e,
7784
7826
  Gl as f,
7785
7827
  ni as g,
7786
7828
  _t as h,
7787
- Ct as i,
7829
+ kt as i,
7788
7830
  es as j,
7789
7831
  Rn as k,
7790
7832
  Ke as l,
7791
7833
  oo as m,
7792
7834
  ns as n,
7793
- $l as o,
7835
+ Hl as o,
7794
7836
  No as p,
7795
7837
  Qn as q,
7796
7838
  Zt as r,
7797
7839
  rs as s,
7798
7840
  Zn as t,
7799
7841
  ys as u,
7800
- Vl as v,
7801
- Hl as w,
7802
- Ul as x,
7803
- Bl as y,
7842
+ Ul as v,
7843
+ Bl as w,
7844
+ Vl as x,
7845
+ $l as y,
7804
7846
  Le as z
7805
7847
  };
7806
- //# sourceMappingURL=UnifiedFontService-CHVYDBDW.js.map
7848
+ //# sourceMappingURL=UnifiedFontService-BJzoqfBF.js.map