@billgangcom/theme-lib 1.125.1 → 1.125.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (42) hide show
  1. package/dist/{builder-C-s2Z9Tg.cjs → builder-BR3UGcKn.cjs} +2 -2
  2. package/dist/{builder-BKLQ3SCp.js → builder-BTUURFPe.js} +5 -5
  3. package/dist/{builder-components-Ibl3RH1Z.cjs → builder-components-_P8JWB1_.cjs} +1 -1
  4. package/dist/{builder-components-B3-2dDXj.js → builder-components-lKDLASGI.js} +4 -4
  5. package/dist/builder.cjs.js +1 -1
  6. package/dist/builder.es.js +23 -23
  7. package/dist/{charge-BQMwaI0v.js → charge-BI1xffQt.js} +3405 -3407
  8. package/dist/{charge-Df_uiA44.cjs → charge-DEiKeu4I.cjs} +38 -38
  9. package/dist/{checkout-MKBU4y44.js → checkout-CZRAhp4K.js} +5 -5
  10. package/dist/{checkout-kkuEduhR.cjs → checkout-Dm9pzm5d.cjs} +1 -1
  11. package/dist/exports.cjs.js +1 -1
  12. package/dist/exports.es.js +6 -6
  13. package/dist/{index-gZPytw2A.cjs → index-4x4Ia1bf.cjs} +1 -1
  14. package/dist/{index--cDPD5qI.js → index-BYPqh6AI.js} +5 -5
  15. package/dist/{index-DMc4GFGv.cjs → index-Bk0MqKGg.cjs} +1 -1
  16. package/dist/{index-DLr8rI1h.cjs → index-C2ZHAv9L.cjs} +1 -1
  17. package/dist/{index-WgsjPsG8.js → index-CAe4Pbyv.js} +1 -1
  18. package/dist/{index-BlI-8eaC.cjs → index-CngSfS5V.cjs} +1 -1
  19. package/dist/{index-BsQLyFRc.js → index-D6XiKw_O.js} +2 -2
  20. package/dist/{index-DLQGIro9.cjs → index-DsiIDdbl.cjs} +1 -1
  21. package/dist/{index-CHOPkBPg.js → index-Du4uVvQ_.js} +5 -5
  22. package/dist/{index-BXGq59ru.js → index-DvlcgzzS.js} +5 -5
  23. package/dist/{index-Bs-Lksb2.js → index-Ij4XsN2K.js} +5 -5
  24. package/dist/{index-DqcTiYSB.cjs → index-JPSwqO2t.cjs} +1 -1
  25. package/dist/index.cjs.js +1 -1
  26. package/dist/index.es.js +6 -6
  27. package/dist/{order-B788Vz5S.cjs → order-C7MQy_k5.cjs} +1 -1
  28. package/dist/{order-Q1YK_kd9.js → order-Cz5k8Ms5.js} +5 -5
  29. package/dist/{subscription-8Fl-uEmU.cjs → subscription-DJmmS4G8.cjs} +1 -1
  30. package/dist/{subscription-C9XFvG3Q.js → subscription-D_ZlQz6z.js} +5 -5
  31. package/dist/{ticket-BKRtcUte.js → ticket-CW-fMGEc.js} +44 -43
  32. package/dist/{ticket-DCSFgepS.cjs → ticket-ClTGdP4P.cjs} +2 -2
  33. package/dist/{top-up-Dz4FoWe7.cjs → top-up-CSphIfNE.cjs} +1 -1
  34. package/dist/{top-up-Cmcs3JV8.js → top-up-Cwa9vo-P.js} +5 -5
  35. package/dist/ui-components-CH1YcuZp.cjs +1 -0
  36. package/dist/{ui-components-D5xoCtdU.js → ui-components-FKiw1QuZ.js} +7 -7
  37. package/dist/ui.cjs.js +1 -1
  38. package/dist/ui.es.js +1 -1
  39. package/dist/{validation-B7VBE5sN.js → validation-BzcI5vxY.js} +5 -5
  40. package/dist/{validation-xaQ15AlC.cjs → validation-IJlx8HaC.cjs} +1 -1
  41. package/package.json +1 -1
  42. package/dist/ui-components-DedfwzFM.cjs +0 -1
@@ -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-BQMwaI0v.js";
3
- import { z as A, p as G } from "./builder-BKLQ3SCp.js";
2
+ import { u as D, C as N, a as x } from "./charge-BI1xffQt.js";
3
+ import { z as A, p as G } from "./builder-BTUURFPe.js";
4
4
  import c from "react";
5
- import { e as P } from "./ui-components-D5xoCtdU.js";
6
- import "./builder-components-B3-2dDXj.js";
5
+ import { e as P } from "./ui-components-FKiw1QuZ.js";
6
+ import "./builder-components-lKDLASGI.js";
7
7
  import "react-dom";
8
- import "./ticket-BKRtcUte.js";
8
+ import "./ticket-CW-fMGEc.js";
9
9
  const S = "_checkoutContainer_thje1_1", b = "_loaderContainer_thje1_20", s = {
10
10
  checkoutContainer: S,
11
11
  loaderContainer: b
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),n=require("./charge-Df_uiA44.cjs"),u=require("./builder-C-s2Z9Tg.cjs"),l=require("react"),_=require("./ui-components-DedfwzFM.cjs");require("./builder-components-Ibl3RH1Z.cjs");require("react-dom");require("./ticket-DCSFgepS.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
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),n=require("./charge-DEiKeu4I.cjs"),u=require("./builder-BR3UGcKn.cjs"),l=require("react"),_=require("./ui-components-CH1YcuZp.cjs");require("./builder-components-_P8JWB1_.cjs");require("react-dom");require("./ticket-ClTGdP4P.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 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("react/jsx-runtime");require("react");const o=require("./builder-C-s2Z9Tg.cjs"),a=require("./ui-components-DedfwzFM.cjs"),t=require("./charge-Df_uiA44.cjs");require("./builder-components-Ibl3RH1Z.cjs");const e=require("./ticket-DCSFgepS.cjs"),r=require("./checkout-kkuEduhR.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;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("react/jsx-runtime");require("react");const o=require("./builder-BR3UGcKn.cjs"),a=require("./ui-components-CH1YcuZp.cjs"),t=require("./charge-DEiKeu4I.cjs");require("./builder-components-_P8JWB1_.cjs");const e=require("./ticket-ClTGdP4P.cjs"),r=require("./checkout-Dm9pzm5d.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;
@@ -1,11 +1,11 @@
1
1
  import "react/jsx-runtime";
2
2
  import "react";
3
- import { U as i, V as p, W as u } from "./builder-BKLQ3SCp.js";
4
- import { k as c } from "./ui-components-D5xoCtdU.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-BQMwaI0v.js";
6
- import "./builder-components-B3-2dDXj.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-BKRtcUte.js";
8
- import { Checkout as J } from "./checkout-MKBU4y44.js";
3
+ import { U as i, V as p, W as u } from "./builder-BTUURFPe.js";
4
+ import { k as c } from "./ui-components-FKiw1QuZ.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-BI1xffQt.js";
6
+ import "./builder-components-lKDLASGI.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-CW-fMGEc.js";
8
+ import { Checkout as J } from "./checkout-CZRAhp4K.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"),i=require("./ui-components-DedfwzFM.cjs");require("react");const n=require("./builder-C-s2Z9Tg.cjs");require("./charge-Df_uiA44.cjs");require("./builder-components-Ibl3RH1Z.cjs");require("react-dom");require("./ticket-DCSFgepS.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
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),i=require("./ui-components-CH1YcuZp.cjs");require("react");const n=require("./builder-BR3UGcKn.cjs");require("./charge-DEiKeu4I.cjs");require("./builder-components-_P8JWB1_.cjs");require("react-dom");require("./ticket-ClTGdP4P.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,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-D5xoCtdU.js";
2
+ import { B as m, a as w, C as _ } from "./ui-components-FKiw1QuZ.js";
3
3
  import "react";
4
- import { j as I, r as b, s as j, b as v, K as P, k as T, u as k } from "./builder-BKLQ3SCp.js";
5
- import "./charge-BQMwaI0v.js";
6
- import "./builder-components-B3-2dDXj.js";
4
+ import { j as I, r as b, s as j, b as v, K as P, k as T, u as k } from "./builder-BTUURFPe.js";
5
+ import "./charge-BI1xffQt.js";
6
+ import "./builder-components-lKDLASGI.js";
7
7
  import "react-dom";
8
- import "./ticket-BKRtcUte.js";
8
+ import "./ticket-CW-fMGEc.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 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react/jsx-runtime"),i=require("react"),P=require("./charge-Df_uiA44.cjs"),t=require("./builder-C-s2Z9Tg.cjs"),J=require("./ticket-DCSFgepS.cjs"),g=require("./ui-components-DedfwzFM.cjs");require("./builder-components-Ibl3RH1Z.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
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react/jsx-runtime"),i=require("react"),P=require("./charge-DEiKeu4I.cjs"),t=require("./builder-BR3UGcKn.cjs"),J=require("./ticket-ClTGdP4P.cjs"),g=require("./ui-components-CH1YcuZp.cjs");require("./builder-components-_P8JWB1_.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 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),l=require("./ui-components-DedfwzFM.cjs");require("react");const s=require("./builder-C-s2Z9Tg.cjs");require("./charge-Df_uiA44.cjs");require("./builder-components-Ibl3RH1Z.cjs");require("react-dom");require("./ticket-DCSFgepS.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
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),l=require("./ui-components-CH1YcuZp.cjs");require("react");const s=require("./builder-BR3UGcKn.cjs");require("./charge-DEiKeu4I.cjs");require("./builder-components-_P8JWB1_.cjs");require("react-dom");require("./ticket-ClTGdP4P.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,5 +1,5 @@
1
1
  import { jsx as n, Fragment as m } from "react/jsx-runtime";
2
- import { ac as d, o as l, m as b, i as u, q as t, B as s } from "./builder-BKLQ3SCp.js";
2
+ import { ac as d, o as l, m as b, i as u, q as t, B as s } from "./builder-BTUURFPe.js";
3
3
  import k from "react";
4
4
  const f = (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 e=require("react/jsx-runtime"),c=require("./builder-C-s2Z9Tg.cjs"),n=require("./charge-Df_uiA44.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
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),c=require("./builder-BR3UGcKn.cjs"),n=require("./charge-DEiKeu4I.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,6 +1,6 @@
1
1
  import { jsx as t, jsxs as c } from "react/jsx-runtime";
2
- import { N as i, z as m } from "./builder-BKLQ3SCp.js";
3
- import { a3 as l, a4 as p, a5 as d, M as _ } from "./charge-BQMwaI0v.js";
2
+ import { N as i, z as m } from "./builder-BTUURFPe.js";
3
+ import { a3 as l, a4 as p, a5 as d, M as _ } from "./charge-BI1xffQt.js";
4
4
  const x = "_wrapper_x27n6_1", f = "_content_x27n6_10", v = "_title_x27n6_18", h = "_text_x27n6_24", N = "_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 c=require("react/jsx-runtime"),e=require("./builder-C-s2Z9Tg.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
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("react/jsx-runtime"),e=require("./builder-BR3UGcKn.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 { jsx as t, jsxs as n } from "react/jsx-runtime";
2
- import { g as i } from "./ui-components-D5xoCtdU.js";
2
+ import { g as i } from "./ui-components-FKiw1QuZ.js";
3
3
  import "react";
4
- import { p as s, an as a } from "./builder-BKLQ3SCp.js";
5
- import "./charge-BQMwaI0v.js";
6
- import "./builder-components-B3-2dDXj.js";
4
+ import { p as s, an as a } from "./builder-BTUURFPe.js";
5
+ import "./charge-BI1xffQt.js";
6
+ import "./builder-components-lKDLASGI.js";
7
7
  import "react-dom";
8
- import "./ticket-BKRtcUte.js";
8
+ import "./ticket-CW-fMGEc.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 j, a2 as U } from "./charge-BQMwaI0v.js";
4
- import { N as f, O as T, ac as F, p as G, a7 as R, e as H, _ as V, m as q, a as B, u as M, z as X, b as Y, am as K, ah as Q } from "./builder-BKLQ3SCp.js";
5
- import { g as Z } from "./ticket-BKRtcUte.js";
6
- import { e as $, N as ee, x as te } from "./ui-components-D5xoCtdU.js";
7
- import "./builder-components-B3-2dDXj.js";
3
+ import { _ as j, a2 as U } from "./charge-BI1xffQt.js";
4
+ import { N as f, O as T, ac as F, p as G, a7 as R, e as H, _ as V, m as q, a as B, u as M, z as X, b as Y, am as K, ah as Q } from "./builder-BTUURFPe.js";
5
+ import { g as Z } from "./ticket-CW-fMGEc.js";
6
+ import { e as $, N as ee, x as te } from "./ui-components-FKiw1QuZ.js";
7
+ import "./builder-components-lKDLASGI.js";
8
8
  import "react-dom";
9
9
  const se = "_notifications_1ntnm_1", ae = "_wrapper_1ntnm_12", P = {
10
10
  notifications: se,
@@ -1,11 +1,11 @@
1
1
  import { jsx as t } from "react/jsx-runtime";
2
- import "./builder-BKLQ3SCp.js";
2
+ import "./builder-BTUURFPe.js";
3
3
  import e from "react";
4
- import { e as r } from "./ui-components-D5xoCtdU.js";
5
- import "./charge-BQMwaI0v.js";
6
- import "./builder-components-B3-2dDXj.js";
4
+ import { e as r } from "./ui-components-FKiw1QuZ.js";
5
+ import "./charge-BI1xffQt.js";
6
+ import "./builder-components-lKDLASGI.js";
7
7
  import "react-dom";
8
- import "./ticket-BKRtcUte.js";
8
+ import "./ticket-CW-fMGEc.js";
9
9
  const f = () => (e.useEffect(() => {
10
10
  setTimeout(() => {
11
11
  window.location.reload();
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime");require("./builder-C-s2Z9Tg.cjs");const r=require("react"),t=require("./ui-components-DedfwzFM.cjs");require("./charge-Df_uiA44.cjs");require("./builder-components-Ibl3RH1Z.cjs");require("react-dom");require("./ticket-DCSFgepS.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
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime");require("./builder-BR3UGcKn.cjs");const r=require("react"),t=require("./ui-components-CH1YcuZp.cjs");require("./charge-DEiKeu4I.cjs");require("./builder-components-_P8JWB1_.cjs");require("react-dom");require("./ticket-ClTGdP4P.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;
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-C-s2Z9Tg.cjs"),u=require("react/jsx-runtime"),d=require("react"),e=require("./ui-components-DedfwzFM.cjs"),r=require("./charge-Df_uiA44.cjs");require("./builder-components-Ibl3RH1Z.cjs");require("react-dom");const t=require("./ticket-DCSFgepS.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;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("./builder.cjs.js"),c=require("./builder-BR3UGcKn.cjs"),u=require("react/jsx-runtime"),d=require("react"),e=require("./ui-components-CH1YcuZp.cjs"),r=require("./charge-DEiKeu4I.cjs");require("./builder-components-_P8JWB1_.cjs");require("react-dom");const t=require("./ticket-ClTGdP4P.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 { U as v, V as w, W as b } from "./builder-BKLQ3SCp.js";
2
+ import { U as v, V as w, W as b } from "./builder-BTUURFPe.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-D5xoCtdU.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-D5xoCtdU.js";
7
- import { M as y, G as B, J as D, u as G, I as J, K as V, H as W } from "./charge-BQMwaI0v.js";
8
- import "./builder-components-B3-2dDXj.js";
5
+ import { r as o, I as n } from "./ui-components-FKiw1QuZ.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-FKiw1QuZ.js";
7
+ import { M as y, G as B, J as D, u as G, I as J, K as V, H as W } from "./charge-BI1xffQt.js";
8
+ import "./builder-components-lKDLASGI.js";
9
9
  import "react-dom";
10
- import { C as H, c as K, h as L, i as U, r as F, d as Q, s as X, u as Y, e as Z, b as _, a as $ } from "./ticket-BKRtcUte.js";
10
+ import { C as H, c as K, h as L, i as U, r as F, d as Q, s as X, u as Y, e as Z, b as _, a as $ } from "./ticket-CW-fMGEc.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-C-s2Z9Tg.cjs"),s=require("./charge-Df_uiA44.cjs"),C=require("./ui-components-DedfwzFM.cjs");require("./builder-components-Ibl3RH1Z.cjs");require("react-dom");require("./ticket-DCSFgepS.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]),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;
1
+ "use strict";const t=require("react/jsx-runtime"),r=require("react"),O=require("./builder-BR3UGcKn.cjs"),s=require("./charge-DEiKeu4I.cjs"),C=require("./ui-components-CH1YcuZp.cjs");require("./builder-components-_P8JWB1_.cjs");require("react-dom");require("./ticket-ClTGdP4P.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]),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;
@@ -1,11 +1,11 @@
1
1
  import { jsx as s, Fragment as G, jsxs as m } from "react/jsx-runtime";
2
2
  import r, { useState as X, useMemo as b } from "react";
3
- import { Q as Y, a8 as Z, p as ee, z as te } from "./builder-BKLQ3SCp.js";
4
- import { f as se, N as ae, P as oe, O as ne, g as ie, b as ce, c as u, d as re, e as le, h as ue, i as de, j as me, V as he, k as fe, L as pe, T as ge, l as z, m as _e, n as ye, R as Ne, o as ve } from "./charge-BQMwaI0v.js";
5
- import { e as ke, g as Se, I as we } from "./ui-components-D5xoCtdU.js";
6
- import "./builder-components-B3-2dDXj.js";
3
+ import { Q as Y, a8 as Z, p as ee, z as te } from "./builder-BTUURFPe.js";
4
+ import { f as se, N as ae, P as oe, O as ne, g as ie, b as ce, c as u, d as re, e as le, h as ue, i as de, j as me, V as he, k as fe, L as pe, T as ge, l as z, m as _e, n as ye, R as Ne, o as ve } from "./charge-BI1xffQt.js";
5
+ import { e as ke, g as Se, I as we } from "./ui-components-FKiw1QuZ.js";
6
+ import "./builder-components-lKDLASGI.js";
7
7
  import "react-dom";
8
- import "./ticket-BKRtcUte.js";
8
+ import "./ticket-CW-fMGEc.js";
9
9
  const Pe = async (t = 1) => await se({ PageNumber: t }), tt = () => {
10
10
  const [t, c] = r.useState(null), [d, e] = X(null), [_, p] = r.useState(0), { page: h } = Y(), [g, y] = r.useState(!0);
11
11
  async function O() {
@@ -1 +1 @@
1
- "use strict";const t=require("react/jsx-runtime"),c=require("react"),u=require("./builder-C-s2Z9Tg.cjs"),s=require("./charge-Df_uiA44.cjs"),m=require("./ui-components-DedfwzFM.cjs");require("./builder-components-Ibl3RH1Z.cjs");require("react-dom");require("./ticket-DCSFgepS.cjs");const x=async(n=1)=>await s.fetchSubscriptions({PageNumber:n}),f=()=>{const[n,o]=c.useState(null),[e,S]=c.useState(0),{page:l,setPage:b}=u.usePaginationPagesStore(),{gatewaysDetail:d,setGatewaysDetail:g,balanceSettings:i}=u.useCustomerDashboardStore();return c.useEffect(()=>{const h=async()=>{const{list:r,totalCount:p}=await x(l);o(r),S(p)},j=async()=>{const r=await s.getGatewaysDetail(i!=null&&i.isEnabled?(i==null?void 0:i.topUpSettings.gateways)||[]:[]);g(r)};h(),d||j()},[l]),t.jsx(t.Fragment,{children:n&&n.length===0?t.jsx(s.NoItemsBlock,{title:"Subscriptions History",description:"When you subscribe to a product on our website, you'll see a history of your subscriptions here."}):t.jsxs(t.Fragment,{children:[t.jsx(s.PageTitle,{title:"Subscriptions"}),t.jsx(s.SubscriptionsTable,{subscriptions:n,gatewaysDetail:d,totalCount:e,page:l,setPage:b})]})})},C="_subscriptionContainer_1j6ol_1",_="_leftSection_1j6ol_15",y="_content_1j6ol_26",v="_mainContent_1j6ol_33",P="_detailsSection_1j6ol_37",w="_buttonGroup_1j6ol_50",D="_detailsContent_1j6ol_57",a={subscriptionContainer:C,leftSection:_,content:y,mainContent:v,detailsSection:P,buttonGroup:w,detailsContent:D},N=()=>{const{id:n,accessToken:o}=u.useParams(),{subscription:e,setSubscription:S}=u.useSubscriptionStore(),{setIsOpen:l}=u.useModalStore(),[b,d]=c.useState(!1),[g,i]=c.useState(!1);c.useLayoutEffect(()=>{S(null)},[n,o]);const{balanceSettings:h,setBalanceSettings:j}=u.useCustomerDashboardStore();return c.useEffect(()=>{n&&o&&(async()=>{if(!n||!o)return;i(!0);const{data:p}=await s.fetchSubscription(n,o);S({...p}),i(!1)})()},[n,o]),c.useEffect(()=>{h||(async()=>{const p=await s.getBalanceSettings();j(p)})()},[h]),g?t.jsx(m.Loader,{}):t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:a.subscriptionContainer,children:[t.jsx("div",{className:a.leftSection,children:t.jsxs("div",{className:a.content,children:[t.jsx(s.CheckoutHeader,{}),t.jsxs("div",{className:a.mainContent,children:[e&&t.jsxs(t.Fragment,{children:[t.jsx("h3",{id:"h3",children:"Your Subscription"}),t.jsx(s.SubscriptionProduct,{subscription:{price:e.price,name:e.productName,description:e.productDescription,status:e.status,image:e.productImage,recurringInterval:e.recurringInterval}}),t.jsx("div",{className:a.buttonGroup,children:e.pricingPlanExists&&t.jsx(m.Button,{onClick:r=>{r.stopPropagation(),l(!0),d(!0)},style:{maxWidth:"500px",width:"100%"},children:"Change Plan"})})]}),t.jsx(s.CheckoutFooter,{})]})]})}),t.jsx("div",{className:a.detailsSection,children:t.jsxs("div",{className:a.detailsContent,children:[t.jsx("h3",{id:"h3",children:"Details"}),(e==null?void 0:e.coupon)&&t.jsx(s.SubscriptionCoupon,{coupon:e.coupon,currency:e.price.currency||"USD"}),e&&t.jsx(s.ActiveSubscriptionProduct,{id:n||"",accessToken:o||"",subscription:{price:e.price,name:e.productName,description:e.productDescription,status:e.status,image:e.productImage,recurringInterval:e.recurringInterval}}),e&&t.jsxs(t.Fragment,{children:[t.jsx(s.ActivePaymentMethod,{}),e.activeTo&&t.jsx(s.SubscriptionExpirationDate,{})]}),t.jsx(s.CheckoutFooter,{className:"flex md:hidden"})]})})]}),t.jsx(s.ChangeSubscriptionPlan,{isOpen:b,setIsOpen:d,subscription:e})]})},I=Object.freeze(Object.defineProperty({__proto__:null,Subscription:N},Symbol.toStringTag,{value:"Module"}));exports.Subscriptions=f;exports.index=I;
1
+ "use strict";const t=require("react/jsx-runtime"),c=require("react"),u=require("./builder-BR3UGcKn.cjs"),s=require("./charge-DEiKeu4I.cjs"),m=require("./ui-components-CH1YcuZp.cjs");require("./builder-components-_P8JWB1_.cjs");require("react-dom");require("./ticket-ClTGdP4P.cjs");const x=async(n=1)=>await s.fetchSubscriptions({PageNumber:n}),f=()=>{const[n,o]=c.useState(null),[e,S]=c.useState(0),{page:l,setPage:b}=u.usePaginationPagesStore(),{gatewaysDetail:d,setGatewaysDetail:g,balanceSettings:i}=u.useCustomerDashboardStore();return c.useEffect(()=>{const h=async()=>{const{list:r,totalCount:p}=await x(l);o(r),S(p)},j=async()=>{const r=await s.getGatewaysDetail(i!=null&&i.isEnabled?(i==null?void 0:i.topUpSettings.gateways)||[]:[]);g(r)};h(),d||j()},[l]),t.jsx(t.Fragment,{children:n&&n.length===0?t.jsx(s.NoItemsBlock,{title:"Subscriptions History",description:"When you subscribe to a product on our website, you'll see a history of your subscriptions here."}):t.jsxs(t.Fragment,{children:[t.jsx(s.PageTitle,{title:"Subscriptions"}),t.jsx(s.SubscriptionsTable,{subscriptions:n,gatewaysDetail:d,totalCount:e,page:l,setPage:b})]})})},C="_subscriptionContainer_1j6ol_1",_="_leftSection_1j6ol_15",y="_content_1j6ol_26",v="_mainContent_1j6ol_33",P="_detailsSection_1j6ol_37",w="_buttonGroup_1j6ol_50",D="_detailsContent_1j6ol_57",a={subscriptionContainer:C,leftSection:_,content:y,mainContent:v,detailsSection:P,buttonGroup:w,detailsContent:D},N=()=>{const{id:n,accessToken:o}=u.useParams(),{subscription:e,setSubscription:S}=u.useSubscriptionStore(),{setIsOpen:l}=u.useModalStore(),[b,d]=c.useState(!1),[g,i]=c.useState(!1);c.useLayoutEffect(()=>{S(null)},[n,o]);const{balanceSettings:h,setBalanceSettings:j}=u.useCustomerDashboardStore();return c.useEffect(()=>{n&&o&&(async()=>{if(!n||!o)return;i(!0);const{data:p}=await s.fetchSubscription(n,o);S({...p}),i(!1)})()},[n,o]),c.useEffect(()=>{h||(async()=>{const p=await s.getBalanceSettings();j(p)})()},[h]),g?t.jsx(m.Loader,{}):t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:a.subscriptionContainer,children:[t.jsx("div",{className:a.leftSection,children:t.jsxs("div",{className:a.content,children:[t.jsx(s.CheckoutHeader,{}),t.jsxs("div",{className:a.mainContent,children:[e&&t.jsxs(t.Fragment,{children:[t.jsx("h3",{id:"h3",children:"Your Subscription"}),t.jsx(s.SubscriptionProduct,{subscription:{price:e.price,name:e.productName,description:e.productDescription,status:e.status,image:e.productImage,recurringInterval:e.recurringInterval}}),t.jsx("div",{className:a.buttonGroup,children:e.pricingPlanExists&&t.jsx(m.Button,{onClick:r=>{r.stopPropagation(),l(!0),d(!0)},style:{maxWidth:"500px",width:"100%"},children:"Change Plan"})})]}),t.jsx(s.CheckoutFooter,{})]})]})}),t.jsx("div",{className:a.detailsSection,children:t.jsxs("div",{className:a.detailsContent,children:[t.jsx("h3",{id:"h3",children:"Details"}),(e==null?void 0:e.coupon)&&t.jsx(s.SubscriptionCoupon,{coupon:e.coupon,currency:e.price.currency||"USD"}),e&&t.jsx(s.ActiveSubscriptionProduct,{id:n||"",accessToken:o||"",subscription:{price:e.price,name:e.productName,description:e.productDescription,status:e.status,image:e.productImage,recurringInterval:e.recurringInterval}}),e&&t.jsxs(t.Fragment,{children:[t.jsx(s.ActivePaymentMethod,{}),e.activeTo&&t.jsx(s.SubscriptionExpirationDate,{})]}),t.jsx(s.CheckoutFooter,{className:"flex md:hidden"})]})})]}),t.jsx(s.ChangeSubscriptionPlan,{isOpen:b,setIsOpen:d,subscription:e})]})},I=Object.freeze(Object.defineProperty({__proto__:null,Subscription:N},Symbol.toStringTag,{value:"Module"}));exports.Subscriptions=f;exports.index=I;
@@ -1,11 +1,11 @@
1
1
  import { jsx as e, Fragment as d, jsxs as o } from "react/jsx-runtime";
2
2
  import a from "react";
3
- import { Q as C, O as _, a8 as y, a9 as v, K as P } from "./builder-BKLQ3SCp.js";
4
- import { p as w, N, P as j, S as D, g as I, i as x, q as E, l as f, r as G, A as T, s as k, t as B, v as O, w as A, x as L } from "./charge-BQMwaI0v.js";
5
- import { e as M, g as F } from "./ui-components-D5xoCtdU.js";
6
- import "./builder-components-B3-2dDXj.js";
3
+ import { Q as C, O as _, a8 as y, a9 as v, K as P } from "./builder-BTUURFPe.js";
4
+ import { p as w, N, P as j, S as D, g as I, i as x, q as E, l as f, r as G, A as T, s as k, t as B, v as O, w as A, x as L } from "./charge-BI1xffQt.js";
5
+ import { e as M, g as F } from "./ui-components-FKiw1QuZ.js";
6
+ import "./builder-components-lKDLASGI.js";
7
7
  import "react-dom";
8
- import "./ticket-BKRtcUte.js";
8
+ import "./ticket-CW-fMGEc.js";
9
9
  const H = async (s = 1) => await w({ PageNumber: s }), nt = () => {
10
10
  const [s, i] = a.useState(null), [t, S] = a.useState(0), { page: u, setPage: h } = C(), { gatewaysDetail: l, setGatewaysDetail: b, balanceSettings: n } = _();
11
11
  return a.useEffect(() => {
@@ -1,20 +1,20 @@
1
1
  var se = Object.defineProperty;
2
2
  var Ie = (n, r, e) => r in n ? se(n, r, { enumerable: !0, configurable: !0, writable: !0, value: e }) : n[r] = e;
3
- var H = (n, r, e) => Ie(n, typeof r != "symbol" ? r + "" : r, e);
3
+ var N = (n, r, e) => Ie(n, typeof r != "symbol" ? r + "" : r, e);
4
4
  import { jsx as a, jsxs as h, Fragment as ue } from "react/jsx-runtime";
5
5
  import g from "react";
6
- import { j as Q, M as Z, r as ee, ab as de, Q as pe, e as W, v as G, O as ge, p as $, z as U, c as oe, a as ne, b as q, f as R, ac as he, u as Se, X as re, K as me } from "./builder-BKLQ3SCp.js";
7
- import { y as Ce, N as we, P as fe, z as ye, B as N, D as be, E as ke, F as Le, u as Te, H as Ae, Q as Pe, U as Be } from "./charge-BQMwaI0v.js";
8
- import { e as v, g as V, E as j, k as Fe, I as K, M as De } from "./ui-components-D5xoCtdU.js";
9
- import { R as te, a as ce, b as ae, c as Re } from "./builder-components-B3-2dDXj.js";
6
+ import { j as Q, M as Z, r as ee, ab as de, Q as pe, e as W, v as G, O as ge, p as $, z as U, c as oe, a as ne, b as q, f as R, ac as he, u as Se, X as re, K as me } from "./builder-BTUURFPe.js";
7
+ import { y as Ce, N as we, P as fe, z as ye, B as H, D as be, E as ke, F as Le, u as Te, H as Ae, Q as Pe, U as Be } from "./charge-BI1xffQt.js";
8
+ import { e as v, g as V, E as j, k as Fe, I as K, M as De } from "./ui-components-FKiw1QuZ.js";
9
+ import { R as te, a as ce, b as ae, c as Re } from "./builder-components-lKDLASGI.js";
10
10
  import "react-dom";
11
- import "./checkout-MKBU4y44.js";
12
- const ve = "_wrapper_1vt13_1", Me = "_bg_1vt13_10", xe = "_main_1vt13_32", He = "_noAnimation_1vt13_37", Ne = "_loading_1vt13_51", Ee = "_loadingContent_1vt13_61", Ue = "_loader_1vt13_66", B = {
11
+ import "./checkout-CZRAhp4K.js";
12
+ const ve = "_wrapper_1vt13_1", Me = "_bg_1vt13_10", xe = "_main_1vt13_32", Ne = "_noAnimation_1vt13_37", He = "_loading_1vt13_51", Ee = "_loadingContent_1vt13_61", Ue = "_loader_1vt13_66", B = {
13
13
  wrapper: ve,
14
14
  bg: Me,
15
15
  main: xe,
16
- noAnimation: He,
17
- loading: Ne,
16
+ noAnimation: Ne,
17
+ loading: He,
18
18
  loadingContent: Ee,
19
19
  loader: Ue
20
20
  }, Oe = async (n, r) => {
@@ -68,10 +68,10 @@ const ve = "_wrapper_1vt13_1", Me = "_bg_1vt13_10", xe = "_main_1vt13_32", He =
68
68
  /* @__PURE__ */ a(fe, { title: "Tickets" }),
69
69
  /* @__PURE__ */ h("div", { className: T.tableContainer, children: [
70
70
  /* @__PURE__ */ h(ye, { className: T.ticketsTable, children: [
71
- /* @__PURE__ */ a(N, { className: T.tableItem, children: "TICKET ID" }),
72
- /* @__PURE__ */ a(N, { className: T.tableItem, children: "LAST MESSAGE" }),
73
- /* @__PURE__ */ a(N, { className: T.tableItem, children: "CREATED" }),
74
- /* @__PURE__ */ a(N, { className: T.tableItem, children: "STATUS" }),
71
+ /* @__PURE__ */ a(H, { className: T.tableItem, children: "TICKET ID" }),
72
+ /* @__PURE__ */ a(H, { className: T.tableItem, children: "LAST MESSAGE" }),
73
+ /* @__PURE__ */ a(H, { className: T.tableItem, children: "CREATED" }),
74
+ /* @__PURE__ */ a(H, { className: T.tableItem, children: "STATUS" }),
75
75
  u && (n == null ? void 0 : n.map((m) => /* @__PURE__ */ a(
76
76
  be,
77
77
  {
@@ -3258,9 +3258,9 @@ const Go = [
3258
3258
  };
3259
3259
  class Ve {
3260
3260
  constructor() {
3261
- H(this, "observer", null);
3262
- H(this, "callbacks", /* @__PURE__ */ new Map());
3263
- H(this, "handleWindowResize", () => {
3261
+ N(this, "observer", null);
3262
+ N(this, "callbacks", /* @__PURE__ */ new Map());
3263
+ N(this, "handleWindowResize", () => {
3264
3264
  this.callbacks.forEach((r, e) => {
3265
3265
  const o = e.getBoundingClientRect().width;
3266
3266
  r.forEach((i) => i(o));
@@ -3419,21 +3419,22 @@ const zo = () => {
3419
3419
  if (L) {
3420
3420
  const { data: l } = L;
3421
3421
  if (l.seo && l.seo.pageTitle ? document.title = l.seo.pageTitle : Y[n] ? document.title = Y[n] : l.products.length > 0 ? document.title = `Product | ${l.products[0].name}` : l.fullPosts.length > 0 && (document.title = `Post | ${l.fullPosts[0].title}`), l.preserveContent) {
3422
- const y = {
3422
+ const f = {
3423
3423
  order: [...(s == null ? void 0 : s.order) ?? [], ...l.layout.order],
3424
3424
  data: {
3425
3425
  ...s == null ? void 0 : s.data,
3426
3426
  ...l.layout.data
3427
3427
  }
3428
3428
  };
3429
- u(y);
3429
+ u(f);
3430
3430
  } else
3431
3431
  u(l.layout);
3432
3432
  const M = l.listings.filter(
3433
- (y) => y.type === "PRODUCT" || y.type === "GROUP"
3433
+ (f) => f.type === "PRODUCT" || f.type === "GROUP"
3434
3434
  ), F = M && M.length > 0 ? l.listings : [...C.listings ?? [], ...l.listings];
3435
3435
  if (l.preserveContent) {
3436
- const y = {
3436
+ console.log("FINAL PRODUCTS: ", [...(o == null ? void 0 : o.products) ?? [], ...l.products]);
3437
+ const f = {
3437
3438
  ...C,
3438
3439
  products: [...(o == null ? void 0 : o.products) ?? [], ...l.products],
3439
3440
  reviews: [...(o == null ? void 0 : o.reviews) ?? [], ...l.reviews],
@@ -3443,11 +3444,11 @@ const zo = () => {
3443
3444
  fullPosts: [...(o == null ? void 0 : o.fullPosts) ?? [], ...l.fullPosts],
3444
3445
  posts: [...(o == null ? void 0 : o.posts) ?? [], ...l.posts],
3445
3446
  preserveContent: l.preserveContent,
3446
- listings: F,
3447
- vouches: [...(o == null ? void 0 : o.vouches) ?? [], ...l.vouches],
3448
- liveStats: [...(o == null ? void 0 : o.liveStats) ?? [], ...l.liveStats]
3447
+ vouches: [...(o == null ? void 0 : o.vouches) ?? [], ...l.vouches ?? []],
3448
+ liveStats: [...(o == null ? void 0 : o.liveStats) ?? [], ...l.liveStats ?? []],
3449
+ listings: F
3449
3450
  };
3450
- i(y);
3451
+ console.log("NEW PAGE CONTEXT: ", f), i(f);
3451
3452
  } else
3452
3453
  i({
3453
3454
  ...C,
@@ -3460,8 +3461,8 @@ const zo = () => {
3460
3461
  posts: l.posts,
3461
3462
  preserveContent: l.preserveContent,
3462
3463
  listings: F,
3463
- vouches: l.vouches,
3464
- liveStats: l.liveStats
3464
+ vouches: l.vouches ?? [],
3465
+ liveStats: l.liveStats ?? []
3465
3466
  });
3466
3467
  k(l.products);
3467
3468
  }
@@ -3959,7 +3960,7 @@ const co = "_wrapper_ukunw_1", ao = "_ticketContainer_ukunw_23", io = "_title_uk
3959
3960
  imageModal: Po,
3960
3961
  imageModalClose: Bo
3961
3962
  }, Fo = () => {
3962
- const n = window.location.pathname.split("/"), r = n[n.length - 1], e = n[n.length - 2], [o, i] = g.useState(!0), [t, c] = g.useState(null), [s, u] = g.useState(""), [m, k] = g.useState(null), [C, w] = g.useState(null), [p, A] = g.useState(null), S = g.useRef(null), { executeRecaptcha: L } = Ae(), { isAntistock: l } = U(), M = re(), { setIsOpen: F } = me(), y = (t == null ? void 0 : t.status) === ie.CLOSED, z = g.useCallback(() => {
3963
+ const n = window.location.pathname.split("/"), r = n[n.length - 1], e = n[n.length - 2], [o, i] = g.useState(!0), [t, c] = g.useState(null), [s, u] = g.useState(""), [m, k] = g.useState(null), [C, w] = g.useState(null), [p, A] = g.useState(null), S = g.useRef(null), { executeRecaptcha: L } = Ae(), { isAntistock: l } = U(), M = re(), { setIsOpen: F } = me(), f = (t == null ? void 0 : t.status) === ie.CLOSED, z = g.useCallback(() => {
3963
3964
  var I;
3964
3965
  (I = S.current) == null || I.scrollIntoView({ behavior: "smooth" });
3965
3966
  }, []), x = g.useCallback(async () => {
@@ -3978,9 +3979,9 @@ const co = "_wrapper_ukunw_1", ao = "_ticketContainer_ukunw_23", io = "_title_uk
3978
3979
  const X = async () => {
3979
3980
  const I = await L();
3980
3981
  if (!e || !r || !I || !s.trim()) return;
3981
- const b = (m == null ? void 0 : m.map((f) => ({
3982
- imageId: parseInt(f.id),
3983
- path: f.url
3982
+ const b = (m == null ? void 0 : m.map((y) => ({
3983
+ imageId: parseInt(y.id),
3984
+ path: y.url
3984
3985
  }))) || [], P = {
3985
3986
  content: s,
3986
3987
  createdAt: (/* @__PURE__ */ new Date()).toISOString(),
@@ -3990,9 +3991,9 @@ const co = "_wrapper_ukunw_1", ao = "_ticketContainer_ukunw_23", io = "_title_uk
3990
3991
  images: b
3991
3992
  };
3992
3993
  c(
3993
- (f) => f ? {
3994
- ...f,
3995
- messages: [...f.messages, P]
3994
+ (y) => y ? {
3995
+ ...y,
3996
+ messages: [...y.messages, P]
3996
3997
  } : null
3997
3998
  ), w(P.id), u(""), k(null), setTimeout(() => {
3998
3999
  z();
@@ -4007,14 +4008,14 @@ const co = "_wrapper_ukunw_1", ao = "_ticketContainer_ukunw_23", io = "_title_uk
4007
4008
  }, 1e4);
4008
4009
  }
4009
4010
  }, le = (I) => {
4010
- const b = /* @__PURE__ */ new Date(), P = new Date(I), f = Math.floor((b.getTime() - P.getTime()) / 1e3);
4011
- if (f < 60)
4011
+ const b = /* @__PURE__ */ new Date(), P = new Date(I), y = Math.floor((b.getTime() - P.getTime()) / 1e3);
4012
+ if (y < 60)
4012
4013
  return "just now";
4013
- if (f < 3600) {
4014
- const D = Math.floor(f / 60);
4014
+ if (y < 3600) {
4015
+ const D = Math.floor(y / 60);
4015
4016
  return `${D} minute${D > 1 ? "s" : ""} ago`;
4016
- } else if (f < 10800) {
4017
- const D = Math.floor(f / 3600);
4017
+ } else if (y < 10800) {
4018
+ const D = Math.floor(y / 3600);
4018
4019
  return `${D} hour${D > 1 ? "s" : ""} ago`;
4019
4020
  } else return P.getFullYear() === b.getFullYear() ? P.toLocaleDateString("en-US", {
4020
4021
  month: "short",
@@ -4097,7 +4098,7 @@ const co = "_wrapper_ukunw_1", ao = "_ticketContainer_ukunw_23", io = "_title_uk
4097
4098
  /* @__PURE__ */ a("div", { ref: S })
4098
4099
  ] }),
4099
4100
  /* @__PURE__ */ h("div", { className: d.input, children: [
4100
- !y && /* @__PURE__ */ a(
4101
+ !f && /* @__PURE__ */ a(
4101
4102
  Fe,
4102
4103
  {
4103
4104
  images: m,
@@ -4113,12 +4114,12 @@ const co = "_wrapper_ukunw_1", ao = "_ticketContainer_ukunw_23", io = "_title_uk
4113
4114
  /* @__PURE__ */ a(
4114
4115
  "textarea",
4115
4116
  {
4116
- disabled: y,
4117
+ disabled: f,
4117
4118
  className: R(d.textarea, {
4118
4119
  [d.textareaAntistock]: l
4119
4120
  }),
4120
4121
  value: s,
4121
- placeholder: y ? "The ticket has been closed. Need further assistance? Please submit a new request." : l ? "Type a message..." : "What worries you?",
4122
+ placeholder: f ? "The ticket has been closed. Need further assistance? Please submit a new request." : l ? "Type a message..." : "What worries you?",
4122
4123
  onChange: (I) => u(I.target.value),
4123
4124
  onKeyDown: (I) => {
4124
4125
  I.key === "Enter" && !I.shiftKey && (I.preventDefault(), X());
@@ -4130,7 +4131,7 @@ const co = "_wrapper_ukunw_1", ao = "_ticketContainer_ukunw_23", io = "_title_uk
4130
4131
  {
4131
4132
  onClick: X,
4132
4133
  className: R(d.button, {
4133
- [d.disabled]: y
4134
+ [d.disabled]: f
4134
4135
  }),
4135
4136
  children: /* @__PURE__ */ a(K, { name: "PaperPlaneRight" })
4136
4137
  }