1import{ax as Oe,j as e,C as te,c as Zs,r as o,ix as ce,cl as As,Q as ue,iy as en,X as re,f as Q,L as B,O as sn,cr as nn,g4 as ms,gO as tn,T as zs,da as an,B as ee,b8 as gs,b9 as xs,ba as fs,bb as _s,gq as Ys,a as Je,iD as rn,iE as on,cu as _e,o as rs,cb as ln,S as dn,iF as He,am as ae,d7 as cn,iz as un,iA as pn,cm as mn,iG as hn,u as gn,cc as xn,cv as fn,cw as _n,aj as bn,b as yn,k as jn,s as wn,iB as Nn,iH as vn,iI as Sn,iJ as Ae,iK as En,iL as us,iM as Tn,iN as Os,iO as Ls,iP as Pn,iQ as An,d9 as On,iR as Ln,iS as Rs,iT as Rn,iU as kn,iV as Mn}from"./index-CSsSX63M.js";import{I as Cn,b as ks}from"./index.esm-CMnhGGSA.js";import{I as In}from"./index-C25TRM0g.js";import{C as Dn,S as Un}from"./index-4R5x04BL.js";import{A as Bn}from"./AttentionBadge-DYeBlJQH.js";import{D as W}from"./Dropdown-COFT23os.js";import{A as Fn,R as zn,L as Yn,P as Gn,S as $n,a as Hn}from"./onBoardingNav-C81Bx2IE.js";import{P as Vn}from"./ProfileDropdown-C1TktjOS.js";import{D as qn}from"./DonutChart-Dy7QJzM9.js";import{O as Wn}from"./index-DLgCE1Ik.js";import{M as Kn}from"./index-CNfVor-1.js";import{c as Ms}from"./images-Ez3P7N8A.js";import{O as bs,T as ys}from"./OverlayTrigger-DxqfTLm5.js";import{P as Qe}from"./ProgressBar-C7iebRn3.js";import{M as Qn}from"./index-CoQnQyhO.js";import{a as Xn,b as Jn}from"./avatar-4-D1LwJboU.js";import{p as Zn}from"./logo_sm_dark-B9XQwqsz.js";import{b as hs,M as as}from"./svg-CBLdkDeT.js";import{w as et}from"./warning-BsB5KLaF.js";import{u as st}from"./useTrackingEvent-CZE6ns7p.js";import{T as nt}from"./index-Bftiscn9.js";import tt from"./ComingSoonModal-jJ54CAsc.js";import{A as at}from"./index-B0w0HGIF.js";import{C as rt}from"./CheckCircleRounded-HIXbJ7Eg.js";import ot from"./WhatsNextMain-Bx3_vWdx.js";import{O as lt}from"./pages-B3-bJj2T.js";import{O as Cs,U as it}from"./constants-Ccg3lbrR.js";import{K as dt}from"./KeyboardArrowDown-DrRggBNC.js";import{K as ct}from"./KeyboardArrowUp-C5BNwBcQ.js";import{F as ut}from"./FileUploadOutlined-BlVBm5Tr.js";import"./iconBase-B6Dn8B-F.js";import"./SSRProvider-Bmat4lxH.js";import"./NavContext-DA5l1Ihg.js";import"./mergeOptionsWithPopperConfig-Kl50-gi5.js";import"./useIsomorphicEffect-DOgrT-SO.js";import"./InputGroupContext-Dv2-VhGw.js";import"./NavbarContext-QfppLQS8.js";import"./emailDetachStore-CxRF9eEy.js";import"./useDisclosure-DT84dvQG.js";import"./useTimeout-DMefeYIR.js";import"./Close-BnG70QDi.js";const pt=Oe(e.jsx("path",{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2m0 16H5V5h14zM7 10h2v7H7zm4-3h2v10h-2zm4 6h2v4h-2z"}),"AssessmentOutlined"),mt=Oe(e.jsx("path",{d:"M11 15h2v2h-2zm0-8h2v6h-2zm.99-5C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2M12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8"}),"ErrorOutline"),ht=Oe(e.jsx("path",{d:"M3 11h8V3H3zm2-6h4v4H5zM3 21h8v-8H3zm2-6h4v4H5zm8-12v8h8V3zm6 6h-4V5h4zm0 10h2v2h-2zm-6-6h2v2h-2zm2 2h2v2h-2zm-2 2h2v2h-2zm2 2h2v2h-2zm2-2h2v2h-2zm0-4h2v2h-2zm2 2h2v2h-2z"}),"QrCode"),gt=Oe(e.jsx("path",{d:"M1.41 1.13 0 2.54l4.39 4.39 2.21 4.66-1.35 2.45c-.16.28-.25.61-.25.96 0 1.1.9 2 2 2h7.46l1.38 1.38c-.5.36-.83.95-.83 1.62 0 1.1.89 2 1.99 2 .67 0 1.26-.33 1.62-.84L21.46 24l1.41-1.41zM7 15l1.1-2h2.36l2 2zM20 4H7.12l2 2h9.19l-2.76 5h-1.44l1.94 1.94c.54-.14.99-.49 1.25-.97l3.58-6.49C21.25 4.82 20.76 4 20 4M7 18c-1.1 0-1.99.9-1.99 2S5.9 22 7 22s2-.9 2-2-.9-2-2-2"}),"RemoveShoppingCartOutlined"),Ve=Oe(e.jsx("path",{d:"M18 6h-2c0-2.21-1.79-4-4-4S8 3.79 8 6H6c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2m-6-2c1.1 0 2 .9 2 2h-4c0-1.1.9-2 2-2m6 16H6V8h2v2c0 .55.45 1 1 1s1-.45 1-1V8h4v2c0 .55.45 1 1 1s1-.45 1-1V8h2z"}),"ShoppingBagOutlined"),Is=Oe(e.jsx("path",{d:"m22 9.24-7.19-.62L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21 12 17.27 18.18 21l-1.63-7.03zM12 15.4l-3.76 2.27 1-4.28-3.32-2.88 4.38-.38L12 6.1l1.71 4.04 4.38.38-3.32 2.88 1 4.28z"}),"StarBorderOutlined"),xt="/assets/notifcation-icon-small-C-XHm2mN.svg",ft="/assets/lazada-notification-v4fcYE4o.png",_t="/assets/shopee-notification-CP16W0qZ.png",bt="/assets/announcements-notification-BJ_sFelL.png",yt="/assets/cdd-notification-icon-Dr42bEG4.png",jt="/assets/blog-notification-icon-CkcwLUzu.png",wt="/assets/order-scheduling-notification-icon-Djw7UMuh.png",ps={maxHeight:"300px",display:"none"},Nt={maxHeight:"300px"},vt=r=>{var Ie,De,je,ns,ts,me,he,Ue,Be,Fe;const{storeID:t}=r,{storeDetails:p}=te(s=>s.account),f=Zs(),[d,E]=o.useState([]),[l,_]=o.useState([]),[a,g]=o.useState(!1),[w,x]=o.use
1State(""),[C,b]=o.useState(!1),[I,D]=o.useState(null),[k,U]=o.useState(10),[F,z]=o.useState(!0),{data:y,isFetching:v}=ce.useGetAllNotification({storeId:t,searchValue:"",limit:k||10}),{data:P}=ce.useAllNotifications({searchValue:"",limit:k||10}),{data:A}=ce.useGetUnreadNotificationRequest(t),{data:Y}=ce.useGetAllUnReadNotificationRequest(t),se=parseInt((A==null?void 0:A.data_count)||0)+parseInt((Y==null?void 0:Y.length)||0),{data:G,isFetched:O}=In.useGetAllPlatforms(),pe=O?((De=(Ie=G==null?void 0:G.data)==null?void 0:Ie.data)==null?void 0:De.active_platforms.some(s=>s.platform==="lazada"))&&As(p.payPlanType):!1,be=O?((ns=(je=G==null?void 0:G.data)==null?void 0:je.data)==null?void 0:ns.active_platforms.some(s=>s.platform==="shopee"))&&As(p.payPlanType):!1,V=ce.useUpdateNotification({onSuccess:()=>{},onError:s=>{ue(!1,"",s.message)}}),c=ce.useUpdateNotificationRead({onSuccess:s=>{ue(!0,"",s)},onError:s=>{ue(!1,"",s.message)}}),X=ce.useMarkAllRead({onSuccess:s=>{ue(!0,"",s)},onError:s=>{ue(!1,"",s.message)}}),K=ce.useMarkAllNotificationRead({onSuccess:s=>{ue(!0,"",s)},onError:s=>{ue(!1,"",s.message)}});o.useEffect(()=>{if(y!=null&&y.length||P!=null&&P.length){const s=en(y,P),j=Ce(s);E(j),_(y)}},[y,P]);const[oe,ye]=o.useState(!1),[Le,ne]=o.useState(ps),Re=()=>{ye(!oe),ne(Le===ps?Nt:ps)},os=s=>({"A minutes ago":"A minutes ago","2-59 minutes ago":"2-59 minutes ago","An hour ago":"An hour ago","2-23 hours ago":"2-23 hours ago",Yesterday:"Yesterday","2-6 days ago":"2-6 days ago","A week ago":"A week ago","2-8 weeks ago":"2-8 weeks ago"})[s]||s,le=s=>{var j,h,i;switch((j=s==null?void 0:s.event_type)==null?void 0:j.toLowerCase()){case"new_order":return s.event_str;case"cancelled_order":return s.event_str;case"expiring_addon":return s.message;case"completed_order":return s.event_str;case"updated_order":return s.event_str;case"new_inquiry":return"New customer inquiry. Check your email.";case"new_lead":return"New Lead Registered";case"new_qr_order":return"New Order via QR Menu";case"failed_payment_charge":return`Cancelled ${tn((h=s==null?void 0:s.metadata)==null?void 0:h.app_key)} Subscription.`;case"new_reply":return"New Reply on Product Review";case"new_review":return"New Product Review";case"scheduled_digest":return((i=s==null?void 0:s.metadata)==null?void 0:i.title)||(s==null?void 0:s.message)||"Your scheduled report";case"idle_carts":return(s==null?void 0:s.message)||"You have idle carts";case"cart_reminder_issue":return(s==null?void 0:s.message)||"Automatic cart reminders are not sending"}},ke=s=>{var j;switch((j=s==null?void 0:s.event_type)==null?void 0:j.toLowerCase()){case"new_order":return!0;case"NEW_ORDER":return!0;case"cancelled_order":return!0;case"completed_order":return!0;case"new_lead":return!1;default:return!1}},ls=s=>{var j,h,i,L,N,M,J;switch((j=s==null?void 0:s.event_type)==null?void 0:j.toLowerCase()){case"new_order":return(s==null?void 0:s.event_str)==="Pending Delivery"?e.jsx(ms,{}):e.jsx(Ve,{});case"NEW_ORDER":return(s==null?void 0:s.event_str)==="Pending Delivery"?e.jsx(ms,{}):e.jsx(Ve,{});case"cancelled_order":return e.jsx(Ve,{});case"new_lead":return e.jsx(Fn,{style:{color:"#000"}});case"expiring_addon":if(((h=s.metadata)==null?void 0:h.app_key)==="announcements")return e.jsx("img",{src:bt,width:25,height:25});if(((i=s.metadata)==null?void 0:i.app_key)==="lazada")return e.jsx("img",{src:ft,width:25,height:25});if(((L=s.metadata)==null?void 0:L.app_key)==="shopee")return e.jsx("img",{src:_t,width:25,height:25});if(((N=s.metadata)==null?void 0:N.app_key)==="customDeliveryDate")return e.jsx("img",{src:yt,width:25,height:25});if(((M=s.metadata)==null?void 0:M.app_key)==="blogs")return e.jsx("img",{src:jt,width:25,height:25});if(((J=s.metadata)==null?void 0:J.app_key)==="order-scheduling")return e.jsx("img",{src:wt,width:25,height:25});break;case"completed_order":return e.jsx(Ve,{});case"updated_order":return e.jsx(Ve,{});case"new_inquiry":return e.jsx("img",{src:xt,width:36,height:36});case"new_qr_order":return e.jsx(ht,{});case"failed_payment_charge":return e.jsx(mt,{style:{color:"#FF4D4F",fontSize:"36px"}});case"new_review":return e.jsx(Is,{style:{color:"#ffffff",backgroundColor:"#FFBF00",borderRadius:"50%",padding:"4px",width:"36px",height:"36px"}});case"new_reply":return e.jsx(Is,{style:{color:"#ffffff",backgroundColor:"#FFBF00",borderRadius:"50%",padding:"4px",width:"36px",height:"36px"}});case"scheduled_digest":return e.jsx(pt,{style:{color:"#ffffff",backgroundColor:"#6d28d9",borderRadius:"50%",padding:"4px",width:"36px",height:"36px"}});case"idle_carts":return e.jsx(gt,{style:{color:"#ffffff",backgroundColor:"#000000",borderRadius:"50%",padding:"4px",width:"36px",height:"36px"}});case"cart_reminder_issue":return e.jsx(Bn,{size:36})}}
1,Ze=s=>{if(s.event_type==="NEW_LEAD")return"";const j=s==null?void 0:s.customer_name;return j==="N/A N/A"||j==="N/A"?"":j?`from ${j}`:""},Me=s=>{var h;const j=(h=s==null?void 0:s.store_locations)!=null&&h.length?s==null?void 0:s.store_locations[0].location_name:"";return j?e.jsxs("span",{className:"d-block fw-normal",children:["[",j,"]"]}):""},es=({notification:s})=>{var h,i,L;const j=()=>{var N,M,J;if(s.event_str==="Pending Delivery"&&((N=s==null?void 0:s.metadata)!=null&&N.pending_num_of_days)){const we=((M=s==null?void 0:s.metadata)==null?void 0:M.pending_num_of_days)>1?"days":"day";return"Orders due in "+((J=s==null?void 0:s.metadata)==null?void 0:J.pending_num_of_days)+" "+we}return""};return e.jsx(e.Fragment,{children:e.jsx(sn.Body,{className:"p-2",children:e.jsxs("div",{className:"d-flex align-items-center",children:[e.jsx("div",{className:"flex-shrink-0",children:e.jsx("div",{className:re("notify-icon",s.event_type&&"bg-"+s.event_type.toLowerCase(),s.event_str==="Pending Delivery"&&"bg_pending_delivery"),children:ls(s)})}),e.jsxs("div",{className:"flex-grow-1 ms-2",title:le(s),children:[e.jsxs("h5",{className:"noti-item-title fw-semibold font-12 mb-0",children:[le(s)," ",Ze(s),Me(s),ke(s)&&(pe||be?(h=s==null?void 0:s.metadata)!=null&&h.order_origin?`from ${nn.capitalize((i=s==null?void 0:s.metadata)==null?void 0:i.order_origin)}`:"from Prosperna":null),e.jsx("span",{className:"font-12 ",children:j()})]}),((L=s==null?void 0:s.event_type)==null?void 0:L.toLowerCase())==="scheduled_digest"&&(s==null?void 0:s.message)&&e.jsx("p",{className:"fw-normal font-11 text-muted mb-0",children:s.message}),e.jsx("div",{children:s.updatedAt&&e.jsx("small",{className:"fw-normal text-muted font-11",children:os(s.timeLabel)})})]})]})})})},ss=(s,j,h,i,L,N)=>{const M=window.location.pathname,J=M.includes("/home/customer-orders/view/"),we=i!=="new_inquiry"&&i!=="expiring_addon"&&i!=="failed_payment_charge"&&i!=="scheduled_digest";if(J&&we&&M.includes(s)){ue(!0,"","You are already viewing this order");return}if(J&&we&&!M.includes(s)){const ze=document.querySelector("[data-has-unsaved-changes]");if((ze==null?void 0:ze.getAttribute("data-has-unsaved-changes"))==="true"){const de=new CustomEvent("showUnsavedDialog",{detail:{type:"link",href:`/home/customer-orders/view/${s}`}});document.dispatchEvent(de);return}}const H={is_read:!0,notification_ids:[h]},ie={selected_notification_ids:[h]};j||(i==="new_inquiry"||i==="new_reply"||i==="new_review"?c.mutate(ie):V.mutate(H)),i==="new_inquiry"?f(`home/lead-profile/${s}`):i==="expiring_addon"?f("home/notifications"):i==="failed_payment_charge"?(x(L),g(!0)):i==="new_reply"?f(`/home/product-reviews/${s}`):i==="new_review"?f(`/home/product-reviews/${s}`):i==="NEW_LEAD"||i==="new_lead"?f(`/home/lead-profile/${s}`):i==="idle_carts"?f("/home/abandoned-carts"):i==="cart_reminder_issue"?f("/home/abandoned-carts",{state:{openScheduled:"automatic"}}):i==="scheduled_digest"?(D(N),b(!0)):f(`/home/customer-orders/view/${s}`)},is=()=>{z(!1),setTimeout(()=>{const s=parseInt(k)+10;(l==null?void 0:l.length)===k?(U(s),z(!0)):z(!1)},500)},Ce=s=>{const j=new Date,h={NEW:[],EARLIER:[]};return s==null||s.forEach(i=>{const L=new Date(i.createdAt),N=Math.floor((j-L)/1e3);N<=60?h.NEW.push({...i,timeLabel:"A minute ago"}):N<=3540?h.NEW.push({...i,timeLabel:`${Math.floor(N/60)} ${Math.floor(N/60)===1?"minute":"minutes"} ago`}):N<=3600?h.NEW.push({...i,timeLabel:"An hour ago"}):N<=1380*60?h.NEW.push({...i,timeLabel:`${Math.floor(N/3600)} ${Math.floor(N/3600)===1?"hour":"hours"} ago`}):N<=1440*60?h.EARLIER.push({...i,timeLabel:"Yesterday"}):N<=8640*60?h.EARLIER.push({...i,timeLabel:`${Math.floor(N/(1440*60))} ${Math.floor(N/(1440*60))===1?"day":"days"} ago`}):N<=10080*60?h.EARLIER.push({...i,timeLabel:"A week ago"}):N<=1344*60*60&&h.EARLIER.push({...i,timeLabel:`${Math.floor(N/(10080*60))} ${Math.floor(N/(10080*60))===1?"week":"weeks"} ago`})}),h},m=()=>{X.mutate(t),K.mutate()};return e.jsxs(e.Fragment,{children:[e.jsxs(W,{show:oe,onToggle:Re,children:[e.jsxs(W.Toggle,{variant:"link",id:"dropdown-notification",onClick:Re,className:"nav-link dropdown-toggle arrow-none text-black",children:[e.jsx("i",{className:"mdi mdi-bell-outline noti-icon"}),se>0?e.jsx("span",{className:"position-absolute translate-middle bg-danger cart-badge text-white text-xs",style:{left:"22px",top:"25px"},children:se}):null]}),e.jsx(W.Menu,{align:"end",className:"dropdown-menu-animated dropdown-lg",children:e.jsxs("div",{onClick:Re,children:[e.jsx("div",{className:"dropdown-item noti-title px-3",children:e.jsxs("h5",{className:"m-0",children:[e.jsx("span",{className:"float-end cursor-pointer text-primary",onClick:m,children:e.jsx("small",{className:"fw-normal",children:"Mark all as read"})}),"Notification Center"]})}),e.jsx("div",{id:"scrollableDiv",className:"px-3 notification-dropdown-wrap",children:e.jsxs(Cn,{dataLength:y.length?y.length:0,next:is,hasMore:F,loader:e.jsx("div",{className:"text-center",children:e.jsx("i",{className:"mdi mdi-dots-circle mdi-spin text-muted h3 mt-0"})}),scrollableTarget:"scrollableDiv",scrollThreshold:.98,children:[(ts=d==null?void 0:d.NEW)!=null&&ts.length?e.jsx("h5",{className:"font-14 fw-semibold mt-0",children:"New"}):null,(me=d==null?void 0:d.NEW)==null?void 0:me.map((s,j)=>e.jsx(W.Item,{className:re("p-0 notify-item card shadow-none mb-2",s.is_read?"read-noti":"unread-noti"),onClick:()=>{var h,i,L;return ss(s.order_id??((h=s.metadata)==null?void 0:h.order_id)??((i=s.metadata)==null?void 0:i.review_id),s.is_read,s.id,s.event_type,(L=s==null?void 0:s.metadata)==null?void 0:L.app_key,s)},children:e.jsx(es,{notification:s})},j+"-noti")),(he=d==null?void 0:d.EARLIER)!=null&&he.length?e.jsx("h5",{className:"font-14 fw-semibold mt-0",children:"Earlier"}
1):null,(Ue=d==null?void 0:d.EARLIER)==null?void 0:Ue.map((s,j)=>e.jsx(W.Item,{className:re("p-0 notify-item card shadow-none mb-2",s.is_read?"read-noti":"unread-noti"),onClick:()=>{var h;return ss(s.order_id,s.is_read,s.id,s.event_type,(h=s==null?void 0:s.metadata)==null?void 0:h.app_key,s)},children:e.jsx(es,{notification:s})},j+"-noti"))]})}),v?e.jsx("div",{className:"text-center",children:e.jsx("i",{className:"mdi mdi-dots-circle mdi-spin text-muted h3 mt-0"})}):null,e.jsx(W.Item,{as:B,className:"text-center text-primary notify-item border-top border-light py-2 text-reset",to:(Fe=(Be=Q)==null?void 0:Be.notifications)==null?void 0:Fe.fullPath,children:"View All"})]})})]}),e.jsx(Dn,{addonName:w,showModal:a,setShowModal:g}),e.jsx(Un,{notification:I,showModal:C,setShowModal:b})]})},St=()=>{var U,F,z,y,v,P,A,Y,se,G,O,pe,be,V;const{storeDetails:r}=te(c=>c.account),{data:t}=zs.useBillingUsageDetails(),{payPlanType:p}=r,[f,d]=o.useState(!1),{data:E}=Wn.useGetOrdersSyncReport(),{data:l}=Kn.useGetStorageMeter(),_=()=>{d(!f)},a=an(p),g=a==="FREE"?1:a==="LAUNCH"?2:a==="GROW"?5:9999,w=(F=(U=l==null?void 0:l.additional_stats)==null?void 0:U.total_consumed)==null?void 0:F.mb,x=(y=(z=l==null?void 0:l.additional_stats)==null?void 0:z.store_allocation)==null?void 0:y.mb;function C(c,X){X=Math.abs(X);const K=c/X*100;return Math.round(K*100)/100}const b=C(w,x),I=((v=t==null?void 0:t.products)==null?void 0:v.overall_publish_limit)===-1?0:((P=t==null?void 0:t.products)==null?void 0:P.current_published_count)/((A=t==null?void 0:t.products)==null?void 0:A.overall_publish_limit)*100,D=((Y=t==null?void 0:t.users)==null?void 0:Y.total_users)||1,k=((se=t==null?void 0:t.users)==null?void 0:se.p1_users)===-1?0:D/g*100;return e.jsxs(W,{show:f,onToggle:_,children:[e.jsx(W.Toggle,{variant:"link",id:"dropdown-notification",as:B,to:"#",onClick:_,className:"nav-link dropdown-toggle arrow-none text-black","data-testid":"donut",children:e.jsx("div",{children:f?e.jsx("span",{className:"noti-icon",children:e.jsx(ks,{size:"1.4em"})}):e.jsx(bs,{placement:"bottom",delay:{show:250,hide:400},overlay:e.jsx(ys,{id:"button-tooltip",children:"Account Usage"}),children:e.jsx("span",{className:"noti-icon",children:e.jsx(ks,{size:"1.4em"})})})})}),e.jsxs(W.Menu,{align:"end",className:"dropdown-menu-animated dropdown-lg",children:[e.jsxs("div",{className:"px-3 d-flex my-2 gap-2",children:[e.jsxs("div",{className:"w-100",children:[e.jsxs("div",{className:"d-flex justify-content-between me-2 fw-medium text-black",children:[e.jsx("span",{children:"Products"}),((G=t==null?void 0:t.products)==null?void 0:G.overall_publish_limit)>0?e.jsxs("span",{children:[(O=t==null?void 0:t.products)==null?void 0:O.current_published_count," /"," ",(pe=t==null?void 0:t.products)==null?void 0:pe.overall_publish_limit]}
1):"Unlimited"]}),e.jsx(Qe,{now:`${I}`,variant:"secondary",className:"my-auto"})]}),I>=80?e.jsx(B,{to:"/home/billing/my-plan",className:"text-reset",children:e.jsx(ee,{variant:"secondary",children:"Upgrade"})}):null]}),e.jsxs("div",{className:"px-3 d-flex my-2 gap-2",children:[e.jsxs("div",{className:"w-100",children:[e.jsxs("div",{className:"d-flex justify-content-between me-2 fw-medium text-black",children:[e.jsx("span",{children:"Users"}),g<9999?e.jsxs("span",{children:[(be=t==null?void 0:t.users)==null?void 0:be.total_users," / ",g]}):"Unlimited"]}),e.jsx(Qe,{now:`${k}`,variant:"secondary"})]}),k>=80?e.jsx(B,{to:"/home/billing/my-plan",className:"text-reset",children:e.jsx(ee,{variant:"secondary",children:"Upgrade"})}):null]}),e.jsxs("div",{className:"px-1 d-flex my-2 gap-2 align-items-center",children:[e.jsx("div",{className:"p-1",children:e.jsx(qn,{percent:b,size:30,color:b>80?"#d90429":"#007bff"})}),e.jsxs("div",{className:"w-100",children:[e.jsxs("div",{className:"d-flex justify-content-between me-2 fw-medium text-black",children:[e.jsx("span",{children:"Storage Usage"}),e.jsx("span",{children:e.jsxs("span",{children:[Ms(l==null?void 0:l.used_space),"/"," ",Ms(l==null?void 0:l.storage_per_plan)]})})]}),e.jsx(Qe,{now:b,variant:"warning",className:"progress-lg",min:0})]}),b>=80?e.jsx(B,{to:"/home/billing/my-plan",className:"text-reset",children:e.jsx(ee,{variant:"secondary",children:"Upgrade"})}):null]}),E&&((V=E==null?void 0:E.report_contents)==null?void 0:V.map(c=>e.jsxs("div",{className:"px-3 d-flex my-2 gap-2 align-items-center",children:[e.jsxs("div",{className:"w-100",children:[e.jsxs("div",{className:"d-flex justify-content-between me-2 fw-medium text-black",children:[e.jsxs("span",{children:["Orders Synced (",e.jsx("span",{className:"text-capitalize",children:c==null?void 0:c.channel}),")"]}),c!=null&&c.is_unlimited?e.jsx("span",{children:"Unlimited"}):e.jsxs("span",{children:[c==null?void 0:c.synced_count,"/",c==null?void 0:c.allocation]})]}),e.jsx(Qe,{now:c!=null&&c.is_unlimited?100:c==null?void 0:c.synced_percentage,className:`progress-lg ${c==null?void 0:c.channel}__bar`,min:0})]}),(c==null?void 0:c.synced_percentage)>=80?e.jsx(B,{to:`/home/marketplace/marketplace-${c==null?void 0:c.channel}-integration`,className:"text-reset usage-btn",children:e.jsx(ee,{variant:"secondary",children:"Upgrade"})}):null]},c==null?void 0:c.channel)))]})]})},Et="/assets/logo_sm-B752gUKC.png",Tt="/assets/logo-light-CZKqDkQm.png";var qe={},Ds;function Pt(){if(Ds)return qe;Ds=1;var r=gs();Object.defineProperty(qe,"__esModule",{value:!0}),qe.default=void 0;var t=r(xs()),p=fs();return qe.default=(0,t.default)((0,p.jsx)("path",{d:"M19 19H5V5h7V3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2v-7h-2zM14 3v2h3.59l-9.83 9.83 1.41 1.41L19 6.41V10h2V3z"}),"Launch"),qe}var At=Pt();const Ot=_s(At);var We={},Us;function Lt(){if(Us)return We;Us=1;var r=gs();Object.defineProperty(We,"__esModule",{value:!0}),We.default=void 0;var t=r(xs()),p=fs();return We.default=(0,t.default)((0,p.jsx)("path",{d:"M3 18h18v-2H3zm0-5h18v-2H3zm0-7v2h18V6z"}),"MenuOutlined"),We}var Rt=Lt();const kt=_s(Rt);var Ke={},Bs;function Mt(){if(Bs)return Ke;Bs=1;var r=gs();Object.defineProperty(Ke,"__esModule",{value:!0}),Ke.default=void 0;var t=r(xs()),p=fs();return Ke.default=(0,t.default)((0,p.jsx)("path",{d:"M3 18h13v-2H3zm0-5h10v-2H3zm0-7v2h13V6zm18 9.59L17.42 12 21 8.41 19.59 7l-5 5 5 5z"}),"MenuOpenOutlined"),Ke}var Ct=Mt();const It=_s(Ct),Fs=({setShowExpirationBanner:r})=>{const{storeDetails:t}=te(C=>C.account),{_id:p}=t,f=Ys.useGetPlanSubscription(p),{data:d,isFetched:E,isLoading:l}=f,_=d==null?void 0:d.data,a=on,g=(_==null?void 0:_.status)==="PENDING",w=g||a;w&&r(!1);const x=async()=>{var I,D,k,U;const C=await rn({storeId:p}),b=C==null?void 0:C.data;((I=b==null?void 0:b.latest_invoice)==null?void 0:I.status)==="PENDING PAYMENT"?window.open((D=b==null?void 0:b.latest_invoice)==null?void 0:D.invoice_url,"_self"):(((k=b==null?void 0:b.latest_invoice)==null?void 0:k.status)==="FAILURE PAYMENT"||((U=b==null?void 0:b.latest_invoice)==null?void 0:U.status)==="EXPIRED")&&window.location.replace("/home/billing/invoices")};return e.jsx(e.Fragment,{children:e.jsxs("div",{className:`top-0 d-flex justify-content-center align-items-center pending-banner__background top-banner-row--standard py-1 gap-2 expiration-banner ${w?"":"d-none"}`,children:[e.jsx("img",{src:et,alt:"Warnign Icon"}),E&&d&&g?e.jsxs("p",{className:"mb-0",children:["Your payment for"," ",e.jsx("span",{className:"text-warning",children:_==null?void 0:_.plan_type})," ","plan is currently"," ",e.jsx("span",{className:"text-warning",children:_==null?void 0:_.status}),"."]}):null,null,e.jsx(Je,{onClick:x,loading:l,loadingLabel:"Verifying",className:"btn btn-warning text-white fw-bold",children:"Verify Now"})]})})};function Dt(r){if(!r)return null;const t=_e(r).add(14,"days"),f=_e(t).diff(_e().format(),"hours",!1)/24;return Math.ceil(f)}function Ut(r){return r==null?null:r<=0?{variant:"danger",message:"Your trial has ended. Choose a plan to keep using premium features."}:r===1?{variant:"danger",message:"Your trial ends today"}:r===2?{variant:"danger",message:"Your trial ends tomorrow"}:r>=3&&r<=7?{variant:"warning",message:`${r} days left on your free trial`}:r>=8&&r<=13?{variant:"info",message:`${r} days remaining`}:r>=14?{variant:"info",message:"You're on your 14-day free trial!"}:{variant:"info",message:`${r} days remaining`}}const Bt="/assets/lightning-bolt-outline-EWTnVdDk.png",Ft=({payPlanType:r})=>{var Y,se,G;const{t}=rs(),[p,f]=o.useState(!1),[d,E]=o.useState(!1),[l,_]=o.useState(!1),{data:a,isFetching:g}=at.useGetAllSurveys({isEnabled:!0}),{data:w,isLoading:x}=ln.smsUsage.useSmsUsage(),C=g,b=w==null?void 0:w.remaining_sms_usage;let I=null;typeof b=="number"&&(I=Math.min(He,Math.max(0,He-b)));const D=I!==null?I/He*100:0,k=(a==null?void 0:a.total_ai_credits_balance)||0,U=(a==null?void 0:a.monthly_ai_credits)>0?((a==null?void 0:a.monthly_ai_credits)-(a==null?void 0:a.monthly_ai_credits_used))/(a==null?void 0:a.monthly_ai_credits)*100:0,F=(a==null?void 0:a.monthly_ai_credits)>0?((a==null?void 0:a.monthly_ai_credits)-(a==null?void 0:a.monthly_ai_credits_used))/(a==null?void 0:a.monthly_ai_credits)*100:0,z=O=>O>=50?"#2DA94F":O>=20?"#FFBF00":"#F53C3C",y=(a==null?void 0:a.monthly_ai_credits)>0?z(F):((Y=a==null?void 0:a.progress_bar_config)==null?void 0:Y.shade_percentage_color)||"#2DA94F",v=r==="FREE"?U:((se=a==null?void 0:a.progress_bar_config)==null?void 0:se.shade_percentage)||0,P=r==="FREE"?y:((G=a==null?void 0:a.progress_bar_config)==null?void 0:G.shade_percentage_color)||"#2DA94F",A=()=>{f(!p)};return e.jsxs(e.Fragment,{children:[e.jsxs(W,{show:p,onToggle:A,children:[e.jsx(bs,{placement:"bottom",delay:{show:250,hide:400},overlay:e.jsx(ys,{id:"credit-dropdown-tooltip",children:t("AI Credits Usage")}),children:e.jsx(W.Toggle,{variant:"link",id:"dropdown-credit",onClick:A,className:"dropdown-toggle arrow-none text-black p-0",children:e.jsx("img",{src:Bt,alt:"ai-credit-settings"})})}),e.jsx(W.Menu,{align:"end",className:"dropdown-menu-animated dropdown-lg p-2",style:{width:r!=="FREE"?380:250},children:e.jsxs("div",{className:"d-flex flex-column gap-2",children:[e.jsx("div",{className:"d-flex align-items-center justify-content-between text-dark-gray gap-3",children:C?e.jsx("div",{className:"d-flex justify-content-center align-items-center",children:e.jsx(dn,{animation:"border",variant:"primary",size:"sm"})}):e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"w-100",children:[e.jsxs("div",{className:"d-flex justify-content-between align-items-center d-inline-block",children:[e.jsx("div",{className:"fw-semibold",children:t("AI Credits Remaining")}),e.jsx("div",{className:"fw-semibold",children:Number.isInteger(k)?k:k.toFixed(2)})]}),e.jsx("div",{className:"progress w-100",style:{height:16,background:"#f7f7f7"},children:e.jsx("div",{id:"ai-credit-progress-bar",className:"progress-bar rounded-1",role:"progressbar",style:{width:`${Math.min(v,100)}%`,backgroundColor:P}
1,"aria-valuenow":Math.min(v,100),"aria-valuemin":"0","aria-valuemax":"100"})})]}),r!=="FREE"&&e.jsx("div",{children:e.jsx(Je,{"data-testid":"ai-credits-top-up",variant:"secondary",onClick:()=>{window.location.href=Q.pricing.segments.aiCredits+"?topup=true"},className:"text-sm no-wrap",style:{width:"81px",fontSize:"14px"},children:t("Top Up")})})]})}),C?null:e.jsxs("div",{className:"d-flex align-items-center justify-content-between text-dark-gray gap-3",children:[e.jsxs("div",{className:"w-100",children:[e.jsxs("div",{className:"d-flex justify-content-between align-items-center",children:[e.jsx("span",{className:"fw-semibold",children:t("SMS Usage")}),e.jsx("span",{className:"fw-semibold",children:x?"â¦":I!==null?e.jsxs(e.Fragment,{children:[I," / ",He]}):e.jsxs(e.Fragment,{children:["â / ",He]})})]}),e.jsx(Qe,{now:D,variant:"warning",className:"my-1 progress-lg",min:0})]}),e.jsx("div",{className:"flex-shrink-0",role:"button",tabIndex:0,"data-testid":"sms-top-up-trigger",onClick:()=>_(!0),onKeyDown:O=>{(O.key==="Enter"||O.key===" ")&&(O.preventDefault(),_(!0))},children:e.jsx(Je,{"data-testid":"sms-top-up-button",variant:"secondary",disabled:!0,className:"text-sm no-wrap",style:{width:"81px",fontSize:"14px",pointerEvents:"none"},children:t("Top Up")})})]})]})})]}),e.jsx(nt,{showModal:d,setShowModal:E}),e.jsx(tt,{isOpen:l,closeModal:()=>_(!1),message:t("Get ready as we are preparing SMS top-up and more flexible usage options.")})]})},zt=({open:r,onClose:t,steps:p=[],onStepClick:f,title:d="Setup Guide"})=>{var w;if(!r)return null;const E=p.filter(x=>!x.excludeFromProgress),l=E.filter(x=>x.completed).length,_=E.length,a=_?Math.round(l/_*100):0,g=(w=E.find(x=>!x.completed))==null?void 0:w.key;return e.jsxs("dialog",{className:"setup-guide-panel setup-guide-panel--punchy","aria-label":d,open:!0,children:[e.jsxs("header",{className:"setup-guide-panel__header",children:[e.jsxs("div",{className:"setup-guide-panel__header-content",children:[e.jsx("h2",{className:"setup-guide-panel__title",children:d}),e.jsxs("span",{className:"setup-guide-panel__progress-text",children:[l," of ",_," completed. You're ",a,"% there!"]}),e.jsx("div",{className:"setup-guide-panel__progress-track",role:"progressbar","aria-label":`${d} progress`,"aria-valuenow":a,"aria-valuemin":0,"aria-valuemax":100,children:e.jsx("div",{className:"setup-guide-panel__progress-fill",style:{width:`${a}%`}})})]}),e.jsx("button",{type:"button",className:"setup-guide-panel__close",onClick:t,"aria-label":`Close ${d}`,children:"Ã"})]}),e.jsx("div",{className:"setup-guide-panel__body",children:p.map(x=>e.jsxs("button",{type:"button",className:re("setup-guide-panel__step",{"setup-guide-panel__step--next":!!g&&x.key===g}),disabled:x.completed,onClick:()=>f==null?void 0:f(x),children:[e.jsx("span",{className:`setup-guide-panel__step-icon ${x.completed?"setup-guide-panel__step-icon--completed":""}`,children:x.completed?e.jsx(rt,{fontSize:"small"}):e.jsx(zn,{fontSize:"small"})}),e.jsxs("span",{className:`setup-guide-panel__step-label ${x.completed?"setup-guide-panel__step-label--completed":""}`,children:[x.icon,e.jsx("span",{className:"setup-guide-panel__step-title",children:x.title})]}),!!g&&x.key===g&&e.jsx("span",{className:"setup-guide-panel__next-badge",children:"Next"})]},x.key))})]})},Yt=({show:r,onClose:t,title:p,description:f,imageSrc:d,imageAlt:E,primaryButtonLabel:l,primaryButtonHref:_})=>{const{t:a}=rs(),g=l??a("Got it"),w=E??p;return e.jsxs(ae,{show:r,onHide:t,size:"lg",centered:!0,className:"setup-guide-step-modal",dialogClassName:"setup-guide-step-modal__dialog",children:[p&&e.jsx(ae.Header,{closeButton:!0,children:e.jsx(ae.Title,{className:"fw-semibold m-0",children:p})}),e.jsxs(ae.Body,{className:"setup-guide-step-modal__body",children:[f&&e.jsx("p",{className:"setup-guide-step-modal__description text-muted mb-4",children:f}),d&&e.jsx("div",{className:"setup-guide-step-modal__image-wrap",children:e.jsx("img",{src:d,alt:w,className:"setup-guide-step-modal__image"})})]}),e.jsx(ae.Footer,{className:"setup-guide-step-modal__footer",children:_?e.jsx(Je,{as:B,to:_,variant:"primary",className:"px-3",onClick:t,children:g}):e.jsx(Je,{type:"button",variant:"primary",className:"px-3",onClick:t,children:g})})]})},Gt=({show:r,onClose:t})=>{const{t:p}=rs();return e.jsxs(ae,{show:r,onHide:t,size:"xl",centered:!0,className:"setup-guide-whats-next-modal",dialogClassName:"setup-guide-whats-next-modal__dialog",children:[e.jsx(ae.Header,{closeButton:!0,children:e.jsx(ae.Title,{className:"fw-semibold m-0",children:p("What's Next")})}),e.jsx(ae.Body,{className:"setup-guide-whats-next-modal__body",children:e.jsx(ot,{showNav:!1,isModalView:!0,onActionClick:t})})]})},$t="/assets/branding-Bm3UwQNv.png",Gs="/assets/location-G1btsRXL.png",Ht="/assets/location-us-DG5gB_x6.png",$s="/assets/setuppayment-mU3Gi7vm.png",Vt="/assets/us-setuppayments-DUqfQWjY.png",qt="/assets/product-DjFWyY26.png",Hs="/assets/shipping-B4iuQ0tD.png",Wt="/assets/shipping-us-iN-i7Iqh.png",Xe={update_store_branding:{type:"info_modal",modalProps:{title:"Update Store Branding",description:"Set your store name, subdomain (for ___.prosperna.com), slogan, and logo. You can upload your own logo or use AI to generate one. Complete this step via the setup chat to move on to Store Pages, Location, and Products.",imageSrc:$t,primaryButtonLabel:"Set Up Branding",primaryButtonHref:Q.aiOnboardingChat.linkToRoute}},create_store_pages:{type:"info_modal",modalProps:{title:"Create Store Pages",description:"Design your store pages and create a great first impression. Use the AI Onboarding Chat to add a homepage, about page, and other key pages for your store.",imageSrc:lt,primaryButtonLabel:"Create Store Pages",primaryButtonHref:Q.aiOnboardingChat.linkToRoute}},update_store_location:{type:"info_modal",modalProps:{title:"Update Store Location",description:"Add your physical store address, contact details, business hours, and geolocation so customers can find and visit you. You can add multiple locations and manage them from Store Settings.",imageSrc:Gs,primaryButtonLabel:"Go to Store Location",primaryButtonHref:Q.storeLocations.linkToRoute}},upload_a_product:{type:"info_modal",modalProps:{title:"Upload a Product",description:"Add your first product and begin selling in minutes. Manage your inventory, set prices, and organize products by category from the Inventory page.",imageSrc:qt,primaryButtonLabel:"Go to Inventory",primaryButtonHref:Q.inventoryListing.linkToRoute}},setup_payment:{type:"info_modal",modalProps:{title:"Setup Payments",description:"Increase sales, save money and provide a better customer experience by accepting a wide range of payment methods. Activate your desired payment gateway available in your region.",imageSrc:$s,primaryButtonLabel:"Go to Payment Settings",primaryButtonHref:Q.paymentSettings.linkToRoute}},setup_shipping:{type:"info_modal",modalProps:{title:"Setup Shipping",description:"Improve your customer experience by offering a wide range of shipping options. Configure Prosperna Shipping with standard delivery, same-day delivery, manual shipping, store pickup, and scheduled delivery.",imageSrc:Hs,primaryButtonLabel:"Go to Shipping Settings",primaryButtonHref:Q.shippingSettings.linkToRoute}},whats_next:{type:"whats_next_modal"}},Kt={update_store_location:{us:Ht,default:Gs},setup_payment:{us:Vt,default:$s},setup_shipping:{us:Wt,default:Hs}};function Qt(r,t){var l;const p=Xe[r];if((p==null?void 0:p.type)!=="info_modal")return null;const f=Kt[r];
1if(!f)return p.modalProps;const d=((l=t==null?void 0:t.storeCountry)==null?void 0:l._id)??(t==null?void 0:t.storeCountry),E=cn(d)==="US";return{...p.modalProps,imageSrc:E?f.us:f.default}}function Xt({activeCount:r,children:t,onStackHeightChange:p,onExpandedChange:f,summaryLabel:d,hasUrgentInStack:E=!1,urgentBannerCount:l,standardBannerCount:_}){const a=o.useRef(null),g=o.useRef(null),w=o.useRef(null),[x,C]=o.useState(!1),[b,I]=o.useState(!1),D=r>=2,k=x||b;o.useEffect(()=>{r<2||f==null||f(x)},[r,x,f]);const U=o.useCallback(y=>{C(y),y&&I(!1)},[]),F=o.useCallback(()=>{!x||b||(I(!0),w.current=window.setTimeout(()=>{C(!1),I(!1),w.current=null},280))},[x,b]);o.useEffect(()=>()=>{w.current&&window.clearTimeout(w.current)},[]),o.useEffect(()=>{if(!D||!x||b)return;const y=v=>{a.current&&!a.current.contains(v.target)&&F()};return document.addEventListener("mousedown",y),()=>document.removeEventListener("mousedown",y)},[D,x,b,F]),o.useLayoutEffect(()=>{const y=g.current;if(!y||!p)return;const v=new ResizeObserver(P=>{const A=P[0];if(!A)return;const Y=Math.ceil(A.contentRect.height);p(Number.isFinite(Y)?Y:0)});return v.observe(y),()=>v.disconnect()},[p,r,x,D,t]);const z=o.useMemo(()=>{if(typeof d=="string"&&d.trim()!=="")return d.trim();const y=r,v="collapsible-banner-wrapper__summary-strong";if(!E)return y===1?e.jsxs(e.Fragment,{children:["You have ",e.jsx("strong",{className:v,children:"1"})," notification to address"]}):e.jsxs(e.Fragment,{children:["You have ",e.jsx("strong",{className:v,children:y})," notifications to address"]});let P,A;return typeof l=="number"&&typeof _=="number"?(P=l,A=_):typeof l=="number"?(P=l,A=Math.max(0,r-P)):typeof _=="number"?(A=_,P=Math.max(0,r-A)):(P=r,A=0),P<=0?y===1?e.jsxs(e.Fragment,{children:["You have ",e.jsx("strong",{className:v,children:"1"})," notification to address"]}):e.jsxs(e.Fragment,{children:["You have ",e.jsx("strong",{className:v,children:y})," notifications to address"]}):A>0?e.jsxs(e.Fragment,{children:["You have ",e.jsx("strong",{className:v,children:P})," ",e.jsx("strong",{className:v,children:"urgent"})," ",P===1?"notification":"notifications"," and"," ",e.jsx("strong",{className:v,children:A})," ",A===1?"other":"others"," ","to address"]}):P===1?e.jsxs(e.Fragment,{children:["You have ",e.jsx("strong",{className:v,children:"1"})," ",e.jsx("strong",{className:v,children:"urgent"})," notification to address"]}):e.jsxs(e.Fragment,{children:["You have ",e.jsx("strong",{className:v,children:P})," ",e.jsx("strong",{className:v,children:"urgent"})," notifications to address"]})},[r,E,d,l,_]);return D?e.jsxs("div",{ref:a,className:re("collapsible-banner-wrapper",{"collapsible-banner-wrapper--expanded":x,"is-expanded":x,"collapsible-banner-wrapper--urgent-summary":E,"collapsible-banner-wrapper--exit-animating":b}),children:[e.jsx("div",{ref:g,className:"collapsible-banner-wrapper__measure",children:x?e.jsx("div",{className:"collapsible-banner-wrapper__measure-spacer","aria-hidden":"true"}):e.jsx("div",{className:"collapsible-banner-wrapper__summary collapsible-banner-wrapper__message-panel",role:"status",children:e.jsx("button",{type:"button",className:"collapsible-banner-wrapper__toggle",onClick:()=>U(!0),"aria-expanded":!1,children:e.jsxs("span",{className:"collapsible-banner-wrapper__message-cluster",children:[e.jsx("span",{className:"collapsible-banner-wrapper__banner-icon","aria-hidden":!0,children:E?e.jsx(hs,{}):e.jsx(as,{})}),e.jsx("span",{className:"collapsible-banner-wrapper__summary-text",children:z}),e.jsx(dt,{className:"collapsible-banner-wrapper__chevron",fontSize:"small","aria-hidden":!0})]})})})}),e.jsxs("div",{className:re("collapsible-banner-wrapper__banners-shell",k&&"collapsible-banner-wrapper__banners-shell--overlay",b&&"collapsible-banner-wrapper__banners-shell--overlay-exit",!k&&"collapsible-banner-wrapper__stack--hidden"),children:[k&&e.jsx("div",{className:re("collapsible-banner-wrapper__summary","collapsible-banner-wrapper__summary--expanded-bar","collapsible-banner-wrapper__summary--overlay-top","collapsible-banner-wrapper__message-panel"),role:"region","aria-labelledby":"
1collapsible-banner-expanded-heading",children:e.jsx("div",{className:"collapsible-banner-wrapper__header-row",children:e.jsx("button",{type:"button",className:"collapsible-banner-wrapper__toggle",onClick:F,"aria-expanded":!0,"aria-label":"Collapse notifications",children:e.jsxs("span",{className:"collapsible-banner-wrapper__message-cluster",children:[e.jsx("span",{className:"collapsible-banner-wrapper__banner-icon","aria-hidden":!0,children:E?e.jsx(hs,{}):e.jsx(as,{})}),e.jsxs("span",{id:"collapsible-banner-expanded-heading",className:"collapsible-banner-wrapper__expanded-title",children:["Address these notifications"," ",e.jsx("strong",{className:"collapsible-banner-wrapper__expanded-now",children:"NOW!"})]}),e.jsx(ct,{className:"collapsible-banner-wrapper__chevron",fontSize:"small","aria-hidden":!0})]})})})}),e.jsx("div",{className:"collapsible-banner-wrapper__banners",children:t})]})]}):e.jsx("div",{ref:y=>{g.current=y},className:"collapsible-banner-wrapper collapsible-banner-wrapper--single",children:t})}const Jt=[{day:"Today",messages:[{id:"payment-activation-approved",title:"myPay Activation",subText:"Your request has been successfully approved. myPay app is now activated",time:"1 min ago",icon:"mdi mdi-check-circle-outline",variant:"success",isRead:!1,url:"/home/myPay?activation_status=approved"},{id:"payment-activation-denied",title:"myPay Activation",subText:"Your request has been rejected including the reason indicated by the admin during approval",time:"2 min ago",icon:"mdi mdi-cancel",variant:"danger",isRead:!1,url:"/home/myPay/activation"},{id:1,title:"New Software Update",subText:"Prosperna One released a new software update.",time:"1 min ago",icon:"mdi mdi-update",variant:"primary",isRead:!1,url:"/home/release"},{id:2,title:"Datacorp",subText:"Caleb Flakelar commented on Admin",time:"2 min ago",icon:"mdi mdi-comment-account-outline",variant:"primary",isRead:!1,url:"#"},{id:3,title:"Admin",subText:"New user registered.",time:"1 hours ago",icon:"mdi mdi-account-plus",variant:"info",isRead:!0,url:"#"}]},{day:"Yesterday",messages:[{id:1,title:"Cristina Pride",subText:"Hi, How are you? What about our next meeting",time:"1 day ago",avatar:Xn,isRead:!0,url:"#"}]},{day:"30 Dec 2021",messages:[{id:1,title:"Datacorp",subText:"Caleb Flakelar commented on Admin",icon:"mdi mdi-comment-account-outline",variant:"primary",isRead:!0,url:"#"},{id:2,title:"Karen Robinson",subText:"Wow ! this admin looks good and awesome design",avatar:Jn,isRead:!0,url:"#"}]}];let Zt=[{label:"My Account",icon:"mdi mdi-account-circle-outline",redirectTo:"/home/my-account",index:1},{label:"Billing",icon:"mdi mdi-credit-card-outline",redirectTo:"/home/billing",index:2},{label:"Refer & Earn",icon:"mdi mdi-gift-outline",redirectTo:"#",index:3,withIndicator:!0,id:"refer"},{label:"Get help",icon:"mdi mdi-help-circle-outline",redirectTo:"/home/customer-support-center",index:4}];const za=({hideLogo:r,navCssClasses:t,openLeftMenuCallBack:p,topbarDark:f,storeAccount:d,showExpirationBanner:E,setShowExpirationBanner:l})=>{var js,ws,Ns,vs,Ss,Es,Ts,Ps;const{track:_}=st(),{user:a}=te(n=>n.Auth),{storeDetails:g}=te(n=>n.account),{payPlanType:w,_id:x,premiumTrialSubscriptionDate:C}=g,b=(js=a==null?void 0:a.user_profile)==null?void 0:js.user_type,I=un(g==null?void 0:g.createdAt)||pn(g==null?void 0:g.createdAt),{data:D}=mn.useGetMyMarketplaceApplications(),k=hn(D),U=(a==null?void 0:a["custom:user_type"])==="AdminControl"?"ADMIN":"MERCHANT",F=gn(),[z,y]=o.useState(!1),[v,P]=o.useState(Jt),[A,Y]=o.useState([...Zt]),[se,G]=o.useState(""),{data:O,isFetching:pe}=zs.useGetUserProfile(),[be,V]=o.useState(0),[c,X]=o.useState(!1),[K,oe]=o.useState(null),ye=o.useRef(null),Le=o.useRef(null);o.useEffect(()=>{if(!c||K)return;const n=T=>{ye.current&&!ye.current.contains(T.target)&&X(!1)},u=T=>{var S,R;T.key==="Escape"&&(X(!1),(S=ye.current)!=null&&S.contains(document.activeElement)&&((R=Le.current)==null||R.focus()))};return document.addEventListener("mousedown",n),document.addEventListener("keydown",u),()=>{document.removeEventListener("mousedown",n),document.removeEventListener("keydown",u)}},[c,K]);const{t:ne}=rs();o.useEffect(()=>{const n=u=>{var S;const T=(S=u==null?void 0:u.detail)==null?void 0:S.stepKey;!T||!Xe[T]||oe(T)};return document.addEventListener(Cs,n),()=>document.removeEventListener(Cs,n)},[]);const Re=t||"",os=r?"":"container-fluid",{layoutType:le,leftSideBarType:ke}=te(n=>({layoutType:n.Layout.layoutType,leftSideBarType:n.Layout.leftSideBarType})),{data:ls,isFetched:Ze}=xn.useGetSurveyStatus({store_id:g==null?void 0:g.store_id});o.useEffect(()=>{if(fn.can("read",_n.billing)){let n=[...A];Y(n)}},[]);const Me=()=>{switch(y(n=>!n),p&&p(),le){case Os:window.innerWidth>=768&&((ke==="fixed"||ke==="scrollable")&&F(Rs(Rn)),ke==="condensed"&&F(Rs(kn))
1),document.body&&(z?document.body.classList.remove("sidebar-enable"):document.body.classList.add("sidebar-enable"));break;case Ls:document.body&&document.body.classList.toggle("hide-menu");break}},es=(n,u)=>{const T=v.map(S=>(S.day===n.day&&S.messages.map(R=>(R.id===u.id&&(R.isRead=!0),R)),S));P(T)},ss=()=>{if(d)return d.redirectToCustomDomain?`${d.customDomain}`:`${d.customSubDomain}`},{isUserLoggedIn:is}=te(n=>{var u,T,S,R;return{loading:(u=n==null?void 0:n.Auth)==null?void 0:u.loading,user:(T=n==null?void 0:n.Auth)==null?void 0:T.user,error:(S=n==null?void 0:n.Auth)==null?void 0:S.error,isUserLoggedIn:(R=n==null?void 0:n.Auth)==null?void 0:R.userLoggedIn}}),Ce=bn.useGetOnBoardingStatus(is),m=Ce.data||{progress:{CREATE_ACCOUNT:!0,UPDATE_STORE_LOCATION:!1,UPLOAD_FIRST_PRODUCT:!1,SETUP_PAYMENTS:!1,SETUP_SHIPPING:!1,UPDATE_STORE_BRANDING:!1,CREATE_STORE_PAGES:!1},is_onboarding:!1},Ie=m!=null&&m.progress?Object.values(m.progress).every(n=>n===!0):!1,De=[{key:"update_store_location",title:ne("Update Store Location"),icon:e.jsx(Yn,{fontSize:"small"}),completed:!!((ws=m==null?void 0:m.progress)!=null&&ws.UPDATE_STORE_LOCATION)},{key:"upload_a_product",title:ne("Upload a Product"),icon:e.jsx(ut,{fontSize:"small"}),completed:!!((Ns=m==null?void 0:m.progress)!=null&&Ns.UPLOAD_FIRST_PRODUCT)},{key:"setup_payment",title:ne("Setup Payments"),icon:e.jsx(Gn,{fontSize:"small"}),completed:!!((vs=m==null?void 0:m.progress)!=null&&vs.SETUP_PAYMENTS)},{key:"setup_shipping",title:ne("Setup Shipping"),icon:e.jsx(ms,{fontSize:"small"}),completed:!!((Ss=m==null?void 0:m.progress)!=null&&Ss.SETUP_SHIPPING)},{key:"whats_next",title:ne("What's Next"),icon:e.jsx($n,{fontSize:"small"}),completed:!1,excludeFromProgress:!0}],je=De.filter(n=>!n.excludeFromProgress),ns=je.filter(n=>n.completed).length,ts=je.every(n=>n.completed),me=yn(),he=me.pathname;o.useEffect(()=>{if(!document.body)return;const u=me.pathname.replace(/^\/|\/$/g,"").replace(/\//g,"-").toLowerCase()||"home";Array.from(document.body.classList).forEach(S=>{S.startsWith("page-")&&document.body.classList.remove(S)}),document.body.classList.add(`page-${u}`)},[me.pathname]),o.useEffect(()=>{Ue()},[m]);const Ue=()=>{if(m.progress.SETUP_PAYMENTS&&m.progress.UPLOAD_FIRST_PRODUCT&&m.progress.UPDATE_STORE_LOCATION&&m.progress.SETUP_SHIPPING){V(6);return}if(m.progress.SETUP_PAYMENTS&&m.progress.UPLOAD_FIRST_PRODUCT&&m.progress.UPDATE_STORE_LOCATION){V(5);return}if(m.progress.UPLOAD_FIRST_PRODUCT&&!m.progress.SETUP_PAYMENTS&&!m.progress.SETUP_SHIPPING){V(4);return}if(m.progress.UPDATE_STORE_LOCATION&&!m.progress.UPLOAD_FIRST_PRODUCT){V(3);return}if(m.progress.CREATE_STORE_PAGES&&!m.progress.UPDATE_STORE_LOCATION){V(2);return}if(m.progress.UPDATE_STORE_BRANDING&&!m.progress.CREATE_STORE_PAGES){V(1);return}if(m.progress.CREATE_ACCOUNT){V(0);return}},Be=te(n=>n.initialLogin.initialLogin),Fe=te(n=>n.initialLogin.loadCount);o.useEffect(()=>{F(jn(Fe+1)),Fe>1&&wn(!1)},[]),o.useEffect(()=>{if(!(!Ze||!Ce.isFetched||!Be)){if(!Nn(ls,I)){he.startsWith(Q.onboardingSurvey.fullPath)||(window.location.href=Q.onboardingSurvey.linkToRoute);return}Ie||G(Q.aiOnboardingChat.linkToRoute),Ue()}},[m,be,Ze,Be,Ce.isFetched,Ie]),o.useEffect(()=>{const n=he==="/home/inventory-listing/create-product"||he.startsWith("/home/inventory-listing/create-product/");!m.progress.UPDATE_STORE_LOCATION&&m.is_onboarding&&n&&oe(it)},[he]);const[s,j]=o.useState(""),{data:h}=Ys.useGetPlanSubscription(x);o.useEffect(()=>{var n;h&&j((n=h==null?void 0:h.data)==null?void 0:n.next_payment_due_date)},[h]);const[i,L]=o.useState(!1),[N,M]=o.useState("");o.useEffect(()=>{if(s!==""&&s!==void 0&&w!=="FREE"){let n;s!==""&&s!==void 0&&w!=="FREE"&&(()=>{const T=_e(new Date).format(),S=_e(s),R=_e.duration(S.diff(T)),Z=R.asDays();n=R.days();const q=R.hours(),$=R.minutes();n<=-1?(l(!1),M(""),L(!0)):On(w)?Z<=3&&Z>=0?n>=1?(l(!0),M(`${n} day${n>1?"s":""}!`),L(!1)):(l(!0),$<1&&$>=0?M(`${q} hour${q>1?"s":""} ${$+1} minute${$>1?"s":""}!`):M(`${q} hour${q>1?"s":""} ${$} minute${$>1?"s":""}!`),L(!1)):(l(!1),L(!0),M("")):Z<15&&Z>=0?n>=1?(l(!0),M(`${n} day${n>1?"s":""}!`),L(!1)):(l(!0),$<1&&$>=0?M(`${q} hour${q>1?"s":""} ${$+1} minute${$>1?"s":""}!`):M(`${q} hour${q>1?"s":""} ${$} minute${$>1?"s":""}!`),L(!1)):Z<0&&Z>=-1?(l(!0),M(""),L(!0)):(l(!1),L(!0),M(""))})()}},[s]);const J=Qn.useTrackStoreEvents(),we=()=>{const n={store_id:g==null?void 0:g.store_id,event_name:"P1_merchant_clicked_preview_online_store"};J.mutate(n)},H=h==null?void 0:h.data,ie=me.pathname.includes("/admin"),{forceThree:ze,useSimulatedPending:ds,pendingVisibleForCount:de,shouldShowExpirationBanner:ge,shouldShowDisabledAddonBanner:Ne,shouldShowPremiumTrialBanner:ve,expirationLayoutBypass:Ye,addonLayoutBypass:cs}=vn({isAdminPath:ie,planSubscriptionStatus:H==null?void 0:H.status,showExpirationBanner:E,payPlanType:w,hasDisabledAddon:k}),Se=!ie&&!!(H!=null&&H.scheduled_cancellation),Ee=Sn({isAdminPath:ie,pendingPaymentVisible:de,showExpirationBanner:ge,showDisabledAddonBanner:Ne,showPremiumTrialBanner:ve,showCancellationBanner:Se}),Ge=(ze||Ln)&&Array.isArray(Ae),Vs=ge&&!ie&&(i||Ye&&us),Te=de&&(Ge?Ae.includes("pending"):!1),xe=ge&&(Ge?Ae.includes("expiration"):Vs),Pe=Ne&&(Ge?Ae.includes("addon"):!1),$e=ve&&(Ge?Ae.includes("trial"):!1),fe=Se&&(Ge?Ae.includes("cancellation"):!0),qs=Te||$e||xe||Pe||fe,{urgentCount:Ws,standardCount:Ks}=o.useMemo(()=>En({isAdminPath:ie,pendingPaymentVisible:de,showExpirationBanner:ge,showDisabledAddonBanner:Ne,showPremiumTrialBanner:ve,showCancellationBanner:Se,pendingIsUrgent:Te,premiumTrialIsUrgent:$e,expirationBannerIsUrgent:xe,addonIsUrgent:Pe,cancellationIsUrgent:fe}),[ie,de,ge,Ne,ve,Se,Te,$e,xe,Pe,fe]),Qs=o.useCallback(n=>{document.documentElement.style.setProperty("--top-banner-stack-height",`${n}px`)},[]),Xs=o.useCallback(n=>{document.body&&document.body.classList.toggle("top-banners-expanded",n)},[]);o.useEffect(()=>(Ee===0&&document.documentElement.style.setProperty("--top-banner-stack-height","0px"),Ee<2&&document.body&&document.body.classList.remove("top-banners-expanded"),()=>{document.documentElement.style.removeProperty("--top-banner-stack-height"),document.body&&document.body.classList.remove("top-banners-expanded")}),[Ee]);const Js=o.useMemo(()=>{let n=0;const u=[];
1if(de&&u.push({urgent:Te,slotIndex:n++,node:e.jsx("div",{children:e.jsx("div",{children:ds?e.jsx("div",{className:`top-0 d-flex justify-content-center align-items-center pending-banner__background top-banner-row--${Te?"urgent":"standard"} py-2 gap-2 expiration-banner`,role:"note",children:e.jsxs("p",{className:"mb-0 small text-center px-2",children:["DEBUG: Simulated pending payment â set"," ",e.jsx("code",{children:"DEBUG_FORCE_THREE_TOP_BANNERS"})," to"," ",e.jsx("code",{children:"false"})," in"," ",e.jsx("code",{children:"src/constants/topBannerDebug.js"})," after testing."]})}):e.jsx(Fs,{setShowExpirationBanner:l})})},"top-banner-pending")}),ve&&C){const T=Dt(C),S=Ut(T);if(S){const{variant:R,message:Z}=S,q=R==="info"?"alert-info":R==="warning"?"alert-warning":"alert-danger",$=R==="danger"?"danger":R==="warning"?"dark":"primary";u.push({urgent:$e,slotIndex:n++,node:e.jsxs("div",{className:`premium-trial-top-banner merchant-trial-banner expiration-banner d-flex flex-column flex-sm-row justify-content-center align-items-center px-2 py-2 gap-2 border-0 rounded-0 mb-0 ${q}`,role:"alert","data-testid":"merchant-trial-banner",children:[e.jsx("p",{className:"mb-0 text-center",children:Z}),e.jsx(B,{to:"/home/billing/my-plan",className:"text-nowrap",children:e.jsx(ee,{className:"btn-expiration fw-semibold text-nowrap",variant:$,children:"Choose a Plan"})})]},"top-banner-trial")})}}if(Se&&(H!=null&&H.scheduled_cancellation)){const{effective_date:T}=H.scheduled_cancellation,S=T?_e(T).format("MMMM D, YYYY"):"soon";u.push({urgent:fe,slotIndex:n++,node:e.jsxs("div",{className:`expiration-banner top-banner-row--${fe?"urgent":"standard"} d-flex flex-column flex-sm-row justify-content-center align-items-center px-2 py-2 gap-2 border-0 rounded-0 mb-0 ${fe?"alert-danger":"alert-warning"}`,role:"alert","data-testid":"pending-cancellation-banner",children:[e.jsxs("p",{className:"mb-0 text-center",children:["Your plan has been cancelled. Your store will go offline on"," ",e.jsx("strong",{children:S}),"."]}),e.jsx(B,{to:"/home/billing/my-plan?resubscribe=1",className:"text-nowrap",children:e.jsx(ee,{className:"btn-expiration fw-semibold text-nowrap",variant:"dark",size:"sm",children:"Resubscribe"})})]},"top-banner-cancellation")})}if(ge){const S=i||Ye&&us,R=Ye&&!i&&!us,Z=w||"PLUS",q=N&&String(N).trim()!==""?N:"3 days!";u.push({urgent:xe,slotIndex:n++,node:e.jsxs("div",{className:`expiration-banner top-banner-row--${xe?"urgent":"standard"} d-flex justify-content-center align-items-center p-sm-0 p-1 ${xe?"alert-danger":"alert-warning"}`,children:[e.jsxs("div",{className:"p-1 p-sm-2 d-flex align-items-center",children:[S?e.jsx(hs,{}):e.jsx(as,{}),S?e.jsxs("div",{className:"px-sm-2 py-sm-1 p-0",children:[e.jsxs("p",{className:"mb-0 text-danger",children:["Your account is downgraded to a"," ",e.jsx("span",{className:"fw-bold",children:"FREE PLAN"}),"."]}),Ye&&!i?e.jsxs("p",{className:"mb-0 small text-muted",children:["QA bypass â set"," ",e.jsx("code",{children:"DEBUG_BYPASS_EXPIRATION_BANNER_DATA"})," to"," ",e.jsx("code",{children:"false"})," in ",e.jsx("code",{children:"topBannerDebug.js"})," when done."]}):null]}):R?e.jsxs("div",{className:"px-sm-2 py-sm-1 p-0",children:[e.jsxs("p",{className:"mb-0 text-black",children:["Your ",e.jsxs("span",{className:"alert-warning bg-transparent fw-bold",children:[Z," PLAN"]})," will expire in ",e.jsx("span",{className:"alert-warning bg-transparent fw-bold",children:q})]}),e.jsxs("p",{className:"mb-0 small text-muted",children:["QA bypass â set"," ",e.jsx("code",{children:"DEBUG_BYPASS_EXPIRATION_BANNER_DATA"})," to"," ",e.jsx("code",{children:"false"})," in ",e.jsx("code",{children:"topBannerDebug.js"})," when done. For red downgraded row, set"," ",e.jsx("code",{children:"DEBUG_BYPASS_EXPIRATION_AS_DOWNGRADED"})," to"," ",e.jsx("code",{children:"true"}),"."]})]}):e.jsxs("p",{className:"mb-0 text-black px-sm-2 py-sm-1 p-0",children:["Your ",e.jsxs("span",{className:"alert-warning bg-transparent fw-bold",children:[w," PLAN"]})," will expire in ",e.jsx("span",{className:"alert-warning bg-transparent fw-bold",children:N})]})]}),e.jsx("div",{children:e.jsx(B,{to:S?"/home/billing/my-plan":"/home/billing/invoices",children:S?e.jsx(ee,{variant:"danger",className:"btn-expiration text-white fw-semibold text-nowrap",children:"Upgrade Now"}):e.jsx(ee,{variant:"warning",className:"btn-expiration text-white fw-semibold text-nowrap",children:"Pay Now"})})})]},"top-banner-expiration")})}if(Ne){const T=w==="PLUS"||cs&&Mn;u.push({urgent:Pe,slotIndex:n++,node:e.jsxs("div",{className:`expiration-banner addon-disabled-banner top-banner-row--${Pe?"urgent":"standard"} d-flex justify-content-center align-items-center p-sm-0 p-1`,children:[e.jsxs("div",{className:"p-1 p-sm-2 d-flex align-items-center",children:[e.jsx(as,{}),e.jsxs("div",{className:"p-0",children:[T?e.jsx("p",{className:"mb-0 text-black",children:"Some of your Add-Ons might have been disabled. Please check them now."}):e.jsx("p",{className:"mb-0 text-black",children:"Your Add-Ons are currently disabled. To enable them, please subscribe to a Prosperna Plan."}),cs?e.jsxs("p",{className:"mb-0 small text-muted",children:["QA bypass â set ",e.jsx("code",{children:"DEBUG_BYPASS_ADDON_BANNER_DATA"})," ","to ",e.jsx("code",{children:"false"})," in ",e.jsx("code",{children:"topBannerDebug.js"})," when done. Toggle ",e.jsx("code",{children:"DEBUG_BYPASS_ADDON_AS_PLUS_PLAN"})," ","for the other add-on copy variant."]}):null]})]}),e.jsx("div",{children:T?e.jsx(B,{to:"/home/marketplace?tab=myapps",children:e.jsx(ee,{variant:"warning",className:"btn-secondary text-white fw-semibold text-nowrap px-3 py-1",children:"View"})}):e.jsx(B,{to:"/home/billing",children:e.jsx(ee,{variant:"warning",className:"btn-secondary text-white fw-semibold text-nowrap px-3 py-1",children:"Pay Now"})})})]},"top-banner-addon")})}
1return e.jsx(e.Fragment,{children:Tn(u).map(T=>T.node)})},[de,Te,ds,l,ge,xe,Ye,cs,i,w,N,Ne,Pe,ve,$e,C,Se,fe,H]);return e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:re("navbar-custom ",Re),children:[e.jsx("div",{className:"top-banner-stack-region",children:Ee>0?e.jsx(Xt,{activeCount:Ee,hasUrgentInStack:qs,urgentBannerCount:Ws,standardBannerCount:Ks,onStackHeightChange:Qs,onExpandedChange:Xs,children:Js},Ee>=2?"multi":"single"):e.jsx("div",{children:e.jsx(Fs,{setShowExpirationBanner:l})})}),e.jsxs("div",{className:os,children:[!r&&e.jsxs(B,{to:"/",className:"topnav-logo",children:[e.jsx("span",{className:"topnav-logo-lg",children:e.jsx("img",{src:Tt,alt:"logo",height:"30"})}),e.jsx("span",{className:"topnav-logo-sm",children:e.jsx("img",{src:f?Et:Zn,alt:"logo",height:"30"})})]}),e.jsxs("ul",{className:"list-unstyled topbar-menu float-end mb-0 d-flex align-items-center flex-gap-1",children:[!ts&&U!=="ADMIN"&&e.jsxs("li",{ref:ye,className:"dropdown notification-list topbar-dropdown d-none d-lg-flex align-items-center me-2 position-relative",children:[e.jsxs("button",{type:"button",ref:Le,className:"setup-store-pill","aria-expanded":c,"aria-haspopup":"dialog",onClick:()=>X(n=>!n),children:[e.jsx(Hn,{fontSize:"small"}),e.jsx("span",{className:"text-nowrap",children:ne("Setup Your Online Store")}),e.jsxs("span",{className:"setup-store-pill__count",children:[ns,"/",je.length]}),e.jsx("span",{className:"setup-store-pill__ping","aria-hidden":"true"})]}),c&&e.jsx(zt,{open:c,onClose:()=>{var n;X(!1),(n=Le.current)==null||n.focus()},title:ne("Setup Your Online Store"),steps:De,onStepClick:n=>{const u=Xe[n.key];if((u==null?void 0:u.type)==="navigate"&&u.to){window.location.href=u.to;return}((u==null?void 0:u.type)==="info_modal"||(u==null?void 0:u.type)==="whats_next_modal")&&oe(n.key)}})]}),U!=="ADMIN"&&e.jsxs(e.Fragment,{children:[b==="PARENT"&&e.jsx("li",{className:"dropdown notification-list",children:e.jsx(Ft,{payPlanType:w})}),e.jsx("li",{className:"dropdown notification-list",children:e.jsx(St,{})}),e.jsx("li",{className:"dropdown notification-list text-black d-block cursor-pointer",children:e.jsx(bs,{placement:"bottom",delay:{show:250,hide:400},overlay:e.jsx(ys,{id:"button-tooltip",children:"Preview Online Store"}),children:e.jsx("a",{href:ss(),target:"_blank",rel:"noopener noreferrer",className:"text-black",onClick:()=>we(),id:"preview-online-store-button",children:e.jsx(Ot,{})})})}),e.jsx("li",{className:"dropdown notification-list",children:e.jsx(vt,{notifications:v,handleNotificationItem:es,storeID:d._id})})]}),e.jsx("li",{className:"dropdown notification-list",children:e.jsx(Vn,{profilePic:pe?"":(Es=O==null?void 0:O.user_profile)==null?void 0:Es.image,menuItems:A,profileName:pe?"":((Ts=O==null?void 0:O.user_profile)==null?void 0:Ts.first_name)+" "+((Ps=O==null?void 0:O.user_profile)==null?void 0:Ps.last_name),username:"Dominic Keller",userTitle:"Founder",userType:U,currentUser:a,track:_})})]}),(le===Os||le===Ls)&&e.jsx("button",{className:"button-menu-mobile open-left",onClick:()=>Me(),id:"hamburger-menu-button",children:z?e.jsx(It,{}):e.jsx(kt,{})}),le===Pn&&e.jsx(B,{to:"#",className:re("navbar-toggle",{open:z}),onClick:()=>Me(),children:e.jsxs("div",{className:"lines",children:[e.jsx("span",{}),e.jsx("span",{}),e.jsx("span",{})]})}),le===An&&e.jsx(B,{to:"#",className:"button-menu-mobile disable-btn",onClick:()=>Me(),children:e.jsxs("div",{className:"lines",children:[e.jsx("span",{}),e.jsx("span",{}),e.jsx("span",{})]})})]})]}),(()=>{const n=K?Xe[K]:null,u=(n==null?void 0:n.type)==="info_modal"?Qt(K,g):null;return u?e.jsx(Yt,{show:!0,onClose:()=>oe(null),title:u.title,description:u.description,imageSrc:u.imageSrc,primaryButtonLabel:u.primaryButtonLabel,primaryButtonHref:u.primaryButtonHref}):null})(),(()=>{const n=K?Xe[K]:null;return(n==null?void 0:n.type)==="whats_next_modal"?e.jsx(Gt,{show:!0,onClose:()=>oe(null)}):null})()]})};export{za as default};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.