const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["component-ShopPayWrapper.DkRVvJ9A.js","app.BpcE4wZo.js","assets/app.BX64KJWO.css","useShopPayExternalAppContext.87CPop-8.js","useIsOriginatedFromShop.Fe0bn8gJ.js"])))=>i.map(i=>d[i]); import{hx as cn,hy as dn,_ as un,bQ as G,a as e,j7 as hn,f6 as pn,j8 as mn,E as Oe,z as se,d as z,i as B,a0 as te,j9 as gn,ja as yn,a3 as fn,jb as vn,db as Sn,bk as ve,jc as Pn,K as Ae,jd as Be,a7 as ie,b3 as O,je as Cn,G as S,B as T,U as h,aB as Le,aT as bn,jf as ze,bz as kn,jg as Mn,gl as _n,hr as we,aY as N,fK as ae,fH as g,jh as An,aW as C,a_ as b,ji as En,as as he,jj as Dn,gE as In,fE as F,a$ as xe,gv as Ue,ds as Ge,aI as me,jk as wn,jl as xn,jm as Rn,ab as Vn,e as Se,fv as Ye,b8 as Tn,b0 as We,jn as On,jo as Bn,dI as ge,aZ as Ln,jp as jn,aC as Fn,aP as Nn,jq as Hn,cG as zn,h8 as Un,bf as qe,cH as Gn,cK as Yn,Y as ye,bd as Wn,N as qn,cL as $n,cM as Kn,cI as $e,cJ as Jn,hf as Qn,jr as Zn,js as Xn,cQ as es,cR as je,cP as ns,cS as Fe,jt as ss,bq as ts,cT as is,hh as as,hi as os,hg as Ke,he as rs,hp as ls,dj as Pe,ju as cs,cs as ds,cq as us,jv as Ce,jw as Je,jx as hs,H as ps,$ as ms,h as gs,ay as ys,av as fs,jy as vs,gI as Ss,bM as Ps,cW as Cs,jz as bs,jA as ks,d0 as Ms,jB as Qe,jC as _s,fZ as Ee,hm as As,jD as Es,dv as Ds,i6 as Is,S as ne,gc as ws,jE as xs,x as Rs,ga as pe,t as U,C as fe,gb as Vs,gJ as Ts,jF as Os,r as Bs,s as Ls,dt as js,o as Fs,jG as Ns,c_ as Hs,gy as zs,jH as _e,jI as Us,aK as Gs,M as Ys,jJ as Ws,jK as qs,jL as $s}from"./app.BpcE4wZo.js";import{D as Ks,S as Js,u as Qs,E as Zs,a as Xs,P as et}from"./DeliveryMethodSelectorSection.CUNeATwv.js";import{R as Ze,L as nt}from"./LocalizationExtensionField.BBSRgRmj.js";import{S as st}from"./ShipmentBreakdown.B-SIviMM.js";import{R as tt,P as it}from"./PayButtonSection.QREsBQ7i.js";import at from"./component-ShopPayVerificationSwitch.C-yhbeaf.js";import"./useEditorShopPayNavigation.CiuRCD93.js";import"./VaultedPayment.CWFjJx4s.js";import"./ShopPayOptInDisclaimer.CoHOtJOU.js";import"./MerchandiseModal.CBu7RW1P.js";import"./StackedMerchandisePreview.CtRvezo1.js";import"./useSubscribeMessenger.Hj8kcG3O.js";import"./index.D3AiHZb4.js";const ot=cn({load:()=>dn(()=>un(()=>____wb_rewrite_import__(import.meta.url, "./component-ShopPayWrapper.DkRVvJ9A.js"),__vite__mapDeps([0,1,2,3,4])))});function rt({filteredAvailableDeliveryAddresses:t,selectedAddressId:s,handleChange:a}){const i=G(()=>t?new Map(t.map(o=>[o.id,o.address])):new Map,[t]),n=G(()=>new Map,[]);return e(pn.Provider,{value:!0,children:e(hn,{id:"modal_shipping_address",addressType:"shipping",selectedId:s,onChange:a,choices:n,ephemeralAddressChoices:i})})}function lt({shippingAddress:t}){const{nameLine:s,primary:a,secondary:i}=mn({address:t}),n=`${s}, ${a}`;return e(z,{padding:"large100",background:"subdued",borderRadius:"base",children:e(Oe,{tone:"accent",children:[e(se,{children:e(Oe,{type:"strong",children:n})}),e(se,{children:i})]})})}function ct(){const t=B(),s=te(),a=s.mustSelectProvidedAddress.value,i=s.availableDeliveryAddresses.value,[n]=gn(),{setSelectedAddress:o,selectedAddress:l}=yn(),c=fn(),y=c?vn(c):!1,{record:p}=Sn(),{name:r}=ve(),[P]=Pn(),[u,m]=Ae(l?.id),d=G(()=>a?i:i?.filter(v=>!n.find(I=>Be(I.address,v.address))),[n,i,a]),k=G(()=>n?.some(v=>l?Be(v.address,l.address):!1),[l,n]),M=d?.length===0,f=i&&i.length>=1&&!M&&!k,w=n?.length>=1,x=!!(!a&&f&&w&&!y),[D,R]=Ae(x);ie(()=>{D&&p({schemaId:"shopify_pay_payment_page_ui_impression/2.0",payload:{elementText:d?.length===1?"single_address":"multiple_addresses",elementType:"shop_pay_merchant_set_address_modal",shopAccountUuid:P}})},[D]);const A=O(v=>{p({schemaId:"shopify_pay_payment_page_ui_interaction/1.1",payload:{action:v}})},[p]),_=O(()=>{A("shop_pay_proposed_address_modal_continue");const v=d?.find(I=>I.id===u);o(v,"shipping_address"),R(!1)},[d,u,o,A]),H=O(()=>{A("shop_pay_proposed_address_modal_use_saved_address");const v=Cn(n);v&&o(v,"shipping_address"),R(!1)},[o,n,A]),E=G(()=>d?new Map(d.map(v=>[v.id,v])):new Map,[d]),Y=O(v=>{const I=E.get(v);m(I.id)},[E,m]),W=d?.length===1?e(lt,{shippingAddress:d[0].address}):e(rt,{filteredAvailableDeliveryAddresses:d,selectedAddressId:u,handleChange:Y});return e(bn,{size:"large",open:D,heading:t("shop_pay.review_address_modal.title","Review address"),onHide:_,children:[e(S,{children:t("shop_pay.review_address_modal.subtitle",{count:d?.length||0,merchant:r},{one:"This order will be shipped to the address provided by %{merchant}.",other:"This order will be shipped to an address provided by %{merchant}. Select a shipping address."})}),e(T,{spacing:"base"}),W,e(T,{spacing:"large200"}),e(h,{spacing:"small400",children:[e(Le,{variant:"primary",inlineSize:"fill",onClick:_,children:t("shop_pay.review_address_modal.continue","Continue with this address")}),e(Le,{inlineSize:"fill",onClick:H,children:t("shop_pay.review_address_modal.use_saved_address","Use a different address")})]})]})}function dt(){const{acceptTipPayments:t}=ve(),{shopifyInstallments:s}=ze();kn();const a=Mn(),i=_n(),n=we(),{Tips:o,PurchaseOrderNumberField:l,GiftCardRedemption:c,StoreCreditRedemption:y,Installments:p,PaymentMethodSelector:r}=N(),{isOrderEditCheckout:P}=ae(),u=n?.tippingPaymentAllowed??!0,m=!P&&t&&u,d=g({shopPay:m&&!s(),default:m}),k=An({showTips:d,billingFormPosition:a}),M=C("purchase.checkout.payment-method-list.render-before"),f=C("purchase.checkout.payment-method-list.render-after");return e(xe,{target:"cart.paymentLines[0]",children:e(h,{children:[e(ut,{}),e(b,{extensions:M}),e(En,{}),e(y,{}),e(p,{}),e(he,{children:[e(h,{spacing:"large400",children:[e(Dn,{dynamicPaymentExtensions:k.shift()||[],children:[e(r,{}),e(b,{extensions:f}),e(b,{extensions:k.shift()||[]}),e(c,{})]}),i&&e(In,{}),e(l,{showHeading:!1})]}),d&&e(S,{children:[e(F,{sectionId:"tips",children:e(o,{})}),e(b,{extensions:k.shift()||[]})]}),e(Ze,{})]}),e(b,{extensions:k.flat()})]})})}function ut(){const t=B(),s=Ue(),a="payment",i=Ge().currentUrl.hash===`#${a}`,n=s?`${t("payment.billing_must_match_shipping_notice","Your payment method’s billing address must match the shipping address.")} `:"",o=t("payment.card_security_notice","All transactions are secure and encrypted.");return e(h,{spacing:"small400",children:[e(me,{id:a,level:1,autoFocus:i,children:t("payment.title","Payment")}),e(se,{color:"subdued",children:n+o})]})}function ht(){const t=B(),{availableDeliveryMethodsLoading:s,progressiveShippingRatesLoading:a}=xn(),i=s&&!a,{selectedDeliveryMethod:n}=Rn({onChange:()=>{},prerequisitesLoading:s||i}),o=n?t("order_summary.updated_shipping_method",{shipping_method:n.title},"Updated shipping method: %{shipping_method}"):void 0;return ie(()=>{if(o)return Vn({content:o})},[o]),null}function pt(){return wn("ONE_TIME_PURCHASE")?e(ht,{}):null}function mt(){const{negotiate:t}=Se(),s=Ye(),a=te(),i=a.shippingAddress.value,n=a.billingAddress.value,o=Tn(),{value:l=[]}=We(),c=On(l),y=Bn(l),{shippingRequired:p}=ge(),r=p?i.countryCode:n.countryCode,P=s?.value?.countryCode,u=JSON.stringify(s?.value,(m,d)=>d===void 0?null:d);ie(()=>{c||y||P&&r!==P&&(o.counter({name:"country_code_mismatch",value:1}),o.log("[EnsureBackAndFrontEndCountryCodeAlignment] There was a mismatch between the preselected and the buyerIdentity countryCode on checkout load.",{selectedCountryCode:r,buyerIdentityCountryCode:P,buyerIdentity:u}),t({silenceViolations:["all"],progression:!1}))},[])}function gt({showSmsMarketingOptIn:t=!1}){const s=C("Checkout::Contact::RenderAfter"),a=C("Checkout::Dynamic::Render","INFORMATION1"),i=C("Checkout::Dynamic::Render","INFORMATION2"),{ContactForm:n}=N();return e(S,{children:[a.length?e(S,{children:e(b,{extensions:a,spacing:"base",marginBlockEnd:"large300"})}):null,e(Ln,{impressionType:"contact",impressionFeatures:[],children:[e(n,{showSmsMarketingOptIn:t}),s.length?e(S,{children:e(b,{extensions:s,marginBlockStart:"base"})}):null,i.length?e(S,{children:e(b,{extensions:i,spacing:"large200",marginBlockStart:"large300"})}):null]})]})}function yt(){const t=B(),{setSelectedAddress:s,addresses:a}=jn("shipping"),i=O(()=>{a.length>0&&s(a[0])},[a,s]);return a.length===0?null:e(Nn,{inlineAlignment:"start",children:e(Fn,{id:"save_shipping_information",textDecoration:"none",onClick:i,children:t("customer_account.saved_address_option_link","Use a saved address")})})}function ft({showSmsMarketingOptIn:t=!1}){return Hn(),e(h,{spacing:"large300",children:[e(Ks,{}),e(vt,{showSmsMarketingOptIn:t})]})}function vt({showSmsMarketingOptIn:t}){const s=zn(),{method:a}=Un(),i=B(),{activeWalletSessionSignal:n}=qe(),{value:o}=Gn(),l=Yn(),c=ye(Wn),{showShipmentBreakdown:y}=qn(),p=C("Checkout::DeliveryAddress::RenderBefore"),r=C("purchase.checkout.delivery-address.render-after"),{hasMultipleDeliveryGroups:P,onlyDeliveryGroupType:u}=$n(),{extensionsBefore:m,extensionsAfter:d}=Kn({hasMultipleDeliveryGroups:P,targeted:!1}),k=l||y,M=$e(),f=Jn(),{negotiate:w}=Se(),x=O(({shipping:E})=>{n.peek()||w({include:["shippingAddress"],fieldsToResolve:["deliveryNext"],silenceViolations:["non-delivery-address"],runListenersOnError:!0}),E.value=!0,M("sectionComplete",{section:"deliveryAddress",timestamp:new Date}),f({type:"section_complete",section:"deliveryAddress"})},[n,w,M,f]),D=O(({shipping:E})=>{E.value=!1},[]),R=E=>e(he,{padding:k?["small400","none"]:"none",children:E}),A=t?e(Ke,{}):null,_="shippingMethod",H=Ge().currentUrl.hash===`#${_}`;switch(a){case"PICKUP_POINT":return e(S,{children:[e(F,{sectionId:"pickupPoints",children:e(os,{})}),A]});case"PICK_UP":return e(S,{children:[e(F,{sectionId:"localPickup",children:e(as,{})}),A]});default:return e(F,{sectionId:"shipping",children:[e(he,{accessibilityLabel:i("delivery_options.shipping_address","Shipping address"),children:e(h,{spacing:"base",children:[e(b,{extensions:p}),e(h,{spacing:"large300",children:[e(Qn,{children:e(Zn,{onValid:x,onInvalid:D,children:e(Xn,{children:[e(yt,{}),e(Js,{}),A]})})}),e(b,{extensions:r}),e(h,{spacing:k?"small400":"base",children:[e(me,{id:_,level:c?1:2,autoFocus:H,children:i("shipping.shipping_method_title","Shipping method")}),e(es,{children:[y?e(je,{children:[e(st,{}),e(T,{spacing:"small200"})]}):null,ns("shipping.shipping_method_notice",s)?e(se,{children:i("shipping.shipping_method_notice"," ")}):null,e(b,{extensions:m,options:{groupType:u&&Fe(u),includeDeliverySelectionGroups:!1},render:R}),e(je,{children:[e(ss,{}),e(ts.Preload,{})]}),e(b,{extensions:d,options:{groupType:u&&Fe(u),includeDeliverySelectionGroups:!1},render:R})]})]})]})]})}),o?.refuseDutiesPermitted&&e(he,{accessibilityLabel:i("shipping.duties_and_taxes_title","Duties and taxes"),children:e(h,{spacing:"base",children:[e(me,{level:2,children:i("shipping.duties_and_taxes_title","Duties and taxes")}),e(is,{})]})})]})}}function St({showSmsMarketingOptIn:t=!1}){const s=B(),a=Ue(),{DeliveryHeading:i}=N(),n=C("Checkout::Dynamic::Render","DELIVERY1");return e(Pe,{children:e(h,{children:[e(h,{spacing:"small400",children:[e(i,{}),a&&e(se,{color:"subdued",children:s("shipping.shipping_used_as_billing_notice","This will also be used as your billing address for this order.")})]}),e(rs,{}),e(ls,{children:e(ft,{showSmsMarketingOptIn:t})}),e(b,{extensions:n})]})})}function Pt(){const t=te(),s=t.email.value,a=t.phone.value,i=B(),{isOrderEditCheckout:n}=ae(),o=cs(),[l,c]=Ae(!1),y=g({customerAccount:s&&typeof s=="string"&&o,default:!1}),{VaultedContact:p}=N(),r=g({businessCustomer:!1,shopPay:!1,default:!0}),P=y&&e(at,{email:s,open:l,showPopover:u=>{c(u)}});if(n&&r){const u=s||a;return e(S,{children:[e(ds,{id:"contact",label:i("contact.contact_method_title","Contact"),summary:u?e("p",{children:u}):e(us,{})}),P]})}return e(S,{children:[e(p,{emailAddress:s}),P]})}const Ct="ILN3z",ue={DivideChildren:Ct,"DivideChildren--no-initial-divider":"TiyE2","DivideChildren--no-final-divider":"wyrwY","DivideChildren--final-mobile-divider":"_8S1mj"};function Ne({hideLastDivider:t}){const s=Ce(),{negotiate:a}=Se(),{isOrderEditCheckout:i}=ae(),{shippingRequired:n}=ge(),{shippingRequired:o}=ge(),l=i&&o,{VaultedPayment:c,ReviewNotice:y,VaultedDelivery:p,VaultedBillingAddress:r,VaultedCashRedemption:P}=N(),u=Je(),m=hs(),d=g({guest:!0,default:!1}),k=g({businessCustomer:s.payment,guest:!0,default:!1}),M=g({amazonPay:!0,buyWithPrime:!0,payPal:!0,googlePay:!0,shopPay:!0,default:!1}),f=g({businessCustomer:!0,default:!1}),w=s.delivery&&(n||l&&i),x=g({businessCustomer:!n,default:!1}),D=[...s.contact?[e(Pt,{},"contact")]:[],...w?[e(p,{},"delivery")]:[],...A()];if(ie(()=>{D.length>0&&a({silenceViolations:["all"]})},[]),D.length===0)return null;return e(z,{...{},children:[m?e(tt,{}):null,m&&M?e(ps,{below:"large",children:e(T,{})}):null,u&&e(y,{}),e("div",{className:ms({[ue.DivideChildren]:!0,[ue["DivideChildren--no-final-divider"]]:t||k===!0,[ue["DivideChildren--no-initial-divider"]]:d,[ue["DivideChildren--final-mobile-divider"]]:f}),children:D})]});function A(){if(i)return s.payment?[e(c,{},"payment")]:[];const _=[];return x&&_.push(e(r,{},"businessCustomerBilling")),s.payment&&(_.push(e(c,{},"payment")),_.push(e(P,{},"cashRedemption")),s.billing&&!x&&_.push(e(r,{},"billingAddress"))),_}}function Xe({includeContactAfterExtensions:t}={includeContactAfterExtensions:!1}){const s=Ce(),a=C("Checkout::Contact::RenderAfter"),i=C("Checkout::Dynamic::Render","INFORMATION1"),n=C("Checkout::Dynamic::Render","INFORMATION2"),o=C("Checkout::Dynamic::Render","DELIVERY1"),l=C("Checkout::Dynamic::Render","DELIVERY2"),c=C("Checkout::Dynamic::Render","PAYMENT1"),y=C("Checkout::Dynamic::Render","PAYMENT2"),p=C("Checkout::Dynamic::Render","PAYMENT3");return G(()=>{let r=[];return s.contact&&(r=[...t?a:[],...i,...n]),s.delivery&&(r=[...r,...o,...l]),s.payment&&(r=[...r,...c,...y,...p]),r},[s,t,a,i,n,o,l,c,y,p])}function jt({children:t}){const s=g({shopPay:!0,default:!1}),a=gs("simulated"),{searchParams:i}=ys(),n=a&&!!i.get("shop_pay_sim");return n||s?e(ot,{simulated:n,children:[t,e(He,{})]}):e(S,{children:[t,e(He,{})]})}function He(){const t=fs(),s=te().email.value,{progress:a}=Se(),{shippingRequired:i}=ge(),n=Ce(),[o]=vs(),{postPurchaseEnabled:l}=Ss(),c=B(),y=Ps(),p=Cs(),{isOrderEditCheckout:r}=ae(),{emailMarketing:P,smsMarketing:u}=ve(),m=bs(),d=$e(),k=Je(),M=P!=="OFF",f=ks(),w=we(),x=Ms(),{value:D}=Ye(),R=ye(Ws),A=Qe(),{value:_}=We(),E=!_?.some(ln=>_s.has(ln.code))&&m.hasViolation&&m.lineItems.length>0;mt(),ie(()=>{E&&d("inventoryPriceChange",{element:{tagName:"modal"},timestamp:new Date,visible:!0})},[E,d]);const Y=O(()=>{m.updateProposal()},[m]),W=Ee({base:!0,medium:!1}),v=Ee({base:!1,small:!0}),I=As(),Q=g({guest:I,customerAccount:I,sdkCartHints:I,externalVault:I,default:!1}),Z=C("Checkout::Contact::RenderAfter"),oe=g({shopPay:y&&!!(W&&!v),default:!1}),be=g({shopPay:M,default:M&&n.contact}),ke=g({shopPay:ct,default:S}),q=R&&!Es(D?.countryCode),re=g({businessCustomer:!1,sdkCartHints:!!(M&&n.contact&&s),default:be&&!x&&!q&&!r}),L=g({shopPay:"belowPayment",default:n.payment?"belowPayment":"abovePayment"});let $=g({shopPay:!1,businessCustomer:!1,default:u!=="OFF"});w&&!w.smsMarketingEnabled&&($=!1);const X=i&&!n.delivery?"delivery":n.contact?"root":"contact",le=re&&L==="belowPayment",Me=re&&L==="abovePayment",ee=le&&(W??!1),K=!r&&Me&&!p?.acceptsEmailMarketing,V=!r&&$&&X==="root"&&!p?.acceptsSmsMarketing,ce=g({shopPay:S,sdkCartHints:S,default:Pe}),J=g({guest:n.delivery,businessCustomer:!n.delivery&&n.payment,default:!1}),en=g({guest:J&&!(n.contact&&n.payment),businessCustomer:J,default:!1}),de=n.contact&&!(n.delivery&&n.payment)&&Z.length>0&&(K||V||W)?Z:void 0,{PriceChangeModal:nn,SignUpContact:sn}=N(),{walletPaymentMethods:tn}=qe(),an=Qs(tn),on=ye(qs),Te=Xe({includeContactAfterExtensions:de===void 0}),{main:{section:rn}}=Ds(),j=Is(rn);return e(S,{children:[e(h,{spacing:ne.default("none").when({viewportInlineSize:{min:"extraSmall"}},"large200"),children:[r?e(h,{padding:ne.default(["large200","large200","none","large200"]).when({viewportInlineSize:{min:"extraSmall"}},"none"),children:e(ws,{})}):null,e(xs,{section:"top"}),e(Rs,{onSubmit:()=>a(void 0,{skipToCompletion:k}),children:[e("div",{ref:an,children:e(pe,{hideDivider:n.payment&&!ee,condition:!j,accessibilityLabel:c("contact.contact_method_title","Contact"),children:[Q&&e(S,{children:[e(pe,{condition:j,hideDivider:!0,padding:oe?["none","large200","large200","large200"]:void 0,children:e(h,{spacing:"none",children:e(F,{sectionId:"expressCheckout",children:e(U,{section:"expressCheckout",children:e(Zs,{})})})})}),e(Xs,{})]}),e(pe,{condition:j,padding:!Q&&oe?["none","large200","large200","large200"]:void 0,accessibilityLabel:c("contact.contact_method_title","Contact"),children:e(h,{spacing:"none",children:[!n.contact&&e(fe,{section:"contact",children:e(U,{section:"contact",children:e(gt,{showSmsMarketingOptIn:!r&&$&&X==="contact"})})}),!J&&e(Ne,{hideLastDivider:j}),f&&e(Ze,{variant:"minimal"}),!j&&e(U,{section:"contact",children:e(De,{renderAsVaulted:!0,showMarketingDisclosure:K||ee,showSmsMarketingOptIn:V&&L!=="belowPayment",afterContactExtensions:de})})]})})]})}),e(sn,{}),j&&e(U,{section:"contact",children:e(De,{showMarketingDisclosure:K,showSmsMarketingOptIn:V&&L!=="belowPayment",afterContactExtensions:de})}),en&&i&&e(Vs,{condition:J,accessibilityLabel:c("shipping.delivery_title","Delivery"),children:e(Ne,{hideLastDivider:j})}),!A&&Te.length?e(Ie,{extensions:Te,hideDivider:"whenEmpty"}):null,!n.delivery&&i&&e(xe,{target:"cart.deliveryGroups[0].deliveryAddress",children:e(fe,{section:"delivery",children:e(U,{section:"delivery",children:e(F,{sectionId:"delivery",children:e(St,{showSmsMarketingOptIn:!r&&$&&X==="delivery"})})})})}),t&&e(bt,{showVaultedStateMarketingDisclosureBelowPayment:le,showVaultedStateMarketingDisclosureOnMobile:ee,showPartialVaultedStateSmsMarketingOptIn:V&&L==="belowPayment",isSectionCustomized:j,VaultedStateMarketingDisclosureWrapper:ce,includeContactAfterExtensions:de===void 0})]},o),l&&e(Ts,{})]}),e(Os,{}),E&&e(nn,{loading:m.loading,lineItems:m.lineItems,onClose:Y}),i&&e(pt,{}),on&&e(ke,{}),e(et,{id:"OnePage"})]})}function bt({showVaultedStateMarketingDisclosureBelowPayment:t,showVaultedStateMarketingDisclosureOnMobile:s,isSectionCustomized:a,VaultedStateMarketingDisclosureWrapper:i,showPartialVaultedStateSmsMarketingOptIn:n,includeContactAfterExtensions:o}){const l=B(),c=Ce(),y=Qe(),p=Bs(),r=Ls(),{acceptTipPayments:P}=ve(),{currentDetour:u}=js(),m=ye($s),d=Fs(),k=g({shopPay:!c.payment,default:!1}),{isOrderEditCheckout:M}=ae(),f=Ee({base:!0,medium:!1}),w=te().localizationExtensions.value,x=w.length>0,D=ne.default("block").when({viewportInlineSize:{min:"medium"}},"none"),R=ne.default("none").when({viewportInlineSize:{min:"medium"}},"block"),A=ne.default("none").when({viewportInlineSize:{min:"small"}},"block"),{shopifyInstallments:_}=ze(),{setChatHideTriggerNode:H}=Ns(),E=O(V=>{H(f&&V?V:null)},[f,H]),Y=t&&!f,v=we()?.tippingPaymentAllowed??!0,I=c.payment&&P&&v,Q=g({shopPay:I&&!_(),default:I}),Z=Hs().isPartner(),oe=G(()=>m&&u?.type==="thankYou"?"Checkout::ThankYou::Dynamic::Render":"Checkout::Dynamic::Render",[u?.type,m]),be=C(oe,"ORDER_SUMMARY4"),ke=!!d.value,q=Xe({includeContactAfterExtensions:o}),re=zs(),{Tips:L,Rewards:Re,CashRedemption:$,Captcha:Ve,MarketingDisclosure:X,BillingSection:le,PurchaseOptionsAgreement:Me,MobileOrderSummary:ee,CheckoutAsGuest:K}=N();return e(S,{children:e(_e,{min:"medium",accessibilityLabel:l("payment.title","Payment"),hideDivider:!0,children:[re?e(Us,{}):null,!c.payment&&e(fe,{section:"payment",children:e(U,{section:"payment",children:e(_e,{max:"medium",accessibilityLabel:l("payment.title","Payment"),children:e(dt,{})})})}),!c.payment&&e($,{}),x&&e(Pe,{accessibilityLabel:l("localized_fields.additional_information.title","Additional information"),children:e(h,{padding:f?"none":["large400","none","none","none"],children:[e(me,{level:2,children:l("localized_fields.additional_information.title","Additional information")}),w.map((V,ce)=>{const J=`${V.value.key}${ce}`;return e(nt,{localizationExtension:V,index:ce},J)})]})}),s&&a&&e(i,{children:e(X,{})}),!M&&Q&&e(z,{display:D,children:e(F,{sectionId:"tips",children:e(L,{renderInSection:f})})}),f&&y&&q.length?e(Ie,{extensions:q}):null,e(fe,{section:"summary",children:e(U,{section:"summary",children:e("div",{ref:E,children:[e(_e,{max:"medium",hideDivider:!0,children:[e(ee,{}),e(h,{spacing:"large400",children:[e(h,{spacing:"base",children:[Y&&k&&e(h,{spacing:"none",children:[e(T,{spacing:"base"}),e(Gs,{})]}),e(De,{renderAsVaulted:!0,showMarketingDisclosure:Y,showSmsMarketingOptIn:n,children:e(le,{})}),!M&&Q&&e(z,{display:R,children:e(F,{sectionId:"tips",children:e(L,{})})}),!f&&y&&q.length?e(Ie,{extensions:q}):null,ke&&e(h,{padding:f?"none":["large400","none","none","none"],children:e(Ys,{textProps:{color:"subdued",size:"small"}})})]}),e(h,{spacing:"large200",children:[r&&e(Ve,{}),e(it,{}),p&&e(Me,{}),f&&e(b,{extensions:be,spacing:"large200"})]})]}),e(Re,{}),!Z&&e(S,{children:[e(T,{spacing:"large100"}),e(z,{inlineAlignment:"center",children:e(K,{})}),e(z,{display:A,children:e(T,{spacing:"base"})})]})]}),Z&&e(S,{children:[e(T,{spacing:"large100"}),e(z,{inlineAlignment:"center",children:e(K,{})}),e(T,{spacing:"base"})]})]})})})]})})}function De({showMarketingDisclosure:t,showSmsMarketingOptIn:s,afterContactExtensions:a,renderAsVaulted:i,children:n}){const{MarketingDisclosure:o}=N();return!t&&!s&&!a?n:e(xe,{target:"cart.buyerIdentity",children:e(pe,{condition:!i,children:e(h,{spacing:i?"base":void 0,padding:i?["base","none","none","none"]:void 0,children:[(t||s)&&e(h,{spacing:t&&s?"base":"none",children:[t&&e(o,{}),s&&e(Ke,{})]}),a&&e(b,{extensions:a}),n]})})})}function Ie({extensions:t,hideDivider:s="always"}){return e(Pe,{hideDivider:s,children:e(b,{spacing:"base",extensions:t})})}export{He as OnePageContent,De as PartialVaultedMarketingConsentMarkup,Ie as VaultedExtensionsSection,jt as default};