!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="2590821e-93a1-4f15-9e8c-e72fa88ed9c2",e._sentryDebugIdIdentifier="sentry-dbid-2590821e-93a1-4f15-9e8c-e72fa88ed9c2")}catch(e){}}(),(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9930],{39930:function(e,t,n){n.d(t,{UT:function(){return he},tw:function(){return Le},St:function(){return be},P0:function(){return Me},WA:function(){return l},QV:function(){return $},xb:function(){return J},GV:function(){return te},Sf:function(){return Re}});var r=n(2784),i=n(7307),s=n(88627);const a=(0,i.default)(s.He).withConfig({componentId:"sc-1lwtses-0"})(["margin-bottom:",";"],(e=>{let{theme:t}=e;return t.spacing[40]}));var o=n(52322);var l=function(e){let{children:t}=e;return(0,o.jsx)(a,{children:t})},c=n(90862),d=n(51855),u=n(25332),p=n(70510),m=n(82091),h=n(82090),g=n(2002),f=n(97224),x=n(64897),j=n(17189),y=n(58529),b=n(84267);const w=i.default.span.withConfig({componentId:"sc-aicnew-0"})(["","{display:none;}"],(e=>{let{theme:t}=e;return t.mediaQuery.desktop})),v=i.default.span.withConfig({componentId:"sc-aicnew-1"})(["display:none;","{display:inline;}"],(e=>{let{theme:t}=e;return t.mediaQuery.desktop})),I=(0,i.default)(s.He).attrs({as:"section"}).withConfig({componentId:"sc-aicnew-2"})(["display:flex;align-items:center;position:relative;"]),k=i.default.div.withConfig({componentId:"sc-aicnew-3"})(["display:flex;flex-direction:column;","{flex:0 0 ",";}"],(e=>{let{theme:t}=e;return t.mediaQuery.desktop}),(e=>{let{theme:t}=e;return t.pxToRem(300)})),C=i.default.div.withConfig({componentId:"sc-aicnew-4"})(["width:100%;"]),O=i.default.div.withConfig({componentId:"sc-aicnew-5"})(["display:flex;flex:1 1 auto;flex-direction:column;padding:"," 0;","{flex-direction:row;align-items:center;padding:"," 0;}"],(e=>{let{theme:t}=e;return t.spacing[24]}),(e=>{let{theme:t}=e;return t.mediaQuery.desktop}),(e=>{let{theme:t}=e;return t.spacing[24]})),P=i.default.div.withConfig({componentId:"sc-aicnew-6"})(["&::after{content:'';position:absolute;top:0;left:0;width:100%;height:100%;}"]),S=i.default.div.withConfig({componentId:"sc-aicnew-7"})(["color:",";flex-shrink:0;"],(e=>{let{theme:t}=e;return t.color.primary})),T=(0,i.default)(j.H).attrs({large:!0,variant:"h2"}).withConfig({componentId:"sc-aicnew-8"})(["margin-top:0;margin-bottom:",";"],(e=>{let{theme:t}=e;return t.spacing[4]})),N=(0,i.default)(y.T).attrs({variant:"body"}).withConfig({componentId:"sc-aicnew-9"})(["margin-top:0;margin-bottom:",";"],(e=>{let{theme:t}=e;return t.spacing[4]})),A=(0,i.default)(b.P).attrs((e=>({regPrice:e.regPrice}))).withConfig({componentId:"sc-aicnew-10"})(["font-size:16px;"]);var $=e=>{let{purchase:t}=e;const n=(0,m.useLocalizer)(),{text:r}=n,i=(0,x.Z)(),s=new Date(t.date).toLocaleString(i.locale,{month:"long",day:"2-digit",year:"numeric"}),a=(0,g.T4)(t.amount,t.currency,n);let l=(0,o.jsx)(c.d_,{status:t.status}),j=(0,o.jsxs)(N,{children:[r("Ship to:")," ",t.shipping?.firstName," ",t.shipping?.lastName]});return"digital"===t.type&&(l=null,j=(0,o.jsx)(N,{children:r(t.platform||"")})),(0,o.jsxs)(I,{children:[(0,o.jsxs)(O,{children:[(0,o.jsxs)(k,{children:[(0,o.jsx)(T,{children:s}),(0,o.jsx)(A,{regPrice:`${a}`}),(0,o.jsxs)(N,{children:[r("Purchase type:")," ",r((0,h.zf)(t.type))]}),j,r("Order Number:")," ",t.id]}),(0,o.jsxs)(C,{children:[l,(0,o.jsx)(J,{purchase:t})]})]}),(0,o.jsxs)(S,{children:[(0,o.jsxs)(w,{children:[(0,o.jsx)(f.Z,{href:`/orders/${t.id}`,children:(0,o.jsx)(P,{})}),(0,o.jsx)(d.Z,{})]}),(0,o.jsx)(v,{children:(0,o.jsx)(u.I,{href:`/orders/${t.id}`,icon:p.Z,locale:i.locale,children:r("View details")})})]})]})},L=n(95235);const Q=i.default.div.withConfig({componentId:"sc-2cetgr-0"})(["display:flex;gap:",";align-items:center;margin-top:",";flex:1 0 auto;"],(e=>{let{theme:t}=e;return t.spacing[16]}),(e=>{let{theme:t}=e;return t.spacing[16]})),Z=i.default.span.withConfig({componentId:"sc-2cetgr-1"})(["display:none;","{display:inline;}"],(e=>{let{theme:t}=e;return t.mediaQuery.desktop})),D=i.default.span.withConfig({componentId:"sc-2cetgr-2"})(["","{display:none;}"],(e=>{let{theme:t}=e;return t.mediaQuery.desktop})),q=(0,i.default)(Q).withConfig({componentId:"sc-2cetgr-3"})(["align-items:flex-start;"]),_=i.default.div.withConfig({componentId:"sc-2cetgr-4"})(["display:none;","{display:flex;}"],(e=>{let{theme:t}=e;return t.mediaQuery.desktop})),z=i.default.div.withConfig({componentId:"sc-2cetgr-5"})(["font-weight:bold;display:block;"]),B=i.default.div.withConfig({componentId:"sc-2cetgr-6"})(["overflow:hidden;flex-shrink:0;"]),H=(0,i.default)(y.T).attrs({variant:"title"}).withConfig({componentId:"sc-2cetgr-7"})(["margin-top:0;text-overflow:ellipsis;overflow:hidden;"]),G=i.default.div.withConfig({componentId:"sc-2cetgr-8"})(["font-size:",";&:first-of-type{margin-top:4px;}"],(e=>{let{theme:t}=e;return t.font.size.legalDesktop}));var E=n(36734);function F(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function M(e){for(var t=1;t{const{amount:t}=e;return(0,o.jsx)(Z,{children:(0,o.jsxs)(z,{children:["+",t]})})},W=e=>{const{amount:t}=e;return(0,o.jsx)(D,{children:(0,o.jsxs)(z,{children:["+",t]})})},Y=3,K=2,U=e=>{const{items:t}=e,n=t.slice(0,K),[i]=t.slice(K,K+1);return(0,o.jsxs)(Q,{children:[n.map((e=>(0,o.jsxs)(r.Fragment,{children:[(0,o.jsx)(c.qN,{alt:e.name,publicId:e.image||E.BY}),1===t.length&&(0,o.jsxs)("div",{children:[(0,o.jsx)(H,{children:e.name}),!!e.bundleOptions?.length&&(0,o.jsx)("div",{children:e.bundleOptions.map((e=>(0,o.jsx)(G,{children:e.values?.[0]?.product?.name},e.id)))})]})]},`item-${e.sku}`))),t.length>Y?(0,o.jsx)(_,{children:(0,o.jsx)(c.qN,{alt:i.name,publicId:i.image||E.BY})}):null,t.length>Y?(0,o.jsx)(R,{amount:t.length-Y}):null,t.length>K?(0,o.jsx)(W,{amount:t.length-K}):null]})},V=e=>{let{image:t,name:n}=e;return(0,o.jsxs)(q,{children:[(0,o.jsx)(B,{children:(0,o.jsx)(c.qN,{alt:"Product art",publicId:t||E.BY})}),(0,o.jsx)(H,{children:n})]})};var J=e=>{let{purchase:t}=e;return"physical"===t.type?(0,o.jsx)(U,M({},t)):(0,o.jsx)(V,M({},t))},X=n(47612);const ee=(0,i.default)(X.S).withConfig({componentId:"sc-19mpt7o-0"})(["> div{height:175px;margin-bottom:50px;}"]);var te=()=>(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(s.h8,{}),(0,o.jsxs)(s.$0,{constrained:!0,children:[(0,o.jsx)(ee,{}),(0,o.jsx)(ee,{}),(0,o.jsx)(ee,{})]})]}),ne=n(39021),re=n(66652),ie=n(1505);i.default.div.withConfig({componentId:"sc-1wh0o51-0"})(["display:flex;justify-content:center;align-items:center;flex-direction:column;margin-top:",";"],(e=>{let{theme:t}=e;return t.spacing[64]})),(0,i.default)(y.T).attrs({variant:"title"}).withConfig({componentId:"sc-1wh0o51-1"})(["display:flex;flex-direction:column;margin-top:",";","{display:block;}"],(e=>{let{theme:t}=e;return t.spacing[32]}),(e=>{let{theme:t}=e;return t.mediaQuery.desktop}));const se=i.default.div.withConfig({componentId:"sc-1wh0o51-2"})(["margin-top:",";display:flex;justify-content:center;"],(e=>{let{theme:t}=e;return t.spacing[24]})),ae=(0,i.default)(re.B).withConfig({componentId:"sc-1wh0o51-3"})(["min-width:150px;"]),oe=(0,i.default)(s.He).withConfig({componentId:"sc-1wh0o51-4"})(["display:flex;flex-direction:column;","{align-items:flex-end;flex-direction:row;justify-content:space-between;gap:",";}"],(e=>{let{theme:t}=e;return t.mediaQuery.desktop}),(e=>e.theme.spacing[20])),le=(i.default.div.withConfig({componentId:"sc-1wh0o51-5"})(["","{width:100%;max-width:",";}"],(e=>{let{theme:t}=e;return t.mediaQuery.desktop}),(e=>{let{theme:t}=e;return t.pxToRem(260)})),i.default.div.withConfig({componentId:"sc-1wh0o51-6"})(["display:flex;flex-direction:row;gap:",";align-items:center;"],(e=>{let{theme:t}=e;return t.spacing[16]}))),ce=(0,i.default)(y.T).attrs({variant:"title"}).withConfig({componentId:"sc-1wh0o51-7"})(["margin-right:",";margin-bottom:",";","{display:flex;align-items:center;margin-bottom:0;}"],(e=>{let{theme:t}=e;return t.spacing[16]}),(e=>{let{theme:t}=e;return t.spacing[8]}),(e=>{let{theme:t}=e;return t.mediaQuery.desktop})),de=i.default.div.withConfig({componentId:"sc-1wh0o51-8"})(["margin-bottom:",";","{display:flex;align-items:center;}"],(e=>{let{theme:t}=e;return t.spacing[16]}),(e=>{let{theme:t}=e;return t.mediaQuery.desktop})),ue=i.default.span.withConfig({componentId:"sc-1wh0o51-9"})(["display:none;","{display:inline;}"],(e=>{let{theme:t}=e;return t.mediaQuery.desktop}));var pe=n(22585);function me(e){if(!e)return[];return e.map((e=>(0,pe.ZP)(e)))}var he=e=>{let{fetchMore:t,refetch:n,purchases:i,loading:a,totals:c}=e;const{text:d}=(0,m.useLocalizer)(),u=(0,x.Z)(),{0:p,1:h}=(0,r.useState)(me(i)),{0:g,1:j}=(0,r.useState)(!1),{0:y,1:b}=(0,r.useState)(2),{0:w,1:v}=(0,r.useState)(null),{0:I,1:k}=(0,r.useState)(0),C=(0,r.useCallback)((e=>{v(e),j(!0);n({page:1,where:{type:{eq:e}}}).then((e=>{const t=me(e.data?.customer?.orderHistory?.orders);h(t),b(2),j(!1)}))}),[n]);return(0,r.useEffect)((()=>{null===w?k(c.digital+c.physical):"DIGITAL"===w?k(c.digital):"PHYSICAL"===w&&k(c.physical)}),[c.digital,c.physical,w]),a?null:(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(s.h5,{title:"Purchase history",children:(0,o.jsxs)(ne.B,{currentPage:u.pathname,children:[(0,o.jsx)(f.Z,{href:"/",children:(0,o.jsx)("a",{children:d("Home")})}),(0,o.jsx)(f.Z,{href:"/orders",children:(0,o.jsx)("a",{children:d("Purchase history")})})]})}),p.length||null!==w?(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(oe,{children:(0,o.jsxs)(de,{children:[(0,o.jsx)(ce,{children:d("Category:")}),(0,o.jsxs)(le,{children:[(0,o.jsxs)(re.B,{still:!0,size:"small",variant:"quaternary",round:!0,selected:null===w,onClick:()=>C(null),children:[d("Show all")," ",(0,o.jsxs)(ue,{children:["(",c.digital+c.physical,")"]})]}),(0,o.jsxs)(re.B,{still:!0,size:"small",variant:"quaternary",round:!0,selected:"DIGITAL"===w,disabled:0===c.digital,onClick:()=>C("DIGITAL"),children:[d("Digital")," ",(0,o.jsxs)(ue,{children:["(",c.digital,")"]})]}),(0,o.jsxs)(re.B,{still:!0,size:"small",variant:"quaternary",round:!0,selected:"PHYSICAL"===w,disabled:0===c.physical,onClick:()=>C("PHYSICAL"),children:[d("Physical")," ",(0,o.jsxs)(ue,{children:["(",c.physical,")"]})]})]})]})}),(0,o.jsx)(s.He,{children:p.map((e=>(0,o.jsxs)(r.Fragment,{children:[(0,o.jsx)(s.Hr,{}),(0,o.jsx)($,{purchase:e})]},`purchase-${e.id}`)))}),(0,o.jsxs)(l,{children:[(0,o.jsx)(s.Hr,{}),p.length(j(!0),void t({variables:{page:y}}).then((e=>{const t=me(e.data?.customer?.orderHistory?.orders);h([...p,...t]),b(y+1),j(!1)}))),children:d("Load more")})}):null]})]}):(0,o.jsx)(be,{})]})},ge=n(59153),fe=n(92951);const xe=i.default.div.withConfig({componentId:"sc-1bq8esa-0"})(["display:flex;justify-content:center;align-items:center;flex-direction:column;margin-top:",";"],(e=>{let{theme:t}=e;return t.spacing[64]})),je=(0,i.default)(fe.Z).withConfig({componentId:"sc-1bq8esa-1"})(["height:",";width:auto;"],(e=>{let{theme:t}=e;return t.spacing[48]})),ye=(0,i.default)(y.T).attrs({variant:"title"}).withConfig({componentId:"sc-1bq8esa-2"})(["display:flex;flex-direction:column;margin-top:",";","{display:block;}"],(e=>{let{theme:t}=e;return t.spacing[32]}),(e=>{let{theme:t}=e;return t.mediaQuery.desktop}));var be=function(){const{text:e}=(0,m.useLocalizer)(),t=(0,x.Z)();return(0,o.jsx)(s.$0,{constrained:!0,children:(0,o.jsxs)(xe,{children:[(0,o.jsx)(je,{}),(0,o.jsxs)(ye,{children:[(0,o.jsx)("span",{children:e("No purchase history to show.")})," ",(0,o.jsxs)("span",{children:[e("Why not add")," ",(0,o.jsx)(ge.L,{href:"/store",locale:t.locale,children:e("something fun")}),"?"]})]})]})})},we=n(33656),ve=n(15596),Ie=n(98087),ke=n(76454);const Ce=i.default.div.withConfig({componentId:"sc-au0dvl-0"})(["display:flex;flex-direction:column;margin-bottom:",";","{flex-direction:row;justify-content:space-between;align-items:center;}"],(e=>{let{theme:t}=e;return t.spacing[16]}),(e=>{let{theme:t}=e;return t.mediaQuery.desktop})),Oe=(0,i.default)(y.T).attrs({variant:"title"}).withConfig({componentId:"sc-au0dvl-1"})(["margin-top:0;"]),Pe=(0,i.default)(y.T).attrs({variant:"caption"}).withConfig({componentId:"sc-au0dvl-2"})(["margin:0;font-weight:bold;"]),Se=i.default.div.withConfig({componentId:"sc-au0dvl-3"})(["display:grid;grid-template-columns:1fr;column-gap:",";margin-bottom:",";max-width:",";width:100%;","{grid-template-columns:1fr 1fr;}"],(e=>{let{theme:t}=e;return t.spacing[32]}),(e=>{let{theme:t}=e;return t.spacing[32]}),(e=>{let{theme:t}=e;return t.pxToRem(800)}),(e=>{let{theme:t}=e;return t.mediaQuery.desktop})),Te=i.default.div.withConfig({componentId:"sc-au0dvl-4"})(["","{grid-column:1 / 3;}"],(e=>{let{theme:t}=e;return t.mediaQuery.desktop})),Ne=i.default.div.withConfig({componentId:"sc-au0dvl-5"})(["margin-bottom:",";","{grid-column:1 / 3;}"],(e=>{let{theme:t}=e;return t.spacing[48]}),(e=>{let{theme:t}=e;return t.mediaQuery.desktop})),Ae=(0,i.default)(s.$0).attrs({constrained:!0}).withConfig({componentId:"sc-au0dvl-6"})(["margin-top:",";"],(e=>{let{theme:t}=e;return t.spacing[64]})),$e=(0,i.default)(y.T).attrs({variant:"title"}).withConfig({componentId:"sc-au0dvl-7"})(["margin-bottom:",";"],(e=>{let{theme:t}=e;return t.spacing[16]}));var Le=()=>{const{text:e}=(0,m.useLocalizer)(),t=(0,m.useAccounts)(),n=(0,x.Z)(),[r,{loading:i,error:a,data:l}]=(0,Ie.td)(ke.o$.LN);if(l?.guestOrder&&!a){const e=(0,pe.ZP)(l.guestOrder,n.locale);return(0,o.jsx)(Me,{order:e})}return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(s.h5,{title:"Track order status",children:(0,o.jsxs)(ne.B,{currentPage:n.pathname,children:[(0,o.jsx)(f.Z,{href:"/",children:(0,o.jsx)("a",{children:e("Home")})}),(0,o.jsx)(f.Z,{href:"/orders",children:(0,o.jsx)("a",{children:e("Track order status")})})]})}),(0,o.jsx)(s.$0,{constrained:!0,children:(0,o.jsxs)("form",{onSubmit:e=>{e.preventDefault();const t=e.currentTarget.elements.number,i=e.currentTarget.elements.postcode,s=e.currentTarget.elements.lastname;r({orderNumber:t.value,postcode:i.value?.toUpperCase(),lastname:s.value,locale:n.locale})},children:[(0,o.jsxs)(Se,{children:[(a||null===l?.guestOrder)&&(0,o.jsx)(Ne,{children:(0,o.jsx)(we.N,{type:"error",children:e("Sorry, but we could not find that order. Please check your entry and try again.")})}),(0,o.jsx)(Te,{children:(0,o.jsxs)(Ce,{children:[(0,o.jsx)(Oe,{children:e("Order information")}),(0,o.jsx)(Pe,{children:e("* Required fields")})]})}),(0,o.jsx)(ve.I,{placeholder:e("Order number"),label:e("Order number"),name:"number",required:!0}),(0,o.jsx)(ve.I,{placeholder:e("Billing Zip/postal code"),label:e("Billing Zip/postal code"),name:"postcode",required:!0}),(0,o.jsx)(Te,{children:(0,o.jsx)(ve.I,{placeholder:e("Billing last name"),label:e("Billing last name"),name:"lastname",required:!0})}),l?.guestOrder&&!a&&(0,o.jsx)(Ne,{children:(0,o.jsx)(we.N,{type:"success",children:e("Order found!")})})]}),(0,o.jsx)(re.B,{isLoading:i,children:e("Continue")})]})}),(0,o.jsxs)(Ae,{children:[(0,o.jsx)($e,{children:e("Can't find your order number? Log in to access your order history.")}),(0,o.jsx)(re.B,{variant:"secondary",onClick:()=>t.promptLogin(),children:e("Log in")})]})]})},Qe=n(39178),Ze=n(43499);const De=i.default.div.withConfig({componentId:"sc-l9j285-0"})(["border-radius:",";"],(e=>{let{theme:t}=e;return t.borderRadius})),qe=(0,i.default)(s.h5).withConfig({componentId:"sc-l9j285-1"})(["margin-bottom:",";","{margin-bottom:",";}"],(e=>{let{theme:t}=e;return t.spacing[16]}),(e=>{let{theme:t}=e;return t.mediaQuery.desktop}),(e=>{let{theme:t}=e;return t.spacing[24]})),_e=i.default.div.withConfig({componentId:"sc-l9j285-2"})(["display:flex;flex-direction:column;margin:0 0 ",";gap:",";"],(e=>{let{theme:t}=e;return t.spacing[32]}),(e=>{let{theme:t}=e;return t.spacing[8]})),ze=i.default.div.withConfig({componentId:"sc-l9j285-3"})(["display:flex;gap:",";flex-direction:column;","{gap:",";align-items:flex-end;flex-direction:row;}"],(e=>{let{theme:t}=e;return t.spacing[8]}),(e=>{let{theme:t}=e;return t.mediaQuery.desktop}),(e=>{let{theme:t}=e;return t.spacing[32]})),Be=((0,i.default)(De).withConfig({componentId:"sc-l9j285-4"})(["display:flex;flex-direction:column;margin-bottom:",";"," & > *{flex:1;padding:",";&:not(:last-child){border-bottom:solid 1px ",";}}","{flex-direction:row;& > *{&:not(:last-child){border-bottom:0;border-right:solid 1px ",";}}}"],(e=>{let{theme:t}=e;return t.spacing[32]}),(e=>{let{theme:t}=e;return(0,i.css)(["border:solid 1px ",";"],t.color.lightGray2)}),(e=>{let{theme:t}=e;return t.spacing[24]}),(e=>{let{theme:t}=e;return t.color.lightGray2}),(e=>{let{theme:t}=e;return t.mediaQuery.tablet}),(e=>{let{theme:t}=e;return t.color.lightGray2})),i.default.div.withConfig({componentId:"sc-l9j285-5"})(["display:flex;margin-bottom:",";font-weight:bold;svg{margin-right:",";}"],(e=>{let{theme:t}=e;return t.spacing[32]}),(e=>{let{theme:t}=e;return t.spacing[8]}))),He=(0,i.default)(De).withConfig({componentId:"sc-l9j285-6"})(["margin-bottom:",";& > *{&:first-child{border-bottom:solid 1px ",";padding-bottom:",";}}","{"," & > *{padding:",";&:first-child{padding:",";margin:0;border-bottom:solid 1px ",";}}}"],(e=>{let{theme:t}=e;return t.spacing[32]}),(e=>{let{theme:t}=e;return t.color.lightGray2}),(e=>{let{theme:t}=e;return t.spacing[8]}),(e=>{let{theme:t}=e;return t.mediaQuery.tablet}),(e=>{let{theme:t}=e;return(0,i.css)(["border:solid 1px ",";margin-bottom:",";"],t.color.lightGray2,t.spacing[32])}),(e=>{let{theme:t}=e;return t.spacing[16]}),(e=>{let{theme:t}=e;return t.spacing[16]}),(e=>{let{theme:t}=e;return t.color.lightGray2})),Ge=i.default.div.withConfig({componentId:"sc-l9j285-7"})(["display:flex;justify-content:space-between;flex-direction:column;","{flex-direction:row;}"],(e=>{let{theme:t}=e;return t.mediaQuery.tablet})),Ee=(0,i.default)(y.T).attrs({variant:"caption"}).withConfig({componentId:"sc-l9j285-8"})(["display:flex;align-items:center;margin-top:",";","{margin-top:0;}"],(e=>{let{theme:t}=e;return t.spacing[4]}),(e=>{let{theme:t}=e;return t.mediaQuery.tablet})),Fe=(i.default.div.withConfig({componentId:"sc-l9j285-9"})(["margin-top:",";"],(e=>{let{theme:t}=e;return t.spacing[16]})),i.default.span.withConfig({componentId:"sc-l9j285-10"})(["font-weight:bold;"]));var Me=e=>{let{order:t,customer:n}=e;const r=(0,m.useLocalizer)(),{text:i}=r,a=(0,x.Z)(),d=(0,m.useAccounts)(),p=new Date(t.date).toLocaleString(a.locale,{month:"2-digit",day:"2-digit",year:"numeric"}),{currency:h,totals:j,type:y}=t,b=(0,g.T4)(j.grand,h,r);return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(qe,{title:"Order details",children:(0,o.jsxs)(ne.B,{currentPage:a.asPath,children:[(0,o.jsx)(f.Z,{href:"/",children:(0,o.jsx)("a",{children:i("Home")})}),(0,o.jsx)(f.Z,{href:"/orders",children:(0,o.jsx)("a",{children:i("Purchase history")})}),(0,o.jsx)(f.Z,{href:`/orders/${t.id}/`,children:(0,o.jsx)("a",{children:`${i("Order #")} ${t.id}`})})]})}),(0,o.jsxs)(s.He,{children:["physical"===y?(0,o.jsx)(_e,{children:(0,o.jsxs)(ze,{children:[(0,o.jsx)("div",{children:(0,o.jsx)(c.d_,{status:t.status})}),(0,o.jsxs)("div",{children:[(0,o.jsx)(Fe,{children:i("Transaction date:")})," ",p]}),(0,o.jsxs)("div",{children:[(0,o.jsx)(Fe,{children:i("Order total:")})," ",b]})]})}):(0,o.jsxs)(_e,{children:[(0,o.jsxs)(ze,{children:[(0,o.jsxs)("div",{children:[(0,o.jsx)(Fe,{children:i("Transaction date:")})," ",p]}),(0,o.jsxs)("div",{children:[(0,o.jsx)(Fe,{children:i("Order total:")})," ",b]})]}),(0,o.jsxs)(ze,{children:[t.platform&&(0,o.jsxs)("div",{children:[(0,o.jsx)(Fe,{children:i("Device type:")})," ",t.platform]}),(0,o.jsxs)("div",{children:[(0,o.jsx)(Fe,{children:i("Associated Nintendo Account:")})," ",n?.email]})]})]}),"physical"===y?(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(c.qR,{billingAddress:t.billing,shippingAddress:t.shipping,paymentMethod:t.payment,shippingMethod:t.shipping.method,shipments:t.shipments}),(0,o.jsx)(Qe.S,{size:32})]}):null,(0,o.jsxs)(Be,{children:[i("Need a hand?"),(0,o.jsx)(Qe.S,{size:4,axis:"horizontal"}),(0,o.jsx)(ge.L,{href:"https://en-americas-support.nintendo.com/app/contact",target:"_blank",children:i("Contact Customer Support")})]}),t.shipments.map(((e,n)=>{const{items:r}=e,[s]=e.tracking;return(0,o.jsxs)(He,{children:[(0,o.jsxs)(Ge,{children:[(0,o.jsx)(Re,{tracking:s,variant:"title"}),(0,o.jsxs)(Ee,{children:[i("{0} of {1}",{args:[n+1,t.shipments.length]})," ","(",r.length,")"]})]}),(0,o.jsx)("div",{children:r.map((e=>{const n=e.bundleName||e.name,r=e.bundleName?e.name:null;return(0,o.jsx)(c.Dd,{locale:a.locale,finalprice:e.finalPricePerItem,quantity:e.quantity,name:n,subtitle:r,publicId:e.image,currency:t.currency,type:y,title:e.name||e.product?.name,urlKey:e.urlKey||e.product?.urlKey,hidePrice:!0},`order-${e.sku}`)}))})]},e.number)})),(0,o.jsx)(c.a3,{couponCode:t.couponCode,currency:t.currency,shippingMethod:t.shipping.method,totals:j,type:y}),(0,o.jsx)(c.iQ,{items:t.items,currency:h,locale:a.locale,type:y}),(0,o.jsx)(Qe.S,{size:32})]}),(0,o.jsx)(l,{children:d.isLoggedIn?(0,o.jsx)(u.I,{href:"/orders",icon:Ze.Z,locale:a.locale,children:i("Back to purchase history")}):(0,o.jsx)(u.I,{onClick:()=>a.reload(window.location.pathname),icon:Ze.Z,locale:a.locale,children:i("Look up another order")})})]})};var Re=e=>{let{tracking:t,variant:n}=e;const{text:r}=(0,m.useLocalizer)();return(0,o.jsxs)(y.T,{variant:n,children:[r("{0} tracking",{args:[t?.carrier?.toUpperCase()]})," ",(0,o.jsx)(ge.L,{href:t.url,target:"_blank",children:t.number})]})}},22585:function(e,t,n){n.d(t,{ZP:function(){return c}});var r=n(95235),i=n(82090);function s(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function a(e){for(var t=1;t({sku:e.product?.sku,bundleOptions:e.bundleOptions,name:e.product?.name,image:e.product?.productImage?.publicId,isDiscounted:e.product?.prices?.minimum?.discounted,finalPricePerItem:e.productSalePrice,regularPricePerItem:e.product?.prices?.minimum?.regularPrice,platform:e.product?.platform?.label,quantity:e.quantityOrdered,amount:e.productSalePrice,platinumPoints:e.product?.platinumPoints,urlKey:e.product?.urlKey}),l=e=>(e.items||[]).reduce(((t,n)=>{let{orderItem:r,parentSku:i}=n;if(r.productSku.split("-").length>2)return t;const s=e.items.find((e=>{let{orderItem:t}=e;return t.productSku===i}));return[...t,a(a({},o(a(a({},r),{},{productSalePrice:s?.orderItem?.product?.prices?.minimum?.regularPrice||r?.product?.prices?.minimum?.regularPrice}))),{},{image:s?s.orderItem?.product?.productImage?.publicId:r?.product?.productImage?.publicId,quantity:r.quantityShipped,parentSku:i,bundleName:s?.orderItem?.product?.name})]}),[]);function c(e,t){const n=e.items.map(o),r=e.shipments?.map((e=>((e,t)=>{const n=(0,i.$w)(t);return{number:e.number,items:l(e),tracking:e.tracking.map((e=>((e,t)=>{const n={en:{fedex:`https://www.fedex.com/apps/fedextrack/?action=track&trackingnumber=${e.number}`,ups:`https://wwwapps.ups.com/WebTracking/track?track=yes&trackNums=${e.number}`,"ups mi":`https://wwwapps.ups.com/WebTracking/track?track=yes&trackNums=${e.number}`,usps:`https://tools.usps.com/go/TrackConfirmAction_input?qtc_tLabels1=${e.number}`,puro:`https://www.purolator.com/${t}/shipping/tracker?pin=${e.number}`,"canada post":`https://www.canadapost-postescanada.ca/track-reperage/${t}#/search?searchFor=${e.number}`},fr:{fedex:`https://www.fedex.com/apps/fedextrack/?action=track&trackingnumber=${e.number}`,ups:`https://wwwapps.ups.com/WebTracking/track?track=yes&trackNums=${e.number}`,"ups mi":`https://wwwapps.ups.com/WebTracking/track?track=yes&trackNums=${e.number}`,usps:`https://tools.usps.com/go/TrackConfirmAction_input?qtc_tLabels1=${e.number}`,puro:`https://www.purolator.com/${t}/expedition/faire-le-suivi-dun-envoi?pin=${e.number}`,"canada post":`https://www.canadapost-postescanada.ca/track-reperage/${t}#/search?searchFor=${e.number}`}};return{title:e.title,number:e.number,carrier:e.carrier,url:n[t][e.carrier]||"#"}})(e,n)))}})(e,t)));return{id:e.id||e.number,couponCode:e.couponCode,name:n[0].name||e.contentName,type:"StoreOrder"==e.__typename||"GuestOrder"==e.__typename?"physical":"digital",date:e.orderDate,amount:e.total.grandTotal,platform:n[0].platform,image:n[0].image,status:e.status||null,billing:{firstName:e.billingAddress?.firstName,lastName:e.billingAddress?.lastName,street:e.billingAddress?.street,city:e.billingAddress?.city,postcode:e.billingAddress?.postcode,region:e.billingAddress?.region?.name,country:e.billingAddress?.country?.fillNameEnglish,telephone:e.billingAddress?.telephone},shipping:{firstName:e.shippingAddress?.firstName,lastName:e.shippingAddress?.lastName,street:e.shippingAddress?.street,city:e.shippingAddress?.city,postcode:e.shippingAddress?.postcode,region:e.shippingAddress?.region?.name,country:e.shippingAddress?.country?.fillNameEnglish,telephone:e.shippingAddress?.telephone,method:e.shippingMethod,carrier:e.shipments?.tracking?.carrier,number:e.shipments?.tracking?.number,title:e.shipments?.tracking?.title},payment:{method:e.paymentMethod?.method,type:e.paymentMethod?.type,last4:e.paymentMethod?.last4},totals:{discounts:e.total.discounts,grand:e.total.grandTotal,sub:e.total.subtotal,tax:e.total.totalTax,taxes:e.total.taxes,shipping:e.total.totalShipping},shipments:r||[],items:n}}}}]); //# sourceMappingURL=9930-87e2357e50c76199.js.map