@billgangcom/theme-lib 1.44.1 → 1.44.3

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,21 +1,21 @@
1
- import { j as t, I as v, c as U, a as K, S as st, T as qt, b as et, C as ft, u as $t, d as Nt, D as wt, e as Ct, v as Bt, B as lt, f as _t, P as St, g as Tt, h as Pt, i as Vt, k as Et, l as jt, m as At, M as Mt, n as Dt, o as Lt, p as Ut } from "./index-Dg3e7rFo.js";
2
- import { q as Aa, L as Ma } from "./index-Dg3e7rFo.js";
1
+ import { j as t, I as b, c as Y, a as tt, S as st, T as Et, b as et, C as bt, u as yt, d as kt, D as $t, e as It, v as Nt, B as ot, f as ht, P as wt, g as Ct, h as St, i as Vt, s as Yt, k as Dt, l as Bt, m as Ot, M as Mt, n as Ut, o as Ht, p as Gt } from "./index-FNbiNtjB.js";
2
+ import { q as uc, L as _c } from "./index-FNbiNtjB.js";
3
3
  import f from "react";
4
4
  import "@phosphor-icons/react";
5
- const Yt = "_wrapper_1ibay_2", Gt = "_alignmentBlock_1ibay_8", Xt = "_title_1ibay_15", Wt = "_subtitle_1ibay_22", Jt = "_alignmentContent_1ibay_29", Qt = "_alignments_1ibay_37", Kt = "_alignment_1ibay_8", Zt = "_circle_1ibay_60", te = "_paddings_1ibay_67", ee = "_padding_1ibay_67", se = "_active_1ibay_91", ne = "_input_1ibay_98", J = {
6
- wrapper: Yt,
7
- alignmentBlock: Gt,
8
- title: Xt,
9
- subtitle: Wt,
10
- alignmentContent: Jt,
11
- alignments: Qt,
12
- alignment: Kt,
13
- circle: Zt,
14
- paddings: te,
15
- padding: ee,
16
- active: se,
17
- input: ne
18
- }, ie = [
5
+ const Xt = "_wrapper_1ibay_2", Wt = "_alignmentBlock_1ibay_8", Jt = "_title_1ibay_15", Qt = "_subtitle_1ibay_22", Kt = "_alignmentContent_1ibay_29", Zt = "_alignments_1ibay_37", te = "_alignment_1ibay_8", ee = "_circle_1ibay_60", se = "_paddings_1ibay_67", ne = "_padding_1ibay_67", ie = "_active_1ibay_91", oe = "_input_1ibay_98", K = {
6
+ wrapper: Xt,
7
+ alignmentBlock: Wt,
8
+ title: Jt,
9
+ subtitle: Qt,
10
+ alignmentContent: Kt,
11
+ alignments: Zt,
12
+ alignment: te,
13
+ circle: ee,
14
+ paddings: se,
15
+ padding: ne,
16
+ active: ie,
17
+ input: oe
18
+ }, ae = [
19
19
  "topLeft",
20
20
  "top",
21
21
  "topRight",
@@ -25,10 +25,10 @@ const Yt = "_wrapper_1ibay_2", Gt = "_alignmentBlock_1ibay_8", Xt = "_title_1iba
25
25
  "bottomLeft",
26
26
  "bottom",
27
27
  "bottomRight"
28
- ], oe = ["left", "top", "right", "bottom"], ba = (d) => {
29
- const { alignment: o, padding: e, setPadding: s, setAlignment: i } = d;
30
- function a(h) {
31
- switch (h) {
28
+ ], ce = ["left", "top", "right", "bottom"], Wa = (u) => {
29
+ const { alignment: a, padding: e, setPadding: s, setAlignment: i } = u;
30
+ function c(p) {
31
+ switch (p) {
32
32
  case "left":
33
33
  case "topLeft":
34
34
  case "bottomLeft":
@@ -45,8 +45,8 @@ const Yt = "_wrapper_1ibay_2", Gt = "_alignmentBlock_1ibay_8", Xt = "_title_1iba
45
45
  return "TextAlignCenter";
46
46
  }
47
47
  }
48
- function l(h) {
49
- switch (h) {
48
+ function l(p) {
49
+ switch (p) {
50
50
  case "left":
51
51
  return "AlignLeft";
52
52
  case "right":
@@ -57,40 +57,40 @@ const Yt = "_wrapper_1ibay_2", Gt = "_alignmentBlock_1ibay_8", Xt = "_title_1iba
57
57
  return "AlignBottom";
58
58
  }
59
59
  }
60
- const [r, n] = f.useState(null), [c, x] = f.useState(null);
61
- return /* @__PURE__ */ t.jsxs("div", { className: J.layout, children: [
62
- /* @__PURE__ */ t.jsx("h3", { className: J.title, children: "Layout" }),
63
- /* @__PURE__ */ t.jsxs("div", { className: J.alignmentBlock, children: [
64
- /* @__PURE__ */ t.jsx("h5", { className: J.subtitle, children: "Alignment" }),
65
- /* @__PURE__ */ t.jsxs("div", { className: J.alignmentContent, children: [
66
- /* @__PURE__ */ t.jsx("div", { className: J.alignments, children: ie.map((h) => /* @__PURE__ */ t.jsxs(
60
+ const [o, n] = f.useState(null), [d, j] = f.useState(null);
61
+ return /* @__PURE__ */ t.jsxs("div", { className: K.layout, children: [
62
+ /* @__PURE__ */ t.jsx("h3", { className: K.title, children: "Layout" }),
63
+ /* @__PURE__ */ t.jsxs("div", { className: K.alignmentBlock, children: [
64
+ /* @__PURE__ */ t.jsx("h5", { className: K.subtitle, children: "Alignment" }),
65
+ /* @__PURE__ */ t.jsxs("div", { className: K.alignmentContent, children: [
66
+ /* @__PURE__ */ t.jsx("div", { className: K.alignments, children: ae.map((p) => /* @__PURE__ */ t.jsxs(
67
67
  "div",
68
68
  {
69
69
  onClick: () => {
70
- i(h);
70
+ i(p);
71
71
  },
72
- className: J.alignment,
72
+ className: K.alignment,
73
73
  onMouseEnter: () => {
74
- n(h);
74
+ n(p);
75
75
  },
76
76
  onMouseLeave: () => {
77
77
  n(null);
78
78
  },
79
79
  children: [
80
- h !== o && r !== h && /* @__PURE__ */ t.jsx("div", { className: J.circle }),
81
- h !== o && r === h && /* @__PURE__ */ t.jsx(
82
- v,
80
+ p !== a && o !== p && /* @__PURE__ */ t.jsx("div", { className: K.circle }),
81
+ p !== a && o === p && /* @__PURE__ */ t.jsx(
82
+ b,
83
83
  {
84
- name: a(r),
84
+ name: c(o),
85
85
  fill: "#c2c2c2",
86
86
  width: 22,
87
87
  height: 22
88
88
  }
89
89
  ),
90
- h === o && /* @__PURE__ */ t.jsx(
91
- v,
90
+ p === a && /* @__PURE__ */ t.jsx(
91
+ b,
92
92
  {
93
- name: a(o),
93
+ name: c(a),
94
94
  fill: "#FF3F19",
95
95
  width: 22,
96
96
  height: 22
@@ -98,37 +98,37 @@ const Yt = "_wrapper_1ibay_2", Gt = "_alignmentBlock_1ibay_8", Xt = "_title_1iba
98
98
  )
99
99
  ]
100
100
  },
101
- h
101
+ p
102
102
  )) }),
103
- /* @__PURE__ */ t.jsx("div", { className: J.paddings, children: oe.map((h) => /* @__PURE__ */ t.jsxs(
103
+ /* @__PURE__ */ t.jsx("div", { className: K.paddings, children: ce.map((p) => /* @__PURE__ */ t.jsxs(
104
104
  "label",
105
105
  {
106
- className: U(J.padding, {
107
- [J.active]: c === h
106
+ className: Y(K.padding, {
107
+ [K.active]: d === p
108
108
  }),
109
109
  onFocus: () => {
110
- x(h);
110
+ j(p);
111
111
  },
112
112
  onBlur: () => {
113
- x(null);
113
+ j(null);
114
114
  },
115
115
  children: [
116
116
  /* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
117
- v,
117
+ b,
118
118
  {
119
- name: l(h),
119
+ name: l(p),
120
120
  width: 20,
121
121
  height: 20
122
122
  }
123
123
  ) }),
124
124
  /* @__PURE__ */ t.jsx(
125
- K,
125
+ tt,
126
126
  {
127
127
  type: "number",
128
- value: String(e[h]),
129
- onChange: (p) => s({
128
+ value: String(e[p]),
129
+ onChange: (r) => s({
130
130
  ...e,
131
- [h]: Number(p)
131
+ [p]: Number(r)
132
132
  }),
133
133
  paddingless: !0,
134
134
  borderless: !0
@@ -136,24 +136,24 @@ const Yt = "_wrapper_1ibay_2", Gt = "_alignmentBlock_1ibay_8", Xt = "_title_1iba
136
136
  )
137
137
  ]
138
138
  },
139
- h
139
+ p
140
140
  )) })
141
141
  ] })
142
142
  ] })
143
143
  ] });
144
- }, ae = "_title_1jkiw_1", ce = "_subtitle_1jkiw_5", le = "_header_1jkiw_12", re = "_text_1jkiw_13", de = "_top_1jkiw_20", ue = "_itemsBlock_1jkiw_29", ht = {
145
- title: ae,
146
- subtitle: ce,
147
- header: le,
148
- text: re,
149
- top: de,
150
- itemsBlock: ue
151
- }, me = "_typeTexts_167ez_1", _e = "_block_167ez_8", he = "_active_167ez_25", kt = {
152
- typeTexts: me,
153
- block: _e,
154
- active: he
155
- }, pe = ["bold", "italic", "underline", "strike-through", "code"], Ht = (d) => {
156
- const { typesText: o, setTypesText: e } = d;
144
+ }, le = "_title_1jkiw_1", re = "_subtitle_1jkiw_5", de = "_header_1jkiw_12", ue = "_text_1jkiw_13", _e = "_top_1jkiw_20", me = "_itemsBlock_1jkiw_29", pt = {
145
+ title: le,
146
+ subtitle: re,
147
+ header: de,
148
+ text: ue,
149
+ top: _e,
150
+ itemsBlock: me
151
+ }, he = "_typeTexts_167ez_1", pe = "_block_167ez_8", fe = "_active_167ez_25", Pt = {
152
+ typeTexts: he,
153
+ block: pe,
154
+ active: fe
155
+ }, ge = ["bold", "italic", "underline", "strike-through", "code"], Rt = (u) => {
156
+ const { typesText: a, setTypesText: e } = u;
157
157
  function s(i) {
158
158
  switch (i) {
159
159
  case "bold":
@@ -168,25 +168,25 @@ const Yt = "_wrapper_1ibay_2", Gt = "_alignmentBlock_1ibay_8", Xt = "_title_1iba
168
168
  return "TextUnderline";
169
169
  }
170
170
  }
171
- return /* @__PURE__ */ t.jsx("div", { className: kt.typeTexts, children: pe.map((i) => /* @__PURE__ */ t.jsx(
171
+ return /* @__PURE__ */ t.jsx("div", { className: Pt.typeTexts, children: ge.map((i) => /* @__PURE__ */ t.jsx(
172
172
  "div",
173
173
  {
174
- className: U(kt.block, {
175
- [kt.active]: o.includes(i)
174
+ className: Y(Pt.block, {
175
+ [Pt.active]: a.includes(i)
176
176
  }),
177
177
  onClick: () => {
178
- const a = [...o];
179
- if (a.includes(i)) {
180
- const l = a.filter((r) => r !== i);
178
+ const c = [...a];
179
+ if (c.includes(i)) {
180
+ const l = c.filter((o) => o !== i);
181
181
  e(l);
182
182
  } else
183
- a.push(i), e(a);
183
+ c.push(i), e(c);
184
184
  },
185
185
  children: /* @__PURE__ */ t.jsx(
186
- v,
186
+ b,
187
187
  {
188
188
  name: s(i),
189
- fill: o.includes(i) ? "#252525" : "#757575",
189
+ fill: a.includes(i) ? "#252525" : "#757575",
190
190
  width: 20,
191
191
  height: 20
192
192
  }
@@ -194,7 +194,7 @@ const Yt = "_wrapper_1ibay_2", Gt = "_alignmentBlock_1ibay_8", Xt = "_title_1iba
194
194
  },
195
195
  String(i)
196
196
  )) });
197
- }, pt = {
197
+ }, ft = {
198
198
  h1: "Heading 1",
199
199
  h2: "Heading 2",
200
200
  h3: "Heading 3",
@@ -202,44 +202,44 @@ const Yt = "_wrapper_1ibay_2", Gt = "_alignmentBlock_1ibay_8", Xt = "_title_1iba
202
202
  h5: "Heading 5",
203
203
  h6: "Heading 6",
204
204
  p: "Paragraph"
205
- }, zt = (d) => {
205
+ }, Lt = (u) => {
206
206
  const {
207
- typesText: o,
207
+ typesText: a,
208
208
  isActiveText: e,
209
209
  setIsActiveText: s,
210
210
  text: i,
211
- setText: a,
211
+ setText: c,
212
212
  setTypesText: l,
213
- title: r,
213
+ title: o,
214
214
  subtitle: n = "Items",
215
- typeFont: c,
216
- setTypeFont: x
217
- } = d;
218
- return /* @__PURE__ */ t.jsxs("div", { className: ht.text, children: [
219
- (r || e !== void 0) && /* @__PURE__ */ t.jsxs("div", { className: ht.top, children: [
220
- r && /* @__PURE__ */ t.jsx("h3", { className: ht.title, children: r }),
215
+ typeFont: d,
216
+ setTypeFont: j
217
+ } = u;
218
+ return /* @__PURE__ */ t.jsxs("div", { className: pt.text, children: [
219
+ (o || e !== void 0) && /* @__PURE__ */ t.jsxs("div", { className: pt.top, children: [
220
+ o && /* @__PURE__ */ t.jsx("h3", { className: pt.title, children: o }),
221
221
  e !== void 0 && s && /* @__PURE__ */ t.jsx(
222
222
  st,
223
223
  {
224
224
  current: e,
225
- onChange: (h) => s(h)
225
+ onChange: (p) => s(p)
226
226
  }
227
227
  )
228
228
  ] }),
229
- /* @__PURE__ */ t.jsxs("div", { className: ht.itemsBlock, children: [
230
- /* @__PURE__ */ t.jsx("h5", { className: ht.subtitle, children: n }),
229
+ /* @__PURE__ */ t.jsxs("div", { className: pt.itemsBlock, children: [
230
+ /* @__PURE__ */ t.jsx("h5", { className: pt.subtitle, children: n }),
231
231
  /* @__PURE__ */ t.jsx(
232
- qt,
232
+ Et,
233
233
  {
234
- onChange: (h) => a(h),
234
+ onChange: (p) => c(p),
235
235
  value: i,
236
236
  maxLength: 150
237
237
  }
238
238
  ),
239
239
  /* @__PURE__ */ t.jsx(
240
- Ht,
240
+ Rt,
241
241
  {
242
- typesText: o,
242
+ typesText: a,
243
243
  setTypesText: l
244
244
  }
245
245
  ),
@@ -247,55 +247,55 @@ const Yt = "_wrapper_1ibay_2", Gt = "_alignmentBlock_1ibay_8", Xt = "_title_1iba
247
247
  et,
248
248
  {
249
249
  label: "Type Text",
250
- options: Object.values(pt).filter(
251
- (h) => h !== pt[c]
250
+ options: Object.values(ft).filter(
251
+ (p) => p !== ft[d]
252
252
  ),
253
- onChange: (h) => x(
254
- Object.keys(pt).find(
255
- (p) => pt[p] === h
253
+ onChange: (p) => j(
254
+ Object.keys(ft).find(
255
+ (r) => ft[r] === p
256
256
  )
257
257
  ),
258
- value: pt[c]
258
+ value: ft[d]
259
259
  }
260
260
  )
261
261
  ] })
262
262
  ] });
263
- }, xe = "_title_xma5o_1", ge = "_subtitle_xma5o_5", fe = "_header_xma5o_12", be = "_text_xma5o_13", ve = "_productsBlock_xma5o_14", je = "_top_xma5o_26", ye = "_itemsBlock_xma5o_35", ke = "_typeTexts_xma5o_41", Ie = "_block_xma5o_48", $e = "_active_xma5o_61", Ne = "_products_xma5o_14", we = "_product_xma5o_14", Ce = "_button_xma5o_80", Be = "_disabled_xma5o_91", Se = "_image_xma5o_95", Te = "_info_xma5o_102", Pe = "_name_xma5o_114", Ae = "_buttons_xma5o_118", Me = "_modal_xma5o_125", Oe = "_link_xma5o_145", qe = "_modalOptions_xma5o_151", Ee = "_addButton_xma5o_165", De = "_deleteButton_xma5o_180", Le = "_closeIcon_xma5o_192", L = {
263
+ }, xe = "_title_pef24_1", be = "_subtitle_pef24_5", ve = "_header_pef24_12", je = "_text_pef24_13", ye = "_productsBlock_pef24_14", ke = "_top_pef24_26", $e = "_itemsBlock_pef24_35", Ie = "_typeTexts_pef24_41", Ne = "_block_pef24_48", we = "_active_pef24_61", Ce = "_products_pef24_14", Se = "_product_pef24_14", Be = "_button_pef24_80", Te = "_disabled_pef24_91", Pe = "_image_pef24_95", Ae = "_info_pef24_102", Oe = "_name_pef24_114", Me = "_buttons_pef24_118", qe = "_modal_pef24_125", Ee = "_link_pef24_145", De = "_modalOptions_pef24_151", Ue = "_addButton_pef24_164", He = "_deleteButton_pef24_179", Re = "_closeIcon_pef24_191", z = {
264
264
  title: xe,
265
- subtitle: ge,
266
- header: fe,
267
- text: be,
268
- productsBlock: ve,
269
- top: je,
270
- itemsBlock: ye,
271
- typeTexts: ke,
272
- block: Ie,
273
- active: $e,
274
- products: Ne,
275
- product: we,
276
- button: Ce,
277
- disabled: Be,
278
- image: Se,
279
- info: Te,
280
- name: Pe,
281
- buttons: Ae,
282
- modal: Me,
283
- link: Oe,
284
- modalOptions: qe,
285
- addButton: Ee,
286
- deleteButton: De,
287
- closeIcon: Le
288
- }, He = f.forwardRef(
289
- (d, o) => {
290
- const { activeItem: e, setActiveItem: s, popupPosition: i, modalOptions: a, setIsOpenModal: l } = d;
291
- function r(n, c) {
292
- return n.length > c ? `${n.slice(0, c)}...` : n;
265
+ subtitle: be,
266
+ header: ve,
267
+ text: je,
268
+ productsBlock: ye,
269
+ top: ke,
270
+ itemsBlock: $e,
271
+ typeTexts: Ie,
272
+ block: Ne,
273
+ active: we,
274
+ products: Ce,
275
+ product: Se,
276
+ button: Be,
277
+ disabled: Te,
278
+ image: Pe,
279
+ info: Ae,
280
+ name: Oe,
281
+ buttons: Me,
282
+ modal: qe,
283
+ link: Ee,
284
+ modalOptions: De,
285
+ addButton: Ue,
286
+ deleteButton: He,
287
+ closeIcon: Re
288
+ }, Le = f.forwardRef(
289
+ (u, a) => {
290
+ const { activeItem: e, setActiveItem: s, popupPosition: i, modalOptions: c, setIsOpenModal: l } = u;
291
+ function o(n, d) {
292
+ return n.length > d ? `${n.slice(0, d)}...` : n;
293
293
  }
294
294
  return /* @__PURE__ */ t.jsxs(
295
295
  "div",
296
296
  {
297
- ref: o,
298
- className: L.modal,
297
+ ref: a,
298
+ className: z.modal,
299
299
  onClick: (n) => {
300
300
  n.stopPropagation();
301
301
  },
@@ -304,10 +304,10 @@ const Yt = "_wrapper_1ibay_2", Gt = "_alignmentBlock_1ibay_8", Xt = "_title_1iba
304
304
  left: `${i.left}px`
305
305
  },
306
306
  children: [
307
- /* @__PURE__ */ t.jsxs("div", { className: L.top, children: [
308
- /* @__PURE__ */ t.jsx("h3", { className: L.title, children: r(e.name, 20) }),
309
- /* @__PURE__ */ t.jsx("div", { className: L.closeIcon, children: /* @__PURE__ */ t.jsx(
310
- v,
307
+ /* @__PURE__ */ t.jsxs("div", { className: z.top, children: [
308
+ /* @__PURE__ */ t.jsx("h3", { className: z.title, children: o(e.name["en-US"], 20) }),
309
+ /* @__PURE__ */ t.jsx("div", { className: z.closeIcon, children: /* @__PURE__ */ t.jsx(
310
+ b,
311
311
  {
312
312
  name: "X",
313
313
  height: 20,
@@ -318,64 +318,66 @@ const Yt = "_wrapper_1ibay_2", Gt = "_alignmentBlock_1ibay_8", Xt = "_title_1iba
318
318
  }
319
319
  ) })
320
320
  ] }),
321
- /* @__PURE__ */ t.jsx("div", { className: L.modalOptions, children: a.map((n) => {
321
+ /* @__PURE__ */ t.jsx("div", { className: z.modalOptions, children: c.map((n) => {
322
322
  if (n.type === "image")
323
323
  return /* @__PURE__ */ t.jsx(
324
- ft,
324
+ bt,
325
325
  {
326
326
  label: "Put up an attractive image",
327
327
  activeImage: e[n.field],
328
- onChange: (c) => {
329
- const x = {
328
+ onChange: (d) => {
329
+ const j = {
330
330
  ...e,
331
- [n.field]: c
331
+ [n.field]: d
332
332
  };
333
- s(x);
333
+ s(j);
334
334
  }
335
335
  },
336
336
  String(n.field)
337
337
  );
338
338
  if (n.type === "text")
339
339
  return /* @__PURE__ */ t.jsx(
340
- zt,
340
+ Lt,
341
341
  {
342
342
  typesText: e[n.field.type],
343
- setTypesText: (c) => {
344
- const x = {
343
+ setTypesText: (d) => {
344
+ const j = {
345
345
  ...e,
346
- [n.field.type]: c
346
+ [n.field.type]: d
347
347
  };
348
- s(x);
348
+ s(j);
349
349
  },
350
- text: e[n.field.text] || "",
351
- setText: (c) => {
352
- const x = {
350
+ text: e[n.field.text]["en-US"] || "",
351
+ setText: (d) => {
352
+ const j = {
353
353
  ...e,
354
- [n.field.text]: c
354
+ [n.field.text]: {
355
+ "en-US": d
356
+ }
355
357
  };
356
- s(x);
358
+ s(j);
357
359
  },
358
- typeFont: e[n.field.type],
359
- setTypeFont: (c) => {
360
- const x = {
360
+ typeFont: e[n.field.typeFont],
361
+ setTypeFont: (d) => {
362
+ const j = {
361
363
  ...e,
362
- [n.field.type]: c
364
+ [n.field.typeFont]: d
363
365
  };
364
- s(x);
366
+ s(j);
365
367
  },
366
368
  subtitle: n.label
367
369
  }
368
370
  );
369
371
  if (n.type === "input")
370
372
  return /* @__PURE__ */ t.jsx(
371
- K,
373
+ tt,
372
374
  {
373
- onChange: (c) => {
374
- const x = {
375
+ onChange: (d) => {
376
+ const j = {
375
377
  ...e,
376
- [n.field]: c
378
+ [n.field]: d
377
379
  };
378
- s(x);
380
+ s(j);
379
381
  },
380
382
  value: e[n.field] || "",
381
383
  label: n.label,
@@ -383,16 +385,16 @@ const Yt = "_wrapper_1ibay_2", Gt = "_alignmentBlock_1ibay_8", Xt = "_title_1iba
383
385
  }
384
386
  );
385
387
  if (n.type === "inputSwitch")
386
- return /* @__PURE__ */ t.jsxs("div", { className: L.link, children: [
388
+ return /* @__PURE__ */ t.jsxs("div", { className: z.link, children: [
387
389
  /* @__PURE__ */ t.jsx(
388
- K,
390
+ tt,
389
391
  {
390
- onChange: (c) => {
391
- const x = {
392
+ onChange: (d) => {
393
+ const j = {
392
394
  ...e,
393
- [n.field.text]: c
395
+ [n.field.text]: d
394
396
  };
395
- s(x);
397
+ s(j);
396
398
  },
397
399
  value: e[n.field.text] || "",
398
400
  label: n.inputLabel,
@@ -404,35 +406,36 @@ const Yt = "_wrapper_1ibay_2", Gt = "_alignmentBlock_1ibay_8", Xt = "_title_1iba
404
406
  {
405
407
  current: !!e[n.field.switch] || !1,
406
408
  label: n.switchLabel,
407
- onChange: (c) => {
408
- const x = {
409
+ onChange: (d) => {
410
+ const j = {
409
411
  ...e,
410
- [n.field.switch]: c
412
+ [n.field.switch]: d
411
413
  };
412
- s(x);
414
+ s(j);
413
415
  }
414
416
  }
415
417
  )
416
418
  ] });
417
419
  if (n.type === "list")
418
420
  return /* @__PURE__ */ t.jsx(
419
- Ue,
421
+ Ge,
420
422
  {
421
423
  items: e[n.field] || [],
422
- setItems: (c) => {
423
- const x = {
424
+ setItems: (d) => {
425
+ const j = {
424
426
  ...e,
425
- [n.field]: c
427
+ [n.field]: d
426
428
  };
427
- s(x);
429
+ s(j);
428
430
  },
429
431
  itemsType: "select",
430
432
  draggable: n.draggable || !1,
431
433
  itemsOptions: n.itemsOptions,
432
434
  deletable: n.deletable || !1,
433
- editable: !1,
435
+ editable: n.editable || !1,
434
436
  subtitle: n.label,
435
- addableOptions: n.addableOptions
437
+ addableOptions: n.addableOptions,
438
+ modalOptions: n.modalOptions
436
439
  }
437
440
  );
438
441
  if (n.type === "select")
@@ -440,16 +443,28 @@ const Yt = "_wrapper_1ibay_2", Gt = "_alignmentBlock_1ibay_8", Xt = "_title_1iba
440
443
  et,
441
444
  {
442
445
  options: n.itemsOptions,
443
- onChange: (c) => {
444
- const x = {
446
+ onChange: (d) => {
447
+ const j = {
445
448
  ...e,
446
- [n.field]: c
449
+ [n.field]: d
447
450
  };
448
- s(x);
451
+ s(j);
449
452
  },
450
453
  label: n.label,
451
454
  value: e[n.field] || "String",
452
- leftAddon: n.leftAddon && n.leftAddon === "icon" && /* @__PURE__ */ t.jsx(v, { name: e[n.field] })
455
+ leftAddon: n.leftAddon && n.leftAddon === "icon" && /* @__PURE__ */ t.jsx(b, { name: e[n.field] }),
456
+ switcher: n.switcher ? {
457
+ value: !!e[n.switcher],
458
+ onChange: (d) => {
459
+ if (n.switcher === "isActive") {
460
+ const j = {
461
+ ...e,
462
+ [n.switcher]: d
463
+ };
464
+ s(j);
465
+ }
466
+ }
467
+ } : void 0
453
468
  }
454
469
  );
455
470
  }) })
@@ -457,19 +472,19 @@ const Yt = "_wrapper_1ibay_2", Gt = "_alignmentBlock_1ibay_8", Xt = "_title_1iba
457
472
  }
458
473
  );
459
474
  }
460
- ), ze = "_other_g74jx_1", Re = "_subtitle_g74jx_7", Fe = "_items_g74jx_14", It = {
475
+ ), ze = "_other_g74jx_1", Fe = "_subtitle_g74jx_7", Ve = "_items_g74jx_14", At = {
461
476
  other: ze,
462
- subtitle: Re,
463
- items: Fe
464
- }, yt = (d) => {
465
- const { items: o, title: e = "Other" } = d;
466
- return /* @__PURE__ */ t.jsxs("div", { className: It.other, children: [
467
- /* @__PURE__ */ t.jsx("h5", { className: It.subtitle, children: e }),
468
- /* @__PURE__ */ t.jsx("div", { className: It.items, children: o.map((s, i) => /* @__PURE__ */ t.jsx(
477
+ subtitle: Fe,
478
+ items: Ve
479
+ }, Tt = (u) => {
480
+ const { items: a, title: e = "Other" } = u;
481
+ return /* @__PURE__ */ t.jsxs("div", { className: At.other, children: [
482
+ /* @__PURE__ */ t.jsx("h5", { className: At.subtitle, children: e }),
483
+ /* @__PURE__ */ t.jsx("div", { className: At.items, children: a.map((s, i) => /* @__PURE__ */ t.jsx(
469
484
  st,
470
485
  {
471
486
  current: s.isItem,
472
- onChange: (a) => s.setIsItem(a),
487
+ onChange: (c) => s.setIsItem(c),
473
488
  label: s.label,
474
489
  hasBackground: !0,
475
490
  paddingless: !1
@@ -478,18 +493,18 @@ const Yt = "_wrapper_1ibay_2", Gt = "_alignmentBlock_1ibay_8", Xt = "_title_1iba
478
493
  )) })
479
494
  ] });
480
495
  };
481
- function Ve({ product: d, children: o }) {
496
+ function Ye({ product: u, children: a }) {
482
497
  const {
483
498
  attributes: e,
484
499
  listeners: s,
485
500
  setNodeRef: i,
486
- transform: a,
501
+ transform: c,
487
502
  transition: l,
488
- isDragging: r
489
- } = Tt({
490
- id: d.id
503
+ isDragging: o
504
+ } = Ct({
505
+ id: u.id
491
506
  }), n = {
492
- transform: Pt.Transform.toString(a),
507
+ transform: St.Transform.toString(c),
493
508
  transition: l
494
509
  };
495
510
  return /* @__PURE__ */ t.jsx(
@@ -497,41 +512,41 @@ function Ve({ product: d, children: o }) {
497
512
  {
498
513
  ref: i,
499
514
  style: n,
500
- className: `${L.product} ${r ? L.dragging : ""}`,
515
+ className: `${z.product} ${o ? z.dragging : ""}`,
501
516
  ...e,
502
517
  ...s,
503
- children: o
518
+ children: a
504
519
  }
505
520
  );
506
521
  }
507
- const Ue = (d) => {
522
+ const Ge = (u) => {
508
523
  const {
509
- isActiveItems: o,
524
+ isActiveItems: a,
510
525
  setIsActiveItems: e,
511
526
  items: s,
512
527
  setItems: i,
513
- other: a,
528
+ other: c,
514
529
  title: l,
515
- subtitle: r,
530
+ subtitle: o,
516
531
  editable: n = !0,
517
- draggable: c = !1,
518
- withImage: x = !1,
519
- deletable: h = !0,
520
- addable: p = !0,
521
- itemsType: _,
522
- itemsPlaceholder: b = "",
523
- itemsOptions: u,
524
- hasRangeSelector: B = !1,
532
+ draggable: d = !1,
533
+ withImage: j = !1,
534
+ deletable: p = !0,
535
+ addable: r = !0,
536
+ itemsType: y,
537
+ itemsPlaceholder: h = "",
538
+ itemsOptions: _,
539
+ hasRangeSelector: w = !1,
525
540
  rangeSelectorOptions: H,
526
- modalOptions: I,
527
- addableOptions: N = {},
528
- limit: g,
529
- autoScrollInterval: C
530
- } = d, [F, S] = f.useState(null), [Y, E] = f.useState({
541
+ modalOptions: $,
542
+ addableOptions: g = {},
543
+ limit: B,
544
+ autoInterval: E
545
+ } = u, [F, T] = f.useState(null), [v, A] = f.useState({
531
546
  top: 0,
532
547
  left: 0
533
- }), [y, M] = f.useState(null), T = f.useRef(null), [W, O] = f.useState(!1), z = $t(
534
- Nt(St, {
548
+ }), [x, I] = f.useState(null), C = f.useRef(null), [R, O] = f.useState(!1), U = yt(
549
+ kt(wt, {
535
550
  activationConstraint: {
536
551
  distance: 5
537
552
  }
@@ -539,36 +554,36 @@ const Ue = (d) => {
539
554
  );
540
555
  f.useEffect(() => {
541
556
  const m = () => {
542
- S(null), O(!1);
557
+ T(null), O(!1);
543
558
  };
544
- return document.body.addEventListener("click", m), S(null), O(!1), () => {
545
- S(null), O(!1), document.body.removeEventListener("click", m);
559
+ return document.body.addEventListener("click", m), T(null), O(!1), () => {
560
+ T(null), O(!1), document.body.removeEventListener("click", m);
546
561
  };
547
562
  }, []), f.useEffect(() => {
548
563
  if (F) {
549
- const m = [...s].map((k) => k.id === F.id ? F : k);
564
+ const m = [...s].map((N) => N.id === F.id ? F : N);
550
565
  i(m);
551
566
  }
552
567
  }, [F]), f.useEffect(() => {
553
- if (T.current && y) {
554
- const m = T.current.getBoundingClientRect().height, k = window.innerHeight;
555
- let P = y.top;
556
- P + m > k + window.scrollY - 200 && (P = k + window.scrollY - m - 200), P < 0 && (P = 10), E({
557
- top: P,
558
- left: y.left
568
+ if (C.current && x) {
569
+ const m = C.current.getBoundingClientRect().height, N = window.innerHeight;
570
+ let M = x.top;
571
+ M + m > N + window.scrollY - 200 && (M = N + window.scrollY - m - 200), M < 0 && (M = 10), A({
572
+ top: M,
573
+ left: x.left
559
574
  });
560
575
  }
561
- }, [T.current, y]);
562
- const Z = (m, k) => {
576
+ }, [C.current, x]);
577
+ const nt = (m, N) => {
563
578
  m.stopPropagation();
564
- const P = m.target.getBoundingClientRect();
565
- M({
566
- top: P.top + window.scrollY,
567
- left: P.left - 30
568
- }), S(k), O(!0);
579
+ const M = m.target.getBoundingClientRect();
580
+ I({
581
+ top: M.top + window.scrollY - 70,
582
+ left: M.left - (r ? 30 : 65)
583
+ }), T(N), O(!0);
569
584
  };
570
- function rt(m) {
571
- if (x)
585
+ function dt(m) {
586
+ if (j)
572
587
  return m ? /* @__PURE__ */ t.jsx(
573
588
  "img",
574
589
  {
@@ -578,7 +593,7 @@ const Ue = (d) => {
578
593
  height: 16
579
594
  }
580
595
  ) : /* @__PURE__ */ t.jsx(
581
- v,
596
+ b,
582
597
  {
583
598
  name: "Image",
584
599
  width: 16,
@@ -587,20 +602,20 @@ const Ue = (d) => {
587
602
  }
588
603
  );
589
604
  }
590
- const j = (m) => {
591
- const { active: k, over: P } = m;
592
- if (P && k.id !== P.id) {
593
- const D = s.findIndex((A) => A.id === k.id), G = s.findIndex((A) => A.id === P.id);
594
- if (D !== -1 && G !== -1) {
595
- const A = [...s], [dt] = A.splice(D, 1);
596
- A.splice(G, 0, dt), i(A);
605
+ const k = (m) => {
606
+ const { active: N, over: M } = m;
607
+ if (M && N.id !== M.id) {
608
+ const L = s.findIndex((q) => q.id === N.id), X = s.findIndex((q) => q.id === M.id);
609
+ if (L !== -1 && X !== -1) {
610
+ const q = [...s], [ut] = q.splice(L, 1);
611
+ q.splice(X, 0, ut), i(q);
597
612
  }
598
613
  }
599
- }, q = (m, k) => {
600
- var D, G;
601
- const P = /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
602
- c && /* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
603
- v,
614
+ }, D = (m, N) => {
615
+ var L, X;
616
+ const M = /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
617
+ d && /* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
618
+ b,
604
619
  {
605
620
  name: "DotsSixVertical",
606
621
  hoverable: !0,
@@ -608,135 +623,143 @@ const Ue = (d) => {
608
623
  height: 20
609
624
  }
610
625
  ) }),
611
- _ === "select" && u && /* @__PURE__ */ t.jsx(
626
+ y === "select" && _ && /* @__PURE__ */ t.jsx(
612
627
  et,
613
628
  {
614
- onChange: (A) => {
615
- const dt = [...s], mt = u.find((bt) => bt.name === A);
629
+ onChange: (q) => {
630
+ const ut = [...s], mt = _.find((vt) => vt.name["en-US"] === q);
616
631
  if (!mt) return;
617
- const ut = dt.map((bt) => bt.id === m.id ? {
632
+ const _t = ut.map((vt) => vt.id === m.id ? {
618
633
  ...mt,
619
- name: A
620
- } : bt);
621
- S({
634
+ name: {
635
+ "en-US": q
636
+ }
637
+ } : vt);
638
+ T({
622
639
  ...m,
623
- name: A
624
- }), i([...ut]);
640
+ name: {
641
+ "en-US": q
642
+ }
643
+ }), i([..._t]);
625
644
  },
626
- value: m.name,
627
- options: u.filter((A) => !s.find((dt) => dt.name === A.name)).map((A) => A.name),
628
- leftAddon: rt(m.images)
645
+ value: m.name["en-US"],
646
+ options: _.filter((q) => !s.find((ut) => ut.name["en-US"] === q.name["en-US"])).map((q) => q.name["en-US"]),
647
+ leftAddon: dt(m.images)
629
648
  }
630
649
  ),
631
- _ === "input" && /* @__PURE__ */ t.jsx(
632
- K,
650
+ y === "input" && /* @__PURE__ */ t.jsx(
651
+ tt,
633
652
  {
634
- onChange: (A) => {
635
- const mt = [...s].map((ut) => ut.id === m.id ? {
653
+ onChange: (q) => {
654
+ const mt = [...s].map((_t) => _t.id === m.id ? {
636
655
  ...m,
637
- name: A
638
- } : ut);
656
+ name: {
657
+ "en-US": q
658
+ }
659
+ } : _t);
639
660
  i([...mt]);
640
661
  },
641
- value: m.name,
642
- placeholder: b
662
+ value: m.name["en-US"],
663
+ placeholder: h
643
664
  }
644
665
  ),
645
- _ === "image" && /* @__PURE__ */ t.jsx(
646
- ft,
666
+ y === "image" && /* @__PURE__ */ t.jsx(
667
+ bt,
647
668
  {
648
- onChange: (A) => {
649
- const mt = [...s].map((ut) => ut.id === m.id ? {
669
+ onChange: (q) => {
670
+ const mt = [...s].map((_t) => _t.id === m.id ? {
650
671
  ...m,
651
- images: A
652
- } : ut);
672
+ images: q
673
+ } : _t);
653
674
  i([...mt]);
654
675
  },
655
- activeImage: (D = s.find((A) => A.id === m.id)) != null && D.images ? (G = s.find((A) => A.id === m.id)) == null ? void 0 : G.images[0] : void 0
676
+ activeImage: (L = s.find((q) => q.id === m.id)) != null && L.images ? (X = s.find((q) => q.id === m.id)) == null ? void 0 : X.images[0] : void 0
656
677
  }
657
678
  ),
658
- /* @__PURE__ */ t.jsxs("div", { className: L.buttons, children: [
659
- n && /* @__PURE__ */ t.jsx("div", { className: L.deleteButton, children: /* @__PURE__ */ t.jsx(
660
- v,
679
+ /* @__PURE__ */ t.jsxs("div", { className: z.buttons, children: [
680
+ n && /* @__PURE__ */ t.jsx("div", { className: z.deleteButton, children: /* @__PURE__ */ t.jsx(
681
+ b,
661
682
  {
662
683
  name: "Sliders",
663
684
  hoverable: !0,
664
685
  width: 20,
665
686
  height: 20,
666
- onClick: (A) => Z(A, m)
687
+ onClick: (q) => {
688
+ console.log(q, m), nt(q, m);
689
+ }
667
690
  }
668
691
  ) }),
669
- h && /* @__PURE__ */ t.jsx("div", { className: L.deleteButton, children: /* @__PURE__ */ t.jsx(
670
- v,
692
+ p && /* @__PURE__ */ t.jsx("div", { className: z.deleteButton, children: /* @__PURE__ */ t.jsx(
693
+ b,
671
694
  {
672
695
  name: "Trash",
673
696
  hoverable: !0,
674
697
  width: 20,
675
698
  height: 20,
676
699
  fill: "#C12A2A",
677
- onClick: () => i(s.filter((A) => A.id !== m.id))
700
+ onClick: () => i(s.filter((q) => q.id !== m.id))
678
701
  }
679
702
  ) })
680
703
  ] })
681
704
  ] });
682
- return c ? /* @__PURE__ */ t.jsx(
683
- Ve,
705
+ return d ? /* @__PURE__ */ t.jsx(
706
+ Ye,
684
707
  {
685
708
  product: m,
686
- index: k,
687
- children: P
709
+ index: N,
710
+ children: M
688
711
  },
689
712
  m.id
690
713
  ) : /* @__PURE__ */ t.jsx(
691
714
  "div",
692
715
  {
693
- className: L.product,
694
- children: P
716
+ className: z.product,
717
+ children: M
695
718
  },
696
719
  m.id
697
720
  );
698
721
  };
699
- return /* @__PURE__ */ t.jsxs("div", { className: L.productsBlock, children: [
700
- (l || o !== void 0) && /* @__PURE__ */ t.jsxs("div", { className: L.top, children: [
701
- l && /* @__PURE__ */ t.jsx("h3", { className: L.title, children: l }),
702
- o !== void 0 && /* @__PURE__ */ t.jsx(
722
+ return /* @__PURE__ */ t.jsxs("div", { className: z.productsBlock, children: [
723
+ (l || a !== void 0) && /* @__PURE__ */ t.jsxs("div", { className: z.top, children: [
724
+ l && /* @__PURE__ */ t.jsx("h3", { className: z.title, children: l }),
725
+ a !== void 0 && /* @__PURE__ */ t.jsx(
703
726
  st,
704
727
  {
705
- current: o,
728
+ current: a,
706
729
  onChange: (m) => e == null ? void 0 : e(m)
707
730
  }
708
731
  )
709
732
  ] }),
710
- F && n && I && W && /* @__PURE__ */ t.jsx(
711
- He,
733
+ F && n && $ && R && /* @__PURE__ */ t.jsx(
734
+ Le,
712
735
  {
713
- ref: T,
736
+ ref: C,
714
737
  activeItem: F,
715
- setActiveItem: S,
716
- popupPosition: Y,
717
- modalOptions: I,
738
+ setActiveItem: T,
739
+ popupPosition: v,
740
+ modalOptions: $,
718
741
  setIsOpenModal: O
719
742
  }
720
743
  ),
721
- B && H && /* @__PURE__ */ t.jsx(Ot, { ...H }),
722
- /* @__PURE__ */ t.jsxs("div", { className: L.products, children: [
723
- r && /* @__PURE__ */ t.jsx("h5", { className: L.subtitle, children: r }),
724
- c ? /* @__PURE__ */ t.jsx(
725
- wt,
744
+ w && H && /* @__PURE__ */ t.jsx(qt, { ...H }),
745
+ /* @__PURE__ */ t.jsxs("div", { className: z.products, children: [
746
+ o && /* @__PURE__ */ t.jsx("h5", { className: z.subtitle, children: o }),
747
+ d ? /* @__PURE__ */ t.jsx(
748
+ $t,
726
749
  {
727
- sensors: z,
728
- onDragEnd: j,
750
+ sensors: U,
751
+ onDragEnd: k,
729
752
  children: /* @__PURE__ */ t.jsx(
730
- Ct,
753
+ It,
731
754
  {
732
755
  items: s.map((m) => m.id),
733
- strategy: Bt,
734
- children: s.map((m, k) => q(m, k))
756
+ strategy: Nt,
757
+ children: s.map((m, N) => D(m, N))
735
758
  }
736
759
  )
737
760
  }
738
- ) : s.map((m, k) => q(m, k)),
739
- p && /* @__PURE__ */ t.jsx(
761
+ ) : s.map((m, N) => D(m, N)),
762
+ r && /* @__PURE__ */ t.jsx(
740
763
  "div",
741
764
  {
742
765
  style: {
@@ -745,45 +768,49 @@ const Ue = (d) => {
745
768
  justifyContent: "center"
746
769
  },
747
770
  children: /* @__PURE__ */ t.jsx(
748
- lt,
771
+ ot,
749
772
  {
750
773
  withoutHover: !0,
751
- className: U(L.button, {
752
- [L.disabled]: !!(g && g <= s.length || s.length === (u == null ? void 0 : u.length))
774
+ className: Y(z.button, {
775
+ [z.disabled]: !!(B && B <= s.length || s.length === (_ == null ? void 0 : _.length))
753
776
  }),
754
777
  size: "s",
755
- disabled: !!(g && g <= s.length || s.length === (u == null ? void 0 : u.length)),
778
+ disabled: !!(B && B <= s.length || s.length === (_ == null ? void 0 : _.length)),
756
779
  onClick: () => {
757
780
  const m = [...s];
758
- let k = null;
759
- if (u) {
760
- for (let P = 0; P < u.length; P++)
761
- if (!s.find((D) => D.id === u[P].id)) {
762
- k = u[P];
781
+ let N = null;
782
+ if (_) {
783
+ for (let M = 0; M < _.length; M++)
784
+ if (!s.find((L) => L.id === _[M].id)) {
785
+ N = _[M];
763
786
  break;
764
787
  }
765
788
  }
766
- _ === "select" && u ? m.push({
767
- name: k ? k.name : u[0].name,
768
- id: (k == null ? void 0 : k.id) || u[0].id,
769
- ...N
770
- }) : _ === "input" ? m.push({
771
- name: "",
772
- id: _t(),
773
- ...N
789
+ y === "select" && _ ? m.push({
790
+ name: N ? N.name : _[0].name,
791
+ id: (N == null ? void 0 : N.id) || _[0].id,
792
+ ...g
793
+ }) : y === "input" ? m.push({
794
+ name: {
795
+ "en-US": ""
796
+ },
797
+ id: ht(),
798
+ ...g
774
799
  }) : m.push({
775
- name: `Image ${s.length + 1}`,
776
- id: _t(),
777
- ...N
800
+ name: {
801
+ "en-US": `Image ${s.length + 1}`
802
+ },
803
+ id: ht(),
804
+ ...g
778
805
  }), i(m);
779
806
  },
780
807
  style: {
781
808
  width: "fit-content"
782
809
  },
783
- children: /* @__PURE__ */ t.jsxs("div", { className: L.addButton, children: [
810
+ children: /* @__PURE__ */ t.jsxs("div", { className: z.addButton, children: [
784
811
  /* @__PURE__ */ t.jsx("span", { children: "Add Option" }),
785
812
  /* @__PURE__ */ t.jsx(
786
- v,
813
+ b,
787
814
  {
788
815
  name: "Plus",
789
816
  width: 16,
@@ -796,14 +823,14 @@ const Ue = (d) => {
796
823
  }
797
824
  )
798
825
  ] }),
799
- a !== void 0 && /* @__PURE__ */ t.jsx(yt, { items: a }),
800
- C !== void 0 && /* @__PURE__ */ t.jsx(
801
- K,
826
+ c !== void 0 && /* @__PURE__ */ t.jsx(Tt, { items: c }),
827
+ E !== void 0 && /* @__PURE__ */ t.jsx(
828
+ tt,
802
829
  {
803
- label: "Auto scroll interval",
830
+ label: E.title || "Auto scroll interval",
804
831
  type: "number",
805
- value: String(C.scrollInterval),
806
- onChange: (m) => C.setScrollInterval(Number(m)),
832
+ value: String(E.autoInterval),
833
+ onChange: (m) => E.setAutoInterval(Number(m)),
807
834
  min: 0.1,
808
835
  max: 100,
809
836
  style: {
@@ -813,61 +840,61 @@ const Ue = (d) => {
813
840
  }
814
841
  )
815
842
  ] });
816
- }, Ye = "_title_82zux_1", Ge = "_subtitle_82zux_5", Xe = "_header_82zux_12", We = "_text_82zux_13", Je = "_productsBlock_82zux_14", Qe = "_top_82zux_26", Ke = "_itemsBlock_82zux_35", Ze = "_typeTexts_82zux_41", ts = "_block_82zux_48", es = "_active_82zux_61", ss = "_products_82zux_14", ns = "_product_82zux_14", is = "_button_82zux_80", os = "_disabled_82zux_91", as = "_image_82zux_95", cs = "_info_82zux_102", ls = "_name_82zux_114", rs = "_buttons_82zux_118", ds = "_modal_82zux_125", us = "_link_82zux_145", ms = "_modalOptions_82zux_151", _s = "_addButton_82zux_157", hs = "_deleteButton_82zux_179", Q = {
817
- title: Ye,
818
- subtitle: Ge,
819
- header: Xe,
820
- text: We,
821
- productsBlock: Je,
822
- top: Qe,
823
- itemsBlock: Ke,
824
- typeTexts: Ze,
825
- block: ts,
826
- active: es,
827
- products: ss,
828
- product: ns,
829
- button: is,
830
- disabled: os,
831
- image: as,
832
- info: cs,
833
- name: ls,
834
- buttons: rs,
835
- modal: ds,
836
- link: us,
837
- modalOptions: ms,
838
- addButton: _s,
839
- deleteButton: hs
840
- }, va = (d) => {
843
+ }, Xe = "_title_82zux_1", We = "_subtitle_82zux_5", Je = "_header_82zux_12", Qe = "_text_82zux_13", Ke = "_productsBlock_82zux_14", Ze = "_top_82zux_26", ts = "_itemsBlock_82zux_35", es = "_typeTexts_82zux_41", ss = "_block_82zux_48", ns = "_active_82zux_61", is = "_products_82zux_14", os = "_product_82zux_14", as = "_button_82zux_80", cs = "_disabled_82zux_91", ls = "_image_82zux_95", rs = "_info_82zux_102", ds = "_name_82zux_114", us = "_buttons_82zux_118", _s = "_modal_82zux_125", ms = "_link_82zux_145", hs = "_modalOptions_82zux_151", ps = "_addButton_82zux_157", fs = "_deleteButton_82zux_179", Z = {
844
+ title: Xe,
845
+ subtitle: We,
846
+ header: Je,
847
+ text: Qe,
848
+ productsBlock: Ke,
849
+ top: Ze,
850
+ itemsBlock: ts,
851
+ typeTexts: es,
852
+ block: ss,
853
+ active: ns,
854
+ products: is,
855
+ product: os,
856
+ button: as,
857
+ disabled: cs,
858
+ image: ls,
859
+ info: rs,
860
+ name: ds,
861
+ buttons: us,
862
+ modal: _s,
863
+ link: ms,
864
+ modalOptions: hs,
865
+ addButton: ps,
866
+ deleteButton: fs
867
+ }, Ja = (u) => {
841
868
  const {
842
- isActiveItems: o,
869
+ isActiveItems: a,
843
870
  setIsActiveItems: e,
844
871
  items: s,
845
872
  setItems: i,
846
- other: a,
873
+ other: c,
847
874
  title: l,
848
- subtitle: r,
875
+ subtitle: o,
849
876
  draggable: n = !1,
850
- withImage: c = !1,
851
- addable: x = !0,
852
- itemsOptions: h,
853
- hasRangeSelector: p = !1,
854
- rangeSelectorOptions: _,
855
- limit: b,
856
- autoScrollInterval: u,
857
- deletable: B
858
- } = d;
859
- function H(N) {
860
- if (c)
861
- return N ? /* @__PURE__ */ t.jsx(
877
+ withImage: d = !1,
878
+ addable: j = !0,
879
+ itemsOptions: p,
880
+ hasRangeSelector: r = !1,
881
+ rangeSelectorOptions: y,
882
+ limit: h,
883
+ autoScrollInterval: _,
884
+ deletable: w
885
+ } = u;
886
+ function H(g) {
887
+ if (d)
888
+ return g ? /* @__PURE__ */ t.jsx(
862
889
  "img",
863
890
  {
864
- src: `https://imagedelivery.net/${N[0]}/w=1000`,
891
+ src: `https://imagedelivery.net/${g[0]}/w=1000`,
865
892
  alt: "image",
866
893
  width: 16,
867
894
  height: 16
868
895
  }
869
896
  ) : /* @__PURE__ */ t.jsx(
870
- v,
897
+ b,
871
898
  {
872
899
  name: "Image",
873
900
  width: 16,
@@ -876,12 +903,12 @@ const Ue = (d) => {
876
903
  }
877
904
  );
878
905
  }
879
- const I = (N, g = !1) => {
880
- const C = h.find((S) => S.id === N);
881
- if (!C) return;
906
+ const $ = (g, B = !1) => {
907
+ const E = p.find((T) => T.id === g);
908
+ if (!E) return;
882
909
  const F = /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
883
910
  n && /* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
884
- v,
911
+ b,
885
912
  {
886
913
  name: "DotsSixVertical",
887
914
  hoverable: !0,
@@ -892,54 +919,54 @@ const Ue = (d) => {
892
919
  /* @__PURE__ */ t.jsx(
893
920
  et,
894
921
  {
895
- onChange: (S) => {
896
- const Y = [...s], E = h.find((T) => T.name === S);
897
- if (!E) return;
898
- const y = E.id, M = Y.map((T) => T === N ? y : T);
899
- i([...M]);
922
+ onChange: (T) => {
923
+ const v = [...s], A = p.find((C) => C.name === T);
924
+ if (!A) return;
925
+ const x = A.id, I = v.map((C) => C === g ? x : C);
926
+ i([...I]);
900
927
  },
901
- value: C.name,
902
- options: h.filter((S) => !s.find((Y) => Y === S.id)).map((S) => S.name),
903
- leftAddon: H(C.images)
928
+ value: E.name,
929
+ options: p.filter((T) => !s.find((v) => v === T.id)).map((T) => T.name),
930
+ leftAddon: H(E.images)
904
931
  }
905
932
  ),
906
- g && /* @__PURE__ */ t.jsx("div", { className: Q.buttons, children: /* @__PURE__ */ t.jsx("div", { className: Q.deleteButton, children: /* @__PURE__ */ t.jsx(
907
- v,
933
+ B && /* @__PURE__ */ t.jsx("div", { className: Z.buttons, children: /* @__PURE__ */ t.jsx("div", { className: Z.deleteButton, children: /* @__PURE__ */ t.jsx(
934
+ b,
908
935
  {
909
936
  name: "Trash",
910
937
  hoverable: !0,
911
938
  width: 20,
912
939
  height: 20,
913
940
  fill: "#C12A2A",
914
- onClick: () => i(s.filter((S) => S !== N))
941
+ onClick: () => i(s.filter((T) => T !== g))
915
942
  }
916
943
  ) }) })
917
944
  ] });
918
945
  return /* @__PURE__ */ t.jsx(
919
946
  "div",
920
947
  {
921
- className: Q.product,
948
+ className: Z.product,
922
949
  children: F
923
950
  },
924
- N
951
+ g
925
952
  );
926
953
  };
927
- return /* @__PURE__ */ t.jsxs("div", { className: Q.productsBlock, children: [
928
- (l || o !== void 0) && /* @__PURE__ */ t.jsxs("div", { className: Q.top, children: [
929
- l && /* @__PURE__ */ t.jsx("h3", { className: Q.title, children: l }),
930
- o !== void 0 && /* @__PURE__ */ t.jsx(
954
+ return /* @__PURE__ */ t.jsxs("div", { className: Z.productsBlock, children: [
955
+ (l || a !== void 0) && /* @__PURE__ */ t.jsxs("div", { className: Z.top, children: [
956
+ l && /* @__PURE__ */ t.jsx("h3", { className: Z.title, children: l }),
957
+ a !== void 0 && /* @__PURE__ */ t.jsx(
931
958
  st,
932
959
  {
933
- current: o,
934
- onChange: (N) => e == null ? void 0 : e(N)
960
+ current: a,
961
+ onChange: (g) => e == null ? void 0 : e(g)
935
962
  }
936
963
  )
937
964
  ] }),
938
- p && _ && /* @__PURE__ */ t.jsx(Ot, { ..._ }),
939
- /* @__PURE__ */ t.jsxs("div", { className: Q.products, children: [
940
- r && /* @__PURE__ */ t.jsx("h5", { className: Q.subtitle, children: r }),
941
- s.map((N) => I(N, B)),
942
- x && /* @__PURE__ */ t.jsx(
965
+ r && y && /* @__PURE__ */ t.jsx(qt, { ...y }),
966
+ /* @__PURE__ */ t.jsxs("div", { className: Z.products, children: [
967
+ o && /* @__PURE__ */ t.jsx("h5", { className: Z.subtitle, children: o }),
968
+ s.map((g) => $(g, w)),
969
+ j && /* @__PURE__ */ t.jsx(
943
970
  "div",
944
971
  {
945
972
  style: {
@@ -949,33 +976,33 @@ const Ue = (d) => {
949
976
  gap: 5
950
977
  },
951
978
  children: /* @__PURE__ */ t.jsx(
952
- lt,
979
+ ot,
953
980
  {
954
981
  withoutHover: !0,
955
- className: U(Q.button, {
956
- [Q.disabled]: !!(b && b <= s.length || s.length === h.length)
982
+ className: Y(Z.button, {
983
+ [Z.disabled]: !!(h && h <= s.length || s.length === p.length)
957
984
  }),
958
985
  size: "s",
959
- disabled: !!(b && b <= s.length || s.length === h.length),
986
+ disabled: !!(h && h <= s.length || s.length === p.length),
960
987
  onClick: () => {
961
- const N = [...s];
962
- let g = null;
963
- if (h) {
964
- for (let C = 0; C < h.length; C++)
965
- if (!s.find((F) => F === h[C].id)) {
966
- g = h[C];
988
+ const g = [...s];
989
+ let B = null;
990
+ if (p) {
991
+ for (let E = 0; E < p.length; E++)
992
+ if (!s.find((F) => F === p[E].id)) {
993
+ B = p[E];
967
994
  break;
968
995
  }
969
996
  }
970
- N.push((g == null ? void 0 : g.id) || h[0].id), i(N);
997
+ g.push((B == null ? void 0 : B.id) || p[0].id), i(g);
971
998
  },
972
999
  style: {
973
1000
  width: "fit-content"
974
1001
  },
975
- children: /* @__PURE__ */ t.jsxs("div", { className: Q.addButton, children: [
1002
+ children: /* @__PURE__ */ t.jsxs("div", { className: Z.addButton, children: [
976
1003
  /* @__PURE__ */ t.jsx("span", { children: "Add Option" }),
977
1004
  /* @__PURE__ */ t.jsx(
978
- v,
1005
+ b,
979
1006
  {
980
1007
  name: "Plus",
981
1008
  width: 16,
@@ -988,14 +1015,14 @@ const Ue = (d) => {
988
1015
  }
989
1016
  )
990
1017
  ] }),
991
- a !== void 0 && /* @__PURE__ */ t.jsx(yt, { items: a }),
992
- u !== void 0 && /* @__PURE__ */ t.jsx(
993
- K,
1018
+ c !== void 0 && /* @__PURE__ */ t.jsx(Tt, { items: c }),
1019
+ _ !== void 0 && /* @__PURE__ */ t.jsx(
1020
+ tt,
994
1021
  {
995
1022
  label: "Auto scroll interval",
996
1023
  type: "number",
997
- value: String(u.scrollInterval),
998
- onChange: (N) => u.setScrollInterval(Number(N)),
1024
+ value: String(_.scrollInterval),
1025
+ onChange: (g) => _.setScrollInterval(Number(g)),
999
1026
  min: 0.1,
1000
1027
  max: 100,
1001
1028
  style: {
@@ -1005,54 +1032,306 @@ const Ue = (d) => {
1005
1032
  }
1006
1033
  )
1007
1034
  ] });
1008
- }, ps = "_title_1vfw9_1", xs = "_subtitle_1vfw9_5", gs = "_header_1vfw9_12", fs = "_text_1vfw9_13", bs = "_productsBlock_1vfw9_14", vs = "_top_1vfw9_26", js = "_itemsBlock_1vfw9_35", ys = "_typeTexts_1vfw9_41", ks = "_block_1vfw9_48", Is = "_active_1vfw9_61", $s = "_products_1vfw9_14", Ns = "_product_1vfw9_14", ws = "_button_1vfw9_80", Cs = "_disabled_1vfw9_91", Bs = "_image_1vfw9_95", Ss = "_info_1vfw9_102", Ts = "_name_1vfw9_114", Ps = "_buttons_1vfw9_118", As = "_modal_1vfw9_125", Ms = "_link_1vfw9_145", Os = "_modalOptions_1vfw9_151", qs = "_addButton_1vfw9_164", Es = "_deleteButton_1vfw9_179", Ds = "_closeIcon_1vfw9_191", R = {
1009
- title: ps,
1035
+ }, gs = "_title_roi3a_1", xs = "_subtitle_roi3a_5", bs = "_header_roi3a_12", vs = "_text_roi3a_13", js = "_productsBlock_roi3a_14", ys = "_top_roi3a_26", ks = "_itemsBlock_roi3a_35", $s = "_typeTexts_roi3a_41", Is = "_block_roi3a_48", Ns = "_active_roi3a_61", ws = "_products_roi3a_14", Cs = "_product_roi3a_14", Ss = "_button_roi3a_80", Bs = "_disabled_roi3a_91", Ts = "_image_roi3a_95", Ps = "_info_roi3a_102", As = "_name_roi3a_114", Os = "_buttons_roi3a_118", Ms = "_modal_roi3a_125", qs = "_link_roi3a_145", Es = "_modalOptions_roi3a_151", Ds = "_addButton_roi3a_164", Us = "_deleteButton_roi3a_179", Hs = "_closeIcon_roi3a_191", J = {
1036
+ title: gs,
1010
1037
  subtitle: xs,
1011
- header: gs,
1012
- text: fs,
1013
- productsBlock: bs,
1014
- top: vs,
1015
- itemsBlock: js,
1016
- typeTexts: ys,
1017
- block: ks,
1018
- active: Is,
1019
- products: $s,
1020
- product: Ns,
1021
- button: ws,
1022
- disabled: Cs,
1023
- image: Bs,
1024
- info: Ss,
1025
- name: Ts,
1026
- buttons: Ps,
1027
- modal: As,
1028
- link: Ms,
1029
- modalOptions: Os,
1030
- addButton: qs,
1031
- deleteButton: Es,
1032
- closeIcon: Ds
1033
- }, Ls = f.forwardRef(
1034
- (d, o) => {
1035
- const { activeItem: e, setActiveItem: s, popupPosition: i, modalOptions: a, setIsOpenModal: l } = d;
1036
- function r(n, c) {
1037
- return n.length > c ? `${n.slice(0, c)}...` : n;
1038
+ header: bs,
1039
+ text: vs,
1040
+ productsBlock: js,
1041
+ top: ys,
1042
+ itemsBlock: ks,
1043
+ typeTexts: $s,
1044
+ block: Is,
1045
+ active: Ns,
1046
+ products: ws,
1047
+ product: Cs,
1048
+ button: Ss,
1049
+ disabled: Bs,
1050
+ image: Ts,
1051
+ info: Ps,
1052
+ name: As,
1053
+ buttons: Os,
1054
+ modal: Ms,
1055
+ link: qs,
1056
+ modalOptions: Es,
1057
+ addButton: Ds,
1058
+ deleteButton: Us,
1059
+ closeIcon: Hs
1060
+ };
1061
+ function Rs({ product: u, children: a }) {
1062
+ const {
1063
+ attributes: e,
1064
+ listeners: s,
1065
+ setNodeRef: i,
1066
+ transform: c,
1067
+ transition: l,
1068
+ isDragging: o
1069
+ } = Ct({
1070
+ id: u.id
1071
+ }), n = {
1072
+ transform: St.Transform.toString(c),
1073
+ transition: l
1074
+ };
1075
+ return /* @__PURE__ */ t.jsx(
1076
+ "div",
1077
+ {
1078
+ ref: i,
1079
+ style: n,
1080
+ className: `${J.product} ${o ? J.dragging : ""}`,
1081
+ ...e,
1082
+ ...s,
1083
+ children: a
1084
+ }
1085
+ );
1086
+ }
1087
+ const Qa = (u) => {
1088
+ const {
1089
+ isActiveItems: a,
1090
+ setIsActiveItems: e,
1091
+ items: s,
1092
+ setItems: i,
1093
+ title: c,
1094
+ subtitle: l,
1095
+ editable: o = !0,
1096
+ draggable: n = !1,
1097
+ deletable: d = !0,
1098
+ addable: j = !0,
1099
+ itemsType: p,
1100
+ itemsOptions: r,
1101
+ addableOptions: y = {},
1102
+ limit: h
1103
+ } = u, [_, w] = f.useState(null), [H, $] = f.useState(null), g = f.useRef(null), B = yt(
1104
+ kt(wt, {
1105
+ activationConstraint: {
1106
+ distance: 5
1107
+ }
1108
+ })
1109
+ );
1110
+ f.useEffect(() => {
1111
+ if (_) {
1112
+ const v = [...s].map((A) => A.id === _.id ? _ : A);
1113
+ i(v);
1038
1114
  }
1115
+ }, [_]), f.useEffect(() => {
1116
+ g.current && H && (g.current.getBoundingClientRect().height, H.top);
1117
+ }, [g.current, H]);
1118
+ const E = (v, A) => {
1119
+ v.stopPropagation();
1120
+ const x = v.target.getBoundingClientRect();
1121
+ $({
1122
+ top: x.top + window.scrollY,
1123
+ left: x.left - 30
1124
+ }), w(A);
1125
+ }, F = (v) => {
1126
+ const { active: A, over: x } = v;
1127
+ if (x && A.id !== x.id) {
1128
+ const I = s.findIndex((R) => R.id === A.id), C = s.findIndex((R) => R.id === x.id);
1129
+ if (I !== -1 && C !== -1) {
1130
+ const R = [...s], [O] = R.splice(I, 1);
1131
+ R.splice(C, 0, O), i(R);
1132
+ }
1133
+ }
1134
+ }, T = (v, A) => {
1135
+ const x = /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
1136
+ n && /* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
1137
+ b,
1138
+ {
1139
+ name: "DotsSixVertical",
1140
+ hoverable: !0,
1141
+ width: 20,
1142
+ height: 20
1143
+ }
1144
+ ) }),
1145
+ p === "select" && r && /* @__PURE__ */ t.jsx(
1146
+ et,
1147
+ {
1148
+ onChange: (I) => {
1149
+ const C = [...s], R = r.find((U) => U.name === I);
1150
+ if (!R) return;
1151
+ const O = C.map((U) => U.id === v.id ? {
1152
+ ...R,
1153
+ name: {
1154
+ "en-US": I
1155
+ }
1156
+ } : U);
1157
+ w({
1158
+ ...v,
1159
+ name: {
1160
+ "en-US": I
1161
+ }
1162
+ }), i([...O]);
1163
+ },
1164
+ value: v.name,
1165
+ options: r.filter((I) => !s.find((C) => C.name === I.name)).map((I) => I.name)
1166
+ }
1167
+ ),
1168
+ /* @__PURE__ */ t.jsxs("div", { className: J.buttons, children: [
1169
+ o && /* @__PURE__ */ t.jsx("div", { className: J.deleteButton, children: /* @__PURE__ */ t.jsx(
1170
+ b,
1171
+ {
1172
+ name: "Sliders",
1173
+ hoverable: !0,
1174
+ width: 20,
1175
+ height: 20,
1176
+ onClick: (I) => E(I, v)
1177
+ }
1178
+ ) }),
1179
+ d && /* @__PURE__ */ t.jsx("div", { className: J.deleteButton, children: /* @__PURE__ */ t.jsx(
1180
+ b,
1181
+ {
1182
+ name: "Trash",
1183
+ hoverable: !0,
1184
+ width: 20,
1185
+ height: 20,
1186
+ fill: "#C12A2A",
1187
+ onClick: () => i(s.filter((I) => I.id !== v.id))
1188
+ }
1189
+ ) })
1190
+ ] })
1191
+ ] });
1192
+ return n ? /* @__PURE__ */ t.jsx(
1193
+ Rs,
1194
+ {
1195
+ product: v,
1196
+ index: A,
1197
+ children: x
1198
+ },
1199
+ v.id
1200
+ ) : /* @__PURE__ */ t.jsx(
1201
+ "div",
1202
+ {
1203
+ className: J.product,
1204
+ children: x
1205
+ },
1206
+ v.id
1207
+ );
1208
+ };
1209
+ return /* @__PURE__ */ t.jsxs("div", { className: J.productsBlock, children: [
1210
+ (c || a !== void 0) && /* @__PURE__ */ t.jsxs("div", { className: J.top, children: [
1211
+ c && /* @__PURE__ */ t.jsx("h3", { className: J.title, children: c }),
1212
+ a !== void 0 && /* @__PURE__ */ t.jsx(
1213
+ st,
1214
+ {
1215
+ current: a,
1216
+ onChange: (v) => e == null ? void 0 : e(v)
1217
+ }
1218
+ )
1219
+ ] }),
1220
+ /* @__PURE__ */ t.jsxs("div", { className: J.products, children: [
1221
+ l && /* @__PURE__ */ t.jsx("h5", { className: J.subtitle, children: l }),
1222
+ n ? /* @__PURE__ */ t.jsx(
1223
+ $t,
1224
+ {
1225
+ sensors: B,
1226
+ onDragEnd: F,
1227
+ children: /* @__PURE__ */ t.jsx(
1228
+ It,
1229
+ {
1230
+ items: s.map((v) => v.id),
1231
+ strategy: Nt,
1232
+ children: s.map((v, A) => T(v, A))
1233
+ }
1234
+ )
1235
+ }
1236
+ ) : s.map((v, A) => T(v, A)),
1237
+ j && /* @__PURE__ */ t.jsx(
1238
+ "div",
1239
+ {
1240
+ style: {
1241
+ width: "100%",
1242
+ display: "flex",
1243
+ justifyContent: "center"
1244
+ },
1245
+ children: /* @__PURE__ */ t.jsx(
1246
+ ot,
1247
+ {
1248
+ withoutHover: !0,
1249
+ className: Y(J.button, {
1250
+ [J.disabled]: !!(h && h <= s.length || s.length === (r == null ? void 0 : r.length))
1251
+ }),
1252
+ size: "s",
1253
+ disabled: !!(h && h <= s.length || s.length === (r == null ? void 0 : r.length)),
1254
+ onClick: () => {
1255
+ const v = [...s];
1256
+ let A = null;
1257
+ if (r) {
1258
+ for (let x = 0; x < r.length; x++)
1259
+ if (!s.find((I) => I.id === r[x].id)) {
1260
+ A = r[x];
1261
+ break;
1262
+ }
1263
+ }
1264
+ p === "select" && r && v.push({
1265
+ name: A ? A.name : r[0].name,
1266
+ id: (A == null ? void 0 : A.id) || r[0].id,
1267
+ ...y
1268
+ }), i(v);
1269
+ },
1270
+ style: {
1271
+ width: "fit-content"
1272
+ },
1273
+ children: /* @__PURE__ */ t.jsxs("div", { className: J.addButton, children: [
1274
+ /* @__PURE__ */ t.jsx("span", { children: "Add Option" }),
1275
+ /* @__PURE__ */ t.jsx(
1276
+ b,
1277
+ {
1278
+ name: "Plus",
1279
+ width: 16,
1280
+ height: 16
1281
+ }
1282
+ )
1283
+ ] })
1284
+ }
1285
+ )
1286
+ }
1287
+ )
1288
+ ] })
1289
+ ] });
1290
+ }, Ls = "_title_1vfw9_1", zs = "_subtitle_1vfw9_5", Fs = "_header_1vfw9_12", Vs = "_text_1vfw9_13", Ys = "_productsBlock_1vfw9_14", Gs = "_top_1vfw9_26", Xs = "_itemsBlock_1vfw9_35", Ws = "_typeTexts_1vfw9_41", Js = "_block_1vfw9_48", Qs = "_active_1vfw9_61", Ks = "_products_1vfw9_14", Zs = "_product_1vfw9_14", tn = "_button_1vfw9_80", en = "_disabled_1vfw9_91", sn = "_image_1vfw9_95", nn = "_info_1vfw9_102", on = "_name_1vfw9_114", an = "_buttons_1vfw9_118", cn = "_modal_1vfw9_125", ln = "_link_1vfw9_145", rn = "_modalOptions_1vfw9_151", dn = "_addButton_1vfw9_164", un = "_deleteButton_1vfw9_179", _n = "_closeIcon_1vfw9_191", V = {
1291
+ title: Ls,
1292
+ subtitle: zs,
1293
+ header: Fs,
1294
+ text: Vs,
1295
+ productsBlock: Ys,
1296
+ top: Gs,
1297
+ itemsBlock: Xs,
1298
+ typeTexts: Ws,
1299
+ block: Js,
1300
+ active: Qs,
1301
+ products: Ks,
1302
+ product: Zs,
1303
+ button: tn,
1304
+ disabled: en,
1305
+ image: sn,
1306
+ info: nn,
1307
+ name: on,
1308
+ buttons: an,
1309
+ modal: cn,
1310
+ link: ln,
1311
+ modalOptions: rn,
1312
+ addButton: dn,
1313
+ deleteButton: un,
1314
+ closeIcon: _n
1315
+ }, mn = f.forwardRef(
1316
+ (u, a) => {
1317
+ const { activeItem: e, setActiveItem: s, popupPosition: i, modalOptions: c, setIsOpenModal: l } = u;
1039
1318
  return /* @__PURE__ */ t.jsxs(
1040
1319
  "div",
1041
1320
  {
1042
- ref: o,
1043
- className: R.modal,
1044
- onClick: (n) => {
1045
- n.stopPropagation();
1321
+ ref: a,
1322
+ className: V.modal,
1323
+ onClick: (o) => {
1324
+ o.stopPropagation();
1046
1325
  },
1047
1326
  style: {
1048
1327
  top: `${i.top}px`,
1049
1328
  left: `${i.left}px`
1050
1329
  },
1051
1330
  children: [
1052
- /* @__PURE__ */ t.jsxs("div", { className: R.top, children: [
1053
- /* @__PURE__ */ t.jsx("h3", { className: R.title, children: r(e.name, 20) }),
1054
- /* @__PURE__ */ t.jsx("div", { className: R.closeIcon, children: /* @__PURE__ */ t.jsx(
1055
- v,
1331
+ /* @__PURE__ */ t.jsxs("div", { className: V.top, children: [
1332
+ /* @__PURE__ */ t.jsx("h3", { className: V.title, children: e.name["en-US"] }),
1333
+ /* @__PURE__ */ t.jsx("div", { className: V.closeIcon, children: /* @__PURE__ */ t.jsx(
1334
+ b,
1056
1335
  {
1057
1336
  name: "X",
1058
1337
  height: 20,
@@ -1064,117 +1343,119 @@ const Ue = (d) => {
1064
1343
  }
1065
1344
  ) })
1066
1345
  ] }),
1067
- /* @__PURE__ */ t.jsx("div", { className: R.modalOptions, children: a.map((n) => {
1068
- if (n.type === "image")
1346
+ /* @__PURE__ */ t.jsx("div", { className: V.modalOptions, children: c.map((o) => {
1347
+ if (o.type === "image")
1069
1348
  return /* @__PURE__ */ t.jsx(
1070
- ft,
1349
+ bt,
1071
1350
  {
1072
1351
  label: "Put up an attractive image",
1073
- activeImage: e[n.field],
1074
- onChange: (c) => {
1075
- const x = {
1352
+ activeImage: e[o.field],
1353
+ onChange: (n) => {
1354
+ const d = {
1076
1355
  ...e,
1077
- [n.field]: c
1356
+ [o.field]: n
1078
1357
  };
1079
- s(x);
1358
+ s(d);
1080
1359
  }
1081
1360
  },
1082
- String(n.field)
1361
+ String(o.field)
1083
1362
  );
1084
- if (n.type === "text")
1363
+ if (o.type === "text")
1085
1364
  return /* @__PURE__ */ t.jsx(
1086
- zt,
1365
+ Lt,
1087
1366
  {
1088
- typesText: e[n.field.type],
1089
- setTypesText: (c) => {
1090
- const x = {
1367
+ typesText: e[o.field.type],
1368
+ setTypesText: (n) => {
1369
+ const d = {
1091
1370
  ...e,
1092
- [n.field.type]: c
1371
+ [o.field.type]: n
1093
1372
  };
1094
- s(x);
1373
+ s(d);
1095
1374
  },
1096
- text: e[n.field.text] || "",
1097
- setText: (c) => {
1098
- const x = {
1375
+ text: e[o.field.text]["en-US"] || "",
1376
+ setText: (n) => {
1377
+ const d = {
1099
1378
  ...e,
1100
- [n.field.text]: c
1379
+ [o.field.text]: {
1380
+ "en-US": n
1381
+ }
1101
1382
  };
1102
- s(x);
1383
+ s(d);
1103
1384
  },
1104
- typeFont: e[n.field.type],
1105
- setTypeFont: (c) => {
1106
- const x = {
1385
+ typeFont: e[o.field.type],
1386
+ setTypeFont: (n) => {
1387
+ const d = {
1107
1388
  ...e,
1108
- [n.field.type]: c
1389
+ [o.field.type]: n
1109
1390
  };
1110
- s(x);
1391
+ s(d);
1111
1392
  },
1112
- subtitle: n.label
1393
+ subtitle: o.label
1113
1394
  }
1114
1395
  );
1115
- if (n.type === "input")
1396
+ if (o.type === "input")
1116
1397
  return /* @__PURE__ */ t.jsx(
1117
- K,
1398
+ tt,
1118
1399
  {
1119
- onChange: (c) => {
1120
- const x = {
1400
+ onChange: (n) => {
1401
+ const d = {
1121
1402
  ...e,
1122
- [n.field]: c
1403
+ [o.field]: n
1123
1404
  };
1124
- s(x);
1405
+ s(d);
1125
1406
  },
1126
- value: e[n.field] || "",
1127
- label: n.label,
1128
- placeholder: n.placeholder
1407
+ value: e[o.field] || "",
1408
+ label: o.label,
1409
+ placeholder: o.placeholder
1129
1410
  }
1130
1411
  );
1131
- if (n.type === "inputSwitch")
1132
- return /* @__PURE__ */ t.jsxs("div", { className: R.link, children: [
1412
+ if (o.type === "inputSwitch")
1413
+ return /* @__PURE__ */ t.jsxs("div", { className: V.link, children: [
1133
1414
  /* @__PURE__ */ t.jsx(
1134
- K,
1415
+ tt,
1135
1416
  {
1136
- onChange: (c) => {
1137
- const x = {
1417
+ onChange: (n) => {
1418
+ const d = {
1138
1419
  ...e,
1139
- [n.field.text]: c
1420
+ [o.field.text]: n
1140
1421
  };
1141
- s(x);
1422
+ s(d);
1142
1423
  },
1143
- value: e[n.field.text] || "",
1144
- label: n.inputLabel,
1145
- placeholder: n.placeholder
1424
+ value: e[o.field.text] || "",
1425
+ label: o.inputLabel,
1426
+ placeholder: o.placeholder
1146
1427
  }
1147
1428
  ),
1148
1429
  /* @__PURE__ */ t.jsx(
1149
1430
  st,
1150
1431
  {
1151
- current: !!e[n.field.switch] || !1,
1152
- label: n.switchLabel,
1153
- onChange: (c) => {
1154
- const x = {
1432
+ current: !!e[o.field.switch] || !1,
1433
+ label: o.switchLabel,
1434
+ onChange: (n) => {
1435
+ const d = {
1155
1436
  ...e,
1156
- [n.field.switch]: c
1437
+ [o.field.switch]: n
1157
1438
  };
1158
- s(x);
1439
+ s(d);
1159
1440
  }
1160
1441
  }
1161
1442
  )
1162
1443
  ] });
1163
- if (n.type === "select")
1444
+ if (o.type === "select")
1164
1445
  return /* @__PURE__ */ t.jsx(
1165
1446
  et,
1166
1447
  {
1167
- options: n.itemsOptions,
1168
- onChange: (c) => {
1169
- const x = {
1448
+ options: o.itemsOptions,
1449
+ onChange: (n) => {
1450
+ const d = {
1170
1451
  ...e,
1171
- [n.field]: c
1452
+ [o.field]: n
1172
1453
  };
1173
- s(x);
1454
+ s(d);
1174
1455
  },
1175
- label: n.label,
1176
- value: e[n.field] || "String",
1177
- leftAddon: n.leftAddon && n.leftAddon === "icon" && /* @__PURE__ */ t.jsx(v, { name: e[n.field] })
1456
+ label: o.label,
1457
+ value: e[o.field] || "String",
1458
+ leftAddon: o.leftAddon && o.leftAddon === "icon" && /* @__PURE__ */ t.jsx(b, { name: e[o.field] })
1178
1459
  }
1179
1460
  );
1180
1461
  }) })
@@ -1183,98 +1464,98 @@ const Ue = (d) => {
1183
1464
  );
1184
1465
  }
1185
1466
  );
1186
- function Hs(d) {
1187
- const { product: o, children: e } = d, { attributes: s, listeners: i, setNodeRef: a, transform: l, transition: r, isDragging: n } = Tt({
1188
- id: o.id
1189
- }), c = {
1190
- transform: Pt.Transform.toString(l),
1191
- transition: r
1467
+ function hn(u) {
1468
+ const { product: a, children: e } = u, { attributes: s, listeners: i, setNodeRef: c, transform: l, transition: o, isDragging: n } = Ct({
1469
+ id: a.id
1470
+ }), d = {
1471
+ transform: St.Transform.toString(l),
1472
+ transition: o
1192
1473
  };
1193
1474
  return /* @__PURE__ */ t.jsx(
1194
1475
  "div",
1195
1476
  {
1196
- ref: a,
1197
- style: c,
1198
- className: `${R.product} ${n ? R.dragging : ""}`,
1477
+ ref: c,
1478
+ style: d,
1479
+ className: `${V.product} ${n ? V.dragging : ""}`,
1199
1480
  ...s,
1200
1481
  ...i,
1201
1482
  children: e
1202
1483
  }
1203
1484
  );
1204
1485
  }
1205
- const ja = (d) => {
1486
+ const Ka = (u) => {
1206
1487
  const {
1207
- isActiveItems: o,
1488
+ isActiveItems: a,
1208
1489
  setIsActiveItems: e,
1209
1490
  items: s,
1210
1491
  setItems: i,
1211
- other: a,
1492
+ other: c,
1212
1493
  title: l,
1213
- subtitle: r,
1494
+ subtitle: o,
1214
1495
  editable: n = !0,
1215
- draggable: c = !1,
1216
- withImage: x = !1,
1217
- deletable: h = !0,
1218
- addable: p = !0,
1219
- itemsType: _,
1220
- itemsPlaceholder: b = "",
1221
- itemsOptions: u,
1222
- hasRangeSelector: B = !1,
1496
+ draggable: d = !1,
1497
+ withImage: j = !1,
1498
+ deletable: p = !0,
1499
+ addable: r = !0,
1500
+ itemsType: y,
1501
+ itemsPlaceholder: h = "",
1502
+ itemsOptions: _,
1503
+ hasRangeSelector: w = !1,
1223
1504
  rangeSelectorOptions: H,
1224
- modalOptions: I,
1225
- addableOptions: N = {}
1226
- } = d, [g, C] = f.useState(null), [F, S] = f.useState({
1505
+ modalOptions: $,
1506
+ addableOptions: g = {}
1507
+ } = u, [B, E] = f.useState(null), [F, T] = f.useState({
1227
1508
  top: 0,
1228
1509
  left: 0
1229
- }), [Y, E] = f.useState(null), y = f.useRef(null), [M, T] = f.useState(!1), W = $t(
1230
- Nt(St, {
1510
+ }), [v, A] = f.useState(null), x = f.useRef(null), [I, C] = f.useState(!1), R = yt(
1511
+ kt(wt, {
1231
1512
  activationConstraint: {
1232
1513
  distance: 5
1233
1514
  }
1234
1515
  })
1235
1516
  );
1236
1517
  f.useEffect(() => {
1237
- const j = () => {
1238
- C(null), T(!1);
1518
+ const k = () => {
1519
+ E(null), C(!1);
1239
1520
  };
1240
- return document.body.addEventListener("click", j), C(null), T(!1), () => {
1241
- C(null), T(!1), document.body.removeEventListener("click", j);
1521
+ return document.body.addEventListener("click", k), E(null), C(!1), () => {
1522
+ E(null), C(!1), document.body.removeEventListener("click", k);
1242
1523
  };
1243
1524
  }, []), f.useEffect(() => {
1244
- if (g) {
1245
- const j = [...s].map((q) => q.id === g.id ? g : q);
1246
- i(j);
1525
+ if (B) {
1526
+ const k = [...s].map((D) => D.id === B.id ? B : D);
1527
+ i(k);
1247
1528
  }
1248
- }, [g]), f.useEffect(() => {
1249
- if (y.current && Y) {
1250
- const j = y.current.getBoundingClientRect().height, q = window.innerHeight;
1251
- let m = Y.top;
1252
- m + j > q + window.scrollY - 200 && (m = q + window.scrollY - j - 200), m < 0 && (m = 10), S({
1529
+ }, [B]), f.useEffect(() => {
1530
+ if (x.current && v) {
1531
+ const k = x.current.getBoundingClientRect().height, D = window.innerHeight;
1532
+ let m = v.top;
1533
+ m + k > D + window.scrollY - 200 && (m = D + window.scrollY - k - 200), m < 0 && (m = 10), T({
1253
1534
  top: m,
1254
- left: Y.left
1535
+ left: v.left
1255
1536
  });
1256
1537
  }
1257
- }, [y.current, Y]);
1258
- const O = (j, q) => {
1259
- j.stopPropagation();
1260
- const m = j.target.getBoundingClientRect();
1261
- E({
1538
+ }, [x.current, v]);
1539
+ const O = (k, D) => {
1540
+ k.stopPropagation();
1541
+ const m = k.target.getBoundingClientRect();
1542
+ A({
1262
1543
  top: m.top + window.scrollY,
1263
1544
  left: m.left - 30
1264
- }), C(q), T(!0);
1545
+ }), E(D), C(!0);
1265
1546
  };
1266
- function z(j) {
1267
- if (x)
1268
- return j ? /* @__PURE__ */ t.jsx(
1547
+ function U(k) {
1548
+ if (j)
1549
+ return k ? /* @__PURE__ */ t.jsx(
1269
1550
  "img",
1270
1551
  {
1271
- src: `https://imagedelivery.net/${j[0]}/w=1000`,
1552
+ src: `https://imagedelivery.net/${k[0]}/w=1000`,
1272
1553
  alt: "image",
1273
1554
  width: 16,
1274
1555
  height: 16
1275
1556
  }
1276
1557
  ) : /* @__PURE__ */ t.jsx(
1277
- v,
1558
+ b,
1278
1559
  {
1279
1560
  name: "Image",
1280
1561
  width: 16,
@@ -1283,20 +1564,20 @@ const ja = (d) => {
1283
1564
  }
1284
1565
  );
1285
1566
  }
1286
- const Z = (j) => {
1287
- const { active: q, over: m } = j;
1288
- if (m && q.id !== m.id) {
1289
- const k = s.findIndex((D) => D.id === q.id), P = s.findIndex((D) => D.id === m.id);
1290
- if (k !== -1 && P !== -1) {
1291
- const D = [...s], [G] = D.splice(k, 1);
1292
- D.splice(P, 0, G), i(D);
1567
+ const nt = (k) => {
1568
+ const { active: D, over: m } = k;
1569
+ if (m && D.id !== m.id) {
1570
+ const N = s.findIndex((L) => L.id === D.id), M = s.findIndex((L) => L.id === m.id);
1571
+ if (N !== -1 && M !== -1) {
1572
+ const L = [...s], [X] = L.splice(N, 1);
1573
+ L.splice(M, 0, X), i(L);
1293
1574
  }
1294
1575
  }
1295
- }, rt = (j) => {
1576
+ }, dt = (k) => {
1296
1577
  var m;
1297
- const q = /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
1298
- c && /* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
1299
- v,
1578
+ const D = /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
1579
+ d && /* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
1580
+ b,
1300
1581
  {
1301
1582
  name: "DotsSixVertical",
1302
1583
  hoverable: !0,
@@ -1304,132 +1585,140 @@ const ja = (d) => {
1304
1585
  height: 20
1305
1586
  }
1306
1587
  ) }),
1307
- _ === "select" && u && /* @__PURE__ */ t.jsx(
1588
+ y === "select" && _ && /* @__PURE__ */ t.jsx(
1308
1589
  et,
1309
1590
  {
1310
- onChange: (k) => {
1311
- const D = [...s].map((G) => G.id === j.id ? {
1312
- ...j,
1313
- name: k
1314
- } : G);
1315
- C({
1316
- ...j,
1317
- name: k
1318
- }), i([...D]);
1591
+ onChange: (N) => {
1592
+ const L = [...s].map((X) => X.id === k.id ? {
1593
+ ...k,
1594
+ name: {
1595
+ "en-US": N
1596
+ }
1597
+ } : X);
1598
+ E({
1599
+ ...k,
1600
+ name: {
1601
+ "en-US": N
1602
+ }
1603
+ }), i([...L]);
1319
1604
  },
1320
- value: j.name,
1321
- options: u.filter((k) => !s.find((P) => P.name === k)),
1322
- leftAddon: z(j.images)
1605
+ value: k.name["en-US"],
1606
+ options: _.filter(
1607
+ (N) => !s.find((M) => M.name["en-US"] === N)
1608
+ ),
1609
+ leftAddon: U(k.images)
1323
1610
  }
1324
1611
  ),
1325
- _ === "input" && /* @__PURE__ */ t.jsx(
1326
- K,
1612
+ y === "input" && /* @__PURE__ */ t.jsx(
1613
+ tt,
1327
1614
  {
1328
- onChange: (k) => {
1329
- const D = [...s].map((G) => G.id === j.id ? {
1330
- ...j,
1331
- name: k
1332
- } : G);
1333
- i([...D]);
1615
+ onChange: (N) => {
1616
+ const L = [...s].map((X) => X.id === k.id ? {
1617
+ ...k,
1618
+ name: {
1619
+ "en-US": N
1620
+ }
1621
+ } : X);
1622
+ i([...L]);
1334
1623
  },
1335
- value: j.name,
1336
- placeholder: b
1624
+ value: k.name["en-US"],
1625
+ placeholder: h
1337
1626
  }
1338
1627
  ),
1339
- _ === "image" && /* @__PURE__ */ t.jsx(
1340
- ft,
1628
+ y === "image" && /* @__PURE__ */ t.jsx(
1629
+ bt,
1341
1630
  {
1342
- onChange: (k) => {
1343
- const D = [...s].map((G) => G.id === j.id ? {
1344
- ...j,
1345
- images: k
1346
- } : G);
1347
- i([...D]);
1631
+ onChange: (N) => {
1632
+ const L = [...s].map((X) => X.id === k.id ? {
1633
+ ...k,
1634
+ images: N
1635
+ } : X);
1636
+ i([...L]);
1348
1637
  },
1349
- activeImage: (m = s.find((k) => k.id === j.id)) == null ? void 0 : m.images[0]
1638
+ activeImage: (m = s.find((N) => N.id === k.id)) == null ? void 0 : m.images[0]
1350
1639
  }
1351
1640
  ),
1352
- /* @__PURE__ */ t.jsxs("div", { className: R.buttons, children: [
1353
- n && /* @__PURE__ */ t.jsx("div", { className: R.deleteButton, children: /* @__PURE__ */ t.jsx(
1354
- v,
1641
+ /* @__PURE__ */ t.jsxs("div", { className: V.buttons, children: [
1642
+ n && /* @__PURE__ */ t.jsx("div", { className: V.deleteButton, children: /* @__PURE__ */ t.jsx(
1643
+ b,
1355
1644
  {
1356
1645
  name: "Sliders",
1357
1646
  hoverable: !0,
1358
1647
  width: 20,
1359
1648
  height: 20,
1360
- onClick: (k) => O(k, j)
1649
+ onClick: (N) => O(N, k)
1361
1650
  }
1362
1651
  ) }),
1363
- h && /* @__PURE__ */ t.jsx("div", { className: R.deleteButton, children: /* @__PURE__ */ t.jsx(
1364
- v,
1652
+ p && /* @__PURE__ */ t.jsx("div", { className: V.deleteButton, children: /* @__PURE__ */ t.jsx(
1653
+ b,
1365
1654
  {
1366
1655
  name: "Trash",
1367
1656
  hoverable: !0,
1368
1657
  width: 20,
1369
1658
  height: 20,
1370
1659
  fill: "#C12A2A",
1371
- onClick: () => i(s.filter((k) => k.id !== j.id))
1660
+ onClick: () => i(s.filter((N) => N.id !== k.id))
1372
1661
  }
1373
1662
  ) })
1374
1663
  ] })
1375
1664
  ] });
1376
- return c ? /* @__PURE__ */ t.jsx(
1377
- Hs,
1665
+ return d ? /* @__PURE__ */ t.jsx(
1666
+ hn,
1378
1667
  {
1379
- product: j,
1380
- children: q
1668
+ product: k,
1669
+ children: D
1381
1670
  },
1382
- j.id
1671
+ k.id
1383
1672
  ) : /* @__PURE__ */ t.jsx(
1384
1673
  "div",
1385
1674
  {
1386
- className: R.product,
1387
- children: q
1675
+ className: V.product,
1676
+ children: D
1388
1677
  },
1389
- j.id
1678
+ k.id
1390
1679
  );
1391
1680
  };
1392
- return /* @__PURE__ */ t.jsxs("div", { className: R.productsBlock, children: [
1393
- (l || o !== void 0) && /* @__PURE__ */ t.jsxs("div", { className: R.top, children: [
1394
- l && /* @__PURE__ */ t.jsx("h3", { className: R.title, children: l }),
1395
- o !== void 0 && /* @__PURE__ */ t.jsx(
1681
+ return /* @__PURE__ */ t.jsxs("div", { className: V.productsBlock, children: [
1682
+ (l || a !== void 0) && /* @__PURE__ */ t.jsxs("div", { className: V.top, children: [
1683
+ l && /* @__PURE__ */ t.jsx("h3", { className: V.title, children: l }),
1684
+ a !== void 0 && /* @__PURE__ */ t.jsx(
1396
1685
  st,
1397
1686
  {
1398
- current: o,
1399
- onChange: (j) => e == null ? void 0 : e(j)
1687
+ current: a,
1688
+ onChange: (k) => e == null ? void 0 : e(k)
1400
1689
  }
1401
1690
  )
1402
1691
  ] }),
1403
- g && n && I && M && /* @__PURE__ */ t.jsx(
1404
- Ls,
1692
+ B && n && $ && I && /* @__PURE__ */ t.jsx(
1693
+ mn,
1405
1694
  {
1406
- ref: y,
1407
- activeItem: g,
1408
- setActiveItem: C,
1695
+ ref: x,
1696
+ activeItem: B,
1697
+ setActiveItem: E,
1409
1698
  popupPosition: F,
1410
- modalOptions: I,
1411
- setIsOpenModal: T
1699
+ modalOptions: $,
1700
+ setIsOpenModal: C
1412
1701
  }
1413
1702
  ),
1414
- B && H && /* @__PURE__ */ t.jsx(Ot, { ...H }),
1415
- /* @__PURE__ */ t.jsxs("div", { className: R.products, children: [
1416
- r && /* @__PURE__ */ t.jsx("h5", { className: R.subtitle, children: r }),
1417
- c ? /* @__PURE__ */ t.jsx(
1418
- wt,
1703
+ w && H && /* @__PURE__ */ t.jsx(qt, { ...H }),
1704
+ /* @__PURE__ */ t.jsxs("div", { className: V.products, children: [
1705
+ o && /* @__PURE__ */ t.jsx("h5", { className: V.subtitle, children: o }),
1706
+ d ? /* @__PURE__ */ t.jsx(
1707
+ $t,
1419
1708
  {
1420
- sensors: W,
1421
- onDragEnd: Z,
1709
+ sensors: R,
1710
+ onDragEnd: nt,
1422
1711
  children: /* @__PURE__ */ t.jsx(
1423
- Ct,
1712
+ It,
1424
1713
  {
1425
- items: s.map((j) => j.id),
1426
- strategy: Bt,
1427
- children: s.map((j) => rt(j))
1714
+ items: s.map((k) => k.id),
1715
+ strategy: Nt,
1716
+ children: s.map((k) => dt(k))
1428
1717
  }
1429
1718
  )
1430
1719
  }
1431
- ) : s.map((j) => rt(j)),
1432
- p && /* @__PURE__ */ t.jsx(
1720
+ ) : s.map((k) => dt(k)),
1721
+ r && /* @__PURE__ */ t.jsx(
1433
1722
  "div",
1434
1723
  {
1435
1724
  style: {
@@ -1438,46 +1727,52 @@ const ja = (d) => {
1438
1727
  justifyContent: "center"
1439
1728
  },
1440
1729
  children: /* @__PURE__ */ t.jsx(
1441
- lt,
1730
+ ot,
1442
1731
  {
1443
1732
  withoutHover: !0,
1444
- className: R.button,
1733
+ className: V.button,
1445
1734
  size: "s",
1446
1735
  onClick: () => {
1447
- const j = [...s];
1448
- let q = null;
1449
- if (u) {
1450
- for (let m = 0; m < u.length; m++)
1451
- if (!s.find((k) => k.name === u[m])) {
1452
- q = u[m];
1736
+ const k = [...s];
1737
+ let D = null;
1738
+ if (_) {
1739
+ for (let m = 0; m < _.length; m++)
1740
+ if (!s.find((N) => N.name["en-US"] === _[m])) {
1741
+ D = _[m];
1453
1742
  break;
1454
1743
  }
1455
1744
  }
1456
- _ === "select" && u ? j.push({
1457
- name: q || u[0],
1458
- id: _t(),
1459
- ...N,
1745
+ y === "select" && _ ? k.push({
1746
+ name: {
1747
+ "en-US": D || _[0]
1748
+ },
1749
+ id: ht(),
1750
+ ...g,
1460
1751
  maxSymbols: 100
1461
1752
  // пример значения
1462
- }) : _ === "input" ? j.push({
1463
- name: "",
1464
- id: _t(),
1465
- ...N,
1753
+ }) : y === "input" ? k.push({
1754
+ name: {
1755
+ "en-US": ""
1756
+ },
1757
+ id: ht(),
1758
+ ...g,
1466
1759
  maxSymbols: 100
1467
- }) : j.push({
1468
- name: `Image ${s.length + 1}`,
1469
- id: _t(),
1470
- ...N,
1760
+ }) : k.push({
1761
+ name: {
1762
+ "en-US": `Image ${s.length + 1}`
1763
+ },
1764
+ id: ht(),
1765
+ ...g,
1471
1766
  maxSymbols: 100
1472
- }), i(j);
1767
+ }), i(k);
1473
1768
  },
1474
1769
  style: {
1475
1770
  width: "fit-content"
1476
1771
  },
1477
- children: /* @__PURE__ */ t.jsxs("div", { className: R.addButton, children: [
1772
+ children: /* @__PURE__ */ t.jsxs("div", { className: V.addButton, children: [
1478
1773
  /* @__PURE__ */ t.jsx("span", { children: "Add Option" }),
1479
1774
  /* @__PURE__ */ t.jsx(
1480
- v,
1775
+ b,
1481
1776
  {
1482
1777
  name: "Plus",
1483
1778
  width: 16,
@@ -1490,62 +1785,62 @@ const ja = (d) => {
1490
1785
  }
1491
1786
  )
1492
1787
  ] }),
1493
- a !== void 0 && /* @__PURE__ */ t.jsx(yt, { items: a })
1788
+ c !== void 0 && /* @__PURE__ */ t.jsx(Tt, { items: c })
1494
1789
  ] });
1495
- }, zs = "_title_bn7sv_1", Rs = "_subtitle_bn7sv_5", Fs = "_header_bn7sv_12", Vs = "_text_bn7sv_13", Us = "_productsBlock_bn7sv_14", Ys = "_buttonsBlock_bn7sv_15", Gs = "_top_bn7sv_26", Xs = "_itemsBlock_bn7sv_35", Ws = "_typeTexts_bn7sv_41", Js = "_block_bn7sv_48", Qs = "_active_bn7sv_60", Ks = "_products_bn7sv_14", Zs = "_product_bn7sv_14", tn = "_button_bn7sv_15", en = "_image_bn7sv_90", sn = "_info_bn7sv_97", nn = "_name_bn7sv_109", on = "_buttons_bn7sv_15", an = "_modal_bn7sv_120", cn = "_other_bn7sv_139", ln = "_options_bn7sv_145", rn = "_closeIcon_bn7sv_153", ct = {
1496
- title: zs,
1497
- subtitle: Rs,
1498
- header: Fs,
1499
- text: Vs,
1500
- productsBlock: Us,
1501
- buttonsBlock: Ys,
1502
- top: Gs,
1503
- itemsBlock: Xs,
1504
- typeTexts: Ws,
1505
- block: Js,
1506
- active: Qs,
1507
- products: Ks,
1508
- product: Zs,
1509
- button: tn,
1510
- image: en,
1511
- info: sn,
1512
- name: nn,
1513
- buttons: on,
1514
- modal: an,
1515
- other: cn,
1516
- options: ln,
1517
- closeIcon: rn
1518
- }, dn = f.forwardRef((d, o) => {
1519
- const { activeButton: e, setActiveButton: s, popupPosition: i } = d, [a, l] = f.useState(e.typesText), [r, n] = f.useState(e.destination), [c, x] = f.useState(e.page), [h, p] = f.useState(e.link || ""), [_, b] = f.useState(e.text || ""), [u, B] = f.useState(e.openInNewTab), { pages: H } = Vt();
1790
+ }, pn = "_title_bn7sv_1", fn = "_subtitle_bn7sv_5", gn = "_header_bn7sv_12", xn = "_text_bn7sv_13", bn = "_productsBlock_bn7sv_14", vn = "_buttonsBlock_bn7sv_15", jn = "_top_bn7sv_26", yn = "_itemsBlock_bn7sv_35", kn = "_typeTexts_bn7sv_41", $n = "_block_bn7sv_48", In = "_active_bn7sv_60", Nn = "_products_bn7sv_14", wn = "_product_bn7sv_14", Cn = "_button_bn7sv_15", Sn = "_image_bn7sv_90", Bn = "_info_bn7sv_97", Tn = "_name_bn7sv_109", Pn = "_buttons_bn7sv_15", An = "_modal_bn7sv_120", On = "_other_bn7sv_139", Mn = "_options_bn7sv_145", qn = "_closeIcon_bn7sv_153", rt = {
1791
+ title: pn,
1792
+ subtitle: fn,
1793
+ header: gn,
1794
+ text: xn,
1795
+ productsBlock: bn,
1796
+ buttonsBlock: vn,
1797
+ top: jn,
1798
+ itemsBlock: yn,
1799
+ typeTexts: kn,
1800
+ block: $n,
1801
+ active: In,
1802
+ products: Nn,
1803
+ product: wn,
1804
+ button: Cn,
1805
+ image: Sn,
1806
+ info: Bn,
1807
+ name: Tn,
1808
+ buttons: Pn,
1809
+ modal: An,
1810
+ other: On,
1811
+ options: Mn,
1812
+ closeIcon: qn
1813
+ }, En = f.forwardRef((u, a) => {
1814
+ const { activeButton: e, setActiveButton: s, popupPosition: i } = u, [c, l] = f.useState(e.typesText), [o, n] = f.useState(e.destination), [d, j] = f.useState(e.page), [p, r] = f.useState(e.link || ""), [y, h] = f.useState(e.text || { "en-US": "" }), [_, w] = f.useState(e.openInNewTab), { pages: H } = Vt();
1520
1815
  return f.useEffect(() => {
1521
1816
  s({
1522
1817
  ...e,
1523
1818
  ...{
1524
- text: _,
1525
- link: h,
1526
- destination: r,
1527
- typesText: a,
1528
- page: c,
1529
- openInNewTab: u
1819
+ text: y,
1820
+ link: p,
1821
+ destination: o,
1822
+ typesText: c,
1823
+ page: d,
1824
+ openInNewTab: _
1530
1825
  }
1531
1826
  });
1532
- }, [a, r, h, _, c, u]), /* @__PURE__ */ t.jsxs(
1827
+ }, [c, o, p, y, d, _]), console.log(y), /* @__PURE__ */ t.jsxs(
1533
1828
  "div",
1534
1829
  {
1535
- className: ct.modal,
1536
- onClick: (I) => {
1537
- I.stopPropagation();
1830
+ className: rt.modal,
1831
+ onClick: ($) => {
1832
+ $.stopPropagation();
1538
1833
  },
1539
1834
  style: {
1540
1835
  top: `${i.top}px`,
1541
1836
  left: `${i.left}px`
1542
1837
  },
1543
- ref: o,
1838
+ ref: a,
1544
1839
  children: [
1545
- /* @__PURE__ */ t.jsxs("div", { className: ct.top, children: [
1546
- /* @__PURE__ */ t.jsx("h3", { className: ct.title, children: e.type }),
1547
- /* @__PURE__ */ t.jsx("div", { className: ct.closeIcon, children: /* @__PURE__ */ t.jsx(
1548
- v,
1840
+ /* @__PURE__ */ t.jsxs("div", { className: rt.top, children: [
1841
+ /* @__PURE__ */ t.jsx("h3", { className: rt.title, children: e.type }),
1842
+ /* @__PURE__ */ t.jsx("div", { className: rt.closeIcon, children: /* @__PURE__ */ t.jsx(
1843
+ b,
1549
1844
  {
1550
1845
  name: "X",
1551
1846
  height: 20,
@@ -1555,29 +1850,29 @@ const ja = (d) => {
1555
1850
  }
1556
1851
  ) })
1557
1852
  ] }),
1558
- /* @__PURE__ */ t.jsxs("div", { className: ct.options, children: [
1853
+ /* @__PURE__ */ t.jsxs("div", { className: rt.options, children: [
1559
1854
  /* @__PURE__ */ t.jsx(
1560
1855
  et,
1561
1856
  {
1562
1857
  label: "Destination",
1563
- onChange: (I) => n(I),
1564
- options: ["Go to Page", "Open Link"].filter((I) => I !== r),
1565
- value: r
1858
+ onChange: ($) => n($),
1859
+ options: ["Go to Page", "Open Link"].filter(($) => $ !== o),
1860
+ value: o
1566
1861
  }
1567
1862
  ),
1568
- r === "Go to Page" ? /* @__PURE__ */ t.jsx(
1863
+ o === "Go to Page" ? /* @__PURE__ */ t.jsx(
1569
1864
  et,
1570
1865
  {
1571
1866
  label: "Go to",
1572
- onChange: (I) => x(I),
1573
- options: H ? Object.values(H).filter((I) => I.name !== c).map((I) => I.name) : [],
1574
- value: c
1867
+ onChange: ($) => j($),
1868
+ options: H ? Object.values(H).filter(($) => $.name !== d).map(($) => $.name) : [],
1869
+ value: d
1575
1870
  }
1576
1871
  ) : /* @__PURE__ */ t.jsx(
1577
- K,
1872
+ tt,
1578
1873
  {
1579
- onChange: (I) => p(I),
1580
- value: h,
1874
+ onChange: ($) => r($),
1875
+ value: p,
1581
1876
  placeholder: "https://",
1582
1877
  label: "Link"
1583
1878
  }
@@ -1587,22 +1882,22 @@ const ja = (d) => {
1587
1882
  {
1588
1883
  current: e.openInNewTab,
1589
1884
  label: "Open in new tab",
1590
- onChange: (I) => B(I)
1885
+ onChange: ($) => w($)
1591
1886
  }
1592
1887
  ),
1593
1888
  /* @__PURE__ */ t.jsx(
1594
- qt,
1889
+ Et,
1595
1890
  {
1596
- onChange: (I) => b(I),
1597
- value: _,
1891
+ onChange: ($) => h({ "en-US": $ }),
1892
+ value: y["en-US"],
1598
1893
  label: "Text",
1599
1894
  maxLength: 150
1600
1895
  }
1601
1896
  ),
1602
1897
  /* @__PURE__ */ t.jsx(
1603
- Ht,
1898
+ Rt,
1604
1899
  {
1605
- typesText: a,
1900
+ typesText: c,
1606
1901
  setTypesText: l
1607
1902
  }
1608
1903
  )
@@ -1610,106 +1905,106 @@ const ja = (d) => {
1610
1905
  ]
1611
1906
  }
1612
1907
  );
1613
- }), un = "_subtitle_jql1y_1", mn = "_header_jql1y_8", _n = "_text_jql1y_9", hn = "_productsBlock_jql1y_10", pn = "_buttonsBlock_jql1y_11", xn = "_top_jql1y_23", gn = "_itemsBlock_jql1y_32", fn = "_typeTexts_jql1y_38", bn = "_block_jql1y_45", vn = "_active_jql1y_58", jn = "_products_jql1y_10", yn = "_product_jql1y_10", kn = "_button_jql1y_11", In = "_image_jql1y_88", $n = "_info_jql1y_95", Nn = "_name_jql1y_107", wn = "_buttons_jql1y_11", Cn = "_modal_jql1y_118", Bn = "_other_jql1y_138", Sn = "_options_jql1y_144", Tn = "_addButton_jql1y_150", Pn = "_deleteButton_jql1y_165", it = {
1614
- subtitle: un,
1615
- header: mn,
1616
- text: _n,
1617
- productsBlock: hn,
1618
- buttonsBlock: pn,
1619
- top: xn,
1620
- itemsBlock: gn,
1621
- typeTexts: fn,
1622
- block: bn,
1623
- active: vn,
1624
- products: jn,
1625
- product: yn,
1626
- button: kn,
1627
- image: In,
1628
- info: $n,
1629
- name: Nn,
1630
- buttons: wn,
1631
- modal: Cn,
1632
- other: Bn,
1633
- options: Sn,
1634
- addButton: Tn,
1635
- deleteButton: Pn
1636
- }, An = (d) => {
1637
- const { buttons: o, setButtons: e, deletable: s = !0, addable: i = !0 } = d, [a, l] = f.useState(null), [r, n] = f.useState({
1908
+ }), Dn = "_subtitle_jql1y_1", Un = "_header_jql1y_8", Hn = "_text_jql1y_9", Rn = "_productsBlock_jql1y_10", Ln = "_buttonsBlock_jql1y_11", zn = "_top_jql1y_23", Fn = "_itemsBlock_jql1y_32", Vn = "_typeTexts_jql1y_38", Yn = "_block_jql1y_45", Gn = "_active_jql1y_58", Xn = "_products_jql1y_10", Wn = "_product_jql1y_10", Jn = "_button_jql1y_11", Qn = "_image_jql1y_88", Kn = "_info_jql1y_95", Zn = "_name_jql1y_107", ti = "_buttons_jql1y_11", ei = "_modal_jql1y_118", si = "_other_jql1y_138", ni = "_options_jql1y_144", ii = "_addButton_jql1y_150", oi = "_deleteButton_jql1y_165", at = {
1909
+ subtitle: Dn,
1910
+ header: Un,
1911
+ text: Hn,
1912
+ productsBlock: Rn,
1913
+ buttonsBlock: Ln,
1914
+ top: zn,
1915
+ itemsBlock: Fn,
1916
+ typeTexts: Vn,
1917
+ block: Yn,
1918
+ active: Gn,
1919
+ products: Xn,
1920
+ product: Wn,
1921
+ button: Jn,
1922
+ image: Qn,
1923
+ info: Kn,
1924
+ name: Zn,
1925
+ buttons: ti,
1926
+ modal: ei,
1927
+ other: si,
1928
+ options: ni,
1929
+ addButton: ii,
1930
+ deleteButton: oi
1931
+ }, ai = (u) => {
1932
+ const { buttons: a, setButtons: e, deletable: s = !0, addable: i = !0, editable: c = !0 } = u, [l, o] = f.useState(null), [n, d] = f.useState({
1638
1933
  top: 0,
1639
1934
  left: 0
1640
- }), [c, x] = f.useState(null), h = f.useRef(null);
1935
+ }), [j, p] = f.useState(null), r = f.useRef(null);
1641
1936
  f.useEffect(() => {
1642
- const _ = () => {
1643
- l(null);
1937
+ const h = () => {
1938
+ o(null);
1644
1939
  };
1645
- return document.body.addEventListener("click", _), l(null), () => {
1646
- l(null), document.body.removeEventListener("click", _);
1940
+ return document.body.addEventListener("click", h), o(null), () => {
1941
+ o(null), document.body.removeEventListener("click", h);
1647
1942
  };
1648
1943
  }, []), f.useEffect(() => {
1649
- if (a) {
1650
- const _ = [...o].map((b) => b.id === a.id ? a : b);
1651
- e(_);
1944
+ if (l) {
1945
+ const h = [...a].map((_) => _.id === l.id ? l : _);
1946
+ e(h);
1652
1947
  }
1653
- }, [a]), f.useEffect(() => {
1654
- if (h.current && c) {
1655
- const _ = h.current.getBoundingClientRect().height, b = window.innerHeight;
1656
- let u = c.top;
1657
- u + _ > b + window.scrollY - 200 && (u = b + window.scrollY - _ - 200), u < 0 && (u = 10), n({
1658
- top: u,
1659
- left: c.left
1948
+ }, [l]), f.useEffect(() => {
1949
+ if (r.current && j) {
1950
+ const h = r.current.getBoundingClientRect().height, _ = window.innerHeight;
1951
+ let w = j.top;
1952
+ w + h > _ + window.scrollY - 200 && (w = _ + window.scrollY - h - 200), w < 0 && (w = 10), d({
1953
+ top: w,
1954
+ left: j.left
1660
1955
  });
1661
1956
  }
1662
- }, [h.current, c]);
1663
- const p = (_, b) => {
1664
- _.stopPropagation();
1665
- const u = _.target.getBoundingClientRect();
1666
- x({
1667
- top: u.top + window.scrollY,
1668
- left: u.left - 30
1669
- }), l(b);
1957
+ }, [r.current, j]);
1958
+ const y = (h, _) => {
1959
+ h.stopPropagation();
1960
+ const w = h.target.getBoundingClientRect();
1961
+ p({
1962
+ top: w.top + window.scrollY - 70,
1963
+ left: w.left - (i ? 30 : 65)
1964
+ }), o(_);
1670
1965
  };
1671
- return /* @__PURE__ */ t.jsxs("div", { className: it.products, children: [
1672
- /* @__PURE__ */ t.jsx("h5", { className: it.subtitle, children: "Button Type" }),
1673
- o.map((_) => /* @__PURE__ */ t.jsxs(
1966
+ return /* @__PURE__ */ t.jsxs("div", { className: at.products, children: [
1967
+ /* @__PURE__ */ t.jsx("h5", { className: at.subtitle, children: "Button Type" }),
1968
+ a.map((h) => /* @__PURE__ */ t.jsxs(
1674
1969
  "div",
1675
1970
  {
1676
- className: it.product,
1971
+ className: at.product,
1677
1972
  children: [
1678
1973
  /* @__PURE__ */ t.jsx(
1679
1974
  et,
1680
1975
  {
1681
- onChange: (b) => {
1682
- const B = [...o].map((H) => H.id === _.id ? {
1683
- ..._,
1684
- type: b
1685
- } : H);
1686
- e(B);
1976
+ onChange: (_) => {
1977
+ const H = [...a].map(($) => $.id === h.id ? {
1978
+ ...h,
1979
+ type: _
1980
+ } : $);
1981
+ e(H);
1687
1982
  },
1688
- value: _.type,
1983
+ value: h.type,
1689
1984
  options: ["Primary", "Secondary", "Tertiary"]
1690
1985
  }
1691
1986
  ),
1692
- /* @__PURE__ */ t.jsxs("div", { className: it.buttons, children: [
1693
- /* @__PURE__ */ t.jsx("div", { className: it.deleteButton, children: /* @__PURE__ */ t.jsx(
1694
- v,
1987
+ /* @__PURE__ */ t.jsxs("div", { className: at.buttons, children: [
1988
+ c && /* @__PURE__ */ t.jsx("div", { className: at.deleteButton, children: /* @__PURE__ */ t.jsx(
1989
+ b,
1695
1990
  {
1696
1991
  name: "Sliders",
1697
1992
  hoverable: !0,
1698
1993
  width: 20,
1699
1994
  height: 20,
1700
- onClick: (b) => {
1701
- p(b, _);
1995
+ onClick: (_) => {
1996
+ y(_, h);
1702
1997
  }
1703
1998
  }
1704
1999
  ) }),
1705
- s && /* @__PURE__ */ t.jsx("div", { className: it.deleteButton, children: /* @__PURE__ */ t.jsx(
1706
- v,
2000
+ s && /* @__PURE__ */ t.jsx("div", { className: at.deleteButton, children: /* @__PURE__ */ t.jsx(
2001
+ b,
1707
2002
  {
1708
2003
  name: "Trash",
1709
2004
  hoverable: !0,
1710
2005
  onClick: () => {
1711
- const b = o.filter((u) => u.id !== _.id);
1712
- e(b);
2006
+ const _ = a.filter((w) => w.id !== h.id);
2007
+ e(_);
1713
2008
  },
1714
2009
  width: 20,
1715
2010
  height: 20,
@@ -1719,15 +2014,15 @@ const ja = (d) => {
1719
2014
  ] })
1720
2015
  ]
1721
2016
  },
1722
- _.id
2017
+ h.id
1723
2018
  )),
1724
- a && /* @__PURE__ */ t.jsx(
1725
- dn,
2019
+ l && /* @__PURE__ */ t.jsx(
2020
+ En,
1726
2021
  {
1727
- ref: h,
1728
- activeButton: a,
1729
- setActiveButton: l,
1730
- popupPosition: r
2022
+ ref: r,
2023
+ activeButton: l,
2024
+ setActiveButton: o,
2025
+ popupPosition: n
1731
2026
  }
1732
2027
  ),
1733
2028
  i && /* @__PURE__ */ t.jsx(
@@ -1739,30 +2034,32 @@ const ja = (d) => {
1739
2034
  justifyContent: "center"
1740
2035
  },
1741
2036
  children: /* @__PURE__ */ t.jsx(
1742
- lt,
2037
+ ot,
1743
2038
  {
1744
2039
  withoutHover: !0,
1745
- className: it.button,
2040
+ className: at.button,
1746
2041
  size: "s",
1747
2042
  onClick: () => {
1748
- const _ = [...o];
1749
- _.push({
2043
+ const h = [...a];
2044
+ h.push({
1750
2045
  type: "Primary",
1751
- id: _t(),
2046
+ id: ht(),
1752
2047
  typesText: [],
1753
2048
  destination: "Go to Page",
1754
- text: "Button Name",
2049
+ text: {
2050
+ "en-US": "Button Name"
2051
+ },
1755
2052
  page: "home",
1756
2053
  openInNewTab: !0
1757
- }), e(_);
2054
+ }), e(h);
1758
2055
  },
1759
2056
  style: {
1760
2057
  width: "fit-content"
1761
2058
  },
1762
- children: /* @__PURE__ */ t.jsxs("div", { className: it.addButton, children: [
2059
+ children: /* @__PURE__ */ t.jsxs("div", { className: at.addButton, children: [
1763
2060
  /* @__PURE__ */ t.jsx("span", { children: "Add Option" }),
1764
2061
  /* @__PURE__ */ t.jsx(
1765
- v,
2062
+ b,
1766
2063
  {
1767
2064
  name: "Plus",
1768
2065
  width: 16,
@@ -1775,77 +2072,78 @@ const ja = (d) => {
1775
2072
  }
1776
2073
  )
1777
2074
  ] });
1778
- }, ya = (d) => {
1779
- const { isActiveButtons: o, setIsActiveButtons: e, buttons: s, setButtons: i } = d;
1780
- return /* @__PURE__ */ t.jsx(t.Fragment, { children: /* @__PURE__ */ t.jsxs("div", { className: ct.buttonsBlock, children: [
1781
- /* @__PURE__ */ t.jsxs("div", { className: ct.top, children: [
1782
- /* @__PURE__ */ t.jsx("h3", { className: ct.title, children: "Buttons" }),
2075
+ }, Za = (u) => {
2076
+ const { isActiveButtons: a, setIsActiveButtons: e, buttons: s, setButtons: i, editable: c = !0 } = u;
2077
+ return /* @__PURE__ */ t.jsx(t.Fragment, { children: /* @__PURE__ */ t.jsxs("div", { className: rt.buttonsBlock, children: [
2078
+ /* @__PURE__ */ t.jsxs("div", { className: rt.top, children: [
2079
+ /* @__PURE__ */ t.jsx("h3", { className: rt.title, children: "Buttons" }),
1783
2080
  /* @__PURE__ */ t.jsx(
1784
2081
  st,
1785
2082
  {
1786
- current: o,
1787
- onChange: (a) => e(a)
2083
+ current: a,
2084
+ onChange: (l) => e(l)
1788
2085
  }
1789
2086
  )
1790
2087
  ] }),
1791
2088
  /* @__PURE__ */ t.jsx(
1792
- An,
2089
+ ai,
1793
2090
  {
1794
2091
  buttons: s,
1795
- setButtons: i
2092
+ setButtons: i,
2093
+ editable: c
1796
2094
  }
1797
2095
  )
1798
2096
  ] }) });
1799
- }, Mn = "_wrapper_m18qi_1", On = "_subtitle_m18qi_7", qn = "_content_m18qi_14", En = "_range_m18qi_22", Dn = "_track_m18qi_27", Ln = "_progress_m18qi_36", Hn = "_dots_m18qi_46", zn = "_dot_m18qi_46", Rn = "_active_m18qi_65", Fn = "_input_m18qi_77", Vn = "_countBlock_m18qi_91", Un = "_count_m18qi_91", Yn = "_controls_m18qi_107", Gn = "_button_m18qi_113", X = {
1800
- wrapper: Mn,
1801
- subtitle: On,
1802
- content: qn,
1803
- range: En,
1804
- track: Dn,
1805
- progress: Ln,
1806
- dots: Hn,
1807
- dot: zn,
1808
- active: Rn,
1809
- input: Fn,
1810
- countBlock: Vn,
1811
- count: Un,
1812
- controls: Yn,
1813
- button: Gn
1814
- }, Ot = (d) => {
1815
- const { label: o, min: e = 1, max: s = 4, step: i = 1, count: a, setCount: l } = d, [r, n] = f.useState(!1), c = Array.from({ length: (s - e) / i + 1 }), x = (a - e) / (s - e) * 100, h = () => {
1816
- a < s && l(a + i);
1817
- }, p = () => {
1818
- a > e && l(a - i);
1819
- }, _ = (b) => {
1820
- const u = e + b * i;
1821
- l(u);
2097
+ }, ci = "_wrapper_m18qi_1", li = "_subtitle_m18qi_7", ri = "_content_m18qi_14", di = "_range_m18qi_22", ui = "_track_m18qi_27", _i = "_progress_m18qi_36", mi = "_dots_m18qi_46", hi = "_dot_m18qi_46", pi = "_active_m18qi_65", fi = "_input_m18qi_77", gi = "_countBlock_m18qi_91", xi = "_count_m18qi_91", bi = "_controls_m18qi_107", vi = "_button_m18qi_113", W = {
2098
+ wrapper: ci,
2099
+ subtitle: li,
2100
+ content: ri,
2101
+ range: di,
2102
+ track: ui,
2103
+ progress: _i,
2104
+ dots: mi,
2105
+ dot: hi,
2106
+ active: pi,
2107
+ input: fi,
2108
+ countBlock: gi,
2109
+ count: xi,
2110
+ controls: bi,
2111
+ button: vi
2112
+ }, qt = (u) => {
2113
+ const { label: a, min: e = 1, max: s = 4, step: i = 1, count: c, setCount: l } = u, [o, n] = f.useState(!1), d = Array.from({ length: (s - e) / i + 1 }), j = (c - e) / (s - e) * 100, p = () => {
2114
+ c < s && l(c + i);
2115
+ }, r = () => {
2116
+ c > e && l(c - i);
2117
+ }, y = (h) => {
2118
+ const _ = e + h * i;
2119
+ l(_);
1822
2120
  };
1823
- return /* @__PURE__ */ t.jsxs("div", { className: X.wrapper, children: [
1824
- o && /* @__PURE__ */ t.jsx("h5", { className: X.subtitle, children: o }),
1825
- /* @__PURE__ */ t.jsxs("div", { className: X.content, children: [
1826
- /* @__PURE__ */ t.jsxs("div", { className: X.range, children: [
1827
- /* @__PURE__ */ t.jsx("div", { className: X.track }),
2121
+ return /* @__PURE__ */ t.jsxs("div", { className: W.wrapper, children: [
2122
+ a && /* @__PURE__ */ t.jsx("h5", { className: W.subtitle, children: a }),
2123
+ /* @__PURE__ */ t.jsxs("div", { className: W.content, children: [
2124
+ /* @__PURE__ */ t.jsxs("div", { className: W.range, children: [
2125
+ /* @__PURE__ */ t.jsx("div", { className: W.track }),
1828
2126
  /* @__PURE__ */ t.jsx(
1829
2127
  "div",
1830
2128
  {
1831
- className: X.progress,
1832
- style: { width: `${x}%` }
2129
+ className: W.progress,
2130
+ style: { width: `${j}%` }
1833
2131
  }
1834
2132
  ),
1835
- /* @__PURE__ */ t.jsx("div", { className: X.dots, children: c.map((b, u) => {
1836
- const B = u <= (a - e) / i;
2133
+ /* @__PURE__ */ t.jsx("div", { className: W.dots, children: d.map((h, _) => {
2134
+ const w = _ <= (c - e) / i;
1837
2135
  return /* @__PURE__ */ t.jsx(
1838
2136
  "button",
1839
2137
  {
1840
- onClick: () => _(u),
1841
- className: U(X.dot, {
1842
- [X.active]: B,
1843
- [X.inactive]: !B,
1844
- [X.dragging]: r
2138
+ onClick: () => y(_),
2139
+ className: Y(W.dot, {
2140
+ [W.active]: w,
2141
+ [W.inactive]: !w,
2142
+ [W.dragging]: o
1845
2143
  }),
1846
- "aria-label": `Set value to ${e + u * i}`
2144
+ "aria-label": `Set value to ${e + _ * i}`
1847
2145
  },
1848
- u
2146
+ _
1849
2147
  );
1850
2148
  }) }),
1851
2149
  /* @__PURE__ */ t.jsx(
@@ -1855,41 +2153,41 @@ const ja = (d) => {
1855
2153
  min: e,
1856
2154
  max: s,
1857
2155
  step: i,
1858
- value: a,
1859
- onChange: (b) => l(Number(b.target.value)),
2156
+ value: c,
2157
+ onChange: (h) => l(Number(h.target.value)),
1860
2158
  onMouseDown: () => n(!0),
1861
2159
  onMouseUp: () => n(!1),
1862
2160
  onTouchStart: () => n(!0),
1863
2161
  onTouchEnd: () => n(!1),
1864
- className: X.input
2162
+ className: W.input
1865
2163
  }
1866
2164
  )
1867
2165
  ] }),
1868
- /* @__PURE__ */ t.jsxs("div", { className: X.countBlock, children: [
2166
+ /* @__PURE__ */ t.jsxs("div", { className: W.countBlock, children: [
1869
2167
  /* @__PURE__ */ t.jsx(
1870
- K,
2168
+ tt,
1871
2169
  {
1872
2170
  type: "number",
1873
2171
  min: e,
1874
2172
  max: s,
1875
2173
  paddingless: !0,
1876
- onChange: (b) => {
1877
- const u = Number(b);
1878
- u > s ? l(s) : u < e ? l(e) : l(u);
2174
+ onChange: (h) => {
2175
+ const _ = Number(h);
2176
+ _ > s ? l(s) : _ < e ? l(e) : l(_);
1879
2177
  },
1880
- value: String(a)
2178
+ value: String(c)
1881
2179
  }
1882
2180
  ),
1883
- /* @__PURE__ */ t.jsxs("div", { className: X.controls, children: [
2181
+ /* @__PURE__ */ t.jsxs("div", { className: W.controls, children: [
1884
2182
  /* @__PURE__ */ t.jsx(
1885
2183
  "button",
1886
2184
  {
1887
- onClick: h,
1888
- disabled: a >= s,
1889
- className: X.button,
2185
+ onClick: p,
2186
+ disabled: c >= s,
2187
+ className: W.button,
1890
2188
  "aria-label": "Increment count",
1891
2189
  children: /* @__PURE__ */ t.jsx(
1892
- v,
2190
+ b,
1893
2191
  {
1894
2192
  name: "CaretUp",
1895
2193
  width: 15,
@@ -1901,12 +2199,12 @@ const ja = (d) => {
1901
2199
  /* @__PURE__ */ t.jsx(
1902
2200
  "button",
1903
2201
  {
1904
- onClick: p,
1905
- disabled: a <= e,
1906
- className: X.button,
2202
+ onClick: r,
2203
+ disabled: c <= e,
2204
+ className: W.button,
1907
2205
  "aria-label": "Decrement count",
1908
2206
  children: /* @__PURE__ */ t.jsx(
1909
- v,
2207
+ b,
1910
2208
  {
1911
2209
  name: "CaretDown",
1912
2210
  width: 15,
@@ -1919,52 +2217,48 @@ const ja = (d) => {
1919
2217
  ] })
1920
2218
  ] })
1921
2219
  ] });
1922
- }, Xn = "_title_ix5ax_1", Wn = "_subtitle_ix5ax_5", Jn = "_header_ix5ax_12", Qn = "_text_ix5ax_13", Kn = "_productsBlock_ix5ax_14", Zn = "_top_ix5ax_26", ti = "_itemsBlock_ix5ax_35", ei = "_typeTexts_ix5ax_41", si = "_block_ix5ax_48", ni = "_active_ix5ax_61", ii = "_products_ix5ax_14", oi = "_product_ix5ax_14", ai = "_button_ix5ax_80", ci = "_image_ix5ax_91", li = "_info_ix5ax_98", ri = "_name_ix5ax_110", di = "_buttons_ix5ax_114", ui = "_modal_ix5ax_121", mi = "_link_ix5ax_141", _i = "_modalOptions_ix5ax_147", hi = "_addButton_ix5ax_160", pi = "_deleteButton_ix5ax_175", xi = "_closeIcon_ix5ax_187", V = {
1923
- title: Xn,
1924
- subtitle: Wn,
1925
- header: Jn,
1926
- text: Qn,
1927
- productsBlock: Kn,
1928
- top: Zn,
1929
- itemsBlock: ti,
1930
- typeTexts: ei,
1931
- block: si,
1932
- active: ni,
1933
- products: ii,
1934
- product: oi,
1935
- button: ai,
1936
- image: ci,
1937
- info: li,
1938
- name: ri,
1939
- buttons: di,
1940
- modal: ui,
1941
- link: mi,
1942
- modalOptions: _i,
1943
- addButton: hi,
1944
- deleteButton: pi,
1945
- closeIcon: xi
1946
- }, gi = (d) => {
1947
- const { activeItem: o, setActiveItem: e, popupPosition: s, setIsOpenModal: i, itemsOptions: a } = d, l = a.find((n) => n.id === o.listingId);
1948
- if (!l) return null;
1949
- function r(n, c) {
1950
- return n.length > c ? `${n.slice(0, c)}...` : n;
1951
- }
1952
- return /* @__PURE__ */ t.jsxs(
2220
+ }, ji = "_title_ix5ax_1", yi = "_subtitle_ix5ax_5", ki = "_header_ix5ax_12", $i = "_text_ix5ax_13", Ii = "_productsBlock_ix5ax_14", Ni = "_top_ix5ax_26", wi = "_itemsBlock_ix5ax_35", Ci = "_typeTexts_ix5ax_41", Si = "_block_ix5ax_48", Bi = "_active_ix5ax_61", Ti = "_products_ix5ax_14", Pi = "_product_ix5ax_14", Ai = "_button_ix5ax_80", Oi = "_image_ix5ax_91", Mi = "_info_ix5ax_98", qi = "_name_ix5ax_110", Ei = "_buttons_ix5ax_114", Di = "_modal_ix5ax_121", Ui = "_link_ix5ax_141", Hi = "_modalOptions_ix5ax_147", Ri = "_addButton_ix5ax_160", Li = "_deleteButton_ix5ax_175", zi = "_closeIcon_ix5ax_187", G = {
2221
+ title: ji,
2222
+ subtitle: yi,
2223
+ header: ki,
2224
+ text: $i,
2225
+ productsBlock: Ii,
2226
+ top: Ni,
2227
+ itemsBlock: wi,
2228
+ typeTexts: Ci,
2229
+ block: Si,
2230
+ active: Bi,
2231
+ products: Ti,
2232
+ product: Pi,
2233
+ button: Ai,
2234
+ image: Oi,
2235
+ info: Mi,
2236
+ name: qi,
2237
+ buttons: Ei,
2238
+ modal: Di,
2239
+ link: Ui,
2240
+ modalOptions: Hi,
2241
+ addButton: Ri,
2242
+ deleteButton: Li,
2243
+ closeIcon: zi
2244
+ }, Fi = (u) => {
2245
+ const { activeItem: a, setActiveItem: e, popupPosition: s, setIsOpenModal: i, itemsOptions: c } = u, l = c.find((o) => o.id === a.listingId);
2246
+ return l ? /* @__PURE__ */ t.jsxs(
1953
2247
  "div",
1954
2248
  {
1955
- className: V.modal,
1956
- onClick: (n) => {
1957
- n.stopPropagation();
2249
+ className: G.modal,
2250
+ onClick: (o) => {
2251
+ o.stopPropagation();
1958
2252
  },
1959
2253
  style: {
1960
2254
  top: `${s.top}px`,
1961
2255
  left: `${s.left}px`
1962
2256
  },
1963
2257
  children: [
1964
- /* @__PURE__ */ t.jsxs("div", { className: V.top, children: [
1965
- /* @__PURE__ */ t.jsx("h3", { children: r(l.productData.name, 20) }),
1966
- /* @__PURE__ */ t.jsx("div", { className: V.closeIcon, children: /* @__PURE__ */ t.jsx(
1967
- v,
2258
+ /* @__PURE__ */ t.jsxs("div", { className: G.top, children: [
2259
+ /* @__PURE__ */ t.jsx("h3", { children: Yt(l.productData.name) }),
2260
+ /* @__PURE__ */ t.jsx("div", { className: G.closeIcon, children: /* @__PURE__ */ t.jsx(
2261
+ b,
1968
2262
  {
1969
2263
  name: "X",
1970
2264
  height: 20,
@@ -1975,105 +2269,105 @@ const ja = (d) => {
1975
2269
  }
1976
2270
  ) })
1977
2271
  ] }),
1978
- /* @__PURE__ */ t.jsx("div", { className: V.modalOptions, children: /* @__PURE__ */ t.jsx(
1979
- ft,
2272
+ /* @__PURE__ */ t.jsx("div", { className: G.modalOptions, children: /* @__PURE__ */ t.jsx(
2273
+ bt,
1980
2274
  {
1981
2275
  label: "Put up an attractive image",
1982
2276
  activeImage: l.productData.images.length > 0 ? l.productData.images[0].cfId : void 0,
1983
- onChange: (n) => {
1984
- const c = {
1985
- ...o,
1986
- image: n[0]
2277
+ onChange: (o) => {
2278
+ const n = {
2279
+ ...a,
2280
+ image: o[0]
1987
2281
  };
1988
- e(c);
2282
+ e(n);
1989
2283
  }
1990
2284
  }
1991
2285
  ) })
1992
2286
  ]
1993
2287
  }
1994
- );
2288
+ ) : null;
1995
2289
  };
1996
- function fi(d) {
1997
- const { product: o, children: e } = d, { attributes: s, listeners: i, setNodeRef: a, transform: l, transition: r, isDragging: n } = Tt({
1998
- id: String(o.listingId)
1999
- }), c = {
2000
- transform: Pt.Transform.toString(l),
2001
- transition: r
2290
+ function Vi(u) {
2291
+ const { product: a, children: e } = u, { attributes: s, listeners: i, setNodeRef: c, transform: l, transition: o, isDragging: n } = Ct({
2292
+ id: String(a.listingId)
2293
+ }), d = {
2294
+ transform: St.Transform.toString(l),
2295
+ transition: o
2002
2296
  };
2003
2297
  return /* @__PURE__ */ t.jsx(
2004
2298
  "div",
2005
2299
  {
2006
- ref: a,
2007
- style: c,
2008
- className: `${V.product} ${n ? V.dragging : ""}`,
2300
+ ref: c,
2301
+ style: d,
2302
+ className: `${G.product} ${n ? G.dragging : ""}`,
2009
2303
  ...s,
2010
2304
  ...i,
2011
2305
  children: e
2012
2306
  }
2013
2307
  );
2014
2308
  }
2015
- const ka = (d) => {
2309
+ const tc = (u) => {
2016
2310
  const {
2017
- isActiveItems: o,
2311
+ isActiveItems: a,
2018
2312
  setIsActiveItems: e,
2019
2313
  items: s,
2020
2314
  setItems: i,
2021
- other: a,
2315
+ other: c,
2022
2316
  title: l,
2023
- subtitle: r,
2317
+ subtitle: o,
2024
2318
  editable: n = !0,
2025
- draggable: c = !1,
2026
- withImage: x = !1,
2027
- deletable: h = !0,
2028
- addable: p = !0,
2029
- itemsType: _,
2030
- itemsOptions: b
2031
- } = d, [u, B] = f.useState(
2319
+ draggable: d = !1,
2320
+ withImage: j = !1,
2321
+ deletable: p = !0,
2322
+ addable: r = !0,
2323
+ itemsType: y,
2324
+ itemsOptions: h
2325
+ } = u, [_, w] = f.useState(
2032
2326
  null
2033
- ), [H, I] = f.useState({
2327
+ ), [H, $] = f.useState({
2034
2328
  top: 0,
2035
2329
  left: 0
2036
- }), [N, g] = f.useState(!1), C = $t(
2037
- Nt(St, {
2330
+ }), [g, B] = f.useState(!1), E = yt(
2331
+ kt(wt, {
2038
2332
  activationConstraint: {
2039
2333
  distance: 5
2040
2334
  }
2041
2335
  })
2042
2336
  );
2043
2337
  f.useEffect(() => {
2044
- const y = () => {
2045
- B(null), g(!1);
2338
+ const x = () => {
2339
+ w(null), B(!1);
2046
2340
  };
2047
- return document.body.addEventListener("click", y), B(null), g(!1), () => {
2048
- B(null), g(!1), document.body.removeEventListener("click", y);
2341
+ return document.body.addEventListener("click", x), w(null), B(!1), () => {
2342
+ w(null), B(!1), document.body.removeEventListener("click", x);
2049
2343
  };
2050
2344
  }, []), f.useEffect(() => {
2051
- if (u) {
2052
- const y = [...s].map((M) => M.listingId === u.listingId ? u : M);
2053
- i(y);
2345
+ if (_) {
2346
+ const x = [...s].map((I) => I.listingId === _.listingId ? _ : I);
2347
+ i(x);
2054
2348
  }
2055
- }, [u]);
2056
- const F = (y, M) => {
2057
- y.stopPropagation();
2058
- const T = y.target.getBoundingClientRect(), W = 100, O = window.innerHeight;
2059
- let z = T.top + window.scrollY;
2060
- z + W > O && (z = O - W - 20), g(!0), I({
2061
- top: z - 80,
2062
- left: T.left - 30
2063
- }), B(M);
2349
+ }, [_]);
2350
+ const F = (x, I) => {
2351
+ x.stopPropagation();
2352
+ const C = x.target.getBoundingClientRect(), R = 100, O = window.innerHeight;
2353
+ let U = C.top + window.scrollY;
2354
+ U + R > O && (U = O - R - 20), B(!0), $({
2355
+ top: U - 80,
2356
+ left: C.left - 30
2357
+ }), w(I);
2064
2358
  };
2065
- function S(y) {
2066
- if (x)
2067
- return y ? /* @__PURE__ */ t.jsx(
2359
+ function T(x) {
2360
+ if (j)
2361
+ return x ? /* @__PURE__ */ t.jsx(
2068
2362
  "img",
2069
2363
  {
2070
- src: `https://imagedelivery.net/${y}/w=1000`,
2364
+ src: `https://imagedelivery.net/${x}/w=1000`,
2071
2365
  alt: "image",
2072
2366
  width: 16,
2073
2367
  height: 16
2074
2368
  }
2075
2369
  ) : /* @__PURE__ */ t.jsx(
2076
- v,
2370
+ b,
2077
2371
  {
2078
2372
  name: "Image",
2079
2373
  width: 16,
@@ -2082,21 +2376,21 @@ const ka = (d) => {
2082
2376
  }
2083
2377
  );
2084
2378
  }
2085
- const Y = (y) => {
2086
- const { active: M, over: T } = y;
2087
- if (T && M.id !== T.id) {
2088
- const W = s.findIndex((z) => String(z.listingId) === M.id), O = s.findIndex((z) => String(z.listingId) === T.id);
2089
- if (W !== -1 && O !== -1) {
2090
- const z = [...s], [Z] = z.splice(W, 1);
2091
- z.splice(O, 0, Z), i(z);
2379
+ const v = (x) => {
2380
+ const { active: I, over: C } = x;
2381
+ if (C && I.id !== C.id) {
2382
+ const R = s.findIndex((U) => String(U.listingId) === I.id), O = s.findIndex((U) => String(U.listingId) === C.id);
2383
+ if (R !== -1 && O !== -1) {
2384
+ const U = [...s], [nt] = U.splice(R, 1);
2385
+ U.splice(O, 0, nt), i(U);
2092
2386
  }
2093
2387
  }
2094
- }, E = (y, M) => {
2095
- const T = b.find((O) => y.listingId === O.id);
2096
- if (!T) return null;
2097
- const W = /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
2098
- c && /* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
2099
- v,
2388
+ }, A = (x, I) => {
2389
+ const C = h.find((O) => x.listingId === O.id);
2390
+ if (!C) return null;
2391
+ const R = /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
2392
+ d && /* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
2393
+ b,
2100
2394
  {
2101
2395
  name: "DotsSixVertical",
2102
2396
  hoverable: !0,
@@ -2104,107 +2398,107 @@ const ka = (d) => {
2104
2398
  height: 20
2105
2399
  }
2106
2400
  ) }),
2107
- _ === "select" && /* @__PURE__ */ t.jsx(
2401
+ y === "select" && /* @__PURE__ */ t.jsx(
2108
2402
  et,
2109
2403
  {
2110
2404
  onChange: (O) => {
2111
- const z = [...s], Z = b.find((q) => q.productData.name === O);
2112
- if (!Z) return;
2113
- const rt = {
2114
- listingId: Z.id,
2115
- image: Z.productData.images.length > 0 ? Z.productData.images[0].cfId : ""
2116
- }, j = z.map((q) => q.listingId === y.listingId ? rt : q);
2117
- B(rt), i([...j]);
2405
+ const U = [...s], nt = h.find((D) => D.productData.name === O);
2406
+ if (!nt) return;
2407
+ const dt = {
2408
+ listingId: nt.id,
2409
+ image: nt.productData.images.length > 0 ? nt.productData.images[0].cfId : ""
2410
+ }, k = U.map((D) => D.listingId === x.listingId ? dt : D);
2411
+ w(dt), i([...k]);
2118
2412
  },
2119
- value: T.productData.name,
2413
+ value: C.productData.name,
2120
2414
  options: [
2121
- ...b.filter((O) => !s.find((z) => z.listingId === O.id)).map((O) => O.productData.name)
2415
+ ...h.filter((O) => !s.find((U) => U.listingId === O.id)).map((O) => O.productData.name)
2122
2416
  ],
2123
- leftAddon: S(
2124
- y.image || T.productData.images.length > 0 && T.productData.images[0].cfId || ""
2417
+ leftAddon: T(
2418
+ x.image || C.productData.images.length > 0 && C.productData.images[0].cfId || ""
2125
2419
  )
2126
2420
  },
2127
- M
2421
+ I
2128
2422
  ),
2129
- /* @__PURE__ */ t.jsxs("div", { className: V.buttons, children: [
2130
- n && /* @__PURE__ */ t.jsx("div", { className: V.deleteButton, children: /* @__PURE__ */ t.jsx(
2131
- v,
2423
+ /* @__PURE__ */ t.jsxs("div", { className: G.buttons, children: [
2424
+ n && /* @__PURE__ */ t.jsx("div", { className: G.deleteButton, children: /* @__PURE__ */ t.jsx(
2425
+ b,
2132
2426
  {
2133
2427
  name: "Sliders",
2134
2428
  hoverable: !0,
2135
2429
  width: 20,
2136
2430
  height: 20,
2137
- onClick: (O) => F(O, y)
2431
+ onClick: (O) => F(O, x)
2138
2432
  }
2139
2433
  ) }),
2140
- h && /* @__PURE__ */ t.jsx("div", { className: V.deleteButton, children: /* @__PURE__ */ t.jsx(
2141
- v,
2434
+ p && /* @__PURE__ */ t.jsx("div", { className: G.deleteButton, children: /* @__PURE__ */ t.jsx(
2435
+ b,
2142
2436
  {
2143
2437
  name: "Trash",
2144
2438
  hoverable: !0,
2145
2439
  width: 20,
2146
2440
  height: 20,
2147
2441
  fill: "#C12A2A",
2148
- onClick: () => i(s.filter((O) => O !== y))
2442
+ onClick: () => i(s.filter((O) => O !== x))
2149
2443
  }
2150
2444
  ) })
2151
2445
  ] })
2152
2446
  ] });
2153
- return c ? /* @__PURE__ */ t.jsx(
2154
- fi,
2447
+ return d ? /* @__PURE__ */ t.jsx(
2448
+ Vi,
2155
2449
  {
2156
- product: y,
2157
- children: W
2450
+ product: x,
2451
+ children: R
2158
2452
  },
2159
- y.listingId
2453
+ x.listingId
2160
2454
  ) : /* @__PURE__ */ t.jsx(
2161
2455
  "div",
2162
2456
  {
2163
- className: V.product,
2164
- children: W
2457
+ className: G.product,
2458
+ children: R
2165
2459
  },
2166
- y.listingId
2460
+ x.listingId
2167
2461
  );
2168
2462
  };
2169
- return /* @__PURE__ */ t.jsxs("div", { className: V.productsBlock, children: [
2170
- (l || o !== void 0) && /* @__PURE__ */ t.jsxs("div", { className: V.top, children: [
2171
- l && /* @__PURE__ */ t.jsx("h3", { className: V.title, children: l }),
2172
- o !== void 0 && /* @__PURE__ */ t.jsx(
2463
+ return /* @__PURE__ */ t.jsxs("div", { className: G.productsBlock, children: [
2464
+ (l || a !== void 0) && /* @__PURE__ */ t.jsxs("div", { className: G.top, children: [
2465
+ l && /* @__PURE__ */ t.jsx("h3", { className: G.title, children: l }),
2466
+ a !== void 0 && /* @__PURE__ */ t.jsx(
2173
2467
  st,
2174
2468
  {
2175
- current: o,
2176
- onChange: (y) => e == null ? void 0 : e(y)
2469
+ current: a,
2470
+ onChange: (x) => e == null ? void 0 : e(x)
2177
2471
  }
2178
2472
  )
2179
2473
  ] }),
2180
- N && u && /* @__PURE__ */ t.jsx(
2181
- gi,
2474
+ g && _ && /* @__PURE__ */ t.jsx(
2475
+ Fi,
2182
2476
  {
2183
- activeItem: u,
2184
- setActiveItem: B,
2185
- setIsOpenModal: g,
2477
+ activeItem: _,
2478
+ setActiveItem: w,
2479
+ setIsOpenModal: B,
2186
2480
  popupPosition: H,
2187
- itemsOptions: b
2481
+ itemsOptions: h
2188
2482
  }
2189
2483
  ),
2190
- /* @__PURE__ */ t.jsxs("div", { className: V.products, children: [
2191
- r && /* @__PURE__ */ t.jsx("h5", { className: V.subtitle, children: r }),
2192
- c ? /* @__PURE__ */ t.jsx(
2193
- wt,
2484
+ /* @__PURE__ */ t.jsxs("div", { className: G.products, children: [
2485
+ o && /* @__PURE__ */ t.jsx("h5", { className: G.subtitle, children: o }),
2486
+ d ? /* @__PURE__ */ t.jsx(
2487
+ $t,
2194
2488
  {
2195
- sensors: C,
2196
- onDragEnd: Y,
2489
+ sensors: E,
2490
+ onDragEnd: v,
2197
2491
  children: /* @__PURE__ */ t.jsx(
2198
- Ct,
2492
+ It,
2199
2493
  {
2200
- items: s.map((y) => String(y.listingId)),
2201
- strategy: Bt,
2202
- children: s.map((y, M) => E(y, M))
2494
+ items: s.map((x) => String(x.listingId)),
2495
+ strategy: Nt,
2496
+ children: s.map((x, I) => A(x, I))
2203
2497
  }
2204
2498
  )
2205
2499
  }
2206
- ) : s.map((y, M) => E(y, M)),
2207
- p && /* @__PURE__ */ t.jsx(
2500
+ ) : s.map((x, I) => A(x, I)),
2501
+ r && /* @__PURE__ */ t.jsx(
2208
2502
  "div",
2209
2503
  {
2210
2504
  style: {
@@ -2213,31 +2507,31 @@ const ka = (d) => {
2213
2507
  justifyContent: "center"
2214
2508
  },
2215
2509
  children: /* @__PURE__ */ t.jsx(
2216
- lt,
2510
+ ot,
2217
2511
  {
2218
2512
  withoutHover: !0,
2219
- className: V.button,
2513
+ className: G.button,
2220
2514
  size: "s",
2221
2515
  onClick: () => {
2222
- const y = [...s];
2223
- for (let M = 0; M < b.length; M++)
2224
- if (!s.find((T) => T.listingId === b[M].id)) {
2225
- y.push({
2226
- listingId: b[M].id,
2227
- image: b[M].productData.images.length > 0 ? b[M].productData.images[0].cfId : ""
2516
+ const x = [...s];
2517
+ for (let I = 0; I < h.length; I++)
2518
+ if (!s.find((C) => C.listingId === h[I].id)) {
2519
+ x.push({
2520
+ listingId: h[I].id,
2521
+ image: h[I].productData.images.length > 0 ? h[I].productData.images[0].cfId : ""
2228
2522
  });
2229
2523
  break;
2230
2524
  }
2231
- i(y);
2525
+ i(x);
2232
2526
  },
2233
- disabled: s.length === b.length,
2527
+ disabled: s.length === h.length,
2234
2528
  style: {
2235
2529
  width: "fit-content"
2236
2530
  },
2237
- children: /* @__PURE__ */ t.jsxs("div", { className: V.addButton, children: [
2531
+ children: /* @__PURE__ */ t.jsxs("div", { className: G.addButton, children: [
2238
2532
  /* @__PURE__ */ t.jsx("span", { children: "Add Option" }),
2239
2533
  /* @__PURE__ */ t.jsx(
2240
- v,
2534
+ b,
2241
2535
  {
2242
2536
  name: "Plus",
2243
2537
  width: 16,
@@ -2250,71 +2544,71 @@ const ka = (d) => {
2250
2544
  }
2251
2545
  )
2252
2546
  ] }),
2253
- a !== void 0 && /* @__PURE__ */ t.jsx(yt, { items: a })
2547
+ c !== void 0 && /* @__PURE__ */ t.jsx(Tt, { items: c })
2254
2548
  ] });
2255
- }, bi = "_options_6cemk_1", vi = "_price_6cemk_12", ji = "_oldPrice_6cemk_19", yi = "_newPrice_6cemk_27", ki = "_animate_6cemk_34", Ii = "_appearAndBounce_6cemk_1", $i = "_meta_6cemk_52", Ni = "_info_6cemk_58", wi = "_infoRight_6cemk_66", Ci = "_buttons_6cemk_73", Bi = "_variants_6cemk_80", Si = "_variant_6cemk_80", Ti = "_stock_6cemk_98", Pi = "_variantInfo_6cemk_105", Ai = "_quantity_6cemk_111", Mi = "_count_6cemk_118", Oi = "_focused_6cemk_135", qi = "_button_6cemk_73", Ei = "_activeVariant_6cemk_161", Di = "_chargeTypes_6cemk_165", Li = "_charge_6cemk_165", Hi = "_chargeActive_6cemk_190", zi = "_title_6cemk_198", w = {
2256
- options: bi,
2257
- price: vi,
2258
- oldPrice: ji,
2259
- newPrice: yi,
2260
- animate: ki,
2261
- appearAndBounce: Ii,
2262
- meta: $i,
2263
- info: Ni,
2264
- infoRight: wi,
2265
- buttons: Ci,
2266
- variants: Bi,
2267
- variant: Si,
2268
- stock: Ti,
2269
- variantInfo: Pi,
2270
- quantity: Ai,
2271
- count: Mi,
2272
- focused: Oi,
2273
- button: qi,
2274
- activeVariant: Ei,
2275
- chargeTypes: Di,
2276
- charge: Li,
2277
- chargeActive: Hi,
2278
- title: zi
2279
- }, Ri = "_wrapper_c1dht_1", Fi = "_label_c1dht_9", Vi = "_input_c1dht_18", Ui = "_paddingless_c1dht_31", Yi = "_content_c1dht_35", Gi = "_contentBorder_c1dht_47", Xi = "_borderless_c1dht_52", Wi = "_rightIcon_c1dht_57", nt = {
2280
- wrapper: Ri,
2281
- label: Fi,
2282
- input: Vi,
2283
- paddingless: Ui,
2284
- content: Yi,
2285
- contentBorder: Gi,
2286
- borderless: Xi,
2287
- rightIcon: Wi
2288
- }, Ji = (d) => {
2549
+ }, Yi = "_options_6cemk_1", Gi = "_price_6cemk_12", Xi = "_oldPrice_6cemk_19", Wi = "_newPrice_6cemk_27", Ji = "_animate_6cemk_34", Qi = "_appearAndBounce_6cemk_1", Ki = "_meta_6cemk_52", Zi = "_info_6cemk_58", to = "_infoRight_6cemk_66", eo = "_buttons_6cemk_73", so = "_variants_6cemk_80", no = "_variant_6cemk_80", io = "_stock_6cemk_98", oo = "_variantInfo_6cemk_105", ao = "_quantity_6cemk_111", co = "_count_6cemk_118", lo = "_focused_6cemk_135", ro = "_button_6cemk_73", uo = "_activeVariant_6cemk_161", _o = "_chargeTypes_6cemk_165", mo = "_charge_6cemk_165", ho = "_chargeActive_6cemk_190", po = "_title_6cemk_198", P = {
2550
+ options: Yi,
2551
+ price: Gi,
2552
+ oldPrice: Xi,
2553
+ newPrice: Wi,
2554
+ animate: Ji,
2555
+ appearAndBounce: Qi,
2556
+ meta: Ki,
2557
+ info: Zi,
2558
+ infoRight: to,
2559
+ buttons: eo,
2560
+ variants: so,
2561
+ variant: no,
2562
+ stock: io,
2563
+ variantInfo: oo,
2564
+ quantity: ao,
2565
+ count: co,
2566
+ focused: lo,
2567
+ button: ro,
2568
+ activeVariant: uo,
2569
+ chargeTypes: _o,
2570
+ charge: mo,
2571
+ chargeActive: ho,
2572
+ title: po
2573
+ }, fo = "_wrapper_c1dht_1", go = "_label_c1dht_9", xo = "_input_c1dht_18", bo = "_paddingless_c1dht_31", vo = "_content_c1dht_35", jo = "_contentBorder_c1dht_47", yo = "_borderless_c1dht_52", ko = "_rightIcon_c1dht_57", it = {
2574
+ wrapper: fo,
2575
+ label: go,
2576
+ input: xo,
2577
+ paddingless: bo,
2578
+ content: vo,
2579
+ contentBorder: jo,
2580
+ borderless: yo,
2581
+ rightIcon: ko
2582
+ }, $o = (u) => {
2289
2583
  const {
2290
- onChange: o,
2584
+ onChange: a,
2291
2585
  style: e,
2292
2586
  label: s,
2293
2587
  value: i,
2294
- type: a,
2588
+ type: c,
2295
2589
  min: l,
2296
- max: r,
2590
+ max: o,
2297
2591
  placeholder: n,
2298
- disabled: c = !1,
2299
- required: x = !1,
2300
- regex: h,
2301
- paddingless: p = !1,
2302
- borderless: _ = !1,
2303
- editable: b = !1,
2304
- isSearch: u = !1,
2305
- centered: B = !1
2306
- } = d, { themeSettings: H } = Et(), { inputs: I } = H, [N, g] = f.useState(!1);
2307
- function C(S) {
2308
- return Number(S) < 0 ? String(l) : S;
2592
+ disabled: d = !1,
2593
+ required: j = !1,
2594
+ regex: p,
2595
+ paddingless: r = !1,
2596
+ borderless: y = !1,
2597
+ editable: h = !1,
2598
+ isSearch: _ = !1,
2599
+ centered: w = !1
2600
+ } = u, { themeSettings: H } = Dt(), { inputs: $ } = H, [g, B] = f.useState(!1);
2601
+ function E(T) {
2602
+ return Number(T) < 0 ? String(l) : T;
2309
2603
  }
2310
- function F(S) {
2311
- return !x || !h ? !0 : new RegExp(h).test(S);
2604
+ function F(T) {
2605
+ return !j || !p ? !0 : new RegExp(p).test(T);
2312
2606
  }
2313
- return /* @__PURE__ */ t.jsxs("div", { className: nt.wrapper, children: [
2607
+ return /* @__PURE__ */ t.jsxs("div", { className: it.wrapper, children: [
2314
2608
  s && /* @__PURE__ */ t.jsx(
2315
2609
  "label",
2316
2610
  {
2317
- className: nt.label,
2611
+ className: it.label,
2318
2612
  htmlFor: s,
2319
2613
  children: s
2320
2614
  }
@@ -2322,55 +2616,55 @@ const ka = (d) => {
2322
2616
  /* @__PURE__ */ t.jsxs(
2323
2617
  "div",
2324
2618
  {
2325
- className: U(nt.content, {
2326
- [nt.contentBorder]: I.border.active
2619
+ className: Y(it.content, {
2620
+ [it.contentBorder]: $.border.active
2327
2621
  }),
2328
2622
  style: {
2329
2623
  ...e,
2330
- background: I.field.active ? I.field.color : "transparent",
2331
- padding: u ? `7px ${Number(I.general.size) + 20}px 7px 11px` : "7px 11px"
2624
+ background: $.field.active ? $.field.color : "transparent",
2625
+ padding: _ ? `7px ${Number($.general.size) + 20}px 7px 11px` : "7px 11px"
2332
2626
  },
2333
2627
  children: [
2334
2628
  /* @__PURE__ */ t.jsx(
2335
2629
  "input",
2336
2630
  {
2337
2631
  id: s,
2338
- type: a || "text",
2339
- onChange: (S) => {
2340
- if (a === "text") o(S.target.value);
2632
+ type: c || "text",
2633
+ onChange: (T) => {
2634
+ if (c === "text") a(T.target.value);
2341
2635
  else {
2342
- const Y = C(S.target.value);
2343
- o(Y);
2636
+ const v = E(T.target.value);
2637
+ a(v);
2344
2638
  }
2345
2639
  },
2346
2640
  value: i,
2347
2641
  autoComplete: "off",
2348
2642
  placeholder: n || "Type something...",
2349
- className: U(nt.input, {
2350
- [nt.required]: N && x && !F(i),
2351
- [nt.paddingless]: p,
2352
- [nt.borderless]: _
2643
+ className: Y(it.input, {
2644
+ [it.required]: g && j && !F(i),
2645
+ [it.paddingless]: r,
2646
+ [it.borderless]: y
2353
2647
  }),
2354
- min: a === "number" ? l : void 0,
2355
- max: a === "number" ? r : void 0,
2356
- disabled: c,
2357
- onFocus: () => g(!0),
2648
+ min: c === "number" ? l : void 0,
2649
+ max: c === "number" ? o : void 0,
2650
+ disabled: d,
2651
+ onFocus: () => B(!0),
2358
2652
  style: {
2359
- textAlign: B ? "center" : "left"
2653
+ textAlign: w ? "center" : "left"
2360
2654
  }
2361
2655
  }
2362
2656
  ),
2363
- u && /* @__PURE__ */ t.jsx("div", { className: nt.rightIcon, children: /* @__PURE__ */ t.jsx(
2364
- v,
2657
+ _ && /* @__PURE__ */ t.jsx("div", { className: it.rightIcon, children: /* @__PURE__ */ t.jsx(
2658
+ b,
2365
2659
  {
2366
2660
  name: "MagnifyingGlass",
2367
2661
  fill: "var(--icon-secondary)",
2368
- width: I.general.size,
2369
- height: I.general.size
2662
+ width: $.general.size,
2663
+ height: $.general.size
2370
2664
  }
2371
2665
  ) }),
2372
- b && /* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
2373
- v,
2666
+ h && /* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
2667
+ b,
2374
2668
  {
2375
2669
  name: "Sliders",
2376
2670
  width: 20,
@@ -2382,37 +2676,37 @@ const ka = (d) => {
2382
2676
  }
2383
2677
  )
2384
2678
  ] });
2385
- }, Qi = "_button_85085_1", Ki = "_primary_85085_20", Zi = "_primaryHovered_85085_30", to = "_secondary_85085_34", eo = "_secondaryHovered_85085_44", so = "_tertiary_85085_48", no = "_tertiaryHovered_85085_58", io = "_content_85085_62", ot = {
2386
- button: Qi,
2387
- primary: Ki,
2388
- primaryHovered: Zi,
2389
- secondary: to,
2390
- secondaryHovered: eo,
2391
- tertiary: so,
2392
- tertiaryHovered: no,
2393
- content: io
2394
- }, tt = (d) => {
2395
- const { children: o, onClick: e, style: s, className: i, disabled: a = !1, type: l = "Primary" } = d, { themeSettings: r } = Et();
2679
+ }, Io = "_button_85085_1", No = "_primary_85085_20", wo = "_primaryHovered_85085_30", Co = "_secondary_85085_34", So = "_secondaryHovered_85085_44", Bo = "_tertiary_85085_48", To = "_tertiaryHovered_85085_58", Po = "_content_85085_62", ct = {
2680
+ button: Io,
2681
+ primary: No,
2682
+ primaryHovered: wo,
2683
+ secondary: Co,
2684
+ secondaryHovered: So,
2685
+ tertiary: Bo,
2686
+ tertiaryHovered: To,
2687
+ content: Po
2688
+ }, Q = (u) => {
2689
+ const { children: a, onClick: e, style: s, className: i, disabled: c = !1, type: l = "Primary" } = u, { themeSettings: o } = Dt();
2396
2690
  return /* @__PURE__ */ t.jsx(
2397
2691
  "button",
2398
2692
  {
2399
- className: U(ot.button, i, {
2400
- [ot.primary]: l === "Primary",
2401
- [ot.secondary]: l === "Secondary",
2402
- [ot.tertiary]: l === "Tertiary",
2403
- [ot.primaryHovered]: l === "Primary" && !a && r.buttons.primary.hover,
2404
- [ot.secondaryHovered]: l === "Secondary" && !a && r.buttons.secondary.hover,
2405
- [ot.tertiaryHovered]: l === "Tertiary" && !a && r.buttons.tertiary.hover
2693
+ className: Y(ct.button, i, {
2694
+ [ct.primary]: l === "Primary",
2695
+ [ct.secondary]: l === "Secondary",
2696
+ [ct.tertiary]: l === "Tertiary",
2697
+ [ct.primaryHovered]: l === "Primary" && !c && o.buttons.primary.hover,
2698
+ [ct.secondaryHovered]: l === "Secondary" && !c && o.buttons.secondary.hover,
2699
+ [ct.tertiaryHovered]: l === "Tertiary" && !c && o.buttons.tertiary.hover
2406
2700
  }),
2407
2701
  onClick: e,
2408
2702
  style: {
2409
2703
  ...s
2410
2704
  },
2411
- disabled: a,
2412
- children: l === "Tertiary" ? /* @__PURE__ */ t.jsxs("div", { className: ot.content, children: [
2413
- o,
2705
+ disabled: c,
2706
+ children: l === "Tertiary" ? /* @__PURE__ */ t.jsxs("div", { className: ct.content, children: [
2707
+ a,
2414
2708
  /* @__PURE__ */ t.jsx(
2415
- v,
2709
+ b,
2416
2710
  {
2417
2711
  name: "ArrowRight",
2418
2712
  fill: "var(--icon-tertiary)",
@@ -2420,78 +2714,77 @@ const ka = (d) => {
2420
2714
  height: 20
2421
2715
  }
2422
2716
  )
2423
- ] }) : /* @__PURE__ */ t.jsx(t.Fragment, { children: o })
2717
+ ] }) : /* @__PURE__ */ t.jsx(t.Fragment, { children: a })
2424
2718
  }
2425
2719
  );
2426
2720
  };
2427
- var Rt = /* @__PURE__ */ ((d) => (d.ONE_TIME = "One-Time", d.RECURRING = "Subscribe & Save", d))(Rt || {});
2428
- const Ia = (d) => {
2429
- var I, N;
2430
- const { variants: o } = d, [e, s] = f.useState(o[0]), [i, a] = f.useState(e.chargeTypes[0]), l = jt(), [r, n] = f.useState(1), { reset: c, addProductToCart: x, getProducts: h } = At(), [p, _] = f.useState(!1);
2721
+ var zt = /* @__PURE__ */ ((u) => (u.ONE_TIME = "One-Time", u.RECURRING = "Subscribe & Save", u))(zt || {});
2722
+ const ec = (u) => {
2723
+ var H, $;
2724
+ const { variants: a } = u, [e, s] = f.useState(a[0]), [i, c] = f.useState(e.chargeTypes[0]), l = Bt(), [o, n] = f.useState(1), { reset: d, addProductToCart: j, getProducts: p } = Ot(), [r, y] = f.useState(!1);
2431
2725
  f.useEffect(() => {
2432
- _(!0);
2433
- const g = setTimeout(() => _(!1), 600);
2726
+ y(!0);
2727
+ const g = setTimeout(() => y(!1), 600);
2434
2728
  return () => clearTimeout(g);
2435
- }, [r]);
2436
- async function b() {
2437
- await h(), await x({
2438
- productId: d.id,
2729
+ }, [o]);
2730
+ async function h() {
2731
+ await p(), await j({
2732
+ productId: u.id,
2439
2733
  productVariantId: e.id,
2440
- quantity: r
2734
+ quantity: o
2441
2735
  });
2442
2736
  }
2443
- function u() {
2444
- c(), b(), l("/checkout");
2737
+ function _() {
2738
+ d(), h(), l("/checkout");
2445
2739
  }
2446
- function B(g) {
2740
+ function w(g) {
2447
2741
  if (g >= 864e5) {
2448
- const E = Math.floor(g / 864e5);
2449
- return `${E} ${E === 1 ? "day" : "days"}`;
2742
+ const v = Math.floor(g / 864e5);
2743
+ return `${v} ${v === 1 ? "day" : "days"}`;
2450
2744
  } else if (g >= 36e5) {
2451
- const E = Math.floor(g / 36e5);
2452
- return `${E} ${E === 1 ? "hour" : "hours"}`;
2745
+ const v = Math.floor(g / 36e5);
2746
+ return `${v} ${v === 1 ? "hour" : "hours"}`;
2453
2747
  } else if (g >= 6e4) {
2454
- const E = Math.floor(g / 6e4);
2455
- return `${E} ${E === 1 ? "minute" : "minutes"}`;
2748
+ const v = Math.floor(g / 6e4);
2749
+ return `${v} ${v === 1 ? "minute" : "minutes"}`;
2456
2750
  } else {
2457
- const E = Math.floor(g / 1e3);
2458
- return `${E} ${E === 1 ? "second" : "seconds"}`;
2751
+ const v = Math.floor(g / 1e3);
2752
+ return `${v} ${v === 1 ? "second" : "seconds"}`;
2459
2753
  }
2460
2754
  }
2461
- function H(g, C) {
2462
- return g.length > C ? g.slice(0, C) + "..." : g;
2463
- }
2464
- return /* @__PURE__ */ t.jsxs("div", { className: w.options, children: [
2465
- e.chargeTypes.length > 1 && /* @__PURE__ */ t.jsx("div", { className: w.chargeTypes, children: e.chargeTypes.map((g) => /* @__PURE__ */ t.jsx(
2755
+ return f.useEffect(() => {
2756
+ (e.quantity.available === 0 || !e.quantity.available) && n(0);
2757
+ }, [e.quantity.available]), console.log(e.quantity), /* @__PURE__ */ t.jsxs("div", { className: P.options, children: [
2758
+ e.chargeTypes.length > 1 && /* @__PURE__ */ t.jsx("div", { className: P.chargeTypes, children: e.chargeTypes.map((g) => /* @__PURE__ */ t.jsx(
2466
2759
  "div",
2467
2760
  {
2468
- className: U(w.charge, {
2469
- [w.chargeActive]: i === g
2761
+ className: Y(P.charge, {
2762
+ [P.chargeActive]: i === g
2470
2763
  }),
2471
- onClick: () => a(g),
2472
- children: Rt[g]
2764
+ onClick: () => c(g),
2765
+ children: zt[g]
2473
2766
  },
2474
2767
  g
2475
2768
  )) }),
2476
- /* @__PURE__ */ t.jsx("div", { className: w.variants, children: o.map((g) => {
2477
- var C;
2769
+ /* @__PURE__ */ t.jsx("div", { className: P.variants, children: a.map((g) => {
2770
+ var B;
2478
2771
  return /* @__PURE__ */ t.jsxs(
2479
2772
  "div",
2480
2773
  {
2481
- className: U(w.variant, {
2482
- [w.activeVariant]: e.id === g.id
2774
+ className: Y(P.variant, {
2775
+ [P.activeVariant]: e.id === g.id
2483
2776
  }),
2484
2777
  onClick: () => s(g),
2485
2778
  children: [
2486
- /* @__PURE__ */ t.jsxs("div", { className: w.variantInfo, children: [
2487
- /* @__PURE__ */ t.jsx("span", { className: w.title, children: H(g.name, 15) }),
2779
+ /* @__PURE__ */ t.jsxs("div", { className: P.variantInfo, children: [
2780
+ /* @__PURE__ */ t.jsx("span", { className: P.title, children: g.name }),
2488
2781
  /* @__PURE__ */ t.jsxs("span", { children: [
2489
2782
  "$",
2490
2783
  i === "ONE_TIME" ? g.price.amount : g.subscriptionSettings ? g.subscriptionSettings.price.amount : "Price Not Found"
2491
2784
  ] })
2492
2785
  ] }),
2493
- /* @__PURE__ */ t.jsx("div", { children: i === "ONE_TIME" && /* @__PURE__ */ t.jsxs("span", { className: w.stock, children: [
2494
- ((C = g.quantity.restrictions) == null ? void 0 : C.max) || g.quantity.available || 0,
2786
+ /* @__PURE__ */ t.jsx("div", { children: i === "ONE_TIME" && /* @__PURE__ */ t.jsxs("span", { className: P.stock, children: [
2787
+ ((B = g.quantity.restrictions) == null ? void 0 : B.max) || g.quantity.available || 0,
2495
2788
  " in stock"
2496
2789
  ] }) })
2497
2790
  ]
@@ -2499,49 +2792,50 @@ const Ia = (d) => {
2499
2792
  g.id
2500
2793
  );
2501
2794
  }) }),
2502
- i === "ONE_TIME" && /* @__PURE__ */ t.jsxs("div", { className: w.quantity, children: [
2795
+ i === "ONE_TIME" && /* @__PURE__ */ t.jsxs("div", { className: P.quantity, children: [
2503
2796
  /* @__PURE__ */ t.jsx(
2504
- tt,
2797
+ Q,
2505
2798
  {
2506
2799
  type: "Secondary",
2507
2800
  onClick: () => {
2508
- r > 1 ? n((g) => g - 1) : n(1);
2801
+ o > 1 ? n((g) => g - 1) : n(1);
2509
2802
  },
2510
- className: w.button,
2511
- disabled: e.quantity.restrictions && r <= e.quantity.restrictions.min,
2512
- children: /* @__PURE__ */ t.jsx(v, { name: "Minus" })
2803
+ className: P.button,
2804
+ disabled: e.quantity.available === 0 || e.quantity.restrictions && o <= e.quantity.restrictions.min || Object.keys(e.quantity.restrictions || {}).length === 0 && !e.quantity.available,
2805
+ children: /* @__PURE__ */ t.jsx(b, { name: "Minus" })
2513
2806
  }
2514
2807
  ),
2515
2808
  /* @__PURE__ */ t.jsx(
2516
- Ji,
2809
+ $o,
2517
2810
  {
2518
2811
  type: "number",
2519
- value: String(r),
2812
+ value: String(o),
2520
2813
  onChange: (g) => n(Number(g)),
2521
- max: ((I = e.quantity.restrictions) == null ? void 0 : I.max) || e.quantity.available || 1 / 0,
2522
- min: ((N = e.quantity.restrictions) == null ? void 0 : N.min) || 0,
2523
- centered: !0
2814
+ max: ((H = e.quantity.restrictions) == null ? void 0 : H.max) || e.quantity.available || 1 / 0,
2815
+ min: (($ = e.quantity.restrictions) == null ? void 0 : $.min) || 0,
2816
+ centered: !0,
2817
+ disabled: e.quantity.available === 0 || !e.quantity.available || Object.keys(e.quantity.restrictions || {}).length === 0 && !e.quantity.available
2524
2818
  }
2525
2819
  ),
2526
2820
  /* @__PURE__ */ t.jsx(
2527
- tt,
2821
+ Q,
2528
2822
  {
2529
2823
  type: "Secondary",
2530
2824
  onClick: () => {
2531
2825
  n((g) => g + 1);
2532
2826
  },
2533
- className: w.button,
2534
- disabled: !!(e.quantity.restrictions && r >= e.quantity.restrictions.max || e.quantity.available && r >= e.quantity.available),
2535
- children: /* @__PURE__ */ t.jsx(v, { name: "Plus" })
2827
+ className: P.button,
2828
+ disabled: !!(e.quantity.restrictions && o >= e.quantity.restrictions.max || e.quantity.available !== void 0 && o >= e.quantity.available || Object.keys(e.quantity.restrictions || {}).length === 0 && !e.quantity.available),
2829
+ children: /* @__PURE__ */ t.jsx(b, { name: "Plus" })
2536
2830
  }
2537
2831
  )
2538
2832
  ] }),
2539
- /* @__PURE__ */ t.jsxs("div", { className: w.meta, children: [
2540
- /* @__PURE__ */ t.jsxs("div", { className: w.info, children: [
2833
+ /* @__PURE__ */ t.jsxs("div", { className: P.meta, children: [
2834
+ /* @__PURE__ */ t.jsxs("div", { className: P.info, children: [
2541
2835
  /* @__PURE__ */ t.jsx("span", { children: "Delivery" }),
2542
- /* @__PURE__ */ t.jsxs("div", { className: w.infoRight, children: [
2836
+ /* @__PURE__ */ t.jsxs("div", { className: P.infoRight, children: [
2543
2837
  /* @__PURE__ */ t.jsx(
2544
- v,
2838
+ b,
2545
2839
  {
2546
2840
  name: "Lightning",
2547
2841
  fill: "#FF3F19",
@@ -2549,303 +2843,305 @@ const Ia = (d) => {
2549
2843
  height: 20
2550
2844
  }
2551
2845
  ),
2552
- /* @__PURE__ */ t.jsx("span", { children: !e.deliveryTime || e.deliveryTime === 0 ? "Instant" : B(e.deliveryTime) })
2846
+ /* @__PURE__ */ t.jsx("span", { children: !e.deliveryTime || e.deliveryTime === 0 ? "Instant" : w(e.deliveryTime) })
2553
2847
  ] })
2554
2848
  ] }),
2555
- /* @__PURE__ */ t.jsxs("div", { className: w.info, children: [
2849
+ /* @__PURE__ */ t.jsxs("div", { className: P.info, children: [
2556
2850
  /* @__PURE__ */ t.jsx("span", { children: "Price" }),
2557
- /* @__PURE__ */ t.jsx("div", { className: w.infoRight, children: i === "ONE_TIME" ? e.compareAtPrice && (e.compareAtPrice.amount || 0) - (e.price.amount || 0) > 0 ? /* @__PURE__ */ t.jsxs("div", { className: w.price, children: [
2558
- /* @__PURE__ */ t.jsxs("span", { className: U(w.newPrice, { [w.animate]: p }), children: [
2851
+ /* @__PURE__ */ t.jsx("div", { className: P.infoRight, children: i === "ONE_TIME" ? e.compareAtPrice && (e.compareAtPrice.amount || 0) - (e.price.amount || 0) > 0 ? /* @__PURE__ */ t.jsxs("div", { className: P.price, children: [
2852
+ /* @__PURE__ */ t.jsxs("span", { className: Y(P.newPrice, { [P.animate]: r }), children: [
2559
2853
  "$ ",
2560
- (e.price.amount || 0) * r
2854
+ (e.price.amount || 0) * o
2561
2855
  ] }),
2562
- /* @__PURE__ */ t.jsxs("span", { className: w.oldPrice, children: [
2856
+ /* @__PURE__ */ t.jsxs("span", { className: P.oldPrice, children: [
2563
2857
  "$ ",
2564
- (e.compareAtPrice.amount || 0) * r
2858
+ (e.compareAtPrice.amount || 0) * o
2565
2859
  ] })
2566
- ] }) : /* @__PURE__ */ t.jsxs("span", { className: U(w.newPrice, { [w.animate]: p }), children: [
2860
+ ] }) : /* @__PURE__ */ t.jsxs("span", { className: Y(P.newPrice, { [P.animate]: r }), children: [
2567
2861
  "$ ",
2568
- (e.price.amount || 0) * r
2569
- ] }) : e.subscriptionSettings && e.subscriptionSettings.compareAtPrice && (e.subscriptionSettings.compareAtPrice.amount || 0) - (e.subscriptionSettings.price.amount || 0) > 0 ? /* @__PURE__ */ t.jsxs("div", { className: w.price, children: [
2570
- /* @__PURE__ */ t.jsxs("span", { className: U(w.newPrice, { [w.animate]: p }), children: [
2862
+ (e.price.amount || 0) * o
2863
+ ] }) : e.subscriptionSettings && e.subscriptionSettings.compareAtPrice && (e.subscriptionSettings.compareAtPrice.amount || 0) - (e.subscriptionSettings.price.amount || 0) > 0 ? /* @__PURE__ */ t.jsxs("div", { className: P.price, children: [
2864
+ /* @__PURE__ */ t.jsxs("span", { className: Y(P.newPrice, { [P.animate]: r }), children: [
2571
2865
  "$ ",
2572
2866
  e.subscriptionSettings.price.amount || 0
2573
2867
  ] }),
2574
- /* @__PURE__ */ t.jsxs("span", { className: w.oldPrice, children: [
2868
+ /* @__PURE__ */ t.jsxs("span", { className: P.oldPrice, children: [
2575
2869
  "$ ",
2576
2870
  e.subscriptionSettings.compareAtPrice.amount || 0
2577
2871
  ] })
2578
- ] }) : e.subscriptionSettings && /* @__PURE__ */ t.jsxs("span", { className: U(w.newPrice, { [w.animate]: p }), children: [
2872
+ ] }) : e.subscriptionSettings && /* @__PURE__ */ t.jsxs("span", { className: Y(P.newPrice, { [P.animate]: r }), children: [
2579
2873
  "$ ",
2580
2874
  e.subscriptionSettings.price.amount || 0
2581
2875
  ] }) })
2582
2876
  ] })
2583
2877
  ] }),
2584
- /* @__PURE__ */ t.jsxs("div", { className: w.buttons, children: [
2878
+ /* @__PURE__ */ t.jsxs("div", { className: P.buttons, children: [
2585
2879
  /* @__PURE__ */ t.jsx(
2586
- tt,
2880
+ Q,
2587
2881
  {
2588
2882
  type: "Primary",
2589
- onClick: () => u(),
2883
+ onClick: () => _(),
2884
+ disabled: e.quantity.available === 0 || !e.quantity.available || Object.keys(e.quantity.restrictions || {}).length === 0 && !e.quantity.available,
2590
2885
  children: i === "ONE_TIME" ? "Buy Now" : "Subscribe Now"
2591
2886
  }
2592
2887
  ),
2593
2888
  i === "ONE_TIME" && /* @__PURE__ */ t.jsx(
2594
- tt,
2889
+ Q,
2595
2890
  {
2596
2891
  type: "Secondary",
2597
- onClick: () => b(),
2892
+ onClick: () => h(),
2893
+ disabled: e.quantity.available === 0 || !e.quantity.available || Object.keys(e.quantity.restrictions || {}).length === 0 && !e.quantity.available,
2598
2894
  children: "Add to Cart"
2599
2895
  }
2600
2896
  )
2601
2897
  ] })
2602
2898
  ] });
2603
- }, oo = "_button_1tdo3_1", ao = "_login_1tdo3_14", co = "_signUp_1tdo3_18", lo = "_buttons_1tdo3_23", ro = "_modal_1tdo3_32", uo = "_closing_1tdo3_64", mo = "_info_1tdo3_113", _o = "_top_1tdo3_120", ho = "_title_1tdo3_131", po = "_clear_1tdo3_138", xo = "_activeClear_1tdo3_145", go = "_count_1tdo3_149", fo = "_cart_1tdo3_164", bo = "_empty_1tdo3_172", vo = "_product_1tdo3_198", jo = "_products_1tdo3_207", yo = "_image_1tdo3_215", ko = "_productInfo_1tdo3_221", Io = "_content_1tdo3_228", $o = "_name_1tdo3_234", No = "_price_1tdo3_240", wo = "_productButtons_1tdo3_246", Co = "_productButton_1tdo3_246", Bo = "_productCount_1tdo3_266", So = "_bottom_1tdo3_282", To = "_subtotal_1tdo3_290", Po = "_block_1tdo3_298", Ao = "_shoppingCount_1tdo3_305", Mo = "_total_1tdo3_325", Oo = "_link_1tdo3_331", qo = "_userInfo_1tdo3_338", Eo = "_pagesMobileModal_1tdo3_349", Do = "_pagesMobileModalContent_1tdo3_363", Lo = "_pagesMobileModalHeader_1tdo3_369", Ho = "_pagesMobileModalFooter_1tdo3_379", $ = {
2604
- button: oo,
2605
- login: ao,
2606
- signUp: co,
2607
- buttons: lo,
2608
- modal: ro,
2899
+ }, Ao = "_button_1tdo3_1", Oo = "_login_1tdo3_14", Mo = "_signUp_1tdo3_18", qo = "_buttons_1tdo3_23", Eo = "_modal_1tdo3_32", Do = "_closing_1tdo3_64", Uo = "_info_1tdo3_113", Ho = "_top_1tdo3_120", Ro = "_title_1tdo3_131", Lo = "_clear_1tdo3_138", zo = "_activeClear_1tdo3_145", Fo = "_count_1tdo3_149", Vo = "_cart_1tdo3_164", Yo = "_empty_1tdo3_172", Go = "_product_1tdo3_198", Xo = "_products_1tdo3_207", Wo = "_image_1tdo3_215", Jo = "_productInfo_1tdo3_221", Qo = "_content_1tdo3_228", Ko = "_name_1tdo3_234", Zo = "_price_1tdo3_240", ta = "_productButtons_1tdo3_246", ea = "_productButton_1tdo3_246", sa = "_productCount_1tdo3_266", na = "_bottom_1tdo3_282", ia = "_subtotal_1tdo3_290", oa = "_block_1tdo3_298", aa = "_shoppingCount_1tdo3_305", ca = "_total_1tdo3_325", la = "_link_1tdo3_331", ra = "_userInfo_1tdo3_338", da = "_pagesMobileModal_1tdo3_349", ua = "_pagesMobileModalContent_1tdo3_363", _a = "_pagesMobileModalHeader_1tdo3_369", ma = "_pagesMobileModalFooter_1tdo3_379", S = {
2900
+ button: Ao,
2901
+ login: Oo,
2902
+ signUp: Mo,
2903
+ buttons: qo,
2904
+ modal: Eo,
2609
2905
  "slide-in-fade": "_slide-in-fade_1tdo3_1",
2610
2906
  "mobile-slide-in-fade": "_mobile-slide-in-fade_1tdo3_1",
2611
- closing: uo,
2907
+ closing: Do,
2612
2908
  "mobile-slide-out-fade": "_mobile-slide-out-fade_1tdo3_1",
2613
2909
  "slide-out-fade": "_slide-out-fade_1tdo3_1",
2614
- info: mo,
2615
- top: _o,
2616
- title: ho,
2617
- clear: po,
2618
- activeClear: xo,
2619
- count: go,
2620
- cart: fo,
2621
- empty: bo,
2622
- product: vo,
2623
- products: jo,
2624
- image: yo,
2625
- productInfo: ko,
2626
- content: Io,
2627
- name: $o,
2628
- price: No,
2629
- productButtons: wo,
2630
- productButton: Co,
2631
- productCount: Bo,
2632
- bottom: So,
2633
- subtotal: To,
2634
- block: Po,
2635
- shoppingCount: Ao,
2636
- total: Mo,
2637
- link: Oo,
2638
- userInfo: qo,
2639
- pagesMobileModal: Eo,
2640
- pagesMobileModalContent: Do,
2641
- pagesMobileModalHeader: Lo,
2642
- pagesMobileModalFooter: Ho
2910
+ info: Uo,
2911
+ top: Ho,
2912
+ title: Ro,
2913
+ clear: Lo,
2914
+ activeClear: zo,
2915
+ count: Fo,
2916
+ cart: Vo,
2917
+ empty: Yo,
2918
+ product: Go,
2919
+ products: Xo,
2920
+ image: Wo,
2921
+ productInfo: Jo,
2922
+ content: Qo,
2923
+ name: Ko,
2924
+ price: Zo,
2925
+ productButtons: ta,
2926
+ productButton: ea,
2927
+ productCount: sa,
2928
+ bottom: na,
2929
+ subtotal: ia,
2930
+ block: oa,
2931
+ shoppingCount: aa,
2932
+ total: ca,
2933
+ link: la,
2934
+ userInfo: ra,
2935
+ pagesMobileModal: da,
2936
+ pagesMobileModalContent: ua,
2937
+ pagesMobileModalHeader: _a,
2938
+ pagesMobileModalFooter: ma
2643
2939
  };
2644
- class gt extends Error {
2940
+ class xt extends Error {
2645
2941
  }
2646
- gt.prototype.name = "InvalidTokenError";
2647
- function zo(d) {
2648
- return decodeURIComponent(atob(d).replace(/(.)/g, (o, e) => {
2942
+ xt.prototype.name = "InvalidTokenError";
2943
+ function ha(u) {
2944
+ return decodeURIComponent(atob(u).replace(/(.)/g, (a, e) => {
2649
2945
  let s = e.charCodeAt(0).toString(16).toUpperCase();
2650
2946
  return s.length < 2 && (s = "0" + s), "%" + s;
2651
2947
  }));
2652
2948
  }
2653
- function Ro(d) {
2654
- let o = d.replace(/-/g, "+").replace(/_/g, "/");
2655
- switch (o.length % 4) {
2949
+ function pa(u) {
2950
+ let a = u.replace(/-/g, "+").replace(/_/g, "/");
2951
+ switch (a.length % 4) {
2656
2952
  case 0:
2657
2953
  break;
2658
2954
  case 2:
2659
- o += "==";
2955
+ a += "==";
2660
2956
  break;
2661
2957
  case 3:
2662
- o += "=";
2958
+ a += "=";
2663
2959
  break;
2664
2960
  default:
2665
2961
  throw new Error("base64 string is not of the correct length");
2666
2962
  }
2667
2963
  try {
2668
- return zo(o);
2964
+ return ha(a);
2669
2965
  } catch {
2670
- return atob(o);
2966
+ return atob(a);
2671
2967
  }
2672
2968
  }
2673
- function Fo(d, o) {
2674
- if (typeof d != "string")
2675
- throw new gt("Invalid token specified: must be a string");
2676
- o || (o = {});
2677
- const e = o.header === !0 ? 0 : 1, s = d.split(".")[e];
2969
+ function fa(u, a) {
2970
+ if (typeof u != "string")
2971
+ throw new xt("Invalid token specified: must be a string");
2972
+ a || (a = {});
2973
+ const e = a.header === !0 ? 0 : 1, s = u.split(".")[e];
2678
2974
  if (typeof s != "string")
2679
- throw new gt(`Invalid token specified: missing part #${e + 1}`);
2975
+ throw new xt(`Invalid token specified: missing part #${e + 1}`);
2680
2976
  let i;
2681
2977
  try {
2682
- i = Ro(s);
2683
- } catch (a) {
2684
- throw new gt(`Invalid token specified: invalid base64 for part #${e + 1} (${a.message})`);
2978
+ i = pa(s);
2979
+ } catch (c) {
2980
+ throw new xt(`Invalid token specified: invalid base64 for part #${e + 1} (${c.message})`);
2685
2981
  }
2686
2982
  try {
2687
2983
  return JSON.parse(i);
2688
- } catch (a) {
2689
- throw new gt(`Invalid token specified: invalid json for part #${e + 1} (${a.message})`);
2984
+ } catch (c) {
2985
+ throw new xt(`Invalid token specified: invalid json for part #${e + 1} (${c.message})`);
2690
2986
  }
2691
2987
  }
2692
- const $a = (d) => {
2693
- const { shopping: o, signUp: e, isShowUserInfo: s = !0 } = d;
2694
- return /* @__PURE__ */ t.jsxs("div", { className: $.buttons, children: [
2695
- o && /* @__PURE__ */ t.jsx(Vo, {}),
2988
+ const sc = (u) => {
2989
+ const { shopping: a, signUp: e, isShowUserInfo: s = !0 } = u;
2990
+ return /* @__PURE__ */ t.jsxs("div", { className: S.buttons, children: [
2991
+ a && /* @__PURE__ */ t.jsx(ga, {}),
2696
2992
  s && /* @__PURE__ */ t.jsx(Ft, { signUp: e })
2697
2993
  ] });
2698
- }, Vo = () => {
2699
- const [d, o] = f.useState(!1), [e, s] = f.useState([]), { cart: i, getProducts: a } = At();
2700
- function l(p) {
2701
- for (let _ = 0; _ < i.parts.length; _++)
2702
- for (let b = 0; b < p.variants.length; b++)
2703
- if (i.parts[_].productVariantId === p.variants[_].id)
2704
- return i.parts[_].productVariantId;
2994
+ }, ga = () => {
2995
+ const [u, a] = f.useState(!1), [e, s] = f.useState([]), { cart: i, getProducts: c } = Ot();
2996
+ function l(r) {
2997
+ for (let y = 0; y < i.parts.length; y++)
2998
+ for (let h = 0; h < r.variants.length; h++)
2999
+ if (i.parts[y].productVariantId === r.variants[y].id)
3000
+ return i.parts[y].productVariantId;
2705
3001
  }
2706
- function r(p) {
2707
- for (let _ = 0; _ < i.parts.length; _++)
2708
- for (let b = 0; b < p.variants.length; b++)
2709
- if (i.parts[_].productVariantId === p.variants[_].id)
2710
- return i.parts[_].quantity;
3002
+ function o(r) {
3003
+ for (let y = 0; y < i.parts.length; y++)
3004
+ for (let h = 0; h < r.variants.length; h++)
3005
+ if (i.parts[y].productVariantId === r.variants[y].id)
3006
+ return i.parts[y].quantity;
2711
3007
  }
2712
3008
  f.useEffect(() => {
2713
3009
  (async () => {
2714
- const _ = i.parts.map((B) => String(B.productId)), u = (await a([..._])).map((B) => ({
2715
- ...B,
2716
- activeVariantId: l(B),
2717
- quantity: r(B)
3010
+ const y = i.parts.map((w) => String(w.productId)), _ = (await c([...y])).map((w) => ({
3011
+ ...w,
3012
+ activeVariantId: l(w),
3013
+ quantity: o(w)
2718
3014
  }));
2719
- s(u);
3015
+ s(_);
2720
3016
  })();
2721
3017
  }, [i.parts.length]);
2722
- function n(p) {
2723
- var _;
2724
- return !p || !(p != null && p.variants) ? !1 : (_ = p.variants.find((b) => b.id === p.activeVariantId)) == null ? void 0 : _.subscriptionSettings;
3018
+ function n(r) {
3019
+ var y;
3020
+ return !r || !(r != null && r.variants) ? !1 : (y = r.variants.find((h) => h.id === r.activeVariantId)) == null ? void 0 : y.subscriptionSettings;
2725
3021
  }
2726
- const c = i.parts.length > 0 && e.length > 0 && !n(e[0]), [x, h] = f.useState(!1);
3022
+ const d = i.parts.length > 0 && e.length > 0 && !n(e[0]), [j, p] = f.useState(!1);
2727
3023
  return /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
2728
3024
  /* @__PURE__ */ t.jsxs(
2729
- tt,
3025
+ Q,
2730
3026
  {
2731
3027
  type: "Secondary",
2732
3028
  style: {
2733
3029
  padding: 10
2734
3030
  },
2735
- onClick: (p) => {
2736
- p.stopPropagation(), window.location.pathname !== "/admin/builder" && (o(!0), h(!0));
3031
+ onClick: (r) => {
3032
+ r.stopPropagation(), window.location.pathname !== "/admin/builder" && (a(!0), p(!0));
2737
3033
  },
2738
3034
  children: [
2739
3035
  /* @__PURE__ */ t.jsx(
2740
- v,
3036
+ b,
2741
3037
  {
2742
3038
  name: "Handbag",
2743
3039
  fill: "var(--icon-primary)"
2744
3040
  }
2745
3041
  ),
2746
- c && /* @__PURE__ */ t.jsx("div", { className: $.shoppingCount, children: i.parts.length })
3042
+ d && /* @__PURE__ */ t.jsx("div", { className: S.shoppingCount, children: i.parts.length })
2747
3043
  ]
2748
3044
  }
2749
3045
  ),
2750
- d && /* @__PURE__ */ t.jsx(
3046
+ u && /* @__PURE__ */ t.jsx(
2751
3047
  Mt,
2752
3048
  {
2753
3049
  close: () => {
2754
- h(!1), setTimeout(() => {
2755
- o(!1);
3050
+ p(!1), setTimeout(() => {
3051
+ a(!1);
2756
3052
  }, 300);
2757
3053
  },
2758
3054
  withAnimation: !1,
2759
3055
  children: /* @__PURE__ */ t.jsx(
2760
- Uo,
3056
+ xa,
2761
3057
  {
2762
3058
  activeProducts: e,
2763
- isCartNotEmpty: c,
2764
- isOpen: x
3059
+ isCartNotEmpty: d,
3060
+ isOpen: j
2765
3061
  }
2766
3062
  )
2767
3063
  }
2768
3064
  )
2769
3065
  ] });
2770
- }, Uo = (d) => {
2771
- const { activeProducts: o, isCartNotEmpty: e, isOpen: s } = d, { cart: i, reset: a, getTotalAndDiscount: l, updateQuantityOfProduct: r } = At(), n = jt();
2772
- function c(p) {
2773
- n(p);
3066
+ }, xa = (u) => {
3067
+ const { activeProducts: a, isCartNotEmpty: e, isOpen: s } = u, { cart: i, reset: c, getTotalAndDiscount: l, updateQuantityOfProduct: o } = Ot(), n = Bt();
3068
+ function d(r) {
3069
+ n(r);
2774
3070
  }
2775
- function x(p) {
2776
- r({
2777
- productId: p.id,
2778
- productVariantId: p.activeVariantId,
2779
- quantity: p.quantity + 1
3071
+ function j(r) {
3072
+ o({
3073
+ productId: r.id,
3074
+ productVariantId: r.activeVariantId,
3075
+ quantity: r.quantity + 1
2780
3076
  });
2781
3077
  }
2782
- function h(p) {
2783
- r({
2784
- productId: p.id,
2785
- productVariantId: p.activeVariantId,
2786
- quantity: p.quantity - 1
3078
+ function p(r) {
3079
+ o({
3080
+ productId: r.id,
3081
+ productVariantId: r.activeVariantId,
3082
+ quantity: r.quantity - 1
2787
3083
  });
2788
3084
  }
2789
3085
  return /* @__PURE__ */ t.jsxs(
2790
3086
  "div",
2791
3087
  {
2792
- className: U($.modal, {
2793
- [$.closing]: !s
3088
+ className: Y(S.modal, {
3089
+ [S.closing]: !s
2794
3090
  }),
2795
- onClick: (p) => p.stopPropagation(),
3091
+ onClick: (r) => r.stopPropagation(),
2796
3092
  children: [
2797
- /* @__PURE__ */ t.jsxs("div", { className: $.top, children: [
2798
- /* @__PURE__ */ t.jsxs("div", { className: $.info, children: [
2799
- /* @__PURE__ */ t.jsx("span", { className: $.title, children: "Cart" }),
2800
- e && /* @__PURE__ */ t.jsx("div", { className: $.count, children: i.parts.length })
3093
+ /* @__PURE__ */ t.jsxs("div", { className: S.top, children: [
3094
+ /* @__PURE__ */ t.jsxs("div", { className: S.info, children: [
3095
+ /* @__PURE__ */ t.jsx("span", { className: S.title, children: "Cart" }),
3096
+ e && /* @__PURE__ */ t.jsx("div", { className: S.count, children: i.parts.length })
2801
3097
  ] }),
2802
3098
  /* @__PURE__ */ t.jsx(
2803
3099
  "button",
2804
3100
  {
2805
- className: U($.clear, {
2806
- [$.activeClear]: e
3101
+ className: Y(S.clear, {
3102
+ [S.activeClear]: e
2807
3103
  }),
2808
3104
  disabled: !e,
2809
- onClick: a,
3105
+ onClick: c,
2810
3106
  children: "Clear all"
2811
3107
  }
2812
3108
  )
2813
3109
  ] }),
2814
- e ? /* @__PURE__ */ t.jsxs("div", { className: $.cart, children: [
2815
- /* @__PURE__ */ t.jsx("div", { className: $.products, children: o.map((p) => /* @__PURE__ */ t.jsxs(
3110
+ e ? /* @__PURE__ */ t.jsxs("div", { className: S.cart, children: [
3111
+ /* @__PURE__ */ t.jsx("div", { className: S.products, children: a.map((r) => /* @__PURE__ */ t.jsxs(
2816
3112
  "div",
2817
3113
  {
2818
- className: $.product,
3114
+ className: S.product,
2819
3115
  children: [
2820
- /* @__PURE__ */ t.jsxs("div", { className: $.productInfo, children: [
3116
+ /* @__PURE__ */ t.jsxs("div", { className: S.productInfo, children: [
2821
3117
  /* @__PURE__ */ t.jsx(
2822
3118
  "img",
2823
3119
  {
2824
- src: `https://imagedelivery.net/${p.images[0].cfId}/w=500`,
3120
+ src: `https://imagedelivery.net/${r.images[0].cfId}/w=500`,
2825
3121
  alt: "image",
2826
3122
  width: "100%",
2827
3123
  height: "100%",
2828
- className: $.image
3124
+ className: S.image
2829
3125
  }
2830
3126
  ),
2831
- /* @__PURE__ */ t.jsxs("div", { className: $.content, children: [
2832
- /* @__PURE__ */ t.jsx("div", { className: $.name, children: p.name }),
2833
- /* @__PURE__ */ t.jsxs("div", { className: $.price, children: [
3127
+ /* @__PURE__ */ t.jsxs("div", { className: S.content, children: [
3128
+ /* @__PURE__ */ t.jsx("div", { className: S.name, children: r.name }),
3129
+ /* @__PURE__ */ t.jsxs("div", { className: S.price, children: [
2834
3130
  "$",
2835
- p.variants.find((_) => _.id === p.activeVariantId).price.amount * ((p == null ? void 0 : p.quantity) || 1)
3131
+ r.variants.find((y) => y.id === r.activeVariantId).price.amount * ((r == null ? void 0 : r.quantity) || 1)
2836
3132
  ] })
2837
3133
  ] })
2838
3134
  ] }),
2839
- /* @__PURE__ */ t.jsxs("div", { className: $.productButtons, children: [
3135
+ /* @__PURE__ */ t.jsxs("div", { className: S.productButtons, children: [
2840
3136
  /* @__PURE__ */ t.jsx(
2841
3137
  "div",
2842
3138
  {
2843
3139
  onClick: () => {
2844
- p.quantity !== 1 && h(p);
3140
+ r.quantity !== 1 && p(r);
2845
3141
  },
2846
- className: $.productButton,
3142
+ className: S.productButton,
2847
3143
  children: /* @__PURE__ */ t.jsx(
2848
- v,
3144
+ b,
2849
3145
  {
2850
3146
  name: "Minus",
2851
3147
  fill: "#757575",
@@ -2855,14 +3151,14 @@ const $a = (d) => {
2855
3151
  )
2856
3152
  }
2857
3153
  ),
2858
- /* @__PURE__ */ t.jsx("div", { className: $.productCount, children: p.quantity }),
3154
+ /* @__PURE__ */ t.jsx("div", { className: S.productCount, children: r.quantity }),
2859
3155
  /* @__PURE__ */ t.jsx(
2860
3156
  "div",
2861
3157
  {
2862
- onClick: () => x(p),
2863
- className: $.productButton,
3158
+ onClick: () => j(r),
3159
+ className: S.productButton,
2864
3160
  children: /* @__PURE__ */ t.jsx(
2865
- v,
3161
+ b,
2866
3162
  {
2867
3163
  name: "Plus",
2868
3164
  fill: "#757575",
@@ -2875,14 +3171,14 @@ const $a = (d) => {
2875
3171
  ] })
2876
3172
  ]
2877
3173
  },
2878
- p.id
3174
+ r.id
2879
3175
  )) }),
2880
- /* @__PURE__ */ t.jsxs("div", { className: $.bottom, children: [
2881
- /* @__PURE__ */ t.jsxs("div", { className: $.subtotal, children: [
2882
- /* @__PURE__ */ t.jsxs("div", { className: $.block, children: [
3176
+ /* @__PURE__ */ t.jsxs("div", { className: S.bottom, children: [
3177
+ /* @__PURE__ */ t.jsxs("div", { className: S.subtotal, children: [
3178
+ /* @__PURE__ */ t.jsxs("div", { className: S.block, children: [
2883
3179
  /* @__PURE__ */ t.jsx("span", { children: "Subtotal" }),
2884
3180
  /* @__PURE__ */ t.jsx(
2885
- v,
3181
+ b,
2886
3182
  {
2887
3183
  name: "Info",
2888
3184
  width: 20,
@@ -2891,20 +3187,20 @@ const $a = (d) => {
2891
3187
  }
2892
3188
  )
2893
3189
  ] }),
2894
- /* @__PURE__ */ t.jsxs("div", { className: $.total, children: [
3190
+ /* @__PURE__ */ t.jsxs("div", { className: S.total, children: [
2895
3191
  "$",
2896
3192
  l().total
2897
3193
  ] })
2898
3194
  ] }),
2899
- /* @__PURE__ */ t.jsx(tt, { onClick: () => c("/checkout"), children: "Checkout" })
3195
+ /* @__PURE__ */ t.jsx(Q, { onClick: () => d("/checkout"), children: "Checkout" })
2900
3196
  ] })
2901
- ] }) : /* @__PURE__ */ t.jsx(Yo, {})
3197
+ ] }) : /* @__PURE__ */ t.jsx(ba, {})
2902
3198
  ]
2903
3199
  }
2904
3200
  );
2905
- }, Yo = () => /* @__PURE__ */ t.jsxs("div", { className: $.empty, children: [
3201
+ }, ba = () => /* @__PURE__ */ t.jsxs("div", { className: S.empty, children: [
2906
3202
  /* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
2907
- v,
3203
+ b,
2908
3204
  {
2909
3205
  name: "Handbag",
2910
3206
  fill: "var(--icon-secondary)"
@@ -2918,20 +3214,20 @@ const $a = (d) => {
2918
3214
  "a",
2919
3215
  {
2920
3216
  href: "/products",
2921
- className: $.link,
3217
+ className: S.link,
2922
3218
  children: "view products"
2923
3219
  }
2924
3220
  )
2925
3221
  ] })
2926
- ] }), Ft = ({ signUp: d }) => {
2927
- const o = JSON.parse(localStorage.getItem("token") || "{}"), { data: e } = o, s = jt();
2928
- function i(r) {
2929
- s(r);
3222
+ ] }), Ft = ({ signUp: u }) => {
3223
+ const a = JSON.parse(localStorage.getItem("token") || "{}"), { data: e } = a, s = Bt();
3224
+ function i(o) {
3225
+ s(o);
2930
3226
  }
2931
3227
  if (!e)
2932
3228
  return /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
2933
3229
  /* @__PURE__ */ t.jsx(
2934
- tt,
3230
+ Q,
2935
3231
  {
2936
3232
  onClick: () => i("/customer-dash"),
2937
3233
  type: "Secondary",
@@ -2941,8 +3237,8 @@ const $a = (d) => {
2941
3237
  children: "Login"
2942
3238
  }
2943
3239
  ),
2944
- d && /* @__PURE__ */ t.jsx(
2945
- tt,
3240
+ u && /* @__PURE__ */ t.jsx(
3241
+ Q,
2946
3242
  {
2947
3243
  onClick: () => i("/customer-dash"),
2948
3244
  type: "Primary",
@@ -2953,27 +3249,27 @@ const $a = (d) => {
2953
3249
  }
2954
3250
  )
2955
3251
  ] });
2956
- const [a, l] = f.useState("test-email@gmail.com");
3252
+ const [c, l] = f.useState("test-email@gmail.com");
2957
3253
  return f.useEffect(() => {
2958
3254
  (async () => {
2959
- const n = Fo(e);
3255
+ const n = fa(e);
2960
3256
  l(n.email);
2961
3257
  })();
2962
3258
  }, [e]), /* @__PURE__ */ t.jsx(
2963
3259
  "div",
2964
3260
  {
2965
- className: $.userInfo,
3261
+ className: S.userInfo,
2966
3262
  onClick: () => i("/customer-dash"),
2967
- children: /* @__PURE__ */ t.jsx("div", { children: a || "test-email@gmail.com" })
3263
+ children: /* @__PURE__ */ t.jsx("div", { children: c || "test-email@gmail.com" })
2968
3264
  }
2969
3265
  );
2970
- }, Go = ({
2971
- children: d,
2972
- logo: o,
3266
+ }, va = ({
3267
+ children: u,
3268
+ logo: a,
2973
3269
  setIsOpen: e,
2974
3270
  signUp: s
2975
3271
  }) => {
2976
- const { setIsOpen: i } = Dt(), a = () => {
3272
+ const { setIsOpen: i } = Ut(), c = () => {
2977
3273
  i(!1), setTimeout(() => {
2978
3274
  e(!1), i(!0);
2979
3275
  }, 300);
@@ -2981,18 +3277,18 @@ const $a = (d) => {
2981
3277
  return /* @__PURE__ */ t.jsxs(
2982
3278
  "div",
2983
3279
  {
2984
- className: $.pagesMobileModal,
3280
+ className: S.pagesMobileModal,
2985
3281
  onClick: (l) => l.stopPropagation(),
2986
3282
  children: [
2987
- /* @__PURE__ */ t.jsxs("div", { className: $.pagesMobileModalHeader, children: [
2988
- /* @__PURE__ */ t.jsx("div", { children: o }),
3283
+ /* @__PURE__ */ t.jsxs("div", { className: S.pagesMobileModalHeader, children: [
3284
+ /* @__PURE__ */ t.jsx("div", { children: a }),
2989
3285
  /* @__PURE__ */ t.jsx(
2990
- tt,
3286
+ Q,
2991
3287
  {
2992
3288
  type: "Secondary",
2993
- onClick: a,
3289
+ onClick: c,
2994
3290
  children: /* @__PURE__ */ t.jsx(
2995
- v,
3291
+ b,
2996
3292
  {
2997
3293
  name: "X",
2998
3294
  fill: "var(--icon-primary)"
@@ -3001,43 +3297,43 @@ const $a = (d) => {
3001
3297
  }
3002
3298
  )
3003
3299
  ] }),
3004
- /* @__PURE__ */ t.jsx("div", { className: $.pagesMobileModalContent, children: d }),
3005
- /* @__PURE__ */ t.jsx("div", { className: $.pagesMobileModalFooter, children: /* @__PURE__ */ t.jsx(Ft, { signUp: s }) })
3300
+ /* @__PURE__ */ t.jsx("div", { className: S.pagesMobileModalContent, children: u }),
3301
+ /* @__PURE__ */ t.jsx("div", { className: S.pagesMobileModalFooter, children: /* @__PURE__ */ t.jsx(Ft, { signUp: s }) })
3006
3302
  ]
3007
3303
  }
3008
3304
  );
3009
- }, Na = ({
3010
- children: d,
3011
- logo: o,
3305
+ }, nc = ({
3306
+ children: u,
3307
+ logo: a,
3012
3308
  signUp: e
3013
3309
  }) => {
3014
3310
  const [s, i] = f.useState(!1);
3015
3311
  return /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
3016
- /* @__PURE__ */ t.jsx(Xo, { setIsOpenModal: i }),
3312
+ /* @__PURE__ */ t.jsx(ja, { setIsOpenModal: i }),
3017
3313
  s && /* @__PURE__ */ t.jsx(Mt, { close: () => i(!1), children: /* @__PURE__ */ t.jsx(
3018
- Go,
3314
+ va,
3019
3315
  {
3020
- logo: o,
3316
+ logo: a,
3021
3317
  setIsOpen: i,
3022
3318
  signUp: e,
3023
- children: d
3319
+ children: u
3024
3320
  }
3025
3321
  ) })
3026
3322
  ] });
3027
- }, Xo = (d) => {
3028
- const { setIsOpenModal: o } = d;
3323
+ }, ja = (u) => {
3324
+ const { setIsOpenModal: a } = u;
3029
3325
  return /* @__PURE__ */ t.jsx(
3030
- tt,
3326
+ Q,
3031
3327
  {
3032
3328
  type: "Secondary",
3033
3329
  style: {
3034
3330
  padding: 10
3035
3331
  },
3036
3332
  onClick: (e) => {
3037
- e.stopPropagation(), o(!0);
3333
+ e.stopPropagation(), a(!0);
3038
3334
  },
3039
3335
  children: /* @__PURE__ */ t.jsx(
3040
- v,
3336
+ b,
3041
3337
  {
3042
3338
  name: "List",
3043
3339
  fill: "var(--icon-primary)"
@@ -3045,34 +3341,34 @@ const $a = (d) => {
3045
3341
  )
3046
3342
  }
3047
3343
  );
3048
- }, Wo = "_share_xddz7_1", Jo = "_modal_xddz7_8", Qo = "_header_xddz7_20", Ko = "_socials_xddz7_30", Zo = "_social_xddz7_30", ta = "_copy_xddz7_40", ea = "_title_xddz7_47", sa = "_copyWrapper_xddz7_53", na = "_copyText_xddz7_62", ia = "_copyTextMobile_xddz7_75", oa = "_copyTextMiniMobile_xddz7_94", at = {
3049
- share: Wo,
3050
- modal: Jo,
3051
- header: Qo,
3052
- socials: Ko,
3053
- social: Zo,
3054
- copy: ta,
3055
- title: ea,
3056
- copyWrapper: sa,
3057
- copyText: na,
3058
- copyTextMobile: ia,
3059
- copyTextMiniMobile: oa
3060
- }, wa = () => {
3061
- const { isOpenModal: d, setIsOpenModal: o } = Lt();
3344
+ }, ya = "_share_xddz7_1", ka = "_modal_xddz7_8", $a = "_header_xddz7_20", Ia = "_socials_xddz7_30", Na = "_social_xddz7_30", wa = "_copy_xddz7_40", Ca = "_title_xddz7_47", Sa = "_copyWrapper_xddz7_53", Ba = "_copyText_xddz7_62", Ta = "_copyTextMobile_xddz7_75", Pa = "_copyTextMiniMobile_xddz7_94", lt = {
3345
+ share: ya,
3346
+ modal: ka,
3347
+ header: $a,
3348
+ socials: Ia,
3349
+ social: Na,
3350
+ copy: wa,
3351
+ title: Ca,
3352
+ copyWrapper: Sa,
3353
+ copyText: Ba,
3354
+ copyTextMobile: Ta,
3355
+ copyTextMiniMobile: Pa
3356
+ }, ic = () => {
3357
+ const { isOpenModal: u, setIsOpenModal: a } = Ht();
3062
3358
  function e() {
3063
- o(!0);
3359
+ a(!0);
3064
3360
  }
3065
3361
  return /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
3066
3362
  /* @__PURE__ */ t.jsx(
3067
- lt,
3363
+ ot,
3068
3364
  {
3069
- className: at.share,
3365
+ className: lt.share,
3070
3366
  onClick: (s) => {
3071
3367
  s.stopPropagation(), e();
3072
3368
  },
3073
3369
  type: "Secondary",
3074
3370
  children: /* @__PURE__ */ t.jsx(
3075
- v,
3371
+ b,
3076
3372
  {
3077
3373
  name: "Share",
3078
3374
  fill: "#757575",
@@ -3081,11 +3377,11 @@ const $a = (d) => {
3081
3377
  )
3082
3378
  }
3083
3379
  ),
3084
- d && /* @__PURE__ */ t.jsx(Mt, { close: o, children: /* @__PURE__ */ t.jsx(aa, {}) })
3380
+ u && /* @__PURE__ */ t.jsx(Mt, { close: a, children: /* @__PURE__ */ t.jsx(Aa, {}) })
3085
3381
  ] });
3086
- }, aa = () => {
3087
- const { setIsOpenModal: d } = Lt(), { notification: o, setNotification: e } = Ut(), { setIsOpen: s } = Dt(), i = window.location.href;
3088
- function a() {
3382
+ }, Aa = () => {
3383
+ const { setIsOpenModal: u } = Ht(), { notification: a, setNotification: e } = Gt(), { setIsOpen: s } = Ut(), i = window.location.href;
3384
+ function c() {
3089
3385
  navigator.clipboard.writeText(i), e({
3090
3386
  message: "Link copied to clipboard",
3091
3387
  status: "success"
@@ -3093,22 +3389,22 @@ const $a = (d) => {
3093
3389
  }
3094
3390
  function l() {
3095
3391
  s(!1), setTimeout(() => {
3096
- d(!1), s(!0);
3392
+ u(!1), s(!0);
3097
3393
  }, 300);
3098
3394
  }
3099
- function r(n, c) {
3100
- return n.length > c ? n.slice(0, c) + "..." : n;
3395
+ function o(n, d) {
3396
+ return n.length > d ? n.slice(0, d) + "..." : n;
3101
3397
  }
3102
3398
  return /* @__PURE__ */ t.jsxs(
3103
3399
  "div",
3104
3400
  {
3105
- className: at.modal,
3401
+ className: lt.modal,
3106
3402
  onClick: (n) => n.stopPropagation(),
3107
3403
  children: [
3108
- /* @__PURE__ */ t.jsxs("div", { className: at.header, children: [
3109
- /* @__PURE__ */ t.jsx("div", { className: at.title, children: "Copy Product Link" }),
3404
+ /* @__PURE__ */ t.jsxs("div", { className: lt.header, children: [
3405
+ /* @__PURE__ */ t.jsx("div", { className: lt.title, children: "Copy Product Link" }),
3110
3406
  /* @__PURE__ */ t.jsx(
3111
- v,
3407
+ b,
3112
3408
  {
3113
3409
  name: "X",
3114
3410
  fill: "#757575",
@@ -3117,95 +3413,113 @@ const $a = (d) => {
3117
3413
  }
3118
3414
  )
3119
3415
  ] }),
3120
- /* @__PURE__ */ t.jsxs("div", { className: at.copyWrapper, children: [
3416
+ /* @__PURE__ */ t.jsxs("div", { className: lt.copyWrapper, children: [
3121
3417
  /* @__PURE__ */ t.jsxs(
3122
- lt,
3418
+ ot,
3123
3419
  {
3124
3420
  type: "Secondary",
3125
- onClick: a,
3421
+ onClick: c,
3126
3422
  style: {
3127
3423
  flex: 1
3128
3424
  },
3129
3425
  children: [
3130
- /* @__PURE__ */ t.jsx("div", { className: at.copyText, children: r(i, 100) }),
3131
- /* @__PURE__ */ t.jsx("div", { className: at.copyTextMobile, children: r(i, 40) }),
3132
- /* @__PURE__ */ t.jsx("div", { className: at.copyTextMiniMobile, children: r(i, 20) })
3426
+ /* @__PURE__ */ t.jsx("div", { className: lt.copyText, children: o(i, 100) }),
3427
+ /* @__PURE__ */ t.jsx("div", { className: lt.copyTextMobile, children: o(i, 40) }),
3428
+ /* @__PURE__ */ t.jsx("div", { className: lt.copyTextMiniMobile, children: o(i, 20) })
3133
3429
  ]
3134
3430
  }
3135
3431
  ),
3136
3432
  /* @__PURE__ */ t.jsx(
3137
- lt,
3433
+ ot,
3138
3434
  {
3139
3435
  type: "Secondary",
3140
- onClick: a,
3141
- children: o ? /* @__PURE__ */ t.jsx(v, { name: "Check" }) : /* @__PURE__ */ t.jsx(v, { name: "Copy" })
3436
+ onClick: c,
3437
+ children: a ? /* @__PURE__ */ t.jsx(b, { name: "Check" }) : /* @__PURE__ */ t.jsx(b, { name: "Copy" })
3142
3438
  }
3143
3439
  )
3144
3440
  ] })
3145
3441
  ]
3146
3442
  }
3147
3443
  );
3148
- }, ca = "_accordion_1s1lq_1", la = "_header_1s1lq_9", ra = "_icon_1s1lq_18", da = "_open_1s1lq_21", ua = "_content_1s1lq_25", xt = {
3149
- accordion: ca,
3150
- header: la,
3151
- icon: ra,
3152
- open: da,
3153
- content: ua
3154
- }, Ca = ({ title: d, content: o, defaultOpen: e = !1 }) => {
3155
- const [s, i] = f.useState(e), [a, l] = f.useState(0), r = f.useRef(null), n = () => {
3444
+ }, Oa = "_accordion_1s1lq_1", Ma = "_header_1s1lq_9", qa = "_icon_1s1lq_18", Ea = "_open_1s1lq_21", Da = "_content_1s1lq_25", gt = {
3445
+ accordion: Oa,
3446
+ header: Ma,
3447
+ icon: qa,
3448
+ open: Ea,
3449
+ content: Da
3450
+ }, oc = ({ title: u, content: a, defaultOpen: e = !1 }) => {
3451
+ const [s, i] = f.useState(e), [c, l] = f.useState(0), o = f.useRef(null), n = () => {
3156
3452
  i(!s);
3157
3453
  };
3158
3454
  return f.useEffect(() => {
3159
- r.current && l(s ? r.current.scrollHeight : 0);
3160
- }, [s]), /* @__PURE__ */ t.jsxs("div", { className: xt.accordion, children: [
3455
+ o.current && l(s ? o.current.scrollHeight : 0);
3456
+ }, [s]), /* @__PURE__ */ t.jsxs("div", { className: gt.accordion, children: [
3161
3457
  /* @__PURE__ */ t.jsxs(
3162
3458
  "div",
3163
3459
  {
3164
- className: xt.header,
3460
+ className: gt.header,
3165
3461
  onClick: n,
3166
3462
  children: [
3167
- /* @__PURE__ */ t.jsx("h5", { id: "h5", children: d }),
3168
- /* @__PURE__ */ t.jsx("div", { className: U(xt.icon, { [xt.open]: s }), children: /* @__PURE__ */ t.jsx(v, { name: "CaretDown" }) })
3463
+ /* @__PURE__ */ t.jsx("h5", { id: "h5", children: u }),
3464
+ /* @__PURE__ */ t.jsx("div", { className: Y(gt.icon, { [gt.open]: s }), children: /* @__PURE__ */ t.jsx(b, { name: "CaretDown" }) })
3169
3465
  ]
3170
3466
  }
3171
3467
  ),
3172
3468
  /* @__PURE__ */ t.jsx(
3173
3469
  "div",
3174
3470
  {
3175
- ref: r,
3176
- className: xt.content,
3177
- style: { height: `${a}px` },
3178
- children: /* @__PURE__ */ t.jsx("p", { id: "p", children: o })
3471
+ ref: o,
3472
+ className: gt.content,
3473
+ style: { height: `${c}px` },
3474
+ children: /* @__PURE__ */ t.jsx("p", { id: "p", children: a })
3179
3475
  }
3180
3476
  )
3181
3477
  ] });
3182
- }, Ba = ({ children: d, path: o, className: e, target: s = "_self", id: i }) => {
3183
- const a = jt(), l = /^https?:\/\//.test(o), r = (n) => {
3184
- l || s === "_blank" ? s === "_blank" ? window.open(o, "_blank") : window.location.href = o : (n.preventDefault(), a(o, { replace: !0 }));
3478
+ }, ac = ({ children: u, path: a, className: e, target: s = "_self", id: i }) => {
3479
+ const c = Bt(), l = /^https?:\/\//.test(a), o = (n) => {
3480
+ l || s === "_blank" ? s === "_blank" ? window.open(a, "_blank") : window.location.href = a : (n.preventDefault(), c(a, { replace: !0 }));
3185
3481
  };
3186
3482
  return /* @__PURE__ */ t.jsx(
3187
3483
  "div",
3188
3484
  {
3189
- onClick: r,
3485
+ onClick: o,
3190
3486
  className: e,
3191
3487
  role: "link",
3192
3488
  style: { cursor: "pointer" },
3193
3489
  id: i,
3194
- children: d
3490
+ children: u
3195
3491
  }
3196
3492
  );
3197
- }, ma = "_wrapper_st58d_1", _a = "_label_st58d_10", ha = "_textarea_st58d_18", pa = "_length_st58d_33", vt = {
3198
- wrapper: ma,
3199
- label: _a,
3200
- textarea: ha,
3201
- length: pa
3202
- }, Sa = (d) => {
3203
- const { onChange: o, label: e, value: s, maxLength: i, placeholder: a = "Type something..." } = d, [l, r] = f.useState(s.length);
3204
- return /* @__PURE__ */ t.jsxs("div", { className: vt.wrapper, children: [
3493
+ }, Ua = "_buttonsBlock_1b2rb_1", Ha = "_slideUp_1b2rb_1", Ra = {
3494
+ buttonsBlock: Ua,
3495
+ slideUp: Ha
3496
+ }, cc = () => /* @__PURE__ */ t.jsxs("div", { className: Ra.buttonsBlock, children: [
3497
+ /* @__PURE__ */ t.jsx(
3498
+ Q,
3499
+ {
3500
+ type: "Primary",
3501
+ style: {
3502
+ width: "100%"
3503
+ },
3504
+ onClick: () => {
3505
+ console.log("add to cart");
3506
+ },
3507
+ children: "Add to Cart"
3508
+ }
3509
+ ),
3510
+ /* @__PURE__ */ t.jsx(Q, { type: "Secondary", children: "Buy" })
3511
+ ] }), La = "_wrapper_st58d_1", za = "_label_st58d_10", Fa = "_textarea_st58d_18", Va = "_length_st58d_33", jt = {
3512
+ wrapper: La,
3513
+ label: za,
3514
+ textarea: Fa,
3515
+ length: Va
3516
+ }, lc = (u) => {
3517
+ const { onChange: a, label: e, value: s, maxLength: i, placeholder: c = "Type something..." } = u, [l, o] = f.useState(s.length);
3518
+ return /* @__PURE__ */ t.jsxs("div", { className: jt.wrapper, children: [
3205
3519
  e && /* @__PURE__ */ t.jsx(
3206
3520
  "label",
3207
3521
  {
3208
- className: vt.label,
3522
+ className: jt.label,
3209
3523
  htmlFor: e,
3210
3524
  children: e
3211
3525
  }
@@ -3216,14 +3530,14 @@ const $a = (d) => {
3216
3530
  id: e,
3217
3531
  defaultValue: s,
3218
3532
  onChange: (n) => {
3219
- r(n.target.value.length), o(n.target.value);
3533
+ o(n.target.value.length), a(n.target.value);
3220
3534
  },
3221
- placeholder: a,
3222
- className: vt.textarea,
3535
+ placeholder: c,
3536
+ className: jt.textarea,
3223
3537
  maxLength: i
3224
3538
  }
3225
3539
  ),
3226
- i && /* @__PURE__ */ t.jsxs("div", { className: vt.length, children: [
3540
+ i && /* @__PURE__ */ t.jsxs("div", { className: jt.length, children: [
3227
3541
  l,
3228
3542
  "/",
3229
3543
  i
@@ -3231,38 +3545,40 @@ const $a = (d) => {
3231
3545
  ] });
3232
3546
  };
3233
3547
  export {
3234
- Ca as Accordion,
3235
- Xo as BurgerMenuButton,
3236
- tt as Button,
3237
- An as ButtonTypeSettings,
3238
- ya as ButtonsSettings,
3239
- va as CategorySettings,
3240
- ft as ChooseImage,
3241
- Aa as ChooseImageModal,
3242
- Yo as EmptyCart,
3243
- ja as FormSettings,
3244
- $a as HeaderButtons,
3245
- v as Icon,
3246
- K as InputSettings,
3247
- Ji as InputUI,
3248
- Ue as ItemsSettings,
3249
- ba as LayoutSettings,
3250
- Ba as Link,
3251
- ka as ListingSelector,
3252
- Ma as Loader,
3548
+ oc as Accordion,
3549
+ ja as BurgerMenuButton,
3550
+ Q as Button,
3551
+ ai as ButtonTypeSettings,
3552
+ Za as ButtonsSettings,
3553
+ Ja as CategorySettings,
3554
+ bt as ChooseImage,
3555
+ uc as ChooseImageModal,
3556
+ ba as EmptyCart,
3557
+ Ka as FormSettings,
3558
+ sc as HeaderButtons,
3559
+ b as Icon,
3560
+ tt as InputSettings,
3561
+ $o as InputUI,
3562
+ Ge as ItemsSettings,
3563
+ Wa as LayoutSettings,
3564
+ ac as Link,
3565
+ tc as ListingSelector,
3566
+ _c as Loader,
3253
3567
  Mt as Modal,
3254
- Na as PagesMobileMenu,
3255
- Go as PagesMobileModal,
3256
- Ia as ProductOptions,
3257
- Ot as RangeSelector,
3568
+ nc as PagesMobileMenu,
3569
+ va as PagesMobileModal,
3570
+ Qa as PagesSettings,
3571
+ cc as ProductCardButtons,
3572
+ ec as ProductOptions,
3573
+ qt as RangeSelector,
3258
3574
  et as Select,
3259
- wa as ShareLink,
3260
- Vo as ShoppingButton,
3261
- Uo as ShoppingModalCart,
3575
+ ic as ShareLink,
3576
+ ga as ShoppingButton,
3577
+ xa as ShoppingModalCart,
3262
3578
  st as Switch,
3263
- zt as TextSettings,
3264
- qt as TextareaSettings,
3265
- Sa as TextareaUI,
3266
- Ht as TypesText,
3579
+ Lt as TextSettings,
3580
+ Et as TextareaSettings,
3581
+ lc as TextareaUI,
3582
+ Rt as TypesText,
3267
3583
  Ft as UserInfo
3268
3584
  };