@billgangcom/theme-lib 1.110.5 → 1.110.6

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 (45) hide show
  1. package/dist/{builder-BLDXBzNl.cjs → builder-B7hjBRYI.cjs} +2 -2
  2. package/dist/{builder-C64dSizd.js → builder-D_zv5ue0.js} +5 -5
  3. package/dist/{builder-components-DHTh1VoV.cjs → builder-components-BjoFBErH.cjs} +1 -1
  4. package/dist/{builder-components-FfKRBcLk.js → builder-components-DN-mNdj8.js} +4 -4
  5. package/dist/builder.cjs.js +1 -1
  6. package/dist/builder.es.js +293 -6
  7. package/dist/{charge-BHULUGTw.cjs → charge-BAP3iPAM.cjs} +1 -1
  8. package/dist/{charge-BcGATQ-j.js → charge-BQUHzEju.js} +6 -6
  9. package/dist/{checkout-C_l1R6-u.cjs → checkout-CUct7uCm.cjs} +1 -1
  10. package/dist/{checkout-DzoPtqLk.js → checkout-uzxtu1pZ.js} +5 -5
  11. package/dist/exports.cjs.js +1 -1
  12. package/dist/exports.es.js +6 -6
  13. package/dist/{index-T0XXq2pq.cjs → index-BBMTjm8A.cjs} +1 -1
  14. package/dist/{index-BLcplkmB.js → index-BJMeFohP.js} +1 -1
  15. package/dist/{index-BWeBpiO8.cjs → index-BXhAWCRX.cjs} +1 -1
  16. package/dist/{index-DugPvosX.cjs → index-CEMbDy4G.cjs} +1 -1
  17. package/dist/{index-DyfD4eoN.js → index-CMECtXvH.js} +5 -5
  18. package/dist/{index-C2mw0EhF.js → index-CX1FV9wS.js} +5 -5
  19. package/dist/{index-C23qWl0W.cjs → index-Cbqz9kIG.cjs} +1 -1
  20. package/dist/{index-Bj_McHvo.js → index-CzkkQ8sH.js} +5 -5
  21. package/dist/{index-T7iWZCzU.cjs → index-R_FZBtaZ.cjs} +1 -1
  22. package/dist/{index-Cl9CSdbF.js → index-hCDY-ip7.js} +5 -5
  23. package/dist/index.cjs.js +1 -1
  24. package/dist/index.es.js +16 -16
  25. package/dist/{order-_mx45K-F.cjs → order-BOaO9a-C.cjs} +1 -1
  26. package/dist/{order-rZVNwk6i.js → order-CdPcB1OE.js} +5 -5
  27. package/dist/{subscription-CZ9Buxql.js → subscription-DIDUTEI3.js} +5 -5
  28. package/dist/{subscription-D-GVTc5C.cjs → subscription-iNnLGi0T.cjs} +1 -1
  29. package/dist/{ticket-D8MxvdiA.js → ticket-B0VGIvyK.js} +5 -5
  30. package/dist/{ticket-SllRZ1vs.cjs → ticket-DXz_-29l.cjs} +1 -1
  31. package/dist/{top-up-CyEK2j7V.cjs → top-up-B7E7FUjn.cjs} +1 -1
  32. package/dist/{top-up-7XHWZMR7.js → top-up-BhB8jhP6.js} +5 -5
  33. package/dist/ui-components-BTotDG_w.js +6447 -0
  34. package/dist/ui-components-CWLDlDmG.cjs +1 -0
  35. package/dist/ui.cjs.js +1 -1
  36. package/dist/ui.es.js +6 -6
  37. package/dist/{validation-_p4G1oC2.cjs → validation-BVAD1q1L.cjs} +1 -1
  38. package/dist/{validation-DOeo0z9F.js → validation-jCwzu5MC.js} +5 -5
  39. package/package.json +1 -1
  40. package/dist/App-BwVII14K.cjs +0 -1
  41. package/dist/App-ytDoD626.js +0 -315
  42. package/dist/src/assets/icon-registry/runtime.d.ts +0 -8
  43. package/dist/src/assets/icons/index.d.ts +0 -3
  44. package/dist/ui-components-D2ccINdB.cjs +0 -1
  45. package/dist/ui-components-DSaAYQJp.js +0 -9475
@@ -0,0 +1 @@
1
+ "use strict";var Ut=Object.defineProperty;var Ht=(r,t,n)=>t in r?Ut(r,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):r[t]=n;var gt=(r,t,n)=>Ht(r,typeof t!="symbol"?t+"":t,n);const e=require("react/jsx-runtime"),v=require("react"),g=require("./builder-B7hjBRYI.cjs"),ke=require("./charge-BAP3iPAM.cjs"),R=require("./builder-components-BjoFBErH.cjs"),_e=require("./ticket-DXz_-29l.cjs"),Vt=require("react-dom"),Wt="_wrapper_5w9s8_1",Gt={wrapper:Wt},Xt=r=>{const{error:t}=r;return e.jsx("div",{className:Gt.wrapper,children:t})},Yt="_icon_bsuj2_1",Kt="_hoverable_bsuj2_5",_t={icon:Yt,hoverable:Kt},Ke=new Map;function Tt(r,t){Ke.set(r,t)}function Pt(r){return Ke.get(r)||null}function Qt(r){return Ke.has(r)}function Jt(){return Array.from(Ke.keys())}function Zt(r){Object.entries(r).forEach(([t,n])=>{Tt(t,n)})}const C=({name:r,fill:t="currentColor",hoverable:n=!1,onClick:s,className:a,width:i=24,height:d=24,style:c={}})=>{const o=Pt(r);return o?e.jsx(es,{children:e.jsx(o,{fill:t,style:{"--icon-fill":t,...c},className:g.clx(_t.icon,a,{[_t.hoverable]:n}),onClick:s,width:i,height:d})}):(console.warn(`Icon "${r}" is not registered. Please register it using useIconRegistration or registerIcons.`),null)};class es extends v.Component{constructor(){super(...arguments);gt(this,"state",{hasError:!1})}static getDerivedStateFromError(){return{hasError:!0}}render(){return this.state.hasError?null:this.props.children}}const ts="_block_kh9z8_8",ss="_title_kh9z8_16",ns="_subtitle_kh9z8_23",is="_alignmentContent_kh9z8_30",os="_alignments_kh9z8_39",as="_alignment_kh9z8_30",rs="_circle_kh9z8_64",cs="_paddings_kh9z8_71",ls="_padding_kh9z8_71",ds="_active_kh9z8_97",ue={block:ts,title:ss,subtitle:ns,alignmentContent:is,alignments:os,alignment:as,circle:rs,paddings:cs,padding:ls,active:ds},us="_wrapper_187gl_1",hs="_label_187gl_9",ps="_input_187gl_17",ms="_required_187gl_47",fs="_paddingless_187gl_54",gs="_content_187gl_58",_s="_borderless_187gl_66",xs="_rightIcon_187gl_77",ys="_inputPostfix_187gl_83",je={wrapper:us,label:hs,input:ps,required:ms,paddingless:fs,content:gs,borderless:_s,rightIcon:xs,inputPostfix:ys},pe=r=>{const{onChange:t,style:n,label:s,value:a,type:i,min:d,max:c,placeholder:o,disabled:u=!1,required:m=!1,regex:I,paddingless:_=!1,borderless:f=!1,editable:b=!1,isSearch:l=!1,postfix:p,id:h=s}=r,[x,S]=v.useState(!1);function j(A){return Number(A)<0?String(d):A}function $(A){return!m||!I?!0:new RegExp(I).test(A)}return e.jsxs("div",{className:je.wrapper,children:[s&&e.jsx("label",{className:je.label,htmlFor:s,children:s}),e.jsxs("div",{className:je.content,children:[e.jsx("input",{id:h,type:i||"text",onChange:A=>{if(A.stopPropagation(),i==="text")t(A.target.value);else{const O=j(A.target.value);t(O)}},value:a,autoComplete:"off",placeholder:o||"Type something...",className:g.clx(je.input,{[je.required]:x&&m&&!$(a),[je.paddingless]:_,[je.borderless]:f}),min:i==="number"?d:void 0,max:i==="number"?c:void 0,disabled:u,onFocus:()=>{f||S(!0)},style:n}),p&&e.jsx("span",{className:je.inputPostfix,children:p}),l&&e.jsx("div",{className:je.rightIcon,children:e.jsx(C,{name:"MagnifyingGlass",fill:"var(--text-secondary)",width:20,height:20})}),b&&e.jsx("div",{children:e.jsx(C,{name:"Sliders",width:20,height:20,hoverable:!0})})]})]})},vs=["topLeft","top","topRight","left","center","right","bottomLeft","bottom","bottomRight"],bs=["left","top","right","bottom"],js=r=>{const{alignment:t,padding:n,setPadding:s,setAlignment:a,isAlignment:i=!0,isPadding:d=!0}=r;function c(f){switch(f){case"left":case"topLeft":case"bottomLeft":return"TextAlignLeft";case"right":case"topRight":case"bottomRight":return"TextAlignRight";case"center":case"top":case"bottom":return"TextAlignCenter";default:return"TextAlignCenter"}}function o(f){switch(f){case"left":return"AlignLeft";case"right":return"AlignRight";case"top":return"AlignTop";case"bottom":return"AlignBottom"}}const[u,m]=v.useState(null),[I,_]=v.useState(null);return e.jsxs("div",{className:ue.layout,children:[e.jsx("h3",{className:ue.title,children:"Layout (for Desktop version)"}),e.jsxs("div",{className:ue.alignmentContent,children:[i&&e.jsxs("div",{className:ue.block,children:[e.jsx("h5",{className:ue.subtitle,children:"Alignment"}),e.jsx("div",{className:ue.alignments,children:vs.map(f=>e.jsxs("div",{onClick:()=>{a(f)},className:ue.alignment,onMouseEnter:()=>{m(f)},onMouseLeave:()=>{m(null)},children:[f!==t&&u!==f&&e.jsx("div",{className:ue.circle}),f!==t&&u===f&&e.jsx(C,{name:c(u),fill:"#c2c2c2",width:22,height:22}),f===t&&e.jsx(C,{name:c(t),fill:"#FF3F19",width:22,height:22})]},f))})]}),d&&e.jsxs("div",{className:ue.block,children:[e.jsx("h5",{className:ue.subtitle,children:"Paddings"}),e.jsx("div",{className:ue.paddings,children:bs.map(f=>e.jsxs("label",{className:g.clx(ue.padding,{[ue.active]:I===f}),onFocus:()=>{_(f)},onBlur:()=>{_(null)},children:[e.jsx("div",{children:e.jsx(C,{name:o(f),width:20,height:20})}),e.jsx(pe,{type:"number",value:String(n[f]),onChange:b=>s({...n,[f]:Math.min(Number(b),999)}),max:999,paddingless:!0,borderless:!0})]},f))})]})]})]})},Ss="_title_1uycf_1",Is="_subtitle_1uycf_5",Ns="_text_1uycf_13",ws="_top_1uycf_20",Cs="_itemsBlock_1uycf_29",ks="_textSettings_1uycf_35",Oe={title:Ss,subtitle:Is,text:Ns,top:ws,itemsBlock:Cs,textSettings:ks},$s="_typeTexts_1gfda_1",Ts="_block_1gfda_8",Ps="_active_1gfda_25",Ze={typeTexts:$s,block:Ts,active:Ps},Os=["bold","italic","underline","strike-through"],rt=r=>{const{typesText:t,setTypesText:n}=r;function s(a){switch(a){case"bold":return"TextB";case"italic":return"TextItalic";case"strike-through":return"TextStrikethrough";case"underline":return"TextUnderline"}}return e.jsx("div",{className:Ze.typeTexts,children:Os.map(a=>e.jsx("div",{className:g.clx(Ze.block,{[Ze.active]:t.includes(a)}),onClick:()=>{const i=[...t];if(i.includes(a)){const d=i.filter(c=>c!==a);n(d)}else i.push(a),n(i)},children:e.jsx(C,{name:s(a),fill:t.includes(a)?"#252525":"#757575",width:20,height:20})},String(a)))})},As="_wrapper_34cvp_1",Bs="_label_34cvp_10",Ms="_textarea_34cvp_18",Es="_length_34cvp_46",Ds="_full_34cvp_54",Fe={wrapper:As,label:Bs,textarea:Ms,length:Es,full:Ds},ct=r=>{const{onChange:t,label:n,value:s,maxLength:a,placeholder:i="Type something..."}=r,[d,c]=v.useState(s.length);return e.jsxs("div",{className:Fe.wrapper,children:[n&&e.jsx("label",{className:Fe.label,htmlFor:n,children:n}),e.jsx("textarea",{id:n,value:s,onChange:o=>{c(o.target.value.length),t(o.target.value)},placeholder:i,className:Fe.textarea,maxLength:a}),a&&e.jsxs("div",{className:g.clx(Fe.length,{[Fe.full]:d===a}),children:[d,"/",a]})]})},lt=r=>{const{typeFont:t,setTypeFont:n}=r,[s,a]=v.useState([]),i=()=>{const d=document.documentElement,c=getComputedStyle(d),o=["h1","h2","h3","h4","h5","h6","h7"].map(m=>c.getPropertyValue(`--font-heading-${m}-size`).trim()),u=["lg","md","sm"].map(m=>c.getPropertyValue(`--font-body-${m}-size`).trim());return o.push(...u),o};return v.useEffect(()=>{const d=i();d.every(c=>c)&&a(d)},[]),e.jsx(ce,{label:"Type Text",options:Object.values(g.typeFontOptions),onChange:d=>n(Object.keys(g.typeFontOptions).find(c=>g.typeFontOptions[c]===d)),value:g.typeFontOptions[t],postfixs:s})},qs="_alignTexts_xs0ug_1",Rs="_block_xs0ug_10",Ls="_active_xs0ug_28",et={alignTexts:qs,block:Rs,active:Ls},Fs=["left","center","right"],Ot=r=>{const{alignText:t,setAlignText:n}=r;function s(a){switch(a){case"left":return"TextAlignLeft";case"center":return"TextAlignCenter";case"right":return"TextAlignRight"}}return e.jsx("div",{className:et.alignTexts,children:Fs.map(a=>e.jsx("div",{className:g.clx(et.block,{[et.active]:t===a}),onClick:()=>{n(a)},children:e.jsx(C,{name:s(a),fill:t===a?"#252525":"#757575",width:20,height:20})},String(a)))})},dt=r=>{const{typesText:t,isActiveText:n,setIsActiveText:s,text:a,setText:i,setTypesText:d,title:c,subtitle:o="Items",typeFont:u,setTypeFont:m,alignText:I,setAlignText:_}=r;return e.jsxs("div",{className:Oe.text,children:[(c||n!==void 0)&&e.jsxs("div",{className:Oe.top,children:[c&&e.jsx("h3",{className:Oe.title,children:c}),n!==void 0&&s&&e.jsx(de,{current:n,onChange:f=>s(f)})]}),(n===void 0||n)&&e.jsxs("div",{className:Oe.itemsBlock,children:[e.jsx("h5",{className:Oe.subtitle,children:o}),e.jsx(ct,{onChange:f=>i(f),value:a}),e.jsxs("div",{className:Oe.textSettings,children:[e.jsx(rt,{typesText:t,setTypesText:d}),e.jsx(Ot,{alignText:I,setAlignText:_})]}),e.jsx(lt,{typeFont:u,setTypeFont:m})]})]})},zs="_title_msd5s_1",Us="_subtitle_msd5s_5",Hs="_productsBlock_msd5s_14",Vs="_top_msd5s_26",Ws="_products_msd5s_14",Gs="_product_msd5s_14",Xs="_button_msd5s_80",Ys="_disabled_msd5s_91",Ks="_buttons_msd5s_118",Qs="_modal_msd5s_125",Js="_link_msd5s_146",Zs="_modalOptions_msd5s_152",en="_addButton_msd5s_165",tn="_deleteButton_msd5s_180",sn="_closeIcon_msd5s_192",Q={title:zs,subtitle:Us,productsBlock:Hs,top:Vs,products:Ws,product:Gs,button:Xs,disabled:Ys,buttons:Ks,modal:Qs,link:Js,modalOptions:Zs,addButton:en,deleteButton:tn,closeIcon:sn},nn="_wrapper_1yh21_2",on="_label_1yh21_9",an="_icon_1yh21_16",rn="_text_1yh21_28",cn="_content_1yh21_37",ln="_modal_1yh21_48",dn="_top_1yh21_56",un="_title_1yh21_65",hn="_modalContent_1yh21_72",pn="_images_1yh21_81",mn="_add_1yh21_91",fn="_dragging_1yh21_111",gn="_description_1yh21_115",_n="_bottom_1yh21_125",xn="_cancel_1yh21_139",yn="_highlight_1yh21_144",vn="_accent_1yh21_149",bn="_image_1yh21_81",jn="_selected_1yh21_169",Sn="_checkbox_1yh21_177",In="_loading_1yh21_183",Nn="_spinner_1yh21_197",G={wrapper:nn,label:on,icon:an,text:rn,content:cn,modal:ln,top:dn,title:un,modalContent:hn,images:pn,add:mn,dragging:fn,description:gn,bottom:_n,cancel:xn,highlight:yn,accent:vn,image:bn,selected:jn,checkbox:Sn,loading:In,spinner:Nn},wn=async()=>{const r=localStorage.getItem("shopId")||void 0,n=`${g.useApiStore.getState().apiUrls.api}/v1/dash/shops/${r}/images`;return await g.request({url:n,withToken:!0,method:"get"})},Cn=async r=>{const t=localStorage.getItem("shopId")||void 0,s=`${g.useApiStore.getState().apiUrls.api}/v1/dash/shops/${t}/images`;return await g.request({url:s,withToken:!0,method:"post",body:r,contentType:"mutlipart/form-data"})},kn="_button_jptux_1",$n="_primary_jptux_20",Tn="_primaryHovered_jptux_30",Pn="_secondary_jptux_35",On="_secondaryHovered_jptux_45",An="_secondaryAntistock_jptux_50",Bn="_tertiary_jptux_61",Mn="_special_jptux_71",En="_tertiaryHovered_jptux_75",Dn="_content_jptux_80",qn="_isAntistock_jptux_88",me={button:kn,primary:$n,primaryHovered:Tn,secondary:Pn,secondaryHovered:On,secondaryAntistock:An,tertiary:Bn,special:Mn,tertiaryHovered:En,content:Dn,isAntistock:qn},Y=r=>{const{children:t,onClick:n,style:s,className:a,disabled:i=!1,type:d="Primary",dangerouslySetInnerHTML:c}=r,{themeSettings:o}=g.useThemeSettingsStore(),{isAntistock:u}=g.useGeneralStore(),m=l=>typeof l=="string"?e.jsx(ke.StableText,{children:l}):l,I={onClick:n,disabled:i,style:s,className:g.clx(me.button,a,{[me.primary]:d==="Primary",[me.secondary]:d==="Secondary"&&!u,[me.secondaryAntistock]:d==="Secondary"&&u,[me.tertiary]:d==="Tertiary",[me.primaryHovered]:d==="Primary"&&!i&&o.buttons.primary.hover&&!u,[me.secondaryHovered]:d==="Secondary"&&!i&&o.buttons.secondary.hover&&!u,[me.tertiaryHovered]:d==="Tertiary"&&!i&&o.buttons.tertiary.hover&&!u,[me.isAntistock]:u})};if(d==="Special")return e.jsx("button",{...I,className:me.special,...c?{dangerouslySetInnerHTML:c}:{children:m(t)}});const _=d.toLowerCase(),f=o.buttons[_],b=d==="Tertiary"?e.jsxs("div",{className:me.content,children:[m(t),e.jsx(C,{name:"ArrowRight",fill:"var(--text-tertiary)",width:20,height:20})]}):m(t);return e.jsx("button",{...I,style:{...s,textAlign:f.alignment},...c?{dangerouslySetInnerHTML:c}:{children:b}})},De=r=>{const{label:t,onChange:n,activeImage:s,tip:a}=r,{setOpenModal:i,setOnChange:d,setTip:c}=g.useChooseImageStore();return e.jsx(e.Fragment,{children:e.jsxs("div",{className:G.wrapper,onClick:o=>o.stopPropagation(),children:[t&&e.jsx("h4",{className:G.label,children:t}),e.jsxs("div",{onClick:()=>{d(n),i(!0),a&&c(a)},className:G.content,children:[e.jsx("div",{className:G.icon,children:s?e.jsx("img",{src:`https://imagedelivery.net/${s}/w=156,h=156`,alt:"image",style:{width:"20px",height:"20px",objectFit:"contain"}}):e.jsx(C,{name:"Plus",width:20,height:20,fill:"#757575"})}),e.jsx("span",{className:G.text,children:s?"Change Image":"Select Image"}),s&&e.jsx(C,{name:"X",width:20,height:18,fill:"#ff3f19",hoverable:!0,onClick:o=>{o.stopPropagation(),n([])}})]})]})})},Rn=()=>{const{setOpenModal:r,onChange:t,tip:n,setTip:s}=g.useChooseImageStore(),{setIsOpen:a}=g.useModalStore(),[i,d]=v.useState(!1),c=()=>{var x;(x=o.current)==null||x.click()},o=v.useRef(null),[u,m]=v.useState([]),[I,_]=v.useState(!1),f=async x=>{var O;const S=((O=x.target.files)==null?void 0:O[0])||null;if(!S)return;const j=new FormData;j.append("file",S),_(!0);const{data:$}=await Cn(j),A=[...u];A.unshift({...$.data,cfId:$.data.path}),m([...A]),_(!1)},b=x=>{x.preventDefault(),d(!1);const S=x.dataTransfer.files;if(S&&S.length>0){const $={target:{files:[S[0]]}};f($)}},l=()=>{a(!1),s(""),setTimeout(()=>{r(!1),a(!0)},300)},p=x=>{const S=u.map(j=>({...j,isSelected:j.id===x.id?!j.isSelected:!1}));m([...S])};function h(){const x=u.find(S=>S.isSelected);x&&(t==null||t([x.cfId]))}return v.useEffect(()=>{(async()=>{const{data:S}=await wn(),j=S.data.map($=>({...$,isSelected:!1}));m(j)})()},[]),e.jsxs("div",{onClick:x=>x.stopPropagation(),className:G.modal,children:[e.jsxs("div",{className:G.top,children:[e.jsx("h4",{className:G.title,children:"Select Image"}),e.jsx(C,{name:"X",width:20,height:20,hoverable:!0,onClick:l})]}),n&&e.jsx(Mt,{type:"warning",message:n,padding:5}),e.jsx("div",{className:G.modalContent,children:e.jsxs("div",{className:G.images,children:[e.jsxs("div",{className:G.input,onDragOver:x=>x.preventDefault(),onDragEnter:()=>d(!0),onDragLeave:()=>d(!1),onDrop:b,children:[e.jsxs("div",{onClick:c,className:g.clx(G.add,{[G.dragging]:i}),children:[e.jsx("div",{className:G.icon,children:e.jsx(C,{name:"Plus",width:20,height:20,fill:"#757575"})}),e.jsxs("div",{className:G.description,children:[e.jsx("span",{children:"Drag and drop images here, or "}),e.jsx("span",{className:G.highlight,children:"click to browse"}),e.jsx("br",{}),e.jsx("span",{className:G.accent,children:"up to 10MB."})]})]}),e.jsx("input",{type:"file",ref:o,style:{display:"none"},onChange:f,multiple:!1,accept:"image/*"})]}),I&&e.jsx(xt,{}),u.map(x=>e.jsx(Ln,{image:x,updateImage:p},x.id)),u.length===0&&[...new Array(5)].map((x,S)=>e.jsx(xt,{},S))]})}),e.jsxs("div",{className:G.bottom,children:[e.jsx(Y,{className:G.cancel,onClick:l,type:"Secondary",children:"Cancel"}),e.jsx(Y,{onClick:()=>{r(!1),h()},children:"Select"})]})]})},Ln=r=>{const{image:t,updateImage:n}=r;return e.jsxs("div",{className:g.clx(G.image,{[G.selected]:t.isSelected}),onClick:()=>{n({...t,isSelected:!t.isSelected})},children:[e.jsx("div",{className:G.checkbox,children:e.jsx(Et,{value:t.isSelected,onChange:s=>{n({...t,isSelected:s})}})}),e.jsx("img",{src:`https://imagedelivery.net/${t.cfId}/w=156,h=156`,alt:"image",style:{objectFit:"contain",width:"156px",height:"100px"}})]},t.id)},xt=()=>e.jsx("div",{className:G.loading,children:e.jsx("div",{className:G.spinner})});function qe(r,t){v.useEffect(()=>{function n(s){!r.current||r.current.contains(s.target)||t(s)}return document.addEventListener("mousedown",n),()=>{document.removeEventListener("mousedown",n)}},[r,t])}const Fn=v.forwardRef((r,t)=>{const{activeItem:n,setActiveItem:s,popupPosition:a,modalOptions:i,setIsOpenModal:d}=r;qe(t,()=>{s(null),d(!1)});function c(o,u){return o.length>u?`${o.slice(0,u)}...`:o}return e.jsxs("div",{ref:t,className:Q.modal,onClick:o=>{o.stopPropagation()},style:{top:`${a.top}px`,left:`${a.left}px`},children:[e.jsxs("div",{className:Q.top,children:[e.jsx("h3",{className:Q.title,children:c(n.name["en-US"],20)}),e.jsx("div",{className:Q.closeIcon,children:e.jsx(C,{name:"X",height:20,width:20,onClick:()=>{s(null),d(!1)}})})]}),e.jsx("div",{className:Q.modalOptions,children:i.map(o=>{if(o.type==="image")return e.jsx(De,{label:"Put up an attractive image",activeImage:n[o.field],onChange:u=>{const m={...n,[o.field]:u};s(m)}},String(o.field));if(o.type==="text")return e.jsx(dt,{isActiveText:!0,typesText:n[o.field.type],setTypesText:u=>{const m={...n,[o.field.type]:u};s(m)},alignText:n[o.field.alignText],setAlignText:u=>{const m={...n,[o.field.alignText]:u};s(m)},text:n[o.field.text]["en-US"]||"",setText:u=>{const m={...n,[o.field.text]:{"en-US":u}};s(m)},typeFont:n[o.field.typeFont],setTypeFont:u=>{const m={...n,[o.field.typeFont]:u};s(m)},subtitle:o.label});if(o.type==="input")return e.jsx(pe,{onChange:u=>{const m={...n,[o.field]:u};s(m)},value:n[o.field]||"",label:o.label,placeholder:o.placeholder});if(o.type==="inputSwitch")return e.jsxs("div",{className:Q.link,children:[e.jsx(pe,{onChange:u=>{const m={...n,[o.field.text]:u};s(m)},value:n[o.field.text]||"",label:o.inputLabel,placeholder:o.placeholder}),e.jsx(de,{current:!!n[o.field.switch]||!1,label:o.switchLabel,onChange:u=>{const m={...n,[o.field.switch]:u};s(m)}})]});if(o.type==="list")return e.jsx(At,{items:n[o.field]||[],setItems:u=>{const m={...n,[o.field]:u};s(m)},itemsType:"select",draggable:o.draggable||!1,itemsOptions:o.itemsOptions,deletable:o.deletable||!1,editable:o.editable||!1,subtitle:o.label,addableOptions:o.addableOptions,modalOptions:o.modalOptions});if(o.type==="select")return e.jsx(ce,{options:o.itemsOptions,onChange:u=>{const m={...n,[o.field]:u};s(m)},label:o.label,value:n[o.field]||"String",leftAddonOptions:o.leftAddonOptions,switcher:o.switcher?{value:!!n[o.switcher],onChange:u=>{if(o.switcher==="isActive"){const m={...n,[o.switcher]:u};s(m)}}}:void 0});if(o.type==="selectTypeFont")return e.jsx(lt,{typeFont:n[o.field],setTypeFont:u=>{const m={...n,[o.field]:u};s(m)}});if(o.type==="selectInfiniteList")return e.jsx(ft,{options:o.itemsOptions,onChange:u=>{const m={...n,[o.field]:u};s(m)},label:o.label,value:n[o.field]||"String",leftAddonOptions:o.leftAddonOptions,switcher:o.switcher?{value:!!n[o.switcher],onChange:u=>{if(o.switcher==="isActive"){const m={...n,[o.switcher]:u};s(m)}}}:void 0})})})]})}),zn="_other_1a1tk_1",Un="_subtitle_1a1tk_7",Hn="_items_1a1tk_14",tt={other:zn,subtitle:Un,items:Hn},ze=r=>{const{items:t,otherTitle:n,tagsTitle:s}=r;return e.jsxs("div",{className:tt.other,children:[e.jsx("h5",{className:tt.subtitle,children:n||s}),e.jsx("div",{className:tt.items,children:t.map((a,i)=>e.jsx(de,{current:a.isItem,onChange:d=>a.setIsItem(d),label:a.label,hasBackground:!0,paddingless:!1},i))})]})};function Vn({product:r,children:t}){const{attributes:n,listeners:s,setNodeRef:a,transform:i,transition:d,isDragging:c}=R.useSortable({id:r.id}),o={transform:R.CSS.Transform.toString(i),transition:d};return e.jsx("div",{ref:a,style:o,className:`${Q.product} ${c?Q.dragging:""}`,...n,...s,children:t})}const At=r=>{const{isActiveItems:t,setIsActiveItems:n,items:s,setItems:a,other:i,title:d,subtitle:c,editable:o=!0,draggable:u=!1,withImage:m=!1,deletable:I=!0,addable:_=!0,itemsType:f,itemsPlaceholder:b="",itemsOptions:l,hasRangeSelector:p=!1,rangeSelectorOptions:h,modalOptions:x,addableOptions:S={},limit:j,autoInterval:$,tip:A,aspectRatio:O,setAspectRatio:y}=r,[T,w]=v.useState(null),[M,N]=v.useState({top:0,left:0}),[k,U]=v.useState(null),E=v.useRef(null),[V,P]=v.useState(!1),q=R.useSensors(R.useSensor(R.PointerSensor,{activationConstraint:{distance:5}}));v.useEffect(()=>{if(T){const B=[...s].map(W=>W.id===T.id?T:W);a(B)}},[T]),v.useEffect(()=>{if(E.current&&k){const B=E.current.getBoundingClientRect().height,W=window.innerHeight;let X=k.top;X+B>W+window.scrollY-200&&(X=W+window.scrollY-B-200),X<0&&(X=10),N({top:X-30,left:k.left})}},[E.current,k]);const F=(B,W)=>{B.stopPropagation();const X=B.target.getBoundingClientRect();U({top:X.top+window.scrollY-70,left:X.left-(_?30:65)}),w(W),P(!0)},L=(B,W)=>{const X=[...s],xe={...B,id:Math.random().toString(36).substr(2,9)};X.splice(W+1,0,xe),a(X)};function se(B){if(m)return B?e.jsx("img",{src:`https://imagedelivery.net/${B[0]}/w=50`,alt:"image",width:16,height:16}):e.jsx(C,{name:"Image",width:16,height:16,fill:"#757575"})}const Z=B=>{const{active:W,over:X}=B;if(X&&W.id!==X.id){const xe=s.findIndex(D=>D.id===W.id),Le=s.findIndex(D=>D.id===X.id);if(xe!==-1&&Le!==-1){const D=[...s],[ne]=D.splice(xe,1);D.splice(Le,0,ne),a(D)}}},K=(B,W)=>{var xe,Le;const X=e.jsxs(e.Fragment,{children:[u&&e.jsx("div",{children:e.jsx(C,{name:"DotsSixVertical",hoverable:!0,width:20,height:20})}),f==="select"&&l&&e.jsx(ce,{onChange:D=>{const ne=[...s],ye=l.find(be=>be.name["en-US"]===D);if(!ye)return;const ve=ne.map(be=>be.id===B.id?{...ye,name:{"en-US":D}}:be);w({...B,name:{"en-US":D}}),a([...ve])},value:B.name["en-US"],options:l.filter(D=>!s.find(ne=>ne.name["en-US"]===D.name["en-US"])).map(D=>D.name["en-US"]),leftAddonOptions:l.filter(D=>{var ne;return((ne=D.images)==null?void 0:ne.length)>0}).map(D=>({value:D.name["en-US"],addon:se(D.images)}))}),f==="selectInfiniteList"&&l&&e.jsx(ft,{onChange:D=>{const ne=[...s],ye=l.find(be=>be.name["en-US"]===D);if(!ye)return;const ve=ne.map(be=>be.id===B.id?{...ye,name:{"en-US":D}}:be);w({...B,name:{"en-US":D}}),a([...ve])},value:B.name["en-US"],options:l.filter(D=>!s.find(ne=>ne.name["en-US"]===D.name["en-US"])).map(D=>D.name["en-US"]),leftAddonOptions:l.filter(D=>{var ne;return((ne=D.images)==null?void 0:ne.length)>0}).map(D=>({value:D.name["en-US"],addon:se(D.images)}))}),f==="input"&&e.jsx(pe,{onChange:D=>{const ye=[...s].map(ve=>ve.id===B.id?{...B,name:{"en-US":D}}:ve);a([...ye])},value:B.name["en-US"],placeholder:b}),f==="image"&&e.jsx(De,{onChange:D=>{const ye=[...s].map(ve=>ve.id===B.id?{...B,images:D}:ve);a([...ye])},activeImage:(xe=s.find(D=>D.id===B.id))!=null&&xe.images?(Le=s.find(D=>D.id===B.id))==null?void 0:Le.images[0]:void 0,tip:A}),e.jsxs("div",{className:Q.buttons,children:[j&&j>s.length&&_&&e.jsx("div",{className:Q.deleteButton,children:e.jsx(C,{name:"Copy",hoverable:!0,width:20,height:20,onClick:()=>{L(B,W)}})}),o&&e.jsx("div",{className:Q.deleteButton,children:e.jsx(C,{name:"Sliders",hoverable:!0,width:20,height:20,onClick:D=>{F(D,B)}})}),I&&e.jsx("div",{className:Q.deleteButton,children:e.jsx(C,{name:"Trash",hoverable:!0,width:20,height:20,fill:"#C12A2A",onClick:()=>a(s.filter(D=>D.id!==B.id))})})]})]});return u?e.jsx(Vn,{product:B,index:W,children:X},B.id):e.jsx("div",{className:Q.product,children:X},B.id)};return e.jsxs("div",{className:Q.productsBlock,children:[(d||t!==void 0)&&e.jsxs("div",{className:Q.top,children:[d&&e.jsx("h3",{className:Q.title,children:d}),t!==void 0&&e.jsx(de,{current:t,onChange:B=>n==null?void 0:n(B)})]}),T&&o&&x&&V&&e.jsx(Fn,{ref:E,activeItem:T,setActiveItem:w,popupPosition:M,modalOptions:x,setIsOpenModal:P}),(t===void 0||t)&&p&&h&&e.jsx(Qe,{...h}),(t===void 0||t)&&e.jsxs("div",{className:Q.products,children:[c&&e.jsx("h5",{className:Q.subtitle,children:c}),u?e.jsx(R.DndContext,{sensors:q,onDragEnd:Z,children:e.jsx(R.SortableContext,{items:s.map(B=>B.id),strategy:R.verticalListSortingStrategy,children:s.map((B,W)=>K(B,W))})}):s.map((B,W)=>K(B,W)),_&&e.jsx("div",{style:{width:"100%",display:"flex",justifyContent:"center"},children:e.jsx(Ie,{withoutHover:!0,className:g.clx(Q.button,{[Q.disabled]:!!(j&&j<=s.length||s.length===(l==null?void 0:l.length))}),size:"s",disabled:!!(j&&j<=s.length||s.length===(l==null?void 0:l.length)),onClick:()=>{const B=[...s];let W=null;if(l){for(let X=0;X<l.length;X++)if(!s.find(xe=>xe.id===l[X].id)){W=l[X];break}}f==="select"&&l?B.push({name:W?W.name:l[0].name,id:(W==null?void 0:W.id)||l[0].id,...S}):f==="input"?B.push({name:{"en-US":""},id:g.v4(),...S}):B.push({name:{"en-US":`Image ${s.length+1}`},id:g.v4(),...S}),a(B)},style:{width:"fit-content"},children:e.jsxs("div",{className:Q.addButton,children:[e.jsx("span",{children:"Add Option"}),e.jsx(C,{name:"Plus",width:16,height:16})]})})})]}),O&&y&&e.jsx(ce,{value:O,label:"Aspect Ratio",options:Object.keys(g.aspectRatio),onChange:B=>y(B),leftAddonOptions:g.aspectRatioOptions}),(t===void 0||t)&&i!==void 0&&e.jsx(ze,{otherTitle:"Other",items:i}),(t===void 0||t)&&$!==void 0&&e.jsx(pe,{label:$.title||"Auto scroll interval",type:"number",value:String($.autoInterval),onChange:B=>$.setAutoInterval(Number(B)),min:.1,max:100,style:{width:"100%"},postfix:"sec."})]})},Wn="_title_82zux_1",Gn="_subtitle_82zux_5",Xn="_productsBlock_82zux_14",Yn="_top_82zux_26",Kn="_products_82zux_14",Qn="_product_82zux_14",Jn="_button_82zux_80",Zn="_disabled_82zux_91",ei="_buttons_82zux_118",ti="_addButton_82zux_157",si="_deleteButton_82zux_179",he={title:Wn,subtitle:Gn,productsBlock:Xn,top:Yn,products:Kn,product:Qn,button:Jn,disabled:Zn,buttons:ei,addButton:ti,deleteButton:si},ni="_button_1gxoe_1",ii="_primary_1gxoe_14",oi="_secondary_1gxoe_22",ai="_tertiary_1gxoe_30",ri="_content_1gxoe_38",ci="_withoutHover_1gxoe_45",Ae={button:ni,primary:ii,secondary:oi,tertiary:ai,content:ri,withoutHover:ci},Ie=r=>{const{children:t,onClick:n,style:s,className:a,disabled:i=!1,size:d="m",type:c="Primary",withoutHover:o=!1}=r;return e.jsx("button",{className:g.clx(Ae.button,a,{[Ae.primary]:c==="Primary",[Ae.secondary]:c==="Secondary",[Ae.tertiary]:c==="Tertiary",[Ae.withoutHover]:o}),onClick:n,style:{...s,fontSize:d==="m"?14:d==="s"?12:16},disabled:i,children:c==="Tertiary"?e.jsxs("div",{className:Ae.content,children:[t,e.jsx(C,{name:"ArrowRight",fill:"#757575",width:20,height:20})]}):e.jsx(e.Fragment,{children:t})})};function li({id:r,children:t}){const{attributes:n,listeners:s,setNodeRef:a,transform:i,transition:d,isDragging:c}=R.useSortable({id:r}),o={transform:R.CSS.Transform.toString(i),transition:d};return e.jsx("div",{ref:a,style:o,className:`${he.product} ${c?he.dragging:""}`,...n,...s,children:t})}const di=r=>{const{isActiveItems:t,setIsActiveItems:n,items:s,setItems:a,other:i,tags:d,title:c,subtitle:o,draggable:u=!1,withImage:m=!1,addable:I=!0,itemsOptions:_,hasRangeSelector:f=!1,rangeSelectorOptions:b,limit:l,autoScrollInterval:p,deletable:h,aspectRatio:x,setAspectRatio:S}=r,j=R.useSensors(R.useSensor(R.PointerSensor,{activationConstraint:{distance:5}})),$=y=>{const{active:T,over:w}=y;if(w&&T.id!==w.id){const M=s.findIndex(k=>k===T.id),N=s.findIndex(k=>k===w.id);if(M!==-1&&N!==-1){const k=[...s],[U]=k.splice(M,1);k.splice(N,0,U),a(k)}}};function A(y){if(m)return y?e.jsx("img",{src:`https://imagedelivery.net/${y[0]}/w=1000`,alt:"image",width:16,height:16}):e.jsx(C,{name:"Image",width:16,height:16,fill:"#757575"})}const O=(y,T=!1)=>{const w=_.find(N=>N.id===y);if(!w)return;const M=e.jsxs(e.Fragment,{children:[u&&e.jsx("div",{children:e.jsx(C,{name:"DotsSixVertical",hoverable:!0,width:20,height:20})}),e.jsx(ce,{onChange:N=>{const k=[...s],U=_.find(P=>P.name===N);if(!U)return;const E=U.id,V=k.map(P=>P===y?E:P);a([...V])},value:w.name,options:_.filter(N=>!s.find(k=>k===N.id)).map(N=>N.name),leftAddonOptions:_.map(N=>({value:N.name,addon:A(N.images)}))}),T&&e.jsx("div",{className:he.buttons,children:e.jsx("div",{className:he.deleteButton,children:e.jsx(C,{name:"Trash",hoverable:!0,width:20,height:20,fill:"#C12A2A",onClick:()=>a(s.filter(N=>N!==y))})})})]});return u?e.jsx(li,{id:y,children:M},g.v4()):e.jsx("div",{className:he.product,children:M},g.v4())};return e.jsxs("div",{className:he.productsBlock,children:[(c||t!==void 0)&&e.jsxs("div",{className:he.top,children:[c&&e.jsx("h3",{className:he.title,children:c}),t!==void 0&&e.jsx(de,{current:t,onChange:y=>n==null?void 0:n(y)})]}),f&&b&&e.jsx(Qe,{...b}),e.jsxs("div",{className:he.products,children:[o&&e.jsx("h5",{className:he.subtitle,children:o}),u?e.jsx(R.DndContext,{sensors:j,onDragEnd:$,children:e.jsx(R.SortableContext,{items:s,strategy:R.verticalListSortingStrategy,children:s.map(y=>O(y,h))})}):s.map(y=>O(y,h)),I&&e.jsx("div",{style:{width:"100%",display:"flex",justifyContent:"center",gap:5},children:e.jsx(Ie,{withoutHover:!0,className:g.clx(he.button,{[he.disabled]:!!(l&&l<=s.length||s.length===_.length)}),size:"s",disabled:!!(l&&l<=s.length||s.length===_.length),onClick:()=>{const y=[...s];let T=null;if(_){for(let w=0;w<_.length;w++)if(!s.find(M=>M===_[w].id)){T=_[w];break}}y.push((T==null?void 0:T.id)||_[0].id),a(y)},style:{width:"fit-content"},children:e.jsxs("div",{className:he.addButton,children:[e.jsx("span",{children:"Add Option"}),e.jsx(C,{name:"Plus",width:16,height:16})]})})})]}),x&&S&&e.jsx(ce,{value:x,label:"Aspect Ratio",options:Object.keys(g.aspectRatio),onChange:y=>S(y),leftAddonOptions:g.aspectRatioOptions}),d!==void 0&&e.jsx(ze,{tagsTitle:"Tags",items:d}),i!==void 0&&e.jsx(ze,{otherTitle:"Other",items:i}),p!==void 0&&e.jsx(pe,{label:"Auto scroll interval",type:"number",value:String(p.scrollInterval),onChange:y=>p.setScrollInterval(Number(y)),min:.1,max:100,style:{width:"100%"},postfix:"sec."})]})},ui="_title_roi3a_1",hi="_subtitle_roi3a_5",pi="_productsBlock_roi3a_14",mi="_top_roi3a_26",fi="_products_roi3a_14",gi="_product_roi3a_14",_i="_button_roi3a_80",xi="_disabled_roi3a_91",yi="_buttons_roi3a_118",vi="_addButton_roi3a_164",bi="_deleteButton_roi3a_179",le={title:ui,subtitle:hi,productsBlock:pi,top:mi,products:fi,product:gi,button:_i,disabled:xi,buttons:yi,addButton:vi,deleteButton:bi};function ji({product:r,children:t}){const{attributes:n,listeners:s,setNodeRef:a,transform:i,transition:d,isDragging:c}=R.useSortable({id:r.id}),o={transform:R.CSS.Transform.toString(i),transition:d};return e.jsx("div",{ref:a,style:o,className:`${le.product} ${c?le.dragging:""}`,...n,...s,children:t})}const Si=r=>{const{isActiveItems:t,setIsActiveItems:n,items:s,setItems:a,title:i,subtitle:d,editable:c=!0,draggable:o=!1,deletable:u=!0,addable:m=!0,itemsType:I,itemsOptions:_,addableOptions:f={},limit:b}=r,[l,p]=v.useState(null),[h,x]=v.useState(null),S=v.useRef(null),j=R.useSensors(R.useSensor(R.PointerSensor,{activationConstraint:{distance:5}}));v.useEffect(()=>{if(l){const y=[...s].map(T=>T.id===l.id?l:T);a(y)}},[l]),v.useEffect(()=>{S.current&&h&&(S.current.getBoundingClientRect().height,h.top)},[S.current,h]);const $=(y,T)=>{y.stopPropagation();const w=y.target.getBoundingClientRect();x({top:w.top+window.scrollY,left:w.left-30}),p(T)},A=y=>{const{active:T,over:w}=y;if(w&&T.id!==w.id){const M=s.findIndex(k=>k.id===T.id),N=s.findIndex(k=>k.id===w.id);if(M!==-1&&N!==-1){const k=[...s],[U]=k.splice(M,1);k.splice(N,0,U),a(k)}}},O=(y,T)=>{const w=e.jsxs(e.Fragment,{children:[o&&e.jsx("div",{children:e.jsx(C,{name:"DotsSixVertical",hoverable:!0,width:20,height:20})}),I==="select"&&_&&e.jsx(ce,{onChange:M=>{const N=[...s],k=_.find(E=>E.name===M);if(!k)return;const U=N.map(E=>E.id===y.id?{...k,name:{"en-US":M}}:E);p({...y,name:{"en-US":M}}),a([...U])},value:y.name,options:_.filter(M=>!s.find(N=>N.name===M.name)).map(M=>M.name)}),e.jsxs("div",{className:le.buttons,children:[c&&e.jsx("div",{className:le.deleteButton,children:e.jsx(C,{name:"Sliders",hoverable:!0,width:20,height:20,onClick:M=>$(M,y)})}),u&&e.jsx("div",{className:le.deleteButton,children:e.jsx(C,{name:"Trash",hoverable:!0,width:20,height:20,fill:"#C12A2A",onClick:()=>a(s.filter(M=>M.id!==y.id))})})]})]});return o?e.jsx(ji,{product:y,index:T,children:w},y.id):e.jsx("div",{className:le.product,children:w},y.id)};return e.jsxs("div",{className:le.productsBlock,children:[(i||t!==void 0)&&e.jsxs("div",{className:le.top,children:[i&&e.jsx("h3",{className:le.title,children:i}),t!==void 0&&e.jsx(de,{current:t,onChange:y=>n==null?void 0:n(y)})]}),e.jsxs("div",{className:le.products,children:[d&&e.jsx("h5",{className:le.subtitle,children:d}),o?e.jsx(R.DndContext,{sensors:j,onDragEnd:A,children:e.jsx(R.SortableContext,{items:s.map(y=>y.id),strategy:R.verticalListSortingStrategy,children:s.map((y,T)=>O(y,T))})}):s.map((y,T)=>O(y,T)),m&&e.jsx("div",{style:{width:"100%",display:"flex",justifyContent:"center"},children:e.jsx(Ie,{withoutHover:!0,className:g.clx(le.button,{[le.disabled]:!!(b&&b<=s.length||s.length===(_==null?void 0:_.length))}),size:"s",disabled:!!(b&&b<=s.length||s.length===(_==null?void 0:_.length)),onClick:()=>{const y=[...s];let T=null;if(_){for(let w=0;w<_.length;w++)if(!s.find(M=>M.id===_[w].id)){T=_[w];break}}I==="select"&&_&&y.push({name:T?T.name:_[0].name,id:(T==null?void 0:T.id)||_[0].id,...f}),a(y)},style:{width:"fit-content"},children:e.jsxs("div",{className:le.addButton,children:[e.jsx("span",{children:"Add Option"}),e.jsx(C,{name:"Plus",width:16,height:16})]})})})]})]})},Ii="_title_cx65i_1",Ni="_subtitle_cx65i_5",wi="_productsBlock_cx65i_14",Ci="_top_cx65i_26",ki="_products_cx65i_14",$i="_product_cx65i_14",Ti="_button_cx65i_80",Pi="_disabled_cx65i_91",Oi="_buttons_cx65i_118",Ai="_modal_cx65i_125",Bi="_link_cx65i_146",Mi="_modalOptions_cx65i_152",Ei="_addButton_cx65i_165",Di="_deleteButton_cx65i_180",qi="_closeIcon_cx65i_192",J={title:Ii,subtitle:Ni,productsBlock:wi,top:Ci,products:ki,product:$i,button:Ti,disabled:Pi,buttons:Oi,modal:Ai,link:Bi,modalOptions:Mi,addButton:Ei,deleteButton:Di,closeIcon:qi},Ri=v.forwardRef((r,t)=>{const{activeItem:n,setActiveItem:s,popupPosition:a,modalOptions:i,setIsOpenModal:d}=r;return qe(t,()=>{s(null),d(!1)}),e.jsxs("div",{ref:t,className:J.modal,onClick:c=>{c.stopPropagation()},style:{top:`${a.top}px`,left:`${a.left}px`},children:[e.jsxs("div",{className:J.top,children:[e.jsx("h3",{className:J.title,children:n.name["en-US"]}),e.jsx("div",{className:J.closeIcon,children:e.jsx(C,{name:"X",height:20,width:20,hoverable:!0,onClick:()=>{s(null),d(!1)}})})]}),e.jsx("div",{className:J.modalOptions,children:i.map(c=>{if(c.type==="image")return e.jsx(De,{label:"Put up an attractive image",activeImage:n[c.field],onChange:o=>{const u={...n,[c.field]:o};s(u)}},String(c.field));if(c.type==="text")return e.jsx(dt,{isActiveText:!0,typesText:n[c.field.type],setTypesText:o=>{const u={...n,[c.field.type]:o};s(u)},alignText:n[c.field.alignText],setAlignText:o=>{const u={...n,[c.field.alignText]:o};s(u)},text:n[c.field.text]["en-US"]||"",setText:o=>{const u={...n,[c.field.text]:{"en-US":o}};s(u)},typeFont:n[c.field.type],setTypeFont:o=>{const u={...n,[c.field.type]:o};s(u)},subtitle:c.label});if(c.type==="input")return e.jsx(pe,{onChange:o=>{const u={...n,[c.field]:{"en-US":o}};s(u)},value:n[c.field]["en-US"]||"",label:c.label,placeholder:c.placeholder});if(c.type==="inputNumber")return e.jsx(pe,{onChange:o=>{const u={...n,[c.field]:o};s(u)},value:n[c.field]||"",label:c.label,placeholder:c.placeholder,type:"number"});if(c.type==="inputSwitch")return e.jsxs("div",{className:J.link,children:[e.jsx(pe,{onChange:o=>{const u={...n,[c.field.text]:{"en-US":o}};s(u)},value:n[c.field.text]["en-US"]||"",label:c.inputLabel,placeholder:c.placeholder}),e.jsx(de,{current:!!n[c.field.switch]||!1,label:c.switchLabel,onChange:o=>{const u={...n,[c.field.switch]:o};s(u)}})]});if(c.type==="select")return e.jsx(ce,{options:c.itemsOptions,onChange:o=>{const u={...n,[c.field]:o};s(u)},label:c.label,value:n[c.field]||"String",leftAddonOptions:c.leftAddonOptions})})})]})});function Li(r){const{product:t,children:n}=r,{attributes:s,listeners:a,setNodeRef:i,transform:d,transition:c,isDragging:o}=R.useSortable({id:t.id}),u={transform:R.CSS.Transform.toString(d),transition:c};return e.jsx("div",{ref:i,style:u,className:`${J.product} ${o?J.dragging:""}`,...s,...a,children:n})}const Fi=r=>{const{isActiveItems:t,setIsActiveItems:n,items:s,setItems:a,other:i,title:d,subtitle:c,editable:o=!0,draggable:u=!1,deletable:m=!0,addable:I=!0,itemsType:_,itemsPlaceholder:f="",itemsOptions:b,hasRangeSelector:l=!1,rangeSelectorOptions:p,modalOptions:h,addableOptions:x={},limit:S}=r,[j,$]=v.useState(null),[A,O]=v.useState({top:0,left:0}),[y,T]=v.useState(null),w=v.useRef(null),[M,N]=v.useState(!1),k=R.useSensors(R.useSensor(R.PointerSensor,{activationConstraint:{distance:5}}));v.useEffect(()=>{const P=()=>{$(null),N(!1)};return document.body.addEventListener("click",P),$(null),N(!1),()=>{$(null),N(!1),document.body.removeEventListener("click",P)}},[]),v.useEffect(()=>{if(j){const P=[...s].map(q=>q.id===j.id?j:q);a(P)}},[j]),v.useEffect(()=>{if(w.current&&y){const P=w.current.getBoundingClientRect().height,q=window.innerHeight;let F=y.top;F+P>q+window.scrollY-200&&(F=q+window.scrollY-P-200),F<0&&(F=10),O({top:F,left:y.left})}},[w.current,y]);const U=(P,q)=>{P.stopPropagation();const F=P.target.getBoundingClientRect();T({top:F.top+window.scrollY,left:F.left-30}),$(q),N(!0)},E=P=>{const{active:q,over:F}=P;if(F&&q.id!==F.id){const L=s.findIndex(Z=>Z.id===q.id),se=s.findIndex(Z=>Z.id===F.id);if(L!==-1&&se!==-1){const Z=[...s],[K]=Z.splice(L,1);Z.splice(se,0,K),a(Z)}}},V=P=>{var F;const q=e.jsxs(e.Fragment,{children:[u&&e.jsx("div",{children:e.jsx(C,{name:"DotsSixVertical",hoverable:!0,width:20,height:20})}),_==="select"&&b&&e.jsx(ce,{onChange:L=>{const Z=[...s].map(K=>K.id===P.id?{...P,name:{"en-US":L}}:K);$({...P,name:{"en-US":L}}),a([...Z])},value:P.name["en-US"],options:b.filter(L=>!s.find(se=>se.name["en-US"]===L))}),_==="input"&&e.jsx(pe,{onChange:L=>{const Z=[...s].map(K=>K.id===P.id?{...P,name:{"en-US":L}}:K);a([...Z])},value:P.name["en-US"],placeholder:f}),_==="image"&&e.jsx(De,{onChange:L=>{const Z=[...s].map(K=>K.id===P.id?{...P,images:L}:K);a([...Z])},activeImage:(F=s.find(L=>L.id===P.id))==null?void 0:F.images[0]}),e.jsxs("div",{className:J.buttons,children:[o&&e.jsx("div",{className:J.deleteButton,children:e.jsx(C,{name:"Sliders",hoverable:!0,width:20,height:20,onClick:L=>U(L,P)})}),m&&e.jsx("div",{className:J.deleteButton,children:e.jsx(C,{name:"Trash",hoverable:!0,width:20,height:20,fill:"#C12A2A",onClick:()=>a(s.filter(L=>L.id!==P.id))})})]})]});return u?e.jsx(Li,{product:P,children:q},P.id):e.jsx("div",{className:J.product,children:q},P.id)};return e.jsxs("div",{className:J.productsBlock,children:[(d||t!==void 0)&&e.jsxs("div",{className:J.top,children:[d&&e.jsx("h3",{className:J.title,children:d}),t!==void 0&&e.jsx(de,{current:t,onChange:P=>n==null?void 0:n(P)})]}),j&&o&&h&&M&&e.jsx(Ri,{ref:w,activeItem:j,setActiveItem:$,popupPosition:A,modalOptions:h,setIsOpenModal:N}),l&&p&&e.jsx(Qe,{...p}),e.jsxs("div",{className:J.products,children:[c&&e.jsx("h5",{className:J.subtitle,children:c}),u?e.jsx(R.DndContext,{sensors:k,onDragEnd:E,children:e.jsx(R.SortableContext,{items:s.map(P=>P.id),strategy:R.verticalListSortingStrategy,children:s.map(P=>V(P))})}):s.map(P=>V(P)),I&&e.jsx("div",{style:{width:"100%",display:"flex",justifyContent:"center"},children:e.jsx(Ie,{withoutHover:!0,className:g.clx(J.button,{[J.disabled]:!!(S&&S<=s.length)}),size:"s",disabled:!!(S&&S<=s.length),onClick:()=>{const P=[...s];let q=null;if(b){for(let F=0;F<b.length;F++)if(!s.find(L=>L.name["en-US"]===b[F])){q=b[F];break}}_==="select"&&b?P.push({name:{"en-US":q||b[0]},id:g.v4(),...x,maxSymbols:100}):_==="input"?P.push({name:{"en-US":""},id:g.v4(),...x,maxSymbols:100}):P.push({name:{"en-US":`Image ${s.length+1}`},id:g.v4(),...x,maxSymbols:100}),a(P)},style:{width:"fit-content"},children:e.jsxs("div",{className:J.addButton,children:[e.jsx("span",{children:"Add Option"}),e.jsx(C,{name:"Plus",width:16,height:16})]})})})]}),i!==void 0&&e.jsx(ze,{otherTitle:"Other",items:i})]})},zi="_title_hvj8m_1",Ui="_buttonsBlock_hvj8m_15",Hi="_top_hvj8m_26",Vi="_modal_hvj8m_120",Wi="_options_hvj8m_146",Gi="_closeIcon_hvj8m_154",Ce={title:zi,buttonsBlock:Ui,top:Hi,modal:Vi,options:Wi,closeIcon:Gi},Xi=v.forwardRef((r,t)=>{var S;const{activeButton:n,setActiveButton:s,popupPosition:a,editableLink:i=!0}=r,[d,c]=v.useState(n.typesText),[o,u]=v.useState(n.destination),[m,I]=v.useState(n.page),[_,f]=v.useState(n.link||""),[b,l]=v.useState(n.text||{"en-US":""}),[p,h]=v.useState(n.openInNewTab),{pages:x}=g.usePagesStore();return qe(t,()=>{s(null)}),v.useEffect(()=>{s({...n,...{text:b,link:_,destination:o,typesText:d,page:m,openInNewTab:p}})},[d,o,_,b,m,p]),e.jsxs("div",{className:Ce.modal,onClick:j=>{j.stopPropagation()},style:{top:`${a.top}px`,left:`${a.left}px`},ref:t,children:[e.jsxs("div",{className:Ce.top,children:[e.jsx("h3",{className:Ce.title,children:n.type}),e.jsx("div",{className:Ce.closeIcon,children:e.jsx(C,{name:"X",height:20,width:20,hoverable:!0,onClick:()=>s(null)})})]}),e.jsxs("div",{className:Ce.options,children:[i&&e.jsx(ce,{label:"Destination",onChange:j=>u(j),options:["Go to Page","Open Link"].filter(j=>j!==o),value:o}),i&&(o==="Go to Page"?e.jsx(ce,{label:"Go to",onChange:j=>{if(j==="Sign In")I("/customer-dash");else if(x){for(const $ in x)if(x[$].name===j){I(x[$].path);break}}else I(g.defaultPagePaths[0])},options:x?[...Object.values(x).filter(j=>j.path!==m).map(j=>j.name),"Sign In"]:["Sign In"],value:x?m==="/customer-dash"?"Sign In":((S=Object.values(x).find(j=>j.path===m))==null?void 0:S.name)||"Home":"Home"}):e.jsx(pe,{onChange:j=>f(j),value:_,placeholder:"https://",label:"Link"})),i&&e.jsx(de,{current:n.openInNewTab,label:"Open in new tab",onChange:j=>h(j)}),e.jsx(ct,{onChange:j=>l({"en-US":j}),value:b["en-US"],label:"Text"}),e.jsx(rt,{typesText:d,setTypesText:c})]})]})}),Yi="_subtitle_jql1y_1",Ki="_products_jql1y_10",Qi="_product_jql1y_10",Ji="_button_jql1y_11",Zi="_buttons_jql1y_11",eo="_addButton_jql1y_150",to="_deleteButton_jql1y_165",Se={subtitle:Yi,products:Ki,product:Qi,button:Ji,buttons:Zi,addButton:eo,deleteButton:to},Bt=r=>{const{buttons:t,setButtons:n,deletable:s=!0,addable:a=!0,editableLink:i=!0}=r,{pages:d}=g.usePagesStore(),[c,o]=v.useState(null),[u,m]=v.useState({top:0,left:0}),[I,_]=v.useState(null),f=v.useRef(null);v.useEffect(()=>{if(c){const p=[...t].map(h=>h.id===c.id?c:h);n(p)}},[c]),v.useEffect(()=>{if(f.current&&I){const p=f.current.getBoundingClientRect().height,h=window.innerHeight;let x=I.top;x+p>h+window.scrollY-200&&(x=h+window.scrollY-p-200),x<0&&(x=10),m({top:x,left:I.left})}},[f.current,I]);const b=(p,h)=>{p.stopPropagation();const x=p.target.getBoundingClientRect();_({top:x.top+window.scrollY-70,left:x.left-(a?30:65)}),o(h)},l=(p,h)=>{const x=[...t],S={...p,id:Math.random().toString(36).substr(2,9)};x.splice(h+1,0,S),n(x)};return e.jsxs("div",{className:Se.products,children:[e.jsx("h5",{className:Se.subtitle,children:"Button Type"}),t.map((p,h)=>e.jsxs("div",{className:Se.product,children:[e.jsx(ce,{onChange:x=>{const j=[...t].map($=>$.id===p.id?{...p,type:x}:$);n(j)},value:p.type,options:["Primary","Secondary","Tertiary"]}),e.jsxs("div",{className:Se.buttons,children:[e.jsx("div",{className:Se.deleteButton,children:e.jsx(C,{name:"Copy",hoverable:!0,width:20,height:20,onClick:()=>{l(p,h)}})}),e.jsx("div",{className:Se.deleteButton,children:e.jsx(C,{name:"Sliders",hoverable:!0,width:20,height:20,onClick:x=>{b(x,p)}})}),s&&e.jsx("div",{className:Se.deleteButton,children:e.jsx(C,{name:"Trash",hoverable:!0,onClick:()=>{const x=t.filter(S=>S.id!==p.id);n(x)},width:20,height:20,fill:"#C12A2A"})})]})]},p.id)),c&&e.jsx(Xi,{ref:f,activeButton:c,setActiveButton:o,popupPosition:u,editableLink:i}),a&&e.jsx("div",{style:{width:"100%",display:"flex",justifyContent:"center"},children:e.jsx(Ie,{withoutHover:!0,className:Se.button,size:"s",onClick:()=>{const p=[...t];i?p.push({type:"Primary",id:g.v4(),typesText:[],text:{"en-US":"Button Name"},destination:"Go to Page",page:d?Object.values(d)[0].path:"/",openInNewTab:!1}):p.push({type:"Primary",id:g.v4(),typesText:[],text:{"en-US":"Create Ticket"},destination:"Go to Page",page:d?Object.values(d)[0].path:"/",openInNewTab:!1}),n(p)},style:{width:"fit-content"},children:e.jsxs("div",{className:Se.addButton,children:[e.jsx("span",{children:"Add Option"}),e.jsx(C,{name:"Plus",width:16,height:16})]})})})]})},so=r=>{const{isActiveButtons:t,setIsActiveButtons:n,buttons:s,setButtons:a,editableLink:i=!0,addable:d=!0,deletable:c=!0}=r;return e.jsx(e.Fragment,{children:e.jsxs("div",{className:Ce.buttonsBlock,children:[e.jsxs("div",{className:Ce.top,children:[e.jsx("h3",{className:Ce.title,children:"Buttons"}),e.jsx(de,{current:t,onChange:o=>n(o)})]}),t&&e.jsx(Bt,{buttons:s,setButtons:a,editableLink:i,addable:d,deletable:c})]})})},no="_wrapper_m18qi_1",io="_subtitle_m18qi_7",oo="_content_m18qi_14",ao="_range_m18qi_22",ro="_track_m18qi_27",co="_progress_m18qi_36",lo="_dots_m18qi_46",uo="_dot_m18qi_46",ho="_active_m18qi_65",po="_input_m18qi_77",mo="_countBlock_m18qi_91",fo="_controls_m18qi_107",go="_button_m18qi_113",oe={wrapper:no,subtitle:io,content:oo,range:ao,track:ro,progress:co,dots:lo,dot:uo,active:ho,input:po,countBlock:mo,controls:fo,button:go},Qe=r=>{const{label:t,min:n=1,max:s=4,step:a=1,count:i,setCount:d}=r,[c,o]=v.useState(!1),u=Array.from({length:(s-n)/a+1}),m=(i-n)/(s-n)*100,I=()=>{i<s&&d(i+a)},_=()=>{i>n&&d(i-a)},f=b=>{const l=n+b*a;d(l)};return e.jsxs("div",{className:oe.wrapper,children:[t&&e.jsx("h5",{className:oe.subtitle,children:t}),e.jsxs("div",{className:oe.content,children:[e.jsxs("div",{className:oe.range,children:[e.jsx("div",{className:oe.track}),e.jsx("div",{className:oe.progress,style:{width:`${m}%`}}),e.jsx("div",{className:oe.dots,children:u.map((b,l)=>{const p=l<=(i-n)/a;return e.jsx("button",{onClick:()=>f(l),className:g.clx(oe.dot,{[oe.active]:p,[oe.inactive]:!p,[oe.dragging]:c}),"aria-label":`Set value to ${n+l*a}`},l)})}),e.jsx("input",{type:"range",min:n,max:s,step:a,value:i,onChange:b=>d(Number(b.target.value)),onMouseDown:()=>o(!0),onMouseUp:()=>o(!1),onTouchStart:()=>o(!0),onTouchEnd:()=>o(!1),className:oe.input})]}),e.jsxs("div",{className:oe.countBlock,children:[e.jsx(pe,{type:"number",min:n,max:s,paddingless:!0,onChange:b=>{const l=Number(b);l>s?d(s):l<n?d(n):d(l)},value:String(i)}),e.jsxs("div",{className:oe.controls,children:[e.jsx("button",{onClick:I,disabled:i>=s,className:oe.button,"aria-label":"Increment count",children:e.jsx(C,{name:"CaretUp",width:15,height:15})}),e.jsx("button",{onClick:_,disabled:i<=n,className:oe.button,"aria-label":"Decrement count",children:e.jsx(C,{name:"CaretDown",width:15,height:15})})]})]})]})]})},_o="_title_11jyy_1",xo="_subtitle_11jyy_5",yo="_productsBlock_11jyy_14",vo="_top_11jyy_26",bo="_products_11jyy_14",jo="_product_11jyy_14",So="_button_11jyy_80",Io="_buttons_11jyy_114",No="_modal_11jyy_121",wo="_modalOptions_11jyy_148",Co="_addButton_11jyy_161",ko="_deleteButton_11jyy_176",$o="_closeIcon_11jyy_188",ie={title:_o,subtitle:xo,productsBlock:yo,top:vo,products:bo,product:jo,button:So,buttons:Io,modal:No,modalOptions:wo,addButton:Co,deleteButton:ko,closeIcon:$o},To=v.forwardRef((r,t)=>{const{activeItem:n,setActiveItem:s,popupPosition:a,setIsOpenModal:i,itemsOptions:d}=r,c=d.find(o=>o.id===n.listingId);return qe(t,()=>{s(null),i(!1)}),c?e.jsxs("div",{className:ie.modal,onClick:o=>{o.stopPropagation()},style:{top:`${a.top}px`,left:`${a.left}px`},children:[e.jsxs("div",{className:ie.top,children:[e.jsx("h3",{dangerouslySetInnerHTML:{__html:_e.splitTextIntoSpans(c.productData.name)}}),e.jsx("div",{className:ie.closeIcon,children:e.jsx(C,{name:"X",height:20,width:20,onClick:()=>{i(!1),s(null)}})})]}),e.jsx("div",{className:ie.modalOptions,children:e.jsx(De,{label:"Put up an attractive image",activeImage:c.productData.images.length>0?c.productData.images[0].cfId:n.image?n.image:void 0,onChange:o=>{const u={...n,image:o[0]};s(u)}})})]}):null});function Po(r){const{product:t,children:n}=r,{attributes:s,listeners:a,setNodeRef:i,transform:d,transition:c,isDragging:o}=R.useSortable({id:String(t.listingId)}),u={transform:R.CSS.Transform.toString(d),transition:c};return e.jsx("div",{ref:i,style:u,className:`${ie.product} ${o?ie.dragging:""}`,...s,...a,children:n})}const Oo=r=>{const{isActiveItems:t,setIsActiveItems:n,items:s,setItems:a,other:i,title:d,subtitle:c,editable:o=!0,draggable:u=!1,withImage:m=!1,deletable:I=!0,addable:_=!0,itemsType:f,itemsOptions:b,limit:l,aspectRatio:p,setAspectRatio:h}=r,[x,S]=v.useState(null),[j,$]=v.useState({top:0,left:0}),[A,O]=v.useState(!1),y=R.useSensors(R.useSensor(R.PointerSensor,{activationConstraint:{distance:5}}));v.useEffect(()=>{const E=()=>{S(null),O(!1)};return document.body.addEventListener("click",E),S(null),O(!1),()=>{S(null),O(!1),document.body.removeEventListener("click",E)}},[]),v.useEffect(()=>{if(x){const E=[...s].map(V=>V.listingId===x.listingId?x:V);a(E)}},[x]);const T=(E,V)=>{E.stopPropagation();const P=E.target.getBoundingClientRect(),q=100,F=window.innerHeight;let L=P.top+window.scrollY;L+q>F&&(L=F-q-20),O(!0),$({top:L-80,left:P.left-30}),S(V)};function w(E){if(m)return E?e.jsx("img",{src:`https://imagedelivery.net/${E}/w=50`,alt:"image",width:16,height:16}):e.jsx(C,{name:"Image",width:16,height:16,fill:"#757575"})}const M=E=>{const{active:V,over:P}=E;if(P&&V.id!==P.id){const q=s.findIndex(L=>String(L.listingId)===V.id),F=s.findIndex(L=>String(L.listingId)===P.id);if(q!==-1&&F!==-1){const L=[...s],[se]=L.splice(q,1);L.splice(F,0,se),a(L)}}},N=()=>{O(!1),S(null)},k=E=>{const V=b.find(q=>E.listingId===q.id);if(!V)return null;const P=e.jsxs(e.Fragment,{children:[u&&e.jsx("div",{children:e.jsx(C,{name:"DotsSixVertical",hoverable:!0,width:20,height:20})}),f==="select"&&e.jsx(ce,{onChange:q=>{const F=[...s],L=b.find(K=>K.productData.name===q);if(!L)return;const se={listingId:L.id,image:L.productData.images.length>0?L.productData.images[0].cfId:""},Z=F.map(K=>K.listingId===E.listingId?se:K);S(se),a([...Z])},value:V.productData.name,options:[...b.filter(q=>!s.find(F=>F.listingId===q.id)).map(q=>q.productData.name)],leftAddonOptions:b.map(q=>{var F;return{value:q.productData.name,addon:w(((F=q.productData.images[0])==null?void 0:F.cfId)||"")}})}),e.jsxs("div",{className:ie.buttons,children:[o&&e.jsx("div",{className:ie.deleteButton,children:e.jsx(C,{name:"Sliders",hoverable:!0,width:20,height:20,onClick:q=>T(q,E)})}),I&&e.jsx("div",{className:ie.deleteButton,children:e.jsx(C,{name:"Trash",hoverable:!0,width:20,height:20,fill:"#C12A2A",onClick:()=>a(s.filter(q=>q!==E))})})]})]});return u?e.jsx(Po,{product:E,children:P},E.listingId):e.jsx("div",{className:ie.product,children:P},E.listingId)},U=v.useRef(null);return e.jsxs("div",{className:ie.productsBlock,children:[(d||t!==void 0)&&e.jsxs("div",{className:ie.top,children:[d&&e.jsx("h3",{className:ie.title,children:d}),t!==void 0&&e.jsx(de,{current:t,onChange:E=>n==null?void 0:n(E)})]}),A&&x&&e.jsx(To,{ref:U,activeItem:x,setActiveItem:S,setIsOpenModal:O,popupPosition:j,itemsOptions:b}),t&&e.jsxs("div",{className:ie.products,children:[c&&e.jsx("h5",{className:ie.subtitle,children:c}),u?e.jsx(R.DndContext,{sensors:y,onDragEnd:M,onDragStart:N,children:e.jsx(R.SortableContext,{items:s.map(E=>String(E.listingId)),strategy:R.verticalListSortingStrategy,children:s.map(E=>k(E))})}):s.map(E=>k(E)),_&&e.jsx("div",{style:{width:"100%",display:"flex",justifyContent:"center"},children:e.jsx(Ie,{withoutHover:!0,className:ie.button,size:"s",onClick:()=>{const E=[...s];for(let V=0;V<b.length;V++)if(!s.find(P=>P.listingId===b[V].id)){E.push({listingId:b[V].id,image:b[V].productData.images.length>0?b[V].productData.images[0].cfId:""});break}a(E)},disabled:s.length===(l||b.length),style:{width:"fit-content"},children:e.jsxs("div",{className:ie.addButton,children:[e.jsx("span",{children:"Add Option"}),e.jsx(C,{name:"Plus",width:16,height:16})]})})})]}),p&&h&&e.jsx(ce,{value:p,options:Object.keys(g.aspectRatio),onChange:E=>h(E),leftAddonOptions:g.aspectRatioOptions}),t&&i!==void 0&&e.jsx(ze,{otherTitle:"Other",items:i})]})},Ao="_options_s4lx3_1",Bo="_price_s4lx3_18",Mo="_oldPrice_s4lx3_25",Eo="_newPrice_s4lx3_34",Do="_animate_s4lx3_42",qo="_meta_s4lx3_60",Ro="_info_s4lx3_66",Lo="_infoRight_s4lx3_75",Fo="_buttons_s4lx3_82",zo="_variants_s4lx3_89",Uo="_variant_s4lx3_89",Ho="_stock_s4lx3_107",Vo="_variantInfo_s4lx3_115",Wo="_quantity_s4lx3_122",Go="_button_s4lx3_82",Xo="_activeVariant_s4lx3_168",Yo="_chargeTypes_s4lx3_172",Ko="_charge_s4lx3_172",Qo="_chargeActive_s4lx3_197",Jo="_title_s4lx3_205",H={options:Ao,price:Bo,oldPrice:Mo,newPrice:Eo,animate:Do,meta:qo,info:Ro,infoRight:Lo,buttons:Fo,variants:zo,variant:Uo,stock:Ho,variantInfo:Vo,quantity:Wo,button:Go,activeVariant:Xo,chargeTypes:Yo,charge:Ko,chargeActive:Qo,title:Jo},Zo="_wrapper_ipyfg_1",ea="_label_ipyfg_9",ta="_input_ipyfg_18",sa="_disabled_ipyfg_31",na="_paddingless_ipyfg_36",ia="_content_ipyfg_47",oa="_contentBorder_ipyfg_60",aa="_contentField_ipyfg_65",ra="_contentIsAntistock_ipyfg_69",ca="_borderless_ipyfg_74",la="_rightIcon_ipyfg_79",da="_leftIcon_ipyfg_87",ua="_requiredStar_ipyfg_94",re={wrapper:Zo,label:ea,input:ta,disabled:sa,paddingless:na,content:ia,contentBorder:oa,contentField:aa,contentIsAntistock:ra,borderless:ca,rightIcon:la,leftIcon:da,requiredStar:ua},Je=r=>{const{onChange:t,style:n,label:s,value:a,type:i="text",min:d,max:c,placeholder:o,disabled:u=!1,required:m=!1,regex:I,paddingless:_=!1,borderless:f=!1,editable:b=!1,isSearch:l=!1,centered:p=!1,maxSymbols:h,rightIcon:x,onFocus:S,leftIcon:j}=r,{themeSettings:$}=g.useThemeSettingsStore(),{isAntistock:A}=g.useGeneralStore(),{inputs:O}=$,[y,T]=v.useState(!1);function w(N){if(Number(N)<0)return String(d);const k=N.replace(/[^\d-]/g,"");return Number(k)<0?String(d):k}function M(N){if(!m||!I)return!0;try{return new RegExp(I).test(N)}catch(k){return console.error("Invalid regex pattern:",I,k),!0}}return e.jsxs("div",{className:re.wrapper,children:[s&&e.jsxs("label",{className:re.label,htmlFor:s,style:{color:A?"var(--text-secondary)":void 0},children:[s,m&&e.jsx("span",{className:re.requiredStar,children:"*"})]}),e.jsxs("div",{className:g.clx(re.content,{[re.contentBorder]:!A&&O.border.active,[re.contentField]:O.field.active,[re.disabled]:u,[re.contentIsAntistock]:A}),style:{...n},children:[j&&e.jsx("div",{className:re.leftIcon,children:j}),e.jsx("input",{maxLength:h,id:s,type:i||"text",onChange:N=>{if(i==="text")t(N.target.value);else{const k=w(N.target.value);t(k)}},value:a,autoComplete:"off",placeholder:o||"Type something...",className:g.clx(re.input,{[re.required]:y&&m&&!M(a),[re.paddingless]:_,[re.borderless]:f}),min:i==="number"?d:void 0,max:i==="number"?c:void 0,onFocus:()=>{S==null||S(),T(!0)},disabled:u,style:{textAlign:p?"center":"left",padding:l?`7px ${Number(O.general.size)+20}px 7px ${j?35:11}px`:A?`4.5px ${x?35:11}px 4px ${j?35:11}px`:`7px ${x?35:11}px 7px ${j?35:11}px`}}),x&&e.jsx("div",{className:re.rightIcon,children:x}),l&&e.jsx("div",{className:re.rightIcon,children:e.jsx(C,{name:"MagnifyingGlass",fill:"var(--text-secondary)",width:O.general.size,height:O.general.size})}),b&&e.jsx("div",{children:e.jsx(C,{name:"Sliders",width:20,height:20,hoverable:!0})})]})]})},ha="_loader_1kbu3_1",pa="_loaderAntistock_1kbu3_18",yt={loader:ha,loaderAntistock:pa},ut=r=>{const{isAntistock:t}=g.useGeneralStore();return t?e.jsx("span",{className:yt.loaderAntistock,style:{width:"15px",height:"15px",borderWidth:"2px"}}):e.jsx("div",{className:yt.loader,...r})},ma="_tip_q9ixw_1",fa="_text_q9ixw_12",ga="_warning_q9ixw_18",_a="_error_q9ixw_23",xa="_success_q9ixw_28",ya="_hide_q9ixw_33",Be={tip:ma,text:fa,warning:ga,error:_a,success:xa,hide:ya},vt={warning:"#C1972A",error:"#FF3F19",success:"#338B13"},Mt=r=>{const{type:t,message:n,style:s,padding:a,id:i}=r,[d,c]=v.useState(!1);return e.jsx("div",{style:{padding:a},children:e.jsxs("div",{className:g.clx(Be.tip,{[Be.warning]:t==="warning",[Be.error]:t==="error",[Be.success]:t==="success",[Be.hide]:d}),style:s,children:[e.jsx("div",{children:e.jsx(C,{name:"Info",fill:vt[t],width:20,height:20})}),e.jsx("div",{className:Be.text,id:i,children:n}),e.jsx("div",{children:e.jsx(C,{name:"X",fill:vt[t],width:20,height:20,hoverable:!0,onClick:()=>c(!0)})})]})})},va="_customCheckbox_w9x8g_1",ba="_checkboxBox_w9x8g_7",ja="_checked_w9x8g_23",Sa="_icon_w9x8g_31",Ue={customCheckbox:va,checkboxBox:ba,checked:ja,icon:Sa},Et=r=>{const{value:t,onChange:n}=r,[s,a]=v.useState(t),i=()=>{a(!s),n(!s)};return v.useEffect(()=>{a(t)},[t]),e.jsxs("label",{className:Ue.customCheckbox,onClick:d=>d.stopPropagation(),children:[e.jsx("input",{type:"checkbox",checked:s,onChange:i,style:{display:"none"}}),e.jsx("span",{className:g.clx(Ue.checkboxBox,{[Ue.checked]:s})}),s&&e.jsx("div",{className:Ue.icon,children:e.jsx(C,{name:"Check",width:14,height:14,fill:"#ff3f19"})})]})},Ia="_wrapper_d9z4o_1",Na="_label_d9z4o_10",wa="_contentBorder_d9z4o_19",Ca="_textarea_d9z4o_23",ka="_contentField_d9z4o_35",$a="_antistock_d9z4o_49",Ta="_length_d9z4o_58",Ne={wrapper:Ia,label:Na,contentBorder:wa,textarea:Ca,contentField:ka,antistock:$a,length:Ta},Pa=r=>{const{onChange:t,label:n,value:s,maxLength:a,placeholder:i="Type something...",type:d="text",required:c=!1}=r,[o,u]=v.useState(s.length),{themeSettings:m}=g.useThemeSettingsStore(),{isAntistock:I}=g.useGeneralStore();function _(f){return d==="number"?f.replace(/[^\d\n]+/g,""):f}return e.jsxs("div",{className:Ne.wrapper,children:[n&&e.jsxs("label",{className:Ne.label,htmlFor:n,style:{color:I?"var(--text-secondary)":void 0},children:[n,c&&e.jsx("span",{className:Ne.requiredStar,children:"*"})]}),e.jsx("textarea",{id:n,value:s,onChange:f=>{const b=_(f.target.value);u(b.length),t(b)},placeholder:i,className:g.clx(Ne.textarea,{[Ne.contentBorder]:m.inputs.border.active,[Ne.contentField]:m.inputs.field.active,[Ne.antistock]:I}),maxLength:a}),a&&e.jsxs("div",{className:Ne.length,children:[o,"/",a]})]})};var ht=(r=>(r.ONE_TIME="One-Time",r.RECURRING="Subscribe & Save",r))(ht||{});const Dt=r=>{var A,O;const{product:t,setIsOpen:n,isCartEnabled:s=!0}=r,{variants:a}=t,[i,d]=v.useState(a[0]),[c,o]=v.useState(i.chargeTypes?i.chargeTypes[0]:"ONE_TIME"),{notifications:u,setNotifications:m}=g.useNotificationStore(),I=g.useNavigate(),[_,f]=v.useState(1),{cart:b,reset:l,addProductToCart:p}=ke.useCart(),[h,x]=v.useState(!1);v.useEffect(()=>{x(!0);const y=setTimeout(()=>x(!1),600);return()=>clearTimeout(y)},[_]);async function S(){try{p({productId:t.id,productVariantId:i.id,chargeType:c,quantity:_}),m([...u,{id:g.v4(),message:"Product added to cart",status:"success"}])}catch(y){const T=y;m([...u,{id:g.v4(),message:`Product failed to add to cart: ${T.message}`,status:"error"}])}n==null||n(!1)}function j(){l(),S(),I("/checkout")}function $(y){if(y>=864e5){const k=Math.floor(y/864e5);return`${k} ${k===1?"day":"days"}`}else if(y>=36e5){const k=Math.floor(y/36e5);return`${k} ${k===1?"hour":"hours"}`}else if(y>=6e4){const k=Math.floor(y/6e4);return`${k} ${k===1?"minute":"minutes"}`}else{const k=Math.floor(y/1e3);return`${k} ${k===1?"second":"seconds"}`}}return v.useEffect(()=>{i.quantity&&i.quantity.available===0?f(0):f(1)},[i.quantity.available]),v.useEffect(()=>{i.chargeTypes&&o(i.chargeTypes.includes(c)?c:i.chargeTypes[0])},[i.chargeTypes]),e.jsxs("div",{className:H.options,children:[i.chargeTypes&&i.chargeTypes.length>1&&e.jsx("div",{className:H.chargeTypes,children:i.chargeTypes.map(y=>e.jsx("div",{className:g.clx(H.charge,{[H.chargeActive]:c===y}),onClick:()=>o(y),children:ht[y]},y))}),e.jsx("div",{className:H.variants,children:a.filter(y=>{var T;return(T=y.chargeTypes)==null?void 0:T.includes(c)}).map(y=>{var T,w;return e.jsxs("div",{className:g.clx(H.variant,{[H.activeVariant]:i.id===y.id}),onClick:()=>{d(y),f(1)},children:[e.jsxs("div",{className:H.variantInfo,children:[e.jsx("span",{className:H.title,id:"h4",dangerouslySetInnerHTML:{__html:_e.splitTextIntoSpans(y.name)}}),e.jsxs("span",{id:"md",children:[g.formatPrice({amount:c==="ONE_TIME"?y.price.amount:y.subscriptionSettings?y.subscriptionSettings.price.amount:0,currency:c==="ONE_TIME"?y.price.currency:y.subscriptionSettings?y.subscriptionSettings.price.currency:"USD"})," ",c==="RECURRING"&&y.subscriptionSettings&&` / ${g.normalizeInterval(y.subscriptionSettings.recurringIntervalDays||0)}`]})]}),e.jsx("div",{id:"md",children:c==="ONE_TIME"&&e.jsxs("span",{className:H.stock,id:"md",children:[(T=y.quantity.restrictions)!=null&&T.max||y.quantity.available!==void 0?((w=y.quantity.restrictions)==null?void 0:w.max)||y.quantity.available:"∞"," ","in stock"]})})]},y.id)})}),c==="ONE_TIME"&&e.jsxs("div",{className:H.quantity,id:"md",children:[e.jsx(Y,{type:"Secondary",onClick:()=>{_>1?f(y=>y-1):f(1)},className:H.button,disabled:i.quantity.available&&i.quantity.restrictions&&_<=i.quantity.restrictions.min||i.quantity.available===0,children:e.jsx(C,{name:"Minus"})}),e.jsx(Je,{type:"number",value:String(_),onChange:y=>{i.quantity.available&&Number(y)>i.quantity.available?f(i.quantity.available):f(Number(y))},max:((A=i.quantity.restrictions)==null?void 0:A.max)||i.quantity.available||Number.POSITIVE_INFINITY,min:((O=i.quantity.restrictions)==null?void 0:O.min)||0,centered:!0,disabled:i.quantity&&i.quantity.available===0||Object.keys(i.quantity.restrictions||{}).length!==0&&_>=i.quantity.restrictions.max}),e.jsx(Y,{type:"Secondary",onClick:()=>{f(y=>y+1)},className:H.button,disabled:!!(i.quantity.available&&i.quantity.restrictions&&_>=i.quantity.restrictions.max||i.quantity.available===0||i.quantity.available&&_>=i.quantity.available),children:e.jsx(C,{name:"Plus"})})]}),e.jsxs("div",{className:H.meta,children:[e.jsxs("div",{className:H.info,children:[e.jsx("span",{id:"md",children:"Delivery"}),e.jsxs("div",{className:H.infoRight,children:[e.jsx(C,{name:"Lightning",fill:"var(--text-action)",width:20,height:20}),e.jsx("span",{id:"md",children:!i.deliveryTime||i.deliveryTime===0?"Instant":$(i.deliveryTime)})]})]}),e.jsxs("div",{className:H.info,children:[e.jsx("span",{id:"md",children:"Price"}),e.jsx("div",{className:H.infoRight,children:c==="ONE_TIME"?i.compareAtPrice&&(i.compareAtPrice.amount||0)-(i.price.amount||0)>0?e.jsxs("div",{className:H.price,id:"md",children:[e.jsx("span",{className:g.clx(H.newPrice,{[H.animate]:h}),children:g.formatPrice({amount:i.price.amount*_,currency:i.price.currency})}),e.jsx("span",{className:H.oldPrice,id:"md",children:g.formatPrice({amount:i.compareAtPrice.amount*_,currency:i.compareAtPrice.currency})})]}):e.jsx("span",{className:g.clx(H.newPrice,{[H.animate]:h}),id:"md",children:g.formatPrice({amount:i.price.amount*_,currency:i.price.currency})}):i.subscriptionSettings&&i.subscriptionSettings.compareAtPrice&&(i.subscriptionSettings.compareAtPrice.amount||0)-(i.subscriptionSettings.price.amount||0)>0?e.jsxs("div",{className:H.price,id:"md",children:[e.jsx("span",{className:g.clx(H.newPrice,{[H.animate]:h}),id:"md",children:g.formatPrice({amount:i.subscriptionSettings.price.amount*_,currency:i.subscriptionSettings.price.currency})}),e.jsx("span",{className:H.oldPrice,id:"md",children:g.formatPrice({amount:i.subscriptionSettings.compareAtPrice.amount*_,currency:i.subscriptionSettings.compareAtPrice.currency})})]}):i.subscriptionSettings&&e.jsx("span",{className:g.clx(H.newPrice,{[H.animate]:h}),id:"md",children:g.formatPrice({amount:i.subscriptionSettings.price.amount*_,currency:i.subscriptionSettings.price.currency})})})]})]}),e.jsxs("div",{className:H.buttons,children:[e.jsx(Y,{type:"Primary",onClick:()=>j(),disabled:i.quantity&&i.quantity.available===0||_===0,children:c==="ONE_TIME"?"Buy Now":"Subscribe Now"}),c==="ONE_TIME"&&s&&e.jsx(Y,{type:"Secondary",onClick:()=>S(),disabled:i.quantity&&i.quantity.available===0||_===0,children:b.parts.some(y=>y.productId===t.id&&y.productVariantId===i.id)?"Add More":"Add to Cart"})]})]})},Oa="_buttons_1uy6y_23",Aa="_modal_1uy6y_32",Ba="_closing_1uy6y_65",Ma="_info_1uy6y_114",Ea="_top_1uy6y_121",Da="_title_1uy6y_132",qa="_clear_1uy6y_139",Ra="_activeClear_1uy6y_146",La="_count_1uy6y_150",Fa="_cart_1uy6y_165",za="_empty_1uy6y_173",Ua="_product_1uy6y_199",Ha="_products_1uy6y_208",Va="_image_1uy6y_216",Wa="_productInfo_1uy6y_233",Ga="_content_1uy6y_240",Xa="_name_1uy6y_246",Ya="_price_1uy6y_252",Ka="_productButtons_1uy6y_258",Qa="_productButton_1uy6y_258",Ja="_productCount_1uy6y_275",Za="_bottom_1uy6y_292",er="_subtotal_1uy6y_300",tr="_block_1uy6y_308",sr="_shoppingCount_1uy6y_315",nr="_total_1uy6y_335",ir="_link_1uy6y_341",or="_userInfo_1uy6y_348",ar="_pagesMobileModal_1uy6y_360",rr="_pagesMobileModalContent_1uy6y_374",cr="_pagesMobileModalHeader_1uy6y_380",lr="_pagesMobileModalFooter_1uy6y_390",dr="_pageLink_1uy6y_397",ur="_rightButtons_1uy6y_406",z={buttons:Oa,modal:Aa,closing:Ba,info:Ma,top:Ea,title:Da,clear:qa,activeClear:Ra,count:La,cart:Fa,empty:za,product:Ua,products:Ha,image:Va,productInfo:Wa,content:Ga,name:Xa,price:Ya,productButtons:Ka,productButton:Qa,productCount:Ja,bottom:Za,subtotal:er,block:tr,shoppingCount:sr,total:nr,link:ir,userInfo:or,pagesMobileModal:ar,pagesMobileModalContent:rr,pagesMobileModalHeader:cr,pagesMobileModalFooter:lr,pageLink:dr,rightButtons:ur,delete:"_delete_1uy6y_413"},hr=r=>{const{shopping:t,signUp:n,isShowUserInfo:s=!0}=r;return e.jsx(e.Fragment,{children:(t||s)&&e.jsxs("div",{className:z.buttons,children:[t&&e.jsx(qt,{}),s&&e.jsx(pt,{signUp:n})]})})},qt=()=>{const[r,t]=v.useState(!1),[n,s]=v.useState([]),[a,i]=v.useState(!1),{cart:d,products:c}=ke.useCart();v.useEffect(()=>{(async()=>{const _=d.parts.map(l=>String(l.productId)),f=c.filter(l=>_.includes(String(l.id)))||[],b=d.parts.map(l=>{const p=f.find(h=>h.id===l.productId);return p?{...p,activeVariantId:l.productVariantId,quantity:l.quantity,chargeType:l.chargeType}:null}).filter(Boolean);s(b)})()},[d.parts,c]);function o(I){return!I||!(I!=null&&I.variants)?!1:I.chargeType==="RECURRING"}const u=d.parts.length>0&&n.length>0&&!o(n[0]);function m(){i(!1),setTimeout(()=>{t(!1)},300)}return e.jsxs(e.Fragment,{children:[e.jsxs(Y,{type:"Secondary",style:{padding:10,position:"relative"},onClick:I=>{I.stopPropagation(),window.location.pathname.includes("/admin/builder")||(t(!0),i(!0))},children:[e.jsx(C,{name:"Handbag"}),u&&e.jsx("div",{className:z.shoppingCount,children:d.parts.length})]}),r&&e.jsx(Re,{close:m,withAnimation:!1,children:e.jsx(Rt,{activeProducts:n,isCartNotEmpty:u,isOpen:a,close:m})})]})},Rt=r=>{var l,p;const{activeProducts:t,isCartNotEmpty:n,isOpen:s,close:a}=r,{cart:i,reset:d,getTotalAndDiscount:c,updateQuantityOfProduct:o,removeProduct:u}=ke.useCart(),m=g.useNavigate();function I(h,x){m(h,{replace:x})}function _(h){h.quantity&&o({productId:h.id,productVariantId:h.activeVariantId,quantity:h.quantity+1,chargeType:h.chargeType})}function f(h){h.quantity&&o({productId:h.id,productVariantId:h.activeVariantId,quantity:h.quantity-1,chargeType:h.chargeType})}function b(h){u({productId:h.id,productVariantId:h.activeVariantId,quantity:h.quantity||1,chargeType:h.chargeType})}return e.jsxs("div",{className:g.clx(z.modal,{[z.closing]:!s}),onClick:h=>h.stopPropagation(),children:[e.jsxs("div",{className:z.top,children:[e.jsxs("div",{className:z.info,children:[e.jsx("span",{className:z.title,id:"h4",children:"Cart"}),n&&e.jsx("div",{className:z.count,id:"md",children:i.parts.length})]}),e.jsxs("div",{className:z.rightButtons,children:[n&&e.jsx("button",{className:g.clx(z.clear,{[z.activeClear]:n}),disabled:!n,onClick:d,id:"md",children:"Clear all"}),e.jsx(C,{name:"X",onClick:a,hoverable:!0,width:24,height:24,fill:"var(--text-primary)"})]})]}),n?e.jsxs("div",{className:z.cart,children:[e.jsx("div",{className:z.products,children:t.map(h=>{var x,S;return e.jsxs("div",{className:z.product,children:[e.jsxs("div",{className:z.productInfo,children:[h.images.length>0?e.jsx("img",{src:`https://imagedelivery.net/${h.images[0].cfId}/w=500`,alt:"image",width:"100%",height:"100%",className:z.image}):e.jsx("div",{className:z.image,children:e.jsx(C,{name:"Image",fill:"var(--text-secondary)"})}),e.jsxs("div",{className:z.content,children:[e.jsx("div",{className:z.name,dangerouslySetInnerHTML:{__html:_e.splitTextIntoSpans(((x=h.variants.find(j=>j.id===h.activeVariantId))==null?void 0:x.name)||h.name)}}),e.jsx("div",{className:z.price,children:g.formatPrice({amount:h.variants.find(j=>j.id===h.activeVariantId).price.amount*((h==null?void 0:h.quantity)||1),currency:h.variants.find(j=>j.id===h.activeVariantId).price.currency})})]})]}),e.jsxs("div",{className:z.productButtons,children:[e.jsx(Y,{type:"Secondary",onClick:()=>{h.quantity!==1&&f(h)},className:z.productButton,disabled:h.quantity===1,children:e.jsx(C,{name:"Minus",fill:"#757575",width:20,height:20})}),e.jsx("input",{className:z.productCount,type:"number",value:((S=h.quantity)==null?void 0:S.toString())||"",onChange:j=>{const $=Math.min(Number(j.target.value),h.variants.find(A=>A.id===h.activeVariantId).quantity.available||1/0);$<1||o({productId:h.id,productVariantId:h.activeVariantId,quantity:$,chargeType:h.chargeType})},min:1,max:h.variants.find(j=>j.id===h.activeVariantId).quantity.available||1/0}),e.jsx(Y,{type:"Secondary",onClick:()=>_(h),className:z.productButton,disabled:h.quantity===h.variants.find(j=>j.id===h.activeVariantId).quantity.available,children:e.jsx(C,{name:"Plus",fill:"#757575",width:20,height:20})}),e.jsx("div",{className:z.delete,children:e.jsx(C,{name:"Trash",fill:"var(--text-action)",width:20,height:20,onClick:()=>b(h),hoverable:!0})})]})]},h.id)})}),e.jsxs("div",{className:z.bottom,children:[e.jsxs("div",{className:z.subtotal,children:[e.jsxs("div",{className:z.block,children:[e.jsx("span",{children:"Subtotal"}),e.jsx(C,{name:"Info",width:20,height:20,fill:"#757575"})]}),e.jsx("div",{className:z.total,children:g.formatPrice({amount:c().total,currency:i.parts.length>0&&((p=(l=t.find(h=>h.id===i.parts[0].productId))==null?void 0:l.variants.find(h=>h.id===i.parts[0].productVariantId))==null?void 0:p.price.currency)||"USD"})})]}),e.jsx(Y,{onClick:()=>I("/checkout",!1),children:"Checkout"})]})]}):e.jsx(Lt,{})]})},Lt=()=>e.jsxs("div",{className:z.empty,children:[e.jsx("div",{children:e.jsx(C,{name:"Handbag",fill:"var(--text-secondary)"})}),e.jsx("span",{id:"h5",children:"Empty Cart"}),e.jsxs("span",{id:"md",children:["You don’t have any items in your shopping cart yet,"," ",e.jsx("a",{href:"/products",className:z.link,id:"md",children:"view products"})]})]}),pt=({signUp:r,close:t})=>{const{token:n}=g.useStorefrontStore(),s=g.useNavigate(),[a,i]=v.useState("test-email@gmail.com");v.useEffect(()=>{n&&(async()=>{if(!n)return;const o=g.jwtDecode(n);i(o.email)})()},[n]);function d(c){window.location.pathname.includes("/admin/builder")||s(c)}return n?e.jsx(Y,{type:"Secondary",className:z.userInfo,onClick:()=>{d("/customer-dash"),t==null||t()},children:e.jsx("div",{children:a||"test-email@gmail.com"})}):e.jsxs(e.Fragment,{children:[e.jsx(Y,{onClick:()=>{d("/customer-dash"),t==null||t()},type:"Secondary",style:{padding:10},children:"Login"}),r&&e.jsx(Y,{onClick:()=>{d("/customer-dash"),t==null||t()},type:"Primary",style:{padding:10,whiteSpace:"nowrap"},children:"Sign Up"})]})},Ft=({logo:r,setIsOpen:t,signUp:n,pages:s})=>{const{setIsOpen:a}=g.useModalStore(),i=()=>{a(!1),setTimeout(()=>{t(!1),a(!0)},300)};return e.jsxs("div",{className:z.pagesMobileModal,onClick:d=>d.stopPropagation(),children:[e.jsxs("div",{className:z.pagesMobileModalHeader,children:[e.jsx("div",{children:r}),e.jsx(Y,{type:"Secondary",onClick:i,children:e.jsx(C,{name:"X"})})]}),e.jsx("div",{className:z.pagesMobileModalContent,children:s.length>0&&s.map(d=>e.jsx("div",{className:z.pageLink,onClick:i,children:e.jsx(mt,{path:d.path,children:d.name["en-US"]},d.id)}))}),e.jsx("div",{className:z.pagesMobileModalFooter,children:e.jsx(pt,{signUp:n,close:i})})]})},pr=({logo:r,signUp:t,pages:n})=>{const[s,a]=v.useState(!1);return e.jsxs(e.Fragment,{children:[e.jsx(zt,{setIsOpenModal:a}),s&&e.jsx(Re,{close:()=>a(!1),hasPadding:!1,children:e.jsx(Ft,{logo:r,setIsOpen:a,signUp:t,pages:n})})]})},zt=r=>{const{setIsOpenModal:t}=r;return e.jsx(Y,{type:"Secondary",style:{padding:10},onClick:n=>{n.stopPropagation(),window.location.pathname.includes("/admin/builder")||t(!0)},children:e.jsx(C,{name:"List"})})},mr="_share_onabp_1",fr="_modal_onabp_8",gr="_header_onabp_20",_r="_title_onabp_46",xr="_copyWrapper_onabp_53",yr="_copyText_onabp_62",vr="_copyTextMobile_onabp_75",br="_copyTextMiniMobile_onabp_94",we={share:mr,modal:fr,header:gr,title:_r,copyWrapper:xr,copyText:yr,copyTextMobile:vr,copyTextMiniMobile:br},jr="_modal_1iz94_1",Sr="_padding_1iz94_17",Ir="_content_1iz94_21",Nr="_close_1iz94_42",He={modal:jr,padding:Sr,content:Ir,close:Nr},Re=r=>{const{close:t,children:n,withAnimation:s=!0,hasPadding:a=!0}=r,{isOpen:i,setIsOpen:d}=g.useModalStore(),{themeSettings:c}=g.useThemeSettingsStore(),{isAntistock:o}=ke.useGeneralInfo(),u=I=>{const _=I.replace("#","");if(!/^[0-9A-Fa-f]{3}$|^[0-9A-Fa-f]{6}$/.test(_))return console.warn("Invalid hex color:",I),I;let f=_;return _.length===3&&(f=_.split("").map(b=>b+b).join("")),`#${f}e6`},m=()=>{d(!1),s?setTimeout(()=>{t(!1),d(!0)},300):(t(!1),d(!0))};return v.useEffect(()=>{const I=_=>{_.key==="Escape"&&m()};return document.addEventListener("keydown",I),()=>{document.removeEventListener("keydown",I)}},[]),Vt.createPortal(e.jsx("div",{className:g.clx(He.modal,{[He.padding]:a}),style:{backgroundColor:o?u(c.colors.surface.primary):void 0},onClick:m,children:s?e.jsx("div",{className:g.clx(He.content,{[He.close]:!i}),children:n}):e.jsx(e.Fragment,{children:n})}),document.body)},wr=({title:r="Copy Product Link"})=>{const{isOpenModal:t,setIsOpenModal:n}=g.useShareLinkStore();function s(){n(!0)}return e.jsxs(e.Fragment,{children:[e.jsx(Y,{className:we.share,onClick:a=>{a.stopPropagation(),s()},type:"Secondary",children:e.jsx(C,{name:"Share",fill:"#757575",hoverable:!0})}),t&&e.jsx(Re,{close:n,children:e.jsx(Cr,{title:r})})]})},Cr=({title:r="Copy Product Link"})=>{const{setIsOpenModal:t}=g.useShareLinkStore(),{notifications:n,setNotifications:s}=g.useNotificationStore(),{setIsOpen:a}=g.useModalStore(),i=window.location.href;function d(){navigator.clipboard.writeText(i),s([...n,{id:g.v4(),message:"Link copied to clipboard",status:"success"}])}function c(){a(!1),setTimeout(()=>{t(!1),a(!0)},300)}function o(u,m){return u.length>m?u.slice(0,m)+"...":u}return e.jsxs("div",{className:we.modal,onClick:u=>u.stopPropagation(),children:[e.jsxs("div",{className:we.header,children:[e.jsx("div",{className:we.title,id:"h4",children:r}),e.jsx(C,{name:"X",fill:"#757575",onClick:c,hoverable:!0})]}),e.jsxs("div",{className:we.copyWrapper,children:[e.jsxs(Y,{type:"Secondary",onClick:d,style:{flex:1},children:[e.jsx("div",{className:we.copyText,id:"md",children:o(i,100)}),e.jsx("div",{className:we.copyTextMobile,id:"md",children:o(i,40)}),e.jsx("div",{className:we.copyTextMiniMobile,id:"md",children:o(i,20)})]}),e.jsx(Y,{type:"Secondary",onClick:d,children:n.find(u=>u.message==="Link copied to clipboard")?e.jsx(C,{name:"Check"}):e.jsx(C,{name:"Copy"})})]})]})},kr="_accordion_153d4_1",$r="_header_153d4_12",Tr="_icon_153d4_21",Pr="_open_153d4_24",Or="_content_153d4_28",Ar="_contentOpen_153d4_36",Br="_contentText_153d4_40",$e={accordion:kr,header:$r,icon:Tr,open:Pr,content:Or,contentOpen:Ar,contentText:Br},Mr=({title:r,content:t,defaultOpen:n=!1})=>{const[s,a]=v.useState(n),[i,d]=v.useState(0),c=v.useRef(null),o=()=>{a(!s)};return v.useEffect(()=>{c.current&&d(s?c.current.scrollHeight:0)},[s]),e.jsxs("div",{className:$e.accordion,children:[e.jsxs("div",{className:$e.header,onClick:o,children:[e.jsx("h5",{id:"h5",children:r}),e.jsx("div",{className:g.clx($e.icon,{[$e.open]:s}),children:e.jsx(C,{name:"CaretDown"})})]}),e.jsx("div",{className:g.clx($e.content,{[$e.contentOpen]:s}),children:e.jsx("p",{id:"md",className:$e.contentText,ref:c,style:{height:`${i}px`,marginTop:`${i>0?"20px":"0px"}`},children:t})})]})},mt=({children:r,path:t,className:n,target:s="_self",id:a})=>{if(window.location.pathname.includes("/admin/builder"))return e.jsx("div",{className:n,role:"link",style:{cursor:"pointer"},id:a,children:r});const i=g.useNavigate(),d=/^https?:\/\//.test(t),c=o=>{d||s==="_blank"?s==="_blank"?window.open(t,"_blank"):window.open(t,"_self"):(o.preventDefault(),i(t,{replace:!1}))};return e.jsx("div",{onClick:c,className:n,role:"link",style:{cursor:"pointer"},id:a,children:r})},Er="_buttonsBlock_1x6xf_1",Dr="_cartDisabled_1x6xf_25",bt={buttonsBlock:Er,cartDisabled:Dr},qr=r=>{var m,I;const{setIsOpen:t,setModalType:n,productId:s,isCartEnabled:a=!0}=r,{cart:i}=ke.useCart(),{pageContext:d}=g.usePagesStore(),c=(m=d==null?void 0:d.listings)==null?void 0:m.find(_=>_.id===s);if(!c)return null;const o=(I=d==null?void 0:d.products)==null?void 0:I.find(_=>_.uniquePath===c.productData.uniquePath);if(!o)return null;const u=i.parts.find(_=>_.productId===o.id);return e.jsxs("div",{className:g.clx(bt.buttonsBlock,{[bt.cartDisabled]:!a}),onClick:_=>_.stopPropagation(),children:[a&&e.jsx(Y,{type:"Secondary",style:{width:"100%"},onClick:()=>{n("Add To Cart"),t(!0)},children:u?"Add More":"Add To Cart"}),e.jsx(Y,{type:"Primary",onClick:()=>{n("Buy Now"),t(!0)},style:{width:"100%"},children:"Buy"})]})},Rr="_wrapper_27wzz_1",Lr="_logo_27wzz_8",Fr="_info_27wzz_12",st={wrapper:Rr,logo:Lr,info:Fr},zr=({date:r})=>{const{general:t}=g.useGeneralStore();if(!t)return e.jsx(e.Fragment,{});function n(s){const a=new Date(s),i={month:"short",day:"2-digit",year:"numeric",hour:"2-digit",minute:"2-digit",hour12:!1};return a.toLocaleDateString("en-US",i)}return e.jsxs("div",{className:st.wrapper,children:[e.jsx("div",{className:st.logo,children:t.info.logo?e.jsx("img",{src:`https://imagedelivery.net/${t.info.logo.cfId}/w=500,h=500`,alt:"image",style:{objectFit:"contain",width:"48px",height:"48px"}}):e.jsx(C,{name:"Image",width:48,height:48})}),e.jsxs("div",{className:st.info,children:[e.jsx("h3",{id:"h4",children:t.info.name}),e.jsx("p",{id:"p",children:n(r)})]})]})},Ur="_variants_18tbu_82",Hr="_variant_18tbu_82",Vr="_stock_18tbu_100",Wr="_variantInfo_18tbu_108",Gr="_title_18tbu_202",Xr="_modal_18tbu_208",Yr="_header_18tbu_228",Kr="_productOptions_18tbu_236",Qr="_loading_18tbu_244",fe={variants:Ur,variant:Hr,stock:Vr,variantInfo:Wr,title:Gr,modal:Xr,header:Yr,productOptions:Kr,loading:Qr},Jr=r=>{var _;const{pageContext:t}=g.usePagesStore(),n=(_=t==null?void 0:t.listings)==null?void 0:_.find(f=>f.id===r.productId),[s,a]=v.useState(!0),[i,d]=v.useState(null),c=(i==null?void 0:i.variants[0])||null,[o,u]=v.useState("ONE_TIME"),{addProducts:m}=ke.useCart(),{setIsOpen:I}=g.useModalStore();return v.useEffect(()=>{(async()=>{a(!0);const b=await _e.getDynamicPage(encodeURIComponent(`/product/${n.productData.uniquePath}`));m(b==null?void 0:b.data.products),d(b==null?void 0:b.data.products[0]),a(!1)})()},[]),v.useEffect(()=>{I(!0)},[]),e.jsx(Re,{close:r.setIsOpen,children:e.jsxs("div",{className:fe.modal,onClick:f=>f.stopPropagation(),children:[s&&e.jsx("div",{className:fe.loading,children:e.jsx(ut,{})}),r.type==="Add To Cart"&&r.isCartEnabled&&i&&c&&!s&&e.jsx(Zr,{variants:i.variants,activeVariant:c,activeChargeType:o,setActiveChargeType:u,productId:i.id,setIsOpen:r.setIsOpen}),r.type==="Buy Now"&&i&&!s&&e.jsx(ec,{product:i,setIsOpen:r.setIsOpen,isCartEnabled:r.isCartEnabled})]})})},Zr=r=>{const{variants:t,activeChargeType:n,productId:s,setIsOpen:a}=r,{cart:i,addProductToCart:d,addProducts:c,updateQuantityOfProduct:o}=ke.useCart(),{notifications:u,setNotifications:m}=g.useNotificationStore(),{pageContext:I}=g.usePagesStore(),{setIsOpen:_}=g.useModalStore(),f=()=>{_(!1),setTimeout(()=>{a(!1)},300)};async function b(l){const p=t.find(S=>S.id===l),h=i.parts.find(S=>S.productId===r.productId&&S.productVariantId===l);if((p==null?void 0:p.quantity.available)&&(p==null?void 0:p.quantity.restrictions)&&((h==null?void 0:h.quantity)||0)+1>(p==null?void 0:p.quantity.restrictions.max)||(p==null?void 0:p.quantity.available)===0||(p==null?void 0:p.quantity.available)&&((h==null?void 0:h.quantity)||0)+1>(p==null?void 0:p.quantity.available)){m([...u,{id:g.v4(),message:"Product is out of stock",status:"error"}]);return}if(h)o({productId:s,productVariantId:l,quantity:h.quantity+1,chargeType:n});else{I!=null&&I.products&&c(I.products);try{d({productId:s,productVariantId:l,quantity:1,chargeType:n}),m([...u,{id:g.v4(),message:"Product added to cart",status:"success"}])}catch(S){const j=S;m([...u,{id:g.v4(),message:`Product failed to add to cart: ${j.message}`,status:"error"}])}}}return e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:fe.header,children:[e.jsx("div",{id:"h3",children:"Choose a Variant"}),e.jsx(C,{name:"X",width:24,height:24,fill:"var(--text-secondary)",hoverable:!0,onClick:f})]}),e.jsx("div",{className:fe.variants,children:t.filter(l=>{var p;return(p=l.chargeTypes)==null?void 0:p.includes(n)}).map(l=>{var p,h,x;return e.jsxs("div",{className:g.clx(fe.variant),onClick:()=>{b(l.id),a(!1)},children:[e.jsxs("div",{className:fe.variantInfo,children:[e.jsx("span",{className:fe.title,id:"h4",children:l.name}),e.jsx("span",{id:"md",children:g.formatPrice({amount:n==="ONE_TIME"?l.price.amount:l.subscriptionSettings?l.subscriptionSettings.price.amount:0,currency:n==="ONE_TIME"?l.price.currency:((p=l.subscriptionSettings)==null?void 0:p.price.currency)||"USD"})})]}),e.jsx("div",{id:"md",children:n==="ONE_TIME"&&e.jsxs("span",{className:fe.stock,id:"md",children:[(h=l.quantity.restrictions)!=null&&h.max||l.quantity.available!==void 0?((x=l.quantity.restrictions)==null?void 0:x.max)||l.quantity.available:"∞"," ","in stock"]})})]},l.id)})})]})},ec=r=>{const{product:t,setIsOpen:n,isCartEnabled:s}=r,{setIsOpen:a}=g.useModalStore(),i=()=>{a(!1),setTimeout(()=>{n(!1)},300)};return e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:fe.header,children:[e.jsx("div",{id:"h3",className:fe.title,dangerouslySetInnerHTML:{__html:`Buy ${_e.splitTextIntoSpans(t.name)}`}}),e.jsx(C,{name:"X",width:24,height:24,fill:"var(--text-secondary)",hoverable:!0,onClick:i,style:{minWidth:24,minHeight:24}})]}),e.jsx("div",{className:fe.productOptions,children:e.jsx(Dt,{product:t,setIsOpen:n,isCartEnabled:s})})]})},tc="_contentModal_m2tf9_1",sc="_modalTop_m2tf9_12",nc="_loading_m2tf9_19",ic="_modalCards_m2tf9_28",oc="_modalImage_m2tf9_34",ac="_card_m2tf9_39",rc="_cardInfo_m2tf9_51",cc="_cardButtons_m2tf9_58",lc="_title_m2tf9_64",dc="_blockImage_m2tf9_71",uc="_short_m2tf9_80",hc="_price_m2tf9_84",pc="_oldPrice_m2tf9_91",mc="_newPrice_m2tf9_100",ae={contentModal:tc,modalTop:sc,loading:nc,modalCards:ic,modalImage:oc,card:ac,cardInfo:rc,cardButtons:cc,title:lc,blockImage:dc,short:uc,price:hc,oldPrice:pc,newPrice:mc},fc=r=>{const{setIsOpen:t,pageContext:n,groupData:s,setProductId:a,setIsProductModalOpen:i,setShowDropdown:d}=r,[c,o]=v.useState(null),[u,m]=v.useState(!0),{setIsOpen:I}=g.useModalStore();v.useEffect(()=>{var b;m(!0);const f=(b=n.listings)==null?void 0:b.filter(l=>s.listingIdList.includes(l.id));f&&o([...f]),m(!1)},[n]),v.useEffect(()=>{I(!0)},[]);const _=()=>{I(!1),setTimeout(()=>{t(!1)},300)};return e.jsx(Re,{close:()=>t(!1),children:e.jsxs("div",{className:ae.contentModal,onClick:f=>f.stopPropagation(),children:[e.jsxs("div",{className:ae.modalTop,children:[e.jsx("span",{className:ae.title,id:"h4",dangerouslySetInnerHTML:{__html:_e.splitTextIntoSpans(s.name)}}),e.jsx(C,{name:"X",hoverable:!0,onClick:_,fill:"var(--text-primary)"})]}),!u&&c&&e.jsx("div",{className:ae.modalCards,children:c.map(f=>e.jsxs("div",{className:ae.card,children:[e.jsx("div",{children:f.productData.images[0]?e.jsx("img",{src:`https://imagedelivery.net/${f.productData.images[0].cfId}/w=500`,alt:"",width:64,height:64,className:ae.modalImage}):e.jsx("div",{className:g.clx(ae.blockImage,ae.modalImage),children:e.jsx(C,{name:"Image"})})}),e.jsxs("div",{className:ae.cardInfo,children:[e.jsx("div",{id:"h5",children:f.productData.compareAtPrice&&(f.productData.compareAtPrice.amount||0)-(f.productData.minPrice.amount||0)>0?e.jsxs(e.Fragment,{children:[_e.splitTextIntoSpans(f.productData.name,!1),e.jsxs("span",{className:ae.price,id:"md",children:[e.jsx("span",{className:ae.newPrice,id:"md",children:g.formatPrice({amount:f.productData.minPrice.amount,currency:f.productData.minPrice.currency})}),e.jsx("span",{className:ae.oldPrice,id:"md",children:g.formatPrice({amount:f.productData.compareAtPrice.amount,currency:f.productData.compareAtPrice.currency})})]})]}):e.jsxs(e.Fragment,{children:[_e.splitTextIntoSpans(f.productData.name,!1),e.jsx("span",{className:ae.newPrice,id:"md",children:g.formatPrice({amount:f.productData.minPrice.amount,currency:f.productData.minPrice.currency})})]})}),f.productData.shortDescription&&e.jsx("span",{className:ae.short,id:"md",dangerouslySetInnerHTML:{__html:_e.splitTextIntoSpans(f.productData.shortDescription)}})]}),e.jsxs("div",{className:ae.cardButtons,children:[e.jsx(Y,{type:"Secondary",onClick:()=>{a(f.id),t(!1),i(!0)},children:"Buy"}),e.jsx(mt,{path:`/product/${f.productData.uniquePath}`,children:e.jsx(Y,{type:"Primary",style:{whiteSpace:"nowrap"},onClick:()=>{d(!1),_()},children:"View Details"})})]})]},f.id))}),u&&e.jsx("div",{className:ae.loading,children:e.jsx(ut,{})})]})})},gc="_container_6vcrl_1",_c="_wrapper_6vcrl_5",jt={container:gc,wrapper:_c},Ve=16,xc=({children:r,padding:t,style:n,notPadding:s=!1,maxWidth:a="var(--max-width-store)"})=>{const i=v.useRef(null),d=_e.useAdaptiveStyles(i);return e.jsx("div",{className:jt.container,ref:i,style:n,children:e.jsx("div",{className:jt.wrapper,style:{maxWidth:a,paddingTop:d==="desktop"?t==null?void 0:t.top:s?0:Ve,paddingBottom:d==="desktop"?t==null?void 0:t.bottom:s?0:Ve,paddingLeft:d==="desktop"?t==null?void 0:t.left:s?0:Ve,paddingRight:d==="desktop"?t==null?void 0:t.right:s?0:Ve,...n},children:r(d)})})},yc="_wrapper_ty9h3_2",vc="_label_ty9h3_9",bc="_top_ty9h3_17",jc="_select_ty9h3_23",Sc="_borderFocused_ty9h3_42",Ic="_input_ty9h3_49",Nc="_icon_ty9h3_59",wc="_rotate_ty9h3_64",Cc="_content_ty9h3_68",kc="_options_ty9h3_72",$c="_filteredOptions_ty9h3_93",Tc="_open_ty9h3_97",Pc="_option_ty9h3_72",Oc="_focused_ty9h3_115",Ac="_addon_ty9h3_119",Bc="_value_ty9h3_130",Mc="_postfix_ty9h3_135",Ec="_leftAddon_ty9h3_139",ee={wrapper:yc,label:vc,top:bc,select:jc,borderFocused:Sc,input:Ic,icon:Nc,rotate:wc,content:Cc,options:kc,filteredOptions:$c,open:Tc,option:Pc,focused:Oc,addon:Ac,value:Bc,postfix:Mc,leftAddon:Ec},ce=r=>{var y,T;const{onChange:t,label:n,value:s,options:a,style:i,switcher:d,postfixs:c,leftAddonOptions:o}=r,[u,m]=v.useState(!1),[I,_]=v.useState(""),[f,b]=v.useState(null),[l,p]=v.useState(!1),h=v.useRef(null);qe(h,()=>m(!1));function x(w){_(""),t(w),m(!1),b(null)}function S(w,M){return w?w.length>M+3?`${w.slice(0,M)}...`:w:""}function j(w){if(!u){(w.key==="Enter"||w.key==="ArrowDown")&&m(!0);return}const M=O;w.key==="ArrowDown"&&(w.preventDefault(),b(N=>N===null||N===M.length-1?0:N+1)),w.key==="ArrowUp"&&(w.preventDefault(),b(N=>N===null||N===0?M.length-1:N-1)),w.key==="Enter"&&f!==null&&(w.preventDefault(),x(M[f])),w.key==="Escape"&&m(!1)}const $=v.useRef(null),A=v.useMemo(()=>new R.Fuse(a,{threshold:.4,minMatchCharLength:2}),[a]),O=v.useMemo(()=>l&&I.trim()!==""?A.search(I).map(w=>w.item):a,[I,a,l,A]);return e.jsxs("div",{className:ee.wrapper,style:{...i},children:[n&&e.jsxs("div",{className:ee.top,children:[e.jsx("label",{className:ee.label,htmlFor:n,children:n}),d&&e.jsx(de,{current:d.value,onChange:d.onChange})]}),e.jsxs("label",{className:ee.content,ref:h,children:[e.jsxs("div",{className:g.clx(ee.select,{[ee.borderFocused]:u}),onKeyDown:j,onClick:w=>{w.stopPropagation(),m(M=>!M),p(!1)},ref:$,tabIndex:0,children:[o&&o.length>0&&e.jsx("div",{className:ee.addon,children:(y=o.find(w=>w.value===s))==null?void 0:y.addon}),e.jsx("div",{className:ee.input,id:"md",children:S(s,15)}),e.jsx("div",{className:g.clx(ee.icon,{[ee.rotate]:u}),onClick:w=>{w.stopPropagation(),m(M=>!M)},children:e.jsx(C,{name:"CaretDown",width:16,height:16,fill:"var(--text-primary)"})})]}),e.jsxs("div",{className:g.clx(ee.options,{[ee.open]:u}),style:{top:((T=$.current)==null?void 0:T.clientHeight)+10},children:[a.length>6&&e.jsx(Je,{type:"text",value:I,placeholder:"Search...",onChange:w=>{_(w),p(!0)},isSearch:!0}),e.jsxs("div",{className:ee.filteredOptions,children:[O.map((w,M)=>{var N;return e.jsxs("div",{className:g.clx(ee.option,{[ee.focused]:M===f}),onClick:()=>{x(w),m(!1)},id:"md",children:[o&&o.length>0&&e.jsx("div",{className:ee.leftAddon,children:(N=o.find(k=>k.value===w))==null?void 0:N.addon}),e.jsx("span",{className:ee.value,id:"md",children:S(w,20)}),c&&e.jsx("span",{className:ee.postfix,id:"md",children:c[M]})]},w)}),O.length===0&&e.jsx("div",{children:"No results found."})]})]})]})]})},Dc="_wrapper_mmfra_1",qc="_active_mmfra_27",Rc="_toggle_mmfra_30",Lc="_background_mmfra_42",Fc="_padding_mmfra_46",ge={wrapper:Dc,switch:"_switch_mmfra_14",active:qc,toggle:Rc,background:Lc,padding:Fc},de=r=>{const{onChange:t,style:n,current:s,label:a,hasBackground:i=!1,paddingless:d=!0}=r,[c,o]=v.useState(s),u=()=>{o(m=>!m),t==null||t(!c)};return v.useEffect(()=>{o(s)},[s]),e.jsx(e.Fragment,{children:a?e.jsxs("div",{className:g.clx(ge.wrapper,{[ge.background]:i,[ge.padding]:!d}),children:[e.jsx("div",{className:g.clx(ge.switch,{[ge.active]:c}),onClick:u,style:n,children:e.jsx("div",{className:ge.toggle})}),e.jsx("span",{className:ge.value,children:a})]}):e.jsx("div",{className:g.clx(ge.switch,{[ge.active]:c}),onClick:u,style:n,children:e.jsx("div",{className:ge.toggle})})})};function ot(){return ot=Object.assign?Object.assign.bind():function(r){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var s in n)({}).hasOwnProperty.call(n,s)&&(r[s]=n[s])}return r},ot.apply(null,arguments)}function St(r){if(r===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r}function at(r,t){return at=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,s){return n.__proto__=s,n},at(r,t)}function zc(r,t){r.prototype=Object.create(t.prototype),r.prototype.constructor=r,at(r,t)}var It=Number.isNaN||function(t){return typeof t=="number"&&t!==t};function Uc(r,t){return!!(r===t||It(r)&&It(t))}function Hc(r,t){if(r.length!==t.length)return!1;for(var n=0;n<r.length;n++)if(!Uc(r[n],t[n]))return!1;return!0}function nt(r,t){t===void 0&&(t=Hc);var n,s=[],a,i=!1;function d(){for(var c=[],o=0;o<arguments.length;o++)c[o]=arguments[o];return i&&n===this&&t(c,s)||(a=r.apply(this,c),i=!0,n=this,s=c),a}return d}var Vc=typeof performance=="object"&&typeof performance.now=="function",Nt=Vc?function(){return performance.now()}:function(){return Date.now()};function wt(r){cancelAnimationFrame(r.id)}function Wc(r,t){var n=Nt();function s(){Nt()-n>=t?r.call(null):a.id=requestAnimationFrame(s)}var a={id:requestAnimationFrame(s)};return a}var it=-1;function Ct(r){if(r===void 0&&(r=!1),it===-1||r){var t=document.createElement("div"),n=t.style;n.width="50px",n.height="50px",n.overflow="scroll",document.body.appendChild(t),it=t.offsetWidth-t.clientWidth,document.body.removeChild(t)}return it}var Me=null;function kt(r){if(r===void 0&&(r=!1),Me===null||r){var t=document.createElement("div"),n=t.style;n.width="50px",n.height="50px",n.overflow="scroll",n.direction="rtl";var s=document.createElement("div"),a=s.style;return a.width="100px",a.height="100px",t.appendChild(s),document.body.appendChild(t),t.scrollLeft>0?Me="positive-descending":(t.scrollLeft=1,t.scrollLeft===0?Me="negative":Me="positive-ascending"),document.body.removeChild(t),Me}return Me}process.env.NODE_ENV;var Gc=150,Xc=function(t,n){return t},Xe=null,Ye=null;process.env.NODE_ENV!=="production"&&typeof window<"u"&&typeof window.WeakSet<"u"&&(Xe=new WeakSet,Ye=new WeakSet);function Yc(r){var t,n=r.getItemOffset,s=r.getEstimatedTotalSize,a=r.getItemSize,i=r.getOffsetForIndexAndAlignment,d=r.getStartIndexForOffset,c=r.getStopIndexForStartIndex,o=r.initInstanceProps,u=r.shouldResetStyleCacheOnItemSizeChange,m=r.validateProps;return t=function(I){zc(_,I);function _(b){var l;return l=I.call(this,b)||this,l._instanceProps=o(l.props,St(l)),l._outerRef=void 0,l._resetIsScrollingTimeoutId=null,l.state={instance:St(l),isScrolling:!1,scrollDirection:"forward",scrollOffset:typeof l.props.initialScrollOffset=="number"?l.props.initialScrollOffset:0,scrollUpdateWasRequested:!1},l._callOnItemsRendered=void 0,l._callOnItemsRendered=nt(function(p,h,x,S){return l.props.onItemsRendered({overscanStartIndex:p,overscanStopIndex:h,visibleStartIndex:x,visibleStopIndex:S})}),l._callOnScroll=void 0,l._callOnScroll=nt(function(p,h,x){return l.props.onScroll({scrollDirection:p,scrollOffset:h,scrollUpdateWasRequested:x})}),l._getItemStyle=void 0,l._getItemStyle=function(p){var h=l.props,x=h.direction,S=h.itemSize,j=h.layout,$=l._getItemStyleCache(u&&S,u&&j,u&&x),A;if($.hasOwnProperty(p))A=$[p];else{var O=n(l.props,p,l._instanceProps),y=a(l.props,p,l._instanceProps),T=x==="horizontal"||j==="horizontal",w=x==="rtl",M=T?O:0;$[p]=A={position:"absolute",left:w?void 0:M,right:w?M:void 0,top:T?0:O,height:T?"100%":y,width:T?y:"100%"}}return A},l._getItemStyleCache=void 0,l._getItemStyleCache=nt(function(p,h,x){return{}}),l._onScrollHorizontal=function(p){var h=p.currentTarget,x=h.clientWidth,S=h.scrollLeft,j=h.scrollWidth;l.setState(function($){if($.scrollOffset===S)return null;var A=l.props.direction,O=S;if(A==="rtl")switch(kt()){case"negative":O=-S;break;case"positive-descending":O=j-x-S;break}return O=Math.max(0,Math.min(O,j-x)),{isScrolling:!0,scrollDirection:$.scrollOffset<O?"forward":"backward",scrollOffset:O,scrollUpdateWasRequested:!1}},l._resetIsScrollingDebounced)},l._onScrollVertical=function(p){var h=p.currentTarget,x=h.clientHeight,S=h.scrollHeight,j=h.scrollTop;l.setState(function($){if($.scrollOffset===j)return null;var A=Math.max(0,Math.min(j,S-x));return{isScrolling:!0,scrollDirection:$.scrollOffset<A?"forward":"backward",scrollOffset:A,scrollUpdateWasRequested:!1}},l._resetIsScrollingDebounced)},l._outerRefSetter=function(p){var h=l.props.outerRef;l._outerRef=p,typeof h=="function"?h(p):h!=null&&typeof h=="object"&&h.hasOwnProperty("current")&&(h.current=p)},l._resetIsScrollingDebounced=function(){l._resetIsScrollingTimeoutId!==null&&wt(l._resetIsScrollingTimeoutId),l._resetIsScrollingTimeoutId=Wc(l._resetIsScrolling,Gc)},l._resetIsScrolling=function(){l._resetIsScrollingTimeoutId=null,l.setState({isScrolling:!1},function(){l._getItemStyleCache(-1,null)})},l}_.getDerivedStateFromProps=function(l,p){return Kc(l,p),m(l),null};var f=_.prototype;return f.scrollTo=function(l){l=Math.max(0,l),this.setState(function(p){return p.scrollOffset===l?null:{scrollDirection:p.scrollOffset<l?"forward":"backward",scrollOffset:l,scrollUpdateWasRequested:!0}},this._resetIsScrollingDebounced)},f.scrollToItem=function(l,p){p===void 0&&(p="auto");var h=this.props,x=h.itemCount,S=h.layout,j=this.state.scrollOffset;l=Math.max(0,Math.min(l,x-1));var $=0;if(this._outerRef){var A=this._outerRef;S==="vertical"?$=A.scrollWidth>A.clientWidth?Ct():0:$=A.scrollHeight>A.clientHeight?Ct():0}this.scrollTo(i(this.props,l,p,j,this._instanceProps,$))},f.componentDidMount=function(){var l=this.props,p=l.direction,h=l.initialScrollOffset,x=l.layout;if(typeof h=="number"&&this._outerRef!=null){var S=this._outerRef;p==="horizontal"||x==="horizontal"?S.scrollLeft=h:S.scrollTop=h}this._callPropsCallbacks()},f.componentDidUpdate=function(){var l=this.props,p=l.direction,h=l.layout,x=this.state,S=x.scrollOffset,j=x.scrollUpdateWasRequested;if(j&&this._outerRef!=null){var $=this._outerRef;if(p==="horizontal"||h==="horizontal")if(p==="rtl")switch(kt()){case"negative":$.scrollLeft=-S;break;case"positive-ascending":$.scrollLeft=S;break;default:var A=$.clientWidth,O=$.scrollWidth;$.scrollLeft=O-A-S;break}else $.scrollLeft=S;else $.scrollTop=S}this._callPropsCallbacks()},f.componentWillUnmount=function(){this._resetIsScrollingTimeoutId!==null&&wt(this._resetIsScrollingTimeoutId)},f.render=function(){var l=this.props,p=l.children,h=l.className,x=l.direction,S=l.height,j=l.innerRef,$=l.innerElementType,A=l.innerTagName,O=l.itemCount,y=l.itemData,T=l.itemKey,w=T===void 0?Xc:T,M=l.layout,N=l.outerElementType,k=l.outerTagName,U=l.style,E=l.useIsScrolling,V=l.width,P=this.state.isScrolling,q=x==="horizontal"||M==="horizontal",F=q?this._onScrollHorizontal:this._onScrollVertical,L=this._getRangeToRender(),se=L[0],Z=L[1],K=[];if(O>0)for(var B=se;B<=Z;B++)K.push(v.createElement(p,{data:y,key:w(B,y),index:B,isScrolling:E?P:void 0,style:this._getItemStyle(B)}));var W=s(this.props,this._instanceProps);return v.createElement(N||k||"div",{className:h,onScroll:F,ref:this._outerRefSetter,style:ot({position:"relative",height:S,width:V,overflow:"auto",WebkitOverflowScrolling:"touch",willChange:"transform",direction:x},U)},v.createElement($||A||"div",{children:K,ref:j,style:{height:q?"100%":W,pointerEvents:P?"none":void 0,width:q?W:"100%"}}))},f._callPropsCallbacks=function(){if(typeof this.props.onItemsRendered=="function"){var l=this.props.itemCount;if(l>0){var p=this._getRangeToRender(),h=p[0],x=p[1],S=p[2],j=p[3];this._callOnItemsRendered(h,x,S,j)}}if(typeof this.props.onScroll=="function"){var $=this.state,A=$.scrollDirection,O=$.scrollOffset,y=$.scrollUpdateWasRequested;this._callOnScroll(A,O,y)}},f._getRangeToRender=function(){var l=this.props,p=l.itemCount,h=l.overscanCount,x=this.state,S=x.isScrolling,j=x.scrollDirection,$=x.scrollOffset;if(p===0)return[0,0,0,0];var A=d(this.props,$,this._instanceProps),O=c(this.props,A,$,this._instanceProps),y=!S||j==="backward"?Math.max(1,h):1,T=!S||j==="forward"?Math.max(1,h):1;return[Math.max(0,A-y),Math.max(0,Math.min(p-1,O+T)),A,O]},_}(v.PureComponent),t.defaultProps={direction:"ltr",itemData:void 0,layout:"vertical",overscanCount:2,useIsScrolling:!1},t}var Kc=function(t,n){var s=t.children,a=t.direction,i=t.height,d=t.layout,c=t.innerTagName,o=t.outerTagName,u=t.width,m=n.instance;if(process.env.NODE_ENV!=="production"){(c!=null||o!=null)&&Ye&&!Ye.has(m)&&(Ye.add(m),console.warn("The innerTagName and outerTagName props have been deprecated. Please use the innerElementType and outerElementType props instead."));var I=a==="horizontal"||d==="horizontal";switch(a){case"horizontal":case"vertical":Xe&&!Xe.has(m)&&(Xe.add(m),console.warn('The direction prop should be either "ltr" (default) or "rtl". Please use the layout prop to specify "vertical" (default) or "horizontal" orientation.'));break;case"ltr":case"rtl":break;default:throw Error('An invalid "direction" prop has been specified. Value should be either "ltr" or "rtl". '+('"'+a+'" was specified.'))}switch(d){case"horizontal":case"vertical":break;default:throw Error('An invalid "layout" prop has been specified. Value should be either "horizontal" or "vertical". '+('"'+d+'" was specified.'))}if(s==null)throw Error('An invalid "children" prop has been specified. Value should be a React component. '+('"'+(s===null?"null":typeof s)+'" was specified.'));if(I&&typeof u!="number")throw Error('An invalid "width" prop has been specified. Horizontal lists must specify a number for width. '+('"'+(u===null?"null":typeof u)+'" was specified.'));if(!I&&typeof i!="number")throw Error('An invalid "height" prop has been specified. Vertical lists must specify a number for height. '+('"'+(i===null?"null":typeof i)+'" was specified.'))}},Qc=Yc({getItemOffset:function(t,n){var s=t.itemSize;return n*s},getItemSize:function(t,n){var s=t.itemSize;return s},getEstimatedTotalSize:function(t){var n=t.itemCount,s=t.itemSize;return s*n},getOffsetForIndexAndAlignment:function(t,n,s,a,i,d){var c=t.direction,o=t.height,u=t.itemCount,m=t.itemSize,I=t.layout,_=t.width,f=c==="horizontal"||I==="horizontal",b=f?_:o,l=Math.max(0,u*m-b),p=Math.min(l,n*m),h=Math.max(0,n*m-b+m+d);switch(s==="smart"&&(a>=h-b&&a<=p+b?s="auto":s="center"),s){case"start":return p;case"end":return h;case"center":{var x=Math.round(h+(p-h)/2);return x<Math.ceil(b/2)?0:x>l+Math.floor(b/2)?l:x}case"auto":default:return a>=h&&a<=p?a:a<h?h:p}},getStartIndexForOffset:function(t,n){var s=t.itemCount,a=t.itemSize;return Math.max(0,Math.min(s-1,Math.floor(n/a)))},getStopIndexForStartIndex:function(t,n,s){var a=t.direction,i=t.height,d=t.itemCount,c=t.itemSize,o=t.layout,u=t.width,m=a==="horizontal"||o==="horizontal",I=n*c,_=m?u:i,f=Math.ceil((_+s-I)/c);return Math.max(0,Math.min(d-1,n+f-1))},initInstanceProps:function(t){},shouldResetStyleCacheOnItemSizeChange:!0,validateProps:function(t){var n=t.itemSize;if(process.env.NODE_ENV!=="production"&&typeof n!="number")throw Error('An invalid "itemSize" prop has been specified. Value should be a number. '+('"'+(n===null?"null":typeof n)+'" was specified.'))}});const Jc="_wrapper_1gk74_2",Zc="_label_1gk74_9",el="_top_1gk74_17",tl="_select_1gk74_23",sl="_borderFocused_1gk74_42",nl="_input_1gk74_49",il="_icon_1gk74_59",ol="_rotate_1gk74_64",al="_content_1gk74_68",rl="_options_1gk74_72",cl="_filteredOptions_1gk74_93",ll="_open_1gk74_97",dl="_option_1gk74_72",ul="_focused_1gk74_115",hl="_addon_1gk74_119",pl="_value_1gk74_130",ml="_postfix_1gk74_134",fl="_leftAddon_1gk74_138",te={wrapper:Jc,label:Zc,top:el,select:tl,borderFocused:sl,input:nl,icon:il,rotate:ol,content:al,options:rl,filteredOptions:cl,open:ll,option:dl,focused:ul,addon:hl,value:pl,postfix:ml,leftAddon:fl};function gl(r,t){v.useEffect(()=>{function n(s){!r.current||r.current.contains(s.target)||t(s)}return document.addEventListener("mousedown",n),()=>{document.removeEventListener("mousedown",n)}},[r,t])}const ft=r=>{var M;const{onChange:t,label:n,value:s,options:a,style:i,switcher:d,postfixs:c,leftAddonOptions:o}=r,[u,m]=v.useState(!1),[I,_]=v.useState(""),[f,b]=v.useState(null),[l,p]=v.useState(!1),h=v.useRef(null);gl(h,()=>m(!1));function x(N){_(""),t(N),m(!1),b(null)}function S(N,k){return N?N.length>k+3?`${N.slice(0,k)}...`:N:""}function j(N){if(!u){(N.key==="Enter"||N.key==="ArrowDown")&&m(!0);return}const k=O;N.key==="ArrowDown"&&(N.preventDefault(),b(U=>U===null||U===k.length-1?0:U+1)),N.key==="ArrowUp"&&(N.preventDefault(),b(U=>U===null||U===0?k.length-1:U-1)),N.key==="Enter"&&f!==null&&(N.preventDefault(),x(k[f])),N.key==="Escape"&&m(!1)}const $=v.useRef(null),A=v.useMemo(()=>new R.Fuse(a,{threshold:.4,minMatchCharLength:2}),[a]),O=v.useMemo(()=>l&&I.trim()!==""?A.search(I).map(N=>N.item):a,[I,a,l,A]),y=v.useMemo(()=>{const N=new Map;return o==null||o.forEach(k=>{N.set(k.value,k.addon)}),N},[o]),T=v.useMemo(()=>{if(!c)return new Map;const N=new Map;if(c.length===a.length)for(let k=0;k<a.length;k++)N.set(a[k],c[k]);return N},[a,c]),w=v.useCallback(({index:N,style:k})=>{const U=O[N];if(!U)return null;const E=f===N,V=y.get(U),P=T.get(U);return e.jsxs("div",{className:g.clx(te.option,{[te.focused]:E}),style:k,onClick:()=>x(U),children:[V&&e.jsx("div",{className:te.leftAddon,children:V}),e.jsx("span",{className:te.value,children:S(U,20)}),P&&e.jsx("span",{className:te.postfix,children:P})]},U)},[O,f,y,T]);return e.jsxs("div",{className:te.wrapper,style:{...i},children:[n&&e.jsxs("div",{className:te.top,children:[e.jsx("label",{className:te.label,htmlFor:n,children:n}),d&&e.jsx(de,{current:d.value,onChange:d.onChange})]}),e.jsxs("label",{className:te.content,ref:h,children:[e.jsxs("div",{className:g.clx(te.select,{[te.borderFocused]:u}),onKeyDown:j,onClick:N=>{N.stopPropagation(),m(k=>!k),p(!1)},ref:$,tabIndex:0,children:[o&&e.jsx("div",{className:te.addon,children:y.get(s)}),e.jsx("div",{className:te.input,children:S(s,15)}),e.jsx("div",{className:g.clx(te.icon,{[te.rotate]:u}),onClick:N=>{N.stopPropagation(),m(k=>!k)},children:e.jsx(C,{name:"CaretDown",width:16,height:16})})]}),e.jsxs("div",{className:g.clx(te.options,{[te.open]:u}),style:{top:((M=$.current)==null?void 0:M.clientHeight)+10},children:[a.length>6&&e.jsx(Je,{type:"text",value:I,placeholder:"Search...",onChange:N=>{_(N),p(!0)},isSearch:!0}),e.jsxs("div",{className:te.filteredOptions,children:[O.length===0&&e.jsx("div",{children:"No results found."}),O.length>0&&e.jsx(Qc,{height:200,itemCount:O.length,itemSize:36,width:"100%",itemKey:N=>O[N]||N,children:w})]})]})]})]})},_l="_modal_1h74q_1",xl="_title_1h74q_14",yl="_buttons_1h74q_20",We={modal:_l,title:xl,buttons:yl},vl=()=>{const{title:r,description:t,onConfirm:n,setTitle:s,setDescription:a,setOnConfirm:i}=g.useConfirmationModalStore(),{setIsOpen:d}=g.useModalStore();function c(){d(!1),setTimeout(()=>{s(null),a(null),i(null),d(!0)},300)}return r&&t&&n&&e.jsxs("div",{className:We.modal,onClick:o=>o.stopPropagation(),children:[e.jsx("div",{className:We.title,children:r}),e.jsx("div",{className:We.description,children:t}),e.jsxs("div",{className:We.buttons,children:[e.jsx(Ie,{onClick:c,children:"Cancel"}),e.jsx(Ie,{onClick:()=>{n(),c()},type:"Secondary",children:"Confirm"})]})]})},bl="_notification_2jmah_1",jl="_text_2jmah_22",Sl="_timer_2jmah_27",Il="_warning_2jmah_32",Nl="_error_2jmah_37",wl="_success_2jmah_42",Ee={notification:bl,text:jl,timer:Sl,warning:Il,error:Nl,success:wl},$t={warning:"#C1972A",error:"#FF3F19",success:"#338B13"},Cl=r=>{const{type:t,message:n,style:s,padding:a,timer:i,id:d,element:c}=r,[o,u]=v.useState(i),{setNotifications:m}=g.useNotificationStore();function I(){const f=g.useNotificationStore.getState().notifications.filter(b=>b.id!==d);m([...f])}return v.useEffect(()=>{const _=setTimeout(()=>{I()},i*1e3);return()=>clearTimeout(_)},[i]),v.useEffect(()=>{const _=setInterval(()=>u(f=>f-1),1e3);return()=>clearInterval(_)},[o]),c?c({type:t,message:n,style:s,padding:a,timer:i,id:d}):e.jsx("div",{style:{padding:a,position:"relative"},children:e.jsxs("div",{className:g.clx(Ee.notification,{[Ee.warning]:t==="warning",[Ee.error]:t==="error",[Ee.success]:t==="success"}),style:s,children:[e.jsx("div",{children:e.jsx(C,{name:"Info",fill:$t[t],width:20,height:20})}),e.jsx("div",{className:Ee.text,children:n}),i&&e.jsx("div",{className:Ee.timer,children:o}),e.jsx("div",{style:{display:"flex"},children:e.jsx(C,{name:"X",fill:$t[t],width:20,height:20,hoverable:!0,onClick:()=>I()})})]})})},kl="_loader_jr7a4_1",$l={loader:kl},Tl=()=>e.jsx("div",{className:$l.loader}),Pl="_wrapper_2vleg_1",Ol="_label_2vleg_9",Al="_options_2vleg_17",Bl="_radioLabel_2vleg_23",Ml="_radio_2vleg_23",El="_custom_2vleg_38",Dl="_option_2vleg_17",Te={wrapper:Pl,label:Ol,options:Al,radioLabel:Bl,radio:Ml,custom:El,option:Dl},ql=r=>{const{defaultValue:t,options:n,onChange:s,label:a,flexDirection:i="row"}=r,[d,c]=v.useState(t),o=u=>{const m=u.target.value;c(m),s(m)};return e.jsxs("div",{className:Te.wrapper,children:[e.jsx("span",{className:Te.label,children:a}),e.jsx("div",{className:Te.options,style:{flexDirection:i},children:n.map(u=>e.jsxs("label",{className:Te.radioLabel,children:[e.jsx("input",{type:"radio",value:u.value,checked:d===u.value,onChange:o,className:Te.radio}),e.jsx("span",{className:Te.custom}),e.jsx("span",{className:Te.option,children:u.label})]},u.value))})]})},Rl="_modal_270ti_1",Ll="_padding_270ti_17",Fl="_content_270ti_21",zl="_close_270ti_42",Ge={modal:Rl,padding:Ll,content:Fl,close:zl},Ul=r=>{const{close:t,children:n,withAnimation:s=!0,hasPadding:a=!0}=r,{isOpen:i,setIsOpen:d}=g.useModalStore();return v.useEffect(()=>{const c=()=>{d(!1),s?setTimeout(()=>{t(!1),d(!0)},300):(t(!1),d(!0))};return document.body.addEventListener("click",c),()=>{document.body.removeEventListener("click",c)}},[]),e.jsx("div",{className:g.clx(Ge.modal,{[Ge.padding]:a}),children:s?e.jsx("div",{className:g.clx(Ge.content,{[Ge.close]:!i}),children:n}):e.jsx(e.Fragment,{children:n})})},Hl="_notification_o93uc_1",Vl="_accent_o93uc_15",Wl="_body_o93uc_23",Gl="_label_o93uc_30",Xl="_content_o93uc_36",Yl="_timer_o93uc_41",Kl="_warning_o93uc_48",Ql="_error_o93uc_53",Jl="_success_o93uc_58",Pe={notification:Hl,accent:Vl,body:Wl,label:Gl,content:Xl,timer:Yl,warning:Kl,error:Ql,success:Jl},Zl={warning:"Warning",error:"Error",success:"Success"},ed=({type:r,message:t,style:n,padding:s=0,timer:a=0})=>{const[i,d]=v.useState(a);return v.useEffect(()=>{if(!a)return;const c=setInterval(()=>d(o=>o-1),1e3);return()=>clearInterval(c)},[]),e.jsx("div",{style:{padding:s,position:"relative"},children:e.jsxs("div",{className:g.clx(Pe.notification,Pe[r]),style:n,children:[e.jsx("div",{className:Pe.accent}),e.jsx("div",{className:Pe.body,children:e.jsxs("div",{className:Pe.content,children:[e.jsxs("span",{className:Pe.label,children:[Zl[r],":"]})," ",t]})}),a>0&&e.jsx("span",{className:Pe.timer,children:i})]})})};exports.Accordion=Mr;exports.AlignText=Ot;exports.BuilderModal=Ul;exports.BurgerMenuButton=zt;exports.Button=Y;exports.ButtonSettings=Ie;exports.ButtonTypeSettings=Bt;exports.ButtonsSettings=so;exports.CategorySettings=di;exports.ChargeTypes=ht;exports.Checkbox=Et;exports.ChooseImage=De;exports.ChooseImageModal=Rn;exports.ConfirmationModal=vl;exports.EmptyCart=Lt;exports.ErrorableBlock=Xt;exports.FormSettings=Fi;exports.GroupCardModal=fc;exports.HeaderButtons=hr;exports.Icon=C;exports.Input=Je;exports.InputSettings=pe;exports.ItemsSettings=At;exports.LayoutSettings=js;exports.Link=mt;exports.ListingSelector=Oo;exports.Loader=ut;exports.LoaderBuilder=Tl;exports.MetaInfoPost=zr;exports.Modal=Re;exports.NotificationAntistock=ed;exports.NotificationBuilder=Cl;exports.PagesMobileMenu=pr;exports.PagesMobileModal=Ft;exports.PagesSettings=Si;exports.ProductCardButtons=qr;exports.ProductCardModal=Jr;exports.ProductOptions=Dt;exports.Radio=ql;exports.RangeSelector=Qe;exports.Select=ce;exports.SelectInfiniteList=ft;exports.SelectTypeText=lt;exports.ShareLink=wr;exports.ShoppingButton=qt;exports.ShoppingModalCart=Rt;exports.Switch=de;exports.TextSettings=dt;exports.Textarea=Pa;exports.TextareaSettings=ct;exports.Tip=Mt;exports.TypesText=rt;exports.UserInfo=pt;exports.Wrapper=xc;exports.getRegisteredIcon=Pt;exports.getRegisteredIcons=Jt;exports.isIconRegistered=Qt;exports.registerIcon=Tt;exports.registerIcons=Zt;exports.useOnClickOutside=qe;
package/dist/ui.cjs.js CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./ui-components-D2ccINdB.cjs");exports.Accordion=t.Accordion;exports.AlignText=t.AlignText;exports.BurgerMenuButton=t.BurgerMenuButton;exports.Button=t.Button;exports.ButtonSettings=t.ButtonSettings;exports.ButtonTypeSettings=t.ButtonTypeSettings;exports.ButtonsSettings=t.ButtonsSettings;exports.CategorySettings=t.CategorySettings;exports.ChargeTypes=t.ChargeTypes;exports.Checkbox=t.Checkbox;exports.ChooseImage=t.ChooseImage;exports.ChooseImageModal=t.ChooseImageModal;exports.ConfirmationModal=t.ConfirmationModal;exports.EmptyCart=t.EmptyCart;exports.ErrorableBlock=t.ErrorableBlock;exports.FormSettings=t.FormSettings;exports.GroupCardModal=t.GroupCardModal;exports.HeaderButtons=t.HeaderButtons;exports.Icon=t.Icon;exports.InputSettings=t.InputSettings;exports.InputUI=t.Input;exports.ItemsSettings=t.ItemsSettings;exports.LayoutSettings=t.LayoutSettings;exports.Link=t.Link;exports.ListingSelector=t.ListingSelector;exports.Loader=t.Loader;exports.LoaderBuilder=t.LoaderBuilder;exports.MetaInfoPost=t.MetaInfoPost;exports.Modal=t.Modal;exports.NotificationBuilder=t.NotificationBuilder;exports.PagesMobileMenu=t.PagesMobileMenu;exports.PagesMobileModal=t.PagesMobileModal;exports.PagesSettings=t.PagesSettings;exports.ProductCardButtons=t.ProductCardButtons;exports.ProductCardModal=t.ProductCardModal;exports.ProductOptions=t.ProductOptions;exports.RadioUI=t.Radio;exports.RangeSelector=t.RangeSelector;exports.Select=t.Select;exports.SelectInfiniteList=t.SelectInfiniteList;exports.SelectTypeText=t.SelectTypeText;exports.SelectUI=t.Select;exports.ShareLink=t.ShareLink;exports.ShoppingButton=t.ShoppingButton;exports.ShoppingModalCart=t.ShoppingModalCart;exports.Switch=t.Switch;exports.TextSettings=t.TextSettings;exports.TextareaSettings=t.TextareaSettings;exports.TextareaUI=t.Textarea;exports.Tip=t.Tip;exports.TypesText=t.TypesText;exports.UserInfo=t.UserInfo;exports.Wrapper=t.Wrapper;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./ui-components-CWLDlDmG.cjs");exports.Accordion=t.Accordion;exports.AlignText=t.AlignText;exports.BurgerMenuButton=t.BurgerMenuButton;exports.Button=t.Button;exports.ButtonSettings=t.ButtonSettings;exports.ButtonTypeSettings=t.ButtonTypeSettings;exports.ButtonsSettings=t.ButtonsSettings;exports.CategorySettings=t.CategorySettings;exports.ChargeTypes=t.ChargeTypes;exports.Checkbox=t.Checkbox;exports.ChooseImage=t.ChooseImage;exports.ChooseImageModal=t.ChooseImageModal;exports.ConfirmationModal=t.ConfirmationModal;exports.EmptyCart=t.EmptyCart;exports.ErrorableBlock=t.ErrorableBlock;exports.FormSettings=t.FormSettings;exports.GroupCardModal=t.GroupCardModal;exports.HeaderButtons=t.HeaderButtons;exports.Icon=t.Icon;exports.InputSettings=t.InputSettings;exports.InputUI=t.Input;exports.ItemsSettings=t.ItemsSettings;exports.LayoutSettings=t.LayoutSettings;exports.Link=t.Link;exports.ListingSelector=t.ListingSelector;exports.Loader=t.Loader;exports.LoaderBuilder=t.LoaderBuilder;exports.MetaInfoPost=t.MetaInfoPost;exports.Modal=t.Modal;exports.NotificationBuilder=t.NotificationBuilder;exports.PagesMobileMenu=t.PagesMobileMenu;exports.PagesMobileModal=t.PagesMobileModal;exports.PagesSettings=t.PagesSettings;exports.ProductCardButtons=t.ProductCardButtons;exports.ProductCardModal=t.ProductCardModal;exports.ProductOptions=t.ProductOptions;exports.RadioUI=t.Radio;exports.RangeSelector=t.RangeSelector;exports.Select=t.Select;exports.SelectInfiniteList=t.SelectInfiniteList;exports.SelectTypeText=t.SelectTypeText;exports.SelectUI=t.Select;exports.ShareLink=t.ShareLink;exports.ShoppingButton=t.ShoppingButton;exports.ShoppingModalCart=t.ShoppingModalCart;exports.Switch=t.Switch;exports.TextSettings=t.TextSettings;exports.TextareaSettings=t.TextareaSettings;exports.TextareaUI=t.Textarea;exports.Tip=t.Tip;exports.TypesText=t.TypesText;exports.UserInfo=t.UserInfo;exports.Wrapper=t.Wrapper;
package/dist/ui.es.js CHANGED
@@ -1,4 +1,4 @@
1
- import { O as t, A as e, J as o, g as n, B as i, r, p as g, o as S, v as d, i as l, $ as u, b as p, C as c, z as I, E as B, F as M, Z as C, H as T, I as h, c as x, f as m, n as y, l as L, Q as P, t as f, e as U, L as b, X as k, M as A, N as E, G as R, D as w, P as F, V as G, Y as H, w as N, R as O, s as W, S as j, a0 as q, _ as v, S as z, K as D, x as J, y as K, d as Q, m as V, T as X, j as Y, h as Z, q as _, U as $, W as aa } from "./ui-components-DSaAYQJp.js";
1
+ import { Z as t, A as e, X as o, g as n, B as i, x as r, v as g, t as S, D as d, i as l, a4 as u, b as p, C as c, O as I, E as B, F as M, a2 as C, H as T, I as h, c as x, f as y, s as L, p as P, _ as f, z as m, e as U, L as b, a0 as k, M as A, N as E, V as R, Q as w, P as F, $ as G, a1 as H, G as N, R as O, y as W, S as j, a5 as q, a3 as v, S as z, Y as D, J, K, d as Q, q as V, T as X, j as Y, h as Z, w as _, U as $, W as aa } from "./ui-components-BTotDG_w.js";
2
2
  export {
3
3
  t as Accordion,
4
4
  e as AlignText,
@@ -20,11 +20,11 @@ export {
20
20
  T as HeaderButtons,
21
21
  h as Icon,
22
22
  x as InputSettings,
23
- m as InputUI,
24
- y as ItemsSettings,
25
- L as LayoutSettings,
26
- P as Link,
27
- f as ListingSelector,
23
+ y as InputUI,
24
+ L as ItemsSettings,
25
+ P as LayoutSettings,
26
+ f as Link,
27
+ m as ListingSelector,
28
28
  U as Loader,
29
29
  b as LoaderBuilder,
30
30
  k as MetaInfoPost,
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),r=require("react"),g=require("./charge-BHULUGTw.cjs"),d=require("./builder-BLDXBzNl.cjs"),u=require("./ui-components-D2ccINdB.cjs");require("./builder-components-DHTh1VoV.cjs");require("./ticket-SllRZ1vs.cjs");require("react-dom");const j="_lock_1mxa7_1",b="_wrapper_1mxa7_12",I="_content_1mxa7_22",y="_info_1mxa7_31",N="_buttons_1mxa7_38",q="_button_1mxa7_38",k="_input_1mxa7_50",L="_error_1mxa7_57",s={lock:j,wrapper:b,content:I,info:y,buttons:N,button:q,input:k,error:L},V=()=>{const[f,n]=r.useState(!1),[h,w]=r.useState(!1),[c,P]=r.useState(""),{general:o,setGeneral:_}=d.useGeneralStore(),{setShopPassword:p}=d.useStorefrontStore(),i=d.useLocation(),m=d.useNavigate();r.useEffect(()=>{if(o&&(!o.info.passwordProtected||o.isPasswordValid)){const t=i.state.from==="/validation"?"/":i.state.from;m(t)}},[o]),r.useEffect(()=>{o||(async()=>{var x;n(!0);const l=localStorage.getItem("shopPassword")||"",a=await g.fetchGeneral(l);if(a.isPasswordValid){const S=((x=i.state)==null?void 0:x.from)||"/";m(S)}a.info.passwordProtected||(localStorage.removeItem("shopPassword"),p("")),_(a),n(!1)})()},[o]);async function v(){var l;n(!0);const t=await g.fetchGeneral(c);if(!t.isPasswordValid)w(!0);else{localStorage.setItem("shopPassword",c),p(c);const a=((l=i.state)==null?void 0:l.from)||"/";m(a),t.info.passwordProtected||(localStorage.removeItem("shopPassword"),p("")),_(t)}n(!1)}return e.jsxs("div",{className:s.wrapper,children:[!f&&e.jsxs("div",{className:s.content,children:[e.jsx("div",{className:s.lock,children:e.jsx(u.Icon,{name:"Lock",fill:"var(--text-secondary)",width:64,height:64})}),e.jsxs("div",{className:s.info,children:[e.jsx("h2",{id:"h2",className:s.title,children:"The store is password protected"}),e.jsx("p",{id:"p",className:s.description,children:"If you do not have a password, we recommend you to contact the technical support of the store or write to the mail"})]}),e.jsxs("div",{className:s.input,children:[e.jsx(u.Input,{type:"password",onChange:t=>{w(!1),P(t)},value:c,placeholder:"Password",required:!0}),e.jsx("span",{className:s.error,children:h&&"Incorrect password"})]}),e.jsx("div",{className:s.buttons,children:e.jsx(u.Button,{type:"Primary",className:s.button,disabled:h,onClick:v,children:"Submit"})})]}),f&&e.jsx(u.Loader,{})]})};exports.ValidationPage=V;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),r=require("react"),g=require("./charge-BAP3iPAM.cjs"),d=require("./builder-B7hjBRYI.cjs"),u=require("./ui-components-CWLDlDmG.cjs");require("./builder-components-BjoFBErH.cjs");require("./ticket-DXz_-29l.cjs");require("react-dom");const j="_lock_1mxa7_1",b="_wrapper_1mxa7_12",I="_content_1mxa7_22",y="_info_1mxa7_31",N="_buttons_1mxa7_38",q="_button_1mxa7_38",k="_input_1mxa7_50",L="_error_1mxa7_57",s={lock:j,wrapper:b,content:I,info:y,buttons:N,button:q,input:k,error:L},V=()=>{const[f,n]=r.useState(!1),[h,w]=r.useState(!1),[c,P]=r.useState(""),{general:o,setGeneral:_}=d.useGeneralStore(),{setShopPassword:p}=d.useStorefrontStore(),i=d.useLocation(),m=d.useNavigate();r.useEffect(()=>{if(o&&(!o.info.passwordProtected||o.isPasswordValid)){const t=i.state.from==="/validation"?"/":i.state.from;m(t)}},[o]),r.useEffect(()=>{o||(async()=>{var x;n(!0);const l=localStorage.getItem("shopPassword")||"",a=await g.fetchGeneral(l);if(a.isPasswordValid){const S=((x=i.state)==null?void 0:x.from)||"/";m(S)}a.info.passwordProtected||(localStorage.removeItem("shopPassword"),p("")),_(a),n(!1)})()},[o]);async function v(){var l;n(!0);const t=await g.fetchGeneral(c);if(!t.isPasswordValid)w(!0);else{localStorage.setItem("shopPassword",c),p(c);const a=((l=i.state)==null?void 0:l.from)||"/";m(a),t.info.passwordProtected||(localStorage.removeItem("shopPassword"),p("")),_(t)}n(!1)}return e.jsxs("div",{className:s.wrapper,children:[!f&&e.jsxs("div",{className:s.content,children:[e.jsx("div",{className:s.lock,children:e.jsx(u.Icon,{name:"Lock",fill:"var(--text-secondary)",width:64,height:64})}),e.jsxs("div",{className:s.info,children:[e.jsx("h2",{id:"h2",className:s.title,children:"The store is password protected"}),e.jsx("p",{id:"p",className:s.description,children:"If you do not have a password, we recommend you to contact the technical support of the store or write to the mail"})]}),e.jsxs("div",{className:s.input,children:[e.jsx(u.Input,{type:"password",onChange:t=>{w(!1),P(t)},value:c,placeholder:"Password",required:!0}),e.jsx("span",{className:s.error,children:h&&"Incorrect password"})]}),e.jsx("div",{className:s.buttons,children:e.jsx(u.Button,{type:"Primary",className:s.button,disabled:h,onClick:v,children:"Submit"})})]}),f&&e.jsx(u.Loader,{})]})};exports.ValidationPage=V;
@@ -1,10 +1,10 @@
1
1
  import { jsxs as l, jsx as o } from "react/jsx-runtime";
2
2
  import r from "react";
3
- import { V as g } from "./charge-BcGATQ-j.js";
4
- import { V as I, M as b, ab as x, p as N } from "./builder-C64dSizd.js";
5
- import { I as y, f as k, g as V, e as L } from "./ui-components-DSaAYQJp.js";
6
- import "./builder-components-FfKRBcLk.js";
7
- import "./ticket-D8MxvdiA.js";
3
+ import { V as g } from "./charge-BQUHzEju.js";
4
+ import { V as I, M as b, ab as x, p as N } from "./builder-D_zv5ue0.js";
5
+ import { I as y, f as k, g as V, e as L } from "./ui-components-BTotDG_w.js";
6
+ import "./builder-components-DN-mNdj8.js";
7
+ import "./ticket-B0VGIvyK.js";
8
8
  import "react-dom";
9
9
  const E = "_lock_1mxa7_1", G = "_wrapper_1mxa7_12", j = "_content_1mxa7_22", C = "_info_1mxa7_31", q = "_buttons_1mxa7_38", B = "_button_1mxa7_38", M = "_input_1mxa7_50", R = "_error_1mxa7_57", t = {
10
10
  lock: E,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@billgangcom/theme-lib",
3
- "version": "1.110.5",
3
+ "version": "1.110.6",
4
4
  "type": "module",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -1 +0,0 @@
1
- "use strict";const t=require("react/jsx-runtime"),a=require("./builder-BLDXBzNl.cjs"),p=require("./ticket-SllRZ1vs.cjs"),n=require("react"),w=require("./charge-BHULUGTw.cjs"),r=require("@phosphor-icons/react"),_=({children:e,shopDomain:o,shopId:l,shopPassword:h,shopLogo:m})=>{const{setShopDomain:x,setShopId:C,setShopPassword:v,setShopTerms:f,setShopPrivacyPolicy:d,setShopRefundPolicy:j,setShopLogo:R}=a.useStorefrontStore();return n.useLayoutEffect(()=>{const i=async()=>{const{data:u}=await w.fetchTerms();f(u)},y=async()=>{const{data:u}=await w.fetchPrivacyPolicy();d(u)},I=async()=>{const{data:u}=await w.fetchRefundPolicy();j(u)};x(o),C(l),h&&v(h),m&&R(m),i(),y(),I()},[o,l,h]),t.jsx(t.Fragment,{children:e})},X="_wrapper_1xuz3_18",T={wrapper:X},k=new Map;function B(e,o){k.set(e,o)}function G(e){return k.get(e)||null}function N(e){return k.has(e)}function Q(){return Array.from(k.keys())}function J(e){Object.entries(e).forEach(([o,l])=>{B(o,l)})}function $(){J({X:r.X,Plus:r.Plus,Minus:r.Minus,Check:r.Check,Clock:r.Clock,Info:r.Info,Copy:r.Copy,Trash:r.Trash,Sliders:r.Sliders,Image:r.Image,List:r.List,Handbag:r.Handbag,ArrowUp:r.ArrowUp,ArrowLineUpRight:r.ArrowLineUpRight,CaretRight:r.CaretRight,MagnifyingGlass:r.MagnifyingGlass,CheckCircle:r.CheckCircle,XCircle:r.XCircle,Star:r.Star,Fire:r.Fire,Lightning:r.Lightning,FileText:r.FileText,BookOpen:r.BookOpen,DownloadSimple:r.DownloadSimple,DiscordLogo:r.DiscordLogo,TelegramLogo:r.TelegramLogo,SignOut:r.SignOut,Wallet:r.Wallet,PaperPlaneRight:r.PaperPlaneRight,ChatsTeardrop:r.ChatsTeardrop,DotsSixVertical:r.DotsSixVertical,Heart:r.Heart,User:r.User,Calendar:r.Calendar,House:r.House,CurrencyCircleDollar:r.CurrencyCircleDollar,Medal:r.Medal,CalendarCheck:r.CalendarCheck,Question:r.Question,ShieldCheck:r.ShieldCheck,FileCloud:r.FileCloud,Warning:r.Warning,WarningDiamond:r.WarningDiamond})}const K=n.lazy(()=>Promise.resolve().then(()=>require("./builder-BLDXBzNl.cjs")).then(e=>e.index).then(e=>({default:e.BuilderPage}))),Y=n.lazy(()=>Promise.resolve().then(()=>require("./index-BWeBpiO8.cjs")).then(e=>({default:e.ErrorPage}))),Z=n.lazy(()=>Promise.resolve().then(()=>require("./index-DugPvosX.cjs")).then(e=>({default:e.ActivePage}))),ee=n.lazy(()=>Promise.resolve().then(()=>require("./validation-_p4G1oC2.cjs")).then(e=>({default:e.ValidationPage}))),te=n.lazy(()=>Promise.resolve().then(()=>require("./index-T0XXq2pq.cjs")).then(e=>({default:e.WrapperPage}))),re=n.lazy(()=>Promise.resolve().then(()=>require("./index-C23qWl0W.cjs")).then(e=>({default:e.RouterErrorPage}))),c=n.lazy(()=>Promise.resolve().then(()=>require("./index-T7iWZCzU.cjs")).then(e=>({default:e.DynamicErrorPage}))),ne=n.lazy(()=>Promise.resolve().then(()=>require("./checkout-C_l1R6-u.cjs")).then(e=>({default:e.Checkout}))),se=n.lazy(()=>Promise.resolve().then(()=>require("./charge-BHULUGTw.cjs")).then(e=>e.index$1).then(e=>({default:e.ChargePage}))),oe=n.lazy(()=>Promise.resolve().then(()=>require("./ticket-SllRZ1vs.cjs")).then(e=>e.index).then(e=>({default:e.TicketItem}))),ie=n.lazy(()=>Promise.resolve().then(()=>require("./subscription-D-GVTc5C.cjs")).then(e=>e.index).then(e=>({default:e.Subscription}))),ae=n.lazy(()=>Promise.resolve().then(()=>require("./top-up-CyEK2j7V.cjs")).then(e=>({default:e.TopUpBalance}))),ce=n.lazy(()=>Promise.resolve().then(()=>require("./order-_mx45K-F.cjs")).then(e=>e.index).then(e=>({default:e.OrderPage}))),le=n.lazy(()=>Promise.resolve().then(()=>require("./charge-BHULUGTw.cjs")).then(e=>e.index).then(e=>({default:e.CustomerDashboard}))),L=n.lazy(()=>Promise.resolve().then(()=>require("./charge-BHULUGTw.cjs")).then(e=>e.recapcha).then(e=>({default:e.ReCaptchaProvider}))),de=()=>null,s=({children:e})=>t.jsx(n.Suspense,{fallback:t.jsx(de,{}),children:e}),ue=n.lazy(()=>Promise.resolve().then(()=>require("./builder-components-DHTh1VoV.cjs")).then(e=>e.index).then(e=>({default:e.RenderAnnouncement}))),z=n.lazy(()=>Promise.resolve().then(()=>require("./builder-components-DHTh1VoV.cjs")).then(e=>e.index).then(e=>({default:e.RenderFooter}))),A=n.lazy(()=>Promise.resolve().then(()=>require("./builder-components-DHTh1VoV.cjs")).then(e=>e.index).then(e=>({default:e.RenderHeader}))),he=e=>{const{blocks:o,settings:l,header:h,footer:m,announcement:x,routes:C=[],shopLogo:v,apiURLs:f,isAntistock:d=!1}=e,[j,R]=n.useState(null),{general:i,setIsAntistock:y}=a.useGeneralStore(),{setApiUrls:I}=a.useApiStore(),{setBlocks:u,setSourceBlocks:F,setHeader:O,setFooter:H,setAnnouncement:U,setSettings:W}=a.useBlocksStore(),{themeSettings:P}=a.useThemeSettingsStore(),{settings:E,setSettings:M}=a.useSettingsStore(),S=a.IS_LOCAL_HOST?localStorage.getItem("fakeDomain")||"":window.location.hostname,V=localStorage.getItem("shopPassword"),D=localStorage.getItem("shopId")||"";return n.useEffect(()=>{y(d)},[d,y]),n.useEffect(()=>{!D&&(i!=null&&i.info.id)&&localStorage.setItem("shopId",i==null?void 0:i.info.id)},[i]),n.useEffect(()=>{!S&&!d&&localStorage.setItem("fakeDomain","drafts-ca18cf24-6659-4015-b1ab-9ebe9fa64e74.bgng.io"),!S&&d&&localStorage.setItem("fakeDomain","eva8.astck.io")},[S]),n.useEffect(()=>{if(P&&E){const g=p.generateDynamicStyles(P,E);p.loadCustomFonts(),p.setupDynamicFonts(P),p.injectStylesToDOM(g)}},[P,JSON.stringify(E),window.location.hostname]),n.useEffect(()=>{const q=new l().blockSettings;M(q)},[]),n.useEffect(()=>{$()},[]),n.useLayoutEffect(()=>{const g={};Object.keys(o).map(b=>{g[b]=o[b]}),F(g),u(g),O(h),H(m),U(x),W(l),f&&I(f);const q=a.createBrowserRouter([{element:t.jsx(_,{shopDomain:S,shopId:D,shopPassword:V||void 0,shopLogo:v,children:t.jsx(L,{children:t.jsx(te,{children:t.jsx(a.Outlet,{})})})}),errorElement:t.jsx(s,{children:t.jsx(re,{})}),children:[{path:"/admin/builder/*",element:t.jsx(s,{children:t.jsx(Z,{children:t.jsx(K,{blocks:o,settings:l,header:h,footer:m,announcement:x})})}),errorElement:t.jsx(s,{children:t.jsx(Y,{})})},...C,{path:"/checkout",element:t.jsx(s,{children:t.jsx(ne,{})}),errorElement:t.jsx(s,{children:t.jsx(c,{})}),loader:()=>(document.title="Checkout",!0)},{path:"/top-up",element:t.jsx(s,{children:t.jsx(ae,{})}),errorElement:t.jsx(s,{children:t.jsx(c,{})}),loader:()=>(document.title="Top Up Balance",!0)},{path:"/charges/:id",element:t.jsx(s,{children:t.jsx(se,{})}),errorElement:t.jsx(s,{children:t.jsx(c,{})}),loader:()=>(document.title="Charges",!0)},{path:"/orders/:id/:accessToken?",element:t.jsx(s,{children:t.jsx(ce,{})}),errorElement:t.jsx(s,{children:t.jsx(c,{})}),loader:()=>(document.title="Orders",!0)},{path:"/subscriptions/:id/:accessToken?",element:t.jsx(s,{children:t.jsx(ie,{})}),errorElement:t.jsx(s,{children:t.jsx(c,{})}),loader:()=>(document.title="Subscriptions",!0)},{path:d?"/account":"/customer-dash",element:t.jsx(s,{children:t.jsxs("div",{className:T.wrapper,children:[t.jsx(ue,{}),t.jsx(A,{}),t.jsx("div",{style:{flex:"1 1 auto"},children:t.jsx(le,{})}),t.jsx(z,{})]})}),errorElement:t.jsx(s,{children:t.jsx(c,{})}),loader:()=>(document.title=d?"Account":"Customer Dashboard",!0)},{path:"/validation",element:t.jsx(s,{children:t.jsx(ee,{})}),errorElement:t.jsx(s,{children:t.jsx(c,{})}),loader:()=>(document.title="Validation",!0)},{path:"/ticket/:id/:accessToken",element:t.jsx(s,{children:t.jsxs("div",{className:T.wrapper,children:[t.jsx(A,{}),t.jsx("div",{style:{flex:1,width:"100%",height:"100%"},children:t.jsx(L,{children:t.jsx(oe,{})})}),t.jsx(z,{})]})}),errorElement:t.jsx(s,{children:t.jsx(c,{})}),loader:()=>(document.title="Ticket",!0)},{path:"*",element:t.jsx(p.DynamicRouteWrapper,{}),errorElement:t.jsx(s,{children:t.jsx(c,{})})}]}]);R(q)},[i]),t.jsx(n.Suspense,{fallback:null,children:j&&t.jsx(a.RouterProvider,{router:j})})};exports.App=he;exports.getRegisteredIcon=G;exports.getRegisteredIcons=Q;exports.isIconRegistered=N;exports.registerIcon=B;