1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9309],{15033:(e,t,l)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/account",function(){return l(54134)}])},30594:(e,t,l)=>{"use strict";l.d(t,{A:()=>i});var r=l(37876),n=l(87043),s=l(29502),a=(0,l(92921).A)("outline","wifi","IconWifi",[["path",{d:"M12 18l.01 0",key:"svg-0"}],["path",{d:"M9.172 15.172a4 4 0 0 1 5.656 0",key:"svg-1"}],["path",{d:"M6.343 12.343a8 8 0 0 1 11.314 0",key:"svg-2"}],["path",{d:"M3.515 9.515c4.686 -4.687 12.284 -4.687 17 0",key:"svg-3"}]]);function i(){var e;let{customer:t}=(0,n.h)(),{formattedStore:l}=(0,s.P)(),i=null==t?void 0:t.membership,d=null==t?void 0:t.tier;if(!((null==t?void 0:t.membership_enabled)&&(null==i?void 0:i.member_id)))return null;let o=(null==l?void 0:l.name)||"Membership",c=null==l?void 0:l.logo,m=(null==d?void 0:d.color)||"#e5c07b",x=!!(null==t?void 0:t.loyalty_enabled);return(0,r.jsxs)("div",{className:"relative aspect-[1.586] w-full max-w-sm overflow-hidden rounded-2xl bg-gradient-to-br from-primary-600 to-primary-900 p-5 text-white shadow-xl",children:[(0,r.jsx)("div",{className:"pointer-events-none absolute -right-10 -top-10 h-40 w-40 rounded-full opacity-40 blur-2xl",style:{background:m}}),(0,r.jsx)("div",{className:"pointer-events-none absolute inset-0 opacity-20",style:{background:"radial-gradient(120% 120% at 100% 0%, ".concat(m,"33, transparent 60%)")}}),(0,r.jsxs)("div",{className:"relative z-10 flex h-full flex-col justify-between",children:[(0,r.jsxs)("div",{className:"flex items-start justify-between",children:[(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[c?(0,r.jsx)("img",{src:c,alt:o,className:"h-6 w-auto brightness-0 invert"}):(0,r.jsx)("span",{className:"text-sm font-semibold",children:o}),(0,r.jsx)(a,{size:16,className:"rotate-90 text-white/60"})]}),(null==d?void 0:d.name)&&(0,r.jsx)("span",{className:"rounded-full px-2.5 py-1 text-[10px] font-bold uppercase tracking-wide",style:{background:m,color:"#000"},children:d.name})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("p",{className:"font-mono text-base tracking-[0.18em] text-white/95 sm:text-lg",children:null==i?void 0:i.member_id}),(0,r.jsxs)("div",{className:"mt-3 flex items-end justify-between",children:[(0,r.jsxs)("div",{className:"min-w-0",children:[(0,r.jsx)("p",{className:"text-[10px] uppercase tracking-widest text-white/60",children:"Member"}),(0,r.jsx)("p",{className:"truncate text-sm font-medium",children:(null==t?void 0:t.name)||(null==t?void 0:t.phone_number)||(null==t?void 0:t.email)})]}),x&&(0,r.jsxs)("div",{className:"flex-none pl-4 text-right",children:[(0,r.jsx)("p",{className:"text-2xl font-bold leading-none",children:null!=(e=null==i?void 0:i.points)?e:0}),(0,r.jsx)("p",{className:"text-[10px] uppercase tracking-widest text-white/60",children:"Points"})]})]})]})]})]})}},39456:(e,t,l)=>{"use strict";l.d(t,{A:()=>a});var r=l(37876),n=l(87043),s=l(70027);function a(){let{customer:e}=(0,n.h)(),t=null==e?void 0:e.tier_progress;if(!t)return null;let l="points"===t.basis?"".concat(t.remaining," points"):(0,s.vv)(t.remaining);return(0,r.jsxs)("div",{className:"w-full rounded-2xl border border-gray-100 p-5 dark:border-white/10",children:[(0,r.jsxs)("div",{className:"flex items-center justify-between",children:[(0,r.jsxs)("p",{className:"text-sm font-semibold",children:["Next tier: ",t.next_tier_name]}),(0,r.jsxs)("span",{className:"text-xs text-gray-400",children:[t.pct,"%"]})]}),(0,r.jsx)("div",{className:"mt-3 h-2 w-full overflow-hidden rounded-full bg-gray-100 dark:bg-white/10",children:(0,r.jsx)("div",{className:"h-full rounded-full bg-primary-600 transition-all",style:{width:"".concat(t.pct,"%")}})}),(0,r.jsxs)("p",{className:"mt-2 text-xs text-gray-500 dark:text-[var(--dark-secondary-text)]",children:[l," more ","points"===t.basis?"points":"in spend"," to reach"," ",t.next_tier_name,"."]})]})}},54134:(e,t,l)=>{"use strict";l.r(t),l.d(t,{__N_SSP:()=>w,default:()=>_});var r=l(37876),n=l(35184),s=l(30594),a=l(39456),i=l(89735),d=l(87043),o=l(70027),c=l(81886),m=l(91391),x=l(20466),u=l(92921),p=(0,u.A)("outline","coin","IconCoin",[["path",{d:"M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0",key:"svg-0"}],["path",{d:"M14.8 9a2 2 0 0 0 -1.8 -1h-2a2 2 0 1 0 0 4h2a2 2 0 1 1 0 4h-2a2 2 0 0 1 -1.8 -1",key:"svg-1"}],["path",{d:"M12 7v10",key:"svg-2"}]]),h=(0,u.A)("outline","award","IconAward",[["path",{d:"M12 9m-6 0a6 6 0 1 0 12 0a6 6 0 1 0 -12 0",key:"svg-0"}],["path",{d:"M12 15l3.4 5.89l1.598 -3.233l3.598 .232l-3.4 -5.889",key:"svg-1"}],["path",{d:"M6.802 12l-3.4 5.89l3.598 -.233l1.598 3.232l3.4 -5.889",key:"svg-2"}]]),g=(0,u.A)("outline","arrow-right","IconArrowRight",[["path",{d:"M5 12l14 0",key:"svg-0"}],["path",{d:"M13 18l6 -6",key:"svg-1"}],["path",{d:"M13 6l6 6",key:"svg-2"}]]),v=l(17292),b=l(48230),j=l.n(b),y=l(89099),f=l(14232);let N=()=>{var e,t,l,n,i;let u=(0,y.useRouter)(),{customer:b,isLoggedIn:N,loading:w,accessToken:_}=(0,d.h)(),[k,M]=(0,f.useState)([]);if((0,f.useEffect)(()=>{w||N||u.replace("/account/login")},[w,N]),(0,f.useEffect)(()=>
1{if(!_)return;let e=!0;return c.A.getMyOrders(_).then(t=>e&&M(((null==t?void 0:t.data)||[]).slice(0,3))).catch(()=>e&&M([])),()=>{e=!1}},[_]),w||!N||!b)return(0,r.jsx)("div",{className:"flex min-h-[60vh] items-center justify-center",children:(0,r.jsx)(m.A,{className:"animate-spin text-gray-400",size:28})});let A=!!(null==b?void 0:b.membership_enabled)&&!!(null==b||null==(e=b.membership)?void 0:e.member_id),z=!!(null==b?void 0:b.loyalty_enabled)&&!!(null==b?void 0:b.membership),S=[{label:"Total orders",value:String(null!=(n=b.order_count)?n:0),icon:x.A},...z?[{label:"Points balance",value:String(null!=(i=null==(t=b.membership)?void 0:t.points)?i:0),icon:p}]:[],...A&&(null==(l=b.tier)?void 0:l.name)?[{label:"Membership tier",value:b.tier.name,icon:h}]:[]];return(0,r.jsxs)("div",{className:"space-y-6",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)("p",{className:"text-xs uppercase tracking-[0.18em] text-gray-400",children:"My account"}),(0,r.jsxs)("h1",{className:"mt-1 text-2xl font-semibold sm:text-3xl",children:["Welcome back",b.name?", ".concat(b.name.split(" ")[0]):""]})]}),(0,r.jsx)("div",{className:"grid grid-cols-2 gap-3 sm:grid-cols-3",children:S.map(e=>{let t=e.icon;return(0,r.jsxs)("div",{className:"rounded-2xl border border-gray-100 p-4 dark:border-white/10",children:[(0,r.jsxs)("div",{className:"flex items-center justify-between",children:[(0,r.jsx)("p",{className:"text-[11px] uppercase tracking-wide text-gray-400",children:e.label}),(0,r.jsx)(t,{size:16,className:"text-gray-300 dark:text-white/30"})]}),(0,r.jsx)("p",{className:"mt-2 truncate text-2xl font-bold",children:e.value})]},e.label)})}),A&&(0,r.jsxs)("div",{className:"grid items-center gap-5 lg:grid-cols-[340px_minmax(0,1fr)]",children:[(0,r.jsx)("div",{className:"flex justify-center lg:justify-start",children:(0,r.jsx)(s.A,{})}),(0,r.jsx)(a.A,{})]}),(0,r.jsxs)("section",{className:"rounded-2xl border border-gray-100 dark:border-white/10",children:[(0,r.jsxs)("div",{className:"flex items-center justify-between px-5 py-4",children:[(0,r.jsx)("h2",{className:"text-sm font-semibold",children:"Recent orders"}),(0,r.jsxs)(j(),{href:"/account/orders",className:"inline-flex items-center gap-1 text-sm font-medium text-primary-600 hover:underline dark:text-primary-400",children:["View all ",(0,r.jsx)(g,{size:15})]})]}),(0,r.jsx)("div",{className:"border-t border-gray-100 dark:border-white/10",children:0===k.length?(0,r.jsxs)("div",{className:"flex flex-col items-center gap-3 px-5 py-10 text-center",children:[(0,r.jsx)("div",{className:"flex h-12 w-12 items-center justify-center rounded-full bg-gray-100 text-gray-400 dark:bg-white/5",children:(0,r.jsx)(v.A,{size:22})}),(0,r.jsx)("p",{className:"text-sm text-gray-500 dark:text-[var(--dark-secondary-text)]",children:"No orders yet."}),(0,r.jsx)(j(),{href:"/products",className:"text-sm font-medium text-primary-600 hover:underline dark:text-primary-400",children:"Start shopping"})]}):(0,r.jsx)("ul",{className:"divide-y divide-gray-100 dark:divide-white/10",children:k.map(e=>{let t=(e.product_total_price||0)+(e.delivery_charge||0)-(e=>"number"==typeof e?e:(null==e?void 0:e.d_value)||0)(e.discount),l=e.status||e.payment_status;return(0,r.jsx)("li",{children:(0,r.jsxs)(j(),{href:"/track/".concat(e._id),className:"flex items-center gap-3 px-5 py-3.5 transition-colors hover:bg-gray-50 dark:hover:bg-white/5",children:[(0,r.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,r.jsxs)("p",{className:"text-sm font-medium",children:["#",e.order_number]}),(0,r.jsx)("p",{className:"text-xs text-gray-400",children:(e=>{if(!e)return"";let t=new Date(e);return Number.isNaN(t.getTime())?"":t.toLocaleDateString(void 0,{month:"short",day:"numeric"})})(e.created_at)})]}),l&&(0,r.jsx)("span",{className:"rounded-full px-2.5 py-1 text-[11px] font-medium capitalize ".concat((e=>{let t=(e||"").toLowerCase();return["delivered","completed","paid"].includes(t)?"bg-green-100 text-green-700 dark:bg-green-500/15 dark:text-green-400":["cancelled","failed","returned"].includes(t)?"bg-red-100 text-red-700 dark:bg-red-500/15 dark:text-red-400":"bg-amber-100 text-amber-700 dark:bg-amber-500/15 dark:text-amber-400"})(l)),children:l}),(0,r.jsx)("p",{className:"currency w-24 text-right text-sm font-semibold",children:(0,o.vv)(t)})]})},e._id||e.order_number)})})})]})]})};var w=!0;function _(e){var t,l,s,a,d;let{store:o}=e;return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i.A,{title:"My Account | "+((null==o||null==(t=o.customization)?void 0:t.brand_name)||(null==o?void 0:o.name)),brand_name:(null==o||null==(l=o.customization)?void 0:l.brand_name)||(null==o?void 0:o.name),description:(null==o?void 0:o.description)||(null==o||null==(s=o.customization)?void 0:s.top_bar_text),no_index:!0,og:{image:(null==o||null==(d=o.customization)||null==(a=d.hero_images)?void 0:a[0])||"/images/empty_store.png"}}),(0,r.jsx)(n.A,{active:"overview",children:(0,r.jsx)(N,{})})]})}},89735:(e,t,l)=>{"use strict";l.d(t,{A:()=>a});var r=l(37876),n=l(77328),s=l.n(n);function a(e){var t,l,n,a,i,d;let{no_index:o=!1,...c}=e;return(0,r.jsxs)(s(),{children:[(0,r.jsx)("title",{children:c.title}),(0,r.jsx)("meta",{name:"description",content:c.description}),c.canonical&&(0,r.jsx)("link",{rel:"canonical",href:c.canonical}),(0,r.jsx)("meta",{property:"og:locale",content:"en_US"}),(0,r.jsx)("meta",{property:"og:title",content:(null==c||null==(t=c.og)?void 0:t.t
1itle)||c.title}),(0,r.jsx)("meta",{property:"og:description",content:c.description}),(0,r.jsx)("meta",{property:"og:type",content:(null==c||null==(l=c.og)?void 0:l.type)||"website"}),(null==c||null==(n=c.og)?void 0:n.type)==="article"&&(null==c||null==(a=c.og)?void 0:a.published_time)&&(0,r.jsx)("meta",{property:"article:published_time",content:c.og.published_time}),(null==c||null==(i=c.og)?void 0:i.type)==="article"&&(null==c||null==(d=c.og)?void 0:d.author)&&(0,r.jsx)("meta",{property:"article:author",content:c.og.author}),(0,r.jsx)("meta",{property:"og:site_name",content:c.brand_name}),(0,r.jsx)("meta",{property:"og:image",content:c.og.image}),(0,r.jsx)("meta",{property:"og:image:secure_url",content:c.og.image}),(0,r.jsx)("meta",{name:"twitter:title",content:c.title}),(0,r.jsx)("meta",{name:"twitter:description",content:c.description}),(0,r.jsx)("meta",{name:"twitter:site",content:"@".concat(c.brand_name||c.title)}),(0,r.jsx)("meta",{name:"twitter:card",content:"summary_large_image"}),(0,r.jsx)("meta",{name:"twitter:image",content:c.og.image}),o&&(0,r.jsx)("meta",{name:"robots",content:"noindex, nofollow"})]})}l(14232)}},e=>{e.O(0,[1849,5184,636,6593,8792],()=>e(e.s=15033)),_N_E=e.O()}]);
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.