@billgangcom/theme-lib 1.125.3 → 1.125.5

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.
Files changed (41) hide show
  1. package/dist/{builder-BTUURFPe.js → builder-2YNszRul.js} +5 -5
  2. package/dist/{builder-BR3UGcKn.cjs → builder-DT2MPQIe.cjs} +2 -2
  3. package/dist/{builder-components-lKDLASGI.js → builder-components-CfB-cXOa.js} +5 -4
  4. package/dist/{builder-components-_P8JWB1_.cjs → builder-components-HQ8ccfQi.cjs} +2 -2
  5. package/dist/builder.cjs.js +1 -1
  6. package/dist/builder.es.js +23 -23
  7. package/dist/{charge-BI1xffQt.js → charge-CeL8jXzk.js} +3766 -3760
  8. package/dist/{charge-DEiKeu4I.cjs → charge-Dd6podcM.cjs} +38 -38
  9. package/dist/{checkout-CZRAhp4K.js → checkout-dKBgx4_t.js} +5 -5
  10. package/dist/{checkout-Dm9pzm5d.cjs → checkout-hG4nZAfL.cjs} +1 -1
  11. package/dist/exports.cjs.js +1 -1
  12. package/dist/exports.es.js +6 -6
  13. package/dist/{index-C2ZHAv9L.cjs → index-BBmLGlCP.cjs} +1 -1
  14. package/dist/{index-CngSfS5V.cjs → index-BGWhMhIz.cjs} +1 -1
  15. package/dist/{index-D6XiKw_O.js → index-BcBa6BVj.js} +2 -2
  16. package/dist/{index-Du4uVvQ_.js → index-BsRq6_oH.js} +5 -5
  17. package/dist/{index-CAe4Pbyv.js → index-CPXgL1Te.js} +1 -1
  18. package/dist/{index-DvlcgzzS.js → index-DCCA87NY.js} +5 -5
  19. package/dist/{index-Bk0MqKGg.cjs → index-DH3suBKA.cjs} +1 -1
  20. package/dist/{index-4x4Ia1bf.cjs → index-DrlEFa_A.cjs} +1 -1
  21. package/dist/{index-Ij4XsN2K.js → index-DxY9GcmW.js} +5 -5
  22. package/dist/{index-JPSwqO2t.cjs → index-WlsBw3sd.cjs} +1 -1
  23. package/dist/{index-DsiIDdbl.cjs → index-ljnGesWX.cjs} +1 -1
  24. package/dist/{index-BYPqh6AI.js → index-m8mNLWAF.js} +5 -5
  25. package/dist/index.cjs.js +1 -1
  26. package/dist/index.es.js +6 -6
  27. package/dist/{order-Cz5k8Ms5.js → order-bjCcFmx6.js} +5 -5
  28. package/dist/{order-C7MQy_k5.cjs → order-f8DTpqHu.cjs} +1 -1
  29. package/dist/{subscription-D_ZlQz6z.js → subscription-B520eImG.js} +5 -5
  30. package/dist/{subscription-DJmmS4G8.cjs → subscription-DuQaeZpz.cjs} +1 -1
  31. package/dist/{ticket-ClTGdP4P.cjs → ticket-C_4dunoG.cjs} +1 -1
  32. package/dist/{ticket-CW-fMGEc.js → ticket-HPAqmPkQ.js} +5 -5
  33. package/dist/{top-up-Cwa9vo-P.js → top-up-CE-L-n3m.js} +5 -5
  34. package/dist/{top-up-CSphIfNE.cjs → top-up-xnDj358Z.cjs} +1 -1
  35. package/dist/{ui-components-CH1YcuZp.cjs → ui-components-CoVj1ReR.cjs} +1 -1
  36. package/dist/{ui-components-FKiw1QuZ.js → ui-components-t7AROe_i.js} +45 -44
  37. package/dist/ui.cjs.js +1 -1
  38. package/dist/ui.es.js +1 -1
  39. package/dist/{validation-IJlx8HaC.cjs → validation-BFKCs4Vw.cjs} +1 -1
  40. package/dist/{validation-BzcI5vxY.js → validation-BmbrCdXv.js} +5 -5
  41. package/package.json +1 -1
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),i=require("./builder-BR3UGcKn.cjs"),m=require("./ticket-ClTGdP4P.cjs"),o=require("react"),D=require("./charge-DEiKeu4I.cjs"),_=require("./ui-components-CH1YcuZp.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-BR3UGcKn.cjs")).then(r=>r.index).then(r=>({default:r.BuilderPage}))),K=o.lazy(()=>Promise.resolve().then(()=>require("./index-C2ZHAv9L.cjs")).then(r=>({default:r.ErrorPage}))),Y=o.lazy(()=>Promise.resolve().then(()=>require("./index-DsiIDdbl.cjs")).then(r=>({default:r.ActivePage}))),Z=o.lazy(()=>Promise.resolve().then(()=>require("./validation-IJlx8HaC.cjs")).then(r=>({default:r.ValidationPage}))),ee=o.lazy(()=>Promise.resolve().then(()=>require("./index-Bk0MqKGg.cjs")).then(r=>({default:r.WrapperPage}))),te=o.lazy(()=>Promise.resolve().then(()=>require("./index-JPSwqO2t.cjs")).then(r=>({default:r.RouterErrorPage}))),c=o.lazy(()=>Promise.resolve().then(()=>require("./index-4x4Ia1bf.cjs")).then(r=>({default:r.DynamicErrorPage}))),re=o.lazy(()=>Promise.resolve().then(()=>require("./checkout-Dm9pzm5d.cjs")).then(r=>({default:r.Checkout}))),oe=o.lazy(()=>Promise.resolve().then(()=>require("./charge-DEiKeu4I.cjs")).then(r=>r.index$1).then(r=>({default:r.ChargePage}))),ne=o.lazy(()=>Promise.resolve().then(()=>require("./ticket-ClTGdP4P.cjs")).then(r=>r.index).then(r=>({default:r.TicketItem}))),se=o.lazy(()=>Promise.resolve().then(()=>require("./subscription-DJmmS4G8.cjs")).then(r=>r.index).then(r=>({default:r.Subscription}))),ce=o.lazy(()=>Promise.resolve().then(()=>require("./top-up-CSphIfNE.cjs")).then(r=>({default:r.TopUpBalance}))),ie=o.lazy(()=>Promise.resolve().then(()=>require("./order-C7MQy_k5.cjs")).then(r=>r.index).then(r=>({default:r.OrderPage}))),ae=o.lazy(()=>Promise.resolve().then(()=>require("./index-CngSfS5V.cjs")).then(r=>({default:r.TermsPage}))),le=o.lazy(()=>Promise.resolve().then(()=>require("./charge-DEiKeu4I.cjs")).then(r=>r.index).then(r=>({default:r.CustomerDashboard}))),U=o.lazy(()=>Promise.resolve().then(()=>require("./charge-DEiKeu4I.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-_P8JWB1_.cjs")).then(r=>r.index).then(r=>({default:r.RenderAnnouncement}))),R=o.lazy(()=>Promise.resolve().then(()=>require("./builder-components-_P8JWB1_.cjs")).then(r=>r.index).then(r=>({default:r.RenderFooter}))),b=o.lazy(()=>Promise.resolve().then(()=>require("./builder-components-_P8JWB1_.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;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),i=require("./builder-DT2MPQIe.cjs"),m=require("./ticket-C_4dunoG.cjs"),o=require("react"),D=require("./charge-Dd6podcM.cjs"),_=require("./ui-components-CoVj1ReR.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-DT2MPQIe.cjs")).then(r=>r.index).then(r=>({default:r.BuilderPage}))),K=o.lazy(()=>Promise.resolve().then(()=>require("./index-BBmLGlCP.cjs")).then(r=>({default:r.ErrorPage}))),Y=o.lazy(()=>Promise.resolve().then(()=>require("./index-ljnGesWX.cjs")).then(r=>({default:r.ActivePage}))),Z=o.lazy(()=>Promise.resolve().then(()=>require("./validation-BFKCs4Vw.cjs")).then(r=>({default:r.ValidationPage}))),ee=o.lazy(()=>Promise.resolve().then(()=>require("./index-DH3suBKA.cjs")).then(r=>({default:r.WrapperPage}))),te=o.lazy(()=>Promise.resolve().then(()=>require("./index-WlsBw3sd.cjs")).then(r=>({default:r.RouterErrorPage}))),c=o.lazy(()=>Promise.resolve().then(()=>require("./index-DrlEFa_A.cjs")).then(r=>({default:r.DynamicErrorPage}))),re=o.lazy(()=>Promise.resolve().then(()=>require("./checkout-hG4nZAfL.cjs")).then(r=>({default:r.Checkout}))),oe=o.lazy(()=>Promise.resolve().then(()=>require("./charge-Dd6podcM.cjs")).then(r=>r.index$1).then(r=>({default:r.ChargePage}))),ne=o.lazy(()=>Promise.resolve().then(()=>require("./ticket-C_4dunoG.cjs")).then(r=>r.index).then(r=>({default:r.TicketItem}))),se=o.lazy(()=>Promise.resolve().then(()=>require("./subscription-DuQaeZpz.cjs")).then(r=>r.index).then(r=>({default:r.Subscription}))),ce=o.lazy(()=>Promise.resolve().then(()=>require("./top-up-xnDj358Z.cjs")).then(r=>({default:r.TopUpBalance}))),ie=o.lazy(()=>Promise.resolve().then(()=>require("./order-f8DTpqHu.cjs")).then(r=>r.index).then(r=>({default:r.OrderPage}))),ae=o.lazy(()=>Promise.resolve().then(()=>require("./index-BGWhMhIz.cjs")).then(r=>({default:r.TermsPage}))),le=o.lazy(()=>Promise.resolve().then(()=>require("./charge-Dd6podcM.cjs")).then(r=>r.index).then(r=>({default:r.CustomerDashboard}))),U=o.lazy(()=>Promise.resolve().then(()=>require("./charge-Dd6podcM.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-HQ8ccfQi.cjs")).then(r=>r.index).then(r=>({default:r.RenderAnnouncement}))),R=o.lazy(()=>Promise.resolve().then(()=>require("./builder-components-HQ8ccfQi.cjs")).then(r=>r.index).then(r=>({default:r.RenderFooter}))),b=o.lazy(()=>Promise.resolve().then(()=>require("./builder-components-HQ8ccfQi.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;
@@ -1,9 +1,9 @@
1
1
  import { jsx as e, Fragment as j, jsxs as D } from "react/jsx-runtime";
2
- import { N as _, z as N, j as q, c as Q, m as X, a as J, M as $, aj as K, ak as Y, al as Z } from "./builder-BTUURFPe.js";
3
- import { f as ee, l as te, j as oe, k as ne, D as re } from "./ticket-CW-fMGEc.js";
2
+ import { N as _, z as N, j as q, c as Q, m as X, a as J, M as $, aj as K, ak as Y, al as Z } from "./builder-2YNszRul.js";
3
+ import { f as ee, l as te, j as oe, k as ne, D as re } from "./ticket-HPAqmPkQ.js";
4
4
  import o, { Suspense as ce } from "react";
5
- import { $ as ae, a0 as ie, a1 as le } from "./charge-BI1xffQt.js";
6
- import { w as se } from "./ui-components-FKiw1QuZ.js";
5
+ import { $ as ae, a0 as ie, a1 as le } from "./charge-CeL8jXzk.js";
6
+ import { w as se } from "./ui-components-t7AROe_i.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 $e, UserIcon as Ke, 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 $t, ClockIcon as Kt, 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-BTUURFPe.js").then((t) => t.ao).then((t) => ({ default: t.BuilderPage }))
157
+ () => import("./builder-2YNszRul.js").then((t) => t.ao).then((t) => ({ default: t.BuilderPage }))
158
158
  ), ao = o.lazy(
159
- () => import("./index-BYPqh6AI.js").then((t) => ({ default: t.ErrorPage }))
159
+ () => import("./index-m8mNLWAF.js").then((t) => ({ default: t.ErrorPage }))
160
160
  ), io = o.lazy(
161
- () => import("./index-CAe4Pbyv.js").then((t) => ({ default: t.ActivePage }))
161
+ () => import("./index-CPXgL1Te.js").then((t) => ({ default: t.ActivePage }))
162
162
  ), lo = o.lazy(
163
- () => import("./validation-BzcI5vxY.js").then((t) => ({ default: t.ValidationPage }))
163
+ () => import("./validation-BmbrCdXv.js").then((t) => ({ default: t.ValidationPage }))
164
164
  ), so = o.lazy(
165
- () => import("./index-DvlcgzzS.js").then((t) => ({ default: t.WrapperPage }))
165
+ () => import("./index-DCCA87NY.js").then((t) => ({ default: t.WrapperPage }))
166
166
  ), uo = o.lazy(
167
- () => import("./index-Ij4XsN2K.js").then((t) => ({ default: t.RouterErrorPage }))
167
+ () => import("./index-DxY9GcmW.js").then((t) => ({ default: t.RouterErrorPage }))
168
168
  ), c = o.lazy(
169
- () => import("./index-Du4uVvQ_.js").then((t) => ({ default: t.DynamicErrorPage }))
169
+ () => import("./index-BsRq6_oH.js").then((t) => ({ default: t.DynamicErrorPage }))
170
170
  ), ho = o.lazy(
171
- () => import("./checkout-CZRAhp4K.js").then((t) => ({ default: t.Checkout }))
171
+ () => import("./checkout-dKBgx4_t.js").then((t) => ({ default: t.Checkout }))
172
172
  ), mo = o.lazy(
173
- () => import("./charge-BI1xffQt.js").then((t) => t.a9).then((t) => ({ default: t.ChargePage }))
173
+ () => import("./charge-CeL8jXzk.js").then((t) => t.a9).then((t) => ({ default: t.ChargePage }))
174
174
  ), po = o.lazy(
175
- () => import("./ticket-CW-fMGEc.js").then((t) => t.m).then((t) => ({ default: t.TicketItem }))
175
+ () => import("./ticket-HPAqmPkQ.js").then((t) => t.m).then((t) => ({ default: t.TicketItem }))
176
176
  ), Io = o.lazy(
177
- () => import("./subscription-D_ZlQz6z.js").then((t) => t.i).then((t) => ({ default: t.Subscription }))
177
+ () => import("./subscription-B520eImG.js").then((t) => t.i).then((t) => ({ default: t.Subscription }))
178
178
  ), go = o.lazy(
179
- () => import("./top-up-Cwa9vo-P.js").then((t) => ({ default: t.TopUpBalance }))
179
+ () => import("./top-up-CE-L-n3m.js").then((t) => ({ default: t.TopUpBalance }))
180
180
  ), fo = o.lazy(
181
- () => import("./order-Cz5k8Ms5.js").then((t) => t.i).then((t) => ({ default: t.OrderPage }))
181
+ () => import("./order-bjCcFmx6.js").then((t) => t.i).then((t) => ({ default: t.OrderPage }))
182
182
  ), Co = o.lazy(
183
- () => import("./index-D6XiKw_O.js").then((t) => ({ default: t.TermsPage }))
183
+ () => import("./index-BcBa6BVj.js").then((t) => ({ default: t.TermsPage }))
184
184
  ), So = o.lazy(
185
- () => import("./charge-BI1xffQt.js").then((t) => t.a8).then((t) => ({ default: t.CustomerDashboard }))
185
+ () => import("./charge-CeL8jXzk.js").then((t) => t.a8).then((t) => ({ default: t.CustomerDashboard }))
186
186
  ), B = o.lazy(
187
- () => import("./charge-BI1xffQt.js").then((t) => t.a7).then((t) => ({ default: t.ReCaptchaProvider }))
187
+ () => import("./charge-CeL8jXzk.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-lKDLASGI.js").then((t) => t.i).then((t) => ({
189
+ () => import("./builder-components-CfB-cXOa.js").then((t) => t.i).then((t) => ({
190
190
  default: t.RenderAnnouncement
191
191
  }))
192
192
  ), R = o.lazy(
193
- () => import("./builder-components-lKDLASGI.js").then((t) => t.i).then((t) => ({
193
+ () => import("./builder-components-CfB-cXOa.js").then((t) => t.i).then((t) => ({
194
194
  default: t.RenderFooter
195
195
  }))
196
196
  ), x = o.lazy(
197
- () => import("./builder-components-lKDLASGI.js").then((t) => t.i).then((t) => ({
197
+ () => import("./builder-components-CfB-cXOa.js").then((t) => t.i).then((t) => ({
198
198
  default: t.RenderHeader
199
199
  }))
200
200
  ), xo = (t) => {