@billgangcom/theme-lib 1.35.1 → 1.36.1
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/builder/constants/theme-settings.d.ts +0 -1
- package/dist/builder.cjs.js +4 -4
- package/dist/builder.es.js +200 -220
- package/dist/{index-fMRXTmQw.js → index-CAh3qv6L.js} +8 -9
- package/dist/{index-miO7bKV5.cjs → index-D1mPV-lW.cjs} +3 -3
- package/dist/ui.cjs.js +1 -1
- package/dist/ui.es.js +725 -741
- package/package.json +1 -1
package/dist/ui.es.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { j as t, I as
|
|
2
|
-
import { p as fa, L as xa } from "./index-
|
|
1
|
+
import { j as t, I as b, c as z, a as W, S as Z, T as Ot, C as gt, b as st, u as $t, d as Nt, D as It, e as wt, v as Ct, B as at, f as mt, P as Bt, g as St, h as Tt, i as Ht, k as jt, l as Pt, m as qt, M as Et, n as Dt, o as zt } from "./index-CAh3qv6L.js";
|
|
2
|
+
import { p as fa, L as xa } from "./index-CAh3qv6L.js";
|
|
3
3
|
import g from "react";
|
|
4
4
|
import "@phosphor-icons/react";
|
|
5
5
|
const Ft = "_wrapper_3ibiw_2", Vt = "_alignmentBlock_3ibiw_8", Ut = "_title_3ibiw_15", Yt = "_subtitle_3ibiw_22", Gt = "_alignmentContent_3ibiw_29", Wt = "_alignments_3ibiw_37", Xt = "_alignment_3ibiw_8", Jt = "_circle_3ibiw_63", Qt = "_paddings_3ibiw_70", Kt = "_padding_3ibiw_70", Zt = "_active_3ibiw_94", te = "_input_3ibiw_101", J = {
|
|
@@ -57,7 +57,7 @@ const Ft = "_wrapper_3ibiw_2", Vt = "_alignmentBlock_3ibiw_8", Ut = "_title_3ibi
|
|
|
57
57
|
return "AlignBottom";
|
|
58
58
|
}
|
|
59
59
|
}
|
|
60
|
-
const [
|
|
60
|
+
const [m, n] = g.useState(null);
|
|
61
61
|
return /* @__PURE__ */ t.jsxs("div", { className: J.layout, children: [
|
|
62
62
|
/* @__PURE__ */ t.jsx("h3", { className: J.title, children: "Layout" }),
|
|
63
63
|
/* @__PURE__ */ t.jsxs("div", { className: J.alignmentBlock, children: [
|
|
@@ -73,7 +73,7 @@ const Ft = "_wrapper_3ibiw_2", Vt = "_alignmentBlock_3ibiw_8", Ut = "_title_3ibi
|
|
|
73
73
|
children: [
|
|
74
74
|
o !== c && /* @__PURE__ */ t.jsx("div", { className: J.circle }),
|
|
75
75
|
o === c && /* @__PURE__ */ t.jsx(
|
|
76
|
-
|
|
76
|
+
b,
|
|
77
77
|
{
|
|
78
78
|
name: a(),
|
|
79
79
|
fill: "#FF3F19",
|
|
@@ -88,8 +88,8 @@ const Ft = "_wrapper_3ibiw_2", Vt = "_alignmentBlock_3ibiw_8", Ut = "_title_3ibi
|
|
|
88
88
|
/* @__PURE__ */ t.jsx("div", { className: J.paddings, children: se.map((o) => /* @__PURE__ */ t.jsxs(
|
|
89
89
|
"label",
|
|
90
90
|
{
|
|
91
|
-
className:
|
|
92
|
-
[J.active]:
|
|
91
|
+
className: z(J.padding, {
|
|
92
|
+
[J.active]: m === o
|
|
93
93
|
}),
|
|
94
94
|
onFocus: () => {
|
|
95
95
|
n(o);
|
|
@@ -99,7 +99,7 @@ const Ft = "_wrapper_3ibiw_2", Vt = "_alignmentBlock_3ibiw_8", Ut = "_title_3ibi
|
|
|
99
99
|
},
|
|
100
100
|
children: [
|
|
101
101
|
/* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
|
|
102
|
-
|
|
102
|
+
b,
|
|
103
103
|
{
|
|
104
104
|
name: l(o),
|
|
105
105
|
width: 20,
|
|
@@ -107,13 +107,13 @@ const Ft = "_wrapper_3ibiw_2", Vt = "_alignmentBlock_3ibiw_8", Ut = "_title_3ibi
|
|
|
107
107
|
}
|
|
108
108
|
) }),
|
|
109
109
|
/* @__PURE__ */ t.jsx(
|
|
110
|
-
|
|
110
|
+
W,
|
|
111
111
|
{
|
|
112
112
|
type: "number",
|
|
113
113
|
value: String(e[o]),
|
|
114
|
-
onChange: (
|
|
114
|
+
onChange: (x) => s({
|
|
115
115
|
...e,
|
|
116
|
-
[o]: Number(
|
|
116
|
+
[o]: Number(x)
|
|
117
117
|
}),
|
|
118
118
|
paddingless: !0,
|
|
119
119
|
borderless: !0
|
|
@@ -156,19 +156,19 @@ const Ft = "_wrapper_3ibiw_2", Vt = "_alignmentBlock_3ibiw_8", Ut = "_title_3ibi
|
|
|
156
156
|
return /* @__PURE__ */ t.jsx("div", { className: vt.typeTexts, children: me.map((i) => /* @__PURE__ */ t.jsx(
|
|
157
157
|
"div",
|
|
158
158
|
{
|
|
159
|
-
className:
|
|
159
|
+
className: z(vt.block, {
|
|
160
160
|
[vt.active]: c.includes(i)
|
|
161
161
|
}),
|
|
162
162
|
onClick: () => {
|
|
163
163
|
const a = [...c];
|
|
164
164
|
if (a.includes(i)) {
|
|
165
|
-
const l = a.filter((
|
|
165
|
+
const l = a.filter((m) => m !== i);
|
|
166
166
|
e(l);
|
|
167
167
|
} else
|
|
168
168
|
a.push(i), e(a);
|
|
169
169
|
},
|
|
170
170
|
children: /* @__PURE__ */ t.jsx(
|
|
171
|
-
|
|
171
|
+
b,
|
|
172
172
|
{
|
|
173
173
|
name: s(i),
|
|
174
174
|
fill: c.includes(i) ? "#252525" : "#757575",
|
|
@@ -187,14 +187,14 @@ const Ft = "_wrapper_3ibiw_2", Vt = "_alignmentBlock_3ibiw_8", Ut = "_title_3ibi
|
|
|
187
187
|
text: i,
|
|
188
188
|
setText: a,
|
|
189
189
|
setTypesText: l,
|
|
190
|
-
title:
|
|
190
|
+
title: m,
|
|
191
191
|
subtitle: n = "Items"
|
|
192
192
|
} = r;
|
|
193
193
|
return /* @__PURE__ */ t.jsxs("div", { className: ht.text, children: [
|
|
194
|
-
(
|
|
195
|
-
|
|
194
|
+
(m || e !== void 0) && /* @__PURE__ */ t.jsxs("div", { className: ht.top, children: [
|
|
195
|
+
m && /* @__PURE__ */ t.jsx("h3", { className: ht.title, children: m }),
|
|
196
196
|
e !== void 0 && s && /* @__PURE__ */ t.jsx(
|
|
197
|
-
|
|
197
|
+
Z,
|
|
198
198
|
{
|
|
199
199
|
current: e,
|
|
200
200
|
onChange: (o) => s(o)
|
|
@@ -220,21 +220,21 @@ const Ft = "_wrapper_3ibiw_2", Vt = "_alignmentBlock_3ibiw_8", Ut = "_title_3ibi
|
|
|
220
220
|
)
|
|
221
221
|
] })
|
|
222
222
|
] });
|
|
223
|
-
}, he = "_title_157lh_1", _e = "_subtitle_157lh_5", pe = "_header_157lh_12", ge = "_text_157lh_13", fe = "_productsBlock_157lh_14", xe = "_top_157lh_26",
|
|
223
|
+
}, he = "_title_157lh_1", _e = "_subtitle_157lh_5", pe = "_header_157lh_12", ge = "_text_157lh_13", fe = "_productsBlock_157lh_14", xe = "_top_157lh_26", je = "_itemsBlock_157lh_35", be = "_typeTexts_157lh_41", ve = "_block_157lh_48", ye = "_active_157lh_61", ke = "_products_157lh_14", $e = "_product_157lh_14", Ne = "_button_157lh_80", Ie = "_disabled_157lh_91", we = "_image_157lh_95", Ce = "_info_157lh_102", Be = "_name_157lh_114", Se = "_buttons_157lh_118", Te = "_modal_157lh_125", Pe = "_link_157lh_145", Ae = "_modalOptions_157lh_151", Oe = "_addButton_157lh_163", qe = "_deleteButton_157lh_178", H = {
|
|
224
224
|
title: he,
|
|
225
225
|
subtitle: _e,
|
|
226
226
|
header: pe,
|
|
227
227
|
text: ge,
|
|
228
228
|
productsBlock: fe,
|
|
229
229
|
top: xe,
|
|
230
|
-
itemsBlock:
|
|
231
|
-
typeTexts:
|
|
230
|
+
itemsBlock: je,
|
|
231
|
+
typeTexts: be,
|
|
232
232
|
block: ve,
|
|
233
233
|
active: ye,
|
|
234
234
|
products: ke,
|
|
235
235
|
product: $e,
|
|
236
|
-
button:
|
|
237
|
-
disabled:
|
|
236
|
+
button: Ne,
|
|
237
|
+
disabled: Ie,
|
|
238
238
|
image: we,
|
|
239
239
|
info: Ce,
|
|
240
240
|
name: Be,
|
|
@@ -247,14 +247,14 @@ const Ft = "_wrapper_3ibiw_2", Vt = "_alignmentBlock_3ibiw_8", Ut = "_title_3ibi
|
|
|
247
247
|
}, Ee = g.forwardRef(
|
|
248
248
|
(r, c) => {
|
|
249
249
|
const { activeItem: e, setActiveItem: s, popupPosition: i, modalOptions: a, setIsOpenModal: l } = r;
|
|
250
|
-
function
|
|
250
|
+
function m(n, o) {
|
|
251
251
|
return n.length > o ? `${n.slice(0, o)}...` : n;
|
|
252
252
|
}
|
|
253
253
|
return /* @__PURE__ */ t.jsxs(
|
|
254
254
|
"div",
|
|
255
255
|
{
|
|
256
256
|
ref: c,
|
|
257
|
-
className:
|
|
257
|
+
className: H.modal,
|
|
258
258
|
onClick: (n) => {
|
|
259
259
|
n.stopPropagation();
|
|
260
260
|
},
|
|
@@ -263,10 +263,10 @@ const Ft = "_wrapper_3ibiw_2", Vt = "_alignmentBlock_3ibiw_8", Ut = "_title_3ibi
|
|
|
263
263
|
left: `${i.left}px`
|
|
264
264
|
},
|
|
265
265
|
children: [
|
|
266
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
267
|
-
/* @__PURE__ */ t.jsx("h3", { className:
|
|
266
|
+
/* @__PURE__ */ t.jsxs("div", { className: H.top, children: [
|
|
267
|
+
/* @__PURE__ */ t.jsx("h3", { className: H.title, children: m(e.name, 20) }),
|
|
268
268
|
/* @__PURE__ */ t.jsx(
|
|
269
|
-
|
|
269
|
+
b,
|
|
270
270
|
{
|
|
271
271
|
name: "X",
|
|
272
272
|
height: 20,
|
|
@@ -278,7 +278,7 @@ const Ft = "_wrapper_3ibiw_2", Vt = "_alignmentBlock_3ibiw_8", Ut = "_title_3ibi
|
|
|
278
278
|
}
|
|
279
279
|
)
|
|
280
280
|
] }),
|
|
281
|
-
/* @__PURE__ */ t.jsx("div", { className:
|
|
281
|
+
/* @__PURE__ */ t.jsx("div", { className: H.modalOptions, children: a.map((n) => {
|
|
282
282
|
if (n.type === "image")
|
|
283
283
|
return /* @__PURE__ */ t.jsx(
|
|
284
284
|
gt,
|
|
@@ -286,11 +286,11 @@ const Ft = "_wrapper_3ibiw_2", Vt = "_alignmentBlock_3ibiw_8", Ut = "_title_3ibi
|
|
|
286
286
|
label: "Put up an attractive image",
|
|
287
287
|
activeImage: e[n.field],
|
|
288
288
|
onChange: (o) => {
|
|
289
|
-
const
|
|
289
|
+
const x = {
|
|
290
290
|
...e,
|
|
291
291
|
[n.field]: o
|
|
292
292
|
};
|
|
293
|
-
s(
|
|
293
|
+
s(x);
|
|
294
294
|
}
|
|
295
295
|
},
|
|
296
296
|
String(n.field)
|
|
@@ -301,33 +301,33 @@ const Ft = "_wrapper_3ibiw_2", Vt = "_alignmentBlock_3ibiw_8", Ut = "_title_3ibi
|
|
|
301
301
|
{
|
|
302
302
|
typesText: e[n.field.type],
|
|
303
303
|
setTypesText: (o) => {
|
|
304
|
-
const
|
|
304
|
+
const x = {
|
|
305
305
|
...e,
|
|
306
306
|
[n.field.type]: o
|
|
307
307
|
};
|
|
308
|
-
s(
|
|
308
|
+
s(x);
|
|
309
309
|
},
|
|
310
310
|
text: e[n.field.text] || "",
|
|
311
311
|
setText: (o) => {
|
|
312
|
-
const
|
|
312
|
+
const x = {
|
|
313
313
|
...e,
|
|
314
314
|
[n.field.text]: o
|
|
315
315
|
};
|
|
316
|
-
s(
|
|
316
|
+
s(x);
|
|
317
317
|
},
|
|
318
318
|
subtitle: n.label
|
|
319
319
|
}
|
|
320
320
|
);
|
|
321
321
|
if (n.type === "input")
|
|
322
322
|
return /* @__PURE__ */ t.jsx(
|
|
323
|
-
|
|
323
|
+
W,
|
|
324
324
|
{
|
|
325
325
|
onChange: (o) => {
|
|
326
|
-
const
|
|
326
|
+
const x = {
|
|
327
327
|
...e,
|
|
328
328
|
[n.field]: o
|
|
329
329
|
};
|
|
330
|
-
s(
|
|
330
|
+
s(x);
|
|
331
331
|
},
|
|
332
332
|
value: e[n.field] || "",
|
|
333
333
|
label: n.label,
|
|
@@ -335,16 +335,16 @@ const Ft = "_wrapper_3ibiw_2", Vt = "_alignmentBlock_3ibiw_8", Ut = "_title_3ibi
|
|
|
335
335
|
}
|
|
336
336
|
);
|
|
337
337
|
if (n.type === "inputSwitch")
|
|
338
|
-
return /* @__PURE__ */ t.jsxs("div", { className:
|
|
338
|
+
return /* @__PURE__ */ t.jsxs("div", { className: H.link, children: [
|
|
339
339
|
/* @__PURE__ */ t.jsx(
|
|
340
|
-
|
|
340
|
+
W,
|
|
341
341
|
{
|
|
342
342
|
onChange: (o) => {
|
|
343
|
-
const
|
|
343
|
+
const x = {
|
|
344
344
|
...e,
|
|
345
345
|
[n.field.text]: o
|
|
346
346
|
};
|
|
347
|
-
s(
|
|
347
|
+
s(x);
|
|
348
348
|
},
|
|
349
349
|
value: e[n.field.text] || "",
|
|
350
350
|
label: n.inputLabel,
|
|
@@ -352,16 +352,16 @@ const Ft = "_wrapper_3ibiw_2", Vt = "_alignmentBlock_3ibiw_8", Ut = "_title_3ibi
|
|
|
352
352
|
}
|
|
353
353
|
),
|
|
354
354
|
/* @__PURE__ */ t.jsx(
|
|
355
|
-
|
|
355
|
+
Z,
|
|
356
356
|
{
|
|
357
357
|
current: !!e[n.field.switch] || !1,
|
|
358
358
|
label: n.switchLabel,
|
|
359
359
|
onChange: (o) => {
|
|
360
|
-
const
|
|
360
|
+
const x = {
|
|
361
361
|
...e,
|
|
362
362
|
[n.field.switch]: o
|
|
363
363
|
};
|
|
364
|
-
s(
|
|
364
|
+
s(x);
|
|
365
365
|
}
|
|
366
366
|
}
|
|
367
367
|
)
|
|
@@ -372,11 +372,11 @@ const Ft = "_wrapper_3ibiw_2", Vt = "_alignmentBlock_3ibiw_8", Ut = "_title_3ibi
|
|
|
372
372
|
{
|
|
373
373
|
items: e[n.field] || [],
|
|
374
374
|
setItems: (o) => {
|
|
375
|
-
const
|
|
375
|
+
const x = {
|
|
376
376
|
...e,
|
|
377
377
|
[n.field]: o
|
|
378
378
|
};
|
|
379
|
-
s(
|
|
379
|
+
s(x);
|
|
380
380
|
},
|
|
381
381
|
itemsType: "select",
|
|
382
382
|
draggable: n.draggable || !1,
|
|
@@ -389,19 +389,19 @@ const Ft = "_wrapper_3ibiw_2", Vt = "_alignmentBlock_3ibiw_8", Ut = "_title_3ibi
|
|
|
389
389
|
);
|
|
390
390
|
if (n.type === "select")
|
|
391
391
|
return /* @__PURE__ */ t.jsx(
|
|
392
|
-
|
|
392
|
+
st,
|
|
393
393
|
{
|
|
394
394
|
options: n.itemsOptions,
|
|
395
395
|
onChange: (o) => {
|
|
396
|
-
const
|
|
396
|
+
const x = {
|
|
397
397
|
...e,
|
|
398
398
|
[n.field]: o
|
|
399
399
|
};
|
|
400
|
-
s(
|
|
400
|
+
s(x);
|
|
401
401
|
},
|
|
402
402
|
label: n.label,
|
|
403
403
|
value: e[n.field] || "String",
|
|
404
|
-
leftAddon: n.leftAddon && n.leftAddon === "icon" && /* @__PURE__ */ t.jsx(
|
|
404
|
+
leftAddon: n.leftAddon && n.leftAddon === "icon" && /* @__PURE__ */ t.jsx(b, { name: e[n.field] })
|
|
405
405
|
}
|
|
406
406
|
);
|
|
407
407
|
}) })
|
|
@@ -413,12 +413,12 @@ const Ft = "_wrapper_3ibiw_2", Vt = "_alignmentBlock_3ibiw_8", Ut = "_title_3ibi
|
|
|
413
413
|
other: De,
|
|
414
414
|
subtitle: Le,
|
|
415
415
|
items: Re
|
|
416
|
-
},
|
|
416
|
+
}, bt = (r) => {
|
|
417
417
|
const { items: c, title: e = "Other" } = r;
|
|
418
418
|
return /* @__PURE__ */ t.jsxs("div", { className: yt.other, children: [
|
|
419
419
|
/* @__PURE__ */ t.jsx("h5", { className: yt.subtitle, children: e }),
|
|
420
420
|
/* @__PURE__ */ t.jsx("div", { className: yt.items, children: c.map((s, i) => /* @__PURE__ */ t.jsx(
|
|
421
|
-
|
|
421
|
+
Z,
|
|
422
422
|
{
|
|
423
423
|
current: s.isItem,
|
|
424
424
|
onChange: (a) => s.setIsItem(a),
|
|
@@ -437,7 +437,7 @@ function Me({ product: r, children: c }) {
|
|
|
437
437
|
setNodeRef: i,
|
|
438
438
|
transform: a,
|
|
439
439
|
transition: l,
|
|
440
|
-
isDragging:
|
|
440
|
+
isDragging: m
|
|
441
441
|
} = St({
|
|
442
442
|
id: r.id
|
|
443
443
|
}), n = {
|
|
@@ -449,7 +449,7 @@ function Me({ product: r, children: c }) {
|
|
|
449
449
|
{
|
|
450
450
|
ref: i,
|
|
451
451
|
style: n,
|
|
452
|
-
className: `${
|
|
452
|
+
className: `${H.product} ${m ? H.dragging : ""}`,
|
|
453
453
|
...e,
|
|
454
454
|
...s,
|
|
455
455
|
children: c
|
|
@@ -464,73 +464,73 @@ const He = (r) => {
|
|
|
464
464
|
setItems: i,
|
|
465
465
|
other: a,
|
|
466
466
|
title: l,
|
|
467
|
-
subtitle:
|
|
467
|
+
subtitle: m,
|
|
468
468
|
editable: n = !0,
|
|
469
469
|
draggable: o = !1,
|
|
470
|
-
withImage:
|
|
471
|
-
deletable:
|
|
472
|
-
addable:
|
|
473
|
-
itemsType:
|
|
474
|
-
itemsPlaceholder:
|
|
470
|
+
withImage: x = !1,
|
|
471
|
+
deletable: $ = !0,
|
|
472
|
+
addable: _ = !0,
|
|
473
|
+
itemsType: h,
|
|
474
|
+
itemsPlaceholder: p = "",
|
|
475
475
|
itemsOptions: d,
|
|
476
476
|
hasRangeSelector: w = !1,
|
|
477
|
-
rangeSelectorOptions:
|
|
477
|
+
rangeSelectorOptions: q,
|
|
478
478
|
modalOptions: y,
|
|
479
479
|
addableOptions: L = {},
|
|
480
480
|
limit: B,
|
|
481
481
|
autoScrollInterval: S
|
|
482
|
-
} = r, [
|
|
482
|
+
} = r, [f, D] = g.useState(null), [X, tt] = g.useState({
|
|
483
483
|
top: 0,
|
|
484
484
|
left: 0
|
|
485
|
-
}), [
|
|
486
|
-
|
|
485
|
+
}), [v, N] = g.useState(null), E = g.useRef(null), [G, A] = g.useState(!1), M = $t(
|
|
486
|
+
Nt(Bt, {
|
|
487
487
|
activationConstraint: {
|
|
488
488
|
distance: 5
|
|
489
489
|
}
|
|
490
490
|
})
|
|
491
491
|
);
|
|
492
492
|
g.useEffect(() => {
|
|
493
|
-
const
|
|
494
|
-
|
|
493
|
+
const u = () => {
|
|
494
|
+
D(null), A(!1);
|
|
495
495
|
};
|
|
496
|
-
return document.body.addEventListener("click",
|
|
497
|
-
|
|
496
|
+
return document.body.addEventListener("click", u), D(null), A(!1), () => {
|
|
497
|
+
D(null), A(!1), document.body.removeEventListener("click", u);
|
|
498
498
|
};
|
|
499
499
|
}, []), g.useEffect(() => {
|
|
500
|
-
if (
|
|
501
|
-
const
|
|
502
|
-
i(
|
|
500
|
+
if (f) {
|
|
501
|
+
const u = [...s].map((k) => k.id === f.id ? f : k);
|
|
502
|
+
i(u);
|
|
503
503
|
}
|
|
504
|
-
}, [
|
|
505
|
-
if (
|
|
506
|
-
const
|
|
507
|
-
let
|
|
508
|
-
|
|
509
|
-
top:
|
|
510
|
-
left:
|
|
504
|
+
}, [f]), g.useEffect(() => {
|
|
505
|
+
if (E.current && v) {
|
|
506
|
+
const u = E.current.getBoundingClientRect().height, k = window.innerHeight;
|
|
507
|
+
let T = v.top;
|
|
508
|
+
T + u > k + window.scrollY - 200 && (T = k + window.scrollY - u - 200), T < 0 && (T = 10), tt({
|
|
509
|
+
top: T,
|
|
510
|
+
left: v.left
|
|
511
511
|
});
|
|
512
512
|
}
|
|
513
|
-
}, [
|
|
514
|
-
const
|
|
515
|
-
|
|
516
|
-
const
|
|
517
|
-
|
|
518
|
-
top:
|
|
519
|
-
left:
|
|
520
|
-
}),
|
|
513
|
+
}, [E.current, v]);
|
|
514
|
+
const K = (u, k) => {
|
|
515
|
+
u.stopPropagation();
|
|
516
|
+
const T = u.target.getBoundingClientRect();
|
|
517
|
+
N({
|
|
518
|
+
top: T.top + window.scrollY,
|
|
519
|
+
left: T.left - 30
|
|
520
|
+
}), D(k), A(!0);
|
|
521
521
|
};
|
|
522
|
-
function ct(
|
|
523
|
-
if (
|
|
524
|
-
return
|
|
522
|
+
function ct(u) {
|
|
523
|
+
if (x)
|
|
524
|
+
return u ? /* @__PURE__ */ t.jsx(
|
|
525
525
|
"img",
|
|
526
526
|
{
|
|
527
|
-
src: `https://imagedelivery.net/${
|
|
527
|
+
src: `https://imagedelivery.net/${u[0]}/w=1000`,
|
|
528
528
|
alt: "image",
|
|
529
529
|
width: 16,
|
|
530
530
|
height: 16
|
|
531
531
|
}
|
|
532
532
|
) : /* @__PURE__ */ t.jsx(
|
|
533
|
-
|
|
533
|
+
b,
|
|
534
534
|
{
|
|
535
535
|
name: "Image",
|
|
536
536
|
width: 16,
|
|
@@ -539,20 +539,20 @@ const He = (r) => {
|
|
|
539
539
|
}
|
|
540
540
|
);
|
|
541
541
|
}
|
|
542
|
-
const j = (
|
|
543
|
-
const { active: k, over:
|
|
544
|
-
if (
|
|
545
|
-
const R = s.findIndex((
|
|
546
|
-
if (R !== -1 &&
|
|
547
|
-
const
|
|
548
|
-
|
|
542
|
+
const j = (u) => {
|
|
543
|
+
const { active: k, over: T } = u;
|
|
544
|
+
if (T && k.id !== T.id) {
|
|
545
|
+
const R = s.findIndex((P) => P.id === k.id), V = s.findIndex((P) => P.id === T.id);
|
|
546
|
+
if (R !== -1 && V !== -1) {
|
|
547
|
+
const P = [...s], [lt] = P.splice(R, 1);
|
|
548
|
+
P.splice(V, 0, lt), i(P);
|
|
549
549
|
}
|
|
550
550
|
}
|
|
551
|
-
},
|
|
552
|
-
var R,
|
|
553
|
-
const
|
|
551
|
+
}, O = (u, k) => {
|
|
552
|
+
var R, V;
|
|
553
|
+
const T = /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
554
554
|
o && /* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
|
|
555
|
-
|
|
555
|
+
b,
|
|
556
556
|
{
|
|
557
557
|
name: "DotsSixVertical",
|
|
558
558
|
hoverable: !0,
|
|
@@ -560,73 +560,73 @@ const He = (r) => {
|
|
|
560
560
|
height: 20
|
|
561
561
|
}
|
|
562
562
|
) }),
|
|
563
|
-
|
|
564
|
-
|
|
563
|
+
h === "select" && d && /* @__PURE__ */ t.jsx(
|
|
564
|
+
st,
|
|
565
565
|
{
|
|
566
|
-
onChange: (
|
|
567
|
-
const lt = [...s], ut = d.find((ft) => ft.name ===
|
|
566
|
+
onChange: (P) => {
|
|
567
|
+
const lt = [...s], ut = d.find((ft) => ft.name === P);
|
|
568
568
|
if (!ut) return;
|
|
569
|
-
const rt = lt.map((ft) => ft.id ===
|
|
569
|
+
const rt = lt.map((ft) => ft.id === u.id ? {
|
|
570
570
|
...ut,
|
|
571
|
-
name:
|
|
571
|
+
name: P
|
|
572
572
|
} : ft);
|
|
573
|
-
|
|
574
|
-
...
|
|
575
|
-
name:
|
|
573
|
+
D({
|
|
574
|
+
...u,
|
|
575
|
+
name: P
|
|
576
576
|
}), i([...rt]);
|
|
577
577
|
},
|
|
578
|
-
value:
|
|
579
|
-
options: d.filter((
|
|
580
|
-
leftAddon: ct(
|
|
578
|
+
value: u.name,
|
|
579
|
+
options: d.filter((P) => !s.find((lt) => lt.name === P.name)).map((P) => P.name),
|
|
580
|
+
leftAddon: ct(u.images)
|
|
581
581
|
}
|
|
582
582
|
),
|
|
583
|
-
|
|
584
|
-
|
|
583
|
+
h === "input" && /* @__PURE__ */ t.jsx(
|
|
584
|
+
W,
|
|
585
585
|
{
|
|
586
|
-
onChange: (
|
|
587
|
-
const ut = [...s].map((rt) => rt.id ===
|
|
588
|
-
...
|
|
589
|
-
name:
|
|
586
|
+
onChange: (P) => {
|
|
587
|
+
const ut = [...s].map((rt) => rt.id === u.id ? {
|
|
588
|
+
...u,
|
|
589
|
+
name: P
|
|
590
590
|
} : rt);
|
|
591
591
|
i([...ut]);
|
|
592
592
|
},
|
|
593
|
-
value:
|
|
594
|
-
placeholder:
|
|
593
|
+
value: u.name,
|
|
594
|
+
placeholder: p
|
|
595
595
|
}
|
|
596
596
|
),
|
|
597
|
-
|
|
597
|
+
h === "image" && /* @__PURE__ */ t.jsx(
|
|
598
598
|
gt,
|
|
599
599
|
{
|
|
600
|
-
onChange: (
|
|
601
|
-
const ut = [...s].map((rt) => rt.id ===
|
|
602
|
-
...
|
|
603
|
-
images:
|
|
600
|
+
onChange: (P) => {
|
|
601
|
+
const ut = [...s].map((rt) => rt.id === u.id ? {
|
|
602
|
+
...u,
|
|
603
|
+
images: P
|
|
604
604
|
} : rt);
|
|
605
605
|
i([...ut]);
|
|
606
606
|
},
|
|
607
|
-
activeImage: (R = s.find((
|
|
607
|
+
activeImage: (R = s.find((P) => P.id === u.id)) != null && R.images ? (V = s.find((P) => P.id === u.id)) == null ? void 0 : V.images[0] : void 0
|
|
608
608
|
}
|
|
609
609
|
),
|
|
610
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
611
|
-
n && /* @__PURE__ */ t.jsx("div", { className:
|
|
612
|
-
|
|
610
|
+
/* @__PURE__ */ t.jsxs("div", { className: H.buttons, children: [
|
|
611
|
+
n && /* @__PURE__ */ t.jsx("div", { className: H.deleteButton, children: /* @__PURE__ */ t.jsx(
|
|
612
|
+
b,
|
|
613
613
|
{
|
|
614
614
|
name: "Sliders",
|
|
615
615
|
hoverable: !0,
|
|
616
616
|
width: 20,
|
|
617
617
|
height: 20,
|
|
618
|
-
onClick: (
|
|
618
|
+
onClick: (P) => K(P, u)
|
|
619
619
|
}
|
|
620
620
|
) }),
|
|
621
|
-
|
|
622
|
-
|
|
621
|
+
$ && /* @__PURE__ */ t.jsx("div", { className: H.deleteButton, children: /* @__PURE__ */ t.jsx(
|
|
622
|
+
b,
|
|
623
623
|
{
|
|
624
624
|
name: "Trash",
|
|
625
625
|
hoverable: !0,
|
|
626
626
|
width: 20,
|
|
627
627
|
height: 20,
|
|
628
628
|
fill: "#C12A2A",
|
|
629
|
-
onClick: () => i(s.filter((
|
|
629
|
+
onClick: () => i(s.filter((P) => P.id !== u.id))
|
|
630
630
|
}
|
|
631
631
|
) })
|
|
632
632
|
] })
|
|
@@ -634,61 +634,61 @@ const He = (r) => {
|
|
|
634
634
|
return o ? /* @__PURE__ */ t.jsx(
|
|
635
635
|
Me,
|
|
636
636
|
{
|
|
637
|
-
product:
|
|
637
|
+
product: u,
|
|
638
638
|
index: k,
|
|
639
|
-
children:
|
|
639
|
+
children: T
|
|
640
640
|
},
|
|
641
|
-
|
|
641
|
+
u.id
|
|
642
642
|
) : /* @__PURE__ */ t.jsx(
|
|
643
643
|
"div",
|
|
644
644
|
{
|
|
645
|
-
className:
|
|
646
|
-
children:
|
|
645
|
+
className: H.product,
|
|
646
|
+
children: T
|
|
647
647
|
},
|
|
648
|
-
|
|
648
|
+
u.id
|
|
649
649
|
);
|
|
650
650
|
};
|
|
651
|
-
return /* @__PURE__ */ t.jsxs("div", { className:
|
|
652
|
-
(l || c !== void 0) && /* @__PURE__ */ t.jsxs("div", { className:
|
|
653
|
-
l && /* @__PURE__ */ t.jsx("h3", { className:
|
|
651
|
+
return /* @__PURE__ */ t.jsxs("div", { className: H.productsBlock, children: [
|
|
652
|
+
(l || c !== void 0) && /* @__PURE__ */ t.jsxs("div", { className: H.top, children: [
|
|
653
|
+
l && /* @__PURE__ */ t.jsx("h3", { className: H.title, children: l }),
|
|
654
654
|
c !== void 0 && /* @__PURE__ */ t.jsx(
|
|
655
|
-
|
|
655
|
+
Z,
|
|
656
656
|
{
|
|
657
657
|
current: c,
|
|
658
|
-
onChange: (
|
|
658
|
+
onChange: (u) => e == null ? void 0 : e(u)
|
|
659
659
|
}
|
|
660
660
|
)
|
|
661
661
|
] }),
|
|
662
|
-
|
|
662
|
+
f && n && y && G && /* @__PURE__ */ t.jsx(
|
|
663
663
|
Ee,
|
|
664
664
|
{
|
|
665
|
-
ref:
|
|
666
|
-
activeItem:
|
|
667
|
-
setActiveItem:
|
|
668
|
-
popupPosition:
|
|
665
|
+
ref: E,
|
|
666
|
+
activeItem: f,
|
|
667
|
+
setActiveItem: D,
|
|
668
|
+
popupPosition: X,
|
|
669
669
|
modalOptions: y,
|
|
670
|
-
setIsOpenModal:
|
|
670
|
+
setIsOpenModal: A
|
|
671
671
|
}
|
|
672
672
|
),
|
|
673
|
-
w &&
|
|
674
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
675
|
-
|
|
673
|
+
w && q && /* @__PURE__ */ t.jsx(At, { ...q }),
|
|
674
|
+
/* @__PURE__ */ t.jsxs("div", { className: H.products, children: [
|
|
675
|
+
m && /* @__PURE__ */ t.jsx("h5", { className: H.subtitle, children: m }),
|
|
676
676
|
o ? /* @__PURE__ */ t.jsx(
|
|
677
|
-
|
|
677
|
+
It,
|
|
678
678
|
{
|
|
679
|
-
sensors:
|
|
679
|
+
sensors: M,
|
|
680
680
|
onDragEnd: j,
|
|
681
681
|
children: /* @__PURE__ */ t.jsx(
|
|
682
682
|
wt,
|
|
683
683
|
{
|
|
684
|
-
items: s.map((
|
|
684
|
+
items: s.map((u) => u.id),
|
|
685
685
|
strategy: Ct,
|
|
686
|
-
children: s.map((
|
|
686
|
+
children: s.map((u, k) => O(u, k))
|
|
687
687
|
}
|
|
688
688
|
)
|
|
689
689
|
}
|
|
690
|
-
) : s.map((
|
|
691
|
-
|
|
690
|
+
) : s.map((u, k) => O(u, k)),
|
|
691
|
+
_ && /* @__PURE__ */ t.jsx(
|
|
692
692
|
"div",
|
|
693
693
|
{
|
|
694
694
|
style: {
|
|
@@ -700,42 +700,42 @@ const He = (r) => {
|
|
|
700
700
|
at,
|
|
701
701
|
{
|
|
702
702
|
withoutHover: !0,
|
|
703
|
-
className:
|
|
704
|
-
[
|
|
703
|
+
className: z(H.button, {
|
|
704
|
+
[H.disabled]: !!(B && B <= s.length || s.length === (d == null ? void 0 : d.length))
|
|
705
705
|
}),
|
|
706
706
|
size: "s",
|
|
707
707
|
disabled: !!(B && B <= s.length || s.length === (d == null ? void 0 : d.length)),
|
|
708
708
|
onClick: () => {
|
|
709
|
-
const
|
|
709
|
+
const u = [...s];
|
|
710
710
|
let k = null;
|
|
711
711
|
if (d) {
|
|
712
|
-
for (let
|
|
713
|
-
if (!s.find((R) => R.id === d[
|
|
714
|
-
k = d[
|
|
712
|
+
for (let T = 0; T < d.length; T++)
|
|
713
|
+
if (!s.find((R) => R.id === d[T].id)) {
|
|
714
|
+
k = d[T];
|
|
715
715
|
break;
|
|
716
716
|
}
|
|
717
717
|
}
|
|
718
|
-
|
|
718
|
+
h === "select" && d ? u.push({
|
|
719
719
|
name: k ? k.name : d[0].name,
|
|
720
720
|
id: (k == null ? void 0 : k.id) || d[0].id,
|
|
721
721
|
...L
|
|
722
|
-
}) :
|
|
722
|
+
}) : h === "input" ? u.push({
|
|
723
723
|
name: "",
|
|
724
724
|
id: mt(),
|
|
725
725
|
...L
|
|
726
|
-
}) :
|
|
726
|
+
}) : u.push({
|
|
727
727
|
name: `Image ${s.length + 1}`,
|
|
728
728
|
id: mt(),
|
|
729
729
|
...L
|
|
730
|
-
}), i(
|
|
730
|
+
}), i(u);
|
|
731
731
|
},
|
|
732
732
|
style: {
|
|
733
733
|
width: "fit-content"
|
|
734
734
|
},
|
|
735
|
-
children: /* @__PURE__ */ t.jsxs("div", { className:
|
|
735
|
+
children: /* @__PURE__ */ t.jsxs("div", { className: H.addButton, children: [
|
|
736
736
|
/* @__PURE__ */ t.jsx("span", { children: "Add Option" }),
|
|
737
737
|
/* @__PURE__ */ t.jsx(
|
|
738
|
-
|
|
738
|
+
b,
|
|
739
739
|
{
|
|
740
740
|
name: "Plus",
|
|
741
741
|
width: 16,
|
|
@@ -748,14 +748,14 @@ const He = (r) => {
|
|
|
748
748
|
}
|
|
749
749
|
)
|
|
750
750
|
] }),
|
|
751
|
-
a !== void 0 && /* @__PURE__ */ t.jsx(
|
|
751
|
+
a !== void 0 && /* @__PURE__ */ t.jsx(bt, { items: a }),
|
|
752
752
|
S !== void 0 && /* @__PURE__ */ t.jsx(
|
|
753
|
-
|
|
753
|
+
W,
|
|
754
754
|
{
|
|
755
755
|
label: "Auto scroll interval",
|
|
756
756
|
type: "number",
|
|
757
757
|
value: String(S.scrollInterval),
|
|
758
|
-
onChange: (
|
|
758
|
+
onChange: (u) => S.setScrollInterval(Number(u)),
|
|
759
759
|
min: 0.1,
|
|
760
760
|
max: 100,
|
|
761
761
|
style: {
|
|
@@ -797,14 +797,14 @@ const He = (r) => {
|
|
|
797
797
|
setItems: i,
|
|
798
798
|
other: a,
|
|
799
799
|
title: l,
|
|
800
|
-
subtitle:
|
|
800
|
+
subtitle: m,
|
|
801
801
|
draggable: n = !1,
|
|
802
802
|
withImage: o = !1,
|
|
803
|
-
addable:
|
|
804
|
-
itemsOptions:
|
|
805
|
-
hasRangeSelector:
|
|
806
|
-
rangeSelectorOptions:
|
|
807
|
-
limit:
|
|
803
|
+
addable: x = !0,
|
|
804
|
+
itemsOptions: $,
|
|
805
|
+
hasRangeSelector: _ = !1,
|
|
806
|
+
rangeSelectorOptions: h,
|
|
807
|
+
limit: p,
|
|
808
808
|
autoScrollInterval: d
|
|
809
809
|
} = r;
|
|
810
810
|
function w(y) {
|
|
@@ -818,7 +818,7 @@ const He = (r) => {
|
|
|
818
818
|
height: 16
|
|
819
819
|
}
|
|
820
820
|
) : /* @__PURE__ */ t.jsx(
|
|
821
|
-
|
|
821
|
+
b,
|
|
822
822
|
{
|
|
823
823
|
name: "Image",
|
|
824
824
|
width: 16,
|
|
@@ -827,12 +827,12 @@ const He = (r) => {
|
|
|
827
827
|
}
|
|
828
828
|
);
|
|
829
829
|
}
|
|
830
|
-
const
|
|
831
|
-
const L =
|
|
830
|
+
const q = (y) => {
|
|
831
|
+
const L = $.find((S) => S.id === y);
|
|
832
832
|
if (!L) return;
|
|
833
833
|
const B = /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
834
834
|
n && /* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
|
|
835
|
-
|
|
835
|
+
b,
|
|
836
836
|
{
|
|
837
837
|
name: "DotsSixVertical",
|
|
838
838
|
hoverable: !0,
|
|
@@ -841,21 +841,21 @@ const He = (r) => {
|
|
|
841
841
|
}
|
|
842
842
|
) }),
|
|
843
843
|
/* @__PURE__ */ t.jsx(
|
|
844
|
-
|
|
844
|
+
st,
|
|
845
845
|
{
|
|
846
846
|
onChange: (S) => {
|
|
847
|
-
const
|
|
848
|
-
if (!
|
|
849
|
-
const
|
|
850
|
-
i([...
|
|
847
|
+
const f = [...s], D = $.find((v) => v.name === S);
|
|
848
|
+
if (!D) return;
|
|
849
|
+
const X = D.id, tt = f.map((v) => v === y ? X : v);
|
|
850
|
+
i([...tt]);
|
|
851
851
|
},
|
|
852
852
|
value: L.name,
|
|
853
|
-
options:
|
|
853
|
+
options: $.filter((S) => !s.find((f) => f === S.id)).map((S) => S.name),
|
|
854
854
|
leftAddon: w(L.images)
|
|
855
855
|
}
|
|
856
856
|
),
|
|
857
857
|
/* @__PURE__ */ t.jsx("div", { className: Q.buttons, children: /* @__PURE__ */ t.jsx("div", { className: Q.deleteButton, children: /* @__PURE__ */ t.jsx(
|
|
858
|
-
|
|
858
|
+
b,
|
|
859
859
|
{
|
|
860
860
|
name: "Trash",
|
|
861
861
|
hoverable: !0,
|
|
@@ -879,18 +879,18 @@ const He = (r) => {
|
|
|
879
879
|
(l || c !== void 0) && /* @__PURE__ */ t.jsxs("div", { className: Q.top, children: [
|
|
880
880
|
l && /* @__PURE__ */ t.jsx("h3", { className: Q.title, children: l }),
|
|
881
881
|
c !== void 0 && /* @__PURE__ */ t.jsx(
|
|
882
|
-
|
|
882
|
+
Z,
|
|
883
883
|
{
|
|
884
884
|
current: c,
|
|
885
885
|
onChange: (y) => e == null ? void 0 : e(y)
|
|
886
886
|
}
|
|
887
887
|
)
|
|
888
888
|
] }),
|
|
889
|
-
|
|
889
|
+
_ && h && /* @__PURE__ */ t.jsx(At, { ...h }),
|
|
890
890
|
/* @__PURE__ */ t.jsxs("div", { className: Q.products, children: [
|
|
891
|
-
|
|
892
|
-
s.map((y) =>
|
|
893
|
-
|
|
891
|
+
m && /* @__PURE__ */ t.jsx("h5", { className: Q.subtitle, children: m }),
|
|
892
|
+
s.map((y) => q(y)),
|
|
893
|
+
x && /* @__PURE__ */ t.jsx(
|
|
894
894
|
"div",
|
|
895
895
|
{
|
|
896
896
|
style: {
|
|
@@ -903,22 +903,22 @@ const He = (r) => {
|
|
|
903
903
|
at,
|
|
904
904
|
{
|
|
905
905
|
withoutHover: !0,
|
|
906
|
-
className:
|
|
907
|
-
[Q.disabled]: !!(
|
|
906
|
+
className: z(Q.button, {
|
|
907
|
+
[Q.disabled]: !!(p && p <= s.length || s.length === $.length)
|
|
908
908
|
}),
|
|
909
909
|
size: "s",
|
|
910
|
-
disabled: !!(
|
|
910
|
+
disabled: !!(p && p <= s.length || s.length === $.length),
|
|
911
911
|
onClick: () => {
|
|
912
912
|
const y = [...s];
|
|
913
913
|
let L = null;
|
|
914
|
-
if (
|
|
915
|
-
for (let B = 0; B <
|
|
916
|
-
if (!s.find((S) => S ===
|
|
917
|
-
L =
|
|
914
|
+
if ($) {
|
|
915
|
+
for (let B = 0; B < $.length; B++)
|
|
916
|
+
if (!s.find((S) => S === $[B].id)) {
|
|
917
|
+
L = $[B];
|
|
918
918
|
break;
|
|
919
919
|
}
|
|
920
920
|
}
|
|
921
|
-
y.push((L == null ? void 0 : L.id) ||
|
|
921
|
+
y.push((L == null ? void 0 : L.id) || $[0].id), i(y);
|
|
922
922
|
},
|
|
923
923
|
style: {
|
|
924
924
|
width: "fit-content"
|
|
@@ -926,7 +926,7 @@ const He = (r) => {
|
|
|
926
926
|
children: /* @__PURE__ */ t.jsxs("div", { className: Q.addButton, children: [
|
|
927
927
|
/* @__PURE__ */ t.jsx("span", { children: "Add Option" }),
|
|
928
928
|
/* @__PURE__ */ t.jsx(
|
|
929
|
-
|
|
929
|
+
b,
|
|
930
930
|
{
|
|
931
931
|
name: "Plus",
|
|
932
932
|
width: 16,
|
|
@@ -939,9 +939,9 @@ const He = (r) => {
|
|
|
939
939
|
}
|
|
940
940
|
)
|
|
941
941
|
] }),
|
|
942
|
-
a !== void 0 && /* @__PURE__ */ t.jsx(
|
|
942
|
+
a !== void 0 && /* @__PURE__ */ t.jsx(bt, { items: a }),
|
|
943
943
|
d !== void 0 && /* @__PURE__ */ t.jsx(
|
|
944
|
-
|
|
944
|
+
W,
|
|
945
945
|
{
|
|
946
946
|
label: "Auto scroll interval",
|
|
947
947
|
type: "number",
|
|
@@ -956,7 +956,7 @@ const He = (r) => {
|
|
|
956
956
|
}
|
|
957
957
|
)
|
|
958
958
|
] });
|
|
959
|
-
}, us = "
|
|
959
|
+
}, us = "_title_fymju_1", ms = "_subtitle_fymju_5", hs = "_header_fymju_12", _s = "_text_fymju_13", ps = "_productsBlock_fymju_14", gs = "_top_fymju_26", fs = "_itemsBlock_fymju_35", xs = "_typeTexts_fymju_41", js = "_block_fymju_48", bs = "_active_fymju_61", vs = "_products_fymju_14", ys = "_product_fymju_14", ks = "_button_fymju_80", $s = "_disabled_fymju_91", Ns = "_image_fymju_95", Is = "_info_fymju_102", ws = "_name_fymju_114", Cs = "_buttons_fymju_118", Bs = "_modal_fymju_125", Ss = "_link_fymju_146", Ts = "_modalOptions_fymju_152", Ps = "_addButton_fymju_164", As = "_deleteButton_fymju_179", F = {
|
|
960
960
|
title: us,
|
|
961
961
|
subtitle: ms,
|
|
962
962
|
header: hs,
|
|
@@ -965,14 +965,14 @@ const He = (r) => {
|
|
|
965
965
|
top: gs,
|
|
966
966
|
itemsBlock: fs,
|
|
967
967
|
typeTexts: xs,
|
|
968
|
-
block:
|
|
969
|
-
active:
|
|
968
|
+
block: js,
|
|
969
|
+
active: bs,
|
|
970
970
|
products: vs,
|
|
971
971
|
product: ys,
|
|
972
972
|
button: ks,
|
|
973
973
|
disabled: $s,
|
|
974
|
-
image:
|
|
975
|
-
info:
|
|
974
|
+
image: Ns,
|
|
975
|
+
info: Is,
|
|
976
976
|
name: ws,
|
|
977
977
|
buttons: Cs,
|
|
978
978
|
modal: Bs,
|
|
@@ -983,7 +983,7 @@ const He = (r) => {
|
|
|
983
983
|
}, Os = g.forwardRef(
|
|
984
984
|
(r, c) => {
|
|
985
985
|
const { activeItem: e, setActiveItem: s, popupPosition: i, modalOptions: a, setIsOpenModal: l } = r;
|
|
986
|
-
function
|
|
986
|
+
function m(n, o) {
|
|
987
987
|
return n.length > o ? `${n.slice(0, o)}...` : n;
|
|
988
988
|
}
|
|
989
989
|
return /* @__PURE__ */ t.jsxs(
|
|
@@ -1000,9 +1000,9 @@ const He = (r) => {
|
|
|
1000
1000
|
},
|
|
1001
1001
|
children: [
|
|
1002
1002
|
/* @__PURE__ */ t.jsxs("div", { className: F.top, children: [
|
|
1003
|
-
/* @__PURE__ */ t.jsx("h3", { className: F.title, children:
|
|
1003
|
+
/* @__PURE__ */ t.jsx("h3", { className: F.title, children: m(e.name, 20) }),
|
|
1004
1004
|
/* @__PURE__ */ t.jsx(
|
|
1005
|
-
|
|
1005
|
+
b,
|
|
1006
1006
|
{
|
|
1007
1007
|
name: "X",
|
|
1008
1008
|
height: 20,
|
|
@@ -1022,11 +1022,11 @@ const He = (r) => {
|
|
|
1022
1022
|
label: "Put up an attractive image",
|
|
1023
1023
|
activeImage: e[n.field],
|
|
1024
1024
|
onChange: (o) => {
|
|
1025
|
-
const
|
|
1025
|
+
const x = {
|
|
1026
1026
|
...e,
|
|
1027
1027
|
[n.field]: o
|
|
1028
1028
|
};
|
|
1029
|
-
s(
|
|
1029
|
+
s(x);
|
|
1030
1030
|
}
|
|
1031
1031
|
},
|
|
1032
1032
|
String(n.field)
|
|
@@ -1037,33 +1037,33 @@ const He = (r) => {
|
|
|
1037
1037
|
{
|
|
1038
1038
|
typesText: e[n.field.type],
|
|
1039
1039
|
setTypesText: (o) => {
|
|
1040
|
-
const
|
|
1040
|
+
const x = {
|
|
1041
1041
|
...e,
|
|
1042
1042
|
[n.field.type]: o
|
|
1043
1043
|
};
|
|
1044
|
-
s(
|
|
1044
|
+
s(x);
|
|
1045
1045
|
},
|
|
1046
1046
|
text: e[n.field.text] || "",
|
|
1047
1047
|
setText: (o) => {
|
|
1048
|
-
const
|
|
1048
|
+
const x = {
|
|
1049
1049
|
...e,
|
|
1050
1050
|
[n.field.text]: o
|
|
1051
1051
|
};
|
|
1052
|
-
s(
|
|
1052
|
+
s(x);
|
|
1053
1053
|
},
|
|
1054
1054
|
subtitle: n.label
|
|
1055
1055
|
}
|
|
1056
1056
|
);
|
|
1057
1057
|
if (n.type === "input")
|
|
1058
1058
|
return /* @__PURE__ */ t.jsx(
|
|
1059
|
-
|
|
1059
|
+
W,
|
|
1060
1060
|
{
|
|
1061
1061
|
onChange: (o) => {
|
|
1062
|
-
const
|
|
1062
|
+
const x = {
|
|
1063
1063
|
...e,
|
|
1064
1064
|
[n.field]: o
|
|
1065
1065
|
};
|
|
1066
|
-
s(
|
|
1066
|
+
s(x);
|
|
1067
1067
|
},
|
|
1068
1068
|
value: e[n.field] || "",
|
|
1069
1069
|
label: n.label,
|
|
@@ -1073,14 +1073,14 @@ const He = (r) => {
|
|
|
1073
1073
|
if (n.type === "inputSwitch")
|
|
1074
1074
|
return /* @__PURE__ */ t.jsxs("div", { className: F.link, children: [
|
|
1075
1075
|
/* @__PURE__ */ t.jsx(
|
|
1076
|
-
|
|
1076
|
+
W,
|
|
1077
1077
|
{
|
|
1078
1078
|
onChange: (o) => {
|
|
1079
|
-
const
|
|
1079
|
+
const x = {
|
|
1080
1080
|
...e,
|
|
1081
1081
|
[n.field.text]: o
|
|
1082
1082
|
};
|
|
1083
|
-
s(
|
|
1083
|
+
s(x);
|
|
1084
1084
|
},
|
|
1085
1085
|
value: e[n.field.text] || "",
|
|
1086
1086
|
label: n.inputLabel,
|
|
@@ -1088,35 +1088,35 @@ const He = (r) => {
|
|
|
1088
1088
|
}
|
|
1089
1089
|
),
|
|
1090
1090
|
/* @__PURE__ */ t.jsx(
|
|
1091
|
-
|
|
1091
|
+
Z,
|
|
1092
1092
|
{
|
|
1093
1093
|
current: !!e[n.field.switch] || !1,
|
|
1094
1094
|
label: n.switchLabel,
|
|
1095
1095
|
onChange: (o) => {
|
|
1096
|
-
const
|
|
1096
|
+
const x = {
|
|
1097
1097
|
...e,
|
|
1098
1098
|
[n.field.switch]: o
|
|
1099
1099
|
};
|
|
1100
|
-
s(
|
|
1100
|
+
s(x);
|
|
1101
1101
|
}
|
|
1102
1102
|
}
|
|
1103
1103
|
)
|
|
1104
1104
|
] });
|
|
1105
1105
|
if (n.type === "select")
|
|
1106
1106
|
return /* @__PURE__ */ t.jsx(
|
|
1107
|
-
|
|
1107
|
+
st,
|
|
1108
1108
|
{
|
|
1109
1109
|
options: n.itemsOptions,
|
|
1110
1110
|
onChange: (o) => {
|
|
1111
|
-
const
|
|
1111
|
+
const x = {
|
|
1112
1112
|
...e,
|
|
1113
1113
|
[n.field]: o
|
|
1114
1114
|
};
|
|
1115
|
-
s(
|
|
1115
|
+
s(x);
|
|
1116
1116
|
},
|
|
1117
1117
|
label: n.label,
|
|
1118
1118
|
value: e[n.field] || "String",
|
|
1119
|
-
leftAddon: n.leftAddon && n.leftAddon === "icon" && /* @__PURE__ */ t.jsx(
|
|
1119
|
+
leftAddon: n.leftAddon && n.leftAddon === "icon" && /* @__PURE__ */ t.jsx(b, { name: e[n.field] })
|
|
1120
1120
|
}
|
|
1121
1121
|
);
|
|
1122
1122
|
}) })
|
|
@@ -1126,11 +1126,11 @@ const He = (r) => {
|
|
|
1126
1126
|
}
|
|
1127
1127
|
);
|
|
1128
1128
|
function qs(r) {
|
|
1129
|
-
const { product: c, children: e } = r, { attributes: s, listeners: i, setNodeRef: a, transform: l, transition:
|
|
1129
|
+
const { product: c, children: e } = r, { attributes: s, listeners: i, setNodeRef: a, transform: l, transition: m, isDragging: n } = St({
|
|
1130
1130
|
id: c.id
|
|
1131
1131
|
}), o = {
|
|
1132
1132
|
transform: Tt.Transform.toString(l),
|
|
1133
|
-
transition:
|
|
1133
|
+
transition: m
|
|
1134
1134
|
};
|
|
1135
1135
|
return /* @__PURE__ */ t.jsx(
|
|
1136
1136
|
"div",
|
|
@@ -1152,24 +1152,24 @@ const aa = (r) => {
|
|
|
1152
1152
|
setItems: i,
|
|
1153
1153
|
other: a,
|
|
1154
1154
|
title: l,
|
|
1155
|
-
subtitle:
|
|
1155
|
+
subtitle: m,
|
|
1156
1156
|
editable: n = !0,
|
|
1157
1157
|
draggable: o = !1,
|
|
1158
|
-
withImage:
|
|
1159
|
-
deletable:
|
|
1160
|
-
addable:
|
|
1161
|
-
itemsType:
|
|
1162
|
-
itemsPlaceholder:
|
|
1158
|
+
withImage: x = !1,
|
|
1159
|
+
deletable: $ = !0,
|
|
1160
|
+
addable: _ = !0,
|
|
1161
|
+
itemsType: h,
|
|
1162
|
+
itemsPlaceholder: p = "",
|
|
1163
1163
|
itemsOptions: d,
|
|
1164
1164
|
hasRangeSelector: w = !1,
|
|
1165
|
-
rangeSelectorOptions:
|
|
1165
|
+
rangeSelectorOptions: q,
|
|
1166
1166
|
modalOptions: y,
|
|
1167
1167
|
addableOptions: L = {}
|
|
1168
|
-
} = r, [B, S] = g.useState(null), [
|
|
1168
|
+
} = r, [B, S] = g.useState(null), [f, D] = g.useState({
|
|
1169
1169
|
top: 0,
|
|
1170
1170
|
left: 0
|
|
1171
|
-
}), [
|
|
1172
|
-
|
|
1171
|
+
}), [X, tt] = g.useState(null), v = g.useRef(null), [N, E] = g.useState(!1), G = $t(
|
|
1172
|
+
Nt(Bt, {
|
|
1173
1173
|
activationConstraint: {
|
|
1174
1174
|
distance: 5
|
|
1175
1175
|
}
|
|
@@ -1177,36 +1177,36 @@ const aa = (r) => {
|
|
|
1177
1177
|
);
|
|
1178
1178
|
g.useEffect(() => {
|
|
1179
1179
|
const j = () => {
|
|
1180
|
-
S(null),
|
|
1180
|
+
S(null), E(!1);
|
|
1181
1181
|
};
|
|
1182
|
-
return document.body.addEventListener("click", j), S(null),
|
|
1183
|
-
S(null),
|
|
1182
|
+
return document.body.addEventListener("click", j), S(null), E(!1), () => {
|
|
1183
|
+
S(null), E(!1), document.body.removeEventListener("click", j);
|
|
1184
1184
|
};
|
|
1185
1185
|
}, []), g.useEffect(() => {
|
|
1186
1186
|
if (B) {
|
|
1187
|
-
const j = [...s].map((
|
|
1187
|
+
const j = [...s].map((O) => O.id === B.id ? B : O);
|
|
1188
1188
|
i(j);
|
|
1189
1189
|
}
|
|
1190
1190
|
}, [B]), g.useEffect(() => {
|
|
1191
|
-
if (
|
|
1192
|
-
const j =
|
|
1193
|
-
let
|
|
1194
|
-
|
|
1195
|
-
top:
|
|
1196
|
-
left:
|
|
1191
|
+
if (v.current && X) {
|
|
1192
|
+
const j = v.current.getBoundingClientRect().height, O = window.innerHeight;
|
|
1193
|
+
let u = X.top;
|
|
1194
|
+
u + j > O + window.scrollY - 200 && (u = O + window.scrollY - j - 200), u < 0 && (u = 10), D({
|
|
1195
|
+
top: u,
|
|
1196
|
+
left: X.left
|
|
1197
1197
|
});
|
|
1198
1198
|
}
|
|
1199
|
-
}, [
|
|
1200
|
-
const
|
|
1199
|
+
}, [v.current, X]);
|
|
1200
|
+
const A = (j, O) => {
|
|
1201
1201
|
j.stopPropagation();
|
|
1202
|
-
const
|
|
1203
|
-
|
|
1204
|
-
top:
|
|
1205
|
-
left:
|
|
1206
|
-
}), S(
|
|
1202
|
+
const u = j.target.getBoundingClientRect();
|
|
1203
|
+
tt({
|
|
1204
|
+
top: u.top + window.scrollY,
|
|
1205
|
+
left: u.left - 30
|
|
1206
|
+
}), S(O), E(!0);
|
|
1207
1207
|
};
|
|
1208
|
-
function
|
|
1209
|
-
if (
|
|
1208
|
+
function M(j) {
|
|
1209
|
+
if (x)
|
|
1210
1210
|
return j ? /* @__PURE__ */ t.jsx(
|
|
1211
1211
|
"img",
|
|
1212
1212
|
{
|
|
@@ -1216,7 +1216,7 @@ const aa = (r) => {
|
|
|
1216
1216
|
height: 16
|
|
1217
1217
|
}
|
|
1218
1218
|
) : /* @__PURE__ */ t.jsx(
|
|
1219
|
-
|
|
1219
|
+
b,
|
|
1220
1220
|
{
|
|
1221
1221
|
name: "Image",
|
|
1222
1222
|
width: 16,
|
|
@@ -1225,20 +1225,20 @@ const aa = (r) => {
|
|
|
1225
1225
|
}
|
|
1226
1226
|
);
|
|
1227
1227
|
}
|
|
1228
|
-
const
|
|
1229
|
-
const { active:
|
|
1230
|
-
if (
|
|
1231
|
-
const k = s.findIndex((R) => R.id ===
|
|
1232
|
-
if (k !== -1 &&
|
|
1233
|
-
const R = [...s], [
|
|
1234
|
-
R.splice(
|
|
1228
|
+
const K = (j) => {
|
|
1229
|
+
const { active: O, over: u } = j;
|
|
1230
|
+
if (u && O.id !== u.id) {
|
|
1231
|
+
const k = s.findIndex((R) => R.id === O.id), T = s.findIndex((R) => R.id === u.id);
|
|
1232
|
+
if (k !== -1 && T !== -1) {
|
|
1233
|
+
const R = [...s], [V] = R.splice(k, 1);
|
|
1234
|
+
R.splice(T, 0, V), i(R);
|
|
1235
1235
|
}
|
|
1236
1236
|
}
|
|
1237
1237
|
}, ct = (j) => {
|
|
1238
|
-
var
|
|
1239
|
-
const
|
|
1238
|
+
var u;
|
|
1239
|
+
const O = /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
1240
1240
|
o && /* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
|
|
1241
|
-
|
|
1241
|
+
b,
|
|
1242
1242
|
{
|
|
1243
1243
|
name: "DotsSixVertical",
|
|
1244
1244
|
hoverable: !0,
|
|
@@ -1246,64 +1246,64 @@ const aa = (r) => {
|
|
|
1246
1246
|
height: 20
|
|
1247
1247
|
}
|
|
1248
1248
|
) }),
|
|
1249
|
-
|
|
1250
|
-
|
|
1249
|
+
h === "select" && d && /* @__PURE__ */ t.jsx(
|
|
1250
|
+
st,
|
|
1251
1251
|
{
|
|
1252
1252
|
onChange: (k) => {
|
|
1253
|
-
const R = [...s].map((
|
|
1253
|
+
const R = [...s].map((V) => V.id === j.id ? {
|
|
1254
1254
|
...j,
|
|
1255
1255
|
name: k
|
|
1256
|
-
} :
|
|
1256
|
+
} : V);
|
|
1257
1257
|
S({
|
|
1258
1258
|
...j,
|
|
1259
1259
|
name: k
|
|
1260
1260
|
}), i([...R]);
|
|
1261
1261
|
},
|
|
1262
1262
|
value: j.name,
|
|
1263
|
-
options: d.filter((k) => !s.find((
|
|
1264
|
-
leftAddon:
|
|
1263
|
+
options: d.filter((k) => !s.find((T) => T.name === k)),
|
|
1264
|
+
leftAddon: M(j.images)
|
|
1265
1265
|
}
|
|
1266
1266
|
),
|
|
1267
|
-
|
|
1268
|
-
|
|
1267
|
+
h === "input" && /* @__PURE__ */ t.jsx(
|
|
1268
|
+
W,
|
|
1269
1269
|
{
|
|
1270
1270
|
onChange: (k) => {
|
|
1271
|
-
const R = [...s].map((
|
|
1271
|
+
const R = [...s].map((V) => V.id === j.id ? {
|
|
1272
1272
|
...j,
|
|
1273
1273
|
name: k
|
|
1274
|
-
} :
|
|
1274
|
+
} : V);
|
|
1275
1275
|
i([...R]);
|
|
1276
1276
|
},
|
|
1277
1277
|
value: j.name,
|
|
1278
|
-
placeholder:
|
|
1278
|
+
placeholder: p
|
|
1279
1279
|
}
|
|
1280
1280
|
),
|
|
1281
|
-
|
|
1281
|
+
h === "image" && /* @__PURE__ */ t.jsx(
|
|
1282
1282
|
gt,
|
|
1283
1283
|
{
|
|
1284
1284
|
onChange: (k) => {
|
|
1285
|
-
const R = [...s].map((
|
|
1285
|
+
const R = [...s].map((V) => V.id === j.id ? {
|
|
1286
1286
|
...j,
|
|
1287
1287
|
images: k
|
|
1288
|
-
} :
|
|
1288
|
+
} : V);
|
|
1289
1289
|
i([...R]);
|
|
1290
1290
|
},
|
|
1291
|
-
activeImage: (
|
|
1291
|
+
activeImage: (u = s.find((k) => k.id === j.id)) == null ? void 0 : u.images[0]
|
|
1292
1292
|
}
|
|
1293
1293
|
),
|
|
1294
1294
|
/* @__PURE__ */ t.jsxs("div", { className: F.buttons, children: [
|
|
1295
1295
|
n && /* @__PURE__ */ t.jsx("div", { className: F.deleteButton, children: /* @__PURE__ */ t.jsx(
|
|
1296
|
-
|
|
1296
|
+
b,
|
|
1297
1297
|
{
|
|
1298
1298
|
name: "Sliders",
|
|
1299
1299
|
hoverable: !0,
|
|
1300
1300
|
width: 20,
|
|
1301
1301
|
height: 20,
|
|
1302
|
-
onClick: (k) =>
|
|
1302
|
+
onClick: (k) => A(k, j)
|
|
1303
1303
|
}
|
|
1304
1304
|
) }),
|
|
1305
|
-
|
|
1306
|
-
|
|
1305
|
+
$ && /* @__PURE__ */ t.jsx("div", { className: F.deleteButton, children: /* @__PURE__ */ t.jsx(
|
|
1306
|
+
b,
|
|
1307
1307
|
{
|
|
1308
1308
|
name: "Trash",
|
|
1309
1309
|
hoverable: !0,
|
|
@@ -1319,14 +1319,14 @@ const aa = (r) => {
|
|
|
1319
1319
|
qs,
|
|
1320
1320
|
{
|
|
1321
1321
|
product: j,
|
|
1322
|
-
children:
|
|
1322
|
+
children: O
|
|
1323
1323
|
},
|
|
1324
1324
|
j.id
|
|
1325
1325
|
) : /* @__PURE__ */ t.jsx(
|
|
1326
1326
|
"div",
|
|
1327
1327
|
{
|
|
1328
1328
|
className: F.product,
|
|
1329
|
-
children:
|
|
1329
|
+
children: O
|
|
1330
1330
|
},
|
|
1331
1331
|
j.id
|
|
1332
1332
|
);
|
|
@@ -1335,32 +1335,32 @@ const aa = (r) => {
|
|
|
1335
1335
|
(l || c !== void 0) && /* @__PURE__ */ t.jsxs("div", { className: F.top, children: [
|
|
1336
1336
|
l && /* @__PURE__ */ t.jsx("h3", { className: F.title, children: l }),
|
|
1337
1337
|
c !== void 0 && /* @__PURE__ */ t.jsx(
|
|
1338
|
-
|
|
1338
|
+
Z,
|
|
1339
1339
|
{
|
|
1340
1340
|
current: c,
|
|
1341
1341
|
onChange: (j) => e == null ? void 0 : e(j)
|
|
1342
1342
|
}
|
|
1343
1343
|
)
|
|
1344
1344
|
] }),
|
|
1345
|
-
B && n && y &&
|
|
1345
|
+
B && n && y && N && /* @__PURE__ */ t.jsx(
|
|
1346
1346
|
Os,
|
|
1347
1347
|
{
|
|
1348
|
-
ref:
|
|
1348
|
+
ref: v,
|
|
1349
1349
|
activeItem: B,
|
|
1350
1350
|
setActiveItem: S,
|
|
1351
|
-
popupPosition:
|
|
1351
|
+
popupPosition: f,
|
|
1352
1352
|
modalOptions: y,
|
|
1353
|
-
setIsOpenModal:
|
|
1353
|
+
setIsOpenModal: E
|
|
1354
1354
|
}
|
|
1355
1355
|
),
|
|
1356
|
-
w &&
|
|
1356
|
+
w && q && /* @__PURE__ */ t.jsx(At, { ...q }),
|
|
1357
1357
|
/* @__PURE__ */ t.jsxs("div", { className: F.products, children: [
|
|
1358
|
-
|
|
1358
|
+
m && /* @__PURE__ */ t.jsx("h5", { className: F.subtitle, children: m }),
|
|
1359
1359
|
o ? /* @__PURE__ */ t.jsx(
|
|
1360
|
-
|
|
1360
|
+
It,
|
|
1361
1361
|
{
|
|
1362
|
-
sensors:
|
|
1363
|
-
onDragEnd:
|
|
1362
|
+
sensors: G,
|
|
1363
|
+
onDragEnd: K,
|
|
1364
1364
|
children: /* @__PURE__ */ t.jsx(
|
|
1365
1365
|
wt,
|
|
1366
1366
|
{
|
|
@@ -1371,7 +1371,7 @@ const aa = (r) => {
|
|
|
1371
1371
|
)
|
|
1372
1372
|
}
|
|
1373
1373
|
) : s.map((j) => ct(j)),
|
|
1374
|
-
|
|
1374
|
+
_ && /* @__PURE__ */ t.jsx(
|
|
1375
1375
|
"div",
|
|
1376
1376
|
{
|
|
1377
1377
|
style: {
|
|
@@ -1387,21 +1387,21 @@ const aa = (r) => {
|
|
|
1387
1387
|
size: "s",
|
|
1388
1388
|
onClick: () => {
|
|
1389
1389
|
const j = [...s];
|
|
1390
|
-
let
|
|
1390
|
+
let O = null;
|
|
1391
1391
|
if (d) {
|
|
1392
|
-
for (let
|
|
1393
|
-
if (!s.find((k) => k.name === d[
|
|
1394
|
-
|
|
1392
|
+
for (let u = 0; u < d.length; u++)
|
|
1393
|
+
if (!s.find((k) => k.name === d[u])) {
|
|
1394
|
+
O = d[u];
|
|
1395
1395
|
break;
|
|
1396
1396
|
}
|
|
1397
1397
|
}
|
|
1398
|
-
|
|
1399
|
-
name:
|
|
1398
|
+
h === "select" && d ? j.push({
|
|
1399
|
+
name: O || d[0],
|
|
1400
1400
|
id: mt(),
|
|
1401
1401
|
...L,
|
|
1402
1402
|
maxSymbols: 100
|
|
1403
1403
|
// пример значения
|
|
1404
|
-
}) :
|
|
1404
|
+
}) : h === "input" ? j.push({
|
|
1405
1405
|
name: "",
|
|
1406
1406
|
id: mt(),
|
|
1407
1407
|
...L,
|
|
@@ -1419,7 +1419,7 @@ const aa = (r) => {
|
|
|
1419
1419
|
children: /* @__PURE__ */ t.jsxs("div", { className: F.addButton, children: [
|
|
1420
1420
|
/* @__PURE__ */ t.jsx("span", { children: "Add Option" }),
|
|
1421
1421
|
/* @__PURE__ */ t.jsx(
|
|
1422
|
-
|
|
1422
|
+
b,
|
|
1423
1423
|
{
|
|
1424
1424
|
name: "Plus",
|
|
1425
1425
|
width: 16,
|
|
@@ -1432,7 +1432,7 @@ const aa = (r) => {
|
|
|
1432
1432
|
}
|
|
1433
1433
|
)
|
|
1434
1434
|
] }),
|
|
1435
|
-
a !== void 0 && /* @__PURE__ */ t.jsx(
|
|
1435
|
+
a !== void 0 && /* @__PURE__ */ t.jsx(bt, { items: a })
|
|
1436
1436
|
] });
|
|
1437
1437
|
}, Es = "_title_174ru_1", Ds = "_subtitle_174ru_5", Ls = "_header_174ru_12", Rs = "_text_174ru_13", Ms = "_productsBlock_174ru_14", Hs = "_buttonsBlock_174ru_15", zs = "_top_174ru_26", Fs = "_itemsBlock_174ru_35", Vs = "_typeTexts_174ru_41", Us = "_block_174ru_48", Ys = "_active_174ru_60", Gs = "_products_174ru_14", Ws = "_product_174ru_14", Xs = "_button_174ru_15", Js = "_image_174ru_90", Qs = "_info_174ru_97", Ks = "_name_174ru_109", Zs = "_buttons_174ru_15", tn = "_modal_174ru_120", en = "_other_174ru_139", sn = "_options_174ru_145", dt = {
|
|
1438
1438
|
title: Es,
|
|
@@ -1457,20 +1457,20 @@ const aa = (r) => {
|
|
|
1457
1457
|
other: en,
|
|
1458
1458
|
options: sn
|
|
1459
1459
|
}, nn = g.forwardRef((r, c) => {
|
|
1460
|
-
const { activeButton: e, setActiveButton: s, popupPosition: i } = r, [a, l] = g.useState(e.typesText), [
|
|
1460
|
+
const { activeButton: e, setActiveButton: s, popupPosition: i } = r, [a, l] = g.useState(e.typesText), [m, n] = g.useState(e.destination), [o, x] = g.useState(e.page), [$, _] = g.useState(e.link || ""), [h, p] = g.useState(e.text || ""), [d, w] = g.useState(e.openInNewTab), { pages: q } = Ht();
|
|
1461
1461
|
return g.useEffect(() => {
|
|
1462
1462
|
s({
|
|
1463
1463
|
...e,
|
|
1464
1464
|
...{
|
|
1465
|
-
text:
|
|
1466
|
-
link:
|
|
1467
|
-
destination:
|
|
1465
|
+
text: h,
|
|
1466
|
+
link: $,
|
|
1467
|
+
destination: m,
|
|
1468
1468
|
typesText: a,
|
|
1469
1469
|
page: o,
|
|
1470
1470
|
openInNewTab: d
|
|
1471
1471
|
}
|
|
1472
1472
|
});
|
|
1473
|
-
}, [a,
|
|
1473
|
+
}, [a, m, $, h, o, d]), /* @__PURE__ */ t.jsxs(
|
|
1474
1474
|
"div",
|
|
1475
1475
|
{
|
|
1476
1476
|
className: dt.modal,
|
|
@@ -1486,7 +1486,7 @@ const aa = (r) => {
|
|
|
1486
1486
|
/* @__PURE__ */ t.jsxs("div", { className: dt.top, children: [
|
|
1487
1487
|
/* @__PURE__ */ t.jsx("h3", { className: dt.title, children: e.type }),
|
|
1488
1488
|
/* @__PURE__ */ t.jsx(
|
|
1489
|
-
|
|
1489
|
+
b,
|
|
1490
1490
|
{
|
|
1491
1491
|
name: "X",
|
|
1492
1492
|
height: 20,
|
|
@@ -1498,33 +1498,33 @@ const aa = (r) => {
|
|
|
1498
1498
|
] }),
|
|
1499
1499
|
/* @__PURE__ */ t.jsxs("div", { className: dt.options, children: [
|
|
1500
1500
|
/* @__PURE__ */ t.jsx(
|
|
1501
|
-
|
|
1501
|
+
st,
|
|
1502
1502
|
{
|
|
1503
1503
|
label: "Destination",
|
|
1504
1504
|
onChange: (y) => n(y),
|
|
1505
|
-
options: ["Go to Page", "Open Link"].filter((y) => y !==
|
|
1506
|
-
value:
|
|
1505
|
+
options: ["Go to Page", "Open Link"].filter((y) => y !== m),
|
|
1506
|
+
value: m
|
|
1507
1507
|
}
|
|
1508
1508
|
),
|
|
1509
|
-
|
|
1510
|
-
|
|
1509
|
+
m === "Go to Page" ? /* @__PURE__ */ t.jsx(
|
|
1510
|
+
st,
|
|
1511
1511
|
{
|
|
1512
1512
|
label: "Go to",
|
|
1513
|
-
onChange: (y) =>
|
|
1514
|
-
options:
|
|
1513
|
+
onChange: (y) => x(y),
|
|
1514
|
+
options: q ? Object.values(q).filter((y) => y.name !== o).map((y) => y.name) : [],
|
|
1515
1515
|
value: o
|
|
1516
1516
|
}
|
|
1517
1517
|
) : /* @__PURE__ */ t.jsx(
|
|
1518
|
-
|
|
1518
|
+
W,
|
|
1519
1519
|
{
|
|
1520
|
-
onChange: (y) =>
|
|
1521
|
-
value:
|
|
1520
|
+
onChange: (y) => _(y),
|
|
1521
|
+
value: $,
|
|
1522
1522
|
placeholder: "https://",
|
|
1523
1523
|
label: "Link"
|
|
1524
1524
|
}
|
|
1525
1525
|
),
|
|
1526
1526
|
/* @__PURE__ */ t.jsx(
|
|
1527
|
-
|
|
1527
|
+
Z,
|
|
1528
1528
|
{
|
|
1529
1529
|
current: e.openInNewTab,
|
|
1530
1530
|
label: "Open in new tab",
|
|
@@ -1534,8 +1534,8 @@ const aa = (r) => {
|
|
|
1534
1534
|
/* @__PURE__ */ t.jsx(
|
|
1535
1535
|
Ot,
|
|
1536
1536
|
{
|
|
1537
|
-
onChange: (y) =>
|
|
1538
|
-
value:
|
|
1537
|
+
onChange: (y) => p(y),
|
|
1538
|
+
value: h,
|
|
1539
1539
|
label: "Text",
|
|
1540
1540
|
maxLength: 150
|
|
1541
1541
|
}
|
|
@@ -1551,7 +1551,7 @@ const aa = (r) => {
|
|
|
1551
1551
|
]
|
|
1552
1552
|
}
|
|
1553
1553
|
);
|
|
1554
|
-
}), on = "_subtitle_jql1y_1", an = "_header_jql1y_8", cn = "_text_jql1y_9", ln = "_productsBlock_jql1y_10", rn = "_buttonsBlock_jql1y_11", dn = "_top_jql1y_23", un = "_itemsBlock_jql1y_32", mn = "_typeTexts_jql1y_38", hn = "_block_jql1y_45", _n = "_active_jql1y_58", pn = "_products_jql1y_10", gn = "_product_jql1y_10", fn = "_button_jql1y_11", xn = "_image_jql1y_88",
|
|
1554
|
+
}), on = "_subtitle_jql1y_1", an = "_header_jql1y_8", cn = "_text_jql1y_9", ln = "_productsBlock_jql1y_10", rn = "_buttonsBlock_jql1y_11", dn = "_top_jql1y_23", un = "_itemsBlock_jql1y_32", mn = "_typeTexts_jql1y_38", hn = "_block_jql1y_45", _n = "_active_jql1y_58", pn = "_products_jql1y_10", gn = "_product_jql1y_10", fn = "_button_jql1y_11", xn = "_image_jql1y_88", jn = "_info_jql1y_95", bn = "_name_jql1y_107", vn = "_buttons_jql1y_11", yn = "_modal_jql1y_118", kn = "_other_jql1y_138", $n = "_options_jql1y_144", Nn = "_addButton_jql1y_150", In = "_deleteButton_jql1y_165", nt = {
|
|
1555
1555
|
subtitle: on,
|
|
1556
1556
|
header: an,
|
|
1557
1557
|
text: cn,
|
|
@@ -1566,91 +1566,91 @@ const aa = (r) => {
|
|
|
1566
1566
|
product: gn,
|
|
1567
1567
|
button: fn,
|
|
1568
1568
|
image: xn,
|
|
1569
|
-
info:
|
|
1570
|
-
name:
|
|
1569
|
+
info: jn,
|
|
1570
|
+
name: bn,
|
|
1571
1571
|
buttons: vn,
|
|
1572
1572
|
modal: yn,
|
|
1573
1573
|
other: kn,
|
|
1574
1574
|
options: $n,
|
|
1575
|
-
addButton:
|
|
1576
|
-
deleteButton:
|
|
1575
|
+
addButton: Nn,
|
|
1576
|
+
deleteButton: In
|
|
1577
1577
|
}, wn = (r) => {
|
|
1578
|
-
const { buttons: c, setButtons: e, deletable: s = !0, addable: i = !0 } = r, [a, l] = g.useState(null), [
|
|
1578
|
+
const { buttons: c, setButtons: e, deletable: s = !0, addable: i = !0 } = r, [a, l] = g.useState(null), [m, n] = g.useState({
|
|
1579
1579
|
top: 0,
|
|
1580
1580
|
left: 0
|
|
1581
|
-
}), [o,
|
|
1581
|
+
}), [o, x] = g.useState(null), $ = g.useRef(null);
|
|
1582
1582
|
g.useEffect(() => {
|
|
1583
|
-
const
|
|
1583
|
+
const h = () => {
|
|
1584
1584
|
l(null);
|
|
1585
1585
|
};
|
|
1586
|
-
return document.body.addEventListener("click",
|
|
1587
|
-
l(null), document.body.removeEventListener("click",
|
|
1586
|
+
return document.body.addEventListener("click", h), l(null), () => {
|
|
1587
|
+
l(null), document.body.removeEventListener("click", h);
|
|
1588
1588
|
};
|
|
1589
1589
|
}, []), g.useEffect(() => {
|
|
1590
1590
|
if (a) {
|
|
1591
|
-
const
|
|
1592
|
-
e(
|
|
1591
|
+
const h = [...c].map((p) => p.id === a.id ? a : p);
|
|
1592
|
+
e(h);
|
|
1593
1593
|
}
|
|
1594
1594
|
}, [a]), g.useEffect(() => {
|
|
1595
|
-
if (
|
|
1596
|
-
const
|
|
1595
|
+
if ($.current && o) {
|
|
1596
|
+
const h = $.current.getBoundingClientRect().height, p = window.innerHeight;
|
|
1597
1597
|
let d = o.top;
|
|
1598
|
-
d +
|
|
1598
|
+
d + h > p + window.scrollY - 200 && (d = p + window.scrollY - h - 200), d < 0 && (d = 10), n({
|
|
1599
1599
|
top: d,
|
|
1600
1600
|
left: o.left
|
|
1601
1601
|
});
|
|
1602
1602
|
}
|
|
1603
|
-
}, [
|
|
1604
|
-
const
|
|
1605
|
-
|
|
1606
|
-
const d =
|
|
1607
|
-
|
|
1603
|
+
}, [$.current, o]);
|
|
1604
|
+
const _ = (h, p) => {
|
|
1605
|
+
h.stopPropagation();
|
|
1606
|
+
const d = h.target.getBoundingClientRect();
|
|
1607
|
+
x({
|
|
1608
1608
|
top: d.top + window.scrollY,
|
|
1609
1609
|
left: d.left - 30
|
|
1610
|
-
}), l(
|
|
1610
|
+
}), l(p);
|
|
1611
1611
|
};
|
|
1612
|
-
return /* @__PURE__ */ t.jsxs("div", { className:
|
|
1613
|
-
/* @__PURE__ */ t.jsx("h5", { className:
|
|
1614
|
-
c.map((
|
|
1612
|
+
return /* @__PURE__ */ t.jsxs("div", { className: nt.products, children: [
|
|
1613
|
+
/* @__PURE__ */ t.jsx("h5", { className: nt.subtitle, children: "Button Type" }),
|
|
1614
|
+
c.map((h) => /* @__PURE__ */ t.jsxs(
|
|
1615
1615
|
"div",
|
|
1616
1616
|
{
|
|
1617
|
-
className:
|
|
1617
|
+
className: nt.product,
|
|
1618
1618
|
children: [
|
|
1619
1619
|
/* @__PURE__ */ t.jsx(
|
|
1620
|
-
|
|
1620
|
+
st,
|
|
1621
1621
|
{
|
|
1622
|
-
onChange: (
|
|
1623
|
-
const w = [...c].map((
|
|
1624
|
-
...
|
|
1625
|
-
type:
|
|
1626
|
-
} :
|
|
1622
|
+
onChange: (p) => {
|
|
1623
|
+
const w = [...c].map((q) => q.id === h.id ? {
|
|
1624
|
+
...h,
|
|
1625
|
+
type: p
|
|
1626
|
+
} : q);
|
|
1627
1627
|
e(w);
|
|
1628
1628
|
},
|
|
1629
|
-
value:
|
|
1629
|
+
value: h.type,
|
|
1630
1630
|
options: ["Primary", "Secondary", "Tertiary"]
|
|
1631
1631
|
}
|
|
1632
1632
|
),
|
|
1633
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
1634
|
-
/* @__PURE__ */ t.jsx("div", { className:
|
|
1635
|
-
|
|
1633
|
+
/* @__PURE__ */ t.jsxs("div", { className: nt.buttons, children: [
|
|
1634
|
+
/* @__PURE__ */ t.jsx("div", { className: nt.deleteButton, children: /* @__PURE__ */ t.jsx(
|
|
1635
|
+
b,
|
|
1636
1636
|
{
|
|
1637
1637
|
name: "Sliders",
|
|
1638
1638
|
hoverable: !0,
|
|
1639
1639
|
width: 20,
|
|
1640
1640
|
height: 20,
|
|
1641
|
-
onClick: (
|
|
1642
|
-
p
|
|
1641
|
+
onClick: (p) => {
|
|
1642
|
+
_(p, h);
|
|
1643
1643
|
}
|
|
1644
1644
|
}
|
|
1645
1645
|
) }),
|
|
1646
|
-
s && /* @__PURE__ */ t.jsx("div", { className:
|
|
1647
|
-
|
|
1646
|
+
s && /* @__PURE__ */ t.jsx("div", { className: nt.deleteButton, children: /* @__PURE__ */ t.jsx(
|
|
1647
|
+
b,
|
|
1648
1648
|
{
|
|
1649
1649
|
name: "Trash",
|
|
1650
1650
|
hoverable: !0,
|
|
1651
1651
|
onClick: () => {
|
|
1652
|
-
const
|
|
1653
|
-
e(
|
|
1652
|
+
const p = c.filter((d) => d.id !== h.id);
|
|
1653
|
+
e(p);
|
|
1654
1654
|
},
|
|
1655
1655
|
width: 20,
|
|
1656
1656
|
height: 20,
|
|
@@ -1660,15 +1660,15 @@ const aa = (r) => {
|
|
|
1660
1660
|
] })
|
|
1661
1661
|
]
|
|
1662
1662
|
},
|
|
1663
|
-
|
|
1663
|
+
h.id
|
|
1664
1664
|
)),
|
|
1665
1665
|
a && /* @__PURE__ */ t.jsx(
|
|
1666
1666
|
nn,
|
|
1667
1667
|
{
|
|
1668
|
-
ref:
|
|
1668
|
+
ref: $,
|
|
1669
1669
|
activeButton: a,
|
|
1670
1670
|
setActiveButton: l,
|
|
1671
|
-
popupPosition:
|
|
1671
|
+
popupPosition: m
|
|
1672
1672
|
}
|
|
1673
1673
|
),
|
|
1674
1674
|
i && /* @__PURE__ */ t.jsx(
|
|
@@ -1683,11 +1683,11 @@ const aa = (r) => {
|
|
|
1683
1683
|
at,
|
|
1684
1684
|
{
|
|
1685
1685
|
withoutHover: !0,
|
|
1686
|
-
className:
|
|
1686
|
+
className: nt.button,
|
|
1687
1687
|
size: "s",
|
|
1688
1688
|
onClick: () => {
|
|
1689
|
-
const
|
|
1690
|
-
|
|
1689
|
+
const h = [...c];
|
|
1690
|
+
h.push({
|
|
1691
1691
|
type: "Primary",
|
|
1692
1692
|
id: mt(),
|
|
1693
1693
|
typesText: [],
|
|
@@ -1695,15 +1695,15 @@ const aa = (r) => {
|
|
|
1695
1695
|
text: "Button Name",
|
|
1696
1696
|
page: "home",
|
|
1697
1697
|
openInNewTab: !0
|
|
1698
|
-
}), e(
|
|
1698
|
+
}), e(h);
|
|
1699
1699
|
},
|
|
1700
1700
|
style: {
|
|
1701
1701
|
width: "fit-content"
|
|
1702
1702
|
},
|
|
1703
|
-
children: /* @__PURE__ */ t.jsxs("div", { className:
|
|
1703
|
+
children: /* @__PURE__ */ t.jsxs("div", { className: nt.addButton, children: [
|
|
1704
1704
|
/* @__PURE__ */ t.jsx("span", { children: "Add Option" }),
|
|
1705
1705
|
/* @__PURE__ */ t.jsx(
|
|
1706
|
-
|
|
1706
|
+
b,
|
|
1707
1707
|
{
|
|
1708
1708
|
name: "Plus",
|
|
1709
1709
|
width: 16,
|
|
@@ -1722,7 +1722,7 @@ const aa = (r) => {
|
|
|
1722
1722
|
/* @__PURE__ */ t.jsxs("div", { className: dt.top, children: [
|
|
1723
1723
|
/* @__PURE__ */ t.jsx("h3", { className: dt.title, children: "Buttons" }),
|
|
1724
1724
|
/* @__PURE__ */ t.jsx(
|
|
1725
|
-
|
|
1725
|
+
Z,
|
|
1726
1726
|
{
|
|
1727
1727
|
current: c,
|
|
1728
1728
|
onChange: (a) => e(a)
|
|
@@ -1737,7 +1737,7 @@ const aa = (r) => {
|
|
|
1737
1737
|
}
|
|
1738
1738
|
)
|
|
1739
1739
|
] }) });
|
|
1740
|
-
}, Cn = "_wrapper_m18qi_1", Bn = "_subtitle_m18qi_7", Sn = "_content_m18qi_14", Tn = "_range_m18qi_22", Pn = "_track_m18qi_27", An = "_progress_m18qi_36", On = "_dots_m18qi_46", qn = "_dot_m18qi_46", En = "_active_m18qi_65", Dn = "_input_m18qi_77", Ln = "_countBlock_m18qi_91", Rn = "_count_m18qi_91", Mn = "_controls_m18qi_107", Hn = "_button_m18qi_113",
|
|
1740
|
+
}, Cn = "_wrapper_m18qi_1", Bn = "_subtitle_m18qi_7", Sn = "_content_m18qi_14", Tn = "_range_m18qi_22", Pn = "_track_m18qi_27", An = "_progress_m18qi_36", On = "_dots_m18qi_46", qn = "_dot_m18qi_46", En = "_active_m18qi_65", Dn = "_input_m18qi_77", Ln = "_countBlock_m18qi_91", Rn = "_count_m18qi_91", Mn = "_controls_m18qi_107", Hn = "_button_m18qi_113", U = {
|
|
1741
1741
|
wrapper: Cn,
|
|
1742
1742
|
subtitle: Bn,
|
|
1743
1743
|
content: Sn,
|
|
@@ -1753,36 +1753,36 @@ const aa = (r) => {
|
|
|
1753
1753
|
controls: Mn,
|
|
1754
1754
|
button: Hn
|
|
1755
1755
|
}, At = (r) => {
|
|
1756
|
-
const { label: c, min: e = 1, max: s = 4, step: i = 1, count: a, setCount: l } = r, [
|
|
1756
|
+
const { label: c, min: e = 1, max: s = 4, step: i = 1, count: a, setCount: l } = r, [m, n] = g.useState(!1), o = Array.from({ length: (s - e) / i + 1 }), x = (a - e) / (s - e) * 100, $ = () => {
|
|
1757
1757
|
a < s && l(a + i);
|
|
1758
|
-
},
|
|
1758
|
+
}, _ = () => {
|
|
1759
1759
|
a > e && l(a - i);
|
|
1760
|
-
},
|
|
1761
|
-
const d = e +
|
|
1760
|
+
}, h = (p) => {
|
|
1761
|
+
const d = e + p * i;
|
|
1762
1762
|
l(d);
|
|
1763
1763
|
};
|
|
1764
|
-
return /* @__PURE__ */ t.jsxs("div", { className:
|
|
1765
|
-
c && /* @__PURE__ */ t.jsx("h5", { className:
|
|
1766
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
1767
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
1768
|
-
/* @__PURE__ */ t.jsx("div", { className:
|
|
1764
|
+
return /* @__PURE__ */ t.jsxs("div", { className: U.wrapper, children: [
|
|
1765
|
+
c && /* @__PURE__ */ t.jsx("h5", { className: U.subtitle, children: c }),
|
|
1766
|
+
/* @__PURE__ */ t.jsxs("div", { className: U.content, children: [
|
|
1767
|
+
/* @__PURE__ */ t.jsxs("div", { className: U.range, children: [
|
|
1768
|
+
/* @__PURE__ */ t.jsx("div", { className: U.track }),
|
|
1769
1769
|
/* @__PURE__ */ t.jsx(
|
|
1770
1770
|
"div",
|
|
1771
1771
|
{
|
|
1772
|
-
className:
|
|
1773
|
-
style: { width: `${
|
|
1772
|
+
className: U.progress,
|
|
1773
|
+
style: { width: `${x}%` }
|
|
1774
1774
|
}
|
|
1775
1775
|
),
|
|
1776
|
-
/* @__PURE__ */ t.jsx("div", { className:
|
|
1776
|
+
/* @__PURE__ */ t.jsx("div", { className: U.dots, children: o.map((p, d) => {
|
|
1777
1777
|
const w = d <= (a - e) / i;
|
|
1778
1778
|
return /* @__PURE__ */ t.jsx(
|
|
1779
1779
|
"button",
|
|
1780
1780
|
{
|
|
1781
|
-
onClick: () =>
|
|
1782
|
-
className:
|
|
1783
|
-
[
|
|
1784
|
-
[
|
|
1785
|
-
[
|
|
1781
|
+
onClick: () => h(d),
|
|
1782
|
+
className: z(U.dot, {
|
|
1783
|
+
[U.active]: w,
|
|
1784
|
+
[U.inactive]: !w,
|
|
1785
|
+
[U.dragging]: m
|
|
1786
1786
|
}),
|
|
1787
1787
|
"aria-label": `Set value to ${e + d * i}`
|
|
1788
1788
|
},
|
|
@@ -1797,40 +1797,40 @@ const aa = (r) => {
|
|
|
1797
1797
|
max: s,
|
|
1798
1798
|
step: i,
|
|
1799
1799
|
value: a,
|
|
1800
|
-
onChange: (
|
|
1800
|
+
onChange: (p) => l(Number(p.target.value)),
|
|
1801
1801
|
onMouseDown: () => n(!0),
|
|
1802
1802
|
onMouseUp: () => n(!1),
|
|
1803
1803
|
onTouchStart: () => n(!0),
|
|
1804
1804
|
onTouchEnd: () => n(!1),
|
|
1805
|
-
className:
|
|
1805
|
+
className: U.input
|
|
1806
1806
|
}
|
|
1807
1807
|
)
|
|
1808
1808
|
] }),
|
|
1809
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
1809
|
+
/* @__PURE__ */ t.jsxs("div", { className: U.countBlock, children: [
|
|
1810
1810
|
/* @__PURE__ */ t.jsx(
|
|
1811
|
-
|
|
1811
|
+
W,
|
|
1812
1812
|
{
|
|
1813
1813
|
type: "number",
|
|
1814
1814
|
min: e,
|
|
1815
1815
|
max: s,
|
|
1816
1816
|
paddingless: !0,
|
|
1817
|
-
onChange: (
|
|
1818
|
-
const d = Number(
|
|
1817
|
+
onChange: (p) => {
|
|
1818
|
+
const d = Number(p);
|
|
1819
1819
|
d > s ? l(s) : d < e ? l(e) : l(d);
|
|
1820
1820
|
},
|
|
1821
1821
|
value: String(a)
|
|
1822
1822
|
}
|
|
1823
1823
|
),
|
|
1824
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
1824
|
+
/* @__PURE__ */ t.jsxs("div", { className: U.controls, children: [
|
|
1825
1825
|
/* @__PURE__ */ t.jsx(
|
|
1826
1826
|
"button",
|
|
1827
1827
|
{
|
|
1828
|
-
onClick:
|
|
1828
|
+
onClick: $,
|
|
1829
1829
|
disabled: a >= s,
|
|
1830
|
-
className:
|
|
1830
|
+
className: U.button,
|
|
1831
1831
|
"aria-label": "Increment count",
|
|
1832
1832
|
children: /* @__PURE__ */ t.jsx(
|
|
1833
|
-
|
|
1833
|
+
b,
|
|
1834
1834
|
{
|
|
1835
1835
|
name: "CaretUp",
|
|
1836
1836
|
width: 15,
|
|
@@ -1842,12 +1842,12 @@ const aa = (r) => {
|
|
|
1842
1842
|
/* @__PURE__ */ t.jsx(
|
|
1843
1843
|
"button",
|
|
1844
1844
|
{
|
|
1845
|
-
onClick:
|
|
1845
|
+
onClick: _,
|
|
1846
1846
|
disabled: a <= e,
|
|
1847
|
-
className:
|
|
1847
|
+
className: U.button,
|
|
1848
1848
|
"aria-label": "Decrement count",
|
|
1849
1849
|
children: /* @__PURE__ */ t.jsx(
|
|
1850
|
-
|
|
1850
|
+
b,
|
|
1851
1851
|
{
|
|
1852
1852
|
name: "CaretDown",
|
|
1853
1853
|
width: 15,
|
|
@@ -1860,7 +1860,7 @@ const aa = (r) => {
|
|
|
1860
1860
|
] })
|
|
1861
1861
|
] })
|
|
1862
1862
|
] });
|
|
1863
|
-
}, zn = "_title_1lejm_1", Fn = "_subtitle_1lejm_5", Vn = "_header_1lejm_12", Un = "_text_1lejm_13", Yn = "_productsBlock_1lejm_14", Gn = "_top_1lejm_26", Wn = "_itemsBlock_1lejm_35", Xn = "_typeTexts_1lejm_41", Jn = "_block_1lejm_48", Qn = "_active_1lejm_61", Kn = "_products_1lejm_14", Zn = "_product_1lejm_14", ti = "_button_1lejm_80", ei = "_image_1lejm_91", si = "_info_1lejm_98", ni = "_name_1lejm_110", ii = "_buttons_1lejm_114", oi = "_modal_1lejm_121", ai = "_link_1lejm_141", ci = "_modalOptions_1lejm_147", li = "_addButton_1lejm_159", ri = "_deleteButton_1lejm_174",
|
|
1863
|
+
}, zn = "_title_1lejm_1", Fn = "_subtitle_1lejm_5", Vn = "_header_1lejm_12", Un = "_text_1lejm_13", Yn = "_productsBlock_1lejm_14", Gn = "_top_1lejm_26", Wn = "_itemsBlock_1lejm_35", Xn = "_typeTexts_1lejm_41", Jn = "_block_1lejm_48", Qn = "_active_1lejm_61", Kn = "_products_1lejm_14", Zn = "_product_1lejm_14", ti = "_button_1lejm_80", ei = "_image_1lejm_91", si = "_info_1lejm_98", ni = "_name_1lejm_110", ii = "_buttons_1lejm_114", oi = "_modal_1lejm_121", ai = "_link_1lejm_141", ci = "_modalOptions_1lejm_147", li = "_addButton_1lejm_159", ri = "_deleteButton_1lejm_174", Y = {
|
|
1864
1864
|
title: zn,
|
|
1865
1865
|
subtitle: Fn,
|
|
1866
1866
|
header: Vn,
|
|
@@ -1886,13 +1886,13 @@ const aa = (r) => {
|
|
|
1886
1886
|
}, di = (r) => {
|
|
1887
1887
|
const { activeItem: c, setActiveItem: e, popupPosition: s, setIsOpenModal: i, itemsOptions: a } = r, l = a.find((n) => n.id === c.listingId);
|
|
1888
1888
|
if (!l) return null;
|
|
1889
|
-
function
|
|
1889
|
+
function m(n, o) {
|
|
1890
1890
|
return n.length > o ? `${n.slice(0, o)}...` : n;
|
|
1891
1891
|
}
|
|
1892
1892
|
return /* @__PURE__ */ t.jsxs(
|
|
1893
1893
|
"div",
|
|
1894
1894
|
{
|
|
1895
|
-
className:
|
|
1895
|
+
className: Y.modal,
|
|
1896
1896
|
onClick: (n) => {
|
|
1897
1897
|
n.stopPropagation();
|
|
1898
1898
|
},
|
|
@@ -1901,10 +1901,10 @@ const aa = (r) => {
|
|
|
1901
1901
|
left: `${s.left}px`
|
|
1902
1902
|
},
|
|
1903
1903
|
children: [
|
|
1904
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
1905
|
-
/* @__PURE__ */ t.jsx("h3", { children:
|
|
1904
|
+
/* @__PURE__ */ t.jsxs("div", { className: Y.top, children: [
|
|
1905
|
+
/* @__PURE__ */ t.jsx("h3", { children: m(l.productData.name, 20) }),
|
|
1906
1906
|
/* @__PURE__ */ t.jsx(
|
|
1907
|
-
|
|
1907
|
+
b,
|
|
1908
1908
|
{
|
|
1909
1909
|
name: "X",
|
|
1910
1910
|
height: 20,
|
|
@@ -1916,7 +1916,7 @@ const aa = (r) => {
|
|
|
1916
1916
|
}
|
|
1917
1917
|
)
|
|
1918
1918
|
] }),
|
|
1919
|
-
/* @__PURE__ */ t.jsx("div", { className:
|
|
1919
|
+
/* @__PURE__ */ t.jsx("div", { className: Y.modalOptions, children: /* @__PURE__ */ t.jsx(
|
|
1920
1920
|
gt,
|
|
1921
1921
|
{
|
|
1922
1922
|
label: "Put up an attractive image",
|
|
@@ -1935,18 +1935,18 @@ const aa = (r) => {
|
|
|
1935
1935
|
);
|
|
1936
1936
|
};
|
|
1937
1937
|
function ui(r) {
|
|
1938
|
-
const { product: c, children: e } = r, { attributes: s, listeners: i, setNodeRef: a, transform: l, transition:
|
|
1938
|
+
const { product: c, children: e } = r, { attributes: s, listeners: i, setNodeRef: a, transform: l, transition: m, isDragging: n } = St({
|
|
1939
1939
|
id: String(c.listingId)
|
|
1940
1940
|
}), o = {
|
|
1941
1941
|
transform: Tt.Transform.toString(l),
|
|
1942
|
-
transition:
|
|
1942
|
+
transition: m
|
|
1943
1943
|
};
|
|
1944
1944
|
return /* @__PURE__ */ t.jsx(
|
|
1945
1945
|
"div",
|
|
1946
1946
|
{
|
|
1947
1947
|
ref: a,
|
|
1948
1948
|
style: o,
|
|
1949
|
-
className: `${
|
|
1949
|
+
className: `${Y.product} ${n ? Y.dragging : ""}`,
|
|
1950
1950
|
...s,
|
|
1951
1951
|
...i,
|
|
1952
1952
|
children: e
|
|
@@ -1961,60 +1961,60 @@ const la = (r) => {
|
|
|
1961
1961
|
setItems: i,
|
|
1962
1962
|
other: a,
|
|
1963
1963
|
title: l,
|
|
1964
|
-
subtitle:
|
|
1964
|
+
subtitle: m,
|
|
1965
1965
|
editable: n = !0,
|
|
1966
1966
|
draggable: o = !1,
|
|
1967
|
-
withImage:
|
|
1968
|
-
deletable:
|
|
1969
|
-
addable:
|
|
1970
|
-
itemsType:
|
|
1971
|
-
itemsOptions:
|
|
1967
|
+
withImage: x = !1,
|
|
1968
|
+
deletable: $ = !0,
|
|
1969
|
+
addable: _ = !0,
|
|
1970
|
+
itemsType: h,
|
|
1971
|
+
itemsOptions: p
|
|
1972
1972
|
} = r, [d, w] = g.useState(
|
|
1973
1973
|
null
|
|
1974
|
-
), [
|
|
1974
|
+
), [q, y] = g.useState({
|
|
1975
1975
|
top: 0,
|
|
1976
1976
|
left: 0
|
|
1977
1977
|
}), [L, B] = g.useState(!1), S = $t(
|
|
1978
|
-
|
|
1978
|
+
Nt(Bt, {
|
|
1979
1979
|
activationConstraint: {
|
|
1980
1980
|
distance: 5
|
|
1981
1981
|
}
|
|
1982
1982
|
})
|
|
1983
1983
|
);
|
|
1984
1984
|
g.useEffect(() => {
|
|
1985
|
-
const
|
|
1985
|
+
const v = () => {
|
|
1986
1986
|
w(null), B(!1);
|
|
1987
1987
|
};
|
|
1988
|
-
return document.body.addEventListener("click",
|
|
1989
|
-
w(null), B(!1), document.body.removeEventListener("click",
|
|
1988
|
+
return document.body.addEventListener("click", v), w(null), B(!1), () => {
|
|
1989
|
+
w(null), B(!1), document.body.removeEventListener("click", v);
|
|
1990
1990
|
};
|
|
1991
1991
|
}, []), g.useEffect(() => {
|
|
1992
1992
|
if (d) {
|
|
1993
|
-
const
|
|
1994
|
-
i(
|
|
1993
|
+
const v = [...s].map((N) => N.listingId === d.listingId ? d : N);
|
|
1994
|
+
i(v);
|
|
1995
1995
|
}
|
|
1996
1996
|
}, [d]);
|
|
1997
|
-
const
|
|
1998
|
-
|
|
1999
|
-
const
|
|
2000
|
-
let
|
|
2001
|
-
|
|
2002
|
-
top:
|
|
2003
|
-
left:
|
|
2004
|
-
}), w(
|
|
1997
|
+
const f = (v, N) => {
|
|
1998
|
+
v.stopPropagation();
|
|
1999
|
+
const E = v.target.getBoundingClientRect(), G = 100, A = window.innerHeight;
|
|
2000
|
+
let M = E.top + window.scrollY;
|
|
2001
|
+
M + G > A && (M = A - G - 20), B(!0), y({
|
|
2002
|
+
top: M - 80,
|
|
2003
|
+
left: E.left - 30
|
|
2004
|
+
}), w(N);
|
|
2005
2005
|
};
|
|
2006
|
-
function
|
|
2007
|
-
if (
|
|
2008
|
-
return
|
|
2006
|
+
function D(v) {
|
|
2007
|
+
if (x)
|
|
2008
|
+
return v ? /* @__PURE__ */ t.jsx(
|
|
2009
2009
|
"img",
|
|
2010
2010
|
{
|
|
2011
|
-
src: `https://imagedelivery.net/${
|
|
2011
|
+
src: `https://imagedelivery.net/${v}/w=1000`,
|
|
2012
2012
|
alt: "image",
|
|
2013
2013
|
width: 16,
|
|
2014
2014
|
height: 16
|
|
2015
2015
|
}
|
|
2016
2016
|
) : /* @__PURE__ */ t.jsx(
|
|
2017
|
-
|
|
2017
|
+
b,
|
|
2018
2018
|
{
|
|
2019
2019
|
name: "Image",
|
|
2020
2020
|
width: 16,
|
|
@@ -2023,21 +2023,21 @@ const la = (r) => {
|
|
|
2023
2023
|
}
|
|
2024
2024
|
);
|
|
2025
2025
|
}
|
|
2026
|
-
const
|
|
2027
|
-
const { active:
|
|
2028
|
-
if (
|
|
2029
|
-
const
|
|
2030
|
-
if (
|
|
2031
|
-
const
|
|
2032
|
-
|
|
2026
|
+
const X = (v) => {
|
|
2027
|
+
const { active: N, over: E } = v;
|
|
2028
|
+
if (E && N.id !== E.id) {
|
|
2029
|
+
const G = s.findIndex((M) => String(M.listingId) === N.id), A = s.findIndex((M) => String(M.listingId) === E.id);
|
|
2030
|
+
if (G !== -1 && A !== -1) {
|
|
2031
|
+
const M = [...s], [K] = M.splice(G, 1);
|
|
2032
|
+
M.splice(A, 0, K), i(M);
|
|
2033
2033
|
}
|
|
2034
2034
|
}
|
|
2035
|
-
},
|
|
2036
|
-
const
|
|
2037
|
-
if (
|
|
2038
|
-
const
|
|
2035
|
+
}, tt = (v, N) => {
|
|
2036
|
+
const E = p.find((A) => v.listingId === A.id);
|
|
2037
|
+
if (!E) return null;
|
|
2038
|
+
const G = /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
2039
2039
|
o && /* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
|
|
2040
|
-
|
|
2040
|
+
b,
|
|
2041
2041
|
{
|
|
2042
2042
|
name: "DotsSixVertical",
|
|
2043
2043
|
hoverable: !0,
|
|
@@ -2045,48 +2045,48 @@ const la = (r) => {
|
|
|
2045
2045
|
height: 20
|
|
2046
2046
|
}
|
|
2047
2047
|
) }),
|
|
2048
|
-
|
|
2049
|
-
|
|
2048
|
+
h === "select" && /* @__PURE__ */ t.jsx(
|
|
2049
|
+
st,
|
|
2050
2050
|
{
|
|
2051
|
-
onChange: (
|
|
2052
|
-
const
|
|
2053
|
-
if (!
|
|
2051
|
+
onChange: (A) => {
|
|
2052
|
+
const M = [...s], K = p.find((O) => O.productData.name === A);
|
|
2053
|
+
if (!K) return;
|
|
2054
2054
|
const ct = {
|
|
2055
|
-
listingId:
|
|
2056
|
-
image:
|
|
2057
|
-
}, j =
|
|
2055
|
+
listingId: K.id,
|
|
2056
|
+
image: K.productData.images.length > 0 ? K.productData.images[0].cfId : ""
|
|
2057
|
+
}, j = M.map((O) => O.listingId === v.listingId ? ct : O);
|
|
2058
2058
|
w(ct), i([...j]);
|
|
2059
2059
|
},
|
|
2060
|
-
value:
|
|
2060
|
+
value: E.productData.name,
|
|
2061
2061
|
options: [
|
|
2062
|
-
...
|
|
2062
|
+
...p.filter((A) => !s.find((M) => M.listingId === A.id)).map((A) => A.productData.name)
|
|
2063
2063
|
],
|
|
2064
|
-
leftAddon:
|
|
2065
|
-
|
|
2064
|
+
leftAddon: D(
|
|
2065
|
+
v.image || E.productData.images.length > 0 && E.productData.images[0].cfId || ""
|
|
2066
2066
|
)
|
|
2067
2067
|
},
|
|
2068
|
-
|
|
2068
|
+
N
|
|
2069
2069
|
),
|
|
2070
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
2071
|
-
n && /* @__PURE__ */ t.jsx("div", { className:
|
|
2072
|
-
|
|
2070
|
+
/* @__PURE__ */ t.jsxs("div", { className: Y.buttons, children: [
|
|
2071
|
+
n && /* @__PURE__ */ t.jsx("div", { className: Y.deleteButton, children: /* @__PURE__ */ t.jsx(
|
|
2072
|
+
b,
|
|
2073
2073
|
{
|
|
2074
2074
|
name: "Sliders",
|
|
2075
2075
|
hoverable: !0,
|
|
2076
2076
|
width: 20,
|
|
2077
2077
|
height: 20,
|
|
2078
|
-
onClick: (
|
|
2078
|
+
onClick: (A) => f(A, v)
|
|
2079
2079
|
}
|
|
2080
2080
|
) }),
|
|
2081
|
-
|
|
2082
|
-
|
|
2081
|
+
$ && /* @__PURE__ */ t.jsx("div", { className: Y.deleteButton, children: /* @__PURE__ */ t.jsx(
|
|
2082
|
+
b,
|
|
2083
2083
|
{
|
|
2084
2084
|
name: "Trash",
|
|
2085
2085
|
hoverable: !0,
|
|
2086
2086
|
width: 20,
|
|
2087
2087
|
height: 20,
|
|
2088
2088
|
fill: "#C12A2A",
|
|
2089
|
-
onClick: () => i(s.filter((
|
|
2089
|
+
onClick: () => i(s.filter((A) => A !== v))
|
|
2090
2090
|
}
|
|
2091
2091
|
) })
|
|
2092
2092
|
] })
|
|
@@ -2094,27 +2094,27 @@ const la = (r) => {
|
|
|
2094
2094
|
return o ? /* @__PURE__ */ t.jsx(
|
|
2095
2095
|
ui,
|
|
2096
2096
|
{
|
|
2097
|
-
product:
|
|
2098
|
-
children:
|
|
2097
|
+
product: v,
|
|
2098
|
+
children: G
|
|
2099
2099
|
},
|
|
2100
|
-
|
|
2100
|
+
v.listingId
|
|
2101
2101
|
) : /* @__PURE__ */ t.jsx(
|
|
2102
2102
|
"div",
|
|
2103
2103
|
{
|
|
2104
|
-
className:
|
|
2105
|
-
children:
|
|
2104
|
+
className: Y.product,
|
|
2105
|
+
children: G
|
|
2106
2106
|
},
|
|
2107
|
-
|
|
2107
|
+
v.listingId
|
|
2108
2108
|
);
|
|
2109
2109
|
};
|
|
2110
|
-
return /* @__PURE__ */ t.jsxs("div", { className:
|
|
2111
|
-
(l || c !== void 0) && /* @__PURE__ */ t.jsxs("div", { className:
|
|
2112
|
-
l && /* @__PURE__ */ t.jsx("h3", { className:
|
|
2110
|
+
return /* @__PURE__ */ t.jsxs("div", { className: Y.productsBlock, children: [
|
|
2111
|
+
(l || c !== void 0) && /* @__PURE__ */ t.jsxs("div", { className: Y.top, children: [
|
|
2112
|
+
l && /* @__PURE__ */ t.jsx("h3", { className: Y.title, children: l }),
|
|
2113
2113
|
c !== void 0 && /* @__PURE__ */ t.jsx(
|
|
2114
|
-
|
|
2114
|
+
Z,
|
|
2115
2115
|
{
|
|
2116
2116
|
current: c,
|
|
2117
|
-
onChange: (
|
|
2117
|
+
onChange: (v) => e == null ? void 0 : e(v)
|
|
2118
2118
|
}
|
|
2119
2119
|
)
|
|
2120
2120
|
] }),
|
|
@@ -2124,28 +2124,28 @@ const la = (r) => {
|
|
|
2124
2124
|
activeItem: d,
|
|
2125
2125
|
setActiveItem: w,
|
|
2126
2126
|
setIsOpenModal: B,
|
|
2127
|
-
popupPosition:
|
|
2128
|
-
itemsOptions:
|
|
2127
|
+
popupPosition: q,
|
|
2128
|
+
itemsOptions: p
|
|
2129
2129
|
}
|
|
2130
2130
|
),
|
|
2131
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
2132
|
-
|
|
2131
|
+
/* @__PURE__ */ t.jsxs("div", { className: Y.products, children: [
|
|
2132
|
+
m && /* @__PURE__ */ t.jsx("h5", { className: Y.subtitle, children: m }),
|
|
2133
2133
|
o ? /* @__PURE__ */ t.jsx(
|
|
2134
|
-
|
|
2134
|
+
It,
|
|
2135
2135
|
{
|
|
2136
2136
|
sensors: S,
|
|
2137
|
-
onDragEnd:
|
|
2137
|
+
onDragEnd: X,
|
|
2138
2138
|
children: /* @__PURE__ */ t.jsx(
|
|
2139
2139
|
wt,
|
|
2140
2140
|
{
|
|
2141
|
-
items: s.map((
|
|
2141
|
+
items: s.map((v) => String(v.listingId)),
|
|
2142
2142
|
strategy: Ct,
|
|
2143
|
-
children: s.map((
|
|
2143
|
+
children: s.map((v, N) => tt(v, N))
|
|
2144
2144
|
}
|
|
2145
2145
|
)
|
|
2146
2146
|
}
|
|
2147
|
-
) : s.map((
|
|
2148
|
-
|
|
2147
|
+
) : s.map((v, N) => tt(v, N)),
|
|
2148
|
+
_ && /* @__PURE__ */ t.jsx(
|
|
2149
2149
|
"div",
|
|
2150
2150
|
{
|
|
2151
2151
|
style: {
|
|
@@ -2157,28 +2157,28 @@ const la = (r) => {
|
|
|
2157
2157
|
at,
|
|
2158
2158
|
{
|
|
2159
2159
|
withoutHover: !0,
|
|
2160
|
-
className:
|
|
2160
|
+
className: Y.button,
|
|
2161
2161
|
size: "s",
|
|
2162
2162
|
onClick: () => {
|
|
2163
|
-
const
|
|
2164
|
-
for (let
|
|
2165
|
-
if (!s.find((
|
|
2166
|
-
|
|
2167
|
-
listingId:
|
|
2168
|
-
image:
|
|
2163
|
+
const v = [...s];
|
|
2164
|
+
for (let N = 0; N < p.length; N++)
|
|
2165
|
+
if (!s.find((E) => E.listingId === p[N].id)) {
|
|
2166
|
+
v.push({
|
|
2167
|
+
listingId: p[N].id,
|
|
2168
|
+
image: p[N].productData.images.length > 0 ? p[N].productData.images[0].cfId : ""
|
|
2169
2169
|
});
|
|
2170
2170
|
break;
|
|
2171
2171
|
}
|
|
2172
|
-
i(
|
|
2172
|
+
i(v);
|
|
2173
2173
|
},
|
|
2174
|
-
disabled: s.length ===
|
|
2174
|
+
disabled: s.length === p.length,
|
|
2175
2175
|
style: {
|
|
2176
2176
|
width: "fit-content"
|
|
2177
2177
|
},
|
|
2178
|
-
children: /* @__PURE__ */ t.jsxs("div", { className:
|
|
2178
|
+
children: /* @__PURE__ */ t.jsxs("div", { className: Y.addButton, children: [
|
|
2179
2179
|
/* @__PURE__ */ t.jsx("span", { children: "Add Option" }),
|
|
2180
2180
|
/* @__PURE__ */ t.jsx(
|
|
2181
|
-
|
|
2181
|
+
b,
|
|
2182
2182
|
{
|
|
2183
2183
|
name: "Plus",
|
|
2184
2184
|
width: 16,
|
|
@@ -2191,9 +2191,9 @@ const la = (r) => {
|
|
|
2191
2191
|
}
|
|
2192
2192
|
)
|
|
2193
2193
|
] }),
|
|
2194
|
-
a !== void 0 && /* @__PURE__ */ t.jsx(
|
|
2194
|
+
a !== void 0 && /* @__PURE__ */ t.jsx(bt, { items: a })
|
|
2195
2195
|
] });
|
|
2196
|
-
}, mi = "_options_d1lk6_1", hi = "_price_d1lk6_12", _i = "_oldPrice_d1lk6_19", pi = "_newPrice_d1lk6_27", gi = "_animate_d1lk6_34", fi = "_appearAndBounce_d1lk6_1", xi = "_meta_d1lk6_52",
|
|
2196
|
+
}, mi = "_options_d1lk6_1", hi = "_price_d1lk6_12", _i = "_oldPrice_d1lk6_19", pi = "_newPrice_d1lk6_27", gi = "_animate_d1lk6_34", fi = "_appearAndBounce_d1lk6_1", xi = "_meta_d1lk6_52", ji = "_info_d1lk6_58", bi = "_infoRight_d1lk6_66", vi = "_buttons_d1lk6_73", yi = "_variants_d1lk6_80", ki = "_variant_d1lk6_80", $i = "_stock_d1lk6_98", Ni = "_variantInfo_d1lk6_105", Ii = "_quantity_d1lk6_111", wi = "_count_d1lk6_118", Ci = "_focused_d1lk6_135", Bi = "_button_d1lk6_73", Si = "_activeVariant_d1lk6_161", Ti = "_chargeTypes_d1lk6_165", Pi = "_charge_d1lk6_165", Ai = "_chargeActive_d1lk6_190", Oi = "_title_d1lk6_198", I = {
|
|
2197
2197
|
options: mi,
|
|
2198
2198
|
price: hi,
|
|
2199
2199
|
oldPrice: _i,
|
|
@@ -2201,14 +2201,14 @@ const la = (r) => {
|
|
|
2201
2201
|
animate: gi,
|
|
2202
2202
|
appearAndBounce: fi,
|
|
2203
2203
|
meta: xi,
|
|
2204
|
-
info:
|
|
2205
|
-
infoRight:
|
|
2204
|
+
info: ji,
|
|
2205
|
+
infoRight: bi,
|
|
2206
2206
|
buttons: vi,
|
|
2207
2207
|
variants: yi,
|
|
2208
2208
|
variant: ki,
|
|
2209
2209
|
stock: $i,
|
|
2210
|
-
variantInfo:
|
|
2211
|
-
quantity:
|
|
2210
|
+
variantInfo: Ni,
|
|
2211
|
+
quantity: Ii,
|
|
2212
2212
|
count: wi,
|
|
2213
2213
|
focused: Ci,
|
|
2214
2214
|
button: Bi,
|
|
@@ -2220,108 +2220,107 @@ const la = (r) => {
|
|
|
2220
2220
|
};
|
|
2221
2221
|
var Mt = /* @__PURE__ */ ((r) => (r.ONE_TIME = "One-Time", r.RECURRING = "Subscribe & Save", r))(Mt || {});
|
|
2222
2222
|
const ra = (r) => {
|
|
2223
|
-
var
|
|
2224
|
-
const { variants: c } = r, [e, s] = g.useState(c[0]), [i, a] = g.useState(e.chargeTypes[0]), l =
|
|
2223
|
+
var B, S;
|
|
2224
|
+
const { variants: c } = r, [e, s] = g.useState(c[0]), [i, a] = g.useState(e.chargeTypes[0]), l = jt(), [m, n] = g.useState(1), [o, x] = g.useState(!1), { reset: $, addProductToCart: _, getProducts: h } = Pt(), [p, d] = g.useState(!1);
|
|
2225
2225
|
g.useEffect(() => {
|
|
2226
|
-
|
|
2227
|
-
const
|
|
2228
|
-
return () => clearTimeout(
|
|
2229
|
-
}, [
|
|
2230
|
-
async function
|
|
2231
|
-
await
|
|
2226
|
+
d(!0);
|
|
2227
|
+
const f = setTimeout(() => d(!1), 600);
|
|
2228
|
+
return () => clearTimeout(f);
|
|
2229
|
+
}, [m]);
|
|
2230
|
+
async function w() {
|
|
2231
|
+
await h(), await _({
|
|
2232
2232
|
productId: r.id,
|
|
2233
2233
|
productVariantId: e.id,
|
|
2234
|
-
quantity:
|
|
2234
|
+
quantity: m
|
|
2235
2235
|
});
|
|
2236
2236
|
}
|
|
2237
|
-
function
|
|
2238
|
-
|
|
2237
|
+
function q() {
|
|
2238
|
+
$(), w(), l("/checkout");
|
|
2239
2239
|
}
|
|
2240
|
-
|
|
2241
|
-
|
|
2242
|
-
|
|
2243
|
-
|
|
2244
|
-
|
|
2245
|
-
|
|
2246
|
-
|
|
2247
|
-
|
|
2248
|
-
|
|
2249
|
-
|
|
2250
|
-
return `${$} ${$ === 1 ? "minute" : "minutes"}`;
|
|
2240
|
+
function y(f) {
|
|
2241
|
+
if (f >= 864e5) {
|
|
2242
|
+
const N = Math.floor(f / 864e5);
|
|
2243
|
+
return `${N} ${N === 1 ? "day" : "days"}`;
|
|
2244
|
+
} else if (f >= 36e5) {
|
|
2245
|
+
const N = Math.floor(f / 36e5);
|
|
2246
|
+
return `${N} ${N === 1 ? "hour" : "hours"}`;
|
|
2247
|
+
} else if (f >= 6e4) {
|
|
2248
|
+
const N = Math.floor(f / 6e4);
|
|
2249
|
+
return `${N} ${N === 1 ? "minute" : "minutes"}`;
|
|
2251
2250
|
} else {
|
|
2252
|
-
const
|
|
2253
|
-
return `${
|
|
2251
|
+
const N = Math.floor(f / 1e3);
|
|
2252
|
+
return `${N} ${N === 1 ? "second" : "seconds"}`;
|
|
2254
2253
|
}
|
|
2255
2254
|
}
|
|
2256
|
-
function
|
|
2257
|
-
return
|
|
2255
|
+
function L(f, D) {
|
|
2256
|
+
return f.length > D ? f.slice(0, D) + "..." : f;
|
|
2258
2257
|
}
|
|
2259
|
-
return /* @__PURE__ */ t.jsxs("div", { className:
|
|
2260
|
-
e.chargeTypes.length > 1 && /* @__PURE__ */ t.jsx("div", { className:
|
|
2258
|
+
return /* @__PURE__ */ t.jsxs("div", { className: I.options, children: [
|
|
2259
|
+
e.chargeTypes.length > 1 && /* @__PURE__ */ t.jsx("div", { className: I.chargeTypes, children: e.chargeTypes.map((f) => /* @__PURE__ */ t.jsx(
|
|
2261
2260
|
"div",
|
|
2262
2261
|
{
|
|
2263
|
-
className:
|
|
2264
|
-
[
|
|
2262
|
+
className: z(I.charge, {
|
|
2263
|
+
[I.chargeActive]: i === f
|
|
2265
2264
|
}),
|
|
2266
|
-
onClick: () => a(
|
|
2267
|
-
children: Mt[
|
|
2265
|
+
onClick: () => a(f),
|
|
2266
|
+
children: Mt[f]
|
|
2268
2267
|
},
|
|
2269
|
-
|
|
2268
|
+
f
|
|
2270
2269
|
)) }),
|
|
2271
|
-
/* @__PURE__ */ t.jsx("div", { className:
|
|
2270
|
+
/* @__PURE__ */ t.jsx("div", { className: I.variants, children: c.map((f) => {
|
|
2272
2271
|
var D;
|
|
2273
2272
|
return /* @__PURE__ */ t.jsxs(
|
|
2274
2273
|
"div",
|
|
2275
2274
|
{
|
|
2276
|
-
className:
|
|
2277
|
-
[
|
|
2275
|
+
className: z(I.variant, {
|
|
2276
|
+
[I.activeVariant]: e.id === f.id
|
|
2278
2277
|
}),
|
|
2279
|
-
onClick: () => s(
|
|
2278
|
+
onClick: () => s(f),
|
|
2280
2279
|
children: [
|
|
2281
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
2282
|
-
/* @__PURE__ */ t.jsx("span", { className:
|
|
2280
|
+
/* @__PURE__ */ t.jsxs("div", { className: I.variantInfo, children: [
|
|
2281
|
+
/* @__PURE__ */ t.jsx("span", { className: I.title, children: L(f.name, 15) }),
|
|
2283
2282
|
/* @__PURE__ */ t.jsxs("span", { children: [
|
|
2284
2283
|
"$",
|
|
2285
|
-
i === "ONE_TIME" ?
|
|
2284
|
+
i === "ONE_TIME" ? f.price.amount : f.subscriptionSettings ? f.subscriptionSettings.price.amount : "Price Not Found"
|
|
2286
2285
|
] })
|
|
2287
2286
|
] }),
|
|
2288
|
-
/* @__PURE__ */ t.jsx("div", { children: i === "ONE_TIME" && /* @__PURE__ */ t.jsxs("span", { className:
|
|
2289
|
-
((D =
|
|
2287
|
+
/* @__PURE__ */ t.jsx("div", { children: i === "ONE_TIME" && /* @__PURE__ */ t.jsxs("span", { className: I.stock, children: [
|
|
2288
|
+
((D = f.quantity.restrictions) == null ? void 0 : D.max) || f.quantity.available || 0,
|
|
2290
2289
|
" in stock"
|
|
2291
2290
|
] }) })
|
|
2292
2291
|
]
|
|
2293
2292
|
},
|
|
2294
|
-
|
|
2293
|
+
f.id
|
|
2295
2294
|
);
|
|
2296
2295
|
}) }),
|
|
2297
|
-
i === "ONE_TIME" && /* @__PURE__ */ t.jsxs("div", { className:
|
|
2296
|
+
i === "ONE_TIME" && /* @__PURE__ */ t.jsxs("div", { className: I.quantity, children: [
|
|
2298
2297
|
/* @__PURE__ */ t.jsx(
|
|
2299
2298
|
"button",
|
|
2300
2299
|
{
|
|
2301
2300
|
onClick: () => {
|
|
2302
|
-
|
|
2301
|
+
m > 1 ? n((f) => f - 1) : n(1);
|
|
2303
2302
|
},
|
|
2304
|
-
className:
|
|
2305
|
-
disabled: e.quantity.restrictions &&
|
|
2306
|
-
children: /* @__PURE__ */ t.jsx(
|
|
2303
|
+
className: I.button,
|
|
2304
|
+
disabled: e.quantity.restrictions && m <= e.quantity.restrictions.min,
|
|
2305
|
+
children: /* @__PURE__ */ t.jsx(b, { name: "Minus" })
|
|
2307
2306
|
}
|
|
2308
2307
|
),
|
|
2309
2308
|
/* @__PURE__ */ t.jsx(
|
|
2310
2309
|
"label",
|
|
2311
2310
|
{
|
|
2312
|
-
className:
|
|
2313
|
-
[
|
|
2311
|
+
className: z(I.count, {
|
|
2312
|
+
[I.focused]: o
|
|
2314
2313
|
}),
|
|
2315
|
-
onFocus: () =>
|
|
2316
|
-
onBlur: () =>
|
|
2314
|
+
onFocus: () => x(!0),
|
|
2315
|
+
onBlur: () => x(!1),
|
|
2317
2316
|
children: /* @__PURE__ */ t.jsx(
|
|
2318
|
-
|
|
2317
|
+
W,
|
|
2319
2318
|
{
|
|
2320
2319
|
type: "number",
|
|
2321
|
-
value: String(
|
|
2322
|
-
onChange: (
|
|
2323
|
-
max: ((
|
|
2324
|
-
min: ((
|
|
2320
|
+
value: String(m),
|
|
2321
|
+
onChange: (f) => n(Number(f)),
|
|
2322
|
+
max: ((B = e.quantity.restrictions) == null ? void 0 : B.max) || e.quantity.available || 1 / 0,
|
|
2323
|
+
min: ((S = e.quantity.restrictions) == null ? void 0 : S.min) || 0,
|
|
2325
2324
|
style: {
|
|
2326
2325
|
backgroundColor: "transparent",
|
|
2327
2326
|
border: "none",
|
|
@@ -2335,20 +2334,20 @@ const ra = (r) => {
|
|
|
2335
2334
|
"button",
|
|
2336
2335
|
{
|
|
2337
2336
|
onClick: () => {
|
|
2338
|
-
n((
|
|
2337
|
+
n((f) => f + 1);
|
|
2339
2338
|
},
|
|
2340
|
-
className:
|
|
2341
|
-
disabled: !!(e.quantity.restrictions &&
|
|
2342
|
-
children: /* @__PURE__ */ t.jsx(
|
|
2339
|
+
className: I.button,
|
|
2340
|
+
disabled: !!(e.quantity.restrictions && m >= e.quantity.restrictions.max || e.quantity.available && m >= e.quantity.available),
|
|
2341
|
+
children: /* @__PURE__ */ t.jsx(b, { name: "Plus" })
|
|
2343
2342
|
}
|
|
2344
2343
|
)
|
|
2345
2344
|
] }),
|
|
2346
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
2347
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
2345
|
+
/* @__PURE__ */ t.jsxs("div", { className: I.meta, children: [
|
|
2346
|
+
/* @__PURE__ */ t.jsxs("div", { className: I.info, children: [
|
|
2348
2347
|
/* @__PURE__ */ t.jsx("span", { children: "Delivery" }),
|
|
2349
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
2348
|
+
/* @__PURE__ */ t.jsxs("div", { className: I.infoRight, children: [
|
|
2350
2349
|
/* @__PURE__ */ t.jsx(
|
|
2351
|
-
|
|
2350
|
+
b,
|
|
2352
2351
|
{
|
|
2353
2352
|
name: "Lightning",
|
|
2354
2353
|
fill: "#FF3F19",
|
|
@@ -2356,44 +2355,44 @@ const ra = (r) => {
|
|
|
2356
2355
|
height: 20
|
|
2357
2356
|
}
|
|
2358
2357
|
),
|
|
2359
|
-
/* @__PURE__ */ t.jsx("span", { children: !e.deliveryTime || e.deliveryTime === 0 ? "Instant" :
|
|
2358
|
+
/* @__PURE__ */ t.jsx("span", { children: !e.deliveryTime || e.deliveryTime === 0 ? "Instant" : y(e.deliveryTime) })
|
|
2360
2359
|
] })
|
|
2361
2360
|
] }),
|
|
2362
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
2361
|
+
/* @__PURE__ */ t.jsxs("div", { className: I.info, children: [
|
|
2363
2362
|
/* @__PURE__ */ t.jsx("span", { children: "Price" }),
|
|
2364
|
-
/* @__PURE__ */ t.jsx("div", { className:
|
|
2365
|
-
/* @__PURE__ */ t.jsxs("span", { className:
|
|
2363
|
+
/* @__PURE__ */ t.jsx("div", { className: I.infoRight, children: i === "ONE_TIME" ? e.compareAtPrice && (e.compareAtPrice.amount || 0) - (e.price.amount || 0) > 0 ? /* @__PURE__ */ t.jsxs("div", { className: I.price, children: [
|
|
2364
|
+
/* @__PURE__ */ t.jsxs("span", { className: z(I.newPrice, { [I.animate]: p }), children: [
|
|
2366
2365
|
"$ ",
|
|
2367
|
-
(e.price.amount || 0) *
|
|
2366
|
+
(e.price.amount || 0) * m
|
|
2368
2367
|
] }),
|
|
2369
|
-
/* @__PURE__ */ t.jsxs("span", { className:
|
|
2368
|
+
/* @__PURE__ */ t.jsxs("span", { className: I.oldPrice, children: [
|
|
2370
2369
|
"$ ",
|
|
2371
|
-
(e.compareAtPrice.amount || 0) *
|
|
2370
|
+
(e.compareAtPrice.amount || 0) * m
|
|
2372
2371
|
] })
|
|
2373
|
-
] }) : /* @__PURE__ */ t.jsxs("span", { className:
|
|
2372
|
+
] }) : /* @__PURE__ */ t.jsxs("span", { className: z(I.newPrice, { [I.animate]: p }), children: [
|
|
2374
2373
|
"$ ",
|
|
2375
|
-
(e.price.amount || 0) *
|
|
2376
|
-
] }) : e.subscriptionSettings && e.subscriptionSettings.compareAtPrice && (e.subscriptionSettings.compareAtPrice.amount || 0) - (e.subscriptionSettings.price.amount || 0) > 0 ? /* @__PURE__ */ t.jsxs("div", { className:
|
|
2377
|
-
/* @__PURE__ */ t.jsxs("span", { className:
|
|
2374
|
+
(e.price.amount || 0) * m
|
|
2375
|
+
] }) : e.subscriptionSettings && e.subscriptionSettings.compareAtPrice && (e.subscriptionSettings.compareAtPrice.amount || 0) - (e.subscriptionSettings.price.amount || 0) > 0 ? /* @__PURE__ */ t.jsxs("div", { className: I.price, children: [
|
|
2376
|
+
/* @__PURE__ */ t.jsxs("span", { className: z(I.newPrice, { [I.animate]: p }), children: [
|
|
2378
2377
|
"$ ",
|
|
2379
2378
|
e.subscriptionSettings.price.amount || 0
|
|
2380
2379
|
] }),
|
|
2381
|
-
/* @__PURE__ */ t.jsxs("span", { className:
|
|
2380
|
+
/* @__PURE__ */ t.jsxs("span", { className: I.oldPrice, children: [
|
|
2382
2381
|
"$ ",
|
|
2383
2382
|
e.subscriptionSettings.compareAtPrice.amount || 0
|
|
2384
2383
|
] })
|
|
2385
|
-
] }) : e.subscriptionSettings && /* @__PURE__ */ t.jsxs("span", { className:
|
|
2384
|
+
] }) : e.subscriptionSettings && /* @__PURE__ */ t.jsxs("span", { className: z(I.newPrice, { [I.animate]: p }), children: [
|
|
2386
2385
|
"$ ",
|
|
2387
2386
|
e.subscriptionSettings.price.amount || 0
|
|
2388
2387
|
] }) })
|
|
2389
2388
|
] })
|
|
2390
2389
|
] }),
|
|
2391
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
2390
|
+
/* @__PURE__ */ t.jsxs("div", { className: I.buttons, children: [
|
|
2392
2391
|
/* @__PURE__ */ t.jsx(
|
|
2393
2392
|
at,
|
|
2394
2393
|
{
|
|
2395
2394
|
type: "Primary",
|
|
2396
|
-
onClick: () =>
|
|
2395
|
+
onClick: () => q(),
|
|
2397
2396
|
children: /* @__PURE__ */ t.jsx("span", { children: i === "ONE_TIME" ? "Buy Now" : "Subscribe Now" })
|
|
2398
2397
|
}
|
|
2399
2398
|
),
|
|
@@ -2401,7 +2400,7 @@ const ra = (r) => {
|
|
|
2401
2400
|
at,
|
|
2402
2401
|
{
|
|
2403
2402
|
type: "Secondary",
|
|
2404
|
-
onClick: () =>
|
|
2403
|
+
onClick: () => w(),
|
|
2405
2404
|
children: "Add to Cart"
|
|
2406
2405
|
}
|
|
2407
2406
|
)
|
|
@@ -2441,36 +2440,36 @@ const ra = (r) => {
|
|
|
2441
2440
|
total: ro,
|
|
2442
2441
|
link: uo,
|
|
2443
2442
|
userInfo: mo
|
|
2444
|
-
}, ho = "_button_85085_1", _o = "_primary_85085_20", po = "_primaryHovered_85085_30", go = "_secondary_85085_34", fo = "_secondaryHovered_85085_44", xo = "_tertiary_85085_48",
|
|
2443
|
+
}, ho = "_button_85085_1", _o = "_primary_85085_20", po = "_primaryHovered_85085_30", go = "_secondary_85085_34", fo = "_secondaryHovered_85085_44", xo = "_tertiary_85085_48", jo = "_tertiaryHovered_85085_58", bo = "_content_85085_62", it = {
|
|
2445
2444
|
button: ho,
|
|
2446
2445
|
primary: _o,
|
|
2447
2446
|
primaryHovered: po,
|
|
2448
2447
|
secondary: go,
|
|
2449
2448
|
secondaryHovered: fo,
|
|
2450
2449
|
tertiary: xo,
|
|
2451
|
-
tertiaryHovered:
|
|
2452
|
-
content:
|
|
2450
|
+
tertiaryHovered: jo,
|
|
2451
|
+
content: bo
|
|
2453
2452
|
}, kt = (r) => {
|
|
2454
|
-
const { children: c, onClick: e, style: s, className: i, disabled: a = !1, type: l = "Primary" } = r, { themeSettings:
|
|
2453
|
+
const { children: c, onClick: e, style: s, className: i, disabled: a = !1, type: l = "Primary" } = r, { themeSettings: m } = qt();
|
|
2455
2454
|
return /* @__PURE__ */ t.jsx(
|
|
2456
2455
|
"button",
|
|
2457
2456
|
{
|
|
2458
|
-
className:
|
|
2459
|
-
[
|
|
2460
|
-
[
|
|
2461
|
-
[
|
|
2462
|
-
[
|
|
2463
|
-
[
|
|
2464
|
-
[
|
|
2457
|
+
className: z(it.button, i, {
|
|
2458
|
+
[it.primary]: l === "Primary",
|
|
2459
|
+
[it.secondary]: l === "Secondary",
|
|
2460
|
+
[it.tertiary]: l === "Tertiary",
|
|
2461
|
+
[it.primaryHovered]: l === "Primary" && !a && m.buttons.primary.hover,
|
|
2462
|
+
[it.secondaryHovered]: l === "Secondary" && !a && m.buttons.secondary.hover,
|
|
2463
|
+
[it.tertiaryHovered]: l === "Tertiary" && !a && m.buttons.tertiary.hover
|
|
2465
2464
|
}),
|
|
2466
2465
|
onClick: e,
|
|
2467
2466
|
style: {
|
|
2468
2467
|
...s
|
|
2469
2468
|
},
|
|
2470
2469
|
disabled: a,
|
|
2471
|
-
children: l === "Tertiary" ? /* @__PURE__ */ t.jsxs("div", { className:
|
|
2470
|
+
children: l === "Tertiary" ? /* @__PURE__ */ t.jsxs("div", { className: it.content, children: [
|
|
2472
2471
|
/* @__PURE__ */ t.jsx(
|
|
2473
|
-
|
|
2472
|
+
b,
|
|
2474
2473
|
{
|
|
2475
2474
|
name: "ArrowRight",
|
|
2476
2475
|
fill: "#757575",
|
|
@@ -2532,7 +2531,7 @@ function ko(r, c) {
|
|
|
2532
2531
|
}
|
|
2533
2532
|
}
|
|
2534
2533
|
const da = (r) => {
|
|
2535
|
-
const { shopping: c, signUp: e } = r, s =
|
|
2534
|
+
const { shopping: c, signUp: e } = r, s = jt();
|
|
2536
2535
|
function i(l) {
|
|
2537
2536
|
s(l);
|
|
2538
2537
|
}
|
|
@@ -2565,46 +2564,44 @@ const da = (r) => {
|
|
|
2565
2564
|
] });
|
|
2566
2565
|
}, $o = () => {
|
|
2567
2566
|
const [r, c] = g.useState(!1), [e, s] = g.useState([]), { cart: i, getProducts: a } = Pt();
|
|
2568
|
-
function l(
|
|
2569
|
-
for (let
|
|
2570
|
-
for (let
|
|
2571
|
-
if (i.parts[
|
|
2572
|
-
return i.parts[
|
|
2567
|
+
function l(_) {
|
|
2568
|
+
for (let h = 0; h < i.parts.length; h++)
|
|
2569
|
+
for (let p = 0; p < _.variants.length; p++)
|
|
2570
|
+
if (i.parts[h].productVariantId === _.variants[h].id)
|
|
2571
|
+
return i.parts[h].productVariantId;
|
|
2573
2572
|
}
|
|
2574
|
-
function
|
|
2575
|
-
for (let
|
|
2576
|
-
for (let
|
|
2577
|
-
if (i.parts[
|
|
2578
|
-
return i.parts[
|
|
2573
|
+
function m(_) {
|
|
2574
|
+
for (let h = 0; h < i.parts.length; h++)
|
|
2575
|
+
for (let p = 0; p < _.variants.length; p++)
|
|
2576
|
+
if (i.parts[h].productVariantId === _.variants[h].id)
|
|
2577
|
+
return i.parts[h].quantity;
|
|
2579
2578
|
}
|
|
2580
2579
|
g.useEffect(() => {
|
|
2581
2580
|
(async () => {
|
|
2582
|
-
const
|
|
2581
|
+
const h = i.parts.map((w) => String(w.productId)), d = (await a([...h])).map((w) => ({
|
|
2583
2582
|
...w,
|
|
2584
2583
|
activeVariantId: l(w),
|
|
2585
|
-
quantity:
|
|
2584
|
+
quantity: m(w)
|
|
2586
2585
|
}));
|
|
2587
2586
|
s(d);
|
|
2588
2587
|
})();
|
|
2589
2588
|
}, [i.parts.length]);
|
|
2590
|
-
function n(
|
|
2591
|
-
var
|
|
2592
|
-
return !
|
|
2589
|
+
function n(_) {
|
|
2590
|
+
var h;
|
|
2591
|
+
return !_ || !(_ != null && _.variants) ? !1 : (h = _.variants.find((p) => p.id === _.activeVariantId)) == null ? void 0 : h.subscriptionSettings;
|
|
2593
2592
|
}
|
|
2594
|
-
const o = i.parts.length > 0 && e.length > 0 && !n(e[0]);
|
|
2595
|
-
console.log(i.parts.length > 0, e.length > 0, !n(e[0]));
|
|
2596
|
-
const [f, I] = g.useState(!1);
|
|
2593
|
+
const o = i.parts.length > 0 && e.length > 0 && !n(e[0]), [x, $] = g.useState(!1);
|
|
2597
2594
|
return /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
2598
2595
|
/* @__PURE__ */ t.jsxs(
|
|
2599
2596
|
"div",
|
|
2600
2597
|
{
|
|
2601
2598
|
className: C.button,
|
|
2602
|
-
onClick: (
|
|
2603
|
-
|
|
2599
|
+
onClick: (_) => {
|
|
2600
|
+
_.stopPropagation(), c(!0), $(!0);
|
|
2604
2601
|
},
|
|
2605
2602
|
children: [
|
|
2606
2603
|
/* @__PURE__ */ t.jsx(
|
|
2607
|
-
|
|
2604
|
+
b,
|
|
2608
2605
|
{
|
|
2609
2606
|
name: "Handbag",
|
|
2610
2607
|
fill: "var(--icon-primary)"
|
|
@@ -2618,47 +2615,47 @@ const da = (r) => {
|
|
|
2618
2615
|
Et,
|
|
2619
2616
|
{
|
|
2620
2617
|
close: () => {
|
|
2621
|
-
|
|
2618
|
+
$(!1), setTimeout(() => {
|
|
2622
2619
|
c(!1);
|
|
2623
2620
|
}, 300);
|
|
2624
2621
|
},
|
|
2625
2622
|
children: /* @__PURE__ */ t.jsx(
|
|
2626
|
-
|
|
2623
|
+
No,
|
|
2627
2624
|
{
|
|
2628
2625
|
activeProducts: e,
|
|
2629
2626
|
isCartNotEmpty: o,
|
|
2630
|
-
isOpen:
|
|
2627
|
+
isOpen: x
|
|
2631
2628
|
}
|
|
2632
2629
|
)
|
|
2633
2630
|
}
|
|
2634
2631
|
)
|
|
2635
2632
|
] });
|
|
2636
|
-
},
|
|
2637
|
-
const { activeProducts: c, isCartNotEmpty: e, isOpen: s } = r, { cart: i, reset: a, getTotalAndDiscount: l, updateQuantityOfProduct:
|
|
2638
|
-
function o(
|
|
2639
|
-
n(
|
|
2633
|
+
}, No = (r) => {
|
|
2634
|
+
const { activeProducts: c, isCartNotEmpty: e, isOpen: s } = r, { cart: i, reset: a, getTotalAndDiscount: l, updateQuantityOfProduct: m } = Pt(), n = jt();
|
|
2635
|
+
function o(_) {
|
|
2636
|
+
n(_);
|
|
2640
2637
|
}
|
|
2641
|
-
function
|
|
2642
|
-
|
|
2643
|
-
productId:
|
|
2644
|
-
productVariantId:
|
|
2645
|
-
quantity:
|
|
2638
|
+
function x(_) {
|
|
2639
|
+
m({
|
|
2640
|
+
productId: _.id,
|
|
2641
|
+
productVariantId: _.activeVariantId,
|
|
2642
|
+
quantity: _.quantity + 1
|
|
2646
2643
|
});
|
|
2647
2644
|
}
|
|
2648
|
-
function
|
|
2649
|
-
|
|
2650
|
-
productId:
|
|
2651
|
-
productVariantId:
|
|
2652
|
-
quantity:
|
|
2645
|
+
function $(_) {
|
|
2646
|
+
m({
|
|
2647
|
+
productId: _.id,
|
|
2648
|
+
productVariantId: _.activeVariantId,
|
|
2649
|
+
quantity: _.quantity - 1
|
|
2653
2650
|
});
|
|
2654
2651
|
}
|
|
2655
2652
|
return /* @__PURE__ */ t.jsxs(
|
|
2656
2653
|
"div",
|
|
2657
2654
|
{
|
|
2658
|
-
className:
|
|
2655
|
+
className: z(C.modal, {
|
|
2659
2656
|
[C.closing]: !s
|
|
2660
2657
|
}),
|
|
2661
|
-
onClick: (
|
|
2658
|
+
onClick: (_) => _.stopPropagation(),
|
|
2662
2659
|
children: [
|
|
2663
2660
|
/* @__PURE__ */ t.jsxs("div", { className: C.top, children: [
|
|
2664
2661
|
/* @__PURE__ */ t.jsxs("div", { className: C.info, children: [
|
|
@@ -2668,7 +2665,7 @@ const da = (r) => {
|
|
|
2668
2665
|
/* @__PURE__ */ t.jsx(
|
|
2669
2666
|
"button",
|
|
2670
2667
|
{
|
|
2671
|
-
className:
|
|
2668
|
+
className: z(C.clear, {
|
|
2672
2669
|
[C.activeClear]: e
|
|
2673
2670
|
}),
|
|
2674
2671
|
disabled: !e,
|
|
@@ -2678,7 +2675,7 @@ const da = (r) => {
|
|
|
2678
2675
|
)
|
|
2679
2676
|
] }),
|
|
2680
2677
|
e ? /* @__PURE__ */ t.jsxs("div", { className: C.cart, children: [
|
|
2681
|
-
/* @__PURE__ */ t.jsx("div", { className: C.products, children: c.map((
|
|
2678
|
+
/* @__PURE__ */ t.jsx("div", { className: C.products, children: c.map((_) => /* @__PURE__ */ t.jsxs(
|
|
2682
2679
|
"div",
|
|
2683
2680
|
{
|
|
2684
2681
|
className: C.product,
|
|
@@ -2687,7 +2684,7 @@ const da = (r) => {
|
|
|
2687
2684
|
/* @__PURE__ */ t.jsx(
|
|
2688
2685
|
"img",
|
|
2689
2686
|
{
|
|
2690
|
-
src: `https://imagedelivery.net/${
|
|
2687
|
+
src: `https://imagedelivery.net/${_.images[0].cfId}/w=500`,
|
|
2691
2688
|
alt: "image",
|
|
2692
2689
|
width: "100%",
|
|
2693
2690
|
height: "100%",
|
|
@@ -2695,10 +2692,10 @@ const da = (r) => {
|
|
|
2695
2692
|
}
|
|
2696
2693
|
),
|
|
2697
2694
|
/* @__PURE__ */ t.jsxs("div", { className: C.content, children: [
|
|
2698
|
-
/* @__PURE__ */ t.jsx("div", { className: C.name, children:
|
|
2695
|
+
/* @__PURE__ */ t.jsx("div", { className: C.name, children: _.name }),
|
|
2699
2696
|
/* @__PURE__ */ t.jsxs("div", { className: C.price, children: [
|
|
2700
2697
|
"$",
|
|
2701
|
-
|
|
2698
|
+
_.variants.find((h) => h.id === _.activeVariantId).price.amount * ((_ == null ? void 0 : _.quantity) || 1)
|
|
2702
2699
|
] })
|
|
2703
2700
|
] })
|
|
2704
2701
|
] }),
|
|
@@ -2707,11 +2704,11 @@ const da = (r) => {
|
|
|
2707
2704
|
"div",
|
|
2708
2705
|
{
|
|
2709
2706
|
onClick: () => {
|
|
2710
|
-
|
|
2707
|
+
_.quantity !== 1 && $(_);
|
|
2711
2708
|
},
|
|
2712
2709
|
className: C.productButton,
|
|
2713
2710
|
children: /* @__PURE__ */ t.jsx(
|
|
2714
|
-
|
|
2711
|
+
b,
|
|
2715
2712
|
{
|
|
2716
2713
|
name: "Minus",
|
|
2717
2714
|
fill: "#757575",
|
|
@@ -2721,14 +2718,14 @@ const da = (r) => {
|
|
|
2721
2718
|
)
|
|
2722
2719
|
}
|
|
2723
2720
|
),
|
|
2724
|
-
/* @__PURE__ */ t.jsx("div", { className: C.productCount, children:
|
|
2721
|
+
/* @__PURE__ */ t.jsx("div", { className: C.productCount, children: _.quantity }),
|
|
2725
2722
|
/* @__PURE__ */ t.jsx(
|
|
2726
2723
|
"div",
|
|
2727
2724
|
{
|
|
2728
|
-
onClick: () =>
|
|
2725
|
+
onClick: () => x(_),
|
|
2729
2726
|
className: C.productButton,
|
|
2730
2727
|
children: /* @__PURE__ */ t.jsx(
|
|
2731
|
-
|
|
2728
|
+
b,
|
|
2732
2729
|
{
|
|
2733
2730
|
name: "Plus",
|
|
2734
2731
|
fill: "#757575",
|
|
@@ -2741,14 +2738,14 @@ const da = (r) => {
|
|
|
2741
2738
|
] })
|
|
2742
2739
|
]
|
|
2743
2740
|
},
|
|
2744
|
-
|
|
2741
|
+
_.id
|
|
2745
2742
|
)) }),
|
|
2746
2743
|
/* @__PURE__ */ t.jsxs("div", { className: C.bottom, children: [
|
|
2747
2744
|
/* @__PURE__ */ t.jsxs("div", { className: C.subtotal, children: [
|
|
2748
2745
|
/* @__PURE__ */ t.jsxs("div", { className: C.block, children: [
|
|
2749
2746
|
/* @__PURE__ */ t.jsx("span", { children: "Subtotal" }),
|
|
2750
2747
|
/* @__PURE__ */ t.jsx(
|
|
2751
|
-
|
|
2748
|
+
b,
|
|
2752
2749
|
{
|
|
2753
2750
|
name: "Info",
|
|
2754
2751
|
width: 20,
|
|
@@ -2764,13 +2761,13 @@ const da = (r) => {
|
|
|
2764
2761
|
] }),
|
|
2765
2762
|
/* @__PURE__ */ t.jsx(kt, { onClick: () => o("/checkout"), children: "Checkout" })
|
|
2766
2763
|
] })
|
|
2767
|
-
] }) : /* @__PURE__ */ t.jsx(
|
|
2764
|
+
] }) : /* @__PURE__ */ t.jsx(Io, {})
|
|
2768
2765
|
]
|
|
2769
2766
|
}
|
|
2770
2767
|
);
|
|
2771
|
-
},
|
|
2768
|
+
}, Io = () => /* @__PURE__ */ t.jsxs("div", { className: C.empty, children: [
|
|
2772
2769
|
/* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
|
|
2773
|
-
|
|
2770
|
+
b,
|
|
2774
2771
|
{
|
|
2775
2772
|
name: "Handbag",
|
|
2776
2773
|
fill: "var(--icon-secondary)"
|
|
@@ -2790,7 +2787,7 @@ const da = (r) => {
|
|
|
2790
2787
|
)
|
|
2791
2788
|
] })
|
|
2792
2789
|
] }), wo = ({ token: r }) => {
|
|
2793
|
-
const [c, e] = g.useState("test-email@gmail.com"), s =
|
|
2790
|
+
const [c, e] = g.useState("test-email@gmail.com"), s = jt();
|
|
2794
2791
|
g.useEffect(() => {
|
|
2795
2792
|
(async () => {
|
|
2796
2793
|
const l = ko(r);
|
|
@@ -2833,7 +2830,7 @@ const da = (r) => {
|
|
|
2833
2830
|
},
|
|
2834
2831
|
type: "Secondary",
|
|
2835
2832
|
children: /* @__PURE__ */ t.jsx(
|
|
2836
|
-
|
|
2833
|
+
b,
|
|
2837
2834
|
{
|
|
2838
2835
|
name: "Share",
|
|
2839
2836
|
fill: "#757575",
|
|
@@ -2861,7 +2858,7 @@ const da = (r) => {
|
|
|
2861
2858
|
/* @__PURE__ */ t.jsxs("div", { className: ot.header, children: [
|
|
2862
2859
|
/* @__PURE__ */ t.jsx("div", { className: ot.title, children: "Copy Product Link" }),
|
|
2863
2860
|
/* @__PURE__ */ t.jsx(
|
|
2864
|
-
|
|
2861
|
+
b,
|
|
2865
2862
|
{
|
|
2866
2863
|
name: "X",
|
|
2867
2864
|
fill: "#757575",
|
|
@@ -2874,7 +2871,7 @@ const da = (r) => {
|
|
|
2874
2871
|
/* @__PURE__ */ t.jsx(
|
|
2875
2872
|
"div",
|
|
2876
2873
|
{
|
|
2877
|
-
className:
|
|
2874
|
+
className: z(ot.copy, ot.copyText),
|
|
2878
2875
|
onClick: i,
|
|
2879
2876
|
children: s
|
|
2880
2877
|
}
|
|
@@ -2884,7 +2881,7 @@ const da = (r) => {
|
|
|
2884
2881
|
{
|
|
2885
2882
|
onClick: i,
|
|
2886
2883
|
className: ot.copy,
|
|
2887
|
-
children: c ? /* @__PURE__ */ t.jsx(
|
|
2884
|
+
children: c ? /* @__PURE__ */ t.jsx(b, { name: "Check" }) : /* @__PURE__ */ t.jsx(b, { name: "Copy" })
|
|
2888
2885
|
}
|
|
2889
2886
|
)
|
|
2890
2887
|
] })
|
|
@@ -2898,7 +2895,7 @@ const da = (r) => {
|
|
|
2898
2895
|
open: Ho,
|
|
2899
2896
|
content: zo
|
|
2900
2897
|
}, ma = ({ title: r, content: c }) => {
|
|
2901
|
-
const [e, s] = g.useState(!1), [i, a] = g.useState(0), l = g.useRef(null),
|
|
2898
|
+
const [e, s] = g.useState(!1), [i, a] = g.useState(0), l = g.useRef(null), m = () => {
|
|
2902
2899
|
s(!e);
|
|
2903
2900
|
};
|
|
2904
2901
|
return g.useEffect(() => {
|
|
@@ -2908,10 +2905,10 @@ const da = (r) => {
|
|
|
2908
2905
|
"div",
|
|
2909
2906
|
{
|
|
2910
2907
|
className: _t.header,
|
|
2911
|
-
onClick:
|
|
2908
|
+
onClick: m,
|
|
2912
2909
|
children: [
|
|
2913
2910
|
/* @__PURE__ */ t.jsx("h5", { id: "h5", children: r }),
|
|
2914
|
-
/* @__PURE__ */ t.jsx("div", { className:
|
|
2911
|
+
/* @__PURE__ */ t.jsx("div", { className: z(_t.icon, { [_t.open]: e }), children: /* @__PURE__ */ t.jsx(b, { name: "CaretDown" }) })
|
|
2915
2912
|
]
|
|
2916
2913
|
}
|
|
2917
2914
|
),
|
|
@@ -2925,13 +2922,13 @@ const da = (r) => {
|
|
|
2925
2922
|
}
|
|
2926
2923
|
)
|
|
2927
2924
|
] });
|
|
2928
|
-
}, Fo = "
|
|
2925
|
+
}, Fo = "_wrapper_p74l6_1", Vo = "_label_p74l6_9", Uo = "_input_p74l6_18", Yo = "_paddingless_p74l6_31", Go = "_content_p74l6_35", Wo = "_contentBorder_p74l6_48", Xo = "_borderless_p74l6_53", Jo = "_rightIcon_p74l6_58", et = {
|
|
2929
2926
|
wrapper: Fo,
|
|
2930
2927
|
label: Vo,
|
|
2931
2928
|
input: Uo,
|
|
2932
|
-
|
|
2933
|
-
|
|
2934
|
-
|
|
2929
|
+
paddingless: Yo,
|
|
2930
|
+
content: Go,
|
|
2931
|
+
contentBorder: Wo,
|
|
2935
2932
|
borderless: Xo,
|
|
2936
2933
|
rightIcon: Jo
|
|
2937
2934
|
}, ha = (r) => {
|
|
@@ -2942,42 +2939,27 @@ const da = (r) => {
|
|
|
2942
2939
|
value: i,
|
|
2943
2940
|
type: a,
|
|
2944
2941
|
min: l,
|
|
2945
|
-
max:
|
|
2942
|
+
max: m,
|
|
2946
2943
|
placeholder: n,
|
|
2947
2944
|
disabled: o = !1,
|
|
2948
|
-
required:
|
|
2949
|
-
regex:
|
|
2950
|
-
paddingless:
|
|
2951
|
-
borderless:
|
|
2952
|
-
editable:
|
|
2945
|
+
required: x = !1,
|
|
2946
|
+
regex: $,
|
|
2947
|
+
paddingless: _ = !1,
|
|
2948
|
+
borderless: h = !1,
|
|
2949
|
+
editable: p = !1,
|
|
2953
2950
|
isSearch: d = !1
|
|
2954
|
-
} = r, { themeSettings: w } = qt(), { inputs:
|
|
2955
|
-
function B(
|
|
2956
|
-
|
|
2957
|
-
let T, $, U;
|
|
2958
|
-
return u.length === 7 ? (T = parseInt(u.slice(1, 3), 16), $ = parseInt(u.slice(3, 5), 16), U = parseInt(u.slice(5, 7), 16)) : u.length === 4 && (T = parseInt(u[1] + u[1], 16), $ = parseInt(u[2] + u[2], 16), U = parseInt(u[3] + u[3], 16)), `rgba(${T}, ${$}, ${U}, ${D})`;
|
|
2959
|
-
}
|
|
2960
|
-
const b = {
|
|
2961
|
-
black: "#000000",
|
|
2962
|
-
white: "#ffffff",
|
|
2963
|
-
red: "#ff0000",
|
|
2964
|
-
green: "#00ff00",
|
|
2965
|
-
blue: "#0000ff"
|
|
2966
|
-
// Можно добавить больше цветов
|
|
2967
|
-
}[u.toLowerCase()];
|
|
2968
|
-
return b ? B(b, D) : u;
|
|
2969
|
-
}
|
|
2970
|
-
function S(u) {
|
|
2971
|
-
return Number(u) < 0 ? String(l) : u;
|
|
2951
|
+
} = r, { themeSettings: w } = qt(), { inputs: q } = w, [y, L] = g.useState(!1);
|
|
2952
|
+
function B(f) {
|
|
2953
|
+
return Number(f) < 0 ? String(l) : f;
|
|
2972
2954
|
}
|
|
2973
|
-
function
|
|
2974
|
-
return !
|
|
2955
|
+
function S(f) {
|
|
2956
|
+
return !x || !$ ? !0 : new RegExp($).test(f);
|
|
2975
2957
|
}
|
|
2976
|
-
return /* @__PURE__ */ t.jsxs("div", { className:
|
|
2958
|
+
return /* @__PURE__ */ t.jsxs("div", { className: et.wrapper, children: [
|
|
2977
2959
|
s && /* @__PURE__ */ t.jsx(
|
|
2978
2960
|
"label",
|
|
2979
2961
|
{
|
|
2980
|
-
className:
|
|
2962
|
+
className: et.label,
|
|
2981
2963
|
htmlFor: s,
|
|
2982
2964
|
children: s
|
|
2983
2965
|
}
|
|
@@ -2985,11 +2967,13 @@ const da = (r) => {
|
|
|
2985
2967
|
/* @__PURE__ */ t.jsxs(
|
|
2986
2968
|
"div",
|
|
2987
2969
|
{
|
|
2988
|
-
className:
|
|
2970
|
+
className: z(et.content, {
|
|
2971
|
+
[et.contentBorder]: q.border.active
|
|
2972
|
+
}),
|
|
2989
2973
|
style: {
|
|
2990
|
-
paddingRight:
|
|
2974
|
+
paddingRight: q.general.height + 15,
|
|
2991
2975
|
...e,
|
|
2992
|
-
|
|
2976
|
+
background: q.field.active ? q.field.color : "transparent"
|
|
2993
2977
|
},
|
|
2994
2978
|
children: [
|
|
2995
2979
|
/* @__PURE__ */ t.jsx(
|
|
@@ -2997,38 +2981,38 @@ const da = (r) => {
|
|
|
2997
2981
|
{
|
|
2998
2982
|
id: s,
|
|
2999
2983
|
type: a || "text",
|
|
3000
|
-
onChange: (
|
|
3001
|
-
if (a === "text") c(
|
|
2984
|
+
onChange: (f) => {
|
|
2985
|
+
if (a === "text") c(f.target.value);
|
|
3002
2986
|
else {
|
|
3003
|
-
const D =
|
|
2987
|
+
const D = B(f.target.value);
|
|
3004
2988
|
c(D);
|
|
3005
2989
|
}
|
|
3006
2990
|
},
|
|
3007
2991
|
value: i,
|
|
3008
2992
|
autoComplete: "off",
|
|
3009
2993
|
placeholder: n || "Type something...",
|
|
3010
|
-
className:
|
|
3011
|
-
[
|
|
3012
|
-
[
|
|
3013
|
-
[
|
|
2994
|
+
className: z(et.input, {
|
|
2995
|
+
[et.required]: y && x && !S(i),
|
|
2996
|
+
[et.paddingless]: _,
|
|
2997
|
+
[et.borderless]: h
|
|
3014
2998
|
}),
|
|
3015
2999
|
min: a === "number" ? l : void 0,
|
|
3016
|
-
max: a === "number" ?
|
|
3000
|
+
max: a === "number" ? m : void 0,
|
|
3017
3001
|
disabled: o,
|
|
3018
3002
|
onFocus: () => L(!0)
|
|
3019
3003
|
}
|
|
3020
3004
|
),
|
|
3021
|
-
d && /* @__PURE__ */ t.jsx("div", { className:
|
|
3022
|
-
|
|
3005
|
+
d && /* @__PURE__ */ t.jsx("div", { className: et.rightIcon, children: /* @__PURE__ */ t.jsx(
|
|
3006
|
+
b,
|
|
3023
3007
|
{
|
|
3024
3008
|
name: "MagnifyingGlass",
|
|
3025
3009
|
fill: "var(--icon-secondary)",
|
|
3026
|
-
width:
|
|
3027
|
-
height:
|
|
3010
|
+
width: q.general.height,
|
|
3011
|
+
height: q.general.height
|
|
3028
3012
|
}
|
|
3029
3013
|
) }),
|
|
3030
|
-
|
|
3031
|
-
|
|
3014
|
+
p && /* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
|
|
3015
|
+
b,
|
|
3032
3016
|
{
|
|
3033
3017
|
name: "Sliders",
|
|
3034
3018
|
width: 20,
|
|
@@ -3046,7 +3030,7 @@ const da = (r) => {
|
|
|
3046
3030
|
textarea: Zo,
|
|
3047
3031
|
length: ta
|
|
3048
3032
|
}, _a = (r) => {
|
|
3049
|
-
const { onChange: c, label: e, value: s, maxLength: i, placeholder: a = "Type something..." } = r, [l,
|
|
3033
|
+
const { onChange: c, label: e, value: s, maxLength: i, placeholder: a = "Type something..." } = r, [l, m] = g.useState(s.length);
|
|
3050
3034
|
return /* @__PURE__ */ t.jsxs("div", { className: xt.wrapper, children: [
|
|
3051
3035
|
e && /* @__PURE__ */ t.jsx(
|
|
3052
3036
|
"label",
|
|
@@ -3062,7 +3046,7 @@ const da = (r) => {
|
|
|
3062
3046
|
id: e,
|
|
3063
3047
|
defaultValue: s,
|
|
3064
3048
|
onChange: (n) => {
|
|
3065
|
-
|
|
3049
|
+
m(n.target.value.length), c(n.target.value);
|
|
3066
3050
|
},
|
|
3067
3051
|
placeholder: a,
|
|
3068
3052
|
className: xt.textarea,
|
|
@@ -3084,11 +3068,11 @@ export {
|
|
|
3084
3068
|
oa as CategorySettings,
|
|
3085
3069
|
gt as ChooseImage,
|
|
3086
3070
|
fa as ChooseImageModal,
|
|
3087
|
-
|
|
3071
|
+
Io as EmptyCart,
|
|
3088
3072
|
aa as FormSettings,
|
|
3089
3073
|
da as HeaderButtons,
|
|
3090
|
-
|
|
3091
|
-
|
|
3074
|
+
b as Icon,
|
|
3075
|
+
W as InputSettings,
|
|
3092
3076
|
ha as InputUI,
|
|
3093
3077
|
He as ItemsSettings,
|
|
3094
3078
|
ia as LayoutSettings,
|
|
@@ -3097,11 +3081,11 @@ export {
|
|
|
3097
3081
|
Et as Modal,
|
|
3098
3082
|
ra as ProductOptions,
|
|
3099
3083
|
At as RangeSelector,
|
|
3100
|
-
|
|
3084
|
+
st as Select,
|
|
3101
3085
|
ua as ShareLink,
|
|
3102
3086
|
$o as ShoppingButton,
|
|
3103
|
-
|
|
3104
|
-
|
|
3087
|
+
No as ShoppingModalCart,
|
|
3088
|
+
Z as Switch,
|
|
3105
3089
|
Rt as TextSettings,
|
|
3106
3090
|
Ot as TextareaSettings,
|
|
3107
3091
|
_a as TextareaUI,
|