@billgangcom/theme-lib 1.125.11 → 1.125.13
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-BdRMskBA.js → builder-Bzjt7KtK.js} +5 -5
- package/dist/{builder-BAvtHWNU.cjs → builder-DNkh9C7C.cjs} +2 -2
- package/dist/{builder-components-Bqvu_8uJ.cjs → builder-components-BPLuh4_V.cjs} +2 -2
- package/dist/{builder-components-DRAEiA3W.js → builder-components-BT94OMxj.js} +623 -608
- package/dist/builder.cjs.js +1 -1
- package/dist/builder.es.js +23 -23
- package/dist/{charge-Ct9sevc7.cjs → charge-C2aoqar4.cjs} +1 -1
- package/dist/{charge-Bh34JNbY.js → charge-IRYuGcrW.js} +6 -6
- package/dist/{checkout-B8pRFiwQ.cjs → checkout-DVDZUjSQ.cjs} +1 -1
- package/dist/{checkout-MTWwYXYN.js → checkout-HR4DQ03v.js} +5 -5
- package/dist/exports.cjs.js +1 -1
- package/dist/exports.es.js +6 -6
- package/dist/{index-CJD0BBb3.cjs → index-823ih-5Z.cjs} +1 -1
- package/dist/{index-DEsXjpn8.cjs → index-BnK6yyve.cjs} +1 -1
- package/dist/{index-VydFQJL1.js → index-C7x0OpAC.js} +1 -1
- package/dist/{index-qKn52NDl.cjs → index-CJUkTBLE.cjs} +1 -1
- package/dist/{index-DVTTnkcR.js → index-CKCeewPh.js} +2 -2
- package/dist/{index-C8xHsL66.cjs → index-CcqCOl2W.cjs} +1 -1
- package/dist/{index-_qOGHiLz.cjs → index-Cgb3a13j.cjs} +1 -1
- package/dist/{index-qV3OdVCa.js → index-D-eLh7F3.js} +5 -5
- package/dist/{index-CqATRM07.js → index-D_4T-1DY.js} +5 -5
- package/dist/{index-BI3LU8Xv.js → index-YbQOTLgG.js} +5 -5
- package/dist/{index-DEG7ReRI.cjs → index-iwVyWU-s.cjs} +1 -1
- package/dist/{index-BAa6DCft.js → index-jRrTJd8O.js} +5 -5
- package/dist/index.cjs.js +1 -1
- package/dist/index.es.js +6 -6
- package/dist/{order-CfMffRZJ.cjs → order-CGQ2_eCJ.cjs} +1 -1
- package/dist/{order-DFvufhEx.js → order-D7jXnkto.js} +6 -6
- package/dist/{subscription-CiWRMtw-.js → subscription-B2aLt7q1.js} +5 -5
- package/dist/{subscription-DEHCID-Z.cjs → subscription-B_fwssFU.cjs} +1 -1
- package/dist/{ticket-DsrPYm2y.js → ticket-Bj-AhEbz.js} +5 -5
- package/dist/{ticket-Bpjh9k0v.cjs → ticket-C30ck-ZN.cjs} +1 -1
- package/dist/{top-up-BfOHlwS_.js → top-up-CcPvJDbi.js} +5 -5
- package/dist/{top-up-DPAivA6p.cjs → top-up-IOt4GUoS.cjs} +1 -1
- package/dist/{ui-components-DbDFNPfY.cjs → ui-components-BVI8UP6Y.cjs} +1 -1
- package/dist/{ui-components-D1RXi61S.js → ui-components-Blu-gh32.js} +4 -4
- package/dist/ui.cjs.js +1 -1
- package/dist/ui.es.js +1 -1
- package/dist/{validation-Bryqi0LO.js → validation-BNISByXK.js} +5 -5
- package/dist/{validation-D2CX9Eep.cjs → validation-CrG8xYNb.cjs} +1 -1
- package/package.json +1 -1
package/dist/builder.cjs.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),i=require("./builder-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),i=require("./builder-DNkh9C7C.cjs"),m=require("./ticket-C30ck-ZN.cjs"),o=require("react"),D=require("./charge-C2aoqar4.cjs"),_=require("./ui-components-BVI8UP6Y.cjs"),e=require("@phosphor-icons/react"),Q=({children:r,shopDomain:d,shopId:h,shopPassword:g,shopLogo:I})=>{const{setShopDomain:x,setShopId:P,setShopPassword:y,setShopTerms:p,setShopPrivacyPolicy:l,setShopRefundPolicy:f,setShopLogo:A}=i.useStorefrontStore();return o.useLayoutEffect(()=>{const s=async()=>{const{data:u}=await D.fetchTerms();p(u)},C=async()=>{const{data:u}=await D.fetchPrivacyPolicy();l(u)},w=async()=>{const{data:u}=await D.fetchRefundPolicy();f(u)};x(d),P(h),g&&y(g),I&&A(I),s(),C(),w()},[d,h,g]),t.jsx(t.Fragment,{children:r})},X="_wrapper_1xuz3_18",L={wrapper:X};function J(){_.registerIcons({X:e.XIcon,Plus:e.PlusIcon,Minus:e.MinusIcon,Check:e.CheckIcon,Clock:e.ClockIcon,Info:e.InfoIcon,Copy:e.CopyIcon,Trash:e.TrashIcon,Sliders:e.SlidersIcon,Image:e.ImageIcon,List:e.ListIcon,Handbag:e.HandbagIcon,Bag:e.BagIcon,Eye:e.EyeIcon,Crown:e.CrownIcon,ArrowUp:e.ArrowUpIcon,ArrowDown:e.ArrowDownIcon,Confetti:e.ConfettiIcon,ArrowLeft:e.ArrowLeftIcon,ArrowRight:e.ArrowRightIcon,ArrowLineUpRight:e.ArrowLineUpRightIcon,ArrowUpRight:e.ArrowUpRightIcon,ArrowUUpLeft:e.ArrowUUpLeftIcon,ArrowUUpRight:e.ArrowUUpRightIcon,CaretRight:e.CaretRightIcon,CaretDown:e.CaretDownIcon,CaretUp:e.CaretUpIcon,CaretLeft:e.CaretLeftIcon,MagnifyingGlass:e.MagnifyingGlassIcon,MagnifyingGlassMinus:e.MagnifyingGlassMinusIcon,ArrowLineDown:e.ArrowLineDownIcon,Selection:e.SelectionIcon,CloudArrowUpIcon:e.CloudArrowUpIcon,ArrowsHorizontal:e.ArrowsHorizontalIcon,ArrowsVertical:e.ArrowsVerticalIcon,CheckCircle:e.CheckCircleIcon,XCircle:e.XCircleIcon,Star:e.StarIcon,Fire:e.FireIcon,Lightning:e.LightningIcon,AlignCenterHorizontal:e.AlignCenterHorizontalIcon,File:e.FileIcon,FileText:e.FileTextIcon,BookOpen:e.BookOpenIcon,DownloadSimple:e.DownloadSimpleIcon,DiscordLogo:e.DiscordLogoIcon,TelegramLogo:e.TelegramLogoIcon,SignOut:e.SignOutIcon,Wallet:e.WalletIcon,PaperPlaneRight:e.PaperPlaneRightIcon,ChatsTeardrop:e.ChatsTeardropIcon,DotsSixVertical:e.DotsSixVerticalIcon,Share:e.ShareIcon,Shield:e.ShieldIcon,ShieldCheck:e.ShieldCheckIcon,FileCloud:e.FileCloudIcon,Lock:e.LockIcon,Heart:e.HeartIcon,User:e.UserIcon,Calendar:e.CalendarIcon,Smiley:e.SmileyIcon,Globe:e.GlobeIcon,House:e.HouseIcon,HouseSimple:e.HouseSimpleIcon,CurrencyCircleDollar:e.CurrencyCircleDollarIcon,Medal:e.MedalIcon,CalendarCheck:e.CalendarCheckIcon,Question:e.QuestionIcon,Warning:e.WarningIcon,WarningDiamond:e.WarningDiamondIcon,TreeStructure:e.TreeStructureIcon,Palette:e.PaletteIcon,Gear:e.GearIcon,PaintBrushBroad:e.PaintBrushBroadIcon,TextAa:e.TextAaIcon,TextB:e.TextBIcon,TextH:e.TextHIcon,CornersOut:e.CornersOutIcon,ArrowSquareIn:e.ArrowSquareInIcon,Textbox:e.TextboxIcon,SquaresFour:e.SquaresFourIcon,SealQuestion:e.SealQuestionIcon,ChatCentered:e.ChatCenteredIcon,Ticket:e.TicketIcon,UserCircleGear:e.UserCircleGearIcon,Desktop:e.DesktopIcon,DeviceTabletCamera:e.DeviceTabletCameraIcon,DeviceMobileCamera:e.DeviceMobileCameraIcon,Cards:e.CardsIcon,PushPin:e.PushPinIcon,TextAlignLeft:e.TextAlignLeftIcon,TextAlignRight:e.TextAlignRightIcon,TextAlignCenter:e.TextAlignCenterIcon,AlignLeft:e.AlignLeftIcon,AlignRight:e.AlignRightIcon,AlignTop:e.AlignTopIcon,AlignBottom:e.AlignBottomIcon,TextItalic:e.TextItalicIcon,TextStrikethrough:e.TextStrikethroughIcon,TextUnderline:e.TextUnderlineIcon})}const $=o.lazy(()=>Promise.resolve().then(()=>require("./builder-DNkh9C7C.cjs")).then(r=>r.index).then(r=>({default:r.BuilderPage}))),K=o.lazy(()=>Promise.resolve().then(()=>require("./index-iwVyWU-s.cjs")).then(r=>({default:r.ErrorPage}))),Y=o.lazy(()=>Promise.resolve().then(()=>require("./index-Cgb3a13j.cjs")).then(r=>({default:r.ActivePage}))),Z=o.lazy(()=>Promise.resolve().then(()=>require("./validation-CrG8xYNb.cjs")).then(r=>({default:r.ValidationPage}))),ee=o.lazy(()=>Promise.resolve().then(()=>require("./index-CJUkTBLE.cjs")).then(r=>({default:r.WrapperPage}))),te=o.lazy(()=>Promise.resolve().then(()=>require("./index-BnK6yyve.cjs")).then(r=>({default:r.RouterErrorPage}))),c=o.lazy(()=>Promise.resolve().then(()=>require("./index-CcqCOl2W.cjs")).then(r=>({default:r.DynamicErrorPage}))),re=o.lazy(()=>Promise.resolve().then(()=>require("./checkout-DVDZUjSQ.cjs")).then(r=>({default:r.Checkout}))),oe=o.lazy(()=>Promise.resolve().then(()=>require("./charge-C2aoqar4.cjs")).then(r=>r.index$1).then(r=>({default:r.ChargePage}))),ne=o.lazy(()=>Promise.resolve().then(()=>require("./ticket-C30ck-ZN.cjs")).then(r=>r.index).then(r=>({default:r.TicketItem}))),se=o.lazy(()=>Promise.resolve().then(()=>require("./subscription-B_fwssFU.cjs")).then(r=>r.index).then(r=>({default:r.Subscription}))),ce=o.lazy(()=>Promise.resolve().then(()=>require("./top-up-IOt4GUoS.cjs")).then(r=>({default:r.TopUpBalance}))),ie=o.lazy(()=>Promise.resolve().then(()=>require("./order-CGQ2_eCJ.cjs")).then(r=>r.index).then(r=>({default:r.OrderPage}))),ae=o.lazy(()=>Promise.resolve().then(()=>require("./index-823ih-5Z.cjs")).then(r=>({default:r.TermsPage}))),le=o.lazy(()=>Promise.resolve().then(()=>require("./charge-C2aoqar4.cjs")).then(r=>r.index).then(r=>({default:r.CustomerDashboard}))),U=o.lazy(()=>Promise.resolve().then(()=>require("./charge-C2aoqar4.cjs")).then(r=>r.recapcha).then(r=>({default:r.ReCaptchaProvider}))),ue=()=>null,n=({children:r})=>t.jsx(o.Suspense,{fallback:t.jsx(ue,{}),children:r}),B=o.lazy(()=>Promise.resolve().then(()=>require("./builder-components-BPLuh4_V.cjs")).then(r=>r.index).then(r=>({default:r.RenderAnnouncement}))),R=o.lazy(()=>Promise.resolve().then(()=>require("./builder-components-BPLuh4_V.cjs")).then(r=>r.index).then(r=>({default:r.RenderFooter}))),b=o.lazy(()=>Promise.resolve().then(()=>require("./builder-components-BPLuh4_V.cjs")).then(r=>r.index).then(r=>({default:r.RenderHeader}))),de=r=>{var E;const{blocks:d,settings:h,header:g,footer:I,announcement:x,routes:P=[],shopLogo:y,apiURLs:p,isAntistock:l=!1}=r,[f,A]=o.useState(null),{general:s,setIsAntistock:C}=i.useGeneralStore(),{setApiUrls:w}=i.useApiStore(),u=((E=s==null?void 0:s.info)==null?void 0:E.customerAccountSettings)??"OPTIONAL",z=u==="DISABLED",{setBlocks:H,setSourceBlocks:F,setHeader:O,setFooter:M,setAnnouncement:G,setSettings:W}=i.useBlocksStore(),{themeSettings:S}=i.useThemeSettingsStore(),{settings:T,setSettings:V}=i.useSettingsStore(),k=i.IS_LOCAL_HOST?localStorage.getItem("fakeDomain")||"":window.location.hostname,N=localStorage.getItem("shopPassword"),q=localStorage.getItem("shopId")||"";return o.useEffect(()=>{if(C(l),l){const a=document.documentElement;getComputedStyle(a).getPropertyValue("--brand-color").trim()==="#ff3f19"&&a.style.setProperty("--brand-color","#a13dff")}},[l,C]),o.useEffect(()=>{!q&&(s!=null&&s.info.id)&&localStorage.setItem("shopId",s==null?void 0:s.info.id)},[s]),o.useEffect(()=>{!k&&!l&&localStorage.setItem("fakeDomain","drafts-ca18cf24-6659-4015-b1ab-9ebe9fa64e74.bgng.io")},[k]),o.useEffect(()=>{if(S&&T){const a=m.generateDynamicStyles(S,T);m.loadCustomFonts(),m.setupDynamicFonts(S),m.injectStylesToDOM(a)}},[S,JSON.stringify(T),window.location.hostname]),o.useEffect(()=>{const j=new h().blockSettings;V(j)},[]),o.useEffect(()=>{J()},[]),o.useLayoutEffect(()=>{const a={};Object.keys(d).map(v=>{a[v]=d[v]}),F(a),H(a),O(g),M(I),G(x),W(h),p&&w(p);const j=i.createBrowserRouter([{element:t.jsx(Q,{shopDomain:k,shopId:q,shopPassword:N||void 0,shopLogo:y,children:t.jsx(U,{children:t.jsx(ee,{children:t.jsx(i.Outlet,{})})})}),errorElement:t.jsx(n,{children:t.jsx(te,{})}),children:[{path:"/admin/builder/*",element:t.jsx(n,{children:t.jsx(Y,{children:t.jsx($,{blocks:d,settings:h,header:g,footer:I,announcement:x})})}),errorElement:t.jsx(n,{children:t.jsx(K,{})})},...P,{path:"/checkout",element:t.jsx(n,{children:t.jsx(re,{})}),errorElement:t.jsx(n,{children:t.jsx(c,{})}),loader:()=>(document.title="Checkout",!0)},{path:"/top-up",element:t.jsx(n,{children:t.jsx(ce,{})}),errorElement:t.jsx(n,{children:t.jsx(c,{})}),loader:()=>(document.title="Top Up Balance",!0)},{path:"/charges/:id",element:t.jsx(n,{children:t.jsx(oe,{})}),errorElement:t.jsx(n,{children:t.jsx(c,{})}),loader:()=>(document.title="Charges",!0)},{path:"/orders/:id/:accessToken?",element:t.jsx(n,{children:t.jsx(ie,{})}),errorElement:t.jsx(n,{children:t.jsx(c,{})}),loader:()=>(document.title="Orders",!0)},{path:"/subscriptions/:id/:accessToken?",element:t.jsx(n,{children:t.jsx(se,{})}),errorElement:t.jsx(n,{children:t.jsx(c,{})}),loader:()=>(document.title="Subscriptions",!0)},...z?[]:[{path:l?"/account":"/customer-dash",element:t.jsx(n,{children:t.jsxs("div",{className:L.wrapper,children:[t.jsx(B,{}),t.jsx(b,{}),t.jsx("div",{style:{flex:"1 1 auto"},children:t.jsx(le,{})}),t.jsx(R,{})]})}),errorElement:t.jsx(n,{children:t.jsx(c,{})}),loader:()=>(document.title=l?"Account":"Customer Dashboard",!0)}],{path:"/validation",element:t.jsx(n,{children:t.jsx(Z,{})}),errorElement:t.jsx(n,{children:t.jsx(c,{})}),loader:()=>(document.title="Validation",!0)},{path:"/ticket/:id/:accessToken",element:t.jsx(n,{children:t.jsxs("div",{className:L.wrapper,children:[t.jsx(b,{}),t.jsx("div",{style:{flex:1,width:"100%",height:"100%"},children:t.jsx(U,{children:t.jsx(ne,{})})}),t.jsx(R,{})]})}),errorElement:t.jsx(n,{children:t.jsx(c,{})}),loader:()=>(document.title="Ticket",!0)},{path:"/terms",element:t.jsx(n,{children:t.jsxs("div",{className:L.wrapper,children:[t.jsx(B,{}),t.jsx(b,{}),t.jsx("div",{style:{flex:1,width:"100%"},children:t.jsx(ae,{})}),t.jsx(R,{})]})}),errorElement:t.jsx(n,{children:t.jsx(c,{})}),loader:()=>(document.title="Terms of Service",!0)},{path:"*",element:t.jsx(m.DynamicRouteWrapper,{}),errorElement:t.jsx(n,{children:t.jsx(c,{})})}]}]);A(j)},[s,u]),t.jsx(o.Suspense,{fallback:null,children:f&&t.jsx(i.RouterProvider,{router:f})})};exports.App=de;
|
package/dist/builder.es.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { jsx as e, Fragment as j, jsxs as D } from "react/jsx-runtime";
|
|
2
|
-
import { M as _, y as N, j as q, c as Q, m as X, a as J, K, ai as $, aj as Y, ak as Z } from "./builder-
|
|
3
|
-
import { f as ee, l as te, j as oe, k as ne, D as re } from "./ticket-
|
|
2
|
+
import { M as _, y as N, j as q, c as Q, m as X, a as J, K, ai as $, aj as Y, ak as Z } from "./builder-Bzjt7KtK.js";
|
|
3
|
+
import { f as ee, l as te, j as oe, k as ne, D as re } from "./ticket-Bj-AhEbz.js";
|
|
4
4
|
import o, { Suspense as ce } from "react";
|
|
5
|
-
import { $ as ae, a0 as ie, a1 as le } from "./charge-
|
|
6
|
-
import { w as se } from "./ui-components-
|
|
5
|
+
import { $ as ae, a0 as ie, a1 as le } from "./charge-IRYuGcrW.js";
|
|
6
|
+
import { w as se } from "./ui-components-Blu-gh32.js";
|
|
7
7
|
import { TextUnderlineIcon as de, TextStrikethroughIcon as ue, TextItalicIcon as he, AlignBottomIcon as me, AlignTopIcon as pe, AlignRightIcon as Ie, AlignLeftIcon as ge, TextAlignCenterIcon as fe, TextAlignRightIcon as Ce, TextAlignLeftIcon as Se, PushPinIcon as ye, CardsIcon as Ae, DeviceMobileCameraIcon as we, DeviceTabletCameraIcon as Te, DesktopIcon as Pe, UserCircleGearIcon as ke, TicketIcon as De, ChatCenteredIcon as Le, SealQuestionIcon as Re, SquaresFourIcon as xe, TextboxIcon as be, ArrowSquareInIcon as Ee, CornersOutIcon as Be, TextHIcon as Ue, TextBIcon as ze, TextAaIcon as ve, PaintBrushBroadIcon as He, GearIcon as Fe, PaletteIcon as Oe, TreeStructureIcon as Me, WarningDiamondIcon as Ge, WarningIcon as We, QuestionIcon as Ve, CalendarCheckIcon as je, MedalIcon as _e, CurrencyCircleDollarIcon as Ne, HouseSimpleIcon as qe, HouseIcon as Qe, GlobeIcon as Xe, SmileyIcon as Je, CalendarIcon as Ke, UserIcon as $e, HeartIcon as Ye, LockIcon as Ze, FileCloudIcon as et, ShieldCheckIcon as tt, ShieldIcon as ot, ShareIcon as nt, DotsSixVerticalIcon as rt, ChatsTeardropIcon as ct, PaperPlaneRightIcon as at, WalletIcon as it, SignOutIcon as lt, TelegramLogoIcon as st, DiscordLogoIcon as dt, DownloadSimpleIcon as ut, BookOpenIcon as ht, FileTextIcon as mt, FileIcon as pt, AlignCenterHorizontalIcon as It, LightningIcon as gt, FireIcon as ft, StarIcon as Ct, XCircleIcon as St, CheckCircleIcon as yt, ArrowsVerticalIcon as At, ArrowsHorizontalIcon as wt, CloudArrowUpIcon as Tt, SelectionIcon as Pt, ArrowLineDownIcon as kt, MagnifyingGlassMinusIcon as Dt, MagnifyingGlassIcon as Lt, CaretLeftIcon as Rt, CaretUpIcon as xt, CaretDownIcon as bt, CaretRightIcon as Et, ArrowUUpRightIcon as Bt, ArrowUUpLeftIcon as Ut, ArrowUpRightIcon as zt, ArrowLineUpRightIcon as vt, ArrowRightIcon as Ht, ArrowLeftIcon as Ft, ConfettiIcon as Ot, ArrowDownIcon as Mt, ArrowUpIcon as Gt, CrownIcon as Wt, EyeIcon as Vt, BagIcon as jt, HandbagIcon as _t, ListIcon as Nt, ImageIcon as qt, SlidersIcon as Qt, TrashIcon as Xt, CopyIcon as Jt, InfoIcon as Kt, ClockIcon as $t, CheckIcon as Yt, MinusIcon as Zt, PlusIcon as eo, XIcon as to } from "@phosphor-icons/react";
|
|
8
8
|
const oo = ({
|
|
9
9
|
children: t,
|
|
@@ -154,47 +154,47 @@ function ro() {
|
|
|
154
154
|
});
|
|
155
155
|
}
|
|
156
156
|
const co = o.lazy(
|
|
157
|
-
() => import("./builder-
|
|
157
|
+
() => import("./builder-Bzjt7KtK.js").then((t) => t.ao).then((t) => ({ default: t.BuilderPage }))
|
|
158
158
|
), ao = o.lazy(
|
|
159
|
-
() => import("./index-
|
|
159
|
+
() => import("./index-D-eLh7F3.js").then((t) => ({ default: t.ErrorPage }))
|
|
160
160
|
), io = o.lazy(
|
|
161
|
-
() => import("./index-
|
|
161
|
+
() => import("./index-C7x0OpAC.js").then((t) => ({ default: t.ActivePage }))
|
|
162
162
|
), lo = o.lazy(
|
|
163
|
-
() => import("./validation-
|
|
163
|
+
() => import("./validation-BNISByXK.js").then((t) => ({ default: t.ValidationPage }))
|
|
164
164
|
), so = o.lazy(
|
|
165
|
-
() => import("./index-
|
|
165
|
+
() => import("./index-YbQOTLgG.js").then((t) => ({ default: t.WrapperPage }))
|
|
166
166
|
), uo = o.lazy(
|
|
167
|
-
() => import("./index-
|
|
167
|
+
() => import("./index-jRrTJd8O.js").then((t) => ({ default: t.RouterErrorPage }))
|
|
168
168
|
), c = o.lazy(
|
|
169
|
-
() => import("./index-
|
|
169
|
+
() => import("./index-D_4T-1DY.js").then((t) => ({ default: t.DynamicErrorPage }))
|
|
170
170
|
), ho = o.lazy(
|
|
171
|
-
() => import("./checkout-
|
|
171
|
+
() => import("./checkout-HR4DQ03v.js").then((t) => ({ default: t.Checkout }))
|
|
172
172
|
), mo = o.lazy(
|
|
173
|
-
() => import("./charge-
|
|
173
|
+
() => import("./charge-IRYuGcrW.js").then((t) => t.a9).then((t) => ({ default: t.ChargePage }))
|
|
174
174
|
), po = o.lazy(
|
|
175
|
-
() => import("./ticket-
|
|
175
|
+
() => import("./ticket-Bj-AhEbz.js").then((t) => t.m).then((t) => ({ default: t.TicketItem }))
|
|
176
176
|
), Io = o.lazy(
|
|
177
|
-
() => import("./subscription-
|
|
177
|
+
() => import("./subscription-B2aLt7q1.js").then((t) => t.i).then((t) => ({ default: t.Subscription }))
|
|
178
178
|
), go = o.lazy(
|
|
179
|
-
() => import("./top-up-
|
|
179
|
+
() => import("./top-up-CcPvJDbi.js").then((t) => ({ default: t.TopUpBalance }))
|
|
180
180
|
), fo = o.lazy(
|
|
181
|
-
() => import("./order-
|
|
181
|
+
() => import("./order-D7jXnkto.js").then((t) => t.i).then((t) => ({ default: t.OrderPage }))
|
|
182
182
|
), Co = o.lazy(
|
|
183
|
-
() => import("./index-
|
|
183
|
+
() => import("./index-CKCeewPh.js").then((t) => ({ default: t.TermsPage }))
|
|
184
184
|
), So = o.lazy(
|
|
185
|
-
() => import("./charge-
|
|
185
|
+
() => import("./charge-IRYuGcrW.js").then((t) => t.a8).then((t) => ({ default: t.CustomerDashboard }))
|
|
186
186
|
), B = o.lazy(
|
|
187
|
-
() => import("./charge-
|
|
187
|
+
() => import("./charge-IRYuGcrW.js").then((t) => t.a7).then((t) => ({ default: t.ReCaptchaProvider }))
|
|
188
188
|
), yo = () => null, n = ({ children: t }) => /* @__PURE__ */ e(ce, { fallback: /* @__PURE__ */ e(yo, {}), children: t }), U = o.lazy(
|
|
189
|
-
() => import("./builder-components-
|
|
189
|
+
() => import("./builder-components-BT94OMxj.js").then((t) => t.i).then((t) => ({
|
|
190
190
|
default: t.RenderAnnouncement
|
|
191
191
|
}))
|
|
192
192
|
), R = o.lazy(
|
|
193
|
-
() => import("./builder-components-
|
|
193
|
+
() => import("./builder-components-BT94OMxj.js").then((t) => t.i).then((t) => ({
|
|
194
194
|
default: t.RenderFooter
|
|
195
195
|
}))
|
|
196
196
|
), x = o.lazy(
|
|
197
|
-
() => import("./builder-components-
|
|
197
|
+
() => import("./builder-components-BT94OMxj.js").then((t) => t.i).then((t) => ({
|
|
198
198
|
default: t.RenderHeader
|
|
199
199
|
}))
|
|
200
200
|
), xo = (t) => {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";const g=require("./builder-BAvtHWNU.cjs"),i=require("react/jsx-runtime"),L=require("react"),N=require("./ui-components-DbDFNPfY.cjs"),nl=require("./builder-components-Bqvu_8uJ.cjs");require("react-dom");const rl=require("./ticket-Bpjh9k0v.cjs"),ul=require("./order-CfMffRZJ.cjs"),n2=require("./subscription-DEHCID-Z.cjs");function r2(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const ge=r2(L);async function u2(e){const t=g.useApiStore.getState().apiUrls,n=g.IS_LOCAL_HOST?localStorage.getItem("fakeDomain"):window.location.hostname,r=`${t.storeApi}/shops/${n}/general`+(e?`?password=${e}`:"");return(await g.request({method:"get",url:r,withToken:!1})).data}const a2=async()=>{const e=g.useApiStore.getState().apiUrls,t=g.IS_LOCAL_HOST?localStorage.getItem("fakeDomain")||"flagship-theme.pages.dev":window.location.hostname,n=`${e.storeApi}/v2/shops/${t}/settings-theme`;return await g.request({url:n,withToken:!0,method:"get"})},s2=async e=>{const t=g.useApiStore.getState().apiUrls,n=g.IS_LOCAL_HOST?localStorage.getItem("fakeDomain"):window.location.hostname,r=`${t.slApi}/v1/balance/top-up/${n}`;return await g.request({url:r,method:"post",body:e,withToken:!1})},i2=async(e,t)=>{const r=`${g.useApiStore.getState().apiUrls.cashappApi}/v1/${t}/cashapp/link`;return await g.request({url:r,method:"post",body:e,withToken:!1})},Nr=async e=>{const t=g.useApiStore.getState().apiUrls;if(!localStorage.getItem("token"))throw new Error("No access token");const r=g.IS_LOCAL_HOST?localStorage.getItem("fakeDomain"):window.location.hostname,u=`${t.customersApi}/v2/${r}/customers/${e}`;return await g.request({url:u,withToken:!0,method:"get",typeToken:"customer"})},o2=()=>Nr("dash/info"),al=()=>Nr("dash/dashboard/home"),c2=()=>Nr("rewards"),l2=()=>Nr("balance"),d2=()=>Nr("balance/top-up/settings"),f2=()=>Nr("referral-system"),Ks=e=>{const t=g.useApiStore.getState().apiUrls,n=g.IS_LOCAL_HOST?localStorage.getItem("fakeDomain"):window.location.hostname,r=`${t.storeApi}/shops/${n}/${e}`;return g.request({url:r,withToken:!1,method:"get"})},h2=()=>Ks("terms"),p2=()=>Ks("refund-policy"),m2=()=>Ks("privacy-policy"),Yu=10,sa=async({url:e,PageNumber:t})=>{var o;const n=g.useApiStore.getState().apiUrls,r=g.IS_LOCAL_HOST?localStorage.getItem("fakeDomain"):window.location.hostname,u=`${n.customersApi}/v2/${r}/${e}?PageNumber=${t}&PageSize=${Yu}`,a=await g.request({url:u,withToken:!0,method:"get",typeToken:"customer"}),s=Number((o=a.headers)==null?void 0:o["x-pagination-total"]);return{list:a.data,totalCount:s}},ia=async(e,t="get",n)=>{const r=g.useApiStore.getState().apiUrls,u=g.IS_LOCAL_HOST?localStorage.getItem("fakeDomain"):window.location.hostname,a=`${r.slApi}/v1/orders/${u}/${e}`;return await g.request({url:a,method:t,withToken:!0,body:n,typeToken:"customer"})},g2=e=>ia("","post",e),b2=({PageNumber:e})=>sa({url:"customers/orders",PageNumber:e}),_2=e=>ia(e),x2=e=>ia(e),C2=(e,t,n)=>{const r=g.useApiStore.getState().apiUrls,u=g.IS_LOCAL_HOST?localStorage.getItem("fakeDomain"):window.location.hostname,a=`${r.slApi}/v2/orders/${u}/${e}/${t}/replacement-requests`;return g.request({url:a,method:"post",withToken:!0,body:n,typeToken:"customer"})},E2=async e=>{const t=g.useApiStore.getState().apiUrls,n=g.IS_LOCAL_HOST?localStorage.getItem("fakeDomain"):window.location.hostname,r=`${t.slApi}/v1/public/${n}/images`,u=new FormData;return u.append("file",e),g.request({url:r,method:"post",withToken:!1,body:u})},y2=(e,t,n)=>ia(`${e}/${t}/replacement-requests/${n}/cancel`,"post"),T2=async e=>{const t=g.useApiStore.getState().apiUrls,n=g.IS_LOCAL_HOST?localStorage.getItem("fakeDomain"):window.location.hostname,r=`${t.slApi}/v1/${n}/subscriptions`;return await g.request({url:r,method:"post",withToken:!1,body:e})},k2=async(e,t)=>{const n=g.useApiStore.getState().apiUrls,r=g.IS_LOCAL_HOST?localStorage.getItem("fakeDomain"):window.location.hostname,u=`${n.slApi}/v2/${r}/subscriptions/${e}/${t}`;return await g.request({url:u,method:"get",withToken:!1})},A2=async(e,t)=>{const n=g.useApiStore.getState().apiUrls,r=g.IS_LOCAL_HOST?localStorage.getItem("fakeDomain"):window.location.hostname,u=`${n.slApi}/v1/${r}/subscriptions/${e}/${t}/upgrades`;return await g.request({url:u,method:"get",withToken:!1})},S2=async(e,t,n)=>{const r=g.useApiStore.getState().apiUrls,u=g.IS_LOCAL_HOST?localStorage.getItem("fakeDomain"):window.location.hostname,a=`${r.slApi}/v1/${u}/subscriptions/${e}/${t}/cancel`;return await g.request({url:a,method:"post",withToken:!1,body:n})},I2=async(e,t)=>{const n=g.useApiStore.getState().apiUrls,r=g.IS_LOCAL_HOST?localStorage.getItem("fakeDomain"):window.location.hostname,u=`${n.slApi}/v2/${r}/subscriptions/${e}/change-gateway`;return await g.request({url:u,method:"post",withToken:!1,body:{gateway:t}})},N2=({PageNumber:e})=>sa({url:"customers/subscriptions",PageNumber:e}),v2=async({id:e,accessToken:t})=>await A2(e,t),w2=async(e,t)=>{const n=g.useApiStore.getState().apiUrls,r=g.IS_LOCAL_HOST?localStorage.getItem("fakeDomain"):window.location.hostname,u=`${n.slApi}/v2/${r}/subscriptions/${e}/order`;return await g.request({url:u,method:"post",withToken:!1,body:t})},D2=async(e,t)=>{const n=g.useApiStore.getState().apiUrls,r=g.IS_LOCAL_HOST?localStorage.getItem("fakeDomain"):window.location.hostname,u=`${n.slApi}/v1/public/${r}/tickets/${e}/${t}`;return await g.request({url:u,method:"get",withToken:!1})},L2=async(e,t,n,r,u,a)=>{const s=g.useApiStore.getState().apiUrls,o=g.IS_LOCAL_HOST?localStorage.getItem("fakeDomain"):window.location.hostname,c=`${s.slApi}/v1/public/${o}/tickets/${e}/${t}/answer`;return(await g.request({url:c,method:"post",body:{message:n,recaptcha:r,tsId:u,...a&&a.length>0&&{imageIds:a.map(h=>h.imageId)}},withToken:!1})).data},P2=({PageNumber:e})=>sa({url:"customers/tickets",PageNumber:e}),R2=({PageNumber:e})=>sa({url:"customers/balance/transactions",PageNumber:e}),M2=async(e,t,n)=>{const r=g.useApiStore.getState().apiUrls,u=g.IS_LOCAL_HOST?localStorage.getItem("fakeDomain"):window.location.hostname,a=`${r.slApi}/v1/reviews/${u}/${t}/${n}`;return await g.request({url:a,method:"post",withToken:!1,body:e})},O2=async e=>{const t=g.useApiStore.getState().apiUrls,n=g.IS_LOCAL_HOST?localStorage.getItem("fakeDomain"):window.location.hostname,r=`${t.slApi}/v1/charges/${n}/${e}`;return await g.request({url:r,method:"get",withToken:!1})},j2=async e=>{const t=g.useApiStore.getState().apiUrls,n=e.map(s=>["names",s]),r=new URLSearchParams(n),u=g.IS_LOCAL_HOST?localStorage.getItem("fakeDomain"):window.location.hostname,a=`${t.slApi}/v2/gateways?shopDomain=${u}&${r.toString()}`;return await g.request({url:a,method:"get",withToken:!1})},Au=new Map,sl=async e=>{const t=g.useApiStore.getState().apiUrls,r=Array.from(new Set(e)).sort().map(l=>["names",l]),u=new URLSearchParams(r),a=g.IS_LOCAL_HOST?localStorage.getItem("fakeDomain"):window.location.hostname,s=`${t.slApi}/v2/checkout?shopDomain=${a}&${u.toString()}`,o=`${s}`;if(Au.has(o))return Au.get(o);const c=g.request({url:s,method:"get",withToken:!1}).catch(l=>{throw Au.delete(o),l});return Au.set(o,c),c},il=async({email:e,recaptcha:t,tsId:n})=>{const r=g.useApiStore.getState().apiUrls,u=g.IS_LOCAL_HOST?localStorage.getItem("fakeDomain"):window.location.hostname,a=`${r.customersApi}/v2/${u}/auth/otp/request`;return(await g.request({url:a,body:{email:e,recaptcha:t,tsId:n},method:"post",withToken:!1})).data?{requested:!0,email:e}:{requested:!1,email:void 0}},ol=async({email:e,otp:t,recaptcha:n,tsId:r})=>{const u=g.useApiStore.getState().apiUrls,a=g.IS_LOCAL_HOST?localStorage.getItem("fakeDomain"):window.location.hostname,s=`${u.customersApi}/v2/${a}/auth/otp/login`,{data:o}=await g.request({url:s,method:"post",body:{email:e,otp:t,recaptcha:n,tsId:r},withToken:!1});return g.useStorefrontStore.getState().setToken(o.data),localStorage.setItem("token",o.data),{token:o.data,requested:!1}},ys=async()=>{g.useStorefrontStore.getState().setToken(""),g.useCustomerDashboardStore.getState().setDashInfo(null),localStorage.removeItem("token")},F2=Object.freeze(Object.defineProperty({__proto__:null,loginCustomer:ol,logoutCustomer:ys,requestOtp:il},Symbol.toStringTag,{value:"Module"})),B2=async e=>{const t=g.useApiStore.getState().apiUrls,n=g.IS_LOCAL_HOST?localStorage.getItem("fakeDomain"):window.location.hostname,r=`${t.slApi}/v2/coupons/${n}/validate`;return await g.request({url:r,method:"post",body:e,withToken:!1})},H2=async e=>{const t=g.useApiStore.getState().apiUrls,n=g.IS_LOCAL_HOST?localStorage.getItem("fakeDomain"):window.location.hostname,r=`${t.customersApi}/v2/${n}/customers/referral-system/signup`;return(await g.request({url:r,withToken:!0,method:"post",body:e,typeToken:"customer"})).data},U2=async()=>{const{data:e}=await f2();return e},V2=async e=>{const{data:t}=await H2(e);return t},$2=async e=>{const t=g.useApiStore.getState().apiUrls,n=g.IS_LOCAL_HOST?localStorage.getItem("fakeDomain"):window.location.hostname,r=`${t.slApi}/v1/discord/${n}`;return await g.request({url:r,method:"post",body:e,withToken:!1})},z2=async e=>{const t=g.useApiStore.getState().apiUrls,n=g.IS_LOCAL_HOST?localStorage.getItem("fakeDomain"):window.location.hostname,r=`${t.slApi}/v1/discord/${n}/${e.id}?customerEmail=${e.customerEmail}`;return await g.request({url:r,method:"get",withToken:!1})};async function q2(e){const t=g.useApiStore.getState().apiUrls,n=g.IS_LOCAL_HOST?localStorage.getItem("fakeDomain"):window.location.hostname,r=`${t.customersApi}/v2/${n}/customers/rewards/${e.id}/claim`;return g.request({url:r,method:"post",withToken:!0,typeToken:"customer"})}const Z2=async(e,t,n,r)=>{const a=`${g.useApiStore.getState().apiUrls.slApi}/v1/vouches/${t}/${n}/${r}`;return await g.request({url:a,method:"post",withToken:!1,body:e})},cl=()=>g.IS_LOCAL_HOST?localStorage.getItem("fakeDomain"):window.location.hostname,W2=async()=>{const e=g.useApiStore.getState().apiUrls,t=cl(),n=`${e.customersApi}/v2/${t}/api-key`;return g.request({url:n,method:"get",withToken:!0,typeToken:"customer"})},Y2=async()=>{const e=g.useApiStore.getState().apiUrls,t=cl(),n=`${e.customersApi}/v2/${t}/api-key/regenerate`;return g.request({url:n,method:"post",withToken:!0,typeToken:"customer"})},G2=()=>typeof document<"u"?document.documentElement.hasAttribute("translated")||document.documentElement.querySelector(".translated-ltr, .translated-rtl")!==null||document.head.querySelector('meta[name="_translator"]')!==null:!1,ll=({children:e,className:t,as:n="span",...r})=>{const[u,a]=L.useState(!1);return L.useEffect(()=>{typeof window<"u"&&a(G2())},[]),u?i.jsx(n,{className:t,...r,"data-stable-text":e,dangerouslySetInnerHTML:{__html:""}}):i.jsx(n,{className:t,...r,children:e})},X2="_statItem_fzeec_1",K2="_content_fzeec_44",Q2="_withChildren_fzeec_50",J2="_info_fzeec_56",ef="_iconWrapper_fzeec_68",tf="_text_fzeec_78",nf="_title_fzeec_84",rf="_value_fzeec_88",uf="_emptyImage_fzeec_94",af="_image_fzeec_11",sf="_imageTitle_fzeec_112",of="_emptyImageText_fzeec_122",cf="_hoverable_fzeec_147",rt={statItem:X2,content:K2,withChildren:Q2,info:J2,iconWrapper:ef,text:tf,title:nf,value:rf,emptyImage:uf,image:af,imageTitle:sf,emptyImageText:of,hoverable:cf},wt=({iconName:e,title:t,value:n,image:r,imageName:u,children:a,className:s,logo:o,customLogo:c,productSlug:l})=>{const h=g.useNavigate();return i.jsxs("div",{className:`${rt.statItem} ${s}`,children:[r&&r!=="empty"&&i.jsxs("div",{style:{position:"relative"},onClick:()=>{l&&h(`/${l}`)},children:[i.jsx("div",{style:{background:"#000000"},children:i.jsx("img",{src:r,alt:u,className:g.clx(rt.image,rt.emptyImage,{[rt.hoverable]:l})})}),i.jsx("div",{className:rt.emptyImageText,children:i.jsx("div",{className:g.clx(rt.title,rt.imageTitle),id:"h5",children:u})})]}),r==="empty"&&i.jsx("div",{style:{background:"#000000"},children:i.jsxs("div",{className:g.clx(rt.emptyImage,{[rt.hoverable]:l}),onClick:()=>{l&&h(`/${l}`)},children:[i.jsx(N.Icon,{name:"Image",width:64,height:64,fill:"var(--text-secondary)"}),i.jsx("div",{className:rt.emptyImageText,children:i.jsx("div",{className:rt.title,id:"h5",children:u||"No Product"})})]})}),i.jsxs("div",{className:`${rt.content} ${a?rt.withChildren:""}`,children:[i.jsxs("div",{className:rt.info,children:[c?i.jsx("div",{style:{color:"var(--text-action)"},children:c}):o?i.jsx("div",{className:rt.iconWrapper,children:i.jsx("img",{src:o,width:28,height:28,style:{objectFit:"contain"}})}):i.jsx(N.Icon,{name:e||"File",className:rt.iconWrapper,width:28,height:28,fill:"var(--text-action)"}),i.jsxs("div",{className:rt.text,children:[i.jsx("div",{className:rt.title,id:"h5",children:t}),i.jsx("div",{className:rt.value,id:"h5-bold",children:n})]})]}),a]})]})},lf="_card_8m277_2",df="_mobile_8m277_15",ff="_email_8m277_19",hf="_balance_8m277_25",pf="_sidebar_8m277_32",mf="_sidebarAntistock_8m277_33",gf="_navList_8m277_68",bf="_navListAntistock_8m277_86",_f="_navItem_8m277_91",xf="_antistockNavItem_8m277_92",Cf="_activeNavItem_8m277_116",Ef="_antistockActiveNavItem_8m277_121",yf="_antistockInactiveNavItem_8m277_139",Tf="_inactiveNavItem_8m277_140",kf="_logoutNavItem_8m277_150",Af="_logoutNavItemAntistock_8m277_159",Sf="_logoutNavItemContentAntistock_8m277_173",If="_iconWrapper_8m277_185",Nf="_skeleton_8m277_190",Ze={card:lf,mobile:df,email:ff,balance:hf,sidebar:pf,sidebarAntistock:mf,navList:gf,navListAntistock:bf,navItem:_f,antistockNavItem:xf,activeNavItem:Cf,antistockActiveNavItem:Ef,antistockInactiveNavItem:yf,inactiveNavItem:Tf,logoutNavItem:kf,logoutNavItemAntistock:Af,logoutNavItemContentAntistock:Sf,iconWrapper:If,skeleton:Nf},vf=({email:e,balance:t,adaptiveStyles:n})=>i.jsxs("div",{className:g.clx(Ze.card,{[Ze.mobile]:n!=="desktop"}),children:[i.jsx("div",{className:Ze.email,id:"h5",children:e}),i.jsxs("div",{className:Ze.balance,id:"md",children:["Balance: ",t]})]}),wf=()=>typeof g.Routes>"u"||!g.Routes.Home?(console.warn("Routes not available"),[]):[[g.Routes.Home,"House"],[g.Routes.Orders,"CurrencyCircleDollar"],[g.Routes.Rewards,"Medal"],[g.Routes.Balance,"Wallet"],[g.Routes.Subscriptions,"CalendarCheck"],[g.Routes.Tickets,"Question"],[g.Routes.Api,"Code"]],Df=()=>typeof g.AntistockRoutes>"u"||!g.AntistockRoutes.Home?(console.warn("AntistockRoutes not available"),[]):[[g.AntistockRoutes.Home,"House"],[g.AntistockRoutes.Orders,"CurrencyCircleDollar"],[g.AntistockRoutes.Rewards,"Medal"],[g.AntistockRoutes.Balance,"Wallet"],[g.AntistockRoutes.Tickets,"Question"],[g.AntistockRoutes.Api,"Code"]],Wi=({children:e,className:t="",onClick:n})=>{const{isAntistock:r}=g.useGeneralStore();return i.jsx("button",{type:"button",className:g.clx(r?Ze.antistockNavItem:Ze.navItem,t),onClick:n,children:e})},Lf=({adaptiveStyles:e})=>{const{route:t,setRoute:n,dashboardSettings:r}=g.useCustomerDashboardStore(),{resetPage:u}=g.usePaginationPagesStore(),{isAntistock:a}=g.useGeneralStore(),s=L.useMemo(()=>{if(a){const l=Df();return r!=null&&r.isApiPageEnabled?l:l.filter(([h])=>h!==g.AntistockRoutes.Api)}const c=wf();return r!=null&&r.isApiPageEnabled?c:c.filter(([l])=>l!==g.Routes.Api)},[a,r]),o=c=>{t!==c&&u(),n(c)};return i.jsxs("div",{className:g.clx(Ze.navList,{[Ze.mobile]:e!=="desktop",[Ze.navListAntistock]:a}),children:[s.map(([c,l])=>{const h=c===t;return i.jsxs(Wi,{onClick:()=>o(c),className:g.clx(h?a?Ze.antistockActiveNavItem:Ze.activeNavItem:a?Ze.antistockInactiveNavItem:Ze.inactiveNavItem),children:[a?null:i.jsx("div",{className:Ze.iconWrapper,children:i.jsx(N.Icon,{name:l})}),i.jsx("div",{children:c})]},c)}),i.jsx(Wi,{className:g.clx(Ze.logoutNavItem,{[Ze.logoutNavItemAntistock]:a}),onClick:()=>{a||ys()},children:a?i.jsxs("div",{className:g.clx({[Ze.logoutNavItemContentAntistock]:a}),onClick:()=>{ys()},children:[i.jsx("div",{className:Ze.iconWrapper,children:i.jsx(N.Icon,{name:"SignOut"})}),i.jsx("div",{children:"Sign Out"})]}):i.jsxs(i.Fragment,{children:[i.jsx("div",{className:Ze.iconWrapper,children:i.jsx(N.Icon,{name:"SignOut"})}),i.jsx("div",{children:"Sign Out"})]})})]})};var _e=(e=>(e.New="NEW",e.Pending="PENDING",e.Processing="PROCESSING",e.Completed="COMPLETED",e.Cancelled="CANCELLED",e.Expired="EXPIRED",e.FullDeliveryFailure="FULL_DELIVERY_FAILURE",e.PartiallyDelivered="PARTIALLY_DELIVERED",e.PartiallyRefunded="PARTIALLY_REFUNDED",e.Refunded="REFUNDED",e.Failed="FAILED",e))(_e||{}),pe=(e=>(e.PENDING="PENDING",e.APPROVED="APPROVED",e.DECLINED="DECLINED",e.AUTO_APPROVED="AUTO_APPROVED",e.CANCELLED="CANCELLED",e.EXPIRED="EXPIRED",e.PROCESSING="PROCESSING",e.COMPLETED="COMPLETED",e.FAILED="FAILED",e))(pe||{}),Pe=(e=>(e.Text="TEXT",e.Serial="SERIALS",e.Ebook="EBOOK",e.Link="LINK",e.Download="DOWNLOAD",e.Discord="DISCORD",e.Telegram="TELEGRAM",e.Custom="CUSTOM",e))(Pe||{}),kn=(e=>(e.RIAL="RIAL",e.AWAITING_PAYMENT="AWAITING_PAYMENT",e.ACTIVE="ACTIVE",e.PAST_DUE="PAST_DUE",e.CANCELLED="CANCELLED",e.EXPIRED="EXPIRED",e.CHANGED_GATEWAY="CHANGED_GATEWAY",e.REPLACED="REPLACED",e))(kn||{});const fu=async e=>(await j2(e)).data,dl=async()=>{var n;const t=(await d2()).data;if(t.isEnabled){const r=(n=t==null?void 0:t.topUpSettings)==null?void 0:n.gateways;r&&fu(r)}return t},oa=async()=>{const t=(await l2()).data;return{amount:t.realBalance+t.manualBalance,currency:t.currency}};var qr=(e=>(e.ADDED="ADDED",e.REMOVED="REMOVED",e))(qr||{}),fe=(e=>(e.New="NEW",e.NotPaid="NOT_PAID",e.Pending="PENDING",e.Paid="PAID",e.Expired="EXPIRED",e.Cancelled="CANCELLED",e.Refunded="REFUNDED",e.Underpaid="UNDERPAID",e))(fe||{}),ru=(e=>(e.Balance="BALANCE",e.Product="PRODUCT",e))(ru||{}),xt=(e=>(e.Spend="SPEND_AMOUNT",e.Order="ORDER_COUNT",e.Referral="REFER_FRIEND",e.Review="LEAVE_REVIEW",e.Vouch="LEAVE_VOUCH",e))(xt||{});const Pf=async()=>(await c2()).data;/*! *****************************************************************************
|
|
1
|
+
"use strict";const g=require("./builder-DNkh9C7C.cjs"),i=require("react/jsx-runtime"),L=require("react"),N=require("./ui-components-BVI8UP6Y.cjs"),nl=require("./builder-components-BPLuh4_V.cjs");require("react-dom");const rl=require("./ticket-C30ck-ZN.cjs"),ul=require("./order-CGQ2_eCJ.cjs"),n2=require("./subscription-B_fwssFU.cjs");function r2(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const ge=r2(L);async function u2(e){const t=g.useApiStore.getState().apiUrls,n=g.IS_LOCAL_HOST?localStorage.getItem("fakeDomain"):window.location.hostname,r=`${t.storeApi}/shops/${n}/general`+(e?`?password=${e}`:"");return(await g.request({method:"get",url:r,withToken:!1})).data}const a2=async()=>{const e=g.useApiStore.getState().apiUrls,t=g.IS_LOCAL_HOST?localStorage.getItem("fakeDomain")||"flagship-theme.pages.dev":window.location.hostname,n=`${e.storeApi}/v2/shops/${t}/settings-theme`;return await g.request({url:n,withToken:!0,method:"get"})},s2=async e=>{const t=g.useApiStore.getState().apiUrls,n=g.IS_LOCAL_HOST?localStorage.getItem("fakeDomain"):window.location.hostname,r=`${t.slApi}/v1/balance/top-up/${n}`;return await g.request({url:r,method:"post",body:e,withToken:!1})},i2=async(e,t)=>{const r=`${g.useApiStore.getState().apiUrls.cashappApi}/v1/${t}/cashapp/link`;return await g.request({url:r,method:"post",body:e,withToken:!1})},Nr=async e=>{const t=g.useApiStore.getState().apiUrls;if(!localStorage.getItem("token"))throw new Error("No access token");const r=g.IS_LOCAL_HOST?localStorage.getItem("fakeDomain"):window.location.hostname,u=`${t.customersApi}/v2/${r}/customers/${e}`;return await g.request({url:u,withToken:!0,method:"get",typeToken:"customer"})},o2=()=>Nr("dash/info"),al=()=>Nr("dash/dashboard/home"),c2=()=>Nr("rewards"),l2=()=>Nr("balance"),d2=()=>Nr("balance/top-up/settings"),f2=()=>Nr("referral-system"),Ks=e=>{const t=g.useApiStore.getState().apiUrls,n=g.IS_LOCAL_HOST?localStorage.getItem("fakeDomain"):window.location.hostname,r=`${t.storeApi}/shops/${n}/${e}`;return g.request({url:r,withToken:!1,method:"get"})},h2=()=>Ks("terms"),p2=()=>Ks("refund-policy"),m2=()=>Ks("privacy-policy"),Yu=10,sa=async({url:e,PageNumber:t})=>{var o;const n=g.useApiStore.getState().apiUrls,r=g.IS_LOCAL_HOST?localStorage.getItem("fakeDomain"):window.location.hostname,u=`${n.customersApi}/v2/${r}/${e}?PageNumber=${t}&PageSize=${Yu}`,a=await g.request({url:u,withToken:!0,method:"get",typeToken:"customer"}),s=Number((o=a.headers)==null?void 0:o["x-pagination-total"]);return{list:a.data,totalCount:s}},ia=async(e,t="get",n)=>{const r=g.useApiStore.getState().apiUrls,u=g.IS_LOCAL_HOST?localStorage.getItem("fakeDomain"):window.location.hostname,a=`${r.slApi}/v1/orders/${u}/${e}`;return await g.request({url:a,method:t,withToken:!0,body:n,typeToken:"customer"})},g2=e=>ia("","post",e),b2=({PageNumber:e})=>sa({url:"customers/orders",PageNumber:e}),_2=e=>ia(e),x2=e=>ia(e),C2=(e,t,n)=>{const r=g.useApiStore.getState().apiUrls,u=g.IS_LOCAL_HOST?localStorage.getItem("fakeDomain"):window.location.hostname,a=`${r.slApi}/v2/orders/${u}/${e}/${t}/replacement-requests`;return g.request({url:a,method:"post",withToken:!0,body:n,typeToken:"customer"})},E2=async e=>{const t=g.useApiStore.getState().apiUrls,n=g.IS_LOCAL_HOST?localStorage.getItem("fakeDomain"):window.location.hostname,r=`${t.slApi}/v1/public/${n}/images`,u=new FormData;return u.append("file",e),g.request({url:r,method:"post",withToken:!1,body:u})},y2=(e,t,n)=>ia(`${e}/${t}/replacement-requests/${n}/cancel`,"post"),T2=async e=>{const t=g.useApiStore.getState().apiUrls,n=g.IS_LOCAL_HOST?localStorage.getItem("fakeDomain"):window.location.hostname,r=`${t.slApi}/v1/${n}/subscriptions`;return await g.request({url:r,method:"post",withToken:!1,body:e})},k2=async(e,t)=>{const n=g.useApiStore.getState().apiUrls,r=g.IS_LOCAL_HOST?localStorage.getItem("fakeDomain"):window.location.hostname,u=`${n.slApi}/v2/${r}/subscriptions/${e}/${t}`;return await g.request({url:u,method:"get",withToken:!1})},A2=async(e,t)=>{const n=g.useApiStore.getState().apiUrls,r=g.IS_LOCAL_HOST?localStorage.getItem("fakeDomain"):window.location.hostname,u=`${n.slApi}/v1/${r}/subscriptions/${e}/${t}/upgrades`;return await g.request({url:u,method:"get",withToken:!1})},S2=async(e,t,n)=>{const r=g.useApiStore.getState().apiUrls,u=g.IS_LOCAL_HOST?localStorage.getItem("fakeDomain"):window.location.hostname,a=`${r.slApi}/v1/${u}/subscriptions/${e}/${t}/cancel`;return await g.request({url:a,method:"post",withToken:!1,body:n})},I2=async(e,t)=>{const n=g.useApiStore.getState().apiUrls,r=g.IS_LOCAL_HOST?localStorage.getItem("fakeDomain"):window.location.hostname,u=`${n.slApi}/v2/${r}/subscriptions/${e}/change-gateway`;return await g.request({url:u,method:"post",withToken:!1,body:{gateway:t}})},N2=({PageNumber:e})=>sa({url:"customers/subscriptions",PageNumber:e}),v2=async({id:e,accessToken:t})=>await A2(e,t),w2=async(e,t)=>{const n=g.useApiStore.getState().apiUrls,r=g.IS_LOCAL_HOST?localStorage.getItem("fakeDomain"):window.location.hostname,u=`${n.slApi}/v2/${r}/subscriptions/${e}/order`;return await g.request({url:u,method:"post",withToken:!1,body:t})},D2=async(e,t)=>{const n=g.useApiStore.getState().apiUrls,r=g.IS_LOCAL_HOST?localStorage.getItem("fakeDomain"):window.location.hostname,u=`${n.slApi}/v1/public/${r}/tickets/${e}/${t}`;return await g.request({url:u,method:"get",withToken:!1})},L2=async(e,t,n,r,u,a)=>{const s=g.useApiStore.getState().apiUrls,o=g.IS_LOCAL_HOST?localStorage.getItem("fakeDomain"):window.location.hostname,c=`${s.slApi}/v1/public/${o}/tickets/${e}/${t}/answer`;return(await g.request({url:c,method:"post",body:{message:n,recaptcha:r,tsId:u,...a&&a.length>0&&{imageIds:a.map(h=>h.imageId)}},withToken:!1})).data},P2=({PageNumber:e})=>sa({url:"customers/tickets",PageNumber:e}),R2=({PageNumber:e})=>sa({url:"customers/balance/transactions",PageNumber:e}),M2=async(e,t,n)=>{const r=g.useApiStore.getState().apiUrls,u=g.IS_LOCAL_HOST?localStorage.getItem("fakeDomain"):window.location.hostname,a=`${r.slApi}/v1/reviews/${u}/${t}/${n}`;return await g.request({url:a,method:"post",withToken:!1,body:e})},O2=async e=>{const t=g.useApiStore.getState().apiUrls,n=g.IS_LOCAL_HOST?localStorage.getItem("fakeDomain"):window.location.hostname,r=`${t.slApi}/v1/charges/${n}/${e}`;return await g.request({url:r,method:"get",withToken:!1})},j2=async e=>{const t=g.useApiStore.getState().apiUrls,n=e.map(s=>["names",s]),r=new URLSearchParams(n),u=g.IS_LOCAL_HOST?localStorage.getItem("fakeDomain"):window.location.hostname,a=`${t.slApi}/v2/gateways?shopDomain=${u}&${r.toString()}`;return await g.request({url:a,method:"get",withToken:!1})},Au=new Map,sl=async e=>{const t=g.useApiStore.getState().apiUrls,r=Array.from(new Set(e)).sort().map(l=>["names",l]),u=new URLSearchParams(r),a=g.IS_LOCAL_HOST?localStorage.getItem("fakeDomain"):window.location.hostname,s=`${t.slApi}/v2/checkout?shopDomain=${a}&${u.toString()}`,o=`${s}`;if(Au.has(o))return Au.get(o);const c=g.request({url:s,method:"get",withToken:!1}).catch(l=>{throw Au.delete(o),l});return Au.set(o,c),c},il=async({email:e,recaptcha:t,tsId:n})=>{const r=g.useApiStore.getState().apiUrls,u=g.IS_LOCAL_HOST?localStorage.getItem("fakeDomain"):window.location.hostname,a=`${r.customersApi}/v2/${u}/auth/otp/request`;return(await g.request({url:a,body:{email:e,recaptcha:t,tsId:n},method:"post",withToken:!1})).data?{requested:!0,email:e}:{requested:!1,email:void 0}},ol=async({email:e,otp:t,recaptcha:n,tsId:r})=>{const u=g.useApiStore.getState().apiUrls,a=g.IS_LOCAL_HOST?localStorage.getItem("fakeDomain"):window.location.hostname,s=`${u.customersApi}/v2/${a}/auth/otp/login`,{data:o}=await g.request({url:s,method:"post",body:{email:e,otp:t,recaptcha:n,tsId:r},withToken:!1});return g.useStorefrontStore.getState().setToken(o.data),localStorage.setItem("token",o.data),{token:o.data,requested:!1}},ys=async()=>{g.useStorefrontStore.getState().setToken(""),g.useCustomerDashboardStore.getState().setDashInfo(null),localStorage.removeItem("token")},F2=Object.freeze(Object.defineProperty({__proto__:null,loginCustomer:ol,logoutCustomer:ys,requestOtp:il},Symbol.toStringTag,{value:"Module"})),B2=async e=>{const t=g.useApiStore.getState().apiUrls,n=g.IS_LOCAL_HOST?localStorage.getItem("fakeDomain"):window.location.hostname,r=`${t.slApi}/v2/coupons/${n}/validate`;return await g.request({url:r,method:"post",body:e,withToken:!1})},H2=async e=>{const t=g.useApiStore.getState().apiUrls,n=g.IS_LOCAL_HOST?localStorage.getItem("fakeDomain"):window.location.hostname,r=`${t.customersApi}/v2/${n}/customers/referral-system/signup`;return(await g.request({url:r,withToken:!0,method:"post",body:e,typeToken:"customer"})).data},U2=async()=>{const{data:e}=await f2();return e},V2=async e=>{const{data:t}=await H2(e);return t},$2=async e=>{const t=g.useApiStore.getState().apiUrls,n=g.IS_LOCAL_HOST?localStorage.getItem("fakeDomain"):window.location.hostname,r=`${t.slApi}/v1/discord/${n}`;return await g.request({url:r,method:"post",body:e,withToken:!1})},z2=async e=>{const t=g.useApiStore.getState().apiUrls,n=g.IS_LOCAL_HOST?localStorage.getItem("fakeDomain"):window.location.hostname,r=`${t.slApi}/v1/discord/${n}/${e.id}?customerEmail=${e.customerEmail}`;return await g.request({url:r,method:"get",withToken:!1})};async function q2(e){const t=g.useApiStore.getState().apiUrls,n=g.IS_LOCAL_HOST?localStorage.getItem("fakeDomain"):window.location.hostname,r=`${t.customersApi}/v2/${n}/customers/rewards/${e.id}/claim`;return g.request({url:r,method:"post",withToken:!0,typeToken:"customer"})}const Z2=async(e,t,n,r)=>{const a=`${g.useApiStore.getState().apiUrls.slApi}/v1/vouches/${t}/${n}/${r}`;return await g.request({url:a,method:"post",withToken:!1,body:e})},cl=()=>g.IS_LOCAL_HOST?localStorage.getItem("fakeDomain"):window.location.hostname,W2=async()=>{const e=g.useApiStore.getState().apiUrls,t=cl(),n=`${e.customersApi}/v2/${t}/api-key`;return g.request({url:n,method:"get",withToken:!0,typeToken:"customer"})},Y2=async()=>{const e=g.useApiStore.getState().apiUrls,t=cl(),n=`${e.customersApi}/v2/${t}/api-key/regenerate`;return g.request({url:n,method:"post",withToken:!0,typeToken:"customer"})},G2=()=>typeof document<"u"?document.documentElement.hasAttribute("translated")||document.documentElement.querySelector(".translated-ltr, .translated-rtl")!==null||document.head.querySelector('meta[name="_translator"]')!==null:!1,ll=({children:e,className:t,as:n="span",...r})=>{const[u,a]=L.useState(!1);return L.useEffect(()=>{typeof window<"u"&&a(G2())},[]),u?i.jsx(n,{className:t,...r,"data-stable-text":e,dangerouslySetInnerHTML:{__html:""}}):i.jsx(n,{className:t,...r,children:e})},X2="_statItem_fzeec_1",K2="_content_fzeec_44",Q2="_withChildren_fzeec_50",J2="_info_fzeec_56",ef="_iconWrapper_fzeec_68",tf="_text_fzeec_78",nf="_title_fzeec_84",rf="_value_fzeec_88",uf="_emptyImage_fzeec_94",af="_image_fzeec_11",sf="_imageTitle_fzeec_112",of="_emptyImageText_fzeec_122",cf="_hoverable_fzeec_147",rt={statItem:X2,content:K2,withChildren:Q2,info:J2,iconWrapper:ef,text:tf,title:nf,value:rf,emptyImage:uf,image:af,imageTitle:sf,emptyImageText:of,hoverable:cf},wt=({iconName:e,title:t,value:n,image:r,imageName:u,children:a,className:s,logo:o,customLogo:c,productSlug:l})=>{const h=g.useNavigate();return i.jsxs("div",{className:`${rt.statItem} ${s}`,children:[r&&r!=="empty"&&i.jsxs("div",{style:{position:"relative"},onClick:()=>{l&&h(`/${l}`)},children:[i.jsx("div",{style:{background:"#000000"},children:i.jsx("img",{src:r,alt:u,className:g.clx(rt.image,rt.emptyImage,{[rt.hoverable]:l})})}),i.jsx("div",{className:rt.emptyImageText,children:i.jsx("div",{className:g.clx(rt.title,rt.imageTitle),id:"h5",children:u})})]}),r==="empty"&&i.jsx("div",{style:{background:"#000000"},children:i.jsxs("div",{className:g.clx(rt.emptyImage,{[rt.hoverable]:l}),onClick:()=>{l&&h(`/${l}`)},children:[i.jsx(N.Icon,{name:"Image",width:64,height:64,fill:"var(--text-secondary)"}),i.jsx("div",{className:rt.emptyImageText,children:i.jsx("div",{className:rt.title,id:"h5",children:u||"No Product"})})]})}),i.jsxs("div",{className:`${rt.content} ${a?rt.withChildren:""}`,children:[i.jsxs("div",{className:rt.info,children:[c?i.jsx("div",{style:{color:"var(--text-action)"},children:c}):o?i.jsx("div",{className:rt.iconWrapper,children:i.jsx("img",{src:o,width:28,height:28,style:{objectFit:"contain"}})}):i.jsx(N.Icon,{name:e||"File",className:rt.iconWrapper,width:28,height:28,fill:"var(--text-action)"}),i.jsxs("div",{className:rt.text,children:[i.jsx("div",{className:rt.title,id:"h5",children:t}),i.jsx("div",{className:rt.value,id:"h5-bold",children:n})]})]}),a]})]})},lf="_card_8m277_2",df="_mobile_8m277_15",ff="_email_8m277_19",hf="_balance_8m277_25",pf="_sidebar_8m277_32",mf="_sidebarAntistock_8m277_33",gf="_navList_8m277_68",bf="_navListAntistock_8m277_86",_f="_navItem_8m277_91",xf="_antistockNavItem_8m277_92",Cf="_activeNavItem_8m277_116",Ef="_antistockActiveNavItem_8m277_121",yf="_antistockInactiveNavItem_8m277_139",Tf="_inactiveNavItem_8m277_140",kf="_logoutNavItem_8m277_150",Af="_logoutNavItemAntistock_8m277_159",Sf="_logoutNavItemContentAntistock_8m277_173",If="_iconWrapper_8m277_185",Nf="_skeleton_8m277_190",Ze={card:lf,mobile:df,email:ff,balance:hf,sidebar:pf,sidebarAntistock:mf,navList:gf,navListAntistock:bf,navItem:_f,antistockNavItem:xf,activeNavItem:Cf,antistockActiveNavItem:Ef,antistockInactiveNavItem:yf,inactiveNavItem:Tf,logoutNavItem:kf,logoutNavItemAntistock:Af,logoutNavItemContentAntistock:Sf,iconWrapper:If,skeleton:Nf},vf=({email:e,balance:t,adaptiveStyles:n})=>i.jsxs("div",{className:g.clx(Ze.card,{[Ze.mobile]:n!=="desktop"}),children:[i.jsx("div",{className:Ze.email,id:"h5",children:e}),i.jsxs("div",{className:Ze.balance,id:"md",children:["Balance: ",t]})]}),wf=()=>typeof g.Routes>"u"||!g.Routes.Home?(console.warn("Routes not available"),[]):[[g.Routes.Home,"House"],[g.Routes.Orders,"CurrencyCircleDollar"],[g.Routes.Rewards,"Medal"],[g.Routes.Balance,"Wallet"],[g.Routes.Subscriptions,"CalendarCheck"],[g.Routes.Tickets,"Question"],[g.Routes.Api,"Code"]],Df=()=>typeof g.AntistockRoutes>"u"||!g.AntistockRoutes.Home?(console.warn("AntistockRoutes not available"),[]):[[g.AntistockRoutes.Home,"House"],[g.AntistockRoutes.Orders,"CurrencyCircleDollar"],[g.AntistockRoutes.Rewards,"Medal"],[g.AntistockRoutes.Balance,"Wallet"],[g.AntistockRoutes.Tickets,"Question"],[g.AntistockRoutes.Api,"Code"]],Wi=({children:e,className:t="",onClick:n})=>{const{isAntistock:r}=g.useGeneralStore();return i.jsx("button",{type:"button",className:g.clx(r?Ze.antistockNavItem:Ze.navItem,t),onClick:n,children:e})},Lf=({adaptiveStyles:e})=>{const{route:t,setRoute:n,dashboardSettings:r}=g.useCustomerDashboardStore(),{resetPage:u}=g.usePaginationPagesStore(),{isAntistock:a}=g.useGeneralStore(),s=L.useMemo(()=>{if(a){const l=Df();return r!=null&&r.isApiPageEnabled?l:l.filter(([h])=>h!==g.AntistockRoutes.Api)}const c=wf();return r!=null&&r.isApiPageEnabled?c:c.filter(([l])=>l!==g.Routes.Api)},[a,r]),o=c=>{t!==c&&u(),n(c)};return i.jsxs("div",{className:g.clx(Ze.navList,{[Ze.mobile]:e!=="desktop",[Ze.navListAntistock]:a}),children:[s.map(([c,l])=>{const h=c===t;return i.jsxs(Wi,{onClick:()=>o(c),className:g.clx(h?a?Ze.antistockActiveNavItem:Ze.activeNavItem:a?Ze.antistockInactiveNavItem:Ze.inactiveNavItem),children:[a?null:i.jsx("div",{className:Ze.iconWrapper,children:i.jsx(N.Icon,{name:l})}),i.jsx("div",{children:c})]},c)}),i.jsx(Wi,{className:g.clx(Ze.logoutNavItem,{[Ze.logoutNavItemAntistock]:a}),onClick:()=>{a||ys()},children:a?i.jsxs("div",{className:g.clx({[Ze.logoutNavItemContentAntistock]:a}),onClick:()=>{ys()},children:[i.jsx("div",{className:Ze.iconWrapper,children:i.jsx(N.Icon,{name:"SignOut"})}),i.jsx("div",{children:"Sign Out"})]}):i.jsxs(i.Fragment,{children:[i.jsx("div",{className:Ze.iconWrapper,children:i.jsx(N.Icon,{name:"SignOut"})}),i.jsx("div",{children:"Sign Out"})]})})]})};var _e=(e=>(e.New="NEW",e.Pending="PENDING",e.Processing="PROCESSING",e.Completed="COMPLETED",e.Cancelled="CANCELLED",e.Expired="EXPIRED",e.FullDeliveryFailure="FULL_DELIVERY_FAILURE",e.PartiallyDelivered="PARTIALLY_DELIVERED",e.PartiallyRefunded="PARTIALLY_REFUNDED",e.Refunded="REFUNDED",e.Failed="FAILED",e))(_e||{}),pe=(e=>(e.PENDING="PENDING",e.APPROVED="APPROVED",e.DECLINED="DECLINED",e.AUTO_APPROVED="AUTO_APPROVED",e.CANCELLED="CANCELLED",e.EXPIRED="EXPIRED",e.PROCESSING="PROCESSING",e.COMPLETED="COMPLETED",e.FAILED="FAILED",e))(pe||{}),Pe=(e=>(e.Text="TEXT",e.Serial="SERIALS",e.Ebook="EBOOK",e.Link="LINK",e.Download="DOWNLOAD",e.Discord="DISCORD",e.Telegram="TELEGRAM",e.Custom="CUSTOM",e))(Pe||{}),kn=(e=>(e.RIAL="RIAL",e.AWAITING_PAYMENT="AWAITING_PAYMENT",e.ACTIVE="ACTIVE",e.PAST_DUE="PAST_DUE",e.CANCELLED="CANCELLED",e.EXPIRED="EXPIRED",e.CHANGED_GATEWAY="CHANGED_GATEWAY",e.REPLACED="REPLACED",e))(kn||{});const fu=async e=>(await j2(e)).data,dl=async()=>{var n;const t=(await d2()).data;if(t.isEnabled){const r=(n=t==null?void 0:t.topUpSettings)==null?void 0:n.gateways;r&&fu(r)}return t},oa=async()=>{const t=(await l2()).data;return{amount:t.realBalance+t.manualBalance,currency:t.currency}};var qr=(e=>(e.ADDED="ADDED",e.REMOVED="REMOVED",e))(qr||{}),fe=(e=>(e.New="NEW",e.NotPaid="NOT_PAID",e.Pending="PENDING",e.Paid="PAID",e.Expired="EXPIRED",e.Cancelled="CANCELLED",e.Refunded="REFUNDED",e.Underpaid="UNDERPAID",e))(fe||{}),ru=(e=>(e.Balance="BALANCE",e.Product="PRODUCT",e))(ru||{}),xt=(e=>(e.Spend="SPEND_AMOUNT",e.Order="ORDER_COUNT",e.Referral="REFER_FRIEND",e.Review="LEAVE_REVIEW",e.Vouch="LEAVE_VOUCH",e))(xt||{});const Pf=async()=>(await c2()).data;/*! *****************************************************************************
|
|
2
2
|
Copyright (c) Microsoft Corporation. All rights reserved.
|
|
3
3
|
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
|
|
4
4
|
this file except in compliance with the License. You may obtain a copy of the
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { j as Be, K as We, r as He, M as qt, N as Zt, p as hn, f as J, O as La, y as Re, Q as Pt, U as dt, V as Ye, W as br, e as vt, J as Je, X as kt, v as we, b as x2, u as A2, a as ks, Y as I2, Z as _n, _ as xs, $ as As, a0 as S2, a1 as N2, a2 as vu, a3 as Wi, a4 as v2, a5 as No, a6 as Fl, a7 as Is, a8 as Pa, a9 as w2 } from "./builder-
|
|
1
|
+
import { j as Be, K as We, r as He, M as qt, N as Zt, p as hn, f as J, O as La, y as Re, Q as Pt, U as dt, V as Ye, W as br, e as vt, J as Je, X as kt, v as we, b as x2, u as A2, a as ks, Y as I2, Z as _n, _ as xs, $ as As, a0 as S2, a1 as N2, a2 as vu, a3 as Wi, a4 as v2, a5 as No, a6 as Fl, a7 as Is, a8 as Pa, a9 as w2 } from "./builder-Bzjt7KtK.js";
|
|
2
2
|
import { jsx as o, jsxs as b, Fragment as ze } from "react/jsx-runtime";
|
|
3
3
|
import * as _e from "react";
|
|
4
4
|
import $, { createElement as lt, isValidElement as D2, useEffect as yn, forwardRef as Bl, Component as L2, useState as Ee, useRef as er, useMemo as Qn } from "react";
|
|
5
|
-
import { I as H, e as _t, f as Tn, g as ee, h as Ea, M as Bt, W as P2, i as Ss, j as Hl, k as Ul, l as Hu, m as ma, R as R2 } from "./ui-components-
|
|
6
|
-
import { F as Vl } from "./builder-components-
|
|
5
|
+
import { I as H, e as _t, f as Tn, g as ee, h as Ea, M as Bt, W as P2, i as Ss, j as Hl, k as Ul, l as Hu, m as ma, R as R2 } from "./ui-components-Blu-gh32.js";
|
|
6
|
+
import { F as Vl } from "./builder-components-BT94OMxj.js";
|
|
7
7
|
import "react-dom";
|
|
8
|
-
import { T as $l } from "./ticket-
|
|
9
|
-
import { O as zl } from "./order-
|
|
10
|
-
import { S as M2 } from "./subscription-
|
|
8
|
+
import { T as $l } from "./ticket-Bj-AhEbz.js";
|
|
9
|
+
import { O as zl } from "./order-D7jXnkto.js";
|
|
10
|
+
import { S as M2 } from "./subscription-B2aLt7q1.js";
|
|
11
11
|
async function uR(e) {
|
|
12
12
|
const t = Be.getState().apiUrls, n = We ? localStorage.getItem("fakeDomain") : window.location.hostname, r = `${t.storeApi}/shops/${n}/general` + (e ? `?password=${e}` : "");
|
|
13
13
|
return (await He({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),n=require("./charge-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),n=require("./charge-C2aoqar4.cjs"),u=require("./builder-DNkh9C7C.cjs"),l=require("react"),_=require("./ui-components-BVI8UP6Y.cjs");require("./builder-components-BPLuh4_V.cjs");require("react-dom");require("./ticket-C30ck-ZN.cjs");const b="_checkoutContainer_thje1_1",S="_loaderContainer_thje1_20",s={checkoutContainer:b,loaderContainer:S},D=()=>{const{isAntistock:r}=u.useGeneralStore(),{cart:t,products:c,pending:d,getTotalAndDiscount:C,getPossibleGateways:h,submitCart:p,setGateway:m,applyCoupon:g,setDiscordSocialConnectId:j,setCustomFields:k,applyCouponPending:y,coupon:i,removeCoupon:q,getDiscordSettings:v,setPaymentMethod:x,reset:f}=n.useCart(),a=l.useMemo(()=>C(),[i,t]),o=u.useNavigate();return l.useEffect(()=>{if(t.parts.length===0){if(r){o("/");return}try{o(-1)}catch{o("/")}}},[t.parts]),d?e.jsx("div",{className:s.checkoutContainer,children:e.jsx("div",{className:s.loaderContainer,children:e.jsx(_.Loader,{})})}):e.jsxs("div",{className:s.checkoutContainer,children:[e.jsx(n.CheckoutItems,{cart:t,products:c,applyCoupon:g,applyCouponPending:y,coupon:i,removeCoupon:q,totalAndDiscount:a}),e.jsx(n.CheckoutOperational,{cart:t,getPossibleGateways:h,setGateway:m,getDiscordSettings:v,products:c,submitCart:p,totalAndDiscount:a,setCustomFieldsToCart:k,setDiscordSocialConnectId:j,setPaymentMethod:x,reset:f,isAntistock:r})]})};exports.Checkout=D;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { jsx as e, jsxs as j } from "react/jsx-runtime";
|
|
2
|
-
import { u as D, C as N, a as x } from "./charge-
|
|
3
|
-
import { y as A, p as G } from "./builder-
|
|
2
|
+
import { u as D, C as N, a as x } from "./charge-IRYuGcrW.js";
|
|
3
|
+
import { y as A, p as G } from "./builder-Bzjt7KtK.js";
|
|
4
4
|
import c from "react";
|
|
5
|
-
import { e as P } from "./ui-components-
|
|
6
|
-
import "./builder-components-
|
|
5
|
+
import { e as P } from "./ui-components-Blu-gh32.js";
|
|
6
|
+
import "./builder-components-BT94OMxj.js";
|
|
7
7
|
import "react-dom";
|
|
8
|
-
import "./ticket-
|
|
8
|
+
import "./ticket-Bj-AhEbz.js";
|
|
9
9
|
const S = "_checkoutContainer_thje1_1", b = "_loaderContainer_thje1_20", s = {
|
|
10
10
|
checkoutContainer: S,
|
|
11
11
|
loaderContainer: b
|
package/dist/exports.cjs.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("react/jsx-runtime");require("react");const o=require("./builder-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("react/jsx-runtime");require("react");const o=require("./builder-DNkh9C7C.cjs"),a=require("./ui-components-BVI8UP6Y.cjs"),t=require("./charge-C2aoqar4.cjs");require("./builder-components-BPLuh4_V.cjs");const e=require("./ticket-C30ck-ZN.cjs"),r=require("./checkout-DVDZUjSQ.cjs");require("react-dom");exports.AntistockRoutes=o.AntistockRoutes;exports.Routes=o.Routes;exports.formatPrice=o.formatPrice;exports.ImagesLoader=a.ImagesLoader;exports.MarkdownText=t.MarkdownText;exports.ReCaptchaProvider=t.ReCaptchaProvider;exports.parseDraftJsText=t.parseDraftJsText;exports.useCart=t.useCart;exports.useGeneralInfo=t.useGeneralInfo;exports.useMarkdownIt=t.useMarkdownIt;exports.useReCaptcha=t.useReCaptcha;exports.ColorVariables=e.ColorVariables;exports.aspectRatioOptions=e.aspectRatioOptions;exports.hotReload=e.hotReload;exports.iconNames=e.iconNames;exports.removeNotification=e.removeNotification;exports.showNotification=e.showNotification;exports.splitTextIntoSpans=e.splitTextIntoSpans;exports.useAdaptiveStyles=e.useAdaptiveStyles;exports.useBalance=e.useBalance;exports.useBuilderPages=e.useBuilderPages;exports.useCreateTicket=e.useCreateTicket;exports.Checkout=r.Checkout;
|
package/dist/exports.es.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import "react/jsx-runtime";
|
|
2
2
|
import "react";
|
|
3
|
-
import { Q as i, U as p, V as u } from "./builder-
|
|
4
|
-
import { k as c } from "./ui-components-
|
|
5
|
-
import { M as f, G as d, J as l, u as x, I as C, K as h, H as k } from "./charge-
|
|
6
|
-
import "./builder-components-
|
|
7
|
-
import { C as I, c as T, h as v, i as w, r as M, d as N, s as P, u as b, e as g, b as A, a as B } from "./ticket-
|
|
8
|
-
import { Checkout as J } from "./checkout-
|
|
3
|
+
import { Q as i, U as p, V as u } from "./builder-Bzjt7KtK.js";
|
|
4
|
+
import { k as c } from "./ui-components-Blu-gh32.js";
|
|
5
|
+
import { M as f, G as d, J as l, u as x, I as C, K as h, H as k } from "./charge-IRYuGcrW.js";
|
|
6
|
+
import "./builder-components-BT94OMxj.js";
|
|
7
|
+
import { C as I, c as T, h as v, i as w, r as M, d as N, s as P, u as b, e as g, b as A, a as B } from "./ticket-Bj-AhEbz.js";
|
|
8
|
+
import { Checkout as J } from "./checkout-HR4DQ03v.js";
|
|
9
9
|
import "react-dom";
|
|
10
10
|
export {
|
|
11
11
|
i as AntistockRoutes,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),c=require("./builder-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),c=require("./builder-DNkh9C7C.cjs"),n=require("./charge-C2aoqar4.cjs"),l="_wrapper_x27n6_1",m="_content_x27n6_10",x="_title_x27n6_18",d="_text_x27n6_24",p="_empty_x27n6_42",r={wrapper:l,content:m,title:x,text:d,empty:p},_=()=>{const{shopTerms:t}=c.useStorefrontStore(),{isAntistock:o}=c.useGeneralStore(),a=!!(t!=null&&t.termsOfService&&t.termsOfService.length>0);return e.jsx("div",{className:r.wrapper,children:e.jsxs("div",{className:r.content,children:[e.jsx("h1",{className:r.title,children:"Terms of Service"}),a?o?e.jsx("div",{className:r.text,children:e.jsx(n.MarkdownText,{text:t.termsOfService})}):e.jsx(n.Markdown,{remarkPlugins:[n.remarkGfm],rehypePlugins:[n.rehypeRaw],className:r.text,components:{a:({node:i,...s})=>e.jsx("a",{...s,target:"_blank",rel:"noopener noreferrer",id:"md"}),p:({node:i,...s})=>e.jsx("p",{...s,id:"md"})},children:t==null?void 0:t.termsOfService}):e.jsx("p",{className:r.empty,children:"No terms of service."})]})})};exports.TermsPage=_;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime");require("./builder-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime");require("./builder-DNkh9C7C.cjs");const r=require("react"),t=require("./ui-components-BVI8UP6Y.cjs");require("./charge-C2aoqar4.cjs");require("./builder-components-BPLuh4_V.cjs");require("react-dom");require("./ticket-C30ck-ZN.cjs");const i=()=>(r.useEffect(()=>{setTimeout(()=>{window.location.reload()},500)},[]),e.jsx("div",{style:{width:"100%",height:"100%",display:"flex",justifyContent:"center",alignItems:"center"},children:e.jsx(t.Loader,{})}));exports.RouterErrorPage=i;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as n, Fragment as m } from "react/jsx-runtime";
|
|
2
|
-
import { ab as d, o as l, m as b, i as u, q as t, z as s } from "./builder-
|
|
2
|
+
import { ab as d, o as l, m as b, i as u, q as t, z as s } from "./builder-Bzjt7KtK.js";
|
|
3
3
|
import k from "react";
|
|
4
4
|
const B = (i) => {
|
|
5
5
|
const { children: c } = i, { pathname: r } = d(), { setActiveBlock: e } = l(), { setActiveBlock: a } = b(), { setActiveBlock: o } = u();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react/jsx-runtime"),i=require("react"),P=require("./charge-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react/jsx-runtime"),i=require("react"),P=require("./charge-C2aoqar4.cjs"),t=require("./builder-DNkh9C7C.cjs"),J=require("./ticket-C30ck-ZN.cjs"),g=require("./ui-components-BVI8UP6Y.cjs");require("./builder-components-BPLuh4_V.cjs");require("react-dom");const _="_notifications_1ntnm_1",F="_wrapper_1ntnm_12",j={notifications:_,wrapper:F},z=()=>(i.useEffect(()=>{document.title="Temporarily Unavailable"},[]),s.jsx("div",{style:{display:"flex",flexDirection:"column",width:"100vw",height:"100vh",overflowY:"scroll",overflowX:"hidden",background:"var(--surface-primary)",color:"var(--text-primary)"},children:s.jsxs("div",{style:{display:"flex",flexDirection:"column",flex:"1",justifyContent:"center",alignItems:"center",gap:"24px"},children:[s.jsx("h2",{style:{color:"var(--text-primary)",fontSize:"var(--font-heading-h2-size)"},children:"Temporarily Unavailable"}),s.jsx("span",{style:{color:"var(--text-secondary)",fontSize:"var(--font-heading-h3-size)",width:"85%",textAlign:"center"},children:"We're making some quick updates to improve your shopping experience. During this time, browsing and checkout are temporarily unavailable."})]})}));function R(){const c=new URLSearchParams(document.location.search),n=c.get("customerAccessToken"),{setToken:d}=t.useStorefrontStore.getState(),{setDashInfo:u}=t.useCustomerDashboardStore.getState();n&&(c.delete("customerAccessToken"),localStorage.setItem("token",n),d(n),u(null))}const U=({children:c})=>{const n=t.useLocation(),{token:d,setToken:u}=t.useStorefrontStore(),{dashInfo:S,setDashInfo:y}=t.useCustomerDashboardStore(),{shopPassword:f}=t.useStorefrontStore(),v=t.useNavigate(),[l,b]=t.useSearchParams(),{notifications:x}=t.useNotificationStore(),[T,h]=i.useState(!0),{setCustomerEmail:I}=t.useCartStore(),{setThemeSettings:w,themeSettings:N}=t.useThemeSettingsStore(),{settings:C,setSettings:k}=t.useSettingsStore(),{setHeader:D,setFooter:q,setAnnouncement:A}=t.useLayersStore(),{general:o,setGeneral:E,isAntistock:p}=t.useGeneralStore(),{pageContext:L,setPageContext:O}=t.usePagesStore();t.useTrackingAnalytics((o==null?void 0:o.info.id)||localStorage.getItem("shopId")||null,"production",p);const W=async()=>{const e=await J.getDynamicPage(encodeURIComponent("/products"),o==null?void 0:o.info.passwordProtected);if(e){const{data:a}=e;O({...L,listings:a.listings})}};return i.useEffect(()=>{R()},[]),i.useEffect(()=>{const e=localStorage.getItem("token");if(e&&(!d||!S))try{const a=t.jwtDecode(e);y(a),u(e),I(a.email)}catch(a){console.error("Failed to decode token:",a),localStorage.removeItem("token"),u(""),y(null)}},[d,S]),i.useEffect(()=>{const e=l.get("r");e&&(localStorage.setItem("referralCode",e),l.delete("r"),b(l),v({pathname:n.pathname,search:l.toString()},{replace:!0}))},[l,n]),i.useEffect(()=>{!n.pathname.startsWith("/products")&&!n.pathname.startsWith("/admin/builder")&&o&&(o.info.passwordProtected&&f||o.isPasswordValid)&&W()},[o,f]),i.useLayoutEffect(()=>{const e=async()=>{if(h(!0),!o){const r=await P.fetchGeneral(f);if(!r.isPasswordValid&&!n.pathname.includes("/admin/builder")){v("/validation",{state:{from:n.pathname}});return}if(!r.info.passwordProtected){localStorage.removeItem("shopPassword");const{setShopPassword:m}=t.useStorefrontStore.getState();m("")}E(r)}},a=async()=>{h(!0);const{settings:r,theme:m}=(await P.fetchThemeAndSettings()).data;r?(r.settings&&k(r.settings),r.header&&D(JSON.parse(JSON.stringify(r.header))),r.footer&&q(JSON.parse(JSON.stringify(r.footer))),r.announcement&&A(JSON.parse(JSON.stringify(r.announcement)))):k(C),w(m||N),h(!1)};n.pathname.startsWith("/validation")||e(),a()},[]),p&&(o!=null&&o.info.onHold)?s.jsx(z,{}):n.pathname.startsWith("/admin/builder")?s.jsx(s.Fragment,{children:c}):s.jsx(s.Fragment,{children:T?s.jsx("div",{className:j.wrapper,children:s.jsx(g.Loader,{})}):s.jsxs(s.Fragment,{children:[c,x.length>0&&s.jsx("div",{className:j.notifications,children:x.map(e=>s.jsx(g.NotificationBuilder,{type:e.status,message:e.message,timer:e.timer||10,id:e.id,element:p?g.NotificationAntistock:e.component,label:e.label},e.id))})]})})};exports.WrapperPage=U;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as t, jsxs as c } from "react/jsx-runtime";
|
|
2
|
-
import { M as i, y as m } from "./builder-
|
|
3
|
-
import { a3 as l, a4 as p, a5 as d, M as _ } from "./charge-
|
|
2
|
+
import { M as i, y as m } from "./builder-Bzjt7KtK.js";
|
|
3
|
+
import { a3 as l, a4 as p, a5 as d, M as _ } from "./charge-IRYuGcrW.js";
|
|
4
4
|
const x = "_wrapper_x27n6_1", f = "_content_x27n6_10", v = "_title_x27n6_18", h = "_text_x27n6_24", y = "_empty_x27n6_42", r = {
|
|
5
5
|
wrapper: x,
|
|
6
6
|
content: f,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),i=require("./ui-components-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),i=require("./ui-components-BVI8UP6Y.cjs");require("react");const n=require("./builder-DNkh9C7C.cjs");require("./charge-C2aoqar4.cjs");require("./builder-components-BPLuh4_V.cjs");require("react-dom");require("./ticket-C30ck-ZN.cjs");const s="_wrapper_ej209_1",c="_content_ej209_12",a="_title_ej209_22",r={wrapper:s,content:c,title:a},l=()=>{const o=n.useNavigate(),t=n.useRouteError();return console.error("ROUTE ERROR: ",t),alert(t),e.jsx("div",{className:r.wrapper,children:e.jsxs("div",{className:r.content,children:[e.jsx("h1",{className:r.title,children:"Something Went Wrong"}),e.jsx(i.Button,{type:"Primary",onClick:()=>{o("/")},children:"Go Home"})]})})};exports.DynamicErrorPage=l;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("react/jsx-runtime"),e=require("./builder-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("react/jsx-runtime"),e=require("./builder-DNkh9C7C.cjs"),o=require("react"),l=r=>{const{children:i}=r,{pathname:a}=e.useLocation(),{setActiveBlock:t}=e.useNavbarStore(),{setActiveBlock:s}=e.useThemeSettingsStore(),{setActiveBlock:n}=e.usePreviewStore();return o.useEffect(()=>{switch(n({id:null,neededScroll:!1}),a){case"/admin/builder":t(e.navbarBlocks[0]);break;case"/admin/builder/add":t(e.navbarBlocks[1]);break;case"/admin/builder/theme":t(e.navbarBlocks[2]);break;case"/admin/builder/settings":t(e.navbarBlocks[3]);break;case"/admin/builder/theme/colors":t(e.navbarBlocks[2]),s(e.themeSettingsBlocks[0]);break;case"/admin/builder/theme/fonts":t(e.navbarBlocks[2]),s(e.themeSettingsBlocks[1]);break;case"/admin/builder/theme/borders":t(e.navbarBlocks[2]),s(e.themeSettingsBlocks[2]);break;case"/admin/builder/theme/buttons":t(e.navbarBlocks[2]),s(e.themeSettingsBlocks[3]);break;case"/admin/builder/theme/inputs":t(e.navbarBlocks[2]),s(e.themeSettingsBlocks[4]);break}},[a]),c.jsx(c.Fragment,{children:i})};exports.ActivePage=l;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { jsxs as n, jsx as t } from "react/jsx-runtime";
|
|
2
|
-
import { B as m, a as w, C as _ } from "./ui-components-
|
|
2
|
+
import { B as m, a as w, C as _ } from "./ui-components-Blu-gh32.js";
|
|
3
3
|
import "react";
|
|
4
|
-
import { j as I, r as b, al as j, b as v, J as P, k as T, u as k } from "./builder-
|
|
5
|
-
import "./charge-
|
|
6
|
-
import "./builder-components-
|
|
4
|
+
import { j as I, r as b, al as j, b as v, J as P, k as T, u as k } from "./builder-Bzjt7KtK.js";
|
|
5
|
+
import "./charge-IRYuGcrW.js";
|
|
6
|
+
import "./builder-components-BT94OMxj.js";
|
|
7
7
|
import "react-dom";
|
|
8
|
-
import "./ticket-
|
|
8
|
+
import "./ticket-Bj-AhEbz.js";
|
|
9
9
|
const C = "_wrapper_1yd2j_1", A = "_error_1yd2j_11", N = "_title_1yd2j_21", B = "_buttons_1yd2j_29", i = {
|
|
10
10
|
wrapper: C,
|
|
11
11
|
error: A,
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { jsx as t, jsxs as n } from "react/jsx-runtime";
|
|
2
|
-
import { g as i } from "./ui-components-
|
|
2
|
+
import { g as i } from "./ui-components-Blu-gh32.js";
|
|
3
3
|
import "react";
|
|
4
|
-
import { p as s, an as a } from "./builder-
|
|
5
|
-
import "./charge-
|
|
6
|
-
import "./builder-components-
|
|
4
|
+
import { p as s, an as a } from "./builder-Bzjt7KtK.js";
|
|
5
|
+
import "./charge-IRYuGcrW.js";
|
|
6
|
+
import "./builder-components-BT94OMxj.js";
|
|
7
7
|
import "react-dom";
|
|
8
|
-
import "./ticket-
|
|
8
|
+
import "./ticket-Bj-AhEbz.js";
|
|
9
9
|
const c = "_wrapper_ej209_1", p = "_content_ej209_12", m = "_title_ej209_22", r = {
|
|
10
10
|
wrapper: c,
|
|
11
11
|
content: p,
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { jsx as o, jsxs as N, Fragment as g } from "react/jsx-runtime";
|
|
2
2
|
import r from "react";
|
|
3
|
-
import { _ as z, a2 as U } from "./charge-
|
|
4
|
-
import { M as f, N as T, ab as F, p as G, a6 as R, e as H, Z as M, m as V, a as q, u as B, y as X, b as Y, am as Z, ag as K } from "./builder-
|
|
5
|
-
import { g as Q } from "./ticket-
|
|
6
|
-
import { e as $, N as ee, x as te } from "./ui-components-
|
|
7
|
-
import "./builder-components-
|
|
3
|
+
import { _ as z, a2 as U } from "./charge-IRYuGcrW.js";
|
|
4
|
+
import { M as f, N as T, ab as F, p as G, a6 as R, e as H, Z as M, m as V, a as q, u as B, y as X, b as Y, am as Z, ag as K } from "./builder-Bzjt7KtK.js";
|
|
5
|
+
import { g as Q } from "./ticket-Bj-AhEbz.js";
|
|
6
|
+
import { e as $, N as ee, x as te } from "./ui-components-Blu-gh32.js";
|
|
7
|
+
import "./builder-components-BT94OMxj.js";
|
|
8
8
|
import "react-dom";
|
|
9
9
|
const se = "_notifications_1ntnm_1", ae = "_wrapper_1ntnm_12", P = {
|
|
10
10
|
notifications: se,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),l=require("./ui-components-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),l=require("./ui-components-BVI8UP6Y.cjs");require("react");const s=require("./builder-DNkh9C7C.cjs");require("./charge-C2aoqar4.cjs");require("./builder-components-BPLuh4_V.cjs");require("react-dom");require("./ticket-C30ck-ZN.cjs");const j="_wrapper_1yd2j_1",w="_error_1yd2j_11",_="_title_1yd2j_21",b="_buttons_1yd2j_29",i={wrapper:j,error:w,title:_,buttons:b},S=async e=>{const o=localStorage.getItem("shopId")||void 0,r=localStorage.getItem("draftId"),d=`${s.useApiStore.getState().apiUrls.api}/v2/builder/shops/${o}/drafts/${r}/reset`;return await s.request({url:d,withToken:!0,method:"post",body:e})},x=()=>{const{error:e,setError:o}=s.useErrorStore(),{pages:r}=s.usePagesStore(),{setIsOpen:c}=s.useModalStore(),{title:d,description:m,setOnConfirm:u,setTitle:g,setDescription:p}=s.useConfirmationModalStore(),{setBlocks:h}=s.useLayersStore();async function y(){await S({resetSettings:(e==null?void 0:e.failedSettings)??!1,resetThemeSettings:(e==null?void 0:e.failedThemeSettings)??!1,resetPageIds:(e==null?void 0:e.failedPageIds)??[]}),o(null),h({}),window.location.reload()}async function f(){const a=[];r&&Object.keys(r).map(n=>r[n].id).filter(n=>n!==void 0).map(n=>a.push(n)),await S({resetSettings:!0,resetThemeSettings:!0,resetPageIds:a}),o(null)}return t.jsxs("div",{className:i.wrapper,children:[t.jsxs("div",{className:i.error,children:[t.jsxs("div",{children:[t.jsx("div",{className:i.title,children:"Oops! Something went wrong"}),t.jsx("span",{className:i.message,children:(e==null?void 0:e.message)||""})]}),t.jsxs("div",{className:i.buttons,children:[t.jsx(l.ButtonSettings,{type:"Primary",onClick:y,children:"Reset Settings"}),t.jsx(l.ButtonSettings,{type:"Secondary",onClick:a=>{a.stopPropagation(),g("Reset All Settings"),p("Are you sure you want to reset all settings? This is irreversible."),u(async()=>{await f()})},children:"Reset All Settings"})]})]}),d&&m&&t.jsx(l.BuilderModal,{close:()=>{c(!1),setTimeout(()=>{g(null),p(null),u(null),c(!0)},300)},children:t.jsx(l.ConfirmationModal,{})})]})};exports.ErrorPage=x;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { jsx as t } from "react/jsx-runtime";
|
|
2
|
-
import "./builder-
|
|
2
|
+
import "./builder-Bzjt7KtK.js";
|
|
3
3
|
import e from "react";
|
|
4
|
-
import { e as r } from "./ui-components-
|
|
5
|
-
import "./charge-
|
|
6
|
-
import "./builder-components-
|
|
4
|
+
import { e as r } from "./ui-components-Blu-gh32.js";
|
|
5
|
+
import "./charge-IRYuGcrW.js";
|
|
6
|
+
import "./builder-components-BT94OMxj.js";
|
|
7
7
|
import "react-dom";
|
|
8
|
-
import "./ticket-
|
|
8
|
+
import "./ticket-Bj-AhEbz.js";
|
|
9
9
|
const f = () => (e.useEffect(() => {
|
|
10
10
|
setTimeout(() => {
|
|
11
11
|
window.location.reload();
|
package/dist/index.cjs.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("./builder.cjs.js"),c=require("./builder-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("./builder.cjs.js"),c=require("./builder-DNkh9C7C.cjs"),u=require("react/jsx-runtime"),d=require("react"),e=require("./ui-components-BVI8UP6Y.cjs"),r=require("./charge-C2aoqar4.cjs");require("./builder-components-BPLuh4_V.cjs");require("react-dom");const t=require("./ticket-C30ck-ZN.cjs");function I(o){d.useEffect(()=>{Object.entries(o).forEach(([s,i])=>{e.registerIcon(s,i)})},[o])}function f(o){Object.entries(o).forEach(([s,i])=>{e.registerIcon(s,i)})}function l(o){return o.endsWith("Icon")?o.slice(0,-4):o}function g(o,s=20,i=!0){return o.map(n=>({value:i?l(n):n,addon:u.jsx(e.Icon,{name:n,width:s,height:s,showPlaceholder:!0})}))}exports.App=a.App;exports.AntistockRoutes=c.AntistockRoutes;exports.Routes=c.Routes;exports.formatPrice=c.formatPrice;exports.Icon=e.Icon;exports.addIconSuffix=e.addIconSuffix;exports.getRegisteredIcon=e.getRegisteredIcon;exports.getRegisteredIcons=e.getRegisteredIcons;exports.isIconRegistered=e.isIconRegistered;exports.loadIcon=e.loadIcon;exports.registerIcon=e.registerIcon;exports.stripIconSuffix=e.stripIconSuffix;exports.useDynamicIconRegistration=e.useDynamicIconRegistration;exports.MarkdownText=r.MarkdownText;exports.ReCaptchaProvider=r.ReCaptchaProvider;exports.parseDraftJsText=r.parseDraftJsText;exports.useCart=r.useCart;exports.useGeneralInfo=r.useGeneralInfo;exports.useMarkdownIt=r.useMarkdownIt;exports.useReCaptcha=r.useReCaptcha;exports.ColorVariables=t.ColorVariables;exports.aspectRatioOptions=t.aspectRatioOptions;exports.hotReload=t.hotReload;exports.iconNames=t.iconNames;exports.removeNotification=t.removeNotification;exports.showNotification=t.showNotification;exports.splitTextIntoSpans=t.splitTextIntoSpans;exports.useAdaptiveStyles=t.useAdaptiveStyles;exports.useBalance=t.useBalance;exports.useBuilderPages=t.useBuilderPages;exports.useCreateTicket=t.useCreateTicket;exports.createIconLeftAddons=g;exports.registerIcons=f;exports.useIconRegistration=I;
|
package/dist/index.es.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { App as R } from "./builder.es.js";
|
|
2
|
-
import { Q as v, U as w, V as b } from "./builder-
|
|
2
|
+
import { Q as v, U as w, V as b } from "./builder-Bzjt7KtK.js";
|
|
3
3
|
import { jsx as r } from "react/jsx-runtime";
|
|
4
4
|
import { useEffect as i } from "react";
|
|
5
|
-
import { r as o, I as n } from "./ui-components-
|
|
6
|
-
import { v as A, o as P, q as S, p as T, s as j, t as E, n as M } from "./ui-components-
|
|
7
|
-
import { M as y, G as B, J as D, u as G, I as J, K as V, H as q } from "./charge-
|
|
8
|
-
import "./builder-components-
|
|
5
|
+
import { r as o, I as n } from "./ui-components-Blu-gh32.js";
|
|
6
|
+
import { v as A, o as P, q as S, p as T, s as j, t as E, n as M } from "./ui-components-Blu-gh32.js";
|
|
7
|
+
import { M as y, G as B, J as D, u as G, I as J, K as V, H as q } from "./charge-IRYuGcrW.js";
|
|
8
|
+
import "./builder-components-BT94OMxj.js";
|
|
9
9
|
import "react-dom";
|
|
10
|
-
import { C as K, c as L, h as Q, i as U, r as W, d as F, s as X, u as Y, e as Z, b as _, a as $ } from "./ticket-
|
|
10
|
+
import { C as K, c as L, h as Q, i as U, r as W, d as F, s as X, u as Y, e as Z, b as _, a as $ } from "./ticket-Bj-AhEbz.js";
|
|
11
11
|
function m(e) {
|
|
12
12
|
i(() => {
|
|
13
13
|
Object.entries(e).forEach(([s, t]) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const t=require("react/jsx-runtime"),r=require("react"),O=require("./builder-
|
|
1
|
+
"use strict";const t=require("react/jsx-runtime"),r=require("react"),O=require("./builder-DNkh9C7C.cjs"),s=require("./charge-C2aoqar4.cjs"),C=require("./ui-components-BVI8UP6Y.cjs");require("./builder-components-BPLuh4_V.cjs");require("react-dom");require("./ticket-C30ck-ZN.cjs");const K=async(n=1)=>await s.fetchOrders({PageNumber:n}),Q=()=>{const[n,l]=r.useState(null),[d,e]=r.useState(null),[p,g]=r.useState(0),{page:m}=O.usePaginationPagesStore(),[f,_]=r.useState(!0);async function j(){_(!0);const{list:S,totalCount:u}=await K(m);l(S),g(u),e(null),_(!1)}async function y(){const S=(n==null?void 0:n.map(c=>c.gatewayName))||[],u=await s.getGatewaysDetail(S);e(u)}return r.useEffect(()=>{!d&&n&&y()},[n,d]),r.useEffect(()=>{j()},[m]),t.jsx(t.Fragment,{children:n!=null&&n.length&&n.length===0?t.jsx(s.NoItemsBlock,{title:"No Orders",description:"When you purchase products from our website, you'll see a history of orders here."}):t.jsxs(t.Fragment,{children:[t.jsx(s.PageTitle,{title:"Orders"}),t.jsx(s.OrdersTable,{orders:n,gatewaysDetail:d,totalCount:p,isLoading:f})]})})},X="_orderPage_gc87l_1",Y="_leftSection_gc87l_15",Z="_content_gc87l_35",ee="_main_gc87l_42",te="_mainAntistock_gc87l_56",se="_orderMainDataAntistock_gc87l_69",ne="_timelineBlockAntistock_gc87l_81",ae="_footerAntistock_gc87l_92",oe="_statusBlock_gc87l_104",ie="_timelineBlock_gc87l_81",ce="_footer_gc87l_92",re="_rightSection_gc87l_121",le="_header_gc87l_142",ue="_productList_gc87l_150",de="_mobileFooter_gc87l_157",me="_loaderContainer_gc87l_166",he="_orderMainData_gc87l_69",ge="_prices_gc87l_181",fe="_headerTitle_gc87l_185",pe="_headerDescription_gc87l_189",i={orderPage:X,leftSection:Y,content:Z,main:ee,mainAntistock:te,orderMainDataAntistock:se,timelineBlockAntistock:ne,footerAntistock:ae,statusBlock:oe,timelineBlock:ie,footer:ce,rightSection:re,header:le,productList:ue,mobileFooter:de,loaderContainer:me,orderMainData:he,prices:ge,headerTitle:fe,headerDescription:pe},_e=n=>{if(!n)return null;const l=n.split(":");if(l.length!==3)return null;const[d,e,p]=l,g=Number(d),m=Number(e),f=Number(p);return Number.isNaN(g)||Number.isNaN(m)||Number.isNaN(f)?null:((g*60+m)*60+f)*1e3},ye=()=>{var A,R,M,T,F,E,I,V,B;const{id:n,accessToken:l}=O.useParams(),d=O.useNavigate(),[e,p]=r.useState(),[g,m]=r.useState(!1),[f,_]=r.useState(!1),[j,y]=r.useState(!1),S=s.useCopy(),{isAntistock:u,general:c}=O.useGeneralStore(),G=((A=e==null?void 0:e.rawPrice)==null?void 0:A.currency)||"USD",U=new Intl.NumberFormat("en-US",{style:"currency",currency:G}),D=r.useMemo(()=>{var h;const a=_e((e==null?void 0:e.estimatedProcessingTime)??null),N=(h=e==null?void 0:e.timeline)==null?void 0:h[s.OrderStatus.Processing],P=(e==null?void 0:e.status)===s.OrderStatus.Processing&&N&&a?{processingStartTime:new Date(N),expectedProcessingMs:a,processingExpiresAt:e!=null&&e.processingExpiresAt?new Date(e.processingExpiresAt):void 0}:null;return(e==null?void 0:e.partOrders.map(o=>{var x,$,q;return{id:Number((x=o.productWithVariant)==null?void 0:x.id)||0,partOrderId:Number(o==null?void 0:o.id)||0,image:o.productWithVariant.image,name:(()=>{var L,W;const v=((L=o.productWithVariant)==null?void 0:L.name)||"",k=((W=o.productWithVariant)==null?void 0:W.variantName)||"";return!v&&!k?"":!k||v===k?v:v?`${v} (${k})`:k})(),description:"",price:{quantity:o.quantity,amount:(($=o.productWithVariant)==null?void 0:$.price.amount)||0,currency:(q=o.productWithVariant)==null?void 0:q.price.currency},deliveryCategories:"deliveryCategories"in o?o.deliveryCategories:void 0,customerNote:o.customerNote,chargeType:o.chargeType||"ONE_TIME",replacementRequests:"replacementRequests"in o?o.replacementRequests:void 0,allowedReplacementReasons:"allowedReplacementReasons"in o?o.allowedReplacementReasons:void 0,processingInfo:P}}))||[]},[e]);r.useEffect(()=>{e&&(e.status===s.OrderStatus.FullDeliveryFailure||e.status===s.OrderStatus.PartiallyDelivered)&&e.refundedPrice&&e.refundedPrice.amount>0&&_(!0)},[e==null?void 0:e.status]);const w=r.useCallback(async(a,N,P=!1)=>{var o,x;P||m(!0);const{data:h}=await(N?s.fetchAuthorizedOrder(`${a}/${N}`):s.fetchOrder(a));m(!1),h.status!==s.OrderStatus.Completed&&((o=h.charge)==null?void 0:o.status)===s.ChargeStatus.NotPaid&&d(`/charges/${(x=h.charge)==null?void 0:x.id}`,{replace:!0}),p(h)},[d]);r.useLayoutEffect(()=>{if(n&&!l){const a=JSON.parse(localStorage.getItem("orders")||"{}");a[n]&&d(`/orders/${n}/${a[n].fullAccessToken}`)}},[n,l,d]),r.useEffect(()=>{n&&w(n,l,!0);const a=setInterval(()=>{n&&w(n,l,!0)},5e3);return()=>{clearInterval(a)}},[n,l,w]);const z=r.useMemo(()=>!!(e!=null&&e.isApplicableForReplacement&&(e.status===s.OrderStatus.Completed||e.status===s.OrderStatus.PartiallyDelivered||e.status===s.OrderStatus.FullDeliveryFailure)),[e]),b=r.useMemo(()=>{var a;return!!((a=c==null?void 0:c.info)!=null&&a.isVouchesEnabled&&l&&((e==null?void 0:e.status)===s.OrderStatus.Completed||(e==null?void 0:e.status)===s.OrderStatus.FullDeliveryFailure||(e==null?void 0:e.status)===s.OrderStatus.PartiallyDelivered))},[(R=c==null?void 0:c.info)==null?void 0:R.isVouchesEnabled,l,e==null?void 0:e.status]),H=r.useMemo(()=>{var a;return!!(!((a=c==null?void 0:c.info)!=null&&a.isVouchesEnabled)&&(e!=null&&e.review)&&"accessToken"in e.review&&!u)},[(M=c==null?void 0:c.info)==null?void 0:M.isVouchesEnabled,e==null?void 0:e.review,u]),J=r.useMemo(()=>{var a;return((a=c==null?void 0:c.info)==null?void 0:a.domain)||window.location.hostname},[(T=c==null?void 0:c.info)==null?void 0:T.domain]);return g?t.jsx("div",{className:i.loaderContainer,children:t.jsx(C.Loader,{})}):(console.log("ORDER PAGE"),console.log(e),t.jsxs("div",{className:i.orderPage,children:[t.jsx("div",{className:i.leftSection,children:t.jsxs("div",{className:i.content,children:[t.jsx(s.CheckoutHeader,{}),e&&t.jsxs("div",{className:`${i.main} ${u?i.mainAntistock:""}`,children:[t.jsx(s.OrderStatusBlock,{className:i.statusBlock,orderStatus:e.status}),t.jsxs("div",{className:`${i.orderMainData} ${u?i.orderMainDataAntistock:""}`,children:[b&&t.jsx(s.VouchCard,{onAddMessage:()=>y(!0),isVouchLeft:e.isVouchLeft}),t.jsx(s.CheckoutOrderMainData,{lastUpdate:e.createdAt,paymentType:(F=e.charge)==null?void 0:F.gateway,email:e.customer?e.customer.email:((E=e.charge)==null?void 0:E.customerForCharge.email)||"",orderId:e.id}),H&&e.review&&t.jsx(s.LeaveAReview,{orderId:e.id,review:e.review})]}),e.charge&&e.charge.timeline&&t.jsx(s.TrackPayment,{className:`${i.timelineBlock} ${u?i.timelineBlockAntistock:""}`,timeline:e.charge.timeline}),t.jsx(s.CheckoutFooter,{className:`${i.footer} ${u?i.footerAntistock:""}`})]})]})}),t.jsx("div",{className:i.rightSection,style:u?{borderLeft:"1px solid var(--border-secondary)"}:void 0,children:t.jsxs("div",{className:i.content,children:[((I=e==null?void 0:e.charge)==null?void 0:I.name)&&t.jsxs("header",{className:i.header,children:[t.jsxs("div",{children:[t.jsx("h1",{className:i.headerTitle,children:e.charge.name}),e.charge.description&&t.jsx("p",{className:i.headerDescription,children:e.charge.description})]}),u?null:t.jsxs(C.Button,{type:"Secondary",onClick:()=>S((e==null?void 0:e.id)||""),style:{whiteSpace:"nowrap",display:"flex",alignItems:"center",gap:"4px"},children:[t.jsx(C.Icon,{name:"Copy"}),t.jsx("span",{children:"Copy ID"})]})]}),t.jsxs("div",{children:[t.jsx("div",{className:i.productList,children:D.map(a=>t.jsx(s.CheckoutProduct,{product:a,isOrder:!0,isApplicableForReplacement:z,orderId:n,accessToken:l,allowedReplacementReasons:e==null?void 0:e.allowedReplacementReasons},a.id))}),u?null:t.jsx(s.CheckoutPrices,{formatter:U,coupon:null,total:((V=e==null?void 0:e.endPrice)==null?void 0:V.amount)||0,discount:0,totalWithDiscount:((B=e==null?void 0:e.endPrice)==null?void 0:B.amount)||0,className:i.prices,isShowSubtotal:!1}),t.jsx(s.CheckoutFooter,{className:i.mobileFooter})]})]})}),(e==null?void 0:e.refundedPrice)&&t.jsx(s.RefundNotificationModal,{isOpen:f,onClose:()=>_(!1),refundedAmount:e.refundedPrice.amount,currency:e.refundedPrice.currency}),b&&t.jsx(s.VouchModal,{isOpen:j,onClose:()=>y(!1),products:D,orderId:n,accessToken:l,shopDomain:J,onSuccess:()=>{y(!1),n&&w(n,l,!0)}})]}))},Se=Object.freeze(Object.defineProperty({__proto__:null,OrderPage:ye},Symbol.toStringTag,{value:"Module"}));exports.Orders=Q;exports.index=Se;
|