1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5844],{17803:(e,a,t)=>{t.d(a,{Hk:()=>_.H,ZZ:()=>F,SY:()=>y,nW:()=>f,wD:()=>D});var r=t(6029),n=t(79002),l=t.n(n),d=t(22526),s=t(42278),i=t(42043);let o={center:"tw-items-center",left:"tw-items-start",right:"tw-items-end"},c={prepared:"tw-lf-tag-decorative-green",cancelled:"tw-lf-tag-decorative-red",pending:"tw-lf-tag-decorative-yellow"},m={[d.cq.REFUNDED]:"tw-lf-tag-decorative-red",[d.cq.PARTIALLY_REFUNDED]:"tw-lf-tag-decorative-red"},f=e=>{let{order:a,align:t="left"}=e,n=(0,s.Rr)(a),d=(0,s.i6)(a),f=(0,i.useTranslations)("OrderStatus"),u=(0,i.useTranslations)("FinancialStatus");return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("div",{className:"jsx-6dd01ad2a8da024f "+"status tw-flex tw-flex-col ".concat(o[t]," tw-gap-2 [&>*]:tw-max-w-min"),children:[(0,r.jsx)("p",{className:"jsx-6dd01ad2a8da024f "+"tw-lf-tag tw-lf-tag-md ".concat(c[n]),children:f(n)}),d&&(0,r.jsx)("p",{className:"jsx-6dd01ad2a8da024f "+"tw-lf-tag tw-lf-tag-md ".concat(m[d]," tw-h-fit tw-whitespace-normal tw-break-words"),children:u(d)})]}),(0,r.jsx)(l(),{id:"6dd01ad2a8da024f",children:".status.jsx-6dd01ad2a8da024f>div{text-align:center;display:flex;justify-content:center;align-items:center}"})]})};var u=t(55729),h=t(78135),x=t(25103),p=t(57674),w=t(57615),g=t(70703),b=t(74363),j=t.n(b),C=t(82882),v=t(57503),k=t(8444),N=t(60750),T=t(89542);let y=e=>{let{order:a,isOpen:t,hide:n}=e,{channel:o,currency:c}=(0,C.A)(),m=(0,i.useTranslations)("Cart"),f=(0,N.mf)(),u=(0,i.useTranslations)("Catalog"),b=(0,i.useTranslations)("Errors"),{shoppingCartId:y,addProductsToShoppingCart:A,addProductsToShoppingCartBySku:R}=(0,p.UI)(),{name:F}=a,E=async()=>{try{var e;if(!y)throw Error("Unexpected empty `shoppingCartId`");let t=a.lineItems,r=(null==(e=a.noteAttributes.find(e=>"isFresh"===e.name))?void 0:e.value)==="true",n=null==f?void 0:f.isOn(k.JeH);if(r&&!n){let e=(await v.jU.getProductsBySku(t.map(e=>{let{sku:a}=e;return a}),o)).reduce((e,a)=>((0,s.n$)(a.tags)||e.push(a.sku),e),[]);t=t.filter(a=>e.includes(a.sku))}"oms"===a.sourceName?await R(y,t,o):await A(y,t),r&&!n?(0,h.oR)(m("productsNotFreshAddedToCart")):(0,h.oR)(m("productsAddedToCart")),(0,w.lB)("addToCart",t,void 0,void 0),(0,g.sx)({type:"LFAddToCart",data:{products:t.map(e=>(0,s.B)(e,e.quantity)),context:{source:d.OH.DEFAULT},currency:c,is_substitute:!1,eventSource:T.KR?k.N8G.APP:k.N8G.WEB}}),(0,w.xz)("ReorderWidget",{action:"reorderModalConfirmation"}),(0,g.sx)({type:"LFReorderWidget",data:{action:"validate"}})}catch(e){(0,h.oR)(b("addProductsToCartError"),{progressClassName:"toast-error"}),j().error(e)}finally{n()}};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(x.p,{title:u("replaceOrder",{orderName:F}),message:u("replaceOrderConfirmation",{orderName:F}),isOpen:t,confirmButtonLabel:m("addToCartConfirm"),confirmButtonOnClick:async()=>{await E()},cancelButtonOnClick:n,modalClassName:"reorder-order-modal"}),(0,r.jsx)(l(),{id:"b0451db71fb11d97",children:".reorder-order-modal{top:33%;width:100%;max-width:560px}@media(max-width:800px){.reorder-order-modal .modal-cta>button:last-child{width:180px}.reorder-order-modal .modal-cta>button:first-child{margin-right:var(--space-1)}}@media(max-width:360px){.reorder-order-modal .modal-cta>button{margin:0}}"})]})};var A=t(7234),R=t(95295);let F=e=>{let{order:a,isOpen:t,hide:n,onCancelSuccess:d}=e,[s]=(0,A.n)(R.Ws),o=(0,i.useTranslations)("Account"),c=(0,i.useTranslations)("Errors"),m=async()=>{try{let e=await s({variables:{orderId:a.id}});e.data&&d(e.data.cancelOrder),(0,h.oR)(o("orderCanceled",{orderName:a.name}))}catch(e){(0,h.oR)(c("orderCancellationError",{orderName:a.name}),{progressClassName:"toast-error"})}finally{n()}};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(x.p,{title:o("orderCancelConfirmationTitle"),message:o.rich("orderCancelConfirmationDetails",{a:e=>(0,r.jsx)("a",{href:"https://support.lafourche.fr/hc/fr/requests/new",target:"_blank",className:"jsx-74a82510d4ee05cd tw-lf-link-inherit",children:e})}),isOpen:t,confirmButtonLabel:o("orderCancelConfirmationCTA"),confirmButtonOnClick:m,cancelButtonOnClick:n,modalClassName:"cancel-order-modal"}),(0,r.jsx)(l(),{id:"74a82510d4ee05cd",children:".cancel-order-modal{top:33%;max-width:560px}@media(max-width:800px){.cancel-order-modal{top:20%}.cancel-order-modal .modal-cta{width:100%;flex-direction:column;align-items:center}.cancel-order-modal .modal-cta>button:last-child{margin-top:var(--space-3);white-space:nowrap}.cancel-order-modal a{margin-left:0;margin-top:var(--space-4)}}"})]})};var E=t(82203),O=t.n(E),M=t(84956),B=t(87995);let L=e=>{let{isOpen:a,hide:t,children:n}=e,d=(0,i.useTranslations)("Global"),s=(0,i.useTranslations)("Account");return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(B.A,{isOpen:a,UNSAFE_className:"preparing-order-notice-modal",centered:!0,externalToggle:t,children:[(0,r.jsx)("h3",{className:"jsx-c84722f801800e43 tw-lf-title-sm tw-mb-6 tw-text-center",children:s("orderTrackingModalTitle")}),n,(0,r.jsx)("div",{className:"jsx-c84722f801800e43 tw-mt-6 tw-flex tw-justify-center",children:(0,r.jsx)("button",{type:"button",onClick:t,className:"jsx-c84722f801800e43 tw-lf-button tw-lf-button-primary tw-lf-button-md",children:d("understood")})})]}),(0,r.jsx)(l(),{id:"c84722f801800e43",children:".preparing-order-notice-modal{max-width:560px;padding:var(--space-6)}"})]})},D=e=>{var a;let{order:t}=e,n=(0,i.useTranslations)("Account"),[l,o]=(0,u.useState)(!1),c=(0,s.Rr)(t),m=(0,s.i6)(t),f=c===d.Re.cancelled,h=m===d.cq.REFUNDED,x=[d.hR.fulfilled,d.hR.partial].includes(t.fulfillmentStatus),p=(0,s.kl)(t.noteAttributes),w=new Date(t.createdAt).valueOf()<new Date("2023-12-20").valueOf(),g=null==(a=t.fulfillments)?void 0:a[0],b=((null==g?void 0:g.trackingUrl)||"").startsWith("http")?null==g?void 0:g.trackingUrl:"",j=p&&t.name?"/pages/tracking?orderNumber=".concat(t.name.replace("#","")):"",C=x&&!!b||!!j,v=(0,s.$V)(t.noteAttributes)||"defaultMessage";return f||h||w?null:(0,r.jsxs)(r.Fragment,{children:[!C&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(L,{isOpen:l,hide:o.bind(void 0,!1),children:n.rich("orderTrackingModal.".concat(v),{p:e=>(0,r.jsx)("p",{className:"tw-mb-2",children:e})})}),(0,r.jsxs)("button",{type:"button",className:"tw-lf-button tw-lf-button-secondary tw-lf-button-md tw-gap-0.5","data-carriermessage":v,onClick:o.bind(void 0,!0),children:[(0,r.jsx)(M.A,{"aria-hidden":!0}),n("follow")]})]}),C&&j?(0,r.jsxs)(O(),{href:j,target:"_blank",className:"tw-lf-button tw-lf-button-secondary tw-lf-button-md tw-gap-0.5","data-testid":"TrackingLink-go-to-trackingLink-shipup-follow",children:[(0,r.jsx)(M.A,{"aria-hidden":!0}),n("follow")]}):C&&b&&(0,r.jsxs)("a",{href:b,target:"_blank","data-testid":"TrackingLink-go-to-trackingLink-follow",rel:"noreferrer",className:"tw-lf-button tw-lf-button-secondary tw-lf-button-md tw-gap-0.5",children:[(0,r.jsx)(M.A,{"aria-hidden":!0}),n("follow")]})]})};var _=t(95981)},23930:(e,a,t)=>{t.d(a,{A:()=>n});var r=t(6029);t(55729);let n=e=>{let{width:a,height:t,color:n="#000",...l}=e;return(0,r.jsx)("svg",{width:a||32,height:t||32,viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",...l,children:(0,r.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M11.433 10c0-3.436 2.853-6.25 6.408-6.25 3.556 0 6.409 2.814 6.409 6.25s-2.853 6.25-6.409 6.25a6.483 6.483 0 01-3.867-1.266.75.75 0 10-.891 1.207 7.983 7.983 0 004.758 1.559c4.352 0 7.909-3.454 7.909-7.75 0-4.296-3.557-7.75-7.909-7.75-4.306 0-7.833 3.382-7.907 7.614l-.41-.4a.75.75 0 00-1.048 1.072l1.952 1.91a.75.75 0 001 .044l2.333-1.91a.75.75 0 00-.95-1.16l-1.356 1.108a6.157 6.157 0 01-.022-.528zm7.158
1-3.182a.75.75 0 00-1.5 0V10a.75.75 0 00.226.536l1.896 1.855a.75.75 0 001.05-1.073L18.59 9.684V6.818zM1.766 6.713a.75.75 0 11.467-1.425l1.955.64a3.75 3.75 0 012.467 2.64l2.54 9.987a2.25 2.25 0 002.18 1.695h11.953a2.25 2.25 0 002.13-1.527l2.832-8.348a.75.75 0 111.42.482l-2.83 8.348a3.742 3.742 0 01-1.005 1.547A3.75 3.75 0 1121 21.75H14a3.75 3.75 0 11-5.05-.89 3.742 3.742 0 01-1.208-1.935l-2.54-9.988a2.25 2.25 0 00-1.48-1.584l-1.956-.64zM8.75 24a2.25 2.25 0 114.5 0 2.25 2.25 0 01-4.5 0zM24 21.75a2.25 2.25 0 100 4.5 2.25 2.25 0 000-4.5z",fill:n})})}},25103:(e,a,t)=>{t.d(a,{p:()=>c});var r=t(6029),n=t(79002),l=t.n(n),d=t(35127),s=t(87995),i=t(42043),o=t(55729);let c=e=>{let{title:a,children:t,message:n,isOpen:c,confirmButtonLabel:m,confirmCancelButtonLabel:f,confirmButtonOnClick:u,cancelButtonOnClick:h,modalClassName:x="modal-confirmation",hasCancelButton:p=!0,isButtonDisabled:w=!1,centeredMessage:g=!1}=e,[b,j]=(0,o.useState)(!1),C=(0,i.useTranslations)("Global");return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(s.A,{isOpen:c,externalToggle:h,UNSAFE_className:x,hasPadding:!0,children:[a&&(0,r.jsx)("h2",{className:"jsx-af05071e5b39ba1c",children:a}),(0,r.jsx)("div",{className:"jsx-af05071e5b39ba1c icon",children:t}),(0,r.jsx)("p",{className:"jsx-af05071e5b39ba1c "+((g?"tw-text-center":"")||""),children:n}),(0,r.jsxs)("div",{className:"jsx-af05071e5b39ba1c modal-cta",children:[p&&(0,r.jsx)(d.A,{variant:"secondary",hasMinWidth:!1,onClick:h,dataTestId:"ModalConfirmation-Button-cancel",children:f||C("cancel")}),(0,r.jsx)(d.A,{onClick:async()=>{j(!0);try{await u()}finally{j(!1)}},isLoading:b,hasMinWidth:!1,disabled:w,dataTestId:"ModalConfirmation-Button-confirm",children:m})]})]}),(0,r.jsx)(l(),{id:"af05071e5b39ba1c",children:".modal-confirmation{top:33%;max-width:560px}h2.jsx-af05071e5b39ba1c{margin-bottom:var(--space-3);font-weight:var(--font-weight-bold)}.modal-cta.jsx-af05071e5b39ba1c{margin-top:var(--space-5);display:flex;align-items:center;justify-content:center}.modal-cta.jsx-af05071e5b39ba1c>button{width:fit-content;margin:var(--space-1)var(--space-2)}.modal-cta.jsx-af05071e5b39ba1c>button:first-child{margin-right:var(--space-3)}.icon.jsx-af05071e5b39ba1c{display:flex;justify-content:center;margin-bottom:var(--space-2)}"})]})}},84956:(e,a,t)=>{t.d(a,{A:()=>n});var r=t(6029);t(55729);let n=e=>{let{width:a,height:t,color:n="#000",...l}=e;return(0,r.jsx)("svg",{width:a||32,height:t||32,viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",...l,children:(0,r.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M10.8335 12.15C10.8335 9.02959 13.3631 6.5 16.4835 6.5C19.6039 6.5 22.1335 9.02959 22.1335 12.15C22.1335 13.7582 21.3851 16.4422 20.1978 19.1216C19.1523 21.4812 17.8266 23.7006 16.516 25.078C15.3251 23.6833 13.9976 21.4578 12.9145 19.1112C11.6707 16.4166 10.8335 13.7434 10.8335 12.15ZM16.4835 5C12.5347 5 9.3335 8.20116 9.3335 12.15C9.3335 14.0913 10.2963 17.018 11.5525 19.7398C12.8157 22.4764 14.4601 25.1872 15.9532 26.6803C16.2324 26.9595 16.6802 26.9744 16.9774 26.7144C18.7014 25.2059 20.3551 22.4692 21.5692 19.7293C22.7819 16.9925 23.6335 14.0764 23.6335 12.15C23.6335 8.20116 20.4323 5 16.4835 5ZM14.0335 12.95C14.0335 11.5969 15.1304 10.5 16.4835 10.5C17.8366 10.5 18.9335 11.5969 18.9335 12.95C18.9335 14.3031 17.8366 15.4 16.4835 15.4C15.1304 15.4 14.0335 14.3031 14.0335 12.95ZM16.4835 9C14.302 9 12.5335 10.7685 12.5335 12.95C12.5335 15.1315 14.302 16.9 16.4835 16.9C18.665 16.9 20.4335 15.1315 20.4335 12.95C20.4335 10.7685 18.665 9 16.4835 9Z",fill:n})})}},95981:(e,a,t)=>{t.d(a,{H:()=>l});var r=t(6029),n=t(42043);let l=e=>{let{order:a,onClick:t}=e,l=(0,n.useTranslations)("Global");return(0,r.jsx)("a",{href:"#cancel_order",className:"tw-lf-link-md",onClick:e=>{e.preventDefault(),t(a)},"data-testid":"CancelLink-go-to-cancel-order",children:l("cancel")})}}}]); 2//# sourceMappingURL=5844-cdcf10808330ea70.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.