@billgangcom/theme-lib 1.42.0 → 1.43.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 +1 -1
- package/dist/builder.es.js +1 -1
- package/dist/ui/Link/index.d.ts +10 -0
- package/dist/ui/index.d.ts +1 -0
- package/dist/ui.cjs.js +1 -1
- package/dist/ui.es.js +324 -308
- package/package.json +1 -1
package/dist/ui.es.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { j as t, I as j, c as U, a as K, S as st, T as qt, b as et, C as ft, u as
|
|
2
|
-
import { q as
|
|
1
|
+
import { j as t, I as j, c as U, a as K, S as st, T as qt, b as et, C as ft, u as $t, d as Nt, D as wt, e as Ct, v as Bt, B as lt, f as _t, P as St, g as Tt, h as Pt, i as Vt, k as Et, l as jt, m as At, M as Mt, n as Dt, o as Lt, p as Ut } from "./index-COcbc3Xp.js";
|
|
2
|
+
import { q as Aa, L as Ma } from "./index-COcbc3Xp.js";
|
|
3
3
|
import f from "react";
|
|
4
4
|
import "@phosphor-icons/react";
|
|
5
5
|
const Yt = "_wrapper_1ibay_2", Gt = "_alignmentBlock_1ibay_8", Xt = "_title_1ibay_15", Wt = "_subtitle_1ibay_22", Jt = "_alignmentContent_1ibay_29", Qt = "_alignments_1ibay_37", Kt = "_alignment_1ibay_8", Zt = "_circle_1ibay_60", te = "_paddings_1ibay_67", ee = "_padding_1ibay_67", se = "_active_1ibay_91", ne = "_input_1ibay_98", J = {
|
|
@@ -27,8 +27,8 @@ const Yt = "_wrapper_1ibay_2", Gt = "_alignmentBlock_1ibay_8", Xt = "_title_1iba
|
|
|
27
27
|
"bottomRight"
|
|
28
28
|
], oe = ["left", "top", "right", "bottom"], ba = (d) => {
|
|
29
29
|
const { alignment: o, padding: e, setPadding: s, setAlignment: i } = d;
|
|
30
|
-
function a(
|
|
31
|
-
switch (
|
|
30
|
+
function a(p) {
|
|
31
|
+
switch (p) {
|
|
32
32
|
case "left":
|
|
33
33
|
case "topLeft":
|
|
34
34
|
case "bottomLeft":
|
|
@@ -45,8 +45,8 @@ const Yt = "_wrapper_1ibay_2", Gt = "_alignmentBlock_1ibay_8", Xt = "_title_1iba
|
|
|
45
45
|
return "TextAlignCenter";
|
|
46
46
|
}
|
|
47
47
|
}
|
|
48
|
-
function l(
|
|
49
|
-
switch (
|
|
48
|
+
function l(p) {
|
|
49
|
+
switch (p) {
|
|
50
50
|
case "left":
|
|
51
51
|
return "AlignLeft";
|
|
52
52
|
case "right":
|
|
@@ -63,22 +63,22 @@ const Yt = "_wrapper_1ibay_2", Gt = "_alignmentBlock_1ibay_8", Xt = "_title_1iba
|
|
|
63
63
|
/* @__PURE__ */ t.jsxs("div", { className: J.alignmentBlock, children: [
|
|
64
64
|
/* @__PURE__ */ t.jsx("h5", { className: J.subtitle, children: "Alignment" }),
|
|
65
65
|
/* @__PURE__ */ t.jsxs("div", { className: J.alignmentContent, children: [
|
|
66
|
-
/* @__PURE__ */ t.jsx("div", { className: J.alignments, children: ie.map((
|
|
66
|
+
/* @__PURE__ */ t.jsx("div", { className: J.alignments, children: ie.map((p) => /* @__PURE__ */ t.jsxs(
|
|
67
67
|
"div",
|
|
68
68
|
{
|
|
69
69
|
onClick: () => {
|
|
70
|
-
i(
|
|
70
|
+
i(p);
|
|
71
71
|
},
|
|
72
72
|
className: J.alignment,
|
|
73
73
|
onMouseEnter: () => {
|
|
74
|
-
n(
|
|
74
|
+
n(p);
|
|
75
75
|
},
|
|
76
76
|
onMouseLeave: () => {
|
|
77
77
|
n(null);
|
|
78
78
|
},
|
|
79
79
|
children: [
|
|
80
|
-
|
|
81
|
-
|
|
80
|
+
p !== o && r !== p && /* @__PURE__ */ t.jsx("div", { className: J.circle }),
|
|
81
|
+
p !== o && r === p && /* @__PURE__ */ t.jsx(
|
|
82
82
|
j,
|
|
83
83
|
{
|
|
84
84
|
name: a(r),
|
|
@@ -87,7 +87,7 @@ const Yt = "_wrapper_1ibay_2", Gt = "_alignmentBlock_1ibay_8", Xt = "_title_1iba
|
|
|
87
87
|
height: 22
|
|
88
88
|
}
|
|
89
89
|
),
|
|
90
|
-
|
|
90
|
+
p === o && /* @__PURE__ */ t.jsx(
|
|
91
91
|
j,
|
|
92
92
|
{
|
|
93
93
|
name: a(o),
|
|
@@ -98,16 +98,16 @@ const Yt = "_wrapper_1ibay_2", Gt = "_alignmentBlock_1ibay_8", Xt = "_title_1iba
|
|
|
98
98
|
)
|
|
99
99
|
]
|
|
100
100
|
},
|
|
101
|
-
|
|
101
|
+
p
|
|
102
102
|
)) }),
|
|
103
|
-
/* @__PURE__ */ t.jsx("div", { className: J.paddings, children: oe.map((
|
|
103
|
+
/* @__PURE__ */ t.jsx("div", { className: J.paddings, children: oe.map((p) => /* @__PURE__ */ t.jsxs(
|
|
104
104
|
"label",
|
|
105
105
|
{
|
|
106
106
|
className: U(J.padding, {
|
|
107
|
-
[J.active]: c ===
|
|
107
|
+
[J.active]: c === p
|
|
108
108
|
}),
|
|
109
109
|
onFocus: () => {
|
|
110
|
-
x(
|
|
110
|
+
x(p);
|
|
111
111
|
},
|
|
112
112
|
onBlur: () => {
|
|
113
113
|
x(null);
|
|
@@ -116,7 +116,7 @@ const Yt = "_wrapper_1ibay_2", Gt = "_alignmentBlock_1ibay_8", Xt = "_title_1iba
|
|
|
116
116
|
/* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
|
|
117
117
|
j,
|
|
118
118
|
{
|
|
119
|
-
name: l(
|
|
119
|
+
name: l(p),
|
|
120
120
|
width: 20,
|
|
121
121
|
height: 20
|
|
122
122
|
}
|
|
@@ -125,10 +125,10 @@ const Yt = "_wrapper_1ibay_2", Gt = "_alignmentBlock_1ibay_8", Xt = "_title_1iba
|
|
|
125
125
|
K,
|
|
126
126
|
{
|
|
127
127
|
type: "number",
|
|
128
|
-
value: String(e[
|
|
129
|
-
onChange: (
|
|
128
|
+
value: String(e[p]),
|
|
129
|
+
onChange: (h) => s({
|
|
130
130
|
...e,
|
|
131
|
-
[
|
|
131
|
+
[p]: Number(h)
|
|
132
132
|
}),
|
|
133
133
|
paddingless: !0,
|
|
134
134
|
borderless: !0
|
|
@@ -136,23 +136,23 @@ const Yt = "_wrapper_1ibay_2", Gt = "_alignmentBlock_1ibay_8", Xt = "_title_1iba
|
|
|
136
136
|
)
|
|
137
137
|
]
|
|
138
138
|
},
|
|
139
|
-
|
|
139
|
+
p
|
|
140
140
|
)) })
|
|
141
141
|
] })
|
|
142
142
|
] })
|
|
143
143
|
] });
|
|
144
|
-
}, ae = "_title_1jkiw_1", ce = "_subtitle_1jkiw_5", le = "_header_1jkiw_12", re = "_text_1jkiw_13", de = "_top_1jkiw_20", ue = "_itemsBlock_1jkiw_29",
|
|
144
|
+
}, ae = "_title_1jkiw_1", ce = "_subtitle_1jkiw_5", le = "_header_1jkiw_12", re = "_text_1jkiw_13", de = "_top_1jkiw_20", ue = "_itemsBlock_1jkiw_29", pt = {
|
|
145
145
|
title: ae,
|
|
146
146
|
subtitle: ce,
|
|
147
147
|
header: le,
|
|
148
148
|
text: re,
|
|
149
149
|
top: de,
|
|
150
150
|
itemsBlock: ue
|
|
151
|
-
}, me = "_typeTexts_167ez_1", _e = "_block_167ez_8",
|
|
151
|
+
}, me = "_typeTexts_167ez_1", _e = "_block_167ez_8", pe = "_active_167ez_25", kt = {
|
|
152
152
|
typeTexts: me,
|
|
153
153
|
block: _e,
|
|
154
|
-
active:
|
|
155
|
-
},
|
|
154
|
+
active: pe
|
|
155
|
+
}, he = ["bold", "italic", "underline", "strike-through", "code"], Ht = (d) => {
|
|
156
156
|
const { typesText: o, setTypesText: e } = d;
|
|
157
157
|
function s(i) {
|
|
158
158
|
switch (i) {
|
|
@@ -168,11 +168,11 @@ const Yt = "_wrapper_1ibay_2", Gt = "_alignmentBlock_1ibay_8", Xt = "_title_1iba
|
|
|
168
168
|
return "TextUnderline";
|
|
169
169
|
}
|
|
170
170
|
}
|
|
171
|
-
return /* @__PURE__ */ t.jsx("div", { className:
|
|
171
|
+
return /* @__PURE__ */ t.jsx("div", { className: kt.typeTexts, children: he.map((i) => /* @__PURE__ */ t.jsx(
|
|
172
172
|
"div",
|
|
173
173
|
{
|
|
174
|
-
className: U(
|
|
175
|
-
[
|
|
174
|
+
className: U(kt.block, {
|
|
175
|
+
[kt.active]: o.includes(i)
|
|
176
176
|
}),
|
|
177
177
|
onClick: () => {
|
|
178
178
|
const a = [...o];
|
|
@@ -194,7 +194,7 @@ const Yt = "_wrapper_1ibay_2", Gt = "_alignmentBlock_1ibay_8", Xt = "_title_1iba
|
|
|
194
194
|
},
|
|
195
195
|
String(i)
|
|
196
196
|
)) });
|
|
197
|
-
},
|
|
197
|
+
}, ht = {
|
|
198
198
|
h1: "Heading 1",
|
|
199
199
|
h2: "Heading 2",
|
|
200
200
|
h3: "Heading 3",
|
|
@@ -215,29 +215,29 @@ const Yt = "_wrapper_1ibay_2", Gt = "_alignmentBlock_1ibay_8", Xt = "_title_1iba
|
|
|
215
215
|
typeFont: c,
|
|
216
216
|
setTypeFont: x
|
|
217
217
|
} = d;
|
|
218
|
-
return /* @__PURE__ */ t.jsxs("div", { className:
|
|
219
|
-
(r || e !== void 0) && /* @__PURE__ */ t.jsxs("div", { className:
|
|
220
|
-
r && /* @__PURE__ */ t.jsx("h3", { className:
|
|
218
|
+
return /* @__PURE__ */ t.jsxs("div", { className: pt.text, children: [
|
|
219
|
+
(r || e !== void 0) && /* @__PURE__ */ t.jsxs("div", { className: pt.top, children: [
|
|
220
|
+
r && /* @__PURE__ */ t.jsx("h3", { className: pt.title, children: r }),
|
|
221
221
|
e !== void 0 && s && /* @__PURE__ */ t.jsx(
|
|
222
222
|
st,
|
|
223
223
|
{
|
|
224
224
|
current: e,
|
|
225
|
-
onChange: (
|
|
225
|
+
onChange: (p) => s(p)
|
|
226
226
|
}
|
|
227
227
|
)
|
|
228
228
|
] }),
|
|
229
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
230
|
-
/* @__PURE__ */ t.jsx("h5", { className:
|
|
229
|
+
/* @__PURE__ */ t.jsxs("div", { className: pt.itemsBlock, children: [
|
|
230
|
+
/* @__PURE__ */ t.jsx("h5", { className: pt.subtitle, children: n }),
|
|
231
231
|
/* @__PURE__ */ t.jsx(
|
|
232
232
|
qt,
|
|
233
233
|
{
|
|
234
|
-
onChange: (
|
|
234
|
+
onChange: (p) => a(p),
|
|
235
235
|
value: i,
|
|
236
236
|
maxLength: 150
|
|
237
237
|
}
|
|
238
238
|
),
|
|
239
239
|
/* @__PURE__ */ t.jsx(
|
|
240
|
-
|
|
240
|
+
Ht,
|
|
241
241
|
{
|
|
242
242
|
typesText: o,
|
|
243
243
|
setTypesText: l
|
|
@@ -247,20 +247,20 @@ const Yt = "_wrapper_1ibay_2", Gt = "_alignmentBlock_1ibay_8", Xt = "_title_1iba
|
|
|
247
247
|
et,
|
|
248
248
|
{
|
|
249
249
|
label: "Type Text",
|
|
250
|
-
options: Object.values(
|
|
251
|
-
(
|
|
250
|
+
options: Object.values(ht).filter(
|
|
251
|
+
(p) => p !== ht[c]
|
|
252
252
|
),
|
|
253
|
-
onChange: (
|
|
254
|
-
Object.keys(
|
|
255
|
-
(
|
|
253
|
+
onChange: (p) => x(
|
|
254
|
+
Object.keys(ht).find(
|
|
255
|
+
(h) => ht[h] === p
|
|
256
256
|
)
|
|
257
257
|
),
|
|
258
|
-
value:
|
|
258
|
+
value: ht[c]
|
|
259
259
|
}
|
|
260
260
|
)
|
|
261
261
|
] })
|
|
262
262
|
] });
|
|
263
|
-
}, xe = "_title_xma5o_1", ge = "_subtitle_xma5o_5", fe = "_header_xma5o_12", be = "_text_xma5o_13", ve = "_productsBlock_xma5o_14", je = "_top_xma5o_26", ye = "_itemsBlock_xma5o_35",
|
|
263
|
+
}, xe = "_title_xma5o_1", ge = "_subtitle_xma5o_5", fe = "_header_xma5o_12", be = "_text_xma5o_13", ve = "_productsBlock_xma5o_14", je = "_top_xma5o_26", ye = "_itemsBlock_xma5o_35", ke = "_typeTexts_xma5o_41", Ie = "_block_xma5o_48", $e = "_active_xma5o_61", Ne = "_products_xma5o_14", we = "_product_xma5o_14", Ce = "_button_xma5o_80", Be = "_disabled_xma5o_91", Se = "_image_xma5o_95", Te = "_info_xma5o_102", Pe = "_name_xma5o_114", Ae = "_buttons_xma5o_118", Me = "_modal_xma5o_125", Oe = "_link_xma5o_145", qe = "_modalOptions_xma5o_151", Ee = "_addButton_xma5o_165", De = "_deleteButton_xma5o_180", Le = "_closeIcon_xma5o_192", L = {
|
|
264
264
|
title: xe,
|
|
265
265
|
subtitle: ge,
|
|
266
266
|
header: fe,
|
|
@@ -268,8 +268,8 @@ const Yt = "_wrapper_1ibay_2", Gt = "_alignmentBlock_1ibay_8", Xt = "_title_1iba
|
|
|
268
268
|
productsBlock: ve,
|
|
269
269
|
top: je,
|
|
270
270
|
itemsBlock: ye,
|
|
271
|
-
typeTexts:
|
|
272
|
-
block:
|
|
271
|
+
typeTexts: ke,
|
|
272
|
+
block: Ie,
|
|
273
273
|
active: $e,
|
|
274
274
|
products: Ne,
|
|
275
275
|
product: we,
|
|
@@ -284,8 +284,8 @@ const Yt = "_wrapper_1ibay_2", Gt = "_alignmentBlock_1ibay_8", Xt = "_title_1iba
|
|
|
284
284
|
modalOptions: qe,
|
|
285
285
|
addButton: Ee,
|
|
286
286
|
deleteButton: De,
|
|
287
|
-
closeIcon:
|
|
288
|
-
},
|
|
287
|
+
closeIcon: Le
|
|
288
|
+
}, He = f.forwardRef(
|
|
289
289
|
(d, o) => {
|
|
290
290
|
const { activeItem: e, setActiveItem: s, popupPosition: i, modalOptions: a, setIsOpenModal: l } = d;
|
|
291
291
|
function r(n, c) {
|
|
@@ -295,7 +295,7 @@ const Yt = "_wrapper_1ibay_2", Gt = "_alignmentBlock_1ibay_8", Xt = "_title_1iba
|
|
|
295
295
|
"div",
|
|
296
296
|
{
|
|
297
297
|
ref: o,
|
|
298
|
-
className:
|
|
298
|
+
className: L.modal,
|
|
299
299
|
onClick: (n) => {
|
|
300
300
|
n.stopPropagation();
|
|
301
301
|
},
|
|
@@ -304,9 +304,9 @@ const Yt = "_wrapper_1ibay_2", Gt = "_alignmentBlock_1ibay_8", Xt = "_title_1iba
|
|
|
304
304
|
left: `${i.left}px`
|
|
305
305
|
},
|
|
306
306
|
children: [
|
|
307
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
308
|
-
/* @__PURE__ */ t.jsx("h3", { className:
|
|
309
|
-
/* @__PURE__ */ t.jsx("div", { className:
|
|
307
|
+
/* @__PURE__ */ t.jsxs("div", { className: L.top, children: [
|
|
308
|
+
/* @__PURE__ */ t.jsx("h3", { className: L.title, children: r(e.name, 20) }),
|
|
309
|
+
/* @__PURE__ */ t.jsx("div", { className: L.closeIcon, children: /* @__PURE__ */ t.jsx(
|
|
310
310
|
j,
|
|
311
311
|
{
|
|
312
312
|
name: "X",
|
|
@@ -318,7 +318,7 @@ const Yt = "_wrapper_1ibay_2", Gt = "_alignmentBlock_1ibay_8", Xt = "_title_1iba
|
|
|
318
318
|
}
|
|
319
319
|
) })
|
|
320
320
|
] }),
|
|
321
|
-
/* @__PURE__ */ t.jsx("div", { className:
|
|
321
|
+
/* @__PURE__ */ t.jsx("div", { className: L.modalOptions, children: a.map((n) => {
|
|
322
322
|
if (n.type === "image")
|
|
323
323
|
return /* @__PURE__ */ t.jsx(
|
|
324
324
|
ft,
|
|
@@ -383,7 +383,7 @@ const Yt = "_wrapper_1ibay_2", Gt = "_alignmentBlock_1ibay_8", Xt = "_title_1iba
|
|
|
383
383
|
}
|
|
384
384
|
);
|
|
385
385
|
if (n.type === "inputSwitch")
|
|
386
|
-
return /* @__PURE__ */ t.jsxs("div", { className:
|
|
386
|
+
return /* @__PURE__ */ t.jsxs("div", { className: L.link, children: [
|
|
387
387
|
/* @__PURE__ */ t.jsx(
|
|
388
388
|
K,
|
|
389
389
|
{
|
|
@@ -461,7 +461,7 @@ const Yt = "_wrapper_1ibay_2", Gt = "_alignmentBlock_1ibay_8", Xt = "_title_1iba
|
|
|
461
461
|
other: Re,
|
|
462
462
|
subtitle: ze,
|
|
463
463
|
items: Fe
|
|
464
|
-
},
|
|
464
|
+
}, yt = (d) => {
|
|
465
465
|
const { items: o, title: e = "Other" } = d;
|
|
466
466
|
return /* @__PURE__ */ t.jsxs("div", { className: It.other, children: [
|
|
467
467
|
/* @__PURE__ */ t.jsx("h5", { className: It.subtitle, children: e }),
|
|
@@ -486,10 +486,10 @@ function Ve({ product: d, children: o }) {
|
|
|
486
486
|
transform: a,
|
|
487
487
|
transition: l,
|
|
488
488
|
isDragging: r
|
|
489
|
-
} =
|
|
489
|
+
} = Tt({
|
|
490
490
|
id: d.id
|
|
491
491
|
}), n = {
|
|
492
|
-
transform:
|
|
492
|
+
transform: Pt.Transform.toString(a),
|
|
493
493
|
transition: l
|
|
494
494
|
};
|
|
495
495
|
return /* @__PURE__ */ t.jsx(
|
|
@@ -497,7 +497,7 @@ function Ve({ product: d, children: o }) {
|
|
|
497
497
|
{
|
|
498
498
|
ref: i,
|
|
499
499
|
style: n,
|
|
500
|
-
className: `${
|
|
500
|
+
className: `${L.product} ${r ? L.dragging : ""}`,
|
|
501
501
|
...e,
|
|
502
502
|
...s,
|
|
503
503
|
children: o
|
|
@@ -516,13 +516,13 @@ const Ue = (d) => {
|
|
|
516
516
|
editable: n = !0,
|
|
517
517
|
draggable: c = !1,
|
|
518
518
|
withImage: x = !1,
|
|
519
|
-
deletable:
|
|
520
|
-
addable:
|
|
519
|
+
deletable: p = !0,
|
|
520
|
+
addable: h = !0,
|
|
521
521
|
itemsType: _,
|
|
522
522
|
itemsPlaceholder: b = "",
|
|
523
523
|
itemsOptions: u,
|
|
524
524
|
hasRangeSelector: C = !1,
|
|
525
|
-
rangeSelectorOptions:
|
|
525
|
+
rangeSelectorOptions: H,
|
|
526
526
|
modalOptions: v,
|
|
527
527
|
addableOptions: O = {},
|
|
528
528
|
limit: g,
|
|
@@ -530,8 +530,8 @@ const Ue = (d) => {
|
|
|
530
530
|
} = d, [F, q] = f.useState(null), [X, D] = f.useState({
|
|
531
531
|
top: 0,
|
|
532
532
|
left: 0
|
|
533
|
-
}), [
|
|
534
|
-
|
|
533
|
+
}), [k, A] = f.useState(null), M = f.useRef(null), [W, T] = f.useState(!1), R = $t(
|
|
534
|
+
Nt(St, {
|
|
535
535
|
activationConstraint: {
|
|
536
536
|
distance: 5
|
|
537
537
|
}
|
|
@@ -546,26 +546,26 @@ const Ue = (d) => {
|
|
|
546
546
|
};
|
|
547
547
|
}, []), f.useEffect(() => {
|
|
548
548
|
if (F) {
|
|
549
|
-
const m = [...s].map((
|
|
549
|
+
const m = [...s].map((I) => I.id === F.id ? F : I);
|
|
550
550
|
i(m);
|
|
551
551
|
}
|
|
552
552
|
}, [F]), f.useEffect(() => {
|
|
553
|
-
if (M.current &&
|
|
554
|
-
const m = M.current.getBoundingClientRect().height,
|
|
555
|
-
let B =
|
|
556
|
-
B + m >
|
|
553
|
+
if (M.current && k) {
|
|
554
|
+
const m = M.current.getBoundingClientRect().height, I = window.innerHeight;
|
|
555
|
+
let B = k.top;
|
|
556
|
+
B + m > I + window.scrollY - 200 && (B = I + window.scrollY - m - 200), B < 0 && (B = 10), D({
|
|
557
557
|
top: B,
|
|
558
|
-
left:
|
|
558
|
+
left: k.left
|
|
559
559
|
});
|
|
560
560
|
}
|
|
561
|
-
}, [M.current,
|
|
562
|
-
const Z = (m,
|
|
561
|
+
}, [M.current, k]);
|
|
562
|
+
const Z = (m, I) => {
|
|
563
563
|
m.stopPropagation();
|
|
564
564
|
const B = m.target.getBoundingClientRect();
|
|
565
565
|
A({
|
|
566
566
|
top: B.top + window.scrollY,
|
|
567
567
|
left: B.left - 30
|
|
568
|
-
}), q(
|
|
568
|
+
}), q(I), T(!0);
|
|
569
569
|
};
|
|
570
570
|
function rt(m) {
|
|
571
571
|
if (x)
|
|
@@ -588,15 +588,15 @@ const Ue = (d) => {
|
|
|
588
588
|
);
|
|
589
589
|
}
|
|
590
590
|
const y = (m) => {
|
|
591
|
-
const { active:
|
|
592
|
-
if (B &&
|
|
593
|
-
const E = s.findIndex((S) => S.id ===
|
|
591
|
+
const { active: I, over: B } = m;
|
|
592
|
+
if (B && I.id !== B.id) {
|
|
593
|
+
const E = s.findIndex((S) => S.id === I.id), Y = s.findIndex((S) => S.id === B.id);
|
|
594
594
|
if (E !== -1 && Y !== -1) {
|
|
595
595
|
const S = [...s], [dt] = S.splice(E, 1);
|
|
596
596
|
S.splice(Y, 0, dt), i(S);
|
|
597
597
|
}
|
|
598
598
|
}
|
|
599
|
-
}, P = (m,
|
|
599
|
+
}, P = (m, I) => {
|
|
600
600
|
var E, Y;
|
|
601
601
|
const B = /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
602
602
|
c && /* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
|
|
@@ -655,8 +655,8 @@ const Ue = (d) => {
|
|
|
655
655
|
activeImage: (E = s.find((S) => S.id === m.id)) != null && E.images ? (Y = s.find((S) => S.id === m.id)) == null ? void 0 : Y.images[0] : void 0
|
|
656
656
|
}
|
|
657
657
|
),
|
|
658
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
659
|
-
n && /* @__PURE__ */ t.jsx("div", { className:
|
|
658
|
+
/* @__PURE__ */ t.jsxs("div", { className: L.buttons, children: [
|
|
659
|
+
n && /* @__PURE__ */ t.jsx("div", { className: L.deleteButton, children: /* @__PURE__ */ t.jsx(
|
|
660
660
|
j,
|
|
661
661
|
{
|
|
662
662
|
name: "Sliders",
|
|
@@ -666,7 +666,7 @@ const Ue = (d) => {
|
|
|
666
666
|
onClick: (S) => Z(S, m)
|
|
667
667
|
}
|
|
668
668
|
) }),
|
|
669
|
-
|
|
669
|
+
p && /* @__PURE__ */ t.jsx("div", { className: L.deleteButton, children: /* @__PURE__ */ t.jsx(
|
|
670
670
|
j,
|
|
671
671
|
{
|
|
672
672
|
name: "Trash",
|
|
@@ -683,22 +683,22 @@ const Ue = (d) => {
|
|
|
683
683
|
Ve,
|
|
684
684
|
{
|
|
685
685
|
product: m,
|
|
686
|
-
index:
|
|
686
|
+
index: I,
|
|
687
687
|
children: B
|
|
688
688
|
},
|
|
689
689
|
m.id
|
|
690
690
|
) : /* @__PURE__ */ t.jsx(
|
|
691
691
|
"div",
|
|
692
692
|
{
|
|
693
|
-
className:
|
|
693
|
+
className: L.product,
|
|
694
694
|
children: B
|
|
695
695
|
},
|
|
696
696
|
m.id
|
|
697
697
|
);
|
|
698
698
|
};
|
|
699
|
-
return /* @__PURE__ */ t.jsxs("div", { className:
|
|
700
|
-
(l || o !== void 0) && /* @__PURE__ */ t.jsxs("div", { className:
|
|
701
|
-
l && /* @__PURE__ */ t.jsx("h3", { className:
|
|
699
|
+
return /* @__PURE__ */ t.jsxs("div", { className: L.productsBlock, children: [
|
|
700
|
+
(l || o !== void 0) && /* @__PURE__ */ t.jsxs("div", { className: L.top, children: [
|
|
701
|
+
l && /* @__PURE__ */ t.jsx("h3", { className: L.title, children: l }),
|
|
702
702
|
o !== void 0 && /* @__PURE__ */ t.jsx(
|
|
703
703
|
st,
|
|
704
704
|
{
|
|
@@ -708,7 +708,7 @@ const Ue = (d) => {
|
|
|
708
708
|
)
|
|
709
709
|
] }),
|
|
710
710
|
F && n && v && W && /* @__PURE__ */ t.jsx(
|
|
711
|
-
|
|
711
|
+
He,
|
|
712
712
|
{
|
|
713
713
|
ref: M,
|
|
714
714
|
activeItem: F,
|
|
@@ -718,25 +718,25 @@ const Ue = (d) => {
|
|
|
718
718
|
setIsOpenModal: T
|
|
719
719
|
}
|
|
720
720
|
),
|
|
721
|
-
C &&
|
|
722
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
723
|
-
r && /* @__PURE__ */ t.jsx("h5", { className:
|
|
721
|
+
C && H && /* @__PURE__ */ t.jsx(Ot, { ...H }),
|
|
722
|
+
/* @__PURE__ */ t.jsxs("div", { className: L.products, children: [
|
|
723
|
+
r && /* @__PURE__ */ t.jsx("h5", { className: L.subtitle, children: r }),
|
|
724
724
|
c ? /* @__PURE__ */ t.jsx(
|
|
725
|
-
|
|
725
|
+
wt,
|
|
726
726
|
{
|
|
727
727
|
sensors: R,
|
|
728
728
|
onDragEnd: y,
|
|
729
729
|
children: /* @__PURE__ */ t.jsx(
|
|
730
|
-
|
|
730
|
+
Ct,
|
|
731
731
|
{
|
|
732
732
|
items: s.map((m) => m.id),
|
|
733
|
-
strategy:
|
|
734
|
-
children: s.map((m,
|
|
733
|
+
strategy: Bt,
|
|
734
|
+
children: s.map((m, I) => P(m, I))
|
|
735
735
|
}
|
|
736
736
|
)
|
|
737
737
|
}
|
|
738
|
-
) : s.map((m,
|
|
739
|
-
|
|
738
|
+
) : s.map((m, I) => P(m, I)),
|
|
739
|
+
h && /* @__PURE__ */ t.jsx(
|
|
740
740
|
"div",
|
|
741
741
|
{
|
|
742
742
|
style: {
|
|
@@ -748,24 +748,24 @@ const Ue = (d) => {
|
|
|
748
748
|
lt,
|
|
749
749
|
{
|
|
750
750
|
withoutHover: !0,
|
|
751
|
-
className: U(
|
|
752
|
-
[
|
|
751
|
+
className: U(L.button, {
|
|
752
|
+
[L.disabled]: !!(g && g <= s.length || s.length === (u == null ? void 0 : u.length))
|
|
753
753
|
}),
|
|
754
754
|
size: "s",
|
|
755
755
|
disabled: !!(g && g <= s.length || s.length === (u == null ? void 0 : u.length)),
|
|
756
756
|
onClick: () => {
|
|
757
757
|
const m = [...s];
|
|
758
|
-
let
|
|
758
|
+
let I = null;
|
|
759
759
|
if (u) {
|
|
760
760
|
for (let B = 0; B < u.length; B++)
|
|
761
761
|
if (!s.find((E) => E.id === u[B].id)) {
|
|
762
|
-
|
|
762
|
+
I = u[B];
|
|
763
763
|
break;
|
|
764
764
|
}
|
|
765
765
|
}
|
|
766
766
|
_ === "select" && u ? m.push({
|
|
767
|
-
name:
|
|
768
|
-
id: (
|
|
767
|
+
name: I ? I.name : u[0].name,
|
|
768
|
+
id: (I == null ? void 0 : I.id) || u[0].id,
|
|
769
769
|
...O
|
|
770
770
|
}) : _ === "input" ? m.push({
|
|
771
771
|
name: "",
|
|
@@ -780,7 +780,7 @@ const Ue = (d) => {
|
|
|
780
780
|
style: {
|
|
781
781
|
width: "fit-content"
|
|
782
782
|
},
|
|
783
|
-
children: /* @__PURE__ */ t.jsxs("div", { className:
|
|
783
|
+
children: /* @__PURE__ */ t.jsxs("div", { className: L.addButton, children: [
|
|
784
784
|
/* @__PURE__ */ t.jsx("span", { children: "Add Option" }),
|
|
785
785
|
/* @__PURE__ */ t.jsx(
|
|
786
786
|
j,
|
|
@@ -796,7 +796,7 @@ const Ue = (d) => {
|
|
|
796
796
|
}
|
|
797
797
|
)
|
|
798
798
|
] }),
|
|
799
|
-
a !== void 0 && /* @__PURE__ */ t.jsx(
|
|
799
|
+
a !== void 0 && /* @__PURE__ */ t.jsx(yt, { items: a }),
|
|
800
800
|
$ !== void 0 && /* @__PURE__ */ t.jsx(
|
|
801
801
|
K,
|
|
802
802
|
{
|
|
@@ -813,7 +813,7 @@ const Ue = (d) => {
|
|
|
813
813
|
}
|
|
814
814
|
)
|
|
815
815
|
] });
|
|
816
|
-
}, Ye = "_title_82zux_1", Ge = "_subtitle_82zux_5", Xe = "_header_82zux_12", We = "_text_82zux_13", Je = "_productsBlock_82zux_14", Qe = "_top_82zux_26", Ke = "_itemsBlock_82zux_35", Ze = "_typeTexts_82zux_41", ts = "_block_82zux_48", es = "_active_82zux_61", ss = "_products_82zux_14", ns = "_product_82zux_14", is = "_button_82zux_80", os = "_disabled_82zux_91", as = "_image_82zux_95", cs = "_info_82zux_102", ls = "_name_82zux_114", rs = "_buttons_82zux_118", ds = "_modal_82zux_125", us = "_link_82zux_145", ms = "_modalOptions_82zux_151", _s = "_addButton_82zux_157",
|
|
816
|
+
}, Ye = "_title_82zux_1", Ge = "_subtitle_82zux_5", Xe = "_header_82zux_12", We = "_text_82zux_13", Je = "_productsBlock_82zux_14", Qe = "_top_82zux_26", Ke = "_itemsBlock_82zux_35", Ze = "_typeTexts_82zux_41", ts = "_block_82zux_48", es = "_active_82zux_61", ss = "_products_82zux_14", ns = "_product_82zux_14", is = "_button_82zux_80", os = "_disabled_82zux_91", as = "_image_82zux_95", cs = "_info_82zux_102", ls = "_name_82zux_114", rs = "_buttons_82zux_118", ds = "_modal_82zux_125", us = "_link_82zux_145", ms = "_modalOptions_82zux_151", _s = "_addButton_82zux_157", ps = "_deleteButton_82zux_179", Q = {
|
|
817
817
|
title: Ye,
|
|
818
818
|
subtitle: Ge,
|
|
819
819
|
header: Xe,
|
|
@@ -836,7 +836,7 @@ const Ue = (d) => {
|
|
|
836
836
|
link: us,
|
|
837
837
|
modalOptions: ms,
|
|
838
838
|
addButton: _s,
|
|
839
|
-
deleteButton:
|
|
839
|
+
deleteButton: ps
|
|
840
840
|
}, va = (d) => {
|
|
841
841
|
const {
|
|
842
842
|
isActiveItems: o,
|
|
@@ -849,8 +849,8 @@ const Ue = (d) => {
|
|
|
849
849
|
draggable: n = !1,
|
|
850
850
|
withImage: c = !1,
|
|
851
851
|
addable: x = !0,
|
|
852
|
-
itemsOptions:
|
|
853
|
-
hasRangeSelector:
|
|
852
|
+
itemsOptions: p,
|
|
853
|
+
hasRangeSelector: h = !1,
|
|
854
854
|
rangeSelectorOptions: _,
|
|
855
855
|
limit: b,
|
|
856
856
|
autoScrollInterval: u
|
|
@@ -875,8 +875,8 @@ const Ue = (d) => {
|
|
|
875
875
|
}
|
|
876
876
|
);
|
|
877
877
|
}
|
|
878
|
-
const
|
|
879
|
-
const O =
|
|
878
|
+
const H = (v) => {
|
|
879
|
+
const O = p.find(($) => $.id === v);
|
|
880
880
|
if (!O) return;
|
|
881
881
|
const g = /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
882
882
|
n && /* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
|
|
@@ -892,13 +892,13 @@ const Ue = (d) => {
|
|
|
892
892
|
et,
|
|
893
893
|
{
|
|
894
894
|
onChange: ($) => {
|
|
895
|
-
const F = [...s], q =
|
|
895
|
+
const F = [...s], q = p.find((k) => k.name === $);
|
|
896
896
|
if (!q) return;
|
|
897
|
-
const X = q.id, D = F.map((
|
|
897
|
+
const X = q.id, D = F.map((k) => k === v ? X : k);
|
|
898
898
|
i([...D]);
|
|
899
899
|
},
|
|
900
900
|
value: O.name,
|
|
901
|
-
options:
|
|
901
|
+
options: p.filter(($) => !s.find((F) => F === $.id)).map(($) => $.name),
|
|
902
902
|
leftAddon: C(O.images)
|
|
903
903
|
}
|
|
904
904
|
),
|
|
@@ -934,10 +934,10 @@ const Ue = (d) => {
|
|
|
934
934
|
}
|
|
935
935
|
)
|
|
936
936
|
] }),
|
|
937
|
-
|
|
937
|
+
h && _ && /* @__PURE__ */ t.jsx(Ot, { ..._ }),
|
|
938
938
|
/* @__PURE__ */ t.jsxs("div", { className: Q.products, children: [
|
|
939
939
|
r && /* @__PURE__ */ t.jsx("h5", { className: Q.subtitle, children: r }),
|
|
940
|
-
s.map((v) =>
|
|
940
|
+
s.map((v) => H(v)),
|
|
941
941
|
x && /* @__PURE__ */ t.jsx(
|
|
942
942
|
"div",
|
|
943
943
|
{
|
|
@@ -952,21 +952,21 @@ const Ue = (d) => {
|
|
|
952
952
|
{
|
|
953
953
|
withoutHover: !0,
|
|
954
954
|
className: U(Q.button, {
|
|
955
|
-
[Q.disabled]: !!(b && b <= s.length || s.length ===
|
|
955
|
+
[Q.disabled]: !!(b && b <= s.length || s.length === p.length)
|
|
956
956
|
}),
|
|
957
957
|
size: "s",
|
|
958
|
-
disabled: !!(b && b <= s.length || s.length ===
|
|
958
|
+
disabled: !!(b && b <= s.length || s.length === p.length),
|
|
959
959
|
onClick: () => {
|
|
960
960
|
const v = [...s];
|
|
961
961
|
let O = null;
|
|
962
|
-
if (
|
|
963
|
-
for (let g = 0; g <
|
|
964
|
-
if (!s.find(($) => $ ===
|
|
965
|
-
O =
|
|
962
|
+
if (p) {
|
|
963
|
+
for (let g = 0; g < p.length; g++)
|
|
964
|
+
if (!s.find(($) => $ === p[g].id)) {
|
|
965
|
+
O = p[g];
|
|
966
966
|
break;
|
|
967
967
|
}
|
|
968
968
|
}
|
|
969
|
-
v.push((O == null ? void 0 : O.id) ||
|
|
969
|
+
v.push((O == null ? void 0 : O.id) || p[0].id), i(v);
|
|
970
970
|
},
|
|
971
971
|
style: {
|
|
972
972
|
width: "fit-content"
|
|
@@ -987,7 +987,7 @@ const Ue = (d) => {
|
|
|
987
987
|
}
|
|
988
988
|
)
|
|
989
989
|
] }),
|
|
990
|
-
a !== void 0 && /* @__PURE__ */ t.jsx(
|
|
990
|
+
a !== void 0 && /* @__PURE__ */ t.jsx(yt, { items: a }),
|
|
991
991
|
u !== void 0 && /* @__PURE__ */ t.jsx(
|
|
992
992
|
K,
|
|
993
993
|
{
|
|
@@ -1004,8 +1004,8 @@ const Ue = (d) => {
|
|
|
1004
1004
|
}
|
|
1005
1005
|
)
|
|
1006
1006
|
] });
|
|
1007
|
-
},
|
|
1008
|
-
title:
|
|
1007
|
+
}, hs = "_title_1vfw9_1", xs = "_subtitle_1vfw9_5", gs = "_header_1vfw9_12", fs = "_text_1vfw9_13", bs = "_productsBlock_1vfw9_14", vs = "_top_1vfw9_26", js = "_itemsBlock_1vfw9_35", ys = "_typeTexts_1vfw9_41", ks = "_block_1vfw9_48", Is = "_active_1vfw9_61", $s = "_products_1vfw9_14", Ns = "_product_1vfw9_14", ws = "_button_1vfw9_80", Cs = "_disabled_1vfw9_91", Bs = "_image_1vfw9_95", Ss = "_info_1vfw9_102", Ts = "_name_1vfw9_114", Ps = "_buttons_1vfw9_118", As = "_modal_1vfw9_125", Ms = "_link_1vfw9_145", Os = "_modalOptions_1vfw9_151", qs = "_addButton_1vfw9_164", Es = "_deleteButton_1vfw9_179", Ds = "_closeIcon_1vfw9_191", z = {
|
|
1008
|
+
title: hs,
|
|
1009
1009
|
subtitle: xs,
|
|
1010
1010
|
header: gs,
|
|
1011
1011
|
text: fs,
|
|
@@ -1013,8 +1013,8 @@ const Ue = (d) => {
|
|
|
1013
1013
|
top: vs,
|
|
1014
1014
|
itemsBlock: js,
|
|
1015
1015
|
typeTexts: ys,
|
|
1016
|
-
block:
|
|
1017
|
-
active:
|
|
1016
|
+
block: ks,
|
|
1017
|
+
active: Is,
|
|
1018
1018
|
products: $s,
|
|
1019
1019
|
product: Ns,
|
|
1020
1020
|
button: ws,
|
|
@@ -1029,7 +1029,7 @@ const Ue = (d) => {
|
|
|
1029
1029
|
addButton: qs,
|
|
1030
1030
|
deleteButton: Es,
|
|
1031
1031
|
closeIcon: Ds
|
|
1032
|
-
},
|
|
1032
|
+
}, Ls = f.forwardRef(
|
|
1033
1033
|
(d, o) => {
|
|
1034
1034
|
const { activeItem: e, setActiveItem: s, popupPosition: i, modalOptions: a, setIsOpenModal: l } = d;
|
|
1035
1035
|
function r(n, c) {
|
|
@@ -1182,11 +1182,11 @@ const Ue = (d) => {
|
|
|
1182
1182
|
);
|
|
1183
1183
|
}
|
|
1184
1184
|
);
|
|
1185
|
-
function
|
|
1186
|
-
const { product: o, children: e } = d, { attributes: s, listeners: i, setNodeRef: a, transform: l, transition: r, isDragging: n } =
|
|
1185
|
+
function Hs(d) {
|
|
1186
|
+
const { product: o, children: e } = d, { attributes: s, listeners: i, setNodeRef: a, transform: l, transition: r, isDragging: n } = Tt({
|
|
1187
1187
|
id: o.id
|
|
1188
1188
|
}), c = {
|
|
1189
|
-
transform:
|
|
1189
|
+
transform: Pt.Transform.toString(l),
|
|
1190
1190
|
transition: r
|
|
1191
1191
|
};
|
|
1192
1192
|
return /* @__PURE__ */ t.jsx(
|
|
@@ -1213,20 +1213,20 @@ const ja = (d) => {
|
|
|
1213
1213
|
editable: n = !0,
|
|
1214
1214
|
draggable: c = !1,
|
|
1215
1215
|
withImage: x = !1,
|
|
1216
|
-
deletable:
|
|
1217
|
-
addable:
|
|
1216
|
+
deletable: p = !0,
|
|
1217
|
+
addable: h = !0,
|
|
1218
1218
|
itemsType: _,
|
|
1219
1219
|
itemsPlaceholder: b = "",
|
|
1220
1220
|
itemsOptions: u,
|
|
1221
1221
|
hasRangeSelector: C = !1,
|
|
1222
|
-
rangeSelectorOptions:
|
|
1222
|
+
rangeSelectorOptions: H,
|
|
1223
1223
|
modalOptions: v,
|
|
1224
1224
|
addableOptions: O = {}
|
|
1225
1225
|
} = d, [g, $] = f.useState(null), [F, q] = f.useState({
|
|
1226
1226
|
top: 0,
|
|
1227
1227
|
left: 0
|
|
1228
|
-
}), [X, D] = f.useState(null),
|
|
1229
|
-
|
|
1228
|
+
}), [X, D] = f.useState(null), k = f.useRef(null), [A, M] = f.useState(!1), W = $t(
|
|
1229
|
+
Nt(St, {
|
|
1230
1230
|
activationConstraint: {
|
|
1231
1231
|
distance: 5
|
|
1232
1232
|
}
|
|
@@ -1245,15 +1245,15 @@ const ja = (d) => {
|
|
|
1245
1245
|
i(y);
|
|
1246
1246
|
}
|
|
1247
1247
|
}, [g]), f.useEffect(() => {
|
|
1248
|
-
if (
|
|
1249
|
-
const y =
|
|
1248
|
+
if (k.current && X) {
|
|
1249
|
+
const y = k.current.getBoundingClientRect().height, P = window.innerHeight;
|
|
1250
1250
|
let m = X.top;
|
|
1251
1251
|
m + y > P + window.scrollY - 200 && (m = P + window.scrollY - y - 200), m < 0 && (m = 10), q({
|
|
1252
1252
|
top: m,
|
|
1253
1253
|
left: X.left
|
|
1254
1254
|
});
|
|
1255
1255
|
}
|
|
1256
|
-
}, [
|
|
1256
|
+
}, [k.current, X]);
|
|
1257
1257
|
const T = (y, P) => {
|
|
1258
1258
|
y.stopPropagation();
|
|
1259
1259
|
const m = y.target.getBoundingClientRect();
|
|
@@ -1285,9 +1285,9 @@ const ja = (d) => {
|
|
|
1285
1285
|
const Z = (y) => {
|
|
1286
1286
|
const { active: P, over: m } = y;
|
|
1287
1287
|
if (m && P.id !== m.id) {
|
|
1288
|
-
const
|
|
1289
|
-
if (
|
|
1290
|
-
const E = [...s], [Y] = E.splice(
|
|
1288
|
+
const I = s.findIndex((E) => E.id === P.id), B = s.findIndex((E) => E.id === m.id);
|
|
1289
|
+
if (I !== -1 && B !== -1) {
|
|
1290
|
+
const E = [...s], [Y] = E.splice(I, 1);
|
|
1291
1291
|
E.splice(B, 0, Y), i(E);
|
|
1292
1292
|
}
|
|
1293
1293
|
}
|
|
@@ -1306,28 +1306,28 @@ const ja = (d) => {
|
|
|
1306
1306
|
_ === "select" && u && /* @__PURE__ */ t.jsx(
|
|
1307
1307
|
et,
|
|
1308
1308
|
{
|
|
1309
|
-
onChange: (
|
|
1309
|
+
onChange: (I) => {
|
|
1310
1310
|
const E = [...s].map((Y) => Y.id === y.id ? {
|
|
1311
1311
|
...y,
|
|
1312
|
-
name:
|
|
1312
|
+
name: I
|
|
1313
1313
|
} : Y);
|
|
1314
1314
|
$({
|
|
1315
1315
|
...y,
|
|
1316
|
-
name:
|
|
1316
|
+
name: I
|
|
1317
1317
|
}), i([...E]);
|
|
1318
1318
|
},
|
|
1319
1319
|
value: y.name,
|
|
1320
|
-
options: u.filter((
|
|
1320
|
+
options: u.filter((I) => !s.find((B) => B.name === I)),
|
|
1321
1321
|
leftAddon: R(y.images)
|
|
1322
1322
|
}
|
|
1323
1323
|
),
|
|
1324
1324
|
_ === "input" && /* @__PURE__ */ t.jsx(
|
|
1325
1325
|
K,
|
|
1326
1326
|
{
|
|
1327
|
-
onChange: (
|
|
1327
|
+
onChange: (I) => {
|
|
1328
1328
|
const E = [...s].map((Y) => Y.id === y.id ? {
|
|
1329
1329
|
...y,
|
|
1330
|
-
name:
|
|
1330
|
+
name: I
|
|
1331
1331
|
} : Y);
|
|
1332
1332
|
i([...E]);
|
|
1333
1333
|
},
|
|
@@ -1338,14 +1338,14 @@ const ja = (d) => {
|
|
|
1338
1338
|
_ === "image" && /* @__PURE__ */ t.jsx(
|
|
1339
1339
|
ft,
|
|
1340
1340
|
{
|
|
1341
|
-
onChange: (
|
|
1341
|
+
onChange: (I) => {
|
|
1342
1342
|
const E = [...s].map((Y) => Y.id === y.id ? {
|
|
1343
1343
|
...y,
|
|
1344
|
-
images:
|
|
1344
|
+
images: I
|
|
1345
1345
|
} : Y);
|
|
1346
1346
|
i([...E]);
|
|
1347
1347
|
},
|
|
1348
|
-
activeImage: (m = s.find((
|
|
1348
|
+
activeImage: (m = s.find((I) => I.id === y.id)) == null ? void 0 : m.images[0]
|
|
1349
1349
|
}
|
|
1350
1350
|
),
|
|
1351
1351
|
/* @__PURE__ */ t.jsxs("div", { className: z.buttons, children: [
|
|
@@ -1356,10 +1356,10 @@ const ja = (d) => {
|
|
|
1356
1356
|
hoverable: !0,
|
|
1357
1357
|
width: 20,
|
|
1358
1358
|
height: 20,
|
|
1359
|
-
onClick: (
|
|
1359
|
+
onClick: (I) => T(I, y)
|
|
1360
1360
|
}
|
|
1361
1361
|
) }),
|
|
1362
|
-
|
|
1362
|
+
p && /* @__PURE__ */ t.jsx("div", { className: z.deleteButton, children: /* @__PURE__ */ t.jsx(
|
|
1363
1363
|
j,
|
|
1364
1364
|
{
|
|
1365
1365
|
name: "Trash",
|
|
@@ -1367,13 +1367,13 @@ const ja = (d) => {
|
|
|
1367
1367
|
width: 20,
|
|
1368
1368
|
height: 20,
|
|
1369
1369
|
fill: "#C12A2A",
|
|
1370
|
-
onClick: () => i(s.filter((
|
|
1370
|
+
onClick: () => i(s.filter((I) => I.id !== y.id))
|
|
1371
1371
|
}
|
|
1372
1372
|
) })
|
|
1373
1373
|
] })
|
|
1374
1374
|
] });
|
|
1375
1375
|
return c ? /* @__PURE__ */ t.jsx(
|
|
1376
|
-
|
|
1376
|
+
Hs,
|
|
1377
1377
|
{
|
|
1378
1378
|
product: y,
|
|
1379
1379
|
children: P
|
|
@@ -1400,9 +1400,9 @@ const ja = (d) => {
|
|
|
1400
1400
|
)
|
|
1401
1401
|
] }),
|
|
1402
1402
|
g && n && v && A && /* @__PURE__ */ t.jsx(
|
|
1403
|
-
|
|
1403
|
+
Ls,
|
|
1404
1404
|
{
|
|
1405
|
-
ref:
|
|
1405
|
+
ref: k,
|
|
1406
1406
|
activeItem: g,
|
|
1407
1407
|
setActiveItem: $,
|
|
1408
1408
|
popupPosition: F,
|
|
@@ -1410,25 +1410,25 @@ const ja = (d) => {
|
|
|
1410
1410
|
setIsOpenModal: M
|
|
1411
1411
|
}
|
|
1412
1412
|
),
|
|
1413
|
-
C &&
|
|
1413
|
+
C && H && /* @__PURE__ */ t.jsx(Ot, { ...H }),
|
|
1414
1414
|
/* @__PURE__ */ t.jsxs("div", { className: z.products, children: [
|
|
1415
1415
|
r && /* @__PURE__ */ t.jsx("h5", { className: z.subtitle, children: r }),
|
|
1416
1416
|
c ? /* @__PURE__ */ t.jsx(
|
|
1417
|
-
|
|
1417
|
+
wt,
|
|
1418
1418
|
{
|
|
1419
1419
|
sensors: W,
|
|
1420
1420
|
onDragEnd: Z,
|
|
1421
1421
|
children: /* @__PURE__ */ t.jsx(
|
|
1422
|
-
|
|
1422
|
+
Ct,
|
|
1423
1423
|
{
|
|
1424
1424
|
items: s.map((y) => y.id),
|
|
1425
|
-
strategy:
|
|
1425
|
+
strategy: Bt,
|
|
1426
1426
|
children: s.map((y) => rt(y))
|
|
1427
1427
|
}
|
|
1428
1428
|
)
|
|
1429
1429
|
}
|
|
1430
1430
|
) : s.map((y) => rt(y)),
|
|
1431
|
-
|
|
1431
|
+
h && /* @__PURE__ */ t.jsx(
|
|
1432
1432
|
"div",
|
|
1433
1433
|
{
|
|
1434
1434
|
style: {
|
|
@@ -1447,7 +1447,7 @@ const ja = (d) => {
|
|
|
1447
1447
|
let P = null;
|
|
1448
1448
|
if (u) {
|
|
1449
1449
|
for (let m = 0; m < u.length; m++)
|
|
1450
|
-
if (!s.find((
|
|
1450
|
+
if (!s.find((I) => I.name === u[m])) {
|
|
1451
1451
|
P = u[m];
|
|
1452
1452
|
break;
|
|
1453
1453
|
}
|
|
@@ -1489,7 +1489,7 @@ const ja = (d) => {
|
|
|
1489
1489
|
}
|
|
1490
1490
|
)
|
|
1491
1491
|
] }),
|
|
1492
|
-
a !== void 0 && /* @__PURE__ */ t.jsx(
|
|
1492
|
+
a !== void 0 && /* @__PURE__ */ t.jsx(yt, { items: a })
|
|
1493
1493
|
] });
|
|
1494
1494
|
}, Rs = "_title_bn7sv_1", zs = "_subtitle_bn7sv_5", Fs = "_header_bn7sv_12", Vs = "_text_bn7sv_13", Us = "_productsBlock_bn7sv_14", Ys = "_buttonsBlock_bn7sv_15", Gs = "_top_bn7sv_26", Xs = "_itemsBlock_bn7sv_35", Ws = "_typeTexts_bn7sv_41", Js = "_block_bn7sv_48", Qs = "_active_bn7sv_60", Ks = "_products_bn7sv_14", Zs = "_product_bn7sv_14", tn = "_button_bn7sv_15", en = "_image_bn7sv_90", sn = "_info_bn7sv_97", nn = "_name_bn7sv_109", on = "_buttons_bn7sv_15", an = "_modal_bn7sv_120", cn = "_other_bn7sv_139", ln = "_options_bn7sv_145", rn = "_closeIcon_bn7sv_153", ct = {
|
|
1495
1495
|
title: Rs,
|
|
@@ -1515,20 +1515,20 @@ const ja = (d) => {
|
|
|
1515
1515
|
options: ln,
|
|
1516
1516
|
closeIcon: rn
|
|
1517
1517
|
}, dn = f.forwardRef((d, o) => {
|
|
1518
|
-
const { activeButton: e, setActiveButton: s, popupPosition: i } = d, [a, l] = f.useState(e.typesText), [r, n] = f.useState(e.destination), [c, x] = f.useState(e.page), [
|
|
1518
|
+
const { activeButton: e, setActiveButton: s, popupPosition: i } = d, [a, l] = f.useState(e.typesText), [r, n] = f.useState(e.destination), [c, x] = f.useState(e.page), [p, h] = f.useState(e.link || ""), [_, b] = f.useState(e.text || ""), [u, C] = f.useState(e.openInNewTab), { pages: H } = Vt();
|
|
1519
1519
|
return f.useEffect(() => {
|
|
1520
1520
|
s({
|
|
1521
1521
|
...e,
|
|
1522
1522
|
...{
|
|
1523
1523
|
text: _,
|
|
1524
|
-
link:
|
|
1524
|
+
link: p,
|
|
1525
1525
|
destination: r,
|
|
1526
1526
|
typesText: a,
|
|
1527
1527
|
page: c,
|
|
1528
1528
|
openInNewTab: u
|
|
1529
1529
|
}
|
|
1530
1530
|
});
|
|
1531
|
-
}, [a, r,
|
|
1531
|
+
}, [a, r, p, _, c, u]), /* @__PURE__ */ t.jsxs(
|
|
1532
1532
|
"div",
|
|
1533
1533
|
{
|
|
1534
1534
|
className: ct.modal,
|
|
@@ -1569,14 +1569,14 @@ const ja = (d) => {
|
|
|
1569
1569
|
{
|
|
1570
1570
|
label: "Go to",
|
|
1571
1571
|
onChange: (v) => x(v),
|
|
1572
|
-
options:
|
|
1572
|
+
options: H ? Object.values(H).filter((v) => v.name !== c).map((v) => v.name) : [],
|
|
1573
1573
|
value: c
|
|
1574
1574
|
}
|
|
1575
1575
|
) : /* @__PURE__ */ t.jsx(
|
|
1576
1576
|
K,
|
|
1577
1577
|
{
|
|
1578
|
-
onChange: (v) =>
|
|
1579
|
-
value:
|
|
1578
|
+
onChange: (v) => h(v),
|
|
1579
|
+
value: p,
|
|
1580
1580
|
placeholder: "https://",
|
|
1581
1581
|
label: "Link"
|
|
1582
1582
|
}
|
|
@@ -1599,7 +1599,7 @@ const ja = (d) => {
|
|
|
1599
1599
|
}
|
|
1600
1600
|
),
|
|
1601
1601
|
/* @__PURE__ */ t.jsx(
|
|
1602
|
-
|
|
1602
|
+
Ht,
|
|
1603
1603
|
{
|
|
1604
1604
|
typesText: a,
|
|
1605
1605
|
setTypesText: l
|
|
@@ -1609,12 +1609,12 @@ const ja = (d) => {
|
|
|
1609
1609
|
]
|
|
1610
1610
|
}
|
|
1611
1611
|
);
|
|
1612
|
-
}), un = "_subtitle_jql1y_1", mn = "_header_jql1y_8", _n = "_text_jql1y_9",
|
|
1612
|
+
}), un = "_subtitle_jql1y_1", mn = "_header_jql1y_8", _n = "_text_jql1y_9", pn = "_productsBlock_jql1y_10", hn = "_buttonsBlock_jql1y_11", xn = "_top_jql1y_23", gn = "_itemsBlock_jql1y_32", fn = "_typeTexts_jql1y_38", bn = "_block_jql1y_45", vn = "_active_jql1y_58", jn = "_products_jql1y_10", yn = "_product_jql1y_10", kn = "_button_jql1y_11", In = "_image_jql1y_88", $n = "_info_jql1y_95", Nn = "_name_jql1y_107", wn = "_buttons_jql1y_11", Cn = "_modal_jql1y_118", Bn = "_other_jql1y_138", Sn = "_options_jql1y_144", Tn = "_addButton_jql1y_150", Pn = "_deleteButton_jql1y_165", it = {
|
|
1613
1613
|
subtitle: un,
|
|
1614
1614
|
header: mn,
|
|
1615
1615
|
text: _n,
|
|
1616
|
-
productsBlock:
|
|
1617
|
-
buttonsBlock:
|
|
1616
|
+
productsBlock: pn,
|
|
1617
|
+
buttonsBlock: hn,
|
|
1618
1618
|
top: xn,
|
|
1619
1619
|
itemsBlock: gn,
|
|
1620
1620
|
typeTexts: fn,
|
|
@@ -1622,8 +1622,8 @@ const ja = (d) => {
|
|
|
1622
1622
|
active: vn,
|
|
1623
1623
|
products: jn,
|
|
1624
1624
|
product: yn,
|
|
1625
|
-
button:
|
|
1626
|
-
image:
|
|
1625
|
+
button: kn,
|
|
1626
|
+
image: In,
|
|
1627
1627
|
info: $n,
|
|
1628
1628
|
name: Nn,
|
|
1629
1629
|
buttons: wn,
|
|
@@ -1636,7 +1636,7 @@ const ja = (d) => {
|
|
|
1636
1636
|
const { buttons: o, setButtons: e, deletable: s = !0, addable: i = !0 } = d, [a, l] = f.useState(null), [r, n] = f.useState({
|
|
1637
1637
|
top: 0,
|
|
1638
1638
|
left: 0
|
|
1639
|
-
}), [c, x] = f.useState(null),
|
|
1639
|
+
}), [c, x] = f.useState(null), p = f.useRef(null);
|
|
1640
1640
|
f.useEffect(() => {
|
|
1641
1641
|
const _ = () => {
|
|
1642
1642
|
l(null);
|
|
@@ -1650,16 +1650,16 @@ const ja = (d) => {
|
|
|
1650
1650
|
e(_);
|
|
1651
1651
|
}
|
|
1652
1652
|
}, [a]), f.useEffect(() => {
|
|
1653
|
-
if (
|
|
1654
|
-
const _ =
|
|
1653
|
+
if (p.current && c) {
|
|
1654
|
+
const _ = p.current.getBoundingClientRect().height, b = window.innerHeight;
|
|
1655
1655
|
let u = c.top;
|
|
1656
1656
|
u + _ > b + window.scrollY - 200 && (u = b + window.scrollY - _ - 200), u < 0 && (u = 10), n({
|
|
1657
1657
|
top: u,
|
|
1658
1658
|
left: c.left
|
|
1659
1659
|
});
|
|
1660
1660
|
}
|
|
1661
|
-
}, [
|
|
1662
|
-
const
|
|
1661
|
+
}, [p.current, c]);
|
|
1662
|
+
const h = (_, b) => {
|
|
1663
1663
|
_.stopPropagation();
|
|
1664
1664
|
const u = _.target.getBoundingClientRect();
|
|
1665
1665
|
x({
|
|
@@ -1678,10 +1678,10 @@ const ja = (d) => {
|
|
|
1678
1678
|
et,
|
|
1679
1679
|
{
|
|
1680
1680
|
onChange: (b) => {
|
|
1681
|
-
const C = [...o].map((
|
|
1681
|
+
const C = [...o].map((H) => H.id === _.id ? {
|
|
1682
1682
|
..._,
|
|
1683
1683
|
type: b
|
|
1684
|
-
} :
|
|
1684
|
+
} : H);
|
|
1685
1685
|
e(C);
|
|
1686
1686
|
},
|
|
1687
1687
|
value: _.type,
|
|
@@ -1697,7 +1697,7 @@ const ja = (d) => {
|
|
|
1697
1697
|
width: 20,
|
|
1698
1698
|
height: 20,
|
|
1699
1699
|
onClick: (b) => {
|
|
1700
|
-
|
|
1700
|
+
h(b, _);
|
|
1701
1701
|
}
|
|
1702
1702
|
}
|
|
1703
1703
|
) }),
|
|
@@ -1723,7 +1723,7 @@ const ja = (d) => {
|
|
|
1723
1723
|
a && /* @__PURE__ */ t.jsx(
|
|
1724
1724
|
dn,
|
|
1725
1725
|
{
|
|
1726
|
-
ref:
|
|
1726
|
+
ref: p,
|
|
1727
1727
|
activeButton: a,
|
|
1728
1728
|
setActiveButton: l,
|
|
1729
1729
|
popupPosition: r
|
|
@@ -1795,14 +1795,14 @@ const ja = (d) => {
|
|
|
1795
1795
|
}
|
|
1796
1796
|
)
|
|
1797
1797
|
] }) });
|
|
1798
|
-
}, Mn = "_wrapper_m18qi_1", On = "_subtitle_m18qi_7", qn = "_content_m18qi_14", En = "_range_m18qi_22", Dn = "_track_m18qi_27",
|
|
1798
|
+
}, Mn = "_wrapper_m18qi_1", On = "_subtitle_m18qi_7", qn = "_content_m18qi_14", En = "_range_m18qi_22", Dn = "_track_m18qi_27", Ln = "_progress_m18qi_36", Hn = "_dots_m18qi_46", Rn = "_dot_m18qi_46", zn = "_active_m18qi_65", Fn = "_input_m18qi_77", Vn = "_countBlock_m18qi_91", Un = "_count_m18qi_91", Yn = "_controls_m18qi_107", Gn = "_button_m18qi_113", G = {
|
|
1799
1799
|
wrapper: Mn,
|
|
1800
1800
|
subtitle: On,
|
|
1801
1801
|
content: qn,
|
|
1802
1802
|
range: En,
|
|
1803
1803
|
track: Dn,
|
|
1804
|
-
progress:
|
|
1805
|
-
dots:
|
|
1804
|
+
progress: Ln,
|
|
1805
|
+
dots: Hn,
|
|
1806
1806
|
dot: Rn,
|
|
1807
1807
|
active: zn,
|
|
1808
1808
|
input: Fn,
|
|
@@ -1811,9 +1811,9 @@ const ja = (d) => {
|
|
|
1811
1811
|
controls: Yn,
|
|
1812
1812
|
button: Gn
|
|
1813
1813
|
}, Ot = (d) => {
|
|
1814
|
-
const { label: o, min: e = 1, max: s = 4, step: i = 1, count: a, setCount: l } = d, [r, n] = f.useState(!1), c = Array.from({ length: (s - e) / i + 1 }), x = (a - e) / (s - e) * 100,
|
|
1814
|
+
const { label: o, min: e = 1, max: s = 4, step: i = 1, count: a, setCount: l } = d, [r, n] = f.useState(!1), c = Array.from({ length: (s - e) / i + 1 }), x = (a - e) / (s - e) * 100, p = () => {
|
|
1815
1815
|
a < s && l(a + i);
|
|
1816
|
-
},
|
|
1816
|
+
}, h = () => {
|
|
1817
1817
|
a > e && l(a - i);
|
|
1818
1818
|
}, _ = (b) => {
|
|
1819
1819
|
const u = e + b * i;
|
|
@@ -1883,7 +1883,7 @@ const ja = (d) => {
|
|
|
1883
1883
|
/* @__PURE__ */ t.jsx(
|
|
1884
1884
|
"button",
|
|
1885
1885
|
{
|
|
1886
|
-
onClick:
|
|
1886
|
+
onClick: p,
|
|
1887
1887
|
disabled: a >= s,
|
|
1888
1888
|
className: G.button,
|
|
1889
1889
|
"aria-label": "Increment count",
|
|
@@ -1900,7 +1900,7 @@ const ja = (d) => {
|
|
|
1900
1900
|
/* @__PURE__ */ t.jsx(
|
|
1901
1901
|
"button",
|
|
1902
1902
|
{
|
|
1903
|
-
onClick:
|
|
1903
|
+
onClick: h,
|
|
1904
1904
|
disabled: a <= e,
|
|
1905
1905
|
className: G.button,
|
|
1906
1906
|
"aria-label": "Decrement count",
|
|
@@ -1918,7 +1918,7 @@ const ja = (d) => {
|
|
|
1918
1918
|
] })
|
|
1919
1919
|
] })
|
|
1920
1920
|
] });
|
|
1921
|
-
}, Xn = "_title_ix5ax_1", Wn = "_subtitle_ix5ax_5", Jn = "_header_ix5ax_12", Qn = "_text_ix5ax_13", Kn = "_productsBlock_ix5ax_14", Zn = "_top_ix5ax_26", ti = "_itemsBlock_ix5ax_35", ei = "_typeTexts_ix5ax_41", si = "_block_ix5ax_48", ni = "_active_ix5ax_61", ii = "_products_ix5ax_14", oi = "_product_ix5ax_14", ai = "_button_ix5ax_80", ci = "_image_ix5ax_91", li = "_info_ix5ax_98", ri = "_name_ix5ax_110", di = "_buttons_ix5ax_114", ui = "_modal_ix5ax_121", mi = "_link_ix5ax_141", _i = "_modalOptions_ix5ax_147",
|
|
1921
|
+
}, Xn = "_title_ix5ax_1", Wn = "_subtitle_ix5ax_5", Jn = "_header_ix5ax_12", Qn = "_text_ix5ax_13", Kn = "_productsBlock_ix5ax_14", Zn = "_top_ix5ax_26", ti = "_itemsBlock_ix5ax_35", ei = "_typeTexts_ix5ax_41", si = "_block_ix5ax_48", ni = "_active_ix5ax_61", ii = "_products_ix5ax_14", oi = "_product_ix5ax_14", ai = "_button_ix5ax_80", ci = "_image_ix5ax_91", li = "_info_ix5ax_98", ri = "_name_ix5ax_110", di = "_buttons_ix5ax_114", ui = "_modal_ix5ax_121", mi = "_link_ix5ax_141", _i = "_modalOptions_ix5ax_147", pi = "_addButton_ix5ax_160", hi = "_deleteButton_ix5ax_175", xi = "_closeIcon_ix5ax_187", V = {
|
|
1922
1922
|
title: Xn,
|
|
1923
1923
|
subtitle: Wn,
|
|
1924
1924
|
header: Jn,
|
|
@@ -1939,8 +1939,8 @@ const ja = (d) => {
|
|
|
1939
1939
|
modal: ui,
|
|
1940
1940
|
link: mi,
|
|
1941
1941
|
modalOptions: _i,
|
|
1942
|
-
addButton:
|
|
1943
|
-
deleteButton:
|
|
1942
|
+
addButton: pi,
|
|
1943
|
+
deleteButton: hi,
|
|
1944
1944
|
closeIcon: xi
|
|
1945
1945
|
}, gi = (d) => {
|
|
1946
1946
|
const { activeItem: o, setActiveItem: e, popupPosition: s, setIsOpenModal: i, itemsOptions: a } = d, l = a.find((n) => n.id === o.listingId);
|
|
@@ -1993,10 +1993,10 @@ const ja = (d) => {
|
|
|
1993
1993
|
);
|
|
1994
1994
|
};
|
|
1995
1995
|
function fi(d) {
|
|
1996
|
-
const { product: o, children: e } = d, { attributes: s, listeners: i, setNodeRef: a, transform: l, transition: r, isDragging: n } =
|
|
1996
|
+
const { product: o, children: e } = d, { attributes: s, listeners: i, setNodeRef: a, transform: l, transition: r, isDragging: n } = Tt({
|
|
1997
1997
|
id: String(o.listingId)
|
|
1998
1998
|
}), c = {
|
|
1999
|
-
transform:
|
|
1999
|
+
transform: Pt.Transform.toString(l),
|
|
2000
2000
|
transition: r
|
|
2001
2001
|
};
|
|
2002
2002
|
return /* @__PURE__ */ t.jsx(
|
|
@@ -2011,7 +2011,7 @@ function fi(d) {
|
|
|
2011
2011
|
}
|
|
2012
2012
|
);
|
|
2013
2013
|
}
|
|
2014
|
-
const
|
|
2014
|
+
const ka = (d) => {
|
|
2015
2015
|
const {
|
|
2016
2016
|
isActiveItems: o,
|
|
2017
2017
|
setIsActiveItems: e,
|
|
@@ -2023,50 +2023,50 @@ const Ia = (d) => {
|
|
|
2023
2023
|
editable: n = !0,
|
|
2024
2024
|
draggable: c = !1,
|
|
2025
2025
|
withImage: x = !1,
|
|
2026
|
-
deletable:
|
|
2027
|
-
addable:
|
|
2026
|
+
deletable: p = !0,
|
|
2027
|
+
addable: h = !0,
|
|
2028
2028
|
itemsType: _,
|
|
2029
2029
|
itemsOptions: b
|
|
2030
2030
|
} = d, [u, C] = f.useState(
|
|
2031
2031
|
null
|
|
2032
|
-
), [
|
|
2032
|
+
), [H, v] = f.useState({
|
|
2033
2033
|
top: 0,
|
|
2034
2034
|
left: 0
|
|
2035
|
-
}), [O, g] = f.useState(!1), $ =
|
|
2036
|
-
|
|
2035
|
+
}), [O, g] = f.useState(!1), $ = $t(
|
|
2036
|
+
Nt(St, {
|
|
2037
2037
|
activationConstraint: {
|
|
2038
2038
|
distance: 5
|
|
2039
2039
|
}
|
|
2040
2040
|
})
|
|
2041
2041
|
);
|
|
2042
2042
|
f.useEffect(() => {
|
|
2043
|
-
const
|
|
2043
|
+
const k = () => {
|
|
2044
2044
|
C(null), g(!1);
|
|
2045
2045
|
};
|
|
2046
|
-
return document.body.addEventListener("click",
|
|
2047
|
-
C(null), g(!1), document.body.removeEventListener("click",
|
|
2046
|
+
return document.body.addEventListener("click", k), C(null), g(!1), () => {
|
|
2047
|
+
C(null), g(!1), document.body.removeEventListener("click", k);
|
|
2048
2048
|
};
|
|
2049
2049
|
}, []), f.useEffect(() => {
|
|
2050
2050
|
if (u) {
|
|
2051
|
-
const
|
|
2052
|
-
i(
|
|
2051
|
+
const k = [...s].map((A) => A.listingId === u.listingId ? u : A);
|
|
2052
|
+
i(k);
|
|
2053
2053
|
}
|
|
2054
2054
|
}, [u]);
|
|
2055
|
-
const F = (
|
|
2056
|
-
|
|
2057
|
-
const M =
|
|
2055
|
+
const F = (k, A) => {
|
|
2056
|
+
k.stopPropagation();
|
|
2057
|
+
const M = k.target.getBoundingClientRect(), W = 100, T = window.innerHeight;
|
|
2058
2058
|
let R = M.top + window.scrollY;
|
|
2059
2059
|
R + W > T && (R = T - W - 20), g(!0), v({
|
|
2060
2060
|
top: R - 80,
|
|
2061
2061
|
left: M.left - 30
|
|
2062
2062
|
}), C(A);
|
|
2063
2063
|
};
|
|
2064
|
-
function q(
|
|
2064
|
+
function q(k) {
|
|
2065
2065
|
if (x)
|
|
2066
|
-
return
|
|
2066
|
+
return k ? /* @__PURE__ */ t.jsx(
|
|
2067
2067
|
"img",
|
|
2068
2068
|
{
|
|
2069
|
-
src: `https://imagedelivery.net/${
|
|
2069
|
+
src: `https://imagedelivery.net/${k}/w=1000`,
|
|
2070
2070
|
alt: "image",
|
|
2071
2071
|
width: 16,
|
|
2072
2072
|
height: 16
|
|
@@ -2081,8 +2081,8 @@ const Ia = (d) => {
|
|
|
2081
2081
|
}
|
|
2082
2082
|
);
|
|
2083
2083
|
}
|
|
2084
|
-
const X = (
|
|
2085
|
-
const { active: A, over: M } =
|
|
2084
|
+
const X = (k) => {
|
|
2085
|
+
const { active: A, over: M } = k;
|
|
2086
2086
|
if (M && A.id !== M.id) {
|
|
2087
2087
|
const W = s.findIndex((R) => String(R.listingId) === A.id), T = s.findIndex((R) => String(R.listingId) === M.id);
|
|
2088
2088
|
if (W !== -1 && T !== -1) {
|
|
@@ -2090,8 +2090,8 @@ const Ia = (d) => {
|
|
|
2090
2090
|
R.splice(T, 0, Z), i(R);
|
|
2091
2091
|
}
|
|
2092
2092
|
}
|
|
2093
|
-
}, D = (
|
|
2094
|
-
const M = b.find((T) =>
|
|
2093
|
+
}, D = (k, A) => {
|
|
2094
|
+
const M = b.find((T) => k.listingId === T.id);
|
|
2095
2095
|
if (!M) return null;
|
|
2096
2096
|
const W = /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
2097
2097
|
c && /* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
|
|
@@ -2112,7 +2112,7 @@ const Ia = (d) => {
|
|
|
2112
2112
|
const rt = {
|
|
2113
2113
|
listingId: Z.id,
|
|
2114
2114
|
image: Z.productData.images.length > 0 ? Z.productData.images[0].cfId : ""
|
|
2115
|
-
}, y = R.map((P) => P.listingId ===
|
|
2115
|
+
}, y = R.map((P) => P.listingId === k.listingId ? rt : P);
|
|
2116
2116
|
C(rt), i([...y]);
|
|
2117
2117
|
},
|
|
2118
2118
|
value: M.productData.name,
|
|
@@ -2120,7 +2120,7 @@ const Ia = (d) => {
|
|
|
2120
2120
|
...b.filter((T) => !s.find((R) => R.listingId === T.id)).map((T) => T.productData.name)
|
|
2121
2121
|
],
|
|
2122
2122
|
leftAddon: q(
|
|
2123
|
-
|
|
2123
|
+
k.image || M.productData.images.length > 0 && M.productData.images[0].cfId || ""
|
|
2124
2124
|
)
|
|
2125
2125
|
},
|
|
2126
2126
|
A
|
|
@@ -2133,10 +2133,10 @@ const Ia = (d) => {
|
|
|
2133
2133
|
hoverable: !0,
|
|
2134
2134
|
width: 20,
|
|
2135
2135
|
height: 20,
|
|
2136
|
-
onClick: (T) => F(T,
|
|
2136
|
+
onClick: (T) => F(T, k)
|
|
2137
2137
|
}
|
|
2138
2138
|
) }),
|
|
2139
|
-
|
|
2139
|
+
p && /* @__PURE__ */ t.jsx("div", { className: V.deleteButton, children: /* @__PURE__ */ t.jsx(
|
|
2140
2140
|
j,
|
|
2141
2141
|
{
|
|
2142
2142
|
name: "Trash",
|
|
@@ -2144,7 +2144,7 @@ const Ia = (d) => {
|
|
|
2144
2144
|
width: 20,
|
|
2145
2145
|
height: 20,
|
|
2146
2146
|
fill: "#C12A2A",
|
|
2147
|
-
onClick: () => i(s.filter((T) => T !==
|
|
2147
|
+
onClick: () => i(s.filter((T) => T !== k))
|
|
2148
2148
|
}
|
|
2149
2149
|
) })
|
|
2150
2150
|
] })
|
|
@@ -2152,17 +2152,17 @@ const Ia = (d) => {
|
|
|
2152
2152
|
return c ? /* @__PURE__ */ t.jsx(
|
|
2153
2153
|
fi,
|
|
2154
2154
|
{
|
|
2155
|
-
product:
|
|
2155
|
+
product: k,
|
|
2156
2156
|
children: W
|
|
2157
2157
|
},
|
|
2158
|
-
|
|
2158
|
+
k.listingId
|
|
2159
2159
|
) : /* @__PURE__ */ t.jsx(
|
|
2160
2160
|
"div",
|
|
2161
2161
|
{
|
|
2162
2162
|
className: V.product,
|
|
2163
2163
|
children: W
|
|
2164
2164
|
},
|
|
2165
|
-
|
|
2165
|
+
k.listingId
|
|
2166
2166
|
);
|
|
2167
2167
|
};
|
|
2168
2168
|
return /* @__PURE__ */ t.jsxs("div", { className: V.productsBlock, children: [
|
|
@@ -2172,7 +2172,7 @@ const Ia = (d) => {
|
|
|
2172
2172
|
st,
|
|
2173
2173
|
{
|
|
2174
2174
|
current: o,
|
|
2175
|
-
onChange: (
|
|
2175
|
+
onChange: (k) => e == null ? void 0 : e(k)
|
|
2176
2176
|
}
|
|
2177
2177
|
)
|
|
2178
2178
|
] }),
|
|
@@ -2182,28 +2182,28 @@ const Ia = (d) => {
|
|
|
2182
2182
|
activeItem: u,
|
|
2183
2183
|
setActiveItem: C,
|
|
2184
2184
|
setIsOpenModal: g,
|
|
2185
|
-
popupPosition:
|
|
2185
|
+
popupPosition: H,
|
|
2186
2186
|
itemsOptions: b
|
|
2187
2187
|
}
|
|
2188
2188
|
),
|
|
2189
2189
|
/* @__PURE__ */ t.jsxs("div", { className: V.products, children: [
|
|
2190
2190
|
r && /* @__PURE__ */ t.jsx("h5", { className: V.subtitle, children: r }),
|
|
2191
2191
|
c ? /* @__PURE__ */ t.jsx(
|
|
2192
|
-
|
|
2192
|
+
wt,
|
|
2193
2193
|
{
|
|
2194
2194
|
sensors: $,
|
|
2195
2195
|
onDragEnd: X,
|
|
2196
2196
|
children: /* @__PURE__ */ t.jsx(
|
|
2197
|
-
|
|
2197
|
+
Ct,
|
|
2198
2198
|
{
|
|
2199
|
-
items: s.map((
|
|
2200
|
-
strategy:
|
|
2201
|
-
children: s.map((
|
|
2199
|
+
items: s.map((k) => String(k.listingId)),
|
|
2200
|
+
strategy: Bt,
|
|
2201
|
+
children: s.map((k, A) => D(k, A))
|
|
2202
2202
|
}
|
|
2203
2203
|
)
|
|
2204
2204
|
}
|
|
2205
|
-
) : s.map((
|
|
2206
|
-
|
|
2205
|
+
) : s.map((k, A) => D(k, A)),
|
|
2206
|
+
h && /* @__PURE__ */ t.jsx(
|
|
2207
2207
|
"div",
|
|
2208
2208
|
{
|
|
2209
2209
|
style: {
|
|
@@ -2218,16 +2218,16 @@ const Ia = (d) => {
|
|
|
2218
2218
|
className: V.button,
|
|
2219
2219
|
size: "s",
|
|
2220
2220
|
onClick: () => {
|
|
2221
|
-
const
|
|
2221
|
+
const k = [...s];
|
|
2222
2222
|
for (let A = 0; A < b.length; A++)
|
|
2223
2223
|
if (!s.find((M) => M.listingId === b[A].id)) {
|
|
2224
|
-
|
|
2224
|
+
k.push({
|
|
2225
2225
|
listingId: b[A].id,
|
|
2226
2226
|
image: b[A].productData.images.length > 0 ? b[A].productData.images[0].cfId : ""
|
|
2227
2227
|
});
|
|
2228
2228
|
break;
|
|
2229
2229
|
}
|
|
2230
|
-
i(
|
|
2230
|
+
i(k);
|
|
2231
2231
|
},
|
|
2232
2232
|
disabled: s.length === b.length,
|
|
2233
2233
|
style: {
|
|
@@ -2249,15 +2249,15 @@ const Ia = (d) => {
|
|
|
2249
2249
|
}
|
|
2250
2250
|
)
|
|
2251
2251
|
] }),
|
|
2252
|
-
a !== void 0 && /* @__PURE__ */ t.jsx(
|
|
2252
|
+
a !== void 0 && /* @__PURE__ */ t.jsx(yt, { items: a })
|
|
2253
2253
|
] });
|
|
2254
|
-
}, bi = "_options_6cemk_1", vi = "_price_6cemk_12", ji = "_oldPrice_6cemk_19", yi = "_newPrice_6cemk_27",
|
|
2254
|
+
}, bi = "_options_6cemk_1", vi = "_price_6cemk_12", ji = "_oldPrice_6cemk_19", yi = "_newPrice_6cemk_27", ki = "_animate_6cemk_34", Ii = "_appearAndBounce_6cemk_1", $i = "_meta_6cemk_52", Ni = "_info_6cemk_58", wi = "_infoRight_6cemk_66", Ci = "_buttons_6cemk_73", Bi = "_variants_6cemk_80", Si = "_variant_6cemk_80", Ti = "_stock_6cemk_98", Pi = "_variantInfo_6cemk_105", Ai = "_quantity_6cemk_111", Mi = "_count_6cemk_118", Oi = "_focused_6cemk_135", qi = "_button_6cemk_73", Ei = "_activeVariant_6cemk_161", Di = "_chargeTypes_6cemk_165", Li = "_charge_6cemk_165", Hi = "_chargeActive_6cemk_190", Ri = "_title_6cemk_198", w = {
|
|
2255
2255
|
options: bi,
|
|
2256
2256
|
price: vi,
|
|
2257
2257
|
oldPrice: ji,
|
|
2258
2258
|
newPrice: yi,
|
|
2259
|
-
animate:
|
|
2260
|
-
appearAndBounce:
|
|
2259
|
+
animate: ki,
|
|
2260
|
+
appearAndBounce: Ii,
|
|
2261
2261
|
meta: $i,
|
|
2262
2262
|
info: Ni,
|
|
2263
2263
|
infoRight: wi,
|
|
@@ -2272,8 +2272,8 @@ const Ia = (d) => {
|
|
|
2272
2272
|
button: qi,
|
|
2273
2273
|
activeVariant: Ei,
|
|
2274
2274
|
chargeTypes: Di,
|
|
2275
|
-
charge:
|
|
2276
|
-
chargeActive:
|
|
2275
|
+
charge: Li,
|
|
2276
|
+
chargeActive: Hi,
|
|
2277
2277
|
title: Ri
|
|
2278
2278
|
}, zi = "_wrapper_p74l6_1", Fi = "_label_p74l6_9", Vi = "_input_p74l6_18", Ui = "_paddingless_p74l6_31", Yi = "_content_p74l6_35", Gi = "_contentBorder_p74l6_48", Xi = "_borderless_p74l6_53", Wi = "_rightIcon_p74l6_58", nt = {
|
|
2279
2279
|
wrapper: zi,
|
|
@@ -2296,18 +2296,18 @@ const Ia = (d) => {
|
|
|
2296
2296
|
placeholder: n,
|
|
2297
2297
|
disabled: c = !1,
|
|
2298
2298
|
required: x = !1,
|
|
2299
|
-
regex:
|
|
2300
|
-
paddingless:
|
|
2299
|
+
regex: p,
|
|
2300
|
+
paddingless: h = !1,
|
|
2301
2301
|
borderless: _ = !1,
|
|
2302
2302
|
editable: b = !1,
|
|
2303
2303
|
isSearch: u = !1,
|
|
2304
2304
|
centered: C = !1
|
|
2305
|
-
} = d, { themeSettings:
|
|
2305
|
+
} = d, { themeSettings: H } = Et(), { inputs: v } = H, [O, g] = f.useState(!1);
|
|
2306
2306
|
function $(q) {
|
|
2307
2307
|
return Number(q) < 0 ? String(l) : q;
|
|
2308
2308
|
}
|
|
2309
2309
|
function F(q) {
|
|
2310
|
-
return !x || !
|
|
2310
|
+
return !x || !p ? !0 : new RegExp(p).test(q);
|
|
2311
2311
|
}
|
|
2312
2312
|
return /* @__PURE__ */ t.jsxs("div", { className: nt.wrapper, children: [
|
|
2313
2313
|
s && /* @__PURE__ */ t.jsx(
|
|
@@ -2347,7 +2347,7 @@ const Ia = (d) => {
|
|
|
2347
2347
|
placeholder: n || "Type something...",
|
|
2348
2348
|
className: U(nt.input, {
|
|
2349
2349
|
[nt.required]: O && x && !F(i),
|
|
2350
|
-
[nt.paddingless]:
|
|
2350
|
+
[nt.paddingless]: h,
|
|
2351
2351
|
[nt.borderless]: _
|
|
2352
2352
|
}),
|
|
2353
2353
|
min: a === "number" ? l : void 0,
|
|
@@ -2424,16 +2424,16 @@ const Ia = (d) => {
|
|
|
2424
2424
|
);
|
|
2425
2425
|
};
|
|
2426
2426
|
var zt = /* @__PURE__ */ ((d) => (d.ONE_TIME = "One-Time", d.RECURRING = "Subscribe & Save", d))(zt || {});
|
|
2427
|
-
const
|
|
2427
|
+
const Ia = (d) => {
|
|
2428
2428
|
var v, O;
|
|
2429
|
-
const { variants: o } = d, [e, s] = f.useState(o[0]), [i, a] = f.useState(e.chargeTypes[0]), l =
|
|
2429
|
+
const { variants: o } = d, [e, s] = f.useState(o[0]), [i, a] = f.useState(e.chargeTypes[0]), l = jt(), [r, n] = f.useState(1), { reset: c, addProductToCart: x, getProducts: p } = At(), [h, _] = f.useState(!1);
|
|
2430
2430
|
f.useEffect(() => {
|
|
2431
2431
|
_(!0);
|
|
2432
2432
|
const g = setTimeout(() => _(!1), 600);
|
|
2433
2433
|
return () => clearTimeout(g);
|
|
2434
2434
|
}, [r]);
|
|
2435
2435
|
async function b() {
|
|
2436
|
-
await
|
|
2436
|
+
await p(), await x({
|
|
2437
2437
|
productId: d.id,
|
|
2438
2438
|
productVariantId: e.id,
|
|
2439
2439
|
quantity: r
|
|
@@ -2457,7 +2457,7 @@ const ka = (d) => {
|
|
|
2457
2457
|
return `${D} ${D === 1 ? "second" : "seconds"}`;
|
|
2458
2458
|
}
|
|
2459
2459
|
}
|
|
2460
|
-
function
|
|
2460
|
+
function H(g, $) {
|
|
2461
2461
|
return g.length > $ ? g.slice(0, $) + "..." : g;
|
|
2462
2462
|
}
|
|
2463
2463
|
return /* @__PURE__ */ t.jsxs("div", { className: w.options, children: [
|
|
@@ -2483,7 +2483,7 @@ const ka = (d) => {
|
|
|
2483
2483
|
onClick: () => s(g),
|
|
2484
2484
|
children: [
|
|
2485
2485
|
/* @__PURE__ */ t.jsxs("div", { className: w.variantInfo, children: [
|
|
2486
|
-
/* @__PURE__ */ t.jsx("span", { className: w.title, children:
|
|
2486
|
+
/* @__PURE__ */ t.jsx("span", { className: w.title, children: H(g.name, 15) }),
|
|
2487
2487
|
/* @__PURE__ */ t.jsxs("span", { children: [
|
|
2488
2488
|
"$",
|
|
2489
2489
|
i === "ONE_TIME" ? g.price.amount : g.subscriptionSettings ? g.subscriptionSettings.price.amount : "Price Not Found"
|
|
@@ -2554,7 +2554,7 @@ const ka = (d) => {
|
|
|
2554
2554
|
/* @__PURE__ */ t.jsxs("div", { className: w.info, children: [
|
|
2555
2555
|
/* @__PURE__ */ t.jsx("span", { children: "Price" }),
|
|
2556
2556
|
/* @__PURE__ */ t.jsx("div", { className: w.infoRight, children: i === "ONE_TIME" ? e.compareAtPrice && (e.compareAtPrice.amount || 0) - (e.price.amount || 0) > 0 ? /* @__PURE__ */ t.jsxs("div", { className: w.price, children: [
|
|
2557
|
-
/* @__PURE__ */ t.jsxs("span", { className: U(w.newPrice, { [w.animate]:
|
|
2557
|
+
/* @__PURE__ */ t.jsxs("span", { className: U(w.newPrice, { [w.animate]: h }), children: [
|
|
2558
2558
|
"$ ",
|
|
2559
2559
|
(e.price.amount || 0) * r
|
|
2560
2560
|
] }),
|
|
@@ -2562,11 +2562,11 @@ const ka = (d) => {
|
|
|
2562
2562
|
"$ ",
|
|
2563
2563
|
(e.compareAtPrice.amount || 0) * r
|
|
2564
2564
|
] })
|
|
2565
|
-
] }) : /* @__PURE__ */ t.jsxs("span", { className: U(w.newPrice, { [w.animate]:
|
|
2565
|
+
] }) : /* @__PURE__ */ t.jsxs("span", { className: U(w.newPrice, { [w.animate]: h }), children: [
|
|
2566
2566
|
"$ ",
|
|
2567
2567
|
(e.price.amount || 0) * r
|
|
2568
2568
|
] }) : e.subscriptionSettings && e.subscriptionSettings.compareAtPrice && (e.subscriptionSettings.compareAtPrice.amount || 0) - (e.subscriptionSettings.price.amount || 0) > 0 ? /* @__PURE__ */ t.jsxs("div", { className: w.price, children: [
|
|
2569
|
-
/* @__PURE__ */ t.jsxs("span", { className: U(w.newPrice, { [w.animate]:
|
|
2569
|
+
/* @__PURE__ */ t.jsxs("span", { className: U(w.newPrice, { [w.animate]: h }), children: [
|
|
2570
2570
|
"$ ",
|
|
2571
2571
|
e.subscriptionSettings.price.amount || 0
|
|
2572
2572
|
] }),
|
|
@@ -2574,7 +2574,7 @@ const ka = (d) => {
|
|
|
2574
2574
|
"$ ",
|
|
2575
2575
|
e.subscriptionSettings.compareAtPrice.amount || 0
|
|
2576
2576
|
] })
|
|
2577
|
-
] }) : e.subscriptionSettings && /* @__PURE__ */ t.jsxs("span", { className: U(w.newPrice, { [w.animate]:
|
|
2577
|
+
] }) : e.subscriptionSettings && /* @__PURE__ */ t.jsxs("span", { className: U(w.newPrice, { [w.animate]: h }), children: [
|
|
2578
2578
|
"$ ",
|
|
2579
2579
|
e.subscriptionSettings.price.amount || 0
|
|
2580
2580
|
] }) })
|
|
@@ -2599,7 +2599,7 @@ const ka = (d) => {
|
|
|
2599
2599
|
)
|
|
2600
2600
|
] })
|
|
2601
2601
|
] });
|
|
2602
|
-
}, oo = "_button_1tdo3_1", ao = "_login_1tdo3_14", co = "_signUp_1tdo3_18", lo = "_buttons_1tdo3_23", ro = "_modal_1tdo3_32", uo = "_closing_1tdo3_64", mo = "_info_1tdo3_113", _o = "_top_1tdo3_120",
|
|
2602
|
+
}, oo = "_button_1tdo3_1", ao = "_login_1tdo3_14", co = "_signUp_1tdo3_18", lo = "_buttons_1tdo3_23", ro = "_modal_1tdo3_32", uo = "_closing_1tdo3_64", mo = "_info_1tdo3_113", _o = "_top_1tdo3_120", po = "_title_1tdo3_131", ho = "_clear_1tdo3_138", xo = "_activeClear_1tdo3_145", go = "_count_1tdo3_149", fo = "_cart_1tdo3_164", bo = "_empty_1tdo3_172", vo = "_product_1tdo3_198", jo = "_products_1tdo3_207", yo = "_image_1tdo3_215", ko = "_productInfo_1tdo3_221", Io = "_content_1tdo3_228", $o = "_name_1tdo3_234", No = "_price_1tdo3_240", wo = "_productButtons_1tdo3_246", Co = "_productButton_1tdo3_246", Bo = "_productCount_1tdo3_266", So = "_bottom_1tdo3_282", To = "_subtotal_1tdo3_290", Po = "_block_1tdo3_298", Ao = "_shoppingCount_1tdo3_305", Mo = "_total_1tdo3_325", Oo = "_link_1tdo3_331", qo = "_userInfo_1tdo3_338", Eo = "_pagesMobileModal_1tdo3_349", Do = "_pagesMobileModalContent_1tdo3_363", Lo = "_pagesMobileModalHeader_1tdo3_369", Ho = "_pagesMobileModalFooter_1tdo3_379", N = {
|
|
2603
2603
|
button: oo,
|
|
2604
2604
|
login: ao,
|
|
2605
2605
|
signUp: co,
|
|
@@ -2612,8 +2612,8 @@ const ka = (d) => {
|
|
|
2612
2612
|
"slide-out-fade": "_slide-out-fade_1tdo3_1",
|
|
2613
2613
|
info: mo,
|
|
2614
2614
|
top: _o,
|
|
2615
|
-
title:
|
|
2616
|
-
clear:
|
|
2615
|
+
title: po,
|
|
2616
|
+
clear: ho,
|
|
2617
2617
|
activeClear: xo,
|
|
2618
2618
|
count: go,
|
|
2619
2619
|
cart: fo,
|
|
@@ -2621,8 +2621,8 @@ const ka = (d) => {
|
|
|
2621
2621
|
product: vo,
|
|
2622
2622
|
products: jo,
|
|
2623
2623
|
image: yo,
|
|
2624
|
-
productInfo:
|
|
2625
|
-
content:
|
|
2624
|
+
productInfo: ko,
|
|
2625
|
+
content: Io,
|
|
2626
2626
|
name: $o,
|
|
2627
2627
|
price: No,
|
|
2628
2628
|
productButtons: wo,
|
|
@@ -2637,8 +2637,8 @@ const ka = (d) => {
|
|
|
2637
2637
|
userInfo: qo,
|
|
2638
2638
|
pagesMobileModal: Eo,
|
|
2639
2639
|
pagesMobileModalContent: Do,
|
|
2640
|
-
pagesMobileModalHeader:
|
|
2641
|
-
pagesMobileModalFooter:
|
|
2640
|
+
pagesMobileModalHeader: Lo,
|
|
2641
|
+
pagesMobileModalFooter: Ho
|
|
2642
2642
|
};
|
|
2643
2643
|
class gt extends Error {
|
|
2644
2644
|
}
|
|
@@ -2696,16 +2696,16 @@ const $a = (d) => {
|
|
|
2696
2696
|
] });
|
|
2697
2697
|
}, Vo = () => {
|
|
2698
2698
|
const [d, o] = f.useState(!1), [e, s] = f.useState([]), { cart: i, getProducts: a } = At();
|
|
2699
|
-
function l(
|
|
2699
|
+
function l(h) {
|
|
2700
2700
|
for (let _ = 0; _ < i.parts.length; _++)
|
|
2701
|
-
for (let b = 0; b <
|
|
2702
|
-
if (i.parts[_].productVariantId ===
|
|
2701
|
+
for (let b = 0; b < h.variants.length; b++)
|
|
2702
|
+
if (i.parts[_].productVariantId === h.variants[_].id)
|
|
2703
2703
|
return i.parts[_].productVariantId;
|
|
2704
2704
|
}
|
|
2705
|
-
function r(
|
|
2705
|
+
function r(h) {
|
|
2706
2706
|
for (let _ = 0; _ < i.parts.length; _++)
|
|
2707
|
-
for (let b = 0; b <
|
|
2708
|
-
if (i.parts[_].productVariantId ===
|
|
2707
|
+
for (let b = 0; b < h.variants.length; b++)
|
|
2708
|
+
if (i.parts[_].productVariantId === h.variants[_].id)
|
|
2709
2709
|
return i.parts[_].quantity;
|
|
2710
2710
|
}
|
|
2711
2711
|
f.useEffect(() => {
|
|
@@ -2718,11 +2718,11 @@ const $a = (d) => {
|
|
|
2718
2718
|
s(u);
|
|
2719
2719
|
})();
|
|
2720
2720
|
}, [i.parts.length]);
|
|
2721
|
-
function n(
|
|
2721
|
+
function n(h) {
|
|
2722
2722
|
var _;
|
|
2723
|
-
return !
|
|
2723
|
+
return !h || !(h != null && h.variants) ? !1 : (_ = h.variants.find((b) => b.id === h.activeVariantId)) == null ? void 0 : _.subscriptionSettings;
|
|
2724
2724
|
}
|
|
2725
|
-
const c = i.parts.length > 0 && e.length > 0 && !n(e[0]), [x,
|
|
2725
|
+
const c = i.parts.length > 0 && e.length > 0 && !n(e[0]), [x, p] = f.useState(!1);
|
|
2726
2726
|
return /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
2727
2727
|
/* @__PURE__ */ t.jsxs(
|
|
2728
2728
|
tt,
|
|
@@ -2731,8 +2731,8 @@ const $a = (d) => {
|
|
|
2731
2731
|
style: {
|
|
2732
2732
|
padding: 10
|
|
2733
2733
|
},
|
|
2734
|
-
onClick: (
|
|
2735
|
-
|
|
2734
|
+
onClick: (h) => {
|
|
2735
|
+
h.stopPropagation(), window.location.pathname !== "/admin/builder" && (o(!0), p(!0));
|
|
2736
2736
|
},
|
|
2737
2737
|
children: [
|
|
2738
2738
|
/* @__PURE__ */ t.jsx(
|
|
@@ -2750,7 +2750,7 @@ const $a = (d) => {
|
|
|
2750
2750
|
Mt,
|
|
2751
2751
|
{
|
|
2752
2752
|
close: () => {
|
|
2753
|
-
|
|
2753
|
+
p(!1), setTimeout(() => {
|
|
2754
2754
|
o(!1);
|
|
2755
2755
|
}, 300);
|
|
2756
2756
|
},
|
|
@@ -2767,22 +2767,22 @@ const $a = (d) => {
|
|
|
2767
2767
|
)
|
|
2768
2768
|
] });
|
|
2769
2769
|
}, Uo = (d) => {
|
|
2770
|
-
const { activeProducts: o, isCartNotEmpty: e, isOpen: s } = d, { cart: i, reset: a, getTotalAndDiscount: l, updateQuantityOfProduct: r } = At(), n =
|
|
2771
|
-
function c(
|
|
2772
|
-
n(
|
|
2770
|
+
const { activeProducts: o, isCartNotEmpty: e, isOpen: s } = d, { cart: i, reset: a, getTotalAndDiscount: l, updateQuantityOfProduct: r } = At(), n = jt();
|
|
2771
|
+
function c(h) {
|
|
2772
|
+
n(h);
|
|
2773
2773
|
}
|
|
2774
|
-
function x(
|
|
2774
|
+
function x(h) {
|
|
2775
2775
|
r({
|
|
2776
|
-
productId:
|
|
2777
|
-
productVariantId:
|
|
2778
|
-
quantity:
|
|
2776
|
+
productId: h.id,
|
|
2777
|
+
productVariantId: h.activeVariantId,
|
|
2778
|
+
quantity: h.quantity + 1
|
|
2779
2779
|
});
|
|
2780
2780
|
}
|
|
2781
|
-
function h
|
|
2781
|
+
function p(h) {
|
|
2782
2782
|
r({
|
|
2783
|
-
productId:
|
|
2784
|
-
productVariantId:
|
|
2785
|
-
quantity:
|
|
2783
|
+
productId: h.id,
|
|
2784
|
+
productVariantId: h.activeVariantId,
|
|
2785
|
+
quantity: h.quantity - 1
|
|
2786
2786
|
});
|
|
2787
2787
|
}
|
|
2788
2788
|
return /* @__PURE__ */ t.jsxs(
|
|
@@ -2791,7 +2791,7 @@ const $a = (d) => {
|
|
|
2791
2791
|
className: U(N.modal, {
|
|
2792
2792
|
[N.closing]: !s
|
|
2793
2793
|
}),
|
|
2794
|
-
onClick: (
|
|
2794
|
+
onClick: (h) => h.stopPropagation(),
|
|
2795
2795
|
children: [
|
|
2796
2796
|
/* @__PURE__ */ t.jsxs("div", { className: N.top, children: [
|
|
2797
2797
|
/* @__PURE__ */ t.jsxs("div", { className: N.info, children: [
|
|
@@ -2811,7 +2811,7 @@ const $a = (d) => {
|
|
|
2811
2811
|
)
|
|
2812
2812
|
] }),
|
|
2813
2813
|
e ? /* @__PURE__ */ t.jsxs("div", { className: N.cart, children: [
|
|
2814
|
-
/* @__PURE__ */ t.jsx("div", { className: N.products, children: o.map((
|
|
2814
|
+
/* @__PURE__ */ t.jsx("div", { className: N.products, children: o.map((h) => /* @__PURE__ */ t.jsxs(
|
|
2815
2815
|
"div",
|
|
2816
2816
|
{
|
|
2817
2817
|
className: N.product,
|
|
@@ -2820,7 +2820,7 @@ const $a = (d) => {
|
|
|
2820
2820
|
/* @__PURE__ */ t.jsx(
|
|
2821
2821
|
"img",
|
|
2822
2822
|
{
|
|
2823
|
-
src: `https://imagedelivery.net/${
|
|
2823
|
+
src: `https://imagedelivery.net/${h.images[0].cfId}/w=500`,
|
|
2824
2824
|
alt: "image",
|
|
2825
2825
|
width: "100%",
|
|
2826
2826
|
height: "100%",
|
|
@@ -2828,10 +2828,10 @@ const $a = (d) => {
|
|
|
2828
2828
|
}
|
|
2829
2829
|
),
|
|
2830
2830
|
/* @__PURE__ */ t.jsxs("div", { className: N.content, children: [
|
|
2831
|
-
/* @__PURE__ */ t.jsx("div", { className: N.name, children:
|
|
2831
|
+
/* @__PURE__ */ t.jsx("div", { className: N.name, children: h.name }),
|
|
2832
2832
|
/* @__PURE__ */ t.jsxs("div", { className: N.price, children: [
|
|
2833
2833
|
"$",
|
|
2834
|
-
|
|
2834
|
+
h.variants.find((_) => _.id === h.activeVariantId).price.amount * ((h == null ? void 0 : h.quantity) || 1)
|
|
2835
2835
|
] })
|
|
2836
2836
|
] })
|
|
2837
2837
|
] }),
|
|
@@ -2840,7 +2840,7 @@ const $a = (d) => {
|
|
|
2840
2840
|
"div",
|
|
2841
2841
|
{
|
|
2842
2842
|
onClick: () => {
|
|
2843
|
-
|
|
2843
|
+
h.quantity !== 1 && p(h);
|
|
2844
2844
|
},
|
|
2845
2845
|
className: N.productButton,
|
|
2846
2846
|
children: /* @__PURE__ */ t.jsx(
|
|
@@ -2854,11 +2854,11 @@ const $a = (d) => {
|
|
|
2854
2854
|
)
|
|
2855
2855
|
}
|
|
2856
2856
|
),
|
|
2857
|
-
/* @__PURE__ */ t.jsx("div", { className: N.productCount, children:
|
|
2857
|
+
/* @__PURE__ */ t.jsx("div", { className: N.productCount, children: h.quantity }),
|
|
2858
2858
|
/* @__PURE__ */ t.jsx(
|
|
2859
2859
|
"div",
|
|
2860
2860
|
{
|
|
2861
|
-
onClick: () => x(
|
|
2861
|
+
onClick: () => x(h),
|
|
2862
2862
|
className: N.productButton,
|
|
2863
2863
|
children: /* @__PURE__ */ t.jsx(
|
|
2864
2864
|
j,
|
|
@@ -2874,7 +2874,7 @@ const $a = (d) => {
|
|
|
2874
2874
|
] })
|
|
2875
2875
|
]
|
|
2876
2876
|
},
|
|
2877
|
-
|
|
2877
|
+
h.id
|
|
2878
2878
|
)) }),
|
|
2879
2879
|
/* @__PURE__ */ t.jsxs("div", { className: N.bottom, children: [
|
|
2880
2880
|
/* @__PURE__ */ t.jsxs("div", { className: N.subtotal, children: [
|
|
@@ -2923,7 +2923,7 @@ const $a = (d) => {
|
|
|
2923
2923
|
)
|
|
2924
2924
|
] })
|
|
2925
2925
|
] }), Ft = ({ signUp: d }) => {
|
|
2926
|
-
const o = JSON.parse(localStorage.getItem("token") || "{}"), { data: e } = o, s =
|
|
2926
|
+
const o = JSON.parse(localStorage.getItem("token") || "{}"), { data: e } = o, s = jt();
|
|
2927
2927
|
function i(r) {
|
|
2928
2928
|
s(r);
|
|
2929
2929
|
}
|
|
@@ -3057,7 +3057,7 @@ const $a = (d) => {
|
|
|
3057
3057
|
copyTextMobile: ia,
|
|
3058
3058
|
copyTextMiniMobile: oa
|
|
3059
3059
|
}, wa = () => {
|
|
3060
|
-
const { isOpenModal: d, setIsOpenModal: o } =
|
|
3060
|
+
const { isOpenModal: d, setIsOpenModal: o } = Lt();
|
|
3061
3061
|
function e() {
|
|
3062
3062
|
o(!0);
|
|
3063
3063
|
}
|
|
@@ -3083,7 +3083,7 @@ const $a = (d) => {
|
|
|
3083
3083
|
d && /* @__PURE__ */ t.jsx(Mt, { close: o, children: /* @__PURE__ */ t.jsx(aa, {}) })
|
|
3084
3084
|
] });
|
|
3085
3085
|
}, aa = () => {
|
|
3086
|
-
const { setIsOpenModal: d } =
|
|
3086
|
+
const { setIsOpenModal: d } = Lt(), { notification: o, setNotification: e } = Ut(), { setIsOpen: s } = Dt(), i = window.location.href;
|
|
3087
3087
|
function a() {
|
|
3088
3088
|
navigator.clipboard.writeText(i), e({
|
|
3089
3089
|
message: "Link copied to clipboard",
|
|
@@ -3178,12 +3178,27 @@ const $a = (d) => {
|
|
|
3178
3178
|
}
|
|
3179
3179
|
)
|
|
3180
3180
|
] });
|
|
3181
|
-
},
|
|
3181
|
+
}, Ba = ({ children: d, path: o, className: e, target: s = "_self", id: i }) => {
|
|
3182
|
+
const a = jt(), l = /^https?:\/\//.test(o), r = (n) => {
|
|
3183
|
+
l || s === "_blank" ? s === "_blank" ? window.open(o, "_blank") : window.location.href = o : (n.preventDefault(), a(o, { replace: !0 }));
|
|
3184
|
+
};
|
|
3185
|
+
return /* @__PURE__ */ t.jsx(
|
|
3186
|
+
"div",
|
|
3187
|
+
{
|
|
3188
|
+
onClick: r,
|
|
3189
|
+
className: e,
|
|
3190
|
+
role: "link",
|
|
3191
|
+
style: { cursor: "pointer" },
|
|
3192
|
+
id: i,
|
|
3193
|
+
children: d
|
|
3194
|
+
}
|
|
3195
|
+
);
|
|
3196
|
+
}, ma = "_wrapper_st58d_1", _a = "_label_st58d_10", pa = "_textarea_st58d_18", ha = "_length_st58d_33", vt = {
|
|
3182
3197
|
wrapper: ma,
|
|
3183
3198
|
label: _a,
|
|
3184
|
-
textarea:
|
|
3185
|
-
length:
|
|
3186
|
-
},
|
|
3199
|
+
textarea: pa,
|
|
3200
|
+
length: ha
|
|
3201
|
+
}, Sa = (d) => {
|
|
3187
3202
|
const { onChange: o, label: e, value: s, maxLength: i, placeholder: a = "Type something..." } = d, [l, r] = f.useState(s.length);
|
|
3188
3203
|
return /* @__PURE__ */ t.jsxs("div", { className: vt.wrapper, children: [
|
|
3189
3204
|
e && /* @__PURE__ */ t.jsx(
|
|
@@ -3222,7 +3237,7 @@ export {
|
|
|
3222
3237
|
ya as ButtonsSettings,
|
|
3223
3238
|
va as CategorySettings,
|
|
3224
3239
|
ft as ChooseImage,
|
|
3225
|
-
|
|
3240
|
+
Aa as ChooseImageModal,
|
|
3226
3241
|
Yo as EmptyCart,
|
|
3227
3242
|
ja as FormSettings,
|
|
3228
3243
|
$a as HeaderButtons,
|
|
@@ -3231,12 +3246,13 @@ export {
|
|
|
3231
3246
|
Ji as InputUI,
|
|
3232
3247
|
Ue as ItemsSettings,
|
|
3233
3248
|
ba as LayoutSettings,
|
|
3234
|
-
|
|
3235
|
-
|
|
3249
|
+
Ba as Link,
|
|
3250
|
+
ka as ListingSelector,
|
|
3251
|
+
Ma as Loader,
|
|
3236
3252
|
Mt as Modal,
|
|
3237
3253
|
Na as PagesMobileMenu,
|
|
3238
3254
|
Go as PagesMobileModal,
|
|
3239
|
-
|
|
3255
|
+
Ia as ProductOptions,
|
|
3240
3256
|
Ot as RangeSelector,
|
|
3241
3257
|
et as Select,
|
|
3242
3258
|
wa as ShareLink,
|
|
@@ -3245,7 +3261,7 @@ export {
|
|
|
3245
3261
|
st as Switch,
|
|
3246
3262
|
Rt as TextSettings,
|
|
3247
3263
|
qt as TextareaSettings,
|
|
3248
|
-
|
|
3249
|
-
|
|
3264
|
+
Sa as TextareaUI,
|
|
3265
|
+
Ht as TypesText,
|
|
3250
3266
|
Ft as UserInfo
|
|
3251
3267
|
};
|