@billgangcom/theme-lib 1.38.0 → 1.40.0

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