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