@billgangcom/theme-lib 1.125.7 → 1.125.9
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/{builder-C65Q5Dcx.js → builder-C6dvV-FK.js} +5 -5
- package/dist/{builder-BLfL4Ybx.cjs → builder-D75m1V7n.cjs} +2 -2
- package/dist/{builder-components-BFeJpr4C.cjs → builder-components-Co9iHNJy.cjs} +1 -1
- package/dist/{builder-components-hkH4Mkhh.js → builder-components-DLRHTlOM.js} +4 -4
- package/dist/builder.cjs.js +1 -1
- package/dist/builder.es.js +23 -23
- package/dist/{charge-BGPoMvnI.cjs → charge-B0gBdJdp.cjs} +39 -39
- package/dist/{charge-GQ_PuwVQ.js → charge-B7mz3FHe.js} +3821 -3805
- package/dist/{checkout-CLNsA_yQ.js → checkout-CCdVQ5P4.js} +5 -5
- package/dist/{checkout-Syd1Rzn7.cjs → checkout-o2P-6lXH.cjs} +1 -1
- package/dist/exports.cjs.js +1 -1
- package/dist/exports.es.js +6 -6
- package/dist/{index-gGrfqsok.cjs → index-0ZDcKNB-.cjs} +1 -1
- package/dist/{index-CN0PbkhL.js → index-B2FTyQdt.js} +5 -5
- package/dist/{index-Z221WqDZ.js → index-C5P2fZ9c.js} +5 -5
- package/dist/{index-C0FaKf83.cjs → index-CbbZVZ7a.cjs} +1 -1
- package/dist/{index-K6NXI52e.cjs → index-Cg_ux3Ca.cjs} +1 -1
- package/dist/{index-CCRkOPBD.js → index-D1WUHJRX.js} +1 -1
- package/dist/{index-Bg7dHQLO.js → index-DkIwdr0j.js} +5 -5
- package/dist/{index-kHtscvyL.cjs → index-Dnm6TEL1.cjs} +1 -1
- package/dist/{index-Cv6Z5h4f.js → index-_1MOdtn5.js} +2 -2
- package/dist/{index-psEX8zFi.cjs → index-cmezphnt.cjs} +1 -1
- package/dist/{index-Dj_z4vKT.cjs → index-twvXdc8H.cjs} +1 -1
- package/dist/{index-BW_6bSp_.js → index-z4pNIvEN.js} +5 -5
- package/dist/index.cjs.js +1 -1
- package/dist/index.es.js +6 -6
- package/dist/{order-DIciDwg-.js → order-Bq-0COjq.js} +5 -5
- package/dist/{order-Dp1RO4mM.cjs → order-Cj-bofDP.cjs} +1 -1
- package/dist/src/storefront/models/charge.d.ts +2 -1
- package/dist/style.css +1 -1
- package/dist/{subscription-B2UcW6OP.js → subscription-DQ826Zgn.js} +5 -5
- package/dist/{subscription-DRmftD9H.cjs → subscription-HJHD0Fhc.cjs} +1 -1
- package/dist/{ticket-Bx_uxTsw.cjs → ticket-C4s_sd2w.cjs} +4 -4
- package/dist/{ticket-F98fUmZE.js → ticket-Ddn4AIsi.js} +118 -114
- package/dist/{top-up-lwwKnojo.cjs → top-up-DWqdQrqZ.cjs} +1 -1
- package/dist/{top-up-BG9g5rvZ.js → top-up-E_MtTTeE.js} +5 -5
- package/dist/{ui-components-BMj5igzJ.cjs → ui-components-C43Vf6bL.cjs} +1 -1
- package/dist/{ui-components-Bx0QBPvt.js → ui-components-xpvlmZT8.js} +4 -4
- package/dist/ui.cjs.js +1 -1
- package/dist/ui.es.js +1 -1
- package/dist/{validation-wbsaFWMO.cjs → validation-2K7y6Rhp.cjs} +1 -1
- package/dist/{validation-CLwa6wmE.js → validation-PpJQa1RY.js} +5 -5
- package/package.json +1 -1
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
var se = Object.defineProperty;
|
|
2
2
|
var Ie = (n, r, e) => r in n ? se(n, r, { enumerable: !0, configurable: !0, writable: !0, value: e }) : n[r] = e;
|
|
3
|
-
var
|
|
3
|
+
var E = (n, r, e) => Ie(n, typeof r != "symbol" ? r + "" : r, e);
|
|
4
4
|
import { jsx as a, jsxs as h, Fragment as ue } from "react/jsx-runtime";
|
|
5
5
|
import g from "react";
|
|
6
|
-
import { j as
|
|
7
|
-
import { y as Ce, N as we, P as fe, z as ye, B as
|
|
8
|
-
import { e as
|
|
9
|
-
import { R as
|
|
6
|
+
import { j as Z, K as ee, r as oe, aa as de, O as pe, e as z, v as q, N as ge, p as X, y as _, c as ne, a as re, b as j, f as x, ab as he, u as Se, W as te, J as me } from "./builder-C6dvV-FK.js";
|
|
7
|
+
import { y as Ce, N as we, P as fe, z as ye, B as U, D as be, E as ke, F as Le, u as Te, H as Ae, Q as Pe, U as Be } from "./charge-B7mz3FHe.js";
|
|
8
|
+
import { e as N, g as V, E as K, k as Fe, I as J, M as De } from "./ui-components-xpvlmZT8.js";
|
|
9
|
+
import { R as ce, a as ae, b as ie, c as Re } from "./builder-components-DLRHTlOM.js";
|
|
10
10
|
import "react-dom";
|
|
11
|
-
import "./checkout-
|
|
12
|
-
const ve = "_wrapper_1vt13_1", Me = "_bg_1vt13_10", xe = "_main_1vt13_32", Ne = "_noAnimation_1vt13_37", He = "_loading_1vt13_51", Ee = "_loadingContent_1vt13_61", Ue = "_loader_1vt13_66",
|
|
11
|
+
import "./checkout-CCdVQ5P4.js";
|
|
12
|
+
const ve = "_wrapper_1vt13_1", Me = "_bg_1vt13_10", xe = "_main_1vt13_32", Ne = "_noAnimation_1vt13_37", He = "_loading_1vt13_51", Ee = "_loadingContent_1vt13_61", Ue = "_loader_1vt13_66", F = {
|
|
13
13
|
wrapper: ve,
|
|
14
14
|
bg: Me,
|
|
15
15
|
main: xe,
|
|
@@ -18,12 +18,12 @@ const ve = "_wrapper_1vt13_1", Me = "_bg_1vt13_10", xe = "_main_1vt13_32", Ne =
|
|
|
18
18
|
loadingContent: Ee,
|
|
19
19
|
loader: Ue
|
|
20
20
|
}, Oe = async (n, r) => {
|
|
21
|
-
const e =
|
|
21
|
+
const e = Z.getState().apiUrls, o = ee ? localStorage.getItem("fakeDomain") || "flagship-theme.pages.dev" : window.location.hostname, i = localStorage.getItem("shopPassword");
|
|
22
22
|
if (r && !i)
|
|
23
23
|
return null;
|
|
24
24
|
const t = `${e.storeApi}/v2/shops/${o}/pages/${n}` + (r ? `?password=${i}` : "");
|
|
25
25
|
try {
|
|
26
|
-
return await
|
|
26
|
+
return await oe({
|
|
27
27
|
url: t,
|
|
28
28
|
withToken: !0,
|
|
29
29
|
method: "get"
|
|
@@ -32,7 +32,7 @@ const ve = "_wrapper_1vt13_1", Me = "_bg_1vt13_10", xe = "_main_1vt13_32", Ne =
|
|
|
32
32
|
if (de.isAxiosError(c) && c.response && c.response.status === 404)
|
|
33
33
|
return null;
|
|
34
34
|
}
|
|
35
|
-
}, _e = "_wrapper_ysrl4_1", Ge = "_tableContainer_ysrl4_6", We = "_ticketsTable_ysrl4_19", $e = "_tableItem_ysrl4_37", qe = "_tableLoader_ysrl4_41",
|
|
35
|
+
}, _e = "_wrapper_ysrl4_1", Ge = "_tableContainer_ysrl4_6", We = "_ticketsTable_ysrl4_19", $e = "_tableItem_ysrl4_37", qe = "_tableLoader_ysrl4_41", A = {
|
|
36
36
|
wrapper: _e,
|
|
37
37
|
tableContainer: Ge,
|
|
38
38
|
ticketsTable: We,
|
|
@@ -64,14 +64,14 @@ const ve = "_wrapper_1vt13_1", Me = "_bg_1vt13_10", xe = "_main_1vt13_32", Ne =
|
|
|
64
64
|
description: "You don't have any tickets yet. If you contact support, tickets will be displayed here.",
|
|
65
65
|
centered: !0
|
|
66
66
|
}
|
|
67
|
-
) : /* @__PURE__ */ h("div", { className:
|
|
67
|
+
) : /* @__PURE__ */ h("div", { className: A.wrapper, children: [
|
|
68
68
|
/* @__PURE__ */ a(fe, { title: "Tickets" }),
|
|
69
|
-
/* @__PURE__ */ h("div", { className:
|
|
70
|
-
/* @__PURE__ */ h(ye, { className:
|
|
71
|
-
/* @__PURE__ */ a(
|
|
72
|
-
/* @__PURE__ */ a(
|
|
73
|
-
/* @__PURE__ */ a(
|
|
74
|
-
/* @__PURE__ */ a(
|
|
69
|
+
/* @__PURE__ */ h("div", { className: A.tableContainer, children: [
|
|
70
|
+
/* @__PURE__ */ h(ye, { className: A.ticketsTable, children: [
|
|
71
|
+
/* @__PURE__ */ a(U, { className: A.tableItem, children: "TICKET ID" }),
|
|
72
|
+
/* @__PURE__ */ a(U, { className: A.tableItem, children: "LAST MESSAGE" }),
|
|
73
|
+
/* @__PURE__ */ a(U, { className: A.tableItem, children: "CREATED" }),
|
|
74
|
+
/* @__PURE__ */ a(U, { className: A.tableItem, children: "STATUS" }),
|
|
75
75
|
u && (n == null ? void 0 : n.map((m) => /* @__PURE__ */ a(
|
|
76
76
|
be,
|
|
77
77
|
{
|
|
@@ -80,7 +80,7 @@ const ve = "_wrapper_1vt13_1", Me = "_bg_1vt13_10", xe = "_main_1vt13_32", Ne =
|
|
|
80
80
|
m.id
|
|
81
81
|
)))
|
|
82
82
|
] }),
|
|
83
|
-
!u && /* @__PURE__ */ a("div", { className:
|
|
83
|
+
!u && /* @__PURE__ */ a("div", { className: A.tableLoader, children: /* @__PURE__ */ a(N, {}) }),
|
|
84
84
|
u && /* @__PURE__ */ a(
|
|
85
85
|
ke,
|
|
86
86
|
{
|
|
@@ -3244,10 +3244,10 @@ const Go = [
|
|
|
3244
3244
|
)
|
|
3245
3245
|
}
|
|
3246
3246
|
], Wo = (n) => {
|
|
3247
|
-
const { notifications: r, setNotifications: e } =
|
|
3247
|
+
const { notifications: r, setNotifications: e } = z.getState();
|
|
3248
3248
|
e(r.filter((o) => o.id !== n));
|
|
3249
3249
|
}, $o = (n) => {
|
|
3250
|
-
const { notifications: r, setNotifications: e } =
|
|
3250
|
+
const { notifications: r, setNotifications: e } = z.getState(), o = q();
|
|
3251
3251
|
return e([
|
|
3252
3252
|
...r,
|
|
3253
3253
|
{
|
|
@@ -3256,11 +3256,11 @@ const Go = [
|
|
|
3256
3256
|
}
|
|
3257
3257
|
]), o;
|
|
3258
3258
|
};
|
|
3259
|
-
class
|
|
3259
|
+
class je {
|
|
3260
3260
|
constructor() {
|
|
3261
|
-
|
|
3262
|
-
|
|
3263
|
-
|
|
3261
|
+
E(this, "observer", null);
|
|
3262
|
+
E(this, "callbacks", /* @__PURE__ */ new Map());
|
|
3263
|
+
E(this, "handleWindowResize", () => {
|
|
3264
3264
|
this.callbacks.forEach((r, e) => {
|
|
3265
3265
|
const o = e.getBoundingClientRect().width;
|
|
3266
3266
|
r.forEach((i) => i(o));
|
|
@@ -3297,7 +3297,7 @@ class Ve {
|
|
|
3297
3297
|
this.observer && (this.observer.disconnect(), this.observer = null), this.callbacks.clear(), window.removeEventListener("resize", this.handleWindowResize);
|
|
3298
3298
|
}
|
|
3299
3299
|
}
|
|
3300
|
-
const
|
|
3300
|
+
const Y = new je();
|
|
3301
3301
|
function qo(n) {
|
|
3302
3302
|
const [r, e] = g.useState("desktop");
|
|
3303
3303
|
return g.useEffect(() => {
|
|
@@ -3307,10 +3307,10 @@ function qo(n) {
|
|
|
3307
3307
|
const u = i(s);
|
|
3308
3308
|
e(u);
|
|
3309
3309
|
};
|
|
3310
|
-
|
|
3310
|
+
Y.observe(o, t);
|
|
3311
3311
|
const c = o.getBoundingClientRect().width;
|
|
3312
3312
|
return t(c), () => {
|
|
3313
|
-
|
|
3313
|
+
Y.unobserve(o, t);
|
|
3314
3314
|
};
|
|
3315
3315
|
}, [n]), r;
|
|
3316
3316
|
}
|
|
@@ -3323,12 +3323,12 @@ const zo = () => {
|
|
|
3323
3323
|
r(i);
|
|
3324
3324
|
})();
|
|
3325
3325
|
}, [n]), n;
|
|
3326
|
-
},
|
|
3327
|
-
wrapper:
|
|
3326
|
+
}, Ve = "_wrapper_rccv2_1", Ke = "_content_rccv2_11", Je = "_title_rccv2_21", W = {
|
|
3327
|
+
wrapper: Ve,
|
|
3328
3328
|
content: Ke,
|
|
3329
3329
|
title: Je
|
|
3330
3330
|
}, Ye = () => {
|
|
3331
|
-
const n =
|
|
3331
|
+
const n = X(), { isAntistock: r } = _();
|
|
3332
3332
|
return r ? /* @__PURE__ */ h(
|
|
3333
3333
|
"div",
|
|
3334
3334
|
{
|
|
@@ -3343,8 +3343,8 @@ const zo = () => {
|
|
|
3343
3343
|
color: "var(--text-primary)"
|
|
3344
3344
|
},
|
|
3345
3345
|
children: [
|
|
3346
|
-
/* @__PURE__ */ a(te, {}),
|
|
3347
3346
|
/* @__PURE__ */ a(ce, {}),
|
|
3347
|
+
/* @__PURE__ */ a(ae, {}),
|
|
3348
3348
|
/* @__PURE__ */ h(
|
|
3349
3349
|
"div",
|
|
3350
3350
|
{
|
|
@@ -3378,11 +3378,11 @@ const zo = () => {
|
|
|
3378
3378
|
]
|
|
3379
3379
|
}
|
|
3380
3380
|
),
|
|
3381
|
-
/* @__PURE__ */ a(
|
|
3381
|
+
/* @__PURE__ */ a(ie, {})
|
|
3382
3382
|
]
|
|
3383
3383
|
}
|
|
3384
|
-
) : /* @__PURE__ */ a("div", { className:
|
|
3385
|
-
/* @__PURE__ */ a("h1", { className:
|
|
3384
|
+
) : /* @__PURE__ */ a("div", { className: W.wrapper, children: /* @__PURE__ */ h("div", { className: W.content, children: [
|
|
3385
|
+
/* @__PURE__ */ a("h1", { className: W.title, children: "Page Not Found" }),
|
|
3386
3386
|
/* @__PURE__ */ a(
|
|
3387
3387
|
V,
|
|
3388
3388
|
{
|
|
@@ -3392,7 +3392,7 @@ const zo = () => {
|
|
|
3392
3392
|
}
|
|
3393
3393
|
)
|
|
3394
3394
|
] }) });
|
|
3395
|
-
},
|
|
3395
|
+
}, Q = {
|
|
3396
3396
|
"/": "Home",
|
|
3397
3397
|
"/products": "Products",
|
|
3398
3398
|
"/reviews": "Reviews",
|
|
@@ -3402,7 +3402,7 @@ const zo = () => {
|
|
|
3402
3402
|
"/support": "Support",
|
|
3403
3403
|
"/cart": "Cart"
|
|
3404
3404
|
}, Qe = ({ pagePath: n }) => {
|
|
3405
|
-
const { sourceBlocks: r } =
|
|
3405
|
+
const { sourceBlocks: r } = ne(), e = X(), [o, i] = g.useState(null), [t, c] = g.useState(!0), [s, u] = g.useState(null), { settings: m } = re(), { addProducts: k } = Te(), { pageContext: C } = j(), { isAntistock: w, general: p } = _();
|
|
3406
3406
|
g.useEffect(() => {
|
|
3407
3407
|
var S, L;
|
|
3408
3408
|
if (n === "/support" && ((S = p == null ? void 0 : p.info) != null && S.disableSupport)) {
|
|
@@ -3418,7 +3418,7 @@ const zo = () => {
|
|
|
3418
3418
|
);
|
|
3419
3419
|
if (L) {
|
|
3420
3420
|
const { data: l } = L;
|
|
3421
|
-
if (l.seo && l.seo.pageTitle ? document.title = l.seo.pageTitle :
|
|
3421
|
+
if (l.seo && l.seo.pageTitle ? document.title = l.seo.pageTitle : Q[n] ? document.title = Q[n] : l.products.length > 0 ? document.title = `Product | ${l.products[0].name}` : l.fullPosts.length > 0 && (document.title = `Post | ${l.fullPosts[0].title}`), l.preserveContent) {
|
|
3422
3422
|
const f = {
|
|
3423
3423
|
order: [...(s == null ? void 0 : s.order) ?? [], ...l.layout.order],
|
|
3424
3424
|
data: {
|
|
@@ -3429,12 +3429,12 @@ const zo = () => {
|
|
|
3429
3429
|
u(f);
|
|
3430
3430
|
} else
|
|
3431
3431
|
u(l.layout);
|
|
3432
|
-
const
|
|
3432
|
+
const H = l.listings.filter(
|
|
3433
3433
|
(f) => f.type === "PRODUCT" || f.type === "GROUP"
|
|
3434
|
-
),
|
|
3434
|
+
), R = H && H.length > 0 ? l.listings : [...C.listings ?? [], ...l.listings];
|
|
3435
3435
|
if (l.preserveContent) {
|
|
3436
3436
|
console.log("FINAL PRODUCTS: ", [...(o == null ? void 0 : o.products) ?? [], ...l.products]);
|
|
3437
|
-
const f = {
|
|
3437
|
+
const f = (T) => Array.isArray(T) ? T : T && typeof T == "object" ? Object.entries(T).filter(([, D]) => typeof D == "number").map(([D, G]) => ({ key: D, value: G })) : [], v = {
|
|
3438
3438
|
...C,
|
|
3439
3439
|
products: [...(o == null ? void 0 : o.products) ?? [], ...l.products],
|
|
3440
3440
|
reviews: [...(o == null ? void 0 : o.reviews) ?? [], ...l.reviews],
|
|
@@ -3445,10 +3445,13 @@ const zo = () => {
|
|
|
3445
3445
|
posts: [...(o == null ? void 0 : o.posts) ?? [], ...l.posts],
|
|
3446
3446
|
preserveContent: l.preserveContent,
|
|
3447
3447
|
vouches: [...(o == null ? void 0 : o.vouches) ?? [], ...l.vouches ?? []],
|
|
3448
|
-
liveStats: [
|
|
3449
|
-
|
|
3448
|
+
liveStats: [
|
|
3449
|
+
...f(o == null ? void 0 : o.liveStats),
|
|
3450
|
+
...f(l == null ? void 0 : l.liveStats)
|
|
3451
|
+
],
|
|
3452
|
+
listings: R
|
|
3450
3453
|
};
|
|
3451
|
-
console.log("NEW PAGE CONTEXT: ",
|
|
3454
|
+
console.log("NEW PAGE CONTEXT: ", v), i(v);
|
|
3452
3455
|
} else
|
|
3453
3456
|
i({
|
|
3454
3457
|
...C,
|
|
@@ -3460,7 +3463,7 @@ const zo = () => {
|
|
|
3460
3463
|
fullPosts: l.fullPosts,
|
|
3461
3464
|
posts: l.posts,
|
|
3462
3465
|
preserveContent: l.preserveContent,
|
|
3463
|
-
listings:
|
|
3466
|
+
listings: R,
|
|
3464
3467
|
vouches: l.vouches ?? [],
|
|
3465
3468
|
liveStats: l.liveStats ?? []
|
|
3466
3469
|
});
|
|
@@ -3470,25 +3473,26 @@ const zo = () => {
|
|
|
3470
3473
|
};
|
|
3471
3474
|
C.listings && p && S();
|
|
3472
3475
|
}, [n, C.listings, p]);
|
|
3473
|
-
const
|
|
3476
|
+
const P = (S) => {
|
|
3474
3477
|
if (!S || !S.name)
|
|
3475
|
-
return /* @__PURE__ */ a(
|
|
3478
|
+
return /* @__PURE__ */ a(K, { error: "Block or block.name is undefined." });
|
|
3476
3479
|
if (!r || !r[S.name])
|
|
3477
|
-
return /* @__PURE__ */ a(
|
|
3480
|
+
return /* @__PURE__ */ a(K, { error: `Block "${S.name}" does not exist in blocks.` });
|
|
3478
3481
|
const L = new r[S.name]();
|
|
3479
3482
|
return S.value && Object.assign(L, S.value), L.renderBlock(m, o);
|
|
3480
3483
|
};
|
|
3481
3484
|
return !t && s === null ? /* @__PURE__ */ a(Ye, {}) : /* @__PURE__ */ h(
|
|
3482
3485
|
"div",
|
|
3483
3486
|
{
|
|
3484
|
-
className:
|
|
3485
|
-
[
|
|
3486
|
-
[
|
|
3487
|
+
className: x(F.wrapper, {
|
|
3488
|
+
[F.bg]: !w,
|
|
3489
|
+
[F.loadingContent]: t
|
|
3487
3490
|
}),
|
|
3491
|
+
"data-scroll-container": "main",
|
|
3488
3492
|
children: [
|
|
3489
|
-
/* @__PURE__ */ a(
|
|
3493
|
+
/* @__PURE__ */ a(ce, {}),
|
|
3490
3494
|
/* @__PURE__ */ a(
|
|
3491
|
-
|
|
3495
|
+
ae,
|
|
3492
3496
|
{
|
|
3493
3497
|
settings: m,
|
|
3494
3498
|
pageContext: o
|
|
@@ -3498,28 +3502,28 @@ const zo = () => {
|
|
|
3498
3502
|
/* @__PURE__ */ a(
|
|
3499
3503
|
"div",
|
|
3500
3504
|
{
|
|
3501
|
-
className:
|
|
3502
|
-
[
|
|
3505
|
+
className: x(F.main, {
|
|
3506
|
+
[F.noAnimation]: w
|
|
3503
3507
|
}),
|
|
3504
3508
|
children: s.order && s.order.map((S) => /* @__PURE__ */ a(
|
|
3505
3509
|
Re,
|
|
3506
3510
|
{
|
|
3507
3511
|
block: s.data[S],
|
|
3508
|
-
render:
|
|
3512
|
+
render: P
|
|
3509
3513
|
},
|
|
3510
3514
|
S
|
|
3511
3515
|
))
|
|
3512
3516
|
}
|
|
3513
3517
|
),
|
|
3514
3518
|
/* @__PURE__ */ a(
|
|
3515
|
-
|
|
3519
|
+
ie,
|
|
3516
3520
|
{
|
|
3517
3521
|
settings: m,
|
|
3518
3522
|
pageContext: o
|
|
3519
3523
|
}
|
|
3520
3524
|
)
|
|
3521
|
-
] }) : /* @__PURE__ */ a("div", { className:
|
|
3522
|
-
t && /* @__PURE__ */ a("div", { className:
|
|
3525
|
+
] }) : /* @__PURE__ */ a("div", { className: F.loading, children: /* @__PURE__ */ a(N, {}) }),
|
|
3526
|
+
t && /* @__PURE__ */ a("div", { className: F.loader, children: /* @__PURE__ */ a(N, {}) })
|
|
3523
3527
|
]
|
|
3524
3528
|
}
|
|
3525
3529
|
);
|
|
@@ -3528,7 +3532,7 @@ function Xo() {
|
|
|
3528
3532
|
const n = he();
|
|
3529
3533
|
return /* @__PURE__ */ a(Qe, { pagePath: n.pathname });
|
|
3530
3534
|
}
|
|
3531
|
-
const
|
|
3535
|
+
const jo = (n, r) => {
|
|
3532
3536
|
let e = `:root {
|
|
3533
3537
|
`;
|
|
3534
3538
|
if (r && (e += ` --max-width-store: ${r.maxStoreWidth};
|
|
@@ -3653,7 +3657,7 @@ const Vo = (n, r) => {
|
|
|
3653
3657
|
`, e += ` --border-md: var(--scale-2);
|
|
3654
3658
|
`, e += ` --border-lg: var(--scale-4);
|
|
3655
3659
|
`, e += "}", e;
|
|
3656
|
-
},
|
|
3660
|
+
}, Vo = (n) => {
|
|
3657
3661
|
const r = document.getElementById("dynamic-styles");
|
|
3658
3662
|
if (r)
|
|
3659
3663
|
r.innerHTML = n;
|
|
@@ -3661,7 +3665,7 @@ const Vo = (n, r) => {
|
|
|
3661
3665
|
const e = document.createElement("style");
|
|
3662
3666
|
e.id = "dynamic-styles", e.innerHTML = n, document.head.appendChild(e);
|
|
3663
3667
|
}
|
|
3664
|
-
},
|
|
3668
|
+
}, O = /* @__PURE__ */ new Set(), Ze = (n) => {
|
|
3665
3669
|
const r = /* @__PURE__ */ new Map();
|
|
3666
3670
|
return Object.entries(n).forEach(([, e]) => {
|
|
3667
3671
|
typeof e == "object" && Object.entries(e).forEach(([, o]) => {
|
|
@@ -3684,19 +3688,19 @@ const Vo = (n, r) => {
|
|
|
3684
3688
|
});
|
|
3685
3689
|
}), r;
|
|
3686
3690
|
}, oo = (n) => {
|
|
3687
|
-
|
|
3691
|
+
O.forEach((r) => {
|
|
3688
3692
|
if (!n.has(r)) {
|
|
3689
3693
|
const e = document.querySelector(`link[data-font="${r}"]`);
|
|
3690
|
-
e && e.remove(),
|
|
3694
|
+
e && e.remove(), O.delete(r);
|
|
3691
3695
|
}
|
|
3692
3696
|
});
|
|
3693
3697
|
}, no = (n) => {
|
|
3694
3698
|
const r = /* @__PURE__ */ new Set();
|
|
3695
3699
|
n.forEach((e, o) => {
|
|
3696
3700
|
const i = Array.from(e).sort().join(";"), t = `${o}:wght@${i}`;
|
|
3697
|
-
if (r.add(t), !
|
|
3701
|
+
if (r.add(t), !O.has(t)) {
|
|
3698
3702
|
const c = document.createElement("link");
|
|
3699
|
-
c.rel = "stylesheet", c.href = `https://fonts.googleapis.com/css2?family=${t}&display=swap`, c.setAttribute("data-font", t), document.head.appendChild(c),
|
|
3703
|
+
c.rel = "stylesheet", c.href = `https://fonts.googleapis.com/css2?family=${t}&display=swap`, c.setAttribute("data-font", t), document.head.appendChild(c), O.add(t);
|
|
3700
3704
|
}
|
|
3701
3705
|
}), oo(r);
|
|
3702
3706
|
}, Ko = (n) => {
|
|
@@ -3710,7 +3714,7 @@ const Vo = (n, r) => {
|
|
|
3710
3714
|
o.set(t, new Set(i));
|
|
3711
3715
|
}), no(o);
|
|
3712
3716
|
}
|
|
3713
|
-
},
|
|
3717
|
+
}, $ = [
|
|
3714
3718
|
{
|
|
3715
3719
|
family: "GT Eesti Pro Display",
|
|
3716
3720
|
files: [
|
|
@@ -3781,14 +3785,14 @@ const Vo = (n, r) => {
|
|
|
3781
3785
|
if (document.getElementById("custom-fonts-styles"))
|
|
3782
3786
|
return;
|
|
3783
3787
|
let n = "";
|
|
3784
|
-
|
|
3788
|
+
$.forEach((e) => {
|
|
3785
3789
|
e.files.forEach((o) => {
|
|
3786
3790
|
n += to(e.family, o.filename, o.weight, o.style) + `
|
|
3787
3791
|
`;
|
|
3788
3792
|
});
|
|
3789
3793
|
});
|
|
3790
3794
|
const r = document.createElement("style");
|
|
3791
|
-
r.id = "custom-fonts-styles", r.type = "text/css", r.textContent = n, document.head.appendChild(r), console.log("Custom fonts loaded:",
|
|
3795
|
+
r.id = "custom-fonts-styles", r.type = "text/css", r.textContent = n, document.head.appendChild(r), console.log("Custom fonts loaded:", $.map((e) => e.family).join(", ")), $.forEach((e) => {
|
|
3792
3796
|
console.log(`Font "${e.family}":`, e.files.map((o) => `${o.filename} (${o.weight})`).join(", "));
|
|
3793
3797
|
});
|
|
3794
3798
|
};
|
|
@@ -3802,7 +3806,7 @@ function Yo() {
|
|
|
3802
3806
|
setHeader: o,
|
|
3803
3807
|
setFooter: i,
|
|
3804
3808
|
setAnnouncement: t
|
|
3805
|
-
} = Se.getState(), { currentPage: c, pages: s } =
|
|
3809
|
+
} = Se.getState(), { currentPage: c, pages: s } = j.getState(), { currentInstance: u, settingsInstance: m } = ne.getState(), { setSettings: k } = re.getState();
|
|
3806
3810
|
if (r || k(m.blockSettings), u && r) {
|
|
3807
3811
|
if (r === "header")
|
|
3808
3812
|
o(u);
|
|
@@ -3890,11 +3894,11 @@ function Qo(n, r = !0) {
|
|
|
3890
3894
|
}
|
|
3891
3895
|
}
|
|
3892
3896
|
const Zo = () => {
|
|
3893
|
-
const n =
|
|
3897
|
+
const n = Z.getState().apiUrls, r = X(), { notifications: e, setNotifications: o } = z(), { isAntistock: i } = _();
|
|
3894
3898
|
return async (t, c, s, u, m, k) => {
|
|
3895
|
-
const C =
|
|
3899
|
+
const C = ee ? localStorage.getItem("fakeDomain") : window.location.hostname, w = `${n.slApi}/v1/public/${C}/tickets`;
|
|
3896
3900
|
try {
|
|
3897
|
-
const p = await
|
|
3901
|
+
const p = await oe({
|
|
3898
3902
|
method: "post",
|
|
3899
3903
|
url: w,
|
|
3900
3904
|
body: {
|
|
@@ -3902,7 +3906,7 @@ const Zo = () => {
|
|
|
3902
3906
|
firstMessage: c,
|
|
3903
3907
|
email: u,
|
|
3904
3908
|
recaptcha: s,
|
|
3905
|
-
tsId:
|
|
3909
|
+
tsId: te(),
|
|
3906
3910
|
orderId: m,
|
|
3907
3911
|
imageIds: k
|
|
3908
3912
|
},
|
|
@@ -3911,30 +3915,30 @@ const Zo = () => {
|
|
|
3911
3915
|
return o([
|
|
3912
3916
|
...e,
|
|
3913
3917
|
{
|
|
3914
|
-
id:
|
|
3918
|
+
id: q(),
|
|
3915
3919
|
message: i ? "Support ticket successfully created. You can expect to hear from us soon." : "Ticket created successfully. We will contact you by mail",
|
|
3916
3920
|
status: "success"
|
|
3917
3921
|
}
|
|
3918
3922
|
]), r(`/ticket/${p.data.id}/${p.data.accessToken}`), p;
|
|
3919
3923
|
} catch (p) {
|
|
3920
|
-
const
|
|
3924
|
+
const P = p && (p.friendlyMessage || p.message) || String(p);
|
|
3921
3925
|
o([
|
|
3922
3926
|
...e,
|
|
3923
3927
|
{
|
|
3924
|
-
id:
|
|
3925
|
-
message:
|
|
3928
|
+
id: q(),
|
|
3929
|
+
message: P,
|
|
3926
3930
|
status: "error"
|
|
3927
3931
|
}
|
|
3928
3932
|
]);
|
|
3929
3933
|
}
|
|
3930
3934
|
};
|
|
3931
3935
|
}, en = () => {
|
|
3932
|
-
const { pages: n } =
|
|
3936
|
+
const { pages: n } = j(), [r, e] = g.useState(n);
|
|
3933
3937
|
return g.useEffect(() => {
|
|
3934
3938
|
e(n);
|
|
3935
3939
|
}, [n]), r;
|
|
3936
3940
|
};
|
|
3937
|
-
var
|
|
3941
|
+
var le = /* @__PURE__ */ ((n) => (n.NEW = "NEW", n.ANSWERED = "ANSWERED", n.NOT_ANSWERED = "NOT_ANSWERED", n.CLOSED = "CLOSED", n))(le || {});
|
|
3938
3942
|
const co = "_wrapper_ukunw_1", ao = "_ticketContainer_ukunw_23", io = "_title_ukunw_28", lo = "_subtext_ukunw_35", so = "_container_ukunw_41", Io = "_content_ukunw_52", uo = "_messages_ukunw_63", po = "_input_ukunw_81", go = "_textarea_ukunw_94", ho = "_textareaAntistock_ukunw_123", So = "_message_ukunw_63", mo = "_messageDate_ukunw_153", Co = "_messageAntistock_ukunw_159", wo = "_myMessage_ukunw_164", fo = "_otherMessage_ukunw_171", yo = "_button_ukunw_178", bo = "_disabled_ukunw_178", ko = "_loadingMessage_ukunw_204", Lo = "_messageImages_ukunw_208", To = "_messageImage_ukunw_208", Ao = "_imagesLoader_ukunw_236", Po = "_imageModal_ukunw_240", Bo = "_imageModalClose_ukunw_268", d = {
|
|
3939
3943
|
wrapper: co,
|
|
3940
3944
|
ticketContainer: ao,
|
|
@@ -3960,29 +3964,29 @@ const co = "_wrapper_ukunw_1", ao = "_ticketContainer_ukunw_23", io = "_title_uk
|
|
|
3960
3964
|
imageModal: Po,
|
|
3961
3965
|
imageModalClose: Bo
|
|
3962
3966
|
}, Fo = () => {
|
|
3963
|
-
const n = window.location.pathname.split("/"), r = n[n.length - 1], e = n[n.length - 2], [o, i] = g.useState(!0), [t, c] = g.useState(null), [s, u] = g.useState(""), [m, k] = g.useState(null), [C, w] = g.useState(null), [p,
|
|
3967
|
+
const n = window.location.pathname.split("/"), r = n[n.length - 1], e = n[n.length - 2], [o, i] = g.useState(!0), [t, c] = g.useState(null), [s, u] = g.useState(""), [m, k] = g.useState(null), [C, w] = g.useState(null), [p, P] = g.useState(null), S = g.useRef(null), { executeRecaptcha: L } = Ae(), { isAntistock: l } = _(), H = te(), { setIsOpen: R } = me(), f = (t == null ? void 0 : t.status) === le.CLOSED, v = g.useCallback(() => {
|
|
3964
3968
|
var I;
|
|
3965
3969
|
(I = S.current) == null || I.scrollIntoView({ behavior: "smooth" });
|
|
3966
|
-
}, []),
|
|
3970
|
+
}, []), T = g.useCallback(async () => {
|
|
3967
3971
|
if (e && r) {
|
|
3968
3972
|
const { data: I } = await Pe(e, r);
|
|
3969
3973
|
c(I), i(!1);
|
|
3970
3974
|
}
|
|
3971
3975
|
}, [e, r]);
|
|
3972
3976
|
g.useEffect(() => {
|
|
3973
|
-
|
|
3977
|
+
T();
|
|
3974
3978
|
const I = setInterval(() => {
|
|
3975
|
-
|
|
3979
|
+
T();
|
|
3976
3980
|
}, 5e3);
|
|
3977
3981
|
return () => clearInterval(I);
|
|
3978
|
-
}, [
|
|
3979
|
-
const
|
|
3982
|
+
}, [T]);
|
|
3983
|
+
const D = async () => {
|
|
3980
3984
|
const I = await L();
|
|
3981
3985
|
if (!e || !r || !I || !s.trim()) return;
|
|
3982
3986
|
const b = (m == null ? void 0 : m.map((y) => ({
|
|
3983
3987
|
imageId: parseInt(y.id),
|
|
3984
3988
|
path: y.url
|
|
3985
|
-
}))) || [],
|
|
3989
|
+
}))) || [], B = {
|
|
3986
3990
|
content: s,
|
|
3987
3991
|
createdAt: (/* @__PURE__ */ new Date()).toISOString(),
|
|
3988
3992
|
id: Date.now(),
|
|
@@ -3993,36 +3997,36 @@ const co = "_wrapper_ukunw_1", ao = "_ticketContainer_ukunw_23", io = "_title_uk
|
|
|
3993
3997
|
c(
|
|
3994
3998
|
(y) => y ? {
|
|
3995
3999
|
...y,
|
|
3996
|
-
messages: [...y.messages,
|
|
4000
|
+
messages: [...y.messages, B]
|
|
3997
4001
|
} : null
|
|
3998
|
-
), w(
|
|
3999
|
-
|
|
4002
|
+
), w(B.id), u(""), k(null), setTimeout(() => {
|
|
4003
|
+
v();
|
|
4000
4004
|
}, 100);
|
|
4001
4005
|
try {
|
|
4002
|
-
await Be(e, r, s, I,
|
|
4003
|
-
|
|
4006
|
+
await Be(e, r, s, I, H, b), await T(), setTimeout(() => {
|
|
4007
|
+
v();
|
|
4004
4008
|
}, 100);
|
|
4005
4009
|
} finally {
|
|
4006
4010
|
setTimeout(() => {
|
|
4007
4011
|
w(null);
|
|
4008
4012
|
}, 1e4);
|
|
4009
4013
|
}
|
|
4010
|
-
},
|
|
4011
|
-
const b = /* @__PURE__ */ new Date(),
|
|
4014
|
+
}, G = (I) => {
|
|
4015
|
+
const b = /* @__PURE__ */ new Date(), B = new Date(I), y = Math.floor((b.getTime() - B.getTime()) / 1e3);
|
|
4012
4016
|
if (y < 60)
|
|
4013
4017
|
return "just now";
|
|
4014
4018
|
if (y < 3600) {
|
|
4015
|
-
const
|
|
4016
|
-
return `${
|
|
4019
|
+
const M = Math.floor(y / 60);
|
|
4020
|
+
return `${M} minute${M > 1 ? "s" : ""} ago`;
|
|
4017
4021
|
} else if (y < 10800) {
|
|
4018
|
-
const
|
|
4019
|
-
return `${
|
|
4020
|
-
} else return
|
|
4022
|
+
const M = Math.floor(y / 3600);
|
|
4023
|
+
return `${M} hour${M > 1 ? "s" : ""} ago`;
|
|
4024
|
+
} else return B.getFullYear() === b.getFullYear() ? B.toLocaleDateString("en-US", {
|
|
4021
4025
|
month: "short",
|
|
4022
4026
|
day: "2-digit",
|
|
4023
4027
|
hour: "2-digit",
|
|
4024
4028
|
minute: "2-digit"
|
|
4025
|
-
}) :
|
|
4029
|
+
}) : B.toLocaleDateString("en-US", {
|
|
4026
4030
|
year: "numeric",
|
|
4027
4031
|
month: "short",
|
|
4028
4032
|
day: "2-digit",
|
|
@@ -4031,7 +4035,7 @@ const co = "_wrapper_ukunw_1", ao = "_ticketContainer_ukunw_23", io = "_title_uk
|
|
|
4031
4035
|
});
|
|
4032
4036
|
};
|
|
4033
4037
|
return /* @__PURE__ */ h("div", { className: d.wrapper, children: [
|
|
4034
|
-
o && !t ? /* @__PURE__ */ a(
|
|
4038
|
+
o && !t ? /* @__PURE__ */ a(N, {}) : /* @__PURE__ */ h("div", { className: d.container, children: [
|
|
4035
4039
|
l ? /* @__PURE__ */ h("div", { className: d.ticketContainer, children: [
|
|
4036
4040
|
/* @__PURE__ */ a(
|
|
4037
4041
|
"div",
|
|
@@ -4063,7 +4067,7 @@ const co = "_wrapper_ukunw_1", ao = "_ticketContainer_ukunw_23", io = "_title_uk
|
|
|
4063
4067
|
t == null ? void 0 : t.messages.sort((I, b) => new Date(I.createdAt).getTime() - new Date(b.createdAt).getTime()).map((I) => /* @__PURE__ */ h(
|
|
4064
4068
|
"div",
|
|
4065
4069
|
{
|
|
4066
|
-
className:
|
|
4070
|
+
className: x(d.message, {
|
|
4067
4071
|
[d.messageAntistock]: l,
|
|
4068
4072
|
[d.myMessage]: !I.isSellerReply,
|
|
4069
4073
|
[d.otherMessage]: I.isSellerReply,
|
|
@@ -4077,7 +4081,7 @@ const co = "_wrapper_ukunw_1", ao = "_ticketContainer_ukunw_23", io = "_title_uk
|
|
|
4077
4081
|
{
|
|
4078
4082
|
className: d.messageImage,
|
|
4079
4083
|
onClick: () => {
|
|
4080
|
-
|
|
4084
|
+
P(b.path), R(!0);
|
|
4081
4085
|
},
|
|
4082
4086
|
children: /* @__PURE__ */ a(
|
|
4083
4087
|
"img",
|
|
@@ -4089,8 +4093,8 @@ const co = "_wrapper_ukunw_1", ao = "_ticketContainer_ukunw_23", io = "_title_uk
|
|
|
4089
4093
|
},
|
|
4090
4094
|
b.imageId
|
|
4091
4095
|
)) }),
|
|
4092
|
-
C !== I.id && /* @__PURE__ */ a("div", { className: d.messageDate, children:
|
|
4093
|
-
C === I.id && /* @__PURE__ */ a("div", { className: d.messageDate, children: /* @__PURE__ */ a(
|
|
4096
|
+
C !== I.id && /* @__PURE__ */ a("div", { className: d.messageDate, children: G(I.createdAt) }),
|
|
4097
|
+
C === I.id && /* @__PURE__ */ a("div", { className: d.messageDate, children: /* @__PURE__ */ a(N, {}) })
|
|
4094
4098
|
]
|
|
4095
4099
|
},
|
|
4096
4100
|
I.id
|
|
@@ -4115,25 +4119,25 @@ const co = "_wrapper_ukunw_1", ao = "_ticketContainer_ukunw_23", io = "_title_uk
|
|
|
4115
4119
|
"textarea",
|
|
4116
4120
|
{
|
|
4117
4121
|
disabled: f,
|
|
4118
|
-
className:
|
|
4122
|
+
className: x(d.textarea, {
|
|
4119
4123
|
[d.textareaAntistock]: l
|
|
4120
4124
|
}),
|
|
4121
4125
|
value: s,
|
|
4122
4126
|
placeholder: f ? "The ticket has been closed. Need further assistance? Please submit a new request." : l ? "Type a message..." : "What worries you?",
|
|
4123
4127
|
onChange: (I) => u(I.target.value),
|
|
4124
4128
|
onKeyDown: (I) => {
|
|
4125
|
-
I.key === "Enter" && !I.shiftKey && (I.preventDefault(),
|
|
4129
|
+
I.key === "Enter" && !I.shiftKey && (I.preventDefault(), D());
|
|
4126
4130
|
}
|
|
4127
4131
|
}
|
|
4128
4132
|
),
|
|
4129
4133
|
/* @__PURE__ */ a(
|
|
4130
4134
|
"div",
|
|
4131
4135
|
{
|
|
4132
|
-
onClick:
|
|
4133
|
-
className:
|
|
4136
|
+
onClick: D,
|
|
4137
|
+
className: x(d.button, {
|
|
4134
4138
|
[d.disabled]: f
|
|
4135
4139
|
}),
|
|
4136
|
-
children: /* @__PURE__ */ a(
|
|
4140
|
+
children: /* @__PURE__ */ a(J, { name: "PaperPlaneRight" })
|
|
4137
4141
|
}
|
|
4138
4142
|
)
|
|
4139
4143
|
] })
|
|
@@ -4142,7 +4146,7 @@ const co = "_wrapper_ukunw_1", ao = "_ticketContainer_ukunw_23", io = "_title_uk
|
|
|
4142
4146
|
}
|
|
4143
4147
|
)
|
|
4144
4148
|
] }),
|
|
4145
|
-
p && /* @__PURE__ */ a(De, { close: () =>
|
|
4149
|
+
p && /* @__PURE__ */ a(De, { close: () => P(null), children: /* @__PURE__ */ h(
|
|
4146
4150
|
"div",
|
|
4147
4151
|
{
|
|
4148
4152
|
className: d.imageModal,
|
|
@@ -4153,9 +4157,9 @@ const co = "_wrapper_ukunw_1", ao = "_ticketContainer_ukunw_23", io = "_title_uk
|
|
|
4153
4157
|
{
|
|
4154
4158
|
className: d.imageModalClose,
|
|
4155
4159
|
onClick: () => {
|
|
4156
|
-
|
|
4160
|
+
P(null), R(!1);
|
|
4157
4161
|
},
|
|
4158
|
-
children: /* @__PURE__ */ a(
|
|
4162
|
+
children: /* @__PURE__ */ a(J, { name: "X" })
|
|
4159
4163
|
}
|
|
4160
4164
|
),
|
|
4161
4165
|
/* @__PURE__ */ a(
|
|
@@ -4182,12 +4186,12 @@ export {
|
|
|
4182
4186
|
Go as c,
|
|
4183
4187
|
$o as d,
|
|
4184
4188
|
zo as e,
|
|
4185
|
-
|
|
4189
|
+
jo as f,
|
|
4186
4190
|
Oe as g,
|
|
4187
4191
|
Yo as h,
|
|
4188
4192
|
_o as i,
|
|
4189
4193
|
Ko as j,
|
|
4190
|
-
|
|
4194
|
+
Vo as k,
|
|
4191
4195
|
Jo as l,
|
|
4192
4196
|
on as m,
|
|
4193
4197
|
Wo as r,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react/jsx-runtime"),l=require("./builder-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react/jsx-runtime"),l=require("./builder-D75m1V7n.cjs"),c=require("react"),t=require("./charge-B0gBdJdp.cjs"),d=require("./ui-components-C43Vf6bL.cjs");require("./builder-components-Co9iHNJy.cjs");require("react-dom");require("./ticket-C4s_sd2w.cjs");const u="_topUpContainer_1pag6_1",f="_formWrapper_1pag6_15",h="_header_1pag6_29",g="_footer_1pag6_82",_="_wrapper_1pag6_105",r={topUpContainer:u,formWrapper:f,header:h,footer:g,wrapper:_},m=()=>{const{gatewaysDetail:o,setGatewaysDetail:n,balanceSettings:e,setBalanceSettings:i}=l.useCustomerDashboardStore();return c.useEffect(()=>{!o&&e&&(async()=>{const s=await t.getGatewaysDetail(e!=null&&e.isEnabled?(e==null?void 0:e.topUpSettings.gateways)||[]:[]);n(s)})()},[o,e]),c.useEffect(()=>{e||(async()=>{const s=await t.getBalanceSettings();i(s)})()},[e]),a.jsxs("div",{className:r.wrapper,children:[a.jsx(t.CheckoutHeader,{className:r.header}),a.jsx("div",{className:r.topUpContainer,children:e?a.jsx("div",{className:r.formWrapper,children:a.jsx(t.BalanceModal,{isModal:!1})}):a.jsx(d.Loader,{})}),a.jsx("div",{className:r.footer,children:a.jsx(t.CheckoutFooter,{})})]})};exports.TopUpBalance=m;
|