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