PageSourceSearch

https://store.afikra.com/cdn/shopifycloud/checkout-web/assets/c1/OnePage.JtsOe4gf.js

js afikra.com collected 2026-09-24 09:22:04 UTC 171,800 bytes, 2 lines download raw bytes

1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["component-VaultedRollupContents.DVc1pBpt.js","esnext-vendor.D7ldIee_.js","hydrate.ByRIsqvd.js","addresses-is-address-empty.-MuOhIyI.js","app.A60-IfPs.js","assets/app.Sxsz5knT.css","assets/is-address-empty.DJksNKpk.css","constants.DowbVE6J.js","hooks-useReplaceShopPayInHistory.Cz4PqGkk.js","assets/previous.ClThmeCv.css","useAddressMutationsWithNegotiation.Bu1iJp6d.js","PaymentIcon.Ddd-WnG2.js","assets/PaymentIcon.gzvCNwz_.css","PaymentLine.DhO8cHCS.js","hooks-useUnauthenticatedErrorModal.CzvtLqeY.js","localization-index.DBksi22x.js","assets/index.BAKORI_U.css","Theme-ThemeOverride.4AonMthy.js","assets/PaymentLine.D3bcP-mr.css","IncentiveBadge.D66zssvS.js","Choice.Dywz6_Fr.js","Checkbox.Cby2hWUV.js","assets/Checkbox.SrYMuQu4.css","assets/Choice.aPApdPe_.css","assets/IncentiveBadge.Dlnp55te.css","hooks-useUpdateCheckoutAddress.4zyjtqEx.js","utilities-shopCashMoney.B9eyOzz9.js","payment-usePaymentExemptionReason.Q4GfCwuW.js","shop-pay-ProgressIntercepts.wTCQvlrM.js","shop-pay-normalizeBuyerDetails.BcEhgoK7.js","context-CheckoutSheetProtocolClient.CNLSBD5p.js","hooks-useShopPayProgressIntercepts.CnlV9rdf.js","assets/useShopPayProgressIntercepts.CIy8uDiZ.css","checkout-updaters-helpers.DKDxNKY0.js","Popover.BNecjV8x.js","assets/Popover.Bi1nHaU-.css","assets/useAddressMutationsWithNegotiation.BcTJoNaV.css","KnownBuyerPaymentMethodSelector.pZHguwcE.js","components-PaymentMethodProgressionHost.BgOpCmhs.js","Section.DIJn7eYY.js","assets/Section.CU18S7Ap.css","ImpressionEventCapture.CIEEzh6Z.js","ChangeCompanyLocationLink.Ba8IeUdU.js","BillingAddressForm.DHpCPcqC.js","hooks-useSuppressShopPayModalOnLoad.CI5bzdLE.js","PhoneField.BapDvZfY.js","assets/PhoneField.uZEuHncj.css","hooks-useCanChangeCompanyLocation.Bk004VMP.js","assets/BillingAddressForm.BdwN7V1K.css","hooks-useGeneralPaymentErrorMessage.CXe06B2R.js","assets/PaymentMethodProgressionHost.C8No5WOn.css","hooks-usePaypalRowEffects.DBASzAIo.js","components-RedirectionNotice.module.CqgkZHXB.js","assets/RedirectionNotice.B8v_QGNW.css","assets/KnownBuyerPaymentMethodSelector.BXqN6ZOx.css","PaymentOptionSelector.LuuQe4at.js","BillingAddressSelector.CyVrY0kP.js","components-DeliveryTransition.BjmsXjx9.js","useShopPayButtonClassName.DeL41vx0.js","shared-shop-theme.BJKdwdMa.js","hooks-useShouldRevealCustomization.C_GYHzzt.js","assets/useShopPayButtonClassName.CpHF4L7Q.css","models-ShopPayBuyerDetails.model.CahX79UU.js","hooks-useForceShopPayUrl.MIxsBkT_.js","ShopPayLogo.Dh-KQvuu.js","hooks-useWalletsTimeout.DIL_pXhM.js","Monorail-monorailMetric-wallets.C3kHkAxp.js","shop-pay-installments-monorail.cv2DVyY3.js","MarketsProDisclaimer.wV7aMZTc.js","shipping-methods-grouping.DDWlTvqo.js","Section-SectionStyleOverride.Dli5IR65.js","TransitionHeight.C0wKTnZA.js","assets/TransitionHeight.CuRoM9zv.css","AutocompleteField-hooks.YzxHOgXJ.js","PendingShipping.TwutGJMj.js","assets/DeliveryTransition.CyFbfl4F.css","hooks-useStableHostMethodsReferences.C4W1cetV.js","assets/PaymentOptionSelector.s-Kd_X2E.css","MerchandiseModal.QhgBWo-v.js","EstimatedDeliveryContent.P3UYo-F2.js","ShippingMethodRateLabel.DfFHFGoZ.js","assets/EstimatedDeliveryContent.B_THySFF.css","StickyPayButton-StickyPayButton.module.DrkNxyTx.js","Switch.aKF4dNrP.js","assets/Switch.BS8yVgoP.css","graphql-PaymentSessionMutation.CK_JkOwG.js","hooks-payment-button.D5UAY6lK.js","assets/StickyPayButton.CPXhWoNv.css","PaymentErrorBanner.BNtKSHks.js","hooks-usePreselectSpi.B308gMMr.js","hooks-useAvailableShopPromotionDiscounts.DRFdQEEP.js","mobile-checkout-sdk-MobileCheckoutSdkClient.CVSnUTrf.js","Middot.BwhErQgI.js","shipping-methods-consolidated-included.CmQthVU7.js","assets/Middot.D7Ujmshx.css","ShippingLines.C3cNVVcP.js","ShipmentBreakdown.BCHd0lNF.js","ShippingMethodSelector.KipCTTDv.js","TextArea.wcLwM1i3.js","assets/ShippingMethodSelector.B0hio2RO.css","SubscriptionPriceBreakdown.0rp4tSej.js","assets/SubscriptionPriceBreakdown.vTcdVGq4.css","assets/ShippingLines.LcqrKXE1.css","StockProblems-StockProblemsLineItemList.Di56mnXD.js","VaultedContactAvatar.DYsvthUN.js","assets/VaultedContactAvatar.BF3cX_zA.css","component-ShippingGroupsSummary.iA7pWsCc.js","page-BelowTheFoldContent.pNE1V8do.js","Captcha.BbYqxwBL.js","ShopPayCaptcha.DpdjijF2.js","assets/Captcha.CJQgLR0i.css","RememberMeSection.BOf68zmB.js","stopwatch.wWgdKLTI.js","assets/RememberMeSection.JBO5WNhc.css","component-MobileOrderSummary.B6nUs1j_.js","styles-floating-layer.module.CcHB2ksN.js","assets/floating-layer.DfWUBaTh.css","assets/MobileOrderSummary.2B5x30PG.css","PayButtonSection.Dud2wYv0.js","PaymentButtons.ey0T5OXw.js","hooks-useHasOrdersFromMultipleShops.PKFq4ktR.js","apple-pay-errors.CcNuwNMC.js","assets/PaymentButtons.BwQxlzN-.css","utils-useViolationsHandler.BKoPz2bB.js","assets/PayButtonSection.Bi0nhBOp.css","assets/BelowTheFoldContent.CmuzzmSI.css"])))=>i.map(i=>d[i]);
2import{_ as Yt,g as Xs}from"./app.A60-IfPs.js";import{u as t,f as h,i as T,S as G,X as Ur,d as jt,x as Mt,h as D,T as se,y as zr,o as Gr,r as Kt,q as V,A as $,p as Ae,G as ht,l as J,e as ye,k as mt,n as Et,g as Js,c as Wr,_ as An,a as Yr,Q as qt}from"./esnext-vendor.D7ldIee_.js";import{n as we,bP as En,f0 as jr,e$ as Kr,a2 as qr,L as Me,hR as $r,c as ga,dw as fa,al as oe,B as q,l as O,k as b,D as Ne,i as Rn,dn as Qs,dj as Xr,hS as Jr,s as ee,bM as Fe,bU as Qr,ed as Ca,bV as ue,a as Zs,dr as Ot,I as xe,hf as _a,go as Sa,P as pe,G as tt,S as Zr,b9 as el,hT as tl,bT as eo,fd as 
2nl,bR as al,bQ as sl,de as ba,dY as ol,b8 as il,cH as Rt,hO as Pa,b as He,u as Dt,bp as to,_ as Aa,d as _e,W as It,hU as no,aF as rl,cl as $t,hV as ao,dW as so,aG as ll,f as cl,hW as dl,fl as ul,ak as Ea,hP as pl,bN as Ra,cs as hl,hX as ml,hY as yl,hZ as vl,cp as gl,h1 as fl,dV as Cl,h_ as _l,eR as Sl,h$ as bl,bn as Pl,i0 as Al,hc as oo,fj as io,bf as ps,ce as El,ei as Rl,dG as ro,aE as Il,c6 as kl,i1 as Ll,i2 as Ml,cI as Ol,dz as lo,dC as Ia,du as Dl,dx as Tl,by as wl,i3 as co,dA as ka,dB as uo,U as Pe,h5 as po,et as pn,bg as Nl,eB as Vl,aD as Bl,aA as ho,i4 as Fl,bm as mo,cg as je,i5 as La,f1 as xl,i6 as yo,c2 as Hl,dT as Ul,ej as zl,i7 as Gl,em as vo,el as Xt,i8 as go,i9 as fo,h7 as Wl,X as Yl,ai as Co,bt as jl,bG as Ma,ia as Kl,aZ as ql,ch as $l,ib as Xl,cf as Jl,eq as Ql,bC as Zl,b_ as ec,bH as _o,cQ as tc,en as nc,ay as ac,cR as fn,$ as Qn,a9 as sc,ba as oc,eF as ic,a1 as rc,ea as lc,ic as cc,a0 as hs,dX as dc,hD as Zn,id as uc,O as ea,Q as xt}from"./hydrate.ByRIsqvd.js";import{N as y,dB as pc,ab as Jt,ap as Oa,Y as So,aj as bo,ds as hc,O as Z,ki as Po,cs as mc,ci as yc,co as vc,ac as Da,kj as gc,$ as j,h as fc,iv as Ao,b_ as Eo,iu as Cc,b4 as _c,aS as Qt,it as Sc,jJ as pt,_ as Ta,aC as Ue,ch as Ro,kk as bc,kl as Cn,g_ as Io,cv as wa,ba as Pc,br as Ac,W as Ec,V as Rc,dr as Ut,km as Ic,b2 as et,am as ze,an as at,t as la,h6 as Zt,jZ as In,bx as st,g0 as ms,ak as Sn,jn as kc,j as ys,g4 as Na,a0 as ot,kn as Lc,d_ as Mc,bb as Ge,k5 as Oc,ko as Dc,fW as Tc,av as wc,cR as bn,f4 as ko,K as Nc,fD as Vc,kp as Lo,f2 as Mo,dN as Bc,eP as Fc,jX as kt,cQ as xc,kq as en,dO as Hc,kr as tn,ks as Oo,jD as Uc,kt as Do,ah as zc,d as ca,bl as Gc,cE as Wc,es as To,ku as wo,cC as Yc,kv as jc,fX as Kc,kw as No,kx as Vo,ky as qc,h7 as $c,M as Va,hj as Bo,E as Xc,k6 as Jc,kz as Qc,fh as Zc,fg as ed,dp as td,dC as Ba,dD as nd,dE as Fo,bz as xo,fB as hn,ga as vs,bI as Ho,aW as Uo,kA as ad,di as zo,aA as sd,n as od,dg as id,kB as rd,da as Go,jz as ld,kC as cd,kD as dd,kE as ud,kF as pd,kG as hd,kH as md,dd as _n,kI as yd,jw as Wo,kJ as Yo,dF as vd,cK as gd,kK as fd,kL as Cd,kM as Fa,aG as _d,gT as Sd,gU as bd,kN as Pd,kO as Ad,kP as Ed,kQ as Rd,g8 as jo,bV as Id,jl as kd,jm as Ld,gc as Md,f5 as Od,kR as Dd,kS as Td,aF as wd,af as Nd,jq as Vd}from"./addresses-is-address-empty.-MuOhIyI.js";import{t as Bd,C as Ko,v as Fd,w as qo,U as xa,j as $o,x as Xo,y as xd,S as Hd,z as Ud,B as da,F as zd,G as Jo,H as Gd,g as Ha,J as Wd,K as Yd,M as jd,N as Kd,O as qd,Q as $d,R as Xd,f as kn,h as Ua,i as Qo,D as Zo,a as Jd,I as Qd,T as Zd,W as eu,X as tu,Y as nu,u as za,Z as au,P as ei,k as su,l as ou,m as iu,e as ru,V as lu,o as cu,E as du,n as uu}from"./components-DeliveryTransition.BjmsXjx9.js";import{j as pu,D as hu,a as mu,u as yu,s as vu,c as gu,d as fu,k as Cu,b as _u,H as Su}from"./StickyPayButton-StickyPayButton.module.DrkNxyTx.js";import{_ as bu,Y as Pu,N as Lt,Z as Au,h as nn,$ as Ln,a0 as Eu,i as Mn,j as Ru,G as Iu,S as ti,b as ni,a1 as gs,a2 as ku,a3 as Lu,a4 as ta,a5 as na,c as ai,q as Mu,x as Ou,z as Du,s as Tu,t as wu,v as fs,B as Nu,w as Vu,C as Bu,V as Fu,a6 as xu,d as Hu,u as Uu,k as si,l as oi,M as zu,m as Gu,T as Wu,e as Yu}from"./useAddressMutationsWithNegotiation.Bu1iJp6d.js";import{M as zt,S as On,r as Gt,c as ju,a as Ku}from"./Section.DIJn7eYY.js";import{S as aa,M as sa}from"./Section-SectionStyleOverride.Dli5IR65.js";import{R as re,P as ii,C as ua}from"./PaymentLine.DhO8cHCS.js";import{A as qu,C as ri,S as $u}from"./ChangeCompanyLocationLink.Ba8IeUdU.js";import{E as li,u as ci,a as Xu,P as Ju,b as Qu}from"./PaymentErrorBanner.BNtKSHks.js";import{E as Zu}from"./graphql-PaymentSessionMutation.CK_JkOwG.js";import{u as Pn,a as ep}from"./hooks-useShouldRevealCustomization.C_GYHzzt.js";import{d as tp,a as Cs}from"./hooks-useGeneralPaymentErrorMessage.CXe06B2R.js";import{P as ke}from"./PaymentIcon.Ddd-WnG2.js";import{O as np,W as an,b as ap,a as sp}from"./hooks-useShopPayProgressIntercepts.CnlV9rdf.js";import{a as op,C as Wt,b as ip}from"./Choice.Dywz6_Fr.js";import{a as rp,c as Ga,u as lp,b as cp}from"./payment-usePaymentExemptionReason.Q4GfCwuW.js";import{I as dp,C as di,b as up,E as pp}from"./IncentiveBadge.D66zssvS.js";import{U as _s}from"./constants.DowbVE6J.js";import{B as hp,A as mp}from"./BillingAddressForm.DHpCPcqC.js";import{g as Ht,j as yp,k as vp,l as gp,v as Ss}from"./shop-pay-ProgressIntercepts.wTCQvlrM.js";import{b as bs,f as ui,S as Wa,d as fp,e as Cp}from"./utilities-shopCashMoney.B9eyOzz9.js";import{a as _p,c as Sp,u as Ya,b as bp}from"./hooks-usePreselectSpi.B308gMMr.js";import{T as pa}from"./Theme-ThemeOverride.4AonMthy.js";import{S as Pp}from"./Switch.aKF4dNrP.js";import{u as pi,a as Tt,b as hi,g as Ap,r as Ep,d as Rp,i as Ip,h as ja,e as mi}from"./hooks-useAvailableShopPromotionDiscounts.DRFdQEEP.js";import{c as yi,u as Ka}from"./hooks-useCanChangeCompanyLocation.Bk004VMP.js";import{C as kp}from"./checkout-updaters-helpers.DKDxNKY0.js";import{v as Ps,a as Lp,b as As,S as Mp}from"./useShopPayButtonClassName.DeL41vx0.js";import{S as vi}from"./ShopPayLogo.Dh-KQvuu.js";import{S as Op}from"./shared-shop-theme.BJKdwdMa.js";import{S as Dp}from"./mobile-checkout-sdk-MobileCheckoutSdkClient.CVSnUTrf.js";import{b as Tp}from"./hooks-useReplaceShopPayInHistory.Cz4PqGkk.js";import{P as wp}from"./PhoneField.BapDvZfY.js";import{u as gi,I as Np}
2from"./hooks-useUnauthenticatedErrorModal.CzvtLqeY.js";import{I as qa}from"./ImpressionEventCapture.CIEEzh6Z.js";import{u as fi}from"./shipping-methods-grouping.DDWlTvqo.js";import{V as Vp,M as Bp,u as Fp,a as xp,S as Hp,R as Up,b as zp}from"./Middot.BwhErQgI.js";import{D as Ci,u as _i,S as Gp}from"./ShippingLines.C3cNVVcP.js";import{g as Es}from"./shop-pay-installments-monorail.cv2DVyY3.js";import{S as Rs}from"./context-CheckoutSheetProtocolClient.CNLSBD5p.js";import{M as Wp,c as Si,u as bi,b as Yp}from"./MerchandiseModal.QhgBWo-v.js";import{S as ha}from"./ShippingMethodRateLabel.DfFHFGoZ.js";import{u as Pi,S as Ai,E as ma}from"./EstimatedDeliveryContent.P3UYo-F2.js";import{C as jp,F as Kp,h as qp}from"./localization-index.DBksi22x.js";import{c as $p}from"./components-RedirectionNotice.module.CqgkZHXB.js";import{f as Ei,i as Xp}from"./hooks-useWalletsTimeout.DIL_pXhM.js";import{S as Jp}from"./StockProblems-StockProblemsLineItemList.Di56mnXD.js";import{T as Is}from"./TransitionHeight.C0wKTnZA.js";import{D as Qp}from"./PendingShipping.TwutGJMj.js";import{S as Zp}from"./ShipmentBreakdown.BCHd0lNF.js";function eh(){const{i18n:e}=y();return t(we,{level:1,children:e.translate("embed.header.review_order")})}function th(){const{hasError:e}=En(pc),n=jr(),{i18n:a,observability:s}=y(),o=a.translate("review.blocks.change_link_label"),i=Kr(n.value?.method?.walletParams)?.checkout_session_id,{inMemoryAmazonPayParts:{hasPaymentSheetError:r,sdkStatus:c}}=Jt(),d=h(()=>{const l=c.value;return l.status===qr.Available?l.sdk:void 0});return n.value?t(T,{when:d,children:l=>t(Me,{onClick:()=>{try{l.buywithprime.changePaymentMethod({amazonPayOptions:{amazonCheckoutSessionId:i,isDeclined:e}})}catch(u){r.value=!0,s.error(new $r(`Error on changing buyer payment method. Details: ${u}`,{cause:u}))}},children:o})}):null}function nh(){const e=y(),{i18n:n}=e,a=sh(e);return t(G,{children:[a.sdkButton,t(re,{id:a.rollupId,label:n.translate("payment.title"),primaryContent:t(ah,{}),primaryAction:a.changeLink})]})}function ah(){const{brand:e,descriptor:n}=Pu().value,a=ga(),s=So(),o=fa();return a.value?s.value?t(Lt,{vaulted:!0,reason:"giftCard"}):!n||!o.value?t(oe,{}):t(Au,{brand:e,descriptor:n}):t(Lt,{vaulted:!0,reason:"freeOrder"})}function sh({checkout:e}){return e.identity.current.value==="buyWithPrime"?{rollupId:"buyWithPrimePayDetails",sdkButton:t(Bd,{wallet:Oa.BuyWithPrime,isSdkOnly:!0}),changeLink:t(th,{})}:{rollupId:"amazonPayDetails",sdkButton:t(qu,{isSdkOnly:!0}),changeLink:t(bu,{})}}function oh({displayName:e,load:n,loadingLabel:a}){function s(o){const{observability:i}=y(),r=Mt(Dn);bo({active:!!o}),D(()=>{if(o)return i.error(o,{metadata:{vaulted:{component:e,failure:"lazy_load",boundary:r?"present":"missing"}}}),r?.register()},[o,i,r])}return jt({displayName:e,load:n,suspense:!1,renderLoading:()=>t(ih,{label:a}),useError:s})}function ih({label:e}){const{i18n:n}=y();return bo(),t(G,{children:[t(q,{accessibilityRole:"status",children:t(O,{accessibilityVisibility:"exclusive",children:n.translate("vaulted.loading_section",{section:e(n)})})}),t(b,{gap:"small-300",children:[t(oe,{inlineSize:"large"}),t(oe,{inlineSize:"large"}),t(oe,{inlineSize:"small"})]})]})}class rh{#e=zr(0);#t=Gr(()=>this.#e.value>0);get hasFailures(){return this.#t}register(){return this.#e.value+=1,()=>{this.#e.value-=1}}}const Dn=Ur(null);function lh({children:e}){const n=se(()=>new rh,[]);return t(Dn.Provider,{value:n,children:e})}function ch(){const{i18n:e}=y(),n=Mt(Dn);return n?t(T,{when:()=>n.hasFailures.value,children:t(q,{paddingBlockEnd:"base",children:t(li,{bannerId:"VaultedRollupContentsLoadError",errorType:Ne.CheckoutError,heading:e.translate("error_page.terminal.title"),tone:"critical",autoFocus:!0,iconHidden:!0,children:t(b,{gap:"small-400",alignItems:"start",children:[t(O,{children:e.translate("error_page.terminal.message")}),t(Rn,{variant:"plain",onClick:()=>globalThis.location.reload(),children:e.translate("error_page.terminal.action.cta")})]})})})}):null}function dh({children:e}){const a=Mt(Dn)?.hasFailures.value??!1;return t(q,{inert:a,opacity:a?50:void 0,children:e})}const uh=()=>Yt(()=>import("./component-VaultedRollupContents.DVc1pBpt.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103]));function Ri(){return Kt(uh)}function wt(e,n,a){return oh({displayName:e,loadingLabel:n,load:async()=>a((await Ri()).vaultedRollupContents)})}const ph=wt("DefaultVaultedPaymentRollupContent",e=>e.translate("payment.title"),e=>e.DefaultVaultedPaymentRollupContent),hh=wt("VaultedShippingMethodsRollupContent",e=>e.translate("shipping.title"),e=>e.VaultedShippingMethodsRollupContent),mh=wt("VaultedBillingAddressRollupContent",e=>e.translate("billing.billing_address_title"),e=>e.VaultedBillingAddressRollupContent),yh=wt("DefaultVaultedDeliveryAddressRollupContent",e=>e.translate("shipping.shipping_address_title"),e=>e.DefaultVaultedDeliveryAddressRollupContent),vh=wt("VaultedLocalPickupOptionsRollupContent",e=>e.translate("local_pickup.title"),e=>e.VaultedLocalPickupOptionsRollupContent),gh=wt("VaultedPaymentOptionsRollupContent",e=>e.translate("payment.payment_option.title"),e=>e.VaultedPaymentOptionsRollupContent);function fh(e){D(()=>{e&&Ri().catch(()=>{})},[e])}const Ch={id:"c2d32a41854d2b88c435b1a8710244c3357bc9533fc69142a72d00b75acac5a8",type:"mutation",name:"ExperimentExposed",source:"mutation ExperimentExposed($experiments:[String!]!){experimentExposed(experiments:$experiments){userErrors{field message __typename}__typename}}"},_h=()=>{const{graphql:{shopPayGraphql:e}}=y();return{recordExposure:V(async a=>{await e.mutate(Ch,{variables:{experiments:[a]}})},[e])}};function Sh(){const{shop:e,checkout:n,shopPay:a}=y(),s=e.hasFlagEnabled(hc),o=Qs(),{recordExposure:i}=_h(),r=$(!1),c=a.installments.isServiceAvailable.value,d=a.user.installments.isRetryable.value,l=o!==null,p=n.installments.isUnavailable.value,u=n.installments.config.value?.supportedCountries,m=se(()=>!l||!c||p&&!d,[l,c,p,d]);D(()=>{!s&&u?.includes("GB")&&n.installments.isSupported.value&&!m&&!r.current&&(i(Zu.handle),r.current=!0)},[s,u,m,n.installments.isSupported.value,i])}function ks(e,n){const a=new Set(n.map(s=>s.id));return e.some(s=>a.has(s.id))}function $a(e,n){const a=Xr();return Ae(()=>{n&&ks(a.blockingExtensions.value,e)&&ht(()=>n())}),ks(a.blockingExtensions.value,e)}function bh(){const{generalPaymentError:e,generalPaymentErrorCode:n}=Z(),{violations:a}=Jr(Po);return h(()=>e.value?!mc(n.value)||a.value.size>0:!1)}function kf({showTips:e,billingFormPosition:n}){const a=ee("Checkout::Dynamic::Render","PAYMENT1"),s=ee("Checkout::Dynamic::Render","PAYMENT2"),o=ee("Checkout::Dynamic::Render","PAYMENT3"),i=n==="inContext"||n==="hidden"||n==="afterPayment"&&e?[[],a,s]:[s,a];return(e||n==="afterPayment")&&i.push(o),i}function Ph({clearReceiptErrorOnPaymentLineChange:e=!0}={}){const{hasViolations:n}=Fe(new Set([...yc,"PAYMENTS_PHONE_NUMBER_DOES_NOT_MATCH_EXPECTED_PATTERN"])),{hasError:a,clearError:s}=En(vc),{lastJourneyProgression:o}=Da(),i=o.value.type==="failed"&&o.value.negotiationStage==="completion",r=bh(),c=
2Qr();gc(()=>{e&&s()});const d=a&&!c,l=r.value;return{hasAnyPaymentError:n||d||i||l,errors:{hasExpiryViolation:n,hasReceiptPaymentFailure:a,hasReceiptPaymentError:d,hasSubmitCompletionFailure:i,hasGeneralPaymentError:l},clearReceiptError:s}}function Tn(e,n){return e.currentUrl.value.hash===`#${n}`}function Nt(e,n=!1){const{router:a}=y(),s=J(e),o=h(()=>Tn(a,s.value)),i=ye(n);return D(()=>{o.peek()&&(i.value=!0)},[o,i]),i}function Xa({autoOpen:e=!0,isMissing:n,open:a}){D(()=>{e&&n&&(a.value=!0)},[e,n,a]);const{shopPay:{progressInterceptor:s}}=y();D(()=>{if(n)return s.listenResult(o=>{o||(a.value=!0)})},[s,n,a])}function Ii(){const{loading:e}=Ca(),{checkout:n}=y(),a=n.isShippingRequired.value,s=Z().shippingAddress.value,{shippingAddress:o,deliveryNext:i}=j(),r=o.value,c=fc(i.value),d=s?.countryCode===r?.countryCode,l=!a||!e&&(c||d),p=ye(l);return l&&!p.value&&(p.value=!0),p}function Ah(e){const{useStoreCreditForSubscriptionRenewals:n}=Z(),{loading:a}=Ca(),s=J(e),o=J(a),i=Ao(),r=Eo(),{showStoreCreditForSubscriptionRenewals:c}=Ja();Ae(()=>{const d=s.value,l=o.value,p=c.value,u=i.value,m=r.value;d&&!l&&(!p||u||m)&&ht(()=>{n.value&&(n.value=!1)})})}function Ja(){const{shop:e}=y(),n=e.hasFlagEnabled(Cc),a=nn(),s=_c(),o=Qt(),i=Sc(),{loading:r}=Ca(),c=J(r),d=Ln(a),l=Ii(),p=h(()=>{const v=a.value;if(!(!i.value||!v||v.balance.amount<=0)){if(d.value)return Eu({firstOrderTotal:s.value,storeCreditAccount:v});if(o.value?.amount===0&&s.value?.currencyCode===v.balance.currencyCode)return v.balance}}),u=Mn(a),m=h(()=>{const v=l.value,C=!c.value,f=u.value,g=p.value!=null;return n&&v&&C&&f&&g});return{storeCreditBalanceForSubscriptionRenewals:p,showStoreCreditForSubscriptionRenewals:m}}function Eh(){const{i18n:e}=y(),{paymentLines:n}=Z(),{violations:a}=ue(Po),{message:s,tone:o}=ci(),i=[...a][0],r=i&&(i.localizedMessage||i.nonLocalizedMessage),c=n.value.find(m=>m.method.type!=="giftCard"&&m.method.type!=="redeemable")?.method,d=c?.type==="customOnsite"?c:void 0,l=d?e.translate("payment_errors.local_payment_method_unavailable",{payment_method:d.name}):void 0,p=!!s&&(o==="critical"||o==="warning"),u=r&&l&&p?`${l}. ${r}`:void 0;return D(()=>
2{if(u)return Zs({content:u})},[u]),!r||!d?null:t(li,{errorType:Ne.PaymentError,bannerId:"LocalPaymentMethodUnavailableBanner",tone:"warning",heading:l,autoFocus:!p,children:r})}function Rh({openRedeemablesModal:e,includeStoreCredit:n=!0}){const{i18n:a}=y(),s=Ru(),{paymentLines:o}=Ot(),i=n&&s.value.length>0,r=o.length>0,c=[...n?s.value:[],...o];if(!c.length)return null;let d="";return r&&i?d=a.translate("payment.gift_card_store_credit.manage_label"):r?d=a.translate("payment.gift_card_wrapper.manage_label"):d=a.translate("payment.store_credit.manage_label"),t(b,{children:[t(b,{gap:"small-200",padding:"small-100",border:"base",borderRadius:"base base none none",children:c.map(l=>t(Ih,{paymentLine:l},pt(l.method)))}),t(q,{inlineAlignment:"start",padding:"small-200",borderWidth:"none base base base",borderRadius:"none none base base",children:t(Me,{onClick:e,textDecoration:"none",children:t(b,{direction:"inline",alignItems:"center",gap:"small-200",children:[t(xe,{type:"edit"}),t(O,{children:d})]})})})]})}function Ih({paymentLine:e}){const{i18n:n}=y();switch(e.method.redemptionSource){case"STORE_CREDIT":return t(tt,{gridAutoFlow:"column",gridAutoColumns:"minmax(0, 1fr)",gridTemplateColumns:"minmax(0, 1fr)",gridTemplateRows:"minmax(0, 1fr)",children:[t(b,{direction:"inline",alignItems:"center",gap:"small-100",children:[t(ke,{type:"store-credit"}),t(O,{children:n.translate("payment.store_credit.label")})]}),t(pe,{textAlign:"end",children:t(O,{type:"strong",children:e.cost&&n.formatCurrency(e.cost.amount,{form:"short",currency:e.cost.currencyCode})})})]});case"CUSTOM":{const a=e.method.redemptionContent,s=_a(a);return t(tt,{gridAutoFlow:"column",gridTemplateColumns:"minmax(0, 70%) minmax(0, 30%)",gridTemplateRows:"minmax(0, 1fr)",children:[t(b,{direction:"inline",alignItems:"center",gap:"small-100",children:[t(ke,{type:"gift-card"}),t(O,{children:n.translate("payment.gift_card_wrapper.gift_card_label",{identifier:Sa(s)})})]}),t(pe,{textAlign:"end",children:t(O,{type:"strong",children:e.cost&&n.formatCurrency(e.cost.amount,{form:"short",currency:e.cost.currencyCode})})})]})}default:return null}}function kh({open:e,onClose:n,includeStoreCredit:a=!0}){const{i18n:s,checkout:o}=y(),i=nn(),r=Mn(i),{canApplyGiftCards:c,paymentLines:d}=Ot(),l=Ta(),p=a&&o.configuration.visibility.showStoreCreditRedemption.value&&r.value,u=c||d.length>0,m=$(u);D(()=>{const g=m.current&&!u;m.current=u,e&&g&&!p&&n()},[p,u,n,e]);let v="";p&&u?v=s.translate("payment.gift_card_store_credit.manage_label"):u?v=s.translate("payment.gift_card_wrapper.manage_label"):p&&(v=s.translate("payment.store_credit.manage_label"));const C=()=>{(l.value||!c&&p)&&n()},f=a?t(G,{children:[t(ti,{}),t(ni,{afterAppliedRedeemablesChange:C})]}):null;return t(np,{heading:v,open:e,onHide:n,children:t(b,{gap:"base",children:[o.configuration.visibility.showStoreCreditRedemption.value?f:null,t(Iu,{afterAppliedRedeemablesChange:C,autoSelect:!0,showHeading:!1})]})})}function ki(){const e=nn(),n=Mn(e),a=Ln(e),s=Ii(),o=Qt();return h(()=>{const i=o.value?.amount===0&&!a.value;return n.value&&s.value&&!i})}function Li(){const{paymentLines:e}=Ot(),n=ki(),{showStoreCreditForSubscriptionRenewals:a}=Ja();return!!e.length||n.value||a.value}function Lh({afterAppliedRedeemablesChange:e,placement:n}){const{i18n:a,userEvents:s,shop:o,source:i,checkout:r}=y(),{paymentLines:c,remove:d}=Ot(),{useStoreCreditForSubscriptionRenewals:l}=Z(),p=Qt(),u=Ao(),m=Eo(),v=nn(),C=Ln(v),f=ye(gs.Init),g=h(()=>f.value===gs.Loading),_=Li(),P=ki(),{storeCreditBalanceForSubscriptionRenewals:S,showStoreCreditForSubscriptionRenewals:k}=Ja(),L=h(()=>u.value||m.value),M=h(()=>{if(u.value)return a.translate("payment.store_credit.buying_gift_card");if(m.value)return a.translate("payment.store_credit.no_fixed_selling_plans")}),A=ku(v.value,f),B=Lu(v.value,f),w=ye(E());D(()=>{w.value=E()},[c]),Ae(()=>{const H=C.value,K=l.value;w.value=E({storeCreditSelected:H,subscriptionRenewalsSelected:K})});function E({storeCreditSelected:H=C.value,subscriptionRenewalsSelected:K=l.value}={}){const x=c.map(({method:le})=>pt(le));return H&&x.unshift(ta),K&&x.splice(H?1:0,0,na),x}const R=V((H,K)=>{const x=K?"add":"remove",le=n?`${n}_`:"";s.monorailEvent({schemaId:"shopify_pay_payment_page_ui_interaction/1.1",payload:{...
2Ue(i,r,o),action:`${le}manage_redeemables_${x}_${H}`}})},[r,s,n,o,i]),F=V(async H=>{const K=w.value,x=K.length>H.length,{shorter:le,longer:ie}=x?{shorter:H,longer:K}:{shorter:K,longer:H};w.value=H;const Q=ie.find(ne=>!le.includes(ne)),te=Q===ta,de=Q===na;let ce=null;if(te)if(R("store_credit",!x),x){const ne=l.value;l.value=!1,ce=await B(),ce?.status!=="success"&&(l.value=ne)}else ce=await A();else if(de){const ne=!x;R("store_credit_subscription_renewals",ne),l.value=ne}else{R("gift_card",!x);const ne=c.find(fe=>pt(fe.method)===Q);ne?.method&&(ce=await d(ne.method))}ce?.status==="success"&&e?.()},[e,A,w,c,R,d,B,l]),U=h(()=>g.value||L.value),W=h(()=>U.value||p.value?.amount===0&&!C.value),N=U;if(!_)return null;const z=v.value?.balance,X=S.value,Y=M.value;return t(b,{gap:"base",borderRadius:"base base none none",padding:n==="expanded"?"small-100 none none none":void 0,children:t(op,{name:"redeemables_list",values:w.value,onChange:F,variant:"block",multiple:!0,children:[P.value&&z&&t(Wt,{value:ta,disabled:W.value,secondaryContent:t(O,{type:"strong",children:a.formatCurrency(z.amount,{currency:z.currencyCode})}),details:Y&&t(O,{children:Y}),children:t(b,{direction:"inline",gap:"base",alignItems:"center",children:[t(O,{children:a.translate("payment.store_credit.apply_label")}),t(T,{when:g,children:t(Zr,{})})]})}),k.value&&X&&t(Wt,{value:na,disabled:N.value,details:t(b,{gap:"small-500",children:[t(O,{children:a.translate("payment.store_credit.remaining_for_subscription_charges_description",{amount:a.formatCurrency(X.amount,{currency:X.currencyCode})})}),Y&&t(O,{children:Y})]}),children:t(O,{children:a.translate("payment.store_credit.use_remaining_for_subscription_charges_label")})}),c.map(H=>t(Mh,{paymentLine:H},pt(H.method)))]})})}function Mh({paymentLine:e}){const{i18n:n}=y(),s=e.method.redemptionContent,o=_a(s);return t(Wt,{value:pt(e.method),secondaryContent:t(pe,{textAlign:"end",children:t(O,{type:"strong",children:e.cost&&n.formatCurrency(e.cost.amount,{form:"short",currency:e.cost.currencyCode})})}),children:t(b,{children:[t(pe,{children:n.translate("payment.gift_card_checkbox_label")}),t(b,{direction:"inline",gap:"small-400",children:[t(xe,{type:"gift-card"}),t(O,{color:"subdued",children:[" ",Sa(o)]})]})]})})}function Oh(){const{checkout:e}=y(),n=Li(),a=Mi(),{paymentLines:s}=Ot();switch(e.identity.current.value){case"shopPay":return{hasPersistentRedeemablesManagement:!0,show:n};case"customerAccount":case"businessCustomer":{const o=a||s.length>0;return{hasPersistentRedeemablesManagement:o,show:o}}default:return{hasPersistentRedeemablesManagement:!1,show:!1}}}function Dh(){const{checkout:e}=y(),n=ye(!1),a=Mi();switch(e.identity.current.value){case"shopPay":return t(Lh,{placement:"summary"});case"customerAccount":case"businessCustomer":return t(b,{gap:"base",children:[a?t(G,{children:[t(ti,{}),t(ni,{})]}):null,t(Rh,{includeStoreCredit:!1,openRedeemablesModal:()=>n.value=!0}),t(kh,{includeStoreCredit:!1,open:n.value,onClose:()=>n.value=!1})]});default:return null}}function Mi(){const{checkout:e}=y(),n=nn(),a=Mn(n),s=Ln(n),o=Qt(),i=s.value,r=o.value?.amount===0&&!i;return a.value&&(e.configuration.visibility.showStoreCreditRedemption.value||i)&&!r}const Th={ONE_PERCENT_CASHBACK:"1",THREE_PERCENT_CASHBACK:"3"};function dt({children:e}){return t(b,{direction:"inline",gap:"small-200",alignItems:"center",children:e})}function wh({handleNoValidCards:e}){const[n,a]=mt(!1),o=j().paymentMethods.value,{i18n:i,observability:r,shopPay:c}=y(),d=c.session.paymentMethodOption.value,l=ai(),p=l.selectedCreditCard.value,u=l.selectedPaymentMethod.value,m=l.selectedPaymentMethodItem.value,v=l.paymentMethods.value,C=c.user.hasFlow.value,f=Mu(p),g=v.find(S=>!S.isDisabled);if(D(()=>{if(n){const S=setTimeout(()=>{a(!1)},750);return()=>clearTimeout(S)}},[n]),D(()=>{const S=d?.name==="SHOPIFY_INSTALLMENTS"&&m?.isDisabled===!0;if(!g){C&&e();return}S&&(l.selectPaymentMethod(g.method),a(!0))},[m?.isDisabled,d?.name,e,g,l,C]),!u)return null;if(n)return t(dt,{children:t(oe,{})});if(u.paymentMethod==="CUSTOM_ONSITE"){const S=o?.find(M=>u.paymentBrands&&Ro(M,u.paymentBrands));if(!S)return r.log("shop_pay_payment_line_custom_onsite_payment_selected","customOnsitePaymentMethod was selected but not in negotiatedPaymentMethods",{selectedPaymentMethod:JSON.stringify(u),negotiatedPaymentMethods:JSON.stringify(o)}),null;
2const k=el(S)&&!!S.incentiveType,L=S.paymentBrands?.length===1?S.paymentBrands[0]:"generic";if(k){const M=Th[S.incentiveType],A={title:i.translate("payment.usdc_cashback_title",{incentive_percentage:M}),additionalInfo:i.translate("payment.usdc_cashback_additional_info",{terms_url:_s,incentive_percentage:M}),terms:i.translate("payment.usdc_cashback_terms"),termsUrl:_s};return t(dt,{children:[t(O,{children:S.name}),t(dp,{notice:A,selected:!1}),t(ke,{type:L})]})}return t(ii,{paymentLine:{method:S},showAmount:!1})}if(Ou(u))return t(dt,{children:[t(O,{children:t(O,{children:i.translate("payment.ideal_label")})}),t(ke,{type:"ideal"})]});if(Du(u))return t(dt,{children:[t(O,{children:i.translate("brand.apple_pay")}),t(ke,{type:"apple_pay"})]});if(Tu(u))return t(dt,{children:[t(O,{children:i.translate("brand.paypal")}),t(ke,{type:"paypal"})]});if(wu(u)||fs(u)){const S=i.translate("payment_gateway.shop_pay.name"),k=fs(u)?i.translate("payment_gateway.shop_pay.installments_label"):void 0;return t(dt,{children:[t(O,{children:S}),t(ke,{type:"shop_pay"}),k?t(O,{color:"subdued",children:k}):null]})}if(Nu(u))return t(dt,{children:t(O,{children:u.name})});if(Vu(u)||Bu(u))return null;const _="base",P=u.paymentAttributes;return t(Fu,{name:f,digits:t(G,{children:[t(ua,{}),t(O,{size:_,tone:"neutral",children:P.lastDigits})]}),icon:t(ke,{type:P.brand})})}function Nh(){const e=Z().paymentLines.value,n=se(()=>e.find(a=>a.method.type!=="giftCard"&&a.method.type!=="redeemable"),[e]);return t(b,{gap:"small-400",children:[n&&t(ii,{paymentLine:n,showCardBrandLabel:!0}),t(xu,{})]})}function Vh({openSignal:e}){const{checkout:{identity:n}}=y();return n.current.value==="shopPay"?t(wh,{handleNoValidCards:()=>e.value=!0}):t(Nh,{})}function Oi(){const{i18n:e}=y(),n=bc("STORE_CREDIT"),{paymentLines:a}=Ot(),s=[...n.value,...a];if(!s.length)return null;const o=" - ";return t(b,{gap:"small-200",children:s.map(i=>{const r=i.cost?t(O,{children:[o,e.formatCurrency(i.cost.amount,{currency:i.cost.currencyCode,form:"short"})]}):null;switch(i.method.redemptionSource){case"STORE_CREDIT":return t(b,{direction:"inline",alignItems:"center",gap:"base",children:[t(ke,{type:"store-credit"}),t(pe,{children:[e.translate("payment.store_credit.label"),r]})]},pt(i.method));case"CUSTOM":{const c=i.method.redemptionContent,d=_a(c);return t(b,{direction:"inline",alignItems:"center",gap:"base",children:[t(ke,{type:"gift-card"}),t(pe,{children:[e.translate("payment.gift_card_wrapper.gift_card_label",{identifier:Sa(d)}),r]})]},pt(i.method))}default:return null}})})}function Bh({paymentExemptionReason:e}){const{checkout:{identity:n}}=y();return n.current.value==="shopPay"&&(e==="storeCredit"||e==="redeemables")?t(Lt,{vaulted:!0,reason:e}):t(Oi,{})}function Fh({hasPersistentRedeemablesManagement:e,openSignal:n}){const{checkout:a}=y(),s=rp(),o=Ta();return s.value==="freeOrder"?t(Lt,{vaulted:!0,reason:"freeOrder"}):s.value==="giftCard"?t(Lt,{vaulted:!0,reason:"giftCard"}):xh({identity:a.identity,paymentExemptionReason:s.value,paymentFullyCoveredByRedeemablesAndGiftCards:o.value})?t(Bh,{paymentExemptionReason:s.value}):t(b,{gap:"small-200",children:[!e&&t(Oi,{}),t(Vh,{openSignal:n})]})}function xh({identity:e,paymentExemptionReason:n,paymentFullyCoveredByRedeemablesAndGiftCards:a}){return a?e.current.value!=="shopPay"?!0:n==="storeCredit"||n==="redeemables":!1}function Hh(){const{checkout:e}=y(),n=e.latestReceipt.value,{value:a}=j().paymentMethods,{inMemoryGooglePayParts:{sdkStatus:s,paymentSheetError:o},persistedGooglePaySignal:i,receiptErrorSignal:r}=Jt(),c=tl({shouldResetCustomerInfo:!1}),d=eo(n?.status==="failed"&&n.failure.type==="payment"?n.failure:void 0),l=$(c);return l.current=c,Ae(()=>{s.value.status==="error"&&ht(()=>{l.current(),o.value={type:Cn}})}),D(()=>{const p=()=>{l.current(),i.value={...i.value,receiptIdForPaymentFailure:n?.id}};!Io(a,"GOOGLE_PAY")&&o.value?.type!==Cn&&(o.value={type:Cn},p()),n?.id!==i.value?.receiptIdForPaymentFailure&&n?.status==="failed"&&n?.failure.type==="payment"&&(i.value={...i.value,receiptIdForPaymentFailure:n?.id},r.value=d)},[n,r,a,i,o,d]),D(()=>()=>{r.value=void 0},[r]),null}function Uh(){const{checkout:e}=y(),n=e.latestReceipt.value,{value:a}=j().paymentMethods,{inMemoryPayPalParts:{paymentSheetError:s},persistedPayPalSignal:o}=Jt(),i=nl(),r=$(i);r.current=i;const c=se(()=>Io(a,"PAYPAL_EXPRESS"),[a]);return D(()=>{c||(r.current(),s.value={type:Cn})},[c,s]),D(()=>
2{if(!n)return;const d=n.id===o.value?.receiptIdForClearedToken,l=n.status==="failed"&&n.failure.type==="payment";!d&&l&&(o.value={...o.value,receiptIdForClearedToken:n?.id},r.current())},[n,c,s,o]),null}function zh(){const{checkout:{identity:e}}=y();switch(e.current.value){case"payPal":return t(Uh,{});case"googlePay":return t(Hh,{});default:return null}}function Gh(){const e=y(),{checkout:n,i18n:a,shop:s,shopPay:o}=e,i=n.identity.current.value==="shopPay",r=tp(),c="payment",{hasAnyPaymentError:d,clearReceiptError:l}=Ph({clearReceiptErrorOnPaymentLineChange:!1}),{hasViolations:p}=Fe(wa),{hasError:u}=al(),{hasError:m}=sl(),{paymentErrors:v}=ba().value,C=v.length>0,{notSupportedError:f}=Xu(),g=!!f,_=j(),P=_.buyerIdentity,{value:S}=_.paymentFlexibilityPaymentTermsTemplate,k=ol(),L=S!=null&&!k.value,M=Pc().value,A=o.session.selectedPaymentMethod.value,B=Ac(A),{value:w}=_.paymentMethods,E=ai({enableAutoSelect:!1}),R=E.paymentMethods.value.length>0;Sh();const F=A!=null&&Ec(A)?A.paymentBrands??[]:[],U=F.length>0?w?.find(Xe=>Ro(Xe,F)):void 0,W=il("Checkout::PaymentMethod::Render",U?.uiExtension?[U.uiExtension]:[]),N=Wh(e,{customerProfile:P.value?.customerProfile}),z=N&&(i||R),X=N&&E.cardPaymentMethods.value.length===0,{expandedSlot:Y,collapsedSlot:H}=Hu(E),K=d||g||C||u||m,{directPaymentErrors:x,paymentLines:le}=Z(),Q=le.value.some(Xe=>Xe.method.type===Rc.CreditCard&&Xe.method.requiresCvvConfirmation),te=s.storeVaultGuestCvvVerificationEnabled&&Q,de=!!B&&!B?.expired&&!B?.verified,ce=!!B?.expired||K||L||M||te||de,ne=ee("purchase.checkout.payment-method-list.render-before"),fe=ee("purchase.checkout.payment-method-list.render-after"),Ee=Pn([...ne,...fe]),Ce=Pn(W),ve=pu([...ne,...fe]),Se=ga(),he=So(),Oe=h(()=>Se.value&&!he.value?!0:!!P.value?.purchasingCompany),I=Nt(c,ce||p);$a(W.map(Ut),V(()=>{I.value=!0},[I])),D(()=>{(ce||p)&&(I.value=!0)},[ce,p,I]),Uu();const Re=V(()=>{I.value&&Cs(x)||(I.value=!I.value,I.value&&r(),jh(e,I.value))},[r,x,I,e]),ge=Oh(),De=t(Fh,{openSignal:I,hasPersistentRedeemablesManagement:ge.hasPersistentRedeemablesManagement}),Ve=K?t(Kh,{paymentErrors:v}):null,ae=Yh(e),qe=ae&&Oe.value,Te=!ae,$e=Te?!1:I.value,Be=Te?null:Ve||te,be=Te?!1:ve||X||L,yt=$e||be||!!Be;Ah(i),Ae(()=>{Cs(x)&&(I.value=!0)}),Xa({autoOpen:!1,isMissing:te||de,open:I});const vt=qe?t(ph,{usesSharedVaultedSelector:z,hasPersistentRedeemablesManagement:ge.hasPersistentRedeemablesManagement,msiExpandedSlot:Y,onSelectedPaymentMethodChange:l}):null;Ae(()=>{(Ee.value||Ce.value)&&(I.value=!0)});const We=ge.show?t(Dh,{}):null,Vt=yt?void 0:H,it=We?t(b,{gap:"base",children:[We,Vt]}):Vt;return t(G,{children:t(Rt,{target:"cart.paymentLines[0]",children:[t(re,{open:$e,disabled:be,id:c,label:a.translate("payment.title"),icon:t(xe,{id:"payment-creditCardIcon",type:"credit-card",size:"fill"}),primaryContent:De,onToggle:qe?Re:void 0,error:Be,renderChildrenWhenCollapsed:qe,secondaryPersistentContent:it,children:vt}),t(zh,{})]})})}function Wh({checkout:e,shop:n,source:a},{customerProfile:s}){return e.identity.current.value==="shopPay"||Ic({identitySource:e.identity.current.value,isOrderSession:et(a),storeVaultEnabled:n.storeVaultEnabled,customerProfile:s})}function Yh({checkout:e}){switch(e.identity.current.value){case"payPal":case"googlePay":case"applePay":return!1;default:return!0}}function jh({userEvents:e,source:n,checkout:a,shop:s},o){a.identity.current.value==="shopPay"&&e.monorailEvent({schemaId:"shopify_pay_payment_page_ui_interaction/1.1",payload:{...Ue(n,a,s),action:o?"credit_card_expand":"credit_card_collapse"}})}function Kh({paymentErrors:e}){return t(q,{children:[e.length>0?t(Pa,{errors:e,errorType:Ne.PaymentError}):t(G,{children:[t(Ju,{}),t(Eh,{})]}),t(He,{blockSize:"base"})]})}const qh="EnNLk",$h={InlineAlignmentWithContent:qh};function Ls({onPaymentDelegation:e}){const{embed:n,i18n:a}=y(),{rollup:{action:{tone:s}={}}={}}=Dt();return n?.embedder==="amazon"?t(Me,{textDecoration:"none",onClick:e,children:t(O,{tone:"accent",children:a.translate("embed.payment.payment_options")})}):t(Rn,{tone:s==="custom"?"custom":void 0,onClick:e,variant:"plain",textDecoration:"none",children:a.translate("payment.choose_new_payment_method")})}const Xh={visa:"Visa",mastercard:"Mastercard",americanexpress:"American Express",amex:"American Express",discover:"Discover",dinersclub:"Diners Club",maestro:"Maestro",jcb:"JCB"};function Ms(e){return e.toLowerCase().replace(/[-_]/g,"")}
2function oa(e,n){return!e||Ms(e)==="unknown"?n.translate("payment_gateway.credit_card_label"):Xh[Ms(e)]??n.translate("payment_gateway.credit_card_label")}function Jh(){const{i18n:e,observability:n,embed:a,shop:s,shopPay:o,checkout:i}=y(),r=ga(),c=ze(),{delegatedPaymentInstrument:d}=at(),{message:l,tone:p,inventoryRecoveryReceiptId:u}=ci(),{rollup:{blockPadding:m}={}}=Dt(),{hasViolations:v,clearViolations:C}=ue(wa);D(()=>{let I=Ht(d.peek());return d.subscribe(Re=>{const ge=Ht(Re);ge!==I&&(I=ge,C())})},[d,C]);const f=!!a&&i.configuration.isPaymentInstrumentsDelegationEnabled&&!!d.value,g=f&&v,_=Ht(d.value),P=$(void 0);g&&(P.current=_);const S=yp(d.value),{billingAddress:k}=Z(),L=!!(S&&!la(k.value,vp(S))),M=f&&(g||P.current===_&&L),A=a?.embedder,B=Zt({embedder:A,shop:s}),w=In(o.app.config),E=a?.isFlagshipPartner&&!st(a.embedder)&&!w&&!B?e.translate("payment.payment_method"):e.translate("payment.title"),R=a?.client?.paymentErrors.value.includes(ms.PaymentEmpty)??!1,F=$(!1),U=$(null),W=V(I=>{U.current=I,I&&F.current&&(I.focus(),F.current=!1)},[]),N=V(async()=>{const I=a?.client;if(!I)return;F.current=!1;const Re=U.current!==null;try{const ge=await I.paymentMethodChangeStart();if(!ge)return;if(ge.ucpPaymentInstrument)n.log("delegated_payment_selected","Payment instrument selected",{externalReferenceId:Ht(d.value)});else if(ge.cart)try{await I.applyCart(ge.cart),n.log("delegated_payment_selected","Payment instrument selected",{externalReferenceId:Ht(d.value)})}catch(De){n.log("delegated_payment_cart_update_error","Failed to apply cart update after payment selection",{error:String(De)})}}finally{!I.paymentErrors.value.length&&Re&&(U.current?U.current.focus():F.current=!0)}},[a,n,d]),X=a?.client?.paymentErrors.value.includes(ms.PaymentDelegationError)?e.translate("payment_errors.payment_credential_delegation_error"):void 0,Y=X||l,H=X?"critical":p,K=Sn(m),x=r.value&&Y?t(b,{direction:"block",gap:K,paddingBlockEnd:K,children:[t(Qu,{message:Y,tone:H,inventoryRecoveryReceiptId:X?void 0:u}),!M&&a?.isFlagshipPartner&&t(Ls,{onPaymentDelegation:N})]}):void 0;if(!r.value){const I=t(Lt,{vaulted:!0,reason:"freeOrder"}),Re=A==="amazon"?{compact:I}:{primary:I};return t(re,{id:"payment",label:E,primaryContent:Re.primary,compactContent:Re.compact,icon:t(xe,{id:"payment-creditCardIcon",type:"credit-card",size:"fill"})})}const le="payment",ie=d.value,Q=gp(ie),te=Q?.brand,de=Q?.lastDigits,ce=!c.value||!ie||!te||!de,ne=ce?e.translate("payment.add_payment_method"):void 0,fe=t(O,{tone:"critical",children:e.translate("payment.add_payment_method")}),Ee=de?t(O,{accessibilityVisibility:"exclusive",children:`${oa(te,e)} ${e.translate("payment.ends_with_label",{last_digits:de})}`}):null,Ce=t(O,{accessibilityVisibility:"hidden",children:[oa(te,e),t(ua,{}),de]}),ve=(()=>{if(!ce)return t(b,{direction:"inline",gap:"small-400",alignItems:"center",children:[Ee,Ce,t(ke,{type:te,size:"small",accessibilityVisibility:"hidden"})]})})(),Se=ce?t(O,{tone:R?"critical":void 0,children:e.translate("payment.add_payment_method")}):t(b,{direction:"inline",gap:"small-400",alignItems:"center",children:[t("span",{"aria-hidden":"true",className:$h.InlineAlignmentWithContent,children:t(ke,{type:te})}),Ee,Ce]}),he=ce?t(O,{tone:"accent",decoration:"underline",children:e.translate("payment.add_new_payment_method")}):t(b,{direction:"inline",gap:"small-400",alignItems:"center",children:[t(O,{children:e.translate("payment.pay_with")})," ",Ee,t(O,{type:"strong",accessibilityVisibility:"hidden",children:[oa(te,e),t(ua,{}),de]}),t(ke,{type:te,accessibilityVisibility:"hidden"})]}),Oe=A==="amazon"?{compact:he}:A==="google"&&!B?{primary:Se}:{primary:ve,secondary:ve===void 0?fe:void 0};return t(re,{buttonRef:W,id:le,label:E,open:M,disabled:M,onToggle:x?void 0:N,primaryContent:Oe.primary,secondaryContent:Oe.secondary,compactContent:Oe.compact,buttonAccessibilityLabel:ne,icon:t(xe,{id:"payment-creditCardIcon",type:"credit-card",size:"fill"}),error:x,children:M?t(b,{direction:"block",gap:"base",children:[t(we,{level:3,children:e.translate("billing.billing_address_title")}),t(hp,{}),a?.isFlagshipPartner?t(Ls,{onPaymentDelegation:N}):null]}):null})}const Qh=new Set(["amazonPay","buyWithPrime"]);function ya(){const{checkout:{identity:e}}=y();return Qh.has(e.current.value)?t(nh,{}):e.current.value==="sdkCartHints"?t(Jh,{}):t(Gh,{})}function Di(e){if(e?.status!=="filled")return null;const{discountOffer:n}=e;if(!n.offerAmount||!n.campaignHandle)return null;const a=n.minimumOrderValue?{amount:n.minimumOrderValue,satisfied:!!n.minimumOrderValueSatisfied,remainingAmou
2nt:n.minimumOrderValueRemainder??null}:null;return{adType:"SHOP_CASH_OFFER",campaignHandle:n.campaignHandle,offerAmount:n.offerAmount,redeemableAmount:!a||a.satisfied?n.offerAmount:null,minimumOrderValue:a}}function wn(){const{checkout:e}=y(),n=$(null);return h(()=>{const a=e.proposal.negotiated.fields.shopDiscountOffer.value;return a?.status==="unavailable"?(n.current=null,null):(a?.status!=="filled"||(n.current=Di(a)),n.current)})}function Zh(){const e=_p(),n=j(),a=n.paymentMethods,s=n.shopCashBalance;return h(()=>{const{nonEligibleReason:o}=e.value,i=!!a.value?.some(l=>l.type==="redeemable"&&l.redemptionSource==="SHOP_CASH"),r=s.value,c=r==null||r.status==="unavailable";let d;return c?d=bs.ShopCashNotAvailable:i?d=o:d=bs.ShopCashMerchantNotSupported,{nonEligibleReason:d}})}const Nn=()=>{const e=Zh();return h(()=>{const{nonEligibleReason:n}=e.value;return n?{eligible:!1,reason:n}:{eligible:!0}})},Ti=()=>{const e=y().shopPay.app.config,n=ep();return kc(e,n)};function em(e,n,a){D(()=>{if(!(!e||!a))return e.recordPresentation({component:n,displayLabel:a})},[n,a,e])}const tm=()=>{const e=j().discountLines;return h(()=>{const n=e.value,a=n?n.lines.some(o=>ys(o)?o.allocations.some(i=>i.target.type==="MERCHANDISELINE"):!1):!1,s=n?n.lines.filter(i=>ys(i)&&i.discount.presentationLevel==="CART"&&i.allocations.some(r=>r.target.type==="MERCHANDISELINE")).reduce((i,r)=>{const c=r.amount?.amount;return c?i+c:i},0):0;return{hasMerchandiseDiscounts:a,orderDiscountAmount:s}})};function nm(e){if(typeof window>"u")return;const n=am(e);n&&window.parent.postMessage({jsonrpc:"2.0",method:"ec.keep_shopping"},n)}function am(e){if(e)try{return new URL(e).origin}catch{return}}const sm=()=>{const{embed:e,i18n:n,shop:a,shopPay:s}=y(),o=st(e?.embedder),i=s.app.config.surface,r=a.hasFlagEnabled(Na),c=to();return(o?i==="shop_app":r||i==="shop_app")?t(Me,{tone:"monochrome",onClick:()=>{if(o){nm(e?.client?.embedderOrigin);return}c.notify({keep_shopping:!0})},children:t(O,{size:"small",children:n.translate("shop_cash.minimum_order_value_banner_keep_shopping")})}):null},om="O9AXs",im="dHa7y",Os={ShopCashMinimumOrderValueBannerLight:om,ShopCashMinimumOrderValueBannerDark:im},Ds=({adType:e,offerAmount:n,minimumOrderValueAmount:a,remainingAmount:s,incentivePresentation:o})=>{const{i18n:i}=y(),r=Ti(),{hasMerchandiseDiscounts:c}=tm().value,d=i.formatCurrency(n.amount,{currency:n.currencyCode,form:"short"}),l=i.formatCurrency(a.amount,{currency:a.currencyCode,form:"short"}),p=s?i.formatCurrency(s.amount,{currency:s.currencyCode,form:"short"}):void 0,u=rm({adType:e,formatMinimumOrderAmount:l,formatRemainingAmount:p,formatOfferAmount:d,hasMerchandiseDiscounts:c});return em(o,"minimumOrderValueBanner",e==="FLAT_AMOUNT_CASHBACK_OFFER"?u:void 0),t(q,{padding:"small-200 small-100",borderRadius:"base",accessibilityRole:"status",className:r?Os.ShopCashMinimumOrderValueBannerDark:Os.ShopCashMinimumOrderValueBannerLight,children:[t(pe,{type:"small",children:u}),t(sm,{})]})},rm=({adType:e,formatMinimumOrderAmount:n,formatRemainingAmount:a,formatOfferAmount:s,hasMerchandiseDiscounts:o})=>{const{i18n:i}=y(),r=o||!a;return e==="SHOP_CASH_OFFER"?r?i.translate("shop_cash.minimum_order_value_banner_discounts_offer_amount",{formatBoostedAmount:s,formatMinimumOrderAmount:n}):i.translate("shop_cash.minimum_order_value_banner",{formatRemainingAmount:a,formatBoostedAmount:s}):e==="FLAT_AMOUNT_CASHBACK_OFFER"?r?i.translate("shop_cash.minimum_order_value_banner_discounts_flat_cashback",{formatOfferAmount:s,formatMinimumOrderAmount:n}):i.translate("shop_cash.minimum_order_value_banner_flat_cashback",{formatRemainingAmount:a,formatOfferAmount:s}):""};function wi({eligibility:e,discountOffer:n}){const a=Mt(Ga),s=a?.cashback?.incentive;if(!e.eligible)return[];const o=[];return n?.minimumOrderValue&&!n.minimumOrderValue.satisfied&&o.push(t(Ds,{adType:n.adType,offerAmount:n.offerAmount,minimumOrderValueAmount:n.minimumOrderValue.amount,remainingAmount:n.minimumOrderValue.remainingAmount},"mov-discount")),lm(s)&&o.push(t(Ds,{adType:"FLAT_AMOUNT_CASHBACK_OFFER",offerAmount:s.cashbackAmount,minimumOrderValueAmount:s.minimumOrderValue,remainingAmou
2nt:s.minimumOrderValueRemainder,incentivePresentation:a?.incentivePresentation},"mov-cashback")),o}function lm(e){return!!(e?.__typename==="ShopCashCheckoutFlatAmountCashbackIncentive"&&e.minimumOrderValue&&!e.minimumOrderValueSatisfied)}function cm(){const{checkout:e,embed:n}=y(),{main:{section:a}}=Aa(),s=Nn().value,o=wn(),i=_e().value.payment,r=wi({eligibility:s,discountOffer:o.value});return st(n?.embedder)&&!e.configuration.visibility.showCashRedemption.value&&r.length>0?i?t(b,{padding:dm(a?.padding),gap:"small-200",children:r}):t(zt,{hideDivider:i,condition:!i,padding:"none large-200",children:t(b,{padding:"small-200 none",gap:"small-200",children:r})}):null}function dm(e){const[n,a]=um(e),s=Sn(n)??"none",o=Sn(a)??"none";return`small-200 ${s} small-200 ${o}`}function um(e){return Array.isArray(e)?e.length===2?[e[1],e[1]]:[e[1],e[3]]:[e,e]}const pm="mu1NS",hm={ShopCashSwitch:pm};function Ni({checked:e,onChange:n,disabled:a}){return t(Pp,{checked:e,onChange:n,icon:"none",className:hm.ShopCashSwitch,accessibilityLabel:"Shop Cash",disabled:a})}function ut(e,n){return e==null&&n==null?!0:e==null||n==null?!1:e.amount===n.amount&&e.currencyCode===n.currencyCode}const ia=e=>({type:e.type,amount:e.destinationAmount,promotionId:e.promotionId}),Vn=({enabled:e=!0}={})=>{const{shopPay:n}=y(),a=pi(),o=Mt(Ga)?.redemption.applying,{negotiate:i}=ot(),c=Z().paymentLines,d=Sp(),l=lp(),p=j().buyerIdentity.value?.shopUser?.publicId,u=n.session.isInternalProgressing.value,m=o?.value===!1,v=e&&!!p&&!u&&m,{SHOP_CASH_BALANCE:C,SHOP_DISCOUNT_OFFER:f,SHOP_PROMOTION:g}=a.value,_=C?ia(C):null,P=f?ia(f):null,S=g.map(ia),k=async(M,{onNegotiateAccepted:A}={})=>{const{SHOP_CASH_BALANCE:B=_,SHOP_DISCOUNT_OFFER:w=P,SHOP_PROMOTION:E=S}=M,R=n.session.isInternalProgressing.value;if(!e||!o||R||!p||o.peek())return;Et(()=>{o.value=!0});const F=c.peek().filter(x=>x.method.type!=="redeemable"||x.method.redemptionSource!=="SHOP_CASH"),U=Object.values(M).flatMap(x=>Array.isArray(x)?x:[x]).find(x=>x!=null)?.amount.currencyCode,W=[B,w,...E??[]].filter(x=>x!==null&&(!U||x.amount.currencyCode===U)),{selectedBillingAddress:N,selectedShippingAddress:z,isUsingApplePayShippingFallback:X}=d.value,Y=!N.address1||l.value==="APPLE_PAY",K=L(W,X||!z||!Y?N:z);K&&F.push(K),c.value=F;try{A?.(),await i({include:["paymentLines","billingAddress"],silenceViolations:["non-shop-cash"]})}finally{Et(()=>{o.value=!1})}},L=(M,A)=>{if(!p||M.length===0)return null;const B=M.reduce((E,R)=>E+R.amount.amount,0),w=M[0].amount.currencyCode;return{cost:{amount:B,currencyCode:w},method:{type:"redeemable",redemptionSource:"SHOP_CASH",redemptionContent:{redemptionId:p,billingAddress:{streetAddress:A?{address1:A.address1??"",address2:A.address2,city:A.city??"",company:A.company,firstName:A.firstName,lastName:A.lastName??"",phone:A.phone,postalCode:A.postalCode,zoneCode:A.zoneCode,countryCode:A.countryCode??""}:null},destinationAmount:{amount:B.toString(),currencyCode:w},sourceAmount:{amount:B.toString(),currencyCode:w},redemptionPaymentOptionKind:"decoupled",details:M.map(E=>({sourceAmount:E.amount?{amount:E.amount.amount.toString(),currencyCode:E.amount.currencyCode}:null,destinationAmount:{amount:E.amount.amount.toString(),currencyCode:E.amount.currencyCode},redemptionId:E.promotionId??E.type,redemptionType:E.type}))}}}};return{isShopCashNegotiationReady:v,negotiateShopCash:k}},Pt=ui,Vi=e=>{const{i18n:n,shopPay:a,webMcp:s,checkout:o}=y(),{isShopCashNegotiationReady:i,negotiateShopCash:r}=Vn(),c=pi(),d=Tt(),{applying:l}=cp().redemption,{buyerIdentity:p,shopCashBalance:u}=j(),m=p.value,v=u.value,C=!!c.value[Pt],f=d.value[Pt]?.destinationAmount||null,g=V(async k=>{if(l.value)return;const L=k?e:null;ut(f,L)&&ut(c.value[Pt]?.destinationAmount,L)||await r({[Pt]:L?{type:"SHOP_CASH_BALANCE",amount:L,promotionId:null}:null})},[f,e,r,l,c]);D(()=>
2{if(!s||!(e.amount>0))return;const k=()=>i&&!l.value&&!a.session.isInternalProgressing.value&&p.value===m&&u.value===v;return s.unstable_registerDeclaredField({key:"shop_cash",read(){const L=o.latestReceipt.value?.status;if(!(L&&["processed","processing","processing_remote_checkouts","polling_for_order","action_required"].includes(L)))return{key:"shop_cash",purpose:"dev.shopify.shopping.declared_fields.generic",title:"Shop Cash",description:"Apply the available Shop Cash balance. Resend true to retain it in a checkout update; omission or null removes it.",value_schema:{type:"boolean"},required:!1,value:!!c.value[Pt]}},prepare(L){if(L!==null&&typeof L!="boolean")return{requirement:"must be a boolean or null"};const M=L===!0;return{phase:"negotiate",changed:!0,async apply(){return k()?(await g(M),ut(d.value[Pt]?.destinationAmount??null,M?e:null)):!1}}}})},[s,o,a.session,e,c,d,i,l,p,m,u,v,g]),D(()=>{f&&(ut(f,e)||g(!0))},[e]);const _=n.formatCurrency(e.amount,{currency:e.currencyCode,form:"short"}),P=n.translate("order_summary.shop_cash_title"),S=C?n.translate("shop_cash.redemption.balance.applied",{formattedAmount:_}):n.translate("shop_cash.redemption.balance.available",{formattedAmount:_});return{title:P,amount:S,checked:C,handleChange:g,disabled:l.value}},mm="yY3sV",ym={ShopCashToggleContainer:mm},vm=({redeemableBalance:e})=>{const{title:n,amount:a,checked:s,handleChange:o,disabled:i}=Vi(e);return t("div",{className:ym.ShopCashToggleContainer,children:t(pa,{theme:{rollup:{blockAlignment:"center"}},children:t(re,{label:n,primaryContent:a,primaryAction:t(Ni,{checked:s,onChange:o,disabled:i})})})})},gm="Q9An4",fm="K92xU",Ts={ShopCashVaultedCreditCardRequiredBanner:gm,Dark:fm},Cm=()=>{const{i18n:e}=y(),n=Ti(),a=e.translate("payment_errors.vaulted_card_required_error");return t(q,{padding:"small-200 small-100",borderRadius:"base",accessibilityRole:"status",className:Js(Ts.ShopCashVaultedCreditCardRequiredBanner,n&&Ts.Dark),children:t(pe,{type:"small",children:a})})},mn={availableBalance:null,redeemableBalance:null},_m=()=>{const e=j().shopCashBalance.value,n=$(null);return e?.status==="filled"?n.current=e.availableBalance:e?.status==="unavailable"&&(n.current=null),n.current},Sm=()=>{const e=j().shopCashBalance.value,{redeemableTotal:n}=hi().value,a=_m();if(e?.status==="filled"&&e.eligible&&e.redeemableBalance!=null&&e.redeemableBalance.amount>0)return{availableBalance:e.availableBalance,redeemableBalance:e.redeemableBalance};if(!a||a.amount<=0||!n)return mn;const s=Ap(n.currencyCode);if(n.amount<=s)return mn;if(n.amount<a.amount)return{availableBalance:a,redeemableBalance:n};const o=Ep(n.amount-a.amount,Wr(n.currencyCode));if(o>=s)return{availableBalance:a,redeemableBalance:a};const i=Rp({amount:a.amount-(s-o),currencyCode:a.currencyCode});return{availableBalance:a,redeemableBalance:i}},bm=({eligibility:e,availableBalance:n,redeemableBalance:a,discountOffer:s})=>{const{recordRedemptionEligibilityEvent:o}=Ya(),{orderTotal:i,orderSubtotal:r}=hi().value,c=se(()=>{if(!s)return"NO_CAMPAIGN";if(s.minimumOrderValue&&!s.minimumOrderValue.satisfied)return"BELOW_MOV"},[s]),d=se(()=>{if(i)return{balance:n?.amount??0,balanceCurrency:n?.currencyCode??"USD",totalPrice:i.amount,totalPriceCurrency:i.currencyCode,subtotalPrice:r?.amount??0,subtotalPriceCurrency:r?.currencyCode??"USD",maxTotalRedemptionAllowed:a?.amount??0,isBoostAvailable:!!s,boostCampaignId:s?.campaignHandle,offerAmountBelowMov:s?.minimumOrderValue?.remainingAmount?.amount,offerMinimumOrderValueRequired:s?.minimumOrderValue?.amount.amount,maxPostOfferRemainingAmount:0,maxOfferRedemptionAmount:s?.offerAmount?.amount,boostIneligibilityReason:c,redemptionIneligibilityReason:e.reason}},[n,i,r,s,a,c,e.reason]);D(()=>{d&&o(d)},[o,e.reason,n,a,s])},Pm=e=>{const{client:n,shop:a,shopPay:s}=y(),{recordRedemptionVisibilityEvent:o}=Ya(),i=n.unstable_getSerialization("apiClientId"),r=a.hasFlagEnabled(Na),c=s.app.config.surface,d=!!(typeof window<"u"&&window.ReactNativeWebView),l=_e().value.payment,p=se(()=>({visibility:"visible",reason:e.reason??"none",position:l?"vaulted":"unvaulted",shopPayCheckoutSurface:c,isReactNativeWebview:d,isShopCashBalanceBetaEnabled:r,apiClientId:i,isOnePageCheckout:!0,nEnabledCreditCards:0}),[c,d,r,i,e.reason,l]);D(()=>{o(p)},[o,e.reason])},Am="https://shop.app/shop-cash-terms",Em=e=>{const n=Rm(),{paymentLines:a}=j(),o=Ta().value&&!!a.value?.lines.find(Ip);return{eligibilityMessage:n(e.reason),showVaultedCardBanner:o}},Rm=()=>{const{i18n:e}=y();return n=>{if(n)switch(n){case"SHOP_CASH_INVALID_BILLING_ADDRESS":return e.translate("shop_cash.redemption_invali
2d_billing_address");case"SHOP_CASH_INVALID_SHIPPING_ADDRESS":return e.translate("shop_cash.redemption_invalid_shipping_address");case"SHOP_CASH_MERCHANT_NOT_SUPPORTED":case"PAYMENTS_SHOP_CASH_UNSUPPORTED_CURRENCY":return e.translate("shop_cash.redemption_unsupported_merchant");case"SHOP_CASH_UNSUPPORTED_DELIVERY_METHOD_TYPE":return e.translate("shop_cash.redemption_unsupported_delivery_method");case"PAYMENTS_SHOP_CASH_UNSUPPORTED_SHIPPING":return e.translate("shop_cash.redemption_unsupported_shipping");case"PAYMENTS_SHOP_CASH_GIFT_CARD_NOT_ALLOWED":return e.translate("shop_cash.redemption_unsupported_gift_cards");case"INSUFFICIENT_FUNDING_LEDGER_BALANCE":return e.translate("shop_cash.redemption_error_exclusive_campaign_out_of_funds");case"BUYER_BALANCE_HOLD_ERROR":return e.translate("shop_cash.redemption_balance_hold",{shopRewardsTermsLink:t(Me,{target:"_blank",href:Am,children:e.translate("shop_cash.shop_rewards_terms")})});case"DISCOUNT_OFFER_ERROR":return e.translate("shop_cash.exclusive_offer_error");case"SHOP_CASH_NOT_AVAILABLE":case"PAYMENTS_SHOP_CASH_ORDER_TOTAL_TOO_LOW":return;default:return e.translate("shop_cash.redemption_error")}}},Qa=()=>{const{recordRedemptionActionEvent:e}=Ya(),{shop:n,shopPay:a}=y(),s=n.hasFlagEnabled(Na),o=a.app.config.surface,i=!!(typeof window<"u"&&window.ReactNativeWebView),r=se(()=>({shopPayCheckoutSurface:o,isReactNativeWebview:i,isShopCashBalanceBetaEnabled:s,isOnePageCheckout:!0,nEnabledCreditCards:0}),[o,i,s]),c=V(m=>{e({...r,...m})},[r,e]),d=V((m,v)=>{c({action:"auto-apply",redemptionType:m,source:v})},[c]),l=V((m,v)=>{c({action:"manually-apply",redemptionType:m,source:v})},[c]),p=V((m,v)=>{c({action:"auto-remove",redemptionType:m,source:v})},[c]),u=V((m,v)=>{c({action:"manually-remove",redemptionType:m,source:v})},[c]);return{recordRedemptionAutomaticallyApplied:d,recordRedemptionAutomaticallyRemoved:p,recordRedemptionManuallyApplied:l,recordRedemptionManuallyRemoved:u}},Bi=({enabled:e=!0,redemptionTypes:n=Wa}={})=>{const a=Tt(),o=Mt(Ga)?.cashbackState.stale,{recordRedemptionAutomaticallyRemoved:i}=Qa(),{negotiateShopCash:r}=Vn({enabled:e}),{hasViolations:c}=ue(Lc);D(()=>{if(!e||!o||!c)return;let d=!1;for(const l of n)ja(a.value,l)&&(d=!0,i(l,"useRemoveRedemptionsOnViolation"));d&&(o.value=!0,r(Object.fromEntries(n.map(l=>[l,null]))))},[e,c])},Fi=(e,{enabled:n=!0}={})=>{const{negotiateShopCash:a}=Vn({enabled:n}),{recordRedemptionAutomaticallyRemoved:s}=Qa(),o=Tt(),i=e.filter(r=>!r.eligibility.eligible).flatMap(r=>r.redemptionTypes??Wa);D(()=>{if(!n||i.length===0)return;let r=!1;for(const c of i)ja(o.value,c)&&(r=!0,s(c,"useRemoveRedemptionsWhenIneligible"));r&&a(Object.fromEntries(i.map(c=>[c,null])))},[n,i.join(",")])},Im=()=>{km()},km=()=>{const{observability:e,source:n}=y(),a=j().paymentLines.value,s=se(()=>a?.lines.filter(i=>i.method.type==="redeemable"&&i.method.redemptionSource==="SHOP_CASH")??[],[a]),o=$(!1);D(()=>{if(!s||s.length<=1||o.current)return;const i=JSON.stringify(s.map(r=>r.method.redemptionContent?.details?.map(c=>({redemptionPaymentGroupId:r.method.redemptionContent?.redemptionId,redemptionId:c.redemptionId,type:c.redemptionType,amount:c.destinationAmount}))));o.current=!0,e.error(new Lm,{severity:"error",metadata:{shopCash:{redemptions:i},source:{type:n.type},checkout:{token:n.checkoutSessionIdentifier||n.sourceId}}})},[s,e,n])};class Lm extends Error{constructor(){super("Multiple Shop Cash payment lines present in negotiation response"),this.name="MultipleShopCashPaymentLinesAnomaly"}}function Mm(e){const n=$(!1),a=$(performance.now()),{observability:s}=y();D(()=>{if(!n.current&&e&&e.amount>0){const o=performance.now()-a.current;s.histogram({name:"new_performance_shop_cash_balance_display_time",value:Math.round(o)}),n.current=!0}},[e,s])}const Om=({message:e})=>t(tt,{gridAutoFlow:"column",gridTemplateColumns:"minmax(auto, max-content) minmax(0, 1fr)",gridTemplateRows:"minmax(0, 1fr)",borderRadius:"base",borderWidth:"base",padding:"small-400 small-200",gap:"small-200",accessibilityRole:"alert",alignItems:"center",alignContent:"center",children:[t(xe,{type:"alert-circle",size:"small"}),t(pe,{color:"subdued",size:"small",children:e})]});function xi(){const{eligibility:e,redeemableBalance:n,availableBalance:a,discountOffer:s,messages:o,showVaultedCardBanner:i,vaulted:r,isDigitalGoodsRedemptionAllowed:c}=Hi();return Mm(a),Fi([{eligibility:e,redemptionTypes:[ui]},{eligibility:e,redemptionTypes:[fp,Cp]}]),Bi(),Pm(e),bm({eligibility:e,availableBalance:a,redeemableBalance:n,discountOffer:s.value}),Im(),{eligibility:e,redeemableBalance:n,messages:o,showVaultedCardBanner:i,vaulted:r,isDigitalGoodsRedemptionAllowed:c}}function Hi(){const e=_e().value.payment,n=Nn().value,{redeemableBalance:a,availableBalance:s}=Sm(),o=wn(),r=mi().value,c=wi({eligibility:n,discountOffer:o.value}),{eligibilityMessage:d,showVaultedCardBanner:l}=Em(n),p=!n.eligible&&n.reason==="PAYMENTS_SHOP_CASH_UNSUPPORTED_SHIPPING",u=[];return d&&!p&&u.push(t(Om,{message:d},"eligibility-banner")),u.push(...c),{eligibility:n,redeemableBalance:a,availableBalance:s,discountOffer:o,shopPromotionDiscounts:r,messages:u,showVaultedCardBanner:l,vaulted:e,isDigitalGoodsRedemptionAllowed:p}}function Dm(){const{eligibility:e,messages:n,redeemableBalance:a,discountOffer:s,shopPromotionDiscounts:o,isDigitalGoodsRedemptionAllowed:i}=Hi(),r=Tt();if((e.eligible||i)&&a)return!0;
2const c=s?.value?.redeemableAmount,d=o.length>0;return!!(e.eligible&&(c||d)||Wa.some(p=>ja(r.value,p))||n.length>0)}const Tm=()=>{const{eligibility:e,redeemableBalance:n,messages:a,showVaultedCardBanner:s,vaulted:o,isDigitalGoodsRedemptionAllowed:i}=xi();return s&&!o&&a.push(t(Cm,{})),t(G,{children:[(e.eligible||i)&&n&&t(zt,{hideDivider:o,condition:!o,children:t(vm,{redeemableBalance:n})}),a.length>0&&t(zt,{hideDivider:o,condition:!o,padding:"none large-200",children:t(b,{padding:"small-200 none",gap:"small-200",children:a})})]})};function nt({message:e}){return e?t(It,{errorType:Ne.DeliveryError,tone:"critical",children:t(b,{alignItems:"start",gap:"small-500",children:t(O,{children:e})})}):null}function Ui({formattedAddress:e}){const{i18n:n,checkout:a}=y(),s=j().buyerIdentity.value?.purchasingCompany,r=a.addressManager.shipping.value.selectedAddress.value?.id===kp&&Mc(s)||!e;return t(b,{children:[r&&t(pe,{children:s?.location.name}),e?t(pe,{children:e}):t(pe,{color:"subdued",children:n.translate("review.blocks.no_address")})]})}const wm=new Set(["DELIVERY_NO_DELIVERY_STRATEGY_AVAILABLE_FOR_MERCHANDISE_LINE"]);function Za({id:e="deliveryAddress",label:n,formattedAddress:a}){const{i18n:s}=y(),o=Nt(e),i=j().buyerIdentity.value?.purchasingCompany,r=yi(),c=no(),{hasViolations:d}=ue(wm),{deliveryAddressErrors:l}=ba().value,p=a??c,u=()=>{o.value=!o.value},m=se(()=>[`single_choice_${e}`],[e]),v=n??s.translate("shipping.shipping_address_title"),C=t(Ui,{formattedAddress:p}),f=t(G,{children:[t(di,{name:`single_choice_list_${e}`,values:m,hideRadioControl:!0,children:t(Wt,{value:`single_choice_${e}`,children:t(b,{children:[t(pe,{children:i?.location.name}),t(pe,{color:"subdued",children:p??s.translate("review.blocks.no_address")})]})})}),t(T,{when:r,children:t(q,{padding:"small-200 small-100 none small-100",children:t(ri,{showIcon:!0})})})]}),g=_();function _(){return e!=="deliveryAddress"?null:d?t(nt,{message:s.translate("shipping_errors.shipping_method_not_available_generic.one")}):l.length>0?t(Pa,{errors:l,errorType:Ne.DeliveryError}):null}return t(re,{id:e,label:v,open:o.value,onToggle:u,primaryContent:C,error:g,children:f})}function Nm(e){const n=e.current.value;return n==="customerAccount"||n==="businessCustomer"}function va({isAbovePaymentSummary:e=!1}={}){const{checkout:{identity:n}}=y(),a=j().buyerIdentity.value?.purchasingCompany;return Nm(n)&&!e?t(ws,{renderInlineSelector:!0}):a?t(Vm,{purchasingCompany:a}):t(ws,{})}function Vm({purchasingCompany:e}){const{i18n:n}=y(),{shippingAddress:a,name:s}=e.location,{secondary:o}=so({address:a??{},nameLinePosition:"inline",addressDisplayName:s}),i=a?o:n.translate("review.blocks.no_address");return t(Za,{id:"billingAddress",label:n.translate("company_location.location_title"),formattedAddress:i})}function ws({renderInlineSelector:e=!1}={}){const n=Z(),a=n.billingAddress.value,s=zi().value,o=s!=null&&n.billingAddressOption.value===s.option,i=rl().value!=="form",r=o&&s.sameAsShipping&&!i,c=r?s.address:a,d=$t(c,{displayName:!1}),{i18n:l,checkout:{identity:p}}=y(),{isMissingPhone:u}=si({addressType:"billing"}),{isMissingFirstName:m}=oi({addressType:"billing"}),v=u||m,C="billingAddress",f=Nt(C),g=Ge("deliveryNext").value,_=$(!0),{hasViolations:P,violations:S,clearViolations:k}=Fe(wa),L=new Set([...u?["PAYMENTS_PHONE_NUMBER_REQUIRED"]:[],...m?Oc:[]]),M=ao(P,S,L),{hasViolations:A}=Fe(Dc);D(()=>{M&&(f.value=!0)},[M,f]),D(()=>{if(_.current){_.current=!1;return}k()},[k,a]),Xa({isMissing:v,open:f});const B=Bm(),w=V(()=>{const W=!f.value;return B?.(W),f.value=W,W},[B,f]);let E=M;Fm(p,A)?E=t(It,{errorType:Ne.PaymentError,tone:"critical",children:l.translate("payment.billing_must_match_shipping_notice")}):M&&!g&&(E=t(It,{errorType:Ne.PaymentError,tone:"critical",children:l.translate("address_management.invalid_billing_address_selected")}));const R=l.formatName(c?.firstName,c?.lastName,!0);let F,U;return!o||r?(F=R,U=d):s.sameAsShipping?F=l.translate("billing.same_as_shipping"):F=d,t(re,{id:C,label:l.translate("billing.billing_address_title"),open:f.value,onToggle:w,error:E,primaryContent:F,secondaryContent:U,renderChildrenWhenCollapsed:v,children:t(mh,{renderInlineSelector:e})})}function zi(){const{checkout:e}=y(),{buyerIdentity:n}=j(),a=ll();return h(()=>
2{if(n.value?.purchasingCompany){const{address:s,type:o}=e.addressManager.billing.value.suggestedAddress.value;return!s||o!=="billing"&&o!=="billing-fact"&&o!=="shipping"?null:{option:o,address:s,sameAsShipping:!1}}return{option:"shipping",address:a.value,sameAsShipping:!0}})}function Bm(){const{userEvents:e,source:n,checkout:a,shop:s}=y(),{billingAddress:o,billingAddressOption:i,shippingAddress:r}=Z(),c=zi(),d=V(u=>{u?i.value="custom":la(o.value,r.value)?i.value="shipping":i.value="custom"},[o,i,r]),l=V(u=>{const m=c.value;u?(m&&i.value===m.option&&(o.value=m.address),i.value="custom"):m&&la(o.value,m.address)?i.value=m.option:i.value="custom"},[o,i,c]),p=V(u=>e.monorailEvent({schemaId:"shopify_pay_payment_page_ui_interaction/1.1",payload:{...Ue(n,a,s),action:u?"billing_addresses_expand":"billing_addresses_collapse"}}),[a,e,s,n]);return xm({identity:a.identity,switchBillingAddressOption:d,switchAndPrefillBillingAddressOption:l,recordShopPayInteraction:p})}function Fm(e,n){return e.current.value==="applePay"&&n}function xm({identity:e,switchBillingAddressOption:n,switchAndPrefillBillingAddressOption:a,recordShopPayInteraction:s}){switch(e.current.value){case"payPal":return n;case"customerAccount":case"businessCustomer":return a;case"shopPay":return s;default:return}}function Hm(){const{checkout:{wallets:e}}=y(),{persistedPayPalSignal:n,inMemoryPayPalParts:{accountStatus:a}}=Jt(),{clearForcedCheckoutLayout:s}=cl(Tc),o=V(()=>{n.value={isVenmo:!1},a.value={status:"not_connected"},s({wallet:e.escalatedWallet.value})},[e.escalatedWallet,n,a,s]);return dl({onClick:o,shouldResetCustomerInfo:!0,skipRedirect:!0})}function Gi(e,n){return e?n?`${n} · ${e}`:e:""}class Ke{constructor(n,a){this.appContext=n,this.providerData=a,this.triggerClientSideValidation=this.triggerClientSideValidation.bind(this),this.mapServerViolationsToClient=this.mapServerViolationsToClient.bind(this)}get email(){return this.appContext.checkout.proposal.proposed.email.value||void 0}get phone(){return this.appContext.checkout.proposal.proposed.phone.value||void 0}get displayContent(){return{contact:this.email}}get moreOptions(){if(this.hasCheckoutAsGuest(this.providerData))return this.providerData.checkoutAsGuest?[this.providerData.checkoutAsGuest]:void 0}get showShopPayVerification(){return!1}get hasError(){return!1}get shouldHide(){return!1}get shouldTriggerValidation(){return!1}get shouldClearClientSideValidation(){return!1}get shouldMapServerViolationsToClient(){return!1}triggerClientSideValidation(){return!1}clearClientSideValidation(){}mapServerViolationsToClient(){}get isEmbeddedPartner(){return!!this.appContext.embed?.isFlagshipPartner}get logo(){return null}get displayOptions(){return{vaultedContactType:"base",contentLayout:void 0}}hasCheckoutAsGuest(n){return typeof n=="object"&&n!==null&&"checkoutAsGuest"in n}}class Um extends Ke{get displayContent(){const n=this.appContext.checkout.proposal.proposed.email.value,a=this.appContext.checkout.proposal.proposed.shippingAddress.fields.firstName.value;return{contact:Gi(n,a)}}get logo(){const n=this.isEmbeddedPartner?"xsmall":"medium";return t(an,{wallet:Oa.AmazonPay,size:n})}}class zm extends Ke{get logo(){return t(an,{wallet:"APPLE_PAY_BORDERLESS",size:"xsmall"})}}const Ns="large-400";function Gm(){return t(b,{"aria-busy":!0,alignItems:"center",display:"inline",justifyContent:"center",children:t(b,{borderRadius:"fullyRounded",overflow:"hidden",children:t(Ea,{contentDisplay:"block",children:t(Wi,{})})})})}function Wi(){return t(He,{blockSize:Ns,inlineSize:Ns})}const Wm=jt({displayName:"VaultedContactAvatar",suspense:!1,load:()=>Kt(()=>Yt(()=>import("./VaultedContactAvatar.DYsvthUN.js").then(e=>e.V),__vite__mapDeps([104,1,2,3,4,5,6,7,8,9,105]))),renderLoading:()=>t(Gm,{}),renderError:()=>t(Wi,{}),useError:ul("VaultedContactAvatar")});function es(e,n=""){const a=e?.customerProfile?.firstName?.charAt(0),s=e?.customerProfile?.lastName?.charAt(0),o=n.charAt(0),i=(a??s??o).toUpperCase();return i?t(Wm,{initials:i}):null}class Ym extends Ke{get buyerIdentity(){return this.appContext.checkout.proposal.negotiated.fields?.buyerIdentity.value}get isOrderOrDraftSession(){return pl(this.appContext.source)}get displayContent(){const n=this.buyerIdentity?.purchasingCompany?.company.name??"",a=this.email;return{contact:this.appContext.i18n.translate("contact.company_contact_info",{companyName:n,contact:a??""})}}get logo(){return es(this.buyerIdentity,this.email)}get displayOptions(){return{vaultedContactType:"base",contentLayout:"box"}}get moreOptions(){const{accountInfo:n}=this.providerData,{i18n:a}=this.appContext;return n.showLogoutLink&&!this.isOrderOrDraftSession?[{label:a.translate("customer_account.sign_out_link_label"),onClick:n.logoutAndClearProposal}]:void 0}}class jm extends Ke{get displayContent(){const n=this.appContext.checkout.proposal.proposed.email.value,a=this.appContext.checkout.proposal.proposed.shippingAddress.fields.firstName.value;return{contact:Gi(n,a)}}get logo(){return t(an,{wallet:Oa.BuyWithPrime,size:"large"})}}class Km extends Ke{get buyerIdentity(){return this.appContext.checkout.proposal.negotiated.value.buyerIdentity}get logo(){return es(this.buyerIdentity,this.email)}get displayOptions(){return{vaultedContactType:"base",contentLayout:"box"}}get showShopPayVerification(){return!!this.email&&this.providerData.loadShopPayVerification}get moreOptions(){const{accountInfo:n}=this.providerData,{i18n:a}=this.appContext;return n.showLogoutLink?[{label:a.translate("customer_account.sign_out_link_label"),onClick:n.logoutAndClearProposal}]:void 0}}class qm extends Ke{get logo(){const n=this.isEmbeddedPartner?"xxxsmall":"xxsmall";
2return t(an,{wallet:"GOOGLE_PAY",size:n})}}function Yi({email:e,phone:n}){const{i18n:a,checkout:{configuration:s},observability:o,shop:{name:i}}=y(),{hasExternalOrderNotifications:r}=s,c=$m({email:e,phone:n}),d=r?c:void 0;D(()=>{d&&(o.log("shop_pay_external_order_notification_banner_suppressed","Withheld the order notification banner: this checkout's order notifications are the merchant's to send",{contact_type:d}),o.counter({name:"shop_pay_external_order_notification_banner_suppressed",value:1,attributes:{contact_type:d}}))},[o,d]);const l=se(()=>r?null:e?a.translate("account_management.email_changed",{shopName:i,email:Vs(e)}):n?a.translate("account_management.phone_changed",{shopName:i,phone:Vs(n)}):null,[e,n,i,a,r]);return l?t(q,{padding:"small-200 none none none",children:t(Ra,{tone:"info",children:l})}):null}function $m({email:e,phone:n}){if(e)return"email";if(n)return"phone"}const Vs=e=>t(O,{type:"strong",children:e});class Xm extends Ke{get displayContent(){return{contact:this.payPalEmail||this.email}}get logo(){const n=this.isEmbeddedPartner?"xxsmall":"small";return t(an,{size:n,wallet:"PAYPAL_EXPRESS"})}get payPalEmail(){return wc(this.appContext.checkout.proposal.proposed.paymentLines.value,"PAYPAL_EXPRESS")?.method.walletContent?.email||void 0}get children(){const n=this.displayContent.contact;return!!n&&!!this.email&&n!==this.email?t(Yi,{email:this.email}):null}get displayOptions(){return{vaultedContactType:"base",contentLayout:void 0,children:this.children}}}function Jm({url:e,displayName:n}){return t(b,{direction:"inline",gap:"small-400",alignItems:"center",children:[t(q,{inlineSize:"16px",blockSize:"16px",children:t(hl,{src:e,alt:"",accessibilityRole:"presentation",inlineSize:"fill",aspectRatio:"auto"})}),t(O,{size:"medium",type:"strong",children:n})]})}class Qm extends Ke{get displayContent(){const{i18n:n}=this.appContext,a=this.appContext.shop.contactInfoOptions.includes("PHONE");let s="";return this.email?s=this.email:this.phone&&a&&(s=this.phone),{label:n.translate("contact.contact_method_title"),contact:s,useSummaryInContent:!0}}get hasError(){const{validation:{contactErrors:{emailInputError:n,phoneInputError:a}}}=this.appContext.checkout;return ml({email:this.email,phone:this.phone,emailInputError:n.value,phoneInputError:a.value,hasViolations:this.displayableContactViolations.length>0})}get shouldHide(){const n=this.appContext.checkout.proposal.negotiated.fields.merchandiseLines.value?.lines;return!!this.appContext.embed?.interstitialPartnerDisplayName&&!this.appContext.checkout.identity.customerContactMethodPrefilled?!1:yl({isFlagshipPartner:!!this.appContext.embed?.isFlagshipPartner,hasError:this.hasError,hasOnlyDigitalItems:vl(n)})}get shouldTriggerValidation(){return!!(this.email||this.phone)}get shouldClearClientSideValidation(){const{validation:{contactErrors:{emailInputError:n,phoneInputError:a}}}=this.appContext.checkout;return!this.email&&!this.phone&&(this.isClearableContactError(n.value)||this.isClearableContactError(a.value))}get shouldMapServerViolationsToClient(){const{violationsSubscriptionResult:{hasViolations:n}}=this.providerData;return n}triggerClientSideValidation(){const{i18n:n}=this.appContext,{validation:{contactErrors:{emailInputError:a,phoneInputError:s}}}=this.appContext.checkout;a.value=void 0,s.value=void 0;const o=this.appContext.shop.contactInfoOptions.includes("PHONE"),i=this.validateContactInformation({email:this.email,phone:this.phone,phoneAllowed:o,translations:{emailBlank:n.translate("field_errors.email_blank"),emailInvalid:n.translate("field_errors.email_invalid"),blank:n.translate("field_errors.email_or_phone_blank")}});if(!i)return!1;switch(i.field){case"email":return a.value=i.error,!0;case"phone":return s.value=i.error,!0}}clearClientSideValidation(){const{validation:{contactErrors:{emailInputError:n,phoneInputError:a}}}=this.appContext.checkout;this.isClearableContactError(n.value)&&(n.value=void 0),this.isClearableContactError(a.value)&&(a.value=void 0)}mapServerViolationsToClient(){const{validation:{contactErrors:{emailInputError:n,phoneInputError:a}}}=this.appContext.checkout,{violationsSubscriptionResult:{clearViolations:s}}=this.providerData,o=!!(this.email||this.phone),i=!!n.value||!!a.value;for(const r of this.displayableContactViolations)i||!o||r.__typename!=="UnprocessableTermViolation"||(n.value=r.localizedMessage??r.n
2onLocalizedMessage,a.value=void 0);s()}get logo(){const n=this.appContext.embed,a=Zt({embedder:n?.embedder,shop:this.appContext.shop}),s=n?.interstitialPartnerDisplayName,o=n?.interstitialPartnerProfileIconUrl;return!a||!s||n?.isFlagshipPartner!==!0||!this.appContext.checkout.identity.customerContactMethodPrefilled?t(xe,{type:"email",size:"fill"}):o?t(Jm,{url:o,displayName:s}):es(void 0,this.email)}get displayOptions(){return{vaultedContactType:"rollup",expandable:!0,children:t(Ko,{showEmailMarketingOptIn:!1})}}get displayableContactViolations(){const{violations:n,negotiationStage:a}=this.providerData.violationsSubscriptionResult,s=bn(this.email)||this.appContext.shop.contactInfoOptions.includes("PHONE")&&bn(this.phone),o=a==="negotiation"&&!this.appContext.embed?.isFlagshipPartner&&s;return Array.from(n).filter(({code:i})=>!o||i!=="BUYER_IDENTITY_MISSING_CONTACT_METHOD")}validateContactInformation({email:n,phone:a,phoneAllowed:s,translations:o}){if(!n&&(!a||!s))return{field:"email",error:s?o.blank:o.emailBlank};if(n){const i=Ps(n,o.emailBlank),r=Lp(n,o.emailInvalid),c=i??r;if(c)return{field:"email",error:c}}else if(a&&s){const i=Ps(a,o.blank);if(i)return{field:"phone",error:i}}}isClearableContactError(n){return n?!(typeof n=="object"&&"origin"in n&&n.origin==="client"):!1}}class Zm extends Ke{#e;#t;constructor(n,a){super(n,a),this.#e=(this.appContext.mobileCheckoutSdk.enabled||!!this.appContext.embed?.isCheckoutKit())&&In(this.appContext.shopPay.app.config),this.#t=ko(this.appContext.router.currentUrl.value.search)}get displayContent(){return{contact:this.appContext.shopPay.user.email.value}}get logo(){return this.providerData.shopPayLogo}get moreOptions(){return this.providerData.shopPayMoreOptions}get children(){const n=this.displayContent.contact,a=!!n&&!!this.email&&n!==this.email,s=!!(this.phone&&!this.email);return a||s?t(Yi,{email:this.email,phone:this.phone}):null}get displayOptions(){let n;return(this.#e||this.#t||!this.appContext.shopPay.visibility.showVaultedContactInlineLogo)&&(n="stack"),this.appContext.shopPay.visibility.showVaultedContactHeader||(n="box"),this.appContext.shopPay.visibility.showVaultedContact?{vaultedContactType:"base",contentLayout:n,children:this.children}:{vaultedContactType:"hidden"}}}const ey={amazonPay:Um,applePay:zm,buyWithPrime:jm,businessCustomer:Ym,customerAccount:Km,googlePay:qm,payPal:Xm,sdkCartHints:Qm,shopPay:Zm};function ty(e,n){const a=e.checkout.identity.current.value;if(a==="guest")throw new ay;return ny(a,e,n)}function ny(e,n,a){const s=ey[e];return new s(n,a)}class ay extends Error{constructor(){super("Guest identity should never be instantiated. Guest identity has vaultedSections.contact=false, so VaultedContact never renders."),this.name="GuestIdentityError"}}const sy=new Nc(0,0,100);function oy(){const{shopPay:e,mobileCheckoutSdk:n,embed:a,router:s}=y(),o=s.currentUrl.value,r=!!a?.isFlagshipPartner?"small":"medium",c=(n.enabled||a?.isCheckoutKit())&&In(e.app.config),d=ko(o.search),l=As({foregroundColor:Op}),p=As({foregroundColor:sy});if(c||d||!e.visibility.showVaultedContactInlineLogo)return null;let u;return l?u="branded":p?u="white":u="black",e.logoBrand!=="shop"?t(vi,{color:u,size:r}):t(Mp,{color:u,size:r})}function iy(){const e=Da(),{i18n:n,observability:a,userEvents:s,source:o,checkout:i,shop:r,persistence:c,shopPay:d,router:l}=y(),{visibility:p,app:{config:u}}=d,m=In(u),{replaceShopPayInHistory:v}=Tp(),C=V((B,w)=>{if(w.status!=="success"){i.unstable_setRedirectingExternally(!1),a.log("shop_pay_switch_account_session_clear_failed","Shop Pay account switch session clear did not succeed",{status:w.status});return}c?.clearAll();const E=new URL(window.location.href);E.pathname=l.resolve(Dp).pathname,E.searchParams.set(Vc,"1"),v(E.toString())},[i,a,c,v,l]),f=Lo(C),{label:g}=Mo(),_=Bc({clearPii:!0}),P=gl(),S=!!d.config.isReferral,k=V(()=>{i.unstable_setRedirectingExternally(!0),s.monorailEvent({schemaId:"shopify_pay_payment_page_ui_interaction/1.2",payload:{...Ue(o,i,r),action:"switch_account"}},{exportImmediately:!0});const B=e.block();e.waitForPendingNegotiations().then(()=>
2f()).catch(()=>{i.unstable_setRedirectingExternally(!1)}).finally(B)},[f,s,o,i,r,e]),L={onClick:P?()=>{}:k,label:n.translate("account_management.switch_account")},M={onClick:_,label:g},A=[];return p.showSwitchAccountAction&&A.push(L),p.showCheckoutAsGuestKebabLink&&!S&&A.push(M),!m&&p.showSwitchVaultedContactMenu?A:void 0}function ry(){const e=y(),n=Cl(),a=_l(),s=Sl(),o=bl(),i=Hm(),r=J({amazonPayCheckoutAsGuest:n,applePayCheckoutAsGuest:a,buyWithPrimeCheckoutAsGuest:s,googlePayCheckoutAsGuest:o,payPalCheckoutAsGuest:i});return h(()=>{const d=r.value;switch(e.checkout.identity.current.value){case"amazonPay":return d.amazonPayCheckoutAsGuest;case"applePay":return d.applePayCheckoutAsGuest;case"buyWithPrime":return d.buyWithPrimeCheckoutAsGuest;case"googlePay":return d.googlePayCheckoutAsGuest;case"payPal":return d.payPalCheckoutAsGuest;default:return}})}function ji(){const e=y(),n=e.checkout.identity.current.value,a=se(()=>({appContext:e,identitySource:n}),[e,n]),s=fl().value,o=e.client.unstable_getSerialization("logoutUrl")||"",r=ry().value,c=Fd(),d=oy(),l=iy(),p=Fe(Fc),u=Lo(V(()=>{e.persistence?.clearAll(),window.location.assign(o)},[e,o])),m=V(()=>{e.checkout.unstable_setRedirectingExternally(!0),u().catch(()=>{e.checkout.unstable_setRedirectingExternally(!1)})},[e.checkout,u]);return se(()=>ty(a.appContext,{accountInfo:{logoutAndClearProposal:m,showLogoutLink:s},loadShopPayVerification:c.value,shopPayLogo:d,shopPayMoreOptions:l,checkoutAsGuest:r,violationsSubscriptionResult:p}),[a,m,s,c.value,d,l,r,p])}function Ki(e){const n=$(void 0),a=e.email,s=e.phone,o=!!(a||s);D(()=>{const i=n.current,r=!!i,c=!!(i?.email||i?.phone),d=!r||i?.email!==a||i?.phone!==s;e.shouldTriggerValidation&&d?e.triggerClientSideValidation():(!r||c)&&!o&&e.shouldClearClientSideValidation&&e.clearClientSideValidation(),n.current={email:a,phone:s}},[a,o,s,e]),D(()=>{e.shouldMapServerViolationsToClient&&e.mapServerViolationsToClient()},[e])}function ly({emailAddress:e,logo:n,moreOptions:a,emailAlignment:s="end",children:o}){const{i18n:i}=y(),c=Z().email.value,d=e??c,l=d||t(oe,{});return t(G,{children:[t(tt,{gridAutoFlow:"column",gridTemplateColumns:n?"minmax(auto, max-content) minmax(0, 1fr) minmax(auto, max-content)":"minmax(0, 1fr) minmax(auto, max-content)",gridTemplateRows:"minmax(0, 1fr)",gap:"small-300",alignItems:"center",alignContent:"center",justifyContent:s,justifyItems:s,children:[n,t(q,{maxInlineSize:"100%",children:typeof l=="string"?t(pe,{children:t(Pl,{children:l})}):l}),a&&t(zu,{accessibilityLabel:i.translate("review.account_more_actions"),positionArea:"block-end",options:a})]}),o]})}function qi({layout:e,emailAlignment:n,...a}){const{i18n:s}=y(),i=t(ly,{...a,emailAlignment:n??(e==="stack"||e==="box"?"start":"end")});switch(e){case"stack":return t(b,{gap:"base",padding:"none none base none",children:i});case"box":return t(q,{padding:"base none",children:t(b,{gap:"base",children:i})});default:return t(q,{role:"region",accessibilityLabel:s.translate("customer_account.rollup_label"),padding:"small-200 none base none",children:i})}}function $i(){const e="contact",n=Nt(e),a=V(()=>n.value=!n.value,[n]),s=ji();Ki(s);const o=ye(!1),i=ze(),r=$(!1),{embed:c,i18n:d}=y(),l=s.displayOptions,{vaultedContactType:p}=l,{label:u,contact:m,useSummaryInContent:v}=s.displayContent,C=s.email,f=s.phone,g=s.hasError;if(D(()=>{s.hasError&&(n.value=!0)},[s.hasError,n]),p==="hidden"||s.shouldHide&&!r.current)return null;r.current=!0;const _=v?m:void 0,P=c?.embedder==="amazon"?{compact:_}:{primary:_};return p==="rollup"?t(re,{id:e,label:u??d.translate("contact.contact_method_title"),primaryContent:P.primary,compactContent:P.compact,open:n.value||g,onToggle:g||!l.expandable?void 0:a,icon:s.logo,children:l.children??null}):t(G,{children:[t(qi,{emailAddress:m,phone:f,logo:s.logo,moreOptions:s.moreOptions,layout:l.contentLayout,children:l.children??null}),s.showShopPayVerification?t(T,{when:i,children:t(qo,{email:C??"",open:o.value,showPopover:S=>{o.value=S}})}):null]})}function cy(){return Al(new Set([...kt].filter(e=>e.startsWith("DELIVERY_COMPANY"))))}function dy({loading:e,countryCode:n,phone:a}){const s=xc(),{i18n:o,checkout:i}=y(),r=i.configuration.addressSettings.nonBillingAddressSettings.value,c=se(()=>r.isRequired("phone",{countryCode:n}),[n,r]),{validatePhoneNumber:d,isPhoneNumberUtilLoaded:l}=Ka(),p=V(m=>{const v=bn(m);if(c&&!v)return o.translate("field_errors.phone_blank");if(v&&!d(m??"",n))return o.translate("field_errors.shipping_line_phone_invalid")},[c,d,n,o]),u=$(!1);return D(()=>
2{if(u.current||!l||e)return;const m=p(a);s.value=m,u.current=!0},[c,l,e,a,s,p]),se(()=>({errorSignal:s,validatePhoneField:p,isPhoneRequired:c}),[s,c,p])}function Xi(){const{i18n:e,url:n,client:a}=y(),s=a.unstable_getSerialization("apiClientId"),o=io(s),i=Z().shippingAddress.value,{href:r,onClick:c}=Mo(),{countryName:d,loading:l}=oo(i),{hasViolations:p}=ue(en);if(!p)return null;if(o)return t(nt,{message:t(G,{children:e.translate("merchant_redirect.shop_app_not_supported",{storefront_link:t(Me,{href:n.storefront(),children:e.translate("contact.storefront_link")})})})});const u=l?i.countryCode:d;return t(nt,{message:t(G,{children:e.translate("payment_errors.payment_method_not_supported",{country:u,checkout_as_guest_link:t(Me,{href:r,onClick:c,children:e.translate("account_management.checkout_as_guest_link")})})})})}function uy({selectedAddress:e,shouldAddressModalSetAsDefault:n}){const{checkout:{address:a,identity:s},i18n:o}=y(),i=Z().shippingAddress.value,r=oo(i),{createAddressParts:c}=at(),d=V(_=>{c.addressModalState.value={status:"editing",address:Hc(_.address,{extendedAddressMode:a.extendedAddressMode}),addressType:"shipping",addressId:_.id,setAsDefault:n?"default":"disabled"}},[a.extendedAddressMode,c.addressModalState,n]),l=e?t(Me,{tone:"monochrome",onClick:()=>d(e),children:o.translate("shipping.address_update")}):o.translate("shipping.address_update"),{hasViolations:p}=ue(tn),{hasViolations:u}=ue(Oo),{hasViolations:m}=ue(kt),{hasViolations:v}=ue(en),{hasViolations:C}=ue(Uc),f=py({identity:s,hasMerchandiseUnavailableInBuyerLocationViolations:C,hasUnsupportedPaymentMethodViolations:v});if(f)return f;let g=o.translate("shipping_errors.invalid_selected_address");return u?g=o.translate("customer_account.incomplete_address",{update_address_link:l}):p?g=r.loading?t(b,{children:[t(oe,{inlineSize:"large"}),t(oe,{inlineSize:"small"})]}):o.translate("shipping_errors.shipping_method_not_available_generic.one"):(m||e)&&(g=o.translate("shipping_errors.invalid_selected_address_with_update_link",{update_address_link:l})),t(nt,{message:g})}function py({identity:e,hasMerchandiseUnavailableInBuyerLocationViolations:n,hasUnsupportedPaymentMethodViolations:a}){return e.current.value!=="shopPay"?null:n?t(xa,{}):a?t(Xi,{}):null}function Ji(){const{checkout:e,client:n}=y(),a=e.addressManager.shipping.value.selectedAddress.value,s=!!a?.default,o=n.unstable_getSerialization("apiClientId"),i=to(),r=$(!1),{hasViolations:c}=ue(tn),{hasViolations:d}=ue(Do),l=io(o);return D(()=>{(c||d)&&l&&!r.current&&(i.notify(c?{no_delivery_strategy_available:!0}:{out_of_stock_at_origin:!0}),r.current=!0)},[c,d,l,i]),t(uy,{selectedAddress:a,shouldAddressModalSetAsDefault:s})}const Qi=new Set(en);function Zi(){const{shopPay:e,checkout:n,source:a,observability:s}=y(),{deliveryMethodsAddressErrors:o}=at(),i=ap(),{shippingAddress:r}=Z(),c=r.value,d=n.configuration.addressSettings.nonBillingAddressSettings.value,l=a.type==="simulated",p=ps(c.countryCode,void 0,d),m=n.addressManager.shipping.value.selectedAddress.value?.address.countryCode,v=ps(m??c.countryCode,void 0,d,null),{details:C}=zc(m),f=!m||C!==void 0&&!C.isFallback,{clearViolations:g}=ue(Qi),_=$(!0);return D(()=>
2{if(_.current){_.current=!1;return}g()},[g,c]),sp("shippingAddress",async()=>{const P=async(k,L)=>{if(!await n.addressManager.shipping.value.createAddress(L)){const A=Object.values(o).some(B=>B.value!==void 0);return{success:!1,location:k,errors:A?[]:[i({offerGuestCheckout:!0})]}}return{success:!0}};if(!l){const k=n.addressManager.shipping.value.selectedAddress.value,L=n.proposal.negotiated.fields.buyerIdentity.value?.customerProfile;if(k&&L?.__typename==="CustomerProfile"&&L.shippingAddresses.some(A=>A.id===k.id)){const A=F=>{Et(()=>{for(const[U,W]of F)o[U].value=W})},B=()=>P("intercept_shipping_address_vault_ca",{address:k.address,selectAddress:!0,addressErrorsOverride:o});if(!f||k.address.countryCode!==m)return B();const w=v(k.address,"shipping");if(w.size===0)return B();const E=p(c,"shipping"),R=F=>{try{s.log("shop_pay_ca_vault_address_invalid","Selected customer-account address fails validation before Shop Pay vault-save",{invalidFields:Array.from(w.keys()).sort().join(","),proposalInvalidFields:Array.from(E.keys()).sort().join(","),proposalDiverges:!ca(c,k.address),outcome:F})}catch{}};if(E.size===0){const F=e.user.addresses.value.find(W=>ca(W.address,c));if(F&&await n.addressManager.shipping.value.selectAddress(F.id))return R("selected_matching_vaulted"),{success:!0};const U=await P("intercept_shipping_address_vault_ca_proposal",{address:c,selectAddress:!0,addressErrorsOverride:o});return R(U.success?"vaulted_proposal":"vault_proposal_rejected"),U}return R("blocked_client_side"),Ss({addressType:"shipping",validate:()=>E,setErrors:A})}}if(e.session.selectedShippingAddress.value||e.user.addresses.value.length)return{success:!0};const S=Ss({addressType:"shipping",validate:()=>p(c,"shipping"),setErrors:k=>{Et(()=>{for(const[L,M]of k)o[L].value=M})}});return S.success?e.user.flow.peek()==="authenticated_user"?P("intercept_shipping_address_add_new",{address:c,addressErrorsOverride:o}):{success:!0}:S}),null}const ts=()=>{const{shopPay:e}=y(),{geolocation:n}=El(),{shippingAddress:a}=Z();return h(()=>{const s=a.value;return e.signup.phoneCountryCode.value??s.countryCode??n.country.code})},hy=()=>{const{shopPay:e,checkout:n}=y(),a=n.configuration.addressSettings.nonBillingAddressSettings.value,{shippingAddress:s}=Z(),o=e.signup.phoneNumber.value,i=e.signup.phoneError.value,r=s.fields.countryCode.value,c=s.fields.phone.value,{deliveryMethodsAddressErrors:d}=at(),l=d.phone.value,{setAddressError:p}=Rl(d),u=ts(),{isPhoneNumberUtilLoaded:m}=Ka(),v=$(!1),C=gi(u.value,o,!0);D(function(){c&&!o&&e.signup.unstable_setPhoneNumber(c);const g=e.signup.phoneCountryCode.value;r&&!g&&e.signup.unstable_setPhoneCountryCode(r)},[]),D(()=>{if(!v.current&&m&&o){const{prefix:f}=C;o.startsWith(f)||e.signup.unstable_setPhoneNumber(`${f}${o}`),v.current=!0}},[m]),Wc(async({parts:f,reason:g})=>{if(g!=="negotiation")return{behavior:"allow"};const{shippingAddress:_}=f;let P=e.signup.phoneNumber.peek();(!P||P===C.prefix)&&(P=void 0);const S=_.peek().phone;return{behavior:"allow",perform(){P!==S&&a.isVisible("phone",{countryCode:u.value,useMerchantSettings:!0})&&(_.fields.phone.value=P)}}}),D(function(){i!==l&&p("phone",i)},[i,l,p])},my=()=>{const{i18n:e,shopPay:n}=y(),{isPhoneNumberUtilLoaded:a,validatePhoneNumber:s}=Ka(),o=ts(),i=V(r=>{if(!bn(r))return e.translate("field_errors.phone_blank");if(a&&!s(r??"",o.value,!0))return e.translate("mobile_phone_number.mobile_phone_invalid")},[e,a,s,o]);return Gc(n.signup.phoneNumberRawSignal,n.signup.phoneErrorRawSignal,i)};function er({padding:e}){const{i18n:n,shopPay:a}=y(),{shopPayMobilePhoneInputShownSignal:s}=at(),o=ts(),i=!!a.user.phoneNumber.value,r=my();An(()=>(s.value=!0,()=>{s.value=!1}),[s]);const c=$(o.peek());hy();const d=V(l=>{a.signup.unstable_setPhoneCountryCode(l)},[a.signup]);return t(b,{gap:"base",padding:e,children:[t(wp,{name:"phone",countryCode:c.current,label:n.translate("mobile_phone_number.label"),autocomplete:"shipping tel",requireCountryCode:!0,disabled:i,onSelectedCountryChange:d,...r}),t(pe,{type:"small",color:"subdued",children:n.translate("mobile_phone_number.disclaimer")})]})}const Bs="shipping";function tr({filteredFields:e,additionalFieldGroups:n,children:a,settings:s}){const{deliveryMethodsAddressErrors:o}=at(),{shippingAddress:i}=Z(),r=To(),{shouldGateCrossBorder:c,crossBorderGate:d}=fi(),l=(z,X,Y)=>{c(z)?d(X,{onCancel:Y}):X()},p=y(),{checkout:u,i18n:m,userEvents:v,source:C,shop:f}=p,{configuration:g}=u,_=g.isAddressDelegationEnabled,{violations:P}=ue(kt),S=i.fields?.countryCode.value,k=ro(S),L=$(!1);D(()=>
2{if(!_||L.current||P.size===0||(L.current=!0,Object.values(o).some(Y=>{const H=Y.value;return H&&typeof H=="object"&&H.origin==="client"&&H.type==="inline-validation"})))return;const X=k(Bs,Array.from(P));Et(()=>{for(const[Y,H]of X)o[Y]?.value===void 0&&(o[Y].value=H)})},[_,P,k,o]);const M=g.addressSettings.nonBillingAddressSettings.value,A=i.value,B=wo(),{hasViolations:w}=ue(Qi),E=g.defaultPhoneNumber.value;M.isRequired("phone",{countryCode:A.countryCode,useMerchantSettings:!0})&&!A.phone&&E&&(i.value={...A,phone:E});const F=J(!!(e&&e.length>0)),U=g.trackAddressAutoComplete?()=>{v.monorailEvent({schemaId:"shopify_pay_payment_page_ui_interaction/1.2",payload:{...Ue(C,u,f),action:"address_autocomplete"}})}:void 0,W=t(mp,{id:"shippingAddressForm",addressType:Bs,address:i,countries:r,settings:s,addressErrors:o,additionalFieldGroups:n,showSavedAddressSelector:!1,onAddressAutoComplete:U,onBeforeCountryChange:l,filteredFields:e,children:a}),N=t(T,{when:F,fallback:W,children:t(q,{background:"base",borderRadius:"base",className:Yc({colorLayer:"controlSelected"}),paddingInline:"base",paddingBlockStart:"large-100",paddingBlockEnd:"base",children:t(b,{direction:"block",gap:"base",children:[t(q,{padding:"none",children:[t(pe,{children:[A.firstName," ",A.lastName]}),t(Il,{address:A,hiddenFields:["firstName","lastName","phone"],textColor:"subdued"})]}),W]})})});return t(qa,{impressionType:"delivery_address",impressionFeatures:[],children:[yy(p)&&t(Zi,{}),w&&g.visibility.showInvalidDeliveryAddressBanner.value&&t(q,{children:[t(Ji,{}),t(He,{blockSize:"base"})]}),t(T,{when:B,children:t(q,{children:[t(Ra,{tone:"info",children:m.translate("address_management.draft_order_delivery_address_reminder")}),t(He,{blockSize:"base"})]})}),N,t(T,{when:g.visibility.showStandalonePhoneField,children:t(er,{padding:"base none none none"})})]})}function yy({checkout:e}){return e.identity.current.value==="shopPay"}const yn=e=>{if(!e)return"unknown";const{taxId:n}=e;if(n.warnings.includes("DOMESTIC_NOT_APPLICABLE"))return"write";const{status:s}=e.taxId;return s.type==="pending"&&n.validated.status==="VALID"||s.type==="resolved"&&s.validationStatus==="VALID"?"vaulted":"write"};function vy(e,n){const[a,s]=mt(yn(e)),o=$(null),i=ye(!1);a==="vaulted"&&yn(e)!==a&&s("write"),a==="unknown"&&yn(e)!==a&&s(yn(e));const r=V(d=>{o.current=d,n.value&&d&&i.value&&(i.value=!1,d.focus())},[i,n]);Ae(()=>{n.value&&o.current&&i.value&&(i.value=!1,o.current.focus())});const c=V(()=>{i.value=!0,s("write"),n.value&&o.current&&(i.value=!1,o.current.focus())},[i,n]);return{status:a,inputRef:r,focus:c}}function ns(){const e=kl(),{paymentLines:n}=Z(),{walletUsedForSubmissionSignal:a}=Jt();return h(()=>e.value||jc({paymentLines:n.value,walletUsedForSubmission:a.value}))}function gy({countryCode:e,addressType:n,addressViolations:a}){const{shop:s,checkout:{identity:o}}=y(),i=s.hasFlagEnabled(Kc),r=ye(void 0),{violations:c}=Ll(a),d=ro(e),l=ye(!1),p=o.current.value==="applePay"||o.current.value==="googlePay"||o.current.value==="payPal";if(i&&p&&r.value===void 0&&c.size>0&&!l.value){l.value=!0;const u=Array.from(c),m=d(n,u),v=Ml({addressErrors:m});v&&(r.value=v)}return{missingAddressFieldSignal:r,hasResolvedMissingAddressFieldSignal:l}}function fy(){const{i18n:e}=y(),{hasViolations:n}=ue(tn),{hasViolations:a}=ue(Vo),{hasError:s,error:o}=En(No),i=eo(o?{type:"payment",code:o}:void 0);return s&&i?t(It,{tone:"critical",errorType:Ne.DeliveryError,children:i}):n?t(nt,{message:e.translate("shipping_errors.shipping_method_not_available_generic.one")}):a?t(nt,{message:e.translate("shipping_errors.shipping_method_not_available_due_to_unsatisfied_conditions")}):null}function Cy(e,n){return e.isAddressDelegationEnabled&&n!=="shopPay"&&!qc(n)}function _y({checkout:e,userEvents:n,shop:a,source:s},o){e.identity.current.value==="shopPay"&&n.monorailEvent({schemaId:"shopify_pay_payment_page_ui_interaction/1.1",payload:{...Ue(s,e,a),action:o?"shipping_addresses_expand":"shipping_addresses_collapse"}})}function Sy({checkout:e,i18n:n},a){return e.configuration.visibility.showInvalidDeliveryAddressBanner.value?t(Ji,{}):a?t(nt,{message:n.translate("shipping_errors.unavailable_address_country")}):null}
2const by=new Set([...kt,...tn,...en,...Do]),Py=["phone","zoneCode","countryCode","firstName","lastName","name"],Ay=["phone","zoneCode","countryCode","firstName","lastName","name","coordinates","oneTimeUse"],Ey=300;function vn(e){return e==="pending"||e==="pendingCollapsed"}function ra(e){return e==="collapsed"||e==="pendingCollapsed"}function nr({summary:e,forceOpen:n}={}){const{shippingAddress:a}=Z(),{allViolations:s}=j(),i=Iy()??e,r=J(fy()),c=wo(),{embed:d,i18n:l,shopPay:p,observability:u,userEvents:m,checkout:v,source:C,shop:f}=y(),g=d?.client?.addressErrors.value.includes($c.AddressEmpty)??!1,_=To(),{installments:P}=p,S=v.identity.current.value==="shopPay",{isMissingPhone:k}=si(),{isMissingFirstName:L}=oi(),M=k||L,A=d?.embedder==="google",B=v.configuration.addressSettings.nonBillingAddressSettings.value,w=h(()=>A&&B.isVisible("phone",{countryCode:a.value?.countryCode})),{formattedNumber:E}=gi(a.value?.countryCode??"",w.value?a.value?.phone:void 0),R=h(()=>Cy(v.configuration,v.identity.current.value)),{deliveryMethodsAddressErrors:F}=at(),U=h(()=>Object.values(F).some(Ie=>Ie.value!==void 0)),W=h(()=>!!(a.value?.countryCode&&!_?.some(Ie=>Ie.value===a.value.countryCode))),N=Sy({checkout:v,i18n:l},W.value),z=h(()=>Ry(a.value,R.value?Ay:Py)),[X,Y]=mt([]),{availableDeliveryAddresses:H,mustSelectProvidedAddress:K}=v.proposal.negotiated.fields,x=h(()=>H.value??[]),le=h(()=>K.value??!1),ie=ee("Checkout::DeliveryAddress::RenderBefore"),Q=ee("purchase.checkout.delivery-address.render-after"),te=Pn([...ie,...Q],{lazyReveal:!0}),de=Ol(),ce=h(()=>x.value?.length&&!!x.value.find(Ie=>ca(a.value,Ie.address))),ne=h(()=>!!(ce.value&&le.value)),fe=lo(),Ee=ze(),Ce=Va(Ia),ve=h(()=>Ee.value&&Ce.uiStateSignal.value?.status==="loading"),Se=h(()=>Ce.uiStateSignal.value?.status==="filled"),he=h(()=>!R.value||!z.value&&Se.value),Oe="deliveryAddress",I=Nt(Oe,ht(()=>(te.value||ne.value)&&he.value)),Re=vy(fe,I),ge=$(null),De=$(null),Ve=$(!1),ae=ye("idle"),qe=vn(ae.value),Te=ra(ae.value),$e=ye(!1),Be=$a(Bo([...ie,...Q],"uiExtension").map(Ut),V(()=>{he.value&&(I.value=!0)},[he,I]));D(()=>{Be&&he.value&&($e.value=!0)},[Be,$e,he.value]);const be=h(()=>R.value&&$e.value);D(()=>{he.value&&(te.value||Be)&&(I.value=!0)},[te.value,he.value,Be,I]),An(()=>{de.current&&(R.value&&z.value||R.value&&Te||ce.value===!1&&(I.value=!0))},[ce.value,I,de,R.value,z.value,Te]),Xa({isMissing:M,open:I});const yt=ba(),vt=yt.value.deliveryAddressErrors,We=h(()=>yt.value.deliveryAddressErrors.length>0),it=ns().value||v.identity.current.value==="payPal",{hasViolations:Xe,violations:sn,clearViolations:rt}=ue(by),{missingAddressFieldSignal:lt,hasResolvedMissingAddressFieldSignal:on}=gy({countryCode:a.value?.countryCode,addressType:"shipping",addressViolations:kt}),gt=h(()=>!!lt.value&&!I.value),Bn=new Set([...k?Xc:[],...L?Jc:[],...gt.value?kt:[]]),ft=ao(Xe,sn,Bn),{hasError:rn,clearError:Ct}=En(No),Fn=P.agreementError.value===Np.InvalidShippingAddress,xn=Ge("deliveryNext"),ln=h(()=>!Ee.value||xn.value);Ae(()=>{ve.value&&ht(()=>{Ct(),P.unstable_setAgreementError(null)})});const Hn=V(()=>{rt(),Ct(),P.unstable_setAgreementError(null)},[rt,Ct,P]),Un=$t(a.value,{hiddenFields:["phone"],displayName:!1}),Cr=l.formatName(a.value?.firstName,a.value?.lastName,!0),zn=a.value?.firstName&&a.value?.lastName?Cr:void 0,cn=so({address:a.value??{}}),_r=t(T,{when:z,fallback:t(b,{children:[Un,w.value&&E&&t(O,{children:E})]}),children:t(O,{tone:"critical",children:l.translate("shipping.add_shipping_address")})}),as=z.value?t(O,{tone:g?"critical":void 0,children:l.translate("shipping.add_shipping_address")}):zn,ss=z.value?void 0:t(b,{children:[cn.primary&&t(O,{children:cn.primary}),cn.secondary&&t(O,{children:cn.secondary}),w.value&&E&&t(O,{children:E})]}),os=t(T,{when:()=>z.value||!a.value?.postalCode,fallback:t(G,{children:[t(O,{children:l.translate("shipping.delivery_to")}),t(O,{type:"strong",children:zn})]}),children:t(O,{tone:"accent",decoration:"underline",children:l.translate("shipping.add_new_delivery_address")})}),is=h(()=>a.value?.postalCode),rs=t(T,{when:()=>z.value||!is.value,fallback:t(b,{children:[t(O,{type:"strong",children:is}),w.value&&E&&t(O,{children:E})]}),children:()=>""}),Gn=(()=>
2{if(i)return{primary:i};switch(d?.embedder){case"amazon":return{compact:t(b,{direction:"inline",gap:"small-400",alignItems:"center",children:[os,rs]})};case"google":return{primary:as,secondary:ss};default:return{primary:zn,secondary:_r}}})(),_t=h(()=>Qc(s.value??[])&&!ve.value),Sr=J(ft&&!_t.value||rn||Fn),Wn=h(()=>ln.value?null:Sr.value&&N&&!ve.value?{type:"invalid-address-banner",element:N}:r.value&&!_t.value&&!ve.value?{type:"default-vaulted-delivery-address-error-banner",element:r.value}:We.value&&!it&&!_t.value?{type:"validation-errors-banner",element:t(Pa,{errors:vt,errorType:Ne.DeliveryError})}:_t.value?{type:"unavailable-in-buyer-location-banner",element:null}:null),ls=t(ky,{errorSignal:Wn}),br=h(()=>!!Wn.value||it&&We.value),Pr=J(ft),Yn=J(rn),Ar=J(n),Er=J(Be),dn=h(()=>U.value||Pr.value||We.value),jn=h(()=>!!Ar.value||te.value||Er.value&&he.value||be.value),St=h(()=>R.value&&vn(ae.value)&&ra(ae.value)&&!jn.value&&!Yn.value&&!_t.value),Rr=h(()=>on.value&&lt.value===void 0),Kn=h(()=>dn.value&&!St.value),cs=h(()=>R.value&&Se.value&&!Kn.value),un=h(()=>cs.value&&ra(ae.value)),bt=h(()=>jn.value||Yn.value||Rr.value||!St.value&&br.value),Ir=h(()=>dn.value&&!(R.value&&vn(ae.value))||_t.value||jn.value||Yn.value);Ve.current=Ir.value;const Bt=h(()=>{if(R.value){if(z.value)return!1;if(un.value)return bt.value;if(U.value&&!St.value&&!(on.value&&lt.value))return!0}return I.value||bt.value}),Je=V(()=>{De.current&&(clearTimeout(De.current),De.current=null)},[]),Qe=V(()=>{Je(),ae.value="idle"},[Je,ae]),qn=V(()=>{if(Je(),Ve.current){ae.value="collapsed",I.value=!0;return}ae.value="collapsed",I.value=!1},[Je,ae,I]),ds=V(()=>{Je(),De.current=setTimeout(()=>{De.current=null,!Ve.current&&(ae.value="pendingCollapsed",I.value=!1)},Ey)},[Je,ae,I]),ct=V(()=>{Qe(),I.value=!0},[Qe,I]);D(()=>Je,[Je]),D(()=>{R.value&&dn.value&&!qe&&Qe()},[qe,dn.value,R.value,Qe]);const $n=V(async()=>{if(!R.value||!d?.client||vn(ae.value))return;Y([]),ae.value="pending";const Ie=Bt.value;be.value||ds();const Ft=performance.now();try{const Ze=await d.client.addressChangeStart("shipping").then(me=>({response:me,error:void 0})).catch(me=>({response:void 0,error:me})),Le=performance.now()-Ft;if(Ze.error){const{error:me}=Ze;if(me instanceof Zc){u.log("third_party_delivery_address_timeout","Address change timed out, falling back to manual entry.",{duration:Le}),Y([{code:"GENERAL_ERROR",message:String(l.translate("shipping.third_party_address_timeout"))}]),ct();return}const us=me instanceof Error?me.message:String(me);if(me instanceof ed&&me.isUserCancelledError){u.log("third_party_delivery_address_cancelled","User cancelled address selection",{duration:Le}),Qe(),I.value=Ie,ge.current?.focus();return}me instanceof td?(u.log("third_party_delivery_address_protocol_error","Address change failed due to protocol/schema violation",{duration:Le,technicalError:us}),d.client.error({code:"INVALID_PAYLOAD",message:"Invalid response format from address selection",timestamp:Date.now()})):u.log("third_party_delivery_address_error","Address change failed with error",{duration:Le,error:us}),Y([{code:"GENERAL_ERROR"}]),ct();return}const{response:Ye}=Ze;if(!Ye||typeof Ye!="object"){u.log("embedder_invalid_response","Invalid or missing response from embedder",{event:"checkout.addressChangeStart",duration:Le,receivedResponse:Ye}),d.client.error({code:"INVALID_PAYLOAD",message:"Invalid or missing response from address selection",timestamp:Date.now()}),Y([{code:"GENERAL_ERROR"}]),ct();return}if(Ye?.errors&&Ye.errors.length>0){Y(Ye.errors),u.log("embedder_error_cancelled_operation","Address change cancelled due to embedder errors",{event:"checkout.addressChangeStart",errorCodes:Ye.errors.map(me=>me.code),duration:Le}),ct();return}if(Ye?.cart){Et(()=>{for(const me of Object.values(F))me.value=void 0;rt()});try{await d.client.applyCart(Ye.cart),Ce.dispatch("addressReplaced"),be.value?Qe():qn(),u.log("address_change_start_success","Successfully applied address change from embedder",{duration:Le}),ge.current?.focus()}catch(me){u.log("cart_update_failed_after_address_change","Failed to apply cart update after address change",{event:"checkout.addressChangeStart",error:me instanceof Error?me.message:String(me),duration:Le}),d.client.error({code:"INVALID_CART",message:"Failed to apply cart update after address change",timestamp:Date.now()}
2),Y([{code:"GENERAL_ERROR"}]),ct()}}else be.value?Qe():qn()}catch(Ze){const Le=performance.now()-Ft;u.log("third_party_delivery_address_error","Error delegating address change to embedder.",{error:Ze instanceof Error?Ze.message:String(Ze),duration:Le}),Y([{code:"GENERAL_ERROR"}]),ct()}},[be,R,d,u,Y,l,F,ae,Ce,rt,Bt,ds,ct,Qe,I,qn]),kr=V(async()=>{if(be.value)return;if(R.value){if(I.value)return;await $n();return}const Ie=!I.value;_y({userEvents:m,source:C,checkout:v,shop:f},Ie),I.value=Ie},[be,m,C,v,f,I,$n,R]);D(()=>{if(R.value&&Te&&!Kn.value&&!bt.value){I.value=!1;return}Bt.value?I.value=!0:un.value&&!bt.value&&(I.value=!1)},[I,R.value,Te,Kn.value,Bt.value,un.value,bt.value]);const Lr=ie.length===0&&Q.length===0,Mr=x.value.length===1&&le.value&&Lr,Or=c.value,Dr=!ln.value&&!ve.value&&!St.value&&ft&&!(R.value&&z.value),Tr=R.value&&!St.value&&U.value&&!z.value,wr=Dr||Tr,Nr=(()=>{if(R.value){const{firstName:Ie,lastName:Ft}=a.value,Le=l.formatName(Ie,Ft,!0);return t(b,{children:[Ie&&Ft&&t(O,{children:Le}),t(T,{when:z,fallback:t(O,{color:"subdued",children:Un}),children:t(O,{tone:"critical",children:l.translate("address_management.address_form.add_address")})})]})}return i??Un})(),Vr=z.value?l.translate("shipping.add_shipping_address"):void 0,Xn=fe&&!Bt.value?t(Vp,{vatNumber:fe.taxId.value,onAdd:()=>{I.value=!0,Re.focus()}}):void 0,Jn=gt.value?t(q,{padding:"none base base base",children:t(tr,{filteredFields:lt.value?[lt.value]:void 0})}):void 0,Br=Jn&&Xn?t(b,{direction:"block",gap:"base",children:[Jn,Xn]}):Jn??Xn,Fr=t(Ra,{tone:"info",children:l.translate("address_management.draft_order_delivery_address_reminder")}),xr=un.value&&!bt.value||St.value?null:c.value?t(G,{children:[ls,Fr]}):Wn.value?ls:null,Hr=gt.value?{}:{primaryContent:Gn.primary,secondaryContent:Gn.secondary,compactContent:Gn.compact,inlinePrimaryContent:as,inlineSecondaryContent:ss,compactPrimaryContent:os,compactSecondaryContent:rs,summary:Nr};return t(G,{children:[S&&t(Zi,{}),t(re,{buttonRef:ge,open:I.value,id:Oe,label:l.translate("shipping.shipping_address_title"),error:xr,buttonAccessibilityLabel:Vr,...Hr,secondaryPersistentContent:Br,onToggle:Or?void 0:kr,disabled:be.value||Mr||(cs.value?!1:wr),renderChildrenWhenCollapsed:!0,icon:t(xe,{id:"deliveryAddress-truckIcon",type:"truck",size:"fill"}),children:t(yh,{embedderErrors:X,onDismissEmbedderErrors:()=>Y([]),showMissingAddressField:gt.value,onAddressDelegation:$n,onFirstNamePersisted:Hn,vatIdFieldMode:Re})})]})}function Ry(e,n=[]){const a=Object.entries(e).reduce((o,[i,r])=>(typeof r!="boolean"&&!r||n.includes(i)||(o[i]=r),o),{});return Object.keys(a).length===0}function Iy(){const e=j().buyerIdentity.value?.purchasingCompany,n=no();return e?t(Ui,{formattedAddress:n}):void 0}const gn=({errorBanner:e})=>t(q,{paddingBlock:"small-500",children:e}),ky=({errorSignal:e})=>{const n=e.value;if(!n)return null;const a=n.type;switch(a){case"invalid-address-banner":return t(gn,{errorBanner:n.element});case"default-vaulted-delivery-address-error-banner":return t(gn,{errorBanner:n.element});case"unavailable-in-buyer-location-banner":return t(gn,{errorBanner:t(xa,{})});case"validation-errors-banner":return t(gn,{errorBanner:n.element});default:Yr(a)}};function Ly(){const{formattedAddress:e,address:{phone:n,countryCode:a}}=Dl(["company"]),o=!fa().value,{errorSignal:i}=dy({loading:o,phone:n,countryCode:a}),r=!!cy()?.length,c=!!Tl()?.length,d=!!i.value,l=!!(c||r||d);return t(nr,{summary:o?t(oe,{}):t(b,{direction:"inline",children:[l&&t(G,{children:[t(xe,{tone:"critical",type:"alert-circle"}),t(He,{display:"inline",inlineSize:"small-400"})]}),e]}),forceOpen:l})}function My(){const e=j().buyerIdentity,n=wl(),a=co();return h(()=>!!e.value?.purchasingCompany&&(!n.value||a.value))}function ar(){const{checkout:{identity:e}}=y(),n=My();return e.current.value==="amazonPay"||e.current.value==="buyWithPrime"?t(Ly,{}):n.value?t(Za,{}):t(nr,{})}function sr(){const{i18n:e,router:n}=y(),a=j().buyerIdentity.value?.purchasingCompany,s=yi(),o=co(),i="deliveryAddress",r=h(()=>Tn(n,i));return!a||a.contact.locationCount<=1||o.value?t(we,{id:i,level:1,autoFocus:r.value,children:e.translate("shipping.delivery_title")}):t(tt,{gridTemplateColumns:"@media (inline-size >= small) 'minmax(0, 1fr) minmax(auto, max-content)', 'minmax(0, 1fr)'",gap:"@media (inline-size >= small) base, none",alignItems:"@media (inline-size >= small) center, ''",alignContent:"@media (inline-size >= small) center, ''",justifyContent:"@media (inline-size >= small) start, ''",justifyItems:"@media (inline-size >= small) start, ''",children:[t(we,{id:i,level:1,autoFocus:r.value,children:e.translate("contact.ship_to_company",{companyName:a.location.name})}),t(T,{when:s,children:t(ri,{})})]})}function Oy(){const{i18n:e}=y(),{eligibility:n,redeemableBalance:a,messages:s,isDigitalGoodsRedemptionAllowed:o}=xi(),i=(n.eligible||o)&&a,r=s.length>0?t(b,{gap:"small-200",children:s}):void 0;return!i&&!r?null:i?t(Dy,{redeemableBalance:a,messages:r}):t(re,{id:"cashRedemption",open:!1,label:e.translate("order_summary.shop_cash_title"),error:r})}function Dy({redeemableBalance:e,messages:n}){const{i18n:a}=y(),{amount:s,checked:o,handleChange:i,disabled:r}=Vi(e),c=e?a.formatCurrency(e.amount,{currency:e.currencyCode,form:"short"}):void 0;return t(re,{id:"cashRedemption",open:!0,label:a.translate("order_summary.shop_cash_title"),primaryContent:c,error:n,primaryAction:t(Ni,{checked:o,onChange:i,disabled:r}),children:t(O,{fonts:"primary",tone:"accent",children:s})})}const Ty=()=>{const{i18n:e}=y(),n=ye(!0),{value:a}=j().optionalDuties,s=a?.buyerRefusesDuties?e.translate("shipping.duties_and_taxes_options.ddu_title"):e.translate("shipping.duties_and_taxes_options.ddp_title");return t(re,{open:n.value,id:"optionalDuties",label:e.translate("shipping.duties_and_taxes_title"),primaryContent:s,onToggle:()=>n.value=!n.value,children:t(Ci,{})})};function wy(e){const n=$(),a=h(()=>{const o=e.value?e.value.methods.length-1:void 0;return o!==void 0&&(n.current=o),o}),s=h(()=>a.value??n.current);return{currentAdditionalLocations:a,additionalLocationsCount:s}}const Fs=20,xs={isLocationFormVisible:!1};function Ny(){const{i18n:e,shop:n}=y(),{deliveryNext:a}=j(),{progressing:s}=ot(),o=Ge("deliveryNext"),i=ze(),{value:r}=ka().value,{value:c}=uo().value,d=!!(r||c),l=Ba(),p=h(()=>nd(a.value)??[]),u=h(()=>n.shipPickupInOneOrderEnabled?l.value&&Fo(l.value):p.value[0]),m=h(()=>u.value?.handle??""),v=h(()=>({handle:m.value})),C=$o(),{isOnlyCountryAvailable:f}=Xo(),g=$t(u.value?.pickupLocation?.address,{hiddenFields:["postalCode","countryCode","phone"]}),_=ee("Checkout::PickupLocations::RenderBefore"),P=ee("Checkout::PickupLocations::RenderAfter"),S=ee("purchase.checkout.pickup-location-option-item.render-after"),k=_.length>0?t(Pe,{customizations:_,options:xs}):void 0,L=P.length>0?t(Pe,{customizations:P,options:xs}):void 0,M=xd(),A=po({methods:p.value||[],selectedDeliveryMethodHandle:u.value?.handle}),[B,w]=mt(!1),E=ye(!1),R=de=>{w(!0),E.value=de??!1},F=()=>{w(!1),E.value=!1},U=()=>{A(f?"checkout_pickup_geoselector_clicked_country_grain":"checkout_pickup_geoselector_clicked_other_grain")},{currentAdditionalLocations:W,additionalLocationsCount:N}=wy(l),z=h(()=>!!W.value||i.value&&o.value&&N.value!==0);let X,Y,H,K,x;const le=M.value?t(b,{gap:"small-200",children:t(Hd,{variant:"banner"})}):void 0;if(i.value&&!s.value&&o.value)X=t(oe,{}),Y=t(oe,{inlineSize:"base"}),H=t(oe,{inlineSize:"small"}),x=le;else if(u.value?.pickupLocation){const{cost:{amount:de,currencyCode:ce},pickupLocation:{name:ne}}=u.value,fe=u.value.pickupLocation?.type==="PickupInStoreLocation"?u.value.pickupLocation.distanceFromBuyer:void 0,Ee=fe&&!f?Ud(e,fe):void 0,Ce=de===0?e.translate("shipping.free_rate_label"):e.formatCurrency(de,{currency:ce}),ve=u.value.pickupLocation.type==="PickupInStoreLocation"&&u.value.pickupLocation.instructions.trim();X=t(G,{children:[ne,t(Bp,{}),Ce]}),Y=g||void 0;const Se=Ee||ve?t(Gd,{distanceLabel:Ee,instructions:ve||void 0}):null,he=S.length>0?t(Pe,{customizations:S,options:v.value}):null;Se&&he?H=t(b,{gap:"small-400",children:[Se,he]}):H=Se??he??void 0,K=k?t(b,{gap:"small-200",children:k}):void 0,x=le||L?t(b,{gap:"small-200",children:[le,L]}):void 0}const ie=!o.value&&d===!0,Q=d?t(Jo,{onClick:()=>{R(),U()},commandFor:zd}):void 0,te=z.value?t(Vy,{locationCount:N.value,onShowModal:R,onTrackAnalytics:()=>A("checkout_pickup_buyer_reveal_more")}):void 0;return C?t(G,{children:[t(re,{open:ie,id:"pickupLocations",label:e.translate("local_pickup.title"),primaryContent:X,secondaryContent:Y,tertiaryContent:H,primaryPersistentContent:K,secondaryPersistentContent:x,primaryAction:Q,secondaryActions:te,children:t(vh,{onShowModal:R})}),t(da,{methods:l.value?.methods,type:l.value?.type,open:B,onClose:F,addressFocus:E})]}):t(G,{children:[t(re,{open:ie,id:"pickupLocations",label:e.translate("local_pickup.title"),primaryAction:Q,secondaryActions:te,primaryContent:X,secondaryContent:Y,tertiaryContent:H,primaryPersistentContent:K,secondaryPersistentContent:x}),t(da,{methods:l.value?.methods,type:l.value?.type,open:B,onClose:F,addressFocus:E})]})}function Vy({locationCount:e,onShowModal:n,onTrackAnalytics:a}){const{progressing:s}=ot(),o=Ge("deliveryNext"),i=ka(),r=h(()=>s.value||!o.value&&!i.value.loading);return t(T,{when:r,fallback:t(oe,{}),children:t(By,{locationCount:e,onShowModal:n,onTrackAnalytics:a})})}function By({locationCount:e,onShowModal:n,onTrackAnalytics:a}){const{i18n:s}=y();return e?t(Rn,{variant:"plain",textDecoration:"none",inlineAlignment:"start",onClick:()=>{n(),a()},children:t(b,{direction:"inline",gap:"small-400",alignItems:"center",children:t(O,{type:"strong",children:e>Fs?s.translate("local_pickup.toggle_multiple_locations",{count:String(Fs)}):s.translate("local_pickup.toggle_more_locations",{count:e})})})}):null}function Fy(){const{i18n:e,checkout:n}=y(),a=Z().shippingAddress.value,{deliveryNext:{value:s},buyerIdentity:{value:o}}=j(),r=(n.proposal.facts.delivery??[])[0],c=o?.purchasingCompany,d=c?.location.name,l=!!c&&!!d,p=s?.status==="unavailable"?a:r?.deliveryAddress,u=$t(p??void 0,{countryFormat:"explicit",displayName:l}),m=e.formatName(p?.firstName,p?.lastName,!0);if(r?.pickupAddress)return t(xy,{address:r.pickupAddress??void 0});const v=p?m:e.translate("review.blocks.no_address"),C=l?d:v,f=l?e.translate("review.blocks.no_address"):void 0,g=p?u:f;return t(re,{id:"orderEditDeliveryAddress",label:e.translate("review.blocks.shipping_address_title"),primaryContent:C,secondaryContent:g})}function xy({address:e}){const{i18n:n}=y(),a=$t(e,{hiddenFields:["postalCode","countryCode","phone"]}),s=a?t(O,{children:a}):void 0;return t(re,{id:"orderEditDeliveryAddress",label:n.translate("local_pickup.title"),primaryContent:s})}function Hy(){const{i18n:e,checkout:n}=y(),o=(n.proposal.facts.delivery??[])[0]?.lines.filter(({deliveryChange:i,isFulfilled:r})=>i!=="REMOVED"&&!r).map(i=>t(hu,{line:i},i.title));return t(re,{id:"orderEditShippingMethod",label:e.translate("shipping.title"),primaryContent:o})}function Uy({i18n:e,shopPay:n,chargeAmount:a,numberOfPaymentTerms:s,installmentsUnavailable:o,paymentDue:i,installmentsConfig:r}){const c=Xs(n),d=i?.currencyCode,l=r?.availableLoanTypes,p=a?e.formatCurrency(a,{currency:d,form:"short"}):void 0,{payNowLabel:u,payNowSubtitle:m}={payNowLabel:e.translate("installments.installments_pay_now"),payNowSubtitle:e.translate("installments.installments_pay_now_subtitle")},v=()=>d==="GBP"?e.translate("installments.pay_in_installments.gb"):d==="AUD"?e.translate("installments.pay_in_installments.au"):o||!p||!l||l.length===0?g():l.includes("ZERO_PERCENT")?e.translate("installments.pay_in_installments.only_interest"):l.includes("INTEREST")&&l.includes("SPLIT_PAY")?e.translate("installments.pay_in_installments.all"):l.includes("INTEREST")?e.translate("installments.pay_in_installments.only_interest"):f(p),C=()=>!l||!p||l.length===0?_():l.includes("ZERO_PERCENT")?e.translate("installments.pay_in_installments_subt
2itle.interest"):l.includes("INTEREST")&&l.includes("SPLIT_PAY")?e.translate("installments.pay_in_installments_subtitle.all",{amount:p}):l.includes("INTEREST")?e.translate("installments.pay_in_installments_subtitle.interest"):_(),f=A=>s===2?e.translate("installments.pay_in_installments.only_split_pay_2",{amount:A}):s===1?e.translate("installments.pay_in_installments.only_split_pay_30",{amount:A}):e.translate("installments.pay_in_installments.only_split_pay",{amount:A}),g=()=>s===2?e.translate("installments.pay_in_installments_no_amount_2"):s===1?e.translate("installments.pay_in_installments_no_amount_30"):e.translate("installments.pay_in_installments_no_amount"),_=()=>s===2?e.translate("installments.pay_in_installments_subtitle.split_pay_2"):s===1?e.translate("installments.pay_in_installments_subtitle.split_pay_30"):e.translate("installments.pay_in_installments_subtitle.split_pay"),P=()=>o||!l||!p||l.length===0?e.translate("installments.pay_in_installments_subtitle.informational_gb"):s===2?_():l.includes("INTEREST")&&l.includes("SPLIT_PAY")?e.translate("installments.pay_in_installments_subtitle.split_pay_3_gb",{amount:p}):l.includes("ZERO_PERCENT")&&l.includes("SPLIT_PAY")&&(s===6||s===12)?e.translate("installments.pay_in_installments_subtitle.split_pay_3_6z_12z_gb",{amount:p}):l.includes("ZERO_PERCENT")&&s===12?e.translate("installments.pay_in_installments_subtitle.zero_percent_12z_gb",{amount:p}):l?.includes("ZERO_PERCENT")&&s===6?e.translate("installments.pay_in_installments_subtitle.zero_percent_6z_gb",{amount:p}):l.includes("INTEREST")?e.translate("installments.pay_in_installments_subtitle.informational_gb"):e.translate("installments.pay_in_installments_subtitle.split_pay_3_gb",{amount:p}),S=v(),k=d==="GBP"?P():C(),L=()=>c==="SHOP_PAY"?`${u} - ${m}`:`${S} - ${k}`,M=c==="SHOP_PAY";return{payNowLabel:u,payNowSubtitle:m,installmentsLabel:S,installmentsSubtitle:k,summary:L(),primaryLabel:M?u:S,secondaryLabel:M?m:k}}function zy(){const{i18n:e,shopPay:n,checkout:a}=y(),s=Qt(),{paymentMethods:o}=j();return h(()=>Uy({i18n:e,shopPay:n,chargeAmount:a.installments.chargeAmount.value,numberOfPaymentTerms:a.installments.numberOfPaymentTerms.value,installmentsUnavailable:a.installments.isUnavailable.value,paymentDue:s.value,installmentsConfig:xo(o.value)}))}function Gy(){const{userEvents:e}=y(),n=pn(hn.SHOP_PAY_PAY_NOW),a=pn(hn.SHOP_PAY_INSTALLMENTS),s=pn(hn.SHOP_PAY_INSTALLMENTS_DEFAULTED),o=pn(hn.SHOP_PAY_PAY_NOW_DEFAULTED);return{recordRetailEvent:V(r=>{const c=(function(){switch(r){case"payment_method_pay_now":return n;case"payment_method_installments":return a;case"default_payment_method_installments":return s;case"default_payment_method_pay_now":return o;default:return a}})();return e.monorailEvent({schemaId:"retail_shop_pay/2.0",payload:c})},[e,n,a,s,o])}}function Wy({onAutoExpand:e,ineligibilityReasonLabel:n}){const{source:a,checkout:s,shop:o,observability:i,userEvents:r,shopPay:c,embed:d}=y(),{visibility:l}=c,u=Qs()!==null,m=s.installments.isUnavailable.value,v=Nl(),C=Xs(c),{paymentMethods:f}=j(),g=h(()=>xo(f.value)),_=u?g.value?.availableLoanTypes:void 0,P=$(),S=bp(),k=c.user.installments.isRetryable.value,{recordRetailEvent:L}=Gy(),M=mu();D(()=>{n&&!k&&C==="SHOPIFY_INSTALLMENTS"&&c.session.unstable_updatePaymentMethodOption({type:"wallet",name:"SHOP_PAY"})},[k,n,C,c.session]),D(()=>{c.session.isInternalProgressing.value||u&&!m&&(!v.value&&l.showAutoExpandedPaymentMethods&&e?.(),S.value.spiPreselected&&!M&&(c.session.unstable_updatePaymentMethodOption({type:"wallet",name:"SHOPIFY_INSTALLMENTS"}),i.leaveErrorBreadcrumb("SPI preselected",{})))},[u,m,v.value,S.value.spiPreselected,c.session,i,l.showAutoExpandedPaymentMethods,M,e]),D(()=>{v.value&&u&&L(m?"default_payment_method_pay_now":"default_payment_method_installments")},[u,m,v.value,L]),D(()=>{m||!_||JSON.stringify(P.current)!==JSON.stringify(_)&&(r.monorailEvent({schemaId:"shopify_pay_payment_page_installments/1.4",payload:{...Es(a,s,o,{embedPlatform:d?.platform,shopAppSurface:c.app.config.surface}),eventType:Rs.InterestEligibility,success:vs(_),errorMessage:vs(_)?void 0:JSON.stringify(["amount"])}}),r.monorailEvent({schemaId:"shopify_pay_payment_page_installments/1.4",payload:{...Es(a,s,o,{embedPlatform:d?.platform,shopAppSurface:c.app.config.surface}),eventType:Rs.SplitPayEligibility,success:!!_.includes("SPLIT_PAY"),errorMessage:_.includes("SPLIT_PAY")?void 0:JSON.stringify(["amount"])}}),P.current=_)},[_,m,r,a,s,o,d?.platform,c.app.config.surface])}function Yy(){const{i18n:e}=y(),n=ye(!1),a=zy(),s=Vl(),o=V(()=>{n.value=!n.value},[n]),i=V(()=>{n.value=!0},[n]);return Wy({onAutoExpand:i,ineligibilityReasonLabel:s}),t(re,{open:n.value,id:"paymentOptions",label:e.translate("payment.payment_option.title"),primaryContent:a.value.primaryLabel,secondaryContent:a.value.secondaryLabel,onToggle:o,children:t(gh,{ineligibilityReason:s})})}function jy(){const{i18n:e}=y();return t(re,{label:e.translate("pickup_point.title"),open:!0,children:t(Ha,{heading:"none"})})}function or(){const{userEvents:e,shop:n,source:a,checkout:s}=y(),o=V(r=>{e.monorailEvent({schemaId:"shopify_pay_payment_page_ui_interaction/1.2",payload:{...
2Ue(a,s,n),action:r?"shipping_rates_expand":"shipping_rates_collapse"}})},[e,a,s,n]),i=V((r,c)=>{e.monorailEvent({schemaId:"shopify_pay_payment_page_select_shipping_rate/3.1",payload:{...Ue(a,s,n),currentRate:r.handle??"",currentRatePrice:`${r?.cost?.amount??0}`,isLocalDelivery:!r.pickupLocation&&r.methodType==="LOCAL",isLocalPickup:!!r.pickupLocation,previousRate:c?.handle,previousRatePrice:typeof c?.cost?.amount=="number"?`${c?.cost?.amount}`:void 0}})},[e,a,s,n]);return{trackOnDeliveryToggle:o,trackSelectShippingMethod:i}}const Ky=jt({displayName:"ShippingGroupsSummary",load:()=>Kt(()=>Yt(()=>import("./component-ShippingGroupsSummary.iA7pWsCc.js"),__vite__mapDeps([106,1,2,3,4,5,6,7,8,9,80,79,81,69,74,19,20,14,21,22,23,15,16,24,57,58,59,60,61,62,29,30,47,42,43,44,45,46,34,35,48,63,41,64,65,52,53,66,67,68,70,71,72,73,75,82,83,84,85,28,86,87,10,11,12,13,17,18,25,26,27,31,32,33,36,39,40,88,49,89,90,91,92,93,94,95,96,78,97,98,99,100,101,102,103]))),renderLoading(){return t(oe,{})}});function qy({lines:e,hideThumbnail:n,shippingTime:a}){const{i18n:s,checkout:o}=y(),{deliveryExpectationLines:i}=Pi(),r=o.configuration.layout.isOnePage.value,c=d=>{const l=d.methods.find(({handle:P})=>P===d.selectedDeliveryMethodHandle);if(!l)return null;const{handle:p,cost:u,costAfterDiscounts:m,brandedPromise:v,estimatedTimeInTransit:C}=l,f=l.methodType==="LOCAL",g=!!l?.deliveryPredictionEligible,{deliveryExpectation:_}=Fl(l,i||[],!!(g||v));return t(b,{gap:"small-400",children:t(q,{children:[t(ha,{methodTitle:mo({deliveryMethod:l,localDelivery:f?s.translate("shipping.local_delivery"):void 0}),showInterpunct:!0,price:t(Ai,{cost:u,costAfterDiscounts:m,inlineDiscount:!0})}),a?t(pe,{color:"subdued",size:r?void 0:"small",children:a}):t(ma,{deliveryMethod:l,deliveryExpectationLine:_,estimatedTimeInTransit:C,paragraphColor:"subdued"})]})},p)};return t(G,{children:e.map(d=>{const l=Bl(d.targetMerchandiseLines??[]);return l.slice(0,1).map(p=>t(tt,{gridAutoFlow:"column",gridTemplateColumns:"minmax(auto, max-content) minmax(auto, max-content)",gridTemplateRows:"minmax(0, 1fr)",gap:"large-100",alignItems:"center",alignContent:"center",children:[!n&&(l.length>1?t(ho,{variant:"fan-legacy",merchandise:l,size:"small",useResponsiveImageSources:!0,useTitleAsAltTextFallback:!0}):t(Wp,{merchandiseItem:p,hideBadge:!0})),c(d)]},p.id))})})}function $y({state:e,addressInvalidMessage:n,addressIncompleteMessage:a}){const{i18n:s}=y(),o=j().deliveryNext,i=Ge("deliveryNext"),{deliveryExpectationLines:r}=Pi(),{rollup:{secondaryContent:{typography:{color:c}={}}={}}={}}=Dt(),d=je(),l=c??"base",p=e.status==="filled"?e.deliveryLines:void 0,u=Fp({deliveryLines:p}),{hasViolations:m}=ue(Oo),{hasViolations:v}=ue(tn),C=t(b,{children:[t(oe,{inlineSize:"base",size:"small"}),t(oe,{inlineSize:"small",size:"extraSmall"})]});if(e.status==="initial"||e.status==="loading")return{compactPrimaryContent:t(oe,{inlineSize:"base",size:"small"}),compactSecondaryContent:void 0,inlinePrimaryContent:C,inlineSecondaryContent:void 0,primaryContent:C,secondaryContent:void 0};if(e.status==="empty"||e.status==="error"){const w=a??s.translate("shipping.method_summary.incomplete_address_entered"),E=n??s.translate("shipping.invalid_shipping_method_summary"),R=s.translate("shipping.different_shipping_method_summary");let F=e.status==="empty"?w:E;m?F=w:v&&(F=R);const U=t(O,{children:F});return{compactPrimaryContent:U,compactSecondaryContent:void 0,inlinePrimaryContent:void 0,inlineSecondaryContent:U,primaryContent:U,secondaryContent:void 0}}if(Ho(o.value,d.value)){if(i.value)return{compactPrimaryContent:void 0,compactSecondaryContent:void 0,inlinePrimaryContent:void 0,inlineSecondaryContent:void 0,primaryContent:C,secondaryContent:void 0};let w=t(Ky,{});return u?w=t(Hp,{summary:u}):d.value&&(w=t(Xy,{deliveryNextValue:o.value})),{compactPrimaryContent:void 0,compactSecondaryContent:void 0,inlinePrimaryContent:void 0,inlineSecondaryContent:void 0,primaryContent:w,secondaryContent:u?t(xp,{summary:u,secondaryContentColor:l}):void 0}}const g=d.value?e.deliveryLines.filter(La):e.deliveryLines,_=xl(g);if(!_)return{compactPrimaryContent:void 0,compactSecondaryContent:void 0,inlinePrimaryContent:void 0,inlineSecondaryContent:void 0,primaryContent:void 0,secondaryContent:void 0};const{costAfterDiscounts:P,cost:S,hideDiscountedTotalOnShippingSelector:k}=_,L=mo({deliveryMethod:_,localDelivery:_.methodType==="LOCAL"?s.translate("shipping.local_delivery"):void 0}),M=r?.find(w=>w.deliveryStrategyHandle===_.handle),A=t(ha,{methodTitle:L,showInterpunct:!0,price:S&&P?t(Hs,{cost:S,costAfterDiscounts:P,hideDiscountedTotalOnShippingSelector:k}):void 0}),B=t(ma,{deliveryMethod:_,deliveryExpectationLine:M,paragraphColor:c??"base"});return{compactPrimaryContent:t(O,{type:"strong",children:t(ha,{methodTitle:L})}
2),compactSecondaryContent:t(G,{children:[t(ma,{deliveryMethod:_,deliveryExpectationLine:M,paragraphColor:c,formatContent:w=>w?t(b,{display:"inline",direction:"inline",columnGap:"none",alignItems:"center",children:["(",w,")"]}):null}),t(O,{color:c,children:t(Hs,{cost:S,costAfterDiscounts:P,hideDiscountedTotalOnShippingSelector:k,styleOverrides:{shouldBold:!1}})})]}),inlinePrimaryContent:A,inlineSecondaryContent:B,primaryContent:A,secondaryContent:B}}function Xy({deliveryNextValue:e}){const n=Uo(e).filter(La);return n.length?t(tt,{gridAutoRows:"minmax(0, 1fr)",gridTemplateColumns:"minmax(0, 1fr)",gridTemplateRows:"minmax(0, 1fr)",gap:"small-200",children:t(qy,{lines:n,hideThumbnail:n.length===1})}):null}function Hs({cost:e,costAfterDiscounts:n,hideDiscountedTotalOnShippingSelector:a,styleOverrides:s={}}){return!e||!n?null:t(Ai,{cost:e,costAfterDiscounts:n,inlineDiscount:!0,preDiscountCost:a,styleOverrides:s})}function Jy(){const{i18n:e,checkout:{identity:{current:n}}}=y(),a=n.value,s=fa(),o=a==="amazonPay"||a==="buyWithPrime";return!s.value&&o?t(re,{id:"amazonPayShippingMethods",label:e.translate("shipping.title"),primaryContent:t(oe,{})}):t(Qy,{})}function Qy(){const{embed:e,i18n:n,checkout:a}=y(),s=Si(),{hasMultipleDeliveryGroups:o}=s.value,i=a.configuration.isAddressDelegationEnabled,{customizationsForRollupReveal:r}=bi({hasMultipleDeliveryGroups:o,targeted:!1,shouldHandleRollup:!0}).value,c=ee("Checkout::ShippingMethodDetails::RenderAfter"),d=ee("Checkout::ShippingMethodDetails::RenderExpanded"),{uiStateSignal:l}=Va(Ia),{hasViolations:p}=Fe(ad),u=J(p),m=ns(),{hasViolations:v}=yo(zo),C=J(v),f=h(()=>m.value&&C.value),g=je(),_=Pn([...r,...c,...d],{lazyReveal:!0}),P="shippingMethod",S=Nt(P,_.peek()),k=J($a(Bo([...r,...c,...d],"uiExtension").map(Ut),V(()=>{S.value=!0},[S])));Ae(()=>{_.value&&(S.value=!0)}),Ae(()=>{(u.value||f.value||!g.value&&tv(l.value))&&(S.value=!0)});const L=ev({identity:a.identity}),M=V(()=>{const W=!S.value;L?.(W),S.value=W},[L,S]),{deliveryNext:A,shippingAddress:B}=j(),{parts:{deliveryLines:w}}=sd(),E=Zy({i18n:n,identity:a.identity}),R=$y({state:l.value,addressIncompleteMessage:E?.addressIncompleteMessage,addressInvalidMessage:E?.addressInvalidMessage}),F=(()=>{switch(e?.embedder){case"amazon":{const{compactPrimaryContent:W,compactSecondaryContent:N}=R;return W===void 0&&N===void 0?{primary:R.primaryContent,secondary:R.secondaryContent}:{compact:t(b,{direction:"inline",gap:"small-400",alignItems:"center",children:[W,N]})}}case"google":return{primary:R.inlinePrimaryContent,secondary:R.inlineSecondaryContent};default:return{primary:R.primaryContent,secondary:R.secondaryContent}}})();Ae(()=>{nv(A.value,w.value,B.value?.phone)&&(S.value=!0)});const U=h(()=>(l.value.status==="error"||l.value.status==="empty")&&!(_.value||k.value));return Ae(()=>{U.value&&(S.value=!1)}),t(re,{open:S.value,id:P,label:n.translate("shipping.title"),primaryContent:F.primary,secondaryContent:F.secondary,compactContent:F.compact,onToggle:i&&l.value.status==="empty"||U.value?void 0:M,renderChildrenWhenCollapsed:!0,icon:t(xe,{id:"shippingMethod-packageDeliveryIcon",type:"package-delivery",size:"fill"}),children:t(hh,{singleDeliveryGroup:s})})}function Zy({i18n:e,identity:{current:n}}){switch(n.value){case"amazonPay":case"buyWithPrime":case"businessCustomer":case"customerAccount":case"shopPay":return{addressIncompleteMessage:e.translate("shipping.method_summary.incomplete_address_selected"),addressInvalidMessage:e.translate("shipping_errors.invalid_shipping_method_summary")};default:return}}function ev({identity:{current:e}}){const{trackOnDeliveryToggle:n}=or(),a=V(s=>{n(s)},[n]);return e.value==="shopPay"?a:void 0}function tv(e){if(e.status!=="filled")return!1;const n=["SHIPPING","LOCAL"];return e.deliveryLines.some(a=>{const s=od(a);return n.includes(s?.methodType||"")?a.status==="available"&&a.hasDeliveryLineChange:!1})}function nv(e,n,a){return id(e).some(({line:s,method:o})=>!(o?.methodType==="SHIPPING"||o?.methodType==="LOCAL")||!o?.phoneRequired?!1:!n.find(d=>{const l=d.peek();return l.type===s.type&&l.id===s.id})?.fields.deliveryMethodOptions.value.phone?.value&&!a)}const Us={rollup:{label:{visibility:"visible"},blockAlignment:"center"}},av={rollup:{label:{visibility:"hidden"},blockAlignment:"center"}},sv={SHIPPING:{id:"shippingMerchandiseList",getTargetMerchandiseLines:Yd},PICK_UP:{id:"pickupMerchandiseList",getTargetMerchandiseLines:Wd}};function zs({selectedDeliveryMethodType:e}){const{i18n:n}=y(),{deliveryLines:a}=Z(),s=je(),{showOverlay:o}=Hl(),i=ye(!1),r=sv[e],c=h(()=>r.getTargetMerchandiseLines(a.value)),{visibleSummary:d,isNegotiating:l}=jd(c),p=ze(),u=h(()=>Kd(a.value)),m=h(()=>u.value>=qd),v=h(()=>{const S=d.value;return S?S.isAllItems?n.translate("split_delivery.all_items"):n.translate("split_delivery.items_count",{count:S.totalItemCount}):""}),C=e==="PICK_UP"?n.translate("delivery_options.pick_up"):n.translate("delivery_options.ship"),f=t(T,{when:()=>d.value!==void 0&&(!p.value||!l.value),fallback:t(oe,{}),children:t(O,{children:v})}),g=t(ho,{variant:"fan-legacy",sortByPrice:!0,merchandise:d.value?.merchandiseLines??[],size:"small"});if(m.value)return t(pa,{theme:Us,children:t(re,{id:r.id,label:C,thumbnail:g,onClick:()=>o($d),primaryContent:f})});const _=i.value||s.value;return t(pa,{theme:_?av:Us,children:t(re,{id:r.id,label:C,thumbnail:g,open:_,onToggle:_?void 0:()=>{i.value=!i.value},primaryContent:f,children:t(Xd,{title:e==="PICK_UP"?n.translate("split_delivery.items_for_pickup"):n.translate("split_delivery.items_for_shipping"),selectedDeliveryMethodType:e})})})}function ov(e,n,a){if(n.isSplitShipAndPickup&&e==="shipping")return t(we,{level:2,children:a.translate("delivery_options.ship_to_address")})}function iv(){const e=_e(),{checkout:n,shop:a,embed:s,i18n:o,source:i}=y(),{identity:r,identity:{current:c}}=n,d=c.value,l=a.hasFlagEnabled(rd),p=Ul(),u=zl(),m=Go({checkout:n}),v=p.value&&!u.value,C=je(),f=kn(),_=Ba().value!==void 0,P=Ge("deliveryNext"),S=ze(),{deliveryLines:k}=Z(),M=ld(k.value??[]).filter(N=>N.requiresShipping).length>0,A=Dm(),B=se(()=>({isSplitShipAndPickup:C.value,isBusinessCustomerSingleChoiceMode:v,businessCustomerCannotProvideShippingAddress:p.value,redemptionEligibilityVisible:A,shouldAllowInlineSplit:f.value,hasShippingMerchandiseLines:M,hasLocalPickupDeliveryLine:_,deliveryNextLoading:S.value&&P.value}),[C.value,v,p.value,A,f.value,M,_,S.value,P.value]),w=B.isSplitShipAndPickup?cd:dd,E=w[d]??w.default,R=N=>{switch(N){case"contact":return t($i,{},N);case"businessCustomerSingleChoice":return t(Za,{},N);case"orderEditDeliveryAddress":return t(Fy,{},N);case"orderEditShippingMethod":return t(Hy,{},N);case"deliveryAddress":return t(ar,{},N);case"shippingMerchandiseList":return t(zs,{selectedDeliveryMethodType:"SHIPPING"},N);case"shippingMethods":return t(Jy,{},N);case"pickupMerchandiseList":return t(zs,{selectedDeliveryMethodType:"PICK_UP"},N);case"localPickupOptions":return t(Ny,{},N);case"pickupPoint":return t(jy,{},N);case"dutyOptions":return t(Ty,{},N);case"paymentOptions":return t(Yy,{},N);case"payment":return t(ya,{},N);case"billing":return t(va,{isAbovePaymentSummary:m},N);case"cashRedemption":return t(Oy,{},N);default:return t(G,{})}};An(()=>{l&&n.sections.unstable_providePreactContext(B)}
2,[l,n.sections,B]);const F={configuration:n.configuration,installments:n.installments,isShippingRequired:n.isShippingRequired,vaultedSections:l?n.vaultedSections:{signal:e},source:i,proposal:n.proposal,identity:r,shop:a,embed:s},U=l?n.sections.availableToRenderGrouped.value:ud(pd(E.filter(N=>hd[N].shouldRender({preactContext:B,concepts:F})),{preactContext:B,concepts:F}));let W=!1;return U.filter(N=>N.length>0).map(N=>{const z=[];for(const{sectionId:H,groupId:K}of N){const x=R(H);K!=null&&md.has(K)?(!W&&n.configuration.visibility.showDeliveryHeading.value&&(z.push(t(sr,{},"deliveryHeading")),W=!0),z.push(t(Rt,{target:"cart.deliveryGroups[0].deliveryAddress",children:t(Ua,{name:H,children:x})},H))):z.push(x)}const X=N[0]?.groupId,Y=ov(X,B,o);return{groupId:X,header:Y,elements:z}})}const rv="K6vpG",lv="_5hYUU",cv="CU3YS",dv="_5HWz9",uv="r8rqQ",pv="_2Ojsq",At={DivideChildren:rv,noVaultedDividers:lv,ShowTopDivider:cv,ShowBottomDivider:dv,StripBlockStartPadding:uv,StripBlockEndPadding:pv};function Gs({hideLastDivider:e,showTopDivider:n}){const a=_e(),{negotiate:s}=ot(),{checkout:o,embed:i,shop:r,source:c}=y(),d=kn(),l=h(()=>a.value.delivery&&o.isShippingRequired.value),p=h(()=>l.value&&d.value),u=Go({checkout:o}),m=h(()=>a.value.contact&&o.configuration.showContactInformation),v=h(()=>yd({isContactVaulted:a.value.contact,configuration:o.configuration,identity:o.identity,embed:i,shop:r}));function C(){return[...v.value?[t($i,{},"contact")]:[],...l.value?[t(ar,{},"delivery")]:[]]}const f=[...C(),..._(o)],g=f.length>0||m.value;if(fh(g),vv({hasSections:g,identity:o.identity,wallets:o.wallets,negotiate:s}),f.length===0)return null;return t(q,{children:[t(dh,{children:t(hv,{hideLastDivider:e,showTopDivider:n})}),t(T,{when:()=>a.value.payment,children:t(cm,{})}),t(T,{when:p,children:t(Qo,{})})]});function _(P){if(et(c))return a.value.payment?[t(ya,{},"payment")]:[];const S=[];return u&&S.push(t(va,{isAbovePaymentSummary:!0},"businessCustomerBilling")),a.value.payment&&(S.push(t(ya,{},"payment")),P.configuration.visibility.showCashRedemption.value&&S.push(t(Tm,{},"cashRedemption")),a.value.billing&&!u&&S.push(t(va,{},"billingAddress"))),S}}function Ws({sections:e,hideLastDivider:n,showTopDivider:a}){const{checkout:{identity:s}}=y(),o=_e(),i=fv(s,o.value.payment),{vaulted:{spacing:r="none",cornerRadius:c,divider:{borderWidth:d="base",borderStyle:l="base",borderColor:p="base",visibility:u="visible"}={}}={}}=Dt(),{main:{section:m}}=Aa(),v=!i&&!Gt(n),{blockStart:C,blockEnd:f}=mv(Gl().rendered?.padding);return e.length===0?null:t("div",{className:Js(At.DivideChildren,{[At.ShowTopDivider]:Gt(a),[At.ShowBottomDivider]:v,[At.StripBlockStartPadding]:C,[At.StripBlockEndPadding]:f}),style:yv({spacing:r,borderWidth:d,borderStyle:l,borderColor:p,visibility:u,cornerRadius:m?.cornerRadius??c}),children:e})}function hv({hideLastDivider:e,showTopDivider:n}){const a=iv(),s=je();if(a.length===0)return null;const o=a.length>1&&s.value;return t(G,{children:o?t(b,{gap:"large-200",children:a.map(({groupId:i,header:r,elements:c},d)=>{const l=d===0,p=d===a.length-1,u=t(On,{hideDivider:"always",children:t(Ws,{sections:c,hideLastDivider:p?Gt(e):!0,showTopDivider:l&&Gt(n)})});return r?t(b,{gap:"base",children:[r,u]},i):t(G,{children:u},i)})}):t(Ws,{sections:a.flatMap(i=>i.elements),hideLastDivider:e,showTopDivider:n})})}function Ys(e){return e!=null&&e!=="none"}function mv(e){if(e==null)return{blockStart:!1,blockEnd:!1};const n=Array.isArray(e)?e[0]:e;let a=Array.isArray(e)?e[0]:e;return Array.isArray(e)&&e.length===4&&(a=e[2]),{blockStart:Ys(n),blockEnd:Ys(a)}}function yv({spacing:e,borderWidth:n,borderStyle:a,borderColor:s,visibility:o,cornerRadius:i}){const r=Cv[e],c={none:"0px",..._n.borderWidth},d={base:_n.color.default.border,transparent:"transparent"},l=o==="hidden"?"0px":c[n],p=_v[a];return{"--vaulted-divider-width":l,"--vaulted-divider-style":p,"--vaulted-divider-color":d[s],"--vaulted-spacing":r,"--divider-offset":`calc((${r} + calc(${l} * 2)) / 2)`,"--vaulted-corner-radius":i?_n.borderRadius[i]:void 0}}function vv({hasSections:e,identity:n,wallets:a,negotiate:s}){D(()=>{e&&gv({identity:n,wallets:a})&&s({silenceViolations:["all"]})},[])}
2function gv({identity:e,wallets:n}){return e.current.value==="amazonPay"||e.current.value==="buyWithPrime"?!1:!n.activeSession.value}function fv(e,n){return e.current.value==="guest"||e.current.value==="businessCustomer"&&n}const Cv={none:"0px",..._n.spacing},_v={base:"solid",dashed:"dashed",dotted:"dotted"};function ir(){const{methods:e}=vo(),{userEvents:n,shop:a,source:s,checkout:o}=y(),i=o.identity.current.value==="shopPay";Ae(()=>{if(i)for(const r of e.value)ht(()=>n.monorailEvent({schemaId:"shopify_pay_payment_page_ui_interaction/1.1",payload:{...Ue(s,o,a),action:`delivery_method_${r.toLowerCase()}_selected`}}))})}function Sv(){ir();const{shop:e,i18n:n,checkout:a}=y(),s=Xt(),i=!e.hasFlagEnabled(Wo),r=!a.configuration.visibility.showDeliveryHeading.value&&!i;if(!s)return null;const c=n.translate("shipping.delivery_title");return t(jp.Provider,{value:!0,children:t(ip,{presentation:"base",children:t(q,{padding:i?"none":"base none",accessibilityLabel:c,className:i?At.noVaultedDividers:void 0,children:t(b,{gap:"base",children:[r&&t(O,{color:"subdued",children:c}),t(Zo,{})]})})})})}function rr(){const{source:e}=y(),n=_e(),a=go(),s=Xt();return et(e)||!n.value.delivery?null:t(G,{children:[t(Sv,{}),a.value&&s?t(He,{blockSize:"base"}):null]})}function bv(){const{checkout:e,embed:n,shop:a}=y(),{current:s,customerContactMethodPrefilled:o}=e.identity,i=s.value,r=n?.isFlagshipPartner??!1,{contact:c}=_e().value;return!Yo({isContactVaulted:c,identity:i,isPartnerEmbed:r,embedder:n?.embedder,isInterstitialBrandingEnabled:Zt({embedder:n?.embedder,shop:a}),customerContactMethodPrefilled:o})||!e.configuration.showContactInformation?null:t(Pv,{vaultedContactTypeOverride:i==="sdkCartHints"?"base":void 0})}function Pv({vaultedContactTypeOverride:e}){const n=ji();Ki(n);const a=ye(!1),s=ze(),{embed:o}=y(),i=n.displayOptions,r=i.vaultedContactType==="base",c=i.vaultedContactType==="rollup"?e??"rollup":i.vaultedContactType,d=r?i.contentLayout:void 0,l=i.vaultedContactType==="rollup"&&c==="base";if(c!=="base")return null;const p=n.logo;let u=null;return(l&&n.hasError||r)&&(u=i.children??null),t(G,{children:[t(qi,{emailAddress:n.displayContent.contact,phone:n.phone,logo:p,moreOptions:n.moreOptions,emailAlignment:l&&n.isEmbeddedPartner&&!o?.interstitialPartnerProfileIconUrl?"start":void 0,layout:l?void 0:d,children:u}),n.showShopPayVerification&&t(T,{when:s,children:t(qo,{email:n.email??"",open:a.value,showPopover:m=>{a.value=m}})})]})}function Av(){const{i18n:e}=y(),n=_e(),[a]=fo(),s=a.includes("PICK_UP"),{value:o}=ka().value,{value:i}=uo().value,r=!!(o||i),c=Jd({mode:"localPickup"}),d=h(()=>c.value.merchandiseLines),l=h(()=>c.value.allowAlternativeAction),p=h(()=>c.value.merchandiseLines.length>0),u=je(),m=r&&!p.value;if(!s||!n.value.delivery)return null;const v=p.value&&r;return t(Ua,{name:"local-pickup-adjacent",variant:"adjacent",children:t(b,{gap:p.value?"base":"small-400",paddingBlockEnd:v?"base":void 0,children:[t(T,{when:u,children:t(q,{paddingBlockStart:"small-400",paddingBlockEnd:m?"small-400":void 0,children:t(we,{level:2,children:e.translate("delivery_options.pickup")})})}),t(T,{when:p,children:t(Qd,{bannerType:"pickup",merchandiseLines:d,allowAlternativeAction:l})}),t(Ev,{hasNoDeliveryMethods:r})]})})}function Ev({hasNoDeliveryMethods:e}){const{i18n:n}=y(),a=je(),s=Ba(),{progressing:o}=ot(),i=Ge("deliveryNext").value,r=ze(),{isOnlyCountryAvailable:c}=Xo(),d=ye(!1),l=h(()=>s.value?.methods??[]),p=h(()=>{const P=s.value;return P&&Fo(P)}),u=h(()=>l.value.length>0&&Zd(l.value)),m=J(Fe(vd).hasViolations),v=eu({allLocationsFarAway:u,selectedPickupOptionNoLongerAvailable:m}),C=po({methods:l.value,selectedDeliveryMethodHandle:p.value?.handle}),f=h(()=>Wl(s.value?.targetMerchandiseLines)),g=h(()=>tu(l.value,c,f.value,n,{selectedDeliveryMethodHandle:p.value?.handle,allLocationsFarAway:u.value})),_=()=>{C(c?"checkout_pickup_geoselector_clicked_country_grain":"checkout_pickup_geoselector_clicked_other_grain"),d.value=!0};return e?null:t(G,{children:[t(T,{when:v,children:t(nu,{itemCount:f.value,methods:l.value,onChangeLocationClick:_})}),t(b,{direction:"inline",gap:"small-400",alignItems:"center",justifyContent:"space-between",paddingBlockStart:a.value?void 0:"small-200",paddingBlockEnd:a.value?"small":"small-200",children:[r.value&&!o.value&&i?t(oe,{inlineSize:"base"}):t(O,{color:"subdued",children:g}),t(Jo,{onClick:_})]}),t(da,{methods:s.value?.methods,type:s.value?.type,open:d.value,onClose:()=>{d.value=!1}})]})}function Rv({showDelivery:e}){const{embed:n}=y(),{rollup:{inlinePadding:a}}=Dt(),s=t(G,{children:[t(bv,{}),t(T,{when:e,children:t(rr,{})}),t(Av,{})]}),o=st(n?.embedder),i=o?`none ${Sn(a)??"none"}`:void 0;return o?t(q,{padding:i,children:s}):s}const lr=(e,n)=>{if(e.length!==n.length)return!1;const a=[...e];return n.every(s=>{const o=a.findIndex(i=>i.promotionId===s.promotionId&&ut(i.destinationAmount,s.availableBalance));return o===-1?!1:(a.splice(o,1),!0)})};function js(e,n,a,s){const o=e?.status;return o==="pending"||(a||s)&&(o==="filled"||n)}function Iv(e,n){const a=J(e),s=J(n),{shopDiscountOffer:o,shopPromotion:i}=j(),r=Tt(),c=Da().loading;return h(()=>{const d=r.value,l=a.value.eligible,p=c.value,u=p.has("discountLines"),m=p.has("shopCashBalance"),v=s.value;if(v!==void 0){const _=d.SHOP_PROMOTION,P=_.length>0;if(js(i.value,P,u,p.has("shopPromotion")))return!0;
2if(v?.length){if(l?!lr(_,v):P||m)return!0}else if(P)return!0}const C=o.value,f=d.SHOP_DISCOUNT_OFFER?.destinationAmount;if(js(C,f!=null,u,p.has("shopDiscountOffer")))return!0;const g=Di(C)?.redeemableAmount;return f==null?g!=null&&(l||m):!l||g==null||!ut(f,g)})}function kv(e,n=!0,a){const{setShopOfferReconciliationPending:s}=y().shopPay,o=Iv(e,a);An(()=>{if(!n)return;const i=o.subscribe(s);return()=>{i(),s(!1)}},[n,o,s])}const Lv=()=>{const{embed:e,checkout:{identity:n}}=y(),a=n.current.value==="shopPay"&&st(e?.embedder),s=wn(),o=Nn().value;cr({enabled:a,discountOffer:a?s.value:null,shopPromotionDiscounts:void 0,eligibility:o}),Fi([{eligibility:o,redemptionTypes:["SHOP_DISCOUNT_OFFER"]}],{enabled:a}),Bi({enabled:a,redemptionTypes:["SHOP_DISCOUNT_OFFER"]})},Mv=()=>{const{checkout:e,embed:n,source:a}=y(),s=_e(),o=e.identity.current.value==="shopPay"&&!st(n?.embedder)&&e.configuration.visibility.showCashRedemption.value&&!(s.value.payment&&et(a)),i=wn(),r=mi(),c=Nn().value;cr({enabled:o,discountOffer:o?i.value:null,shopPromotionDiscounts:o?r.value:null,eligibility:c})},cr=({discountOffer:e,eligibility:n,shopPromotionDiscounts:a,enabled:s=!0})=>{const{isShopCashNegotiationReady:o,negotiateShopCash:i}=Vn({enabled:s}),{recordRedemptionAutomaticallyApplied:r,recordRedemptionAutomaticallyRemoved:c}=Qa(),d=$(),l=Tt();kv(n,s,a);const p=se(()=>{const v=l.value.SHOP_DISCOUNT_OFFER?.destinationAmount;if(!e)return v?{SHOP_DISCOUNT_OFFER:null}:void 0;if(!ut(v,e.redeemableAmount)&&!(!n.eligible&&e.redeemableAmount))return{SHOP_DISCOUNT_OFFER:e.redeemableAmount?{type:"SHOP_DISCOUNT_OFFER",amount:e.redeemableAmount,promotionId:null}:null}},[e,l.value.SHOP_DISCOUNT_OFFER?.destinationAmount,n.eligible]),u=se(()=>{if(a===void 0)return;const v=l.value.SHOP_PROMOTION;if(!a||a.length===0)return v.length>0?{SHOP_PROMOTION:null}:void 0;if(!lr(v,a)&&n.eligible)return{SHOP_PROMOTION:a.map(C=>({type:"SHOP_PROMOTION",amount:C.availableBalance,promotionId:C.promotionId}))}},[a,l.value.SHOP_PROMOTION,n.eligible]),m=se(()=>{if(!(!p&&!u))return{...p,...u}},[p,u]);D(()=>{if(!s||!m){d.current=void 0;return}!o||d.current===m||i(m,{onNegotiateAccepted:()=>{d.current=m,Object.entries(m).forEach(([v,C])=>{(C?r:c)(v,"useApplyAutomaticRedemptions")})}})},[s,o,m])};function Ov({active:e,ready:n}){const{i18n:a}=y(),s=e.value&&!n.value?a.translate("general.loading"):null;return t(q,{accessibilityRole:"status",accessibilityVisibility:"exclusive",children:s})}function Dv(){return t(q,{"aria-busy":!0,padding:"large-200 none",children:t(b,{gap:"base",children:[t(oe,{inlineSize:"large"}),t(oe,{inlineSize:"base"}),t(Ea,{contentDisplay:"block",blockSize:"48px"})]})})}const dr=jt({displayName:"BelowTheFoldContent",renderLoading:Dv,load:()=>Kt(()=>Yt(()=>import("./page-BelowTheFoldContent.pNE1V8do.js"),__vite__mapDeps([107,1,2,3,4,5,6,7,8,9,108,109,88,49,110,111,38,39,40,20,14,21,22,23,41,42,43,15,16,44,45,46,34,35,47,48,10,11,12,13,17,18,19,24,25,26,27,28,29,30,31,32,33,36,50,112,52,53,113,68,114,71,72,60,115,116,117,118,82,83,84,65,85,58,59,61,86,87,119,120,66,121,122,123,64,124,55,56,57,62,63,67,69,70,73,74,75,76,77,89,90,91,92,79,80,81,93,94,95,96,78,97,98,99,100,101,102,103,125]))),renderError(e){throw e}}),Tv="ifz7X",wv="xoG3V",ur={OnePageFormContents:Tv,OnePageFlexibleSpacer:wv};function Nv({children:e,fillAvailableBlockSize:n,ready:a}){const{checkout:s}=y(),{progress:o}=ot(),i=Ei(),r=V(()=>{o("one-page-form-submit",void 0,{skipToCompletion:i.value})},[o,i]),c=yu(r);return t(Yl,{disabled:!a.value,onSubmit:c,contentsClassName:n?ur.OnePageFormContents:void 0,children:e},s.identity.current.value)}function Vv({loading:e,lineItems:n,onClose:a}){const{i18n:s,url:o,checkout:{configuration:{allowRedirectToStorefront:i}}}=y(),{checkoutProtocolModalEventSignal:r}=at(),c=t(Rn,{variant:"primary",onClick:a,children:s.translate("stock.continue_cta_label")}),d=i&&t(Me,{href:o.cart(),children:s.translate("stock.return_to_store_label")});return D(()=>()=>{r.value="none"},[r]),t(jl,{heading:s.translate("stock.price_update.title"),open:!0,onShow:()=>{r.value="priceChange"},onHide:a,size:"large",children:t(b,{gap:"large-200",children:[t(pe,{children:s.translate("stock.price_update.description")}),t(q,{children:t(Jp,{loading:e,lineItems:n,type:Co.PriceChange})}),t(b,{direction:"inline",gap:"large-300",alignItems:"center",justifyContent:"end",children:[d,c]})]})})}function pr(e){return e.some(n=>n.code==="MERCHANDISE_EXPECTED_PRICE_MISMATCH")}function Bv(){const e=j(),n=Ge("merchandiseLines"),a=Z().merchandiseLines,s=ye(ht(()=>a.value));return h(()=>{const o=e.allViolations.value,i=pr(o??[]),r=e.merchandiseLines.value,c=n.value,d=r?.lines??[],l=s.value,p=gd(l,d,o,fd).map(({proposed:m,negotiated:v})=>({line:m??v,problem:{type:Co.PriceChange,negotiatedPrice:v?.itemPrice,proposedPrice:m?.itemPrice}}));return{hasViolation:i,loading:c,lineItems:p,updateProposal:()=>{p.length>0&&(s.value=d)}}})}function Fv(){const{checkout:{wallets:e}}=y(),n=j(),a=Bv(),s=Ma(),o=$(!1),i=h(()=>n.allViolations.value?.some(l=>Cd.has(l.code))),r=h(()=>!i.value&&a.value.hasViolation&&a.value.lineItems.length>0),c=h(()=>{const l=a.value;return r.value?o.current=!0:o.current&&!l.loading&&l.lineItems.length===0&&(o.current=!1),!e.activeSession.value&&o.current&&l.lineItems.length>0?l:void 0});Ae(()=>{r.value&&s("inventoryPriceChange",{element:{tagName:"modal"},timestamp:new Date,visible:!0})});const d=V(()=>{o.current=!1,a.value.updateProposal()},[a]);return t(T,{when:c,children:l=>t(Vv,{loading:l.loading,lineItems:l.lineItems,onClose:d})})}const xv="LaXGo",Hv={ReferralTitle:xv};function Uv(){const{i18n:e,shop:n}=y(),a=Kl(n.storefrontUrl)?.replace(/-/g,"‑");return a?t("strong",{"data-testid":"referral-title",className:Hv.ReferralTitle,children:e.translate("merchant_redirect.referral_title",{merchant_url:a})}):null}function zv(){const{checkout:e,embed:n,shopPay:a}=y(),s=Xp(),o=Ei(),i=_e(),r=a.config.isReferral==="webview-rendered",c=n?.isFlagshipPartner??!1,l=h(()=>i.value.contact&&e.configuration.showContactInformation||i.value.delivery||i.value.payment).value,p=s.value,u=p||o.value||r;return l&&u?t(G,{children:[p?t(Up,{}):null,o.value?t(zp,{isVaultedReview:!0}):null,r?t(Uv,{}):null,u&&!c?t(He,{blockSize:"base"}):null]}):null}function Gv(){const{embed:e,shop:n}=y();return a=>e?.isFlagshipPartner&&!st(e.embedder)&&!Zt({embedder:e.embedder,shop:n})?t(ql,{children:a}):a}function Wv({showEmailMarketingOptIn:e,showPhoneMarketingOptIn:n,aboveFoldSpacing:a,children:s}){const o=za(),i=h(()=>n?.value??o.value.isRoot),r=h(()=>
2e.value||i.value),c=h(()=>e.value&&i.value),d=h(()=>c.value?a?"small-200":"base":"none"),l=h(()=>a?"large-200 none large-200 none":"none none base none");return t(T,{when:r,fallback:s,children:()=>t(Rt,{target:"cart.buyerIdentity",children:t(b,{gap:a?"small-200":"base",padding:l.value,children:[t(b,{gap:d.value,children:[t(T,{when:e,children:t(au,{origin:"payment_page"})}),t(T,{when:i,children:t(ei,{})})]}),s]})})})}function Ks({extensions:e,hideDivider:n="always"}){const a=Gv();return t(Pe,{gap:"base",customizations:Gt(e),render:(s,o)=>o?a(t(On,{hideDivider:n,children:s})):s})}function hr(e){const{i18n:n}=y(),a=V(o=>o.reduce((i,r,c)=>c===o.length-1?n.translate("shipping.shipping_method_combinations.combination",{rest:i,current:r}):n.translate("shipping.shipping_method_combinations.with_separator",{rest:i,current:r}),""),[n]);return se(()=>{if(!Fa(e))return[];const o=Uo(e),i={businessDays:r=>n.translate("shipping.estimated_delivery_date",{count:r}),businessDaysRange:(r,c)=>n.translate("shipping.estimated_delivery_date_range",{minimum:r,maximum:c}),subscriptionsOnlyShippingTitle:n.translate("shipping.subscription_shipping"),combineTwoShippingTitles:(r,c)=>n.translate("shipping.shipping_method_combinations.combination",{rest:r,current:c}),combineMultipleShippingTitles:a,localDeliveryTitle:n.translate("shipping.local_delivery")};return Yv(i,o)},[a,e,n])}function Yv(e,n){const a=(n||[]).filter(_d).map(Sd);return bd(a).filter(o=>o.length>0).map(o=>jv(o,e))}function jv(e,n){return{...Pd(e)??e[0],title:Rd(e,n),cost:Ed(e),costAfterDiscounts:Ad(e)}}function mr(){const{shopPay:e}=y(),{value:n}=j().deliveryNext,a=Ge("deliveryNext").value,s=jo(n,"ONE_TIME_PURCHASE",!0),o=se(()=>s&&s.status==="available"?s.methods:[],[s]),i=hr(n),r=Fa(n)?i:o,c=se(()=>r.reduce((v,C)=>{const f=C.methodType==="LOCAL"?"SHIPPING":C.methodType;return f==="PICK_UP"||f==="SHIPPING"?{...v,[f]:[...v[f],C]}:v},{SHIPPING:[],PICK_UP:[]}),[r]),[d,l]=mt(!0),p=e.session.selectedShippingAddress.value;D(()=>{l(!0)},[p]),D(()=>{a||l(!1)},[a]);const[,u]=mt(),m=_i(u);return{methodsByType:c,availableDeliveryMethods:r,availableDeliveryMethodsLoading:d,progressiveShippingRatesLoading:m}}function yr({onChange:e,prerequisitesLoading:n}){const{value:a}=j().deliveryNext,s=Ge("deliveryNext").value,o=jo(a,"ONE_TIME_PURCHASE",!0),i=hr(a),[r]=$l({type:o?.type}),c=se(()=>{if(!(n||s||!r||o==null||o.status!=="available"))return Fa(a)?i.find(l=>l.handle===r):o.methods.find(l=>l.handle===r)},[n,s,r,o,a,i]),d=$(c);return D(()=>{c&&d.current&&d.current.handle!==c.handle&&e(c,d.current),d.current=c},[c,e]),{selectedDeliveryMethod:c}}function Kv(){const{i18n:e}=y(),{availableDeliveryMethodsLoading:n,progressiveShippingRatesLoading:a}=mr(),s=n&&!a,{selectedDeliveryMethod:o}=yr({onChange:()=>{},prerequisitesLoading:n||s}),i=o?e.translate("order_summary.updated_shipping_method",{shipping_method:o.title}):void 0,r=$(i);return D(()=>{const c=r.current;if(r.current=i,!(!i||i===c))return Zs({content:i})},[i]),null}function qv(){return Xl("ONE_TIME_PURCHASE")?t(Kv,{}):null}function $v(){const{negotiate:e}=ot(),n=j(),a=n.buyerIdentity,s=Z(),o=s.shippingAddress.value,i=s.billingAddress.value,{observability:r,checkout:c}=y(),{value:d=[]}=n.allViolations,l=Id(d),p=pr(d),u=c.isShippingRequired.value?o.countryCode:i.countryCode,m=a?.value?.countryCode,v=JSON.stringify(a?.value,(C,f)=>f===void 0?null:f);D(()=>{l||p||m&&u!==m&&(r.log("country_code_alignment_mismatch_detected","[EnsureBackAndFrontEndCountryCodeAlignment] There was a mismatch between the preselected and the buyerIdentity countryCode on checkout load.",{selectedCountryCode:u,buyerIdentityCountryCode:m,buyerIdentity:v}),e({silenceViolations:["all"]}))},[])}function Xv(){const{checkout:e,shop:n,source:a}=y(),{email:s}=Z(),o=_e(),{buyerIdentity:i}=j(),r=n.hasFlagEnabled(kd);return h(()=>{if(e.identity.current.value==="businessCustomer")return!1;const c=i.value;if(c?.customerProfile?.acceptsEmailMarketing)return!1;const l=e.configuration.visibility.showEmailMarketing&&n.emailMarketing!=="OFF"&&o.value.contact;if(e.identity.current.value==="sdkCartHints")return!!(l&&s.value);const p=r&&!Ld(c?.countryCode);return!!(l&&a.type!=="shopPayExternal"&&!p&&!et(a))})}function Jv(){const e=_e(),n=J(ee("Checkout::Dynamic::Render","INFORMATION1")),a=J(ee("Checkout::Dynamic::Render","INFORMATION2")),s=J(ee("Checkout::Dynamic::Render","DELIVERY1")),o=J(ee("Checkout::Dynamic::Render","DELIVERY2")),i=J(ee("Checkout::Dynamic::Render","PAYMENT1")),r=J(ee("Checkout::Dynamic::Render","PAYMENT2")),c=J(ee("Checkout::Dynamic::Render","PAYMENT3")),d=$();return h(()=>{const l=e.value,p=[];l.contact&&p.push(...n.value,...a.value),l.delivery&&p.push(...s.value,...o.value),l.payment&&p.push(...i.value,...r.value,...c.value);const u=d.current;return u&&Qv(u,p)?u:(d.current=p,p)})}function Qv(e,n){return e.length===n.length&&e.every((a,s)=>{const o=n[s];return o!==void 0&&Ut(a)===Ut(o)})}const Zv=[vu.Button,gu.Button,fu.StickyFooter,Cu.Wrapper];function eg(){const{shopPay:e,checkout:n}=y(),[a]=Jl("ONE_TIME_PURCHASE");if(e.user.flow.value!=="unauthenticated_user")return null;const s=a[0],o=s==="PICKUP_POINT"||s==="PICK_UP";return!n.isShippingRequired.value||o?t(er,{}):null}const tg="nnGzs",ng={HeaderWrapper:tg},qs="contact";function ag({loginLink:e,title:n}){const{router:a}=y(),s=h(()=>Tn(a,qs));return t("div",{className:ng.HeaderWrapper,children:[t(we,{id:qs,level:1,autoFocus:s.value,children:n}),e]})}function vr(){const{client:e,i18n:n,source:a}=y(),s=Ql(),o=a.type==="simulated";return t(T,{when:s,children:t(Me,{href:o?void 0:e.unstable_getSerialization("loginUrl")||"",children:n.translate("customer_account.sign_in_link_label")})})}vr.displayName="LoginLink";const sg=()=>{const{i18n:e,userEvents:n,source:a,checkout:s,shop:o,shopPay:i}=y();return t(Me,{onClick:()=>{n.monorailEvent({schemaId:"shopify_pay_payment_page_ui_interaction/1.1",payload:{...
2Ue(a,s,o),action:"click_shop_pay_sign_in"}}),i.session.unstable_updateVerificationTrigger({source:Md.LoginLink})},children:e.translate("account_management.sign_in_shop")})};function og(){const{i18n:e,checkout:{identity:n,validation:{contactErrors:{emailInputError:a}}},shopPay:s}=y(),o=n.current.value==="shopPay",i=e.translate("field_errors.email_invalid"),r=s.userVerification.value;D(()=>{o&&r.status==="invalid"&&(a.value=i)},[o,a,i,r.status]);const c=V(d=>{if(o&&r.email===d&&r.status==="invalid")return i},[o,i,r.email,r.status]);return t(G,{children:[o&&t(G,{children:[t(vi,{color:"branded"}),t(He,{blockSize:"base"})]}),t(ag,{title:e.translate("contact.contact_method_title"),loginLink:t(ig,{})}),t(He,{blockSize:"base"}),t(Ko,{hideAllOptIns:o,onValidateEmailInput:c}),o&&t(eg,{})]})}function ig(){const{checkout:{identity:e}}=y(),n=Od();return e.current.value!=="shopPay"?t(vr,{}):n===Dd.UnauthenticatedCheckout?t(sg,{}):null}const rg=qt(function({showForm:n=!0}){const a=ee("Checkout::Contact::RenderAfter"),s=ee("Checkout::Dynamic::Render","INFORMATION1"),o=ee("Checkout::Dynamic::Render","INFORMATION2");return t(G,{children:[s.length?t(G,{children:t(Pe,{customizations:s,gap:"base",marginBlockEnd:"large300"})}):null,n?t(qa,{impressionType:"contact",impressionFeatures:[],children:[t(og,{}),a.length?t(G,{children:t(Pe,{customizations:a,marginBlockStart:"base"})}):null,o.length?t(G,{children:t(Pe,{customizations:o,gap:"large-200",marginBlockStart:"large300"})}):null]}):t(G,{children:[a.length?t(G,{children:t(Pe,{customizations:a,marginBlockStart:"base"})}):null,o.length?t(G,{children:t(Pe,{customizations:o,gap:"large-200",marginBlockStart:"large300"})}):null]})]})});function lg(){const{checkout:{identity:e},i18n:n}=y(),{hasViolations:a}=Fe(en),{hasViolations:s}=Fe(Vo),{hasViolations:o}=ue(Td);if(a&&cg({identity:e}))return t(Xi,{});if(o)return t(Rt,{target:"cart.deliveryGroups[0].deliveryAddress",children:t(nt,{message:n.translate("field_errors.shipping_method_invalid_phone_number")})});const i=s?n.translate("shipping_errors.shipping_method_not_available_due_to_unsatisfied_conditions"):n.translate("shipping_errors.shipping_method_not_available_generic.one");return t(Rt,{target:"cart.deliveryGroups[0].deliveryAddress",children:t(It,{tone:"critical",heading:n.translate("shipping_errors.title"),errorType:Ne.DeliveryError,children:i})})}const cg=({identity:e})=>e.current.value==="shopPay",dg=[{handle:"first"},{handle:"second"}];function ug(){const{i18n:e}=y(),{shippableDeliveryLines:n}=Zl().value,a=n?.[0]?.methods||dg;return t(di,{name:"shippingMethods",variant:"block",hideRadioControl:a.length===1,children:a.map(({handle:s,description:o,estimatedTimeInTransit:i,deliveryPredictionEligible:r})=>{const c=!!r,d=o;return t(Wt,{value:s,disabled:!0,accessibilityLabel:e.translate("general.loading"),secondaryContent:t(Ea,{inlineSize:"5ch"}),children:t(b,{gap:"small-500",children:[t(oe,{inlineSize:"small"}),c||i!=null?t(oe,{inlineSize:"base",size:"small",id:"pending-shipping-estimated-time"}):null,d?t(ec,{content:o,size:"small"}):null]})},s)})})}function pg(){const e=y();return t(pp,{children:t(up,{children:hg(e)})})}function hg({checkout:e,i18n:n}){return e.identity.current.value==="shopPay"?n.translate("shipping_errors.invalid_shipping_method_summary"):n.translate("shipping_errors.empty_state")}const gr=qt(function(){const{uiStateSignal:n,initialUiStateSignal:a}=Va(Ia),s=ze(),o=s.value?n.value:a.value,i=ns(),{hasViolations:r}=yo(zo),c=i.value&&r,{hasViolations:d}=Fe(vg),l=s.value&&d&&!c&&o.status!=="error",p=l?t(gg,{}):null,u=(()=>{switch(o.status){case"initial":case"empty":return t(pg,{});case"loading":return t(ug,{});case"error":return t(lg,{});case"filled":{const m=wd(o.deliveryLines).filter(La),v=m.flatMap(({methods:C})=>C.map(({title:f})=>f));return t(qa,{impressionType:"shipping_methods",impressionFeatures:v,children:t(mg,{lines:m,showErrorBanner:c,deliveryChangedBannerOwnedBySection:l})})}}})();return t(b,{gap:"base",children:[p,u]})});gr.displayName="OnePageShippingMethods";function mg({lines:e,showErrorBanner:n,deliveryChangedBannerOwnedBySection:a}){const s=Ma(),o=_o(),[,i]=mt(),r=_i(i),c=yg(y());return D(()=>{s("shippingMethodsFilled",{timestamp:new Date}),o({type:"shipping_methods_filled"})},[o,s]),t(G,{children:[t(c,{}),t(b,{gap:"large-200",children:t(Gp,{lines:e,loading:r,showErrorBanner:n,deliveryChangedBannerOwnedBySection:a})})]})}function yg({checkout:e}){return e.identity.current.value==="shopPay"?fg:G}const vg=new Set(["DELIVERY_DELIVERY_LINE_DETAIL_CHANGED"]);function gg(){const{i18n:e}=y();return t(It,{tone:"warning",errorType:Ne.DeliveryError,children:e.translate("shipping_errors.shipping_method")})}function fg(){const{trackSelectShippingMethod:e}=or(),{availableDeliveryMethodsLoading:n,progressiveShippingRatesLoading:a}=mr();return yr({onChange:e,prerequisitesLoading:n||n&&!a}),null}function Cg(){const{checkout:e,i18n:n}=y(),a=e.addressManager.shipping.value,s=Gu("shipping"),{shouldGateCrossBorder:o,crossBorderGate:i}=fi(),r=a.addresses.value.find(({id:d})=>d!==a.selectedAddress.value?.id),c=V(()=>
2{if(!r)return;const d=()=>s.selectAddress(r.id,{source:"select-saved-address-link"}),l=r.address.countryCode;l&&o(l)?i(d):d()},[s,r,o,i]);return r?t(tt,{gridAutoFlow:"column",gridTemplateColumns:"minmax(0, 1fr)",gridTemplateRows:"minmax(0, 1fr)",justifyContent:"start",justifyItems:"start",children:t(Me,{id:"save_shipping_information",textDecoration:"none",onClick:c,children:n.translate("customer_account.saved_address_option_link")})}):null}function _g(){ir();const n=Xt()?.options.value.some(s=>s.id==="PICKUP_POINT")??!1,a=kn();return t(b,{gap:"large-300",children:[n&&t(Ha.Prefetch,{}),t(Zo,{}),t(Ua,{name:"delivery-methods",children:t(Sg,{})}),t(T,{when:a,children:t(Qo,{})})]})}function Sg(){const{methods:e}=vo(),{i18n:n,router:a,checkout:{wallets:s,identity:o}}=y(),i=tc(),{deliveryNext:r,optionalDuties:c}=j(),d=Yp(),l=lo(),{shippingAddress:p}=Z();nc(p,()=>{l&&l.taxId.reset()});const u=ee("Checkout::DeliveryAddress::RenderBefore"),m=ee("purchase.checkout.delivery-address.render-after"),v=Si(),{hasMultipleDeliveryGroups:C,onlyDeliveryGroupType:f}=v.value,{customizationsBefore:g,customizationsAfter:_}=bi({hasMultipleDeliveryGroups:C,targeted:!1}).value,P=h(()=>Ho(r.value,!0)||d.value.showShipmentBreakdown).value,S=P?"small-400":"base",k=Ma(),L=_o(),{negotiate:M}=ot(),A=V(({shipping:Q})=>{s.activeSession.value||M({include:[],fieldsToResolve:["deliveryNext"],silenceViolations:["non-delivery-address"],runListenersOnError:!0}),Q.value=!0,k("sectionComplete",{section:"deliveryAddress",timestamp:new Date}),L({type:"section_complete",section:"deliveryAddress"})},[s,M,k,L]),B=V(({shipping:Q})=>{Q.value=!1},[]),w=Q=>t(Qn,{padding:P?"small-400 none":void 0,children:Q}),E=se(()=>({groupType:f&&ac(f),includeDeliverySelectionGroups:!1}),[f]),R=za(),F=h(()=>R.value.isDelivery),U=je(),W=kn(),N=h(()=>U.value?e.value.includes("PICK_UP")&&e.value.includes("SHIPPING"):!1),z="shippingMethod",X=h(()=>Tn(a,z)),Y=$o(),H=t(fn,{sectionId:"localPickup",children:t(b,{gap:"small",children:[t(T,{when:N,children:t(we,{level:2,children:n.translate("delivery_options.pickup")})}),Y?t(su,{}):t(ou,{})]})}),K=t(fn,{sectionId:"shipping",children:[t(Qn,{children:t(b,{gap:"base",children:[t(T,{when:N,children:t(we,{level:2,children:n.translate("delivery_options.ship_to_address")})}),t(T,{when:i,children:t(pe,{color:"subdued",children:n.translate("shipping.shipping_used_as_billing_notice")})}),t(T,{when:N,children:t(T,{when:W,children:t(q,{border:"base",padding:"base",borderRadius:"large",children:t(iu,{selectedDeliveryMethodType:"SHIPPING"})})})}),t(Pe,{customizations:u}),t(b,{gap:"large-300",children:[t(Kp,{children:t($u,{onValid:A,onInvalid:B,children:t(tr,{children:[bg({identity:o})&&t(Cg,{}),t(ru,{}),t(T,{when:F,children:t(ei,{})}),l&&t(lu,{taxId:l.taxId,applied:l.applied})]})})}),t(Pe,{customizations:m}),t(b,{gap:S,children:[t(we,{id:z,level:2,autoFocus:X.value,children:n.translate("shipping.shipping_method_title")}),t(sc,{children:[t(T,{when:()=>d.value.showShipmentBreakdown,children:t(Is,{children:[t(Zp,{}),t(He,{blockSize:"small-200"})]})}),qp("shipping.shipping_method_notice",n)?t(pe,{children:n.translate("shipping.shipping_method_notice")}):null,t(Pe,{customizations:g,options:E,render:w}),t(Is,{children:[t(gr,{}),t(Qp.Preload,{})]}),t(Pe,{customizations:_,options:E,render:w})]})]})]})]})}),t(T,{when:()=>c.value?.refuseDutiesPermitted,children:t(Qn,{accessibilityLabel:n.translate("shipping.duties_and_taxes_title"),children:t(b,{gap:"base",children:[t(we,{level:2,children:n.translate("shipping.duties_and_taxes_title")}),t(Ci,{})]})})})]}),x=h(()=>e.value.includes("PICKUP_POINT")),le=h(()=>e.value.includes("PICK_UP"));return t(T,{when:N,fallback:t(T,{when:()=>x.value||le.value,fallback:K,children:t(T,{when:x,fallback:H,children:t(fn,{sectionId:"pickupPoints",children:t(Ha,{})})})}),children:t(b,{gap:"large-300",children:[H,K]})})}function bg({identity:e}){return e.current.value==="customerAccount"}const Pg=qt(function(){const{shop:n,i18n:a}=y(),s=ee("Checkout::Dynamic::Render","DELIVERY1"),o=Xt(),i=_e(),c=!n.hasFlagEnabled(Wo),d=J(!!(c&&o)),l=h(()=>i.value.contact&&d.value),p=h(()=>l.value?void 0:"deliveryAddress"),u=h(()=>l.value?a.translate("shipping.delivery_title"):void 0);return t(On,{accessibilityLabelledBy:p.value,accessibilityLabel:u.value,accessibilityRole:"group",children:t(b,{gap:"base",children:[t(T,{when:()=>!l.value,children:t(b,{gap:"small-400",children:t(sr,{})})}),t(xa,{}),t(_g,{}),t(Pe,{customizations:s})]})})}),fr=jt({displayName:"MobileOrderSummaryBeforeDetails",load:()=>Kt(()=>Yt(async()=>{const{MobileOrderSummary:e}=await import("./component-MobileOrderSummary.B6nUs1j_.js");return{MobileOrderSummary:e}},__vite__mapDeps([114,1,3,4,5,6,2,7,8,9,71,72,60,115,116,117])).then(({MobileOrderSummary:e})=>({default:e}))),renderError(e){throw e}}),$s=typeof window>"u"?void 0:performance.now();typeof window<"u"&&dr.preload();const Ag=Zv,Eg=qt(function(){return Lv(),Mv(),null}),Rg=qt(function({children:n}){const{checkout:a,embed:s,environment:o,i18n:i,observability:r,shop:c,source:d}=y(),l=a.configuration.headerText?.visibility==="VISIBLE",p=ye(!1),u=V(()=>{p.value||(p.value=!0,$s!==void 0&&r.histogram({name:"one_page_below_fold_content_ready",value:Math.round(performance.now()-$s),unit:"ms",attributes:{buildId:o.commitSha}}))},[o.commitSha,p,r]),m=ze(),v=c.hasFlagEnabled(Nd),C=Zt({embedder:s?.embedder,shop:c}),f=s?.embedder==="google"&&C,g=_e(),_=_u(),P=h(()=>g.value.payment&&_.value),S=J(Xt()),k=oc(),L=h(()=>g.value.payment&&c.acceptTipPayments&&(k?.tippingPaymentAllowed??!0)&&a.configuration.visibility.showTips),M=J(fo()[0]),{postPurchaseEnabled:A}=$p(),B=j(),w=h(()=>B.buyerIdentity.value?.customerProfile),E=ic(),R=h(()=>f&&E.value),F=je(),U=h(()=>g.value.contact&&a.configuration.showContactInformation||g.value.delivery&&a.isShippingRequired.value||g.value.payment),W=h(()=>F.value&&U.value);$v();const N=J(rc({base:!0,medium:!1})),z=h(()=>m.value?N.value??!1:!0),X=cu(),Y=h(()=>X.value!=="hidden"),H=J(ee("Checkout::Contact::RenderAfter")),K=Xv(),{main:{section:x}}=Aa(),{lineItems:{priority:le="base"}}=Dt(),ie=J(Vd(x)),Q=go(),te=h(()=>a.identity.current.value==="shopPay"||g.value.payment||!ie.value?"belowPayment":"abovePayment"),de=h(()=>K.value&&te.value==="belowPayment"),ce=h(()=>K.value&&te.value==="abovePayment"),ne=h(()=>Q.value&&g.value.payment&&de.value&&z.value),fe=h(()=>a.configuration.visibility.showEmailMarketing&&!et(d)&&ce.value&&!w.value?.acceptsEmailMarketing),Ee=za(),Ce=h(()=>Ee.value.isRoot?te.value==="belowPayment"&&(!z.value||!ie.value)?"belowPayment":"abovePayment":"none"),ve=h(()=>a.identity.current.value==="guest"&&g.value.delivery||a.identity.current.value==="businessCustomer"&&!g.value.delivery&&g.value.payment),Se=h(()=>a.identity.current.value==="guest"?ve.value&&!(g.value.contact&&g.value.payment):ve.value),he=h(()=>!Se.value&&a.isShippingRequired.value),Oe=h(()=>a.configuration.showContactInformation&&Yo({isContactVaulted:g.value.contact,identity:a.identity.current.value,isPartnerEmbed:s?.isFlagshipPartner??!1,embedder:s?.embedder,isInterstitialBrandingEnabled:C,customerContactMethodPrefilled:a.identity.customerContactMethodPrefilled})),I=h(()=>!!(!et(d)&&g.value.delivery&&S.value!=null)),Re=h(()=>g.value.delivery&&M.value.includes("PICK_UP")),ge=h(()=>!!(Oe.value||Re.value||(he.value||Se.value)&&I.value)),De=h(()=>!!(he.value&&I.value&&!Oe.value)),Ve=st(s?.embedder),ae=a.configuration.orderSummary?.placement==="beforeDetails",qe=h(()=>Ve&&!ae&&!De.value),Te=h(()=>Ve&&ge.value),$e=h(()=>Ve?ae:Q.value),Be=h(()=>Ve?ae:ie.value),be=h(()=>a.identity.current.value==="guest"&&g.value.delivery&&!g.value.contact),yt=h(()=>ie.value&&(fe.value||Ce.value==="abovePayment")),vt=Jv(),We=h(()=>m.value&&g.value.contact&&H.value.length>0),Vt=h(()=>m.value&&!E.value&&vt.value.length>0),it=lc(),Xe=h(()=>m.value&&it.value&&ae),sn=h(()=>it.value&&!ae),rt=!!s?.isFlagshipPartner&&le==="high";cc();const lt=h(()=>fe.value||ne.value),on=h(()=>Ce.value==="abovePayment"),gt=h(()=>!ie.value&&!W.value),Bn=h(()=>!(W.value&&g.value.contact)&&(Q.value||ie.value&&!g.value.contact)),ft=h(()=>g.value.payment&&!ne.value&&!sn.value),rn=h(()=>P.value||yt.value||ne.value||Q.value&&!ie.value&&z.value||ft.value),Ct=h(()=>U.value&&!be.value),Fn=h(()=>v&&Ct.value),xn=h(()=>!v&&Ct.value),ln=h(()=>!be.value),Hn=h(()=>P.value||ft.value||!g.value.payment&&g.value.delivery&&!z.value&&!We.value||g.value.payment&&ne.value);return t(lh,{children:[t(Eg,{}),t(b,{blockSize:R.value?"100%":void 0,gap:"@media (inline-size >= extraSmall) large-200, none",children:[t(T,{when:qe,children:t(hs,{accessibilityRole:"presentation"})}
2),et(d)?t(b,{gap:"base",padding:"@media (inline-size >= extraSmall) none, large-200 large-200 none large-200",children:t(dc,{})}):null,t(Zn,{section:"toast"}),!rt&&t(Zn,{section:"top"}),t(Ov,{active:m,ready:p}),t(Nv,{fillAvailableBlockSize:R.value,ready:p,children:[l&&t(q,{padding:"none none large-100 none",children:t(eh,{})}),le==="high"&&t(q,{display:"@media (inline-size >= medium) none, auto",children:t(aa,{target:"lineItems",children:t(On,{hideDivider:Y,children:t(uc,{})})})}),rt&&t(Zn,{section:"top"}),t(T,{when:Y,children:t(aa,{target:"expressCheckout",children:t(du,{})})}),t(T,{when:Xe,children:[t(ea,{section:"summary",children:t(xt,{section:"summary",children:t(q,{padding:"none large-200 large-100 large-200",children:t(aa,{target:"plain",children:t(fr,{})})})})}),t(hs,{accessibilityRole:"presentation"})]}),t(zv,{}),t(ch,{}),t(sa,{target:"vaulted",condition:Fn,children:t(zt,{hideDivider:Hn,condition:gt,accessibilityLabel:i.translate("contact.contact_method_title"),children:t(sa,{target:"vaulted",condition:xn,children:[t(Rv,{showDelivery:he}),t(zt,{condition:Bn,hideDivider:rn,accessibilityLabel:i.translate("contact.contact_method_title"),children:t(b,{children:[t(T,{when:()=>!g.value.contact,children:t(ea,{section:"contact",children:t(xt,{section:"contact",children:t(rg,{showForm:a.configuration.showContactInformation})})})}),t(T,{when:()=>!ve.value,children:t(Gs,{hideLastDivider:$e,showTopDivider:Te})})]})}),t(T,{when:W,children:t(ju,{})})]})})}),t(T,{when:P,children:t(q,{paddingBlockStart:"small-300",paddingBlockEnd:"base",children:t(Su,{})})}),t(T,{when:()=>ie.value||ne.value,children:t(xt,{section:"contact",children:t(Wv,{aboveFoldSpacing:!0,showEmailMarketingOptIn:lt,showPhoneMarketingOptIn:on})})}),t(T,{when:We,children:t(xt,{section:"contact",children:t(Ks,{extensions:H,hideDivider:"whenEmpty"})})}),t(T,{when:Se,children:t(T,{when:a.isShippingRequired,children:t(sa,{target:"vaulted",condition:ln,children:[t(rr,{}),t(Ku,{condition:ve,accessibilityLabel:i.translate("shipping.delivery_title"),children:t(Gs,{hideLastDivider:Be,showTopDivider:Te})})]})})}),t(T,{when:Vt,children:t(Ks,{extensions:vt,hideDivider:"whenEmpty"})}),t(T,{when:()=>!g.value.delivery&&a.isShippingRequired.value,children:t(Rt,{target:"cart.deliveryGroups[0].deliveryAddress",children:t(ea,{section:"delivery",children:t(xt,{section:"delivery",children:t(fn,{sectionId:"delivery",children:t(Pg,{})})})})})}),t(T,{when:L,children:t(Wu.Prefetch,{})}),t(T,{when:R,children:t(q,{className:ur.OnePageFlexibleSpacer,"data-testid":"onepage-vaulted-spacing"})}),t(T,{when:m,children:t(dr,{onReady:u,showMobileOrderSummary:sn,showVaultedStateMarketingDisclosureBelowPayment:de,phoneMarketingPlacement:Ce,isSectionCustomized:ie,showVaultedStateMarketingDisclosureOnMobile:ne,expressCheckoutSlot:X})})]}),A&&t(Yu,{})]}),t(Fv,{}),t(T,{when:a.isShippingRequired,children:t(qv,{})}),t(uu,{id:"OnePage"}),n]})}),Lf=Object.freeze(Object.defineProperty({__proto__:null,MobileOrderSummaryBeforeDetails:fr,default:Rg,onePageCriticalStyleClassNames:Ag},Symbol.toStringTag,{value:"Module"}));export{Eh as L,Rh as M,tr as O,Wv as P,kh as R,qy as S,cm as U,Ks as V,zy as a,Gv as b,cy as c,dy as d,gr as e,Wy as f,bh as g,Sh as h,Cy as i,kf as j,Tn as k,em as l,Ti as m,Jv as n,Tm as o,Lf as p,Gy as u};

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.