@billgangcom/theme-lib 1.24.1 → 1.26.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/ui.es.js CHANGED
@@ -1,27 +1,27 @@
1
- import { j as t, c as M, I as x, a as G, S as V, T as lt, C as it, b as Y, D as rt, H as dt, B as X, v as tt, u as ut, d as mt, e as ot, f as at, M as gt } from "./index-BY2jq9jr.js";
2
- import { k as Xn, l as Qn, h as Wn, E as Jn, L as Kn, P as Zn, R as tc, g as ec, i as sc } from "./index-BY2jq9jr.js";
1
+ import { j as t, c as D, I as p, a as G, S as H, T as dt, C as it, b as W, D as ut, H as _t, B as X, v as et, u as mt, d as pt, e as at, f as lt, M as ht, g as gt } from "./index-CeRgFjoD.js";
2
+ import { l as dc, m as uc, i as _c, E as mc, L as pc, P as hc, R as gc, h as xc, k as fc } from "./index-CeRgFjoD.js";
3
3
  import f from "react";
4
- const xt = "_accordion_9e4oa_1", ft = "_header_9e4oa_9", bt = "_icon_9e4oa_18", jt = "_open_9e4oa_21", vt = "_content_9e4oa_25", J = {
5
- accordion: xt,
6
- header: ft,
7
- icon: bt,
8
- open: jt,
9
- content: vt
10
- }, Rn = ({ title: r, content: n }) => {
11
- const [e, o] = f.useState(!1), [i, a] = f.useState(0), s = f.useRef(null), c = () => {
4
+ const jt = "_accordion_9e4oa_1", vt = "_header_9e4oa_9", kt = "_icon_9e4oa_18", yt = "_open_9e4oa_21", Nt = "_content_9e4oa_25", K = {
5
+ accordion: jt,
6
+ header: vt,
7
+ icon: kt,
8
+ open: yt,
9
+ content: Nt
10
+ }, ec = ({ title: d, content: n }) => {
11
+ const [e, o] = f.useState(!1), [c, l] = f.useState(0), s = f.useRef(null), i = () => {
12
12
  o(!e);
13
13
  };
14
14
  return f.useEffect(() => {
15
- s.current && a(e ? s.current.scrollHeight : 0);
16
- }, [e]), /* @__PURE__ */ t.jsxs("div", { className: J.accordion, children: [
15
+ s.current && l(e ? s.current.scrollHeight : 0);
16
+ }, [e]), /* @__PURE__ */ t.jsxs("div", { className: K.accordion, children: [
17
17
  /* @__PURE__ */ t.jsxs(
18
18
  "div",
19
19
  {
20
- className: J.header,
21
- onClick: c,
20
+ className: K.header,
21
+ onClick: i,
22
22
  children: [
23
- /* @__PURE__ */ t.jsx("h3", { children: r }),
24
- /* @__PURE__ */ t.jsx("div", { className: M(J.icon, { [J.open]: e }), children: /* @__PURE__ */ t.jsx(x, { name: "CaretDown" }) })
23
+ /* @__PURE__ */ t.jsx("h3", { children: d }),
24
+ /* @__PURE__ */ t.jsx("div", { className: D(K.icon, { [K.open]: e }), children: /* @__PURE__ */ t.jsx(p, { name: "CaretDown" }) })
25
25
  ]
26
26
  }
27
27
  ),
@@ -29,25 +29,25 @@ const xt = "_accordion_9e4oa_1", ft = "_header_9e4oa_9", bt = "_icon_9e4oa_18",
29
29
  "div",
30
30
  {
31
31
  ref: s,
32
- className: J.content,
33
- style: { height: `${i}px` },
32
+ className: K.content,
33
+ style: { height: `${c}px` },
34
34
  children: /* @__PURE__ */ t.jsx("p", { children: n })
35
35
  }
36
36
  )
37
37
  ] });
38
- }, kt = "_wrapper_9rr5j_2", yt = "_alignmentBlock_9rr5j_8", $t = "_title_9rr5j_15", Nt = "_subtitle_9rr5j_22", Ct = "_alignmentContent_9rr5j_29", It = "_alignments_9rr5j_37", Pt = "_alignment_9rr5j_8", Bt = "_circle_9rr5j_58", wt = "_paddings_9rr5j_65", Tt = "_padding_9rr5j_65", qt = "_input_9rr5j_84", D = {
39
- wrapper: kt,
40
- alignmentBlock: yt,
41
- title: $t,
42
- subtitle: Nt,
43
- alignmentContent: Ct,
44
- alignments: It,
45
- alignment: Pt,
46
- circle: Bt,
47
- paddings: wt,
48
- padding: Tt,
49
- input: qt
50
- }, At = [
38
+ }, $t = "_wrapper_9rr5j_2", Ct = "_alignmentBlock_9rr5j_8", It = "_title_9rr5j_15", Pt = "_subtitle_9rr5j_22", Tt = "_alignmentContent_9rr5j_29", wt = "_alignments_9rr5j_37", Bt = "_alignment_9rr5j_8", St = "_circle_9rr5j_58", qt = "_paddings_9rr5j_65", At = "_padding_9rr5j_65", Ot = "_input_9rr5j_84", O = {
39
+ wrapper: $t,
40
+ alignmentBlock: Ct,
41
+ title: It,
42
+ subtitle: Pt,
43
+ alignmentContent: Tt,
44
+ alignments: wt,
45
+ alignment: Bt,
46
+ circle: St,
47
+ paddings: qt,
48
+ padding: At,
49
+ input: Ot
50
+ }, Lt = [
51
51
  "topLeft",
52
52
  "top",
53
53
  "topRight",
@@ -57,9 +57,9 @@ const xt = "_accordion_9e4oa_1", ft = "_header_9e4oa_9", bt = "_icon_9e4oa_18",
57
57
  "bottomLeft",
58
58
  "bottom",
59
59
  "bottomRight"
60
- ], St = ["left", "top", "right", "bottom"], Hn = (r) => {
61
- const { alignment: n, padding: e, setPadding: o, setAlignment: i } = r;
62
- function a() {
60
+ ], Dt = ["left", "top", "right", "bottom"], sc = (d) => {
61
+ const { alignment: n, padding: e, setPadding: o, setAlignment: c } = d;
62
+ function l() {
63
63
  switch (n) {
64
64
  case "left":
65
65
  case "topLeft":
@@ -77,8 +77,8 @@ const xt = "_accordion_9e4oa_1", ft = "_header_9e4oa_9", bt = "_icon_9e4oa_18",
77
77
  return "TextAlignCenter";
78
78
  }
79
79
  }
80
- function s(c) {
81
- switch (c) {
80
+ function s(i) {
81
+ switch (i) {
82
82
  case "left":
83
83
  return "AlignLeft";
84
84
  case "right":
@@ -89,24 +89,24 @@ const xt = "_accordion_9e4oa_1", ft = "_header_9e4oa_9", bt = "_icon_9e4oa_18",
89
89
  return "AlignBottom";
90
90
  }
91
91
  }
92
- return /* @__PURE__ */ t.jsxs("div", { className: D.layout, children: [
93
- /* @__PURE__ */ t.jsx("h3", { className: D.title, children: "Layout" }),
94
- /* @__PURE__ */ t.jsxs("div", { className: D.alignmentBlock, children: [
95
- /* @__PURE__ */ t.jsx("h5", { className: D.subtitle, children: "Alignment" }),
96
- /* @__PURE__ */ t.jsxs("div", { className: D.alignmentContent, children: [
97
- /* @__PURE__ */ t.jsx("div", { className: D.alignments, children: At.map((c) => /* @__PURE__ */ t.jsxs(
92
+ return /* @__PURE__ */ t.jsxs("div", { className: O.layout, children: [
93
+ /* @__PURE__ */ t.jsx("h3", { className: O.title, children: "Layout" }),
94
+ /* @__PURE__ */ t.jsxs("div", { className: O.alignmentBlock, children: [
95
+ /* @__PURE__ */ t.jsx("h5", { className: O.subtitle, children: "Alignment" }),
96
+ /* @__PURE__ */ t.jsxs("div", { className: O.alignmentContent, children: [
97
+ /* @__PURE__ */ t.jsx("div", { className: O.alignments, children: Lt.map((i) => /* @__PURE__ */ t.jsxs(
98
98
  "div",
99
99
  {
100
100
  onClick: () => {
101
- i(c);
101
+ c(i);
102
102
  },
103
- className: D.alignment,
103
+ className: O.alignment,
104
104
  children: [
105
- c !== n && /* @__PURE__ */ t.jsx("div", { className: D.circle }),
106
- c === n && /* @__PURE__ */ t.jsx(
107
- x,
105
+ i !== n && /* @__PURE__ */ t.jsx("div", { className: O.circle }),
106
+ i === n && /* @__PURE__ */ t.jsx(
107
+ p,
108
108
  {
109
- name: a(),
109
+ name: l(),
110
110
  fill: "#FF3F19",
111
111
  width: 22,
112
112
  height: 22
@@ -114,17 +114,17 @@ const xt = "_accordion_9e4oa_1", ft = "_header_9e4oa_9", bt = "_icon_9e4oa_18",
114
114
  )
115
115
  ]
116
116
  },
117
- c
117
+ i
118
118
  )) }),
119
- /* @__PURE__ */ t.jsx("div", { className: D.paddings, children: St.map((c) => /* @__PURE__ */ t.jsxs(
119
+ /* @__PURE__ */ t.jsx("div", { className: O.paddings, children: Dt.map((i) => /* @__PURE__ */ t.jsxs(
120
120
  "label",
121
121
  {
122
- className: D.padding,
122
+ className: O.padding,
123
123
  children: [
124
124
  /* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
125
- x,
125
+ p,
126
126
  {
127
- name: s(c),
127
+ name: s(i),
128
128
  width: 20,
129
129
  height: 20
130
130
  }
@@ -133,10 +133,10 @@ const xt = "_accordion_9e4oa_1", ft = "_header_9e4oa_9", bt = "_icon_9e4oa_18",
133
133
  G,
134
134
  {
135
135
  type: "text",
136
- value: String(e[c]),
136
+ value: String(e[i]),
137
137
  onChange: (m) => o({
138
138
  ...e,
139
- [c]: Number(m)
139
+ [i]: Number(m)
140
140
  }),
141
141
  paddingless: !0,
142
142
  borderless: !0
@@ -144,25 +144,25 @@ const xt = "_accordion_9e4oa_1", ft = "_header_9e4oa_9", bt = "_icon_9e4oa_18",
144
144
  )
145
145
  ]
146
146
  },
147
- c
147
+ i
148
148
  )) })
149
149
  ] })
150
150
  ] })
151
151
  ] });
152
- }, Ot = "_subtitle_1qrz9_1", Dt = "_header_1qrz9_8", Et = "_text_1qrz9_9", Mt = "_top_1qrz9_17", Lt = "_itemsBlock_1qrz9_26", K = {
153
- subtitle: Ot,
154
- header: Dt,
155
- text: Et,
156
- top: Mt,
157
- itemsBlock: Lt
158
- }, Rt = "_typeTexts_rcw8p_1", Ht = "_block_rcw8p_8", Vt = "_active_rcw8p_21", nt = {
159
- typeTexts: Rt,
160
- block: Ht,
161
- active: Vt
162
- }, Ft = ["bold", "italic", "underline", "strike-through", "code"], _t = (r) => {
163
- const { typesText: n, setTypesText: e } = r;
164
- function o(i) {
165
- switch (i) {
152
+ }, zt = "_subtitle_1qrz9_1", Et = "_header_1qrz9_8", Mt = "_text_1qrz9_9", Rt = "_top_1qrz9_17", Ht = "_itemsBlock_1qrz9_26", Z = {
153
+ subtitle: zt,
154
+ header: Et,
155
+ text: Mt,
156
+ top: Rt,
157
+ itemsBlock: Ht
158
+ }, Vt = "_typeTexts_rcw8p_1", Ft = "_block_rcw8p_8", Ut = "_active_rcw8p_21", ct = {
159
+ typeTexts: Vt,
160
+ block: Ft,
161
+ active: Ut
162
+ }, Gt = ["bold", "italic", "underline", "strike-through", "code"], xt = (d) => {
163
+ const { typesText: n, setTypesText: e } = d;
164
+ function o(c) {
165
+ switch (c) {
166
166
  case "bold":
167
167
  return "TextB";
168
168
  case "italic":
@@ -175,66 +175,66 @@ const xt = "_accordion_9e4oa_1", ft = "_header_9e4oa_9", bt = "_icon_9e4oa_18",
175
175
  return "TextUnderline";
176
176
  }
177
177
  }
178
- return /* @__PURE__ */ t.jsx("div", { className: nt.typeTexts, children: Ft.map((i) => /* @__PURE__ */ t.jsx(
178
+ return /* @__PURE__ */ t.jsx("div", { className: ct.typeTexts, children: Gt.map((c) => /* @__PURE__ */ t.jsx(
179
179
  "div",
180
180
  {
181
- className: M(nt.block, {
182
- [nt.active]: n.includes(i)
181
+ className: D(ct.block, {
182
+ [ct.active]: n.includes(c)
183
183
  }),
184
184
  onClick: () => {
185
- const a = [...n];
186
- if (a.includes(i)) {
187
- const s = a.filter((c) => c !== i);
185
+ const l = [...n];
186
+ if (l.includes(c)) {
187
+ const s = l.filter((i) => i !== c);
188
188
  e(s);
189
189
  } else
190
- a.push(i), e(a);
190
+ l.push(c), e(l);
191
191
  },
192
192
  children: /* @__PURE__ */ t.jsx(
193
- x,
193
+ p,
194
194
  {
195
- name: o(i),
196
- fill: n.includes(i) ? "#252525" : "#757575",
195
+ name: o(c),
196
+ fill: n.includes(c) ? "#252525" : "#757575",
197
197
  width: 20,
198
198
  height: 20
199
199
  }
200
200
  )
201
201
  },
202
- String(i)
202
+ String(c)
203
203
  )) });
204
- }, Ut = (r) => {
204
+ }, Wt = (d) => {
205
205
  const {
206
206
  typesText: n,
207
207
  isActiveText: e,
208
208
  setIsActiveText: o,
209
- text: i,
210
- setText: a,
209
+ text: c,
210
+ setText: l,
211
211
  setTypesText: s,
212
- title: c,
212
+ title: i,
213
213
  subtitle: m = "Items"
214
- } = r;
215
- return /* @__PURE__ */ t.jsxs("div", { className: K.text, children: [
216
- (c || e !== void 0) && /* @__PURE__ */ t.jsxs("div", { className: K.top, children: [
217
- c && /* @__PURE__ */ t.jsx("h3", { className: K.title, children: c }),
214
+ } = d;
215
+ return /* @__PURE__ */ t.jsxs("div", { className: Z.text, children: [
216
+ (i || e !== void 0) && /* @__PURE__ */ t.jsxs("div", { className: Z.top, children: [
217
+ i && /* @__PURE__ */ t.jsx("h3", { className: Z.title, children: i }),
218
218
  e !== void 0 && o && /* @__PURE__ */ t.jsx(
219
- V,
219
+ H,
220
220
  {
221
221
  current: e,
222
- onChange: ($) => o($)
222
+ onChange: (v) => o(v)
223
223
  }
224
224
  )
225
225
  ] }),
226
- /* @__PURE__ */ t.jsxs("div", { className: K.itemsBlock, children: [
227
- /* @__PURE__ */ t.jsx("h5", { className: K.subtitle, children: m }),
226
+ /* @__PURE__ */ t.jsxs("div", { className: Z.itemsBlock, children: [
227
+ /* @__PURE__ */ t.jsx("h5", { className: Z.subtitle, children: m }),
228
228
  /* @__PURE__ */ t.jsx(
229
- lt,
229
+ dt,
230
230
  {
231
- onChange: ($) => a($),
232
- value: i,
231
+ onChange: (v) => l(v),
232
+ value: c,
233
233
  maxLength: 150
234
234
  }
235
235
  ),
236
236
  /* @__PURE__ */ t.jsx(
237
- _t,
237
+ xt,
238
238
  {
239
239
  typesText: n,
240
240
  setTypesText: s
@@ -242,29 +242,29 @@ const xt = "_accordion_9e4oa_1", ft = "_header_9e4oa_9", bt = "_icon_9e4oa_18",
242
242
  )
243
243
  ] })
244
244
  ] });
245
- }, zt = "_subtitle_cuny2_1", Gt = "_header_cuny2_8", Yt = "_text_cuny2_9", Xt = "_productsBlock_cuny2_10", Qt = "_top_cuny2_22", Wt = "_itemsBlock_cuny2_31", Jt = "_typeTexts_cuny2_37", Kt = "_block_cuny2_44", Zt = "_active_cuny2_57", te = "_products_cuny2_10", ee = "_product_cuny2_10", se = "_button_cuny2_76", ne = "_disabled_cuny2_87", ce = "_image_cuny2_91", ie = "_info_cuny2_98", oe = "_name_cuny2_110", ae = "_buttons_cuny2_114", le = "_modal_cuny2_121", re = "_link_cuny2_141", de = "_modalOptions_cuny2_147", P = {
246
- subtitle: zt,
247
- header: Gt,
248
- text: Yt,
249
- productsBlock: Xt,
250
- top: Qt,
251
- itemsBlock: Wt,
252
- typeTexts: Jt,
253
- block: Kt,
254
- active: Zt,
255
- products: te,
256
- product: ee,
257
- button: se,
258
- disabled: ne,
259
- image: ce,
260
- info: ie,
261
- name: oe,
262
- buttons: ae,
263
- modal: le,
264
- link: re,
265
- modalOptions: de
266
- }, ue = (r) => {
267
- const { activeItem: n, setActiveItem: e, popupPosition: o, modalOptions: i, setIsOpenModal: a } = r;
245
+ }, Xt = "_subtitle_cuny2_1", Yt = "_header_cuny2_8", Qt = "_text_cuny2_9", Jt = "_productsBlock_cuny2_10", Kt = "_top_cuny2_22", Zt = "_itemsBlock_cuny2_31", te = "_typeTexts_cuny2_37", ee = "_block_cuny2_44", se = "_active_cuny2_57", ne = "_products_cuny2_10", ce = "_product_cuny2_10", oe = "_button_cuny2_76", ie = "_disabled_cuny2_87", ae = "_image_cuny2_91", le = "_info_cuny2_98", re = "_name_cuny2_110", de = "_buttons_cuny2_114", ue = "_modal_cuny2_121", _e = "_link_cuny2_141", me = "_modalOptions_cuny2_147", P = {
246
+ subtitle: Xt,
247
+ header: Yt,
248
+ text: Qt,
249
+ productsBlock: Jt,
250
+ top: Kt,
251
+ itemsBlock: Zt,
252
+ typeTexts: te,
253
+ block: ee,
254
+ active: se,
255
+ products: ne,
256
+ product: ce,
257
+ button: oe,
258
+ disabled: ie,
259
+ image: ae,
260
+ info: le,
261
+ name: re,
262
+ buttons: de,
263
+ modal: ue,
264
+ link: _e,
265
+ modalOptions: me
266
+ }, pe = (d) => {
267
+ const { activeItem: n, setActiveItem: e, popupPosition: o, modalOptions: c, setIsOpenModal: l } = d;
268
268
  return /* @__PURE__ */ t.jsxs(
269
269
  "div",
270
270
  {
@@ -280,28 +280,28 @@ const xt = "_accordion_9e4oa_1", ft = "_header_9e4oa_9", bt = "_icon_9e4oa_18",
280
280
  /* @__PURE__ */ t.jsxs("div", { className: P.top, children: [
281
281
  /* @__PURE__ */ t.jsx("h3", { children: n.name }),
282
282
  /* @__PURE__ */ t.jsx(
283
- x,
283
+ p,
284
284
  {
285
285
  name: "X",
286
286
  height: 20,
287
287
  width: 20,
288
288
  hoverable: !0,
289
289
  onClick: () => {
290
- e(null), a(!1);
290
+ e(null), l(!1);
291
291
  }
292
292
  }
293
293
  )
294
294
  ] }),
295
- /* @__PURE__ */ t.jsx("div", { className: P.modalOptions, children: i.map((s) => {
295
+ /* @__PURE__ */ t.jsx("div", { className: P.modalOptions, children: c.map((s) => {
296
296
  if (s.type === "image")
297
297
  return /* @__PURE__ */ t.jsx(
298
298
  it,
299
299
  {
300
300
  label: "Put up an attractive image",
301
- onChange: (c) => {
301
+ onChange: (i) => {
302
302
  const m = {
303
303
  ...n,
304
- [s.field]: c
304
+ [s.field]: i
305
305
  };
306
306
  e(m);
307
307
  }
@@ -310,21 +310,21 @@ const xt = "_accordion_9e4oa_1", ft = "_header_9e4oa_9", bt = "_icon_9e4oa_18",
310
310
  );
311
311
  if (s.type === "text")
312
312
  return /* @__PURE__ */ t.jsx(
313
- Ut,
313
+ Wt,
314
314
  {
315
315
  typesText: n[s.field.type],
316
- setTypesText: (c) => {
316
+ setTypesText: (i) => {
317
317
  const m = {
318
318
  ...n,
319
- [s.field.type]: c
319
+ [s.field.type]: i
320
320
  };
321
321
  e(m);
322
322
  },
323
323
  text: n[s.field.text] || "",
324
- setText: (c) => {
324
+ setText: (i) => {
325
325
  const m = {
326
326
  ...n,
327
- [s.field.text]: c
327
+ [s.field.text]: i
328
328
  };
329
329
  e(m);
330
330
  },
@@ -335,10 +335,10 @@ const xt = "_accordion_9e4oa_1", ft = "_header_9e4oa_9", bt = "_icon_9e4oa_18",
335
335
  return /* @__PURE__ */ t.jsx(
336
336
  G,
337
337
  {
338
- onChange: (c) => {
338
+ onChange: (i) => {
339
339
  const m = {
340
340
  ...n,
341
- [s.field]: c
341
+ [s.field]: i
342
342
  };
343
343
  e(m);
344
344
  },
@@ -352,10 +352,10 @@ const xt = "_accordion_9e4oa_1", ft = "_header_9e4oa_9", bt = "_icon_9e4oa_18",
352
352
  /* @__PURE__ */ t.jsx(
353
353
  G,
354
354
  {
355
- onChange: (c) => {
355
+ onChange: (i) => {
356
356
  const m = {
357
357
  ...n,
358
- [s.field.text]: c
358
+ [s.field.text]: i
359
359
  };
360
360
  e(m);
361
361
  },
@@ -365,14 +365,14 @@ const xt = "_accordion_9e4oa_1", ft = "_header_9e4oa_9", bt = "_icon_9e4oa_18",
365
365
  }
366
366
  ),
367
367
  /* @__PURE__ */ t.jsx(
368
- V,
368
+ H,
369
369
  {
370
370
  current: !!n[s.field.switch] || !1,
371
371
  label: s.switchLabel,
372
- onChange: (c) => {
372
+ onChange: (i) => {
373
373
  const m = {
374
374
  ...n,
375
- [s.field.switch]: c
375
+ [s.field.switch]: i
376
376
  };
377
377
  e(m);
378
378
  }
@@ -381,13 +381,13 @@ const xt = "_accordion_9e4oa_1", ft = "_header_9e4oa_9", bt = "_icon_9e4oa_18",
381
381
  ] });
382
382
  if (s.type === "list")
383
383
  return /* @__PURE__ */ t.jsx(
384
- ge,
384
+ be,
385
385
  {
386
386
  items: n[s.field] || [],
387
- setItems: (c) => {
387
+ setItems: (i) => {
388
388
  const m = {
389
389
  ...n,
390
- [s.field]: c
390
+ [s.field]: i
391
391
  };
392
392
  e(m);
393
393
  },
@@ -401,129 +401,129 @@ const xt = "_accordion_9e4oa_1", ft = "_header_9e4oa_9", bt = "_icon_9e4oa_18",
401
401
  );
402
402
  if (s.type === "select")
403
403
  return /* @__PURE__ */ t.jsx(
404
- Y,
404
+ W,
405
405
  {
406
406
  options: s.itemsOptions,
407
- onChange: (c) => {
407
+ onChange: (i) => {
408
408
  const m = {
409
409
  ...n,
410
- [s.field]: c
410
+ [s.field]: i
411
411
  };
412
412
  e(m);
413
413
  },
414
414
  label: s.label,
415
415
  value: n[s.field] || "String",
416
- leftAddon: s.leftAddon && s.leftAddon === "icon" && /* @__PURE__ */ t.jsx(x, { name: n[s.field] })
416
+ leftAddon: s.leftAddon && s.leftAddon === "icon" && /* @__PURE__ */ t.jsx(p, { name: n[s.field] })
417
417
  }
418
418
  );
419
419
  }) })
420
420
  ]
421
421
  }
422
422
  );
423
- }, me = "_other_g74jx_1", _e = "_subtitle_g74jx_7", he = "_items_g74jx_14", ct = {
424
- other: me,
425
- subtitle: _e,
426
- items: he
427
- }, ht = (r) => {
428
- const { items: n, title: e = "Other" } = r;
429
- return /* @__PURE__ */ t.jsxs("div", { className: ct.other, children: [
430
- /* @__PURE__ */ t.jsx("h5", { className: ct.subtitle, children: e }),
431
- /* @__PURE__ */ t.jsx("div", { className: ct.items, children: n.map((o, i) => /* @__PURE__ */ t.jsx(
432
- V,
423
+ }, he = "_other_g74jx_1", ge = "_subtitle_g74jx_7", xe = "_items_g74jx_14", ot = {
424
+ other: he,
425
+ subtitle: ge,
426
+ items: xe
427
+ }, ft = (d) => {
428
+ const { items: n, title: e = "Other" } = d;
429
+ return /* @__PURE__ */ t.jsxs("div", { className: ot.other, children: [
430
+ /* @__PURE__ */ t.jsx("h5", { className: ot.subtitle, children: e }),
431
+ /* @__PURE__ */ t.jsx("div", { className: ot.items, children: n.map((o, c) => /* @__PURE__ */ t.jsx(
432
+ H,
433
433
  {
434
434
  current: o.isItem,
435
- onChange: (a) => o.setIsItem(a),
435
+ onChange: (l) => o.setIsItem(l),
436
436
  label: o.label,
437
437
  hasBackground: !0,
438
438
  paddingless: !1
439
439
  },
440
- i
440
+ c
441
441
  )) })
442
442
  ] });
443
- }, pe = (r) => {
444
- const { index: n, moveProduct: e, children: o } = r, [, i] = ut({
443
+ }, fe = (d) => {
444
+ const { index: n, moveProduct: e, children: o } = d, [, c] = mt({
445
445
  accept: "product",
446
- hover(c) {
447
- c.index !== n && (e(c.index, n), c.index = n);
446
+ hover(i) {
447
+ i.index !== n && (e(i.index, n), i.index = n);
448
448
  }
449
- }), [{ isDragging: a }, s] = mt({
449
+ }), [{ isDragging: l }, s] = pt({
450
450
  type: "product",
451
451
  item: { index: n },
452
- collect: (c) => ({
453
- isDragging: c.isDragging()
452
+ collect: (i) => ({
453
+ isDragging: i.isDragging()
454
454
  })
455
455
  });
456
456
  return /* @__PURE__ */ t.jsx(
457
457
  "div",
458
458
  {
459
- ref: (c) => s(i(c)),
460
- className: `${P.product} ${a ? P.dragging : ""}`,
459
+ ref: (i) => s(c(i)),
460
+ className: `${P.product} ${l ? P.dragging : ""}`,
461
461
  children: o
462
462
  }
463
463
  );
464
- }, ge = (r) => {
464
+ }, be = (d) => {
465
465
  const {
466
466
  isActiveItems: n,
467
467
  setIsActiveItems: e,
468
468
  items: o,
469
- setItems: i,
470
- other: a,
469
+ setItems: c,
470
+ other: l,
471
471
  title: s,
472
- subtitle: c,
472
+ subtitle: i,
473
473
  editable: m = !0,
474
- draggable: $ = !1,
475
- withImage: p = !1,
476
- deletable: k = !0,
477
- addable: j = !0,
478
- itemsType: d,
479
- itemsPlaceholder: _ = "",
480
- itemsOptions: l,
474
+ draggable: v = !1,
475
+ withImage: u = !1,
476
+ deletable: a = !0,
477
+ addable: h = !0,
478
+ itemsType: $,
479
+ itemsPlaceholder: b = "",
480
+ itemsOptions: r,
481
481
  hasRangeSelector: B = !1,
482
- rangeSelectorOptions: q,
482
+ rangeSelectorOptions: Y,
483
483
  modalOptions: Q,
484
- addableOptions: F = {},
484
+ addableOptions: V = {},
485
485
  limit: y
486
- } = r, [L, R] = f.useState(null), [st, et] = f.useState({
486
+ } = d, [E, M] = f.useState(null), [nt, st] = f.useState({
487
487
  top: 0,
488
488
  left: 0
489
- }), [h, v] = f.useState(!1), A = (u, w) => {
490
- const S = [...o], [N] = S.splice(u, 1);
491
- S.splice(w, 0, N), i(S);
489
+ }), [g, k] = f.useState(!1), S = (_, T) => {
490
+ const q = [...o], [N] = q.splice(_, 1);
491
+ q.splice(T, 0, N), c(q);
492
492
  };
493
493
  f.useEffect(() => {
494
- const u = () => {
495
- R(null), v(!1);
494
+ const _ = () => {
495
+ M(null), k(!1);
496
496
  };
497
- return document.body.addEventListener("click", u), R(null), v(!1), () => {
498
- R(null), v(!1), document.body.removeEventListener("click", u);
497
+ return document.body.addEventListener("click", _), M(null), k(!1), () => {
498
+ M(null), k(!1), document.body.removeEventListener("click", _);
499
499
  };
500
500
  }, []), f.useEffect(() => {
501
- if (L) {
502
- const u = [...o].map((w) => w.id === L.id ? L : w);
503
- i(u);
501
+ if (E) {
502
+ const _ = [...o].map((T) => T.id === E.id ? E : T);
503
+ c(_);
504
504
  }
505
- }, [L]);
506
- const C = (u, w) => {
507
- u.stopPropagation(), v(!0);
508
- const S = u.target.getBoundingClientRect(), N = 500, W = window.innerHeight;
509
- let E = S.top + window.scrollY;
510
- E + N > W && (E = W - N - 20), et({
511
- top: E - 80,
512
- left: S.left - 30
513
- }), R(w);
505
+ }, [E]);
506
+ const C = (_, T) => {
507
+ _.stopPropagation(), k(!0);
508
+ const q = _.target.getBoundingClientRect(), N = 500, J = window.innerHeight;
509
+ let z = q.top + window.scrollY;
510
+ z + N > J && (z = J - N - 20), st({
511
+ top: z - 80,
512
+ left: q.left - 30
513
+ }), M(T);
514
514
  };
515
- function U(u) {
516
- if (p)
517
- return u ? /* @__PURE__ */ t.jsx(
515
+ function F(_) {
516
+ if (u)
517
+ return _ ? /* @__PURE__ */ t.jsx(
518
518
  "img",
519
519
  {
520
- src: `https://imagedelivery.net/${u[0]}/w=1000`,
520
+ src: `https://imagedelivery.net/${_[0]}/w=1000`,
521
521
  alt: "image",
522
522
  width: 16,
523
523
  height: 16
524
524
  }
525
525
  ) : /* @__PURE__ */ t.jsx(
526
- x,
526
+ p,
527
527
  {
528
528
  name: "Image",
529
529
  width: 16,
@@ -532,10 +532,10 @@ const xt = "_accordion_9e4oa_1", ft = "_header_9e4oa_9", bt = "_icon_9e4oa_18",
532
532
  }
533
533
  );
534
534
  }
535
- const O = (u, w) => {
536
- const S = /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
537
- $ && /* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
538
- x,
535
+ const A = (_, T) => {
536
+ const q = /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
537
+ v && /* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
538
+ p,
539
539
  {
540
540
  name: "DotsSixVertical",
541
541
  hoverable: !0,
@@ -543,145 +543,145 @@ const xt = "_accordion_9e4oa_1", ft = "_header_9e4oa_9", bt = "_icon_9e4oa_18",
543
543
  height: 20
544
544
  }
545
545
  ) }),
546
- d === "select" && /* @__PURE__ */ t.jsx(
547
- Y,
546
+ $ === "select" && /* @__PURE__ */ t.jsx(
547
+ W,
548
548
  {
549
549
  onChange: (N) => {
550
- const E = [...o].map((H) => H.id === u.id ? {
551
- ...u,
550
+ const z = [...o].map((R) => R.id === _.id ? {
551
+ ..._,
552
552
  name: N
553
- } : H);
554
- R({
555
- ...u,
553
+ } : R);
554
+ M({
555
+ ..._,
556
556
  name: N
557
- }), i([...E]);
557
+ }), c([...z]);
558
558
  },
559
- value: u.name,
560
- options: l,
561
- leftAddon: U(u.images)
559
+ value: _.name,
560
+ options: r,
561
+ leftAddon: F(_.images)
562
562
  }
563
563
  ),
564
- d === "input" && /* @__PURE__ */ t.jsx(
564
+ $ === "input" && /* @__PURE__ */ t.jsx(
565
565
  G,
566
566
  {
567
567
  onChange: (N) => {
568
- const E = [...o].map((H) => H.id === u.id ? {
569
- ...u,
568
+ const z = [...o].map((R) => R.id === _.id ? {
569
+ ..._,
570
570
  name: N
571
- } : H);
572
- i([...E]);
571
+ } : R);
572
+ c([...z]);
573
573
  },
574
- value: u.name,
575
- placeholder: _
574
+ value: _.name,
575
+ placeholder: b
576
576
  }
577
577
  ),
578
- d === "image" && /* @__PURE__ */ t.jsx(
578
+ $ === "image" && /* @__PURE__ */ t.jsx(
579
579
  it,
580
580
  {
581
581
  onChange: (N) => {
582
- const E = [...o].map((H) => H.id === u.id ? {
583
- ...u,
582
+ const z = [...o].map((R) => R.id === _.id ? {
583
+ ..._,
584
584
  images: N
585
- } : H);
586
- i([...E]);
585
+ } : R);
586
+ c([...z]);
587
587
  }
588
588
  }
589
589
  ),
590
590
  /* @__PURE__ */ t.jsxs("div", { className: P.buttons, children: [
591
591
  m && /* @__PURE__ */ t.jsx(
592
- x,
592
+ p,
593
593
  {
594
594
  name: "Sliders",
595
595
  hoverable: !0,
596
596
  width: 20,
597
597
  height: 20,
598
- onClick: (N) => C(N, u)
598
+ onClick: (N) => C(N, _)
599
599
  }
600
600
  ),
601
- k && /* @__PURE__ */ t.jsx(
602
- x,
601
+ a && /* @__PURE__ */ t.jsx(
602
+ p,
603
603
  {
604
604
  name: "Trash",
605
605
  hoverable: !0,
606
606
  width: 20,
607
607
  height: 20,
608
608
  fill: "#C12A2A",
609
- onClick: () => i(o.filter((N) => N.id !== u.id))
609
+ onClick: () => c(o.filter((N) => N.id !== _.id))
610
610
  }
611
611
  )
612
612
  ] })
613
613
  ] });
614
- return $ ? /* @__PURE__ */ t.jsx(
615
- pe,
614
+ return v ? /* @__PURE__ */ t.jsx(
615
+ fe,
616
616
  {
617
- product: u,
618
- index: w,
619
- moveProduct: A,
620
- children: S
617
+ product: _,
618
+ index: T,
619
+ moveProduct: S,
620
+ children: q
621
621
  },
622
- u.id
622
+ _.id
623
623
  ) : /* @__PURE__ */ t.jsx(
624
624
  "div",
625
625
  {
626
626
  className: P.product,
627
- children: S
627
+ children: q
628
628
  },
629
- u.id
629
+ _.id
630
630
  );
631
631
  };
632
632
  return /* @__PURE__ */ t.jsxs("div", { className: P.productsBlock, children: [
633
633
  (s || n !== void 0) && /* @__PURE__ */ t.jsxs("div", { className: P.top, children: [
634
634
  s && /* @__PURE__ */ t.jsx("h3", { className: P.title, children: s }),
635
635
  n !== void 0 && /* @__PURE__ */ t.jsx(
636
- V,
636
+ H,
637
637
  {
638
638
  current: n,
639
- onChange: (u) => e == null ? void 0 : e(u)
639
+ onChange: (_) => e == null ? void 0 : e(_)
640
640
  }
641
641
  )
642
642
  ] }),
643
- L && m && Q && h && /* @__PURE__ */ t.jsx(
644
- ue,
643
+ E && m && Q && g && /* @__PURE__ */ t.jsx(
644
+ pe,
645
645
  {
646
- activeItem: L,
647
- setActiveItem: R,
648
- popupPosition: st,
646
+ activeItem: E,
647
+ setActiveItem: M,
648
+ popupPosition: nt,
649
649
  modalOptions: Q,
650
- setIsOpenModal: v
650
+ setIsOpenModal: k
651
651
  }
652
652
  ),
653
- B && q && /* @__PURE__ */ t.jsx(bs, { ...q }),
653
+ B && Y && /* @__PURE__ */ t.jsx(ks, { ...Y }),
654
654
  /* @__PURE__ */ t.jsxs("div", { className: P.products, children: [
655
- c && /* @__PURE__ */ t.jsx("h5", { className: P.subtitle, children: c }),
656
- $ ? /* @__PURE__ */ t.jsx(rt, { backend: dt, children: o.map((u, w) => O(u, w)) }) : o.map((u, w) => O(u, w)),
657
- j && /* @__PURE__ */ t.jsxs(
655
+ i && /* @__PURE__ */ t.jsx("h5", { className: P.subtitle, children: i }),
656
+ v ? /* @__PURE__ */ t.jsx(ut, { backend: _t, children: o.map((_, T) => A(_, T)) }) : o.map((_, T) => A(_, T)),
657
+ h && /* @__PURE__ */ t.jsxs(
658
658
  X,
659
659
  {
660
- className: M(P.button, {
660
+ className: D(P.button, {
661
661
  [P.disabled]: !!(y && y <= o.length)
662
662
  }),
663
663
  size: "s",
664
664
  disabled: !!(y && y <= o.length),
665
665
  onClick: () => {
666
- const u = [...o];
667
- d === "select" ? u.push({
668
- name: l[0] || `Product ${o.length + 1}`,
669
- id: tt(),
670
- ...F
671
- }) : d === "input" ? u.push({
666
+ const _ = [...o];
667
+ $ === "select" ? _.push({
668
+ name: r[0] || `Product ${o.length + 1}`,
669
+ id: et(),
670
+ ...V
671
+ }) : $ === "input" ? _.push({
672
672
  name: "",
673
- id: tt(),
674
- ...F
675
- }) : u.push({
673
+ id: et(),
674
+ ...V
675
+ }) : _.push({
676
676
  name: `Image ${o.length + 1}`,
677
- id: tt(),
678
- ...F
679
- }), i(u);
677
+ id: et(),
678
+ ...V
679
+ }), c(_);
680
680
  },
681
681
  children: [
682
682
  /* @__PURE__ */ t.jsx("span", { children: "Add Option" }),
683
683
  /* @__PURE__ */ t.jsx(
684
- x,
684
+ p,
685
685
  {
686
686
  name: "Plus",
687
687
  width: 16,
@@ -692,57 +692,57 @@ const xt = "_accordion_9e4oa_1", ft = "_header_9e4oa_9", bt = "_icon_9e4oa_18",
692
692
  }
693
693
  )
694
694
  ] }),
695
- a !== void 0 && /* @__PURE__ */ t.jsx(ht, { items: a })
695
+ l !== void 0 && /* @__PURE__ */ t.jsx(ft, { items: l })
696
696
  ] });
697
- }, xe = "_subtitle_1fb9q_1", fe = "_header_1fb9q_8", be = "_text_1fb9q_9", je = "_productsBlock_1fb9q_10", ve = "_buttonsBlock_1fb9q_11", ke = "_top_1fb9q_22", ye = "_itemsBlock_1fb9q_31", $e = "_typeTexts_1fb9q_37", Ne = "_block_1fb9q_44", Ce = "_active_1fb9q_56", Ie = "_products_1fb9q_10", Pe = "_product_1fb9q_10", Be = "_button_1fb9q_11", we = "_image_1fb9q_86", Te = "_info_1fb9q_93", qe = "_name_1fb9q_105", Ae = "_buttons_1fb9q_11", Se = "_modal_1fb9q_116", Oe = "_other_1fb9q_135", De = "_options_1fb9q_141", z = {
698
- subtitle: xe,
699
- header: fe,
700
- text: be,
701
- productsBlock: je,
702
- buttonsBlock: ve,
703
- top: ke,
704
- itemsBlock: ye,
705
- typeTexts: $e,
706
- block: Ne,
707
- active: Ce,
708
- products: Ie,
709
- product: Pe,
710
- button: Be,
711
- image: we,
712
- info: Te,
713
- name: qe,
714
- buttons: Ae,
715
- modal: Se,
716
- other: Oe,
717
- options: De
718
- }, Ee = (r) => {
719
- const { activeButton: n, setActiveButton: e, popupPosition: o } = r, [i, a] = f.useState(n.typesText), [s, c] = f.useState(n.destination), [m, $] = f.useState(n.link || ""), [p, k] = f.useState(n.text || "");
697
+ }, je = "_subtitle_1fb9q_1", ve = "_header_1fb9q_8", ke = "_text_1fb9q_9", ye = "_productsBlock_1fb9q_10", Ne = "_buttonsBlock_1fb9q_11", $e = "_top_1fb9q_22", Ce = "_itemsBlock_1fb9q_31", Ie = "_typeTexts_1fb9q_37", Pe = "_block_1fb9q_44", Te = "_active_1fb9q_56", we = "_products_1fb9q_10", Be = "_product_1fb9q_10", Se = "_button_1fb9q_11", qe = "_image_1fb9q_86", Ae = "_info_1fb9q_93", Oe = "_name_1fb9q_105", Le = "_buttons_1fb9q_11", De = "_modal_1fb9q_116", ze = "_other_1fb9q_135", Ee = "_options_1fb9q_141", U = {
698
+ subtitle: je,
699
+ header: ve,
700
+ text: ke,
701
+ productsBlock: ye,
702
+ buttonsBlock: Ne,
703
+ top: $e,
704
+ itemsBlock: Ce,
705
+ typeTexts: Ie,
706
+ block: Pe,
707
+ active: Te,
708
+ products: we,
709
+ product: Be,
710
+ button: Se,
711
+ image: qe,
712
+ info: Ae,
713
+ name: Oe,
714
+ buttons: Le,
715
+ modal: De,
716
+ other: ze,
717
+ options: Ee
718
+ }, Me = (d) => {
719
+ const { activeButton: n, setActiveButton: e, popupPosition: o } = d, [c, l] = f.useState(n.typesText), [s, i] = f.useState(n.destination), [m, v] = f.useState(n.link || ""), [u, a] = f.useState(n.text || "");
720
720
  return f.useEffect(() => {
721
721
  e({
722
722
  ...n,
723
723
  ...{
724
- text: p,
724
+ text: u,
725
725
  link: m,
726
726
  destination: s,
727
- typesText: i
727
+ typesText: c
728
728
  }
729
729
  });
730
- }, [i, s, m, p]), /* @__PURE__ */ t.jsxs(
730
+ }, [c, s, m, u]), /* @__PURE__ */ t.jsxs(
731
731
  "div",
732
732
  {
733
- className: z.modal,
734
- onClick: (j) => {
735
- j.stopPropagation();
733
+ className: U.modal,
734
+ onClick: (h) => {
735
+ h.stopPropagation();
736
736
  },
737
737
  style: {
738
738
  top: `${o.top}px`,
739
739
  left: `${o.left}px`
740
740
  },
741
741
  children: [
742
- /* @__PURE__ */ t.jsxs("div", { className: z.top, children: [
742
+ /* @__PURE__ */ t.jsxs("div", { className: U.top, children: [
743
743
  /* @__PURE__ */ t.jsx("h3", { children: n.type }),
744
744
  /* @__PURE__ */ t.jsx(
745
- x,
745
+ p,
746
746
  {
747
747
  name: "X",
748
748
  height: 20,
@@ -752,18 +752,18 @@ const xt = "_accordion_9e4oa_1", ft = "_header_9e4oa_9", bt = "_icon_9e4oa_18",
752
752
  }
753
753
  )
754
754
  ] }),
755
- /* @__PURE__ */ t.jsxs("div", { className: z.options, children: [
755
+ /* @__PURE__ */ t.jsxs("div", { className: U.options, children: [
756
756
  /* @__PURE__ */ t.jsx(
757
- Y,
757
+ W,
758
758
  {
759
759
  label: "Destination",
760
- onChange: (j) => c(j),
760
+ onChange: (h) => i(h),
761
761
  options: ["Go to Page", "Open Link"],
762
762
  value: s
763
763
  }
764
764
  ),
765
765
  s === "Go to Page" ? /* @__PURE__ */ t.jsx(
766
- Y,
766
+ W,
767
767
  {
768
768
  label: "Go to",
769
769
  onChange: () => {
@@ -774,129 +774,129 @@ const xt = "_accordion_9e4oa_1", ft = "_header_9e4oa_9", bt = "_icon_9e4oa_18",
774
774
  ) : /* @__PURE__ */ t.jsx(
775
775
  G,
776
776
  {
777
- onChange: (j) => $(j),
777
+ onChange: (h) => v(h),
778
778
  value: m,
779
779
  placeholder: "https://",
780
780
  label: "Link"
781
781
  }
782
782
  ),
783
783
  /* @__PURE__ */ t.jsx(
784
- V,
784
+ H,
785
785
  {
786
786
  current: !1,
787
787
  label: "Open in new tab"
788
788
  }
789
789
  ),
790
790
  /* @__PURE__ */ t.jsx(
791
- lt,
791
+ dt,
792
792
  {
793
- onChange: (j) => k(j),
794
- value: p,
793
+ onChange: (h) => a(h),
794
+ value: u,
795
795
  label: "Text",
796
796
  maxLength: 150
797
797
  }
798
798
  ),
799
799
  /* @__PURE__ */ t.jsx(
800
- _t,
800
+ xt,
801
801
  {
802
- typesText: i,
803
- setTypesText: a
802
+ typesText: c,
803
+ setTypesText: l
804
804
  }
805
805
  )
806
806
  ] })
807
807
  ]
808
808
  }
809
809
  );
810
- }, Me = "_subtitle_m8qel_1", Le = "_header_m8qel_8", Re = "_text_m8qel_9", He = "_productsBlock_m8qel_10", Ve = "_buttonsBlock_m8qel_11", Fe = "_top_m8qel_23", Ue = "_itemsBlock_m8qel_32", ze = "_typeTexts_m8qel_38", Ge = "_block_m8qel_45", Ye = "_active_m8qel_58", Xe = "_products_m8qel_10", Qe = "_product_m8qel_10", We = "_button_m8qel_11", Je = "_image_m8qel_88", Ke = "_info_m8qel_95", Ze = "_name_m8qel_107", ts = "_buttons_m8qel_11", es = "_modal_m8qel_118", ss = "_other_m8qel_137", ns = "_options_m8qel_143", Z = {
811
- subtitle: Me,
812
- header: Le,
813
- text: Re,
814
- productsBlock: He,
815
- buttonsBlock: Ve,
816
- top: Fe,
817
- itemsBlock: Ue,
818
- typeTexts: ze,
819
- block: Ge,
820
- active: Ye,
821
- products: Xe,
822
- product: Qe,
823
- button: We,
824
- image: Je,
825
- info: Ke,
826
- name: Ze,
827
- buttons: ts,
828
- modal: es,
829
- other: ss,
830
- options: ns
831
- }, cs = (r) => {
832
- const { buttons: n, setButtons: e, deletable: o = !0, addable: i = !0 } = r, [a, s] = f.useState(null), [c, m] = f.useState({
810
+ }, Re = "_subtitle_m8qel_1", He = "_header_m8qel_8", Ve = "_text_m8qel_9", Fe = "_productsBlock_m8qel_10", Ue = "_buttonsBlock_m8qel_11", Ge = "_top_m8qel_23", We = "_itemsBlock_m8qel_32", Xe = "_typeTexts_m8qel_38", Ye = "_block_m8qel_45", Qe = "_active_m8qel_58", Je = "_products_m8qel_10", Ke = "_product_m8qel_10", Ze = "_button_m8qel_11", ts = "_image_m8qel_88", es = "_info_m8qel_95", ss = "_name_m8qel_107", ns = "_buttons_m8qel_11", cs = "_modal_m8qel_118", os = "_other_m8qel_137", is = "_options_m8qel_143", tt = {
811
+ subtitle: Re,
812
+ header: He,
813
+ text: Ve,
814
+ productsBlock: Fe,
815
+ buttonsBlock: Ue,
816
+ top: Ge,
817
+ itemsBlock: We,
818
+ typeTexts: Xe,
819
+ block: Ye,
820
+ active: Qe,
821
+ products: Je,
822
+ product: Ke,
823
+ button: Ze,
824
+ image: ts,
825
+ info: es,
826
+ name: ss,
827
+ buttons: ns,
828
+ modal: cs,
829
+ other: os,
830
+ options: is
831
+ }, as = (d) => {
832
+ const { buttons: n, setButtons: e, deletable: o = !0, addable: c = !0 } = d, [l, s] = f.useState(null), [i, m] = f.useState({
833
833
  top: 0,
834
834
  left: 0
835
835
  });
836
836
  f.useEffect(() => {
837
- const p = () => {
837
+ const u = () => {
838
838
  s(null);
839
839
  };
840
- return document.body.addEventListener("click", p), s(null), () => {
841
- s(null), document.body.removeEventListener("click", p);
840
+ return document.body.addEventListener("click", u), s(null), () => {
841
+ s(null), document.body.removeEventListener("click", u);
842
842
  };
843
843
  }, []), f.useEffect(() => {
844
- if (a) {
845
- const p = [...n].map((k) => k.id === a.id ? a : k);
846
- e(p);
844
+ if (l) {
845
+ const u = [...n].map((a) => a.id === l.id ? l : a);
846
+ e(u);
847
847
  }
848
- }, [a]);
849
- const $ = (p, k) => {
850
- p.stopPropagation();
851
- const j = p.target.getBoundingClientRect(), d = 490, _ = window.innerHeight;
852
- let l = j.top + window.scrollY;
853
- l + d > _ && (l = _ - d - 20), m({
854
- top: l,
855
- left: j.left - 30
856
- }), s(k);
848
+ }, [l]);
849
+ const v = (u, a) => {
850
+ u.stopPropagation();
851
+ const h = u.target.getBoundingClientRect(), $ = 490, b = window.innerHeight;
852
+ let r = h.top + window.scrollY;
853
+ r + $ > b && (r = b - $ - 20), m({
854
+ top: r,
855
+ left: h.left - 30
856
+ }), s(a);
857
857
  };
858
- return /* @__PURE__ */ t.jsxs("div", { className: Z.products, children: [
859
- /* @__PURE__ */ t.jsx("h5", { className: Z.subtitle, children: "Button Type" }),
860
- n.map((p) => /* @__PURE__ */ t.jsxs(
858
+ return /* @__PURE__ */ t.jsxs("div", { className: tt.products, children: [
859
+ /* @__PURE__ */ t.jsx("h5", { className: tt.subtitle, children: "Button Type" }),
860
+ n.map((u) => /* @__PURE__ */ t.jsxs(
861
861
  "div",
862
862
  {
863
- className: Z.product,
863
+ className: tt.product,
864
864
  children: [
865
865
  /* @__PURE__ */ t.jsx(
866
- Y,
866
+ W,
867
867
  {
868
- onChange: (k) => {
869
- const d = [...n].map((_) => _.id === p.id ? {
870
- ...p,
871
- type: k
872
- } : _);
873
- e(d);
868
+ onChange: (a) => {
869
+ const $ = [...n].map((b) => b.id === u.id ? {
870
+ ...u,
871
+ type: a
872
+ } : b);
873
+ e($);
874
874
  },
875
- value: p.type,
875
+ value: u.type,
876
876
  options: ["Primary", "Secondary", "Tertiary"]
877
877
  }
878
878
  ),
879
- /* @__PURE__ */ t.jsxs("div", { className: Z.buttons, children: [
879
+ /* @__PURE__ */ t.jsxs("div", { className: tt.buttons, children: [
880
880
  /* @__PURE__ */ t.jsx(
881
- x,
881
+ p,
882
882
  {
883
883
  name: "Sliders",
884
884
  hoverable: !0,
885
885
  width: 20,
886
886
  height: 20,
887
- onClick: (k) => {
888
- $(k, p);
887
+ onClick: (a) => {
888
+ v(a, u);
889
889
  }
890
890
  }
891
891
  ),
892
892
  o && /* @__PURE__ */ t.jsx(
893
- x,
893
+ p,
894
894
  {
895
895
  name: "Trash",
896
896
  hoverable: !0,
897
897
  onClick: () => {
898
- const k = n.filter((j) => j.id !== p.id);
899
- e(k);
898
+ const a = n.filter((h) => h.id !== u.id);
899
+ e(a);
900
900
  },
901
901
  width: 20,
902
902
  height: 20,
@@ -906,35 +906,35 @@ const xt = "_accordion_9e4oa_1", ft = "_header_9e4oa_9", bt = "_icon_9e4oa_18",
906
906
  ] })
907
907
  ]
908
908
  },
909
- p.id
909
+ u.id
910
910
  )),
911
- a && /* @__PURE__ */ t.jsx(
912
- Ee,
911
+ l && /* @__PURE__ */ t.jsx(
912
+ Me,
913
913
  {
914
- activeButton: a,
914
+ activeButton: l,
915
915
  setActiveButton: s,
916
- popupPosition: c
916
+ popupPosition: i
917
917
  }
918
918
  ),
919
- i && /* @__PURE__ */ t.jsxs(
919
+ c && /* @__PURE__ */ t.jsxs(
920
920
  X,
921
921
  {
922
- className: Z.button,
922
+ className: tt.button,
923
923
  size: "s",
924
924
  onClick: () => {
925
- const p = [...n];
926
- p.push({
925
+ const u = [...n];
926
+ u.push({
927
927
  type: "Primary",
928
- id: tt(),
928
+ id: et(),
929
929
  typesText: [],
930
930
  destination: "Go to Page",
931
- text: ""
932
- }), e(p);
931
+ text: "Button Name"
932
+ }), e(u);
933
933
  },
934
934
  children: [
935
935
  /* @__PURE__ */ t.jsx("span", { children: "Add Option" }),
936
936
  /* @__PURE__ */ t.jsx(
937
- x,
937
+ p,
938
938
  {
939
939
  name: "Plus",
940
940
  width: 16,
@@ -945,50 +945,50 @@ const xt = "_accordion_9e4oa_1", ft = "_header_9e4oa_9", bt = "_icon_9e4oa_18",
945
945
  }
946
946
  )
947
947
  ] });
948
- }, Vn = (r) => {
949
- const { isActiveButtons: n, setIsActiveButtons: e, buttons: o, setButtons: i } = r;
950
- return /* @__PURE__ */ t.jsx(t.Fragment, { children: /* @__PURE__ */ t.jsxs("div", { className: z.buttonsBlock, children: [
951
- /* @__PURE__ */ t.jsxs("div", { className: z.top, children: [
952
- /* @__PURE__ */ t.jsx("h3", { className: z.title, children: "Buttons" }),
948
+ }, nc = (d) => {
949
+ const { isActiveButtons: n, setIsActiveButtons: e, buttons: o, setButtons: c } = d;
950
+ return /* @__PURE__ */ t.jsx(t.Fragment, { children: /* @__PURE__ */ t.jsxs("div", { className: U.buttonsBlock, children: [
951
+ /* @__PURE__ */ t.jsxs("div", { className: U.top, children: [
952
+ /* @__PURE__ */ t.jsx("h3", { className: U.title, children: "Buttons" }),
953
953
  /* @__PURE__ */ t.jsx(
954
- V,
954
+ H,
955
955
  {
956
956
  current: n,
957
- onChange: (a) => e(a)
957
+ onChange: (l) => e(l)
958
958
  }
959
959
  )
960
960
  ] }),
961
961
  /* @__PURE__ */ t.jsx(
962
- cs,
962
+ as,
963
963
  {
964
964
  buttons: o,
965
- setButtons: i
965
+ setButtons: c
966
966
  }
967
967
  )
968
968
  ] }) });
969
- }, is = "_wrapper_m18qi_1", os = "_subtitle_m18qi_7", as = "_content_m18qi_14", ls = "_range_m18qi_22", rs = "_track_m18qi_27", ds = "_progress_m18qi_36", us = "_dots_m18qi_46", ms = "_dot_m18qi_46", _s = "_active_m18qi_65", hs = "_input_m18qi_77", ps = "_countBlock_m18qi_91", gs = "_count_m18qi_91", xs = "_controls_m18qi_107", fs = "_button_m18qi_113", I = {
970
- wrapper: is,
971
- subtitle: os,
972
- content: as,
973
- range: ls,
974
- track: rs,
975
- progress: ds,
976
- dots: us,
977
- dot: ms,
978
- active: _s,
979
- input: hs,
980
- countBlock: ps,
981
- count: gs,
982
- controls: xs,
983
- button: fs
984
- }, bs = (r) => {
985
- const { label: n, min: e = 1, max: o = 4, step: i = 1, count: a, setCount: s } = r, [c, m] = f.useState(!1), $ = Array.from({ length: (o - e) / i + 1 }), p = (a - e) / (o - e) * 100, k = () => {
986
- a < o && s(a + i);
987
- }, j = () => {
988
- a > e && s(a - i);
989
- }, d = (_) => {
990
- const l = e + _ * i;
991
- s(l);
969
+ }, ls = "_wrapper_m18qi_1", rs = "_subtitle_m18qi_7", ds = "_content_m18qi_14", us = "_range_m18qi_22", _s = "_track_m18qi_27", ms = "_progress_m18qi_36", ps = "_dots_m18qi_46", hs = "_dot_m18qi_46", gs = "_active_m18qi_65", xs = "_input_m18qi_77", fs = "_countBlock_m18qi_91", bs = "_count_m18qi_91", js = "_controls_m18qi_107", vs = "_button_m18qi_113", I = {
970
+ wrapper: ls,
971
+ subtitle: rs,
972
+ content: ds,
973
+ range: us,
974
+ track: _s,
975
+ progress: ms,
976
+ dots: ps,
977
+ dot: hs,
978
+ active: gs,
979
+ input: xs,
980
+ countBlock: fs,
981
+ count: bs,
982
+ controls: js,
983
+ button: vs
984
+ }, ks = (d) => {
985
+ const { label: n, min: e = 1, max: o = 4, step: c = 1, count: l, setCount: s } = d, [i, m] = f.useState(!1), v = Array.from({ length: (o - e) / c + 1 }), u = (l - e) / (o - e) * 100, a = () => {
986
+ l < o && s(l + c);
987
+ }, h = () => {
988
+ l > e && s(l - c);
989
+ }, $ = (b) => {
990
+ const r = e + b * c;
991
+ s(r);
992
992
  };
993
993
  return /* @__PURE__ */ t.jsxs("div", { className: I.wrapper, children: [
994
994
  n && /* @__PURE__ */ t.jsx("h5", { className: I.subtitle, children: n }),
@@ -999,23 +999,23 @@ const xt = "_accordion_9e4oa_1", ft = "_header_9e4oa_9", bt = "_icon_9e4oa_18",
999
999
  "div",
1000
1000
  {
1001
1001
  className: I.progress,
1002
- style: { width: `${p}%` }
1002
+ style: { width: `${u}%` }
1003
1003
  }
1004
1004
  ),
1005
- /* @__PURE__ */ t.jsx("div", { className: I.dots, children: $.map((_, l) => {
1006
- const B = l <= (a - e) / i;
1005
+ /* @__PURE__ */ t.jsx("div", { className: I.dots, children: v.map((b, r) => {
1006
+ const B = r <= (l - e) / c;
1007
1007
  return /* @__PURE__ */ t.jsx(
1008
1008
  "button",
1009
1009
  {
1010
- onClick: () => d(l),
1011
- className: M(I.dot, {
1010
+ onClick: () => $(r),
1011
+ className: D(I.dot, {
1012
1012
  [I.active]: B,
1013
1013
  [I.inactive]: !B,
1014
- [I.dragging]: c
1014
+ [I.dragging]: i
1015
1015
  }),
1016
- "aria-label": `Set value to ${e + l * i}`
1016
+ "aria-label": `Set value to ${e + r * c}`
1017
1017
  },
1018
- l
1018
+ r
1019
1019
  );
1020
1020
  }) }),
1021
1021
  /* @__PURE__ */ t.jsx(
@@ -1024,9 +1024,9 @@ const xt = "_accordion_9e4oa_1", ft = "_header_9e4oa_9", bt = "_icon_9e4oa_18",
1024
1024
  type: "range",
1025
1025
  min: e,
1026
1026
  max: o,
1027
- step: i,
1028
- value: a,
1029
- onChange: (_) => s(Number(_.target.value)),
1027
+ step: c,
1028
+ value: l,
1029
+ onChange: (b) => s(Number(b.target.value)),
1030
1030
  onMouseDown: () => m(!0),
1031
1031
  onMouseUp: () => m(!1),
1032
1032
  onTouchStart: () => m(!0),
@@ -1043,23 +1043,23 @@ const xt = "_accordion_9e4oa_1", ft = "_header_9e4oa_9", bt = "_icon_9e4oa_18",
1043
1043
  min: e,
1044
1044
  max: o,
1045
1045
  paddingless: !0,
1046
- onChange: (_) => {
1047
- const l = Number(_);
1048
- l > o ? s(o) : l < e ? s(e) : s(l);
1046
+ onChange: (b) => {
1047
+ const r = Number(b);
1048
+ r > o ? s(o) : r < e ? s(e) : s(r);
1049
1049
  },
1050
- value: String(a)
1050
+ value: String(l)
1051
1051
  }
1052
1052
  ),
1053
1053
  /* @__PURE__ */ t.jsxs("div", { className: I.controls, children: [
1054
1054
  /* @__PURE__ */ t.jsx(
1055
1055
  "button",
1056
1056
  {
1057
- onClick: k,
1058
- disabled: a >= o,
1057
+ onClick: a,
1058
+ disabled: l >= o,
1059
1059
  className: I.button,
1060
1060
  "aria-label": "Increment count",
1061
1061
  children: /* @__PURE__ */ t.jsx(
1062
- x,
1062
+ p,
1063
1063
  {
1064
1064
  name: "CaretUp",
1065
1065
  width: 15,
@@ -1071,12 +1071,12 @@ const xt = "_accordion_9e4oa_1", ft = "_header_9e4oa_9", bt = "_icon_9e4oa_18",
1071
1071
  /* @__PURE__ */ t.jsx(
1072
1072
  "button",
1073
1073
  {
1074
- onClick: j,
1075
- disabled: a <= e,
1074
+ onClick: h,
1075
+ disabled: l <= e,
1076
1076
  className: I.button,
1077
1077
  "aria-label": "Decrement count",
1078
1078
  children: /* @__PURE__ */ t.jsx(
1079
- x,
1079
+ p,
1080
1080
  {
1081
1081
  name: "CaretDown",
1082
1082
  width: 15,
@@ -1089,64 +1089,64 @@ const xt = "_accordion_9e4oa_1", ft = "_header_9e4oa_9", bt = "_icon_9e4oa_18",
1089
1089
  ] })
1090
1090
  ] })
1091
1091
  ] });
1092
- }, js = "_subtitle_16rdk_1", vs = "_header_16rdk_8", ks = "_text_16rdk_9", ys = "_productsBlock_16rdk_10", $s = "_top_16rdk_22", Ns = "_itemsBlock_16rdk_31", Cs = "_typeTexts_16rdk_37", Is = "_block_16rdk_44", Ps = "_active_16rdk_57", Bs = "_products_16rdk_10", ws = "_product_16rdk_10", Ts = "_button_16rdk_76", qs = "_image_16rdk_87", As = "_info_16rdk_94", Ss = "_name_16rdk_106", Os = "_buttons_16rdk_110", Ds = "_modal_16rdk_117", Es = "_link_16rdk_137", Ms = "_modalOptions_16rdk_143", T = {
1093
- subtitle: js,
1094
- header: vs,
1095
- text: ks,
1096
- productsBlock: ys,
1097
- top: $s,
1098
- itemsBlock: Ns,
1099
- typeTexts: Cs,
1100
- block: Is,
1101
- active: Ps,
1102
- products: Bs,
1103
- product: ws,
1104
- button: Ts,
1105
- image: qs,
1106
- info: As,
1107
- name: Ss,
1108
- buttons: Os,
1109
- modal: Ds,
1110
- link: Es,
1111
- modalOptions: Ms
1112
- }, Ls = (r) => {
1113
- const { activeItem: n, setActiveItem: e, popupPosition: o, setIsOpenModal: i } = r;
1092
+ }, ys = "_subtitle_16rdk_1", Ns = "_header_16rdk_8", $s = "_text_16rdk_9", Cs = "_productsBlock_16rdk_10", Is = "_top_16rdk_22", Ps = "_itemsBlock_16rdk_31", Ts = "_typeTexts_16rdk_37", ws = "_block_16rdk_44", Bs = "_active_16rdk_57", Ss = "_products_16rdk_10", qs = "_product_16rdk_10", As = "_button_16rdk_76", Os = "_image_16rdk_87", Ls = "_info_16rdk_94", Ds = "_name_16rdk_106", zs = "_buttons_16rdk_110", Es = "_modal_16rdk_117", Ms = "_link_16rdk_137", Rs = "_modalOptions_16rdk_143", w = {
1093
+ subtitle: ys,
1094
+ header: Ns,
1095
+ text: $s,
1096
+ productsBlock: Cs,
1097
+ top: Is,
1098
+ itemsBlock: Ps,
1099
+ typeTexts: Ts,
1100
+ block: ws,
1101
+ active: Bs,
1102
+ products: Ss,
1103
+ product: qs,
1104
+ button: As,
1105
+ image: Os,
1106
+ info: Ls,
1107
+ name: Ds,
1108
+ buttons: zs,
1109
+ modal: Es,
1110
+ link: Ms,
1111
+ modalOptions: Rs
1112
+ }, Hs = (d) => {
1113
+ const { activeItem: n, setActiveItem: e, popupPosition: o, setIsOpenModal: c } = d;
1114
1114
  return /* @__PURE__ */ t.jsxs(
1115
1115
  "div",
1116
1116
  {
1117
- className: T.modal,
1118
- onClick: (a) => {
1119
- a.stopPropagation();
1117
+ className: w.modal,
1118
+ onClick: (l) => {
1119
+ l.stopPropagation();
1120
1120
  },
1121
1121
  style: {
1122
1122
  top: `${o.top}px`,
1123
1123
  left: `${o.left}px`
1124
1124
  },
1125
1125
  children: [
1126
- /* @__PURE__ */ t.jsxs("div", { className: T.top, children: [
1126
+ /* @__PURE__ */ t.jsxs("div", { className: w.top, children: [
1127
1127
  /* @__PURE__ */ t.jsx("h3", { children: n.name }),
1128
1128
  /* @__PURE__ */ t.jsx(
1129
- x,
1129
+ p,
1130
1130
  {
1131
1131
  name: "X",
1132
1132
  height: 20,
1133
1133
  width: 20,
1134
1134
  hoverable: !0,
1135
1135
  onClick: () => {
1136
- i(!1), e(null);
1136
+ c(!1), e(null);
1137
1137
  }
1138
1138
  }
1139
1139
  )
1140
1140
  ] }),
1141
- /* @__PURE__ */ t.jsx("div", { className: T.modalOptions, children: /* @__PURE__ */ t.jsx(
1141
+ /* @__PURE__ */ t.jsx("div", { className: w.modalOptions, children: /* @__PURE__ */ t.jsx(
1142
1142
  it,
1143
1143
  {
1144
1144
  label: "Put up an attractive image",
1145
- onChange: (a) => {
1145
+ onChange: (l) => {
1146
1146
  const s = {
1147
1147
  ...n,
1148
- images: a,
1149
- imagePath: a[0]
1148
+ images: l,
1149
+ imagePath: l[0]
1150
1150
  };
1151
1151
  e(s);
1152
1152
  }
@@ -1155,84 +1155,84 @@ const xt = "_accordion_9e4oa_1", ft = "_header_9e4oa_9", bt = "_icon_9e4oa_18",
1155
1155
  ]
1156
1156
  }
1157
1157
  );
1158
- }, Rs = (r) => {
1159
- const { index: n, moveProduct: e, children: o } = r, [, i] = ut({
1158
+ }, Vs = (d) => {
1159
+ const { index: n, moveProduct: e, children: o } = d, [, c] = mt({
1160
1160
  accept: "product",
1161
- hover(c) {
1162
- c.index !== n && (e(c.index, n), c.index = n);
1161
+ hover(i) {
1162
+ i.index !== n && (e(i.index, n), i.index = n);
1163
1163
  }
1164
- }), [{ isDragging: a }, s] = mt({
1164
+ }), [{ isDragging: l }, s] = pt({
1165
1165
  type: "product",
1166
1166
  item: { index: n },
1167
- collect: (c) => ({
1168
- isDragging: c.isDragging()
1167
+ collect: (i) => ({
1168
+ isDragging: i.isDragging()
1169
1169
  })
1170
1170
  });
1171
1171
  return /* @__PURE__ */ t.jsx(
1172
1172
  "div",
1173
1173
  {
1174
- ref: (c) => s(i(c)),
1175
- className: `${T.product} ${a ? T.dragging : ""}`,
1174
+ ref: (i) => s(c(i)),
1175
+ className: `${w.product} ${l ? w.dragging : ""}`,
1176
1176
  children: o
1177
1177
  }
1178
1178
  );
1179
- }, Fn = (r) => {
1179
+ }, cc = (d) => {
1180
1180
  const {
1181
1181
  isActiveItems: n,
1182
1182
  setIsActiveItems: e,
1183
1183
  items: o,
1184
- setItems: i,
1185
- other: a,
1184
+ setItems: c,
1185
+ other: l,
1186
1186
  title: s,
1187
- subtitle: c,
1187
+ subtitle: i,
1188
1188
  editable: m = !0,
1189
- draggable: $ = !1,
1190
- withImage: p = !1,
1191
- deletable: k = !0,
1192
- addable: j = !0,
1193
- itemsType: d,
1194
- itemsOptions: _
1195
- } = r, [l, B] = f.useState(null), [q, Q] = f.useState({
1189
+ draggable: v = !1,
1190
+ withImage: u = !1,
1191
+ deletable: a = !0,
1192
+ addable: h = !0,
1193
+ itemsType: $,
1194
+ itemsOptions: b
1195
+ } = d, [r, B] = f.useState(null), [Y, Q] = f.useState({
1196
1196
  top: 0,
1197
1197
  left: 0
1198
- }), [F, y] = f.useState(!1), L = (h, v) => {
1199
- const A = [...o], [C] = A.splice(h, 1);
1200
- A.splice(v, 0, C), i(A);
1198
+ }), [V, y] = f.useState(!1), E = (g, k) => {
1199
+ const S = [...o], [C] = S.splice(g, 1);
1200
+ S.splice(k, 0, C), c(S);
1201
1201
  };
1202
1202
  f.useEffect(() => {
1203
- const h = () => {
1203
+ const g = () => {
1204
1204
  B(null), y(!1);
1205
1205
  };
1206
- return document.body.addEventListener("click", h), B(null), y(!1), () => {
1207
- B(null), y(!1), document.body.removeEventListener("click", h);
1206
+ return document.body.addEventListener("click", g), B(null), y(!1), () => {
1207
+ B(null), y(!1), document.body.removeEventListener("click", g);
1208
1208
  };
1209
1209
  }, []), f.useEffect(() => {
1210
- if (l) {
1211
- const h = [...o].map((v) => v.id === l.id ? l : v);
1212
- i(h);
1210
+ if (r) {
1211
+ const g = [...o].map((k) => k.id === r.id ? r : k);
1212
+ c(g);
1213
1213
  }
1214
- }, [l]);
1215
- const R = (h, v) => {
1216
- h.stopPropagation();
1217
- const A = h.target.getBoundingClientRect(), C = 100, U = window.innerHeight;
1218
- let O = A.top + window.scrollY;
1219
- O + C > U && (O = U - C - 20), y(!0), Q({
1220
- top: O - 80,
1221
- left: A.left - 30
1222
- }), B(v);
1214
+ }, [r]);
1215
+ const M = (g, k) => {
1216
+ g.stopPropagation();
1217
+ const S = g.target.getBoundingClientRect(), C = 100, F = window.innerHeight;
1218
+ let A = S.top + window.scrollY;
1219
+ A + C > F && (A = F - C - 20), y(!0), Q({
1220
+ top: A - 80,
1221
+ left: S.left - 30
1222
+ }), B(k);
1223
1223
  };
1224
- function st(h) {
1225
- if (p)
1226
- return h ? /* @__PURE__ */ t.jsx(
1224
+ function nt(g) {
1225
+ if (u)
1226
+ return g ? /* @__PURE__ */ t.jsx(
1227
1227
  "img",
1228
1228
  {
1229
- src: `https://imagedelivery.net/${h}/w=1000`,
1229
+ src: `https://imagedelivery.net/${g}/w=1000`,
1230
1230
  alt: "image",
1231
1231
  width: 16,
1232
1232
  height: 16
1233
1233
  }
1234
1234
  ) : /* @__PURE__ */ t.jsx(
1235
- x,
1235
+ p,
1236
1236
  {
1237
1237
  name: "Image",
1238
1238
  width: 16,
@@ -1241,134 +1241,134 @@ const xt = "_accordion_9e4oa_1", ft = "_header_9e4oa_9", bt = "_icon_9e4oa_18",
1241
1241
  }
1242
1242
  );
1243
1243
  }
1244
- const et = (h, v) => {
1245
- const A = /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
1246
- $ && /* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
1247
- x,
1244
+ const st = (g, k) => {
1245
+ const S = /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
1246
+ v && /* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
1247
+ p,
1248
1248
  {
1249
1249
  name: "DotsSixVertical",
1250
1250
  hoverable: !0,
1251
1251
  width: 20,
1252
1252
  height: 20
1253
1253
  }
1254
- ) }, v),
1255
- d === "select" && /* @__PURE__ */ t.jsx(
1256
- Y,
1254
+ ) }, k),
1255
+ $ === "select" && /* @__PURE__ */ t.jsx(
1256
+ W,
1257
1257
  {
1258
1258
  onChange: (C) => {
1259
- const U = [...o], O = Number(C.split(" ")[1]), u = _.find((N) => N.id === O);
1260
- if (!u) return;
1261
- const w = {
1262
- ...u.productData.stats,
1263
- newPrice: u.productData.minPrice.amount,
1264
- oldPrice: u.productData.compareAtPrice.amount
1265
- }, S = U.map((N) => N.id === h.id ? {
1266
- ...h,
1259
+ const F = [...o], A = Number(C.split(" ")[1]), _ = b.find((N) => N.id === A);
1260
+ if (!_) return;
1261
+ const T = {
1262
+ ..._.productData.stats,
1263
+ newPrice: _.productData.minPrice.amount,
1264
+ oldPrice: _.productData.compareAtPrice.amount
1265
+ }, q = F.map((N) => N.id === g.id ? {
1266
+ ...g,
1267
1267
  name: C,
1268
- listingId: O,
1269
- stats: w
1268
+ listingId: A,
1269
+ stats: T
1270
1270
  } : N);
1271
1271
  B({
1272
- ...h,
1272
+ ...g,
1273
1273
  name: C,
1274
- listingId: O
1275
- }), i([...S]);
1274
+ listingId: A
1275
+ }), c([...q]);
1276
1276
  },
1277
- value: h.name,
1278
- options: [..._.map((C) => `Product ${C.id}`)],
1279
- leftAddon: st(h.images[0])
1277
+ value: g.name,
1278
+ options: [...b.map((C) => `Product ${C.id}`)],
1279
+ leftAddon: nt(g.images[0])
1280
1280
  },
1281
- v
1281
+ k
1282
1282
  ),
1283
- /* @__PURE__ */ t.jsxs("div", { className: T.buttons, children: [
1283
+ /* @__PURE__ */ t.jsxs("div", { className: w.buttons, children: [
1284
1284
  m && /* @__PURE__ */ t.jsx(
1285
- x,
1285
+ p,
1286
1286
  {
1287
1287
  name: "Sliders",
1288
1288
  hoverable: !0,
1289
1289
  width: 20,
1290
1290
  height: 20,
1291
- onClick: (C) => R(C, h)
1291
+ onClick: (C) => M(C, g)
1292
1292
  }
1293
1293
  ),
1294
- k && /* @__PURE__ */ t.jsx(
1295
- x,
1294
+ a && /* @__PURE__ */ t.jsx(
1295
+ p,
1296
1296
  {
1297
1297
  name: "Trash",
1298
1298
  hoverable: !0,
1299
1299
  width: 20,
1300
1300
  height: 20,
1301
1301
  fill: "#C12A2A",
1302
- onClick: () => i(o.filter((C) => C.id !== h.id))
1302
+ onClick: () => c(o.filter((C) => C.id !== g.id))
1303
1303
  }
1304
1304
  )
1305
1305
  ] })
1306
1306
  ] });
1307
- return $ ? /* @__PURE__ */ t.jsx(
1308
- Rs,
1307
+ return v ? /* @__PURE__ */ t.jsx(
1308
+ Vs,
1309
1309
  {
1310
- product: h,
1311
- index: v,
1312
- moveProduct: L,
1313
- children: A
1310
+ product: g,
1311
+ index: k,
1312
+ moveProduct: E,
1313
+ children: S
1314
1314
  },
1315
- h.id
1315
+ g.id
1316
1316
  ) : /* @__PURE__ */ t.jsx(
1317
1317
  "div",
1318
1318
  {
1319
- className: T.product,
1320
- children: A
1319
+ className: w.product,
1320
+ children: S
1321
1321
  },
1322
- h.id
1322
+ g.id
1323
1323
  );
1324
1324
  };
1325
- return /* @__PURE__ */ t.jsxs("div", { className: T.productsBlock, children: [
1326
- (s || n !== void 0) && /* @__PURE__ */ t.jsxs("div", { className: T.top, children: [
1327
- s && /* @__PURE__ */ t.jsx("h3", { className: T.title, children: s }),
1325
+ return /* @__PURE__ */ t.jsxs("div", { className: w.productsBlock, children: [
1326
+ (s || n !== void 0) && /* @__PURE__ */ t.jsxs("div", { className: w.top, children: [
1327
+ s && /* @__PURE__ */ t.jsx("h3", { className: w.title, children: s }),
1328
1328
  n !== void 0 && /* @__PURE__ */ t.jsx(
1329
- V,
1329
+ H,
1330
1330
  {
1331
1331
  current: n,
1332
- onChange: (h) => e == null ? void 0 : e(h)
1332
+ onChange: (g) => e == null ? void 0 : e(g)
1333
1333
  }
1334
1334
  )
1335
1335
  ] }),
1336
- F && l && /* @__PURE__ */ t.jsx(
1337
- Ls,
1336
+ V && r && /* @__PURE__ */ t.jsx(
1337
+ Hs,
1338
1338
  {
1339
- activeItem: l,
1339
+ activeItem: r,
1340
1340
  setActiveItem: B,
1341
1341
  setIsOpenModal: y,
1342
- popupPosition: q
1342
+ popupPosition: Y
1343
1343
  }
1344
1344
  ),
1345
- /* @__PURE__ */ t.jsxs("div", { className: T.products, children: [
1346
- c && /* @__PURE__ */ t.jsx("h5", { className: T.subtitle, children: c }),
1347
- $ ? /* @__PURE__ */ t.jsx(rt, { backend: dt, children: o.map((h, v) => et(h, v)) }) : o.map((h, v) => et(h, v)),
1348
- j && /* @__PURE__ */ t.jsxs(
1345
+ /* @__PURE__ */ t.jsxs("div", { className: w.products, children: [
1346
+ i && /* @__PURE__ */ t.jsx("h5", { className: w.subtitle, children: i }),
1347
+ v ? /* @__PURE__ */ t.jsx(ut, { backend: _t, children: o.map((g, k) => st(g, k)) }) : o.map((g, k) => st(g, k)),
1348
+ h && /* @__PURE__ */ t.jsxs(
1349
1349
  X,
1350
1350
  {
1351
- className: T.button,
1351
+ className: w.button,
1352
1352
  size: "s",
1353
1353
  onClick: () => {
1354
- const h = [...o], v = _[0].id;
1355
- h.push({
1356
- name: `Product ${v}`,
1357
- id: tt(),
1358
- listingId: v,
1354
+ const g = [...o], k = b[0].id;
1355
+ g.push({
1356
+ name: `Product ${k}`,
1357
+ id: et(),
1358
+ listingId: k,
1359
1359
  imagePath: "",
1360
1360
  images: [],
1361
1361
  stats: {
1362
- ..._[0].productData.stats,
1363
- newPrice: _[0].productData.minPrice.amount,
1364
- oldPrice: _[0].productData.compareAtPrice.amount
1362
+ ...b[0].productData.stats,
1363
+ newPrice: b[0].productData.minPrice.amount,
1364
+ oldPrice: b[0].productData.compareAtPrice.amount
1365
1365
  }
1366
- }), i(h);
1366
+ }), c(g);
1367
1367
  },
1368
1368
  children: [
1369
1369
  /* @__PURE__ */ t.jsx("span", { children: "Add Option" }),
1370
1370
  /* @__PURE__ */ t.jsx(
1371
- x,
1371
+ p,
1372
1372
  {
1373
1373
  name: "Plus",
1374
1374
  width: 16,
@@ -1379,122 +1379,122 @@ const xt = "_accordion_9e4oa_1", ft = "_header_9e4oa_9", bt = "_icon_9e4oa_18",
1379
1379
  }
1380
1380
  )
1381
1381
  ] }),
1382
- a !== void 0 && /* @__PURE__ */ t.jsx(ht, { items: a })
1382
+ l !== void 0 && /* @__PURE__ */ t.jsx(ft, { items: l })
1383
1383
  ] });
1384
- }, Hs = "_options_10tml_1", Vs = "_price_10tml_12", Fs = "_oldPrice_10tml_19", Us = "_newPrice_10tml_27", zs = "_meta_10tml_34", Gs = "_info_10tml_40", Ys = "_infoRight_10tml_48", Xs = "_buttons_10tml_55", Qs = "_variants_10tml_62", Ws = "_variant_10tml_62", Js = "_stock_10tml_79", Ks = "_variantInfo_10tml_86", Zs = "_quantity_10tml_92", tn = "_count_10tml_99", en = "_button_10tml_55", sn = "_activeVariant_10tml_120", nn = "_chargeTypes_10tml_124", cn = "_charge_10tml_124", on = "_chargeActive_10tml_144", an = "_title_10tml_149", b = {
1385
- options: Hs,
1386
- price: Vs,
1387
- oldPrice: Fs,
1388
- newPrice: Us,
1389
- meta: zs,
1390
- info: Gs,
1391
- infoRight: Ys,
1392
- buttons: Xs,
1393
- variants: Qs,
1394
- variant: Ws,
1395
- stock: Js,
1396
- variantInfo: Ks,
1397
- quantity: Zs,
1398
- count: tn,
1399
- button: en,
1400
- activeVariant: sn,
1401
- chargeTypes: nn,
1402
- charge: cn,
1403
- chargeActive: on,
1404
- title: an
1384
+ }, Fs = "_options_11lki_1", Us = "_price_11lki_12", Gs = "_oldPrice_11lki_19", Ws = "_newPrice_11lki_27", Xs = "_meta_11lki_34", Ys = "_info_11lki_40", Qs = "_infoRight_11lki_48", Js = "_buttons_11lki_55", Ks = "_variants_11lki_62", Zs = "_variant_11lki_62", tn = "_stock_11lki_79", en = "_variantInfo_11lki_86", sn = "_quantity_11lki_92", nn = "_count_11lki_99", cn = "_button_11lki_55", on = "_activeVariant_11lki_120", an = "_chargeTypes_11lki_124", ln = "_charge_11lki_124", rn = "_chargeActive_11lki_145", dn = "_title_11lki_150", j = {
1385
+ options: Fs,
1386
+ price: Us,
1387
+ oldPrice: Gs,
1388
+ newPrice: Ws,
1389
+ meta: Xs,
1390
+ info: Ys,
1391
+ infoRight: Qs,
1392
+ buttons: Js,
1393
+ variants: Ks,
1394
+ variant: Zs,
1395
+ stock: tn,
1396
+ variantInfo: en,
1397
+ quantity: sn,
1398
+ count: nn,
1399
+ button: cn,
1400
+ activeVariant: on,
1401
+ chargeTypes: an,
1402
+ charge: ln,
1403
+ chargeActive: rn,
1404
+ title: dn
1405
1405
  };
1406
- var pt = /* @__PURE__ */ ((r) => (r.ONE_TIME = "One-Time", r.RECURRING = "Subscribe & Save", r))(pt || {});
1407
- const Un = (r) => {
1408
- const { variants: n } = r, [e, o] = f.useState(n[0]), [i, a] = f.useState(e.chargeTypes[0]), s = ot(), [c, m] = f.useState(1), { reset: $, addProductToCart: p, getProducts: k } = at();
1409
- async function j() {
1410
- await k(), await p({
1411
- productId: r.id,
1406
+ var bt = /* @__PURE__ */ ((d) => (d.ONE_TIME = "One-Time", d.RECURRING = "Subscribe & Save", d))(bt || {});
1407
+ const oc = (d) => {
1408
+ const { variants: n } = d, [e, o] = f.useState(n[0]), [c, l] = f.useState(e.chargeTypes[0]), s = at(), [i, m] = f.useState(1), { reset: v, addProductToCart: u, getProducts: a } = lt();
1409
+ async function h() {
1410
+ await a(), await u({
1411
+ productId: d.id,
1412
1412
  productVariantId: e.id,
1413
- quantity: c
1413
+ quantity: i
1414
1414
  });
1415
1415
  }
1416
- function d() {
1417
- $(), j(), s("/checkout");
1416
+ function $() {
1417
+ v(), h(), s("/checkout");
1418
1418
  }
1419
- function _(l) {
1420
- if (l >= 864e5) {
1421
- const y = Math.floor(l / 864e5);
1419
+ function b(r) {
1420
+ if (r >= 864e5) {
1421
+ const y = Math.floor(r / 864e5);
1422
1422
  return `${y} ${y === 1 ? "day" : "days"}`;
1423
- } else if (l >= 36e5) {
1424
- const y = Math.floor(l / 36e5);
1423
+ } else if (r >= 36e5) {
1424
+ const y = Math.floor(r / 36e5);
1425
1425
  return `${y} ${y === 1 ? "hour" : "hours"}`;
1426
- } else if (l >= 6e4) {
1427
- const y = Math.floor(l / 6e4);
1426
+ } else if (r >= 6e4) {
1427
+ const y = Math.floor(r / 6e4);
1428
1428
  return `${y} ${y === 1 ? "minute" : "minutes"}`;
1429
1429
  } else {
1430
- const y = Math.floor(l / 1e3);
1430
+ const y = Math.floor(r / 1e3);
1431
1431
  return `${y} ${y === 1 ? "second" : "seconds"}`;
1432
1432
  }
1433
1433
  }
1434
- return /* @__PURE__ */ t.jsxs("div", { className: b.options, children: [
1435
- /* @__PURE__ */ t.jsx("div", { className: b.chargeTypes, children: e.chargeTypes.map((l) => /* @__PURE__ */ t.jsx(
1434
+ return /* @__PURE__ */ t.jsxs("div", { className: j.options, children: [
1435
+ e.chargeTypes.length > 1 && /* @__PURE__ */ t.jsx("div", { className: j.chargeTypes, children: e.chargeTypes.map((r) => /* @__PURE__ */ t.jsx(
1436
1436
  "div",
1437
1437
  {
1438
- className: M(b.charge, {
1439
- [b.chargeActive]: i === l
1438
+ className: D(j.charge, {
1439
+ [j.chargeActive]: c === r
1440
1440
  }),
1441
- onClick: () => a(l),
1442
- children: pt[l]
1441
+ onClick: () => l(r),
1442
+ children: bt[r]
1443
1443
  },
1444
- l
1444
+ r
1445
1445
  )) }),
1446
- /* @__PURE__ */ t.jsx("div", { className: b.variants, children: n.map((l) => /* @__PURE__ */ t.jsxs(
1446
+ /* @__PURE__ */ t.jsx("div", { className: j.variants, children: n.map((r) => /* @__PURE__ */ t.jsxs(
1447
1447
  "div",
1448
1448
  {
1449
- className: M(b.variant, {
1450
- [b.activeVariant]: e.id === l.id
1449
+ className: D(j.variant, {
1450
+ [j.activeVariant]: e.id === r.id
1451
1451
  }),
1452
- onClick: () => o(l),
1452
+ onClick: () => o(r),
1453
1453
  children: [
1454
- /* @__PURE__ */ t.jsxs("div", { className: b.variantInfo, children: [
1455
- /* @__PURE__ */ t.jsx("span", { className: b.title, children: l.name }),
1454
+ /* @__PURE__ */ t.jsxs("div", { className: j.variantInfo, children: [
1455
+ /* @__PURE__ */ t.jsx("span", { className: j.title, children: r.name }),
1456
1456
  /* @__PURE__ */ t.jsxs("span", { children: [
1457
1457
  "$",
1458
- i === "ONE_TIME" ? l.price.amount : l.subscriptionSettings.price.amount
1458
+ c === "ONE_TIME" ? r.price.amount : r.subscriptionSettings.price.amount
1459
1459
  ] })
1460
1460
  ] }),
1461
- /* @__PURE__ */ t.jsx("div", { children: i === "ONE_TIME" && /* @__PURE__ */ t.jsxs("span", { className: b.stock, children: [
1462
- l.quantity.restrictions.max || 0,
1461
+ /* @__PURE__ */ t.jsx("div", { children: c === "ONE_TIME" && /* @__PURE__ */ t.jsxs("span", { className: j.stock, children: [
1462
+ r.quantity.restrictions.max || 0,
1463
1463
  " in stock"
1464
1464
  ] }) })
1465
1465
  ]
1466
1466
  },
1467
- l.id
1467
+ r.id
1468
1468
  )) }),
1469
- /* @__PURE__ */ t.jsxs("div", { className: b.quantity, children: [
1469
+ c === "ONE_TIME" && /* @__PURE__ */ t.jsxs("div", { className: j.quantity, children: [
1470
1470
  /* @__PURE__ */ t.jsx(
1471
1471
  "div",
1472
1472
  {
1473
1473
  onClick: () => {
1474
- i === "ONE_TIME" && (c > 1 ? m((l) => l - 1) : m(1));
1474
+ i > 1 ? m((r) => r - 1) : m(1);
1475
1475
  },
1476
- className: b.button,
1477
- children: /* @__PURE__ */ t.jsx(x, { name: "Minus" })
1476
+ className: j.button,
1477
+ children: /* @__PURE__ */ t.jsx(p, { name: "Minus" })
1478
1478
  }
1479
1479
  ),
1480
- /* @__PURE__ */ t.jsx("div", { className: b.count, children: c }),
1480
+ /* @__PURE__ */ t.jsx("div", { className: j.count, children: i }),
1481
1481
  /* @__PURE__ */ t.jsx(
1482
1482
  "div",
1483
1483
  {
1484
1484
  onClick: () => {
1485
- i === "ONE_TIME" && m((l) => l + 1);
1485
+ m((r) => r + 1);
1486
1486
  },
1487
- className: b.button,
1488
- children: /* @__PURE__ */ t.jsx(x, { name: "Plus" })
1487
+ className: j.button,
1488
+ children: /* @__PURE__ */ t.jsx(p, { name: "Plus" })
1489
1489
  }
1490
1490
  )
1491
1491
  ] }),
1492
- /* @__PURE__ */ t.jsxs("div", { className: b.meta, children: [
1493
- /* @__PURE__ */ t.jsxs("div", { className: b.info, children: [
1492
+ /* @__PURE__ */ t.jsxs("div", { className: j.meta, children: [
1493
+ /* @__PURE__ */ t.jsxs("div", { className: j.info, children: [
1494
1494
  /* @__PURE__ */ t.jsx("span", { children: "Delivery" }),
1495
- /* @__PURE__ */ t.jsxs("div", { className: b.infoRight, children: [
1495
+ /* @__PURE__ */ t.jsxs("div", { className: j.infoRight, children: [
1496
1496
  /* @__PURE__ */ t.jsx(
1497
- x,
1497
+ p,
1498
1498
  {
1499
1499
  name: "Lightning",
1500
1500
  fill: "#FF3F19",
@@ -1502,231 +1502,245 @@ const Un = (r) => {
1502
1502
  height: 20
1503
1503
  }
1504
1504
  ),
1505
- /* @__PURE__ */ t.jsx("span", { children: e.deliveryTime === 0 ? "Instant" : _(e.deliveryTime) })
1505
+ /* @__PURE__ */ t.jsx("span", { children: e.deliveryTime === 0 ? "Instant" : b(e.deliveryTime) })
1506
1506
  ] })
1507
1507
  ] }),
1508
- /* @__PURE__ */ t.jsxs("div", { className: b.info, children: [
1508
+ /* @__PURE__ */ t.jsxs("div", { className: j.info, children: [
1509
1509
  /* @__PURE__ */ t.jsx("span", { children: "Price" }),
1510
- /* @__PURE__ */ t.jsx("div", { className: b.infoRight, children: i === "ONE_TIME" ? e.compareAtPrice && (e.compareAtPrice.amount || 0) - (e.price.amount || 0) > 0 ? /* @__PURE__ */ t.jsxs("div", { className: b.price, children: [
1511
- /* @__PURE__ */ t.jsxs("span", { className: b.newPrice, children: [
1510
+ /* @__PURE__ */ t.jsx("div", { className: j.infoRight, children: c === "ONE_TIME" ? e.compareAtPrice && (e.compareAtPrice.amount || 0) - (e.price.amount || 0) > 0 ? /* @__PURE__ */ t.jsxs("div", { className: j.price, children: [
1511
+ /* @__PURE__ */ t.jsxs("span", { className: j.newPrice, children: [
1512
1512
  "$ ",
1513
- (e.price.amount || 0) * c
1513
+ (e.price.amount || 0) * i
1514
1514
  ] }),
1515
- /* @__PURE__ */ t.jsxs("span", { className: b.oldPrice, children: [
1515
+ /* @__PURE__ */ t.jsxs("span", { className: j.oldPrice, children: [
1516
1516
  "$ ",
1517
- (e.compareAtPrice.amount || 0) * c
1517
+ (e.compareAtPrice.amount || 0) * i
1518
1518
  ] })
1519
- ] }) : /* @__PURE__ */ t.jsxs("span", { className: b.newPrice, children: [
1519
+ ] }) : /* @__PURE__ */ t.jsxs("span", { className: j.newPrice, children: [
1520
1520
  "$ ",
1521
- (e.price.amount || 0) * c
1522
- ] }) : e.subscriptionSettings.compareAtPrice && (e.subscriptionSettings.compareAtPrice.amount || 0) - (e.subscriptionSettings.price.amount || 0) > 0 ? /* @__PURE__ */ t.jsxs("div", { className: b.price, children: [
1523
- /* @__PURE__ */ t.jsxs("span", { className: b.newPrice, children: [
1521
+ (e.price.amount || 0) * i
1522
+ ] }) : e.subscriptionSettings.compareAtPrice && (e.subscriptionSettings.compareAtPrice.amount || 0) - (e.subscriptionSettings.price.amount || 0) > 0 ? /* @__PURE__ */ t.jsxs("div", { className: j.price, children: [
1523
+ /* @__PURE__ */ t.jsxs("span", { className: j.newPrice, children: [
1524
1524
  "$ ",
1525
1525
  e.subscriptionSettings.price.amount || 0
1526
1526
  ] }),
1527
- /* @__PURE__ */ t.jsxs("span", { className: b.oldPrice, children: [
1527
+ /* @__PURE__ */ t.jsxs("span", { className: j.oldPrice, children: [
1528
1528
  "$ ",
1529
1529
  e.subscriptionSettings.compareAtPrice.amount || 0
1530
1530
  ] })
1531
- ] }) : /* @__PURE__ */ t.jsxs("span", { className: b.newPrice, children: [
1531
+ ] }) : /* @__PURE__ */ t.jsxs("span", { className: j.newPrice, children: [
1532
1532
  "$ ",
1533
1533
  e.subscriptionSettings.price.amount || 0
1534
1534
  ] }) })
1535
1535
  ] })
1536
1536
  ] }),
1537
- /* @__PURE__ */ t.jsxs("div", { className: b.buttons, children: [
1537
+ /* @__PURE__ */ t.jsxs("div", { className: j.buttons, children: [
1538
1538
  /* @__PURE__ */ t.jsx(
1539
1539
  X,
1540
1540
  {
1541
1541
  type: "Primary",
1542
- onClick: () => d(),
1543
- children: "Buy Now"
1542
+ onClick: () => $(),
1543
+ children: /* @__PURE__ */ t.jsx("span", { children: c === "ONE_TIME" ? "Buy Now" : "Subscribe Now" })
1544
1544
  }
1545
1545
  ),
1546
- i === "ONE_TIME" && /* @__PURE__ */ t.jsx(
1546
+ c === "ONE_TIME" && /* @__PURE__ */ t.jsx(
1547
1547
  X,
1548
1548
  {
1549
1549
  type: "Secondary",
1550
- onClick: () => j(),
1550
+ onClick: () => h(),
1551
1551
  children: "Add to Cart"
1552
1552
  }
1553
1553
  )
1554
1554
  ] })
1555
1555
  ] });
1556
- }, ln = "_button_14i4s_1", rn = "_login_14i4s_14", dn = "_signUp_14i4s_18", un = "_buttons_14i4s_23", mn = "_modal_14i4s_32", _n = "_info_14i4s_48", hn = "_top_14i4s_55", pn = "_title_14i4s_66", gn = "_clear_14i4s_72", xn = "_activeClear_14i4s_79", fn = "_count_14i4s_83", bn = "_cart_14i4s_98", jn = "_empty_14i4s_106", vn = "_product_14i4s_132", kn = "_products_14i4s_141", yn = "_image_14i4s_149", $n = "_productInfo_14i4s_155", Nn = "_content_14i4s_162", Cn = "_name_14i4s_168", In = "_price_14i4s_174", Pn = "_productButtons_14i4s_180", Bn = "_productButton_14i4s_180", wn = "_productCount_14i4s_200", Tn = "_bottom_14i4s_216", qn = "_subtotal_14i4s_224", An = "_block_14i4s_232", Sn = "_shoppingCount_14i4s_239", g = {
1557
- button: ln,
1558
- login: rn,
1559
- signUp: dn,
1560
- buttons: un,
1561
- modal: mn,
1562
- info: _n,
1563
- top: hn,
1564
- title: pn,
1565
- clear: gn,
1566
- activeClear: xn,
1567
- count: fn,
1568
- cart: bn,
1569
- empty: jn,
1570
- product: vn,
1571
- products: kn,
1572
- image: yn,
1573
- productInfo: $n,
1574
- content: Nn,
1575
- name: Cn,
1576
- price: In,
1577
- productButtons: Pn,
1578
- productButton: Bn,
1579
- productCount: wn,
1580
- bottom: Tn,
1581
- subtotal: qn,
1582
- block: An,
1583
- shoppingCount: Sn
1584
- }, zn = (r) => {
1585
- const { shopping: n, signUp: e } = r, o = ot();
1586
- function i(a) {
1587
- o(a);
1556
+ }, un = "_button_1kcpz_1", _n = "_login_1kcpz_14", mn = "_signUp_1kcpz_18", pn = "_buttons_1kcpz_23", hn = "_modal_1kcpz_32", gn = "_info_1kcpz_48", xn = "_top_1kcpz_55", fn = "_title_1kcpz_66", bn = "_clear_1kcpz_72", jn = "_activeClear_1kcpz_79", vn = "_count_1kcpz_83", kn = "_cart_1kcpz_98", yn = "_empty_1kcpz_106", Nn = "_product_1kcpz_132", $n = "_products_1kcpz_141", Cn = "_image_1kcpz_149", In = "_productInfo_1kcpz_155", Pn = "_content_1kcpz_162", Tn = "_name_1kcpz_168", wn = "_price_1kcpz_174", Bn = "_productButtons_1kcpz_180", Sn = "_productButton_1kcpz_180", qn = "_productCount_1kcpz_200", An = "_bottom_1kcpz_216", On = "_subtotal_1kcpz_224", Ln = "_block_1kcpz_232", Dn = "_shoppingCount_1kcpz_239", zn = "_total_1kcpz_259", En = "_link_1kcpz_265", x = {
1557
+ button: un,
1558
+ login: _n,
1559
+ signUp: mn,
1560
+ buttons: pn,
1561
+ modal: hn,
1562
+ info: gn,
1563
+ top: xn,
1564
+ title: fn,
1565
+ clear: bn,
1566
+ activeClear: jn,
1567
+ count: vn,
1568
+ cart: kn,
1569
+ empty: yn,
1570
+ product: Nn,
1571
+ products: $n,
1572
+ image: Cn,
1573
+ productInfo: In,
1574
+ content: Pn,
1575
+ name: Tn,
1576
+ price: wn,
1577
+ productButtons: Bn,
1578
+ productButton: Sn,
1579
+ productCount: qn,
1580
+ bottom: An,
1581
+ subtotal: On,
1582
+ block: Ln,
1583
+ shoppingCount: Dn,
1584
+ total: zn,
1585
+ link: En
1586
+ }, ic = (d) => {
1587
+ const { shopping: n, signUp: e } = d, o = at();
1588
+ function c(l) {
1589
+ o(l);
1588
1590
  }
1589
- return /* @__PURE__ */ t.jsxs("div", { className: g.buttons, children: [
1590
- n && /* @__PURE__ */ t.jsx(On, {}),
1591
+ return /* @__PURE__ */ t.jsxs("div", { className: x.buttons, children: [
1592
+ n && /* @__PURE__ */ t.jsx(Mn, {}),
1591
1593
  /* @__PURE__ */ t.jsx(
1592
1594
  "div",
1593
1595
  {
1594
- className: M(g.button, g.login),
1595
- onClick: () => i("/customer-dash"),
1596
+ className: D(x.button, x.login),
1597
+ onClick: () => c("/customer-dash"),
1596
1598
  children: "Login"
1597
1599
  }
1598
1600
  ),
1599
1601
  e && /* @__PURE__ */ t.jsx(
1600
1602
  "div",
1601
1603
  {
1602
- className: M(g.button, g.login, g.signUp),
1603
- onClick: () => i("/customer-dash"),
1604
+ className: D(x.button, x.login, x.signUp),
1605
+ onClick: () => c("/customer-dash"),
1604
1606
  children: "Sign Up"
1605
1607
  }
1606
1608
  )
1607
1609
  ] });
1608
- }, On = () => {
1609
- const [r, n] = f.useState(!1), { cart: e } = at();
1610
+ }, Mn = () => {
1611
+ const [d, n] = f.useState(!1), [e, o] = f.useState([]), { cart: c, getProducts: l } = lt();
1612
+ function s(u) {
1613
+ for (let a = 0; a < c.parts.length; a++)
1614
+ for (let h = 0; h < u.variants.length; h++)
1615
+ if (c.parts[a].productVariantId === u.variants[a].id)
1616
+ return c.parts[a].productVariantId;
1617
+ }
1618
+ function i(u) {
1619
+ for (let a = 0; a < c.parts.length; a++)
1620
+ for (let h = 0; h < u.variants.length; h++)
1621
+ if (c.parts[a].productVariantId === u.variants[a].id)
1622
+ return c.parts[a].quantity;
1623
+ }
1624
+ f.useEffect(() => {
1625
+ (async () => {
1626
+ const a = c.parts.map((b) => String(b.productId)), $ = (await l([...a])).map((b) => ({
1627
+ ...b,
1628
+ activeVariantId: s(b),
1629
+ quantity: i(b)
1630
+ }));
1631
+ o($);
1632
+ })();
1633
+ }, [c]);
1634
+ function m(u) {
1635
+ var a;
1636
+ return !u || !(u != null && u.variants) ? !1 : (a = u.variants.find((h) => h.id === u.activeVariantId)) == null ? void 0 : a.subscriptionSettings;
1637
+ }
1638
+ const v = c.parts.length > 0 && e.length > 0 && !m(e[0]);
1610
1639
  return /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
1611
1640
  /* @__PURE__ */ t.jsxs(
1612
1641
  "div",
1613
1642
  {
1614
- className: g.button,
1615
- onClick: (o) => {
1616
- o.stopPropagation(), n(!0);
1643
+ className: x.button,
1644
+ onClick: (u) => {
1645
+ u.stopPropagation(), n(!0);
1617
1646
  },
1618
1647
  children: [
1619
1648
  /* @__PURE__ */ t.jsx(
1620
- x,
1649
+ p,
1621
1650
  {
1622
1651
  name: "Handbag",
1623
- fill: "#252525"
1652
+ fill: "var(--icon-primary)"
1624
1653
  }
1625
1654
  ),
1626
- e.parts.length > 0 && /* @__PURE__ */ t.jsx("div", { className: g.shoppingCount, children: e.parts.length })
1655
+ v && /* @__PURE__ */ t.jsx("div", { className: x.shoppingCount, children: c.parts.length })
1627
1656
  ]
1628
1657
  }
1629
1658
  ),
1630
- r && /* @__PURE__ */ t.jsx(gt, { close: n, children: /* @__PURE__ */ t.jsx(Dn, {}) })
1659
+ d && /* @__PURE__ */ t.jsx(ht, { close: n, children: /* @__PURE__ */ t.jsx(
1660
+ Rn,
1661
+ {
1662
+ activeProducts: e,
1663
+ isCartNotEmpty: v
1664
+ }
1665
+ ) })
1631
1666
  ] });
1632
- }, Dn = () => {
1633
- const { cart: r, reset: n, getProducts: e, getTotalAndDiscount: o, updateQuantityOfProduct: i } = at(), [a, s] = f.useState([]), c = ot();
1634
- function m(d) {
1635
- for (let _ = 0; _ < r.parts.length; _++)
1636
- for (let l = 0; l < d.variants.length; l++)
1637
- if (r.parts[_].productVariantId === d.variants[_].id)
1638
- return r.parts[_].productVariantId;
1667
+ }, Rn = (d) => {
1668
+ const { activeProducts: n, isCartNotEmpty: e } = d, { cart: o, reset: c, getTotalAndDiscount: l, updateQuantityOfProduct: s } = lt(), i = at();
1669
+ function m(a) {
1670
+ i(a);
1639
1671
  }
1640
- function $(d) {
1641
- for (let _ = 0; _ < r.parts.length; _++)
1642
- for (let l = 0; l < d.variants.length; l++)
1643
- if (r.parts[_].productVariantId === d.variants[_].id)
1644
- return r.parts[_].quantity;
1645
- }
1646
- function p(d) {
1647
- c(d);
1648
- }
1649
- function k(d) {
1650
- i({
1651
- productId: d.id,
1652
- productVariantId: d.activeVariantId,
1653
- quantity: d.quantity + 1
1672
+ function v(a) {
1673
+ s({
1674
+ productId: a.id,
1675
+ productVariantId: a.activeVariantId,
1676
+ quantity: a.quantity + 1
1654
1677
  });
1655
1678
  }
1656
- function j(d) {
1657
- i({
1658
- productId: d.id,
1659
- productVariantId: d.activeVariantId,
1660
- quantity: d.quantity - 1
1679
+ function u(a) {
1680
+ s({
1681
+ productId: a.id,
1682
+ productVariantId: a.activeVariantId,
1683
+ quantity: a.quantity - 1
1661
1684
  });
1662
1685
  }
1663
- return f.useEffect(() => {
1664
- (async () => {
1665
- const _ = r.parts.map((q) => String(q.productId)), B = (await e([..._])).map((q) => ({
1666
- ...q,
1667
- activeVariantId: m(q),
1668
- quantity: $(q)
1669
- }));
1670
- s(B);
1671
- })();
1672
- }, [r]), /* @__PURE__ */ t.jsxs(
1686
+ return /* @__PURE__ */ t.jsxs(
1673
1687
  "div",
1674
1688
  {
1675
- className: g.modal,
1676
- onClick: (d) => d.stopPropagation(),
1689
+ className: x.modal,
1690
+ onClick: (a) => a.stopPropagation(),
1677
1691
  children: [
1678
- /* @__PURE__ */ t.jsxs("div", { className: g.top, children: [
1679
- /* @__PURE__ */ t.jsxs("div", { className: g.info, children: [
1680
- /* @__PURE__ */ t.jsx("span", { className: g.title, children: "Cart" }),
1681
- r.parts.length > 0 && /* @__PURE__ */ t.jsx("div", { className: g.count, children: r.parts.length })
1692
+ /* @__PURE__ */ t.jsxs("div", { className: x.top, children: [
1693
+ /* @__PURE__ */ t.jsxs("div", { className: x.info, children: [
1694
+ /* @__PURE__ */ t.jsx("span", { className: x.title, children: "Cart" }),
1695
+ e && /* @__PURE__ */ t.jsx("div", { className: x.count, children: o.parts.length })
1682
1696
  ] }),
1683
1697
  /* @__PURE__ */ t.jsx(
1684
1698
  "button",
1685
1699
  {
1686
- className: M(g.clear, {
1687
- [g.activeClear]: r.parts.length > 0
1700
+ className: D(x.clear, {
1701
+ [x.activeClear]: e
1688
1702
  }),
1689
- disabled: r.parts.length === 0,
1690
- onClick: () => n(),
1703
+ disabled: !e,
1704
+ onClick: () => c(),
1691
1705
  children: "Clear all"
1692
1706
  }
1693
1707
  )
1694
1708
  ] }),
1695
- r.parts.length > 0 ? /* @__PURE__ */ t.jsxs("div", { className: g.cart, children: [
1696
- /* @__PURE__ */ t.jsx("div", { className: g.products, children: a.map((d) => /* @__PURE__ */ t.jsxs(
1709
+ e ? /* @__PURE__ */ t.jsxs("div", { className: x.cart, children: [
1710
+ /* @__PURE__ */ t.jsx("div", { className: x.products, children: n.map((a) => /* @__PURE__ */ t.jsxs(
1697
1711
  "div",
1698
1712
  {
1699
- className: g.product,
1713
+ className: x.product,
1700
1714
  children: [
1701
- /* @__PURE__ */ t.jsxs("div", { className: g.productInfo, children: [
1715
+ /* @__PURE__ */ t.jsxs("div", { className: x.productInfo, children: [
1702
1716
  /* @__PURE__ */ t.jsx(
1703
1717
  "img",
1704
1718
  {
1705
- src: `https://imagedelivery.net/${d.images[0].cfId}/w=500`,
1719
+ src: `https://imagedelivery.net/${a.images[0].cfId}/w=500`,
1706
1720
  alt: "image",
1707
1721
  width: "100%",
1708
1722
  height: "100%",
1709
- className: g.image
1723
+ className: x.image
1710
1724
  }
1711
1725
  ),
1712
- /* @__PURE__ */ t.jsxs("div", { className: g.content, children: [
1713
- /* @__PURE__ */ t.jsx("div", { className: g.name, children: d.name }),
1714
- /* @__PURE__ */ t.jsxs("div", { className: g.price, children: [
1726
+ /* @__PURE__ */ t.jsxs("div", { className: x.content, children: [
1727
+ /* @__PURE__ */ t.jsx("div", { className: x.name, children: a.name }),
1728
+ /* @__PURE__ */ t.jsxs("div", { className: x.price, children: [
1715
1729
  "$",
1716
- d.variants.find((_) => _.id === d.activeVariantId).price.amount * ((d == null ? void 0 : d.quantity) || 1)
1730
+ a.variants.find((h) => h.id === a.activeVariantId).price.amount * ((a == null ? void 0 : a.quantity) || 1)
1717
1731
  ] })
1718
1732
  ] })
1719
1733
  ] }),
1720
- /* @__PURE__ */ t.jsxs("div", { className: g.productButtons, children: [
1734
+ /* @__PURE__ */ t.jsxs("div", { className: x.productButtons, children: [
1721
1735
  /* @__PURE__ */ t.jsx(
1722
1736
  "div",
1723
1737
  {
1724
1738
  onClick: () => {
1725
- d.quantity !== 1 && j(d);
1739
+ a.quantity !== 1 && u(a);
1726
1740
  },
1727
- className: g.productButton,
1741
+ className: x.productButton,
1728
1742
  children: /* @__PURE__ */ t.jsx(
1729
- x,
1743
+ p,
1730
1744
  {
1731
1745
  name: "Minus",
1732
1746
  fill: "#757575",
@@ -1736,14 +1750,14 @@ const Un = (r) => {
1736
1750
  )
1737
1751
  }
1738
1752
  ),
1739
- /* @__PURE__ */ t.jsx("div", { className: g.productCount, children: d.quantity }),
1753
+ /* @__PURE__ */ t.jsx("div", { className: x.productCount, children: a.quantity }),
1740
1754
  /* @__PURE__ */ t.jsx(
1741
1755
  "div",
1742
1756
  {
1743
- onClick: () => k(d),
1744
- className: g.productButton,
1757
+ onClick: () => v(a),
1758
+ className: x.productButton,
1745
1759
  children: /* @__PURE__ */ t.jsx(
1746
- x,
1760
+ p,
1747
1761
  {
1748
1762
  name: "Plus",
1749
1763
  fill: "#757575",
@@ -1756,14 +1770,14 @@ const Un = (r) => {
1756
1770
  ] })
1757
1771
  ]
1758
1772
  },
1759
- d.id
1773
+ a.id
1760
1774
  )) }),
1761
- /* @__PURE__ */ t.jsxs("div", { className: g.bottom, children: [
1762
- /* @__PURE__ */ t.jsxs("div", { className: g.subtotal, children: [
1763
- /* @__PURE__ */ t.jsxs("div", { className: g.block, children: [
1775
+ /* @__PURE__ */ t.jsxs("div", { className: x.bottom, children: [
1776
+ /* @__PURE__ */ t.jsxs("div", { className: x.subtotal, children: [
1777
+ /* @__PURE__ */ t.jsxs("div", { className: x.block, children: [
1764
1778
  /* @__PURE__ */ t.jsx("span", { children: "Subtotal" }),
1765
1779
  /* @__PURE__ */ t.jsx(
1766
- x,
1780
+ p,
1767
1781
  {
1768
1782
  name: "Info",
1769
1783
  width: 20,
@@ -1772,52 +1786,149 @@ const Un = (r) => {
1772
1786
  }
1773
1787
  )
1774
1788
  ] }),
1775
- /* @__PURE__ */ t.jsxs("div", { children: [
1789
+ /* @__PURE__ */ t.jsxs("div", { className: x.total, children: [
1776
1790
  "$",
1777
- o().total
1791
+ l().total
1778
1792
  ] })
1779
1793
  ] }),
1780
- /* @__PURE__ */ t.jsx(X, { onClick: () => p("/checkout"), children: "Checkout" })
1794
+ /* @__PURE__ */ t.jsx(X, { onClick: () => m("/checkout"), children: "Checkout" })
1781
1795
  ] })
1782
- ] }) : /* @__PURE__ */ t.jsx(En, {})
1796
+ ] }) : /* @__PURE__ */ t.jsx(Hn, {})
1783
1797
  ]
1784
1798
  }
1785
1799
  );
1786
- }, En = () => /* @__PURE__ */ t.jsxs("div", { className: g.empty, children: [
1787
- /* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(x, { name: "Handbag" }) }),
1800
+ }, Hn = () => /* @__PURE__ */ t.jsxs("div", { className: x.empty, children: [
1801
+ /* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(p, { name: "Handbag" }) }),
1788
1802
  /* @__PURE__ */ t.jsx("span", { children: "Your cart is empty" }),
1789
- /* @__PURE__ */ t.jsx("span", { children: "Check out the store's products and add them here" })
1790
- ] });
1803
+ /* @__PURE__ */ t.jsxs("span", { children: [
1804
+ "Check out the store's products and add them",
1805
+ " ",
1806
+ /* @__PURE__ */ t.jsx(
1807
+ "a",
1808
+ {
1809
+ href: "/products",
1810
+ className: x.link,
1811
+ children: "here"
1812
+ }
1813
+ )
1814
+ ] })
1815
+ ] }), Vn = "_share_9g414_1", Fn = "_modal_9g414_8", Un = "_header_9g414_14", Gn = "_socials_9g414_24", Wn = "_social_9g414_24", Xn = "_copy_9g414_34", Yn = "_title_9g414_41", Qn = "_copyWrapper_9g414_47", Jn = "_copyText_9g414_56", L = {
1816
+ share: Vn,
1817
+ modal: Fn,
1818
+ header: Un,
1819
+ socials: Gn,
1820
+ social: Wn,
1821
+ copy: Xn,
1822
+ title: Yn,
1823
+ copyWrapper: Qn,
1824
+ copyText: Jn
1825
+ }, ac = () => {
1826
+ const { isOpenModal: d, setIsOpenModal: n } = gt();
1827
+ function e() {
1828
+ n(!0);
1829
+ }
1830
+ return console.log(d), /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
1831
+ /* @__PURE__ */ t.jsx(
1832
+ "div",
1833
+ {
1834
+ className: L.share,
1835
+ onClick: (o) => {
1836
+ o.stopPropagation(), e();
1837
+ },
1838
+ children: /* @__PURE__ */ t.jsx(
1839
+ p,
1840
+ {
1841
+ name: "Share",
1842
+ fill: "#757575"
1843
+ }
1844
+ )
1845
+ }
1846
+ ),
1847
+ d && /* @__PURE__ */ t.jsx(ht, { close: n, children: /* @__PURE__ */ t.jsx(Kn, {}) })
1848
+ ] });
1849
+ }, rt = {
1850
+ facebook: "FacebookLogo",
1851
+ "x.com": "TwitterLogo",
1852
+ telegram: "TelegramLogo",
1853
+ instagram: "InstagramLogo",
1854
+ discord: "MessengerLogo",
1855
+ tiktok: "TiktokLogo"
1856
+ }, Kn = () => {
1857
+ const { setIsOpenModal: d } = gt(), n = window.location.href;
1858
+ function e() {
1859
+ navigator.clipboard.writeText(n);
1860
+ }
1861
+ return /* @__PURE__ */ t.jsxs(
1862
+ "div",
1863
+ {
1864
+ className: L.modal,
1865
+ onClick: (o) => o.stopPropagation(),
1866
+ children: [
1867
+ /* @__PURE__ */ t.jsxs("div", { className: L.header, children: [
1868
+ /* @__PURE__ */ t.jsx("div", { className: L.title, children: "Share this Post" }),
1869
+ /* @__PURE__ */ t.jsx(
1870
+ p,
1871
+ {
1872
+ name: "X",
1873
+ fill: "#757575",
1874
+ onClick: () => d(!1)
1875
+ }
1876
+ )
1877
+ ] }),
1878
+ /* @__PURE__ */ t.jsx("div", { className: L.socials, children: Object.keys(rt).map((o) => /* @__PURE__ */ t.jsx("div", { className: L.social, children: /* @__PURE__ */ t.jsx(p, { name: rt[o] }) })) }),
1879
+ /* @__PURE__ */ t.jsxs("div", { className: L.copyWrapper, children: [
1880
+ /* @__PURE__ */ t.jsx(
1881
+ "div",
1882
+ {
1883
+ className: D(L.copy, L.copyText),
1884
+ onClick: e,
1885
+ children: n
1886
+ }
1887
+ ),
1888
+ /* @__PURE__ */ t.jsx(
1889
+ "div",
1890
+ {
1891
+ onClick: e,
1892
+ className: L.copy,
1893
+ children: /* @__PURE__ */ t.jsx(p, { name: "Copy" })
1894
+ }
1895
+ )
1896
+ ] })
1897
+ ]
1898
+ }
1899
+ );
1900
+ };
1791
1901
  export {
1792
- Rn as Accordion,
1902
+ ec as Accordion,
1793
1903
  X as Button,
1794
- cs as ButtonTypeSettings,
1795
- Vn as ButtonsSettings,
1796
- Xn as Checkbox,
1904
+ as as ButtonTypeSettings,
1905
+ nc as ButtonsSettings,
1906
+ dc as Checkbox,
1797
1907
  it as ChooseImage,
1798
- Qn as ChooseImageModal,
1799
- Wn as ColorPicker,
1800
- En as EmptyCart,
1801
- Jn as ErrorableBlock,
1802
- zn as HeaderButtons,
1803
- x as Icon,
1908
+ uc as ChooseImageModal,
1909
+ _c as ColorPicker,
1910
+ Hn as EmptyCart,
1911
+ mc as ErrorableBlock,
1912
+ ic as HeaderButtons,
1913
+ p as Icon,
1804
1914
  G as Input,
1805
- ge as ItemsSettings,
1806
- Hn as LayoutSettings,
1807
- Fn as ListingSelector,
1808
- Kn as Loader,
1809
- gt as Modal,
1810
- Zn as Picker,
1811
- Un as ProductOptions,
1812
- tc as Radio,
1813
- bs as RangeSelector,
1814
- Y as Select,
1815
- On as ShoppingButton,
1816
- Dn as ShoppingModalCart,
1817
- ec as Submodal,
1818
- V as Switch,
1819
- Ut as TextSettings,
1820
- lt as Textarea,
1821
- sc as Tip,
1822
- _t as TypesText
1915
+ be as ItemsSettings,
1916
+ sc as LayoutSettings,
1917
+ cc as ListingSelector,
1918
+ pc as Loader,
1919
+ ht as Modal,
1920
+ hc as Picker,
1921
+ oc as ProductOptions,
1922
+ gc as Radio,
1923
+ ks as RangeSelector,
1924
+ W as Select,
1925
+ ac as ShareLink,
1926
+ Mn as ShoppingButton,
1927
+ Rn as ShoppingModalCart,
1928
+ xc as Submodal,
1929
+ H as Switch,
1930
+ Wt as TextSettings,
1931
+ dt as Textarea,
1932
+ fc as Tip,
1933
+ xt as TypesText
1823
1934
  };