@billgangcom/theme-lib 1.71.2 → 1.71.4
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/App.d.ts +2 -1
- package/dist/builder/constants/index.d.ts +1 -0
- package/dist/builder/constants/text-font-keys.d.ts +3 -0
- package/dist/builder/ui/Tip/index.d.ts +1 -0
- package/dist/builder.cjs.js +12 -12
- package/dist/builder.es.js +1964 -1761
- package/dist/{index-CsYad-dm.cjs → index-CaD3TDmt.cjs} +28 -28
- package/dist/{index-ChzUc1hG.js → index-PIQNHMY6.js} +3981 -3635
- package/dist/index.cjs.js +1 -1
- package/dist/index.es.js +6 -6
- package/dist/lib/createTicket.d.ts +1 -1
- package/dist/storefront/components/StatItem/index.d.ts +1 -1
- package/dist/storefront/components/Table/index.d.ts +1 -0
- package/dist/ui/ItemsSettings/index.d.ts +3 -1
- package/dist/ui/ItemsSettings/popup.d.ts +6 -1
- package/dist/ui/SelectTypeText/index.d.ts +8 -0
- package/dist/ui/TextSettings/index.d.ts +1 -2
- package/dist/ui/index.d.ts +1 -0
- package/dist/ui.cjs.js +1 -1
- package/dist/ui.es.js +1219 -1017
- package/package.json +1 -1
package/dist/ui.es.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { j as t, I
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
1
|
+
import { j as t, I, c as H, d as Nt, e as pt, g as mt, P as gt, S as lt, h as wt, D as ft, i as xt, v as _t, B as dt, k as at, a as Pt, l as kt, O as ht, m as J, n as yt, C as jt, o as V, p as Ot, q as At, r as vt, t as Dt, w as bt, x as W, L as Et, y as Ct, z as St, A as ct, s as it, f as Q, E as Rt, F as R, G as Lt, M as ut, H as Ut, J as rt, K as Tt, N as zt, Q as Mt, T as Ft, U as Bt, V as Ht } from "./index-PIQNHMY6.js";
|
|
2
|
+
import { a4 as ti, $ as ei, Z as si, a3 as ni, a2 as ii, Y as ai, _ as oi, W as ci, X as ri, a0 as li, a1 as di } from "./index-PIQNHMY6.js";
|
|
3
|
+
import y from "react";
|
|
4
4
|
import "react-dom";
|
|
5
5
|
const Vt = "_block_kh9z8_8", Yt = "_title_kh9z8_16", Gt = "_subtitle_kh9z8_23", Wt = "_alignmentContent_kh9z8_30", Xt = "_alignments_kh9z8_39", Qt = "_alignment_kh9z8_30", Jt = "_circle_kh9z8_64", Kt = "_paddings_kh9z8_71", Zt = "_padding_kh9z8_71", te = "_active_kh9z8_97", G = {
|
|
6
6
|
block: Vt,
|
|
@@ -23,16 +23,16 @@ const Vt = "_block_kh9z8_8", Yt = "_title_kh9z8_16", Gt = "_subtitle_kh9z8_23",
|
|
|
23
23
|
"bottomLeft",
|
|
24
24
|
"bottom",
|
|
25
25
|
"bottomRight"
|
|
26
|
-
], se = ["left", "top", "right", "bottom"],
|
|
26
|
+
], se = ["left", "top", "right", "bottom"], En = (h) => {
|
|
27
27
|
const {
|
|
28
|
-
alignment:
|
|
28
|
+
alignment: n,
|
|
29
29
|
padding: a,
|
|
30
30
|
setPadding: s,
|
|
31
31
|
setAlignment: e,
|
|
32
32
|
isAlignment: r = !0,
|
|
33
|
-
isPadding:
|
|
33
|
+
isPadding: o = !0
|
|
34
34
|
} = h;
|
|
35
|
-
function
|
|
35
|
+
function x(d) {
|
|
36
36
|
switch (d) {
|
|
37
37
|
case "left":
|
|
38
38
|
case "topLeft":
|
|
@@ -50,7 +50,7 @@ const Vt = "_block_kh9z8_8", Yt = "_title_kh9z8_16", Gt = "_subtitle_kh9z8_23",
|
|
|
50
50
|
return "TextAlignCenter";
|
|
51
51
|
}
|
|
52
52
|
}
|
|
53
|
-
function
|
|
53
|
+
function v(d) {
|
|
54
54
|
switch (d) {
|
|
55
55
|
case "left":
|
|
56
56
|
return "AlignLeft";
|
|
@@ -62,7 +62,7 @@ const Vt = "_block_kh9z8_8", Yt = "_title_kh9z8_16", Gt = "_subtitle_kh9z8_23",
|
|
|
62
62
|
return "AlignBottom";
|
|
63
63
|
}
|
|
64
64
|
}
|
|
65
|
-
const [
|
|
65
|
+
const [b, M] = y.useState(null), [j, m] = y.useState(null);
|
|
66
66
|
return /* @__PURE__ */ t.jsxs("div", { className: G.layout, children: [
|
|
67
67
|
/* @__PURE__ */ t.jsx("h3", { className: G.title, children: "Layout (for Desktop version)" }),
|
|
68
68
|
/* @__PURE__ */ t.jsxs("div", { className: G.alignmentContent, children: [
|
|
@@ -76,26 +76,26 @@ const Vt = "_block_kh9z8_8", Yt = "_title_kh9z8_16", Gt = "_subtitle_kh9z8_23",
|
|
|
76
76
|
},
|
|
77
77
|
className: G.alignment,
|
|
78
78
|
onMouseEnter: () => {
|
|
79
|
-
|
|
79
|
+
M(d);
|
|
80
80
|
},
|
|
81
81
|
onMouseLeave: () => {
|
|
82
|
-
|
|
82
|
+
M(null);
|
|
83
83
|
},
|
|
84
84
|
children: [
|
|
85
|
-
d !==
|
|
86
|
-
d !==
|
|
87
|
-
|
|
85
|
+
d !== n && b !== d && /* @__PURE__ */ t.jsx("div", { className: G.circle }),
|
|
86
|
+
d !== n && b === d && /* @__PURE__ */ t.jsx(
|
|
87
|
+
I,
|
|
88
88
|
{
|
|
89
|
-
name:
|
|
89
|
+
name: x(b),
|
|
90
90
|
fill: "#c2c2c2",
|
|
91
91
|
width: 22,
|
|
92
92
|
height: 22
|
|
93
93
|
}
|
|
94
94
|
),
|
|
95
|
-
d ===
|
|
96
|
-
|
|
95
|
+
d === n && /* @__PURE__ */ t.jsx(
|
|
96
|
+
I,
|
|
97
97
|
{
|
|
98
|
-
name:
|
|
98
|
+
name: x(n),
|
|
99
99
|
fill: "#FF3F19",
|
|
100
100
|
width: 22,
|
|
101
101
|
height: 22
|
|
@@ -106,13 +106,13 @@ const Vt = "_block_kh9z8_8", Yt = "_title_kh9z8_16", Gt = "_subtitle_kh9z8_23",
|
|
|
106
106
|
d
|
|
107
107
|
)) })
|
|
108
108
|
] }),
|
|
109
|
-
|
|
109
|
+
o && /* @__PURE__ */ t.jsxs("div", { className: G.block, children: [
|
|
110
110
|
/* @__PURE__ */ t.jsx("h5", { className: G.subtitle, children: "Paddings" }),
|
|
111
111
|
/* @__PURE__ */ t.jsx("div", { className: G.paddings, children: se.map((d) => /* @__PURE__ */ t.jsxs(
|
|
112
112
|
"label",
|
|
113
113
|
{
|
|
114
|
-
className:
|
|
115
|
-
[G.active]:
|
|
114
|
+
className: H(G.padding, {
|
|
115
|
+
[G.active]: j === d
|
|
116
116
|
}),
|
|
117
117
|
onFocus: () => {
|
|
118
118
|
m(d);
|
|
@@ -122,9 +122,9 @@ const Vt = "_block_kh9z8_8", Yt = "_title_kh9z8_16", Gt = "_subtitle_kh9z8_23",
|
|
|
122
122
|
},
|
|
123
123
|
children: [
|
|
124
124
|
/* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
|
|
125
|
-
|
|
125
|
+
I,
|
|
126
126
|
{
|
|
127
|
-
name:
|
|
127
|
+
name: v(d),
|
|
128
128
|
width: 20,
|
|
129
129
|
height: 20
|
|
130
130
|
}
|
|
@@ -163,71 +163,71 @@ const Vt = "_block_kh9z8_8", Yt = "_title_kh9z8_16", Gt = "_subtitle_kh9z8_23",
|
|
|
163
163
|
addButton: he,
|
|
164
164
|
deleteButton: pe
|
|
165
165
|
};
|
|
166
|
-
function me({ id: h, children:
|
|
166
|
+
function me({ id: h, children: n }) {
|
|
167
167
|
const {
|
|
168
168
|
attributes: a,
|
|
169
169
|
listeners: s,
|
|
170
170
|
setNodeRef: e,
|
|
171
171
|
transform: r,
|
|
172
|
-
transition:
|
|
173
|
-
isDragging:
|
|
174
|
-
} =
|
|
172
|
+
transition: o,
|
|
173
|
+
isDragging: x
|
|
174
|
+
} = yt({
|
|
175
175
|
id: h
|
|
176
|
-
}),
|
|
177
|
-
transform:
|
|
178
|
-
transition:
|
|
176
|
+
}), v = {
|
|
177
|
+
transform: jt.Transform.toString(r),
|
|
178
|
+
transition: o
|
|
179
179
|
};
|
|
180
180
|
return /* @__PURE__ */ t.jsx(
|
|
181
181
|
"div",
|
|
182
182
|
{
|
|
183
183
|
ref: e,
|
|
184
|
-
style:
|
|
185
|
-
className: `${X.product} ${
|
|
184
|
+
style: v,
|
|
185
|
+
className: `${X.product} ${x ? X.dragging : ""}`,
|
|
186
186
|
...a,
|
|
187
187
|
...s,
|
|
188
|
-
children:
|
|
188
|
+
children: n
|
|
189
189
|
}
|
|
190
190
|
);
|
|
191
191
|
}
|
|
192
|
-
const
|
|
192
|
+
const Rn = (h) => {
|
|
193
193
|
const {
|
|
194
|
-
isActiveItems:
|
|
194
|
+
isActiveItems: n,
|
|
195
195
|
setIsActiveItems: a,
|
|
196
196
|
items: s,
|
|
197
197
|
setItems: e,
|
|
198
198
|
other: r,
|
|
199
|
-
tags:
|
|
200
|
-
title:
|
|
201
|
-
subtitle:
|
|
202
|
-
draggable:
|
|
203
|
-
withImage:
|
|
204
|
-
addable:
|
|
199
|
+
tags: o,
|
|
200
|
+
title: x,
|
|
201
|
+
subtitle: v,
|
|
202
|
+
draggable: b = !1,
|
|
203
|
+
withImage: M = !1,
|
|
204
|
+
addable: j = !0,
|
|
205
205
|
itemsOptions: m,
|
|
206
206
|
hasRangeSelector: d = !1,
|
|
207
207
|
rangeSelectorOptions: l,
|
|
208
|
-
limit:
|
|
209
|
-
autoScrollInterval:
|
|
210
|
-
deletable:
|
|
211
|
-
aspectRatio:
|
|
212
|
-
setAspectRatio:
|
|
213
|
-
} = h,
|
|
208
|
+
limit: g,
|
|
209
|
+
autoScrollInterval: c,
|
|
210
|
+
deletable: i,
|
|
211
|
+
aspectRatio: _,
|
|
212
|
+
setAspectRatio: S
|
|
213
|
+
} = h, L = pt(
|
|
214
214
|
mt(gt, {
|
|
215
215
|
activationConstraint: {
|
|
216
216
|
distance: 5
|
|
217
217
|
}
|
|
218
218
|
})
|
|
219
|
-
),
|
|
220
|
-
const { active:
|
|
221
|
-
if (
|
|
222
|
-
const
|
|
223
|
-
if (
|
|
224
|
-
const
|
|
225
|
-
|
|
219
|
+
), E = (p) => {
|
|
220
|
+
const { active: w, over: T } = p;
|
|
221
|
+
if (T && w.id !== T.id) {
|
|
222
|
+
const $ = s.findIndex((O) => O === w.id), C = s.findIndex((O) => O === T.id);
|
|
223
|
+
if ($ !== -1 && C !== -1) {
|
|
224
|
+
const O = [...s], [N] = O.splice($, 1);
|
|
225
|
+
O.splice(C, 0, N), e(O);
|
|
226
226
|
}
|
|
227
227
|
}
|
|
228
228
|
};
|
|
229
229
|
function K(p) {
|
|
230
|
-
if (
|
|
230
|
+
if (M)
|
|
231
231
|
return p ? /* @__PURE__ */ t.jsx(
|
|
232
232
|
"img",
|
|
233
233
|
{
|
|
@@ -237,7 +237,7 @@ const En = (h) => {
|
|
|
237
237
|
height: 16
|
|
238
238
|
}
|
|
239
239
|
) : /* @__PURE__ */ t.jsx(
|
|
240
|
-
|
|
240
|
+
I,
|
|
241
241
|
{
|
|
242
242
|
name: "Image",
|
|
243
243
|
width: 16,
|
|
@@ -246,12 +246,12 @@ const En = (h) => {
|
|
|
246
246
|
}
|
|
247
247
|
);
|
|
248
248
|
}
|
|
249
|
-
const
|
|
250
|
-
const
|
|
251
|
-
if (!
|
|
252
|
-
const
|
|
253
|
-
|
|
254
|
-
|
|
249
|
+
const f = (p, w = !1) => {
|
|
250
|
+
const T = m.find((C) => C.id === p);
|
|
251
|
+
if (!T) return;
|
|
252
|
+
const $ = /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
253
|
+
b && /* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
|
|
254
|
+
I,
|
|
255
255
|
{
|
|
256
256
|
name: "DotsSixVertical",
|
|
257
257
|
hoverable: !0,
|
|
@@ -262,78 +262,78 @@ const En = (h) => {
|
|
|
262
262
|
/* @__PURE__ */ t.jsx(
|
|
263
263
|
at,
|
|
264
264
|
{
|
|
265
|
-
onChange: (
|
|
266
|
-
const
|
|
267
|
-
if (!
|
|
268
|
-
const A =
|
|
269
|
-
e([...
|
|
265
|
+
onChange: (C) => {
|
|
266
|
+
const O = [...s], N = m.find((u) => u.name === C);
|
|
267
|
+
if (!N) return;
|
|
268
|
+
const A = N.id, F = O.map((u) => u === p ? A : u);
|
|
269
|
+
e([...F]);
|
|
270
270
|
},
|
|
271
|
-
value:
|
|
272
|
-
options: m.filter((
|
|
273
|
-
leftAddonOptions: m.map((
|
|
274
|
-
value:
|
|
275
|
-
addon: K(
|
|
271
|
+
value: T.name,
|
|
272
|
+
options: m.filter((C) => !s.find((O) => O === C.id)).map((C) => C.name),
|
|
273
|
+
leftAddonOptions: m.map((C) => ({
|
|
274
|
+
value: C.name,
|
|
275
|
+
addon: K(C.images)
|
|
276
276
|
}))
|
|
277
277
|
}
|
|
278
278
|
),
|
|
279
|
-
|
|
280
|
-
|
|
279
|
+
w && /* @__PURE__ */ t.jsx("div", { className: X.buttons, children: /* @__PURE__ */ t.jsx("div", { className: X.deleteButton, children: /* @__PURE__ */ t.jsx(
|
|
280
|
+
I,
|
|
281
281
|
{
|
|
282
282
|
name: "Trash",
|
|
283
283
|
hoverable: !0,
|
|
284
284
|
width: 20,
|
|
285
285
|
height: 20,
|
|
286
286
|
fill: "#C12A2A",
|
|
287
|
-
onClick: () => e(s.filter((
|
|
287
|
+
onClick: () => e(s.filter((C) => C !== p))
|
|
288
288
|
}
|
|
289
289
|
) }) })
|
|
290
290
|
] });
|
|
291
|
-
return
|
|
291
|
+
return b ? /* @__PURE__ */ t.jsx(
|
|
292
292
|
me,
|
|
293
293
|
{
|
|
294
294
|
id: p,
|
|
295
|
-
children:
|
|
295
|
+
children: $
|
|
296
296
|
},
|
|
297
297
|
J()
|
|
298
298
|
) : /* @__PURE__ */ t.jsx(
|
|
299
299
|
"div",
|
|
300
300
|
{
|
|
301
301
|
className: X.product,
|
|
302
|
-
children:
|
|
302
|
+
children: $
|
|
303
303
|
},
|
|
304
304
|
J()
|
|
305
305
|
);
|
|
306
306
|
};
|
|
307
307
|
return /* @__PURE__ */ t.jsxs("div", { className: X.productsBlock, children: [
|
|
308
|
-
(
|
|
309
|
-
|
|
310
|
-
|
|
308
|
+
(x || n !== void 0) && /* @__PURE__ */ t.jsxs("div", { className: X.top, children: [
|
|
309
|
+
x && /* @__PURE__ */ t.jsx("h3", { className: X.title, children: x }),
|
|
310
|
+
n !== void 0 && /* @__PURE__ */ t.jsx(
|
|
311
311
|
lt,
|
|
312
312
|
{
|
|
313
|
-
current:
|
|
313
|
+
current: n,
|
|
314
314
|
onChange: (p) => a == null ? void 0 : a(p)
|
|
315
315
|
}
|
|
316
316
|
)
|
|
317
317
|
] }),
|
|
318
|
-
d && l && /* @__PURE__ */ t.jsx(
|
|
318
|
+
d && l && /* @__PURE__ */ t.jsx(wt, { ...l }),
|
|
319
319
|
/* @__PURE__ */ t.jsxs("div", { className: X.products, children: [
|
|
320
|
-
|
|
321
|
-
|
|
320
|
+
v && /* @__PURE__ */ t.jsx("h5", { className: X.subtitle, children: v }),
|
|
321
|
+
b ? /* @__PURE__ */ t.jsx(
|
|
322
322
|
ft,
|
|
323
323
|
{
|
|
324
|
-
sensors:
|
|
325
|
-
onDragEnd:
|
|
324
|
+
sensors: L,
|
|
325
|
+
onDragEnd: E,
|
|
326
326
|
children: /* @__PURE__ */ t.jsx(
|
|
327
327
|
xt,
|
|
328
328
|
{
|
|
329
329
|
items: s,
|
|
330
330
|
strategy: _t,
|
|
331
|
-
children: s.map((p) =>
|
|
331
|
+
children: s.map((p) => f(p, i))
|
|
332
332
|
}
|
|
333
333
|
)
|
|
334
334
|
}
|
|
335
|
-
) : s.map((p) =>
|
|
336
|
-
|
|
335
|
+
) : s.map((p) => f(p, i)),
|
|
336
|
+
j && /* @__PURE__ */ t.jsx(
|
|
337
337
|
"div",
|
|
338
338
|
{
|
|
339
339
|
style: {
|
|
@@ -346,22 +346,22 @@ const En = (h) => {
|
|
|
346
346
|
dt,
|
|
347
347
|
{
|
|
348
348
|
withoutHover: !0,
|
|
349
|
-
className:
|
|
350
|
-
[X.disabled]: !!(
|
|
349
|
+
className: H(X.button, {
|
|
350
|
+
[X.disabled]: !!(g && g <= s.length || s.length === m.length)
|
|
351
351
|
}),
|
|
352
352
|
size: "s",
|
|
353
|
-
disabled: !!(
|
|
353
|
+
disabled: !!(g && g <= s.length || s.length === m.length),
|
|
354
354
|
onClick: () => {
|
|
355
355
|
const p = [...s];
|
|
356
|
-
let
|
|
356
|
+
let w = null;
|
|
357
357
|
if (m) {
|
|
358
|
-
for (let
|
|
359
|
-
if (!s.find((
|
|
360
|
-
|
|
358
|
+
for (let T = 0; T < m.length; T++)
|
|
359
|
+
if (!s.find(($) => $ === m[T].id)) {
|
|
360
|
+
w = m[T];
|
|
361
361
|
break;
|
|
362
362
|
}
|
|
363
363
|
}
|
|
364
|
-
p.push((
|
|
364
|
+
p.push((w == null ? void 0 : w.id) || m[0].id), e(p);
|
|
365
365
|
},
|
|
366
366
|
style: {
|
|
367
367
|
width: "fit-content"
|
|
@@ -369,7 +369,7 @@ const En = (h) => {
|
|
|
369
369
|
children: /* @__PURE__ */ t.jsxs("div", { className: X.addButton, children: [
|
|
370
370
|
/* @__PURE__ */ t.jsx("span", { children: "Add Option" }),
|
|
371
371
|
/* @__PURE__ */ t.jsx(
|
|
372
|
-
|
|
372
|
+
I,
|
|
373
373
|
{
|
|
374
374
|
name: "Plus",
|
|
375
375
|
width: 16,
|
|
@@ -382,21 +382,21 @@ const En = (h) => {
|
|
|
382
382
|
}
|
|
383
383
|
)
|
|
384
384
|
] }),
|
|
385
|
-
|
|
385
|
+
_ && S && /* @__PURE__ */ t.jsx(
|
|
386
386
|
at,
|
|
387
387
|
{
|
|
388
|
-
value:
|
|
388
|
+
value: _,
|
|
389
389
|
label: "Aspect Ratio",
|
|
390
|
-
options: Object.keys(
|
|
391
|
-
onChange: (p) =>
|
|
392
|
-
leftAddonOptions:
|
|
390
|
+
options: Object.keys(kt),
|
|
391
|
+
onChange: (p) => S(p),
|
|
392
|
+
leftAddonOptions: Pt
|
|
393
393
|
}
|
|
394
394
|
),
|
|
395
|
-
|
|
395
|
+
o !== void 0 && /* @__PURE__ */ t.jsx(
|
|
396
396
|
ht,
|
|
397
397
|
{
|
|
398
398
|
tagsTitle: "Tags",
|
|
399
|
-
items:
|
|
399
|
+
items: o
|
|
400
400
|
}
|
|
401
401
|
),
|
|
402
402
|
r !== void 0 && /* @__PURE__ */ t.jsx(
|
|
@@ -406,13 +406,13 @@ const En = (h) => {
|
|
|
406
406
|
items: r
|
|
407
407
|
}
|
|
408
408
|
),
|
|
409
|
-
|
|
409
|
+
c !== void 0 && /* @__PURE__ */ t.jsx(
|
|
410
410
|
Nt,
|
|
411
411
|
{
|
|
412
412
|
label: "Auto scroll interval",
|
|
413
413
|
type: "number",
|
|
414
|
-
value: String(
|
|
415
|
-
onChange: (p) =>
|
|
414
|
+
value: String(c.scrollInterval),
|
|
415
|
+
onChange: (p) => c.setScrollInterval(Number(p)),
|
|
416
416
|
min: 0.1,
|
|
417
417
|
max: 100,
|
|
418
418
|
style: {
|
|
@@ -422,96 +422,96 @@ const En = (h) => {
|
|
|
422
422
|
}
|
|
423
423
|
)
|
|
424
424
|
] });
|
|
425
|
-
}, ge = "_title_roi3a_1", fe = "_subtitle_roi3a_5", xe = "_productsBlock_roi3a_14", _e = "_top_roi3a_26",
|
|
425
|
+
}, ge = "_title_roi3a_1", fe = "_subtitle_roi3a_5", xe = "_productsBlock_roi3a_14", _e = "_top_roi3a_26", ye = "_products_roi3a_14", je = "_product_roi3a_14", ve = "_button_roi3a_80", be = "_disabled_roi3a_91", Ie = "_buttons_roi3a_118", Ne = "_addButton_roi3a_164", Ce = "_deleteButton_roi3a_179", Y = {
|
|
426
426
|
title: ge,
|
|
427
427
|
subtitle: fe,
|
|
428
428
|
productsBlock: xe,
|
|
429
429
|
top: _e,
|
|
430
|
-
products:
|
|
431
|
-
product:
|
|
432
|
-
button:
|
|
430
|
+
products: ye,
|
|
431
|
+
product: je,
|
|
432
|
+
button: ve,
|
|
433
433
|
disabled: be,
|
|
434
434
|
buttons: Ie,
|
|
435
435
|
addButton: Ne,
|
|
436
436
|
deleteButton: Ce
|
|
437
437
|
};
|
|
438
|
-
function Se({ product: h, children:
|
|
438
|
+
function Se({ product: h, children: n }) {
|
|
439
439
|
const {
|
|
440
440
|
attributes: a,
|
|
441
441
|
listeners: s,
|
|
442
442
|
setNodeRef: e,
|
|
443
443
|
transform: r,
|
|
444
|
-
transition:
|
|
445
|
-
isDragging:
|
|
446
|
-
} =
|
|
444
|
+
transition: o,
|
|
445
|
+
isDragging: x
|
|
446
|
+
} = yt({
|
|
447
447
|
id: h.id
|
|
448
|
-
}),
|
|
449
|
-
transform:
|
|
450
|
-
transition:
|
|
448
|
+
}), v = {
|
|
449
|
+
transform: jt.Transform.toString(r),
|
|
450
|
+
transition: o
|
|
451
451
|
};
|
|
452
452
|
return /* @__PURE__ */ t.jsx(
|
|
453
453
|
"div",
|
|
454
454
|
{
|
|
455
455
|
ref: e,
|
|
456
|
-
style:
|
|
457
|
-
className: `${Y.product} ${
|
|
456
|
+
style: v,
|
|
457
|
+
className: `${Y.product} ${x ? Y.dragging : ""}`,
|
|
458
458
|
...a,
|
|
459
459
|
...s,
|
|
460
|
-
children:
|
|
460
|
+
children: n
|
|
461
461
|
}
|
|
462
462
|
);
|
|
463
463
|
}
|
|
464
|
-
const
|
|
464
|
+
const Ln = (h) => {
|
|
465
465
|
const {
|
|
466
|
-
isActiveItems:
|
|
466
|
+
isActiveItems: n,
|
|
467
467
|
setIsActiveItems: a,
|
|
468
468
|
items: s,
|
|
469
469
|
setItems: e,
|
|
470
470
|
title: r,
|
|
471
|
-
subtitle:
|
|
472
|
-
editable:
|
|
473
|
-
draggable:
|
|
474
|
-
deletable:
|
|
475
|
-
addable:
|
|
476
|
-
itemsType:
|
|
471
|
+
subtitle: o,
|
|
472
|
+
editable: x = !0,
|
|
473
|
+
draggable: v = !1,
|
|
474
|
+
deletable: b = !0,
|
|
475
|
+
addable: M = !0,
|
|
476
|
+
itemsType: j,
|
|
477
477
|
itemsOptions: m,
|
|
478
478
|
addableOptions: d = {},
|
|
479
479
|
limit: l
|
|
480
|
-
} = h, [
|
|
480
|
+
} = h, [g, c] = y.useState(null), [i, _] = y.useState(null), S = y.useRef(null), L = pt(
|
|
481
481
|
mt(gt, {
|
|
482
482
|
activationConstraint: {
|
|
483
483
|
distance: 5
|
|
484
484
|
}
|
|
485
485
|
})
|
|
486
486
|
);
|
|
487
|
-
|
|
488
|
-
if (
|
|
489
|
-
const p = [...s].map((
|
|
487
|
+
y.useEffect(() => {
|
|
488
|
+
if (g) {
|
|
489
|
+
const p = [...s].map((w) => w.id === g.id ? g : w);
|
|
490
490
|
e(p);
|
|
491
491
|
}
|
|
492
|
-
}, [
|
|
493
|
-
|
|
494
|
-
}, [
|
|
495
|
-
const
|
|
492
|
+
}, [g]), y.useEffect(() => {
|
|
493
|
+
S.current && i && (S.current.getBoundingClientRect().height, i.top);
|
|
494
|
+
}, [S.current, i]);
|
|
495
|
+
const E = (p, w) => {
|
|
496
496
|
p.stopPropagation();
|
|
497
|
-
const
|
|
498
|
-
|
|
499
|
-
top:
|
|
500
|
-
left:
|
|
501
|
-
}),
|
|
497
|
+
const T = p.target.getBoundingClientRect();
|
|
498
|
+
_({
|
|
499
|
+
top: T.top + window.scrollY,
|
|
500
|
+
left: T.left - 30
|
|
501
|
+
}), c(w);
|
|
502
502
|
}, K = (p) => {
|
|
503
|
-
const { active:
|
|
504
|
-
if (
|
|
505
|
-
const
|
|
506
|
-
if (
|
|
507
|
-
const
|
|
508
|
-
|
|
503
|
+
const { active: w, over: T } = p;
|
|
504
|
+
if (T && w.id !== T.id) {
|
|
505
|
+
const $ = s.findIndex((O) => O.id === w.id), C = s.findIndex((O) => O.id === T.id);
|
|
506
|
+
if ($ !== -1 && C !== -1) {
|
|
507
|
+
const O = [...s], [N] = O.splice($, 1);
|
|
508
|
+
O.splice(C, 0, N), e(O);
|
|
509
509
|
}
|
|
510
510
|
}
|
|
511
|
-
},
|
|
512
|
-
const
|
|
513
|
-
|
|
514
|
-
|
|
511
|
+
}, f = (p, w) => {
|
|
512
|
+
const T = /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
513
|
+
v && /* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
|
|
514
|
+
I,
|
|
515
515
|
{
|
|
516
516
|
name: "DotsSixVertical",
|
|
517
517
|
hoverable: !0,
|
|
@@ -519,99 +519,99 @@ const zn = (h) => {
|
|
|
519
519
|
height: 20
|
|
520
520
|
}
|
|
521
521
|
) }),
|
|
522
|
-
|
|
522
|
+
j === "select" && m && /* @__PURE__ */ t.jsx(
|
|
523
523
|
at,
|
|
524
524
|
{
|
|
525
|
-
onChange: (
|
|
526
|
-
const
|
|
527
|
-
if (!
|
|
528
|
-
const
|
|
529
|
-
...
|
|
525
|
+
onChange: ($) => {
|
|
526
|
+
const C = [...s], O = m.find((A) => A.name === $);
|
|
527
|
+
if (!O) return;
|
|
528
|
+
const N = C.map((A) => A.id === p.id ? {
|
|
529
|
+
...O,
|
|
530
530
|
name: {
|
|
531
|
-
"en-US":
|
|
531
|
+
"en-US": $
|
|
532
532
|
}
|
|
533
533
|
} : A);
|
|
534
|
-
|
|
534
|
+
c({
|
|
535
535
|
...p,
|
|
536
536
|
name: {
|
|
537
|
-
"en-US":
|
|
537
|
+
"en-US": $
|
|
538
538
|
}
|
|
539
|
-
}), e([...
|
|
539
|
+
}), e([...N]);
|
|
540
540
|
},
|
|
541
541
|
value: p.name,
|
|
542
|
-
options: m.filter((
|
|
542
|
+
options: m.filter(($) => !s.find((C) => C.name === $.name)).map(($) => $.name)
|
|
543
543
|
}
|
|
544
544
|
),
|
|
545
545
|
/* @__PURE__ */ t.jsxs("div", { className: Y.buttons, children: [
|
|
546
|
-
|
|
547
|
-
|
|
546
|
+
x && /* @__PURE__ */ t.jsx("div", { className: Y.deleteButton, children: /* @__PURE__ */ t.jsx(
|
|
547
|
+
I,
|
|
548
548
|
{
|
|
549
549
|
name: "Sliders",
|
|
550
550
|
hoverable: !0,
|
|
551
551
|
width: 20,
|
|
552
552
|
height: 20,
|
|
553
|
-
onClick: (
|
|
553
|
+
onClick: ($) => E($, p)
|
|
554
554
|
}
|
|
555
555
|
) }),
|
|
556
|
-
|
|
557
|
-
|
|
556
|
+
b && /* @__PURE__ */ t.jsx("div", { className: Y.deleteButton, children: /* @__PURE__ */ t.jsx(
|
|
557
|
+
I,
|
|
558
558
|
{
|
|
559
559
|
name: "Trash",
|
|
560
560
|
hoverable: !0,
|
|
561
561
|
width: 20,
|
|
562
562
|
height: 20,
|
|
563
563
|
fill: "#C12A2A",
|
|
564
|
-
onClick: () => e(s.filter((
|
|
564
|
+
onClick: () => e(s.filter(($) => $.id !== p.id))
|
|
565
565
|
}
|
|
566
566
|
) })
|
|
567
567
|
] })
|
|
568
568
|
] });
|
|
569
|
-
return
|
|
569
|
+
return v ? /* @__PURE__ */ t.jsx(
|
|
570
570
|
Se,
|
|
571
571
|
{
|
|
572
572
|
product: p,
|
|
573
|
-
index:
|
|
574
|
-
children:
|
|
573
|
+
index: w,
|
|
574
|
+
children: T
|
|
575
575
|
},
|
|
576
576
|
p.id
|
|
577
577
|
) : /* @__PURE__ */ t.jsx(
|
|
578
578
|
"div",
|
|
579
579
|
{
|
|
580
580
|
className: Y.product,
|
|
581
|
-
children:
|
|
581
|
+
children: T
|
|
582
582
|
},
|
|
583
583
|
p.id
|
|
584
584
|
);
|
|
585
585
|
};
|
|
586
586
|
return /* @__PURE__ */ t.jsxs("div", { className: Y.productsBlock, children: [
|
|
587
|
-
(r ||
|
|
587
|
+
(r || n !== void 0) && /* @__PURE__ */ t.jsxs("div", { className: Y.top, children: [
|
|
588
588
|
r && /* @__PURE__ */ t.jsx("h3", { className: Y.title, children: r }),
|
|
589
|
-
|
|
589
|
+
n !== void 0 && /* @__PURE__ */ t.jsx(
|
|
590
590
|
lt,
|
|
591
591
|
{
|
|
592
|
-
current:
|
|
592
|
+
current: n,
|
|
593
593
|
onChange: (p) => a == null ? void 0 : a(p)
|
|
594
594
|
}
|
|
595
595
|
)
|
|
596
596
|
] }),
|
|
597
597
|
/* @__PURE__ */ t.jsxs("div", { className: Y.products, children: [
|
|
598
|
-
|
|
599
|
-
|
|
598
|
+
o && /* @__PURE__ */ t.jsx("h5", { className: Y.subtitle, children: o }),
|
|
599
|
+
v ? /* @__PURE__ */ t.jsx(
|
|
600
600
|
ft,
|
|
601
601
|
{
|
|
602
|
-
sensors:
|
|
602
|
+
sensors: L,
|
|
603
603
|
onDragEnd: K,
|
|
604
604
|
children: /* @__PURE__ */ t.jsx(
|
|
605
605
|
xt,
|
|
606
606
|
{
|
|
607
607
|
items: s.map((p) => p.id),
|
|
608
608
|
strategy: _t,
|
|
609
|
-
children: s.map((p,
|
|
609
|
+
children: s.map((p, w) => f(p, w))
|
|
610
610
|
}
|
|
611
611
|
)
|
|
612
612
|
}
|
|
613
|
-
) : s.map((p,
|
|
614
|
-
|
|
613
|
+
) : s.map((p, w) => f(p, w)),
|
|
614
|
+
M && /* @__PURE__ */ t.jsx(
|
|
615
615
|
"div",
|
|
616
616
|
{
|
|
617
617
|
style: {
|
|
@@ -623,24 +623,24 @@ const zn = (h) => {
|
|
|
623
623
|
dt,
|
|
624
624
|
{
|
|
625
625
|
withoutHover: !0,
|
|
626
|
-
className:
|
|
626
|
+
className: H(Y.button, {
|
|
627
627
|
[Y.disabled]: !!(l && l <= s.length || s.length === (m == null ? void 0 : m.length))
|
|
628
628
|
}),
|
|
629
629
|
size: "s",
|
|
630
630
|
disabled: !!(l && l <= s.length || s.length === (m == null ? void 0 : m.length)),
|
|
631
631
|
onClick: () => {
|
|
632
632
|
const p = [...s];
|
|
633
|
-
let
|
|
633
|
+
let w = null;
|
|
634
634
|
if (m) {
|
|
635
|
-
for (let
|
|
636
|
-
if (!s.find((
|
|
637
|
-
|
|
635
|
+
for (let T = 0; T < m.length; T++)
|
|
636
|
+
if (!s.find(($) => $.id === m[T].id)) {
|
|
637
|
+
w = m[T];
|
|
638
638
|
break;
|
|
639
639
|
}
|
|
640
640
|
}
|
|
641
|
-
|
|
642
|
-
name:
|
|
643
|
-
id: (
|
|
641
|
+
j === "select" && m && p.push({
|
|
642
|
+
name: w ? w.name : m[0].name,
|
|
643
|
+
id: (w == null ? void 0 : w.id) || m[0].id,
|
|
644
644
|
...d
|
|
645
645
|
}), e(p);
|
|
646
646
|
},
|
|
@@ -650,7 +650,7 @@ const zn = (h) => {
|
|
|
650
650
|
children: /* @__PURE__ */ t.jsxs("div", { className: Y.addButton, children: [
|
|
651
651
|
/* @__PURE__ */ t.jsx("span", { children: "Add Option" }),
|
|
652
652
|
/* @__PURE__ */ t.jsx(
|
|
653
|
-
|
|
653
|
+
I,
|
|
654
654
|
{
|
|
655
655
|
name: "Plus",
|
|
656
656
|
width: 16,
|
|
@@ -665,99 +665,99 @@ const zn = (h) => {
|
|
|
665
665
|
] })
|
|
666
666
|
] });
|
|
667
667
|
};
|
|
668
|
-
function
|
|
669
|
-
const { product:
|
|
670
|
-
id:
|
|
671
|
-
}),
|
|
672
|
-
transform:
|
|
673
|
-
transition:
|
|
668
|
+
function we(h) {
|
|
669
|
+
const { product: n, children: a } = h, { attributes: s, listeners: e, setNodeRef: r, transform: o, transition: x, isDragging: v } = yt({
|
|
670
|
+
id: n.id
|
|
671
|
+
}), b = {
|
|
672
|
+
transform: jt.Transform.toString(o),
|
|
673
|
+
transition: x
|
|
674
674
|
};
|
|
675
675
|
return /* @__PURE__ */ t.jsx(
|
|
676
676
|
"div",
|
|
677
677
|
{
|
|
678
678
|
ref: r,
|
|
679
|
-
style:
|
|
680
|
-
className: `${V.product} ${
|
|
679
|
+
style: b,
|
|
680
|
+
className: `${V.product} ${v ? V.dragging : ""}`,
|
|
681
681
|
...s,
|
|
682
682
|
...e,
|
|
683
683
|
children: a
|
|
684
684
|
}
|
|
685
685
|
);
|
|
686
686
|
}
|
|
687
|
-
const
|
|
687
|
+
const Un = (h) => {
|
|
688
688
|
const {
|
|
689
|
-
isActiveItems:
|
|
689
|
+
isActiveItems: n,
|
|
690
690
|
setIsActiveItems: a,
|
|
691
691
|
items: s,
|
|
692
692
|
setItems: e,
|
|
693
693
|
other: r,
|
|
694
|
-
title:
|
|
695
|
-
subtitle:
|
|
696
|
-
editable:
|
|
697
|
-
draggable:
|
|
698
|
-
deletable:
|
|
699
|
-
addable:
|
|
694
|
+
title: o,
|
|
695
|
+
subtitle: x,
|
|
696
|
+
editable: v = !0,
|
|
697
|
+
draggable: b = !1,
|
|
698
|
+
deletable: M = !0,
|
|
699
|
+
addable: j = !0,
|
|
700
700
|
itemsType: m,
|
|
701
701
|
itemsPlaceholder: d = "",
|
|
702
702
|
itemsOptions: l,
|
|
703
|
-
hasRangeSelector:
|
|
704
|
-
rangeSelectorOptions:
|
|
705
|
-
modalOptions:
|
|
706
|
-
addableOptions:
|
|
707
|
-
limit:
|
|
708
|
-
} = h, [
|
|
703
|
+
hasRangeSelector: g = !1,
|
|
704
|
+
rangeSelectorOptions: c,
|
|
705
|
+
modalOptions: i,
|
|
706
|
+
addableOptions: _ = {},
|
|
707
|
+
limit: S
|
|
708
|
+
} = h, [L, E] = y.useState(null), [K, f] = y.useState({
|
|
709
709
|
top: 0,
|
|
710
710
|
left: 0
|
|
711
|
-
}), [p,
|
|
711
|
+
}), [p, w] = y.useState(null), T = y.useRef(null), [$, C] = y.useState(!1), O = pt(
|
|
712
712
|
mt(gt, {
|
|
713
713
|
activationConstraint: {
|
|
714
714
|
distance: 5
|
|
715
715
|
}
|
|
716
716
|
})
|
|
717
717
|
);
|
|
718
|
-
|
|
718
|
+
y.useEffect(() => {
|
|
719
719
|
const u = () => {
|
|
720
|
-
|
|
720
|
+
E(null), C(!1);
|
|
721
721
|
};
|
|
722
|
-
return document.body.addEventListener("click", u),
|
|
723
|
-
|
|
722
|
+
return document.body.addEventListener("click", u), E(null), C(!1), () => {
|
|
723
|
+
E(null), C(!1), document.body.removeEventListener("click", u);
|
|
724
724
|
};
|
|
725
|
-
}, []),
|
|
726
|
-
if (
|
|
727
|
-
const u = [...s].map((
|
|
725
|
+
}, []), y.useEffect(() => {
|
|
726
|
+
if (L) {
|
|
727
|
+
const u = [...s].map((q) => q.id === L.id ? L : q);
|
|
728
728
|
e(u);
|
|
729
729
|
}
|
|
730
|
-
}, [
|
|
731
|
-
if (
|
|
732
|
-
const u =
|
|
730
|
+
}, [L]), y.useEffect(() => {
|
|
731
|
+
if (T.current && p) {
|
|
732
|
+
const u = T.current.getBoundingClientRect().height, q = window.innerHeight;
|
|
733
733
|
let P = p.top;
|
|
734
|
-
P + u >
|
|
734
|
+
P + u > q + window.scrollY - 200 && (P = q + window.scrollY - u - 200), P < 0 && (P = 10), f({
|
|
735
735
|
top: P,
|
|
736
736
|
left: p.left
|
|
737
737
|
});
|
|
738
738
|
}
|
|
739
|
-
}, [
|
|
740
|
-
const
|
|
739
|
+
}, [T.current, p]);
|
|
740
|
+
const N = (u, q) => {
|
|
741
741
|
u.stopPropagation();
|
|
742
742
|
const P = u.target.getBoundingClientRect();
|
|
743
|
-
|
|
743
|
+
w({
|
|
744
744
|
top: P.top + window.scrollY,
|
|
745
745
|
left: P.left - 30
|
|
746
|
-
}),
|
|
746
|
+
}), E(q), C(!0);
|
|
747
747
|
}, A = (u) => {
|
|
748
|
-
const { active:
|
|
749
|
-
if (P &&
|
|
750
|
-
const D = s.findIndex((
|
|
748
|
+
const { active: q, over: P } = u;
|
|
749
|
+
if (P && q.id !== P.id) {
|
|
750
|
+
const D = s.findIndex((U) => U.id === q.id), et = s.findIndex((U) => U.id === P.id);
|
|
751
751
|
if (D !== -1 && et !== -1) {
|
|
752
|
-
const
|
|
753
|
-
|
|
752
|
+
const U = [...s], [Z] = U.splice(D, 1);
|
|
753
|
+
U.splice(et, 0, Z), e(U);
|
|
754
754
|
}
|
|
755
755
|
}
|
|
756
|
-
},
|
|
756
|
+
}, F = (u) => {
|
|
757
757
|
var P;
|
|
758
|
-
const
|
|
759
|
-
|
|
760
|
-
|
|
758
|
+
const q = /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
759
|
+
b && /* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
|
|
760
|
+
I,
|
|
761
761
|
{
|
|
762
762
|
name: "DotsSixVertical",
|
|
763
763
|
hoverable: !0,
|
|
@@ -769,18 +769,18 @@ const Rn = (h) => {
|
|
|
769
769
|
at,
|
|
770
770
|
{
|
|
771
771
|
onChange: (D) => {
|
|
772
|
-
const
|
|
772
|
+
const U = [...s].map((Z) => Z.id === u.id ? {
|
|
773
773
|
...u,
|
|
774
774
|
name: {
|
|
775
775
|
"en-US": D
|
|
776
776
|
}
|
|
777
777
|
} : Z);
|
|
778
|
-
|
|
778
|
+
E({
|
|
779
779
|
...u,
|
|
780
780
|
name: {
|
|
781
781
|
"en-US": D
|
|
782
782
|
}
|
|
783
|
-
}), e([...
|
|
783
|
+
}), e([...U]);
|
|
784
784
|
},
|
|
785
785
|
value: u.name["en-US"],
|
|
786
786
|
options: l.filter(
|
|
@@ -792,13 +792,13 @@ const Rn = (h) => {
|
|
|
792
792
|
Nt,
|
|
793
793
|
{
|
|
794
794
|
onChange: (D) => {
|
|
795
|
-
const
|
|
795
|
+
const U = [...s].map((Z) => Z.id === u.id ? {
|
|
796
796
|
...u,
|
|
797
797
|
name: {
|
|
798
798
|
"en-US": D
|
|
799
799
|
}
|
|
800
800
|
} : Z);
|
|
801
|
-
e([...
|
|
801
|
+
e([...U]);
|
|
802
802
|
},
|
|
803
803
|
value: u.name["en-US"],
|
|
804
804
|
placeholder: d
|
|
@@ -808,28 +808,28 @@ const Rn = (h) => {
|
|
|
808
808
|
At,
|
|
809
809
|
{
|
|
810
810
|
onChange: (D) => {
|
|
811
|
-
const
|
|
811
|
+
const U = [...s].map((Z) => Z.id === u.id ? {
|
|
812
812
|
...u,
|
|
813
813
|
images: D
|
|
814
814
|
} : Z);
|
|
815
|
-
e([...
|
|
815
|
+
e([...U]);
|
|
816
816
|
},
|
|
817
817
|
activeImage: (P = s.find((D) => D.id === u.id)) == null ? void 0 : P.images[0]
|
|
818
818
|
}
|
|
819
819
|
),
|
|
820
820
|
/* @__PURE__ */ t.jsxs("div", { className: V.buttons, children: [
|
|
821
|
-
|
|
822
|
-
|
|
821
|
+
v && /* @__PURE__ */ t.jsx("div", { className: V.deleteButton, children: /* @__PURE__ */ t.jsx(
|
|
822
|
+
I,
|
|
823
823
|
{
|
|
824
824
|
name: "Sliders",
|
|
825
825
|
hoverable: !0,
|
|
826
826
|
width: 20,
|
|
827
827
|
height: 20,
|
|
828
|
-
onClick: (D) =>
|
|
828
|
+
onClick: (D) => N(D, u)
|
|
829
829
|
}
|
|
830
830
|
) }),
|
|
831
|
-
|
|
832
|
-
|
|
831
|
+
M && /* @__PURE__ */ t.jsx("div", { className: V.deleteButton, children: /* @__PURE__ */ t.jsx(
|
|
832
|
+
I,
|
|
833
833
|
{
|
|
834
834
|
name: "Trash",
|
|
835
835
|
hoverable: !0,
|
|
@@ -841,63 +841,63 @@ const Rn = (h) => {
|
|
|
841
841
|
) })
|
|
842
842
|
] })
|
|
843
843
|
] });
|
|
844
|
-
return
|
|
845
|
-
|
|
844
|
+
return b ? /* @__PURE__ */ t.jsx(
|
|
845
|
+
we,
|
|
846
846
|
{
|
|
847
847
|
product: u,
|
|
848
|
-
children:
|
|
848
|
+
children: q
|
|
849
849
|
},
|
|
850
850
|
u.id
|
|
851
851
|
) : /* @__PURE__ */ t.jsx(
|
|
852
852
|
"div",
|
|
853
853
|
{
|
|
854
854
|
className: V.product,
|
|
855
|
-
children:
|
|
855
|
+
children: q
|
|
856
856
|
},
|
|
857
857
|
u.id
|
|
858
858
|
);
|
|
859
859
|
};
|
|
860
860
|
return /* @__PURE__ */ t.jsxs("div", { className: V.productsBlock, children: [
|
|
861
|
-
(
|
|
862
|
-
|
|
863
|
-
|
|
861
|
+
(o || n !== void 0) && /* @__PURE__ */ t.jsxs("div", { className: V.top, children: [
|
|
862
|
+
o && /* @__PURE__ */ t.jsx("h3", { className: V.title, children: o }),
|
|
863
|
+
n !== void 0 && /* @__PURE__ */ t.jsx(
|
|
864
864
|
lt,
|
|
865
865
|
{
|
|
866
|
-
current:
|
|
866
|
+
current: n,
|
|
867
867
|
onChange: (u) => a == null ? void 0 : a(u)
|
|
868
868
|
}
|
|
869
869
|
)
|
|
870
870
|
] }),
|
|
871
|
-
|
|
872
|
-
|
|
871
|
+
L && v && i && $ && /* @__PURE__ */ t.jsx(
|
|
872
|
+
Ot,
|
|
873
873
|
{
|
|
874
|
-
ref:
|
|
875
|
-
activeItem:
|
|
876
|
-
setActiveItem:
|
|
874
|
+
ref: T,
|
|
875
|
+
activeItem: L,
|
|
876
|
+
setActiveItem: E,
|
|
877
877
|
popupPosition: K,
|
|
878
|
-
modalOptions:
|
|
879
|
-
setIsOpenModal:
|
|
878
|
+
modalOptions: i,
|
|
879
|
+
setIsOpenModal: C
|
|
880
880
|
}
|
|
881
881
|
),
|
|
882
|
-
|
|
882
|
+
g && c && /* @__PURE__ */ t.jsx(wt, { ...c }),
|
|
883
883
|
/* @__PURE__ */ t.jsxs("div", { className: V.products, children: [
|
|
884
|
-
|
|
885
|
-
|
|
884
|
+
x && /* @__PURE__ */ t.jsx("h5", { className: V.subtitle, children: x }),
|
|
885
|
+
b ? /* @__PURE__ */ t.jsx(
|
|
886
886
|
ft,
|
|
887
887
|
{
|
|
888
|
-
sensors:
|
|
888
|
+
sensors: O,
|
|
889
889
|
onDragEnd: A,
|
|
890
890
|
children: /* @__PURE__ */ t.jsx(
|
|
891
891
|
xt,
|
|
892
892
|
{
|
|
893
893
|
items: s.map((u) => u.id),
|
|
894
894
|
strategy: _t,
|
|
895
|
-
children: s.map((u) =>
|
|
895
|
+
children: s.map((u) => F(u))
|
|
896
896
|
}
|
|
897
897
|
)
|
|
898
898
|
}
|
|
899
|
-
) : s.map((u) =>
|
|
900
|
-
|
|
899
|
+
) : s.map((u) => F(u)),
|
|
900
|
+
j && /* @__PURE__ */ t.jsx(
|
|
901
901
|
"div",
|
|
902
902
|
{
|
|
903
903
|
style: {
|
|
@@ -909,27 +909,27 @@ const Rn = (h) => {
|
|
|
909
909
|
dt,
|
|
910
910
|
{
|
|
911
911
|
withoutHover: !0,
|
|
912
|
-
className:
|
|
913
|
-
[V.disabled]: !!(
|
|
912
|
+
className: H(V.button, {
|
|
913
|
+
[V.disabled]: !!(S && S <= s.length)
|
|
914
914
|
}),
|
|
915
915
|
size: "s",
|
|
916
|
-
disabled: !!(
|
|
916
|
+
disabled: !!(S && S <= s.length),
|
|
917
917
|
onClick: () => {
|
|
918
918
|
const u = [...s];
|
|
919
|
-
let
|
|
919
|
+
let q = null;
|
|
920
920
|
if (l) {
|
|
921
921
|
for (let P = 0; P < l.length; P++)
|
|
922
922
|
if (!s.find((D) => D.name["en-US"] === l[P])) {
|
|
923
|
-
|
|
923
|
+
q = l[P];
|
|
924
924
|
break;
|
|
925
925
|
}
|
|
926
926
|
}
|
|
927
927
|
m === "select" && l ? u.push({
|
|
928
928
|
name: {
|
|
929
|
-
"en-US":
|
|
929
|
+
"en-US": q || l[0]
|
|
930
930
|
},
|
|
931
931
|
id: J(),
|
|
932
|
-
...
|
|
932
|
+
..._,
|
|
933
933
|
maxSymbols: 100
|
|
934
934
|
// пример значения
|
|
935
935
|
}) : m === "input" ? u.push({
|
|
@@ -937,14 +937,14 @@ const Rn = (h) => {
|
|
|
937
937
|
"en-US": ""
|
|
938
938
|
},
|
|
939
939
|
id: J(),
|
|
940
|
-
...
|
|
940
|
+
..._,
|
|
941
941
|
maxSymbols: 100
|
|
942
942
|
}) : u.push({
|
|
943
943
|
name: {
|
|
944
944
|
"en-US": `Image ${s.length + 1}`
|
|
945
945
|
},
|
|
946
946
|
id: J(),
|
|
947
|
-
...
|
|
947
|
+
..._,
|
|
948
948
|
maxSymbols: 100
|
|
949
949
|
}), e(u);
|
|
950
950
|
},
|
|
@@ -954,7 +954,7 @@ const Rn = (h) => {
|
|
|
954
954
|
children: /* @__PURE__ */ t.jsxs("div", { className: V.addButton, children: [
|
|
955
955
|
/* @__PURE__ */ t.jsx("span", { children: "Add Option" }),
|
|
956
956
|
/* @__PURE__ */ t.jsx(
|
|
957
|
-
|
|
957
|
+
I,
|
|
958
958
|
{
|
|
959
959
|
name: "Plus",
|
|
960
960
|
width: 16,
|
|
@@ -975,52 +975,52 @@ const Rn = (h) => {
|
|
|
975
975
|
}
|
|
976
976
|
)
|
|
977
977
|
] });
|
|
978
|
-
},
|
|
979
|
-
subtitle:
|
|
980
|
-
products:
|
|
978
|
+
}, Pe = "_subtitle_jql1y_1", ke = "_products_jql1y_10", Te = "_product_jql1y_10", Me = "_button_jql1y_11", Be = "_buttons_jql1y_11", qe = "_addButton_jql1y_150", $e = "_deleteButton_jql1y_165", st = {
|
|
979
|
+
subtitle: Pe,
|
|
980
|
+
products: ke,
|
|
981
981
|
product: Te,
|
|
982
982
|
button: Me,
|
|
983
983
|
buttons: Be,
|
|
984
|
-
addButton:
|
|
985
|
-
deleteButton:
|
|
986
|
-
},
|
|
987
|
-
const { buttons:
|
|
984
|
+
addButton: qe,
|
|
985
|
+
deleteButton: $e
|
|
986
|
+
}, Oe = (h) => {
|
|
987
|
+
const { buttons: n, setButtons: a, deletable: s = !0, addable: e = !0, editableLink: r = !0 } = h, { pages: o } = vt(), [x, v] = y.useState(null), [b, M] = y.useState({
|
|
988
988
|
top: 0,
|
|
989
989
|
left: 0
|
|
990
|
-
}), [
|
|
991
|
-
|
|
992
|
-
if (
|
|
993
|
-
const
|
|
994
|
-
a(
|
|
990
|
+
}), [j, m] = y.useState(null), d = y.useRef(null);
|
|
991
|
+
y.useEffect(() => {
|
|
992
|
+
if (x) {
|
|
993
|
+
const c = [...n].map((i) => i.id === x.id ? x : i);
|
|
994
|
+
a(c);
|
|
995
995
|
}
|
|
996
|
-
}, [
|
|
997
|
-
if (d.current &&
|
|
998
|
-
const
|
|
999
|
-
let
|
|
1000
|
-
|
|
1001
|
-
top:
|
|
1002
|
-
left:
|
|
996
|
+
}, [x]), y.useEffect(() => {
|
|
997
|
+
if (d.current && j) {
|
|
998
|
+
const c = d.current.getBoundingClientRect().height, i = window.innerHeight;
|
|
999
|
+
let _ = j.top;
|
|
1000
|
+
_ + c > i + window.scrollY - 200 && (_ = i + window.scrollY - c - 200), _ < 0 && (_ = 10), M({
|
|
1001
|
+
top: _,
|
|
1002
|
+
left: j.left
|
|
1003
1003
|
});
|
|
1004
1004
|
}
|
|
1005
|
-
}, [d.current,
|
|
1006
|
-
const l = (
|
|
1007
|
-
|
|
1008
|
-
const
|
|
1005
|
+
}, [d.current, j]);
|
|
1006
|
+
const l = (c, i) => {
|
|
1007
|
+
c.stopPropagation();
|
|
1008
|
+
const _ = c.target.getBoundingClientRect();
|
|
1009
1009
|
m({
|
|
1010
|
-
top:
|
|
1011
|
-
left:
|
|
1012
|
-
}),
|
|
1013
|
-
},
|
|
1014
|
-
const
|
|
1015
|
-
...
|
|
1010
|
+
top: _.top + window.scrollY - 70,
|
|
1011
|
+
left: _.left - (e ? 30 : 65)
|
|
1012
|
+
}), v(i);
|
|
1013
|
+
}, g = (c, i) => {
|
|
1014
|
+
const _ = [...n], S = {
|
|
1015
|
+
...c,
|
|
1016
1016
|
id: Math.random().toString(36).substr(2, 9)
|
|
1017
1017
|
// Генерируем новый уникальный ID
|
|
1018
1018
|
};
|
|
1019
|
-
|
|
1019
|
+
_.splice(i + 1, 0, S), a(_);
|
|
1020
1020
|
};
|
|
1021
1021
|
return /* @__PURE__ */ t.jsxs("div", { className: st.products, children: [
|
|
1022
1022
|
/* @__PURE__ */ t.jsx("h5", { className: st.subtitle, children: "Button Type" }),
|
|
1023
|
-
|
|
1023
|
+
n.map((c, i) => /* @__PURE__ */ t.jsxs(
|
|
1024
1024
|
"div",
|
|
1025
1025
|
{
|
|
1026
1026
|
className: st.product,
|
|
@@ -1028,50 +1028,50 @@ const Rn = (h) => {
|
|
|
1028
1028
|
/* @__PURE__ */ t.jsx(
|
|
1029
1029
|
at,
|
|
1030
1030
|
{
|
|
1031
|
-
onChange: (
|
|
1032
|
-
const
|
|
1033
|
-
...
|
|
1034
|
-
type:
|
|
1035
|
-
} :
|
|
1036
|
-
a(
|
|
1031
|
+
onChange: (_) => {
|
|
1032
|
+
const L = [...n].map((E) => E.id === c.id ? {
|
|
1033
|
+
...c,
|
|
1034
|
+
type: _
|
|
1035
|
+
} : E);
|
|
1036
|
+
a(L);
|
|
1037
1037
|
},
|
|
1038
|
-
value:
|
|
1038
|
+
value: c.type,
|
|
1039
1039
|
options: ["Primary", "Secondary", "Tertiary"]
|
|
1040
1040
|
}
|
|
1041
1041
|
),
|
|
1042
1042
|
/* @__PURE__ */ t.jsxs("div", { className: st.buttons, children: [
|
|
1043
1043
|
/* @__PURE__ */ t.jsx("div", { className: st.deleteButton, children: /* @__PURE__ */ t.jsx(
|
|
1044
|
-
|
|
1044
|
+
I,
|
|
1045
1045
|
{
|
|
1046
1046
|
name: "Copy",
|
|
1047
1047
|
hoverable: !0,
|
|
1048
1048
|
width: 20,
|
|
1049
1049
|
height: 20,
|
|
1050
1050
|
onClick: () => {
|
|
1051
|
-
|
|
1051
|
+
g(c, i);
|
|
1052
1052
|
}
|
|
1053
1053
|
}
|
|
1054
1054
|
) }),
|
|
1055
1055
|
/* @__PURE__ */ t.jsx("div", { className: st.deleteButton, children: /* @__PURE__ */ t.jsx(
|
|
1056
|
-
|
|
1056
|
+
I,
|
|
1057
1057
|
{
|
|
1058
1058
|
name: "Sliders",
|
|
1059
1059
|
hoverable: !0,
|
|
1060
1060
|
width: 20,
|
|
1061
1061
|
height: 20,
|
|
1062
|
-
onClick: (
|
|
1063
|
-
l(
|
|
1062
|
+
onClick: (_) => {
|
|
1063
|
+
l(_, c);
|
|
1064
1064
|
}
|
|
1065
1065
|
}
|
|
1066
1066
|
) }),
|
|
1067
1067
|
s && /* @__PURE__ */ t.jsx("div", { className: st.deleteButton, children: /* @__PURE__ */ t.jsx(
|
|
1068
|
-
|
|
1068
|
+
I,
|
|
1069
1069
|
{
|
|
1070
1070
|
name: "Trash",
|
|
1071
1071
|
hoverable: !0,
|
|
1072
1072
|
onClick: () => {
|
|
1073
|
-
const
|
|
1074
|
-
a(
|
|
1073
|
+
const _ = n.filter((S) => S.id !== c.id);
|
|
1074
|
+
a(_);
|
|
1075
1075
|
},
|
|
1076
1076
|
width: 20,
|
|
1077
1077
|
height: 20,
|
|
@@ -1081,15 +1081,15 @@ const Rn = (h) => {
|
|
|
1081
1081
|
] })
|
|
1082
1082
|
]
|
|
1083
1083
|
},
|
|
1084
|
-
|
|
1084
|
+
c.id
|
|
1085
1085
|
)),
|
|
1086
|
-
|
|
1086
|
+
x && /* @__PURE__ */ t.jsx(
|
|
1087
1087
|
Dt,
|
|
1088
1088
|
{
|
|
1089
1089
|
ref: d,
|
|
1090
|
-
activeButton:
|
|
1091
|
-
setActiveButton:
|
|
1092
|
-
popupPosition:
|
|
1090
|
+
activeButton: x,
|
|
1091
|
+
setActiveButton: v,
|
|
1092
|
+
popupPosition: b,
|
|
1093
1093
|
editableLink: r
|
|
1094
1094
|
}
|
|
1095
1095
|
),
|
|
@@ -1108,8 +1108,8 @@ const Rn = (h) => {
|
|
|
1108
1108
|
className: st.button,
|
|
1109
1109
|
size: "s",
|
|
1110
1110
|
onClick: () => {
|
|
1111
|
-
const
|
|
1112
|
-
r ?
|
|
1111
|
+
const c = [...n];
|
|
1112
|
+
r ? c.push({
|
|
1113
1113
|
type: "Primary",
|
|
1114
1114
|
id: J(),
|
|
1115
1115
|
typesText: [],
|
|
@@ -1117,9 +1117,9 @@ const Rn = (h) => {
|
|
|
1117
1117
|
"en-US": "Button Name"
|
|
1118
1118
|
},
|
|
1119
1119
|
destination: "Go to Page",
|
|
1120
|
-
page:
|
|
1120
|
+
page: o ? Object.values(o)[0].path : "/",
|
|
1121
1121
|
openInNewTab: !1
|
|
1122
|
-
}) :
|
|
1122
|
+
}) : c.push({
|
|
1123
1123
|
type: "Primary",
|
|
1124
1124
|
id: J(),
|
|
1125
1125
|
typesText: [],
|
|
@@ -1127,9 +1127,9 @@ const Rn = (h) => {
|
|
|
1127
1127
|
"en-US": "Create Ticket"
|
|
1128
1128
|
},
|
|
1129
1129
|
destination: "Go to Page",
|
|
1130
|
-
page:
|
|
1130
|
+
page: o ? Object.values(o)[0].path : "/",
|
|
1131
1131
|
openInNewTab: !1
|
|
1132
|
-
}), a(
|
|
1132
|
+
}), a(c);
|
|
1133
1133
|
},
|
|
1134
1134
|
style: {
|
|
1135
1135
|
width: "fit-content"
|
|
@@ -1137,7 +1137,7 @@ const Rn = (h) => {
|
|
|
1137
1137
|
children: /* @__PURE__ */ t.jsxs("div", { className: st.addButton, children: [
|
|
1138
1138
|
/* @__PURE__ */ t.jsx("span", { children: "Add Option" }),
|
|
1139
1139
|
/* @__PURE__ */ t.jsx(
|
|
1140
|
-
|
|
1140
|
+
I,
|
|
1141
1141
|
{
|
|
1142
1142
|
name: "Plus",
|
|
1143
1143
|
width: 16,
|
|
@@ -1150,15 +1150,15 @@ const Rn = (h) => {
|
|
|
1150
1150
|
}
|
|
1151
1151
|
)
|
|
1152
1152
|
] });
|
|
1153
|
-
},
|
|
1153
|
+
}, zn = (h) => {
|
|
1154
1154
|
const {
|
|
1155
|
-
isActiveButtons:
|
|
1155
|
+
isActiveButtons: n,
|
|
1156
1156
|
setIsActiveButtons: a,
|
|
1157
1157
|
buttons: s,
|
|
1158
1158
|
setButtons: e,
|
|
1159
1159
|
editableLink: r = !0,
|
|
1160
|
-
addable:
|
|
1161
|
-
deletable:
|
|
1160
|
+
addable: o = !0,
|
|
1161
|
+
deletable: x = !0
|
|
1162
1162
|
} = h;
|
|
1163
1163
|
return /* @__PURE__ */ t.jsx(t.Fragment, { children: /* @__PURE__ */ t.jsxs("div", { className: bt.buttonsBlock, children: [
|
|
1164
1164
|
/* @__PURE__ */ t.jsxs("div", { className: bt.top, children: [
|
|
@@ -1166,107 +1166,107 @@ const Rn = (h) => {
|
|
|
1166
1166
|
/* @__PURE__ */ t.jsx(
|
|
1167
1167
|
lt,
|
|
1168
1168
|
{
|
|
1169
|
-
current:
|
|
1170
|
-
onChange: (
|
|
1169
|
+
current: n,
|
|
1170
|
+
onChange: (v) => a(v)
|
|
1171
1171
|
}
|
|
1172
1172
|
)
|
|
1173
1173
|
] }),
|
|
1174
|
-
|
|
1175
|
-
|
|
1174
|
+
n && /* @__PURE__ */ t.jsx(
|
|
1175
|
+
Oe,
|
|
1176
1176
|
{
|
|
1177
1177
|
buttons: s,
|
|
1178
1178
|
setButtons: e,
|
|
1179
1179
|
editableLink: r,
|
|
1180
|
-
addable:
|
|
1181
|
-
deletable:
|
|
1180
|
+
addable: o,
|
|
1181
|
+
deletable: x
|
|
1182
1182
|
}
|
|
1183
1183
|
)
|
|
1184
1184
|
] }) });
|
|
1185
1185
|
};
|
|
1186
1186
|
function Ae(h) {
|
|
1187
|
-
const { product:
|
|
1188
|
-
id: String(
|
|
1189
|
-
}),
|
|
1190
|
-
transform:
|
|
1191
|
-
transition:
|
|
1187
|
+
const { product: n, children: a } = h, { attributes: s, listeners: e, setNodeRef: r, transform: o, transition: x, isDragging: v } = yt({
|
|
1188
|
+
id: String(n.listingId)
|
|
1189
|
+
}), b = {
|
|
1190
|
+
transform: jt.Transform.toString(o),
|
|
1191
|
+
transition: x
|
|
1192
1192
|
};
|
|
1193
1193
|
return /* @__PURE__ */ t.jsx(
|
|
1194
1194
|
"div",
|
|
1195
1195
|
{
|
|
1196
1196
|
ref: r,
|
|
1197
|
-
style:
|
|
1198
|
-
className: `${W.product} ${
|
|
1197
|
+
style: b,
|
|
1198
|
+
className: `${W.product} ${v ? W.dragging : ""}`,
|
|
1199
1199
|
...s,
|
|
1200
1200
|
...e,
|
|
1201
1201
|
children: a
|
|
1202
1202
|
}
|
|
1203
1203
|
);
|
|
1204
1204
|
}
|
|
1205
|
-
const
|
|
1205
|
+
const Fn = (h) => {
|
|
1206
1206
|
const {
|
|
1207
|
-
isActiveItems:
|
|
1207
|
+
isActiveItems: n,
|
|
1208
1208
|
setIsActiveItems: a,
|
|
1209
1209
|
items: s,
|
|
1210
1210
|
setItems: e,
|
|
1211
1211
|
other: r,
|
|
1212
|
-
title:
|
|
1213
|
-
subtitle:
|
|
1214
|
-
editable:
|
|
1215
|
-
draggable:
|
|
1216
|
-
withImage:
|
|
1217
|
-
deletable:
|
|
1212
|
+
title: o,
|
|
1213
|
+
subtitle: x,
|
|
1214
|
+
editable: v = !0,
|
|
1215
|
+
draggable: b = !1,
|
|
1216
|
+
withImage: M = !1,
|
|
1217
|
+
deletable: j = !0,
|
|
1218
1218
|
addable: m = !0,
|
|
1219
1219
|
itemsType: d,
|
|
1220
1220
|
itemsOptions: l,
|
|
1221
|
-
limit:
|
|
1222
|
-
aspectRatio:
|
|
1223
|
-
setAspectRatio:
|
|
1224
|
-
} = h, [
|
|
1221
|
+
limit: g,
|
|
1222
|
+
aspectRatio: c,
|
|
1223
|
+
setAspectRatio: i
|
|
1224
|
+
} = h, [_, S] = y.useState(
|
|
1225
1225
|
null
|
|
1226
|
-
), [
|
|
1226
|
+
), [L, E] = y.useState({
|
|
1227
1227
|
top: 0,
|
|
1228
1228
|
left: 0
|
|
1229
|
-
}), [K,
|
|
1229
|
+
}), [K, f] = y.useState(!1), p = pt(
|
|
1230
1230
|
mt(gt, {
|
|
1231
1231
|
activationConstraint: {
|
|
1232
1232
|
distance: 5
|
|
1233
1233
|
}
|
|
1234
1234
|
})
|
|
1235
1235
|
);
|
|
1236
|
-
|
|
1237
|
-
const
|
|
1238
|
-
|
|
1236
|
+
y.useEffect(() => {
|
|
1237
|
+
const N = () => {
|
|
1238
|
+
S(null), f(!1);
|
|
1239
1239
|
};
|
|
1240
|
-
return document.body.addEventListener("click",
|
|
1241
|
-
|
|
1240
|
+
return document.body.addEventListener("click", N), S(null), f(!1), () => {
|
|
1241
|
+
S(null), f(!1), document.body.removeEventListener("click", N);
|
|
1242
1242
|
};
|
|
1243
|
-
}, []),
|
|
1244
|
-
if (
|
|
1245
|
-
const
|
|
1246
|
-
e(
|
|
1243
|
+
}, []), y.useEffect(() => {
|
|
1244
|
+
if (_) {
|
|
1245
|
+
const N = [...s].map((A) => A.listingId === _.listingId ? _ : A);
|
|
1246
|
+
e(N);
|
|
1247
1247
|
}
|
|
1248
|
-
}, [
|
|
1249
|
-
const
|
|
1250
|
-
|
|
1251
|
-
const
|
|
1252
|
-
let P =
|
|
1253
|
-
P + u >
|
|
1248
|
+
}, [_]);
|
|
1249
|
+
const w = (N, A) => {
|
|
1250
|
+
N.stopPropagation();
|
|
1251
|
+
const F = N.target.getBoundingClientRect(), u = 100, q = window.innerHeight;
|
|
1252
|
+
let P = F.top + window.scrollY;
|
|
1253
|
+
P + u > q && (P = q - u - 20), f(!0), E({
|
|
1254
1254
|
top: P - 80,
|
|
1255
|
-
left:
|
|
1256
|
-
}),
|
|
1255
|
+
left: F.left - 30
|
|
1256
|
+
}), S(A);
|
|
1257
1257
|
};
|
|
1258
|
-
function
|
|
1259
|
-
if (
|
|
1260
|
-
return
|
|
1258
|
+
function T(N) {
|
|
1259
|
+
if (M)
|
|
1260
|
+
return N ? /* @__PURE__ */ t.jsx(
|
|
1261
1261
|
"img",
|
|
1262
1262
|
{
|
|
1263
|
-
src: `https://imagedelivery.net/${
|
|
1263
|
+
src: `https://imagedelivery.net/${N}/w=1000`,
|
|
1264
1264
|
alt: "image",
|
|
1265
1265
|
width: 16,
|
|
1266
1266
|
height: 16
|
|
1267
1267
|
}
|
|
1268
1268
|
) : /* @__PURE__ */ t.jsx(
|
|
1269
|
-
|
|
1269
|
+
I,
|
|
1270
1270
|
{
|
|
1271
1271
|
name: "Image",
|
|
1272
1272
|
width: 16,
|
|
@@ -1275,21 +1275,21 @@ const Un = (h) => {
|
|
|
1275
1275
|
}
|
|
1276
1276
|
);
|
|
1277
1277
|
}
|
|
1278
|
-
const
|
|
1279
|
-
const { active: A, over:
|
|
1280
|
-
if (
|
|
1281
|
-
const u = s.findIndex((P) => String(P.listingId) === A.id),
|
|
1282
|
-
if (u !== -1 &&
|
|
1278
|
+
const $ = (N) => {
|
|
1279
|
+
const { active: A, over: F } = N;
|
|
1280
|
+
if (F && A.id !== F.id) {
|
|
1281
|
+
const u = s.findIndex((P) => String(P.listingId) === A.id), q = s.findIndex((P) => String(P.listingId) === F.id);
|
|
1282
|
+
if (u !== -1 && q !== -1) {
|
|
1283
1283
|
const P = [...s], [D] = P.splice(u, 1);
|
|
1284
|
-
P.splice(
|
|
1284
|
+
P.splice(q, 0, D), e(P);
|
|
1285
1285
|
}
|
|
1286
1286
|
}
|
|
1287
|
-
},
|
|
1288
|
-
const A = l.find((u) =>
|
|
1287
|
+
}, C = (N) => {
|
|
1288
|
+
const A = l.find((u) => N.listingId === u.id);
|
|
1289
1289
|
if (!A) return null;
|
|
1290
|
-
const
|
|
1291
|
-
|
|
1292
|
-
|
|
1290
|
+
const F = /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
1291
|
+
b && /* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
|
|
1292
|
+
I,
|
|
1293
1293
|
{
|
|
1294
1294
|
name: "DotsSixVertical",
|
|
1295
1295
|
hoverable: !0,
|
|
@@ -1301,106 +1301,106 @@ const Un = (h) => {
|
|
|
1301
1301
|
at,
|
|
1302
1302
|
{
|
|
1303
1303
|
onChange: (u) => {
|
|
1304
|
-
const
|
|
1304
|
+
const q = [...s], P = l.find((U) => U.productData.name === u);
|
|
1305
1305
|
if (!P) return;
|
|
1306
1306
|
const D = {
|
|
1307
1307
|
listingId: P.id,
|
|
1308
1308
|
image: P.productData.images.length > 0 ? P.productData.images[0].cfId : ""
|
|
1309
|
-
}, et =
|
|
1310
|
-
|
|
1309
|
+
}, et = q.map((U) => U.listingId === N.listingId ? D : U);
|
|
1310
|
+
S(D), e([...et]);
|
|
1311
1311
|
},
|
|
1312
1312
|
value: A.productData.name,
|
|
1313
1313
|
options: [
|
|
1314
|
-
...l.filter((u) => !s.find((
|
|
1314
|
+
...l.filter((u) => !s.find((q) => q.listingId === u.id)).map((u) => u.productData.name)
|
|
1315
1315
|
],
|
|
1316
1316
|
leftAddonOptions: l.map((u) => {
|
|
1317
|
-
var
|
|
1317
|
+
var q;
|
|
1318
1318
|
return {
|
|
1319
1319
|
value: u.productData.name,
|
|
1320
|
-
addon:
|
|
1320
|
+
addon: T(((q = u.productData.images[0]) == null ? void 0 : q.cfId) || "")
|
|
1321
1321
|
};
|
|
1322
1322
|
})
|
|
1323
1323
|
}
|
|
1324
1324
|
),
|
|
1325
1325
|
/* @__PURE__ */ t.jsxs("div", { className: W.buttons, children: [
|
|
1326
|
-
|
|
1327
|
-
|
|
1326
|
+
v && /* @__PURE__ */ t.jsx("div", { className: W.deleteButton, children: /* @__PURE__ */ t.jsx(
|
|
1327
|
+
I,
|
|
1328
1328
|
{
|
|
1329
1329
|
name: "Sliders",
|
|
1330
1330
|
hoverable: !0,
|
|
1331
1331
|
width: 20,
|
|
1332
1332
|
height: 20,
|
|
1333
|
-
onClick: (u) =>
|
|
1333
|
+
onClick: (u) => w(u, N)
|
|
1334
1334
|
}
|
|
1335
1335
|
) }),
|
|
1336
|
-
|
|
1337
|
-
|
|
1336
|
+
j && /* @__PURE__ */ t.jsx("div", { className: W.deleteButton, children: /* @__PURE__ */ t.jsx(
|
|
1337
|
+
I,
|
|
1338
1338
|
{
|
|
1339
1339
|
name: "Trash",
|
|
1340
1340
|
hoverable: !0,
|
|
1341
1341
|
width: 20,
|
|
1342
1342
|
height: 20,
|
|
1343
1343
|
fill: "#C12A2A",
|
|
1344
|
-
onClick: () => e(s.filter((u) => u !==
|
|
1344
|
+
onClick: () => e(s.filter((u) => u !== N))
|
|
1345
1345
|
}
|
|
1346
1346
|
) })
|
|
1347
1347
|
] })
|
|
1348
1348
|
] });
|
|
1349
|
-
return
|
|
1349
|
+
return b ? /* @__PURE__ */ t.jsx(
|
|
1350
1350
|
Ae,
|
|
1351
1351
|
{
|
|
1352
|
-
product:
|
|
1353
|
-
children:
|
|
1352
|
+
product: N,
|
|
1353
|
+
children: F
|
|
1354
1354
|
},
|
|
1355
|
-
|
|
1355
|
+
N.listingId
|
|
1356
1356
|
) : /* @__PURE__ */ t.jsx(
|
|
1357
1357
|
"div",
|
|
1358
1358
|
{
|
|
1359
1359
|
className: W.product,
|
|
1360
|
-
children:
|
|
1360
|
+
children: F
|
|
1361
1361
|
},
|
|
1362
|
-
|
|
1362
|
+
N.listingId
|
|
1363
1363
|
);
|
|
1364
|
-
},
|
|
1364
|
+
}, O = y.useRef(null);
|
|
1365
1365
|
return /* @__PURE__ */ t.jsxs("div", { className: W.productsBlock, children: [
|
|
1366
|
-
(
|
|
1367
|
-
|
|
1368
|
-
|
|
1366
|
+
(o || n !== void 0) && /* @__PURE__ */ t.jsxs("div", { className: W.top, children: [
|
|
1367
|
+
o && /* @__PURE__ */ t.jsx("h3", { className: W.title, children: o }),
|
|
1368
|
+
n !== void 0 && /* @__PURE__ */ t.jsx(
|
|
1369
1369
|
lt,
|
|
1370
1370
|
{
|
|
1371
|
-
current:
|
|
1372
|
-
onChange: (
|
|
1371
|
+
current: n,
|
|
1372
|
+
onChange: (N) => a == null ? void 0 : a(N)
|
|
1373
1373
|
}
|
|
1374
1374
|
)
|
|
1375
1375
|
] }),
|
|
1376
|
-
K &&
|
|
1376
|
+
K && _ && /* @__PURE__ */ t.jsx(
|
|
1377
1377
|
Et,
|
|
1378
1378
|
{
|
|
1379
|
-
ref:
|
|
1380
|
-
activeItem:
|
|
1381
|
-
setActiveItem:
|
|
1382
|
-
setIsOpenModal:
|
|
1383
|
-
popupPosition:
|
|
1379
|
+
ref: O,
|
|
1380
|
+
activeItem: _,
|
|
1381
|
+
setActiveItem: S,
|
|
1382
|
+
setIsOpenModal: f,
|
|
1383
|
+
popupPosition: L,
|
|
1384
1384
|
itemsOptions: l
|
|
1385
1385
|
}
|
|
1386
1386
|
),
|
|
1387
|
-
|
|
1388
|
-
|
|
1389
|
-
|
|
1387
|
+
n && /* @__PURE__ */ t.jsxs("div", { className: W.products, children: [
|
|
1388
|
+
x && /* @__PURE__ */ t.jsx("h5", { className: W.subtitle, children: x }),
|
|
1389
|
+
b ? /* @__PURE__ */ t.jsx(
|
|
1390
1390
|
ft,
|
|
1391
1391
|
{
|
|
1392
1392
|
sensors: p,
|
|
1393
|
-
onDragEnd:
|
|
1393
|
+
onDragEnd: $,
|
|
1394
1394
|
children: /* @__PURE__ */ t.jsx(
|
|
1395
1395
|
xt,
|
|
1396
1396
|
{
|
|
1397
|
-
items: s.map((
|
|
1397
|
+
items: s.map((N) => String(N.listingId)),
|
|
1398
1398
|
strategy: _t,
|
|
1399
|
-
children: s.map((
|
|
1399
|
+
children: s.map((N) => C(N))
|
|
1400
1400
|
}
|
|
1401
1401
|
)
|
|
1402
1402
|
}
|
|
1403
|
-
) : s.map((
|
|
1403
|
+
) : s.map((N) => C(N)),
|
|
1404
1404
|
m && /* @__PURE__ */ t.jsx(
|
|
1405
1405
|
"div",
|
|
1406
1406
|
{
|
|
@@ -1416,25 +1416,25 @@ const Un = (h) => {
|
|
|
1416
1416
|
className: W.button,
|
|
1417
1417
|
size: "s",
|
|
1418
1418
|
onClick: () => {
|
|
1419
|
-
const
|
|
1419
|
+
const N = [...s];
|
|
1420
1420
|
for (let A = 0; A < l.length; A++)
|
|
1421
|
-
if (!s.find((
|
|
1422
|
-
|
|
1421
|
+
if (!s.find((F) => F.listingId === l[A].id)) {
|
|
1422
|
+
N.push({
|
|
1423
1423
|
listingId: l[A].id,
|
|
1424
1424
|
image: l[A].productData.images.length > 0 ? l[A].productData.images[0].cfId : ""
|
|
1425
1425
|
});
|
|
1426
1426
|
break;
|
|
1427
1427
|
}
|
|
1428
|
-
e(
|
|
1428
|
+
e(N);
|
|
1429
1429
|
},
|
|
1430
|
-
disabled: s.length === (
|
|
1430
|
+
disabled: s.length === (g || l.length),
|
|
1431
1431
|
style: {
|
|
1432
1432
|
width: "fit-content"
|
|
1433
1433
|
},
|
|
1434
1434
|
children: /* @__PURE__ */ t.jsxs("div", { className: W.addButton, children: [
|
|
1435
1435
|
/* @__PURE__ */ t.jsx("span", { children: "Add Option" }),
|
|
1436
1436
|
/* @__PURE__ */ t.jsx(
|
|
1437
|
-
|
|
1437
|
+
I,
|
|
1438
1438
|
{
|
|
1439
1439
|
name: "Plus",
|
|
1440
1440
|
width: 16,
|
|
@@ -1447,16 +1447,16 @@ const Un = (h) => {
|
|
|
1447
1447
|
}
|
|
1448
1448
|
)
|
|
1449
1449
|
] }),
|
|
1450
|
-
|
|
1450
|
+
c && i && /* @__PURE__ */ t.jsx(
|
|
1451
1451
|
at,
|
|
1452
1452
|
{
|
|
1453
|
-
value:
|
|
1454
|
-
options: Object.keys(
|
|
1455
|
-
onChange: (
|
|
1456
|
-
leftAddonOptions:
|
|
1453
|
+
value: c,
|
|
1454
|
+
options: Object.keys(kt),
|
|
1455
|
+
onChange: (N) => i(N),
|
|
1456
|
+
leftAddonOptions: Pt
|
|
1457
1457
|
}
|
|
1458
1458
|
),
|
|
1459
|
-
|
|
1459
|
+
n && r !== void 0 && /* @__PURE__ */ t.jsx(
|
|
1460
1460
|
ht,
|
|
1461
1461
|
{
|
|
1462
1462
|
otherTitle: "Other",
|
|
@@ -1464,15 +1464,15 @@ const Un = (h) => {
|
|
|
1464
1464
|
}
|
|
1465
1465
|
)
|
|
1466
1466
|
] });
|
|
1467
|
-
}, De = "
|
|
1467
|
+
}, De = "_options_wqtfh_1", Ee = "_price_wqtfh_18", Re = "_oldPrice_wqtfh_25", Le = "_newPrice_wqtfh_34", Ue = "_animate_wqtfh_42", ze = "_meta_wqtfh_60", Fe = "_info_wqtfh_66", He = "_infoRight_wqtfh_75", Ve = "_buttons_wqtfh_82", Ye = "_variants_wqtfh_89", Ge = "_variant_wqtfh_89", We = "_stock_wqtfh_107", Xe = "_variantInfo_wqtfh_114", Qe = "_quantity_wqtfh_121", Je = "_button_wqtfh_82", Ke = "_activeVariant_wqtfh_167", Ze = "_chargeTypes_wqtfh_171", ts = "_charge_wqtfh_171", es = "_chargeActive_wqtfh_196", ss = "_title_wqtfh_204", B = {
|
|
1468
1468
|
options: De,
|
|
1469
1469
|
price: Ee,
|
|
1470
|
-
oldPrice:
|
|
1471
|
-
newPrice:
|
|
1472
|
-
animate:
|
|
1473
|
-
meta:
|
|
1474
|
-
info:
|
|
1475
|
-
infoRight:
|
|
1470
|
+
oldPrice: Re,
|
|
1471
|
+
newPrice: Le,
|
|
1472
|
+
animate: Ue,
|
|
1473
|
+
meta: ze,
|
|
1474
|
+
info: Fe,
|
|
1475
|
+
infoRight: He,
|
|
1476
1476
|
buttons: Ve,
|
|
1477
1477
|
variants: Ye,
|
|
1478
1478
|
variant: Ge,
|
|
@@ -1486,160 +1486,181 @@ const Un = (h) => {
|
|
|
1486
1486
|
chargeActive: es,
|
|
1487
1487
|
title: ss
|
|
1488
1488
|
};
|
|
1489
|
-
var
|
|
1489
|
+
var qt = /* @__PURE__ */ ((h) => (h.ONE_TIME = "One-Time", h.RECURRING = "Subscribe & Save", h))(qt || {});
|
|
1490
1490
|
const ns = (h) => {
|
|
1491
|
-
var
|
|
1492
|
-
const { product:
|
|
1491
|
+
var E, K;
|
|
1492
|
+
const { product: n, setIsOpen: a } = h, { variants: s } = n, [e, r] = y.useState(s[0]), [o, x] = y.useState(
|
|
1493
1493
|
e.chargeTypes ? e.chargeTypes[0] : "ONE_TIME"
|
|
1494
|
-
), { notifications:
|
|
1495
|
-
|
|
1496
|
-
|
|
1497
|
-
const
|
|
1498
|
-
return () => clearTimeout(
|
|
1499
|
-
}, [
|
|
1500
|
-
async function
|
|
1494
|
+
), { notifications: v, setNotifications: b } = Ct(), M = St(), [j, m] = y.useState(1), { cart: d, reset: l, addProductToCart: g } = ct(), [c, i] = y.useState(!1);
|
|
1495
|
+
y.useEffect(() => {
|
|
1496
|
+
i(!0);
|
|
1497
|
+
const f = setTimeout(() => i(!1), 600);
|
|
1498
|
+
return () => clearTimeout(f);
|
|
1499
|
+
}, [j]);
|
|
1500
|
+
async function _() {
|
|
1501
1501
|
try {
|
|
1502
|
-
|
|
1503
|
-
productId:
|
|
1502
|
+
g({
|
|
1503
|
+
productId: n.id,
|
|
1504
1504
|
productVariantId: e.id,
|
|
1505
|
-
chargeType:
|
|
1506
|
-
quantity:
|
|
1507
|
-
}),
|
|
1508
|
-
...
|
|
1505
|
+
chargeType: o,
|
|
1506
|
+
quantity: j
|
|
1507
|
+
}), b([
|
|
1508
|
+
...v,
|
|
1509
1509
|
{
|
|
1510
1510
|
id: J(),
|
|
1511
1511
|
message: "Product added to cart",
|
|
1512
1512
|
status: "success"
|
|
1513
1513
|
}
|
|
1514
1514
|
]);
|
|
1515
|
-
} catch (
|
|
1516
|
-
|
|
1517
|
-
...
|
|
1515
|
+
} catch (f) {
|
|
1516
|
+
b([
|
|
1517
|
+
...v,
|
|
1518
1518
|
{
|
|
1519
1519
|
id: J(),
|
|
1520
|
-
message: `Product failed to add to cart: ${
|
|
1520
|
+
message: `Product failed to add to cart: ${f}`,
|
|
1521
1521
|
status: "error"
|
|
1522
1522
|
}
|
|
1523
1523
|
]);
|
|
1524
1524
|
}
|
|
1525
1525
|
a == null || a(!1);
|
|
1526
1526
|
}
|
|
1527
|
-
function
|
|
1528
|
-
l(),
|
|
1527
|
+
function S() {
|
|
1528
|
+
l(), _(), M("/checkout");
|
|
1529
1529
|
}
|
|
1530
|
-
function
|
|
1531
|
-
if (
|
|
1532
|
-
const
|
|
1533
|
-
return `${
|
|
1534
|
-
} else if (
|
|
1535
|
-
const
|
|
1536
|
-
return `${
|
|
1537
|
-
} else if (
|
|
1538
|
-
const
|
|
1539
|
-
return `${
|
|
1530
|
+
function L(f) {
|
|
1531
|
+
if (f >= 864e5) {
|
|
1532
|
+
const C = Math.floor(f / 864e5);
|
|
1533
|
+
return `${C} ${C === 1 ? "day" : "days"}`;
|
|
1534
|
+
} else if (f >= 36e5) {
|
|
1535
|
+
const C = Math.floor(f / 36e5);
|
|
1536
|
+
return `${C} ${C === 1 ? "hour" : "hours"}`;
|
|
1537
|
+
} else if (f >= 6e4) {
|
|
1538
|
+
const C = Math.floor(f / 6e4);
|
|
1539
|
+
return `${C} ${C === 1 ? "minute" : "minutes"}`;
|
|
1540
1540
|
} else {
|
|
1541
|
-
const
|
|
1542
|
-
return `${
|
|
1541
|
+
const C = Math.floor(f / 1e3);
|
|
1542
|
+
return `${C} ${C === 1 ? "second" : "seconds"}`;
|
|
1543
1543
|
}
|
|
1544
1544
|
}
|
|
1545
|
-
return
|
|
1545
|
+
return y.useEffect(() => {
|
|
1546
1546
|
e.quantity && e.quantity.available === 0 ? m(0) : m(1);
|
|
1547
|
-
}, [e.quantity.available]),
|
|
1548
|
-
e.chargeTypes &&
|
|
1549
|
-
e.chargeTypes.includes(
|
|
1547
|
+
}, [e.quantity.available]), y.useEffect(() => {
|
|
1548
|
+
e.chargeTypes && x(
|
|
1549
|
+
e.chargeTypes.includes(o) ? o : e.chargeTypes[0]
|
|
1550
1550
|
);
|
|
1551
1551
|
}, [e.chargeTypes]), /* @__PURE__ */ t.jsxs("div", { className: B.options, children: [
|
|
1552
|
-
e.chargeTypes && e.chargeTypes.length > 1 && /* @__PURE__ */ t.jsx("div", { className: B.chargeTypes, children: e.chargeTypes.map((
|
|
1552
|
+
e.chargeTypes && e.chargeTypes.length > 1 && /* @__PURE__ */ t.jsx("div", { className: B.chargeTypes, children: e.chargeTypes.map((f) => /* @__PURE__ */ t.jsx(
|
|
1553
1553
|
"div",
|
|
1554
1554
|
{
|
|
1555
|
-
className:
|
|
1556
|
-
[B.chargeActive]:
|
|
1555
|
+
className: H(B.charge, {
|
|
1556
|
+
[B.chargeActive]: o === f
|
|
1557
1557
|
}),
|
|
1558
|
-
onClick: () => f
|
|
1559
|
-
children:
|
|
1558
|
+
onClick: () => x(f),
|
|
1559
|
+
children: qt[f]
|
|
1560
1560
|
},
|
|
1561
|
-
|
|
1561
|
+
f
|
|
1562
1562
|
)) }),
|
|
1563
|
-
/* @__PURE__ */ t.jsx("div", { className: B.variants, children: s.filter((
|
|
1563
|
+
/* @__PURE__ */ t.jsx("div", { className: B.variants, children: s.filter((f) => {
|
|
1564
1564
|
var p;
|
|
1565
|
-
return (p =
|
|
1566
|
-
}).map((
|
|
1567
|
-
var p,
|
|
1565
|
+
return (p = f.chargeTypes) == null ? void 0 : p.includes(o);
|
|
1566
|
+
}).map((f) => {
|
|
1567
|
+
var p, w;
|
|
1568
1568
|
return /* @__PURE__ */ t.jsxs(
|
|
1569
1569
|
"div",
|
|
1570
1570
|
{
|
|
1571
|
-
className:
|
|
1572
|
-
[B.activeVariant]: e.id ===
|
|
1571
|
+
className: H(B.variant, {
|
|
1572
|
+
[B.activeVariant]: e.id === f.id
|
|
1573
1573
|
}),
|
|
1574
|
-
onClick: () => r(
|
|
1574
|
+
onClick: () => r(f),
|
|
1575
1575
|
children: [
|
|
1576
1576
|
/* @__PURE__ */ t.jsxs("div", { className: B.variantInfo, children: [
|
|
1577
|
-
/* @__PURE__ */ t.jsx(
|
|
1578
|
-
|
|
1577
|
+
/* @__PURE__ */ t.jsx(
|
|
1578
|
+
"span",
|
|
1579
|
+
{
|
|
1580
|
+
className: B.title,
|
|
1581
|
+
id: "h4",
|
|
1582
|
+
children: it(f.name)
|
|
1583
|
+
}
|
|
1584
|
+
),
|
|
1585
|
+
/* @__PURE__ */ t.jsxs("span", { id: "md", children: [
|
|
1579
1586
|
Q({
|
|
1580
|
-
amount:
|
|
1581
|
-
currency:
|
|
1587
|
+
amount: o === "ONE_TIME" ? f.price.amount : f.subscriptionSettings ? f.subscriptionSettings.price.amount : 0,
|
|
1588
|
+
currency: o === "ONE_TIME" ? f.price.currency : f.subscriptionSettings ? f.subscriptionSettings.price.currency : "USD"
|
|
1582
1589
|
}),
|
|
1583
1590
|
" ",
|
|
1584
|
-
|
|
1591
|
+
o === "RECURRING" && f.subscriptionSettings && ` / ${Rt(f.subscriptionSettings.recurringIntervalDays || 0)}`
|
|
1585
1592
|
] })
|
|
1586
1593
|
] }),
|
|
1587
|
-
/* @__PURE__ */ t.jsx("div", { children:
|
|
1588
|
-
|
|
1589
|
-
|
|
1590
|
-
|
|
1591
|
-
|
|
1594
|
+
/* @__PURE__ */ t.jsx("div", { id: "md", children: o === "ONE_TIME" && /* @__PURE__ */ t.jsxs(
|
|
1595
|
+
"span",
|
|
1596
|
+
{
|
|
1597
|
+
className: B.stock,
|
|
1598
|
+
id: "md",
|
|
1599
|
+
children: [
|
|
1600
|
+
(p = f.quantity.restrictions) != null && p.max || f.quantity.available !== void 0 ? ((w = f.quantity.restrictions) == null ? void 0 : w.max) || f.quantity.available : "∞",
|
|
1601
|
+
" ",
|
|
1602
|
+
"in stock"
|
|
1603
|
+
]
|
|
1604
|
+
}
|
|
1605
|
+
) })
|
|
1592
1606
|
]
|
|
1593
1607
|
},
|
|
1594
|
-
|
|
1608
|
+
f.id
|
|
1595
1609
|
);
|
|
1596
1610
|
}) }),
|
|
1597
|
-
|
|
1598
|
-
|
|
1599
|
-
|
|
1600
|
-
|
|
1601
|
-
|
|
1602
|
-
|
|
1603
|
-
|
|
1604
|
-
|
|
1605
|
-
|
|
1606
|
-
|
|
1607
|
-
|
|
1608
|
-
|
|
1609
|
-
|
|
1610
|
-
|
|
1611
|
-
|
|
1612
|
-
|
|
1613
|
-
|
|
1614
|
-
|
|
1615
|
-
|
|
1616
|
-
|
|
1617
|
-
|
|
1618
|
-
|
|
1619
|
-
|
|
1620
|
-
|
|
1621
|
-
|
|
1622
|
-
|
|
1623
|
-
|
|
1624
|
-
|
|
1625
|
-
|
|
1626
|
-
|
|
1627
|
-
|
|
1628
|
-
|
|
1629
|
-
|
|
1630
|
-
|
|
1631
|
-
|
|
1632
|
-
|
|
1633
|
-
|
|
1634
|
-
|
|
1635
|
-
|
|
1636
|
-
|
|
1611
|
+
o === "ONE_TIME" && /* @__PURE__ */ t.jsxs(
|
|
1612
|
+
"div",
|
|
1613
|
+
{
|
|
1614
|
+
className: B.quantity,
|
|
1615
|
+
id: "md",
|
|
1616
|
+
children: [
|
|
1617
|
+
/* @__PURE__ */ t.jsx(
|
|
1618
|
+
R,
|
|
1619
|
+
{
|
|
1620
|
+
type: "Secondary",
|
|
1621
|
+
onClick: () => {
|
|
1622
|
+
j > 1 ? m((f) => f - 1) : m(1);
|
|
1623
|
+
},
|
|
1624
|
+
className: B.button,
|
|
1625
|
+
disabled: e.quantity.available && e.quantity.restrictions && j <= e.quantity.restrictions.min || e.quantity.available === 0,
|
|
1626
|
+
children: /* @__PURE__ */ t.jsx(I, { name: "Minus" })
|
|
1627
|
+
}
|
|
1628
|
+
),
|
|
1629
|
+
/* @__PURE__ */ t.jsx(
|
|
1630
|
+
Lt,
|
|
1631
|
+
{
|
|
1632
|
+
type: "number",
|
|
1633
|
+
value: String(j),
|
|
1634
|
+
onChange: (f) => {
|
|
1635
|
+
e.quantity.available && Number(f) > e.quantity.available ? m(e.quantity.available) : m(Number(f));
|
|
1636
|
+
},
|
|
1637
|
+
max: ((E = e.quantity.restrictions) == null ? void 0 : E.max) || e.quantity.available || Number.POSITIVE_INFINITY,
|
|
1638
|
+
min: ((K = e.quantity.restrictions) == null ? void 0 : K.min) || 0,
|
|
1639
|
+
centered: !0,
|
|
1640
|
+
disabled: e.quantity && e.quantity.available === 0 || Object.keys(e.quantity.restrictions || {}).length !== 0 && j >= e.quantity.restrictions.max
|
|
1641
|
+
}
|
|
1642
|
+
),
|
|
1643
|
+
/* @__PURE__ */ t.jsx(
|
|
1644
|
+
R,
|
|
1645
|
+
{
|
|
1646
|
+
type: "Secondary",
|
|
1647
|
+
onClick: () => {
|
|
1648
|
+
m((f) => f + 1);
|
|
1649
|
+
},
|
|
1650
|
+
className: B.button,
|
|
1651
|
+
disabled: !!(e.quantity.available && e.quantity.restrictions && j >= e.quantity.restrictions.max || e.quantity.available === 0 || e.quantity.available && j >= e.quantity.available),
|
|
1652
|
+
children: /* @__PURE__ */ t.jsx(I, { name: "Plus" })
|
|
1653
|
+
}
|
|
1654
|
+
)
|
|
1655
|
+
]
|
|
1656
|
+
}
|
|
1657
|
+
),
|
|
1637
1658
|
/* @__PURE__ */ t.jsxs("div", { className: B.meta, children: [
|
|
1638
1659
|
/* @__PURE__ */ t.jsxs("div", { className: B.info, children: [
|
|
1639
|
-
/* @__PURE__ */ t.jsx("span", { children: "Delivery" }),
|
|
1660
|
+
/* @__PURE__ */ t.jsx("span", { id: "md", children: "Delivery" }),
|
|
1640
1661
|
/* @__PURE__ */ t.jsxs("div", { className: B.infoRight, children: [
|
|
1641
1662
|
/* @__PURE__ */ t.jsx(
|
|
1642
|
-
|
|
1663
|
+
I,
|
|
1643
1664
|
{
|
|
1644
1665
|
name: "Lightning",
|
|
1645
1666
|
fill: "var(--text-action)",
|
|
@@ -1647,62 +1668,111 @@ const ns = (h) => {
|
|
|
1647
1668
|
height: 20
|
|
1648
1669
|
}
|
|
1649
1670
|
),
|
|
1650
|
-
/* @__PURE__ */ t.jsx("span", { children: !e.deliveryTime || e.deliveryTime === 0 ? "Instant" :
|
|
1671
|
+
/* @__PURE__ */ t.jsx("span", { id: "md", children: !e.deliveryTime || e.deliveryTime === 0 ? "Instant" : L(e.deliveryTime) })
|
|
1651
1672
|
] })
|
|
1652
1673
|
] }),
|
|
1653
1674
|
/* @__PURE__ */ t.jsxs("div", { className: B.info, children: [
|
|
1654
|
-
/* @__PURE__ */ t.jsx("span", { children: "Price" }),
|
|
1655
|
-
/* @__PURE__ */ t.jsx("div", { className: B.infoRight, children:
|
|
1656
|
-
|
|
1657
|
-
|
|
1658
|
-
|
|
1659
|
-
|
|
1660
|
-
|
|
1661
|
-
|
|
1662
|
-
|
|
1663
|
-
|
|
1664
|
-
|
|
1665
|
-
|
|
1666
|
-
|
|
1667
|
-
|
|
1668
|
-
|
|
1669
|
-
|
|
1670
|
-
|
|
1671
|
-
|
|
1672
|
-
|
|
1673
|
-
|
|
1674
|
-
|
|
1675
|
-
|
|
1676
|
-
|
|
1677
|
-
|
|
1678
|
-
|
|
1679
|
-
|
|
1675
|
+
/* @__PURE__ */ t.jsx("span", { id: "md", children: "Price" }),
|
|
1676
|
+
/* @__PURE__ */ t.jsx("div", { className: B.infoRight, children: o === "ONE_TIME" ? e.compareAtPrice && (e.compareAtPrice.amount || 0) - (e.price.amount || 0) > 0 ? /* @__PURE__ */ t.jsxs(
|
|
1677
|
+
"div",
|
|
1678
|
+
{
|
|
1679
|
+
className: B.price,
|
|
1680
|
+
id: "md",
|
|
1681
|
+
children: [
|
|
1682
|
+
/* @__PURE__ */ t.jsx("span", { className: H(B.newPrice, { [B.animate]: c }), children: Q({
|
|
1683
|
+
amount: e.price.amount * j,
|
|
1684
|
+
currency: e.price.currency
|
|
1685
|
+
}) }),
|
|
1686
|
+
/* @__PURE__ */ t.jsx(
|
|
1687
|
+
"span",
|
|
1688
|
+
{
|
|
1689
|
+
className: B.oldPrice,
|
|
1690
|
+
id: "md",
|
|
1691
|
+
children: Q({
|
|
1692
|
+
amount: e.compareAtPrice.amount * j,
|
|
1693
|
+
currency: e.compareAtPrice.currency
|
|
1694
|
+
})
|
|
1695
|
+
}
|
|
1696
|
+
)
|
|
1697
|
+
]
|
|
1698
|
+
}
|
|
1699
|
+
) : /* @__PURE__ */ t.jsx(
|
|
1700
|
+
"span",
|
|
1701
|
+
{
|
|
1702
|
+
className: H(B.newPrice, { [B.animate]: c }),
|
|
1703
|
+
id: "md",
|
|
1704
|
+
children: Q({
|
|
1705
|
+
amount: e.price.amount * j,
|
|
1706
|
+
currency: e.price.currency
|
|
1707
|
+
})
|
|
1708
|
+
}
|
|
1709
|
+
) : e.subscriptionSettings && e.subscriptionSettings.compareAtPrice && (e.subscriptionSettings.compareAtPrice.amount || 0) - (e.subscriptionSettings.price.amount || 0) > 0 ? /* @__PURE__ */ t.jsxs(
|
|
1710
|
+
"div",
|
|
1711
|
+
{
|
|
1712
|
+
className: B.price,
|
|
1713
|
+
id: "md",
|
|
1714
|
+
children: [
|
|
1715
|
+
/* @__PURE__ */ t.jsx(
|
|
1716
|
+
"span",
|
|
1717
|
+
{
|
|
1718
|
+
className: H(B.newPrice, { [B.animate]: c }),
|
|
1719
|
+
id: "md",
|
|
1720
|
+
children: Q({
|
|
1721
|
+
amount: e.subscriptionSettings.price.amount * j,
|
|
1722
|
+
currency: e.subscriptionSettings.price.currency
|
|
1723
|
+
})
|
|
1724
|
+
}
|
|
1725
|
+
),
|
|
1726
|
+
/* @__PURE__ */ t.jsx(
|
|
1727
|
+
"span",
|
|
1728
|
+
{
|
|
1729
|
+
className: B.oldPrice,
|
|
1730
|
+
id: "md",
|
|
1731
|
+
children: Q({
|
|
1732
|
+
amount: e.subscriptionSettings.compareAtPrice.amount * j,
|
|
1733
|
+
currency: e.subscriptionSettings.compareAtPrice.currency
|
|
1734
|
+
})
|
|
1735
|
+
}
|
|
1736
|
+
)
|
|
1737
|
+
]
|
|
1738
|
+
}
|
|
1739
|
+
) : e.subscriptionSettings && /* @__PURE__ */ t.jsx(
|
|
1740
|
+
"span",
|
|
1741
|
+
{
|
|
1742
|
+
className: H(B.newPrice, { [B.animate]: c }),
|
|
1743
|
+
id: "md",
|
|
1744
|
+
children: Q({
|
|
1745
|
+
amount: e.subscriptionSettings.price.amount * j,
|
|
1746
|
+
currency: e.subscriptionSettings.price.currency
|
|
1747
|
+
})
|
|
1748
|
+
}
|
|
1749
|
+
) })
|
|
1680
1750
|
] })
|
|
1681
1751
|
] }),
|
|
1682
1752
|
/* @__PURE__ */ t.jsxs("div", { className: B.buttons, children: [
|
|
1683
1753
|
/* @__PURE__ */ t.jsx(
|
|
1684
|
-
|
|
1754
|
+
R,
|
|
1685
1755
|
{
|
|
1686
1756
|
type: "Primary",
|
|
1687
|
-
onClick: () =>
|
|
1757
|
+
onClick: () => S(),
|
|
1688
1758
|
disabled: e.quantity && e.quantity.available === 0,
|
|
1689
|
-
children:
|
|
1759
|
+
children: o === "ONE_TIME" ? "Buy Now" : "Subscribe Now"
|
|
1690
1760
|
}
|
|
1691
1761
|
),
|
|
1692
|
-
|
|
1693
|
-
|
|
1762
|
+
o === "ONE_TIME" && /* @__PURE__ */ t.jsx(
|
|
1763
|
+
R,
|
|
1694
1764
|
{
|
|
1695
1765
|
type: "Secondary",
|
|
1696
|
-
onClick: () =>
|
|
1766
|
+
onClick: () => _(),
|
|
1697
1767
|
disabled: e.quantity && e.quantity.available === 0,
|
|
1698
1768
|
children: d.parts.some(
|
|
1699
|
-
(
|
|
1769
|
+
(f) => f.productId === n.id && f.productVariantId === e.id
|
|
1700
1770
|
) ? "Add More" : "Add to Cart"
|
|
1701
1771
|
}
|
|
1702
1772
|
)
|
|
1703
1773
|
] })
|
|
1704
1774
|
] });
|
|
1705
|
-
}, is = "
|
|
1775
|
+
}, is = "_buttons_1uy6y_23", as = "_modal_1uy6y_32", os = "_closing_1uy6y_65", cs = "_info_1uy6y_114", rs = "_top_1uy6y_121", ls = "_title_1uy6y_132", ds = "_clear_1uy6y_139", us = "_activeClear_1uy6y_146", hs = "_count_1uy6y_150", ps = "_cart_1uy6y_165", ms = "_empty_1uy6y_173", gs = "_product_1uy6y_199", fs = "_products_1uy6y_208", xs = "_image_1uy6y_216", _s = "_productInfo_1uy6y_233", ys = "_content_1uy6y_240", js = "_name_1uy6y_246", vs = "_price_1uy6y_252", bs = "_productButtons_1uy6y_258", Is = "_productButton_1uy6y_258", Ns = "_productCount_1uy6y_275", Cs = "_bottom_1uy6y_292", Ss = "_subtotal_1uy6y_300", ws = "_block_1uy6y_308", Ps = "_shoppingCount_1uy6y_315", ks = "_total_1uy6y_335", Ts = "_link_1uy6y_341", Ms = "_userInfo_1uy6y_348", Bs = "_pagesMobileModal_1uy6y_360", qs = "_pagesMobileModalContent_1uy6y_374", $s = "_pagesMobileModalHeader_1uy6y_380", Os = "_pagesMobileModalFooter_1uy6y_390", As = "_pageLink_1uy6y_397", Ds = "_rightButtons_1uy6y_406", k = {
|
|
1706
1776
|
buttons: is,
|
|
1707
1777
|
modal: as,
|
|
1708
1778
|
closing: os,
|
|
@@ -1718,78 +1788,79 @@ const ns = (h) => {
|
|
|
1718
1788
|
products: fs,
|
|
1719
1789
|
image: xs,
|
|
1720
1790
|
productInfo: _s,
|
|
1721
|
-
content:
|
|
1722
|
-
name:
|
|
1723
|
-
price:
|
|
1791
|
+
content: ys,
|
|
1792
|
+
name: js,
|
|
1793
|
+
price: vs,
|
|
1724
1794
|
productButtons: bs,
|
|
1725
1795
|
productButton: Is,
|
|
1726
1796
|
productCount: Ns,
|
|
1727
1797
|
bottom: Cs,
|
|
1728
1798
|
subtotal: Ss,
|
|
1729
|
-
block:
|
|
1730
|
-
shoppingCount:
|
|
1731
|
-
total:
|
|
1799
|
+
block: ws,
|
|
1800
|
+
shoppingCount: Ps,
|
|
1801
|
+
total: ks,
|
|
1732
1802
|
link: Ts,
|
|
1733
1803
|
userInfo: Ms,
|
|
1734
1804
|
pagesMobileModal: Bs,
|
|
1735
|
-
pagesMobileModalContent:
|
|
1736
|
-
pagesMobileModalHeader:
|
|
1737
|
-
pagesMobileModalFooter:
|
|
1805
|
+
pagesMobileModalContent: qs,
|
|
1806
|
+
pagesMobileModalHeader: $s,
|
|
1807
|
+
pagesMobileModalFooter: Os,
|
|
1738
1808
|
pageLink: As,
|
|
1739
|
-
rightButtons: Ds
|
|
1809
|
+
rightButtons: Ds,
|
|
1810
|
+
delete: "_delete_1uy6y_413"
|
|
1740
1811
|
}, Hn = (h) => {
|
|
1741
|
-
const { shopping:
|
|
1742
|
-
return /* @__PURE__ */ t.jsxs("div", { className: k.buttons, children: [
|
|
1743
|
-
|
|
1744
|
-
s && /* @__PURE__ */ t.jsx(
|
|
1745
|
-
] });
|
|
1812
|
+
const { shopping: n, signUp: a, isShowUserInfo: s = !0 } = h;
|
|
1813
|
+
return /* @__PURE__ */ t.jsx(t.Fragment, { children: (n || s) && /* @__PURE__ */ t.jsxs("div", { className: k.buttons, children: [
|
|
1814
|
+
n && /* @__PURE__ */ t.jsx(Es, {}),
|
|
1815
|
+
s && /* @__PURE__ */ t.jsx($t, { signUp: a })
|
|
1816
|
+
] }) });
|
|
1746
1817
|
}, Es = () => {
|
|
1747
|
-
const [h,
|
|
1748
|
-
function
|
|
1818
|
+
const [h, n] = y.useState(!1), [a, s] = y.useState([]), [e, r] = y.useState(!1), { cart: o, products: x } = ct();
|
|
1819
|
+
function v(l) {
|
|
1749
1820
|
if (l.variants.length > 0) {
|
|
1750
|
-
for (let
|
|
1751
|
-
for (let
|
|
1752
|
-
if (l.variants[
|
|
1753
|
-
return
|
|
1821
|
+
for (let g = 0; g < o.parts.length; g++)
|
|
1822
|
+
for (let c = 0; c < l.variants.length; c++)
|
|
1823
|
+
if (l.variants[c] && o.parts[g].productVariantId === l.variants[c].id)
|
|
1824
|
+
return o.parts[g].productVariantId;
|
|
1754
1825
|
}
|
|
1755
1826
|
return l.variants[0].id;
|
|
1756
1827
|
}
|
|
1757
|
-
function
|
|
1758
|
-
for (let
|
|
1759
|
-
for (let
|
|
1760
|
-
if (l.variants[
|
|
1761
|
-
return
|
|
1828
|
+
function b(l) {
|
|
1829
|
+
for (let g = 0; g < o.parts.length; g++)
|
|
1830
|
+
for (let c = 0; c < l.variants.length; c++)
|
|
1831
|
+
if (l.variants[c] && o.parts[g].productVariantId === l.variants[c].id)
|
|
1832
|
+
return o.parts[g].quantity;
|
|
1762
1833
|
}
|
|
1763
|
-
const
|
|
1764
|
-
for (let
|
|
1765
|
-
for (let
|
|
1766
|
-
if (l.variants[
|
|
1767
|
-
return
|
|
1834
|
+
const M = (l) => {
|
|
1835
|
+
for (let g = 0; g < o.parts.length; g++)
|
|
1836
|
+
for (let c = 0; c < l.variants.length; c++)
|
|
1837
|
+
if (l.variants[c] && o.parts[g].productVariantId === l.variants[c].id)
|
|
1838
|
+
return o.parts[g].chargeType;
|
|
1768
1839
|
return "ONE_TIME";
|
|
1769
1840
|
};
|
|
1770
|
-
|
|
1841
|
+
y.useEffect(() => {
|
|
1771
1842
|
(async () => {
|
|
1772
|
-
const
|
|
1773
|
-
...
|
|
1774
|
-
activeVariantId:
|
|
1775
|
-
quantity:
|
|
1776
|
-
chargeType:
|
|
1843
|
+
const g = o.parts.map((_) => String(_.productId)), i = (x.filter((_) => g.includes(String(_.id))) || []).map((_) => ({
|
|
1844
|
+
..._,
|
|
1845
|
+
activeVariantId: v(_),
|
|
1846
|
+
quantity: b(_),
|
|
1847
|
+
chargeType: M(_)
|
|
1777
1848
|
}));
|
|
1778
|
-
s(
|
|
1849
|
+
s(i);
|
|
1779
1850
|
})();
|
|
1780
|
-
}, [
|
|
1781
|
-
function
|
|
1851
|
+
}, [o.parts]);
|
|
1852
|
+
function j(l) {
|
|
1782
1853
|
return !l || !(l != null && l.variants) ? !1 : l.chargeType === "RECURRING";
|
|
1783
1854
|
}
|
|
1784
|
-
const m =
|
|
1855
|
+
const m = o.parts.length > 0 && a.length > 0 && !j(a[0]);
|
|
1785
1856
|
function d() {
|
|
1786
1857
|
r(!1), setTimeout(() => {
|
|
1787
|
-
|
|
1858
|
+
n(!1);
|
|
1788
1859
|
}, 300);
|
|
1789
1860
|
}
|
|
1790
1861
|
return /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
1791
1862
|
/* @__PURE__ */ t.jsxs(
|
|
1792
|
-
|
|
1863
|
+
R,
|
|
1793
1864
|
{
|
|
1794
1865
|
type: "Secondary",
|
|
1795
1866
|
style: {
|
|
@@ -1797,16 +1868,16 @@ const ns = (h) => {
|
|
|
1797
1868
|
position: "relative"
|
|
1798
1869
|
},
|
|
1799
1870
|
onClick: (l) => {
|
|
1800
|
-
l.stopPropagation(), window.location.pathname.includes("/admin/builder") || (
|
|
1871
|
+
l.stopPropagation(), window.location.pathname.includes("/admin/builder") || (n(!0), r(!0));
|
|
1801
1872
|
},
|
|
1802
1873
|
children: [
|
|
1803
1874
|
/* @__PURE__ */ t.jsx(
|
|
1804
|
-
|
|
1875
|
+
I,
|
|
1805
1876
|
{
|
|
1806
1877
|
name: "Handbag"
|
|
1807
1878
|
}
|
|
1808
1879
|
),
|
|
1809
|
-
m && /* @__PURE__ */ t.jsx("div", { className: k.shoppingCount, children:
|
|
1880
|
+
m && /* @__PURE__ */ t.jsx("div", { className: k.shoppingCount, children: o.parts.length })
|
|
1810
1881
|
]
|
|
1811
1882
|
}
|
|
1812
1883
|
),
|
|
@@ -1816,7 +1887,7 @@ const ns = (h) => {
|
|
|
1816
1887
|
close: d,
|
|
1817
1888
|
withAnimation: !1,
|
|
1818
1889
|
children: /* @__PURE__ */ t.jsx(
|
|
1819
|
-
|
|
1890
|
+
Rs,
|
|
1820
1891
|
{
|
|
1821
1892
|
activeProducts: a,
|
|
1822
1893
|
isCartNotEmpty: m,
|
|
@@ -1827,55 +1898,78 @@ const ns = (h) => {
|
|
|
1827
1898
|
}
|
|
1828
1899
|
)
|
|
1829
1900
|
] });
|
|
1830
|
-
},
|
|
1831
|
-
var
|
|
1832
|
-
const { activeProducts:
|
|
1833
|
-
function
|
|
1834
|
-
|
|
1901
|
+
}, Rs = (h) => {
|
|
1902
|
+
var g, c;
|
|
1903
|
+
const { activeProducts: n, isCartNotEmpty: a, isOpen: s, close: e } = h, { cart: r, reset: o, getTotalAndDiscount: x, updateQuantityOfProduct: v, removeProduct: b } = ct(), M = St();
|
|
1904
|
+
function j(i, _) {
|
|
1905
|
+
M(i, { replace: _ });
|
|
1835
1906
|
}
|
|
1836
|
-
function
|
|
1837
|
-
|
|
1838
|
-
productId:
|
|
1839
|
-
productVariantId:
|
|
1840
|
-
quantity:
|
|
1841
|
-
chargeType:
|
|
1907
|
+
function m(i) {
|
|
1908
|
+
i.quantity && v({
|
|
1909
|
+
productId: i.id,
|
|
1910
|
+
productVariantId: i.activeVariantId,
|
|
1911
|
+
quantity: i.quantity + 1,
|
|
1912
|
+
chargeType: i.chargeType
|
|
1842
1913
|
});
|
|
1843
1914
|
}
|
|
1844
|
-
function
|
|
1845
|
-
|
|
1846
|
-
productId:
|
|
1847
|
-
productVariantId:
|
|
1848
|
-
quantity:
|
|
1849
|
-
chargeType:
|
|
1915
|
+
function d(i) {
|
|
1916
|
+
i.quantity && v({
|
|
1917
|
+
productId: i.id,
|
|
1918
|
+
productVariantId: i.activeVariantId,
|
|
1919
|
+
quantity: i.quantity - 1,
|
|
1920
|
+
chargeType: i.chargeType
|
|
1921
|
+
});
|
|
1922
|
+
}
|
|
1923
|
+
function l(i) {
|
|
1924
|
+
b({
|
|
1925
|
+
productId: i.id,
|
|
1926
|
+
productVariantId: i.activeVariantId,
|
|
1927
|
+
quantity: i.quantity || 1,
|
|
1928
|
+
chargeType: i.chargeType
|
|
1850
1929
|
});
|
|
1851
1930
|
}
|
|
1852
1931
|
return /* @__PURE__ */ t.jsxs(
|
|
1853
1932
|
"div",
|
|
1854
1933
|
{
|
|
1855
|
-
className:
|
|
1934
|
+
className: H(k.modal, {
|
|
1856
1935
|
[k.closing]: !s
|
|
1857
1936
|
}),
|
|
1858
|
-
onClick: (
|
|
1937
|
+
onClick: (i) => i.stopPropagation(),
|
|
1859
1938
|
children: [
|
|
1860
1939
|
/* @__PURE__ */ t.jsxs("div", { className: k.top, children: [
|
|
1861
1940
|
/* @__PURE__ */ t.jsxs("div", { className: k.info, children: [
|
|
1862
|
-
/* @__PURE__ */ t.jsx(
|
|
1863
|
-
|
|
1941
|
+
/* @__PURE__ */ t.jsx(
|
|
1942
|
+
"span",
|
|
1943
|
+
{
|
|
1944
|
+
className: k.title,
|
|
1945
|
+
id: "h4",
|
|
1946
|
+
children: "Cart"
|
|
1947
|
+
}
|
|
1948
|
+
),
|
|
1949
|
+
a && /* @__PURE__ */ t.jsx(
|
|
1950
|
+
"div",
|
|
1951
|
+
{
|
|
1952
|
+
className: k.count,
|
|
1953
|
+
id: "md",
|
|
1954
|
+
children: r.parts.length
|
|
1955
|
+
}
|
|
1956
|
+
)
|
|
1864
1957
|
] }),
|
|
1865
1958
|
/* @__PURE__ */ t.jsxs("div", { className: k.rightButtons, children: [
|
|
1866
1959
|
a && /* @__PURE__ */ t.jsx(
|
|
1867
1960
|
"button",
|
|
1868
1961
|
{
|
|
1869
|
-
className:
|
|
1962
|
+
className: H(k.clear, {
|
|
1870
1963
|
[k.activeClear]: a
|
|
1871
1964
|
}),
|
|
1872
1965
|
disabled: !a,
|
|
1873
|
-
onClick:
|
|
1966
|
+
onClick: o,
|
|
1967
|
+
id: "md",
|
|
1874
1968
|
children: "Clear all"
|
|
1875
1969
|
}
|
|
1876
1970
|
),
|
|
1877
1971
|
/* @__PURE__ */ t.jsx(
|
|
1878
|
-
|
|
1972
|
+
I,
|
|
1879
1973
|
{
|
|
1880
1974
|
name: "X",
|
|
1881
1975
|
onClick: e,
|
|
@@ -1888,91 +1982,126 @@ const ns = (h) => {
|
|
|
1888
1982
|
] })
|
|
1889
1983
|
] }),
|
|
1890
1984
|
a ? /* @__PURE__ */ t.jsxs("div", { className: k.cart, children: [
|
|
1891
|
-
/* @__PURE__ */ t.jsx("div", { className: k.products, children: [...new Map(
|
|
1892
|
-
|
|
1893
|
-
|
|
1894
|
-
|
|
1895
|
-
|
|
1896
|
-
|
|
1897
|
-
|
|
1898
|
-
|
|
1899
|
-
|
|
1900
|
-
|
|
1901
|
-
|
|
1902
|
-
|
|
1903
|
-
|
|
1904
|
-
|
|
1905
|
-
|
|
1906
|
-
|
|
1907
|
-
|
|
1908
|
-
{
|
|
1909
|
-
|
|
1910
|
-
|
|
1911
|
-
|
|
1912
|
-
|
|
1913
|
-
|
|
1914
|
-
|
|
1915
|
-
/* @__PURE__ */ t.
|
|
1916
|
-
|
|
1917
|
-
|
|
1918
|
-
|
|
1919
|
-
|
|
1920
|
-
|
|
1921
|
-
|
|
1922
|
-
|
|
1985
|
+
/* @__PURE__ */ t.jsx("div", { className: k.products, children: [...new Map(n.map((i) => [i.id, i])).values()].map((i) => {
|
|
1986
|
+
var _;
|
|
1987
|
+
return /* @__PURE__ */ t.jsxs(
|
|
1988
|
+
"div",
|
|
1989
|
+
{
|
|
1990
|
+
className: k.product,
|
|
1991
|
+
children: [
|
|
1992
|
+
/* @__PURE__ */ t.jsxs("div", { className: k.productInfo, children: [
|
|
1993
|
+
i.images.length > 0 ? /* @__PURE__ */ t.jsx(
|
|
1994
|
+
"img",
|
|
1995
|
+
{
|
|
1996
|
+
src: `https://imagedelivery.net/${i.images[0].cfId}/w=500`,
|
|
1997
|
+
alt: "image",
|
|
1998
|
+
width: "100%",
|
|
1999
|
+
height: "100%",
|
|
2000
|
+
className: k.image
|
|
2001
|
+
}
|
|
2002
|
+
) : /* @__PURE__ */ t.jsx("div", { className: k.image, children: /* @__PURE__ */ t.jsx(
|
|
2003
|
+
I,
|
|
2004
|
+
{
|
|
2005
|
+
name: "Image",
|
|
2006
|
+
fill: "var(--text-secondary)"
|
|
2007
|
+
}
|
|
2008
|
+
) }),
|
|
2009
|
+
/* @__PURE__ */ t.jsxs("div", { className: k.content, children: [
|
|
2010
|
+
/* @__PURE__ */ t.jsx("div", { className: k.name, children: it(i.name) }),
|
|
2011
|
+
/* @__PURE__ */ t.jsx("div", { className: k.price, children: Q({
|
|
2012
|
+
amount: i.variants.find(
|
|
2013
|
+
(S) => S.id === i.activeVariantId
|
|
2014
|
+
).price.amount * ((i == null ? void 0 : i.quantity) || 1),
|
|
2015
|
+
currency: i.variants.find(
|
|
2016
|
+
(S) => S.id === i.activeVariantId
|
|
2017
|
+
).price.currency
|
|
2018
|
+
}) })
|
|
2019
|
+
] })
|
|
2020
|
+
] }),
|
|
2021
|
+
/* @__PURE__ */ t.jsxs("div", { className: k.productButtons, children: [
|
|
2022
|
+
/* @__PURE__ */ t.jsx(
|
|
2023
|
+
R,
|
|
2024
|
+
{
|
|
2025
|
+
type: "Secondary",
|
|
2026
|
+
onClick: () => {
|
|
2027
|
+
i.quantity !== 1 && d(i);
|
|
2028
|
+
},
|
|
2029
|
+
className: k.productButton,
|
|
2030
|
+
disabled: i.quantity === 1,
|
|
2031
|
+
children: /* @__PURE__ */ t.jsx(
|
|
2032
|
+
I,
|
|
2033
|
+
{
|
|
2034
|
+
name: "Minus",
|
|
2035
|
+
fill: "#757575",
|
|
2036
|
+
width: 20,
|
|
2037
|
+
height: 20
|
|
2038
|
+
}
|
|
2039
|
+
)
|
|
2040
|
+
}
|
|
2041
|
+
),
|
|
2042
|
+
/* @__PURE__ */ t.jsx(
|
|
2043
|
+
"input",
|
|
2044
|
+
{
|
|
2045
|
+
className: k.productCount,
|
|
2046
|
+
type: "number",
|
|
2047
|
+
value: ((_ = i.quantity) == null ? void 0 : _.toString()) || "",
|
|
2048
|
+
onChange: (S) => {
|
|
2049
|
+
const L = Math.min(
|
|
2050
|
+
Number(S.target.value),
|
|
2051
|
+
i.variants.find((E) => E.id === i.activeVariantId).quantity.available || 1 / 0
|
|
2052
|
+
);
|
|
2053
|
+
L < 1 || v({
|
|
2054
|
+
productId: i.id,
|
|
2055
|
+
productVariantId: i.activeVariantId,
|
|
2056
|
+
quantity: L,
|
|
2057
|
+
chargeType: i.chargeType
|
|
2058
|
+
});
|
|
2059
|
+
},
|
|
2060
|
+
min: 1,
|
|
2061
|
+
max: i.variants.find((S) => S.id === i.activeVariantId).quantity.available || 1 / 0
|
|
2062
|
+
}
|
|
2063
|
+
),
|
|
2064
|
+
/* @__PURE__ */ t.jsx(
|
|
2065
|
+
R,
|
|
2066
|
+
{
|
|
2067
|
+
type: "Secondary",
|
|
2068
|
+
onClick: () => m(i),
|
|
2069
|
+
className: k.productButton,
|
|
2070
|
+
disabled: i.quantity === i.variants.find((S) => S.id === i.activeVariantId).quantity.available,
|
|
2071
|
+
children: /* @__PURE__ */ t.jsx(
|
|
2072
|
+
I,
|
|
2073
|
+
{
|
|
2074
|
+
name: "Plus",
|
|
2075
|
+
fill: "#757575",
|
|
2076
|
+
width: 20,
|
|
2077
|
+
height: 20
|
|
2078
|
+
}
|
|
2079
|
+
)
|
|
2080
|
+
}
|
|
2081
|
+
),
|
|
2082
|
+
/* @__PURE__ */ t.jsx("div", { className: k.delete, children: /* @__PURE__ */ t.jsx(
|
|
2083
|
+
I,
|
|
2084
|
+
{
|
|
2085
|
+
name: "Trash",
|
|
2086
|
+
fill: "var(--text-action)",
|
|
2087
|
+
width: 20,
|
|
2088
|
+
height: 20,
|
|
2089
|
+
onClick: () => l(i),
|
|
2090
|
+
hoverable: !0
|
|
2091
|
+
}
|
|
2092
|
+
) })
|
|
1923
2093
|
] })
|
|
1924
|
-
]
|
|
1925
|
-
|
|
1926
|
-
|
|
1927
|
-
|
|
1928
|
-
|
|
1929
|
-
type: "Secondary",
|
|
1930
|
-
onClick: () => {
|
|
1931
|
-
n.quantity !== 1 && m(n);
|
|
1932
|
-
},
|
|
1933
|
-
className: k.productButton,
|
|
1934
|
-
disabled: n.quantity === 1,
|
|
1935
|
-
children: /* @__PURE__ */ t.jsx(
|
|
1936
|
-
b,
|
|
1937
|
-
{
|
|
1938
|
-
name: "Minus",
|
|
1939
|
-
fill: "#757575",
|
|
1940
|
-
width: 20,
|
|
1941
|
-
height: 20
|
|
1942
|
-
}
|
|
1943
|
-
)
|
|
1944
|
-
}
|
|
1945
|
-
),
|
|
1946
|
-
/* @__PURE__ */ t.jsx("div", { className: k.productCount, children: n.quantity }),
|
|
1947
|
-
/* @__PURE__ */ t.jsx(
|
|
1948
|
-
E,
|
|
1949
|
-
{
|
|
1950
|
-
type: "Secondary",
|
|
1951
|
-
onClick: () => _(n),
|
|
1952
|
-
className: k.productButton,
|
|
1953
|
-
disabled: n.quantity === n.variants.find((o) => o.id === n.activeVariantId).quantity.available,
|
|
1954
|
-
children: /* @__PURE__ */ t.jsx(
|
|
1955
|
-
b,
|
|
1956
|
-
{
|
|
1957
|
-
name: "Plus",
|
|
1958
|
-
fill: "#757575",
|
|
1959
|
-
width: 20,
|
|
1960
|
-
height: 20
|
|
1961
|
-
}
|
|
1962
|
-
)
|
|
1963
|
-
}
|
|
1964
|
-
)
|
|
1965
|
-
] })
|
|
1966
|
-
]
|
|
1967
|
-
},
|
|
1968
|
-
n.id
|
|
1969
|
-
)) }),
|
|
2094
|
+
]
|
|
2095
|
+
},
|
|
2096
|
+
i.id
|
|
2097
|
+
);
|
|
2098
|
+
}) }),
|
|
1970
2099
|
/* @__PURE__ */ t.jsxs("div", { className: k.bottom, children: [
|
|
1971
2100
|
/* @__PURE__ */ t.jsxs("div", { className: k.subtotal, children: [
|
|
1972
2101
|
/* @__PURE__ */ t.jsxs("div", { className: k.block, children: [
|
|
1973
2102
|
/* @__PURE__ */ t.jsx("span", { children: "Subtotal" }),
|
|
1974
2103
|
/* @__PURE__ */ t.jsx(
|
|
1975
|
-
|
|
2104
|
+
I,
|
|
1976
2105
|
{
|
|
1977
2106
|
name: "Info",
|
|
1978
2107
|
width: 20,
|
|
@@ -1982,26 +2111,26 @@ const ns = (h) => {
|
|
|
1982
2111
|
)
|
|
1983
2112
|
] }),
|
|
1984
2113
|
/* @__PURE__ */ t.jsx("div", { className: k.total, children: Q({
|
|
1985
|
-
amount:
|
|
1986
|
-
currency: r.parts.length > 0 && ((
|
|
2114
|
+
amount: x().total,
|
|
2115
|
+
currency: r.parts.length > 0 && ((c = (g = n.find((i) => i.id === r.parts[0].productId)) == null ? void 0 : g.variants.find((i) => i.id === r.parts[0].productVariantId)) == null ? void 0 : c.price.currency) || "USD"
|
|
1987
2116
|
}) })
|
|
1988
2117
|
] }),
|
|
1989
|
-
/* @__PURE__ */ t.jsx(
|
|
2118
|
+
/* @__PURE__ */ t.jsx(R, { onClick: () => j("/checkout", !1), children: "Checkout" })
|
|
1990
2119
|
] })
|
|
1991
|
-
] }) : /* @__PURE__ */ t.jsx(
|
|
2120
|
+
] }) : /* @__PURE__ */ t.jsx(Ls, {})
|
|
1992
2121
|
]
|
|
1993
2122
|
}
|
|
1994
2123
|
);
|
|
1995
|
-
},
|
|
2124
|
+
}, Ls = () => /* @__PURE__ */ t.jsxs("div", { className: k.empty, children: [
|
|
1996
2125
|
/* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
|
|
1997
|
-
|
|
2126
|
+
I,
|
|
1998
2127
|
{
|
|
1999
2128
|
name: "Handbag",
|
|
2000
2129
|
fill: "var(--text-secondary)"
|
|
2001
2130
|
}
|
|
2002
2131
|
) }),
|
|
2003
|
-
/* @__PURE__ */ t.jsx("span", { children: "Empty Cart" }),
|
|
2004
|
-
/* @__PURE__ */ t.jsxs("span", { children: [
|
|
2132
|
+
/* @__PURE__ */ t.jsx("span", { id: "h5", children: "Empty Cart" }),
|
|
2133
|
+
/* @__PURE__ */ t.jsxs("span", { id: "md", children: [
|
|
2005
2134
|
"You don’t have any items in your shopping cart yet,",
|
|
2006
2135
|
" ",
|
|
2007
2136
|
/* @__PURE__ */ t.jsx(
|
|
@@ -2009,38 +2138,39 @@ const ns = (h) => {
|
|
|
2009
2138
|
{
|
|
2010
2139
|
href: "/products",
|
|
2011
2140
|
className: k.link,
|
|
2141
|
+
id: "md",
|
|
2012
2142
|
children: "view products"
|
|
2013
2143
|
}
|
|
2014
2144
|
)
|
|
2015
2145
|
] })
|
|
2016
|
-
] }),
|
|
2017
|
-
const { token: a } =
|
|
2018
|
-
|
|
2146
|
+
] }), $t = ({ signUp: h, close: n }) => {
|
|
2147
|
+
const { token: a } = Ut(), s = St(), [e, r] = y.useState("test-email@gmail.com");
|
|
2148
|
+
y.useEffect(() => {
|
|
2019
2149
|
a && (async () => {
|
|
2020
2150
|
if (!a) return;
|
|
2021
|
-
const
|
|
2022
|
-
r(
|
|
2151
|
+
const v = zt(a);
|
|
2152
|
+
r(v.email);
|
|
2023
2153
|
})();
|
|
2024
2154
|
}, [a]);
|
|
2025
|
-
function
|
|
2026
|
-
window.location.pathname.includes("/admin/builder") || s(
|
|
2155
|
+
function o(x) {
|
|
2156
|
+
window.location.pathname.includes("/admin/builder") || s(x);
|
|
2027
2157
|
}
|
|
2028
2158
|
return a ? /* @__PURE__ */ t.jsx(
|
|
2029
|
-
|
|
2159
|
+
R,
|
|
2030
2160
|
{
|
|
2031
2161
|
type: "Secondary",
|
|
2032
2162
|
className: k.userInfo,
|
|
2033
2163
|
onClick: () => {
|
|
2034
|
-
|
|
2164
|
+
o("/customer-dash"), n == null || n();
|
|
2035
2165
|
},
|
|
2036
2166
|
children: /* @__PURE__ */ t.jsx("div", { children: e || "test-email@gmail.com" })
|
|
2037
2167
|
}
|
|
2038
2168
|
) : /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
2039
2169
|
/* @__PURE__ */ t.jsx(
|
|
2040
|
-
|
|
2170
|
+
R,
|
|
2041
2171
|
{
|
|
2042
2172
|
onClick: () => {
|
|
2043
|
-
|
|
2173
|
+
o("/customer-dash"), n == null || n();
|
|
2044
2174
|
},
|
|
2045
2175
|
type: "Secondary",
|
|
2046
2176
|
style: {
|
|
@@ -2050,10 +2180,10 @@ const ns = (h) => {
|
|
|
2050
2180
|
}
|
|
2051
2181
|
),
|
|
2052
2182
|
h && /* @__PURE__ */ t.jsx(
|
|
2053
|
-
|
|
2183
|
+
R,
|
|
2054
2184
|
{
|
|
2055
2185
|
onClick: () => {
|
|
2056
|
-
|
|
2186
|
+
o("/customer-dash"), n == null || n();
|
|
2057
2187
|
},
|
|
2058
2188
|
type: "Primary",
|
|
2059
2189
|
style: {
|
|
@@ -2064,35 +2194,35 @@ const ns = (h) => {
|
|
|
2064
2194
|
}
|
|
2065
2195
|
)
|
|
2066
2196
|
] });
|
|
2067
|
-
},
|
|
2197
|
+
}, Us = ({
|
|
2068
2198
|
logo: h,
|
|
2069
|
-
setIsOpen:
|
|
2199
|
+
setIsOpen: n,
|
|
2070
2200
|
signUp: a,
|
|
2071
2201
|
pages: s
|
|
2072
2202
|
}) => {
|
|
2073
|
-
const { setIsOpen: e } =
|
|
2203
|
+
const { setIsOpen: e } = rt(), r = () => {
|
|
2074
2204
|
e(!1), setTimeout(() => {
|
|
2075
|
-
|
|
2205
|
+
n(!1), e(!0);
|
|
2076
2206
|
}, 300);
|
|
2077
2207
|
};
|
|
2078
2208
|
return /* @__PURE__ */ t.jsxs(
|
|
2079
2209
|
"div",
|
|
2080
2210
|
{
|
|
2081
2211
|
className: k.pagesMobileModal,
|
|
2082
|
-
onClick: (
|
|
2212
|
+
onClick: (o) => o.stopPropagation(),
|
|
2083
2213
|
children: [
|
|
2084
2214
|
/* @__PURE__ */ t.jsxs("div", { className: k.pagesMobileModalHeader, children: [
|
|
2085
2215
|
/* @__PURE__ */ t.jsx("div", { children: h }),
|
|
2086
2216
|
/* @__PURE__ */ t.jsx(
|
|
2087
|
-
|
|
2217
|
+
R,
|
|
2088
2218
|
{
|
|
2089
2219
|
type: "Secondary",
|
|
2090
2220
|
onClick: r,
|
|
2091
|
-
children: /* @__PURE__ */ t.jsx(
|
|
2221
|
+
children: /* @__PURE__ */ t.jsx(I, { name: "X" })
|
|
2092
2222
|
}
|
|
2093
2223
|
)
|
|
2094
2224
|
] }),
|
|
2095
|
-
/* @__PURE__ */ t.jsx("div", { className: k.pagesMobileModalContent, children: s.length > 0 && s.map((
|
|
2225
|
+
/* @__PURE__ */ t.jsx("div", { className: k.pagesMobileModalContent, children: s.length > 0 && s.map((o) => /* @__PURE__ */ t.jsx(
|
|
2096
2226
|
"div",
|
|
2097
2227
|
{
|
|
2098
2228
|
className: k.pageLink,
|
|
@@ -2100,15 +2230,15 @@ const ns = (h) => {
|
|
|
2100
2230
|
children: /* @__PURE__ */ t.jsx(
|
|
2101
2231
|
Tt,
|
|
2102
2232
|
{
|
|
2103
|
-
path:
|
|
2104
|
-
children:
|
|
2233
|
+
path: o.path,
|
|
2234
|
+
children: o.name["en-US"]
|
|
2105
2235
|
},
|
|
2106
|
-
|
|
2236
|
+
o.id
|
|
2107
2237
|
)
|
|
2108
2238
|
}
|
|
2109
2239
|
)) }),
|
|
2110
2240
|
/* @__PURE__ */ t.jsx("div", { className: k.pagesMobileModalFooter, children: /* @__PURE__ */ t.jsx(
|
|
2111
|
-
|
|
2241
|
+
$t,
|
|
2112
2242
|
{
|
|
2113
2243
|
signUp: a,
|
|
2114
2244
|
close: r
|
|
@@ -2117,59 +2247,59 @@ const ns = (h) => {
|
|
|
2117
2247
|
]
|
|
2118
2248
|
}
|
|
2119
2249
|
);
|
|
2120
|
-
},
|
|
2121
|
-
const [s, e] =
|
|
2250
|
+
}, Vn = ({ logo: h, signUp: n, pages: a }) => {
|
|
2251
|
+
const [s, e] = y.useState(!1);
|
|
2122
2252
|
return /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
2123
|
-
/* @__PURE__ */ t.jsx(
|
|
2253
|
+
/* @__PURE__ */ t.jsx(zs, { setIsOpenModal: e }),
|
|
2124
2254
|
s && /* @__PURE__ */ t.jsx(
|
|
2125
2255
|
ut,
|
|
2126
2256
|
{
|
|
2127
2257
|
close: () => e(!1),
|
|
2128
2258
|
hasPadding: !1,
|
|
2129
2259
|
children: /* @__PURE__ */ t.jsx(
|
|
2130
|
-
|
|
2260
|
+
Us,
|
|
2131
2261
|
{
|
|
2132
2262
|
logo: h,
|
|
2133
2263
|
setIsOpen: e,
|
|
2134
|
-
signUp:
|
|
2264
|
+
signUp: n,
|
|
2135
2265
|
pages: a
|
|
2136
2266
|
}
|
|
2137
2267
|
)
|
|
2138
2268
|
}
|
|
2139
2269
|
)
|
|
2140
2270
|
] });
|
|
2141
|
-
},
|
|
2142
|
-
const { setIsOpenModal:
|
|
2271
|
+
}, zs = (h) => {
|
|
2272
|
+
const { setIsOpenModal: n } = h;
|
|
2143
2273
|
return /* @__PURE__ */ t.jsx(
|
|
2144
|
-
|
|
2274
|
+
R,
|
|
2145
2275
|
{
|
|
2146
2276
|
type: "Secondary",
|
|
2147
2277
|
style: {
|
|
2148
2278
|
padding: 10
|
|
2149
2279
|
},
|
|
2150
2280
|
onClick: (a) => {
|
|
2151
|
-
a.stopPropagation(), window.location.pathname.includes("/admin/builder") ||
|
|
2281
|
+
a.stopPropagation(), window.location.pathname.includes("/admin/builder") || n(!0);
|
|
2152
2282
|
},
|
|
2153
|
-
children: /* @__PURE__ */ t.jsx(
|
|
2283
|
+
children: /* @__PURE__ */ t.jsx(I, { name: "List" })
|
|
2154
2284
|
}
|
|
2155
2285
|
);
|
|
2156
|
-
},
|
|
2157
|
-
share:
|
|
2158
|
-
modal:
|
|
2286
|
+
}, Fs = "_share_onabp_1", Hs = "_modal_onabp_8", Vs = "_header_onabp_20", Ys = "_title_onabp_46", Gs = "_copyWrapper_onabp_53", Ws = "_copyText_onabp_62", Xs = "_copyTextMobile_onabp_75", Qs = "_copyTextMiniMobile_onabp_94", nt = {
|
|
2287
|
+
share: Fs,
|
|
2288
|
+
modal: Hs,
|
|
2159
2289
|
header: Vs,
|
|
2160
2290
|
title: Ys,
|
|
2161
2291
|
copyWrapper: Gs,
|
|
2162
2292
|
copyText: Ws,
|
|
2163
2293
|
copyTextMobile: Xs,
|
|
2164
2294
|
copyTextMiniMobile: Qs
|
|
2165
|
-
},
|
|
2166
|
-
const { isOpenModal:
|
|
2295
|
+
}, Yn = ({ title: h = "Copy Product Link" }) => {
|
|
2296
|
+
const { isOpenModal: n, setIsOpenModal: a } = Mt();
|
|
2167
2297
|
function s() {
|
|
2168
2298
|
a(!0);
|
|
2169
2299
|
}
|
|
2170
2300
|
return /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
2171
2301
|
/* @__PURE__ */ t.jsx(
|
|
2172
|
-
|
|
2302
|
+
R,
|
|
2173
2303
|
{
|
|
2174
2304
|
className: nt.share,
|
|
2175
2305
|
onClick: (e) => {
|
|
@@ -2177,7 +2307,7 @@ const ns = (h) => {
|
|
|
2177
2307
|
},
|
|
2178
2308
|
type: "Secondary",
|
|
2179
2309
|
children: /* @__PURE__ */ t.jsx(
|
|
2180
|
-
|
|
2310
|
+
I,
|
|
2181
2311
|
{
|
|
2182
2312
|
name: "Share",
|
|
2183
2313
|
fill: "#757575",
|
|
@@ -2186,11 +2316,11 @@ const ns = (h) => {
|
|
|
2186
2316
|
)
|
|
2187
2317
|
}
|
|
2188
2318
|
),
|
|
2189
|
-
|
|
2319
|
+
n && /* @__PURE__ */ t.jsx(ut, { close: a, children: /* @__PURE__ */ t.jsx(Js, { title: h }) })
|
|
2190
2320
|
] });
|
|
2191
2321
|
}, Js = ({ title: h = "Copy Product Link" }) => {
|
|
2192
|
-
const { setIsOpenModal:
|
|
2193
|
-
function
|
|
2322
|
+
const { setIsOpenModal: n } = Mt(), { notifications: a, setNotifications: s } = Ct(), { setIsOpen: e } = rt(), r = window.location.href;
|
|
2323
|
+
function o() {
|
|
2194
2324
|
navigator.clipboard.writeText(r), s([
|
|
2195
2325
|
...a,
|
|
2196
2326
|
{
|
|
@@ -2200,134 +2330,163 @@ const ns = (h) => {
|
|
|
2200
2330
|
}
|
|
2201
2331
|
]);
|
|
2202
2332
|
}
|
|
2203
|
-
function
|
|
2333
|
+
function x() {
|
|
2204
2334
|
e(!1), setTimeout(() => {
|
|
2205
|
-
|
|
2335
|
+
n(!1), e(!0);
|
|
2206
2336
|
}, 300);
|
|
2207
2337
|
}
|
|
2208
|
-
function
|
|
2209
|
-
return
|
|
2338
|
+
function v(b, M) {
|
|
2339
|
+
return b.length > M ? b.slice(0, M) + "..." : b;
|
|
2210
2340
|
}
|
|
2211
2341
|
return /* @__PURE__ */ t.jsxs(
|
|
2212
2342
|
"div",
|
|
2213
2343
|
{
|
|
2214
2344
|
className: nt.modal,
|
|
2215
|
-
onClick: (
|
|
2345
|
+
onClick: (b) => b.stopPropagation(),
|
|
2216
2346
|
children: [
|
|
2217
2347
|
/* @__PURE__ */ t.jsxs("div", { className: nt.header, children: [
|
|
2218
|
-
/* @__PURE__ */ t.jsx("div", { className: nt.title, children: h }),
|
|
2219
2348
|
/* @__PURE__ */ t.jsx(
|
|
2220
|
-
|
|
2349
|
+
"div",
|
|
2350
|
+
{
|
|
2351
|
+
className: nt.title,
|
|
2352
|
+
id: "h4",
|
|
2353
|
+
children: h
|
|
2354
|
+
}
|
|
2355
|
+
),
|
|
2356
|
+
/* @__PURE__ */ t.jsx(
|
|
2357
|
+
I,
|
|
2221
2358
|
{
|
|
2222
2359
|
name: "X",
|
|
2223
2360
|
fill: "#757575",
|
|
2224
|
-
onClick:
|
|
2361
|
+
onClick: x,
|
|
2225
2362
|
hoverable: !0
|
|
2226
2363
|
}
|
|
2227
2364
|
)
|
|
2228
2365
|
] }),
|
|
2229
2366
|
/* @__PURE__ */ t.jsxs("div", { className: nt.copyWrapper, children: [
|
|
2230
2367
|
/* @__PURE__ */ t.jsxs(
|
|
2231
|
-
|
|
2368
|
+
R,
|
|
2232
2369
|
{
|
|
2233
2370
|
type: "Secondary",
|
|
2234
|
-
onClick:
|
|
2371
|
+
onClick: o,
|
|
2235
2372
|
style: {
|
|
2236
2373
|
flex: 1
|
|
2237
2374
|
},
|
|
2238
2375
|
children: [
|
|
2239
|
-
/* @__PURE__ */ t.jsx(
|
|
2240
|
-
|
|
2241
|
-
|
|
2376
|
+
/* @__PURE__ */ t.jsx(
|
|
2377
|
+
"div",
|
|
2378
|
+
{
|
|
2379
|
+
className: nt.copyText,
|
|
2380
|
+
id: "md",
|
|
2381
|
+
children: v(r, 100)
|
|
2382
|
+
}
|
|
2383
|
+
),
|
|
2384
|
+
/* @__PURE__ */ t.jsx(
|
|
2385
|
+
"div",
|
|
2386
|
+
{
|
|
2387
|
+
className: nt.copyTextMobile,
|
|
2388
|
+
id: "md",
|
|
2389
|
+
children: v(r, 40)
|
|
2390
|
+
}
|
|
2391
|
+
),
|
|
2392
|
+
/* @__PURE__ */ t.jsx(
|
|
2393
|
+
"div",
|
|
2394
|
+
{
|
|
2395
|
+
className: nt.copyTextMiniMobile,
|
|
2396
|
+
id: "md",
|
|
2397
|
+
children: v(r, 20)
|
|
2398
|
+
}
|
|
2399
|
+
)
|
|
2242
2400
|
]
|
|
2243
2401
|
}
|
|
2244
2402
|
),
|
|
2245
2403
|
/* @__PURE__ */ t.jsx(
|
|
2246
|
-
|
|
2404
|
+
R,
|
|
2247
2405
|
{
|
|
2248
2406
|
type: "Secondary",
|
|
2249
|
-
onClick:
|
|
2407
|
+
onClick: o,
|
|
2250
2408
|
children: a.find(
|
|
2251
|
-
(
|
|
2252
|
-
) ? /* @__PURE__ */ t.jsx(
|
|
2409
|
+
(b) => b.message === "Link copied to clipboard"
|
|
2410
|
+
) ? /* @__PURE__ */ t.jsx(I, { name: "Check" }) : /* @__PURE__ */ t.jsx(I, { name: "Copy" })
|
|
2253
2411
|
}
|
|
2254
2412
|
)
|
|
2255
2413
|
] })
|
|
2256
2414
|
]
|
|
2257
2415
|
}
|
|
2258
2416
|
);
|
|
2259
|
-
}, Ks = "
|
|
2417
|
+
}, Ks = "_accordion_mdmvg_1", Zs = "_header_mdmvg_12", tn = "_icon_mdmvg_21", en = "_open_mdmvg_24", sn = "_content_mdmvg_28", nn = "_contentOpen_mdmvg_36", ot = {
|
|
2260
2418
|
accordion: Ks,
|
|
2261
2419
|
header: Zs,
|
|
2262
2420
|
icon: tn,
|
|
2263
2421
|
open: en,
|
|
2264
|
-
content: sn
|
|
2265
|
-
|
|
2266
|
-
|
|
2422
|
+
content: sn,
|
|
2423
|
+
contentOpen: nn
|
|
2424
|
+
}, Gn = ({ title: h, content: n, defaultOpen: a = !1 }) => {
|
|
2425
|
+
const [s, e] = y.useState(a), [r, o] = y.useState(0), x = y.useRef(null), v = () => {
|
|
2267
2426
|
e(!s);
|
|
2268
2427
|
};
|
|
2269
|
-
return
|
|
2270
|
-
|
|
2271
|
-
}, [s]), /* @__PURE__ */ t.jsxs("div", { className:
|
|
2428
|
+
return y.useEffect(() => {
|
|
2429
|
+
x.current && o(s ? x.current.scrollHeight + 30 : 0);
|
|
2430
|
+
}, [s]), /* @__PURE__ */ t.jsxs("div", { className: ot.accordion, children: [
|
|
2272
2431
|
/* @__PURE__ */ t.jsxs(
|
|
2273
2432
|
"div",
|
|
2274
2433
|
{
|
|
2275
|
-
className:
|
|
2276
|
-
onClick:
|
|
2434
|
+
className: ot.header,
|
|
2435
|
+
onClick: v,
|
|
2277
2436
|
children: [
|
|
2278
2437
|
/* @__PURE__ */ t.jsx("h5", { id: "h5", children: h }),
|
|
2279
|
-
/* @__PURE__ */ t.jsx("div", { className:
|
|
2438
|
+
/* @__PURE__ */ t.jsx("div", { className: H(ot.icon, { [ot.open]: s }), children: /* @__PURE__ */ t.jsx(I, { name: "CaretDown" }) })
|
|
2280
2439
|
]
|
|
2281
2440
|
}
|
|
2282
2441
|
),
|
|
2283
2442
|
/* @__PURE__ */ t.jsx(
|
|
2284
2443
|
"div",
|
|
2285
2444
|
{
|
|
2286
|
-
ref:
|
|
2287
|
-
className:
|
|
2445
|
+
ref: x,
|
|
2446
|
+
className: H(ot.content, { [ot.contentOpen]: s }),
|
|
2288
2447
|
style: { height: `${r}px` },
|
|
2289
|
-
children: /* @__PURE__ */ t.jsx("p", { id: "
|
|
2448
|
+
children: /* @__PURE__ */ t.jsx("p", { id: "md", children: n })
|
|
2290
2449
|
}
|
|
2291
2450
|
)
|
|
2292
2451
|
] });
|
|
2293
|
-
},
|
|
2294
|
-
buttonsBlock:
|
|
2295
|
-
},
|
|
2296
|
-
var
|
|
2297
|
-
const { setIsOpen:
|
|
2298
|
-
if (!
|
|
2452
|
+
}, an = "_buttonsBlock_1b2rb_1", on = {
|
|
2453
|
+
buttonsBlock: an
|
|
2454
|
+
}, Wn = (h) => {
|
|
2455
|
+
var b, M;
|
|
2456
|
+
const { setIsOpen: n, setModalType: a, productId: s } = h, { cart: e } = ct(), { pageContext: r } = vt(), o = (b = r == null ? void 0 : r.listings) == null ? void 0 : b.find((j) => j.id === s);
|
|
2457
|
+
if (!o)
|
|
2299
2458
|
return null;
|
|
2300
|
-
const
|
|
2301
|
-
(
|
|
2459
|
+
const x = (M = r == null ? void 0 : r.products) == null ? void 0 : M.find(
|
|
2460
|
+
(j) => j.uniquePath === o.productData.uniquePath
|
|
2302
2461
|
);
|
|
2303
|
-
if (!
|
|
2462
|
+
if (!x)
|
|
2304
2463
|
return null;
|
|
2305
|
-
const
|
|
2464
|
+
const v = e.parts.find((j) => j.productId === x.id);
|
|
2306
2465
|
return /* @__PURE__ */ t.jsxs(
|
|
2307
2466
|
"div",
|
|
2308
2467
|
{
|
|
2309
|
-
className:
|
|
2310
|
-
onClick: (
|
|
2468
|
+
className: on.buttonsBlock,
|
|
2469
|
+
onClick: (j) => j.stopPropagation(),
|
|
2311
2470
|
children: [
|
|
2312
2471
|
/* @__PURE__ */ t.jsx(
|
|
2313
|
-
|
|
2472
|
+
R,
|
|
2314
2473
|
{
|
|
2315
2474
|
type: "Secondary",
|
|
2316
2475
|
style: {
|
|
2317
2476
|
width: "100%"
|
|
2318
2477
|
},
|
|
2319
2478
|
onClick: () => {
|
|
2320
|
-
a("Add To Cart"),
|
|
2479
|
+
a("Add To Cart"), n(!0);
|
|
2321
2480
|
},
|
|
2322
|
-
children:
|
|
2481
|
+
children: v ? "Add More" : "Add To Cart"
|
|
2323
2482
|
}
|
|
2324
2483
|
),
|
|
2325
2484
|
/* @__PURE__ */ t.jsx(
|
|
2326
|
-
|
|
2485
|
+
R,
|
|
2327
2486
|
{
|
|
2328
2487
|
type: "Primary",
|
|
2329
2488
|
onClick: () => {
|
|
2330
|
-
a("Buy Now"),
|
|
2489
|
+
a("Buy Now"), n(!0);
|
|
2331
2490
|
},
|
|
2332
2491
|
children: "Buy"
|
|
2333
2492
|
}
|
|
@@ -2335,13 +2494,13 @@ const ns = (h) => {
|
|
|
2335
2494
|
]
|
|
2336
2495
|
}
|
|
2337
2496
|
);
|
|
2338
|
-
},
|
|
2339
|
-
wrapper:
|
|
2340
|
-
logo:
|
|
2341
|
-
info:
|
|
2342
|
-
},
|
|
2343
|
-
const { general:
|
|
2344
|
-
if (!
|
|
2497
|
+
}, cn = "_wrapper_27wzz_1", rn = "_logo_27wzz_8", ln = "_info_27wzz_12", It = {
|
|
2498
|
+
wrapper: cn,
|
|
2499
|
+
logo: rn,
|
|
2500
|
+
info: ln
|
|
2501
|
+
}, Xn = ({ date: h }) => {
|
|
2502
|
+
const { general: n } = Ft();
|
|
2503
|
+
if (!n) return /* @__PURE__ */ t.jsx(t.Fragment, {});
|
|
2345
2504
|
function a(s) {
|
|
2346
2505
|
const e = new Date(s), r = {
|
|
2347
2506
|
month: "short",
|
|
@@ -2354,15 +2513,15 @@ const ns = (h) => {
|
|
|
2354
2513
|
return e.toLocaleDateString("en-US", r);
|
|
2355
2514
|
}
|
|
2356
2515
|
return /* @__PURE__ */ t.jsxs("div", { className: It.wrapper, children: [
|
|
2357
|
-
/* @__PURE__ */ t.jsx("div", { className: It.logo, children:
|
|
2516
|
+
/* @__PURE__ */ t.jsx("div", { className: It.logo, children: n.info.logo ? /* @__PURE__ */ t.jsx(
|
|
2358
2517
|
"img",
|
|
2359
2518
|
{
|
|
2360
|
-
src: `https://imagedelivery.net/${
|
|
2519
|
+
src: `https://imagedelivery.net/${n.info.logo.cfId}/w=500,h=500`,
|
|
2361
2520
|
alt: "image",
|
|
2362
2521
|
style: { objectFit: "contain", width: "48px", height: "48px" }
|
|
2363
2522
|
}
|
|
2364
2523
|
) : /* @__PURE__ */ t.jsx(
|
|
2365
|
-
|
|
2524
|
+
I,
|
|
2366
2525
|
{
|
|
2367
2526
|
name: "Image",
|
|
2368
2527
|
width: 48,
|
|
@@ -2370,37 +2529,37 @@ const ns = (h) => {
|
|
|
2370
2529
|
}
|
|
2371
2530
|
) }),
|
|
2372
2531
|
/* @__PURE__ */ t.jsxs("div", { className: It.info, children: [
|
|
2373
|
-
/* @__PURE__ */ t.jsx("h3", { id: "h4", children:
|
|
2532
|
+
/* @__PURE__ */ t.jsx("h3", { id: "h4", children: n.info.name }),
|
|
2374
2533
|
/* @__PURE__ */ t.jsx("p", { id: "p", children: a(h) })
|
|
2375
2534
|
] })
|
|
2376
2535
|
] });
|
|
2377
|
-
},
|
|
2378
|
-
variants:
|
|
2379
|
-
variant:
|
|
2380
|
-
stock:
|
|
2381
|
-
variantInfo:
|
|
2382
|
-
title:
|
|
2383
|
-
modal:
|
|
2384
|
-
header:
|
|
2385
|
-
productOptions:
|
|
2386
|
-
loading:
|
|
2387
|
-
},
|
|
2536
|
+
}, dn = "_variants_pwm2c_82", un = "_variant_pwm2c_82", hn = "_stock_pwm2c_100", pn = "_variantInfo_pwm2c_107", mn = "_title_pwm2c_201", gn = "_modal_pwm2c_207", fn = "_header_pwm2c_227", xn = "_productOptions_pwm2c_235", _n = "_loading_pwm2c_239", tt = {
|
|
2537
|
+
variants: dn,
|
|
2538
|
+
variant: un,
|
|
2539
|
+
stock: hn,
|
|
2540
|
+
variantInfo: pn,
|
|
2541
|
+
title: mn,
|
|
2542
|
+
modal: gn,
|
|
2543
|
+
header: fn,
|
|
2544
|
+
productOptions: xn,
|
|
2545
|
+
loading: _n
|
|
2546
|
+
}, Qn = (h) => {
|
|
2388
2547
|
var m;
|
|
2389
|
-
const { pageContext:
|
|
2548
|
+
const { pageContext: n } = vt(), a = (m = n == null ? void 0 : n.listings) == null ? void 0 : m.find((d) => d.id === h.productId), [s, e] = y.useState(!0), [r, o] = y.useState(null), x = (r == null ? void 0 : r.variants[0]) || null, [v, b] = y.useState(
|
|
2390
2549
|
"ONE_TIME"
|
|
2391
|
-
), { addProducts:
|
|
2392
|
-
return
|
|
2550
|
+
), { addProducts: M } = ct(), { setIsOpen: j } = rt();
|
|
2551
|
+
return y.useEffect(() => {
|
|
2393
2552
|
(async () => {
|
|
2394
2553
|
e(!0);
|
|
2395
|
-
const l = await
|
|
2554
|
+
const l = await Ht(
|
|
2396
2555
|
encodeURIComponent(
|
|
2397
2556
|
`/product/${a.productData.uniquePath}`
|
|
2398
2557
|
)
|
|
2399
2558
|
);
|
|
2400
|
-
|
|
2559
|
+
M(l == null ? void 0 : l.data.products), o(l == null ? void 0 : l.data.products[0]), e(!1);
|
|
2401
2560
|
})();
|
|
2402
|
-
}, []),
|
|
2403
|
-
|
|
2561
|
+
}, []), y.useEffect(() => {
|
|
2562
|
+
j(!0);
|
|
2404
2563
|
}, []), /* @__PURE__ */ t.jsx(ut, { close: h.setIsOpen, children: /* @__PURE__ */ t.jsxs(
|
|
2405
2564
|
"div",
|
|
2406
2565
|
{
|
|
@@ -2408,13 +2567,13 @@ const ns = (h) => {
|
|
|
2408
2567
|
onClick: (d) => d.stopPropagation(),
|
|
2409
2568
|
children: [
|
|
2410
2569
|
s && /* @__PURE__ */ t.jsx("div", { className: tt.loading, children: /* @__PURE__ */ t.jsx(Bt, {}) }),
|
|
2411
|
-
h.type === "Add To Cart" && r &&
|
|
2412
|
-
|
|
2570
|
+
h.type === "Add To Cart" && r && x && !s && /* @__PURE__ */ t.jsx(
|
|
2571
|
+
yn,
|
|
2413
2572
|
{
|
|
2414
2573
|
variants: r.variants,
|
|
2415
|
-
activeVariant:
|
|
2416
|
-
activeChargeType:
|
|
2417
|
-
setActiveChargeType:
|
|
2574
|
+
activeVariant: x,
|
|
2575
|
+
activeChargeType: v,
|
|
2576
|
+
setActiveChargeType: b,
|
|
2418
2577
|
productId: r.id,
|
|
2419
2578
|
setIsOpen: h.setIsOpen
|
|
2420
2579
|
}
|
|
@@ -2429,52 +2588,52 @@ const ns = (h) => {
|
|
|
2429
2588
|
]
|
|
2430
2589
|
}
|
|
2431
2590
|
) });
|
|
2432
|
-
},
|
|
2433
|
-
const { variants:
|
|
2591
|
+
}, yn = (h) => {
|
|
2592
|
+
const { variants: n, activeChargeType: a, productId: s, setIsOpen: e } = h, { cart: r, addProductToCart: o, addProducts: x, updateQuantityOfProduct: v } = ct(), { notifications: b, setNotifications: M } = Ct(), { pageContext: j } = vt(), { setIsOpen: m } = rt(), d = () => {
|
|
2434
2593
|
m(!1), setTimeout(() => {
|
|
2435
2594
|
e(!1);
|
|
2436
2595
|
}, 300);
|
|
2437
2596
|
};
|
|
2438
|
-
async function l(
|
|
2439
|
-
const
|
|
2440
|
-
(
|
|
2597
|
+
async function l(g) {
|
|
2598
|
+
const c = n.find((S) => S.id === g), i = r.parts.find(
|
|
2599
|
+
(S) => S.productId === h.productId && S.productVariantId === g
|
|
2441
2600
|
);
|
|
2442
|
-
if ((
|
|
2443
|
-
|
|
2444
|
-
...
|
|
2601
|
+
if ((c == null ? void 0 : c.quantity.available) && (c == null ? void 0 : c.quantity.restrictions) && ((i == null ? void 0 : i.quantity) || 0) + 1 > (c == null ? void 0 : c.quantity.restrictions.max) || (c == null ? void 0 : c.quantity.available) === 0 || (c == null ? void 0 : c.quantity.available) && ((i == null ? void 0 : i.quantity) || 0) + 1 > (c == null ? void 0 : c.quantity.available)) {
|
|
2602
|
+
M([
|
|
2603
|
+
...b,
|
|
2445
2604
|
{ id: J(), message: "Product is out of stock", status: "error" }
|
|
2446
2605
|
]);
|
|
2447
2606
|
return;
|
|
2448
2607
|
}
|
|
2449
|
-
if (
|
|
2450
|
-
|
|
2608
|
+
if (i)
|
|
2609
|
+
v({
|
|
2451
2610
|
productId: s,
|
|
2452
|
-
productVariantId:
|
|
2453
|
-
quantity:
|
|
2611
|
+
productVariantId: g,
|
|
2612
|
+
quantity: i.quantity + 1,
|
|
2454
2613
|
chargeType: a
|
|
2455
2614
|
});
|
|
2456
2615
|
else {
|
|
2457
|
-
|
|
2616
|
+
j != null && j.products && x(j.products);
|
|
2458
2617
|
try {
|
|
2459
|
-
|
|
2618
|
+
o({
|
|
2460
2619
|
productId: s,
|
|
2461
|
-
productVariantId:
|
|
2620
|
+
productVariantId: g,
|
|
2462
2621
|
quantity: 1,
|
|
2463
2622
|
chargeType: a
|
|
2464
|
-
}),
|
|
2465
|
-
...
|
|
2623
|
+
}), M([
|
|
2624
|
+
...b,
|
|
2466
2625
|
{
|
|
2467
2626
|
id: J(),
|
|
2468
2627
|
message: "Product added to cart",
|
|
2469
2628
|
status: "success"
|
|
2470
2629
|
}
|
|
2471
2630
|
]);
|
|
2472
|
-
} catch (
|
|
2473
|
-
|
|
2474
|
-
...
|
|
2631
|
+
} catch (S) {
|
|
2632
|
+
M([
|
|
2633
|
+
...b,
|
|
2475
2634
|
{
|
|
2476
2635
|
id: J(),
|
|
2477
|
-
message: `Product failed to add to cart: ${
|
|
2636
|
+
message: `Product failed to add to cart: ${S}`,
|
|
2478
2637
|
status: "error"
|
|
2479
2638
|
}
|
|
2480
2639
|
]);
|
|
@@ -2485,7 +2644,7 @@ const ns = (h) => {
|
|
|
2485
2644
|
/* @__PURE__ */ t.jsxs("div", { className: tt.header, children: [
|
|
2486
2645
|
/* @__PURE__ */ t.jsx("div", { id: "h3", children: "Choose a Variant" }),
|
|
2487
2646
|
/* @__PURE__ */ t.jsx(
|
|
2488
|
-
|
|
2647
|
+
I,
|
|
2489
2648
|
{
|
|
2490
2649
|
name: "X",
|
|
2491
2650
|
width: 24,
|
|
@@ -2496,39 +2655,53 @@ const ns = (h) => {
|
|
|
2496
2655
|
}
|
|
2497
2656
|
)
|
|
2498
2657
|
] }),
|
|
2499
|
-
/* @__PURE__ */ t.jsx("div", { className: tt.variants, children:
|
|
2500
|
-
var
|
|
2501
|
-
return (
|
|
2502
|
-
}).map((
|
|
2503
|
-
var
|
|
2658
|
+
/* @__PURE__ */ t.jsx("div", { className: tt.variants, children: n.filter((g) => {
|
|
2659
|
+
var c;
|
|
2660
|
+
return (c = g.chargeTypes) == null ? void 0 : c.includes(a);
|
|
2661
|
+
}).map((g) => {
|
|
2662
|
+
var c, i, _;
|
|
2504
2663
|
return /* @__PURE__ */ t.jsxs(
|
|
2505
2664
|
"div",
|
|
2506
2665
|
{
|
|
2507
|
-
className:
|
|
2666
|
+
className: H(tt.variant),
|
|
2508
2667
|
onClick: () => {
|
|
2509
|
-
l(
|
|
2668
|
+
l(g.id), e(!1);
|
|
2510
2669
|
},
|
|
2511
2670
|
children: [
|
|
2512
2671
|
/* @__PURE__ */ t.jsxs("div", { className: tt.variantInfo, children: [
|
|
2513
|
-
/* @__PURE__ */ t.jsx(
|
|
2514
|
-
|
|
2515
|
-
|
|
2516
|
-
|
|
2672
|
+
/* @__PURE__ */ t.jsx(
|
|
2673
|
+
"span",
|
|
2674
|
+
{
|
|
2675
|
+
className: tt.title,
|
|
2676
|
+
id: "h4",
|
|
2677
|
+
children: g.name
|
|
2678
|
+
}
|
|
2679
|
+
),
|
|
2680
|
+
/* @__PURE__ */ t.jsx("span", { id: "md", children: Q({
|
|
2681
|
+
amount: a === "ONE_TIME" ? g.price.amount : g.subscriptionSettings ? g.subscriptionSettings.price.amount : 0,
|
|
2682
|
+
currency: a === "ONE_TIME" ? g.price.currency : ((c = g.subscriptionSettings) == null ? void 0 : c.price.currency) || "USD"
|
|
2517
2683
|
}) })
|
|
2518
2684
|
] }),
|
|
2519
|
-
/* @__PURE__ */ t.jsx("div", { children: a === "ONE_TIME" && /* @__PURE__ */ t.jsxs(
|
|
2520
|
-
|
|
2521
|
-
|
|
2522
|
-
|
|
2523
|
-
|
|
2685
|
+
/* @__PURE__ */ t.jsx("div", { id: "md", children: a === "ONE_TIME" && /* @__PURE__ */ t.jsxs(
|
|
2686
|
+
"span",
|
|
2687
|
+
{
|
|
2688
|
+
className: tt.stock,
|
|
2689
|
+
id: "md",
|
|
2690
|
+
children: [
|
|
2691
|
+
(i = g.quantity.restrictions) != null && i.max || g.quantity.available !== void 0 ? ((_ = g.quantity.restrictions) == null ? void 0 : _.max) || g.quantity.available : "∞",
|
|
2692
|
+
" ",
|
|
2693
|
+
"in stock"
|
|
2694
|
+
]
|
|
2695
|
+
}
|
|
2696
|
+
) })
|
|
2524
2697
|
]
|
|
2525
2698
|
},
|
|
2526
|
-
|
|
2699
|
+
g.id
|
|
2527
2700
|
);
|
|
2528
2701
|
}) })
|
|
2529
2702
|
] });
|
|
2530
2703
|
}, jn = (h) => {
|
|
2531
|
-
const { product:
|
|
2704
|
+
const { product: n, setIsOpen: a } = h, { setIsOpen: s } = rt(), e = () => {
|
|
2532
2705
|
s(!1), setTimeout(() => {
|
|
2533
2706
|
a(!1);
|
|
2534
2707
|
}, 300);
|
|
@@ -2537,10 +2710,10 @@ const ns = (h) => {
|
|
|
2537
2710
|
/* @__PURE__ */ t.jsxs("div", { className: tt.header, children: [
|
|
2538
2711
|
/* @__PURE__ */ t.jsxs("div", { id: "h3", children: [
|
|
2539
2712
|
"Buy ",
|
|
2540
|
-
it(
|
|
2713
|
+
it(n.name)
|
|
2541
2714
|
] }),
|
|
2542
2715
|
/* @__PURE__ */ t.jsx(
|
|
2543
|
-
|
|
2716
|
+
I,
|
|
2544
2717
|
{
|
|
2545
2718
|
name: "X",
|
|
2546
2719
|
width: 24,
|
|
@@ -2558,67 +2731,67 @@ const ns = (h) => {
|
|
|
2558
2731
|
/* @__PURE__ */ t.jsx("div", { className: tt.productOptions, children: /* @__PURE__ */ t.jsx(
|
|
2559
2732
|
ns,
|
|
2560
2733
|
{
|
|
2561
|
-
product:
|
|
2734
|
+
product: n,
|
|
2562
2735
|
setIsOpen: a
|
|
2563
2736
|
}
|
|
2564
2737
|
) })
|
|
2565
2738
|
] });
|
|
2566
|
-
}, vn = "
|
|
2739
|
+
}, vn = "_contentModal_1ptti_1", bn = "_modalTop_1ptti_13", In = "_loading_1ptti_19", Nn = "_modalCards_1ptti_27", Cn = "_modalImage_1ptti_32", Sn = "_card_1ptti_37", wn = "_cardInfo_1ptti_49", Pn = "_cardButtons_1ptti_56", kn = "_title_1ptti_62", Tn = "_blockImage_1ptti_69", Mn = "_short_1ptti_78", Bn = "_price_1ptti_82", qn = "_oldPrice_1ptti_89", $n = "_newPrice_1ptti_98", z = {
|
|
2567
2740
|
contentModal: vn,
|
|
2568
|
-
modalTop:
|
|
2569
|
-
loading:
|
|
2570
|
-
modalCards:
|
|
2571
|
-
modalImage:
|
|
2572
|
-
card:
|
|
2573
|
-
cardInfo:
|
|
2741
|
+
modalTop: bn,
|
|
2742
|
+
loading: In,
|
|
2743
|
+
modalCards: Nn,
|
|
2744
|
+
modalImage: Cn,
|
|
2745
|
+
card: Sn,
|
|
2746
|
+
cardInfo: wn,
|
|
2574
2747
|
cardButtons: Pn,
|
|
2575
2748
|
title: kn,
|
|
2576
|
-
blockImage:
|
|
2577
|
-
short:
|
|
2578
|
-
price:
|
|
2579
|
-
oldPrice:
|
|
2749
|
+
blockImage: Tn,
|
|
2750
|
+
short: Mn,
|
|
2751
|
+
price: Bn,
|
|
2752
|
+
oldPrice: qn,
|
|
2580
2753
|
newPrice: $n
|
|
2581
|
-
},
|
|
2754
|
+
}, Jn = (h) => {
|
|
2582
2755
|
const {
|
|
2583
|
-
setIsOpen:
|
|
2756
|
+
setIsOpen: n,
|
|
2584
2757
|
pageContext: a,
|
|
2585
2758
|
groupData: s,
|
|
2586
2759
|
setProductId: e,
|
|
2587
2760
|
setIsProductModalOpen: r,
|
|
2588
|
-
setShowDropdown:
|
|
2589
|
-
} = h, [
|
|
2590
|
-
|
|
2761
|
+
setShowDropdown: o
|
|
2762
|
+
} = h, [x, v] = y.useState(null), [b, M] = y.useState(!0), { setIsOpen: j } = rt();
|
|
2763
|
+
y.useEffect(() => {
|
|
2591
2764
|
var l;
|
|
2592
|
-
|
|
2765
|
+
M(!0);
|
|
2593
2766
|
const d = (l = a.listings) == null ? void 0 : l.filter(
|
|
2594
|
-
(
|
|
2767
|
+
(g) => s.listingIdList.includes(g.id)
|
|
2595
2768
|
);
|
|
2596
|
-
d &&
|
|
2597
|
-
}, [a]),
|
|
2598
|
-
|
|
2769
|
+
d && v([...d]), M(!1);
|
|
2770
|
+
}, [a]), y.useEffect(() => {
|
|
2771
|
+
j(!0);
|
|
2599
2772
|
}, []);
|
|
2600
2773
|
const m = () => {
|
|
2601
|
-
|
|
2602
|
-
|
|
2774
|
+
j(!1), setTimeout(() => {
|
|
2775
|
+
n(!1);
|
|
2603
2776
|
}, 300);
|
|
2604
2777
|
};
|
|
2605
|
-
return /* @__PURE__ */ t.jsx(ut, { close: () =>
|
|
2778
|
+
return /* @__PURE__ */ t.jsx(ut, { close: () => n(!1), children: /* @__PURE__ */ t.jsxs(
|
|
2606
2779
|
"div",
|
|
2607
2780
|
{
|
|
2608
|
-
className:
|
|
2781
|
+
className: z.contentModal,
|
|
2609
2782
|
onClick: (d) => d.stopPropagation(),
|
|
2610
2783
|
children: [
|
|
2611
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
2784
|
+
/* @__PURE__ */ t.jsxs("div", { className: z.modalTop, children: [
|
|
2612
2785
|
/* @__PURE__ */ t.jsx(
|
|
2613
2786
|
"span",
|
|
2614
2787
|
{
|
|
2615
|
-
className:
|
|
2788
|
+
className: z.title,
|
|
2616
2789
|
id: "h4",
|
|
2617
2790
|
children: it(s.name)
|
|
2618
2791
|
}
|
|
2619
2792
|
),
|
|
2620
2793
|
/* @__PURE__ */ t.jsx(
|
|
2621
|
-
|
|
2794
|
+
I,
|
|
2622
2795
|
{
|
|
2623
2796
|
name: "X",
|
|
2624
2797
|
hoverable: !0,
|
|
@@ -2627,10 +2800,10 @@ const ns = (h) => {
|
|
|
2627
2800
|
}
|
|
2628
2801
|
)
|
|
2629
2802
|
] }),
|
|
2630
|
-
!
|
|
2803
|
+
!b && x && /* @__PURE__ */ t.jsx("div", { className: z.modalCards, children: x.map((d) => /* @__PURE__ */ t.jsxs(
|
|
2631
2804
|
"div",
|
|
2632
2805
|
{
|
|
2633
|
-
className:
|
|
2806
|
+
className: z.card,
|
|
2634
2807
|
children: [
|
|
2635
2808
|
/* @__PURE__ */ t.jsx("div", { children: d.productData.images[0] ? /* @__PURE__ */ t.jsx(
|
|
2636
2809
|
"img",
|
|
@@ -2639,63 +2812,91 @@ const ns = (h) => {
|
|
|
2639
2812
|
alt: "",
|
|
2640
2813
|
width: 64,
|
|
2641
2814
|
height: 64,
|
|
2642
|
-
className:
|
|
2815
|
+
className: z.modalImage
|
|
2643
2816
|
}
|
|
2644
|
-
) : /* @__PURE__ */ t.jsx("div", { className:
|
|
2645
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
2817
|
+
) : /* @__PURE__ */ t.jsx("div", { className: H(z.blockImage, z.modalImage), children: /* @__PURE__ */ t.jsx(I, { name: "Image" }) }) }),
|
|
2818
|
+
/* @__PURE__ */ t.jsxs("div", { className: z.cardInfo, children: [
|
|
2646
2819
|
/* @__PURE__ */ t.jsx(
|
|
2647
2820
|
"div",
|
|
2648
2821
|
{
|
|
2649
|
-
className:
|
|
2822
|
+
className: z.name,
|
|
2650
2823
|
id: "h5",
|
|
2651
2824
|
children: d.productData.compareAtPrice && (d.productData.compareAtPrice.amount || 0) - (d.productData.minPrice.amount || 0) > 0 ? /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
2652
2825
|
it(d.productData.name),
|
|
2653
|
-
/* @__PURE__ */ t.jsxs(
|
|
2654
|
-
|
|
2655
|
-
|
|
2656
|
-
|
|
2657
|
-
|
|
2658
|
-
|
|
2659
|
-
|
|
2660
|
-
|
|
2661
|
-
|
|
2662
|
-
|
|
2826
|
+
/* @__PURE__ */ t.jsxs(
|
|
2827
|
+
"span",
|
|
2828
|
+
{
|
|
2829
|
+
className: z.price,
|
|
2830
|
+
id: "md",
|
|
2831
|
+
children: [
|
|
2832
|
+
/* @__PURE__ */ t.jsx(
|
|
2833
|
+
"span",
|
|
2834
|
+
{
|
|
2835
|
+
className: z.newPrice,
|
|
2836
|
+
id: "md",
|
|
2837
|
+
children: Q({
|
|
2838
|
+
amount: d.productData.minPrice.amount,
|
|
2839
|
+
currency: d.productData.minPrice.currency
|
|
2840
|
+
})
|
|
2841
|
+
}
|
|
2842
|
+
),
|
|
2843
|
+
/* @__PURE__ */ t.jsx(
|
|
2844
|
+
"span",
|
|
2845
|
+
{
|
|
2846
|
+
className: z.oldPrice,
|
|
2847
|
+
id: "md",
|
|
2848
|
+
children: Q({
|
|
2849
|
+
amount: d.productData.compareAtPrice.amount,
|
|
2850
|
+
currency: d.productData.compareAtPrice.currency
|
|
2851
|
+
})
|
|
2852
|
+
}
|
|
2853
|
+
)
|
|
2854
|
+
]
|
|
2855
|
+
}
|
|
2856
|
+
)
|
|
2663
2857
|
] }) : /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
2664
2858
|
it(d.productData.name),
|
|
2665
|
-
/* @__PURE__ */ t.jsx(
|
|
2666
|
-
|
|
2667
|
-
|
|
2668
|
-
|
|
2859
|
+
/* @__PURE__ */ t.jsx(
|
|
2860
|
+
"span",
|
|
2861
|
+
{
|
|
2862
|
+
className: z.newPrice,
|
|
2863
|
+
id: "md",
|
|
2864
|
+
children: Q({
|
|
2865
|
+
amount: d.productData.minPrice.amount,
|
|
2866
|
+
currency: d.productData.minPrice.currency
|
|
2867
|
+
})
|
|
2868
|
+
}
|
|
2869
|
+
)
|
|
2669
2870
|
] })
|
|
2670
2871
|
}
|
|
2671
2872
|
),
|
|
2672
2873
|
d.productData.shortDescription && /* @__PURE__ */ t.jsx(
|
|
2673
2874
|
"span",
|
|
2674
2875
|
{
|
|
2675
|
-
className:
|
|
2876
|
+
className: z.short,
|
|
2676
2877
|
id: "md",
|
|
2677
2878
|
children: it(d.productData.shortDescription)
|
|
2678
2879
|
}
|
|
2679
2880
|
)
|
|
2680
2881
|
] }),
|
|
2681
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
2882
|
+
/* @__PURE__ */ t.jsxs("div", { className: z.cardButtons, children: [
|
|
2682
2883
|
/* @__PURE__ */ t.jsx(
|
|
2683
|
-
|
|
2884
|
+
R,
|
|
2684
2885
|
{
|
|
2685
2886
|
type: "Secondary",
|
|
2686
2887
|
onClick: () => {
|
|
2687
|
-
e(d.id),
|
|
2888
|
+
e(d.id), n(!1), r(!0);
|
|
2688
2889
|
},
|
|
2689
2890
|
children: "Buy"
|
|
2690
2891
|
}
|
|
2691
2892
|
),
|
|
2692
2893
|
/* @__PURE__ */ t.jsx(Tt, { path: `/product/${d.productData.uniquePath}`, children: /* @__PURE__ */ t.jsx(
|
|
2693
|
-
|
|
2894
|
+
R,
|
|
2694
2895
|
{
|
|
2695
2896
|
type: "Primary",
|
|
2696
2897
|
style: { whiteSpace: "nowrap" },
|
|
2697
2898
|
onClick: () => {
|
|
2698
|
-
|
|
2899
|
+
o(!1), m();
|
|
2699
2900
|
},
|
|
2700
2901
|
children: "View Details"
|
|
2701
2902
|
}
|
|
@@ -2705,54 +2906,55 @@ const ns = (h) => {
|
|
|
2705
2906
|
},
|
|
2706
2907
|
d.id
|
|
2707
2908
|
)) }),
|
|
2708
|
-
|
|
2909
|
+
b && /* @__PURE__ */ t.jsx("div", { className: z.loading, children: /* @__PURE__ */ t.jsx(Bt, {}) })
|
|
2709
2910
|
]
|
|
2710
2911
|
}
|
|
2711
2912
|
) });
|
|
2712
2913
|
};
|
|
2713
2914
|
export {
|
|
2714
|
-
|
|
2715
|
-
|
|
2716
|
-
|
|
2717
|
-
|
|
2718
|
-
|
|
2719
|
-
|
|
2720
|
-
|
|
2915
|
+
Gn as Accordion,
|
|
2916
|
+
zs as BurgerMenuButton,
|
|
2917
|
+
R as Button,
|
|
2918
|
+
Oe as ButtonTypeSettings,
|
|
2919
|
+
zn as ButtonsSettings,
|
|
2920
|
+
Rn as CategorySettings,
|
|
2921
|
+
qt as ChargeTypes,
|
|
2721
2922
|
At as ChooseImage,
|
|
2722
|
-
|
|
2723
|
-
|
|
2724
|
-
|
|
2725
|
-
|
|
2923
|
+
ti as ChooseImageModal,
|
|
2924
|
+
Ls as EmptyCart,
|
|
2925
|
+
Un as FormSettings,
|
|
2926
|
+
Jn as GroupCardModal,
|
|
2726
2927
|
Hn as HeaderButtons,
|
|
2727
|
-
|
|
2928
|
+
I as Icon,
|
|
2728
2929
|
Nt as InputSettings,
|
|
2729
|
-
|
|
2730
|
-
|
|
2731
|
-
|
|
2930
|
+
Lt as InputUI,
|
|
2931
|
+
ei as ItemsSettings,
|
|
2932
|
+
En as LayoutSettings,
|
|
2732
2933
|
Tt as Link,
|
|
2733
|
-
|
|
2934
|
+
Fn as ListingSelector,
|
|
2734
2935
|
Bt as Loader,
|
|
2735
|
-
|
|
2936
|
+
Xn as MetaInfoPost,
|
|
2736
2937
|
ut as Modal,
|
|
2737
|
-
|
|
2738
|
-
|
|
2739
|
-
|
|
2740
|
-
|
|
2741
|
-
|
|
2938
|
+
Vn as PagesMobileMenu,
|
|
2939
|
+
Us as PagesMobileModal,
|
|
2940
|
+
Ln as PagesSettings,
|
|
2941
|
+
Wn as ProductCardButtons,
|
|
2942
|
+
Qn as ProductCardModal,
|
|
2742
2943
|
ns as ProductOptions,
|
|
2743
|
-
|
|
2744
|
-
|
|
2944
|
+
si as RadioUI,
|
|
2945
|
+
wt as RangeSelector,
|
|
2745
2946
|
at as Select,
|
|
2746
|
-
|
|
2747
|
-
|
|
2748
|
-
|
|
2947
|
+
ni as SelectInfiniteList,
|
|
2948
|
+
ii as SelectTypeText,
|
|
2949
|
+
ai as SelectUI,
|
|
2950
|
+
Yn as ShareLink,
|
|
2749
2951
|
Es as ShoppingButton,
|
|
2750
|
-
|
|
2952
|
+
Rs as ShoppingModalCart,
|
|
2751
2953
|
lt as Switch,
|
|
2752
|
-
|
|
2753
|
-
|
|
2754
|
-
|
|
2755
|
-
|
|
2756
|
-
|
|
2757
|
-
|
|
2954
|
+
oi as TextSettings,
|
|
2955
|
+
ci as TextareaSettings,
|
|
2956
|
+
ri as TextareaUI,
|
|
2957
|
+
li as TypesText,
|
|
2958
|
+
$t as UserInfo,
|
|
2959
|
+
di as Wrapper
|
|
2758
2960
|
};
|