@billgangcom/theme-lib 1.58.0 → 1.59.0
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.cjs.js +4 -4
- package/dist/builder.es.js +1278 -1254
- package/dist/index-BV-uzi53.cjs +178 -0
- package/dist/{index-B285osIN.js → index-Cs6Fcjy6.js} +5484 -5430
- package/dist/index.cjs.js +1 -1
- package/dist/index.es.js +1 -1
- package/dist/pages/router-error-page/index.d.ts +3 -0
- package/dist/ui.cjs.js +1 -1
- package/dist/ui.es.js +265 -265
- package/package.json +2 -2
- package/dist/index-B9WpqNBa.cjs +0 -178
package/dist/ui.es.js
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { j as t, I as g, c as
|
|
2
|
-
import { J as hi, F as pi, H as _i, E as gi, T as
|
|
1
|
+
import { j as t, I as g, c as G, a as dt, S as it, R as yt, B as ot, O as ut, d as at, u as mt, e as ht, P as pt, D as _t, f as gt, v as ft, g as xt, C as bt, h as z, i as St, k as nt, l as wt, m as Bt, n as $t, o as rt, p as Y, L as Pt, q as lt, r as jt, t as H, w as Mt, M as vt, x as Nt, y as Tt, z as kt, A as qt } from "./index-Cs6Fcjy6.js";
|
|
2
|
+
import { J as hi, F as pi, H as _i, E as gi, T as fi, G as xi } from "./index-Cs6Fcjy6.js";
|
|
3
3
|
import _ from "react";
|
|
4
4
|
import "@phosphor-icons/react";
|
|
5
|
-
const At = "_wrapper_1vmyb_2", Ot = "_alignmentBlock_1vmyb_8", Et = "_title_1vmyb_15",
|
|
5
|
+
const At = "_wrapper_1vmyb_2", Ot = "_alignmentBlock_1vmyb_8", Et = "_title_1vmyb_15", Rt = "_subtitle_1vmyb_22", Lt = "_alignmentContent_1vmyb_29", Dt = "_alignments_1vmyb_37", Ht = "_alignment_1vmyb_8", Ut = "_circle_1vmyb_60", zt = "_paddings_1vmyb_67", Ft = "_padding_1vmyb_67", Vt = "_active_1vmyb_91", Yt = "_input_1vmyb_98", W = {
|
|
6
6
|
wrapper: At,
|
|
7
7
|
alignmentBlock: Ot,
|
|
8
8
|
title: Et,
|
|
9
|
-
subtitle:
|
|
10
|
-
alignmentContent:
|
|
11
|
-
alignments:
|
|
12
|
-
alignment:
|
|
13
|
-
circle:
|
|
14
|
-
paddings:
|
|
9
|
+
subtitle: Rt,
|
|
10
|
+
alignmentContent: Lt,
|
|
11
|
+
alignments: Dt,
|
|
12
|
+
alignment: Ht,
|
|
13
|
+
circle: Ut,
|
|
14
|
+
paddings: zt,
|
|
15
15
|
padding: Ft,
|
|
16
16
|
active: Vt,
|
|
17
17
|
input: Yt
|
|
@@ -57,7 +57,7 @@ const At = "_wrapper_1vmyb_2", Ot = "_alignmentBlock_1vmyb_8", Et = "_title_1vmy
|
|
|
57
57
|
return "AlignBottom";
|
|
58
58
|
}
|
|
59
59
|
}
|
|
60
|
-
const [o, u] = _.useState(null), [
|
|
60
|
+
const [o, u] = _.useState(null), [f, $] = _.useState(null);
|
|
61
61
|
return /* @__PURE__ */ t.jsxs("div", { className: W.layout, children: [
|
|
62
62
|
/* @__PURE__ */ t.jsx("h3", { className: W.title, children: "Layout" }),
|
|
63
63
|
/* @__PURE__ */ t.jsxs("div", { className: W.alignmentBlock, children: [
|
|
@@ -103,8 +103,8 @@ const At = "_wrapper_1vmyb_2", Ot = "_alignmentBlock_1vmyb_8", Et = "_title_1vmy
|
|
|
103
103
|
/* @__PURE__ */ t.jsx("div", { className: W.paddings, children: Wt.map((l) => /* @__PURE__ */ t.jsxs(
|
|
104
104
|
"label",
|
|
105
105
|
{
|
|
106
|
-
className:
|
|
107
|
-
[W.active]:
|
|
106
|
+
className: G(W.padding, {
|
|
107
|
+
[W.active]: f === l
|
|
108
108
|
}),
|
|
109
109
|
onFocus: () => {
|
|
110
110
|
$(l);
|
|
@@ -142,7 +142,7 @@ const At = "_wrapper_1vmyb_2", Ot = "_alignmentBlock_1vmyb_8", Et = "_title_1vmy
|
|
|
142
142
|
] })
|
|
143
143
|
] })
|
|
144
144
|
] });
|
|
145
|
-
}, Jt = "_title_82zux_1", Xt = "_subtitle_82zux_5", Qt = "_header_82zux_12", Kt = "_text_82zux_13", Zt = "_productsBlock_82zux_14", te = "_top_82zux_26", ee = "_itemsBlock_82zux_35", se = "_typeTexts_82zux_41", ne = "_block_82zux_48", ie = "_active_82zux_61", oe = "_products_82zux_14", ae = "_product_82zux_14", ce = "_button_82zux_80", le = "_disabled_82zux_91", re = "_image_82zux_95", de = "_info_82zux_102", ue = "_name_82zux_114", me = "_buttons_82zux_118", he = "_modal_82zux_125", pe = "_link_82zux_145", _e = "_modalOptions_82zux_151", ge = "_addButton_82zux_157",
|
|
145
|
+
}, Jt = "_title_82zux_1", Xt = "_subtitle_82zux_5", Qt = "_header_82zux_12", Kt = "_text_82zux_13", Zt = "_productsBlock_82zux_14", te = "_top_82zux_26", ee = "_itemsBlock_82zux_35", se = "_typeTexts_82zux_41", ne = "_block_82zux_48", ie = "_active_82zux_61", oe = "_products_82zux_14", ae = "_product_82zux_14", ce = "_button_82zux_80", le = "_disabled_82zux_91", re = "_image_82zux_95", de = "_info_82zux_102", ue = "_name_82zux_114", me = "_buttons_82zux_118", he = "_modal_82zux_125", pe = "_link_82zux_145", _e = "_modalOptions_82zux_151", ge = "_addButton_82zux_157", fe = "_deleteButton_82zux_179", J = {
|
|
146
146
|
title: Jt,
|
|
147
147
|
subtitle: Xt,
|
|
148
148
|
header: Qt,
|
|
@@ -165,7 +165,7 @@ const At = "_wrapper_1vmyb_2", Ot = "_alignmentBlock_1vmyb_8", Et = "_title_1vmy
|
|
|
165
165
|
link: pe,
|
|
166
166
|
modalOptions: _e,
|
|
167
167
|
addButton: ge,
|
|
168
|
-
deleteButton:
|
|
168
|
+
deleteButton: fe
|
|
169
169
|
}, Kn = (d) => {
|
|
170
170
|
const {
|
|
171
171
|
isActiveItems: n,
|
|
@@ -176,17 +176,17 @@ const At = "_wrapper_1vmyb_2", Ot = "_alignmentBlock_1vmyb_8", Et = "_title_1vmy
|
|
|
176
176
|
title: h,
|
|
177
177
|
subtitle: o,
|
|
178
178
|
draggable: u = !1,
|
|
179
|
-
withImage:
|
|
179
|
+
withImage: f = !1,
|
|
180
180
|
addable: $ = !0,
|
|
181
181
|
itemsOptions: l,
|
|
182
182
|
hasRangeSelector: r = !1,
|
|
183
183
|
rangeSelectorOptions: T,
|
|
184
184
|
limit: w,
|
|
185
185
|
autoScrollInterval: C,
|
|
186
|
-
deletable:
|
|
186
|
+
deletable: x
|
|
187
187
|
} = d;
|
|
188
188
|
function B(b) {
|
|
189
|
-
if (
|
|
189
|
+
if (f)
|
|
190
190
|
return b ? /* @__PURE__ */ t.jsx(
|
|
191
191
|
"img",
|
|
192
192
|
{
|
|
@@ -208,7 +208,7 @@ const At = "_wrapper_1vmyb_2", Ot = "_alignmentBlock_1vmyb_8", Et = "_title_1vmy
|
|
|
208
208
|
const a = (b, q = !1) => {
|
|
209
209
|
const M = l.find((S) => S.id === b);
|
|
210
210
|
if (!M) return;
|
|
211
|
-
const
|
|
211
|
+
const D = /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
212
212
|
u && /* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
|
|
213
213
|
g,
|
|
214
214
|
{
|
|
@@ -248,7 +248,7 @@ const At = "_wrapper_1vmyb_2", Ot = "_alignmentBlock_1vmyb_8", Et = "_title_1vmy
|
|
|
248
248
|
"div",
|
|
249
249
|
{
|
|
250
250
|
className: J.product,
|
|
251
|
-
children:
|
|
251
|
+
children: D
|
|
252
252
|
},
|
|
253
253
|
b
|
|
254
254
|
);
|
|
@@ -257,7 +257,7 @@ const At = "_wrapper_1vmyb_2", Ot = "_alignmentBlock_1vmyb_8", Et = "_title_1vmy
|
|
|
257
257
|
(h || n !== void 0) && /* @__PURE__ */ t.jsxs("div", { className: J.top, children: [
|
|
258
258
|
h && /* @__PURE__ */ t.jsx("h3", { className: J.title, children: h }),
|
|
259
259
|
n !== void 0 && /* @__PURE__ */ t.jsx(
|
|
260
|
-
|
|
260
|
+
it,
|
|
261
261
|
{
|
|
262
262
|
current: n,
|
|
263
263
|
onChange: (b) => e == null ? void 0 : e(b)
|
|
@@ -267,7 +267,7 @@ const At = "_wrapper_1vmyb_2", Ot = "_alignmentBlock_1vmyb_8", Et = "_title_1vmy
|
|
|
267
267
|
r && T && /* @__PURE__ */ t.jsx(yt, { ...T }),
|
|
268
268
|
/* @__PURE__ */ t.jsxs("div", { className: J.products, children: [
|
|
269
269
|
o && /* @__PURE__ */ t.jsx("h5", { className: J.subtitle, children: o }),
|
|
270
|
-
s.map((b) => a(b,
|
|
270
|
+
s.map((b) => a(b, x)),
|
|
271
271
|
$ && /* @__PURE__ */ t.jsx(
|
|
272
272
|
"div",
|
|
273
273
|
{
|
|
@@ -278,10 +278,10 @@ const At = "_wrapper_1vmyb_2", Ot = "_alignmentBlock_1vmyb_8", Et = "_title_1vmy
|
|
|
278
278
|
gap: 5
|
|
279
279
|
},
|
|
280
280
|
children: /* @__PURE__ */ t.jsx(
|
|
281
|
-
|
|
281
|
+
ot,
|
|
282
282
|
{
|
|
283
283
|
withoutHover: !0,
|
|
284
|
-
className:
|
|
284
|
+
className: G(J.button, {
|
|
285
285
|
[J.disabled]: !!(w && w <= s.length || s.length === l.length)
|
|
286
286
|
}),
|
|
287
287
|
size: "s",
|
|
@@ -291,7 +291,7 @@ const At = "_wrapper_1vmyb_2", Ot = "_alignmentBlock_1vmyb_8", Et = "_title_1vmy
|
|
|
291
291
|
let q = null;
|
|
292
292
|
if (l) {
|
|
293
293
|
for (let M = 0; M < l.length; M++)
|
|
294
|
-
if (!s.find((
|
|
294
|
+
if (!s.find((D) => D === l[M].id)) {
|
|
295
295
|
q = l[M];
|
|
296
296
|
break;
|
|
297
297
|
}
|
|
@@ -334,8 +334,8 @@ const At = "_wrapper_1vmyb_2", Ot = "_alignmentBlock_1vmyb_8", Et = "_title_1vmy
|
|
|
334
334
|
}
|
|
335
335
|
)
|
|
336
336
|
] });
|
|
337
|
-
},
|
|
338
|
-
title:
|
|
337
|
+
}, xe = "_title_roi3a_1", be = "_subtitle_roi3a_5", je = "_header_roi3a_12", ve = "_text_roi3a_13", ye = "_productsBlock_roi3a_14", Ne = "_top_roi3a_26", ke = "_itemsBlock_roi3a_35", Ie = "_typeTexts_roi3a_41", Ce = "_block_roi3a_48", Se = "_active_roi3a_61", we = "_products_roi3a_14", Be = "_product_roi3a_14", $e = "_button_roi3a_80", Pe = "_disabled_roi3a_91", Me = "_image_roi3a_95", Te = "_info_roi3a_102", qe = "_name_roi3a_114", Ae = "_buttons_roi3a_118", Oe = "_modal_roi3a_125", Ee = "_link_roi3a_145", Re = "_modalOptions_roi3a_151", Le = "_addButton_roi3a_164", De = "_deleteButton_roi3a_179", He = "_closeIcon_roi3a_191", F = {
|
|
338
|
+
title: xe,
|
|
339
339
|
subtitle: be,
|
|
340
340
|
header: je,
|
|
341
341
|
text: ve,
|
|
@@ -355,12 +355,12 @@ const At = "_wrapper_1vmyb_2", Ot = "_alignmentBlock_1vmyb_8", Et = "_title_1vmy
|
|
|
355
355
|
buttons: Ae,
|
|
356
356
|
modal: Oe,
|
|
357
357
|
link: Ee,
|
|
358
|
-
modalOptions:
|
|
359
|
-
addButton:
|
|
360
|
-
deleteButton:
|
|
361
|
-
closeIcon:
|
|
358
|
+
modalOptions: Re,
|
|
359
|
+
addButton: Le,
|
|
360
|
+
deleteButton: De,
|
|
361
|
+
closeIcon: He
|
|
362
362
|
};
|
|
363
|
-
function
|
|
363
|
+
function Ue({ product: d, children: n }) {
|
|
364
364
|
const {
|
|
365
365
|
attributes: e,
|
|
366
366
|
listeners: s,
|
|
@@ -368,7 +368,7 @@ function He({ product: d, children: n }) {
|
|
|
368
368
|
transform: m,
|
|
369
369
|
transition: h,
|
|
370
370
|
isDragging: o
|
|
371
|
-
} =
|
|
371
|
+
} = xt({
|
|
372
372
|
id: d.id
|
|
373
373
|
}), u = {
|
|
374
374
|
transform: bt.Transform.toString(m),
|
|
@@ -379,7 +379,7 @@ function He({ product: d, children: n }) {
|
|
|
379
379
|
{
|
|
380
380
|
ref: i,
|
|
381
381
|
style: u,
|
|
382
|
-
className: `${
|
|
382
|
+
className: `${F.product} ${o ? F.dragging : ""}`,
|
|
383
383
|
...e,
|
|
384
384
|
...s,
|
|
385
385
|
children: n
|
|
@@ -396,13 +396,13 @@ const Zn = (d) => {
|
|
|
396
396
|
subtitle: h,
|
|
397
397
|
editable: o = !0,
|
|
398
398
|
draggable: u = !1,
|
|
399
|
-
deletable:
|
|
399
|
+
deletable: f = !0,
|
|
400
400
|
addable: $ = !0,
|
|
401
401
|
itemsType: l,
|
|
402
402
|
itemsOptions: r,
|
|
403
403
|
addableOptions: T = {},
|
|
404
404
|
limit: w
|
|
405
|
-
} = d, [C,
|
|
405
|
+
} = d, [C, x] = _.useState(null), [B, a] = _.useState(null), b = _.useRef(null), q = mt(
|
|
406
406
|
ht(pt, {
|
|
407
407
|
activationConstraint: {
|
|
408
408
|
distance: 5
|
|
@@ -423,14 +423,14 @@ const Zn = (d) => {
|
|
|
423
423
|
a({
|
|
424
424
|
top: O.top + window.scrollY,
|
|
425
425
|
left: O.left - 30
|
|
426
|
-
}),
|
|
427
|
-
},
|
|
426
|
+
}), x(N);
|
|
427
|
+
}, D = (j) => {
|
|
428
428
|
const { active: N, over: O } = j;
|
|
429
429
|
if (O && N.id !== O.id) {
|
|
430
430
|
const c = s.findIndex((I) => I.id === N.id), v = s.findIndex((I) => I.id === O.id);
|
|
431
431
|
if (c !== -1 && v !== -1) {
|
|
432
|
-
const I = [...s], [
|
|
433
|
-
I.splice(v, 0,
|
|
432
|
+
const I = [...s], [U] = I.splice(c, 1);
|
|
433
|
+
I.splice(v, 0, U), i(I);
|
|
434
434
|
}
|
|
435
435
|
}
|
|
436
436
|
}, S = (j, N) => {
|
|
@@ -450,25 +450,25 @@ const Zn = (d) => {
|
|
|
450
450
|
onChange: (c) => {
|
|
451
451
|
const v = [...s], I = r.find((P) => P.name === c);
|
|
452
452
|
if (!I) return;
|
|
453
|
-
const
|
|
453
|
+
const U = v.map((P) => P.id === j.id ? {
|
|
454
454
|
...I,
|
|
455
455
|
name: {
|
|
456
456
|
"en-US": c
|
|
457
457
|
}
|
|
458
458
|
} : P);
|
|
459
|
-
|
|
459
|
+
x({
|
|
460
460
|
...j,
|
|
461
461
|
name: {
|
|
462
462
|
"en-US": c
|
|
463
463
|
}
|
|
464
|
-
}), i([...
|
|
464
|
+
}), i([...U]);
|
|
465
465
|
},
|
|
466
466
|
value: j.name,
|
|
467
467
|
options: r.filter((c) => !s.find((v) => v.name === c.name)).map((c) => c.name)
|
|
468
468
|
}
|
|
469
469
|
),
|
|
470
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
471
|
-
o && /* @__PURE__ */ t.jsx("div", { className:
|
|
470
|
+
/* @__PURE__ */ t.jsxs("div", { className: F.buttons, children: [
|
|
471
|
+
o && /* @__PURE__ */ t.jsx("div", { className: F.deleteButton, children: /* @__PURE__ */ t.jsx(
|
|
472
472
|
g,
|
|
473
473
|
{
|
|
474
474
|
name: "Sliders",
|
|
@@ -478,7 +478,7 @@ const Zn = (d) => {
|
|
|
478
478
|
onClick: (c) => M(c, j)
|
|
479
479
|
}
|
|
480
480
|
) }),
|
|
481
|
-
|
|
481
|
+
f && /* @__PURE__ */ t.jsx("div", { className: F.deleteButton, children: /* @__PURE__ */ t.jsx(
|
|
482
482
|
g,
|
|
483
483
|
{
|
|
484
484
|
name: "Trash",
|
|
@@ -492,7 +492,7 @@ const Zn = (d) => {
|
|
|
492
492
|
] })
|
|
493
493
|
] });
|
|
494
494
|
return u ? /* @__PURE__ */ t.jsx(
|
|
495
|
-
|
|
495
|
+
Ue,
|
|
496
496
|
{
|
|
497
497
|
product: j,
|
|
498
498
|
index: N,
|
|
@@ -502,35 +502,35 @@ const Zn = (d) => {
|
|
|
502
502
|
) : /* @__PURE__ */ t.jsx(
|
|
503
503
|
"div",
|
|
504
504
|
{
|
|
505
|
-
className:
|
|
505
|
+
className: F.product,
|
|
506
506
|
children: O
|
|
507
507
|
},
|
|
508
508
|
j.id
|
|
509
509
|
);
|
|
510
510
|
};
|
|
511
|
-
return /* @__PURE__ */ t.jsxs("div", { className:
|
|
512
|
-
(m || n !== void 0) && /* @__PURE__ */ t.jsxs("div", { className:
|
|
513
|
-
m && /* @__PURE__ */ t.jsx("h3", { className:
|
|
511
|
+
return /* @__PURE__ */ t.jsxs("div", { className: F.productsBlock, children: [
|
|
512
|
+
(m || n !== void 0) && /* @__PURE__ */ t.jsxs("div", { className: F.top, children: [
|
|
513
|
+
m && /* @__PURE__ */ t.jsx("h3", { className: F.title, children: m }),
|
|
514
514
|
n !== void 0 && /* @__PURE__ */ t.jsx(
|
|
515
|
-
|
|
515
|
+
it,
|
|
516
516
|
{
|
|
517
517
|
current: n,
|
|
518
518
|
onChange: (j) => e == null ? void 0 : e(j)
|
|
519
519
|
}
|
|
520
520
|
)
|
|
521
521
|
] }),
|
|
522
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
523
|
-
h && /* @__PURE__ */ t.jsx("h5", { className:
|
|
522
|
+
/* @__PURE__ */ t.jsxs("div", { className: F.products, children: [
|
|
523
|
+
h && /* @__PURE__ */ t.jsx("h5", { className: F.subtitle, children: h }),
|
|
524
524
|
u ? /* @__PURE__ */ t.jsx(
|
|
525
525
|
_t,
|
|
526
526
|
{
|
|
527
527
|
sensors: q,
|
|
528
|
-
onDragEnd:
|
|
528
|
+
onDragEnd: D,
|
|
529
529
|
children: /* @__PURE__ */ t.jsx(
|
|
530
530
|
gt,
|
|
531
531
|
{
|
|
532
532
|
items: s.map((j) => j.id),
|
|
533
|
-
strategy:
|
|
533
|
+
strategy: ft,
|
|
534
534
|
children: s.map((j, N) => S(j, N))
|
|
535
535
|
}
|
|
536
536
|
)
|
|
@@ -545,11 +545,11 @@ const Zn = (d) => {
|
|
|
545
545
|
justifyContent: "center"
|
|
546
546
|
},
|
|
547
547
|
children: /* @__PURE__ */ t.jsx(
|
|
548
|
-
|
|
548
|
+
ot,
|
|
549
549
|
{
|
|
550
550
|
withoutHover: !0,
|
|
551
|
-
className:
|
|
552
|
-
[
|
|
551
|
+
className: G(F.button, {
|
|
552
|
+
[F.disabled]: !!(w && w <= s.length || s.length === (r == null ? void 0 : r.length))
|
|
553
553
|
}),
|
|
554
554
|
size: "s",
|
|
555
555
|
disabled: !!(w && w <= s.length || s.length === (r == null ? void 0 : r.length)),
|
|
@@ -572,7 +572,7 @@ const Zn = (d) => {
|
|
|
572
572
|
style: {
|
|
573
573
|
width: "fit-content"
|
|
574
574
|
},
|
|
575
|
-
children: /* @__PURE__ */ t.jsxs("div", { className:
|
|
575
|
+
children: /* @__PURE__ */ t.jsxs("div", { className: F.addButton, children: [
|
|
576
576
|
/* @__PURE__ */ t.jsx("span", { children: "Add Option" }),
|
|
577
577
|
/* @__PURE__ */ t.jsx(
|
|
578
578
|
g,
|
|
@@ -590,10 +590,10 @@ const Zn = (d) => {
|
|
|
590
590
|
] })
|
|
591
591
|
] });
|
|
592
592
|
};
|
|
593
|
-
function
|
|
594
|
-
const { product: n, children: e } = d, { attributes: s, listeners: i, setNodeRef: m, transform: h, transition: o, isDragging: u } =
|
|
593
|
+
function ze(d) {
|
|
594
|
+
const { product: n, children: e } = d, { attributes: s, listeners: i, setNodeRef: m, transform: h, transition: o, isDragging: u } = xt({
|
|
595
595
|
id: n.id
|
|
596
|
-
}),
|
|
596
|
+
}), f = {
|
|
597
597
|
transform: bt.Transform.toString(h),
|
|
598
598
|
transition: o
|
|
599
599
|
};
|
|
@@ -601,8 +601,8 @@ function Ue(d) {
|
|
|
601
601
|
"div",
|
|
602
602
|
{
|
|
603
603
|
ref: m,
|
|
604
|
-
style:
|
|
605
|
-
className: `${
|
|
604
|
+
style: f,
|
|
605
|
+
className: `${z.product} ${u ? z.dragging : ""}`,
|
|
606
606
|
...s,
|
|
607
607
|
...i,
|
|
608
608
|
children: e
|
|
@@ -619,22 +619,22 @@ const ti = (d) => {
|
|
|
619
619
|
title: h,
|
|
620
620
|
subtitle: o,
|
|
621
621
|
editable: u = !0,
|
|
622
|
-
draggable:
|
|
622
|
+
draggable: f = !1,
|
|
623
623
|
withImage: $ = !1,
|
|
624
624
|
deletable: l = !0,
|
|
625
625
|
addable: r = !0,
|
|
626
626
|
itemsType: T,
|
|
627
627
|
itemsPlaceholder: w = "",
|
|
628
628
|
itemsOptions: C,
|
|
629
|
-
hasRangeSelector:
|
|
629
|
+
hasRangeSelector: x = !1,
|
|
630
630
|
rangeSelectorOptions: B,
|
|
631
631
|
modalOptions: a,
|
|
632
632
|
addableOptions: b = {},
|
|
633
633
|
limit: q
|
|
634
|
-
} = d, [M,
|
|
634
|
+
} = d, [M, D] = _.useState(null), [S, j] = _.useState({
|
|
635
635
|
top: 0,
|
|
636
636
|
left: 0
|
|
637
|
-
}), [N, O] = _.useState(null), c = _.useRef(null), [v, I] = _.useState(!1),
|
|
637
|
+
}), [N, O] = _.useState(null), c = _.useRef(null), [v, I] = _.useState(!1), U = mt(
|
|
638
638
|
ht(pt, {
|
|
639
639
|
activationConstraint: {
|
|
640
640
|
distance: 5
|
|
@@ -643,10 +643,10 @@ const ti = (d) => {
|
|
|
643
643
|
);
|
|
644
644
|
_.useEffect(() => {
|
|
645
645
|
const p = () => {
|
|
646
|
-
|
|
646
|
+
D(null), I(!1);
|
|
647
647
|
};
|
|
648
|
-
return document.body.addEventListener("click", p),
|
|
649
|
-
|
|
648
|
+
return document.body.addEventListener("click", p), D(null), I(!1), () => {
|
|
649
|
+
D(null), I(!1), document.body.removeEventListener("click", p);
|
|
650
650
|
};
|
|
651
651
|
}, []), _.useEffect(() => {
|
|
652
652
|
if (M) {
|
|
@@ -669,9 +669,9 @@ const ti = (d) => {
|
|
|
669
669
|
O({
|
|
670
670
|
top: E.top + window.scrollY,
|
|
671
671
|
left: E.left - 30
|
|
672
|
-
}),
|
|
672
|
+
}), D(A), I(!0);
|
|
673
673
|
};
|
|
674
|
-
function
|
|
674
|
+
function L(p) {
|
|
675
675
|
if ($)
|
|
676
676
|
return p ? /* @__PURE__ */ t.jsx(
|
|
677
677
|
"img",
|
|
@@ -694,16 +694,16 @@ const ti = (d) => {
|
|
|
694
694
|
const K = (p) => {
|
|
695
695
|
const { active: A, over: E } = p;
|
|
696
696
|
if (E && A.id !== E.id) {
|
|
697
|
-
const
|
|
698
|
-
if (
|
|
699
|
-
const
|
|
700
|
-
|
|
697
|
+
const R = s.findIndex((V) => V.id === A.id), tt = s.findIndex((V) => V.id === E.id);
|
|
698
|
+
if (R !== -1 && tt !== -1) {
|
|
699
|
+
const V = [...s], [X] = V.splice(R, 1);
|
|
700
|
+
V.splice(tt, 0, X), i(V);
|
|
701
701
|
}
|
|
702
702
|
}
|
|
703
|
-
},
|
|
703
|
+
}, et = (p) => {
|
|
704
704
|
var E;
|
|
705
705
|
const A = /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
706
|
-
|
|
706
|
+
f && /* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
|
|
707
707
|
g,
|
|
708
708
|
{
|
|
709
709
|
name: "DotsSixVertical",
|
|
@@ -715,38 +715,38 @@ const ti = (d) => {
|
|
|
715
715
|
T === "select" && C && /* @__PURE__ */ t.jsx(
|
|
716
716
|
at,
|
|
717
717
|
{
|
|
718
|
-
onChange: (
|
|
719
|
-
const
|
|
718
|
+
onChange: (R) => {
|
|
719
|
+
const V = [...s].map((X) => X.id === p.id ? {
|
|
720
720
|
...p,
|
|
721
721
|
name: {
|
|
722
|
-
"en-US":
|
|
722
|
+
"en-US": R
|
|
723
723
|
}
|
|
724
724
|
} : X);
|
|
725
|
-
|
|
725
|
+
D({
|
|
726
726
|
...p,
|
|
727
727
|
name: {
|
|
728
|
-
"en-US":
|
|
728
|
+
"en-US": R
|
|
729
729
|
}
|
|
730
|
-
}), i([...
|
|
730
|
+
}), i([...V]);
|
|
731
731
|
},
|
|
732
732
|
value: p.name["en-US"],
|
|
733
733
|
options: C.filter(
|
|
734
|
-
(
|
|
734
|
+
(R) => !s.find((tt) => tt.name["en-US"] === R)
|
|
735
735
|
),
|
|
736
|
-
leftAddon:
|
|
736
|
+
leftAddon: L(p.images)
|
|
737
737
|
}
|
|
738
738
|
),
|
|
739
739
|
T === "input" && /* @__PURE__ */ t.jsx(
|
|
740
740
|
dt,
|
|
741
741
|
{
|
|
742
|
-
onChange: (
|
|
743
|
-
const
|
|
742
|
+
onChange: (R) => {
|
|
743
|
+
const V = [...s].map((X) => X.id === p.id ? {
|
|
744
744
|
...p,
|
|
745
745
|
name: {
|
|
746
|
-
"en-US":
|
|
746
|
+
"en-US": R
|
|
747
747
|
}
|
|
748
748
|
} : X);
|
|
749
|
-
i([...
|
|
749
|
+
i([...V]);
|
|
750
750
|
},
|
|
751
751
|
value: p.name["en-US"],
|
|
752
752
|
placeholder: w
|
|
@@ -755,28 +755,28 @@ const ti = (d) => {
|
|
|
755
755
|
T === "image" && /* @__PURE__ */ t.jsx(
|
|
756
756
|
wt,
|
|
757
757
|
{
|
|
758
|
-
onChange: (
|
|
759
|
-
const
|
|
758
|
+
onChange: (R) => {
|
|
759
|
+
const V = [...s].map((X) => X.id === p.id ? {
|
|
760
760
|
...p,
|
|
761
|
-
images:
|
|
761
|
+
images: R
|
|
762
762
|
} : X);
|
|
763
|
-
i([...
|
|
763
|
+
i([...V]);
|
|
764
764
|
},
|
|
765
|
-
activeImage: (E = s.find((
|
|
765
|
+
activeImage: (E = s.find((R) => R.id === p.id)) == null ? void 0 : E.images[0]
|
|
766
766
|
}
|
|
767
767
|
),
|
|
768
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
769
|
-
u && /* @__PURE__ */ t.jsx("div", { className:
|
|
768
|
+
/* @__PURE__ */ t.jsxs("div", { className: z.buttons, children: [
|
|
769
|
+
u && /* @__PURE__ */ t.jsx("div", { className: z.deleteButton, children: /* @__PURE__ */ t.jsx(
|
|
770
770
|
g,
|
|
771
771
|
{
|
|
772
772
|
name: "Sliders",
|
|
773
773
|
hoverable: !0,
|
|
774
774
|
width: 20,
|
|
775
775
|
height: 20,
|
|
776
|
-
onClick: (
|
|
776
|
+
onClick: (R) => P(R, p)
|
|
777
777
|
}
|
|
778
778
|
) }),
|
|
779
|
-
l && /* @__PURE__ */ t.jsx("div", { className:
|
|
779
|
+
l && /* @__PURE__ */ t.jsx("div", { className: z.deleteButton, children: /* @__PURE__ */ t.jsx(
|
|
780
780
|
g,
|
|
781
781
|
{
|
|
782
782
|
name: "Trash",
|
|
@@ -784,13 +784,13 @@ const ti = (d) => {
|
|
|
784
784
|
width: 20,
|
|
785
785
|
height: 20,
|
|
786
786
|
fill: "#C12A2A",
|
|
787
|
-
onClick: () => i(s.filter((
|
|
787
|
+
onClick: () => i(s.filter((R) => R.id !== p.id))
|
|
788
788
|
}
|
|
789
789
|
) })
|
|
790
790
|
] })
|
|
791
791
|
] });
|
|
792
|
-
return
|
|
793
|
-
|
|
792
|
+
return f ? /* @__PURE__ */ t.jsx(
|
|
793
|
+
ze,
|
|
794
794
|
{
|
|
795
795
|
product: p,
|
|
796
796
|
children: A
|
|
@@ -799,17 +799,17 @@ const ti = (d) => {
|
|
|
799
799
|
) : /* @__PURE__ */ t.jsx(
|
|
800
800
|
"div",
|
|
801
801
|
{
|
|
802
|
-
className:
|
|
802
|
+
className: z.product,
|
|
803
803
|
children: A
|
|
804
804
|
},
|
|
805
805
|
p.id
|
|
806
806
|
);
|
|
807
807
|
};
|
|
808
|
-
return /* @__PURE__ */ t.jsxs("div", { className:
|
|
809
|
-
(h || n !== void 0) && /* @__PURE__ */ t.jsxs("div", { className:
|
|
810
|
-
h && /* @__PURE__ */ t.jsx("h3", { className:
|
|
808
|
+
return /* @__PURE__ */ t.jsxs("div", { className: z.productsBlock, children: [
|
|
809
|
+
(h || n !== void 0) && /* @__PURE__ */ t.jsxs("div", { className: z.top, children: [
|
|
810
|
+
h && /* @__PURE__ */ t.jsx("h3", { className: z.title, children: h }),
|
|
811
811
|
n !== void 0 && /* @__PURE__ */ t.jsx(
|
|
812
|
-
|
|
812
|
+
it,
|
|
813
813
|
{
|
|
814
814
|
current: n,
|
|
815
815
|
onChange: (p) => e == null ? void 0 : e(p)
|
|
@@ -821,30 +821,30 @@ const ti = (d) => {
|
|
|
821
821
|
{
|
|
822
822
|
ref: c,
|
|
823
823
|
activeItem: M,
|
|
824
|
-
setActiveItem:
|
|
824
|
+
setActiveItem: D,
|
|
825
825
|
popupPosition: S,
|
|
826
826
|
modalOptions: a,
|
|
827
827
|
setIsOpenModal: I
|
|
828
828
|
}
|
|
829
829
|
),
|
|
830
|
-
|
|
831
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
832
|
-
o && /* @__PURE__ */ t.jsx("h5", { className:
|
|
833
|
-
|
|
830
|
+
x && B && /* @__PURE__ */ t.jsx(yt, { ...B }),
|
|
831
|
+
/* @__PURE__ */ t.jsxs("div", { className: z.products, children: [
|
|
832
|
+
o && /* @__PURE__ */ t.jsx("h5", { className: z.subtitle, children: o }),
|
|
833
|
+
f ? /* @__PURE__ */ t.jsx(
|
|
834
834
|
_t,
|
|
835
835
|
{
|
|
836
|
-
sensors:
|
|
836
|
+
sensors: U,
|
|
837
837
|
onDragEnd: K,
|
|
838
838
|
children: /* @__PURE__ */ t.jsx(
|
|
839
839
|
gt,
|
|
840
840
|
{
|
|
841
841
|
items: s.map((p) => p.id),
|
|
842
|
-
strategy:
|
|
843
|
-
children: s.map((p) =>
|
|
842
|
+
strategy: ft,
|
|
843
|
+
children: s.map((p) => et(p))
|
|
844
844
|
}
|
|
845
845
|
)
|
|
846
846
|
}
|
|
847
|
-
) : s.map((p) =>
|
|
847
|
+
) : s.map((p) => et(p)),
|
|
848
848
|
r && /* @__PURE__ */ t.jsx(
|
|
849
849
|
"div",
|
|
850
850
|
{
|
|
@@ -854,11 +854,11 @@ const ti = (d) => {
|
|
|
854
854
|
justifyContent: "center"
|
|
855
855
|
},
|
|
856
856
|
children: /* @__PURE__ */ t.jsx(
|
|
857
|
-
|
|
857
|
+
ot,
|
|
858
858
|
{
|
|
859
859
|
withoutHover: !0,
|
|
860
|
-
className:
|
|
861
|
-
[
|
|
860
|
+
className: G(z.button, {
|
|
861
|
+
[z.disabled]: !!(q && q <= s.length)
|
|
862
862
|
}),
|
|
863
863
|
size: "s",
|
|
864
864
|
disabled: !!(q && q <= s.length),
|
|
@@ -867,7 +867,7 @@ const ti = (d) => {
|
|
|
867
867
|
let A = null;
|
|
868
868
|
if (C) {
|
|
869
869
|
for (let E = 0; E < C.length; E++)
|
|
870
|
-
if (!s.find((
|
|
870
|
+
if (!s.find((R) => R.name["en-US"] === C[E])) {
|
|
871
871
|
A = C[E];
|
|
872
872
|
break;
|
|
873
873
|
}
|
|
@@ -876,7 +876,7 @@ const ti = (d) => {
|
|
|
876
876
|
name: {
|
|
877
877
|
"en-US": A || C[0]
|
|
878
878
|
},
|
|
879
|
-
id:
|
|
879
|
+
id: nt(),
|
|
880
880
|
...b,
|
|
881
881
|
maxSymbols: 100
|
|
882
882
|
// пример значения
|
|
@@ -884,14 +884,14 @@ const ti = (d) => {
|
|
|
884
884
|
name: {
|
|
885
885
|
"en-US": ""
|
|
886
886
|
},
|
|
887
|
-
id:
|
|
887
|
+
id: nt(),
|
|
888
888
|
...b,
|
|
889
889
|
maxSymbols: 100
|
|
890
890
|
}) : p.push({
|
|
891
891
|
name: {
|
|
892
892
|
"en-US": `Image ${s.length + 1}`
|
|
893
893
|
},
|
|
894
|
-
id:
|
|
894
|
+
id: nt(),
|
|
895
895
|
...b,
|
|
896
896
|
maxSymbols: 100
|
|
897
897
|
}), i(p);
|
|
@@ -899,7 +899,7 @@ const ti = (d) => {
|
|
|
899
899
|
style: {
|
|
900
900
|
width: "fit-content"
|
|
901
901
|
},
|
|
902
|
-
children: /* @__PURE__ */ t.jsxs("div", { className:
|
|
902
|
+
children: /* @__PURE__ */ t.jsxs("div", { className: z.addButton, children: [
|
|
903
903
|
/* @__PURE__ */ t.jsx("span", { children: "Add Option" }),
|
|
904
904
|
/* @__PURE__ */ t.jsx(
|
|
905
905
|
g,
|
|
@@ -941,35 +941,35 @@ const ti = (d) => {
|
|
|
941
941
|
addButton: ds,
|
|
942
942
|
deleteButton: us
|
|
943
943
|
}, ms = (d) => {
|
|
944
|
-
const { buttons: n, setButtons: e, deletable: s = !0, addable: i = !0, editableLink: m = !0 } = d, { pages: h } = Bt(), [o, u] = _.useState(null), [
|
|
944
|
+
const { buttons: n, setButtons: e, deletable: s = !0, addable: i = !0, editableLink: m = !0 } = d, { pages: h } = Bt(), [o, u] = _.useState(null), [f, $] = _.useState({
|
|
945
945
|
top: 0,
|
|
946
946
|
left: 0
|
|
947
947
|
}), [l, r] = _.useState(null), T = _.useRef(null);
|
|
948
948
|
_.useEffect(() => {
|
|
949
949
|
if (o) {
|
|
950
|
-
const
|
|
951
|
-
e(
|
|
950
|
+
const x = [...n].map((B) => B.id === o.id ? o : B);
|
|
951
|
+
e(x);
|
|
952
952
|
}
|
|
953
953
|
}, [o]), _.useEffect(() => {
|
|
954
954
|
if (T.current && l) {
|
|
955
|
-
const
|
|
955
|
+
const x = T.current.getBoundingClientRect().height, B = window.innerHeight;
|
|
956
956
|
let a = l.top;
|
|
957
|
-
a +
|
|
957
|
+
a + x > B + window.scrollY - 200 && (a = B + window.scrollY - x - 200), a < 0 && (a = 10), $({
|
|
958
958
|
top: a,
|
|
959
959
|
left: l.left
|
|
960
960
|
});
|
|
961
961
|
}
|
|
962
962
|
}, [T.current, l]);
|
|
963
|
-
const w = (
|
|
964
|
-
|
|
965
|
-
const a =
|
|
963
|
+
const w = (x, B) => {
|
|
964
|
+
x.stopPropagation();
|
|
965
|
+
const a = x.target.getBoundingClientRect();
|
|
966
966
|
r({
|
|
967
967
|
top: a.top + window.scrollY - 70,
|
|
968
968
|
left: a.left - (i ? 30 : 65)
|
|
969
969
|
}), u(B);
|
|
970
|
-
}, C = (
|
|
970
|
+
}, C = (x, B) => {
|
|
971
971
|
const a = [...n], b = {
|
|
972
|
-
...
|
|
972
|
+
...x,
|
|
973
973
|
id: Math.random().toString(36).substr(2, 9)
|
|
974
974
|
// Генерируем новый уникальный ID
|
|
975
975
|
};
|
|
@@ -977,7 +977,7 @@ const ti = (d) => {
|
|
|
977
977
|
};
|
|
978
978
|
return /* @__PURE__ */ t.jsxs("div", { className: Q.products, children: [
|
|
979
979
|
/* @__PURE__ */ t.jsx("h5", { className: Q.subtitle, children: "Button Type" }),
|
|
980
|
-
n.map((
|
|
980
|
+
n.map((x, B) => /* @__PURE__ */ t.jsxs(
|
|
981
981
|
"div",
|
|
982
982
|
{
|
|
983
983
|
className: Q.product,
|
|
@@ -986,13 +986,13 @@ const ti = (d) => {
|
|
|
986
986
|
at,
|
|
987
987
|
{
|
|
988
988
|
onChange: (a) => {
|
|
989
|
-
const q = [...n].map((M) => M.id ===
|
|
990
|
-
...
|
|
989
|
+
const q = [...n].map((M) => M.id === x.id ? {
|
|
990
|
+
...x,
|
|
991
991
|
type: a
|
|
992
992
|
} : M);
|
|
993
993
|
e(q);
|
|
994
994
|
},
|
|
995
|
-
value:
|
|
995
|
+
value: x.type,
|
|
996
996
|
options: ["Primary", "Secondary", "Tertiary"]
|
|
997
997
|
}
|
|
998
998
|
),
|
|
@@ -1005,7 +1005,7 @@ const ti = (d) => {
|
|
|
1005
1005
|
width: 20,
|
|
1006
1006
|
height: 20,
|
|
1007
1007
|
onClick: () => {
|
|
1008
|
-
C(
|
|
1008
|
+
C(x, B);
|
|
1009
1009
|
}
|
|
1010
1010
|
}
|
|
1011
1011
|
) }),
|
|
@@ -1017,7 +1017,7 @@ const ti = (d) => {
|
|
|
1017
1017
|
width: 20,
|
|
1018
1018
|
height: 20,
|
|
1019
1019
|
onClick: (a) => {
|
|
1020
|
-
w(a,
|
|
1020
|
+
w(a, x);
|
|
1021
1021
|
}
|
|
1022
1022
|
}
|
|
1023
1023
|
) }),
|
|
@@ -1027,7 +1027,7 @@ const ti = (d) => {
|
|
|
1027
1027
|
name: "Trash",
|
|
1028
1028
|
hoverable: !0,
|
|
1029
1029
|
onClick: () => {
|
|
1030
|
-
const a = n.filter((b) => b.id !==
|
|
1030
|
+
const a = n.filter((b) => b.id !== x.id);
|
|
1031
1031
|
e(a);
|
|
1032
1032
|
},
|
|
1033
1033
|
width: 20,
|
|
@@ -1038,7 +1038,7 @@ const ti = (d) => {
|
|
|
1038
1038
|
] })
|
|
1039
1039
|
]
|
|
1040
1040
|
},
|
|
1041
|
-
|
|
1041
|
+
x.id
|
|
1042
1042
|
)),
|
|
1043
1043
|
o && /* @__PURE__ */ t.jsx(
|
|
1044
1044
|
$t,
|
|
@@ -1046,7 +1046,7 @@ const ti = (d) => {
|
|
|
1046
1046
|
ref: T,
|
|
1047
1047
|
activeButton: o,
|
|
1048
1048
|
setActiveButton: u,
|
|
1049
|
-
popupPosition:
|
|
1049
|
+
popupPosition: f,
|
|
1050
1050
|
editableLink: m
|
|
1051
1051
|
}
|
|
1052
1052
|
),
|
|
@@ -1059,16 +1059,16 @@ const ti = (d) => {
|
|
|
1059
1059
|
justifyContent: "center"
|
|
1060
1060
|
},
|
|
1061
1061
|
children: /* @__PURE__ */ t.jsx(
|
|
1062
|
-
|
|
1062
|
+
ot,
|
|
1063
1063
|
{
|
|
1064
1064
|
withoutHover: !0,
|
|
1065
1065
|
className: Q.button,
|
|
1066
1066
|
size: "s",
|
|
1067
1067
|
onClick: () => {
|
|
1068
|
-
const
|
|
1069
|
-
m ?
|
|
1068
|
+
const x = [...n];
|
|
1069
|
+
m ? x.push({
|
|
1070
1070
|
type: "Primary",
|
|
1071
|
-
id:
|
|
1071
|
+
id: nt(),
|
|
1072
1072
|
typesText: [],
|
|
1073
1073
|
text: {
|
|
1074
1074
|
"en-US": "Button Name"
|
|
@@ -1076,9 +1076,9 @@ const ti = (d) => {
|
|
|
1076
1076
|
destination: "Go to Page",
|
|
1077
1077
|
page: h ? Object.values(h)[0].name : "Home",
|
|
1078
1078
|
openInNewTab: !1
|
|
1079
|
-
}) :
|
|
1079
|
+
}) : x.push({
|
|
1080
1080
|
type: "Primary",
|
|
1081
|
-
id:
|
|
1081
|
+
id: nt(),
|
|
1082
1082
|
typesText: [],
|
|
1083
1083
|
text: {
|
|
1084
1084
|
"en-US": "Create Ticket"
|
|
@@ -1086,7 +1086,7 @@ const ti = (d) => {
|
|
|
1086
1086
|
destination: "Go to Page",
|
|
1087
1087
|
page: h ? Object.values(h)[0].name : "Home",
|
|
1088
1088
|
openInNewTab: !1
|
|
1089
|
-
}), e(
|
|
1089
|
+
}), e(x);
|
|
1090
1090
|
},
|
|
1091
1091
|
style: {
|
|
1092
1092
|
width: "fit-content"
|
|
@@ -1121,7 +1121,7 @@ const ti = (d) => {
|
|
|
1121
1121
|
/* @__PURE__ */ t.jsxs("div", { className: rt.top, children: [
|
|
1122
1122
|
/* @__PURE__ */ t.jsx("h3", { className: rt.title, children: "Buttons" }),
|
|
1123
1123
|
/* @__PURE__ */ t.jsx(
|
|
1124
|
-
|
|
1124
|
+
it,
|
|
1125
1125
|
{
|
|
1126
1126
|
current: n,
|
|
1127
1127
|
onChange: (u) => e(u)
|
|
@@ -1141,9 +1141,9 @@ const ti = (d) => {
|
|
|
1141
1141
|
] }) });
|
|
1142
1142
|
};
|
|
1143
1143
|
function hs(d) {
|
|
1144
|
-
const { product: n, children: e } = d, { attributes: s, listeners: i, setNodeRef: m, transform: h, transition: o, isDragging: u } =
|
|
1144
|
+
const { product: n, children: e } = d, { attributes: s, listeners: i, setNodeRef: m, transform: h, transition: o, isDragging: u } = xt({
|
|
1145
1145
|
id: String(n.listingId)
|
|
1146
|
-
}),
|
|
1146
|
+
}), f = {
|
|
1147
1147
|
transform: bt.Transform.toString(h),
|
|
1148
1148
|
transition: o
|
|
1149
1149
|
};
|
|
@@ -1151,8 +1151,8 @@ function hs(d) {
|
|
|
1151
1151
|
"div",
|
|
1152
1152
|
{
|
|
1153
1153
|
ref: m,
|
|
1154
|
-
style:
|
|
1155
|
-
className: `${
|
|
1154
|
+
style: f,
|
|
1155
|
+
className: `${Y.product} ${u ? Y.dragging : ""}`,
|
|
1156
1156
|
...s,
|
|
1157
1157
|
...i,
|
|
1158
1158
|
children: e
|
|
@@ -1169,13 +1169,13 @@ const si = (d) => {
|
|
|
1169
1169
|
title: h,
|
|
1170
1170
|
subtitle: o,
|
|
1171
1171
|
editable: u = !0,
|
|
1172
|
-
draggable:
|
|
1172
|
+
draggable: f = !1,
|
|
1173
1173
|
withImage: $ = !1,
|
|
1174
1174
|
deletable: l = !0,
|
|
1175
1175
|
addable: r = !0,
|
|
1176
1176
|
itemsType: T,
|
|
1177
1177
|
itemsOptions: w
|
|
1178
|
-
} = d, [C,
|
|
1178
|
+
} = d, [C, x] = _.useState(
|
|
1179
1179
|
null
|
|
1180
1180
|
), [B, a] = _.useState({
|
|
1181
1181
|
top: 0,
|
|
@@ -1189,10 +1189,10 @@ const si = (d) => {
|
|
|
1189
1189
|
);
|
|
1190
1190
|
_.useEffect(() => {
|
|
1191
1191
|
const c = () => {
|
|
1192
|
-
|
|
1192
|
+
x(null), q(!1);
|
|
1193
1193
|
};
|
|
1194
|
-
return document.body.addEventListener("click", c),
|
|
1195
|
-
|
|
1194
|
+
return document.body.addEventListener("click", c), x(null), q(!1), () => {
|
|
1195
|
+
x(null), q(!1), document.body.removeEventListener("click", c);
|
|
1196
1196
|
};
|
|
1197
1197
|
}, []), _.useEffect(() => {
|
|
1198
1198
|
if (C) {
|
|
@@ -1200,14 +1200,14 @@ const si = (d) => {
|
|
|
1200
1200
|
i(c);
|
|
1201
1201
|
}
|
|
1202
1202
|
}, [C]);
|
|
1203
|
-
const
|
|
1203
|
+
const D = (c, v) => {
|
|
1204
1204
|
c.stopPropagation();
|
|
1205
|
-
const I = c.target.getBoundingClientRect(),
|
|
1206
|
-
let
|
|
1207
|
-
|
|
1208
|
-
top:
|
|
1205
|
+
const I = c.target.getBoundingClientRect(), U = 100, P = window.innerHeight;
|
|
1206
|
+
let L = I.top + window.scrollY;
|
|
1207
|
+
L + U > P && (L = P - U - 20), q(!0), a({
|
|
1208
|
+
top: L - 80,
|
|
1209
1209
|
left: I.left - 30
|
|
1210
|
-
}),
|
|
1210
|
+
}), x(v);
|
|
1211
1211
|
};
|
|
1212
1212
|
function S(c) {
|
|
1213
1213
|
if ($)
|
|
@@ -1232,17 +1232,17 @@ const si = (d) => {
|
|
|
1232
1232
|
const j = (c) => {
|
|
1233
1233
|
const { active: v, over: I } = c;
|
|
1234
1234
|
if (I && v.id !== I.id) {
|
|
1235
|
-
const
|
|
1236
|
-
if (
|
|
1237
|
-
const
|
|
1238
|
-
|
|
1235
|
+
const U = s.findIndex((L) => String(L.listingId) === v.id), P = s.findIndex((L) => String(L.listingId) === I.id);
|
|
1236
|
+
if (U !== -1 && P !== -1) {
|
|
1237
|
+
const L = [...s], [K] = L.splice(U, 1);
|
|
1238
|
+
L.splice(P, 0, K), i(L);
|
|
1239
1239
|
}
|
|
1240
1240
|
}
|
|
1241
1241
|
}, N = (c, v) => {
|
|
1242
1242
|
const I = w.find((P) => c.listingId === P.id);
|
|
1243
1243
|
if (!I) return null;
|
|
1244
|
-
const
|
|
1245
|
-
|
|
1244
|
+
const U = /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
1245
|
+
f && /* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
|
|
1246
1246
|
g,
|
|
1247
1247
|
{
|
|
1248
1248
|
name: "DotsSixVertical",
|
|
@@ -1255,17 +1255,17 @@ const si = (d) => {
|
|
|
1255
1255
|
at,
|
|
1256
1256
|
{
|
|
1257
1257
|
onChange: (P) => {
|
|
1258
|
-
const
|
|
1258
|
+
const L = [...s], K = w.find((A) => A.productData.name === P);
|
|
1259
1259
|
if (!K) return;
|
|
1260
|
-
const
|
|
1260
|
+
const et = {
|
|
1261
1261
|
listingId: K.id,
|
|
1262
1262
|
image: K.productData.images.length > 0 ? K.productData.images[0].cfId : ""
|
|
1263
|
-
}, p =
|
|
1264
|
-
|
|
1263
|
+
}, p = L.map((A) => A.listingId === c.listingId ? et : A);
|
|
1264
|
+
x(et), i([...p]);
|
|
1265
1265
|
},
|
|
1266
1266
|
value: I.productData.name,
|
|
1267
1267
|
options: [
|
|
1268
|
-
...w.filter((P) => !s.find((
|
|
1268
|
+
...w.filter((P) => !s.find((L) => L.listingId === P.id)).map((P) => P.productData.name)
|
|
1269
1269
|
],
|
|
1270
1270
|
leftAddon: S(
|
|
1271
1271
|
c.image || I.productData.images.length > 0 && I.productData.images[0].cfId || ""
|
|
@@ -1273,18 +1273,18 @@ const si = (d) => {
|
|
|
1273
1273
|
},
|
|
1274
1274
|
v
|
|
1275
1275
|
),
|
|
1276
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
1277
|
-
u && /* @__PURE__ */ t.jsx("div", { className:
|
|
1276
|
+
/* @__PURE__ */ t.jsxs("div", { className: Y.buttons, children: [
|
|
1277
|
+
u && /* @__PURE__ */ t.jsx("div", { className: Y.deleteButton, children: /* @__PURE__ */ t.jsx(
|
|
1278
1278
|
g,
|
|
1279
1279
|
{
|
|
1280
1280
|
name: "Sliders",
|
|
1281
1281
|
hoverable: !0,
|
|
1282
1282
|
width: 20,
|
|
1283
1283
|
height: 20,
|
|
1284
|
-
onClick: (P) =>
|
|
1284
|
+
onClick: (P) => D(P, c)
|
|
1285
1285
|
}
|
|
1286
1286
|
) }),
|
|
1287
|
-
l && /* @__PURE__ */ t.jsx("div", { className:
|
|
1287
|
+
l && /* @__PURE__ */ t.jsx("div", { className: Y.deleteButton, children: /* @__PURE__ */ t.jsx(
|
|
1288
1288
|
g,
|
|
1289
1289
|
{
|
|
1290
1290
|
name: "Trash",
|
|
@@ -1297,27 +1297,27 @@ const si = (d) => {
|
|
|
1297
1297
|
) })
|
|
1298
1298
|
] })
|
|
1299
1299
|
] });
|
|
1300
|
-
return
|
|
1300
|
+
return f ? /* @__PURE__ */ t.jsx(
|
|
1301
1301
|
hs,
|
|
1302
1302
|
{
|
|
1303
1303
|
product: c,
|
|
1304
|
-
children:
|
|
1304
|
+
children: U
|
|
1305
1305
|
},
|
|
1306
1306
|
c.listingId
|
|
1307
1307
|
) : /* @__PURE__ */ t.jsx(
|
|
1308
1308
|
"div",
|
|
1309
1309
|
{
|
|
1310
|
-
className:
|
|
1311
|
-
children:
|
|
1310
|
+
className: Y.product,
|
|
1311
|
+
children: U
|
|
1312
1312
|
},
|
|
1313
1313
|
c.listingId
|
|
1314
1314
|
);
|
|
1315
1315
|
}, O = _.useRef(null);
|
|
1316
|
-
return /* @__PURE__ */ t.jsxs("div", { className:
|
|
1317
|
-
(h || n !== void 0) && /* @__PURE__ */ t.jsxs("div", { className:
|
|
1318
|
-
h && /* @__PURE__ */ t.jsx("h3", { className:
|
|
1316
|
+
return /* @__PURE__ */ t.jsxs("div", { className: Y.productsBlock, children: [
|
|
1317
|
+
(h || n !== void 0) && /* @__PURE__ */ t.jsxs("div", { className: Y.top, children: [
|
|
1318
|
+
h && /* @__PURE__ */ t.jsx("h3", { className: Y.title, children: h }),
|
|
1319
1319
|
n !== void 0 && /* @__PURE__ */ t.jsx(
|
|
1320
|
-
|
|
1320
|
+
it,
|
|
1321
1321
|
{
|
|
1322
1322
|
current: n,
|
|
1323
1323
|
onChange: (c) => e == null ? void 0 : e(c)
|
|
@@ -1329,15 +1329,15 @@ const si = (d) => {
|
|
|
1329
1329
|
{
|
|
1330
1330
|
ref: O,
|
|
1331
1331
|
activeItem: C,
|
|
1332
|
-
setActiveItem:
|
|
1332
|
+
setActiveItem: x,
|
|
1333
1333
|
setIsOpenModal: q,
|
|
1334
1334
|
popupPosition: B,
|
|
1335
1335
|
itemsOptions: w
|
|
1336
1336
|
}
|
|
1337
1337
|
),
|
|
1338
|
-
n && /* @__PURE__ */ t.jsxs("div", { className:
|
|
1339
|
-
o && /* @__PURE__ */ t.jsx("h5", { className:
|
|
1340
|
-
|
|
1338
|
+
n && /* @__PURE__ */ t.jsxs("div", { className: Y.products, children: [
|
|
1339
|
+
o && /* @__PURE__ */ t.jsx("h5", { className: Y.subtitle, children: o }),
|
|
1340
|
+
f ? /* @__PURE__ */ t.jsx(
|
|
1341
1341
|
_t,
|
|
1342
1342
|
{
|
|
1343
1343
|
sensors: M,
|
|
@@ -1346,7 +1346,7 @@ const si = (d) => {
|
|
|
1346
1346
|
gt,
|
|
1347
1347
|
{
|
|
1348
1348
|
items: s.map((c) => String(c.listingId)),
|
|
1349
|
-
strategy:
|
|
1349
|
+
strategy: ft,
|
|
1350
1350
|
children: s.map((c, v) => N(c, v))
|
|
1351
1351
|
}
|
|
1352
1352
|
)
|
|
@@ -1361,10 +1361,10 @@ const si = (d) => {
|
|
|
1361
1361
|
justifyContent: "center"
|
|
1362
1362
|
},
|
|
1363
1363
|
children: /* @__PURE__ */ t.jsx(
|
|
1364
|
-
|
|
1364
|
+
ot,
|
|
1365
1365
|
{
|
|
1366
1366
|
withoutHover: !0,
|
|
1367
|
-
className:
|
|
1367
|
+
className: Y.button,
|
|
1368
1368
|
size: "s",
|
|
1369
1369
|
onClick: () => {
|
|
1370
1370
|
const c = [...s];
|
|
@@ -1382,7 +1382,7 @@ const si = (d) => {
|
|
|
1382
1382
|
style: {
|
|
1383
1383
|
width: "fit-content"
|
|
1384
1384
|
},
|
|
1385
|
-
children: /* @__PURE__ */ t.jsxs("div", { className:
|
|
1385
|
+
children: /* @__PURE__ */ t.jsxs("div", { className: Y.addButton, children: [
|
|
1386
1386
|
/* @__PURE__ */ t.jsx("span", { children: "Add Option" }),
|
|
1387
1387
|
/* @__PURE__ */ t.jsx(
|
|
1388
1388
|
g,
|
|
@@ -1400,12 +1400,12 @@ const si = (d) => {
|
|
|
1400
1400
|
] }),
|
|
1401
1401
|
n && m !== void 0 && /* @__PURE__ */ t.jsx(ut, { items: m })
|
|
1402
1402
|
] });
|
|
1403
|
-
}, ps = "_options_6cemk_1", _s = "_price_6cemk_12", gs = "_oldPrice_6cemk_19",
|
|
1403
|
+
}, ps = "_options_6cemk_1", _s = "_price_6cemk_12", gs = "_oldPrice_6cemk_19", fs = "_newPrice_6cemk_27", xs = "_animate_6cemk_34", bs = "_appearAndBounce_6cemk_1", js = "_meta_6cemk_52", vs = "_info_6cemk_58", ys = "_infoRight_6cemk_66", Ns = "_buttons_6cemk_73", ks = "_variants_6cemk_80", Is = "_variant_6cemk_80", Cs = "_stock_6cemk_98", Ss = "_variantInfo_6cemk_105", ws = "_quantity_6cemk_111", Bs = "_count_6cemk_118", $s = "_focused_6cemk_135", Ps = "_button_6cemk_73", Ms = "_activeVariant_6cemk_161", Ts = "_chargeTypes_6cemk_165", qs = "_charge_6cemk_165", As = "_chargeActive_6cemk_190", Os = "_title_6cemk_198", k = {
|
|
1404
1404
|
options: ps,
|
|
1405
1405
|
price: _s,
|
|
1406
1406
|
oldPrice: gs,
|
|
1407
|
-
newPrice:
|
|
1408
|
-
animate:
|
|
1407
|
+
newPrice: fs,
|
|
1408
|
+
animate: xs,
|
|
1409
1409
|
appearAndBounce: bs,
|
|
1410
1410
|
meta: js,
|
|
1411
1411
|
info: vs,
|
|
@@ -1427,8 +1427,8 @@ const si = (d) => {
|
|
|
1427
1427
|
};
|
|
1428
1428
|
var It = /* @__PURE__ */ ((d) => (d.ONE_TIME = "One-Time", d.RECURRING = "Subscribe & Save", d))(It || {});
|
|
1429
1429
|
const ni = (d) => {
|
|
1430
|
-
var
|
|
1431
|
-
const { variants: n } = d, [e, s] = _.useState(n[0]), [i, m] = _.useState(e.chargeTypes[0]), h = lt(), [o, u] = _.useState(1), { reset:
|
|
1430
|
+
var x, B;
|
|
1431
|
+
const { variants: n } = d, [e, s] = _.useState(n[0]), [i, m] = _.useState(e.chargeTypes[0]), h = lt(), [o, u] = _.useState(1), { reset: f, addProductToCart: $ } = jt(), [l, r] = _.useState(!1);
|
|
1432
1432
|
_.useEffect(() => {
|
|
1433
1433
|
r(!0);
|
|
1434
1434
|
const a = setTimeout(() => r(!1), 600);
|
|
@@ -1442,7 +1442,7 @@ const ni = (d) => {
|
|
|
1442
1442
|
});
|
|
1443
1443
|
}
|
|
1444
1444
|
function w() {
|
|
1445
|
-
|
|
1445
|
+
f(), T(), h("/checkout");
|
|
1446
1446
|
}
|
|
1447
1447
|
function C(a) {
|
|
1448
1448
|
if (a >= 864e5) {
|
|
@@ -1465,7 +1465,7 @@ const ni = (d) => {
|
|
|
1465
1465
|
e.chargeTypes.length > 1 && /* @__PURE__ */ t.jsx("div", { className: k.chargeTypes, children: e.chargeTypes.map((a) => /* @__PURE__ */ t.jsx(
|
|
1466
1466
|
"div",
|
|
1467
1467
|
{
|
|
1468
|
-
className:
|
|
1468
|
+
className: G(k.charge, {
|
|
1469
1469
|
[k.chargeActive]: i === a
|
|
1470
1470
|
}),
|
|
1471
1471
|
onClick: () => m(a),
|
|
@@ -1478,7 +1478,7 @@ const ni = (d) => {
|
|
|
1478
1478
|
return /* @__PURE__ */ t.jsxs(
|
|
1479
1479
|
"div",
|
|
1480
1480
|
{
|
|
1481
|
-
className:
|
|
1481
|
+
className: G(k.variant, {
|
|
1482
1482
|
[k.activeVariant]: e.id === a.id
|
|
1483
1483
|
}),
|
|
1484
1484
|
onClick: () => s(a),
|
|
@@ -1501,7 +1501,7 @@ const ni = (d) => {
|
|
|
1501
1501
|
}) }),
|
|
1502
1502
|
i === "ONE_TIME" && /* @__PURE__ */ t.jsxs("div", { className: k.quantity, children: [
|
|
1503
1503
|
/* @__PURE__ */ t.jsx(
|
|
1504
|
-
|
|
1504
|
+
H,
|
|
1505
1505
|
{
|
|
1506
1506
|
type: "Secondary",
|
|
1507
1507
|
onClick: () => {
|
|
@@ -1518,14 +1518,14 @@ const ni = (d) => {
|
|
|
1518
1518
|
type: "number",
|
|
1519
1519
|
value: String(o),
|
|
1520
1520
|
onChange: (a) => u(Number(a)),
|
|
1521
|
-
max: ((
|
|
1521
|
+
max: ((x = e.quantity.restrictions) == null ? void 0 : x.max) || e.quantity.available || 1 / 0,
|
|
1522
1522
|
min: ((B = e.quantity.restrictions) == null ? void 0 : B.min) || 0,
|
|
1523
1523
|
centered: !0,
|
|
1524
1524
|
disabled: e.quantity.available === 0 || !e.quantity.available || Object.keys(e.quantity.restrictions || {}).length === 0 && !e.quantity.available
|
|
1525
1525
|
}
|
|
1526
1526
|
),
|
|
1527
1527
|
/* @__PURE__ */ t.jsx(
|
|
1528
|
-
|
|
1528
|
+
H,
|
|
1529
1529
|
{
|
|
1530
1530
|
type: "Secondary",
|
|
1531
1531
|
onClick: () => {
|
|
@@ -1556,7 +1556,7 @@ const ni = (d) => {
|
|
|
1556
1556
|
/* @__PURE__ */ t.jsxs("div", { className: k.info, children: [
|
|
1557
1557
|
/* @__PURE__ */ t.jsx("span", { children: "Price" }),
|
|
1558
1558
|
/* @__PURE__ */ t.jsx("div", { className: k.infoRight, children: i === "ONE_TIME" ? e.compareAtPrice && (e.compareAtPrice.amount || 0) - (e.price.amount || 0) > 0 ? /* @__PURE__ */ t.jsxs("div", { className: k.price, children: [
|
|
1559
|
-
/* @__PURE__ */ t.jsxs("span", { className:
|
|
1559
|
+
/* @__PURE__ */ t.jsxs("span", { className: G(k.newPrice, { [k.animate]: l }), children: [
|
|
1560
1560
|
"$ ",
|
|
1561
1561
|
(e.price.amount || 0) * o
|
|
1562
1562
|
] }),
|
|
@@ -1564,11 +1564,11 @@ const ni = (d) => {
|
|
|
1564
1564
|
"$ ",
|
|
1565
1565
|
(e.compareAtPrice.amount || 0) * o
|
|
1566
1566
|
] })
|
|
1567
|
-
] }) : /* @__PURE__ */ t.jsxs("span", { className:
|
|
1567
|
+
] }) : /* @__PURE__ */ t.jsxs("span", { className: G(k.newPrice, { [k.animate]: l }), children: [
|
|
1568
1568
|
"$ ",
|
|
1569
1569
|
(e.price.amount || 0) * o
|
|
1570
1570
|
] }) : e.subscriptionSettings && e.subscriptionSettings.compareAtPrice && (e.subscriptionSettings.compareAtPrice.amount || 0) - (e.subscriptionSettings.price.amount || 0) > 0 ? /* @__PURE__ */ t.jsxs("div", { className: k.price, children: [
|
|
1571
|
-
/* @__PURE__ */ t.jsxs("span", { className:
|
|
1571
|
+
/* @__PURE__ */ t.jsxs("span", { className: G(k.newPrice, { [k.animate]: l }), children: [
|
|
1572
1572
|
"$ ",
|
|
1573
1573
|
e.subscriptionSettings.price.amount || 0
|
|
1574
1574
|
] }),
|
|
@@ -1576,7 +1576,7 @@ const ni = (d) => {
|
|
|
1576
1576
|
"$ ",
|
|
1577
1577
|
e.subscriptionSettings.compareAtPrice.amount || 0
|
|
1578
1578
|
] })
|
|
1579
|
-
] }) : e.subscriptionSettings && /* @__PURE__ */ t.jsxs("span", { className:
|
|
1579
|
+
] }) : e.subscriptionSettings && /* @__PURE__ */ t.jsxs("span", { className: G(k.newPrice, { [k.animate]: l }), children: [
|
|
1580
1580
|
"$ ",
|
|
1581
1581
|
e.subscriptionSettings.price.amount || 0
|
|
1582
1582
|
] }) })
|
|
@@ -1584,7 +1584,7 @@ const ni = (d) => {
|
|
|
1584
1584
|
] }),
|
|
1585
1585
|
/* @__PURE__ */ t.jsxs("div", { className: k.buttons, children: [
|
|
1586
1586
|
/* @__PURE__ */ t.jsx(
|
|
1587
|
-
|
|
1587
|
+
H,
|
|
1588
1588
|
{
|
|
1589
1589
|
type: "Primary",
|
|
1590
1590
|
onClick: () => w(),
|
|
@@ -1593,7 +1593,7 @@ const ni = (d) => {
|
|
|
1593
1593
|
}
|
|
1594
1594
|
),
|
|
1595
1595
|
i === "ONE_TIME" && /* @__PURE__ */ t.jsx(
|
|
1596
|
-
|
|
1596
|
+
H,
|
|
1597
1597
|
{
|
|
1598
1598
|
type: "Secondary",
|
|
1599
1599
|
onClick: () => T(),
|
|
@@ -1603,18 +1603,18 @@ const ni = (d) => {
|
|
|
1603
1603
|
)
|
|
1604
1604
|
] })
|
|
1605
1605
|
] });
|
|
1606
|
-
}, Es = "_button_1tdo3_1",
|
|
1606
|
+
}, Es = "_button_1tdo3_1", Rs = "_login_1tdo3_14", Ls = "_signUp_1tdo3_18", Ds = "_buttons_1tdo3_23", Hs = "_modal_1tdo3_32", Us = "_closing_1tdo3_64", zs = "_info_1tdo3_113", Fs = "_top_1tdo3_120", Vs = "_title_1tdo3_131", Ys = "_clear_1tdo3_138", Gs = "_activeClear_1tdo3_145", Ws = "_count_1tdo3_149", Js = "_cart_1tdo3_164", Xs = "_empty_1tdo3_172", Qs = "_product_1tdo3_198", Ks = "_products_1tdo3_207", Zs = "_image_1tdo3_215", tn = "_productInfo_1tdo3_221", en = "_content_1tdo3_228", sn = "_name_1tdo3_234", nn = "_price_1tdo3_240", on = "_productButtons_1tdo3_246", an = "_productButton_1tdo3_246", cn = "_productCount_1tdo3_266", ln = "_bottom_1tdo3_282", rn = "_subtotal_1tdo3_290", dn = "_block_1tdo3_298", un = "_shoppingCount_1tdo3_305", mn = "_total_1tdo3_325", hn = "_link_1tdo3_331", pn = "_userInfo_1tdo3_338", _n = "_pagesMobileModal_1tdo3_349", gn = "_pagesMobileModalContent_1tdo3_363", fn = "_pagesMobileModalHeader_1tdo3_369", xn = "_pagesMobileModalFooter_1tdo3_379", y = {
|
|
1607
1607
|
button: Es,
|
|
1608
|
-
login:
|
|
1609
|
-
signUp:
|
|
1610
|
-
buttons:
|
|
1611
|
-
modal:
|
|
1608
|
+
login: Rs,
|
|
1609
|
+
signUp: Ls,
|
|
1610
|
+
buttons: Ds,
|
|
1611
|
+
modal: Hs,
|
|
1612
1612
|
"slide-in-fade": "_slide-in-fade_1tdo3_1",
|
|
1613
1613
|
"mobile-slide-in-fade": "_mobile-slide-in-fade_1tdo3_1",
|
|
1614
|
-
closing:
|
|
1614
|
+
closing: Us,
|
|
1615
1615
|
"mobile-slide-out-fade": "_mobile-slide-out-fade_1tdo3_1",
|
|
1616
1616
|
"slide-out-fade": "_slide-out-fade_1tdo3_1",
|
|
1617
|
-
info:
|
|
1617
|
+
info: zs,
|
|
1618
1618
|
top: Fs,
|
|
1619
1619
|
title: Vs,
|
|
1620
1620
|
clear: Ys,
|
|
@@ -1641,8 +1641,8 @@ const ni = (d) => {
|
|
|
1641
1641
|
userInfo: pn,
|
|
1642
1642
|
pagesMobileModal: _n,
|
|
1643
1643
|
pagesMobileModalContent: gn,
|
|
1644
|
-
pagesMobileModalHeader:
|
|
1645
|
-
pagesMobileModalFooter:
|
|
1644
|
+
pagesMobileModalHeader: fn,
|
|
1645
|
+
pagesMobileModalFooter: xn
|
|
1646
1646
|
}, ii = (d) => {
|
|
1647
1647
|
const { shopping: n, signUp: e, isShowUserInfo: s = !0 } = d;
|
|
1648
1648
|
return /* @__PURE__ */ t.jsxs("div", { className: y.buttons, children: [
|
|
@@ -1651,21 +1651,21 @@ const ni = (d) => {
|
|
|
1651
1651
|
] });
|
|
1652
1652
|
}, bn = () => {
|
|
1653
1653
|
const [d, n] = _.useState(!1), [e, s] = _.useState([]), { cart: i } = jt();
|
|
1654
|
-
function m(
|
|
1654
|
+
function m(f) {
|
|
1655
1655
|
var $;
|
|
1656
|
-
return !
|
|
1656
|
+
return !f || !(f != null && f.variants) ? !1 : ($ = f.variants.find((l) => l.id === f.activeVariantId)) == null ? void 0 : $.subscriptionSettings;
|
|
1657
1657
|
}
|
|
1658
1658
|
const h = i.parts.length > 0 && e.length > 0 && !m(e[0]), [o, u] = _.useState(!1);
|
|
1659
1659
|
return /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
1660
1660
|
/* @__PURE__ */ t.jsxs(
|
|
1661
|
-
|
|
1661
|
+
H,
|
|
1662
1662
|
{
|
|
1663
1663
|
type: "Secondary",
|
|
1664
1664
|
style: {
|
|
1665
1665
|
padding: 10
|
|
1666
1666
|
},
|
|
1667
|
-
onClick: (
|
|
1668
|
-
|
|
1667
|
+
onClick: (f) => {
|
|
1668
|
+
f.stopPropagation(), window.location.pathname.includes("/admin/builder") || (n(!0), u(!0));
|
|
1669
1669
|
},
|
|
1670
1670
|
children: [
|
|
1671
1671
|
/* @__PURE__ */ t.jsx(
|
|
@@ -1701,7 +1701,7 @@ const ni = (d) => {
|
|
|
1701
1701
|
] });
|
|
1702
1702
|
}, jn = (d) => {
|
|
1703
1703
|
const { activeProducts: n, isCartNotEmpty: e, isOpen: s } = d, { cart: i, reset: m, getTotalAndDiscount: h, updateQuantityOfProduct: o } = jt(), u = lt();
|
|
1704
|
-
function
|
|
1704
|
+
function f(r) {
|
|
1705
1705
|
u(r);
|
|
1706
1706
|
}
|
|
1707
1707
|
function $(r) {
|
|
@@ -1721,7 +1721,7 @@ const ni = (d) => {
|
|
|
1721
1721
|
return /* @__PURE__ */ t.jsxs(
|
|
1722
1722
|
"div",
|
|
1723
1723
|
{
|
|
1724
|
-
className:
|
|
1724
|
+
className: G(y.modal, {
|
|
1725
1725
|
[y.closing]: !s
|
|
1726
1726
|
}),
|
|
1727
1727
|
onClick: (r) => r.stopPropagation(),
|
|
@@ -1734,7 +1734,7 @@ const ni = (d) => {
|
|
|
1734
1734
|
/* @__PURE__ */ t.jsx(
|
|
1735
1735
|
"button",
|
|
1736
1736
|
{
|
|
1737
|
-
className:
|
|
1737
|
+
className: G(y.clear, {
|
|
1738
1738
|
[y.activeClear]: e
|
|
1739
1739
|
}),
|
|
1740
1740
|
disabled: !e,
|
|
@@ -1828,7 +1828,7 @@ const ni = (d) => {
|
|
|
1828
1828
|
h().total
|
|
1829
1829
|
] })
|
|
1830
1830
|
] }),
|
|
1831
|
-
/* @__PURE__ */ t.jsx(
|
|
1831
|
+
/* @__PURE__ */ t.jsx(H, { onClick: () => f("/checkout"), children: "Checkout" })
|
|
1832
1832
|
] })
|
|
1833
1833
|
] }) : /* @__PURE__ */ t.jsx(vn, {})
|
|
1834
1834
|
]
|
|
@@ -1863,7 +1863,7 @@ const ni = (d) => {
|
|
|
1863
1863
|
if (!s)
|
|
1864
1864
|
return /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
1865
1865
|
/* @__PURE__ */ t.jsx(
|
|
1866
|
-
|
|
1866
|
+
H,
|
|
1867
1867
|
{
|
|
1868
1868
|
onClick: () => {
|
|
1869
1869
|
m("/customer-dash"), n == null || n();
|
|
@@ -1876,7 +1876,7 @@ const ni = (d) => {
|
|
|
1876
1876
|
}
|
|
1877
1877
|
),
|
|
1878
1878
|
d && /* @__PURE__ */ t.jsx(
|
|
1879
|
-
|
|
1879
|
+
H,
|
|
1880
1880
|
{
|
|
1881
1881
|
onClick: () => {
|
|
1882
1882
|
m("/customer-dash"), n == null || n();
|
|
@@ -1893,8 +1893,8 @@ const ni = (d) => {
|
|
|
1893
1893
|
const [h, o] = _.useState("test-email@gmail.com");
|
|
1894
1894
|
return _.useEffect(() => {
|
|
1895
1895
|
(async () => {
|
|
1896
|
-
const
|
|
1897
|
-
o(
|
|
1896
|
+
const f = Tt(s);
|
|
1897
|
+
o(f.email);
|
|
1898
1898
|
})();
|
|
1899
1899
|
}, [s]), /* @__PURE__ */ t.jsx(
|
|
1900
1900
|
"div",
|
|
@@ -1926,7 +1926,7 @@ const ni = (d) => {
|
|
|
1926
1926
|
/* @__PURE__ */ t.jsxs("div", { className: y.pagesMobileModalHeader, children: [
|
|
1927
1927
|
/* @__PURE__ */ t.jsx("div", { children: n }),
|
|
1928
1928
|
/* @__PURE__ */ t.jsx(
|
|
1929
|
-
|
|
1929
|
+
H,
|
|
1930
1930
|
{
|
|
1931
1931
|
type: "Secondary",
|
|
1932
1932
|
onClick: m,
|
|
@@ -1972,7 +1972,7 @@ const ni = (d) => {
|
|
|
1972
1972
|
}, Nn = (d) => {
|
|
1973
1973
|
const { setIsOpenModal: n } = d;
|
|
1974
1974
|
return /* @__PURE__ */ t.jsx(
|
|
1975
|
-
|
|
1975
|
+
H,
|
|
1976
1976
|
{
|
|
1977
1977
|
type: "Secondary",
|
|
1978
1978
|
style: {
|
|
@@ -1990,7 +1990,7 @@ const ni = (d) => {
|
|
|
1990
1990
|
)
|
|
1991
1991
|
}
|
|
1992
1992
|
);
|
|
1993
|
-
}, kn = "
|
|
1993
|
+
}, kn = "_share_10urc_1", In = "_modal_10urc_9", Cn = "_header_10urc_21", Sn = "_socials_10urc_31", wn = "_social_10urc_31", Bn = "_copy_10urc_41", $n = "_title_10urc_48", Pn = "_copyWrapper_10urc_54", Mn = "_copyText_10urc_63", Tn = "_copyTextMobile_10urc_76", qn = "_copyTextMiniMobile_10urc_95", Z = {
|
|
1994
1994
|
share: kn,
|
|
1995
1995
|
modal: In,
|
|
1996
1996
|
header: Cn,
|
|
@@ -2009,7 +2009,7 @@ const ni = (d) => {
|
|
|
2009
2009
|
}
|
|
2010
2010
|
return /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
2011
2011
|
/* @__PURE__ */ t.jsx(
|
|
2012
|
-
|
|
2012
|
+
H,
|
|
2013
2013
|
{
|
|
2014
2014
|
className: Z.share,
|
|
2015
2015
|
onClick: (s) => {
|
|
@@ -2041,8 +2041,8 @@ const ni = (d) => {
|
|
|
2041
2041
|
d(!1), s(!0);
|
|
2042
2042
|
}, 300);
|
|
2043
2043
|
}
|
|
2044
|
-
function o(u,
|
|
2045
|
-
return u.length >
|
|
2044
|
+
function o(u, f) {
|
|
2045
|
+
return u.length > f ? u.slice(0, f) + "..." : u;
|
|
2046
2046
|
}
|
|
2047
2047
|
return /* @__PURE__ */ t.jsxs(
|
|
2048
2048
|
"div",
|
|
@@ -2064,7 +2064,7 @@ const ni = (d) => {
|
|
|
2064
2064
|
] }),
|
|
2065
2065
|
/* @__PURE__ */ t.jsxs("div", { className: Z.copyWrapper, children: [
|
|
2066
2066
|
/* @__PURE__ */ t.jsxs(
|
|
2067
|
-
|
|
2067
|
+
H,
|
|
2068
2068
|
{
|
|
2069
2069
|
type: "Secondary",
|
|
2070
2070
|
onClick: m,
|
|
@@ -2079,7 +2079,7 @@ const ni = (d) => {
|
|
|
2079
2079
|
}
|
|
2080
2080
|
),
|
|
2081
2081
|
/* @__PURE__ */ t.jsx(
|
|
2082
|
-
|
|
2082
|
+
H,
|
|
2083
2083
|
{
|
|
2084
2084
|
type: "Secondary",
|
|
2085
2085
|
onClick: m,
|
|
@@ -2090,27 +2090,27 @@ const ni = (d) => {
|
|
|
2090
2090
|
]
|
|
2091
2091
|
}
|
|
2092
2092
|
);
|
|
2093
|
-
}, On = "_accordion_1s1lq_1", En = "_header_1s1lq_9",
|
|
2093
|
+
}, On = "_accordion_1s1lq_1", En = "_header_1s1lq_9", Rn = "_icon_1s1lq_18", Ln = "_open_1s1lq_21", Dn = "_content_1s1lq_25", st = {
|
|
2094
2094
|
accordion: On,
|
|
2095
2095
|
header: En,
|
|
2096
|
-
icon:
|
|
2097
|
-
open:
|
|
2098
|
-
content:
|
|
2096
|
+
icon: Rn,
|
|
2097
|
+
open: Ln,
|
|
2098
|
+
content: Dn
|
|
2099
2099
|
}, ci = ({ title: d, content: n, defaultOpen: e = !1 }) => {
|
|
2100
2100
|
const [s, i] = _.useState(e), [m, h] = _.useState(0), o = _.useRef(null), u = () => {
|
|
2101
2101
|
i(!s);
|
|
2102
2102
|
};
|
|
2103
2103
|
return _.useEffect(() => {
|
|
2104
2104
|
o.current && h(s ? o.current.scrollHeight : 0);
|
|
2105
|
-
}, [s]), /* @__PURE__ */ t.jsxs("div", { className:
|
|
2105
|
+
}, [s]), /* @__PURE__ */ t.jsxs("div", { className: st.accordion, children: [
|
|
2106
2106
|
/* @__PURE__ */ t.jsxs(
|
|
2107
2107
|
"div",
|
|
2108
2108
|
{
|
|
2109
|
-
className:
|
|
2109
|
+
className: st.header,
|
|
2110
2110
|
onClick: u,
|
|
2111
2111
|
children: [
|
|
2112
2112
|
/* @__PURE__ */ t.jsx("h5", { id: "h5", children: d }),
|
|
2113
|
-
/* @__PURE__ */ t.jsx("div", { className:
|
|
2113
|
+
/* @__PURE__ */ t.jsx("div", { className: G(st.icon, { [st.open]: s }), children: /* @__PURE__ */ t.jsx(g, { name: "CaretDown" }) })
|
|
2114
2114
|
]
|
|
2115
2115
|
}
|
|
2116
2116
|
),
|
|
@@ -2118,7 +2118,7 @@ const ni = (d) => {
|
|
|
2118
2118
|
"div",
|
|
2119
2119
|
{
|
|
2120
2120
|
ref: o,
|
|
2121
|
-
className:
|
|
2121
|
+
className: st.content,
|
|
2122
2122
|
style: { height: `${m}px` },
|
|
2123
2123
|
children: /* @__PURE__ */ t.jsx("p", { id: "p", children: n })
|
|
2124
2124
|
}
|
|
@@ -2150,12 +2150,12 @@ const ni = (d) => {
|
|
|
2150
2150
|
children: d
|
|
2151
2151
|
}
|
|
2152
2152
|
);
|
|
2153
|
-
},
|
|
2154
|
-
buttonsBlock:
|
|
2155
|
-
slideUp:
|
|
2156
|
-
}, ri = () => /* @__PURE__ */ t.jsxs("div", { className:
|
|
2153
|
+
}, Hn = "_buttonsBlock_1b2rb_1", Un = "_slideUp_1b2rb_1", zn = {
|
|
2154
|
+
buttonsBlock: Hn,
|
|
2155
|
+
slideUp: Un
|
|
2156
|
+
}, ri = () => /* @__PURE__ */ t.jsxs("div", { className: zn.buttonsBlock, children: [
|
|
2157
2157
|
/* @__PURE__ */ t.jsx(
|
|
2158
|
-
|
|
2158
|
+
H,
|
|
2159
2159
|
{
|
|
2160
2160
|
type: "Primary",
|
|
2161
2161
|
style: {
|
|
@@ -2164,7 +2164,7 @@ const ni = (d) => {
|
|
|
2164
2164
|
children: "Add to Cart"
|
|
2165
2165
|
}
|
|
2166
2166
|
),
|
|
2167
|
-
/* @__PURE__ */ t.jsx(
|
|
2167
|
+
/* @__PURE__ */ t.jsx(H, { type: "Secondary", children: "Buy" })
|
|
2168
2168
|
] }), Fn = "_wrapper_st58d_1", Vn = "_label_st58d_10", Yn = "_textarea_st58d_18", Gn = "_length_st58d_33", ct = {
|
|
2169
2169
|
wrapper: Fn,
|
|
2170
2170
|
label: Vn,
|
|
@@ -2179,7 +2179,7 @@ const ni = (d) => {
|
|
|
2179
2179
|
placeholder: m = "Type something...",
|
|
2180
2180
|
type: h = "text"
|
|
2181
2181
|
} = d, [o, u] = _.useState(s.length);
|
|
2182
|
-
function
|
|
2182
|
+
function f($) {
|
|
2183
2183
|
return h === "number" ? $.replace(/[^\d\n]+/g, "") : $;
|
|
2184
2184
|
}
|
|
2185
2185
|
return /* @__PURE__ */ t.jsxs("div", { className: ct.wrapper, children: [
|
|
@@ -2197,7 +2197,7 @@ const ni = (d) => {
|
|
|
2197
2197
|
id: e,
|
|
2198
2198
|
value: s,
|
|
2199
2199
|
onChange: ($) => {
|
|
2200
|
-
const l =
|
|
2200
|
+
const l = f($.target.value);
|
|
2201
2201
|
u(l.length), n(l);
|
|
2202
2202
|
},
|
|
2203
2203
|
placeholder: m,
|
|
@@ -2215,7 +2215,7 @@ const ni = (d) => {
|
|
|
2215
2215
|
export {
|
|
2216
2216
|
ci as Accordion,
|
|
2217
2217
|
Nn as BurgerMenuButton,
|
|
2218
|
-
|
|
2218
|
+
H as Button,
|
|
2219
2219
|
ms as ButtonTypeSettings,
|
|
2220
2220
|
ei as ButtonsSettings,
|
|
2221
2221
|
Kn as CategorySettings,
|
|
@@ -2243,10 +2243,10 @@ export {
|
|
|
2243
2243
|
ai as ShareLink,
|
|
2244
2244
|
bn as ShoppingButton,
|
|
2245
2245
|
jn as ShoppingModalCart,
|
|
2246
|
-
|
|
2246
|
+
it as Switch,
|
|
2247
2247
|
gi as TextSettings,
|
|
2248
|
-
|
|
2248
|
+
fi as TextareaSettings,
|
|
2249
2249
|
di as TextareaUI,
|
|
2250
|
-
|
|
2250
|
+
xi as TypesText,
|
|
2251
2251
|
Ct as UserInfo
|
|
2252
2252
|
};
|