1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5972,6578],{70653:function(e,r,t){"use strict";var o,a=t(2784);function n(){return(n=Object.assign?Object.assign.bind():function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var o in t)({}).hasOwnProperty.call(t,o)&&(e[o]=t[o])}return e}).apply(null,arguments)}r.Z=e=>a.createElement("svg",n({className:"icon icon__arrow icon__arrow--left",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},e),o||(o=a.createElement("path",{d:"m3.893 11.685 5.698-5.617L8.538 5 1 12.43l7.534 7.535 1.06-1.061-5.719-5.72h19.19v-1.5H3.892Z"})))},63162:function(e,r,t){"use strict";var o,a=t(2784);function n(){return(n=Object.assign?Object.assign.bind():function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var o in t)({}).hasOwnProperty.call(t,o)&&(e[o]=t[o])}return e}).apply(null,arguments)}r.Z=e=>a.createElement("svg",n({className:"icon icon__arrow icon__arrow--right",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},e),o||(o=a.createElement("path",{d:"m20.171 11.685-5.697-5.617L15.527 5l7.537 7.43-7.534 7.535-1.06-1.061 5.719-5.72H1v-1.5h19.171Z"})))},77091:function(e,r,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/account/orders",function(){return t(96409)}])},85575:function(e,r,t){"use strict";t.d(r,{Y:function(){return b}});var o=t(52322),a=t(15832),n=t(74826),l=t(6277),s=t(5632),i=t(41929),c=t(83953),d=t(12067),u=t(13185),_=t.n(u);let b=({orders:e,title:r,isLoading:t=!1,showViewAll:c=!1,placeholderLength:d=10})=>{let u=(0,s.useRouter)(),b=(0,i.CS)(u.locale),x=(0,o.jsx)(a.cC,{id:"account.myOrders"}),h=!!(e?.length&&e.length>0);return(0,o.jsxs)("div",{children:[(0,o.jsx)("h3",{className:(0,l.Z)(_().accountOrderTable__title,"text-heading-h5-mobile text-heading-h5-desktop"),children:r??x}),(t||h)&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsxs)("div",{className:(0,l.Z)(_().accountOrderTable__orders,t&&"is-loading"),children:[(0,o.jsxs)("div",{className:_().accountOrderTable__ordersHeader,children:[(0,o.jsx)("p",{className:(0,l.Z)(_().accountOrderTable__label,"text-body-1"),children:(0,o.jsx)(a.cC,{id:"customer.order_labels.order_number"})}),(0,o.jsx)("p",{className:(0,l.Z)(_().accountOrderTable__label,"text-body-1"),children:(0,o.jsx)(a.cC,{id:"customer.order_labels.order_date"})}),(0,o.jsx)("p",{className:(0,l.Z)(_().accountOrderTable__label,"text-body-1"),children:(0,o.jsx)(a.cC,{id:"customer.order_labels.order_payment"})}),(0,o.jsx)("p",{className:(0,l.Z)(_().accountOrderTable__label,"text-body-1"),children:(0,o.jsx)(a.cC,{id:"customer.order_labels.order_fulfillment"})}),(0,o.jsx)("p",{className:(0,l.Z)(_().accountOrderTable__label,"text-body-1"),children:(0,o.jsx)(a.cC,{id:"customer.order_labels.order_total"})})]}),t&&[...Array(d)].map((e,r)=>(0,o.jsx)(m,{locale:b},`placeholder-${r}`)),!t&&e?.map(e=>o.jsx(m,{order:e,locale:b},e.id))]}),c&&(0,o.jsx)("div",{className:(0,l.Z)(_().accountOrderTable__viewAll,t&&"is-loading"),children:(0,o.jsx)(n.z,{href:"/account/orders",modifiers:"text",children:(0,o.jsx)(a.cC,{id:"customer.view_all_orders"})})})]}),!t&&!h&&(0,o.jsx)("div",{className:_().accountOrderTable__noOrders,children:(0,o.jsx)("p",{className:"text-body-2 text-body-1-desktop",children:(0,o.jsx)(a.cC,{id:"customer.noOrders"})})})]})},m=({order:e,locale:r})=>{let t=e?.id.split("/").pop()?.split("?")[0]??"",s=t?`/account/orders/${t}`:"",i=e?.name??"";return(0,o.jsxs)("div",{className:_().accountOrderTable__orderLine,children:[(0,o.jsx)("div",{className:_().accountOrderTable__orderLineTitle,children:(0,o.jsx)("p",{className:"text-body-2-mobile",children:(0,o.jsx)(a.cC,{values:{name:i},id:"customer.order_labels.mobile_order_title"})})}),(0,o.jsxs)("div",{className:(0,l.Z)(_().accountOrderTable__orderDetails,_()["accountOrderTable__orderDetails--orderName"]),children:[(0,o.jsx)("p",{className:(0,l.Z)(_().accountOrderTable__orderDetailsLabel,"text-body-1-mobile"),children:(0,o.jsx)(a.cC,{id:"customer.order_labels.order_number"})}),(0,o.jsx)("p",{className:(0,l.Z)(_().accountOrderTable__orderDetailsField,"text-body-2-mobile text-body-1-desktop"),children:(0,o.jsx)(n.z,{href:s,modifiers:["text"],children:i})})]}),(0,o.jsxs)("div",{className:(0,l.Z)(_().accountOrderTable__orderDetails),children:[(0,o.jsx)("p",{className:(0,l.Z)(_().accountOrderTable__orderDetailsLabel,"text-body-1-mobile"),children:(0,o.jsx)(a.cC,{id:"customer.order_labels.order_date"})}),(0,o.jsx)("p",{className:(0,l.Z)(_().accountOrderTable__orderDetailsField,"text-body-2-mobile text-body-1-desktop"),children:e?.processedAt&&new Date(e.processedAt).toLocaleDateString(r,{year:"numeric",month:"2-digit",day:"2-digit"})})]}),(0,o.jsxs)("div",{className:(0,l.Z)(_().accountOrderTable__orderDetails),children:[(0,o.jsx)("p",{className:(0,l.Z)(_().accountOrderTable__orderDetailsLabel,"text-body-1-mobile"),children:(0,o.jsx)(a.cC,{id:"customer.order_labels.order_payment"})}),(0,o.jsx)("p",{className:(0,l.Z)(_().accountOrderTable__orderDetailsField,"text-body-2-mobile text-body-1-desktop"),children:e?.financialStatus&&(0,c.$7)(e.financialStatus)})]}),(0,o.jsxs)("div",{className:(0,l.Z)(_().accountOrderTable__orderDetails),children:[(0,o.jsx)("p",{className:(0,l.Z)(_().accountOrderTable__orderDetailsLabel,"text-body-1-mobile"),children:(0,o.jsx)(a.cC,{id:"customer.order_labels.order_fulfillment"})}),(0,o.jsx)("p",{className:(0,l.Z)(_().accountOrderTable__orderDetailsField,"text-body-2-mobile text-body-1-desktop"),children:e?.fulfillmentStatus&&(0,c.$7)(e.fulfillmentStatus)})]}),(0,o.jsxs)("div",{className:(0,l.Z)(_().accountOrderTable__orderDetails),children:[(0,o.jsx)("p",{className:(0,l.Z)(_().accountOrderTable__orderDetailsLabel,"text-body-1-mobile"),children:(0,o.jsx)(a.cC,{id:"customer.order_labels.order_total"})}),(0,o.jsx)("p",{className:(0,l.Z)(_().accountOrderTable__orderDetailsField,"text-body-2-mobile text-body-1-desktop"),children:e?.totalPrice&&(0,d.lb)(r,e.totalPrice.currencyCode,e.totalPrice.amount)})]}),(0,o.jsx)("div",{className:_().accountOrderTable__orderDetailsViewDetails,children:(0,o.jsx)(n.z,{href:s,modifiers:"text",children:(0,o.jsx)(a.cC,{id:"customer.order_labels.view_order"})})})]})}},36814:function(e,r,t){"use strict";t.d(r,{p:function(){return s}});var o=t(52322),a=t(55351),n=t(21746),l=t(15874);let s=({location:e,seoOptions:r})=>{let t=(0,n.qp)(l.I);if(!e||"loading"===e)return null;let s=t[e],i=s?.seo;
1return i?(0,o.jsx)(a.PB,{...r,title:i.title,description:i?.description}):null}},96409:function(e,r,t){"use strict";t.r(r),t.d(r,{__N_SSP:function(){return y},default:function(){return P}});var o=t(52322),a=t(15874),n=t(43364),l=t(21746),s=t(7040),i=t(5632),c=t(2784),d=t(41929),u=t(3497),_=t(4263);let b=` 2 query customerOrders($customerAccessToken: String!, $before: String, $after: String, $first: Int, $last: Int) { 3 customer(customerAccessToken: $customerAccessToken) { 4 id 5 orders( 6 first: $first 7 last: $last 8 before: $before 9 after: $after 10 reverse: true 11 ) { 12 edges { 13 node { 14 id 15 name 16 currentTotalPrice { 17 amount 18 currencyCode 19 } 20 totalPriceV2 { 21 amount 22 currencyCode 23 } 24 financialStatus 25 fulfillmentStatus 26 processedAt 27 orderNumber 28 } 29 } 30 pageInfo { 31 endCursor 32 hasNextPage 33 hasPreviousPage 34 startCursor 35 } 36 } 37 } 38} 39 `,m=(e,r,t)=>(0,s.a)(["customerOrders",r],(0,_._)(e.endpoint,e.fetchParams||{},b,r,t),t);m.getKey=e=>["customerOrders",e],m.fetcher=(e,r,t)=>(0,_._)(e.endpoint,e.fetchParams||{},b,r,t);var x=t(47771);let h=(0,l.kr)(void 0),p=({children:e})=>{let{customer:r,customerAccessToken:t}=(0,l.qp)(u.Am),a=(0,i.useRouter)(),n=(0,d.CS)(a.locale),[_,b]=(0,c.useState)({first:10}),p={customerAccessToken:t,..._,locale:n},{data:O,isLoading:j,isError:g}=(0,s.a)(m.getKey(p),m.fetcher((0,x.by)(n),p),{select:f,enabled:!!t,keepPreviousData:!0}),T={pageInfo:O?.pageInfo??{hasNextPage:!1,hasPreviousPage:!1},setPaginationOptions:b,perPage:10},v=(0,c.useMemo)(()=>O?{...O,isLoading:j,isError:g,customer:r}:{customer:r,isLoading:j,isError:g,orders:[],pageInfo:{hasNextPage:!1,hasPreviousPage:!1}},[r,O,j,g]);return(0,o.jsx)(h.Provider,{value:{...v,customerAccessToken:t,pagination:T},children:e})};function f(e){if(!e.customer)return null;let r=[];
39return e.customer.orders.edges.forEach(e=>{e.node&&r.push({id:e.node.id,name:e.node.name,totalPrice:e.node.totalPriceV2?{currencyCode:e.node.totalPriceV2.currencyCode,amount:Number(e.node.totalPriceV2.amount)}:null,financialStatus:e.node.financialStatus??null,fulfillmentStatus:e.node.fulfillmentStatus,processedAt:e.node.processedAt})}),{orders:r,pageInfo:e.customer.orders.pageInfo}}var O=t(90078);let j=()=>{let e=(0,l.qp)(h);if(!e)throw Error("AccountOrdersPagination must be used within the AccountOrdersContext");let{pagination:r,isLoading:t}=e;return t||r.pageInfo.hasNextPage||r.pageInfo.hasPreviousPage?(0,o.jsx)("div",{style:{visibility:t?"hidden":void 0},children:(0,o.jsx)(O.t,{...r})}):null};var g=t(85575);let T=()=>{let e=(0,l.qp)(h);if(!e)throw Error("AccountOrders must be used within the AccountOrdersContext");let{orders:r,isLoading:t,pagination:a}=e;return(0,o.jsxs)("div",{children:[(0,o.jsx)(g.Y,{orders:r,placeholderLength:a.perPage,isLoading:t}),(0,o.jsx)(j,{})]})};var v=t(36814),N=t(28707),y=!0;function P({locale:e}){return(0,N.Z)(e),(0,o.jsx)(a.y,{children:(0,o.jsxs)(p,{children:[(0,o.jsx)(v.p,{location:"orders",seoOptions:{noindex:!0}}),(0,o.jsx)(n.p,{fullWidth:!1,children:(0,o.jsx)(T,{})})]})})}},28707:function(e,r,t){"use strict";var o=t(5632),a=t(2784),n=t(41929);r.Z=e=>{let{replace:r}=(0,o.useRouter)(),t=(0,n.CS)(e),l=n.Fb.includes(t);(0,a.useEffect)(()=>{l&&r("/account/wishlist")},[l,r])}},74826:function(e,r,t){"use strict";t.d(r,{z:function(){return c}});var o=t(52322),a=t(6277),n=t(39097),l=t.n(n),s=t(92805),i=t.n(s);let c=({children:e,component:r,to:t="",type:n="submit",modifiers:s,isLoading:c=!1,iconPosition:d,onClick:u,className:_,...b})=>{var m;let x=(m=s)?(Array.isArray(m)?m:m.split(/[\s,]/)).map(e=>{let r=`button--${e}`;return i()[r]}).join(" "):"",h=(e=>{if(!e)return"";let r=`icon--${e}`;return i()[r]})(d),p=b.href||t?l():"button",f=r??p;return(0,o.jsx)(f,{className:(0,a.Z)(i().button,x,h,_,{"is-loading":c}),type:"button"===f?n:void 0,onClick:u,...b,children:e})}},90078:function(e,r,t){"use strict";t.d(r,{t:function(){return d}});var o=t(52322),a=t(15832),n=t(70653),l=t(63162),s=t(74826),i=t(77500),c=t.n(i);let d=({pageInfo:e,setPaginationOptions:r,perPage:t})=>(0,o.jsxs)("div",{className:c().pagination,children:[(0,o.jsxs)(s.z,{className:c().pagination__previous,type:"button",onClick:()=>{let o=e.startCursor;o&&r({last:t,before:o})},disabled:!e.hasPreviousPage,modifiers:"white outlined mini-mobile",iconPosition:"left","data-pagination":"previous",children:[(0,o.jsx)(n.Z,{}),(0,o.jsx)(a.cC,{id:"pagination.previousPage"})]}),(0,o.jsxs)(s.z,{className:c().pagination__next,type:"button",onClick:()=>{let o=e.endCursor;o&&r({first:t,after:o})},disabled:!e.hasNextPage,modifiers:"white outlined mini-mobile",iconPosition:"right","data-pagination":"next",children:[(0,o.jsx)(a.cC,{id:"pagination.nextPage"}),(0,o.jsx)(l.Z,{})]})]})},13185:function(e){e.exports={accountOrderTable__title:"AccountOrderTable_accountOrderTable__title__3SuIm",accountOrderTable__orderLine:"AccountOrderTable_accountOrderTable__orderLine__7h7no",accountOrderTable__orderDetailsLabel:"AccountOrderTable_accountOrderTable__orderDetailsLabel__R5SrP",accountOrderTable__orderDetailsField:"AccountOrderTable_accountOrderTable__orderDetailsField__mjNGh",accountOrderTable__orderDetailsViewDetails:"AccountOrderTable_accountOrderTable__orderDetailsViewDetails__aitcv",accountOrderTable__viewAll:"AccountOrderTable_accountOrderTable__viewAll__On9RB",accountOrderTable__orders:"AccountOrderTable_accountOrderTable__orders__M_BFS",pulse:"AccountOrderTable_pulse__yh40b",accountOrderTable__ordersHeader:"AccountOrderTable_accountOrderTable__ordersHeader__jIb2o",accountOrderTable__orderDetails:"AccountOrderTable_accountOrderTable__orderDetails__P7gBt","accountOrderTable__orderDetails--orderName":"AccountOrderTable_accountOrderTable__orderDetails--orderName__FCqLD",accountOrderTable__orderLineTitle:"AccountOrderTable_accountOrderTable__orderLineTitle__4_r6r",accountOrderTable__noOrders:"AccountOrderTable_accountOrderTable__noOrders__Y_kn7"}},92805:function(e){e.exports={button:"Button_button__onxgf","icon--left":"Button_icon--left__U4xoh","icon--right":"Button_icon--right__tES4x","button--text":"Button_button--text__DAof7","button--w
39hite":"Button_button--white__Ylbor","button--outlined":"Button_button--outlined___mnvB","button--featured":"Button_button--featured__WTMPi","button--mini":"Button_button--mini__wF6HR","button--block":"Button_button--block__abJWB","button--mini-mobile":"Button_button--mini-mobile__tNxzw","button--mobileOnly":"Button_button--mobileOnly__9Q_OC"}},77500:function(e){e.exports={pagination:"Pagination_pagination__Tr3Jk",pagination__previous:"Pagination_pagination__previous__uz_W4",pagination__next:"Pagination_pagination__next__3_bbC"}}},function(e){e.O(0,[2223,4751,5083,2888,9774,179],function(){return e(e.s=77091)}),_N_E=e.O()}]); 40//# sourceMappingURL=orders-e2e841d95c20b748.js.map
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.