@billgangcom/theme-lib 1.69.5 → 1.69.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/builder/components/AddSections/utils/index.d.ts +5 -1
- package/dist/builder.cjs.js +20 -20
- package/dist/builder.es.js +3483 -3420
- package/dist/{index-CVyi3AZa.js → index-CQFp0DVu.js} +3034 -3023
- package/dist/{index-CTXAJEri.cjs → index-CgMUGXQL.cjs} +21 -21
- package/dist/index.cjs.js +1 -1
- package/dist/index.es.js +1 -1
- package/dist/storefront/api/index.d.ts +1 -0
- package/dist/storefront/api/rewards.d.ts +2 -0
- package/dist/storefront/components/ConnectDiscord/index.d.ts +2 -2
- package/dist/storefront/models/discord.d.ts +0 -4
- package/dist/storefront/models/index.d.ts +1 -0
- package/dist/storefront/store/useDiscordStore.d.ts +3 -3
- package/dist/ui.cjs.js +1 -1
- package/dist/ui.es.js +838 -822
- package/package.json +1 -1
- /package/dist/{pages/rewards/model.d.ts → storefront/models/rewards.d.ts} +0 -0
package/dist/ui.es.js
CHANGED
|
@@ -1,18 +1,19 @@
|
|
|
1
|
-
import { j as t, I as
|
|
2
|
-
import {
|
|
1
|
+
import { j as t, I as b, c as U, b as Nt, u as ht, d as pt, P as mt, S as rt, R as kt, D as gt, e as ft, v as xt, B as lt, f as nt, a as wt, g as Pt, O as ut, h as J, i as _t, C as jt, k as F, l as Tt, m as qt, n as vt, o as Ot, p as yt, q as W, L as At, r as Ct, t as bt, w as at, s as it, x as D, y as Et, M as dt, z as Dt, A as ot, E as Rt, F as Mt, G as Lt, H as $t, J as zt } from "./index-CQFp0DVu.js";
|
|
2
|
+
import { Y as Wn, V as Xn, Q as Qn, X as Jn, N as Kn, U as Zn, T as ti, K as ei, W as si } from "./index-CQFp0DVu.js";
|
|
3
3
|
import m from "react";
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
4
|
+
import "react-dom";
|
|
5
|
+
const Ht = "_block_kh9z8_8", Ut = "_title_kh9z8_16", Ft = "_subtitle_kh9z8_23", Vt = "_alignmentContent_kh9z8_30", Yt = "_alignments_kh9z8_39", Gt = "_alignment_kh9z8_30", Wt = "_circle_kh9z8_64", Xt = "_paddings_kh9z8_71", Qt = "_padding_kh9z8_71", Jt = "_active_kh9z8_97", Y = {
|
|
6
|
+
block: Ht,
|
|
7
|
+
title: Ut,
|
|
8
|
+
subtitle: Ft,
|
|
9
|
+
alignmentContent: Vt,
|
|
10
|
+
alignments: Yt,
|
|
11
|
+
alignment: Gt,
|
|
12
|
+
circle: Wt,
|
|
13
|
+
paddings: Xt,
|
|
14
|
+
padding: Qt,
|
|
15
|
+
active: Jt
|
|
16
|
+
}, Kt = [
|
|
16
17
|
"topLeft",
|
|
17
18
|
"top",
|
|
18
19
|
"topRight",
|
|
@@ -22,7 +23,7 @@ const zt = "_block_kh9z8_8", Ht = "_title_kh9z8_16", Ut = "_subtitle_kh9z8_23",
|
|
|
22
23
|
"bottomLeft",
|
|
23
24
|
"bottom",
|
|
24
25
|
"bottomRight"
|
|
25
|
-
],
|
|
26
|
+
], Zt = ["left", "top", "right", "bottom"], Bn = (r) => {
|
|
26
27
|
const {
|
|
27
28
|
alignment: i,
|
|
28
29
|
padding: a,
|
|
@@ -61,19 +62,19 @@ const zt = "_block_kh9z8_8", Ht = "_title_kh9z8_16", Ut = "_subtitle_kh9z8_23",
|
|
|
61
62
|
return "AlignBottom";
|
|
62
63
|
}
|
|
63
64
|
}
|
|
64
|
-
const [
|
|
65
|
-
return /* @__PURE__ */ t.jsxs("div", { className:
|
|
66
|
-
/* @__PURE__ */ t.jsx("h3", { className:
|
|
67
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
68
|
-
c && /* @__PURE__ */ t.jsxs("div", { className:
|
|
69
|
-
/* @__PURE__ */ t.jsx("h5", { className:
|
|
70
|
-
/* @__PURE__ */ t.jsx("div", { className:
|
|
65
|
+
const [x, P] = m.useState(null), [v, n] = m.useState(null);
|
|
66
|
+
return /* @__PURE__ */ t.jsxs("div", { className: Y.layout, children: [
|
|
67
|
+
/* @__PURE__ */ t.jsx("h3", { className: Y.title, children: "Layout (for Desktop version)" }),
|
|
68
|
+
/* @__PURE__ */ t.jsxs("div", { className: Y.alignmentContent, children: [
|
|
69
|
+
c && /* @__PURE__ */ t.jsxs("div", { className: Y.block, children: [
|
|
70
|
+
/* @__PURE__ */ t.jsx("h5", { className: Y.subtitle, children: "Alignment" }),
|
|
71
|
+
/* @__PURE__ */ t.jsx("div", { className: Y.alignments, children: Kt.map((o) => /* @__PURE__ */ t.jsxs(
|
|
71
72
|
"div",
|
|
72
73
|
{
|
|
73
74
|
onClick: () => {
|
|
74
75
|
e(o);
|
|
75
76
|
},
|
|
76
|
-
className:
|
|
77
|
+
className: Y.alignment,
|
|
77
78
|
onMouseEnter: () => {
|
|
78
79
|
P(o);
|
|
79
80
|
},
|
|
@@ -81,18 +82,18 @@ const zt = "_block_kh9z8_8", Ht = "_title_kh9z8_16", Ut = "_subtitle_kh9z8_23",
|
|
|
81
82
|
P(null);
|
|
82
83
|
},
|
|
83
84
|
children: [
|
|
84
|
-
o !== i &&
|
|
85
|
-
o !== i &&
|
|
86
|
-
|
|
85
|
+
o !== i && x !== o && /* @__PURE__ */ t.jsx("div", { className: Y.circle }),
|
|
86
|
+
o !== i && x === o && /* @__PURE__ */ t.jsx(
|
|
87
|
+
b,
|
|
87
88
|
{
|
|
88
|
-
name: u(
|
|
89
|
+
name: u(x),
|
|
89
90
|
fill: "#c2c2c2",
|
|
90
91
|
width: 22,
|
|
91
92
|
height: 22
|
|
92
93
|
}
|
|
93
94
|
),
|
|
94
95
|
o === i && /* @__PURE__ */ t.jsx(
|
|
95
|
-
|
|
96
|
+
b,
|
|
96
97
|
{
|
|
97
98
|
name: u(i),
|
|
98
99
|
fill: "#FF3F19",
|
|
@@ -105,13 +106,13 @@ const zt = "_block_kh9z8_8", Ht = "_title_kh9z8_16", Ut = "_subtitle_kh9z8_23",
|
|
|
105
106
|
o
|
|
106
107
|
)) })
|
|
107
108
|
] }),
|
|
108
|
-
d && /* @__PURE__ */ t.jsxs("div", { className:
|
|
109
|
-
/* @__PURE__ */ t.jsx("h5", { className:
|
|
110
|
-
/* @__PURE__ */ t.jsx("div", { className:
|
|
109
|
+
d && /* @__PURE__ */ t.jsxs("div", { className: Y.block, children: [
|
|
110
|
+
/* @__PURE__ */ t.jsx("h5", { className: Y.subtitle, children: "Paddings" }),
|
|
111
|
+
/* @__PURE__ */ t.jsx("div", { className: Y.paddings, children: Zt.map((o) => /* @__PURE__ */ t.jsxs(
|
|
111
112
|
"label",
|
|
112
113
|
{
|
|
113
|
-
className:
|
|
114
|
-
[
|
|
114
|
+
className: U(Y.padding, {
|
|
115
|
+
[Y.active]: v === o
|
|
115
116
|
}),
|
|
116
117
|
onFocus: () => {
|
|
117
118
|
n(o);
|
|
@@ -121,7 +122,7 @@ const zt = "_block_kh9z8_8", Ht = "_title_kh9z8_16", Ut = "_subtitle_kh9z8_23",
|
|
|
121
122
|
},
|
|
122
123
|
children: [
|
|
123
124
|
/* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
|
|
124
|
-
|
|
125
|
+
b,
|
|
125
126
|
{
|
|
126
127
|
name: g(o),
|
|
127
128
|
width: 20,
|
|
@@ -149,20 +150,20 @@ const zt = "_block_kh9z8_8", Ht = "_title_kh9z8_16", Ut = "_subtitle_kh9z8_23",
|
|
|
149
150
|
] })
|
|
150
151
|
] })
|
|
151
152
|
] });
|
|
152
|
-
},
|
|
153
|
-
title:
|
|
154
|
-
subtitle:
|
|
155
|
-
productsBlock:
|
|
156
|
-
top:
|
|
157
|
-
products:
|
|
158
|
-
product:
|
|
159
|
-
button:
|
|
160
|
-
disabled:
|
|
161
|
-
buttons:
|
|
162
|
-
addButton:
|
|
163
|
-
deleteButton:
|
|
153
|
+
}, te = "_title_82zux_1", ee = "_subtitle_82zux_5", se = "_productsBlock_82zux_14", ne = "_top_82zux_26", ie = "_products_82zux_14", ae = "_product_82zux_14", oe = "_button_82zux_80", ce = "_disabled_82zux_91", re = "_buttons_82zux_118", le = "_addButton_82zux_157", de = "_deleteButton_82zux_179", X = {
|
|
154
|
+
title: te,
|
|
155
|
+
subtitle: ee,
|
|
156
|
+
productsBlock: se,
|
|
157
|
+
top: ne,
|
|
158
|
+
products: ie,
|
|
159
|
+
product: ae,
|
|
160
|
+
button: oe,
|
|
161
|
+
disabled: ce,
|
|
162
|
+
buttons: re,
|
|
163
|
+
addButton: le,
|
|
164
|
+
deleteButton: de
|
|
164
165
|
};
|
|
165
|
-
function
|
|
166
|
+
function ue({ id: r, children: i }) {
|
|
166
167
|
const {
|
|
167
168
|
attributes: a,
|
|
168
169
|
listeners: s,
|
|
@@ -181,14 +182,14 @@ function de({ id: r, children: i }) {
|
|
|
181
182
|
{
|
|
182
183
|
ref: e,
|
|
183
184
|
style: g,
|
|
184
|
-
className: `${
|
|
185
|
+
className: `${X.product} ${u ? X.dragging : ""}`,
|
|
185
186
|
...a,
|
|
186
187
|
...s,
|
|
187
188
|
children: i
|
|
188
189
|
}
|
|
189
190
|
);
|
|
190
191
|
}
|
|
191
|
-
const
|
|
192
|
+
const Tn = (r) => {
|
|
192
193
|
const {
|
|
193
194
|
isActiveItems: i,
|
|
194
195
|
setIsActiveItems: a,
|
|
@@ -198,16 +199,16 @@ const Bn = (r) => {
|
|
|
198
199
|
tags: d,
|
|
199
200
|
title: u,
|
|
200
201
|
subtitle: g,
|
|
201
|
-
draggable:
|
|
202
|
+
draggable: x = !1,
|
|
202
203
|
withImage: P = !1,
|
|
203
|
-
addable:
|
|
204
|
+
addable: v = !0,
|
|
204
205
|
itemsOptions: n,
|
|
205
206
|
hasRangeSelector: o = !1,
|
|
206
207
|
rangeSelectorOptions: p,
|
|
207
|
-
limit:
|
|
208
|
-
autoScrollInterval:
|
|
209
|
-
deletable:
|
|
210
|
-
aspectRatio:
|
|
208
|
+
limit: E,
|
|
209
|
+
autoScrollInterval: _,
|
|
210
|
+
deletable: j,
|
|
211
|
+
aspectRatio: N,
|
|
211
212
|
setAspectRatio: M
|
|
212
213
|
} = r, z = ht(
|
|
213
214
|
pt(mt, {
|
|
@@ -216,16 +217,16 @@ const Bn = (r) => {
|
|
|
216
217
|
}
|
|
217
218
|
})
|
|
218
219
|
), R = (h) => {
|
|
219
|
-
const { active:
|
|
220
|
-
if (k &&
|
|
221
|
-
const
|
|
222
|
-
if (
|
|
223
|
-
const
|
|
224
|
-
|
|
220
|
+
const { active: C, over: k } = h;
|
|
221
|
+
if (k && C.id !== k.id) {
|
|
222
|
+
const T = s.findIndex((q) => q === C.id), I = s.findIndex((q) => q === k.id);
|
|
223
|
+
if (T !== -1 && I !== -1) {
|
|
224
|
+
const q = [...s], [y] = q.splice(T, 1);
|
|
225
|
+
q.splice(I, 0, y), e(q);
|
|
225
226
|
}
|
|
226
227
|
}
|
|
227
228
|
};
|
|
228
|
-
function
|
|
229
|
+
function K(h) {
|
|
229
230
|
if (P)
|
|
230
231
|
return h ? /* @__PURE__ */ t.jsx(
|
|
231
232
|
"img",
|
|
@@ -236,7 +237,7 @@ const Bn = (r) => {
|
|
|
236
237
|
height: 16
|
|
237
238
|
}
|
|
238
239
|
) : /* @__PURE__ */ t.jsx(
|
|
239
|
-
|
|
240
|
+
b,
|
|
240
241
|
{
|
|
241
242
|
name: "Image",
|
|
242
243
|
width: 16,
|
|
@@ -245,12 +246,12 @@ const Bn = (r) => {
|
|
|
245
246
|
}
|
|
246
247
|
);
|
|
247
248
|
}
|
|
248
|
-
const
|
|
249
|
-
const k = n.find((
|
|
249
|
+
const f = (h, C = !1) => {
|
|
250
|
+
const k = n.find((I) => I.id === h);
|
|
250
251
|
if (!k) return;
|
|
251
|
-
const
|
|
252
|
-
|
|
253
|
-
|
|
252
|
+
const T = /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
253
|
+
x && /* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
|
|
254
|
+
b,
|
|
254
255
|
{
|
|
255
256
|
name: "DotsSixVertical",
|
|
256
257
|
hoverable: !0,
|
|
@@ -261,51 +262,51 @@ const Bn = (r) => {
|
|
|
261
262
|
/* @__PURE__ */ t.jsx(
|
|
262
263
|
nt,
|
|
263
264
|
{
|
|
264
|
-
onChange: (
|
|
265
|
-
const
|
|
266
|
-
if (!
|
|
267
|
-
const
|
|
268
|
-
e([...
|
|
265
|
+
onChange: (I) => {
|
|
266
|
+
const q = [...s], y = n.find((l) => l.name === I);
|
|
267
|
+
if (!y) return;
|
|
268
|
+
const O = y.id, H = q.map((l) => l === h ? O : l);
|
|
269
|
+
e([...H]);
|
|
269
270
|
},
|
|
270
271
|
value: k.name,
|
|
271
|
-
options: n.filter((
|
|
272
|
-
leftAddonOptions: n.map((
|
|
273
|
-
value:
|
|
274
|
-
addon: I
|
|
272
|
+
options: n.filter((I) => !s.find((q) => q === I.id)).map((I) => I.name),
|
|
273
|
+
leftAddonOptions: n.map((I) => ({
|
|
274
|
+
value: I.name,
|
|
275
|
+
addon: K(I.images)
|
|
275
276
|
}))
|
|
276
277
|
}
|
|
277
278
|
),
|
|
278
|
-
|
|
279
|
-
|
|
279
|
+
C && /* @__PURE__ */ t.jsx("div", { className: X.buttons, children: /* @__PURE__ */ t.jsx("div", { className: X.deleteButton, children: /* @__PURE__ */ t.jsx(
|
|
280
|
+
b,
|
|
280
281
|
{
|
|
281
282
|
name: "Trash",
|
|
282
283
|
hoverable: !0,
|
|
283
284
|
width: 20,
|
|
284
285
|
height: 20,
|
|
285
286
|
fill: "#C12A2A",
|
|
286
|
-
onClick: () => e(s.filter((
|
|
287
|
+
onClick: () => e(s.filter((I) => I !== h))
|
|
287
288
|
}
|
|
288
289
|
) }) })
|
|
289
290
|
] });
|
|
290
|
-
return
|
|
291
|
-
|
|
291
|
+
return x ? /* @__PURE__ */ t.jsx(
|
|
292
|
+
ue,
|
|
292
293
|
{
|
|
293
294
|
id: h,
|
|
294
|
-
children:
|
|
295
|
+
children: T
|
|
295
296
|
},
|
|
296
|
-
|
|
297
|
+
J()
|
|
297
298
|
) : /* @__PURE__ */ t.jsx(
|
|
298
299
|
"div",
|
|
299
300
|
{
|
|
300
|
-
className:
|
|
301
|
-
children:
|
|
301
|
+
className: X.product,
|
|
302
|
+
children: T
|
|
302
303
|
},
|
|
303
|
-
|
|
304
|
+
J()
|
|
304
305
|
);
|
|
305
306
|
};
|
|
306
|
-
return /* @__PURE__ */ t.jsxs("div", { className:
|
|
307
|
-
(u || i !== void 0) && /* @__PURE__ */ t.jsxs("div", { className:
|
|
308
|
-
u && /* @__PURE__ */ t.jsx("h3", { className:
|
|
307
|
+
return /* @__PURE__ */ t.jsxs("div", { className: X.productsBlock, children: [
|
|
308
|
+
(u || i !== void 0) && /* @__PURE__ */ t.jsxs("div", { className: X.top, children: [
|
|
309
|
+
u && /* @__PURE__ */ t.jsx("h3", { className: X.title, children: u }),
|
|
309
310
|
i !== void 0 && /* @__PURE__ */ t.jsx(
|
|
310
311
|
rt,
|
|
311
312
|
{
|
|
@@ -315,9 +316,9 @@ const Bn = (r) => {
|
|
|
315
316
|
)
|
|
316
317
|
] }),
|
|
317
318
|
o && p && /* @__PURE__ */ t.jsx(kt, { ...p }),
|
|
318
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
319
|
-
g && /* @__PURE__ */ t.jsx("h5", { className:
|
|
320
|
-
|
|
319
|
+
/* @__PURE__ */ t.jsxs("div", { className: X.products, children: [
|
|
320
|
+
g && /* @__PURE__ */ t.jsx("h5", { className: X.subtitle, children: g }),
|
|
321
|
+
x ? /* @__PURE__ */ t.jsx(
|
|
321
322
|
gt,
|
|
322
323
|
{
|
|
323
324
|
sensors: z,
|
|
@@ -327,12 +328,12 @@ const Bn = (r) => {
|
|
|
327
328
|
{
|
|
328
329
|
items: s,
|
|
329
330
|
strategy: xt,
|
|
330
|
-
children: s.map((h) =>
|
|
331
|
+
children: s.map((h) => f(h, j))
|
|
331
332
|
}
|
|
332
333
|
)
|
|
333
334
|
}
|
|
334
|
-
) : s.map((h) =>
|
|
335
|
-
|
|
335
|
+
) : s.map((h) => f(h, j)),
|
|
336
|
+
v && /* @__PURE__ */ t.jsx(
|
|
336
337
|
"div",
|
|
337
338
|
{
|
|
338
339
|
style: {
|
|
@@ -345,30 +346,30 @@ const Bn = (r) => {
|
|
|
345
346
|
lt,
|
|
346
347
|
{
|
|
347
348
|
withoutHover: !0,
|
|
348
|
-
className:
|
|
349
|
-
[
|
|
349
|
+
className: U(X.button, {
|
|
350
|
+
[X.disabled]: !!(E && E <= s.length || s.length === n.length)
|
|
350
351
|
}),
|
|
351
352
|
size: "s",
|
|
352
|
-
disabled: !!(
|
|
353
|
+
disabled: !!(E && E <= s.length || s.length === n.length),
|
|
353
354
|
onClick: () => {
|
|
354
355
|
const h = [...s];
|
|
355
|
-
let
|
|
356
|
+
let C = null;
|
|
356
357
|
if (n) {
|
|
357
358
|
for (let k = 0; k < n.length; k++)
|
|
358
|
-
if (!s.find((
|
|
359
|
-
|
|
359
|
+
if (!s.find((T) => T === n[k].id)) {
|
|
360
|
+
C = n[k];
|
|
360
361
|
break;
|
|
361
362
|
}
|
|
362
363
|
}
|
|
363
|
-
h.push((
|
|
364
|
+
h.push((C == null ? void 0 : C.id) || n[0].id), e(h);
|
|
364
365
|
},
|
|
365
366
|
style: {
|
|
366
367
|
width: "fit-content"
|
|
367
368
|
},
|
|
368
|
-
children: /* @__PURE__ */ t.jsxs("div", { className:
|
|
369
|
+
children: /* @__PURE__ */ t.jsxs("div", { className: X.addButton, children: [
|
|
369
370
|
/* @__PURE__ */ t.jsx("span", { children: "Add Option" }),
|
|
370
371
|
/* @__PURE__ */ t.jsx(
|
|
371
|
-
|
|
372
|
+
b,
|
|
372
373
|
{
|
|
373
374
|
name: "Plus",
|
|
374
375
|
width: 16,
|
|
@@ -381,10 +382,10 @@ const Bn = (r) => {
|
|
|
381
382
|
}
|
|
382
383
|
)
|
|
383
384
|
] }),
|
|
384
|
-
|
|
385
|
+
N && M && /* @__PURE__ */ t.jsx(
|
|
385
386
|
nt,
|
|
386
387
|
{
|
|
387
|
-
value:
|
|
388
|
+
value: N,
|
|
388
389
|
label: "Aspect Ratio",
|
|
389
390
|
options: Object.keys(Pt),
|
|
390
391
|
onChange: (h) => M(h),
|
|
@@ -405,13 +406,13 @@ const Bn = (r) => {
|
|
|
405
406
|
items: c
|
|
406
407
|
}
|
|
407
408
|
),
|
|
408
|
-
|
|
409
|
+
_ !== void 0 && /* @__PURE__ */ t.jsx(
|
|
409
410
|
Nt,
|
|
410
411
|
{
|
|
411
412
|
label: "Auto scroll interval",
|
|
412
413
|
type: "number",
|
|
413
|
-
value: String(
|
|
414
|
-
onChange: (h) =>
|
|
414
|
+
value: String(_.scrollInterval),
|
|
415
|
+
onChange: (h) => _.setScrollInterval(Number(h)),
|
|
415
416
|
min: 0.1,
|
|
416
417
|
max: 100,
|
|
417
418
|
style: {
|
|
@@ -421,20 +422,20 @@ const Bn = (r) => {
|
|
|
421
422
|
}
|
|
422
423
|
)
|
|
423
424
|
] });
|
|
424
|
-
},
|
|
425
|
-
title:
|
|
426
|
-
subtitle:
|
|
427
|
-
productsBlock:
|
|
428
|
-
top:
|
|
429
|
-
products:
|
|
430
|
-
product:
|
|
431
|
-
button:
|
|
432
|
-
disabled:
|
|
433
|
-
buttons:
|
|
434
|
-
addButton:
|
|
435
|
-
deleteButton:
|
|
425
|
+
}, he = "_title_roi3a_1", pe = "_subtitle_roi3a_5", me = "_productsBlock_roi3a_14", ge = "_top_roi3a_26", fe = "_products_roi3a_14", xe = "_product_roi3a_14", _e = "_button_roi3a_80", je = "_disabled_roi3a_91", ve = "_buttons_roi3a_118", be = "_addButton_roi3a_164", ye = "_deleteButton_roi3a_179", V = {
|
|
426
|
+
title: he,
|
|
427
|
+
subtitle: pe,
|
|
428
|
+
productsBlock: me,
|
|
429
|
+
top: ge,
|
|
430
|
+
products: fe,
|
|
431
|
+
product: xe,
|
|
432
|
+
button: _e,
|
|
433
|
+
disabled: je,
|
|
434
|
+
buttons: ve,
|
|
435
|
+
addButton: be,
|
|
436
|
+
deleteButton: ye
|
|
436
437
|
};
|
|
437
|
-
function
|
|
438
|
+
function Ie({ product: r, children: i }) {
|
|
438
439
|
const {
|
|
439
440
|
attributes: a,
|
|
440
441
|
listeners: s,
|
|
@@ -453,14 +454,14 @@ function ye({ product: r, children: i }) {
|
|
|
453
454
|
{
|
|
454
455
|
ref: e,
|
|
455
456
|
style: g,
|
|
456
|
-
className: `${
|
|
457
|
+
className: `${V.product} ${u ? V.dragging : ""}`,
|
|
457
458
|
...a,
|
|
458
459
|
...s,
|
|
459
460
|
children: i
|
|
460
461
|
}
|
|
461
462
|
);
|
|
462
463
|
}
|
|
463
|
-
const
|
|
464
|
+
const qn = (r) => {
|
|
464
465
|
const {
|
|
465
466
|
isActiveItems: i,
|
|
466
467
|
setIsActiveItems: a,
|
|
@@ -470,13 +471,13 @@ const Tn = (r) => {
|
|
|
470
471
|
subtitle: d,
|
|
471
472
|
editable: u = !0,
|
|
472
473
|
draggable: g = !1,
|
|
473
|
-
deletable:
|
|
474
|
+
deletable: x = !0,
|
|
474
475
|
addable: P = !0,
|
|
475
|
-
itemsType:
|
|
476
|
+
itemsType: v,
|
|
476
477
|
itemsOptions: n,
|
|
477
478
|
addableOptions: o = {},
|
|
478
479
|
limit: p
|
|
479
|
-
} = r, [
|
|
480
|
+
} = r, [E, _] = m.useState(null), [j, N] = m.useState(null), M = m.useRef(null), z = ht(
|
|
480
481
|
pt(mt, {
|
|
481
482
|
activationConstraint: {
|
|
482
483
|
distance: 5
|
|
@@ -484,33 +485,33 @@ const Tn = (r) => {
|
|
|
484
485
|
})
|
|
485
486
|
);
|
|
486
487
|
m.useEffect(() => {
|
|
487
|
-
if (
|
|
488
|
-
const h = [...s].map((
|
|
488
|
+
if (E) {
|
|
489
|
+
const h = [...s].map((C) => C.id === E.id ? E : C);
|
|
489
490
|
e(h);
|
|
490
491
|
}
|
|
491
|
-
}, [
|
|
492
|
-
M.current &&
|
|
493
|
-
}, [M.current,
|
|
494
|
-
const R = (h,
|
|
492
|
+
}, [E]), m.useEffect(() => {
|
|
493
|
+
M.current && j && (M.current.getBoundingClientRect().height, j.top);
|
|
494
|
+
}, [M.current, j]);
|
|
495
|
+
const R = (h, C) => {
|
|
495
496
|
h.stopPropagation();
|
|
496
497
|
const k = h.target.getBoundingClientRect();
|
|
497
|
-
|
|
498
|
+
N({
|
|
498
499
|
top: k.top + window.scrollY,
|
|
499
500
|
left: k.left - 30
|
|
500
|
-
}),
|
|
501
|
-
},
|
|
502
|
-
const { active:
|
|
503
|
-
if (k &&
|
|
504
|
-
const
|
|
505
|
-
if (
|
|
506
|
-
const
|
|
507
|
-
|
|
501
|
+
}), _(C);
|
|
502
|
+
}, K = (h) => {
|
|
503
|
+
const { active: C, over: k } = h;
|
|
504
|
+
if (k && C.id !== k.id) {
|
|
505
|
+
const T = s.findIndex((q) => q.id === C.id), I = s.findIndex((q) => q.id === k.id);
|
|
506
|
+
if (T !== -1 && I !== -1) {
|
|
507
|
+
const q = [...s], [y] = q.splice(T, 1);
|
|
508
|
+
q.splice(I, 0, y), e(q);
|
|
508
509
|
}
|
|
509
510
|
}
|
|
510
|
-
},
|
|
511
|
+
}, f = (h, C) => {
|
|
511
512
|
const k = /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
512
513
|
g && /* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
|
|
513
|
-
|
|
514
|
+
b,
|
|
514
515
|
{
|
|
515
516
|
name: "DotsSixVertical",
|
|
516
517
|
hoverable: !0,
|
|
@@ -518,73 +519,73 @@ const Tn = (r) => {
|
|
|
518
519
|
height: 20
|
|
519
520
|
}
|
|
520
521
|
) }),
|
|
521
|
-
|
|
522
|
+
v === "select" && n && /* @__PURE__ */ t.jsx(
|
|
522
523
|
nt,
|
|
523
524
|
{
|
|
524
|
-
onChange: (
|
|
525
|
-
const
|
|
526
|
-
if (!
|
|
527
|
-
const
|
|
528
|
-
...
|
|
525
|
+
onChange: (T) => {
|
|
526
|
+
const I = [...s], q = n.find((O) => O.name === T);
|
|
527
|
+
if (!q) return;
|
|
528
|
+
const y = I.map((O) => O.id === h.id ? {
|
|
529
|
+
...q,
|
|
529
530
|
name: {
|
|
530
|
-
"en-US":
|
|
531
|
+
"en-US": T
|
|
531
532
|
}
|
|
532
|
-
} :
|
|
533
|
-
|
|
533
|
+
} : O);
|
|
534
|
+
_({
|
|
534
535
|
...h,
|
|
535
536
|
name: {
|
|
536
|
-
"en-US":
|
|
537
|
+
"en-US": T
|
|
537
538
|
}
|
|
538
|
-
}), e([...
|
|
539
|
+
}), e([...y]);
|
|
539
540
|
},
|
|
540
541
|
value: h.name,
|
|
541
|
-
options: n.filter((
|
|
542
|
+
options: n.filter((T) => !s.find((I) => I.name === T.name)).map((T) => T.name)
|
|
542
543
|
}
|
|
543
544
|
),
|
|
544
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
545
|
-
u && /* @__PURE__ */ t.jsx("div", { className:
|
|
546
|
-
|
|
545
|
+
/* @__PURE__ */ t.jsxs("div", { className: V.buttons, children: [
|
|
546
|
+
u && /* @__PURE__ */ t.jsx("div", { className: V.deleteButton, children: /* @__PURE__ */ t.jsx(
|
|
547
|
+
b,
|
|
547
548
|
{
|
|
548
549
|
name: "Sliders",
|
|
549
550
|
hoverable: !0,
|
|
550
551
|
width: 20,
|
|
551
552
|
height: 20,
|
|
552
|
-
onClick: (
|
|
553
|
+
onClick: (T) => R(T, h)
|
|
553
554
|
}
|
|
554
555
|
) }),
|
|
555
|
-
|
|
556
|
-
|
|
556
|
+
x && /* @__PURE__ */ t.jsx("div", { className: V.deleteButton, children: /* @__PURE__ */ t.jsx(
|
|
557
|
+
b,
|
|
557
558
|
{
|
|
558
559
|
name: "Trash",
|
|
559
560
|
hoverable: !0,
|
|
560
561
|
width: 20,
|
|
561
562
|
height: 20,
|
|
562
563
|
fill: "#C12A2A",
|
|
563
|
-
onClick: () => e(s.filter((
|
|
564
|
+
onClick: () => e(s.filter((T) => T.id !== h.id))
|
|
564
565
|
}
|
|
565
566
|
) })
|
|
566
567
|
] })
|
|
567
568
|
] });
|
|
568
569
|
return g ? /* @__PURE__ */ t.jsx(
|
|
569
|
-
|
|
570
|
+
Ie,
|
|
570
571
|
{
|
|
571
572
|
product: h,
|
|
572
|
-
index:
|
|
573
|
+
index: C,
|
|
573
574
|
children: k
|
|
574
575
|
},
|
|
575
576
|
h.id
|
|
576
577
|
) : /* @__PURE__ */ t.jsx(
|
|
577
578
|
"div",
|
|
578
579
|
{
|
|
579
|
-
className:
|
|
580
|
+
className: V.product,
|
|
580
581
|
children: k
|
|
581
582
|
},
|
|
582
583
|
h.id
|
|
583
584
|
);
|
|
584
585
|
};
|
|
585
|
-
return /* @__PURE__ */ t.jsxs("div", { className:
|
|
586
|
-
(c || i !== void 0) && /* @__PURE__ */ t.jsxs("div", { className:
|
|
587
|
-
c && /* @__PURE__ */ t.jsx("h3", { className:
|
|
586
|
+
return /* @__PURE__ */ t.jsxs("div", { className: V.productsBlock, children: [
|
|
587
|
+
(c || i !== void 0) && /* @__PURE__ */ t.jsxs("div", { className: V.top, children: [
|
|
588
|
+
c && /* @__PURE__ */ t.jsx("h3", { className: V.title, children: c }),
|
|
588
589
|
i !== void 0 && /* @__PURE__ */ t.jsx(
|
|
589
590
|
rt,
|
|
590
591
|
{
|
|
@@ -593,23 +594,23 @@ const Tn = (r) => {
|
|
|
593
594
|
}
|
|
594
595
|
)
|
|
595
596
|
] }),
|
|
596
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
597
|
-
d && /* @__PURE__ */ t.jsx("h5", { className:
|
|
597
|
+
/* @__PURE__ */ t.jsxs("div", { className: V.products, children: [
|
|
598
|
+
d && /* @__PURE__ */ t.jsx("h5", { className: V.subtitle, children: d }),
|
|
598
599
|
g ? /* @__PURE__ */ t.jsx(
|
|
599
600
|
gt,
|
|
600
601
|
{
|
|
601
602
|
sensors: z,
|
|
602
|
-
onDragEnd:
|
|
603
|
+
onDragEnd: K,
|
|
603
604
|
children: /* @__PURE__ */ t.jsx(
|
|
604
605
|
ft,
|
|
605
606
|
{
|
|
606
607
|
items: s.map((h) => h.id),
|
|
607
608
|
strategy: xt,
|
|
608
|
-
children: s.map((h,
|
|
609
|
+
children: s.map((h, C) => f(h, C))
|
|
609
610
|
}
|
|
610
611
|
)
|
|
611
612
|
}
|
|
612
|
-
) : s.map((h,
|
|
613
|
+
) : s.map((h, C) => f(h, C)),
|
|
613
614
|
P && /* @__PURE__ */ t.jsx(
|
|
614
615
|
"div",
|
|
615
616
|
{
|
|
@@ -622,34 +623,34 @@ const Tn = (r) => {
|
|
|
622
623
|
lt,
|
|
623
624
|
{
|
|
624
625
|
withoutHover: !0,
|
|
625
|
-
className:
|
|
626
|
-
[
|
|
626
|
+
className: U(V.button, {
|
|
627
|
+
[V.disabled]: !!(p && p <= s.length || s.length === (n == null ? void 0 : n.length))
|
|
627
628
|
}),
|
|
628
629
|
size: "s",
|
|
629
630
|
disabled: !!(p && p <= s.length || s.length === (n == null ? void 0 : n.length)),
|
|
630
631
|
onClick: () => {
|
|
631
632
|
const h = [...s];
|
|
632
|
-
let
|
|
633
|
+
let C = null;
|
|
633
634
|
if (n) {
|
|
634
635
|
for (let k = 0; k < n.length; k++)
|
|
635
|
-
if (!s.find((
|
|
636
|
-
|
|
636
|
+
if (!s.find((T) => T.id === n[k].id)) {
|
|
637
|
+
C = n[k];
|
|
637
638
|
break;
|
|
638
639
|
}
|
|
639
640
|
}
|
|
640
|
-
|
|
641
|
-
name:
|
|
642
|
-
id: (
|
|
641
|
+
v === "select" && n && h.push({
|
|
642
|
+
name: C ? C.name : n[0].name,
|
|
643
|
+
id: (C == null ? void 0 : C.id) || n[0].id,
|
|
643
644
|
...o
|
|
644
645
|
}), e(h);
|
|
645
646
|
},
|
|
646
647
|
style: {
|
|
647
648
|
width: "fit-content"
|
|
648
649
|
},
|
|
649
|
-
children: /* @__PURE__ */ t.jsxs("div", { className:
|
|
650
|
+
children: /* @__PURE__ */ t.jsxs("div", { className: V.addButton, children: [
|
|
650
651
|
/* @__PURE__ */ t.jsx("span", { children: "Add Option" }),
|
|
651
652
|
/* @__PURE__ */ t.jsx(
|
|
652
|
-
|
|
653
|
+
b,
|
|
653
654
|
{
|
|
654
655
|
name: "Plus",
|
|
655
656
|
width: 16,
|
|
@@ -664,10 +665,10 @@ const Tn = (r) => {
|
|
|
664
665
|
] })
|
|
665
666
|
] });
|
|
666
667
|
};
|
|
667
|
-
function
|
|
668
|
+
function Ne(r) {
|
|
668
669
|
const { product: i, children: a } = r, { attributes: s, listeners: e, setNodeRef: c, transform: d, transition: u, isDragging: g } = _t({
|
|
669
670
|
id: i.id
|
|
670
|
-
}),
|
|
671
|
+
}), x = {
|
|
671
672
|
transform: jt.Transform.toString(d),
|
|
672
673
|
transition: u
|
|
673
674
|
};
|
|
@@ -675,15 +676,15 @@ function Ie(r) {
|
|
|
675
676
|
"div",
|
|
676
677
|
{
|
|
677
678
|
ref: c,
|
|
678
|
-
style:
|
|
679
|
-
className: `${
|
|
679
|
+
style: x,
|
|
680
|
+
className: `${F.product} ${g ? F.dragging : ""}`,
|
|
680
681
|
...s,
|
|
681
682
|
...e,
|
|
682
683
|
children: a
|
|
683
684
|
}
|
|
684
685
|
);
|
|
685
686
|
}
|
|
686
|
-
const
|
|
687
|
+
const On = (r) => {
|
|
687
688
|
const {
|
|
688
689
|
isActiveItems: i,
|
|
689
690
|
setIsActiveItems: a,
|
|
@@ -693,21 +694,21 @@ const $n = (r) => {
|
|
|
693
694
|
title: d,
|
|
694
695
|
subtitle: u,
|
|
695
696
|
editable: g = !0,
|
|
696
|
-
draggable:
|
|
697
|
+
draggable: x = !1,
|
|
697
698
|
deletable: P = !0,
|
|
698
|
-
addable:
|
|
699
|
+
addable: v = !0,
|
|
699
700
|
itemsType: n,
|
|
700
701
|
itemsPlaceholder: o = "",
|
|
701
702
|
itemsOptions: p,
|
|
702
|
-
hasRangeSelector:
|
|
703
|
-
rangeSelectorOptions:
|
|
704
|
-
modalOptions:
|
|
705
|
-
addableOptions:
|
|
703
|
+
hasRangeSelector: E = !1,
|
|
704
|
+
rangeSelectorOptions: _,
|
|
705
|
+
modalOptions: j,
|
|
706
|
+
addableOptions: N = {},
|
|
706
707
|
limit: M
|
|
707
|
-
} = r, [z, R] = m.useState(null), [
|
|
708
|
+
} = r, [z, R] = m.useState(null), [K, f] = m.useState({
|
|
708
709
|
top: 0,
|
|
709
710
|
left: 0
|
|
710
|
-
}), [h,
|
|
711
|
+
}), [h, C] = m.useState(null), k = m.useRef(null), [T, I] = m.useState(!1), q = ht(
|
|
711
712
|
pt(mt, {
|
|
712
713
|
activationConstraint: {
|
|
713
714
|
distance: 5
|
|
@@ -716,47 +717,47 @@ const $n = (r) => {
|
|
|
716
717
|
);
|
|
717
718
|
m.useEffect(() => {
|
|
718
719
|
const l = () => {
|
|
719
|
-
R(null),
|
|
720
|
+
R(null), I(!1);
|
|
720
721
|
};
|
|
721
|
-
return document.body.addEventListener("click", l), R(null),
|
|
722
|
-
R(null),
|
|
722
|
+
return document.body.addEventListener("click", l), R(null), I(!1), () => {
|
|
723
|
+
R(null), I(!1), document.body.removeEventListener("click", l);
|
|
723
724
|
};
|
|
724
725
|
}, []), m.useEffect(() => {
|
|
725
726
|
if (z) {
|
|
726
|
-
const l = [...s].map((
|
|
727
|
+
const l = [...s].map((B) => B.id === z.id ? z : B);
|
|
727
728
|
e(l);
|
|
728
729
|
}
|
|
729
730
|
}, [z]), m.useEffect(() => {
|
|
730
731
|
if (k.current && h) {
|
|
731
|
-
const l = k.current.getBoundingClientRect().height,
|
|
732
|
-
let
|
|
733
|
-
|
|
734
|
-
top:
|
|
732
|
+
const l = k.current.getBoundingClientRect().height, B = window.innerHeight;
|
|
733
|
+
let S = h.top;
|
|
734
|
+
S + l > B + window.scrollY - 200 && (S = B + window.scrollY - l - 200), S < 0 && (S = 10), f({
|
|
735
|
+
top: S,
|
|
735
736
|
left: h.left
|
|
736
737
|
});
|
|
737
738
|
}
|
|
738
739
|
}, [k.current, h]);
|
|
739
|
-
const
|
|
740
|
+
const y = (l, B) => {
|
|
740
741
|
l.stopPropagation();
|
|
741
|
-
const
|
|
742
|
-
|
|
743
|
-
top:
|
|
744
|
-
left:
|
|
745
|
-
}), R(
|
|
746
|
-
},
|
|
747
|
-
const { active:
|
|
748
|
-
if (
|
|
749
|
-
const
|
|
750
|
-
if (
|
|
751
|
-
const L = [...s], [
|
|
752
|
-
L.splice(tt, 0,
|
|
742
|
+
const S = l.target.getBoundingClientRect();
|
|
743
|
+
C({
|
|
744
|
+
top: S.top + window.scrollY,
|
|
745
|
+
left: S.left - 30
|
|
746
|
+
}), R(B), I(!0);
|
|
747
|
+
}, O = (l) => {
|
|
748
|
+
const { active: B, over: S } = l;
|
|
749
|
+
if (S && B.id !== S.id) {
|
|
750
|
+
const A = s.findIndex((L) => L.id === B.id), tt = s.findIndex((L) => L.id === S.id);
|
|
751
|
+
if (A !== -1 && tt !== -1) {
|
|
752
|
+
const L = [...s], [Z] = L.splice(A, 1);
|
|
753
|
+
L.splice(tt, 0, Z), e(L);
|
|
753
754
|
}
|
|
754
755
|
}
|
|
755
|
-
},
|
|
756
|
-
var
|
|
757
|
-
const
|
|
758
|
-
|
|
759
|
-
|
|
756
|
+
}, H = (l) => {
|
|
757
|
+
var S;
|
|
758
|
+
const B = /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
759
|
+
x && /* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
|
|
760
|
+
b,
|
|
760
761
|
{
|
|
761
762
|
name: "DotsSixVertical",
|
|
762
763
|
hoverable: !0,
|
|
@@ -767,36 +768,36 @@ const $n = (r) => {
|
|
|
767
768
|
n === "select" && p && /* @__PURE__ */ t.jsx(
|
|
768
769
|
nt,
|
|
769
770
|
{
|
|
770
|
-
onChange: (
|
|
771
|
-
const L = [...s].map((
|
|
771
|
+
onChange: (A) => {
|
|
772
|
+
const L = [...s].map((Z) => Z.id === l.id ? {
|
|
772
773
|
...l,
|
|
773
774
|
name: {
|
|
774
|
-
"en-US":
|
|
775
|
+
"en-US": A
|
|
775
776
|
}
|
|
776
|
-
} :
|
|
777
|
+
} : Z);
|
|
777
778
|
R({
|
|
778
779
|
...l,
|
|
779
780
|
name: {
|
|
780
|
-
"en-US":
|
|
781
|
+
"en-US": A
|
|
781
782
|
}
|
|
782
783
|
}), e([...L]);
|
|
783
784
|
},
|
|
784
785
|
value: l.name["en-US"],
|
|
785
786
|
options: p.filter(
|
|
786
|
-
(
|
|
787
|
+
(A) => !s.find((tt) => tt.name["en-US"] === A)
|
|
787
788
|
)
|
|
788
789
|
}
|
|
789
790
|
),
|
|
790
791
|
n === "input" && /* @__PURE__ */ t.jsx(
|
|
791
792
|
Nt,
|
|
792
793
|
{
|
|
793
|
-
onChange: (
|
|
794
|
-
const L = [...s].map((
|
|
794
|
+
onChange: (A) => {
|
|
795
|
+
const L = [...s].map((Z) => Z.id === l.id ? {
|
|
795
796
|
...l,
|
|
796
797
|
name: {
|
|
797
|
-
"en-US":
|
|
798
|
+
"en-US": A
|
|
798
799
|
}
|
|
799
|
-
} :
|
|
800
|
+
} : Z);
|
|
800
801
|
e([...L]);
|
|
801
802
|
},
|
|
802
803
|
value: l.name["en-US"],
|
|
@@ -806,59 +807,59 @@ const $n = (r) => {
|
|
|
806
807
|
n === "image" && /* @__PURE__ */ t.jsx(
|
|
807
808
|
qt,
|
|
808
809
|
{
|
|
809
|
-
onChange: (
|
|
810
|
-
const L = [...s].map((
|
|
810
|
+
onChange: (A) => {
|
|
811
|
+
const L = [...s].map((Z) => Z.id === l.id ? {
|
|
811
812
|
...l,
|
|
812
|
-
images:
|
|
813
|
-
} :
|
|
813
|
+
images: A
|
|
814
|
+
} : Z);
|
|
814
815
|
e([...L]);
|
|
815
816
|
},
|
|
816
|
-
activeImage: (
|
|
817
|
+
activeImage: (S = s.find((A) => A.id === l.id)) == null ? void 0 : S.images[0]
|
|
817
818
|
}
|
|
818
819
|
),
|
|
819
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
820
|
-
g && /* @__PURE__ */ t.jsx("div", { className:
|
|
821
|
-
|
|
820
|
+
/* @__PURE__ */ t.jsxs("div", { className: F.buttons, children: [
|
|
821
|
+
g && /* @__PURE__ */ t.jsx("div", { className: F.deleteButton, children: /* @__PURE__ */ t.jsx(
|
|
822
|
+
b,
|
|
822
823
|
{
|
|
823
824
|
name: "Sliders",
|
|
824
825
|
hoverable: !0,
|
|
825
826
|
width: 20,
|
|
826
827
|
height: 20,
|
|
827
|
-
onClick: (
|
|
828
|
+
onClick: (A) => y(A, l)
|
|
828
829
|
}
|
|
829
830
|
) }),
|
|
830
|
-
P && /* @__PURE__ */ t.jsx("div", { className:
|
|
831
|
-
|
|
831
|
+
P && /* @__PURE__ */ t.jsx("div", { className: F.deleteButton, children: /* @__PURE__ */ t.jsx(
|
|
832
|
+
b,
|
|
832
833
|
{
|
|
833
834
|
name: "Trash",
|
|
834
835
|
hoverable: !0,
|
|
835
836
|
width: 20,
|
|
836
837
|
height: 20,
|
|
837
838
|
fill: "#C12A2A",
|
|
838
|
-
onClick: () => e(s.filter((
|
|
839
|
+
onClick: () => e(s.filter((A) => A.id !== l.id))
|
|
839
840
|
}
|
|
840
841
|
) })
|
|
841
842
|
] })
|
|
842
843
|
] });
|
|
843
|
-
return
|
|
844
|
-
|
|
844
|
+
return x ? /* @__PURE__ */ t.jsx(
|
|
845
|
+
Ne,
|
|
845
846
|
{
|
|
846
847
|
product: l,
|
|
847
|
-
children:
|
|
848
|
+
children: B
|
|
848
849
|
},
|
|
849
850
|
l.id
|
|
850
851
|
) : /* @__PURE__ */ t.jsx(
|
|
851
852
|
"div",
|
|
852
853
|
{
|
|
853
|
-
className:
|
|
854
|
-
children:
|
|
854
|
+
className: F.product,
|
|
855
|
+
children: B
|
|
855
856
|
},
|
|
856
857
|
l.id
|
|
857
858
|
);
|
|
858
859
|
};
|
|
859
|
-
return /* @__PURE__ */ t.jsxs("div", { className:
|
|
860
|
-
(d || i !== void 0) && /* @__PURE__ */ t.jsxs("div", { className:
|
|
861
|
-
d && /* @__PURE__ */ t.jsx("h3", { className:
|
|
860
|
+
return /* @__PURE__ */ t.jsxs("div", { className: F.productsBlock, children: [
|
|
861
|
+
(d || i !== void 0) && /* @__PURE__ */ t.jsxs("div", { className: F.top, children: [
|
|
862
|
+
d && /* @__PURE__ */ t.jsx("h3", { className: F.title, children: d }),
|
|
862
863
|
i !== void 0 && /* @__PURE__ */ t.jsx(
|
|
863
864
|
rt,
|
|
864
865
|
{
|
|
@@ -867,36 +868,36 @@ const $n = (r) => {
|
|
|
867
868
|
}
|
|
868
869
|
)
|
|
869
870
|
] }),
|
|
870
|
-
z && g &&
|
|
871
|
-
|
|
871
|
+
z && g && j && T && /* @__PURE__ */ t.jsx(
|
|
872
|
+
Tt,
|
|
872
873
|
{
|
|
873
874
|
ref: k,
|
|
874
875
|
activeItem: z,
|
|
875
876
|
setActiveItem: R,
|
|
876
|
-
popupPosition:
|
|
877
|
-
modalOptions:
|
|
878
|
-
setIsOpenModal:
|
|
877
|
+
popupPosition: K,
|
|
878
|
+
modalOptions: j,
|
|
879
|
+
setIsOpenModal: I
|
|
879
880
|
}
|
|
880
881
|
),
|
|
881
|
-
|
|
882
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
883
|
-
u && /* @__PURE__ */ t.jsx("h5", { className:
|
|
884
|
-
|
|
882
|
+
E && _ && /* @__PURE__ */ t.jsx(kt, { ..._ }),
|
|
883
|
+
/* @__PURE__ */ t.jsxs("div", { className: F.products, children: [
|
|
884
|
+
u && /* @__PURE__ */ t.jsx("h5", { className: F.subtitle, children: u }),
|
|
885
|
+
x ? /* @__PURE__ */ t.jsx(
|
|
885
886
|
gt,
|
|
886
887
|
{
|
|
887
|
-
sensors:
|
|
888
|
-
onDragEnd:
|
|
888
|
+
sensors: q,
|
|
889
|
+
onDragEnd: O,
|
|
889
890
|
children: /* @__PURE__ */ t.jsx(
|
|
890
891
|
ft,
|
|
891
892
|
{
|
|
892
893
|
items: s.map((l) => l.id),
|
|
893
894
|
strategy: xt,
|
|
894
|
-
children: s.map((l) =>
|
|
895
|
+
children: s.map((l) => H(l))
|
|
895
896
|
}
|
|
896
897
|
)
|
|
897
898
|
}
|
|
898
|
-
) : s.map((l) =>
|
|
899
|
-
|
|
899
|
+
) : s.map((l) => H(l)),
|
|
900
|
+
v && /* @__PURE__ */ t.jsx(
|
|
900
901
|
"div",
|
|
901
902
|
{
|
|
902
903
|
style: {
|
|
@@ -908,52 +909,52 @@ const $n = (r) => {
|
|
|
908
909
|
lt,
|
|
909
910
|
{
|
|
910
911
|
withoutHover: !0,
|
|
911
|
-
className: F
|
|
912
|
-
[
|
|
912
|
+
className: U(F.button, {
|
|
913
|
+
[F.disabled]: !!(M && M <= s.length)
|
|
913
914
|
}),
|
|
914
915
|
size: "s",
|
|
915
916
|
disabled: !!(M && M <= s.length),
|
|
916
917
|
onClick: () => {
|
|
917
918
|
const l = [...s];
|
|
918
|
-
let
|
|
919
|
+
let B = null;
|
|
919
920
|
if (p) {
|
|
920
|
-
for (let
|
|
921
|
-
if (!s.find((
|
|
922
|
-
|
|
921
|
+
for (let S = 0; S < p.length; S++)
|
|
922
|
+
if (!s.find((A) => A.name["en-US"] === p[S])) {
|
|
923
|
+
B = p[S];
|
|
923
924
|
break;
|
|
924
925
|
}
|
|
925
926
|
}
|
|
926
927
|
n === "select" && p ? l.push({
|
|
927
928
|
name: {
|
|
928
|
-
"en-US":
|
|
929
|
+
"en-US": B || p[0]
|
|
929
930
|
},
|
|
930
|
-
id:
|
|
931
|
-
...
|
|
931
|
+
id: J(),
|
|
932
|
+
...N,
|
|
932
933
|
maxSymbols: 100
|
|
933
934
|
// пример значения
|
|
934
935
|
}) : n === "input" ? l.push({
|
|
935
936
|
name: {
|
|
936
937
|
"en-US": ""
|
|
937
938
|
},
|
|
938
|
-
id:
|
|
939
|
-
...
|
|
939
|
+
id: J(),
|
|
940
|
+
...N,
|
|
940
941
|
maxSymbols: 100
|
|
941
942
|
}) : l.push({
|
|
942
943
|
name: {
|
|
943
944
|
"en-US": `Image ${s.length + 1}`
|
|
944
945
|
},
|
|
945
|
-
id:
|
|
946
|
-
...
|
|
946
|
+
id: J(),
|
|
947
|
+
...N,
|
|
947
948
|
maxSymbols: 100
|
|
948
949
|
}), e(l);
|
|
949
950
|
},
|
|
950
951
|
style: {
|
|
951
952
|
width: "fit-content"
|
|
952
953
|
},
|
|
953
|
-
children: /* @__PURE__ */ t.jsxs("div", { className:
|
|
954
|
+
children: /* @__PURE__ */ t.jsxs("div", { className: F.addButton, children: [
|
|
954
955
|
/* @__PURE__ */ t.jsx("span", { children: "Add Option" }),
|
|
955
956
|
/* @__PURE__ */ t.jsx(
|
|
956
|
-
|
|
957
|
+
b,
|
|
957
958
|
{
|
|
958
959
|
name: "Plus",
|
|
959
960
|
width: 16,
|
|
@@ -974,52 +975,52 @@ const $n = (r) => {
|
|
|
974
975
|
}
|
|
975
976
|
)
|
|
976
977
|
] });
|
|
977
|
-
},
|
|
978
|
-
subtitle:
|
|
979
|
-
products:
|
|
980
|
-
product:
|
|
981
|
-
button:
|
|
982
|
-
buttons:
|
|
983
|
-
addButton:
|
|
984
|
-
deleteButton:
|
|
978
|
+
}, Ce = "_subtitle_jql1y_1", Se = "_products_jql1y_10", ke = "_product_jql1y_10", we = "_button_jql1y_11", Pe = "_buttons_jql1y_11", Me = "_addButton_jql1y_150", $e = "_deleteButton_jql1y_165", et = {
|
|
979
|
+
subtitle: Ce,
|
|
980
|
+
products: Se,
|
|
981
|
+
product: ke,
|
|
982
|
+
button: we,
|
|
983
|
+
buttons: Pe,
|
|
984
|
+
addButton: Me,
|
|
985
|
+
deleteButton: $e
|
|
985
986
|
}, Be = (r) => {
|
|
986
|
-
const { buttons: i, setButtons: a, deletable: s = !0, addable: e = !0, editableLink: c = !0 } = r, { pages: d } = vt(), [u, g] = m.useState(null), [
|
|
987
|
+
const { buttons: i, setButtons: a, deletable: s = !0, addable: e = !0, editableLink: c = !0 } = r, { pages: d } = vt(), [u, g] = m.useState(null), [x, P] = m.useState({
|
|
987
988
|
top: 0,
|
|
988
989
|
left: 0
|
|
989
|
-
}), [
|
|
990
|
+
}), [v, n] = m.useState(null), o = m.useRef(null);
|
|
990
991
|
m.useEffect(() => {
|
|
991
992
|
if (u) {
|
|
992
|
-
const
|
|
993
|
-
a(
|
|
993
|
+
const _ = [...i].map((j) => j.id === u.id ? u : j);
|
|
994
|
+
a(_);
|
|
994
995
|
}
|
|
995
996
|
}, [u]), m.useEffect(() => {
|
|
996
|
-
if (o.current &&
|
|
997
|
-
const
|
|
998
|
-
let
|
|
999
|
-
|
|
1000
|
-
top:
|
|
1001
|
-
left:
|
|
997
|
+
if (o.current && v) {
|
|
998
|
+
const _ = o.current.getBoundingClientRect().height, j = window.innerHeight;
|
|
999
|
+
let N = v.top;
|
|
1000
|
+
N + _ > j + window.scrollY - 200 && (N = j + window.scrollY - _ - 200), N < 0 && (N = 10), P({
|
|
1001
|
+
top: N,
|
|
1002
|
+
left: v.left
|
|
1002
1003
|
});
|
|
1003
1004
|
}
|
|
1004
|
-
}, [o.current,
|
|
1005
|
-
const p = (
|
|
1006
|
-
|
|
1007
|
-
const
|
|
1005
|
+
}, [o.current, v]);
|
|
1006
|
+
const p = (_, j) => {
|
|
1007
|
+
_.stopPropagation();
|
|
1008
|
+
const N = _.target.getBoundingClientRect();
|
|
1008
1009
|
n({
|
|
1009
|
-
top:
|
|
1010
|
-
left:
|
|
1011
|
-
}), g(
|
|
1012
|
-
},
|
|
1013
|
-
const
|
|
1014
|
-
...
|
|
1010
|
+
top: N.top + window.scrollY - 70,
|
|
1011
|
+
left: N.left - (e ? 30 : 65)
|
|
1012
|
+
}), g(j);
|
|
1013
|
+
}, E = (_, j) => {
|
|
1014
|
+
const N = [...i], M = {
|
|
1015
|
+
..._,
|
|
1015
1016
|
id: Math.random().toString(36).substr(2, 9)
|
|
1016
1017
|
// Генерируем новый уникальный ID
|
|
1017
1018
|
};
|
|
1018
|
-
|
|
1019
|
+
N.splice(j + 1, 0, M), a(N);
|
|
1019
1020
|
};
|
|
1020
1021
|
return /* @__PURE__ */ t.jsxs("div", { className: et.products, children: [
|
|
1021
1022
|
/* @__PURE__ */ t.jsx("h5", { className: et.subtitle, children: "Button Type" }),
|
|
1022
|
-
i.map((
|
|
1023
|
+
i.map((_, j) => /* @__PURE__ */ t.jsxs(
|
|
1023
1024
|
"div",
|
|
1024
1025
|
{
|
|
1025
1026
|
className: et.product,
|
|
@@ -1027,50 +1028,50 @@ const $n = (r) => {
|
|
|
1027
1028
|
/* @__PURE__ */ t.jsx(
|
|
1028
1029
|
nt,
|
|
1029
1030
|
{
|
|
1030
|
-
onChange: (
|
|
1031
|
-
const z = [...i].map((R) => R.id ===
|
|
1032
|
-
...
|
|
1033
|
-
type:
|
|
1031
|
+
onChange: (N) => {
|
|
1032
|
+
const z = [...i].map((R) => R.id === _.id ? {
|
|
1033
|
+
..._,
|
|
1034
|
+
type: N
|
|
1034
1035
|
} : R);
|
|
1035
1036
|
a(z);
|
|
1036
1037
|
},
|
|
1037
|
-
value:
|
|
1038
|
+
value: _.type,
|
|
1038
1039
|
options: ["Primary", "Secondary", "Tertiary"]
|
|
1039
1040
|
}
|
|
1040
1041
|
),
|
|
1041
1042
|
/* @__PURE__ */ t.jsxs("div", { className: et.buttons, children: [
|
|
1042
1043
|
/* @__PURE__ */ t.jsx("div", { className: et.deleteButton, children: /* @__PURE__ */ t.jsx(
|
|
1043
|
-
|
|
1044
|
+
b,
|
|
1044
1045
|
{
|
|
1045
1046
|
name: "Copy",
|
|
1046
1047
|
hoverable: !0,
|
|
1047
1048
|
width: 20,
|
|
1048
1049
|
height: 20,
|
|
1049
1050
|
onClick: () => {
|
|
1050
|
-
|
|
1051
|
+
E(_, j);
|
|
1051
1052
|
}
|
|
1052
1053
|
}
|
|
1053
1054
|
) }),
|
|
1054
1055
|
/* @__PURE__ */ t.jsx("div", { className: et.deleteButton, children: /* @__PURE__ */ t.jsx(
|
|
1055
|
-
|
|
1056
|
+
b,
|
|
1056
1057
|
{
|
|
1057
1058
|
name: "Sliders",
|
|
1058
1059
|
hoverable: !0,
|
|
1059
1060
|
width: 20,
|
|
1060
1061
|
height: 20,
|
|
1061
|
-
onClick: (
|
|
1062
|
-
p(
|
|
1062
|
+
onClick: (N) => {
|
|
1063
|
+
p(N, _);
|
|
1063
1064
|
}
|
|
1064
1065
|
}
|
|
1065
1066
|
) }),
|
|
1066
1067
|
s && /* @__PURE__ */ t.jsx("div", { className: et.deleteButton, children: /* @__PURE__ */ t.jsx(
|
|
1067
|
-
|
|
1068
|
+
b,
|
|
1068
1069
|
{
|
|
1069
1070
|
name: "Trash",
|
|
1070
1071
|
hoverable: !0,
|
|
1071
1072
|
onClick: () => {
|
|
1072
|
-
const
|
|
1073
|
-
a(
|
|
1073
|
+
const N = i.filter((M) => M.id !== _.id);
|
|
1074
|
+
a(N);
|
|
1074
1075
|
},
|
|
1075
1076
|
width: 20,
|
|
1076
1077
|
height: 20,
|
|
@@ -1080,7 +1081,7 @@ const $n = (r) => {
|
|
|
1080
1081
|
] })
|
|
1081
1082
|
]
|
|
1082
1083
|
},
|
|
1083
|
-
|
|
1084
|
+
_.id
|
|
1084
1085
|
)),
|
|
1085
1086
|
u && /* @__PURE__ */ t.jsx(
|
|
1086
1087
|
Ot,
|
|
@@ -1088,7 +1089,7 @@ const $n = (r) => {
|
|
|
1088
1089
|
ref: o,
|
|
1089
1090
|
activeButton: u,
|
|
1090
1091
|
setActiveButton: g,
|
|
1091
|
-
popupPosition:
|
|
1092
|
+
popupPosition: x,
|
|
1092
1093
|
editableLink: c
|
|
1093
1094
|
}
|
|
1094
1095
|
),
|
|
@@ -1107,10 +1108,10 @@ const $n = (r) => {
|
|
|
1107
1108
|
className: et.button,
|
|
1108
1109
|
size: "s",
|
|
1109
1110
|
onClick: () => {
|
|
1110
|
-
const
|
|
1111
|
-
c ?
|
|
1111
|
+
const _ = [...i];
|
|
1112
|
+
c ? _.push({
|
|
1112
1113
|
type: "Primary",
|
|
1113
|
-
id:
|
|
1114
|
+
id: J(),
|
|
1114
1115
|
typesText: [],
|
|
1115
1116
|
text: {
|
|
1116
1117
|
"en-US": "Button Name"
|
|
@@ -1118,9 +1119,9 @@ const $n = (r) => {
|
|
|
1118
1119
|
destination: "Go to Page",
|
|
1119
1120
|
page: d ? Object.values(d)[0].path : "/",
|
|
1120
1121
|
openInNewTab: !1
|
|
1121
|
-
}) :
|
|
1122
|
+
}) : _.push({
|
|
1122
1123
|
type: "Primary",
|
|
1123
|
-
id:
|
|
1124
|
+
id: J(),
|
|
1124
1125
|
typesText: [],
|
|
1125
1126
|
text: {
|
|
1126
1127
|
"en-US": "Create Ticket"
|
|
@@ -1128,7 +1129,7 @@ const $n = (r) => {
|
|
|
1128
1129
|
destination: "Go to Page",
|
|
1129
1130
|
page: d ? Object.values(d)[0].path : "/",
|
|
1130
1131
|
openInNewTab: !1
|
|
1131
|
-
}), a(
|
|
1132
|
+
}), a(_);
|
|
1132
1133
|
},
|
|
1133
1134
|
style: {
|
|
1134
1135
|
width: "fit-content"
|
|
@@ -1136,7 +1137,7 @@ const $n = (r) => {
|
|
|
1136
1137
|
children: /* @__PURE__ */ t.jsxs("div", { className: et.addButton, children: [
|
|
1137
1138
|
/* @__PURE__ */ t.jsx("span", { children: "Add Option" }),
|
|
1138
1139
|
/* @__PURE__ */ t.jsx(
|
|
1139
|
-
|
|
1140
|
+
b,
|
|
1140
1141
|
{
|
|
1141
1142
|
name: "Plus",
|
|
1142
1143
|
width: 16,
|
|
@@ -1149,7 +1150,7 @@ const $n = (r) => {
|
|
|
1149
1150
|
}
|
|
1150
1151
|
)
|
|
1151
1152
|
] });
|
|
1152
|
-
},
|
|
1153
|
+
}, An = (r) => {
|
|
1153
1154
|
const {
|
|
1154
1155
|
isActiveButtons: i,
|
|
1155
1156
|
setIsActiveButtons: a,
|
|
@@ -1185,7 +1186,7 @@ const $n = (r) => {
|
|
|
1185
1186
|
function Te(r) {
|
|
1186
1187
|
const { product: i, children: a } = r, { attributes: s, listeners: e, setNodeRef: c, transform: d, transition: u, isDragging: g } = _t({
|
|
1187
1188
|
id: String(i.listingId)
|
|
1188
|
-
}),
|
|
1189
|
+
}), x = {
|
|
1189
1190
|
transform: jt.Transform.toString(d),
|
|
1190
1191
|
transition: u
|
|
1191
1192
|
};
|
|
@@ -1193,15 +1194,15 @@ function Te(r) {
|
|
|
1193
1194
|
"div",
|
|
1194
1195
|
{
|
|
1195
1196
|
ref: c,
|
|
1196
|
-
style:
|
|
1197
|
-
className: `${
|
|
1197
|
+
style: x,
|
|
1198
|
+
className: `${W.product} ${g ? W.dragging : ""}`,
|
|
1198
1199
|
...s,
|
|
1199
1200
|
...e,
|
|
1200
1201
|
children: a
|
|
1201
1202
|
}
|
|
1202
1203
|
);
|
|
1203
1204
|
}
|
|
1204
|
-
const
|
|
1205
|
+
const En = (r) => {
|
|
1205
1206
|
const {
|
|
1206
1207
|
isActiveItems: i,
|
|
1207
1208
|
setIsActiveItems: a,
|
|
@@ -1211,21 +1212,21 @@ const On = (r) => {
|
|
|
1211
1212
|
title: d,
|
|
1212
1213
|
subtitle: u,
|
|
1213
1214
|
editable: g = !0,
|
|
1214
|
-
draggable:
|
|
1215
|
+
draggable: x = !1,
|
|
1215
1216
|
withImage: P = !1,
|
|
1216
|
-
deletable:
|
|
1217
|
+
deletable: v = !0,
|
|
1217
1218
|
addable: n = !0,
|
|
1218
1219
|
itemsType: o,
|
|
1219
1220
|
itemsOptions: p,
|
|
1220
|
-
limit:
|
|
1221
|
-
aspectRatio:
|
|
1222
|
-
setAspectRatio:
|
|
1223
|
-
} = r, [
|
|
1221
|
+
limit: E,
|
|
1222
|
+
aspectRatio: _,
|
|
1223
|
+
setAspectRatio: j
|
|
1224
|
+
} = r, [N, M] = m.useState(
|
|
1224
1225
|
null
|
|
1225
1226
|
), [z, R] = m.useState({
|
|
1226
1227
|
top: 0,
|
|
1227
1228
|
left: 0
|
|
1228
|
-
}), [
|
|
1229
|
+
}), [K, f] = m.useState(!1), h = ht(
|
|
1229
1230
|
pt(mt, {
|
|
1230
1231
|
activationConstraint: {
|
|
1231
1232
|
distance: 5
|
|
@@ -1233,39 +1234,39 @@ const On = (r) => {
|
|
|
1233
1234
|
})
|
|
1234
1235
|
);
|
|
1235
1236
|
m.useEffect(() => {
|
|
1236
|
-
const
|
|
1237
|
-
M(null),
|
|
1237
|
+
const y = () => {
|
|
1238
|
+
M(null), f(!1);
|
|
1238
1239
|
};
|
|
1239
|
-
return document.body.addEventListener("click",
|
|
1240
|
-
M(null),
|
|
1240
|
+
return document.body.addEventListener("click", y), M(null), f(!1), () => {
|
|
1241
|
+
M(null), f(!1), document.body.removeEventListener("click", y);
|
|
1241
1242
|
};
|
|
1242
1243
|
}, []), m.useEffect(() => {
|
|
1243
|
-
if (
|
|
1244
|
-
const
|
|
1245
|
-
e(
|
|
1244
|
+
if (N) {
|
|
1245
|
+
const y = [...s].map((O) => O.listingId === N.listingId ? N : O);
|
|
1246
|
+
e(y);
|
|
1246
1247
|
}
|
|
1247
|
-
}, [
|
|
1248
|
-
const
|
|
1249
|
-
|
|
1250
|
-
const
|
|
1251
|
-
let
|
|
1252
|
-
|
|
1253
|
-
top:
|
|
1254
|
-
left:
|
|
1255
|
-
}), M(
|
|
1248
|
+
}, [N]);
|
|
1249
|
+
const C = (y, O) => {
|
|
1250
|
+
y.stopPropagation();
|
|
1251
|
+
const H = y.target.getBoundingClientRect(), l = 100, B = window.innerHeight;
|
|
1252
|
+
let S = H.top + window.scrollY;
|
|
1253
|
+
S + l > B && (S = B - l - 20), f(!0), R({
|
|
1254
|
+
top: S - 80,
|
|
1255
|
+
left: H.left - 30
|
|
1256
|
+
}), M(O);
|
|
1256
1257
|
};
|
|
1257
|
-
function k(
|
|
1258
|
+
function k(y) {
|
|
1258
1259
|
if (P)
|
|
1259
|
-
return
|
|
1260
|
+
return y ? /* @__PURE__ */ t.jsx(
|
|
1260
1261
|
"img",
|
|
1261
1262
|
{
|
|
1262
|
-
src: `https://imagedelivery.net/${
|
|
1263
|
+
src: `https://imagedelivery.net/${y}/w=1000`,
|
|
1263
1264
|
alt: "image",
|
|
1264
1265
|
width: 16,
|
|
1265
1266
|
height: 16
|
|
1266
1267
|
}
|
|
1267
1268
|
) : /* @__PURE__ */ t.jsx(
|
|
1268
|
-
|
|
1269
|
+
b,
|
|
1269
1270
|
{
|
|
1270
1271
|
name: "Image",
|
|
1271
1272
|
width: 16,
|
|
@@ -1274,21 +1275,21 @@ const On = (r) => {
|
|
|
1274
1275
|
}
|
|
1275
1276
|
);
|
|
1276
1277
|
}
|
|
1277
|
-
const
|
|
1278
|
-
const { active:
|
|
1279
|
-
if (
|
|
1280
|
-
const l = s.findIndex((
|
|
1281
|
-
if (l !== -1 &&
|
|
1282
|
-
const
|
|
1283
|
-
|
|
1278
|
+
const T = (y) => {
|
|
1279
|
+
const { active: O, over: H } = y;
|
|
1280
|
+
if (H && O.id !== H.id) {
|
|
1281
|
+
const l = s.findIndex((S) => String(S.listingId) === O.id), B = s.findIndex((S) => String(S.listingId) === H.id);
|
|
1282
|
+
if (l !== -1 && B !== -1) {
|
|
1283
|
+
const S = [...s], [A] = S.splice(l, 1);
|
|
1284
|
+
S.splice(B, 0, A), e(S);
|
|
1284
1285
|
}
|
|
1285
1286
|
}
|
|
1286
|
-
},
|
|
1287
|
-
const
|
|
1288
|
-
if (!
|
|
1289
|
-
const
|
|
1290
|
-
|
|
1291
|
-
|
|
1287
|
+
}, I = (y) => {
|
|
1288
|
+
const O = p.find((l) => y.listingId === l.id);
|
|
1289
|
+
if (!O) return null;
|
|
1290
|
+
const H = /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
1291
|
+
x && /* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
|
|
1292
|
+
b,
|
|
1292
1293
|
{
|
|
1293
1294
|
name: "DotsSixVertical",
|
|
1294
1295
|
hoverable: !0,
|
|
@@ -1300,106 +1301,106 @@ const On = (r) => {
|
|
|
1300
1301
|
nt,
|
|
1301
1302
|
{
|
|
1302
1303
|
onChange: (l) => {
|
|
1303
|
-
const
|
|
1304
|
-
if (!
|
|
1305
|
-
const
|
|
1306
|
-
listingId:
|
|
1307
|
-
image:
|
|
1308
|
-
}, tt =
|
|
1309
|
-
M(
|
|
1304
|
+
const B = [...s], S = p.find((L) => L.productData.name === l);
|
|
1305
|
+
if (!S) return;
|
|
1306
|
+
const A = {
|
|
1307
|
+
listingId: S.id,
|
|
1308
|
+
image: S.productData.images.length > 0 ? S.productData.images[0].cfId : ""
|
|
1309
|
+
}, tt = B.map((L) => L.listingId === y.listingId ? A : L);
|
|
1310
|
+
M(A), e([...tt]);
|
|
1310
1311
|
},
|
|
1311
|
-
value:
|
|
1312
|
+
value: O.productData.name,
|
|
1312
1313
|
options: [
|
|
1313
|
-
...p.filter((l) => !s.find((
|
|
1314
|
+
...p.filter((l) => !s.find((B) => B.listingId === l.id)).map((l) => l.productData.name)
|
|
1314
1315
|
],
|
|
1315
1316
|
leftAddonOptions: p.map((l) => {
|
|
1316
|
-
var
|
|
1317
|
+
var B;
|
|
1317
1318
|
return {
|
|
1318
1319
|
value: l.productData.name,
|
|
1319
|
-
addon: k(((
|
|
1320
|
+
addon: k(((B = l.productData.images[0]) == null ? void 0 : B.cfId) || "")
|
|
1320
1321
|
};
|
|
1321
1322
|
})
|
|
1322
1323
|
}
|
|
1323
1324
|
),
|
|
1324
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
1325
|
-
g && /* @__PURE__ */ t.jsx("div", { className:
|
|
1326
|
-
|
|
1325
|
+
/* @__PURE__ */ t.jsxs("div", { className: W.buttons, children: [
|
|
1326
|
+
g && /* @__PURE__ */ t.jsx("div", { className: W.deleteButton, children: /* @__PURE__ */ t.jsx(
|
|
1327
|
+
b,
|
|
1327
1328
|
{
|
|
1328
1329
|
name: "Sliders",
|
|
1329
1330
|
hoverable: !0,
|
|
1330
1331
|
width: 20,
|
|
1331
1332
|
height: 20,
|
|
1332
|
-
onClick: (l) =>
|
|
1333
|
+
onClick: (l) => C(l, y)
|
|
1333
1334
|
}
|
|
1334
1335
|
) }),
|
|
1335
|
-
|
|
1336
|
-
|
|
1336
|
+
v && /* @__PURE__ */ t.jsx("div", { className: W.deleteButton, children: /* @__PURE__ */ t.jsx(
|
|
1337
|
+
b,
|
|
1337
1338
|
{
|
|
1338
1339
|
name: "Trash",
|
|
1339
1340
|
hoverable: !0,
|
|
1340
1341
|
width: 20,
|
|
1341
1342
|
height: 20,
|
|
1342
1343
|
fill: "#C12A2A",
|
|
1343
|
-
onClick: () => e(s.filter((l) => l !==
|
|
1344
|
+
onClick: () => e(s.filter((l) => l !== y))
|
|
1344
1345
|
}
|
|
1345
1346
|
) })
|
|
1346
1347
|
] })
|
|
1347
1348
|
] });
|
|
1348
|
-
return
|
|
1349
|
+
return x ? /* @__PURE__ */ t.jsx(
|
|
1349
1350
|
Te,
|
|
1350
1351
|
{
|
|
1351
|
-
product:
|
|
1352
|
-
children:
|
|
1352
|
+
product: y,
|
|
1353
|
+
children: H
|
|
1353
1354
|
},
|
|
1354
|
-
|
|
1355
|
+
y.listingId
|
|
1355
1356
|
) : /* @__PURE__ */ t.jsx(
|
|
1356
1357
|
"div",
|
|
1357
1358
|
{
|
|
1358
|
-
className:
|
|
1359
|
-
children:
|
|
1359
|
+
className: W.product,
|
|
1360
|
+
children: H
|
|
1360
1361
|
},
|
|
1361
|
-
|
|
1362
|
+
y.listingId
|
|
1362
1363
|
);
|
|
1363
|
-
},
|
|
1364
|
-
return /* @__PURE__ */ t.jsxs("div", { className:
|
|
1365
|
-
(d || i !== void 0) && /* @__PURE__ */ t.jsxs("div", { className:
|
|
1366
|
-
d && /* @__PURE__ */ t.jsx("h3", { className:
|
|
1364
|
+
}, q = m.useRef(null);
|
|
1365
|
+
return /* @__PURE__ */ t.jsxs("div", { className: W.productsBlock, children: [
|
|
1366
|
+
(d || i !== void 0) && /* @__PURE__ */ t.jsxs("div", { className: W.top, children: [
|
|
1367
|
+
d && /* @__PURE__ */ t.jsx("h3", { className: W.title, children: d }),
|
|
1367
1368
|
i !== void 0 && /* @__PURE__ */ t.jsx(
|
|
1368
1369
|
rt,
|
|
1369
1370
|
{
|
|
1370
1371
|
current: i,
|
|
1371
|
-
onChange: (
|
|
1372
|
+
onChange: (y) => a == null ? void 0 : a(y)
|
|
1372
1373
|
}
|
|
1373
1374
|
)
|
|
1374
1375
|
] }),
|
|
1375
|
-
|
|
1376
|
+
K && N && /* @__PURE__ */ t.jsx(
|
|
1376
1377
|
At,
|
|
1377
1378
|
{
|
|
1378
|
-
ref:
|
|
1379
|
-
activeItem:
|
|
1379
|
+
ref: q,
|
|
1380
|
+
activeItem: N,
|
|
1380
1381
|
setActiveItem: M,
|
|
1381
|
-
setIsOpenModal:
|
|
1382
|
+
setIsOpenModal: f,
|
|
1382
1383
|
popupPosition: z,
|
|
1383
1384
|
itemsOptions: p
|
|
1384
1385
|
}
|
|
1385
1386
|
),
|
|
1386
|
-
i && /* @__PURE__ */ t.jsxs("div", { className:
|
|
1387
|
-
u && /* @__PURE__ */ t.jsx("h5", { className:
|
|
1388
|
-
|
|
1387
|
+
i && /* @__PURE__ */ t.jsxs("div", { className: W.products, children: [
|
|
1388
|
+
u && /* @__PURE__ */ t.jsx("h5", { className: W.subtitle, children: u }),
|
|
1389
|
+
x ? /* @__PURE__ */ t.jsx(
|
|
1389
1390
|
gt,
|
|
1390
1391
|
{
|
|
1391
1392
|
sensors: h,
|
|
1392
|
-
onDragEnd:
|
|
1393
|
+
onDragEnd: T,
|
|
1393
1394
|
children: /* @__PURE__ */ t.jsx(
|
|
1394
1395
|
ft,
|
|
1395
1396
|
{
|
|
1396
|
-
items: s.map((
|
|
1397
|
+
items: s.map((y) => String(y.listingId)),
|
|
1397
1398
|
strategy: xt,
|
|
1398
|
-
children: s.map((
|
|
1399
|
+
children: s.map((y) => I(y))
|
|
1399
1400
|
}
|
|
1400
1401
|
)
|
|
1401
1402
|
}
|
|
1402
|
-
) : s.map((
|
|
1403
|
+
) : s.map((y) => I(y)),
|
|
1403
1404
|
n && /* @__PURE__ */ t.jsx(
|
|
1404
1405
|
"div",
|
|
1405
1406
|
{
|
|
@@ -1412,28 +1413,28 @@ const On = (r) => {
|
|
|
1412
1413
|
lt,
|
|
1413
1414
|
{
|
|
1414
1415
|
withoutHover: !0,
|
|
1415
|
-
className:
|
|
1416
|
+
className: W.button,
|
|
1416
1417
|
size: "s",
|
|
1417
1418
|
onClick: () => {
|
|
1418
|
-
const
|
|
1419
|
-
for (let
|
|
1420
|
-
if (!s.find((
|
|
1421
|
-
|
|
1422
|
-
listingId: p[
|
|
1423
|
-
image: p[
|
|
1419
|
+
const y = [...s];
|
|
1420
|
+
for (let O = 0; O < p.length; O++)
|
|
1421
|
+
if (!s.find((H) => H.listingId === p[O].id)) {
|
|
1422
|
+
y.push({
|
|
1423
|
+
listingId: p[O].id,
|
|
1424
|
+
image: p[O].productData.images.length > 0 ? p[O].productData.images[0].cfId : ""
|
|
1424
1425
|
});
|
|
1425
1426
|
break;
|
|
1426
1427
|
}
|
|
1427
|
-
e(
|
|
1428
|
+
e(y);
|
|
1428
1429
|
},
|
|
1429
|
-
disabled: s.length === (
|
|
1430
|
+
disabled: s.length === (E || p.length),
|
|
1430
1431
|
style: {
|
|
1431
1432
|
width: "fit-content"
|
|
1432
1433
|
},
|
|
1433
|
-
children: /* @__PURE__ */ t.jsxs("div", { className:
|
|
1434
|
+
children: /* @__PURE__ */ t.jsxs("div", { className: W.addButton, children: [
|
|
1434
1435
|
/* @__PURE__ */ t.jsx("span", { children: "Add Option" }),
|
|
1435
1436
|
/* @__PURE__ */ t.jsx(
|
|
1436
|
-
|
|
1437
|
+
b,
|
|
1437
1438
|
{
|
|
1438
1439
|
name: "Plus",
|
|
1439
1440
|
width: 16,
|
|
@@ -1446,12 +1447,12 @@ const On = (r) => {
|
|
|
1446
1447
|
}
|
|
1447
1448
|
)
|
|
1448
1449
|
] }),
|
|
1449
|
-
|
|
1450
|
+
_ && j && /* @__PURE__ */ t.jsx(
|
|
1450
1451
|
nt,
|
|
1451
1452
|
{
|
|
1452
|
-
value:
|
|
1453
|
+
value: _,
|
|
1453
1454
|
options: Object.keys(Pt),
|
|
1454
|
-
onChange: (
|
|
1455
|
+
onChange: (y) => j(y),
|
|
1455
1456
|
leftAddonOptions: wt
|
|
1456
1457
|
}
|
|
1457
1458
|
),
|
|
@@ -1463,135 +1464,149 @@ const On = (r) => {
|
|
|
1463
1464
|
}
|
|
1464
1465
|
)
|
|
1465
1466
|
] });
|
|
1466
|
-
},
|
|
1467
|
-
options:
|
|
1468
|
-
price:
|
|
1469
|
-
oldPrice:
|
|
1470
|
-
newPrice:
|
|
1471
|
-
animate:
|
|
1472
|
-
meta:
|
|
1473
|
-
info:
|
|
1474
|
-
infoRight:
|
|
1475
|
-
buttons:
|
|
1476
|
-
variants:
|
|
1477
|
-
variant:
|
|
1478
|
-
stock:
|
|
1479
|
-
variantInfo:
|
|
1480
|
-
quantity:
|
|
1481
|
-
button:
|
|
1482
|
-
activeVariant:
|
|
1483
|
-
chargeTypes:
|
|
1484
|
-
charge:
|
|
1485
|
-
chargeActive:
|
|
1486
|
-
title:
|
|
1467
|
+
}, qe = "_options_167h8_1", Oe = "_price_167h8_18", Ae = "_oldPrice_167h8_25", Ee = "_newPrice_167h8_33", De = "_animate_167h8_40", Re = "_meta_167h8_58", Le = "_info_167h8_64", ze = "_infoRight_167h8_73", He = "_buttons_167h8_80", Ue = "_variants_167h8_87", Fe = "_variant_167h8_87", Ve = "_stock_167h8_105", Ye = "_variantInfo_167h8_112", Ge = "_quantity_167h8_119", We = "_button_167h8_80", Xe = "_activeVariant_167h8_165", Qe = "_chargeTypes_167h8_169", Je = "_charge_167h8_169", Ke = "_chargeActive_167h8_194", Ze = "_title_167h8_202", $ = {
|
|
1468
|
+
options: qe,
|
|
1469
|
+
price: Oe,
|
|
1470
|
+
oldPrice: Ae,
|
|
1471
|
+
newPrice: Ee,
|
|
1472
|
+
animate: De,
|
|
1473
|
+
meta: Re,
|
|
1474
|
+
info: Le,
|
|
1475
|
+
infoRight: ze,
|
|
1476
|
+
buttons: He,
|
|
1477
|
+
variants: Ue,
|
|
1478
|
+
variant: Fe,
|
|
1479
|
+
stock: Ve,
|
|
1480
|
+
variantInfo: Ye,
|
|
1481
|
+
quantity: Ge,
|
|
1482
|
+
button: We,
|
|
1483
|
+
activeVariant: Xe,
|
|
1484
|
+
chargeTypes: Qe,
|
|
1485
|
+
charge: Je,
|
|
1486
|
+
chargeActive: Ke,
|
|
1487
|
+
title: Ze
|
|
1487
1488
|
};
|
|
1488
1489
|
var St = /* @__PURE__ */ ((r) => (r.ONE_TIME = "One-Time", r.RECURRING = "Subscribe & Save", r))(St || {});
|
|
1489
|
-
const
|
|
1490
|
-
var
|
|
1490
|
+
const ts = (r) => {
|
|
1491
|
+
var R, K;
|
|
1491
1492
|
const { product: i, setIsOpen: a } = r, { variants: s } = i, [e, c] = m.useState(s[0]), [d, u] = m.useState(
|
|
1492
1493
|
e.chargeTypes ? e.chargeTypes[0] : "ONE_TIME"
|
|
1493
|
-
), { notifications: g, setNotifications:
|
|
1494
|
+
), { notifications: g, setNotifications: x } = Ct(), P = bt(), [v, n] = m.useState(1), { cart: o, reset: p, addProductToCart: E } = at(), [_, j] = m.useState(!1);
|
|
1494
1495
|
m.useEffect(() => {
|
|
1495
|
-
|
|
1496
|
-
const
|
|
1497
|
-
return () => clearTimeout(
|
|
1498
|
-
}, [
|
|
1499
|
-
async function
|
|
1500
|
-
|
|
1501
|
-
|
|
1502
|
-
|
|
1503
|
-
|
|
1504
|
-
|
|
1505
|
-
|
|
1506
|
-
|
|
1507
|
-
|
|
1508
|
-
|
|
1509
|
-
|
|
1510
|
-
|
|
1511
|
-
|
|
1496
|
+
j(!0);
|
|
1497
|
+
const f = setTimeout(() => j(!1), 600);
|
|
1498
|
+
return () => clearTimeout(f);
|
|
1499
|
+
}, [v]);
|
|
1500
|
+
async function N() {
|
|
1501
|
+
try {
|
|
1502
|
+
await E({
|
|
1503
|
+
productId: i.id,
|
|
1504
|
+
productVariantId: e.id,
|
|
1505
|
+
quantity: v
|
|
1506
|
+
}), x([
|
|
1507
|
+
...g,
|
|
1508
|
+
{
|
|
1509
|
+
id: J(),
|
|
1510
|
+
message: "Product added to cart",
|
|
1511
|
+
status: "success"
|
|
1512
|
+
}
|
|
1513
|
+
]);
|
|
1514
|
+
} catch (f) {
|
|
1515
|
+
x([
|
|
1516
|
+
...g,
|
|
1517
|
+
{
|
|
1518
|
+
id: J(),
|
|
1519
|
+
message: `Product failed to add to cart: ${f}`,
|
|
1520
|
+
status: "error"
|
|
1521
|
+
}
|
|
1522
|
+
]);
|
|
1523
|
+
}
|
|
1524
|
+
a == null || a(!1);
|
|
1512
1525
|
}
|
|
1513
|
-
function
|
|
1514
|
-
|
|
1526
|
+
function M() {
|
|
1527
|
+
p(), N(), P("/checkout");
|
|
1515
1528
|
}
|
|
1516
|
-
function
|
|
1517
|
-
if (
|
|
1518
|
-
const
|
|
1519
|
-
return `${
|
|
1520
|
-
} else if (
|
|
1521
|
-
const
|
|
1522
|
-
return `${
|
|
1523
|
-
} else if (
|
|
1524
|
-
const
|
|
1525
|
-
return `${
|
|
1529
|
+
function z(f) {
|
|
1530
|
+
if (f >= 864e5) {
|
|
1531
|
+
const I = Math.floor(f / 864e5);
|
|
1532
|
+
return `${I} ${I === 1 ? "day" : "days"}`;
|
|
1533
|
+
} else if (f >= 36e5) {
|
|
1534
|
+
const I = Math.floor(f / 36e5);
|
|
1535
|
+
return `${I} ${I === 1 ? "hour" : "hours"}`;
|
|
1536
|
+
} else if (f >= 6e4) {
|
|
1537
|
+
const I = Math.floor(f / 6e4);
|
|
1538
|
+
return `${I} ${I === 1 ? "minute" : "minutes"}`;
|
|
1526
1539
|
} else {
|
|
1527
|
-
const
|
|
1528
|
-
return `${
|
|
1540
|
+
const I = Math.floor(f / 1e3);
|
|
1541
|
+
return `${I} ${I === 1 ? "second" : "seconds"}`;
|
|
1529
1542
|
}
|
|
1530
1543
|
}
|
|
1531
1544
|
return m.useEffect(() => {
|
|
1532
1545
|
e.quantity && e.quantity.available === 0 ? n(0) : n(1);
|
|
1533
|
-
}, [e.quantity.available]), /* @__PURE__ */ t.jsxs("div", { className:
|
|
1534
|
-
e.chargeTypes && e.chargeTypes.length > 1 && /* @__PURE__ */ t.jsx("div", { className:
|
|
1546
|
+
}, [e.quantity.available]), /* @__PURE__ */ t.jsxs("div", { className: $.options, children: [
|
|
1547
|
+
e.chargeTypes && e.chargeTypes.length > 1 && /* @__PURE__ */ t.jsx("div", { className: $.chargeTypes, children: e.chargeTypes.map((f) => /* @__PURE__ */ t.jsx(
|
|
1535
1548
|
"div",
|
|
1536
1549
|
{
|
|
1537
|
-
className:
|
|
1538
|
-
[
|
|
1550
|
+
className: U($.charge, {
|
|
1551
|
+
[$.chargeActive]: d === f
|
|
1539
1552
|
}),
|
|
1540
|
-
onClick: () => u(
|
|
1541
|
-
children: St[
|
|
1553
|
+
onClick: () => u(f),
|
|
1554
|
+
children: St[f]
|
|
1542
1555
|
},
|
|
1543
|
-
|
|
1556
|
+
f
|
|
1544
1557
|
)) }),
|
|
1545
|
-
/* @__PURE__ */ t.jsx("div", { className:
|
|
1546
|
-
var
|
|
1558
|
+
/* @__PURE__ */ t.jsx("div", { className: $.variants, children: s.map((f) => {
|
|
1559
|
+
var h, C;
|
|
1547
1560
|
return /* @__PURE__ */ t.jsxs(
|
|
1548
1561
|
"div",
|
|
1549
1562
|
{
|
|
1550
|
-
className:
|
|
1551
|
-
[
|
|
1563
|
+
className: U($.variant, {
|
|
1564
|
+
[$.activeVariant]: e.id === f.id
|
|
1552
1565
|
}),
|
|
1553
|
-
onClick: () => c(
|
|
1566
|
+
onClick: () => c(f),
|
|
1554
1567
|
children: [
|
|
1555
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
1556
|
-
/* @__PURE__ */ t.jsx("span", { className:
|
|
1568
|
+
/* @__PURE__ */ t.jsxs("div", { className: $.variantInfo, children: [
|
|
1569
|
+
/* @__PURE__ */ t.jsx("span", { className: $.title, children: it(f.name) }),
|
|
1557
1570
|
/* @__PURE__ */ t.jsxs("span", { children: [
|
|
1558
1571
|
"$",
|
|
1559
|
-
d === "ONE_TIME" ?
|
|
1572
|
+
d === "ONE_TIME" ? f.price.amount : f.subscriptionSettings ? f.subscriptionSettings.price.amount : "Price Not Found"
|
|
1560
1573
|
] })
|
|
1561
1574
|
] }),
|
|
1562
|
-
/* @__PURE__ */ t.jsx("div", { children: d === "ONE_TIME" && /* @__PURE__ */ t.jsxs("span", { className:
|
|
1563
|
-
(
|
|
1575
|
+
/* @__PURE__ */ t.jsx("div", { children: d === "ONE_TIME" && /* @__PURE__ */ t.jsxs("span", { className: $.stock, children: [
|
|
1576
|
+
(h = f.quantity.restrictions) != null && h.max || f.quantity.available !== void 0 ? ((C = f.quantity.restrictions) == null ? void 0 : C.max) || f.quantity.available : "∞",
|
|
1564
1577
|
" ",
|
|
1565
1578
|
"in stock"
|
|
1566
1579
|
] }) })
|
|
1567
1580
|
]
|
|
1568
1581
|
},
|
|
1569
|
-
|
|
1582
|
+
f.id
|
|
1570
1583
|
);
|
|
1571
1584
|
}) }),
|
|
1572
|
-
d === "ONE_TIME" && /* @__PURE__ */ t.jsxs("div", { className:
|
|
1585
|
+
d === "ONE_TIME" && /* @__PURE__ */ t.jsxs("div", { className: $.quantity, children: [
|
|
1573
1586
|
/* @__PURE__ */ t.jsx(
|
|
1574
1587
|
D,
|
|
1575
1588
|
{
|
|
1576
1589
|
type: "Secondary",
|
|
1577
1590
|
onClick: () => {
|
|
1578
|
-
|
|
1591
|
+
v > 1 ? n((f) => f - 1) : n(1);
|
|
1579
1592
|
},
|
|
1580
|
-
className:
|
|
1581
|
-
disabled: e.quantity.available && e.quantity.restrictions &&
|
|
1582
|
-
children: /* @__PURE__ */ t.jsx(
|
|
1593
|
+
className: $.button,
|
|
1594
|
+
disabled: e.quantity.available && e.quantity.restrictions && v <= e.quantity.restrictions.min || e.quantity.available === 0,
|
|
1595
|
+
children: /* @__PURE__ */ t.jsx(b, { name: "Minus" })
|
|
1583
1596
|
}
|
|
1584
1597
|
),
|
|
1585
1598
|
/* @__PURE__ */ t.jsx(
|
|
1586
1599
|
Et,
|
|
1587
1600
|
{
|
|
1588
1601
|
type: "number",
|
|
1589
|
-
value: String(
|
|
1590
|
-
onChange: (
|
|
1591
|
-
|
|
1592
|
-
|
|
1602
|
+
value: String(v),
|
|
1603
|
+
onChange: (f) => {
|
|
1604
|
+
e.quantity.available && Number(f) > e.quantity.available ? n(e.quantity.available) : n(Number(f));
|
|
1605
|
+
},
|
|
1606
|
+
max: ((R = e.quantity.restrictions) == null ? void 0 : R.max) || e.quantity.available || Number.POSITIVE_INFINITY,
|
|
1607
|
+
min: ((K = e.quantity.restrictions) == null ? void 0 : K.min) || 0,
|
|
1593
1608
|
centered: !0,
|
|
1594
|
-
disabled: e.quantity && e.quantity.available === 0 || Object.keys(e.quantity.restrictions || {}).length !== 0 &&
|
|
1609
|
+
disabled: e.quantity && e.quantity.available === 0 || Object.keys(e.quantity.restrictions || {}).length !== 0 && v >= e.quantity.restrictions.max
|
|
1595
1610
|
}
|
|
1596
1611
|
),
|
|
1597
1612
|
/* @__PURE__ */ t.jsx(
|
|
@@ -1599,20 +1614,20 @@ const Ze = (r) => {
|
|
|
1599
1614
|
{
|
|
1600
1615
|
type: "Secondary",
|
|
1601
1616
|
onClick: () => {
|
|
1602
|
-
n((
|
|
1617
|
+
n((f) => f + 1);
|
|
1603
1618
|
},
|
|
1604
|
-
className:
|
|
1605
|
-
disabled: !!(e.quantity.available && e.quantity.restrictions &&
|
|
1606
|
-
children: /* @__PURE__ */ t.jsx(
|
|
1619
|
+
className: $.button,
|
|
1620
|
+
disabled: !!(e.quantity.available && e.quantity.restrictions && v >= e.quantity.restrictions.max || e.quantity.available === 0 || e.quantity.available && v >= e.quantity.available),
|
|
1621
|
+
children: /* @__PURE__ */ t.jsx(b, { name: "Plus" })
|
|
1607
1622
|
}
|
|
1608
1623
|
)
|
|
1609
1624
|
] }),
|
|
1610
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
1611
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
1625
|
+
/* @__PURE__ */ t.jsxs("div", { className: $.meta, children: [
|
|
1626
|
+
/* @__PURE__ */ t.jsxs("div", { className: $.info, children: [
|
|
1612
1627
|
/* @__PURE__ */ t.jsx("span", { children: "Delivery" }),
|
|
1613
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
1628
|
+
/* @__PURE__ */ t.jsxs("div", { className: $.infoRight, children: [
|
|
1614
1629
|
/* @__PURE__ */ t.jsx(
|
|
1615
|
-
|
|
1630
|
+
b,
|
|
1616
1631
|
{
|
|
1617
1632
|
name: "Lightning",
|
|
1618
1633
|
fill: "var(--text-action)",
|
|
@@ -1620,44 +1635,44 @@ const Ze = (r) => {
|
|
|
1620
1635
|
height: 20
|
|
1621
1636
|
}
|
|
1622
1637
|
),
|
|
1623
|
-
/* @__PURE__ */ t.jsx("span", { children: !e.deliveryTime || e.deliveryTime === 0 ? "Instant" :
|
|
1638
|
+
/* @__PURE__ */ t.jsx("span", { children: !e.deliveryTime || e.deliveryTime === 0 ? "Instant" : z(e.deliveryTime) })
|
|
1624
1639
|
] })
|
|
1625
1640
|
] }),
|
|
1626
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
1641
|
+
/* @__PURE__ */ t.jsxs("div", { className: $.info, children: [
|
|
1627
1642
|
/* @__PURE__ */ t.jsx("span", { children: "Price" }),
|
|
1628
|
-
/* @__PURE__ */ t.jsx("div", { className:
|
|
1629
|
-
/* @__PURE__ */ t.jsxs("span", { className:
|
|
1643
|
+
/* @__PURE__ */ t.jsx("div", { className: $.infoRight, children: d === "ONE_TIME" ? e.compareAtPrice && (e.compareAtPrice.amount || 0) - (e.price.amount || 0) > 0 ? /* @__PURE__ */ t.jsxs("div", { className: $.price, children: [
|
|
1644
|
+
/* @__PURE__ */ t.jsxs("span", { className: U($.newPrice, { [$.animate]: _ }), children: [
|
|
1630
1645
|
"$ ",
|
|
1631
|
-
(e.price.amount || 0) *
|
|
1646
|
+
(e.price.amount || 0) * v
|
|
1632
1647
|
] }),
|
|
1633
|
-
/* @__PURE__ */ t.jsxs("span", { className:
|
|
1648
|
+
/* @__PURE__ */ t.jsxs("span", { className: $.oldPrice, children: [
|
|
1634
1649
|
"$ ",
|
|
1635
|
-
(e.compareAtPrice.amount || 0) *
|
|
1650
|
+
(e.compareAtPrice.amount || 0) * v
|
|
1636
1651
|
] })
|
|
1637
|
-
] }) : /* @__PURE__ */ t.jsxs("span", { className:
|
|
1652
|
+
] }) : /* @__PURE__ */ t.jsxs("span", { className: U($.newPrice, { [$.animate]: _ }), children: [
|
|
1638
1653
|
"$ ",
|
|
1639
|
-
(e.price.amount || 0) *
|
|
1640
|
-
] }) : e.subscriptionSettings && e.subscriptionSettings.compareAtPrice && (e.subscriptionSettings.compareAtPrice.amount || 0) - (e.subscriptionSettings.price.amount || 0) > 0 ? /* @__PURE__ */ t.jsxs("div", { className:
|
|
1641
|
-
/* @__PURE__ */ t.jsxs("span", { className:
|
|
1654
|
+
(e.price.amount || 0) * v
|
|
1655
|
+
] }) : e.subscriptionSettings && e.subscriptionSettings.compareAtPrice && (e.subscriptionSettings.compareAtPrice.amount || 0) - (e.subscriptionSettings.price.amount || 0) > 0 ? /* @__PURE__ */ t.jsxs("div", { className: $.price, children: [
|
|
1656
|
+
/* @__PURE__ */ t.jsxs("span", { className: U($.newPrice, { [$.animate]: _ }), children: [
|
|
1642
1657
|
"$ ",
|
|
1643
1658
|
e.subscriptionSettings.price.amount || 0
|
|
1644
1659
|
] }),
|
|
1645
|
-
/* @__PURE__ */ t.jsxs("span", { className:
|
|
1660
|
+
/* @__PURE__ */ t.jsxs("span", { className: $.oldPrice, children: [
|
|
1646
1661
|
"$ ",
|
|
1647
1662
|
e.subscriptionSettings.compareAtPrice.amount || 0
|
|
1648
1663
|
] })
|
|
1649
|
-
] }) : e.subscriptionSettings && /* @__PURE__ */ t.jsxs("span", { className:
|
|
1664
|
+
] }) : e.subscriptionSettings && /* @__PURE__ */ t.jsxs("span", { className: U($.newPrice, { [$.animate]: _ }), children: [
|
|
1650
1665
|
"$ ",
|
|
1651
1666
|
e.subscriptionSettings.price.amount || 0
|
|
1652
1667
|
] }) })
|
|
1653
1668
|
] })
|
|
1654
1669
|
] }),
|
|
1655
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
1670
|
+
/* @__PURE__ */ t.jsxs("div", { className: $.buttons, children: [
|
|
1656
1671
|
/* @__PURE__ */ t.jsx(
|
|
1657
1672
|
D,
|
|
1658
1673
|
{
|
|
1659
1674
|
type: "Primary",
|
|
1660
|
-
onClick: () =>
|
|
1675
|
+
onClick: () => M(),
|
|
1661
1676
|
disabled: e.quantity && e.quantity.available === 0,
|
|
1662
1677
|
children: d === "ONE_TIME" ? "Buy Now" : "Subscribe Now"
|
|
1663
1678
|
}
|
|
@@ -1666,51 +1681,53 @@ const Ze = (r) => {
|
|
|
1666
1681
|
D,
|
|
1667
1682
|
{
|
|
1668
1683
|
type: "Secondary",
|
|
1669
|
-
onClick: () =>
|
|
1684
|
+
onClick: () => N(),
|
|
1670
1685
|
disabled: e.quantity && e.quantity.available === 0,
|
|
1671
|
-
children:
|
|
1686
|
+
children: o.parts.some(
|
|
1687
|
+
(f) => f.productId === i.id && f.productVariantId === e.id
|
|
1688
|
+
) ? "Add More" : "Add to Cart"
|
|
1672
1689
|
}
|
|
1673
1690
|
)
|
|
1674
1691
|
] })
|
|
1675
1692
|
] });
|
|
1676
|
-
},
|
|
1677
|
-
buttons:
|
|
1678
|
-
modal:
|
|
1679
|
-
closing:
|
|
1680
|
-
info:
|
|
1681
|
-
top:
|
|
1682
|
-
title:
|
|
1683
|
-
clear:
|
|
1684
|
-
activeClear:
|
|
1685
|
-
count:
|
|
1686
|
-
cart:
|
|
1687
|
-
empty:
|
|
1688
|
-
product:
|
|
1689
|
-
products:
|
|
1690
|
-
image:
|
|
1691
|
-
productInfo:
|
|
1692
|
-
content:
|
|
1693
|
-
name:
|
|
1694
|
-
price:
|
|
1695
|
-
productButtons:
|
|
1696
|
-
productButton:
|
|
1697
|
-
productCount:
|
|
1698
|
-
bottom:
|
|
1699
|
-
subtotal:
|
|
1700
|
-
block:
|
|
1701
|
-
shoppingCount:
|
|
1702
|
-
total:
|
|
1703
|
-
link:
|
|
1704
|
-
userInfo:
|
|
1705
|
-
pagesMobileModal:
|
|
1706
|
-
pagesMobileModalContent:
|
|
1707
|
-
pagesMobileModalHeader:
|
|
1693
|
+
}, es = "_buttons_qns27_23", ss = "_modal_qns27_32", ns = "_closing_qns27_64", is = "_info_qns27_113", as = "_top_qns27_120", os = "_title_qns27_131", cs = "_clear_qns27_138", rs = "_activeClear_qns27_145", ls = "_count_qns27_149", ds = "_cart_qns27_164", us = "_empty_qns27_172", hs = "_product_qns27_198", ps = "_products_qns27_207", ms = "_image_qns27_215", gs = "_productInfo_qns27_231", fs = "_content_qns27_238", xs = "_name_qns27_244", _s = "_price_qns27_250", js = "_productButtons_qns27_256", vs = "_productButton_qns27_256", bs = "_productCount_qns27_273", ys = "_bottom_qns27_290", Is = "_subtotal_qns27_298", Ns = "_block_qns27_306", Cs = "_shoppingCount_qns27_313", Ss = "_total_qns27_333", ks = "_link_qns27_339", ws = "_userInfo_qns27_346", Ps = "_pagesMobileModal_qns27_358", Ms = "_pagesMobileModalContent_qns27_372", $s = "_pagesMobileModalHeader_qns27_378", Bs = "_pagesMobileModalFooter_qns27_388", w = {
|
|
1694
|
+
buttons: es,
|
|
1695
|
+
modal: ss,
|
|
1696
|
+
closing: ns,
|
|
1697
|
+
info: is,
|
|
1698
|
+
top: as,
|
|
1699
|
+
title: os,
|
|
1700
|
+
clear: cs,
|
|
1701
|
+
activeClear: rs,
|
|
1702
|
+
count: ls,
|
|
1703
|
+
cart: ds,
|
|
1704
|
+
empty: us,
|
|
1705
|
+
product: hs,
|
|
1706
|
+
products: ps,
|
|
1707
|
+
image: ms,
|
|
1708
|
+
productInfo: gs,
|
|
1709
|
+
content: fs,
|
|
1710
|
+
name: xs,
|
|
1711
|
+
price: _s,
|
|
1712
|
+
productButtons: js,
|
|
1713
|
+
productButton: vs,
|
|
1714
|
+
productCount: bs,
|
|
1715
|
+
bottom: ys,
|
|
1716
|
+
subtotal: Is,
|
|
1717
|
+
block: Ns,
|
|
1718
|
+
shoppingCount: Cs,
|
|
1719
|
+
total: Ss,
|
|
1720
|
+
link: ks,
|
|
1721
|
+
userInfo: ws,
|
|
1722
|
+
pagesMobileModal: Ps,
|
|
1723
|
+
pagesMobileModalContent: Ms,
|
|
1724
|
+
pagesMobileModalHeader: $s,
|
|
1708
1725
|
pagesMobileModalFooter: Bs
|
|
1709
|
-
},
|
|
1726
|
+
}, Dn = (r) => {
|
|
1710
1727
|
const { shopping: i, signUp: a, isShowUserInfo: s = !0 } = r;
|
|
1711
1728
|
return /* @__PURE__ */ t.jsxs("div", { className: w.buttons, children: [
|
|
1712
1729
|
i && /* @__PURE__ */ t.jsx(Ts, {}),
|
|
1713
|
-
s && /* @__PURE__ */ t.jsx(
|
|
1730
|
+
s && /* @__PURE__ */ t.jsx(Bt, { signUp: a })
|
|
1714
1731
|
] });
|
|
1715
1732
|
}, Ts = () => {
|
|
1716
1733
|
const [r, i] = m.useState(!1), [a, s] = m.useState([]), { cart: e, products: c } = at();
|
|
@@ -1731,19 +1748,19 @@ const Ze = (r) => {
|
|
|
1731
1748
|
}
|
|
1732
1749
|
m.useEffect(() => {
|
|
1733
1750
|
(async () => {
|
|
1734
|
-
const o = e.parts.map((
|
|
1735
|
-
...
|
|
1736
|
-
activeVariantId: d(
|
|
1737
|
-
quantity: u(
|
|
1751
|
+
const o = e.parts.map((_) => String(_.productId)), E = (c.filter((_) => o.includes(String(_.id))) || []).map((_) => ({
|
|
1752
|
+
..._,
|
|
1753
|
+
activeVariantId: d(_),
|
|
1754
|
+
quantity: u(_)
|
|
1738
1755
|
}));
|
|
1739
|
-
s(
|
|
1756
|
+
s(E);
|
|
1740
1757
|
})();
|
|
1741
1758
|
}, [e.parts]);
|
|
1742
1759
|
function g(n) {
|
|
1743
1760
|
var o;
|
|
1744
1761
|
return !n || !(n != null && n.variants) ? !1 : (o = n.variants.find((p) => p.id === n.activeVariantId)) == null ? void 0 : o.subscriptionSettings;
|
|
1745
1762
|
}
|
|
1746
|
-
const
|
|
1763
|
+
const x = e.parts.length > 0 && a.length > 0 && !g(a[0]), [P, v] = m.useState(!1);
|
|
1747
1764
|
return /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
1748
1765
|
/* @__PURE__ */ t.jsxs(
|
|
1749
1766
|
D,
|
|
@@ -1754,16 +1771,16 @@ const Ze = (r) => {
|
|
|
1754
1771
|
position: "relative"
|
|
1755
1772
|
},
|
|
1756
1773
|
onClick: (n) => {
|
|
1757
|
-
n.stopPropagation(), window.location.pathname.includes("/admin/builder") || (i(!0),
|
|
1774
|
+
n.stopPropagation(), window.location.pathname.includes("/admin/builder") || (i(!0), v(!0));
|
|
1758
1775
|
},
|
|
1759
1776
|
children: [
|
|
1760
1777
|
/* @__PURE__ */ t.jsx(
|
|
1761
|
-
|
|
1778
|
+
b,
|
|
1762
1779
|
{
|
|
1763
1780
|
name: "Handbag"
|
|
1764
1781
|
}
|
|
1765
1782
|
),
|
|
1766
|
-
|
|
1783
|
+
x && /* @__PURE__ */ t.jsx("div", { className: w.shoppingCount, children: e.parts.length })
|
|
1767
1784
|
]
|
|
1768
1785
|
}
|
|
1769
1786
|
),
|
|
@@ -1771,25 +1788,25 @@ const Ze = (r) => {
|
|
|
1771
1788
|
dt,
|
|
1772
1789
|
{
|
|
1773
1790
|
close: () => {
|
|
1774
|
-
|
|
1791
|
+
v(!1), setTimeout(() => {
|
|
1775
1792
|
i(!1);
|
|
1776
1793
|
}, 300);
|
|
1777
1794
|
},
|
|
1778
1795
|
withAnimation: !1,
|
|
1779
1796
|
children: /* @__PURE__ */ t.jsx(
|
|
1780
|
-
|
|
1797
|
+
qs,
|
|
1781
1798
|
{
|
|
1782
1799
|
activeProducts: a,
|
|
1783
|
-
isCartNotEmpty:
|
|
1800
|
+
isCartNotEmpty: x,
|
|
1784
1801
|
isOpen: P
|
|
1785
1802
|
}
|
|
1786
1803
|
)
|
|
1787
1804
|
}
|
|
1788
1805
|
)
|
|
1789
1806
|
] });
|
|
1790
|
-
},
|
|
1807
|
+
}, qs = (r) => {
|
|
1791
1808
|
const { activeProducts: i, isCartNotEmpty: a, isOpen: s } = r, { cart: e, reset: c, getTotalAndDiscount: d, updateQuantityOfProduct: u } = at(), g = bt();
|
|
1792
|
-
function
|
|
1809
|
+
function x(n) {
|
|
1793
1810
|
g(n);
|
|
1794
1811
|
}
|
|
1795
1812
|
function P(n) {
|
|
@@ -1799,7 +1816,7 @@ const Ze = (r) => {
|
|
|
1799
1816
|
quantity: n.quantity + 1
|
|
1800
1817
|
});
|
|
1801
1818
|
}
|
|
1802
|
-
function
|
|
1819
|
+
function v(n) {
|
|
1803
1820
|
n.quantity && u({
|
|
1804
1821
|
productId: n.id,
|
|
1805
1822
|
productVariantId: n.activeVariantId,
|
|
@@ -1809,7 +1826,7 @@ const Ze = (r) => {
|
|
|
1809
1826
|
return /* @__PURE__ */ t.jsxs(
|
|
1810
1827
|
"div",
|
|
1811
1828
|
{
|
|
1812
|
-
className:
|
|
1829
|
+
className: U(w.modal, {
|
|
1813
1830
|
[w.closing]: !s
|
|
1814
1831
|
}),
|
|
1815
1832
|
onClick: (n) => n.stopPropagation(),
|
|
@@ -1822,7 +1839,7 @@ const Ze = (r) => {
|
|
|
1822
1839
|
/* @__PURE__ */ t.jsx(
|
|
1823
1840
|
"button",
|
|
1824
1841
|
{
|
|
1825
|
-
className:
|
|
1842
|
+
className: U(w.clear, {
|
|
1826
1843
|
[w.activeClear]: a
|
|
1827
1844
|
}),
|
|
1828
1845
|
disabled: !a,
|
|
@@ -1848,7 +1865,7 @@ const Ze = (r) => {
|
|
|
1848
1865
|
className: w.image
|
|
1849
1866
|
}
|
|
1850
1867
|
) : /* @__PURE__ */ t.jsx("div", { className: w.image, children: /* @__PURE__ */ t.jsx(
|
|
1851
|
-
|
|
1868
|
+
b,
|
|
1852
1869
|
{
|
|
1853
1870
|
name: "Image",
|
|
1854
1871
|
fill: "var(--text-secondary)"
|
|
@@ -1868,12 +1885,12 @@ const Ze = (r) => {
|
|
|
1868
1885
|
{
|
|
1869
1886
|
type: "Secondary",
|
|
1870
1887
|
onClick: () => {
|
|
1871
|
-
n.quantity !== 1 &&
|
|
1888
|
+
n.quantity !== 1 && v(n);
|
|
1872
1889
|
},
|
|
1873
1890
|
className: w.productButton,
|
|
1874
1891
|
disabled: n.quantity === 1,
|
|
1875
1892
|
children: /* @__PURE__ */ t.jsx(
|
|
1876
|
-
|
|
1893
|
+
b,
|
|
1877
1894
|
{
|
|
1878
1895
|
name: "Minus",
|
|
1879
1896
|
fill: "#757575",
|
|
@@ -1892,7 +1909,7 @@ const Ze = (r) => {
|
|
|
1892
1909
|
className: w.productButton,
|
|
1893
1910
|
disabled: n.quantity === n.variants.find((o) => o.id === n.activeVariantId).quantity.available,
|
|
1894
1911
|
children: /* @__PURE__ */ t.jsx(
|
|
1895
|
-
|
|
1912
|
+
b,
|
|
1896
1913
|
{
|
|
1897
1914
|
name: "Plus",
|
|
1898
1915
|
fill: "#757575",
|
|
@@ -1912,7 +1929,7 @@ const Ze = (r) => {
|
|
|
1912
1929
|
/* @__PURE__ */ t.jsxs("div", { className: w.block, children: [
|
|
1913
1930
|
/* @__PURE__ */ t.jsx("span", { children: "Subtotal" }),
|
|
1914
1931
|
/* @__PURE__ */ t.jsx(
|
|
1915
|
-
|
|
1932
|
+
b,
|
|
1916
1933
|
{
|
|
1917
1934
|
name: "Info",
|
|
1918
1935
|
width: 20,
|
|
@@ -1926,15 +1943,15 @@ const Ze = (r) => {
|
|
|
1926
1943
|
d().total
|
|
1927
1944
|
] })
|
|
1928
1945
|
] }),
|
|
1929
|
-
/* @__PURE__ */ t.jsx(D, { onClick: () =>
|
|
1946
|
+
/* @__PURE__ */ t.jsx(D, { onClick: () => x("/checkout"), children: "Checkout" })
|
|
1930
1947
|
] })
|
|
1931
|
-
] }) : /* @__PURE__ */ t.jsx(
|
|
1948
|
+
] }) : /* @__PURE__ */ t.jsx(Os, {})
|
|
1932
1949
|
]
|
|
1933
1950
|
}
|
|
1934
1951
|
);
|
|
1935
|
-
},
|
|
1952
|
+
}, Os = () => /* @__PURE__ */ t.jsxs("div", { className: w.empty, children: [
|
|
1936
1953
|
/* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
|
|
1937
|
-
|
|
1954
|
+
b,
|
|
1938
1955
|
{
|
|
1939
1956
|
name: "Handbag",
|
|
1940
1957
|
fill: "var(--text-secondary)"
|
|
@@ -1953,58 +1970,57 @@ const Ze = (r) => {
|
|
|
1953
1970
|
}
|
|
1954
1971
|
)
|
|
1955
1972
|
] })
|
|
1956
|
-
] }),
|
|
1957
|
-
const a =
|
|
1958
|
-
|
|
1973
|
+
] }), Bt = ({ signUp: r, close: i }) => {
|
|
1974
|
+
const { token: a } = Dt(), s = bt(), [e, c] = m.useState("test-email@gmail.com");
|
|
1975
|
+
m.useEffect(() => {
|
|
1976
|
+
a && (async () => {
|
|
1977
|
+
if (!a) return;
|
|
1978
|
+
const g = Rt(a);
|
|
1979
|
+
c(g.email);
|
|
1980
|
+
})();
|
|
1981
|
+
}, [a]);
|
|
1982
|
+
function d(u) {
|
|
1959
1983
|
window.location.pathname.includes("/admin/builder") || s(u);
|
|
1960
1984
|
}
|
|
1961
|
-
|
|
1962
|
-
return /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
1963
|
-
/* @__PURE__ */ t.jsx(
|
|
1964
|
-
D,
|
|
1965
|
-
{
|
|
1966
|
-
onClick: () => {
|
|
1967
|
-
e("/customer-dash"), i == null || i();
|
|
1968
|
-
},
|
|
1969
|
-
type: "Secondary",
|
|
1970
|
-
style: {
|
|
1971
|
-
padding: 10
|
|
1972
|
-
},
|
|
1973
|
-
children: "Login"
|
|
1974
|
-
}
|
|
1975
|
-
),
|
|
1976
|
-
r && /* @__PURE__ */ t.jsx(
|
|
1977
|
-
D,
|
|
1978
|
-
{
|
|
1979
|
-
onClick: () => {
|
|
1980
|
-
e("/customer-dash"), i == null || i();
|
|
1981
|
-
},
|
|
1982
|
-
type: "Primary",
|
|
1983
|
-
style: {
|
|
1984
|
-
padding: 10,
|
|
1985
|
-
whiteSpace: "nowrap"
|
|
1986
|
-
},
|
|
1987
|
-
children: "Sign Up"
|
|
1988
|
-
}
|
|
1989
|
-
)
|
|
1990
|
-
] });
|
|
1991
|
-
const [c, d] = m.useState("test-email@gmail.com");
|
|
1992
|
-
return m.useEffect(() => {
|
|
1993
|
-
(async () => {
|
|
1994
|
-
const g = Dt(a);
|
|
1995
|
-
d(g.email);
|
|
1996
|
-
})();
|
|
1997
|
-
}, [a]), /* @__PURE__ */ t.jsx(
|
|
1985
|
+
return a ? /* @__PURE__ */ t.jsx(
|
|
1998
1986
|
"div",
|
|
1999
1987
|
{
|
|
2000
1988
|
className: w.userInfo,
|
|
2001
1989
|
onClick: () => {
|
|
2002
|
-
|
|
1990
|
+
d("/customer-dash"), i == null || i();
|
|
2003
1991
|
},
|
|
2004
|
-
children: /* @__PURE__ */ t.jsx("div", { children:
|
|
1992
|
+
children: /* @__PURE__ */ t.jsx("div", { children: e || "test-email@gmail.com" })
|
|
2005
1993
|
}
|
|
2006
|
-
)
|
|
2007
|
-
|
|
1994
|
+
) : /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
1995
|
+
/* @__PURE__ */ t.jsx(
|
|
1996
|
+
D,
|
|
1997
|
+
{
|
|
1998
|
+
onClick: () => {
|
|
1999
|
+
d("/customer-dash"), i == null || i();
|
|
2000
|
+
},
|
|
2001
|
+
type: "Secondary",
|
|
2002
|
+
style: {
|
|
2003
|
+
padding: 10
|
|
2004
|
+
},
|
|
2005
|
+
children: "Login"
|
|
2006
|
+
}
|
|
2007
|
+
),
|
|
2008
|
+
r && /* @__PURE__ */ t.jsx(
|
|
2009
|
+
D,
|
|
2010
|
+
{
|
|
2011
|
+
onClick: () => {
|
|
2012
|
+
d("/customer-dash"), i == null || i();
|
|
2013
|
+
},
|
|
2014
|
+
type: "Primary",
|
|
2015
|
+
style: {
|
|
2016
|
+
padding: 10,
|
|
2017
|
+
whiteSpace: "nowrap"
|
|
2018
|
+
},
|
|
2019
|
+
children: "Sign Up"
|
|
2020
|
+
}
|
|
2021
|
+
)
|
|
2022
|
+
] });
|
|
2023
|
+
}, As = ({
|
|
2008
2024
|
children: r,
|
|
2009
2025
|
logo: i,
|
|
2010
2026
|
setIsOpen: a,
|
|
@@ -2028,13 +2044,13 @@ const Ze = (r) => {
|
|
|
2028
2044
|
{
|
|
2029
2045
|
type: "Secondary",
|
|
2030
2046
|
onClick: c,
|
|
2031
|
-
children: /* @__PURE__ */ t.jsx(
|
|
2047
|
+
children: /* @__PURE__ */ t.jsx(b, { name: "X" })
|
|
2032
2048
|
}
|
|
2033
2049
|
)
|
|
2034
2050
|
] }),
|
|
2035
2051
|
/* @__PURE__ */ t.jsx("div", { className: w.pagesMobileModalContent, children: r }),
|
|
2036
2052
|
/* @__PURE__ */ t.jsx("div", { className: w.pagesMobileModalFooter, children: /* @__PURE__ */ t.jsx(
|
|
2037
|
-
|
|
2053
|
+
Bt,
|
|
2038
2054
|
{
|
|
2039
2055
|
signUp: s,
|
|
2040
2056
|
close: c
|
|
@@ -2043,21 +2059,21 @@ const Ze = (r) => {
|
|
|
2043
2059
|
]
|
|
2044
2060
|
}
|
|
2045
2061
|
);
|
|
2046
|
-
},
|
|
2062
|
+
}, Rn = ({
|
|
2047
2063
|
children: r,
|
|
2048
2064
|
logo: i,
|
|
2049
2065
|
signUp: a
|
|
2050
2066
|
}) => {
|
|
2051
2067
|
const [s, e] = m.useState(!1);
|
|
2052
2068
|
return /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
2053
|
-
/* @__PURE__ */ t.jsx(
|
|
2069
|
+
/* @__PURE__ */ t.jsx(Es, { setIsOpenModal: e }),
|
|
2054
2070
|
s && /* @__PURE__ */ t.jsx(
|
|
2055
2071
|
dt,
|
|
2056
2072
|
{
|
|
2057
2073
|
close: () => e(!1),
|
|
2058
2074
|
hasPadding: !1,
|
|
2059
2075
|
children: /* @__PURE__ */ t.jsx(
|
|
2060
|
-
|
|
2076
|
+
As,
|
|
2061
2077
|
{
|
|
2062
2078
|
logo: i,
|
|
2063
2079
|
setIsOpen: e,
|
|
@@ -2068,7 +2084,7 @@ const Ze = (r) => {
|
|
|
2068
2084
|
}
|
|
2069
2085
|
)
|
|
2070
2086
|
] });
|
|
2071
|
-
},
|
|
2087
|
+
}, Es = (r) => {
|
|
2072
2088
|
const { setIsOpenModal: i } = r;
|
|
2073
2089
|
return /* @__PURE__ */ t.jsx(
|
|
2074
2090
|
D,
|
|
@@ -2080,19 +2096,19 @@ const Ze = (r) => {
|
|
|
2080
2096
|
onClick: (a) => {
|
|
2081
2097
|
a.stopPropagation(), window.location.pathname.includes("/admin/builder") || i(!0);
|
|
2082
2098
|
},
|
|
2083
|
-
children: /* @__PURE__ */ t.jsx(
|
|
2099
|
+
children: /* @__PURE__ */ t.jsx(b, { name: "List" })
|
|
2084
2100
|
}
|
|
2085
2101
|
);
|
|
2086
|
-
},
|
|
2087
|
-
share:
|
|
2088
|
-
modal:
|
|
2089
|
-
header:
|
|
2090
|
-
title:
|
|
2091
|
-
copyWrapper:
|
|
2092
|
-
copyText:
|
|
2093
|
-
copyTextMobile:
|
|
2094
|
-
copyTextMiniMobile:
|
|
2095
|
-
},
|
|
2102
|
+
}, Ds = "_share_rlgln_1", Rs = "_modal_rlgln_8", Ls = "_header_rlgln_20", zs = "_title_rlgln_46", Hs = "_copyWrapper_rlgln_52", Us = "_copyText_rlgln_61", Fs = "_copyTextMobile_rlgln_74", Vs = "_copyTextMiniMobile_rlgln_93", st = {
|
|
2103
|
+
share: Ds,
|
|
2104
|
+
modal: Rs,
|
|
2105
|
+
header: Ls,
|
|
2106
|
+
title: zs,
|
|
2107
|
+
copyWrapper: Hs,
|
|
2108
|
+
copyText: Us,
|
|
2109
|
+
copyTextMobile: Fs,
|
|
2110
|
+
copyTextMiniMobile: Vs
|
|
2111
|
+
}, Ln = ({ title: r = "Copy Product Link" }) => {
|
|
2096
2112
|
const { isOpenModal: i, setIsOpenModal: a } = Mt();
|
|
2097
2113
|
function s() {
|
|
2098
2114
|
a(!0);
|
|
@@ -2107,7 +2123,7 @@ const Ze = (r) => {
|
|
|
2107
2123
|
},
|
|
2108
2124
|
type: "Secondary",
|
|
2109
2125
|
children: /* @__PURE__ */ t.jsx(
|
|
2110
|
-
|
|
2126
|
+
b,
|
|
2111
2127
|
{
|
|
2112
2128
|
name: "Share",
|
|
2113
2129
|
fill: "#757575",
|
|
@@ -2116,15 +2132,15 @@ const Ze = (r) => {
|
|
|
2116
2132
|
)
|
|
2117
2133
|
}
|
|
2118
2134
|
),
|
|
2119
|
-
i && /* @__PURE__ */ t.jsx(dt, { close: a, children: /* @__PURE__ */ t.jsx(
|
|
2135
|
+
i && /* @__PURE__ */ t.jsx(dt, { close: a, children: /* @__PURE__ */ t.jsx(Ys, { title: r }) })
|
|
2120
2136
|
] });
|
|
2121
|
-
},
|
|
2137
|
+
}, Ys = ({ title: r = "Copy Product Link" }) => {
|
|
2122
2138
|
const { setIsOpenModal: i } = Mt(), { notifications: a, setNotifications: s } = Ct(), { setIsOpen: e } = ot(), c = window.location.href;
|
|
2123
2139
|
function d() {
|
|
2124
2140
|
navigator.clipboard.writeText(c), s([
|
|
2125
2141
|
...a,
|
|
2126
2142
|
{
|
|
2127
|
-
id:
|
|
2143
|
+
id: J(),
|
|
2128
2144
|
message: "Link copied to clipboard",
|
|
2129
2145
|
status: "success"
|
|
2130
2146
|
}
|
|
@@ -2135,19 +2151,19 @@ const Ze = (r) => {
|
|
|
2135
2151
|
i(!1), e(!0);
|
|
2136
2152
|
}, 300);
|
|
2137
2153
|
}
|
|
2138
|
-
function g(
|
|
2139
|
-
return
|
|
2154
|
+
function g(x, P) {
|
|
2155
|
+
return x.length > P ? x.slice(0, P) + "..." : x;
|
|
2140
2156
|
}
|
|
2141
2157
|
return /* @__PURE__ */ t.jsxs(
|
|
2142
2158
|
"div",
|
|
2143
2159
|
{
|
|
2144
2160
|
className: st.modal,
|
|
2145
|
-
onClick: (
|
|
2161
|
+
onClick: (x) => x.stopPropagation(),
|
|
2146
2162
|
children: [
|
|
2147
2163
|
/* @__PURE__ */ t.jsxs("div", { className: st.header, children: [
|
|
2148
2164
|
/* @__PURE__ */ t.jsx("div", { className: st.title, children: r }),
|
|
2149
2165
|
/* @__PURE__ */ t.jsx(
|
|
2150
|
-
|
|
2166
|
+
b,
|
|
2151
2167
|
{
|
|
2152
2168
|
name: "X",
|
|
2153
2169
|
fill: "#757575",
|
|
@@ -2178,21 +2194,21 @@ const Ze = (r) => {
|
|
|
2178
2194
|
type: "Secondary",
|
|
2179
2195
|
onClick: d,
|
|
2180
2196
|
children: a.find(
|
|
2181
|
-
(
|
|
2182
|
-
) ? /* @__PURE__ */ t.jsx(
|
|
2197
|
+
(x) => x.message === "Link copied to clipboard"
|
|
2198
|
+
) ? /* @__PURE__ */ t.jsx(b, { name: "Check" }) : /* @__PURE__ */ t.jsx(b, { name: "Copy" })
|
|
2183
2199
|
}
|
|
2184
2200
|
)
|
|
2185
2201
|
] })
|
|
2186
2202
|
]
|
|
2187
2203
|
}
|
|
2188
2204
|
);
|
|
2189
|
-
},
|
|
2190
|
-
accordion:
|
|
2191
|
-
header:
|
|
2192
|
-
icon:
|
|
2193
|
-
open:
|
|
2194
|
-
content:
|
|
2195
|
-
},
|
|
2205
|
+
}, Gs = "_accordion_1s1lq_1", Ws = "_header_1s1lq_9", Xs = "_icon_1s1lq_18", Qs = "_open_1s1lq_21", Js = "_content_1s1lq_25", ct = {
|
|
2206
|
+
accordion: Gs,
|
|
2207
|
+
header: Ws,
|
|
2208
|
+
icon: Xs,
|
|
2209
|
+
open: Qs,
|
|
2210
|
+
content: Js
|
|
2211
|
+
}, zn = ({ title: r, content: i, defaultOpen: a = !1 }) => {
|
|
2196
2212
|
const [s, e] = m.useState(a), [c, d] = m.useState(0), u = m.useRef(null), g = () => {
|
|
2197
2213
|
e(!s);
|
|
2198
2214
|
};
|
|
@@ -2206,7 +2222,7 @@ const Ze = (r) => {
|
|
|
2206
2222
|
onClick: g,
|
|
2207
2223
|
children: [
|
|
2208
2224
|
/* @__PURE__ */ t.jsx("h5", { id: "h5", children: r }),
|
|
2209
|
-
/* @__PURE__ */ t.jsx("div", { className:
|
|
2225
|
+
/* @__PURE__ */ t.jsx("div", { className: U(ct.icon, { [ct.open]: s }), children: /* @__PURE__ */ t.jsx(b, { name: "CaretDown" }) })
|
|
2210
2226
|
]
|
|
2211
2227
|
}
|
|
2212
2228
|
),
|
|
@@ -2220,7 +2236,7 @@ const Ze = (r) => {
|
|
|
2220
2236
|
}
|
|
2221
2237
|
)
|
|
2222
2238
|
] });
|
|
2223
|
-
},
|
|
2239
|
+
}, Ks = ({ children: r, path: i, className: a, target: s = "_self", id: e }) => {
|
|
2224
2240
|
if (window.location.pathname.includes("/admin/builder"))
|
|
2225
2241
|
return /* @__PURE__ */ t.jsx(
|
|
2226
2242
|
"div",
|
|
@@ -2246,24 +2262,24 @@ const Ze = (r) => {
|
|
|
2246
2262
|
children: r
|
|
2247
2263
|
}
|
|
2248
2264
|
);
|
|
2249
|
-
},
|
|
2250
|
-
buttonsBlock:
|
|
2251
|
-
},
|
|
2252
|
-
var
|
|
2253
|
-
const { setIsOpen: i, setModalType: a, productId: s } = r, { cart: e } = at(), { pageContext: c } = vt(), d = (
|
|
2265
|
+
}, Zs = "_buttonsBlock_1b2rb_1", tn = {
|
|
2266
|
+
buttonsBlock: Zs
|
|
2267
|
+
}, Hn = (r) => {
|
|
2268
|
+
var x, P;
|
|
2269
|
+
const { setIsOpen: i, setModalType: a, productId: s } = r, { cart: e } = at(), { pageContext: c } = vt(), d = (x = c == null ? void 0 : c.listings) == null ? void 0 : x.find((v) => v.id === s);
|
|
2254
2270
|
if (!d)
|
|
2255
2271
|
return null;
|
|
2256
2272
|
const u = (P = c == null ? void 0 : c.products) == null ? void 0 : P.find(
|
|
2257
|
-
(
|
|
2273
|
+
(v) => v.uniquePath === d.productData.uniquePath
|
|
2258
2274
|
);
|
|
2259
2275
|
if (!u)
|
|
2260
2276
|
return null;
|
|
2261
|
-
const g = e.parts.find((
|
|
2277
|
+
const g = e.parts.find((v) => v.productId === u.id);
|
|
2262
2278
|
return /* @__PURE__ */ t.jsxs(
|
|
2263
2279
|
"div",
|
|
2264
2280
|
{
|
|
2265
|
-
className:
|
|
2266
|
-
onClick: (
|
|
2281
|
+
className: tn.buttonsBlock,
|
|
2282
|
+
onClick: (v) => v.stopPropagation(),
|
|
2267
2283
|
children: [
|
|
2268
2284
|
/* @__PURE__ */ t.jsx(
|
|
2269
2285
|
D,
|
|
@@ -2291,12 +2307,12 @@ const Ze = (r) => {
|
|
|
2291
2307
|
]
|
|
2292
2308
|
}
|
|
2293
2309
|
);
|
|
2294
|
-
},
|
|
2295
|
-
wrapper:
|
|
2296
|
-
logo:
|
|
2297
|
-
info:
|
|
2298
|
-
},
|
|
2299
|
-
const { general: i } =
|
|
2310
|
+
}, en = "_wrapper_27wzz_1", sn = "_logo_27wzz_8", nn = "_info_27wzz_12", It = {
|
|
2311
|
+
wrapper: en,
|
|
2312
|
+
logo: sn,
|
|
2313
|
+
info: nn
|
|
2314
|
+
}, Un = ({ date: r }) => {
|
|
2315
|
+
const { general: i } = Lt();
|
|
2300
2316
|
if (!i) return /* @__PURE__ */ t.jsx(t.Fragment, {});
|
|
2301
2317
|
function a(s) {
|
|
2302
2318
|
const e = new Date(s), c = {
|
|
@@ -2318,7 +2334,7 @@ const Ze = (r) => {
|
|
|
2318
2334
|
style: { objectFit: "contain", width: "48px", height: "48px" }
|
|
2319
2335
|
}
|
|
2320
2336
|
) : /* @__PURE__ */ t.jsx(
|
|
2321
|
-
|
|
2337
|
+
b,
|
|
2322
2338
|
{
|
|
2323
2339
|
name: "Image",
|
|
2324
2340
|
width: 48,
|
|
@@ -2330,28 +2346,28 @@ const Ze = (r) => {
|
|
|
2330
2346
|
/* @__PURE__ */ t.jsx("p", { id: "p", children: a(r) })
|
|
2331
2347
|
] })
|
|
2332
2348
|
] });
|
|
2333
|
-
},
|
|
2334
|
-
variants:
|
|
2335
|
-
variant:
|
|
2336
|
-
stock:
|
|
2337
|
-
variantInfo:
|
|
2338
|
-
chargeTypes:
|
|
2339
|
-
charge:
|
|
2340
|
-
chargeActive:
|
|
2341
|
-
title:
|
|
2342
|
-
modal:
|
|
2343
|
-
header:
|
|
2344
|
-
productOptions:
|
|
2345
|
-
loading:
|
|
2346
|
-
},
|
|
2349
|
+
}, an = "_variants_puxd1_80", on = "_variant_puxd1_80", cn = "_stock_puxd1_98", rn = "_variantInfo_puxd1_105", ln = "_chargeTypes_puxd1_165", dn = "_charge_puxd1_165", un = "_chargeActive_puxd1_190", hn = "_title_puxd1_198", pn = "_modal_puxd1_204", mn = "_header_puxd1_224", gn = "_productOptions_puxd1_232", fn = "_loading_puxd1_236", Q = {
|
|
2350
|
+
variants: an,
|
|
2351
|
+
variant: on,
|
|
2352
|
+
stock: cn,
|
|
2353
|
+
variantInfo: rn,
|
|
2354
|
+
chargeTypes: ln,
|
|
2355
|
+
charge: dn,
|
|
2356
|
+
chargeActive: un,
|
|
2357
|
+
title: hn,
|
|
2358
|
+
modal: pn,
|
|
2359
|
+
header: mn,
|
|
2360
|
+
productOptions: gn,
|
|
2361
|
+
loading: fn
|
|
2362
|
+
}, Fn = (r) => {
|
|
2347
2363
|
var n;
|
|
2348
|
-
const { pageContext: i } = vt(), a = (n = i == null ? void 0 : i.listings) == null ? void 0 : n.find((o) => o.id === r.productId), [s, e] = m.useState(!0), [c, d] = m.useState(null), u = (c == null ? void 0 : c.variants[0]) || null, [g,
|
|
2364
|
+
const { pageContext: i } = vt(), a = (n = i == null ? void 0 : i.listings) == null ? void 0 : n.find((o) => o.id === r.productId), [s, e] = m.useState(!0), [c, d] = m.useState(null), u = (c == null ? void 0 : c.variants[0]) || null, [g, x] = m.useState(
|
|
2349
2365
|
u != null && u.chargeTypes && u.chargeTypes.length > 1 ? u.chargeTypes[0] : "ONE_TIME"
|
|
2350
|
-
), { addProducts: P } = at(), { setIsOpen:
|
|
2366
|
+
), { addProducts: P } = at(), { setIsOpen: v } = ot();
|
|
2351
2367
|
return m.useEffect(() => {
|
|
2352
2368
|
(async () => {
|
|
2353
2369
|
e(!0);
|
|
2354
|
-
const p = await
|
|
2370
|
+
const p = await zt(
|
|
2355
2371
|
encodeURIComponent(
|
|
2356
2372
|
`/product/${a.productData.uniquePath}`
|
|
2357
2373
|
)
|
|
@@ -2359,27 +2375,27 @@ const Ze = (r) => {
|
|
|
2359
2375
|
P(p == null ? void 0 : p.data.products), d(p == null ? void 0 : p.data.products[0]), e(!1);
|
|
2360
2376
|
})();
|
|
2361
2377
|
}, []), m.useEffect(() => {
|
|
2362
|
-
|
|
2378
|
+
v(!0);
|
|
2363
2379
|
}, []), /* @__PURE__ */ t.jsx(dt, { close: r.setIsOpen, children: /* @__PURE__ */ t.jsxs(
|
|
2364
2380
|
"div",
|
|
2365
2381
|
{
|
|
2366
|
-
className:
|
|
2382
|
+
className: Q.modal,
|
|
2367
2383
|
onClick: (o) => o.stopPropagation(),
|
|
2368
2384
|
children: [
|
|
2369
|
-
s && /* @__PURE__ */ t.jsx("div", { className:
|
|
2385
|
+
s && /* @__PURE__ */ t.jsx("div", { className: Q.loading, children: /* @__PURE__ */ t.jsx($t, {}) }),
|
|
2370
2386
|
r.type === "Add To Cart" && c && u && !s && /* @__PURE__ */ t.jsx(
|
|
2371
|
-
|
|
2387
|
+
xn,
|
|
2372
2388
|
{
|
|
2373
2389
|
variants: c.variants,
|
|
2374
2390
|
activeVariant: u,
|
|
2375
2391
|
activeChargeType: g,
|
|
2376
|
-
setActiveChargeType:
|
|
2392
|
+
setActiveChargeType: x,
|
|
2377
2393
|
productId: c.id,
|
|
2378
2394
|
setIsOpen: r.setIsOpen
|
|
2379
2395
|
}
|
|
2380
2396
|
),
|
|
2381
2397
|
r.type === "Buy Now" && c && !s && /* @__PURE__ */ t.jsx(
|
|
2382
|
-
|
|
2398
|
+
_n,
|
|
2383
2399
|
{
|
|
2384
2400
|
product: c,
|
|
2385
2401
|
setIsOpen: r.setIsOpen
|
|
@@ -2388,101 +2404,101 @@ const Ze = (r) => {
|
|
|
2388
2404
|
]
|
|
2389
2405
|
}
|
|
2390
2406
|
) });
|
|
2391
|
-
},
|
|
2392
|
-
const { variants: i, activeChargeType: a, setActiveChargeType: s, activeVariant: e, productId: c, setIsOpen: d } = r, { cart: u, addProductToCart: g, addProducts:
|
|
2407
|
+
}, xn = (r) => {
|
|
2408
|
+
const { variants: i, activeChargeType: a, setActiveChargeType: s, activeVariant: e, productId: c, setIsOpen: d } = r, { cart: u, addProductToCart: g, addProducts: x, updateQuantityOfProduct: P } = at(), { notifications: v, setNotifications: n } = Ct(), { pageContext: o } = vt(), { setIsOpen: p } = ot(), E = () => {
|
|
2393
2409
|
p(!1), setTimeout(() => {
|
|
2394
2410
|
d(!1);
|
|
2395
2411
|
}, 300);
|
|
2396
2412
|
};
|
|
2397
|
-
async function
|
|
2398
|
-
const
|
|
2399
|
-
(M) => M.productId === r.productId && M.productVariantId ===
|
|
2413
|
+
async function _(j) {
|
|
2414
|
+
const N = u.parts.find(
|
|
2415
|
+
(M) => M.productId === r.productId && M.productVariantId === j
|
|
2400
2416
|
);
|
|
2401
|
-
|
|
2417
|
+
N ? P({
|
|
2402
2418
|
productId: c,
|
|
2403
|
-
productVariantId:
|
|
2404
|
-
quantity:
|
|
2405
|
-
}) : (o != null && o.products && await
|
|
2419
|
+
productVariantId: j,
|
|
2420
|
+
quantity: N.quantity + 1
|
|
2421
|
+
}) : (o != null && o.products && await x(o.products), await g({
|
|
2406
2422
|
productId: c,
|
|
2407
|
-
productVariantId:
|
|
2423
|
+
productVariantId: j,
|
|
2408
2424
|
quantity: 1
|
|
2409
2425
|
})), n([
|
|
2410
|
-
...
|
|
2426
|
+
...v,
|
|
2411
2427
|
{
|
|
2412
|
-
id:
|
|
2428
|
+
id: J(),
|
|
2413
2429
|
message: "Product added to cart",
|
|
2414
2430
|
status: "success"
|
|
2415
2431
|
}
|
|
2416
2432
|
]);
|
|
2417
2433
|
}
|
|
2418
2434
|
return /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
2419
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
2435
|
+
/* @__PURE__ */ t.jsxs("div", { className: Q.header, children: [
|
|
2420
2436
|
/* @__PURE__ */ t.jsx("div", { id: "h3", children: "Choose a variant" }),
|
|
2421
2437
|
/* @__PURE__ */ t.jsx(
|
|
2422
|
-
|
|
2438
|
+
b,
|
|
2423
2439
|
{
|
|
2424
2440
|
name: "X",
|
|
2425
2441
|
width: 24,
|
|
2426
2442
|
height: 24,
|
|
2427
2443
|
fill: "var(--text-secondary)",
|
|
2428
2444
|
hoverable: !0,
|
|
2429
|
-
onClick:
|
|
2445
|
+
onClick: E
|
|
2430
2446
|
}
|
|
2431
2447
|
)
|
|
2432
2448
|
] }),
|
|
2433
|
-
e.chargeTypes && e.chargeTypes.length > 1 && /* @__PURE__ */ t.jsx("div", { className:
|
|
2449
|
+
e.chargeTypes && e.chargeTypes.length > 1 && /* @__PURE__ */ t.jsx("div", { className: Q.chargeTypes, children: e.chargeTypes.map((j) => /* @__PURE__ */ t.jsx(
|
|
2434
2450
|
"div",
|
|
2435
2451
|
{
|
|
2436
|
-
className:
|
|
2437
|
-
[
|
|
2452
|
+
className: U(Q.charge, {
|
|
2453
|
+
[Q.chargeActive]: a === j
|
|
2438
2454
|
}),
|
|
2439
|
-
onClick: () => s(
|
|
2440
|
-
children: St[
|
|
2455
|
+
onClick: () => s(j),
|
|
2456
|
+
children: St[j]
|
|
2441
2457
|
},
|
|
2442
|
-
|
|
2458
|
+
j
|
|
2443
2459
|
)) }),
|
|
2444
|
-
/* @__PURE__ */ t.jsx("div", { className:
|
|
2445
|
-
var
|
|
2460
|
+
/* @__PURE__ */ t.jsx("div", { className: Q.variants, children: i.map((j) => {
|
|
2461
|
+
var N, M;
|
|
2446
2462
|
return /* @__PURE__ */ t.jsxs(
|
|
2447
2463
|
"div",
|
|
2448
2464
|
{
|
|
2449
|
-
className:
|
|
2465
|
+
className: U(Q.variant),
|
|
2450
2466
|
onClick: () => {
|
|
2451
|
-
|
|
2467
|
+
_(j.id), d(!1);
|
|
2452
2468
|
},
|
|
2453
2469
|
children: [
|
|
2454
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
2455
|
-
/* @__PURE__ */ t.jsx("span", { className:
|
|
2470
|
+
/* @__PURE__ */ t.jsxs("div", { className: Q.variantInfo, children: [
|
|
2471
|
+
/* @__PURE__ */ t.jsx("span", { className: Q.title, children: j.name }),
|
|
2456
2472
|
/* @__PURE__ */ t.jsxs("span", { children: [
|
|
2457
2473
|
"$",
|
|
2458
|
-
a === "ONE_TIME" ?
|
|
2474
|
+
a === "ONE_TIME" ? j.price.amount : j.subscriptionSettings ? j.subscriptionSettings.price.amount : "Price Not Found"
|
|
2459
2475
|
] })
|
|
2460
2476
|
] }),
|
|
2461
|
-
/* @__PURE__ */ t.jsx("div", { children: a === "ONE_TIME" && /* @__PURE__ */ t.jsxs("span", { className:
|
|
2462
|
-
(
|
|
2477
|
+
/* @__PURE__ */ t.jsx("div", { children: a === "ONE_TIME" && /* @__PURE__ */ t.jsxs("span", { className: Q.stock, children: [
|
|
2478
|
+
(N = j.quantity.restrictions) != null && N.max || j.quantity.available !== void 0 ? ((M = j.quantity.restrictions) == null ? void 0 : M.max) || j.quantity.available : "∞",
|
|
2463
2479
|
" ",
|
|
2464
2480
|
"in stock"
|
|
2465
2481
|
] }) })
|
|
2466
2482
|
]
|
|
2467
2483
|
},
|
|
2468
|
-
|
|
2484
|
+
j.id
|
|
2469
2485
|
);
|
|
2470
2486
|
}) })
|
|
2471
2487
|
] });
|
|
2472
|
-
},
|
|
2488
|
+
}, _n = (r) => {
|
|
2473
2489
|
const { product: i, setIsOpen: a } = r, { setIsOpen: s } = ot(), e = () => {
|
|
2474
2490
|
s(!1), setTimeout(() => {
|
|
2475
2491
|
a(!1);
|
|
2476
2492
|
}, 300);
|
|
2477
2493
|
};
|
|
2478
2494
|
return /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
2479
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
2495
|
+
/* @__PURE__ */ t.jsxs("div", { className: Q.header, children: [
|
|
2480
2496
|
/* @__PURE__ */ t.jsxs("div", { id: "h3", children: [
|
|
2481
2497
|
"Buy ",
|
|
2482
2498
|
it(i.name)
|
|
2483
2499
|
] }),
|
|
2484
2500
|
/* @__PURE__ */ t.jsx(
|
|
2485
|
-
|
|
2501
|
+
b,
|
|
2486
2502
|
{
|
|
2487
2503
|
name: "X",
|
|
2488
2504
|
width: 24,
|
|
@@ -2497,38 +2513,38 @@ const Ze = (r) => {
|
|
|
2497
2513
|
}
|
|
2498
2514
|
)
|
|
2499
2515
|
] }),
|
|
2500
|
-
/* @__PURE__ */ t.jsx("div", { className:
|
|
2501
|
-
|
|
2516
|
+
/* @__PURE__ */ t.jsx("div", { className: Q.productOptions, children: /* @__PURE__ */ t.jsx(
|
|
2517
|
+
ts,
|
|
2502
2518
|
{
|
|
2503
2519
|
product: i,
|
|
2504
2520
|
setIsOpen: a
|
|
2505
2521
|
}
|
|
2506
2522
|
) })
|
|
2507
2523
|
] });
|
|
2508
|
-
},
|
|
2509
|
-
contentModal:
|
|
2510
|
-
modalTop:
|
|
2511
|
-
loading:
|
|
2512
|
-
modalCards:
|
|
2513
|
-
modalImage:
|
|
2514
|
-
card:
|
|
2515
|
-
cardInfo:
|
|
2516
|
-
cardButtons:
|
|
2517
|
-
title:
|
|
2518
|
-
blockImage:
|
|
2519
|
-
},
|
|
2520
|
-
const { setIsOpen: i, pageContext: a, groupData: s, setProductId: e, setIsProductModalOpen: c } = r, [d, u] = m.useState(null), [g,
|
|
2524
|
+
}, jn = "_contentModal_2a136_1", vn = "_modalTop_2a136_13", bn = "_loading_2a136_19", yn = "_modalCards_2a136_27", In = "_modalImage_2a136_32", Nn = "_card_2a136_37", Cn = "_cardInfo_2a136_48", Sn = "_cardButtons_2a136_55", kn = "_title_2a136_61", wn = "_blockImage_2a136_68", G = {
|
|
2525
|
+
contentModal: jn,
|
|
2526
|
+
modalTop: vn,
|
|
2527
|
+
loading: bn,
|
|
2528
|
+
modalCards: yn,
|
|
2529
|
+
modalImage: In,
|
|
2530
|
+
card: Nn,
|
|
2531
|
+
cardInfo: Cn,
|
|
2532
|
+
cardButtons: Sn,
|
|
2533
|
+
title: kn,
|
|
2534
|
+
blockImage: wn
|
|
2535
|
+
}, Vn = (r) => {
|
|
2536
|
+
const { setIsOpen: i, pageContext: a, groupData: s, setProductId: e, setIsProductModalOpen: c } = r, [d, u] = m.useState(null), [g, x] = m.useState(!0), { setIsOpen: P } = ot();
|
|
2521
2537
|
m.useEffect(() => {
|
|
2522
2538
|
var p;
|
|
2523
|
-
|
|
2539
|
+
x(!0);
|
|
2524
2540
|
const o = (p = a.listings) == null ? void 0 : p.filter(
|
|
2525
|
-
(
|
|
2541
|
+
(E) => s.listingIdList.includes(E.id)
|
|
2526
2542
|
);
|
|
2527
|
-
o && u([...o]),
|
|
2543
|
+
o && u([...o]), x(!1);
|
|
2528
2544
|
}, [a]), m.useEffect(() => {
|
|
2529
2545
|
P(!0);
|
|
2530
2546
|
}, []);
|
|
2531
|
-
const
|
|
2547
|
+
const v = () => {
|
|
2532
2548
|
P(!1), setTimeout(() => {
|
|
2533
2549
|
i(!1);
|
|
2534
2550
|
}, 300);
|
|
@@ -2539,31 +2555,31 @@ const Ze = (r) => {
|
|
|
2539
2555
|
return /* @__PURE__ */ t.jsx(dt, { close: () => i(!1), children: /* @__PURE__ */ t.jsxs(
|
|
2540
2556
|
"div",
|
|
2541
2557
|
{
|
|
2542
|
-
className:
|
|
2558
|
+
className: G.contentModal,
|
|
2543
2559
|
onClick: (o) => o.stopPropagation(),
|
|
2544
2560
|
children: [
|
|
2545
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
2561
|
+
/* @__PURE__ */ t.jsxs("div", { className: G.modalTop, children: [
|
|
2546
2562
|
/* @__PURE__ */ t.jsx(
|
|
2547
2563
|
"span",
|
|
2548
2564
|
{
|
|
2549
|
-
className:
|
|
2565
|
+
className: G.title,
|
|
2550
2566
|
id: "h4",
|
|
2551
2567
|
children: it(s.name)
|
|
2552
2568
|
}
|
|
2553
2569
|
),
|
|
2554
2570
|
/* @__PURE__ */ t.jsx(
|
|
2555
|
-
|
|
2571
|
+
b,
|
|
2556
2572
|
{
|
|
2557
2573
|
name: "X",
|
|
2558
2574
|
hoverable: !0,
|
|
2559
|
-
onClick:
|
|
2575
|
+
onClick: v
|
|
2560
2576
|
}
|
|
2561
2577
|
)
|
|
2562
2578
|
] }),
|
|
2563
|
-
!g && d && /* @__PURE__ */ t.jsx("div", { className:
|
|
2579
|
+
!g && d && /* @__PURE__ */ t.jsx("div", { className: G.modalCards, children: d.map((o) => /* @__PURE__ */ t.jsxs(
|
|
2564
2580
|
"div",
|
|
2565
2581
|
{
|
|
2566
|
-
className:
|
|
2582
|
+
className: G.card,
|
|
2567
2583
|
children: [
|
|
2568
2584
|
/* @__PURE__ */ t.jsx("div", { children: o.productData.images[0] ? /* @__PURE__ */ t.jsx(
|
|
2569
2585
|
"img",
|
|
@@ -2572,14 +2588,14 @@ const Ze = (r) => {
|
|
|
2572
2588
|
alt: "",
|
|
2573
2589
|
width: 64,
|
|
2574
2590
|
height: 64,
|
|
2575
|
-
className:
|
|
2591
|
+
className: G.modalImage
|
|
2576
2592
|
}
|
|
2577
|
-
) : /* @__PURE__ */ t.jsx("div", { className:
|
|
2578
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
2593
|
+
) : /* @__PURE__ */ t.jsx("div", { className: U(G.blockImage, G.modalImage), children: /* @__PURE__ */ t.jsx(b, { name: "Image" }) }) }),
|
|
2594
|
+
/* @__PURE__ */ t.jsxs("div", { className: G.cardInfo, children: [
|
|
2579
2595
|
/* @__PURE__ */ t.jsxs(
|
|
2580
2596
|
"span",
|
|
2581
2597
|
{
|
|
2582
|
-
className:
|
|
2598
|
+
className: G.name,
|
|
2583
2599
|
id: "h5",
|
|
2584
2600
|
children: [
|
|
2585
2601
|
it(o.productData.name),
|
|
@@ -2594,14 +2610,14 @@ const Ze = (r) => {
|
|
|
2594
2610
|
o.productData.shortDescription && /* @__PURE__ */ t.jsx(
|
|
2595
2611
|
"span",
|
|
2596
2612
|
{
|
|
2597
|
-
className:
|
|
2613
|
+
className: G.short,
|
|
2598
2614
|
id: "md",
|
|
2599
2615
|
children: it(o.productData.shortDescription)
|
|
2600
2616
|
}
|
|
2601
2617
|
),
|
|
2602
2618
|
/* @__PURE__ */ t.jsx("span", {})
|
|
2603
2619
|
] }),
|
|
2604
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
2620
|
+
/* @__PURE__ */ t.jsxs("div", { className: G.cardButtons, children: [
|
|
2605
2621
|
/* @__PURE__ */ t.jsx(
|
|
2606
2622
|
D,
|
|
2607
2623
|
{
|
|
@@ -2612,59 +2628,59 @@ const Ze = (r) => {
|
|
|
2612
2628
|
children: "Buy"
|
|
2613
2629
|
}
|
|
2614
2630
|
),
|
|
2615
|
-
/* @__PURE__ */ t.jsx(
|
|
2631
|
+
/* @__PURE__ */ t.jsx(Ks, { path: `/product/${o.productData.uniquePath}`, children: /* @__PURE__ */ t.jsx(D, { type: "Primary", children: "View Details" }) })
|
|
2616
2632
|
] })
|
|
2617
2633
|
]
|
|
2618
2634
|
},
|
|
2619
2635
|
o.id
|
|
2620
2636
|
)) }),
|
|
2621
|
-
g && /* @__PURE__ */ t.jsx("div", { className:
|
|
2637
|
+
g && /* @__PURE__ */ t.jsx("div", { className: G.loading, children: /* @__PURE__ */ t.jsx($t, {}) })
|
|
2622
2638
|
]
|
|
2623
2639
|
}
|
|
2624
2640
|
) });
|
|
2625
2641
|
};
|
|
2626
2642
|
export {
|
|
2627
|
-
|
|
2628
|
-
|
|
2643
|
+
zn as Accordion,
|
|
2644
|
+
Es as BurgerMenuButton,
|
|
2629
2645
|
D as Button,
|
|
2630
2646
|
Be as ButtonTypeSettings,
|
|
2631
|
-
|
|
2632
|
-
|
|
2647
|
+
An as ButtonsSettings,
|
|
2648
|
+
Tn as CategorySettings,
|
|
2633
2649
|
St as ChargeTypes,
|
|
2634
2650
|
qt as ChooseImage,
|
|
2635
|
-
|
|
2636
|
-
|
|
2637
|
-
|
|
2638
|
-
|
|
2639
|
-
|
|
2640
|
-
|
|
2651
|
+
Wn as ChooseImageModal,
|
|
2652
|
+
Os as EmptyCart,
|
|
2653
|
+
On as FormSettings,
|
|
2654
|
+
Vn as GroupCardModal,
|
|
2655
|
+
Dn as HeaderButtons,
|
|
2656
|
+
b as Icon,
|
|
2641
2657
|
Nt as InputSettings,
|
|
2642
2658
|
Et as InputUI,
|
|
2643
|
-
|
|
2644
|
-
|
|
2645
|
-
|
|
2646
|
-
|
|
2647
|
-
|
|
2648
|
-
|
|
2659
|
+
Xn as ItemsSettings,
|
|
2660
|
+
Bn as LayoutSettings,
|
|
2661
|
+
Ks as Link,
|
|
2662
|
+
En as ListingSelector,
|
|
2663
|
+
$t as Loader,
|
|
2664
|
+
Un as MetaInfoPost,
|
|
2649
2665
|
dt as Modal,
|
|
2650
|
-
|
|
2651
|
-
|
|
2652
|
-
|
|
2653
|
-
|
|
2654
|
-
|
|
2655
|
-
|
|
2656
|
-
|
|
2666
|
+
Rn as PagesMobileMenu,
|
|
2667
|
+
As as PagesMobileModal,
|
|
2668
|
+
qn as PagesSettings,
|
|
2669
|
+
Hn as ProductCardButtons,
|
|
2670
|
+
Fn as ProductCardModal,
|
|
2671
|
+
ts as ProductOptions,
|
|
2672
|
+
Qn as RadioUI,
|
|
2657
2673
|
kt as RangeSelector,
|
|
2658
2674
|
nt as Select,
|
|
2659
|
-
|
|
2660
|
-
|
|
2661
|
-
|
|
2675
|
+
Jn as SelectInfiniteList,
|
|
2676
|
+
Kn as SelectUI,
|
|
2677
|
+
Ln as ShareLink,
|
|
2662
2678
|
Ts as ShoppingButton,
|
|
2663
|
-
|
|
2679
|
+
qs as ShoppingModalCart,
|
|
2664
2680
|
rt as Switch,
|
|
2665
|
-
|
|
2666
|
-
|
|
2667
|
-
|
|
2668
|
-
|
|
2669
|
-
|
|
2681
|
+
Zn as TextSettings,
|
|
2682
|
+
ti as TextareaSettings,
|
|
2683
|
+
ei as TextareaUI,
|
|
2684
|
+
si as TypesText,
|
|
2685
|
+
Bt as UserInfo
|
|
2670
2686
|
};
|