@billgangcom/theme-lib 1.15.0 → 1.16.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 -0
- package/dist/builder/index.d.ts +0 -1
- package/dist/builder.cjs.js +3 -34
- package/dist/builder.es.js +1359 -4642
- package/dist/root-CLYS1Wm7.cjs +146 -0
- package/dist/root-CW3Zha5t.js +29404 -0
- package/dist/shared/lib/clearQueryParams.d.ts +1 -0
- package/dist/shared/lib/index.d.ts +1 -0
- package/dist/ui/HeaderButtons/index.d.ts +6 -0
- package/dist/ui/index.d.ts +1 -0
- package/dist/ui.cjs.js +1 -1
- package/dist/ui.es.js +754 -689
- package/package.json +2 -1
- package/dist/index-O85p6vDc.cjs +0 -40
- package/dist/index-QsuPYj6C.js +0 -6269
package/dist/ui.es.js
CHANGED
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
import { j as t, c as
|
|
2
|
-
import {
|
|
1
|
+
import { j as t, c as H, I as h, a as V, S as z, T as it, C as ct, b as G, D as at, H as lt, B as tt, v as Z, u as rt, d as dt, e as ut, f as ht } from "./root-CW3Zha5t.js";
|
|
2
|
+
import { k as fn, l as jn, h as vn, L as kn, M as yn, P as $n, R as Nn, g as wn, i as Cn } from "./root-CW3Zha5t.js";
|
|
3
3
|
import p from "react";
|
|
4
|
-
const
|
|
5
|
-
accordion:
|
|
6
|
-
header:
|
|
7
|
-
icon:
|
|
8
|
-
open:
|
|
9
|
-
content:
|
|
10
|
-
},
|
|
11
|
-
const [
|
|
12
|
-
|
|
4
|
+
const pt = "_accordion_2tiiw_1", gt = "_header_2tiiw_9", xt = "_icon_2tiiw_16", bt = "_open_2tiiw_19", ft = "_content_2tiiw_23", K = {
|
|
5
|
+
accordion: pt,
|
|
6
|
+
header: gt,
|
|
7
|
+
icon: xt,
|
|
8
|
+
open: bt,
|
|
9
|
+
content: ft
|
|
10
|
+
}, un = ({ title: u, content: n }) => {
|
|
11
|
+
const [s, o] = p.useState(!1), [i, a] = p.useState(0), e = p.useRef(null), c = () => {
|
|
12
|
+
o(!s);
|
|
13
13
|
};
|
|
14
14
|
return p.useEffect(() => {
|
|
15
|
-
e.current && a(
|
|
16
|
-
}, [
|
|
15
|
+
e.current && a(s ? e.current.scrollHeight : 0);
|
|
16
|
+
}, [s]), /* @__PURE__ */ t.jsxs("div", { className: K.accordion, children: [
|
|
17
17
|
/* @__PURE__ */ t.jsxs(
|
|
18
18
|
"div",
|
|
19
19
|
{
|
|
20
|
-
className:
|
|
21
|
-
onClick:
|
|
20
|
+
className: K.header,
|
|
21
|
+
onClick: c,
|
|
22
22
|
children: [
|
|
23
|
-
/* @__PURE__ */ t.jsx("h3", { children:
|
|
24
|
-
/* @__PURE__ */ t.jsx("div", { className:
|
|
23
|
+
/* @__PURE__ */ t.jsx("h3", { children: u }),
|
|
24
|
+
/* @__PURE__ */ t.jsx("div", { className: H(K.icon, { [K.open]: s }), children: /* @__PURE__ */ t.jsx(h, { name: "CaretDown" }) })
|
|
25
25
|
]
|
|
26
26
|
}
|
|
27
27
|
),
|
|
@@ -29,25 +29,25 @@ const _t = "_accordion_2tiiw_1", mt = "_header_2tiiw_9", ht = "_icon_2tiiw_16",
|
|
|
29
29
|
"div",
|
|
30
30
|
{
|
|
31
31
|
ref: e,
|
|
32
|
-
className:
|
|
32
|
+
className: K.content,
|
|
33
33
|
style: { height: `${i}px` },
|
|
34
|
-
children: /* @__PURE__ */ t.jsx("p", { children:
|
|
34
|
+
children: /* @__PURE__ */ t.jsx("p", { children: n })
|
|
35
35
|
}
|
|
36
36
|
)
|
|
37
37
|
] });
|
|
38
|
-
},
|
|
39
|
-
wrapper:
|
|
40
|
-
alignmentBlock:
|
|
41
|
-
title:
|
|
42
|
-
subtitle:
|
|
43
|
-
alignmentContent:
|
|
44
|
-
alignments:
|
|
45
|
-
alignment:
|
|
46
|
-
circle:
|
|
47
|
-
paddings:
|
|
48
|
-
padding:
|
|
49
|
-
input:
|
|
50
|
-
},
|
|
38
|
+
}, jt = "_wrapper_1g82c_2", vt = "_alignmentBlock_1g82c_8", kt = "_title_1g82c_15", yt = "_subtitle_1g82c_22", $t = "_alignmentContent_1g82c_29", Nt = "_alignments_1g82c_35", wt = "_alignment_1g82c_8", Ct = "_circle_1g82c_54", It = "_paddings_1g82c_61", Pt = "_padding_1g82c_61", Bt = "_input_1g82c_79", D = {
|
|
39
|
+
wrapper: jt,
|
|
40
|
+
alignmentBlock: vt,
|
|
41
|
+
title: kt,
|
|
42
|
+
subtitle: yt,
|
|
43
|
+
alignmentContent: $t,
|
|
44
|
+
alignments: Nt,
|
|
45
|
+
alignment: wt,
|
|
46
|
+
circle: Ct,
|
|
47
|
+
paddings: It,
|
|
48
|
+
padding: Pt,
|
|
49
|
+
input: Bt
|
|
50
|
+
}, Tt = [
|
|
51
51
|
"topLeft",
|
|
52
52
|
"top",
|
|
53
53
|
"topRight",
|
|
@@ -57,10 +57,10 @@ const _t = "_accordion_2tiiw_1", mt = "_header_2tiiw_9", ht = "_icon_2tiiw_16",
|
|
|
57
57
|
"bottomLeft",
|
|
58
58
|
"bottom",
|
|
59
59
|
"bottomRight"
|
|
60
|
-
],
|
|
61
|
-
const { alignment:
|
|
60
|
+
], At = ["left", "top", "right", "bottom"], _n = (u) => {
|
|
61
|
+
const { alignment: n, padding: s, setPadding: o, setAlignment: i } = u;
|
|
62
62
|
function a() {
|
|
63
|
-
switch (
|
|
63
|
+
switch (n) {
|
|
64
64
|
case "left":
|
|
65
65
|
case "topLeft":
|
|
66
66
|
case "bottomLeft":
|
|
@@ -77,8 +77,8 @@ const _t = "_accordion_2tiiw_1", mt = "_header_2tiiw_9", ht = "_icon_2tiiw_16",
|
|
|
77
77
|
return "TextAlignCenter";
|
|
78
78
|
}
|
|
79
79
|
}
|
|
80
|
-
function e(
|
|
81
|
-
switch (
|
|
80
|
+
function e(c) {
|
|
81
|
+
switch (c) {
|
|
82
82
|
case "left":
|
|
83
83
|
return "AlignLeft";
|
|
84
84
|
case "right":
|
|
@@ -89,21 +89,21 @@ const _t = "_accordion_2tiiw_1", mt = "_header_2tiiw_9", ht = "_icon_2tiiw_16",
|
|
|
89
89
|
return "AlignBottom";
|
|
90
90
|
}
|
|
91
91
|
}
|
|
92
|
-
return /* @__PURE__ */ t.jsxs("div", { className:
|
|
93
|
-
/* @__PURE__ */ t.jsx("h3", { className:
|
|
94
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
95
|
-
/* @__PURE__ */ t.jsx("h5", { className:
|
|
96
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
97
|
-
/* @__PURE__ */ t.jsx("div", { className:
|
|
92
|
+
return /* @__PURE__ */ t.jsxs("div", { className: D.layout, children: [
|
|
93
|
+
/* @__PURE__ */ t.jsx("h3", { className: D.title, children: "Layout" }),
|
|
94
|
+
/* @__PURE__ */ t.jsxs("div", { className: D.alignmentBlock, children: [
|
|
95
|
+
/* @__PURE__ */ t.jsx("h5", { className: D.subtitle, children: "Alignment" }),
|
|
96
|
+
/* @__PURE__ */ t.jsxs("div", { className: D.alignmentContent, children: [
|
|
97
|
+
/* @__PURE__ */ t.jsx("div", { className: D.alignments, children: Tt.map((c) => /* @__PURE__ */ t.jsxs(
|
|
98
98
|
"div",
|
|
99
99
|
{
|
|
100
100
|
onClick: () => {
|
|
101
|
-
i(
|
|
101
|
+
i(c);
|
|
102
102
|
},
|
|
103
|
-
className:
|
|
103
|
+
className: D.alignment,
|
|
104
104
|
children: [
|
|
105
|
-
|
|
106
|
-
|
|
105
|
+
c !== n && /* @__PURE__ */ t.jsx("div", { className: D.circle }),
|
|
106
|
+
c === n && /* @__PURE__ */ t.jsx(
|
|
107
107
|
h,
|
|
108
108
|
{
|
|
109
109
|
name: a(),
|
|
@@ -114,25 +114,25 @@ const _t = "_accordion_2tiiw_1", mt = "_header_2tiiw_9", ht = "_icon_2tiiw_16",
|
|
|
114
114
|
)
|
|
115
115
|
]
|
|
116
116
|
},
|
|
117
|
-
|
|
117
|
+
c
|
|
118
118
|
)) }),
|
|
119
|
-
/* @__PURE__ */ t.jsx("div", { className:
|
|
119
|
+
/* @__PURE__ */ t.jsx("div", { className: D.paddings, children: At.map((c) => /* @__PURE__ */ t.jsxs("label", { className: D.padding, children: [
|
|
120
120
|
/* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
|
|
121
121
|
h,
|
|
122
122
|
{
|
|
123
|
-
name: e(
|
|
123
|
+
name: e(c),
|
|
124
124
|
width: 20,
|
|
125
125
|
height: 20
|
|
126
126
|
}
|
|
127
127
|
) }),
|
|
128
128
|
/* @__PURE__ */ t.jsx(
|
|
129
|
-
|
|
129
|
+
V,
|
|
130
130
|
{
|
|
131
131
|
type: "text",
|
|
132
|
-
value: String(
|
|
133
|
-
onChange: (
|
|
134
|
-
...
|
|
135
|
-
[
|
|
132
|
+
value: String(s[c]),
|
|
133
|
+
onChange: (d) => o({
|
|
134
|
+
...s,
|
|
135
|
+
[c]: Number(d)
|
|
136
136
|
}),
|
|
137
137
|
paddingless: !0,
|
|
138
138
|
borderless: !0
|
|
@@ -142,19 +142,19 @@ const _t = "_accordion_2tiiw_1", mt = "_header_2tiiw_9", ht = "_icon_2tiiw_16",
|
|
|
142
142
|
] })
|
|
143
143
|
] })
|
|
144
144
|
] });
|
|
145
|
-
},
|
|
146
|
-
subtitle:
|
|
147
|
-
header:
|
|
148
|
-
text:
|
|
149
|
-
top:
|
|
150
|
-
itemsBlock:
|
|
151
|
-
},
|
|
152
|
-
typeTexts:
|
|
153
|
-
block:
|
|
154
|
-
active:
|
|
155
|
-
},
|
|
156
|
-
const { typesText:
|
|
157
|
-
function
|
|
145
|
+
}, St = "_subtitle_2zbxx_1", Ot = "_header_2zbxx_8", Dt = "_text_2zbxx_9", Lt = "_top_2zbxx_16", qt = "_itemsBlock_2zbxx_23", Q = {
|
|
146
|
+
subtitle: St,
|
|
147
|
+
header: Ot,
|
|
148
|
+
text: Dt,
|
|
149
|
+
top: Lt,
|
|
150
|
+
itemsBlock: qt
|
|
151
|
+
}, Rt = "_typeTexts_3zlec_1", Mt = "_block_3zlec_7", Ht = "_active_3zlec_18", nt = {
|
|
152
|
+
typeTexts: Rt,
|
|
153
|
+
block: Mt,
|
|
154
|
+
active: Ht
|
|
155
|
+
}, Et = ["bold", "italic", "underline", "strike-through", "code"], _t = (u) => {
|
|
156
|
+
const { typesText: n, setTypesText: s } = u;
|
|
157
|
+
function o(i) {
|
|
158
158
|
switch (i) {
|
|
159
159
|
case "bold":
|
|
160
160
|
return "TextB";
|
|
@@ -168,25 +168,25 @@ const _t = "_accordion_2tiiw_1", mt = "_header_2tiiw_9", ht = "_icon_2tiiw_16",
|
|
|
168
168
|
return "TextUnderline";
|
|
169
169
|
}
|
|
170
170
|
}
|
|
171
|
-
return /* @__PURE__ */ t.jsx("div", { className:
|
|
171
|
+
return /* @__PURE__ */ t.jsx("div", { className: nt.typeTexts, children: Et.map((i) => /* @__PURE__ */ t.jsx(
|
|
172
172
|
"div",
|
|
173
173
|
{
|
|
174
|
-
className:
|
|
175
|
-
[
|
|
174
|
+
className: H(nt.block, {
|
|
175
|
+
[nt.active]: n.includes(i)
|
|
176
176
|
}),
|
|
177
177
|
onClick: () => {
|
|
178
|
-
const a = [...
|
|
178
|
+
const a = [...n];
|
|
179
179
|
if (a.includes(i)) {
|
|
180
|
-
const e = a.filter((
|
|
181
|
-
|
|
180
|
+
const e = a.filter((c) => c !== i);
|
|
181
|
+
s(e);
|
|
182
182
|
} else
|
|
183
|
-
a.push(i),
|
|
183
|
+
a.push(i), s(a);
|
|
184
184
|
},
|
|
185
185
|
children: /* @__PURE__ */ t.jsx(
|
|
186
186
|
h,
|
|
187
187
|
{
|
|
188
|
-
name:
|
|
189
|
-
fill:
|
|
188
|
+
name: o(i),
|
|
189
|
+
fill: n.includes(i) ? "#252525" : "#757575",
|
|
190
190
|
width: 20,
|
|
191
191
|
height: 20
|
|
192
192
|
}
|
|
@@ -194,32 +194,32 @@ const _t = "_accordion_2tiiw_1", mt = "_header_2tiiw_9", ht = "_icon_2tiiw_16",
|
|
|
194
194
|
},
|
|
195
195
|
String(i)
|
|
196
196
|
)) });
|
|
197
|
-
},
|
|
197
|
+
}, zt = (u) => {
|
|
198
198
|
const {
|
|
199
|
-
typesText:
|
|
200
|
-
isActiveText:
|
|
201
|
-
setIsActiveText:
|
|
199
|
+
typesText: n,
|
|
200
|
+
isActiveText: s,
|
|
201
|
+
setIsActiveText: o,
|
|
202
202
|
text: i,
|
|
203
203
|
setText: a,
|
|
204
204
|
setTypesText: e,
|
|
205
|
-
title:
|
|
206
|
-
subtitle:
|
|
207
|
-
} =
|
|
208
|
-
return /* @__PURE__ */ t.jsxs("div", { className:
|
|
209
|
-
(
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
205
|
+
title: c,
|
|
206
|
+
subtitle: d = "Items"
|
|
207
|
+
} = u;
|
|
208
|
+
return /* @__PURE__ */ t.jsxs("div", { className: Q.text, children: [
|
|
209
|
+
(c || s !== void 0) && /* @__PURE__ */ t.jsxs("div", { className: Q.top, children: [
|
|
210
|
+
c && /* @__PURE__ */ t.jsx("h3", { className: Q.title, children: c }),
|
|
211
|
+
s !== void 0 && o && /* @__PURE__ */ t.jsx(
|
|
212
|
+
z,
|
|
213
213
|
{
|
|
214
|
-
current:
|
|
215
|
-
onChange: (k) =>
|
|
214
|
+
current: s,
|
|
215
|
+
onChange: (k) => o(k)
|
|
216
216
|
}
|
|
217
217
|
)
|
|
218
218
|
] }),
|
|
219
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
220
|
-
/* @__PURE__ */ t.jsx("h5", { className:
|
|
219
|
+
/* @__PURE__ */ t.jsxs("div", { className: Q.itemsBlock, children: [
|
|
220
|
+
/* @__PURE__ */ t.jsx("h5", { className: Q.subtitle, children: d }),
|
|
221
221
|
/* @__PURE__ */ t.jsx(
|
|
222
|
-
|
|
222
|
+
it,
|
|
223
223
|
{
|
|
224
224
|
onChange: (k) => a(k),
|
|
225
225
|
value: i,
|
|
@@ -227,51 +227,51 @@ const _t = "_accordion_2tiiw_1", mt = "_header_2tiiw_9", ht = "_icon_2tiiw_16",
|
|
|
227
227
|
}
|
|
228
228
|
),
|
|
229
229
|
/* @__PURE__ */ t.jsx(
|
|
230
|
-
|
|
230
|
+
_t,
|
|
231
231
|
{
|
|
232
|
-
typesText:
|
|
232
|
+
typesText: n,
|
|
233
233
|
setTypesText: e
|
|
234
234
|
}
|
|
235
235
|
)
|
|
236
236
|
] })
|
|
237
237
|
] });
|
|
238
|
-
},
|
|
239
|
-
subtitle:
|
|
240
|
-
header:
|
|
241
|
-
text:
|
|
242
|
-
productsBlock:
|
|
243
|
-
top:
|
|
244
|
-
itemsBlock:
|
|
245
|
-
typeTexts:
|
|
246
|
-
block:
|
|
247
|
-
active:
|
|
248
|
-
products:
|
|
249
|
-
product:
|
|
250
|
-
button:
|
|
251
|
-
disabled:
|
|
252
|
-
image:
|
|
253
|
-
info:
|
|
254
|
-
name:
|
|
255
|
-
buttons:
|
|
256
|
-
modal:
|
|
257
|
-
link:
|
|
258
|
-
modalOptions:
|
|
259
|
-
},
|
|
260
|
-
const { activeItem:
|
|
238
|
+
}, Ut = "_subtitle_11qr1_1", Ft = "_header_11qr1_8", Vt = "_text_11qr1_9", Gt = "_productsBlock_11qr1_10", Xt = "_top_11qr1_22", Yt = "_itemsBlock_11qr1_29", Jt = "_typeTexts_11qr1_35", Kt = "_block_11qr1_41", Qt = "_active_11qr1_52", Wt = "_products_11qr1_10", Zt = "_product_11qr1_10", te = "_button_11qr1_70", ee = "_disabled_11qr1_80", se = "_image_11qr1_84", ne = "_info_11qr1_91", oe = "_name_11qr1_102", ce = "_buttons_11qr1_106", ie = "_modal_11qr1_112", ae = "_link_11qr1_130", le = "_modalOptions_11qr1_136", C = {
|
|
239
|
+
subtitle: Ut,
|
|
240
|
+
header: Ft,
|
|
241
|
+
text: Vt,
|
|
242
|
+
productsBlock: Gt,
|
|
243
|
+
top: Xt,
|
|
244
|
+
itemsBlock: Yt,
|
|
245
|
+
typeTexts: Jt,
|
|
246
|
+
block: Kt,
|
|
247
|
+
active: Qt,
|
|
248
|
+
products: Wt,
|
|
249
|
+
product: Zt,
|
|
250
|
+
button: te,
|
|
251
|
+
disabled: ee,
|
|
252
|
+
image: se,
|
|
253
|
+
info: ne,
|
|
254
|
+
name: oe,
|
|
255
|
+
buttons: ce,
|
|
256
|
+
modal: ie,
|
|
257
|
+
link: ae,
|
|
258
|
+
modalOptions: le
|
|
259
|
+
}, re = (u) => {
|
|
260
|
+
const { activeItem: n, setActiveItem: s, popupPosition: o, modalOptions: i, setIsOpenModal: a } = u;
|
|
261
261
|
return /* @__PURE__ */ t.jsxs(
|
|
262
262
|
"div",
|
|
263
263
|
{
|
|
264
|
-
className:
|
|
264
|
+
className: C.modal,
|
|
265
265
|
onClick: (e) => {
|
|
266
266
|
e.stopPropagation();
|
|
267
267
|
},
|
|
268
268
|
style: {
|
|
269
|
-
top: `${
|
|
270
|
-
left: `${
|
|
269
|
+
top: `${o.top}px`,
|
|
270
|
+
left: `${o.left}px`
|
|
271
271
|
},
|
|
272
272
|
children: [
|
|
273
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
274
|
-
/* @__PURE__ */ t.jsx("h3", { children:
|
|
273
|
+
/* @__PURE__ */ t.jsxs("div", { className: C.top, children: [
|
|
274
|
+
/* @__PURE__ */ t.jsx("h3", { children: n.name }),
|
|
275
275
|
/* @__PURE__ */ t.jsx(
|
|
276
276
|
h,
|
|
277
277
|
{
|
|
@@ -280,108 +280,108 @@ const _t = "_accordion_2tiiw_1", mt = "_header_2tiiw_9", ht = "_icon_2tiiw_16",
|
|
|
280
280
|
width: 20,
|
|
281
281
|
hoverable: !0,
|
|
282
282
|
onClick: () => {
|
|
283
|
-
|
|
283
|
+
s(null), a(!1);
|
|
284
284
|
}
|
|
285
285
|
}
|
|
286
286
|
)
|
|
287
287
|
] }),
|
|
288
|
-
/* @__PURE__ */ t.jsx("div", { className:
|
|
288
|
+
/* @__PURE__ */ t.jsx("div", { className: C.modalOptions, children: i.map((e) => {
|
|
289
289
|
if (e.type === "image")
|
|
290
290
|
return /* @__PURE__ */ t.jsx(
|
|
291
|
-
|
|
291
|
+
ct,
|
|
292
292
|
{
|
|
293
293
|
label: "Put up an attractive image",
|
|
294
|
-
onChange: (
|
|
295
|
-
const
|
|
296
|
-
...
|
|
297
|
-
[e.field]:
|
|
294
|
+
onChange: (c) => {
|
|
295
|
+
const d = {
|
|
296
|
+
...n,
|
|
297
|
+
[e.field]: c
|
|
298
298
|
};
|
|
299
|
-
|
|
299
|
+
s(d);
|
|
300
300
|
}
|
|
301
301
|
}
|
|
302
302
|
);
|
|
303
303
|
if (e.type === "text")
|
|
304
304
|
return /* @__PURE__ */ t.jsx(
|
|
305
|
-
|
|
305
|
+
zt,
|
|
306
306
|
{
|
|
307
|
-
typesText:
|
|
308
|
-
setTypesText: (
|
|
309
|
-
const
|
|
310
|
-
...
|
|
311
|
-
[e.field.type]:
|
|
307
|
+
typesText: n[e.field.type],
|
|
308
|
+
setTypesText: (c) => {
|
|
309
|
+
const d = {
|
|
310
|
+
...n,
|
|
311
|
+
[e.field.type]: c
|
|
312
312
|
};
|
|
313
|
-
|
|
313
|
+
s(d);
|
|
314
314
|
},
|
|
315
|
-
text:
|
|
316
|
-
setText: (
|
|
317
|
-
const
|
|
318
|
-
...
|
|
319
|
-
[e.field.text]:
|
|
315
|
+
text: n[e.field.text] || "",
|
|
316
|
+
setText: (c) => {
|
|
317
|
+
const d = {
|
|
318
|
+
...n,
|
|
319
|
+
[e.field.text]: c
|
|
320
320
|
};
|
|
321
|
-
|
|
321
|
+
s(d);
|
|
322
322
|
},
|
|
323
323
|
subtitle: e.label
|
|
324
324
|
}
|
|
325
325
|
);
|
|
326
326
|
if (e.type === "input")
|
|
327
327
|
return /* @__PURE__ */ t.jsx(
|
|
328
|
-
|
|
328
|
+
V,
|
|
329
329
|
{
|
|
330
|
-
onChange: (
|
|
331
|
-
const
|
|
332
|
-
...
|
|
333
|
-
[e.field]:
|
|
330
|
+
onChange: (c) => {
|
|
331
|
+
const d = {
|
|
332
|
+
...n,
|
|
333
|
+
[e.field]: c
|
|
334
334
|
};
|
|
335
|
-
|
|
335
|
+
s(d);
|
|
336
336
|
},
|
|
337
|
-
value:
|
|
337
|
+
value: n[e.field] || "",
|
|
338
338
|
label: e.label,
|
|
339
339
|
placeholder: e.placeholder
|
|
340
340
|
}
|
|
341
341
|
);
|
|
342
342
|
if (e.type === "inputSwitch")
|
|
343
|
-
return /* @__PURE__ */ t.jsxs("div", { className:
|
|
343
|
+
return /* @__PURE__ */ t.jsxs("div", { className: C.link, children: [
|
|
344
344
|
/* @__PURE__ */ t.jsx(
|
|
345
|
-
|
|
345
|
+
V,
|
|
346
346
|
{
|
|
347
|
-
onChange: (
|
|
348
|
-
const
|
|
349
|
-
...
|
|
350
|
-
[e.field.text]:
|
|
347
|
+
onChange: (c) => {
|
|
348
|
+
const d = {
|
|
349
|
+
...n,
|
|
350
|
+
[e.field.text]: c
|
|
351
351
|
};
|
|
352
|
-
|
|
352
|
+
s(d);
|
|
353
353
|
},
|
|
354
|
-
value:
|
|
354
|
+
value: n[e.field.text] || "",
|
|
355
355
|
label: e.inputLabel,
|
|
356
356
|
placeholder: e.placeholder
|
|
357
357
|
}
|
|
358
358
|
),
|
|
359
359
|
/* @__PURE__ */ t.jsx(
|
|
360
|
-
|
|
360
|
+
z,
|
|
361
361
|
{
|
|
362
|
-
current: !!
|
|
362
|
+
current: !!n[e.field.switch] || !1,
|
|
363
363
|
label: e.switchLabel,
|
|
364
|
-
onChange: (
|
|
365
|
-
const
|
|
366
|
-
...
|
|
367
|
-
[e.field.switch]:
|
|
364
|
+
onChange: (c) => {
|
|
365
|
+
const d = {
|
|
366
|
+
...n,
|
|
367
|
+
[e.field.switch]: c
|
|
368
368
|
};
|
|
369
|
-
|
|
369
|
+
s(d);
|
|
370
370
|
}
|
|
371
371
|
}
|
|
372
372
|
)
|
|
373
373
|
] });
|
|
374
374
|
if (e.type === "list")
|
|
375
375
|
return /* @__PURE__ */ t.jsx(
|
|
376
|
-
|
|
376
|
+
he,
|
|
377
377
|
{
|
|
378
|
-
items:
|
|
379
|
-
setItems: (
|
|
380
|
-
const
|
|
381
|
-
...
|
|
382
|
-
[e.field]:
|
|
378
|
+
items: n[e.field] || [],
|
|
379
|
+
setItems: (c) => {
|
|
380
|
+
const d = {
|
|
381
|
+
...n,
|
|
382
|
+
[e.field]: c
|
|
383
383
|
};
|
|
384
|
-
|
|
384
|
+
s(d);
|
|
385
385
|
},
|
|
386
386
|
itemsType: "select",
|
|
387
387
|
draggable: e.draggable || !1,
|
|
@@ -393,117 +393,117 @@ const _t = "_accordion_2tiiw_1", mt = "_header_2tiiw_9", ht = "_icon_2tiiw_16",
|
|
|
393
393
|
);
|
|
394
394
|
if (e.type === "select")
|
|
395
395
|
return /* @__PURE__ */ t.jsx(
|
|
396
|
-
|
|
396
|
+
G,
|
|
397
397
|
{
|
|
398
398
|
options: e.itemsOptions,
|
|
399
|
-
onChange: (
|
|
400
|
-
const
|
|
401
|
-
...
|
|
402
|
-
[e.field]:
|
|
399
|
+
onChange: (c) => {
|
|
400
|
+
const d = {
|
|
401
|
+
...n,
|
|
402
|
+
[e.field]: c
|
|
403
403
|
};
|
|
404
|
-
|
|
404
|
+
s(d);
|
|
405
405
|
},
|
|
406
406
|
label: e.label,
|
|
407
|
-
value:
|
|
408
|
-
leftAddon: e.leftAddon && e.leftAddon === "icon" && /* @__PURE__ */ t.jsx(h, { name:
|
|
407
|
+
value: n[e.field] || "String",
|
|
408
|
+
leftAddon: e.leftAddon && e.leftAddon === "icon" && /* @__PURE__ */ t.jsx(h, { name: n[e.field] })
|
|
409
409
|
}
|
|
410
410
|
);
|
|
411
411
|
}) })
|
|
412
412
|
]
|
|
413
413
|
}
|
|
414
414
|
);
|
|
415
|
-
},
|
|
416
|
-
other:
|
|
417
|
-
subtitle:
|
|
418
|
-
items:
|
|
419
|
-
},
|
|
420
|
-
const { items:
|
|
421
|
-
return /* @__PURE__ */ t.jsxs("div", { className:
|
|
422
|
-
/* @__PURE__ */ t.jsx("h5", { className:
|
|
423
|
-
/* @__PURE__ */ t.jsx("div", { className:
|
|
424
|
-
|
|
415
|
+
}, de = "_other_1wtgi_1", ue = "_subtitle_1wtgi_7", _e = "_items_1wtgi_14", ot = {
|
|
416
|
+
other: de,
|
|
417
|
+
subtitle: ue,
|
|
418
|
+
items: _e
|
|
419
|
+
}, mt = (u) => {
|
|
420
|
+
const { items: n, title: s = "Other" } = u;
|
|
421
|
+
return /* @__PURE__ */ t.jsxs("div", { className: ot.other, children: [
|
|
422
|
+
/* @__PURE__ */ t.jsx("h5", { className: ot.subtitle, children: s }),
|
|
423
|
+
/* @__PURE__ */ t.jsx("div", { className: ot.items, children: n.map((o) => /* @__PURE__ */ t.jsx(
|
|
424
|
+
z,
|
|
425
425
|
{
|
|
426
|
-
current:
|
|
427
|
-
onChange: (i) =>
|
|
428
|
-
label:
|
|
426
|
+
current: o.isItem,
|
|
427
|
+
onChange: (i) => o.setIsItem(i),
|
|
428
|
+
label: o.label,
|
|
429
429
|
hasBackground: !0,
|
|
430
430
|
paddingless: !1
|
|
431
431
|
}
|
|
432
432
|
)) })
|
|
433
433
|
] });
|
|
434
|
-
},
|
|
435
|
-
const { index:
|
|
434
|
+
}, me = (u) => {
|
|
435
|
+
const { index: n, moveProduct: s, children: o } = u, [, i] = rt({
|
|
436
436
|
accept: "product",
|
|
437
|
-
hover(
|
|
438
|
-
|
|
437
|
+
hover(c) {
|
|
438
|
+
c.index !== n && (s(c.index, n), c.index = n);
|
|
439
439
|
}
|
|
440
|
-
}), [{ isDragging: a }, e] =
|
|
440
|
+
}), [{ isDragging: a }, e] = dt({
|
|
441
441
|
type: "product",
|
|
442
|
-
item: { index:
|
|
443
|
-
collect: (
|
|
444
|
-
isDragging:
|
|
442
|
+
item: { index: n },
|
|
443
|
+
collect: (c) => ({
|
|
444
|
+
isDragging: c.isDragging()
|
|
445
445
|
})
|
|
446
446
|
});
|
|
447
447
|
return /* @__PURE__ */ t.jsx(
|
|
448
448
|
"div",
|
|
449
449
|
{
|
|
450
|
-
ref: (
|
|
451
|
-
className: `${
|
|
452
|
-
children:
|
|
450
|
+
ref: (c) => e(i(c)),
|
|
451
|
+
className: `${C.product} ${a ? C.dragging : ""}`,
|
|
452
|
+
children: o
|
|
453
453
|
}
|
|
454
454
|
);
|
|
455
|
-
},
|
|
455
|
+
}, he = (u) => {
|
|
456
456
|
const {
|
|
457
|
-
isActiveItems:
|
|
458
|
-
setIsActiveItems:
|
|
459
|
-
items:
|
|
457
|
+
isActiveItems: n,
|
|
458
|
+
setIsActiveItems: s,
|
|
459
|
+
items: o,
|
|
460
460
|
setItems: i,
|
|
461
461
|
other: a,
|
|
462
462
|
title: e,
|
|
463
|
-
subtitle:
|
|
464
|
-
editable:
|
|
463
|
+
subtitle: c,
|
|
464
|
+
editable: d = !0,
|
|
465
465
|
draggable: k = !1,
|
|
466
466
|
withImage: m = !1,
|
|
467
|
-
deletable:
|
|
468
|
-
addable:
|
|
469
|
-
itemsType:
|
|
470
|
-
itemsPlaceholder:
|
|
467
|
+
deletable: f = !0,
|
|
468
|
+
addable: b = !0,
|
|
469
|
+
itemsType: $,
|
|
470
|
+
itemsPlaceholder: r = "",
|
|
471
471
|
itemsOptions: g,
|
|
472
|
-
hasRangeSelector:
|
|
473
|
-
rangeSelectorOptions:
|
|
474
|
-
modalOptions:
|
|
475
|
-
addableOptions:
|
|
476
|
-
limit:
|
|
477
|
-
} =
|
|
472
|
+
hasRangeSelector: B = !1,
|
|
473
|
+
rangeSelectorOptions: X,
|
|
474
|
+
modalOptions: Y,
|
|
475
|
+
addableOptions: y = {},
|
|
476
|
+
limit: S
|
|
477
|
+
} = u, [q, R] = p.useState(null), [st, et] = p.useState({
|
|
478
478
|
top: 0,
|
|
479
479
|
left: 0
|
|
480
|
-
}), [
|
|
481
|
-
const
|
|
482
|
-
|
|
480
|
+
}), [_, j] = p.useState(!1), T = (l, I) => {
|
|
481
|
+
const A = [...o], [v] = A.splice(l, 1);
|
|
482
|
+
A.splice(I, 0, v), i(A);
|
|
483
483
|
};
|
|
484
484
|
p.useEffect(() => {
|
|
485
485
|
const l = () => {
|
|
486
|
-
|
|
486
|
+
R(null), j(!1);
|
|
487
487
|
};
|
|
488
|
-
return document.body.addEventListener("click", l),
|
|
489
|
-
|
|
488
|
+
return document.body.addEventListener("click", l), R(null), j(!1), () => {
|
|
489
|
+
R(null), j(!1), document.body.removeEventListener("click", l);
|
|
490
490
|
};
|
|
491
491
|
}, []), p.useEffect(() => {
|
|
492
|
-
if (
|
|
493
|
-
const l = [...
|
|
492
|
+
if (q) {
|
|
493
|
+
const l = [...o].map((I) => I.id === q.id ? q : I);
|
|
494
494
|
i(l);
|
|
495
495
|
}
|
|
496
|
-
}, [
|
|
497
|
-
const
|
|
498
|
-
l.stopPropagation(),
|
|
499
|
-
const
|
|
500
|
-
let
|
|
501
|
-
|
|
502
|
-
top:
|
|
503
|
-
left:
|
|
504
|
-
}),
|
|
496
|
+
}, [q]);
|
|
497
|
+
const N = (l, I) => {
|
|
498
|
+
l.stopPropagation(), j(!0);
|
|
499
|
+
const A = l.target.getBoundingClientRect(), v = 500, J = window.innerHeight;
|
|
500
|
+
let L = A.top + window.scrollY;
|
|
501
|
+
L + v > J && (L = J - v - 20), et({
|
|
502
|
+
top: L - 80,
|
|
503
|
+
left: A.left - 30
|
|
504
|
+
}), R(I);
|
|
505
505
|
};
|
|
506
|
-
function
|
|
506
|
+
function U(l) {
|
|
507
507
|
if (m)
|
|
508
508
|
return l ? /* @__PURE__ */ t.jsx(
|
|
509
509
|
"img",
|
|
@@ -523,8 +523,8 @@ const _t = "_accordion_2tiiw_1", mt = "_header_2tiiw_9", ht = "_icon_2tiiw_16",
|
|
|
523
523
|
}
|
|
524
524
|
);
|
|
525
525
|
}
|
|
526
|
-
const
|
|
527
|
-
const
|
|
526
|
+
const O = (l, I) => {
|
|
527
|
+
const A = /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
528
528
|
k && /* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
|
|
529
529
|
h,
|
|
530
530
|
{
|
|
@@ -534,62 +534,62 @@ const _t = "_accordion_2tiiw_1", mt = "_header_2tiiw_9", ht = "_icon_2tiiw_16",
|
|
|
534
534
|
height: 20
|
|
535
535
|
}
|
|
536
536
|
) }),
|
|
537
|
-
|
|
538
|
-
|
|
537
|
+
$ === "select" && /* @__PURE__ */ t.jsx(
|
|
538
|
+
G,
|
|
539
539
|
{
|
|
540
|
-
onChange: (
|
|
541
|
-
const
|
|
540
|
+
onChange: (v) => {
|
|
541
|
+
const L = [...o].map((M) => M.id === l.id ? {
|
|
542
542
|
...l,
|
|
543
|
-
name:
|
|
543
|
+
name: v
|
|
544
544
|
} : M);
|
|
545
|
-
|
|
545
|
+
R({
|
|
546
546
|
...l,
|
|
547
|
-
name:
|
|
548
|
-
}), i([...
|
|
547
|
+
name: v
|
|
548
|
+
}), i([...L]);
|
|
549
549
|
},
|
|
550
550
|
value: l.name,
|
|
551
551
|
options: g,
|
|
552
|
-
leftAddon:
|
|
552
|
+
leftAddon: U(l.images)
|
|
553
553
|
}
|
|
554
554
|
),
|
|
555
|
-
|
|
556
|
-
|
|
555
|
+
$ === "input" && /* @__PURE__ */ t.jsx(
|
|
556
|
+
V,
|
|
557
557
|
{
|
|
558
|
-
onChange: (
|
|
559
|
-
const
|
|
558
|
+
onChange: (v) => {
|
|
559
|
+
const L = [...o].map((M) => M.id === l.id ? {
|
|
560
560
|
...l,
|
|
561
|
-
name:
|
|
561
|
+
name: v
|
|
562
562
|
} : M);
|
|
563
|
-
i([...
|
|
563
|
+
i([...L]);
|
|
564
564
|
},
|
|
565
565
|
value: l.name,
|
|
566
|
-
placeholder:
|
|
566
|
+
placeholder: r
|
|
567
567
|
}
|
|
568
568
|
),
|
|
569
|
-
|
|
570
|
-
|
|
569
|
+
$ === "image" && /* @__PURE__ */ t.jsx(
|
|
570
|
+
ct,
|
|
571
571
|
{
|
|
572
|
-
onChange: (
|
|
573
|
-
const
|
|
572
|
+
onChange: (v) => {
|
|
573
|
+
const L = [...o].map((M) => M.id === l.id ? {
|
|
574
574
|
...l,
|
|
575
|
-
images:
|
|
575
|
+
images: v
|
|
576
576
|
} : M);
|
|
577
|
-
i([...
|
|
577
|
+
i([...L]);
|
|
578
578
|
}
|
|
579
579
|
}
|
|
580
580
|
),
|
|
581
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
582
|
-
|
|
581
|
+
/* @__PURE__ */ t.jsxs("div", { className: C.buttons, children: [
|
|
582
|
+
d && /* @__PURE__ */ t.jsx(
|
|
583
583
|
h,
|
|
584
584
|
{
|
|
585
585
|
name: "Sliders",
|
|
586
586
|
hoverable: !0,
|
|
587
587
|
width: 20,
|
|
588
588
|
height: 20,
|
|
589
|
-
onClick: (
|
|
589
|
+
onClick: (v) => N(v, l)
|
|
590
590
|
}
|
|
591
591
|
),
|
|
592
|
-
|
|
592
|
+
f && /* @__PURE__ */ t.jsx(
|
|
593
593
|
h,
|
|
594
594
|
{
|
|
595
595
|
name: "Trash",
|
|
@@ -597,76 +597,76 @@ const _t = "_accordion_2tiiw_1", mt = "_header_2tiiw_9", ht = "_icon_2tiiw_16",
|
|
|
597
597
|
width: 20,
|
|
598
598
|
height: 20,
|
|
599
599
|
fill: "#C12A2A",
|
|
600
|
-
onClick: () => i(
|
|
600
|
+
onClick: () => i(o.filter((v) => v.id !== l.id))
|
|
601
601
|
}
|
|
602
602
|
)
|
|
603
603
|
] })
|
|
604
604
|
] });
|
|
605
605
|
return k ? /* @__PURE__ */ t.jsx(
|
|
606
|
-
|
|
606
|
+
me,
|
|
607
607
|
{
|
|
608
608
|
product: l,
|
|
609
609
|
index: I,
|
|
610
|
-
moveProduct:
|
|
611
|
-
children:
|
|
610
|
+
moveProduct: T,
|
|
611
|
+
children: A
|
|
612
612
|
},
|
|
613
613
|
l.id
|
|
614
614
|
) : /* @__PURE__ */ t.jsx(
|
|
615
615
|
"div",
|
|
616
616
|
{
|
|
617
|
-
className:
|
|
618
|
-
children:
|
|
617
|
+
className: C.product,
|
|
618
|
+
children: A
|
|
619
619
|
},
|
|
620
620
|
l.id
|
|
621
621
|
);
|
|
622
622
|
};
|
|
623
|
-
return /* @__PURE__ */ t.jsxs("div", { className:
|
|
624
|
-
(e ||
|
|
625
|
-
e && /* @__PURE__ */ t.jsx("h3", { className:
|
|
626
|
-
|
|
627
|
-
|
|
623
|
+
return /* @__PURE__ */ t.jsxs("div", { className: C.productsBlock, children: [
|
|
624
|
+
(e || n !== void 0) && /* @__PURE__ */ t.jsxs("div", { className: C.top, children: [
|
|
625
|
+
e && /* @__PURE__ */ t.jsx("h3", { className: C.title, children: e }),
|
|
626
|
+
n !== void 0 && /* @__PURE__ */ t.jsx(
|
|
627
|
+
z,
|
|
628
628
|
{
|
|
629
|
-
current:
|
|
630
|
-
onChange: (l) =>
|
|
629
|
+
current: n,
|
|
630
|
+
onChange: (l) => s == null ? void 0 : s(l)
|
|
631
631
|
}
|
|
632
632
|
)
|
|
633
633
|
] }),
|
|
634
|
-
|
|
635
|
-
|
|
634
|
+
q && d && Y && _ && /* @__PURE__ */ t.jsx(
|
|
635
|
+
re,
|
|
636
636
|
{
|
|
637
|
-
activeItem:
|
|
638
|
-
setActiveItem:
|
|
639
|
-
popupPosition:
|
|
640
|
-
modalOptions:
|
|
641
|
-
setIsOpenModal:
|
|
637
|
+
activeItem: q,
|
|
638
|
+
setActiveItem: R,
|
|
639
|
+
popupPosition: st,
|
|
640
|
+
modalOptions: Y,
|
|
641
|
+
setIsOpenModal: j
|
|
642
642
|
}
|
|
643
643
|
),
|
|
644
|
-
|
|
645
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
646
|
-
|
|
647
|
-
k ? /* @__PURE__ */ t.jsx(
|
|
648
|
-
|
|
649
|
-
|
|
644
|
+
B && X && /* @__PURE__ */ t.jsx(xs, { ...X }),
|
|
645
|
+
/* @__PURE__ */ t.jsxs("div", { className: C.products, children: [
|
|
646
|
+
c && /* @__PURE__ */ t.jsx("h5", { className: C.subtitle, children: c }),
|
|
647
|
+
k ? /* @__PURE__ */ t.jsx(at, { backend: lt, children: o.map((l, I) => O(l, I)) }) : o.map((l, I) => O(l, I)),
|
|
648
|
+
b && /* @__PURE__ */ t.jsxs(
|
|
649
|
+
tt,
|
|
650
650
|
{
|
|
651
|
-
className:
|
|
652
|
-
[
|
|
651
|
+
className: H(C.button, {
|
|
652
|
+
[C.disabled]: !!(S && S <= o.length)
|
|
653
653
|
}),
|
|
654
654
|
size: "s",
|
|
655
|
-
disabled: !!(
|
|
655
|
+
disabled: !!(S && S <= o.length),
|
|
656
656
|
onClick: () => {
|
|
657
|
-
const l = [...
|
|
658
|
-
|
|
659
|
-
name: g[0] || `Product ${
|
|
660
|
-
id:
|
|
661
|
-
...
|
|
662
|
-
}) :
|
|
657
|
+
const l = [...o];
|
|
658
|
+
$ === "select" ? l.push({
|
|
659
|
+
name: g[0] || `Product ${o.length + 1}`,
|
|
660
|
+
id: Z(),
|
|
661
|
+
...y
|
|
662
|
+
}) : $ === "input" ? l.push({
|
|
663
663
|
name: "",
|
|
664
|
-
id:
|
|
665
|
-
...
|
|
664
|
+
id: Z(),
|
|
665
|
+
...y
|
|
666
666
|
}) : l.push({
|
|
667
|
-
name: `Image ${
|
|
668
|
-
id:
|
|
669
|
-
...
|
|
667
|
+
name: `Image ${o.length + 1}`,
|
|
668
|
+
id: Z(),
|
|
669
|
+
...y
|
|
670
670
|
}), i(l);
|
|
671
671
|
},
|
|
672
672
|
children: [
|
|
@@ -683,55 +683,55 @@ const _t = "_accordion_2tiiw_1", mt = "_header_2tiiw_9", ht = "_icon_2tiiw_16",
|
|
|
683
683
|
}
|
|
684
684
|
)
|
|
685
685
|
] }),
|
|
686
|
-
a !== void 0 && /* @__PURE__ */ t.jsx(
|
|
686
|
+
a !== void 0 && /* @__PURE__ */ t.jsx(mt, { items: a })
|
|
687
687
|
] });
|
|
688
|
-
},
|
|
689
|
-
subtitle:
|
|
690
|
-
header:
|
|
691
|
-
text:
|
|
692
|
-
productsBlock:
|
|
693
|
-
buttonsBlock:
|
|
694
|
-
top:
|
|
695
|
-
itemsBlock:
|
|
696
|
-
typeTexts:
|
|
697
|
-
block:
|
|
698
|
-
active:
|
|
699
|
-
products:
|
|
700
|
-
product:
|
|
701
|
-
button:
|
|
702
|
-
image:
|
|
703
|
-
info:
|
|
704
|
-
name:
|
|
705
|
-
buttons:
|
|
706
|
-
modal:
|
|
707
|
-
other:
|
|
708
|
-
options:
|
|
709
|
-
},
|
|
710
|
-
const { activeButton:
|
|
688
|
+
}, pe = "_subtitle_41klp_1", ge = "_header_41klp_8", xe = "_text_41klp_9", be = "_productsBlock_41klp_10", fe = "_buttonsBlock_41klp_11", je = "_top_41klp_21", ve = "_itemsBlock_41klp_28", ke = "_typeTexts_41klp_34", ye = "_block_41klp_40", $e = "_active_41klp_51", Ne = "_products_41klp_10", we = "_product_41klp_10", Ce = "_button_41klp_11", Ie = "_image_41klp_79", Pe = "_info_41klp_86", Be = "_name_41klp_97", Te = "_buttons_41klp_11", Ae = "_modal_41klp_107", Se = "_other_41klp_124", Oe = "_options_41klp_130", F = {
|
|
689
|
+
subtitle: pe,
|
|
690
|
+
header: ge,
|
|
691
|
+
text: xe,
|
|
692
|
+
productsBlock: be,
|
|
693
|
+
buttonsBlock: fe,
|
|
694
|
+
top: je,
|
|
695
|
+
itemsBlock: ve,
|
|
696
|
+
typeTexts: ke,
|
|
697
|
+
block: ye,
|
|
698
|
+
active: $e,
|
|
699
|
+
products: Ne,
|
|
700
|
+
product: we,
|
|
701
|
+
button: Ce,
|
|
702
|
+
image: Ie,
|
|
703
|
+
info: Pe,
|
|
704
|
+
name: Be,
|
|
705
|
+
buttons: Te,
|
|
706
|
+
modal: Ae,
|
|
707
|
+
other: Se,
|
|
708
|
+
options: Oe
|
|
709
|
+
}, De = (u) => {
|
|
710
|
+
const { activeButton: n, setActiveButton: s, popupPosition: o } = u, [i, a] = p.useState(n.typesText), [e, c] = p.useState(n.destination), [d, k] = p.useState(n.link || ""), [m, f] = p.useState(n.text || "");
|
|
711
711
|
return p.useEffect(() => {
|
|
712
|
-
|
|
713
|
-
...
|
|
712
|
+
s({
|
|
713
|
+
...n,
|
|
714
714
|
...{
|
|
715
715
|
text: m,
|
|
716
|
-
link:
|
|
716
|
+
link: d,
|
|
717
717
|
destination: e,
|
|
718
718
|
typesText: i
|
|
719
719
|
}
|
|
720
720
|
});
|
|
721
|
-
}, [i, e,
|
|
721
|
+
}, [i, e, d, m]), /* @__PURE__ */ t.jsxs(
|
|
722
722
|
"div",
|
|
723
723
|
{
|
|
724
|
-
className:
|
|
725
|
-
onClick: (
|
|
726
|
-
|
|
724
|
+
className: F.modal,
|
|
725
|
+
onClick: (b) => {
|
|
726
|
+
b.stopPropagation();
|
|
727
727
|
},
|
|
728
728
|
style: {
|
|
729
|
-
top: `${
|
|
730
|
-
left: `${
|
|
729
|
+
top: `${o.top}px`,
|
|
730
|
+
left: `${o.left}px`
|
|
731
731
|
},
|
|
732
732
|
children: [
|
|
733
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
734
|
-
/* @__PURE__ */ t.jsx("h3", { children:
|
|
733
|
+
/* @__PURE__ */ t.jsxs("div", { className: F.top, children: [
|
|
734
|
+
/* @__PURE__ */ t.jsx("h3", { children: n.type }),
|
|
735
735
|
/* @__PURE__ */ t.jsx(
|
|
736
736
|
h,
|
|
737
737
|
{
|
|
@@ -739,22 +739,22 @@ const _t = "_accordion_2tiiw_1", mt = "_header_2tiiw_9", ht = "_icon_2tiiw_16",
|
|
|
739
739
|
height: 20,
|
|
740
740
|
width: 20,
|
|
741
741
|
hoverable: !0,
|
|
742
|
-
onClick: () =>
|
|
742
|
+
onClick: () => s(null)
|
|
743
743
|
}
|
|
744
744
|
)
|
|
745
745
|
] }),
|
|
746
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
746
|
+
/* @__PURE__ */ t.jsxs("div", { className: F.options, children: [
|
|
747
747
|
/* @__PURE__ */ t.jsx(
|
|
748
|
-
|
|
748
|
+
G,
|
|
749
749
|
{
|
|
750
750
|
label: "Destination",
|
|
751
|
-
onChange: (
|
|
751
|
+
onChange: (b) => c(b),
|
|
752
752
|
options: ["Go to Page", "Open Link"],
|
|
753
753
|
value: e
|
|
754
754
|
}
|
|
755
755
|
),
|
|
756
756
|
e === "Go to Page" ? /* @__PURE__ */ t.jsx(
|
|
757
|
-
|
|
757
|
+
G,
|
|
758
758
|
{
|
|
759
759
|
label: "Go to",
|
|
760
760
|
onChange: () => {
|
|
@@ -763,32 +763,32 @@ const _t = "_accordion_2tiiw_1", mt = "_header_2tiiw_9", ht = "_icon_2tiiw_16",
|
|
|
763
763
|
value: "Homepage"
|
|
764
764
|
}
|
|
765
765
|
) : /* @__PURE__ */ t.jsx(
|
|
766
|
-
|
|
766
|
+
V,
|
|
767
767
|
{
|
|
768
|
-
onChange: (
|
|
769
|
-
value:
|
|
768
|
+
onChange: (b) => k(b),
|
|
769
|
+
value: d,
|
|
770
770
|
placeholder: "https://",
|
|
771
771
|
label: "Link"
|
|
772
772
|
}
|
|
773
773
|
),
|
|
774
774
|
/* @__PURE__ */ t.jsx(
|
|
775
|
-
|
|
775
|
+
z,
|
|
776
776
|
{
|
|
777
777
|
current: !1,
|
|
778
778
|
label: "Open in new tab"
|
|
779
779
|
}
|
|
780
780
|
),
|
|
781
781
|
/* @__PURE__ */ t.jsx(
|
|
782
|
-
|
|
782
|
+
it,
|
|
783
783
|
{
|
|
784
|
-
onChange: (
|
|
784
|
+
onChange: (b) => f(b),
|
|
785
785
|
value: m,
|
|
786
786
|
label: "Text",
|
|
787
787
|
maxLength: 150
|
|
788
788
|
}
|
|
789
789
|
),
|
|
790
790
|
/* @__PURE__ */ t.jsx(
|
|
791
|
-
|
|
791
|
+
_t,
|
|
792
792
|
{
|
|
793
793
|
typesText: i,
|
|
794
794
|
setTypesText: a
|
|
@@ -798,29 +798,29 @@ const _t = "_accordion_2tiiw_1", mt = "_header_2tiiw_9", ht = "_icon_2tiiw_16",
|
|
|
798
798
|
]
|
|
799
799
|
}
|
|
800
800
|
);
|
|
801
|
-
},
|
|
802
|
-
subtitle:
|
|
803
|
-
header:
|
|
804
|
-
text:
|
|
805
|
-
productsBlock:
|
|
806
|
-
buttonsBlock:
|
|
807
|
-
top:
|
|
808
|
-
itemsBlock:
|
|
809
|
-
typeTexts:
|
|
810
|
-
block:
|
|
811
|
-
active:
|
|
812
|
-
products:
|
|
813
|
-
product:
|
|
814
|
-
button:
|
|
815
|
-
image:
|
|
816
|
-
info:
|
|
817
|
-
name:
|
|
818
|
-
buttons:
|
|
819
|
-
modal:
|
|
820
|
-
other:
|
|
821
|
-
options:
|
|
822
|
-
},
|
|
823
|
-
const { buttons:
|
|
801
|
+
}, Le = "_subtitle_1y5sw_1", qe = "_header_1y5sw_8", Re = "_text_1y5sw_9", Me = "_productsBlock_1y5sw_10", He = "_buttonsBlock_1y5sw_11", Ee = "_top_1y5sw_22", ze = "_itemsBlock_1y5sw_29", Ue = "_typeTexts_1y5sw_35", Fe = "_block_1y5sw_41", Ve = "_active_1y5sw_52", Ge = "_products_1y5sw_10", Xe = "_product_1y5sw_10", Ye = "_button_1y5sw_11", Je = "_image_1y5sw_80", Ke = "_info_1y5sw_87", Qe = "_name_1y5sw_98", We = "_buttons_1y5sw_11", Ze = "_modal_1y5sw_108", ts = "_other_1y5sw_125", es = "_options_1y5sw_131", W = {
|
|
802
|
+
subtitle: Le,
|
|
803
|
+
header: qe,
|
|
804
|
+
text: Re,
|
|
805
|
+
productsBlock: Me,
|
|
806
|
+
buttonsBlock: He,
|
|
807
|
+
top: Ee,
|
|
808
|
+
itemsBlock: ze,
|
|
809
|
+
typeTexts: Ue,
|
|
810
|
+
block: Fe,
|
|
811
|
+
active: Ve,
|
|
812
|
+
products: Ge,
|
|
813
|
+
product: Xe,
|
|
814
|
+
button: Ye,
|
|
815
|
+
image: Je,
|
|
816
|
+
info: Ke,
|
|
817
|
+
name: Qe,
|
|
818
|
+
buttons: We,
|
|
819
|
+
modal: Ze,
|
|
820
|
+
other: ts,
|
|
821
|
+
options: es
|
|
822
|
+
}, ss = (u) => {
|
|
823
|
+
const { buttons: n, setButtons: s, deletable: o = !0, addable: i = !0 } = u, [a, e] = p.useState(null), [c, d] = p.useState({
|
|
824
824
|
top: 0,
|
|
825
825
|
left: 0
|
|
826
826
|
});
|
|
@@ -833,41 +833,41 @@ const _t = "_accordion_2tiiw_1", mt = "_header_2tiiw_9", ht = "_icon_2tiiw_16",
|
|
|
833
833
|
};
|
|
834
834
|
}, []), p.useEffect(() => {
|
|
835
835
|
if (a) {
|
|
836
|
-
const m = [...
|
|
837
|
-
|
|
836
|
+
const m = [...n].map((f) => f.id === a.id ? a : f);
|
|
837
|
+
s(m);
|
|
838
838
|
}
|
|
839
839
|
}, [a]);
|
|
840
|
-
const k = (m,
|
|
840
|
+
const k = (m, f) => {
|
|
841
841
|
m.stopPropagation();
|
|
842
|
-
const
|
|
843
|
-
let g =
|
|
844
|
-
g +
|
|
842
|
+
const b = m.target.getBoundingClientRect(), $ = 490, r = window.innerHeight;
|
|
843
|
+
let g = b.top + window.scrollY;
|
|
844
|
+
g + $ > r && (g = r - $ - 20), d({
|
|
845
845
|
top: g,
|
|
846
|
-
left:
|
|
847
|
-
}), e(
|
|
846
|
+
left: b.left - 30
|
|
847
|
+
}), e(f);
|
|
848
848
|
};
|
|
849
|
-
return /* @__PURE__ */ t.jsxs("div", { className:
|
|
850
|
-
/* @__PURE__ */ t.jsx("h5", { className:
|
|
851
|
-
|
|
849
|
+
return /* @__PURE__ */ t.jsxs("div", { className: W.products, children: [
|
|
850
|
+
/* @__PURE__ */ t.jsx("h5", { className: W.subtitle, children: "Button Type" }),
|
|
851
|
+
n.map((m) => /* @__PURE__ */ t.jsxs(
|
|
852
852
|
"div",
|
|
853
853
|
{
|
|
854
|
-
className:
|
|
854
|
+
className: W.product,
|
|
855
855
|
children: [
|
|
856
856
|
/* @__PURE__ */ t.jsx(
|
|
857
|
-
|
|
857
|
+
G,
|
|
858
858
|
{
|
|
859
|
-
onChange: (
|
|
860
|
-
const
|
|
859
|
+
onChange: (f) => {
|
|
860
|
+
const $ = [...n].map((r) => r.id === m.id ? {
|
|
861
861
|
...m,
|
|
862
|
-
type:
|
|
863
|
-
} :
|
|
864
|
-
|
|
862
|
+
type: f
|
|
863
|
+
} : r);
|
|
864
|
+
s($);
|
|
865
865
|
},
|
|
866
866
|
value: m.type,
|
|
867
867
|
options: ["Primary", "Secondary", "Tertiary"]
|
|
868
868
|
}
|
|
869
869
|
),
|
|
870
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
870
|
+
/* @__PURE__ */ t.jsxs("div", { className: W.buttons, children: [
|
|
871
871
|
/* @__PURE__ */ t.jsx(
|
|
872
872
|
h,
|
|
873
873
|
{
|
|
@@ -875,19 +875,19 @@ const _t = "_accordion_2tiiw_1", mt = "_header_2tiiw_9", ht = "_icon_2tiiw_16",
|
|
|
875
875
|
hoverable: !0,
|
|
876
876
|
width: 20,
|
|
877
877
|
height: 20,
|
|
878
|
-
onClick: (
|
|
879
|
-
k(
|
|
878
|
+
onClick: (f) => {
|
|
879
|
+
k(f, m);
|
|
880
880
|
}
|
|
881
881
|
}
|
|
882
882
|
),
|
|
883
|
-
|
|
883
|
+
o && /* @__PURE__ */ t.jsx(
|
|
884
884
|
h,
|
|
885
885
|
{
|
|
886
886
|
name: "Trash",
|
|
887
887
|
hoverable: !0,
|
|
888
888
|
onClick: () => {
|
|
889
|
-
const
|
|
890
|
-
|
|
889
|
+
const f = n.filter((b) => b.id !== m.id);
|
|
890
|
+
s(f);
|
|
891
891
|
},
|
|
892
892
|
width: 20,
|
|
893
893
|
height: 20,
|
|
@@ -900,27 +900,27 @@ const _t = "_accordion_2tiiw_1", mt = "_header_2tiiw_9", ht = "_icon_2tiiw_16",
|
|
|
900
900
|
m.id
|
|
901
901
|
)),
|
|
902
902
|
a && /* @__PURE__ */ t.jsx(
|
|
903
|
-
|
|
903
|
+
De,
|
|
904
904
|
{
|
|
905
905
|
activeButton: a,
|
|
906
906
|
setActiveButton: e,
|
|
907
|
-
popupPosition:
|
|
907
|
+
popupPosition: c
|
|
908
908
|
}
|
|
909
909
|
),
|
|
910
910
|
i && /* @__PURE__ */ t.jsxs(
|
|
911
|
-
|
|
911
|
+
tt,
|
|
912
912
|
{
|
|
913
|
-
className:
|
|
913
|
+
className: W.button,
|
|
914
914
|
size: "s",
|
|
915
915
|
onClick: () => {
|
|
916
|
-
const m = [...
|
|
916
|
+
const m = [...n];
|
|
917
917
|
m.push({
|
|
918
918
|
type: "Primary",
|
|
919
|
-
id:
|
|
919
|
+
id: Z(),
|
|
920
920
|
typesText: [],
|
|
921
921
|
destination: "Go to Page",
|
|
922
922
|
text: ""
|
|
923
|
-
}),
|
|
923
|
+
}), s(m);
|
|
924
924
|
},
|
|
925
925
|
children: [
|
|
926
926
|
/* @__PURE__ */ t.jsx("span", { children: "Add Option" }),
|
|
@@ -936,75 +936,75 @@ const _t = "_accordion_2tiiw_1", mt = "_header_2tiiw_9", ht = "_icon_2tiiw_16",
|
|
|
936
936
|
}
|
|
937
937
|
)
|
|
938
938
|
] });
|
|
939
|
-
},
|
|
940
|
-
const { isActiveButtons:
|
|
941
|
-
return /* @__PURE__ */ t.jsx(t.Fragment, { children: /* @__PURE__ */ t.jsxs("div", { className:
|
|
942
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
943
|
-
/* @__PURE__ */ t.jsx("h3", { className:
|
|
939
|
+
}, mn = (u) => {
|
|
940
|
+
const { isActiveButtons: n, setIsActiveButtons: s, buttons: o, setButtons: i } = u;
|
|
941
|
+
return /* @__PURE__ */ t.jsx(t.Fragment, { children: /* @__PURE__ */ t.jsxs("div", { className: F.buttonsBlock, children: [
|
|
942
|
+
/* @__PURE__ */ t.jsxs("div", { className: F.top, children: [
|
|
943
|
+
/* @__PURE__ */ t.jsx("h3", { className: F.title, children: "Buttons" }),
|
|
944
944
|
/* @__PURE__ */ t.jsx(
|
|
945
|
-
|
|
945
|
+
z,
|
|
946
946
|
{
|
|
947
|
-
current:
|
|
948
|
-
onChange: (a) =>
|
|
947
|
+
current: n,
|
|
948
|
+
onChange: (a) => s(a)
|
|
949
949
|
}
|
|
950
950
|
)
|
|
951
951
|
] }),
|
|
952
952
|
/* @__PURE__ */ t.jsx(
|
|
953
|
-
|
|
953
|
+
ss,
|
|
954
954
|
{
|
|
955
|
-
buttons:
|
|
955
|
+
buttons: o,
|
|
956
956
|
setButtons: i
|
|
957
957
|
}
|
|
958
958
|
)
|
|
959
959
|
] }) });
|
|
960
|
-
},
|
|
961
|
-
wrapper:
|
|
962
|
-
subtitle:
|
|
963
|
-
content:
|
|
964
|
-
range:
|
|
965
|
-
track:
|
|
966
|
-
progress:
|
|
967
|
-
dots:
|
|
968
|
-
dot:
|
|
969
|
-
active:
|
|
970
|
-
input:
|
|
971
|
-
countBlock:
|
|
972
|
-
count:
|
|
973
|
-
controls:
|
|
974
|
-
button:
|
|
975
|
-
},
|
|
976
|
-
const { label:
|
|
977
|
-
a <
|
|
978
|
-
},
|
|
979
|
-
a >
|
|
980
|
-
},
|
|
981
|
-
const g =
|
|
960
|
+
}, ns = "_wrapper_tn7gb_1", os = "_subtitle_tn7gb_7", cs = "_content_tn7gb_14", is = "_range_tn7gb_21", as = "_track_tn7gb_26", ls = "_progress_tn7gb_35", rs = "_dots_tn7gb_45", ds = "_dot_tn7gb_45", us = "_active_tn7gb_62", _s = "_input_tn7gb_74", ms = "_countBlock_tn7gb_88", hs = "_count_tn7gb_88", ps = "_controls_tn7gb_103", gs = "_button_tn7gb_108", w = {
|
|
961
|
+
wrapper: ns,
|
|
962
|
+
subtitle: os,
|
|
963
|
+
content: cs,
|
|
964
|
+
range: is,
|
|
965
|
+
track: as,
|
|
966
|
+
progress: ls,
|
|
967
|
+
dots: rs,
|
|
968
|
+
dot: ds,
|
|
969
|
+
active: us,
|
|
970
|
+
input: _s,
|
|
971
|
+
countBlock: ms,
|
|
972
|
+
count: hs,
|
|
973
|
+
controls: ps,
|
|
974
|
+
button: gs
|
|
975
|
+
}, xs = (u) => {
|
|
976
|
+
const { label: n, min: s = 1, max: o = 4, step: i = 1, count: a, setCount: e } = u, [c, d] = p.useState(!1), k = Array.from({ length: (o - s) / i + 1 }), m = (a - s) / (o - s) * 100, f = () => {
|
|
977
|
+
a < o && e(a + i);
|
|
978
|
+
}, b = () => {
|
|
979
|
+
a > s && e(a - i);
|
|
980
|
+
}, $ = (r) => {
|
|
981
|
+
const g = s + r * i;
|
|
982
982
|
e(g);
|
|
983
983
|
};
|
|
984
|
-
return /* @__PURE__ */ t.jsxs("div", { className:
|
|
985
|
-
|
|
986
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
987
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
988
|
-
/* @__PURE__ */ t.jsx("div", { className:
|
|
984
|
+
return /* @__PURE__ */ t.jsxs("div", { className: w.wrapper, children: [
|
|
985
|
+
n && /* @__PURE__ */ t.jsx("h5", { className: w.subtitle, children: n }),
|
|
986
|
+
/* @__PURE__ */ t.jsxs("div", { className: w.content, children: [
|
|
987
|
+
/* @__PURE__ */ t.jsxs("div", { className: w.range, children: [
|
|
988
|
+
/* @__PURE__ */ t.jsx("div", { className: w.track }),
|
|
989
989
|
/* @__PURE__ */ t.jsx(
|
|
990
990
|
"div",
|
|
991
991
|
{
|
|
992
|
-
className:
|
|
992
|
+
className: w.progress,
|
|
993
993
|
style: { width: `${m}%` }
|
|
994
994
|
}
|
|
995
995
|
),
|
|
996
|
-
/* @__PURE__ */ t.jsx("div", { className:
|
|
997
|
-
const
|
|
996
|
+
/* @__PURE__ */ t.jsx("div", { className: w.dots, children: k.map((r, g) => {
|
|
997
|
+
const B = g <= (a - s) / i;
|
|
998
998
|
return /* @__PURE__ */ t.jsx(
|
|
999
999
|
"button",
|
|
1000
1000
|
{
|
|
1001
|
-
onClick: () =>
|
|
1002
|
-
className:
|
|
1003
|
-
[
|
|
1004
|
-
[
|
|
1005
|
-
[
|
|
1001
|
+
onClick: () => $(g),
|
|
1002
|
+
className: H(w.dot, {
|
|
1003
|
+
[w.active]: B,
|
|
1004
|
+
[w.inactive]: !B,
|
|
1005
|
+
[w.dragging]: c
|
|
1006
1006
|
}),
|
|
1007
|
-
"aria-label": `Set value to ${
|
|
1007
|
+
"aria-label": `Set value to ${s + g * i}`
|
|
1008
1008
|
},
|
|
1009
1009
|
g
|
|
1010
1010
|
);
|
|
@@ -1013,41 +1013,41 @@ const _t = "_accordion_2tiiw_1", mt = "_header_2tiiw_9", ht = "_icon_2tiiw_16",
|
|
|
1013
1013
|
"input",
|
|
1014
1014
|
{
|
|
1015
1015
|
type: "range",
|
|
1016
|
-
min:
|
|
1017
|
-
max:
|
|
1016
|
+
min: s,
|
|
1017
|
+
max: o,
|
|
1018
1018
|
step: i,
|
|
1019
1019
|
value: a,
|
|
1020
|
-
onChange: (
|
|
1021
|
-
onMouseDown: () =>
|
|
1022
|
-
onMouseUp: () =>
|
|
1023
|
-
onTouchStart: () =>
|
|
1024
|
-
onTouchEnd: () =>
|
|
1025
|
-
className:
|
|
1020
|
+
onChange: (r) => e(Number(r.target.value)),
|
|
1021
|
+
onMouseDown: () => d(!0),
|
|
1022
|
+
onMouseUp: () => d(!1),
|
|
1023
|
+
onTouchStart: () => d(!0),
|
|
1024
|
+
onTouchEnd: () => d(!1),
|
|
1025
|
+
className: w.input
|
|
1026
1026
|
}
|
|
1027
1027
|
)
|
|
1028
1028
|
] }),
|
|
1029
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
1029
|
+
/* @__PURE__ */ t.jsxs("div", { className: w.countBlock, children: [
|
|
1030
1030
|
/* @__PURE__ */ t.jsx(
|
|
1031
|
-
|
|
1031
|
+
V,
|
|
1032
1032
|
{
|
|
1033
1033
|
type: "number",
|
|
1034
|
-
min:
|
|
1035
|
-
max:
|
|
1034
|
+
min: s,
|
|
1035
|
+
max: o,
|
|
1036
1036
|
paddingless: !0,
|
|
1037
|
-
onChange: (
|
|
1038
|
-
const g = Number(
|
|
1039
|
-
g >
|
|
1037
|
+
onChange: (r) => {
|
|
1038
|
+
const g = Number(r);
|
|
1039
|
+
g > o ? e(o) : g < s ? e(s) : e(g);
|
|
1040
1040
|
},
|
|
1041
1041
|
value: String(a)
|
|
1042
1042
|
}
|
|
1043
1043
|
),
|
|
1044
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
1044
|
+
/* @__PURE__ */ t.jsxs("div", { className: w.controls, children: [
|
|
1045
1045
|
/* @__PURE__ */ t.jsx(
|
|
1046
1046
|
"button",
|
|
1047
1047
|
{
|
|
1048
|
-
onClick:
|
|
1049
|
-
disabled: a >=
|
|
1050
|
-
className:
|
|
1048
|
+
onClick: f,
|
|
1049
|
+
disabled: a >= o,
|
|
1050
|
+
className: w.button,
|
|
1051
1051
|
"aria-label": "Increment count",
|
|
1052
1052
|
children: /* @__PURE__ */ t.jsx(
|
|
1053
1053
|
h,
|
|
@@ -1062,9 +1062,9 @@ const _t = "_accordion_2tiiw_1", mt = "_header_2tiiw_9", ht = "_icon_2tiiw_16",
|
|
|
1062
1062
|
/* @__PURE__ */ t.jsx(
|
|
1063
1063
|
"button",
|
|
1064
1064
|
{
|
|
1065
|
-
onClick:
|
|
1066
|
-
disabled: a <=
|
|
1067
|
-
className:
|
|
1065
|
+
onClick: b,
|
|
1066
|
+
disabled: a <= s,
|
|
1067
|
+
className: w.button,
|
|
1068
1068
|
"aria-label": "Decrement count",
|
|
1069
1069
|
children: /* @__PURE__ */ t.jsx(
|
|
1070
1070
|
h,
|
|
@@ -1080,42 +1080,42 @@ const _t = "_accordion_2tiiw_1", mt = "_header_2tiiw_9", ht = "_icon_2tiiw_16",
|
|
|
1080
1080
|
] })
|
|
1081
1081
|
] })
|
|
1082
1082
|
] });
|
|
1083
|
-
},
|
|
1084
|
-
subtitle:
|
|
1085
|
-
header:
|
|
1086
|
-
text:
|
|
1087
|
-
productsBlock:
|
|
1088
|
-
top:
|
|
1089
|
-
itemsBlock:
|
|
1090
|
-
typeTexts:
|
|
1091
|
-
block:
|
|
1092
|
-
active:
|
|
1093
|
-
products:
|
|
1094
|
-
product:
|
|
1095
|
-
button:
|
|
1096
|
-
image:
|
|
1097
|
-
info:
|
|
1098
|
-
name:
|
|
1099
|
-
buttons:
|
|
1100
|
-
modal:
|
|
1101
|
-
link:
|
|
1102
|
-
modalOptions:
|
|
1103
|
-
},
|
|
1104
|
-
const { activeItem:
|
|
1083
|
+
}, bs = "_subtitle_1nl8x_1", fs = "_header_1nl8x_8", js = "_text_1nl8x_9", vs = "_productsBlock_1nl8x_10", ks = "_top_1nl8x_22", ys = "_itemsBlock_1nl8x_29", $s = "_typeTexts_1nl8x_35", Ns = "_block_1nl8x_41", ws = "_active_1nl8x_52", Cs = "_products_1nl8x_10", Is = "_product_1nl8x_10", Ps = "_button_1nl8x_70", Bs = "_image_1nl8x_80", Ts = "_info_1nl8x_87", As = "_name_1nl8x_98", Ss = "_buttons_1nl8x_102", Os = "_modal_1nl8x_108", Ds = "_link_1nl8x_126", Ls = "_modalOptions_1nl8x_132", P = {
|
|
1084
|
+
subtitle: bs,
|
|
1085
|
+
header: fs,
|
|
1086
|
+
text: js,
|
|
1087
|
+
productsBlock: vs,
|
|
1088
|
+
top: ks,
|
|
1089
|
+
itemsBlock: ys,
|
|
1090
|
+
typeTexts: $s,
|
|
1091
|
+
block: Ns,
|
|
1092
|
+
active: ws,
|
|
1093
|
+
products: Cs,
|
|
1094
|
+
product: Is,
|
|
1095
|
+
button: Ps,
|
|
1096
|
+
image: Bs,
|
|
1097
|
+
info: Ts,
|
|
1098
|
+
name: As,
|
|
1099
|
+
buttons: Ss,
|
|
1100
|
+
modal: Os,
|
|
1101
|
+
link: Ds,
|
|
1102
|
+
modalOptions: Ls
|
|
1103
|
+
}, qs = (u) => {
|
|
1104
|
+
const { activeItem: n, setActiveItem: s, popupPosition: o, setIsOpenModal: i } = u;
|
|
1105
1105
|
return /* @__PURE__ */ t.jsxs(
|
|
1106
1106
|
"div",
|
|
1107
1107
|
{
|
|
1108
|
-
className:
|
|
1108
|
+
className: P.modal,
|
|
1109
1109
|
onClick: (a) => {
|
|
1110
1110
|
a.stopPropagation();
|
|
1111
1111
|
},
|
|
1112
1112
|
style: {
|
|
1113
|
-
top: `${
|
|
1114
|
-
left: `${
|
|
1113
|
+
top: `${o.top}px`,
|
|
1114
|
+
left: `${o.left}px`
|
|
1115
1115
|
},
|
|
1116
1116
|
children: [
|
|
1117
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
1118
|
-
/* @__PURE__ */ t.jsx("h3", { children:
|
|
1117
|
+
/* @__PURE__ */ t.jsxs("div", { className: P.top, children: [
|
|
1118
|
+
/* @__PURE__ */ t.jsx("h3", { children: n.name }),
|
|
1119
1119
|
/* @__PURE__ */ t.jsx(
|
|
1120
1120
|
h,
|
|
1121
1121
|
{
|
|
@@ -1124,100 +1124,100 @@ const _t = "_accordion_2tiiw_1", mt = "_header_2tiiw_9", ht = "_icon_2tiiw_16",
|
|
|
1124
1124
|
width: 20,
|
|
1125
1125
|
hoverable: !0,
|
|
1126
1126
|
onClick: () => {
|
|
1127
|
-
i(!1),
|
|
1127
|
+
i(!1), s(null);
|
|
1128
1128
|
}
|
|
1129
1129
|
}
|
|
1130
1130
|
)
|
|
1131
1131
|
] }),
|
|
1132
|
-
/* @__PURE__ */ t.jsx("div", { className:
|
|
1133
|
-
|
|
1132
|
+
/* @__PURE__ */ t.jsx("div", { className: P.modalOptions, children: /* @__PURE__ */ t.jsx(
|
|
1133
|
+
ct,
|
|
1134
1134
|
{
|
|
1135
1135
|
label: "Put up an attractive image",
|
|
1136
1136
|
onChange: (a) => {
|
|
1137
1137
|
const e = {
|
|
1138
|
-
...
|
|
1138
|
+
...n,
|
|
1139
1139
|
images: a,
|
|
1140
1140
|
imagePath: a[0]
|
|
1141
1141
|
};
|
|
1142
|
-
|
|
1142
|
+
s(e);
|
|
1143
1143
|
}
|
|
1144
1144
|
}
|
|
1145
1145
|
) })
|
|
1146
1146
|
]
|
|
1147
1147
|
}
|
|
1148
1148
|
);
|
|
1149
|
-
},
|
|
1150
|
-
const { index:
|
|
1149
|
+
}, Rs = (u) => {
|
|
1150
|
+
const { index: n, moveProduct: s, children: o } = u, [, i] = rt({
|
|
1151
1151
|
accept: "product",
|
|
1152
|
-
hover(
|
|
1153
|
-
|
|
1152
|
+
hover(c) {
|
|
1153
|
+
c.index !== n && (s(c.index, n), c.index = n);
|
|
1154
1154
|
}
|
|
1155
|
-
}), [{ isDragging: a }, e] =
|
|
1155
|
+
}), [{ isDragging: a }, e] = dt({
|
|
1156
1156
|
type: "product",
|
|
1157
|
-
item: { index:
|
|
1158
|
-
collect: (
|
|
1159
|
-
isDragging:
|
|
1157
|
+
item: { index: n },
|
|
1158
|
+
collect: (c) => ({
|
|
1159
|
+
isDragging: c.isDragging()
|
|
1160
1160
|
})
|
|
1161
1161
|
});
|
|
1162
1162
|
return /* @__PURE__ */ t.jsx(
|
|
1163
1163
|
"div",
|
|
1164
1164
|
{
|
|
1165
|
-
ref: (
|
|
1166
|
-
className: `${
|
|
1167
|
-
children:
|
|
1165
|
+
ref: (c) => e(i(c)),
|
|
1166
|
+
className: `${P.product} ${a ? P.dragging : ""}`,
|
|
1167
|
+
children: o
|
|
1168
1168
|
}
|
|
1169
1169
|
);
|
|
1170
|
-
},
|
|
1170
|
+
}, hn = (u) => {
|
|
1171
1171
|
const {
|
|
1172
|
-
isActiveItems:
|
|
1173
|
-
setIsActiveItems:
|
|
1174
|
-
items:
|
|
1172
|
+
isActiveItems: n,
|
|
1173
|
+
setIsActiveItems: s,
|
|
1174
|
+
items: o,
|
|
1175
1175
|
setItems: i,
|
|
1176
1176
|
other: a,
|
|
1177
1177
|
title: e,
|
|
1178
|
-
subtitle:
|
|
1179
|
-
editable:
|
|
1178
|
+
subtitle: c,
|
|
1179
|
+
editable: d = !0,
|
|
1180
1180
|
draggable: k = !1,
|
|
1181
1181
|
withImage: m = !1,
|
|
1182
|
-
deletable:
|
|
1183
|
-
addable:
|
|
1184
|
-
itemsType:
|
|
1185
|
-
itemsOptions:
|
|
1186
|
-
} =
|
|
1182
|
+
deletable: f = !0,
|
|
1183
|
+
addable: b = !0,
|
|
1184
|
+
itemsType: $,
|
|
1185
|
+
itemsOptions: r
|
|
1186
|
+
} = u, [g, B] = p.useState(null), [X, Y] = p.useState({
|
|
1187
1187
|
top: 0,
|
|
1188
1188
|
left: 0
|
|
1189
|
-
}), [
|
|
1190
|
-
const
|
|
1191
|
-
|
|
1189
|
+
}), [y, S] = p.useState(!1), q = (_, j) => {
|
|
1190
|
+
const T = [...o], [N] = T.splice(_, 1);
|
|
1191
|
+
T.splice(j, 0, N), i(T);
|
|
1192
1192
|
};
|
|
1193
1193
|
p.useEffect(() => {
|
|
1194
|
-
const
|
|
1195
|
-
|
|
1194
|
+
const _ = () => {
|
|
1195
|
+
B(null), S(!1);
|
|
1196
1196
|
};
|
|
1197
|
-
return document.body.addEventListener("click",
|
|
1198
|
-
|
|
1197
|
+
return document.body.addEventListener("click", _), B(null), S(!1), () => {
|
|
1198
|
+
B(null), S(!1), document.body.removeEventListener("click", _);
|
|
1199
1199
|
};
|
|
1200
1200
|
}, []), p.useEffect(() => {
|
|
1201
1201
|
if (g) {
|
|
1202
|
-
const
|
|
1203
|
-
i(
|
|
1202
|
+
const _ = [...o].map((j) => j.id === g.id ? g : j);
|
|
1203
|
+
i(_);
|
|
1204
1204
|
}
|
|
1205
1205
|
}, [g]);
|
|
1206
|
-
const
|
|
1207
|
-
|
|
1208
|
-
const
|
|
1209
|
-
let
|
|
1210
|
-
|
|
1211
|
-
top:
|
|
1212
|
-
left:
|
|
1213
|
-
}),
|
|
1206
|
+
const R = (_, j) => {
|
|
1207
|
+
_.stopPropagation();
|
|
1208
|
+
const T = _.target.getBoundingClientRect(), N = 100, U = window.innerHeight;
|
|
1209
|
+
let O = T.top + window.scrollY;
|
|
1210
|
+
O + N > U && (O = U - N - 20), S(!0), Y({
|
|
1211
|
+
top: O - 80,
|
|
1212
|
+
left: T.left - 30
|
|
1213
|
+
}), B(j);
|
|
1214
1214
|
};
|
|
1215
|
-
function
|
|
1215
|
+
function st(_) {
|
|
1216
1216
|
if (m)
|
|
1217
|
-
return
|
|
1217
|
+
return _ ? /* @__PURE__ */ t.jsx(
|
|
1218
1218
|
"img",
|
|
1219
1219
|
{
|
|
1220
|
-
src: `https://imagedelivery.net/${
|
|
1220
|
+
src: `https://imagedelivery.net/${_}/w=1000`,
|
|
1221
1221
|
alt: "image",
|
|
1222
1222
|
width: 16,
|
|
1223
1223
|
height: 16
|
|
@@ -1232,8 +1232,8 @@ const _t = "_accordion_2tiiw_1", mt = "_header_2tiiw_9", ht = "_icon_2tiiw_16",
|
|
|
1232
1232
|
}
|
|
1233
1233
|
);
|
|
1234
1234
|
}
|
|
1235
|
-
const
|
|
1236
|
-
const
|
|
1235
|
+
const et = (_, j) => {
|
|
1236
|
+
const T = /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
1237
1237
|
k && /* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
|
|
1238
1238
|
h,
|
|
1239
1239
|
{
|
|
@@ -1243,45 +1243,45 @@ const _t = "_accordion_2tiiw_1", mt = "_header_2tiiw_9", ht = "_icon_2tiiw_16",
|
|
|
1243
1243
|
height: 20
|
|
1244
1244
|
}
|
|
1245
1245
|
) }),
|
|
1246
|
-
|
|
1247
|
-
|
|
1246
|
+
$ === "select" && /* @__PURE__ */ t.jsx(
|
|
1247
|
+
G,
|
|
1248
1248
|
{
|
|
1249
|
-
onChange: (
|
|
1250
|
-
const
|
|
1249
|
+
onChange: (N) => {
|
|
1250
|
+
const U = [...o], O = Number(N.split(" ")[1]), l = r.find((v) => v.id === O);
|
|
1251
1251
|
if (!l) return;
|
|
1252
1252
|
const I = {
|
|
1253
1253
|
...l.productData.stats,
|
|
1254
1254
|
newPrice: l.productData.minPrice.amount,
|
|
1255
1255
|
oldPrice: l.productData.compareAtPrice.amount
|
|
1256
|
-
},
|
|
1257
|
-
...
|
|
1258
|
-
name:
|
|
1259
|
-
listingId:
|
|
1256
|
+
}, A = U.map((v) => v.id === _.id ? {
|
|
1257
|
+
..._,
|
|
1258
|
+
name: N,
|
|
1259
|
+
listingId: O,
|
|
1260
1260
|
stats: I
|
|
1261
|
-
} :
|
|
1262
|
-
|
|
1263
|
-
...
|
|
1264
|
-
name:
|
|
1265
|
-
listingId:
|
|
1266
|
-
}), i([...
|
|
1261
|
+
} : v);
|
|
1262
|
+
B({
|
|
1263
|
+
..._,
|
|
1264
|
+
name: N,
|
|
1265
|
+
listingId: O
|
|
1266
|
+
}), i([...A]);
|
|
1267
1267
|
},
|
|
1268
|
-
value:
|
|
1269
|
-
options: [...
|
|
1270
|
-
leftAddon:
|
|
1268
|
+
value: _.name,
|
|
1269
|
+
options: [...r.map((N) => `Product ${N.id}`)],
|
|
1270
|
+
leftAddon: st(_.images[0])
|
|
1271
1271
|
}
|
|
1272
1272
|
),
|
|
1273
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
1274
|
-
|
|
1273
|
+
/* @__PURE__ */ t.jsxs("div", { className: P.buttons, children: [
|
|
1274
|
+
d && /* @__PURE__ */ t.jsx(
|
|
1275
1275
|
h,
|
|
1276
1276
|
{
|
|
1277
1277
|
name: "Sliders",
|
|
1278
1278
|
hoverable: !0,
|
|
1279
1279
|
width: 20,
|
|
1280
1280
|
height: 20,
|
|
1281
|
-
onClick: (
|
|
1281
|
+
onClick: (N) => R(N, _)
|
|
1282
1282
|
}
|
|
1283
1283
|
),
|
|
1284
|
-
|
|
1284
|
+
f && /* @__PURE__ */ t.jsx(
|
|
1285
1285
|
h,
|
|
1286
1286
|
{
|
|
1287
1287
|
name: "Trash",
|
|
@@ -1289,71 +1289,71 @@ const _t = "_accordion_2tiiw_1", mt = "_header_2tiiw_9", ht = "_icon_2tiiw_16",
|
|
|
1289
1289
|
width: 20,
|
|
1290
1290
|
height: 20,
|
|
1291
1291
|
fill: "#C12A2A",
|
|
1292
|
-
onClick: () => i(
|
|
1292
|
+
onClick: () => i(o.filter((N) => N.id !== _.id))
|
|
1293
1293
|
}
|
|
1294
1294
|
)
|
|
1295
1295
|
] })
|
|
1296
1296
|
] });
|
|
1297
1297
|
return k ? /* @__PURE__ */ t.jsx(
|
|
1298
|
-
|
|
1298
|
+
Rs,
|
|
1299
1299
|
{
|
|
1300
|
-
product:
|
|
1301
|
-
index:
|
|
1302
|
-
moveProduct:
|
|
1303
|
-
children:
|
|
1300
|
+
product: _,
|
|
1301
|
+
index: j,
|
|
1302
|
+
moveProduct: q,
|
|
1303
|
+
children: T
|
|
1304
1304
|
},
|
|
1305
|
-
|
|
1305
|
+
_.id
|
|
1306
1306
|
) : /* @__PURE__ */ t.jsx(
|
|
1307
1307
|
"div",
|
|
1308
1308
|
{
|
|
1309
|
-
className:
|
|
1310
|
-
children:
|
|
1309
|
+
className: P.product,
|
|
1310
|
+
children: T
|
|
1311
1311
|
},
|
|
1312
|
-
|
|
1312
|
+
_.id
|
|
1313
1313
|
);
|
|
1314
1314
|
};
|
|
1315
|
-
return /* @__PURE__ */ t.jsxs("div", { className:
|
|
1316
|
-
(e ||
|
|
1317
|
-
e && /* @__PURE__ */ t.jsx("h3", { className:
|
|
1318
|
-
|
|
1319
|
-
|
|
1315
|
+
return /* @__PURE__ */ t.jsxs("div", { className: P.productsBlock, children: [
|
|
1316
|
+
(e || n !== void 0) && /* @__PURE__ */ t.jsxs("div", { className: P.top, children: [
|
|
1317
|
+
e && /* @__PURE__ */ t.jsx("h3", { className: P.title, children: e }),
|
|
1318
|
+
n !== void 0 && /* @__PURE__ */ t.jsx(
|
|
1319
|
+
z,
|
|
1320
1320
|
{
|
|
1321
|
-
current:
|
|
1322
|
-
onChange: (
|
|
1321
|
+
current: n,
|
|
1322
|
+
onChange: (_) => s == null ? void 0 : s(_)
|
|
1323
1323
|
}
|
|
1324
1324
|
)
|
|
1325
1325
|
] }),
|
|
1326
|
-
|
|
1327
|
-
|
|
1326
|
+
y && g && /* @__PURE__ */ t.jsx(
|
|
1327
|
+
qs,
|
|
1328
1328
|
{
|
|
1329
1329
|
activeItem: g,
|
|
1330
|
-
setActiveItem:
|
|
1331
|
-
setIsOpenModal:
|
|
1332
|
-
popupPosition:
|
|
1330
|
+
setActiveItem: B,
|
|
1331
|
+
setIsOpenModal: S,
|
|
1332
|
+
popupPosition: X
|
|
1333
1333
|
}
|
|
1334
1334
|
),
|
|
1335
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
1336
|
-
|
|
1337
|
-
k ? /* @__PURE__ */ t.jsx(
|
|
1338
|
-
|
|
1339
|
-
|
|
1335
|
+
/* @__PURE__ */ t.jsxs("div", { className: P.products, children: [
|
|
1336
|
+
c && /* @__PURE__ */ t.jsx("h5", { className: P.subtitle, children: c }),
|
|
1337
|
+
k ? /* @__PURE__ */ t.jsx(at, { backend: lt, children: o.map((_, j) => et(_, j)) }) : o.map((_, j) => et(_, j)),
|
|
1338
|
+
b && /* @__PURE__ */ t.jsxs(
|
|
1339
|
+
tt,
|
|
1340
1340
|
{
|
|
1341
|
-
className:
|
|
1341
|
+
className: P.button,
|
|
1342
1342
|
size: "s",
|
|
1343
1343
|
onClick: () => {
|
|
1344
|
-
const
|
|
1345
|
-
|
|
1346
|
-
name: `Product ${
|
|
1347
|
-
id:
|
|
1348
|
-
listingId:
|
|
1344
|
+
const _ = [...o], j = r[0].id;
|
|
1345
|
+
_.push({
|
|
1346
|
+
name: `Product ${j}`,
|
|
1347
|
+
id: Z(),
|
|
1348
|
+
listingId: j,
|
|
1349
1349
|
imagePath: "",
|
|
1350
1350
|
images: [],
|
|
1351
1351
|
stats: {
|
|
1352
|
-
...
|
|
1353
|
-
newPrice:
|
|
1354
|
-
oldPrice:
|
|
1352
|
+
...r[0].productData.stats,
|
|
1353
|
+
newPrice: r[0].productData.minPrice.amount,
|
|
1354
|
+
oldPrice: r[0].productData.compareAtPrice.amount
|
|
1355
1355
|
}
|
|
1356
|
-
}), i(
|
|
1356
|
+
}), i(_);
|
|
1357
1357
|
},
|
|
1358
1358
|
children: [
|
|
1359
1359
|
/* @__PURE__ */ t.jsx("span", { children: "Add Option" }),
|
|
@@ -1369,64 +1369,79 @@ const _t = "_accordion_2tiiw_1", mt = "_header_2tiiw_9", ht = "_icon_2tiiw_16",
|
|
|
1369
1369
|
}
|
|
1370
1370
|
)
|
|
1371
1371
|
] }),
|
|
1372
|
-
a !== void 0 && /* @__PURE__ */ t.jsx(
|
|
1372
|
+
a !== void 0 && /* @__PURE__ */ t.jsx(mt, { items: a })
|
|
1373
1373
|
] });
|
|
1374
|
-
},
|
|
1375
|
-
options:
|
|
1376
|
-
price:
|
|
1377
|
-
oldPrice:
|
|
1378
|
-
newPrice:
|
|
1379
|
-
meta:
|
|
1380
|
-
info:
|
|
1381
|
-
infoRight:
|
|
1382
|
-
buttons:
|
|
1383
|
-
variants:
|
|
1384
|
-
variant:
|
|
1385
|
-
stock:
|
|
1386
|
-
variantInfo:
|
|
1387
|
-
quantity:
|
|
1388
|
-
count:
|
|
1389
|
-
button:
|
|
1390
|
-
activeVariant:
|
|
1391
|
-
chargeTypes:
|
|
1392
|
-
charge:
|
|
1393
|
-
chargeActive:
|
|
1394
|
-
},
|
|
1395
|
-
const { variants:
|
|
1396
|
-
function
|
|
1397
|
-
if (
|
|
1398
|
-
const
|
|
1399
|
-
|
|
1400
|
-
|
|
1401
|
-
|
|
1402
|
-
|
|
1403
|
-
|
|
1404
|
-
|
|
1405
|
-
|
|
1374
|
+
}, Ms = "_options_163bj_1", Hs = "_price_163bj_12", Es = "_oldPrice_163bj_18", zs = "_newPrice_163bj_26", Us = "_meta_163bj_33", Fs = "_info_163bj_39", Vs = "_infoRight_163bj_46", Gs = "_buttons_163bj_52", Xs = "_variants_163bj_59", Ys = "_variant_163bj_59", Js = "_stock_163bj_74", Ks = "_variantInfo_163bj_81", Qs = "_quantity_163bj_87", Ws = "_count_163bj_93", Zs = "_button_163bj_52", tn = "_activeVariant_163bj_110", en = "_chargeTypes_163bj_114", sn = "_charge_163bj_114", nn = "_chargeActive_163bj_131", x = {
|
|
1375
|
+
options: Ms,
|
|
1376
|
+
price: Hs,
|
|
1377
|
+
oldPrice: Es,
|
|
1378
|
+
newPrice: zs,
|
|
1379
|
+
meta: Us,
|
|
1380
|
+
info: Fs,
|
|
1381
|
+
infoRight: Vs,
|
|
1382
|
+
buttons: Gs,
|
|
1383
|
+
variants: Xs,
|
|
1384
|
+
variant: Ys,
|
|
1385
|
+
stock: Js,
|
|
1386
|
+
variantInfo: Ks,
|
|
1387
|
+
quantity: Qs,
|
|
1388
|
+
count: Ws,
|
|
1389
|
+
button: Zs,
|
|
1390
|
+
activeVariant: tn,
|
|
1391
|
+
chargeTypes: en,
|
|
1392
|
+
charge: sn,
|
|
1393
|
+
chargeActive: nn
|
|
1394
|
+
}, pn = (u) => {
|
|
1395
|
+
const { variants: n } = u, [s, o] = p.useState(n[0]), i = ut(), [a, e] = p.useState(1), { reset: c, addProductToCart: d, cart: k, getPages: m } = ht();
|
|
1396
|
+
function f() {
|
|
1397
|
+
if (k.parts.length === 0) {
|
|
1398
|
+
const r = encodeURIComponent("product/subscription-test");
|
|
1399
|
+
m(r).then(() => {
|
|
1400
|
+
console.log(u.id, s.id, a), d({
|
|
1401
|
+
productId: u.id,
|
|
1402
|
+
productVariantId: s.id,
|
|
1403
|
+
quantity: a
|
|
1404
|
+
});
|
|
1405
|
+
});
|
|
1406
|
+
}
|
|
1407
|
+
}
|
|
1408
|
+
function b() {
|
|
1409
|
+
c(), f(), i("/checkout");
|
|
1410
|
+
}
|
|
1411
|
+
function $(r) {
|
|
1412
|
+
if (r >= 864e5) {
|
|
1413
|
+
const y = Math.floor(r / 864e5);
|
|
1414
|
+
return `${y} ${y === 1 ? "day" : "days"}`;
|
|
1415
|
+
} else if (r >= 36e5) {
|
|
1416
|
+
const y = Math.floor(r / 36e5);
|
|
1417
|
+
return `${y} ${y === 1 ? "hour" : "hours"}`;
|
|
1418
|
+
} else if (r >= 6e4) {
|
|
1419
|
+
const y = Math.floor(r / 6e4);
|
|
1420
|
+
return `${y} ${y === 1 ? "minute" : "minutes"}`;
|
|
1406
1421
|
} else {
|
|
1407
|
-
const
|
|
1408
|
-
return `${
|
|
1422
|
+
const y = Math.floor(r / 1e3);
|
|
1423
|
+
return `${y} ${y === 1 ? "second" : "seconds"}`;
|
|
1409
1424
|
}
|
|
1410
1425
|
}
|
|
1411
1426
|
return /* @__PURE__ */ t.jsxs("div", { className: x.options, children: [
|
|
1412
|
-
/* @__PURE__ */ t.jsx("div", { className: x.chargeTypes, children:
|
|
1413
|
-
/* @__PURE__ */ t.jsx("div", { className: x.variants, children:
|
|
1427
|
+
/* @__PURE__ */ t.jsx("div", { className: x.chargeTypes, children: s.chargeTypes ? s.chargeTypes.map((r) => /* @__PURE__ */ t.jsx("div", { children: r })) : /* @__PURE__ */ t.jsx("div", { className: H(x.charge, x.chargeActive), children: "One-Time" }) }),
|
|
1428
|
+
/* @__PURE__ */ t.jsx("div", { className: x.variants, children: n.map((r) => /* @__PURE__ */ t.jsxs(
|
|
1414
1429
|
"div",
|
|
1415
1430
|
{
|
|
1416
|
-
className:
|
|
1417
|
-
[x.activeVariant]:
|
|
1431
|
+
className: H(x.variant, {
|
|
1432
|
+
[x.activeVariant]: s.id === r.id
|
|
1418
1433
|
}),
|
|
1419
|
-
onClick: () =>
|
|
1434
|
+
onClick: () => o(r),
|
|
1420
1435
|
children: [
|
|
1421
1436
|
/* @__PURE__ */ t.jsxs("div", { className: x.variantInfo, children: [
|
|
1422
|
-
/* @__PURE__ */ t.jsx("span", { className: x.title, children:
|
|
1437
|
+
/* @__PURE__ */ t.jsx("span", { className: x.title, children: r.name }),
|
|
1423
1438
|
/* @__PURE__ */ t.jsxs("span", { children: [
|
|
1424
1439
|
"$",
|
|
1425
|
-
|
|
1440
|
+
r.price.amount
|
|
1426
1441
|
] })
|
|
1427
1442
|
] }),
|
|
1428
1443
|
/* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsxs("span", { className: x.stock, children: [
|
|
1429
|
-
|
|
1444
|
+
r.quantity.restrictions.max || 0,
|
|
1430
1445
|
" in stock"
|
|
1431
1446
|
] }) })
|
|
1432
1447
|
]
|
|
@@ -1437,17 +1452,17 @@ const _t = "_accordion_2tiiw_1", mt = "_header_2tiiw_9", ht = "_icon_2tiiw_16",
|
|
|
1437
1452
|
"div",
|
|
1438
1453
|
{
|
|
1439
1454
|
onClick: () => {
|
|
1440
|
-
|
|
1455
|
+
a > 1 ? e((r) => r - 1) : e(1);
|
|
1441
1456
|
},
|
|
1442
1457
|
className: x.button,
|
|
1443
1458
|
children: /* @__PURE__ */ t.jsx(h, { name: "Minus" })
|
|
1444
1459
|
}
|
|
1445
1460
|
),
|
|
1446
|
-
/* @__PURE__ */ t.jsx("div", { className: x.count, children:
|
|
1461
|
+
/* @__PURE__ */ t.jsx("div", { className: x.count, children: a }),
|
|
1447
1462
|
/* @__PURE__ */ t.jsx(
|
|
1448
1463
|
"div",
|
|
1449
1464
|
{
|
|
1450
|
-
onClick: () =>
|
|
1465
|
+
onClick: () => e((r) => r + 1),
|
|
1451
1466
|
className: x.button,
|
|
1452
1467
|
children: /* @__PURE__ */ t.jsx(h, { name: "Plus" })
|
|
1453
1468
|
}
|
|
@@ -1466,57 +1481,107 @@ const _t = "_accordion_2tiiw_1", mt = "_header_2tiiw_9", ht = "_icon_2tiiw_16",
|
|
|
1466
1481
|
height: 20
|
|
1467
1482
|
}
|
|
1468
1483
|
),
|
|
1469
|
-
/* @__PURE__ */ t.jsx("span", { children:
|
|
1484
|
+
/* @__PURE__ */ t.jsx("span", { children: s.deliveryTime === 0 ? "Instant" : $(s.deliveryTime) })
|
|
1470
1485
|
] })
|
|
1471
1486
|
] }),
|
|
1472
1487
|
/* @__PURE__ */ t.jsxs("div", { className: x.info, children: [
|
|
1473
1488
|
/* @__PURE__ */ t.jsx("span", { children: "Price" }),
|
|
1474
|
-
/* @__PURE__ */ t.jsx("div", { className: x.infoRight, children:
|
|
1489
|
+
/* @__PURE__ */ t.jsx("div", { className: x.infoRight, children: s.compareAtPrice && (s.compareAtPrice.amount || 0) - (s.price.amount || 0) > 0 ? /* @__PURE__ */ t.jsxs("div", { className: x.price, children: [
|
|
1475
1490
|
/* @__PURE__ */ t.jsxs("span", { className: x.newPrice, children: [
|
|
1476
1491
|
"$ ",
|
|
1477
|
-
(
|
|
1492
|
+
(s.price.amount || 0) * a
|
|
1478
1493
|
] }),
|
|
1479
1494
|
/* @__PURE__ */ t.jsxs("span", { className: x.oldPrice, children: [
|
|
1480
1495
|
"$ ",
|
|
1481
|
-
(
|
|
1496
|
+
(s.compareAtPrice.amount || 0) * a
|
|
1482
1497
|
] })
|
|
1483
1498
|
] }) : /* @__PURE__ */ t.jsxs("span", { className: x.newPrice, children: [
|
|
1484
1499
|
"$ ",
|
|
1485
|
-
(
|
|
1500
|
+
(s.price.amount || 0) * a
|
|
1486
1501
|
] }) })
|
|
1487
1502
|
] })
|
|
1488
1503
|
] }),
|
|
1489
1504
|
/* @__PURE__ */ t.jsxs("div", { className: x.buttons, children: [
|
|
1490
|
-
/* @__PURE__ */ t.jsx(
|
|
1491
|
-
|
|
1505
|
+
/* @__PURE__ */ t.jsx(
|
|
1506
|
+
tt,
|
|
1507
|
+
{
|
|
1508
|
+
type: "Primary",
|
|
1509
|
+
onClick: () => b(),
|
|
1510
|
+
children: "Buy Now"
|
|
1511
|
+
}
|
|
1512
|
+
),
|
|
1513
|
+
/* @__PURE__ */ t.jsx(
|
|
1514
|
+
tt,
|
|
1515
|
+
{
|
|
1516
|
+
type: "Secondary",
|
|
1517
|
+
onClick: () => f(),
|
|
1518
|
+
children: "Add to Cart"
|
|
1519
|
+
}
|
|
1520
|
+
)
|
|
1492
1521
|
] })
|
|
1493
1522
|
] });
|
|
1523
|
+
}, on = "_button_pstfl_1", cn = "_login_pstfl_11", an = "_signUp_pstfl_15", ln = "_buttons_pstfl_20", E = {
|
|
1524
|
+
button: on,
|
|
1525
|
+
login: cn,
|
|
1526
|
+
signUp: an,
|
|
1527
|
+
buttons: ln
|
|
1528
|
+
}, gn = (u) => {
|
|
1529
|
+
const { shopping: n, signUp: s } = u, o = ut();
|
|
1530
|
+
function i(a) {
|
|
1531
|
+
o(a);
|
|
1532
|
+
}
|
|
1533
|
+
return /* @__PURE__ */ t.jsxs("div", { className: E.buttons, children: [
|
|
1534
|
+
n && /* @__PURE__ */ t.jsx("div", { className: E.button, children: /* @__PURE__ */ t.jsx(
|
|
1535
|
+
h,
|
|
1536
|
+
{
|
|
1537
|
+
name: "Handbag",
|
|
1538
|
+
fill: "#252525"
|
|
1539
|
+
}
|
|
1540
|
+
) }),
|
|
1541
|
+
/* @__PURE__ */ t.jsx(
|
|
1542
|
+
"div",
|
|
1543
|
+
{
|
|
1544
|
+
className: H(E.button, E.login),
|
|
1545
|
+
onClick: () => i("/customer-dash"),
|
|
1546
|
+
children: "Login"
|
|
1547
|
+
}
|
|
1548
|
+
),
|
|
1549
|
+
s && /* @__PURE__ */ t.jsx(
|
|
1550
|
+
"div",
|
|
1551
|
+
{
|
|
1552
|
+
className: H(E.button, E.login, E.signUp),
|
|
1553
|
+
onClick: () => i("/customer-dash"),
|
|
1554
|
+
children: "Sign Up"
|
|
1555
|
+
}
|
|
1556
|
+
)
|
|
1557
|
+
] });
|
|
1494
1558
|
};
|
|
1495
1559
|
export {
|
|
1496
|
-
|
|
1497
|
-
|
|
1498
|
-
|
|
1499
|
-
|
|
1500
|
-
|
|
1501
|
-
|
|
1502
|
-
|
|
1503
|
-
|
|
1560
|
+
un as Accordion,
|
|
1561
|
+
tt as Button,
|
|
1562
|
+
ss as ButtonTypeSettings,
|
|
1563
|
+
mn as ButtonsSettings,
|
|
1564
|
+
fn as Checkbox,
|
|
1565
|
+
ct as ChooseImage,
|
|
1566
|
+
jn as ChooseImageModal,
|
|
1567
|
+
vn as ColorPicker,
|
|
1568
|
+
gn as HeaderButtons,
|
|
1504
1569
|
h as Icon,
|
|
1505
|
-
|
|
1506
|
-
|
|
1507
|
-
|
|
1508
|
-
|
|
1509
|
-
|
|
1510
|
-
|
|
1511
|
-
|
|
1512
|
-
|
|
1513
|
-
|
|
1514
|
-
|
|
1515
|
-
|
|
1516
|
-
|
|
1517
|
-
|
|
1518
|
-
|
|
1519
|
-
|
|
1520
|
-
|
|
1521
|
-
|
|
1570
|
+
V as Input,
|
|
1571
|
+
he as ItemsSettings,
|
|
1572
|
+
_n as LayoutSettings,
|
|
1573
|
+
hn as ListingSelector,
|
|
1574
|
+
kn as Loader,
|
|
1575
|
+
yn as Modal,
|
|
1576
|
+
$n as Picker,
|
|
1577
|
+
pn as ProductOptions,
|
|
1578
|
+
Nn as Radio,
|
|
1579
|
+
xs as RangeSelector,
|
|
1580
|
+
G as Select,
|
|
1581
|
+
wn as Submodal,
|
|
1582
|
+
z as Switch,
|
|
1583
|
+
zt as TextSettings,
|
|
1584
|
+
it as Textarea,
|
|
1585
|
+
Cn as Tip,
|
|
1586
|
+
_t as TypesText
|
|
1522
1587
|
};
|