1import{k as e,u as a,w as i,S as t,H as n,z as l,h as r}from"./2c1ab0fe.Bywc2Brn.js";import{b$ as s,db as o,k as c,aO as u,ei as d,ej as p,j as v,L as m,di as h,ek as b,el as f,cB as y,G as k,S as g,em as _,f as w,cv as L,en as A,dK as N,eo as j,ep as C,a1 as S,d as P,eq as I,er as x,cx as R,c6 as B,H as z,es as F,i as K,ao as O}from"./164ad2e3.DHuJhR22.js";import{dv as U,bK as $,c as q,J as M,dw as T,b9 as D,dx as H,bL as W,cH as E,bv as G,dy as J,dz as V,d8 as Q,ab as X,b8 as Y}from"./9dba8418.DInoCEzY.js";import{B as Z}from"./b9c0319a.CP0dk-f4.js";import{D as ee,u as ae,S as ie,a as te,R as ne,b as le}from"./910cd6e2.BdN5ojLZ.js";import{L as re,a as se,R as oe}from"./03fde911.CFeWYByk.js";import{S as ce}from"./79974aab.D9dodboU.js";import{u as ue,h as de}from"./17425706.Cliq-lrN.js";import{R as pe,P as ve}from"./e77f7fe0.Dq32v_oT.js";import{A as me}from"./4b1c22b7.CaFHnwF0.js";import{u as he,P as be,a as fe,R as ye,D as ke,b as ge}from"./60575ca1.D-VPziNX.js";import{u as _e}from"./160e80e7.BZQJTGJv.js";import{h as we}from"./2bac2c53.gEGJwgcc.js";import{S as Le}from"./9e94a50b.BevpX_k4.js";import{a as Ae}from"./22345fd4.DBXfVnfa.js";import"./d0bb51ec.DwFzQH6k.js";import"./app.D2wFhSFv.js";import"./f67abd2c.CxgiarJo.js";import"./60a453ce.CQQC7Spq.js";import"./e12db40c.DJw7xsqf.js";import"./efa0389a.BrVghuh8.js";import"./74835653.CZU0gWLB.js";import"./3ca8ef7e.DWjSQTNc.js";import"./2495faa4.Tu9qVTlu.js";import"./a9fa9fda.JxdJYte2.js";import"./ca3e798e.Dc9DtEXz.js";import"./47b970b2.CJVz388Q.js";import"./064f6ac1.B2UyZ3Ta.js";import"./347b440c.8UmgLgUR.js";import"./9ce08e25.DbZR-P3G.js";import"./181d38d3.CXIvj6V1.js";import"./792bb671.B3OvVnSg.js";import"./598fef4e.TLWCeEj7.js";function Ne(){const{source:a,checkout:{negotiator:i}}=q(),t=i.current.fields.buyerIdentity,n=u(),l=d();return e(()=>{const e=t.value?.purchasingCompany,i=n.value;if(e){if(l.value)return"/information";if(i)return i}if(!M(a))return"/information"})}function je({accessibilityLabel:e,href:i}){const{i18n:t}=q(),n=t.translate("review.blocks.change_link_label");return a(m,{href:i,accessibilityLabel:e,children:a(v,{children:n})})}const Ce=["firstName","lastName"];function Se({hiddenFields:e,...a}){return{...a,hiddenFields:[...new Set([...e??[],...Ce])]}}function Pe({withWrappedAddress:i=!1,label:t}){const{i18n:n,source:l,checkout:r}=q(),s=r.negotiator.current.fields.deliveryNext,o=D("deliveryNext"),u=r.proposal.facts.delivery??[],v=e(()=>H(s.value)),m=r.negotiator.current.fields.shippingAddress,g=D("shippingAddress"),w=e(()=>u.length>0?u[0].deliveryAddress:m.value),{shippingAddress:L,billingAddress:A}=r.negotiator.parts,N=e(()=>"unavailable"===s.value?.status?L.value:w.value),{selectedPickupPoint:j}=_e(),C=r.negotiator.current.fields.billingAddress,S=e(()=>C.value??A.value),P=r.negotiator.current.fields.buyerIdentity.value?.purchasingCompany,I=h(),x=e(()=>g.value&&null==w.value),R=e(()=>M(l)?!b({checkout:r}):!r.isShippingRequired.value),B=e(()=>R.value?S.value:N.value),z=f(),F=he({address:B}).value,K=B.value,O=P&&R.value?n.translate("review.blocks.company_location"):n.translate("review.blocks.billing_address_title"),U=R.value?O:n.translate("review.blocks.shipping_address_title"),$=R.value?n.translate("review.blocks.change_billing_address_link_label"):n.translate("review.blocks.change_shipping_address_link_label"),E=P?.location;let G;if(F)G=F;else if(i)G={hiddenFields:["phone"],multiline:!0};else{const e=K?.countryCode??j?.pickupLocation.address.countryCode;G=e&&_.includes(e)?{hiddenFields:["phone"],multiline:!1}:{hiddenFields:["firstName","lastName","phone"],multiline:!1}}const J={...Se(G),multiline:!1},V=Boolean(E&&(o.value||null==K||W(K)||!z.value)),Q=V?E?.name:(()=>{if(null!=K&&!W(K)&&!V)return n.formatName(K.firstName,K.lastName,!0)||K.firstName||K.lastName})(),X=y(j?.pickupLocation.address,{hiddenFields:["countryCode"]}),Y=j?.pickupLocation.name,Z=n.translate("review.blocks.no_address"),ee=n.translate("pickup_point.title").toLowerCase(),ae=!E||r.isShippingRequired.value,ie=I?.taxId.value,te=function({showLoading:a,displayBillingAddress:i}){const{source:t,shop:{customerAccountLocationsUrl:n},checkout:{negotiator:l}}=q(),r=l.current.fields.buyerIdentity,s=c(),o=d(),u=T();return e(()=>{const e=r.value?.purchasingCompany,l="draftOrder"===t.type,c=p(s.value.plan,"/information"),d=we(e);return!(a.value||(!e||!d&&!o.value||!n||M(t)||l)&&(!u.value&&!i.value||!c))})}({showLoading:x,displayBillingAddress:R}),ne=Ne(),le=a(je,{href:ne.value,accessibilityLabel:$}),re=t??U,se=te.value?le:void 0;
1let oe=Q,ce=a(Ie,{address:K,addressDetailsPresentationProps:J,companyLocationName:E?.name,deliveryNextLoading:o.value,isOnetimeShippingAddress:z.value,noAddressLabel:Z,showAddress:ae,vatNumber:ie});return x.value?(oe=a(k,{}),ce=void 0):v.value&&(oe=Y,ce=a(xe,{formattedAddress:X,pickupPoint:j,pickupPointLabel:ee})),a(pe,{label:re,primaryAction:se,primaryContent:oe,secondaryContent:ce})}function Ie({address:e,addressDetailsPresentationProps:i,companyLocationName:t,deliveryNextLoading:n,isOnetimeShippingAddress:l,noAddressLabel:r,showAddress:s,vatNumber:o}){return n&&t?a(k,{}):null==e||W(e)?s||o?a(g,{children:[s&&a(v,{size:"small",color:"subdued",children:r}),o&&a(ee,{vatNumber:o})]}):null:t&&!l?s?a(g,{children:a(me,{textColor:"subdued",textSize:"small",...i,address:e})}):null:a(g,{children:[a(me,{...i,address:e}),o&&a(ee,{vatNumber:o})]})}function xe({formattedAddress:e,pickupPoint:i,pickupPointLabel:t}){if(!i)return null;const n=`${i.pickupLocation.carrierName} ${t}`;return a(g,{children:[e?a(v,{type:"address",children:e}):null,a(v,{color:"subdued",size:"small",children:n})]})}function Re(){const{i18n:t,checkout:{negotiator:n}}=q(),{purchaseOrderNumber:l}=n.current.fields,r=D("purchaseOrderNumber"),s=e(()=>r.value&&void 0===l.value),o=t.translate("review.blocks.no_purchase_order_number_long"),c=e(()=>{const e=l.value;return void 0!==e&&""!==e.trim()?`#${e}`:void 0}),u=t.translate("review.blocks.purchase_order_number_title"),d=()=>a(je,{href:"/payment",accessibilityLabel:t.translate("review.blocks.change_purchase_order_number_label")});return a(i,{when:()=>!s.value,fallback:a(pe,{label:u,primaryContent:a(k,{})}),children:a(i,{when:c,fallback:a(pe,{label:u,primaryAction:d(),secondaryContent:a(w,{children:o})}),children:e=>a(pe,{label:u,primaryAction:d(),primaryContent:a(be,{children:e})})})})}function Be(){const{i18n:e,checkout:{negotiator:i}}=q(),t=Ne(),n=i.current.fields.buyerIdentity.value?.purchasingCompany,l=n?.location,r=ue();if(!l)return null;const s=e.translate("company_location.location_title"),o=r.value?a(je,{href:t.value,accessibilityLabel:e.translate("contact.change_company_location_link_label")}):void 0,c=a(v,{children:l.name}),u=l.shippingAddress?a(me,{hiddenFields:Le,address:l.shippingAddress}):a(v,{children:e.translate("review.blocks.no_address")});return a(pe,{label:s,primaryAction:o,primaryContent:c,secondaryContent:u})}function ze(){const{i18n:t,checkout:n}=q(),{contactInfo:l}=n.negotiator.current.fields,r=D("contactInfo"),{geolocation:s}=L(),{buyerIdentity:o}=n.negotiator.current.fields,u=c();fe(r.value);const d=n.proposal.facts.contactMethod?.phoneNumber,{formattedNumber:v}=Ae(s.country.code,d??void 0),{formattedNumber:m}=Ae(s.country.code,l.value?.phone),h=e(()=>r.value&&null==(l.value?.email??l.value?.phone)),b=e(()=>!h.value&&p(u.value.plan,"/information")&&!o.value?.purchasingCompany),f=e(()=>{const e=n.proposal.facts.contactMethod?.email,a=""===v?void 0:v,i=l.value?.email;return e||a||i||(""===m?void 0:m)}),y=t.translate("review.blocks.contact_method_title"),g=b.value?a(je,{href:"/information",accessibilityLabel:t.translate("review.blocks.change_contact_method_link_label")}):void 0;return a(pe,{label:y,primaryAction:g,primaryContent:a(i,{when:()=>!h.value,fallback:a(k,{}),children:()=>a(ye,{contactInfo:f.value})})})}function Fe(){const{checkout:i,i18n:t,source:n}=q(),l=c(),r=i.negotiator.current.fields.deliveryNext,s=D("deliveryNext"),o="draftOrder"===n.type,u=e(()=>E(r.value)),d=A(),v=ae({deliveryLines:"filled"===r.value?.status?r.value.lines:void 0}),m=e(()=>N({checkout:i,source:n})),h=e(()=>{if(m.value?.pickupAddress)return m.value.pickupAddress;if(!r.value||"unavailable"===r.value.status)return;const e=u.value?.map(e=>e.pickupLocation?.address).filter(e=>void 0!==e);return e?.[0]}),b=e(()=>{if(r.value&&"unavailable"!==r.value.status)return m.value?m.value.pickupAddressName:u.value?.find(({methodType:e})=>"PICK_UP"===e)?.pickupLocation?.name}),f=e(()=>Boolean(u.value?.some(({methodType:e})=>"PICK_UP"===e)||m.value?.pickupAddress)),y=e(()=>f.value?"/information":"/shipping"),k=e(()=>!d.value&&!o&&(!M(n)&&p(l.value.plan,y.value)||M(n)&&f.value)),g=e(()=>f.value?t.translate("review.blocks.change_delivery_method_link_label"):t.translate("review.blocks.change_shipping_method_link_label")),_=k.value?a(je,{href:y.value,accessibilityLabel:g.value}):void 0,w=t.translate("shipping.title"),L=t.translate("delivery_options.pickup"),j=f.value?L:w,C=a(Ke,{showSkeleton:s.value&&!r.value,splitShippingRollupSummary:v,isLocalPickupSelected:f.value,pickupLocationName:b.value}),S=a(Oe,{showSkeleton:s.value&&!r.value,splitShippingRollupSummary:v,isLocalPickupSelected:f.value,pickupAddress:h.value,pickupLocationName:b.value});return a(pe,{label:j,primaryAction:_,primaryContent:C,secondaryContent:S})}function Ke({showSkeleton:e,splitShippingRollupSummary:i,isLocalPickupSelected:t,pickupLocationName:n}){return e?a(k,{}):i?a(ie,{summary:i}):t?a(re,{pickupLocationName:n}):a(ke,{})}function Oe({showSkeleton:e,splitShippingRollupSummary:i,isLocalPickupSelected:t,pickupAddress:n,pickupLocationName:l}){return e?a(k,{}):i?a(te,{summary:i}):t?a(se,{address:n,pickupLocationName:l}):a(ge,{})}function Ue(){const{i18n:l,checkout:{negotiator:r}}=q(),{acceptPaymentVaulting:s,paymentLines:o}=r.parts,u=D("paymentLines"),d=D("shippingAddress"),v=c(),m=j(),h=C(m.value),b=G(),f=e(()=>{const e=o.value;return e?J(V(e,b.value)).map((e,a)=>({key:`${e.method.type}-${a+1}`,line:e})):[]}),y=e(()=>
1o.value?.some(e=>"direct"===e.method.type)),_=e(()=>!u.value&&null!=o.value&&!d.value),L=e(()=>{const e=o.value?.some(e=>"deferred"===e.method.type);return!e}),A=e(()=>Boolean(s.value&&y.value)),N=e(()=>p(v.value.plan,"/payment")&&_.value).value?a(je,{href:"/payment",accessibilityLabel:l.translate("review.blocks.change_payment_method_link_label")}):void 0,I=l.translate("payment.title"),x=a(i,{when:_,fallback:a(k,{}),children:a(n,{each:f,getKey:e=>e.key,children:({line:e})=>a(t,{children:[a(ve,{paymentLine:e,showCardBrandLabel:!0}),a(P,{blockSize:"small-400"})]})})});let R;return(L.value||A.value)&&(R=_.value?a(t,{children:[a(i,{when:L,children:a(w,{children:h})}),a(i,{when:A,children:a(g,{direction:"inline",gap:"small-400",alignItems:"center",children:[a(S,{type:"check",size:"small"}),a(w,{children:l.translate("review.blocks.payment_method_saved_company_location")})]})})]}):a(k,{})),a(pe,{label:I,primaryAction:N,primaryContent:x,secondaryContent:R})}function $e(){const{checkout:e,i18n:n,source:l}=q(),{deliveryNext:r}=e.negotiator.current.fields,s=I(),o=c(),{value:u}=r,d=D("deliveryNext").value,v=ae({deliveryLines:"filled"===u?.status?u.lines:void 0}),m=Q(u).find(({method:e})=>"PICK_UP"===e.methodType),h=p(o.value.plan,"/information")?a(je,{href:"/information",accessibilityLabel:n.translate("review.blocks.change_shipping_address_link_label")}):void 0,b=p(o.value.plan,"/shipping")?a(je,{href:"/shipping",accessibilityLabel:n.translate("review.blocks.change_shipping_method_link_label")}):void 0,f=v?a(ie,{summary:v}):void 0,y=v?a(te,{summary:v}):void 0,g=m?.method.pickupLocation?.address,_=N({checkout:e,source:l})?.pickupAddressName??m?.method.pickupLocation?.name,w=a(re,{pickupLocationName:_}),L=a(se,{address:g,pickupLocationName:_});let A,j;return d?(A=a(k,{}),j=a(k,{})):(A=f??a(ke,{}),j=y??a(ge,{})),a(t,{children:[a(pe,{label:n.translate("review.blocks.pickup_items_at",{count:s.value.PICK_UP||0}),primaryAction:h,primaryContent:w,secondaryContent:L}),a(i,{when:()=>s.value.SHIPPING,children:e=>a(t,{children:[a(Pe,{label:n.translate("review.blocks.ship_items_to",{count:e})}),a(pe,{label:n.translate("shipping.title"),primaryAction:b,primaryContent:A,secondaryContent:j})]})})]})}function qe({showPayment:n,showAddress:u=!0}){const{i18n:d,shop:p,checkout:{negotiator:v}}=q(),m=c(),h=p.hasFlagEnabled(X),{buyerIdentity:b}=v.current.fields,f=e(()=>"review"===m.value?.currentPage?.id),y=Y(),k=e(()=>!f.value||!y.value),g=e(()=>{if(k.value)return f.value?B:F}),_=e(()=>f.value&&!y.value?d.translate("review.review_title"):d.translate("review.title")),[L,A]=l(!1),j=function(){const{hasViolations:e,violations:a}=s($);return o().value&&e&&!U(a)}(),C=function(){const a=x(),{checkout:i,router:t,source:n}=q();return e(()=>{const e=N({checkout:i,source:n}),l=e&&0===e.lines.length;return(t.currentUrlMatches("/payment")||t.currentUrlMatches("/review"))&&!a.value&&!l&&i.isShippingRequired.value})}(),S=R();r(()=>{!L&&j&&A(!0)},[j,L]);const I=function(){const a=c();return e(()=>{const{plan:e}=a.value;return e.greenPath.some(({id:e})=>"payment"===e)})}(),M=e(()=>void 0!==b.value?.purchasingCompany&&I.value),T=a(t,{children:[u&&a(Pe,{withWrappedAddress:f.value}),!u&&a(i,{when:()=>b.value?.purchasingCompany,children:a(Be,{})}),a(i,{when:C,children:a(Fe,{})})]}),D=a(oe,{accessibilityLabel:d.translate("review.block_title"),renderAsCard:h,children:[a(ze,{}),a(i,{when:S,fallback:T,children:a($e,{})}),n?a(Ue,{}):null,a(i,{when:()=>M.value&&f.value,children:a(Re,{})})]}),H=a(i,{when:k,fallback:D,children:a(O,{children:D})});return a(K,{accessibilityLabel:void 0===g.value?_.value:void 0,accessibilityLabelledBy:g.value,children:[a(i,{when:f,children:a(t,{children:[a(ne,{id:B}),de("review.review_notice_html",d)?a(w,{children:a(le,{})}):null,a(P,{blockSize:"large-200"})]})}),a(i,{when:()=>!f.value,children:a(z,{id:F,visibility:"hidden",children:_.value})}),h?a(ce,{target:"edgeToEdgeCard",children:H}):H,L&&a(t,{children:[a(P,{blockSize:"base"}),a(Z,{})]})]})}export{qe as default};
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.