1import{u as e,S as a,t as n,T as i,w as s,F as r,s as t}from"./2c1ab0fe.GMbxnz74.js";import{ct as l,o,ai as c,eM as d,L as p,da as u,ej as m,c as h,eN as v,cm as b,P as y,ep as f,em as _,co as g,B as k,en as w,eo as C,I as j,a2 as A,i as N,eq as L,ea as P,a6 as I,w as S,eO as R,b as D,V as x,X as z,a3 as B,U as F,b0 as O,_ as M,aa as E}from"./164ad2e3.B4L1MRYB.js";import{S as T,W as U,T as q,bh as G,dP as K,t as V,dO as $,cT as H,bO as Q,dQ as W,dR as X,ac as J,eh as Y,ab as Z,b4 as ee,b6 as ae,ak as ne,ai as ie,bg as se}from"./4c290a1e.DMQ9xOwP.js";import{C as re}from"./a535174a.DPVRr5eA.js";import{R as te}from"./6720fa5f.B84Z8I3K.js";import{D as le,u as oe}from"./0e9ee714.BUAjwk_6.js";import{e as ce,u as de,a as pe,R as ue,c as me,D as he,b as ve,L as be,P as ye,d as fe}from"./60575ca1.Bk5f1_80.js";import{P as _e}from"./fc21c11a.Dku7sbdq.js";import{P as ge}from"./e3e348f2.DAaElZ9-.js";import{D as ke,u as we,a as Ce,S as je,R as Ae,b as Ne}from"./910cd6e2.C--KAxpp.js";import{M as Le,S as Pe,a as Ie}from"./dfca5da5.BJQx_CCE.js";import{S as Se}from"./79974aab.DPBsbYrf.js";import{MobileOrderSummary as Re}from"./d2e6a587.Dn0L4cvy.js";import{u as De}from"./4ea44c06.Cj0Sc_bl.js";import{u as xe,S as ze}from"./ca5e9c49.DIuWAPOX.js";import{u as Be}from"./f1968089.lfvhhPdb.js";import{h as Fe}from"./31cc568e.CVMsqQ1x.js";import{A as Oe}from"./53bbdad9.oGVvLPt2.js";import{u as Me}from"./a25deb9a.BE5O6zot.js";import{u as Ee}from"./0727407f.DihGPUji.js";import{P as Te}from"./e77f7fe0.BZPIxVUE.js";import"./9f047e05.DwjCPgK0.js";import"./app.DGSHpWaV.js";import"./0a7dffce.BcNpdEJk.js";import"./5fda1420.BLaDhoyL.js";import"./60a453ce.Cg9T1Gj2.js";import"./21cc90a2.Ccyorzx_.js";import"./bb728e1c.CHt2JlPY.js";import"./5fd968f2.BwKCnifP.js";import"./01973ac7.hFyCq2Rp.js";import"./58314944.D85q6ENI.js";import"./39921a74.BMGPgeDG.js";import"./ccdf3592.y_I-TghG.js";import"./e477f96c.DJuIaq7S.js";import"./0c0ad074.Dl7fvU-G.js";import"./cb38e5c2.Hmwo5zs2.js";import"./945a08d6.c61SBjtG.js";import"./ec391382.CdHY2UiR.js";import"./347b440c.-JodZrUc.js";import"./d5d34b3b.D0jJQL_d.js";import"./1ed8f5e3.DkmKdCgD.js";import"./7ee73f43.QtnstTj2.js";import"./cb5cf153.CBk88ZOK.js";import"./7a8217fd.C-KSXAi3.js";import"./87bfafec.4CtkSIvo.js";import"./55098bf1.SNyaSeYe.js";import"./181d38d3.bNzFxA5T.js";import"./7b0c98ea.B54fWMkZ.js";import"./91319467.DpeMFOvW.js";import"./ed9f2238.BDG257lM.js";import"./598fef4e.Blg5kMTg.js";function Ue(){const{checkout:n}=T(),i=U().shippingAddress.value,{value:s}=q().deliveryNext,r=n.proposal.facts.delivery??[],t=r[0],l=q().buyerIdentity.value?.purchasingCompany;if(!(r.length&&t?.lines?.length||n.isShippingRequired.value))return null;if(!t)return null;if(t.pickupAddress)return e(Ke,{address:t.pickupAddress??void 0,locationName:t.pickupAddressName});const o="unavailable"===s?.status?i:t.deliveryAddress,c=s&&"unavailable"!==s.status?s.lines.find(e=>"SUBSCRIPTION"!==e.type&&"available"===e.status&&!e.methods.some(({methodType:e})=>"PICK_UP"===e)):void 0;return e(a,{children:[e(Ge,{shippingAddress:o??void 0,companyLocationName:l?.location.name}),e(qe,{lines:t.lines,secondaryDeliveryLine:c})]})}function qe({lines:a,secondaryDeliveryLine:n}){const{i18n:i,source:s}=T(),r=a.filter(({deliveryChange:e,isFulfilled:a})=>"REMOVED"!==e&&!a).map(a=>e(le,{line:a},a.title));return r.length?e(te,{id:"shipping",label:i.translate("shipping.title"),primaryContent:r,secondaryContent:"paymentCollection"!==s.type&&n?e(ce,{line:n}):void 0}):null}function Ge({shippingAddress:a,companyLocationName:n}){const{i18n:i}=T(),s=l(a,{countryFormat:"explicit",displayName:Boolean(n)}),r=i.formatName(a?.firstName,a?.lastName,!0)||a?.firstName||a?.lastName,t=i.translate("review.blocks.no_address"),{primaryContent:d,secondaryContent:p}=n?{primaryContent:n,secondaryContent:a?s:t}:{primaryContent:a?r:t,secondaryContent:a?s:void 0},u=d?e(o,{children:d}):void 0;let m;return a&&null==s?m=e(c,{}):a&&p?m=e(o,{type:"address",children:p}):p&&(m=e(o,{children:p})),e(te,{id:"address",label:i.translate("review.blocks.shipping_address_title"),primaryContent:u,secondaryContent:m})}function Ke({address:a,locationName:n}){const{i18n:i}=T(),s=l(a,{hiddenFields:["postalCode","countryCode","phone"]});return n&&s?e(te,{id:"delivery",label:i.translate("review.blocks.pick_up_in_store_shipping_method_html",{location_name:n}),primaryContent:e(o,{children:s})}):null}function Ve({accessibilityLabel:a,children:n,href:i}){const{checkout:{identity:s}}=T(),{onClick:r}=d(),t=function({href:e,identity:a,amazonPayCheckoutAsGuest:n}){return"#contact"!==e||"amazonPay"!==a.current.value?void 0:()=>n?.()}({href:i,identity:s,amazonPayCheckoutAsGuest:r});return e(p,{href:i?`/${i}`:"/",onClick:t,accessibilityLabel:a,children:n})}const $e=["firstName","lastName"];function He({showAdressReviewItemAction:a=!0,reviewItemLabel:i,addressPresenterProps:s}){const{i18n:r,checkout:t}=T(),o=q(),d=o.deliveryNext,p=t.proposal.facts.delivery??[],h=o.shippingAddress,v=G("shippingAddress"),b=n(()=>p.length>0?p[0].deliveryAddress:h.value),y=n(()=>K(d.value)),{shippingAddress:f,billingAddress:_}=U(),g=n(()=>"unavailable"===d.value?.status?f.value:b.value),{selectedPickupPoint:k}=Me(),w=n(()=>!t.isShippingRequired.value),C=n(()=>w.value?_.value:g.value),j=u(),A=q().buyerIdentity.value?.purchasingCompany,N=A?.location,L=m(),P=de({address:C}).value,I=C.value,S=P??{hiddenFields:["phone"],multiline:!1,...s},R=function({hiddenFields:e,...a}){return{...a,hiddenFields:[...new Set([...e??[],...$e])]}}(S),D=Boolean(N&&(null==I||V(I)||!L.value)),x=l(k?.pickupLocation.address,{hiddenFields:["countryCode"]}),z=w.value?r.translate("review.blocks.billing_address_title"):r.translate("review.blocks.shipping_address_title"),B=w.value?r.translate("review.blocks.change_billing_address_link_label"):r.translate("review.blocks.change_shipping_address_link_label"),F=e(Ve,{href:"#deliveryAddress",accessibilityLabel:B,children:r.translate("review.blocks.change_link_label")}),O=r.translate("review.blocks.no_address"),M=r.translate("pickup_point.title").toLowerCase(),E=j?.taxId.value;let $=D?N?.name:(()=>
1{if(null==I||V(I)||D)return;const e=S.hiddenFields??[],a=e.includes("firstName")?void 0:I.firstName,n=e.includes("lastName")?void 0:I.lastName;return r.formatName(a,n,!0)||a||n})(),H=e(Qe,{address:I,hasCompanyLocation:Boolean(N),noAddressLabel:O,secondaryAddressPresentationProps:R,vatNumber:E});return v.value?($=e(c,{}),H=void 0):y.value&&($=k?.pickupLocation.name,H=e(We,{formattedAddress:x,pickupPoint:k,pickupPointLabel:M})),e(te,{label:i||z,primaryAction:a?F:void 0,primaryContent:$,secondaryContent:H})}function Qe({address:a,hasCompanyLocation:n,noAddressLabel:i,secondaryAddressPresentationProps:s,vatNumber:r}){return null==a||V(a)?e(h,{children:[e(o,{color:"subdued",children:i}),r&&e(ke,{vatNumber:r})]}):e(h,n?{children:e(Oe,{...s,address:a})}:{children:[e(Oe,{...s,address:a}),r&&e(ke,{vatNumber:r})]})}function We({formattedAddress:a,pickupPoint:n,pickupPointLabel:i}){if(!n)return null;const s=`${n.pickupLocation.carrierName} ${i}`;return e(h,{children:[a?e(o,{type:"address",children:a}):null,e(o,{color:"subdued",size:"small",children:s})]})}function Xe({purchasingCompany:a}){const{i18n:n}=T(),{secondary:i}=v({address:a.location.shippingAddress??{},nameLinePosition:"inline",addressDisplayName:a.location.name});if(!$(a))return null;const s=n.translate("review.blocks.company_location"),r=e(Ve,{href:"#billingAddress",accessibilityLabel:n.translate("review.blocks.change_company_location_link_label"),children:n.translate("review.blocks.change_link_label")}),t=a.location.shippingAddress?i:n.translate("review.blocks.no_address"),l=e(o,{children:a.location.name});return e(te,{label:s,primaryAction:r,primaryContent:l,secondaryContent:e(o,{children:t})})}function Je({companyName:a}){const{i18n:n,checkout:i}=T(),{value:s}=q().contactInfo,r=G("contactInfo").value,t=i.proposal.facts.contactMethod,{geolocation:l}=b(),d=q().buyerIdentity.value?.purchasingCompany;pe(r);const{email:p,phone:u}=s??{},{email:m,phoneNumber:h}=t??{},{formattedNumber:v}=Ee(l.country.code,h??void 0),{formattedNumber:f}=Ee(l.country.code,u),_=r&&null==(p??u),g=m||v||p||f,k=n.translate("customer_account.rollup_label");if(!g&&!r)return null;const w=a?k:n.translate("review.blocks.contact_method_title"),C=d?e(ue,{contactInfo:g}):e(y,{lineClamp:1,children:e(o,{dir:"ltr",children:g})}),j=_?e(c,{}):C,A=_||d?void 0:e(Ve,{href:"#contact",accessibilityLabel:n.translate("review.blocks.change_contact_method_link_label"),children:n.translate("review.blocks.change_link_label")});return e(te,{id:"contact",label:w,primaryAction:A,primaryContent:j})}function Ye(){const{i18n:a}=T(),n=q(),{value:r}=n.deliveryNext,t=G("deliveryNext").value,l=H(r),d=f(),p=_().value,u=g(),m=i(()=>{if(r&&"unavailable"!==r.status)return l?.find(({methodType:e})=>"PICK_UP"===e)?.pickupLocation},[r,l]),h=m?.address,v=m?.name,b=Boolean(l?.some(({methodType:e})=>"PICK_UP"===e)),y=we({deliveryLines:t||"filled"!==r?.status?void 0:r.lines}),w=b?a.translate("local_pickup.title"):a.translate("shipping.title");if(t&&!r)return e(te,{label:w,primaryContent:e(c,{})});const C=p||t?null:e(Ve,{href:"#shippingMethod",accessibilityLabel:b?a.translate("review.blocks.change_delivery_method_link_label"):a.translate("review.blocks.change_shipping_method_link_label"),children:a.translate("review.blocks.change_link_label")}),j=y?e(je,{summary:y}):void 0,A=y?e(Ce,{summary:y}):void 0,N=e(te,{label:w,primaryAction:C,primaryContent:j??(b?e(be,{pickupLocationName:v}):e(he,{})),secondaryContent:A??(b?e(ve,{address:h,pickupLocationName:v}):e(me,{}))}),L=e(o,{color:"subdued",children:a.translate("review.blocks.no_address")}),P=h?e(k,{maxInlineSize:"300px",children:e(be,{pickupLocationName:v})}):L,I=h?e(k,{maxInlineSize:"300px",children:e(ve,{address:h,pickupLocationName:v})}):void 0,S=e(Ve,{href:"#deliveryAddress",accessibilityLabel:a.translate("review.blocks.change_delivery_method_link_label"),children:a.translate("review.blocks.change_link_label")}),R=a.translate("review.blocks.pickup_items_at",{count:d.value.PICK_UP||0}),D=p||t?null:e(Ve,{href:"#shippingMethod",accessibilityLabel:a.translate("review.blocks.change_shipping_method_link_label"),children:a.translate("review.blocks.change_link_label")});return e(s,{when:u,fallback:N,children:[e(te,{label:R,primaryAction:S,primaryContent:P,secondaryContent:I}),e(s,{when:()=>d.value.SHIPPING,children:n=>e(He,{reviewItemLabel:a.translate("review.blocks.ship_items_to",{count:n}),addressPresenterProps:{hiddenFields:["phone","company","firstName","lastName"]}})}),e(te,{label:a.translate("shipping.title"),primaryAction:D,primaryContent:j??e(he,{}),secondaryContent:A??e(me,{})})]})}function Ze(){const{i18n:a}=T(),{acceptPaymentVaulting:i,paymentLines:t}=U(),l=G("paymentLines"),d=G("shippingAddress"),p=Q(),u=w(),m=C(u.value),v=n(()=>!l.value&&null!=t.value&&!d.value),b=n(()=>{const e=t.value;return e?W(X(e,p.value)):[]}),f=n(()=>Boolean(t.value?.some(e=>"direct"===e.method.type))),_=n(()=>{const e=t.value?.some(e=>"deferred"===e.method.type);return!e}),g=n(()=>Boolean(i.value&&f.value)),A=a.translate("payment.title"),N=e(r,{each:b,children:a=>e(Te,{paymentLine:a,showCardBrandLabel:!0})}),L=v.value?e(Ve,{href:"#payment",accessibilityLabel:a.translate("review.blocks.change_payment_method_link_label"),children:e(o,{children:a.translate("review.blocks.change_link_label")})}):void 0,P=e(s,{when:v,fallback:e(c,{}),children:e(h,{gap:"small-400",children:N})});let I;return(_.value||g.value)&&(I=e(k,{padding:"small-500 none none none",children:e(s,{when:v,fallback:e(c,{}),children:e(h,{gap:"small-400",children:[e(s,{when:_,children:e(y,{children:m})}),e(s,{when:g,children:e(h,{direction:"inline",gap:"small-400",alignItems:"center",children:[e(j,{type:"check",size:"small"}
1),e(y,{children:a.translate("review.blocks.payment_method_saved_company_location")})]})})]})})})),e(te,{id:"payment",label:A,primaryAction:L,primaryContent:P,secondaryContent:I})}function ea(){const{i18n:a}=T(),i=q().purchaseOrderNumber,s=n(()=>i.value?.trim()?`#${i.value}`:void 0),r=a.translate("review.blocks.no_purchase_order_number_long"),t=s.value,l=t?e(ye,{children:t}):void 0,c=t?void 0:e(y,{children:r}),d=e(Ve,{accessibilityLabel:a.translate("review.blocks.change_purchase_order_number_label"),href:"#payment",children:e(o,{children:a.translate("review.blocks.change_link_label")})}),p=a.translate("review.blocks.purchase_order_number_title");return e(te,{id:"purchaseOrder",label:p,primaryAction:d,primaryContent:l,secondaryContent:c})}function aa(){xe({stage:ze.Complete,id:"Review"});const{checkout:a,i18n:i,shop:r,source:l}=T(),o=r.hasFlagEnabled(J),c=a.configuration.visibility.showAside,{main:{spacing:d}}=A(),{progress:p}=N(),u=t(()=>p("one-page-review-submit"),[p]),m=oe(u),v=Fe("review.review_notice_html",i),b=q(),f=b.deliveryNext,_=b.paymentLines,k=Y(),w=G("total"),C=G("paymentLines"),j=a.proposal.facts.delivery??[],E=L(),U=b.buyerIdentity,K=Z(),V=De(),$=g(),H=a.configuration.showContactInformation,Q=P(),W=n(()=>ee(f.value)||j.length>0&&j.every(e=>null!==e.pickupAddress)),X=n(()=>a.isShippingRequired.value&&!W.value),se=n(()=>U.value?.purchasingCompany?a.isShippingRequired.value&&!E.value:a.isShippingRequired.value),te=n(()=>Boolean(k.value&&k.value.amount>0)||_.value?.lines.some(e=>e.cost?.amount)),le=n(()=>Boolean(w.value||C.value||!k.value||te.value)),ce=Be(),de=n(()=>!U.value?.purchasingCompany||ce.value),pe=ae(l),ue=ne(),me=I({base:!0,medium:!1}),he=!ue.value||(me??!1),ve=S("Checkout::Dynamic::Render","ORDER_SUMMARY4"),be=e(Ie,{condition:!he&&!o,hideDivider:!0,children:[e(Le,{condition:he&&!o,hideDivider:!!o||void 0,children:[e(h,{gap:"small-400",children:[e(s,{when:()=>pe,children:[e(R,{}),e(D,{blockSize:"base"})]}),e(Ae,{}),e(s,{when:()=>v,children:e(y,{type:"small",color:"subdued",children:e(Ne,{})})})]}),e(D,{blockSize:"large-200"}),e(ia,{renderAsCard:o,children:e(na,{buyerIdentity:U,isOrderEditSession:pe,showContactInformation:H,showPayment:le,showShippingAddress:X,showAddressReviewItemAction:de,showDeliveryMethod:se,isSplitShipAndPickup:$})})]}),o&&e(Pe,{spacing:he?ie(d):"large-400"}),e(s,{when:K,children:e(Ie,{condition:he&&!o,children:[e(ge,{placement:"default"}),e(D,{blockSize:"base"})]})}),e(Ie,{condition:he&&!o,hideDivider:!0,children:e(x,{section:"review",children:e(z,{section:"review",children:e(h,{gap:"base",children:[o?e(Se,{target:"card",children:e(B,{accessibilityRole:"presentation",display:c?"@media (inline-size >= medium) none, auto":void 0,children:e(Re,{})})}):e(Re,{}),e(h,{gap:"large-200",children:[e(s,{when:V,children:e(re,{})}),e(s,{when:K,children:e(ge,{placement:"above-pay-button"})}),e(_e,{buttonHidden:Q}),e(s,{when:()=>he,children:e(F,{customizations:ve,gap:"large-200"})})]})]})})})})]});return e(M,{onSubmit:m,children:o?e(O,{children:e(B,{accessibilityRole:"presentation",containerName:"s-shell-section",children:be})}):be})}function na({buyerIdentity:i,isOrderEditSession:r,showContactInformation:t,showPayment:l,showShippingAddress:o,showAddressReviewItemAction:c,showDeliveryMethod:d,isSplitShipAndPickup:p}){const u=n(()=>i.value?.purchasingCompany?.company?.name),m=n(()=>Boolean(i.value?.purchasingCompany)),h=n(()=>o.value&&!p.value),v=n(()=>o.value?void 0:i.value?.purchasingCompany);return e(a,{children:[t&&e(Je,{companyName:u.value}),e(a,r?{children:[e(Ue,{}),e(s,{when:l,children:e(Ze,{})}),e(s,{when:m,children:e(ea,{})})]}:{children:[e(s,{when:h,children:e(He,{showAdressReviewItemAction:c.value})}),e(s,{when:d,children:e(Ye,{})}),e(s,{when:v,children:a=>e(Xe,{purchasingCompany:a})}),e(s,{when:l,children:e(Ze,{})}),e(s,{when:m,children:e(ea,{})})]})]})}function ia({children:a,renderAsCard:n=!1}){const{i18n:i}=T(),r=se(),t=i.translate("review.block_title"),l=e(fe,{accessibilityLabel:t,renderAsCard:n,children:a}),o=e(s,{when:()=>!r.value,fallback:l,children:e(E,{children:l})});return n?e(Se,{target:"edgeToEdgeCard",children:o}):o}export{ia as ReviewItems,aa 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.