@billgangcom/theme-lib 1.36.0 → 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 +3 -3
- package/dist/builder.es.js +50 -70
- package/dist/{index-DwwDB4Kw.js → index-CAh3qv6L.js} +7 -8
- package/dist/{index-BnJDbbG8.cjs → index-D1mPV-lW.cjs} +2 -2
- package/dist/ui.cjs.js +1 -1
- package/dist/ui.es.js +607 -620
- 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 = {
|
|
@@ -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,7 +88,7 @@ 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:
|
|
91
|
+
className: z(J.padding, {
|
|
92
92
|
[J.active]: m === o
|
|
93
93
|
}),
|
|
94
94
|
onFocus: () => {
|
|
@@ -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,7 +156,7 @@ 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: () => {
|
|
@@ -168,7 +168,7 @@ const Ft = "_wrapper_3ibiw_2", Vt = "_alignmentBlock_3ibiw_8", Ut = "_title_3ibi
|
|
|
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",
|
|
@@ -194,7 +194,7 @@ const Ft = "_wrapper_3ibiw_2", Vt = "_alignmentBlock_3ibiw_8", Ut = "_title_3ibi
|
|
|
194
194
|
(m || e !== void 0) && /* @__PURE__ */ t.jsxs("div", { className: ht.top, children: [
|
|
195
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,
|
|
@@ -266,7 +266,7 @@ const Ft = "_wrapper_3ibiw_2", Vt = "_alignmentBlock_3ibiw_8", Ut = "_title_3ibi
|
|
|
266
266
|
/* @__PURE__ */ t.jsxs("div", { className: H.top, children: [
|
|
267
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,
|
|
@@ -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,
|
|
@@ -337,14 +337,14 @@ const Ft = "_wrapper_3ibiw_2", Vt = "_alignmentBlock_3ibiw_8", Ut = "_title_3ibi
|
|
|
337
337
|
if (n.type === "inputSwitch")
|
|
338
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),
|
|
@@ -467,23 +467,23 @@ const He = (r) => {
|
|
|
467
467
|
subtitle: m,
|
|
468
468
|
editable: n = !0,
|
|
469
469
|
draggable: o = !1,
|
|
470
|
-
withImage:
|
|
471
|
-
deletable:
|
|
470
|
+
withImage: x = !1,
|
|
471
|
+
deletable: $ = !0,
|
|
472
472
|
addable: _ = !0,
|
|
473
473
|
itemsType: h,
|
|
474
474
|
itemsPlaceholder: p = "",
|
|
475
475
|
itemsOptions: d,
|
|
476
|
-
hasRangeSelector:
|
|
477
|
-
rangeSelectorOptions:
|
|
476
|
+
hasRangeSelector: w = !1,
|
|
477
|
+
rangeSelectorOptions: q,
|
|
478
478
|
modalOptions: y,
|
|
479
479
|
addableOptions: L = {},
|
|
480
480
|
limit: B,
|
|
481
|
-
autoScrollInterval:
|
|
482
|
-
} = r, [
|
|
481
|
+
autoScrollInterval: S
|
|
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
|
}
|
|
@@ -491,36 +491,36 @@ const He = (r) => {
|
|
|
491
491
|
);
|
|
492
492
|
g.useEffect(() => {
|
|
493
493
|
const u = () => {
|
|
494
|
-
|
|
494
|
+
D(null), A(!1);
|
|
495
495
|
};
|
|
496
|
-
return document.body.addEventListener("click", u),
|
|
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 u = [...s].map((
|
|
500
|
+
if (f) {
|
|
501
|
+
const u = [...s].map((k) => k.id === f.id ? f : k);
|
|
502
502
|
i(u);
|
|
503
503
|
}
|
|
504
|
-
}, [
|
|
505
|
-
if (
|
|
506
|
-
const u =
|
|
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
|
|
513
|
+
}, [E.current, v]);
|
|
514
|
+
const K = (u, k) => {
|
|
515
515
|
u.stopPropagation();
|
|
516
|
-
const
|
|
517
|
-
|
|
518
|
-
top:
|
|
519
|
-
left:
|
|
520
|
-
}), k
|
|
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
522
|
function ct(u) {
|
|
523
|
-
if (
|
|
523
|
+
if (x)
|
|
524
524
|
return u ? /* @__PURE__ */ t.jsx(
|
|
525
525
|
"img",
|
|
526
526
|
{
|
|
@@ -530,7 +530,7 @@ const He = (r) => {
|
|
|
530
530
|
height: 16
|
|
531
531
|
}
|
|
532
532
|
) : /* @__PURE__ */ t.jsx(
|
|
533
|
-
|
|
533
|
+
b,
|
|
534
534
|
{
|
|
535
535
|
name: "Image",
|
|
536
536
|
width: 16,
|
|
@@ -540,19 +540,19 @@ const He = (r) => {
|
|
|
540
540
|
);
|
|
541
541
|
}
|
|
542
542
|
const j = (u) => {
|
|
543
|
-
const { active:
|
|
544
|
-
if (
|
|
545
|
-
const R = s.findIndex((
|
|
546
|
-
if (R !== -1 &&
|
|
547
|
-
const
|
|
548
|
-
|
|
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,
|
|
@@ -561,32 +561,32 @@ const He = (r) => {
|
|
|
561
561
|
}
|
|
562
562
|
) }),
|
|
563
563
|
h === "select" && d && /* @__PURE__ */ t.jsx(
|
|
564
|
-
|
|
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
569
|
const rt = lt.map((ft) => ft.id === u.id ? {
|
|
570
570
|
...ut,
|
|
571
|
-
name:
|
|
571
|
+
name: P
|
|
572
572
|
} : ft);
|
|
573
|
-
|
|
573
|
+
D({
|
|
574
574
|
...u,
|
|
575
|
-
name:
|
|
575
|
+
name: P
|
|
576
576
|
}), i([...rt]);
|
|
577
577
|
},
|
|
578
578
|
value: u.name,
|
|
579
|
-
options: d.filter((
|
|
579
|
+
options: d.filter((P) => !s.find((lt) => lt.name === P.name)).map((P) => P.name),
|
|
580
580
|
leftAddon: ct(u.images)
|
|
581
581
|
}
|
|
582
582
|
),
|
|
583
583
|
h === "input" && /* @__PURE__ */ t.jsx(
|
|
584
|
-
|
|
584
|
+
W,
|
|
585
585
|
{
|
|
586
|
-
onChange: (
|
|
586
|
+
onChange: (P) => {
|
|
587
587
|
const ut = [...s].map((rt) => rt.id === u.id ? {
|
|
588
588
|
...u,
|
|
589
|
-
name:
|
|
589
|
+
name: P
|
|
590
590
|
} : rt);
|
|
591
591
|
i([...ut]);
|
|
592
592
|
},
|
|
@@ -597,36 +597,36 @@ const He = (r) => {
|
|
|
597
597
|
h === "image" && /* @__PURE__ */ t.jsx(
|
|
598
598
|
gt,
|
|
599
599
|
{
|
|
600
|
-
onChange: (
|
|
600
|
+
onChange: (P) => {
|
|
601
601
|
const ut = [...s].map((rt) => rt.id === u.id ? {
|
|
602
602
|
...u,
|
|
603
|
-
images:
|
|
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
610
|
/* @__PURE__ */ t.jsxs("div", { className: H.buttons, children: [
|
|
611
611
|
n && /* @__PURE__ */ t.jsx("div", { className: H.deleteButton, children: /* @__PURE__ */ t.jsx(
|
|
612
|
-
|
|
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
|
] })
|
|
@@ -635,15 +635,15 @@ const He = (r) => {
|
|
|
635
635
|
Me,
|
|
636
636
|
{
|
|
637
637
|
product: u,
|
|
638
|
-
index:
|
|
639
|
-
children:
|
|
638
|
+
index: k,
|
|
639
|
+
children: T
|
|
640
640
|
},
|
|
641
641
|
u.id
|
|
642
642
|
) : /* @__PURE__ */ t.jsx(
|
|
643
643
|
"div",
|
|
644
644
|
{
|
|
645
645
|
className: H.product,
|
|
646
|
-
children:
|
|
646
|
+
children: T
|
|
647
647
|
},
|
|
648
648
|
u.id
|
|
649
649
|
);
|
|
@@ -652,29 +652,29 @@ const He = (r) => {
|
|
|
652
652
|
(l || c !== void 0) && /* @__PURE__ */ t.jsxs("div", { className: H.top, children: [
|
|
653
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
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
|
-
|
|
673
|
+
w && q && /* @__PURE__ */ t.jsx(At, { ...q }),
|
|
674
674
|
/* @__PURE__ */ t.jsxs("div", { className: H.products, children: [
|
|
675
675
|
m && /* @__PURE__ */ t.jsx("h5", { className: H.subtitle, children: m }),
|
|
676
676
|
o ? /* @__PURE__ */ t.jsx(
|
|
677
|
-
|
|
677
|
+
It,
|
|
678
678
|
{
|
|
679
679
|
sensors: M,
|
|
680
680
|
onDragEnd: j,
|
|
@@ -683,11 +683,11 @@ const He = (r) => {
|
|
|
683
683
|
{
|
|
684
684
|
items: s.map((u) => u.id),
|
|
685
685
|
strategy: Ct,
|
|
686
|
-
children: s.map((u,
|
|
686
|
+
children: s.map((u, k) => O(u, k))
|
|
687
687
|
}
|
|
688
688
|
)
|
|
689
689
|
}
|
|
690
|
-
) : s.map((u,
|
|
690
|
+
) : s.map((u, k) => O(u, k)),
|
|
691
691
|
_ && /* @__PURE__ */ t.jsx(
|
|
692
692
|
"div",
|
|
693
693
|
{
|
|
@@ -700,24 +700,24 @@ const He = (r) => {
|
|
|
700
700
|
at,
|
|
701
701
|
{
|
|
702
702
|
withoutHover: !0,
|
|
703
|
-
className:
|
|
703
|
+
className: z(H.button, {
|
|
704
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
709
|
const u = [...s];
|
|
710
|
-
let
|
|
710
|
+
let k = null;
|
|
711
711
|
if (d) {
|
|
712
|
-
for (let
|
|
713
|
-
if (!s.find((R) => R.id === d[
|
|
714
|
-
|
|
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
|
-
name:
|
|
720
|
-
id: (
|
|
719
|
+
name: k ? k.name : d[0].name,
|
|
720
|
+
id: (k == null ? void 0 : k.id) || d[0].id,
|
|
721
721
|
...L
|
|
722
722
|
}) : h === "input" ? u.push({
|
|
723
723
|
name: "",
|
|
@@ -735,7 +735,7 @@ const He = (r) => {
|
|
|
735
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(
|
|
752
|
-
|
|
753
|
-
|
|
751
|
+
a !== void 0 && /* @__PURE__ */ t.jsx(bt, { items: a }),
|
|
752
|
+
S !== void 0 && /* @__PURE__ */ t.jsx(
|
|
753
|
+
W,
|
|
754
754
|
{
|
|
755
755
|
label: "Auto scroll interval",
|
|
756
756
|
type: "number",
|
|
757
|
-
value: String(
|
|
758
|
-
onChange: (u) =>
|
|
757
|
+
value: String(S.scrollInterval),
|
|
758
|
+
onChange: (u) => S.setScrollInterval(Number(u)),
|
|
759
759
|
min: 0.1,
|
|
760
760
|
max: 100,
|
|
761
761
|
style: {
|
|
@@ -800,14 +800,14 @@ const He = (r) => {
|
|
|
800
800
|
subtitle: m,
|
|
801
801
|
draggable: n = !1,
|
|
802
802
|
withImage: o = !1,
|
|
803
|
-
addable:
|
|
804
|
-
itemsOptions:
|
|
803
|
+
addable: x = !0,
|
|
804
|
+
itemsOptions: $,
|
|
805
805
|
hasRangeSelector: _ = !1,
|
|
806
806
|
rangeSelectorOptions: h,
|
|
807
807
|
limit: p,
|
|
808
808
|
autoScrollInterval: d
|
|
809
809
|
} = r;
|
|
810
|
-
function
|
|
810
|
+
function w(y) {
|
|
811
811
|
if (o)
|
|
812
812
|
return y ? /* @__PURE__ */ t.jsx(
|
|
813
813
|
"img",
|
|
@@ -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,28 +841,28 @@ const He = (r) => {
|
|
|
841
841
|
}
|
|
842
842
|
) }),
|
|
843
843
|
/* @__PURE__ */ t.jsx(
|
|
844
|
-
|
|
844
|
+
st,
|
|
845
845
|
{
|
|
846
|
-
onChange: (
|
|
847
|
-
const
|
|
848
|
-
if (!
|
|
849
|
-
const
|
|
850
|
-
i([...
|
|
846
|
+
onChange: (S) => {
|
|
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:
|
|
854
|
-
leftAddon:
|
|
853
|
+
options: $.filter((S) => !s.find((f) => f === S.id)).map((S) => S.name),
|
|
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,
|
|
862
862
|
width: 20,
|
|
863
863
|
height: 20,
|
|
864
864
|
fill: "#C12A2A",
|
|
865
|
-
onClick: () => i(s.filter((
|
|
865
|
+
onClick: () => i(s.filter((S) => S !== y))
|
|
866
866
|
}
|
|
867
867
|
) }) })
|
|
868
868
|
] });
|
|
@@ -879,7 +879,7 @@ 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)
|
|
@@ -889,8 +889,8 @@ const He = (r) => {
|
|
|
889
889
|
_ && h && /* @__PURE__ */ t.jsx(At, { ...h }),
|
|
890
890
|
/* @__PURE__ */ t.jsxs("div", { className: Q.products, children: [
|
|
891
891
|
m && /* @__PURE__ */ t.jsx("h5", { className: Q.subtitle, children: m }),
|
|
892
|
-
s.map((y) =>
|
|
893
|
-
|
|
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]: !!(p && p <= s.length || s.length ===
|
|
906
|
+
className: z(Q.button, {
|
|
907
|
+
[Q.disabled]: !!(p && p <= s.length || s.length === $.length)
|
|
908
908
|
}),
|
|
909
909
|
size: "s",
|
|
910
|
-
disabled: !!(p && p <= s.length || s.length ===
|
|
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((
|
|
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,
|
|
@@ -990,7 +990,7 @@ const He = (r) => {
|
|
|
990
990
|
"div",
|
|
991
991
|
{
|
|
992
992
|
ref: c,
|
|
993
|
-
className:
|
|
993
|
+
className: F.modal,
|
|
994
994
|
onClick: (n) => {
|
|
995
995
|
n.stopPropagation();
|
|
996
996
|
},
|
|
@@ -999,10 +999,10 @@ const He = (r) => {
|
|
|
999
999
|
left: `${i.left}px`
|
|
1000
1000
|
},
|
|
1001
1001
|
children: [
|
|
1002
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
1003
|
-
/* @__PURE__ */ t.jsx("h3", { className:
|
|
1002
|
+
/* @__PURE__ */ t.jsxs("div", { className: F.top, 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,
|
|
@@ -1014,7 +1014,7 @@ const He = (r) => {
|
|
|
1014
1014
|
}
|
|
1015
1015
|
)
|
|
1016
1016
|
] }),
|
|
1017
|
-
/* @__PURE__ */ t.jsx("div", { className:
|
|
1017
|
+
/* @__PURE__ */ t.jsx("div", { className: F.modalOptions, children: a.map((n) => {
|
|
1018
1018
|
if (n.type === "image")
|
|
1019
1019
|
return /* @__PURE__ */ t.jsx(
|
|
1020
1020
|
gt,
|
|
@@ -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,
|
|
@@ -1071,16 +1071,16 @@ const He = (r) => {
|
|
|
1071
1071
|
}
|
|
1072
1072
|
);
|
|
1073
1073
|
if (n.type === "inputSwitch")
|
|
1074
|
-
return /* @__PURE__ */ t.jsxs("div", { className:
|
|
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
|
}) })
|
|
@@ -1137,7 +1137,7 @@ function qs(r) {
|
|
|
1137
1137
|
{
|
|
1138
1138
|
ref: a,
|
|
1139
1139
|
style: o,
|
|
1140
|
-
className: `${
|
|
1140
|
+
className: `${F.product} ${n ? F.dragging : ""}`,
|
|
1141
1141
|
...s,
|
|
1142
1142
|
...i,
|
|
1143
1143
|
children: e
|
|
@@ -1155,21 +1155,21 @@ const aa = (r) => {
|
|
|
1155
1155
|
subtitle: m,
|
|
1156
1156
|
editable: n = !0,
|
|
1157
1157
|
draggable: o = !1,
|
|
1158
|
-
withImage:
|
|
1159
|
-
deletable:
|
|
1158
|
+
withImage: x = !1,
|
|
1159
|
+
deletable: $ = !0,
|
|
1160
1160
|
addable: _ = !0,
|
|
1161
1161
|
itemsType: h,
|
|
1162
1162
|
itemsPlaceholder: p = "",
|
|
1163
1163
|
itemsOptions: d,
|
|
1164
|
-
hasRangeSelector:
|
|
1165
|
-
rangeSelectorOptions:
|
|
1164
|
+
hasRangeSelector: w = !1,
|
|
1165
|
+
rangeSelectorOptions: q,
|
|
1166
1166
|
modalOptions: y,
|
|
1167
1167
|
addableOptions: L = {}
|
|
1168
|
-
} = r, [B,
|
|
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
|
-
|
|
1180
|
+
S(null), E(!1);
|
|
1181
1181
|
};
|
|
1182
|
-
return document.body.addEventListener("click", j),
|
|
1183
|
-
|
|
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 u =
|
|
1194
|
-
u + j >
|
|
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
1195
|
top: u,
|
|
1196
|
-
left:
|
|
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
1202
|
const u = j.target.getBoundingClientRect();
|
|
1203
|
-
|
|
1203
|
+
tt({
|
|
1204
1204
|
top: u.top + window.scrollY,
|
|
1205
1205
|
left: u.left - 30
|
|
1206
|
-
}),
|
|
1206
|
+
}), S(O), E(!0);
|
|
1207
1207
|
};
|
|
1208
1208
|
function M(j) {
|
|
1209
|
-
if (
|
|
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 (u &&
|
|
1231
|
-
const
|
|
1232
|
-
if (
|
|
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
1238
|
var u;
|
|
1239
|
-
const
|
|
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,
|
|
@@ -1247,31 +1247,31 @@ const aa = (r) => {
|
|
|
1247
1247
|
}
|
|
1248
1248
|
) }),
|
|
1249
1249
|
h === "select" && d && /* @__PURE__ */ t.jsx(
|
|
1250
|
-
|
|
1250
|
+
st,
|
|
1251
1251
|
{
|
|
1252
|
-
onChange: (
|
|
1253
|
-
const R = [...s].map((
|
|
1252
|
+
onChange: (k) => {
|
|
1253
|
+
const R = [...s].map((V) => V.id === j.id ? {
|
|
1254
1254
|
...j,
|
|
1255
|
-
name:
|
|
1256
|
-
} :
|
|
1257
|
-
|
|
1255
|
+
name: k
|
|
1256
|
+
} : V);
|
|
1257
|
+
S({
|
|
1258
1258
|
...j,
|
|
1259
|
-
name:
|
|
1259
|
+
name: k
|
|
1260
1260
|
}), i([...R]);
|
|
1261
1261
|
},
|
|
1262
1262
|
value: j.name,
|
|
1263
|
-
options: d.filter((
|
|
1263
|
+
options: d.filter((k) => !s.find((T) => T.name === k)),
|
|
1264
1264
|
leftAddon: M(j.images)
|
|
1265
1265
|
}
|
|
1266
1266
|
),
|
|
1267
1267
|
h === "input" && /* @__PURE__ */ t.jsx(
|
|
1268
|
-
|
|
1268
|
+
W,
|
|
1269
1269
|
{
|
|
1270
|
-
onChange: (
|
|
1271
|
-
const R = [...s].map((
|
|
1270
|
+
onChange: (k) => {
|
|
1271
|
+
const R = [...s].map((V) => V.id === j.id ? {
|
|
1272
1272
|
...j,
|
|
1273
|
-
name:
|
|
1274
|
-
} :
|
|
1273
|
+
name: k
|
|
1274
|
+
} : V);
|
|
1275
1275
|
i([...R]);
|
|
1276
1276
|
},
|
|
1277
1277
|
value: j.name,
|
|
@@ -1281,36 +1281,36 @@ const aa = (r) => {
|
|
|
1281
1281
|
h === "image" && /* @__PURE__ */ t.jsx(
|
|
1282
1282
|
gt,
|
|
1283
1283
|
{
|
|
1284
|
-
onChange: (
|
|
1285
|
-
const R = [...s].map((
|
|
1284
|
+
onChange: (k) => {
|
|
1285
|
+
const R = [...s].map((V) => V.id === j.id ? {
|
|
1286
1286
|
...j,
|
|
1287
|
-
images:
|
|
1288
|
-
} :
|
|
1287
|
+
images: k
|
|
1288
|
+
} : V);
|
|
1289
1289
|
i([...R]);
|
|
1290
1290
|
},
|
|
1291
|
-
activeImage: (u = s.find((
|
|
1291
|
+
activeImage: (u = s.find((k) => k.id === j.id)) == null ? void 0 : u.images[0]
|
|
1292
1292
|
}
|
|
1293
1293
|
),
|
|
1294
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
1295
|
-
n && /* @__PURE__ */ t.jsx("div", { className:
|
|
1296
|
-
|
|
1294
|
+
/* @__PURE__ */ t.jsxs("div", { className: F.buttons, children: [
|
|
1295
|
+
n && /* @__PURE__ */ t.jsx("div", { className: F.deleteButton, children: /* @__PURE__ */ t.jsx(
|
|
1296
|
+
b,
|
|
1297
1297
|
{
|
|
1298
1298
|
name: "Sliders",
|
|
1299
1299
|
hoverable: !0,
|
|
1300
1300
|
width: 20,
|
|
1301
1301
|
height: 20,
|
|
1302
|
-
onClick: (
|
|
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,
|
|
1310
1310
|
width: 20,
|
|
1311
1311
|
height: 20,
|
|
1312
1312
|
fill: "#C12A2A",
|
|
1313
|
-
onClick: () => i(s.filter((
|
|
1313
|
+
onClick: () => i(s.filter((k) => k.id !== j.id))
|
|
1314
1314
|
}
|
|
1315
1315
|
) })
|
|
1316
1316
|
] })
|
|
@@ -1319,48 +1319,48 @@ 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
|
-
className:
|
|
1329
|
-
children:
|
|
1328
|
+
className: F.product,
|
|
1329
|
+
children: O
|
|
1330
1330
|
},
|
|
1331
1331
|
j.id
|
|
1332
1332
|
);
|
|
1333
1333
|
};
|
|
1334
|
-
return /* @__PURE__ */ t.jsxs("div", { className:
|
|
1335
|
-
(l || c !== void 0) && /* @__PURE__ */ t.jsxs("div", { className:
|
|
1336
|
-
l && /* @__PURE__ */ t.jsx("h3", { className:
|
|
1334
|
+
return /* @__PURE__ */ t.jsxs("div", { className: F.productsBlock, children: [
|
|
1335
|
+
(l || c !== void 0) && /* @__PURE__ */ t.jsxs("div", { className: F.top, children: [
|
|
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
|
-
setActiveItem:
|
|
1351
|
-
popupPosition:
|
|
1350
|
+
setActiveItem: S,
|
|
1351
|
+
popupPosition: f,
|
|
1352
1352
|
modalOptions: y,
|
|
1353
|
-
setIsOpenModal:
|
|
1353
|
+
setIsOpenModal: E
|
|
1354
1354
|
}
|
|
1355
1355
|
),
|
|
1356
|
-
|
|
1357
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
1358
|
-
m && /* @__PURE__ */ t.jsx("h5", { className:
|
|
1356
|
+
w && q && /* @__PURE__ */ t.jsx(At, { ...q }),
|
|
1357
|
+
/* @__PURE__ */ t.jsxs("div", { className: F.products, children: [
|
|
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
|
{
|
|
@@ -1383,20 +1383,20 @@ const aa = (r) => {
|
|
|
1383
1383
|
at,
|
|
1384
1384
|
{
|
|
1385
1385
|
withoutHover: !0,
|
|
1386
|
-
className:
|
|
1386
|
+
className: F.button,
|
|
1387
1387
|
size: "s",
|
|
1388
1388
|
onClick: () => {
|
|
1389
1389
|
const j = [...s];
|
|
1390
|
-
let
|
|
1390
|
+
let O = null;
|
|
1391
1391
|
if (d) {
|
|
1392
1392
|
for (let u = 0; u < d.length; u++)
|
|
1393
|
-
if (!s.find((
|
|
1394
|
-
|
|
1393
|
+
if (!s.find((k) => k.name === d[u])) {
|
|
1394
|
+
O = d[u];
|
|
1395
1395
|
break;
|
|
1396
1396
|
}
|
|
1397
1397
|
}
|
|
1398
1398
|
h === "select" && d ? j.push({
|
|
1399
|
-
name:
|
|
1399
|
+
name: O || d[0],
|
|
1400
1400
|
id: mt(),
|
|
1401
1401
|
...L,
|
|
1402
1402
|
maxSymbols: 100
|
|
@@ -1416,10 +1416,10 @@ const aa = (r) => {
|
|
|
1416
1416
|
style: {
|
|
1417
1417
|
width: "fit-content"
|
|
1418
1418
|
},
|
|
1419
|
-
children: /* @__PURE__ */ t.jsxs("div", { className:
|
|
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), [m, n] = g.useState(e.destination), [o,
|
|
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
1465
|
text: h,
|
|
1466
|
-
link:
|
|
1466
|
+
link: $,
|
|
1467
1467
|
destination: m,
|
|
1468
1468
|
typesText: a,
|
|
1469
1469
|
page: o,
|
|
1470
1470
|
openInNewTab: d
|
|
1471
1471
|
}
|
|
1472
1472
|
});
|
|
1473
|
-
}, [a, m,
|
|
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,7 +1498,7 @@ 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),
|
|
@@ -1507,28 +1507,28 @@ const aa = (r) => {
|
|
|
1507
1507
|
}
|
|
1508
1508
|
),
|
|
1509
1509
|
m === "Go to Page" ? /* @__PURE__ */ t.jsx(
|
|
1510
|
-
|
|
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
1520
|
onChange: (y) => _(y),
|
|
1521
|
-
value:
|
|
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",
|
|
1531
|
-
onChange: (y) =>
|
|
1531
|
+
onChange: (y) => w(y)
|
|
1532
1532
|
}
|
|
1533
1533
|
),
|
|
1534
1534
|
/* @__PURE__ */ t.jsx(
|
|
@@ -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,19 +1566,19 @@ 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
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
1583
|
const h = () => {
|
|
1584
1584
|
l(null);
|
|
@@ -1592,47 +1592,47 @@ const aa = (r) => {
|
|
|
1592
1592
|
e(h);
|
|
1593
1593
|
}
|
|
1594
1594
|
}, [a]), g.useEffect(() => {
|
|
1595
|
-
if (
|
|
1596
|
-
const h =
|
|
1595
|
+
if ($.current && o) {
|
|
1596
|
+
const h = $.current.getBoundingClientRect().height, p = window.innerHeight;
|
|
1597
1597
|
let d = o.top;
|
|
1598
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
|
-
}, [
|
|
1603
|
+
}, [$.current, o]);
|
|
1604
1604
|
const _ = (h, p) => {
|
|
1605
1605
|
h.stopPropagation();
|
|
1606
1606
|
const d = h.target.getBoundingClientRect();
|
|
1607
|
-
|
|
1607
|
+
x({
|
|
1608
1608
|
top: d.top + window.scrollY,
|
|
1609
1609
|
left: d.left - 30
|
|
1610
1610
|
}), l(p);
|
|
1611
1611
|
};
|
|
1612
|
-
return /* @__PURE__ */ t.jsxs("div", { className:
|
|
1613
|
-
/* @__PURE__ */ t.jsx("h5", { className:
|
|
1612
|
+
return /* @__PURE__ */ t.jsxs("div", { className: nt.products, children: [
|
|
1613
|
+
/* @__PURE__ */ t.jsx("h5", { className: nt.subtitle, children: "Button Type" }),
|
|
1614
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
1622
|
onChange: (p) => {
|
|
1623
|
-
const
|
|
1623
|
+
const w = [...c].map((q) => q.id === h.id ? {
|
|
1624
1624
|
...h,
|
|
1625
1625
|
type: p
|
|
1626
|
-
} :
|
|
1627
|
-
e(
|
|
1626
|
+
} : q);
|
|
1627
|
+
e(w);
|
|
1628
1628
|
},
|
|
1629
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,
|
|
@@ -1643,8 +1643,8 @@ const aa = (r) => {
|
|
|
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,
|
|
@@ -1665,7 +1665,7 @@ const aa = (r) => {
|
|
|
1665
1665
|
a && /* @__PURE__ */ t.jsx(
|
|
1666
1666
|
nn,
|
|
1667
1667
|
{
|
|
1668
|
-
ref:
|
|
1668
|
+
ref: $,
|
|
1669
1669
|
activeButton: a,
|
|
1670
1670
|
setActiveButton: l,
|
|
1671
1671
|
popupPosition: m
|
|
@@ -1683,7 +1683,7 @@ 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
1689
|
const h = [...c];
|
|
@@ -1700,10 +1700,10 @@ const aa = (r) => {
|
|
|
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,7 +1753,7 @@ 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, [m, n] = g.useState(!1), o = Array.from({ length: (s - e) / i + 1 }),
|
|
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);
|
|
@@ -1761,28 +1761,28 @@ const aa = (r) => {
|
|
|
1761
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:
|
|
1777
|
-
const
|
|
1776
|
+
/* @__PURE__ */ t.jsx("div", { className: U.dots, children: o.map((p, d) => {
|
|
1777
|
+
const w = d <= (a - e) / i;
|
|
1778
1778
|
return /* @__PURE__ */ t.jsx(
|
|
1779
1779
|
"button",
|
|
1780
1780
|
{
|
|
1781
1781
|
onClick: () => h(d),
|
|
1782
|
-
className:
|
|
1783
|
-
[
|
|
1784
|
-
[
|
|
1785
|
-
[
|
|
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
|
},
|
|
@@ -1802,13 +1802,13 @@ const aa = (r) => {
|
|
|
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,
|
|
@@ -1821,16 +1821,16 @@ const aa = (r) => {
|
|
|
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,
|
|
@@ -1844,10 +1844,10 @@ const aa = (r) => {
|
|
|
1844
1844
|
{
|
|
1845
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,
|
|
@@ -1892,7 +1892,7 @@ const aa = (r) => {
|
|
|
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:
|
|
1904
|
+
/* @__PURE__ */ t.jsxs("div", { className: Y.top, children: [
|
|
1905
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",
|
|
@@ -1946,7 +1946,7 @@ function ui(r) {
|
|
|
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
|
|
@@ -1964,57 +1964,57 @@ const la = (r) => {
|
|
|
1964
1964
|
subtitle: m,
|
|
1965
1965
|
editable: n = !0,
|
|
1966
1966
|
draggable: o = !1,
|
|
1967
|
-
withImage:
|
|
1968
|
-
deletable:
|
|
1967
|
+
withImage: x = !1,
|
|
1968
|
+
deletable: $ = !0,
|
|
1969
1969
|
addable: _ = !0,
|
|
1970
1970
|
itemsType: h,
|
|
1971
1971
|
itemsOptions: p
|
|
1972
|
-
} = r, [d,
|
|
1972
|
+
} = r, [d, w] = g.useState(
|
|
1973
1973
|
null
|
|
1974
|
-
), [
|
|
1974
|
+
), [q, y] = g.useState({
|
|
1975
1975
|
top: 0,
|
|
1976
1976
|
left: 0
|
|
1977
|
-
}), [L, B] = g.useState(!1),
|
|
1978
|
-
|
|
1977
|
+
}), [L, B] = g.useState(!1), S = $t(
|
|
1978
|
+
Nt(Bt, {
|
|
1979
1979
|
activationConstraint: {
|
|
1980
1980
|
distance: 5
|
|
1981
1981
|
}
|
|
1982
1982
|
})
|
|
1983
1983
|
);
|
|
1984
1984
|
g.useEffect(() => {
|
|
1985
|
-
const
|
|
1986
|
-
|
|
1985
|
+
const v = () => {
|
|
1986
|
+
w(null), B(!1);
|
|
1987
1987
|
};
|
|
1988
|
-
return document.body.addEventListener("click",
|
|
1989
|
-
|
|
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 M =
|
|
2001
|
-
M +
|
|
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
2002
|
top: M - 80,
|
|
2003
|
-
left:
|
|
2004
|
-
}),
|
|
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 M = [...s], [
|
|
2032
|
-
M.splice(
|
|
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,
|
|
@@ -2046,47 +2046,47 @@ const la = (r) => {
|
|
|
2046
2046
|
}
|
|
2047
2047
|
) }),
|
|
2048
2048
|
h === "select" && /* @__PURE__ */ t.jsx(
|
|
2049
|
-
|
|
2049
|
+
st,
|
|
2050
2050
|
{
|
|
2051
|
-
onChange: (
|
|
2052
|
-
const M = [...s],
|
|
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 = M.map((
|
|
2058
|
-
|
|
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
|
+
w(ct), i([...j]);
|
|
2059
2059
|
},
|
|
2060
|
-
value:
|
|
2060
|
+
value: E.productData.name,
|
|
2061
2061
|
options: [
|
|
2062
|
-
...p.filter((
|
|
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
|
] }),
|
|
@@ -2122,29 +2122,29 @@ const la = (r) => {
|
|
|
2122
2122
|
di,
|
|
2123
2123
|
{
|
|
2124
2124
|
activeItem: d,
|
|
2125
|
-
setActiveItem:
|
|
2125
|
+
setActiveItem: w,
|
|
2126
2126
|
setIsOpenModal: B,
|
|
2127
|
-
popupPosition:
|
|
2127
|
+
popupPosition: q,
|
|
2128
2128
|
itemsOptions: p
|
|
2129
2129
|
}
|
|
2130
2130
|
),
|
|
2131
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
2132
|
-
m && /* @__PURE__ */ t.jsx("h5", { className:
|
|
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
|
-
sensors:
|
|
2137
|
-
onDragEnd:
|
|
2136
|
+
sensors: S,
|
|
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((
|
|
2147
|
+
) : s.map((v, N) => tt(v, N)),
|
|
2148
2148
|
_ && /* @__PURE__ */ t.jsx(
|
|
2149
2149
|
"div",
|
|
2150
2150
|
{
|
|
@@ -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: p[
|
|
2168
|
-
image: p[
|
|
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
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,107 +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 B,
|
|
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
2226
|
d(!0);
|
|
2227
|
-
const
|
|
2228
|
-
return () => clearTimeout(
|
|
2227
|
+
const f = setTimeout(() => d(!1), 600);
|
|
2228
|
+
return () => clearTimeout(f);
|
|
2229
2229
|
}, [m]);
|
|
2230
|
-
async function
|
|
2230
|
+
async function w() {
|
|
2231
2231
|
await h(), await _({
|
|
2232
2232
|
productId: r.id,
|
|
2233
2233
|
productVariantId: e.id,
|
|
2234
2234
|
quantity: m
|
|
2235
2235
|
});
|
|
2236
2236
|
}
|
|
2237
|
-
function
|
|
2238
|
-
|
|
2237
|
+
function q() {
|
|
2238
|
+
$(), w(), l("/checkout");
|
|
2239
2239
|
}
|
|
2240
|
-
function y(
|
|
2241
|
-
if (
|
|
2242
|
-
const
|
|
2243
|
-
return `${
|
|
2244
|
-
} else if (
|
|
2245
|
-
const
|
|
2246
|
-
return `${
|
|
2247
|
-
} else if (
|
|
2248
|
-
const
|
|
2249
|
-
return `${
|
|
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"}`;
|
|
2250
2250
|
} else {
|
|
2251
|
-
const
|
|
2252
|
-
return `${
|
|
2251
|
+
const N = Math.floor(f / 1e3);
|
|
2252
|
+
return `${N} ${N === 1 ? "second" : "seconds"}`;
|
|
2253
2253
|
}
|
|
2254
2254
|
}
|
|
2255
|
-
function L(
|
|
2256
|
-
return
|
|
2255
|
+
function L(f, D) {
|
|
2256
|
+
return f.length > D ? f.slice(0, D) + "..." : f;
|
|
2257
2257
|
}
|
|
2258
|
-
return /* @__PURE__ */ t.jsxs("div", { className:
|
|
2259
|
-
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(
|
|
2260
2260
|
"div",
|
|
2261
2261
|
{
|
|
2262
|
-
className:
|
|
2263
|
-
[
|
|
2262
|
+
className: z(I.charge, {
|
|
2263
|
+
[I.chargeActive]: i === f
|
|
2264
2264
|
}),
|
|
2265
|
-
onClick: () => a(
|
|
2266
|
-
children: Mt[
|
|
2265
|
+
onClick: () => a(f),
|
|
2266
|
+
children: Mt[f]
|
|
2267
2267
|
},
|
|
2268
|
-
|
|
2268
|
+
f
|
|
2269
2269
|
)) }),
|
|
2270
|
-
/* @__PURE__ */ t.jsx("div", { className:
|
|
2271
|
-
var
|
|
2270
|
+
/* @__PURE__ */ t.jsx("div", { className: I.variants, children: c.map((f) => {
|
|
2271
|
+
var D;
|
|
2272
2272
|
return /* @__PURE__ */ t.jsxs(
|
|
2273
2273
|
"div",
|
|
2274
2274
|
{
|
|
2275
|
-
className:
|
|
2276
|
-
[
|
|
2275
|
+
className: z(I.variant, {
|
|
2276
|
+
[I.activeVariant]: e.id === f.id
|
|
2277
2277
|
}),
|
|
2278
|
-
onClick: () => s(
|
|
2278
|
+
onClick: () => s(f),
|
|
2279
2279
|
children: [
|
|
2280
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
2281
|
-
/* @__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) }),
|
|
2282
2282
|
/* @__PURE__ */ t.jsxs("span", { children: [
|
|
2283
2283
|
"$",
|
|
2284
|
-
i === "ONE_TIME" ?
|
|
2284
|
+
i === "ONE_TIME" ? f.price.amount : f.subscriptionSettings ? f.subscriptionSettings.price.amount : "Price Not Found"
|
|
2285
2285
|
] })
|
|
2286
2286
|
] }),
|
|
2287
|
-
/* @__PURE__ */ t.jsx("div", { children: i === "ONE_TIME" && /* @__PURE__ */ t.jsxs("span", { className:
|
|
2288
|
-
((
|
|
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,
|
|
2289
2289
|
" in stock"
|
|
2290
2290
|
] }) })
|
|
2291
2291
|
]
|
|
2292
2292
|
},
|
|
2293
|
-
|
|
2293
|
+
f.id
|
|
2294
2294
|
);
|
|
2295
2295
|
}) }),
|
|
2296
|
-
i === "ONE_TIME" && /* @__PURE__ */ t.jsxs("div", { className:
|
|
2296
|
+
i === "ONE_TIME" && /* @__PURE__ */ t.jsxs("div", { className: I.quantity, children: [
|
|
2297
2297
|
/* @__PURE__ */ t.jsx(
|
|
2298
2298
|
"button",
|
|
2299
2299
|
{
|
|
2300
2300
|
onClick: () => {
|
|
2301
|
-
m > 1 ? n((
|
|
2301
|
+
m > 1 ? n((f) => f - 1) : n(1);
|
|
2302
2302
|
},
|
|
2303
|
-
className:
|
|
2303
|
+
className: I.button,
|
|
2304
2304
|
disabled: e.quantity.restrictions && m <= e.quantity.restrictions.min,
|
|
2305
|
-
children: /* @__PURE__ */ t.jsx(
|
|
2305
|
+
children: /* @__PURE__ */ t.jsx(b, { name: "Minus" })
|
|
2306
2306
|
}
|
|
2307
2307
|
),
|
|
2308
2308
|
/* @__PURE__ */ t.jsx(
|
|
2309
2309
|
"label",
|
|
2310
2310
|
{
|
|
2311
|
-
className:
|
|
2312
|
-
[
|
|
2311
|
+
className: z(I.count, {
|
|
2312
|
+
[I.focused]: o
|
|
2313
2313
|
}),
|
|
2314
|
-
onFocus: () =>
|
|
2315
|
-
onBlur: () =>
|
|
2314
|
+
onFocus: () => x(!0),
|
|
2315
|
+
onBlur: () => x(!1),
|
|
2316
2316
|
children: /* @__PURE__ */ t.jsx(
|
|
2317
|
-
|
|
2317
|
+
W,
|
|
2318
2318
|
{
|
|
2319
2319
|
type: "number",
|
|
2320
2320
|
value: String(m),
|
|
2321
|
-
onChange: (
|
|
2321
|
+
onChange: (f) => n(Number(f)),
|
|
2322
2322
|
max: ((B = e.quantity.restrictions) == null ? void 0 : B.max) || e.quantity.available || 1 / 0,
|
|
2323
|
-
min: ((
|
|
2323
|
+
min: ((S = e.quantity.restrictions) == null ? void 0 : S.min) || 0,
|
|
2324
2324
|
style: {
|
|
2325
2325
|
backgroundColor: "transparent",
|
|
2326
2326
|
border: "none",
|
|
@@ -2334,20 +2334,20 @@ const ra = (r) => {
|
|
|
2334
2334
|
"button",
|
|
2335
2335
|
{
|
|
2336
2336
|
onClick: () => {
|
|
2337
|
-
n((
|
|
2337
|
+
n((f) => f + 1);
|
|
2338
2338
|
},
|
|
2339
|
-
className:
|
|
2339
|
+
className: I.button,
|
|
2340
2340
|
disabled: !!(e.quantity.restrictions && m >= e.quantity.restrictions.max || e.quantity.available && m >= e.quantity.available),
|
|
2341
|
-
children: /* @__PURE__ */ t.jsx(
|
|
2341
|
+
children: /* @__PURE__ */ t.jsx(b, { name: "Plus" })
|
|
2342
2342
|
}
|
|
2343
2343
|
)
|
|
2344
2344
|
] }),
|
|
2345
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
2346
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
2345
|
+
/* @__PURE__ */ t.jsxs("div", { className: I.meta, children: [
|
|
2346
|
+
/* @__PURE__ */ t.jsxs("div", { className: I.info, children: [
|
|
2347
2347
|
/* @__PURE__ */ t.jsx("span", { children: "Delivery" }),
|
|
2348
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
2348
|
+
/* @__PURE__ */ t.jsxs("div", { className: I.infoRight, children: [
|
|
2349
2349
|
/* @__PURE__ */ t.jsx(
|
|
2350
|
-
|
|
2350
|
+
b,
|
|
2351
2351
|
{
|
|
2352
2352
|
name: "Lightning",
|
|
2353
2353
|
fill: "#FF3F19",
|
|
@@ -2358,41 +2358,41 @@ const ra = (r) => {
|
|
|
2358
2358
|
/* @__PURE__ */ t.jsx("span", { children: !e.deliveryTime || e.deliveryTime === 0 ? "Instant" : y(e.deliveryTime) })
|
|
2359
2359
|
] })
|
|
2360
2360
|
] }),
|
|
2361
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
2361
|
+
/* @__PURE__ */ t.jsxs("div", { className: I.info, children: [
|
|
2362
2362
|
/* @__PURE__ */ t.jsx("span", { children: "Price" }),
|
|
2363
|
-
/* @__PURE__ */ t.jsx("div", { className:
|
|
2364
|
-
/* @__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: [
|
|
2365
2365
|
"$ ",
|
|
2366
2366
|
(e.price.amount || 0) * m
|
|
2367
2367
|
] }),
|
|
2368
|
-
/* @__PURE__ */ t.jsxs("span", { className:
|
|
2368
|
+
/* @__PURE__ */ t.jsxs("span", { className: I.oldPrice, children: [
|
|
2369
2369
|
"$ ",
|
|
2370
2370
|
(e.compareAtPrice.amount || 0) * m
|
|
2371
2371
|
] })
|
|
2372
|
-
] }) : /* @__PURE__ */ t.jsxs("span", { className:
|
|
2372
|
+
] }) : /* @__PURE__ */ t.jsxs("span", { className: z(I.newPrice, { [I.animate]: p }), children: [
|
|
2373
2373
|
"$ ",
|
|
2374
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:
|
|
2376
|
-
/* @__PURE__ */ t.jsxs("span", { className:
|
|
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: [
|
|
2377
2377
|
"$ ",
|
|
2378
2378
|
e.subscriptionSettings.price.amount || 0
|
|
2379
2379
|
] }),
|
|
2380
|
-
/* @__PURE__ */ t.jsxs("span", { className:
|
|
2380
|
+
/* @__PURE__ */ t.jsxs("span", { className: I.oldPrice, children: [
|
|
2381
2381
|
"$ ",
|
|
2382
2382
|
e.subscriptionSettings.compareAtPrice.amount || 0
|
|
2383
2383
|
] })
|
|
2384
|
-
] }) : e.subscriptionSettings && /* @__PURE__ */ t.jsxs("span", { className:
|
|
2384
|
+
] }) : e.subscriptionSettings && /* @__PURE__ */ t.jsxs("span", { className: z(I.newPrice, { [I.animate]: p }), children: [
|
|
2385
2385
|
"$ ",
|
|
2386
2386
|
e.subscriptionSettings.price.amount || 0
|
|
2387
2387
|
] }) })
|
|
2388
2388
|
] })
|
|
2389
2389
|
] }),
|
|
2390
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
2390
|
+
/* @__PURE__ */ t.jsxs("div", { className: I.buttons, children: [
|
|
2391
2391
|
/* @__PURE__ */ t.jsx(
|
|
2392
2392
|
at,
|
|
2393
2393
|
{
|
|
2394
2394
|
type: "Primary",
|
|
2395
|
-
onClick: () =>
|
|
2395
|
+
onClick: () => q(),
|
|
2396
2396
|
children: /* @__PURE__ */ t.jsx("span", { children: i === "ONE_TIME" ? "Buy Now" : "Subscribe Now" })
|
|
2397
2397
|
}
|
|
2398
2398
|
),
|
|
@@ -2400,13 +2400,13 @@ const ra = (r) => {
|
|
|
2400
2400
|
at,
|
|
2401
2401
|
{
|
|
2402
2402
|
type: "Secondary",
|
|
2403
|
-
onClick: () =>
|
|
2403
|
+
onClick: () => w(),
|
|
2404
2404
|
children: "Add to Cart"
|
|
2405
2405
|
}
|
|
2406
2406
|
)
|
|
2407
2407
|
] })
|
|
2408
2408
|
] });
|
|
2409
|
-
}, qi = "_button_oyh2y_1", Ei = "_login_oyh2y_14", Di = "_signUp_oyh2y_18", Li = "_buttons_oyh2y_23", Ri = "_modal_oyh2y_32", Mi = "_closing_oyh2y_61", Hi = "_info_oyh2y_85", zi = "_top_oyh2y_92", Fi = "_title_oyh2y_103", Vi = "_clear_oyh2y_110", Ui = "_activeClear_oyh2y_117", Yi = "_count_oyh2y_121", Gi = "_cart_oyh2y_136", Wi = "_empty_oyh2y_144", Xi = "_product_oyh2y_170", Ji = "_products_oyh2y_179", Qi = "_image_oyh2y_187", Ki = "_productInfo_oyh2y_193", Zi = "_content_oyh2y_200", to = "_name_oyh2y_206", eo = "_price_oyh2y_212", so = "_productButtons_oyh2y_218", no = "_productButton_oyh2y_218", io = "_productCount_oyh2y_238", oo = "_bottom_oyh2y_254", ao = "_subtotal_oyh2y_262", co = "_block_oyh2y_270", lo = "_shoppingCount_oyh2y_277", ro = "_total_oyh2y_297", uo = "_link_oyh2y_303", mo = "_userInfo_oyh2y_310",
|
|
2409
|
+
}, qi = "_button_oyh2y_1", Ei = "_login_oyh2y_14", Di = "_signUp_oyh2y_18", Li = "_buttons_oyh2y_23", Ri = "_modal_oyh2y_32", Mi = "_closing_oyh2y_61", Hi = "_info_oyh2y_85", zi = "_top_oyh2y_92", Fi = "_title_oyh2y_103", Vi = "_clear_oyh2y_110", Ui = "_activeClear_oyh2y_117", Yi = "_count_oyh2y_121", Gi = "_cart_oyh2y_136", Wi = "_empty_oyh2y_144", Xi = "_product_oyh2y_170", Ji = "_products_oyh2y_179", Qi = "_image_oyh2y_187", Ki = "_productInfo_oyh2y_193", Zi = "_content_oyh2y_200", to = "_name_oyh2y_206", eo = "_price_oyh2y_212", so = "_productButtons_oyh2y_218", no = "_productButton_oyh2y_218", io = "_productCount_oyh2y_238", oo = "_bottom_oyh2y_254", ao = "_subtotal_oyh2y_262", co = "_block_oyh2y_270", lo = "_shoppingCount_oyh2y_277", ro = "_total_oyh2y_297", uo = "_link_oyh2y_303", mo = "_userInfo_oyh2y_310", C = {
|
|
2410
2410
|
button: qi,
|
|
2411
2411
|
login: Ei,
|
|
2412
2412
|
signUp: Di,
|
|
@@ -2440,36 +2440,36 @@ const ra = (r) => {
|
|
|
2440
2440
|
total: ro,
|
|
2441
2441
|
link: uo,
|
|
2442
2442
|
userInfo: mo
|
|
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",
|
|
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 = {
|
|
2444
2444
|
button: ho,
|
|
2445
2445
|
primary: _o,
|
|
2446
2446
|
primaryHovered: po,
|
|
2447
2447
|
secondary: go,
|
|
2448
2448
|
secondaryHovered: fo,
|
|
2449
2449
|
tertiary: xo,
|
|
2450
|
-
tertiaryHovered:
|
|
2451
|
-
content:
|
|
2450
|
+
tertiaryHovered: jo,
|
|
2451
|
+
content: bo
|
|
2452
2452
|
}, kt = (r) => {
|
|
2453
2453
|
const { children: c, onClick: e, style: s, className: i, disabled: a = !1, type: l = "Primary" } = r, { themeSettings: m } = qt();
|
|
2454
2454
|
return /* @__PURE__ */ t.jsx(
|
|
2455
2455
|
"button",
|
|
2456
2456
|
{
|
|
2457
|
-
className:
|
|
2458
|
-
[
|
|
2459
|
-
[
|
|
2460
|
-
[
|
|
2461
|
-
[
|
|
2462
|
-
[
|
|
2463
|
-
[
|
|
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
|
|
2464
2464
|
}),
|
|
2465
2465
|
onClick: e,
|
|
2466
2466
|
style: {
|
|
2467
2467
|
...s
|
|
2468
2468
|
},
|
|
2469
2469
|
disabled: a,
|
|
2470
|
-
children: l === "Tertiary" ? /* @__PURE__ */ t.jsxs("div", { className:
|
|
2470
|
+
children: l === "Tertiary" ? /* @__PURE__ */ t.jsxs("div", { className: it.content, children: [
|
|
2471
2471
|
/* @__PURE__ */ t.jsx(
|
|
2472
|
-
|
|
2472
|
+
b,
|
|
2473
2473
|
{
|
|
2474
2474
|
name: "ArrowRight",
|
|
2475
2475
|
fill: "#757575",
|
|
@@ -2531,12 +2531,12 @@ function ko(r, c) {
|
|
|
2531
2531
|
}
|
|
2532
2532
|
}
|
|
2533
2533
|
const da = (r) => {
|
|
2534
|
-
const { shopping: c, signUp: e } = r, s =
|
|
2534
|
+
const { shopping: c, signUp: e } = r, s = jt();
|
|
2535
2535
|
function i(l) {
|
|
2536
2536
|
s(l);
|
|
2537
2537
|
}
|
|
2538
2538
|
const a = JSON.parse(localStorage.getItem("token") || "{}");
|
|
2539
|
-
return /* @__PURE__ */ t.jsxs("div", { className:
|
|
2539
|
+
return /* @__PURE__ */ t.jsxs("div", { className: C.buttons, children: [
|
|
2540
2540
|
c && /* @__PURE__ */ t.jsx($o, {}),
|
|
2541
2541
|
!a.data && /* @__PURE__ */ t.jsx(
|
|
2542
2542
|
kt,
|
|
@@ -2578,10 +2578,10 @@ const da = (r) => {
|
|
|
2578
2578
|
}
|
|
2579
2579
|
g.useEffect(() => {
|
|
2580
2580
|
(async () => {
|
|
2581
|
-
const h = i.parts.map((
|
|
2582
|
-
...
|
|
2583
|
-
activeVariantId: l(
|
|
2584
|
-
quantity: m(
|
|
2581
|
+
const h = i.parts.map((w) => String(w.productId)), d = (await a([...h])).map((w) => ({
|
|
2582
|
+
...w,
|
|
2583
|
+
activeVariantId: l(w),
|
|
2584
|
+
quantity: m(w)
|
|
2585
2585
|
}));
|
|
2586
2586
|
s(d);
|
|
2587
2587
|
})();
|
|
@@ -2590,24 +2590,24 @@ const da = (r) => {
|
|
|
2590
2590
|
var h;
|
|
2591
2591
|
return !_ || !(_ != null && _.variants) ? !1 : (h = _.variants.find((p) => p.id === _.activeVariantId)) == null ? void 0 : h.subscriptionSettings;
|
|
2592
2592
|
}
|
|
2593
|
-
const o = i.parts.length > 0 && e.length > 0 && !n(e[0]), [
|
|
2593
|
+
const o = i.parts.length > 0 && e.length > 0 && !n(e[0]), [x, $] = g.useState(!1);
|
|
2594
2594
|
return /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
2595
2595
|
/* @__PURE__ */ t.jsxs(
|
|
2596
2596
|
"div",
|
|
2597
2597
|
{
|
|
2598
|
-
className:
|
|
2598
|
+
className: C.button,
|
|
2599
2599
|
onClick: (_) => {
|
|
2600
|
-
_.stopPropagation(), c(!0),
|
|
2600
|
+
_.stopPropagation(), c(!0), $(!0);
|
|
2601
2601
|
},
|
|
2602
2602
|
children: [
|
|
2603
2603
|
/* @__PURE__ */ t.jsx(
|
|
2604
|
-
|
|
2604
|
+
b,
|
|
2605
2605
|
{
|
|
2606
2606
|
name: "Handbag",
|
|
2607
2607
|
fill: "var(--icon-primary)"
|
|
2608
2608
|
}
|
|
2609
2609
|
),
|
|
2610
|
-
o && /* @__PURE__ */ t.jsx("div", { className:
|
|
2610
|
+
o && /* @__PURE__ */ t.jsx("div", { className: C.shoppingCount, children: i.parts.length })
|
|
2611
2611
|
]
|
|
2612
2612
|
}
|
|
2613
2613
|
),
|
|
@@ -2615,34 +2615,34 @@ const da = (r) => {
|
|
|
2615
2615
|
Et,
|
|
2616
2616
|
{
|
|
2617
2617
|
close: () => {
|
|
2618
|
-
|
|
2618
|
+
$(!1), setTimeout(() => {
|
|
2619
2619
|
c(!1);
|
|
2620
2620
|
}, 300);
|
|
2621
2621
|
},
|
|
2622
2622
|
children: /* @__PURE__ */ t.jsx(
|
|
2623
|
-
|
|
2623
|
+
No,
|
|
2624
2624
|
{
|
|
2625
2625
|
activeProducts: e,
|
|
2626
2626
|
isCartNotEmpty: o,
|
|
2627
|
-
isOpen:
|
|
2627
|
+
isOpen: x
|
|
2628
2628
|
}
|
|
2629
2629
|
)
|
|
2630
2630
|
}
|
|
2631
2631
|
)
|
|
2632
2632
|
] });
|
|
2633
|
-
},
|
|
2634
|
-
const { activeProducts: c, isCartNotEmpty: e, isOpen: s } = r, { cart: i, reset: a, getTotalAndDiscount: l, updateQuantityOfProduct: m } = Pt(), 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
2635
|
function o(_) {
|
|
2636
2636
|
n(_);
|
|
2637
2637
|
}
|
|
2638
|
-
function
|
|
2638
|
+
function x(_) {
|
|
2639
2639
|
m({
|
|
2640
2640
|
productId: _.id,
|
|
2641
2641
|
productVariantId: _.activeVariantId,
|
|
2642
2642
|
quantity: _.quantity + 1
|
|
2643
2643
|
});
|
|
2644
2644
|
}
|
|
2645
|
-
function
|
|
2645
|
+
function $(_) {
|
|
2646
2646
|
m({
|
|
2647
2647
|
productId: _.id,
|
|
2648
2648
|
productVariantId: _.activeVariantId,
|
|
@@ -2652,21 +2652,21 @@ const da = (r) => {
|
|
|
2652
2652
|
return /* @__PURE__ */ t.jsxs(
|
|
2653
2653
|
"div",
|
|
2654
2654
|
{
|
|
2655
|
-
className:
|
|
2656
|
-
[
|
|
2655
|
+
className: z(C.modal, {
|
|
2656
|
+
[C.closing]: !s
|
|
2657
2657
|
}),
|
|
2658
2658
|
onClick: (_) => _.stopPropagation(),
|
|
2659
2659
|
children: [
|
|
2660
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
2661
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
2662
|
-
/* @__PURE__ */ t.jsx("span", { className:
|
|
2663
|
-
e && /* @__PURE__ */ t.jsx("div", { className:
|
|
2660
|
+
/* @__PURE__ */ t.jsxs("div", { className: C.top, children: [
|
|
2661
|
+
/* @__PURE__ */ t.jsxs("div", { className: C.info, children: [
|
|
2662
|
+
/* @__PURE__ */ t.jsx("span", { className: C.title, children: "Cart" }),
|
|
2663
|
+
e && /* @__PURE__ */ t.jsx("div", { className: C.count, children: i.parts.length })
|
|
2664
2664
|
] }),
|
|
2665
2665
|
/* @__PURE__ */ t.jsx(
|
|
2666
2666
|
"button",
|
|
2667
2667
|
{
|
|
2668
|
-
className:
|
|
2669
|
-
[
|
|
2668
|
+
className: z(C.clear, {
|
|
2669
|
+
[C.activeClear]: e
|
|
2670
2670
|
}),
|
|
2671
2671
|
disabled: !e,
|
|
2672
2672
|
onClick: a,
|
|
@@ -2674,13 +2674,13 @@ const da = (r) => {
|
|
|
2674
2674
|
}
|
|
2675
2675
|
)
|
|
2676
2676
|
] }),
|
|
2677
|
-
e ? /* @__PURE__ */ t.jsxs("div", { className:
|
|
2678
|
-
/* @__PURE__ */ t.jsx("div", { className:
|
|
2677
|
+
e ? /* @__PURE__ */ t.jsxs("div", { className: C.cart, children: [
|
|
2678
|
+
/* @__PURE__ */ t.jsx("div", { className: C.products, children: c.map((_) => /* @__PURE__ */ t.jsxs(
|
|
2679
2679
|
"div",
|
|
2680
2680
|
{
|
|
2681
|
-
className:
|
|
2681
|
+
className: C.product,
|
|
2682
2682
|
children: [
|
|
2683
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
2683
|
+
/* @__PURE__ */ t.jsxs("div", { className: C.productInfo, children: [
|
|
2684
2684
|
/* @__PURE__ */ t.jsx(
|
|
2685
2685
|
"img",
|
|
2686
2686
|
{
|
|
@@ -2688,27 +2688,27 @@ const da = (r) => {
|
|
|
2688
2688
|
alt: "image",
|
|
2689
2689
|
width: "100%",
|
|
2690
2690
|
height: "100%",
|
|
2691
|
-
className:
|
|
2691
|
+
className: C.image
|
|
2692
2692
|
}
|
|
2693
2693
|
),
|
|
2694
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
2695
|
-
/* @__PURE__ */ t.jsx("div", { className:
|
|
2696
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
2694
|
+
/* @__PURE__ */ t.jsxs("div", { className: C.content, children: [
|
|
2695
|
+
/* @__PURE__ */ t.jsx("div", { className: C.name, children: _.name }),
|
|
2696
|
+
/* @__PURE__ */ t.jsxs("div", { className: C.price, children: [
|
|
2697
2697
|
"$",
|
|
2698
2698
|
_.variants.find((h) => h.id === _.activeVariantId).price.amount * ((_ == null ? void 0 : _.quantity) || 1)
|
|
2699
2699
|
] })
|
|
2700
2700
|
] })
|
|
2701
2701
|
] }),
|
|
2702
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
2702
|
+
/* @__PURE__ */ t.jsxs("div", { className: C.productButtons, children: [
|
|
2703
2703
|
/* @__PURE__ */ t.jsx(
|
|
2704
2704
|
"div",
|
|
2705
2705
|
{
|
|
2706
2706
|
onClick: () => {
|
|
2707
|
-
_.quantity !== 1 &&
|
|
2707
|
+
_.quantity !== 1 && $(_);
|
|
2708
2708
|
},
|
|
2709
|
-
className:
|
|
2709
|
+
className: C.productButton,
|
|
2710
2710
|
children: /* @__PURE__ */ t.jsx(
|
|
2711
|
-
|
|
2711
|
+
b,
|
|
2712
2712
|
{
|
|
2713
2713
|
name: "Minus",
|
|
2714
2714
|
fill: "#757575",
|
|
@@ -2718,14 +2718,14 @@ const da = (r) => {
|
|
|
2718
2718
|
)
|
|
2719
2719
|
}
|
|
2720
2720
|
),
|
|
2721
|
-
/* @__PURE__ */ t.jsx("div", { className:
|
|
2721
|
+
/* @__PURE__ */ t.jsx("div", { className: C.productCount, children: _.quantity }),
|
|
2722
2722
|
/* @__PURE__ */ t.jsx(
|
|
2723
2723
|
"div",
|
|
2724
2724
|
{
|
|
2725
|
-
onClick: () =>
|
|
2726
|
-
className:
|
|
2725
|
+
onClick: () => x(_),
|
|
2726
|
+
className: C.productButton,
|
|
2727
2727
|
children: /* @__PURE__ */ t.jsx(
|
|
2728
|
-
|
|
2728
|
+
b,
|
|
2729
2729
|
{
|
|
2730
2730
|
name: "Plus",
|
|
2731
2731
|
fill: "#757575",
|
|
@@ -2740,12 +2740,12 @@ const da = (r) => {
|
|
|
2740
2740
|
},
|
|
2741
2741
|
_.id
|
|
2742
2742
|
)) }),
|
|
2743
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
2744
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
2745
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
2743
|
+
/* @__PURE__ */ t.jsxs("div", { className: C.bottom, children: [
|
|
2744
|
+
/* @__PURE__ */ t.jsxs("div", { className: C.subtotal, children: [
|
|
2745
|
+
/* @__PURE__ */ t.jsxs("div", { className: C.block, children: [
|
|
2746
2746
|
/* @__PURE__ */ t.jsx("span", { children: "Subtotal" }),
|
|
2747
2747
|
/* @__PURE__ */ t.jsx(
|
|
2748
|
-
|
|
2748
|
+
b,
|
|
2749
2749
|
{
|
|
2750
2750
|
name: "Info",
|
|
2751
2751
|
width: 20,
|
|
@@ -2754,20 +2754,20 @@ const da = (r) => {
|
|
|
2754
2754
|
}
|
|
2755
2755
|
)
|
|
2756
2756
|
] }),
|
|
2757
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
2757
|
+
/* @__PURE__ */ t.jsxs("div", { className: C.total, children: [
|
|
2758
2758
|
"$",
|
|
2759
2759
|
l().total
|
|
2760
2760
|
] })
|
|
2761
2761
|
] }),
|
|
2762
2762
|
/* @__PURE__ */ t.jsx(kt, { onClick: () => o("/checkout"), children: "Checkout" })
|
|
2763
2763
|
] })
|
|
2764
|
-
] }) : /* @__PURE__ */ t.jsx(
|
|
2764
|
+
] }) : /* @__PURE__ */ t.jsx(Io, {})
|
|
2765
2765
|
]
|
|
2766
2766
|
}
|
|
2767
2767
|
);
|
|
2768
|
-
},
|
|
2768
|
+
}, Io = () => /* @__PURE__ */ t.jsxs("div", { className: C.empty, children: [
|
|
2769
2769
|
/* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
|
|
2770
|
-
|
|
2770
|
+
b,
|
|
2771
2771
|
{
|
|
2772
2772
|
name: "Handbag",
|
|
2773
2773
|
fill: "var(--icon-secondary)"
|
|
@@ -2781,13 +2781,13 @@ const da = (r) => {
|
|
|
2781
2781
|
"a",
|
|
2782
2782
|
{
|
|
2783
2783
|
href: "/products",
|
|
2784
|
-
className:
|
|
2784
|
+
className: C.link,
|
|
2785
2785
|
children: "view products"
|
|
2786
2786
|
}
|
|
2787
2787
|
)
|
|
2788
2788
|
] })
|
|
2789
2789
|
] }), wo = ({ token: r }) => {
|
|
2790
|
-
const [c, e] = g.useState("test-email@gmail.com"), s =
|
|
2790
|
+
const [c, e] = g.useState("test-email@gmail.com"), s = jt();
|
|
2791
2791
|
g.useEffect(() => {
|
|
2792
2792
|
(async () => {
|
|
2793
2793
|
const l = ko(r);
|
|
@@ -2800,7 +2800,7 @@ const da = (r) => {
|
|
|
2800
2800
|
return /* @__PURE__ */ t.jsx(
|
|
2801
2801
|
"div",
|
|
2802
2802
|
{
|
|
2803
|
-
className:
|
|
2803
|
+
className: C.userInfo,
|
|
2804
2804
|
onClick: () => i("/customer-dash"),
|
|
2805
2805
|
children: /* @__PURE__ */ t.jsx("div", { children: c || "test-email@gmail.com" })
|
|
2806
2806
|
}
|
|
@@ -2830,7 +2830,7 @@ const da = (r) => {
|
|
|
2830
2830
|
},
|
|
2831
2831
|
type: "Secondary",
|
|
2832
2832
|
children: /* @__PURE__ */ t.jsx(
|
|
2833
|
-
|
|
2833
|
+
b,
|
|
2834
2834
|
{
|
|
2835
2835
|
name: "Share",
|
|
2836
2836
|
fill: "#757575",
|
|
@@ -2858,7 +2858,7 @@ const da = (r) => {
|
|
|
2858
2858
|
/* @__PURE__ */ t.jsxs("div", { className: ot.header, children: [
|
|
2859
2859
|
/* @__PURE__ */ t.jsx("div", { className: ot.title, children: "Copy Product Link" }),
|
|
2860
2860
|
/* @__PURE__ */ t.jsx(
|
|
2861
|
-
|
|
2861
|
+
b,
|
|
2862
2862
|
{
|
|
2863
2863
|
name: "X",
|
|
2864
2864
|
fill: "#757575",
|
|
@@ -2871,7 +2871,7 @@ const da = (r) => {
|
|
|
2871
2871
|
/* @__PURE__ */ t.jsx(
|
|
2872
2872
|
"div",
|
|
2873
2873
|
{
|
|
2874
|
-
className:
|
|
2874
|
+
className: z(ot.copy, ot.copyText),
|
|
2875
2875
|
onClick: i,
|
|
2876
2876
|
children: s
|
|
2877
2877
|
}
|
|
@@ -2881,7 +2881,7 @@ const da = (r) => {
|
|
|
2881
2881
|
{
|
|
2882
2882
|
onClick: i,
|
|
2883
2883
|
className: ot.copy,
|
|
2884
|
-
children: c ? /* @__PURE__ */ t.jsx(
|
|
2884
|
+
children: c ? /* @__PURE__ */ t.jsx(b, { name: "Check" }) : /* @__PURE__ */ t.jsx(b, { name: "Copy" })
|
|
2885
2885
|
}
|
|
2886
2886
|
)
|
|
2887
2887
|
] })
|
|
@@ -2908,7 +2908,7 @@ const da = (r) => {
|
|
|
2908
2908
|
onClick: m,
|
|
2909
2909
|
children: [
|
|
2910
2910
|
/* @__PURE__ */ t.jsx("h5", { id: "h5", children: r }),
|
|
2911
|
-
/* @__PURE__ */ t.jsx("div", { className:
|
|
2911
|
+
/* @__PURE__ */ t.jsx("div", { className: z(_t.icon, { [_t.open]: e }), children: /* @__PURE__ */ t.jsx(b, { name: "CaretDown" }) })
|
|
2912
2912
|
]
|
|
2913
2913
|
}
|
|
2914
2914
|
),
|
|
@@ -2922,13 +2922,13 @@ const da = (r) => {
|
|
|
2922
2922
|
}
|
|
2923
2923
|
)
|
|
2924
2924
|
] });
|
|
2925
|
-
}, 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 = {
|
|
2926
2926
|
wrapper: Fo,
|
|
2927
2927
|
label: Vo,
|
|
2928
2928
|
input: Uo,
|
|
2929
|
-
|
|
2930
|
-
|
|
2931
|
-
|
|
2929
|
+
paddingless: Yo,
|
|
2930
|
+
content: Go,
|
|
2931
|
+
contentBorder: Wo,
|
|
2932
2932
|
borderless: Xo,
|
|
2933
2933
|
rightIcon: Jo
|
|
2934
2934
|
}, ha = (r) => {
|
|
@@ -2942,39 +2942,24 @@ const da = (r) => {
|
|
|
2942
2942
|
max: m,
|
|
2943
2943
|
placeholder: n,
|
|
2944
2944
|
disabled: o = !1,
|
|
2945
|
-
required:
|
|
2946
|
-
regex:
|
|
2945
|
+
required: x = !1,
|
|
2946
|
+
regex: $,
|
|
2947
2947
|
paddingless: _ = !1,
|
|
2948
2948
|
borderless: h = !1,
|
|
2949
2949
|
editable: p = !1,
|
|
2950
2950
|
isSearch: d = !1
|
|
2951
|
-
} = r, { themeSettings:
|
|
2952
|
-
function B(
|
|
2953
|
-
|
|
2954
|
-
let I, P, U;
|
|
2955
|
-
return k.length === 7 ? (I = parseInt(k.slice(1, 3), 16), P = parseInt(k.slice(3, 5), 16), U = parseInt(k.slice(5, 7), 16)) : k.length === 4 && (I = parseInt(k[1] + k[1], 16), P = parseInt(k[2] + k[2], 16), U = parseInt(k[3] + k[3], 16)), `rgba(${I}, ${P}, ${U}, ${V})`;
|
|
2956
|
-
}
|
|
2957
|
-
const b = {
|
|
2958
|
-
black: "#000000",
|
|
2959
|
-
white: "#ffffff",
|
|
2960
|
-
red: "#ff0000",
|
|
2961
|
-
green: "#00ff00",
|
|
2962
|
-
blue: "#0000ff"
|
|
2963
|
-
// Можно добавить больше цветов
|
|
2964
|
-
}[k.toLowerCase()];
|
|
2965
|
-
return b ? B(b, V) : k;
|
|
2966
|
-
}
|
|
2967
|
-
function T(k) {
|
|
2968
|
-
return Number(k) < 0 ? String(l) : k;
|
|
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;
|
|
2969
2954
|
}
|
|
2970
|
-
function
|
|
2971
|
-
return !
|
|
2955
|
+
function S(f) {
|
|
2956
|
+
return !x || !$ ? !0 : new RegExp($).test(f);
|
|
2972
2957
|
}
|
|
2973
|
-
return /* @__PURE__ */ t.jsxs("div", { className:
|
|
2958
|
+
return /* @__PURE__ */ t.jsxs("div", { className: et.wrapper, children: [
|
|
2974
2959
|
s && /* @__PURE__ */ t.jsx(
|
|
2975
2960
|
"label",
|
|
2976
2961
|
{
|
|
2977
|
-
className:
|
|
2962
|
+
className: et.label,
|
|
2978
2963
|
htmlFor: s,
|
|
2979
2964
|
children: s
|
|
2980
2965
|
}
|
|
@@ -2982,11 +2967,13 @@ const da = (r) => {
|
|
|
2982
2967
|
/* @__PURE__ */ t.jsxs(
|
|
2983
2968
|
"div",
|
|
2984
2969
|
{
|
|
2985
|
-
className:
|
|
2970
|
+
className: z(et.content, {
|
|
2971
|
+
[et.contentBorder]: q.border.active
|
|
2972
|
+
}),
|
|
2986
2973
|
style: {
|
|
2987
|
-
paddingRight:
|
|
2974
|
+
paddingRight: q.general.height + 15,
|
|
2988
2975
|
...e,
|
|
2989
|
-
|
|
2976
|
+
background: q.field.active ? q.field.color : "transparent"
|
|
2990
2977
|
},
|
|
2991
2978
|
children: [
|
|
2992
2979
|
/* @__PURE__ */ t.jsx(
|
|
@@ -2994,20 +2981,20 @@ const da = (r) => {
|
|
|
2994
2981
|
{
|
|
2995
2982
|
id: s,
|
|
2996
2983
|
type: a || "text",
|
|
2997
|
-
onChange: (
|
|
2998
|
-
if (a === "text") c(
|
|
2984
|
+
onChange: (f) => {
|
|
2985
|
+
if (a === "text") c(f.target.value);
|
|
2999
2986
|
else {
|
|
3000
|
-
const
|
|
3001
|
-
c(
|
|
2987
|
+
const D = B(f.target.value);
|
|
2988
|
+
c(D);
|
|
3002
2989
|
}
|
|
3003
2990
|
},
|
|
3004
2991
|
value: i,
|
|
3005
2992
|
autoComplete: "off",
|
|
3006
2993
|
placeholder: n || "Type something...",
|
|
3007
|
-
className:
|
|
3008
|
-
[
|
|
3009
|
-
[
|
|
3010
|
-
[
|
|
2994
|
+
className: z(et.input, {
|
|
2995
|
+
[et.required]: y && x && !S(i),
|
|
2996
|
+
[et.paddingless]: _,
|
|
2997
|
+
[et.borderless]: h
|
|
3011
2998
|
}),
|
|
3012
2999
|
min: a === "number" ? l : void 0,
|
|
3013
3000
|
max: a === "number" ? m : void 0,
|
|
@@ -3015,17 +3002,17 @@ const da = (r) => {
|
|
|
3015
3002
|
onFocus: () => L(!0)
|
|
3016
3003
|
}
|
|
3017
3004
|
),
|
|
3018
|
-
d && /* @__PURE__ */ t.jsx("div", { className:
|
|
3019
|
-
|
|
3005
|
+
d && /* @__PURE__ */ t.jsx("div", { className: et.rightIcon, children: /* @__PURE__ */ t.jsx(
|
|
3006
|
+
b,
|
|
3020
3007
|
{
|
|
3021
3008
|
name: "MagnifyingGlass",
|
|
3022
3009
|
fill: "var(--icon-secondary)",
|
|
3023
|
-
width:
|
|
3024
|
-
height:
|
|
3010
|
+
width: q.general.height,
|
|
3011
|
+
height: q.general.height
|
|
3025
3012
|
}
|
|
3026
3013
|
) }),
|
|
3027
3014
|
p && /* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
|
|
3028
|
-
|
|
3015
|
+
b,
|
|
3029
3016
|
{
|
|
3030
3017
|
name: "Sliders",
|
|
3031
3018
|
width: 20,
|
|
@@ -3081,11 +3068,11 @@ export {
|
|
|
3081
3068
|
oa as CategorySettings,
|
|
3082
3069
|
gt as ChooseImage,
|
|
3083
3070
|
fa as ChooseImageModal,
|
|
3084
|
-
|
|
3071
|
+
Io as EmptyCart,
|
|
3085
3072
|
aa as FormSettings,
|
|
3086
3073
|
da as HeaderButtons,
|
|
3087
|
-
|
|
3088
|
-
|
|
3074
|
+
b as Icon,
|
|
3075
|
+
W as InputSettings,
|
|
3089
3076
|
ha as InputUI,
|
|
3090
3077
|
He as ItemsSettings,
|
|
3091
3078
|
ia as LayoutSettings,
|
|
@@ -3094,11 +3081,11 @@ export {
|
|
|
3094
3081
|
Et as Modal,
|
|
3095
3082
|
ra as ProductOptions,
|
|
3096
3083
|
At as RangeSelector,
|
|
3097
|
-
|
|
3084
|
+
st as Select,
|
|
3098
3085
|
ua as ShareLink,
|
|
3099
3086
|
$o as ShoppingButton,
|
|
3100
|
-
|
|
3101
|
-
|
|
3087
|
+
No as ShoppingModalCart,
|
|
3088
|
+
Z as Switch,
|
|
3102
3089
|
Rt as TextSettings,
|
|
3103
3090
|
Ot as TextareaSettings,
|
|
3104
3091
|
_a as TextareaUI,
|