1import{j as e,f as $,F as B,r as O,u as P,l as D}from"./components-DnchwV6p.js";import{u as z}from"./useOrderList-Cc-HaUy8.js";import{u as j,d as F,c as H,z as U,g as V,h as q}from"./blogs-D72JHPRX.js";import{G as Ne}from"./blogs-D72JHPRX.js";import{W as G}from"./WvLink-2yczwrc_.js";import{W as K}from"./WvCustomerLayout-CEBM-W21.js";import{m as Y}from"./meta-AH_HhgjY.js";import"./exports-DtI854OP.js";import"./useErrorAlert-rrX2bY8u.js";(function(){try{var s=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};s.SENTRY_RELEASE={id:"99f1f37daa57ff822cb85b50dd6ead78faae7cfb"},s._sentryModuleMetadata=s._sentryModuleMetadata||{},s._sentryModuleMetadata[new s.Error().stack]=function(n){for(var t=1;t<arguments.length;t++){var i=arguments[t];if(i!=null)for(var l in i)i.hasOwnProperty(l)&&(n[l]=i[l])}return n}({},s._sentryModuleMetadata[new s.Error().stack],{"_sentryBundlerPluginAppKey:wovar-webshop":!0});var r=new s.Error().stack;r&&(s._sentryDebugIds=s._sentryDebugIds||{},s._sentryDebugIds[r]="c0d9ca1d-814e-45b3-b870-09ca0cf90fe1",s._sentryDebugIdIdentifier="sentry-dbid-c0d9ca1d-814e-45b3-b870-09ca0cf90fe1")}catch{}})();const J=s=>(s??"").toLowerCase().replace(/[^a-z]/g,""),Q=["cancelled","canceled","refunded","declined","disputed","incomplete"],A={pending:0,awaitingpayment:0,manualverificationrequired:0,awaitingfulfillment:1,awaitingshipment:1,awaitingpickup:1,partiallyshipped:2,shipped:3,partiallyrefunded:3,completed:3},X=()=>e.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",children:[e.jsx("path",{d:"M6 3h9l4 4v14H6V3z",stroke:"currentColor",strokeWidth:"1.8",strokeLinejoin:"round"}),e.jsx("path",{d:"M14 3v5h5M9 12h6M9 16h6",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round"})]}),Z=()=>e.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",children:[e.jsx("path",{d:"M3 7l9-4 9 4v10l-9 4-9-4V7z",stroke:"currentColor",strokeWidth:"1.8",strokeLinejoin:"round"}),e.jsx("path",{d:"M3 7l9 4 9-4M12 11v10",stroke:"currentColor",strokeWidth:"1.8",strokeLinejoin:"round"})]}),ee=()=>e.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",children:[e.jsx("path",{d:"M3 9l6-3 6 3-6 3-6-3z",stroke:"currentColor",strokeWidth:"1.8",strokeLinejoin:"round"}),e.jsx("path",{d:"M9 12v6l6-3V9M15 15l6-3-6-3",stroke:"currentColor",strokeWidth:"1.8",strokeLinejoin:"round"})]}),se=()=>e.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",children:[e.jsx("path",{d:"M1 5h13v10H1V5z",stroke:"currentColor",strokeWidth:"1.8",strokeLinejoin:"round"}),e.jsx("path",{d:"M14 8h4l3 3v4h-7V8z",stroke:"currentColor",strokeWidth:"1.8",strokeLinejoin:"round"}),e.jsx("circle",{cx:"6",cy:"17.5",r:"1.8",stroke:"currentColor",strokeWidth:"1.8"}),e.jsx("circle",{cx:"17",cy:"17.5",r:"1.8",stroke:"currentColor",strokeWidth:"1.8"})]}),te=({statusStage:s,status:r=""})=>{const{$pt:n}=j(),t=J(r),i=Q.includes(t),l=s==="SHIPPED_TO_CARRIER"?3:s==="NOT_REGISTERED_IN_WAREHOUSE"?1:0,c=t in A?A[t]:l,h=[{key:"ordered",label:"order_detail_status_ordered",at:0,Icon:X},{key:"processing",label:"order_detail_status_processing",at:1,Icon:Z},...c===2?[{key:"partial",label:"order_detail_status_partially_shipped",at:2,Icon:ee}]:[],{key:"shipped",label:"order_detail_status_shipped",at:3,Icon:se}];return e.jsxs("div",{className:"order-status-timeline",children:[e.jsx("ol",{className:"order-status-timeline__steps",children:h.map(({key:d,label:_,at:o,Icon:u},m)=>{const p=!i&&c>=o;return e.jsxs("li",{className:"order-status-timeline__node",children:[m>0?e.jsx("span",{className:`order-status-timeline__connector ${p?"is-done":""}`,"aria-hidden":"true"}):null,e.jsxs("span",{className:`order-status-timeline__step ${p?"is-done":""}`,children:[e.jsx("span",{className:"order-status-timeline__icon",children:e.jsx(u,{})}),e.jsx("span",{className:"order-status-timeline__label",children:n(_)})]})]},d)})}),i?e.jsx("p",{className:"order-status-timeline__note",children:n("order_detail_status_cancelled")}):null]})},R=({address:s})=>{if(!s)return null;
1const r=[s.firstName,s.lastName].filter(Boolean).join(" "),n=[s.address1,s.streetNumber].filter(Boolean).join(" "),t=[s.postalCode,s.city].filter(Boolean).join(" ");return e.jsxs("address",{className:"order-detail__address",children:[s.company?e.jsx("span",{children:s.company}):null,r?e.jsx("span",{children:r}):null,n?e.jsx("span",{children:n}):null,s.address2?e.jsx("span",{children:s.address2}):null,s.additionalStreetInfo?e.jsx("span",{children:s.additionalStreetInfo}):null,t?e.jsx("span",{children:t}):null,s.countryCode?e.jsx("span",{children:s.countryCode}):null,s.phone?e.jsx("span",{children:s.phone}):null]})},re=()=>e.jsxs("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",children:[e.jsx("path",{d:"M17 1l4 4-4 4",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round"}),e.jsx("path",{d:"M3 11V9a4 4 0 0 1 4-4h14",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round"}),e.jsx("path",{d:"M7 23l-4-4 4-4",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round"}),e.jsx("path",{d:"M21 13v2a4 4 0 0 1-4 4H3",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round"})]}),ae=({orderId:s})=>{const{$pt:r}=j(),n=$(),t=n.state!=="idle"&&n.formMethod==="POST";return e.jsxs(B,{method:"post",children:[e.jsx("input",{type:"hidden",name:"orderId",value:s}),e.jsxs("button",{type:"submit",className:"btn btn--primary-green order-detail__reorder-btn text-uppercase",disabled:t,children:[e.jsx(re,{}),r(t?"order_detail_reorder_loading":"order_detail_reorder")]})]})},le=s=>/^https?:\/\//i.test(s)||/\.[a-z]{2,}\//i.test(s),ne=s=>/^https?:\/\//i.test(s)?s:`https://${s}`,S=3,ie=({codes:s})=>{const{$pt:r}=j(),[n,t]=O.useState(!1),i=(s??[]).filter(Boolean);if(!i.length)return null;const l=i.length>1,c=i.length>S,h=c&&!n?i.slice(0,S):i;return e.jsxs("div",{className:"order-detail__track-trace",children:[e.jsx("h4",{className:"order-detail__section-title order-detail__track-trace-title",children:r("order_detail_track_trace_title")}),i.length?e.jsx("ul",{className:"order-detail__track-trace-links",children:h.map((d,_)=>{const o=l?` ${_+1}`:"";return e.jsx("li",{children:le(d)?e.jsxs("a",{href:ne(d),className:"link",target:"_blank",rel:"noreferrer",children:[r("order_detail_track_trace_link"),o]}):e.jsxs("span",{children:[r("order_detail_track_trace_barcode"),o,": ",d]})},`${d}-${_}`)})}):null,c?e.jsx("div",{className:"order-detail__track-trace-foot",children:e.jsx("button",{type:"button",className:"link order-detail__track-trace-toggle",onClick:()=>t(d=>!d),children:n?r("order_detail_track_trace_show_less"):`${r("order_detail_track_trace_show_more")} (${i.length})`})}):null]})},xe=Y,je=()=>{var v,y,g,f,w,I,L,C,M,T,W;const{order:s}=P(),r=D(),{localeFullName:n}=F(),{$pt:t}=z(),i=H(),l=a=>V(n,a!=null&&a.currencyCode?a:q()),c=(((v=s==null?void 0:s.discountTotal)==null?void 0:v.value)??0)>0,h=(((y=s==null?void 0:s.handlingCostInclTax)==null?void 0:y.value)??0)>0,d=(g=s==null?void 0:s.shippingAddress)==null?void 0:g.purchaseReference,_=s==null?void 0:s.invoiceNumber,o=s==null?void 0:s.invoiceStatus,u=o==="PAID_IN_FULL"?t("order_detail_invoice_paid"):o==="PARTIALLY_PAID"?t("order_detail_invoice_partial"):o==="OPEN"?t("order_detail_invoice_open"):"",m=t("order_detail_customer_service_url",void 0,!0),p=(f=s==null?void 0:s.coupon)==null?void 0:f.code,b=s==null?void 0:s.paymentReference,k=s==null?void 0:s.paymentIBAN,N=s==null?void 0:s.paymentBankName;return e.jsxs(K,{breadcrumbs:[{name:t("order_detail_label_breadcrumb_account"),link:"/customer"},{name:t("order_detail_label_back_to_orders"),link:"/customer/orders/"}],children:[e.jsx("h3",{className:"customer__subtitle",children:t("order_detail_label_title")}),e.jsxs("div",{className:"order-detail__actions",children:[e.jsx(ae,{orderId:((w=s==null?void 0:s.id)==null?void 0:w.toString())??""}),m?e.jsx("a",{href:m,className:"btn btn--darkghost text-uppercase",target:"_blank",rel:"noreferrer",children:t("order_detail_customer_service")}):null]}),(I=r==null?void 0:r.errors)!=null&&I.length?e.jsx("p",{className:"customer__alert",role:"alert",children:t("order_detail_reorder_error")}):null,e.jsxs("div",{className:"order-detail__card",children:[e.jsx("h4",{className:"order-detail__section-title mt-0",children:t("order_detail_status_title")}),e.jsx(te,{statusStage:(L=s==null?void 0:s.statusStage)==null?void 0:L.toString(),status:((C=s==null?void 0:s.status)==null?void 0:C.toString())??""})]}),e.jsx("div",{className:"order-detail__summary",children:e.jsxs("div",{className:"order-detail__summary-inner",children:[e.jsxs("div",{className:"order-detail__summary-item",children:[e.jsx("span",{className:"order-detail__summary-label",children:t("orders_label_order_number")}),e.jsx("span",{children:s==null?void 0:s.orderNumber})]}),d?e.jsxs("div",{className:"order-detail__summary-item",children:[e.jsx("span",{className:"order-detail__summary-label",children:t("order_detail_label_reference")}),e.jsx("span",{children:d})]}):null,e.jsxs("div",{className:"order-detail__summary-item",children:[e.jsx("span",{className:"order-detail__summary-label",children:t("orders_label_order_date")}),e.jsx("span",{children:U(((M=s==null?void 0:s.orderDate)==null?void 0:M.toString())??"")})]})]})}),e.jsx("div",{className:"order-detail__card order-detail__card--flush",children:e.jsx("div",{className:"table-responsive",children:e.jsxs("table",{className:"table table-striped order-detail__items",children:[e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("th",{children:t("order_detail_label_product_name")}
1),e.jsx("th",{className:"text-center",children:t("order_detail_label_item_quantity")}),e.jsx("th",{className:"text-right",children:t("order_detail_label_price_per_item")}),e.jsx("th",{className:"text-right",children:t("order_detail_label_item_price")})]})}),e.jsxs("tbody",{children:[s==null?void 0:s.lineItems.map((a,x)=>{var E;return e.jsxs("tr",{children:[e.jsx("td",{children:(E=a.product)!=null&&E.slug?e.jsx(G,{to:i(`/${a.product.slug}`),className:"link",children:a.name}):a.name}),e.jsxs("td",{className:"text-center",children:[a.quantity,"x"]}),e.jsx("td",{className:"text-right",children:l(a.priceInclTax)}),e.jsx("td",{className:"text-right",children:l(a.totalInclTax)})]},a.id||`${a.sku}-${x}`)}),(T=s==null?void 0:s.customLineItems)==null?void 0:T.map((a,x)=>e.jsxs("tr",{children:[e.jsx("td",{children:a.name}),e.jsxs("td",{className:"text-center",children:[a.quantity,"x"]}),e.jsx("td",{className:"text-right",children:l(a.price)}),e.jsx("td",{className:"text-right",children:l(a.total)})]},a.id||`custom-${x}`))]})]})})}),e.jsxs("div",{className:"row mb-3 mb-lg-4",children:[e.jsx("div",{className:"col-12 col-lg-7 mb-3 mb-lg-0",children:e.jsx("div",{className:"order-detail__card h-100",children:e.jsxs("div",{className:"row",children:[e.jsxs("div",{className:"col-12 col-sm-6 mb-3 mb-sm-0",children:[e.jsx("h4",{className:"order-detail__section-title mt-0",children:t("checkout_shipping_address_title")}),e.jsx(R,{address:s==null?void 0:s.shippingAddress})]}),e.jsxs("div",{className:"col-12 col-sm-6",children:[e.jsx("h4",{className:"order-detail__section-title mt-0",children:t("checkout_billing_address_title")}),e.jsx(R,{address:s==null?void 0:s.billingAddress})]})]})})}),e.jsx("div",{className:"col-12 col-lg-5",children:e.jsxs("div",{className:"order-detail__card h-100",children:[e.jsx("h4",{className:"order-detail__section-title mt-0",children:t("order_detail_payment_info_title")}),e.jsxs("div",{className:"order-detail__paylist",children:[e.jsxs("div",{className:"order-detail__payrow",children:[e.jsx("span",{children:t("shopping_cart_summary_subtotal")}),e.jsx("span",{children:l(s==null?void 0:s.subtotalExclTax)})]}),e.jsxs("div",{className:"order-detail__payrow",children:[e.jsx("span",{children:t("shopping_cart_summary_tax_total")}),e.jsx("span",{children:l(s==null?void 0:s.taxTotal)})]}),e.jsxs("div",{className:"order-detail__payrow",children:[e.jsx("span",{children:t("order_detail_label_shipping")}),e.jsx("span",{children:l(s==null?void 0:s.shippingCostInclTax)})]}),h?e.jsxs("div",{className:"order-detail__payrow",children:[e.jsx("span",{children:t("order_detail_label_handling")}),e.jsx("span",{children:l(s==null?void 0:s.handlingCostInclTax)})]}):null,c?e.jsxs("div",{className:"order-detail__payrow",children:[e.jsx("span",{children:t("shopping_cart_discount_label")}),e.jsxs("span",{children:["-",l(s==null?void 0:s.discountTotal)]})]}):null,e.jsxs("div",{className:"order-detail__payrow order-detail__payrow--total",children:[e.jsx("span",{children:t("shopping_cart_summary_total_inc_vat")}),e.jsx("span",{children:l(s==null?void 0:s.totalInclTax)})]}),(W=s==null?void 0:s.paymentMethod)!=null&&W.name?e.jsxs("div",{className:"order-detail__payrow",children:[e.jsx("span",{children:t("order_detail_label_payment_method")}),e.jsx("span",{children:s.paymentMethod.name})]}):null,b?e.jsxs("div",{className:"order-detail__payrow",children:[e.jsx("span",{children:t("order_detail_label_payment_reference")}),e.jsx("span",{children:b})]}):null,k?e.jsxs("div",{className:"order-detail__payrow",children:[e.jsx("span",{children:t("order_detail_label_payment_iban")}),e.jsx("span",{children:k})]}):null,N?e.jsxs("div",{className:"order-detail__payrow",children:[e.jsx("span",{children:t("order_detail_label_payment_bank")}),e.jsx("span",{children:N})]}):null,p?e.jsxs("div",{className:"order-detail__payrow",children:[e.jsx("span",{children:t("order_detail_label_coupon")}),e.jsx("span",{children:p})]}):null,_?e.jsxs("div",{className:"order-detail__payrow",children:[e.jsx("span",{children:t("order_detail_label_invoice")}),e.jsxs("span",{children:[_,u?e.jsx("span",{className:`order-detail__invoice-badge ${o==="PAID_IN_FULL"?"is-paid":"is-open"}`,children:u}):null]})]}):null]})]})})]}),e.jsx("div",{className:"order-detail__card order-detail__card--flush",children:e.jsx(ie,{c
1odes:s==null?void 0:s.trackAndTraceCodes})})]})};export{Ne as ErrorBoundary,je as default,xe as meta}; 2//# sourceMappingURL=_orderNumber-CDSX1uzu.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.