@billgangcom/theme-lib 1.52.2 → 1.53.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/App.d.ts +2 -1
- package/dist/builder/constants/api.d.ts +1 -0
- package/dist/builder.cjs.js +46 -46
- package/dist/builder.es.js +1802 -1781
- package/dist/{index-Dxxdn8DO.cjs → index-4JZvuz4K.cjs} +32 -32
- package/dist/{index-B2Rk8_zm.js → index-BmN4PZT1.js} +3344 -3304
- package/dist/index.cjs.js +1 -1
- package/dist/index.es.js +10 -7
- package/dist/lib/createTicket.d.ts +4 -0
- package/dist/lib/index.d.ts +1 -0
- package/dist/ui/ButtonsSettings/index.d.ts +2 -0
- package/dist/ui/FormSettings/index.d.ts +2 -0
- package/dist/ui/FormSettings/popup.d.ts +7 -1
- package/dist/ui/Input/index.d.ts +1 -0
- package/dist/ui/Textarea/index.d.ts +1 -0
- package/dist/ui.cjs.js +1 -1
- package/dist/ui.es.js +1015 -1011
- package/package.json +1 -1
package/dist/ui.es.js
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import { j as t, I as
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
1
|
+
import { j as t, I as x, c as Y, a as dt, S as ot, b as yt, B as tt, O as ut, d as at, e as mt, f as ht, P as pt, D as _t, g as gt, v as xt, h as ft, C as bt, i as H, k as St, l as it, m as wt, n as Bt, o as $t, p as rt, q as V, L as Pt, r as lt, t as jt, w as G, x as Mt, M as vt, y as Nt, z as Tt, A as kt, E as qt } from "./index-BmN4PZT1.js";
|
|
2
|
+
import { K as hi, G as pi, J as _i, F as gi, T as xi, H as fi } from "./index-BmN4PZT1.js";
|
|
3
|
+
import _ from "react";
|
|
4
4
|
import "@phosphor-icons/react";
|
|
5
|
-
const
|
|
6
|
-
wrapper:
|
|
7
|
-
alignmentBlock:
|
|
8
|
-
title:
|
|
9
|
-
subtitle:
|
|
10
|
-
alignmentContent:
|
|
11
|
-
alignments:
|
|
5
|
+
const At = "_wrapper_1vmyb_2", Ot = "_alignmentBlock_1vmyb_8", Et = "_title_1vmyb_15", zt = "_subtitle_1vmyb_22", Rt = "_alignmentContent_1vmyb_29", Lt = "_alignments_1vmyb_37", Dt = "_alignment_1vmyb_8", Ht = "_circle_1vmyb_60", Ut = "_paddings_1vmyb_67", Ft = "_padding_1vmyb_67", Vt = "_active_1vmyb_91", Yt = "_input_1vmyb_98", W = {
|
|
6
|
+
wrapper: At,
|
|
7
|
+
alignmentBlock: Ot,
|
|
8
|
+
title: Et,
|
|
9
|
+
subtitle: zt,
|
|
10
|
+
alignmentContent: Rt,
|
|
11
|
+
alignments: Lt,
|
|
12
12
|
alignment: Dt,
|
|
13
|
-
circle:
|
|
14
|
-
paddings:
|
|
15
|
-
padding:
|
|
16
|
-
active:
|
|
17
|
-
input:
|
|
18
|
-
},
|
|
13
|
+
circle: Ht,
|
|
14
|
+
paddings: Ut,
|
|
15
|
+
padding: Ft,
|
|
16
|
+
active: Vt,
|
|
17
|
+
input: Yt
|
|
18
|
+
}, Gt = [
|
|
19
19
|
"topLeft",
|
|
20
20
|
"top",
|
|
21
21
|
"topRight",
|
|
@@ -25,10 +25,10 @@ const qt = "_wrapper_1ibay_2", At = "_alignmentBlock_1ibay_8", Ot = "_title_1iba
|
|
|
25
25
|
"bottomLeft",
|
|
26
26
|
"bottom",
|
|
27
27
|
"bottomRight"
|
|
28
|
-
], Wt = ["left", "top", "right", "bottom"],
|
|
29
|
-
const { alignment:
|
|
30
|
-
function
|
|
31
|
-
switch (
|
|
28
|
+
], Wt = ["left", "top", "right", "bottom"], Kn = (r) => {
|
|
29
|
+
const { alignment: i, padding: e, setPadding: s, setAlignment: n } = r;
|
|
30
|
+
function h(c) {
|
|
31
|
+
switch (c) {
|
|
32
32
|
case "left":
|
|
33
33
|
case "topLeft":
|
|
34
34
|
case "bottomLeft":
|
|
@@ -45,8 +45,8 @@ const qt = "_wrapper_1ibay_2", At = "_alignmentBlock_1ibay_8", Ot = "_title_1iba
|
|
|
45
45
|
return "TextAlignCenter";
|
|
46
46
|
}
|
|
47
47
|
}
|
|
48
|
-
function
|
|
49
|
-
switch (
|
|
48
|
+
function u(c) {
|
|
49
|
+
switch (c) {
|
|
50
50
|
case "left":
|
|
51
51
|
return "AlignLeft";
|
|
52
52
|
case "right":
|
|
@@ -57,40 +57,40 @@ const qt = "_wrapper_1ibay_2", At = "_alignmentBlock_1ibay_8", Ot = "_title_1iba
|
|
|
57
57
|
return "AlignBottom";
|
|
58
58
|
}
|
|
59
59
|
}
|
|
60
|
-
const [
|
|
60
|
+
const [o, d] = _.useState(null), [f, $] = _.useState(null);
|
|
61
61
|
return /* @__PURE__ */ t.jsxs("div", { className: W.layout, children: [
|
|
62
62
|
/* @__PURE__ */ t.jsx("h3", { className: W.title, children: "Layout" }),
|
|
63
63
|
/* @__PURE__ */ t.jsxs("div", { className: W.alignmentBlock, children: [
|
|
64
64
|
/* @__PURE__ */ t.jsx("h5", { className: W.subtitle, children: "Alignment" }),
|
|
65
65
|
/* @__PURE__ */ t.jsxs("div", { className: W.alignmentContent, children: [
|
|
66
|
-
/* @__PURE__ */ t.jsx("div", { className: W.alignments, children:
|
|
66
|
+
/* @__PURE__ */ t.jsx("div", { className: W.alignments, children: Gt.map((c) => /* @__PURE__ */ t.jsxs(
|
|
67
67
|
"div",
|
|
68
68
|
{
|
|
69
69
|
onClick: () => {
|
|
70
|
-
n(
|
|
70
|
+
n(c);
|
|
71
71
|
},
|
|
72
72
|
className: W.alignment,
|
|
73
73
|
onMouseEnter: () => {
|
|
74
|
-
|
|
74
|
+
d(c);
|
|
75
75
|
},
|
|
76
76
|
onMouseLeave: () => {
|
|
77
|
-
|
|
77
|
+
d(null);
|
|
78
78
|
},
|
|
79
79
|
children: [
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
80
|
+
c !== i && o !== c && /* @__PURE__ */ t.jsx("div", { className: W.circle }),
|
|
81
|
+
c !== i && o === c && /* @__PURE__ */ t.jsx(
|
|
82
|
+
x,
|
|
83
83
|
{
|
|
84
|
-
name:
|
|
84
|
+
name: h(o),
|
|
85
85
|
fill: "#c2c2c2",
|
|
86
86
|
width: 22,
|
|
87
87
|
height: 22
|
|
88
88
|
}
|
|
89
89
|
),
|
|
90
|
-
|
|
91
|
-
|
|
90
|
+
c === i && /* @__PURE__ */ t.jsx(
|
|
91
|
+
x,
|
|
92
92
|
{
|
|
93
|
-
name:
|
|
93
|
+
name: h(i),
|
|
94
94
|
fill: "#FF3F19",
|
|
95
95
|
width: 22,
|
|
96
96
|
height: 22
|
|
@@ -98,104 +98,105 @@ const qt = "_wrapper_1ibay_2", At = "_alignmentBlock_1ibay_8", Ot = "_title_1iba
|
|
|
98
98
|
)
|
|
99
99
|
]
|
|
100
100
|
},
|
|
101
|
-
|
|
101
|
+
c
|
|
102
102
|
)) }),
|
|
103
|
-
/* @__PURE__ */ t.jsx("div", { className: W.paddings, children: Wt.map((
|
|
103
|
+
/* @__PURE__ */ t.jsx("div", { className: W.paddings, children: Wt.map((c) => /* @__PURE__ */ t.jsxs(
|
|
104
104
|
"label",
|
|
105
105
|
{
|
|
106
|
-
className:
|
|
107
|
-
[W.active]:
|
|
106
|
+
className: Y(W.padding, {
|
|
107
|
+
[W.active]: f === c
|
|
108
108
|
}),
|
|
109
109
|
onFocus: () => {
|
|
110
|
-
|
|
110
|
+
$(c);
|
|
111
111
|
},
|
|
112
112
|
onBlur: () => {
|
|
113
|
-
|
|
113
|
+
$(null);
|
|
114
114
|
},
|
|
115
115
|
children: [
|
|
116
116
|
/* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
|
|
117
|
-
|
|
117
|
+
x,
|
|
118
118
|
{
|
|
119
|
-
name:
|
|
119
|
+
name: u(c),
|
|
120
120
|
width: 20,
|
|
121
121
|
height: 20
|
|
122
122
|
}
|
|
123
123
|
) }),
|
|
124
124
|
/* @__PURE__ */ t.jsx(
|
|
125
|
-
|
|
125
|
+
dt,
|
|
126
126
|
{
|
|
127
127
|
type: "number",
|
|
128
|
-
value: String(e[
|
|
129
|
-
onChange: (
|
|
128
|
+
value: String(e[c]),
|
|
129
|
+
onChange: (l) => s({
|
|
130
130
|
...e,
|
|
131
|
-
[
|
|
131
|
+
[c]: Math.min(Number(l), 999)
|
|
132
132
|
}),
|
|
133
|
+
max: 999,
|
|
133
134
|
paddingless: !0,
|
|
134
135
|
borderless: !0
|
|
135
136
|
}
|
|
136
137
|
)
|
|
137
138
|
]
|
|
138
139
|
},
|
|
139
|
-
|
|
140
|
+
c
|
|
140
141
|
)) })
|
|
141
142
|
] })
|
|
142
143
|
] })
|
|
143
144
|
] });
|
|
144
|
-
},
|
|
145
|
-
title:
|
|
146
|
-
subtitle:
|
|
147
|
-
header:
|
|
148
|
-
text:
|
|
149
|
-
productsBlock:
|
|
150
|
-
top:
|
|
151
|
-
itemsBlock:
|
|
152
|
-
typeTexts:
|
|
153
|
-
block:
|
|
154
|
-
active:
|
|
155
|
-
products:
|
|
156
|
-
product:
|
|
157
|
-
button:
|
|
158
|
-
disabled:
|
|
159
|
-
image:
|
|
160
|
-
info:
|
|
161
|
-
name:
|
|
162
|
-
buttons:
|
|
163
|
-
modal:
|
|
164
|
-
link:
|
|
165
|
-
modalOptions:
|
|
166
|
-
addButton:
|
|
167
|
-
deleteButton:
|
|
168
|
-
},
|
|
145
|
+
}, Jt = "_title_82zux_1", Xt = "_subtitle_82zux_5", Kt = "_header_82zux_12", Qt = "_text_82zux_13", Zt = "_productsBlock_82zux_14", te = "_top_82zux_26", ee = "_itemsBlock_82zux_35", se = "_typeTexts_82zux_41", ne = "_block_82zux_48", ie = "_active_82zux_61", oe = "_products_82zux_14", ae = "_product_82zux_14", ce = "_button_82zux_80", le = "_disabled_82zux_91", re = "_image_82zux_95", de = "_info_82zux_102", ue = "_name_82zux_114", me = "_buttons_82zux_118", he = "_modal_82zux_125", pe = "_link_82zux_145", _e = "_modalOptions_82zux_151", ge = "_addButton_82zux_157", xe = "_deleteButton_82zux_179", J = {
|
|
146
|
+
title: Jt,
|
|
147
|
+
subtitle: Xt,
|
|
148
|
+
header: Kt,
|
|
149
|
+
text: Qt,
|
|
150
|
+
productsBlock: Zt,
|
|
151
|
+
top: te,
|
|
152
|
+
itemsBlock: ee,
|
|
153
|
+
typeTexts: se,
|
|
154
|
+
block: ne,
|
|
155
|
+
active: ie,
|
|
156
|
+
products: oe,
|
|
157
|
+
product: ae,
|
|
158
|
+
button: ce,
|
|
159
|
+
disabled: le,
|
|
160
|
+
image: re,
|
|
161
|
+
info: de,
|
|
162
|
+
name: ue,
|
|
163
|
+
buttons: me,
|
|
164
|
+
modal: he,
|
|
165
|
+
link: pe,
|
|
166
|
+
modalOptions: _e,
|
|
167
|
+
addButton: ge,
|
|
168
|
+
deleteButton: xe
|
|
169
|
+
}, Qn = (r) => {
|
|
169
170
|
const {
|
|
170
|
-
isActiveItems:
|
|
171
|
+
isActiveItems: i,
|
|
171
172
|
setIsActiveItems: e,
|
|
172
173
|
items: s,
|
|
173
174
|
setItems: n,
|
|
174
|
-
other:
|
|
175
|
-
title:
|
|
176
|
-
subtitle:
|
|
177
|
-
draggable:
|
|
178
|
-
withImage:
|
|
179
|
-
addable:
|
|
180
|
-
itemsOptions:
|
|
181
|
-
hasRangeSelector:
|
|
182
|
-
rangeSelectorOptions:
|
|
183
|
-
limit:
|
|
184
|
-
autoScrollInterval:
|
|
185
|
-
deletable:
|
|
175
|
+
other: h,
|
|
176
|
+
title: u,
|
|
177
|
+
subtitle: o,
|
|
178
|
+
draggable: d = !1,
|
|
179
|
+
withImage: f = !1,
|
|
180
|
+
addable: $ = !0,
|
|
181
|
+
itemsOptions: c,
|
|
182
|
+
hasRangeSelector: l = !1,
|
|
183
|
+
rangeSelectorOptions: M,
|
|
184
|
+
limit: w,
|
|
185
|
+
autoScrollInterval: p,
|
|
186
|
+
deletable: I
|
|
186
187
|
} = r;
|
|
187
|
-
function
|
|
188
|
-
if (
|
|
189
|
-
return
|
|
188
|
+
function B(v) {
|
|
189
|
+
if (f)
|
|
190
|
+
return v ? /* @__PURE__ */ t.jsx(
|
|
190
191
|
"img",
|
|
191
192
|
{
|
|
192
|
-
src: `https://imagedelivery.net/${
|
|
193
|
+
src: `https://imagedelivery.net/${v[0]}/w=1000`,
|
|
193
194
|
alt: "image",
|
|
194
195
|
width: 16,
|
|
195
196
|
height: 16
|
|
196
197
|
}
|
|
197
198
|
) : /* @__PURE__ */ t.jsx(
|
|
198
|
-
|
|
199
|
+
x,
|
|
199
200
|
{
|
|
200
201
|
name: "Image",
|
|
201
202
|
width: 16,
|
|
@@ -204,12 +205,12 @@ const qt = "_wrapper_1ibay_2", At = "_alignmentBlock_1ibay_8", Ot = "_title_1iba
|
|
|
204
205
|
}
|
|
205
206
|
);
|
|
206
207
|
}
|
|
207
|
-
const
|
|
208
|
-
const
|
|
209
|
-
if (!
|
|
210
|
-
const
|
|
211
|
-
|
|
212
|
-
|
|
208
|
+
const g = (v, q = !1) => {
|
|
209
|
+
const A = c.find((S) => S.id === v);
|
|
210
|
+
if (!A) return;
|
|
211
|
+
const L = /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
212
|
+
d && /* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
|
|
213
|
+
x,
|
|
213
214
|
{
|
|
214
215
|
name: "DotsSixVertical",
|
|
215
216
|
hoverable: !0,
|
|
@@ -218,56 +219,56 @@ const qt = "_wrapper_1ibay_2", At = "_alignmentBlock_1ibay_8", Ot = "_title_1iba
|
|
|
218
219
|
}
|
|
219
220
|
) }),
|
|
220
221
|
/* @__PURE__ */ t.jsx(
|
|
221
|
-
|
|
222
|
+
at,
|
|
222
223
|
{
|
|
223
|
-
onChange: (
|
|
224
|
-
const
|
|
225
|
-
if (!
|
|
226
|
-
const
|
|
227
|
-
n([...
|
|
224
|
+
onChange: (S) => {
|
|
225
|
+
const b = [...s], N = c.find((j) => j.name === S);
|
|
226
|
+
if (!N) return;
|
|
227
|
+
const O = N.id, a = b.map((j) => j === v ? O : j);
|
|
228
|
+
n([...a]);
|
|
228
229
|
},
|
|
229
|
-
value:
|
|
230
|
-
options:
|
|
231
|
-
leftAddon:
|
|
230
|
+
value: A.name,
|
|
231
|
+
options: c.filter((S) => !s.find((b) => b === S.id)).map((S) => S.name),
|
|
232
|
+
leftAddon: B(A.images)
|
|
232
233
|
}
|
|
233
234
|
),
|
|
234
|
-
|
|
235
|
-
|
|
235
|
+
q && /* @__PURE__ */ t.jsx("div", { className: J.buttons, children: /* @__PURE__ */ t.jsx("div", { className: J.deleteButton, children: /* @__PURE__ */ t.jsx(
|
|
236
|
+
x,
|
|
236
237
|
{
|
|
237
238
|
name: "Trash",
|
|
238
239
|
hoverable: !0,
|
|
239
240
|
width: 20,
|
|
240
241
|
height: 20,
|
|
241
242
|
fill: "#C12A2A",
|
|
242
|
-
onClick: () => n(s.filter((
|
|
243
|
+
onClick: () => n(s.filter((S) => S !== v))
|
|
243
244
|
}
|
|
244
245
|
) }) })
|
|
245
246
|
] });
|
|
246
247
|
return /* @__PURE__ */ t.jsx(
|
|
247
248
|
"div",
|
|
248
249
|
{
|
|
249
|
-
className:
|
|
250
|
-
children:
|
|
250
|
+
className: J.product,
|
|
251
|
+
children: L
|
|
251
252
|
},
|
|
252
|
-
|
|
253
|
+
v
|
|
253
254
|
);
|
|
254
255
|
};
|
|
255
|
-
return /* @__PURE__ */ t.jsxs("div", { className:
|
|
256
|
-
(
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
256
|
+
return /* @__PURE__ */ t.jsxs("div", { className: J.productsBlock, children: [
|
|
257
|
+
(u || i !== void 0) && /* @__PURE__ */ t.jsxs("div", { className: J.top, children: [
|
|
258
|
+
u && /* @__PURE__ */ t.jsx("h3", { className: J.title, children: u }),
|
|
259
|
+
i !== void 0 && /* @__PURE__ */ t.jsx(
|
|
260
|
+
ot,
|
|
260
261
|
{
|
|
261
|
-
current:
|
|
262
|
-
onChange: (
|
|
262
|
+
current: i,
|
|
263
|
+
onChange: (v) => e == null ? void 0 : e(v)
|
|
263
264
|
}
|
|
264
265
|
)
|
|
265
266
|
] }),
|
|
266
|
-
|
|
267
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
268
|
-
|
|
269
|
-
s.map((
|
|
270
|
-
|
|
267
|
+
l && M && /* @__PURE__ */ t.jsx(yt, { ...M }),
|
|
268
|
+
/* @__PURE__ */ t.jsxs("div", { className: J.products, children: [
|
|
269
|
+
o && /* @__PURE__ */ t.jsx("h5", { className: J.subtitle, children: o }),
|
|
270
|
+
s.map((v) => g(v, I)),
|
|
271
|
+
$ && /* @__PURE__ */ t.jsx(
|
|
271
272
|
"div",
|
|
272
273
|
{
|
|
273
274
|
style: {
|
|
@@ -280,30 +281,30 @@ const qt = "_wrapper_1ibay_2", At = "_alignmentBlock_1ibay_8", Ot = "_title_1iba
|
|
|
280
281
|
tt,
|
|
281
282
|
{
|
|
282
283
|
withoutHover: !0,
|
|
283
|
-
className:
|
|
284
|
-
[
|
|
284
|
+
className: Y(J.button, {
|
|
285
|
+
[J.disabled]: !!(w && w <= s.length || s.length === c.length)
|
|
285
286
|
}),
|
|
286
287
|
size: "s",
|
|
287
|
-
disabled: !!(
|
|
288
|
+
disabled: !!(w && w <= s.length || s.length === c.length),
|
|
288
289
|
onClick: () => {
|
|
289
|
-
const
|
|
290
|
-
let
|
|
291
|
-
if (
|
|
292
|
-
for (let
|
|
293
|
-
if (!s.find((
|
|
294
|
-
|
|
290
|
+
const v = [...s];
|
|
291
|
+
let q = null;
|
|
292
|
+
if (c) {
|
|
293
|
+
for (let A = 0; A < c.length; A++)
|
|
294
|
+
if (!s.find((L) => L === c[A].id)) {
|
|
295
|
+
q = c[A];
|
|
295
296
|
break;
|
|
296
297
|
}
|
|
297
298
|
}
|
|
298
|
-
|
|
299
|
+
v.push((q == null ? void 0 : q.id) || c[0].id), n(v);
|
|
299
300
|
},
|
|
300
301
|
style: {
|
|
301
302
|
width: "fit-content"
|
|
302
303
|
},
|
|
303
|
-
children: /* @__PURE__ */ t.jsxs("div", { className:
|
|
304
|
+
children: /* @__PURE__ */ t.jsxs("div", { className: J.addButton, children: [
|
|
304
305
|
/* @__PURE__ */ t.jsx("span", { children: "Add Option" }),
|
|
305
306
|
/* @__PURE__ */ t.jsx(
|
|
306
|
-
|
|
307
|
+
x,
|
|
307
308
|
{
|
|
308
309
|
name: "Plus",
|
|
309
310
|
width: 16,
|
|
@@ -316,14 +317,14 @@ const qt = "_wrapper_1ibay_2", At = "_alignmentBlock_1ibay_8", Ot = "_title_1iba
|
|
|
316
317
|
}
|
|
317
318
|
)
|
|
318
319
|
] }),
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
320
|
+
h !== void 0 && /* @__PURE__ */ t.jsx(ut, { items: h }),
|
|
321
|
+
p !== void 0 && /* @__PURE__ */ t.jsx(
|
|
322
|
+
dt,
|
|
322
323
|
{
|
|
323
324
|
label: "Auto scroll interval",
|
|
324
325
|
type: "number",
|
|
325
|
-
value: String(
|
|
326
|
-
onChange: (
|
|
326
|
+
value: String(p.scrollInterval),
|
|
327
|
+
onChange: (v) => p.setScrollInterval(Number(v)),
|
|
327
328
|
min: 0.1,
|
|
328
329
|
max: 100,
|
|
329
330
|
style: {
|
|
@@ -333,109 +334,109 @@ const qt = "_wrapper_1ibay_2", At = "_alignmentBlock_1ibay_8", Ot = "_title_1iba
|
|
|
333
334
|
}
|
|
334
335
|
)
|
|
335
336
|
] });
|
|
336
|
-
}, fe = "_title_roi3a_1",
|
|
337
|
+
}, fe = "_title_roi3a_1", be = "_subtitle_roi3a_5", je = "_header_roi3a_12", ve = "_text_roi3a_13", ye = "_productsBlock_roi3a_14", Ne = "_top_roi3a_26", ke = "_itemsBlock_roi3a_35", Ie = "_typeTexts_roi3a_41", Ce = "_block_roi3a_48", Se = "_active_roi3a_61", we = "_products_roi3a_14", Be = "_product_roi3a_14", $e = "_button_roi3a_80", Pe = "_disabled_roi3a_91", Me = "_image_roi3a_95", Te = "_info_roi3a_102", qe = "_name_roi3a_114", Ae = "_buttons_roi3a_118", Oe = "_modal_roi3a_125", Ee = "_link_roi3a_145", ze = "_modalOptions_roi3a_151", Re = "_addButton_roi3a_164", Le = "_deleteButton_roi3a_179", De = "_closeIcon_roi3a_191", U = {
|
|
337
338
|
title: fe,
|
|
338
|
-
subtitle:
|
|
339
|
-
header:
|
|
340
|
-
text:
|
|
341
|
-
productsBlock:
|
|
342
|
-
top:
|
|
343
|
-
itemsBlock:
|
|
344
|
-
typeTexts:
|
|
345
|
-
block:
|
|
346
|
-
active:
|
|
347
|
-
products:
|
|
348
|
-
product:
|
|
339
|
+
subtitle: be,
|
|
340
|
+
header: je,
|
|
341
|
+
text: ve,
|
|
342
|
+
productsBlock: ye,
|
|
343
|
+
top: Ne,
|
|
344
|
+
itemsBlock: ke,
|
|
345
|
+
typeTexts: Ie,
|
|
346
|
+
block: Ce,
|
|
347
|
+
active: Se,
|
|
348
|
+
products: we,
|
|
349
|
+
product: Be,
|
|
349
350
|
button: $e,
|
|
350
|
-
disabled:
|
|
351
|
-
image:
|
|
352
|
-
info:
|
|
353
|
-
name:
|
|
354
|
-
buttons:
|
|
355
|
-
modal:
|
|
356
|
-
link:
|
|
357
|
-
modalOptions:
|
|
358
|
-
addButton:
|
|
359
|
-
deleteButton:
|
|
351
|
+
disabled: Pe,
|
|
352
|
+
image: Me,
|
|
353
|
+
info: Te,
|
|
354
|
+
name: qe,
|
|
355
|
+
buttons: Ae,
|
|
356
|
+
modal: Oe,
|
|
357
|
+
link: Ee,
|
|
358
|
+
modalOptions: ze,
|
|
359
|
+
addButton: Re,
|
|
360
|
+
deleteButton: Le,
|
|
360
361
|
closeIcon: De
|
|
361
362
|
};
|
|
362
|
-
function
|
|
363
|
+
function He({ product: r, children: i }) {
|
|
363
364
|
const {
|
|
364
365
|
attributes: e,
|
|
365
366
|
listeners: s,
|
|
366
367
|
setNodeRef: n,
|
|
367
|
-
transform:
|
|
368
|
-
transition:
|
|
369
|
-
isDragging:
|
|
368
|
+
transform: h,
|
|
369
|
+
transition: u,
|
|
370
|
+
isDragging: o
|
|
370
371
|
} = ft({
|
|
371
372
|
id: r.id
|
|
372
|
-
}),
|
|
373
|
-
transform:
|
|
374
|
-
transition:
|
|
373
|
+
}), d = {
|
|
374
|
+
transform: bt.Transform.toString(h),
|
|
375
|
+
transition: u
|
|
375
376
|
};
|
|
376
377
|
return /* @__PURE__ */ t.jsx(
|
|
377
378
|
"div",
|
|
378
379
|
{
|
|
379
380
|
ref: n,
|
|
380
|
-
style:
|
|
381
|
-
className: `${
|
|
381
|
+
style: d,
|
|
382
|
+
className: `${U.product} ${o ? U.dragging : ""}`,
|
|
382
383
|
...e,
|
|
383
384
|
...s,
|
|
384
|
-
children:
|
|
385
|
+
children: i
|
|
385
386
|
}
|
|
386
387
|
);
|
|
387
388
|
}
|
|
388
|
-
const
|
|
389
|
+
const Zn = (r) => {
|
|
389
390
|
const {
|
|
390
|
-
isActiveItems:
|
|
391
|
+
isActiveItems: i,
|
|
391
392
|
setIsActiveItems: e,
|
|
392
393
|
items: s,
|
|
393
394
|
setItems: n,
|
|
394
|
-
title:
|
|
395
|
-
subtitle:
|
|
396
|
-
editable:
|
|
397
|
-
draggable:
|
|
398
|
-
deletable:
|
|
399
|
-
addable:
|
|
400
|
-
itemsType:
|
|
401
|
-
itemsOptions:
|
|
402
|
-
addableOptions:
|
|
403
|
-
limit:
|
|
404
|
-
} = r, [
|
|
405
|
-
|
|
395
|
+
title: h,
|
|
396
|
+
subtitle: u,
|
|
397
|
+
editable: o = !0,
|
|
398
|
+
draggable: d = !1,
|
|
399
|
+
deletable: f = !0,
|
|
400
|
+
addable: $ = !0,
|
|
401
|
+
itemsType: c,
|
|
402
|
+
itemsOptions: l,
|
|
403
|
+
addableOptions: M = {},
|
|
404
|
+
limit: w
|
|
405
|
+
} = r, [p, I] = _.useState(null), [B, g] = _.useState(null), v = _.useRef(null), q = mt(
|
|
406
|
+
ht(pt, {
|
|
406
407
|
activationConstraint: {
|
|
407
408
|
distance: 5
|
|
408
409
|
}
|
|
409
410
|
})
|
|
410
411
|
);
|
|
411
|
-
|
|
412
|
-
if (
|
|
413
|
-
const
|
|
414
|
-
n(
|
|
412
|
+
_.useEffect(() => {
|
|
413
|
+
if (p) {
|
|
414
|
+
const b = [...s].map((N) => N.id === p.id ? p : N);
|
|
415
|
+
n(b);
|
|
415
416
|
}
|
|
416
|
-
}, [
|
|
417
|
-
|
|
418
|
-
}, [
|
|
419
|
-
const
|
|
420
|
-
|
|
421
|
-
const
|
|
422
|
-
|
|
423
|
-
top:
|
|
424
|
-
left:
|
|
425
|
-
}),
|
|
426
|
-
},
|
|
427
|
-
const { active:
|
|
428
|
-
if (
|
|
429
|
-
const
|
|
430
|
-
if (
|
|
431
|
-
const
|
|
432
|
-
|
|
417
|
+
}, [p]), _.useEffect(() => {
|
|
418
|
+
v.current && B && (v.current.getBoundingClientRect().height, B.top);
|
|
419
|
+
}, [v.current, B]);
|
|
420
|
+
const A = (b, N) => {
|
|
421
|
+
b.stopPropagation();
|
|
422
|
+
const O = b.target.getBoundingClientRect();
|
|
423
|
+
g({
|
|
424
|
+
top: O.top + window.scrollY,
|
|
425
|
+
left: O.left - 30
|
|
426
|
+
}), I(N);
|
|
427
|
+
}, L = (b) => {
|
|
428
|
+
const { active: N, over: O } = b;
|
|
429
|
+
if (O && N.id !== O.id) {
|
|
430
|
+
const a = s.findIndex((C) => C.id === N.id), j = s.findIndex((C) => C.id === O.id);
|
|
431
|
+
if (a !== -1 && j !== -1) {
|
|
432
|
+
const C = [...s], [D] = C.splice(a, 1);
|
|
433
|
+
C.splice(j, 0, D), n(C);
|
|
433
434
|
}
|
|
434
435
|
}
|
|
435
|
-
},
|
|
436
|
-
const
|
|
437
|
-
|
|
438
|
-
|
|
436
|
+
}, S = (b, N) => {
|
|
437
|
+
const O = /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
438
|
+
d && /* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
|
|
439
|
+
x,
|
|
439
440
|
{
|
|
440
441
|
name: "DotsSixVertical",
|
|
441
442
|
hoverable: !0,
|
|
@@ -443,99 +444,99 @@ const Kn = (r) => {
|
|
|
443
444
|
height: 20
|
|
444
445
|
}
|
|
445
446
|
) }),
|
|
446
|
-
|
|
447
|
-
|
|
447
|
+
c === "select" && l && /* @__PURE__ */ t.jsx(
|
|
448
|
+
at,
|
|
448
449
|
{
|
|
449
|
-
onChange: (
|
|
450
|
-
const j = [...s],
|
|
451
|
-
if (!
|
|
452
|
-
const
|
|
453
|
-
...
|
|
450
|
+
onChange: (a) => {
|
|
451
|
+
const j = [...s], C = l.find((P) => P.name === a);
|
|
452
|
+
if (!C) return;
|
|
453
|
+
const D = j.map((P) => P.id === b.id ? {
|
|
454
|
+
...C,
|
|
454
455
|
name: {
|
|
455
|
-
"en-US":
|
|
456
|
+
"en-US": a
|
|
456
457
|
}
|
|
457
458
|
} : P);
|
|
458
|
-
|
|
459
|
-
...
|
|
459
|
+
I({
|
|
460
|
+
...b,
|
|
460
461
|
name: {
|
|
461
|
-
"en-US":
|
|
462
|
+
"en-US": a
|
|
462
463
|
}
|
|
463
|
-
}), n([...
|
|
464
|
+
}), n([...D]);
|
|
464
465
|
},
|
|
465
|
-
value:
|
|
466
|
-
options:
|
|
466
|
+
value: b.name,
|
|
467
|
+
options: l.filter((a) => !s.find((j) => j.name === a.name)).map((a) => a.name)
|
|
467
468
|
}
|
|
468
469
|
),
|
|
469
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
470
|
-
|
|
471
|
-
|
|
470
|
+
/* @__PURE__ */ t.jsxs("div", { className: U.buttons, children: [
|
|
471
|
+
o && /* @__PURE__ */ t.jsx("div", { className: U.deleteButton, children: /* @__PURE__ */ t.jsx(
|
|
472
|
+
x,
|
|
472
473
|
{
|
|
473
474
|
name: "Sliders",
|
|
474
475
|
hoverable: !0,
|
|
475
476
|
width: 20,
|
|
476
477
|
height: 20,
|
|
477
|
-
onClick: (
|
|
478
|
+
onClick: (a) => A(a, b)
|
|
478
479
|
}
|
|
479
480
|
) }),
|
|
480
|
-
|
|
481
|
-
|
|
481
|
+
f && /* @__PURE__ */ t.jsx("div", { className: U.deleteButton, children: /* @__PURE__ */ t.jsx(
|
|
482
|
+
x,
|
|
482
483
|
{
|
|
483
484
|
name: "Trash",
|
|
484
485
|
hoverable: !0,
|
|
485
486
|
width: 20,
|
|
486
487
|
height: 20,
|
|
487
488
|
fill: "#C12A2A",
|
|
488
|
-
onClick: () => n(s.filter((
|
|
489
|
+
onClick: () => n(s.filter((a) => a.id !== b.id))
|
|
489
490
|
}
|
|
490
491
|
) })
|
|
491
492
|
] })
|
|
492
493
|
] });
|
|
493
|
-
return
|
|
494
|
-
|
|
494
|
+
return d ? /* @__PURE__ */ t.jsx(
|
|
495
|
+
He,
|
|
495
496
|
{
|
|
496
|
-
product:
|
|
497
|
-
index:
|
|
498
|
-
children:
|
|
497
|
+
product: b,
|
|
498
|
+
index: N,
|
|
499
|
+
children: O
|
|
499
500
|
},
|
|
500
|
-
|
|
501
|
+
b.id
|
|
501
502
|
) : /* @__PURE__ */ t.jsx(
|
|
502
503
|
"div",
|
|
503
504
|
{
|
|
504
|
-
className:
|
|
505
|
-
children:
|
|
505
|
+
className: U.product,
|
|
506
|
+
children: O
|
|
506
507
|
},
|
|
507
|
-
|
|
508
|
+
b.id
|
|
508
509
|
);
|
|
509
510
|
};
|
|
510
|
-
return /* @__PURE__ */ t.jsxs("div", { className:
|
|
511
|
-
(
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
511
|
+
return /* @__PURE__ */ t.jsxs("div", { className: U.productsBlock, children: [
|
|
512
|
+
(h || i !== void 0) && /* @__PURE__ */ t.jsxs("div", { className: U.top, children: [
|
|
513
|
+
h && /* @__PURE__ */ t.jsx("h3", { className: U.title, children: h }),
|
|
514
|
+
i !== void 0 && /* @__PURE__ */ t.jsx(
|
|
515
|
+
ot,
|
|
515
516
|
{
|
|
516
|
-
current:
|
|
517
|
-
onChange: (
|
|
517
|
+
current: i,
|
|
518
|
+
onChange: (b) => e == null ? void 0 : e(b)
|
|
518
519
|
}
|
|
519
520
|
)
|
|
520
521
|
] }),
|
|
521
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
522
|
+
/* @__PURE__ */ t.jsxs("div", { className: U.products, children: [
|
|
523
|
+
u && /* @__PURE__ */ t.jsx("h5", { className: U.subtitle, children: u }),
|
|
524
|
+
d ? /* @__PURE__ */ t.jsx(
|
|
525
|
+
_t,
|
|
525
526
|
{
|
|
526
|
-
sensors:
|
|
527
|
-
onDragEnd:
|
|
527
|
+
sensors: q,
|
|
528
|
+
onDragEnd: L,
|
|
528
529
|
children: /* @__PURE__ */ t.jsx(
|
|
529
|
-
|
|
530
|
+
gt,
|
|
530
531
|
{
|
|
531
|
-
items: s.map((
|
|
532
|
-
strategy:
|
|
533
|
-
children: s.map((
|
|
532
|
+
items: s.map((b) => b.id),
|
|
533
|
+
strategy: xt,
|
|
534
|
+
children: s.map((b, N) => S(b, N))
|
|
534
535
|
}
|
|
535
536
|
)
|
|
536
537
|
}
|
|
537
|
-
) : s.map((
|
|
538
|
-
|
|
538
|
+
) : s.map((b, N) => S(b, N)),
|
|
539
|
+
$ && /* @__PURE__ */ t.jsx(
|
|
539
540
|
"div",
|
|
540
541
|
{
|
|
541
542
|
style: {
|
|
@@ -547,34 +548,34 @@ const Kn = (r) => {
|
|
|
547
548
|
tt,
|
|
548
549
|
{
|
|
549
550
|
withoutHover: !0,
|
|
550
|
-
className:
|
|
551
|
-
[
|
|
551
|
+
className: Y(U.button, {
|
|
552
|
+
[U.disabled]: !!(w && w <= s.length || s.length === (l == null ? void 0 : l.length))
|
|
552
553
|
}),
|
|
553
554
|
size: "s",
|
|
554
|
-
disabled: !!(
|
|
555
|
+
disabled: !!(w && w <= s.length || s.length === (l == null ? void 0 : l.length)),
|
|
555
556
|
onClick: () => {
|
|
556
|
-
const
|
|
557
|
-
let
|
|
558
|
-
if (
|
|
559
|
-
for (let
|
|
560
|
-
if (!s.find((
|
|
561
|
-
|
|
557
|
+
const b = [...s];
|
|
558
|
+
let N = null;
|
|
559
|
+
if (l) {
|
|
560
|
+
for (let O = 0; O < l.length; O++)
|
|
561
|
+
if (!s.find((a) => a.id === l[O].id)) {
|
|
562
|
+
N = l[O];
|
|
562
563
|
break;
|
|
563
564
|
}
|
|
564
565
|
}
|
|
565
|
-
|
|
566
|
-
name:
|
|
567
|
-
id: (
|
|
568
|
-
...
|
|
569
|
-
}), n(
|
|
566
|
+
c === "select" && l && b.push({
|
|
567
|
+
name: N ? N.name : l[0].name,
|
|
568
|
+
id: (N == null ? void 0 : N.id) || l[0].id,
|
|
569
|
+
...M
|
|
570
|
+
}), n(b);
|
|
570
571
|
},
|
|
571
572
|
style: {
|
|
572
573
|
width: "fit-content"
|
|
573
574
|
},
|
|
574
|
-
children: /* @__PURE__ */ t.jsxs("div", { className:
|
|
575
|
+
children: /* @__PURE__ */ t.jsxs("div", { className: U.addButton, children: [
|
|
575
576
|
/* @__PURE__ */ t.jsx("span", { children: "Add Option" }),
|
|
576
577
|
/* @__PURE__ */ t.jsx(
|
|
577
|
-
|
|
578
|
+
x,
|
|
578
579
|
{
|
|
579
580
|
name: "Plus",
|
|
580
581
|
width: 16,
|
|
@@ -589,88 +590,89 @@ const Kn = (r) => {
|
|
|
589
590
|
] })
|
|
590
591
|
] });
|
|
591
592
|
};
|
|
592
|
-
function
|
|
593
|
-
const { product:
|
|
594
|
-
id:
|
|
595
|
-
}),
|
|
596
|
-
transform:
|
|
597
|
-
transition:
|
|
593
|
+
function Ue(r) {
|
|
594
|
+
const { product: i, children: e } = r, { attributes: s, listeners: n, setNodeRef: h, transform: u, transition: o, isDragging: d } = ft({
|
|
595
|
+
id: i.id
|
|
596
|
+
}), f = {
|
|
597
|
+
transform: bt.Transform.toString(u),
|
|
598
|
+
transition: o
|
|
598
599
|
};
|
|
599
600
|
return /* @__PURE__ */ t.jsx(
|
|
600
601
|
"div",
|
|
601
602
|
{
|
|
602
|
-
ref:
|
|
603
|
-
style:
|
|
604
|
-
className: `${
|
|
603
|
+
ref: h,
|
|
604
|
+
style: f,
|
|
605
|
+
className: `${H.product} ${d ? H.dragging : ""}`,
|
|
605
606
|
...s,
|
|
606
607
|
...n,
|
|
607
608
|
children: e
|
|
608
609
|
}
|
|
609
610
|
);
|
|
610
611
|
}
|
|
611
|
-
const
|
|
612
|
+
const ti = (r) => {
|
|
612
613
|
const {
|
|
613
|
-
isActiveItems:
|
|
614
|
+
isActiveItems: i,
|
|
614
615
|
setIsActiveItems: e,
|
|
615
616
|
items: s,
|
|
616
617
|
setItems: n,
|
|
617
|
-
other:
|
|
618
|
-
title:
|
|
619
|
-
subtitle:
|
|
620
|
-
editable:
|
|
621
|
-
draggable:
|
|
622
|
-
withImage:
|
|
623
|
-
deletable:
|
|
624
|
-
addable:
|
|
625
|
-
itemsType:
|
|
626
|
-
itemsPlaceholder:
|
|
627
|
-
itemsOptions:
|
|
628
|
-
hasRangeSelector:
|
|
629
|
-
rangeSelectorOptions:
|
|
630
|
-
modalOptions:
|
|
631
|
-
addableOptions:
|
|
632
|
-
|
|
618
|
+
other: h,
|
|
619
|
+
title: u,
|
|
620
|
+
subtitle: o,
|
|
621
|
+
editable: d = !0,
|
|
622
|
+
draggable: f = !1,
|
|
623
|
+
withImage: $ = !1,
|
|
624
|
+
deletable: c = !0,
|
|
625
|
+
addable: l = !0,
|
|
626
|
+
itemsType: M,
|
|
627
|
+
itemsPlaceholder: w = "",
|
|
628
|
+
itemsOptions: p,
|
|
629
|
+
hasRangeSelector: I = !1,
|
|
630
|
+
rangeSelectorOptions: B,
|
|
631
|
+
modalOptions: g,
|
|
632
|
+
addableOptions: v = {},
|
|
633
|
+
limit: q
|
|
634
|
+
} = r, [A, L] = _.useState(null), [S, b] = _.useState({
|
|
633
635
|
top: 0,
|
|
634
636
|
left: 0
|
|
635
|
-
}), [
|
|
636
|
-
|
|
637
|
+
}), [N, O] = _.useState(null), a = _.useRef(null), [j, C] = _.useState(!1), D = mt(
|
|
638
|
+
ht(pt, {
|
|
637
639
|
activationConstraint: {
|
|
638
640
|
distance: 5
|
|
639
641
|
}
|
|
640
642
|
})
|
|
641
643
|
);
|
|
642
|
-
|
|
644
|
+
_.useEffect(() => {
|
|
643
645
|
const m = () => {
|
|
644
|
-
|
|
646
|
+
L(null), C(!1);
|
|
645
647
|
};
|
|
646
|
-
return document.body.addEventListener("click", m),
|
|
647
|
-
|
|
648
|
+
return document.body.addEventListener("click", m), L(null), C(!1), () => {
|
|
649
|
+
L(null), C(!1), document.body.removeEventListener("click", m);
|
|
648
650
|
};
|
|
649
|
-
}, []),
|
|
650
|
-
if (
|
|
651
|
-
const m = [...s].map((
|
|
651
|
+
}, []), _.useEffect(() => {
|
|
652
|
+
if (A) {
|
|
653
|
+
const m = [...s].map((T) => T.id === A.id ? A : T);
|
|
652
654
|
n(m);
|
|
653
655
|
}
|
|
654
|
-
}, [
|
|
655
|
-
if (
|
|
656
|
-
const m =
|
|
657
|
-
let
|
|
658
|
-
|
|
659
|
-
top:
|
|
660
|
-
left:
|
|
656
|
+
}, [A]), _.useEffect(() => {
|
|
657
|
+
if (a.current && N) {
|
|
658
|
+
const m = a.current.getBoundingClientRect().height, T = window.innerHeight;
|
|
659
|
+
let E = N.top;
|
|
660
|
+
E + m > T + window.scrollY - 200 && (E = T + window.scrollY - m - 200), E < 0 && (E = 10), b({
|
|
661
|
+
top: E,
|
|
662
|
+
left: N.left
|
|
661
663
|
});
|
|
662
664
|
}
|
|
663
|
-
}, [
|
|
664
|
-
const
|
|
665
|
+
}, [a.current, N]);
|
|
666
|
+
const P = (m, T) => {
|
|
665
667
|
m.stopPropagation();
|
|
666
|
-
const
|
|
667
|
-
|
|
668
|
-
top:
|
|
669
|
-
left:
|
|
670
|
-
}), T
|
|
668
|
+
const E = m.target.getBoundingClientRect();
|
|
669
|
+
O({
|
|
670
|
+
top: E.top + window.scrollY,
|
|
671
|
+
left: E.left - 30
|
|
672
|
+
}), L(T), C(!0);
|
|
671
673
|
};
|
|
672
|
-
function
|
|
673
|
-
if (
|
|
674
|
+
function R(m) {
|
|
675
|
+
if ($)
|
|
674
676
|
return m ? /* @__PURE__ */ t.jsx(
|
|
675
677
|
"img",
|
|
676
678
|
{
|
|
@@ -680,7 +682,7 @@ const Zn = (r) => {
|
|
|
680
682
|
height: 16
|
|
681
683
|
}
|
|
682
684
|
) : /* @__PURE__ */ t.jsx(
|
|
683
|
-
|
|
685
|
+
x,
|
|
684
686
|
{
|
|
685
687
|
name: "Image",
|
|
686
688
|
width: 16,
|
|
@@ -689,20 +691,20 @@ const Zn = (r) => {
|
|
|
689
691
|
}
|
|
690
692
|
);
|
|
691
693
|
}
|
|
692
|
-
const
|
|
693
|
-
const { active:
|
|
694
|
-
if (
|
|
695
|
-
const
|
|
696
|
-
if (
|
|
697
|
-
const
|
|
698
|
-
|
|
694
|
+
const K = (m) => {
|
|
695
|
+
const { active: T, over: E } = m;
|
|
696
|
+
if (E && T.id !== E.id) {
|
|
697
|
+
const z = s.findIndex((F) => F.id === T.id), et = s.findIndex((F) => F.id === E.id);
|
|
698
|
+
if (z !== -1 && et !== -1) {
|
|
699
|
+
const F = [...s], [X] = F.splice(z, 1);
|
|
700
|
+
F.splice(et, 0, X), n(F);
|
|
699
701
|
}
|
|
700
702
|
}
|
|
701
|
-
},
|
|
702
|
-
var
|
|
703
|
-
const
|
|
704
|
-
|
|
705
|
-
|
|
703
|
+
}, st = (m) => {
|
|
704
|
+
var E;
|
|
705
|
+
const T = /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
706
|
+
f && /* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
|
|
707
|
+
x,
|
|
706
708
|
{
|
|
707
709
|
name: "DotsSixVertical",
|
|
708
710
|
hoverable: !0,
|
|
@@ -710,140 +712,140 @@ const Zn = (r) => {
|
|
|
710
712
|
height: 20
|
|
711
713
|
}
|
|
712
714
|
) }),
|
|
713
|
-
|
|
714
|
-
|
|
715
|
+
M === "select" && p && /* @__PURE__ */ t.jsx(
|
|
716
|
+
at,
|
|
715
717
|
{
|
|
716
|
-
onChange: (
|
|
717
|
-
const
|
|
718
|
+
onChange: (z) => {
|
|
719
|
+
const F = [...s].map((X) => X.id === m.id ? {
|
|
718
720
|
...m,
|
|
719
721
|
name: {
|
|
720
|
-
"en-US":
|
|
722
|
+
"en-US": z
|
|
721
723
|
}
|
|
722
724
|
} : X);
|
|
723
|
-
|
|
725
|
+
L({
|
|
724
726
|
...m,
|
|
725
727
|
name: {
|
|
726
|
-
"en-US":
|
|
728
|
+
"en-US": z
|
|
727
729
|
}
|
|
728
|
-
}), n([...
|
|
730
|
+
}), n([...F]);
|
|
729
731
|
},
|
|
730
732
|
value: m.name["en-US"],
|
|
731
|
-
options:
|
|
732
|
-
(
|
|
733
|
+
options: p.filter(
|
|
734
|
+
(z) => !s.find((et) => et.name["en-US"] === z)
|
|
733
735
|
),
|
|
734
|
-
leftAddon:
|
|
736
|
+
leftAddon: R(m.images)
|
|
735
737
|
}
|
|
736
738
|
),
|
|
737
|
-
|
|
738
|
-
|
|
739
|
+
M === "input" && /* @__PURE__ */ t.jsx(
|
|
740
|
+
dt,
|
|
739
741
|
{
|
|
740
|
-
onChange: (
|
|
741
|
-
const
|
|
742
|
+
onChange: (z) => {
|
|
743
|
+
const F = [...s].map((X) => X.id === m.id ? {
|
|
742
744
|
...m,
|
|
743
745
|
name: {
|
|
744
|
-
"en-US":
|
|
746
|
+
"en-US": z
|
|
745
747
|
}
|
|
746
748
|
} : X);
|
|
747
|
-
n([...
|
|
749
|
+
n([...F]);
|
|
748
750
|
},
|
|
749
751
|
value: m.name["en-US"],
|
|
750
|
-
placeholder:
|
|
752
|
+
placeholder: w
|
|
751
753
|
}
|
|
752
754
|
),
|
|
753
|
-
|
|
754
|
-
|
|
755
|
+
M === "image" && /* @__PURE__ */ t.jsx(
|
|
756
|
+
wt,
|
|
755
757
|
{
|
|
756
|
-
onChange: (
|
|
757
|
-
const
|
|
758
|
+
onChange: (z) => {
|
|
759
|
+
const F = [...s].map((X) => X.id === m.id ? {
|
|
758
760
|
...m,
|
|
759
|
-
images:
|
|
761
|
+
images: z
|
|
760
762
|
} : X);
|
|
761
|
-
n([...
|
|
763
|
+
n([...F]);
|
|
762
764
|
},
|
|
763
|
-
activeImage: (
|
|
765
|
+
activeImage: (E = s.find((z) => z.id === m.id)) == null ? void 0 : E.images[0]
|
|
764
766
|
}
|
|
765
767
|
),
|
|
766
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
767
|
-
|
|
768
|
-
|
|
768
|
+
/* @__PURE__ */ t.jsxs("div", { className: H.buttons, children: [
|
|
769
|
+
d && /* @__PURE__ */ t.jsx("div", { className: H.deleteButton, children: /* @__PURE__ */ t.jsx(
|
|
770
|
+
x,
|
|
769
771
|
{
|
|
770
772
|
name: "Sliders",
|
|
771
773
|
hoverable: !0,
|
|
772
774
|
width: 20,
|
|
773
775
|
height: 20,
|
|
774
|
-
onClick: (
|
|
776
|
+
onClick: (z) => P(z, m)
|
|
775
777
|
}
|
|
776
778
|
) }),
|
|
777
|
-
|
|
778
|
-
|
|
779
|
+
c && /* @__PURE__ */ t.jsx("div", { className: H.deleteButton, children: /* @__PURE__ */ t.jsx(
|
|
780
|
+
x,
|
|
779
781
|
{
|
|
780
782
|
name: "Trash",
|
|
781
783
|
hoverable: !0,
|
|
782
784
|
width: 20,
|
|
783
785
|
height: 20,
|
|
784
786
|
fill: "#C12A2A",
|
|
785
|
-
onClick: () => n(s.filter((
|
|
787
|
+
onClick: () => n(s.filter((z) => z.id !== m.id))
|
|
786
788
|
}
|
|
787
789
|
) })
|
|
788
790
|
] })
|
|
789
791
|
] });
|
|
790
|
-
return
|
|
791
|
-
|
|
792
|
+
return f ? /* @__PURE__ */ t.jsx(
|
|
793
|
+
Ue,
|
|
792
794
|
{
|
|
793
795
|
product: m,
|
|
794
|
-
children:
|
|
796
|
+
children: T
|
|
795
797
|
},
|
|
796
798
|
m.id
|
|
797
799
|
) : /* @__PURE__ */ t.jsx(
|
|
798
800
|
"div",
|
|
799
801
|
{
|
|
800
|
-
className:
|
|
801
|
-
children:
|
|
802
|
+
className: H.product,
|
|
803
|
+
children: T
|
|
802
804
|
},
|
|
803
805
|
m.id
|
|
804
806
|
);
|
|
805
807
|
};
|
|
806
|
-
return /* @__PURE__ */ t.jsxs("div", { className:
|
|
807
|
-
(
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
808
|
+
return /* @__PURE__ */ t.jsxs("div", { className: H.productsBlock, children: [
|
|
809
|
+
(u || i !== void 0) && /* @__PURE__ */ t.jsxs("div", { className: H.top, children: [
|
|
810
|
+
u && /* @__PURE__ */ t.jsx("h3", { className: H.title, children: u }),
|
|
811
|
+
i !== void 0 && /* @__PURE__ */ t.jsx(
|
|
812
|
+
ot,
|
|
811
813
|
{
|
|
812
|
-
current:
|
|
814
|
+
current: i,
|
|
813
815
|
onChange: (m) => e == null ? void 0 : e(m)
|
|
814
816
|
}
|
|
815
817
|
)
|
|
816
818
|
] }),
|
|
817
|
-
|
|
818
|
-
|
|
819
|
+
A && d && g && j && /* @__PURE__ */ t.jsx(
|
|
820
|
+
St,
|
|
819
821
|
{
|
|
820
|
-
ref:
|
|
821
|
-
activeItem:
|
|
822
|
-
setActiveItem:
|
|
823
|
-
popupPosition:
|
|
824
|
-
modalOptions:
|
|
825
|
-
setIsOpenModal:
|
|
822
|
+
ref: a,
|
|
823
|
+
activeItem: A,
|
|
824
|
+
setActiveItem: L,
|
|
825
|
+
popupPosition: S,
|
|
826
|
+
modalOptions: g,
|
|
827
|
+
setIsOpenModal: C
|
|
826
828
|
}
|
|
827
829
|
),
|
|
828
|
-
|
|
829
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
830
|
+
I && B && /* @__PURE__ */ t.jsx(yt, { ...B }),
|
|
831
|
+
/* @__PURE__ */ t.jsxs("div", { className: H.products, children: [
|
|
832
|
+
o && /* @__PURE__ */ t.jsx("h5", { className: H.subtitle, children: o }),
|
|
833
|
+
f ? /* @__PURE__ */ t.jsx(
|
|
834
|
+
_t,
|
|
833
835
|
{
|
|
834
|
-
sensors:
|
|
835
|
-
onDragEnd:
|
|
836
|
+
sensors: D,
|
|
837
|
+
onDragEnd: K,
|
|
836
838
|
children: /* @__PURE__ */ t.jsx(
|
|
837
|
-
|
|
839
|
+
gt,
|
|
838
840
|
{
|
|
839
841
|
items: s.map((m) => m.id),
|
|
840
|
-
strategy:
|
|
841
|
-
children: s.map((m) =>
|
|
842
|
+
strategy: xt,
|
|
843
|
+
children: s.map((m) => st(m))
|
|
842
844
|
}
|
|
843
845
|
)
|
|
844
846
|
}
|
|
845
|
-
) : s.map((m) =>
|
|
846
|
-
|
|
847
|
+
) : s.map((m) => st(m)),
|
|
848
|
+
l && /* @__PURE__ */ t.jsx(
|
|
847
849
|
"div",
|
|
848
850
|
{
|
|
849
851
|
style: {
|
|
@@ -855,49 +857,52 @@ const Zn = (r) => {
|
|
|
855
857
|
tt,
|
|
856
858
|
{
|
|
857
859
|
withoutHover: !0,
|
|
858
|
-
className:
|
|
860
|
+
className: Y(H.button, {
|
|
861
|
+
[H.disabled]: !!(q && q <= s.length)
|
|
862
|
+
}),
|
|
859
863
|
size: "s",
|
|
864
|
+
disabled: !!(q && q <= s.length),
|
|
860
865
|
onClick: () => {
|
|
861
866
|
const m = [...s];
|
|
862
|
-
let
|
|
863
|
-
if (
|
|
864
|
-
for (let
|
|
865
|
-
if (!s.find((
|
|
866
|
-
|
|
867
|
+
let T = null;
|
|
868
|
+
if (p) {
|
|
869
|
+
for (let E = 0; E < p.length; E++)
|
|
870
|
+
if (!s.find((z) => z.name["en-US"] === p[E])) {
|
|
871
|
+
T = p[E];
|
|
867
872
|
break;
|
|
868
873
|
}
|
|
869
874
|
}
|
|
870
|
-
|
|
875
|
+
M === "select" && p ? m.push({
|
|
871
876
|
name: {
|
|
872
|
-
"en-US":
|
|
877
|
+
"en-US": T || p[0]
|
|
873
878
|
},
|
|
874
|
-
id:
|
|
875
|
-
...
|
|
879
|
+
id: it(),
|
|
880
|
+
...v,
|
|
876
881
|
maxSymbols: 100
|
|
877
882
|
// пример значения
|
|
878
|
-
}) :
|
|
883
|
+
}) : M === "input" ? m.push({
|
|
879
884
|
name: {
|
|
880
885
|
"en-US": ""
|
|
881
886
|
},
|
|
882
|
-
id:
|
|
883
|
-
...
|
|
887
|
+
id: it(),
|
|
888
|
+
...v,
|
|
884
889
|
maxSymbols: 100
|
|
885
890
|
}) : m.push({
|
|
886
891
|
name: {
|
|
887
892
|
"en-US": `Image ${s.length + 1}`
|
|
888
893
|
},
|
|
889
|
-
id:
|
|
890
|
-
...
|
|
894
|
+
id: it(),
|
|
895
|
+
...v,
|
|
891
896
|
maxSymbols: 100
|
|
892
897
|
}), n(m);
|
|
893
898
|
},
|
|
894
899
|
style: {
|
|
895
900
|
width: "fit-content"
|
|
896
901
|
},
|
|
897
|
-
children: /* @__PURE__ */ t.jsxs("div", { className:
|
|
902
|
+
children: /* @__PURE__ */ t.jsxs("div", { className: H.addButton, children: [
|
|
898
903
|
/* @__PURE__ */ t.jsx("span", { children: "Add Option" }),
|
|
899
904
|
/* @__PURE__ */ t.jsx(
|
|
900
|
-
|
|
905
|
+
x,
|
|
901
906
|
{
|
|
902
907
|
name: "Plus",
|
|
903
908
|
width: 16,
|
|
@@ -910,101 +915,101 @@ const Zn = (r) => {
|
|
|
910
915
|
}
|
|
911
916
|
)
|
|
912
917
|
] }),
|
|
913
|
-
|
|
918
|
+
h !== void 0 && /* @__PURE__ */ t.jsx(ut, { items: h })
|
|
914
919
|
] });
|
|
915
|
-
},
|
|
916
|
-
subtitle:
|
|
917
|
-
header:
|
|
918
|
-
text:
|
|
919
|
-
productsBlock:
|
|
920
|
+
}, Fe = "_subtitle_jql1y_1", Ve = "_header_jql1y_8", Ye = "_text_jql1y_9", Ge = "_productsBlock_jql1y_10", We = "_buttonsBlock_jql1y_11", Je = "_top_jql1y_23", Xe = "_itemsBlock_jql1y_32", Ke = "_typeTexts_jql1y_38", Qe = "_block_jql1y_45", Ze = "_active_jql1y_58", ts = "_products_jql1y_10", es = "_product_jql1y_10", ss = "_button_jql1y_11", ns = "_image_jql1y_88", is = "_info_jql1y_95", os = "_name_jql1y_107", as = "_buttons_jql1y_11", cs = "_modal_jql1y_118", ls = "_other_jql1y_138", rs = "_options_jql1y_144", ds = "_addButton_jql1y_150", us = "_deleteButton_jql1y_165", Q = {
|
|
921
|
+
subtitle: Fe,
|
|
922
|
+
header: Ve,
|
|
923
|
+
text: Ye,
|
|
924
|
+
productsBlock: Ge,
|
|
920
925
|
buttonsBlock: We,
|
|
921
|
-
top:
|
|
922
|
-
itemsBlock:
|
|
923
|
-
typeTexts:
|
|
924
|
-
block:
|
|
925
|
-
active:
|
|
926
|
-
products:
|
|
927
|
-
product:
|
|
928
|
-
button:
|
|
929
|
-
image:
|
|
930
|
-
info:
|
|
931
|
-
name:
|
|
932
|
-
buttons:
|
|
933
|
-
modal:
|
|
934
|
-
other:
|
|
935
|
-
options:
|
|
936
|
-
addButton:
|
|
937
|
-
deleteButton:
|
|
938
|
-
},
|
|
939
|
-
const { buttons:
|
|
926
|
+
top: Je,
|
|
927
|
+
itemsBlock: Xe,
|
|
928
|
+
typeTexts: Ke,
|
|
929
|
+
block: Qe,
|
|
930
|
+
active: Ze,
|
|
931
|
+
products: ts,
|
|
932
|
+
product: es,
|
|
933
|
+
button: ss,
|
|
934
|
+
image: ns,
|
|
935
|
+
info: is,
|
|
936
|
+
name: os,
|
|
937
|
+
buttons: as,
|
|
938
|
+
modal: cs,
|
|
939
|
+
other: ls,
|
|
940
|
+
options: rs,
|
|
941
|
+
addButton: ds,
|
|
942
|
+
deleteButton: us
|
|
943
|
+
}, ms = (r) => {
|
|
944
|
+
const { buttons: i, setButtons: e, deletable: s = !0, addable: n = !0, editableLink: h = !0 } = r, { pages: u } = Bt(), [o, d] = _.useState(null), [f, $] = _.useState({
|
|
940
945
|
top: 0,
|
|
941
946
|
left: 0
|
|
942
|
-
}), [
|
|
943
|
-
|
|
944
|
-
if (
|
|
945
|
-
const
|
|
946
|
-
e(
|
|
947
|
+
}), [c, l] = _.useState(null), M = _.useRef(null);
|
|
948
|
+
_.useEffect(() => {
|
|
949
|
+
if (o) {
|
|
950
|
+
const p = [...i].map((I) => I.id === o.id ? o : I);
|
|
951
|
+
e(p);
|
|
947
952
|
}
|
|
948
|
-
}, [
|
|
949
|
-
if (
|
|
950
|
-
const
|
|
951
|
-
let
|
|
952
|
-
|
|
953
|
-
top:
|
|
954
|
-
left:
|
|
953
|
+
}, [o]), _.useEffect(() => {
|
|
954
|
+
if (M.current && c) {
|
|
955
|
+
const p = M.current.getBoundingClientRect().height, I = window.innerHeight;
|
|
956
|
+
let B = c.top;
|
|
957
|
+
B + p > I + window.scrollY - 200 && (B = I + window.scrollY - p - 200), B < 0 && (B = 10), $({
|
|
958
|
+
top: B,
|
|
959
|
+
left: c.left
|
|
955
960
|
});
|
|
956
961
|
}
|
|
957
|
-
}, [
|
|
958
|
-
const
|
|
959
|
-
|
|
960
|
-
const
|
|
961
|
-
|
|
962
|
-
top:
|
|
963
|
-
left:
|
|
964
|
-
}),
|
|
962
|
+
}, [M.current, c]);
|
|
963
|
+
const w = (p, I) => {
|
|
964
|
+
p.stopPropagation();
|
|
965
|
+
const B = p.target.getBoundingClientRect();
|
|
966
|
+
l({
|
|
967
|
+
top: B.top + window.scrollY - 70,
|
|
968
|
+
left: B.left - (n ? 30 : 65)
|
|
969
|
+
}), d(I);
|
|
965
970
|
};
|
|
966
|
-
return /* @__PURE__ */ t.jsxs("div", { className:
|
|
967
|
-
/* @__PURE__ */ t.jsx("h5", { className:
|
|
968
|
-
|
|
971
|
+
return /* @__PURE__ */ t.jsxs("div", { className: Q.products, children: [
|
|
972
|
+
/* @__PURE__ */ t.jsx("h5", { className: Q.subtitle, children: "Button Type" }),
|
|
973
|
+
i.map((p) => /* @__PURE__ */ t.jsxs(
|
|
969
974
|
"div",
|
|
970
975
|
{
|
|
971
|
-
className:
|
|
976
|
+
className: Q.product,
|
|
972
977
|
children: [
|
|
973
978
|
/* @__PURE__ */ t.jsx(
|
|
974
|
-
|
|
979
|
+
at,
|
|
975
980
|
{
|
|
976
|
-
onChange: (
|
|
977
|
-
const
|
|
978
|
-
...
|
|
979
|
-
type:
|
|
980
|
-
} :
|
|
981
|
-
e(
|
|
981
|
+
onChange: (I) => {
|
|
982
|
+
const g = [...i].map((v) => v.id === p.id ? {
|
|
983
|
+
...p,
|
|
984
|
+
type: I
|
|
985
|
+
} : v);
|
|
986
|
+
e(g);
|
|
982
987
|
},
|
|
983
|
-
value:
|
|
988
|
+
value: p.type,
|
|
984
989
|
options: ["Primary", "Secondary", "Tertiary"]
|
|
985
990
|
}
|
|
986
991
|
),
|
|
987
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
988
|
-
/* @__PURE__ */ t.jsx("div", { className:
|
|
989
|
-
|
|
992
|
+
/* @__PURE__ */ t.jsxs("div", { className: Q.buttons, children: [
|
|
993
|
+
/* @__PURE__ */ t.jsx("div", { className: Q.deleteButton, children: /* @__PURE__ */ t.jsx(
|
|
994
|
+
x,
|
|
990
995
|
{
|
|
991
996
|
name: "Sliders",
|
|
992
997
|
hoverable: !0,
|
|
993
998
|
width: 20,
|
|
994
999
|
height: 20,
|
|
995
|
-
onClick: (
|
|
996
|
-
|
|
1000
|
+
onClick: (I) => {
|
|
1001
|
+
w(I, p);
|
|
997
1002
|
}
|
|
998
1003
|
}
|
|
999
1004
|
) }),
|
|
1000
|
-
s && /* @__PURE__ */ t.jsx("div", { className:
|
|
1001
|
-
|
|
1005
|
+
s && /* @__PURE__ */ t.jsx("div", { className: Q.deleteButton, children: /* @__PURE__ */ t.jsx(
|
|
1006
|
+
x,
|
|
1002
1007
|
{
|
|
1003
1008
|
name: "Trash",
|
|
1004
1009
|
hoverable: !0,
|
|
1005
1010
|
onClick: () => {
|
|
1006
|
-
const
|
|
1007
|
-
e(
|
|
1011
|
+
const I = i.filter((B) => B.id !== p.id);
|
|
1012
|
+
e(I);
|
|
1008
1013
|
},
|
|
1009
1014
|
width: 20,
|
|
1010
1015
|
height: 20,
|
|
@@ -1014,16 +1019,16 @@ const Zn = (r) => {
|
|
|
1014
1019
|
] })
|
|
1015
1020
|
]
|
|
1016
1021
|
},
|
|
1017
|
-
|
|
1022
|
+
p.id
|
|
1018
1023
|
)),
|
|
1019
|
-
|
|
1024
|
+
o && /* @__PURE__ */ t.jsx(
|
|
1020
1025
|
$t,
|
|
1021
1026
|
{
|
|
1022
|
-
ref:
|
|
1023
|
-
activeButton:
|
|
1024
|
-
setActiveButton:
|
|
1025
|
-
popupPosition:
|
|
1026
|
-
editableLink:
|
|
1027
|
+
ref: M,
|
|
1028
|
+
activeButton: o,
|
|
1029
|
+
setActiveButton: d,
|
|
1030
|
+
popupPosition: f,
|
|
1031
|
+
editableLink: h
|
|
1027
1032
|
}
|
|
1028
1033
|
),
|
|
1029
1034
|
n && /* @__PURE__ */ t.jsx(
|
|
@@ -1038,39 +1043,39 @@ const Zn = (r) => {
|
|
|
1038
1043
|
tt,
|
|
1039
1044
|
{
|
|
1040
1045
|
withoutHover: !0,
|
|
1041
|
-
className:
|
|
1046
|
+
className: Q.button,
|
|
1042
1047
|
size: "s",
|
|
1043
1048
|
onClick: () => {
|
|
1044
|
-
const
|
|
1045
|
-
|
|
1049
|
+
const p = [...i];
|
|
1050
|
+
h ? p.push({
|
|
1046
1051
|
type: "Primary",
|
|
1047
|
-
id:
|
|
1052
|
+
id: it(),
|
|
1048
1053
|
typesText: [],
|
|
1049
1054
|
text: {
|
|
1050
1055
|
"en-US": "Button Name"
|
|
1051
1056
|
},
|
|
1052
1057
|
destination: "Go to Page",
|
|
1053
|
-
page:
|
|
1058
|
+
page: u ? Object.values(u)[0].name : "Home",
|
|
1054
1059
|
openInNewTab: !1
|
|
1055
|
-
}) :
|
|
1060
|
+
}) : p.push({
|
|
1056
1061
|
type: "Primary",
|
|
1057
|
-
id:
|
|
1062
|
+
id: it(),
|
|
1058
1063
|
typesText: [],
|
|
1059
1064
|
text: {
|
|
1060
1065
|
"en-US": "Create Ticket"
|
|
1061
1066
|
},
|
|
1062
1067
|
destination: "Go to Page",
|
|
1063
|
-
page:
|
|
1068
|
+
page: u ? Object.values(u)[0].name : "Home",
|
|
1064
1069
|
openInNewTab: !1
|
|
1065
|
-
}), e(
|
|
1070
|
+
}), e(p);
|
|
1066
1071
|
},
|
|
1067
1072
|
style: {
|
|
1068
1073
|
width: "fit-content"
|
|
1069
1074
|
},
|
|
1070
|
-
children: /* @__PURE__ */ t.jsxs("div", { className:
|
|
1075
|
+
children: /* @__PURE__ */ t.jsxs("div", { className: Q.addButton, children: [
|
|
1071
1076
|
/* @__PURE__ */ t.jsx("span", { children: "Add Option" }),
|
|
1072
1077
|
/* @__PURE__ */ t.jsx(
|
|
1073
|
-
|
|
1078
|
+
x,
|
|
1074
1079
|
{
|
|
1075
1080
|
name: "Plus",
|
|
1076
1081
|
width: 16,
|
|
@@ -1083,110 +1088,120 @@ const Zn = (r) => {
|
|
|
1083
1088
|
}
|
|
1084
1089
|
)
|
|
1085
1090
|
] });
|
|
1086
|
-
},
|
|
1087
|
-
const {
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
+
}, ei = (r) => {
|
|
1092
|
+
const {
|
|
1093
|
+
isActiveButtons: i,
|
|
1094
|
+
setIsActiveButtons: e,
|
|
1095
|
+
buttons: s,
|
|
1096
|
+
setButtons: n,
|
|
1097
|
+
editableLink: h = !0,
|
|
1098
|
+
addable: u = !0,
|
|
1099
|
+
deletable: o = !0
|
|
1100
|
+
} = r;
|
|
1101
|
+
return /* @__PURE__ */ t.jsx(t.Fragment, { children: /* @__PURE__ */ t.jsxs("div", { className: rt.buttonsBlock, children: [
|
|
1102
|
+
/* @__PURE__ */ t.jsxs("div", { className: rt.top, children: [
|
|
1103
|
+
/* @__PURE__ */ t.jsx("h3", { className: rt.title, children: "Buttons" }),
|
|
1091
1104
|
/* @__PURE__ */ t.jsx(
|
|
1092
|
-
|
|
1105
|
+
ot,
|
|
1093
1106
|
{
|
|
1094
|
-
current:
|
|
1095
|
-
onChange: (
|
|
1107
|
+
current: i,
|
|
1108
|
+
onChange: (d) => e(d)
|
|
1096
1109
|
}
|
|
1097
1110
|
)
|
|
1098
1111
|
] }),
|
|
1099
|
-
|
|
1100
|
-
|
|
1112
|
+
i && /* @__PURE__ */ t.jsx(
|
|
1113
|
+
ms,
|
|
1101
1114
|
{
|
|
1102
1115
|
buttons: s,
|
|
1103
1116
|
setButtons: n,
|
|
1104
|
-
editableLink:
|
|
1117
|
+
editableLink: h,
|
|
1118
|
+
addable: u,
|
|
1119
|
+
deletable: o
|
|
1105
1120
|
}
|
|
1106
1121
|
)
|
|
1107
1122
|
] }) });
|
|
1108
1123
|
};
|
|
1109
|
-
function
|
|
1110
|
-
const { product:
|
|
1111
|
-
id: String(
|
|
1112
|
-
}),
|
|
1113
|
-
transform:
|
|
1114
|
-
transition:
|
|
1124
|
+
function hs(r) {
|
|
1125
|
+
const { product: i, children: e } = r, { attributes: s, listeners: n, setNodeRef: h, transform: u, transition: o, isDragging: d } = ft({
|
|
1126
|
+
id: String(i.listingId)
|
|
1127
|
+
}), f = {
|
|
1128
|
+
transform: bt.Transform.toString(u),
|
|
1129
|
+
transition: o
|
|
1115
1130
|
};
|
|
1116
1131
|
return /* @__PURE__ */ t.jsx(
|
|
1117
1132
|
"div",
|
|
1118
1133
|
{
|
|
1119
|
-
ref:
|
|
1120
|
-
style:
|
|
1121
|
-
className: `${
|
|
1134
|
+
ref: h,
|
|
1135
|
+
style: f,
|
|
1136
|
+
className: `${V.product} ${d ? V.dragging : ""}`,
|
|
1122
1137
|
...s,
|
|
1123
1138
|
...n,
|
|
1124
1139
|
children: e
|
|
1125
1140
|
}
|
|
1126
1141
|
);
|
|
1127
1142
|
}
|
|
1128
|
-
const
|
|
1143
|
+
const si = (r) => {
|
|
1129
1144
|
const {
|
|
1130
|
-
isActiveItems:
|
|
1145
|
+
isActiveItems: i,
|
|
1131
1146
|
setIsActiveItems: e,
|
|
1132
1147
|
items: s,
|
|
1133
1148
|
setItems: n,
|
|
1134
|
-
other:
|
|
1135
|
-
title:
|
|
1136
|
-
subtitle:
|
|
1137
|
-
editable:
|
|
1138
|
-
draggable:
|
|
1139
|
-
withImage:
|
|
1140
|
-
deletable:
|
|
1141
|
-
addable:
|
|
1142
|
-
itemsType:
|
|
1143
|
-
itemsOptions:
|
|
1144
|
-
} = r, [
|
|
1149
|
+
other: h,
|
|
1150
|
+
title: u,
|
|
1151
|
+
subtitle: o,
|
|
1152
|
+
editable: d = !0,
|
|
1153
|
+
draggable: f = !1,
|
|
1154
|
+
withImage: $ = !1,
|
|
1155
|
+
deletable: c = !0,
|
|
1156
|
+
addable: l = !0,
|
|
1157
|
+
itemsType: M,
|
|
1158
|
+
itemsOptions: w
|
|
1159
|
+
} = r, [p, I] = _.useState(
|
|
1145
1160
|
null
|
|
1146
|
-
), [
|
|
1161
|
+
), [B, g] = _.useState({
|
|
1147
1162
|
top: 0,
|
|
1148
1163
|
left: 0
|
|
1149
|
-
}), [
|
|
1150
|
-
|
|
1164
|
+
}), [v, q] = _.useState(!1), A = mt(
|
|
1165
|
+
ht(pt, {
|
|
1151
1166
|
activationConstraint: {
|
|
1152
1167
|
distance: 5
|
|
1153
1168
|
}
|
|
1154
1169
|
})
|
|
1155
1170
|
);
|
|
1156
|
-
|
|
1157
|
-
const
|
|
1158
|
-
|
|
1171
|
+
_.useEffect(() => {
|
|
1172
|
+
const a = () => {
|
|
1173
|
+
I(null), q(!1);
|
|
1159
1174
|
};
|
|
1160
|
-
return document.body.addEventListener("click",
|
|
1161
|
-
|
|
1175
|
+
return document.body.addEventListener("click", a), I(null), q(!1), () => {
|
|
1176
|
+
I(null), q(!1), document.body.removeEventListener("click", a);
|
|
1162
1177
|
};
|
|
1163
|
-
}, []),
|
|
1164
|
-
if (
|
|
1165
|
-
const
|
|
1166
|
-
n(
|
|
1178
|
+
}, []), _.useEffect(() => {
|
|
1179
|
+
if (p) {
|
|
1180
|
+
const a = [...s].map((j) => j.listingId === p.listingId ? p : j);
|
|
1181
|
+
n(a);
|
|
1167
1182
|
}
|
|
1168
|
-
}, [
|
|
1169
|
-
const
|
|
1170
|
-
|
|
1171
|
-
const
|
|
1172
|
-
let
|
|
1173
|
-
|
|
1174
|
-
top:
|
|
1175
|
-
left:
|
|
1176
|
-
}),
|
|
1183
|
+
}, [p]);
|
|
1184
|
+
const L = (a, j) => {
|
|
1185
|
+
a.stopPropagation();
|
|
1186
|
+
const C = a.target.getBoundingClientRect(), D = 100, P = window.innerHeight;
|
|
1187
|
+
let R = C.top + window.scrollY;
|
|
1188
|
+
R + D > P && (R = P - D - 20), q(!0), g({
|
|
1189
|
+
top: R - 80,
|
|
1190
|
+
left: C.left - 30
|
|
1191
|
+
}), I(j);
|
|
1177
1192
|
};
|
|
1178
|
-
function
|
|
1179
|
-
if (
|
|
1180
|
-
return
|
|
1193
|
+
function S(a) {
|
|
1194
|
+
if ($)
|
|
1195
|
+
return a ? /* @__PURE__ */ t.jsx(
|
|
1181
1196
|
"img",
|
|
1182
1197
|
{
|
|
1183
|
-
src: `https://imagedelivery.net/${
|
|
1198
|
+
src: `https://imagedelivery.net/${a}/w=1000`,
|
|
1184
1199
|
alt: "image",
|
|
1185
1200
|
width: 16,
|
|
1186
1201
|
height: 16
|
|
1187
1202
|
}
|
|
1188
1203
|
) : /* @__PURE__ */ t.jsx(
|
|
1189
|
-
|
|
1204
|
+
x,
|
|
1190
1205
|
{
|
|
1191
1206
|
name: "Image",
|
|
1192
1207
|
width: 16,
|
|
@@ -1195,21 +1210,21 @@ const ei = (r) => {
|
|
|
1195
1210
|
}
|
|
1196
1211
|
);
|
|
1197
1212
|
}
|
|
1198
|
-
const
|
|
1199
|
-
const { active: j, over:
|
|
1200
|
-
if (
|
|
1201
|
-
const
|
|
1202
|
-
if (
|
|
1203
|
-
const
|
|
1204
|
-
|
|
1213
|
+
const b = (a) => {
|
|
1214
|
+
const { active: j, over: C } = a;
|
|
1215
|
+
if (C && j.id !== C.id) {
|
|
1216
|
+
const D = s.findIndex((R) => String(R.listingId) === j.id), P = s.findIndex((R) => String(R.listingId) === C.id);
|
|
1217
|
+
if (D !== -1 && P !== -1) {
|
|
1218
|
+
const R = [...s], [K] = R.splice(D, 1);
|
|
1219
|
+
R.splice(P, 0, K), n(R);
|
|
1205
1220
|
}
|
|
1206
1221
|
}
|
|
1207
|
-
},
|
|
1208
|
-
const
|
|
1209
|
-
if (!
|
|
1210
|
-
const
|
|
1211
|
-
|
|
1212
|
-
|
|
1222
|
+
}, N = (a, j) => {
|
|
1223
|
+
const C = w.find((P) => a.listingId === P.id);
|
|
1224
|
+
if (!C) return null;
|
|
1225
|
+
const D = /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
1226
|
+
f && /* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
|
|
1227
|
+
x,
|
|
1213
1228
|
{
|
|
1214
1229
|
name: "DotsSixVertical",
|
|
1215
1230
|
hoverable: !0,
|
|
@@ -1217,108 +1232,108 @@ const ei = (r) => {
|
|
|
1217
1232
|
height: 20
|
|
1218
1233
|
}
|
|
1219
1234
|
) }),
|
|
1220
|
-
|
|
1221
|
-
|
|
1235
|
+
M === "select" && /* @__PURE__ */ t.jsx(
|
|
1236
|
+
at,
|
|
1222
1237
|
{
|
|
1223
1238
|
onChange: (P) => {
|
|
1224
|
-
const
|
|
1225
|
-
if (!
|
|
1226
|
-
const
|
|
1227
|
-
listingId:
|
|
1228
|
-
image:
|
|
1229
|
-
},
|
|
1230
|
-
|
|
1239
|
+
const R = [...s], K = w.find((T) => T.productData.name === P);
|
|
1240
|
+
if (!K) return;
|
|
1241
|
+
const st = {
|
|
1242
|
+
listingId: K.id,
|
|
1243
|
+
image: K.productData.images.length > 0 ? K.productData.images[0].cfId : ""
|
|
1244
|
+
}, m = R.map((T) => T.listingId === a.listingId ? st : T);
|
|
1245
|
+
I(st), n([...m]);
|
|
1231
1246
|
},
|
|
1232
|
-
value:
|
|
1247
|
+
value: C.productData.name,
|
|
1233
1248
|
options: [
|
|
1234
|
-
...
|
|
1249
|
+
...w.filter((P) => !s.find((R) => R.listingId === P.id)).map((P) => P.productData.name)
|
|
1235
1250
|
],
|
|
1236
|
-
leftAddon:
|
|
1237
|
-
|
|
1251
|
+
leftAddon: S(
|
|
1252
|
+
a.image || C.productData.images.length > 0 && C.productData.images[0].cfId || ""
|
|
1238
1253
|
)
|
|
1239
1254
|
},
|
|
1240
1255
|
j
|
|
1241
1256
|
),
|
|
1242
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
1243
|
-
|
|
1244
|
-
|
|
1257
|
+
/* @__PURE__ */ t.jsxs("div", { className: V.buttons, children: [
|
|
1258
|
+
d && /* @__PURE__ */ t.jsx("div", { className: V.deleteButton, children: /* @__PURE__ */ t.jsx(
|
|
1259
|
+
x,
|
|
1245
1260
|
{
|
|
1246
1261
|
name: "Sliders",
|
|
1247
1262
|
hoverable: !0,
|
|
1248
1263
|
width: 20,
|
|
1249
1264
|
height: 20,
|
|
1250
|
-
onClick: (P) =>
|
|
1265
|
+
onClick: (P) => L(P, a)
|
|
1251
1266
|
}
|
|
1252
1267
|
) }),
|
|
1253
|
-
|
|
1254
|
-
|
|
1268
|
+
c && /* @__PURE__ */ t.jsx("div", { className: V.deleteButton, children: /* @__PURE__ */ t.jsx(
|
|
1269
|
+
x,
|
|
1255
1270
|
{
|
|
1256
1271
|
name: "Trash",
|
|
1257
1272
|
hoverable: !0,
|
|
1258
1273
|
width: 20,
|
|
1259
1274
|
height: 20,
|
|
1260
1275
|
fill: "#C12A2A",
|
|
1261
|
-
onClick: () => n(s.filter((P) => P !==
|
|
1276
|
+
onClick: () => n(s.filter((P) => P !== a))
|
|
1262
1277
|
}
|
|
1263
1278
|
) })
|
|
1264
1279
|
] })
|
|
1265
1280
|
] });
|
|
1266
|
-
return
|
|
1267
|
-
|
|
1281
|
+
return f ? /* @__PURE__ */ t.jsx(
|
|
1282
|
+
hs,
|
|
1268
1283
|
{
|
|
1269
|
-
product:
|
|
1270
|
-
children:
|
|
1284
|
+
product: a,
|
|
1285
|
+
children: D
|
|
1271
1286
|
},
|
|
1272
|
-
|
|
1287
|
+
a.listingId
|
|
1273
1288
|
) : /* @__PURE__ */ t.jsx(
|
|
1274
1289
|
"div",
|
|
1275
1290
|
{
|
|
1276
|
-
className:
|
|
1277
|
-
children:
|
|
1291
|
+
className: V.product,
|
|
1292
|
+
children: D
|
|
1278
1293
|
},
|
|
1279
|
-
|
|
1294
|
+
a.listingId
|
|
1280
1295
|
);
|
|
1281
|
-
},
|
|
1282
|
-
return /* @__PURE__ */ t.jsxs("div", { className:
|
|
1283
|
-
(
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
|
|
1296
|
+
}, O = _.useRef(null);
|
|
1297
|
+
return /* @__PURE__ */ t.jsxs("div", { className: V.productsBlock, children: [
|
|
1298
|
+
(u || i !== void 0) && /* @__PURE__ */ t.jsxs("div", { className: V.top, children: [
|
|
1299
|
+
u && /* @__PURE__ */ t.jsx("h3", { className: V.title, children: u }),
|
|
1300
|
+
i !== void 0 && /* @__PURE__ */ t.jsx(
|
|
1301
|
+
ot,
|
|
1287
1302
|
{
|
|
1288
|
-
current:
|
|
1289
|
-
onChange: (
|
|
1303
|
+
current: i,
|
|
1304
|
+
onChange: (a) => e == null ? void 0 : e(a)
|
|
1290
1305
|
}
|
|
1291
1306
|
)
|
|
1292
1307
|
] }),
|
|
1293
|
-
|
|
1294
|
-
|
|
1308
|
+
v && p && /* @__PURE__ */ t.jsx(
|
|
1309
|
+
Pt,
|
|
1295
1310
|
{
|
|
1296
|
-
ref:
|
|
1297
|
-
activeItem:
|
|
1298
|
-
setActiveItem:
|
|
1299
|
-
setIsOpenModal:
|
|
1300
|
-
popupPosition:
|
|
1301
|
-
itemsOptions:
|
|
1311
|
+
ref: O,
|
|
1312
|
+
activeItem: p,
|
|
1313
|
+
setActiveItem: I,
|
|
1314
|
+
setIsOpenModal: q,
|
|
1315
|
+
popupPosition: B,
|
|
1316
|
+
itemsOptions: w
|
|
1302
1317
|
}
|
|
1303
1318
|
),
|
|
1304
|
-
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
|
|
1319
|
+
i && /* @__PURE__ */ t.jsxs("div", { className: V.products, children: [
|
|
1320
|
+
o && /* @__PURE__ */ t.jsx("h5", { className: V.subtitle, children: o }),
|
|
1321
|
+
f ? /* @__PURE__ */ t.jsx(
|
|
1322
|
+
_t,
|
|
1308
1323
|
{
|
|
1309
|
-
sensors:
|
|
1310
|
-
onDragEnd:
|
|
1324
|
+
sensors: A,
|
|
1325
|
+
onDragEnd: b,
|
|
1311
1326
|
children: /* @__PURE__ */ t.jsx(
|
|
1312
|
-
|
|
1327
|
+
gt,
|
|
1313
1328
|
{
|
|
1314
|
-
items: s.map((
|
|
1315
|
-
strategy:
|
|
1316
|
-
children: s.map((
|
|
1329
|
+
items: s.map((a) => String(a.listingId)),
|
|
1330
|
+
strategy: xt,
|
|
1331
|
+
children: s.map((a, j) => N(a, j))
|
|
1317
1332
|
}
|
|
1318
1333
|
)
|
|
1319
1334
|
}
|
|
1320
|
-
) : s.map((
|
|
1321
|
-
|
|
1335
|
+
) : s.map((a, j) => N(a, j)),
|
|
1336
|
+
l && /* @__PURE__ */ t.jsx(
|
|
1322
1337
|
"div",
|
|
1323
1338
|
{
|
|
1324
1339
|
style: {
|
|
@@ -1330,28 +1345,28 @@ const ei = (r) => {
|
|
|
1330
1345
|
tt,
|
|
1331
1346
|
{
|
|
1332
1347
|
withoutHover: !0,
|
|
1333
|
-
className:
|
|
1348
|
+
className: V.button,
|
|
1334
1349
|
size: "s",
|
|
1335
1350
|
onClick: () => {
|
|
1336
|
-
const
|
|
1337
|
-
for (let j = 0; j <
|
|
1338
|
-
if (!s.find((
|
|
1339
|
-
|
|
1340
|
-
listingId:
|
|
1341
|
-
image:
|
|
1351
|
+
const a = [...s];
|
|
1352
|
+
for (let j = 0; j < w.length; j++)
|
|
1353
|
+
if (!s.find((C) => C.listingId === w[j].id)) {
|
|
1354
|
+
a.push({
|
|
1355
|
+
listingId: w[j].id,
|
|
1356
|
+
image: w[j].productData.images.length > 0 ? w[j].productData.images[0].cfId : ""
|
|
1342
1357
|
});
|
|
1343
1358
|
break;
|
|
1344
1359
|
}
|
|
1345
|
-
n(
|
|
1360
|
+
n(a);
|
|
1346
1361
|
},
|
|
1347
|
-
disabled: s.length ===
|
|
1362
|
+
disabled: s.length === w.length,
|
|
1348
1363
|
style: {
|
|
1349
1364
|
width: "fit-content"
|
|
1350
1365
|
},
|
|
1351
|
-
children: /* @__PURE__ */ t.jsxs("div", { className:
|
|
1366
|
+
children: /* @__PURE__ */ t.jsxs("div", { className: V.addButton, children: [
|
|
1352
1367
|
/* @__PURE__ */ t.jsx("span", { children: "Add Option" }),
|
|
1353
1368
|
/* @__PURE__ */ t.jsx(
|
|
1354
|
-
|
|
1369
|
+
x,
|
|
1355
1370
|
{
|
|
1356
1371
|
name: "Plus",
|
|
1357
1372
|
width: 16,
|
|
@@ -1364,142 +1379,142 @@ const ei = (r) => {
|
|
|
1364
1379
|
}
|
|
1365
1380
|
)
|
|
1366
1381
|
] }),
|
|
1367
|
-
|
|
1382
|
+
i && h !== void 0 && /* @__PURE__ */ t.jsx(ut, { items: h })
|
|
1368
1383
|
] });
|
|
1369
|
-
},
|
|
1370
|
-
options:
|
|
1371
|
-
price:
|
|
1372
|
-
oldPrice:
|
|
1373
|
-
newPrice:
|
|
1384
|
+
}, ps = "_options_6cemk_1", _s = "_price_6cemk_12", gs = "_oldPrice_6cemk_19", xs = "_newPrice_6cemk_27", fs = "_animate_6cemk_34", bs = "_appearAndBounce_6cemk_1", js = "_meta_6cemk_52", vs = "_info_6cemk_58", ys = "_infoRight_6cemk_66", Ns = "_buttons_6cemk_73", ks = "_variants_6cemk_80", Is = "_variant_6cemk_80", Cs = "_stock_6cemk_98", Ss = "_variantInfo_6cemk_105", ws = "_quantity_6cemk_111", Bs = "_count_6cemk_118", $s = "_focused_6cemk_135", Ps = "_button_6cemk_73", Ms = "_activeVariant_6cemk_161", Ts = "_chargeTypes_6cemk_165", qs = "_charge_6cemk_165", As = "_chargeActive_6cemk_190", Os = "_title_6cemk_198", k = {
|
|
1385
|
+
options: ps,
|
|
1386
|
+
price: _s,
|
|
1387
|
+
oldPrice: gs,
|
|
1388
|
+
newPrice: xs,
|
|
1374
1389
|
animate: fs,
|
|
1375
|
-
appearAndBounce:
|
|
1376
|
-
meta:
|
|
1377
|
-
info:
|
|
1378
|
-
infoRight:
|
|
1379
|
-
buttons:
|
|
1380
|
-
variants:
|
|
1381
|
-
variant:
|
|
1382
|
-
stock:
|
|
1383
|
-
variantInfo:
|
|
1384
|
-
quantity:
|
|
1385
|
-
count:
|
|
1390
|
+
appearAndBounce: bs,
|
|
1391
|
+
meta: js,
|
|
1392
|
+
info: vs,
|
|
1393
|
+
infoRight: ys,
|
|
1394
|
+
buttons: Ns,
|
|
1395
|
+
variants: ks,
|
|
1396
|
+
variant: Is,
|
|
1397
|
+
stock: Cs,
|
|
1398
|
+
variantInfo: Ss,
|
|
1399
|
+
quantity: ws,
|
|
1400
|
+
count: Bs,
|
|
1386
1401
|
focused: $s,
|
|
1387
|
-
button:
|
|
1388
|
-
activeVariant:
|
|
1389
|
-
chargeTypes:
|
|
1390
|
-
charge:
|
|
1391
|
-
chargeActive:
|
|
1392
|
-
title:
|
|
1402
|
+
button: Ps,
|
|
1403
|
+
activeVariant: Ms,
|
|
1404
|
+
chargeTypes: Ts,
|
|
1405
|
+
charge: qs,
|
|
1406
|
+
chargeActive: As,
|
|
1407
|
+
title: Os
|
|
1393
1408
|
};
|
|
1394
|
-
var
|
|
1395
|
-
const
|
|
1396
|
-
var
|
|
1397
|
-
const { variants:
|
|
1398
|
-
|
|
1399
|
-
|
|
1400
|
-
const
|
|
1401
|
-
return () => clearTimeout(
|
|
1402
|
-
}, [
|
|
1403
|
-
async function
|
|
1404
|
-
await
|
|
1409
|
+
var It = /* @__PURE__ */ ((r) => (r.ONE_TIME = "One-Time", r.RECURRING = "Subscribe & Save", r))(It || {});
|
|
1410
|
+
const ni = (r) => {
|
|
1411
|
+
var I, B;
|
|
1412
|
+
const { variants: i } = r, [e, s] = _.useState(i[0]), [n, h] = _.useState(e.chargeTypes[0]), u = lt(), [o, d] = _.useState(1), { reset: f, addProductToCart: $ } = jt(), [c, l] = _.useState(!1);
|
|
1413
|
+
_.useEffect(() => {
|
|
1414
|
+
l(!0);
|
|
1415
|
+
const g = setTimeout(() => l(!1), 600);
|
|
1416
|
+
return () => clearTimeout(g);
|
|
1417
|
+
}, [o]);
|
|
1418
|
+
async function M() {
|
|
1419
|
+
await $({
|
|
1405
1420
|
productId: r.id,
|
|
1406
1421
|
productVariantId: e.id,
|
|
1407
|
-
quantity:
|
|
1422
|
+
quantity: o
|
|
1408
1423
|
});
|
|
1409
1424
|
}
|
|
1410
|
-
function
|
|
1411
|
-
|
|
1425
|
+
function w() {
|
|
1426
|
+
f(), M(), u("/checkout");
|
|
1412
1427
|
}
|
|
1413
|
-
function
|
|
1414
|
-
if (
|
|
1415
|
-
const
|
|
1416
|
-
return `${
|
|
1417
|
-
} else if (
|
|
1418
|
-
const
|
|
1419
|
-
return `${
|
|
1420
|
-
} else if (
|
|
1421
|
-
const
|
|
1422
|
-
return `${
|
|
1428
|
+
function p(g) {
|
|
1429
|
+
if (g >= 864e5) {
|
|
1430
|
+
const S = Math.floor(g / 864e5);
|
|
1431
|
+
return `${S} ${S === 1 ? "day" : "days"}`;
|
|
1432
|
+
} else if (g >= 36e5) {
|
|
1433
|
+
const S = Math.floor(g / 36e5);
|
|
1434
|
+
return `${S} ${S === 1 ? "hour" : "hours"}`;
|
|
1435
|
+
} else if (g >= 6e4) {
|
|
1436
|
+
const S = Math.floor(g / 6e4);
|
|
1437
|
+
return `${S} ${S === 1 ? "minute" : "minutes"}`;
|
|
1423
1438
|
} else {
|
|
1424
|
-
const
|
|
1425
|
-
return `${
|
|
1439
|
+
const S = Math.floor(g / 1e3);
|
|
1440
|
+
return `${S} ${S === 1 ? "second" : "seconds"}`;
|
|
1426
1441
|
}
|
|
1427
1442
|
}
|
|
1428
|
-
return
|
|
1429
|
-
(e.quantity.available === 0 || !e.quantity.available) &&
|
|
1443
|
+
return _.useEffect(() => {
|
|
1444
|
+
(e.quantity.available === 0 || !e.quantity.available) && d(0);
|
|
1430
1445
|
}, [e.quantity.available]), /* @__PURE__ */ t.jsxs("div", { className: k.options, children: [
|
|
1431
|
-
e.chargeTypes.length > 1 && /* @__PURE__ */ t.jsx("div", { className: k.chargeTypes, children: e.chargeTypes.map((
|
|
1446
|
+
e.chargeTypes.length > 1 && /* @__PURE__ */ t.jsx("div", { className: k.chargeTypes, children: e.chargeTypes.map((g) => /* @__PURE__ */ t.jsx(
|
|
1432
1447
|
"div",
|
|
1433
1448
|
{
|
|
1434
|
-
className:
|
|
1435
|
-
[k.chargeActive]: n ===
|
|
1449
|
+
className: Y(k.charge, {
|
|
1450
|
+
[k.chargeActive]: n === g
|
|
1436
1451
|
}),
|
|
1437
|
-
onClick: () => g
|
|
1438
|
-
children:
|
|
1452
|
+
onClick: () => h(g),
|
|
1453
|
+
children: It[g]
|
|
1439
1454
|
},
|
|
1440
|
-
|
|
1455
|
+
g
|
|
1441
1456
|
)) }),
|
|
1442
|
-
/* @__PURE__ */ t.jsx("div", { className: k.variants, children:
|
|
1443
|
-
var
|
|
1457
|
+
/* @__PURE__ */ t.jsx("div", { className: k.variants, children: i.map((g) => {
|
|
1458
|
+
var v;
|
|
1444
1459
|
return /* @__PURE__ */ t.jsxs(
|
|
1445
1460
|
"div",
|
|
1446
1461
|
{
|
|
1447
|
-
className:
|
|
1448
|
-
[k.activeVariant]: e.id ===
|
|
1462
|
+
className: Y(k.variant, {
|
|
1463
|
+
[k.activeVariant]: e.id === g.id
|
|
1449
1464
|
}),
|
|
1450
|
-
onClick: () => s(
|
|
1465
|
+
onClick: () => s(g),
|
|
1451
1466
|
children: [
|
|
1452
1467
|
/* @__PURE__ */ t.jsxs("div", { className: k.variantInfo, children: [
|
|
1453
|
-
/* @__PURE__ */ t.jsx("span", { className: k.title, children:
|
|
1468
|
+
/* @__PURE__ */ t.jsx("span", { className: k.title, children: g.name }),
|
|
1454
1469
|
/* @__PURE__ */ t.jsxs("span", { children: [
|
|
1455
1470
|
"$",
|
|
1456
|
-
n === "ONE_TIME" ?
|
|
1471
|
+
n === "ONE_TIME" ? g.price.amount : g.subscriptionSettings ? g.subscriptionSettings.price.amount : "Price Not Found"
|
|
1457
1472
|
] })
|
|
1458
1473
|
] }),
|
|
1459
1474
|
/* @__PURE__ */ t.jsx("div", { children: n === "ONE_TIME" && /* @__PURE__ */ t.jsxs("span", { className: k.stock, children: [
|
|
1460
|
-
((
|
|
1475
|
+
((v = g.quantity.restrictions) == null ? void 0 : v.max) || g.quantity.available || 0,
|
|
1461
1476
|
" in stock"
|
|
1462
1477
|
] }) })
|
|
1463
1478
|
]
|
|
1464
1479
|
},
|
|
1465
|
-
|
|
1480
|
+
g.id
|
|
1466
1481
|
);
|
|
1467
1482
|
}) }),
|
|
1468
1483
|
n === "ONE_TIME" && /* @__PURE__ */ t.jsxs("div", { className: k.quantity, children: [
|
|
1469
1484
|
/* @__PURE__ */ t.jsx(
|
|
1470
|
-
|
|
1485
|
+
G,
|
|
1471
1486
|
{
|
|
1472
1487
|
type: "Secondary",
|
|
1473
1488
|
onClick: () => {
|
|
1474
|
-
|
|
1489
|
+
o > 1 ? d((g) => g - 1) : d(1);
|
|
1475
1490
|
},
|
|
1476
1491
|
className: k.button,
|
|
1477
|
-
disabled: e.quantity.available === 0 || e.quantity.restrictions &&
|
|
1478
|
-
children: /* @__PURE__ */ t.jsx(
|
|
1492
|
+
disabled: e.quantity.available === 0 || e.quantity.restrictions && o <= e.quantity.restrictions.min || Object.keys(e.quantity.restrictions || {}).length === 0 && !e.quantity.available,
|
|
1493
|
+
children: /* @__PURE__ */ t.jsx(x, { name: "Minus" })
|
|
1479
1494
|
}
|
|
1480
1495
|
),
|
|
1481
1496
|
/* @__PURE__ */ t.jsx(
|
|
1482
|
-
|
|
1497
|
+
Mt,
|
|
1483
1498
|
{
|
|
1484
1499
|
type: "number",
|
|
1485
|
-
value: String(
|
|
1486
|
-
onChange: (
|
|
1487
|
-
max: ((
|
|
1488
|
-
min: ((
|
|
1500
|
+
value: String(o),
|
|
1501
|
+
onChange: (g) => d(Number(g)),
|
|
1502
|
+
max: ((I = e.quantity.restrictions) == null ? void 0 : I.max) || e.quantity.available || 1 / 0,
|
|
1503
|
+
min: ((B = e.quantity.restrictions) == null ? void 0 : B.min) || 0,
|
|
1489
1504
|
centered: !0,
|
|
1490
1505
|
disabled: e.quantity.available === 0 || !e.quantity.available || Object.keys(e.quantity.restrictions || {}).length === 0 && !e.quantity.available
|
|
1491
1506
|
}
|
|
1492
1507
|
),
|
|
1493
1508
|
/* @__PURE__ */ t.jsx(
|
|
1494
|
-
|
|
1509
|
+
G,
|
|
1495
1510
|
{
|
|
1496
1511
|
type: "Secondary",
|
|
1497
1512
|
onClick: () => {
|
|
1498
|
-
|
|
1513
|
+
d((g) => g + 1);
|
|
1499
1514
|
},
|
|
1500
1515
|
className: k.button,
|
|
1501
|
-
disabled: !!(e.quantity.restrictions &&
|
|
1502
|
-
children: /* @__PURE__ */ t.jsx(
|
|
1516
|
+
disabled: !!(e.quantity.restrictions && o >= e.quantity.restrictions.max || e.quantity.available !== void 0 && o >= e.quantity.available || Object.keys(e.quantity.restrictions || {}).length === 0 && !e.quantity.available),
|
|
1517
|
+
children: /* @__PURE__ */ t.jsx(x, { name: "Plus" })
|
|
1503
1518
|
}
|
|
1504
1519
|
)
|
|
1505
1520
|
] }),
|
|
@@ -1508,7 +1523,7 @@ const si = (r) => {
|
|
|
1508
1523
|
/* @__PURE__ */ t.jsx("span", { children: "Delivery" }),
|
|
1509
1524
|
/* @__PURE__ */ t.jsxs("div", { className: k.infoRight, children: [
|
|
1510
1525
|
/* @__PURE__ */ t.jsx(
|
|
1511
|
-
|
|
1526
|
+
x,
|
|
1512
1527
|
{
|
|
1513
1528
|
name: "Lightning",
|
|
1514
1529
|
fill: "#FF3F19",
|
|
@@ -1516,25 +1531,25 @@ const si = (r) => {
|
|
|
1516
1531
|
height: 20
|
|
1517
1532
|
}
|
|
1518
1533
|
),
|
|
1519
|
-
/* @__PURE__ */ t.jsx("span", { children: !e.deliveryTime || e.deliveryTime === 0 ? "Instant" :
|
|
1534
|
+
/* @__PURE__ */ t.jsx("span", { children: !e.deliveryTime || e.deliveryTime === 0 ? "Instant" : p(e.deliveryTime) })
|
|
1520
1535
|
] })
|
|
1521
1536
|
] }),
|
|
1522
1537
|
/* @__PURE__ */ t.jsxs("div", { className: k.info, children: [
|
|
1523
1538
|
/* @__PURE__ */ t.jsx("span", { children: "Price" }),
|
|
1524
1539
|
/* @__PURE__ */ t.jsx("div", { className: k.infoRight, children: n === "ONE_TIME" ? e.compareAtPrice && (e.compareAtPrice.amount || 0) - (e.price.amount || 0) > 0 ? /* @__PURE__ */ t.jsxs("div", { className: k.price, children: [
|
|
1525
|
-
/* @__PURE__ */ t.jsxs("span", { className:
|
|
1540
|
+
/* @__PURE__ */ t.jsxs("span", { className: Y(k.newPrice, { [k.animate]: c }), children: [
|
|
1526
1541
|
"$ ",
|
|
1527
|
-
(e.price.amount || 0) *
|
|
1542
|
+
(e.price.amount || 0) * o
|
|
1528
1543
|
] }),
|
|
1529
1544
|
/* @__PURE__ */ t.jsxs("span", { className: k.oldPrice, children: [
|
|
1530
1545
|
"$ ",
|
|
1531
|
-
(e.compareAtPrice.amount || 0) *
|
|
1546
|
+
(e.compareAtPrice.amount || 0) * o
|
|
1532
1547
|
] })
|
|
1533
|
-
] }) : /* @__PURE__ */ t.jsxs("span", { className:
|
|
1548
|
+
] }) : /* @__PURE__ */ t.jsxs("span", { className: Y(k.newPrice, { [k.animate]: c }), children: [
|
|
1534
1549
|
"$ ",
|
|
1535
|
-
(e.price.amount || 0) *
|
|
1550
|
+
(e.price.amount || 0) * o
|
|
1536
1551
|
] }) : e.subscriptionSettings && e.subscriptionSettings.compareAtPrice && (e.subscriptionSettings.compareAtPrice.amount || 0) - (e.subscriptionSettings.price.amount || 0) > 0 ? /* @__PURE__ */ t.jsxs("div", { className: k.price, children: [
|
|
1537
|
-
/* @__PURE__ */ t.jsxs("span", { className:
|
|
1552
|
+
/* @__PURE__ */ t.jsxs("span", { className: Y(k.newPrice, { [k.animate]: c }), children: [
|
|
1538
1553
|
"$ ",
|
|
1539
1554
|
e.subscriptionSettings.price.amount || 0
|
|
1540
1555
|
] }),
|
|
@@ -1542,7 +1557,7 @@ const si = (r) => {
|
|
|
1542
1557
|
"$ ",
|
|
1543
1558
|
e.subscriptionSettings.compareAtPrice.amount || 0
|
|
1544
1559
|
] })
|
|
1545
|
-
] }) : e.subscriptionSettings && /* @__PURE__ */ t.jsxs("span", { className:
|
|
1560
|
+
] }) : e.subscriptionSettings && /* @__PURE__ */ t.jsxs("span", { className: Y(k.newPrice, { [k.animate]: c }), children: [
|
|
1546
1561
|
"$ ",
|
|
1547
1562
|
e.subscriptionSettings.price.amount || 0
|
|
1548
1563
|
] }) })
|
|
@@ -1550,222 +1565,200 @@ const si = (r) => {
|
|
|
1550
1565
|
] }),
|
|
1551
1566
|
/* @__PURE__ */ t.jsxs("div", { className: k.buttons, children: [
|
|
1552
1567
|
/* @__PURE__ */ t.jsx(
|
|
1553
|
-
|
|
1568
|
+
G,
|
|
1554
1569
|
{
|
|
1555
1570
|
type: "Primary",
|
|
1556
|
-
onClick: () =>
|
|
1571
|
+
onClick: () => w(),
|
|
1557
1572
|
disabled: e.quantity.available === 0 || !e.quantity.available || Object.keys(e.quantity.restrictions || {}).length === 0 && !e.quantity.available,
|
|
1558
1573
|
children: n === "ONE_TIME" ? "Buy Now" : "Subscribe Now"
|
|
1559
1574
|
}
|
|
1560
1575
|
),
|
|
1561
1576
|
n === "ONE_TIME" && /* @__PURE__ */ t.jsx(
|
|
1562
|
-
|
|
1577
|
+
G,
|
|
1563
1578
|
{
|
|
1564
1579
|
type: "Secondary",
|
|
1565
|
-
onClick: () =>
|
|
1580
|
+
onClick: () => M(),
|
|
1566
1581
|
disabled: e.quantity.available === 0 || !e.quantity.available || Object.keys(e.quantity.restrictions || {}).length === 0 && !e.quantity.available,
|
|
1567
1582
|
children: "Add to Cart"
|
|
1568
1583
|
}
|
|
1569
1584
|
)
|
|
1570
1585
|
] })
|
|
1571
1586
|
] });
|
|
1572
|
-
},
|
|
1573
|
-
button:
|
|
1574
|
-
login:
|
|
1575
|
-
signUp:
|
|
1576
|
-
buttons:
|
|
1587
|
+
}, Es = "_button_1tdo3_1", zs = "_login_1tdo3_14", Rs = "_signUp_1tdo3_18", Ls = "_buttons_1tdo3_23", Ds = "_modal_1tdo3_32", Hs = "_closing_1tdo3_64", Us = "_info_1tdo3_113", Fs = "_top_1tdo3_120", Vs = "_title_1tdo3_131", Ys = "_clear_1tdo3_138", Gs = "_activeClear_1tdo3_145", Ws = "_count_1tdo3_149", Js = "_cart_1tdo3_164", Xs = "_empty_1tdo3_172", Ks = "_product_1tdo3_198", Qs = "_products_1tdo3_207", Zs = "_image_1tdo3_215", tn = "_productInfo_1tdo3_221", en = "_content_1tdo3_228", sn = "_name_1tdo3_234", nn = "_price_1tdo3_240", on = "_productButtons_1tdo3_246", an = "_productButton_1tdo3_246", cn = "_productCount_1tdo3_266", ln = "_bottom_1tdo3_282", rn = "_subtotal_1tdo3_290", dn = "_block_1tdo3_298", un = "_shoppingCount_1tdo3_305", mn = "_total_1tdo3_325", hn = "_link_1tdo3_331", pn = "_userInfo_1tdo3_338", _n = "_pagesMobileModal_1tdo3_349", gn = "_pagesMobileModalContent_1tdo3_363", xn = "_pagesMobileModalHeader_1tdo3_369", fn = "_pagesMobileModalFooter_1tdo3_379", y = {
|
|
1588
|
+
button: Es,
|
|
1589
|
+
login: zs,
|
|
1590
|
+
signUp: Rs,
|
|
1591
|
+
buttons: Ls,
|
|
1577
1592
|
modal: Ds,
|
|
1578
1593
|
"slide-in-fade": "_slide-in-fade_1tdo3_1",
|
|
1579
1594
|
"mobile-slide-in-fade": "_mobile-slide-in-fade_1tdo3_1",
|
|
1580
|
-
closing:
|
|
1595
|
+
closing: Hs,
|
|
1581
1596
|
"mobile-slide-out-fade": "_mobile-slide-out-fade_1tdo3_1",
|
|
1582
1597
|
"slide-out-fade": "_slide-out-fade_1tdo3_1",
|
|
1583
|
-
info:
|
|
1584
|
-
top:
|
|
1585
|
-
title:
|
|
1586
|
-
clear:
|
|
1587
|
-
activeClear:
|
|
1598
|
+
info: Us,
|
|
1599
|
+
top: Fs,
|
|
1600
|
+
title: Vs,
|
|
1601
|
+
clear: Ys,
|
|
1602
|
+
activeClear: Gs,
|
|
1588
1603
|
count: Ws,
|
|
1589
|
-
cart:
|
|
1590
|
-
empty:
|
|
1591
|
-
product:
|
|
1592
|
-
products:
|
|
1593
|
-
image:
|
|
1594
|
-
productInfo:
|
|
1595
|
-
content:
|
|
1596
|
-
name:
|
|
1597
|
-
price:
|
|
1598
|
-
productButtons:
|
|
1599
|
-
productButton:
|
|
1600
|
-
productCount:
|
|
1601
|
-
bottom:
|
|
1602
|
-
subtotal:
|
|
1603
|
-
block:
|
|
1604
|
-
shoppingCount:
|
|
1605
|
-
total:
|
|
1606
|
-
link:
|
|
1607
|
-
userInfo:
|
|
1608
|
-
pagesMobileModal:
|
|
1609
|
-
pagesMobileModalContent:
|
|
1610
|
-
pagesMobileModalHeader:
|
|
1604
|
+
cart: Js,
|
|
1605
|
+
empty: Xs,
|
|
1606
|
+
product: Ks,
|
|
1607
|
+
products: Qs,
|
|
1608
|
+
image: Zs,
|
|
1609
|
+
productInfo: tn,
|
|
1610
|
+
content: en,
|
|
1611
|
+
name: sn,
|
|
1612
|
+
price: nn,
|
|
1613
|
+
productButtons: on,
|
|
1614
|
+
productButton: an,
|
|
1615
|
+
productCount: cn,
|
|
1616
|
+
bottom: ln,
|
|
1617
|
+
subtotal: rn,
|
|
1618
|
+
block: dn,
|
|
1619
|
+
shoppingCount: un,
|
|
1620
|
+
total: mn,
|
|
1621
|
+
link: hn,
|
|
1622
|
+
userInfo: pn,
|
|
1623
|
+
pagesMobileModal: _n,
|
|
1624
|
+
pagesMobileModalContent: gn,
|
|
1625
|
+
pagesMobileModalHeader: xn,
|
|
1611
1626
|
pagesMobileModalFooter: fn
|
|
1612
|
-
},
|
|
1613
|
-
const { shopping:
|
|
1614
|
-
return /* @__PURE__ */ t.jsxs("div", { className:
|
|
1615
|
-
|
|
1616
|
-
s && /* @__PURE__ */ t.jsx(
|
|
1627
|
+
}, ii = (r) => {
|
|
1628
|
+
const { shopping: i, signUp: e, isShowUserInfo: s = !0 } = r;
|
|
1629
|
+
return /* @__PURE__ */ t.jsxs("div", { className: y.buttons, children: [
|
|
1630
|
+
i && /* @__PURE__ */ t.jsx(bn, {}),
|
|
1631
|
+
s && /* @__PURE__ */ t.jsx(Ct, { signUp: e })
|
|
1617
1632
|
] });
|
|
1618
|
-
},
|
|
1619
|
-
const [r,
|
|
1620
|
-
function h(
|
|
1621
|
-
|
|
1622
|
-
|
|
1623
|
-
if (n.parts[x].productVariantId === i.variants[x].id)
|
|
1624
|
-
return n.parts[x].productVariantId;
|
|
1625
|
-
}
|
|
1626
|
-
function c(i) {
|
|
1627
|
-
for (let x = 0; x < n.parts.length; x++)
|
|
1628
|
-
for (let v = 0; v < i.variants.length; v++)
|
|
1629
|
-
if (n.parts[x].productVariantId === i.variants[x].id)
|
|
1630
|
-
return n.parts[x].quantity;
|
|
1633
|
+
}, bn = () => {
|
|
1634
|
+
const [r, i] = _.useState(!1), [e, s] = _.useState([]), { cart: n } = jt();
|
|
1635
|
+
function h(f) {
|
|
1636
|
+
var $;
|
|
1637
|
+
return !f || !(f != null && f.variants) ? !1 : ($ = f.variants.find((c) => c.id === f.activeVariantId)) == null ? void 0 : $.subscriptionSettings;
|
|
1631
1638
|
}
|
|
1632
|
-
|
|
1633
|
-
(async () => {
|
|
1634
|
-
const x = n.parts.map((y) => String(y.productId)), _ = (await g([...x])).map((y) => ({
|
|
1635
|
-
...y,
|
|
1636
|
-
activeVariantId: h(y),
|
|
1637
|
-
quantity: c(y)
|
|
1638
|
-
}));
|
|
1639
|
-
s(_);
|
|
1640
|
-
})();
|
|
1641
|
-
}, [n.parts.length]);
|
|
1642
|
-
function p(i) {
|
|
1643
|
-
var x;
|
|
1644
|
-
return !i || !(i != null && i.variants) ? !1 : (x = i.variants.find((v) => v.id === i.activeVariantId)) == null ? void 0 : x.subscriptionSettings;
|
|
1645
|
-
}
|
|
1646
|
-
const I = n.parts.length > 0 && e.length > 0 && !p(e[0]), [O, d] = f.useState(!1);
|
|
1639
|
+
const u = n.parts.length > 0 && e.length > 0 && !h(e[0]), [o, d] = _.useState(!1);
|
|
1647
1640
|
return /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
1648
1641
|
/* @__PURE__ */ t.jsxs(
|
|
1649
|
-
|
|
1642
|
+
G,
|
|
1650
1643
|
{
|
|
1651
1644
|
type: "Secondary",
|
|
1652
1645
|
style: {
|
|
1653
1646
|
padding: 10
|
|
1654
1647
|
},
|
|
1655
|
-
onClick: (
|
|
1656
|
-
|
|
1648
|
+
onClick: (f) => {
|
|
1649
|
+
f.stopPropagation(), window.location.pathname.includes("/admin/builder") || (i(!0), d(!0));
|
|
1657
1650
|
},
|
|
1658
1651
|
children: [
|
|
1659
1652
|
/* @__PURE__ */ t.jsx(
|
|
1660
|
-
|
|
1653
|
+
x,
|
|
1661
1654
|
{
|
|
1662
1655
|
name: "Handbag",
|
|
1663
1656
|
fill: "var(--icon-primary)"
|
|
1664
1657
|
}
|
|
1665
1658
|
),
|
|
1666
|
-
|
|
1659
|
+
u && /* @__PURE__ */ t.jsx("div", { className: y.shoppingCount, children: n.parts.length })
|
|
1667
1660
|
]
|
|
1668
1661
|
}
|
|
1669
1662
|
),
|
|
1670
1663
|
r && /* @__PURE__ */ t.jsx(
|
|
1671
|
-
|
|
1664
|
+
vt,
|
|
1672
1665
|
{
|
|
1673
1666
|
close: () => {
|
|
1674
1667
|
d(!1), setTimeout(() => {
|
|
1675
|
-
|
|
1668
|
+
i(!1);
|
|
1676
1669
|
}, 300);
|
|
1677
1670
|
},
|
|
1678
1671
|
withAnimation: !1,
|
|
1679
1672
|
children: /* @__PURE__ */ t.jsx(
|
|
1680
|
-
|
|
1673
|
+
jn,
|
|
1681
1674
|
{
|
|
1682
1675
|
activeProducts: e,
|
|
1683
|
-
isCartNotEmpty:
|
|
1684
|
-
isOpen:
|
|
1676
|
+
isCartNotEmpty: u,
|
|
1677
|
+
isOpen: o
|
|
1685
1678
|
}
|
|
1686
1679
|
)
|
|
1687
1680
|
}
|
|
1688
1681
|
)
|
|
1689
1682
|
] });
|
|
1690
|
-
},
|
|
1691
|
-
const { activeProducts:
|
|
1692
|
-
function
|
|
1693
|
-
|
|
1683
|
+
}, jn = (r) => {
|
|
1684
|
+
const { activeProducts: i, isCartNotEmpty: e, isOpen: s } = r, { cart: n, reset: h, getTotalAndDiscount: u, updateQuantityOfProduct: o } = jt(), d = lt();
|
|
1685
|
+
function f(l) {
|
|
1686
|
+
d(l);
|
|
1694
1687
|
}
|
|
1695
|
-
function
|
|
1696
|
-
|
|
1697
|
-
productId:
|
|
1698
|
-
productVariantId:
|
|
1699
|
-
quantity:
|
|
1688
|
+
function $(l) {
|
|
1689
|
+
o({
|
|
1690
|
+
productId: l.id,
|
|
1691
|
+
productVariantId: l.activeVariantId,
|
|
1692
|
+
quantity: l.quantity + 1
|
|
1700
1693
|
});
|
|
1701
1694
|
}
|
|
1702
|
-
function
|
|
1703
|
-
|
|
1704
|
-
productId:
|
|
1705
|
-
productVariantId:
|
|
1706
|
-
quantity:
|
|
1695
|
+
function c(l) {
|
|
1696
|
+
o({
|
|
1697
|
+
productId: l.id,
|
|
1698
|
+
productVariantId: l.activeVariantId,
|
|
1699
|
+
quantity: l.quantity - 1
|
|
1707
1700
|
});
|
|
1708
1701
|
}
|
|
1709
1702
|
return /* @__PURE__ */ t.jsxs(
|
|
1710
1703
|
"div",
|
|
1711
1704
|
{
|
|
1712
|
-
className:
|
|
1713
|
-
[
|
|
1705
|
+
className: Y(y.modal, {
|
|
1706
|
+
[y.closing]: !s
|
|
1714
1707
|
}),
|
|
1715
|
-
onClick: (
|
|
1708
|
+
onClick: (l) => l.stopPropagation(),
|
|
1716
1709
|
children: [
|
|
1717
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
1718
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
1719
|
-
/* @__PURE__ */ t.jsx("span", { className:
|
|
1720
|
-
e && /* @__PURE__ */ t.jsx("div", { className:
|
|
1710
|
+
/* @__PURE__ */ t.jsxs("div", { className: y.top, children: [
|
|
1711
|
+
/* @__PURE__ */ t.jsxs("div", { className: y.info, children: [
|
|
1712
|
+
/* @__PURE__ */ t.jsx("span", { className: y.title, children: "Cart" }),
|
|
1713
|
+
e && /* @__PURE__ */ t.jsx("div", { className: y.count, children: n.parts.length })
|
|
1721
1714
|
] }),
|
|
1722
1715
|
/* @__PURE__ */ t.jsx(
|
|
1723
1716
|
"button",
|
|
1724
1717
|
{
|
|
1725
|
-
className:
|
|
1726
|
-
[
|
|
1718
|
+
className: Y(y.clear, {
|
|
1719
|
+
[y.activeClear]: e
|
|
1727
1720
|
}),
|
|
1728
1721
|
disabled: !e,
|
|
1729
|
-
onClick:
|
|
1722
|
+
onClick: h,
|
|
1730
1723
|
children: "Clear all"
|
|
1731
1724
|
}
|
|
1732
1725
|
)
|
|
1733
1726
|
] }),
|
|
1734
|
-
e ? /* @__PURE__ */ t.jsxs("div", { className:
|
|
1735
|
-
/* @__PURE__ */ t.jsx("div", { className:
|
|
1727
|
+
e ? /* @__PURE__ */ t.jsxs("div", { className: y.cart, children: [
|
|
1728
|
+
/* @__PURE__ */ t.jsx("div", { className: y.products, children: i.map((l) => /* @__PURE__ */ t.jsxs(
|
|
1736
1729
|
"div",
|
|
1737
1730
|
{
|
|
1738
|
-
className:
|
|
1731
|
+
className: y.product,
|
|
1739
1732
|
children: [
|
|
1740
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
1733
|
+
/* @__PURE__ */ t.jsxs("div", { className: y.productInfo, children: [
|
|
1741
1734
|
/* @__PURE__ */ t.jsx(
|
|
1742
1735
|
"img",
|
|
1743
1736
|
{
|
|
1744
|
-
src: `https://imagedelivery.net/${
|
|
1737
|
+
src: `https://imagedelivery.net/${l.images[0].cfId}/w=500`,
|
|
1745
1738
|
alt: "image",
|
|
1746
1739
|
width: "100%",
|
|
1747
1740
|
height: "100%",
|
|
1748
|
-
className:
|
|
1741
|
+
className: y.image
|
|
1749
1742
|
}
|
|
1750
1743
|
),
|
|
1751
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
1752
|
-
/* @__PURE__ */ t.jsx("div", { className:
|
|
1753
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
1744
|
+
/* @__PURE__ */ t.jsxs("div", { className: y.content, children: [
|
|
1745
|
+
/* @__PURE__ */ t.jsx("div", { className: y.name, children: l.name }),
|
|
1746
|
+
/* @__PURE__ */ t.jsxs("div", { className: y.price, children: [
|
|
1754
1747
|
"$",
|
|
1755
|
-
|
|
1748
|
+
l.variants.find((M) => M.id === l.activeVariantId).price.amount * ((l == null ? void 0 : l.quantity) || 1)
|
|
1756
1749
|
] })
|
|
1757
1750
|
] })
|
|
1758
1751
|
] }),
|
|
1759
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
1752
|
+
/* @__PURE__ */ t.jsxs("div", { className: y.productButtons, children: [
|
|
1760
1753
|
/* @__PURE__ */ t.jsx(
|
|
1761
1754
|
"div",
|
|
1762
1755
|
{
|
|
1763
1756
|
onClick: () => {
|
|
1764
|
-
|
|
1757
|
+
l.quantity !== 1 && c(l);
|
|
1765
1758
|
},
|
|
1766
|
-
className:
|
|
1759
|
+
className: y.productButton,
|
|
1767
1760
|
children: /* @__PURE__ */ t.jsx(
|
|
1768
|
-
|
|
1761
|
+
x,
|
|
1769
1762
|
{
|
|
1770
1763
|
name: "Minus",
|
|
1771
1764
|
fill: "#757575",
|
|
@@ -1775,14 +1768,14 @@ const si = (r) => {
|
|
|
1775
1768
|
)
|
|
1776
1769
|
}
|
|
1777
1770
|
),
|
|
1778
|
-
/* @__PURE__ */ t.jsx("div", { className:
|
|
1771
|
+
/* @__PURE__ */ t.jsx("div", { className: y.productCount, children: l.quantity }),
|
|
1779
1772
|
/* @__PURE__ */ t.jsx(
|
|
1780
1773
|
"div",
|
|
1781
1774
|
{
|
|
1782
|
-
onClick: () =>
|
|
1783
|
-
className:
|
|
1775
|
+
onClick: () => $(l),
|
|
1776
|
+
className: y.productButton,
|
|
1784
1777
|
children: /* @__PURE__ */ t.jsx(
|
|
1785
|
-
|
|
1778
|
+
x,
|
|
1786
1779
|
{
|
|
1787
1780
|
name: "Plus",
|
|
1788
1781
|
fill: "#757575",
|
|
@@ -1795,14 +1788,14 @@ const si = (r) => {
|
|
|
1795
1788
|
] })
|
|
1796
1789
|
]
|
|
1797
1790
|
},
|
|
1798
|
-
|
|
1791
|
+
l.id
|
|
1799
1792
|
)) }),
|
|
1800
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
1801
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
1802
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
1793
|
+
/* @__PURE__ */ t.jsxs("div", { className: y.bottom, children: [
|
|
1794
|
+
/* @__PURE__ */ t.jsxs("div", { className: y.subtotal, children: [
|
|
1795
|
+
/* @__PURE__ */ t.jsxs("div", { className: y.block, children: [
|
|
1803
1796
|
/* @__PURE__ */ t.jsx("span", { children: "Subtotal" }),
|
|
1804
1797
|
/* @__PURE__ */ t.jsx(
|
|
1805
|
-
|
|
1798
|
+
x,
|
|
1806
1799
|
{
|
|
1807
1800
|
name: "Info",
|
|
1808
1801
|
width: 20,
|
|
@@ -1811,20 +1804,20 @@ const si = (r) => {
|
|
|
1811
1804
|
}
|
|
1812
1805
|
)
|
|
1813
1806
|
] }),
|
|
1814
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
1807
|
+
/* @__PURE__ */ t.jsxs("div", { className: y.total, children: [
|
|
1815
1808
|
"$",
|
|
1816
|
-
|
|
1809
|
+
u().total
|
|
1817
1810
|
] })
|
|
1818
1811
|
] }),
|
|
1819
|
-
/* @__PURE__ */ t.jsx(
|
|
1812
|
+
/* @__PURE__ */ t.jsx(G, { onClick: () => f("/checkout"), children: "Checkout" })
|
|
1820
1813
|
] })
|
|
1821
|
-
] }) : /* @__PURE__ */ t.jsx(
|
|
1814
|
+
] }) : /* @__PURE__ */ t.jsx(vn, {})
|
|
1822
1815
|
]
|
|
1823
1816
|
}
|
|
1824
1817
|
);
|
|
1825
|
-
},
|
|
1818
|
+
}, vn = () => /* @__PURE__ */ t.jsxs("div", { className: y.empty, children: [
|
|
1826
1819
|
/* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
|
|
1827
|
-
|
|
1820
|
+
x,
|
|
1828
1821
|
{
|
|
1829
1822
|
name: "Handbag",
|
|
1830
1823
|
fill: "var(--icon-secondary)"
|
|
@@ -1838,20 +1831,20 @@ const si = (r) => {
|
|
|
1838
1831
|
"a",
|
|
1839
1832
|
{
|
|
1840
1833
|
href: "/products",
|
|
1841
|
-
className:
|
|
1834
|
+
className: y.link,
|
|
1842
1835
|
children: "view products"
|
|
1843
1836
|
}
|
|
1844
1837
|
)
|
|
1845
1838
|
] })
|
|
1846
|
-
] }),
|
|
1847
|
-
const
|
|
1848
|
-
function n(
|
|
1849
|
-
window.location.pathname.includes("/admin/builder") || s(
|
|
1839
|
+
] }), Ct = ({ signUp: r }) => {
|
|
1840
|
+
const i = JSON.parse(localStorage.getItem("token") || "{}"), { data: e } = i, s = lt();
|
|
1841
|
+
function n(o) {
|
|
1842
|
+
window.location.pathname.includes("/admin/builder") || s(o);
|
|
1850
1843
|
}
|
|
1851
1844
|
if (!e)
|
|
1852
1845
|
return /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
1853
1846
|
/* @__PURE__ */ t.jsx(
|
|
1854
|
-
|
|
1847
|
+
G,
|
|
1855
1848
|
{
|
|
1856
1849
|
onClick: () => n("/customer-dash"),
|
|
1857
1850
|
type: "Secondary",
|
|
@@ -1862,7 +1855,7 @@ const si = (r) => {
|
|
|
1862
1855
|
}
|
|
1863
1856
|
),
|
|
1864
1857
|
r && /* @__PURE__ */ t.jsx(
|
|
1865
|
-
|
|
1858
|
+
G,
|
|
1866
1859
|
{
|
|
1867
1860
|
onClick: () => n("/customer-dash"),
|
|
1868
1861
|
type: "Primary",
|
|
@@ -1874,27 +1867,27 @@ const si = (r) => {
|
|
|
1874
1867
|
}
|
|
1875
1868
|
)
|
|
1876
1869
|
] });
|
|
1877
|
-
const [
|
|
1878
|
-
return
|
|
1870
|
+
const [h, u] = _.useState("test-email@gmail.com");
|
|
1871
|
+
return _.useEffect(() => {
|
|
1879
1872
|
(async () => {
|
|
1880
|
-
const
|
|
1881
|
-
|
|
1873
|
+
const d = Tt(e);
|
|
1874
|
+
u(d.email);
|
|
1882
1875
|
})();
|
|
1883
1876
|
}, [e]), /* @__PURE__ */ t.jsx(
|
|
1884
1877
|
"div",
|
|
1885
1878
|
{
|
|
1886
|
-
className:
|
|
1879
|
+
className: y.userInfo,
|
|
1887
1880
|
onClick: () => n("/customer-dash"),
|
|
1888
|
-
children: /* @__PURE__ */ t.jsx("div", { children:
|
|
1881
|
+
children: /* @__PURE__ */ t.jsx("div", { children: h || "test-email@gmail.com" })
|
|
1889
1882
|
}
|
|
1890
1883
|
);
|
|
1891
|
-
},
|
|
1884
|
+
}, yn = ({
|
|
1892
1885
|
children: r,
|
|
1893
|
-
logo:
|
|
1886
|
+
logo: i,
|
|
1894
1887
|
setIsOpen: e,
|
|
1895
1888
|
signUp: s
|
|
1896
1889
|
}) => {
|
|
1897
|
-
const { setIsOpen: n } =
|
|
1890
|
+
const { setIsOpen: n } = Nt(), h = () => {
|
|
1898
1891
|
n(!1), setTimeout(() => {
|
|
1899
1892
|
e(!1), n(!0);
|
|
1900
1893
|
}, 300);
|
|
@@ -1902,18 +1895,18 @@ const si = (r) => {
|
|
|
1902
1895
|
return /* @__PURE__ */ t.jsxs(
|
|
1903
1896
|
"div",
|
|
1904
1897
|
{
|
|
1905
|
-
className:
|
|
1906
|
-
onClick: (
|
|
1898
|
+
className: y.pagesMobileModal,
|
|
1899
|
+
onClick: (u) => u.stopPropagation(),
|
|
1907
1900
|
children: [
|
|
1908
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
1909
|
-
/* @__PURE__ */ t.jsx("div", { children:
|
|
1901
|
+
/* @__PURE__ */ t.jsxs("div", { className: y.pagesMobileModalHeader, children: [
|
|
1902
|
+
/* @__PURE__ */ t.jsx("div", { children: i }),
|
|
1910
1903
|
/* @__PURE__ */ t.jsx(
|
|
1911
|
-
|
|
1904
|
+
G,
|
|
1912
1905
|
{
|
|
1913
1906
|
type: "Secondary",
|
|
1914
|
-
onClick:
|
|
1907
|
+
onClick: h,
|
|
1915
1908
|
children: /* @__PURE__ */ t.jsx(
|
|
1916
|
-
|
|
1909
|
+
x,
|
|
1917
1910
|
{
|
|
1918
1911
|
name: "X",
|
|
1919
1912
|
fill: "var(--icon-primary)"
|
|
@@ -1922,43 +1915,43 @@ const si = (r) => {
|
|
|
1922
1915
|
}
|
|
1923
1916
|
)
|
|
1924
1917
|
] }),
|
|
1925
|
-
/* @__PURE__ */ t.jsx("div", { className:
|
|
1926
|
-
/* @__PURE__ */ t.jsx("div", { className:
|
|
1918
|
+
/* @__PURE__ */ t.jsx("div", { className: y.pagesMobileModalContent, children: r }),
|
|
1919
|
+
/* @__PURE__ */ t.jsx("div", { className: y.pagesMobileModalFooter, children: /* @__PURE__ */ t.jsx(Ct, { signUp: s }) })
|
|
1927
1920
|
]
|
|
1928
1921
|
}
|
|
1929
1922
|
);
|
|
1930
|
-
},
|
|
1923
|
+
}, oi = ({
|
|
1931
1924
|
children: r,
|
|
1932
|
-
logo:
|
|
1925
|
+
logo: i,
|
|
1933
1926
|
signUp: e
|
|
1934
1927
|
}) => {
|
|
1935
|
-
const [s, n] =
|
|
1928
|
+
const [s, n] = _.useState(!1);
|
|
1936
1929
|
return /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
1937
|
-
/* @__PURE__ */ t.jsx(
|
|
1938
|
-
s && /* @__PURE__ */ t.jsx(
|
|
1939
|
-
|
|
1930
|
+
/* @__PURE__ */ t.jsx(Nn, { setIsOpenModal: n }),
|
|
1931
|
+
s && /* @__PURE__ */ t.jsx(vt, { close: () => n(!1), children: /* @__PURE__ */ t.jsx(
|
|
1932
|
+
yn,
|
|
1940
1933
|
{
|
|
1941
|
-
logo:
|
|
1934
|
+
logo: i,
|
|
1942
1935
|
setIsOpen: n,
|
|
1943
1936
|
signUp: e,
|
|
1944
1937
|
children: r
|
|
1945
1938
|
}
|
|
1946
1939
|
) })
|
|
1947
1940
|
] });
|
|
1948
|
-
},
|
|
1949
|
-
const { setIsOpenModal:
|
|
1941
|
+
}, Nn = (r) => {
|
|
1942
|
+
const { setIsOpenModal: i } = r;
|
|
1950
1943
|
return /* @__PURE__ */ t.jsx(
|
|
1951
|
-
|
|
1944
|
+
G,
|
|
1952
1945
|
{
|
|
1953
1946
|
type: "Secondary",
|
|
1954
1947
|
style: {
|
|
1955
1948
|
padding: 10
|
|
1956
1949
|
},
|
|
1957
1950
|
onClick: (e) => {
|
|
1958
|
-
e.stopPropagation(),
|
|
1951
|
+
e.stopPropagation(), i(!0);
|
|
1959
1952
|
},
|
|
1960
1953
|
children: /* @__PURE__ */ t.jsx(
|
|
1961
|
-
|
|
1954
|
+
x,
|
|
1962
1955
|
{
|
|
1963
1956
|
name: "List",
|
|
1964
1957
|
fill: "var(--icon-primary)"
|
|
@@ -1966,22 +1959,22 @@ const si = (r) => {
|
|
|
1966
1959
|
)
|
|
1967
1960
|
}
|
|
1968
1961
|
);
|
|
1969
|
-
},
|
|
1970
|
-
share:
|
|
1971
|
-
modal:
|
|
1972
|
-
header:
|
|
1973
|
-
socials:
|
|
1974
|
-
social:
|
|
1975
|
-
copy:
|
|
1962
|
+
}, kn = "_share_xddz7_1", In = "_modal_xddz7_8", Cn = "_header_xddz7_20", Sn = "_socials_xddz7_30", wn = "_social_xddz7_30", Bn = "_copy_xddz7_40", $n = "_title_xddz7_47", Pn = "_copyWrapper_xddz7_53", Mn = "_copyText_xddz7_62", Tn = "_copyTextMobile_xddz7_75", qn = "_copyTextMiniMobile_xddz7_94", Z = {
|
|
1963
|
+
share: kn,
|
|
1964
|
+
modal: In,
|
|
1965
|
+
header: Cn,
|
|
1966
|
+
socials: Sn,
|
|
1967
|
+
social: wn,
|
|
1968
|
+
copy: Bn,
|
|
1976
1969
|
title: $n,
|
|
1977
|
-
copyWrapper:
|
|
1978
|
-
copyText:
|
|
1979
|
-
copyTextMobile:
|
|
1980
|
-
copyTextMiniMobile:
|
|
1981
|
-
},
|
|
1982
|
-
const { isOpenModal: r, setIsOpenModal:
|
|
1970
|
+
copyWrapper: Pn,
|
|
1971
|
+
copyText: Mn,
|
|
1972
|
+
copyTextMobile: Tn,
|
|
1973
|
+
copyTextMiniMobile: qn
|
|
1974
|
+
}, ai = () => {
|
|
1975
|
+
const { isOpenModal: r, setIsOpenModal: i } = kt();
|
|
1983
1976
|
function e() {
|
|
1984
|
-
|
|
1977
|
+
i(!0);
|
|
1985
1978
|
}
|
|
1986
1979
|
return /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
1987
1980
|
/* @__PURE__ */ t.jsx(
|
|
@@ -1993,7 +1986,7 @@ const si = (r) => {
|
|
|
1993
1986
|
},
|
|
1994
1987
|
type: "Secondary",
|
|
1995
1988
|
children: /* @__PURE__ */ t.jsx(
|
|
1996
|
-
|
|
1989
|
+
x,
|
|
1997
1990
|
{
|
|
1998
1991
|
name: "Share",
|
|
1999
1992
|
fill: "#757575",
|
|
@@ -2002,38 +1995,38 @@ const si = (r) => {
|
|
|
2002
1995
|
)
|
|
2003
1996
|
}
|
|
2004
1997
|
),
|
|
2005
|
-
r && /* @__PURE__ */ t.jsx(
|
|
1998
|
+
r && /* @__PURE__ */ t.jsx(vt, { close: i, children: /* @__PURE__ */ t.jsx(An, {}) })
|
|
2006
1999
|
] });
|
|
2007
|
-
},
|
|
2008
|
-
const { setIsOpenModal: r } =
|
|
2009
|
-
function
|
|
2000
|
+
}, An = () => {
|
|
2001
|
+
const { setIsOpenModal: r } = kt(), { notification: i, setNotification: e } = qt(), { setIsOpen: s } = Nt(), n = window.location.href;
|
|
2002
|
+
function h() {
|
|
2010
2003
|
navigator.clipboard.writeText(n), e({
|
|
2011
2004
|
message: "Link copied to clipboard",
|
|
2012
2005
|
status: "success"
|
|
2013
2006
|
});
|
|
2014
2007
|
}
|
|
2015
|
-
function
|
|
2008
|
+
function u() {
|
|
2016
2009
|
s(!1), setTimeout(() => {
|
|
2017
2010
|
r(!1), s(!0);
|
|
2018
2011
|
}, 300);
|
|
2019
2012
|
}
|
|
2020
|
-
function
|
|
2021
|
-
return
|
|
2013
|
+
function o(d, f) {
|
|
2014
|
+
return d.length > f ? d.slice(0, f) + "..." : d;
|
|
2022
2015
|
}
|
|
2023
2016
|
return /* @__PURE__ */ t.jsxs(
|
|
2024
2017
|
"div",
|
|
2025
2018
|
{
|
|
2026
2019
|
className: Z.modal,
|
|
2027
|
-
onClick: (
|
|
2020
|
+
onClick: (d) => d.stopPropagation(),
|
|
2028
2021
|
children: [
|
|
2029
2022
|
/* @__PURE__ */ t.jsxs("div", { className: Z.header, children: [
|
|
2030
2023
|
/* @__PURE__ */ t.jsx("div", { className: Z.title, children: "Copy Product Link" }),
|
|
2031
2024
|
/* @__PURE__ */ t.jsx(
|
|
2032
|
-
|
|
2025
|
+
x,
|
|
2033
2026
|
{
|
|
2034
2027
|
name: "X",
|
|
2035
2028
|
fill: "#757575",
|
|
2036
|
-
onClick:
|
|
2029
|
+
onClick: u,
|
|
2037
2030
|
hoverable: !0
|
|
2038
2031
|
}
|
|
2039
2032
|
)
|
|
@@ -2043,14 +2036,14 @@ const si = (r) => {
|
|
|
2043
2036
|
tt,
|
|
2044
2037
|
{
|
|
2045
2038
|
type: "Secondary",
|
|
2046
|
-
onClick:
|
|
2039
|
+
onClick: h,
|
|
2047
2040
|
style: {
|
|
2048
2041
|
flex: 1
|
|
2049
2042
|
},
|
|
2050
2043
|
children: [
|
|
2051
|
-
/* @__PURE__ */ t.jsx("div", { className: Z.copyText, children:
|
|
2052
|
-
/* @__PURE__ */ t.jsx("div", { className: Z.copyTextMobile, children:
|
|
2053
|
-
/* @__PURE__ */ t.jsx("div", { className: Z.copyTextMiniMobile, children:
|
|
2044
|
+
/* @__PURE__ */ t.jsx("div", { className: Z.copyText, children: o(n, 100) }),
|
|
2045
|
+
/* @__PURE__ */ t.jsx("div", { className: Z.copyTextMobile, children: o(n, 40) }),
|
|
2046
|
+
/* @__PURE__ */ t.jsx("div", { className: Z.copyTextMiniMobile, children: o(n, 20) })
|
|
2054
2047
|
]
|
|
2055
2048
|
}
|
|
2056
2049
|
),
|
|
@@ -2058,49 +2051,49 @@ const si = (r) => {
|
|
|
2058
2051
|
tt,
|
|
2059
2052
|
{
|
|
2060
2053
|
type: "Secondary",
|
|
2061
|
-
onClick:
|
|
2062
|
-
children:
|
|
2054
|
+
onClick: h,
|
|
2055
|
+
children: i ? /* @__PURE__ */ t.jsx(x, { name: "Check" }) : /* @__PURE__ */ t.jsx(x, { name: "Copy" })
|
|
2063
2056
|
}
|
|
2064
2057
|
)
|
|
2065
2058
|
] })
|
|
2066
2059
|
]
|
|
2067
2060
|
}
|
|
2068
2061
|
);
|
|
2069
|
-
},
|
|
2070
|
-
accordion:
|
|
2071
|
-
header:
|
|
2072
|
-
icon:
|
|
2073
|
-
open:
|
|
2074
|
-
content:
|
|
2075
|
-
},
|
|
2076
|
-
const [s, n] =
|
|
2062
|
+
}, On = "_accordion_1s1lq_1", En = "_header_1s1lq_9", zn = "_icon_1s1lq_18", Rn = "_open_1s1lq_21", Ln = "_content_1s1lq_25", nt = {
|
|
2063
|
+
accordion: On,
|
|
2064
|
+
header: En,
|
|
2065
|
+
icon: zn,
|
|
2066
|
+
open: Rn,
|
|
2067
|
+
content: Ln
|
|
2068
|
+
}, ci = ({ title: r, content: i, defaultOpen: e = !1 }) => {
|
|
2069
|
+
const [s, n] = _.useState(e), [h, u] = _.useState(0), o = _.useRef(null), d = () => {
|
|
2077
2070
|
n(!s);
|
|
2078
2071
|
};
|
|
2079
|
-
return
|
|
2080
|
-
|
|
2081
|
-
}, [s]), /* @__PURE__ */ t.jsxs("div", { className:
|
|
2072
|
+
return _.useEffect(() => {
|
|
2073
|
+
o.current && u(s ? o.current.scrollHeight : 0);
|
|
2074
|
+
}, [s]), /* @__PURE__ */ t.jsxs("div", { className: nt.accordion, children: [
|
|
2082
2075
|
/* @__PURE__ */ t.jsxs(
|
|
2083
2076
|
"div",
|
|
2084
2077
|
{
|
|
2085
|
-
className:
|
|
2086
|
-
onClick:
|
|
2078
|
+
className: nt.header,
|
|
2079
|
+
onClick: d,
|
|
2087
2080
|
children: [
|
|
2088
2081
|
/* @__PURE__ */ t.jsx("h5", { id: "h5", children: r }),
|
|
2089
|
-
/* @__PURE__ */ t.jsx("div", { className:
|
|
2082
|
+
/* @__PURE__ */ t.jsx("div", { className: Y(nt.icon, { [nt.open]: s }), children: /* @__PURE__ */ t.jsx(x, { name: "CaretDown" }) })
|
|
2090
2083
|
]
|
|
2091
2084
|
}
|
|
2092
2085
|
),
|
|
2093
2086
|
/* @__PURE__ */ t.jsx(
|
|
2094
2087
|
"div",
|
|
2095
2088
|
{
|
|
2096
|
-
ref:
|
|
2097
|
-
className:
|
|
2098
|
-
style: { height: `${
|
|
2099
|
-
children: /* @__PURE__ */ t.jsx("p", { id: "p", children:
|
|
2089
|
+
ref: o,
|
|
2090
|
+
className: nt.content,
|
|
2091
|
+
style: { height: `${h}px` },
|
|
2092
|
+
children: /* @__PURE__ */ t.jsx("p", { id: "p", children: i })
|
|
2100
2093
|
}
|
|
2101
2094
|
)
|
|
2102
2095
|
] });
|
|
2103
|
-
},
|
|
2096
|
+
}, li = ({ children: r, path: i, className: e, target: s = "_self", id: n }) => {
|
|
2104
2097
|
if (window.location.pathname.includes("/admin/builder"))
|
|
2105
2098
|
return /* @__PURE__ */ t.jsx(
|
|
2106
2099
|
"div",
|
|
@@ -2112,13 +2105,13 @@ const si = (r) => {
|
|
|
2112
2105
|
children: r
|
|
2113
2106
|
}
|
|
2114
2107
|
);
|
|
2115
|
-
const
|
|
2116
|
-
|
|
2108
|
+
const h = lt(), u = /^https?:\/\//.test(i), o = (d) => {
|
|
2109
|
+
u || s === "_blank" ? s === "_blank" ? window.open(i, "_blank") : window.location.href = i : (d.preventDefault(), h(i, { replace: !0 }));
|
|
2117
2110
|
};
|
|
2118
2111
|
return /* @__PURE__ */ t.jsx(
|
|
2119
2112
|
"div",
|
|
2120
2113
|
{
|
|
2121
|
-
onClick:
|
|
2114
|
+
onClick: o,
|
|
2122
2115
|
className: e,
|
|
2123
2116
|
role: "link",
|
|
2124
2117
|
style: { cursor: "pointer" },
|
|
@@ -2126,12 +2119,12 @@ const si = (r) => {
|
|
|
2126
2119
|
children: r
|
|
2127
2120
|
}
|
|
2128
2121
|
);
|
|
2129
|
-
}, Dn = "_buttonsBlock_1b2rb_1",
|
|
2122
|
+
}, Dn = "_buttonsBlock_1b2rb_1", Hn = "_slideUp_1b2rb_1", Un = {
|
|
2130
2123
|
buttonsBlock: Dn,
|
|
2131
|
-
slideUp:
|
|
2132
|
-
},
|
|
2124
|
+
slideUp: Hn
|
|
2125
|
+
}, ri = () => /* @__PURE__ */ t.jsxs("div", { className: Un.buttonsBlock, children: [
|
|
2133
2126
|
/* @__PURE__ */ t.jsx(
|
|
2134
|
-
|
|
2127
|
+
G,
|
|
2135
2128
|
{
|
|
2136
2129
|
type: "Primary",
|
|
2137
2130
|
style: {
|
|
@@ -2140,19 +2133,29 @@ const si = (r) => {
|
|
|
2140
2133
|
children: "Add to Cart"
|
|
2141
2134
|
}
|
|
2142
2135
|
),
|
|
2143
|
-
/* @__PURE__ */ t.jsx(
|
|
2144
|
-
] }),
|
|
2145
|
-
wrapper:
|
|
2146
|
-
label:
|
|
2147
|
-
textarea:
|
|
2148
|
-
length:
|
|
2149
|
-
},
|
|
2150
|
-
const {
|
|
2151
|
-
|
|
2136
|
+
/* @__PURE__ */ t.jsx(G, { type: "Secondary", children: "Buy" })
|
|
2137
|
+
] }), Fn = "_wrapper_st58d_1", Vn = "_label_st58d_10", Yn = "_textarea_st58d_18", Gn = "_length_st58d_33", ct = {
|
|
2138
|
+
wrapper: Fn,
|
|
2139
|
+
label: Vn,
|
|
2140
|
+
textarea: Yn,
|
|
2141
|
+
length: Gn
|
|
2142
|
+
}, di = (r) => {
|
|
2143
|
+
const {
|
|
2144
|
+
onChange: i,
|
|
2145
|
+
label: e,
|
|
2146
|
+
value: s,
|
|
2147
|
+
maxLength: n,
|
|
2148
|
+
placeholder: h = "Type something...",
|
|
2149
|
+
type: u = "text"
|
|
2150
|
+
} = r, [o, d] = _.useState(s.length);
|
|
2151
|
+
function f($) {
|
|
2152
|
+
return u === "number" ? $.replace(/[^\d\n]+/g, "") : $;
|
|
2153
|
+
}
|
|
2154
|
+
return /* @__PURE__ */ t.jsxs("div", { className: ct.wrapper, children: [
|
|
2152
2155
|
e && /* @__PURE__ */ t.jsx(
|
|
2153
2156
|
"label",
|
|
2154
2157
|
{
|
|
2155
|
-
className:
|
|
2158
|
+
className: ct.label,
|
|
2156
2159
|
htmlFor: e,
|
|
2157
2160
|
children: e
|
|
2158
2161
|
}
|
|
@@ -2161,57 +2164,58 @@ const si = (r) => {
|
|
|
2161
2164
|
"textarea",
|
|
2162
2165
|
{
|
|
2163
2166
|
id: e,
|
|
2164
|
-
|
|
2165
|
-
onChange: (
|
|
2166
|
-
c
|
|
2167
|
+
value: s,
|
|
2168
|
+
onChange: ($) => {
|
|
2169
|
+
const c = f($.target.value);
|
|
2170
|
+
d(c.length), i(c);
|
|
2167
2171
|
},
|
|
2168
|
-
placeholder:
|
|
2169
|
-
className:
|
|
2172
|
+
placeholder: h,
|
|
2173
|
+
className: ct.textarea,
|
|
2170
2174
|
maxLength: n
|
|
2171
2175
|
}
|
|
2172
2176
|
),
|
|
2173
|
-
n && /* @__PURE__ */ t.jsxs("div", { className:
|
|
2174
|
-
|
|
2177
|
+
n && /* @__PURE__ */ t.jsxs("div", { className: ct.length, children: [
|
|
2178
|
+
o,
|
|
2175
2179
|
"/",
|
|
2176
2180
|
n
|
|
2177
2181
|
] })
|
|
2178
2182
|
] });
|
|
2179
2183
|
};
|
|
2180
2184
|
export {
|
|
2181
|
-
|
|
2182
|
-
|
|
2183
|
-
|
|
2184
|
-
|
|
2185
|
-
|
|
2186
|
-
|
|
2187
|
-
|
|
2188
|
-
|
|
2189
|
-
|
|
2190
|
-
|
|
2191
|
-
|
|
2192
|
-
|
|
2193
|
-
|
|
2194
|
-
|
|
2195
|
-
|
|
2196
|
-
|
|
2197
|
-
|
|
2198
|
-
|
|
2199
|
-
|
|
2200
|
-
|
|
2201
|
-
|
|
2202
|
-
|
|
2203
|
-
|
|
2204
|
-
|
|
2205
|
-
|
|
2206
|
-
|
|
2207
|
-
|
|
2208
|
-
|
|
2209
|
-
|
|
2210
|
-
|
|
2211
|
-
|
|
2212
|
-
|
|
2213
|
-
|
|
2214
|
-
|
|
2185
|
+
ci as Accordion,
|
|
2186
|
+
Nn as BurgerMenuButton,
|
|
2187
|
+
G as Button,
|
|
2188
|
+
ms as ButtonTypeSettings,
|
|
2189
|
+
ei as ButtonsSettings,
|
|
2190
|
+
Qn as CategorySettings,
|
|
2191
|
+
wt as ChooseImage,
|
|
2192
|
+
hi as ChooseImageModal,
|
|
2193
|
+
vn as EmptyCart,
|
|
2194
|
+
ti as FormSettings,
|
|
2195
|
+
ii as HeaderButtons,
|
|
2196
|
+
x as Icon,
|
|
2197
|
+
dt as InputSettings,
|
|
2198
|
+
Mt as InputUI,
|
|
2199
|
+
pi as ItemsSettings,
|
|
2200
|
+
Kn as LayoutSettings,
|
|
2201
|
+
li as Link,
|
|
2202
|
+
si as ListingSelector,
|
|
2203
|
+
_i as Loader,
|
|
2204
|
+
vt as Modal,
|
|
2205
|
+
oi as PagesMobileMenu,
|
|
2206
|
+
yn as PagesMobileModal,
|
|
2207
|
+
Zn as PagesSettings,
|
|
2208
|
+
ri as ProductCardButtons,
|
|
2209
|
+
ni as ProductOptions,
|
|
2210
|
+
yt as RangeSelector,
|
|
2211
|
+
at as Select,
|
|
2212
|
+
ai as ShareLink,
|
|
2213
|
+
bn as ShoppingButton,
|
|
2214
|
+
jn as ShoppingModalCart,
|
|
2215
|
+
ot as Switch,
|
|
2216
|
+
gi as TextSettings,
|
|
2217
|
+
xi as TextareaSettings,
|
|
2218
|
+
di as TextareaUI,
|
|
2215
2219
|
fi as TypesText,
|
|
2216
|
-
|
|
2220
|
+
Ct as UserInfo
|
|
2217
2221
|
};
|