@janbox/storefront-builder 2.0.25 → 2.0.26

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 (102) hide show
  1. package/dist/components/composer/composer.d.ts +4 -0
  2. package/dist/components/composer/index.d.ts +1 -4
  3. package/dist/{index-C9gD44fK.js → composer-DBRKIqu7.js} +1 -1
  4. package/dist/editor/components/image-gallery-dialog.d.ts +9 -0
  5. package/dist/editor/components/image-source-selection.d.ts +3 -2
  6. package/dist/editor/components/index.d.ts +1 -0
  7. package/dist/editor/hooks/use-editor.d.ts +3 -0
  8. package/dist/editor/lib/index.d.ts +4 -1
  9. package/dist/editor/related/button/index.d.ts +1 -0
  10. package/dist/editor/related/image/index.d.ts +1 -0
  11. package/dist/editor/types/index.d.ts +11 -0
  12. package/dist/editor/ui/cascader/cascader.d.ts +41 -0
  13. package/dist/editor/ui/cascader/index.d.ts +1 -0
  14. package/dist/editor/ui/date-picker/date-picker.d.ts +7 -18
  15. package/dist/editor/ui/index.d.ts +1 -0
  16. package/dist/editor.js +1106 -966
  17. package/dist/hooks/use-toggle.d.ts +2 -0
  18. package/dist/index-CpLNXUi2.js +4 -0
  19. package/dist/index.js +69 -70
  20. package/dist/lib/inline/index.d.ts +0 -1
  21. package/dist/style.css +1 -1
  22. package/dist/templates.js +80 -92
  23. package/dist/{toaster-CzSp838P.js → toaster-Bx7Helq-.js} +8952 -8725
  24. package/dist/utils/internal.d.ts +0 -0
  25. package/package.json +2 -5
  26. package/dist/index-CglXRxzd.js +0 -4
  27. /package/dist/{lib → editor/related}/accordion-group/accordion-group.inspector/accordion-group.inspector.d.ts +0 -0
  28. /package/dist/{lib → editor/related}/accordion-group/accordion-group.inspector/accordion-items-field.d.ts +0 -0
  29. /package/dist/{lib → editor/related}/accordion-group/accordion-group.inspector/expand-icon-field.d.ts +0 -0
  30. /package/dist/{lib → editor/related}/accordion-group/accordion-group.inspector/index.d.ts +0 -0
  31. /package/dist/{lib → editor/related}/accordion-group/accordion-group.inspector/open-mode-field.d.ts +0 -0
  32. /package/dist/{lib → editor/related}/box/box.inspector/box.inspector.d.ts +0 -0
  33. /package/dist/{lib → editor/related}/box/box.inspector/index.d.ts +0 -0
  34. /package/dist/{lib → editor/related}/button/button.inspector/button.inspector.d.ts +0 -0
  35. /package/dist/{lib → editor/related}/button/button.inspector/index.d.ts +0 -0
  36. /package/dist/{lib → editor/related}/button/button.inspector/link-field.d.ts +0 -0
  37. /package/dist/{lib → editor/related}/button/button.inspector/size-field.d.ts +0 -0
  38. /package/dist/{lib → editor/related}/button/button.inspector/variant-field.d.ts +0 -0
  39. /package/dist/{lib → editor/related}/cell/cell.inspector/cell.inspector.d.ts +0 -0
  40. /package/dist/{lib → editor/related}/cell/cell.inspector/col-span-field.d.ts +0 -0
  41. /package/dist/{lib → editor/related}/cell/cell.inspector/index.d.ts +0 -0
  42. /package/dist/{lib → editor/related}/container/container.inspector/container.inspector.d.ts +0 -0
  43. /package/dist/{lib → editor/related}/container/container.inspector/index.d.ts +0 -0
  44. /package/dist/{lib → editor/related}/count-up/count-up.inspector/count-up.inspector.d.ts +0 -0
  45. /package/dist/{lib → editor/related}/count-up/count-up.inspector/index.d.ts +0 -0
  46. /package/dist/{lib → editor/related}/countdown-timer/countdown-timer.inspector/caption-style-fields.d.ts +0 -0
  47. /package/dist/{lib → editor/related}/countdown-timer/countdown-timer.inspector/countdown-timer.inspector.d.ts +0 -0
  48. /package/dist/{lib → editor/related}/countdown-timer/countdown-timer.inspector/index.d.ts +0 -0
  49. /package/dist/{lib → editor/related}/countdown-timer/countdown-timer.inspector/time-style-fields.d.ts +0 -0
  50. /package/dist/{lib → editor/related}/countdown-timer/countdown-timer.inspector/unit-item-style-fields.d.ts +0 -0
  51. /package/dist/{lib → editor/related}/countdown-timer/countdown-timer.inspector/units-field.d.ts +0 -0
  52. /package/dist/{lib → editor/related}/flex-item/flex-item.inspector/auto-grow-field.d.ts +0 -0
  53. /package/dist/{lib → editor/related}/flex-item/flex-item.inspector/auto-shrink-field.d.ts +0 -0
  54. /package/dist/{lib → editor/related}/flex-item/flex-item.inspector/flex-item.inspector.d.ts +0 -0
  55. /package/dist/{lib → editor/related}/flex-item/flex-item.inspector/index.d.ts +0 -0
  56. /package/dist/{lib → editor/related}/flexbox/flexbox.inspector/direction-field.d.ts +0 -0
  57. /package/dist/{lib → editor/related}/flexbox/flexbox.inspector/flexbox.inspector.d.ts +0 -0
  58. /package/dist/{lib → editor/related}/flexbox/flexbox.inspector/index.d.ts +0 -0
  59. /package/dist/{lib → editor/related}/grid/grid.inspector/grid.inspector.d.ts +0 -0
  60. /package/dist/{lib → editor/related}/grid/grid.inspector/index.d.ts +0 -0
  61. /package/dist/{lib → editor/related}/heading/heading.inspector/heading.inspector.d.ts +0 -0
  62. /package/dist/{lib → editor/related}/heading/heading.inspector/index.d.ts +0 -0
  63. /package/dist/{lib → editor/related}/heading/heading.toolbar/heading.toolbar.d.ts +0 -0
  64. /package/dist/{lib → editor/related}/heading/heading.toolbar/index.d.ts +0 -0
  65. /package/dist/{lib → editor/related}/icon/icon.inspector/icon.inspector.d.ts +0 -0
  66. /package/dist/{lib → editor/related}/icon/icon.inspector/index.d.ts +0 -0
  67. /package/dist/{lib → editor/related}/image/image.inspector/alt-text-field.d.ts +0 -0
  68. /package/dist/{lib → editor/related}/image/image.inspector/image.inspector.d.ts +0 -0
  69. /package/dist/{lib → editor/related}/image/image.inspector/index.d.ts +0 -0
  70. /package/dist/{lib → editor/related}/image/image.inspector/preload-field.d.ts +0 -0
  71. /package/dist/{lib → editor/related}/image/image.inspector/proportion-field.d.ts +0 -0
  72. /package/dist/{lib → editor/related}/image/image.inspector/source-field.d.ts +0 -0
  73. /package/dist/{lib → editor/related}/inline/inline.inspector/index.d.ts +0 -0
  74. /package/dist/{lib → editor/related}/inline/inline.inspector/inline.inspector.d.ts +0 -0
  75. /package/dist/{lib → editor/related}/link/link.inspector/destination-field.d.ts +0 -0
  76. /package/dist/{lib → editor/related}/link/link.inspector/index.d.ts +0 -0
  77. /package/dist/{lib → editor/related}/link/link.inspector/link.inspector.d.ts +0 -0
  78. /package/dist/{lib → editor/related}/link/link.inspector/rel-field.d.ts +0 -0
  79. /package/dist/{lib → editor/related}/link/link.toolbar/index.d.ts +0 -0
  80. /package/dist/{lib → editor/related}/link/link.toolbar/link.toolbar.d.ts +0 -0
  81. /package/dist/{lib → editor/related}/marquee/marquee.inspector/index.d.ts +0 -0
  82. /package/dist/{lib → editor/related}/marquee/marquee.inspector/marquee.inspector.d.ts +0 -0
  83. /package/dist/{lib → editor/related}/marquee/marquee.inspector/play-state-field.d.ts +0 -0
  84. /package/dist/{lib → editor/related}/paragraph/paragraph.inspector/index.d.ts +0 -0
  85. /package/dist/{lib → editor/related}/paragraph/paragraph.inspector/paragraph.inspector.d.ts +0 -0
  86. /package/dist/{lib → editor/related}/paragraph/paragraph.toolbar/index.d.ts +0 -0
  87. /package/dist/{lib → editor/related}/paragraph/paragraph.toolbar/paragraph.toolbar.d.ts +0 -0
  88. /package/dist/{lib → editor/related}/rating/rating.inspector/index.d.ts +0 -0
  89. /package/dist/{lib → editor/related}/rating/rating.inspector/rating.inspector.d.ts +0 -0
  90. /package/dist/{lib → editor/related}/swiper/swiper.inspector/autoplay-delay-field.d.ts +0 -0
  91. /package/dist/{lib → editor/related}/swiper/swiper.inspector/autoplay-loop-field.d.ts +0 -0
  92. /package/dist/{lib → editor/related}/swiper/swiper.inspector/index.d.ts +0 -0
  93. /package/dist/{lib → editor/related}/swiper/swiper.inspector/slides-per-view-field.d.ts +0 -0
  94. /package/dist/{lib → editor/related}/swiper/swiper.inspector/swiper.inspector.d.ts +0 -0
  95. /package/dist/{lib → editor/related}/tabs/tabs.inspector/child-tabs-field.d.ts +0 -0
  96. /package/dist/{lib → editor/related}/tabs/tabs.inspector/default-active-field.d.ts +0 -0
  97. /package/dist/{lib → editor/related}/tabs/tabs.inspector/index.d.ts +0 -0
  98. /package/dist/{lib → editor/related}/tabs/tabs.inspector/tabs.inspector.d.ts +0 -0
  99. /package/dist/{lib → editor/related}/unordered-list/unordered-list.inspector/index.d.ts +0 -0
  100. /package/dist/{lib → editor/related}/unordered-list/unordered-list.inspector/unordered-list.inspector.d.ts +0 -0
  101. /package/dist/{lib → editor/related}/video/video.inspector/index.d.ts +0 -0
  102. /package/dist/{lib → editor/related}/video/video.inspector/video.inspector.d.ts +0 -0
package/dist/editor.js CHANGED
@@ -1,25 +1,22 @@
1
- import { jsx as n, jsxs as w, Fragment as Oe } from "@emotion/react/jsx-runtime";
2
- import { aB as gt, aC as ft, aD as bt, aE as f, aF as wt, aG as ce, aH as $, aI as fe, b as Ie, B as Me, a6 as kt, aJ as J, aK as He, aL as mt, aM as W, aN as I, aA as $e, az as Ct, aO as vt, aP as xt, aQ as yt, aR as Tt, aS as It, aT as Mt, aU as St, aV as _e, aW as Et, aX as Lt, aY as Wt, aZ as Nt, a_ as Rt, u as H, a$ as At, b0 as Dt, b1 as oe, m as Bt, i as Pt, G as jt, l as Se, p as Vt, F as Ee, t as Ft, Z as Ot, I as Ht, b2 as $t, s as _t, P as zt, b3 as ze, b4 as Gt, b5 as Ut, b6 as Zt, b7 as Yt, b8 as Xt, b9 as _, ba as Ge, bb as qt, bc as Jt, bd as ke, be as Kt, bf as Qt, bg as en, a5 as Ue, a1 as Ze, bh as Le, bi as tn, N as me, bj as nn, bk as rn, bl as on, a3 as sn, bm as We, bn as an } from "./toaster-CzSp838P.js";
3
- import { bo as So, bp as Eo, bq as Lo, br as Wo, bs as No, bt as Ro, bu as Ao, bv as Do, bw as Bo, bx as Po, by as jo, bz as Vo, bA as Fo, bB as Oo, bC as Ho, bD as $o, bE as _o, bF as zo, bG as Go, bH as Uo, bI as Zo, bJ as Yo, bK as Xo, bL as qo, bM as Jo, bN as Ko, bO as Qo, bP as es, bQ as ts, bR as ns, bS as rs, bT as os, bU as ss, bV as is, bW as as, bX as cs, bY as ls, bZ as ds, b_ as hs, b$ as us, c0 as ps, c1 as gs, c2 as fs, c3 as bs, c4 as ws, c5 as ks, c6 as ms, c7 as Cs, c8 as vs, c9 as xs, ca as ys, cb as Ts, W as Is, cc as Ms, cd as Ss, ce as Es, cf as Ls, cg as Ws } from "./toaster-CzSp838P.js";
4
- import { throttle as cn, isFunction as Ne, isNumber as se, isNil as ee, isEqual as ln } from "lodash-es";
5
- import { useImperativeHandle as dn, useMemo as hn, isValidElement as un, useState as P, useRef as G, useEffect as V, Fragment as ie, Suspense as pn, createElement as Ye, useCallback as gn } from "react";
1
+ import { jsxs as b, jsx as r, Fragment as ct } from "@emotion/react/jsx-runtime";
2
+ import { aA as zt, aB as c, aC as I, aD as Pe, aE as we, ax as _t, aF as Gt, aG as U, aH as We, b as Ye, B as Ze, a5 as Ut, aI as ae, aJ as dt, aK as Yt, aL as A, az as ht, ay as Zt, aM as Xt, aN as qt, aO as Jt, aP as Kt, aQ as Qt, aR as er, aS as tr, aT as rr, aU as nr, aV as or, aW as sr, aX as ir, u as G, aY as ar, aZ as lr, a_ as me, m as cr, i as dr, G as hr, l as Xe, p as ur, F as qe, t as pr, Y as gr, I as fr, a$ as br, s as wr, P as mr, b0 as ut, b1 as Be, b2 as kr, b3 as vr, b4 as Cr, b5 as xr, b6 as le, b7 as yr, b8 as X, b9 as pt, ba as Tr, bb as Sr, bc as Ir, bd as Mr, be as Er, a4 as gt, a0 as ft, bf as Je, bg as Lr, bh as Rr, N as je, bi as Wr, bj as Nr, bk as Ar, a2 as Dr, bl as Ke, bm as Pr } from "./toaster-Bx7Helq-.js";
3
+ import { bn as Zo, bo as Xo, bp as qo, bq as Jo, br as Ko, bs as Qo, bt as es, bu as ts, bv as rs, bw as ns, bx as os, by as ss, bz as is, bA as as, bB as ls, bC as cs, bD as ds, bE as hs, bF as us, bG as ps, bH as gs, bI as fs, bJ as bs, bK as ws, bL as ms, bM as ks, bN as vs, bO as Cs, bP as xs, bQ as ys, bR as Ts, bS as Ss, bT as Is, bU as Ms, bV as Es, bW as Ls, bX as Rs, bY as Ws, bZ as Ns, b_ as As, b$ as Ds, c0 as Ps, c1 as Bs, c2 as js, c3 as Vs, c4 as Os, c5 as Fs, c6 as $s, c7 as Hs, c8 as zs, c9 as _s, ca as Gs, cb as Us, cc as Ys, cd as Zs, ce as Xs, cf as qs, cg as Js, W as Ks, ch as Qs, ci as ei, cj as ti, ck as ri, cl as ni } from "./toaster-Bx7Helq-.js";
4
+ import { isNil as $, isUndefined as Br, throttle as jr, isFunction as Qe, isNumber as ke, isEqual as Vr } from "lodash-es";
5
+ import { useState as j, useCallback as oe, useMemo as et, Fragment as J, isValidElement as Or, useRef as K, useEffect as z, Suspense as Fr, createElement as bt } from "react";
6
6
  import "flat";
7
- import { FLOATING_Z_INDEX as Xe, ThemeProvider as fn, breakpoint as bn, createTheme as Re } from "@janbox/storefront-ui/theme";
8
- import "@janbox/storefront-ui/hooks";
9
- import { CacheProvider as wn, Global as kn, createElement as mn } from "@emotion/react";
10
- import { useFloatingParentNodeId as Cn, FloatingTree as vn, useFloating as le, autoUpdate as de, offset as qe, size as Je, flip as Ce, useClick as xn, useHover as Ke, useFocus as Qe, useDismiss as et, useRole as tt, useInteractions as nt, safePolygon as yn, FloatingPortal as he } from "@floating-ui/react";
7
+ import { FLOATING_Z_INDEX as Ne, ThemeProvider as $r, breakpoint as Hr, createTheme as tt } from "@janbox/storefront-ui/theme";
8
+ import { useControllableState as rt } from "@janbox/storefront-ui/hooks";
9
+ import { CacheProvider as zr, Global as _r, createElement as Gr } from "@emotion/react";
10
+ import { useFloating as Ce, autoUpdate as xe, flip as Ve, offset as wt, size as mt, useClick as Ur, useDismiss as kt, useRole as vt, useInteractions as Ct, FloatingPortal as ce, useHover as Yr, safePolygon as Zr, useFocus as Xr } from "@floating-ui/react";
11
11
  import "react-colorful";
12
12
  import "overlayscrollbars-react";
13
13
  import "@tanstack/react-virtual";
14
- import Tn, { useFrame as ve } from "react-frame-component";
14
+ import qr, { useFrame as Oe } from "react-frame-component";
15
15
  import "react-dropzone";
16
- import "react-datepicker";
17
- import { a as rt, C as In } from "./index-C9gD44fK.js";
16
+ import { a as xt, C as Jr } from "./composer-DBRKIqu7.js";
18
17
  import "@janbox/storefront-ui/utils";
19
- import { useToggle as ot } from "usehooks-ts";
20
- import "@hello-pangea/dnd";
21
18
  import "@janbox/storefront-ui";
22
- class Mn {
19
+ class Kr {
23
20
  constructor() {
24
21
  this.componentControls = /* @__PURE__ */ new Set();
25
22
  }
@@ -47,128 +44,270 @@ class Mn {
47
44
  * @public
48
45
  */
49
46
  start(t, o) {
50
- this.componentControls.forEach((r) => {
51
- r.start(t.nativeEvent || t, o);
47
+ this.componentControls.forEach((n) => {
48
+ n.start(t.nativeEvent || t, o);
52
49
  });
53
50
  }
54
51
  }
55
- const Sn = () => new Mn();
56
- function En() {
57
- return gt(Sn);
52
+ const Qr = () => new Kr();
53
+ function en() {
54
+ return zt(Qr);
58
55
  }
59
- const Ln = (e) => Cn() ? /* @__PURE__ */ n(Ae, { ...e }) : /* @__PURE__ */ n(vn, { children: /* @__PURE__ */ n(Ae, { ...e }) }), Ae = ({
60
- open: e,
61
- placement: t = "bottom",
62
- onOpenChange: o,
63
- dismissProps: r = {
64
- enabled: !1
65
- },
66
- children: i,
67
- clickProps: s = {
68
- enabled: !1
69
- },
70
- focusProps: l = {
71
- enabled: !1
72
- },
73
- hoverProps: a = {
74
- enabled: !1
75
- },
76
- elements: d,
77
- offsetOptions: k = 4,
78
- sizeOptions: h,
79
- autoUpdateOptions: u,
80
- ref: c
81
- }) => {
82
- const p = le({
83
- open: e,
84
- onOpenChange: o,
85
- placement: t,
86
- middleware: [qe(k), Je(h), Ce()],
87
- whileElementsMounted: (...A) => de(...A, u),
88
- elements: d
89
- });
90
- dn(c, () => p, [p]);
91
- const { context: b } = p, g = xn(b, s), x = Ke(b, a), m = Qe(b, l), T = et(b, r), S = tt(b), F = nt([g, T, S, x, m]), j = hn(
92
- () => ({
93
- ...p,
94
- ...F
95
- }),
96
- [p, F]
97
- );
98
- return /* @__PURE__ */ n(ft.Provider, { value: j, children: i });
99
- }, go = ({ width: e = 600, children: t, ...o }) => /* @__PURE__ */ n(
100
- Ln,
101
- {
102
- dismissProps: {
103
- enabled: !0
56
+ const Bo = (e) => {
57
+ const {
58
+ innerRef: t,
59
+ placement: o = "bottom-start",
60
+ contentWidth: n,
61
+ visible: i,
62
+ onOpenChange: s,
63
+ dissmiss: d,
64
+ defaultValue: l,
65
+ value: h,
66
+ options: f,
67
+ onChange: u,
68
+ expandTrigger: p = "click",
69
+ changeOnSelect: a = !1,
70
+ placeholder: w,
71
+ allowClear: m = !1,
72
+ displayRender: g,
73
+ separator: y = "/",
74
+ prefix: v,
75
+ suffix: M,
76
+ size: R = "32",
77
+ columnWidth: Y = 180,
78
+ columnMaxHeight: F = 240,
79
+ emptyText: B = "No options",
80
+ ...T
81
+ } = e, [he, Ie] = rt({
82
+ defaultValue: !1,
83
+ value: i
84
+ }), [Z, ue] = rt({
85
+ defaultValue: l,
86
+ value: h ?? void 0
87
+ }), [te, Me] = j([]), Ee = oe((k) => $(k.children) || k.children.length === 0, []), re = et(() => {
88
+ if ($(Z) || Z.length === 0) return [];
89
+ const k = [];
90
+ let S = f;
91
+ for (const E of Z) {
92
+ const H = S?.find((Re) => Re.value === E);
93
+ if ($(H)) break;
94
+ k.push(H), S = H.children;
95
+ }
96
+ return k;
97
+ }, [Z, f]), ze = et(() => {
98
+ const k = [f];
99
+ for (const S of te) {
100
+ if ($(S.children) || S.children.length === 0) break;
101
+ k.push(S.children);
102
+ }
103
+ return k;
104
+ }, [f, te]), _e = oe(
105
+ (k) => {
106
+ const S = k.map((E) => E.value);
107
+ ue(S), u?.(S, k), Ie(!1);
104
108
  },
105
- ...o,
106
- children: /* @__PURE__ */ w(
107
- bt,
109
+ [u, ue, Ie]
110
+ ), Nt = oe(
111
+ (k) => {
112
+ k.stopPropagation(), ue([]), Me([]), u?.([], []);
113
+ },
114
+ [u, ue]
115
+ ), At = oe(
116
+ (k, S) => {
117
+ if (k.disabled) return;
118
+ const E = [...te.slice(0, S), k];
119
+ Me(E), (Ee(k) || a) && _e(E);
120
+ },
121
+ [te, a, _e, Ee]
122
+ ), Dt = (k, S, E) => {
123
+ !k && !E || (k && Me(re), Ie(k), s?.(k, S, E));
124
+ }, { refs: Ge, floatingStyles: Pt, context: Le } = Ce({
125
+ open: he,
126
+ onOpenChange: Dt,
127
+ placement: o,
128
+ middleware: [
129
+ Ve(),
130
+ wt(4),
131
+ mt({
132
+ apply({ elements: k }) {
133
+ const { width: S } = k.reference.getBoundingClientRect(), E = n === "fit-parent" ? S : n, H = {
134
+ zIndex: Ne
135
+ };
136
+ Br(E) || (H.minWidth = `${E}px`), Object.assign(k.floating.style, H);
137
+ }
138
+ })
139
+ ],
140
+ whileElementsMounted: xe
141
+ }), Bt = Ur(Le), jt = kt(Le, d), Vt = vt(Le), { getReferenceProps: Ot, getFloatingProps: Ft } = Ct([Bt, jt, Vt]), $t = () => {
142
+ if (re.length === 0)
143
+ return /* @__PURE__ */ r("span", { css: { color: c.palette.white["3s"] }, children: w });
144
+ const k = re.map((S) => S.label);
145
+ return g ? g(k, re) : k.map((S, E) => /* @__PURE__ */ b(J, { children: [
146
+ E > 0 && /* @__PURE__ */ b("span", { css: { color: c.palette.white["3s"] }, children: [
147
+ " ",
148
+ y,
149
+ " "
150
+ ] }),
151
+ S
152
+ ] }, E));
153
+ }, Ht = ({ option: k, columnIndex: S }) => {
154
+ const E = Ee(k), H = te[S]?.value === k.value, Re = !$(Z) && Z[S] === k.value && (E || a), Ue = () => At(k, S);
155
+ return /* @__PURE__ */ b(
156
+ "div",
157
+ {
158
+ "aria-hidden": !0,
159
+ onClick: Ue,
160
+ onMouseEnter: p === "hover" && !E && !k.disabled ? Ue : void 0,
161
+ css: [
162
+ {
163
+ padding: 8,
164
+ display: "flex",
165
+ alignItems: "center",
166
+ gap: 8,
167
+ borderRadius: 8,
168
+ cursor: k.disabled ? "not-allowed" : "pointer",
169
+ opacity: k.disabled ? 0.4 : 1,
170
+ ":hover": k.disabled ? void 0 : { backgroundColor: c.palette.white["1s"] }
171
+ },
172
+ H && { backgroundColor: c.palette.black["7s"] }
173
+ ],
174
+ children: [
175
+ /* @__PURE__ */ r("div", { css: { flex: 1, overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap" }, children: k.label }),
176
+ Re && /* @__PURE__ */ r(I, { size: 16, source: _t }),
177
+ !E && /* @__PURE__ */ r(I, { size: 16, source: we, css: { transform: "rotate(-90deg)", flexShrink: 0 } })
178
+ ]
179
+ }
180
+ );
181
+ };
182
+ return /* @__PURE__ */ b(J, { children: [
183
+ /* @__PURE__ */ b(
184
+ "button",
108
185
  {
109
- floatingOverlayProps: {
110
- disabled: !1,
111
- lockScroll: !0,
112
- style: {
113
- zIndex: Xe,
114
- display: "grid",
115
- placeItems: "center",
116
- padding: 20
186
+ css: [
187
+ {
188
+ ...c.text.xs,
189
+ height: Number(R),
190
+ display: "inline-flex",
191
+ position: "relative",
192
+ paddingInline: 8,
193
+ borderRadius: 8,
194
+ overflow: "hidden",
195
+ alignItems: "center",
196
+ gap: 8,
197
+ backgroundColor: c.palette.white["1s"],
198
+ color: c.palette.white["6s"],
199
+ "&::after": {
200
+ content: '""',
201
+ position: "absolute",
202
+ inset: 0,
203
+ pointerEvents: "none",
204
+ borderRadius: 8,
205
+ borderWidth: 1,
206
+ borderStyle: "solid",
207
+ borderColor: "transparent"
208
+ }
209
+ },
210
+ he && {
211
+ backgroundColor: c.palette.black["7s"],
212
+ "&::after": {
213
+ content: '""',
214
+ position: "absolute",
215
+ inset: 0,
216
+ pointerEvents: "none",
217
+ borderRadius: 8,
218
+ borderWidth: 1,
219
+ borderStyle: "solid",
220
+ borderColor: c.palette.white["1s"]
221
+ }
117
222
  }
118
- },
119
- css: { display: "flex", overflow: "hidden", flexDirection: "column", maxWidth: "100%", maxHeight: "100%" },
223
+ ],
224
+ ...T,
225
+ ...Ot(),
226
+ ref: Ge.setReference,
120
227
  children: [
121
- /* @__PURE__ */ n(
122
- "div",
228
+ v,
229
+ /* @__PURE__ */ r("div", { css: { flex: 1, textAlign: "left", overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap" }, children: $t() }),
230
+ M ?? (m && re.length > 0 ? /* @__PURE__ */ r(
231
+ "span",
123
232
  {
233
+ role: "button",
234
+ "aria-label": "Clear",
235
+ tabIndex: -1,
236
+ onClick: Nt,
124
237
  css: {
125
- backdropFilter: "blur(2px)",
126
- position: "fixed",
127
- inset: 0,
128
- pointerEvents: "none",
129
- backgroundColor: "rgba(0, 0, 0, 0.4)"
130
- }
238
+ display: "inline-flex",
239
+ flexShrink: 0,
240
+ cursor: "pointer",
241
+ color: c.palette.white["3s"],
242
+ ":hover": { color: c.palette.white["6s"] }
243
+ },
244
+ children: /* @__PURE__ */ r(I, { source: Pe, size: 16 })
131
245
  }
132
- ),
133
- /* @__PURE__ */ n(
134
- "div",
246
+ ) : /* @__PURE__ */ r(
247
+ I,
135
248
  {
136
- css: {
137
- width: e,
138
- display: "flex",
139
- position: "relative",
140
- paddingBlock: 8,
141
- flexDirection: "column",
142
- overflow: "hidden",
143
- borderRadius: 8,
144
- backgroundColor: f.palette.ink["6s"],
145
- maxWidth: "100%",
146
- color: "white"
147
- },
148
- children: t
249
+ source: we,
250
+ css: [{ transition: "transform" }, he && { transform: "rotate(-180deg)" }],
251
+ size: 16
149
252
  }
150
- )
253
+ ))
151
254
  ]
152
255
  }
153
- )
154
- }
155
- ), fo = () => wt(), bo = ({ ref: e, ...t }) => /* @__PURE__ */ n(
156
- ce,
157
- {
158
- css: { paddingBlock: 12, paddingInline: 20, flex: 1, overflow: "auto", ...f.text.xs },
159
- ...t,
160
- ref: e
161
- }
162
- ), wo = ({ required: e, children: t, ...o }) => /* @__PURE__ */ w("div", { css: { marginBottom: 6, display: "flex", width: "fit-content" }, ...o, children: [
163
- un(t) ? t : /* @__PURE__ */ n("label", { children: t }),
164
- e && /* @__PURE__ */ n("span", { css: { color: f.palette.red["6s"] }, children: " *" })
165
- ] }), ko = () => {
166
- const [e, t] = P(0), [o, r] = P(!1), i = G(null), s = (k, h) => {
256
+ ),
257
+ he && /* @__PURE__ */ r(ce, { root: document.body, children: /* @__PURE__ */ r(
258
+ "div",
259
+ {
260
+ ref: Ge.setFloating,
261
+ css: { borderRadius: 8, backgroundColor: c.palette.ink["6s"] },
262
+ style: {
263
+ ...Pt,
264
+ zIndex: Ne
265
+ },
266
+ ...Ft(),
267
+ children: /* @__PURE__ */ r(
268
+ "div",
269
+ {
270
+ ref: t,
271
+ css: {
272
+ display: "flex",
273
+ padding: 4,
274
+ borderRadius: 8,
275
+ backgroundColor: c.palette.white["1s"],
276
+ color: c.palette.white["6s"],
277
+ ":focus-visible": { outlineStyle: "none" },
278
+ ...c.text.xs
279
+ },
280
+ children: ze.map((k, S) => /* @__PURE__ */ r(
281
+ "div",
282
+ {
283
+ css: {
284
+ width: Y,
285
+ maxHeight: F,
286
+ overflowY: "auto",
287
+ paddingInline: 4,
288
+ borderRightWidth: S < ze.length - 1 ? 1 : 0,
289
+ borderRightStyle: "solid",
290
+ borderRightColor: c.palette.white["1s"]
291
+ },
292
+ children: k.length === 0 ? /* @__PURE__ */ r("div", { css: { padding: 8, color: c.palette.white["3s"] }, children: B }) : k.map((E) => /* @__PURE__ */ r(Ht, { option: E, columnIndex: S }, String(E.value)))
293
+ },
294
+ S
295
+ ))
296
+ }
297
+ )
298
+ }
299
+ ) })
300
+ ] });
301
+ }, jo = () => Gt(), Vo = ({ required: e, children: t, ...o }) => /* @__PURE__ */ b("div", { css: { marginBottom: 6, display: "flex", width: "fit-content" }, ...o, children: [
302
+ Or(t) ? t : /* @__PURE__ */ r("label", { children: t }),
303
+ e && /* @__PURE__ */ r("span", { css: { color: c.palette.red["6s"] }, children: " *" })
304
+ ] }), Oo = () => {
305
+ const [e, t] = j(0), [o, n] = j(!1), i = K(null), s = (f, u) => {
167
306
  if (!i.current) return 0;
168
- const u = i.current.getBoundingClientRect(), c = u.left + u.width / 2, p = u.top + u.height / 2, b = k - c, g = h - p;
169
- return (Math.atan2(g, b) * (180 / Math.PI) + 360) % 360;
307
+ const p = i.current.getBoundingClientRect(), a = p.left + p.width / 2, w = p.top + p.height / 2, m = f - a, g = u - w;
308
+ return (Math.atan2(g, m) * (180 / Math.PI) + 360) % 360;
170
309
  };
171
- return /* @__PURE__ */ w(
310
+ return /* @__PURE__ */ b(
172
311
  "div",
173
312
  {
174
313
  style: {
@@ -176,37 +315,37 @@ const Ln = (e) => Cn() ? /* @__PURE__ */ n(Ae, { ...e }) : /* @__PURE__ */ n(vn,
176
315
  marginTop: "50px",
177
316
  userSelect: "none"
178
317
  },
179
- onMouseMove: (k) => {
318
+ onMouseMove: (f) => {
180
319
  if (o) {
181
- const h = s(k.clientX, k.clientY);
182
- t(Math.round(h));
320
+ const u = s(f.clientX, f.clientY);
321
+ t(Math.round(u));
183
322
  }
184
323
  },
185
324
  onMouseUp: () => {
186
- r(!1);
325
+ n(!1);
187
326
  },
188
327
  children: [
189
- /* @__PURE__ */ w("h3", { children: [
328
+ /* @__PURE__ */ b("h3", { children: [
190
329
  "Chọn độ: ",
191
330
  e,
192
331
  "°"
193
332
  ] }),
194
- /* @__PURE__ */ w(
333
+ /* @__PURE__ */ b(
195
334
  "svg",
196
335
  {
197
336
  ref: i,
198
337
  width: "200",
199
338
  height: "200",
200
339
  viewBox: "0 0 200 200",
201
- onMouseDown: (k) => {
202
- r(!0);
203
- const h = s(k.clientX, k.clientY);
204
- t(Math.round(h));
340
+ onMouseDown: (f) => {
341
+ n(!0);
342
+ const u = s(f.clientX, f.clientY);
343
+ t(Math.round(u));
205
344
  },
206
345
  style: { cursor: "grab" },
207
346
  children: [
208
- /* @__PURE__ */ n("circle", { cx: "100", cy: "100", r: "90", fill: "#EAEAEA", stroke: "#CCC", strokeWidth: "2" }),
209
- /* @__PURE__ */ n(
347
+ /* @__PURE__ */ r("circle", { cx: "100", cy: "100", r: "90", fill: "#EAEAEA", stroke: "#CCC", strokeWidth: "2" }),
348
+ /* @__PURE__ */ r(
210
349
  "line",
211
350
  {
212
351
  x1: "100",
@@ -217,7 +356,7 @@ const Ln = (e) => Cn() ? /* @__PURE__ */ n(Ae, { ...e }) : /* @__PURE__ */ n(vn,
217
356
  strokeWidth: "2"
218
357
  }
219
358
  ),
220
- /* @__PURE__ */ n(
359
+ /* @__PURE__ */ r(
221
360
  "circle",
222
361
  {
223
362
  cx: 100 + 90 * Math.cos((e - 90) * (Math.PI / 180)),
@@ -234,106 +373,106 @@ const Ln = (e) => Cn() ? /* @__PURE__ */ n(Ae, { ...e }) : /* @__PURE__ */ n(vn,
234
373
  }
235
374
  );
236
375
  };
237
- function Wn(e) {
376
+ function tn(e) {
238
377
  if (e.sheet)
239
378
  return e.sheet;
240
379
  for (var t = 0; t < document.styleSheets.length; t++)
241
380
  if (document.styleSheets[t].ownerNode === e)
242
381
  return document.styleSheets[t];
243
382
  }
244
- function Nn(e) {
383
+ function rn(e) {
245
384
  var t = document.createElement("style");
246
385
  return t.setAttribute("data-emotion", e.key), e.nonce !== void 0 && t.setAttribute("nonce", e.nonce), t.appendChild(document.createTextNode("")), t.setAttribute("data-s", ""), t;
247
386
  }
248
- var Rn = /* @__PURE__ */ (function() {
387
+ var nn = /* @__PURE__ */ (function() {
249
388
  function e(o) {
250
- var r = this;
389
+ var n = this;
251
390
  this._insertTag = function(i) {
252
391
  var s;
253
- r.tags.length === 0 ? r.insertionPoint ? s = r.insertionPoint.nextSibling : r.prepend ? s = r.container.firstChild : s = r.before : s = r.tags[r.tags.length - 1].nextSibling, r.container.insertBefore(i, s), r.tags.push(i);
392
+ n.tags.length === 0 ? n.insertionPoint ? s = n.insertionPoint.nextSibling : n.prepend ? s = n.container.firstChild : s = n.before : s = n.tags[n.tags.length - 1].nextSibling, n.container.insertBefore(i, s), n.tags.push(i);
254
393
  }, this.isSpeedy = o.speedy === void 0 ? !0 : o.speedy, this.tags = [], this.ctr = 0, this.nonce = o.nonce, this.key = o.key, this.container = o.container, this.prepend = o.prepend, this.insertionPoint = o.insertionPoint, this.before = null;
255
394
  }
256
395
  var t = e.prototype;
257
- return t.hydrate = function(r) {
258
- r.forEach(this._insertTag);
259
- }, t.insert = function(r) {
260
- this.ctr % (this.isSpeedy ? 65e3 : 1) === 0 && this._insertTag(Nn(this));
396
+ return t.hydrate = function(n) {
397
+ n.forEach(this._insertTag);
398
+ }, t.insert = function(n) {
399
+ this.ctr % (this.isSpeedy ? 65e3 : 1) === 0 && this._insertTag(rn(this));
261
400
  var i = this.tags[this.tags.length - 1];
262
401
  if (this.isSpeedy) {
263
- var s = Wn(i);
402
+ var s = tn(i);
264
403
  try {
265
- s.insertRule(r, s.cssRules.length);
404
+ s.insertRule(n, s.cssRules.length);
266
405
  } catch {
267
406
  }
268
407
  } else
269
- i.appendChild(document.createTextNode(r));
408
+ i.appendChild(document.createTextNode(n));
270
409
  this.ctr++;
271
410
  }, t.flush = function() {
272
- this.tags.forEach(function(r) {
411
+ this.tags.forEach(function(n) {
273
412
  var i;
274
- return (i = r.parentNode) == null ? void 0 : i.removeChild(r);
413
+ return (i = n.parentNode) == null ? void 0 : i.removeChild(n);
275
414
  }), this.tags = [], this.ctr = 0;
276
415
  }, e;
277
- })(), L = "-ms-", ae = "-moz-", C = "-webkit-", st = "comm", xe = "rule", ye = "decl", An = "@import", it = "@keyframes", Dn = "@layer", Bn = Math.abs, ue = String.fromCharCode, Pn = Object.assign;
278
- function jn(e, t) {
279
- return E(e, 0) ^ 45 ? (((t << 2 ^ E(e, 0)) << 2 ^ E(e, 1)) << 2 ^ E(e, 2)) << 2 ^ E(e, 3) : 0;
416
+ })(), N = "-ms-", ve = "-moz-", C = "-webkit-", yt = "comm", Fe = "rule", $e = "decl", on = "@import", Tt = "@keyframes", sn = "@layer", an = Math.abs, ye = String.fromCharCode, ln = Object.assign;
417
+ function cn(e, t) {
418
+ return W(e, 0) ^ 45 ? (((t << 2 ^ W(e, 0)) << 2 ^ W(e, 1)) << 2 ^ W(e, 2)) << 2 ^ W(e, 3) : 0;
280
419
  }
281
- function at(e) {
420
+ function St(e) {
282
421
  return e.trim();
283
422
  }
284
- function Vn(e, t) {
423
+ function dn(e, t) {
285
424
  return (e = t.exec(e)) ? e[0] : e;
286
425
  }
287
- function v(e, t, o) {
426
+ function x(e, t, o) {
288
427
  return e.replace(t, o);
289
428
  }
290
- function be(e, t) {
429
+ function Ae(e, t) {
291
430
  return e.indexOf(t);
292
431
  }
293
- function E(e, t) {
432
+ function W(e, t) {
294
433
  return e.charCodeAt(t) | 0;
295
434
  }
296
- function X(e, t, o) {
435
+ function se(e, t, o) {
297
436
  return e.slice(t, o);
298
437
  }
299
- function D(e) {
438
+ function V(e) {
300
439
  return e.length;
301
440
  }
302
- function Te(e) {
441
+ function He(e) {
303
442
  return e.length;
304
443
  }
305
- function Q(e, t) {
444
+ function pe(e, t) {
306
445
  return t.push(e), e;
307
446
  }
308
- function Fn(e, t) {
447
+ function hn(e, t) {
309
448
  return e.map(t).join("");
310
449
  }
311
- var pe = 1, U = 1, ct = 0, N = 0, M = 0, Z = "";
312
- function ge(e, t, o, r, i, s, l) {
313
- return { value: e, root: t, parent: o, type: r, props: i, children: s, line: pe, column: U, length: l, return: "" };
450
+ var Te = 1, Q = 1, It = 0, D = 0, L = 0, ee = "";
451
+ function Se(e, t, o, n, i, s, d) {
452
+ return { value: e, root: t, parent: o, type: n, props: i, children: s, line: Te, column: Q, length: d, return: "" };
314
453
  }
315
- function Y(e, t) {
316
- return Pn(ge("", null, null, "", null, null, 0), e, { length: -e.length }, t);
454
+ function ne(e, t) {
455
+ return ln(Se("", null, null, "", null, null, 0), e, { length: -e.length }, t);
317
456
  }
318
- function On() {
319
- return M;
457
+ function un() {
458
+ return L;
320
459
  }
321
- function Hn() {
322
- return M = N > 0 ? E(Z, --N) : 0, U--, M === 10 && (U = 1, pe--), M;
460
+ function pn() {
461
+ return L = D > 0 ? W(ee, --D) : 0, Q--, L === 10 && (Q = 1, Te--), L;
323
462
  }
324
- function R() {
325
- return M = N < ct ? E(Z, N++) : 0, U++, M === 10 && (U = 1, pe++), M;
463
+ function P() {
464
+ return L = D < It ? W(ee, D++) : 0, Q++, L === 10 && (Q = 1, Te++), L;
326
465
  }
327
- function B() {
328
- return E(Z, N);
466
+ function O() {
467
+ return W(ee, D);
329
468
  }
330
- function te() {
331
- return N;
469
+ function ge() {
470
+ return D;
332
471
  }
333
- function K(e, t) {
334
- return X(Z, e, t);
472
+ function de(e, t) {
473
+ return se(ee, e, t);
335
474
  }
336
- function q(e) {
475
+ function ie(e) {
337
476
  switch (e) {
338
477
  // \0 \t \n \r \s whitespace token
339
478
  case 0:
@@ -371,254 +510,254 @@ function q(e) {
371
510
  }
372
511
  return 0;
373
512
  }
374
- function lt(e) {
375
- return pe = U = 1, ct = D(Z = e), N = 0, [];
513
+ function Mt(e) {
514
+ return Te = Q = 1, It = V(ee = e), D = 0, [];
376
515
  }
377
- function dt(e) {
378
- return Z = "", e;
516
+ function Et(e) {
517
+ return ee = "", e;
379
518
  }
380
- function ne(e) {
381
- return at(K(N - 1, we(e === 91 ? e + 2 : e === 40 ? e + 1 : e)));
519
+ function fe(e) {
520
+ return St(de(D - 1, De(e === 91 ? e + 2 : e === 40 ? e + 1 : e)));
382
521
  }
383
- function $n(e) {
384
- for (; (M = B()) && M < 33; )
385
- R();
386
- return q(e) > 2 || q(M) > 3 ? "" : " ";
522
+ function gn(e) {
523
+ for (; (L = O()) && L < 33; )
524
+ P();
525
+ return ie(e) > 2 || ie(L) > 3 ? "" : " ";
387
526
  }
388
- function _n(e, t) {
389
- for (; --t && R() && !(M < 48 || M > 102 || M > 57 && M < 65 || M > 70 && M < 97); )
527
+ function fn(e, t) {
528
+ for (; --t && P() && !(L < 48 || L > 102 || L > 57 && L < 65 || L > 70 && L < 97); )
390
529
  ;
391
- return K(e, te() + (t < 6 && B() == 32 && R() == 32));
530
+ return de(e, ge() + (t < 6 && O() == 32 && P() == 32));
392
531
  }
393
- function we(e) {
394
- for (; R(); )
395
- switch (M) {
532
+ function De(e) {
533
+ for (; P(); )
534
+ switch (L) {
396
535
  // ] ) " '
397
536
  case e:
398
- return N;
537
+ return D;
399
538
  // " '
400
539
  case 34:
401
540
  case 39:
402
- e !== 34 && e !== 39 && we(M);
541
+ e !== 34 && e !== 39 && De(L);
403
542
  break;
404
543
  // (
405
544
  case 40:
406
- e === 41 && we(e);
545
+ e === 41 && De(e);
407
546
  break;
408
547
  // \
409
548
  case 92:
410
- R();
549
+ P();
411
550
  break;
412
551
  }
413
- return N;
552
+ return D;
414
553
  }
415
- function zn(e, t) {
416
- for (; R() && e + M !== 57; )
417
- if (e + M === 84 && B() === 47)
554
+ function bn(e, t) {
555
+ for (; P() && e + L !== 57; )
556
+ if (e + L === 84 && O() === 47)
418
557
  break;
419
- return "/*" + K(t, N - 1) + "*" + ue(e === 47 ? e : R());
558
+ return "/*" + de(t, D - 1) + "*" + ye(e === 47 ? e : P());
420
559
  }
421
- function Gn(e) {
422
- for (; !q(B()); )
423
- R();
424
- return K(e, N);
560
+ function wn(e) {
561
+ for (; !ie(O()); )
562
+ P();
563
+ return de(e, D);
425
564
  }
426
- function Un(e) {
427
- return dt(re("", null, null, null, [""], e = lt(e), 0, [0], e));
565
+ function mn(e) {
566
+ return Et(be("", null, null, null, [""], e = Mt(e), 0, [0], e));
428
567
  }
429
- function re(e, t, o, r, i, s, l, a, d) {
430
- for (var k = 0, h = 0, u = l, c = 0, p = 0, b = 0, g = 1, x = 1, m = 1, T = 0, S = "", F = i, j = s, A = r, y = S; x; )
431
- switch (b = T, T = R()) {
568
+ function be(e, t, o, n, i, s, d, l, h) {
569
+ for (var f = 0, u = 0, p = d, a = 0, w = 0, m = 0, g = 1, y = 1, v = 1, M = 0, R = "", Y = i, F = s, B = n, T = R; y; )
570
+ switch (m = M, M = P()) {
432
571
  // (
433
572
  case 40:
434
- if (b != 108 && E(y, u - 1) == 58) {
435
- be(y += v(ne(T), "&", "&\f"), "&\f") != -1 && (m = -1);
573
+ if (m != 108 && W(T, p - 1) == 58) {
574
+ Ae(T += x(fe(M), "&", "&\f"), "&\f") != -1 && (v = -1);
436
575
  break;
437
576
  }
438
577
  // " ' [
439
578
  case 34:
440
579
  case 39:
441
580
  case 91:
442
- y += ne(T);
581
+ T += fe(M);
443
582
  break;
444
583
  // \t \n \r \s
445
584
  case 9:
446
585
  case 10:
447
586
  case 13:
448
587
  case 32:
449
- y += $n(b);
588
+ T += gn(m);
450
589
  break;
451
590
  // \
452
591
  case 92:
453
- y += _n(te() - 1, 7);
592
+ T += fn(ge() - 1, 7);
454
593
  continue;
455
594
  // /
456
595
  case 47:
457
- switch (B()) {
596
+ switch (O()) {
458
597
  case 42:
459
598
  case 47:
460
- Q(Zn(zn(R(), te()), t, o), d);
599
+ pe(kn(bn(P(), ge()), t, o), h);
461
600
  break;
462
601
  default:
463
- y += "/";
602
+ T += "/";
464
603
  }
465
604
  break;
466
605
  // {
467
606
  case 123 * g:
468
- a[k++] = D(y) * m;
607
+ l[f++] = V(T) * v;
469
608
  // } ; \0
470
609
  case 125 * g:
471
610
  case 59:
472
611
  case 0:
473
- switch (T) {
612
+ switch (M) {
474
613
  // \0 }
475
614
  case 0:
476
615
  case 125:
477
- x = 0;
616
+ y = 0;
478
617
  // ;
479
- case 59 + h:
480
- m == -1 && (y = v(y, /\f/g, "")), p > 0 && D(y) - u && Q(p > 32 ? Be(y + ";", r, o, u - 1) : Be(v(y, " ", "") + ";", r, o, u - 2), d);
618
+ case 59 + u:
619
+ v == -1 && (T = x(T, /\f/g, "")), w > 0 && V(T) - p && pe(w > 32 ? ot(T + ";", n, o, p - 1) : ot(x(T, " ", "") + ";", n, o, p - 2), h);
481
620
  break;
482
621
  // @ ;
483
622
  case 59:
484
- y += ";";
623
+ T += ";";
485
624
  // { rule/at-rule
486
625
  default:
487
- if (Q(A = De(y, t, o, k, h, i, a, S, F = [], j = [], u), s), T === 123)
488
- if (h === 0)
489
- re(y, t, A, A, F, s, u, a, j);
626
+ if (pe(B = nt(T, t, o, f, u, i, l, R, Y = [], F = [], p), s), M === 123)
627
+ if (u === 0)
628
+ be(T, t, B, B, Y, s, p, l, F);
490
629
  else
491
- switch (c === 99 && E(y, 3) === 110 ? 100 : c) {
630
+ switch (a === 99 && W(T, 3) === 110 ? 100 : a) {
492
631
  // d l m s
493
632
  case 100:
494
633
  case 108:
495
634
  case 109:
496
635
  case 115:
497
- re(e, A, A, r && Q(De(e, A, A, 0, 0, i, a, S, i, F = [], u), j), i, j, u, a, r ? F : j);
636
+ be(e, B, B, n && pe(nt(e, B, B, 0, 0, i, l, R, i, Y = [], p), F), i, F, p, l, n ? Y : F);
498
637
  break;
499
638
  default:
500
- re(y, A, A, A, [""], j, 0, a, j);
639
+ be(T, B, B, B, [""], F, 0, l, F);
501
640
  }
502
641
  }
503
- k = h = p = 0, g = m = 1, S = y = "", u = l;
642
+ f = u = w = 0, g = v = 1, R = T = "", p = d;
504
643
  break;
505
644
  // :
506
645
  case 58:
507
- u = 1 + D(y), p = b;
646
+ p = 1 + V(T), w = m;
508
647
  default:
509
648
  if (g < 1) {
510
- if (T == 123)
649
+ if (M == 123)
511
650
  --g;
512
- else if (T == 125 && g++ == 0 && Hn() == 125)
651
+ else if (M == 125 && g++ == 0 && pn() == 125)
513
652
  continue;
514
653
  }
515
- switch (y += ue(T), T * g) {
654
+ switch (T += ye(M), M * g) {
516
655
  // &
517
656
  case 38:
518
- m = h > 0 ? 1 : (y += "\f", -1);
657
+ v = u > 0 ? 1 : (T += "\f", -1);
519
658
  break;
520
659
  // ,
521
660
  case 44:
522
- a[k++] = (D(y) - 1) * m, m = 1;
661
+ l[f++] = (V(T) - 1) * v, v = 1;
523
662
  break;
524
663
  // @
525
664
  case 64:
526
- B() === 45 && (y += ne(R())), c = B(), h = u = D(S = y += Gn(te())), T++;
665
+ O() === 45 && (T += fe(P())), a = O(), u = p = V(R = T += wn(ge())), M++;
527
666
  break;
528
667
  // -
529
668
  case 45:
530
- b === 45 && D(y) == 2 && (g = 0);
669
+ m === 45 && V(T) == 2 && (g = 0);
531
670
  }
532
671
  }
533
672
  return s;
534
673
  }
535
- function De(e, t, o, r, i, s, l, a, d, k, h) {
536
- for (var u = i - 1, c = i === 0 ? s : [""], p = Te(c), b = 0, g = 0, x = 0; b < r; ++b)
537
- for (var m = 0, T = X(e, u + 1, u = Bn(g = l[b])), S = e; m < p; ++m)
538
- (S = at(g > 0 ? c[m] + " " + T : v(T, /&\f/g, c[m]))) && (d[x++] = S);
539
- return ge(e, t, o, i === 0 ? xe : a, d, k, h);
674
+ function nt(e, t, o, n, i, s, d, l, h, f, u) {
675
+ for (var p = i - 1, a = i === 0 ? s : [""], w = He(a), m = 0, g = 0, y = 0; m < n; ++m)
676
+ for (var v = 0, M = se(e, p + 1, p = an(g = d[m])), R = e; v < w; ++v)
677
+ (R = St(g > 0 ? a[v] + " " + M : x(M, /&\f/g, a[v]))) && (h[y++] = R);
678
+ return Se(e, t, o, i === 0 ? Fe : l, h, f, u);
540
679
  }
541
- function Zn(e, t, o) {
542
- return ge(e, t, o, st, ue(On()), X(e, 2, -2), 0);
680
+ function kn(e, t, o) {
681
+ return Se(e, t, o, yt, ye(un()), se(e, 2, -2), 0);
543
682
  }
544
- function Be(e, t, o, r) {
545
- return ge(e, t, o, ye, X(e, 0, r), X(e, r + 1, -1), r);
683
+ function ot(e, t, o, n) {
684
+ return Se(e, t, o, $e, se(e, 0, n), se(e, n + 1, -1), n);
546
685
  }
547
- function z(e, t) {
548
- for (var o = "", r = Te(e), i = 0; i < r; i++)
686
+ function q(e, t) {
687
+ for (var o = "", n = He(e), i = 0; i < n; i++)
549
688
  o += t(e[i], i, e, t) || "";
550
689
  return o;
551
690
  }
552
- function Yn(e, t, o, r) {
691
+ function vn(e, t, o, n) {
553
692
  switch (e.type) {
554
- case Dn:
693
+ case sn:
555
694
  if (e.children.length) break;
556
- case An:
557
- case ye:
695
+ case on:
696
+ case $e:
558
697
  return e.return = e.return || e.value;
559
- case st:
698
+ case yt:
560
699
  return "";
561
- case it:
562
- return e.return = e.value + "{" + z(e.children, r) + "}";
563
- case xe:
700
+ case Tt:
701
+ return e.return = e.value + "{" + q(e.children, n) + "}";
702
+ case Fe:
564
703
  e.value = e.props.join(",");
565
704
  }
566
- return D(o = z(e.children, r)) ? e.return = e.value + "{" + o + "}" : "";
705
+ return V(o = q(e.children, n)) ? e.return = e.value + "{" + o + "}" : "";
567
706
  }
568
- function Xn(e) {
569
- var t = Te(e);
570
- return function(o, r, i, s) {
571
- for (var l = "", a = 0; a < t; a++)
572
- l += e[a](o, r, i, s) || "";
573
- return l;
707
+ function Cn(e) {
708
+ var t = He(e);
709
+ return function(o, n, i, s) {
710
+ for (var d = "", l = 0; l < t; l++)
711
+ d += e[l](o, n, i, s) || "";
712
+ return d;
574
713
  };
575
714
  }
576
- function qn(e) {
715
+ function xn(e) {
577
716
  return function(t) {
578
717
  t.root || (t = t.return) && e(t);
579
718
  };
580
719
  }
581
- var Jn = function(t, o, r) {
582
- for (var i = 0, s = 0; i = s, s = B(), i === 38 && s === 12 && (o[r] = 1), !q(s); )
583
- R();
584
- return K(t, N);
585
- }, Kn = function(t, o) {
586
- var r = -1, i = 44;
720
+ var yn = function(t, o, n) {
721
+ for (var i = 0, s = 0; i = s, s = O(), i === 38 && s === 12 && (o[n] = 1), !ie(s); )
722
+ P();
723
+ return de(t, D);
724
+ }, Tn = function(t, o) {
725
+ var n = -1, i = 44;
587
726
  do
588
- switch (q(i)) {
727
+ switch (ie(i)) {
589
728
  case 0:
590
- i === 38 && B() === 12 && (o[r] = 1), t[r] += Jn(N - 1, o, r);
729
+ i === 38 && O() === 12 && (o[n] = 1), t[n] += yn(D - 1, o, n);
591
730
  break;
592
731
  case 2:
593
- t[r] += ne(i);
732
+ t[n] += fe(i);
594
733
  break;
595
734
  case 4:
596
735
  if (i === 44) {
597
- t[++r] = B() === 58 ? "&\f" : "", o[r] = t[r].length;
736
+ t[++n] = O() === 58 ? "&\f" : "", o[n] = t[n].length;
598
737
  break;
599
738
  }
600
739
  // fallthrough
601
740
  default:
602
- t[r] += ue(i);
741
+ t[n] += ye(i);
603
742
  }
604
- while (i = R());
743
+ while (i = P());
605
744
  return t;
606
- }, Qn = function(t, o) {
607
- return dt(Kn(lt(t), o));
608
- }, Pe = /* @__PURE__ */ new WeakMap(), er = function(t) {
745
+ }, Sn = function(t, o) {
746
+ return Et(Tn(Mt(t), o));
747
+ }, st = /* @__PURE__ */ new WeakMap(), In = function(t) {
609
748
  if (!(t.type !== "rule" || !t.parent || // positive .length indicates that this rule contains pseudo
610
749
  // negative .length indicates that this rule has been already prefixed
611
750
  t.length < 1)) {
612
- for (var o = t.value, r = t.parent, i = t.column === r.column && t.line === r.line; r.type !== "rule"; )
613
- if (r = r.parent, !r) return;
614
- if (!(t.props.length === 1 && o.charCodeAt(0) !== 58 && !Pe.get(r)) && !i) {
615
- Pe.set(t, !0);
616
- for (var s = [], l = Qn(o, s), a = r.props, d = 0, k = 0; d < l.length; d++)
617
- for (var h = 0; h < a.length; h++, k++)
618
- t.props[k] = s[d] ? l[d].replace(/&\f/g, a[h]) : a[h] + " " + l[d];
751
+ for (var o = t.value, n = t.parent, i = t.column === n.column && t.line === n.line; n.type !== "rule"; )
752
+ if (n = n.parent, !n) return;
753
+ if (!(t.props.length === 1 && o.charCodeAt(0) !== 58 && !st.get(n)) && !i) {
754
+ st.set(t, !0);
755
+ for (var s = [], d = Sn(o, s), l = n.props, h = 0, f = 0; h < d.length; h++)
756
+ for (var u = 0; u < l.length; u++, f++)
757
+ t.props[f] = s[h] ? d[h].replace(/&\f/g, l[u]) : l[u] + " " + d[h];
619
758
  }
620
759
  }
621
- }, tr = function(t) {
760
+ }, Mn = function(t) {
622
761
  if (t.type === "decl") {
623
762
  var o = t.value;
624
763
  // charcode for l
@@ -626,8 +765,8 @@ var Jn = function(t, o, r) {
626
765
  o.charCodeAt(2) === 98 && (t.return = "", t.value = "");
627
766
  }
628
767
  };
629
- function ht(e, t) {
630
- switch (jn(e, t)) {
768
+ function Lt(e, t) {
769
+ switch (cn(e, t)) {
631
770
  // color-adjust
632
771
  case 5103:
633
772
  return C + "print-" + e + e;
@@ -667,51 +806,51 @@ function ht(e, t) {
667
806
  case 4810:
668
807
  case 6968:
669
808
  case 2756:
670
- return C + e + ae + e + L + e + e;
809
+ return C + e + ve + e + N + e + e;
671
810
  // flex, flex-direction
672
811
  case 6828:
673
812
  case 4268:
674
- return C + e + L + e + e;
813
+ return C + e + N + e + e;
675
814
  // order
676
815
  case 6165:
677
- return C + e + L + "flex-" + e + e;
816
+ return C + e + N + "flex-" + e + e;
678
817
  // align-items
679
818
  case 5187:
680
- return C + e + v(e, /(\w+).+(:[^]+)/, C + "box-$1$2" + L + "flex-$1$2") + e;
819
+ return C + e + x(e, /(\w+).+(:[^]+)/, C + "box-$1$2" + N + "flex-$1$2") + e;
681
820
  // align-self
682
821
  case 5443:
683
- return C + e + L + "flex-item-" + v(e, /flex-|-self/, "") + e;
822
+ return C + e + N + "flex-item-" + x(e, /flex-|-self/, "") + e;
684
823
  // align-content
685
824
  case 4675:
686
- return C + e + L + "flex-line-pack" + v(e, /align-content|flex-|-self/, "") + e;
825
+ return C + e + N + "flex-line-pack" + x(e, /align-content|flex-|-self/, "") + e;
687
826
  // flex-shrink
688
827
  case 5548:
689
- return C + e + L + v(e, "shrink", "negative") + e;
828
+ return C + e + N + x(e, "shrink", "negative") + e;
690
829
  // flex-basis
691
830
  case 5292:
692
- return C + e + L + v(e, "basis", "preferred-size") + e;
831
+ return C + e + N + x(e, "basis", "preferred-size") + e;
693
832
  // flex-grow
694
833
  case 6060:
695
- return C + "box-" + v(e, "-grow", "") + C + e + L + v(e, "grow", "positive") + e;
834
+ return C + "box-" + x(e, "-grow", "") + C + e + N + x(e, "grow", "positive") + e;
696
835
  // transition
697
836
  case 4554:
698
- return C + v(e, /([^-])(transform)/g, "$1" + C + "$2") + e;
837
+ return C + x(e, /([^-])(transform)/g, "$1" + C + "$2") + e;
699
838
  // cursor
700
839
  case 6187:
701
- return v(v(v(e, /(zoom-|grab)/, C + "$1"), /(image-set)/, C + "$1"), e, "") + e;
840
+ return x(x(x(e, /(zoom-|grab)/, C + "$1"), /(image-set)/, C + "$1"), e, "") + e;
702
841
  // background, background-image
703
842
  case 5495:
704
843
  case 3959:
705
- return v(e, /(image-set\([^]*)/, C + "$1$`$1");
844
+ return x(e, /(image-set\([^]*)/, C + "$1$`$1");
706
845
  // justify-content
707
846
  case 4968:
708
- return v(v(e, /(.+:)(flex-)?(.*)/, C + "box-pack:$3" + L + "flex-pack:$3"), /s.+-b[^;]+/, "justify") + C + e + e;
847
+ return x(x(e, /(.+:)(flex-)?(.*)/, C + "box-pack:$3" + N + "flex-pack:$3"), /s.+-b[^;]+/, "justify") + C + e + e;
709
848
  // (margin|padding)-inline-(start|end)
710
849
  case 4095:
711
850
  case 3583:
712
851
  case 4068:
713
852
  case 2532:
714
- return v(e, /(.+)-inline(.+)/, C + "$1$2") + e;
853
+ return x(e, /(.+)-inline(.+)/, C + "$1$2") + e;
715
854
  // (min|max)?(width|height|inline-size|block-size)
716
855
  case 8116:
717
856
  case 7059:
@@ -725,116 +864,116 @@ function ht(e, t) {
725
864
  case 5789:
726
865
  case 5021:
727
866
  case 4765:
728
- if (D(e) - 1 - t > 6) switch (E(e, t + 1)) {
867
+ if (V(e) - 1 - t > 6) switch (W(e, t + 1)) {
729
868
  // (m)ax-content, (m)in-content
730
869
  case 109:
731
- if (E(e, t + 4) !== 45) break;
870
+ if (W(e, t + 4) !== 45) break;
732
871
  // (f)ill-available, (f)it-content
733
872
  case 102:
734
- return v(e, /(.+:)(.+)-([^]+)/, "$1" + C + "$2-$3$1" + ae + (E(e, t + 3) == 108 ? "$3" : "$2-$3")) + e;
873
+ return x(e, /(.+:)(.+)-([^]+)/, "$1" + C + "$2-$3$1" + ve + (W(e, t + 3) == 108 ? "$3" : "$2-$3")) + e;
735
874
  // (s)tretch
736
875
  case 115:
737
- return ~be(e, "stretch") ? ht(v(e, "stretch", "fill-available"), t) + e : e;
876
+ return ~Ae(e, "stretch") ? Lt(x(e, "stretch", "fill-available"), t) + e : e;
738
877
  }
739
878
  break;
740
879
  // position: sticky
741
880
  case 4949:
742
- if (E(e, t + 1) !== 115) break;
881
+ if (W(e, t + 1) !== 115) break;
743
882
  // display: (flex|inline-flex)
744
883
  case 6444:
745
- switch (E(e, D(e) - 3 - (~be(e, "!important") && 10))) {
884
+ switch (W(e, V(e) - 3 - (~Ae(e, "!important") && 10))) {
746
885
  // stic(k)y
747
886
  case 107:
748
- return v(e, ":", ":" + C) + e;
887
+ return x(e, ":", ":" + C) + e;
749
888
  // (inline-)?fl(e)x
750
889
  case 101:
751
- return v(e, /(.+:)([^;!]+)(;|!.+)?/, "$1" + C + (E(e, 14) === 45 ? "inline-" : "") + "box$3$1" + C + "$2$3$1" + L + "$2box$3") + e;
890
+ return x(e, /(.+:)([^;!]+)(;|!.+)?/, "$1" + C + (W(e, 14) === 45 ? "inline-" : "") + "box$3$1" + C + "$2$3$1" + N + "$2box$3") + e;
752
891
  }
753
892
  break;
754
893
  // writing-mode
755
894
  case 5936:
756
- switch (E(e, t + 11)) {
895
+ switch (W(e, t + 11)) {
757
896
  // vertical-l(r)
758
897
  case 114:
759
- return C + e + L + v(e, /[svh]\w+-[tblr]{2}/, "tb") + e;
898
+ return C + e + N + x(e, /[svh]\w+-[tblr]{2}/, "tb") + e;
760
899
  // vertical-r(l)
761
900
  case 108:
762
- return C + e + L + v(e, /[svh]\w+-[tblr]{2}/, "tb-rl") + e;
901
+ return C + e + N + x(e, /[svh]\w+-[tblr]{2}/, "tb-rl") + e;
763
902
  // horizontal(-)tb
764
903
  case 45:
765
- return C + e + L + v(e, /[svh]\w+-[tblr]{2}/, "lr") + e;
904
+ return C + e + N + x(e, /[svh]\w+-[tblr]{2}/, "lr") + e;
766
905
  }
767
- return C + e + L + e + e;
906
+ return C + e + N + e + e;
768
907
  }
769
908
  return e;
770
909
  }
771
- var nr = function(t, o, r, i) {
910
+ var En = function(t, o, n, i) {
772
911
  if (t.length > -1 && !t.return) switch (t.type) {
773
- case ye:
774
- t.return = ht(t.value, t.length);
912
+ case $e:
913
+ t.return = Lt(t.value, t.length);
775
914
  break;
776
- case it:
777
- return z([Y(t, {
778
- value: v(t.value, "@", "@" + C)
915
+ case Tt:
916
+ return q([ne(t, {
917
+ value: x(t.value, "@", "@" + C)
779
918
  })], i);
780
- case xe:
781
- if (t.length) return Fn(t.props, function(s) {
782
- switch (Vn(s, /(::plac\w+|:read-\w+)/)) {
919
+ case Fe:
920
+ if (t.length) return hn(t.props, function(s) {
921
+ switch (dn(s, /(::plac\w+|:read-\w+)/)) {
783
922
  // :read-(only|write)
784
923
  case ":read-only":
785
924
  case ":read-write":
786
- return z([Y(t, {
787
- props: [v(s, /:(read-\w+)/, ":" + ae + "$1")]
925
+ return q([ne(t, {
926
+ props: [x(s, /:(read-\w+)/, ":" + ve + "$1")]
788
927
  })], i);
789
928
  // :placeholder
790
929
  case "::placeholder":
791
- return z([Y(t, {
792
- props: [v(s, /:(plac\w+)/, ":" + C + "input-$1")]
793
- }), Y(t, {
794
- props: [v(s, /:(plac\w+)/, ":" + ae + "$1")]
795
- }), Y(t, {
796
- props: [v(s, /:(plac\w+)/, L + "input-$1")]
930
+ return q([ne(t, {
931
+ props: [x(s, /:(plac\w+)/, ":" + C + "input-$1")]
932
+ }), ne(t, {
933
+ props: [x(s, /:(plac\w+)/, ":" + ve + "$1")]
934
+ }), ne(t, {
935
+ props: [x(s, /:(plac\w+)/, N + "input-$1")]
797
936
  })], i);
798
937
  }
799
938
  return "";
800
939
  });
801
940
  }
802
- }, rr = [nr], or = function(t) {
941
+ }, Ln = [En], Rn = function(t) {
803
942
  var o = t.key;
804
943
  if (o === "css") {
805
- var r = document.querySelectorAll("style[data-emotion]:not([data-s])");
806
- Array.prototype.forEach.call(r, function(g) {
807
- var x = g.getAttribute("data-emotion");
808
- x.indexOf(" ") !== -1 && (document.head.appendChild(g), g.setAttribute("data-s", ""));
944
+ var n = document.querySelectorAll("style[data-emotion]:not([data-s])");
945
+ Array.prototype.forEach.call(n, function(g) {
946
+ var y = g.getAttribute("data-emotion");
947
+ y.indexOf(" ") !== -1 && (document.head.appendChild(g), g.setAttribute("data-s", ""));
809
948
  });
810
949
  }
811
- var i = t.stylisPlugins || rr, s = {}, l, a = [];
812
- l = t.container || document.head, Array.prototype.forEach.call(
950
+ var i = t.stylisPlugins || Ln, s = {}, d, l = [];
951
+ d = t.container || document.head, Array.prototype.forEach.call(
813
952
  // this means we will ignore elements which don't have a space in them which
814
953
  // means that the style elements we're looking at are only Emotion 11 server-rendered style elements
815
954
  document.querySelectorAll('style[data-emotion^="' + o + ' "]'),
816
955
  function(g) {
817
- for (var x = g.getAttribute("data-emotion").split(" "), m = 1; m < x.length; m++)
818
- s[x[m]] = !0;
819
- a.push(g);
956
+ for (var y = g.getAttribute("data-emotion").split(" "), v = 1; v < y.length; v++)
957
+ s[y[v]] = !0;
958
+ l.push(g);
820
959
  }
821
960
  );
822
- var d, k = [er, tr];
961
+ var h, f = [In, Mn];
823
962
  {
824
- var h, u = [Yn, qn(function(g) {
825
- h.insert(g);
826
- })], c = Xn(k.concat(i, u)), p = function(x) {
827
- return z(Un(x), c);
963
+ var u, p = [vn, xn(function(g) {
964
+ u.insert(g);
965
+ })], a = Cn(f.concat(i, p)), w = function(y) {
966
+ return q(mn(y), a);
828
967
  };
829
- d = function(x, m, T, S) {
830
- h = T, p(x ? x + "{" + m.styles + "}" : m.styles), S && (b.inserted[m.name] = !0);
968
+ h = function(y, v, M, R) {
969
+ u = M, w(y ? y + "{" + v.styles + "}" : v.styles), R && (m.inserted[v.name] = !0);
831
970
  };
832
971
  }
833
- var b = {
972
+ var m = {
834
973
  key: o,
835
- sheet: new Rn({
974
+ sheet: new nn({
836
975
  key: o,
837
- container: l,
976
+ container: d,
838
977
  nonce: t.nonce,
839
978
  speedy: t.speedy,
840
979
  prepend: t.prepend,
@@ -843,68 +982,68 @@ var nr = function(t, o, r, i) {
843
982
  nonce: t.nonce,
844
983
  inserted: s,
845
984
  registered: {},
846
- insert: d
985
+ insert: h
847
986
  };
848
- return b.sheet.hydrate(a), b;
987
+ return m.sheet.hydrate(l), m;
849
988
  };
850
- const ut = ({ children: e, viewport: t, containerProps: o }) => {
851
- const r = G(null), { theme: i } = $(), [s, l] = P({
989
+ const Rt = ({ children: e, viewport: t, containerProps: o }) => {
990
+ const n = K(null), { theme: i } = U(), [s, d] = j({
852
991
  width: 0,
853
992
  height: 0
854
993
  });
855
- V(() => {
856
- const b = cn((x) => {
857
- const m = x.at(0)?.target;
858
- if (!m) return;
859
- const { width: T, height: S } = m.getBoundingClientRect();
860
- l(() => ({
861
- width: T,
862
- height: S
994
+ z(() => {
995
+ const m = jr((y) => {
996
+ const v = y.at(0)?.target;
997
+ if (!v) return;
998
+ const { width: M, height: R } = v.getBoundingClientRect();
999
+ d(() => ({
1000
+ width: M,
1001
+ height: R
863
1002
  }));
864
- }, 200), g = new ResizeObserver(b);
865
- return r.current && g.observe(r.current), () => g.disconnect();
1003
+ }, 200), g = new ResizeObserver(m);
1004
+ return n.current && g.observe(n.current), () => g.disconnect();
866
1005
  }, []);
867
- const a = Ne(t?.width) ? t.width(s.width) : t?.width, d = Ne(t?.height) ? t.height(s.height) : t?.height, k = se(a) ? s.width / a : 1, h = se(d) ? s.height / d : 1, u = Math.min(k, h, 1), c = (d ?? s.height / u) || 0, p = (a ?? s.width / u) || 0;
868
- return /* @__PURE__ */ n("div", { ...o, css: { padding: 8, width: "100%", height: "100%", backgroundColor: fe.ink["1s"] }, children: /* @__PURE__ */ n("div", { css: { position: "relative", overflow: "hidden", width: "100%", height: "100%" }, ref: r, children: /* @__PURE__ */ n(
1006
+ const l = Qe(t?.width) ? t.width(s.width) : t?.width, h = Qe(t?.height) ? t.height(s.height) : t?.height, f = ke(l) ? s.width / l : 1, u = ke(h) ? s.height / h : 1, p = Math.min(f, u, 1), a = (h ?? s.height / p) || 0, w = (l ?? s.width / p) || 0;
1007
+ return /* @__PURE__ */ r("div", { ...o, css: { padding: 8, width: "100%", height: "100%", backgroundColor: We.ink["1s"] }, children: /* @__PURE__ */ r("div", { css: { position: "relative", overflow: "hidden", width: "100%", height: "100%" }, ref: n, children: /* @__PURE__ */ r(
869
1008
  "div",
870
1009
  {
871
1010
  style: {
872
- transform: `scale(${u})`,
873
- width: p,
874
- height: c,
875
- marginLeft: (s.width - p) / 2,
876
- marginTop: (s.height - c) / 2
1011
+ transform: `scale(${p})`,
1012
+ width: w,
1013
+ height: a,
1014
+ marginLeft: (s.width - w) / 2,
1015
+ marginTop: (s.height - a) / 2
877
1016
  },
878
1017
  css: { position: "absolute" },
879
- children: /* @__PURE__ */ n(
880
- Tn,
1018
+ children: /* @__PURE__ */ r(
1019
+ qr,
881
1020
  {
882
1021
  sandbox: "allow-same-origin allow-scripts allow-popups allow-presentation",
883
1022
  allow: "autoplay; encrypted-media",
884
- width: a ?? "100%",
885
- height: d ?? "100%",
886
- children: /* @__PURE__ */ n(sr, { theme: i, children: e })
1023
+ width: l ?? "100%",
1024
+ height: h ?? "100%",
1025
+ children: /* @__PURE__ */ r(Wn, { theme: i, children: e })
887
1026
  }
888
1027
  )
889
1028
  }
890
1029
  ) }) });
891
- }, sr = ({ children: e, theme: t }) => {
892
- const { document: o, window: r } = ve(), [i, s] = P(!1), l = G(window.customElements.define.bind(window.customElements));
893
- V(() => {
894
- const d = l.current;
895
- return r && (window.customElements.define = function(k, h, u) {
896
- window.customElements.get(k) || r.customElements.define(k, h, u), d(k, h, u);
1030
+ }, Wn = ({ children: e, theme: t }) => {
1031
+ const { document: o, window: n } = Oe(), [i, s] = j(!1), d = K(window.customElements.define.bind(window.customElements));
1032
+ z(() => {
1033
+ const h = d.current;
1034
+ return n && (window.customElements.define = function(f, u, p) {
1035
+ window.customElements.get(f) || n.customElements.define(f, u, p), h(f, u, p);
897
1036
  }), o?.head.replaceWith(document.head.cloneNode(!0)), s(!0), () => {
898
- window.customElements.define = d;
1037
+ window.customElements.define = h;
899
1038
  };
900
- }, [o, r]);
901
- const a = or({
1039
+ }, [o, n]);
1040
+ const l = Rn({
902
1041
  key: "css",
903
1042
  container: o?.head
904
1043
  });
905
- return i ? /* @__PURE__ */ n(Oe, { children: /* @__PURE__ */ w(wn, { value: a, children: [
906
- /* @__PURE__ */ n(
907
- kn,
1044
+ return i ? /* @__PURE__ */ r(ct, { children: /* @__PURE__ */ b(zr, { value: l, children: [
1045
+ /* @__PURE__ */ r(
1046
+ _r,
908
1047
  {
909
1048
  styles: {
910
1049
  ".frame-content": {
@@ -913,23 +1052,23 @@ const ut = ({ children: e, viewport: t, containerProps: o }) => {
913
1052
  minHeight: "100vh",
914
1053
  justifyContent: "center"
915
1054
  },
916
- [`& *[${Ie.DATA_NODE_DROP_TARGET}=${Me.True}]`]: {
1055
+ [`& *[${Ye.DATA_NODE_DROP_TARGET}=${Ze.True}]`]: {
917
1056
  outlineWidth: 1,
918
1057
  outlineStyle: "solid",
919
1058
  outlineOffset: -1,
920
1059
  outlineColor: "green"
921
1060
  },
922
- [`& *[${Ie.DATA_NODE_DROP_TARGET_ERROR}=${Me.True}]`]: {
1061
+ [`& *[${Ye.DATA_NODE_DROP_TARGET_ERROR}=${Ze.True}]`]: {
923
1062
  outlineColor: "red"
924
1063
  }
925
1064
  }
926
1065
  }
927
1066
  ),
928
- /* @__PURE__ */ n(fn, { root: o?.body, theme: t, children: e })
1067
+ /* @__PURE__ */ r($r, { root: o?.body, theme: t, children: e })
929
1068
  ] }) }) : null;
930
1069
  };
931
- var O = /* @__PURE__ */ ((e) => (e[e.Pixels = 0] = "Pixels", e[e.Unitless = 1] = "Unitless", e))(O || {});
932
- const ir = [
1070
+ var _ = /* @__PURE__ */ ((e) => (e[e.Pixels = 0] = "Pixels", e[e.Unitless = 1] = "Unitless", e))(_ || {});
1071
+ const Nn = [
933
1072
  {
934
1073
  label: "Pixels",
935
1074
  value: 0
@@ -940,55 +1079,55 @@ const ir = [
940
1079
  value: 1
941
1080
  /* Unitless */
942
1081
  }
943
- ], mo = ({ name: e, responsive: t = !0, value: o, onChange: r }) => {
944
- const i = se(o?.lineHeight) ? O.Unitless : O.Pixels, s = i === O.Unitless ? 0.1 : 1, l = kt(o?.lineHeight, "float"), a = ({ unit: c, value: p }) => {
945
- if (ee(p)) {
946
- r?.({
947
- lineHeight: c === O.Unitless ? 1 : p
1082
+ ], Fo = ({ name: e, responsive: t = !0, value: o, onChange: n }) => {
1083
+ const i = ke(o?.lineHeight) ? _.Unitless : _.Pixels, s = i === _.Unitless ? 0.1 : 1, d = Ut(o?.lineHeight, "float"), l = ({ unit: a, value: w }) => {
1084
+ if ($(w)) {
1085
+ n?.({
1086
+ lineHeight: a === _.Unitless ? 1 : w
948
1087
  });
949
1088
  return;
950
1089
  }
951
- r?.({
952
- lineHeight: c === O.Unitless ? Number(p.toFixed(1)) : `${p}px`
1090
+ n?.({
1091
+ lineHeight: a === _.Unitless ? Number(w.toFixed(1)) : `${w}px`
953
1092
  });
954
- }, d = (c) => {
955
- a({ unit: Number(c.target.value) });
956
- }, k = (c) => {
957
- const p = isNaN(c.target.valueAsNumber) ? void 0 : c.target.valueAsNumber;
958
- a({ unit: i, value: p });
959
- }, h = (c) => {
960
- c.stopPropagation(), !ee(l) && a({ unit: i, value: Math.max(l + s, 0) });
961
- }, u = (c) => {
962
- c.stopPropagation(), !ee(l) && a({ unit: i, value: Math.max(l - s, 0) });
1093
+ }, h = (a) => {
1094
+ l({ unit: Number(a.target.value) });
1095
+ }, f = (a) => {
1096
+ const w = isNaN(a.target.valueAsNumber) ? void 0 : a.target.valueAsNumber;
1097
+ l({ unit: i, value: w });
1098
+ }, u = (a) => {
1099
+ a.stopPropagation(), !$(d) && l({ unit: i, value: Math.max(d + s, 0) });
1100
+ }, p = (a) => {
1101
+ a.stopPropagation(), !$(d) && l({ unit: i, value: Math.max(d - s, 0) });
963
1102
  };
964
- return /* @__PURE__ */ w("div", { css: { display: "flex", flexDirection: "column", gap: 8 }, children: [
965
- /* @__PURE__ */ n(J, { responsive: t, name: e ?? "Line height", children: /* @__PURE__ */ n("div", { css: { display: "flex", alignItems: "center", gap: 4 }, children: ir.map((c) => /* @__PURE__ */ n(
966
- He,
1103
+ return /* @__PURE__ */ b("div", { css: { display: "flex", flexDirection: "column", gap: 8 }, children: [
1104
+ /* @__PURE__ */ r(ae, { responsive: t, name: e ?? "Line height", children: /* @__PURE__ */ r("div", { css: { display: "flex", alignItems: "center", gap: 4 }, children: Nn.map((a) => /* @__PURE__ */ r(
1105
+ dt,
967
1106
  {
968
- onChange: d,
969
- checked: c.value === i,
970
- value: c.value,
1107
+ onChange: h,
1108
+ checked: a.value === i,
1109
+ value: a.value,
971
1110
  name: "toolbar-line-height",
972
- children: c.label
1111
+ children: a.label
973
1112
  },
974
- c.value
1113
+ a.value
975
1114
  )) }) }),
976
- /* @__PURE__ */ n("div", { css: { display: "flex", justifyContent: "flex-end" }, children: /* @__PURE__ */ n("div", { css: { width: "50%" }, children: /* @__PURE__ */ n(
977
- mt,
1115
+ /* @__PURE__ */ r("div", { css: { display: "flex", justifyContent: "flex-end" }, children: /* @__PURE__ */ r("div", { css: { width: "50%" }, children: /* @__PURE__ */ r(
1116
+ Yt,
978
1117
  {
979
1118
  fractionDigits: 1,
980
- type: i === O.Unitless ? "decimal" : "integer",
981
- value: l ?? "",
982
- onChange: k,
983
- prefix: /* @__PURE__ */ n(W, { disabled: se(l) && l <= 0, onClick: u, children: /* @__PURE__ */ n(I, { source: Ct }) }),
984
- suffix: /* @__PURE__ */ n(W, { onClick: h, children: /* @__PURE__ */ n(I, { source: $e }) }),
1119
+ type: i === _.Unitless ? "decimal" : "integer",
1120
+ value: d ?? "",
1121
+ onChange: f,
1122
+ prefix: /* @__PURE__ */ r(A, { disabled: ke(d) && d <= 0, onClick: p, children: /* @__PURE__ */ r(I, { source: Zt }) }),
1123
+ suffix: /* @__PURE__ */ r(A, { onClick: u, children: /* @__PURE__ */ r(I, { source: ht }) }),
985
1124
  mode: "onBlur",
986
1125
  css: { textAlign: "center" },
987
1126
  placeholder: "normal"
988
1127
  }
989
1128
  ) }) })
990
1129
  ] });
991
- }, je = [
1130
+ }, it = [
992
1131
  {
993
1132
  label: "Block",
994
1133
  value: "block"
@@ -1017,18 +1156,18 @@ const ir = [
1017
1156
  label: "Inline Grid",
1018
1157
  value: "inline-grid"
1019
1158
  }
1020
- ], Co = ({
1159
+ ], $o = ({
1021
1160
  name: e,
1022
1161
  responsive: t = !1,
1023
1162
  availableDisplays: o,
1024
- onChange: r,
1163
+ onChange: n,
1025
1164
  value: i
1026
1165
  }) => {
1027
- const s = ee(o) ? je : je.filter((a) => o.includes(a.value)), l = (a) => {
1028
- r?.({ display: a });
1166
+ const s = $(o) ? it : it.filter((l) => o.includes(l.value)), d = (l) => {
1167
+ n?.({ display: l });
1029
1168
  };
1030
- return /* @__PURE__ */ n(J, { name: e ?? "Display", responsive: t, children: /* @__PURE__ */ n(
1031
- vt,
1169
+ return /* @__PURE__ */ r(ae, { name: e ?? "Display", responsive: t, children: /* @__PURE__ */ r(
1170
+ Xt,
1032
1171
  {
1033
1172
  css: {
1034
1173
  width: "50%"
@@ -1037,10 +1176,10 @@ const ir = [
1037
1176
  placeholder: "default",
1038
1177
  options: s,
1039
1178
  value: i?.display ?? null,
1040
- onChange: l
1179
+ onChange: d
1041
1180
  }
1042
1181
  ) });
1043
- }, vo = ({ value: e, onChange: t, name: o, responsive: r = !1 }) => {
1182
+ }, Ho = ({ value: e, onChange: t, name: o, responsive: n = !1 }) => {
1044
1183
  const i = {
1045
1184
  flexBasis: e?.flexBasis ?? "auto",
1046
1185
  flexGrow: e?.flexGrow ?? 0,
@@ -1064,28 +1203,28 @@ const ir = [
1064
1203
  flexShrink: 1
1065
1204
  }
1066
1205
  }
1067
- ], l = s.find((d) => ln(d.rawValue, i))?.value, a = (d) => {
1068
- const k = s.find((h) => h.value === Number(d.target.value));
1069
- k && t?.(k.rawValue);
1206
+ ], d = s.find((h) => Vr(h.rawValue, i))?.value, l = (h) => {
1207
+ const f = s.find((u) => u.value === Number(h.target.value));
1208
+ f && t?.(f.rawValue);
1070
1209
  };
1071
- return /* @__PURE__ */ n(J, { name: o ?? "Content", responsive: r, children: /* @__PURE__ */ n("div", { css: { display: "inline-flex", alignItems: "center", gap: 8 }, children: s.map((d) => /* @__PURE__ */ n(
1072
- He,
1210
+ return /* @__PURE__ */ r(ae, { name: o ?? "Content", responsive: n, children: /* @__PURE__ */ r("div", { css: { display: "inline-flex", alignItems: "center", gap: 8 }, children: s.map((h) => /* @__PURE__ */ r(
1211
+ dt,
1073
1212
  {
1074
- checked: d.value === l,
1075
- value: d.value,
1076
- onChange: a,
1077
- children: d.label
1213
+ checked: h.value === d,
1214
+ value: h.value,
1215
+ onChange: l,
1216
+ children: h.label
1078
1217
  },
1079
- d.value
1218
+ h.value
1080
1219
  )) }) });
1081
- }, xo = ({ name: e, value: t, onChange: o, responsive: r = !0 }) => {
1082
- const i = G(null), s = (l) => {
1220
+ }, zo = ({ name: e, value: t, onChange: o, responsive: n = !0 }) => {
1221
+ const i = K(null), s = (d) => {
1083
1222
  o?.({
1084
- minWidth: l
1223
+ minWidth: d
1085
1224
  });
1086
1225
  };
1087
- return /* @__PURE__ */ n(J, { name: e ?? "Min width", responsive: r, children: /* @__PURE__ */ n("div", { css: { position: "relative", width: "50%" }, children: /* @__PURE__ */ n(
1088
- xt,
1226
+ return /* @__PURE__ */ r(ae, { name: e ?? "Min width", responsive: n, children: /* @__PURE__ */ r("div", { css: { position: "relative", width: "50%" }, children: /* @__PURE__ */ r(
1227
+ qt,
1089
1228
  {
1090
1229
  fullWidth: !0,
1091
1230
  wrapRef: i,
@@ -1097,20 +1236,20 @@ const ir = [
1097
1236
  }
1098
1237
  }
1099
1238
  ) }) });
1100
- }, yo = ({ value: e, onChange: t }) => {
1101
- const [o, r] = P(!1), i = (l) => {
1102
- t?.({ ...e, sizeVariant: l });
1103
- }, s = (l) => {
1239
+ }, _o = ({ value: e, onChange: t }) => {
1240
+ const [o, n] = j(!1), i = (d) => {
1241
+ t?.({ ...e, sizeVariant: d });
1242
+ }, s = (d) => {
1104
1243
  t?.({
1105
1244
  ...e,
1106
1245
  css: {
1107
1246
  ...e?.css,
1108
- ...l
1247
+ ...d
1109
1248
  }
1110
1249
  });
1111
1250
  };
1112
- return /* @__PURE__ */ n(J, { name: "Text style", children: /* @__PURE__ */ w(yt, { open: o, onOpenChange: r, placement: "right", children: [
1113
- /* @__PURE__ */ n(Tt, { children: /* @__PURE__ */ w(
1251
+ return /* @__PURE__ */ r(ae, { name: "Text style", children: /* @__PURE__ */ b(Jt, { open: o, onOpenChange: n, placement: "right", children: [
1252
+ /* @__PURE__ */ r(Kt, { children: /* @__PURE__ */ b(
1114
1253
  "button",
1115
1254
  {
1116
1255
  css: [
@@ -1123,31 +1262,31 @@ const ir = [
1123
1262
  textAlign: "left",
1124
1263
  width: "50%",
1125
1264
  height: 32,
1126
- backgroundColor: f.palette.white["1s"],
1265
+ backgroundColor: c.palette.white["1s"],
1127
1266
  overflow: "hidden",
1128
1267
  textOverflow: "ellipsis",
1129
1268
  whiteSpace: "nowrap",
1130
- ...f.text.xs
1269
+ ...c.text.xs
1131
1270
  },
1132
- o && { backgroundColor: f.palette.black["7s"] }
1271
+ o && { backgroundColor: c.palette.black["7s"] }
1133
1272
  ],
1134
1273
  children: [
1135
- /* @__PURE__ */ n(I, { css: { color: "white" }, source: It }),
1136
- /* @__PURE__ */ n("span", { children: "Auto" })
1274
+ /* @__PURE__ */ r(I, { css: { color: "white" }, source: Qt }),
1275
+ /* @__PURE__ */ r("span", { children: "Auto" })
1137
1276
  ]
1138
1277
  }
1139
1278
  ) }),
1140
- /* @__PURE__ */ n(Mt, { children: /* @__PURE__ */ w("div", { style: { width: 280 }, children: [
1141
- /* @__PURE__ */ w("div", { css: { display: "flex", justifyContent: "space-between", alignItems: "center", gap: 8 }, children: [
1142
- /* @__PURE__ */ n("div", { css: { fontWeight: 500 }, children: "Text style" }),
1143
- /* @__PURE__ */ n(St, { children: /* @__PURE__ */ n(W, { children: /* @__PURE__ */ n(I, { source: _e }) }) })
1279
+ /* @__PURE__ */ r(er, { children: /* @__PURE__ */ b("div", { style: { width: 280 }, children: [
1280
+ /* @__PURE__ */ b("div", { css: { display: "flex", justifyContent: "space-between", alignItems: "center", gap: 8 }, children: [
1281
+ /* @__PURE__ */ r("div", { css: { fontWeight: 500 }, children: "Text style" }),
1282
+ /* @__PURE__ */ r(tr, { children: /* @__PURE__ */ r(A, { children: /* @__PURE__ */ r(I, { source: Pe }) }) })
1144
1283
  ] }),
1145
- /* @__PURE__ */ n("hr", { css: { marginBlock: 8, borderColor: f.palette.white["1s"] } }),
1146
- /* @__PURE__ */ w("div", { css: { display: "flex", flexDirection: "column", gap: 12 }, children: [
1147
- /* @__PURE__ */ n(Et, { value: e?.sizeVariant, onChange: i }),
1148
- /* @__PURE__ */ n(Lt, { value: { color: e?.css?.color }, onChange: s }),
1149
- /* @__PURE__ */ n(
1150
- Wt,
1284
+ /* @__PURE__ */ r("hr", { css: { marginBlock: 8, borderColor: c.palette.white["1s"] } }),
1285
+ /* @__PURE__ */ b("div", { css: { display: "flex", flexDirection: "column", gap: 12 }, children: [
1286
+ /* @__PURE__ */ r(rr, { value: e?.sizeVariant, onChange: i }),
1287
+ /* @__PURE__ */ r(nr, { value: { color: e?.css?.color }, onChange: s }),
1288
+ /* @__PURE__ */ r(
1289
+ or,
1151
1290
  {
1152
1291
  name: "Style",
1153
1292
  value: {
@@ -1158,9 +1297,9 @@ const ir = [
1158
1297
  onChange: s
1159
1298
  }
1160
1299
  ),
1161
- /* @__PURE__ */ n(Nt, { value: { fontWeight: e?.css?.fontWeight }, onChange: s }),
1162
- /* @__PURE__ */ n(
1163
- Rt,
1300
+ /* @__PURE__ */ r(sr, { value: { fontWeight: e?.css?.fontWeight }, onChange: s }),
1301
+ /* @__PURE__ */ r(
1302
+ ir,
1164
1303
  {
1165
1304
  value: {
1166
1305
  textTransform: e?.css?.textTransform
@@ -1171,11 +1310,11 @@ const ir = [
1171
1310
  ] })
1172
1311
  ] }) })
1173
1312
  ] }) });
1174
- }, Ve = `<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
1313
+ }, at = `<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
1175
1314
  <path d="M8 5L5 8L8 11" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
1176
1315
  <path d="M5 8H14C17.314 8 20 10.462 20 13.5V13.5C20 16.538 17.314 19 14 19H6" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
1177
1316
  </svg>
1178
- `, ar = `<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
1317
+ `, An = `<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
1179
1318
  <path d="M12 19.0004C11.158 19.0004 10.315 18.8224 9.496 18.5054" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
1180
1319
  <path d="M20.882 12.4678C18.99 15.9668 15.495 18.9998 12 18.9998" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
1181
1320
  <path d="M19.079 8.9209C19.77 9.7299 20.384 10.6119 20.882 11.5329C21.039 11.8239 21.039 12.1769 20.882 12.4679" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
@@ -1183,34 +1322,34 @@ const ir = [
1183
1322
  <path d="M9.77299 14.2271C8.54299 12.9971 8.54299 11.0021 9.77299 9.77211C11.003 8.54211 12.998 8.54211 14.228 9.77211" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
1184
1323
  <path d="M17.044 6.956C15.497 5.759 13.748 5 12 5C8.50499 5 5.00999 8.033 3.11799 11.533C2.96099 11.824 2.96099 12.177 3.11799 12.468C4.06399 14.217 5.40999 15.849 6.95599 17.045" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
1185
1324
  </svg>
1186
- `, cr = `<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
1325
+ `, Dn = `<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
1187
1326
  <path fill-rule="evenodd" clip-rule="evenodd" d="M3.11799 12.467C2.96099 12.176 2.96099 11.823 3.11799 11.532C5.00999 8.033 8.50499 5 12 5C15.495 5 18.99 8.033 20.882 11.533C21.039 11.824 21.039 12.177 20.882 12.468C18.99 15.967 15.495 19 12 19C8.50499 19 5.00999 15.967 3.11799 12.467Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
1188
1327
  <path d="M14.1213 9.87868C15.2929 11.0502 15.2929 12.9497 14.1213 14.1213C12.9497 15.2929 11.0502 15.2929 9.87866 14.1213C8.70709 12.9497 8.70709 11.0502 9.87866 9.87868C11.0502 8.70711 12.9497 8.70711 14.1213 9.87868" stroke="currentColor" stroke-width="1.4286" stroke-linecap="round" stroke-linejoin="round"/>
1189
1328
  </svg>
1190
- `, lr = '<svg width="20" height="20" viewBox="0 0 20 20" fill="currentColor" xmlns="http://www.w3.org/2000/svg" class=""><path d="M9.75 3C8.50736 3 7.5 4.00736 7.5 5.25C7.5 5.66421 7.83579 6 8.25 6C8.66421 6 9 5.66421 9 5.25C9 4.83579 9.33579 4.5 9.75 4.5H13.75C14.1642 4.5 14.5 4.83579 14.5 5.25V14.75C14.5 15.1642 14.1642 15.5 13.75 15.5H9.75C9.33579 15.5 9 15.1642 9 14.75C9 14.3358 8.66421 14 8.25 14C7.83579 14 7.5 14.3358 7.5 14.75C7.5 15.9926 8.50736 17 9.75 17H13.75C14.9926 17 16 15.9926 16 14.75V5.25C16 4.00736 14.9926 3 13.75 3H9.75Z" fill="currentColor"></path><path d="M12.25 10.75C12.6642 10.75 13 10.4142 13 10C13 9.58579 12.6642 9.25 12.25 9.25L6.56066 9.25L7.53033 8.28033C7.82322 7.98744 7.82322 7.51256 7.53033 7.21967C7.23744 6.92678 6.76256 6.92678 6.46967 7.21967L4.21967 9.46967C4.07902 9.61032 4 9.80109 4 10C4 10.1989 4.07902 10.3897 4.21967 10.5303L6.46967 12.7803C6.76256 13.0732 7.23744 13.0732 7.53033 12.7803C7.82322 12.4874 7.82322 12.0126 7.53033 11.7197L6.56066 10.75H12.25Z" fill="currentColor"></path></svg>', dr = ({ actions: e }) => {
1191
- const { mode: t, screen: o, setState: r, handlers: i } = $(), [s, l] = P(!1), {
1192
- actions: { history: a, selectNode: d },
1193
- canRedo: k,
1194
- canUndo: h,
1195
- query: u
1196
- } = H((x, m) => ({
1197
- enabled: x.options.enabled,
1198
- canUndo: m.history.canUndo(),
1199
- canRedo: m.history.canRedo()
1200
- })), c = (x) => {
1201
- r({ screen: x });
1202
- }, p = () => {
1203
- r({ mode: t === "full" ? "compact" : "full" });
1204
- }, b = () => {
1329
+ `, Pn = '<svg width="20" height="20" viewBox="0 0 20 20" fill="currentColor" xmlns="http://www.w3.org/2000/svg" class=""><path d="M9.75 3C8.50736 3 7.5 4.00736 7.5 5.25C7.5 5.66421 7.83579 6 8.25 6C8.66421 6 9 5.66421 9 5.25C9 4.83579 9.33579 4.5 9.75 4.5H13.75C14.1642 4.5 14.5 4.83579 14.5 5.25V14.75C14.5 15.1642 14.1642 15.5 13.75 15.5H9.75C9.33579 15.5 9 15.1642 9 14.75C9 14.3358 8.66421 14 8.25 14C7.83579 14 7.5 14.3358 7.5 14.75C7.5 15.9926 8.50736 17 9.75 17H13.75C14.9926 17 16 15.9926 16 14.75V5.25C16 4.00736 14.9926 3 13.75 3H9.75Z" fill="currentColor"></path><path d="M12.25 10.75C12.6642 10.75 13 10.4142 13 10C13 9.58579 12.6642 9.25 12.25 9.25L6.56066 9.25L7.53033 8.28033C7.82322 7.98744 7.82322 7.51256 7.53033 7.21967C7.23744 6.92678 6.76256 6.92678 6.46967 7.21967L4.21967 9.46967C4.07902 9.61032 4 9.80109 4 10C4 10.1989 4.07902 10.3897 4.21967 10.5303L6.46967 12.7803C6.76256 13.0732 7.23744 13.0732 7.53033 12.7803C7.82322 12.4874 7.82322 12.0126 7.53033 11.7197L6.56066 10.75H12.25Z" fill="currentColor"></path></svg>', Bn = ({ actions: e }) => {
1330
+ const { mode: t, screen: o, setState: n, handlers: i } = U(), [s, d] = j(!1), {
1331
+ actions: { history: l, selectNode: h },
1332
+ canRedo: f,
1333
+ canUndo: u,
1334
+ query: p
1335
+ } = G((y, v) => ({
1336
+ enabled: y.options.enabled,
1337
+ canUndo: v.history.canUndo(),
1338
+ canRedo: v.history.canRedo()
1339
+ })), a = (y) => {
1340
+ n({ screen: y });
1341
+ }, w = () => {
1342
+ n({ mode: t === "full" ? "compact" : "full" });
1343
+ }, m = () => {
1205
1344
  i.close();
1206
1345
  }, g = async () => {
1207
1346
  try {
1208
- l(!0), d(), await i.submit(u.getSerializedNodes());
1347
+ d(!0), h(), await i.submit(p.getSerializedNodes());
1209
1348
  } finally {
1210
- l(!1);
1349
+ d(!1);
1211
1350
  }
1212
1351
  };
1213
- return /* @__PURE__ */ w(
1352
+ return /* @__PURE__ */ b(
1214
1353
  "div",
1215
1354
  {
1216
1355
  css: {
@@ -1219,15 +1358,15 @@ const ir = [
1219
1358
  alignItems: "center",
1220
1359
  gap: 16,
1221
1360
  justifyContent: "space-between",
1222
- backgroundColor: f.palette.ink["6s"],
1223
- color: f.palette.white["6s"],
1224
- ...f.text.sm
1361
+ backgroundColor: c.palette.ink["6s"],
1362
+ color: c.palette.white["6s"],
1363
+ ...c.text.sm
1225
1364
  },
1226
1365
  children: [
1227
- /* @__PURE__ */ w("div", { css: { display: "flex", alignItems: "center", gap: 12 }, children: [
1228
- /* @__PURE__ */ n(W, { size: "32", onClick: b, children: /* @__PURE__ */ n(I, { source: lr }) }),
1229
- /* @__PURE__ */ n(At, { onSelectionChange: c, value: o, children: Dt.map(({ icon: x, size: m, name: T }) => /* @__PURE__ */ n(W, { tooltip: { content: T }, value: m, children: /* @__PURE__ */ n(I, { source: x }) }, m)) }),
1230
- /* @__PURE__ */ w(
1366
+ /* @__PURE__ */ b("div", { css: { display: "flex", alignItems: "center", gap: 12 }, children: [
1367
+ /* @__PURE__ */ r(A, { size: "32", onClick: m, children: /* @__PURE__ */ r(I, { source: Pn }) }),
1368
+ /* @__PURE__ */ r(ar, { onSelectionChange: a, value: o, children: lr.map(({ icon: y, size: v, name: M }) => /* @__PURE__ */ r(A, { tooltip: { content: M }, value: v, children: /* @__PURE__ */ r(I, { source: y }) }, v)) }),
1369
+ /* @__PURE__ */ b(
1231
1370
  "div",
1232
1371
  {
1233
1372
  css: {
@@ -1236,15 +1375,15 @@ const ir = [
1236
1375
  alignItems: "center",
1237
1376
  gap: 8,
1238
1377
  borderRadius: 8,
1239
- backgroundColor: f.palette.white["1s"]
1378
+ backgroundColor: c.palette.white["1s"]
1240
1379
  },
1241
1380
  children: [
1242
- /* @__PURE__ */ n(W, { onClick: a.undo, disabled: !h, children: /* @__PURE__ */ n(I, { source: Ve }) }),
1243
- /* @__PURE__ */ n(W, { onClick: a.redo, disabled: !k, children: /* @__PURE__ */ n(I, { source: Ve, css: { transform: "rotate(180deg)" } }) })
1381
+ /* @__PURE__ */ r(A, { onClick: l.undo, disabled: !u, children: /* @__PURE__ */ r(I, { source: at }) }),
1382
+ /* @__PURE__ */ r(A, { onClick: l.redo, disabled: !f, children: /* @__PURE__ */ r(I, { source: at, css: { transform: "rotate(180deg)" } }) })
1244
1383
  ]
1245
1384
  }
1246
1385
  ),
1247
- /* @__PURE__ */ n(
1386
+ /* @__PURE__ */ r(
1248
1387
  "div",
1249
1388
  {
1250
1389
  css: {
@@ -1253,58 +1392,58 @@ const ir = [
1253
1392
  alignItems: "center",
1254
1393
  gap: 8,
1255
1394
  borderRadius: 8,
1256
- backgroundColor: f.palette.white["1s"]
1395
+ backgroundColor: c.palette.white["1s"]
1257
1396
  },
1258
- children: /* @__PURE__ */ n(W, { onClick: p, children: /* @__PURE__ */ n(I, { source: t === "full" ? cr : ar }) })
1397
+ children: /* @__PURE__ */ r(A, { onClick: w, children: /* @__PURE__ */ r(I, { source: t === "full" ? Dn : An }) })
1259
1398
  }
1260
1399
  ),
1261
1400
  e
1262
1401
  ] }),
1263
- /* @__PURE__ */ n("div", { css: { display: "flex", alignItems: "center", gap: 12 }, children: /* @__PURE__ */ n(oe, { isLoading: s, onClick: g, children: "Save" }) })
1402
+ /* @__PURE__ */ r("div", { css: { display: "flex", alignItems: "center", gap: 12 }, children: /* @__PURE__ */ r(me, { isLoading: s, onClick: g, children: "Save" }) })
1264
1403
  ]
1265
1404
  }
1266
1405
  );
1267
- }, hr = `<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
1406
+ }, jn = `<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
1268
1407
  <path d="M20 19.9997L16.3763 16.376" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
1269
1408
  <path d="M4 11.25C4 15.2541 7.24594 18.5 11.25 18.5C15.2541 18.5 18.5 15.2541 18.5 11.25C18.5 7.24594 15.2541 4 11.25 4V4C7.24606 4.00029 4.00029 7.24606 4 11.25" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
1270
1409
  </svg>
1271
- `, ur = `<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
1410
+ `, Vn = `<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
1272
1411
  <path d="M15 6L9 12L15 18" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
1273
1412
  </svg>
1274
- `, pr = `<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
1413
+ `, On = `<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
1275
1414
  <rect x="3.00024" y="3" width="17.9997" height="17.9997" rx="2" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
1276
1415
  <path d="M13.5 20.9998V12" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
1277
1416
  <path d="M9.50011 11.9998V3" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
1278
1417
  <path d="M20.9999 12H3.00024" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
1279
1418
  </svg>
1280
- `, gr = `<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
1419
+ `, Fn = `<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
1281
1420
  <rect x="3" y="3" width="18" height="18" rx="2" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
1282
1421
  <path d="M3 12H21" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
1283
1422
  <path d="M12 21V3" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
1284
1423
  </svg>
1285
- `, Fe = `<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
1424
+ `, lt = `<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
1286
1425
  <path d="M3 6V18" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
1287
1426
  <path d="M21 6V18" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
1288
1427
  <path d="M6 21H18" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
1289
1428
  <path d="M6 3H18" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
1290
1429
  </svg>
1291
- `, fr = {
1430
+ `, $n = {
1292
1431
  name: "Layout",
1293
1432
  templates: [
1294
1433
  {
1295
1434
  name: "Container",
1296
- template: /* @__PURE__ */ n(Bt, {}),
1297
- icon: { source: Fe, height: 32 }
1435
+ template: /* @__PURE__ */ r(cr, {}),
1436
+ icon: { source: lt, height: 32 }
1298
1437
  },
1299
1438
  {
1300
1439
  name: "Block",
1301
- template: /* @__PURE__ */ n(Pt, {}),
1302
- icon: { source: Fe, height: 32 }
1440
+ template: /* @__PURE__ */ r(dr, {}),
1441
+ icon: { source: lt, height: 32 }
1303
1442
  },
1304
1443
  {
1305
1444
  name: "Grid",
1306
- template: /* @__PURE__ */ w(
1307
- jt,
1445
+ template: /* @__PURE__ */ b(
1446
+ hr,
1308
1447
  {
1309
1448
  cols: 2,
1310
1449
  sx: {
@@ -1315,26 +1454,26 @@ const ir = [
1315
1454
  paddingBottom: 16
1316
1455
  },
1317
1456
  children: [
1318
- /* @__PURE__ */ n(Se, {}),
1319
- /* @__PURE__ */ n(Se, {})
1457
+ /* @__PURE__ */ r(Xe, {}),
1458
+ /* @__PURE__ */ r(Xe, {})
1320
1459
  ]
1321
1460
  }
1322
1461
  ),
1323
- icon: { source: gr, height: 32 }
1462
+ icon: { source: Fn, height: 32 }
1324
1463
  },
1325
1464
  {
1326
1465
  name: "Flex",
1327
- template: /* @__PURE__ */ w(Vt, { sx: { columnGap: 8, rowGap: 8, paddingTop: 16, paddingBottom: 16 }, children: [
1328
- /* @__PURE__ */ n(
1329
- Ee,
1466
+ template: /* @__PURE__ */ b(ur, { sx: { columnGap: 8, rowGap: 8, paddingTop: 16, paddingBottom: 16 }, children: [
1467
+ /* @__PURE__ */ r(
1468
+ qe,
1330
1469
  {
1331
1470
  sx: {
1332
1471
  width: "40%"
1333
1472
  }
1334
1473
  }
1335
1474
  ),
1336
- /* @__PURE__ */ n(
1337
- Ee,
1475
+ /* @__PURE__ */ r(
1476
+ qe,
1338
1477
  {
1339
1478
  sx: {
1340
1479
  width: "60%"
@@ -1342,10 +1481,10 @@ const ir = [
1342
1481
  }
1343
1482
  )
1344
1483
  ] }),
1345
- icon: { source: pr, height: 32 }
1484
+ icon: { source: On, height: 32 }
1346
1485
  }
1347
1486
  ]
1348
- }, br = `<svg height="24" width="24" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 512 512" xml:space="preserve">
1487
+ }, Hn = `<svg height="24" width="24" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 512 512" xml:space="preserve">
1349
1488
  <style type="text/css">
1350
1489
  .st0{fill:currentColor;}
1351
1490
  </style>
@@ -1374,31 +1513,31 @@ const ir = [
1374
1513
  c4.709,14.802,17.357,22.204,33.644,22.204c16.286,0,28.668-8.204,33.374-22.881c1.617-5.111,2.29-12.645,2.29-20.716v-0.95
1375
1514
  C372.362,303.664,369.538,300.836,364.556,300.836z"/>
1376
1515
  </g>
1377
- </svg>`, wr = `<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
1516
+ </svg>`, zn = `<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
1378
1517
  <path d="M20.64 15.3735L16.5187 11.2522C16.1434 10.8769 15.5357 10.8769 15.1613 11.2522L11.04 15.3735" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
1379
1518
  <path fill-rule="evenodd" clip-rule="evenodd" d="M17.76 20.1736H6.24C4.64928 20.1736 3.36 18.8843 3.36 17.2936V5.77355C3.36 4.18283 4.64928 2.89355 6.24 2.89355H17.76C19.3507 2.89355 20.64 4.18283 20.64 5.77355V17.2936C20.64 18.8843 19.3507 20.1736 17.76 20.1736Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
1380
1519
  <path d="M15.84 20.1734L9.79872 14.1321C9.42336 13.7567 8.81568 13.7567 8.44128 14.1321L3.78816 18.7852" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
1381
1520
  <path d="M9.37456 8.39927C9.51515 8.53986 9.51515 8.7678 9.37456 8.90839C9.23397 9.04898 9.00603 9.04898 8.86544 8.90839C8.72485 8.7678 8.72485 8.53986 8.86544 8.39927C9.00603 8.25868 9.23397 8.25868 9.37456 8.39927" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
1382
1521
  </svg>
1383
- `, kr = `<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
1522
+ `, _n = `<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
1384
1523
  <path fill-rule="evenodd" clip-rule="evenodd" d="M10.2939 12L14.6229 9.5L10.2939 7V12Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
1385
1524
  <path fill-rule="evenodd" clip-rule="evenodd" d="M19.889 3.38867H4.111C3.497 3.38867 3 3.88567 3 4.49967V14.4997C3 15.1137 3.497 15.6107 4.111 15.6107H19.889C20.503 15.6107 21 15.1137 21 14.4997V4.49967C21 3.88567 20.503 3.38867 19.889 3.38867Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
1386
1525
  <path d="M8.56066 18.9393C9.14645 19.5251 9.14645 20.4749 8.56066 21.0607C7.97487 21.6464 7.02513 21.6464 6.43934 21.0607C5.85355 20.4749 5.85355 19.5251 6.43934 18.9393C7.02513 18.3536 7.97487 18.3536 8.56066 18.9393" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
1387
1526
  <path d="M21 20H9" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
1388
1527
  <path d="M3 20H6" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
1389
1528
  </svg>
1390
- `, mr = {
1529
+ `, Gn = {
1391
1530
  name: "Media",
1392
1531
  templates: [
1393
1532
  {
1394
1533
  name: "Image",
1395
- template: /* @__PURE__ */ n(Ft, { src: "https://ucarecdn.com/ee6d5074-1640-4cc7-8933-47c8589c3dee/-/format/auto/" }),
1396
- icon: { source: wr, height: 32 }
1534
+ template: /* @__PURE__ */ r(pr, { src: "https://ucarecdn.com/ee6d5074-1640-4cc7-8933-47c8589c3dee/-/format/auto/" }),
1535
+ icon: { source: zn, height: 32 }
1397
1536
  },
1398
1537
  {
1399
1538
  name: "Video",
1400
- template: /* @__PURE__ */ n(
1401
- Ot,
1539
+ template: /* @__PURE__ */ r(
1540
+ gr,
1402
1541
  {
1403
1542
  sx: {
1404
1543
  aspectRatio: "16 / 9"
@@ -1406,87 +1545,87 @@ const ir = [
1406
1545
  src: "https://cdn.shopify.com/videos/c/o/v/2cd3deb506b54b009063f7270ab5cf2e.mp4"
1407
1546
  }
1408
1547
  ),
1409
- icon: { source: kr, height: 32 }
1548
+ icon: { source: _n, height: 32 }
1410
1549
  },
1411
1550
  {
1412
1551
  name: "Icon",
1413
- template: /* @__PURE__ */ n(Ht, { source: $t }),
1414
- icon: { source: br, height: 32 }
1552
+ template: /* @__PURE__ */ r(fr, { source: br }),
1553
+ icon: { source: Hn, height: 32 }
1415
1554
  }
1416
1555
  ]
1417
- }, Cr = `<svg fill="currentColor" width="24" height="24" viewBox="0 0 32 32" version="1.1" xmlns="http://www.w3.org/2000/svg">
1556
+ }, Un = `<svg fill="currentColor" width="24" height="24" viewBox="0 0 32 32" version="1.1" xmlns="http://www.w3.org/2000/svg">
1418
1557
  <title>h</title>
1419
1558
  <path d="M25.264 3.993h-0.928c-0.442 0-0.8 0.358-0.801 0.8v9.952h-15.038v-9.952c-0-0.442-0.358-0.8-0.8-0.8h-0.928c-0.442 0-0.8 0.358-0.8 0.8v22.4c0 0.442 0.358 0.8 0.8 0.801h0.928c0.442-0.001 0.8-0.359 0.8-0.801v0-9.952h15.038v9.952c0.001 0.442 0.359 0.8 0.801 0.801h0.928c0.442-0.001 0.8-0.359 0.801-0.801v-22.4c-0.001-0.442-0.359-0.8-0.801-0.8h-0z"/>
1420
1559
  </svg>
1421
- `, vr = `<svg fill="currentColor" width="24" height="24" viewBox="0 0 32 32" version="1.1" xmlns="http://www.w3.org/2000/svg">
1560
+ `, Yn = `<svg fill="currentColor" width="24" height="24" viewBox="0 0 32 32" version="1.1" xmlns="http://www.w3.org/2000/svg">
1422
1561
  <title>p</title>
1423
1562
  <path d="M24.223 6.397c-1.592-1.495-3.741-2.413-6.104-2.413-0.137 0-0.274 0.003-0.41 0.009l0.019-0.001h-8.416c-0.442 0-0.8 0.358-0.8 0.8v22.4c0 0.442 0.358 0.8 0.8 0.801h0.928c0.442-0.001 0.8-0.359 0.8-0.801v0-6.561h6.688c0.117 0.005 0.253 0.009 0.391 0.009 2.363 0 4.512-0.918 6.108-2.417l-0.005 0.004c1.521-1.457 2.466-3.504 2.466-5.772 0-0.050-0-0.101-0.001-0.151l0 0.008c0.001-0.042 0.001-0.093 0.001-0.143 0-2.268-0.945-4.316-2.463-5.771l-0.003-0.003zM11.040 6.521h6.624c0.12-0.008 0.259-0.012 0.4-0.012 1.678 0 3.208 0.636 4.361 1.68l-0.006-0.005c1.054 0.998 1.709 2.407 1.709 3.969 0 0.056-0.001 0.112-0.003 0.168l0-0.008c0.001 0.047 0.002 0.101 0.002 0.156 0 1.569-0.656 2.985-1.709 3.988l-0.002 0.002c-1.145 1.047-2.676 1.689-4.357 1.689-0.14 0-0.278-0.004-0.416-0.013l0.019 0.001h-6.624z"/>
1424
1563
  </svg>
1425
- `, xr = {
1564
+ `, Zn = {
1426
1565
  name: "Text",
1427
1566
  templates: [
1428
1567
  {
1429
1568
  name: "Heading",
1430
- template: /* @__PURE__ */ n(_t, { as: "h2", sizeVariant: "4xl", md: { sizeVariant: "5xl" }, children: "Your heading text goes here" }),
1431
- icon: { source: Cr, height: 32 }
1569
+ template: /* @__PURE__ */ r(wr, { as: "h2", sizeVariant: "4xl", md: { sizeVariant: "5xl" }, children: "Your heading text goes here" }),
1570
+ icon: { source: Un, height: 32 }
1432
1571
  },
1433
1572
  {
1434
1573
  name: "Paragraph",
1435
- template: /* @__PURE__ */ n(zt, { children: "Replace this text with your content" }),
1436
- icon: { source: vr, height: 32 }
1574
+ template: /* @__PURE__ */ r(mr, { children: "Replace this text with your content" }),
1575
+ icon: { source: Yn, height: 32 }
1437
1576
  }
1438
1577
  ]
1439
- }, yr = [
1440
- fr,
1441
- xr,
1442
- mr,
1443
- Gt,
1444
- Ut,
1445
- Zt,
1446
- Yt
1447
- ], Tr = '<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect x="3" y="3" width="7" height="7"/><rect x="14" y="3" width="7" height="7"/><rect x="3" y="14" width="7" height="7"/><rect x="14" y="14" width="7" height="7"/></svg>', Ir = {
1578
+ }, Xn = [
1579
+ $n,
1580
+ Zn,
1581
+ Gn,
1582
+ kr,
1583
+ vr,
1584
+ Cr,
1585
+ xr
1586
+ ], qn = '<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect x="3" y="3" width="7" height="7"/><rect x="14" y="3" width="7" height="7"/><rect x="3" y="14" width="7" height="7"/><rect x="14" y="14" width="7" height="7"/></svg>', Jn = {
1448
1587
  name: "Basics",
1449
- icon: { source: Tr },
1450
- renderer: () => /* @__PURE__ */ n(Sr, { elementGroups: yr })
1451
- }, Mr = ({ groups: e }) => {
1452
- const t = [Ir, ...e ?? []];
1453
- return /* @__PURE__ */ w("div", { css: { display: "flex", flexDirection: "column", height: "100%" }, children: [
1454
- /* @__PURE__ */ n("div", { css: { display: "flex", padding: 8, alignItems: "center", gap: 12 }, children: /* @__PURE__ */ n(ze, { fullWidth: !0, placeholder: "Search...", prefix: /* @__PURE__ */ n(I, { source: hr }) }) }),
1455
- /* @__PURE__ */ n(
1456
- ce,
1588
+ icon: { source: qn },
1589
+ renderer: () => /* @__PURE__ */ r(Qn, { elementGroups: Xn })
1590
+ }, Kn = ({ groups: e }) => {
1591
+ const t = [Jn, ...e ?? []];
1592
+ return /* @__PURE__ */ b("div", { css: { display: "flex", flexDirection: "column", height: "100%" }, children: [
1593
+ /* @__PURE__ */ r("div", { css: { display: "flex", padding: 8, alignItems: "center", gap: 12 }, children: /* @__PURE__ */ r(ut, { fullWidth: !0, placeholder: "Search...", prefix: /* @__PURE__ */ r(I, { source: jn }) }) }),
1594
+ /* @__PURE__ */ r(
1595
+ Be,
1457
1596
  {
1458
1597
  css: {
1459
1598
  paddingBlock: 8,
1460
1599
  borderTopWidth: 1,
1461
1600
  borderTopStyle: "solid",
1462
- borderColor: f.palette.white["1s"],
1601
+ borderColor: c.palette.white["1s"],
1463
1602
  flex: 1
1464
1603
  },
1465
- children: t.map((o, r) => /* @__PURE__ */ n(Lr, { group: o }, r))
1604
+ children: t.map((o, n) => /* @__PURE__ */ r(to, { group: o }, n))
1466
1605
  }
1467
1606
  )
1468
1607
  ] });
1469
- }, Sr = ({ elementGroups: e }) => /* @__PURE__ */ n("div", { css: { display: "flex", flexDirection: "column", gap: 8 }, children: e.map((t, o) => /* @__PURE__ */ n(Er, { group: t }, o)) }), Er = ({ group: e }) => {
1470
- const [t, o] = ot(!0), { actions: r, connectors: i } = H();
1471
- return /* @__PURE__ */ w("div", { css: { display: "flex", flexDirection: "column", ...f.text.sm }, children: [
1472
- /* @__PURE__ */ n(oe, { onClick: o, css: { paddingInline: 0, backgroundColor: "transparent" }, children: /* @__PURE__ */ w(
1608
+ }, Qn = ({ elementGroups: e }) => /* @__PURE__ */ r("div", { css: { display: "flex", flexDirection: "column", gap: 8 }, children: e.map((t, o) => /* @__PURE__ */ r(eo, { group: t }, o)) }), eo = ({ group: e }) => {
1609
+ const [t, o] = pt(!0), { actions: n, connectors: i } = G();
1610
+ return /* @__PURE__ */ b("div", { css: { display: "flex", flexDirection: "column", ...c.text.sm }, children: [
1611
+ /* @__PURE__ */ r(me, { onClick: o, css: { paddingInline: 0, backgroundColor: "transparent" }, children: /* @__PURE__ */ b(
1473
1612
  "div",
1474
1613
  {
1475
- css: { display: "flex", alignItems: "center", justifyContent: "space-between", flex: 1, ...f.text.sm },
1614
+ css: { display: "flex", alignItems: "center", justifyContent: "space-between", flex: 1, ...c.text.sm },
1476
1615
  children: [
1477
1616
  e.name,
1478
- /* @__PURE__ */ n(
1617
+ /* @__PURE__ */ r(
1479
1618
  I,
1480
1619
  {
1481
- source: Ge,
1620
+ source: we,
1482
1621
  css: [{ transition: "transform" }, !t && { transform: "rotate(180deg)" }]
1483
1622
  }
1484
1623
  )
1485
1624
  ]
1486
1625
  }
1487
1626
  ) }),
1488
- /* @__PURE__ */ n(qt, { open: t, children: /* @__PURE__ */ n("div", { css: { display: "grid", paddingBlock: 8, gap: 16, gridTemplateColumns: "repeat(2, minmax(0, 1fr))" }, children: e.templates?.map((s, l) => /* @__PURE__ */ w("div", { css: { display: "flex", flexDirection: "column", gap: 4 }, children: [
1489
- /* @__PURE__ */ n(
1627
+ /* @__PURE__ */ r(Tr, { open: t, children: /* @__PURE__ */ r("div", { css: { display: "grid", paddingBlock: 8, gap: 16, gridTemplateColumns: "repeat(2, minmax(0, 1fr))" }, children: e.templates?.map((s, d) => /* @__PURE__ */ b("div", { css: { display: "flex", flexDirection: "column", gap: 4 }, children: [
1628
+ /* @__PURE__ */ r(
1490
1629
  "div",
1491
1630
  {
1492
1631
  css: {
@@ -1494,8 +1633,8 @@ const ir = [
1494
1633
  display: "flex",
1495
1634
  padding: 4,
1496
1635
  borderRadius: 8,
1497
- backgroundColor: f.palette.ink["6s"],
1498
- color: f.palette.white["5s"],
1636
+ backgroundColor: c.palette.ink["6s"],
1637
+ color: c.palette.white["5s"],
1499
1638
  pointerEvents: "auto",
1500
1639
  overflow: "hidden",
1501
1640
  flexDirection: "column",
@@ -1511,47 +1650,47 @@ const ir = [
1511
1650
  content: '""',
1512
1651
  position: "absolute",
1513
1652
  inset: 0,
1514
- backgroundColor: f.palette.white["1s"]
1653
+ backgroundColor: c.palette.white["1s"]
1515
1654
  }
1516
1655
  },
1517
- ref: (a) => {
1518
- a && i.create(a, s.template, {
1519
- onCreate(d) {
1520
- (typeof s.autoFocus == "function" ? s.autoFocus(d) : s.autoFocus) && r.selectNode(d.rootNodeId), s.onCreate?.(d);
1656
+ ref: (l) => {
1657
+ l && i.create(l, s.template, {
1658
+ onCreate(h) {
1659
+ (typeof s.autoFocus == "function" ? s.autoFocus(h) : s.autoFocus) && n.selectNode(h.rootNodeId), s.onCreate?.(h);
1521
1660
  }
1522
1661
  });
1523
1662
  },
1524
- children: s.icon && /* @__PURE__ */ n(Jt, { width: void 0, height: void 0, ...s.icon })
1663
+ children: s.icon && /* @__PURE__ */ r(Sr, { width: void 0, height: void 0, ...s.icon })
1525
1664
  }
1526
1665
  ),
1527
- /* @__PURE__ */ n("p", { css: { marginInline: "auto", textAlign: "center", ...ke.xs }, children: s.name })
1528
- ] }, l)) }) })
1666
+ /* @__PURE__ */ r("p", { css: { marginInline: "auto", textAlign: "center", ...le.xs }, children: s.name })
1667
+ ] }, d)) }) })
1529
1668
  ] });
1530
- }, Lr = ({ group: e }) => {
1531
- const [t, o] = P(!1), { refs: r, floatingStyles: i, context: s } = le({
1669
+ }, to = ({ group: e }) => {
1670
+ const [t, o] = j(!1), { refs: n, floatingStyles: i, context: s } = Ce({
1532
1671
  open: t,
1533
1672
  onOpenChange: o,
1534
1673
  placement: "right-start",
1535
1674
  middleware: [
1536
- Ce(),
1537
- Je({
1538
- apply({ elements: p }) {
1539
- const b = {
1540
- zIndex: `${Xe}`,
1541
- height: `${p.reference.getBoundingClientRect().height}px`
1675
+ Ve(),
1676
+ mt({
1677
+ apply({ elements: w }) {
1678
+ const m = {
1679
+ zIndex: `${Ne}`,
1680
+ height: `${w.reference.getBoundingClientRect().height}px`
1542
1681
  };
1543
- Object.assign(p.floating.style, b);
1682
+ Object.assign(w.floating.style, m);
1544
1683
  }
1545
1684
  })
1546
1685
  ],
1547
- whileElementsMounted: de
1686
+ whileElementsMounted: xe
1548
1687
  });
1549
- V(() => {
1550
- r.setPositionReference(document.querySelector("aside"));
1551
- }, [r]);
1552
- const l = Ke(s, { move: !1, handleClose: yn() }), a = Qe(s), d = et(s), k = tt(s), { getReferenceProps: h, getFloatingProps: u } = nt([l, a, d, k]), c = e.renderer;
1553
- return /* @__PURE__ */ w(ie, { children: [
1554
- /* @__PURE__ */ w(
1688
+ z(() => {
1689
+ n.setPositionReference(document.querySelector("aside"));
1690
+ }, [n]);
1691
+ const d = Yr(s, { move: !1, handleClose: Zr() }), l = Xr(s), h = kt(s), f = vt(s), { getReferenceProps: u, getFloatingProps: p } = Ct([d, l, h, f]), a = e.renderer;
1692
+ return /* @__PURE__ */ b(J, { children: [
1693
+ /* @__PURE__ */ b(
1555
1694
  "button",
1556
1695
  {
1557
1696
  css: {
@@ -1562,74 +1701,76 @@ const ir = [
1562
1701
  borderRadius: 8,
1563
1702
  textAlign: "left",
1564
1703
  width: "100%",
1565
- color: f.palette.white["5s"],
1566
- "&:hover": {
1567
- color: f.palette.white["6s"],
1568
- backgroundColor: f.palette.white["1s"],
1704
+ color: t ? c.palette.white["6s"] : c.palette.white["5s"],
1705
+ backgroundColor: t ? c.palette.white["1s"] : void 0,
1706
+ ":hover": {
1707
+ color: c.palette.white["6s"],
1708
+ backgroundColor: c.palette.white["1s"],
1569
1709
  fontWeight: 500
1570
1710
  }
1571
1711
  },
1572
- ...h(),
1573
- ref: r.setReference,
1712
+ ...u(),
1713
+ ref: n.setReference,
1574
1714
  children: [
1575
- e.icon && /* @__PURE__ */ n("div", { css: { padding: 6, borderRadius: 8, backgroundColor: f.palette.white["1s"] }, children: /* @__PURE__ */ n(I, { ...e.icon }) }),
1576
- /* @__PURE__ */ n(
1715
+ e.icon && /* @__PURE__ */ r("div", { css: { padding: 6, borderRadius: 8, backgroundColor: c.palette.white["1s"] }, children: /* @__PURE__ */ r(I, { ...e.icon }) }),
1716
+ /* @__PURE__ */ r(
1577
1717
  "span",
1578
1718
  {
1579
1719
  css: {
1580
1720
  overflow: "hidden",
1581
1721
  textOverflow: "ellipsis",
1582
1722
  whiteSpace: "nowrap",
1583
- flex: 1
1723
+ flex: 1,
1724
+ ...le.sm
1584
1725
  },
1585
1726
  children: e.name
1586
1727
  }
1587
1728
  ),
1588
- /* @__PURE__ */ n(I, { css: { transform: "rotate(180deg)" }, source: ur })
1729
+ /* @__PURE__ */ r(I, { css: { transform: "rotate(180deg)" }, source: Vn })
1589
1730
  ]
1590
1731
  }
1591
1732
  ),
1592
- t && /* @__PURE__ */ n(he, { children: /* @__PURE__ */ n("div", { style: i, ...u(), ref: r.setFloating, children: /* @__PURE__ */ w(
1733
+ t && /* @__PURE__ */ r(ce, { children: /* @__PURE__ */ r("div", { style: i, ...p(), ref: n.setFloating, children: /* @__PURE__ */ b(
1593
1734
  "div",
1594
1735
  {
1595
1736
  css: {
1596
1737
  display: "flex",
1597
1738
  flexDirection: "column",
1598
1739
  height: "100%",
1599
- backgroundColor: f.palette.ink["6s"],
1600
- color: f.palette.white["6s"],
1740
+ backgroundColor: c.palette.ink["6s"],
1741
+ color: c.palette.white["6s"],
1601
1742
  borderLeftWidth: 1,
1602
1743
  borderLeftStyle: "solid",
1603
1744
  borderTopWidth: 1,
1604
1745
  borderTopStyle: "solid",
1605
- borderColor: f.palette.white["2s"],
1606
- ...f.text.sm
1746
+ borderColor: c.palette.white["2s"],
1747
+ ...c.text.sm
1607
1748
  },
1608
1749
  children: [
1609
- /* @__PURE__ */ n("div", { css: { display: "flex", paddingInline: 8, alignItems: "center", height: 48 }, children: /* @__PURE__ */ n("h6", { css: { fontWeight: 500 }, children: e.name }) }),
1610
- /* @__PURE__ */ n(ce, { css: { paddingInline: 12, flex: 1 }, children: c ? /* @__PURE__ */ n(c, {}) : /* @__PURE__ */ n("div", { css: { display: "flex", flexDirection: "column", gap: 16 }, children: e.templates?.map((p, b) => /* @__PURE__ */ mn(Wr, { ...p, key: b })) }) })
1750
+ /* @__PURE__ */ r("div", { css: { display: "flex", paddingInline: 8, alignItems: "center", height: 48 }, children: /* @__PURE__ */ r("h6", { css: { fontWeight: 500 }, children: e.name }) }),
1751
+ /* @__PURE__ */ r(Be, { css: { paddingInline: 12, flex: 1 }, children: a ? /* @__PURE__ */ r(a, {}) : /* @__PURE__ */ r("div", { css: { display: "flex", flexDirection: "column", gap: 16 }, children: e.templates?.map((w, m) => /* @__PURE__ */ Gr(ro, { ...w, key: m })) }) })
1611
1752
  ]
1612
1753
  }
1613
1754
  ) }) })
1614
1755
  ] });
1615
- }, Wr = ({ template: e, autoFocus: t = !0, onCreate: o }) => {
1616
- const [, r] = P(!1), i = $(), { actions: s, connectors: l, resolver: a, query: d } = H((h) => ({
1617
- resolver: h.options.resolver
1618
- })), k = P(() => {
1619
- const h = typeof e == "function" ? e() : e;
1620
- let u;
1621
- "rootNodeId" in h ? u = h : u = d.parseReactElement(h).toNodeTree();
1622
- const { rootNodeId: c, nodes: p } = u, b = {};
1623
- return Object.entries(p).forEach(([g, x]) => {
1624
- const m = Xt(x.data, a), T = g === c ? _ : g;
1625
- b[T] = {
1626
- ...m,
1627
- parent: m.parent === c ? _ : m.parent,
1628
- nodes: m.nodes?.map((S) => S === c ? _ : S)
1756
+ }, ro = ({ template: e, autoFocus: t = !0, onCreate: o }) => {
1757
+ const [, n] = j(!1), i = U(), { actions: s, connectors: d, resolver: l, query: h } = G((u) => ({
1758
+ resolver: u.options.resolver
1759
+ })), f = j(() => {
1760
+ const u = typeof e == "function" ? e() : e;
1761
+ let p;
1762
+ "rootNodeId" in u ? p = u : p = h.parseReactElement(u).toNodeTree();
1763
+ const { rootNodeId: a, nodes: w } = p, m = {};
1764
+ return Object.entries(w).forEach(([g, y]) => {
1765
+ const v = yr(y.data, l), M = g === a ? X : g;
1766
+ m[M] = {
1767
+ ...v,
1768
+ parent: v.parent === a ? X : v.parent,
1769
+ nodes: v.nodes?.map((R) => R === a ? X : R)
1629
1770
  };
1630
- }), b;
1771
+ }), m;
1631
1772
  })[0];
1632
- return /* @__PURE__ */ n(
1773
+ return /* @__PURE__ */ r(
1633
1774
  "div",
1634
1775
  {
1635
1776
  css: {
@@ -1638,18 +1779,18 @@ const ir = [
1638
1779
  cursor: "grab",
1639
1780
  borderStyle: "solid",
1640
1781
  borderWidth: 1,
1641
- borderColor: f.palette.white["1s"]
1782
+ borderColor: c.palette.white["1s"]
1642
1783
  },
1643
- ref: (h) => {
1644
- h && l.create(h, e, {
1645
- onCreate(u) {
1646
- (typeof t == "function" ? t(u) : t) && s.selectNode(u.rootNodeId), o?.(u);
1784
+ ref: (u) => {
1785
+ u && d.create(u, e, {
1786
+ onCreate(p) {
1787
+ (typeof t == "function" ? t(p) : t) && s.selectNode(p.rootNodeId), o?.(p);
1647
1788
  }
1648
1789
  });
1649
1790
  },
1650
- onDragStart: () => r(!0),
1651
- onDragEnd: () => r(!1),
1652
- children: /* @__PURE__ */ n(
1791
+ onDragStart: () => n(!0),
1792
+ onDragEnd: () => n(!1),
1793
+ children: /* @__PURE__ */ r(
1653
1794
  "div",
1654
1795
  {
1655
1796
  css: {
@@ -1660,23 +1801,23 @@ const ir = [
1660
1801
  width: 240,
1661
1802
  aspectRatio: "16 / 9"
1662
1803
  },
1663
- children: /* @__PURE__ */ n("div", { css: { position: "absolute", inset: 0 }, children: /* @__PURE__ */ n(
1664
- ut,
1804
+ children: /* @__PURE__ */ r("div", { css: { position: "absolute", inset: 0 }, children: /* @__PURE__ */ r(
1805
+ Rt,
1665
1806
  {
1666
1807
  containerProps: {
1667
1808
  style: {
1668
1809
  backgroundColor: i.theme.palette.background.default
1669
1810
  }
1670
1811
  },
1671
- viewport: { width: bn.md.minWidth },
1672
- children: /* @__PURE__ */ n(rt, { resolver: a, children: /* @__PURE__ */ n(In, { data: k }) })
1812
+ viewport: { width: Hr.md.minWidth },
1813
+ children: /* @__PURE__ */ r(xt, { resolver: l, children: /* @__PURE__ */ r(Jr, { data: f }) })
1673
1814
  }
1674
1815
  ) })
1675
1816
  }
1676
1817
  )
1677
1818
  }
1678
1819
  );
1679
- }, Nr = `<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
1820
+ }, no = `<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
1680
1821
  <path d="M12.5 2H9.5" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
1681
1822
  <path d="M2 9.5V12.5" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
1682
1823
  <path d="M10.257 16.6214L7.075 13.4394C6.489 12.8534 6.489 11.9034 7.075 11.3184V11.3184C7.661 10.7324 8.611 10.7324 9.196 11.3184" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
@@ -1687,56 +1828,56 @@ const ir = [
1687
1828
  <path d="M2 17V18C2 19.105 2.895 20 4 20H5" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
1688
1829
  <path d="M20 5V4C20 2.895 19.105 2 18 2H17" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
1689
1830
  </svg>
1690
- `, Rr = `<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
1831
+ `, oo = `<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
1691
1832
  <circle cx="6.49771" cy="5.49762" r="2.50104" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
1692
1833
  <circle cx="6.49771" cy="18.503" r="2.50104" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
1693
1834
  <path d="M6.49771 7.99854V16.0019" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
1694
1835
  <circle cx="17.5023" cy="13.0006" r="2.50104" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
1695
1836
  <path d="M6.49771 7.99854V7.99854C6.49771 10.7611 8.73722 13.0006 11.4998 13.0006H15.0013" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
1696
1837
  </svg>
1697
- `, Ar = (e) => {
1698
- const { query: t, actions: o } = H(), {
1699
- id: r,
1838
+ `, so = (e) => {
1839
+ const { query: t, actions: o } = G(), {
1840
+ id: n,
1700
1841
  expanded: i,
1701
1842
  actions: s,
1702
- displayName: l,
1703
- children: a,
1704
- depth: d
1705
- } = en((p) => ({
1706
- expanded: p.expanded,
1707
- displayName: Ze(t.node(p.id).get())
1708
- })), { selected: k, selectable: h } = H((p, b) => {
1709
- const g = b.node(r).get();
1843
+ displayName: d,
1844
+ children: l,
1845
+ depth: h
1846
+ } = Er((w) => ({
1847
+ expanded: w.expanded,
1848
+ displayName: ft(t.node(w.id).get())
1849
+ })), { selected: f, selectable: u } = G((w, m) => {
1850
+ const g = m.node(n).get();
1710
1851
  return {
1711
- selected: b.getEvent("selected").contains(r),
1852
+ selected: m.getEvent("selected").contains(n),
1712
1853
  nodeDOM: g.dom,
1713
- selectable: Ue(g)
1854
+ selectable: gt(g)
1714
1855
  };
1715
1856
  });
1716
- V(() => {
1717
- r === _ && s.setExpandedState(!0);
1718
- }, [s, r]), V(() => {
1719
- if (a.length === 0) return;
1720
- a.some((b) => {
1857
+ z(() => {
1858
+ n === X && s.setExpandedState(!0);
1859
+ }, [s, n]), z(() => {
1860
+ if (l.length === 0) return;
1861
+ l.some((m) => {
1721
1862
  const g = t.getEvent("selected").all();
1722
- return g.includes(b) ? !0 : t.node(b).descendants(!0).some((m) => g.includes(m));
1863
+ return g.includes(m) ? !0 : t.node(m).descendants(!0).some((v) => g.includes(v));
1723
1864
  }) && s.setExpandedState(!0);
1724
- }, [a, s, t]);
1725
- const u = () => {
1726
- o.selectNode(r);
1727
- }, c = (p) => {
1728
- p.stopPropagation(), s.toggleLayer();
1865
+ }, [l, s, t]);
1866
+ const p = () => {
1867
+ o.selectNode(n);
1868
+ }, a = (w) => {
1869
+ w.stopPropagation(), s.toggleLayer();
1729
1870
  };
1730
- return /* @__PURE__ */ w(
1871
+ return /* @__PURE__ */ b(
1731
1872
  "div",
1732
1873
  {
1733
1874
  children: [
1734
- /* @__PURE__ */ w(
1875
+ /* @__PURE__ */ b(
1735
1876
  "div",
1736
1877
  {
1737
- onClick: u,
1878
+ onClick: p,
1738
1879
  style: {
1739
- paddingLeft: Math.max(0, d - 1) * 16
1880
+ paddingLeft: Math.max(0, h - 1) * 16
1740
1881
  },
1741
1882
  css: [
1742
1883
  {
@@ -1747,17 +1888,17 @@ const ir = [
1747
1888
  gap: 2,
1748
1889
  borderWidth: 1,
1749
1890
  borderStyle: "solid",
1750
- borderColor: f.palette.white["1s"],
1891
+ borderColor: c.palette.white["1s"],
1751
1892
  cursor: "pointer",
1752
1893
  borderRadius: 4,
1753
- "&:hover": { backgroundColor: f.palette.white["1s"] }
1894
+ "&:hover": { backgroundColor: c.palette.white["1s"] }
1754
1895
  },
1755
- !h && { pointerEvents: "none" },
1756
- k && { backgroundColor: f.palette.black["7s"] },
1757
- r === _ && { display: "none" }
1896
+ !u && { pointerEvents: "none" },
1897
+ f && { backgroundColor: c.palette.black["7s"] },
1898
+ n === X && { display: "none" }
1758
1899
  ],
1759
1900
  children: [
1760
- a.length ? /* @__PURE__ */ n(W, { css: { pointerEvents: "auto" }, onClick: c, children: /* @__PURE__ */ n(
1901
+ l.length ? /* @__PURE__ */ r(A, { css: { pointerEvents: "auto" }, onClick: a, children: /* @__PURE__ */ r(
1761
1902
  I,
1762
1903
  {
1763
1904
  css: [
@@ -1765,10 +1906,10 @@ const ir = [
1765
1906
  i && { transform: "rotate(0deg)" }
1766
1907
  ],
1767
1908
  size: 16,
1768
- source: Ge
1909
+ source: we
1769
1910
  }
1770
- ) }) : /* @__PURE__ */ n("div", { css: { padding: 4 }, children: /* @__PURE__ */ n(I, { size: 16, source: Rr }) }),
1771
- /* @__PURE__ */ n(
1911
+ ) }) : /* @__PURE__ */ r("div", { css: { padding: 4 }, children: /* @__PURE__ */ r(I, { size: 16, source: oo }) }),
1912
+ /* @__PURE__ */ r(
1772
1913
  "span",
1773
1914
  {
1774
1915
  css: [
@@ -1777,17 +1918,17 @@ const ir = [
1777
1918
  textOverflow: "ellipsis",
1778
1919
  whiteSpace: "nowrap",
1779
1920
  flex: 1,
1780
- ...ke.xs
1921
+ ...le.xs
1781
1922
  },
1782
- !h && { color: f.palette.white["3s"] }
1923
+ !u && { color: c.palette.white["3s"] }
1783
1924
  ],
1784
- children: l
1925
+ children: d
1785
1926
  }
1786
1927
  )
1787
1928
  ]
1788
1929
  }
1789
1930
  ),
1790
- /* @__PURE__ */ n(
1931
+ /* @__PURE__ */ r(
1791
1932
  "div",
1792
1933
  {
1793
1934
  css: {
@@ -1805,12 +1946,12 @@ const ir = [
1805
1946
  ]
1806
1947
  }
1807
1948
  );
1808
- }, Dr = ({ onClose: e }) => {
1809
- const t = En(), o = (r) => {
1810
- t.start(r);
1949
+ }, io = ({ onClose: e }) => {
1950
+ const t = en(), o = (n) => {
1951
+ t.start(n);
1811
1952
  };
1812
- return /* @__PURE__ */ n(he, { children: /* @__PURE__ */ w(
1813
- Kt.div,
1953
+ return /* @__PURE__ */ r(ce, { children: /* @__PURE__ */ b(
1954
+ Ir.div,
1814
1955
  {
1815
1956
  drag: !0,
1816
1957
  dragControls: t,
@@ -1821,14 +1962,14 @@ const ir = [
1821
1962
  display: "flex",
1822
1963
  flexDirection: "column",
1823
1964
  borderRadius: 6,
1824
- backgroundColor: f.palette.ink["6s"],
1965
+ backgroundColor: c.palette.ink["6s"],
1825
1966
  borderWidth: 1,
1826
1967
  borderStyle: "solid",
1827
- borderColor: f.palette.white["2s"],
1968
+ borderColor: c.palette.white["2s"],
1828
1969
  color: "white"
1829
1970
  },
1830
1971
  children: [
1831
- /* @__PURE__ */ w(
1972
+ /* @__PURE__ */ b(
1832
1973
  "div",
1833
1974
  {
1834
1975
  onPointerDown: o,
@@ -1841,24 +1982,24 @@ const ir = [
1841
1982
  cursor: "grab"
1842
1983
  },
1843
1984
  children: [
1844
- /* @__PURE__ */ w("div", { css: { display: "flex", alignItems: "center", gap: 8 }, children: [
1845
- /* @__PURE__ */ n(I, { source: Nr }),
1846
- /* @__PURE__ */ n(
1985
+ /* @__PURE__ */ b("div", { css: { display: "flex", alignItems: "center", gap: 8 }, children: [
1986
+ /* @__PURE__ */ r(I, { source: no }),
1987
+ /* @__PURE__ */ r(
1847
1988
  "p",
1848
1989
  {
1849
1990
  css: {
1850
- ...f.text.sm,
1991
+ ...c.text.sm,
1851
1992
  fontWeight: 500
1852
1993
  },
1853
1994
  children: "Layers"
1854
1995
  }
1855
1996
  )
1856
1997
  ] }),
1857
- /* @__PURE__ */ n(W, { onClick: e, children: /* @__PURE__ */ n(I, { source: _e }) })
1998
+ /* @__PURE__ */ r(A, { onClick: e, children: /* @__PURE__ */ r(I, { source: Pe }) })
1858
1999
  ]
1859
2000
  }
1860
2001
  ),
1861
- /* @__PURE__ */ n(
2002
+ /* @__PURE__ */ r(
1862
2003
  "div",
1863
2004
  {
1864
2005
  css: {
@@ -1866,16 +2007,16 @@ const ir = [
1866
2007
  overflow: "auto",
1867
2008
  borderTopWidth: 1,
1868
2009
  borderTopStyle: "solid",
1869
- borderColor: f.palette.white["1s"],
2010
+ borderColor: c.palette.white["1s"],
1870
2011
  flex: 1
1871
2012
  },
1872
- children: /* @__PURE__ */ n(Qt, { renderLayer: Ar })
2013
+ children: /* @__PURE__ */ r(Mr, { renderLayer: so })
1873
2014
  }
1874
2015
  )
1875
2016
  ]
1876
2017
  }
1877
2018
  ) });
1878
- }, pt = {
2019
+ }, Wt = {
1879
2020
  primary: "Primary",
1880
2021
  secondary: "Secondary",
1881
2022
  red: "Red",
@@ -1885,83 +2026,83 @@ const ir = [
1885
2026
  blue: "Blue",
1886
2027
  neutral: "Neutral",
1887
2028
  violet: "Violet"
1888
- }, Br = ["primary", "secondary"], Pr = Object.keys(pt), jr = [100, 200, 300, 400, 500, 600, 700, 800], Vr = () => {
1889
- const e = $(), t = !!e.handlers.saveTheme, o = e.theme.palette, r = G(e.theme), i = G(!1);
1890
- V(() => {
1891
- const c = r.current;
2029
+ }, ao = ["primary", "secondary"], lo = Object.keys(Wt), co = [100, 200, 300, 400, 500, 600, 700, 800], ho = () => {
2030
+ const e = U(), t = !!e.handlers.saveTheme, o = e.theme.palette, n = K(e.theme), i = K(!1);
2031
+ z(() => {
2032
+ const a = n.current;
1892
2033
  return () => {
1893
- i.current || e.setState({ theme: c });
2034
+ i.current || e.setState({ theme: a });
1894
2035
  };
1895
2036
  }, []);
1896
- const s = (c) => o[c], l = (c, p) => {
1897
- const b = s(c), g = {
2037
+ const s = (a) => o[a], d = (a, w) => {
2038
+ const m = s(a), g = {
1898
2039
  palette: {
1899
2040
  background: o.background,
1900
2041
  border: o.border,
1901
2042
  surface: o.surface,
1902
- [c]: { main: p, contrast: b.contrast }
2043
+ [a]: { main: w, contrast: m.contrast }
1903
2044
  }
1904
2045
  };
1905
- e.setState({ theme: Re(g) });
1906
- }, a = (c, p) => {
1907
- const b = s(c), g = {
2046
+ e.setState({ theme: tt(g) });
2047
+ }, l = (a, w) => {
2048
+ const m = s(a), g = {
1908
2049
  palette: {
1909
2050
  background: o.background,
1910
2051
  border: o.border,
1911
2052
  surface: o.surface,
1912
- [c]: { main: b[600], contrast: p }
2053
+ [a]: { main: m[600], contrast: w }
1913
2054
  }
1914
2055
  };
1915
- e.setState({ theme: Re(g) });
1916
- }, [d, k] = P(!1), h = async () => {
1917
- k(!0);
2056
+ e.setState({ theme: tt(g) });
2057
+ }, [h, f] = j(!1), u = async () => {
2058
+ f(!0);
1918
2059
  try {
1919
2060
  await e.handlers.saveTheme?.(e.theme), i.current = !0;
1920
2061
  } finally {
1921
- k(!1);
2062
+ f(!1);
1922
2063
  }
1923
- }, u = () => {
1924
- e.setState({ theme: r.current, action: void 0 });
2064
+ }, p = () => {
2065
+ e.setState({ theme: n.current, action: void 0 });
1925
2066
  };
1926
- return /* @__PURE__ */ w("div", { css: { display: "flex", flexDirection: "column", height: "100%" }, children: [
1927
- /* @__PURE__ */ n("div", { css: { display: "flex", padding: 8, alignItems: "center" }, children: /* @__PURE__ */ n("h6", { css: { fontWeight: 500 }, children: "Palette" }) }),
1928
- /* @__PURE__ */ n(
1929
- ce,
2067
+ return /* @__PURE__ */ b("div", { css: { display: "flex", flexDirection: "column", height: "100%" }, children: [
2068
+ /* @__PURE__ */ r("div", { css: { display: "flex", padding: 8, alignItems: "center" }, children: /* @__PURE__ */ r("h6", { css: { fontWeight: 500 }, children: "Palette" }) }),
2069
+ /* @__PURE__ */ r(
2070
+ Be,
1930
2071
  {
1931
2072
  css: {
1932
2073
  paddingInline: 8,
1933
2074
  paddingBlock: 8,
1934
2075
  borderTopWidth: 1,
1935
2076
  borderTopStyle: "solid",
1936
- borderColor: f.palette.white["1s"],
2077
+ borderColor: c.palette.white["1s"],
1937
2078
  flex: 1
1938
2079
  },
1939
- children: /* @__PURE__ */ n("div", { css: { display: "flex", flexDirection: "column", gap: 12 }, children: Pr.map((c) => {
1940
- const p = s(c), b = Br.includes(c);
1941
- return /* @__PURE__ */ w("div", { css: { display: "flex", flexDirection: "column", gap: 4 }, children: [
1942
- /* @__PURE__ */ n("p", { css: { ...ke.xs, color: f.palette.white["4s"] }, children: pt[c] }),
1943
- /* @__PURE__ */ w("div", { css: { display: "flex", alignItems: "center", gap: 8 }, children: [
1944
- t && b && /* @__PURE__ */ w("div", { css: { display: "flex", gap: 4 }, children: [
1945
- /* @__PURE__ */ n(
1946
- Le,
2080
+ children: /* @__PURE__ */ r("div", { css: { display: "flex", flexDirection: "column", gap: 12 }, children: lo.map((a) => {
2081
+ const w = s(a), m = ao.includes(a);
2082
+ return /* @__PURE__ */ b("div", { css: { display: "flex", flexDirection: "column", gap: 4 }, children: [
2083
+ /* @__PURE__ */ r("p", { css: { ...le.xs, color: c.palette.white["4s"] }, children: Wt[a] }),
2084
+ /* @__PURE__ */ b("div", { css: { display: "flex", alignItems: "center", gap: 8 }, children: [
2085
+ t && m && /* @__PURE__ */ b("div", { css: { display: "flex", gap: 4 }, children: [
2086
+ /* @__PURE__ */ r(
2087
+ Je,
1947
2088
  {
1948
2089
  hidePalette: !0,
1949
- color: p[600],
1950
- onChange: (g) => l(c, g),
2090
+ color: w[600],
2091
+ onChange: (g) => d(a, g),
1951
2092
  placement: "right-start"
1952
2093
  }
1953
2094
  ),
1954
- /* @__PURE__ */ n(
1955
- Le,
2095
+ /* @__PURE__ */ r(
2096
+ Je,
1956
2097
  {
1957
2098
  hidePalette: !0,
1958
- color: p.contrast,
1959
- onChange: (g) => a(c, g),
2099
+ color: w.contrast,
2100
+ onChange: (g) => l(a, g),
1960
2101
  placement: "right-start"
1961
2102
  }
1962
2103
  )
1963
2104
  ] }),
1964
- /* @__PURE__ */ n(
2105
+ /* @__PURE__ */ r(
1965
2106
  "div",
1966
2107
  {
1967
2108
  css: {
@@ -1969,7 +2110,7 @@ const ir = [
1969
2110
  gap: 4,
1970
2111
  flex: 1
1971
2112
  },
1972
- children: jr.map((g) => /* @__PURE__ */ n(
2113
+ children: co.map((g) => /* @__PURE__ */ r(
1973
2114
  "div",
1974
2115
  {
1975
2116
  css: {
@@ -1979,14 +2120,14 @@ const ir = [
1979
2120
  padding: 1,
1980
2121
  borderWidth: 1,
1981
2122
  borderStyle: "solid",
1982
- borderColor: f.palette.white["3s"]
2123
+ borderColor: c.palette.white["3s"]
1983
2124
  },
1984
- title: `${c}.${g}`,
1985
- children: /* @__PURE__ */ n(
2125
+ title: `${a}.${g}`,
2126
+ children: /* @__PURE__ */ r(
1986
2127
  "div",
1987
2128
  {
1988
2129
  css: { width: "100%", height: "100%", borderRadius: 1 },
1989
- style: { backgroundColor: p[g] }
2130
+ style: { backgroundColor: w[g] }
1990
2131
  }
1991
2132
  )
1992
2133
  },
@@ -1995,11 +2136,11 @@ const ir = [
1995
2136
  }
1996
2137
  )
1997
2138
  ] })
1998
- ] }, c);
2139
+ ] }, a);
1999
2140
  }) })
2000
2141
  }
2001
2142
  ),
2002
- t && /* @__PURE__ */ w(
2143
+ t && /* @__PURE__ */ b(
2003
2144
  "div",
2004
2145
  {
2005
2146
  css: {
@@ -2008,111 +2149,105 @@ const ir = [
2008
2149
  padding: 8,
2009
2150
  borderTopWidth: 1,
2010
2151
  borderTopStyle: "solid",
2011
- borderColor: f.palette.white["1s"]
2152
+ borderColor: c.palette.white["1s"]
2012
2153
  },
2013
2154
  children: [
2014
- /* @__PURE__ */ n(oe, { variant: "text", onClick: u, disabled: d, css: { flex: 1 }, children: "Cancel" }),
2015
- /* @__PURE__ */ n(oe, { onClick: h, isLoading: d, css: { flex: 1 }, children: d ? "Saving..." : "Save" })
2155
+ /* @__PURE__ */ r(me, { variant: "text", onClick: p, disabled: h, css: { flex: 1 }, children: "Cancel" }),
2156
+ /* @__PURE__ */ r(me, { onClick: u, isLoading: h, css: { flex: 1 }, children: h ? "Saving..." : "Save" })
2016
2157
  ]
2017
2158
  }
2018
2159
  )
2019
2160
  ] });
2020
- }, Fr = `<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
2161
+ }, uo = `<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
2021
2162
  <path fill-rule="evenodd" clip-rule="evenodd" d="M3 7.024L11.987 11.049L21 7.024L12.013 3L3 7.024Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
2022
2163
  <path d="M15.436 14.484L21 16.976L11.987 21L3 16.976L8.564 14.491" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
2023
2164
  <path d="M15.436 9.50903L21 12L11.987 16.024L3 12L8.564 9.51603" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
2024
2165
  </svg>
2025
- `, Or = `<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
2026
- <path d="M5 12H19" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
2027
- <path d="M10 7L5 12" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
2028
- <path d="M10 17L5 12" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
2029
- </svg>
2030
- `, Hr = `<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
2166
+ `, po = `<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
2031
2167
  <path fill-rule="evenodd" clip-rule="evenodd" d="M20.221 4.29206V4.29206C19.438 3.50906 18.183 3.46806 17.35 4.19606L9.31298 11.2281C8.44198 11.9901 8.39798 13.3291 9.21598 14.1471L10.365 15.2961C11.183 16.1141 12.523 16.0691 13.284 15.1991L20.316 7.16206C21.045 6.33006 21.003 5.07506 20.221 4.29206V4.29206Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
2032
2168
  <path d="M10.87 9.87012L14.65 13.6501" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
2033
2169
  <path fill-rule="evenodd" clip-rule="evenodd" d="M3.59903 20.3231H7.30203C10.287 20.3231 11.782 16.7141 9.67103 14.6031V14.6031C8.11903 13.0511 5.48303 13.6221 4.71303 15.6771L3.19103 19.7351C3.08503 20.0201 3.29503 20.3231 3.59903 20.3231Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
2034
2170
  </svg>
2035
- `, $r = ({ insert: e }) => {
2036
- const [t, o] = ot(!1), { action: r = "insert", setState: i } = $(), { actions: s, isDeletable: l, focusedNode: a } = H((u, c) => {
2037
- const p = c.getEvent("selected").first(), b = p ? c.node(p) : null;
2171
+ `, go = ({ insert: e }) => {
2172
+ const [t, o] = pt(!1), { action: n = "insert", setState: i } = U(), { actions: s, isDeletable: d, focusedNode: l } = G((p, a) => {
2173
+ const w = a.getEvent("selected").first(), m = w ? a.node(w) : null;
2038
2174
  return {
2039
- enabled: u.options.enabled,
2040
- isDeletable: !!(b?.isDeletable() && (b.get().data.custom?.deletable ?? !0)),
2041
- focusedNode: b?.get()
2175
+ enabled: p.options.enabled,
2176
+ isDeletable: !!(m?.isDeletable() && (m.get().data.custom?.deletable ?? !0)),
2177
+ focusedNode: m?.get()
2042
2178
  };
2043
- }), d = () => {
2179
+ }), h = () => {
2044
2180
  s.selectNode();
2045
- }, k = (u) => {
2046
- s.delete(u.currentTarget.value);
2047
- }, h = (u) => {
2048
- const c = u.currentTarget.value;
2049
- c === "layers" ? o() : (d(), i({ action: c }));
2181
+ }, f = (p) => {
2182
+ s.delete(p.currentTarget.value);
2183
+ }, u = (p) => {
2184
+ const a = p.currentTarget.value;
2185
+ a === "layers" ? o() : (h(), i({ action: a }));
2050
2186
  };
2051
- return /* @__PURE__ */ w(ie, { children: [
2052
- /* @__PURE__ */ w(
2187
+ return /* @__PURE__ */ b(J, { children: [
2188
+ /* @__PURE__ */ b(
2053
2189
  "aside",
2054
2190
  {
2055
2191
  css: {
2056
2192
  display: "flex",
2057
2193
  position: "relative",
2058
2194
  alignItems: "stretch",
2059
- backgroundColor: f.palette.ink["6s"],
2060
- color: f.palette.white["6s"],
2195
+ backgroundColor: c.palette.ink["6s"],
2196
+ color: c.palette.white["6s"],
2061
2197
  borderTopWidth: 1,
2062
2198
  borderTopStyle: "solid",
2063
- borderColor: f.palette.white["2s"],
2064
- ...f.text.sm
2199
+ borderColor: c.palette.white["2s"]
2065
2200
  },
2066
2201
  children: [
2067
- /* @__PURE__ */ w("div", { css: { display: "flex", paddingInline: 4, flexDirection: "column", gap: 4 }, children: [
2068
- !!e && /* @__PURE__ */ w(Oe, { children: [
2069
- /* @__PURE__ */ n(
2070
- W,
2202
+ /* @__PURE__ */ b("div", { css: { display: "flex", paddingInline: 4, flexDirection: "column", gap: 4 }, children: [
2203
+ !!e && /* @__PURE__ */ b(ct, { children: [
2204
+ /* @__PURE__ */ r(
2205
+ A,
2071
2206
  {
2072
2207
  tooltip: {
2073
2208
  content: "Insert",
2074
2209
  placement: "right"
2075
2210
  },
2076
- onClick: h,
2211
+ onClick: u,
2077
2212
  value: "insert",
2078
2213
  css: { position: "relative" },
2079
2214
  size: "32",
2080
- children: /* @__PURE__ */ n(I, { source: $e })
2215
+ children: /* @__PURE__ */ r(I, { source: ht })
2081
2216
  }
2082
2217
  ),
2083
- /* @__PURE__ */ n("hr", { css: { borderColor: f.palette.white["2s"] } })
2218
+ /* @__PURE__ */ r("hr", { css: { borderColor: c.palette.white["2s"] } })
2084
2219
  ] }),
2085
- /* @__PURE__ */ n(
2086
- W,
2220
+ /* @__PURE__ */ r(
2221
+ A,
2087
2222
  {
2088
2223
  tooltip: {
2089
2224
  content: "Layers",
2090
2225
  placement: "right"
2091
2226
  },
2092
- onClick: h,
2227
+ onClick: u,
2093
2228
  value: "layers",
2094
2229
  css: { position: "relative" },
2095
2230
  size: "32",
2096
- children: /* @__PURE__ */ n(I, { source: Fr })
2231
+ children: /* @__PURE__ */ r(I, { source: uo })
2097
2232
  }
2098
2233
  ),
2099
- /* @__PURE__ */ n("hr", { css: { borderColor: f.palette.white["2s"] } }),
2100
- /* @__PURE__ */ n(
2101
- W,
2234
+ /* @__PURE__ */ r("hr", { css: { borderColor: c.palette.white["2s"] } }),
2235
+ /* @__PURE__ */ r(
2236
+ A,
2102
2237
  {
2103
2238
  tooltip: {
2104
2239
  content: "Theme",
2105
2240
  placement: "right"
2106
2241
  },
2107
- onClick: h,
2242
+ onClick: u,
2108
2243
  value: "theme",
2109
2244
  css: { position: "relative" },
2110
2245
  size: "32",
2111
- children: /* @__PURE__ */ n(I, { source: Hr })
2246
+ children: /* @__PURE__ */ r(I, { source: po })
2112
2247
  }
2113
2248
  )
2114
2249
  ] }),
2115
- /* @__PURE__ */ w(
2250
+ /* @__PURE__ */ b(
2116
2251
  "div",
2117
2252
  {
2118
2253
  css: {
@@ -2123,18 +2258,18 @@ const ir = [
2123
2258
  width: 288,
2124
2259
  borderLeftWidth: 1,
2125
2260
  borderLeftStyle: "solid",
2126
- borderColor: f.palette.white["1s"]
2261
+ borderColor: c.palette.white["1s"]
2127
2262
  },
2128
2263
  children: [
2129
- r === "theme" && /* @__PURE__ */ n("div", { css: { overflow: "auto", flex: 1 }, children: /* @__PURE__ */ n(Vr, {}) }),
2130
- r !== "theme" && !a?.related.inspector && /* @__PURE__ */ n("div", { css: { overflow: "auto", flex: 1 }, children: r === "insert" && !!e && /* @__PURE__ */ n(Mr, { groups: e.groups }) }),
2131
- r !== "theme" && !!a?.related?.inspector && /* @__PURE__ */ w("div", { css: { display: "flex", flexDirection: "column", overflow: "hidden", flex: 1 }, children: [
2132
- /* @__PURE__ */ w("div", { css: { display: "flex", paddingInline: 8, paddingBlock: 8, alignItems: "center", gap: 8 }, children: [
2133
- /* @__PURE__ */ n(W, { onClick: d, children: /* @__PURE__ */ n(I, { source: Or }) }),
2134
- /* @__PURE__ */ n("div", { css: { overflow: "hidden", flex: 1 }, children: /* @__PURE__ */ n(ze, { fullWidth: !0, value: Ze(a), size: "32" }) }),
2135
- l && /* @__PURE__ */ n(W, { value: a.id, onClick: k, children: /* @__PURE__ */ n(I, { css: { color: f.palette.red["4s"] }, source: tn }) })
2264
+ n === "theme" && /* @__PURE__ */ r("div", { css: { overflow: "auto", flex: 1 }, children: /* @__PURE__ */ r(ho, {}) }),
2265
+ n !== "theme" && !l?.related.inspector && /* @__PURE__ */ r("div", { css: { overflow: "auto", flex: 1 }, children: n === "insert" && !!e && /* @__PURE__ */ r(Kn, { groups: e.groups }) }),
2266
+ n !== "theme" && !!l?.related?.inspector && /* @__PURE__ */ b("div", { css: { display: "flex", flexDirection: "column", overflow: "hidden", flex: 1 }, children: [
2267
+ /* @__PURE__ */ b("div", { css: { display: "flex", paddingInline: 8, paddingBlock: 8, alignItems: "center", gap: 8 }, children: [
2268
+ /* @__PURE__ */ r(A, { onClick: h, children: /* @__PURE__ */ r(I, { source: Lr }) }),
2269
+ /* @__PURE__ */ r("div", { css: { overflow: "hidden", flex: 1 }, children: /* @__PURE__ */ r(ut, { fullWidth: !0, value: ft(l), size: "32" }) }),
2270
+ d && /* @__PURE__ */ r(A, { value: l.id, onClick: f, children: /* @__PURE__ */ r(I, { css: { color: c.palette.red["4s"] }, source: Rr }) })
2136
2271
  ] }),
2137
- /* @__PURE__ */ n(
2272
+ /* @__PURE__ */ r(
2138
2273
  "div",
2139
2274
  {
2140
2275
  css: {
@@ -2142,9 +2277,9 @@ const ir = [
2142
2277
  flex: 1,
2143
2278
  borderTopWidth: 1,
2144
2279
  borderTopStyle: "solid",
2145
- borderColor: f.palette.white["1s"]
2280
+ borderColor: c.palette.white["1s"]
2146
2281
  },
2147
- children: /* @__PURE__ */ n(pn, { fallback: null, children: Ye(a.related.inspector) })
2282
+ children: /* @__PURE__ */ r(Fr, { fallback: null, children: bt(l.related.inspector) })
2148
2283
  }
2149
2284
  )
2150
2285
  ] })
@@ -2154,20 +2289,20 @@ const ir = [
2154
2289
  ]
2155
2290
  }
2156
2291
  ),
2157
- t && /* @__PURE__ */ n(Dr, { onClose: o })
2292
+ t && /* @__PURE__ */ r(io, { onClose: o })
2158
2293
  ] });
2159
- }, _r = () => {
2160
- const { dom: e } = me((s) => ({
2294
+ }, fo = () => {
2295
+ const { dom: e } = je((s) => ({
2161
2296
  dom: s.dom
2162
- })), { document: t } = ve(), { floatingStyles: o, refs: r } = le({
2297
+ })), { document: t } = Oe(), { floatingStyles: o, refs: n } = Ce({
2163
2298
  open: !0,
2164
2299
  strategy: "fixed",
2165
2300
  placement: "bottom-start",
2166
2301
  middleware: [
2167
2302
  {
2168
2303
  name: "overlay",
2169
- fn({ rects: s, elements: l }) {
2170
- return Object.assign(l.floating.style, {
2304
+ fn({ rects: s, elements: d }) {
2305
+ return Object.assign(d.floating.style, {
2171
2306
  width: `${s.reference.width}px`,
2172
2307
  height: `${s.reference.height}px`
2173
2308
  }), {
@@ -2177,13 +2312,13 @@ const ir = [
2177
2312
  }
2178
2313
  }
2179
2314
  ],
2180
- whileElementsMounted: de
2315
+ whileElementsMounted: xe
2181
2316
  });
2182
- V(() => {
2183
- r.setReference(e);
2184
- }, [e, r]);
2185
- const i = gn((s) => r.setFloating(s), [r]);
2186
- return e ? /* @__PURE__ */ n(he, { root: t?.body, children: /* @__PURE__ */ n(
2317
+ z(() => {
2318
+ n.setReference(e);
2319
+ }, [e, n]);
2320
+ const i = oe((s) => n.setFloating(s), [n]);
2321
+ return e ? /* @__PURE__ */ r(ce, { root: t?.body, children: /* @__PURE__ */ r(
2187
2322
  "div",
2188
2323
  {
2189
2324
  ref: i,
@@ -2193,49 +2328,49 @@ const ir = [
2193
2328
  zIndex: 9999,
2194
2329
  borderWidth: 1,
2195
2330
  borderStyle: "dashed",
2196
- borderColor: f.palette.ink["6s"]
2331
+ borderColor: c.palette.ink["6s"]
2197
2332
  }
2198
2333
  }
2199
2334
  ) }) : null;
2200
- }, zr = ({ render: e }) => {
2201
- const { id: t, toolbar: o } = me((s) => ({
2202
- toolbar: sn(s).toolbar
2203
- })), { mode: r } = $(), { isActiveSelectable: i } = H((s, l) => {
2204
- const a = l.getEvent("selected").contains(t) && t !== _, d = a ? Ue(l.node(t).get()) : !1;
2205
- return { isActiveSelectable: a && d };
2335
+ }, bo = ({ render: e }) => {
2336
+ const { id: t, toolbar: o } = je((s) => ({
2337
+ toolbar: Dr(s).toolbar
2338
+ })), { mode: n } = U(), { isActiveSelectable: i } = G((s, d) => {
2339
+ const l = d.getEvent("selected").contains(t) && t !== X, h = l ? gt(d.node(t).get()) : !1;
2340
+ return { isActiveSelectable: l && h };
2206
2341
  });
2207
- return /* @__PURE__ */ w(ie, { children: [
2208
- i && r === "full" && /* @__PURE__ */ w(ie, { children: [
2209
- /* @__PURE__ */ n(Gr, { children: o ? Ye(o) : /* @__PURE__ */ n(Ur, {}) }),
2210
- /* @__PURE__ */ n(_r, {})
2342
+ return /* @__PURE__ */ b(J, { children: [
2343
+ i && n === "full" && /* @__PURE__ */ b(J, { children: [
2344
+ /* @__PURE__ */ r(wo, { children: o ? bt(o) : /* @__PURE__ */ r(mo, {}) }),
2345
+ /* @__PURE__ */ r(fo, {})
2211
2346
  ] }),
2212
2347
  e
2213
2348
  ] });
2214
- }, Gr = ({ children: e }) => {
2215
- const { dom: t } = me((s) => ({ dom: s.dom })), { document: o } = ve(), { floatingStyles: r, refs: i } = le({
2349
+ }, wo = ({ children: e }) => {
2350
+ const { dom: t } = je((s) => ({ dom: s.dom })), { document: o } = Oe(), { floatingStyles: n, refs: i } = Ce({
2216
2351
  open: !0,
2217
2352
  placement: "bottom-start",
2218
- middleware: [Ce(), qe(4)],
2219
- whileElementsMounted: de
2353
+ middleware: [Ve(), wt(4)],
2354
+ whileElementsMounted: xe
2220
2355
  });
2221
- return V(() => {
2356
+ return z(() => {
2222
2357
  i.setReference(t);
2223
- }, [t, i]), t ? /* @__PURE__ */ n(he, { root: o?.body, children: /* @__PURE__ */ n(
2358
+ }, [t, i]), t ? /* @__PURE__ */ r(ce, { root: o?.body, children: /* @__PURE__ */ r(
2224
2359
  "div",
2225
2360
  {
2226
2361
  css: {
2227
2362
  paddingBlock: 4,
2228
2363
  paddingInline: 6,
2229
- backgroundColor: f.palette.ink["6s"],
2230
- color: f.palette.white["6s"],
2364
+ backgroundColor: c.palette.ink["6s"],
2365
+ color: c.palette.white["6s"],
2231
2366
  borderRadius: 4
2232
2367
  },
2233
2368
  ref: i.setFloating,
2234
- style: r,
2369
+ style: n,
2235
2370
  children: e
2236
2371
  }
2237
2372
  ) }) : null;
2238
- }, Ur = () => /* @__PURE__ */ w(
2373
+ }, mo = () => /* @__PURE__ */ b(
2239
2374
  "div",
2240
2375
  {
2241
2376
  css: {
@@ -2244,29 +2379,31 @@ const ir = [
2244
2379
  gap: 4
2245
2380
  },
2246
2381
  children: [
2247
- /* @__PURE__ */ n(nn, {}),
2248
- /* @__PURE__ */ n(rn, {}),
2249
- /* @__PURE__ */ n(on, {})
2382
+ /* @__PURE__ */ r(Wr, {}),
2383
+ /* @__PURE__ */ r(Nr, {}),
2384
+ /* @__PURE__ */ r(Ar, {})
2250
2385
  ]
2251
2386
  }
2252
- ), To = ({
2387
+ ), Go = ({
2253
2388
  theme: e,
2254
2389
  insert: t,
2255
2390
  resolver: o,
2256
- handlers: r,
2391
+ handlers: n,
2257
2392
  variableDefinitions: i,
2258
2393
  headerActions: s,
2394
+ resources: d,
2259
2395
  children: l
2260
2396
  }) => {
2261
- const { screen: a } = $({
2397
+ const { screen: h } = U({
2262
2398
  theme: e,
2263
- handlers: r,
2399
+ handlers: n,
2264
2400
  mode: "full",
2265
2401
  screen: "xs",
2266
- variableDefinitions: i
2402
+ variableDefinitions: i,
2403
+ resources: d
2267
2404
  });
2268
- return /* @__PURE__ */ w(rt, { enabled: !0, onRender: zr, resolver: o, children: [
2269
- /* @__PURE__ */ w(
2405
+ return /* @__PURE__ */ b(xt, { enabled: !0, onRender: bo, resolver: o, children: [
2406
+ /* @__PURE__ */ b(
2270
2407
  "div",
2271
2408
  {
2272
2409
  css: {
@@ -2274,18 +2411,19 @@ const ir = [
2274
2411
  flexDirection: "column",
2275
2412
  width: "100vw",
2276
2413
  height: "100vh",
2277
- backgroundColor: fe.ink["6s"],
2278
- color: fe.white["6s"]
2414
+ backgroundColor: We.ink["6s"],
2415
+ color: We.white["6s"],
2416
+ ...le.xs
2279
2417
  },
2280
2418
  children: [
2281
- /* @__PURE__ */ n(dr, { actions: s }),
2282
- /* @__PURE__ */ w("div", { css: { display: "flex", overflow: "hidden", flex: 1 }, children: [
2283
- /* @__PURE__ */ n($r, { insert: t }),
2284
- /* @__PURE__ */ n(
2285
- ut,
2419
+ /* @__PURE__ */ r(Bn, { actions: s }),
2420
+ /* @__PURE__ */ b("div", { css: { display: "flex", overflow: "hidden", flex: 1 }, children: [
2421
+ /* @__PURE__ */ r(go, { insert: t }),
2422
+ /* @__PURE__ */ r(
2423
+ Rt,
2286
2424
  {
2287
2425
  viewport: {
2288
- width: (d) => a === "lg" ? Math.max(d, We[a]) : We[a]
2426
+ width: (f) => h === "lg" ? Math.max(f, Ke[h]) : Ke[h]
2289
2427
  },
2290
2428
  children: l
2291
2429
  }
@@ -2294,109 +2432,111 @@ const ir = [
2294
2432
  ]
2295
2433
  }
2296
2434
  ),
2297
- /* @__PURE__ */ n(an, {})
2435
+ /* @__PURE__ */ r(Pr, {})
2298
2436
  ] });
2299
2437
  };
2300
2438
  export {
2301
- So as AspectRatioToolbar,
2302
- Eo as BackgroundToolbar,
2303
- Lo as BorderRadiusToolbar,
2304
- Wo as BorderToolbar,
2305
- No as ChildNodesToolbar,
2306
- Ro as ColorPickerContent,
2307
- Le as ColorPickerPopover,
2308
- Ao as ColorPreview,
2309
- Lt as ColorToolbar,
2310
- Do as ColorVariantToolbar,
2311
- Bo as ColumnGapToolbar,
2312
- Nt as CssFontWeightToolbar,
2313
- xt as CssSizeInput,
2314
- Po as CssTextAlignToolbar,
2315
- jo as CssWidthToolbar,
2316
- ko as DegreePicker,
2317
- Co as DisplayToolbar,
2318
- To as Editor,
2319
- Vo as FlexAlignItemsToolbar,
2320
- vo as FlexToolbar,
2321
- Fo as FlexWrapToolbar,
2322
- Oo as FontSizeToolbar,
2323
- ut as FramePreview,
2324
- Ho as GridAlignItemsToolbar,
2325
- $o as HeightToolbar,
2326
- _o as HtmlAnchorTargetToolbar,
2327
- zo as ImageSourceSelection,
2328
- Go as InsertInlineToolbar,
2329
- Uo as InsertLinkToolbar,
2330
- Zo as JustifyContentToolbar,
2331
- Yo as JustifyItemsToolbar,
2332
- mo as LineHeightToolbar,
2333
- Xo as MarginToolbar,
2334
- xo as MinWidthToolbar,
2335
- on as NodeDeleteToolbar,
2336
- nn as NodeDragToolbar,
2337
- rn as NodeNameToolbar,
2338
- qo as NumberField,
2339
- Jo as NumberFieldMixOptions,
2340
- Ko as ObjectFitToolbar,
2341
- Qo as OrderToolbar,
2342
- es as PaddingToolbar,
2343
- ts as RowGapToolbar,
2344
- ns as SvgSourceToolbar,
2345
- rs as TagNameToolbar,
2346
- Et as TextSizeVariantToolbar,
2347
- yo as TextStyleGroupToolbar,
2348
- Wt as TextStyleToolbar,
2349
- Rt as TextTransformToolbar,
2350
- J as ToolbarField,
2351
- os as ToolbarGroup,
2352
- ss as VisibilityToolbar,
2353
- oe as WbButton,
2354
- At as WbButtonGroup,
2355
- qt as WbCollapse,
2356
- is as WbColorPicker,
2357
- as as WbDatePicker,
2358
- go as WbDialog,
2359
- bo as WbDialogBody,
2360
- cs as WbDialogClose,
2361
- ls as WbDialogFooter,
2362
- ds as WbDialogHeader,
2363
- hs as WbDropzone,
2364
- Ln as WbFloating,
2365
- us as WbFloatingClose,
2366
- bt as WbFloatingContent,
2367
- ft as WbFloatingContext,
2368
- wo as WbFormLabel,
2439
+ Zo as AspectRatioToolbar,
2440
+ Xo as BackgroundToolbar,
2441
+ qo as BorderRadiusToolbar,
2442
+ Jo as BorderToolbar,
2443
+ Ko as ChildNodesToolbar,
2444
+ Qo as ColorPickerContent,
2445
+ Je as ColorPickerPopover,
2446
+ es as ColorPreview,
2447
+ nr as ColorToolbar,
2448
+ ts as ColorVariantToolbar,
2449
+ rs as ColumnGapToolbar,
2450
+ sr as CssFontWeightToolbar,
2451
+ qt as CssSizeInput,
2452
+ ns as CssTextAlignToolbar,
2453
+ os as CssWidthToolbar,
2454
+ Oo as DegreePicker,
2455
+ $o as DisplayToolbar,
2456
+ Go as Editor,
2457
+ ss as FlexAlignItemsToolbar,
2458
+ Ho as FlexToolbar,
2459
+ is as FlexWrapToolbar,
2460
+ as as FontSizeToolbar,
2461
+ Rt as FramePreview,
2462
+ ls as GridAlignItemsToolbar,
2463
+ cs as HeightToolbar,
2464
+ ds as HtmlAnchorTargetToolbar,
2465
+ hs as ImageGalleryDialog,
2466
+ us as ImageSourceSelection,
2467
+ ps as InsertInlineToolbar,
2468
+ gs as InsertLinkToolbar,
2469
+ fs as JustifyContentToolbar,
2470
+ bs as JustifyItemsToolbar,
2471
+ Fo as LineHeightToolbar,
2472
+ ws as MarginToolbar,
2473
+ zo as MinWidthToolbar,
2474
+ Ar as NodeDeleteToolbar,
2475
+ Wr as NodeDragToolbar,
2476
+ Nr as NodeNameToolbar,
2477
+ ms as NumberField,
2478
+ ks as NumberFieldMixOptions,
2479
+ vs as ObjectFitToolbar,
2480
+ Cs as OrderToolbar,
2481
+ xs as PaddingToolbar,
2482
+ ys as RowGapToolbar,
2483
+ Ts as SvgSourceToolbar,
2484
+ Ss as TagNameToolbar,
2485
+ rr as TextSizeVariantToolbar,
2486
+ _o as TextStyleGroupToolbar,
2487
+ or as TextStyleToolbar,
2488
+ ir as TextTransformToolbar,
2489
+ ae as ToolbarField,
2490
+ Is as ToolbarGroup,
2491
+ Ms as VisibilityToolbar,
2492
+ me as WbButton,
2493
+ ar as WbButtonGroup,
2494
+ Bo as WbCascader,
2495
+ Tr as WbCollapse,
2496
+ Es as WbColorPicker,
2497
+ Ls as WbDatePicker,
2498
+ Rs as WbDialog,
2499
+ Ws as WbDialogBody,
2500
+ Ns as WbDialogClose,
2501
+ As as WbDialogFooter,
2502
+ Ds as WbDialogHeader,
2503
+ Ps as WbDropzone,
2504
+ Bs as WbFloating,
2505
+ js as WbFloatingClose,
2506
+ Vs as WbFloatingContent,
2507
+ Os as WbFloatingContext,
2508
+ Vo as WbFormLabel,
2369
2509
  I as WbIcon,
2370
- W as WbIconButton,
2371
- ze as WbInput,
2372
- mt as WbInputNumber,
2373
- ps as WbLoadingOverlay,
2374
- gs as WbMenu,
2375
- fs as WbMenuItem,
2376
- bs as WbMenuList,
2377
- ws as WbMenuTrigger,
2378
- yt as WbPopover,
2379
- St as WbPopoverClose,
2380
- Mt as WbPopoverContent,
2381
- Tt as WbPopoverTrigger,
2382
- He as WbRadioButton,
2383
- ce as WbScrollView,
2384
- vt as WbSelect,
2385
- Jt as WbSvgLoader,
2386
- ks as WbSwitch,
2387
- ms as WbTab,
2388
- Cs as WbTabContent,
2389
- vs as WbTabList,
2390
- xs as WbTabPanel,
2391
- ys as WbTabs,
2392
- Ts as WbTextarea,
2393
- Is as WbTooltip,
2394
- Ms as WbVirtualizedList,
2395
- Ss as pushToast,
2396
- Es as textSizeVariantOptions,
2397
- fo as useDialogContext,
2398
- $ as useEditor,
2399
- Ls as useEditorResponsive,
2400
- Ws as useInlineEditable,
2401
- wt as useWbFloatingContext
2510
+ A as WbIconButton,
2511
+ ut as WbInput,
2512
+ Yt as WbInputNumber,
2513
+ Fs as WbLoadingOverlay,
2514
+ $s as WbMenu,
2515
+ Hs as WbMenuItem,
2516
+ zs as WbMenuList,
2517
+ _s as WbMenuTrigger,
2518
+ Jt as WbPopover,
2519
+ tr as WbPopoverClose,
2520
+ er as WbPopoverContent,
2521
+ Kt as WbPopoverTrigger,
2522
+ dt as WbRadioButton,
2523
+ Be as WbScrollView,
2524
+ Xt as WbSelect,
2525
+ Sr as WbSvgLoader,
2526
+ Gs as WbSwitch,
2527
+ Us as WbTab,
2528
+ Ys as WbTabContent,
2529
+ Zs as WbTabList,
2530
+ Xs as WbTabPanel,
2531
+ qs as WbTabs,
2532
+ Js as WbTextarea,
2533
+ Ks as WbTooltip,
2534
+ Qs as WbVirtualizedList,
2535
+ ei as pushToast,
2536
+ ti as textSizeVariantOptions,
2537
+ jo as useDialogContext,
2538
+ U as useEditor,
2539
+ ri as useEditorResponsive,
2540
+ ni as useInlineEditable,
2541
+ Gt as useWbFloatingContext
2402
2542
  };