@tech_carthagos/page-builder 1.0.14 → 1.0.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{CraftEditor-Grwj7M3H.js → CraftEditor-D2EBrpQi.js} +782 -858
- package/dist/CraftEditor-bE3h6p8p.cjs +72 -0
- package/dist/index-Bq79BZ9n.cjs +189 -0
- package/dist/{index-BU18TokA.js → index-C_JmCif3.js} +1793 -1810
- package/dist/index.cjs.js +1 -1
- package/dist/index.es.js +1 -1
- package/dist/styles.css +106 -1
- package/dist-types/components/ui/button.d.ts +12 -0
- package/dist-types/components/ui/button.d.ts.map +1 -0
- package/dist-types/components/ui/card.d.ts +9 -0
- package/dist-types/components/ui/card.d.ts.map +1 -0
- package/dist-types/components/ui/dialog.d.ts +20 -0
- package/dist-types/components/ui/dialog.d.ts.map +1 -0
- package/dist-types/components/ui/dropdown-menu.d.ts +28 -0
- package/dist-types/components/ui/dropdown-menu.d.ts.map +1 -0
- package/dist-types/components/ui/input.d.ts +4 -0
- package/dist-types/components/ui/input.d.ts.map +1 -0
- package/dist-types/components/ui/select.d.ts +14 -0
- package/dist-types/components/ui/select.d.ts.map +1 -0
- package/dist-types/editor/Toolbox.d.ts.map +1 -1
- package/dist-types/lib/utils.d.ts.map +1 -1
- package/dist-types/user/Container.d.ts +5 -2
- package/dist-types/user/Container.d.ts.map +1 -1
- package/dist-types/user/ContainerOld.d.ts +92 -1
- package/dist-types/user/ContainerOld.d.ts.map +1 -1
- package/dist-types/user/Div.d.ts +11 -4
- package/dist-types/user/Div.d.ts.map +1 -1
- package/dist-types/user/Wrapper.d.ts +5 -2
- package/dist-types/user/Wrapper.d.ts.map +1 -1
- package/package.json +9 -4
- package/dist/CraftEditor-xRtkY2_B.cjs +0 -72
- package/dist/index-CyIoH_7r.cjs +0 -189
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { jsx as l, jsxs as
|
|
1
|
+
import { jsx as l, jsxs as F, Fragment as Ct } from "react/jsx-runtime";
|
|
2
2
|
import * as p from "react";
|
|
3
|
-
import m, { useState as
|
|
4
|
-
import { c as Y, N as
|
|
5
|
-
import
|
|
3
|
+
import m, { useState as Ee, forwardRef as Br, isValidElement as Ye, useEffect as Fr } from "react";
|
|
4
|
+
import { c as Y, N as Qe, a as Et, d as Hr, C as Nt, b as Vr, P as ye, B as Ie, L as Tt, F as $r, k as Ae, W as Je, e as Rt, H as Pt, T as kt, f as It, g as At, I as Dt, V as Mt, D as _t, S as Lt, u as oe, h as Le, i as te, j as ze, l as W, m as ie, n as jr, o as Ne, p as Gr, q as Wr, r as Yr, s as Ur, t as Oe, v as Xr, w as Kr, M as qr, x as Zr, y as Qr, z as Jr, A as eo, E as to, G as ro, J as oo, K as no, O as ao, Q as so, R as lo, U as io, X as co, Y as uo, Z as Ue, _ as Xe } from "./index-C_JmCif3.js";
|
|
5
|
+
import fo from "react-dom";
|
|
6
6
|
/**
|
|
7
7
|
* @license lucide-react v0.462.0 - ISC
|
|
8
8
|
*
|
|
9
9
|
* This source code is licensed under the ISC license.
|
|
10
10
|
* See the LICENSE file in the root directory of this source tree.
|
|
11
11
|
*/
|
|
12
|
-
const
|
|
12
|
+
const mo = Y("Columns2", [
|
|
13
13
|
["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", key: "afitv7" }],
|
|
14
14
|
["path", { d: "M12 3v18", key: "108xh3" }]
|
|
15
15
|
]);
|
|
@@ -19,7 +19,7 @@ const Ot = Y("Columns2", [
|
|
|
19
19
|
* This source code is licensed under the ISC license.
|
|
20
20
|
* See the LICENSE file in the root directory of this source tree.
|
|
21
21
|
*/
|
|
22
|
-
const
|
|
22
|
+
const po = Y("GripVertical", [
|
|
23
23
|
["circle", { cx: "9", cy: "12", r: "1", key: "1vctgf" }],
|
|
24
24
|
["circle", { cx: "9", cy: "5", r: "1", key: "hp0tcf" }],
|
|
25
25
|
["circle", { cx: "9", cy: "19", r: "1", key: "fkjjf6" }],
|
|
@@ -33,7 +33,7 @@ const fr = Y("GripVertical", [
|
|
|
33
33
|
* This source code is licensed under the ISC license.
|
|
34
34
|
* See the LICENSE file in the root directory of this source tree.
|
|
35
35
|
*/
|
|
36
|
-
const
|
|
36
|
+
const zt = Y("Heading", [
|
|
37
37
|
["path", { d: "M6 12h12", key: "8npq4p" }],
|
|
38
38
|
["path", { d: "M6 20V4", key: "1w1bmo" }],
|
|
39
39
|
["path", { d: "M18 20V4", key: "o2hl4u" }]
|
|
@@ -44,7 +44,7 @@ const Bt = Y("Heading", [
|
|
|
44
44
|
* This source code is licensed under the ISC license.
|
|
45
45
|
* See the LICENSE file in the root directory of this source tree.
|
|
46
46
|
*/
|
|
47
|
-
const
|
|
47
|
+
const Ot = Y("Image", [
|
|
48
48
|
["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", ry: "2", key: "1m3agn" }],
|
|
49
49
|
["circle", { cx: "9", cy: "9", r: "2", key: "af1f0g" }],
|
|
50
50
|
["path", { d: "m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21", key: "1xmnt7" }]
|
|
@@ -55,14 +55,14 @@ const Ft = Y("Image", [
|
|
|
55
55
|
* This source code is licensed under the ISC license.
|
|
56
56
|
* See the LICENSE file in the root directory of this source tree.
|
|
57
57
|
*/
|
|
58
|
-
const
|
|
58
|
+
const Bt = Y("Minus", [["path", { d: "M5 12h14", key: "1ays0h" }]]);
|
|
59
59
|
/**
|
|
60
60
|
* @license lucide-react v0.462.0 - ISC
|
|
61
61
|
*
|
|
62
62
|
* This source code is licensed under the ISC license.
|
|
63
63
|
* See the LICENSE file in the root directory of this source tree.
|
|
64
64
|
*/
|
|
65
|
-
const
|
|
65
|
+
const Ft = Y("MousePointer", [
|
|
66
66
|
["path", { d: "M12.586 12.586 19 19", key: "ea5xo7" }],
|
|
67
67
|
[
|
|
68
68
|
"path",
|
|
@@ -78,7 +78,7 @@ const Vt = Y("MousePointer", [
|
|
|
78
78
|
* This source code is licensed under the ISC license.
|
|
79
79
|
* See the LICENSE file in the root directory of this source tree.
|
|
80
80
|
*/
|
|
81
|
-
const
|
|
81
|
+
const Ht = Y("MoveVertical", [
|
|
82
82
|
["path", { d: "M12 2v20", key: "t6zp3m" }],
|
|
83
83
|
["path", { d: "m8 18 4 4 4-4", key: "bh5tu3" }],
|
|
84
84
|
["path", { d: "m8 6 4-4 4 4", key: "ybng9g" }]
|
|
@@ -89,7 +89,7 @@ const jt = Y("MoveVertical", [
|
|
|
89
89
|
* This source code is licensed under the ISC license.
|
|
90
90
|
* See the LICENSE file in the root directory of this source tree.
|
|
91
91
|
*/
|
|
92
|
-
const
|
|
92
|
+
const ho = Y("Redo2", [
|
|
93
93
|
["path", { d: "m15 14 5-5-5-5", key: "12vg1m" }],
|
|
94
94
|
["path", { d: "M20 9H9.5A5.5 5.5 0 0 0 4 14.5A5.5 5.5 0 0 0 9.5 20H13", key: "6uklza" }]
|
|
95
95
|
]);
|
|
@@ -99,7 +99,7 @@ const mr = Y("Redo2", [
|
|
|
99
99
|
* This source code is licensed under the ISC license.
|
|
100
100
|
* See the LICENSE file in the root directory of this source tree.
|
|
101
101
|
*/
|
|
102
|
-
const
|
|
102
|
+
const go = Y("Save", [
|
|
103
103
|
[
|
|
104
104
|
"path",
|
|
105
105
|
{
|
|
@@ -116,7 +116,7 @@ const pr = Y("Save", [
|
|
|
116
116
|
* This source code is licensed under the ISC license.
|
|
117
117
|
* See the LICENSE file in the root directory of this source tree.
|
|
118
118
|
*/
|
|
119
|
-
const
|
|
119
|
+
const Ce = Y("Square", [
|
|
120
120
|
["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", key: "afitv7" }]
|
|
121
121
|
]);
|
|
122
122
|
/**
|
|
@@ -125,7 +125,7 @@ const ye = Y("Square", [
|
|
|
125
125
|
* This source code is licensed under the ISC license.
|
|
126
126
|
* See the LICENSE file in the root directory of this source tree.
|
|
127
127
|
*/
|
|
128
|
-
const
|
|
128
|
+
const vo = Y("Trash2", [
|
|
129
129
|
["path", { d: "M3 6h18", key: "d0wm0j" }],
|
|
130
130
|
["path", { d: "M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6", key: "4alrt4" }],
|
|
131
131
|
["path", { d: "M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2", key: "v07s0e" }],
|
|
@@ -138,7 +138,7 @@ const hr = Y("Trash2", [
|
|
|
138
138
|
* This source code is licensed under the ISC license.
|
|
139
139
|
* See the LICENSE file in the root directory of this source tree.
|
|
140
140
|
*/
|
|
141
|
-
const
|
|
141
|
+
const Vt = Y("Type", [
|
|
142
142
|
["polyline", { points: "4 7 4 4 20 4 20 7", key: "1nosan" }],
|
|
143
143
|
["line", { x1: "9", x2: "15", y1: "20", y2: "20", key: "swin9y" }],
|
|
144
144
|
["line", { x1: "12", x2: "12", y1: "4", y2: "20", key: "1tx1rr" }]
|
|
@@ -149,7 +149,7 @@ const Gt = Y("Type", [
|
|
|
149
149
|
* This source code is licensed under the ISC license.
|
|
150
150
|
* See the LICENSE file in the root directory of this source tree.
|
|
151
151
|
*/
|
|
152
|
-
const
|
|
152
|
+
const bo = Y("Undo2", [
|
|
153
153
|
["path", { d: "M9 14 4 9l5-5", key: "102s5s" }],
|
|
154
154
|
["path", { d: "M4 9h10.5a5.5 5.5 0 0 1 5.5 5.5a5.5 5.5 0 0 1-5.5 5.5H11", key: "f3b9sd" }]
|
|
155
155
|
]);
|
|
@@ -159,7 +159,7 @@ const gr = Y("Undo2", [
|
|
|
159
159
|
* This source code is licensed under the ISC license.
|
|
160
160
|
* See the LICENSE file in the root directory of this source tree.
|
|
161
161
|
*/
|
|
162
|
-
const
|
|
162
|
+
const yo = Y("Video", [
|
|
163
163
|
[
|
|
164
164
|
"path",
|
|
165
165
|
{
|
|
@@ -168,247 +168,171 @@ const vr = Y("Video", [
|
|
|
168
168
|
}
|
|
169
169
|
],
|
|
170
170
|
["rect", { x: "2", y: "6", width: "14", height: "12", rx: "2", key: "158x01" }]
|
|
171
|
-
]),
|
|
172
|
-
className: e,
|
|
173
|
-
backgroundColor: t = "transparent",
|
|
174
|
-
backgroundImage: o = "",
|
|
175
|
-
backgroundSize: r = "cover",
|
|
176
|
-
backgroundRepeat: n = "no-repeat",
|
|
177
|
-
padding: s = { top: 16, right: 16, bottom: 16, left: 16 },
|
|
178
|
-
margin: i = { top: 0, right: 0, bottom: 0, left: 0 },
|
|
179
|
-
width: c = "auto",
|
|
180
|
-
minHeight: d = 100,
|
|
181
|
-
maxWidth: u = "none",
|
|
182
|
-
display: f = "block",
|
|
183
|
-
flexDirection: h = "column",
|
|
184
|
-
justifyContent: g = "flex-start",
|
|
185
|
-
alignItems: a = "stretch",
|
|
186
|
-
gap: N = 0,
|
|
187
|
-
borderRadius: v = 8,
|
|
188
|
-
borderWidth: b = 1,
|
|
189
|
-
borderColor: C = "transparent",
|
|
190
|
-
borderStyle: S = "dashed",
|
|
191
|
-
boxShadow: w = "none",
|
|
192
|
-
children: T
|
|
193
|
-
}) => {
|
|
171
|
+
]), et = (e) => {
|
|
194
172
|
const {
|
|
195
|
-
connectors: { connect:
|
|
196
|
-
selected:
|
|
197
|
-
} =
|
|
198
|
-
selected:
|
|
199
|
-
}))
|
|
173
|
+
connectors: { connect: t, drag: r },
|
|
174
|
+
selected: o
|
|
175
|
+
} = Qe((n) => ({
|
|
176
|
+
selected: n.events.selected
|
|
177
|
+
}));
|
|
200
178
|
return /* @__PURE__ */ l(
|
|
201
179
|
"div",
|
|
202
180
|
{
|
|
203
|
-
style:
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
backgroundRepeat: n,
|
|
208
|
-
padding: D,
|
|
209
|
-
margin: P,
|
|
210
|
-
width: c === "auto" ? "100%" : c,
|
|
211
|
-
minHeight: `${d}px`,
|
|
212
|
-
maxWidth: u === "none" ? "none" : `${u}px`,
|
|
213
|
-
display: f,
|
|
214
|
-
flexDirection: f === "flex" ? h : void 0,
|
|
215
|
-
justifyContent: f === "flex" ? g : void 0,
|
|
216
|
-
alignItems: f === "flex" ? a : void 0,
|
|
217
|
-
gap: f === "flex" ? `${N}px` : void 0,
|
|
218
|
-
borderRadius: `${v}px`,
|
|
219
|
-
borderWidth: `${b}px`,
|
|
220
|
-
borderColor: C,
|
|
221
|
-
borderStyle: S,
|
|
222
|
-
boxShadow: w === "none" ? "none" : w
|
|
223
|
-
},
|
|
224
|
-
className: Nt(
|
|
225
|
-
e,
|
|
226
|
-
`${k ? "ring-2 ring-primary ring-offset-2" : ""}`
|
|
181
|
+
style: Hr(e),
|
|
182
|
+
className: Et(
|
|
183
|
+
e.className,
|
|
184
|
+
`${o ? "outline outline-blue-500" : ""}`
|
|
227
185
|
),
|
|
228
|
-
ref: (
|
|
229
|
-
|
|
186
|
+
ref: (n) => {
|
|
187
|
+
n && t(r(n));
|
|
230
188
|
},
|
|
231
|
-
children:
|
|
189
|
+
children: e.children
|
|
232
190
|
}
|
|
233
191
|
);
|
|
234
192
|
};
|
|
235
|
-
|
|
193
|
+
et.craft = {
|
|
236
194
|
isCanvas: !0,
|
|
237
|
-
props:
|
|
238
|
-
|
|
239
|
-
backgroundColor: "transparent",
|
|
240
|
-
backgroundImage: "",
|
|
241
|
-
backgroundSize: "cover",
|
|
242
|
-
backgroundRepeat: "no-repeat",
|
|
243
|
-
padding: { top: 16, right: 16, bottom: 16, left: 16 },
|
|
244
|
-
margin: { top: 0, right: 0, bottom: 0, left: 0 },
|
|
245
|
-
width: "auto",
|
|
246
|
-
minHeight: 100,
|
|
247
|
-
maxWidth: "none",
|
|
248
|
-
display: "block",
|
|
249
|
-
flexDirection: "column",
|
|
250
|
-
justifyContent: "flex-start",
|
|
251
|
-
alignItems: "stretch",
|
|
252
|
-
gap: 0,
|
|
253
|
-
borderRadius: 8,
|
|
254
|
-
borderWidth: 1,
|
|
255
|
-
borderColor: "transparent",
|
|
256
|
-
borderStyle: "dashed",
|
|
257
|
-
boxShadow: "none"
|
|
258
|
-
},
|
|
259
|
-
related: { settings: Tt }
|
|
195
|
+
props: Vr,
|
|
196
|
+
related: { settings: Nt }
|
|
260
197
|
};
|
|
261
|
-
const
|
|
262
|
-
const { connectors: e } =
|
|
198
|
+
const wo = () => {
|
|
199
|
+
const { connectors: e } = ye(), t = [
|
|
263
200
|
{
|
|
264
|
-
name: "
|
|
265
|
-
icon:
|
|
266
|
-
element: /* @__PURE__ */ l(
|
|
201
|
+
name: "Wrapper",
|
|
202
|
+
icon: Ce,
|
|
203
|
+
element: /* @__PURE__ */ l(Ae, { is: Je, canvas: !0 })
|
|
267
204
|
},
|
|
268
205
|
{
|
|
269
206
|
name: "Container",
|
|
270
|
-
icon:
|
|
271
|
-
element: /* @__PURE__ */ l(
|
|
272
|
-
},
|
|
273
|
-
{
|
|
274
|
-
name: "Columns",
|
|
275
|
-
icon: Ot,
|
|
276
|
-
element: /* @__PURE__ */ B(ie, { is: Pt, canvas: !0, children: [
|
|
277
|
-
/* @__PURE__ */ l(ie, { is: Ae, canvas: !0 }),
|
|
278
|
-
/* @__PURE__ */ l(ie, { is: Ae, canvas: !0 })
|
|
279
|
-
] })
|
|
207
|
+
icon: Ce,
|
|
208
|
+
element: /* @__PURE__ */ l(Ae, { is: Rt, canvas: !0 })
|
|
280
209
|
},
|
|
281
210
|
{
|
|
282
|
-
name: "
|
|
283
|
-
icon:
|
|
284
|
-
element: /* @__PURE__ */ l(
|
|
285
|
-
},
|
|
286
|
-
{
|
|
287
|
-
name: "Wrapper",
|
|
288
|
-
icon: ye,
|
|
289
|
-
element: /* @__PURE__ */ l(ie, { is: et, canvas: !0 })
|
|
211
|
+
name: "Div",
|
|
212
|
+
icon: Ce,
|
|
213
|
+
element: /* @__PURE__ */ l(Ae, { is: et, canvas: !0 })
|
|
290
214
|
}
|
|
291
|
-
],
|
|
215
|
+
], r = [
|
|
292
216
|
{
|
|
293
217
|
name: "Heading",
|
|
294
|
-
icon:
|
|
295
|
-
element: /* @__PURE__ */ l(
|
|
218
|
+
icon: zt,
|
|
219
|
+
element: /* @__PURE__ */ l(Pt, {})
|
|
296
220
|
},
|
|
297
221
|
{
|
|
298
222
|
name: "Text",
|
|
299
|
-
icon:
|
|
300
|
-
element: /* @__PURE__ */ l(
|
|
223
|
+
icon: Vt,
|
|
224
|
+
element: /* @__PURE__ */ l(kt, {})
|
|
301
225
|
},
|
|
302
226
|
{
|
|
303
227
|
name: "Button",
|
|
304
|
-
icon:
|
|
305
|
-
element: /* @__PURE__ */ l(
|
|
228
|
+
icon: Ft,
|
|
229
|
+
element: /* @__PURE__ */ l(It, {})
|
|
306
230
|
},
|
|
307
231
|
{
|
|
308
232
|
name: "Link",
|
|
309
|
-
icon:
|
|
310
|
-
element: /* @__PURE__ */ l(
|
|
233
|
+
icon: Tt,
|
|
234
|
+
element: /* @__PURE__ */ l(At, {})
|
|
311
235
|
}
|
|
312
|
-
],
|
|
236
|
+
], o = [
|
|
313
237
|
{
|
|
314
238
|
name: "Image",
|
|
315
|
-
icon:
|
|
316
|
-
element: /* @__PURE__ */ l(
|
|
239
|
+
icon: Ot,
|
|
240
|
+
element: /* @__PURE__ */ l(Dt, {})
|
|
317
241
|
},
|
|
318
242
|
{
|
|
319
243
|
name: "Video",
|
|
320
|
-
icon:
|
|
321
|
-
element: /* @__PURE__ */ l(
|
|
244
|
+
icon: $r,
|
|
245
|
+
element: /* @__PURE__ */ l(Mt, {})
|
|
322
246
|
}
|
|
323
247
|
], n = [
|
|
324
248
|
{
|
|
325
249
|
name: "Divider",
|
|
326
|
-
icon:
|
|
327
|
-
element: /* @__PURE__ */ l(
|
|
250
|
+
icon: Bt,
|
|
251
|
+
element: /* @__PURE__ */ l(_t, {})
|
|
328
252
|
},
|
|
329
253
|
{
|
|
330
254
|
name: "Spacer",
|
|
331
|
-
icon:
|
|
332
|
-
element: /* @__PURE__ */ l(
|
|
255
|
+
icon: Ht,
|
|
256
|
+
element: /* @__PURE__ */ l(Lt, {})
|
|
333
257
|
}
|
|
334
|
-
], s = (i,
|
|
258
|
+
], s = (i, d) => /* @__PURE__ */ F("div", { className: "space-y-2", children: [
|
|
335
259
|
/* @__PURE__ */ l("span", { className: "text-xs text-muted-foreground/70", children: i }),
|
|
336
|
-
/* @__PURE__ */ l("div", { className: "grid grid-cols-2 gap-1.5", children:
|
|
337
|
-
|
|
260
|
+
/* @__PURE__ */ l("div", { className: "grid grid-cols-2 gap-1.5", children: d.map((c) => /* @__PURE__ */ F(
|
|
261
|
+
Ie,
|
|
338
262
|
{
|
|
339
263
|
variant: "outline",
|
|
340
264
|
size: "sm",
|
|
341
265
|
className: "flex flex-col items-center justify-center h-14 cursor-grab active:cursor-grabbing text-muted-foreground hover:text-foreground",
|
|
342
|
-
ref: (u) => u && e.create(u,
|
|
266
|
+
ref: (u) => u && e.create(u, c.element),
|
|
343
267
|
children: [
|
|
344
|
-
/* @__PURE__ */ l(
|
|
345
|
-
/* @__PURE__ */ l("span", { className: "text-[10px]", children:
|
|
268
|
+
/* @__PURE__ */ l(c.icon, { className: "h-4 w-4 mb-1" }),
|
|
269
|
+
/* @__PURE__ */ l("span", { className: "text-[10px]", children: c.name })
|
|
346
270
|
]
|
|
347
271
|
},
|
|
348
|
-
|
|
272
|
+
c.name
|
|
349
273
|
)) })
|
|
350
274
|
] });
|
|
351
|
-
return /* @__PURE__ */
|
|
275
|
+
return /* @__PURE__ */ F("div", { className: "space-y-4", children: [
|
|
352
276
|
/* @__PURE__ */ l("h3", { className: "text-sm font-medium text-muted-foreground", children: "Components" }),
|
|
353
277
|
s("Layout", t),
|
|
354
|
-
s("Basic",
|
|
355
|
-
s("Media",
|
|
278
|
+
s("Basic", r),
|
|
279
|
+
s("Media", o),
|
|
356
280
|
s("Utility", n)
|
|
357
281
|
] });
|
|
358
282
|
};
|
|
359
|
-
var
|
|
360
|
-
function
|
|
361
|
-
const t = p.useContext(
|
|
283
|
+
var xo = p.createContext(void 0);
|
|
284
|
+
function tt(e) {
|
|
285
|
+
const t = p.useContext(xo);
|
|
362
286
|
return e || t || "ltr";
|
|
363
287
|
}
|
|
364
|
-
function
|
|
365
|
-
return Math.min(
|
|
288
|
+
function So(e, [t, r]) {
|
|
289
|
+
return Math.min(r, Math.max(t, e));
|
|
366
290
|
}
|
|
367
|
-
function
|
|
368
|
-
return p.useReducer((
|
|
291
|
+
function Co(e, t) {
|
|
292
|
+
return p.useReducer((r, o) => t[r][o] ?? r, e);
|
|
369
293
|
}
|
|
370
|
-
var rt = "ScrollArea", [
|
|
294
|
+
var rt = "ScrollArea", [$t] = Le(rt), [Eo, K] = $t(rt), jt = p.forwardRef(
|
|
371
295
|
(e, t) => {
|
|
372
296
|
const {
|
|
373
|
-
__scopeScrollArea:
|
|
374
|
-
type:
|
|
297
|
+
__scopeScrollArea: r,
|
|
298
|
+
type: o = "hover",
|
|
375
299
|
dir: n,
|
|
376
300
|
scrollHideDelay: s = 600,
|
|
377
301
|
...i
|
|
378
|
-
} = e, [
|
|
302
|
+
} = e, [d, c] = p.useState(null), [u, f] = p.useState(null), [h, g] = p.useState(null), [a, N] = p.useState(null), [v, b] = p.useState(null), [E, C] = p.useState(0), [x, T] = p.useState(0), [O, R] = p.useState(!1), [A, D] = p.useState(!1), k = oe(t, (H) => c(H)), B = tt(n);
|
|
379
303
|
return /* @__PURE__ */ l(
|
|
380
|
-
|
|
304
|
+
Eo,
|
|
381
305
|
{
|
|
382
|
-
scope:
|
|
383
|
-
type:
|
|
384
|
-
dir:
|
|
306
|
+
scope: r,
|
|
307
|
+
type: o,
|
|
308
|
+
dir: B,
|
|
385
309
|
scrollHideDelay: s,
|
|
386
|
-
scrollArea:
|
|
310
|
+
scrollArea: d,
|
|
387
311
|
viewport: u,
|
|
388
312
|
onViewportChange: f,
|
|
389
313
|
content: h,
|
|
390
314
|
onContentChange: g,
|
|
391
315
|
scrollbarX: a,
|
|
392
316
|
onScrollbarXChange: N,
|
|
393
|
-
scrollbarXEnabled:
|
|
317
|
+
scrollbarXEnabled: O,
|
|
394
318
|
onScrollbarXEnabledChange: R,
|
|
395
319
|
scrollbarY: v,
|
|
396
320
|
onScrollbarYChange: b,
|
|
397
|
-
scrollbarYEnabled:
|
|
321
|
+
scrollbarYEnabled: A,
|
|
398
322
|
onScrollbarYEnabledChange: D,
|
|
399
|
-
onCornerWidthChange:
|
|
323
|
+
onCornerWidthChange: C,
|
|
400
324
|
onCornerHeightChange: T,
|
|
401
325
|
children: /* @__PURE__ */ l(
|
|
402
326
|
te.div,
|
|
403
327
|
{
|
|
404
|
-
dir:
|
|
328
|
+
dir: B,
|
|
405
329
|
...i,
|
|
406
|
-
ref:
|
|
330
|
+
ref: k,
|
|
407
331
|
style: {
|
|
408
332
|
position: "relative",
|
|
409
333
|
// Pass corner sizes as CSS vars to reduce re-renders of context consumers
|
|
410
|
-
"--radix-scroll-area-corner-width":
|
|
411
|
-
"--radix-scroll-area-corner-height":
|
|
334
|
+
"--radix-scroll-area-corner-width": E + "px",
|
|
335
|
+
"--radix-scroll-area-corner-height": x + "px",
|
|
412
336
|
...e.style
|
|
413
337
|
}
|
|
414
338
|
}
|
|
@@ -417,11 +341,11 @@ var rt = "ScrollArea", [Wt] = ze(rt), [Sr, K] = Wt(rt), Yt = p.forwardRef(
|
|
|
417
341
|
);
|
|
418
342
|
}
|
|
419
343
|
);
|
|
420
|
-
|
|
421
|
-
var
|
|
344
|
+
jt.displayName = rt;
|
|
345
|
+
var Gt = "ScrollAreaViewport", Wt = p.forwardRef(
|
|
422
346
|
(e, t) => {
|
|
423
|
-
const { __scopeScrollArea:
|
|
424
|
-
return /* @__PURE__ */
|
|
347
|
+
const { __scopeScrollArea: r, children: o, nonce: n, ...s } = e, i = K(Gt, r), d = p.useRef(null), c = oe(t, d, i.onViewportChange);
|
|
348
|
+
return /* @__PURE__ */ F(Ct, { children: [
|
|
425
349
|
/* @__PURE__ */ l(
|
|
426
350
|
"style",
|
|
427
351
|
{
|
|
@@ -436,7 +360,7 @@ var Ut = "ScrollAreaViewport", Xt = p.forwardRef(
|
|
|
436
360
|
{
|
|
437
361
|
"data-radix-scroll-area-viewport": "",
|
|
438
362
|
...s,
|
|
439
|
-
ref:
|
|
363
|
+
ref: c,
|
|
440
364
|
style: {
|
|
441
365
|
/**
|
|
442
366
|
* We don't support `visible` because the intention is to have at least one scrollbar
|
|
@@ -453,47 +377,47 @@ var Ut = "ScrollAreaViewport", Xt = p.forwardRef(
|
|
|
453
377
|
overflowY: i.scrollbarYEnabled ? "scroll" : "hidden",
|
|
454
378
|
...e.style
|
|
455
379
|
},
|
|
456
|
-
children: /* @__PURE__ */ l("div", { ref: i.onContentChange, style: { minWidth: "100%", display: "table" }, children:
|
|
380
|
+
children: /* @__PURE__ */ l("div", { ref: i.onContentChange, style: { minWidth: "100%", display: "table" }, children: o })
|
|
457
381
|
}
|
|
458
382
|
)
|
|
459
383
|
] });
|
|
460
384
|
}
|
|
461
385
|
);
|
|
462
|
-
|
|
463
|
-
var
|
|
386
|
+
Wt.displayName = Gt;
|
|
387
|
+
var re = "ScrollAreaScrollbar", ot = p.forwardRef(
|
|
464
388
|
(e, t) => {
|
|
465
|
-
const { forceMount:
|
|
466
|
-
return p.useEffect(() => (
|
|
467
|
-
|
|
468
|
-
}), [
|
|
389
|
+
const { forceMount: r, ...o } = e, n = K(re, e.__scopeScrollArea), { onScrollbarXEnabledChange: s, onScrollbarYEnabledChange: i } = n, d = e.orientation === "horizontal";
|
|
390
|
+
return p.useEffect(() => (d ? s(!0) : i(!0), () => {
|
|
391
|
+
d ? s(!1) : i(!1);
|
|
392
|
+
}), [d, s, i]), n.type === "hover" ? /* @__PURE__ */ l(No, { ...o, ref: t, forceMount: r }) : n.type === "scroll" ? /* @__PURE__ */ l(To, { ...o, ref: t, forceMount: r }) : n.type === "auto" ? /* @__PURE__ */ l(Yt, { ...o, ref: t, forceMount: r }) : n.type === "always" ? /* @__PURE__ */ l(nt, { ...o, ref: t }) : null;
|
|
469
393
|
}
|
|
470
394
|
);
|
|
471
|
-
|
|
472
|
-
var
|
|
473
|
-
const { forceMount:
|
|
395
|
+
ot.displayName = re;
|
|
396
|
+
var No = p.forwardRef((e, t) => {
|
|
397
|
+
const { forceMount: r, ...o } = e, n = K(re, e.__scopeScrollArea), [s, i] = p.useState(!1);
|
|
474
398
|
return p.useEffect(() => {
|
|
475
|
-
const
|
|
476
|
-
let
|
|
477
|
-
if (
|
|
399
|
+
const d = n.scrollArea;
|
|
400
|
+
let c = 0;
|
|
401
|
+
if (d) {
|
|
478
402
|
const u = () => {
|
|
479
|
-
window.clearTimeout(
|
|
403
|
+
window.clearTimeout(c), i(!0);
|
|
480
404
|
}, f = () => {
|
|
481
|
-
|
|
405
|
+
c = window.setTimeout(() => i(!1), n.scrollHideDelay);
|
|
482
406
|
};
|
|
483
|
-
return
|
|
484
|
-
window.clearTimeout(
|
|
407
|
+
return d.addEventListener("pointerenter", u), d.addEventListener("pointerleave", f), () => {
|
|
408
|
+
window.clearTimeout(c), d.removeEventListener("pointerenter", u), d.removeEventListener("pointerleave", f);
|
|
485
409
|
};
|
|
486
410
|
}
|
|
487
|
-
}, [n.scrollArea, n.scrollHideDelay]), /* @__PURE__ */ l(
|
|
488
|
-
|
|
411
|
+
}, [n.scrollArea, n.scrollHideDelay]), /* @__PURE__ */ l(ze, { present: r || s, children: /* @__PURE__ */ l(
|
|
412
|
+
Yt,
|
|
489
413
|
{
|
|
490
414
|
"data-state": s ? "visible" : "hidden",
|
|
491
|
-
...
|
|
415
|
+
...o,
|
|
492
416
|
ref: t
|
|
493
417
|
}
|
|
494
418
|
) });
|
|
495
|
-
}),
|
|
496
|
-
const { forceMount:
|
|
419
|
+
}), To = p.forwardRef((e, t) => {
|
|
420
|
+
const { forceMount: r, ...o } = e, n = K(re, e.__scopeScrollArea), s = e.orientation === "horizontal", i = Fe(() => c("SCROLL_END"), 100), [d, c] = Co("hidden", {
|
|
497
421
|
hidden: {
|
|
498
422
|
SCROLL: "scrolling"
|
|
499
423
|
},
|
|
@@ -512,70 +436,70 @@ var Cr = p.forwardRef((e, t) => {
|
|
|
512
436
|
}
|
|
513
437
|
});
|
|
514
438
|
return p.useEffect(() => {
|
|
515
|
-
if (
|
|
516
|
-
const u = window.setTimeout(() =>
|
|
439
|
+
if (d === "idle") {
|
|
440
|
+
const u = window.setTimeout(() => c("HIDE"), n.scrollHideDelay);
|
|
517
441
|
return () => window.clearTimeout(u);
|
|
518
442
|
}
|
|
519
|
-
}, [
|
|
443
|
+
}, [d, n.scrollHideDelay, c]), p.useEffect(() => {
|
|
520
444
|
const u = n.viewport, f = s ? "scrollLeft" : "scrollTop";
|
|
521
445
|
if (u) {
|
|
522
446
|
let h = u[f];
|
|
523
447
|
const g = () => {
|
|
524
448
|
const a = u[f];
|
|
525
|
-
h !== a && (
|
|
449
|
+
h !== a && (c("SCROLL"), i()), h = a;
|
|
526
450
|
};
|
|
527
451
|
return u.addEventListener("scroll", g), () => u.removeEventListener("scroll", g);
|
|
528
452
|
}
|
|
529
|
-
}, [n.viewport, s,
|
|
530
|
-
|
|
453
|
+
}, [n.viewport, s, c, i]), /* @__PURE__ */ l(ze, { present: r || d !== "hidden", children: /* @__PURE__ */ l(
|
|
454
|
+
nt,
|
|
531
455
|
{
|
|
532
|
-
"data-state":
|
|
533
|
-
...
|
|
456
|
+
"data-state": d === "hidden" ? "hidden" : "visible",
|
|
457
|
+
...o,
|
|
534
458
|
ref: t,
|
|
535
|
-
onPointerEnter: W(e.onPointerEnter, () =>
|
|
536
|
-
onPointerLeave: W(e.onPointerLeave, () =>
|
|
459
|
+
onPointerEnter: W(e.onPointerEnter, () => c("POINTER_ENTER")),
|
|
460
|
+
onPointerLeave: W(e.onPointerLeave, () => c("POINTER_LEAVE"))
|
|
537
461
|
}
|
|
538
462
|
) });
|
|
539
|
-
}),
|
|
540
|
-
const
|
|
541
|
-
if (
|
|
542
|
-
const u =
|
|
543
|
-
i(
|
|
463
|
+
}), Yt = p.forwardRef((e, t) => {
|
|
464
|
+
const r = K(re, e.__scopeScrollArea), { forceMount: o, ...n } = e, [s, i] = p.useState(!1), d = e.orientation === "horizontal", c = Fe(() => {
|
|
465
|
+
if (r.viewport) {
|
|
466
|
+
const u = r.viewport.offsetWidth < r.viewport.scrollWidth, f = r.viewport.offsetHeight < r.viewport.scrollHeight;
|
|
467
|
+
i(d ? u : f);
|
|
544
468
|
}
|
|
545
469
|
}, 10);
|
|
546
|
-
return
|
|
547
|
-
|
|
470
|
+
return be(r.viewport, c), be(r.content, c), /* @__PURE__ */ l(ze, { present: o || s, children: /* @__PURE__ */ l(
|
|
471
|
+
nt,
|
|
548
472
|
{
|
|
549
473
|
"data-state": s ? "visible" : "hidden",
|
|
550
474
|
...n,
|
|
551
475
|
ref: t
|
|
552
476
|
}
|
|
553
477
|
) });
|
|
554
|
-
}),
|
|
555
|
-
const { orientation:
|
|
478
|
+
}), nt = p.forwardRef((e, t) => {
|
|
479
|
+
const { orientation: r = "vertical", ...o } = e, n = K(re, e.__scopeScrollArea), s = p.useRef(null), i = p.useRef(0), [d, c] = p.useState({
|
|
556
480
|
content: 0,
|
|
557
481
|
viewport: 0,
|
|
558
482
|
scrollbar: { size: 0, paddingStart: 0, paddingEnd: 0 }
|
|
559
|
-
}), u =
|
|
560
|
-
...
|
|
561
|
-
sizes:
|
|
562
|
-
onSizesChange:
|
|
483
|
+
}), u = Zt(d.viewport, d.content), f = {
|
|
484
|
+
...o,
|
|
485
|
+
sizes: d,
|
|
486
|
+
onSizesChange: c,
|
|
563
487
|
hasThumb: u > 0 && u < 1,
|
|
564
488
|
onThumbChange: (g) => s.current = g,
|
|
565
489
|
onThumbPointerUp: () => i.current = 0,
|
|
566
490
|
onThumbPointerDown: (g) => i.current = g
|
|
567
491
|
};
|
|
568
492
|
function h(g, a) {
|
|
569
|
-
return
|
|
493
|
+
return Do(g, i.current, d, a);
|
|
570
494
|
}
|
|
571
|
-
return
|
|
572
|
-
|
|
495
|
+
return r === "horizontal" ? /* @__PURE__ */ l(
|
|
496
|
+
Ro,
|
|
573
497
|
{
|
|
574
498
|
...f,
|
|
575
499
|
ref: t,
|
|
576
500
|
onThumbPositionChange: () => {
|
|
577
501
|
if (n.viewport && s.current) {
|
|
578
|
-
const g = n.viewport.scrollLeft, a =
|
|
502
|
+
const g = n.viewport.scrollLeft, a = bt(g, d, n.dir);
|
|
579
503
|
s.current.style.transform = `translate3d(${a}px, 0, 0)`;
|
|
580
504
|
}
|
|
581
505
|
},
|
|
@@ -586,14 +510,14 @@ var Cr = p.forwardRef((e, t) => {
|
|
|
586
510
|
n.viewport && (n.viewport.scrollLeft = h(g, n.dir));
|
|
587
511
|
}
|
|
588
512
|
}
|
|
589
|
-
) :
|
|
590
|
-
|
|
513
|
+
) : r === "vertical" ? /* @__PURE__ */ l(
|
|
514
|
+
Po,
|
|
591
515
|
{
|
|
592
516
|
...f,
|
|
593
517
|
ref: t,
|
|
594
518
|
onThumbPositionChange: () => {
|
|
595
519
|
if (n.viewport && s.current) {
|
|
596
|
-
const g = n.viewport.scrollTop, a =
|
|
520
|
+
const g = n.viewport.scrollTop, a = bt(g, d);
|
|
597
521
|
s.current.style.transform = `translate3d(0, ${a}px, 0)`;
|
|
598
522
|
}
|
|
599
523
|
},
|
|
@@ -605,22 +529,22 @@ var Cr = p.forwardRef((e, t) => {
|
|
|
605
529
|
}
|
|
606
530
|
}
|
|
607
531
|
) : null;
|
|
608
|
-
}),
|
|
609
|
-
const { sizes:
|
|
532
|
+
}), Ro = p.forwardRef((e, t) => {
|
|
533
|
+
const { sizes: r, onSizesChange: o, ...n } = e, s = K(re, e.__scopeScrollArea), [i, d] = p.useState(), c = p.useRef(null), u = oe(t, c, s.onScrollbarXChange);
|
|
610
534
|
return p.useEffect(() => {
|
|
611
|
-
|
|
612
|
-
}, [
|
|
613
|
-
|
|
535
|
+
c.current && d(getComputedStyle(c.current));
|
|
536
|
+
}, [c]), /* @__PURE__ */ l(
|
|
537
|
+
Xt,
|
|
614
538
|
{
|
|
615
539
|
"data-orientation": "horizontal",
|
|
616
540
|
...n,
|
|
617
541
|
ref: u,
|
|
618
|
-
sizes:
|
|
542
|
+
sizes: r,
|
|
619
543
|
style: {
|
|
620
544
|
bottom: 0,
|
|
621
545
|
left: s.dir === "rtl" ? "var(--radix-scroll-area-corner-width)" : 0,
|
|
622
546
|
right: s.dir === "ltr" ? "var(--radix-scroll-area-corner-width)" : 0,
|
|
623
|
-
"--radix-scroll-area-thumb-width": Be(
|
|
547
|
+
"--radix-scroll-area-thumb-width": Be(r) + "px",
|
|
624
548
|
...e.style
|
|
625
549
|
},
|
|
626
550
|
onThumbPointerDown: (f) => e.onThumbPointerDown(f.x),
|
|
@@ -628,39 +552,39 @@ var Cr = p.forwardRef((e, t) => {
|
|
|
628
552
|
onWheelScroll: (f, h) => {
|
|
629
553
|
if (s.viewport) {
|
|
630
554
|
const g = s.viewport.scrollLeft + f.deltaX;
|
|
631
|
-
e.onWheelScroll(g),
|
|
555
|
+
e.onWheelScroll(g), Jt(g, h) && f.preventDefault();
|
|
632
556
|
}
|
|
633
557
|
},
|
|
634
558
|
onResize: () => {
|
|
635
|
-
|
|
559
|
+
c.current && s.viewport && i && o({
|
|
636
560
|
content: s.viewport.scrollWidth,
|
|
637
561
|
viewport: s.viewport.offsetWidth,
|
|
638
562
|
scrollbar: {
|
|
639
|
-
size:
|
|
640
|
-
paddingStart:
|
|
641
|
-
paddingEnd:
|
|
563
|
+
size: c.current.clientWidth,
|
|
564
|
+
paddingStart: Me(i.paddingLeft),
|
|
565
|
+
paddingEnd: Me(i.paddingRight)
|
|
642
566
|
}
|
|
643
567
|
});
|
|
644
568
|
}
|
|
645
569
|
}
|
|
646
570
|
);
|
|
647
|
-
}),
|
|
648
|
-
const { sizes:
|
|
571
|
+
}), Po = p.forwardRef((e, t) => {
|
|
572
|
+
const { sizes: r, onSizesChange: o, ...n } = e, s = K(re, e.__scopeScrollArea), [i, d] = p.useState(), c = p.useRef(null), u = oe(t, c, s.onScrollbarYChange);
|
|
649
573
|
return p.useEffect(() => {
|
|
650
|
-
|
|
651
|
-
}, [
|
|
652
|
-
|
|
574
|
+
c.current && d(getComputedStyle(c.current));
|
|
575
|
+
}, [c]), /* @__PURE__ */ l(
|
|
576
|
+
Xt,
|
|
653
577
|
{
|
|
654
578
|
"data-orientation": "vertical",
|
|
655
579
|
...n,
|
|
656
580
|
ref: u,
|
|
657
|
-
sizes:
|
|
581
|
+
sizes: r,
|
|
658
582
|
style: {
|
|
659
583
|
top: 0,
|
|
660
584
|
right: s.dir === "ltr" ? 0 : void 0,
|
|
661
585
|
left: s.dir === "rtl" ? 0 : void 0,
|
|
662
586
|
bottom: "var(--radix-scroll-area-corner-height)",
|
|
663
|
-
"--radix-scroll-area-thumb-height": Be(
|
|
587
|
+
"--radix-scroll-area-thumb-height": Be(r) + "px",
|
|
664
588
|
...e.style
|
|
665
589
|
},
|
|
666
590
|
onThumbPointerDown: (f) => e.onThumbPointerDown(f.y),
|
|
@@ -668,84 +592,84 @@ var Cr = p.forwardRef((e, t) => {
|
|
|
668
592
|
onWheelScroll: (f, h) => {
|
|
669
593
|
if (s.viewport) {
|
|
670
594
|
const g = s.viewport.scrollTop + f.deltaY;
|
|
671
|
-
e.onWheelScroll(g),
|
|
595
|
+
e.onWheelScroll(g), Jt(g, h) && f.preventDefault();
|
|
672
596
|
}
|
|
673
597
|
},
|
|
674
598
|
onResize: () => {
|
|
675
|
-
|
|
599
|
+
c.current && s.viewport && i && o({
|
|
676
600
|
content: s.viewport.scrollHeight,
|
|
677
601
|
viewport: s.viewport.offsetHeight,
|
|
678
602
|
scrollbar: {
|
|
679
|
-
size:
|
|
680
|
-
paddingStart:
|
|
681
|
-
paddingEnd:
|
|
603
|
+
size: c.current.clientHeight,
|
|
604
|
+
paddingStart: Me(i.paddingTop),
|
|
605
|
+
paddingEnd: Me(i.paddingBottom)
|
|
682
606
|
}
|
|
683
607
|
});
|
|
684
608
|
}
|
|
685
609
|
}
|
|
686
610
|
);
|
|
687
|
-
}), [
|
|
611
|
+
}), [ko, Ut] = $t(re), Xt = p.forwardRef((e, t) => {
|
|
688
612
|
const {
|
|
689
|
-
__scopeScrollArea:
|
|
690
|
-
sizes:
|
|
613
|
+
__scopeScrollArea: r,
|
|
614
|
+
sizes: o,
|
|
691
615
|
hasThumb: n,
|
|
692
616
|
onThumbChange: s,
|
|
693
617
|
onThumbPointerUp: i,
|
|
694
|
-
onThumbPointerDown:
|
|
695
|
-
onThumbPositionChange:
|
|
618
|
+
onThumbPointerDown: d,
|
|
619
|
+
onThumbPositionChange: c,
|
|
696
620
|
onDragScroll: u,
|
|
697
621
|
onWheelScroll: f,
|
|
698
622
|
onResize: h,
|
|
699
623
|
...g
|
|
700
|
-
} = e, a = K(
|
|
701
|
-
function D(
|
|
702
|
-
if (
|
|
703
|
-
const
|
|
704
|
-
u({ x:
|
|
624
|
+
} = e, a = K(re, r), [N, v] = p.useState(null), b = oe(t, (k) => v(k)), E = p.useRef(null), C = p.useRef(""), x = a.viewport, T = o.content - o.viewport, O = ie(f), R = ie(c), A = Fe(h, 10);
|
|
625
|
+
function D(k) {
|
|
626
|
+
if (E.current) {
|
|
627
|
+
const B = k.clientX - E.current.left, H = k.clientY - E.current.top;
|
|
628
|
+
u({ x: B, y: H });
|
|
705
629
|
}
|
|
706
630
|
}
|
|
707
631
|
return p.useEffect(() => {
|
|
708
|
-
const
|
|
709
|
-
const
|
|
710
|
-
(N == null ? void 0 : N.contains(
|
|
632
|
+
const k = (B) => {
|
|
633
|
+
const H = B.target;
|
|
634
|
+
(N == null ? void 0 : N.contains(H)) && O(B, T);
|
|
711
635
|
};
|
|
712
|
-
return document.addEventListener("wheel",
|
|
713
|
-
}, [
|
|
714
|
-
|
|
636
|
+
return document.addEventListener("wheel", k, { passive: !1 }), () => document.removeEventListener("wheel", k, { passive: !1 });
|
|
637
|
+
}, [x, N, T, O]), p.useEffect(R, [o, R]), be(N, A), be(a.content, A), /* @__PURE__ */ l(
|
|
638
|
+
ko,
|
|
715
639
|
{
|
|
716
|
-
scope:
|
|
640
|
+
scope: r,
|
|
717
641
|
scrollbar: N,
|
|
718
642
|
hasThumb: n,
|
|
719
|
-
onThumbChange:
|
|
720
|
-
onThumbPointerUp:
|
|
643
|
+
onThumbChange: ie(s),
|
|
644
|
+
onThumbPointerUp: ie(i),
|
|
721
645
|
onThumbPositionChange: R,
|
|
722
|
-
onThumbPointerDown:
|
|
646
|
+
onThumbPointerDown: ie(d),
|
|
723
647
|
children: /* @__PURE__ */ l(
|
|
724
648
|
te.div,
|
|
725
649
|
{
|
|
726
650
|
...g,
|
|
727
651
|
ref: b,
|
|
728
652
|
style: { position: "absolute", ...g.style },
|
|
729
|
-
onPointerDown: W(e.onPointerDown, (
|
|
730
|
-
|
|
653
|
+
onPointerDown: W(e.onPointerDown, (k) => {
|
|
654
|
+
k.button === 0 && (k.target.setPointerCapture(k.pointerId), E.current = N.getBoundingClientRect(), C.current = document.body.style.webkitUserSelect, document.body.style.webkitUserSelect = "none", a.viewport && (a.viewport.style.scrollBehavior = "auto"), D(k));
|
|
731
655
|
}),
|
|
732
656
|
onPointerMove: W(e.onPointerMove, D),
|
|
733
|
-
onPointerUp: W(e.onPointerUp, (
|
|
734
|
-
const
|
|
735
|
-
|
|
657
|
+
onPointerUp: W(e.onPointerUp, (k) => {
|
|
658
|
+
const B = k.target;
|
|
659
|
+
B.hasPointerCapture(k.pointerId) && B.releasePointerCapture(k.pointerId), document.body.style.webkitUserSelect = C.current, a.viewport && (a.viewport.style.scrollBehavior = ""), E.current = null;
|
|
736
660
|
})
|
|
737
661
|
}
|
|
738
662
|
)
|
|
739
663
|
}
|
|
740
664
|
);
|
|
741
|
-
}),
|
|
665
|
+
}), De = "ScrollAreaThumb", Kt = p.forwardRef(
|
|
742
666
|
(e, t) => {
|
|
743
|
-
const { forceMount:
|
|
744
|
-
return /* @__PURE__ */ l(
|
|
667
|
+
const { forceMount: r, ...o } = e, n = Ut(De, e.__scopeScrollArea);
|
|
668
|
+
return /* @__PURE__ */ l(ze, { present: r || n.hasThumb, children: /* @__PURE__ */ l(Io, { ref: t, ...o }) });
|
|
745
669
|
}
|
|
746
|
-
),
|
|
670
|
+
), Io = p.forwardRef(
|
|
747
671
|
(e, t) => {
|
|
748
|
-
const { __scopeScrollArea:
|
|
672
|
+
const { __scopeScrollArea: r, style: o, ...n } = e, s = K(De, r), i = Ut(De, r), { onThumbPositionChange: d } = i, c = oe(
|
|
749
673
|
t,
|
|
750
674
|
(h) => i.onThumbChange(h)
|
|
751
675
|
), u = p.useRef(void 0), f = Fe(() => {
|
|
@@ -756,22 +680,22 @@ var Cr = p.forwardRef((e, t) => {
|
|
|
756
680
|
if (h) {
|
|
757
681
|
const g = () => {
|
|
758
682
|
if (f(), !u.current) {
|
|
759
|
-
const a =
|
|
760
|
-
u.current = a,
|
|
683
|
+
const a = Mo(h, d);
|
|
684
|
+
u.current = a, d();
|
|
761
685
|
}
|
|
762
686
|
};
|
|
763
|
-
return
|
|
687
|
+
return d(), h.addEventListener("scroll", g), () => h.removeEventListener("scroll", g);
|
|
764
688
|
}
|
|
765
|
-
}, [s.viewport, f,
|
|
689
|
+
}, [s.viewport, f, d]), /* @__PURE__ */ l(
|
|
766
690
|
te.div,
|
|
767
691
|
{
|
|
768
692
|
"data-state": i.hasThumb ? "visible" : "hidden",
|
|
769
693
|
...n,
|
|
770
|
-
ref:
|
|
694
|
+
ref: c,
|
|
771
695
|
style: {
|
|
772
696
|
width: "var(--radix-scroll-area-thumb-width)",
|
|
773
697
|
height: "var(--radix-scroll-area-thumb-height)",
|
|
774
|
-
...
|
|
698
|
+
...o
|
|
775
699
|
},
|
|
776
700
|
onPointerDownCapture: W(e.onPointerDownCapture, (h) => {
|
|
777
701
|
const a = h.target.getBoundingClientRect(), N = h.clientX - a.left, v = h.clientY - a.top;
|
|
@@ -782,32 +706,32 @@ var Cr = p.forwardRef((e, t) => {
|
|
|
782
706
|
);
|
|
783
707
|
}
|
|
784
708
|
);
|
|
785
|
-
|
|
786
|
-
var
|
|
709
|
+
Kt.displayName = De;
|
|
710
|
+
var at = "ScrollAreaCorner", qt = p.forwardRef(
|
|
787
711
|
(e, t) => {
|
|
788
|
-
const
|
|
789
|
-
return
|
|
712
|
+
const r = K(at, e.__scopeScrollArea), o = !!(r.scrollbarX && r.scrollbarY);
|
|
713
|
+
return r.type !== "scroll" && o ? /* @__PURE__ */ l(Ao, { ...e, ref: t }) : null;
|
|
790
714
|
}
|
|
791
715
|
);
|
|
792
|
-
|
|
793
|
-
var
|
|
794
|
-
const { __scopeScrollArea:
|
|
795
|
-
return
|
|
716
|
+
qt.displayName = at;
|
|
717
|
+
var Ao = p.forwardRef((e, t) => {
|
|
718
|
+
const { __scopeScrollArea: r, ...o } = e, n = K(at, r), [s, i] = p.useState(0), [d, c] = p.useState(0), u = !!(s && d);
|
|
719
|
+
return be(n.scrollbarX, () => {
|
|
796
720
|
var h;
|
|
797
721
|
const f = ((h = n.scrollbarX) == null ? void 0 : h.offsetHeight) || 0;
|
|
798
|
-
n.onCornerHeightChange(f),
|
|
799
|
-
}),
|
|
722
|
+
n.onCornerHeightChange(f), c(f);
|
|
723
|
+
}), be(n.scrollbarY, () => {
|
|
800
724
|
var h;
|
|
801
725
|
const f = ((h = n.scrollbarY) == null ? void 0 : h.offsetWidth) || 0;
|
|
802
726
|
n.onCornerWidthChange(f), i(f);
|
|
803
727
|
}), u ? /* @__PURE__ */ l(
|
|
804
728
|
te.div,
|
|
805
729
|
{
|
|
806
|
-
...
|
|
730
|
+
...o,
|
|
807
731
|
ref: t,
|
|
808
732
|
style: {
|
|
809
733
|
width: s,
|
|
810
|
-
height:
|
|
734
|
+
height: d,
|
|
811
735
|
position: "absolute",
|
|
812
736
|
right: n.dir === "ltr" ? 0 : void 0,
|
|
813
737
|
left: n.dir === "rtl" ? 0 : void 0,
|
|
@@ -817,101 +741,101 @@ var kr = p.forwardRef((e, t) => {
|
|
|
817
741
|
}
|
|
818
742
|
) : null;
|
|
819
743
|
});
|
|
820
|
-
function
|
|
744
|
+
function Me(e) {
|
|
821
745
|
return e ? parseInt(e, 10) : 0;
|
|
822
746
|
}
|
|
823
|
-
function
|
|
824
|
-
const
|
|
825
|
-
return isNaN(
|
|
747
|
+
function Zt(e, t) {
|
|
748
|
+
const r = e / t;
|
|
749
|
+
return isNaN(r) ? 0 : r;
|
|
826
750
|
}
|
|
827
751
|
function Be(e) {
|
|
828
|
-
const t =
|
|
829
|
-
return Math.max(
|
|
752
|
+
const t = Zt(e.viewport, e.content), r = e.scrollbar.paddingStart + e.scrollbar.paddingEnd, o = (e.scrollbar.size - r) * t;
|
|
753
|
+
return Math.max(o, 18);
|
|
830
754
|
}
|
|
831
|
-
function
|
|
832
|
-
const n = Be(
|
|
833
|
-
return
|
|
755
|
+
function Do(e, t, r, o = "ltr") {
|
|
756
|
+
const n = Be(r), s = n / 2, i = t || s, d = n - i, c = r.scrollbar.paddingStart + i, u = r.scrollbar.size - r.scrollbar.paddingEnd - d, f = r.content - r.viewport, h = o === "ltr" ? [0, f] : [f * -1, 0];
|
|
757
|
+
return Qt([c, u], h)(e);
|
|
834
758
|
}
|
|
835
|
-
function
|
|
836
|
-
const
|
|
837
|
-
return
|
|
759
|
+
function bt(e, t, r = "ltr") {
|
|
760
|
+
const o = Be(t), n = t.scrollbar.paddingStart + t.scrollbar.paddingEnd, s = t.scrollbar.size - n, i = t.content - t.viewport, d = s - o, c = r === "ltr" ? [0, i] : [i * -1, 0], u = So(e, c);
|
|
761
|
+
return Qt([0, i], [0, d])(u);
|
|
838
762
|
}
|
|
839
|
-
function
|
|
840
|
-
return (
|
|
763
|
+
function Qt(e, t) {
|
|
764
|
+
return (r) => {
|
|
841
765
|
if (e[0] === e[1] || t[0] === t[1]) return t[0];
|
|
842
|
-
const
|
|
843
|
-
return t[0] +
|
|
766
|
+
const o = (t[1] - t[0]) / (e[1] - e[0]);
|
|
767
|
+
return t[0] + o * (r - e[0]);
|
|
844
768
|
};
|
|
845
769
|
}
|
|
846
|
-
function
|
|
770
|
+
function Jt(e, t) {
|
|
847
771
|
return e > 0 && e < t;
|
|
848
772
|
}
|
|
849
|
-
var
|
|
773
|
+
var Mo = (e, t = () => {
|
|
850
774
|
}) => {
|
|
851
|
-
let
|
|
775
|
+
let r = { left: e.scrollLeft, top: e.scrollTop }, o = 0;
|
|
852
776
|
return function n() {
|
|
853
|
-
const s = { left: e.scrollLeft, top: e.scrollTop }, i =
|
|
854
|
-
(i ||
|
|
855
|
-
}(), () => window.cancelAnimationFrame(
|
|
777
|
+
const s = { left: e.scrollLeft, top: e.scrollTop }, i = r.left !== s.left, d = r.top !== s.top;
|
|
778
|
+
(i || d) && t(), r = s, o = window.requestAnimationFrame(n);
|
|
779
|
+
}(), () => window.cancelAnimationFrame(o);
|
|
856
780
|
};
|
|
857
781
|
function Fe(e, t) {
|
|
858
|
-
const
|
|
859
|
-
return p.useEffect(() => () => window.clearTimeout(
|
|
860
|
-
window.clearTimeout(
|
|
861
|
-
}, [
|
|
782
|
+
const r = ie(e), o = p.useRef(0);
|
|
783
|
+
return p.useEffect(() => () => window.clearTimeout(o.current), []), p.useCallback(() => {
|
|
784
|
+
window.clearTimeout(o.current), o.current = window.setTimeout(r, t);
|
|
785
|
+
}, [r, t]);
|
|
862
786
|
}
|
|
863
|
-
function
|
|
864
|
-
const
|
|
865
|
-
|
|
866
|
-
let
|
|
787
|
+
function be(e, t) {
|
|
788
|
+
const r = ie(t);
|
|
789
|
+
jr(() => {
|
|
790
|
+
let o = 0;
|
|
867
791
|
if (e) {
|
|
868
792
|
const n = new ResizeObserver(() => {
|
|
869
|
-
cancelAnimationFrame(
|
|
793
|
+
cancelAnimationFrame(o), o = window.requestAnimationFrame(r);
|
|
870
794
|
});
|
|
871
795
|
return n.observe(e), () => {
|
|
872
|
-
window.cancelAnimationFrame(
|
|
796
|
+
window.cancelAnimationFrame(o), n.unobserve(e);
|
|
873
797
|
};
|
|
874
798
|
}
|
|
875
|
-
}, [e,
|
|
799
|
+
}, [e, r]);
|
|
876
800
|
}
|
|
877
|
-
var
|
|
878
|
-
const
|
|
879
|
-
/* @__PURE__ */ l(
|
|
880
|
-
/* @__PURE__ */ l(
|
|
881
|
-
/* @__PURE__ */ l(
|
|
801
|
+
var er = jt, _o = Wt, Lo = qt;
|
|
802
|
+
const st = p.forwardRef(({ className: e, children: t, ...r }, o) => /* @__PURE__ */ F(er, { ref: o, className: Ne("relative overflow-hidden", e), ...r, children: [
|
|
803
|
+
/* @__PURE__ */ l(_o, { className: "h-full w-full rounded-[inherit]", children: t }),
|
|
804
|
+
/* @__PURE__ */ l(tr, {}),
|
|
805
|
+
/* @__PURE__ */ l(Lo, {})
|
|
882
806
|
] }));
|
|
883
|
-
|
|
884
|
-
const
|
|
885
|
-
|
|
807
|
+
st.displayName = er.displayName;
|
|
808
|
+
const tr = p.forwardRef(({ className: e, orientation: t = "vertical", ...r }, o) => /* @__PURE__ */ l(
|
|
809
|
+
ot,
|
|
886
810
|
{
|
|
887
|
-
ref:
|
|
811
|
+
ref: o,
|
|
888
812
|
orientation: t,
|
|
889
|
-
className:
|
|
813
|
+
className: Ne(
|
|
890
814
|
"flex touch-none select-none transition-colors",
|
|
891
815
|
t === "vertical" && "h-full w-2.5 border-l border-l-transparent p-[1px]",
|
|
892
816
|
t === "horizontal" && "h-2.5 flex-col border-t border-t-transparent p-[1px]",
|
|
893
817
|
e
|
|
894
818
|
),
|
|
895
|
-
...
|
|
896
|
-
children: /* @__PURE__ */ l(
|
|
819
|
+
...r,
|
|
820
|
+
children: /* @__PURE__ */ l(Kt, { className: "relative flex-1 rounded-full bg-border" })
|
|
897
821
|
}
|
|
898
822
|
));
|
|
899
|
-
|
|
900
|
-
const
|
|
901
|
-
const { selected: e, actions: t } =
|
|
902
|
-
var s, i,
|
|
903
|
-
const
|
|
823
|
+
tr.displayName = ot.displayName;
|
|
824
|
+
const zo = () => {
|
|
825
|
+
const { selected: e, actions: t } = ye((r) => {
|
|
826
|
+
var s, i, d, c, u, f, h;
|
|
827
|
+
const o = r.events.selected ? Array.from(r.events.selected)[0] : null;
|
|
904
828
|
let n;
|
|
905
|
-
return
|
|
906
|
-
id:
|
|
907
|
-
name: ((i = (s =
|
|
908
|
-
settings: (f = (u =
|
|
909
|
-
isDeletable: ((h =
|
|
829
|
+
return o && (n = {
|
|
830
|
+
id: o,
|
|
831
|
+
name: ((i = (s = r.nodes[o]) == null ? void 0 : s.data) == null ? void 0 : i.displayName) || ((c = (d = r.nodes[o]) == null ? void 0 : d.data) == null ? void 0 : c.name),
|
|
832
|
+
settings: (f = (u = r.nodes[o]) == null ? void 0 : u.related) == null ? void 0 : f.settings,
|
|
833
|
+
isDeletable: ((h = r.nodes[o]) == null ? void 0 : h.id) !== "ROOT"
|
|
910
834
|
}), { selected: n };
|
|
911
835
|
});
|
|
912
|
-
return /* @__PURE__ */ l("div", { className: "h-full flex flex-col", children: e ? /* @__PURE__ */
|
|
913
|
-
/* @__PURE__ */
|
|
914
|
-
/* @__PURE__ */
|
|
836
|
+
return /* @__PURE__ */ l("div", { className: "h-full flex flex-col", children: e ? /* @__PURE__ */ F(Ct, { children: [
|
|
837
|
+
/* @__PURE__ */ F("div", { className: "flex items-center justify-between pb-3 border-b border-border mb-3", children: [
|
|
838
|
+
/* @__PURE__ */ F("div", { children: [
|
|
915
839
|
/* @__PURE__ */ l("span", { className: "text-xs text-muted-foreground", children: "Selected" }),
|
|
916
840
|
/* @__PURE__ */ l("h3", { className: "text-sm font-semibold", children: e.name })
|
|
917
841
|
] }),
|
|
@@ -921,123 +845,123 @@ const _r = () => {
|
|
|
921
845
|
onClick: () => t.delete(e.id),
|
|
922
846
|
className: "p-1.5 rounded hover:bg-destructive/10 text-destructive transition-colors",
|
|
923
847
|
title: "Delete element",
|
|
924
|
-
children: /* @__PURE__ */ l(
|
|
848
|
+
children: /* @__PURE__ */ l(vo, { className: "h-4 w-4" })
|
|
925
849
|
}
|
|
926
850
|
)
|
|
927
851
|
] }),
|
|
928
|
-
/* @__PURE__ */ l(
|
|
852
|
+
/* @__PURE__ */ l(st, { className: "flex-1 -mr-4 pr-4", children: e.settings && m.createElement(e.settings) })
|
|
929
853
|
] }) : /* @__PURE__ */ l("div", { className: "text-center py-8", children: /* @__PURE__ */ l("p", { className: "text-sm text-muted-foreground", children: "Select an element to edit its properties" }) }) });
|
|
930
|
-
},
|
|
854
|
+
}, Oo = (e) => {
|
|
931
855
|
switch (e) {
|
|
932
856
|
case "Container":
|
|
933
|
-
return
|
|
857
|
+
return Ce;
|
|
934
858
|
case "Text":
|
|
935
|
-
return
|
|
859
|
+
return Vt;
|
|
936
860
|
case "Heading":
|
|
937
|
-
return
|
|
861
|
+
return zt;
|
|
938
862
|
case "Button":
|
|
939
|
-
return Vt;
|
|
940
|
-
case "Image":
|
|
941
863
|
return Ft;
|
|
864
|
+
case "Image":
|
|
865
|
+
return Ot;
|
|
942
866
|
case "Divider":
|
|
943
|
-
return
|
|
867
|
+
return Bt;
|
|
944
868
|
case "Spacer":
|
|
945
|
-
return
|
|
869
|
+
return Ht;
|
|
946
870
|
case "Video":
|
|
947
|
-
return
|
|
871
|
+
return yo;
|
|
948
872
|
case "Columns":
|
|
949
|
-
return
|
|
873
|
+
return mo;
|
|
950
874
|
case "Link":
|
|
951
|
-
return
|
|
875
|
+
return Tt;
|
|
952
876
|
default:
|
|
953
|
-
return
|
|
877
|
+
return Ce;
|
|
954
878
|
}
|
|
955
|
-
},
|
|
956
|
-
const { node: i, actions:
|
|
957
|
-
var
|
|
958
|
-
const
|
|
879
|
+
}, rr = ({ nodeId: e, depth: t = 0, onDragStart: r, onDragOver: o, onDrop: n, draggedId: s }) => {
|
|
880
|
+
const { node: i, actions: d, selectedNodeId: c, childNodes: u, parentId: f } = ye((S, de) => {
|
|
881
|
+
var ue, w;
|
|
882
|
+
const $ = S.nodes[e], ne = ((ue = $ == null ? void 0 : $.data) == null ? void 0 : ue.nodes) || [], V = S.events.selected ? Array.from(S.events.selected)[0] : null, q = (w = $ == null ? void 0 : $.data) == null ? void 0 : w.parent;
|
|
959
883
|
return {
|
|
960
|
-
node:
|
|
884
|
+
node: $,
|
|
961
885
|
childNodes: ne,
|
|
962
|
-
selectedNodeId:
|
|
886
|
+
selectedNodeId: V,
|
|
963
887
|
parentId: q
|
|
964
888
|
};
|
|
965
|
-
}), [h, g] =
|
|
889
|
+
}), [h, g] = Ee(!0), [a, N] = Ee(!1);
|
|
966
890
|
if (!i) return null;
|
|
967
|
-
const v = i.data.displayName || i.data.name || "Unknown", b = u.length > 0,
|
|
968
|
-
|
|
969
|
-
},
|
|
970
|
-
|
|
971
|
-
}, D = (
|
|
972
|
-
if (
|
|
973
|
-
|
|
891
|
+
const v = i.data.displayName || i.data.name || "Unknown", b = u.length > 0, E = c === e, C = e === "ROOT", x = Oo(v), T = s === e, O = i.data.isCanvas, R = (S) => {
|
|
892
|
+
S.stopPropagation(), C || d.selectNode(e);
|
|
893
|
+
}, A = (S) => {
|
|
894
|
+
S.stopPropagation(), g(!h);
|
|
895
|
+
}, D = (S) => {
|
|
896
|
+
if (C) {
|
|
897
|
+
S.preventDefault();
|
|
974
898
|
return;
|
|
975
899
|
}
|
|
976
|
-
|
|
977
|
-
},
|
|
978
|
-
|
|
979
|
-
},
|
|
980
|
-
|
|
981
|
-
},
|
|
982
|
-
|
|
900
|
+
S.stopPropagation(), r(e, f);
|
|
901
|
+
}, k = (S) => {
|
|
902
|
+
S.preventDefault(), S.stopPropagation(), s && s !== e && O && N(!0);
|
|
903
|
+
}, B = (S) => {
|
|
904
|
+
S.stopPropagation(), N(!1);
|
|
905
|
+
}, H = (S) => {
|
|
906
|
+
S.preventDefault(), S.stopPropagation(), N(!1), s && s !== e && n(e);
|
|
983
907
|
};
|
|
984
|
-
return /* @__PURE__ */
|
|
985
|
-
/* @__PURE__ */
|
|
908
|
+
return /* @__PURE__ */ F("div", { className: "select-none", children: [
|
|
909
|
+
/* @__PURE__ */ F(
|
|
986
910
|
"div",
|
|
987
911
|
{
|
|
988
|
-
className: `flex items-center gap-1 py-1 px-1 rounded cursor-pointer text-sm transition-colors ${
|
|
912
|
+
className: `flex items-center gap-1 py-1 px-1 rounded cursor-pointer text-sm transition-colors ${E ? "bg-primary/10 text-primary" : "hover:bg-secondary/50"} ${T ? "opacity-50" : ""} ${a ? "bg-primary/20 ring-1 ring-primary" : ""}`,
|
|
989
913
|
style: { paddingLeft: `${t * 12 + 4}px` },
|
|
990
914
|
onClick: R,
|
|
991
|
-
draggable: !
|
|
915
|
+
draggable: !C,
|
|
992
916
|
onDragStart: D,
|
|
993
|
-
onDragOver:
|
|
994
|
-
onDragLeave:
|
|
995
|
-
onDrop:
|
|
917
|
+
onDragOver: k,
|
|
918
|
+
onDragLeave: B,
|
|
919
|
+
onDrop: H,
|
|
996
920
|
children: [
|
|
997
|
-
!
|
|
998
|
-
b ? /* @__PURE__ */ l("button", { onClick:
|
|
999
|
-
/* @__PURE__ */ l(
|
|
1000
|
-
/* @__PURE__ */ l("span", { className: `truncate ${
|
|
921
|
+
!C && /* @__PURE__ */ l(po, { className: "h-3 w-3 text-muted-foreground/50 cursor-grab active:cursor-grabbing" }),
|
|
922
|
+
b ? /* @__PURE__ */ l("button", { onClick: A, className: "p-0.5 hover:bg-secondary rounded", children: h ? /* @__PURE__ */ l(Gr, { className: "h-3 w-3" }) : /* @__PURE__ */ l(Wr, { className: "h-3 w-3" }) }) : /* @__PURE__ */ l("span", { className: "w-4" }),
|
|
923
|
+
/* @__PURE__ */ l(x, { className: "h-3.5 w-3.5 text-muted-foreground shrink-0" }),
|
|
924
|
+
/* @__PURE__ */ l("span", { className: `truncate ${C ? "font-medium" : ""}`, children: C ? "Root" : v })
|
|
1001
925
|
]
|
|
1002
926
|
}
|
|
1003
927
|
),
|
|
1004
|
-
b && h && /* @__PURE__ */ l("div", { children: u.map((
|
|
1005
|
-
|
|
928
|
+
b && h && /* @__PURE__ */ l("div", { children: u.map((S) => /* @__PURE__ */ l(
|
|
929
|
+
rr,
|
|
1006
930
|
{
|
|
1007
|
-
nodeId:
|
|
931
|
+
nodeId: S,
|
|
1008
932
|
depth: t + 1,
|
|
1009
|
-
onDragStart:
|
|
1010
|
-
onDragOver:
|
|
933
|
+
onDragStart: r,
|
|
934
|
+
onDragOver: o,
|
|
1011
935
|
onDrop: n,
|
|
1012
936
|
draggedId: s
|
|
1013
937
|
},
|
|
1014
|
-
|
|
938
|
+
S
|
|
1015
939
|
)) })
|
|
1016
940
|
] });
|
|
1017
|
-
},
|
|
1018
|
-
const [e, t] =
|
|
941
|
+
}, Bo = () => {
|
|
942
|
+
const [e, t] = Ee(null), [r, o] = Ee(null), { nodeIds: n, actions: s } = ye((u) => ({
|
|
1019
943
|
nodeIds: Object.keys(u.nodes)
|
|
1020
944
|
})), i = (u, f) => {
|
|
1021
|
-
t(u),
|
|
1022
|
-
},
|
|
945
|
+
t(u), o(f);
|
|
946
|
+
}, d = (u) => {
|
|
1023
947
|
if (e && u && e !== u)
|
|
1024
948
|
try {
|
|
1025
949
|
s.move(e, u, 0);
|
|
1026
950
|
} catch (f) {
|
|
1027
951
|
console.log("Cannot move node:", f);
|
|
1028
952
|
}
|
|
1029
|
-
t(null),
|
|
953
|
+
t(null), o(null);
|
|
1030
954
|
};
|
|
1031
|
-
return /* @__PURE__ */
|
|
1032
|
-
t(null),
|
|
955
|
+
return /* @__PURE__ */ F("div", { className: "space-y-2", onDragEnd: () => {
|
|
956
|
+
t(null), o(null);
|
|
1033
957
|
}, children: [
|
|
1034
958
|
/* @__PURE__ */ l("h3", { className: "text-sm font-medium text-muted-foreground", children: "Layers" }),
|
|
1035
959
|
/* @__PURE__ */ l("div", { className: "border border-border rounded-lg p-2 max-h-[250px] overflow-y-auto bg-background", children: n.includes("ROOT") && /* @__PURE__ */ l(
|
|
1036
|
-
|
|
960
|
+
rr,
|
|
1037
961
|
{
|
|
1038
962
|
nodeId: "ROOT",
|
|
1039
963
|
onDragStart: i,
|
|
1040
|
-
onDrop:
|
|
964
|
+
onDrop: d,
|
|
1041
965
|
draggedId: e
|
|
1042
966
|
}
|
|
1043
967
|
) }),
|
|
@@ -1045,123 +969,123 @@ const _r = () => {
|
|
|
1045
969
|
] });
|
|
1046
970
|
};
|
|
1047
971
|
// @__NO_SIDE_EFFECTS__
|
|
1048
|
-
function
|
|
1049
|
-
const t = /* @__PURE__ */
|
|
1050
|
-
const { children: s, ...i } =
|
|
1051
|
-
if (
|
|
1052
|
-
const u =
|
|
972
|
+
function yt(e) {
|
|
973
|
+
const t = /* @__PURE__ */ Fo(e), r = p.forwardRef((o, n) => {
|
|
974
|
+
const { children: s, ...i } = o, d = p.Children.toArray(s), c = d.find(Vo);
|
|
975
|
+
if (c) {
|
|
976
|
+
const u = c.props.children, f = d.map((h) => h === c ? p.Children.count(u) > 1 ? p.Children.only(null) : p.isValidElement(u) ? u.props.children : null : h);
|
|
1053
977
|
return /* @__PURE__ */ l(t, { ...i, ref: n, children: p.isValidElement(u) ? p.cloneElement(u, void 0, f) : null });
|
|
1054
978
|
}
|
|
1055
979
|
return /* @__PURE__ */ l(t, { ...i, ref: n, children: s });
|
|
1056
980
|
});
|
|
1057
|
-
return
|
|
981
|
+
return r.displayName = `${e}.Slot`, r;
|
|
1058
982
|
}
|
|
1059
983
|
// @__NO_SIDE_EFFECTS__
|
|
1060
|
-
function
|
|
1061
|
-
const t = p.forwardRef((
|
|
1062
|
-
const { children: n, ...s } =
|
|
984
|
+
function Fo(e) {
|
|
985
|
+
const t = p.forwardRef((r, o) => {
|
|
986
|
+
const { children: n, ...s } = r;
|
|
1063
987
|
if (p.isValidElement(n)) {
|
|
1064
|
-
const i =
|
|
1065
|
-
return n.type !== p.Fragment && (
|
|
988
|
+
const i = jo(n), d = $o(s, n.props);
|
|
989
|
+
return n.type !== p.Fragment && (d.ref = o ? Yr(o, i) : i), p.cloneElement(n, d);
|
|
1066
990
|
}
|
|
1067
991
|
return p.Children.count(n) > 1 ? p.Children.only(null) : null;
|
|
1068
992
|
});
|
|
1069
993
|
return t.displayName = `${e}.SlotClone`, t;
|
|
1070
994
|
}
|
|
1071
|
-
var
|
|
1072
|
-
function
|
|
1073
|
-
return p.isValidElement(e) && typeof e.type == "function" && "__radixId" in e.type && e.type.__radixId ===
|
|
995
|
+
var Ho = Symbol("radix.slottable");
|
|
996
|
+
function Vo(e) {
|
|
997
|
+
return p.isValidElement(e) && typeof e.type == "function" && "__radixId" in e.type && e.type.__radixId === Ho;
|
|
1074
998
|
}
|
|
1075
|
-
function
|
|
1076
|
-
const
|
|
1077
|
-
for (const
|
|
1078
|
-
const n = e[
|
|
1079
|
-
/^on[A-Z]/.test(
|
|
1080
|
-
const
|
|
1081
|
-
return n(...
|
|
1082
|
-
} : n && (o
|
|
999
|
+
function $o(e, t) {
|
|
1000
|
+
const r = { ...t };
|
|
1001
|
+
for (const o in t) {
|
|
1002
|
+
const n = e[o], s = t[o];
|
|
1003
|
+
/^on[A-Z]/.test(o) ? n && s ? r[o] = (...d) => {
|
|
1004
|
+
const c = s(...d);
|
|
1005
|
+
return n(...d), c;
|
|
1006
|
+
} : n && (r[o] = n) : o === "style" ? r[o] = { ...n, ...s } : o === "className" && (r[o] = [n, s].filter(Boolean).join(" "));
|
|
1083
1007
|
}
|
|
1084
|
-
return { ...e, ...
|
|
1008
|
+
return { ...e, ...r };
|
|
1085
1009
|
}
|
|
1086
|
-
function
|
|
1087
|
-
var
|
|
1088
|
-
let t = (
|
|
1089
|
-
return
|
|
1010
|
+
function jo(e) {
|
|
1011
|
+
var o, n;
|
|
1012
|
+
let t = (o = Object.getOwnPropertyDescriptor(e.props, "ref")) == null ? void 0 : o.get, r = t && "isReactWarning" in t && t.isReactWarning;
|
|
1013
|
+
return r ? e.ref : (t = (n = Object.getOwnPropertyDescriptor(e, "ref")) == null ? void 0 : n.get, r = t && "isReactWarning" in t && t.isReactWarning, r ? e.props.ref : e.props.ref || e.ref);
|
|
1090
1014
|
}
|
|
1091
|
-
function
|
|
1092
|
-
const t = e + "CollectionProvider", [
|
|
1015
|
+
function Go(e) {
|
|
1016
|
+
const t = e + "CollectionProvider", [r, o] = Le(t), [n, s] = r(
|
|
1093
1017
|
t,
|
|
1094
1018
|
{ collectionRef: { current: null }, itemMap: /* @__PURE__ */ new Map() }
|
|
1095
1019
|
), i = (v) => {
|
|
1096
|
-
const { scope: b, children:
|
|
1097
|
-
return /* @__PURE__ */ l(n, { scope: b, itemMap:
|
|
1020
|
+
const { scope: b, children: E } = v, C = m.useRef(null), x = m.useRef(/* @__PURE__ */ new Map()).current;
|
|
1021
|
+
return /* @__PURE__ */ l(n, { scope: b, itemMap: x, collectionRef: C, children: E });
|
|
1098
1022
|
};
|
|
1099
1023
|
i.displayName = t;
|
|
1100
|
-
const
|
|
1024
|
+
const d = e + "CollectionSlot", c = /* @__PURE__ */ yt(d), u = m.forwardRef(
|
|
1101
1025
|
(v, b) => {
|
|
1102
|
-
const { scope:
|
|
1103
|
-
return /* @__PURE__ */ l(
|
|
1026
|
+
const { scope: E, children: C } = v, x = s(d, E), T = oe(b, x.collectionRef);
|
|
1027
|
+
return /* @__PURE__ */ l(c, { ref: T, children: C });
|
|
1104
1028
|
}
|
|
1105
1029
|
);
|
|
1106
|
-
u.displayName =
|
|
1107
|
-
const f = e + "CollectionItemSlot", h = "data-radix-collection-item", g = /* @__PURE__ */
|
|
1030
|
+
u.displayName = d;
|
|
1031
|
+
const f = e + "CollectionItemSlot", h = "data-radix-collection-item", g = /* @__PURE__ */ yt(f), a = m.forwardRef(
|
|
1108
1032
|
(v, b) => {
|
|
1109
|
-
const { scope:
|
|
1110
|
-
return m.useEffect(() => (R.itemMap.set(T, { ref: T, ...
|
|
1033
|
+
const { scope: E, children: C, ...x } = v, T = m.useRef(null), O = oe(b, T), R = s(f, E);
|
|
1034
|
+
return m.useEffect(() => (R.itemMap.set(T, { ref: T, ...x }), () => void R.itemMap.delete(T))), /* @__PURE__ */ l(g, { [h]: "", ref: O, children: C });
|
|
1111
1035
|
}
|
|
1112
1036
|
);
|
|
1113
1037
|
a.displayName = f;
|
|
1114
1038
|
function N(v) {
|
|
1115
1039
|
const b = s(e + "CollectionConsumer", v);
|
|
1116
1040
|
return m.useCallback(() => {
|
|
1117
|
-
const
|
|
1118
|
-
if (!
|
|
1119
|
-
const
|
|
1041
|
+
const C = b.collectionRef.current;
|
|
1042
|
+
if (!C) return [];
|
|
1043
|
+
const x = Array.from(C.querySelectorAll(`[${h}]`));
|
|
1120
1044
|
return Array.from(b.itemMap.values()).sort(
|
|
1121
|
-
(R,
|
|
1045
|
+
(R, A) => x.indexOf(R.ref.current) - x.indexOf(A.ref.current)
|
|
1122
1046
|
);
|
|
1123
1047
|
}, [b.collectionRef, b.itemMap]);
|
|
1124
1048
|
}
|
|
1125
1049
|
return [
|
|
1126
1050
|
{ Provider: i, Slot: u, ItemSlot: a },
|
|
1127
1051
|
N,
|
|
1128
|
-
|
|
1052
|
+
o
|
|
1129
1053
|
];
|
|
1130
1054
|
}
|
|
1131
|
-
var
|
|
1132
|
-
|
|
1133
|
-
[
|
|
1134
|
-
), [
|
|
1135
|
-
(e, t) => /* @__PURE__ */ l(
|
|
1055
|
+
var Ke = "rovingFocusGroup.onEntryFocus", Wo = { bubbles: !1, cancelable: !0 }, Te = "RovingFocusGroup", [qe, or, Yo] = Go(Te), [Uo, nr] = Le(
|
|
1056
|
+
Te,
|
|
1057
|
+
[Yo]
|
|
1058
|
+
), [Xo, Ko] = Uo(Te), ar = p.forwardRef(
|
|
1059
|
+
(e, t) => /* @__PURE__ */ l(qe.Provider, { scope: e.__scopeRovingFocusGroup, children: /* @__PURE__ */ l(qe.Slot, { scope: e.__scopeRovingFocusGroup, children: /* @__PURE__ */ l(qo, { ...e, ref: t }) }) })
|
|
1136
1060
|
);
|
|
1137
|
-
|
|
1138
|
-
var
|
|
1061
|
+
ar.displayName = Te;
|
|
1062
|
+
var qo = p.forwardRef((e, t) => {
|
|
1139
1063
|
const {
|
|
1140
|
-
__scopeRovingFocusGroup:
|
|
1141
|
-
orientation:
|
|
1064
|
+
__scopeRovingFocusGroup: r,
|
|
1065
|
+
orientation: o,
|
|
1142
1066
|
loop: n = !1,
|
|
1143
1067
|
dir: s,
|
|
1144
1068
|
currentTabStopId: i,
|
|
1145
|
-
defaultCurrentTabStopId:
|
|
1146
|
-
onCurrentTabStopIdChange:
|
|
1069
|
+
defaultCurrentTabStopId: d,
|
|
1070
|
+
onCurrentTabStopIdChange: c,
|
|
1147
1071
|
onEntryFocus: u,
|
|
1148
1072
|
preventScrollOnEntryFocus: f = !1,
|
|
1149
1073
|
...h
|
|
1150
|
-
} = e, g = p.useRef(null), a =
|
|
1074
|
+
} = e, g = p.useRef(null), a = oe(t, g), N = tt(s), [v, b] = Oe({
|
|
1151
1075
|
prop: i,
|
|
1152
|
-
defaultProp:
|
|
1153
|
-
onChange:
|
|
1154
|
-
caller:
|
|
1155
|
-
}), [
|
|
1076
|
+
defaultProp: d ?? null,
|
|
1077
|
+
onChange: c,
|
|
1078
|
+
caller: Te
|
|
1079
|
+
}), [E, C] = p.useState(!1), x = ie(u), T = or(r), O = p.useRef(!1), [R, A] = p.useState(0);
|
|
1156
1080
|
return p.useEffect(() => {
|
|
1157
1081
|
const D = g.current;
|
|
1158
1082
|
if (D)
|
|
1159
|
-
return D.addEventListener(
|
|
1160
|
-
}, [
|
|
1161
|
-
|
|
1083
|
+
return D.addEventListener(Ke, x), () => D.removeEventListener(Ke, x);
|
|
1084
|
+
}, [x]), /* @__PURE__ */ l(
|
|
1085
|
+
Xo,
|
|
1162
1086
|
{
|
|
1163
|
-
scope:
|
|
1164
|
-
orientation:
|
|
1087
|
+
scope: r,
|
|
1088
|
+
orientation: o,
|
|
1165
1089
|
dir: N,
|
|
1166
1090
|
loop: n,
|
|
1167
1091
|
currentTabStopId: v,
|
|
@@ -1169,73 +1093,73 @@ var Xr = p.forwardRef((e, t) => {
|
|
|
1169
1093
|
(D) => b(D),
|
|
1170
1094
|
[b]
|
|
1171
1095
|
),
|
|
1172
|
-
onItemShiftTab: p.useCallback(() =>
|
|
1096
|
+
onItemShiftTab: p.useCallback(() => C(!0), []),
|
|
1173
1097
|
onFocusableItemAdd: p.useCallback(
|
|
1174
|
-
() =>
|
|
1098
|
+
() => A((D) => D + 1),
|
|
1175
1099
|
[]
|
|
1176
1100
|
),
|
|
1177
1101
|
onFocusableItemRemove: p.useCallback(
|
|
1178
|
-
() =>
|
|
1102
|
+
() => A((D) => D - 1),
|
|
1179
1103
|
[]
|
|
1180
1104
|
),
|
|
1181
1105
|
children: /* @__PURE__ */ l(
|
|
1182
1106
|
te.div,
|
|
1183
1107
|
{
|
|
1184
|
-
tabIndex:
|
|
1185
|
-
"data-orientation":
|
|
1108
|
+
tabIndex: E || R === 0 ? -1 : 0,
|
|
1109
|
+
"data-orientation": o,
|
|
1186
1110
|
...h,
|
|
1187
1111
|
ref: a,
|
|
1188
1112
|
style: { outline: "none", ...e.style },
|
|
1189
1113
|
onMouseDown: W(e.onMouseDown, () => {
|
|
1190
|
-
|
|
1114
|
+
O.current = !0;
|
|
1191
1115
|
}),
|
|
1192
1116
|
onFocus: W(e.onFocus, (D) => {
|
|
1193
|
-
const
|
|
1194
|
-
if (D.target === D.currentTarget &&
|
|
1195
|
-
const
|
|
1196
|
-
if (D.currentTarget.dispatchEvent(
|
|
1197
|
-
const
|
|
1117
|
+
const k = !O.current;
|
|
1118
|
+
if (D.target === D.currentTarget && k && !E) {
|
|
1119
|
+
const B = new CustomEvent(Ke, Wo);
|
|
1120
|
+
if (D.currentTarget.dispatchEvent(B), !B.defaultPrevented) {
|
|
1121
|
+
const H = T().filter((V) => V.focusable), S = H.find((V) => V.active), de = H.find((V) => V.id === v), ne = [S, de, ...H].filter(
|
|
1198
1122
|
Boolean
|
|
1199
|
-
).map((
|
|
1200
|
-
|
|
1123
|
+
).map((V) => V.ref.current);
|
|
1124
|
+
ir(ne, f);
|
|
1201
1125
|
}
|
|
1202
1126
|
}
|
|
1203
|
-
|
|
1127
|
+
O.current = !1;
|
|
1204
1128
|
}),
|
|
1205
|
-
onBlur: W(e.onBlur, () =>
|
|
1129
|
+
onBlur: W(e.onBlur, () => C(!1))
|
|
1206
1130
|
}
|
|
1207
1131
|
)
|
|
1208
1132
|
}
|
|
1209
1133
|
);
|
|
1210
|
-
}),
|
|
1134
|
+
}), sr = "RovingFocusGroupItem", lr = p.forwardRef(
|
|
1211
1135
|
(e, t) => {
|
|
1212
1136
|
const {
|
|
1213
|
-
__scopeRovingFocusGroup:
|
|
1214
|
-
focusable:
|
|
1137
|
+
__scopeRovingFocusGroup: r,
|
|
1138
|
+
focusable: o = !0,
|
|
1215
1139
|
active: n = !1,
|
|
1216
1140
|
tabStopId: s,
|
|
1217
1141
|
children: i,
|
|
1218
|
-
...
|
|
1219
|
-
} = e,
|
|
1142
|
+
...d
|
|
1143
|
+
} = e, c = Ur(), u = s || c, f = Ko(sr, r), h = f.currentTabStopId === u, g = or(r), { onFocusableItemAdd: a, onFocusableItemRemove: N, currentTabStopId: v } = f;
|
|
1220
1144
|
return p.useEffect(() => {
|
|
1221
|
-
if (
|
|
1145
|
+
if (o)
|
|
1222
1146
|
return a(), () => N();
|
|
1223
|
-
}, [
|
|
1224
|
-
|
|
1147
|
+
}, [o, a, N]), /* @__PURE__ */ l(
|
|
1148
|
+
qe.ItemSlot,
|
|
1225
1149
|
{
|
|
1226
|
-
scope:
|
|
1150
|
+
scope: r,
|
|
1227
1151
|
id: u,
|
|
1228
|
-
focusable:
|
|
1152
|
+
focusable: o,
|
|
1229
1153
|
active: n,
|
|
1230
1154
|
children: /* @__PURE__ */ l(
|
|
1231
1155
|
te.span,
|
|
1232
1156
|
{
|
|
1233
1157
|
tabIndex: h ? 0 : -1,
|
|
1234
1158
|
"data-orientation": f.orientation,
|
|
1235
|
-
...
|
|
1159
|
+
...d,
|
|
1236
1160
|
ref: t,
|
|
1237
1161
|
onMouseDown: W(e.onMouseDown, (b) => {
|
|
1238
|
-
|
|
1162
|
+
o ? f.onItemFocus(u) : b.preventDefault();
|
|
1239
1163
|
}),
|
|
1240
1164
|
onFocus: W(e.onFocus, () => f.onItemFocus(u)),
|
|
1241
1165
|
onKeyDown: W(e.onKeyDown, (b) => {
|
|
@@ -1244,18 +1168,18 @@ var Xr = p.forwardRef((e, t) => {
|
|
|
1244
1168
|
return;
|
|
1245
1169
|
}
|
|
1246
1170
|
if (b.target !== b.currentTarget) return;
|
|
1247
|
-
const
|
|
1248
|
-
if (
|
|
1171
|
+
const E = Jo(b, f.orientation, f.dir);
|
|
1172
|
+
if (E !== void 0) {
|
|
1249
1173
|
if (b.metaKey || b.ctrlKey || b.altKey || b.shiftKey) return;
|
|
1250
1174
|
b.preventDefault();
|
|
1251
|
-
let
|
|
1252
|
-
if (
|
|
1253
|
-
else if (
|
|
1254
|
-
|
|
1255
|
-
const T =
|
|
1256
|
-
|
|
1175
|
+
let x = g().filter((T) => T.focusable).map((T) => T.ref.current);
|
|
1176
|
+
if (E === "last") x.reverse();
|
|
1177
|
+
else if (E === "prev" || E === "next") {
|
|
1178
|
+
E === "prev" && x.reverse();
|
|
1179
|
+
const T = x.indexOf(b.currentTarget);
|
|
1180
|
+
x = f.loop ? en(x, T + 1) : x.slice(T + 1);
|
|
1257
1181
|
}
|
|
1258
|
-
setTimeout(() =>
|
|
1182
|
+
setTimeout(() => ir(x));
|
|
1259
1183
|
}
|
|
1260
1184
|
}),
|
|
1261
1185
|
children: typeof i == "function" ? i({ isCurrentTabStop: h, hasTabStop: v != null }) : i
|
|
@@ -1265,8 +1189,8 @@ var Xr = p.forwardRef((e, t) => {
|
|
|
1265
1189
|
);
|
|
1266
1190
|
}
|
|
1267
1191
|
);
|
|
1268
|
-
|
|
1269
|
-
var
|
|
1192
|
+
lr.displayName = sr;
|
|
1193
|
+
var Zo = {
|
|
1270
1194
|
ArrowLeft: "prev",
|
|
1271
1195
|
ArrowUp: "prev",
|
|
1272
1196
|
ArrowRight: "next",
|
|
@@ -1276,28 +1200,28 @@ var Kr = {
|
|
|
1276
1200
|
PageDown: "last",
|
|
1277
1201
|
End: "last"
|
|
1278
1202
|
};
|
|
1279
|
-
function
|
|
1203
|
+
function Qo(e, t) {
|
|
1280
1204
|
return t !== "rtl" ? e : e === "ArrowLeft" ? "ArrowRight" : e === "ArrowRight" ? "ArrowLeft" : e;
|
|
1281
1205
|
}
|
|
1282
|
-
function
|
|
1283
|
-
const
|
|
1284
|
-
if (!(t === "vertical" && ["ArrowLeft", "ArrowRight"].includes(
|
|
1285
|
-
return
|
|
1206
|
+
function Jo(e, t, r) {
|
|
1207
|
+
const o = Qo(e.key, r);
|
|
1208
|
+
if (!(t === "vertical" && ["ArrowLeft", "ArrowRight"].includes(o)) && !(t === "horizontal" && ["ArrowUp", "ArrowDown"].includes(o)))
|
|
1209
|
+
return Zo[o];
|
|
1286
1210
|
}
|
|
1287
|
-
function
|
|
1288
|
-
const
|
|
1289
|
-
for (const
|
|
1290
|
-
if (
|
|
1211
|
+
function ir(e, t = !1) {
|
|
1212
|
+
const r = document.activeElement;
|
|
1213
|
+
for (const o of e)
|
|
1214
|
+
if (o === r || (o.focus({ preventScroll: t }), document.activeElement !== r)) return;
|
|
1291
1215
|
}
|
|
1292
|
-
function
|
|
1293
|
-
return e.map((
|
|
1216
|
+
function en(e, t) {
|
|
1217
|
+
return e.map((r, o) => e[(t + o) % e.length]);
|
|
1294
1218
|
}
|
|
1295
|
-
var
|
|
1296
|
-
const { pressed:
|
|
1297
|
-
prop:
|
|
1219
|
+
var tn = ar, rn = lr, cr = "Toggle", lt = p.forwardRef((e, t) => {
|
|
1220
|
+
const { pressed: r, defaultPressed: o, onPressedChange: n, ...s } = e, [i, d] = Oe({
|
|
1221
|
+
prop: r,
|
|
1298
1222
|
onChange: n,
|
|
1299
|
-
defaultProp:
|
|
1300
|
-
caller:
|
|
1223
|
+
defaultProp: o ?? !1,
|
|
1224
|
+
caller: cr
|
|
1301
1225
|
});
|
|
1302
1226
|
return /* @__PURE__ */ l(
|
|
1303
1227
|
te.button,
|
|
@@ -1309,136 +1233,136 @@ var Jr = io, en = uo, mo = "Toggle", it = p.forwardRef((e, t) => {
|
|
|
1309
1233
|
...s,
|
|
1310
1234
|
ref: t,
|
|
1311
1235
|
onClick: W(e.onClick, () => {
|
|
1312
|
-
e.disabled ||
|
|
1236
|
+
e.disabled || d(!i);
|
|
1313
1237
|
})
|
|
1314
1238
|
}
|
|
1315
1239
|
);
|
|
1316
1240
|
});
|
|
1317
|
-
|
|
1318
|
-
var
|
|
1319
|
-
|
|
1320
|
-
]),
|
|
1321
|
-
const { type:
|
|
1322
|
-
if (
|
|
1323
|
-
return /* @__PURE__ */ l(
|
|
1324
|
-
if (
|
|
1325
|
-
return /* @__PURE__ */ l(
|
|
1326
|
-
throw new Error(`Missing prop \`type\` expected on \`${
|
|
1241
|
+
lt.displayName = cr;
|
|
1242
|
+
var dr = lt, ce = "ToggleGroup", [ur] = Le(ce, [
|
|
1243
|
+
nr
|
|
1244
|
+
]), fr = nr(), it = m.forwardRef((e, t) => {
|
|
1245
|
+
const { type: r, ...o } = e;
|
|
1246
|
+
if (r === "single")
|
|
1247
|
+
return /* @__PURE__ */ l(on, { ...o, ref: t });
|
|
1248
|
+
if (r === "multiple")
|
|
1249
|
+
return /* @__PURE__ */ l(nn, { ...o, ref: t });
|
|
1250
|
+
throw new Error(`Missing prop \`type\` expected on \`${ce}\``);
|
|
1327
1251
|
});
|
|
1328
|
-
|
|
1329
|
-
var [
|
|
1252
|
+
it.displayName = ce;
|
|
1253
|
+
var [mr, pr] = ur(ce), on = m.forwardRef((e, t) => {
|
|
1330
1254
|
const {
|
|
1331
|
-
value:
|
|
1332
|
-
defaultValue:
|
|
1255
|
+
value: r,
|
|
1256
|
+
defaultValue: o,
|
|
1333
1257
|
onValueChange: n = () => {
|
|
1334
1258
|
},
|
|
1335
1259
|
...s
|
|
1336
|
-
} = e, [i,
|
|
1337
|
-
prop:
|
|
1338
|
-
defaultProp:
|
|
1260
|
+
} = e, [i, d] = Oe({
|
|
1261
|
+
prop: r,
|
|
1262
|
+
defaultProp: o ?? "",
|
|
1339
1263
|
onChange: n,
|
|
1340
|
-
caller:
|
|
1264
|
+
caller: ce
|
|
1341
1265
|
});
|
|
1342
1266
|
return /* @__PURE__ */ l(
|
|
1343
|
-
|
|
1267
|
+
mr,
|
|
1344
1268
|
{
|
|
1345
1269
|
scope: e.__scopeToggleGroup,
|
|
1346
1270
|
type: "single",
|
|
1347
1271
|
value: m.useMemo(() => i ? [i] : [], [i]),
|
|
1348
|
-
onItemActivate:
|
|
1349
|
-
onItemDeactivate: m.useCallback(() =>
|
|
1350
|
-
children: /* @__PURE__ */ l(
|
|
1272
|
+
onItemActivate: d,
|
|
1273
|
+
onItemDeactivate: m.useCallback(() => d(""), [d]),
|
|
1274
|
+
children: /* @__PURE__ */ l(hr, { ...s, ref: t })
|
|
1351
1275
|
}
|
|
1352
1276
|
);
|
|
1353
|
-
}),
|
|
1277
|
+
}), nn = m.forwardRef((e, t) => {
|
|
1354
1278
|
const {
|
|
1355
|
-
value:
|
|
1356
|
-
defaultValue:
|
|
1279
|
+
value: r,
|
|
1280
|
+
defaultValue: o,
|
|
1357
1281
|
onValueChange: n = () => {
|
|
1358
1282
|
},
|
|
1359
1283
|
...s
|
|
1360
|
-
} = e, [i,
|
|
1361
|
-
prop:
|
|
1362
|
-
defaultProp:
|
|
1284
|
+
} = e, [i, d] = Oe({
|
|
1285
|
+
prop: r,
|
|
1286
|
+
defaultProp: o ?? [],
|
|
1363
1287
|
onChange: n,
|
|
1364
|
-
caller:
|
|
1365
|
-
}),
|
|
1366
|
-
(f) =>
|
|
1367
|
-
[
|
|
1288
|
+
caller: ce
|
|
1289
|
+
}), c = m.useCallback(
|
|
1290
|
+
(f) => d((h = []) => [...h, f]),
|
|
1291
|
+
[d]
|
|
1368
1292
|
), u = m.useCallback(
|
|
1369
|
-
(f) =>
|
|
1370
|
-
[
|
|
1293
|
+
(f) => d((h = []) => h.filter((g) => g !== f)),
|
|
1294
|
+
[d]
|
|
1371
1295
|
);
|
|
1372
1296
|
return /* @__PURE__ */ l(
|
|
1373
|
-
|
|
1297
|
+
mr,
|
|
1374
1298
|
{
|
|
1375
1299
|
scope: e.__scopeToggleGroup,
|
|
1376
1300
|
type: "multiple",
|
|
1377
1301
|
value: i,
|
|
1378
|
-
onItemActivate:
|
|
1302
|
+
onItemActivate: c,
|
|
1379
1303
|
onItemDeactivate: u,
|
|
1380
|
-
children: /* @__PURE__ */ l(
|
|
1304
|
+
children: /* @__PURE__ */ l(hr, { ...s, ref: t })
|
|
1381
1305
|
}
|
|
1382
1306
|
);
|
|
1383
1307
|
});
|
|
1384
|
-
|
|
1385
|
-
var [
|
|
1308
|
+
it.displayName = ce;
|
|
1309
|
+
var [an, sn] = ur(ce), hr = m.forwardRef(
|
|
1386
1310
|
(e, t) => {
|
|
1387
1311
|
const {
|
|
1388
|
-
__scopeToggleGroup:
|
|
1389
|
-
disabled:
|
|
1312
|
+
__scopeToggleGroup: r,
|
|
1313
|
+
disabled: o = !1,
|
|
1390
1314
|
rovingFocus: n = !0,
|
|
1391
1315
|
orientation: s,
|
|
1392
1316
|
dir: i,
|
|
1393
|
-
loop:
|
|
1394
|
-
...
|
|
1395
|
-
} = e, u =
|
|
1396
|
-
return /* @__PURE__ */ l(
|
|
1397
|
-
|
|
1317
|
+
loop: d = !0,
|
|
1318
|
+
...c
|
|
1319
|
+
} = e, u = fr(r), f = tt(i), h = { role: "group", dir: f, ...c };
|
|
1320
|
+
return /* @__PURE__ */ l(an, { scope: r, rovingFocus: n, disabled: o, children: n ? /* @__PURE__ */ l(
|
|
1321
|
+
tn,
|
|
1398
1322
|
{
|
|
1399
1323
|
asChild: !0,
|
|
1400
1324
|
...u,
|
|
1401
1325
|
orientation: s,
|
|
1402
1326
|
dir: f,
|
|
1403
|
-
loop:
|
|
1327
|
+
loop: d,
|
|
1404
1328
|
children: /* @__PURE__ */ l(te.div, { ...h, ref: t })
|
|
1405
1329
|
}
|
|
1406
1330
|
) : /* @__PURE__ */ l(te.div, { ...h, ref: t }) });
|
|
1407
1331
|
}
|
|
1408
|
-
),
|
|
1332
|
+
), _e = "ToggleGroupItem", gr = m.forwardRef(
|
|
1409
1333
|
(e, t) => {
|
|
1410
|
-
const
|
|
1411
|
-
return
|
|
1412
|
-
|
|
1334
|
+
const r = pr(_e, e.__scopeToggleGroup), o = sn(_e, e.__scopeToggleGroup), n = fr(e.__scopeToggleGroup), s = r.value.includes(e.value), i = o.disabled || e.disabled, d = { ...e, pressed: s, disabled: i }, c = m.useRef(null);
|
|
1335
|
+
return o.rovingFocus ? /* @__PURE__ */ l(
|
|
1336
|
+
rn,
|
|
1413
1337
|
{
|
|
1414
1338
|
asChild: !0,
|
|
1415
1339
|
...n,
|
|
1416
1340
|
focusable: !i,
|
|
1417
1341
|
active: s,
|
|
1418
|
-
ref:
|
|
1419
|
-
children: /* @__PURE__ */ l(
|
|
1342
|
+
ref: c,
|
|
1343
|
+
children: /* @__PURE__ */ l(wt, { ...d, ref: t })
|
|
1420
1344
|
}
|
|
1421
|
-
) : /* @__PURE__ */ l(
|
|
1345
|
+
) : /* @__PURE__ */ l(wt, { ...d, ref: t });
|
|
1422
1346
|
}
|
|
1423
1347
|
);
|
|
1424
|
-
|
|
1425
|
-
var
|
|
1348
|
+
gr.displayName = _e;
|
|
1349
|
+
var wt = m.forwardRef(
|
|
1426
1350
|
(e, t) => {
|
|
1427
|
-
const { __scopeToggleGroup:
|
|
1351
|
+
const { __scopeToggleGroup: r, value: o, ...n } = e, s = pr(_e, r), i = { role: "radio", "aria-checked": e.pressed, "aria-pressed": void 0 }, d = s.type === "single" ? i : void 0;
|
|
1428
1352
|
return /* @__PURE__ */ l(
|
|
1429
|
-
|
|
1353
|
+
lt,
|
|
1430
1354
|
{
|
|
1431
|
-
...
|
|
1355
|
+
...d,
|
|
1432
1356
|
...n,
|
|
1433
1357
|
ref: t,
|
|
1434
|
-
onPressedChange: (
|
|
1435
|
-
|
|
1358
|
+
onPressedChange: (c) => {
|
|
1359
|
+
c ? s.onItemActivate(o) : s.onItemDeactivate(o);
|
|
1436
1360
|
}
|
|
1437
1361
|
}
|
|
1438
1362
|
);
|
|
1439
1363
|
}
|
|
1440
|
-
),
|
|
1441
|
-
const
|
|
1364
|
+
), vr = it, br = gr;
|
|
1365
|
+
const yr = Xr(
|
|
1442
1366
|
"inline-flex items-center justify-center rounded-md text-sm font-medium ring-offset-background transition-colors hover:bg-muted hover:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground",
|
|
1443
1367
|
{
|
|
1444
1368
|
variants: {
|
|
@@ -1457,23 +1381,23 @@ const Co = qo(
|
|
|
1457
1381
|
size: "default"
|
|
1458
1382
|
}
|
|
1459
1383
|
}
|
|
1460
|
-
),
|
|
1461
|
-
|
|
1462
|
-
const
|
|
1384
|
+
), ln = p.forwardRef(({ className: e, variant: t, size: r, ...o }, n) => /* @__PURE__ */ l(dr, { ref: n, className: Ne(yr({ variant: t, size: r, className: e })), ...o }));
|
|
1385
|
+
ln.displayName = dr.displayName;
|
|
1386
|
+
const wr = p.createContext({
|
|
1463
1387
|
size: "default",
|
|
1464
1388
|
variant: "default"
|
|
1465
|
-
}),
|
|
1466
|
-
|
|
1467
|
-
const
|
|
1468
|
-
const i = p.useContext(
|
|
1389
|
+
}), xr = p.forwardRef(({ className: e, variant: t, size: r, children: o, ...n }, s) => /* @__PURE__ */ l(vr, { ref: s, className: Ne("flex items-center justify-center gap-1", e), ...n, children: /* @__PURE__ */ l(wr.Provider, { value: { variant: t, size: r }, children: o }) }));
|
|
1390
|
+
xr.displayName = vr.displayName;
|
|
1391
|
+
const Sr = p.forwardRef(({ className: e, children: t, variant: r, size: o, ...n }, s) => {
|
|
1392
|
+
const i = p.useContext(wr);
|
|
1469
1393
|
return /* @__PURE__ */ l(
|
|
1470
|
-
|
|
1394
|
+
br,
|
|
1471
1395
|
{
|
|
1472
1396
|
ref: s,
|
|
1473
|
-
className:
|
|
1474
|
-
|
|
1475
|
-
variant: i.variant ||
|
|
1476
|
-
size: i.size ||
|
|
1397
|
+
className: Ne(
|
|
1398
|
+
yr({
|
|
1399
|
+
variant: i.variant || r,
|
|
1400
|
+
size: i.size || o
|
|
1477
1401
|
}),
|
|
1478
1402
|
e
|
|
1479
1403
|
),
|
|
@@ -1482,29 +1406,29 @@ const To = p.forwardRef(({ className: e, children: t, variant: o, size: r, ...n
|
|
|
1482
1406
|
}
|
|
1483
1407
|
);
|
|
1484
1408
|
});
|
|
1485
|
-
|
|
1486
|
-
var
|
|
1409
|
+
Sr.displayName = br.displayName;
|
|
1410
|
+
var cn = (e) => {
|
|
1487
1411
|
switch (e) {
|
|
1488
1412
|
case "success":
|
|
1489
|
-
return dn;
|
|
1490
|
-
case "info":
|
|
1491
1413
|
return fn;
|
|
1414
|
+
case "info":
|
|
1415
|
+
return pn;
|
|
1492
1416
|
case "warning":
|
|
1493
|
-
return un;
|
|
1494
|
-
case "error":
|
|
1495
1417
|
return mn;
|
|
1418
|
+
case "error":
|
|
1419
|
+
return hn;
|
|
1496
1420
|
default:
|
|
1497
1421
|
return null;
|
|
1498
1422
|
}
|
|
1499
|
-
},
|
|
1423
|
+
}, dn = Array(12).fill(0), un = ({ visible: e, className: t }) => m.createElement("div", { className: ["sonner-loading-wrapper", t].filter(Boolean).join(" "), "data-visible": e }, m.createElement("div", { className: "sonner-spinner" }, dn.map((r, o) => m.createElement("div", { className: "sonner-loading-bar", key: `spinner-bar-${o}` })))), fn = m.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 20 20", fill: "currentColor", height: "20", width: "20" }, m.createElement("path", { fillRule: "evenodd", d: "M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z", clipRule: "evenodd" })), mn = m.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "currentColor", height: "20", width: "20" }, m.createElement("path", { fillRule: "evenodd", d: "M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z", clipRule: "evenodd" })), pn = m.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 20 20", fill: "currentColor", height: "20", width: "20" }, m.createElement("path", { fillRule: "evenodd", d: "M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z", clipRule: "evenodd" })), hn = m.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 20 20", fill: "currentColor", height: "20", width: "20" }, m.createElement("path", { fillRule: "evenodd", d: "M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z", clipRule: "evenodd" })), gn = m.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: "12", height: "12", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }, m.createElement("line", { x1: "18", y1: "6", x2: "6", y2: "18" }), m.createElement("line", { x1: "6", y1: "6", x2: "18", y2: "18" })), vn = () => {
|
|
1500
1424
|
let [e, t] = m.useState(document.hidden);
|
|
1501
1425
|
return m.useEffect(() => {
|
|
1502
|
-
let
|
|
1426
|
+
let r = () => {
|
|
1503
1427
|
t(document.hidden);
|
|
1504
1428
|
};
|
|
1505
|
-
return document.addEventListener("visibilitychange",
|
|
1429
|
+
return document.addEventListener("visibilitychange", r), () => window.removeEventListener("visibilitychange", r);
|
|
1506
1430
|
}, []), e;
|
|
1507
|
-
}, Ze = 1,
|
|
1431
|
+
}, Ze = 1, bn = class {
|
|
1508
1432
|
constructor() {
|
|
1509
1433
|
this.subscribe = (e) => (this.subscribers.push(e), () => {
|
|
1510
1434
|
let t = this.subscribers.indexOf(e);
|
|
@@ -1515,314 +1439,314 @@ var sn = (e) => {
|
|
|
1515
1439
|
this.publish(e), this.toasts = [...this.toasts, e];
|
|
1516
1440
|
}, this.create = (e) => {
|
|
1517
1441
|
var t;
|
|
1518
|
-
let { message:
|
|
1519
|
-
return this.dismissedToasts.has(n) && this.dismissedToasts.delete(n), s ? this.toasts = this.toasts.map((
|
|
1442
|
+
let { message: r, ...o } = e, n = typeof (e == null ? void 0 : e.id) == "number" || ((t = e.id) == null ? void 0 : t.length) > 0 ? e.id : Ze++, s = this.toasts.find((d) => d.id === n), i = e.dismissible === void 0 ? !0 : e.dismissible;
|
|
1443
|
+
return this.dismissedToasts.has(n) && this.dismissedToasts.delete(n), s ? this.toasts = this.toasts.map((d) => d.id === n ? (this.publish({ ...d, ...e, id: n, title: r }), { ...d, ...e, id: n, dismissible: i, title: r }) : d) : this.addToast({ title: r, ...o, dismissible: i, id: n }), n;
|
|
1520
1444
|
}, this.dismiss = (e) => (this.dismissedToasts.add(e), e || this.toasts.forEach((t) => {
|
|
1521
|
-
this.subscribers.forEach((
|
|
1445
|
+
this.subscribers.forEach((r) => r({ id: t.id, dismiss: !0 }));
|
|
1522
1446
|
}), this.subscribers.forEach((t) => t({ id: e, dismiss: !0 })), e), this.message = (e, t) => this.create({ ...t, message: e }), this.error = (e, t) => this.create({ ...t, message: e, type: "error" }), this.success = (e, t) => this.create({ ...t, type: "success", message: e }), this.info = (e, t) => this.create({ ...t, type: "info", message: e }), this.warning = (e, t) => this.create({ ...t, type: "warning", message: e }), this.loading = (e, t) => this.create({ ...t, type: "loading", message: e }), this.promise = (e, t) => {
|
|
1523
1447
|
if (!t) return;
|
|
1524
|
-
let
|
|
1525
|
-
t.loading !== void 0 && (
|
|
1526
|
-
let
|
|
1527
|
-
if (s = ["resolve",
|
|
1528
|
-
else if (
|
|
1448
|
+
let r;
|
|
1449
|
+
t.loading !== void 0 && (r = this.create({ ...t, promise: e, type: "loading", message: t.loading, description: typeof t.description != "function" ? t.description : void 0 }));
|
|
1450
|
+
let o = e instanceof Promise ? e : e(), n = r !== void 0, s, i = o.then(async (c) => {
|
|
1451
|
+
if (s = ["resolve", c], m.isValidElement(c)) n = !1, this.create({ id: r, type: "default", message: c });
|
|
1452
|
+
else if (wn(c) && !c.ok) {
|
|
1529
1453
|
n = !1;
|
|
1530
|
-
let u = typeof t.error == "function" ? await t.error(`HTTP error! status: ${
|
|
1531
|
-
this.create({ id:
|
|
1454
|
+
let u = typeof t.error == "function" ? await t.error(`HTTP error! status: ${c.status}`) : t.error, f = typeof t.description == "function" ? await t.description(`HTTP error! status: ${c.status}`) : t.description;
|
|
1455
|
+
this.create({ id: r, type: "error", message: u, description: f });
|
|
1532
1456
|
} else if (t.success !== void 0) {
|
|
1533
1457
|
n = !1;
|
|
1534
|
-
let u = typeof t.success == "function" ? await t.success(
|
|
1535
|
-
this.create({ id:
|
|
1458
|
+
let u = typeof t.success == "function" ? await t.success(c) : t.success, f = typeof t.description == "function" ? await t.description(c) : t.description;
|
|
1459
|
+
this.create({ id: r, type: "success", message: u, description: f });
|
|
1536
1460
|
}
|
|
1537
|
-
}).catch(async (
|
|
1538
|
-
if (s = ["reject",
|
|
1461
|
+
}).catch(async (c) => {
|
|
1462
|
+
if (s = ["reject", c], t.error !== void 0) {
|
|
1539
1463
|
n = !1;
|
|
1540
|
-
let u = typeof t.error == "function" ? await t.error(
|
|
1541
|
-
this.create({ id:
|
|
1464
|
+
let u = typeof t.error == "function" ? await t.error(c) : t.error, f = typeof t.description == "function" ? await t.description(c) : t.description;
|
|
1465
|
+
this.create({ id: r, type: "error", message: u, description: f });
|
|
1542
1466
|
}
|
|
1543
1467
|
}).finally(() => {
|
|
1544
|
-
var
|
|
1545
|
-
n && (this.dismiss(
|
|
1546
|
-
}),
|
|
1547
|
-
return typeof
|
|
1468
|
+
var c;
|
|
1469
|
+
n && (this.dismiss(r), r = void 0), (c = t.finally) == null || c.call(t);
|
|
1470
|
+
}), d = () => new Promise((c, u) => i.then(() => s[0] === "reject" ? u(s[1]) : c(s[1])).catch(u));
|
|
1471
|
+
return typeof r != "string" && typeof r != "number" ? { unwrap: d } : Object.assign(r, { unwrap: d });
|
|
1548
1472
|
}, this.custom = (e, t) => {
|
|
1549
|
-
let
|
|
1550
|
-
return this.create({ jsx: e(
|
|
1473
|
+
let r = (t == null ? void 0 : t.id) || Ze++;
|
|
1474
|
+
return this.create({ jsx: e(r), id: r, ...t }), r;
|
|
1551
1475
|
}, this.getActiveToasts = () => this.toasts.filter((e) => !this.dismissedToasts.has(e.id)), this.subscribers = [], this.toasts = [], this.dismissedToasts = /* @__PURE__ */ new Set();
|
|
1552
1476
|
}
|
|
1553
|
-
}, G = new
|
|
1554
|
-
let
|
|
1555
|
-
return G.addToast({ title: e, ...t, id:
|
|
1556
|
-
},
|
|
1557
|
-
function
|
|
1477
|
+
}, G = new bn(), yn = (e, t) => {
|
|
1478
|
+
let r = (t == null ? void 0 : t.id) || Ze++;
|
|
1479
|
+
return G.addToast({ title: e, ...t, id: r }), r;
|
|
1480
|
+
}, wn = (e) => e && typeof e == "object" && "ok" in e && typeof e.ok == "boolean" && "status" in e && typeof e.status == "number", xn = yn, Sn = () => G.toasts, Cn = () => G.getActiveToasts(), En = Object.assign(xn, { success: G.success, info: G.info, warning: G.warning, error: G.error, custom: G.custom, message: G.message, promise: G.promise, dismiss: G.dismiss, loading: G.loading }, { getHistory: Sn, getToasts: Cn });
|
|
1481
|
+
function Nn(e, { insertAt: t } = {}) {
|
|
1558
1482
|
if (typeof document > "u") return;
|
|
1559
|
-
let
|
|
1560
|
-
|
|
1483
|
+
let r = document.head || document.getElementsByTagName("head")[0], o = document.createElement("style");
|
|
1484
|
+
o.type = "text/css", t === "top" && r.firstChild ? r.insertBefore(o, r.firstChild) : r.appendChild(o), o.styleSheet ? o.styleSheet.cssText = e : o.appendChild(document.createTextNode(e));
|
|
1561
1485
|
}
|
|
1562
|
-
Cn(`:where(html[dir="ltr"]),:where([data-sonner-toaster][dir="ltr"]){--toast-icon-margin-start: -3px;--toast-icon-margin-end: 4px;--toast-svg-margin-start: -1px;--toast-svg-margin-end: 0px;--toast-button-margin-start: auto;--toast-button-margin-end: 0;--toast-close-button-start: 0;--toast-close-button-end: unset;--toast-close-button-transform: translate(-35%, -35%)}:where(html[dir="rtl"]),:where([data-sonner-toaster][dir="rtl"]){--toast-icon-margin-start: 4px;--toast-icon-margin-end: -3px;--toast-svg-margin-start: 0px;--toast-svg-margin-end: -1px;--toast-button-margin-start: 0;--toast-button-margin-end: auto;--toast-close-button-start: unset;--toast-close-button-end: 0;--toast-close-button-transform: translate(35%, -35%)}:where([data-sonner-toaster]){position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1: hsl(0, 0%, 99%);--gray2: hsl(0, 0%, 97.3%);--gray3: hsl(0, 0%, 95.1%);--gray4: hsl(0, 0%, 93%);--gray5: hsl(0, 0%, 90.9%);--gray6: hsl(0, 0%, 88.7%);--gray7: hsl(0, 0%, 85.8%);--gray8: hsl(0, 0%, 78%);--gray9: hsl(0, 0%, 56.1%);--gray10: hsl(0, 0%, 52.3%);--gray11: hsl(0, 0%, 43.5%);--gray12: hsl(0, 0%, 9%);--border-radius: 8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:none;z-index:999999999;transition:transform .4s ease}:where([data-sonner-toaster][data-lifted="true"]){transform:translateY(-10px)}@media (hover: none) and (pointer: coarse){:where([data-sonner-toaster][data-lifted="true"]){transform:none}}:where([data-sonner-toaster][data-x-position="right"]){right:var(--offset-right)}:where([data-sonner-toaster][data-x-position="left"]){left:var(--offset-left)}:where([data-sonner-toaster][data-x-position="center"]){left:50%;transform:translate(-50%)}:where([data-sonner-toaster][data-y-position="top"]){top:var(--offset-top)}:where([data-sonner-toaster][data-y-position="bottom"]){bottom:var(--offset-bottom)}:where([data-sonner-toast]){--y: translateY(100%);--lift-amount: calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);filter:blur(0);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:none;overflow-wrap:anywhere}:where([data-sonner-toast][data-styled="true"]){padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px #0000001a;width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}:where([data-sonner-toast]:focus-visible){box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast][data-y-position="top"]){top:0;--y: translateY(-100%);--lift: 1;--lift-amount: calc(1 * var(--gap))}:where([data-sonner-toast][data-y-position="bottom"]){bottom:0;--y: translateY(100%);--lift: -1;--lift-amount: calc(var(--lift) * var(--gap))}:where([data-sonner-toast]) :where([data-description]){font-weight:400;line-height:1.4;color:inherit}:where([data-sonner-toast]) :where([data-title]){font-weight:500;line-height:1.5;color:inherit}:where([data-sonner-toast]) :where([data-icon]){display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}:where([data-sonner-toast][data-promise="true"]) :where([data-icon])>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}:where([data-sonner-toast]) :where([data-icon])>*{flex-shrink:0}:where([data-sonner-toast]) :where([data-icon]) svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}:where([data-sonner-toast]) :where([data-content]){display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;cursor:pointer;outline:none;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}:where([data-sonner-toast]) :where([data-button]):focus-visible{box-shadow:0 0 0 2px #0006}:where([data-sonner-toast]) :where([data-button]):first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}:where([data-sonner-toast]) :where([data-cancel]){color:var(--normal-text);background:rgba(0,0,0,.08)}:where([data-sonner-toast][data-theme="dark"]) :where([data-cancel]){background:rgba(255,255,255,.3)}:where([data-sonner-toast]) :where([data-close-button]){position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast] [data-close-button]{background:var(--gray1)}:where([data-sonner-toast]) :where([data-close-button]):focus-visible{box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast]) :where([data-disabled="true"]){cursor:not-allowed}:where([data-sonner-toast]):hover :where([data-close-button]):hover{background:var(--gray2);border-color:var(--gray5)}:where([data-sonner-toast][data-swiping="true"]):before{content:"";position:absolute;left:-50%;right:-50%;height:100%;z-index:-1}:where([data-sonner-toast][data-y-position="top"][data-swiping="true"]):before{bottom:50%;transform:scaleY(3) translateY(50%)}:where([data-sonner-toast][data-y-position="bottom"][data-swiping="true"]):before{top:50%;transform:scaleY(3) translateY(-50%)}:where([data-sonner-toast][data-swiping="false"][data-removed="true"]):before{content:"";position:absolute;inset:0;transform:scaleY(2)}:where([data-sonner-toast]):after{content:"";position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}:where([data-sonner-toast][data-mounted="true"]){--y: translateY(0);opacity:1}:where([data-sonner-toast][data-expanded="false"][data-front="false"]){--scale: var(--toasts-before) * .05 + 1;--y: translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}:where([data-sonner-toast])>*{transition:opacity .4s}:where([data-sonner-toast][data-expanded="false"][data-front="false"][data-styled="true"])>*{opacity:0}:where([data-sonner-toast][data-visible="false"]){opacity:0;pointer-events:none}:where([data-sonner-toast][data-mounted="true"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}:where([data-sonner-toast][data-removed="true"][data-front="true"][data-swipe-out="false"]){--y: translateY(calc(var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="false"]){--y: translateY(40%);opacity:0;transition:transform .5s,opacity .2s}:where([data-sonner-toast][data-removed="true"][data-front="false"]):before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y, 0px)) translate(var(--swipe-amount-x, 0px));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{0%{transform:var(--y) translate(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translate(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{0%{transform:var(--y) translate(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translate(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{0%{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{0%{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width: 600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-theme=light]{--normal-bg: #fff;--normal-border: var(--gray4);--normal-text: var(--gray12);--success-bg: hsl(143, 85%, 96%);--success-border: hsl(145, 92%, 91%);--success-text: hsl(140, 100%, 27%);--info-bg: hsl(208, 100%, 97%);--info-border: hsl(221, 91%, 91%);--info-text: hsl(210, 92%, 45%);--warning-bg: hsl(49, 100%, 97%);--warning-border: hsl(49, 91%, 91%);--warning-text: hsl(31, 92%, 45%);--error-bg: hsl(359, 100%, 97%);--error-border: hsl(359, 100%, 94%);--error-text: hsl(360, 100%, 45%)}[data-sonner-toaster][data-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg: #000;--normal-border: hsl(0, 0%, 20%);--normal-text: var(--gray1)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg: #fff;--normal-border: var(--gray3);--normal-text: var(--gray12)}[data-sonner-toaster][data-theme=dark]{--normal-bg: #000;--normal-bg-hover: hsl(0, 0%, 12%);--normal-border: hsl(0, 0%, 20%);--normal-border-hover: hsl(0, 0%, 25%);--normal-text: var(--gray1);--success-bg: hsl(150, 100%, 6%);--success-border: hsl(147, 100%, 12%);--success-text: hsl(150, 86%, 65%);--info-bg: hsl(215, 100%, 6%);--info-border: hsl(223, 100%, 12%);--info-text: hsl(216, 87%, 65%);--warning-bg: hsl(64, 100%, 6%);--warning-border: hsl(60, 100%, 12%);--warning-text: hsl(46, 87%, 65%);--error-bg: hsl(358, 76%, 10%);--error-border: hsl(357, 89%, 16%);--error-text: hsl(358, 100%, 81%)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success],[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info],[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning],[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error],[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size: 16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:nth-child(1){animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}to{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}to{opacity:.15}}@media (prefers-reduced-motion){[data-sonner-toast],[data-sonner-toast]>*,.sonner-loading-bar{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}
|
|
1486
|
+
Nn(`:where(html[dir="ltr"]),:where([data-sonner-toaster][dir="ltr"]){--toast-icon-margin-start: -3px;--toast-icon-margin-end: 4px;--toast-svg-margin-start: -1px;--toast-svg-margin-end: 0px;--toast-button-margin-start: auto;--toast-button-margin-end: 0;--toast-close-button-start: 0;--toast-close-button-end: unset;--toast-close-button-transform: translate(-35%, -35%)}:where(html[dir="rtl"]),:where([data-sonner-toaster][dir="rtl"]){--toast-icon-margin-start: 4px;--toast-icon-margin-end: -3px;--toast-svg-margin-start: 0px;--toast-svg-margin-end: -1px;--toast-button-margin-start: 0;--toast-button-margin-end: auto;--toast-close-button-start: unset;--toast-close-button-end: 0;--toast-close-button-transform: translate(35%, -35%)}:where([data-sonner-toaster]){position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1: hsl(0, 0%, 99%);--gray2: hsl(0, 0%, 97.3%);--gray3: hsl(0, 0%, 95.1%);--gray4: hsl(0, 0%, 93%);--gray5: hsl(0, 0%, 90.9%);--gray6: hsl(0, 0%, 88.7%);--gray7: hsl(0, 0%, 85.8%);--gray8: hsl(0, 0%, 78%);--gray9: hsl(0, 0%, 56.1%);--gray10: hsl(0, 0%, 52.3%);--gray11: hsl(0, 0%, 43.5%);--gray12: hsl(0, 0%, 9%);--border-radius: 8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:none;z-index:999999999;transition:transform .4s ease}:where([data-sonner-toaster][data-lifted="true"]){transform:translateY(-10px)}@media (hover: none) and (pointer: coarse){:where([data-sonner-toaster][data-lifted="true"]){transform:none}}:where([data-sonner-toaster][data-x-position="right"]){right:var(--offset-right)}:where([data-sonner-toaster][data-x-position="left"]){left:var(--offset-left)}:where([data-sonner-toaster][data-x-position="center"]){left:50%;transform:translate(-50%)}:where([data-sonner-toaster][data-y-position="top"]){top:var(--offset-top)}:where([data-sonner-toaster][data-y-position="bottom"]){bottom:var(--offset-bottom)}:where([data-sonner-toast]){--y: translateY(100%);--lift-amount: calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);filter:blur(0);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:none;overflow-wrap:anywhere}:where([data-sonner-toast][data-styled="true"]){padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px #0000001a;width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}:where([data-sonner-toast]:focus-visible){box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast][data-y-position="top"]){top:0;--y: translateY(-100%);--lift: 1;--lift-amount: calc(1 * var(--gap))}:where([data-sonner-toast][data-y-position="bottom"]){bottom:0;--y: translateY(100%);--lift: -1;--lift-amount: calc(var(--lift) * var(--gap))}:where([data-sonner-toast]) :where([data-description]){font-weight:400;line-height:1.4;color:inherit}:where([data-sonner-toast]) :where([data-title]){font-weight:500;line-height:1.5;color:inherit}:where([data-sonner-toast]) :where([data-icon]){display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}:where([data-sonner-toast][data-promise="true"]) :where([data-icon])>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}:where([data-sonner-toast]) :where([data-icon])>*{flex-shrink:0}:where([data-sonner-toast]) :where([data-icon]) svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}:where([data-sonner-toast]) :where([data-content]){display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;cursor:pointer;outline:none;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}:where([data-sonner-toast]) :where([data-button]):focus-visible{box-shadow:0 0 0 2px #0006}:where([data-sonner-toast]) :where([data-button]):first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}:where([data-sonner-toast]) :where([data-cancel]){color:var(--normal-text);background:rgba(0,0,0,.08)}:where([data-sonner-toast][data-theme="dark"]) :where([data-cancel]){background:rgba(255,255,255,.3)}:where([data-sonner-toast]) :where([data-close-button]){position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast] [data-close-button]{background:var(--gray1)}:where([data-sonner-toast]) :where([data-close-button]):focus-visible{box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast]) :where([data-disabled="true"]){cursor:not-allowed}:where([data-sonner-toast]):hover :where([data-close-button]):hover{background:var(--gray2);border-color:var(--gray5)}:where([data-sonner-toast][data-swiping="true"]):before{content:"";position:absolute;left:-50%;right:-50%;height:100%;z-index:-1}:where([data-sonner-toast][data-y-position="top"][data-swiping="true"]):before{bottom:50%;transform:scaleY(3) translateY(50%)}:where([data-sonner-toast][data-y-position="bottom"][data-swiping="true"]):before{top:50%;transform:scaleY(3) translateY(-50%)}:where([data-sonner-toast][data-swiping="false"][data-removed="true"]):before{content:"";position:absolute;inset:0;transform:scaleY(2)}:where([data-sonner-toast]):after{content:"";position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}:where([data-sonner-toast][data-mounted="true"]){--y: translateY(0);opacity:1}:where([data-sonner-toast][data-expanded="false"][data-front="false"]){--scale: var(--toasts-before) * .05 + 1;--y: translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}:where([data-sonner-toast])>*{transition:opacity .4s}:where([data-sonner-toast][data-expanded="false"][data-front="false"][data-styled="true"])>*{opacity:0}:where([data-sonner-toast][data-visible="false"]){opacity:0;pointer-events:none}:where([data-sonner-toast][data-mounted="true"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}:where([data-sonner-toast][data-removed="true"][data-front="true"][data-swipe-out="false"]){--y: translateY(calc(var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="false"]){--y: translateY(40%);opacity:0;transition:transform .5s,opacity .2s}:where([data-sonner-toast][data-removed="true"][data-front="false"]):before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y, 0px)) translate(var(--swipe-amount-x, 0px));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{0%{transform:var(--y) translate(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translate(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{0%{transform:var(--y) translate(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translate(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{0%{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{0%{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width: 600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-theme=light]{--normal-bg: #fff;--normal-border: var(--gray4);--normal-text: var(--gray12);--success-bg: hsl(143, 85%, 96%);--success-border: hsl(145, 92%, 91%);--success-text: hsl(140, 100%, 27%);--info-bg: hsl(208, 100%, 97%);--info-border: hsl(221, 91%, 91%);--info-text: hsl(210, 92%, 45%);--warning-bg: hsl(49, 100%, 97%);--warning-border: hsl(49, 91%, 91%);--warning-text: hsl(31, 92%, 45%);--error-bg: hsl(359, 100%, 97%);--error-border: hsl(359, 100%, 94%);--error-text: hsl(360, 100%, 45%)}[data-sonner-toaster][data-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg: #000;--normal-border: hsl(0, 0%, 20%);--normal-text: var(--gray1)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg: #fff;--normal-border: var(--gray3);--normal-text: var(--gray12)}[data-sonner-toaster][data-theme=dark]{--normal-bg: #000;--normal-bg-hover: hsl(0, 0%, 12%);--normal-border: hsl(0, 0%, 20%);--normal-border-hover: hsl(0, 0%, 25%);--normal-text: var(--gray1);--success-bg: hsl(150, 100%, 6%);--success-border: hsl(147, 100%, 12%);--success-text: hsl(150, 86%, 65%);--info-bg: hsl(215, 100%, 6%);--info-border: hsl(223, 100%, 12%);--info-text: hsl(216, 87%, 65%);--warning-bg: hsl(64, 100%, 6%);--warning-border: hsl(60, 100%, 12%);--warning-text: hsl(46, 87%, 65%);--error-bg: hsl(358, 76%, 10%);--error-border: hsl(357, 89%, 16%);--error-text: hsl(358, 100%, 81%)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success],[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info],[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning],[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error],[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size: 16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:nth-child(1){animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}to{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}to{opacity:.15}}@media (prefers-reduced-motion){[data-sonner-toast],[data-sonner-toast]>*,.sonner-loading-bar{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}
|
|
1563
1487
|
`);
|
|
1564
|
-
function
|
|
1488
|
+
function ke(e) {
|
|
1565
1489
|
return e.label !== void 0;
|
|
1566
1490
|
}
|
|
1567
|
-
var
|
|
1491
|
+
var Tn = 3, Rn = "32px", Pn = "16px", xt = 4e3, kn = 356, In = 14, An = 20, Dn = 200;
|
|
1568
1492
|
function ee(...e) {
|
|
1569
1493
|
return e.filter(Boolean).join(" ");
|
|
1570
1494
|
}
|
|
1571
|
-
function
|
|
1572
|
-
let [t,
|
|
1573
|
-
return t &&
|
|
1495
|
+
function Mn(e) {
|
|
1496
|
+
let [t, r] = e.split("-"), o = [];
|
|
1497
|
+
return t && o.push(t), r && o.push(r), o;
|
|
1574
1498
|
}
|
|
1575
|
-
var
|
|
1576
|
-
var t,
|
|
1577
|
-
let { invert: g, toast: a, unstyled: N, interacting: v, setHeights: b, visibleToasts:
|
|
1499
|
+
var _n = (e) => {
|
|
1500
|
+
var t, r, o, n, s, i, d, c, u, f, h;
|
|
1501
|
+
let { invert: g, toast: a, unstyled: N, interacting: v, setHeights: b, visibleToasts: E, heights: C, index: x, toasts: T, expanded: O, removeToast: R, defaultRichColors: A, closeButton: D, style: k, cancelButtonStyle: B, actionButtonStyle: H, className: S = "", descriptionClassName: de = "", duration: $, position: ne, gap: V, loadingIcon: q, expandByDefault: ue, classNames: w, icons: U, closeButtonAriaLabel: He = "Close toast", pauseWhenPageIsHidden: I } = e, [M, L] = m.useState(null), [j, pe] = m.useState(null), [z, Ve] = m.useState(!1), [we, Re] = m.useState(!1), [xe, $e] = m.useState(!1), [dt, Nr] = m.useState(!1), [Tr, ut] = m.useState(!1), [Rr, je] = m.useState(0), [Pr, ft] = m.useState(0), Se = m.useRef(a.duration || $ || xt), mt = m.useRef(null), fe = m.useRef(null), kr = x === 0, Ir = x + 1 <= E, X = a.type, he = a.dismissible !== !1, Ar = a.className || "", Dr = a.descriptionClassName || "", Pe = m.useMemo(() => C.findIndex((y) => y.toastId === a.id) || 0, [C, a.id]), Mr = m.useMemo(() => {
|
|
1578
1502
|
var y;
|
|
1579
1503
|
return (y = a.closeButton) != null ? y : D;
|
|
1580
|
-
}, [a.closeButton, D]),
|
|
1581
|
-
|
|
1582
|
-
|
|
1583
|
-
}, [
|
|
1504
|
+
}, [a.closeButton, D]), pt = m.useMemo(() => a.duration || $ || xt, [a.duration, $]), Ge = m.useRef(0), ge = m.useRef(0), ht = m.useRef(0), ve = m.useRef(null), [_r, Lr] = ne.split("-"), gt = m.useMemo(() => C.reduce((y, P, _) => _ >= Pe ? y : y + P.height, 0), [C, Pe]), vt = vn(), zr = a.invert || g, We = X === "loading";
|
|
1505
|
+
ge.current = m.useMemo(() => Pe * V + gt, [Pe, gt]), m.useEffect(() => {
|
|
1506
|
+
Se.current = pt;
|
|
1507
|
+
}, [pt]), m.useEffect(() => {
|
|
1584
1508
|
Ve(!0);
|
|
1585
1509
|
}, []), m.useEffect(() => {
|
|
1586
|
-
let y =
|
|
1510
|
+
let y = fe.current;
|
|
1587
1511
|
if (y) {
|
|
1588
|
-
let
|
|
1589
|
-
return
|
|
1512
|
+
let P = y.getBoundingClientRect().height;
|
|
1513
|
+
return ft(P), b((_) => [{ toastId: a.id, height: P, position: a.position }, ..._]), () => b((_) => _.filter((Z) => Z.toastId !== a.id));
|
|
1590
1514
|
}
|
|
1591
1515
|
}, [b, a.id]), m.useLayoutEffect(() => {
|
|
1592
|
-
if (!
|
|
1593
|
-
let y =
|
|
1516
|
+
if (!z) return;
|
|
1517
|
+
let y = fe.current, P = y.style.height;
|
|
1594
1518
|
y.style.height = "auto";
|
|
1595
|
-
let
|
|
1596
|
-
y.style.height =
|
|
1597
|
-
}, [
|
|
1519
|
+
let _ = y.getBoundingClientRect().height;
|
|
1520
|
+
y.style.height = P, ft(_), b((Z) => Z.find((Q) => Q.toastId === a.id) ? Z.map((Q) => Q.toastId === a.id ? { ...Q, height: _ } : Q) : [{ toastId: a.id, height: _, position: a.position }, ...Z]);
|
|
1521
|
+
}, [z, a.title, a.description, b, a.id]);
|
|
1598
1522
|
let ae = m.useCallback(() => {
|
|
1599
|
-
|
|
1523
|
+
Re(!0), je(ge.current), b((y) => y.filter((P) => P.toastId !== a.id)), setTimeout(() => {
|
|
1600
1524
|
R(a);
|
|
1601
|
-
},
|
|
1602
|
-
}, [a, R, b,
|
|
1525
|
+
}, Dn);
|
|
1526
|
+
}, [a, R, b, ge]);
|
|
1603
1527
|
m.useEffect(() => {
|
|
1604
1528
|
if (a.promise && X === "loading" || a.duration === 1 / 0 || a.type === "loading") return;
|
|
1605
1529
|
let y;
|
|
1606
|
-
return
|
|
1607
|
-
if (
|
|
1608
|
-
let
|
|
1609
|
-
|
|
1530
|
+
return O || v || I && vt ? (() => {
|
|
1531
|
+
if (ht.current < Ge.current) {
|
|
1532
|
+
let P = (/* @__PURE__ */ new Date()).getTime() - Ge.current;
|
|
1533
|
+
Se.current = Se.current - P;
|
|
1610
1534
|
}
|
|
1611
|
-
|
|
1612
|
-
})() :
|
|
1613
|
-
var
|
|
1614
|
-
(
|
|
1615
|
-
},
|
|
1616
|
-
}, [
|
|
1535
|
+
ht.current = (/* @__PURE__ */ new Date()).getTime();
|
|
1536
|
+
})() : Se.current !== 1 / 0 && (Ge.current = (/* @__PURE__ */ new Date()).getTime(), y = setTimeout(() => {
|
|
1537
|
+
var P;
|
|
1538
|
+
(P = a.onAutoClose) == null || P.call(a, a), ae();
|
|
1539
|
+
}, Se.current)), () => clearTimeout(y);
|
|
1540
|
+
}, [O, v, a, X, I, vt, ae]), m.useEffect(() => {
|
|
1617
1541
|
a.delete && ae();
|
|
1618
1542
|
}, [ae, a.delete]);
|
|
1619
|
-
function
|
|
1620
|
-
var y,
|
|
1621
|
-
return U != null && U.loading ? m.createElement("div", { className: ee(
|
|
1543
|
+
function Or() {
|
|
1544
|
+
var y, P, _;
|
|
1545
|
+
return U != null && U.loading ? m.createElement("div", { className: ee(w == null ? void 0 : w.loader, (y = a == null ? void 0 : a.classNames) == null ? void 0 : y.loader, "sonner-loader"), "data-visible": X === "loading" }, U.loading) : q ? m.createElement("div", { className: ee(w == null ? void 0 : w.loader, (P = a == null ? void 0 : a.classNames) == null ? void 0 : P.loader, "sonner-loader"), "data-visible": X === "loading" }, q) : m.createElement(un, { className: ee(w == null ? void 0 : w.loader, (_ = a == null ? void 0 : a.classNames) == null ? void 0 : _.loader), visible: X === "loading" });
|
|
1622
1546
|
}
|
|
1623
|
-
return m.createElement("li", { tabIndex: 0, ref:
|
|
1624
|
-
|
|
1547
|
+
return m.createElement("li", { tabIndex: 0, ref: fe, className: ee(S, Ar, w == null ? void 0 : w.toast, (t = a == null ? void 0 : a.classNames) == null ? void 0 : t.toast, w == null ? void 0 : w.default, w == null ? void 0 : w[X], (r = a == null ? void 0 : a.classNames) == null ? void 0 : r[X]), "data-sonner-toast": "", "data-rich-colors": (o = a.richColors) != null ? o : A, "data-styled": !(a.jsx || a.unstyled || N), "data-mounted": z, "data-promise": !!a.promise, "data-swiped": Tr, "data-removed": we, "data-visible": Ir, "data-y-position": _r, "data-x-position": Lr, "data-index": x, "data-front": kr, "data-swiping": xe, "data-dismissible": he, "data-type": X, "data-invert": zr, "data-swipe-out": dt, "data-swipe-direction": j, "data-expanded": !!(O || ue && z), style: { "--index": x, "--toasts-before": x, "--z-index": T.length - x, "--offset": `${we ? Rr : ge.current}px`, "--initial-height": ue ? "auto" : `${Pr}px`, ...k, ...a.style }, onDragEnd: () => {
|
|
1548
|
+
$e(!1), L(null), ve.current = null;
|
|
1625
1549
|
}, onPointerDown: (y) => {
|
|
1626
|
-
|
|
1550
|
+
We || !he || (mt.current = /* @__PURE__ */ new Date(), je(ge.current), y.target.setPointerCapture(y.pointerId), y.target.tagName !== "BUTTON" && ($e(!0), ve.current = { x: y.clientX, y: y.clientY }));
|
|
1627
1551
|
}, onPointerUp: () => {
|
|
1628
|
-
var y,
|
|
1629
|
-
if (
|
|
1630
|
-
|
|
1631
|
-
let
|
|
1632
|
-
if (Math.abs(J) >=
|
|
1633
|
-
|
|
1552
|
+
var y, P, _, Z;
|
|
1553
|
+
if (dt || !he) return;
|
|
1554
|
+
ve.current = null;
|
|
1555
|
+
let Q = Number(((y = fe.current) == null ? void 0 : y.style.getPropertyValue("--swipe-amount-x").replace("px", "")) || 0), se = Number(((P = fe.current) == null ? void 0 : P.style.getPropertyValue("--swipe-amount-y").replace("px", "")) || 0), me = (/* @__PURE__ */ new Date()).getTime() - ((_ = mt.current) == null ? void 0 : _.getTime()), J = M === "x" ? Q : se, le = Math.abs(J) / me;
|
|
1556
|
+
if (Math.abs(J) >= An || le > 0.11) {
|
|
1557
|
+
je(ge.current), (Z = a.onDismiss) == null || Z.call(a, a), pe(M === "x" ? Q > 0 ? "right" : "left" : se > 0 ? "down" : "up"), ae(), Nr(!0), ut(!1);
|
|
1634
1558
|
return;
|
|
1635
1559
|
}
|
|
1636
|
-
|
|
1560
|
+
$e(!1), L(null);
|
|
1637
1561
|
}, onPointerMove: (y) => {
|
|
1638
|
-
var
|
|
1639
|
-
if (!
|
|
1640
|
-
let se = y.clientY -
|
|
1641
|
-
!
|
|
1562
|
+
var P, _, Z, Q;
|
|
1563
|
+
if (!ve.current || !he || ((P = window.getSelection()) == null ? void 0 : P.toString().length) > 0) return;
|
|
1564
|
+
let se = y.clientY - ve.current.y, me = y.clientX - ve.current.x, J = (_ = e.swipeDirections) != null ? _ : Mn(ne);
|
|
1565
|
+
!M && (Math.abs(me) > 1 || Math.abs(se) > 1) && L(Math.abs(me) > Math.abs(se) ? "x" : "y");
|
|
1642
1566
|
let le = { x: 0, y: 0 };
|
|
1643
|
-
|
|
1644
|
-
} },
|
|
1567
|
+
M === "y" ? (J.includes("top") || J.includes("bottom")) && (J.includes("top") && se < 0 || J.includes("bottom") && se > 0) && (le.y = se) : M === "x" && (J.includes("left") || J.includes("right")) && (J.includes("left") && me < 0 || J.includes("right") && me > 0) && (le.x = me), (Math.abs(le.x) > 0 || Math.abs(le.y) > 0) && ut(!0), (Z = fe.current) == null || Z.style.setProperty("--swipe-amount-x", `${le.x}px`), (Q = fe.current) == null || Q.style.setProperty("--swipe-amount-y", `${le.y}px`);
|
|
1568
|
+
} }, Mr && !a.jsx ? m.createElement("button", { "aria-label": He, "data-disabled": We, "data-close-button": !0, onClick: We || !he ? () => {
|
|
1645
1569
|
} : () => {
|
|
1646
1570
|
var y;
|
|
1647
1571
|
ae(), (y = a.onDismiss) == null || y.call(a, a);
|
|
1648
|
-
}, className: ee(
|
|
1649
|
-
var
|
|
1650
|
-
|
|
1651
|
-
}, className: ee(
|
|
1652
|
-
var
|
|
1653
|
-
|
|
1654
|
-
}, className: ee(
|
|
1572
|
+
}, className: ee(w == null ? void 0 : w.closeButton, (n = a == null ? void 0 : a.classNames) == null ? void 0 : n.closeButton) }, (s = U == null ? void 0 : U.close) != null ? s : gn) : null, a.jsx || Ye(a.title) ? a.jsx ? a.jsx : typeof a.title == "function" ? a.title() : a.title : m.createElement(m.Fragment, null, X || a.icon || a.promise ? m.createElement("div", { "data-icon": "", className: ee(w == null ? void 0 : w.icon, (i = a == null ? void 0 : a.classNames) == null ? void 0 : i.icon) }, a.promise || a.type === "loading" && !a.icon ? a.icon || Or() : null, a.type !== "loading" ? a.icon || (U == null ? void 0 : U[X]) || cn(X) : null) : null, m.createElement("div", { "data-content": "", className: ee(w == null ? void 0 : w.content, (d = a == null ? void 0 : a.classNames) == null ? void 0 : d.content) }, m.createElement("div", { "data-title": "", className: ee(w == null ? void 0 : w.title, (c = a == null ? void 0 : a.classNames) == null ? void 0 : c.title) }, typeof a.title == "function" ? a.title() : a.title), a.description ? m.createElement("div", { "data-description": "", className: ee(de, Dr, w == null ? void 0 : w.description, (u = a == null ? void 0 : a.classNames) == null ? void 0 : u.description) }, typeof a.description == "function" ? a.description() : a.description) : null), Ye(a.cancel) ? a.cancel : a.cancel && ke(a.cancel) ? m.createElement("button", { "data-button": !0, "data-cancel": !0, style: a.cancelButtonStyle || B, onClick: (y) => {
|
|
1573
|
+
var P, _;
|
|
1574
|
+
ke(a.cancel) && he && ((_ = (P = a.cancel).onClick) == null || _.call(P, y), ae());
|
|
1575
|
+
}, className: ee(w == null ? void 0 : w.cancelButton, (f = a == null ? void 0 : a.classNames) == null ? void 0 : f.cancelButton) }, a.cancel.label) : null, Ye(a.action) ? a.action : a.action && ke(a.action) ? m.createElement("button", { "data-button": !0, "data-action": !0, style: a.actionButtonStyle || H, onClick: (y) => {
|
|
1576
|
+
var P, _;
|
|
1577
|
+
ke(a.action) && ((_ = (P = a.action).onClick) == null || _.call(P, y), !y.defaultPrevented && ae());
|
|
1578
|
+
}, className: ee(w == null ? void 0 : w.actionButton, (h = a == null ? void 0 : a.classNames) == null ? void 0 : h.actionButton) }, a.action.label) : null));
|
|
1655
1579
|
};
|
|
1656
|
-
function
|
|
1580
|
+
function St() {
|
|
1657
1581
|
if (typeof window > "u" || typeof document > "u") return "ltr";
|
|
1658
1582
|
let e = document.documentElement.getAttribute("dir");
|
|
1659
1583
|
return e === "auto" || !e ? window.getComputedStyle(document.documentElement).direction : e;
|
|
1660
1584
|
}
|
|
1661
|
-
function
|
|
1662
|
-
let
|
|
1663
|
-
return [e, t].forEach((
|
|
1664
|
-
let s = n === 1, i = s ? "--mobile-offset" : "--offset",
|
|
1665
|
-
function
|
|
1585
|
+
function Ln(e, t) {
|
|
1586
|
+
let r = {};
|
|
1587
|
+
return [e, t].forEach((o, n) => {
|
|
1588
|
+
let s = n === 1, i = s ? "--mobile-offset" : "--offset", d = s ? Pn : Rn;
|
|
1589
|
+
function c(u) {
|
|
1666
1590
|
["top", "right", "bottom", "left"].forEach((f) => {
|
|
1667
|
-
|
|
1591
|
+
r[`${i}-${f}`] = typeof u == "number" ? `${u}px` : u;
|
|
1668
1592
|
});
|
|
1669
1593
|
}
|
|
1670
|
-
typeof
|
|
1671
|
-
|
|
1672
|
-
}) : d
|
|
1673
|
-
}),
|
|
1594
|
+
typeof o == "number" || typeof o == "string" ? c(o) : typeof o == "object" ? ["top", "right", "bottom", "left"].forEach((u) => {
|
|
1595
|
+
o[u] === void 0 ? r[`${i}-${u}`] = d : r[`${i}-${u}`] = typeof o[u] == "number" ? `${o[u]}px` : o[u];
|
|
1596
|
+
}) : c(d);
|
|
1597
|
+
}), r;
|
|
1674
1598
|
}
|
|
1675
|
-
|
|
1676
|
-
let { invert:
|
|
1677
|
-
|
|
1678
|
-
var
|
|
1679
|
-
return (
|
|
1599
|
+
Br(function(e, t) {
|
|
1600
|
+
let { invert: r, position: o = "bottom-right", hotkey: n = ["altKey", "KeyT"], expand: s, closeButton: i, className: d, offset: c, mobileOffset: u, theme: f = "light", richColors: h, duration: g, style: a, visibleToasts: N = Tn, toastOptions: v, dir: b = St(), gap: E = In, loadingIcon: C, icons: x, containerAriaLabel: T = "Notifications", pauseWhenPageIsHidden: O } = e, [R, A] = m.useState([]), D = m.useMemo(() => Array.from(new Set([o].concat(R.filter((I) => I.position).map((I) => I.position)))), [R, o]), [k, B] = m.useState([]), [H, S] = m.useState(!1), [de, $] = m.useState(!1), [ne, V] = m.useState(f !== "system" ? f : typeof window < "u" && window.matchMedia && window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light"), q = m.useRef(null), ue = n.join("+").replace(/Key/g, "").replace(/Digit/g, ""), w = m.useRef(null), U = m.useRef(!1), He = m.useCallback((I) => {
|
|
1601
|
+
A((M) => {
|
|
1602
|
+
var L;
|
|
1603
|
+
return (L = M.find((j) => j.id === I.id)) != null && L.delete || G.dismiss(I.id), M.filter(({ id: j }) => j !== I.id);
|
|
1680
1604
|
});
|
|
1681
1605
|
}, []);
|
|
1682
|
-
return m.useEffect(() => G.subscribe((
|
|
1683
|
-
if (
|
|
1684
|
-
|
|
1606
|
+
return m.useEffect(() => G.subscribe((I) => {
|
|
1607
|
+
if (I.dismiss) {
|
|
1608
|
+
A((M) => M.map((L) => L.id === I.id ? { ...L, delete: !0 } : L));
|
|
1685
1609
|
return;
|
|
1686
1610
|
}
|
|
1687
1611
|
setTimeout(() => {
|
|
1688
|
-
|
|
1689
|
-
|
|
1690
|
-
let
|
|
1691
|
-
return
|
|
1612
|
+
fo.flushSync(() => {
|
|
1613
|
+
A((M) => {
|
|
1614
|
+
let L = M.findIndex((j) => j.id === I.id);
|
|
1615
|
+
return L !== -1 ? [...M.slice(0, L), { ...M[L], ...I }, ...M.slice(L + 1)] : [I, ...M];
|
|
1692
1616
|
});
|
|
1693
1617
|
});
|
|
1694
1618
|
});
|
|
1695
1619
|
}), []), m.useEffect(() => {
|
|
1696
1620
|
if (f !== "system") {
|
|
1697
|
-
|
|
1621
|
+
V(f);
|
|
1698
1622
|
return;
|
|
1699
1623
|
}
|
|
1700
|
-
if (f === "system" && (window.matchMedia && window.matchMedia("(prefers-color-scheme: dark)").matches ?
|
|
1701
|
-
let
|
|
1624
|
+
if (f === "system" && (window.matchMedia && window.matchMedia("(prefers-color-scheme: dark)").matches ? V("dark") : V("light")), typeof window > "u") return;
|
|
1625
|
+
let I = window.matchMedia("(prefers-color-scheme: dark)");
|
|
1702
1626
|
try {
|
|
1703
|
-
|
|
1704
|
-
|
|
1627
|
+
I.addEventListener("change", ({ matches: M }) => {
|
|
1628
|
+
V(M ? "dark" : "light");
|
|
1705
1629
|
});
|
|
1706
1630
|
} catch {
|
|
1707
|
-
|
|
1631
|
+
I.addListener(({ matches: L }) => {
|
|
1708
1632
|
try {
|
|
1709
|
-
|
|
1633
|
+
V(L ? "dark" : "light");
|
|
1710
1634
|
} catch (j) {
|
|
1711
1635
|
console.error(j);
|
|
1712
1636
|
}
|
|
1713
1637
|
});
|
|
1714
1638
|
}
|
|
1715
1639
|
}, [f]), m.useEffect(() => {
|
|
1716
|
-
R.length <= 1 &&
|
|
1640
|
+
R.length <= 1 && S(!1);
|
|
1717
1641
|
}, [R]), m.useEffect(() => {
|
|
1718
|
-
let
|
|
1719
|
-
var
|
|
1720
|
-
n.every((
|
|
1642
|
+
let I = (M) => {
|
|
1643
|
+
var L, j;
|
|
1644
|
+
n.every((pe) => M[pe] || M.code === pe) && (S(!0), (L = q.current) == null || L.focus()), M.code === "Escape" && (document.activeElement === q.current || (j = q.current) != null && j.contains(document.activeElement)) && S(!1);
|
|
1721
1645
|
};
|
|
1722
|
-
return document.addEventListener("keydown",
|
|
1646
|
+
return document.addEventListener("keydown", I), () => document.removeEventListener("keydown", I);
|
|
1723
1647
|
}, [n]), m.useEffect(() => {
|
|
1724
1648
|
if (q.current) return () => {
|
|
1725
|
-
|
|
1649
|
+
w.current && (w.current.focus({ preventScroll: !0 }), w.current = null, U.current = !1);
|
|
1726
1650
|
};
|
|
1727
|
-
}, [q.current]), m.createElement("section", { ref: t, "aria-label": `${T} ${
|
|
1728
|
-
var
|
|
1729
|
-
let [j,
|
|
1730
|
-
return R.length ? m.createElement("ol", { key:
|
|
1731
|
-
U.current && !
|
|
1732
|
-
}, onFocus: (
|
|
1733
|
-
|
|
1734
|
-
}, onMouseEnter: () =>
|
|
1735
|
-
|
|
1736
|
-
}, onDragEnd: () =>
|
|
1737
|
-
|
|
1738
|
-
}, onPointerUp: () =>
|
|
1739
|
-
var
|
|
1740
|
-
return m.createElement(
|
|
1651
|
+
}, [q.current]), m.createElement("section", { ref: t, "aria-label": `${T} ${ue}`, tabIndex: -1, "aria-live": "polite", "aria-relevant": "additions text", "aria-atomic": "false", suppressHydrationWarning: !0 }, D.map((I, M) => {
|
|
1652
|
+
var L;
|
|
1653
|
+
let [j, pe] = I.split("-");
|
|
1654
|
+
return R.length ? m.createElement("ol", { key: I, dir: b === "auto" ? St() : b, tabIndex: -1, ref: q, className: d, "data-sonner-toaster": !0, "data-theme": ne, "data-y-position": j, "data-lifted": H && R.length > 1 && !s, "data-x-position": pe, style: { "--front-toast-height": `${((L = k[0]) == null ? void 0 : L.height) || 0}px`, "--width": `${kn}px`, "--gap": `${E}px`, ...a, ...Ln(c, u) }, onBlur: (z) => {
|
|
1655
|
+
U.current && !z.currentTarget.contains(z.relatedTarget) && (U.current = !1, w.current && (w.current.focus({ preventScroll: !0 }), w.current = null));
|
|
1656
|
+
}, onFocus: (z) => {
|
|
1657
|
+
z.target instanceof HTMLElement && z.target.dataset.dismissible === "false" || U.current || (U.current = !0, w.current = z.relatedTarget);
|
|
1658
|
+
}, onMouseEnter: () => S(!0), onMouseMove: () => S(!0), onMouseLeave: () => {
|
|
1659
|
+
de || S(!1);
|
|
1660
|
+
}, onDragEnd: () => S(!1), onPointerDown: (z) => {
|
|
1661
|
+
z.target instanceof HTMLElement && z.target.dataset.dismissible === "false" || $(!0);
|
|
1662
|
+
}, onPointerUp: () => $(!1) }, R.filter((z) => !z.position && M === 0 || z.position === I).map((z, Ve) => {
|
|
1663
|
+
var we, Re;
|
|
1664
|
+
return m.createElement(_n, { key: z.id, icons: x, index: Ve, toast: z, defaultRichColors: h, duration: (we = v == null ? void 0 : v.duration) != null ? we : g, className: v == null ? void 0 : v.className, descriptionClassName: v == null ? void 0 : v.descriptionClassName, invert: r, visibleToasts: N, closeButton: (Re = v == null ? void 0 : v.closeButton) != null ? Re : i, interacting: de, position: I, style: v == null ? void 0 : v.style, unstyled: v == null ? void 0 : v.unstyled, classNames: v == null ? void 0 : v.classNames, cancelButtonStyle: v == null ? void 0 : v.cancelButtonStyle, actionButtonStyle: v == null ? void 0 : v.actionButtonStyle, removeToast: He, toasts: R.filter((xe) => xe.position == z.position), heights: k.filter((xe) => xe.position == z.position), setHeights: B, expandByDefault: s, gap: E, loadingIcon: C, expanded: H, pauseWhenPageIsHidden: O, swipeDirections: e.swipeDirections });
|
|
1741
1665
|
})) : null;
|
|
1742
1666
|
}));
|
|
1743
1667
|
});
|
|
1744
|
-
const
|
|
1745
|
-
mobile: { width: 375, icon:
|
|
1746
|
-
tablet: { width: 768, icon:
|
|
1747
|
-
small: { width: 1024, icon:
|
|
1748
|
-
desktop: { width: "100%", icon:
|
|
1749
|
-
},
|
|
1750
|
-
const { actions:
|
|
1668
|
+
const Cr = {
|
|
1669
|
+
mobile: { width: 375, icon: Qr, label: "Mobile (375px)" },
|
|
1670
|
+
tablet: { width: 768, icon: Zr, label: "Tablet (768px)" },
|
|
1671
|
+
small: { width: 1024, icon: qr, label: "Small Desktop (1024px)" },
|
|
1672
|
+
desktop: { width: "100%", icon: Kr, label: "Desktop (Full)" }
|
|
1673
|
+
}, zn = ({ onSave: e, deviceSize: t, onDeviceSizeChange: r }) => {
|
|
1674
|
+
const { actions: o, query: n, canUndo: s, canRedo: i } = ye((c, u) => ({
|
|
1751
1675
|
canUndo: u.history.canUndo(),
|
|
1752
1676
|
canRedo: u.history.canRedo()
|
|
1753
|
-
})),
|
|
1754
|
-
const
|
|
1755
|
-
e == null || e(
|
|
1677
|
+
})), d = () => {
|
|
1678
|
+
const c = n.serialize();
|
|
1679
|
+
e == null || e(c), En.success("Page saved successfully");
|
|
1756
1680
|
};
|
|
1757
|
-
return /* @__PURE__ */
|
|
1758
|
-
/* @__PURE__ */ l(
|
|
1759
|
-
|
|
1681
|
+
return /* @__PURE__ */ F("div", { className: "flex items-center gap-4", children: [
|
|
1682
|
+
/* @__PURE__ */ l(Jr, { children: /* @__PURE__ */ l(
|
|
1683
|
+
xr,
|
|
1760
1684
|
{
|
|
1761
1685
|
type: "single",
|
|
1762
1686
|
value: t,
|
|
1763
|
-
onValueChange: (
|
|
1687
|
+
onValueChange: (c) => c && r(c),
|
|
1764
1688
|
className: "bg-muted rounded-md p-1",
|
|
1765
|
-
children: Object.entries(
|
|
1766
|
-
/* @__PURE__ */ l(
|
|
1767
|
-
|
|
1689
|
+
children: Object.entries(Cr).map(([c, { icon: u, label: f }]) => /* @__PURE__ */ F(eo, { children: [
|
|
1690
|
+
/* @__PURE__ */ l(to, { asChild: !0, children: /* @__PURE__ */ l(
|
|
1691
|
+
Sr,
|
|
1768
1692
|
{
|
|
1769
|
-
value:
|
|
1693
|
+
value: c,
|
|
1770
1694
|
size: "sm",
|
|
1771
1695
|
className: "data-[state=on]:bg-background data-[state=on]:shadow-sm",
|
|
1772
1696
|
children: /* @__PURE__ */ l(u, { className: "h-4 w-4" })
|
|
1773
1697
|
}
|
|
1774
1698
|
) }),
|
|
1775
|
-
/* @__PURE__ */ l(
|
|
1776
|
-
] },
|
|
1699
|
+
/* @__PURE__ */ l(ro, { side: "bottom", children: /* @__PURE__ */ l("p", { children: f }) })
|
|
1700
|
+
] }, c))
|
|
1777
1701
|
}
|
|
1778
1702
|
) }),
|
|
1779
1703
|
/* @__PURE__ */ l("div", { className: "h-6 w-px bg-border" }),
|
|
1780
|
-
/* @__PURE__ */
|
|
1704
|
+
/* @__PURE__ */ F("div", { className: "flex items-center gap-2", children: [
|
|
1781
1705
|
/* @__PURE__ */ l(
|
|
1782
|
-
|
|
1706
|
+
Ie,
|
|
1783
1707
|
{
|
|
1784
1708
|
variant: "outline",
|
|
1785
1709
|
size: "sm",
|
|
1786
|
-
onClick: () =>
|
|
1710
|
+
onClick: () => o.history.undo(),
|
|
1787
1711
|
disabled: !s,
|
|
1788
|
-
children: /* @__PURE__ */ l(
|
|
1712
|
+
children: /* @__PURE__ */ l(bo, { className: "h-4 w-4" })
|
|
1789
1713
|
}
|
|
1790
1714
|
),
|
|
1791
1715
|
/* @__PURE__ */ l(
|
|
1792
|
-
|
|
1716
|
+
Ie,
|
|
1793
1717
|
{
|
|
1794
1718
|
variant: "outline",
|
|
1795
1719
|
size: "sm",
|
|
1796
|
-
onClick: () =>
|
|
1720
|
+
onClick: () => o.history.redo(),
|
|
1797
1721
|
disabled: !i,
|
|
1798
|
-
children: /* @__PURE__ */ l(
|
|
1722
|
+
children: /* @__PURE__ */ l(ho, { className: "h-4 w-4" })
|
|
1799
1723
|
}
|
|
1800
1724
|
),
|
|
1801
|
-
/* @__PURE__ */
|
|
1802
|
-
/* @__PURE__ */ l(
|
|
1725
|
+
/* @__PURE__ */ F(Ie, { size: "sm", onClick: d, children: [
|
|
1726
|
+
/* @__PURE__ */ l(go, { className: "h-4 w-4 mr-2" }),
|
|
1803
1727
|
"Save"
|
|
1804
1728
|
] })
|
|
1805
1729
|
] })
|
|
1806
1730
|
] });
|
|
1807
|
-
},
|
|
1731
|
+
}, ct = ({ children: e, className: t }) => {
|
|
1808
1732
|
const {
|
|
1809
|
-
connectors: { connect:
|
|
1733
|
+
connectors: { connect: r, drag: o },
|
|
1810
1734
|
selected: n
|
|
1811
|
-
} =
|
|
1735
|
+
} = Qe((s) => ({
|
|
1812
1736
|
selected: s.events.selected
|
|
1813
1737
|
}));
|
|
1814
1738
|
return /* @__PURE__ */ l(
|
|
1815
1739
|
"div",
|
|
1816
1740
|
{
|
|
1817
1741
|
ref: (s) => {
|
|
1818
|
-
s && o(
|
|
1742
|
+
s && r(o(s));
|
|
1819
1743
|
},
|
|
1820
|
-
className:
|
|
1744
|
+
className: Et("relative min-h-[100vh] bg-white", t || ""),
|
|
1821
1745
|
children: e
|
|
1822
1746
|
}
|
|
1823
1747
|
);
|
|
1824
1748
|
};
|
|
1825
|
-
|
|
1749
|
+
ct.craft = {
|
|
1826
1750
|
props: {},
|
|
1827
1751
|
displayName: "Body",
|
|
1828
1752
|
isCanvas: !0,
|
|
@@ -1832,21 +1756,21 @@ dt.craft = {
|
|
|
1832
1756
|
)
|
|
1833
1757
|
}
|
|
1834
1758
|
};
|
|
1835
|
-
const
|
|
1836
|
-
const { actions: t } =
|
|
1837
|
-
return
|
|
1759
|
+
const On = ({ htmlJson: e }) => {
|
|
1760
|
+
const { actions: t } = ye();
|
|
1761
|
+
return Fr(() => {
|
|
1838
1762
|
e && t.deserialize(e);
|
|
1839
|
-
}, [e]), /* @__PURE__ */ l(
|
|
1840
|
-
},
|
|
1763
|
+
}, [e]), /* @__PURE__ */ l(oo, { children: /* @__PURE__ */ l(Ae, { id: "mainBody", is: ct, canvas: !0 }) });
|
|
1764
|
+
}, Er = ({
|
|
1841
1765
|
background: e = "transparent",
|
|
1842
1766
|
padding: t = { top: 16, right: 16, bottom: 16, left: 16 },
|
|
1843
|
-
margin:
|
|
1844
|
-
width:
|
|
1767
|
+
margin: r = { top: 0, right: 0, bottom: 0, left: 0 },
|
|
1768
|
+
width: o = "auto",
|
|
1845
1769
|
minHeight: n = 100,
|
|
1846
1770
|
maxWidth: s = "none",
|
|
1847
1771
|
display: i = "block",
|
|
1848
|
-
flexDirection:
|
|
1849
|
-
justifyContent:
|
|
1772
|
+
flexDirection: d = "column",
|
|
1773
|
+
justifyContent: c = "flex-start",
|
|
1850
1774
|
alignItems: u = "stretch",
|
|
1851
1775
|
gap: f = 0,
|
|
1852
1776
|
borderRadius: h = 8,
|
|
@@ -1857,11 +1781,11 @@ const Ln = ({ htmlJson: e }) => {
|
|
|
1857
1781
|
children: b
|
|
1858
1782
|
}) => {
|
|
1859
1783
|
const {
|
|
1860
|
-
connectors: { connect:
|
|
1861
|
-
isActive:
|
|
1862
|
-
} =
|
|
1863
|
-
isActive:
|
|
1864
|
-
})), T = typeof t == "object" ? `${t.top}px ${t.right}px ${t.bottom}px ${t.left}px` : `${t}px`,
|
|
1784
|
+
connectors: { connect: E, drag: C },
|
|
1785
|
+
isActive: x
|
|
1786
|
+
} = Qe((A) => ({
|
|
1787
|
+
isActive: A.events.selected
|
|
1788
|
+
})), T = typeof t == "object" ? `${t.top}px ${t.right}px ${t.bottom}px ${t.left}px` : `${t}px`, O = typeof r == "object" ? `${r.top}px ${r.right}px ${r.bottom}px ${r.left}px` : `${r}px`, R = [
|
|
1865
1789
|
{
|
|
1866
1790
|
url: "https://myracereel.com/privacy-data-privacy",
|
|
1867
1791
|
name: "Privacy & Data Policy"
|
|
@@ -1874,18 +1798,18 @@ const Ln = ({ htmlJson: e }) => {
|
|
|
1874
1798
|
{ url: "https://myracereel.com/contact", name: "Contact Us" }
|
|
1875
1799
|
];
|
|
1876
1800
|
return /* @__PURE__ */ l(
|
|
1877
|
-
|
|
1801
|
+
Je,
|
|
1878
1802
|
{
|
|
1879
1803
|
style: {
|
|
1880
1804
|
backgroundColor: e,
|
|
1881
1805
|
padding: T,
|
|
1882
|
-
margin:
|
|
1883
|
-
width:
|
|
1806
|
+
margin: O,
|
|
1807
|
+
width: o === "auto" ? "100%" : o,
|
|
1884
1808
|
minHeight: `${n}px`,
|
|
1885
1809
|
maxWidth: s === "none" ? "none" : `${s}px`,
|
|
1886
1810
|
display: i,
|
|
1887
|
-
flexDirection: i === "flex" ?
|
|
1888
|
-
justifyContent: i === "flex" ?
|
|
1811
|
+
flexDirection: i === "flex" ? d : void 0,
|
|
1812
|
+
justifyContent: i === "flex" ? c : void 0,
|
|
1889
1813
|
alignItems: i === "flex" ? u : void 0,
|
|
1890
1814
|
gap: i === "flex" ? `${f}px` : void 0,
|
|
1891
1815
|
borderRadius: `${h}px`,
|
|
@@ -1895,24 +1819,24 @@ const Ln = ({ htmlJson: e }) => {
|
|
|
1895
1819
|
boxShadow: v === "none" ? "none" : v
|
|
1896
1820
|
},
|
|
1897
1821
|
className: "bg-black",
|
|
1898
|
-
ref: (
|
|
1899
|
-
children: /* @__PURE__ */ l("div", { className: "flex justify-center w-full", children: /* @__PURE__ */
|
|
1822
|
+
ref: (A) => A && E(C(A)),
|
|
1823
|
+
children: /* @__PURE__ */ l("div", { className: "flex justify-center w-full", children: /* @__PURE__ */ F("div", { className: "w-full flex flex-col py-10 gap-y-3.5 ", children: [
|
|
1900
1824
|
/* @__PURE__ */ l("div", { className: "flex w-full gap-x-1 justify-center items-center", children: /* @__PURE__ */ l("div", { className: "text-white text-sm", children: "Powered by MyRaceReel" }) }),
|
|
1901
|
-
/* @__PURE__ */ l("div", { className: "flex @md:flex-row @max-md:flex-col md:flex-row justify-center items-center gap-x-6 gap-y-2 w-full flex-col", children: R.map((
|
|
1825
|
+
/* @__PURE__ */ l("div", { className: "flex @md:flex-row @max-md:flex-col md:flex-row justify-center items-center gap-x-6 gap-y-2 w-full flex-col", children: R.map((A) => /* @__PURE__ */ l(
|
|
1902
1826
|
"a",
|
|
1903
1827
|
{
|
|
1904
1828
|
className: "text-white",
|
|
1905
|
-
href:
|
|
1829
|
+
href: A.url,
|
|
1906
1830
|
target: "_blank",
|
|
1907
|
-
children:
|
|
1831
|
+
children: A.name
|
|
1908
1832
|
},
|
|
1909
|
-
|
|
1833
|
+
A.name
|
|
1910
1834
|
)) })
|
|
1911
1835
|
] }) })
|
|
1912
1836
|
}
|
|
1913
1837
|
);
|
|
1914
1838
|
};
|
|
1915
|
-
|
|
1839
|
+
Er.craft = {
|
|
1916
1840
|
displayName: "Footer",
|
|
1917
1841
|
props: {
|
|
1918
1842
|
background: "transparent",
|
|
@@ -1932,46 +1856,46 @@ Po.craft = {
|
|
|
1932
1856
|
borderStyle: "dashed",
|
|
1933
1857
|
boxShadow: "none"
|
|
1934
1858
|
},
|
|
1935
|
-
related: { settings:
|
|
1859
|
+
related: { settings: Nt }
|
|
1936
1860
|
};
|
|
1937
|
-
const
|
|
1938
|
-
var
|
|
1939
|
-
const
|
|
1940
|
-
if (
|
|
1861
|
+
const $n = ({ initialData: e, onSave: t, onStateChange: r }) => {
|
|
1862
|
+
var c;
|
|
1863
|
+
const o = no(), [n, s] = Ee("desktop"), i = ((c = Cr[n]) == null ? void 0 : c.width) || "100%", d = (u) => {
|
|
1864
|
+
if (r)
|
|
1941
1865
|
try {
|
|
1942
1866
|
const f = u.serialize();
|
|
1943
|
-
|
|
1867
|
+
r(f);
|
|
1944
1868
|
} catch {
|
|
1945
1869
|
}
|
|
1946
1870
|
};
|
|
1947
1871
|
return /* @__PURE__ */ l(
|
|
1948
|
-
|
|
1872
|
+
ao,
|
|
1949
1873
|
{
|
|
1950
1874
|
resolver: {
|
|
1951
|
-
Body:
|
|
1952
|
-
Div:
|
|
1953
|
-
Wrapper:
|
|
1954
|
-
Section:
|
|
1955
|
-
Container:
|
|
1956
|
-
Text:
|
|
1957
|
-
ButtonComponent:
|
|
1958
|
-
Heading:
|
|
1959
|
-
Image:
|
|
1960
|
-
Img:
|
|
1961
|
-
Divider:
|
|
1962
|
-
Spacer:
|
|
1963
|
-
Video:
|
|
1964
|
-
Columns:
|
|
1965
|
-
Link:
|
|
1966
|
-
Footer:
|
|
1875
|
+
Body: ct,
|
|
1876
|
+
Div: et,
|
|
1877
|
+
Wrapper: Je,
|
|
1878
|
+
Section: io,
|
|
1879
|
+
Container: Rt,
|
|
1880
|
+
Text: kt,
|
|
1881
|
+
ButtonComponent: It,
|
|
1882
|
+
Heading: Pt,
|
|
1883
|
+
Image: Dt,
|
|
1884
|
+
Img: lo,
|
|
1885
|
+
Divider: _t,
|
|
1886
|
+
Spacer: Lt,
|
|
1887
|
+
Video: Mt,
|
|
1888
|
+
Columns: so,
|
|
1889
|
+
Link: At,
|
|
1890
|
+
Footer: Er
|
|
1967
1891
|
},
|
|
1968
1892
|
enabled: !0,
|
|
1969
|
-
onNodesChange: (u) =>
|
|
1970
|
-
children: /* @__PURE__ */ l(
|
|
1971
|
-
/* @__PURE__ */
|
|
1893
|
+
onNodesChange: (u) => d(u),
|
|
1894
|
+
children: /* @__PURE__ */ l(co, { value: n, children: /* @__PURE__ */ l(uo, { value: o, children: /* @__PURE__ */ F("div", { className: "flex flex-col h-full", children: [
|
|
1895
|
+
/* @__PURE__ */ F("div", { className: "flex items-center justify-between pb-4 border-b border-border", children: [
|
|
1972
1896
|
/* @__PURE__ */ l("h2", { className: "text-lg font-semibold", children: "Page Builder" }),
|
|
1973
1897
|
/* @__PURE__ */ l(
|
|
1974
|
-
|
|
1898
|
+
zn,
|
|
1975
1899
|
{
|
|
1976
1900
|
onSave: t,
|
|
1977
1901
|
deviceSize: n,
|
|
@@ -1979,12 +1903,12 @@ const Fn = ({ initialData: e, onSave: t, onStateChange: o }) => {
|
|
|
1979
1903
|
}
|
|
1980
1904
|
)
|
|
1981
1905
|
] }),
|
|
1982
|
-
/* @__PURE__ */
|
|
1983
|
-
/* @__PURE__ */ l(
|
|
1984
|
-
/* @__PURE__ */ l(
|
|
1985
|
-
/* @__PURE__ */ l(
|
|
1906
|
+
/* @__PURE__ */ F("div", { className: "flex gap-4 mt-4 flex-1 min-h-0", children: [
|
|
1907
|
+
/* @__PURE__ */ l(Ue, { className: "w-56 shrink-0", children: /* @__PURE__ */ F(Xe, { className: "p-4 space-y-6", children: [
|
|
1908
|
+
/* @__PURE__ */ l(wo, {}),
|
|
1909
|
+
/* @__PURE__ */ l(Bo, {})
|
|
1986
1910
|
] }) }),
|
|
1987
|
-
/* @__PURE__ */ l(
|
|
1911
|
+
/* @__PURE__ */ l(Ue, { className: "flex-1 overflow-hidden bg-muted/30 flex flex-col", children: /* @__PURE__ */ l(Xe, { className: "p-4 flex-1 flex justify-center overflow-hidden", children: /* @__PURE__ */ l(st, { className: "h-full w-full", children: /* @__PURE__ */ l("div", { className: "flex justify-center min-h-full", children: /* @__PURE__ */ l(
|
|
1988
1912
|
"div",
|
|
1989
1913
|
{
|
|
1990
1914
|
className: "bg-white rounded-lg min-h-full p-4 border border-dashed border-border transition-all duration-300 shadow-sm",
|
|
@@ -1992,15 +1916,15 @@ const Fn = ({ initialData: e, onSave: t, onStateChange: o }) => {
|
|
|
1992
1916
|
width: typeof i == "number" ? `${i}px` : i,
|
|
1993
1917
|
maxWidth: "100%"
|
|
1994
1918
|
},
|
|
1995
|
-
children: /* @__PURE__ */ l(
|
|
1919
|
+
children: /* @__PURE__ */ l(On, { htmlJson: e })
|
|
1996
1920
|
}
|
|
1997
1921
|
) }) }) }) }),
|
|
1998
|
-
/* @__PURE__ */ l(
|
|
1922
|
+
/* @__PURE__ */ l(Ue, { className: "w-72 shrink-0 flex flex-col", children: /* @__PURE__ */ l(Xe, { className: "p-4 flex-1 overflow-hidden", children: /* @__PURE__ */ l(zo, {}) }) })
|
|
1999
1923
|
] })
|
|
2000
1924
|
] }) }) })
|
|
2001
1925
|
}
|
|
2002
1926
|
);
|
|
2003
1927
|
};
|
|
2004
1928
|
export {
|
|
2005
|
-
|
|
1929
|
+
$n as default
|
|
2006
1930
|
};
|