1"use strict";(self.__LOADABLE_LOADED_CHUNKS__=self.__LOADABLE_LOADED_CHUNKS__||[]).push([[1533],{53998:function(e,r,t){t.d(r,{S:function(){return a}});var n=t(2784),i=t(52322),a=(0,n.createContext)(),o=function(e){var r=e.children,t=e.initialState,o=(0,n.useState)(t),s=o[0],d=o[1],l=function(e){return d([e])},c=function(e){return d(s.filter((function(r){return r!==e})))},u=function(e){return-1!==s.indexOf(e)};return(0,i.jsx)(a.Provider,{value:{state:s,open:l,close:c,toggle:function(e){return u(e)?c(e):l(e)},contains:u},children:r})};o.defaultProps={initialState:[]}},98399:function(e,r,t){var n=t(31461),i=t(82185),a=t(52322),o=["color","width","height","$style"];r.Z=function(e){var r=e.color,t=void 0===r?"currentColor":r,s=e.width,d=void 0===s?"16px":s,l=e.height,c=void 0===l?"100%":l,u=e.$style,p=(0,n.Z)(e,o),x=Object.assign({width:d,height:c},u);return(0,a.jsxs)(i.Z,Object.assign({$style:x,fill:"none",viewBox:"0 0 16 16"},p,{children:[(0,a.jsx)("rect",{fill:t,height:"1",rx:".5",width:"1",x:"7.5",y:"4.5"}),(0,a.jsx)("rect",{fill:t,height:"5",rx:".5",width:"1",x:"7.5",y:"6.5"}),(0,a.jsx)("rect",{height:"15",rx:"7.5",stroke:t,width:"15",x:".5",y:".5"})]}))}},62283:function(e,r,t){t.r(r),t.d(r,{default:function(){return Q}});var n=t(50479),i=t(98848),a=t(9690),o=t(2784),s=t(75892),d=t(50865),l=t(52322),c="6d0c0033-7762-4e61-9909-d960ec83e323",u="https://cdn.ingrid.com/delivery-tracking/bootstrap.js",p=function(){var e=(0,s.hQ)()[0],r=(0,d.ix)((function(e){var r;return null===(r=e.auth.user)||void 0===r?void 0:r.email}));(0,o.useEffect)((function(){var e;(null===(e=window)||void 0===e||!e.IngridDeliveryTrackingWidgetApi)&&n()}),[]);var t=function(){window.IngridDeliveryTrackingWidgetApi&&window.IngridDeliveryTrackingWidgetApi.renderSearchMode({containerId:"delivery-tracking-widget",siteId:c,locale:"en-US",prefillContact:r})},n=function(){var e=document.getElementsByTagName("HEAD")[0],r=document.createElement("script");r.type="text/javascript",r.src=u,e.appendChild(r),r.onload=t};return(0,l.jsx)("div",{id:"delivery-tracking-widget",className:e({height:"100%",width:"100%",maxWidth:"600px"})})},x=t(34795),g=t(82841),h=t.n(g),v=t(76522),f=t(38777),m=t(35114),y=t(71140),b="GrebCommerce",j="NetCompany",w=function(e,r){return e.map((function(e){var t,n=e.orderLines.filter((function(e){return e.type===b})),i=e.orderLines.filter((function(e){return e.type===j})),a=i.length>0,o={type:"message",message:r};return t=a?[].concat((0,f.Z)(n),[o],(0,f.Z)(i)):[].concat((0,f.Z)(n),(0,f.Z)(i)),Object.assign({},e,{orderLines:t})}))},_=function(e){return new Date(e).toISOString().slice(0,10)},L=function(){var e=(0,x.Z)(h().mark((function e(r,t,n){var i;return h().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=(0,f.Z)(r).sort((function(e,r){return new Date(r.orderDate).getTime()-new Date(e.orderDate).getTime()})),e.next=3,Promise.all(i.map(function(){var e=(0,x.Z)(h().mark((function e(r){var i,a,o,s,d,l,c,u,p,x,g,v,f,w,L,O,Z;return h().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(d=_(r.orderDate),l=_(r.postingDate),c="#"+r.orderno,p=(u=function(e){return parseFloat(null!=e?e:"0").toFixed(2)})(r.amountInclVat),x=n.find((function(e){return e.brandCode.toString()===r.brandCode})),g=x?null===(i=x.logo)||void 0===i||null===(a=i[0])||void 0===a||null===(o=a.icon)||void 0===o||null===(s=o[0])||void 0===s?void 0:s.filename:void 0,v=r.brandCode===t.toString(),f={},!v){e.next=16;break}return w=r.orderLines.map((function(e){return e.displayId})),e.next=13,(0,m.Z)(w);case 13:L=e.sent,O=L.map((function(e){return(0,y.Z)({product:e,source:"JSON",isTeamStoreProduct:!1})})),f=O.reduce((function(e,r){return e[r.id]=r,e}),{});case 16:return Z=r.orderLines.map((function(e){var t=u(e.amountInclVat)+" "+r.currency,n={price:{salePriceWithCurrency:t,priceWithCurrency:t},quantity:e.quantity};if(v){var i=f[e.displayId]||{},a=i.id?b:j;return Object.assign({type:a},e,i,n)}return Object.assign({type:j},e,n)})),e.abrupt("return",Object.assign({},r,{orderDate:d,postingDate:l,orderno:c,amountInclVat:p,brandLogo:g,currentBrand:v,orderLines:Z}));case 18:case"end":return e.stop()}}),e)})));return function(r){return e.apply(this,arguments)}}()));case 3:return e.abrupt("return",e.sent);case 4:case"end":return e.stop()}}),e)})));return function(r,t,n){return e.apply(this,arguments)}}(),O=function(e,r,t){var n=(0,d.ix)((function(e){return e.auth.user})),i=(0,d.zL)(),a=(0,o.useState)({orders:[],isLoading:!1}),s=a[0],l=a[1];return(0,o.useEffect)((function(){var a=function(){var e=(0,x.Z)(h().mark((function e(){return h().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n){e.next=2;break}return e.abrupt("return",null);case 2:return e.prev=2,e.abrupt("return",i((0,v.AU)(n.token)));case 6:return e.prev=6,e.t0=e.catch(2),console.warn("e",e.t0),e.abrupt("return",{});case 10:case"end":return e.stop()}}),e,null,[[2,6]])})));return function(){return e.apply(this,arguments)}}(),o=function(){var n=(0,x.Z)(h().mark((function n(){var i,o,s;return h().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return l((function(e){return Object.assign({},e,{isLoading:!0})}
1)),n.prev=1,n.next=4,a();case 4:return i=n.sent,n.next=7,L(i.orders,e,r);case 7:o=n.sent,s=w(o,t),l({orders:s,isLoading:!1}),n.next=15;break;case 12:n.prev=12,n.t0=n.catch(1),l({orders:[],isLoading:!1});case 15:case"end":return n.stop()}}),n,null,[[1,12]])})));return function(){return n.apply(this,arguments)}}();o()}),[]),s},Z=t(93993),D=t(47670),C=t(59735),S=t(31461),N=t(58253),k=t(56403),P=t(27292),I=t(92813),T=t(53998),B=["$style","actPoints","brandLogo","id","hasOrders","lastChild","name","orderDate","orderNumber","orderStatus","render","showLessOrderDetailsLabel","showMoreOrderDetailsLabel","totalPrice"],E=(0,s.zo)("div",{lineHeight:1}),$=(0,s.zo)("div",(function(e){return{display:"flex",flexDirection:["column",null,"row"],alignItems:"center",justifyContent:"space-between",width:"100%",padding:"12px",borderRadius:e.isOpen?"8px 8px 0 0":"8px",textAlign:"left",backgroundColor:"var(--color-bg-secondary)"}})),A=(0,N.Z)((0,s.zo)("div",{position:"relative",height:"0",overflow:"hidden",transitionDuration:"var(--duration-fast)",transitionProperty:"height",transitionTimingFunction:"var(--ease)","::after":{content:'""',display:"block",marginTop:"24px"}})),z=((0,s.zo)("div",{padding:"4px 6px",border:"1px solid black",borderRadius:"40px",display:"inline-flex",width:"fit-content"}),(0,s.zo)("div",{padding:"4px 8px",backgroundColor:"var(--color-bg-order-tag)",borderRadius:"40px",color:"var(--color-text-inverted)"})),K=function(e){var r=e.$style,t=void 0===r?{}:r,n=e.actPoints,i=e.brandLogo,a=e.id,d=e.hasOrders,c=e.lastChild,u=void 0!==c&&c,p=e.name,x=e.orderDate,g=e.orderNumber,h=e.orderStatus,v=e.render,f=e.showLessOrderDetailsLabel,m=e.showMoreOrderDetailsLabel,y=e.totalPrice,b=(0,S.Z)(e,B),j=(0,o.useContext)(T.S),w=(0,o.useState)((null==j?void 0:j.contains(p))||!1),_=w[0],L=w[1],O=(0,s.hQ)()[0];(0,o.useEffect)((function(){j&&L(j.contains(p))}),[j]);var Z=function(){j?j.toggle(p):L(!_)},D=function(e){(null==e?void 0:e.replace("#",""))===a&&Z()};return(0,o.useEffect)((function(){return window.addEventListener("scrollTo",(function(e){var r;return D(null===(r=e.detail)||void 0===r?void 0:r.hash)}),!1),window.location.hash&&D(window.location.hash),function(){window.removeEventListener("scrollTo",(function(e){var r;return D(null===(r=e.detail)||void 0===r?void 0:r.hash)}),!1)}}),[]),(0,l.jsxs)(E,{$style:Object.assign({borderBottom:u?"1px solid var(--color-contrast-lower)":null},t),id:a,children:[(0,l.jsxs)($,{isOpen:_,children:[(0,l.jsxs)("div",{className:O({display:"inline-flex",flexDirection:"column",gap:"12px",marginBottom:["16px",null,"0px"],width:"100%"}),children:[i&&(0,l.jsx)("div",{className:O({display:"grid",justifyContent:"flex-start",gap:"12px",marginBottom:["16px",null,"0px"]}),children:(0,l.jsx)("img",{src:i,width:"auto",height:"40px"})}),(0,l.jsxs)("div",{className:O({display:"flex",alignItems:"center",gap:"12px"}),children:[(0,l.jsxs)(I.Z,{fontKeys:"Misc/14_100_700_-2",children:["OrderNr:"," ",g]}),"delivered"===h&&(0,l.jsx)(z,{children:"Order delivered"})]}),(0,l.jsxs)("div",{className:O({display:"flex",gap:"8px"}),children:[(0,l.jsx)(I.Z,{color:"var(--color-text-subtle)",fontKeys:"Secondary/14_130_400",children:x}),(0,l.jsx)(I.Z,{color:"var(--color-text-subtle)",fontKeys:"Secondary/14_130_400",children:y})]}),n&&n.length>0&&false]}),d&&(0,l.jsxs)(k.Z,{$style:{display:"flex",alignItems:"center",gap:"8px",width:["100%",null,"auto"],justifyContent:["center",null,"space-between"]},fontKeys:"Misc/14_100_-1_500_UC",theme:"outlined",type:"button","aria-expanded":_,"aria-controls":"order-details-"+a,onClick:Z,children:[(0,l.jsx)("div",{children:_?f:m}),(0,l.jsx)(P.Z,{size:"16px",state:_?"close":"plus"})]})]}),(0,l.jsx)(A,{id:"order-details-"+a,className:"accordion-panel-collapse",height:_?"auto":0,children:v(Object.assign({},b,{toggleAccordion:Z}))})]})},M=t(98399),W=t(59559),H=t(25870),U=t(58210),R=(0,s.zo)("div",{width:"100%",maxWidth:"800px",gridColumn:["1 / span 12",null,null,"2 / span 10","2 / span 8"],minHeight:"100vh",paddingTop:"calc(var(--height-header))"}),F=(0,s.zo)("div",{}),V=(0,s.zo)("div",{display:"flex",flexDirection:"column",height:"100%",gap:"4px",padding:"8px",borderRadius:"0 0 8px 8px",backgroundColor:"var(--color-bg-orders)"}),Q=function(e){var r=e.pageContext,t=void 0===r?void 0:r,o=e.previewDataOverride,d=(void 0===o?void 0:o)||(null==t?void 0:t.page.data)||{},c=(0,s.hQ)()[0],u=(0,i.Z)().brands,x=d.content,g=x.noOrdersLabel,h=x.noProductDataLabel,v=x.orderInfomrationLabel,f
1=x.ordersHeading,m=x.ordersParagraph,y=x.showLessOrderDetailsLabel,w=x.showMoreOrderDetailsLabel,_=x.trackingHeading,L=x.trackingParagraph,S=O("11",u,h),N=S.orders,k=S.isLoading,P=(0,D.Z)({heading:f,defaultType:"h2"}),T=(0,C.Z)({paragraph:m}),B=(0,D.Z)({heading:_,defaultType:"h2"}),E=(0,C.Z)({paragraph:L}),$=d.url.split("/"),A=$[1].replace(/-/g," "),z=[{label:""+($[1].charAt(0).toUpperCase()+A.slice(1)),to:"/"+$[1]},{label:""+d.name}];return(0,l.jsx)(R,{children:(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(F,{$style:{paddingTop:[0,null,null,"8px"]},children:[(0,l.jsx)(a.Z,{$style:{marginBottom:"16px"},listStyles:Object.assign({justifyContent:"start"},n.Z["Misc/12_100_500"]),items:z}),(0,l.jsx)("div",{className:c({display:"flex",justifyContent:"space-between"}),children:(0,l.jsx)(U.Z,{$style:{marginBottom:"48px"},as:"h1",fontKeys:["Primary/32_94_-2_700",null,"Primary/48_94_-2_700"],children:d.name})})]}),(0,l.jsxs)("div",{className:c({marginTop:"48px"}),children:[(null==B?void 0:B.text)&&(0,l.jsx)(U.Z,Object.assign({as:B.type,fontKeys:"Primary/24_94_-1_700"},B.sbEditable,{children:B.text})),(null==E?void 0:E.text)&&(0,l.jsx)("div",Object.assign({className:c({marginTop:"8px"})},E.sbEditable,{children:(0,l.jsx)(Z.ZP,{data:E.text})})),(0,l.jsx)("div",{className:c({display:"flex",alignItems:"center",justifyContent:"flex-start",margin:"16px 0 48px"}),children:(0,l.jsx)(p,{})})]}),(0,l.jsxs)("div",{className:c({marginTop:"48px"}),children:[(null==P?void 0:P.text)&&(0,l.jsx)(U.Z,Object.assign({as:P.type,fontKeys:"Primary/24_94_-1_700"},P.sbEditable,{children:P.text})),(null==T?void 0:T.text)&&(0,l.jsx)("div",Object.assign({className:c({marginTop:"8px"})},T.sbEditable,{children:(0,l.jsx)(Z.ZP,{data:T.text})})),v&&(0,l.jsxs)("div",{className:c({alignItems:"space-between",backgroundColor:"var(--color-contrast-lowest)",borderRadius:"4px",display:"flex",gap:"0 8px",justifyContent:"flex-start",padding:"4px 8px",marginTop:"8px"}),children:[(0,l.jsx)(M.Z,{$style:{minWidth:"16px"}}),(0,l.jsx)(I.Z,{fontKeys:"Secondary/12_130_400",children:v})]})]}),k?(0,l.jsx)("div",{className:c({height:"100vh",width:"100%",display:"grid",placeItems:"center"}),children:(0,l.jsx)(W.Z,{})}):(0,l.jsxs)("div",{className:c({marginTop:"24px"}),children:[!(null!=N&&N.length)&&(0,l.jsx)("div",{className:c(n.Z["Secondary/14_130_400"]),children:g}),null==N?void 0:N.map((function(e,r){return(0,l.jsx)(K,{$style:{marginBottom:"16px"},actPoints:e.bonusPoints,brandLogo:null==e?void 0:e.brandLogo,currentBrand:null==e?void 0:e.currentBrand,hasOrders:(null==e?void 0:e.orderLines.length)>0,isCurrentBrand:null==e?void 0:e.currentBrand,orderDate:e.orderDate,orderNumber:e.orderno,orderStatus:"active",render:function(){var r;return(0,l.jsx)(V,{children:null===(r=e.orderLines)||void 0===r?void 0:r.map((function(e,r){var t,n,i={":first-child":{borderTop:"1px solid var(--color-border-account)"},":not(:last-child)":{borderBottom:"1px solid var(--color-border-account)"}};return e.type===b?(0,l.jsx)(H.ZP,Object.assign({$style:i},e,{media:null!==(t=null===(n=e.media)||void 0===n?void 0:n[0])&&void 0!==t?t:{},loading:"lazy",position:r,type:"order"}),e.id):e.type===j?(0,l.jsx)(H.ZP,Object.assign({$style:i},e,{loading:"lazy",name:e.description,nameStyle:{marginBottom:"0"},position:r,productInfoStyle:{gap:"8px",maxWidth:"none"},showImage:!1,type:"order"}),e.displayId):"message"===e.type?(0,l.jsx)(I.Z,{$style:{padding:"10px",borderBottom:"1px solid var(--color-border-account)"},fontKeys:"Misc/14_100_500",children:e.message},e.message):null}))})},showLessOrderDetailsLabel:y,showMoreOrderDetailsLabel:w,totalPrice:e.amountInclVat},r+"_"+e.orderno)}))]})]})})}}}]); 2//# sourceMappingURL=6ec2b482b39f9ab0a4c68de2d020269f5f9c34b2-f3fd3e4483dabdbbf465.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.