@janbox/storefront-builder 1.0.4 → 1.0.6

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 (41) hide show
  1. package/README.md +480 -0
  2. package/dist/editor/hooks/use-editor-state.d.ts +13 -1
  3. package/dist/editor/lib/index.d.ts +4 -1
  4. package/dist/editor/ui/dialog/dialog/helpers.d.ts +1 -1
  5. package/dist/editor/ui/dialog/dialog-close/dialog-close.d.ts +1 -1
  6. package/dist/editor.js +356 -351
  7. package/dist/{index-CBDllFpx.js → index-BU9pvpw_.js} +263 -256
  8. package/dist/index.js +428 -419
  9. package/dist/lib/accordion/README.md +39 -0
  10. package/dist/lib/accordion-content/README.md +36 -0
  11. package/dist/lib/accordion-group/README.md +106 -0
  12. package/dist/lib/accordion-summary/README.md +37 -0
  13. package/dist/lib/box/README.md +107 -0
  14. package/dist/lib/button/README.md +94 -0
  15. package/dist/lib/cell/README.md +119 -0
  16. package/dist/lib/countdown-timer/README.md +157 -0
  17. package/dist/lib/flex-item/README.md +111 -0
  18. package/dist/lib/flexbox/README.md +120 -0
  19. package/dist/lib/grid/README.md +133 -0
  20. package/dist/lib/heading/README.md +53 -0
  21. package/dist/lib/icon/README.md +98 -0
  22. package/dist/lib/image/README.md +107 -0
  23. package/dist/lib/link/README.md +111 -0
  24. package/dist/lib/list-item/README.md +31 -0
  25. package/dist/lib/marquee/README.md +111 -0
  26. package/dist/lib/marquee-item/README.md +31 -0
  27. package/dist/lib/paragraph/README.md +82 -0
  28. package/dist/lib/root/README.md +33 -0
  29. package/dist/lib/swiper/README.md +108 -0
  30. package/dist/lib/swiper-slide/README.md +32 -0
  31. package/dist/lib/tab/README.md +35 -0
  32. package/dist/lib/tab-content/README.md +35 -0
  33. package/dist/lib/tab-list/README.md +35 -0
  34. package/dist/lib/tab-panel/README.md +35 -0
  35. package/dist/lib/tabs/README.md +90 -0
  36. package/dist/lib/text/README.md +90 -0
  37. package/dist/lib/unknown/README.md +48 -0
  38. package/dist/lib/unordered-list/README.md +82 -0
  39. package/dist/lib/video/README.md +91 -0
  40. package/package.json +4 -10
  41. package/dist/editor/lib/events.d.ts +0 -5
package/dist/editor.js CHANGED
@@ -1,18 +1,17 @@
1
- import { jsx as n, Fragment as Ne, jsxs as g } from "@emotion/react/jsx-runtime";
2
- import { u as _e, a as ae, b as te, D as ze, c as qe, W as j, d as E, e as Ge, f as Ue, g as Le, h as Ee, i as Ze, j as Qe, k as we, l as Ye, m as ue, n as oe, A as Se, o as Ke, C as Me, p as Re, q as Xe, r as Je, T as et, s as fe, R as tt } from "./index-CBDllFpx.js";
3
- import { t as qr } from "./index-CBDllFpx.js";
4
- import rt from "mitt";
5
- import { c as I, N as pe, B as ge, g as nt, a as st, u as W, W as ot, b as $e, i as it, P as ct } from "./countdown-timer.node-CAsCNVin.js";
6
- import { useRef as je, useState as _, useEffect as z, createElement as Ae, Fragment as J, Suspense as at } from "react";
7
- import { useToggle as De } from "usehooks-ts";
8
- import { CacheProvider as lt, Global as dt, createElement as ht } from "@emotion/react";
9
- import { useFloating as wt, autoUpdate as ut, flip as ft, size as pt, useHover as gt, safePolygon as mt, useFocus as kt, useDismiss as vt, useRole as bt, useInteractions as Ct, FloatingPortal as Ie } from "@floating-ui/react";
10
- import { ThemeProvider as xt, FLOATING_Z_INDEX as yt, breakpoint as Nt } from "@janbox/storefront-ui/theme";
11
- import { useNode as Lt, ROOT_NODE as B, serializeNode as Et } from "@craftjs/core";
12
- import { throttle as St, isFunction as me, isNumber as ke } from "lodash-es";
13
- import Mt, { useFrame as Rt } from "react-frame-component";
14
- import { Layers as $t, useLayer as jt } from "@craftjs/layers";
15
- class At {
1
+ import { jsx as n, Fragment as ye, jsxs as k } from "@emotion/react/jsx-runtime";
2
+ import { u as ze, a as te, b as re, D as Ve, c as _e, W as j, d as E, e as qe, f as Ge, g as Ne, h as Le, i as Ue, j as Ze, k as ue, l as Qe, m as we, n as ie, A as Ee, o as Ye, C as Se, p as Me, q as Ke, r as Xe, T as Je, s as fe, R as et } from "./index-BU9pvpw_.js";
3
+ import { t as zr } from "./index-BU9pvpw_.js";
4
+ import { useRef as Re, useState as F, useEffect as _, createElement as $e, Fragment as J, Suspense as tt } from "react";
5
+ import { c as I, N as pe, B as ge, g as rt, a as nt, u as W, W as st, b as je, i as ot, P as it } from "./countdown-timer.node-CAsCNVin.js";
6
+ import { useToggle as Ae } from "usehooks-ts";
7
+ import { CacheProvider as ct, Global as at, createElement as lt } from "@emotion/react";
8
+ import { useFloating as dt, autoUpdate as ht, flip as ut, size as wt, useHover as ft, safePolygon as pt, useFocus as gt, useDismiss as mt, useRole as kt, useInteractions as vt, FloatingPortal as De } from "@floating-ui/react";
9
+ import { ThemeProvider as bt, FLOATING_Z_INDEX as Ct, breakpoint as xt } from "@janbox/storefront-ui/theme";
10
+ import { useNode as yt, ROOT_NODE as B, serializeNode as Nt } from "@craftjs/core";
11
+ import { throttle as Lt, isFunction as me, isNumber as ke } from "lodash-es";
12
+ import Et, { useFrame as St } from "react-frame-component";
13
+ import { Layers as Mt, useLayer as Rt } from "@craftjs/layers";
14
+ class $t {
16
15
  constructor() {
17
16
  this.componentControls = /* @__PURE__ */ new Set();
18
17
  }
@@ -45,22 +44,22 @@ class At {
45
44
  });
46
45
  }
47
46
  }
48
- const Dt = () => new At();
49
- function It() {
50
- return _e(Dt);
47
+ const jt = () => new $t();
48
+ function At() {
49
+ return ze(jt);
51
50
  }
52
- function Tt(e) {
51
+ function Dt(e) {
53
52
  if (e.sheet)
54
53
  return e.sheet;
55
54
  for (var t = 0; t < document.styleSheets.length; t++)
56
55
  if (document.styleSheets[t].ownerNode === e)
57
56
  return document.styleSheets[t];
58
57
  }
59
- function Pt(e) {
58
+ function It(e) {
60
59
  var t = document.createElement("style");
61
60
  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;
62
61
  }
63
- var Wt = /* @__PURE__ */ (function() {
62
+ var Tt = /* @__PURE__ */ (function() {
64
63
  function e(s) {
65
64
  var r = this;
66
65
  this._insertTag = function(i) {
@@ -72,10 +71,10 @@ var Wt = /* @__PURE__ */ (function() {
72
71
  return t.hydrate = function(r) {
73
72
  r.forEach(this._insertTag);
74
73
  }, t.insert = function(r) {
75
- this.ctr % (this.isSpeedy ? 65e3 : 1) === 0 && this._insertTag(Pt(this));
74
+ this.ctr % (this.isSpeedy ? 65e3 : 1) === 0 && this._insertTag(It(this));
76
75
  var i = this.tags[this.tags.length - 1];
77
76
  if (this.isSpeedy) {
78
- var o = Tt(i);
77
+ var o = Dt(i);
79
78
  try {
80
79
  o.insertRule(r, o.cssRules.length);
81
80
  } catch {
@@ -89,20 +88,20 @@ var Wt = /* @__PURE__ */ (function() {
89
88
  return (i = r.parentNode) == null ? void 0 : i.removeChild(r);
90
89
  }), this.tags = [], this.ctr = 0;
91
90
  }, e;
92
- })(), S = "-ms-", ee = "-moz-", u = "-webkit-", Te = "comm", le = "rule", de = "decl", Bt = "@import", Pe = "@keyframes", Ot = "@layer", Ft = Math.abs, re = String.fromCharCode, Ht = Object.assign;
93
- function Vt(e, t) {
91
+ })(), S = "-ms-", ee = "-moz-", p = "-webkit-", Ie = "comm", le = "rule", de = "decl", Pt = "@import", Te = "@keyframes", Wt = "@layer", Bt = Math.abs, ne = String.fromCharCode, Ot = Object.assign;
92
+ function Ft(e, t) {
94
93
  return L(e, 0) ^ 45 ? (((t << 2 ^ L(e, 0)) << 2 ^ L(e, 1)) << 2 ^ L(e, 2)) << 2 ^ L(e, 3) : 0;
95
94
  }
96
- function We(e) {
95
+ function Pe(e) {
97
96
  return e.trim();
98
97
  }
99
- function _t(e, t) {
98
+ function Ht(e, t) {
100
99
  return (e = t.exec(e)) ? e[0] : e;
101
100
  }
102
- function f(e, t, s) {
101
+ function g(e, t, s) {
103
102
  return e.replace(t, s);
104
103
  }
105
- function ie(e, t) {
104
+ function ce(e, t) {
106
105
  return e.indexOf(t);
107
106
  }
108
107
  function L(e, t) {
@@ -123,30 +122,30 @@ function Q(e, t) {
123
122
  function zt(e, t) {
124
123
  return e.map(t).join("");
125
124
  }
126
- var ne = 1, F = 1, Be = 0, R = 0, y = 0, H = "";
127
- function se(e, t, s, r, i, o, h) {
128
- return { value: e, root: t, parent: s, type: r, props: i, children: o, line: ne, column: F, length: h, return: "" };
125
+ var se = 1, H = 1, We = 0, R = 0, y = 0, z = "";
126
+ function oe(e, t, s, r, i, o, h) {
127
+ return { value: e, root: t, parent: s, type: r, props: i, children: o, line: se, column: H, length: h, return: "" };
129
128
  }
130
129
  function V(e, t) {
131
- return Ht(se("", null, null, "", null, null, 0), e, { length: -e.length }, t);
130
+ return Ot(oe("", null, null, "", null, null, 0), e, { length: -e.length }, t);
132
131
  }
133
- function qt() {
132
+ function Vt() {
134
133
  return y;
135
134
  }
136
- function Gt() {
137
- return y = R > 0 ? L(H, --R) : 0, F--, y === 10 && (F = 1, ne--), y;
135
+ function _t() {
136
+ return y = R > 0 ? L(z, --R) : 0, H--, y === 10 && (H = 1, se--), y;
138
137
  }
139
138
  function $() {
140
- return y = R < Be ? L(H, R++) : 0, F++, y === 10 && (F = 1, ne++), y;
139
+ return y = R < We ? L(z, R++) : 0, H++, y === 10 && (H = 1, se++), y;
141
140
  }
142
141
  function T() {
143
- return L(H, R);
142
+ return L(z, R);
144
143
  }
145
144
  function Y() {
146
145
  return R;
147
146
  }
148
147
  function U(e, t) {
149
- return q(H, e, t);
148
+ return q(z, e, t);
150
149
  }
151
150
  function G(e) {
152
151
  switch (e) {
@@ -186,26 +185,26 @@ function G(e) {
186
185
  }
187
186
  return 0;
188
187
  }
189
- function Oe(e) {
190
- return ne = F = 1, Be = D(H = e), R = 0, [];
188
+ function Be(e) {
189
+ return se = H = 1, We = D(z = e), R = 0, [];
191
190
  }
192
- function Fe(e) {
193
- return H = "", e;
191
+ function Oe(e) {
192
+ return z = "", e;
194
193
  }
195
194
  function K(e) {
196
- return We(U(R - 1, ce(e === 91 ? e + 2 : e === 40 ? e + 1 : e)));
195
+ return Pe(U(R - 1, ae(e === 91 ? e + 2 : e === 40 ? e + 1 : e)));
197
196
  }
198
- function Ut(e) {
197
+ function qt(e) {
199
198
  for (; (y = T()) && y < 33; )
200
199
  $();
201
200
  return G(e) > 2 || G(y) > 3 ? "" : " ";
202
201
  }
203
- function Zt(e, t) {
202
+ function Gt(e, t) {
204
203
  for (; --t && $() && !(y < 48 || y > 102 || y > 57 && y < 65 || y > 70 && y < 97); )
205
204
  ;
206
205
  return U(e, Y() + (t < 6 && T() == 32 && $() == 32));
207
206
  }
208
- function ce(e) {
207
+ function ae(e) {
209
208
  for (; $(); )
210
209
  switch (y) {
211
210
  // ] ) " '
@@ -214,11 +213,11 @@ function ce(e) {
214
213
  // " '
215
214
  case 34:
216
215
  case 39:
217
- e !== 34 && e !== 39 && ce(y);
216
+ e !== 34 && e !== 39 && ae(y);
218
217
  break;
219
218
  // (
220
219
  case 40:
221
- e === 41 && ce(e);
220
+ e === 41 && ae(e);
222
221
  break;
223
222
  // \
224
223
  case 92:
@@ -227,27 +226,27 @@ function ce(e) {
227
226
  }
228
227
  return R;
229
228
  }
230
- function Qt(e, t) {
229
+ function Ut(e, t) {
231
230
  for (; $() && e + y !== 57; )
232
231
  if (e + y === 84 && T() === 47)
233
232
  break;
234
- return "/*" + U(t, R - 1) + "*" + re(e === 47 ? e : $());
233
+ return "/*" + U(t, R - 1) + "*" + ne(e === 47 ? e : $());
235
234
  }
236
- function Yt(e) {
235
+ function Zt(e) {
237
236
  for (; !G(T()); )
238
237
  $();
239
238
  return U(e, R);
240
239
  }
241
- function Kt(e) {
242
- return Fe(X("", null, null, null, [""], e = Oe(e), 0, [0], e));
240
+ function Qt(e) {
241
+ return Oe(X("", null, null, null, [""], e = Be(e), 0, [0], e));
243
242
  }
244
- function X(e, t, s, r, i, o, h, c, d) {
245
- for (var k = 0, l = 0, a = h, m = 0, b = 0, v = 0, w = 1, N = 1, p = 1, x = 0, M = "", Z = i, P = o, A = r, C = M; N; )
246
- switch (v = x, x = $()) {
243
+ function X(e, t, s, r, i, o, h, c, u) {
244
+ for (var b = 0, l = 0, a = h, f = 0, v = 0, w = 0, d = 1, N = 1, m = 1, x = 0, M = "", Z = i, P = o, A = r, C = M; N; )
245
+ switch (w = x, x = $()) {
247
246
  // (
248
247
  case 40:
249
- if (v != 108 && L(C, a - 1) == 58) {
250
- ie(C += f(K(x), "&", "&\f"), "&\f") != -1 && (p = -1);
248
+ if (w != 108 && L(C, a - 1) == 58) {
249
+ ce(C += g(K(x), "&", "&\f"), "&\f") != -1 && (m = -1);
251
250
  break;
252
251
  }
253
252
  // " ' [
@@ -261,28 +260,28 @@ function X(e, t, s, r, i, o, h, c, d) {
261
260
  case 10:
262
261
  case 13:
263
262
  case 32:
264
- C += Ut(v);
263
+ C += qt(w);
265
264
  break;
266
265
  // \
267
266
  case 92:
268
- C += Zt(Y() - 1, 7);
267
+ C += Gt(Y() - 1, 7);
269
268
  continue;
270
269
  // /
271
270
  case 47:
272
271
  switch (T()) {
273
272
  case 42:
274
273
  case 47:
275
- Q(Xt(Qt($(), Y()), t, s), d);
274
+ Q(Yt(Ut($(), Y()), t, s), u);
276
275
  break;
277
276
  default:
278
277
  C += "/";
279
278
  }
280
279
  break;
281
280
  // {
282
- case 123 * w:
283
- c[k++] = D(C) * p;
281
+ case 123 * d:
282
+ c[b++] = D(C) * m;
284
283
  // } ; \0
285
- case 125 * w:
284
+ case 125 * d:
286
285
  case 59:
287
286
  case 0:
288
287
  switch (x) {
@@ -292,18 +291,18 @@ function X(e, t, s, r, i, o, h, c, d) {
292
291
  N = 0;
293
292
  // ;
294
293
  case 59 + l:
295
- p == -1 && (C = f(C, /\f/g, "")), b > 0 && D(C) - a && Q(b > 32 ? be(C + ";", r, s, a - 1) : be(f(C, " ", "") + ";", r, s, a - 2), d);
294
+ m == -1 && (C = g(C, /\f/g, "")), v > 0 && D(C) - a && Q(v > 32 ? be(C + ";", r, s, a - 1) : be(g(C, " ", "") + ";", r, s, a - 2), u);
296
295
  break;
297
296
  // @ ;
298
297
  case 59:
299
298
  C += ";";
300
299
  // { rule/at-rule
301
300
  default:
302
- if (Q(A = ve(C, t, s, k, l, i, c, M, Z = [], P = [], a), o), x === 123)
301
+ if (Q(A = ve(C, t, s, b, l, i, c, M, Z = [], P = [], a), o), x === 123)
303
302
  if (l === 0)
304
303
  X(C, t, A, A, Z, o, a, c, P);
305
304
  else
306
- switch (m === 99 && L(C, 3) === 110 ? 100 : m) {
305
+ switch (f === 99 && L(C, 3) === 110 ? 100 : f) {
307
306
  // d l m s
308
307
  case 100:
309
308
  case 108:
@@ -315,72 +314,72 @@ function X(e, t, s, r, i, o, h, c, d) {
315
314
  X(C, A, A, A, [""], P, 0, c, P);
316
315
  }
317
316
  }
318
- k = l = b = 0, w = p = 1, M = C = "", a = h;
317
+ b = l = v = 0, d = m = 1, M = C = "", a = h;
319
318
  break;
320
319
  // :
321
320
  case 58:
322
- a = 1 + D(C), b = v;
321
+ a = 1 + D(C), v = w;
323
322
  default:
324
- if (w < 1) {
323
+ if (d < 1) {
325
324
  if (x == 123)
326
- --w;
327
- else if (x == 125 && w++ == 0 && Gt() == 125)
325
+ --d;
326
+ else if (x == 125 && d++ == 0 && _t() == 125)
328
327
  continue;
329
328
  }
330
- switch (C += re(x), x * w) {
329
+ switch (C += ne(x), x * d) {
331
330
  // &
332
331
  case 38:
333
- p = l > 0 ? 1 : (C += "\f", -1);
332
+ m = l > 0 ? 1 : (C += "\f", -1);
334
333
  break;
335
334
  // ,
336
335
  case 44:
337
- c[k++] = (D(C) - 1) * p, p = 1;
336
+ c[b++] = (D(C) - 1) * m, m = 1;
338
337
  break;
339
338
  // @
340
339
  case 64:
341
- T() === 45 && (C += K($())), m = T(), l = a = D(M = C += Yt(Y())), x++;
340
+ T() === 45 && (C += K($())), f = T(), l = a = D(M = C += Zt(Y())), x++;
342
341
  break;
343
342
  // -
344
343
  case 45:
345
- v === 45 && D(C) == 2 && (w = 0);
344
+ w === 45 && D(C) == 2 && (d = 0);
346
345
  }
347
346
  }
348
347
  return o;
349
348
  }
350
- function ve(e, t, s, r, i, o, h, c, d, k, l) {
351
- for (var a = i - 1, m = i === 0 ? o : [""], b = he(m), v = 0, w = 0, N = 0; v < r; ++v)
352
- for (var p = 0, x = q(e, a + 1, a = Ft(w = h[v])), M = e; p < b; ++p)
353
- (M = We(w > 0 ? m[p] + " " + x : f(x, /&\f/g, m[p]))) && (d[N++] = M);
354
- return se(e, t, s, i === 0 ? le : c, d, k, l);
349
+ function ve(e, t, s, r, i, o, h, c, u, b, l) {
350
+ for (var a = i - 1, f = i === 0 ? o : [""], v = he(f), w = 0, d = 0, N = 0; w < r; ++w)
351
+ for (var m = 0, x = q(e, a + 1, a = Bt(d = h[w])), M = e; m < v; ++m)
352
+ (M = Pe(d > 0 ? f[m] + " " + x : g(x, /&\f/g, f[m]))) && (u[N++] = M);
353
+ return oe(e, t, s, i === 0 ? le : c, u, b, l);
355
354
  }
356
- function Xt(e, t, s) {
357
- return se(e, t, s, Te, re(qt()), q(e, 2, -2), 0);
355
+ function Yt(e, t, s) {
356
+ return oe(e, t, s, Ie, ne(Vt()), q(e, 2, -2), 0);
358
357
  }
359
358
  function be(e, t, s, r) {
360
- return se(e, t, s, de, q(e, 0, r), q(e, r + 1, -1), r);
359
+ return oe(e, t, s, de, q(e, 0, r), q(e, r + 1, -1), r);
361
360
  }
362
361
  function O(e, t) {
363
362
  for (var s = "", r = he(e), i = 0; i < r; i++)
364
363
  s += t(e[i], i, e, t) || "";
365
364
  return s;
366
365
  }
367
- function Jt(e, t, s, r) {
366
+ function Kt(e, t, s, r) {
368
367
  switch (e.type) {
369
- case Ot:
368
+ case Wt:
370
369
  if (e.children.length) break;
371
- case Bt:
370
+ case Pt:
372
371
  case de:
373
372
  return e.return = e.return || e.value;
374
- case Te:
373
+ case Ie:
375
374
  return "";
376
- case Pe:
375
+ case Te:
377
376
  return e.return = e.value + "{" + O(e.children, r) + "}";
378
377
  case le:
379
378
  e.value = e.props.join(",");
380
379
  }
381
380
  return D(s = O(e.children, r)) ? e.return = e.value + "{" + s + "}" : "";
382
381
  }
383
- function er(e) {
382
+ function Xt(e) {
384
383
  var t = he(e);
385
384
  return function(s, r, i, o) {
386
385
  for (var h = "", c = 0; c < t; c++)
@@ -388,21 +387,21 @@ function er(e) {
388
387
  return h;
389
388
  };
390
389
  }
391
- function tr(e) {
390
+ function Jt(e) {
392
391
  return function(t) {
393
392
  t.root || (t = t.return) && e(t);
394
393
  };
395
394
  }
396
- var rr = function(t, s, r) {
395
+ var er = function(t, s, r) {
397
396
  for (var i = 0, o = 0; i = o, o = T(), i === 38 && o === 12 && (s[r] = 1), !G(o); )
398
397
  $();
399
398
  return U(t, R);
400
- }, nr = function(t, s) {
399
+ }, tr = function(t, s) {
401
400
  var r = -1, i = 44;
402
401
  do
403
402
  switch (G(i)) {
404
403
  case 0:
405
- i === 38 && T() === 12 && (s[r] = 1), t[r] += rr(R - 1, s, r);
404
+ i === 38 && T() === 12 && (s[r] = 1), t[r] += er(R - 1, s, r);
406
405
  break;
407
406
  case 2:
408
407
  t[r] += K(i);
@@ -414,13 +413,13 @@ var rr = function(t, s, r) {
414
413
  }
415
414
  // fallthrough
416
415
  default:
417
- t[r] += re(i);
416
+ t[r] += ne(i);
418
417
  }
419
418
  while (i = $());
420
419
  return t;
421
- }, sr = function(t, s) {
422
- return Fe(nr(Oe(t), s));
423
- }, Ce = /* @__PURE__ */ new WeakMap(), or = function(t) {
420
+ }, rr = function(t, s) {
421
+ return Oe(tr(Be(t), s));
422
+ }, Ce = /* @__PURE__ */ new WeakMap(), nr = function(t) {
424
423
  if (!(t.type !== "rule" || !t.parent || // positive .length indicates that this rule contains pseudo
425
424
  // negative .length indicates that this rule has been already prefixed
426
425
  t.length < 1)) {
@@ -428,12 +427,12 @@ var rr = function(t, s, r) {
428
427
  if (r = r.parent, !r) return;
429
428
  if (!(t.props.length === 1 && s.charCodeAt(0) !== 58 && !Ce.get(r)) && !i) {
430
429
  Ce.set(t, !0);
431
- for (var o = [], h = sr(s, o), c = r.props, d = 0, k = 0; d < h.length; d++)
432
- for (var l = 0; l < c.length; l++, k++)
433
- t.props[k] = o[d] ? h[d].replace(/&\f/g, c[l]) : c[l] + " " + h[d];
430
+ for (var o = [], h = rr(s, o), c = r.props, u = 0, b = 0; u < h.length; u++)
431
+ for (var l = 0; l < c.length; l++, b++)
432
+ t.props[b] = o[u] ? h[u].replace(/&\f/g, c[l]) : c[l] + " " + h[u];
434
433
  }
435
434
  }
436
- }, ir = function(t) {
435
+ }, sr = function(t) {
437
436
  if (t.type === "decl") {
438
437
  var s = t.value;
439
438
  // charcode for l
@@ -441,11 +440,11 @@ var rr = function(t, s, r) {
441
440
  s.charCodeAt(2) === 98 && (t.return = "", t.value = "");
442
441
  }
443
442
  };
444
- function He(e, t) {
445
- switch (Vt(e, t)) {
443
+ function Fe(e, t) {
444
+ switch (Ft(e, t)) {
446
445
  // color-adjust
447
446
  case 5103:
448
- return u + "print-" + e + e;
447
+ return p + "print-" + e + e;
449
448
  // animation, animation-(delay|direction|duration|fill-mode|iteration-count|name|play-state|timing-function)
450
449
  case 5737:
451
450
  case 4201:
@@ -475,58 +474,58 @@ function He(e, t) {
475
474
  case 5365:
476
475
  case 5621:
477
476
  case 3829:
478
- return u + e + e;
477
+ return p + e + e;
479
478
  // appearance, user-select, transform, hyphens, text-size-adjust
480
479
  case 5349:
481
480
  case 4246:
482
481
  case 4810:
483
482
  case 6968:
484
483
  case 2756:
485
- return u + e + ee + e + S + e + e;
484
+ return p + e + ee + e + S + e + e;
486
485
  // flex, flex-direction
487
486
  case 6828:
488
487
  case 4268:
489
- return u + e + S + e + e;
488
+ return p + e + S + e + e;
490
489
  // order
491
490
  case 6165:
492
- return u + e + S + "flex-" + e + e;
491
+ return p + e + S + "flex-" + e + e;
493
492
  // align-items
494
493
  case 5187:
495
- return u + e + f(e, /(\w+).+(:[^]+)/, u + "box-$1$2" + S + "flex-$1$2") + e;
494
+ return p + e + g(e, /(\w+).+(:[^]+)/, p + "box-$1$2" + S + "flex-$1$2") + e;
496
495
  // align-self
497
496
  case 5443:
498
- return u + e + S + "flex-item-" + f(e, /flex-|-self/, "") + e;
497
+ return p + e + S + "flex-item-" + g(e, /flex-|-self/, "") + e;
499
498
  // align-content
500
499
  case 4675:
501
- return u + e + S + "flex-line-pack" + f(e, /align-content|flex-|-self/, "") + e;
500
+ return p + e + S + "flex-line-pack" + g(e, /align-content|flex-|-self/, "") + e;
502
501
  // flex-shrink
503
502
  case 5548:
504
- return u + e + S + f(e, "shrink", "negative") + e;
503
+ return p + e + S + g(e, "shrink", "negative") + e;
505
504
  // flex-basis
506
505
  case 5292:
507
- return u + e + S + f(e, "basis", "preferred-size") + e;
506
+ return p + e + S + g(e, "basis", "preferred-size") + e;
508
507
  // flex-grow
509
508
  case 6060:
510
- return u + "box-" + f(e, "-grow", "") + u + e + S + f(e, "grow", "positive") + e;
509
+ return p + "box-" + g(e, "-grow", "") + p + e + S + g(e, "grow", "positive") + e;
511
510
  // transition
512
511
  case 4554:
513
- return u + f(e, /([^-])(transform)/g, "$1" + u + "$2") + e;
512
+ return p + g(e, /([^-])(transform)/g, "$1" + p + "$2") + e;
514
513
  // cursor
515
514
  case 6187:
516
- return f(f(f(e, /(zoom-|grab)/, u + "$1"), /(image-set)/, u + "$1"), e, "") + e;
515
+ return g(g(g(e, /(zoom-|grab)/, p + "$1"), /(image-set)/, p + "$1"), e, "") + e;
517
516
  // background, background-image
518
517
  case 5495:
519
518
  case 3959:
520
- return f(e, /(image-set\([^]*)/, u + "$1$`$1");
519
+ return g(e, /(image-set\([^]*)/, p + "$1$`$1");
521
520
  // justify-content
522
521
  case 4968:
523
- return f(f(e, /(.+:)(flex-)?(.*)/, u + "box-pack:$3" + S + "flex-pack:$3"), /s.+-b[^;]+/, "justify") + u + e + e;
522
+ return g(g(e, /(.+:)(flex-)?(.*)/, p + "box-pack:$3" + S + "flex-pack:$3"), /s.+-b[^;]+/, "justify") + p + e + e;
524
523
  // (margin|padding)-inline-(start|end)
525
524
  case 4095:
526
525
  case 3583:
527
526
  case 4068:
528
527
  case 2532:
529
- return f(e, /(.+)-inline(.+)/, u + "$1$2") + e;
528
+ return g(e, /(.+)-inline(.+)/, p + "$1$2") + e;
530
529
  // (min|max)?(width|height|inline-size|block-size)
531
530
  case 8116:
532
531
  case 7059:
@@ -546,10 +545,10 @@ function He(e, t) {
546
545
  if (L(e, t + 4) !== 45) break;
547
546
  // (f)ill-available, (f)it-content
548
547
  case 102:
549
- return f(e, /(.+:)(.+)-([^]+)/, "$1" + u + "$2-$3$1" + ee + (L(e, t + 3) == 108 ? "$3" : "$2-$3")) + e;
548
+ return g(e, /(.+:)(.+)-([^]+)/, "$1" + p + "$2-$3$1" + ee + (L(e, t + 3) == 108 ? "$3" : "$2-$3")) + e;
550
549
  // (s)tretch
551
550
  case 115:
552
- return ~ie(e, "stretch") ? He(f(e, "stretch", "fill-available"), t) + e : e;
551
+ return ~ce(e, "stretch") ? Fe(g(e, "stretch", "fill-available"), t) + e : e;
553
552
  }
554
553
  break;
555
554
  // position: sticky
@@ -557,13 +556,13 @@ function He(e, t) {
557
556
  if (L(e, t + 1) !== 115) break;
558
557
  // display: (flex|inline-flex)
559
558
  case 6444:
560
- switch (L(e, D(e) - 3 - (~ie(e, "!important") && 10))) {
559
+ switch (L(e, D(e) - 3 - (~ce(e, "!important") && 10))) {
561
560
  // stic(k)y
562
561
  case 107:
563
- return f(e, ":", ":" + u) + e;
562
+ return g(e, ":", ":" + p) + e;
564
563
  // (inline-)?fl(e)x
565
564
  case 101:
566
- return f(e, /(.+:)([^;!]+)(;|!.+)?/, "$1" + u + (L(e, 14) === 45 ? "inline-" : "") + "box$3$1" + u + "$2$3$1" + S + "$2box$3") + e;
565
+ return g(e, /(.+:)([^;!]+)(;|!.+)?/, "$1" + p + (L(e, 14) === 45 ? "inline-" : "") + "box$3$1" + p + "$2$3$1" + S + "$2box$3") + e;
567
566
  }
568
567
  break;
569
568
  // writing-mode
@@ -571,83 +570,83 @@ function He(e, t) {
571
570
  switch (L(e, t + 11)) {
572
571
  // vertical-l(r)
573
572
  case 114:
574
- return u + e + S + f(e, /[svh]\w+-[tblr]{2}/, "tb") + e;
573
+ return p + e + S + g(e, /[svh]\w+-[tblr]{2}/, "tb") + e;
575
574
  // vertical-r(l)
576
575
  case 108:
577
- return u + e + S + f(e, /[svh]\w+-[tblr]{2}/, "tb-rl") + e;
576
+ return p + e + S + g(e, /[svh]\w+-[tblr]{2}/, "tb-rl") + e;
578
577
  // horizontal(-)tb
579
578
  case 45:
580
- return u + e + S + f(e, /[svh]\w+-[tblr]{2}/, "lr") + e;
579
+ return p + e + S + g(e, /[svh]\w+-[tblr]{2}/, "lr") + e;
581
580
  }
582
- return u + e + S + e + e;
581
+ return p + e + S + e + e;
583
582
  }
584
583
  return e;
585
584
  }
586
- var cr = function(t, s, r, i) {
585
+ var or = function(t, s, r, i) {
587
586
  if (t.length > -1 && !t.return) switch (t.type) {
588
587
  case de:
589
- t.return = He(t.value, t.length);
588
+ t.return = Fe(t.value, t.length);
590
589
  break;
591
- case Pe:
590
+ case Te:
592
591
  return O([V(t, {
593
- value: f(t.value, "@", "@" + u)
592
+ value: g(t.value, "@", "@" + p)
594
593
  })], i);
595
594
  case le:
596
595
  if (t.length) return zt(t.props, function(o) {
597
- switch (_t(o, /(::plac\w+|:read-\w+)/)) {
596
+ switch (Ht(o, /(::plac\w+|:read-\w+)/)) {
598
597
  // :read-(only|write)
599
598
  case ":read-only":
600
599
  case ":read-write":
601
600
  return O([V(t, {
602
- props: [f(o, /:(read-\w+)/, ":" + ee + "$1")]
601
+ props: [g(o, /:(read-\w+)/, ":" + ee + "$1")]
603
602
  })], i);
604
603
  // :placeholder
605
604
  case "::placeholder":
606
605
  return O([V(t, {
607
- props: [f(o, /:(plac\w+)/, ":" + u + "input-$1")]
606
+ props: [g(o, /:(plac\w+)/, ":" + p + "input-$1")]
608
607
  }), V(t, {
609
- props: [f(o, /:(plac\w+)/, ":" + ee + "$1")]
608
+ props: [g(o, /:(plac\w+)/, ":" + ee + "$1")]
610
609
  }), V(t, {
611
- props: [f(o, /:(plac\w+)/, S + "input-$1")]
610
+ props: [g(o, /:(plac\w+)/, S + "input-$1")]
612
611
  })], i);
613
612
  }
614
613
  return "";
615
614
  });
616
615
  }
617
- }, ar = [cr], lr = function(t) {
616
+ }, ir = [or], cr = function(t) {
618
617
  var s = t.key;
619
618
  if (s === "css") {
620
619
  var r = document.querySelectorAll("style[data-emotion]:not([data-s])");
621
- Array.prototype.forEach.call(r, function(w) {
622
- var N = w.getAttribute("data-emotion");
623
- N.indexOf(" ") !== -1 && (document.head.appendChild(w), w.setAttribute("data-s", ""));
620
+ Array.prototype.forEach.call(r, function(d) {
621
+ var N = d.getAttribute("data-emotion");
622
+ N.indexOf(" ") !== -1 && (document.head.appendChild(d), d.setAttribute("data-s", ""));
624
623
  });
625
624
  }
626
- var i = t.stylisPlugins || ar, o = {}, h, c = [];
625
+ var i = t.stylisPlugins || ir, o = {}, h, c = [];
627
626
  h = t.container || document.head, Array.prototype.forEach.call(
628
627
  // this means we will ignore elements which don't have a space in them which
629
628
  // means that the style elements we're looking at are only Emotion 11 server-rendered style elements
630
629
  document.querySelectorAll('style[data-emotion^="' + s + ' "]'),
631
- function(w) {
632
- for (var N = w.getAttribute("data-emotion").split(" "), p = 1; p < N.length; p++)
633
- o[N[p]] = !0;
634
- c.push(w);
630
+ function(d) {
631
+ for (var N = d.getAttribute("data-emotion").split(" "), m = 1; m < N.length; m++)
632
+ o[N[m]] = !0;
633
+ c.push(d);
635
634
  }
636
635
  );
637
- var d, k = [or, ir];
636
+ var u, b = [nr, sr];
638
637
  {
639
- var l, a = [Jt, tr(function(w) {
640
- l.insert(w);
641
- })], m = er(k.concat(i, a)), b = function(N) {
642
- return O(Kt(N), m);
638
+ var l, a = [Kt, Jt(function(d) {
639
+ l.insert(d);
640
+ })], f = Xt(b.concat(i, a)), v = function(N) {
641
+ return O(Qt(N), f);
643
642
  };
644
- d = function(N, p, x, M) {
645
- l = x, b(N ? N + "{" + p.styles + "}" : p.styles), M && (v.inserted[p.name] = !0);
643
+ u = function(N, m, x, M) {
644
+ l = x, v(N ? N + "{" + m.styles + "}" : m.styles), M && (w.inserted[m.name] = !0);
646
645
  };
647
646
  }
648
- var v = {
647
+ var w = {
649
648
  key: s,
650
- sheet: new Wt({
649
+ sheet: new Tt({
651
650
  key: s,
652
651
  container: h,
653
652
  nonce: t.nonce,
@@ -658,68 +657,68 @@ var cr = function(t, s, r, i) {
658
657
  nonce: t.nonce,
659
658
  inserted: o,
660
659
  registered: {},
661
- insert: d
660
+ insert: u
662
661
  };
663
- return v.sheet.hydrate(c), v;
662
+ return w.sheet.hydrate(c), w;
664
663
  };
665
- const Ve = ({ children: e, viewport: t, containerProps: s }) => {
666
- const r = je(null), [{ theme: i }] = ae(), [o, h] = _({
664
+ const He = ({ children: e, viewport: t, containerProps: s }) => {
665
+ const r = Re(null), { theme: i } = te(), [o, h] = F({
667
666
  width: 0,
668
667
  height: 0
669
668
  });
670
- z(() => {
671
- const v = St((N) => {
672
- const p = N.at(0)?.target;
673
- if (!p) return;
674
- const { width: x, height: M } = p.getBoundingClientRect();
669
+ _(() => {
670
+ const w = Lt((N) => {
671
+ const m = N.at(0)?.target;
672
+ if (!m) return;
673
+ const { width: x, height: M } = m.getBoundingClientRect();
675
674
  h(() => ({
676
675
  width: x,
677
676
  height: M
678
677
  }));
679
- }, 200), w = new ResizeObserver(v);
680
- return r.current && w.observe(r.current), () => w.disconnect();
678
+ }, 200), d = new ResizeObserver(w);
679
+ return r.current && d.observe(r.current), () => d.disconnect();
681
680
  }, []);
682
- const c = me(t?.width) ? t.width(o.width) : t?.width, d = me(t?.height) ? t.height(o.height) : t?.height, k = ke(c) ? o.width / c : 1, l = ke(d) ? o.height / d : 1, a = Math.min(k, l, 1), m = (d ?? o.height / a) || 0, b = (c ?? o.width / a) || 0;
681
+ const c = me(t?.width) ? t.width(o.width) : t?.width, u = me(t?.height) ? t.height(o.height) : t?.height, b = ke(c) ? o.width / c : 1, l = ke(u) ? o.height / u : 1, a = Math.min(b, l, 1), f = (u ?? o.height / a) || 0, v = (c ?? o.width / a) || 0;
683
682
  return /* @__PURE__ */ n("div", { ...s, className: I("tw:w-full tw:h-full tw:p-2 tw:bg-ic-ink-1s", s?.className), children: /* @__PURE__ */ n("div", { className: I("tw:w-full tw:h-full tw:overflow-hidden tw:relative"), ref: r, children: /* @__PURE__ */ n(
684
683
  "div",
685
684
  {
686
685
  style: {
687
686
  transform: `scale(${a})`,
688
- width: b,
689
- height: m,
690
- marginLeft: (o.width - b) / 2,
691
- marginTop: (o.height - m) / 2
687
+ width: v,
688
+ height: f,
689
+ marginLeft: (o.width - v) / 2,
690
+ marginTop: (o.height - f) / 2
692
691
  },
693
692
  className: "tw:absolute",
694
693
  children: /* @__PURE__ */ n(
695
- Mt,
694
+ Et,
696
695
  {
697
696
  sandbox: "allow-same-origin allow-scripts allow-popups allow-presentation",
698
697
  allow: "autoplay; encrypted-media",
699
698
  width: c ?? "100%",
700
- height: d ?? "100%",
701
- children: /* @__PURE__ */ n(dr, { theme: i, children: e })
699
+ height: u ?? "100%",
700
+ children: /* @__PURE__ */ n(ar, { theme: i, children: e })
702
701
  }
703
702
  )
704
703
  }
705
704
  ) }) });
706
- }, dr = ({ children: e, theme: t }) => {
707
- const { document: s, window: r } = Rt(), [i, o] = _(!1), h = je(window.customElements.define.bind(window.customElements));
708
- z(() => {
709
- const d = h.current;
710
- return r && (window.customElements.define = function(k, l, a) {
711
- window.customElements.get(k) || r.customElements.define(k, l, a), d(k, l, a);
705
+ }, ar = ({ children: e, theme: t }) => {
706
+ const { document: s, window: r } = St(), [i, o] = F(!1), h = Re(window.customElements.define.bind(window.customElements));
707
+ _(() => {
708
+ const u = h.current;
709
+ return r && (window.customElements.define = function(b, l, a) {
710
+ window.customElements.get(b) || r.customElements.define(b, l, a), u(b, l, a);
712
711
  }), s?.head.replaceWith(document.head.cloneNode(!0)), o(!0), () => {
713
- window.customElements.define = d;
712
+ window.customElements.define = u;
714
713
  };
715
714
  }, [s, r]);
716
- const c = lr({
715
+ const c = cr({
717
716
  key: "css",
718
717
  container: s?.head
719
718
  });
720
- return i ? /* @__PURE__ */ n(Ne, { children: /* @__PURE__ */ g(lt, { value: c, children: [
719
+ return i ? /* @__PURE__ */ n(ye, { children: /* @__PURE__ */ k(ct, { value: c, children: [
721
720
  /* @__PURE__ */ n(
722
- dt,
721
+ at,
723
722
  {
724
723
  styles: {
725
724
  ".frame-content": {
@@ -740,21 +739,21 @@ const Ve = ({ children: e, viewport: t, containerProps: s }) => {
740
739
  }
741
740
  }
742
741
  ),
743
- /* @__PURE__ */ n(xt, { theme: t, children: e })
742
+ /* @__PURE__ */ n(bt, { theme: t, children: e })
744
743
  ] }) }) : null;
745
- }, hr = ({ render: e }) => {
746
- const { id: t, renderer: s } = Lt((o) => ({
747
- resolvedId: st(o),
748
- renderer: nt(o).renderer
744
+ }, lr = ({ render: e }) => {
745
+ const { id: t, renderer: s } = yt((o) => ({
746
+ resolvedId: nt(o),
747
+ renderer: rt(o).renderer
749
748
  })), {
750
749
  queryParams: { mode: r }
751
- } = te(), { isActive: i } = W((o, h) => ({
750
+ } = re(), { isActive: i } = W((o, h) => ({
752
751
  isActive: h.getEvent("selected").contains(t) && t !== B
753
752
  }));
754
- return s ? Ae(s, { render: e }) : /* @__PURE__ */ g(J, { children: [
755
- i && r === "full" && /* @__PURE__ */ g(J, { children: [
756
- /* @__PURE__ */ n(ze, {}),
757
- /* @__PURE__ */ n(qe, {})
753
+ return s ? $e(s, { render: e }) : /* @__PURE__ */ k(J, { children: [
754
+ i && r === "full" && /* @__PURE__ */ k(J, { children: [
755
+ /* @__PURE__ */ n(Ve, {}),
756
+ /* @__PURE__ */ n(_e, {})
758
757
  ] }),
759
758
  e
760
759
  ] });
@@ -762,7 +761,7 @@ const Ve = ({ children: e, viewport: t, containerProps: s }) => {
762
761
  <path d="M8 5L5 8L8 11" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
763
762
  <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"/>
764
763
  </svg>
765
- `, wr = `<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
764
+ `, dr = `<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
766
765
  <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"/>
767
766
  <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"/>
768
767
  <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"/>
@@ -770,84 +769,89 @@ const Ve = ({ children: e, viewport: t, containerProps: s }) => {
770
769
  <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"/>
771
770
  <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"/>
772
771
  </svg>
773
- `, ur = `<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
772
+ `, hr = `<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
774
773
  <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"/>
775
774
  <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"/>
776
775
  </svg>
777
- `, fr = '<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>', ye = rt(), pr = () => {
776
+ `, ur = '<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>', wr = () => {
778
777
  const {
779
778
  queryParams: { mode: e, screen: t },
780
779
  setQueryParams: s
781
- } = te(), { actions: r, canRedo: i, canUndo: o } = W((l, a) => ({
782
- enabled: l.options.enabled,
783
- canUndo: a.history.canUndo(),
784
- canRedo: a.history.canRedo()
785
- })), h = (l) => {
780
+ } = re(), [r, i] = F(!1), { handlers: o } = te(), { actions: h, canRedo: c, canUndo: u, query: b } = W((w, d) => ({
781
+ enabled: w.options.enabled,
782
+ canUndo: d.history.canUndo(),
783
+ canRedo: d.history.canRedo()
784
+ })), l = (w) => {
786
785
  s({
787
- screen: l
786
+ screen: w
788
787
  });
789
- }, c = () => {
788
+ }, a = () => {
790
789
  s({ mode: e === "full" ? "compact" : "full" });
791
- }, d = () => {
792
- ye.emit("close");
793
- }, k = () => {
794
- r.selectNode(), ye.emit("submit");
790
+ }, f = () => {
791
+ o.close();
792
+ }, v = async () => {
793
+ try {
794
+ return h.selectNode(), o.submit(b.getSerializedNodes());
795
+ } catch {
796
+ } finally {
797
+ i(!1);
798
+ }
795
799
  };
796
- return /* @__PURE__ */ g(
800
+ return /* @__PURE__ */ k(
797
801
  "div",
798
802
  {
799
803
  className: I(
800
804
  "tw:flex tw:items-center tw:gap-4 tw:p-2 tw:justify-between tw:bg-ic-ink-6s tw:text-ic-white-6s tw:text-sm"
801
805
  ),
802
806
  children: [
803
- /* @__PURE__ */ g("div", { className: "tw:flex tw:items-center tw:gap-3", children: [
804
- /* @__PURE__ */ n(j, { size: "32", onClick: d, children: /* @__PURE__ */ n(E, { source: fr }) }),
805
- /* @__PURE__ */ n(Ge, { onSelectionChange: h, value: t, children: Ue.map(({ icon: l, size: a }) => /* @__PURE__ */ n(j, { value: a, children: /* @__PURE__ */ n(E, { source: l }) }, a)) }),
806
- /* @__PURE__ */ g("div", { className: "tw:p-1 tw:flex tw:items-center tw:gap-2 tw:bg-ic-white-1s tw:rounded-lg", children: [
807
- /* @__PURE__ */ n(j, { onClick: r.history.undo, disabled: !o, children: /* @__PURE__ */ n(E, { source: xe }) }),
808
- /* @__PURE__ */ n(j, { onClick: r.history.redo, disabled: !i, children: /* @__PURE__ */ n(E, { source: xe, className: "tw:rotate-180" }) })
807
+ /* @__PURE__ */ k("div", { className: "tw:flex tw:items-center tw:gap-3", children: [
808
+ /* @__PURE__ */ n(j, { size: "32", onClick: f, children: /* @__PURE__ */ n(E, { source: ur }) }),
809
+ /* @__PURE__ */ n(qe, { onSelectionChange: l, value: t, children: Ge.map(({ icon: w, size: d }) => /* @__PURE__ */ n(j, { value: d, children: /* @__PURE__ */ n(E, { source: w }) }, d)) }),
810
+ /* @__PURE__ */ k("div", { className: "tw:p-1 tw:flex tw:items-center tw:gap-2 tw:bg-ic-white-1s tw:rounded-lg", children: [
811
+ /* @__PURE__ */ n(j, { onClick: h.history.undo, disabled: !u, children: /* @__PURE__ */ n(E, { source: xe }) }),
812
+ /* @__PURE__ */ n(j, { onClick: h.history.redo, disabled: !c, children: /* @__PURE__ */ n(E, { source: xe, className: "tw:rotate-180" }) })
809
813
  ] }),
810
- /* @__PURE__ */ n("div", { className: "tw:p-1 tw:flex tw:items-center tw:gap-2 tw:bg-ic-white-1s tw:rounded-lg", children: /* @__PURE__ */ n(j, { onClick: c, children: /* @__PURE__ */ n(E, { source: e === "full" ? ur : wr }) }) })
814
+ /* @__PURE__ */ n("div", { className: "tw:p-1 tw:flex tw:items-center tw:gap-2 tw:bg-ic-white-1s tw:rounded-lg", children: /* @__PURE__ */ n(j, { onClick: a, children: /* @__PURE__ */ n(E, { source: e === "full" ? hr : dr }) }) })
811
815
  ] }),
812
- /* @__PURE__ */ n("div", { className: "tw:flex tw:items-center tw:gap-3", children: /* @__PURE__ */ n(Le, { onClick: k, children: "Save" }) })
816
+ /* @__PURE__ */ n("div", { className: "tw:flex tw:items-center tw:gap-3", children: /* @__PURE__ */ n(Ne, { isLoading: r, onClick: v, children: "Save" }) })
813
817
  ]
814
818
  }
815
819
  );
816
- }, gr = `<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
820
+ }, fr = `<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
817
821
  <path d="M20 19.9997L16.3763 16.376" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
818
822
  <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"/>
819
823
  </svg>
820
- `, mr = `<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
824
+ `, pr = `<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
821
825
  <path d="M15 6L9 12L15 18" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
822
826
  </svg>
823
- `, kr = ({ elements: e, sections: t }) => /* @__PURE__ */ g("div", { className: "tw:flex tw:flex-col tw:h-full", children: [
824
- /* @__PURE__ */ n("div", { className: "tw:flex tw:items-center tw:p-2 tw:gap-3", children: /* @__PURE__ */ n(Ee, { fullWidth: !0, placeholder: "Search...", prefix: /* @__PURE__ */ n(E, { source: gr }) }) }),
825
- /* @__PURE__ */ g(Ze, { defaultIndex: 1, className: "tw:flex-1 tw:overflow-hidden tw:border-t tw:border-ic-white-1s", children: [
826
- /* @__PURE__ */ g(Qe, { children: [
827
- /* @__PURE__ */ n(we, { className: "tw:flex-1", children: "Sections" }),
828
- /* @__PURE__ */ n(we, { className: "tw:flex-1", children: "Elements" })
827
+ `, gr = ({ elements: e, sections: t }) => /* @__PURE__ */ k("div", { className: "tw:flex tw:flex-col tw:h-full", children: [
828
+ /* @__PURE__ */ n("div", { className: "tw:flex tw:items-center tw:p-2 tw:gap-3", children: /* @__PURE__ */ n(Le, { fullWidth: !0, placeholder: "Search...", prefix: /* @__PURE__ */ n(E, { source: fr }) }) }),
829
+ /* @__PURE__ */ k(Ue, { defaultIndex: 1, className: "tw:flex-1 tw:overflow-hidden tw:border-t tw:border-ic-white-1s", children: [
830
+ /* @__PURE__ */ k(Ze, { children: [
831
+ /* @__PURE__ */ n(ue, { className: "tw:flex-1", children: "Sections" }),
832
+ /* @__PURE__ */ n(ue, { className: "tw:flex-1", children: "Elements" })
829
833
  ] }),
830
- /* @__PURE__ */ g(Ye, { className: "tw:flex-1 tw:overflow-hidden", children: [
831
- /* @__PURE__ */ n(ue, { children: /* @__PURE__ */ n(oe, { className: "tw:h-full tw:py-2", children: t?.map((s, r) => /* @__PURE__ */ n(br, { group: s }, r)) }) }),
832
- /* @__PURE__ */ n(ue, { className: "tw:h-full tw:overflow-hidden", children: /* @__PURE__ */ n(oe, { className: "tw:h-full tw:py-2", children: e?.map((s, r) => /* @__PURE__ */ n(vr, { group: s }, r)) }) })
834
+ /* @__PURE__ */ k(Qe, { className: "tw:flex-1 tw:overflow-hidden", children: [
835
+ /* @__PURE__ */ n(we, { children: /* @__PURE__ */ n(ie, { className: "tw:h-full tw:py-2", children: t?.map((s, r) => /* @__PURE__ */ n(kr, { group: s }, r)) }) }),
836
+ /* @__PURE__ */ n(we, { className: "tw:h-full tw:overflow-hidden", children: /* @__PURE__ */ n(ie, { className: "tw:h-full tw:py-2", children: e?.map((s, r) => /* @__PURE__ */ n(mr, { group: s }, r)) }) })
833
837
  ] })
834
838
  ] })
835
- ] }), vr = ({ group: e }) => {
836
- const [t, s] = De(!0), { actions: r, connectors: i } = W();
837
- return /* @__PURE__ */ g("div", { className: "tw:flex tw:flex-col tw:text-sm", children: [
838
- /* @__PURE__ */ n(Le, { onClick: s, className: "tw:bg-transparent", children: /* @__PURE__ */ g("div", { className: "tw:flex tw:items-center tw:justify-between tw:flex-1 tw:text-sm", children: [
839
+ ] }), mr = ({ group: e }) => {
840
+ const [t, s] = Ae(!0), { actions: r, connectors: i } = W();
841
+ return /* @__PURE__ */ k("div", { className: "tw:flex tw:flex-col tw:text-sm", children: [
842
+ /* @__PURE__ */ n(Ne, { onClick: s, className: "tw:bg-transparent", children: /* @__PURE__ */ k("div", { className: "tw:flex tw:items-center tw:justify-between tw:flex-1 tw:text-sm", children: [
839
843
  e.name,
840
844
  /* @__PURE__ */ n(
841
845
  E,
842
846
  {
843
- source: Se,
847
+ source: Ee,
844
848
  className: I("tw:transition-transform", {
845
849
  "tw:rotate-180": !t
846
850
  })
847
851
  }
848
852
  )
849
853
  ] }) }),
850
- /* @__PURE__ */ n(Ke, { open: t, children: /* @__PURE__ */ n("div", { className: "tw:px-4 tw:py-2 tw:grid tw:grid-cols-2 tw:gap-4", children: e.elements.map((o, h) => /* @__PURE__ */ g("div", { className: "tw:space-y-1", children: [
854
+ /* @__PURE__ */ n(Ye, { open: t, children: /* @__PURE__ */ n("div", { className: "tw:px-4 tw:py-2 tw:grid tw:grid-cols-2 tw:gap-4", children: e.elements.map((o, h) => /* @__PURE__ */ k("div", { className: "tw:space-y-1", children: [
851
855
  /* @__PURE__ */ n(
852
856
  "div",
853
857
  {
@@ -858,42 +862,42 @@ const Ve = ({ children: e, viewport: t, containerProps: s }) => {
858
862
  ),
859
863
  ref: (c) => {
860
864
  c && i.create(c, o.template, {
861
- onCreate(d) {
862
- (typeof o.autoFocus == "function" ? o.autoFocus(d) : o.autoFocus) && r.selectNode(d.rootNodeId), o.onCreate?.(d);
865
+ onCreate(u) {
866
+ (typeof o.autoFocus == "function" ? o.autoFocus(u) : o.autoFocus) && r.selectNode(u.rootNodeId), o.onCreate?.(u);
863
867
  }
864
868
  });
865
869
  },
866
- children: /* @__PURE__ */ n(ot, { width: void 0, height: void 0, ...o.icon })
870
+ children: /* @__PURE__ */ n(st, { width: void 0, height: void 0, ...o.icon })
867
871
  }
868
872
  ),
869
873
  /* @__PURE__ */ n("p", { className: "tw:text-xs tw:mx-auto tw:text-center", children: o.name })
870
874
  ] }, h)) }) })
871
875
  ] });
872
- }, br = ({ group: e }) => {
873
- const [t, s] = _(!1), { refs: r, floatingStyles: i, context: o } = wt({
876
+ }, kr = ({ group: e }) => {
877
+ const [t, s] = F(!1), { refs: r, floatingStyles: i, context: o } = dt({
874
878
  open: t,
875
879
  onOpenChange: s,
876
880
  placement: "right-start",
877
881
  middleware: [
878
- ft(),
879
- pt({
880
- apply({ elements: m }) {
881
- const b = {
882
- zIndex: `${yt}`,
883
- height: `${m.reference.getBoundingClientRect().height}px`
882
+ ut(),
883
+ wt({
884
+ apply({ elements: f }) {
885
+ const v = {
886
+ zIndex: `${Ct}`,
887
+ height: `${f.reference.getBoundingClientRect().height}px`
884
888
  };
885
- Object.assign(m.floating.style, b);
889
+ Object.assign(f.floating.style, v);
886
890
  }
887
891
  })
888
892
  ],
889
- whileElementsMounted: ut
893
+ whileElementsMounted: ht
890
894
  });
891
- z(() => {
895
+ _(() => {
892
896
  r.setPositionReference(document.querySelector("aside"));
893
897
  }, [r]);
894
- const h = gt(o, { move: !1, handleClose: mt() }), c = kt(o), d = vt(o), k = bt(o), { getReferenceProps: l, getFloatingProps: a } = Ct([h, c, d, k]);
895
- return /* @__PURE__ */ g(J, { children: [
896
- /* @__PURE__ */ g(
898
+ const h = ft(o, { move: !1, handleClose: pt() }), c = gt(o), u = mt(o), b = kt(o), { getReferenceProps: l, getFloatingProps: a } = vt([h, c, u, b]);
899
+ return /* @__PURE__ */ k(J, { children: [
900
+ /* @__PURE__ */ k(
897
901
  "button",
898
902
  {
899
903
  className: I(
@@ -905,31 +909,31 @@ const Ve = ({ children: e, viewport: t, containerProps: s }) => {
905
909
  children: [
906
910
  /* @__PURE__ */ n("div", { className: "tw:bg-ic-white-1s tw:p-1.5 tw:rounded-lg", children: /* @__PURE__ */ n(E, { ...e.icon }) }),
907
911
  /* @__PURE__ */ n("span", { className: "tw:flex-1 tw:truncate", children: e.name }),
908
- /* @__PURE__ */ n(E, { className: "tw:rotate-180", source: mr })
912
+ /* @__PURE__ */ n(E, { className: "tw:rotate-180", source: pr })
909
913
  ]
910
914
  }
911
915
  ),
912
- t && /* @__PURE__ */ n(Ie, { children: /* @__PURE__ */ n("div", { style: i, ...a(), ref: r.setFloating, children: /* @__PURE__ */ g("div", { className: "tw:h-full tw:flex tw:flex-col tw:border-l tw:border-t tw:border-ic-white-2s tw:bg-ic-ink-6s tw:text-ic-white-6s tw:text-sm", children: [
916
+ t && /* @__PURE__ */ n(De, { children: /* @__PURE__ */ n("div", { style: i, ...a(), ref: r.setFloating, children: /* @__PURE__ */ k("div", { className: "tw:h-full tw:flex tw:flex-col tw:border-l tw:border-t tw:border-ic-white-2s tw:bg-ic-ink-6s tw:text-ic-white-6s tw:text-sm", children: [
913
917
  /* @__PURE__ */ n("div", { className: "tw:h-12 tw:px-2 tw:flex tw:items-center", children: /* @__PURE__ */ n("h6", { className: "tw:font-medium", children: e.name }) }),
914
- /* @__PURE__ */ n(oe, { className: "tw:flex-1 tw:px-3", children: /* @__PURE__ */ n("div", { className: "tw:flex tw:flex-col tw:gap-4", children: e.sections.map((m, b) => /* @__PURE__ */ ht(Cr, { ...m, key: b })) }) })
918
+ /* @__PURE__ */ n(ie, { className: "tw:flex-1 tw:px-3", children: /* @__PURE__ */ n("div", { className: "tw:flex tw:flex-col tw:gap-4", children: e.sections.map((f, v) => /* @__PURE__ */ lt(vr, { ...f, key: v })) }) })
915
919
  ] }) }) })
916
920
  ] });
917
- }, Cr = ({ template: e, autoFocus: t = !0, onCreate: s }) => {
918
- const [, r] = _(!1), [i] = ae(), { actions: o, connectors: h, resolver: c, query: d } = W((l) => ({
921
+ }, vr = ({ template: e, autoFocus: t = !0, onCreate: s }) => {
922
+ const [, r] = F(!1), i = te(), { actions: o, connectors: h, resolver: c, query: u } = W((l) => ({
919
923
  resolver: l.options.resolver
920
- })), k = _(() => {
924
+ })), b = F(() => {
921
925
  const l = typeof e == "function" ? e() : e;
922
926
  let a;
923
- "rootNodeId" in l ? a = l : a = d.parseReactElement(l).toNodeTree();
924
- const { rootNodeId: m, nodes: b } = a, v = {};
925
- return Object.entries(b).forEach(([w, N]) => {
926
- const p = Et(N.data, c), x = w === m ? B : w;
927
- v[x] = {
928
- ...p,
929
- parent: p.parent === m ? B : p.parent,
930
- nodes: p.nodes?.map((M) => M === m ? B : M)
927
+ "rootNodeId" in l ? a = l : a = u.parseReactElement(l).toNodeTree();
928
+ const { rootNodeId: f, nodes: v } = a, w = {};
929
+ return Object.entries(v).forEach(([d, N]) => {
930
+ const m = Nt(N.data, c), x = d === f ? B : d;
931
+ w[x] = {
932
+ ...m,
933
+ parent: m.parent === f ? B : m.parent,
934
+ nodes: m.nodes?.map((M) => M === f ? B : M)
931
935
  };
932
- }), v;
936
+ }), w;
933
937
  })[0];
934
938
  return /* @__PURE__ */ n(
935
939
  "div",
@@ -945,20 +949,20 @@ const Ve = ({ children: e, viewport: t, containerProps: s }) => {
945
949
  onDragStart: () => r(!0),
946
950
  onDragEnd: () => r(!1),
947
951
  children: /* @__PURE__ */ n("div", { className: "tw:relative tw:aspect-video tw:rounded-lg tw:overflow-hidden tw:w-60 tw:pointer-events-none", children: /* @__PURE__ */ n("div", { className: "tw:absolute tw:inset-0", children: /* @__PURE__ */ n(
948
- Ve,
952
+ He,
949
953
  {
950
954
  containerProps: {
951
955
  style: {
952
956
  backgroundColor: i.theme.palette.background.default
953
957
  }
954
958
  },
955
- viewport: { width: Nt.md.minWidth },
956
- children: /* @__PURE__ */ n(Me, { resolver: c, children: /* @__PURE__ */ n(Re, { data: k }) })
959
+ viewport: { width: xt.md.minWidth },
960
+ children: /* @__PURE__ */ n(Se, { resolver: c, children: /* @__PURE__ */ n(Me, { data: b }) })
957
961
  }
958
962
  ) }) })
959
963
  }
960
964
  );
961
- }, xr = `<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
965
+ }, br = `<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
962
966
  <path d="M12.5 2H9.5" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
963
967
  <path d="M2 9.5V12.5" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
964
968
  <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"/>
@@ -969,77 +973,77 @@ const Ve = ({ children: e, viewport: t, containerProps: s }) => {
969
973
  <path d="M2 17V18C2 19.105 2.895 20 4 20H5" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
970
974
  <path d="M20 5V4C20 2.895 19.105 2 18 2H17" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
971
975
  </svg>
972
- `, yr = `<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
976
+ `, Cr = `<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
973
977
  <circle cx="6.49771" cy="5.49762" r="2.50104" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
974
978
  <circle cx="6.49771" cy="18.503" r="2.50104" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
975
979
  <path d="M6.49771 7.99854V16.0019" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
976
980
  <circle cx="17.5023" cy="13.0006" r="2.50104" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
977
981
  <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"/>
978
982
  </svg>
979
- `, Nr = (e) => {
983
+ `, xr = (e) => {
980
984
  const { query: t, actions: s } = W(), {
981
985
  id: r,
982
986
  expanded: i,
983
987
  actions: o,
984
988
  displayName: h,
985
989
  children: c,
986
- depth: d
987
- } = jt((b) => ({
988
- expanded: b.expanded,
989
- displayName: $e(t.node(b.id).get())
990
- })), { selected: k, selectable: l } = W((b, v) => {
991
- const w = v.node(r).get();
990
+ depth: u
991
+ } = Rt((v) => ({
992
+ expanded: v.expanded,
993
+ displayName: je(t.node(v.id).get())
994
+ })), { selected: b, selectable: l } = W((v, w) => {
995
+ const d = w.node(r).get();
992
996
  return {
993
- selected: v.getEvent("selected").contains(r),
994
- nodeDOM: w.dom,
995
- selectable: it(w)
997
+ selected: w.getEvent("selected").contains(r),
998
+ nodeDOM: d.dom,
999
+ selectable: ot(d)
996
1000
  };
997
1001
  });
998
- z(() => {
1002
+ _(() => {
999
1003
  r === B && o.setExpandedState(!0);
1000
- }, [o, r]), z(() => {
1004
+ }, [o, r]), _(() => {
1001
1005
  if (c.length === 0) return;
1002
- c.some((v) => {
1003
- const w = t.getEvent("selected").all();
1004
- return w.includes(v) ? !0 : t.node(v).descendants(!0).some((p) => w.includes(p));
1006
+ c.some((w) => {
1007
+ const d = t.getEvent("selected").all();
1008
+ return d.includes(w) ? !0 : t.node(w).descendants(!0).some((m) => d.includes(m));
1005
1009
  }) && o.setExpandedState(!0);
1006
1010
  }, [c, o, t]);
1007
1011
  const a = () => {
1008
1012
  s.selectNode(r);
1009
- }, m = (b) => {
1010
- b.stopPropagation(), o.toggleLayer();
1013
+ }, f = (v) => {
1014
+ v.stopPropagation(), o.toggleLayer();
1011
1015
  };
1012
- return /* @__PURE__ */ g(
1016
+ return /* @__PURE__ */ k(
1013
1017
  "div",
1014
1018
  {
1015
1019
  className: "tw:py-1",
1016
1020
  children: [
1017
- /* @__PURE__ */ g(
1021
+ /* @__PURE__ */ k(
1018
1022
  "div",
1019
1023
  {
1020
1024
  onClick: a,
1021
1025
  style: {
1022
- paddingLeft: Math.max(0, d - 1) * 16
1026
+ paddingLeft: Math.max(0, u - 1) * 16
1023
1027
  },
1024
1028
  className: I(
1025
1029
  "tw:flex tw:items-center tw:gap-0.5 tw:cursor-pointer tw:rounded-1 tw:pr-2 tw:py-1 tw:border tw:border-ic-white-1s tw:hover:bg-ic-white-1s",
1026
1030
  {
1027
1031
  hidden: r === B,
1028
- "tw:bg-ic-black-7s": k,
1032
+ "tw:bg-ic-black-7s": b,
1029
1033
  "tw:pointer-events-none": !l
1030
1034
  }
1031
1035
  ),
1032
1036
  children: [
1033
- c.length ? /* @__PURE__ */ n(j, { className: "tw:pointer-events-auto", onClick: m, children: /* @__PURE__ */ n(
1037
+ c.length ? /* @__PURE__ */ n(j, { className: "tw:pointer-events-auto", onClick: f, children: /* @__PURE__ */ n(
1034
1038
  E,
1035
1039
  {
1036
1040
  className: I("tw:transition-transform tw:-rotate-90", {
1037
1041
  "tw:rotate-0": i
1038
1042
  }),
1039
1043
  size: 16,
1040
- source: Se
1044
+ source: Ee
1041
1045
  }
1042
- ) }) : /* @__PURE__ */ n("div", { className: "tw:p-1", children: /* @__PURE__ */ n(E, { size: 16, source: yr }) }),
1046
+ ) }) : /* @__PURE__ */ n("div", { className: "tw:p-1", children: /* @__PURE__ */ n(E, { size: 16, source: Cr }) }),
1043
1047
  /* @__PURE__ */ n(
1044
1048
  "span",
1045
1049
  {
@@ -1056,12 +1060,12 @@ const Ve = ({ children: e, viewport: t, containerProps: s }) => {
1056
1060
  ]
1057
1061
  }
1058
1062
  );
1059
- }, Lr = ({ onClose: e }) => {
1060
- const t = It(), s = (r) => {
1063
+ }, yr = ({ onClose: e }) => {
1064
+ const t = At(), s = (r) => {
1061
1065
  t.start(r);
1062
1066
  };
1063
- return /* @__PURE__ */ n(Ie, { children: /* @__PURE__ */ g(
1064
- Xe.div,
1067
+ return /* @__PURE__ */ n(De, { children: /* @__PURE__ */ k(
1068
+ Ke.div,
1065
1069
  {
1066
1070
  drag: !0,
1067
1071
  dragControls: t,
@@ -1069,62 +1073,62 @@ const Ve = ({ children: e, viewport: t, containerProps: s }) => {
1069
1073
  style: { zIndex: 1e5, width: 320, height: 400, top: 80, right: 40 },
1070
1074
  className: "tw:fixed tw:rounded-2 tw:bg-ic-ink-6s tw:text-white tw:flex tw:flex-col tw:border tw:border-ic-white-2s",
1071
1075
  children: [
1072
- /* @__PURE__ */ g(
1076
+ /* @__PURE__ */ k(
1073
1077
  "div",
1074
1078
  {
1075
1079
  onPointerDown: s,
1076
1080
  className: "tw:py-2 tw:cursor-grab tw:flex tw:items-center tw:justify-between tw:px-4",
1077
1081
  children: [
1078
- /* @__PURE__ */ g("div", { className: "tw:flex tw:items-center tw:gap-2", children: [
1079
- /* @__PURE__ */ n(E, { source: xr }),
1082
+ /* @__PURE__ */ k("div", { className: "tw:flex tw:items-center tw:gap-2", children: [
1083
+ /* @__PURE__ */ n(E, { source: br }),
1080
1084
  /* @__PURE__ */ n("p", { className: "tw:text-sm tw:font-medium", children: "Layers" })
1081
1085
  ] }),
1082
- /* @__PURE__ */ n(j, { onClick: e, children: /* @__PURE__ */ n(E, { source: Je }) })
1086
+ /* @__PURE__ */ n(j, { onClick: e, children: /* @__PURE__ */ n(E, { source: Xe }) })
1083
1087
  ]
1084
1088
  }
1085
1089
  ),
1086
- /* @__PURE__ */ n("div", { className: "tw:flex-1 tw:overflow-auto tw:border-t tw:border-ic-white-1s tw:p-2", children: /* @__PURE__ */ n($t, { renderLayer: Nr }) })
1090
+ /* @__PURE__ */ n("div", { className: "tw:flex-1 tw:overflow-auto tw:border-t tw:border-ic-white-1s tw:p-2", children: /* @__PURE__ */ n(Mt, { renderLayer: xr }) })
1087
1091
  ]
1088
1092
  }
1089
1093
  ) });
1090
- }, Er = `<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
1094
+ }, Nr = `<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
1091
1095
  <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"/>
1092
1096
  <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"/>
1093
1097
  <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"/>
1094
1098
  </svg>
1095
- `, Sr = `<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
1099
+ `, Lr = `<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
1096
1100
  <path d="M5 12H19" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
1097
1101
  <path d="M10 7L5 12" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
1098
1102
  <path d="M10 17L5 12" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
1099
1103
  </svg>
1100
- `, Mr = ({ insert: e }) => {
1101
- const [t, s] = De(!1), {
1104
+ `, Er = ({ insert: e }) => {
1105
+ const [t, s] = Ae(!1), {
1102
1106
  queryParams: {
1103
1107
  action: r = "insert"
1104
1108
  /* Insert */
1105
1109
  },
1106
1110
  setQueryParams: i
1107
- } = te(), { actions: o, isDeletable: h, focusedNode: c } = W((a, m) => {
1108
- const b = m.getEvent("selected").first(), v = b ? m.node(b) : null;
1111
+ } = re(), { actions: o, isDeletable: h, focusedNode: c } = W((a, f) => {
1112
+ const v = f.getEvent("selected").first(), w = v ? f.node(v) : null;
1109
1113
  return {
1110
1114
  enabled: a.options.enabled,
1111
- isDeletable: !!(v?.isDeletable() && (v.get().data.custom?.deletable ?? !0)),
1112
- focusedNode: v?.get()
1115
+ isDeletable: !!(w?.isDeletable() && (w.get().data.custom?.deletable ?? !0)),
1116
+ focusedNode: w?.get()
1113
1117
  };
1114
- }), d = () => {
1118
+ }), u = () => {
1115
1119
  o.selectNode();
1116
- }, k = (a) => {
1120
+ }, b = (a) => {
1117
1121
  o.delete(a.currentTarget.value);
1118
1122
  }, l = (a) => {
1119
- const m = a.currentTarget.value;
1120
- m === "layers" ? s() : (d(), i({
1121
- action: m
1123
+ const f = a.currentTarget.value;
1124
+ f === "layers" ? s() : (u(), i({
1125
+ action: f
1122
1126
  }));
1123
1127
  };
1124
- return /* @__PURE__ */ g(J, { children: [
1125
- /* @__PURE__ */ g("aside", { className: "tw:flex tw:items-stretch tw:bg-ic-ink-6s tw:relative tw:border-t tw:border-ic-white-2s tw:text-ic-white-6s tw:text-sm", children: [
1126
- /* @__PURE__ */ g("div", { className: "tw:px-1 tw:flex tw:flex-col tw:gap-1", children: [
1127
- !!e && /* @__PURE__ */ g(Ne, { children: [
1128
+ return /* @__PURE__ */ k(J, { children: [
1129
+ /* @__PURE__ */ k("aside", { className: "tw:flex tw:items-stretch tw:bg-ic-ink-6s tw:relative tw:border-t tw:border-ic-white-2s tw:text-ic-white-6s tw:text-sm", children: [
1130
+ /* @__PURE__ */ k("div", { className: "tw:px-1 tw:flex tw:flex-col tw:gap-1", children: [
1131
+ !!e && /* @__PURE__ */ k(ye, { children: [
1128
1132
  /* @__PURE__ */ n(
1129
1133
  j,
1130
1134
  {
@@ -1136,7 +1140,7 @@ const Ve = ({ children: e, viewport: t, containerProps: s }) => {
1136
1140
  value: "insert",
1137
1141
  className: "tw:relative",
1138
1142
  size: "32",
1139
- children: /* @__PURE__ */ n(E, { source: ct })
1143
+ children: /* @__PURE__ */ n(E, { source: it })
1140
1144
  }
1141
1145
  ),
1142
1146
  /* @__PURE__ */ n("hr", { className: "tw:border-ic-white-2s" })
@@ -1152,55 +1156,56 @@ const Ve = ({ children: e, viewport: t, containerProps: s }) => {
1152
1156
  value: "layers",
1153
1157
  className: "tw:relative",
1154
1158
  size: "32",
1155
- children: /* @__PURE__ */ n(E, { source: Er })
1159
+ children: /* @__PURE__ */ n(E, { source: Nr })
1156
1160
  }
1157
1161
  )
1158
1162
  ] }),
1159
- /* @__PURE__ */ g(
1163
+ /* @__PURE__ */ k(
1160
1164
  "div",
1161
1165
  {
1162
1166
  className: I("tw:relative tw:flex tw:flex-col tw:border-l tw:border-ic-white-1s tw:w-72 tw:overflow-auto"),
1163
1167
  children: [
1164
- !c?.related.inspector && /* @__PURE__ */ n("div", { className: "tw:flex-1 tw:overflow-auto scrollbar", children: r === "insert" && !!e && /* @__PURE__ */ n(kr, { elements: e.elements, sections: e.sections }) }),
1165
- !!c?.related?.inspector && /* @__PURE__ */ g("div", { className: "tw:flex tw:flex-col tw:flex-1 tw:overflow-hidden", children: [
1166
- /* @__PURE__ */ g("div", { className: "tw:flex tw:items-center tw:gap-2 tw:px-2 tw:py-2", children: [
1167
- /* @__PURE__ */ n(j, { onClick: d, children: /* @__PURE__ */ n(E, { source: Sr }) }),
1168
- /* @__PURE__ */ n("div", { className: "tw:flex-1 tw:overflow-hidden", children: /* @__PURE__ */ n(Ee, { fullWidth: !0, value: $e(c), size: "32" }) }),
1169
- h && /* @__PURE__ */ n(j, { value: c.id, onClick: k, children: /* @__PURE__ */ n(E, { className: "tw:text-ic-red-4s", source: et }) })
1168
+ !c?.related.inspector && /* @__PURE__ */ n("div", { className: "tw:flex-1 tw:overflow-auto scrollbar", children: r === "insert" && !!e && /* @__PURE__ */ n(gr, { elements: e.elements, sections: e.sections }) }),
1169
+ !!c?.related?.inspector && /* @__PURE__ */ k("div", { className: "tw:flex tw:flex-col tw:flex-1 tw:overflow-hidden", children: [
1170
+ /* @__PURE__ */ k("div", { className: "tw:flex tw:items-center tw:gap-2 tw:px-2 tw:py-2", children: [
1171
+ /* @__PURE__ */ n(j, { onClick: u, children: /* @__PURE__ */ n(E, { source: Lr }) }),
1172
+ /* @__PURE__ */ n("div", { className: "tw:flex-1 tw:overflow-hidden", children: /* @__PURE__ */ n(Le, { fullWidth: !0, value: je(c), size: "32" }) }),
1173
+ h && /* @__PURE__ */ n(j, { value: c.id, onClick: b, children: /* @__PURE__ */ n(E, { className: "tw:text-ic-red-4s", source: Je }) })
1170
1174
  ] }),
1171
- /* @__PURE__ */ n("div", { className: "tw:flex-1 tw:overflow-auto tw:border-t tw:border-ic-white-1s scrollbar-hidden", children: /* @__PURE__ */ n(at, { fallback: null, children: Ae(c.related.inspector) }) })
1175
+ /* @__PURE__ */ n("div", { className: "tw:flex-1 tw:overflow-auto tw:border-t tw:border-ic-white-1s scrollbar-hidden", children: /* @__PURE__ */ n(tt, { fallback: null, children: $e(c.related.inspector) }) })
1172
1176
  ] })
1173
1177
  ]
1174
1178
  }
1175
1179
  )
1176
1180
  ] }),
1177
- t && /* @__PURE__ */ n(Lr, { onClose: s })
1181
+ t && /* @__PURE__ */ n(yr, { onClose: s })
1178
1182
  ] });
1179
- }, Vr = ({ theme: e, insert: t, resolver: s }) => {
1183
+ }, Or = ({ theme: e, insert: t, resolver: s, handlers: r }) => {
1180
1184
  const {
1181
- queryParams: { screen: r }
1182
- } = te();
1183
- return ae({
1184
- theme: e
1185
- }), /* @__PURE__ */ n(Me, { enabled: !0, onRender: hr, resolver: s, children: /* @__PURE__ */ g("div", { className: "tw:flex tw:flex-col tw:w-screen tw:h-screen tw:bg-ic-ink-6s tw:text-ic-white-6s", children: [
1186
- /* @__PURE__ */ n(pr, {}),
1187
- /* @__PURE__ */ g("div", { className: "tw:flex-1 tw:overflow-hidden tw:flex", children: [
1188
- /* @__PURE__ */ n(Mr, { insert: t }),
1185
+ queryParams: { screen: i }
1186
+ } = re();
1187
+ return te({
1188
+ theme: e,
1189
+ handlers: r
1190
+ }), /* @__PURE__ */ n(Se, { enabled: !0, onRender: lr, resolver: s, children: /* @__PURE__ */ k("div", { className: "tw:flex tw:flex-col tw:w-screen tw:h-screen tw:bg-ic-ink-6s tw:text-ic-white-6s", children: [
1191
+ /* @__PURE__ */ n(wr, {}),
1192
+ /* @__PURE__ */ k("div", { className: "tw:flex-1 tw:overflow-hidden tw:flex", children: [
1193
+ /* @__PURE__ */ n(Er, { insert: t }),
1189
1194
  /* @__PURE__ */ n(
1190
- Ve,
1195
+ He,
1191
1196
  {
1192
1197
  viewport: {
1193
- width: (i) => r === "lg" ? Math.max(i, fe[r]) : fe[r]
1198
+ width: (o) => i === "lg" ? Math.max(o, fe[i]) : fe[i]
1194
1199
  },
1195
- children: /* @__PURE__ */ n(Re, { children: /* @__PURE__ */ n(tt, {}) })
1200
+ children: /* @__PURE__ */ n(Me, { children: /* @__PURE__ */ n(et, {}) })
1196
1201
  }
1197
1202
  )
1198
1203
  ] })
1199
1204
  ] }) });
1200
1205
  };
1201
1206
  export {
1202
- Vr as Editor,
1203
- te as useEditorQueryParams,
1204
- qr as useEditorResponsive,
1205
- ae as useEditorState
1207
+ Or as Editor,
1208
+ te as useEditor,
1209
+ re as useEditorQueryParams,
1210
+ zr as useEditorResponsive
1206
1211
  };