@billgangcom/theme-lib 1.32.0 → 1.33.1

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.
@@ -10,6 +10,8 @@ export interface ButtonType {
10
10
  destination: Destination;
11
11
  link?: string;
12
12
  text: string;
13
+ page: string;
14
+ openInNewTab: boolean;
13
15
  }
14
16
  interface Props {
15
17
  isActiveButtons: boolean;
@@ -36,6 +36,7 @@ interface ListOption<T> {
36
36
  draggable?: boolean;
37
37
  deletable?: boolean;
38
38
  itemsOptions: T[];
39
+ addableOptions?: Record<string, any>;
39
40
  }
40
41
  interface SelectOption<T> {
41
42
  type: 'select';
package/dist/ui.cjs.js CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./index-8_Sn0J5j.cjs"),h=require("react");require("@phosphor-icons/react");const Rt="_wrapper_9rr5j_2",yt="_alignmentBlock_9rr5j_8",It="_title_9rr5j_15",kt="_subtitle_9rr5j_22",$t="_alignmentContent_9rr5j_29",wt="_alignments_9rr5j_37",Nt="_alignment_9rr5j_8",Ct="_circle_9rr5j_58",St="_paddings_9rr5j_65",Bt="_padding_9rr5j_65",Tt="_input_9rr5j_84",G={wrapper:Rt,alignmentBlock:yt,title:It,subtitle:kt,alignmentContent:$t,alignments:wt,alignment:Nt,circle:Ct,paddings:St,padding:Bt,input:Tt},Pt=["topLeft","top","topRight","left","center","right","bottomLeft","bottom","bottomRight"],At=["left","top","right","bottom"],Ot=x=>{const{alignment:i,padding:e,setPadding:n,setAlignment:o}=x;function r(){switch(i){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 c(s){switch(s){case"left":return"AlignLeft";case"right":return"AlignRight";case"top":return"AlignTop";case"bottom":return"AlignBottom"}}return t.jsxRuntimeExports.jsxs("div",{className:G.layout,children:[t.jsxRuntimeExports.jsx("h3",{className:G.title,children:"Layout"}),t.jsxRuntimeExports.jsxs("div",{className:G.alignmentBlock,children:[t.jsxRuntimeExports.jsx("h5",{className:G.subtitle,children:"Alignment"}),t.jsxRuntimeExports.jsxs("div",{className:G.alignmentContent,children:[t.jsxRuntimeExports.jsx("div",{className:G.alignments,children:Pt.map(s=>t.jsxRuntimeExports.jsxs("div",{onClick:()=>{o(s)},className:G.alignment,children:[s!==i&&t.jsxRuntimeExports.jsx("div",{className:G.circle}),s===i&&t.jsxRuntimeExports.jsx(t.Icon,{name:r(),fill:"#FF3F19",width:22,height:22})]},s))}),t.jsxRuntimeExports.jsx("div",{className:G.paddings,children:At.map(s=>t.jsxRuntimeExports.jsxs("label",{className:G.padding,children:[t.jsxRuntimeExports.jsx("div",{children:t.jsxRuntimeExports.jsx(t.Icon,{name:c(s),width:20,height:20})}),t.jsxRuntimeExports.jsx(t.Input,{type:"text",value:String(e[s]),onChange:a=>n({...e,[s]:Number(a)}),paddingless:!0,borderless:!0})]},s))})]})]})]})},qt="_title_18dz7_1",Dt="_subtitle_18dz7_5",Lt="_header_18dz7_12",Mt="_text_18dz7_13",Ht="_top_18dz7_21",Ft="_itemsBlock_18dz7_30",st={title:qt,subtitle:Dt,header:Lt,text:Mt,top:Ht,itemsBlock:Ft},Vt="_typeTexts_rcw8p_1",Ut="_block_rcw8p_8",zt="_active_rcw8p_21",ut={typeTexts:Vt,block:Ut,active:zt},Yt=["bold","italic","underline","strike-through","code"],dt=x=>{const{typesText:i,setTypesText:e}=x;function n(o){switch(o){case"bold":return"TextB";case"italic":return"TextItalic";case"code":return"CodeSimple";case"strike-through":return"TextStrikethrough";case"underline":return"TextUnderline"}}return t.jsxRuntimeExports.jsx("div",{className:ut.typeTexts,children:Yt.map(o=>t.jsxRuntimeExports.jsx("div",{className:t.clx(ut.block,{[ut.active]:i.includes(o)}),onClick:()=>{const r=[...i];if(r.includes(o)){const c=r.filter(s=>s!==o);e(c)}else r.push(o),e(r)},children:t.jsxRuntimeExports.jsx(t.Icon,{name:n(o),fill:i.includes(o)?"#252525":"#757575",width:20,height:20})},String(o)))})},pt=x=>{const{typesText:i,isActiveText:e,setIsActiveText:n,text:o,setText:r,setTypesText:c,title:s,subtitle:a="Items"}=x;return t.jsxRuntimeExports.jsxs("div",{className:st.text,children:[(s||e!==void 0)&&t.jsxRuntimeExports.jsxs("div",{className:st.top,children:[s&&t.jsxRuntimeExports.jsx("h3",{className:st.title,children:s}),e!==void 0&&n&&t.jsxRuntimeExports.jsx(t.Switch,{current:e,onChange:u=>n(u)})]}),t.jsxRuntimeExports.jsxs("div",{className:st.itemsBlock,children:[t.jsxRuntimeExports.jsx("h5",{className:st.subtitle,children:a}),t.jsxRuntimeExports.jsx(t.Textarea,{onChange:u=>r(u),value:o,maxLength:150}),t.jsxRuntimeExports.jsx(dt,{typesText:i,setTypesText:c})]})]})},Gt="_title_fyopx_1",Wt="_subtitle_fyopx_5",Xt="_header_fyopx_12",Jt="_text_fyopx_13",Qt="_productsBlock_fyopx_14",Kt="_top_fyopx_26",Zt="_itemsBlock_fyopx_35",te="_typeTexts_fyopx_41",ee="_block_fyopx_48",se="_active_fyopx_61",ne="_products_fyopx_14",oe="_product_fyopx_14",ie="_button_fyopx_80",re="_disabled_fyopx_91",ce="_image_fyopx_95",ae="_info_fyopx_102",le="_name_fyopx_114",ue="_buttons_fyopx_118",xe="_modal_fyopx_125",de="_link_fyopx_145",pe="_modalOptions_fyopx_151",H={title:Gt,subtitle:Wt,header:Xt,text:Jt,productsBlock:Qt,top:Kt,itemsBlock:Zt,typeTexts:te,block:ee,active:se,products:ne,product:oe,button:ie,disabled:re,image:ce,info:ae,name:le,buttons:ue,modal:xe,link:de,modalOptions:pe},me=h.forwardRef((x,i)=>{const{activeItem:e,setActiveItem:n,popupPosition:o,modalOptions:r,setIsOpenModal:c}=x;return t.jsxRuntimeExports.jsxs("div",{ref:i,className:H.modal,onClick:s=>{s.stopPropagation()},style:{top:`${o.top}px`,left:`${o.left}px`},children:[t.jsxRuntimeExports.jsxs("div",{className:H.top,children:[t.jsxRuntimeExports.jsx("h3",{className:H.title,children:e.name}),t.jsxRuntimeExports.jsx(t.Icon,{name:"X",height:20,width:20,hoverable:!0,onClick:()=>{n(null),c(!1)}})]}),t.jsxRuntimeExports.jsx("div",{className:H.modalOptions,children:r.map(s=>{if(s.type==="image")return t.jsxRuntimeExports.jsx(t.ChooseImage,{label:"Put up an attractive image",activeImage:e[s.field],onChange:a=>{const u={...e,[s.field]:a};n(u)}},String(s.field));if(s.type==="text")return t.jsxRuntimeExports.jsx(pt,{typesText:e[s.field.type],setTypesText:a=>{const u={...e,[s.field.type]:a};n(u)},text:e[s.field.text]||"",setText:a=>{const u={...e,[s.field.text]:a};n(u)},subtitle:s.label});if(s.type==="input")return t.jsxRuntimeExports.jsx(t.Input,{onChange:a=>{const u={...e,[s.field]:a};n(u)},value:e[s.field]||"",label:s.label,placeholder:s.placeholder});if(s.type==="inputSwitch")return t.jsxRuntimeExports.jsxs("div",{className:H.link,children:[t.jsxRuntimeExports.jsx(t.Input,{onChange:a=>{const u={...e,[s.field.text]:a};n(u)},value:e[s.field.text]||"",label:s.inputLabel,placeholder:s.placeholder}),t.jsxRuntimeExports.jsx(t.Switch,{current:!!e[s.field.switch]||!1,label:s.switchLabel,onChange:a=>{const u={...e,[s.field.switch]:a};n(u)}})]});if(s.type==="list")return t.jsxRuntimeExports.jsx(ht,{items:e[s.field]||[],setItems:a=>{const u={...e,[s.field]:a};n(u)},itemsType:"select",draggable:s.draggable||!1,itemsOptions:s.itemsOptions,deletable:s.deletable||!1,editable:!1,subtitle:s.label});if(s.type==="select")return t.jsxRuntimeExports.jsx(t.Select,{options:s.itemsOptions,onChange:a=>{const u={...e,[s.field]:a};n(u)},label:s.label,value:e[s.field]||"String",leftAddon:s.leftAddon&&s.leftAddon==="icon"&&t.jsxRuntimeExports.jsx(t.Icon,{name:e[s.field]})})})})]})}),he="_other_g74jx_1",_e="_subtitle_g74jx_7",je="_items_g74jx_14",xt={other:he,subtitle:_e,items:je},at=x=>{const{items:i,title:e="Other"}=x;return t.jsxRuntimeExports.jsxs("div",{className:xt.other,children:[t.jsxRuntimeExports.jsx("h5",{className:xt.subtitle,children:e}),t.jsxRuntimeExports.jsx("div",{className:xt.items,children:i.map((n,o)=>t.jsxRuntimeExports.jsx(t.Switch,{current:n.isItem,onChange:r=>n.setIsItem(r),label:n.label,hasBackground:!0,paddingless:!1},o))})]})},ge=x=>{const{index:i,moveProduct:e,children:n}=x,[,o]=t.useDrop({accept:"product",hover(s){s.index!==i&&(e(s.index,i),s.index=i)}}),[{isDragging:r},c]=t.useDrag({type:"product",item:{index:i},collect:s=>({isDragging:s.isDragging()})});return t.jsxRuntimeExports.jsx("div",{ref:s=>c(o(s)),className:`${H.product} ${r?H.dragging:""}`,children:n})},ht=x=>{const{isActiveItems:i,setIsActiveItems:e,items:n,setItems:o,other:r,title:c,subtitle:s,editable:a=!0,draggable:u=!1,withImage:E=!1,deletable:l=!0,addable:C=!0,itemsType:m,itemsPlaceholder:_="",itemsOptions:p,hasRangeSelector:T=!1,rangeSelectorOptions:D,modalOptions:S,addableOptions:P={},limit:$,autoScrollInterval:w}=x,[j,f]=h.useState(null),[L,v]=h.useState({top:0,left:0}),[b,I]=h.useState(null),A=h.useRef(null),[O,F]=h.useState(!1),J=(d,N)=>{const R=[...n],[Y]=R.splice(d,1);R.splice(N,0,Y),o(R)};h.useEffect(()=>{const d=()=>{f(null),F(!1)};return document.body.addEventListener("click",d),f(null),F(!1),()=>{f(null),F(!1),document.body.removeEventListener("click",d)}},[]),h.useEffect(()=>{if(j){const d=[...n].map(N=>N.id===j.id?j:N);o(d)}},[j]),h.useEffect(()=>{if(A.current&&b){const d=A.current.getBoundingClientRect().height,N=window.innerHeight;let R=b.top;R+d>N+window.scrollY&&(R=N+window.scrollY-d-200),R<0&&(R=10),v({top:R,left:b.left})}},[A.current,b]);const Z=(d,N)=>{d.stopPropagation();const R=d.target.getBoundingClientRect();I({top:R.top+window.scrollY,left:R.left-30}),f(N),F(!0)};function g(d){if(E)return d?t.jsxRuntimeExports.jsx("img",{src:`https://imagedelivery.net/${d[0]}/w=1000`,alt:"image",width:16,height:16}):t.jsxRuntimeExports.jsx(t.Icon,{name:"Image",width:16,height:16,fill:"#757575"})}const B=(d,N)=>{var Y;const R=t.jsxRuntimeExports.jsxs(t.jsxRuntimeExports.Fragment,{children:[u&&t.jsxRuntimeExports.jsx("div",{children:t.jsxRuntimeExports.jsx(t.Icon,{name:"DotsSixVertical",hoverable:!0,width:20,height:20})}),m==="select"&&t.jsxRuntimeExports.jsx(t.Select,{onChange:q=>{const et=[...n].map(Q=>Q.id===d.id?{...d,name:q}:Q);f({...d,name:q}),o([...et])},value:d.name,options:p.filter(q=>!n.find(U=>U.name===q.name)).map(q=>q.name),leftAddon:g(d.images)}),m==="input"&&t.jsxRuntimeExports.jsx(t.Input,{onChange:q=>{const et=[...n].map(Q=>Q.id===d.id?{...d,name:q}:Q);o([...et])},value:d.name,placeholder:_}),m==="image"&&t.jsxRuntimeExports.jsx(t.ChooseImage,{onChange:q=>{const et=[...n].map(Q=>Q.id===d.id?{...d,images:q}:Q);o([...et])},activeImage:(Y=n.find(q=>q.id===d.id))==null?void 0:Y.images[0]}),t.jsxRuntimeExports.jsxs("div",{className:H.buttons,children:[a&&t.jsxRuntimeExports.jsx(t.Icon,{name:"Sliders",hoverable:!0,width:20,height:20,onClick:q=>Z(q,d)}),l&&t.jsxRuntimeExports.jsx(t.Icon,{name:"Trash",hoverable:!0,width:20,height:20,fill:"#C12A2A",onClick:()=>o(n.filter(q=>q.id!==d.id))})]})]});return u?t.jsxRuntimeExports.jsx(ge,{product:d,index:N,moveProduct:J,children:R},d.id):t.jsxRuntimeExports.jsx("div",{className:H.product,children:R},d.id)};return t.jsxRuntimeExports.jsxs("div",{className:H.productsBlock,children:[(c||i!==void 0)&&t.jsxRuntimeExports.jsxs("div",{className:H.top,children:[c&&t.jsxRuntimeExports.jsx("h3",{className:H.title,children:c}),i!==void 0&&t.jsxRuntimeExports.jsx(t.Switch,{current:i,onChange:d=>e==null?void 0:e(d)})]}),j&&a&&S&&O&&t.jsxRuntimeExports.jsx(me,{ref:A,activeItem:j,setActiveItem:f,popupPosition:L,modalOptions:S,setIsOpenModal:F}),T&&D&&t.jsxRuntimeExports.jsx(lt,{...D}),t.jsxRuntimeExports.jsxs("div",{className:H.products,children:[s&&t.jsxRuntimeExports.jsx("h5",{className:H.subtitle,children:s}),u?t.jsxRuntimeExports.jsx(t.DndProvider,{backend:t.HTML5Backend,children:n.map((d,N)=>B(d,N))}):n.map((d,N)=>B(d,N)),C&&t.jsxRuntimeExports.jsxs(t.Button,{withoutHover:!0,className:t.clx(H.button,{[H.disabled]:!!($&&$<=n.length||n.length===(p==null?void 0:p.length))}),size:"s",disabled:!!($&&$<=n.length||n.length===(p==null?void 0:p.length)),onClick:()=>{const d=[...n];let N=null;if(p){for(let R=0;R<p.length;R++)if(!n.find(Y=>Y.id===p[R].id)){N=p[R];break}}m==="select"?d.push({name:N?N.name:p[0].name,id:(N==null?void 0:N.id)||p[0].id,...P}):m==="input"?d.push({name:"",id:t.v4(),...P}):d.push({name:`Image ${n.length+1}`,id:t.v4(),...P}),o(d)},children:[t.jsxRuntimeExports.jsx("span",{children:"Add Option"}),t.jsxRuntimeExports.jsx(t.Icon,{name:"Plus",width:16,height:16})]})]}),r!==void 0&&t.jsxRuntimeExports.jsx(at,{items:r}),w!==void 0&&t.jsxRuntimeExports.jsx(t.Input,{label:"Auto scroll interval",type:"number",value:String(w.scrollInterval),onChange:d=>w.setScrollInterval(Number(d)),min:.1,max:100,style:{width:"100%"},postfix:"sec."})]})},fe="_title_fyopx_1",be="_subtitle_fyopx_5",ve="_header_fyopx_12",Ee="_text_fyopx_13",Re="_productsBlock_fyopx_14",ye="_top_fyopx_26",Ie="_itemsBlock_fyopx_35",ke="_typeTexts_fyopx_41",$e="_block_fyopx_48",we="_active_fyopx_61",Ne="_products_fyopx_14",Ce="_product_fyopx_14",Se="_button_fyopx_80",Be="_disabled_fyopx_91",Te="_image_fyopx_95",Pe="_info_fyopx_102",Ae="_name_fyopx_114",Oe="_buttons_fyopx_118",qe="_modal_fyopx_125",De="_link_fyopx_145",Le="_modalOptions_fyopx_151",X={title:fe,subtitle:be,header:ve,text:Ee,productsBlock:Re,top:ye,itemsBlock:Ie,typeTexts:ke,block:$e,active:we,products:Ne,product:Ce,button:Se,disabled:Be,image:Te,info:Pe,name:Ae,buttons:Oe,modal:qe,link:De,modalOptions:Le},Me=x=>{const{isActiveItems:i,setIsActiveItems:e,items:n,setItems:o,other:r,title:c,subtitle:s,draggable:a=!1,withImage:u=!1,addable:E=!0,itemsOptions:l,hasRangeSelector:C=!1,rangeSelectorOptions:m,limit:_,autoScrollInterval:p}=x;function T(S){if(u)return S?t.jsxRuntimeExports.jsx("img",{src:`https://imagedelivery.net/${S[0]}/w=1000`,alt:"image",width:16,height:16}):t.jsxRuntimeExports.jsx(t.Icon,{name:"Image",width:16,height:16,fill:"#757575"})}const D=S=>{const P=l.find(w=>w.id===S);if(!P)return;const $=t.jsxRuntimeExports.jsxs(t.jsxRuntimeExports.Fragment,{children:[a&&t.jsxRuntimeExports.jsx("div",{children:t.jsxRuntimeExports.jsx(t.Icon,{name:"DotsSixVertical",hoverable:!0,width:20,height:20})}),t.jsxRuntimeExports.jsx(t.Select,{onChange:w=>{const j=[...n],f=l.find(b=>b.name===w);if(!f)return;const L=f.id,v=j.map(b=>b===S?L:b);o([...v])},value:P.name,options:l.filter(w=>!n.find(j=>j===w.id)).map(w=>w.name),leftAddon:T(P.images)}),t.jsxRuntimeExports.jsx("div",{className:X.buttons,children:t.jsxRuntimeExports.jsx(t.Icon,{name:"Trash",hoverable:!0,width:20,height:20,fill:"#C12A2A",onClick:()=>o(n.filter(w=>w!==S))})})]});return t.jsxRuntimeExports.jsx("div",{className:X.product,children:$},S)};return t.jsxRuntimeExports.jsxs("div",{className:X.productsBlock,children:[(c||i!==void 0)&&t.jsxRuntimeExports.jsxs("div",{className:X.top,children:[c&&t.jsxRuntimeExports.jsx("h3",{className:X.title,children:c}),i!==void 0&&t.jsxRuntimeExports.jsx(t.Switch,{current:i,onChange:S=>e==null?void 0:e(S)})]}),C&&m&&t.jsxRuntimeExports.jsx(lt,{...m}),t.jsxRuntimeExports.jsxs("div",{className:X.products,children:[s&&t.jsxRuntimeExports.jsx("h5",{className:X.subtitle,children:s}),n.map(S=>D(S)),E&&t.jsxRuntimeExports.jsxs(t.Button,{withoutHover:!0,className:t.clx(X.button,{[X.disabled]:!!(_&&_<=n.length||n.length===l.length)}),size:"s",disabled:!!(_&&_<=n.length||n.length===l.length),onClick:()=>{const S=[...n];let P=null;if(l){for(let $=0;$<l.length;$++)if(!n.find(w=>w===l[$].id)){P=l[$];break}}S.push((P==null?void 0:P.id)||l[0].id),o(S)},children:[t.jsxRuntimeExports.jsx("span",{children:"Add Option"}),t.jsxRuntimeExports.jsx(t.Icon,{name:"Plus",width:16,height:16})]})]}),r!==void 0&&t.jsxRuntimeExports.jsx(at,{items:r}),p!==void 0&&t.jsxRuntimeExports.jsx(t.Input,{label:"Auto scroll interval",type:"number",value:String(p.scrollInterval),onChange:S=>p.setScrollInterval(Number(S)),min:.1,max:100,style:{width:"100%"},postfix:"sec."})]})},He="_title_fyopx_1",Fe="_subtitle_fyopx_5",Ve="_header_fyopx_12",Ue="_text_fyopx_13",ze="_productsBlock_fyopx_14",Ye="_top_fyopx_26",Ge="_itemsBlock_fyopx_35",We="_typeTexts_fyopx_41",Xe="_block_fyopx_48",Je="_active_fyopx_61",Qe="_products_fyopx_14",Ke="_product_fyopx_14",Ze="_button_fyopx_80",ts="_disabled_fyopx_91",es="_image_fyopx_95",ss="_info_fyopx_102",ns="_name_fyopx_114",os="_buttons_fyopx_118",is="_modal_fyopx_125",rs="_link_fyopx_145",cs="_modalOptions_fyopx_151",V={title:He,subtitle:Fe,header:Ve,text:Ue,productsBlock:ze,top:Ye,itemsBlock:Ge,typeTexts:We,block:Xe,active:Je,products:Qe,product:Ke,button:Ze,disabled:ts,image:es,info:ss,name:ns,buttons:os,modal:is,link:rs,modalOptions:cs},as=h.forwardRef((x,i)=>{const{activeItem:e,setActiveItem:n,popupPosition:o,modalOptions:r,setIsOpenModal:c}=x;return t.jsxRuntimeExports.jsxs("div",{ref:i,className:V.modal,onClick:s=>{s.stopPropagation()},style:{top:`${o.top}px`,left:`${o.left}px`},children:[t.jsxRuntimeExports.jsxs("div",{className:V.top,children:[t.jsxRuntimeExports.jsx("h3",{className:V.title,children:e.name}),t.jsxRuntimeExports.jsx(t.Icon,{name:"X",height:20,width:20,hoverable:!0,onClick:()=>{n(null),c(!1)}})]}),t.jsxRuntimeExports.jsx("div",{className:V.modalOptions,children:r.map(s=>{if(s.type==="image")return t.jsxRuntimeExports.jsx(t.ChooseImage,{label:"Put up an attractive image",activeImage:e[s.field],onChange:a=>{const u={...e,[s.field]:a};n(u)}},String(s.field));if(s.type==="text")return t.jsxRuntimeExports.jsx(pt,{typesText:e[s.field.type],setTypesText:a=>{const u={...e,[s.field.type]:a};n(u)},text:e[s.field.text]||"",setText:a=>{const u={...e,[s.field.text]:a};n(u)},subtitle:s.label});if(s.type==="input")return t.jsxRuntimeExports.jsx(t.Input,{onChange:a=>{const u={...e,[s.field]:a};n(u)},value:e[s.field]||"",label:s.label,placeholder:s.placeholder});if(s.type==="inputSwitch")return t.jsxRuntimeExports.jsxs("div",{className:V.link,children:[t.jsxRuntimeExports.jsx(t.Input,{onChange:a=>{const u={...e,[s.field.text]:a};n(u)},value:e[s.field.text]||"",label:s.inputLabel,placeholder:s.placeholder}),t.jsxRuntimeExports.jsx(t.Switch,{current:!!e[s.field.switch]||!1,label:s.switchLabel,onChange:a=>{const u={...e,[s.field.switch]:a};n(u)}})]});if(s.type==="select")return t.jsxRuntimeExports.jsx(t.Select,{options:s.itemsOptions,onChange:a=>{const u={...e,[s.field]:a};n(u)},label:s.label,value:e[s.field]||"String",leftAddon:s.leftAddon&&s.leftAddon==="icon"&&t.jsxRuntimeExports.jsx(t.Icon,{name:e[s.field]})})})})]})}),ls=x=>{const{index:i,moveProduct:e,children:n}=x,[,o]=t.useDrop({accept:"product",hover(s){s.index!==i&&(e(s.index,i),s.index=i)}}),[{isDragging:r},c]=t.useDrag({type:"product",item:{index:i},collect:s=>({isDragging:s.isDragging()})});return t.jsxRuntimeExports.jsx("div",{ref:s=>c(o(s)),className:`${V.product} ${r?V.dragging:""}`,children:n})},us=x=>{const{isActiveItems:i,setIsActiveItems:e,items:n,setItems:o,other:r,title:c,subtitle:s,editable:a=!0,draggable:u=!1,withImage:E=!1,deletable:l=!0,addable:C=!0,itemsType:m,itemsPlaceholder:_="",itemsOptions:p,hasRangeSelector:T=!1,rangeSelectorOptions:D,modalOptions:S,addableOptions:P={}}=x,[$,w]=h.useState(null),[j,f]=h.useState({top:0,left:0}),[L,v]=h.useState(null),b=h.useRef(null),[I,A]=h.useState(!1),O=(g,B)=>{const d=[...n],[N]=d.splice(g,1);d.splice(B,0,N),o(d)};h.useEffect(()=>{const g=()=>{w(null),A(!1)};return document.body.addEventListener("click",g),w(null),A(!1),()=>{w(null),A(!1),document.body.removeEventListener("click",g)}},[]),h.useEffect(()=>{if($){const g=[...n].map(B=>B.id===$.id?$:B);o(g)}},[$]),h.useEffect(()=>{if(b.current&&L){const g=b.current.getBoundingClientRect().height,B=window.innerHeight;let d=L.top;d+g>B+window.scrollY&&(d=B+window.scrollY-g-200),d<0&&(d=10),f({top:d,left:L.left})}},[b.current,L]);const F=(g,B)=>{g.stopPropagation();const d=g.target.getBoundingClientRect();v({top:d.top+window.scrollY,left:d.left-30}),w(B),A(!0)};function J(g){if(E)return g?t.jsxRuntimeExports.jsx("img",{src:`https://imagedelivery.net/${g[0]}/w=1000`,alt:"image",width:16,height:16}):t.jsxRuntimeExports.jsx(t.Icon,{name:"Image",width:16,height:16,fill:"#757575"})}const Z=(g,B)=>{var N;const d=t.jsxRuntimeExports.jsxs(t.jsxRuntimeExports.Fragment,{children:[u&&t.jsxRuntimeExports.jsx("div",{children:t.jsxRuntimeExports.jsx(t.Icon,{name:"DotsSixVertical",hoverable:!0,width:20,height:20})}),m==="select"&&t.jsxRuntimeExports.jsx(t.Select,{onChange:R=>{const q=[...n].map(U=>U.id===g.id?{...g,name:R}:U);w({...g,name:R}),o([...q])},value:g.name,options:p.filter(R=>!n.find(Y=>Y.name===R)),leftAddon:J(g.images)}),m==="input"&&t.jsxRuntimeExports.jsx(t.Input,{onChange:R=>{const q=[...n].map(U=>U.id===g.id?{...g,name:R}:U);o([...q])},value:g.name,placeholder:_}),m==="image"&&t.jsxRuntimeExports.jsx(t.ChooseImage,{onChange:R=>{const q=[...n].map(U=>U.id===g.id?{...g,images:R}:U);o([...q])},activeImage:(N=n.find(R=>R.id===g.id))==null?void 0:N.images[0]}),t.jsxRuntimeExports.jsxs("div",{className:V.buttons,children:[a&&t.jsxRuntimeExports.jsx(t.Icon,{name:"Sliders",hoverable:!0,width:20,height:20,onClick:R=>F(R,g)}),l&&t.jsxRuntimeExports.jsx(t.Icon,{name:"Trash",hoverable:!0,width:20,height:20,fill:"#C12A2A",onClick:()=>o(n.filter(R=>R.id!==g.id))})]})]});return u?t.jsxRuntimeExports.jsx(ls,{product:g,index:B,moveProduct:O,children:d},g.id):t.jsxRuntimeExports.jsx("div",{className:V.product,children:d},g.id)};return t.jsxRuntimeExports.jsxs("div",{className:V.productsBlock,children:[(c||i!==void 0)&&t.jsxRuntimeExports.jsxs("div",{className:V.top,children:[c&&t.jsxRuntimeExports.jsx("h3",{className:V.title,children:c}),i!==void 0&&t.jsxRuntimeExports.jsx(t.Switch,{current:i,onChange:g=>e==null?void 0:e(g)})]}),$&&a&&S&&I&&t.jsxRuntimeExports.jsx(as,{ref:b,activeItem:$,setActiveItem:w,popupPosition:j,modalOptions:S,setIsOpenModal:A}),T&&D&&t.jsxRuntimeExports.jsx(lt,{...D}),t.jsxRuntimeExports.jsxs("div",{className:V.products,children:[s&&t.jsxRuntimeExports.jsx("h5",{className:V.subtitle,children:s}),u?t.jsxRuntimeExports.jsx(t.DndProvider,{backend:t.HTML5Backend,children:n.map((g,B)=>Z(g,B))}):n.map((g,B)=>Z(g,B)),C&&t.jsxRuntimeExports.jsxs(t.Button,{withoutHover:!0,className:V.button,size:"s",onClick:()=>{const g=[...n];let B=null;if(p){for(let d=0;d<p.length;d++)if(!n.find(N=>N.name===p[d])){B=p[d];break}}m==="select"?g.push({name:B||p[0],id:t.v4(),...P}):m==="input"?g.push({name:"",id:t.v4(),...P}):g.push({name:`Image ${n.length+1}`,id:t.v4(),...P}),o(g)},children:[t.jsxRuntimeExports.jsx("span",{children:"Add Option"}),t.jsxRuntimeExports.jsx(t.Icon,{name:"Plus",width:16,height:16})]})]}),r!==void 0&&t.jsxRuntimeExports.jsx(at,{items:r})]})},xs="_title_dkxs6_1",ds="_subtitle_dkxs6_5",ps="_header_dkxs6_12",ms="_text_dkxs6_13",hs="_productsBlock_dkxs6_14",_s="_buttonsBlock_dkxs6_15",js="_top_dkxs6_26",gs="_itemsBlock_dkxs6_35",fs="_typeTexts_dkxs6_41",bs="_block_dkxs6_48",vs="_active_dkxs6_60",Es="_products_dkxs6_14",Rs="_product_dkxs6_14",ys="_button_dkxs6_15",Is="_image_dkxs6_90",ks="_info_dkxs6_97",$s="_name_dkxs6_109",ws="_buttons_dkxs6_15",Ns="_modal_dkxs6_120",Cs="_other_dkxs6_140",Ss="_options_dkxs6_146",tt={title:xs,subtitle:ds,header:ps,text:ms,productsBlock:hs,buttonsBlock:_s,top:js,itemsBlock:gs,typeTexts:fs,block:bs,active:vs,products:Es,product:Rs,button:ys,image:Is,info:ks,name:$s,buttons:ws,modal:Ns,other:Cs,options:Ss},Bs=h.forwardRef((x,i)=>{const{activeButton:e,setActiveButton:n,popupPosition:o}=x,[r,c]=h.useState(e.typesText),[s,a]=h.useState(e.destination),[u,E]=h.useState(e.link||""),[l,C]=h.useState(e.text||"");return h.useEffect(()=>{n({...e,...{text:l,link:u,destination:s,typesText:r}})},[r,s,u,l]),t.jsxRuntimeExports.jsxs("div",{className:tt.modal,onClick:m=>{m.stopPropagation()},style:{top:`${o.top}px`,left:`${o.left}px`},ref:i,children:[t.jsxRuntimeExports.jsxs("div",{className:tt.top,children:[t.jsxRuntimeExports.jsx("h3",{className:tt.title,children:e.type}),t.jsxRuntimeExports.jsx(t.Icon,{name:"X",height:20,width:20,hoverable:!0,onClick:()=>n(null)})]}),t.jsxRuntimeExports.jsxs("div",{className:tt.options,children:[t.jsxRuntimeExports.jsx(t.Select,{label:"Destination",onChange:m=>a(m),options:["Go to Page","Open Link"],value:s}),s==="Go to Page"?t.jsxRuntimeExports.jsx(t.Select,{label:"Go to",onChange:()=>{},options:[],value:"Homepage"}):t.jsxRuntimeExports.jsx(t.Input,{onChange:m=>E(m),value:u,placeholder:"https://",label:"Link"}),t.jsxRuntimeExports.jsx(t.Switch,{current:!1,label:"Open in new tab"}),t.jsxRuntimeExports.jsx(t.Textarea,{onChange:m=>C(m),value:l,label:"Text",maxLength:150}),t.jsxRuntimeExports.jsx(dt,{typesText:r,setTypesText:c})]})]})}),Ts="_subtitle_m8qel_1",Ps="_header_m8qel_8",As="_text_m8qel_9",Os="_productsBlock_m8qel_10",qs="_buttonsBlock_m8qel_11",Ds="_top_m8qel_23",Ls="_itemsBlock_m8qel_32",Ms="_typeTexts_m8qel_38",Hs="_block_m8qel_45",Fs="_active_m8qel_58",Vs="_products_m8qel_10",Us="_product_m8qel_10",zs="_button_m8qel_11",Ys="_image_m8qel_88",Gs="_info_m8qel_95",Ws="_name_m8qel_107",Xs="_buttons_m8qel_11",Js="_modal_m8qel_118",Qs="_other_m8qel_137",Ks="_options_m8qel_143",nt={subtitle:Ts,header:Ps,text:As,productsBlock:Os,buttonsBlock:qs,top:Ds,itemsBlock:Ls,typeTexts:Ms,block:Hs,active:Fs,products:Vs,product:Us,button:zs,image:Ys,info:Gs,name:Ws,buttons:Xs,modal:Js,other:Qs,options:Ks},_t=x=>{const{buttons:i,setButtons:e,deletable:n=!0,addable:o=!0}=x,[r,c]=h.useState(null),[s,a]=h.useState({top:0,left:0}),[u,E]=h.useState(null),l=h.useRef(null);h.useEffect(()=>{const m=()=>{c(null)};return document.body.addEventListener("click",m),c(null),()=>{c(null),document.body.removeEventListener("click",m)}},[]),h.useEffect(()=>{if(r){const m=[...i].map(_=>_.id===r.id?r:_);e(m)}},[r]),h.useEffect(()=>{if(l.current&&u){const m=l.current.getBoundingClientRect().height,_=window.innerHeight;let p=u.top;p+m>_+window.scrollY&&(p=_+window.scrollY-m-200),p<0&&(p=10),a({top:p,left:u.left})}},[l.current,u]);const C=(m,_)=>{m.stopPropagation();const p=m.target.getBoundingClientRect();E({top:p.top+window.scrollY,left:p.left-30}),c(_)};return t.jsxRuntimeExports.jsxs("div",{className:nt.products,children:[t.jsxRuntimeExports.jsx("h5",{className:nt.subtitle,children:"Button Type"}),i.map(m=>t.jsxRuntimeExports.jsxs("div",{className:nt.product,children:[t.jsxRuntimeExports.jsx(t.Select,{onChange:_=>{const T=[...i].map(D=>D.id===m.id?{...m,type:_}:D);e(T)},value:m.type,options:["Primary","Secondary","Tertiary"]}),t.jsxRuntimeExports.jsxs("div",{className:nt.buttons,children:[t.jsxRuntimeExports.jsx(t.Icon,{name:"Sliders",hoverable:!0,width:20,height:20,onClick:_=>{C(_,m)}}),n&&t.jsxRuntimeExports.jsx(t.Icon,{name:"Trash",hoverable:!0,onClick:()=>{const _=i.filter(p=>p.id!==m.id);e(_)},width:20,height:20,fill:"#C12A2A"})]})]},m.id)),r&&t.jsxRuntimeExports.jsx(Bs,{ref:l,activeButton:r,setActiveButton:c,popupPosition:s}),o&&t.jsxRuntimeExports.jsxs(t.Button,{withoutHover:!0,className:nt.button,size:"s",onClick:()=>{const m=[...i];m.push({type:"Primary",id:t.v4(),typesText:[],destination:"Go to Page",text:"Button Name"}),e(m)},children:[t.jsxRuntimeExports.jsx("span",{children:"Add Option"}),t.jsxRuntimeExports.jsx(t.Icon,{name:"Plus",width:16,height:16})]})]})},Zs=x=>{const{isActiveButtons:i,setIsActiveButtons:e,buttons:n,setButtons:o}=x;return t.jsxRuntimeExports.jsx(t.jsxRuntimeExports.Fragment,{children:t.jsxRuntimeExports.jsxs("div",{className:tt.buttonsBlock,children:[t.jsxRuntimeExports.jsxs("div",{className:tt.top,children:[t.jsxRuntimeExports.jsx("h3",{className:tt.title,children:"Buttons"}),t.jsxRuntimeExports.jsx(t.Switch,{current:i,onChange:r=>e(r)})]}),t.jsxRuntimeExports.jsx(_t,{buttons:n,setButtons:o})]})})},tn="_wrapper_m18qi_1",en="_subtitle_m18qi_7",sn="_content_m18qi_14",nn="_range_m18qi_22",on="_track_m18qi_27",rn="_progress_m18qi_36",cn="_dots_m18qi_46",an="_dot_m18qi_46",ln="_active_m18qi_65",un="_input_m18qi_77",xn="_countBlock_m18qi_91",dn="_count_m18qi_91",pn="_controls_m18qi_107",mn="_button_m18qi_113",M={wrapper:tn,subtitle:en,content:sn,range:nn,track:on,progress:rn,dots:cn,dot:an,active:ln,input:un,countBlock:xn,count:dn,controls:pn,button:mn},lt=x=>{const{label:i,min:e=1,max:n=4,step:o=1,count:r,setCount:c}=x,[s,a]=h.useState(!1),u=Array.from({length:(n-e)/o+1}),E=(r-e)/(n-e)*100,l=()=>{r<n&&c(r+o)},C=()=>{r>e&&c(r-o)},m=_=>{const p=e+_*o;c(p)};return t.jsxRuntimeExports.jsxs("div",{className:M.wrapper,children:[i&&t.jsxRuntimeExports.jsx("h5",{className:M.subtitle,children:i}),t.jsxRuntimeExports.jsxs("div",{className:M.content,children:[t.jsxRuntimeExports.jsxs("div",{className:M.range,children:[t.jsxRuntimeExports.jsx("div",{className:M.track}),t.jsxRuntimeExports.jsx("div",{className:M.progress,style:{width:`${E}%`}}),t.jsxRuntimeExports.jsx("div",{className:M.dots,children:u.map((_,p)=>{const T=p<=(r-e)/o;return t.jsxRuntimeExports.jsx("button",{onClick:()=>m(p),className:t.clx(M.dot,{[M.active]:T,[M.inactive]:!T,[M.dragging]:s}),"aria-label":`Set value to ${e+p*o}`},p)})}),t.jsxRuntimeExports.jsx("input",{type:"range",min:e,max:n,step:o,value:r,onChange:_=>c(Number(_.target.value)),onMouseDown:()=>a(!0),onMouseUp:()=>a(!1),onTouchStart:()=>a(!0),onTouchEnd:()=>a(!1),className:M.input})]}),t.jsxRuntimeExports.jsxs("div",{className:M.countBlock,children:[t.jsxRuntimeExports.jsx(t.Input,{type:"number",min:e,max:n,paddingless:!0,onChange:_=>{const p=Number(_);p>n?c(n):p<e?c(e):c(p)},value:String(r)}),t.jsxRuntimeExports.jsxs("div",{className:M.controls,children:[t.jsxRuntimeExports.jsx("button",{onClick:l,disabled:r>=n,className:M.button,"aria-label":"Increment count",children:t.jsxRuntimeExports.jsx(t.Icon,{name:"CaretUp",width:15,height:15})}),t.jsxRuntimeExports.jsx("button",{onClick:C,disabled:r<=e,className:M.button,"aria-label":"Decrement count",children:t.jsxRuntimeExports.jsx(t.Icon,{name:"CaretDown",width:15,height:15})})]})]})]})]})},hn="_title_1hw31_1",_n="_subtitle_1hw31_5",jn="_header_1hw31_12",gn="_text_1hw31_13",fn="_productsBlock_1hw31_14",bn="_top_1hw31_26",vn="_itemsBlock_1hw31_35",En="_typeTexts_1hw31_41",Rn="_block_1hw31_48",yn="_active_1hw31_61",In="_products_1hw31_14",kn="_product_1hw31_14",$n="_button_1hw31_80",wn="_image_1hw31_91",Nn="_info_1hw31_98",Cn="_name_1hw31_110",Sn="_buttons_1hw31_114",Bn="_modal_1hw31_121",Tn="_link_1hw31_141",Pn="_modalOptions_1hw31_147",z={title:hn,subtitle:_n,header:jn,text:gn,productsBlock:fn,top:bn,itemsBlock:vn,typeTexts:En,block:Rn,active:yn,products:In,product:kn,button:$n,image:wn,info:Nn,name:Cn,buttons:Sn,modal:Bn,link:Tn,modalOptions:Pn},An=x=>{const{activeItem:i,setActiveItem:e,popupPosition:n,setIsOpenModal:o,itemsOptions:r}=x,c=r.find(a=>a.id===i.listingId);if(!c)return null;function s(a,u){return a.length>u?`${a.slice(0,u)}...`:a}return t.jsxRuntimeExports.jsxs("div",{className:z.modal,onClick:a=>{a.stopPropagation()},style:{top:`${n.top}px`,left:`${n.left}px`},children:[t.jsxRuntimeExports.jsxs("div",{className:z.top,children:[t.jsxRuntimeExports.jsx("h3",{children:s(c.productData.name,20)}),t.jsxRuntimeExports.jsx(t.Icon,{name:"X",height:20,width:20,hoverable:!0,onClick:()=>{o(!1),e(null)}})]}),t.jsxRuntimeExports.jsx("div",{className:z.modalOptions,children:t.jsxRuntimeExports.jsx(t.ChooseImage,{label:"Put up an attractive image",activeImage:c.productData.images.length>0?c.productData.images[0].cfId:void 0,onChange:a=>{const u={...i,image:a[0]};e(u)}})})]})},On=x=>{const{index:i,moveProduct:e,children:n}=x,[,o]=t.useDrop({accept:"product",hover(s){s.index!==i&&(e(s.index,i),s.index=i)}}),[{isDragging:r},c]=t.useDrag({type:"product",item:{index:i},collect:s=>({isDragging:s.isDragging()})});return t.jsxRuntimeExports.jsx("div",{ref:s=>c(o(s)),className:`${z.product} ${r?z.dragging:""}`,children:n})},qn=x=>{const{isActiveItems:i,setIsActiveItems:e,items:n,setItems:o,other:r,title:c,subtitle:s,editable:a=!0,draggable:u=!1,withImage:E=!1,deletable:l=!0,addable:C=!0,itemsType:m,itemsOptions:_}=x,[p,T]=h.useState(null),[D,S]=h.useState({top:0,left:0}),[P,$]=h.useState(!1),w=(v,b)=>{const I=[...n],[A]=I.splice(v,1);I.splice(b,0,A),o(I)};h.useEffect(()=>{const v=()=>{T(null),$(!1)};return document.body.addEventListener("click",v),T(null),$(!1),()=>{T(null),$(!1),document.body.removeEventListener("click",v)}},[]),h.useEffect(()=>{if(p){const v=[...n].map(b=>b.listingId===p.listingId?p:b);o(v)}},[p]);const j=(v,b)=>{v.stopPropagation();const I=v.target.getBoundingClientRect(),A=100,O=window.innerHeight;let F=I.top+window.scrollY;F+A>O&&(F=O-A-20),$(!0),S({top:F-80,left:I.left-30}),T(b)};function f(v){if(E)return v?t.jsxRuntimeExports.jsx("img",{src:`https://imagedelivery.net/${v}/w=1000`,alt:"image",width:16,height:16}):t.jsxRuntimeExports.jsx(t.Icon,{name:"Image",width:16,height:16,fill:"#757575"})}const L=(v,b)=>{const I=_.find(O=>v.listingId===O.id);if(!I)return null;const A=t.jsxRuntimeExports.jsxs(t.jsxRuntimeExports.Fragment,{children:[u&&t.jsxRuntimeExports.jsx("div",{children:t.jsxRuntimeExports.jsx(t.Icon,{name:"DotsSixVertical",hoverable:!0,width:20,height:20})},b),m==="select"&&t.jsxRuntimeExports.jsx(t.Select,{onChange:O=>{const F=[...n],J=_.find(B=>B.productData.name===O);if(!J)return;const Z={listingId:J.id,image:J.productData.images.length>0?J.productData.images[0].cfId:""},g=F.map(B=>B.listingId===v.listingId?Z:B);T(Z),o([...g])},value:I.productData.name,options:[..._.filter(O=>!n.find(F=>F.listingId===O.id)).map(O=>O.productData.name)],leftAddon:f(v.image||I.productData.images.length>0&&I.productData.images[0].cfId||"")},b),t.jsxRuntimeExports.jsxs("div",{className:z.buttons,children:[a&&t.jsxRuntimeExports.jsx(t.Icon,{name:"Sliders",hoverable:!0,width:20,height:20,onClick:O=>j(O,v)}),l&&t.jsxRuntimeExports.jsx(t.Icon,{name:"Trash",hoverable:!0,width:20,height:20,fill:"#C12A2A",onClick:()=>o(n.filter(O=>O!==v))})]})]});return u?t.jsxRuntimeExports.jsx(On,{product:v,index:b,moveProduct:w,children:A},v.listingId):t.jsxRuntimeExports.jsx("div",{className:z.product,children:A},v.listingId)};return t.jsxRuntimeExports.jsxs("div",{className:z.productsBlock,children:[(c||i!==void 0)&&t.jsxRuntimeExports.jsxs("div",{className:z.top,children:[c&&t.jsxRuntimeExports.jsx("h3",{className:z.title,children:c}),i!==void 0&&t.jsxRuntimeExports.jsx(t.Switch,{current:i,onChange:v=>e==null?void 0:e(v)})]}),P&&p&&t.jsxRuntimeExports.jsx(An,{activeItem:p,setActiveItem:T,setIsOpenModal:$,popupPosition:D,itemsOptions:_}),t.jsxRuntimeExports.jsxs("div",{className:z.products,children:[s&&t.jsxRuntimeExports.jsx("h5",{className:z.subtitle,children:s}),u?t.jsxRuntimeExports.jsx(t.DndProvider,{backend:t.HTML5Backend,children:n.map((v,b)=>L(v,b))}):n.map((v,b)=>L(v,b)),C&&t.jsxRuntimeExports.jsxs(t.Button,{withoutHover:!0,className:z.button,size:"s",onClick:()=>{const v=[...n];for(let b=0;b<_.length;b++)if(!n.find(I=>I.listingId===_[b].id)){v.push({listingId:_[b].id,image:_[b].productData.images.length>0?_[b].productData.images[0].cfId:""});break}o(v)},disabled:n.length===_.length,children:[t.jsxRuntimeExports.jsx("span",{children:"Add Option"}),t.jsxRuntimeExports.jsx(t.Icon,{name:"Plus",width:16,height:16})]})]}),r!==void 0&&t.jsxRuntimeExports.jsx(at,{items:r})]})},Dn="_options_1w11v_1",Ln="_price_1w11v_12",Mn="_oldPrice_1w11v_19",Hn="_newPrice_1w11v_27",Fn="_animate_1w11v_34",Vn="_appearAndBounce_1w11v_1",Un="_meta_1w11v_52",zn="_info_1w11v_58",Yn="_infoRight_1w11v_66",Gn="_buttons_1w11v_73",Wn="_variants_1w11v_80",Xn="_variant_1w11v_80",Jn="_stock_1w11v_97",Qn="_variantInfo_1w11v_104",Kn="_quantity_1w11v_110",Zn="_count_1w11v_117",to="_focused_1w11v_134",eo="_button_1w11v_73",so="_activeVariant_1w11v_160",no="_chargeTypes_1w11v_164",oo="_charge_1w11v_164",io="_chargeActive_1w11v_185",ro="_title_1w11v_190",k={options:Dn,price:Ln,oldPrice:Mn,newPrice:Hn,animate:Fn,appearAndBounce:Vn,meta:Un,info:zn,infoRight:Yn,buttons:Gn,variants:Wn,variant:Xn,stock:Jn,variantInfo:Qn,quantity:Kn,count:Zn,focused:to,button:eo,activeVariant:so,chargeTypes:no,charge:oo,chargeActive:io,title:ro};var jt=(x=>(x.ONE_TIME="One-Time",x.RECURRING="Subscribe & Save",x))(jt||{});const co=x=>{var $,w;const{variants:i}=x,[e,n]=h.useState(i[0]),[o,r]=h.useState(e.chargeTypes[0]),c=t.useNavigate(),[s,a]=h.useState(1),[u,E]=h.useState(!1),{reset:l,addProductToCart:C,getProducts:m}=t.useCart(),[_,p]=h.useState(!1);h.useEffect(()=>{p(!0);const j=setTimeout(()=>p(!1),600);return()=>clearTimeout(j)},[s]);async function T(){await m(),await C({productId:x.id,productVariantId:e.id,quantity:s})}function D(){l(),T(),c("/checkout")}function S(j){if(j>=864e5){const I=Math.floor(j/864e5);return`${I} ${I===1?"day":"days"}`}else if(j>=36e5){const I=Math.floor(j/36e5);return`${I} ${I===1?"hour":"hours"}`}else if(j>=6e4){const I=Math.floor(j/6e4);return`${I} ${I===1?"minute":"minutes"}`}else{const I=Math.floor(j/1e3);return`${I} ${I===1?"second":"seconds"}`}}function P(j,f){return j.length>f?j.slice(0,f)+"...":j}return t.jsxRuntimeExports.jsxs("div",{className:k.options,children:[e.chargeTypes.length>1&&t.jsxRuntimeExports.jsx("div",{className:k.chargeTypes,children:e.chargeTypes.map(j=>t.jsxRuntimeExports.jsx("div",{className:t.clx(k.charge,{[k.chargeActive]:o===j}),onClick:()=>r(j),children:jt[j]},j))}),t.jsxRuntimeExports.jsx("div",{className:k.variants,children:i.map(j=>{var f;return t.jsxRuntimeExports.jsxs("div",{className:t.clx(k.variant,{[k.activeVariant]:e.id===j.id}),onClick:()=>n(j),children:[t.jsxRuntimeExports.jsxs("div",{className:k.variantInfo,children:[t.jsxRuntimeExports.jsx("span",{className:k.title,children:P(j.name,15)}),t.jsxRuntimeExports.jsxs("span",{children:["$",o==="ONE_TIME"?j.price.amount:j.subscriptionSettings?j.subscriptionSettings.price.amount:"Price Not Found"]})]}),t.jsxRuntimeExports.jsx("div",{children:o==="ONE_TIME"&&t.jsxRuntimeExports.jsxs("span",{className:k.stock,children:[((f=j.quantity.restrictions)==null?void 0:f.max)||j.quantity.available||0," in stock"]})})]},j.id)})}),o==="ONE_TIME"&&t.jsxRuntimeExports.jsxs("div",{className:k.quantity,children:[t.jsxRuntimeExports.jsx("button",{onClick:()=>{s>1?a(j=>j-1):a(1)},className:k.button,disabled:e.quantity.restrictions&&s<=e.quantity.restrictions.min,children:t.jsxRuntimeExports.jsx(t.Icon,{name:"Minus"})}),t.jsxRuntimeExports.jsx("label",{className:t.clx(k.count,{[k.focused]:u}),onFocus:()=>E(!0),onBlur:()=>E(!1),children:t.jsxRuntimeExports.jsx(t.Input,{type:"number",value:String(s),onChange:j=>a(Number(j)),max:(($=e.quantity.restrictions)==null?void 0:$.max)||e.quantity.available||1/0,min:((w=e.quantity.restrictions)==null?void 0:w.min)||0,style:{backgroundColor:"transparent",border:"none",textAlign:"center"}})}),t.jsxRuntimeExports.jsx("button",{onClick:()=>{a(j=>j+1)},className:k.button,disabled:!!(e.quantity.restrictions&&s>=e.quantity.restrictions.max||e.quantity.available&&s>=e.quantity.available),children:t.jsxRuntimeExports.jsx(t.Icon,{name:"Plus"})})]}),t.jsxRuntimeExports.jsxs("div",{className:k.meta,children:[t.jsxRuntimeExports.jsxs("div",{className:k.info,children:[t.jsxRuntimeExports.jsx("span",{children:"Delivery"}),t.jsxRuntimeExports.jsxs("div",{className:k.infoRight,children:[t.jsxRuntimeExports.jsx(t.Icon,{name:"Lightning",fill:"#FF3F19",width:20,height:20}),t.jsxRuntimeExports.jsx("span",{children:!e.deliveryTime||e.deliveryTime===0?"Instant":S(e.deliveryTime)})]})]}),t.jsxRuntimeExports.jsxs("div",{className:k.info,children:[t.jsxRuntimeExports.jsx("span",{children:"Price"}),t.jsxRuntimeExports.jsx("div",{className:k.infoRight,children:o==="ONE_TIME"?e.compareAtPrice&&(e.compareAtPrice.amount||0)-(e.price.amount||0)>0?t.jsxRuntimeExports.jsxs("div",{className:k.price,children:[t.jsxRuntimeExports.jsxs("span",{className:t.clx(k.newPrice,{[k.animate]:_}),children:["$ ",(e.price.amount||0)*s]}),t.jsxRuntimeExports.jsxs("span",{className:k.oldPrice,children:["$ ",(e.compareAtPrice.amount||0)*s]})]}):t.jsxRuntimeExports.jsxs("span",{className:t.clx(k.newPrice,{[k.animate]:_}),children:["$ ",(e.price.amount||0)*s]}):e.subscriptionSettings&&e.subscriptionSettings.compareAtPrice&&(e.subscriptionSettings.compareAtPrice.amount||0)-(e.subscriptionSettings.price.amount||0)>0?t.jsxRuntimeExports.jsxs("div",{className:k.price,children:[t.jsxRuntimeExports.jsxs("span",{className:t.clx(k.newPrice,{[k.animate]:_}),children:["$ ",e.subscriptionSettings.price.amount||0]}),t.jsxRuntimeExports.jsxs("span",{className:k.oldPrice,children:["$ ",e.subscriptionSettings.compareAtPrice.amount||0]})]}):e.subscriptionSettings&&t.jsxRuntimeExports.jsxs("span",{className:t.clx(k.newPrice,{[k.animate]:_}),children:["$ ",e.subscriptionSettings.price.amount||0]})})]})]}),t.jsxRuntimeExports.jsxs("div",{className:k.buttons,children:[t.jsxRuntimeExports.jsx(t.Button,{type:"Primary",onClick:()=>D(),children:t.jsxRuntimeExports.jsx("span",{children:o==="ONE_TIME"?"Buy Now":"Subscribe Now"})}),o==="ONE_TIME"&&t.jsxRuntimeExports.jsx(t.Button,{type:"Secondary",onClick:()=>T(),children:"Add to Cart"})]})]})},ao="_button_1x9be_1",lo="_login_1x9be_14",uo="_signUp_1x9be_18",xo="_buttons_1x9be_23",po="_modal_1x9be_32",mo="_info_1x9be_48",ho="_top_1x9be_55",_o="_title_1x9be_66",jo="_clear_1x9be_72",go="_activeClear_1x9be_79",fo="_count_1x9be_83",bo="_cart_1x9be_98",vo="_empty_1x9be_106",Eo="_product_1x9be_132",Ro="_products_1x9be_141",yo="_image_1x9be_149",Io="_productInfo_1x9be_155",ko="_content_1x9be_162",$o="_name_1x9be_168",wo="_price_1x9be_174",No="_productButtons_1x9be_180",Co="_productButton_1x9be_180",So="_productCount_1x9be_200",Bo="_bottom_1x9be_216",To="_subtotal_1x9be_224",Po="_block_1x9be_232",Ao="_shoppingCount_1x9be_239",Oo="_total_1x9be_259",qo="_link_1x9be_265",Do="_userInfo_1x9be_272",y={button:ao,login:lo,signUp:uo,buttons:xo,modal:po,info:mo,top:ho,title:_o,clear:jo,activeClear:go,count:fo,cart:bo,empty:vo,product:Eo,products:Ro,image:yo,productInfo:Io,content:ko,name:$o,price:wo,productButtons:No,productButton:Co,productCount:So,bottom:Bo,subtotal:To,block:Po,shoppingCount:Ao,total:Oo,link:qo,userInfo:Do},Lo="_button_15mga_1",Mo="_primary_15mga_19",Ho="_secondary_15mga_24",Fo="_tertiary_15mga_29",Vo="_content_15mga_34",ot={button:Lo,primary:Mo,secondary:Ho,tertiary:Fo,content:Vo},gt=x=>{const{children:i,onClick:e,style:n,className:o,disabled:r=!1,type:c="Primary"}=x;return t.jsxRuntimeExports.jsx("button",{className:t.clx(ot.button,o,{[ot.primary]:c==="Primary",[ot.secondary]:c==="Secondary",[ot.tertiary]:c==="Tertiary"}),onClick:e,style:{...n},disabled:r,children:c==="Tertiary"?t.jsxRuntimeExports.jsxs("div",{className:ot.content,children:[t.jsxRuntimeExports.jsx(t.Icon,{name:"ArrowRight",fill:"#757575",width:20,height:20}),i]}):t.jsxRuntimeExports.jsx(t.jsxRuntimeExports.Fragment,{children:i})})};class rt extends Error{}rt.prototype.name="InvalidTokenError";function Uo(x){return decodeURIComponent(atob(x).replace(/(.)/g,(i,e)=>{let n=e.charCodeAt(0).toString(16).toUpperCase();return n.length<2&&(n="0"+n),"%"+n}))}function zo(x){let i=x.replace(/-/g,"+").replace(/_/g,"/");switch(i.length%4){case 0:break;case 2:i+="==";break;case 3:i+="=";break;default:throw new Error("base64 string is not of the correct length")}try{return Uo(i)}catch{return atob(i)}}function Yo(x,i){if(typeof x!="string")throw new rt("Invalid token specified: must be a string");i||(i={});const e=i.header===!0?0:1,n=x.split(".")[e];if(typeof n!="string")throw new rt(`Invalid token specified: missing part #${e+1}`);let o;try{o=zo(n)}catch(r){throw new rt(`Invalid token specified: invalid base64 for part #${e+1} (${r.message})`)}try{return JSON.parse(o)}catch(r){throw new rt(`Invalid token specified: invalid json for part #${e+1} (${r.message})`)}}const Go=x=>{const{shopping:i,signUp:e}=x,n=t.useNavigate();function o(c){n(c)}const r=JSON.parse(localStorage.getItem("token")||"{}");return t.jsxRuntimeExports.jsxs("div",{className:y.buttons,children:[i&&t.jsxRuntimeExports.jsx(ft,{}),!r.data&&t.jsxRuntimeExports.jsx("div",{className:t.clx(y.button,y.login),onClick:()=>o("/customer-dash"),children:"Login"}),!r.data&&e&&t.jsxRuntimeExports.jsx("div",{className:t.clx(y.button,y.login,y.signUp),onClick:()=>o("/customer-dash"),children:"Sign Up"}),r.data&&t.jsxRuntimeExports.jsx(Et,{token:r.data})]})},ft=()=>{const[x,i]=h.useState(!1),[e,n]=h.useState([]),{cart:o,getProducts:r}=t.useCart();function c(E){for(let l=0;l<o.parts.length;l++)for(let C=0;C<E.variants.length;C++)if(o.parts[l].productVariantId===E.variants[l].id)return o.parts[l].productVariantId}function s(E){for(let l=0;l<o.parts.length;l++)for(let C=0;C<E.variants.length;C++)if(o.parts[l].productVariantId===E.variants[l].id)return o.parts[l].quantity}h.useEffect(()=>{(async()=>{const l=o.parts.map(_=>String(_.productId)),m=(await r([...l])).map(_=>({..._,activeVariantId:c(_),quantity:s(_)}));n(m)})()},[o]);function a(E){var l;return!E||!(E!=null&&E.variants)?!1:(l=E.variants.find(C=>C.id===E.activeVariantId))==null?void 0:l.subscriptionSettings}const u=o.parts.length>0&&e.length>0&&!a(e[0]);return t.jsxRuntimeExports.jsxs(t.jsxRuntimeExports.Fragment,{children:[t.jsxRuntimeExports.jsxs("div",{className:y.button,onClick:E=>{E.stopPropagation(),i(!0)},children:[t.jsxRuntimeExports.jsx(t.Icon,{name:"Handbag",fill:"var(--icon-primary)"}),u&&t.jsxRuntimeExports.jsx("div",{className:y.shoppingCount,children:o.parts.length})]}),x&&t.jsxRuntimeExports.jsx(t.Modal,{close:i,children:t.jsxRuntimeExports.jsx(bt,{activeProducts:e,isCartNotEmpty:u})})]})},bt=x=>{const{activeProducts:i,isCartNotEmpty:e}=x,{cart:n,reset:o,getTotalAndDiscount:r,updateQuantityOfProduct:c}=t.useCart(),s=t.useNavigate();function a(l){s(l)}function u(l){c({productId:l.id,productVariantId:l.activeVariantId,quantity:l.quantity+1})}function E(l){c({productId:l.id,productVariantId:l.activeVariantId,quantity:l.quantity-1})}return t.jsxRuntimeExports.jsxs("div",{className:y.modal,onClick:l=>l.stopPropagation(),children:[t.jsxRuntimeExports.jsxs("div",{className:y.top,children:[t.jsxRuntimeExports.jsxs("div",{className:y.info,children:[t.jsxRuntimeExports.jsx("span",{className:y.title,children:"Cart"}),e&&t.jsxRuntimeExports.jsx("div",{className:y.count,children:n.parts.length})]}),t.jsxRuntimeExports.jsx("button",{className:t.clx(y.clear,{[y.activeClear]:e}),disabled:!e,onClick:()=>o(),children:"Clear all"})]}),e?t.jsxRuntimeExports.jsxs("div",{className:y.cart,children:[t.jsxRuntimeExports.jsx("div",{className:y.products,children:i.map(l=>t.jsxRuntimeExports.jsxs("div",{className:y.product,children:[t.jsxRuntimeExports.jsxs("div",{className:y.productInfo,children:[t.jsxRuntimeExports.jsx("img",{src:`https://imagedelivery.net/${l.images[0].cfId}/w=500`,alt:"image",width:"100%",height:"100%",className:y.image}),t.jsxRuntimeExports.jsxs("div",{className:y.content,children:[t.jsxRuntimeExports.jsx("div",{className:y.name,children:l.name}),t.jsxRuntimeExports.jsxs("div",{className:y.price,children:["$",l.variants.find(C=>C.id===l.activeVariantId).price.amount*((l==null?void 0:l.quantity)||1)]})]})]}),t.jsxRuntimeExports.jsxs("div",{className:y.productButtons,children:[t.jsxRuntimeExports.jsx("div",{onClick:()=>{l.quantity!==1&&E(l)},className:y.productButton,children:t.jsxRuntimeExports.jsx(t.Icon,{name:"Minus",fill:"#757575",width:20,height:20})}),t.jsxRuntimeExports.jsx("div",{className:y.productCount,children:l.quantity}),t.jsxRuntimeExports.jsx("div",{onClick:()=>u(l),className:y.productButton,children:t.jsxRuntimeExports.jsx(t.Icon,{name:"Plus",fill:"#757575",width:20,height:20})})]})]},l.id))}),t.jsxRuntimeExports.jsxs("div",{className:y.bottom,children:[t.jsxRuntimeExports.jsxs("div",{className:y.subtotal,children:[t.jsxRuntimeExports.jsxs("div",{className:y.block,children:[t.jsxRuntimeExports.jsx("span",{children:"Subtotal"}),t.jsxRuntimeExports.jsx(t.Icon,{name:"Info",width:20,height:20,fill:"#757575"})]}),t.jsxRuntimeExports.jsxs("div",{className:y.total,children:["$",r().total]})]}),t.jsxRuntimeExports.jsx(gt,{onClick:()=>a("/checkout"),children:"Checkout"})]})]}):t.jsxRuntimeExports.jsx(vt,{})]})},vt=()=>t.jsxRuntimeExports.jsxs("div",{className:y.empty,children:[t.jsxRuntimeExports.jsx("div",{children:t.jsxRuntimeExports.jsx(t.Icon,{name:"Handbag"})}),t.jsxRuntimeExports.jsx("span",{children:"Your cart is empty"}),t.jsxRuntimeExports.jsxs("span",{children:["Check out the store's products and add them"," ",t.jsxRuntimeExports.jsx("a",{href:"/products",className:y.link,children:"here"})]})]}),Et=({token:x})=>{const[i,e]=h.useState("test-email@gmail.com"),n=t.useNavigate();h.useEffect(()=>{(async()=>{const c=Yo(x);e(c.email)})()},[x]);function o(r){n(r)}return t.jsxRuntimeExports.jsx("div",{className:y.userInfo,onClick:()=>o("/customer-dash"),children:t.jsxRuntimeExports.jsx("div",{children:i||"test-email@gmail.com"})})},Wo="_share_9g414_1",Xo="_modal_9g414_8",Jo="_header_9g414_14",Qo="_socials_9g414_24",Ko="_social_9g414_24",Zo="_copy_9g414_34",ti="_title_9g414_41",ei="_copyWrapper_9g414_47",si="_copyText_9g414_56",W={share:Wo,modal:Xo,header:Jo,socials:Qo,social:Ko,copy:Zo,title:ti,copyWrapper:ei,copyText:si},ni=()=>{const{isOpenModal:x,setIsOpenModal:i}=t.useShareLinkStore();function e(){i(!0)}return t.jsxRuntimeExports.jsxs(t.jsxRuntimeExports.Fragment,{children:[t.jsxRuntimeExports.jsx(t.Button,{className:W.share,onClick:n=>{n.stopPropagation(),e()},type:"Secondary",children:t.jsxRuntimeExports.jsx(t.Icon,{name:"Share",fill:"#757575"})}),x&&t.jsxRuntimeExports.jsx(t.Modal,{close:i,children:t.jsxRuntimeExports.jsx(oi,{})})]})},mt={facebook:"FacebookLogo","x.com":"TwitterLogo",telegram:"TelegramLogo",instagram:"InstagramLogo",discord:"MessengerLogo",tiktok:"TiktokLogo"},oi=()=>{const{setIsOpenModal:x}=t.useShareLinkStore(),i=window.location.href;function e(){navigator.clipboard.writeText(i)}return t.jsxRuntimeExports.jsxs("div",{className:W.modal,onClick:n=>n.stopPropagation(),children:[t.jsxRuntimeExports.jsxs("div",{className:W.header,children:[t.jsxRuntimeExports.jsx("div",{className:W.title,children:"Share this Post"}),t.jsxRuntimeExports.jsx(t.Icon,{name:"X",fill:"#757575",onClick:()=>x(!1)})]}),t.jsxRuntimeExports.jsx("div",{className:W.socials,children:Object.keys(mt).map(n=>t.jsxRuntimeExports.jsx("div",{className:W.social,children:t.jsxRuntimeExports.jsx(t.Icon,{name:mt[n]})}))}),t.jsxRuntimeExports.jsxs("div",{className:W.copyWrapper,children:[t.jsxRuntimeExports.jsx("div",{className:t.clx(W.copy,W.copyText),onClick:e,children:i}),t.jsxRuntimeExports.jsx("div",{onClick:e,className:W.copy,children:t.jsxRuntimeExports.jsx(t.Icon,{name:"Copy"})})]})]})},ii="_accordion_9e4oa_1",ri="_header_9e4oa_9",ci="_icon_9e4oa_18",ai="_open_9e4oa_21",li="_content_9e4oa_25",it={accordion:ii,header:ri,icon:ci,open:ai,content:li},ui=({title:x,content:i})=>{const[e,n]=h.useState(!1),[o,r]=h.useState(0),c=h.useRef(null),s=()=>{n(!e)};return h.useEffect(()=>{c.current&&r(e?c.current.scrollHeight:0)},[e]),t.jsxRuntimeExports.jsxs("div",{className:it.accordion,children:[t.jsxRuntimeExports.jsxs("div",{className:it.header,onClick:s,children:[t.jsxRuntimeExports.jsx("h5",{id:"h5",children:x}),t.jsxRuntimeExports.jsx("div",{className:t.clx(it.icon,{[it.open]:e}),children:t.jsxRuntimeExports.jsx(t.Icon,{name:"CaretDown"})})]}),t.jsxRuntimeExports.jsx("div",{ref:c,className:it.content,style:{height:`${o}px`},children:t.jsxRuntimeExports.jsx("p",{id:"p",children:i})})]})},xi="_wrapper_1r14x_1",di="_label_1r14x_9",pi="_input_1r14x_18",mi="_required_1r14x_35",hi="_paddingless_1r14x_39",_i="_content_1r14x_43",ji="_borderless_1r14x_58",gi="_rightIcon_1r14x_63",K={wrapper:xi,label:di,input:pi,required:mi,paddingless:hi,content:_i,borderless:ji,rightIcon:gi},fi=x=>{const{onChange:i,style:e,label:n,value:o,type:r,min:c,max:s,placeholder:a,disabled:u=!1,required:E=!1,regex:l,paddingless:C=!1,borderless:m=!1,editable:_=!1,isSearch:p=!1}=x,{themeSettings:T}=t.useThemeSettingsStore(),{inputs:D}=T,[S,P]=h.useState(!1);function $(f,L){if(f.startsWith("#")){let I,A,O;return f.length===7?(I=parseInt(f.slice(1,3),16),A=parseInt(f.slice(3,5),16),O=parseInt(f.slice(5,7),16)):f.length===4&&(I=parseInt(f[1]+f[1],16),A=parseInt(f[2]+f[2],16),O=parseInt(f[3]+f[3],16)),`rgba(${I}, ${A}, ${O}, ${L})`}const b={black:"#000000",white:"#ffffff",red:"#ff0000",green:"#00ff00",blue:"#0000ff"}[f.toLowerCase()];return b?$(b,L):f}function w(f){return Number(f)<0?String(c):f}function j(f){return!E||!l?!0:new RegExp(l).test(f)}return t.jsxRuntimeExports.jsxs("div",{className:K.wrapper,children:[n&&t.jsxRuntimeExports.jsx("label",{className:K.label,htmlFor:n,children:n}),t.jsxRuntimeExports.jsxs("div",{className:K.content,style:{paddingRight:D.general.height+15,...e,backgroundColor:$(D.field.color,D.field.opacity/100)},children:[t.jsxRuntimeExports.jsx("input",{id:n,type:r||"text",onChange:f=>{if(r==="text")i(f.target.value);else{const L=w(f.target.value);i(L)}},value:o,autoComplete:"off",placeholder:a||"Type something...",className:t.clx(K.input,{[K.required]:S&&E&&!j(o),[K.paddingless]:C,[K.borderless]:m}),min:r==="number"?c:void 0,max:r==="number"?s:void 0,disabled:u,onFocus:()=>P(!0)}),p&&t.jsxRuntimeExports.jsx("div",{className:K.rightIcon,children:t.jsxRuntimeExports.jsx(t.Icon,{name:"MagnifyingGlass",fill:"var(--icon-secondary)",width:D.general.height,height:D.general.height})}),_&&t.jsxRuntimeExports.jsx("div",{children:t.jsxRuntimeExports.jsx(t.Icon,{name:"Sliders",width:20,height:20,hoverable:!0})})]})]})},bi="_wrapper_st58d_1",vi="_label_st58d_10",Ei="_textarea_st58d_18",Ri="_length_st58d_33",ct={wrapper:bi,label:vi,textarea:Ei,length:Ri},yi=x=>{const{onChange:i,label:e,value:n,maxLength:o,placeholder:r="Type something..."}=x,[c,s]=h.useState(n.length);return t.jsxRuntimeExports.jsxs("div",{className:ct.wrapper,children:[e&&t.jsxRuntimeExports.jsx("label",{className:ct.label,htmlFor:e,children:e}),t.jsxRuntimeExports.jsx("textarea",{id:e,defaultValue:n,onChange:a=>{s(a.target.value.length),i(a.target.value)},placeholder:r,className:ct.textarea,maxLength:o}),o&&t.jsxRuntimeExports.jsxs("div",{className:ct.length,children:[c,"/",o]})]})};exports.ChooseImage=t.ChooseImage;exports.ChooseImageModal=t.ChooseImageModal;exports.Icon=t.Icon;exports.InputSettings=t.Input;exports.Loader=t.Loader;exports.Modal=t.Modal;exports.Select=t.Select;exports.Switch=t.Switch;exports.TextareaSettings=t.Textarea;exports.Accordion=ui;exports.Button=gt;exports.ButtonTypeSettings=_t;exports.ButtonsSettings=Zs;exports.CategorySettings=Me;exports.EmptyCart=vt;exports.FormSettings=us;exports.HeaderButtons=Go;exports.InputUI=fi;exports.ItemsSettings=ht;exports.LayoutSettings=Ot;exports.ListingSelector=qn;exports.ProductOptions=co;exports.RangeSelector=lt;exports.ShareLink=ni;exports.ShoppingButton=ft;exports.ShoppingModalCart=bt;exports.TextSettings=pt;exports.TextareaUI=yi;exports.TypesText=dt;exports.UserInfo=Et;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./index-J6kEvjGE.cjs"),h=require("react");require("@phosphor-icons/react");const Rt="_wrapper_9rr5j_2",yt="_alignmentBlock_9rr5j_8",It="_title_9rr5j_15",wt="_subtitle_9rr5j_22",kt="_alignmentContent_9rr5j_29",$t="_alignments_9rr5j_37",Nt="_alignment_9rr5j_8",Ct="_circle_9rr5j_58",St="_paddings_9rr5j_65",Bt="_padding_9rr5j_65",Tt="_input_9rr5j_84",G={wrapper:Rt,alignmentBlock:yt,title:It,subtitle:wt,alignmentContent:kt,alignments:$t,alignment:Nt,circle:Ct,paddings:St,padding:Bt,input:Tt},Pt=["topLeft","top","topRight","left","center","right","bottomLeft","bottom","bottomRight"],At=["left","top","right","bottom"],Ot=u=>{const{alignment:o,padding:e,setPadding:s,setAlignment:i}=u;function a(){switch(o){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 c(r){switch(r){case"left":return"AlignLeft";case"right":return"AlignRight";case"top":return"AlignTop";case"bottom":return"AlignBottom"}}return t.jsxRuntimeExports.jsxs("div",{className:G.layout,children:[t.jsxRuntimeExports.jsx("h3",{className:G.title,children:"Layout"}),t.jsxRuntimeExports.jsxs("div",{className:G.alignmentBlock,children:[t.jsxRuntimeExports.jsx("h5",{className:G.subtitle,children:"Alignment"}),t.jsxRuntimeExports.jsxs("div",{className:G.alignmentContent,children:[t.jsxRuntimeExports.jsx("div",{className:G.alignments,children:Pt.map(r=>t.jsxRuntimeExports.jsxs("div",{onClick:()=>{i(r)},className:G.alignment,children:[r!==o&&t.jsxRuntimeExports.jsx("div",{className:G.circle}),r===o&&t.jsxRuntimeExports.jsx(t.Icon,{name:a(),fill:"#FF3F19",width:22,height:22})]},r))}),t.jsxRuntimeExports.jsx("div",{className:G.paddings,children:At.map(r=>t.jsxRuntimeExports.jsxs("label",{className:G.padding,children:[t.jsxRuntimeExports.jsx("div",{children:t.jsxRuntimeExports.jsx(t.Icon,{name:c(r),width:20,height:20})}),t.jsxRuntimeExports.jsx(t.Input,{type:"number",value:String(e[r]),onChange:n=>s({...e,[r]:Number(n)}),paddingless:!0,borderless:!0})]},r))})]})]})]})},qt="_title_voimd_1",Dt="_subtitle_voimd_5",Lt="_header_voimd_12",Mt="_text_voimd_13",Ht="_top_voimd_20",zt="_itemsBlock_voimd_29",it={title:qt,subtitle:Dt,header:Lt,text:Mt,top:Ht,itemsBlock:zt},Ft="_typeTexts_167ez_1",Vt="_block_167ez_8",Ut="_active_167ez_25",xt={typeTexts:Ft,block:Vt,active:Ut},Yt=["bold","italic","underline","strike-through","code"],pt=u=>{const{typesText:o,setTypesText:e}=u;function s(i){switch(i){case"bold":return"TextB";case"italic":return"TextItalic";case"code":return"CodeSimple";case"strike-through":return"TextStrikethrough";case"underline":return"TextUnderline"}}return t.jsxRuntimeExports.jsx("div",{className:xt.typeTexts,children:Yt.map(i=>t.jsxRuntimeExports.jsx("div",{className:t.clx(xt.block,{[xt.active]:o.includes(i)}),onClick:()=>{const a=[...o];if(a.includes(i)){const c=a.filter(r=>r!==i);e(c)}else a.push(i),e(a)},children:t.jsxRuntimeExports.jsx(t.Icon,{name:s(i),fill:o.includes(i)?"#252525":"#757575",width:20,height:20})},String(i)))})},ht=u=>{const{typesText:o,isActiveText:e,setIsActiveText:s,text:i,setText:a,setTypesText:c,title:r,subtitle:n="Items"}=u;return t.jsxRuntimeExports.jsxs("div",{className:it.text,children:[(r||e!==void 0)&&t.jsxRuntimeExports.jsxs("div",{className:it.top,children:[r&&t.jsxRuntimeExports.jsx("h3",{className:it.title,children:r}),e!==void 0&&s&&t.jsxRuntimeExports.jsx(t.Switch,{current:e,onChange:l=>s(l)})]}),t.jsxRuntimeExports.jsxs("div",{className:it.itemsBlock,children:[t.jsxRuntimeExports.jsx("h5",{className:it.subtitle,children:n}),t.jsxRuntimeExports.jsx(t.Textarea,{onChange:l=>a(l),value:i,maxLength:150}),t.jsxRuntimeExports.jsx(pt,{typesText:o,setTypesText:c})]})]})},Gt="_title_vzbkd_1",Wt="_subtitle_vzbkd_5",Xt="_header_vzbkd_12",Jt="_text_vzbkd_13",Qt="_productsBlock_vzbkd_14",Kt="_top_vzbkd_26",Zt="_itemsBlock_vzbkd_35",te="_typeTexts_vzbkd_41",ee="_block_vzbkd_48",se="_active_vzbkd_61",ne="_products_vzbkd_14",ie="_product_vzbkd_14",oe="_button_vzbkd_80",re="_disabled_vzbkd_91",ae="_image_vzbkd_95",ce="_info_vzbkd_102",le="_name_vzbkd_114",de="_buttons_vzbkd_118",ue="_modal_vzbkd_125",xe="_link_vzbkd_145",me="_modalOptions_vzbkd_151",pe="_addButton_vzbkd_163",M={title:Gt,subtitle:Wt,header:Xt,text:Jt,productsBlock:Qt,top:Kt,itemsBlock:Zt,typeTexts:te,block:ee,active:se,products:ne,product:ie,button:oe,disabled:re,image:ae,info:ce,name:le,buttons:de,modal:ue,link:xe,modalOptions:me,addButton:pe},he=h.forwardRef((u,o)=>{const{activeItem:e,setActiveItem:s,popupPosition:i,modalOptions:a,setIsOpenModal:c}=u;function r(n,l){return n.length>l?`${n.slice(0,l)}...`:n}return t.jsxRuntimeExports.jsxs("div",{ref:o,className:M.modal,onClick:n=>{n.stopPropagation()},style:{top:`${i.top}px`,left:`${i.left}px`},children:[t.jsxRuntimeExports.jsxs("div",{className:M.top,children:[t.jsxRuntimeExports.jsx("h3",{className:M.title,children:r(e.name,20)}),t.jsxRuntimeExports.jsx(t.Icon,{name:"X",height:20,width:20,hoverable:!0,onClick:()=>{s(null),c(!1)}})]}),t.jsxRuntimeExports.jsx("div",{className:M.modalOptions,children:a.map(n=>{if(n.type==="image")return t.jsxRuntimeExports.jsx(t.ChooseImage,{label:"Put up an attractive image",activeImage:e[n.field],onChange:l=>{const x={...e,[n.field]:l};s(x)}},String(n.field));if(n.type==="text")return t.jsxRuntimeExports.jsx(ht,{typesText:e[n.field.type],setTypesText:l=>{const x={...e,[n.field.type]:l};s(x)},text:e[n.field.text]||"",setText:l=>{const x={...e,[n.field.text]:l};s(x)},subtitle:n.label});if(n.type==="input")return t.jsxRuntimeExports.jsx(t.Input,{onChange:l=>{const x={...e,[n.field]:l};s(x)},value:e[n.field]||"",label:n.label,placeholder:n.placeholder});if(n.type==="inputSwitch")return t.jsxRuntimeExports.jsxs("div",{className:M.link,children:[t.jsxRuntimeExports.jsx(t.Input,{onChange:l=>{const x={...e,[n.field.text]:l};s(x)},value:e[n.field.text]||"",label:n.inputLabel,placeholder:n.placeholder}),t.jsxRuntimeExports.jsx(t.Switch,{current:!!e[n.field.switch]||!1,label:n.switchLabel,onChange:l=>{const x={...e,[n.field.switch]:l};s(x)}})]});if(n.type==="list")return t.jsxRuntimeExports.jsx(_t,{items:e[n.field]||[],setItems:l=>{const x={...e,[n.field]:l};s(x)},itemsType:"select",draggable:n.draggable||!1,itemsOptions:n.itemsOptions,deletable:n.deletable||!1,editable:!1,subtitle:n.label,addableOptions:n.addableOptions});if(n.type==="select")return t.jsxRuntimeExports.jsx(t.Select,{options:n.itemsOptions,onChange:l=>{const x={...e,[n.field]:l};s(x)},label:n.label,value:e[n.field]||"String",leftAddon:n.leftAddon&&n.leftAddon==="icon"&&t.jsxRuntimeExports.jsx(t.Icon,{name:e[n.field]})})})})]})}),_e="_other_g74jx_1",je="_subtitle_g74jx_7",ge="_items_g74jx_14",mt={other:_e,subtitle:je,items:ge},dt=u=>{const{items:o,title:e="Other"}=u;return t.jsxRuntimeExports.jsxs("div",{className:mt.other,children:[t.jsxRuntimeExports.jsx("h5",{className:mt.subtitle,children:e}),t.jsxRuntimeExports.jsx("div",{className:mt.items,children:o.map((s,i)=>t.jsxRuntimeExports.jsx(t.Switch,{current:s.isItem,onChange:a=>s.setIsItem(a),label:s.label,hasBackground:!0,paddingless:!1},i))})]})},fe=u=>{const{index:o,moveProduct:e,children:s}=u,[,i]=t.useDrop({accept:"product",hover(r){r.index!==o&&(e(r.index,o),r.index=o)}}),[{isDragging:a},c]=t.useDrag({type:"product",item:{index:o},collect:r=>({isDragging:r.isDragging()})});return t.jsxRuntimeExports.jsx("div",{ref:r=>c(i(r)),className:`${M.product} ${a?M.dragging:""}`,children:s})},_t=u=>{const{isActiveItems:o,setIsActiveItems:e,items:s,setItems:i,other:a,title:c,subtitle:r,editable:n=!0,draggable:l=!1,withImage:x=!1,deletable:d=!0,addable:S=!0,itemsType:g,itemsPlaceholder:_="",itemsOptions:p,hasRangeSelector:T=!1,rangeSelectorOptions:P,modalOptions:f,addableOptions:O={},limit:k,autoScrollInterval:$}=u,[j,v]=h.useState(null),[L,R]=h.useState({top:0,left:0}),[E,I]=h.useState(null),q=h.useRef(null),[D,F]=h.useState(!1),X=(m,N)=>{const y=[...s],[Y]=y.splice(m,1);y.splice(N,0,Y),i(y)};h.useEffect(()=>{const m=()=>{v(null),F(!1)};return document.body.addEventListener("click",m),v(null),F(!1),()=>{v(null),F(!1),document.body.removeEventListener("click",m)}},[]),h.useEffect(()=>{if(j){const m=[...s].map(N=>N.id===j.id?j:N);i(m)}},[j]),h.useEffect(()=>{if(q.current&&E){const m=q.current.getBoundingClientRect().height,N=window.innerHeight;let y=E.top;y+m>N+window.scrollY-200&&(y=N+window.scrollY-m-200),y<0&&(y=10),R({top:y,left:E.left})}},[q.current,E]);const Z=(m,N)=>{m.stopPropagation();const y=m.target.getBoundingClientRect();I({top:y.top+window.scrollY,left:y.left-30}),v(N),F(!0)};function b(m){if(x)return m?t.jsxRuntimeExports.jsx("img",{src:`https://imagedelivery.net/${m[0]}/w=1000`,alt:"image",width:16,height:16}):t.jsxRuntimeExports.jsx(t.Icon,{name:"Image",width:16,height:16,fill:"#757575"})}const B=(m,N)=>{var Y;const y=t.jsxRuntimeExports.jsxs(t.jsxRuntimeExports.Fragment,{children:[l&&t.jsxRuntimeExports.jsx("div",{children:t.jsxRuntimeExports.jsx(t.Icon,{name:"DotsSixVertical",hoverable:!0,width:20,height:20})}),g==="select"&&t.jsxRuntimeExports.jsx(t.Select,{onChange:A=>{const V=[...s],st=p.find(at=>at.name===A);if(!st)return;const tt=V.map(at=>at.id===m.id?{...st,name:A}:at);v({...m,name:A}),i([...tt])},value:m.name,options:p.filter(A=>!s.find(V=>V.name===A.name)).map(A=>A.name),leftAddon:b(m.images)}),g==="input"&&t.jsxRuntimeExports.jsx(t.Input,{onChange:A=>{const st=[...s].map(tt=>tt.id===m.id?{...m,name:A}:tt);i([...st])},value:m.name,placeholder:_}),g==="image"&&t.jsxRuntimeExports.jsx(t.ChooseImage,{onChange:A=>{const st=[...s].map(tt=>tt.id===m.id?{...m,images:A}:tt);i([...st])},activeImage:(Y=s.find(A=>A.id===m.id))==null?void 0:Y.images[0]}),t.jsxRuntimeExports.jsxs("div",{className:M.buttons,children:[n&&t.jsxRuntimeExports.jsx(t.Icon,{name:"Sliders",hoverable:!0,width:20,height:20,onClick:A=>Z(A,m)}),d&&t.jsxRuntimeExports.jsx(t.Icon,{name:"Trash",hoverable:!0,width:20,height:20,fill:"#C12A2A",onClick:()=>i(s.filter(A=>A.id!==m.id))})]})]});return l?t.jsxRuntimeExports.jsx(fe,{product:m,index:N,moveProduct:X,children:y},m.id):t.jsxRuntimeExports.jsx("div",{className:M.product,children:y},m.id)};return t.jsxRuntimeExports.jsxs("div",{className:M.productsBlock,children:[(c||o!==void 0)&&t.jsxRuntimeExports.jsxs("div",{className:M.top,children:[c&&t.jsxRuntimeExports.jsx("h3",{className:M.title,children:c}),o!==void 0&&t.jsxRuntimeExports.jsx(t.Switch,{current:o,onChange:m=>e==null?void 0:e(m)})]}),j&&n&&f&&D&&t.jsxRuntimeExports.jsx(he,{ref:q,activeItem:j,setActiveItem:v,popupPosition:L,modalOptions:f,setIsOpenModal:F}),T&&P&&t.jsxRuntimeExports.jsx(ut,{...P}),t.jsxRuntimeExports.jsxs("div",{className:M.products,children:[r&&t.jsxRuntimeExports.jsx("h5",{className:M.subtitle,children:r}),l?t.jsxRuntimeExports.jsx(t.DndProvider,{backend:t.HTML5Backend,children:s.map((m,N)=>B(m,N))}):s.map((m,N)=>B(m,N)),S&&t.jsxRuntimeExports.jsx("div",{className:M.addButton,children:t.jsxRuntimeExports.jsxs(t.Button,{withoutHover:!0,className:t.clx(M.button,{[M.disabled]:!!(k&&k<=s.length||s.length===(p==null?void 0:p.length))}),size:"s",disabled:!!(k&&k<=s.length||s.length===(p==null?void 0:p.length)),onClick:()=>{const m=[...s];let N=null;if(p){for(let y=0;y<p.length;y++)if(!s.find(Y=>Y.id===p[y].id)){N=p[y];break}}g==="select"?m.push({name:N?N.name:p[0].name,id:(N==null?void 0:N.id)||p[0].id,...O}):g==="input"?m.push({name:"",id:t.v4(),...O}):m.push({name:`Image ${s.length+1}`,id:t.v4(),...O}),i(m)},style:{width:"fit-content"},children:[t.jsxRuntimeExports.jsx("span",{children:"Add Option"}),t.jsxRuntimeExports.jsx(t.Icon,{name:"Plus",width:16,height:16})]})})]}),a!==void 0&&t.jsxRuntimeExports.jsx(dt,{items:a}),$!==void 0&&t.jsxRuntimeExports.jsx(t.Input,{label:"Auto scroll interval",type:"number",value:String($.scrollInterval),onChange:m=>$.setScrollInterval(Number(m)),min:.1,max:100,style:{width:"100%"},postfix:"sec."})]})},be="_title_1jjcw_1",ve="_subtitle_1jjcw_5",Ee="_header_1jjcw_12",Re="_text_1jjcw_13",ye="_productsBlock_1jjcw_14",Ie="_top_1jjcw_26",we="_itemsBlock_1jjcw_35",ke="_typeTexts_1jjcw_41",$e="_block_1jjcw_48",Ne="_active_1jjcw_61",Ce="_products_1jjcw_14",Se="_product_1jjcw_14",Be="_button_1jjcw_80",Te="_disabled_1jjcw_91",Pe="_image_1jjcw_95",Ae="_info_1jjcw_102",Oe="_name_1jjcw_114",qe="_buttons_1jjcw_118",De="_modal_1jjcw_125",Le="_link_1jjcw_145",Me="_modalOptions_1jjcw_151",He="_addButton_1jjcw_157",W={title:be,subtitle:ve,header:Ee,text:Re,productsBlock:ye,top:Ie,itemsBlock:we,typeTexts:ke,block:$e,active:Ne,products:Ce,product:Se,button:Be,disabled:Te,image:Pe,info:Ae,name:Oe,buttons:qe,modal:De,link:Le,modalOptions:Me,addButton:He},ze=u=>{const{isActiveItems:o,setIsActiveItems:e,items:s,setItems:i,other:a,title:c,subtitle:r,draggable:n=!1,withImage:l=!1,addable:x=!0,itemsOptions:d,hasRangeSelector:S=!1,rangeSelectorOptions:g,limit:_,autoScrollInterval:p}=u;function T(f){if(l)return f?t.jsxRuntimeExports.jsx("img",{src:`https://imagedelivery.net/${f[0]}/w=1000`,alt:"image",width:16,height:16}):t.jsxRuntimeExports.jsx(t.Icon,{name:"Image",width:16,height:16,fill:"#757575"})}const P=f=>{const O=d.find($=>$.id===f);if(!O)return;const k=t.jsxRuntimeExports.jsxs(t.jsxRuntimeExports.Fragment,{children:[n&&t.jsxRuntimeExports.jsx("div",{children:t.jsxRuntimeExports.jsx(t.Icon,{name:"DotsSixVertical",hoverable:!0,width:20,height:20})}),t.jsxRuntimeExports.jsx(t.Select,{onChange:$=>{const j=[...s],v=d.find(E=>E.name===$);if(!v)return;const L=v.id,R=j.map(E=>E===f?L:E);i([...R])},value:O.name,options:d.filter($=>!s.find(j=>j===$.id)).map($=>$.name),leftAddon:T(O.images)}),t.jsxRuntimeExports.jsx("div",{className:W.buttons,children:t.jsxRuntimeExports.jsx(t.Icon,{name:"Trash",hoverable:!0,width:20,height:20,fill:"#C12A2A",onClick:()=>i(s.filter($=>$!==f))})})]});return t.jsxRuntimeExports.jsx("div",{className:W.product,children:k},f)};return t.jsxRuntimeExports.jsxs("div",{className:W.productsBlock,children:[(c||o!==void 0)&&t.jsxRuntimeExports.jsxs("div",{className:W.top,children:[c&&t.jsxRuntimeExports.jsx("h3",{className:W.title,children:c}),o!==void 0&&t.jsxRuntimeExports.jsx(t.Switch,{current:o,onChange:f=>e==null?void 0:e(f)})]}),S&&g&&t.jsxRuntimeExports.jsx(ut,{...g}),t.jsxRuntimeExports.jsxs("div",{className:W.products,children:[r&&t.jsxRuntimeExports.jsx("h5",{className:W.subtitle,children:r}),s.map(f=>P(f)),x&&t.jsxRuntimeExports.jsx("div",{className:W.addButton,children:t.jsxRuntimeExports.jsxs(t.Button,{withoutHover:!0,className:t.clx(W.button,{[W.disabled]:!!(_&&_<=s.length||s.length===d.length)}),size:"s",disabled:!!(_&&_<=s.length||s.length===d.length),onClick:()=>{const f=[...s];let O=null;if(d){for(let k=0;k<d.length;k++)if(!s.find($=>$===d[k].id)){O=d[k];break}}f.push((O==null?void 0:O.id)||d[0].id),i(f)},style:{width:"fit-content"},children:[t.jsxRuntimeExports.jsx("span",{children:"Add Option"}),t.jsxRuntimeExports.jsx(t.Icon,{name:"Plus",width:16,height:16})]})})]}),a!==void 0&&t.jsxRuntimeExports.jsx(dt,{items:a}),p!==void 0&&t.jsxRuntimeExports.jsx(t.Input,{label:"Auto scroll interval",type:"number",value:String(p.scrollInterval),onChange:f=>p.setScrollInterval(Number(f)),min:.1,max:100,style:{width:"100%"},postfix:"sec."})]})},Fe="_title_iqcxl_1",Ve="_subtitle_iqcxl_5",Ue="_header_iqcxl_12",Ye="_text_iqcxl_13",Ge="_productsBlock_iqcxl_14",We="_top_iqcxl_26",Xe="_itemsBlock_iqcxl_35",Je="_typeTexts_iqcxl_41",Qe="_block_iqcxl_48",Ke="_active_iqcxl_61",Ze="_products_iqcxl_14",ts="_product_iqcxl_14",es="_button_iqcxl_80",ss="_disabled_iqcxl_91",ns="_image_iqcxl_95",is="_info_iqcxl_102",os="_name_iqcxl_114",rs="_buttons_iqcxl_118",as="_modal_iqcxl_125",cs="_link_iqcxl_146",ls="_modalOptions_iqcxl_152",ds="_addButton_iqcxl_164",z={title:Fe,subtitle:Ve,header:Ue,text:Ye,productsBlock:Ge,top:We,itemsBlock:Xe,typeTexts:Je,block:Qe,active:Ke,products:Ze,product:ts,button:es,disabled:ss,image:ns,info:is,name:os,buttons:rs,modal:as,link:cs,modalOptions:ls,addButton:ds},us=h.forwardRef((u,o)=>{const{activeItem:e,setActiveItem:s,popupPosition:i,modalOptions:a,setIsOpenModal:c}=u;function r(n,l){return n.length>l?`${n.slice(0,l)}...`:n}return t.jsxRuntimeExports.jsxs("div",{ref:o,className:z.modal,onClick:n=>{n.stopPropagation()},style:{top:`${i.top}px`,left:`${i.left}px`},children:[t.jsxRuntimeExports.jsxs("div",{className:z.top,children:[t.jsxRuntimeExports.jsx("h3",{className:z.title,children:r(e.name,20)}),t.jsxRuntimeExports.jsx(t.Icon,{name:"X",height:20,width:20,hoverable:!0,onClick:()=>{s(null),c(!1)}})]}),t.jsxRuntimeExports.jsx("div",{className:z.modalOptions,children:a.map(n=>{if(n.type==="image")return t.jsxRuntimeExports.jsx(t.ChooseImage,{label:"Put up an attractive image",activeImage:e[n.field],onChange:l=>{const x={...e,[n.field]:l};s(x)}},String(n.field));if(n.type==="text")return t.jsxRuntimeExports.jsx(ht,{typesText:e[n.field.type],setTypesText:l=>{const x={...e,[n.field.type]:l};s(x)},text:e[n.field.text]||"",setText:l=>{const x={...e,[n.field.text]:l};s(x)},subtitle:n.label});if(n.type==="input")return t.jsxRuntimeExports.jsx(t.Input,{onChange:l=>{const x={...e,[n.field]:l};s(x)},value:e[n.field]||"",label:n.label,placeholder:n.placeholder});if(n.type==="inputSwitch")return t.jsxRuntimeExports.jsxs("div",{className:z.link,children:[t.jsxRuntimeExports.jsx(t.Input,{onChange:l=>{const x={...e,[n.field.text]:l};s(x)},value:e[n.field.text]||"",label:n.inputLabel,placeholder:n.placeholder}),t.jsxRuntimeExports.jsx(t.Switch,{current:!!e[n.field.switch]||!1,label:n.switchLabel,onChange:l=>{const x={...e,[n.field.switch]:l};s(x)}})]});if(n.type==="select")return t.jsxRuntimeExports.jsx(t.Select,{options:n.itemsOptions,onChange:l=>{const x={...e,[n.field]:l};s(x)},label:n.label,value:e[n.field]||"String",leftAddon:n.leftAddon&&n.leftAddon==="icon"&&t.jsxRuntimeExports.jsx(t.Icon,{name:e[n.field]})})})})]})}),xs=u=>{const{index:o,moveProduct:e,children:s}=u,[,i]=t.useDrop({accept:"product",hover(r){r.index!==o&&(e(r.index,o),r.index=o)}}),[{isDragging:a},c]=t.useDrag({type:"product",item:{index:o},collect:r=>({isDragging:r.isDragging()})});return t.jsxRuntimeExports.jsx("div",{ref:r=>c(i(r)),className:`${z.product} ${a?z.dragging:""}`,children:s})},ms=u=>{const{isActiveItems:o,setIsActiveItems:e,items:s,setItems:i,other:a,title:c,subtitle:r,editable:n=!0,draggable:l=!1,withImage:x=!1,deletable:d=!0,addable:S=!0,itemsType:g,itemsPlaceholder:_="",itemsOptions:p,hasRangeSelector:T=!1,rangeSelectorOptions:P,modalOptions:f,addableOptions:O={}}=u,[k,$]=h.useState(null),[j,v]=h.useState({top:0,left:0}),[L,R]=h.useState(null),E=h.useRef(null),[I,q]=h.useState(!1),D=(b,B)=>{const m=[...s],[N]=m.splice(b,1);m.splice(B,0,N),i(m)};h.useEffect(()=>{const b=()=>{$(null),q(!1)};return document.body.addEventListener("click",b),$(null),q(!1),()=>{$(null),q(!1),document.body.removeEventListener("click",b)}},[]),h.useEffect(()=>{if(k){const b=[...s].map(B=>B.id===k.id?k:B);i(b)}},[k]),h.useEffect(()=>{if(E.current&&L){const b=E.current.getBoundingClientRect().height,B=window.innerHeight;let m=L.top;m+b>B+window.scrollY-200&&(m=B+window.scrollY-b-200),m<0&&(m=10),v({top:m,left:L.left})}},[E.current,L]);const F=(b,B)=>{b.stopPropagation();const m=b.target.getBoundingClientRect();R({top:m.top+window.scrollY,left:m.left-30}),$(B),q(!0)};function X(b){if(x)return b?t.jsxRuntimeExports.jsx("img",{src:`https://imagedelivery.net/${b[0]}/w=1000`,alt:"image",width:16,height:16}):t.jsxRuntimeExports.jsx(t.Icon,{name:"Image",width:16,height:16,fill:"#757575"})}const Z=(b,B)=>{var N;const m=t.jsxRuntimeExports.jsxs(t.jsxRuntimeExports.Fragment,{children:[l&&t.jsxRuntimeExports.jsx("div",{children:t.jsxRuntimeExports.jsx(t.Icon,{name:"DotsSixVertical",hoverable:!0,width:20,height:20})}),g==="select"&&t.jsxRuntimeExports.jsx(t.Select,{onChange:y=>{const A=[...s].map(V=>V.id===b.id?{...b,name:y}:V);$({...b,name:y}),i([...A])},value:b.name,options:p.filter(y=>!s.find(Y=>Y.name===y)),leftAddon:X(b.images)}),g==="input"&&t.jsxRuntimeExports.jsx(t.Input,{onChange:y=>{const A=[...s].map(V=>V.id===b.id?{...b,name:y}:V);i([...A])},value:b.name,placeholder:_}),g==="image"&&t.jsxRuntimeExports.jsx(t.ChooseImage,{onChange:y=>{const A=[...s].map(V=>V.id===b.id?{...b,images:y}:V);i([...A])},activeImage:(N=s.find(y=>y.id===b.id))==null?void 0:N.images[0]}),t.jsxRuntimeExports.jsxs("div",{className:z.buttons,children:[n&&t.jsxRuntimeExports.jsx(t.Icon,{name:"Sliders",hoverable:!0,width:20,height:20,onClick:y=>F(y,b)}),d&&t.jsxRuntimeExports.jsx(t.Icon,{name:"Trash",hoverable:!0,width:20,height:20,fill:"#C12A2A",onClick:()=>i(s.filter(y=>y.id!==b.id))})]})]});return l?t.jsxRuntimeExports.jsx(xs,{product:b,index:B,moveProduct:D,children:m},b.id):t.jsxRuntimeExports.jsx("div",{className:z.product,children:m},b.id)};return t.jsxRuntimeExports.jsxs("div",{className:z.productsBlock,children:[(c||o!==void 0)&&t.jsxRuntimeExports.jsxs("div",{className:z.top,children:[c&&t.jsxRuntimeExports.jsx("h3",{className:z.title,children:c}),o!==void 0&&t.jsxRuntimeExports.jsx(t.Switch,{current:o,onChange:b=>e==null?void 0:e(b)})]}),k&&n&&f&&I&&t.jsxRuntimeExports.jsx(us,{ref:E,activeItem:k,setActiveItem:$,popupPosition:j,modalOptions:f,setIsOpenModal:q}),T&&P&&t.jsxRuntimeExports.jsx(ut,{...P}),t.jsxRuntimeExports.jsxs("div",{className:z.products,children:[r&&t.jsxRuntimeExports.jsx("h5",{className:z.subtitle,children:r}),l?t.jsxRuntimeExports.jsx(t.DndProvider,{backend:t.HTML5Backend,children:s.map((b,B)=>Z(b,B))}):s.map((b,B)=>Z(b,B)),S&&t.jsxRuntimeExports.jsx("div",{className:z.addButton,children:t.jsxRuntimeExports.jsxs(t.Button,{withoutHover:!0,className:z.button,size:"s",onClick:()=>{const b=[...s];let B=null;if(p){for(let m=0;m<p.length;m++)if(!s.find(N=>N.name===p[m])){B=p[m];break}}g==="select"?b.push({name:B||p[0],id:t.v4(),...O}):g==="input"?b.push({name:"",id:t.v4(),...O}):b.push({name:`Image ${s.length+1}`,id:t.v4(),...O}),i(b)},style:{width:"fit-content"},children:[t.jsxRuntimeExports.jsx("span",{children:"Add Option"}),t.jsxRuntimeExports.jsx(t.Icon,{name:"Plus",width:16,height:16})]})})]}),a!==void 0&&t.jsxRuntimeExports.jsx(dt,{items:a})]})},ps="_title_oravb_1",hs="_subtitle_oravb_5",_s="_header_oravb_12",js="_text_oravb_13",gs="_productsBlock_oravb_14",fs="_buttonsBlock_oravb_15",bs="_top_oravb_26",vs="_itemsBlock_oravb_35",Es="_typeTexts_oravb_41",Rs="_block_oravb_48",ys="_active_oravb_60",Is="_products_oravb_14",ws="_product_oravb_14",ks="_button_oravb_15",$s="_image_oravb_90",Ns="_info_oravb_97",Cs="_name_oravb_109",Ss="_buttons_oravb_15",Bs="_modal_oravb_120",Ts="_other_oravb_139",Ps="_options_oravb_145",et={title:ps,subtitle:hs,header:_s,text:js,productsBlock:gs,buttonsBlock:fs,top:bs,itemsBlock:vs,typeTexts:Es,block:Rs,active:ys,products:Is,product:ws,button:ks,image:$s,info:Ns,name:Cs,buttons:Ss,modal:Bs,other:Ts,options:Ps},As=h.forwardRef((u,o)=>{const{activeButton:e,setActiveButton:s,popupPosition:i}=u,[a,c]=h.useState(e.typesText),[r,n]=h.useState(e.destination),[l,x]=h.useState(e.page),[d,S]=h.useState(e.link||""),[g,_]=h.useState(e.text||""),[p,T]=h.useState(e.openInNewTab),{pages:P}=t.usePagesStore();return h.useEffect(()=>{s({...e,...{text:g,link:d,destination:r,typesText:a,page:l,openInNewTab:p}})},[a,r,d,g,l,p]),t.jsxRuntimeExports.jsxs("div",{className:et.modal,onClick:f=>{f.stopPropagation()},style:{top:`${i.top}px`,left:`${i.left}px`},ref:o,children:[t.jsxRuntimeExports.jsxs("div",{className:et.top,children:[t.jsxRuntimeExports.jsx("h3",{className:et.title,children:e.type}),t.jsxRuntimeExports.jsx(t.Icon,{name:"X",height:20,width:20,hoverable:!0,onClick:()=>s(null)})]}),t.jsxRuntimeExports.jsxs("div",{className:et.options,children:[t.jsxRuntimeExports.jsx(t.Select,{label:"Destination",onChange:f=>n(f),options:["Go to Page","Open Link"].filter(f=>f!==r),value:r}),r==="Go to Page"?t.jsxRuntimeExports.jsx(t.Select,{label:"Go to",onChange:f=>x(f),options:P?Object.values(P).filter(f=>f.name!==l).map(f=>f.name):[],value:l}):t.jsxRuntimeExports.jsx(t.Input,{onChange:f=>S(f),value:d,placeholder:"https://",label:"Link"}),t.jsxRuntimeExports.jsx(t.Switch,{current:e.openInNewTab,label:"Open in new tab",onChange:f=>T(f)}),t.jsxRuntimeExports.jsx(t.Textarea,{onChange:f=>_(f),value:g,label:"Text",maxLength:150}),t.jsxRuntimeExports.jsx(pt,{typesText:a,setTypesText:c})]})]})}),Os="_subtitle_w0d5g_1",qs="_header_w0d5g_8",Ds="_text_w0d5g_9",Ls="_productsBlock_w0d5g_10",Ms="_buttonsBlock_w0d5g_11",Hs="_top_w0d5g_23",zs="_itemsBlock_w0d5g_32",Fs="_typeTexts_w0d5g_38",Vs="_block_w0d5g_45",Us="_active_w0d5g_58",Ys="_products_w0d5g_10",Gs="_product_w0d5g_10",Ws="_button_w0d5g_11",Xs="_image_w0d5g_88",Js="_info_w0d5g_95",Qs="_name_w0d5g_107",Ks="_buttons_w0d5g_11",Zs="_modal_w0d5g_118",tn="_other_w0d5g_138",en="_options_w0d5g_144",sn="_addButton_w0d5g_150",nt={subtitle:Os,header:qs,text:Ds,productsBlock:Ls,buttonsBlock:Ms,top:Hs,itemsBlock:zs,typeTexts:Fs,block:Vs,active:Us,products:Ys,product:Gs,button:Ws,image:Xs,info:Js,name:Qs,buttons:Ks,modal:Zs,other:tn,options:en,addButton:sn},jt=u=>{const{buttons:o,setButtons:e,deletable:s=!0,addable:i=!0}=u,[a,c]=h.useState(null),[r,n]=h.useState({top:0,left:0}),[l,x]=h.useState(null),d=h.useRef(null);h.useEffect(()=>{const g=()=>{c(null)};return document.body.addEventListener("click",g),c(null),()=>{c(null),document.body.removeEventListener("click",g)}},[]),h.useEffect(()=>{if(a){const g=[...o].map(_=>_.id===a.id?a:_);e(g)}},[a]),h.useEffect(()=>{if(d.current&&l){const g=d.current.getBoundingClientRect().height,_=window.innerHeight;let p=l.top;p+g>_+window.scrollY-200&&(p=_+window.scrollY-g-200),p<0&&(p=10),n({top:p,left:l.left})}},[d.current,l]);const S=(g,_)=>{g.stopPropagation();const p=g.target.getBoundingClientRect();x({top:p.top+window.scrollY,left:p.left-30}),c(_)};return t.jsxRuntimeExports.jsxs("div",{className:nt.products,children:[t.jsxRuntimeExports.jsx("h5",{className:nt.subtitle,children:"Button Type"}),o.map(g=>t.jsxRuntimeExports.jsxs("div",{className:nt.product,children:[t.jsxRuntimeExports.jsx(t.Select,{onChange:_=>{const T=[...o].map(P=>P.id===g.id?{...g,type:_}:P);e(T)},value:g.type,options:["Primary","Secondary","Tertiary"]}),t.jsxRuntimeExports.jsxs("div",{className:nt.buttons,children:[t.jsxRuntimeExports.jsx(t.Icon,{name:"Sliders",hoverable:!0,width:20,height:20,onClick:_=>{S(_,g)}}),s&&t.jsxRuntimeExports.jsx(t.Icon,{name:"Trash",hoverable:!0,onClick:()=>{const _=o.filter(p=>p.id!==g.id);e(_)},width:20,height:20,fill:"#C12A2A"})]})]},g.id)),a&&t.jsxRuntimeExports.jsx(As,{ref:d,activeButton:a,setActiveButton:c,popupPosition:r}),i&&t.jsxRuntimeExports.jsx("div",{className:nt.addButton,children:t.jsxRuntimeExports.jsxs(t.Button,{withoutHover:!0,className:nt.button,size:"s",onClick:()=>{const g=[...o];g.push({type:"Primary",id:t.v4(),typesText:[],destination:"Go to Page",text:"Button Name",page:"home",openInNewTab:!0}),e(g)},style:{width:"fit-content"},children:[t.jsxRuntimeExports.jsx("span",{children:"Add Option"}),t.jsxRuntimeExports.jsx(t.Icon,{name:"Plus",width:16,height:16})]})})]})},nn=u=>{const{isActiveButtons:o,setIsActiveButtons:e,buttons:s,setButtons:i}=u;return t.jsxRuntimeExports.jsx(t.jsxRuntimeExports.Fragment,{children:t.jsxRuntimeExports.jsxs("div",{className:et.buttonsBlock,children:[t.jsxRuntimeExports.jsxs("div",{className:et.top,children:[t.jsxRuntimeExports.jsx("h3",{className:et.title,children:"Buttons"}),t.jsxRuntimeExports.jsx(t.Switch,{current:o,onChange:a=>e(a)})]}),t.jsxRuntimeExports.jsx(jt,{buttons:s,setButtons:i})]})})},on="_wrapper_m18qi_1",rn="_subtitle_m18qi_7",an="_content_m18qi_14",cn="_range_m18qi_22",ln="_track_m18qi_27",dn="_progress_m18qi_36",un="_dots_m18qi_46",xn="_dot_m18qi_46",mn="_active_m18qi_65",pn="_input_m18qi_77",hn="_countBlock_m18qi_91",_n="_count_m18qi_91",jn="_controls_m18qi_107",gn="_button_m18qi_113",H={wrapper:on,subtitle:rn,content:an,range:cn,track:ln,progress:dn,dots:un,dot:xn,active:mn,input:pn,countBlock:hn,count:_n,controls:jn,button:gn},ut=u=>{const{label:o,min:e=1,max:s=4,step:i=1,count:a,setCount:c}=u,[r,n]=h.useState(!1),l=Array.from({length:(s-e)/i+1}),x=(a-e)/(s-e)*100,d=()=>{a<s&&c(a+i)},S=()=>{a>e&&c(a-i)},g=_=>{const p=e+_*i;c(p)};return t.jsxRuntimeExports.jsxs("div",{className:H.wrapper,children:[o&&t.jsxRuntimeExports.jsx("h5",{className:H.subtitle,children:o}),t.jsxRuntimeExports.jsxs("div",{className:H.content,children:[t.jsxRuntimeExports.jsxs("div",{className:H.range,children:[t.jsxRuntimeExports.jsx("div",{className:H.track}),t.jsxRuntimeExports.jsx("div",{className:H.progress,style:{width:`${x}%`}}),t.jsxRuntimeExports.jsx("div",{className:H.dots,children:l.map((_,p)=>{const T=p<=(a-e)/i;return t.jsxRuntimeExports.jsx("button",{onClick:()=>g(p),className:t.clx(H.dot,{[H.active]:T,[H.inactive]:!T,[H.dragging]:r}),"aria-label":`Set value to ${e+p*i}`},p)})}),t.jsxRuntimeExports.jsx("input",{type:"range",min:e,max:s,step:i,value:a,onChange:_=>c(Number(_.target.value)),onMouseDown:()=>n(!0),onMouseUp:()=>n(!1),onTouchStart:()=>n(!0),onTouchEnd:()=>n(!1),className:H.input})]}),t.jsxRuntimeExports.jsxs("div",{className:H.countBlock,children:[t.jsxRuntimeExports.jsx(t.Input,{type:"number",min:e,max:s,paddingless:!0,onChange:_=>{const p=Number(_);p>s?c(s):p<e?c(e):c(p)},value:String(a)}),t.jsxRuntimeExports.jsxs("div",{className:H.controls,children:[t.jsxRuntimeExports.jsx("button",{onClick:d,disabled:a>=s,className:H.button,"aria-label":"Increment count",children:t.jsxRuntimeExports.jsx(t.Icon,{name:"CaretUp",width:15,height:15})}),t.jsxRuntimeExports.jsx("button",{onClick:S,disabled:a<=e,className:H.button,"aria-label":"Decrement count",children:t.jsxRuntimeExports.jsx(t.Icon,{name:"CaretDown",width:15,height:15})})]})]})]})]})},fn="_title_w64fy_1",bn="_subtitle_w64fy_5",vn="_header_w64fy_12",En="_text_w64fy_13",Rn="_productsBlock_w64fy_14",yn="_top_w64fy_26",In="_itemsBlock_w64fy_35",wn="_typeTexts_w64fy_41",kn="_block_w64fy_48",$n="_active_w64fy_61",Nn="_products_w64fy_14",Cn="_product_w64fy_14",Sn="_button_w64fy_80",Bn="_image_w64fy_91",Tn="_info_w64fy_98",Pn="_name_w64fy_110",An="_buttons_w64fy_114",On="_modal_w64fy_121",qn="_link_w64fy_141",Dn="_modalOptions_w64fy_147",Ln="_addButton_w64fy_159",U={title:fn,subtitle:bn,header:vn,text:En,productsBlock:Rn,top:yn,itemsBlock:In,typeTexts:wn,block:kn,active:$n,products:Nn,product:Cn,button:Sn,image:Bn,info:Tn,name:Pn,buttons:An,modal:On,link:qn,modalOptions:Dn,addButton:Ln},Mn=u=>{const{activeItem:o,setActiveItem:e,popupPosition:s,setIsOpenModal:i,itemsOptions:a}=u,c=a.find(n=>n.id===o.listingId);if(!c)return null;function r(n,l){return n.length>l?`${n.slice(0,l)}...`:n}return t.jsxRuntimeExports.jsxs("div",{className:U.modal,onClick:n=>{n.stopPropagation()},style:{top:`${s.top}px`,left:`${s.left}px`},children:[t.jsxRuntimeExports.jsxs("div",{className:U.top,children:[t.jsxRuntimeExports.jsx("h3",{children:r(c.productData.name,20)}),t.jsxRuntimeExports.jsx(t.Icon,{name:"X",height:20,width:20,hoverable:!0,onClick:()=>{i(!1),e(null)}})]}),t.jsxRuntimeExports.jsx("div",{className:U.modalOptions,children:t.jsxRuntimeExports.jsx(t.ChooseImage,{label:"Put up an attractive image",activeImage:c.productData.images.length>0?c.productData.images[0].cfId:void 0,onChange:n=>{const l={...o,image:n[0]};e(l)}})})]})},Hn=u=>{const{index:o,moveProduct:e,children:s}=u,[,i]=t.useDrop({accept:"product",hover(r){r.index!==o&&(e(r.index,o),r.index=o)}}),[{isDragging:a},c]=t.useDrag({type:"product",item:{index:o},collect:r=>({isDragging:r.isDragging()})});return t.jsxRuntimeExports.jsx("div",{ref:r=>c(i(r)),className:`${U.product} ${a?U.dragging:""}`,children:s})},zn=u=>{const{isActiveItems:o,setIsActiveItems:e,items:s,setItems:i,other:a,title:c,subtitle:r,editable:n=!0,draggable:l=!1,withImage:x=!1,deletable:d=!0,addable:S=!0,itemsType:g,itemsOptions:_}=u,[p,T]=h.useState(null),[P,f]=h.useState({top:0,left:0}),[O,k]=h.useState(!1),$=(R,E)=>{const I=[...s],[q]=I.splice(R,1);I.splice(E,0,q),i(I)};h.useEffect(()=>{const R=()=>{T(null),k(!1)};return document.body.addEventListener("click",R),T(null),k(!1),()=>{T(null),k(!1),document.body.removeEventListener("click",R)}},[]),h.useEffect(()=>{if(p){const R=[...s].map(E=>E.listingId===p.listingId?p:E);i(R)}},[p]);const j=(R,E)=>{R.stopPropagation();const I=R.target.getBoundingClientRect(),q=100,D=window.innerHeight;let F=I.top+window.scrollY;F+q>D&&(F=D-q-20),k(!0),f({top:F-80,left:I.left-30}),T(E)};function v(R){if(x)return R?t.jsxRuntimeExports.jsx("img",{src:`https://imagedelivery.net/${R}/w=1000`,alt:"image",width:16,height:16}):t.jsxRuntimeExports.jsx(t.Icon,{name:"Image",width:16,height:16,fill:"#757575"})}const L=(R,E)=>{const I=_.find(D=>R.listingId===D.id);if(!I)return null;const q=t.jsxRuntimeExports.jsxs(t.jsxRuntimeExports.Fragment,{children:[l&&t.jsxRuntimeExports.jsx("div",{children:t.jsxRuntimeExports.jsx(t.Icon,{name:"DotsSixVertical",hoverable:!0,width:20,height:20})},E),g==="select"&&t.jsxRuntimeExports.jsx(t.Select,{onChange:D=>{const F=[...s],X=_.find(B=>B.productData.name===D);if(!X)return;const Z={listingId:X.id,image:X.productData.images.length>0?X.productData.images[0].cfId:""},b=F.map(B=>B.listingId===R.listingId?Z:B);T(Z),i([...b])},value:I.productData.name,options:[..._.filter(D=>!s.find(F=>F.listingId===D.id)).map(D=>D.productData.name)],leftAddon:v(R.image||I.productData.images.length>0&&I.productData.images[0].cfId||"")},E),t.jsxRuntimeExports.jsxs("div",{className:U.buttons,children:[n&&t.jsxRuntimeExports.jsx(t.Icon,{name:"Sliders",hoverable:!0,width:20,height:20,onClick:D=>j(D,R)}),d&&t.jsxRuntimeExports.jsx(t.Icon,{name:"Trash",hoverable:!0,width:20,height:20,fill:"#C12A2A",onClick:()=>i(s.filter(D=>D!==R))})]})]});return l?t.jsxRuntimeExports.jsx(Hn,{product:R,index:E,moveProduct:$,children:q},R.listingId):t.jsxRuntimeExports.jsx("div",{className:U.product,children:q},R.listingId)};return t.jsxRuntimeExports.jsxs("div",{className:U.productsBlock,children:[(c||o!==void 0)&&t.jsxRuntimeExports.jsxs("div",{className:U.top,children:[c&&t.jsxRuntimeExports.jsx("h3",{className:U.title,children:c}),o!==void 0&&t.jsxRuntimeExports.jsx(t.Switch,{current:o,onChange:R=>e==null?void 0:e(R)})]}),O&&p&&t.jsxRuntimeExports.jsx(Mn,{activeItem:p,setActiveItem:T,setIsOpenModal:k,popupPosition:P,itemsOptions:_}),t.jsxRuntimeExports.jsxs("div",{className:U.products,children:[r&&t.jsxRuntimeExports.jsx("h5",{className:U.subtitle,children:r}),l?t.jsxRuntimeExports.jsx(t.DndProvider,{backend:t.HTML5Backend,children:s.map((R,E)=>L(R,E))}):s.map((R,E)=>L(R,E)),S&&t.jsxRuntimeExports.jsx("div",{className:U.addButton,children:t.jsxRuntimeExports.jsxs(t.Button,{withoutHover:!0,className:U.button,size:"s",onClick:()=>{const R=[...s];for(let E=0;E<_.length;E++)if(!s.find(I=>I.listingId===_[E].id)){R.push({listingId:_[E].id,image:_[E].productData.images.length>0?_[E].productData.images[0].cfId:""});break}i(R)},disabled:s.length===_.length,style:{width:"fit-content"},children:[t.jsxRuntimeExports.jsx("span",{children:"Add Option"}),t.jsxRuntimeExports.jsx(t.Icon,{name:"Plus",width:16,height:16})]})})]}),a!==void 0&&t.jsxRuntimeExports.jsx(dt,{items:a})]})},Fn="_options_jdafm_1",Vn="_price_jdafm_12",Un="_oldPrice_jdafm_19",Yn="_newPrice_jdafm_27",Gn="_animate_jdafm_34",Wn="_appearAndBounce_jdafm_1",Xn="_meta_jdafm_52",Jn="_info_jdafm_58",Qn="_infoRight_jdafm_66",Kn="_buttons_jdafm_73",Zn="_variants_jdafm_80",ti="_variant_jdafm_80",ei="_stock_jdafm_97",si="_variantInfo_jdafm_104",ni="_quantity_jdafm_110",ii="_count_jdafm_117",oi="_focused_jdafm_134",ri="_button_jdafm_73",ai="_activeVariant_jdafm_160",ci="_chargeTypes_jdafm_164",li="_charge_jdafm_164",di="_chargeActive_jdafm_189",ui="_title_jdafm_197",w={options:Fn,price:Vn,oldPrice:Un,newPrice:Yn,animate:Gn,appearAndBounce:Wn,meta:Xn,info:Jn,infoRight:Qn,buttons:Kn,variants:Zn,variant:ti,stock:ei,variantInfo:si,quantity:ni,count:ii,focused:oi,button:ri,activeVariant:ai,chargeTypes:ci,charge:li,chargeActive:di,title:ui};var gt=(u=>(u.ONE_TIME="One-Time",u.RECURRING="Subscribe & Save",u))(gt||{});const xi=u=>{var k,$;const{variants:o}=u,[e,s]=h.useState(o[0]),[i,a]=h.useState(e.chargeTypes[0]),c=t.useNavigate(),[r,n]=h.useState(1),[l,x]=h.useState(!1),{reset:d,addProductToCart:S,getProducts:g}=t.useCart(),[_,p]=h.useState(!1);h.useEffect(()=>{p(!0);const j=setTimeout(()=>p(!1),600);return()=>clearTimeout(j)},[r]);async function T(){await g(),await S({productId:u.id,productVariantId:e.id,quantity:r})}function P(){d(),T(),c("/checkout")}function f(j){if(j>=864e5){const I=Math.floor(j/864e5);return`${I} ${I===1?"day":"days"}`}else if(j>=36e5){const I=Math.floor(j/36e5);return`${I} ${I===1?"hour":"hours"}`}else if(j>=6e4){const I=Math.floor(j/6e4);return`${I} ${I===1?"minute":"minutes"}`}else{const I=Math.floor(j/1e3);return`${I} ${I===1?"second":"seconds"}`}}function O(j,v){return j.length>v?j.slice(0,v)+"...":j}return t.jsxRuntimeExports.jsxs("div",{className:w.options,children:[e.chargeTypes.length>1&&t.jsxRuntimeExports.jsx("div",{className:w.chargeTypes,children:e.chargeTypes.map(j=>t.jsxRuntimeExports.jsx("div",{className:t.clx(w.charge,{[w.chargeActive]:i===j}),onClick:()=>a(j),children:gt[j]},j))}),t.jsxRuntimeExports.jsx("div",{className:w.variants,children:o.map(j=>{var v;return t.jsxRuntimeExports.jsxs("div",{className:t.clx(w.variant,{[w.activeVariant]:e.id===j.id}),onClick:()=>s(j),children:[t.jsxRuntimeExports.jsxs("div",{className:w.variantInfo,children:[t.jsxRuntimeExports.jsx("span",{className:w.title,children:O(j.name,15)}),t.jsxRuntimeExports.jsxs("span",{children:["$",i==="ONE_TIME"?j.price.amount:j.subscriptionSettings?j.subscriptionSettings.price.amount:"Price Not Found"]})]}),t.jsxRuntimeExports.jsx("div",{children:i==="ONE_TIME"&&t.jsxRuntimeExports.jsxs("span",{className:w.stock,children:[((v=j.quantity.restrictions)==null?void 0:v.max)||j.quantity.available||0," in stock"]})})]},j.id)})}),i==="ONE_TIME"&&t.jsxRuntimeExports.jsxs("div",{className:w.quantity,children:[t.jsxRuntimeExports.jsx("button",{onClick:()=>{r>1?n(j=>j-1):n(1)},className:w.button,disabled:e.quantity.restrictions&&r<=e.quantity.restrictions.min,children:t.jsxRuntimeExports.jsx(t.Icon,{name:"Minus"})}),t.jsxRuntimeExports.jsx("label",{className:t.clx(w.count,{[w.focused]:l}),onFocus:()=>x(!0),onBlur:()=>x(!1),children:t.jsxRuntimeExports.jsx(t.Input,{type:"number",value:String(r),onChange:j=>n(Number(j)),max:((k=e.quantity.restrictions)==null?void 0:k.max)||e.quantity.available||1/0,min:(($=e.quantity.restrictions)==null?void 0:$.min)||0,style:{backgroundColor:"transparent",border:"none",textAlign:"center"}})}),t.jsxRuntimeExports.jsx("button",{onClick:()=>{n(j=>j+1)},className:w.button,disabled:!!(e.quantity.restrictions&&r>=e.quantity.restrictions.max||e.quantity.available&&r>=e.quantity.available),children:t.jsxRuntimeExports.jsx(t.Icon,{name:"Plus"})})]}),t.jsxRuntimeExports.jsxs("div",{className:w.meta,children:[t.jsxRuntimeExports.jsxs("div",{className:w.info,children:[t.jsxRuntimeExports.jsx("span",{children:"Delivery"}),t.jsxRuntimeExports.jsxs("div",{className:w.infoRight,children:[t.jsxRuntimeExports.jsx(t.Icon,{name:"Lightning",fill:"#FF3F19",width:20,height:20}),t.jsxRuntimeExports.jsx("span",{children:!e.deliveryTime||e.deliveryTime===0?"Instant":f(e.deliveryTime)})]})]}),t.jsxRuntimeExports.jsxs("div",{className:w.info,children:[t.jsxRuntimeExports.jsx("span",{children:"Price"}),t.jsxRuntimeExports.jsx("div",{className:w.infoRight,children:i==="ONE_TIME"?e.compareAtPrice&&(e.compareAtPrice.amount||0)-(e.price.amount||0)>0?t.jsxRuntimeExports.jsxs("div",{className:w.price,children:[t.jsxRuntimeExports.jsxs("span",{className:t.clx(w.newPrice,{[w.animate]:_}),children:["$ ",(e.price.amount||0)*r]}),t.jsxRuntimeExports.jsxs("span",{className:w.oldPrice,children:["$ ",(e.compareAtPrice.amount||0)*r]})]}):t.jsxRuntimeExports.jsxs("span",{className:t.clx(w.newPrice,{[w.animate]:_}),children:["$ ",(e.price.amount||0)*r]}):e.subscriptionSettings&&e.subscriptionSettings.compareAtPrice&&(e.subscriptionSettings.compareAtPrice.amount||0)-(e.subscriptionSettings.price.amount||0)>0?t.jsxRuntimeExports.jsxs("div",{className:w.price,children:[t.jsxRuntimeExports.jsxs("span",{className:t.clx(w.newPrice,{[w.animate]:_}),children:["$ ",e.subscriptionSettings.price.amount||0]}),t.jsxRuntimeExports.jsxs("span",{className:w.oldPrice,children:["$ ",e.subscriptionSettings.compareAtPrice.amount||0]})]}):e.subscriptionSettings&&t.jsxRuntimeExports.jsxs("span",{className:t.clx(w.newPrice,{[w.animate]:_}),children:["$ ",e.subscriptionSettings.price.amount||0]})})]})]}),t.jsxRuntimeExports.jsxs("div",{className:w.buttons,children:[t.jsxRuntimeExports.jsx(t.Button,{type:"Primary",onClick:()=>P(),children:t.jsxRuntimeExports.jsx("span",{children:i==="ONE_TIME"?"Buy Now":"Subscribe Now"})}),i==="ONE_TIME"&&t.jsxRuntimeExports.jsx(t.Button,{type:"Secondary",onClick:()=>T(),children:"Add to Cart"})]})]})},mi="_button_1861a_1",pi="_login_1861a_14",hi="_signUp_1861a_18",_i="_buttons_1861a_23",ji="_modal_1861a_32",gi="_info_1861a_60",fi="_top_1861a_67",bi="_title_1861a_78",vi="_clear_1861a_84",Ei="_activeClear_1861a_91",Ri="_count_1861a_95",yi="_cart_1861a_110",Ii="_empty_1861a_118",wi="_product_1861a_144",ki="_products_1861a_153",$i="_image_1861a_161",Ni="_productInfo_1861a_167",Ci="_content_1861a_174",Si="_name_1861a_180",Bi="_price_1861a_186",Ti="_productButtons_1861a_192",Pi="_productButton_1861a_192",Ai="_productCount_1861a_212",Oi="_bottom_1861a_228",qi="_subtotal_1861a_236",Di="_block_1861a_244",Li="_shoppingCount_1861a_251",Mi="_total_1861a_271",Hi="_link_1861a_277",zi="_userInfo_1861a_284",C={button:mi,login:pi,signUp:hi,buttons:_i,modal:ji,info:gi,top:fi,title:bi,clear:vi,activeClear:Ei,count:Ri,cart:yi,empty:Ii,product:wi,products:ki,image:$i,productInfo:Ni,content:Ci,name:Si,price:Bi,productButtons:Ti,productButton:Pi,productCount:Ai,bottom:Oi,subtotal:qi,block:Di,shoppingCount:Li,total:Mi,link:Hi,userInfo:zi},Fi="_button_bymeg_1",Vi="_primary_bymeg_19",Ui="_primaryHovered_bymeg_30",Yi="_secondary_bymeg_34",Gi="_secondaryHovered_bymeg_44",Wi="_tertiary_bymeg_48",Xi="_tertiaryHovered_bymeg_58",Ji="_content_bymeg_62",J={button:Fi,primary:Vi,primaryHovered:Ui,secondary:Yi,secondaryHovered:Gi,tertiary:Wi,tertiaryHovered:Xi,content:Ji},lt=u=>{const{children:o,onClick:e,style:s,className:i,disabled:a=!1,type:c="Primary"}=u,{themeSettings:r}=t.useThemeSettingsStore();return t.jsxRuntimeExports.jsx("button",{className:t.clx(J.button,i,{[J.primary]:c==="Primary",[J.secondary]:c==="Secondary",[J.tertiary]:c==="Tertiary",[J.primaryHovered]:c==="Primary"&&!a&&r.buttons.primary.hover,[J.secondaryHovered]:c==="Secondary"&&!a&&r.buttons.secondary.hover,[J.tertiaryHovered]:c==="Tertiary"&&!a&&r.buttons.tertiary.hover}),onClick:e,style:{...s},disabled:a,children:c==="Tertiary"?t.jsxRuntimeExports.jsxs("div",{className:J.content,children:[t.jsxRuntimeExports.jsx(t.Icon,{name:"ArrowRight",fill:"#757575",width:20,height:20}),o]}):t.jsxRuntimeExports.jsx(t.jsxRuntimeExports.Fragment,{children:o})})};class rt extends Error{}rt.prototype.name="InvalidTokenError";function Qi(u){return decodeURIComponent(atob(u).replace(/(.)/g,(o,e)=>{let s=e.charCodeAt(0).toString(16).toUpperCase();return s.length<2&&(s="0"+s),"%"+s}))}function Ki(u){let o=u.replace(/-/g,"+").replace(/_/g,"/");switch(o.length%4){case 0:break;case 2:o+="==";break;case 3:o+="=";break;default:throw new Error("base64 string is not of the correct length")}try{return Qi(o)}catch{return atob(o)}}function Zi(u,o){if(typeof u!="string")throw new rt("Invalid token specified: must be a string");o||(o={});const e=o.header===!0?0:1,s=u.split(".")[e];if(typeof s!="string")throw new rt(`Invalid token specified: missing part #${e+1}`);let i;try{i=Ki(s)}catch(a){throw new rt(`Invalid token specified: invalid base64 for part #${e+1} (${a.message})`)}try{return JSON.parse(i)}catch(a){throw new rt(`Invalid token specified: invalid json for part #${e+1} (${a.message})`)}}const to=u=>{const{shopping:o,signUp:e}=u,s=t.useNavigate();function i(c){s(c)}const a=JSON.parse(localStorage.getItem("token")||"{}");return t.jsxRuntimeExports.jsxs("div",{className:C.buttons,children:[o&&t.jsxRuntimeExports.jsx(ft,{}),!a.data&&t.jsxRuntimeExports.jsx(lt,{onClick:()=>i("/customer-dash"),type:"Secondary",style:{padding:10},children:"Login"}),!a.data&&e&&t.jsxRuntimeExports.jsx(lt,{onClick:()=>i("/customer-dash"),type:"Primary",style:{padding:10},children:"Sign Up"}),a.data&&t.jsxRuntimeExports.jsx(Et,{token:a.data})]})},ft=()=>{const[u,o]=h.useState(!1),[e,s]=h.useState([]),{cart:i,getProducts:a}=t.useCart();function c(x){for(let d=0;d<i.parts.length;d++)for(let S=0;S<x.variants.length;S++)if(i.parts[d].productVariantId===x.variants[d].id)return i.parts[d].productVariantId}function r(x){for(let d=0;d<i.parts.length;d++)for(let S=0;S<x.variants.length;S++)if(i.parts[d].productVariantId===x.variants[d].id)return i.parts[d].quantity}h.useEffect(()=>{(async()=>{const d=i.parts.map(_=>String(_.productId)),g=(await a([...d])).map(_=>({..._,activeVariantId:c(_),quantity:r(_)}));s(g)})()},[i]);function n(x){var d;return!x||!(x!=null&&x.variants)?!1:(d=x.variants.find(S=>S.id===x.activeVariantId))==null?void 0:d.subscriptionSettings}const l=i.parts.length>0&&e.length>0&&!n(e[0]);return t.jsxRuntimeExports.jsxs(t.jsxRuntimeExports.Fragment,{children:[t.jsxRuntimeExports.jsxs("div",{className:C.button,onClick:x=>{x.stopPropagation(),window.location.pathname!=="/admin/builder"&&o(!0)},children:[t.jsxRuntimeExports.jsx(t.Icon,{name:"Handbag",fill:"var(--icon-primary)"}),l&&t.jsxRuntimeExports.jsx("div",{className:C.shoppingCount,children:i.parts.length})]}),u&&t.jsxRuntimeExports.jsx(t.Modal,{close:o,children:t.jsxRuntimeExports.jsx(bt,{activeProducts:e,isCartNotEmpty:l})})]})},bt=u=>{const{activeProducts:o,isCartNotEmpty:e}=u,{cart:s,reset:i,getTotalAndDiscount:a,updateQuantityOfProduct:c}=t.useCart(),r=t.useNavigate();function n(d){r(d)}function l(d){c({productId:d.id,productVariantId:d.activeVariantId,quantity:d.quantity+1})}function x(d){c({productId:d.id,productVariantId:d.activeVariantId,quantity:d.quantity-1})}return t.jsxRuntimeExports.jsxs("div",{className:C.modal,onClick:d=>d.stopPropagation(),children:[t.jsxRuntimeExports.jsxs("div",{className:C.top,children:[t.jsxRuntimeExports.jsxs("div",{className:C.info,children:[t.jsxRuntimeExports.jsx("span",{className:C.title,children:"Cart"}),e&&t.jsxRuntimeExports.jsx("div",{className:C.count,children:s.parts.length})]}),t.jsxRuntimeExports.jsx("button",{className:t.clx(C.clear,{[C.activeClear]:e}),disabled:!e,onClick:()=>i(),children:"Clear all"})]}),e?t.jsxRuntimeExports.jsxs("div",{className:C.cart,children:[t.jsxRuntimeExports.jsx("div",{className:C.products,children:o.map(d=>t.jsxRuntimeExports.jsxs("div",{className:C.product,children:[t.jsxRuntimeExports.jsxs("div",{className:C.productInfo,children:[t.jsxRuntimeExports.jsx("img",{src:`https://imagedelivery.net/${d.images[0].cfId}/w=500`,alt:"image",width:"100%",height:"100%",className:C.image}),t.jsxRuntimeExports.jsxs("div",{className:C.content,children:[t.jsxRuntimeExports.jsx("div",{className:C.name,children:d.name}),t.jsxRuntimeExports.jsxs("div",{className:C.price,children:["$",d.variants.find(S=>S.id===d.activeVariantId).price.amount*((d==null?void 0:d.quantity)||1)]})]})]}),t.jsxRuntimeExports.jsxs("div",{className:C.productButtons,children:[t.jsxRuntimeExports.jsx("div",{onClick:()=>{d.quantity!==1&&x(d)},className:C.productButton,children:t.jsxRuntimeExports.jsx(t.Icon,{name:"Minus",fill:"#757575",width:20,height:20})}),t.jsxRuntimeExports.jsx("div",{className:C.productCount,children:d.quantity}),t.jsxRuntimeExports.jsx("div",{onClick:()=>l(d),className:C.productButton,children:t.jsxRuntimeExports.jsx(t.Icon,{name:"Plus",fill:"#757575",width:20,height:20})})]})]},d.id))}),t.jsxRuntimeExports.jsxs("div",{className:C.bottom,children:[t.jsxRuntimeExports.jsxs("div",{className:C.subtotal,children:[t.jsxRuntimeExports.jsxs("div",{className:C.block,children:[t.jsxRuntimeExports.jsx("span",{children:"Subtotal"}),t.jsxRuntimeExports.jsx(t.Icon,{name:"Info",width:20,height:20,fill:"#757575"})]}),t.jsxRuntimeExports.jsxs("div",{className:C.total,children:["$",a().total]})]}),t.jsxRuntimeExports.jsx(lt,{onClick:()=>n("/checkout"),children:"Checkout"})]})]}):t.jsxRuntimeExports.jsx(vt,{})]})},vt=()=>t.jsxRuntimeExports.jsxs("div",{className:C.empty,children:[t.jsxRuntimeExports.jsx("div",{children:t.jsxRuntimeExports.jsx(t.Icon,{name:"Handbag"})}),t.jsxRuntimeExports.jsx("span",{children:"Your cart is empty"}),t.jsxRuntimeExports.jsxs("span",{children:["Check out the store's products and add them"," ",t.jsxRuntimeExports.jsx("a",{href:"/products",className:C.link,children:"here"})]})]}),Et=({token:u})=>{const[o,e]=h.useState("test-email@gmail.com"),s=t.useNavigate();h.useEffect(()=>{(async()=>{const c=Zi(u);e(c.email)})()},[u]);function i(a){s(a)}return t.jsxRuntimeExports.jsx("div",{className:C.userInfo,onClick:()=>i("/customer-dash"),children:t.jsxRuntimeExports.jsx("div",{children:o||"test-email@gmail.com"})})},eo="_share_11u0d_1",so="_modal_11u0d_8",no="_header_11u0d_14",io="_socials_11u0d_24",oo="_social_11u0d_24",ro="_copy_11u0d_34",ao="_title_11u0d_41",co="_copyWrapper_11u0d_47",lo="_copyText_11u0d_56",K={share:eo,modal:so,header:no,socials:io,social:oo,copy:ro,title:ao,copyWrapper:co,copyText:lo},uo=()=>{const{isOpenModal:u,setIsOpenModal:o}=t.useShareLinkStore();function e(){o(!0)}return t.jsxRuntimeExports.jsxs(t.jsxRuntimeExports.Fragment,{children:[t.jsxRuntimeExports.jsx(t.Button,{className:K.share,onClick:s=>{s.stopPropagation(),e()},type:"Secondary",children:t.jsxRuntimeExports.jsx(t.Icon,{name:"Share",fill:"#757575",hoverable:!0})}),u&&t.jsxRuntimeExports.jsx(t.Modal,{close:o,children:t.jsxRuntimeExports.jsx(xo,{})})]})},xo=()=>{const{setIsOpenModal:u}=t.useShareLinkStore(),{notification:o,setNotification:e}=t.useNotificationStore(),s=window.location.href;function i(){navigator.clipboard.writeText(s),e({message:"Link copied to clipboard",status:"success"})}return t.jsxRuntimeExports.jsxs("div",{className:K.modal,onClick:a=>a.stopPropagation(),children:[t.jsxRuntimeExports.jsxs("div",{className:K.header,children:[t.jsxRuntimeExports.jsx("div",{className:K.title,children:"Share this Post"}),t.jsxRuntimeExports.jsx(t.Icon,{name:"X",fill:"#757575",onClick:()=>u(!1),hoverable:!0})]}),t.jsxRuntimeExports.jsxs("div",{className:K.copyWrapper,children:[t.jsxRuntimeExports.jsx("div",{className:t.clx(K.copy,K.copyText),onClick:i,children:s}),t.jsxRuntimeExports.jsx("div",{onClick:i,className:K.copy,children:o?t.jsxRuntimeExports.jsx(t.Icon,{name:"Check"}):t.jsxRuntimeExports.jsx(t.Icon,{name:"Copy"})})]})]})},mo="_accordion_1s1lq_1",po="_header_1s1lq_9",ho="_icon_1s1lq_18",_o="_open_1s1lq_21",jo="_content_1s1lq_25",ot={accordion:mo,header:po,icon:ho,open:_o,content:jo},go=({title:u,content:o})=>{const[e,s]=h.useState(!1),[i,a]=h.useState(0),c=h.useRef(null),r=()=>{s(!e)};return h.useEffect(()=>{c.current&&a(e?c.current.scrollHeight:0)},[e]),t.jsxRuntimeExports.jsxs("div",{className:ot.accordion,children:[t.jsxRuntimeExports.jsxs("div",{className:ot.header,onClick:r,children:[t.jsxRuntimeExports.jsx("h5",{id:"h5",children:u}),t.jsxRuntimeExports.jsx("div",{className:t.clx(ot.icon,{[ot.open]:e}),children:t.jsxRuntimeExports.jsx(t.Icon,{name:"CaretDown"})})]}),t.jsxRuntimeExports.jsx("div",{ref:c,className:ot.content,style:{height:`${i}px`},children:t.jsxRuntimeExports.jsx("p",{id:"p",children:o})})]})},fo="_wrapper_1r14x_1",bo="_label_1r14x_9",vo="_input_1r14x_18",Eo="_required_1r14x_35",Ro="_paddingless_1r14x_39",yo="_content_1r14x_43",Io="_borderless_1r14x_58",wo="_rightIcon_1r14x_63",Q={wrapper:fo,label:bo,input:vo,required:Eo,paddingless:Ro,content:yo,borderless:Io,rightIcon:wo},ko=u=>{const{onChange:o,style:e,label:s,value:i,type:a,min:c,max:r,placeholder:n,disabled:l=!1,required:x=!1,regex:d,paddingless:S=!1,borderless:g=!1,editable:_=!1,isSearch:p=!1}=u,{themeSettings:T}=t.useThemeSettingsStore(),{inputs:P}=T,[f,O]=h.useState(!1);function k(v,L){if(v.startsWith("#")){let I,q,D;return v.length===7?(I=parseInt(v.slice(1,3),16),q=parseInt(v.slice(3,5),16),D=parseInt(v.slice(5,7),16)):v.length===4&&(I=parseInt(v[1]+v[1],16),q=parseInt(v[2]+v[2],16),D=parseInt(v[3]+v[3],16)),`rgba(${I}, ${q}, ${D}, ${L})`}const E={black:"#000000",white:"#ffffff",red:"#ff0000",green:"#00ff00",blue:"#0000ff"}[v.toLowerCase()];return E?k(E,L):v}function $(v){return Number(v)<0?String(c):v}function j(v){return!x||!d?!0:new RegExp(d).test(v)}return t.jsxRuntimeExports.jsxs("div",{className:Q.wrapper,children:[s&&t.jsxRuntimeExports.jsx("label",{className:Q.label,htmlFor:s,children:s}),t.jsxRuntimeExports.jsxs("div",{className:Q.content,style:{paddingRight:P.general.height+15,...e,backgroundColor:k(P.field.color,P.field.opacity/100)},children:[t.jsxRuntimeExports.jsx("input",{id:s,type:a||"text",onChange:v=>{if(a==="text")o(v.target.value);else{const L=$(v.target.value);o(L)}},value:i,autoComplete:"off",placeholder:n||"Type something...",className:t.clx(Q.input,{[Q.required]:f&&x&&!j(i),[Q.paddingless]:S,[Q.borderless]:g}),min:a==="number"?c:void 0,max:a==="number"?r:void 0,disabled:l,onFocus:()=>O(!0)}),p&&t.jsxRuntimeExports.jsx("div",{className:Q.rightIcon,children:t.jsxRuntimeExports.jsx(t.Icon,{name:"MagnifyingGlass",fill:"var(--icon-secondary)",width:P.general.height,height:P.general.height})}),_&&t.jsxRuntimeExports.jsx("div",{children:t.jsxRuntimeExports.jsx(t.Icon,{name:"Sliders",width:20,height:20,hoverable:!0})})]})]})},$o="_wrapper_st58d_1",No="_label_st58d_10",Co="_textarea_st58d_18",So="_length_st58d_33",ct={wrapper:$o,label:No,textarea:Co,length:So},Bo=u=>{const{onChange:o,label:e,value:s,maxLength:i,placeholder:a="Type something..."}=u,[c,r]=h.useState(s.length);return t.jsxRuntimeExports.jsxs("div",{className:ct.wrapper,children:[e&&t.jsxRuntimeExports.jsx("label",{className:ct.label,htmlFor:e,children:e}),t.jsxRuntimeExports.jsx("textarea",{id:e,defaultValue:s,onChange:n=>{r(n.target.value.length),o(n.target.value)},placeholder:a,className:ct.textarea,maxLength:i}),i&&t.jsxRuntimeExports.jsxs("div",{className:ct.length,children:[c,"/",i]})]})};exports.ChooseImage=t.ChooseImage;exports.ChooseImageModal=t.ChooseImageModal;exports.Icon=t.Icon;exports.InputSettings=t.Input;exports.Loader=t.Loader;exports.Modal=t.Modal;exports.Select=t.Select;exports.Switch=t.Switch;exports.TextareaSettings=t.Textarea;exports.Accordion=go;exports.Button=lt;exports.ButtonTypeSettings=jt;exports.ButtonsSettings=nn;exports.CategorySettings=ze;exports.EmptyCart=vt;exports.FormSettings=ms;exports.HeaderButtons=to;exports.InputUI=ko;exports.ItemsSettings=_t;exports.LayoutSettings=Ot;exports.ListingSelector=zn;exports.ProductOptions=xi;exports.RangeSelector=ut;exports.ShareLink=uo;exports.ShoppingButton=ft;exports.ShoppingModalCart=bt;exports.TextSettings=ht;exports.TextareaUI=Bo;exports.TypesText=pt;exports.UserInfo=Et;