PageSourceSearch

https://www.levi.com.br/_next/static/chunks/4737-e601032351cae208.js

js levi.com.br collected 2026-10-03 22:50:09 UTC 88,822 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4737],{3091:e=>{e.exports={section:"styles_section__tqV_v"}},7101:e=>{e.exports={section:"section_section__KG_b8",load:"section_load__DKeod"}},7589:e=>{e.exports={section:"profile_section__5qTF7"}},18441:(e,t,r)=>{"use strict";r.d(t,{Fv:()=>s,Hb:()=>c,Hd:()=>d,OB:()=>g,Od:()=>b,Oy:()=>m,QK:()=>l,SY:()=>f,UO:()=>h,_q:()=>y,dS:()=>u,dj:()=>o,rK:()=>p,zc:()=>v});var a=r(75458);function n(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,a)}return r}function i(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?n(Object(r),!0).forEach(function(t){(0,a.A)(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):n(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}var l={orderNumberPrefix:"Order #",goBackLabel:"Go back",cancelOrderLabel:"Cancel order",reorderLabel:"Reorder",notNowLabel:"Not now",cancelConfirmMessage:"Are you sure you want to cancel this order? This action can't be undone.",cancelSuccessToast:"Order canceled successfully",cancelErrorToast:"Order couldn't be canceled due to a technical issue.",approveLabel:"Approve",rejectLabel:"Reject",rejectModalTitle:"Reject approval request",rejectModalMessage:"You're about to reject this approval request, triggered by the {policy} policy. Rejecting any approval request will deny the entire order.\n\nThis action is permanent and cannot be undone.",rejectModalConfirmText:"Reject"},s={statusTitle:"Status",orderPlacedStep:"Order placed",paymentPendingStep:"Payment Pending",handlingStep:"Handling order",invoicedStep:"Invoiced",deliveredStep:"Delivered"},o={paymentTitle:"Payment",billingLabel:"Billing",bankInvoiceLabel:"Bank Invoice",paypalLabel:"PayPal",giftCardLabel:"Gift Card",endingInLabel:"ending in",tidLabel:"Tid:",authIdLabel:"AuthId:",invoiceNumberLabel:"Invoice Number:",printBankInvoiceLabel:"Print Bank Invoice",installmentCopy:"{count}x of {value}"},c={deliveryTitle:"Delivery",recipientLabel:"Recipient",deliveryAddressLabel:"Delivery address",storeAddressLabel:"Store address",storeHoursLabel:"Store Hours",fromLabel:"From:",toLabel:"To:",itemCountTemplate:"{count} item(s)",eachLabel:"Each",taxesLabel:"Taxes",totalLabel:"Total"},d={summaryTitle:"Summary",totalLabel:"Total",interestLabel:"Interest"},u={orderedByTitle:"Ordered by"},p={budgetsTitle:"Budgets",nameLabel:"Name",availableLabel:"Available",toBeSpentLabel:"To be spent",remainingLabel:"Remaining"},f={moreInfoTitle:"More information"};function v(e){return i(i({},l),e)}function y(e){return i(i({},s),e)}function b(e){return i(i({},o),e)}function h(e){return i(i({},c),e)}function m(e){return i(i({},d),e)}function g(e){return i(i({},p),e)}},19073:(e,t,r)=>{"use strict";r.d(t,{G:()=>p});var a=r(75458),n=r(43247),i=r.n(n),l=r(26514),s={section:"EmptyState",components:{EmptyState:{Component:function(e){var{title:t,children:r}=e,a=t&&t.trim()&&!/not\s*found/i.test(t)?t:"Essa p\xe1gina saiu de moda";return(0,l.jsx)("section",{className:i().wrapper,"aria-labelledby":"notfound-title",children:(0,l.jsxs)("div",{className:i().card,children:[(0,l.jsx)("svg",{className:i().stitch,viewBox:"0 0 240 40",fill:"none","aria-hidden":"true",focusable:"false",children:(0,l.jsx)("path",{d:"M6 30 C 70 6, 170 6, 234 30"})}),(0,l.jsx)("p",{className:i().eyebrow,children:"Erro 404"}),(0,l.jsx)("h1",{id:"notfound-title",className:i().title,children:a}),(0,l.jsx)("p",{className:i().subtitle,children:"N\xe3o encontramos esta p\xe1gina. Talvez o modelo tenha sido descontinuado ou o endere\xe7o tenha mudado."}),(0,l.jsx)("a",{className:i().cta,href:"/",children:"Voltar para a home"}),(0,l.jsxs)("nav",{className:i().suggestions,"aria-label":"Categorias populares",children:[(0,l.jsx)("span",{className:i().suggestionsLabel,children:"Ou explore"}),(0,l.jsxs)("ul",{children:[(0,l.jsx)("li",{children:(0,l.jsx)("a",{href:"/s?q=jeans",children:"Jeans"})}),(0,l.jsx)("li",{children:(0,l.jsx)("a",{href:"/s?q=jaqueta",children:"Jaquetas"})}),(0,l.jsx)("li",{children:(0,l.jsx)("a",{href:"/s?q=camiseta",children:"Camisetas"})}),(0,l.jsx)("li",{children:(0,l.jsx)("a",{href:"/s?q=501",children:"501\xae"})})]})]}),r&&(0,l.jsx)("div",{className:i().meta,children:r})]})})}}}},o=r(11165),c=r(80802);function d(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,a)}return r}function u(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};
1t%2?d(Object(r),!0).forEach(function(t){(0,a.A)(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):d(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}var p=(0,o.a)(u(u(u({},s),s),{},{Section:c.A}))},26487:e=>{e.exports={orderActionsModal:"styles_orderActionsModal__9ZBWb",load:"styles_load__C4Uwc"}},43247:e=>{e.exports={wrapper:"NotFound_wrapper__J_K7E",card:"NotFound_card__k8UQq",stitch:"NotFound_stitch__E6pQb",eyebrow:"NotFound_eyebrow__JDPTE",title:"NotFound_title__9R5Jl",subtitle:"NotFound_subtitle__ozemg",cta:"NotFound_cta__G8Qmg",suggestions:"NotFound_suggestions__5Hl9f",suggestionsLabel:"NotFound_suggestionsLabel__VdOzL",meta:"NotFound_meta__KXmZ_","notfound-draw":"NotFound_notfound-draw__wQifA",notfoundDraw:"NotFound_notfound-draw__wQifA","notfound-rise":"NotFound_notfound-rise__2ePub",notfoundRise:"NotFound_notfound-rise__2ePub"}},47572:e=>{e.exports={section:"styles_section__xUYca"}},61373:(e,t,r)=>{"use strict";r.d(t,{Vh:()=>u,gi:()=>p,pC:()=>l,w3:()=>c,wJ:()=>d});var a=r(75458);function n(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,a)}return r}function i(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?n(Object(r),!0).forEach(function(t){(0,a.A)(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):n(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}var l={created:{variant:"success",label:"Order Placed"},creating:{variant:"success",label:"Order Placed"},"on-order-completed":{variant:"success",label:"Order Placed"},"on-order-completed-ffm":{variant:"success",label:"Order Placed"},"order-accepted":{variant:"success",label:"Order Placed"},"order-created":{variant:"success",label:"Order Placed"},"waiting-for-seller-confirmation":{variant:"success",label:"Order Placed"},"waiting-for-authorization":{variant:"warning",label:"Pending approval"},"waiting-for-confirmation":{variant:"warning",label:"Pending approval"}
1,"approving-transaction":{variant:"warning",label:"Payment Pending"},"notify-payment":{variant:"warning",label:"Payment Pending"},"payment-pending":{variant:"warning",label:"Payment Pending"},"payment-approved":{variant:"success",label:"Payment Approved"},"approve-payment":{variant:"success",label:"Payment Approved"},"payment-denied":{variant:"neutral",label:"Payment Denied"},"authorize-fulfillment":{variant:"success",label:"Ready for Delivery"},handling:{variant:"success",label:"Ready for Delivery"},invoice:{variant:"success",label:"Ready for Delivery"},"invoice-after-cancellation-deny":{variant:"success",label:"Ready for Delivery"},invoicing:{variant:"success",label:"Ready for Delivery"},packing:{variant:"success",label:"Ready for Delivery"},picking:{variant:"success",label:"Ready for Delivery"},"ready-for-handling":{variant:"success",label:"Ready for Delivery"},"ready-for-invoicing":{variant:"success",label:"Ready for Delivery"},"ready-for-packing":{variant:"success",label:"Ready for Delivery"},"ready-for-picking":{variant:"success",label:"Ready for Delivery"},"release-to-fulfillment":{variant:"success",label:"Ready for Delivery"},"start-handling":{variant:"success",label:"Ready for Delivery"},"waiting-ffmt-authorization":{variant:"success",label:"Ready for Delivery"},"waiting-for-fulfillment":{variant:"success",label:"Ready for Delivery"},"window-to-cancel":{variant:"success",label:"Ready for Delivery"},invoiced:{variant:"success",label:"Invoiced"},"accepting-cancel":{variant:"neutral",label:"Cancellation Requested"},cancel:{variant:"neutral",label:"Cancellation Requested"},canceling:{variant:"neutral",label:"Cancellation Requested"},"cancellation-requested":{variant:"neutral",label:"Cancellation Requested"},"cancellation-requested-with-ack":{variant:"neutral",label:"Cancellation Requested"},"request-cancel":{variant:"neutral",label:"Cancellation Requested"},"waiting-for-seller-decision":{variant:"neutral",label:"Cancellation Requested"},canceled:{variant:"neutral",label:"Canceled"}},s=["orderPlacedStatus","pendingApprovalStatus","paymentPendingStatus","paymentApprovedStatus","paymentDeniedStatus","readyForDeliveryStatus","invoicedStatus","cancellationRequestedStatus","canceledStatus"],o={orderPlacedStatus:"Order Placed",pendingApprovalStatus:"Pending approval",paymentPendingStatus:"Payment Pending",paymentApprovedStatus:"Payment Approved",paymentDeniedStatus:"Payment Denied",readyForDeliveryStatus:"Ready for Delivery",invoicedStatus:"Invoiced",cancellationRequestedStatus:"Cancellation Requested",canceledStatus:"Canceled"};function c(e){if(e){var t={},r=!1;for(var a of s){var n=e[a];"string"==typeof n&&n.length>0&&(t[a]=n,r=!0)}return r?t:void 0}}function d(e){var t=function(e){if(!e)return{};var t={};for(var r of s){var a=e[r];a&&(t[o[r].toLowerCase()]=a)}return t}(e),r={};for(var[a,n]of Object.entries(l)){var c=t[n.label.toLowerCase()];r[a]=c?i(i({},n),{},{label:c}):n}return r}function u(e){var t,r,a,{status:n,cmsLabels:i,statusFallback:l}=e;return null!=(t=null!=(r=null==(a=d(i)[n])?void 0:a.label)?r:l)?t:"-"}var p=["Order Placed","Pending approval","Payment Pending","Payment Approved","Payment Denied","Ready for Delivery","Invoiced","Cancellation Requested","Canceled"]},63976:e=>{e.exports={page:"section_page__BXlT6",load:"section_load__3Dx1i"}},64161:(e,t,r)=>{"use strict";r.d(t,{A:()=>i});var a=r(61373),n=r(26514);let i=function(e){var{status:t,statusFallback:r,statusLabels:i}=e,l=(0,a.wJ)(i);return(0,n.jsx)("span",{"data-fs-my-account-badge":!0,"data-fs-my-account-badge-variant":function(e){var t,{status:r,statusMap:a}=e;return(null==(t=a[r])?void 0:t.variant)||"neutral"}({status:t,statusMap:l}),children:(0,a.Vh)({status:t,cmsLabels:i,statusFallback:r})})}},66759:e=>{e.exports={section:"section_section__j2PtW"}},66872:e=>{e.exports={page:"styles_page__Ud_sd"}},74737:(e,t,r)=>{"use strict";r.d(t,{A:()=>tK});var a,n=r(75458),i=()=>null;i.$componentKey="AccountNavigation";var l=r(82266),s=r(59749),o=r(26514),c=["children"];function d(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,a)}return r}function u(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};
1t%2?d(Object(r),!0).forEach(function(t){(0,n.A)(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):d(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}let p=function(e){var{children:t}=e,r=(0,l.A)(e,c);return(0,o.jsx)(s.Zp,u(u({},r),{},{"data-fs-my-account-card":!0,children:t}))};var f=r(46225),v=r(75834),y=()=>{var{locale:e}=(0,f.useRouter)();return(0,v.useCallback)((t,r)=>new Intl.NumberFormat(e,{style:"currency",currency:r,minimumFractionDigits:2}).format(t/100),[e])},b=r(18441);let h=function(e){var{budgetData:t,currencyCode:r,labels:a}=e,n=(0,b.OB)(a),i=y();if(!(null!=t&&t.budgets)||0===t.budgets.length)return null;var l=t.budgets.filter(e=>e&&e.allocations&&e.allocations.length>0).map(e=>{var t,r=e.allocations.filter(Boolean),a=r.reduce((e,t)=>{if(!(null!=t&&t.reservations))return e;var r=t.reservations;return"object"==typeof r&&null!==r?e+Object.values(r).filter(e=>"number"==typeof e).reduce((e,t)=>e+t,0):e},0),n=(null==(t=e.balance)?void 0:t.remaining)||0;return{budget:e,allocationIds:r.map(e=>{var t;return null==e||null==(t=e.linkedEntity)?void 0:t.id}).filter(Boolean).join(", "),toBeSpent:a,remaining:n,available:a+n}});return 0===l.length?null:(0,o.jsx)(p,{title:n.budgetsTitle,"data-fs-order-budgets-card":!0,children:(0,o.jsxs)("div",{"data-fs-budgets-table":!0,children:[(0,o.jsxs)("div",{"data-fs-budgets-table-header":!0,children:[(0,o.jsx)("div",{"data-fs-budgets-header-name":!0,children:n.nameLabel}),(0,o.jsx)("div",{"data-fs-budgets-header-available":!0,children:n.availableLabel}),(0,o.jsx)("div",{"data-fs-budgets-header-to-be-spent":!0,children:n.toBeSpentLabel}),(0,o.jsx)("div",{"data-fs-budgets-header-remaining":!0,children:n.remainingLabel})]}),(0,o.jsx)("div",{"data-fs-budgets-table-body":!0,children:l.map((e,t)=>{var{budget:a,allocationIds:n,toBeSpent:l,remaining:s,available:c}=e,d=a.name||"",u=n||"";return(0,o.jsxs)("div",{"data-fs-budgets-row":!0,children:[(0,o.jsxs)("div",{"data-fs-budgets-name":!0,children:[(0,o.jsx)("div",{"data-fs-budgets-name-primary":!0,children:d}),(0,o.jsx)("div",{"data-fs-budgets-name-secondary":!0,title:u,children:u})]}),(0,o.jsx)("div",{"data-fs-budgets-available":!0,children:Number.isFinite(c)?i(c,r):"—"}),(0,o.jsx)("div",{"data-fs-budgets-to-be-spent":!0,children:0!==l?i(l,r):i(0,r)}),(0,o.jsx)("div",{"data-fs-budgets-remaining":!0,children:(0,o.jsx)("strong",{children:i(s,r)})})]},a.id||t)})})]})})};var m=r(88470),g=r(23729);function j(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,a)}return r}function O(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?j(Object(r),!0).forEach(function(t){(0,n.A)(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):j(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}var x=e=>{var t=O(O({},b.rK),e),{order:r}=(0,m.F)();return null!=r&&r.budgetData?(0,o.jsx)(g.A,{className:"section-account-order-budgets",children:(0,o.jsx)(h,{budgetData:r.budgetData,currencyCode:r.storePreferencesData.currencyCode,labels:t})}):null};x.$componentKey="AccountOrderBudgets";var w=r(51322);function P(e){var t,r,a,{title:n="Delivery",deliveryOptionsData:i,fields:l}=e,s=null!=(t=null==i?void 0:i.deliveryOptions)?t:[],c=null==i?void 0:i.contact;return(0,o.jsxs)(p,{title:n,"data-fs-order-delivery-card":!0,children:[(0,o.jsx)("div",{"data-fs-delivery-methods":!0,children:s.map(e=>(0,o.jsx)("p",{"data-fs-delivery-method":!0,children:e.friendlyDeliveryOptionName},e.friendlyDeliveryOptionName))}),c&&(0,o.jsxs)("div",{"data-fs-delivery-contact":!0,children:[(0,o.jsx)("p",{"data-fs-delivery-contact-name":!0,children:c.name}),c.phone&&(0,o.jsx)("p",{"data-fs-delivery-contact-phone":!0,children:c.phone}),(null==l?void 0:l.length)>0&&(0,o.jsx)("p",{"data-fs-delivery-contact-fields":!0,children:"".concat((0,w.Ox)(null==(r=l[0])?void 0:r.name),": ").concat(null==(a=l[0])?void 0:a.value)})]})]})}var S=["children"];function D(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,a)}return r}function L(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};
1t%2?D(Object(r),!0).forEach(function(t){(0,n.A)(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):D(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}let A=function(e){var{children:t}=e,r=(0,l.A)(e,S);return(0,o.jsx)(s.nD,L(L({},r),{},{"data-fs-my-account-accordion":!0,children:t}))};var C=["children","index"];function I(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,a)}return r}function k(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?I(Object(r),!0).forEach(function(t){(0,n.A)(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):I(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}let E=function(e){var{children:t,index:r}=e,a=(0,l.A)(e,C);return(0,o.jsx)(s.As,k(k({index:r},a),{},{"data-fs-my-account-accordion-item":!0,children:t}))},F=function(e){var{title:t,summary:r,children:a}=e;return(0,o.jsxs)(s.J2,{collapsedIcon:(0,o.jsx)(s.In,{name:"CaretDown"}),expandedIcon:(0,o.jsx)(s.In,{name:"CaretUp"}),"data-fs-my-account-accordion-button":!0,type:"button",children:[(0,o.jsxs)("div",{"data-fs-my-account-accordion-header":!0,children:[(0,o.jsx)(s.In,{name:"Package"}),(0,o.jsx)("span",{"data-fs-my-account-accordion-header-title":!0,children:t})]}),(0,o.jsx)("p",{"data-fs-my-account-accordion-summary":!0,children:r}),a]})},R=function(e){var{children:t}=e;return(0,o.jsx)(s.vr,{children:(0,o.jsx)("div",{"data-fs-my-account-accordion-content":!0,children:t})})};function N(e){var{title:t,children:r}=e;return(0,o.jsxs)("div",{"data-fs-delivery-option-accordion-info-container":!0,children:[(0,o.jsx)("span",{"data-fs-delivery-option-accordion-info-title":!0,children:t}),r]})}let _=function(e){var t,{deliveryOption:r,contact:a}=e,n="pickup-in-point"===r.deliveryChannel,i=n?null==(t=r.pickupStoreInfo)?void 0:t.address:r.address;return i||a||r.deliveryWindow?(0,o.jsxs)("div",{"data-fs-delivery-option-accordion-delivery-info":!0,children:[!n&&a&&(0,o.jsxs)(N,{title:"Recipient",children:[(0,o.jsx)("span",{"data-fs-delivery-option-accordion-info":!0,children:(0,o.jsx)("strong",{children:a.name})}),a.phone&&(0,o.jsx)("span",{"data-fs-delivery-option-accordion-info":!0,children:a.phone}),a.email&&(0,o.jsx)("span",{"data-fs-delivery-option-accordion-info":!0,children:a.email})]}),(0,o.jsxs)(N,{title:n?"Store address":"Delivery address",children:[(0,o.jsx)("span",{"data-fs-delivery-option-accordion-info":!0,children:(0,o.jsx)("strong",{children:i.city})}),(0,o.jsx)("span",{"data-fs-delivery-option-accordion-info":!0,children:i.street}),(0,o.jsx)("span",{"data-fs-delivery-option-accordion-info":!0,children:"".concat(i.postalCode).concat(i.state?", ".concat(i.state):"").concat(i.country?", ".concat(i.country,"."):"")})]}),n&&r.deliveryWindow&&(0,o.jsxs)(N,{title:"Store Hours",children:[(0,o.jsxs)("span",{"data-fs-delivery-option-accordion-info":!0,children:["From:"," ",new Date(r.deliveryWindow.startDateUtc).toLocaleString()]}),(0,o.jsxs)("span",{"data-fs-delivery-option-accordion-info":!0,children:["To:"," ",new Date(r.deliveryWindow.endDateUtc).toLocaleString()]})]})]}):null};function T(e){var t,{image:r,quantity:a,name:n,field:i,price:l,tax:s,total:c}=e;return(0,o.jsxs)("div",{"data-fs-delivery-option-accordion-product":!0,children:[(0,o.jsxs)("div",{"data-fs-delivery-option-accordion-product-top":!0,children:[(0,o.jsxs)("div",{"data-fs-delivery-option-accordion-product-image":!0,children:[(0,o.jsx)("img",{src:r,alt:n}),(0,o.jsx)("span",{"data-fs-delivery-option-accordion-product-quantity":!0,children:a})]}),(0,o.jsxs)("div",{"data-fs-delivery-option-accordion-product-details":!0,children:[(0,o.jsx)("p",{children:n}),i&&(0,o.jsx)("span",{children:"".concat((0,w.Ox)(i.name),": ").concat(null!=(t=i.value)?t:"")})]})]}),(0,o.jsxs)("div",{"data-fs-delivery-option-accordion-product-bottom":!0,children:[(0,o.jsxs)("div",{"data-fs-delivery-option-accordion-product-price":!0,children:[(0,o.jsx)("p",{children:l}),(0,o.jsx)("span",{children:"Each"})]}),(0,o.jsxs)("div",{"data-fs-delivery-option-accordion-product-tax":!0,children:[(0,o.jsx)("p",{children:s}),(0,o.jsx)("span",{children:"Taxes"})]}),(0,o.jsxs)("div",{"data-fs-delivery-option-accordion-product-total":!0,children:[(0,o.jsx)("p",{children:c}),(0,o.jsx)("span",{children:"Total"})]})]})]})}function q(e){var{children:t}=e;return(0,o.jsx)("div",{"data-fs-delivery-option-accordion-products":!0,children:t})}let M=function(e){var t,r,{deliveryOption:a,contact:n,currencyCode:i,labels:l,customFields:s}=e,c=(0,b.UO)(l),{0:d,1:u}=(0,v.useState)(new Set([])),p=y(),f=a.friendlyDeliveryOptionName,h=c.itemCountTemplate.replace("{count}",String(a.quantityOfDifferentItems)),m="".concat(h," – ").concat(c.totalLabel," ").concat(p(null!=(t=a.total)?t:0,i));return(0,o.jsx)(A,{indices:d,onChange:e=>{d.has(e)?(d.delete(e),u(new Set(d))):u(new Set(d.add(e)))},"data-fs-delivery-option-accordion":!0,children:(0,o.jsxs)(E,{index:0,children:[(0,o.jsx)(F,{title:f,summary:m}),(0,o.jsxs)(R,{children:[(0,o.jsx)(_,{deliveryOption:a,contact:n}),(0,o.jsx)(q,{children:null==(r=a.items)?void 0:r.map((e,t)=>{var r,a,n,l,c,d=(null!=(r=e.tax)?r:0)+(null!=(a=e.taxPriceTagsTotal)?a:0);return(0,o.jsx)(T,{image:e.imageUrl||"",quantity:e.quantity,name:e.name,field:null==s||null==(n=s.find(t=>
1t.id===e.uniqueId))||null==(n=n.fields)?void 0:n[0],price:p(null!=(l=e.sellingPrice)?l:0,i),tax:p(d,i),total:p(null!=(c=e.total)?c:0,i)},t)})})]})]},String(0))})};function z(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,a)}return r}function U(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?z(Object(r),!0).forEach(function(t){(0,n.A)(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):z(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}var B=e=>{var t,r=U(U({},b.Hb),e),{order:a}=(0,m.F)();return null!=a&&a.deliveryOptionsData?(0,o.jsxs)(g.A,{className:"section-account-order-delivery",children:[(0,o.jsx)(P,{deliveryOptionsData:a.deliveryOptionsData,fields:(null==(t=a.customFields)||null==(t=t.find(e=>"address"===e.type))?void 0:t.fields)||[],title:r.deliveryTitle}),a.deliveryOptionsData.deliveryOptions.map(e=>(0,o.jsx)(M,{deliveryOption:e,contact:a.deliveryOptionsData.contact,currencyCode:a.storePreferencesData.currencyCode,customFields:a.customFields.filter(e=>"item"===e.type),labels:r},e.friendlyDeliveryOptionName))]}):null};B.$componentKey="AccountOrderDelivery";var K=r(96856),$=e=>{var{orderNumberPrefix:t=b.QK.orderNumberPrefix,goBackLabel:r=b.QK.goBackLabel,cancelOrderLabel:a=b.QK.cancelOrderLabel,reorderLabel:n=b.QK.reorderLabel,notNowLabel:i=b.QK.notNowLabel,cancelConfirmMessage:l=b.QK.cancelConfirmMessage,cancelSuccessToast:s=b.QK.cancelSuccessToast,cancelErrorToast:c=b.QK.cancelErrorToast,approveLabel:d=b.QK.approveLabel,rejectLabel:u=b.QK.rejectLabel}=e,{order:p,orderStatusLabels:f}=(0,m.F)();return p?(0,o.jsx)(g.A,{className:"section-account-order-details",children:(0,o.jsx)(K.A,{order:p,statusLabels:f,labels:{orderNumberPrefix:t,goBackLabel:r,cancelOrderLabel:a,reorderLabel:n,notNowLabel:i,cancelConfirmMessage:l,cancelSuccessToast:s,cancelErrorToast:c,approveLabel:d,rejectLabel:u}})}):null};$.$componentKey="AccountOrderDetails";let W=function(e){var{title:t=b.SY.moreInfoTitle,fields:r}=e;return(0,o.jsx)(p,{title:t,"data-fs-order-more-information-card":!0,children:(0,o.jsx)("div",{"data-fs-order-more-information-card-content":!0,children:r.map(e=>(0,o.jsxs)("div",{"data-fs-order-more-information-card-item":!0,children:[(0,o.jsx)("p",{"data-fs-order-more-information-card-title":!0,children:(0,w.Ox)(e.name)}),(0,o.jsx)("p",{"data-fs-order-more-information-card-value":!0,children:e.value})]},e.name))})})};var V=e=>{var t,{moreInfoTitle:r=b.SY.moreInfoTitle}=e,{order:a}=(0,m.F)(),n=null==a||null==(t=a.customFields)||null==(t=t.find(e=>"order"===e.type))?void 0:t.fields;return null!=n&&n.length?(0,o.jsx)(g.A,{className:"section-account-order-more-info",children:(0,o.jsx)(W,{fields:n,title:r})}):null};V.$componentKey="AccountOrderMoreInfo";let H=function(e){var t,r,{title:a="Ordered by",clientProfileData:n,shopper:i}=e,l=!!(null==i?void 0:i.firstName),s=null!=(t=l?null==i?void 0:i.firstName:null==n?void 0:n.firstName)?t:"",c=null!=(r=l?null==i?void 0:i.lastName:null==n?void 0:n.lastName)?r:"",d=(null==i?void 0:i.email)||(null==n?void 0:n.email),u=(null==i?void 0:i.phone)||(null==n?void 0:n.phone),f=null==n?void 0:n.corporateName,v=null==n?void 0:n.isCorporate;return(0,o.jsxs)(p,{title:a,"data-fs-order-ordered-by-card":!0,children:[v&&f&&(0,o.jsxs)("div",{"data-fs-ordered-by-org":!0,children:[(0,o.jsx)("div",{"data-fs-ordered-by-avatar":!0,children:f.charAt(0).toUpperCase()}),(0,o.jsx)("p",{"data-fs-ordered-by-org-name":!0,children:f})]}),(0,o.jsxs)("div",{"data-fs-ordered-by-client-info":!0,children:[(0,o.jsx)("p",{"data-fs-ordered-by-client-name":!0,children:"".concat(null!=s?s:""," ").concat(null!=c?c:"")}),(u||d)&&(0,o.jsxs)("p",{children:[u&&(0,o.jsx)(o.Fragment,{children:u}),u&&d&&(0,o.jsx)("br",{}),d]})]})]})};var Q=e=>{var{orderedByTitle:t=b.dS.orderedByTitle}=e,{order:r}=(0,m.F)();return r?(0,o.jsx)(g.A,{className:"section-account-order-ordered-by",children:(0,o.jsx)(H,{clientProfileData:r.clientProfileData,shopper:r.shopper,title:t})}):null};Q.$componentKey="AccountOrderOrderedBy";var J={visa:"Visa",mastercard:"Mastercard",diners:"Diners",american:"Amex",hipercard:"Hipercard",discover:"Discover",banricompras:"Banricompras",aura:"Aura",elo:"EloCard",jcb:"JCB",bankinvoice:"FileText",paypal:"PayPal",giftcard:"Gift",cash:"Currency",applepay:"ApplePay",googlepay:"GooglePay"};let Y=function(e){var{payment:t}=e;if(!(t.paymentSystemName&&"Free"!==t.paymentSystemName&&1))return null;var r=(()=>{var e,{group:r,paymentSystemName:a,paymentOrigin:n}=t;if(n){if("Google Pay"===n)return J.googlepay;if("Apple Pay"===n)return J.applepay}switch(r){case"bankInvoice":e="bankinvoice";break;case"payPal":e="paypal";break;case"giftCard":e="giftcard";break;
1case"debitCard":e="cash";break;default:e=a.toLowerCase().split(" ")[0]}return e in J?J[e]:null})();return r?(0,o.jsx)("div",{"data-fs-payment-flag":!0,children:(0,o.jsx)(s.In,{name:r,height:22})}):null};function G(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,a)}return r}function X(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?G(Object(r),!0).forEach(function(t){(0,n.A)(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):G(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}let Z=function(e){var t,{paymentData:r,currencyCode:a,allowCancellation:n=!1,labels:i}=e,l=(0,b.Od)(i),c=y(),d=(e=>{for(var t of e)for(var r of t.payments)if(r.url)return r.url.replace("{Installment}","1");return null})(null==r?void 0:r.transactions),u=n&&d;return(0,o.jsx)(p,{title:l.paymentTitle,"data-fs-order-payment-card":!0,children:(0,o.jsx)("div",{"data-fs-payment-details":!0,children:null==r||null==(t=r.transactions[0])?void 0:t.payments.map(e=>{var t,r=((e,t)=>{var r={type:t.billingLabel,methodName:"",icon:e.paymentSystemName};switch(e.group){case"creditCard":case"debitCard":return X(X({},r),{},{methodName:"".concat(e.paymentSystemName," ").concat(t.endingInLabel," ").concat(e.lastDigits)});case"bankInvoice":return X(X({},r),{},{type:t.bankInvoiceLabel,methodName:t.bankInvoiceLabel});case"payPal":return X(X({},r),{},{methodName:t.paypalLabel});case"giftCard":return X(X({},r),{},{type:t.giftCardLabel,methodName:t.giftCardLabel});default:return X(X({},r),{},{methodName:e.paymentSystemName})}})(e,l),n="giftCard"===e.group&&e.redemptionCode;return(0,o.jsxs)("div",{"data-fs-payment-info":!0,children:[(0,o.jsxs)("div",{"data-fs-payment-method":!0,children:[(0,o.jsxs)("div",{"data-fs-payment-method-info":!0,children:[(0,o.jsx)("p",{"data-fs-payment-name":!0,children:r.methodName}),(0,o.jsx)(Y,{payment:e})]}),(0,o.jsx)("div",{"data-fs-payment-value":!0,children:n?(0,o.jsxs)("span",{children:[e.redemptionCode," -"," ",c(e.value,a)]}):e.installments>1?(0,o.jsx)("span",{children:l.installmentCopy.replace("{count}",String(e.installments)).replace("{value}",c(e.value/e.installments,a))}):(0,o.jsx)("span",{children:c(e.value,a)})})]}),(0,o.jsxs)("div",{"data-fs-payment-transaction-info":!0,children:[e.tid&&(0,o.jsxs)("span",{"data-fs-payment-tid":!0,children:[l.tidLabel," ",e.tid]}),(null==(t=e.connectorResponses)?void 0:t.authId)&&(0,o.jsxs)("span",{"data-fs-payment-authid":!0,children:[l.authIdLabel," ",String(e.connectorResponses.authId)]}),(0,o.jsxs)("div",{"data-fs-payment-bank-invoice":!0,children:[e.bankIssuedInvoiceIdentificationNumber&&(0,o.jsxs)("span",{"data-fs-payment-bank-invoice-number":!0,children:[l.invoiceNumberLabel," ",e.bankIssuedInvoiceIdentificationNumber]}),u&&(0,o.jsx)(s.N_,{"data-fs-payment-invoice-link":!0,href:d,target:"_blank",children:l.printBankInvoiceLabel})]})]})]},e.id)})})})};function ee(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,a)}return r}function et(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ee(Object(r),!0).forEach(function(t){(0,n.A)(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ee(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}var er=e=>{var t=et(et({},b.dj),e),{order:r}=(0,m.F)();return r?(0,o.jsx)(g.A,{className:"section-account-order-payment",children:(0,o.jsx)(Z,{currencyCode:r.storePreferencesData.currencyCode,paymentData:r.paymentData,allowCancellation:r.allowCancellation,labels:t})}):null};er.$componentKey="AccountOrderPayment";var ea=r(61373),en=r(19715),ei={completed:"Order Placed",loading:"Order Placed","not-started":"Order Placed",failed:"Order Placed"},el={completed:"Approved",loading:"Pending approval","not-started":"Pending approval",failed:"Denied"},es={completed:"Payment Approved",loading:"Payment Pending","not-started":"Payment authorization",failed:"Payment Denied"},eo={completed:"Ready for Delivery",loading:"Handling order","not-started":"Handling order",failed:"Canceled"},ec={completed:"Invoiced",loading:"Shipping order","not-started":"Ship order",failed:"Canceled"},ed=[{label:e=>ei[e],key:"order"},{label:e=>el[e],key:"approval"},{label:e=>es[e],key:"payment"},{label:e=>eo[e],key:"processing"},{label:e=>ec[e],key:"shipping"}],eu={"Order Placed":"order","Pending approval":"approval","Payment Pending":"payment","Payment Approved":"processing","Payment Denied":"payment","Ready for Delivery":"processing",Invoiced:"shipping"},ep=["Cancellation Requested","Canceled"],ef=["Payment Denied"],ev=e=>{var t=new Date(e);return{date:new Intl.DateTimeFormat("en-US",{month:"2-digit",day:"2-digit",year:"numeric"}).format(t),time:new Intl.DateTimeFormat("en-US",{hour:"numeric",minute:"2-digit",hour12:!0}).format(t)}},ey=e=>{var{status:t,isCanceled:r}=e;return"failed"===t?(0,o.jsx)("div",{"data-fs-shipping-step-icon":!0,"data-fs-shipping-step-failed":!0,children:(0,o.jsx)(s.In,{name:"X",height:16,width:16})}):r?(0,o.jsx)("div",{"data-fs-shipping-step-icon":!0,"data-fs-shipping-step-canceled":!0}
1):"completed"===t?(0,o.jsx)("div",{"data-fs-shipping-step-icon":!0,"data-fs-shipping-step-completed":!0,children:(0,o.jsx)(s.In,{name:"Checked",height:16,width:16})}):"loading"===t?(0,o.jsx)("div",{"data-fs-shipping-step-icon":!0,"data-fs-shipping-step-loading":!0,children:(0,o.jsx)(s.In,{name:"DotsThree",height:16,width:16})}):(0,o.jsx)("div",{"data-fs-shipping-step-icon":!0})};let eb=function(e){var t,{status:r,creationDate:a,labels:n}=e,i=(0,b._q)(n),l=(0,v.useRef)(null);!function(e){var{isDesktop:t,isMobile:r,isTablet:a}=(0,en.A)();(0,v.useEffect)(()=>{var r=e.current;if(r){var a=()=>{var e=r.querySelectorAll("[data-fs-shipping-connector]");if(0!==e.length)if(t){var a=(()=>{var e=r.querySelectorAll("[data-fs-shipping-step]");if(0!==e.length){var t=r.offsetWidth,a=0;e.forEach(e=>{a+=e.offsetWidth});var n=e.length-1;return(t-a)/n}})();e.forEach(e=>{e.style.width="calc(((50% - var(--fs-order-status-step-icon-half-size) - var(--fs-order-status-card-gap)) * 2) + ".concat(a,"px)"),e.style.height="var(--fs-border-width)"})}else e.forEach(e=>{e.style.width="var(--fs-border-width)",e.style.height="calc((50% - var(--fs-order-status-step-icon-half-size)) + var(--fs-order-status-card-gap) + (50% - var(--fs-order-status-step-icon-half-size)) - (var(--fs-order-status-connector-spacing) * 2))"})};return a(),window.addEventListener("resize",a),()=>window.removeEventListener("resize",a)}},[e,t])}(l);var c=null==(t=ea.pC[r])?void 0:t.label,d=!!c&&ep.includes(c),u=!!c&&ef.includes(c),f=ed.map(e=>{var t,n=(e=>{var t,{stepKey:r,currentStatus:a,isCanceled:n,isFailed:i}=e,l=null==(t=ea.pC[a])?void 0:t.label;if(n)return"payment"===r?"failed":"not-started";var s=l?eu[l]:void 0;if(i&&r===s)return"failed";var o=ed.findIndex(e=>e.key===s),c=ed.findIndex(e=>e.key===r);return -1===o?0===c?"loading":"not-started":c===o?"loading":c<o?"completed":"not-started"})({stepKey:e.key,currentStatus:r,isCanceled:d,isFailed:u}),l=d?"payment"===e.key?c:"—":e.label(n);return d||("order"===e.key?l=i.orderPlacedStep:"payment"===e.key&&"loading"===n?l=i.paymentPendingStep:"processing"===e.key&&"loading"===n?l=i.handlingStep:"shipping"===e.key&&"completed"===n?l=i.invoicedStep:"shipping"===e.key&&"loading"===n&&(l=i.deliveredStep)),"order"===e.key&&("completed"===n||"failed"===n)&&a&&(t=a),{label:l,status:n,completedAt:t}});return(0,o.jsx)(p,{title:i.statusTitle,"data-fs-order-status-card":!0,children:(0,o.jsx)("div",{"data-fs-order-status-content":!0,ref:l,children:f.map((e,t)=>(0,o.jsxs)("div",{"data-fs-shipping-step":!0,"data-fs-shipping-status":e.status,children:[(0,o.jsx)(ey,{status:e.status,isCanceled:d}),(0,o.jsxs)("div",{"data-fs-shipping-step-content":!0,children:["—"===e.label?(0,o.jsx)(s.EA,{size:{width:"100px",height:"14px"},shimmer:!1},"skeleton-".concat(t)):(0,o.jsx)("p",{"data-fs-shipping-step-label":!0,children:e.label}),e.completedAt&&(0,o.jsxs)("div",{"data-fs-shipping-step-details":!0,children:[(0,o.jsx)("span",{"data-fs-shipping-step-date":!0,children:ev(e.completedAt).date}),(0,o.jsx)("span",{"data-fs-shipping-step-time":!0,children:ev(e.completedAt).time})]})]}),(0,o.jsx)("div",{"data-fs-shipping-connector":!0,"data-fs-shipping-connector-status":"completed"===e.status?"completed":"not-started"})]},"step-".concat(t)))})})};var eh=e=>{var{statusTitle:t=b.Fv.statusTitle,orderPlacedStep:r=b.Fv.orderPlacedStep,paymentPendingStep:a=b.Fv.paymentPendingStep,handlingStep:n=b.Fv.handlingStep,invoicedStep:i=b.Fv.invoicedStep,deliveredStep:l=b.Fv.deliveredStep}=e,{order:s}=(0,m.F)();return s?(0,o.jsx)(g.A,{className:"section-account-order-status",children:(0,o.jsx)(eb,{status:s.status,creationDate:s.creationDate,labels:{statusTitle:t,orderPlacedStep:r,paymentPendingStep:a,handlingStep:n,invoicedStep:i,deliveredStep:l}})}):null};eh.$componentKey="AccountOrderStatus";let em=function(e){var t,r,{totals:a,currencyCode:n,transactions:i,labels:l}=e,s=(0,b.Oy)(l),c=y(),d=(t=0,i.forEach(e=>{e.isActive&&e.payments.forEach(e=>{var r=0===e.referenceValue?e.value:e.referenceValue,a=e.value-r;t+=a})}),(r=t)>0)?[...a,{id:"Interest",name:s.interestLabel,value:r}]:a,u=d.reduce((e,t)=>
1e+t.value,0);return(0,o.jsxs)(p,{title:s.summaryTitle,"data-fs-order-summary-card":!0,children:[d.map(e=>(0,o.jsxs)("div",{"data-fs-order-summary-item":!0,children:[(0,o.jsx)("span",{children:e.name}),(0,o.jsx)("span",{children:c(e.value,n)})]},e.id)),(0,o.jsxs)("div",{"data-fs-order-summary-item":!0,"data-fs-order-summary-total":!0,children:[(0,o.jsx)("span",{children:s.totalLabel}),(0,o.jsx)("span",{children:c(u,n)})]})]})};function eg(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,a)}return r}function ej(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?eg(Object(r),!0).forEach(function(t){(0,n.A)(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):eg(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}var eO=e=>{var t=ej(ej({},b.Hd),e),{order:r}=(0,m.F)();return r?(0,o.jsx)(g.A,{className:"section-account-order-summary",children:(0,o.jsx)(em,{totals:r.totals,currencyCode:r.storePreferencesData.currencyCode,transactions:r.paymentData.transactions,labels:t})}):null};eO.$componentKey="AccountOrderSummary";var ex=r(41531);function ew(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,a)}return r}function eP(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ew(Object(r),!0).forEach(function(t){(0,n.A)(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ew(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}var eS=(0,v.forwardRef)((e,t)=>{var{to:r,from:a,setDisabled:n,fromLabel:i="From",toLabel:l="To",invalidDateRangeLabel:c="Invalid date range"}=e,d=(0,v.useRef)(null),u=(0,v.useRef)(null),{0:p,1:f}=(0,v.useState)(),{0:y,1:b}=(0,v.useState)(),{0:h,1:m}=(0,v.useState)({from:a,to:r});function g(e){if(!e.from||!e.to){f(void 0),b(void 0),n(!1);return}new Date(e.from)>new Date(e.to)?(f(c),n(!0)):(f(void 0),b(void 0),n(!1))}return(0,v.useImperativeHandle)(t,()=>({clear:()=>{f(void 0),b(void 0),m({from:"",to:""}),d.current&&(d.current.value=""),u.current&&(u.current.value="")},getDataRangeFacet:()=>({key:"dateRange",value:h})})),(0,o.jsx)("div",{"data-fs-list-orders-filters-date-range":!0,children:(0,o.jsxs)("div",{"data-fs-list-orders-filters-date-range-inputs":!0,children:[(0,o.jsx)(s.FO,{id:"date-range-from",label:i,type:"date",inputMode:"text",error:p,inputRef:d,value:h.from,onChange:e=>{var t;return t=e.target.value,void(m(eP(eP({},h),{},{from:String(t)})),null==g||g(eP(eP({},h),{},{from:String(t)})))},onBlur:()=>!p&&(null==g?void 0:g(h))}),(0,o.jsx)(s.FO,{id:"date-range-to",label:l,type:"date",inputMode:"text",error:y,inputRef:u,value:h.to,onChange:e=>{var t;return t=e.target.value,void(m(eP(eP({},h),{},{to:String(t)})),null==g||g(eP(eP({},h),{},{to:String(t)})))},onBlur:()=>!y&&(null==g?void 0:g(h))})]})})});let eD=function(e){var{selected:t,dispatch:r}=e,a=(0,v.useMemo)(()=>t.some(e=>"pendingMyApproval"===e.key&&"true"===e.value),[t]);return(0,o.jsxs)("div",{"data-fs-my-account-filter-facet-pending-approval":!0,children:[(0,o.jsx)(s.lM,{id:"pending-approval-toggle",testId:"pending-approval-toggle",checked:a,onChange:e=>{e.target.checked?r({type:"setFacet",payload:{facet:{key:"pendingMyApproval",value:"true"},unique:!0}}):r({type:"toggleFacet",payload:{key:"pendingMyApproval",value:"true"}})},"aria-label":"Filter orders pending approval"}),(0,o.jsx)("label",{htmlFor:"pending-approval-toggle",children:"Pending my approval"})]})};var eL=r(66759),eA=r.n(eL);let eC=function(e){var{facets:t,testId:r,dispatch:a,expanded:n,selected:i,title:l,clearButtonLabel:c,applyButtonLabel:d,searchInputRef:u,fromLabel:p,toLabel:f,invalidDateRangeLabel:y}=e,{resolveLink:b}=(0,ex.i)(),h=(0,v.useRef)(null),{0:m,1:g}=(0,v.useState)(!1);return(0,o.jsx)(s.EQ,{overlayProps:{className:"section ".concat(eA().section," section-filter-slider")},title:l,size:"partial",direction:"rightSide",clearBtnProps:{variant:"secondary",onClick:()=>{var e;null==(e=h.current)||e.clear(),a({type:"selectFacets",payload:[]})},children:null!=c?c:"Clear All"},applyBtnProps:{variant:"primary",onClick:()=>{var e,t,r,a,n,l,s,o=null==(e=h.current)||null==(t=e.getDataRangeFacet)?void 0:t.call(e),c=null==o||null==(r=o.value)||null==(r=r.from)||null==(a=r.trim)?void 0:a.call(r),d=null==o||null==(n=o.value)||null==(n=n.to)||null==(l=n.trim)?void 0:l.call(n),p=[];c&&p.push({key:"dateInitial",value:c}),d&&p.push({key:"dateFinal",value:d}),(e=>{var t,{selectedFacets:r,text:a}=e,n=r.reduce((e,t)=>
1{var{key:r,value:a}=t;return"dateInitial"===r&&(e.dateInitial=a),"dateFinal"===r&&(e.dateFinal=a),"status"===r&&(e.status=Array.isArray(e.status)?[...e.status,a]:[a]),"pendingMyApproval"===r&&(e.pendingMyApproval=a),e},{}),i=new URLSearchParams;a&&i.set("text",a),Object.entries(n).forEach(e=>{var[t,r]=e;Array.isArray(r)?r.forEach(e=>i.append(t,e)):i.set(t,r)});var l=null!=(t=b("/pvt/account/orders"))?t:"/pvt/account/orders";window.location.href="".concat(l,"?").concat(i.toString())})({selectedFacets:[...i,...p],text:null==(s=u.current)?void 0:s.inputRef.value})},disabled:m,children:null!=d?d:"Apply"},onClose:()=>{},children:(0,o.jsx)(s.dJ,{testId:"mobile-".concat(r),indicesExpanded:n,onAccordionChange:e=>a({type:"toggleExpanded",payload:e}),children:t.map((e,t)=>{var{__typename:l,label:c}=e,d=n.has(t);return(0,o.jsxs)(s.ZZ,{testId:"mobile-".concat(r),index:t,type:l,label:c,children:["StoreFacetBoolean"===l&&d&&(0,o.jsx)(s.wY,{children:e.values.map(t=>{var n,i,l=(null==r?void 0:r.trim().toLowerCase())||"",c=(null==(n=e.label)?void 0:n.trim().toLowerCase())||"",d=(null==(i=t.label)?void 0:i.trim().toLowerCase())||"",u="".concat(l,"-").concat(c,"-").concat(d);return(0,o.jsx)(s.j5,{id:u,testId:"mobile-".concat(l),onFacetChange:e=>a({type:"toggleFacet",payload:e}),selected:t.selected,value:t.value,quantity:t.quantity,facetKey:e.key,label:t.label},u)})}),"StoreFacetPendingApproval"===l&&d&&(0,o.jsx)(eD,{selected:i,dispatch:a}),"StoreFacetRange"===l&&d&&(0,o.jsx)(eS,{ref:h,from:e.from,to:e.to,setDisabled:g,fromLabel:p,toLabel:f,invalidDateRangeLabel:y})]},"".concat(r,"-").concat(c,"-").concat(t))})})})};var eI=r(77704),ek=["value"];function eE(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,a)}return r}function eF(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?eE(Object(r),!0).forEach(function(t){(0,n.A)(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):eE(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}var eR=(e,t)=>{var{expanded:r,selected:a}=e,{type:n,payload:i}=t;switch(n){case"toggleExpanded":return r.has(i)?r.delete(i):r.add(i),eF(eF({},e),{},{expanded:new Set(r)});case"selectFacets":if(i!==a)return eF(eF({},e),{},{selected:i});break;case"toggleFacet":return eF(eF({},e),{},{selected:(0,eI.toggleFacet)(e.selected,i)});case"setFacet":return eF(eF({},e),{},{selected:(0,eI.setFacet)(e.selected,i.facet,i.unique)});default:throw Error("Action ".concat(n," not implemented"))}return e};let eN=function(e){var{pageTitle:t}=e;return(0,o.jsx)("header",{"data-fs-account-header":!0,children:(0,o.jsx)("h1",{"data-fs-account-header-title":!0,children:t})})};function e_(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,a)}return r}function eT(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?e_(Object(r),!0).forEach(function(t){(0,n.A)(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):e_(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}var eq={pageTitle:"Orders",searchPlaceholder:"Search",filtersLabel:"Filters",clearAllLabel:"Clear All",viewResultsLabel:"View Results",noResultsLabel:"No results found",noOrdersLabel:"You don't have any orders",startShoppingLabel:"Start shopping",placedOnLabel:"Placed on",deliveryByLabel:"Delivery by",pendingApprovalLabel:"Pending my approval",paginationOfLabel:"of",previousPageLabel:"Previous Page",nextPageLabel:"Next Page",viewAllLabel:"View all",viewLessLabel:"View less",fromLabel:"From",toLabel:"To",invalidDateRangeLabel:"Invalid date range",orderPlacedStatus:"Order Placed",pendingApprovalStatus:"Pending approval",paymentPendingStatus:"Payment Pending",paymentApprovedStatus:"Payment Approved",paymentDeniedStatus:"Payment Denied",readyForDeliveryStatus:"Ready for Delivery",invoicedStatus:"Invoiced",cancellationRequestedStatus:"Cancellation Requested",canceledStatus:"Canceled"}
1,eM=["orderPlacedStatus","pendingApprovalStatus","paymentPendingStatus","paymentApprovedStatus","paymentDeniedStatus","readyForDeliveryStatus","invoicedStatus","cancellationRequestedStatus","canceledStatus"];function ez(e){return eT(eT({},eq),e)}var eU=r(64161);function eB(e){var{isExpanded:t,onToggle:r,label:a,viewAllLabel:n="View all",viewLessLabel:i="View less",ariaControls:l}=e;return(0,o.jsx)(s.$n,{"aria-expanded":t,"aria-controls":l,"data-fs-list-orders-table-expand-button":!0,size:"small",variant:"primary",inverse:!0,iconPosition:"right",icon:t?(0,o.jsx)(s.In,{width:16,height:16,name:"CaretUp","aria-label":"Collapse"}):(0,o.jsx)(s.In,{width:16,height:16,name:"CaretDown","aria-label":"Expand"}),onClick:e=>{e.preventDefault(),e.stopPropagation(),r(e)},children:t?i:null!=a?a:n})}function eK(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,a)}return r}function e$(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?eK(Object(r),!0).forEach(function(t){(0,n.A)(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):eK(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function eW(e,t){return new Date(e).toLocaleDateString(t,{year:"numeric",month:"2-digit",day:"2-digit"})}function eV(e){var t,{page:r,total:a,perPage:n,labels:i}=e,l=ez(i),{resolveLink:c}=(0,ex.i)(),d=null!=(t=c("/pvt/account/orders"))?t:"/pvt/account/orders",u=Math.ceil(a/n),p=1===r?1:(r-1)*n+1,f=a>p+n-1?p+n-1:a,v=e=>{var t=new URLSearchParams(window.location.search);1===e||0===e?t.delete("page"):t.set("page",String(e)),window.location.href="".concat(d).concat(t.toString()?"?".concat(t):"")};return(0,o.jsxs)("div",{"data-fs-list-orders-table-pagination":!0,children:[(0,o.jsx)("p",{children:"".concat(p," — ").concat(f," ").concat(l.paginationOfLabel," ").concat(a)}),(0,o.jsx)(s.K0,{size:"small",variant:"tertiary",disabled:1===r,onClick:()=>v(r-1),icon:(0,o.jsx)(s.In,{name:"CaretLeft"}),"aria-label":l.previousPageLabel}),(0,o.jsx)(s.K0,{size:"small",variant:"tertiary",disabled:r===u,onClick:()=>v(r+1),icon:(0,o.jsx)(s.In,{name:"CaretRight"}),"aria-label":l.nextPageLabel})]})}function eH(e){var{listOrders:t,total:r,perPage:a,filters:n,labels:i}=e,l=ez(i),s=(0,ea.w3)(l),{isDesktop:c}=(0,en.A)(),{locale:d}=(0,f.useRouter)(),u=y(),{0:p,1:b}=(0,v.useState)({}),h=(e,t)=>{b(r=>{var a;return e$(e$({},r),{},{[e]:e$(e$({},r[e]),{},{[t]:!(null!=(a=r[e])&&a[t])})})})};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("table",{"data-fs-list-orders-table":!0,children:(0,o.jsx)("tbody",{"data-fs-list-orders-table-body":!0,children:t.list.map(e=>{var t,r,a,n,i=(null==e||null==(t=e.customFields)||null==(t=t.find(e=>{var{type:t}=e;return"order"===t}))?void 0:t.value)||[],f=(null==e||null==(r=e.customFields)||null==(r=r.find(e=>{var{type:t}=e;return"item"===t}))?void 0:r.value)||[],v=i&&i.length>0||f&&f.length>0,y=(null==(a=p[e.orderId])?void 0:a.item)||!1,b=(null==(n=p[e.orderId])?void 0:n.order)||!1,{displayed:m,shouldShowButton:g}=eQ({level:f,isExpanded:y,max:5}),{displayed:j,shouldShowButton:O}=eQ({level:i,isExpanded:b,max:5}),x="/pvt/account/orders/".concat(e.orderId),w=e.ShippingEstimatedDate?eW(e.ShippingEstimatedDate,d):"-",P=e.creationDate?eW(e.creationDate,d):"-",S=u(e.totalValue,e.currencyCode),D=e.ShippingEstimatedDate?"".concat(l.deliveryByLabel," ").concat(eW(e.ShippingEstimatedDate,d)):"-",L="additional-info-".concat(e.orderId,"-order"),A="additional-info-".concat(e.orderId,"-item");return(0,o.jsxs)("tr",{"data-fs-list-orders-table-row":!0,onClick:()=>{window.location.href=x},onKeyDown:e=>{"Enter"===e.key&&(e.preventDefault(),window.location.href=x)},tabIndex:0,"aria-label":"View order ".concat(e.orderId," details"),children:[(0,o.jsx)("td",{"data-fs-list-orders-table-cell":!0,children:(0,o.jsxs)("div",{"data-fs-list-orders-table-product-info-main":!0,children:[(0,o.jsx)("p",{"data-fs-list-orders-table-product-info-order-id":!0,title:"ID: ".concat(e.orderId||"-"),children:e.orderId||"-"}),(0,o.jsxs)("p",{"data-fs-list-orders-table-product-info-order-total":!0,title:"Total: ".concat(S),children:["Total: ",S]})]})}),c&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsxs)("td",{"data-fs-list-orders-table-cell":!0,children:[(0,o.jsxs)("div",{"data-fs-list-orders-table-product-info":!0,children:[(0,o.jsx)("p",{"data-fs-list-orders-table-product-info-label":!0,children:l.placedOnLabel}),(0,o.jsx)("p",{"data-fs-list-orders-table-product-info-value":!0,title:P,children:P})]}),v&&(0,o.jsxs)("div",{"data-fs-list-orders-table-product-info":!0,children:[(0,o.jsx)("p",{"data-fs-list-orders-table-product-info-label":!0,children:l.deliveryByLabel}),(0,o.jsx)("p",{"data-fs-list-orders-table-product-info-value":!0,title:w,children:w})]})]}),(0,o.jsx)("td",{"data-fs-list-orders-table-cell":!0,children:v&&(0,o.jsxs)(o.Fragment,{children:[j.length>0&&(0,o.jsx)("p",{"data-fs-list-orders-table-product-info-label":!0,id:L,children:"Order fields"}),j.map((e,t)=>(0,o.jsx)("p",{"data-fs-list-orders-table-product-info-order":!0,title:e,"aria-owns":L,children:e}
1,e+t)),O&&(0,o.jsx)(eB,{ariaControls:L,isExpanded:b,count:i.length-5,viewAllLabel:l.viewAllLabel,viewLessLabel:l.viewLessLabel,onToggle:()=>h(e.orderId,"order")})]})}),(0,o.jsx)("td",{"data-fs-list-orders-table-cell":!0,children:v&&(0,o.jsxs)(o.Fragment,{children:[m.length>0&&(0,o.jsx)("p",{"data-fs-list-orders-table-product-info-label":!0,id:A,children:"Item fields"}),m.map((e,t)=>(0,o.jsx)("p",{"data-fs-list-orders-table-product-info-item":!0,title:e,"aria-owns":A,children:e},e+t)),g&&(0,o.jsx)(eB,{ariaControls:A,isExpanded:y,count:f.length-5,viewAllLabel:l.viewAllLabel,viewLessLabel:l.viewLessLabel,onToggle:()=>h(e.orderId,"item")})]})})]}),(0,o.jsxs)("td",{"data-fs-list-orders-table-cell":!0,children:[(0,o.jsx)(eU.A,{status:e.status,statusFallback:e.statusDescription,statusLabels:s}),!c&&(0,o.jsx)("p",{children:D})]})]},e.orderId)})})}),c&&(0,o.jsx)(eV,{page:n.page,total:r,perPage:a,labels:l})]})}function eQ(e){var{level:t,isExpanded:r,max:a}=e,n=t.length>a;return{displayed:r?t:t.slice(0,a),shouldShowButton:n}}function eJ(e,t){var[r,a,n]=e.split("-").map(Number);return new Date(r,a-1,n).toLocaleDateString(t,{year:"numeric",month:"2-digit",day:"2-digit"})}function eY(e){var{filters:t,onRemoveFilter:r,labels:a}=e,n=ez(a),i={"order placed":n.orderPlacedStatus,"pending approval":n.pendingApprovalStatus,"payment pending":n.paymentPendingStatus,"payment approved":n.paymentApprovedStatus,"payment denied":n.paymentDeniedStatus,"ready for delivery":n.readyForDeliveryStatus,invoiced:n.invoicedStatus,"cancellation requested":n.cancellationRequestedStatus,canceled:n.canceledStatus},{locale:l}=(0,f.useRouter)(),{dateInitial:s,dateFinal:c,status:d,pendingMyApproval:u}=t,p=s?eJ(s,l):"",v=c?eJ(c,l):"",y=(s||c)&&(0,o.jsxs)("div",{"data-fs-list-orders-selected-tag":!0,children:[(0,o.jsx)("span",{"data-fs-list-orders-selected-tag-label":!0,children:(s&&c?"".concat(p," to ").concat(v):p?"from ".concat(p):"to ".concat(v))||""}),(0,o.jsx)("button",{"data-fs-list-orders-selected-tag-clear":!0,onClick:()=>{r("dateInitial",s)},children:"\xd7"})]},"date-range"),b=(d||[]).map(e=>(0,o.jsxs)("div",{"data-fs-list-orders-selected-tag":!0,children:[(0,o.jsx)("span",{children:i[e.toLowerCase()]||e}),(0,o.jsx)("button",{"data-fs-list-orders-selected-tag-clear":!0,onClick:()=>r("status",e),children:"\xd7"})]},"status-".concat(e))),h=u&&(0,o.jsxs)("div",{"data-fs-list-orders-selected-tag":!0,children:[(0,o.jsx)("span",{children:n.pendingApprovalLabel}),(0,o.jsx)("button",{"data-fs-list-orders-selected-tag-clear":!0,onClick:()=>r("pendingMyApproval",u),children:"\xd7"})]},"pending-approval");return(0,o.jsxs)(o.Fragment,{children:[h,y,b]})}let eG=function(e){var{filters:t,onClearAll:r,onRemoveFilter:a,labels:n}=e,i=ez(n),l=Object.entries(t).some(e=>{var[t,r]=e;return("status"===t||"dateInitial"===t||"dateFinal"===t||"pendingMyApproval"===t)&&r&&(!Array.isArray(r)||r.length>0)});return(0,o.jsx)(o.Fragment,{children:l&&(0,o.jsxs)("div",{"data-fs-list-orders-selected-tags":!0,children:[(0,o.jsx)(eY,{filters:t,onRemoveFilter:a,labels:i}),(0,o.jsx)(s.$n,{variant:"tertiary",size:"small","data-fs-list-orders-selected-tags-clear-all-button":!0,onClick:r,children:i.clearAllLabel})]})})};var eX=r(66872),eZ=r.n(eX),e0=["page","clientEmail"];function e1(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,a)}return r}function e2(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?e1(Object(r),!0).forEach(function(t){(0,n.A)(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):e1(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}var e6="/pvt/account/orders";function e5(e){var{filters:t}=e;return Object.keys(t).reduce((e,r)=>{if("page"===r||"text"===r||"clientEmail"===r)return e;var a=t[r];if("status"===r&&a.length>0){var n=Array.isArray(a)?a:[a];e.push(...n.map(e=>({key:"status",value:e.toLowerCase()})))}else"dateInitial"===r&&a?e.push({key:"dateInitial",value:String(a)}):"dateFinal"===r&&a?e.push({key:"dateFinal",value:String(a)}):"pendingMyApproval"===r&&a&&e.push({key:"pendingMyApproval",value:String(a)});return e},[])}function e4(e){var t,{listOrders:r,total:a,perPage:n,filters:i,labels:c}=e,d=ez(c),u=(0,f.useRouter)(),{resolveLink:p}=(0,ex.i)(),y=null!=(t=p(e6))?t:e6,{isDesktop:b}=(0,en.A)(),h=(0,v.useRef)(null);(0,v.useEffect)(()=>{var e,t;null!=(e=h.current)&&e.inputRef&&(null!=i&&i.text&&null!=(t=h.current)&&t.inputRef?h.current.inputRef.value=i.text:h.current.inputRef.value="")},[null==i?void 0:i.text]);var m=((e,t,r)=>{var{0:a,1:n}=(0,v.useState)(r);return(0,v.useEffect)(()=>
1{if(a!==r){var n=setTimeout(()=>{e(a)},t);return()=>{clearTimeout(n)}}},[a]),n})(e=>{if(e||u.query.text){var t;if(e.trim().toLowerCase()!==(null==(t=u.query.text)?void 0:t.toString().trim().toLowerCase())){var r=new URLSearchParams(window.location.search);r.delete("text"),r.delete("page"),e&&r.set("text",e),window.location.href="".concat(y,"?").concat(r.toString())}}},300,String(u.query.text)),g=e5({filters:i}),j=(e=>{var{allFacets:t,selectedFacets:r}=e,{0:{selected:a,expanded:n},1:i}=(0,v.useReducer)(eR,null,()=>({expanded:new Set([0,1]),selected:r})),s=(0,v.useMemo)(()=>a.reduce((e,t)=>{var r;return e.has(t.key)||e.set(t.key,new Map),null==(r=e.get(t.key))||r.set(t.value,t),e},new Map),[a]);return{facets:(0,v.useMemo)(()=>t.map(e=>"StoreFacetBoolean"===e.__typename?eF(eF({},e),{},{values:e.values.map(t=>{var r,{value:a}=t;return eF(eF({},(0,l.A)(t,ek)),{},{value:a.toLowerCase(),selected:!!(null==(r=s.get(e.key))?void 0:r.has(a.toLowerCase()))})})}):e),[t,s]),selected:a,expanded:n,dispatch:i}})({allFacets:function(e){var{filters:t,labels:r}=e,a=eM.map(e=>r[e]);return[{__typename:"StoreFacetPendingApproval",key:"pendingMyApproval",label:r.pendingApprovalLabel},{__typename:"StoreFacetBoolean",key:"status",label:"Status",values:ea.gi.map((e,t)=>{var r;return{label:null!=(r=a[t])?r:e,quantity:0,selected:!1,value:e.toLowerCase()}})},{__typename:"StoreFacetRange",key:"dateRange",label:"Order Date",from:t.dateInitial,to:t.dateFinal}]}({filters:i,labels:d}),selectedFacets:g}),{openFilter:O,filter:x}=(0,s.mL)(),w=i.status.length>0||!!i.dateInitial||!!i.dateFinal||!!i.text||!!i.pendingMyApproval,P=0===r.list.length;return(0,o.jsxs)("div",{className:eZ().page,children:[(0,o.jsx)(eN,{pageTitle:d.pageTitle}),(0,o.jsxs)("div",{"data-fs-list-orders-controls":!0,children:[(0,o.jsxs)("div",{"data-fs-list-orders-search-filters":!0,children:[(0,o.jsx)(s.b7,{ref:h,"data-fs-search-input-field-list-orders":!0,placeholder:d.searchPlaceholder,onBlur:e=>{m(h.current.inputRef.value)},onKeyDown:e=>{"Enter"===e.key&&m(h.current.inputRef.value)},onSubmit:e=>{m(h.current.inputRef.value)}}),(0,o.jsx)(s.$n,{"data-fs-list-orders-search-filters-button":!0,size:"small",variant:"tertiary",icon:(0,o.jsx)(s.In,{name:"FadersHorizontal",width:24,height:24,"aria-label":"Open Filters"}),iconPosition:"left",onClick:()=>{j.dispatch({type:"selectFacets",payload:e5({filters:i})}),O()},children:d.filtersLabel})]}),b&&(0,o.jsx)(eV,{page:i.page,total:a,perPage:n,labels:d})]}),(0,o.jsx)(eG,{labels:d,filters:{status:i.status,dateInitial:i.dateInitial,dateFinal:i.dateFinal,pendingMyApproval:i.pendingMyApproval},onClearAll:()=>{window.location.href=y},onRemoveFilter:(e,t)=>{var r=e2({},i),{page:a,clientEmail:n}=r,s=(0,l.A)(r,e0);"status"===e&&Array.isArray(s[e])?s[e]=s[e].filter(e=>e.toLowerCase()!==t.toString().toLowerCase()):"dateInitial"===e||"dateFinal"===e?(delete s.dateInitial,delete s.dateFinal):delete s[e];var o=new URLSearchParams(Object.fromEntries(Object.entries(s).filter(e=>{var[,t]=e;return Array.isArray(t)?t.length>0:!!t})));window.location.href="".concat(y,"?").concat(o.toString())}}),x&&(0,o.jsx)(eC,e2(e2({},j),{},{title:d.filtersLabel,clearButtonLabel:d.clearAllLabel,applyButtonLabel:d.viewResultsLabel,fromLabel:d.fromLabel,toLabel:d.toLabel,invalidDateRangeLabel:d.invalidDateRangeLabel,searchInputRef:h,testId:"my-account-filter-slider"})),P?(0,o.jsx)(s.pp,{titleIcon:(0,o.jsx)(s.In,{name:w?"MagnifyingGlass":"Bag2",width:56,height:56,weight:"thin"}),title:w?d.noResultsLabel:d.noOrdersLabel,bkgColor:"light",children:!w&&(0,o.jsx)(s.z9,{"data-fs-list-orders-empty-state-link":!0,href:"/",variant:"secondary",children:d.startShoppingLabel})}):(0,o.jsx)(eH,{listOrders:r,total:a,perPage:n,filters:i,labels:d}),!b&&(0,o.jsx)(eV,{page:i.page,total:a,perPage:n,labels:d})]})}var e3=e=>{var{pageTitle:t=eq.pageTitle,searchPlaceholder:r=eq.searchPlaceholder,filtersLabel:a=eq.filtersLabel,clearAllLabel:n=eq.clearAllLabel,viewResultsLabel:i=eq.viewResultsLabel,noResultsLabel:l=eq.noResultsLabel,noOrdersLabel:s=eq.noOrdersLabel,startShoppingLabel:c=eq.startShoppingLabel,placedOnLabel:d=eq.placedOnLabel,deliveryByLabel:u=eq.deliveryByLabel,pen
1dingApprovalLabel:p=eq.pendingApprovalLabel,paginationOfLabel:f=eq.paginationOfLabel,previousPageLabel:v=eq.previousPageLabel,nextPageLabel:y=eq.nextPageLabel,viewAllLabel:b=eq.viewAllLabel,viewLessLabel:h=eq.viewLessLabel,fromLabel:j=eq.fromLabel,toLabel:O=eq.toLabel,invalidDateRangeLabel:x=eq.invalidDateRangeLabel,orderPlacedStatus:w=eq.orderPlacedStatus,pendingApprovalStatus:P=eq.pendingApprovalStatus,paymentPendingStatus:S=eq.paymentPendingStatus,paymentApprovedStatus:D=eq.paymentApprovedStatus,paymentDeniedStatus:L=eq.paymentDeniedStatus,readyForDeliveryStatus:A=eq.readyForDeliveryStatus,invoicedStatus:C=eq.invoicedStatus,cancellationRequestedStatus:I=eq.cancellationRequestedStatus,canceledStatus:k=eq.canceledStatus}=e,{listOrders:E,total:F,perPage:R,filters:N}=(0,m.F)();return(0,o.jsx)(g.A,{className:"section-account-orders-list",children:(0,o.jsx)(e4,{listOrders:E,total:F,perPage:R,filters:N,labels:{pageTitle:t,searchPlaceholder:r,filtersLabel:a,clearAllLabel:n,viewResultsLabel:i,noResultsLabel:l,noOrdersLabel:s,startShoppingLabel:c,placedOnLabel:d,deliveryByLabel:u,pendingApprovalLabel:p,paginationOfLabel:f,previousPageLabel:v,nextPageLabel:y,viewAllLabel:b,viewLessLabel:h,fromLabel:j,toLabel:O,invalidDateRangeLabel:x,orderPlacedStatus:w,pendingApprovalStatus:P,paymentPendingStatus:S,paymentApprovedStatus:D,paymentDeniedStatus:L,readyForDeliveryStatus:A,invoicedStatus:C,cancellationRequestedStatus:I,canceledStatus:k}})})};e3.$componentKey="AccountOrdersList";var e7=["rows"];function e8(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,a)}return r}function e9(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?e8(Object(r),!0).forEach(function(t){(0,n.A)(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):e8(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}let te=function(e){var{rows:t}=e,r=(0,l.A)(e,e7);return(0,o.jsx)("table",e9(e9({"data-fs-account-table":!0},r),{},{children:(0,o.jsx)("tbody",{"data-fs-account-table-body":!0,children:null==t?void 0:t.map((e,t)=>(0,o.jsxs)("tr",{"data-fs-account-table-row":!0,children:[(0,o.jsx)("th",{"data-fs-account-table-heading":!0,children:e.heading}),(0,o.jsx)("td",{"data-fs-account-table-data":!0,children:e.data})]},t))})}))};var tt=r(7589),tr=r.n(tt);function ta(e){var t,r,a,n,i,l,c,{profile:d,locale:u="en-US",labels:p}=e,{formatStringDate:f}=(t=(0,v.useMemo)(()=>new Intl.DateTimeFormat(u,{dateStyle:"medium"}),[u]),r=(0,v.useCallback)(e=>{var r=new Date(e);return t.format(r)},[t]),{dateFormatter:t,formatStringDate:r}),y=null!=(a=null==p?void 0:p.pageTitle)?a:"Profile",b=null!=(n=null==p?void 0:p.nameLabel)?n:"Name",h=null!=(i=null==p?void 0:p.emailLabel)?i:"Email",m=null!=(l=null==p?void 0:p.idLabel)?l:"ID",g=null!=(c=null==p?void 0:p.createdDateLabel)?c:"Created date";return(0,o.jsxs)("div",{"data-fs-account-profile-section":!0,className:tr().section,children:[(0,o.jsx)(eN,{pageTitle:y}),(0,o.jsx)("section",{"data-fs-account-profile-body":!0,children:(0,o.jsx)(te,{rows:[{heading:b,data:null==d?void 0:d.name},{heading:h,data:(0,o.jsx)(s.N_,{href:"mailto:".concat(null==d?void 0:d.email),children:null==d?void 0:d.email})},{heading:m,data:null==d?void 0:d.id},...null!=d&&d.createdDate?[{heading:g,data:f(d.createdDate)}]:[]]})})]})}var tn=e=>{var{pageTitle:t="Profile",nameLabel:r="Name",emailLabel:a="Email",idLabel:n="ID",createdDateLabel:i="Created date"}=e,{profile:l}=(0,m.F)();return(0,o.jsx)(g.A,{className:"section-account-profile",children:(0,o.jsx)(ta,{profile:l,labels:{pageTitle:t,nameLabel:r,emailLabel:a,idLabel:n,createdDateLabel:i}})})};tn.$componentKey="AccountProfile";var ti=r(89731),tl=r(96252),ts=r.n(tl),to=r(99143),tc=r.n(to),td="success",tu="unexpectederror",tp="noresponse",tf={[td]:"Password set successfully",invalidemail:"Invalid email or password",invalidpassword:"Invalid email or password",wrongcredentials:"Wrong credentials",[tu]:"Unexpected error. Please try again later.",[tp]:"No response from set password API",failed:"Failed to set password"},tv=(a=(0,ti.A)(function*(e){var{email:t,accountName:r,an:a}=e;try{var n=null!=r?r:tc().api.storeId,i=yield ts()("/api/authenticator/v1/pub/authentication/start?an=".concat(a),{method:"POST",credentials:"include",body:(0,w.NA)({user:t,scope:n,accountName:n,returnUrl:"/"})});if(!i.ok)throw{response:{status:i.status,statusText:i.statusText}}}catch(e){throw console.error("Error starting login:",e),e}}),function(e){return a.apply(this,arguments)});function ty(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,a)}return r}function tb(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};
1t%2?ty(Object(r),!0).forEach(function(t){(0,n.A)(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ty(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}var th={pageTitle:"Security",passwordLabel:"Password",resetPasswordLabel:"Reset password",currentPasswordLabel:"Current Password",newPasswordLabel:"New Password",showPasswordAria:"Show Password",cancelLabel:"Cancel",savePasswordLabel:"Save Password",passwordRulesIntro:"Your password must have at least:",rule8Chars:"8 characters",rule1Uppercase:"1 uppercase letter",rule1Lowercase:"1 lowercase letter",rule1Number:"1 number",emailRequiredError:"Email is required",allFieldsRequiredError:"All fields are required",samePasswordError:"New password cannot be the same as the current password",passwordUpdatedToast:"Password updated successfully",passwordFailedToast:"Failed to set password."};function tm(e){return tb(tb({},th),e)}var tg=r(3091),tj=r.n(tg),tO=e=>{var t,{userEmail:r,accountName:a,isOpen:n,onClose:i,labels:l}=e,c=tm(l),d=[{label:c.rule8Chars,test:e=>e.length>=8},{label:c.rule1Uppercase,test:e=>/[A-Z]/.test(e)},{label:c.rule1Lowercase,test:e=>/[a-z]/.test(e)},{label:c.rule1Number,test:e=>/\d/.test(e)}],{fade:u,fadeOut:p}=(0,s.H6)(),{pushToast:f}=(0,s.mL)(),{0:y,1:b}=(0,v.useState)(""),{0:h,1:m}=(0,v.useState)(!1),{0:g,1:j}=(0,v.useState)(""),{0:O,1:x}=(0,v.useState)(!1),{0:P,1:S}=(0,v.useState)(null),{setPassword:D,loading:L}=(e=>{var t,{0:r,1:a}=(0,v.useState)(!1);return{setPassword:(0,v.useCallback)((t=(0,ti.A)(function*(t){a(!0);try{var r,n,i=encodeURIComponent(null!=e?e:tc().api.storeId);yield tv({email:t.userEmail,accountName:e,an:i});var l={login:t.userEmail,currentPassword:t.currentPassword,newPassword:t.newPassword,accesskey:t.accesskey?t.accesskey:null,recaptcha:t.recaptcha?t.recaptcha:null},s=yield ts()("/api/authenticator/v1/pub/authentication/classic/setpassword?expireSessions=true&an=".concat(i),{method:"POST",body:(0,w.NA)(l),credentials:"include"});if(!s.ok){a(!1),console.error("Set password request failed:",s.statusText);var o=tu;try{var c=yield s.json();null!=c&&c.authStatus&&(o=String(c.authStatus).toLowerCase().trim())}catch(e){}return{success:!1,message:tf[o]}}var d=yield s.json();if(!d)return a(!1),{success:!1,message:tf[tp]};var u=null!=(r=null==d||null==(n=d.authStatus)?void 0:n.toLowerCase().trim())?r:"";return{success:u===td,message:tf[u]||"Unexpected error occurred"}}catch(e){return console.error("Error setting password:",e),{success:!1,message:tf["object"==typeof e&&null!==e&&"authStatus"in e?String(e.authStatus).toLowerCase().trim():tu]||"Unexpected error occurred"}}finally{a(!1)}}),function(e){return t.apply(this,arguments)}),[e]),loading:r}})(a),A=d.map(e=>({label:e.label,isValid:e.test(g)})),C=A.every(e=>e.isValid),I=()=>{S(null),b(""),m(!1),j(""),x(!1),i()},k=(t=(0,ti.A)(function*(){if(!r)return void S(c.emailRequiredError);if(!g||!y)return void S(c.allFieldsRequiredError);if(g===y)return void S(c.samePasswordError);try{var e=yield D({userEmail:r,currentPassword:y,newPassword:g});if(!e.success)return void f({title:"Error setting password",status:"ERROR",message:e.message,icon:(0,o.jsx)(s.In,{width:30,height:30,name:"CircleWavyWarning"})});e.success&&(f({title:"Success setting password",status:"INFO",message:c.passwordUpdatedToast,icon:(0,o.jsx)(s.In,{width:30,height:30,name:"CircleWavyCheck"})}),I())}catch(e){console.error("Error setting password:",e),f({title:"Error setting password",status:"ERROR",message:c.passwordFailedToast,icon:(0,o.jsx)(s.In,{width:30,height:30,name:"CircleWavyWarning"})})}}),function(){return t.apply(this,arguments)});return(0,o.jsxs)(s.MT,{"data-fs-security-drawer":!0,fade:u,onDismiss:p,onTransitionEnd:()=>"out"===u&&I(),isOpen:n,size:"partial",direction:"rightSide",overlayProps:{className:tj().section},children:[(0,o.jsx)(s.vP,{"data-fs-security-drawer-header":!0,onClose:I,children:(0,o.jsx)("h1",{"data-fs-security-drawer-header-title":!0,children:c.resetPasswordLabel})}),(0,o.jsxs)("div",{"data-fs-security-drawer-body":!0,children:[(0,o.jsxs)("div",{"data-fs-security-drawer-body-password":!0,children:[(0,o.jsx)(s.pd,{"data-fs-security-drawer-input":!0,id:"security-drawer-input-current-password",type:h?"text":"password",placeholder:c.currentPasswordLabel,inputMode:"text",value:y,onChange:e=>{S(null),b(e.target.value)}}),(0,o.jsx)(s.K0,{"data-fs-security-drawer-input-password-toggle":!0,size:"small","aria-label":c.showPasswordAria,onClick:()=>m(e=>!e),icon:h?(0,o.jsx)(s.In,{name:"EyeSlash"}):(0,o.jsx)(s.In,{name:"Eye"})})]}),(0,o.jsxs)("div",{"data-fs-security-drawer-body-password":!0,children:[(0,o.jsx)(s.pd,{"data-fs-security-drawer-input":!0,id:"security-drawer-input-new-password",type:O?"text":"password",placeholder:c.newPasswordLabel,inputMode:"text",value:g,onChange:e=>{S(null),j(e.target.value)}}),(0,o.jsx)(s.K0,{"data-fs-security-drawer-input-password-toggle":!0,size:"small","aria-label":c.showPasswordAria,onClick:()=>x(e=>!e),icon:O?(0,o.jsx)(s.In,{name:"EyeSlash"}):(0,o.jsx)(s.In,{name:"Eye"})})]}),P&&(0,o.jsxs)("div",{"data-fs-security-drawer-error":!0,children:[(0,o.jsx)(s.In,{width:20,height:20,name:"CircleWavyWarning","data-fs-security-drawer-error-icon":!0}),(0,o.jsx)("span",{children:P})]}),g.length>0&&(0,o.jsxs)("div",{"data-fs-security-drawer-password-rules-container":!0,children:[(0,o.jsx)("p",{"data-fs-security-drawer-password-rules-title":!0,children:c.passwordRulesIntro}),(0,o.jsx)("ul",{"data-fs-security-drawer-password-rules-list":!0,children:A.map((e,t)=>(0,o.jsxs)("li",{"data-fs-security-drawer-password-rule-item":!0,"data-status":e.isValid?"success":"error",children:[(0,o.jsx)(s.In,{name:e.isValid?"CheckCircle":"XCircle",width:20,height:20}),e.label]},t))})]})]}),(0,o.jsxs)("footer",{"data-fs-security-drawer-footer":!0,children:[(0,o.jsx)(s.$n,{variant:"secondary",onClick:I,children:c.cancelLabel}),(0,o.jsx)(s.$n,{"data-fs-security-drawer-footer-button":!0,variant:"primary",loading:L,disabled:L||!y||!g||!C,onClick:k,children:c.savePasswordLabel})]})]})},tx=e=>{var{userEmail:t,accountName:r,labels:a}=e,n=tm(a),{0:i,1:l}=(0,v.useState)(!1);return(0,o.jsxs)(o.Fragment,{children:[i&&(0,o.jsx)(tO,{userEmail:t,accountName:r,isOpen:i,onClose:()=>l(!1),labels:n}),(0,o.jsxs)("section",{"data-fs-securiry-section":!0,className:tj().section,children:[(0,o.jsx)(eN,{pageTitle:n.pageTitle}),(0,o.jsx)("div",{"data-fs-security-container":!0,children:(0,o.jsx)(te,{rows:[{heading:n.passwordLabel,data:(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("span",{"data-fs-security-table-data-text":!0,children:"••••••••••"}),(0,o.jsx)(s.$n,{variant:"tertiary","data-fs-security-table-action-button":!0,onClick:()=>l(!0),children:n.resetPasswordLabel})]})}]})})]})]})},tw=e=>{var{pageTitle:t=th.pageTitle,passwordLabel:r=th.passwordLabel,resetPasswordLabel:a=th.resetPasswordLabel,currentPasswordLabel:n=th.currentPasswordLabel,newPasswordLabel:i=th.newPasswordLabel,showPasswordAria:l=th.showPasswordAria,cancelLabel:s=th.cancelLabel,savePasswordLabel:c=th.savePasswordLabel,passwordRulesIntro:d=th.passwordRulesIntro,rule8Chars:u=th.rule8Chars,rule1Uppercase:p=th.rule1Uppercase,rule1Lowercase:f=th.rule1Lowercase,rule1Number:v=th.rule1Number,emailRequiredError:y=th.emailRequiredError,allFieldsRequiredError:b=th.allFieldsRequiredError,samePasswordError:h=th.samePasswordError,passwordUpdatedToast:j=th.passwordUpdatedToast,passwordFailedToast:O=th.passwordFailedToast}=e,{userEmail:x}=(0,m.F)();return(0,o.jsx)(g.A,{className:"section-account-security",children:(0,o.jsx)(tx,{userEmail:x,labels:{pageTitle:t,passwordLabel:r,resetPasswordLabel:a,currentPasswordLabel:n,newPasswordLabel:i,showPasswordAria:l,cancelLabel:s,savePasswordLabel:c,passwordRulesIntro:d,rule8Chars:u,rule1Uppercase:p,rule1Lowercase:f,rule1Number:v,emailRequiredError:y,allFieldsRequiredError:b,samePasswordError:h,passwordUpdatedToast:j,passwordFailedToast:O}})})};tw.$componentKey="AccountSecurity";
1var tP=r(19073),tS=e=>{var{title:t="Unauthorized Access",subtitle:r="You don't have permission to access this page.",backLabel:a="Back to Account"}=e;return(0,o.jsx)(g.A,{className:"section-account-unauthorized",children:(0,o.jsx)(tP.G,{title:t,titleIcon:{icon:"ShoppingCart",alt:"Shopping Cart"},subtitle:r,showLoader:!1,children:(0,o.jsx)(s.z9,{variant:"secondary",href:"/pvt/account",children:a})})})};tS.$componentKey="AccountUnauthorized";var tD=["children"];function tL(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,a)}return r}function tA(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?tL(Object(r),!0).forEach(function(t){(0,n.A)(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):tL(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}let tC=e=>{var{children:t}=e,r=(0,l.A)(e,tD);return(0,o.jsx)("span",tA(tA({"data-fs-tag":!0},r),{},{children:t}))};function tI(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,a)}return r}function tk(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?tI(Object(r),!0).forEach(function(t){(0,n.A)(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):tI(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}var tE={pageTitle:"User details",nameLabel:"Name",usernameLabel:"Username",emailLabel:"Email",phoneLabel:"Phone number",roleLabel:"Role",orgUnitLabel:"Organizational unit"},tF=r(47572),tR=r.n(tF);function tN(e){var{userDetails:{username:t,name:r,email:a,phone:n,role:i,orgUnit:l},labels:s}=e,c=tk(tk({},tE),s);return(0,o.jsxs)("section",{className:tR().section,children:[(0,o.jsx)(eN,{pageTitle:c.pageTitle}),(0,o.jsx)("div",{"data-fs-user-details-container":!0,children:(0,o.jsx)(te,{rows:[{heading:c.nameLabel,data:r||"–"},{heading:c.usernameLabel,data:t||"–"},{heading:c.phoneLabel,data:n||"–"},{heading:c.emailLabel,data:a},{heading:c.roleLabel,data:(0,o.jsx)("span",{"data-fs-user-details-row-tags":!0,children:i.map(e=>(0,o.jsx)(tC,{children:e},e))})},{heading:c.orgUnitLabel,data:l}]})})]})}var t_=e=>{var{pageTitle:t=tE.pageTitle,nameLabel:r=tE.nameLabel,usernameLabel:a=tE.usernameLabel,emailLabel:n=tE.emailLabel,phoneLabel:i=tE.phoneLabel,roleLabel:l=tE.roleLabel,orgUnitLabel:s=tE.orgUnitLabel}=e,{userDetails:c}=(0,m.F)();return(0,o.jsx)(g.A,{className:"section-account-user-details",children:(0,o.jsx)(tN,{userDetails:c,labels:{pageTitle:t,nameLabel:r,usernameLabel:a,emailLabel:n,phoneLabel:i,roleLabel:l,orgUnitLabel:s}})})};t_.$componentKey="AccountUserDetails";var tT=r(39795),tq=r(1518),tM=r(49652),tz=r(34535);function tU(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,a)}return r}function tB(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?tU(Object(r),!0).forEach(function(t){(0,n.A)(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):tU(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}let tK=tB(tB(tB({},tq.A),{},{[(0,tT.P)(i,"AccountNavigation")]:i,[(0,tT.P)(tn,"AccountProfile")]:tn,[(0,tT.P)(e3,"AccountOrdersList")]:e3,[(0,tT.P)(t_,"AccountUserDetails")]:t_,[(0,tT.P)(tw,"AccountSecurity")]:tw,[(0,tT.P)($,"AccountOrderDetails")]:$,[(0,tT.P)(eh,"AccountOrderStatus")]:eh,[(0,tT.P)(er,"AccountOrderPayment")]:er,[(0,tT.P)(B,"AccountOrderDelivery")]:B,[(0,tT.P)(eO,"AccountOrderSummary")]:eO,[(0,tT.P)(Q,"AccountOrderOrderedBy")]:Q,[(0,tT.P)(x,"AccountOrderBudgets")]:x,[(0,tT.P)(V,"AccountOrderMoreInfo")]:V,[(0,tT.P)(tS,"AccountUnauthorized")]:tS},tz.A),tM.A)},80802:(e,t,r)=>{"use strict";r.d(t,{A:()=>b});var a=r(75458),n=r(46225),i=r(59749),l=r(36068),s=r(23729),o=r(7101),c=r.n(o),d={EmptyState:i.pp},u=r(11165),p=r(26514);function f(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,a)}return r}function v(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};
1t%2?f(Object(r),!0).forEach(function(t){(0,a.A)(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):f(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function y(e){var t,r,a,o,{title:d,titleIcon:u,children:f,subtitle:y,errorState:b,showLoader:h=!1}=e,{EmptyState:m}=(0,l.cH)(),{errorId:g,fromUrl:j}=(()=>{var e,{query:{errorId:t,fromUrl:r},pathname:a,asPath:i}=(0,n.useRouter)();return{errorId:t,fromUrl:null!=(e=null!=r?r:i)?e:a}})(),O=null!=u&&u.icon?(0,p.jsx)(i.In,{name:null==u?void 0:u.icon,"aria-label":null==u?void 0:u.alt,width:56,height:56,weight:"thin"}):m.props.titleIcon;return(0,p.jsx)(s.A,{className:"".concat(c().section," section-empty-state"),children:(0,p.jsxs)(m.Component,v(v({bkgColor:"light"},m.props),{},{title:null!=d?d:m.props.title,titleIcon:O,children:[!!y&&(0,p.jsx)("h2",{children:y}),!!(null!=b&&null!=(t=b.errorId)&&t.show)&&(0,p.jsx)("p",{children:"".concat(null==b||null==(r=b.errorId)?void 0:r.description," ").concat(g)}),!!(null!=b&&null!=(a=b.fromUrl)&&a.show)&&(0,p.jsx)("p",{children:"".concat(null==b||null==(o=b.fromUrl)?void 0:o.description," ").concat(j)}),h&&(0,p.jsx)(i.aH,{}),f]}))})}y.$componentKey="EmptyState";let b=(0,u.j)("EmptyState",y,d)},96856:(e,t,r)=>{"use strict";r.d(t,{A:()=>R,S:()=>N});var a=r(59749),n=r(41531),i=r(64161),l=r(89731),s=r(75834),o=r(26487),c=r.n(o),d=r(26514);function u(e){var{isOpen:t=!1,loading:r=!1,title:n,message:i,confirmText:l,cancelText:s="Not now",confirmVariant:o="primary",danger:u=!1,onClose:p,onConfirm:f}=e,{fade:v,fadeOut:y,fadeIn:b}=(0,a.H6)();return(0,d.jsxs)(a.aF,{"data-fs-order-details-action-modal":!0,isOpen:t,onDismiss:y,onTransitionEnd:()=>{"out"===v&&(p(),b())},overlayProps:{className:c().orderActionsModal},"data-fs-modal-state":v,children:[(0,d.jsx)(a.rQ,{title:n,onClose:y}),(0,d.jsx)(a.cw,{children:(0,d.jsx)("p",{"data-fs-order-details-action-modal-message":!0,children:i})}),(0,d.jsxs)(a.jl,{children:[(0,d.jsx)(a.$n,{variant:"secondary",onClick:y,disabled:r,children:s}),(0,d.jsx)(a.$n,{variant:o,onClick:f,loading:r,"data-fs-button-danger":u,children:l})]})]})}var p=r(84608),f=r(6504),v=p.Hl;function y(e){var t,r,n,i,o,c,p,y,b,h,m,{ruleForAuthorization:g,onAuthorizationComplete:j,labels:O}=e,x=null!=(o=null==O?void 0:O.approveLabel)?o:"Approve",w=null!=(c=null==O?void 0:O.rejectLabel)?c:"Reject",P=null!=(p=null==O?void 0:O.rejectModalTitle)?p:"Reject approval request",S=null!=(y=null==O?void 0:O.rejectModalMessage)?y:"You're about to reject this approval request, triggered by the {policy} policy. Rejecting any approval request will deny the entire order.\n\nThis action is permanent and cannot be undone.",D=null!=(b=null==O?void 0:O.rejectModalConfirmText)?b:"Reject",{pushToast:L}=(0,a.mL)(),{0:A,1:C}
1=(0,s.useState)(!1),{data:I,error:k,processOrderAuthorization:E,loading:F}=(()=>{var[e,{data:t,error:r,isValidating:a}]=(0,f._)(v,{data:{orderAuthorizationId:"",ruleId:"",dimensionId:"",approved:!1}});return{processOrderAuthorization:e,data:(null==t?void 0:t.processOrderAuthorization)||null,error:r,loading:a}})(),R=(t=(0,l.A)(function*(){try{yield E({data:{orderAuthorizationId:g.orderAuthorizationId,ruleId:g.rule.id,dimensionId:g.dimensionId,approved:!0}}),L({status:"INFO",message:"".concat(g.rule.name," policy approved successfully."),icon:(0,d.jsx)(a.In,{width:30,height:30,name:"CircleWavyCheck"})}),null==j||j()}catch(e){L({status:"ERROR",message:"Policy couldn't be approved due to a technical issue.",icon:(0,d.jsx)(a.In,{width:30,height:30,name:"CircleWavyWarning"})})}}),function(){return t.apply(this,arguments)}),N=(r=(0,l.A)(function*(){try{yield E({data:{orderAuthorizationId:g.orderAuthorizationId,ruleId:g.rule.id,dimensionId:g.dimensionId,approved:!1}}),L({status:"INFO",message:"".concat(g.rule.name," policy rejected successfully. Order denied."),icon:(0,d.jsx)(a.In,{width:30,height:30,name:"XCircle"})}),C(!1),null==j||j()}catch(e){L({status:"ERROR",message:"Policy couldn't be rejected due to a technical issue.",icon:(0,d.jsx)(a.In,{width:30,height:30,name:"CircleWavyWarning"})})}}),function(){return r.apply(this,arguments)});return g?(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)("div",{"data-fs-buying-policy-alert":!0,children:[(0,d.jsxs)("div",{"data-fs-buying-policy-message":!0,children:[(0,d.jsx)("h3",{"data-fs-buying-policy-title":!0,children:g.rule.name}),(0,d.jsx)("p",{"data-fs-buying-policy-description":!0,children:null!=(h=null==g||null==(m=g.rule)||null==(m=m.trigger)||null==(m=m.condition)?void 0:m.description)?h:"This buying policy requires your approval before the order can proceed."})]}),(0,d.jsxs)("div",{"data-fs-buying-policy-actions":!0,children:[(0,d.jsx)(a.$n,{variant:"secondary",size:"small",icon:(0,d.jsx)(a.In,{name:"XCircle"}),onClick:()=>C(!0),disabled:F,"data-fs-buying-policy-action-reject":!0,"data-fs-button-danger":!0,children:w}),(0,d.jsx)(a.$n,{variant:"primary",size:"small",icon:(0,d.jsx)(a.In,{name:"CircleCheck"}),onClick:R,loading:F,"data-fs-buying-policy-action-approve":!0,children:x})]})]}),(null==I?void 0:I.isPendingForOtherAuthorizer)&&(0,d.jsx)(a.Fc,{"data-fs-pending-policies-alert":!0,icon:(0,d.jsx)(a.In,{name:"Info",width:20,height:20}),children:"Your approval is recorded. This order is still pending further approvals."}),(0,d.jsx)(u,{isOpen:A,loading:F,onClose:()=>C(!1),onConfirm:N,title:P,message:(n=g.rule.name,(i=S.replace("{policy}",n).split("\n")).map((e,t)=>(0,d.jsxs)(s.Fragment,{children:[e,t<i.length-1&&(0,d.jsx)("br",{})]},"".concat(t,"-").concat(e)))),confirmText:D,danger:!0})]}):null}var b=p.PI,h=r(75458),m=r(12108);class g extends Error{constructor(e){super(e),this.name="ReorderError"}}var j=r(41976),O=r(6641),x=r(99143),w=r.n(x),P=r(44897);function S(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,a)}return r}function D(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?S(Object(r),!0).forEach(function(t){(0,h.A)(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):S(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}var L=()=>{var e,t,{0:r,1:a}=(0,s.useState)(!1),{0:i,1:o}=(0,s.useState)(null),{resolveLink:c}=(0,n.i)(),d=null!=(t=c(w().checkoutUrl))?t:w().checkoutUrl;return{reorder:(e=(0,l.A)(function*(e){if(!e){var t,r,n;o(new g("Order not found"));return}var i=null!=(n=(null!=(t=null==(r=e.deliveryOptionsData)?void 0:r.deliveryOptions)?t:[]).flatMap(e=>{var t;return(null!=(t=null==e?void 0:e.items)?t:[]).map(t=>D(D({},t),{},{seller:null==e?void 0:e.seller}))}))?n:[];if(!i||0===i.length)return void o(new g("No items found in order"));a(!0),o(null);try{var l=m.O.read(),s=i.filter(e=>e&&e.id&&e.quantity&&e.seller&&e.quantity>0).map(e=>{var t,r,a,n,i;return{quantity:e.quantity,seller:{identifier:e.seller},price:null!=(t=e.price)?t:0,listPrice:null!=(r=e.price)?r:0,itemOffered:{sku:null!=(a=e.id)?a:"",image:e.imageUrl?[{url:e.imageUrl,alternateName:null!=(n=e.name)?n:""}]:[],name:null!=(i=e.name)?i:"",additionalProperty:[]}}});if(0===s.length)throw new g("No valid items to reorder");var c={acceptedOffer:s,shouldSplitItem:!1};l.id&&(c.orderNumber=l.id);var{validateCart:u}=yield(0,j.E)(m.mJ,{session:O.eA.read(),cart:{order:c}});if(!u)throw new g("Failed to add items to cart");var p={id:u.order.orderNumber,items:u.order.acceptedOffer.map(e=>{var t,r,a,n,i,l;return D(D({},e),{},{id:(i=null!=(t=null==(r=e.itemOffered.additionalProperty)?void 0:r.map(e=>e.propertyID).join("-"))?t:"",l=null!=(a=null==(n=e.seller)?void 0:n.identifier)?a:"",[e.itemOffered.sku,l,i].filter(
1Boolean).join("::"))})}),messages:u.messages,shouldSplitItem:u.order.shouldSplitItem};m.O.set(p),(0,P.S)(u.order.orderNumber,d)}catch(e){o(e instanceof Error?e:new g("Unknown error")),console.error("Error reordering:",e)}finally{a(!1)}}),function(t){return e.apply(this,arguments)}),loading:r,error:i}},A=r(18441);function C(e){var t,{allowCancellation:r,orderId:n,customerEmail:i,order:o,labels:c}=e,p=(0,A.zc)(c),{0:v,1:y}=(0,s.useState)(!1),{pushToast:h}=(0,a.mL)(),{cancelOrder:m,loading:g}=(()=>{var[e,{data:t,error:r,isValidating:a}]=(0,f._)(b,{data:{orderId:"",reason:"",customerEmail:""}});return{cancelOrder:e,data:t,error:r,loading:a}})(),{reorder:j}=L(),O=(t=(0,l.A)(function*(){try{yield m({data:{orderId:n,customerEmail:i,reason:""}}),y(!1),h({status:"INFO",message:p.cancelSuccessToast,icon:(0,d.jsx)(a.In,{width:30,height:30,name:"CircleWavyCheck"})}),window.location.reload()}catch(e){h({status:"ERROR",message:p.cancelErrorToast,icon:(0,d.jsx)(a.In,{width:30,height:30,name:"CircleWavyWarning"})})}}),function(){return t.apply(this,arguments)});return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("div",{"data-fs-order-actions":!0,children:(0,d.jsxs)(a.ms,{children:[(0,d.jsx)(a.gf,{"aria-label":"View More","data-fs-dropdown-button":!0,children:(0,d.jsx)(a.In,{name:"DotsThree","data-fs-dropdown-icon":!0})}),(0,d.jsxs)(a.rI,{align:"right",children:[(0,d.jsx)(a.tJ,{type:"button",onClick:()=>{j(o)},"data-fs-order-actions-item":!0,"data-fs-order-actions-item-reorder":!0,children:p.reorderLabel}),r&&(0,d.jsx)(a.tJ,{type:"button",onClick:()=>y(!0),"data-fs-order-actions-item":!0,"data-fs-order-actions-item-cancel":!0,children:p.cancelOrderLabel})]})]})}),(0,d.jsx)(u,{isOpen:v,loading:g,title:p.cancelOrderLabel,message:p.cancelConfirmMessage,confirmText:p.cancelOrderLabel,danger:!0,onClose:()=>y(!1),onConfirm:O})]})}function I(e){var t,{order:r,onClick:n,label:i="Reorder"}=e,{reorder:s,loading:o}=L(),c=(t=(0,l.A)(function*(){try{yield s(r),null==n||n()}catch(e){console.error(e)}}),function(){return t.apply(this,arguments)});return(0,d.jsx)(a.$n,{variant:"secondary","data-fs-reorder-button":!0,onClick:c,disabled:o,children:i})}var k=r(63976),E=r.n(k),F="/pvt/account/orders";function R(e){var t,r,{order:l,labels:s,statusLabels:o}=e,c=(0,A.zc)(s),{resolveLink:u}=(0,n.i)(),p=null!=(t=u(F))?t:F;return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)("header",{"data-fs-order-details-header":!0,children:[(0,d.jsxs)("div",{"data-fs-order-details-header-title":!0,children:[(0,d.jsx)("a",{href:p,children:(0,d.jsx)(a.K0,{"data-fs-order-details-header-back-button":!0,size:"small","aria-label":c.goBackLabel,icon:(0,d.jsx)(a.In,{name:"ArrowLeft"}),type:"button"})}),(0,d.jsxs)("div",{"data-fs-order-details-header-title-wrapper":!0,children:[(0,d.jsxs)("h1",{"data-fs-order-details-header-title-text":!0,children:[c.orderNumberPrefix,l.orderId]}),(0,d.jsx)(i.A,{status:l.status,statusFallback:l.statusDescription,statusLabels:o})]})]}),(0,d.jsxs)("div",{"data-fs-order-details-header-actions":!0,children:[(0,d.jsx)(I,{order:l,label:c.reorderLabel}),(0,d.jsx)(C,{allowCancellation:l.allowCancellation,orderId:l.orderId,customerEmail:null==(r=l.clientProfileData)?void 0:r.email,order:l,labels:c})]})]}),l.ruleForAuthorization&&(0,d.jsx)(y,{ruleForAuthorization:l.ruleForAuthorization,onAuthorizationComplete:()=>window.location.reload(),labels:{approveLabel:c.approveLabel,rejectLabel:c.rejectLabel,rejectModalTitle:c.rejectModalTitle,rejectModalMessage:c.rejectModalMessage,rejectModalConfirmText:c.rejectModalConfirmText}})]})}function N(e){var{children:t}=e;return(0,d.jsx)("div",{className:E().page,"data-fs-order-details":!0,children:t})}}}]);

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.