PageSourceSearch

https://shop.mombeach.com/cdn/shopifycloud/checkout-web/assets/c1/hydrate.B4yS4myh.js

js mombeach.com collected 2026-09-25 18:18:18 UTC 828,008 bytes, 43 lines download raw bytes

1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["Trekkie.hnzWbric.js","esnext-vendor.B9Da21W6.js","addresses-is-address-empty.BgqK_zG_.js","app.3xnYS5zI.js","assets/app.Sxsz5knT.css","assets/is-address-empty.DJksNKpk.css","graphql-PaymentSessionMutation.DJrmXbx9.js","hooks-useShopPayExternalAppContext.DPMzO6wO.js","hooks-useReplaceShopPayInHistory.DcFB3a73.js","AdminPreviewBar.DnhGqrVJ.js","assets/AdminPreviewBar.DCHJbWD8.css","ExtensionsInner.CdP359ca.js","checkout-as-guest-amazon-pay.OZpfvDZ9.js","extension-targets-rendering-extension-targets.DGgtb-Yu.js","utilities-extension-execution-errors.DOZyBkns.js","AnnouncementRuntimeExtensions.H8r-m80u.js","QRCode.CN8fSmCT.js","assets/QRCode.BZ_m5G5a.css","Pressable.CiHxti6q.js","assets/Pressable.D9SfDfsb.css","Checkbox.BczifWI0.js","assets/Checkbox.SrYMuQu4.css","Choice.CDjRJs0E.js","assets/Choice.aPApdPe_.css","utilities-dates.ChO2GdxN.js","Popover.CNzomHVN.js","assets/Popover.Bi1nHaU-.css","PaymentIcon.JjE8o6o4.js","assets/PaymentIcon.gzvCNwz_.css","NumberField.C1J8jaWN.js","assets/NumberField.CRpcZnVJ.css","Switch.7EoeuAEf.js","assets/Switch.BS8yVgoP.css","extensions-remote-dom.B9_ZoSQj.js","EmailField.DK289aHA.js","TextArea.Iq2WHHZg.js","Sheet.Dqe1Da8H.js","assets/Sheet.CpR5hiDV.css","styles-floating-layer.module.BCoSmdvP.js","assets/floating-layer.DfWUBaTh.css","hooks-useForceShopPayUrl.C2ZNNdwy.js","AddressPresenter.BLD4r5EN.js","PhoneField.DBCuSqxo.js","components-RedirectionNotice.module.CtEG0YAw.js","amazon-pay-useAmazonPayPaymentLine.BNRz9asa.js","assets/RedirectionNotice.B8v_QGNW.css","hooks-useSuppressShopPayModalOnLoad.BATXRvBx.js","assets/PhoneField.uZEuHncj.css","hooks-useShowShopPayOptin.BDMNomvs.js","assets/AnnouncementRuntimeExtensions.D2R3fBzd.css","consent-manager-shared.CGK4EXDP.js","performance-index.mu6MOGR9.js","Page.nY_5tU4l.js","assets/Page.BYM12A8B.css","dist-v4.EwEgHOG0.js","adapter-host.CAsHhWAc.js","actions.D18pmjRp.js","MarketsProDisclaimer.CdZfE75O.js","negotiated-findSelectedDeliveryMethod.BaIHcQBI.js","shared-receipt-mapper-load-recovery.D65uooMz.js","shared-receipt-eager-mappers.Djoi_CR2.js","shared-report-graphql-error.BoF9YjQU.js","CheckoutSheetProtocolProvider.Cu5JKJlc.js","utils-useViolationsHandler.B-LGH1Km.js","utils-checkoutProtocolLinkInterceptor.DE73LDhe.js","shared-receipt-merchandise-lines.Df3mKQFg.js","MobileCheckoutSdkProvider.CdVI2VkJ.js","CheckoutEditorBridge.D29oJo3o.js","receipt-mappers.IObc0jjO.js","component-WalletApplePayLazy.DCe2EOoS.js","cross-border-hooks.BaPsRg4c.js","wallets-deserialize-delivery-handles.muaszlj2.js","PayButton-helpers.CM5guAPL.js","hooks-useWalletsThreePageVaultedReviewEscalation.C7D7Tsob.js","hooks-payment-button.aUifgNQr.js","web-mcp-pickup-locality.IS9bxZGr.js","web-mcp-runtime.EWEnBFgl.js","cvv-cvvBridge.hYfPqjG6.js","helpers-derivations.Cr-il7Z-.js","redemption-promotions.DLBLAp8j.js","context-browser.Q2R3PORz.js","proposal-delegated-payment-instrument.DdQUrP6a.js","shared-shop-theme.COUCqJYi.js","shop-pay-normalizeBuyerDetails.D_U_lYsO.js","DevTools.BKs2AE3N.js","assets/DevTools.DTK7lleS.css","EditorBridge.BjRyFVc_.js","DeferredPrivacy.D0Rwfwql.js","ReviewBlock.CIS5hxp5.js","BillingAddressSelector.DTrrC6EY.js","BillingAddressForm.DavEQGPd.js","localization-index.Bro8unL5.js","assets/index.CFj15lwv.css","assets/BillingAddressForm.BdwN7V1K.css","Middot.BV8s_EEX.js","EstimatedDeliveryContent.N0DWzNeD.js","ShippingMethodRateLabel.BczUlK97.js","assets/EstimatedDeliveryContent.B_THySFF.css","shipping-methods-consolidated-included.Braf68bL.js","assets/Middot.D7Ujmshx.css","components-DeliveryReviewMethods.SbiqA4uK.js","assets/DeliveryReviewMethods.CZ0Im8vA.css","Section-SectionStyleOverride.sufnDsdd.js","PaymentLine.BaMerjbg.js","Theme-ThemeOverride.DlST5SjW.js","assets/PaymentLine.D3bcP-mr.css","hooks-useShopPayNewSignupLoginExperiment.Da9ORliN.js","page-Information.Dxf2bOHj.js","Captcha.C0uvDKuk.js","ShopPayCaptcha.cR3Ali-J.js","PaymentErrorBanner.BorVO5Qz.js","hooks-useGeneralPaymentErrorMessage.Dg4346To.js","assets/Captcha.CJQgLR0i.css","components-VatNumberValidationField.D67SQ3lt.js","useShopPayButtonClassName.qvMFUOcV.js","hooks-useShouldRevealCustomization.CsootzFS.js","assets/useShopPayButtonClassName.CpHF4L7Q.css","ChangeCompanyLocationLink.DjKlk5Mg.js","shop-pay-installments-monorail.DvKk051s.js","ShopPayLogo.D4bTvXV6.js","hooks-useWalletsTimeout.BM5fP26E.js","stopwatch.BB4J8gXS.js","assets/stopwatch.BxwwfmsJ.css","IncentiveBadge.D5Z_lWbZ.js","assets/IncentiveBadge.Dlnp55te.css","TransitionHeight.C3L27Pqk.js","assets/TransitionHeight.CuRoM9zv.css","AutocompleteField-hooks.DlPCpnup.js","PendingShipping.BF5kZQEo.js","assets/VatNumberValidationField.WmDmCQ5a.css","page-lazyNoAddressLocation.BYLrO9MQ.js","assets/lazyNoAddressLocation.D14orovx.css","OnePage.BzB6QSpS.js","StickyPayButton-StickyPayButton.module.BJnL9-DP.js","assets/StickyPayButton.CPXhWoNv.css","useAddressMutationsWithNegotiation.DNCHxdTZ.js","hooks-use
1UpdateCheckoutAddress.BNYaFXwf.js","payment-usePaymentExemptionReason.DMw_Ho83.js","hooks-useShopPayProgressIntercepts.DIswdKHy.js","assets/useShopPayProgressIntercepts.CIy8uDiZ.css","assets/useAddressMutationsWithNegotiation.BcTJoNaV.css","Section.DtSz0nUv.js","assets/Section.CU18S7Ap.css","hooks-usePreselectSpi.C9HlQZO5.js","ShippingLines.D2wJ2oT7.js","ShipmentBreakdown.CGXd16n7.js","MerchandiseModal.DP2EJjwH.js","ShippingMethodSelector.B8AJyclX.js","assets/ShippingMethodSelector.B0hio2RO.css","SubscriptionPriceBreakdown.Jvapmmt2.js","assets/SubscriptionPriceBreakdown.vTcdVGq4.css","assets/ShippingLines.LcqrKXE1.css","StockProblems-StockProblemsLineItemList.B-CUAZhR.js","assets/OnePage.DxMZvmU_.css","page-OnePageReview.C8FyeiSI.js","component-MobileOrderSummary.CPrwILeP.js","assets/MobileOrderSummary.2B5x30PG.css","PayButtonSection.C4hyHlw5.js","PaymentButtons.DrUn-_md.js","assets/PaymentButtons.CKE1iCma.css","assets/PayButtonSection.Bi0nhBOp.css","page-Payment.Iqpgr0zI.js","RememberMeSection.n5aIcf6Q.js","components-PaymentMethodProgressionHost.C-rEt68C.js","assets/PaymentMethodProgressionHost.CyN3XztW.css","assets/RememberMeSection.JBO5WNhc.css","KnownBuyerPaymentMethodSelector.CRG_RreE.js","hooks-usePaypalRowEffects.C2o4Mi8y.js","assets/KnownBuyerPaymentMethodSelector.BXqN6ZOx.css","page-PostPurchase.D72-91fU.js","PostPurchaseShouldRender.CBkoLqH8.js","extensions-rpc.CgQAehfR.js","assets/PostPurchase.e2mo8B8q.css","page-Processing.5VdcgoKE.js","assets/Processing.D4vG8dn7.css","page-Review.CBNB9SvL.js","page-Shipping.466zNPJX.js","page-ShopPayLoginLoader.OcgRb98F.js","models-ShopPayBuyerDetails.model.D9sKzELz.js","utilities-publishMessage.DwsvgM5J.js","assets/ShopPayLoginLoader.B1_neltu.css","page-StockProblems.C4i00a0x.js","embed-deferred.SVwxbhzZ.js","stock-problems-useStockProblemsState.CcYFHwV8.js","page-StockProblemsModal.DCHDVpXe.js","page-ThankYou.B4OwIlOm.js","useAuthorizeUrl-index.Dy-v5COA.js","Map.BBnOVxi_.js","hooks-useStableHostMethodsReferences.DTUU3rzl.js","assets/Map.cbVP6Hp_.css","ShipmentLine.By3nEKXK.js","BuyWithPrimeOrderTrackingButton.DGSNnP1M.js","shipping-methods-grouping.CtKrh_Du.js","amazon-constants.Bd9_eh6Z.js","assets/ThankYou.BVzfUFVM.css","page-Throttle.COQ4BPmF.js","assets/Throttle.CK6IAVuq.css","component-RuntimeExtension.DZ-wjbUd.js","assets/RuntimeExtension.DWkDBM73.css","component-PaymentChallengeModal.BIAYF72V.js","assets/PaymentChallengeModal.Cz9ZxF4h.css","component-CryptoModalManager.CkuPXivY.js","assets/CryptoModalManager.CqiWenQK.css","component-ProductDisclosuresDetails.CpqYGDdM.js","VaultedContactAvatar.C3VcwZhA.js","assets/VaultedContactAvatar.BF3cX_zA.css","ShopPayCheckout.CUHctjhb.js","assets/ShopPayCheckout.CDRlDVu0.css","component-amazonWalletLazy.BaKPZYh1.js","WalletsSandbox-WalletSandbox.Ctwh9C8p.js","assets/WalletSandbox.BoV0vp4z.css","assets/amazonWalletLazy.D78LrA7v.css"])))=>i.map(i=>d[i]);
2import{f as w,q as x,T as B,A as V,h as F,G as _t,k as oe,_ as Dt,ae as cf,ai as UP,u as s,b8 as zP,e as Le,x as Ee,a2 as uf,X as He,S as q,g as Y,D as at,F as Jt,o as It,p as $e,y as ue,l as We,d as qe,r as ct,Q as Jn,i as ve,$ as HP,n as tn,a as rn,a1 as qP,m as rd,R as GP,a4 as od,N as $P,j as nl,ag as Fo,L as WP,M as YP,a0 as jP,V as KP,b9 as df,ba as JP,bb as XP,O as QP,bc as ZP,W as Gt,au as ns,s as Xn,Y as eS,Z as tS,bd as nS,be as rS,at as oS,bf as iS,b6 as Nt,bg as sS}from"./esnext-vendor.B9Da21W6.js";import{mX as aS,c$ as Bo,P as ft,Q as Ut,S as _,aB as Ot,em as rl,H as Be,mY as pf,di as Bl,g as yr,V as Yn,en as mf,b1 as ff,af as Je,a4 as H,mZ as Vl,eU as vr,db as jn,bK as zi,da as hf,gV as gf,b8 as rs,b7 as Hi,cq as bt,d7 as hr,d3 as lS,d2 as Io,d8 as id,d9 as yf,c_ as vf,mF as _f,m_ as cS,m$ as _r,eR as bf,mn as qn,n0 as Ul,n1 as uS,dq as dS,g0 as Qn,jo as pS,T as se,b2 as ei,aM as zl,n2 as mS,n3 as fS,ao as xt,ee as sd,n4 as ad,n5 as ld,n6 as cd,ej as ud,ei as dd,eh as pd,eg as md,n7 as hS,f5 as Po,m2 as Hl,gF as os,n8 as Pf,n9 as Sf,m3 as qi,bc as On,bH as Ef,lZ as gS,dK as yS,gn as vS,eJ as Cf,eI as ql,jp as kf,eF as _S,na as bS,eH as PS,nb as SS,eG as ES,bl as Vo,ck as Ao,jQ as CS,nc as kS,h1 as IS,cY as AS,go as fd,ex as bi,nd as TS,ne as wS,nf as LS,ng as RS,nh as xS,bw as ti,ld as MS,bj as NS,bg as DS,bh as hn,ni as If,ez as Af,n as br,e2 as Gl,an as St,fx as OS,av as Pt,bP as FS,aj as Yt,cn as $l,bI as Tf,mR as BS,G as ol,nj as VS,E as US,kH as zS,nk as HS,kG as qS,cy as il,nl as GS,nm as $S,nn as WS,no as YS,np as Wl,nq as wf,nr as jS,ns as KS,lf as Lf,fI as Yl,hP as Uo,hS as JS,hO as XS,b3 as Pr,nt as hd,cA as gd,ae as Ye,hJ as In,lG as is,bd as ze,hN as Rf,nu as QS,aQ as xf,lR as ZS,fE as 
2sl,a6 as xe,v as jl,mC as Mf,gO as ss,hV as eE,ax as tE,hW as nE,bS as rE,nv as oE,nw as Kl,nx as Nf,l4 as Df,ki as iE,ny as sE,dC as aE,lk as Of,ln as Ff,lu as lE,nz as cE,nA as Bf,hg as Vf,nB as uE,nC as dE,x as ni,nD as pE,nE as mE,nF as fE,nG as hE,nH as gE,gy as yE,nI as vE,id as Uf,nJ as _E,nK as bE,nL as yd,nM as PE,et as zf,nN as SE,cj as Hf,nO as EE,w as qf,eD as CE,it as Gf,lv as kE,nP as IE,lx as AE,lA as vd,nQ as TE,lz as wE,nR as LE,nS as RE,nT as xE,nU as ME,nV as NE,nW as DE,iC as OE,nX as FE,j3 as BE,aU as VE,as as UE,h as zE,ai as HE,kE as qE,b5 as nt,iO as $f,iz as Wf,nY as Jl,jG as Kr,l as Xl,nZ as Lr,n_ as GE,n$ as $E,o0 as WE,dU as zr,o1 as YE,o2 as jE,o3 as KE,cR as Ql,kt as Zl,o4 as JE,o5 as zo,r as XE,kZ as gr,bA as Yf,j0 as QE,j2 as Gi,i$ as ZE,bG as Xs,o6 as eC,o7 as tC,fg as jf,lU as Kf,lT as Jf,fk as Xf,fh as Qf,lV as Zf,ma as al,dc as nC,gz as rC,gB as oC,bn as eh,cU as iC,eK as sC,hm as aC,o8 as lC,o9 as cC,oa as uC,ob as dC,f2 as Zn,oc as qt,mK as pC,fB as th,od as mC,oe as fC,ms as hC,f8 as nh,mr as gC,mt as yC,of as vC,bo as _C,og as bC,oh as PC,oi as SC,oj as _d,aC as Gn,ok as EC,j_ as CC,j$ as bd,e as kC,jZ as sr,gZ as ec,hj as tc,ol as IC,om as AC,y as nc,cS as rc,ag as TC,fR as wC,fS as rh,lK as LC,k4 as as,fT as oh,gT as RC,hl as xC,C as MC,on as NC,gQ as DC,au as OC,oo as FC,m4 as BC,b0 as oc,hQ as VC,op as UC,oq as zC,or as HC,df as qC,os as GC,ot as $C,mP as WC,ou as YC,ov as jC,ow as KC,ox as JC,gE as XC,gG as ls,oy as QC,iS as ZC,oz as ll,oA as ek,oB as ih,e0 as tk,hc as sh,dt as cl,bz as zt,oC as nk,eO as ic,jd as Pd,kr as rk,cV as ok,a$ as sc,oD as ik,oE as sk,oF as ak,dE as ah,dS as lk,i as $i,oG as ck,J as uk,ji as dk,f as lh,oH as pk,oI as mk,jm as Sd,cM as Ed,kL as fk,k3 as ac,e5 as hk,e6 as gk,cW as ri,bR as oi,aS as ch,oJ as cs,oK as yk,aX as vk,oL as _k,oM as uh,bC as bk,lj as Pk,cx as Sk,oN as Ek,bm as Ck,bk as kk,ct as lc,fq as Ik,aT as cc,Z as Ak,bJ as Tk,a3 as us,a2 as wk,mO as Lk,ir as Rk,oO as xk,A as dh,oP as Mk,jj as ph,im as Nk,oQ as mh,aE as Dk,aD as po,aG as Ok,aH as Fk,oR as Bk,oS as Vk,B as ul,oT as Uk,oU as fh,ek as Jr,oV as hh,ec as ds,oW as zk,dj as gh,jh as Hk,oX as qk,gL as Gk,oY as yh,jt as $k,hd as Wk,mN as Yk,eb as jk,hH as Kk,eo as Jk,h3 as Xk,cl as Qk,ea as vh,e9 as Zk,es as eI,ep as uc,oZ as _h,hk as tI,dD as bh,hL as Ph,jT as nI,o_ as rI,kh as oI,o$ as Sh,p0 as iI,p1 as sI,cQ as aI,kk as Eh,p2 as lI,k1 as cI,p3 as Ch,lJ as uI,lI as dI,hh as pI,hi as mI,p4 as fI,p5 as hI,p6 as gI,p7 as yI,hn as vI,gR as _I,cr as bI,bs as Cd,gP as PI,kc as SI,jk as kh,al as EI,hA as CI,hp as kd,p8 as kI,p9 as II,pa as AI,pb as TI,pc as wI,pd as LI,fN as RI,pe as Ih,pf as xI,pg as MI,fD as NI,hR as DI,z as OI,lw as Ah,ph as FI,a1 as Th,fL as BI,cT as VI,ci as wh,pi as UI,bQ as zI,dR as HI,lb as Qs,jK as Id,jL as Ad,b4 as qI,g9 as GI,kj as $I,lQ as WI,ft as YI,m0 as jI,pj as KI,pk as JI,pl as ps,pm as XI,pn as QI,dT as ZI,po as eA}from"./addresses-is-address-empty.BgqK_zG_.js";import{i as er,c as Lh,I as dc,f as tA,e as nA}from"./graphql-PaymentSessionMutation.DJrmXbx9.js";import{j as pr,S as bn,_ as Ve,J as rA,q as oA,P as iA,O as sA,i as aA,c as lA,t as cA,r as uA,v as Zs}from"./app.3xnYS5zI.js";import{d as dA,i as Ho,c as dl,b as pA}from"./hooks-useShopPayExternalAppContext.DPMzO6wO.js";import{i as mA,r as fA,f as hA,j as gA,e as yA,A as vA,u as _A}from"./hooks-useReplaceShopPayInHistory.DcFB3a73.js";function ms(e){const t=aS();return bA(e,t)}function Hr(e){if(typeof e!="object"||!e)return!1;let t=!1;for(const n of Object.keys(e))if(n in Bo)t=!0;else return!1;return t}function bA(e,t){if(!t)return;if(e[t]!==void 0)return e[t];const n=Object.keys(Bo),r=n.indexOf(t);for(let o=r;o>=0;o--){const i=n[o];if(e[i]!==void 0)return e[i]}}function PA(e){return{analyticsProcessingAllowed:e.analyticsProcessingAllowed.value,marketingAllowed:e.marketingAllowed.value}}function SA(e){return!!(e.analyticsProcessingAllowed||e.marketingAllowed)}const Rh=ft("JourneyContext"),pc=ft("JourneyProgressionContext");function Ce(){const{journeyState:e,pageBeforeDetour:t,...n}=Ut(Rh),{router:r}=_();return w(()=>{const o=r.currentUrl.value.normalizedPath,{plan:i,history:a,redirectTo:l}=e.value,c=i.detours.find(m=>m.route===o),u=i.greenPath.find(m=>m.route===o),d=t.value;return{...n,plan:i,currentPage:u??d,currentDetour:c,history:a,redirectTo:l,journeyState:e}})}function Mt(){const e=Ut(pc),{detour:t,progress:n,progressing:r,completing:o,prefetch:i,negotiate:a}=e,l=x(c=>a({identifier:Symbol("journeyNegotiation"),...c}),[a]);return B(()=>({detour:t,progress:n,progressing:r,completing:o,prefetch:i,negotiate:l}),[t,n,r,o,i,l])}function tr(e){const t=Ot(),n=V(e);n.current=e,F(()=>t.listen((...r)=>n.current(...r)),[t])}function xh(e){const t=Ot(),n=V(e);n.current=e,F(()=>t.listenBeforeNegotiation((...r)=>n.current(...r)),[t])}function R3({active:e=!0}={}){const t=Ot();F(()=>
2{if(e)return t.block()},[t,e])}const Td=["information","shipping","payment","review"];function EA(){const{router:e}=_(),{plan:t}=Ce().value;F(()=>e.beforeNavigate((n,r)=>{const o=t.greenPath.find(u=>u.route===n.normalizedPath),i=t.greenPath.find(u=>r.pathname.endsWith(u.route));if(!o||!i)return{};if(!Td.includes(o.id)||!Td.includes(i.id))return{};const a=t.greenPath.indexOf(o),c=t.greenPath.indexOf(i)>a?["page-slide-end"]:["page-slide-start"];return pr(()=>{},c),{}}),[e,t.greenPath])}function ii(){const e=_().checkout.latestReceipt.value;return e?.status==="processed"?e:void 0}function CA(){const e=ii(),t=Ce(),n=V(!1),r=x(()=>(n.current=!0,n),[n]);return{shouldPrevent:x(()=>{if(n.current)return!0;const i=t.value.currentDetour?.type==="postPurchase";return!e||!!e.redirectUrl&&!i},[e,t]),markAsEmitted:r}}function kA(e,t,n){e.monorailEvent({schemaId:"retail_shop_pay/2.0",payload:{...n,orderId:rl(t.orderIdentity.id)}})}function IA(e){const t=e.current.fields.taxes.peek();if(t)switch(t.status){case"available_total":return{amount:t.totalTax.amount,currencyCode:t.totalTax.currencyCode};case"available_total_included":return{amount:t.totalIncludedInTarget.amount,currencyCode:t.totalIncludedInTarget.currencyCode}}}const AA={thankYou:"c1_typ",postPurchase:"post_purchase"};function TA(e,t){const n=e.find(r=>r.route===t);return n?AA[n.type]??"unknown":"unknown"}function wA(e){return{CREDIT_CARD_ON_FILE:"creditCard",PAYPAL_ON_FILE:"wallet",customManualPayment:"manualPayment",deferred:"deferred",direct:"creditCard",giftCard:"redeemable",local:"local",manualPayment:"manualPayment",noop:"other",offsite:"offsite",other:"other",paymentOnDelivery:"paymentOnDelivery",redeemable:"redeemable",wallet:"wallet",walletsPlatform:"wallet",walletsPlatformPaymentMethod:"wallet",customOnsite:"customOnsite"}[e]||"other"}function x3(e,t,n){const r=[e.split(/(?=[A-Z])/).join("-")];return n?r.push(n):r.push(t?t.replace("_","-"):""),r.filter(o=>!!o).join("-").toLocaleLowerCase()}function si(e){return e.checkoutSessionIdentifier}function LA(){return{modern:/Edge?\/(1{2}[4-9]|1[2-9]\d|[2-9]\d{2}|\d{4,})\.\d+(\.\d+|)|Firefox\/(1{2}[4-9]|1[2-9]\d|[2-9]\d{2}|\d{4,})\.\d+(\.\d+|)|Chrom(ium|e)\/(9{2}|\d{3,})\.\d+(\.\d+|)|(Maci|X1{2}).+ Version\/(15\.\d+|(1[6-9]|[2-9]\d|\d{3,})\.\d+)([,.]\d+|)( \(\w+\)|)( Mobile\/\w+|) Safari\/|Chrome.+OPR\/(9{2}|\d{3,})\.\d+\.\d+|(CPU[ +]OS|iPhone[ +]OS|CPU[ +]iPhone|CPU IPhone OS|CPU iPad OS)[ +]+(15[._]\d+|(1[6-9]|[2-9]\d|\d{3,})[._]\d+)([._]\d+|)|Android:?[ /-](13\d|1[4-9]\d|[2-9]\d{2}|\d{4,})(\.\d+|)(\.\d+|)|Android.+Firefox\/(13\d|1[4-9]\d|[2-9]\d{2}|\d{4,})\.\d+(\.\d+|)|Android.+Chrom(ium|e)\/(13\d|1[4-9]\d|[2-9]\d{2}|\d{4,})\.\d+(\.\d+|)|SamsungBrowser\/([2-9]\d|\d{3,})\.\d+/,legacy:/Edge?\/(1[6-9]|[2-9]\d|\d{3,})\.\d+(\.\d+|)|Firefox\/(5[4-9]|[6-9]\d|\d{3,})\.\d+(\.\d+|)|Chrom(ium|e)\/(5[1-9]|[6-9]\d|\d{3,})\.\d+(\.\d+|)([\d.]+$|.*Safari\/(?![\d.]+ Edge\/[\d.]+$))|(Maci|X1{2}).+ Version\/(10\.\d+|(1[1-9]|[2-9]\d|\d{3,})\.\d+)([,.]\d+|)( \(\w+\)|)( Mobile\/\w+|) Safari\/|Chrome.+OPR\/(3[89]|[4-9]\d|\d{3,})\.\d+\.\d+|(CPU[ +]OS|iPhone[ +]OS|CPU[ +]iPhone|CPU IPhone OS|CPU iPad OS)[ +]+(10[._]\d+|(1[1-9]|[2-9]\d|\d{3,})[._]\d+)([._]\d+|)|Android:?[ /-](13\d|1[4-9]\d|[2-9]\d{2}|\d{4,})(\.\d+|)(\.\d+|)|Mobile Safari.+OPR\/([89]\d|\d{3,})\.\d+\.\d+|Android.+Firefox\/(13\d|1[4-9]\d|[2-9]\d{2}|\d{4,})\.\d+(\.\d+|)|Android.+Chrom(ium|e)\/(13\d|1[4-9]\d|[2-9]\d{2}|\d{4,})\.\d+(\.\d+|)|Android.+(UC? ?Browser|UCWEB|U3)[ /]?(15\.([5-9]|\d{2,})|(1[6-9]|[2-9]\d|\d{3,})\.\d+)\.\d+|SamsungBrowser\/(5\.\d+|([6-9]|\d{2,})\.\d+)|Android.+MQ{2}Browser\/(14(\.(9|\d{2,})|)|(1[5-9]|[2-9]\d|\d{3,})(\.\d+|))(\.\d+|)|K[Aa][Ii]OS\/(3\.\d+|([4-9]|\d{2,})\.\d+)(\.\d+|)/}}function RA({shopAppDomain:e,isNativeShopApp:t,isCheckoutKit:n,isSdkSurface:r}){let o=n?"checkout-kit":"checkout-one";return r&&(o+="-sdk"),t?o+="-native-shop-app":e&&(o+="-shop-app"),o}function xA(){const{modern:e,legacy:t}=LA(),n=navigator.userAgent;return n.match(e)?"modern":n.match(t)?"legacy":"unknown"}function Mh(e){return e||void 0}function qr(e){return e?Be(e):void 0}function MA(e){const t=e?.customerProfile;if(!t)return;const n=Be(t.id),r=t.email??null,o=t.firstName??null,i=t.lastName??null,a=t.phone??null,l=t.ordersCount??null;return{id:n,email:r,firstName:o,lastName:i,ordersCount:l,phone:a}}function NA({negotiated:e,shop:t,source:n}){const r=e.current.fields.merchandiseLines.value,o=e.current.fields.remoteMerchandiseDetails?.value,i=r?mf(r.lines,o):void 0,a=VA(t.currencyCode,i),l=e.current.fields.customAttributes.value??[],u=["cartNext","abandonedCart"].includes(n.t
2ype)?n.sourceId:null;let d=0,p=0,m=t.currencyCode;(i?.flatMap(g=>g.lineAllocations)||[]).forEach(g=>{p+=g.totalAmountAfterDiscounts.amount,d+=g.quantity,m=g.totalAmountAfterDiscounts.currencyCode});const h={totalAmount:mc(p,m)};return{id:u,cost:h,lines:a,totalQuantity:d,attributes:l}}function DA({shop:e}){return{name:e.name,paymentSettings:{currencyCode:e.currencyCode},myshopifyDomain:e.myshopifyDomain,countryCode:e.countryCode,storefrontUrl:e.storefrontUrl??null}}function OA(e){const t=e?.purchasingCompany;if(t)return{company:{id:t.company.id,externalId:t.company.externalId??null,name:t.company.name},location:{id:t.location.id,externalId:t.location.externalId??null,name:t.location.name}}}function FA(){const e=Je(),{shop:t,source:n}=_();return _t(()=>{const r=e.current.fields.buyerIdentity.value;return{cart:NA({negotiated:e,shop:t,source:n}),customer:MA(r),shop:DA({shop:t}),purchasingCompany:OA(r)}})}function BA(e){switch(e.type){case"custom":return e.discountType;case"code":return"DISCOUNT_CODE";case"automatic":return"AUTOMATIC"}}function Nh(e,t){return{allocationMethod:e.allocationMethod,targetSelection:e.targetSelection,targetType:qA(e.targetType),title:e.title,type:BA(e),value:GA(e,t)}}function Dh(e){const t=[];return e.forEach(n=>{n.allocations.forEach(r=>{const o=r.discountDetails.discount;Lh(o)&&t.push({amount:r.amount,discountApplication:Nh(o,r.amount)})})}),t}function VA(e,t){return t?t.map(n=>{const r=yr(n.variantId??void 0),o=zA(n.lineAllocations),i=n.itemPrice?n.itemPrice:{amount:0,currencyCode:e},a={id:r??null,image:{src:n.image?.url??null},price:i,product:{id:yr(n.productId??void 0)??null,title:n.title,untranslatedTitle:n.untranslatedTitle??null,url:n.productUrl??null,vendor:n.vendor,type:n.productType},sku:n.sku??null,title:n.subtitle??null,untranslatedTitle:n.untranslatedSubtitle??null};return{cost:o,merchandise:a,quantity:n.quantity}}):[]}function UA(e,t,n){return fc(e,n).map(o=>{const i=qr(o.variantId),a=o.itemPrice?o.itemPrice:{amount:0,currencyCode:t};return{...{discountAllocations:Dh(o.lineAllocations),id:i??null,quantity:o.quantity,title:o.title,variant:{id:i??null,image:{src:o.image?.url??null},price:a,product:{id:qr(o.productId)??null,title:o.title,vendor:o.vendor,type:o.productType,untranslatedTitle:o.untranslatedTitle??null,url:o.productUrl??null},sku:Mh(o.sku)??null,title:o.subtitle??null,untranslatedTitle:o.untranslatedSubtitle??null},finalLinePrice:Oh(o.lineAllocations),sellingPlanAllocation:Fh(o),properties:Bh(o.properties)},lineComponents:o.lineComponents.map(c=>eT(c,t))}})}function Oh(e){const t=e.reduce((n,r)=>n+r.totalAmountAfterLineDiscounts.amount,0);return mc(t,e[0]?.totalAmountAfterLineDiscounts?.currencyCode)}function zA(e){const t=e.reduce((n,r)=>n+r.totalAmountAfterLineDiscounts.amount,0);return{totalAmount:mc(t,e[0]?.totalAmountAfterLineDiscounts.currencyCode)}}function mc(e,t){return{amount:Number(e.toFixed(2)),currencyCode:t}}function Fh(e){return e.sellingPlan?{sellingPlan:{id:e.sellingPlan.id,name:e.sellingPlan.name}}:null}function Bh(e){return e.map(t=>({key:t.name,value:String(t.value)}))}function HA(e,t,n,r){let o={amount:0,currencyCode:t};const i=e.current.fields.deliveryNext.value??r?.purchaseOrder?.deliveryNext;if(i?.status==="filled"){const a=e.current.fields.remoteMerchandiseDetails?.value??r?.remoteMerchandiseDetails,l=pf(i.lines,a),c=[];l.forEach(d=>{if(d.status==="available"){const p=d.selectedDeliveryMethodHandle;if(p){const m=d.methods.filter(f=>f.handle===p&&f.costAfterDiscounts!==void 0);c.push(...m.map(f=>({line:d,method:f})))}}});const u=n?Bl(c,({method:d})=>d.cost.amount,({method:d,line:p})=>p.type==="ONE_TIME_PURCHASE"?ff(d):void 0):new Set;o=c.reduce((d,{method:p},m)=>u.has(m)?d:{amount:d.amount+p.costAfterDiscounts.amount,currencyCode:p.costAfterDiscounts.currencyCode},o)}return o}function qA(e){if(!e)return"";switch(e){case"MERCHANDISELINE":return"LINE_ITEM";case"DELIVERYLINE":return"SHIPPING_LINE";default:return""}}function GA(e,t){const n=e.value;return n.typename==="FixedAmountValue"?t:{percentage:n.percentage}}function $A(e,t,n){const r=e.current.fields.paymentLines.value?.lines,o=(r?.length?r:void 0)??n?.purchaseOrder?.paymentLines,i=[];return o?.forEach(a=>{if(!a.cost)return;let l=t||"",c="";switch(a.method.type){case"direct":case Yn.CreditCard:c=a.method.brand||"";break;case"deferred":c=a.method.displayName||"";break;case"redeemable":l="",c=a.method.redemptionSource;break;case"giftCard":l="gift_card",c="";break;case Yn.PayPal:case"bank":case"noop":case"paymentOnDelivery":case"other":case"shopWallet":c="";break;default:c=a.method.name;break}i.push({amount:{amount:a.cost.amount,currencyCode:a.cost.currencyCode},gateway:l,paymentMethod:{type:wA(a.method.type),name:c}})}),i}function WA(e,t,n){const r=e.current.fields.buyerIdentity.value??n?.buyerIdentity;return{country:{isoCode:r?.countryCode??null},language:{isoCode:t}
2,market:{id:r?.market?.id??null,handle:r?.market?.handle??null}}}function wd(e,t,n,r){const o=r?.[e]===!0,i=n?.[e]&&n[e].value===!0,a=t.current.fields[e]?.value===!0;return o||i||a||!1}function YA(e,t){const n=new Map;return fc(e,t).forEach(r=>{Ld(n,r),r.lineComponents.forEach(o=>Ld(n,o))}),n}function jA(e,t,{componentStableIdsByParent:n,parentStableIdByComponent:r}){const{targetMerchandiseLines:o}=e;if(!o)return;const i=new Set(o.map(c=>c.stableId)),a=[],l=new Set;return o.forEach(c=>{const u=r.get(c.stableId);if(u===void 0){const h=t.get(c.stableId);h!==void 0&&a.push(h);return}const p=(n.get(u)??[]).every(h=>i.has(h)),m=t.get(u);if(p&&m!==void 0){l.has(u)||(a.push(m),l.add(u));return}const f=t.get(c.stableId);f!==void 0&&a.push(f)}),a}function KA(e,t,n,r,o,i=!1){const a=n?.purchaseOrder?.deliveryNext||e.current.fields.deliveryNext.value;if(a?.status!=="filled")return[];const l=e.current.fields.remoteMerchandiseDetails?.value??n?.remoteMerchandiseDetails,c=pf(a.lines,l),d=(t?.deliveryLines?.value??[]).map(f=>f.fields.deliveryMethodHandle?.value).filter(Boolean),p=c.filter(f=>f.status==="available").map(f=>f).flatMap(f=>n?f.methods.map(h=>({method:h,availableDeliveryLine:f})):d.length>0?f.methods.filter(h=>d.includes(h.handle)).map(h=>({method:h,availableDeliveryLine:f})):[]),m=i?Bl(p,({method:f})=>f.cost.amount,({method:f,availableDeliveryLine:h})=>h.type==="ONE_TIME_PURCHASE"?ff(f):void 0):new Set;return p.map(({method:f,availableDeliveryLine:h},g)=>JA(f,r&&o?jA(h,r,o):void 0,m.has(g))).filter(Boolean)}function JA(e,t,n){let r,o=e.cost,i=n?{...e.costAfterDiscounts,amount:0}:e.costAfterDiscounts;switch(e.methodType){case"PICK_UP":r="pickup",o=null,i=null;break;case"PICKUP_POINT":r="pickupPoint";break;case"SHIPPING":r="shipping";break;case"LOCAL":r="local";break;default:return}return{cost:o,costAfterDiscounts:i,description:e.description||null,handle:e.handle,title:e.title||null,type:r,...t===void 0?{}:{targetLineItems:t}}}function XA(e,t){const n=e.current.fields.discountLines.value,r=(n?.lines?.length?n:void 0)??t?.discountLines;return r?.lines?.length?r.lines.reduce((o,i)=>{if(er(i)){const a=i.amount;if(!a)return o;o.push(Nh(i.discount,a))}return o},[]):[]}function QA({orderId:e,customerId:t,isFirstOrder:n}){const r={id:yr(t)??t??null,isFirstOrder:n??null};return{id:yr(e)??e??null,customer:r}}function Mi({negotiated:e,source:t,orderId:n,customerId:r,isFirstOrder:o,proposedParts:i,receipt:a,locale:l,shopCurrencyCode:c,marketDrivenShippingEnabled:u=!1}){const d=e.current.fields.contactInfo.value,p=qr(si(t))??null,m=i?i.email.value:d?.email||a?.purchaseOrder?.email||null,f=i?i.phone.value:d?.phone||a?.purchaseOrder?.phone||null,h=e.current.fields.subtotalAfterMerchandiseDiscounts.value??a?.subtotalAfterMerchandiseDiscounts??null,g=e.current.fields.runningTotal.value??a?.checkoutTotal??null,y=g?.currencyCode??c??null,v=UA(e,c,a),P={selectedDeliveryOptions:KA(e,i,a,YA(e,a),tT(e,a),u)},b=!!m&&wd("acceptEmailMarketing",e,i,a),C=wd("acceptSmsMarketing",e,i,a),I=a?.smsMarketingPhone||i?.smsMarketingPhone?.value||e.current.fields.smsMarketingPhone.value||null;let S=!1;a?S=!!C:S=C&&!!I;const k=S&&I||null,E=XA(e,a),T=a?.totalSavings||e?.current?.fields?.totalSavings.value||null,A=IA(e)||a?.checkoutTotalTaxes||{amount:0,currencyCode:c},R=HA(e,c,u,a),L=i?i.shippingAddress.value:e.current.fields.shippingAddress.value??a?.purchaseOrder?.shippingAddress,M={address1:L?.address1||null,address2:L?.address2||null,city:L?.city||null,country:L?.countryCode||null,countryCode:L?.countryCode||null,firstName:L?.firstName||null,lastName:L?.lastName||null,phone:L?.phone||null,province:L?.zoneCode||null,provinceCode:L?.zoneCode||null,zip:L?.postalCode||null},D=i?i.billingAddress.value:e.current.fields.billingAddress.value??a?.purchaseOrder?.billingAddress,N={address1:D?.address1||null,address2:D?.address2||null,city:D?.city||null,country:D?.countryCode||null,countryCode:D?.countryCode||null,firstName:D?.firstName||null,lastName:D?.lastName||null,phone:D?.phone||null,province:D?.zoneCode||null,provinceCode:D?.zoneCode||null,zip:D?.postalCode||null},U=QA({orderId:n,customerId:r,isFirstOrder:o}),z=e.current.fields.customAttributes.value,O=(z?.length?z:void 0)??a?.customAttributes??[],K=$A(e,a?.paymentDetails?.paymentGateway||void 0,a),X=WA(e,l,a);return{buyerAcceptsEmailMarketing:b,buyerAcceptsSmsMarketing:S,attributes:O,billingAddress:N,token:p,currencyCode:y,discountApplications:E,discountsAmount:T,email:m,phone:f,lineItems:v,localization:X,order:U,delivery:P,shippingAddress:M,subtotalPrice:h,shippingLine:{price:R},smsMarketingPhone:k,totalTax:A,totalPrice:g,transactions:K}}function ZA(e){return{...e,value:"<redacted>"}}function fc(e,t){const n=e.current.fields.merchandiseLines.value,r=(n?.lines?.length?n:void 0)??t?.purchaseOrder?.merchandiseLines,o=e.current.fields.remoteMerchandiseDetails?.value??t?.remoteMerchandiseDetails;return r?.lines?.length?mf(r.lines,o):[]}function Ld(e,t){const n=qr(t.variantId);n!==void 0&&e.set(t.stableId,n)}function eT(e,t){const n=qr(e.variantId),r=e.itemPrice?e.itemPrice:{amount:0,currencyCode:t};return{discountAllocations:Dh(e.lineAllocations),id:n??null,quantity:e.quantity,title:e.title,variant:{id:n??null,image:{src:e.image?.url??null},price:r,product:{id:qr(e.productId)??null,title:e.title,vendor:e.vend
2or,type:e.productType,untranslatedTitle:e.untranslatedTitle??null,url:e.productUrl??null},sku:Mh(e.sku)??null,title:e.subtitle??null,untranslatedTitle:e.untranslatedSubtitle??null},finalLinePrice:Oh(e.lineAllocations),sellingPlanAllocation:Fh(e),properties:Bh(e.properties)}}function tT(e,t){const n=new Map,r=new Map;return fc(e,t).forEach(o=>{o.lineComponents.length!==0&&(n.set(o.stableId,o.lineComponents.map(i=>i.stableId)),o.lineComponents.forEach(i=>{r.set(i.stableId,o.stableId)}))}),{componentStableIdsByParent:n,parentStableIdByComponent:r}}const nT={sectionComplete:!0,pageSubmit:!0,shippingMethodsFilled:!0,shippingMethodSelected:!0};function rT(e){return e in nT}function Vh(e){if(!rT(e.type))return!1;switch(e.type){case"sectionComplete":return e.section==="contact"||e.section==="deliveryAddress";case"pageSubmit":return e.step==="shipping";case"shippingMethodsFilled":case"shippingMethodSelected":return e.step==="onePage"}}function oT(e,t){if(Vh(e))return Mi(t)}function Pn(){const e=H().buyerIdentity;return w(()=>{const t=e.value?.customerProfile;return!!(t?.__typename==="BusinessCustomerProfile"&&t?.checkoutExperienceConfiguration?.editableShippingAddress)})}function Fn(){const[e,t]=oe(!1);return Dt(()=>{t(iT())},[]),F(()=>{if(typeof window>"u")return;const n=window.matchMedia("(prefers-reduced-motion: reduce)"),r=()=>{t(n.matches)};return n.addListener(r),()=>{n.removeListener(r)}},[]),e}function iT(){return typeof window<"u"&&window.matchMedia("(prefers-reduced-motion: reduce)").matches}function et(e){return t=>`${e}${t}`}function sT(e){return e.replace(/:/g,"")}function Ke(e,t){const n=sT(cf());return e??t(n)}const Xr="PortalHost",Uh="data-portal-order";function zh(e){e.setAttribute(Uh,String(performance.now()))}function Hh(e){let t=null,n=-1;for(let r=e?.firstElementChild??null;r;r=r.nextElementSibling){if(r.firstElementChild?.getAttribute("data-popper-hidden")==="true")continue;const o=Number(r.getAttribute(Uh));o>n&&(n=o,t=r)}return t}function M3(e){const t=aT(e),n=Hh(document.getElementById(Xr));return t.some(r=>r instanceof Node&&n?.contains(r))}function N3(e){return e?Hh(document.getElementById(Xr))?.contains(e)??!1:!1}function D3(e){return e?document.getElementById(Xr)?.contains(e)??!1:!1}function aT(e){if(e.composedPath)return e.composedPath();const t=[];let n=e.target;for(;n!==document&&(t.push(n),n=n.parentNode,!!n););return t.push(document),t}const lT=et("Portal");function cT(){return s("div",{id:Xr})}function Sr({children:e}){const[t,n]=oe(null),r=Ke(void 0,lT);return F(()=>{const o=document.getElementById(Xr)??document.body,i=document.createElement("div");return i.setAttribute("id",r),zh(i),o.appendChild(i),n(i),()=>{o.removeChild(i)}},[r]),t&&UP(e,t)}var uT="_1rnsrjf0 _1fragem6y";const dT="checkout-web-ui:sprite-load-error";class qh extends Error{constructor(){super(...arguments),this.name="SpriteLoadError",this.groupingHash=dT}}function pT(e){try{const t=new URL(e);return t.username="",t.password="",t.search="",t.hash="",t.toString()}catch{return e.split("#")[0].split("?")[0]}}function Gh(e,t){return new qh(`Failed to fetch sprite "${pT(e)}": ${t}`)}function ea(e,t){if(t instanceof qh)return t;const n=t instanceof Error?t.message:String(t);return Gh(e,n)}const Rd={errorClass:"SpriteLoadError",severity:"warning"};function mT(e){const t=e.indexOf("#");return t===-1?{spriteUrl:e,symbolId:""}:{spriteUrl:e.slice(0,t),symbolId:e.slice(t+1)}}class fT{#e=new Map;#t=new Set;ensureFetched(t){const n=this.#e.get(t);if(n?.status==="resolved")return n.content;throw n?.status==="rejected"?n.error:n?.status==="pending"?n.promise:this.#r(t)}reportLoadFailure(t,n,r){if(!(r==null||this.#t.has(t))){if(this.#t.add(t),n instanceof Promise){n.catch(o=>{r.error(ea(t,o),Rd)});return}r.error(ea(t,n),Rd)}}#r(t){const n=fetch(t).then(r=>{if(!r.ok)throw Gh(t,`HTTP ${r.status}`);return r.text()}).then(r=>(this.#e.set(t,{status:"resolved",content:r}),r)).catch(r=>{throw this.#e.set(t,{status:"rejected",error:ea(t,r)}),r});return this.#e.set(t,{status:"pending",promise:n}),n}}function $h(e,t){try{return xd.ensureFetched(e)}catch(n){throw xd.reportLoadFailure(e,n,t),n}}const xd=new fT,hT=["cdn.shopify.com"];function gT(e,t){let n;try{n=new URL(e)}catch{return t}return t?!0:n.protocol==="https:"&&hT.includes(n.hostname)}const hc=He(null);function yT({children:e,logger:t}){const n=Le([]),r=B(()=>{const o=new Set;return{logger:t,sprites:n,embed(i,a){o.has(i)||(o.add(i),n.value=[{url:i,
2content:a},...n.peek()])}}},[t,n]);return s(hc.Provider,{value:r,children:[e,s(vT,{sprites:n})]})}function vT({sprites:e}){return s("div",{className:uT,"aria-hidden":"true",children:e.value.map(({url:t,content:n})=>s("div",{"data-sprite-url":t,dangerouslySetInnerHTML:{__html:n}},t))})}function _T({iconUrl:e,allowRelativeUrl:t}){const n=Le(!1);Dt(()=>{n.value=!0},[n]);const r=Ee(hc),{spriteUrl:o,symbolId:i}=mT(e);if(!gT(o,t))return console.warn(`[SpriteLoader] Blocked icon load from untrusted URL: ${o}`),null;if(!n.value)return s("span",{"aria-hidden":"true",children:s("svg",{viewBox:"0 0 14 14",focusable:"false","aria-hidden":"true"})});if(i)return s(bT,{spriteUrl:o,symbolId:i});const a=$h(o,r?.logger);return s("span",{dangerouslySetInnerHTML:{__html:a},"aria-hidden":"true"})}function bT({spriteUrl:e,symbolId:t}){const n=Ee(hc);if(!n)throw new Vl("No sprite registry available");const r=$h(e,n.logger);return Dt(()=>{n.embed(e,r)},[n,e,r]),s("span",{"aria-hidden":"true",children:s("svg",{viewBox:"0 0 14 14",focusable:"false","aria-hidden":"true",children:s("use",{href:`#${t}`})})})}let PT=class extends uf{constructor(){super(...arguments),this.state={hasError:!1}}static getDerivedStateFromError(){return{hasError:!0}}render(){return this.state.hasError?this.props.fallback:this.props.children}};function ST({iconUrl:e,fallback:t,allowRelativeUrl:n=!1}){return s(PT,{fallback:t,children:s(zP,{fallback:t,children:s(_T,{iconUrl:e,allowRelativeUrl:n})})})}const Wh=He(void 0);function gc(){return Ee(Wh)}function sn({children:e,level:t}){const n=gc(),r=t??(n??0)+1;return s(Wh.Provider,{value:r,children:e})}const Yh=He({colorMix:!1,customProperties:!1,flexGap:!1});function ET({children:e}){const t=kT(),n=IT(),r=AT(),o=B(()=>({colorMix:t,customProperties:n,flexGap:r}),[t,n,r]);return s(Yh.Provider,{value:o,children:e})}function CT(){return Ee(Yh)}function kT(){return B(()=>typeof CSS<"u"&&CSS.supports("color","color-mix(in srgb, red 50%, white)"),[])}function IT(){return B(()=>typeof window>"u"||typeof CSS<"u"&&CSS.supports("color","var(--test)"),[])}function AT(){return B(()=>{if(typeof window>"u"||!document.body)return!0;const e=document.createElement("div");e.style.display="flex",e.style.flexDirection="column",e.style.rowGap="1px",e.appendChild(document.createElement("div")),e.appendChild(document.createElement("div")),document.body.appendChild(e);const t=e.scrollHeight===1;return e.parentNode?.removeChild(e),t},[])}const jh=He(null);function TT({children:e}){const[t,n]=oe(new Map),r=x(c=>t.get(c),[t]),o=x(c=>{n(u=>{const d=u.get(c.id);if(d&&!Object.keys(c).some(h=>d[h]!==c[h]))return u;const p=new Map(u);return p.set(c.id,{...d,...c}),p})},[]),i=x(c=>{n(u=>{const d=new Map(u);return d.delete(c),d})},[]),a=x(()=>{n(new Map)},[]),l=B(()=>({getInteraction:r,upsertInteraction:o,deleteInteraction:i,clearInteractions:a}),[a,i,r,o]);return s(jh.Provider,{value:l,children:e})}const Kh="forwarding-external-new-window-message",wT="forwarding-new-window-message",LT="forwarding-external-message";function Jh({external:e,native:t}){if(e&&t)return Kh}const yc=He(null),RT=()=>Ee(yc),vc=He(void 0),xT=et("Overlay");function MT({activatorRef:e,children:t}){const n=V(new Map),r=Ke(void 0,xT),[o,i]=oe(()=>r),[a,l]=oe(!1),[c,u]=oe({}),d=B(()=>({activatorRef:e,overlayId:o,setOverlayId:i,attach(p,m){n.current?.set(p,m)},trigger(p,m){n.current?.get(p)?.(m)},active:a,setActive:l,activatorAttributes:c,setActivatorAttributes(p){Object.keys(p).every(f=>c[f]===p[f])||u(f=>({...f,...p}))}}),[e,o,n,a,c]);return s(vc.Provider,{value:d,children:t})}function _c({children:e}){return s(vc.Provider,{value:void 0,children:s(yc.Provider,{value:null,children:e})})}function nr(){const e=Ee(vc);if(e)return e}const Xh=He(void 0),Qh=()=>Ee(Xh),F3=()=>{const e=Qh();return B(()=>({closeOverlay(t){e?.close(t)}}),[e])};function NT({children:e}){const t=V(new Map),n=B(()=>({register(r,o){t.current.set(r,o)},unregister(r){t.current.delete(r)},close(r){t.current.get(r)?.close()}}),[t]);return s(Xh.Provider,{value:n,children:e})}const fs=He(void 0);function DT({children:e}){const t=V({sheet:!1,modal:!1}),n=Le(0),r=w(()=>n.value>0),o=B(()=>({isLocked(i){return t.current[i]},lock(i){t.current[i]=!0},unlock(i){t.current[i]=!1},openModalCount:n,isModalOpen:r}),[n,r]);return s(fs.Provider,{value:o,children:e})}function OT(){return Ee(fs)?.isModalOpen}function FT(){return Ee(fs)?.openModalCount}function Zh(e){const t=Ee(fs),[n,r]=oe(!1);return F(()=>()=>{t&&n&&t.unlock(e)},[t,n,e]),B(()=>
2{if(!t)return;const{lock:o,unlock:i,isLocked:a}=t;return{setActive(l){r(c=>(typeof l=="function"?l(c):l)?a(e)&&!n?(console.warn(`Multiple <${e==="modal"?"Modal":"Sheet"} /> components cannot be rendered at the same time`),c):a(e)?c:(o(e),!0):(n&&i(e),!1))},active:n}},[t,n,e])}function BT(e){const t=nr(),n=Zh(e);return B(()=>{if(!n)return;const{active:r,setActive:o}=n;if(t)return{...t,setActive:o,active:r}},[t,n])}const eg=He(void 0);function VT({announcementEmitter:e,children:t}){return s(eg.Provider,{value:e,children:t})}function B3(){const e=Ee(eg);if(!e)throw new Vl("Missing AnnouncementContext Context ");return e}var Md={LiveRegion:"_14u2r6s0 _1fragem121"};const UT=1e4;class zT{#e=new Set;#t=new Set;#r=new Map;subscribe(t){return this.#e.add(t),()=>{this.#e.delete(t),this.#e.size===0&&this.#a()}}#i(){this.#e.forEach(t=>t(Array.from(this.#t)))}#a(){this.#t.clear(),this.#r.forEach(t=>{clearTimeout(t)})}announce(t){const n=Array.from(this.#t).find(o=>o.content===t.content&&o.role===t.role);if(n){const o=this.#r.get(n);o&&clearTimeout(o),this.#r.delete(n),this.#t.delete(n)}this.#t.add(t),this.#i();const r=setTimeout(()=>{this.#r.delete(t),this.#t.delete(t),this.#i()},UT);return this.#r.set(t,r),()=>{this.#t.delete(t),clearTimeout(r),this.#r.delete(t),this.#i()}}}const tg=new zT;function Lt({content:e,role:t="status"}){return tg.announce({content:e,role:t})}function HT(){const[e,t]=oe([]),n=e.filter(o=>o.role==="status"),r=e.filter(o=>o.role==="alert");return F(()=>tg.subscribe(o=>{t(o)}),[]),s(q,{children:[s("div",{role:"status",className:Md.LiveRegion,children:n.map(({content:o,role:i})=>s("span",{children:o},`${o}-${i}`))}),s("div",{role:"alert",className:Md.LiveRegion,children:r.map(({content:o,role:i})=>s("span",{children:o},`${o}-${i}`))})]})}var ta="rij0560 _1fragem121";const bc=He(null);function rr(){const e=Ee(bc);if(e==null)throw new vr("No app context available");return e}function qT(){return Ee(bc)?.redesignedChoiceLists??!1}function V3(){return rr().currency}function ln(){return rr().translate}function U3(){return rr().formatNumber}function GT(){return rr().linkComponent}function z3(){return rr().geolocation}function H3(){return rr().locale}function $T(){return rr().editor??!1}function WT(){return rr().inlineIcons}function YT({children:e,currency:t,embed:n,linkComponent:r,geolocation:o,locale:i,onePage:a,editor:l,redesignedChoiceLists:c,translate:u,formatNumber:d,announcementEmitter:p,inlineIcons:m,logger:f}){const h=B(()=>({currency:t,embed:n,formatNumber:d,geolocation:o,linkComponent:r,locale:i,onePage:a,editor:l,redesignedChoiceLists:c,translate:u,inlineIcons:m,logger:f}),[t,n,u,d,r,o,i,a,l,c,m,f]);return s(bc.Provider,{value:h,children:s(VT,{announcementEmitter:p,children:s(ET,{children:s(sn,{children:s(DT,{children:s(NT,{children:s(TT,{children:[s(yT,{logger:f,children:e}),s(jT,{}),s(HT,{})]})})})})})})})}function jT(){const e=ln();return s(q,{children:[s("div",{id:Kh,"aria-hidden":!0,className:ta,children:e("externalNewWindow")}),s("div",{id:wT,"aria-hidden":!0,className:ta,children:e("newWindow")}),s("div",{id:LT,"aria-hidden":!0,className:ta,children:e("external")})]})}function Nd(e){return/\[.*?\]/.test(e)&&console.warn(`Grid template named lines are not supported. Found named lines in template: "${e}". Please use only size values without bracketed names.`),e}function Dd(e){return/^span\s+\d+$/.test(e)?e:"auto"}function KT(e){if(e==="none")return"none";if(typeof e!="string"||!e.startsWith("translate(")||!e.endsWith(")"))return na(e);const t=e.slice(10,-1).split(",");if(t.length>2)return na(e);const n=Od(t[0].trim()),r=t.length===2?Od(t[1].trim()):0;return n===void 0||r===void 0?na(e):`translateX(calc(${zi(n)} * ${jn.global.transformDirectionModifier})) translateY(${zi(r)})`}function na(e){return console.warn(`Invalid transform value '${String(e)}'. Expected 'none', 'translate(<size>)' or 'translate(<size>, <size>)' with px or % magnitudes.`),""}function Od(e){return ng(e)}function ng(e){if(e==="0")return 0;const t=hf(e);if(!(t===void 0||t.unit!=="px"&&t.unit!=="%"))return t.unit==="%"?`${t.number}%`:t.number}function Ir(e){if(e==="auto"||typeof e!="string")return"auto";const t=ng(e);return t===void 0?(console.warn(`Invalid inset coordinate '${e}'. Expected a px or % size, or 'auto'. Falling back to 'auto'.`),"auto"):zi(t)??"auto"}function Wi(e){return qo(e,{auto:!0,fitContent:!0})}function Fd(e){return qo(e,{none:!0})}function qo(e,t){if(t?.fitContent&&e==="fit-content")return"fitContent";if(t&&e in t&&t[e])return e;if(e==="0")return"0";const n=hf(e),r=n&&(n.unit==="px"||n.unit==="%"||n.unit==="ch"||n.unit==="em"||n.unit==="lh"||n.unit==="vh")?zi(e):void 0;if(r===void 0){const o=[t?.auto?"'auto'":void 0,t?.none?"'none'":void 0,t?.fitContent?"'fit-content'":void 0].filter(
2Boolean);console.warn(`Invalid size value '${String(e)}'. Expected a px, %, ch, em, lh or vh size${o.length>0?`, or ${o.join(", ")}`:""}.`)}return r}function JT(e){return`url(${JSON.stringify(e)})`}const XT={auto:"flex",inline:"inlineFlex",block:"flex",none:"none"},QT={auto:"block",inline:"inline",block:"block",none:"none"},ZT={auto:"inline",inline:"inline",block:"block",none:"none"},ew={auto:"grid",inline:"inlineGrid",block:"grid",none:"none"},Pc=e=>QT[e],tw=e=>ZT[e],Sc=e=>XT[e],nw=e=>ew[e],pl=He(void 0),ai=()=>Ee(pl),hs=He(!1);function Bn(){return Ee(hs)}const Gr=He(!1);function Qr(){return Ee(Gr)}const Bd=new Map([["none",0],["faster",88.9],["fast",133.333],["base",200],["slow",300],["slower",450],["slowest",675]]);function nn(e,t="slow",n=!1){const[r,o]=oe(n?!1:e),[i,a]=oe(!1),l=V(n?!1:e),c=V(()=>{o(l.current),a(!1)}),u=Fn();let d=typeof t=="string"?t:t.enter,p=typeof t=="string"?t:t.exit;return u&&(d="none",p="none"),F(()=>{let m;e!==l.current&&(m=setTimeout(()=>{a(!0)},0)),l.current=e;const f=setTimeout(c.current,e?Bd.get(d??"none"):Bd.get(p??"none"));return()=>{clearTimeout(f),clearTimeout(m)}},[d,p,e]),i?e?"entering":"exiting":e===r?e?"entered":"exited":e?"enter":"exit"}var ra={Transition:"_94sxtb1 _94sxtb0 _1fragemup _1fragemv4 _1fragemws _1fragem12q",transitionDurationVariant:{none:"_94sxtb9 _94sxtb2 _1fragem12i",faster:"_94sxtba _94sxtb3 _1fragem12c",fast:"_94sxtbb _94sxtb4 _1fragem12d",base:"_94sxtbc _94sxtb5 _1fragem12e",slow:"_94sxtbd _94sxtb6 _1fragem12f",slower:"_94sxtbe _94sxtb7 _1fragem12g",slowest:"_94sxtbf _94sxtb8 _1fragem12h"},transitionOpacity:{enter:"_94sxtbm _94sxtbg _1fragem11k",entering:"_94sxtbn _94sxtbh _1fragem11u",entered:"_94sxtbo _94sxtbi _1fragem11u",exit:"_94sxtbp _94
2sxtbj _1fragem11u",exiting:"_94sxtbq _94sxtbk _1fragem11k",exited:"_94sxtbr _94sxtbl _1fragem11k"}};function gn({id:e,open:t,renderChildrenWhenCollapsed:n=!1,children:r,duration:o="slow",properties:i=["height"],onTransition:a}){const l=nn(t,o),c=V(null);F(()=>{a?.(l)},[l,a]);const u=new Map([["enter",()=>({height:0})],["entering",()=>({height:c?.current?.clientHeight})],["entered",()=>({height:"auto",overflow:"visible"})],["exit",()=>({height:c?.current?.clientHeight})],["exiting",()=>({height:0})],["exited",()=>({height:0})]]),d=l==="exited";return s("div",{id:e,style:{...i.includes("height")&&u.get(l)()},className:Y(ra.Transition,ra.transitionDurationVariant[o],i.includes("opacity")&&ra.transitionOpacity[l]),hidden:d,children:s("div",{ref:c,children:d&&!n?null:r})})}const Ec=He(void 0);Ec.displayName="DisclosureContext";function q3({children:e,openByDefault:t,openMap:n,onToggle:r,duration:o="slow",transition:i="revealBlock"}){const a=Le({}),l=Le(new Set),c=B(()=>({openMap:n,onToggle:r,duration:o,transition:i,openByDefault:t,activatorIdMap:a,togglableLayoutIds:l}),[n,r,o,i,t,a,l]);return s(Ec.Provider,{value:c,children:e})}function Yi({layoutId:e,activatorId:t}){const n=Ee(Ec);if(F(()=>{if(n&&e&&t){const{activatorIdMap:r}=n;r.value[e]||(r.value={...r.value,[e]:t})}},[n,e,t]),n&&e){const{openMap:r,onToggle:o,duration:i,transition:a,openByDefault:l,activatorIdMap:c,togglableLayoutIds:u}=n,d=`${e}-transition`,p=u.value.has(e),m=(r[e]??l)||!p;return{activatorAttributes:{"aria-controls":a==="revealBlock"?d:e,"aria-expanded":m},layoutAttributes:{"aria-labelledby":c.value[e],role:"region"},toggle:()=>{o?.({...l&&iw(Array.from(u.value)),...r,[e]:!(r[e]??l)})},setToggleable:()=>{if(!u.value.has(e)){const f=new Set(u.value);f.add(e),u.value=f}},open:m,duration:i,transition:a,transitionId:d,isToggleable:p}}}const rw=et("DisclosureActivator");function ow(e,t){const n=e.displayName||e.name||"Component",r=at(({id:o,toggles:i,...a},l)=>{const c=Ke(o,rw),u=Yi({layoutId:i,activatorId:c});if(u){const{setToggleable:d,activatorAttributes:p,open:m,toggle:f}=u;d();const{toggleEvent:h="onPress",setAriaExpanded:g=!0}=t||{},{onPress:y,onChange:v}=a,{"aria-expanded":P,...b}=p,C={...h==="onPress"?{onPress:()=>{f(),y?.()}}:{onChange:I=>{f(),v?.(I)}},...g?p:b};return s(e,{id:c,...h==="onChange"&&{value:m},...a,...C,ref:l})}else i&&console.warn(`${n} sets "toggles" property but is not wrapped inside a Disclosure component. Please ensure that the component is wrapped in a Disclosure component.`);return s(e,{id:o,...a,ref:l})});return r.displayName=`DisclosureActivator(${n})`,r}function Cc(e){const t=at((n,r)=>{const{id:o}=n,i=Yi({layoutId:o});if(i){const{open:a,duration:l,transition:c,isToggleable:u,transitionId:d,layoutAttributes:p}=i,m=s(e,{...n,...p,ref:r});return c==="revealBlock"&&u?s(gn,{open:a,id:d,duration:l,children:m}):a?m:null}return s(e,{...n,ref:r})});return t.displayName=`DisclosureLayout(${e.displayName||e.name||"Component"})`,t}function iw(e=[]){return typeof e=="boolean"?{}:(Array.isArray(e)?e:[e]).reduce((t,n)=>({...t,[n]:!0}),{})}const rg=100;function oa(e){return e?.type==="command"&&e.kind==="clipboard"}function ia(e){return e?.type==="command"&&e.kind==="visibility"}function xr(e){return e?.type==="command"&&e.kind==="overlay"}function xn(e){return e?.type==="interest"}function An(){const e=Ee(jh);if(e===null)throw new vr("No Interactions in context");return e}function G3(){const{getInteraction:e}=An(),t=x(r=>{const o=e(r);xr(o)?o.open():console.warn(`No overlay found for ID "${r}".`)},[e]),n=x(r=>{const o=e(r);xr(o)?o.close():console.warn(`No overlay found for ID "${r}".`)},[e]);return{showOverlay:t,hideOverlay:n}}let Kn="",ml=[],on=0,Cn=0,mr=[],sa=!1;class $r extends Error{}function sw(e){if(sa)throw Error("Cannot tokenize recursively");for(sa=!0,Kn=e,ml=[],on=0,Cn=0,mr=[];!kc();)Cn=on,lw();if(Cn=on,pn("EOF"),sa=!1,mr.length)throw new $r(mr.join(`
3`));return ml}function kc(){return on>=Kn.length}function ar(){return Kn[on++]}function pn(e){const t=Kn.substring(Cn,on).trim();ml.push({type:e,text:t})}function Vd(e){!kc()&&Kn[on]===e&&on++}function aw(e){const t=e.charCodeAt(0);return t>=48&&t<=57||t>=97&&t<=122||t>=65&&t<=90}function mo(){return kc()?cg:Kn[on]}function lw(){const e=ar();switch(e){case fl:break;case og:{pn("LEFT_PAREN");break}case ig:{pn("RIGHT_PAREN");break}case"@":{for(;!Ud.has(mo());)ar();const t=Kn.substring(Cn,on);t==="@media"||t==="@container"?pn("MEDIA_TYPE"):mr.push(`Invalid media type "${t}" starting at position ${Cn}.`);break}case sg:{pn("COMMA");break}case lg:{Vd("="),pn("COMPARATOR");break}case ag:{Vd("="),pn("COMPARATOR");break}case cw:case uw:{for(Cn++;mo()!==e;)ar();pn("IDENTIFIER"),ar();break}
3default:{if(aw(e)){for(;!Ud.has(mo());)ar();const t=Kn.substring(Cn,on),n=t.toLowerCase();if(n==="and"||n==="or")t!==n?mr.push(`Keyword "${t}" is not case sensitive at position ${Cn}.`):pn("OPERATOR");else if(n==="inline-size"||n==="block-size")t!==n?mr.push(`Property "${t}" is not case sensitive at position ${Cn}.`):pn("PROPERTY");else{if(mo()===fl)for(ar();!ug.has(mo());)ar();pn("IDENTIFIER")}}else mr.push(`Unexpected character "${e}" at position ${on}.`);break}}}const og="(",ig=")",sg=",",ag="<",lg=">",cg="\0",fl=" ",cw="'",uw='"',ug=new Set([cg,og,ig,sg,ag,lg]),Ud=new Set([...ug,fl]);let gs=[],li=0;function dw(e){return gs=e,li=0,fw()}function pw(e){for(const t of e)if(Ic(t))return Ac(),!0;return!1}function Ic(e){return dg()?!1:Array.isArray(e)?e.includes(Mn().type):Mn().type===e}function Ac(){return dg()||li++,Tc()}function Dn(e,t){if(Ic(e))return Ac();throw new $r(`${t}
4Instead we found this word/character: "${Mn().text}"`)}function dg(){return gs[li].type==="EOF"}function Mn(){return gs[li]}function Tc(){return gs[li-1]}const mw="s-default";function fw(){const e={responsiveType:Dn("MEDIA_TYPE",'Expected a media type such as "@media" or "@container"').text,conditionalValues:[],fallbackValue:"",state:"valid"};if(e.responsiveType==="@container"){const n=Mn().type==="IDENTIFIER"?Ac().text:mw;e.name=n}for(e.conditionalValues.push(zd());pw(["COMMA"])&&Mn().type==="LEFT_PAREN";)e.conditionalValues.push(zd());if(Tc().type!=="COMMA")throw new $r(`Expected a comma before the fallback value of "${Mn().text}"`);if(e.fallbackValue=Dn("IDENTIFIER","Expected a final fallback value to be defined").text,Mn().type!=="EOF")throw new $r(`Expected the query to end, instead found "${Mn().text}"`);return e}function zd(){return{condition:pg(),value:Dn("IDENTIFIER","Expected an identifier").text}}function pg(){Dn("LEFT_PAREN",'Expected a condition to start with a left parenthesis "("');const e=Hd();let t=null;Ic("COMPARATOR")&&(t=Hd(e.operator)),Dn("RIGHT_PAREN",'Expected a condition to end with a right parenthesis ")"');let n=e;if(t&&(n={type:"compound-condition",left:e,right:t,operator:"and"}),Mn().type==="OPERATOR"){const r=Dn("OPERATOR","Expected an operator"),o=pg();return{type:"compound-condition",left:n,right:o,operator:r.text}}return n}function Hd(e){const t=e?Tc():Dn(["IDENTIFIER","PROPERTY"],"Expected an identifier or property"),n=Dn("COMPARATOR",'Expected a comparison operator (like "<" or ">")');if(e&&e[0]===n.text[0])throw new $r("Cannot have two different comparison operators (a less-than and a greater-than) in the same condition.");const r=Dn(t.type==="IDENTIFIER"?"PROPERTY":"IDENTIFIER",`Expected a ${t.type==="IDENTIFIER"?'property (like "inline-size")':'identifier (like "500px")'} to compare against.`);let o=n.text;return t.type==="IDENTIFIER"&&(o==="<"?o=">":o==="<="?o=">=":o===">"?o="<":o="<="),{type:"condition",property:t.type==="PROPERTY"?t.text:r.text,operator:o,value:t.type==="PROPERTY"?r.text:t.text}}function wc(e){try{return dw(sw(e))}catch(t){if(t instanceof $r)return{state:"invalid",error:t.message};throw new Error("Unknown error",{cause:t})}}function Lc(e){return typeof e=="string"&&e.startsWith("@container")}function Rc(e){return typeof e=="string"&&e.startsWith("@media")}function mg(e,t){if(e===t)return!0;if(Hr(e))return Object.values(e).some(r=>mg(r,t));if(!Lc(e)&&!Rc(e))return!1;const n=wc(e);return n.state==="invalid"?!1:n.fallbackValue===t||n.conditionalValues.some(r=>r.value===t)}function xc(e,t){return Hr(e)?Object.fromEntries(Object.entries(e).map(([n,r])=>[n,t(r)])):t(e)}function fg(e){const t=e,n=at(function(o,i){const{upsertInteraction:a,deleteInteraction:l}=An(),{display:c}=o,u=c==="none",d=B(()=>mg(c,"none"),[c]),[p,m]=oe(),[f,h]=oe(d);d!==f&&(h(d),p==="shown"&&m(void 0));const g=p===void 0?!u:p==="shown",y=p==="hidden",v=p==="shown"&&d,P=x(()=>m("hidden"),[]),b=x(()=>m(k=>k==="hidden"||d?"shown":void 0),[d]),C=x(()=>m(k=>(k===void 0?!u:k==="shown")?"hidden":"shown"),[u]),{id:I}=o;if(F(()=>(I&&a({id:I,type:"command",kind:"visibility",defaultCommand:"--toggle",hide:P,show:b,toggle:C,visible:g}),()=>{I&&l(I)}),[I,g,P,b,C,a,l]),I&&y)return null;const S=I&&v?{...o,display:"auto"}:o;return s(t,{...S,ref:i})});return n.displayName=`VisibilityCommandTargetComponent(${e.displayName||e.name||"Component"})`,n}function hw(e,{overlayType:t}){const n=at(function(o,i){const{open:a}=o,{upsertInteraction:l,deleteInteraction:c}=An(),{active:u,setActive:d}=yw(t),p=nr(),{id:m,onClose:f,onHide:h}=o,g=x(()=>{d(!1),typeof f=="function"&&f(),typeof h=="function"&&h()},[d,f,h]),y=x(()=>{d(!0)},[d]);return F(()=>()=>{m&&c(m)},[m]),F(()=>{m&&l({id:m,type:"command",kind:"overlay",overlayType:t,defaultCommand:"--toggle",close:g,open:y,toggle:()=>{u?g():y()},active:u})},[u,g,c,m,y,l]),m&&!p&&a===void 0?s(e,{...o,...{setActive:d,open:u,onClose:g,onHide:g},ref:i}
4):s(e,{...o,ref:i})});return n.displayName=`OverlayCommandTargetComponent(${e.displayName||e.name||"Component"})`,n}function gw(e){const t=at(function(r,o){const{open:i,defaultOpen:a=!1,onToggle:l,id:c}=r,{upsertInteraction:u,deleteInteraction:d}=An(),[p,m]=oe(a),f=i??p,h=x(()=>{const v=f?"open":"closed",P=f?"closed":"open";i===void 0&&m(!f),l?.(v,P)},[f,l,i]),g=x(()=>{f&&(i===void 0&&m(!1),l?.("open","closed"))},[f,l,i]),y=x(()=>{f||(i===void 0&&m(!0),l?.("closed","open"))},[f,l,i]);return F(()=>()=>{c&&d(c)},[c]),F(()=>{c&&u({id:c,type:"command",kind:"visibility",defaultCommand:"--toggle",hide:g,show:y,toggle:h,visible:f})},[c,f,g,y,h,u]),c&&i===void 0?s(e,{...r,open:p,onToggle:h,ref:o}):s(e,{...r,ref:o})});return t.displayName=`ToggleCommandTargetComponent(${e.displayName||e.name||"Component"})`,t}function yw(e){return vw(e)()}function vw(e){return e==="modal"||e==="sheet"?()=>{const t=Zh(e),n=oe(!1);if(t)return t;const[r,o]=n;return{active:r,setActive:o}}:()=>{const[t,n]=oe(!1);return{active:t,setActive:n}}}function _w(e){const t=at(function(r,o){const{id:i,open:a}=r,{upsertInteraction:l,deleteInteraction:c}=An(),[u,d]=oe(!1),p=V(),m=x(()=>{p.current&&(clearTimeout(p.current),p.current=void 0)},[]),f=x(({delay:g=0}={})=>{if(m(),g>0){p.current=setTimeout(()=>d(!1),g);return}d(!1)},[m]),h=x(()=>{m(),d(!0)},[m]);return F(()=>()=>{m(),i&&c(i)},[i]),F(()=>{i&&l({id:i,type:"interest",hide:f,show:h,active:u})},[u,f,i,h,l]),i&&a===void 0?s(e,{...r,open:u,ref:o}):s(e,{...r,ref:o})});return t.displayName=`InterestTargetComponent(${e.displayName||e.name||"Component"})`,t}function Wr(e){return x(t=>{typeof e=="function"?e(t):e!=null&&(e.current=t)},[e])}function Go(e,t){const n=Wr(e),r=Wr(t);return x(o=>{n(o),r(o)},[n,r])}const bw=["aria-controls","aria-describedby","aria-expanded","aria-haspopup"];function Pw(e,t){return bw.reduce((n,r)=>({...n,[r]:e?.activatorAttributes[r]??t?.[r]}),{})}const Sw=["onBlur","onClick","onFocus","onKeyDown","onMouseDown","onMouseEnter","onMouseLeave","onMouseUp","onTouchStart"];function Mc(e,t){return Sw.map(n=>({[n]:Ew(t?.[n],Cw(n,e))})).reduce((n,r)=>({...n,...r}),{})}function Ew(e,t){return function(r){const o=typeof e=="function"?e(r):void 0;return t?.(r),o}}function Cw(e,t){return function(r){t?.trigger(e,r)}}function Nc(e){const t=at(({overlay:n,...r},o)=>{const i=V(null),a=Go(o,i);return n?s(MT,{activatorRef:i,children:[s(e,{...r,ref:a}),n]}):s(e,{...r,ref:o})});return t.displayName=`OverlayActivator(${e.displayName||e.name||"Component"})`,t}function hg(e,{focusActivatorWhenClosing:t=!1}={}){const n=at((r,o)=>{const{id:i,onClose:a,onHide:l}=r,c=nr(),u=Qh();return F(()=>(i&&u?.register(i,{close(){a?.(),l?.(),c?.setActive(!1),t&&c?.activatorRef.current?.focus({preventScroll:!0})}}),()=>{i&&u?.unregister(i)}),[i,a,l,u,c]),s(e,{...r,ref:o,id:i??c?.overlayId})});return n.displayName=`Overlay(${e.displayName||e.name||"Component"})`,n}function gg(e){if(e)return`${e}Title`}function kw(e){const t=[];let n=e.parentElement;for(;n;){const{overflow:r,overflowX:o,overflowY:i}=getComputedStyle(n);(/(auto|scroll|overlay)/.test(r)||/(auto|scroll|overlay)/.test(o)||/(auto|scroll|overlay)/.test(i))&&t.push(n),n=n.parentElement}return t}function Iw(e){let t=e.parentElement;for(;t&&t!==document.body;){const{position:n}=getComputedStyle(t);if(n==="fixed"||n==="sticky")return!0;t=t.parentElement}return!1}const yg=(e,t)=>{let n=0,r=null;return function(...o){const i=Date.now();r&&(clearTimeout(r),r=null),i-n>=t&&(e.apply(this,o),n=i),r=setTimeout(()=>{e.apply(this,o),n=Date.now(),r=null},t)}},vg=He(null),Aw=16;function _g(){const e=Ee(vg);if(e===null)throw new vr("No Popper in context");return e}function Tw(){const[e,t]=oe(null),n=V(null),r=x(o=>{if(n.current?.disconnect(),n.current=null,o!==null&&(t(o.getBoundingClientRect()),typeof ResizeObserver<"u")){const i=new ResizeObserver(()=>{t(o.getBoundingClientRect())});i.observe(o),n.current=i}},[]);return Dt(()=>()=>{n.current?.disconnect()},[]),[e,r]}function ww(e){const[t,n]=oe(null),r=Le("ltr"),o=V([]),i=V(null),a=x(()=>{e!==null&&(r.value=window.getComputedStyle(e).direction==="rtl"?"rtl":"ltr",n(e.getBoundingClientRect()))},[e,r]);return Dt(()=>{a();const l=yg(a,Aw);i.current=l,window.addEventListener("resize",a),window.addEventListener("scroll",l);for(const u of o.current)u.removeEventListener("scroll",l);const c=e?kw(e):[];o.current=c;for(const u of c)u.addEventListener("scroll",l);return()=>{window.removeEventListener("resize",a),window.removeEventListener("scroll",l);for(const u of c)u.removeEventListener("scroll",l);o.current=[],i.current=null}},[e,a]),{rect:t,direction:r.value}}const ys=He({}),Dc=()=>Ee(ys);function Lw(e){return gf.reduce((t,n)=>({...t,[n]:e(n)}),{})}const qd=10;function Rw({x:e,y:t}){const n=window.devicePixelRatio||1;return{x:Math.round(e*n)/n||0,y:Math.round(t*n)/n||0}}function xw(e,t,n,r,{offset:o=0,preventOverflow:i=!1,sameInlineSize:a=!1,direction:l="ltr",fallbackPositions:c}={}){const{position:u,alignment:d}=Gd(e,t,l),p=c?.map(({position:P,alignment:b})=>Gd(P,b,l)),m={x:0,y:0};let f={left:0,right:0,top:0,bottom:0},h=0,g=u,y=d;if(!n||!r)return{offsets:m,clipping:f,spacing:h,resolvedPosition:g,resolvedAlignment:y};const v=aa(u,d,n,r,o,a,l);
4if(m.x=v.x,m.y=v.y,i){if(f=la(m,n),Mw(u,f)&&p?.length){const P=Pi(f);for(const b of p){const C=aa(b.position,b.alignment,n,r,o,a,l),I=la(C,n);if(Pi(I)===0){m.x=C.x,m.y=C.y,f=I,g=b.position,y=b.alignment;break}}if(Pi(f)>0){let b=P;for(const C of p){const I=aa(C.position,C.alignment,n,r,o,a,l),S=la(I,n),k=Pi(S);k<b&&(b=k,m.x=I.x,m.y=I.y,f=S,g=C.position,y=C.alignment)}}}f.right&&!f.left&&(m.x+=f.right,h=-qd),!f.right&&f.left&&(m.x=0,h=qd)}return{offsets:m,clipping:f,spacing:h,resolvedPosition:g,resolvedAlignment:y}}function $3(e,t){if(t==="center")return e;const r=e.startsWith("block")?"Inline":"Block";return`${e}Span${r}${t==="start"?"End":"Start"}`}function Mw(e,t){const n=t.top!==0||t.bottom!==0,r=t.left!==0||t.right!==0;return e==="blockStart"||e==="blockEnd"?n:n||r}function Pi(e){return Math.abs(e.left)+Math.abs(e.right)+Math.abs(e.top)+Math.abs(e.bottom)}function Gd(e,t,n){if(n==="ltr")return{position:e,alignment:t};switch(e){case"inlineStart":return{position:"inlineEnd",alignment:t};case"inlineEnd":return{position:"inlineStart",alignment:t};default:return t==="center"?{position:e,alignment:t}:{position:e,alignment:t==="start"?"end":"start"}}}function aa(e,t,n,r,o,i,a){const l={x:0,y:0}
4,c=a==="rtl"?r.right-n.width:r.left,u=i?c:r.left+r.width/2-n.width/2,d=r.top+r.height/2-n.height/2;switch(e){case"inlineStart":l.x=r.left-n.width-o,t==="center"?l.y=d:t==="start"?l.y=r.top:t==="end"&&(l.y=r.bottom-n.height);break;case"inlineEnd":l.x=r.right+o,t==="center"?l.y=d:t==="start"?l.y=r.top:t==="end"&&(l.y=r.bottom-n.height);break;case"blockStart":l.y=r.top-n.height-o,t==="center"?l.x=u:t==="start"?l.x=r.left:t==="end"&&(l.x=r.right-n.width);break;case"blockEnd":l.y=r.bottom+o,t==="center"?l.x=u:t==="start"?l.x=r.left:t==="end"&&(l.x=r.right-n.width);break}return l}function la(e,t){const n=document.documentElement.clientWidth,r=document.documentElement.clientHeight,o=e.x+t.width,i=e.y+t.height;let a={left:0,right:0,top:0,bottom:0};return o>n&&(a={...a,right:n-o}),e.x<0&&(a={...a,left:-e.x}),i>r&&(a={...a,bottom:i-r}),e.y<0&&(a={...a,top:-e.y}),a}const bg=/^(block|inline)-(start|end)( span-(inline|block)-(start|end))?$/;function Pg(e){return bg.test(e)}function Sg(e){const t=e.match(bg);if(!t)return null;const[,n,r,,o,i]=t;return{axis:n,edge:r,...o&&i?{spanAxis:o,spanEdge:i}:{}}}function hl(e){const t=`${e.axis}-${e.edge}`;return e.spanAxis&&e.spanEdge?`${t} span-${e.spanAxis}-${e.spanEdge}`:t}function Nw(e){const t=Sg(e);return t?hl({...t,edge:t.edge==="start"?"end":"start"}):e}function Dw(e){const t=Nw(e),n=Ow(e);return[t,...n].join(", ")}function Ow(e){const t=Sg(e);if(!t)return[];const n=t.axis==="block"?"inline":"block",r=t.spanAxis&&t.spanEdge?{spanAxis:t.spanAxis==="inline"?"block":"inline",spanEdge:t.spanEdge}:{};return[hl({axis:n,edge:"start",...r}),hl({axis:n,edge:"end",...r})]}var fo={Popper:"xoxyfm1 xoxyfm0 _1fragem132",colorSchemeVariant:{scheme1:"xoxyfma xoxyfm2 _1fragemxx",scheme2:"xoxyfmb xoxyfm3 _1fragemxy",scheme3:"xoxyfmc xoxyfm4 _1fragemxz",scheme4:"xoxyfmd xoxyfm5 _1fragemy0",scheme5:"xoxyfme xoxyfm6 _1fragemy1",scheme6:"xoxyfmf xoxyfm7 _1fragemy2",scheme7:"xoxyfmg xoxyfm8 _1fragemy3",scheme8:"xoxyfmh xoxyfm9 _1fragemy4"},positionVariant:{absolute:"xoxyfmk xoxyfmi _1fragemwi",fixed:"xoxyfml xoxyfmj _1fragemwn"},hidden:"xoxyfmm"};function $d(e){if(Pg(e)){const[t,n]=e.split(" ");return e.includes(" ")?{position:Hi(t),alignment:n.includes("start")?"end":"start"}:{position:Hi(t),alignment:"center"}}return{position:"blockStart",alignment:"center"}}function Fw(e){return e.split(",").map(t=>t.trim()).filter(t=>!!Pg(t))}function Bw({activator:e,children:t,hidden:n,id:r,offset:o,minInlineSize:i,positionArea:a="block-start",positionTryFallbacks:l,preventOverflow:c,sameInlineSize:u}){const{rect:d,direction:p}=ww(e),[m,f]=Tw(),h=V(null),g=x(D=>{f(D),h.current=D},[f]),[y,v]=oe(""),{current:P,parent:b}=Dc(),C=Le("absolute"),{position:I,alignment:S}=$d(a),k=B(()=>{if(l!=="none")return l??Dw(a)},[l,a]),{clipping:E,offsets:T,spacing:A,resolvedPosition:R,resolvedAlignment:L}=B(()=>xw(I,S,m,d,{direction:p,offset:o,preventOverflow:c,sameInlineSize:u,fallbackPositions:k?Fw(k).map($d):void 0}),[p,o,I,S,m,c,d,u,k]),M=B(()=>({clipping:E,offsets:T,position:R,alignment:L,popperRect:m,referenceRect:d,spacing:A}),[E,T,R,L,m,d,A]);return Dt(()=>{const D=e&&Iw(e)?"fixed":"absolute";C.value=D;const N=D==="absolute"?window.scrollX||window.pageXOffset:0,U=D==="absolute"&&(window.scrollY||window.pageYOffset||-parseInt(document.body.style.top,10))||0,{x:z,y:O}=Rw({x:T.x+A+N,y:T.y+U});v((window.devicePixelRatio||1)<2?`translate(${z}px, ${O}px)`:`translate3d(${z}px, ${O}px, 0)`)},[T.x,T.y,A,e]),Dt(()=>{if(n)return;const D=h.current?.parentElement;D&&zh(D)},[n]),s(vg.Provider,{value:M,children:s(Sr,{children:s("div",{className:Y(fo.Popper,fo.positionVariant[C.value],(b??P)&&fo.colorSchemeVariant[b??P],n&&fo.hidden),style:{...d&&{transform:y,...u&&{width:d.width},...i&&{minWidth:rs(i)}}},ref:g,id:r,"aria-hidden":n||void 0,"data-popper-hidden":n||void 0,children:b&&P?s("div",{className:fo.colorSchemeVariant[P],children:t}):t})})})}var Mr={Arrow:"by0ptke by0ptkd _1fragemwi _1fragemzd _1fragem11z",arrowNudge:"var(--by0ptk6)",arrowPositionVariant:{blockStart:"by0ptkf",blockEnd:"by0ptkg",inlineStart:"by0ptkh",inlineEnd:"by0ptki"}
4,Tooltip:"by0ptk8 by0ptk7 _1fragempp _1fragemri _1fragemnw _1fragemtb _1fragem6e _1fragem11k _1fragemws _1fragemyt _1fragem124 _1fragemy5",tooltipPositionVariant:{blockStart:"by0ptk9",blockEnd:"by0ptka",inlineStart:"by0ptkb",inlineEnd:"by0ptkc"},tooltipTransitionVariant:{entered:"by0ptk0",exit:"by0ptk1",exiting:"by0ptk2",enter:"by0ptk3",entering:"by0ptk4",exited:"by0ptk5"}};const Vw="base",Uw=8;function Sn(e){const{children:t,id:n}=e,r=V(!1),o=nr(),{active:i=!1,setActive:a}=o??{},l=x(c=>{["Escape","Esc"].includes(c.key)&&i&&(c.preventDefault(),a?.(!1))},[i,a]);return F(()=>{if(o&&i)return document.addEventListener("keydown",l),()=>{document.removeEventListener("keydown",l)}},[o,i,l]),o?(o?.attach("onMouseEnter",()=>{r.current||a?.(!0)}),o?.attach("onMouseLeave",()=>{a?.(!1)}),o?.attach("onTouchStart",()=>{r.current=!0}),o?.attach("onClick",()=>{a?.(!i)}),s(q,{children:[i&&s("div",{role:"tooltip",className:bt({screenReaders:"only"}),children:t}),s(gl,{id:n,open:i,onMouseEnter:()=>{r.current||a?.(!0)},onMouseLeave:()=>{a?.(!1)},children:t})]})):s(gl,{...e})}const gl=hg(_w(function({children:t,id:n,open:r,onMouseEnter:o,onMouseLeave:i}){const{getInteraction:a}=An(),l=n?a(n):void 0,c=()=>{xn(l)&&l.show(),o?.()},u=()=>{xn(l)&&l.hide({delay:rg}),i?.()},d=nr(),{active:p=!1}=d??{};d?.setActivatorAttributes({"aria-controls":p?n:void 0,"aria-expanded":p});const m=l?.invokerRef?.current||d?.activatorRef.current||null,f=nn(!!r,{exit:Vw}),h=!!(n&&xn(l)&&!d),g=h?s("div",{id:n,role:"tooltip","aria-hidden":"true",className:bt({screenReaders:"only"}),children:t}):null;return s(q,{children:[g,f!=="exited"&&s(Bw,{activator:m,preventOverflow:!0,offset:Uw,children:s(zw,{id:h?void 0:n,transition:f,onMouseEnter:c,onMouseLeave:u,children:t})})]})}));function zw({children:e,id:t,onMouseEnter:n,onMouseLeave:r,transition:o}){const{clipping:i,spacing:a,position:l}=_g(),c=l==="blockStart"||l==="blockEnd",u=i.right||i.left,d=c&&u?Jt({[Mr.arrowNudge]:`${u+a}px`}):void 0,p=Y(Mr.Tooltip,Mr.tooltipPositionVariant[l],Mr.tooltipTransitionVariant[o]);return s("div",{id:t,role:"tooltip","aria-hidden":t===void 0?!0:void 0,onMouseEnter:n,onMouseLeave:r,className:p,style:d,children:[e,s(Hw,{})]})}function Hw(){const{position:e}=_g();return s("div",{className:Y(Mr.Arrow,Mr.arrowPositionVariant[e])})}async function qw(e){if(navigator.clipboard?.writeText)try{await navigator.clipboard.writeText(e);return}catch(r){console.warn("navigator.clipboard API failed, trying fallback method",r)}if(document.execCommand===void 0)throw new vr("Browser does not support copy to clipboard");let t=!1;const n=document.createElement("textarea");if(n.value=e,n.style.position="fixed",n.style.opacity="0",document.body.appendChild(n),n.select(),t=document.execCommand("copy"),document.body.removeChild(n),!t)throw new vr("Failed to copy text to clipboard")}const Gw=2500,Wd=et("CommandInvoker");function $w(e){e instanceof HTMLElement&&document.activeElement!==e&&e.focus({preventScroll:!0})}function Oc(e,{commands:{clipboard:t=!0,visibility:n=!0,overlay:r=!0}={}}={}){const o=e.displayName||e.name||"Component",i=at(function({command:d,commandFor:p,onClick:m,overlay:f,...h},g){const{getInteraction:y}=An(),[v,P]=oe(!1),[b,C]=oe(""),I=ln(),S=p?y(p):void 0,k=oa(S)&&S.clipboard.text!=null?S:void 0,E=x(async()=>{m?.();const{text:R,onCopy:L,onCopyError:M}=k.clipboard;let D=!1;try{await qw(R),D=!0}catch(N){console.warn("ClipboardItem: failed to copy text to clipboard",N)}finally{if(D){const N=I("clipboardCopied");C(N),P(!0),Lt({content:N}),L?.()}else{const N=I("clipboardFailedToCopy");C(N),P(!0),Lt({content:N}),M?.()}A(),T.current=setTimeout(()=>{P(!1)},Gw)}},[m,k,I]),T=V(),A=()=>{T.current&&clearTimeout(T.current)};return F(()=>()=>A(),[]),s(e,{...h,command:d,commandFor:p,onClick:k?E:m,overlay:k?s(gl,{open:v,children:b}):f,ref:g})}),a=at(function({commandFor:d,id:p,onClick:m,...f},h){const g=Ke(p,Wd),y=Yi({layoutId:d,activatorId:g});if(y){const{setToggleable:v,activatorAttributes:P,toggle:b}=y;v();const C={onClick:()=>{b(),m?.()},...P};return s(e,{...f,id:g,...C,ref:h})}else d&&console.warn(`${o} sets "command" property but is not wrapped inside a Disclosure component. Please ensure that the component is wrapped in a Disclosure component.`);return s(e,{...f,id:p,ref:h})}),l=at(function({command:d,commandFor:p,id:m,onClick:f,...h},g){const y=Ke(m,Wd),{getInteraction:v,upsertInteraction:P}=An(),b=p?v(p):void 0,C=V(null),I=Go(g,C),S=x(k=>{const E=p?v(p):void 0;if(xr(E)){const{overlayType:T}=E;C.current&&T==="popover"&&k&&P({...E,invokerRef:C})}},[p,v,P]);if(b){let k={};if(ia(b)){const{hide:E,show:T,toggle:A,visible:R}=b;k={onClick:()=>{switch(d){case"--hide":E();break;case"--show":T();break;case"--toggle":A();break}f?.()},"aria-controls":p,"aria-expanded":R}}else if(xr(b)){const{active:E,close:T,open:A,overlayType:R,toggle:L}=b;k={onClick:()=>{switch((d==="--show"||d==="--toggle"&&!E)&&$w(C.current),d){case"--hide":T();break;case"--show":A();break;case"--toggle":L();break}S(!E),f?.()},...(R==="modal"||R==="sheet")&&{"aria-haspopup":"dialog"},...R==="popover"&&{"aria-controls":p,"aria-expanded":E}}}return s(e,{...h,command:d,commandFor:p,id:y,...k,ref:I})}return null}),c=at(function({command:d="--auto",commandFor:p,...m},f){const{getInteraction:h}=An();if(Yi({layoutId:p})&&(d==="--hide"||d==="--show"||d==="--toggle"))return s(a,{...m,command:d,commandFor:p,ref:f});const y=p?h(p):void 0;if(y&&!xn(y)){const{defaultCommand:v}=y,P=d==="--auto"?v:d;if(P==="--copy"&&t&&oa(y))return s(i,{...m,command:P,commandFor:p,ref:f});if((P==="--hide"||P==="--show"||P==="--toggle")&&(n&&ia(y)||r&&xr(y)))return s(l,{...m,command:P,commandFor:p,ref:f});if(P==="--show"||P==="--hide"||P==="--toggle"||P==="--copy"){let b;oa(y)?b="clipboard":ia(y)?b="visibility":xr(y)&&(b="overlay"),console.warn(`Command "${d}" targets "${p}" but ${o} does not support ${b} commands.`)}else console.warn(`Unknown command "${d}" for ${o}`)}return s(e,{...m,command:d,commandFor:p,ref:f})});return c.displayName=`CommandInvokerComponent(${o})`,c}function Ww(e){if(!(e instanceof HTMLElement))return!0;try{return e.matches(":focus-visible")}catch{return!0}}function ci(e,{tapToggles:t=!1}={}){const n=e.displayName||e.name||"Component",r=at(function({interestFor:i,...a},l){const{onBlur:c,onClick:u,onFocus:d,onMouseEnter:p,onMouseLeave:m}=a,{getInteraction:f,upsertInteraction:h}=An(),g=i?f(i):void 0,y=V(null),v=V(),P=V(),b=x(A=>{if(P.current?.(),P.current=void 0,!(A instanceof HTMLElement))return;const R=L=>{v.current=L.pointerType};A.addEventListener("pointerenter",R),P.current=()=>{A.removeEventListener("pointerenter",R)}},[]),C=Go(l,y),I=Go(C,b),S=x(A=>{const R=i?f(i):void 0;xn(R)&&h(A?{...R,invokerRef:y}:{...R,invokerRef:void 0})},[i,f,h]),k=xn(g)&&g.active,E=x(A=>{["Escape","Esc"].includes(A.key)&&xn(g)&&(A.preventDefault(),g.hide(),S(!1))},[g,S]);F(()=>
4{if(k)return document.addEventListener("keydown",E),()=>{document.removeEventListener("keydown",E)}},[k,E]);const T=x(A=>{const R=A.target;!(R instanceof Node)||y.current?.contains(R)||R instanceof Element&&R.closest('[role="tooltip"]')||xn(g)&&(g.hide(),S(!1))},[g,S]);if(F(()=>{if(t&&k)return document.addEventListener("click",T),()=>{document.removeEventListener("click",T)}},[k,T]),xn(g)){const A={"aria-describedby":i,onFocus:()=>{(v.current!=="touch"||Ww(y.current))&&(g.show(),S(!0)),d?.()},onBlur:()=>{g.hide(),S(!1),c?.()},onMouseLeave:()=>{g.hide({delay:rg}),S(!1),m?.()},onMouseEnter:()=>{v.current!=="touch"&&(g.show(),S(!0)),p?.()},...t&&{onClick:()=>{v.current==="touch"&&(g.active?(g.hide(),S(!1)):(g.show(),S(!0))),u?.()}}};return s(e,{...a,...A,ref:I})}return s(e,{...a,ref:l})});return r.displayName=`InterestInvokerComponent(${n})`,r}const yl=Object.fromEntries(Object.entries({alignSelf:"auto",backgroundColor:"transparent",blockSize:"auto",borderRadius:"none",borderStyle:"none",inlineSize:"auto",maxBlockSize:"none",maxInlineSize:"none",minBlockSize:"0",minInlineSize:"0",padding:"none",placeContent:"normal",placeItems:"normal"}).flatMap(([e,t])=>hr(e)?.map(n=>[n,t])??[[e,t]])),en={none:"none","small-500":"small500","small-400":"small400","small-300":"small300","small-200":"small200","small-100":"small100",small:"small100",base:"base",large:"large100","large-100":"large100","large-200":"large200","large-300":"large300","large-400":"large400","large-500":"large500","large-600":"large600"},ca={center:"center",end:"end",normal:"normal","space-between":"between","space-around":"around","space-evenly":"evenly",start:"start",stretch:"stretch"},ua={baseline:"baseline",center:"center",end:"end",normal:"normal",start:"start",stretch:"stretch"},Yw={auto:"auto",baseline:"baseline",center:"center",end:"end",start:"start",stretch:"stretch"},da={auto:"auto",hidden:"hidden"},jw={base:"base",transparent:"transparent",subdued:"subdued"},Fc={alignContent:{...ca},placeContent:{...ca},alignItems:{...ua},alignSelf:{...Yw},placeItems:{...ua},backgroundColor:{base:"base",baseSpecified:"baseSpecified",transparent:"transparent",subdued:"subdued",subdued200:"subdued200"},backgroundColorHoverAndFocus:jw,borderRadius:{none:"none","small-100":"small",small:"small",base:"base",large:"large","large-100":"large",max:"max",fullyRounded:"fullyRounded"},borderWidth:{none:"none",base:"base",large:"large100","large-100":"large100","large-200":"large200"},borderStyle:{none:"none",dotted:"dotted",dashed:"dashed",solid:"base",auto:"base"},borderColor:{base:"base"},display:{inline:"inline",block:"block",flex:"flex",inlineBlock:"inlineBlock",inlineFlex:"inlineFlex",grid:"grid",inlineGrid:"inlineGrid",none:"none"},flexDirection:{column:"column",row:"row"},flexWrap:{wrap:"wrap",nowrap:"nowrap"},gridAutoFlow:{row:"row",column:"column"},justifyContent:{...ca},justifyItems:{...ua},objectFit:{contain:"contain",cover:"cover",fill:"fill"},boxShadow:{none:"none",extraSmall:"extraSmall",small:"small",base:"base",large:"large",extraLarge:"extraLarge"},overflow:{...da},overflowBlock:{...da},overflowInline:{...da},padding:{...en},paddingBlock:{...en},paddingInline:{...en},paddingBlockStart:{...en},paddingBlockEnd:{...en},paddingInlineStart:{...en},paddingInlineEnd:{...en},gap:{...en},rowGap:{...en},columnGap:{...en},position:{absolute:"absolute",relative:"relative",sticky:"sticky"},zIndex:{portal:"portal"}},So=4,Eg={borderRadius:{limit:So},borderStyle:{limit:So},borderWidth:{limit:So},gap:{limit:2},insetBlock:{limit:2},insetInline:{limit:2},overflow:{limit:2},padding:{limit:So},paddingBlock:{limit:2},paddingInline:{limit:2},placeContent:{limit:2},placeItems:{limit:2}},Bc={backgroundImage:JT,blockSize:Wi,gridAutoColumns:e=>e,gridAutoRows:e=>e,gridColumn:Dd,gridRow:Dd,gridTemplateColumns:Nd,gridTemplateRows:Nd,inlineSize:Wi,insetBlock:Ir,insetBlockEnd:Ir,insetBlockStart:Ir,insetInline:Ir,insetInlineEnd:Ir,insetInlineStart:Ir,maxBlockSize:Fd,maxInlineSize:Fd,minBlockSize:qo,minInlineSize:qo,transform:KT},Kw=/\s+/;function vs(e,t,{filterDefaultValues:n=!1}={}){const r={};for(const[d,p]of Object.entries(e))p===void 0||p===""||(r[d]=d in Eg?Xw(p,d):p);const o=n?Jw(Yd(r,t)):Yd(r,t),i=jd(o,Bc),a=jd(o,Fc),l=bt(i),{className:c,style:u}=lS(a);return{className:Y(l,c),style:u}}function Jw(e){const t={};for(const[n,r]of Object.entries(e))(!(n in yl)||r!==yl[n])&&(t[n]=r);return t}function Xw(e,t){const{limit:n}=Eg[t];return xc(e,r=>{if(r===void 0||typeof r!="string")return;const o=r.trim().split(Kw,n??So);return o.length===1?o[0]:(o.length===3&&o.push(o[1]),o)})}function Yd(e,t){const n={},r=(o,i)=>{const a=Zw({property:o,value:i},t),l=Qw(o,a);for(const[c,u]of Object.entries(l)){const d=n[c];Hr(d)&&Hr(u)?n[c]={...d,...u}:n[c]=u}};for(const o of Io)o in e&&r(o,e[o]);for(const[o,i]of Object.entries(e))Io.includes(o)||r(o,i);return n}function Qw(e,t){const n=hr(e);if(!n||n.length===0)return{[e]:t};if(Hr(t)){const i=Object.entries(t),a={};for(let l=0;l<n.length;l++){const c=n[l],u={};for(const[d,p]of i)u[d]=id(p)?p[l]:p;a[c]=u}return a}const r=id(t),o={};for(let i=0;i<n.length;i++)o[n[i]]=r?t[i]:t;return o}function Zw(e,t){if(eL(e))return nL(e.property,e.value,t);if(tL(e))return rL(e.property,e.value,t)}function eL(e){return e.property in Bc}function tL(e){return e.property in Fc}function nL(e,t,n){const r=n?.transforms?.[e]??Bc[e],o=xc(t,a=>{if(a!==void 0)return yf(a)?Cg(a.map(l=>r?.(l))):r?.(a)});if(!Hr(o))return o;const i=Object.entries(o).filter(([,a])=>a!==void 0&&a!=="");return i.length>0?Object.fromEntries(i):void 0}function rL(e,t,n){const r=Fc[e],o=i=>{const a=n?.transforms?.[e]?.(i);return r[a??i]};return xc(t,i=>yf(i)?Cg(i.map(o)):o(i))}function Cg(e){if(!Array.isArray(e)||e.length!==2)return e;const[t,n]=e;return[t,n,t,n]}
4function jd(e,t){const n={};for(const r of Object.keys(e))r in t||(n[r]=e[r]);return n}const pa=Object.keys(Bo).filter(e=>e!=="base"),Fr=new Set([">",">="]),ji=new Set(["<","<="]);function kg(e){return e==="inline-size"}function oL(e){if(e.operator!=="and"||e.left.type!=="condition"||e.right.type!=="condition"||e.left.property!==e.right.property)return!1;const t=e.left,n=e.right,r=parseFloat(t.value),o=parseFloat(n.value),i=Fr.has(t.operator),a=Fr.has(n.operator),l=ji.has(t.operator),c=ji.has(n.operator);return i&&c||l&&a?(i?r:o)<(l?r:o):!1}function iL(e){const t=e.left,n=e.right,r=Fr.has(t.operator),o=Fr.has(n.operator),i=ji.has(t.operator),a=ji.has(n.operator);let l;if(r&&a)l=t;else if(i&&o)l=n;else return console.warn("Invalid range query structure. Expected one lower bound and one upper bound."),!1;return Fr.has(l.operator)?!0:(console.warn(`Mobile-first approach requires the lower bound of a range to use '>' or '>=' operators. Found '${l.operator}' in condition '${l.property} ${l.operator} ${l.value}'. Use '>' or '>=' instead.`),!1)}function sL(e){if(e.state==="invalid")return e;function t(o){return kg(o)?!0:(console.warn(`Container queries should be based on the inline dimensions of the container. Use 'inline-size' instead of '${o}'.`),!1)}function n(o){return o.type==="compound-condition"?o.left.type==="condition"&&!t(o.left.property)||o.right.type==="condition"&&!t(o.right.property)?!1:oL(o)?iL(o):n(o.left)&&n(o.right):o.type==="condition"&&t(o.property)?Fr.has(o.operator)?!0:(console.warn(`Mobile-first approach requires '>' or '>=' operators. Found '${o.operator}' in condition '${o.property} ${o.operator} ${o.value}'. Use '>' or '>=' instead.`),!1):!1}return e.conditionalValues.every(o=>n(o.condition))?e:{state:"invalid",error:"Expected a mobile-first responsive query, instead found one that does not follow mobile-first principles."}}function aL(e,t){if(e.state==="invalid")return e;const n=t?` for property '${t}'`:"";function r(c){return kg(c)?!0:(console.warn(`Media queries should be based on 'inline-size'. Use 'inline-size' instead of '${c}'.`),!1)}function o(c){return pa.includes(c)?!0:(console.warn(c==="base"?`Media queries should use valid breakpoints${n}. Found 'base' (use 'base' only as fallback, minimum condition is 'extraSmall'). Use one of '${pa.join("', '")}' instead.`:`Media queries should use valid breakpoints${n}. Found '${c}'. Use one of '${pa.join("', '")}' instead.`),!1)}function i(c,u){return c!==">="?(console.warn(`Media queries should use '>=' operator${n}. Found '${c}' (expected '>=' for breakpoint '${u}').`),!1):!0}function a(c){return c.type==="compound-condition"?a(c.left)&&a(c.right):c.type==="condition"?r(c.property)&&o(c.value)&&i(c.operator,c.value):!1}return e.conditionalValues.every(c=>a(c.condition))?e:{state:"invalid",error:"Expected a valid media query with breakpoint conditions, instead found invalid property, breakpoints, or operators."}}const lL=et("ContainerQueryStyle");function cL(e,t){const n=Ke(void 0,lL),{containerQueryCssStrings:r,fallbackClassName:o,fallbackStyle:i}=B(()=>{const l={},c=[];if(!e)return{fallbackClassName:"",fallbackStyle:{},containerQueryCssStrings:c};for(const[p,m]of Object.entries(e)){if(!Lc(m))continue;const f=sL(wc(m));if(f.state==="invalid")continue;l[p]=f.fallbackValue;const g=f.conditionalValues.map(y=>{const v=uL({cssClassNameSelector:n,property:p,value:y.value,config:t});return v?`${f.responsiveType}${f.responsiveType==="@container"?`${f.name?` ${f.name} `:""}`:""}${vl(y.condition)}{${v}}`:""}).filter(Boolean).join("");c.push({property:p,cssString:g})}const{className:u,style:d}=vs(l,t);return{containerQueryCssStrings:c,fallbackClassName:u,fallbackStyle:d}},[t,e,n]),a=r.length>0?s("style",{children:r.map(({cssString:l})=>l).join("")},n):null;return{className:Y(n,o),style:i,styleElement:a}}function uL({cssClassNameSelector:e,property:t,value:n,config:r}){const{className:o,style:i}=vs({[t]:n},r);if(!o)return null;const a=dL(o);return a?pL(a,e,i):null}const ma=new Map;function dL(e){if(ma.has(e))return ma.get(e)||null;if(typeof document>"u")return null;
4const t=e.split(" ").filter(Boolean);if(t.length===0)return null;const n=[];for(const o of Array.from(document.styleSheets))try{const i=o.cssRules||o.rules;for(const a of Array.from(i))if(a instanceof CSSStyleRule)for(const l of t)new RegExp(`\\.${l}(?![\\w-])`).test(a.selectorText)&&n.push(a.cssText)}catch{continue}const r=n.length>0?n.join(`
5`):null;return ma.set(e,r),r}function pL(e,t,n){const r=e.split(`
6`),o=[];for(const i of r){const a=i.match(/^([^{]+)\{([^}]+)\}/);if(a){const l=a[1].trim(),c=a[2].trim(),u=mL(c,n);if(l.includes("[dir=")){const d=l.match(/\[dir="[^"]+"\]/)?.[0];d&&l.match(/\.([^\s[\]]+)/)&&o.push(`${d} .${t}{${u}}`)}else o.push(`.${t}{${u}}`)}}return o.join("")}function mL(e,t){const n=/var\(--[^)]+\)/g;return e.replace(n,r=>{const o=r.match(/var\(([^)]+)\)/)?.[1];return o&&t[o]?t[o]:r})}function vl(e){if(e.type==="compound-condition"){const t=vl(e.left),n=vl(e.right);return`${t} ${e.operator} ${n}`}return`(${e.property} ${e.operator} ${e.value})`}function fL(e,t){return B(()=>!e||Object.keys(e).length===0?{className:"",style:{}}:vs(e,t,{filterDefaultValues:!0}),[t,e])}function hL(e,t){const{className:n,style:r}=B(()=>{const o={};if(!e)return{className:"",style:{}};for(const[i,a]of Object.entries(e)){if(!Rc(a)){o[i]=a;continue}const l=aL(wc(a),i);if(l.state==="invalid")continue;const c={base:l.fallbackValue};for(const u of l.conditionalValues){const d=u.condition;d.type==="condition"&&(c[d.value]=u.value)}o[i]=c}return vs(o,t)},[t,e]);return{className:Y(n),style:r}}function Tt(e,t){const{containerQueryProps:n,mediaQueryProps:r,literalProps:o}=B(()=>{const g={},y={},v={};for(const[b,C]of Object.entries(e||{}))C!=null&&(Lc(C)?g[b]=C:Rc(C)?y[b]=C:v[b]=C);const P=new Set(Object.keys(y).flatMap(b=>hr(b)??[b]));for(let b=P.size>0;b;){b=!1;for(const[C,I]of Object.entries(v)){if(vf(I))continue;const S=hr(C);if(S?.length&&lr(S[0],I))continue;const k=S?.length?S:[C];if(k.some(E=>P.has(E))){y[C]=I,delete v[C];for(const E of k)P.add(E);b=!0}}}return{containerQueryProps:g,mediaQueryProps:y,literalProps:v}},[e]),{className:i,style:a,styleElement:l}=cL(n,t),{className:c,style:u}=hL(r,t),{className:d,style:p}=fL(o,t);gL(n,r,o),yL(o);const m=Object.keys(n).length>0,f=Object.keys(r).length>0;return{className:Y(m?i:void 0,f?c:void 0,d),style:{...a,...u,...p},styleElement:l}}function lr(e,t){const n=yl[e];return n!==void 0&&t===n}function gL(e,t,n){const r=new Set,o=new Set,i=new Set,a=new Set;if(Object.keys(e).length===0&&Object.keys(t).length===0&&Object.keys(n).length===0)return;for(const[u,d]of Object.entries(e))if(Io.includes(u)){const p=hr(u)??[];if(p.length>0&&lr(p[0],d))continue;for(const m of p)r.add(m)}else{if(lr(u,d))continue;r.add(u)}for(const[u,d]of Object.entries(t))if(Io.includes(u)){const p=hr(u)??[];if(p.length>0&&lr(p[0],d))continue;for(const m of p)o.add(m)}else{if(lr(u,d))continue;o.add(u)}for(const[u,d]of Object.entries(n))if(Io.includes(u)){const p=hr(u)??[];if(p.length>0&&lr(p[0],d))continue;for(const m of p)i.add(m),a.add(m)}else{if(lr(u,d))continue;i.add(u)}const l=new Set,c=u=>a.has(u)&&(u in t||u in e);for(const u of r)if(o.has(u)||i.has(u)){if(c(u))continue;l.add(u)}for(const u of o)if(i.has(u)){if(c(u))continue;l.add(u)}l.size>0&&console.warn(`ResponsiveStyle: style property conflicts detected - ${Array.from(l).join(", ")}. These style properties are being set by multiple styling methods (container query, media query, or conditional). Consider avoiding mixing different responsive value types for the same properties.`)}function yL(e){const t=Object.keys(e).filter(n=>vf(e[n]));t.length>0&&console.warn(`ResponsiveStyle: conditional values are no longer resolved - ${t.join(", ")}. Convert them to an \`@media\` string or a per-breakpoint object at the component boundary.`)}const vL="_1M6e9",_L={UnstyledLink:vL},_s=ci(Oc(Nc(at(function({ariaBusy:t,ariaHidden:n,ariaLabel:r,ariaLive:o,children:i,className:a,commandFor:l,command:c,href:u,id:d,lang:p,onClick:m,onFocus:f,onMouseEnter:h,target:g,...y},v){const P=GT(),b=Bn(),C=typeof m=="function"?()=>m():void 0,I=typeof f=="function"?()=>f():void 0,S=typeof h=="function"?()=>h():void 0,k=a??_L.UnstyledLink,E=nr(),T=Mc(E,{onClick:C,onFocus:I,onMouseEnter:S}),A=E?.activatorAttributes,R=n||b?!0:void 0,L=R?-1:void 0;return P?s(P,{className:k,"aria-busy":t||void 0,"aria-hidden":R,"aria-label":r,"aria-live":o,href:u,id:d,lang:p,ref:v,tabIndex:L,target:g,...T,...A,...y,children:i}):s("a",{"aria-busy":t||void 0,"aria-describedby":Jh({external:g==="_blank"||!1,native:!0}),"aria-label":r,"aria-live":o,"aria-hidden":R,className:k,href:u,id:d,lang:p,ref:v,rel:g==="_blank"?"noopener noreferrer":void 0,tabIndex:L,target:g==="_blank"?g:void 0,...T,...A,...y,children:i})}))));function Zr(){const e=Ee(_f);if(e==null)throw new vr("No theme found in context");return e}function rt(){const e=Zr();if(typeof window>"u")return e.configuration;const t=V();if(t.current!=null&&t.current.theme!==e&&(t.current=void 0),t.current==null){const n=e.configurationSignal,r=new Map,o={};for(const i of Object.keys(e.configuration))Object.defineProperty(o,i,{enumerable:!0,get(){return r.has(i)||r.set(i,It(()=>n.value[i])),r.get(i).value}});
6t.current={theme:e,watchedKeysSignals:r,reactiveConfiguration:o}}return t.current.reactiveConfiguration}function eo(e){const t=at(function({disableGlobalBranding:r,...o},i){const{global:{cornerRadius:a}}=rt(),l=cS(a),c=r?o:{...o,borderRadius:l??o.borderRadius};return s(e,{...c,ref:i})});return t.displayName=`GlobalBrandedComponent(${e.displayName||e.name||"Component"})`,t}var Si={Clickable:"_1s82kpb1 _1s82kpb0 _1fragemyd _1fragemws _1fragem126 _1fragemyk _1fragem12b _1fragemxw",overflowHidden:"_1s82kpb4 _1s82kpb3 _1fragemup _1fragemv4",visuallyHidden:"_1s82kpb5 _1fragem121",inert:"_1s82kpb2 _1fragemz0"};const Tn=ow(eo(ci(Oc(Nc(at(function({accessibilityLabel:t,accessibilityVisibility:n="visible",background:r="transparent",blockSize:o="auto",border:i="none",borderRadius:a="none",borderStyle:l,borderWidth:c,children:u,className:d,command:p,commandFor:m,controlId:f,disabled:h=!1,display:g="auto",expanded:y,href:v,id:P,inlineSize:b="auto",lang:C,loading:I=!1,maxBlockSize:S="none",maxInlineSize:k="none",minBlockSize:E="0",minInlineSize:T="0",onBlur:A,onClick:R,onFocus:L,onPointerDown:M,onPointerEnter:D,onPointerLeave:N,onPointerUp:U,overflow:z="visible",padding:O="none",paddingBlock:K,paddingInline:X,paddingBlockEnd:ne,paddingBlockStart:$,paddingInlineEnd:J,paddingInlineStart:ee,target:te="auto",type:W="button",...he},re){F(()=>{y!=null&&f==null&&console.warn('When <Clickable /> has an "expanded" prop, it should also have "controlId" defined')},[f,y]);const de=Bn(),le=nr(),{className:_e,style:ae,styleElement:ge}=Tt({backgroundColor:r,blockSize:o,..._r({border:i,borderStyle:l,borderWidth:c}),borderRadius:a,display:g,inlineSize:b,maxBlockSize:S,maxInlineSize:k,minInlineSize:T,minBlockSize:E,padding:O,paddingBlock:K,paddingBlockEnd:ne,paddingBlockStart:$,paddingInline:X,paddingInlineEnd:J,paddingInlineStart:ee},{transforms:{display:Pc}}),ke=Y(Si.Clickable,n==="exclusive"&&Si.visuallyHidden,_e,z==="hidden"&&Si.overflowHidden,de&&Si.inert,d),we=ai(),Ie=Wr(re),Ue=Mc(le,{onClick:()=>{R?.()},onBlur:()=>{A?.()},onFocus:()=>{L?.()},onMouseEnter:()=>{D?.()},onMouseLeave:()=>{N?.()},onMouseDown:Ge=>{M&&Ge.button===0&&M?.()},onMouseUp:()=>{U?.()}}),ce=Pw(le,{"aria-controls":f,"aria-expanded":y}),ie=I?"assertive":void 0,me=n==="hidden"||de,Ne={className:ke,id:P,lang:C,style:ae,tabIndex:me?-1:void 0,...ce,...Ue,...he};return s(q,{children:[ge,s(Gr.Provider,{value:!0,children:v&&m===void 0?s(_s,{...Ne,href:v,ref:Ie,ariaBusy:I,ariaHidden:me?!0:void 0,ariaLive:ie,ariaLabel:t,target:te,children:u}):s("button",{ref:Ie,type:m?"button":W,disabled:h||I,form:W==="submit"&&we?.nested?we.id:void 0,"aria-busy":I,"aria-hidden":me?!0:void 0,"aria-live":ie,"aria-label":t,...Ne,children:u})})]})})))))),Kd="generic",fa=new Map([["main",{element:"main"}],["header",{element:"header"}],["footer",{element:"footer"}],["section",{element:"section"}],["aside",{element:"aside"}],["navigation",{element:"nav"}],["ordered-list",{element:"ol",role:"list"}],["unordered-list",{element:"ul",role:"list"}],["list-item",{element:"li"}],["list-item-separator",{element:"li",role:"separator"}],["separator",{role:"separator"}],["status",{role:"status"}],["alert",{role:"alert"}],["group",{role:"group"}],["listbox",{role:"listbox"}],["generic",{}],["presentation",{}],["none",{}]]);function ui(e,{defaultRole:t=Kd,defaultElement:n="div"}={}){const r=fa.get(e??t)??fa.get(t)??fa.get(Kd);return{Element:r.element??n,role:r.role}}var ha={Grid:"_1mrl40q0 _1fragemws",overflowHidden:"_1mrl40q1 _1fragemup _1fragemv4",visuallyHidden:"_1mrl40q2 _1fragem121"};const gt=Cc(eo(function({accessibilityLabel:t,accessibilityRole:n="generic",accessibilityVisibility:r="visible",alignContent:o,alignItems:i,background:a="transparent",backgroundHoverAndFocus:l,blockSize:c="auto",border:u="none",borderColor:d,borderRadius:p="none",borderStyle:m,borderWidth:f,children:h,columnGap:g,display:y="auto",gap:v="none",gridAutoColumns:P,gridAutoFlow:b,gridAutoRows:C,gridTemplateColumns:I="none",gridTemplateRows:S="none",id:k,inlineSize:E="auto",justifyContent:T,justifyItems:A,maxBlockSize:R="none",maxInlineSize:L="none",minBlockSize:M="0",minInlineSize:D="0",overflow:N="visible",padding:U="none",paddingBlock:z,paddingBlockEnd:O,paddingBlockStart:K,paddingInline:X,paddingInlineEnd:ne,paddingInlineStart:$,placeContent:J="normal normal",placeItems:ee="normal normal",rowGap:te,...W}){const he=Qr(),{Element:re,role:de}
6=ui(n,{defaultElement:he?"span":"div"}),{className:le,style:_e,styleElement:ae}=Tt({gap:v,placeContent:J,placeItems:ee,alignContent:o,alignItems:i,backgroundColor:a,backgroundColorHoverAndFocus:l,blockSize:c,..._r({border:u,borderStyle:m,borderWidth:f}),borderRadius:p,columnGap:g,display:y,gridAutoColumns:P,gridAutoFlow:b,gridAutoRows:C,gridTemplateColumns:I,gridTemplateRows:S,inlineSize:E,justifyContent:T,justifyItems:A,maxBlockSize:R,maxInlineSize:L,minBlockSize:M,minInlineSize:D,padding:U,paddingBlock:z,paddingBlockEnd:O,paddingBlockStart:K,paddingInline:X,paddingInlineEnd:ne,paddingInlineStart:$,rowGap:te},{transforms:{blockSize:Wi,display:nw}});return s(q,{children:[ae,s(re,{"aria-hidden":r==="hidden"?!0:void 0,"aria-label":t,className:Y(ha.Grid,r==="exclusive"&&ha.visuallyHidden,N==="hidden"&&ha.overflowHidden,le),id:k,role:de,style:_e,...W,children:h})]})})),bL="/cdn/shopifycloud/checkout-web/assets/c1/assets/sprite.CxF41tjh.svg",PL=["alertCircle","alertTriangle","alertTriangleFilled","arrowDown","arrowLeft","arrowRight","arrowUp","arrowUpRight","bag","bullet","calendar","camera","caretDown","cart","cashDollar","categories","check","checkCircle","checkCircleFilled","chevronDown","chevronLeft","chevronRight","chevronUp","circle","clipboard","clock","creditCard","delete","delivered","delivery","disabled","discount","edit","email","empty","external","filter","geolocation","giftCard","globe","grid","image","info","infoFilled","listBulleted","location","lock","map","menu","menuHorizontal","menuVertical","minus","mobile","note","order","organization","packageDelivery","plus","profile","questionCircle","questionCircleFilled","reorder","reset","return","savings","search","settings","star","starFilled","starHalf","store","truck","upload","x","xCircle","xCircleFilled"];var SL=1.7142857142857142,zn={colorVariant:{base:"a8x1wuj",strong:"a8x1wuk"},toneVariant:{auto:"a8x1wua",neutral:"a8x1wub",accent:"a8x1wuc a8x1wu4 _1fragemxq",custom:"a8x1wud a8x1wu5 _1fragemxs",info:"a8x1wue a8x1wu6 _1fragemxt",success:"a8x1wuf a8x1wu7 _1fragemxu",critical:"a8x1wug a8x1wu8 _1fragemxr",warning:"a8x1wuh a8x1wu9 _1fragemxv",monochrome:"a8x1wui"},displayVariant:{block:"a8x1wun a8x1wul _1fragem5u",inline:"a8x1wuo a8x1wum _1fragem6e _1fragem12x"},sizeVariant:{"small-200":"a8x1wuq a8x1wup","small-100":"a8x1wur a8x1wup",base:"a8x1wus a8x1wup","large-100":"a8x1wut a8x1wup",fill:"a8x1wuu a8x1wup"},fillVariant:{fill:"a8x1wuw",outline:"a8x1wux"},Icon:"a8x1wu3 a8x1wu2 _1fragemzf _1fragem4q _1fragemvo _1fragemve _1fragem12k _1fragem12p _1fragem12e",InterestActivator:"a8x1wuz a8x1wuy _1fragemws _1fragemyk",mirrored:"a8x1wuv"};const EL=!1,CL=["arrow-left","arrow-right","arrow-up-right","cart","chevron-left","chevron-right","delivery","external","list","note","package-delivery","return","star-half","truck","arrowLeft","arrowRight","arrowUpRight","chevronLeft","chevronRight","starHalf"],kL=["alert-triangle-filled","caret-down","check-circle-filled","info-filled","question-circle-filled","star-filled","star-half","x-circle-filled","caretDown","errorFill","infoFill","questionFill","starFill","starHalf","warningFill"];function Me({interestFor:e,...t}){return e?s(AL,{...t,interestFor:e}):s(IL,{...t})}function IL({accessibilityLabel:e,...t}){const{className:n,children:r}=Ig(t);return s("span",{role:e?"img":void 0,"aria-label":e,className:n,id:t.id,children:r})}const AL=ci(at(function({accessibilityLabel:t,"aria-describedby":n,id:r,onBlur:o,onClick:i,onFocus:a,onMouseEnter:l,onMouseLeave:c,...u},d){const{className:p,children:m}=Ig(u);return s("span",{role:"img",tabIndex:n?0:void 0,id:r,ref:d,className:Y(zn.InterestActivator,p),"aria-label":t,"aria-labelledby":t?void 0:n,"aria-describedby":t?n:void 0,onBlur:o,onClick:i,onFocus:a,onMouseEnter:l,onMouseLeave:c,children:m})}),{tapToggles:!0});function Ig({type:e,tone:t="auto",color:n="base",size:r="base",display:o="block",className:i}){const{icons:a}=rt(),l=WT()??EL;let c;e?c=e:(e===""||console.warn(`"${e}" is not a valid <Icon /> type`),c="empty");const u=CL.includes(c),d=kL.includes(c)?"fill":"outline";let p;switch(r){case"small":p="small-100";break;case"large":p="large-100";break;default:p=r;break}const m=Y(zn.Icon,zn.toneVariant[t],(t==="auto"||t==="neutral")&&zn.colorVariant[n],zn.displayVariant[o
6],zn.sizeVariant[p],u&&zn.mirrored,zn.fillVariant[d],i);let f=TL(c);f||(console.warn(`"${c}" is not a valid <Icon /> type`),f="empty");const h=a[f],g=h??`${bL}#${f}`,y=s("svg",{viewBox:"0 0 14 14",focusable:"false","aria-hidden":"true",children:s("use",{href:g})}),v=h!=null||l?s(ST,{iconUrl:g,fallback:y,allowRelativeUrl:h==null}):y;return{className:m,children:v}}function TL(e){const t=Hi(e);if(t in Jd)return Jd[t];if(PL.includes(t))return t}const Jd={checkmark:"check",close:"x",critical:"alertCircle",error:"xCircle",errorFill:"xCircleFilled",gift:"giftCard",giftFill:"giftCard",hamburger:"menu",hollowCircle:"circle",horizontalDots:"menuHorizontal",infoFill:"infoFilled",list:"listBulleted",magnify:"search",marker:"location",orderBox:"order",pen:"edit",question:"questionCircle",questionFill:"questionCircleFilled",starFill:"starFilled",success:"checkCircle",verticalDots:"menuVertical",warning:"alertTriangle",warningFill:"alertTriangleFilled"};var wL={Toast:"jmb5zc4 jmb5zc3 _1fragempk _1fragemnr _1fragemtb _1fragemri _1fragemy5 _1fragem120"};const LL=5300;function RL({message:e,dismiss:t}){const n=ln();return F(()=>Lt({content:e}),[e]),F(()=>{const r=setTimeout(t,LL);return()=>clearTimeout(r)},[t]),s("span",{className:wL.Toast,children:s(gt,{gridAutoFlow:"column",gridTemplateColumns:"minmax(0, 1fr) minmax(auto, max-content)",gridTemplateRows:"minmax(0, 1fr)",alignItems:"center",alignContent:"center",gap:"base",children:[s("span",{children:e}),s(Tn,{onClick:t,accessibilityLabel:n("closeNotification"),children:s(Me,{type:"x",size:"small",tone:"monochrome"})})]})})}var xL={Container:"_17vpdjb1 _17vpdjb0 _1fragem8m _1fragemaf _1fragemwn _1fragem132 _1fragem103 _1fragem11a _1fragem10v _1fragem6t _1fragemcn _1fragembj _1fragem11z"};const Ag=He(null);function ML({children:e}){const t=Fn(),[n,r]=oe([]),o=V(null),i=V(0),a=V(0),l=V(0),c=x(p=>{r(m=>m.filter(f=>f.id!==p))},[]),u=x(()=>(l.current+=1,`toast-message-${l.current}`),[]),d=B(()=>({setMessages:r,removeMessage:c,createMessageId:u}),[r,c,u]);return Dt(()=>{if(!t&&!(!o.current||!o.current.animate)&&(a.current=i.current,i.current=o.current.offsetHeight,i.current>a.current)){const p=i.current-a.current;o.current.animate([{transform:`translateY(${p}px)`},{transform:"translateY(0)"}],{duration:150,easing:"ease-out"})}}),s(Ag.Provider,{value:d,children:[e,n.length>0?s(Sr,{children:s("div",{ref:o,className:xL.Container,children:n.map(({id:p,content:m})=>s(RL,{message:m,dismiss:()=>c(p)},p))})}):null]})}function Vc(){const e=Ee(Ag),{setMessages:t,removeMessage:n,createMessageId:r}=e??{};return x(i=>{if(!t||!n||!r)throw new vr("useToast must be used within Toaster context provider");if(typeof i!="string"||typeof i=="string"&&i.trim()==="")return{hide:()=>{}};const a=r();return t(l=>[...l,{id:a,content:i}]),{hide:()=>n(a)}},[t,n,r])}function Xd(e,t){if(!e)throw new TypeError(t)}function Ar(e){return B(()=>bf(e),[])}function bs(e,t){const n=V(t);n.current=t;const r=V();r.current||(r.current=e.listen(n.current)),F(()=>()=>r.current?.(),[e,n])}const W3="·",NL=150,DL=100,Y3="ASAP",Tg=ft("ShippingMethodsContext");function Uc(){const e=Ee(Tg);if(e!=null)return e}function OL(e){const{shop:{asyncDeliveryPromiseExperienceEnabled:t},observability:n}=_(),r=V(!1);$e(()=>{const o=e.value;if(typeof PerformanceMeasure>"u"||typeof PerformanceMark>"u")return;function i(){const l=performance.now();return()=>{const u=performance.now()-l;n.histogram({name:"shipping_methods_loading_duration",value:u,attributes:{async_shop_promise:t}})}}let a;r.current&&(o.status==="loading"?a=i():a&&(a(),a=void 0)),r.current=!0})}function FL(){const{observability:e}=_();return x((n,r)=>{e.histogram({name:"checkout_delivery_promise_request_duration_ms",value:n,attributes:{apiClientId:r.toString()}})},[e])}const BL=()=>Ul((e,t)=>{switch(e){case"ignored":{if(t==="timeout")return"idle";break}case"idle":{if(t==="countryChange")return"debounced";if(t==="otherAddressFieldChange")return"ignored";break}case"debounced":switch(t){case"countryChange":return"debounced";case"otherAddressFieldChange":return"ignored";case"timeout":return"idle"}}},"idle"),VL=["streetName","streetNumber","neighborhood","line2"];function UL(e,t){const n=B(BL,[e]),r=n.value;bs(n,({previousState:o,action:i})=>{o==="debounced"&&i==="timeout"&&t()}),F(()=>{let o=!1;return e.fields.countryCode.subscribe(()=>{o&&(n.value="countryChange"),o=!0})},[e.fields.countryCode,n]),F(()=>
6{if(r==="debounced"||r==="ignored"){const o=setTimeout(()=>{n.value="timeout"},DL);return()=>{clearTimeout(o)}}},[n,r]),F(()=>{let o=!1;const a=Object.keys(e.fields).filter(l=>!["countryCode",...VL].includes(l)).map(l=>e.fields[l].subscribe(c=>{c&&o&&(n.value="otherAddressFieldChange")}));return o=!0,()=>{a.forEach(l=>l())}},[e.fields,n])}function wg(){const{shop:{shippingRatesReloadStrategy:e}}=_();return x(({countryCode:t,zoneCode:n})=>{try{Xd(typeof t=="string","Expected a country code");const r=e.get(t);switch(Xd(r!=null,`Could not find a strategy for ${t}`),r.type){case"regional":{const o=Math.max(...r.regions.values());return n==null?o:r.regions.get(n)??o}case"national":return r.strategy}}catch{const r=e.get("ZZ");return r?.type==="national"?r.strategy:qn.Anything}},[e])}function j3(){const{i18n:e}=_(),t=new Map;return t.set("year",n=>e.translate("shipping.subscription_delivery_description.subscription_delivery_frequency.year",{count:n})),t.set("month",n=>e.translate("shipping.subscription_delivery_description.subscription_delivery_frequency.month",{count:n})),t.set("week",n=>e.translate("shipping.subscription_delivery_description.subscription_delivery_frequency.week",{count:n})),t.set("day",n=>e.translate("shipping.subscription_delivery_description.subscription_delivery_frequency.day",{count:n})),(n,r)=>t.get(n)?.(r)||""}function Lg({proposedDeliveryLines:e,onlyShippingOneTimePurchase:t=!1}){return e.value.map(r=>r.value).reduce((r,{type:o,id:i,deliveryMethodTypes:a,deliveryMethodHandle:l})=>{const c=["SHIPPING","LOCAL"];if(t&&(o!=="ONE_TIME_PURCHASE"||a.length===0||!a.some(d=>c.includes(d))))return r;const u=dS(o,i);return{...r,[u]:l}},{})}function Ps(e,t){const n=e.value;if(t===void 0){n.forEach(r=>{r.value={...r.value,deliveryMethodHandle:void 0}});return}Object.entries(t).forEach(([r,o])=>{const[i,a]=r.split("-"),l=n.find(c=>{const{type:u,id:d}=c.value;return u===i&&(!a||!d||Be(d)===a)});l&&(l.value={...l.value,deliveryMethodHandle:o})})}function di(e,t,n){const{parts:r}=Ot(),o=r.deliveryLines.value;function i(l){return!n||l.deliveryMethodTypes.includes(n)}const a=o.find(l=>{const c=l.peek(),u=c.deliveryMethodTypes.length>0;return c.type===e&&u&&(!t||c.id===t)&&i(c)});return a||o.find(l=>{const c=l.peek();return i(c)})}function K3(e){return!!di(e)?.fields}function zL(e,t){const n=di(e,t);return[n?.fields.deliveryMethodTypes.value||[],x(r=>{n&&(n.value={...n.value,deliveryMethodTypes:r})},[n])]}function J3({type:e="ONE_TIME_PURCHASE",id:t,deliveryMethodType:n}){const r=di(e,t,n);return[r?.fields.deliveryMethodHandle.value||void 0,x(o=>{r&&(r.value={...r.value,deliveryMethodHandle:o})},[r])]}function X3(e,t){const n=di(e,t);return B(()=>n?.fields.deliveryMethodOptions.value.phone||ue(void 0),[n])}function Q3(e,t){const n=di(e,t);return B(()=>n?.fields.deliveryMethodOptions.value.instructions||ue(void 0),[n])}function Z3(e,t){const n=t==="ONE_TIME_PURCHASE"?"SUBSCRIPTION":"ONE_TIME_PURCHASE",r=H().deliveryNext,o=d=>ei(r.value).filter(zl).find(m=>m.type===d),i=(d,p)=>{const f=o(d)?.methods.find(h=>h.methodType===p);if(f)return f},a=d=>{const p=e.find(f=>f.handle===d);return p?p.methodType==="PICK_UP"?o(n)?.methods.find(g=>g.methodType==="PICK_UP"&&p.title===g.title)?.handle:i(n,p.methodType)?.handle:void 0},{deliveryLines:l}=se(),c=w(()=>Lg({proposedDeliveryLines:l})),u=x(d=>{Ps(l,{[n]:d})},[l,n]);return{inverseGroupType:n,inverseGroupDeliveryMethodHandle:c.value,setInverseGroupDeliveryMethodHandle:u,getInverseGroupDeliveryMethodHandle:a}}function HL(){const{parts:e}=Ot();return x(n=>{e.deliveryLines.value.forEach(r=>{r.value={...r.value,deliveryMethodHandle:n}})},[e.deliveryLines])}function Rg(){const{parts:e}=Ot(),t=uS(e.deliveryLines.peek()),n=x(r=>{e.deliveryLines.value.forEach(o=>{o.value={...o.value,deliveryMethodTypes:r}})},[e.deliveryLines]);return[t,n]}function e7(){const{parts:e}=Ot(),{negotiate:t}=Mt(),{i18n:n}=_(),r=Vc(),o=Qn(),i=Uc();return x(({targetDeliveryMethodType:l,merchandiseStableIds:c})=>{const{orphanedMovedToShipping:u,orphanedRemovedFromCartStableIds:d}=pS({deliveryLines:e.deliveryLines,merchandiseLines:e.merchandiseLines,targetDeliveryMethodType:l,merchandiseStableIds:c,sellableDeliveryMethodsByStableId:o.value.deliveryMethodsByMerchandise,discountLines:e.discountLines});d.length>0?r(n.translate("stock.removed_from_cart_notice")):u&&r(n.translate("split_delivery.items_moved_to_shipping_toast")),i?.dispatch?.("deliveryMethodChanged"),t({include:["deliveryNext","merchandiseLines"]})},[e.deliveryLines,e.merchandiseLines,o,e.discountLines,i,t,r,n])}function qL(){const{deliveryLines:e,deliveryMacros:t}=se(),{negotiate:n}=Mt(),r=Lg({proposedDeliveryLines:e,onlyShippingOneTimePurchase:!0}),o=B(()=>
6{if(t.value?.length)return mS(t.value,r)},[t.value,r]),i=x(async a=>{if(!a||a===o?.id)return;const l=t.value.find(({id:c})=>c===a);if(l)return Ps(e,l.deliveryMethodHandles),n({include:["contactInfo","shippingAddress","merchandiseLines","deliveryNext"]})},[e,t,o,n]);return{selectedMacro:o,setSelectedMacro:i}}function zc(){const{checkout:{identity:e},shopPay:{config:{tracking:t}}}=_(),n=e.current.value==="shopPay",r=t.unique,o=t.visit;return B(()=>{if(n)return typeof window<"u"&&window.ShopPay&&(window.ShopPay.trackingUnique=r,window.ShopPay.trackingVisit=o),{trackingUnique:r,trackingVisit:o}},[r,o,n])}const GL=ft("CheckoutSheetProtocolContext"),$L=ft("MobileCheckoutSdkContext");function Ss(){const e=Ee(GL),t=Ee($L);return e??t??null}function WL(e,t){return e==null||e==="MERCHANT"&&t==="checkout_started"}function Hc(e){const t=Ss();return WL(t?.config?.type,e)}class Eo extends bn{constructor(){super(...arguments),this.name="WebPixelsManagerError"}}class YL extends Error{constructor(){super(...arguments),this.name="WebPixelsManagerCheckoutNativeSdkEnabledError"}}let Ei=null;function jL({storefrontBaseUrl:e,shopId:t,webPixelConfigurations:n,webPixelManagerVersion:r,initData:o,enabledBetaFlags:i=[],surface:a,monorailRegion:l,sriMap:c,managerBaseUrl:u,extensionsUrl:d,apiClientId:p,checkoutToken:m,facebookCapiEnabled:f=!1}){if(Ei)return Ei;const h=parseInt(Be(t),10),g=xA(),y=g==="modern"?"modern":"legacy",v=`${u}/b${r}${y.substring(0,1)}.js`,P=`${d}/cdn/shopifycloud/web-pixels-manager`,b=document.createElement("script");b.setAttribute("async","true"),b.setAttribute("src",v);const C={shopId:h,storefrontBaseUrl:e,extensionsBaseUrl:P,browserTarget:g,surface:a,enabledBetaFlags:JSON.stringify(i),hashVersion:r,publish:"all",...p!=null&&{apiClientId:String(p)},...m&&{checkoutToken:m},...o.customer?.id&&{customerId:o.customer.id},facebookCapiEnabled:String(f)};C.trekkieShim="true";for(const S in C)if(Object.prototype.hasOwnProperty.call(C,S))try{b.dataset[S]=String(C[S])}catch{}const I=c[y];return I&&(b.setAttribute("integrity",I),b.setAttribute("crossorigin","anonymous")),Ei=new Promise((S,k)=>{if(b.onload=()=>{if(KL())return;if(window.webPixelsManager==null||!("init"in window.webPixelsManager)){k(new Eo("WebPixelManager is not available"));return}const T=window.webPixelsManager.init({shopId:h,storefrontBaseUrl:e,extensionsBaseUrl:P,surface:a,webPixelsConfigList:n.map(A=>{const R=A.dataSharingAdjustments&&{dataSharingAdjustments:A.dataSharingAdjustments},L=A.integrityHash&&{integrityHash:A.integrityHash};return{configuration:A.configuration,eventPayloadVersion:A.eventPayloadVersion,id:A.idTmp,runtimeContext:A.runtimeContext,scriptVersion:A.scriptVersion,type:A.type,apiClientId:A.apiClientId,privacyPurposes:A.purposes,name:A.name,capabilities:A.capabilities||[],enabledFlags:A.enabledFlags||[],dataSharingState:A.dataSharingState,...R,...L}}),initData:o,enabledBetaFlags:i,monorailRegion:l});window.Shopify||={},window.Shopify.analytics||={},window.Shopify.analytics.publish=T.publishCustomEvent,window.Shopify.analytics.initialized=!0,S(T)},b.onerror=()=>{k(new Eo(`Failed to load WebPixelManager runtime from ${v}`))},document.querySelector(`script[src="${b.src}"]`))k(new Eo("WebPixelsProvider::WebPixelsManagerError::ScriptAlreadyPresent",{groupingHash:"WebPixelsProvider::WebPixelsManagerError::ScriptAlreadyPresent"}));else try{document.body.appendChild(b)}catch{throw new Eo("WebPixelsProvider::WebPixelsManagerError::ScriptAppendError",{groupingHash:"WebPixelsProvider::WebPixelsManagerError::ScriptAppendError"})}}),Ei}function KL(){return!!window.Shopify?.analytics?.initialized}const xg=ft("webPixels");function JL({children:e}){const{client:t,embed:n,environment:{services:r},checkout:{identity:o},observability:i,shop:a,mobileCheckoutSdk:l,source:c}=_(),u=o.current.value==="shopPay",d=a.hasFlagEnabled(fS),p=FA(),f=Ss()?.config?.pixelEventsMode,h=n?.configuration?.pixelMode,g=!!n?.isCheckoutKit({includeLegacyCsk:!1}),y=f==="DISABLED"||h==="DISABLED",{checkoutProtocolPresentedSignal:v}=xt(),P=v.value,b=g&&n?.isPreload===!0&&!P,C=r.webPixelsManager.url;r.webPixelsManager.type;const I=r.webPixelsManagerExtensions.url,S=V(),k=V(),E=V(!1),[T]=oe(()=>{const M=new Promise((D,N)=>{S.current=D,k.current=N});return M.catch(()=>{}),M}),A={[md]:a.hasFlagEnabled(md),[pd]:a.hasFlagEnabled(pd),[dd]:a.hasFlagEnabled(dd),[ud]:a.hasFlagEnabled(ud),[cd]:a.hasFlagEnabled(cd),[ld]:a.hasFlagEnabled(ld),[ad]:a.hasFlagEnabled(ad),[sd]:a.hasFlagEnabled(sd)},R=Object.entries(A).filter(([M,D])=>
6D).map(([M])=>M),[L]=oe({async publish(M,D,N){try{return(await T).publish(M,D,N)}catch{return!1}},async publishCustomEvent(M,D,N){try{return(await T).publishCustomEvent(M,D,N)}catch{return!1}},async publishDomEvent(M,D,N){try{return(await T).publishDomEvent(M,D,N),{type:"success"}}catch(U){return{type:"error",message:U.message}}},async subscribe(M,D,N){try{return(await T).subscribe(M,D,N)}catch{return()=>!1}},async visitor(M,D){try{return(await T).visitor(M,D),{type:"success"}}catch(N){return{type:"error",message:N.message}}}});return F(()=>{const M=$=>{i.log("web_pixel_manager_init",`WebPixelsProvider init: ${$}`,{outcome:$,shopAppDomain:u},{exportImmediately:$!=="loading"})};if(a.webPixelConfigurations===null)return M("web_pixel_configurations_null");if(!a.storefrontUrl)return M("storefront_url_missing");const D=XL();if(D&&!d)return M("shop_mobile_app_context");const N=u||D;if(a.webPixelManagerVersion==="disabled")return M("wpm_version_disabled");const U=N?[]:a.webPixelConfigurations;if(y){k.current?.(new YL("Checkout SDK enabled for partner with pixels suppressed")),M("pixels_suppressed_by_config");return}if(b||E.current){b&&!E.current&&M("deferred_for_preload");return}if(E.current=!0,M("loading"),typeof PerformanceMark<"u")try{window.performance.mark("wpm:start")}catch{}const z=l.variant.isStandard(),O=!n?.isFlagshipPartner&&!!n?.isCheckoutSheetKit,ne=RA({shopAppDomain:u,isNativeShopApp:D,isCheckoutKit:g,isSdkSurface:z||O});try{const $=a.storefrontUrl,J=jL({storefrontBaseUrl:$,shopId:a.id,webPixelConfigurations:U,webPixelManagerVersion:a.webPixelManagerVersion,initData:p,enabledBetaFlags:R,surface:ne,sriMap:a.webPixelsManagerSriMap,managerBaseUrl:C,extensionsUrl:I,apiClientId:t.unstable_getSerialization("apiClientId")??void 0,checkoutToken:si(c)||c.sourceId,facebookCapiEnabled:a.facebookCapiEnabled??!1});let ee=!0;J.then(te=>{if(S.current)S.current(te);else throw k.current?.(),new Eo("WebPixelsManager: webPixelsPromiseResolveRef.current is undefined")}).catch(te=>{ee=!1,i.log("web_pixels_context_manager_load_error_triggered",`WebPixelsProvider::WebPixelsManagerError::LoadError with error: ${te?.message}`)}).finally(()=>{i.counter({name:"web_pixel_manager_load",value:1,attributes:{status:ee?"success":"failed",surface:ne}})})}catch($){k.current?.($),i.counter({name:"web_pixel_manager_load",value:1,attributes:{status:"failed",surface:ne}})}},[b]),s(xg.Provider,{value:L,children:e})}function XL(){return!!hS(navigator.userAgent)}function Mg(){return Ut(xg)}const QL=6167201,ZL=12875497473,Qd=new Map([[QL,"hydrogen"],[ZL,"headless"],[88312,"buy_button"],[1354745,"draft_order"]]);function Ki(e,t,n){const r=new Set([129785,6517121,757165]),o=new Set([3890849,3850711,5198245]),i=580111;return Qd.has(e)?Qd.get(e):r.has(e)?"retail":o.has(e)?"shop_app":t===Po.CartPermalink?"permalink":e===i?"online_store":n}function Ng(){return window?.ShopifyAnalytics?.lib?.trekkie?.defaultAttributes}function Dg({eventName:e,checkoutType:t,walletName:n,progressionStepName:r,redirectSource:o,trackingUnique:i,trackingVisit:a}){const{client:l,checkout:c,consentManager:u,i18n:d,observability:p,userEvents:m,shop:f,source:h}=_(),{id:g}=f,y=H().buyerIdentity.value?.customerProfile,v=Hc(e),b=Ss()?.config?.type,C=parseInt(Be(g),10),I=l.unstable_getSerialization("apiClientId")??0,S=i??(l.cookies.get("_shopify_y")||void 0),k=a??(l.cookies.get("_shopify_s")||void 0);return x(()=>{const E=u.analyticsProcessingAllowed.value,T=u.marketingAllowed.value,A=!!(E||T),R={eventName:e,buyerConsentAnalyticsAllowed:E,buyerConsentMarketingAllowed:T,progressionStepName:r,userToken:S,walletName:n};if(!((e==="checkout_started"&&n==="ShopifyPay"||A)&&v)){p.counter({name:"checkout_lifecycle_events_blocked_by_privacy",value:1,attributes:{eventName:e,application:"checkout-web"}}),p.log("checkout_lifecycle_events_not_emitting_event","checkout_lifecycle_events.not_emitting_event",{logPayload:R});return}const M=r==="contact_information"?1:void 0,D=Og(h.type),N=D?h.sourceId:void 0,U=c.configuration.profileId.value,z=e0({eventName:e,walletName:n,shopId:C,checkoutSessionIdentifier:h.checkoutSessionIdentifier,checkoutProfileId:U?parseInt(Be(U),10):void 0,trackingVisitToken:k,userToken:S,sourceId:N,sourceType:D,customerId:y?.id?parseInt(Be(y.id),10):void 0,apiClientId:I,checkoutType:t,currency:d.currency,locale:d.locale,progressionStepName:r,progressionStepNumber:M,redirectSource:o,checkoutProtocolType:b,consentManager:u}),O=z.payload.entryPoint;p.log("checkout_lifecycle_events_emitting_event","checkout_lifecycle_events.emitting_event",{...R,progressionStepNumber:M,"context.sourceType":h.type,"context.sourceId":h.sourceId,checkoutType:t,entryPoint:O}),m.monorailEvent(z),p.counter({name:"checkout_lifecycle_events_emitted",value:1,attributes:{application:"checkout-web",eventName:e,checkoutType:h.type,isWallet:n?"true":"false",...n?{walletName:n}:{}}})},[e,r,S,n,C,h,c.configuration.profileId,k,y?.id,I,t,d,o,p,m,v,b,u])}function e0({eventName:e,walletName:t,shopId:n,checkoutSessionIdentifier:r="default",checkoutProfileId:o,trackingVisitToken:i,userToken:a,sourceId:l,sourceType:c,customerId:u,apiClientId:d=0,checkoutType:p,currency:m,locale:f,progressionStepName:h,progressionStepNumber:g,redirectSource:y=void 0,checkoutProtocolType:v,consentManager:P}){const b=Ng(),C=v==="MERCHANT"?{apiName:"mobile_checkout_sdk_merchant",checkoutType:Ki(d,y,"api")}:{};return{schemaId:"checkout_lifecycle_events/7.7",payload:{checkoutChainToken:r||"default",checkoutProfileId:o,eventName:e,checkoutType:Ki(d,y),checkoutExperience:t?"wallet":"web",entryPoint:"checkout",checkoutPlatform:"checkout_one",checkoutVersion:[p],walletName:t,apiClientId:d||0,currency:m||b?.currency,shopId:n,customerId:u,sourceId:l,sourceType:c,userToken:a||b?.uniqToken,deprecatedVisitToken:i||b?.visitToken,referrer:b?.referer,userAgent:navigator.userAgent,contentLanguage:f,eventTime:new Date().toISOString(),progressionStepName:h,progressionStepNumber:g,buyerConsentAnalyticsAllowed:P.analyticsProcessingAllowed.value,buyerConsentSaleOfDataAllowed:P.saleOfDataAllowed.value,buyerConsentMarketingAllowed:P.marketingAllowed.value,...C}}}function Og(e){const t={orderEdit:"order",paymentCollection:"paymentCollection",cartNext:"cart",checkout:"checkout",abandonedCart:"abandoned_cart",simulated:"simulated",draftOrder:"draft_order",buyItNow:void 0,shopPayExternal:void 0,other:void 0};return Object.keys(t).includes(e)?t[e]:void 0}function t7(e){const n=_().checkout.configuration.layout.isOnePage.value?"one_page":"three_page";return Dg({eventName:"checkout_progression",checkoutType:n,walletName:e,progressionStepName:"contact_information"})}function n7(e,t,n,r){const i=_().checkout.configuration.layout.isOnePage.value?"one_page":"three_page";return Dg({eventName:"checkout_started",checkoutType:i,walletName:e,redirectSource:t,trackingUnique:n,trackingVisit:r})}var _l=(e=>(e.Lifecycle="checkout_lifecycle_events/7.7",e))(_l||{});class t0{constructor({observability:t,userEvents:n,shopPay:r,isShopPayActive:o,router:i,consentManager:a,shouldEmitEvent:l=!0,context:c,target:u}){this.acceptableEventType=new Set(["pageViewed","sectionComplete","shippingMethodsFilled","sectionInteraction","dom_clicked"]),this.#c=!0,this.#e=t,this.#t=n,this.#r=r,this.#i=o,this.#a=i,this.#l=a,this.#c=l,this.#n=c,this.#s=u}#e;#t;#r;#i;#a;#l;#c;#n;#s;willAccept(t){return this.acceptableEventType.has(t.type)}transmit(t){if(!this.#c||!this.#f(t)){this.#e.counter({name:"checkout_lifecycle_events_blocked_by_privacy",value:1,attributes:{eventName:"checkout_progression",application:"checkout-web"}}),this.#u(!1);return}const n=this.#m(t);n&&n.progressionStepName!==void 0&&n.progressionStepNumber!==void 0&&(this.#u(!0,n),this.#t.monorailEvent({schemaId:_l.Lifecycle,payload:n}),this.#e.counter({name:"checkout_lifecycle_events_emitted",value:1,attributes:{application:"checkout-web",eventName:"checkout_progression",checkoutType:n.checkoutType,isWallet:n.walletName?"true":"false",...n.walletName?{walletName:n.walletName}:{}}}))}transmitImmediately(t){if(!this.#c||!this.#f(t)){this.#e.counter({name:"checkout_lifecycle_events_blocked_by_privacy",value:1,attributes:{eventName:"checkout_progression",application:"checkout-web"}}),this.#u(!1);return}const n=this.#m(t);n&&n.progressionStepName!==void 0&&n.progressionStepNumber!==void 0&&(this.#u(!0,n),this.#t.monorailEvent({schemaId:_l.Lifecycle,payload:n},{exportImmediately:!0}),this.#e.counter({name:"checkout_lifecycle_events_emitted",value:1,attributes:{application:"checkout-web",eventName:"checkout_progression",checkoutType:n.checkoutType,isWallet:n.walletName?"true":"false",...n.walletName?{walletName:n.walletName}:{}}}))}#m(t){const{context:n,type:r}=t;this.#n=n,this.#s=Hl(this.#y(n),{isShopPayActive:this.#i,shopPay:this.#r});const o=this.#v(t.timestamp);if(!o)return null;
6if(this.#h()){if(r==="pageViewed"){if(this.#E()){const[i,a]=this.#o("contact");return{...o,progressionStepName:i,progressionStepNumber:a}}if(this.#P()){const[i,a]=this.#o("review");return{...o,progressionStepName:i,progressionStepNumber:a}}}if(r==="shippingMethodsFilled"){const[i,a]=this.#o("shipping");return{...o,progressionStepName:i,progressionStepNumber:a,...this.#g()}}if(r==="sectionInteraction"&&t.section==="payment"){const[i,a]=this.#o("payment");return{...o,progressionStepName:i,progressionStepNumber:a}}if(r==="dom_clicked"){if(t.element.id==="summary_pay_button")if(this.#n.reviewPageRequired){const[i,a]=this.#o("review_order_clicked");return{...o,progressionStepName:i,progressionStepNumber:a}}else{const[i,a]=this.#o("pay_now_clicked");return{...o,progressionStepName:i,progressionStepNumber:a}}if(t.element.id==="review_pay_button"){const[i,a]=this.#o("pay_now_clicked");return{...o,progressionStepName:i,progressionStepNumber:a}}}}if(this.#b()){if(r==="pageViewed"&&this.#S()){const[i,a]=this.#o(this.#n.step);return{...o,progressionStepName:i,progressionStepNumber:a,...i==="shipping"?this.#g():{}}}if(r==="dom_clicked"){if(t.element.id==="payment_go_to_next_step"){const[i,a]=this.#o(this.#n.reviewPageRequired?"review_order_clicked":"pay_now_clicked");return{...o,progressionStepName:i,progressionStepNumber:a}}if(t.element.id==="review_go_to_next_step"){const[i,a]=this.#o("pay_now_clicked");return{...o,progressionStepName:i,progressionStepNumber:a}}}}return null}#y(t){const n=this.#a.currentUrl.value;return t.pathname?new URL(t.pathname,n):n}#v(t){if(!this.#n)return null;const n=Og(this.#n.sourceType),r=n?this.#n.sourceId:void 0;return{userToken:this.#n.userToken,apiClientId:this.#n.apiClientId,sourceId:r,sourceType:n,currency:this.#n.currency,shopId:parseInt(Be(this.#n.shopId),10),checkoutChainToken:this.#n.checkoutToken,checkoutProfileId:this.#n.checkoutProfileId,checkoutExperience:"web",checkoutPlatform:"checkout_one",eventName:"checkout_progression",deprecatedVisitToken:this.#n.trackingVisit,requestId:this.#n.requestId,checkoutVersion:[this.#h()?"one_page":"three_page",this.#n.workerVersion,this.#n.serverHandling],checkoutType:Ki(this.#n.apiClientId),entryPoint:void 0,eventTime:t.toISOString(),buyerConsentAnalyticsAllowed:this.#d(),buyerConsentSaleOfDataAllowed:this.#_(),buyerConsentMarketingAllowed:this.#p()}}#f(t){const n=t.context.consent;return n?SA(n):!!(this.#d()||this.#p())}#d(){return this.#l.analyticsProcessingAllowed.value}#_(){return this.#l.saleOfDataAllowed.value}#p(){return this.#l.marketingAllowed.value}#o(t){const{shippingRequired:n,reviewPageRequired:r}=this.#n||{};let o=2;n&&(o=3);let i=o+1;r&&(i=o+3);const a=o+1;switch(t){case"information":case"contact":case"deliveryAddress":return["contact_information",1];case"shipping":case"delivery":return["shipping",2];case"payment":return["payment",o];case"pay_now_clicked":return["pay_now_clicked",i];case"review_order_clicked":return["review_order_clicked",a];case"review":return["review",n?5:4];default:return[void 0,void 0]}}#h(){return this.#n?.sourceDesign==="c1_redesign"}#b(){return this.#n?.sourceDesign==="c1_legacy"}#P(){return this.#s&&/review/.test(this.#s)}#S(){return["information","shipping","payment","review"].some(t=>this.#s&&new RegExp(t).test(this.#s))}#E(){return this.#s&&/information/.test(this.#s)}#g(){return this.#n?{shippingMacroCostLocal:String(this.#n.selectedDeliveryMacro?.cost?.amount),shippingMacroList:this.#n.deliveryMacros?.map(({id:t})=>t),numDeliveryLines:[this.#n.deliveryLines?.filter(({type:t})=>t==="ONE_TIME_PURCHASE").length||0,this.#n.deliveryLines?.filter(({type:t})=>t==="SUBSCRIPTION").length||0],shippingMacroSelected:this.#n?.selectedDeliveryMacro?.id}:{}}#u(t,n){const r={buyerConsentAnalyticsAllowed:this.#d(),buyerConsentMarketingAllowed:this.#p()};if(!t||!n){this.#e.log("buyer_progression_events_adapter_event_not_transmitted","Not emitting checkout lifecycle event",r);return}this.#e.log("buyer_progression_events_adapter_event_transmitted","Emitting checkout lifecycle event",{...r,progressionStepName:n.progressionStepName,progressionStepNumber:n.progressionStepNumber,userToken:n.userToken,"context.sourceType":this.#n?.sourceType,"context.sourceId":this.#n?.sourceId,"context.apiClientId":this.#n?.apiClientId})}}const Fg=1;
6class Bg extends Error{constructor(t){super(`Unknown event type: ${t}`),this.name="UnknownEventTypeError"}}function pi(e){return{shopId:Be(e.shopId),checkoutToken:e.checkoutSessionIdentifier?Be(e.checkoutSessionIdentifier):void 0,customerId:e.customerId?Be(e.customerId):void 0}}function n0(e,t){switch(e.type){case"UI_EXTENSION_ERROR":return r0(e,t);case"UI_EXTENSION_MOUNT_START":case"UI_EXTENSION_MOUNT_END":return o0(e,t);case"UI_EXTENSION_FETCH":return i0(e,t);default:{const n=e;throw new Bg(n.type)}}}function r0(e,t){const n=os(e.extensionTarget);return{event:{eventTypeName:e.eventTypeName,type:e.type,apiVersion:e.apiVersion,appId:Be(e.appId),appApiKey:e.appApiKey,appVersion:e.appVersion,code:e.code,errorName:e.errorName,extensionId:e.extensionId?Be(e.extensionId):void 0,registrationId:e.registrationId,message:e.message,schemaVersion:e.schemaVersion,extensionTarget:n,placementReference:e.placementReference,context:e.context},context:pi(t),__brand:"PreparedEventRefineryPayload"}}function o0(e,t){const n=os(e.extensionTarget);
6return{event:{...e,appId:Be(e.appId),extensionId:e.extensionId?Be(e.extensionId):void 0,extensionTarget:n},context:pi(t),__brand:"PreparedEventRefineryPayload"}}function i0(e,t){const n=os(e.extensionTarget);return{event:{eventTypeName:e.eventTypeName,type:e.type,apiVersion:e.apiVersion,appId:Be(e.appId),appApiKey:e.appApiKey,appVersion:e.appVersion,extensionId:e.extensionId?Be(e.extensionId):void 0,registrationId:e.registrationId,extensionTarget:n,placementReference:e.placementReference,durationMs:e.durationMs,httpStatus:e.httpStatus,httpMethod:e.httpMethod,requestUrl:e.requestUrl,context:e.context},context:pi(t),__brand:"PreparedEventRefineryPayload"}}function s0(e,t){return{event:{eventTypeName:e.eventTypeName,type:e.type,checkoutToken:e.checkoutToken},context:pi(t),__brand:"PreparedEventRefineryPayload"}}function a0(e,t){return{event:e,context:pi(t),__brand:"PreparedEventRefineryPayload"}}function qc(e,t){try{switch(e.eventTypeName){case"shopify.apps.app_runtime.AppRuntimeClientEvent":return n0(e,t);case"shopify.event.BuyerEvent":return s0(e,t);case"shopify.advertising.incentives.IncentivePresentedEvent":return a0(e,t);default:{const n=e;throw new Bg(n.eventTypeName)}}}catch(n){return{__brand:"PreparedEventRefineryPayload",error:n}}}class l0{constructor(t){this.acceptableEventTypes=new Set(["alertDisplayed","uiExtensionError"]),this.#e=t.userEvents,this.#t=t.source}#e;#t;willAccept(t){return this.acceptableEventTypes.has(t.type)}transmit(t){const{context:n}=t,r=si(this.#t),o=parseInt(Be(n.shopId),10),i={pageUrl:n.href??window.location.href,shopId:o,checkoutToken:r?Be(r):"",eventName:t.type,userToken:n.userToken};if(t.type==="alertDisplayed"){const{target:a,value:l,errorType:c,message:u}=t;this.#e.monorailEvent({schemaId:"checkout_error_capture/1.0",payload:{...i,errorTarget:a,errorValue:l??void 0,errorType:c,errorMessage:u}})}if(t.type==="uiExtensionError"){const{apiVersion:a,appId:l,appName:c,appVersion:u,extensionName:d,placementReference:p,extensionTarget:m,trace:f,code:h,message:g}=t;this.#e.monorailEvent({schemaId:"checkout_error_capture/1.0",payload:{...i,extensionApiVersion:a,extensionAppId:l,extensionAppName:c??"",extensionAppVersion:u,extensionName:d,extensionPlacementReference:p??"",errorTarget:m,errorTrace:f??"",errorType:h,errorMessage:g}}),t.extensionType!=="local"&&this.#e.refineryEvent(qc({...t.placementReference===void 0?{extensionTarget:t.extensionTarget,placementReference:void 0}:{extensionTarget:t.extensionTarget,placementReference:t.placementReference},eventTypeName:"shopify.apps.app_runtime.AppRuntimeClientEvent",type:"UI_EXTENSION_ERROR",apiVersion:t.apiVersion,appId:t.appId,appApiKey:t.appApiKey,appVersion:t.appVersion,code:t.code,errorName:t.errorName,extensionId:t.extensionId,registrationId:t.registrationId,message:t.message,schemaVersion:Fg,context:t.context},{shopId:n.shopId,checkoutSessionIdentifier:r,customerId:n.customerId}))}}}const Zd="checkout_c1_extension_skeleton_dimensions/3.4";class c0{constructor(t,n,r=!0){this.client=t,this.userEvents=n,this.shouldEmitEvent=r}transmit(t){this.shouldEmitEvent&&t.type==="extensionDimension"&&(this.userEvents.monorailEvent({schemaId:Zd,payload:this.mapEventToMonorailSchema(t)}),this.client.counter({name:"extension_dimension_event",value:1,attributes:{skeleton_size:t.skeletonSize,extension_size:t.extensionSize,skeleton_size_source:t.skeletonSizeSource,skeleton_size_match:t.skeletonSizeMatch,extension_type:t.extension.type}}))}willAccept(t){return t.type==="extensionDimension"}transmitImmediately(t){this.shouldEmitEvent&&t.type==="extensionDimension"&&(this.userEvents.monorailEvent({schemaId:Zd,payload:this.mapEventToMonorailSchema(t)},{exportImmediately:!0}),this.client.counter({name:"extension_dimension_event",value:1,attributes:{skeleton_size:t.skeletonSize,extension_size:t.extensionSize,skeleton_size_source:t.skeletonSizeSource,skeleton_size_match:t.skeletonSizeMatch,extension_type:t.extension.type}}))}mapEventToMonorailSchema(t){const{context:n,extension:r}=t;return{userToken:n.userToken,customerId:n.customerId,shopId:parseInt(Be(n.shopId),10),sessionToken:n.sessionToken,checkoutToken:n.
6checkoutToken,apiClientId:n.apiClientId,deviceType:n.deviceType,locale:n.locale,currency:n.currency,browser:n.browser,browserConnectionType:n.browserConnectionType,extensionInstanceId:t.extensionInstanceId,step:t.page,pageLoadId:n.pageLoadId,extensionId:r.extensionId,extensionApiClientId:r.appId,extensionRegistrationId:r.registrationId,extensionType:r.type,extensionPoint:r.extensionPoint.target,extensionPlacementReference:r.placementReference,extensionWidth:t.width,extensionHeight:t.height,viewportWidth:t.viewportWidth,viewportHeight:t.viewportHeight,extensionPositionX:t.positionX,extensionPositionY:t.positionY,publicIdentifier:t.targetPublicIdentifier||t.publicIdentifier,targetPublicIdentifier:t.targetPublicIdentifier,skeletonHeight:t.skeletonHeight,countryCode:t.countryCode,configurationRecordId:n.checkoutProfileId}}}const u0=new Set(["941ed414-846b-48da-ba78-f015038d42a1","b837b75c-d827-4a16-9fe6-0b556bbbcfa2","bead5f8a-a991-4378-8ac3-b757353d3423","3caac7fb-9307-42ea-ad62-5bddbc7fb6c9","800c1727-ae5b-4f7d-be6c-502933f9257d","2382db67-d84b-4c12-a2a7-2ae97e93f8aa","22d72ba7-bed0-4301-9eb1-50b47b797d65","9b1870d3-fdc9-4b48-9143-2dc2715e5f48","62ea86bc-927b-492c-a434-af86abdffa37","df2e3eb6-8403-4239-a060-586ad8e84c4c","9ad836e8-e0d7-41c9-b46e-323373cad94f","cd33b11c-1347-4482-9468-35d3c2466ece","a5f4f09b-f177-41c6-b9f2-4c5af0a06756","742df6b1-ec95-47f4-9bab-c39cff66fa64","580e5211-39d7-4f9b-9feb-61966d75d7d6","90d86972-4f99-40aa-a733-81fb169e125a"]),Gc=new Set([...u0,"de6f8c7c-99d4-4ed7-bef3-9bc5485e5afa","81ef0db5-f008-4775-abf0-9eea53e348b9","5a4dcc13-5e28-43d3-8fe0-9047c8b1e9a1","36d82657-0623-44a6-a765-ca8ca2bb1d70","68757a68-0d13-43c7-9d92-389fa35ceae9","fe246ebb-49e3-49f6-bf7b-62a1bfd3fd0c","c2efdc0e-0538-4111-ba60-c300fce86c62","756d9412-1da6-41a5-b317-f590511ead72","cb60c3d0-6406-4e9c-9558-b5088a3f8610","7aaf94fa-1c49-48eb-ad72-32c7d9a3c1da","3f51fa85-5bda-4dbb-bd3a-15711c90bff2","1b8ddc3b-7fb7-46c7-aa56-c5b359d5005c","6cff6580-7b31-4bf4-86de-daea0d733c8d","b6873cb2-1546-469d-921b-f64ecbd95548","4ded2224-9d1e-4861-8c10-bee777c11f7c","d65d9a59-47d0-4bde-a637-4d2df8354d1c","2b415f2a-38a2-4bb1-8df6-509443baef72","1d0d6217-e99f-4c5a-b0c0-f0a0acb29072","f2f6b43a-dc2b-4583-b5df-1023da235bde","7437505c-bad7-4735-977b-c32c56e7a92d","d20aee3b-4068-409d-ad66-88032bd6ee0f","ad9dbcd5-9772-48cc-a914-8a672640661a","86c7aec0-d984-4bdd-b30d-73068c7de1a2","7dd5c930-e1a5-49d7-a9cd-6aa012abd302","d6796644-c5fa-4454-8043-e927276c22f6","3a5daf6a-54b6-40f9-a665-d95de608415b","9b2c4a74-34c5-4394-b13c-74d689e45675","1a828591-4b2f-4784-adf7-c314917c8eb9","c602fcb4-51ba-4524-a0a7-55288b7f810a","baed0a29-534e-4f7f-8123-c72e0ef0a0bd","b64f0497-e450-453a-898f-6e3181fadaed","4aea3abe-18e4-4902-a9e8-241f92c98e4b","b1a20474-31b5-496c-93d9-856734fe321a","d00e75dc-b367-40f9-a37a-95a89a875e9f","6200a1a6-b4a0-4d2b-9733-ab7cccf2aa59","e7e403b2-970f-4341-9ed0-f10f54fc1f33","54aedcf6-a0a7-4ccf-8572-bbbfe9230037","db5704ac-aa91-4fd8-9fae-0e80b98f0882","b471b42d-8e9a-457f-a3c0-88d8e479bb8d","dc14e7f0-c251-4287-ae5e-d6e9f88f3b23","35563e44-df53-4ac0-8562-3710c5f82d8b","506f9167-3a90-463a-a58d-558988306e6b","a6a1267a-f3dc-425b-990b-811748126dc1","b69beea0-269d-4448-84b9-d99e5c05e833","c44a7a57-1140-4fc4-aa9a-8058f665287c","319648e8-8032-48a2-ac6e-ce2f58f8a553","df4e106f-4b61-4585-b3eb-5a53dd01d89e","2f3f3eea-fc1f-4dd7-8f34-26bd31d5163f","12d50b8f-7ef5-4eac-b347-561b9bacd485","e1e4907d-6174-4760-a073-761a6eab7baf"]);class d0{#e;#t;#r;constructor(t){this.#e=t.observability,this.#t=t.userEvents,this.#r=t.source}willAccept(t){return t.type==="extensionFetchCall"}transmit(t){if(!this.willAccept(t))return;const n=t,r=this.#i(n.httpStatus),o="registrationId"in n.extension?n.extension.registrationId:void 0,i=o!=null&&Gc.has(o),a={destination:n.destination,isHighValueExtension:i,...r&&{http_status_bucket:r},...n.errorType&&{error_type:n.errorType}},l=n.duration??0,c="ms";if(this.#e.histogram({name:"extension_fetch_call_duration",value:l,unit:c,attributes:a}),i&&"type"in n.extension&&"registrationId"in n.extension&&(n.extension.type==="persisted"||n.extension.type==="global")&&this.#e.log("extension_fetch_call_duration","Extension fetch call duration",{value:l,unit:c,appI
6d:n.extension.appId,extensionRegistrationId:n.extension.registrationId,...a}),n.extension.type!=="local"&&n.destination!=="storefront"){const u=si(this.#r);this.#t.refineryEvent(qc({eventTypeName:"shopify.apps.app_runtime.AppRuntimeClientEvent",type:"UI_EXTENSION_FETCH",apiVersion:n.extension.apiVersion,appId:n.extension.appId,appApiKey:n.extension.appApiKey,appVersion:n.extension.version,extensionId:n.extension.extensionId,registrationId:n.extension.registrationId,extensionTarget:n.extension.extensionPoint.target,placementReference:n.extension.placementReference,durationMs:n.duration,httpStatus:n.httpStatus,httpMethod:n.httpMethod,requestUrl:n.requestUrl,context:n.context},{shopId:n.context.shopId,checkoutSessionIdentifier:u,customerId:n.context.customerId}))}}transmitImmediately(t){this.transmit(t)}#i(t){if(t!==void 0)return String(Math.floor(t/100)*100)}}class p0{#e;#t;constructor(t){this.#e=t.source,this.#t=t.userEvents}willAccept(t){if(t.type!=="extensionLifecycle")return!1;const{extension:n,phase:r}=t;return(r==="mountStart"||r==="mountSuccess"||r==="mountError")&&n!=null}transmit(t){if(!this.willAccept(t))return;const{extension:n,mountId:r}=t,o=si(this.#e),a={...n.placementReference===void 0?{extensionTarget:n.extensionPoint.target,placementReference:void 0}:{extensionTarget:n.extensionPoint.target,placementReference:n.placementReference},eventTypeName:"shopify.apps.app_runtime.AppRuntimeClientEvent",apiVersion:n.apiVersion,appId:n.appId,appApiKey:n.appApiKey,appVersion:n.version,extensionId:n.extensionId,mountId:r,registrationId:n.registrationId,schemaVersion:Fg,context:t.context};let l;t.phase==="mountStart"?l={...a,type:"UI_EXTENSION_MOUNT_START"}:l={...a,type:"UI_EXTENSION_MOUNT_END",durationMs:t.duration??0,...t.error?.name&&{failureErrorName:t.error.name},mountOutcome:t.phase==="mountSuccess"?"SUCCESS":m0(t.error)},this.#t.refineryEvent(qc(l,{shopId:t.context.shopId,checkoutSessionIdentifier:o,customerId:t.context.customerId}))}}function m0(e){return e?.name&&Pf(e.name)?"APP_FAILURE":"OTHER_FAILURE"}function bl(e){return`${Vg(e)}:::${e.message}`}function Es(e){return Vg(e)}function Vg(e){return e.cause&&typeof e.cause=="object"&&"code"in e.cause?`${e.name}::${e.cause.code}`:e.cause&&typeof e.cause=="object"&&"name"in e.cause?`${e.name}::${e.cause.name}`:e.name}const f0=["buyerUsable","timeToFirstMeaningfulCheckoutInteraction","apiObjectEnd","apiRead","appMetafieldsLoadEnd","sandboxIframeLoadEnd","postPurchaseIframeLoadEnd","sandboxJsFetchEnd","sandboxJsFetchPostPurchaseEnd","sandboxJsFetch2023_04End","sandboxJsFetch2025_07End","sandboxPolyfillFetchEnd","sandboxJsEvalEnd","sandboxJsEval2025_07End","sandboxJsEval2023_04End","partnerJsFetchEnd","partnerJsEvalEnd","executionEnd","partnerJsExecEnd","skeletonEnd","timeToSettleEnd"],h0={updateAttribute:"updateAttribute",removeAttribute:"removeAttribute",addCartLine:"addCartLine",updateCartLine:"updateCartLine",removeCartLine:"removeCartLine",addDiscountCode:"addDiscountCode",removeDiscountCode:"removeDiscountCode",addGiftCard:"addGiftCard",removeGiftCard:"removeGiftCard",updateMetafield:"updateMetafield",removeMetafield:"removeMetafield",updateCartMetafield:"updateCartMetafield",removeCartMetafield:"removeCartMetafield",updateNote:"updateNote",removeNote:"removeNote",updateShippingAddress:"updateShippingAddress",updatePaymentMethodAttributes:"updatePaymentMethodAttributes",redeemableAddChange:"redeemableAddChange",changeVisitorConsent:"changeVisitorConsent"},g0=Object.values(h0),y0=["buyerJourneyInterceptor","storefrontApiTokenRefresh","getSessionToken","getSessionTokenError","getSessionTokenCached","storefrontApiQueryStart","storefrontApiQuerySuccess","storefrontApiQueryError","storefrontResponseParseError",...g0.flatMap(e=>[`${e}Start`,`${e}Success`,`${e}Error`]),"marketDriverChangeShippingAddressCountryCode","unknownChangeStart","unknownChangeSuccess","unknownChangeError"],v0=["cart","cart.billingAddress.address1","cart.billingAddress.address2","cart.billingAddress.city","cart.billingAddress.company","cart.billingAddress.countryCode","cart.billingAddress.district","cart.billingAddress.firstName","cart.billingAddress.lastName","cart.billingAddress.line2","cart.billingAddress.neighborhood","cart.billingAddress.phone","cart.billingAddress.provinceCode","cart.billingAddress.streetName","cart.billingAddress.streetNumber","cart.billingAddress.subdistrict","cart.billingAddress.zip","cart.buyerIdentity","cart.buyerIdentity.email","cart.buyerIdentity.phone","cart.deliveryGroups[0].deliveryAddress","cart.deliveryGroups[0].deliveryAddress.address","cart.deliveryGroups[0].deliveryAddress.address1","cart.deliveryGroups[0].deliveryAddress.address2","cart.deliveryGroups[0].deliveryAddress.city","cart.deliveryGroups[0].deliveryAddress.company","cart.deliveryGroups[0].deliveryAddress.countryCode","cart.deliveryGroups[0].deliveryAddress.district","cart.deliveryGroups[0].deliveryAddress.firstName","cart.deliveryGroups[0].deliveryAddress.lastName","cart.deliveryGroups[0].deliveryAddress.line2","cart.deliveryGroups[0].deliveryAddress.neighborhood","cart.deliveryGroups[0].deliveryAddress.phone","cart.deliveryGroups[0].deliveryAddress.provinceCode","cart.deliveryGroups[0].deliveryAddress.streetName","cart.deliveryGroups[0].deliveryAddress.streetNumber","cart.deliveryGroups[0].deliveryAddress.subdistrict","cart.deliveryGroups[0].deliveryAddress.zip","cart.discountCode","cart.paymentLines[0]","cart.paymentLines[0].billingAddress","cart.paymentLines[0].billingAddress.address1","cart.paymentLines[0].billingAddress.address2","cart.paymentLines[0].billingAddress.city","cart.paymentLines[0].billingAddress.company","cart.paymentLines[0].billingAddress.countryCode","cart.paymentLines[0].billingAddress.district","cart.paymentLines[0].billingAddress.firstName","cart.paymentLines[0].billingAddress.lastName","cart.paymentLines[0].billingAddress.line2","cart.paymentLines[0].billingAddress.neighborhood","cart.paymentLines[0].billingAddress.phone","cart.paymentLines[0].billingAddress.provinceCode","cart.paymentLines[0].billingAddress.streetName","cart.paymentLines[0].billingAddress.streetNumber","cart.paymentLines[0].billingAddress.subdistrict","cart.paymentLines[0].billingAddress.zip","cart.paymentLines[0].card","cart.paymentLines[0].card.expiry","cart.paymentLines[0].card.issueDate","cart.paymentLines[0].card.issueNumber","cart.paymentLines[0].card.name","cart.paymentLines[0].card.number","cart.paymentLines[0].card.verificationValue","cart.poNumber","order.deliveryUpdates","order.deliveryUpdates.email"];class _0{constructor(){this.type="extensionBuyerJourneyBlock"}map(t){if(t.type!==this.type)return;const n=t.extension.registrationId;
6return{type:"counter",name:"extension_buyer_journey_block_event",value:1,attributes:{isHighValueExtension:n!=null&&Gc.has(n)}}}}class b0{constructor(){this.type="extensionInteraction"}map(t){if(t.type!==this.type)return;let n=t.interaction;y0.includes(n)||(n="unknownEvent");const r=t.error?Es(t.error):void 0;return t.duration==null?{type:"counter",name:"extension_interaction_count_event",value:1,attributes:{event_name:n,validation_error:r}}:{type:"histogram",name:"extension_interaction_distribution_event",value:t.duration,attributes:{event_name:n,validation_error:r}}}}class P0{constructor(){this.type="extensionLifecycle"}map(t){if(t.type!==this.type||f0.includes(t.phase))return;const n=t.extension?.registrationId,r={step:t.phase,checkoutType:Ki(t.context.apiClientId),isRemoteDom:t.extension?.apiVersion?mA(t.extension?.apiVersion):!1,isHighValueExtension:n!=null&&Gc.has(n)};if(t.error!==void 0&&(r.error=Es(t.error)),t.duration==null)return{type:"counter",name:"extension_lifecycle_count_event",value:1,attributes:r};if(t.duration!=null)return{type:"histogram",name:"extension_lifecycle_distribution_event",value:t.duration,attributes:r}}}class S0{constructor(t){this.client=t}#e=new Map([new _0,new b0,new P0].map(t=>[t.type,t]));willAccept(t){return this.#e.has(t.type)}transmit(t){const n=this.#t(t);if(!n)return;const{name:r,value:o,attributes:i,unit:a,type:l}=n;switch(l){case"histogram":this.client.histogram({name:r,value:o,attributes:i,unit:a});break;case"gauge":this.client.gauge({name:r,value:o,attributes:i,unit:a});break;case"counter":this.client.counter({name:r,value:o,attributes:i,unit:a});break}}transmitImmediately(t){this.transmit(t)}#t(t){return this.#e.get(t.type)?.map(t)}}var Pl=(e=>(e.InteractionAndImpression="checkout_c1_interaction_and_impression_events/2.25",e))(Pl||{});function Ci(e){return E0(e).replace(/\W+/g," ").split(/ |\B(?=[A-Z])/).map(t=>t.toLowerCase()).join("_")}function E0(e){return e.replace(/([a-z])([A-Z]+)/g,(t,n,r)=>`${n} ${r}`).replace(/([A-Z])([A-Z]+)([^a-zA-Z0-9]*)$/,(t,n,r,o)=>n+r.toLowerCase()+o).replace(/([A-Z]+)([A-Z][a-z])/g,(t,n,r)=>`${n.toLowerCase()} ${r}`)}class C0{constructor(t,n=!0){this.client=t,this.shouldEmitEvent=n,this.acceptableEventType=new Set(["extensionLifecycle","extensionInteraction","extensionUiInteraction","extensionBuyerJourneyBlock","extensionFetchCall","click","change","inventoryPriceChange","autofill","impression","moreShippingOptions","deliveryMacroInteraction","splitShipAndPickupIntent"])}willAccept(t){return this.acceptableEventType.has(t.type)}transmit(t){this.shouldEmitEvent&&this.client.monorailEvent({schemaId:Pl.InteractionAndImpression,payload:this.mapEventToMonorailSchema(t)})}transmitImmediately(t){this.shouldEmitEvent&&this.client.monorailEvent({schemaId:Pl.InteractionAndImpression,payload:this.mapEventToMonorailSchema(t)},{exportImmediately:!0})}commonExtensionEventFields(t){return t.extension===null?{}:{extensionId:t.extension.extensionId,extensionApiClientId:t.extension.appId,extensionRegistrationId:t.extension.registrationId,extensionPublicIdentifier:t.extension.publicIdentifier,extensionTargetPublicIdentifier:t.extension.targetPublicIdentifier,extensionType:t.extension.type,extensionPoint:t.extension.extensionPoint.target,extensionPlacementReference:t.extension.placementReference,section:t.section}}mapEventToMonorailSchema(t){const{context:n,timestamp:r,type:o}=t,i={frontendEventTimestampEpochMs:r.getTime(),userToken:n.userToken,customerId:n.customerId,shopId:n.shopId,sessionToken:n.sessionToken,checkoutToken:n.
6checkoutToken,checkoutProfileId:n.checkoutProfileId,apiClientId:n.apiClientId,sourceId:n.sourceId,sourceType:n.sourceType,identityProvider:n.identityProvider,sourceDesign:n.sourceDesign,deviceType:n.deviceType,locale:n.locale,currency:n.currency,browser:n.browser,browserConnectionType:n.browserConnectionType,frontendEventTimeZone:n.frontendEventTimeZone,companyContactId:n.companyContactId,companyLocationId:n.companyLocationId,checkoutToDraft:n.checkoutToDraft,editableShippingAddress:n.editableShippingAddress,payNowOnly:n.payNowOnly,clientIp:n.clientIp,checkoutSdkVersion:n.checkoutSdkVersion,checkoutSdkVariant:n.checkoutSdkVariant,checkoutSdkSchemaVersion:n.checkoutSdkSchemaVersion,serverRendered:n.serverRendered,clientHydrated:n.clientHydrated,pageLoadId:n.pageLoadId};switch(o){case"change":{const a=t.element.type==="tel"||t.element.name==="email"?"contact":t.element.name;return{...i,eventName:`${a?`${Ci(a)}_`:""}field_value_changed`,eventType:`${t.element.type?`${t.element.type}_`:""}${t.element.tagName.toLowerCase()}_change`,fieldValue:t.element.value,labelValue:t.element.label,section:t.section}}case"click":return{...i,eventName:`${t.element.textContent?`${Ci(t.element.textContent)}_`:""}clicked`,eventType:`${t.element.tagName.toLowerCase()}_click`,labelValue:t.element.label,section:t.section,identityProvider:t.identityProvider};case"autofill":return{...i,eventName:`${Ci(t.element.name?.toLocaleLowerCase()??"")}_autofill`,eventType:`${Ci(t.source)}_autofill`,section:t.section};case"extensionLifecycle":{const a=l=>{switch(l){case"mountError":return"extension_mount_failed";case"mountStart":return"extension_mount_started";case"mountSuccess":return"extension_mount_ended";case"sandboxIframeLoadEnd":return"extension_sandbox_iframe_load_ended";case"postPurchaseIframeLoadEnd":return"extension_post_purchase_iframe_load_ended";case"sandboxJsFetchEnd":return"extension_sandbox_js_fetch_ended";case"sandboxJsFetchPostPurchaseEnd":return"extension_sandbox_js_fetch_post_purchase_ended";case"sandboxJsFetch2023_04End":return"extension_sandbox_js_fetch_2023_04_ended";case"sandboxJsFetch2025_07End":return"extension_sandbox_js_fetch_2025_07_ended";case"sandboxPolyfillFetchEnd":return"extension_sandbox_polyfill_fetch_ended";case"sandboxJsEvalEnd":return"extension_sandbox_js_eval_ended";case"sandboxJsEval2025_07End":return"extension_sandbox_js_eval_2025_07_ended";case"sandboxJsEval2023_04End":return"extension_sandbox_js_eval_2023_04_ended";case"partnerJsFetchEnd":return"extension_partner_js_fetch_ended";case"partnerJsEvalEnd":return"extension_partner_js_eval_ended";case"partnerJsExecEnd":return"extension_partner_js_exec_ended";case"apiObjectEnd":return"extension_api_object_ended";case"apiRead":return"extension_api_read";case"appMetafieldsLoadEnd":return"extension_app_metafields_load_ended";case"jsLoadingEnd":return"extension_js_loading_ended";case"executionEnd":return"extension_execution_ended";case"skeletonEnd":return"extension_skeleton_ended";case"visible":return"extension_visible";case"buyerUsable":return"extension_buyer_usable";case"waitTimeAfterExecution":return"extension_wait_time_after_execution";case"checkoutProfileChangeDestroy":return"extension_destroyed_by_checkout_profile_change";case"timeToFirstMeaningfulCheckoutInteraction":return"extension_time_to_first_meaningful_checkout_interaction";case"timeToSettleEnd":return"extension_time_to_settle_ended";default:return`extension_${l}`}};return{...i,...t.duration!==void 0&&{frontendEventsTimeDifferenceMs:Math.round(t.duration)},...t.eventValue!==void 0&&{eventValue:t.eventValue.toString()},...t.apiPropertyName!==void 0&&{eventValue:t.apiPropertyName},...this.commonExtensionEventFields(t),eventName:a(t.phase),eventType:"extension_lifecycle",step:t.page,extensionInstanceId:t.instanceId,...t.mountId&&{mountId:t.mountId},...t.ttsCompletionReason!==void 0&&{extensionTtsCompletionReason:t.ttsCompletionReason},...t.ttsRenderObserved!==void 0&&{extensionTtsRenderObserved:t.ttsRenderObserved},...t.ttsRequestCount!==void 0&&{extensionTtsRequestCount:t.ttsRequestCount},initialLoad:t.initialPageLoad,transferredBundleSize:t.transferredBundleSize,bundleSize:t.bundleSize,validationErrors:t.error?[bl(t.error)]:[]}}case"extensionFetchCall":return{...i,...this.commonExtensionEventFields(t),eventName:t.errorType?"extension_network_call_errored":"extension_network_call_ended",eventType:"extension_lifecycle",frontendEventsTimeDifferenceMs:Math.round(t.duration),fetchDestination:t.origin,fetchHttpStatus:t.httpStatus,fetchErrorType:t.errorType};case"extensionBuyerJourneyBlock":return{...i,...this.commonExtensionEventFields(t),eventName:"extension_buyer_journey_blocked",eventType:"extension_buyer_journey_block_progress",eventValue:t.reason,validationErrors:t.validationErrors.map(a=>JSON.stringify(a))};case"extensionInteraction":{const a=l=>{switch(l){case"updateNoteStart":return"note_update_started";case"updateNoteSuccess":return"note_update_succeeded";case"updateNoteError":return"note_update_errored";case"removeNoteStart":return"note_remove_started";case"removeNoteSuccess":return"note_remove_succeeded";case"removeNoteError":return"note_remove_errored";case"updateMetafieldStart":return"metafield_update_started";case"updateMetafieldSuccess":return"metafield_update_succeeded";case"updateMetafieldError":return"metafield_update_errored";case"removeMetafieldStart":return"metafield_remove_started";case"removeMetafieldSuccess":return"metafield_remove_succeeded";case"removeMetafieldError":return"metafield_remove_errored";case"updateCartMetafieldStart":return"cart_metafield_update_started";case"updateCartMetafieldSuccess":return"cart_metafield_update_succeeded";case"updateCartMetafieldError":return"cart_metafield_update_errored";case"removeCartMetafieldStart":return"cart_metafield_remove_started";case"removeCartMetafieldSuccess":return"cart_metafield_remove_succeeded";case"removeCartMetafieldError":return"cart_metafield_remove_errored";case"updateAttributeStart":return"attribute_update_started";case"updateAttributeSuccess":return"attribute_update_succeeded";case"updateAttributeError":return"attribute_update_errored";case"removeAttributeStart":return"attribute_remove_started";case"removeAttributeSuccess":return"attribute_remove_succeeded";case"removeAttributeError":return"attribute_remove_errored";case"addCartLineStart":return"cart_line_add_started";case"removeCartLineStart":return"cart_line_remove_started";case"updateCartLineStart":return"cart_line_update_started";case"addCartLineSuccess":return"cart_line_add_succeeded";case"addCartLineError":return"cart_line_add_errored";case"removeCartLineSuccess":return"cart_line_remove_succeeded";case"removeCartLineError":return"cart_line_remove_errored";case"updateCartLineError":return"cart_line_update_errored";case"updateCartLineSuccess":return"cart_line_update_succeeded";case"addDiscountCodeStart":return"discount_code_add_started";case"addDiscountCodeSuccess":return"discount_code_add_succeeded";case"addDiscountCodeError":return"discount_code_add_errored";case"removeDiscountCodeStart":return"discount_code_remove_started";case"removeDiscountCodeSuccess":return"discount_code_remove_succeeded";case"removeDiscountCodeError":return"discount_code_remove_errored";case"addGiftCardStart":return"gift_card_add_started";case"removeGiftCardStart":return"gift_card_remove_started";case"addGiftCardSuccess":return"gift_card_add_succeeded";case"removeGiftCardSuccess":return"gift_card_remove_succeeded";case"addGiftCardError":return"gift_card_add_errored";case"removeGiftCardError":return"gift_card_remove_errored";case"getSessionToken":return"session_token_retrieved";case"getSessionTokenError":return"session_token_retrieval_errored";case"getSessionTokenCached":return"cached_session_token_retrieved";case"storefrontApiTokenRefresh":return"storefront_api_token_refreshed";case"storefrontApiQueryStart":return"storefront_api_query_started";case"storefrontApiQueryError":return"storefront_api_query_errored";case"storefrontApiQuerySuccess":return"storefront_api_query_succeeded";case"storefrontResponseParseError":return"storefront_response_parse_errored";case"updateShippingAddressStart":return"shipping_address_update_started";case"updateShippingAddressSuccess":return"shipping_address_update_succeeded";case"updateShippingAddressError":return"shipping_address_update_errored";case"buyerJourneyInterceptor":return"buyer_journey_intercept_ran";case"redeemableAddChangeStart":return"redeemable_add_started";case"redeemableAddChangeSuccess":return"redeemable_add_succeeded";case"redeemableAddChangeError":return"redeemable_add_errored";case"updatePaymentMethodAttributesStart":return"payment_method_attributes_change_started";case"updatePaymentMethodAttributesSuccess":return"payment_method_attributes_change_succeeded";case"updatePaymentMethodAttributesError":return"payment_method_attributes_change_errored";case"changeVisitorConsentStart":return"visitor_consent_change_started";case"changeVisitorConsentSuccess":return"visitor_consent_change_succeeded";case"changeVisitorConsentError":return"visitor_consent_change_errored";case"marketDriverChangeShippingAddressCountryCode":return"market_driver_change_shipping_address_country_code";case"unknownChangeStart":return"unknown_event";case"unknownChangeSuccess":return"unknown_event";case"unknownChangeError":return"unknown_event";default:return(u=>"unknown_event")()}};return{...i,...t.duration&&{frontendEventsTimeDifferenceMs:Math.round(t.duration)},...this.commonExtensionEventFields(t),eventName:`extension_${a(t.interaction)}
6`,eventType:"extension_interaction",validationErrors:t.error?[bl(t.error)]:[],extensionInstanceId:t.extensionInstanceId,initialLoad:t.initialLoad,...t.eventId&&{eventValue:t.eventId},...t.throttleCounter!==void 0&&{throttleCounter:t.throttleCounter}}}case"extensionUiInteraction":{const a=c=>{switch(c){case"modalOpen":return"modal_opened";case"modalClose":return"modal_closed";case"modalRender":return"modal_rendered";case"mapRender":return"map_rendered";case"sheetOpen":return"sheet_opened";case"sheetClose":return"sheet_closed";case"sheetRender":return"sheet_rendered";case"announcementExpanded":return"announcement_expanded";case"announcementCollapsed":return"announcement_collapsed";case"announcementDismissedFromHost":return"announcement_dismissed_from_host";case"announcementDismissedFromExtension":return"announcement_dismissed_from_extension"}},l=c=>{switch(c){case"modalOpen":case"modalClose":case"sheetOpen":case"sheetClose":case"announcementExpanded":case"announcementCollapsed":case"announcementDismissedFromHost":case"announcementDismissedFromExtension":return"component_buyer_interaction";case"modalRender":case"sheetRender":case"mapRender":return"component_lifecycle"}};return{...i,componentType:t.componentType,componentInstanceId:t.componentInstanceId,...this.commonExtensionEventFields(t),eventName:a(t.interaction),eventType:l(t.interaction)}}case"impression":return{...i,eventType:"impression",eventName:`${t.impressionType}_impression`,eventValue:t.eventValue,impressionFeatures:t.impressionFeatures,section:t.section,identityProvider:t.identityProvider,...t.impressionType==="delivery_macros"?ga(n.selectedDeliveryMacro,n.deliveryMacros||[],n.deliveryLines||[]):{}};case"moreShippingOptions":return{...i,eventType:"more_shipping_options",eventName:t.subEvent,...ga(n.selectedDeliveryMacro,n.deliveryMacros||[],n.deliveryLines||[])};case"deliveryMacroInteraction":return{...i,eventType:"delivery_macro_interaction",eventName:t.subEvent,...ga(n.selectedDeliveryMacro,n.deliveryMacros||[],n.deliveryLines||[])};case"splitShipAndPickupIntent":return{...i,eventType:"split_ship_and_pickup",eventName:"split_ship_and_pickup_intended"};default:return{...i,eventName:"unknown_interaction_event",eventType:"interaction"}}}}function ga(e,t,n){return{shippingNumSplits:n?.length,splitShippingDeliveryGroups:JSON.stringify(n.map(r=>({id:r.id,numItems:r.targetMerchandiseLines?.length??0,productItemIds:r.targetMerchandiseLines?.map(o=>o.id?Be(o.id):"")??[],deliveryMethods:r.methods.map(o=>({title:o.title,handle:o.handle,cost:o.cost.amount,deliveryEstimate:o.deliveryPromisePresentmentTitle?.long}))}))),splitShippingMacros:JSON.stringify(t.map(r=>({selected:e?.id===r.id,handle:r.id,cost:r.cost.amount,title:r.title,methods:Object.entries(r.deliveryMethodHandles).map(([o,i])=>({deliveryGroup:o,deliveryMethod:i}))})))}}class k0{constructor(t){this.client=t,this.acceptableEventType=new Set(["receiptError","paymentError","violationError","addressError"])}willAccept(t){return this.acceptableEventType.has(t.type)}transmit(t){this.client.monorailEvent({schemaId:"checkout_c1_interaction_errors/3.2",payload:this.mapEventToMonorailSchema(t)})}transmitImmediately(t){this.client.monorailEvent({schemaId:"checkout_c1_interaction_errors/3.2",payload:this.mapEventToMonorailSchema(t)},{exportImmediately:!0})}mapEventToMonorailSchema(t){const{context:n,type:r}=t,o={userToken:n.userToken,shopId:n.shopId,sessionToken:n.sessionToken,checkoutToken:n.
6checkoutToken,apiClientId:n.apiClientId,sourceId:n.sourceId,sourceType:n.sourceType,sourceDesign:n.sourceDesign,requestId:n.requestId,checkoutSdkVersion:n.checkoutSdkVersion,checkoutSdkVariant:n.checkoutSdkVariant,checkoutSdkSchemaVersion:n.checkoutSdkSchemaVersion};switch(r){case"receiptError":return{...o,errorMessage:t.error.message||"",eventName:"receipt_error",eventType:"error",errorReason:t.error.code||t.error.field||"",silencedViolation:t.error.silencedViolation||!1,errorOrigin:t.error.origin||"",errorType:t.error.type||""};case"addressError":return{...o,errorMessage:t.error.message||"",eventName:"address_error",eventType:"error",errorReason:t.error.code||t.error.field||"",silencedViolation:!1,errorOrigin:t.error.origin||"",errorType:t.error.type||""};case"paymentError":return{...o,errorMessage:t.error.message||"",eventName:"payment_error",eventType:"error",errorReason:t.error.code||t.error.field||"",silencedViolation:t.error.silencedViolation||!1,errorOrigin:t.error.origin||"",errorType:t.error.type||""};case"violationError":return{...o,errorMessage:t.error.message||"",eventName:"validation_error",eventType:"error",errorReason:t.error.code||t.error.field||"",silencedViolation:t.error.silencedViolation||!1,errorOrigin:t.error.origin||"",errorType:t.error.type||""}}return{...o,errorMessage:"Unknown error",eventName:"error",eventType:"interaction_error",errorReason:"",silencedViolation:!1,errorOrigin:"unknown",errorType:"unknown"}}}class I0{constructor(t,n=!0){this.observability=t,this.shouldEmitEvent=n,this.acceptedTypes=new Set(["click"])}willAccept(t){return this.acceptedTypes.has(t.type)}transmit(t){if(!this.shouldEmitEvent)return;const n=this.createDescriptiveLogName(t),{context:r,...o}=t;this.observability.log("telemetry_events_adapter_event_transmitted",n,o)}createDescriptiveLogName(t){const{section:n,type:r,element:o}=t;return[n,r,o.tagName.toLowerCase()].join("_")}}class A0{constructor(t){this.acceptableEventTypes=new Set(["alertDisplayed","uiExtensionError","pageViewed","sectionComplete","shippingMethodSelected","shippingMethodsFilled","sectionInteraction","pageSubmit","dom_clicked","dom_input_focused","dom_input_blurred","dom_input_changed"]),this.webPixels=t.webPixels}willAccept(t){return this.acceptableEventTypes.has(t.type)}transmit(t){t.type==="pageViewed"&&this.webPixels.publish("page_viewed",{});const n=T0(t);if(n===this.mostRecentEvent)return;if(this.mostRecentEvent=n,t.type==="shippingMethodsFilled"||t.type==="shippingMethodSelected"){const o=ya(t),a=(o?.delivery?.selectedDeliveryOptions??[]).some(l=>l.type==="shipping");o&&a&&this.webPixels.publish("checkout_shipping_info_submitted",{checkout:o})}if(t.type==="sectionComplete"){const o=ya(t);if(o)switch(t.section){case"contact":{this.webPixels.publish("checkout_contact_info_submitted",{checkout:o});break}case"deliveryAddress":{this.webPixels.publish("checkout_address_info_submitted",{checkout:o});break}}}if(t.type==="pageSubmit"){const o=ya(t);o&&this.webPixels.publish("checkout_shipping_info_submitted",{checkout:o})}if(t.type==="alertDisplayed"&&this.webPixels.publish("alert_displayed",{alert:{target:t.target,value:t.value,type:t.errorType,message:t.message}}),t.type==="uiExtensionError"&&this.webPixels.publish("ui_extension_errored",{error:{apiVersion:t.apiVersion,appId:t.appId,appName:t.appName??"",appVersion:t.appVersion,extensionName:t.extensionName,message:t.message,placementReference:t.placementReference??null,extensionTarget:t.extensionTarget,trace:t.trace??"",type:t.code}}),w0(t))if(L0(t))this.webPixels.publishDomEvent("clicked",{...Sf(t,["element","screenX","screenY","pageX","pageY","offsetX","offsetY","movementX","movementY","clientX","clientY"])});else{const o=R0(t.type);this.webPixels.publishDomEvent(o,{element:t.element})}}}function ya(e){return Vh({type:e.type,step:e.context.step,section:"section"in e?e.section:void 0})?e.context.webPixelCheckout:void 0}function T0(e){return JSON.stringify(e,(t,n)=>t==="timestamp"||t==="webPixelCheckout"?"":n)}function w0(e){return e.type.startsWith("dom")}function L0(e){return e.type==="dom_clicked"}function R0(e){return e.replace("dom_","")}const Ug=ft("EventHubContext");function x0(){return Ut(Ug)}function M0({children:e}){const{observability:t,userEvents:n,shopPay:r,checkout:{identity:o},source:i,router:a,consentManager:l}=_(),c=o.current.value==="shopPay",u=Mg(),d=Hc(),p=B(()=>{const m=[new C0(n,d),new k0(n),new S0(t),new c0(t,n,d),new d0({observability:t,userEvents:n,source:i}),new p0({userEvents:n,source:i}),new I0(t,d),new A0({webPixels:u}),new t0({observability:t,userEvents:n,shopPay:r,isShopPayActive:c,router:a,consentManager:l}),new l0({userEvents:n,source:i})];return new N0(m)},[t,n,r,c,u,i,d,a,l]);return s(Ug.Provider,{value:p,children:e})}class N0{constructor(t){this.clients=t}emit(t){this.transmit(t)}
6transmit(t){this.clients.forEach(n=>{n.willAccept(t)&&(t.transmitImmediately&&n.transmitImmediately?n.transmitImmediately(t):n.transmit(t))})}}function zg(){const{client:e,shop:t,checkout:n,i18n:r,source:o,mobileCheckoutSdk:i,router:a}=_(),{currentPage:l}=Ce().value,{pathname:c}=a.currentUrl.value,u=zc(),d=u?.trackingUnique??qi({serialized:e.unstable_getSerialization("shopifyY"),expiration:e.unstable_getSerialization("shopifyYExpiration"),cookie:e.cookies.get("_shopify_y")}),p=u?.trackingVisit??qi({serialized:e.unstable_getSerialization("shopifyS"),expiration:e.unstable_getSerialization("shopifySExpiration"),cookie:e.cookies.get("_shopify_s")}),m=H(),f=m.buyerIdentity.value?.customerProfile,h=e.unstable_getSerialization("sessionToken"),g=Pn(),y=H().buyerIdentity.value?.purchasingCompany,{value:v}=m.paymentFlexibilityPaymentTermsTemplate,P=On(),{value:b}=m.deliveryNext,{selectedMacro:C}=qL(),I=ms({base:!0,small:!1}),S=n.configuration.layout.isOnePage.value,k=n.identity.current.value==="shopPay",E=navigator.connection?.effectiveType??"unknown",T=e.unstable_getSerialization("requestId"),A=l?.id,R=e.unstable_getSerialization("apiClientId")??0,L=e.unstable_getSerialization("workerVersion")??"proxy",M=e.unstable_getSerialization("serverHandling")??"proxy";let D="c1_legacy";S&&(D="c1_redesign"),k&&(D="shop_pay");const N=Ef(b),{deliveryMacros:U}=se(),z=U.value,{isServerRendered:O}=e.initialRequest,K=n.configuration.profileId.value;return B(()=>({userToken:d,trackingVisit:p,customerId:f?.id,shopId:t.id,sessionToken:h,checkoutToken:o.checkoutSessionIdentifier,checkoutProfileId:K?parseInt(Be(K),10):void 0,apiClientId:R,sourceId:o.sourceId,sourceType:o.type,identityProvider:void 0,sourceDesign:D,deviceType:I?"mobile":"desktop",locale:r.locale,currency:r.currency,browser:navigator.userAgent,browserConnectionType:E,frontendEventTimeZone:Intl.DateTimeFormat().resolvedOptions().timeZone,clientIp:"0.0.0.0",userAgent:navigator.userAgent,companyContactId:y?f?.id:void 0,companyLocationId:y?.location.id,companyId:y?.company.id,checkoutToDraft:P.value,editableShippingAddress:g.value,payNowOnly:!v&&!P.value,shippingRequired:n.isShippingRequired.value,requestId:T,step:A,pathname:c,checkoutSdkSchemaVersion:i.config.schema||void 0,checkoutSdkVersion:i.config.version||void 0,checkoutSdkVariant:i.variant.value?.toUpperCase(),workerVersion:L,serverHandling:M,reviewPageRequired:t.confirmationPageEnabled,serverRendered:O,clientHydrated:O,...b?.status==="filled"?{selectedDeliveryMacro:N?C:void 0,deliveryMacros:N?z:[],deliveryLines:b.lines.filter(zl)}:{selectedDeliveryMacro:void 0,deliveryMacros:[],deliveryLines:[]},pageLoadId:gS}),[d,p,f?.id,t.id,t.confirmationPageEnabled,h,o.checkoutSessionIdentifier,o.sourceId,o.type,K,R,D,I,r.locale,r.currency,E,y,P.value,g.value,v,n.isShippingRequired.value,T,A,c,i,L,M,b,N,C,z,O])}function wn(){if(typeof window>"u")return D0;const{shop:e,consentManager:t,source:n,i18n:r}=_(),o=x0(),i=zg(),a=V(i),l=Je(),c=se();return a.current=i,x((u,d)=>{o.emit({type:u,context:{...a.current,href:window.location.href,consent:PA(t),webPixelCheckout:oT({type:u,step:a.current.step,section:d.section},{negotiated:l,proposedParts:c,source:n,locale:r.locale,shopCurrencyCode:e.currencyCode,marketDrivenShippingEnabled:e.marketDrivenShippingEnabled})},...d})},[o,a,e,t,l,c,n,r])}function D0(){}function Hg(e,t){const{router:n}=_();F(()=>{if(n.currentUrl.peek().hash!=="")return;const r=document.activeElement;r&&e.current?.contains(r)&&t(r)},[])}function O0(){const e=wn(),{client:t}=_();return x(n=>{if(!t.isFirstMeaningfulInteractionMarked.value){const r=performance.now();e("extensionLifecycle",{phase:"timeToFirstMeaningfulCheckoutInteraction",eventValue:r,duration:r,extension:null,section:"extension",initialPageLoad:!0,timestamp:new Date,page:n??""}),t.markFirstMeaningfulInteraction()}},[e,t])}function qg(){const e=wn(),{observability:t}=_();function n(r){e("alertDisplayed",r),t.log("alert_displayed_event_emitted","Error alert was displayed to the buyer",{event:ZA(r)})}return n}function F0(){const{checkout:e,shop:t}=_(),n=e.configuration.addressSettings.nonBillingAddressSettings,r=t.hasFlagEnabled(yS);return w(()=>n.value?.validationEnabled?r?"ATLAS_SEARCH":void 0:"BASIC")}function B0(){const{i18n:e}=_();return x((t,n)=>vS(e,t,n),[e])}function V0(e,t,n){return e?n.size===0?!0:[...t].some(r=>!n.has(r.code)):!1}function Gg(e){return e.status==="failed"}function r7(e){return e.type==="payment"}function ep(e,t){return e&&t&&e.id===t.id&&e.status===t.status}function $c(e){return e.status==="action_required"&&e.action.type==="complete_payment_challenge"}function $g(e){return e.status==="action_required"&&e.action.type==="complete_payment_challenge_v2"}function Wg(e){return e.type==="complete_payment_challenge"}function Nr(e){return e.type==="complete_payment_challenge_v2"}function mn(e){return{receiptId:e?.id?yr(e.id)??e.id:void 0,status:e?.
6status}}function o7(e=[]){return e?.flatMap(t=>t.status==="submitted"?t.remotePurchaseOrder.deliveryLines?.map(n=>({...n,shopId:t.shopId}))??[]:[])??[]}function U0(e){return e.some(t=>SS.has(t.code))}function z0(e){return e.some(t=>ES.has(t.code))}function H0(e){return e.some(t=>PS.has(t.code))}function Yg(e){return e.some(({code:t})=>new Set([...Cf,...ql]).has(t))}function jg(e){return e.some(({code:t})=>kf.has(t))}function Kg(e){return e.some(t=>_S.has(t.code)&&t.__typename==="RemoveTermViolation")}function Jg(e){return e.some(t=>bS.has(t.code)&&t.__typename==="RemoveTermViolation")}function q0(e){return e.some(t=>Cf.has(t.code))}function mi(e){const t=Yc({subscribedViolations:e,onlySubscribeToProgression:!0}),{violations:n,negotiationStage:r}=t.snapshot.value;return{hasViolations:n.size>0,violations:n,negotiationStage:r,clearViolations:t.clearViolations}}function G0(e){const t=Wc(e);return{violations:t.violations.value,hasViolations:t.violations.value.size>0,clearViolations:t.clearViolations}}function Wc(e){return Yc({subscribedViolations:e,onlySubscribeToProgression:!1})}function i7(e){const t=Xg(e);return{violations:t.violations.value,hasViolations:t.violations.value.size>0}}function Xg(e){return Yc({subscribedViolations:e,onlySubscribeToProgression:!0,skipProgressionNegotiations:!0})}function s7(e){const t=Qg(e);return{violations:t.violations.value,hasViolations:t.violations.value.size>0}}function Qg(e){const{checkout:{wallets:t}}=_(),n=Wc(e);return $e(()=>{t.activeSession.value&&n.violations.value.size>0&&_t(()=>{n.clearViolations()})}),n}function Yc({subscribedViolations:e,onlySubscribeToProgression:t,skipProgressionNegotiations:n}){const{observability:r,checkout:{wallets:o}}=_(),{lastJourneyProgression:i,lastNegotiation:a}=Je(),l=t?i:a,c=Le({violations:new Set}),u=w(()=>c.value.violations),d=x(()=>{c.value={violations:new Set}},[c]),p=We(e);return F(()=>l.subscribe(m=>{if(o.activeSession.value)return;if(m.type==="invalid"){r.log("violations_subscription_invalid_result_detected","Not updating violation subscription because of invalid result",{reasons:m.reasons,beforeViolations:u.value});return}if(m.type!=="error"&&m.type!=="success"||n&&m.negotiationStage!=="progression"&&m.negotiationStage!=="completion")return;const f=p.value.size>0,h=m.violations.filter(g=>!f||p.value.has(g.code));c.value={violations:new Set(h),negotiationStage:m.negotiationStage}}),[p,r,o,l,n,c,u]),{snapshot:c,violations:u,clearViolations:d}}function Zg(e){const{checkout:t,embed:n}=_(),r=t.wallets.activeSession.value,o=t.latestReceipt.value,{delegatedPaymentInstrument:i}=xt(),[a,l]=oe(),c=V(i.peek()),u=x(()=>{l(void 0)},[]),d=x(p=>{e.has(p.code)?l(p.code):l(void 0)},[e]);return F(()=>{r||o?.status==="failed"&&o.failure?.type==="payment"&&d(o.failure)},[r,d,o]),F(()=>{if(!n)return;const p=i.value;p!==c.current&&(c.current=p,p&&l(void 0))},[n,i.value]),{error:a,hasError:!!a,clearError:u}}function tp(e){if(!(e?.status!=="failed"||e.failure.type!=="hsa_qualification")&&e.failure.code!=="SURVEY_EXITED")return e.failure}function a7(){const{checkout:e}=_(),t=e.wallets.activeSession.value,n=e.latestReceipt.value,[r,o]=oe(()=>t?void 0:tp(n));return F(()=>{t||o(tp(n))},[t,n]),{error:r,hasError:r!==void 0}}function l7(){const{checkout:e}=_(),t=e.wallets.activeSession.value,n=e.latestReceipt.value,[r,o]=oe(!1);return F(()=>{t||(n?.status==="failed"&&n.failure?.type==="inventory"?o(!0):o(!1))},[t,n]),{hasError:r}}function c7(){const{checkout:e}=_(),t=e.wallets.activeSession.value,n=e.latestReceipt.value,[r,o]=oe(!1);return F(()=>{t||(n?.status==="failed"&&n.failure?.type==="order"?o(!0):o(!1))},[t,n]),{hasError:r}}function $0(){const{checkout:e}=_(),t=e.wallets.activeSession.value,n=e.latestReceipt.value,[r,o]=oe(null),[i,a]=oe("");return F(()=>{t||n&&Gg(n)&&(n.failure.type==="payment"?(o(n.failure.code??null),a("payment_receipt_error")):a(`${n.failure.type}_receipt_error`))},[n,t]),{hasError:!!i,message:i,code:r}}function W0(){const[e,t]=oe([]),[n,r]=oe(null),{violations:o}=mi(new Set);return tr(i=>{i.type==="invalid"?r(i):r(null)}),F(()=>{let i=null;if(n){const c=n.reasons.filter(u=>u!==Vo.InvalidAddress)[0];c&&(i={message:c,origin:"server",type:"negotiation"})}const a=[];
6Array.from(o).forEach(c=>{a.push({message:c?.localizedMessage??"",code:c?.code,origin:"server",type:"negotiation"})});const l=[...a];i&&l.push(i),t(l.filter(c=>!!c))},[n,o]),e}function Y0(){const{allViolations:e}=H();return w(()=>Yg(e.value??[]))}function u7(e){const{allViolations:t}=H();return w(()=>!!t.value?.some(n=>n.code===e))}function j0(){const{checkout:e}=_(),t=se(),{hasNegotiatedOnce:n}=Je(),{violations:r,hasViolations:o}=mi(Ao),i=V0(o,r,kS),a=e.isShippingRequired.value,l=CS(t.billingAddress.value,t.shippingAddress.value),c=!!t.shippingAddress.value.firstName?.trim()&&!t.billingAddress.value.firstName?.trim(),u=a?l&&!c:!0;return{isOnlyFirstNameViolations:o&&!i&&u,hasNonFirstNameBillingViolations:i,isBillingToBeUpdated:u,hasNegotiatedOnce:n.value,billingViolations:r}}function K0({creditCards:e,availableLoanTypes:t,isOnlyFirstNameViolations:n,isBillingDependOnShipping:r,hasNegotiatedOnce:o}){const i=new Set;return e.forEach(a=>{const l=IS(t,a?.supportsInstallmentsSplitPayLoan,a?.supportsInstallmentsInterestLoan),c=t.includes("SPLIT_PAY")?a?.installmentsSplitPayLoanNotSupportedReason:a?.installmentsInterestLoanNotSupportedReason,d=!a?.billingAddress.address.firstName?.trim()&&(o?n:r);!a?.billingAddressValid&&!d?i.add("billing_address"):!l&&c&&i.add(c)}),i}function J0(){const{checkout:e,shopPay:t}=_(),n=t.user.creditCards,r=e.installments.config.value,{isOnlyFirstNameViolations:o,isBillingToBeUpdated:i,hasNegotiatedOnce:a}=j0(),l=B(()=>r?K0({creditCards:n.value,availableLoanTypes:r.availableLoanTypes,isOnlyFirstNameViolations:o,isBillingDependOnShipping:i,hasNegotiatedOnce:a}):void 0,[r,n.value,o,i,a]);return r?{supported:!0,checkoutIneligibilityCardsReasons:l}:{supported:!1}}function ey(){const{checkout:e,environment:t,observability:n}
6=_(),r=J0(),o=e.installments.isSupported.value,i=r.supported,a=e.installments.isSupportedDetails?.value.failedGate,{commitSha:l}=t;return F(()=>{o!==i&&n.log("installments_supported_mismatch","Mismatch between checkout.installments.isSupported and installments.supported",{appContext:String(o),layoutConcerns:String(i),failedGate:String(a),buildId:l})},[o,i,a,l,n]),i?r:null}function X0(){const{i18n:e,checkout:t,shopPay:n}=_(),r=B0(),o=ey(),i=n.user.installments.isRetryable.value,{paymentMethods:a}=H(),l=w(()=>AS(a.value));if(!o||!l.value)return"";const c=l.value;if(i)return e.translate("installments.installments_condition_retryable");const u=f=>{switch(f){case"US":return e.translate("installments.installments_country_adjective.US");case"CA":return e.translate("installments.installments_country_adjective.CA");case"GB":return e.translate("installments.installments_country_adjective.GB");default:return f}},d=f=>{switch(f){case"amount":return e.translate("installments.installments_condition_amount",{minimum:e.formatCurrency(c.minPrice.amount,{currency:c.minPrice.currencyCode,form:"short"}),maximum:e.formatCurrency(c.maxPrice.amount,{currency:c.maxPrice.currencyCode,form:"short"})});case"shipping_address":return e.translate("installments.installments_condition_shipping_address",{listOfCountryCodes:r(c.supportedCountries.map(u),fd.Or)});case"currency":return e.translate("installments.installments_condition_currency",{listOfCurrencyCodes:r(c.supportedCurrencies,fd.Or)});case"gift_cards":return e.translate("installments.installments_condition_gift_cards");case"subscriptions":return e.translate("installments.installments_condition_subscriptions");case"order_edit":return e.translate("installments.installments_condition_order_edit");case"test_mode":return e.translate("installments.installments_condition_test_mode");default:return e.translate("installments.installments_condition_generic")}},p=t.installments.ineligibilityReasons.value,m=!n.user.installments.isRejected.value;return m&&p.length===0?"":(m&&p.length>0?p:["user_rejected"]).map(d).join(" ")}function Q0(){const e=H().customAttributes;return w(()=>{const t=bi(TS,e?.value),n=bi(wS,e?.value),r=bi(LS,e?.value),o=bi(RS,e?.value);return{retailTraceId:t?.value||"",deviceId:n?.value||"",locationId:r?.value||"0",userId:o?.value||"0"}})}function va(e,t){return t?.availableLoanTypes?.includes(e)??!1}function Z0(e){const{retailTraceId:t,deviceId:n,userId:r,locationId:o}=Q0().value,{shop:{id:i},source:{checkoutSessionIdentifier:a},checkout:l}=_(),c=xS(),{value:u}=ti(),d=l.installments.config.value,p=u?.amount?Number(u.amount):0,m=l.installments.isCheckoutEligible.value,f=X0(),h=va("SPLIT_PAY",d),g=va("INTEREST",d),y=va("ZERO_PERCENT",d),P=u?.currencyCode||"USD";return B(()=>({userId:parseInt(r,10),shopId:parseInt(Be(i),10),locationId:parseInt(o,10),posCheckoutToken:t,stage:e||"",totalOrderValue:p||0,cartItemsCount:c.value||0,installmentsEligible:m||!1,posDeviceId:n,currency:P,shopPayCheckoutToken:a,ineligibilityReason:f,splitPayEligible:h,interestBearingEligible:g,zeroPercentEligible:y}),[e,t,n,r,o,p,m,i,c.value,P,a,f,h,g,y])}function fi(){const e=H().customAttributes;return w(()=>MS(e.value))}function eR(e,t){return typeof window.requestIdleCallback=="function"?window.requestIdleCallback(e):(t?.leaveErrorBreadcrumb("[usePersistedState] requestIdleCallback was not available, used setTimeout fallback"),window.setTimeout(e,0))}function tR(e,t){typeof window.cancelIdleCallback=="function"?window.cancelIdleCallback(e):typeof e=="number"&&(window.clearTimeout(e),t?.leaveErrorBreadcrumb("[usePersistedState] cancelIdleCallback was not available during cleanup, used clearTimeout fallback"))}function jc(e,t){const{observability:n}=_(),[r,o]=oe(()=>DS(e));V(t);let i=r;return F(()=>{const a=eR(()=>{NS(e,i)},n);return()=>{tR(a,n)}},[e,n,i]),[i,o]}function ki(e,t){const{persistence:n}=_(),r=n?.get(e,t),o=Le(r);return $e(()=>{t.disablePersistence||n?.createUpdate(e,t)(o.value)}),o}const ty=ft("AnalyticsContext");function nR({children:e}){const t=B(()=>new rR,[]);return s(ty.Provider,{value:t,children:e})}function ny(){return Ut(ty)}class rR{constructor(){this.eventHistory=[],this.listeners=new Set}emit(t){this.eventHistory.push(t);for(const n of this.listeners)n(t)}subscribe(t){this.listeners.add(t);for(const n of this.eventHistory)t(n);return()=>{this.listeners.delete(t)}}}function ry(){const e=ny();return x(t=>e.emit(t),[e])}function _a(e){const t=ny();F(()=>t.subscribe(e),[e,t])}function oR(){const{client:e}=_();return e.unstable_getSerialization("shopPayConfig").redirect_source}function iR(){const[e,t]=jc(hn.TrackedSourceId),{source:{sourceId:n}}=_();return F(()=>{t(n)},[n,t]),{previouslyTracked:n===e}}const oy=()=>{const{url:e}=_(),t=e.shopPayRememberMe();return!!ii()?.redirectUrl?.includes(t)};function sR(){const[e,t]=jc(hn.TrackedCompleteOrderSourceId),n=ii(),r=oy(),{source:{sourceId:o}}=_();return F(()=>{n&&!r&&t(o)},[o,n,r,t]),{previouslyTracked:o===e}}function aR(){const e=Ce();return w(()=>{const t=e.value.currentPage?.id||e.value.currentDetour?.type;switch(t){case"information":return"contact_information";case"shipping":return"shipping_method";case"payment":return"payment_method";case"review":return"review";case"thankYou":return"thank_you";case"stockProblems":return"stock_problems";case"postPurchase":return"post_purchase";default:return t}})}function lR(){const e=V(!1),{userEvents:t,shop:{id:n},source:{checkoutSessionIdentifier:r},checkout:{identity:o}}=_(),i=o.current.value==="shopPay",a=Qn();
6$e(()=>{a.value.enabledDeliveryMethods.includes("PICK_UP")&&!e.current&&(t.monorailEvent({schemaId:"local_pickup_checkout_availability_viewed/1.1",payload:{shopId:parseInt(Be(n),10),checkoutToken:r||"",sourceName:"checkout_one",checkoutSurface:i?"shop_pay":"guest_checkout"}}),e.current=!0)})}function d7({selectedDeliveryMethodHandle:e,methods:t}){const{userEvents:n,shop:{id:r},checkout:{identity:o},source:i}=_(),a=o.current.value==="shopPay",l=H().buyerIdentity.value?.customerProfile,c=p=>p.handle===e,u=t.find(c)?.originLocation?.id,d=t.findIndex(c);return x(p=>n.monorailEvent({schemaId:"local_pickup_checkout/3.1",payload:{eventType:p,checkoutToken:i.checkoutSessionIdentifier||"",shopId:parseInt(Be(r),10),locationId:u&&Be(u),selectedLocationRank:d,userId:l?.id?parseInt(Be(l.id),10):void 0,numberLocationsFound:t.length||0,checkoutSurface:a?"shop_pay":"guest_checkout"}}),[l?.id,a,u,t.length,n,d,r,i.checkoutSessionIdentifier])}const np=580111;function cR(){const{client:e,userEvents:t,i18n:{locale:n},shop:r,source:o,mobileCheckoutSdk:i}=_(),a=H(),l=a.buyerIdentity.value?.customerProfile,c=Hc(),u=aR(),{value:d}=If(),{value:p}=Af("ONE_TIME_PURCHASE"),m=br(p),f=!!m&&m?.costAfterDiscounts.amount===0,{value:h}=a.taxes,{value:g}=a.merchandiseLines,{value:y}=a.paymentLines,{value:v}=a.discountLines,{value:P}=a.contactInfo,{value:b}=a.buyerIdentity,{value:C}=Gl(),[I,S]=oe("");lR();function k(J){return J.toFixed(2)}function E(J){return parseInt(Be(J),10)}const T=B(()=>f?void 0:m?.costAfterDiscounts?.amount||m?.cost.amount,[f,m?.costAfterDiscounts?.amount,m?.cost?.amount]),A=B(()=>C?.currencyCode==="USD"?C.amount:void 0,[C?.amount,C?.currencyCode]),R=B(()=>g?.lines?.filter(J=>J.productId).map(J=>E(J.productId)),[g?.lines]),L=B(()=>g?.lines?.filter(J=>J.variantId).map(J=>E(J.variantId)),[g?.lines]),M=B(()=>g?.lines?.map(J=>{const ee=J.totalPrice.amount;return ee===void 0?"":k(ee)}),[g?.lines]),D=B(()=>g?.lines?.every(J=>J.totalPrice.currencyCode==="USD")?g?.lines?.map(J=>{const ee=J.totalPrice.amount;return ee===void 0?"":k(ee)}):void 0,[g?.lines]),N=B(()=>g?.lines?.map(J=>J.quantity),[g?.lines]),U=B(()=>N?.reduce((J,ee)=>J+ee,0),[N]),z=B(()=>N?.length,[N]),O=B(()=>y?.lines.filter(J=>J.method.type==="giftCard"&&J.cost?.amount).map(J=>k(J.cost.amount)),[y?.lines]),K=B(()=>{if(u.value!=="thank_you"&&u.value!=="post_purchase")return;const J=y?.lines.find(te=>te.method.type==="giftCard"&&te.cost?.amount)?"giftCard":void 0,ee=y?.lines.filter(te=>te.method.type!=="giftCard").map(te=>te.method.type);return ee&&ee?.length>0?ee[0]:J},[y?.lines,u.value]),X=B(()=>v?.lines.reduce((J,ee)=>{if(!er(ee))return J;let te=J;te||(te=[]);const W=ee.amount?.amount;return W&&te.push(k(W)),te},[]),[v]),ne=zc(),$=x(()=>{const J=h?.status==="available_total"?h.totalTax.amount:void 0,ee=l?.id?E(l.id):void 0,te=l?.fullName||void 0,W=ne?.trackingUnique??qi({serialized:e.unstable_getSerialization("shopifyY"),expiration:e.unstable_getSerialization("shopifyYExpiration"),cookie:e.cookies.get("_shopify_y")||void 0}),he=ne?.trackingVisit??qi({serialized:e.unstable_getSerialization("shopifyS"),expiration:e.unstable_getSerialization("shopifySExpiration"),cookie:e.cookies.get("_shopify_s")||void 0});return{schemaId:"checkout_track/3.8",payload:{eventName:"cart_information",cartToken:o.type==="cartNext"?o.sourceId:void 0,customerId:ee,trackingUnique:W,shopId:E(r.id),eventTimestampEpochMs:Date.now(),trackingVisit:he,userAgent:navigator.userAgent,landingPage:e.cookies.get("_landing_page")||void 0,customerEmail:l?.email||P?.email,contentLanguage:n,actionName:"query",remoteIp:void 0,totalPrice:C?.amount?k(C?.amount):void 0,customerName:te,lineItemProductIds:R,lineItemVariantIds:L,lineItemTotalPrice:M,lineItemTotalPriceUsd:D,lineItemQuantity:N,currency:b?.presentmentCurrency||r.currencyCode,totalItemCount:U,paymentGatewayId:void 0,gatewayName:void 0,totalPriceUsd:A?k(A):void 0,apiClientId:np,currentApiClientId:np,paymentMethod:K,paymentProviderId:void 0,currentStep:u.value,checkoutToken:o.checkoutSessionIdentifier,totalShipping:T?k(T):void 0,sourceProcessor:"web_checkout",appliedGiftCards:O?.length?O:void 0,subtotalPrice:d?.amount?k(d.amount):void 0,sourceName:"checkout_one",freeShippingDiscount:f.valueOf(),totalTax:J?k(J):void 0,appliedDiscounts:!X||X.length<1?void 0:X,orderId:void 0,distinctItemCount:z,javascriptEnabled:!0,checkoutPlatform:"checkout_one",checkoutSdkVersion:i.config.version||void 0,checkoutSdkSchemaVersion:i.config.schema||void 0,checkoutSdkVariant:i.variant.value?.toUpperCase()}}}
6,[X,h,f,d,O,o,T,C?.amount,A,u,b?.presentmentCurrency,r,U,N,M,D,L,R,l,P,z,n,K,ne,e,i]);return F(()=>{c&&(I!==u.value&&t.monorailEvent($()),S(u.value))},[I,u.value,t,$,S,c]),s(q,{})}const uR=qe({suspenseName:"trekkie",displayName:"Trekkie",load:()=>ct(()=>Ve(()=>import("./Trekkie.hnzWbric.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8])))});function dR(){const e=Je(),t=se(),n=Mg(),{plan:r}=Ce().value,{router:o,i18n:{locale:i},shop:{currencyCode:a,marketDrivenShippingEnabled:l},source:c}=_(),u=ii(),d=CA(),p=x(()=>{const h=Mi({negotiated:e,source:c,proposedParts:t,locale:i,shopCurrencyCode:a,marketDrivenShippingEnabled:l});requestAnimationFrame(()=>{n.publish("payment_info_submitted",{checkout:h})})},[e,c,n,t,i,a,l]),m=x(()=>{const h=Mi({negotiated:e,source:c,proposedParts:t,locale:i,shopCurrencyCode:a,marketDrivenShippingEnabled:l});n.publish("checkout_started",{checkout:h})},[e,c,n,t,i,a,l]),f=x(()=>{if(!u||d.shouldPrevent())return;const h=Mi({negotiated:e,receipt:u,source:c,orderId:u.orderIdentity.id,customerId:u.customerId||void 0,isFirstOrder:u.isFirstOrder,locale:i,shopCurrencyCode:a,marketDrivenShippingEnabled:l});d.markAsEmitted();const g=u.analytics?.checkoutCompletedEventId;let y=!1;function v(){if(y)return;y=!0,window.removeEventListener("pagehide",v),document.removeEventListener("visibilitychange",P);const b=TA(r.detours,o.currentUrl.value.normalizedPath),C={...g&&{eventId:g},checkoutCompletedPageType:b},I=Object.keys(C).length>0?C:void 0;n.publish("checkout_completed",{checkout:h},I)}function P(){document.visibilityState==="hidden"&&v()}window.addEventListener("pagehide",v),document.addEventListener("visibilitychange",P),document.visibilityState==="hidden"?v():requestAnimationFrame(v)},[u,e,c,n,o,r.detours,i,a,l,d]);return _a(x(h=>{h.type==="initiate_checkout"&&m()},[m])),_a(x(h=>{h.type==="add_payment_info"&&p()},[p])),_a(x(h=>{h.type==="complete_checkout"&&f()},[f])),null}const pR=["/processing","/thank-you","/error","/post-purchase"],mR=[Po.DirectCheckoutCheckout,Po.CheckoutPaymentStep,Po.ShopPayInstallmentsAsPaymentMethod,Po.ShopPayAsPaymentMethod];function fR(){zc();const e=ry(),{currentPage:t,currentDetour:n}=Ce().value,{userEvents:r,source:o,router:i}=_(),a=iR(),l=sR(),{normalizedPath:c}=i.currentUrl.value,u=ii(),d=fi().value,p=Z0(OS.SHOP_PAY_CHECKOUT_COMPLETE),m=H().paymentLines?.value?.lines,f=oR(),h=wn(),g=oy();return F(()=>{const y=n?.route??t?.route;if(y){h("pageViewed",{timestamp:new Date});const v=["/"];t&&["onePage"].includes(t.id)&&v.includes(y)?e({type:"one_page_checkout_page_view",url:y}):e({type:"page_view",url:y})}},[t,n,h,e]),tr(y=>{"negotiationStage"in y&&y.negotiationStage==="negotiation"||t&&["payment","onePage"].includes(t.id)&&e({type:"add_payment_info"})}),F(()=>{u&&(g||l.previouslyTracked||(e({type:"complete_checkout"}),d&&kA(r,u,p)))},[e,u,g,l,d,r,p]),F(()=>{(o.type==="cartNext"||o.type==="checkout")&&!a.previouslyTracked&&e({type:"initiate_checkout_once_per_checkout",url:c})},[e,c,o.type,a.previouslyTracked]),F(()=>{const y=i.currentUrl.value.normalizedPath,v=!!Pt(m,"GOOGLE_PAY"),P=o.type==="cartNext"||o.type==="checkout",b=()=>v&&y==="/processing"?!0:!pR.includes(y),C=f?!mR.includes(f):!0;P&&b()&&C&&e({type:"initiate_checkout",url:y})},[]),s(q,{children:[s(cR,{}),s(uR,{}),s(dR,{})]})}const hR=Jn(function({children:t}){const n=St();return s(nR,{children:[t,s(ve,{when:n,children:s(fR,{})})]})});function gR(){const{userEvents:e,shop:{id:t},source:n,i18n:{locale:r}}=_(),o=FS(),{billingAddress:i}=se(),a=i.value,{details:l}=Yt(a.countryCode),c=F0();return tr(u=>{if(u.type==="complete"&&i&&o.value.defaultAttributes){const d=o.value.defaultAttributes?.uniqToken||"",p=l?.zones?.find(m=>m.code===a.zoneCode)?.name;e.monorailEvent({schemaId:"checkout_address_submission/5.2",payload:{checkoutToken:n.
6checkoutSessionIdentifier||"",shopId:parseInt(Be(t),10),uniqueToken:d,territory:l?.name||"",context:"Billing address",address1:a.address1||"",address2:a.address2||"",city:a.city||"",zone:p||"",zip:a.postalCode||"",errorCode:"",errorFields:[],locale:r,matchingStrategy:c.value}})}}),null}const iy=ft("WebPixelTargetContext"),Kc=({children:e,target:t})=>s(iy.Provider,{value:t,children:e});function to(){const{checkout:e}=_();return e.configuration.branding.shell.configuration.environment.isCheckoutEditor??!1}function yR(){const{client:e}=_(),{isCheckoutEditor:t,isServerRendered:n}=e.initialRequest;return t===!0&&n===!0}const vR=qe({displayName:"AdminPreviewBar",load:()=>Ve(()=>import("./AdminPreviewBar.DnhGqrVJ.js"),__vite__mapDeps([9,1,2,3,4,5,6,7,8,10])),suspense:!1});function _R(){const{router:e,source:t,shop:n}=_(),r=n.configurationPreviewContext!=="no-preview",o=V(e.currentUrl.peek()).current;return bR({source:t,isThemeEditor:$l(),hasServerPreviewContext:r})?s(vR,{initialUrl:o}):null}function bR({source:e,isThemeEditor:t,hasServerPreviewContext:n}){return e.previewScript?.name!=null||e.type!=="simulated"&&!t&&n}function sy(){const e=V(!1);return F(()=>(e.current=!0,()=>{e.current=!1}),[]),e}const Cs=He(void 0);function ay(){const e=Ee(Cs);if(!e)throw new Vl("Missing FocusManager Context ");return e.focusErrors}function PR(e){const t=e.defaultView?.getComputedStyle(e.documentElement).direction;return t==="rtl"||t==="ltr"?t:e.dir==="rtl"?"rtl":"ltr"}function SR({coordinates:e,ref:t}){const n=t.current?.ownerDocument.defaultView??window;return e.top>=0&&e.left>=0&&e.bottom<=n.innerHeight&&e.right<=n.innerWidth}function ER(e){const t=e.ref.current;if(!t||(t.focus({preventScroll:!0}),SR(e)))return;t.style.scrollMarginTop===""&&(t.style.scrollMarginTop="var(--x-spacing-large-500)");const n=t.ownerDocument.defaultView?.matchMedia("(prefers-reduced-motion: reduce)").matches??!1;t.scrollIntoView({behavior:n?"instant":"smooth"})}function ly({children:e}){const t=V(new Set),n=sy(),r=(l,c,u)=>l.top===c.top?u==="ltr"?l.left<c.left:l.right>c.right:l.top<c.top,o=x(()=>{let l;for(const c of t.current){if(!c.current)continue;const u={coordinates:c.current.getBoundingClientRect(),ref:c};(!l||r(u.coordinates,l.coordinates,PR(c.current.ownerDocument)))&&(l=u)}n.current&&l&&ER(l)},[n]),i=x(l=>(t.current.add(l),()=>t.current.delete(l)),[]),a=B(()=>({requestFocus:i,focusErrors:o,numberOfErrors(){return t.current.size}}),[o,i]);return s(Cs.Provider,{value:a,children:e})}function ks({active:e}){const t=V(null),n=Ee(Cs);return Dt(()=>{if(n&&e)return n.requestFocus(t)},[e,t,n]),t}function p7(){return Ee(Cs)}function m7(e){return document.activeElement===e}const $o=`
7  a[href],
8  area[href],
9  input:not([type="hidden"]):not([disabled]):not([tabindex="-1"]),
10  select:not([disabled]),
11  textarea:not([disabled]),
12  button:not([disabled]):not([tabindex="-1"]),
13  iframe:not([tabindex="-1"]),
14  object,
15  embed,
16  [tabindex="0"],
17  [contenteditable],
18  audio[controls],
19  video[controls]`;function rp(e,t=!0){return!t&&e.matches($o)?e:e.querySelector($o)}function CR(e,t=!0){if(!t&&e.matches($o))return e;const n=e.querySelectorAll($o);return n[n.length-1]}function f7(e){const t=[...document.querySelectorAll($o)],n=t.findIndex(r=>e===r);return n?t[n+1]:null}function Is(){const{paymentLines:e}=se(),t=H().paymentMethods;return w(()=>{const n=e.value.at(0);if(!n)return null;const r=(function(){if("walletContent"in n.method)return n.method.walletContent?.paymentMethodIdentifier;if("popupEnabled"in n.method)return n.method.paymentMethodIdentifier})(),o=t.value?.find(i=>"popupEnabled"in i&&i.popupEnabled&&i.paymentMethodIdentifier===r);return Tf()?null:o&&"name"in o?o.name:null})}var un={backgroundPositionVariant:{bottom:"_17kya4u5 _17kya4u0 _1fragemxj",center:"_17kya4u6 _17kya4u1 _1fragemxk",left:"_17kya4u7 _17kya4u2 _1fragemxl",right:"_17kya4u8 _17kya4u3 _1fragemxm",top:"_17kya4u9 _17kya4u4 _1fragemxn"},backgroundRepeatVariant:{noRepeat:"_17kya4uc _17kya4ua _1fragemxo",repeat:"_17kya4ud _17kya4ub _1fragemxp"},backgroundSizeVariant:{cover:"_17kya4ue",contain:"_17kya4uf"},colorLayerVariant:{base:"_17kya4ui _17kya4ug _1fragemy5",control:"_17kya4uj _17kya4uh _1fragemy6"},inert:"_17kya4un _17kya4um _1fragemyb _1fragem11z _1fragem12w",containerName:"_17kya4ul",opacityVariant:{10:"_17kya4uz _17kya4uq _1fragem11l",20:"_17kya4u10 _17kya4ur _1fragem11m",30:"_17kya4u11 _17kya4us _1fragem11n",40:"_17kya4u12 _17kya4ut _1fragem11o",50:"_17kya4u13 _17kya4uu _1fragem11p",60:"_17kya4u14 _17kya4uv _1fragem11q",70:"_17kya4u15 _17kya4uw _1fragem11r",80:"_17kya4u16 _17kya4ux _1fragem11s",90:"_17kya4u17 _17kya4uy _1fragem11t"},overflowHidden:"_17kya4up _17kya4uo _1fragemup _1fragemv4",visuallyHidden:"_17kya4u18 _1fragem121",withAlignment:"_17kya4u19 _1fragem73",vars:{containerNameVar:"var(--_17kya4uk)"}};const Pe=eo(fg(Cc(at(function({accessibilityLabel:t,accessibilityRole:n="generic",accessibilityVisibility:r="visible",autoFocus:o,background:i="transparent",backgroundHoverAndFocus:a,backgroundFit:l,backgroundImage:c,backgroundPosition:u,backgroundRepeat:d="noRepeat",blockAlignment:p,blockSize:m="auto",border:f="none",borderRadius:h="none",borderStyle:g,borderWidth:y,boxShadow:v,children:P,className:b,colorLayer:C,containerName:I,display:S="auto",id:k,inert:E,inl
19ineAlignment:T,inlineSize:A="auto",maxBlockSize:R="none",maxInlineSize:L="none",minBlockSize:M="0",minInlineSize:D="0",opacity:N,overflow:U="visible",padding:z="none",paddingBlock:O,paddingInline:K,paddingBlockEnd:X,paddingBlockStart:ne,paddingInlineEnd:$,paddingInlineStart:J,position:ee="relative",insetBlock:te,insetInline:W,transform:he,translate:re,zIndex:de,...le},_e){const ae=p||T,ge=x(Se=>{o&&Se&&Se.focus({preventScroll:!0})},[o]),ke=Go(_e,ge),{className:we,style:Ie,styleElement:j}=Tt({alignItems:T,backgroundColor:i,backgroundColorHoverAndFocus:a,backgroundImage:c,blockSize:m,..._r({border:f,borderStyle:g,borderWidth:y}),borderRadius:h,boxShadow:v,display:S,inlineSize:A,insetBlock:te,insetInline:W,justifyContent:p,maxBlockSize:R,maxInlineSize:L,minBlockSize:M,minInlineSize:D,padding:z,paddingBlock:O,paddingInline:K,paddingBlockEnd:X,paddingBlockStart:ne,paddingInlineEnd:$,paddingInlineStart:J,position:ee,transform:he,zIndex:de},{transforms:{display:ae?Sc:Pc}}),Z=Qr(),{Element:fe,role:be}=ui(n,{defaultElement:Z?"span":"div"}),Te=I?Jt({[un.vars.containerNameVar]:I}):void 0;return s(kR,{condition:E,children:[j,s(fe,{"aria-hidden":r==="hidden"||E?!0:void 0,"aria-label":t,className:Y(r==="exclusive"&&un.visuallyHidden,c&&l&&un.backgroundSizeVariant[l],c&&u&&un.backgroundPositionVariant[u],c&&un.backgroundRepeatVariant[d],C&&un.colorLayerVariant[C],I&&un.containerName,ae&&un.withAlignment,E&&un.inert,N&&un.opacityVariant[N],U==="hidden"&&un.overflowHidden,we,{notranslate:re===!1},b),id:k,inert:E?" ":void 0,ref:ke,role:be,style:{...Ie,...Te},tabIndex:o?-1:void 0,translate:(re===!0?"yes":void 0)??(re===!1?"no":void 0),...le,children:P})]})}))));function kR({children:e,condition:t}){return t==null?s(q,{children:e}):s(hs.Provider,{value:t,children:e})}var To={Spinner:"_1ggkr8p4 _1ggkr8p3 _1fragemzf _1fragem4q _1fragemvo _1fragemve _1fragem12k _1fragem12p _1fragem12e",appearanceVariant:{auto:"_1ggkr8p6",accent:"_1ggkr8p7 _1ggkr8p5 _1fragemxq",monochrome:"_1ggkr8p8"},sizeVariant:{"small-200":"_1ggkr8p9",small:"_1ggkr8pa",base:"_1ggkr8pb",large:"_1ggkr8pc",fill:"_1ggkr8pd"},SVG:"_1ggkr8pf _1ggkr8pe _1fragem5u _1fragemzf _1fragemvo _1fragemve"};function no({size:e="base",appearance:t="auto",accessibilityLabel:n,id:r}){const o=Fn(),i=!!(n&&o),a=IR(e),l=Y(To.Spinner,t&&To.appearanceVariant[t],To.sizeVariant[a]),c={"aria-label":n,"aria-hidden":n?void 0:"true"},u=a==="fill"||a==="large"?s(AR,{...c}):s(TR,{...c});return i?s(q,{children:n}):s("div",{className:l,id:r,children:u})}function IR(e="base"){switch(e){case"small-100":return"small";case"large-100":return"large";default:return e}}function AR(e){return s("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",className:To.SVG,focusable:"false",...e,children:s("path",{d:"M32 16c0 8.837-7.163 16-16 16S0 24.837 0 16 7.163 0 16 0v2C8.268 2 2 8.268 2 16s6.268 14 14 14 14-6.268 14-14z"})})}function TR(e){return s("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",className:To.SVG,focusable:"false",...e,children:s("path",{d:"M20 10c0 5.523-4.477 10-10 10S0 15.523 0 10 4.477 0 10 0v2a8 8 0 1 0 8 8z"})})}var En={accessibilityVisibilityVariant:{exclusive:"_19gi7yt1u _19gi7yt1t _1fragem121"},colorVariant:{base:"_19gi7yt1g",subdued:"_19gi7yt1h"},decorationVariant:{none:"_19gi7ytz _19gi7ytx _1fragem128",underline:"_19gi7yt10 _19gi7yty _1fragem129"},fontsVariant:{primary:"_19gi7ytv _19gi7ytt _1fragemyg",secondary:"_19gi7ytw _19gi7ytu _1fragemyh"},kerningVariant:{base:"_19gi7ytc",large100:"_19gi7ytd",large200:"_19gi7yte"},letterCaseVariant:{uppercase:"_19gi7yt8",lowercase:"_19gi7yt9",capitalize:"_19gi7yta",none:"_19gi7ytb"},sizeVariant:{extraSmall:"_19gi7ytm _19gi7ytf _1fragemys",small:"_19gi7ytn _19gi7ytg _1fragemyt",base:"_19gi7yto _19gi7yth _1fragemyu",medium:"_19gi7ytp _19gi7yti _1fragemyv",large:"_19gi7ytq _19gi7ytj _1fragemyw",extraLarge:"_19gi7ytr _19gi7ytk _1fragemyx",extraExtraLarge:"_19gi7yts _19gi7ytl _1fragemyy"},Text:"_19gi7yt0",toneVariant:{auto:"_19gi7yt18",neutral:"_19gi7yt19",info:"_19gi7yt1a _19gi7yt11 _19gi7yt12 _1fragemxt",success:"_19gi7yt1b _19gi7yt11 _19gi7yt13 _1fragemxu",warning:"_19gi7yt1c _19gi7yt11 _19gi7yt14 _1fragemxv",critical:"_19gi7yt1d _19gi7yt11 _19gi7yt15 _1fragemxr",custom:"_19gi7yt1e _19gi7yt11 _19gi7yt16 _1fragemxs",accent:"_19gi7yt1f _19gi7yt17 _1fragemxq"}
19,typeVariant:{address:"_19gi7yt1l",emphasis:"_19gi7yt1m",generic:"_19gi7yt1n",mark:"_19gi7yt1o _19gi7yt1i _1fragem13i",offset:"_19gi7yt1p",redundant:"_19gi7yt1q _19gi7yt1j _1fragem12a",small:"_19gi7yt1r _19gi7ytn _19gi7ytg _1fragemyt",strong:"_19gi7yt1s _19gi7yt1k _1fragemyz"}};const wR=e=>{switch(e){case"address":return"address";case"emphasis":return"em";case"generic":return"span";case"mark":return"mark";case"offset":return"i";case"redundant":return"s";case"strong":return"strong";case"small":return"small";default:return console.warn("Invalid Text’s `type`"),"span"}},G=at(function({accessibilityLive:t,accessibilityVisibility:n,children:r,color:o="base",decoration:i,dir:a,display:l="auto",fonts:c,id:u,kerning:d,lang:p,letterCase:m,size:f,translate:h,tone:g="auto",type:y="generic"},v){const P=wR(y),{className:b,styleElement:C}=Tt({display:l},{transforms:{display:tw}});return s(q,{children:[C,s(P,{"aria-hidden":n==="hidden"?!0:void 0,"aria-live":t,className:n==="exclusive"?En.accessibilityVisibilityVariant[n]:Y(En.Text,i&&En.decorationVariant[i],c&&En.fontsVariant[c],d&&En.kerningVariant[d],m&&En.letterCaseVariant[m],f&&En.sizeVariant[f],g&&En.toneVariant[g],o&&(g==="auto"||g==="neutral")&&En.colorVariant[o],y&&En.typeVariant[y],b,{notranslate:h===!1}),dir:a,id:u,lang:p,translate:(h===!0?"yes":void 0)??(h===!1?"no":void 0),ref:v,children:r})]})});function LR(e){return at((t,n)=>{switch(RT()){case"Menu":{const o={...t,size:"base",tone:t.tone||"monochrome",variant:"in-menu",textDecoration:"none",inlineAlignment:"start",inlineSize:"fill"};return s("li",{children:s(e,{...o,ref:n})})}case"Sheet":{const o={...t,size:"small"};return s(e,{...o,ref:n})}case"Banner":{const o={...t,tone:t.tone==="auto"||typeof t.tone>"u"&&t.variant!=="plain"?"monochrome":t.tone};return s(e,{...o,ref:n})}default:return s(e,{...t,ref:n})}})}var RR="_1m2hr9gj _1m2hr9gi _1fragem12w _1fragemws _1fragemyd _1fragem126 _1fragem12n _1fragem12p _1fragem12e _1fragemyk",xR={primary:"_1m2hr9g1b _1m2hr9g17 _1fragem12d","shop-pay":"_1m2hr9g1c _1m2hr9g17 _1fragem12d",secondary:"_1m2hr9g1d _1m2hr9g18 _1fragem12d",tert
19iary:"_1m2hr9g1e _1m2hr9g19 _1fragem12d",plain:"_1m2hr9g1f _1m2hr9g1a _1fragem12p _1fragem12n _1fragem12d"},yt={borderVariant:{blockEnd:"_1m2hr9g14",full:"_1m2hr9g15",none:"_1m2hr9g16"},colorLayerVariant:{primary:"_1m2hr9g1l _1m2hr9g1j _1fragemy9",secondary:"_1m2hr9g1m _1m2hr9g1k _1fragemya",tertiary:"_1m2hr9g1n",plain:"_1m2hr9g1o","shop-pay":"_1m2hr9g1p"},Content:"_1m2hr9gx _1m2hr9gw _1fragem11z _1fragem12j _1fragem12d _1fragem12q",disabled:"_1m2hr9g2c _1m2hr9g2b _1fragem11z",displayVariant:{block:"_1m2hr9gm _1m2hr9gk _1fragem5u",inline:"_1m2hr9gn _1m2hr9gl _1fragem6e"},editorDisabled:"_1m2hr9g2d",forcedColorsPrimaryFill:"_1m2hr9g2e",inlineAlignmentVariant:{center:"_1m2hr9gr _1m2hr9gp _1fragem64 _1fragembj _1fragem124",start:"_1m2hr9gs",end:"_1m2hr9gt _1m2hr9gq _1fragem64 _1fragembt _1fragem125"},loading:"_1m2hr9gv _1m2hr9gu _1fragem11z _1fragemyb",LoadingContent:"_1m2hr9gz _1m2hr9gy _1fragem12j _1fragem12d _1fragem12q _1fragem64 _1fragem19",ExtendedLoadingContent:"_1m2hr9g11 _1m2hr9g10 _1fragem12q _1fragem12y",segmentVariant:{start:"_1m2hr9g2f",end:"_1m2hr9g2g"},Spinner:"_1m2hr9g13 _1m2hr9g12 _1fragemwi _1fragem109 _1fragem113",sizeVariant:{baseSmall:"_1m2hr9g1v _1m2hr9g1u",baseBase:"_1m2hr9g1w _1m2hr9g1u",baseLarge:"_1m2hr9g1x _1m2hr9g1u",baseExtraLarge:"_1m2hr9g1y _1m2hr9g1u",smallSmall:"_1m2hr9g1z _1m2hr9g1u",smallBase:"_1m2hr9g20 _1m2hr9g1u",smallLarge:"_1m2hr9g21 _1m2hr9g1u",smallExtraLarge:"_1m2hr9g22 _1m2hr9g1u",mediumSmall:"_1m2hr9g23 _1m2hr9g1u",mediumBase:"_1m2hr9g24 _1m2hr9g1u",mediumLarge:"_1m2hr9g25 _1m2hr9g1u",mediumExtraLarge:"_1m2hr9g26 _1m2hr9g1u",largeSmall:"_1m2hr9g27 _1m2hr9g1u",largeBase:"_1m2hr9g28 _1m2hr9g1u",largeLarge:"_1m2hr9g29 _1m2hr9g1u",largeExtraLarge:"_1m2hr9g2a _1m2hr9g1u"},textDecorationVariant:{underline:"_1m2hr9g1h _1m2hr9g1g _1fragem129",none:"_1m2hr9g1i"},toneVariant:{critical:"_1m2hr9g1q",monochrome:"_1m2hr9g1r",neutral:"_1m2hr9g1s",custom:"_1m2hr9g1t"},verticalAlignVariant:{"text-bottom":"_1m2hr9go"},inMenu:"_1m2hr9g2h",inert:"_1m2hr9g2i _1fragemz0"};const MR=ci(Oc(Nc(LR(at(function({accessibilityLabel:t,accessibilityLive:n,children:r,className:o,disabled:i,command:a,commandFor:l,display:c="block",href:u,id:d,inlineAlignment:p="center",inlineSize:m="auto",loading:f,loadingLabel:h,loadingMode:g="auto",onClick:y,onFocus:v,onMouseEnter:P,overlay:b,segment:C,size:I="base",textDecoration:S,target:k="auto",tone:E="auto",type:T="button",variant:A="auto",verticalAlign:R="baseline",...L},M){const D=i?void 0:u,N=ba(y)?()=>y?.():void 0,U=ba(v)?()=>v?.():void 0,z=ba(P)?()=>P?.():void 0,O=Wr(M),K=A==="auto"?"secondary":A,X=K==="shop-pay"||E==="auto"?"neutral":E,{className:ne,style:$,styleElement:J}=Tt({inlineSize:m},{transforms:{inlineSize:NR}}),ee=ln(),te=Fn(),W=BS(I),{primaryButton:{border:he="none"},secondaryButton:{border:re="full"},link:{typographyDecoration:de="underline"}}=rt(),le=ai(),_e=Bn(),ae=$T(),ge=!!i&&!ae,ke=K==="plain",we=K==="in-menu",Ie=!f&&ge?"full":he,j=(()=>{switch(K){case"tertiary":return"none";case"secondary":return re;default:return Ie}})(),Z=S||(X==="monochrome"?"underline":de),fe=Y(RR,(f||!ge)&&!ke&&!we&&X==="neutral"&&yt.colorLayerVariant[K],xR[we?"plain":K],W&&!ke&&Object.entries(W).map(([me,Ne])=>yt.sizeVariant[`${me}${Ne.charAt(0).toUpperCase()}${Ne.slice(1)}`]),j&&!ke&&yt.borderVariant[j],(K==="primary"||K==="shop-pay")&&yt.forcedColorsPrimaryFill,yt.displayVariant[c],R==="text-bottom"&&yt.verticalAlignVariant[R],yt.toneVariant[X],ne,(ge||_e)&&yt.disabled,ae&&i&&yt.editorDisabled,_e&&yt.inert,f&&yt.loading,yt.textDecorationVariant[ke?Z:"none"],C&&yt.segmentVariant[C],we&&yt.inMenu,o),be=h||ee("processing"),Te=s("span",{className:Y(yt.Content,p&&yt.inlineAlignmentVariant[p]
19),"aria-hidden":f||void 0,children:r}),Se=s("span",{className:Y(yt.LoadingContent,p&&yt.inlineAlignmentVariant[p],!te&&yt.Spinner),dir:"auto",children:[s(no,{accessibilityLabel:be}),g==="extended"&&!te&&s("span",{className:yt.ExtendedLoadingContent,dir:"auto",children:s(G,{children:be})})]}),Ae=nr(),Ue=Ae?.activatorAttributes,ce=typeof f<"u";if(D&&l===void 0)return s(Gr.Provider,{value:!0,children:[J,s(_s,{ariaBusy:ce?f:void 0,ariaLabel:f?void 0:t,ariaLive:ce?"polite":n,className:fe,href:D,id:d,onClick:y,onFocus:v,onMouseEnter:P,overlay:b,ref:O,style:$,target:k,...L,children:[Te,f&&Se]})]});const ie=Mc(Ae,{onClick:N,onFocus:U,onMouseEnter:z});return s(Gr.Provider,{value:!0,children:[J,s("button",{"aria-busy":ce?f:void 0,"aria-hidden":_e?!0:void 0,"aria-label":f?void 0:t,"aria-live":ce?"polite":n,className:fe,disabled:i||f,form:T==="submit"&&le?.nested?le.id:void 0,id:d,ref:O,style:$,type:l?"button":T,tabIndex:_e?-1:void 0,...ie,...Ue,...L,children:[Te,f&&Se]})]})}))))),an=MR;function NR(e){if(e!=="legacy-default")return e==="fill"?"100%":Wi(e==="auto"?"fit-content":e)}function ba(e){return typeof e=="function"}var ho={Link:"s2kwpi1 s2kwpi0 _1fragemws _1fragem12n _1fragem12p _1fragem12d _1fragem12u _1fragemxw _1fragem12v _1fragemyk",toneVariant:{neutral:"s2kwpi2",monochrome:"s2kwpi3"},textDecorationVariant:{underline:"s2kwpi5 s2kwpi4 _1fragem129",none:"s2kwpi6"},displayVariant:{inline:"s2kwpi8",block:"s2kwpi9 s2kwpi7 _1fragem5u _1fragemzg"},verticalAlignVariant:{"text-bottom":"s2kwpia"}};function ut({accessibilityLabel:e,accessibilityLive:t,command:n="--auto",commandFor:r,children:o,display:i="inline",href:a,id:l,lang:c,onClick:u,onFocus:d,onMouseEnter:p,target:m="auto",textDecoration:f,tone:h="auto",verticalAlign:g="baseline",overlay:y,...v}){const{link:{typographyDecoration:P="underline"}}=rt(),b=g==="text-bottom"?ho.verticalAlignVariant[g]:void 0;return!a||r!==void 0?s(an,{accessibilityLabel:e,accessibilityLive:t,command:n,commandFor:r,display:i,onClick:u,onFocus:d,onMouseEnter:p,id:l,overlay:y,textDecoration:f,tone:h==="auto"?"neutral":h,variant:"plain",verticalAlign:g,...v,children:o}):s(_s,{ariaLabel:e,ariaLive:t,command:n,commandFor:r,className:Y(ho.Link,ho.toneVariant[h==="auto"?"neutral":h],ho.textDecorationVariant[f||(h==="monochrome"?"underline":P)],ho.displayVariant[i],b),href:a,id:l,lang:c,onClick:u,onFocus:d,onMouseEnter:p,overlay:y,target:m,...v,children:o})}var op={Stack:"r0qqvk1 r0qqvk0 _1fragemws _1fragem64",overflowHidden:{hidden:"r0qqvk3 r0qqvk2 _1fragemup _1fragemv4",visible:"r0qqvk4"}};const Q=eo(fg(at(function({accessibilityCurrent:t,accessibilityLabel:n,accessibilityRole:r="generic",accessibilityLabelledBy:o,alignContent:i="normal",alignItems:a="normal",background:l,backgroundHoverAndFocus:c,blockSize:u="auto",border:d="none",borderRadius:p="none",borderStyle:m,borderWidth:f,children:h,className:g,columnGap:y,display:v="auto",direction:P="block",gap:b,id:C,inlineSize:I="auto",justifyContent:S="normal",maxBlockSize:k="none",maxInlineSize:E="none",minBlockSize:T="0",minInlineSize:A="0",overflow:R="visible",padding:L="none",paddingBlock:M,paddingInline:D,paddingBlockEnd:N,paddingBlockStart:U,paddingInlineEnd:z,paddingInlineStart:O,rowGap:K,...X},ne){const{className:$,style:J,styleElement:ee}=Tt({alignContent:i,alignItems:a,backgroundColor:l,backgroundColorHoverAndFocus:c,..._r({border:d,borderStyle:m,borderWidth:f}),blockSize:u,borderRadius:p,columnGap:y,display:v,flexDirection:P,flexWrap:P,gap:b,inlineSize:I,justifyContent:S,maxBlockSize:k,maxInlineSize:E,minBlockSize:T,minInlineSize:A,padding:L,paddingBlock:M,paddingBlockEnd:N,paddingBlockStart:U,paddingInline:D,paddingInlineEnd:z,paddingInlineStart:O,rowGap:K},{transforms:{display:Sc,flexDirection:re=>re==="block"?"column":"row",flexWrap:re=>re==="block"?"nowrap":"wrap"}}),te=Qr(),{Element:W,role:he}=ui(r,{defaultElement:te?"span":"div"});return s(q,{children:[ee,s(W,{className:Y(op.Stack,op.overflowHidden[R],$,g),role:he,"aria-label":n,"aria-current":t,"aria-labelledby":o,style:J,id:C,...X,ref:ne,children:h})]})})));var ip={Bumper:"_1fyvcoo0 _1fragemwn _1fragem11z _1fragem11k"};
19function Jc({children:e}){const t=V(null),n=V(null),r=V(null),o=V(document.activeElement);Dt(()=>{const a=r.current;if(a){const c=rp(a);c?c.focus():a.focus()}const l=o.current;if(l)return()=>{l.focus()}},[]);const i=a=>{const l=r.current;if(l){const c=a?rp(l):CR(l);c?c.focus():l.focus()}};return s(q,{children:[s("button",{className:ip.Bumper,ref:t,"aria-hidden":"true",onFocus:()=>i(!1),type:"button"}),HP(e,{tabIndex:-1,ref:r}),s("button",{className:ip.Bumper,ref:n,"aria-hidden":"true",onFocus:()=>i(!0),type:"button"})]})}const Wo="scrollbar-gutter",cy="stable";function Xc(){const[e,t]=oe(!1),n=V(0),r=V(null),o=V(null),i=x(()=>{if(!document.body||r.current)return;const{position:l,top:c,overflow:u}=document.body.style,d=DR(document.documentElement);r.current={position:l,top:c,overflow:u},o.current=d,n.current=window.scrollY,document.body.style.position="fixed",document.body.style.top=`-${n.current}px`,document.body.style.overflow="hidden",t(!0)},[]),a=x(()=>{if(!document.body)return;o.current!==null&&(VR(document.documentElement,o.current),o.current=null);const l=r.current;r.current=null,l&&l.position!=="fixed"&&(document.body.style.position=l.position,document.body.style.top=l.top,document.body.style.overflow=l.overflow,window.scrollTo(0,n.current)),t(!1)},[]);return F(()=>()=>{a()},[a]),{isLocked:e,lock:i,unlock:a}}function DR(e){if(!OR(e))return null;const t=e.style.getPropertyValue(Wo);return e.style.setProperty(Wo,cy),t}function OR(e){return FR(e)&&!BR(window.getComputedStyle(e).getPropertyValue(Wo))}function FR(e){return window.innerWidth>e.clientWidth}function BR(e){return e?.split(/\s+/).includes(cy)??!1}function VR(e,t){t?e.style.setProperty(Wo,t):e.style.removeProperty(Wo)}const UR="hYGiX",zR="yF8Vq",HR="UGCQu",Pa={background:UR,invisibleBackground:zR,content:HR};function uy({children:e,isInvisible:t,onClick:n}){const{lock:r}=Xc(),{i18n:o}=_();F(()=>{r()},[r]);const i=w(()=>t?.value??!1),a=s("div",{children:s(ve,{when:i,fallback:s(q,{children:[s("div",{className:Pa.background}),s("div",{className:Pa.content,children:e})]}),children:s("div",{className:Pa.invisibleBackground,onClick:n,role:"button",tabIndex:0,"aria-label":o.translate("wallets.scrim.cancel"),onKeyDown:l=>{(l.key==="Escape"||l.key==="Enter")&&n&&n()},children:e})})});return s(Sr,{children:s(Jc,{children:a})})}function qR({isOpen:e,isInvisible:t,children:n,onClick:r}){return s(ve,{when:e,children:s(uy,{isInvisible:t,onClick:r,children:n})})}function GR({isOpen:e,walletName:t,handleClose:n,handleFocus:r}){return s(qR,{isOpen:e,children:s($R,{handleClose:n,walletName:t,handleFocus:r})})}function $R({handleClose:e,handleFocus:t,walletName:n}){const{i18n:r}=_();return s(Pe,{children:s(Q,{gap:"large-400",alignItems:"center",children:[s(G,{size:"large",children:r.translate("wallets.scrim.continue_purchase_in_window",{walletName:t?s(ut,{tone:"monochrome",onClick:t,children:n}):n})}),s(G,{children:[s(ut,{tone:"monochrome",onClick:e,children:r.translate("wallets.scrim.cancel")})," ",r.translate("wallets.scrim.and_return_to_checkout")]})]})})}function WR(){const{checkout:{offsitePopupController:e}}=_(),t=Is();return s(GR,{isOpen:e.isOpen,walletName:t.value??"",handleClose:()=>e.close({runCancelCallback:!0}),handleFocus:()=>e.focus()})}const dy=ft("RequestContext");function Qc(){return Ut(dy)}const YR=["AE","HK","IE","ZA","ES","KR","PA","PT","ID","TH","CN","JP"],Zc=["JP"];function As(e,{hiddenFields:t,multiline:n,countryFormat:r,displayName:o}={}){const i=py(e,o);if(!i)return;const{addr:a,details:l,zoneFormat:c}=i;return ol(a,l,t,n,r,c)}function h7(e,{hiddenFields:t,countryFormat:n,displayName:r}={}){const o=py(e,r);if(!o)return;const{addr:i,details:a,zoneFormat:l}=o;return VS(i,a,t,n,l)}function py(e,t){const{i18n:n}=_(),{details:r}=Yt(e?.countryCode);if(!e||!r&&e.countryCode)return;const o=r??US(void 0,n),i=e.countryCode&&YR.includes(e.countryCode)?"explicit":"short";return{addr:t??!0?e:{...e,firstName:void 0,lastName:void 0},details:o,zoneFormat:i}}function g7(e){const{details:t,loading:n}=Yt(e?.countryCode),r={countryName:void 0,zoneName:void 0,loading:n};if(!t||!e||n)return r;const o=t.zones.find(i=>i.code===e.zoneCode)?.name;return{countryName:t.name,zoneName:o,loading:n}}function y7(e){return x(t=>{e.value={coordinates:t.coordinates,address1:t.address1??"",address2:t.address2??"",city:t.city,zoneCode:t.zoneCode,countryCode:t.countryCode,postalCode:t.postalCode,district:t.district,subdistrict:t.subdistrict,streetName:t.streetName,streetNumber:t.streetNumber,line2:t.line2,neighborhood:t.neighborhood}},[e])}const eu=e=>{const t=x((o,i)=>{e[o].value=i},[e]),n=x(()=>{tn(()=>{e.address1.value=void 0,e.streetName.value=void 0,e.streetNumber.value=void 0,e.address2.value=void 0,e.line2.value=void 0,e.neighborhood.value=void 0,e.city.value=void 0,e.company.value=void 0,e.coordinates.value=void 0,e.countryCode.value=void 0,e.firstName.value=void 0,e.lastName.value=void 0,e.name.value=void 0,e.phone.value=void 0,e.postalCode.value=void 0,e.zoneCode.value=void 0,e.district.value=void 0,e.subdistrict.value=void 0})},[e]),r=x(o=>{e[o].value=void 0},[e]);return{addressErrors:e,setAddressError:t,resetAddressErrors:n,resetAddressFieldErrors:r}},jR=(e,t)=>{function n(o){t[o].value=void 0,e[o].value=void 0}function r(){Object.entries(t).forEach(([o])=>{Object.keys(e).includes(o)&&e[o].peek()!==void 0&&(t[o].value=void 0)}),tn(()=>{e.address1.value=void 0,e.streetName.value=void 0,e.streetNumber.value=void 0,e.address2.value=void 0,e.line2.value=void 0,e.neighborhood.value=void 0,e.city.value=void 0,e.countryCode.value=void 0,e.postalCode.value=void 0,e.zoneCode.value=void 0})}return{resetAddressSuggestions:r,resetAddressFieldSuggestions:n}};function my(e,t,n,r){const{i18n:o,checkout:i}=_(),{geolocation:a}=Qc(),l=i.configuration.addressSettings.nonBillingAddressSettings.value,c=H().deliveryNext,{details:u}=Yt(e),{getIsMobilePhoneFieldVisible:d}=KR(),p=i.address.extendedAddressMode.get(e),m=r===void 0?p:r,f=B(()=>u??a.country,[u,a.country]),h=B(()=>zS({country:f,mode:m}),[f,m]),g=B(()=>n??l,[n,l]),y=B(()=>t??[{value:f.code,label:f.name}],[t,f]);return x((P,b)=>HS(P,b,{addressSettings:g,countryDetails:u,fallbackCountry:a.country,editFormat:h,availableCountries:y,deliveryNextValue:c.value,isMobilePhoneFieldVisible:d(b),additionalFieldsEnabled:m!==null,i18n:o}),[g,u,h,a.country,m,y,c,d,o])}const KR=()=>{const{checkout:{identity:e},shopPay:t}=_(),n=e.current.value==="shopPay",r=t.user.isAuthenticatedUser;return{getIsMobilePhoneFieldVisible:x(i=>
19n&&!r.value&&i==="shipping",[n,r])}};function v7(){const{shippingAddress:e}=se(),{i18n:t}=_();return w(()=>{const n=e.fields.firstName.value,r=e.fields.lastName.value,o=e.value.oneTimeUse;return!il(n)||!il(r)||o?null:t.formatName(n,r,!0)})}function JR(e){const[t,n]=oe(null),[r,o]=oe([]);return $e(()=>{Object.entries(e).forEach(([i,a])=>{const l=a.value;n(c=>{let u=c===null?{}:{...c};return l?u={...u,[i]:l}:delete u[i],Object.keys(u).length===0?null:u})})}),F(()=>{if(t){const i=[];Object.keys(t).forEach(a=>{const{message:l,origin:c,type:u}=t[a];i.push({message:l,code:void 0,field:a,origin:c,type:u})}),o(i)}},[t]),r}function _7(e,t,n,r){const{i18n:o}=_();return function(i){if(e&&n.has(e)){if(i==="label")return o.translate("contact",{scope:r?`optional_${e}`:e});const a=`${n.get(e)}_${i}`;return o.translate("contact",{scope:r?`optional_${a}`:a})}return t}}function XR({address:e,nameLinePosition:t,addressDisplayName:n,showPhone:r}){const{countryCode:o=""}=e,{details:i,loading:a}=Yt(o),{i18n:l}=_();return a?sp(e,t,n,void 0,l.locale,r):sp(e,t,n,i,l.locale,r)}function QR({firstName:e,lastName:t,countryDetails:n,locale:r}){const o=n?.formatting.show;if(!o)return ur([e,t]);let i="";const a=o.split("_").find(l=>l.includes("{firstName}")||l.includes("{lastName}"));if(a){let l=a.replace("{lastName}",t).replace("{firstName}",e);if(r){const c=r.toLowerCase(),u=c.startsWith("ja")||c.startsWith("zh")||c.startsWith("ko");l.includes("様")&&!c.startsWith("ja")&&(l=l.replace("様","")),u?i=l.trim().replace(/\s+/g,""):i=l.trim().replace(/\s\s+/g," ")}}else i=ur([e,t]);return i}function sp(e,t,n,r,o,i=!1){const{firstName:a="",lastName:l="",address1:c="",address2:u="",city:d="",postalCode:p="",company:m="",zoneCode:f="",countryCode:h=""}=e,g=m;let y=ur([a,l]),v=ur([c,u]),P=ur([d,f??"",p,h],", ");if(r){const C=Zc.includes(h),I={countryFormat:C?"explicit":"short",zoneFormat:C?"explicit":"short"};y=QR({firstName:a,lastName:l,countryDetails:r,locale:o});const S=["city","zoneCode","postalCode","countryCode","firstName","lastName","company","phone"],k=["address1","address2","firstName","lastName","company",...i?[]:["phone"]];v=ol(e,r,S,!1,I.countryFormat,I.zoneFormat).replace(/\s+/g," "),P=ol(e,r,k,!1,I.countryFormat,I.zoneFormat).replace(/\s+/g," ")}if(n)return{nameLine:y,companyLine:g,primary:n,secondary:ur([v,P])};const b=ur([t==="inline"?y:"",g,v],", ");return{nameLine:y,companyLine:g,primary:b,secondary:P}}function b7(e){const t=se(),n=`${e}Address`,r=t[n].value,{primary:o,secondary:i}=XR({address:r,nameLinePosition:"inline"});return`${o} ${i}`}function ZR(e){const{checkout:t}=_(),n=t.configuration.addressSettings.nonBillingAddressSettings.value,{details:r}=Yt(e),o=r?t.address.extendedAddressMode.getFormatFromCountry(r):void 0;return B(()=>GS({countryDetails:r,format:o,addressSettings:n}),[r,o,n])}function tu(e,t){const{checkout:n}=_(),r=t??n.configuration.addressSettings.nonBillingAddressSettings.value,{details:o}=Yt(e);return x((i,a)=>qS({addressType:i,violations:a,countryDetails:o,format:o?n.address.extendedAddressMode.getFormatFromCountry(o):void 0,addressSettings:r}),[o,r,n.address.extendedAddressMode])}function ur(e,t=" "){return e.filter(Boolean).join(t)}function Yr(e){return typeof e=="string"?e.trim()!=="":e!=null}function ap(e){return Object.entries(e).filter(([n,r])=>Wl(n)&&Yr(r)).map(([n])=>n)}function lp(e){return Yr(e.address1)||Yr(e.streetName)}function ex(e,t,n){if(typeof n!="string")return!1;if(t==="address1"){const r=jS({countryCode:e.countryCode,address1:void 0,address2:void 0,line2:void 0,streetName:e.streetName,streetNumber:e.streetNumber});return Yr(r)&&n.trim()===r?.trim()}if(t==="address2"){const r=KS({countryCode:e.countryCode,address1:void 0,address2:void 0,line2:e.line2,neighborhood:e.neighborhood});return Yr(r)&&n.trim()===r?.trim()}return!1}function cp(e){const t=Object.fromEntries(Object.entries(e).filter(([n,r])=>Wl(n)&&Yr(r)&&!ex(e,n,r)).map(([n,r])=>[n,typeof r=="string"?r.trim():r]).sort(([n],[r])=>n.localeCompare(r)));return wf(JSON.stringify(t))}function tx(e){const t=e.filter(n=>n.value&&typeof n.value=="string"&&n.value.trim()!=="");return{cacheKey:t.map(n=>`${n.key}:${wf(n.value.trim())}`).join("|"),keysOnly:t.map(n=>n.key)}}function Sa(e,t,n,r,o,i,a){a.monorailEvent({schemaId:"checkout_address_completion/1.0",payload:{shopId:parseInt(Be(r),10),checkoutToken:o||"unknown",country:e||"unknown",section:n,completedFields:t,isBillingDefaultToShippingAddress:i}})}function nx(){const e=V(new Set),{userEvents:t,shop:{id:n,sameBillingAndShippingAddress:r},source:{checkoutSessionIdentifier:o}}=_(),i=H(),{value:a}=i.shippingAddress,{value:l}=i.billingAddress,{value:c}=i.localizationExtensions;return x(({errors:u,reasons:d})=>{if(a&&lp(a)){const p=`shipping:${cp(a)}`;e.current.has(p)||!u?.some(m=>$S.has(m.code))&&!d?.includes(Vo.InvalidAddress)&&(Sa(a.countryCode??"unknown",ap(a),"shipping_address",n,o,r,t),e.current.add(p))}if(l&&lp(l)){const p=`billing:${cp(l)}`;e.current.has(p)||!u?.some(m=>WS.has(m.code))&&!d?.includes(Vo.InvalidAddress)&&(Sa(l.countryCode??"unknown",ap(l),"billing_address",n,o,r,t),e.current.add(p))}if(c&&c?.length>0){const{cacheKey:p,keysOnly:m}=tx(c);if(m.length>0){const f=`localization:${p}`;e.current.has(f)||u?.some(h=>YS.has(h.code))||(Sa(a?.countryCode??l?.countryCode??"unknown",m,"localized_id",n,o,r,t),e.current.add(f))}}},[a,l,c,n,o,r,t])}function P7(){const e=se().shippingAddress.value,t=!Lf(e),n=As(e,{hiddenFields:["phone"]});return!t&&n?n:null}function up(e){return e?typeof e=="object"&&"value"in e?e.value&&typeof e.value=="string"?e.value:e.textValue?e.textValue:"":typeof e=="string"?e:"":""}function rx(){const e=wn(),{message:t,code:n}=$0();F(()=>{(t||n)&&e("receiptError",{error:{message:t,code:n||"",silencedViolation:!1,origin:"server",type:"submit-violation"},timestamp:new Date})},[e,t,n]);const{directPaymentErrors:r,generalPaymentError:o}=se();$e(()=>{const c=r.name.value;c&&_t(()=>{const{message:u,origin:d}=c;e("paymentError",{error:{message:u,code:"payment_name_error",silencedViolation:!1,origin:d,type:d==="client"?"inline-validation":"submit-violation"},timestamp:new Date})})}),$e(()=>{const c=r.verificationValue.value;c&&_t(()=>{const{message:u,origin:d}=c;e("paymentError",{error:{message:u,code:"payment_cvv_error",silencedViolation:!1,origin:d,type:d==="client"?"inline-validation":"submit-violation"},timestamp:new Date})})}),$e(()=>{const c=r.number.value;c&&_t(()=>{const{message:u,origin:d}=c;e("paymentError",{error:{message:u,code:"payment_number_error",silencedViolation:!1,origin:d,type:d==="client"?"inline-validation":"submit-violation"},timestamp:new Date})})}),$e(()=>{const c=r.expiry.value;c&&_t(()=>{const{message:u,origin:d}=c;e("paymentError",{error:{message:u,code:"payment_expiry_error",silencedViolation:!1,origin:d,type:d==="client"?"inline-validation":"submit-violation"},timestamp:new Date})})}),$e(()=>{const c=o.value;c&&_t(()=>{e("paymentError",{error:{message:c,code:"general_payment_error"},timestamp:new Date})})});const i=W0();F(()=>
19{i?.forEach(({message:c,code:u,field:d,origin:p,type:m})=>{e("violationError",{error:{message:up(c),code:u,field:d,origin:p,type:m},timestamp:new Date})})},[e,i]);const{deliveryMethodsAddressErrors:a}=xt(),l=JR(a);return F(()=>{l?.forEach(({message:c,code:u,field:d,origin:p,type:m})=>{(c||u||d||p||m)&&e("addressError",{error:{message:up(c),code:u,field:d,origin:p,type:m,silencedViolation:!1},timestamp:new Date})})},[e,l]),null}function ox(){const e=H().deliveryNext;return w(()=>{const t=e.value;if(!t||t.status==="unavailable")return!1;const n=t.lines.filter(zl);if(n.length!==1)return!1;const[r]=n;return r?r.methods.some(o=>o.methodType==="LOCAL"):!1})}function S7(e){return e}function ix(e,t){const[n]=Yl(e,[t]);if(!n?.method?.walletParams)return null;const{checkout_session_id:r}=n.method.walletParams;return r}function fy(e,t){if(t)return e.find(n=>n.deliveryStrategyHandle===t)}var Qe=(e=>(e.TaxExemption="TaxExemption",e.SellingPlanDigest="SellingPlanDigest",e.CompanyLocationChanged="CompanyLocationChanged",e.ShippingAddressIsMissing="ShippingAddressIsMissing",e.PaymentsViolations="PaymentViolations",e.DeliveryViolations="DeliveryViolations",e.DeliveryAddressValidationErrors="DeliveryAddressValidationErrors",e.ReductionViolations="ReductionViolations",e.ContactInformationViolations="ContactInformationViolations",e.TipsViolations="TipsViolations",e.OtherViolations="OtherViolations",e.PaymentSheetViolations="PaymentSheetViolations",e.MerchandiseQuantityRulesNotMet="MerchandiseQuantityRulesNotMet",e.PaymentMethodIncompatibleWithPaymentTerms="PaymentMethodIncompatibleWithPaymentTerms",e))(Qe||{});function hy(){const{client:e,shop:t}=_();if(!t.hasFlagEnabled(Uo))return null;const n=e.unstable_getSerialization("experiments");return JS(n)}function hi(){const{shop:e}=_(),t=e.hasFlagEnabled(XS),n=e.hasFlagEnabled(Uo);return t||n}function Ts(e){return e?.type==="thankYou"||e?.type==="postPurchase"}function E7(e,t){return e.greenPath.find(n=>n.route===t)!==void 0}const gy=()=>{const{i18n:e}=_(),t=H().paymentFlexibilityPaymentTermsTemplate,n=On();return w(()=>{const r=t.value;if(n.value&&!r)return e.translate("notice_banner.payment_method_not_available_with_review_requirement");if(r)return r.type==="FULFILLMENT"?e.translate("notice_banner.payment_method_not_available_with_fulfillment_terms"):r.type==="NET"?e.translate("notice_banner.payment_method_not_available_with_payment_terms",{paymentTerms:r.translatedName}):e.translate("notice_banner.payment_method_not_available_with_fixed_terms")})},yy=ft("ShellContext");function sx({children:e,shell:t}){return s(yy.Provider,{value:t,children:e})}function nu(){return Ut(yy)}function Fe(){const e=nu(),t=V();if(t.current!=null&&t.current.shell!==e&&(t.current=void 0),t.current==null){const n=new Map,r={};for(const o of Object.keys(e.configuration))Object.defineProperty(r,o,{enumerable:!0,get(){return n.has(o)||n.set(o,It(()=>e.configurationSignal.value[o])),n.get(o).value}});t.current={shell:e,watchedKeysSignals:n,reactiveConfiguration:r}}return t.current.reactiveConfiguration}function vy(){const{checkout:{configuration:e}}=_(),{orderSummary:t}=Fe(),n=e.orderSummary?.currencyBadgeVisibility??t.currencyBadgeVisibility;return n?n==="VISIBLE":!0}function ws(e){const{checkout:t,observability:n,router:r,shop:o}=_(),i=e===void 0||(Array.isArray(e)?e:[e]).some(c=>o.hasFlagEnabled(c)),a=x(c=>{i&&(t.unstable_forceCheckoutLayoutToOnePage(),_y(n,{...c,result:"success"}))},[t,i,n]),l=x((c={wallet:null})=>{if(!i||!t.isCheckoutLayoutForcedToOnePage.value)return;const u={wallet:c.wallet};n.counter({name:"wallet_3page_vaulted_review_exited",value:1,attributes:u}),n.log("wallet_3page_vaulted_review_exited","Exited the forced one-page wallet vaulted review",u),r.navigate("/information",{replace:!0}),t.unstable_clearForcedCheckoutLayout()},[t,i,n,r]);return B(()=>({forceOnePageCheckoutLayout:a,clearForcedCheckoutLayout:l}),[l,a])}function _y(e,t){e.counter({name:"wallet_3page_vaulted_review_layout_switch_attempt",value:1,attributes:t}),e.log("wallet_3page_vaulted_review_layout_switch_attempt","Attempted to force wallet from three-page checkout to one-page vaulted review",t)}function ax(){const{i18n:e}=_(),t=lx(),{availableWallets:n}=Ye(),r=We(n);return w(()=>
19{if(!(r.value.length>0||!t.value))return{code:Qe.PaymentSheetViolations,tone:"critical",localizedMessage:e.translate("payment.no_working_method_error"),nonLocalizedMessage:e.translate("payment.no_working_method_error")}})}function C7(){const e=Zr(),t=nu(),n=Dc();return w(()=>{const o=e.configurationSignal.value.colors,i=t.configurationSignal.value.main,{current:a,parent:l}=n,c=[a,l].map(d=>d?o.schemes?.[d]?.base?.background:void 0).find(d=>d&&!gd(d));if(c)return c.l<50?"light":"dark";const u=i.colorScheme?o.schemes?.[i.colorScheme]?.base?.background:void 0;return u&&!gd(u)&&u.l<50?"light":"dark"}).value}function k7(){const{shop:{customerAccountRequirement:e}}=_(),t=H().buyerIdentity,{email:n}=se();return w(()=>{const r=!!(t.value?.customerProfile&&(t.value.customerProfile.email||n.value));return!(e==="REQUIRED")&&!r})}function Er(){const{shop:e}=_(),{deliveryNext:t}=H(),{deliveryLines:n}=se(),r=Ce(),o=Af("ONE_TIME_PURCHASE");return w(()=>{if(e.shipPickupInOneOrderEnabled){if(Ts(r.value.currentDetour))return Pr(t.value);const a=n.value.filter(l=>!l.value.deliveryMethodTypes.includes("NONE"));return a.length>0&&a.every(l=>l.value.deliveryMethodTypes.some(hd))}const i=br(o.value);return hd(i?.methodType)})}function I7(){const{checkout:e}=_(),t=Er();return w(()=>!t.value&&e.isShippingRequired.value)}function A7(e){const t=H().paymentMethods;return w(()=>t.value?.find(n=>n.type==="wallet"&&n.name===e))}function T7(){const{client:e,shop:t,source:n,observability:r}=_(),o=e.unstable_getSerialization("sessionToken");return x(({postalCode:i,countryCode:a,city:l,zoneCode:c},u)=>{const d={wallet:u,postalCode:i,countryCode:a,city:l,zoneCode:c,shopId:t.id,sourceId:n.sourceId,sourceType:n.type,checkoutSessionIdentifier:n.checkoutSessionIdentifier,sessionToken:o};dA(i,a)||r.log("wallets_hooks_incomplete_postal_code_detected","Detected incomplete shipping postal code during wallet payment submission",d),xf(i,a)&&r.log("wallets_shipping_address_invalid_postal_code_detected","Detected padded postal code from wallet payment submission",d)},[r,t.id,n.sourceId,n.type,n.checkoutSessionIdentifier,o])}function lx(){const e=H().paymentMethods,t=ze("paymentMethods");return w(()=>t.value||!e.value||e.value?.length===0?!1:!!e.value?.every(n=>n.type==="wallet"||n.type==="walletsPlatform"||n.type==="giftCard"))}function by(){try{const e=window.__WALLET_TIMEOUT_MULTIPLIER;if(e==null)return 1;const t=Number(e);return!Number.isFinite(t)||t<1?1:Math.min(t,10)}catch{return 1}}function w7(){return 1e4*by()}function L7(){return 45e3*by()}function cx(e){const t=Py(e);return w(()=>t.value!==null)}function ux(e){const t=Py(e),n=e.didIncrementUnusablePartialAddressMetric,{observability:r}=_();F(()=>{const o=t.value;n.value||o===null||(r.leaveErrorBreadcrumb("Hiding some wallets due to unusable partial address",{wallet:o}),r.counter({name:"wallets_unusable_partial_address",value:1,attributes:{wallet:o.toString()}}),n.value=!0)},[t.value,r,n])}function Py(e){const t=e.inMemoryApplePayParts.paymentSheetError,n=e.inMemoryGooglePayParts.paymentSheetError;return w(()=>t.value?.type==="unusable_partial_address"?"APPLE_PAY":n.value?.type==="unusable_partial_address"?"GOOGLE_PAY":null)}function dx(e){const{i18n:t}=_(),n=hi(),o=gy().value,i=["wallet_cart_not_ready","localization_extension_field_error","wallet_processing_failed"],a=[{queryParam:"wallet_unsupported_apple_pay_payment_method",errorMessage:t.translate("wallets.errors.unavailable_terminal.instructions"),tone:"critical"},{queryParam:"wallet_unsupported_google_pay_payment_method",errorMessage:t.translate("wallets.errors.unavailable_terminal.instructions"),tone:"critical"},{queryParam:"wallets_payment_invalid_country",errorMessage:t.translate("wallets.errors.generic"),tone:"critical"},{queryParam:"wallet_shipping_country_unavailable",errorMessage:t.translate("shipping_errors.unavailable_address_country"),tone:"critical"},{queryParam:"wallet_currency_change",errorMessage:t.translate("change_country.cart_updated_based_on_country"),tone:"info"},{queryParam:"wallet_captcha_required",errorMessage:t.translate("captcha.errors.not_solved"),tone:"info"},{queryParam:"wallet_payment_method_not_applicable",errorMessage:o||"",tone:"info",condition:()=>!!o},{queryParam:"wallet_invalid_payment_deferred_payment_required",errorMessage:t.translate("notice_banner.company_location_changed"),tone:"info"},{queryParam:"wallet_not_enough_stock",errorMessage:t.translate("stock.price_and_quantity_update.description"),tone:"info"},{queryParam:"wallet_price_increased",errorMessage:t.translate("payment_errors.order_total_changed"),tone:"info"},{queryParam:is,errorMessage:t.translate("wallets.errors.subscription_review_required"),tone:"warning",condition:()=>n},...i.map(l=>({queryParam:l,errorTitle:t.translate("notice_banner.generic_processing_error.title"),errorMessage:t.translate("notice_banner.generic_processing_error.body"),tone:"critical"}))];for(const l of a)if(e.searchParams.has(l.queryParam)){if(l.condition&&!l.condition())continue;return{queryParam:l.queryParam,errorMessage:l.errorMessage||"",errorTitle:l.errorTitle,tone:l.tone}}return{queryParam:"",errorMessage:"",tone:"info"}}function px(){const{inMemoryApplePayParts:{paymentSheetError:e,subscriptionReviewTransition:t}}=Ye(),{i18n:n,checkout:r,shop:o}=_(),i=hi(),a=o.hasFlagEnabled(In),l=r.configuration.layout.isOnePage.value,c=Ho({applePaySubscriptionsDecelerationActive:i,applePayThreePageVaultedReviewEnabled:a,isOnePageCheckout:l}),{queryParam:u,errorMessage:d,errorTitle:p,tone:m,shouldSuppressNotice:f}=Sy({applePayPaymentSheetError:e,applePaySubscriptionReviewTransition:t,isApplePaySubscriptionReviewLayoutSupported:c}),h=x(()=>({code:Qe.PaymentSheetViolations,tone:"warning",localizedMessage:n.translate("wallets.errors.subscription_review_required")}),[n]);if(u&&!f)return u===is?h():{code:Qe.PaymentSheetViolations,localizedTitle:p,tone:m,localizedMessage:d}}function Sy({applePayPaymentSheetError:e,applePaySubscriptionReviewTransition:t,isApplePaySubscriptionReviewLayoutSupported:n}={}){const{checkout:r,router:o,shop:i}=_(),a=o.currentUrl.value,l=hi(),c=i.hasFlagEnabled(Uo),u=Rf(),d=i.hasFlagEnabled(In),p=r.configuration.layout.isOnePage.value,{forceOnePageCheckoutLayout:m}=ws(In),{queryParam:f,errorMessage:h,errorTitle:g,tone:y}=dx(a),v=hy(),P=f===is&&t!==void 0&&(n??Ho({applePaySubscriptionsDecelerationActive:l,applePayThreePageVaultedReviewEnabled:d,isOnePageCheckout:p})),b=P;return F(()=>
19{if(f){P&&t&&!r.wallets.hasConsumedApplePaySubscriptionReviewParam.value&&QS({isABTestActive:c,variant:v,isCaliforniaBillingOrShippingAddress:u.value})?(p||m({wallet:"APPLE_PAY",reason:"subscriptions",asPaymentMethod:!0}),r.wallets.consumeApplePaySubscriptionReviewParam(),e&&(e.value=void 0),t.value="storefront_redirect",r.wallets.setHasActiveApplePaySubscriptionReview(!0)):P&&t?.value!==void 0&&!r.wallets.hasConsumedApplePaySubscriptionReviewParam.value&&(t.value=void 0,r.wallets.setIsDecelerating(!1));const I=new URL(a);I.searchParams.delete(f),history.replaceState(null,"",I.href)}},[e,t,v,a,m,c,u,p,f,b,P,n,r.wallets]),B(()=>({queryParam:f,errorMessage:h,errorTitle:g,tone:y,shouldSuppressNotice:b}),[f,h,g,y,b])}const R7=()=>x(e=>{const t=e.current;if(t){const n=t.getBoundingClientRect(),r=n.left+n.width/2,o=n.top+n.height/2;t.dispatchEvent(new MouseEvent("click",{bubbles:!0,cancelable:!1,clientX:r,clientY:o,screenX:window.screenX+r,screenY:window.screenY+o}))}},[]);`${ZS.portableWallets.url}`;const Yo="guest",mx="checkout_return_to_guest_checkout";function fx(e){e.searchParams.has(sl)&&(e.searchParams.delete(sl),history.replaceState(null,"",e.href))}function hx(e){e.searchParams.has(Yo)&&(e.searchParams.delete(Yo),history.replaceState(null,"",e.href))}function gx({paymentLineSignal:e,walletName:t,walletParams:n,email:r}){const o={method:{name:t,type:"walletsPlatformPaymentMethod",walletParams:n}},i=e.peek();switch(t){case xe.AmazonPay:case xe.BuyWithPrime:{const[a]=Yl(i,[t]),l=n;if(!a||!a.method.walletParams){o.method.walletParams={...l,...r?{email:r}:{}};break}const c=a.method.walletParams;o.method.walletParams={...c,...l,...r?{email:r}:{}}}}e.value=jl(i,o)}function yx(e){const t=H().paymentMethods;return w(()=>t.value?.find(n=>n.type==="walletsPlatform"&&n.name===e))}function x7(e){const t=H().paymentLines;return w(()=>t.value?.lines.find(n=>n.method.type==="walletsPlatformPaymentMethod"&&n.method.name===e))}function vx(){const{checkout:e}=_(),t=e.configuration.addressSettings.nonBillingAddressSettings;function n({addressSignal:r,buyerDetailsAddress:o}){tn(()=>{for(const[i,a]of Object.entries(o)){if(i==="__typename"||a===void 0||o.__typename==="InvalidWalletPrefillingAddress"&&!t.value.isVisible(i))continue;const l=r.fields[i];l&&(l.value=a)}})}return x(n,[t])}function M7(){const{email:e,shippingAddress:t,billingAddress:n,billingAddressOption:r,paymentLines:o}=se(),i=vx();return x((l,c)=>{c.email&&(e.value=c.email),c.prefillingShippingAddress&&i({addressSignal:t,buyerDetailsAddress:c.prefillingShippingAddress}),c.prefillingBillingAddress&&(r.value="custom",i({addressSignal:n,buyerDetailsAddress:c.prefillingBillingAddress})),c.walletParams&&gx({paymentLineSignal:o,walletName:l,walletParams:c.walletParams,email:c.email??void 0})},[n,r,e,i,o,t])}function N7(e=["phone"]){const{shippingAddress:t}=se(),n=t.value;return{formattedAddress:As(n,{hiddenFields:e}),address:n}}function _x(){const e=yx(xe.BuyWithPrime);return w(()=>{const{configurationParams:t}=e.value??{configurationParams:{}},{checkoutSupportsSplitCart:n}=t;return!!n})}var bx=(e=>(e.Api="ApplePay::Exception::API",e))(bx||{}),Px=(e=>(e.Api="PayPal::Exception::API",e.Sdk="PayPal::Exception::SDK",e.Button="PayPal::Exception::Button",e))(Px||{}),gi=(e=>(e.Available="available",e.Loading="loading",e.Error="error",e))(gi||{});function Sx({inMemoryGooglePayParts:e,hasUnusablePartialAddress:t}){const{checkout:n,shop:r}=_(),{shippingCountries:o}=r,a=n.configuration.addressSettings.nonBillingAddressSettings.value.isRequired("company"),l=e.sdkStatus.value,c=e.buttonStatus.value,u=n.configuration.layout.isOnePage.value,d=r.hasFlagEnabled(ss);return B(()=>!(a&&!u&&!d||l.status==="error"||c.status==="error"||c.status==="not_eligible"||n.isShippingRequired.value&&o?.length===0||t&&!u),[a,c.status,l.status,n.isShippingRequired,o?.length,u,d,t])}function Ex({hasApplePayPaymentMethod:e,hasUnusablePartialAddress:t,inMemoryApplePayParts:n}){const r=Qc().geolocation.country.code,{shop:o,observability:i,client:{userAgent:a},embed:l}=_(),c=o.hasFlagEnabled(eE)?l?.client?.embedderHostname:void 0,u=V(),d=to(),p=St().value,[m]=Rg(),f=m.includes("PICKUP_POINT");return B(()=>!e||t||n.sessionLoadFailed.value||!p||f?!1:wx({geolocatedCountryCode:r,observability:i,slowCanMakePaymentCache:u,isCheckoutEditor:d,userAgent:a,embedderHostname:c}),[e,t,n.sessionLoadFailed.value,p,f,r,i,u,d,a,c])}function Cx(e){const t=e.sdkStatus,n=e.buttonStatus;return w(()=>t.value.status!==gi.Error&&n.value.status!=="error")}function kx({inMemoryAmazonPayParts:e}){const t=ox(),n=_x(),r=e.sdkStatus,o=e.buyWithPrimeButtonStatus;return w(()=>n.value&&!t.value&&r.value.status!==gi.Error&&o.value.status!=="error")}function Ix(e){const{status:t}=e;return t!=="error"&&t!=="not_eligible"}
19function Ey(e,t,n){return e==="SHOP_PAY"&&!n?!1:t?.includes("ACCELERATED_CHECKOUT")??!1}function Cy(e){const{embed:t}=_(),n=!!t?.isFlagshipPartner&&!Mf(t?.embedder),r=e.buttonStatus.value;return B(()=>!(r.status==="error"||r.status==="not_eligible"||n&&r.status==="not_rendered"),[r.status,n])}function Ax(e){const t=e.buttonStatus.value.status;return x(n=>{if(n.name!=="APPLE_PAY"||t!=="error")return n;const r=n.placements?.filter(o=>o!=="ACCELERATED_CHECKOUT");return r?.length?{...n,placements:r}:void 0},[t])}function Tx(e){const t=e.acceleratedCheckoutButtonStatus.value,n=e.payWithPayPalButtonStatus.value;return x(r=>{if(r.name!=="PAYPAL_EXPRESS")return r;if(!r.placements||r.placements.length===0)return;const o=r.placements.filter(i=>!(i==="ACCELERATED_CHECKOUT"&&t.status==="error"||i==="PAYMENT_METHOD"&&n.status==="error"));if(o.length!==0)return{...r,placements:o}},[t.status,n.status])}function wx({geolocatedCountryCode:e,observability:t,slowCanMakePaymentCache:n,isCheckoutEditor:r,userAgent:o,embedderHostname:i}){if(Mx()){const p=r||!!i,m=Nx(o);if(!p||!m)return!1}return!(!!window.ApplePaySession&&ky(t,"hasOwnProperty",()=>ApplePaySession.hasOwnProperty("canMakePayments"))&&Lx(t))||!Rx(t,n)?!1:e==="CN"?xx(o):!0}function ky(e,t,n){try{return n()}catch(r){if(r instanceof Error&&r.name==="InvalidAccessError")return e.log(`apple_pay_session_${t}_error`,`Apple Pay ${t} check failed from insecure context`,{errorName:"InvalidAccessError"}),!1;throw r}}function Lx(e){return typeof ApplePaySession.supportsVersion!="function"?!1:ky(e,"supportsVersion",()=>ApplePaySession.supportsVersion(nE))}function Rx(e,t){return t.current!==void 0?t.current:t.current=e.measureSync({name:"apple_pay_can_make_payments_complete",functionToMeasure:ApplePaySession.canMakePayments})}function xx(e){const t=e.match(/(\((iPhone|iPad); CPU (iPhone )?OS ((\d+(_?)){1,3}))/g);if(!t)return!1;const n=t[0].match(/(\d+(_?)){1,3}/);if(!n)return!1;const[r,o]=n[0].split("_").map(i=>Number(i));return r!==void 0&&(r>11||r===11&&o!==void 0&&o>=2)}function Mx(){return typeof window>"u"||window.self!==window.top}function Nx(e){const t=tE(e);return!!(t?.name==="Safari"&&t.version&&Number(t.version)>=17)}function Dx(e,t=0){const n=typeof window>"u"?0:window.innerWidth;return n<=279?2:n<=375?e||t===3?3:2:4}function Iy(){const{shop:{shopPayEnabledForPrimarySellerOfRecord:e}}=_(),{shopPayEnabledForSellerOfRecord:t}=H();return w(()=>t.value??e)}function Ay(){const{shop:{hasMultipleLegalEntities:e},checkout:{identity:t}}=_(),n=Iy(),r=rE(),{deferredTotal:o}=H(),i=t.current;return w(()=>{if(r.value&&o.value)return"deferred_payment";if(!(i.value==="shopPay"&&e))return n.value?void 0:"shop_pay_disabled"})}function Ox(){const e=Ay();return w(()=>e.value===void 0)}function Fx({maxWalletButtonCount:e,userAgent:t}){if(t==="")return oE;function n(r=[]){const o=r.indexOf(xe.BuyWithPrime);o===-1||o<e||(r.splice(o,1),r.splice(e-1,0,xe.BuyWithPrime))}if(t.match(/Apple Mail|Chromium|Crosswalk|Dragon|Electron|; MSIE xyz;|Trident 7.0|.\*rv|Pale Moon|Puffin|QQ Browser|SeaMonkey|Sogou Explorer|UC Browser|Vivaldi/i))return["SHOP_PAY","PAYPAL_EXPRESS",xe.BuyWithPrime,xe.AmazonPay,"APPLE_PAY","GOOGLE_PAY","VENMO"];if(t.match(/Edge|Firefox Mobile|Iron|OPR|Yandex Browser/i)||t.match(/Firefox/i)&&!t.match(/Firefox iOS/i))return["SHOP_PAY","PAYPAL_EXPRESS",xe.BuyWithPrime,xe.AmazonPay,"GOOGLE_PAY","APPLE_PAY","VENMO"];if(t.match(/Android/i)){const r=["SHOP_PAY","PAYPAL_EXPRESS","GOOGLE_PAY",xe.BuyWithPrime,xe.AmazonPay,"VENMO"];return n(r),r}else if(t.match(/CFNetwork|Chrome Mobile iOS|Coc Coc|Googlebot|Maxthon|Safari|Mobile Safari|Mobile Safari UI\/WKWebView|Oper Mini|Pinterest|Shopify Mobile/i)||t.match(/Safari/i)&&!t.match(/Chrome/i)){const r=["SHOP_PAY","PAYPAL_EXPRESS","APPLE_PAY",xe.BuyWithPrime,xe.AmazonPay,"GOOGLE_PAY","VENMO"];return n(r),r}else{if(t.match(/Amazon Silk|Chrome|Chrome Mobile WebView|Chrome Mobile|Opera|Opera Mobile|Samsung Internet/i))return["SHOP_PAY","PAYPAL_EXPRESS",xe.BuyWithPrime,xe.AmazonPay,"GOOGLE_PAY","APPLE_PAY","VENMO"];if(t.match(/Facebook|Instagram|Firefox iOS/)){const r=["SHOP_PAY","PAYPAL_EXPRESS","APPLE_PAY",xe.BuyWithPrime,xe.AmazonPay,"GOOGLE_PAY","VENMO"];return n(r),r}else return t.match(/IE/)?["SHOP_PAY","PAYPAL_EXPRESS",xe.BuyWithPrime,xe.AmazonPay,"APPLE_PAY","GOOGLE_PAY","VENMO"]:["SHOP_PAY","PAYPAL_EXPRESS",xe.BuyWithPrime,xe.AmazonPay,"APPLE_PAY","GOOGLE_PAY","VENMO"]}}function Ty(e){const{inMemoryGooglePayParts:t,inMemoryPayPalParts:n,inMemoryAmazonPayParts:r,inMemoryApplePayParts:o,inMemoryVenmoParts:i}=e,{value:a}=H().paymentMethods,l=a?.some(k=>k.type==="wallet"&&k.name==="APPLE_PAY")??!1,c=cx(e);ux(e);
19const u=c.value,d=Sx({hasUnusablePartialAddress:u,inMemoryGooglePayParts:t}),p=Ex({hasApplePayPaymentMethod:l,hasUnusablePartialAddress:u,inMemoryApplePayParts:o}),f=Cx(r).value,g=kx({inMemoryAmazonPayParts:r}).value,v=w(()=>Ix(i.buttonStatus.value)).value,P=Ax(o),b=Tx(n),C=Ox().value,{client:{userAgent:I}}=_();return B(()=>{function k(R){const L=R.name;switch(L){case"PAYPAL_EXPRESS":return!0;case"APPLE_PAY":return p;case"GOOGLE_PAY":return d;case xe.BuyWithPrime:return g;case xe.AmazonPay:return f;case"SHOP_PAY":return C;case"SHOPIFY_INSTALLMENTS":return!1;case"VENMO":return v;default:return rn(L)}}function E(){const R=a?.filter(L=>(L.type==="wallet"||L.type==="walletsPlatform")&&k(L))??[];return Bx(R)}const T=E().flatMap(R=>b(R)??[]).flatMap(R=>P(R)??[]),A=Fx({maxWalletButtonCount:Dx(C,T.length),userAgent:I});return T.sort((R,L)=>A.indexOf(R.name)-A.indexOf(L.name))},[a,p,d,g,f,v,P,b,C,I])}const Bx=e=>e.find(n=>n.name===xe.BuyWithPrime)?e.filter(n=>n.name!==xe.AmazonPay):e;function Vx(){const e=H().paymentMethods,t=ze("paymentMethods");return w(()=>t.value||!e.value||e.value?.length===0?!1:!!e.value?.some(n=>n.type==="wallet"||n.type==="walletsPlatform"))}function Ux(){const{checkout:e,source:t}=_(),{didIncrementUnusablePartialAddressMetric:n,inMemoryGooglePayParts:r,inMemoryPayPalParts:o,inMemoryVenmoParts:i,inMemoryApplePayParts:a,inMemoryAmazonPayParts:l,inMemoryShopPayParts:c}=Ye(),u=We(Ty({inMemoryGooglePayParts:r,inMemoryPayPalParts:o,inMemoryVenmoParts:i,inMemoryApplePayParts:a,inMemoryAmazonPayParts:l,didIncrementUnusablePartialAddressMetric:n})),d=We(Cy(c)),p=w(()=>u.value?.filter(({placements:f,name:h})=>Ey(h,f,d.value)).length),m=Vx();return w(()=>e.configuration.visibility.showExpressCheckout.value&&(p.value>0||t.type==="simulated"&&!p.value&&m.value))}const wy=He({swappable:new Set,fixed:new Set,supported:new Set,disabled:new Set});function zx({showExpressCheckout:e,isOnePageCheckout:t,acceptTipPayments:n,disableDeliveryExtensions:r,isVaultedWalletIdentity:o}){const i=new Set(Df),a=new Set([...Kl,...Nf]),l=new Set;(!e||o)&&l.add("WALLETS1"),r&&l.add("DELIVERY1"),(r||t)&&l.add("DELIVERY2"),t&&(l.add("INFORMATION3"),!n&&!r&&(l.add("PAYMENT3"),l.add("PAYMENT4")),(!n&&r||n&&!r)&&l.add("PAYMENT4"));const c=new Set([...a,...i]);return{swappable:i,fixed:a,disabled:l,supported:c}}function Hx({children:e}){const t=Ly();return s(wy.Provider,{value:t,children:e})}function Ly(){const e=Ux(),{shop:{acceptTipPayments:t},checkout:n}=_(),r=n.configuration.layout.isOnePage.value,o=iE(n.identity.current.value),i=!ze("isShippingRequired").value&&!n.isShippingRequired.value;return B(()=>zx({showExpressCheckout:e.value,isOnePageCheckout:r,acceptTipPayments:t,disableDeliveryExtensions:i,isVaultedWalletIdentity:o}),[t,i,o,r,e.value])}function qx(){return new Set([...Df,...Kl])}const Gx=new Map([["thankYou",[...Kl,...Nf]]]);function $x(e){const t=Gx.get(e.type)??[];return new Set(t)}const Ry=qe({suspenseName:"extensions",id:()=>"ExtensionsInner",displayName:"ExtensionsInner",load:()=>Ve(()=>import("./ExtensionsInner.CdP359ca.js"),__vite__mapDeps([11,1,8,2,3,4,5,12,13,14,6,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,7]))});function Wx(e){const{checkout:{extensibility:{ui:t}}}=_();return s(Hx,{children:s(ve,{when:t.enabled,fallback:e.children,children:s(Ry,{...e})})})}const Yx=ft("PostPurchaseContext");function jx({children:e}){const{shop:{postPurchase:{extensionAvailable:t,developmentModeAvailable:n}},router:r}=_(),o=r.currentUrl.value,i=B(()=>{const u=new URLSearchParams(o.search),d=u.get("script_url"),p=u.get("api_key")||u.get("post_purchase_dev_api_key"),m=u.get("config")??void 0;return n&&d&&p?{scriptUrl:d,apiKey:p,config:m}:void 0},[n,o.search]),a=n&&!!i,l=B(()=>{const u=new URLSearchParams(o.search),d=u.get("uuid"),p=u.get("socket_url");return n&&d&&p?{uuid:d,socketUrl:p}:void 0},[n,o.search]),c=B(()=>{const u=`https://${o.host}/checkouts/unstable/changesets`;return{extensionAvailable:t,postPurchaseEnabled:t||a,developmentMode:a,developmentOptions:i,liveReload:l,changesetsUrl:u}},[t,a,i,l,o.host]);return s(Yx.Provider,{value:c,children:e})}const Kx={addressModalState:{status:"idle",addressType:"shipping",setAsDefault:"default"}};function xy(e){return e[0]?.localizedMessage??e[0]?.nonLocalizedMessage}function Jx({enabledDeliveryMethods:e=[],delegatedPaymentInstrument:t}={}
19){const n=ue([]);return{inventoryRecoverySignal:ue(void 0),billing:ue(!1),contact:ue(!1),createAddressParts:bf(Kx),currentDiscountCodeAttemptSignal:ue(null),delegatedPaymentInstrument:ue(t),deliveryMethodDeltaSignal:ue(0),deliveryMethodsAddressErrors:aE(),deliveryMethodTimingSignal:ue(0),derivedErrorMessageSignal:It(()=>xy(n.value)??""),directPaymentFieldsFilled:ue(!1),discountCodeWarningSignal:ue(null),installmentMonthsSignal:ue(void 0),missingMerchandiseStableIdsSignal:ue([]),msiInvalidationReasonSignal:ue(null),msiInvalidationSnapshotSignal:ue(null),msiHadInstallmentsSignal:ue(!1),editorSetShopPaySignal:ue(null),emailMarketingOptInShownSignal:ue(!1),emailMarketingConsentGrantReachedSignal:ue(!1),previousPhoneMarketingDisclosureKeySignal:ue(void 0),smsMarketingOptInShownSignal:ue(!1),shopPayMobilePhoneInputShownSignal:ue(!1),privacyBannerSettingsSignal:ue(null),extensionSkeletonBatchStateSignal:ue("idle"),extensionSkeletonBatchReleaseIdSignal:ue(0),extensionSkeletonPendingCountSignal:ue(0),payment:ue(!1),reductionsErrorsSignal:n,reductionsValueSignal:ue(""),refreshNegotiationSignal:ue(!1),rememberMePhoneErrorSignal:ue(void 0),rememberMePhoneSignal:ue(void 0),shipping:ue(!1),voidedGiftCardsSignal:ue([]),cachedMembershipViolations:ue([]),hasNegotiatedAlternativePaymentCurrencySignal:ue(!1),newCardSignal:ue(void 0),hasLoadedSignal:ue(!1),bankIdNumberSignal:ue(void 0),lastNegotiatedBinSignal:ue(void 0),bankPaymentTokenSignal:ue(void 0),checkoutProtocolModalEventSignal:ue("none"),checkoutProtocolPayButtonLoadingSignal:ue(void 0),checkoutProtocolPayButtonDisabledSignal:ue(void 0),checkoutProtocolPayButtonMountedSignal:ue(!1),checkoutProtocolPayButtonStageSignal:ue("pay"),checkoutProtocolPresentedSignal:ue(!1),allRenderedSections:ue({}),getRenderedSection:sE({defaultValue:{},initial:{}}),marketingPhoneInputError:ue(void 0),buyerHasActedSignal:ue(!1),appMetafieldsSignal:ue({}),cartLineChangeLoadingSignal:ue(!1),prequalifiedAnimatedBadgeShowCounter:ue(0),enabledDeliveryMethodsSignal:ue(e)}}function Xx(e,t){return e?.countryCode||t?.countryCode}function Qx(e){return e.some(t=>t.__typename==="ConfirmChangeViolation"&&t.code==="TAX_TAX_INCLUSIVITY_MISMATCH")}function D7(e){const t=e.shippingAddress.peek(),n=e.locationAddress.peek();return Xx(t,n)}function My(e,t,n){const r=e?.__typename==="NegotiationResultAvailable"&&e?.sellerProposal||e?.__typename==="SubmitRejected"&&e?.sellerProposal||void 0,o=[];(r==null||r.buyerIdentity.__typename==="PendingTerms")&&o.push("contactInfo","shippingAddress","buyerIdentity"),(r==null||r.delivery.__typename==="PendingTerms"||r.deliveryDiscount?.__typename==="PendingTerms"||r.remote?.consolidated.delivery.termsStatus==="PENDING")&&o.push("billingAddress","deliveryNext"),(r==null||r?.deliveryExpectations?.__typename==="PendingTerms")&&o.push("deliveryExpectations"),(r==null||r.payment.__typename==="PendingTerms"||r.remote?.consolidated.payment.termsStatus==="PENDING")&&o.push("paymentLines","paymentMethods");const i=Qx(t??[]);return(r==null||r.merchandise.__typename==="PendingTerms"||i||r?.merchandiseDiscount?.__typename==="PendingTerms")&&o.push("merchandiseLines"),(r==null||r.tax.__typename==="PendingTerms")&&o.push("taxes","duties"),r?.taxExemptions?.__typename==="PendingTerms"&&o.push("taxExemptions"),(r==null||r.remote?.consolidated.taxes.termsStatus==="PENDING")&&o.push("remoteTaxDetails"),(r==null||r?.deliveryDiscount?.__typename==="PendingTerms"||r?.merchandiseDiscount?.__typename==="PendingTerms")&&o.push("discountLines","totalSavings"),r?.captcha?.__typename==="PendingTerms"&&o.push("captcha"),r?.availableRedeemables?.__typename==="PendingTerms"&&o.push("availableRedeemables"),r?.shopCashBalance?.__typename==="PendingTerms"&&o.push("shopCashBalance"),r?.shopPromotion?.__typename==="PendingTerms"&&o.push("shopPromotion"),r?.shopDiscountOffer?.__typename==="PendingTerms"&&o.push("shopDiscountOffer"),r==null&&o.push("subtotal","runningTotal","total"),r?.merchandiseDiscount?.__typename==="FilledDiscountTerms"&&r?.merchandiseDiscount?.lines?.length===0&&n&&o.push("reduction"),r?.cartCheckoutValidation?.__typename==="PendingTerms"&&o.push("cartCheckoutValidation"),r?.memberships?.__typename==="PendingTerms"&&o.push("memberships"),o}function Zx(e){return e?.__typename==="Throttled"?{status:"queued",token:e.queueToken,pollAfter:new Date(e.pollAfter).getTime(),productVariantAvailabilityV2:[],pollUrl:e.pollUrl}:{status:"inactive",token:e?.queueToken??void 0}}class dp{#e=new Set;#t;constructor(t){this.#t=t}get current(){return this.#t}subscribe(t){return this.#e.add(t),()=>{this.#e.delete(t)}}set(t){this.#t=t,this.#e.forEach(n=>n(this.#t))}}function e1({checkout:e,client:t,graphql:{coreGraphql:n},observability:r,userEvents:o,persistence:i,router:a,shop:l,shopPay:c,source:u,url:d},{negotiateFromSessionData:p,createNegotiator:m}){const f=p?.session?.negotiate?.result,h=Of(p??void 0),g=f?.__typename==="Throttled"||f?.__typename==="NegotiationResultAvailable"?new dp(Zx(f)):new dp({status:"loading",token:t.unstable_getSerialization("queueToken")}),y=f?.__typename==="NegotiationResultAvailable"?f.sellerProposal:void 0,v=f?.__typename==="NegotiationResultAvailable"||f?.__typename==="NegotiationResultFailed"||f?.__typename==="TooManyRequests"?My(f,h,Ff(y?.note)):[],P={type:"success",violations:h??[],errors:[],negotiationStage:"negotiation"},b=ue(P),C=ue(P);return b.subscribe(S=>{C.value=S}),{negotiator:m({checkout:e,client:t,graphql:{coreGraphql:n},observability:r,userEvents:o,persistence:i,router:a,shop:l,shopPay:c,source:u,url:d},{throttle:g,initialUnresolvedFields:v,lastJourneyProgression:b,lastNegotiation:C,negotiationContext:Jx({enabledDeliveryMethods:l.enabledDeliveryMethods,delegatedPaymentInstrument:lE(p?.session?.checkoutPaymentMethods)})}),throttle:g}}function ro(){return Ut(cE)}function oo(){return Ut(Bf)}function t1(){const e=oo(),{snapshot:t,subscribe:n}=B(()=>({snapshot:()=>e.current,subscribe:o=>e.subscribe(o)}),[e]),r=qP(n,t);return B(()=>({throttle:r,setThrottle:o=>e.set(o)}),[e,r])}function n1({value:e,children:t}){return s(Bf.Provider,{value:e,children:s(r1,{children:t})})}function r1({children:e}){const{graphql:{throttleGraphql:t}}=_(),{throttle:n}=t1();return t.setPollUrl("pollUrl"in n?n.pollUrl:void 0),s(q,{children:e})}let Ii;function o1(e,t){async function n(){return Ii||(Ii=ct(()=>Ve(()=>import("./actions.D18pmjRp.js"),__vite__mapDeps([56,2,1,3,4,5,57,52,53,58,59,60,61,6,7,8]))),Ii)}return typeof window<"u"&&(typeof window.requestIdleCallback=="function"?window.requestIdleCallback(n):window.setTimeout(n,0)),{async complete(r){return(await n()).complete(e,t,r)},async getNegotiationInput(){return(await n()).getNegotiationInput(e)},negotiate:async function*(o){yield*(await n()).negotiate(e,t,o)}}}function Ny(e){return e.filter(t=>t.__typename==="ApplyChangeViolation"&&dE.has(t.code))}function Dy(e){return e.filter(t=>t.__typename==="UnprocessableTermViolation"&&!Vf.has(t.code))}function Oy(e){return e.filter(t=>t.__typename==="ConfirmChangeViolation"&&uE.has(t.code))}function Fy(e){return e.filter(t=>t.__typename==="RemoveTermViolation"&&ql.has(t.code))}function By(e){const t=Dy(e),n=Oy(e),r=Ny(e),o=Fy(e);return{unprocessableTermViolations:t,unprogressableChangeViolations:n,applyChangeViolations:r,removeTermViolations:o,hasAny:t.length>0||n.length>0||r.length>0||o.length>0}}function i1(e,t={}){return e.status!=="filled"?[]:e.memberships.filter(n=>!t.onlyApplied||n.apply).map(n=>n.handle)}function s1(e,t,n){return ni(e.address,t)&&n.includes(e.handle)}const a1=/^\$.merchandiseDiscount.lines\[(\d+)\]$/,l1=/^\$.memberships.memberships\[(\d+)\]$/;function c1(e){return e.filter(t=>t.__typename==="AcceptNewTermViolation")}function u1(e){return e.filter(t=>t.__typename==="InputValidationError")}function d1(e){return e.filter(t=>t.__typename==="UnresolvableTermViolation")}function O7(e,t,n,r){const o=By(e);return o.hasAny?(m1(o.unprocessableTermViolations,t),{hasErrors:!0,requiresRenegotiation:h1(o.applyChangeViolations,t,n,r)}):{hasErrors:!1,requiresRenegotiation:!1}}function p1(e){const{paymentMethodIdentifier:t,...n}=e.directPaymentErrors;
19tn(()=>{e.generalPaymentError.value=void 0,e.generalPaymentErrorCode.value=void 0;for(const r of Object.values(n))r.value?.origin==="server"&&(r.value=void 0)})}function m1(e,t){e.some(pE)||e.forEach(n=>{const{code:r,localizedMessage:o,nonLocalizedMessage:i}=n,a=o||i;y1(t);const l={message:a,origin:"server"};mE.has(r)?t.directPaymentErrors.number.value=l:fE.has(r)?t.directPaymentErrors.name.value=l:hE.has(r)?t.directPaymentErrors.expiry.value=l:gE.has(r)?t.directPaymentErrors.verificationValue.value=l:yE.has(r)?t.directPaymentErrors.general.value=l:vE(n)||Uf(n)||n.target==="$.payment"&&(t.generalPaymentError.value=a,t.generalPaymentErrorCode.value=r)})}function f1(e,t,n,r){return t.some(o=>e.code===o.violation.code&&s1(o,n,r))}function h1(e,t,n,r){let o=!1;const i=new Set;if(e.forEach(a=>{const l=a1.exec(a.target);if(l&&l[1]){const c=parseInt(l[1],10),u=t.discountLines.peek()||[];c<u.length&&(i.add(c),o=!0)}if(_E.has(a.code)){const c=t.shippingAddress.peek(),u=t.memberships.peek();if(!u||u.status!=="filled")return;const d=i1(u);if(!d.length||f1(a,n.cachedMembershipViolations.value,c,d))return;const m=g1(a.target,u),f=m?[m]:d;if(f.length===0)return;f.forEach(h=>{n.cachedMembershipViolations.value.push({violation:a,address:c,handle:h})}),r.counter({name:"membership_violation_renegotiation",value:1,attributes:{violation_code:a.code}}),o=!0}}),i.size>0){const a=t.discountLines.peek()||[];t.discountLines.value=a.filter((l,c)=>!i.has(c))}return o}function g1(e,t){const n=l1.exec(e);if(n&&n[1]){const r=parseInt(n[1],10),o=t.memberships[r];if(o)return o.handle}return null}function y1(e){const t=e.paymentLines.peek().find(({method:n})=>n.type==="direct");if(t){const r=t.method.paymentMethodIdentifier;e.directPaymentErrors.paymentMethodIdentifier.value=r}}function fn(e){const t={};return e.forEach(n=>{t[n.code]=(t[n.code]||0)+1}),t}function v1({observability:e,negotiationStage:t,silenceViolations:n,violations:r,retainedViolations:o,reportedCodes:i}){const a=Object.entries(_1(bE(r),o)).filter(([l])=>!i.has(l));a.length!==0&&(a.forEach(([l])=>{i.add(l),e.counter({name:"negotiation_violation_silenced",value:1,attributes:{code:l,negotiationStage:t}})}),e.log("negotiation_violations_silenced","[Negotiate] Violations returned by the negotiation were silenced for the UI",{negotiationStage:t,silenceViolations:n,newlySilencedViolations:Object.fromEntries(a)}))}function _1(e,t){const n=fn(t);return Object.entries(fn(e)).reduce((r,[o,i])=>{const a=i-(n[o]??0);return a>0&&(r[o]=a),r},{})}function F7(e){const t=Ny(e),n=Dy(e),r=Oy(e),o=Fy(e),i=c1(e),a=u1(e),l=d1(e),c=new Set([t,n,r,o,i,a,l].flatMap(d=>d.map(p=>p.code))),u=e.filter(d=>!c.has(d.code));return{autoResolved:fn(t),blockingProgress:fn(n),informational:fn(r),removingItems:fn(o),mustAcceptTerms:fn(i),invalidInputs:fn(a),unresolvable:fn(l),other:fn(u)}}const Ni="cart";function b1(e,t){e&&e.type==="cartNext"&&t.delete(Ni)}const P1="cartNext";function S1(e){const t={...e,queueToken:void 0,taxes:void 0,checkpointData:void 0,scriptFingerprint:void 0,transformerFingerprintV2:void 0};return JSON.stringify(t,(n,r)=>{if(!(n==="destinationChanged"||n==="emailChanged"||n==="signedHandle"))return r})}function E1({client:e,url:t,source:n,configuration:r}){if(b1(n,e.cookies),r.allowRedirectToStorefront){const o=P1===n.type;window.location.assign(o?t.storefront("cart/clear"):t.storefront())}}
19class Vy extends Error{constructor(){super(...arguments),this.name="RejectedNegotiationRequest"}}const pp="8b9035807842a4e4dbe009f3f1478127",C1=(e,t)=>{const n=e.some(i=>i.id===pp),r=t.find(i=>i.id===pp),o=new Set(e);return!n&&r&&o.add(r),Array.from(o)};class k1{constructor(t=new Set,{suppressSelfWrites:n=!1}={}){this.changedParts=t,this.deliveryLineSnapshots=new Map,this.applyingUpdate=!1,this.suppressSelfWrites=n}subscribeToChanges(t){const n=[],r=o=>{let i=!1;const a=o.subscribe(()=>{const l=this.suppressSelfWrites&&this.applyingUpdate;i&&!l&&this.changedParts.add(o),i=!0});n.push(a)};this.deliveryLines=t.deliveryLines,this.deliveryLines&&this.captureDeliveryLineSnapshots(this.deliveryLines);for(const o of Object.values(t)){if(yd(o)){for(const i of Object.values(o.fields))r(i);continue}o instanceof rd&&r(o)}return()=>{n.forEach(o=>o())}}applyUpdate(t,n){this.applyingUpdate=!0;try{this.applyUpdateTracked(t,n)}finally{this.applyingUpdate=!1}}applyUpdateTracked(t,n){if(t===this.deliveryLines&&this.deliveryLinesChanged()&&this.changedParts.add(t),yd(t)){const r=[];tn(()=>{for(const[o,i]of Object.entries(t.fields)){if(this.changedParts.has(i))continue;const a=n[o];a&&i.peek()!==a&&(i.value=a),r.push(o)}}),t[PE](r);return}t instanceof rd&&!this.changedParts.has(t)&&(t.value=n,t===this.deliveryLines&&this.captureDeliveryLineSnapshots(this.deliveryLines))}deliveryLinesChanged(){for(const[t,n]of this.deliveryLineSnapshots)if(!Object.is(n,t.value))return!0;return!1}captureDeliveryLineSnapshots(t){this.deliveryLineSnapshots.clear(),this.deliveryLineSnapshots.set(t,t.value);for(const n of t.value)this.deliveryLineSnapshots.set(n,n.value)}}const I1=1e4;class A1{#e=Promise.resolve();async run(t){const n=this.#e;let r;this.#e=new Promise(i=>{r=i}),await n;const o=setTimeout(r,I1);try{return await t()}finally{clearTimeout(o),r()}}}const mp=5e3,fp=50;class T1 extends Map{constructor(){super(...arguments),this.subscriptions=new Set}subscribe(t){return this.subscriptions.add(t),t(this),()=>this.subscriptions.delete(t)}clear(){super.clear(),this.subscriptions.forEach(t=>t(this))}delete(t){const n=super.delete(t);return this.subscriptions.forEach(r=>r(this)),n}set(t,n){return super.set(t,n),this.subscriptions.forEach(r=>r(this)),this}}class w1{constructor(t,n,r,o,i,a,l,c,u,d,p,m,f,h,g,y,v,P,b=[]){this.graphql=t,this.client=n,this.sessionToken=r,this.source=o,this.router=i,this.url=a,this.throttle=l,this.blocked=c,this.checkout=u,this.persistenceManager=d,this.lastJourneyProgression=p,this.lastNegotiation=m,this.context=f,this.validationErrors=h,this.observability=g,this.userEvents=y,this.shopPay=v,this.shop=P,this.submitting=ue(!1),this.hasNegotiatedOnce=ue(!1),this.pendingFieldsNegotiation=ue(void 0),this.reportedSilencedViolationCodes=new Set,this.negotiationRunCount=0,this.negotiationCount=0,this.hasReportedExcessiveNegotiationRounds=!1,this.blockCount=0,this.interceptors=new Set,this.listeners=new Set,this.beforeNegotationListeners=new Set,this.pendingNegotiationsRequests=new T1,this.negotiationRequestSerializer=new A1,this.inFlightRunCount=0,this.outstandingRunFailures=[];const C=new Set(b);this.initialUnresolvedFields=ue(C),this.loading=ue(new Set(C)),this.isBlocked=this.blocked,this.actions=o1(this,g);const I=zf(o),S=this.persistenceManager?.createUpdate(hn.PostPurchaseInquiryStatus,{scope:I});S&&this.parts.postPurchaseInquiryStatus.subscribe(A=>S(A));const k=this.persistenceManager?.createUpdate(hn.ExternalDeliveryIds,{scope:I});k&&this.parts.externalDeliveryIds.subscribe(A=>k(A));const E=this.persistenceManager?.createUpdate(hn.ShopPayArtifact,{scope:I});E&&this.parts.shopPayArtifact.subscribe(A=>E(A));const T=this.persistenceManager?.createUpdate(hn.SetShippingAddressAsDefault,{scope:I});T&&this.parts.setShippingAddressAsDefault.subscribe(A=>{A!==void 0&&T(A)})}get keepReconcilerAliveAcrossPolls(){return this.shop.hasFlagEnabled(SE)}get current(){return this.checkout.proposal.negotiated}get parts(){return this.checkout.proposal.proposed}get facts(){return this.checkout.proposal.facts}alreadySubmittedInterceptor(){const t=this.checkout.latestReceipt.value;return t&&t.status!=="failed"&&t.status!=="abandoned"?{behavior:"block",reason:Vo.SubmittedForCompletion}:{behavior:"allow"}}async runInterceptors({forceBlock:t=!1,negotiationStage:n,skipEffects:r=!1}){const o=[this.alreadySubmittedInterceptor.bind(this),...this.interceptors],i=await Promise.all(o.map(async p=>p({parts:this.parts,reason:n}))),a=i.filter(p=>p.behavior==="block"),l=a.map(p=>p.reason),c=i.flatMap(p=>p.errors??[]),u=i.flatMap(p=>p.context??[]),d=t||a.length>0?{behavior:"block",reasons:l,errors:c,context:u}:{behavior:"allow",errors:c,context:u};return r||await Promise.all(i.map(p=>p.perform?.(d))),d}intercept(t){return this.interceptors.add(t),()=>this.interceptors.delete(t)}async runListeners(t){await Promise.all([...this.listeners].map(n=>n(t)))}listen(t){return this.listeners.add(t),()=>this.listeners.delete(t)}async runBeforeNegotiationListeners(t,n){await Promise.all([...this.beforeNegotationListeners].map(r=>n===void 0?r(t):r(t,n)))}listenBeforeNegotiation(t){return this.beforeNegotationListeners.add(t),()=>this.beforeNegotationListeners.delete(t)}block(){return this.blockCount===0&&(this.blocked.value=!0),this.blockCount+=1,()=>{this.blockCount-=1,this.blockCount===0&&(this.blocked.value=!1)}}async complete(t){await this.waitForPendingNegotiations(t),++this.negotiationRunCount;const n=await this.actions.complete(t);if((n.status==="rejected"||n.status==="failed"||n.status==="fetch_failed"||n.status==="tooManyRequests")&&this.shop.hasFlagEnabled(Hf)){const{inventoryRecoverySignal:r}=this.context,o=r.value;
19o&&!o.dismissed&&(r.value={...o,dismissed:!0})}return n}async getNegotiationInput(){return this.actions.getNegotiationInput()}start(){const t=this.startNegotiationRound();let n;const r=()=>n==null?t===this.negotiationCount:n===this.negotiationRunCount;return{isActive:r,negotiating:(o=Object.keys(this.current.fields))=>{this.negotiationRunCount+=1,n=this.negotiationRunCount,this.loading.value=new Set(o);const i=this.keepReconcilerAliveAcrossPolls;this.releaseReconcilerSubscription?.();const a=new k1(void 0,{suppressSelfWrites:i}),l=a.subscribeToChanges(this.parts);return i&&(this.releaseReconcilerSubscription=l),({updated:c,loadingFields:u=[],buyerProposal:d})=>{i||l(),r()&&this.negotiated({updated:c,loadingFields:u,buyerProposal:d,reconciler:a})}}}}serializeNegotiationRequest(t){return this.negotiationRequestSerializer.run(t)}track(t){const n=this.lastVariables;return this.lastVariables=t&&S1(t),{dirty:this.lastVariables==null||this.lastVariables!==n}}collectPendingNegotiationEventIds(t,n){const r=[];return this.pendingNegotiationsRequests.forEach((o,i)=>{(i===t||!o.negotiationCustomized&&this.canResolvePendingNegotiation(n,o.negotiationStage))&&o.eventId!=null&&r.push(o.eventId)}),r}hasPendingThreePageWalletEscalation(){return[...this.pendingNegotiationsRequests.values()].some(t=>t.threePageWalletEscalation===!0)}negotiate(t){const n={...t,identifier:t.identifier??Symbol("negotiationRequest"),negotiationStage:t.negotiationStage??"progression"},{identifier:r}=n;if([...this.pendingNegotiationsRequests.values()].some(a=>a.negotiationStage==="progression")){const a=n.negotiationStage;n.negotiationStage="progression",this.observability.leaveErrorBreadcrumb("[Negotiate] Negotiation stage inherited from pending progression",{originalStage:a})}const i=new Promise((a,l)=>{const c=this.pendingNegotiationsRequests.get(r);c&&c.reject(new Vy),this.pendingNegotiationsRequests.set(r,{fieldsToResolve:n.fieldsToResolve,threePageWalletEscalation:n.threePageWalletEscalation,negotiationStage:n.negotiationStage,negotiationCustomized:!!n.customizeNegotiation,silenceViolations:n.silenceViolations,eventId:n.reason?.eventId,resolve:a,reject:l}),this.observability.leaveErrorBreadcrumb("[Negotiate] Negotiation request added to pending negotiations",{negotiationStage:n.negotiationStage,fieldsToResolve:n.fieldsToResolve,queueSize:this.pendingNegotiationsRequests.size})});return this.observability.leaveErrorBreadcrumb("[Negotiate] Running negotiation",{silenceViolations:n.silenceViolations,negotiationStage:n.negotiationStage,negotiationCount:this.negotiationCount}),this.inFlightRunCount+=1,this.runNegotiation(n).catch(a=>{a instanceof Error&&(this.outstandingRunFailures.push({error:a,negotiationStage:n.negotiationStage}),this.pendingNegotiationsRequests.get(r)?.reject(a),this.pendingNegotiationsRequests.delete(r))}).finally(()=>{this.settleRun()}),i}startNegotiationRound(){this.negotiationCount+=1;const t=this.negotiationCount;return this.observability.histogram({name:"negotiation_round",value:t}),t>=fp&&!this.hasReportedExcessiveNegotiationRounds&&(this.hasReportedExcessiveNegotiationRounds=!0,this.observability.log("negotiation_rounds_excessive","Checkout has run an unusually high number of negotiation rounds",{negotiationRound:t,threshold:fp})),t}async waitForPendingNegotiations(t){const n=this.pendingNegotiationsRequests.size;if(n===0)return;this.observability.leaveErrorBreadcrumb("[Complete] Completion waiting for negotiation queue to clear",{queueSize:n}),t?.setProgressing?.(!0);const r=setTimeout(()=>{this.observability.log("complete_waiting_for_negotiation_queue_still_waiting",`[Complete] Negotiation queue still waiting after ${mp/1e3} seconds`,{queueSize:this.pendingNegotiationsRequests.size})},mp);await new Promise(o=>{this.pendingNegotiationsRequests.subscribe(i=>{i.size===0&&(clearTimeout(r),o())})}),this.observability.leaveErrorBreadcrumb("[Complete] Negotiation queue empty - continuing with completion")}async runNegotiation(t){const{identifier:n}=t,r=(o,i,a)=>{let l=i;if("violations"in i&&o.silenceViolations!==t.silenceViolations){const c=OE(i.violations,o.silenceViolations);v1({observability:this.observability,negotiationStage:o.negotiationStage,silenceViolations:o.silenceViolations,violations:i.violations,retainedViolations:c,reportedCodes:this.reportedSilencedViolationCodes});const u=i.status,p=By(c).hasAny?"error":"success";u!==p&&this.observability.leaveErrorBreadcrumb("[RunNegotiation] Re-filtering violations changed status for cross-resolved request",{originalStatus:u,newStatus:p,requestSilenceViolations:o.silenceViolations,currentSilenceViolations:t.silenceViolations}),l={...i,status:p}}o.resolve(l),this.pendingNegotiationsRequests.delete(a)};for await(const o of this.actions.negotiate(t)){if(o.status==="stale"){if(t.customizeNegotiation!=null){const i=this.pendingNegotiationsRequests.get(n);i&&r(i,o,n)}continue}if("pendingFields"in o&&o.pendingFields?.length===0){const i=this.pendingNegotiationsRequests.get(n);i&&r(i,o,n)}if(o.status==="fetch_failed"&&o.networkError){const i=this.pendingNegotiationsRequests.get(n);i&&(this.observability.log("negotiation_fetch_failed_request_released","[RunNegotiation] Resolving own pending request after network failure",{queueSize:this.pendingNegotiationsRequests.size}),this.observability.counter({name:"negotiation_fetch_failed_request_released",value:1}),r(i,o,n));continue}
19this.pendingNegotiationsRequests.forEach((i,a)=>{const l=this.loading.peek();if(i.negotiationStage==="progression"&&o.status==="invalid"){r(i,o,a);return}if(i.fieldsToResolve?.some(m=>l.has(m))||l.has("cartCheckoutValidation")&&!t.skipStateUpdates){this.observability.leaveErrorBreadcrumb("[RunNegotiation] Ignoring negotiation result");return}const u=t.negotiationStage,d=i.negotiationStage,p=this.canResolvePendingNegotiation(u,d);this.observability.debug("negotiation_evaluated","[RunNegotiation] Evaluating negotiation",{shouldResolve:p,requestStage:d,currentStage:u}),p?(this.observability.log("negotiation_evaluated","[RunNegotiation] Resolving pending negotiation request for pending request",{requestStage:d,currentStage:u,withResultStatus:o.status}),r(i,o,a)):this.observability.leaveErrorBreadcrumb("[RunNegotiation] Not resolving pending negotiation request for pending request",{requestStage:d,currentStage:u,withResultStatus:o.status})})}}negotiated({updated:t,loadingFields:n=[],buyerProposal:r,reconciler:o}){for(const c of Object.keys(t)){let u=t[c],d,p,m;switch(c){case"contactInfo":{u=t[c].email??this.parts.email.peek(),d=this.parts.email;break}case"acceptSmsMarketing":case"acceptEmailMarketing":u!=null&&(d=this.parts[c]);break;case"smsMarketingPhone":break;case"deliveryNext":{const f=t[c],h=this.current.fields.isShippingRequired.peek()===!1&&t.isShippingRequired===!0,g=f.status==="unavailable",y=g&&h&&r?.merchandise.__typename==="FilledMerchandiseTerms"&&this.shop.hasFlagEnabled(LE);if(!g||y){const{parts:v}=this,P=this.context.enabledDeliveryMethodsSignal.peek();if(P.length&&!t.sellability?.enabledDeliveryMethods.length){const D={enabledDeliveryMethods:P};t.sellability===void 0&&(D.missingSellerProposalReason="negotiated_update_sellability_missing"),RE(this.observability,"negotiator_delivery_line_fallback","[Negotiated] Falling back to enabledDeliveryMethods for delivery line construction because sellability was not available",D)}const b=t.sellability?.enabledDeliveryMethods??[],C=b.length>0?b:P,I=b.filter(D=>D!=="NONE"),S=I.length>0?I:P.filter(D=>D!=="NONE"),k=g?{kind:"recover",deliveryNext:f,enabledDeliveryMethods:S,buyerProposalDelivery:void 0,deliveryMacros:[]}:{kind:"reconcile",deliveryNext:f,enabledDeliveryMethods:C,buyerProposalDelivery:r?.delivery,deliveryMacros:f.deliveryMacros??[]};if(k.kind==="recover"&&k.enabledDeliveryMethods.length===0)break;d=v.deliveryLines;const E=v.deliveryLines.peek(),T=t.mustSelectProvidedShippingRate??this.current.fields.mustSelectProvidedShippingRate.value??!1,A=T&&E.length>0?E.map(D=>D.peek()):xE({negotiatedDeliveryNext:k.deliveryNext,enabledDeliveryMethods:k.enabledDeliveryMethods,buyerProposalDelivery:k.buyerProposalDelivery,negotiatedMerchandise:t?.remoteMerchandiseDetails?.stableIdToShopId?.size?t.remoteMerchandiseDetails?.mergedBuyerProposalMerchandise:r?.merchandise,mustSelectProvidedShippingRate:T}),R=ME(k.buyerProposalDelivery);u=(k.kind==="recover"||k.deliveryNext.lines.length===0?A:NE({negotiatedDeliveryNext:k.deliveryNext,enabledDeliveryMethods:k.enabledDeliveryMethods,existingProposedDeliveryLines:E.map(D=>D.peek()),fallbackToFirstDeliveryMethod:!1,mustSelectProvidedShippingRate:T,buyerDeliveryOptionsMap:R,negotiatedMerchandiseLines:t.merchandiseLines?.lines})).map(D=>DE(D)),m=v.deliveryMacros;const M=v.deliveryMacros.peek();p=C1(k.deliveryMacros,M)}break}case"merchandiseLines":{const f=this.parts[c].peek(),h=t.remoteMerchandiseDetails?.mergedBuyerProposalMerchandise,g=!!t?.remoteMerchandiseDetails?.stableIdToShopId?.size,y=g?h?vd(h,f):f:r?vd(r?.merchandise,f):f,v=g?h:r?.merchandise;v&&(this.context.missingMerchandiseStableIdsSignal.value=TE(v)),u=wE({proposedMerchandise:y,negotiatedMerchandiseLines:t.merchandiseLines}),d=this.parts[c];break}case"cartMetafields":{u=AE(r?.cartMetafields),d=this.parts[c];break}case"discountLines":{u=t[c].lines,d=this.parts[c];break}case"tipLines":{d=this.parts[c];break}case"availableRedeemables":{u=t[c]??[],d=this.parts[c];break}case"localizationExtensions":{const f=t[c];if(d=this.parts[c],d){const h=d.peek();u=IE(h,f??[])}break}case"paymentLines":{const f=t[c],h=this.parts[c].peek(),g=qf(this.shop),y=g?(()=>{const v=("merchandiseLines"in t?t.merchandiseLines?.lines:this.current.fields.merchandiseLines.peek()?.lines)??this.parts.merchandiseLines.peek(),P=("paymentFlexibilityPaymentTermsTemplate"in t?t.paymentFlexibilityPaymentTermsTemplate:this.current.fields.paymentFlexibilityPaymentTermsTemplate.peek())?.type;return{hasSellingPlan:Gf(v),hasFixedSellingPlan:CE(v),paymentTermsTemplateType:P}})():{};u=kE({paymentLines:f.lines,proposedPaymentLines:h,availablePaymentMethods:t.paymentMethods,violations:t.allViolations,url:this.router.currentUrl.value,deferredTotal:t.deferredTotal,shouldNotSetInitialState:this.shop.paymentMethodAutoSelectionDisabled,fixSubscriptionRedeemablePaymentAmount:g,...y,isImmediateAmountReducedForRedeemables:t.isImmediateAmountReducedForRedeemables,observability:this.observability,delegatedPaymentInstrument:this.context.delegatedPaymentInstrument.peek(),bankPaymentToken:this.context.bankPaymentTokenSignal.peek()}),d=this.parts[c];break}case"billingAddress":{u={...this.parts.billingAddress.peek(),...u},d=this.parts.billingAddress;break}case"remotePaymentDetails":{d=this.parts[c],u=t.remotePaymentDetails;break}case"shippingAddress":{const f=this.parts.shippingAddress.peek(),h=u;u={city:"",postalCode:"",...f,...h,coordinates:f.coordinates??h?.coordinates},d=this.parts.shippingAddress;break}case"taxExemptions":{const f=t[c],h=this.parts.taxExemptions.peek();u=EE({negotiated:f,currentProposed:h}),d=this.parts.taxExemptions,f.status==="pending"&&(t.taxExemptions={...this.current.fields.taxExemptions.peek(),...f});break}default:d=this.parts[c]}d&&o.applyUpdate(d,u),m&&o.applyUpdate(m,p)}const i=new Set(n),a=this.initialUnresolvedFields.peek();let l;
19for(const c of a)i.has(c)||(l??=new Set(a),l.delete(c));tn(()=>{this.current.value=t,l&&(this.initialUnresolvedFields.value=l),this.loading.value=i})}settleRun(){if(this.inFlightRunCount-=1,this.inFlightRunCount>0||this.outstandingRunFailures.length===0)return;const t=this.outstandingRunFailures;this.outstandingRunFailures=[];let n=0;t.forEach(({error:r,negotiationStage:o})=>{this.pendingNegotiationsRequests.forEach((i,a)=>{this.canResolvePendingNegotiation(o,i.negotiationStage)&&(n+=1,i.reject(r),this.pendingNegotiationsRequests.delete(a))})}),n>0&&(this.observability.log("negotiation_failure_swept_pending_siblings","[Negotiate] Rejected pending negotiations orphaned by a failed negotiation",{sweptSiblings:n,negotiationStages:t.map(({negotiationStage:r})=>r)}),this.observability.counter({name:"negotiation_failure_swept_pending_siblings",value:n}))}canResolvePendingNegotiation(t,n){return n===t||(t==="progression"||t==="completion")}}const L1=({checkout:e,client:t,graphql:{coreGraphql:n},observability:r,userEvents:o,persistence:i,router:a,shop:l,shopPay:c,source:u,url:d},{throttle:p,initialUnresolvedFields:m,lastJourneyProgression:f,lastNegotiation:h,negotiationContext:g})=>new w1(n,t,t.unstable_getSerialization("sessionToken"),u,a,d,p,ue(!1),e,i,f,h,g,ue([]),r,o,c,l,m),Uy=e=>t=>{if(t==null||t.status!=="processed")return;const{loading:n,initialUnresolvedFields:r,current:o}=e,i=FE(t,{isShippingRequired:o.fields.isShippingRequired.peek(),ucp:o.fields.ucp.peek()});tn(()=>{o.value=i,r.peek().size>0&&(r.value=new Set);const a=n.peek();n.value=new Set([...a].filter(l=>!(l in i)))})};function R1({children:e}){const{router:t,client:n,shopPay:r,observability:o,userEvents:i,shop:a,checkout:l,persistence:c,url:u,source:d,graphql:{coreGraphql:p}}=_(),[m,f]=oe(),{data:h,loading:g}=ro();if(m)throw m;const y=h?.session?.negotiate?.result,v=B(()=>Of(h),[h]),P=y?.__typename==="NegotiationResultAvailable",b=y?.__typename==="CheckpointDenied",C=P?y.checkpointData:void 0;Dt(()=>{C&&l.checkpointToken.peek()!==C&&l.unstable_overwriteCheckpointToken(C)},[l,C]);const I=y?.__typename==="NegotiationResultAvailable"?y.sellerProposal:void 0,S=Ff(I?.note),k=B(()=>e1({checkout:l,client:n,graphql:{coreGraphql:p},observability:o,userEvents:i,persistence:c,router:t,shop:a,shopPay:r,source:d,url:u},{negotiateFromSessionData:h,createNegotiator:L1}),[y]),{negotiator:E,throttle:T}=k;F(()=>{(async function(){if(y&&y.__typename!=="Throttled"&&My(y,v,S).length!==0)try{const L=await E.negotiate({force:!0,silenceViolations:["all"],negotiationStage:"negotiation",customizeNegotiation:M=>M});switch(E.pendingFieldsNegotiation.value=L,L.status){case"success":{const M={type:"success",violations:L.violations,errors:L.errors,negotiationStage:"negotiation"};E.lastJourneyProgression.value=M,E.hasNegotiatedOnce.value=!0,await E.runListeners(M);break}case"error":{const M={type:"error",violations:L.violations,errors:L.errors,negotiationStage:"negotiation"};E.lastJourneyProgression.value=M,E.hasNegotiatedOnce.value=!0,await E.runListeners(M);break}case"fetch_failed":case"invalid":case"stale":case"denied":case"throttled":case"tooManyRequests":case"alreadyCompleted":break;default:rn(L)}}catch(L){L instanceof Error&&f(L)}})()},[E,y,v,S,a]);const A=Uy(E);if(F(()=>{A(l.latestReceipt.value)},[]),h==null&&g)return null;if(b){const R=BE(y.redirectUrl,typeof window>"u"?t.currentUrl.value.toString():void 0);return typeof window>"u"?t.redirect(R):window.location.assign(R.href),null}return s(VE.Provider,{value:E,children:s(n1,{value:T,children:e})})}function zy({checkout:e}){if(!e.configuration.layout.isOnePage.value)return!1;const t=e.unstable_graphqlDataRequestInfo?.checkoutSheetProtocolConfig?.schema;return!!(t&&UE.has(t))}function Hy({checkout:e,mobileCheckoutSdk:t}){if(!e.configuration.layout.isOnePage.value)return!1;const{version:n,schema:r}=t.config;return!!(n&&r||t.variant.recovery)}function x1(e){return zy(e)?"checkout-sheet":Hy(e)?"mobile-sdk":null}const M1=qe({displayName:"CheckoutSheetProtocolProvider",renderError:$y,renderLoading:qy,load:()=>ct(()=>Ve(async()=>{const{CheckoutSheetProtocolProvider:e}=await import("./CheckoutSheetProtocolProvider.Cu5JKJlc.js");return{CheckoutSheetProtocolProvider:e}}
19,__vite__mapDeps([62,1,2,3,4,5,6,63,64,65,7,8])).then(({CheckoutSheetProtocolProvider:e})=>({default:e})))}),N1=qe({displayName:"MobileCheckoutSdkProvider",renderError:$y,renderLoading:qy,load:()=>ct(()=>Ve(async()=>{const{MobileCheckoutSdkProvider:e}=await import("./MobileCheckoutSdkProvider.CdVI2VkJ.js");return{MobileCheckoutSdkProvider:e}},__vite__mapDeps([66,1,2,3,4,5,63,64,65,6,7,8])).then(({MobileCheckoutSdkProvider:e})=>({default:e})))});function qy({children:e}){return s(q,{children:e})}const D1={"checkout-sheet":M1,"mobile-sdk":N1};function Gy(e){const t=x1(e);return t?D1[t]:null}function O1({children:e}){const t=Gy(_());return t?s(t,{children:e}):s(q,{children:e})}function $y(e){throw e}const F1=["closeAnnouncement","announcementAfterCollapsed","announcementAfterExpanded","announcementClosed","announcementExpanded","announcementCollapsed"],Wy=ft("AnnouncementEmitterContext");function B1({children:e}){const t=V(new Map),n=x((l,c)=>{t.current.has(l)||t.current.set(l,new Set);const u=t.current.get(l);u.has(c)||(GP(c),u.add(c))},[t]),r=x((l,c)=>{const u=t.current.get(l);if(u)for(const d of u)d(c)},[t]),o=x((l,c)=>{const u=t.current.get(l);u?.has(c)&&(od(c),u.delete(c))},[t]),i=x(l=>{const c=l?[l]:F1;for(const u of c){const d=t.current.get(u);if(d){for(const p of d)od(p);d.clear()}}},[t]),a=B(()=>({on:n,emit:r,off:o,removeAllListeners:i}),[n,r,o,i]);return s(Wy.Provider,{value:a,children:e})}function Yy(){return Ut(Wy)}const jy=He(null),B7=ft("PendingComponentContext");function V1({children:e}){const t=B(()=>{const n=ue(new Set);return{registerComponent:o=>(n.value=new Set([...n.peek(),o]),()=>{n.value=new Set([...n.peek()].filter(i=>i!==o))}),pendingComponentsSignal:n}},[]);return s(jy.Provider,{value:t,children:e})}function V7(){return Ee(jy)}const hp=Symbol("checkout-web.skeletonRemovalLatch");function ru(e){const t=e;let n=t[hp];if(!n){let r=()=>{};n={promise:new Promise(i=>{r=i}),resolve:r,removed:!1},t[hp]=n}return n}function Ky(){return typeof document>"u"?new Promise(()=>{}):ru(document).promise}function Ea(e){const t=ru(e);t.removed=!0,t.resolve()}function U1(e){return ru(e).removed}const U7=ft("ExtensionPointContext"),z7=ft("ExtensionContext"),Jy=ft("CheckoutEditorBridgeContext");function z1({children:e}){const t=to(),n=yR(),[r,o]=oe(null),i=St();return t?s(Jy.Provider,{value:r,children:[n||r?e:null,s(ve,{when:i,children:s(H1,{setContext:o})})]}):e}const H1=qe({load:()=>Ve(()=>import("./CheckoutEditorBridge.D29oJo3o.js"),__vite__mapDeps([67,1,55,33,14,2,3,4,5,68,60,65,6,7,8]))}),Xy=He({loading:!1}),q1="dev";function H7(){return Ee(Xy)}function G1(e){return!(!e?.version||parseInt(e.version,10)<3)}const Ca="dev_mode";function $1(e){return{get:()=>e.get(Ca),set:t=>{const n=new Date().getTime(),r=new Date(n+504*60*60*1e3);e.set(Ca,t,{expiry:r})},remove:()=>{e.delete(Ca)}}}function W1(){const{client:e}=_();return B(()=>$1(e.cookies),[e.cookies])}function Y1({children:e}){const t=j1();return s(Xy.Provider,{value:t,children:e})}function j1(){const e=W1(),{router:t,shop:n}=_(),r=!1,o=B(()=>t.currentUrl.value.searchParams.get(q1)??e.get(),[t,e]),i=o!=null&&(n.allowExtensionDevelopment||r),[a,l]=$P((c,u)=>{switch(u.type){case"fetched":{const d=G1(u.workspace)?{...u.workspace,extensions:K1(u.workspace.extensions)}:{...u.workspace,extensions:u.workspace.extensions.map(({extensionPoint:p,...m})=>({version:null,...m,extensionPoints:p?[p]:m.extensionPoints}))};return d.appId&&(d.appId=J1(d.appId)),{loading:!1,workspace:d}}case"error":return{loading:!1}}},{loading:i});return F(()=>{if(!i)return;let c=!0;return(async()=>{try{const d=await(await fetch(o)).json();if(!c)return;e.set(o),l({type:"fetched",workspace:d})}catch{if(!c)return;l({type:"error"})}})(),()=>{c=!1}},[o,e,i]),a}function K1(e){return e.filter(n=>n.surface==="checkout"?!0:Array.isArray(n.extensionPoints)?(n.extensionPoints=n.extensionPoints.filter(r=>typeof r=="object"&&"surface"in r&&r?.surface==="checkout")).length>0:!1).map(n=>({...n,extensionPoints:n.extensionPoints.map(r=>typeof r=="object"?r:{target:r,metafields:n.metafields,surface:"checkout"})}))}function J1(e){const t=e.trim();return t.startsWith("gid://shopify/App/")?t:zE("App",t)}function Qy(){const{buyerIdentity:e,deliveryNext:t}=H(),{checkout:n,shop:r,i18n:o}=_(),i=w(()=>HE(e.value?.purchasingCompany?.location.shippingAddress)?.countryCode),{details:a}=Yt(i.value),l=We(a),c=r.additionalAddressFieldsEnabled;return w(()=>qE({purchasingCompany:e.value?.purchasingCompany,shippingCountries:r.shippingCountries,addressSettings:n.configuration.addressSettings.nonBillingAddressSettings.value,countryDetails:l.value,deliveryNextValue:t.value,additionalFieldsEnabled:c,i18n:o}))}function io(){const{buyerIdentity:e}=H(),t=Qn();return w(()=>t.value.enabledDeliveryMethods.includes("PICK_UP")&&!!e.value?.purchasingCompany)}function so({checkout:e,source:t}){const n=e.proposal.facts.delivery??[];if(nt(t)&&n.length>0)return n[0]}function Zy(){const e=io(),t=H().deliveryNext,{checkout:n}=_();return w(()=>{const r=n.proposal.facts.delivery??[],o=r.length>0&&r.every(i=>i.pickupAddress!==null);return e.value&&(Pr(t.value)||o)})}function ou(){const e=On(),{buyerIdentity:t,shippingAddress:n}=H(),{checkout:r,source:o}=_(),i=Zy(),a=io(),l=Pn();return w(()=>l.value||!(a.value||e.value)||i.value?!1:!Lf(so({checkout:r,source:o})?.deliveryAddress??n.value)&&!t.value?.purchasingCompany?.location.shippingAddress)}function X1(){const e=H().buyerIdentity,t=Pn(),n=io(),{checkout:r,source:o}=_(),i=r.proposal.negotiated.fields.mustSelectProvidedShippingRate;return w(()=>{const a=e.value?.purchasingCompany,l=(i.value??!1)||!!so({checkout:r,source:o});return!!a&&(t.value||n.value&&!l)&&r.isShippingRequired.value})}const gp=["contact-information","shipping-address"],yp=["delivery-method"],vp=["payment-methods","billing-address","localization-extension"];function Q1(){const{i18n:e,shop:t,source:n,checkout:r,observability:o}=_(),{buyerIdentity:i}=H(),a=ou(),l=Pn(),c=Qy(),u=io(),d=X1(),p=x((h,g)=>(o.log("journey_page_fast_forwarded","Fast-forwarded through page",{pageId:h,reason:g}),!0),[o]),m=x(h=>{const g=i.value?.purchasingCompany;return!g?.location.shippingAddress||!h?!1:!!(l.value&&c.value&&ni(g.location.shippingAddress,h))},[i,l,c]);return w(()=>
19{if(!i.value?.purchasingCompany)return;const g=!nt(n)&&r.isShippingRequired.value&&!a.value,y=d.value,v={onePage:()=>({id:"onePage",label:e.translate("general.page_title"),route:"/",features:[...y?gp:[],...g?yp:[],...vp]}),information:()=>({id:"information",label:e.translate("contact.title"),route:"/information",features:gp,fastForwardThroughPage:({shippingAddress:P})=>m(P)&&!u.value?p("information","business_customer_pre_negotiated_address"):!1}),shipping:()=>({id:"shipping",label:e.translate("shipping.title"),route:"/shipping",features:yp,fastForwardThroughPage:({shippingAddress:P,deliveryNext:b})=>l.value?m(P)?p("shipping","business_customer_pre_negotiated_address"):!1:b?.status!=="unavailable"?p("shipping","business_customer_no_editable_address_with_delivery"):!1,skipOverPage:({deliveryNext:P})=>Pr(P)}),payment:()=>({id:"payment",label:e.translate("payment.title"),route:"/payment",features:vp}),review:()=>({id:"review",label:e.translate("review.title"),route:"/review",features:[]})};return r.configuration.layout.isOnePage.value?[v.onePage(),...t.confirmationPageEnabled?[v.review()]:[]]:[...y?[v.information()]:[],...g?[v.shipping()]:[],v.payment(),v.review()]}).value}function _p(e){!e.parts.email.value.trim()||!e.parts.acceptEmailMarketing.value||(e.context.emailMarketingConsentGrantReachedSignal.value=!0)}function yn(e,t){return e?.id===t?.id&&e?.label===t?.label&&e?.route===t?.route}function Z1(){const e=Ce(),t=Je(),{checkout:n}=_(),r=n.configuration.layout.isOnePage.value;return xh(async(o,i)=>{if(o==="completion"){_p(t);return}if(o!=="progression"||i?.prefetch||r)return;const{currentDetour:a,currentPage:l,plan:c}=e.value;if(a||l==null)return;const u=t.current.value,d=c.greenPath.findIndex(m=>yn(m,l)),p=eM(c.greenPath,d,u);(l.id==="shipping"||l.id==="information"&&p?.id==="shipping")&&_p(t)}),null}function eM(e,t,n){return e.slice(t+1).find(r=>r.skipOverPage==null||!r.skipOverPage(n))}function tM(e){return e?.type==="thankYou"}function nM({router:e,plan:t,journeyStateSignal:n}){const r=V(void 0),o=w(()=>{const l=e.currentUrl.value.normalizedPath;return t.greenPath.find(c=>c.route===l)}),i=w(()=>{const l=o.value;l&&(r.current=l);const c=r.current,u=e.currentUrl.value.normalizedPath,{history:d}=n.value,p=t.detours.find(m=>m.route===u);if(l)return l;if(p&&c)return c;if(p&&!c){const m=t.greenPath[0],f=d.find(g=>!g.complete);return t.greenPath.find(g=>g.id===f?.id)??m}}),a=w(()=>{const l=n.value.plan.detours.find(c=>c.route===e.currentUrl.value.normalizedPath);return tM(l)});return{pageBeforeDetour:i,completed:a}}function ev(e){const t=typeof e=="string"?e:e.type;return nt(e)||t==="draftOrder"}function rM(){const{data:e}=ro();return e?.session?.negotiate.result.__typename!=="NegotiationResultAvailable"?!1:e.session.negotiate.result.sellerProposal.delivery.__typename==="PendingTerms"}function oM(){const{data:e}=ro(),{checkout:t}
19=_(),n=e?.session?.negotiate.result;let r;if(n?.__typename==="NegotiationResultAvailable"&&n.sellerProposal.delivery.__typename==="PendingTerms"){const{sellerProposal:i,buyerProposal:a}=n;r=$f({delivery:i.delivery,buyerDelivery:a.delivery,remoteDelivery:Wf(i.remote).remoteDelivery})}const{details:o}=Yt(r?.countryCode);return r==null?!1:Jl({address:r,addressSettings:t.configuration.addressSettings.nonBillingAddressSettings.value,countryDetails:o})}function iM(){const{data:e}=ro();if(e?.session?.negotiate.result.__typename!=="NegotiationResultAvailable")return;const{sellerProposal:t}=e.session.negotiate.result;return $f({delivery:t.delivery,remoteDelivery:Wf(t.remote).remoteDelivery})}function sM(e){const{billingAddressSettings:t,nonBillingAddressSettings:n}=e.configuration.addressSettings;return e.isShippingRequired.value?t.value:n.value}function q7(e){return e==="SUBSCRIPTION"?"subscription":"oneTimePurchase"}function Sl(e){return e.length===1&&e[0]==="PICK_UP"}const Br="departure_page";function tv({violations:e,greenPath:t,negotiated:n,currentPage:r}){const o=new Set(e.map(ao)),i=t.filter(c=>c.skipOverPage?!c.skipOverPage(n):!0),a=i.findIndex(c=>c.id===r?.id);return(a===-1?i:i.slice(0,a)).find(c=>(typeof c.features=="function"?c.features(n):c.features).some(d=>o.has(d)))}function aM({departurePageId:e,greenPath:t,history:n,negotiated:r,observability:o,receipt:i}){const a=rv(t,r,"payment-methods");if(lM(i)&&a)return a;const l=cM(t,e);if(l)return l.id==="review"?(a||o.leaveErrorBreadcrumb("[Journey] computePageToRedirect: no last page with payment methods found, falling back to first page "),a??t[0]):l;const c=n.find(p=>!p.complete&&!p.skipped),u=t.findIndex(p=>c?.id===p.id);if(!a){const p=t[u]??t[0];return o.leaveErrorBreadcrumb("[Journey] computePageToRedirect: no page with payment methods found, falling back to first incomplete page",{fallbackPageId:p?.id}),p}const d=t.findIndex(p=>p.id===a.id);if(u>=0&&d>u){const p=t[u];return o.leaveErrorBreadcrumb("[Journey] computePageToRedirect: payment methods page is not available from current history, falling back to first incomplete page",{paymentMethodsPageId:a.id,fallbackPageId:p.id}),p}return a}function lM(e){return e?.failure.type==="payment"&&e.failure.hasOffsitePaymentMethod===!0}function cM(e,t){return t?e.find(({id:n})=>n===t):void 0}function uM(){const{router:e}=_(),t=nv();return x((n,r)=>{const i={pathname:t(n).route,search:e.currentUrl.value.search};r?.replace?e.navigate(i,r):e.navigate(i)},[t,e])}function nv(){const{observability:e}=_(),{history:t,plan:n}=Ce().value,r=Je();return x(o=>dM({feature:o,greenPath:n.greenPath,history:t,negotiated:r,observability:e}),[n.greenPath,r,t,e])}function dM({feature:e,greenPath:t,history:n,negotiated:r,observability:o}){let i=rv(t,r,e);const a=n.find(d=>!d.complete&&!d.skipped),l=t.findIndex(d=>d.id===i?.id),c=t.findIndex(d=>a?.id===d.id),u=l>=0&&l<=c;if(!i||!u){const d=t[c]??t[0];o.leaveErrorBreadcrumb(`useNavigateToLastPageWithFeature - chosen page with feature ${e} was not visited by user, defaulting to ${d?.id}`),i=d}return i}function rv(e,t,n){return[...e].reverse().find(i=>(typeof i.features=="function"?i.features(t.current.peek()):i.features).includes(n))}function pM(e){return e.split("$.")[1]?.split(".").map(t=>t.replace(/\[\d+\]/g,""))??[]}function ao(e){if(!("target"in e))return;const[t,n]=pM(e.target);switch(t){case"payment":return n==="billingAddress"?"billing-address":"payment-methods";case"tip":return"payment-methods";case"buyerIdentity":return"contact-information";case"delivery":return Kr.has(e.code)?"shipping-address":"delivery-method";case"cart":switch(n){case"buyerIdentity":return"contact-information";case"deliveryGroups":return"shipping-address"}}}const mM=["checkout","cartNext","draftOrder"];function ov(e,t,n){if(!e)return!1;const r=t?.[0]?.method;if(r?.type!=="wallet")return!1;const o=Xl(n);return r.name==="APPLE_PAY"||r.name==="PAYPAL_EXPRESS"&&o}function fM({disabled:e,key:t,variants:n}){const{client:r,router:o}=_(),i=o.currentUrl.value;if(e)return;const l=new URLSearchParams(i.search).get(t);if(l&&n.includes(l))return l;const c=r.cookies.get(t);if(c&&n.includes(c))return c}function hM(){const e=fM({key:"operatziya_y",variants:[Lr.Control,Lr.Treatment]}),{client:t}=_(),r=t.unstable_getSerialization("experiments")?.find(o=>o.clientHandle===rA)?.variant===Lr.Treatment;return e||(r?Lr.Treatment:Lr.Control)}function iv(){const{shop:e}=_(),t=hM()===Lr.Treatment;return!!e.confirmationPageEnabled||t}function sv(e){return{id:"review",label:e.translate("review.title"),route:"/review",features:[]}}const bp=["delivery-method"],gM=new Set(GE),yM=new Set($E),vM=new Set(WE);function _M(){const{i18n:e,shop:t,source:{type:n},checkout:r,observability:o}=_(),{extensibility:i}=r,a=Qn(),l=Ly(),c=mM.includes(n),{data:u}=ro(),d=iM(),{details:p}=Yt(d?.countryCode),m=n==="draftOrder",f=r.proposal.negotiated.fields.mustSelectProvidedShippingRate.value??!1,h=iv(),{parts:g}=Ot(),y=H(),v=y.paymentMethods.value,P=g.paymentLines,b=r.configuration.addressSettings.nonBillingAddressSettings.value,C=sM(r),I=y.isShippingRequired.value,S=x((E,{excludedExtensionTargets:T}={})=>i.ui.hasBlockingExtensionForFeatures({features:E,placementReferences:l,excludedExtensionTargets:T}),[l,i.ui]),k=x((E,T)=>(o.log("journey_page_fast_forwarded","Fast-forwarded through page",{pageId:E,reason:T}),!0),[o]);return B(()=>bM({i18n:e,sourceType:n,addressSettings:b,billingAddressSettings:C,hasBlockingUiExtensionForFeatures:S,getSellableDeliveryMethods:()=>a.value,initialNegotiationData:u,isDraftOrderCheckout:m,isPrePopulatedSourceType:c,isShippingRequired:I,proposedPaymentLines:P,reviewEnabled:h,shippingAddress:d,shippingCountryDetails:p,mustSelectProvidedShippingRate:f,shop:t,checkout:r,paymentMethods:v,observability:o,recordFastForward:k}),[b,C,S,a.value,u,m,c,I,P,h,d,p,f,n,e,t,r,v,o,k])}function bM({i18n:e,sourceType:t,addressSettings:n,billingAddressSettings:r,hasBlockingUiExtensionForFeatures:o,getSellableDeliveryMethods:i,initialNegotiationData:a,isDraftOrderCheckout:l,isPrePopulatedSourceType:c,isShippingRequired:u,proposedPaymentLines:d,reviewEnabled:p,shippingAddress:m,shippingCountryDetails:f,mustSelectProvidedShippingRate:h,shop:g,checkout:y,paymentMethods:v,observability:P,recordFastForward:b}){const C=(S,k)=>{switch(k){case"contact-information":return Ji(S.contactInfo,S.allViolations);case"shipping-address":return CM({shippingAddress:m,addressSettings:n,countryDetails:f,violations:S.allViolations,state:S,isDraftOrder:l});case"billing-address":return kM(r,S.billingAddress,S.allViolations);case"delivery-method":return IM(S.deliveryNext,S.allViolations);case"payment-methods":case"localization-extension":return!1;default:return rn(k)}},I=(S,k)=>o(k,{excludedExtensionTargets:SM(S.deliveryNext)})?{gatedBy:"extension"}:jE(S.paymentLines)?{gatedBy:"paypalExpress",satisfied:EM(S.paymentLines,S.deliveryNext)&&Ji(S.contactInfo,S.allViolations)}:KE(S.paymentLines)?{gatedBy:"googlePay"}:{gatedBy:null,unsatisfied:k.filter(E=>!C(S,E))};return{greenPath:[{id:"information",label:e.translate("contact.title"),route:"/information",features:({deliveryNext:S})=>{function*k(){if(yield"contact-information",YE(S)||zr(S)){yield"delivery-method";return}u?yield"shipping-address":yield"billing-address"}return Array.from(k())},fastForwardThroughPage:(S,k)=>{const E=I(S,k);if(E.gatedBy==="extension")return!1;if(E.gatedBy==="paypalExpress")return E.satisfied?b("information","paypal_express_and_contact_satisfied"):!1;if(E.gatedBy==="googlePay")return!1;const[T]=E.unsatisfied;return P.log("journey_page_fast_forward_features_checked","Features evaluated for fast-forward",{pageId:"information",blockingFeature:T??null,isPrePopulatedSourceType:c,allViolations:S.allViolations?.map(A=>A.code)||[]}),c&&T===void 0},blockedOnlyByShippingAddress:(S,k)=>{const E=I(S,k),T=l&&n.isRequired("phone",{countryCode:S.shippingAddress?.countryCode})&&(!S.contactInfo?.email||!S.shippingAddress?.phone);return E.gatedBy===null&&c&&!T&&E.unsatisfied.length===1&&E.unsatisfied[0]==="shipping-address"&&(S.allViolations??[]).every(A=>ao(A)!=="shipping-address")}},{id:"shipping",label:e.translate("shipping.title"),route:"/shipping",features:bp,fastForwardThroughPage:S=>o(bp)?!1:t==="cartNext"?AM(S.deliveryNext)?b("shipping","cart_next_shipping_selection_determined"):RM(S.paymentLines)?b("shipping","cart_next_has_direct_payment_session"):!1:PM({latestNegotiation:S,initialNegotiation:a,isPrePopulatedSourceType:c})?b("shipping","initial_delivery_selection_preserved"):!1,skipOverPage:({deliveryNext:S,isShippingRequired:k})=>!k||Pr(S)||zr(S)||h||Sl(i().enabledDeliveryMethods)},{id:"payment",label:e.translate("payment.title"),route:"/payment",features:()=>ov(p,d.peek(),{shop:g,checkout:y,paymentMethods:v})?["payment-methods","localization-extension"]:["payment-methods","billing-address","localization-extension"]},...p?[{id:"review",label:e.translate("review.title"),route:"/review",features:["billing-address"]}]:[]],detours:[{type:"throttle",label:e.translate("throttle.title"),route:"/throttle"}
19,{type:"processing",label:e.translate("processing.title"),route:"/processing"},{type:"thankYou",label:e.translate("thank_you.title"),route:"/thank-you"},{type:"stockProblems",label:e.translate("stock.title"),route:"/stock-problems"},{type:"postPurchase",label:e.translate("post_purchase.title"),route:"/post-purchase"}]}}function PM({latestNegotiation:e,initialNegotiation:t,isPrePopulatedSourceType:n}){if(!n||!(e?.deliveryNext?.status==="filled"))return!1;const o=t?.session?.negotiate.result;if(o?.__typename!=="NegotiationResultAvailable"||o.buyerProposal.delivery.__typename!=="FilledDeliveryTerms")return!1;const i=o.buyerProposal.delivery.deliveryLines.map(c=>c.selectedDeliveryStrategy?.__typename==="DeliveryStrategyReference"?c.selectedDeliveryStrategy.handle:void 0).find(c=>c!==void 0);if(i===void 0)return!1;const a=ei(e?.deliveryNext).find(c=>c.status==="available");return a===void 0?!1:!(i!==br(a)?.handle)}function SM(e){const t=new Set,n=Pp(e,"PICK_UP"),r=Pp(e,"PICKUP_POINT");return n||ka(t,gM),r||ka(t,yM),(n||r)&&ka(t,vM),t.size>0?t:void 0}function Pp(e,t){return ei(e).some(n=>n.status==="available"&&br(n)?.methodType===t)}function ka(e,t){t.forEach(n=>e.add(n))}function EM(e,t){const n=Pt(e?.lines,"PAYPAL_EXPRESS");if(!n||t?.status!=="filled")return!1;const r=n.method.walletContent,o=r?.email??void 0,i=r?.token??void 0;return!!(o&&i)}function Ji(e,t=[]){return!!(e?.email??e?.phone)&&t.every(n=>ao(n)!=="contact-information")}function CM({shippingAddress:e,addressSettings:t,countryDetails:n,violations:r=[],isDraftOrder:o,state:i}){return!e||t.isRequired("phone",{countryCode:e?.countryCode})&&o&&(!i.contactInfo?.email||!i.shippingAddress?.phone)||!Jl({address:e,addressSettings:t,countryDetails:n})?!1:r.every(a=>ao(a)!=="shipping-address")}function kM(e,t,n=[]){return Jl({address:t,addressSettings:e})?n.every(r=>ao(r)!=="billing-address"):!1}function IM(e,t=[]){return e?.status!=="filled"||!e.lines.some(n=>"methods"in n&&n.methods.some(r=>r.methodType==="PICK_UP"||r.methodType==="PICKUP_POINT"))?!1:t.every(n=>ao(n)!=="delivery-method")}function AM(e){const t=TM(e);return t.length===0?!1:t.every(n=>wM(n)||LM(n))}function TM(e){return e?.status!=="filled"?[]:ei(e).filter(t=>t.status==="available")}function wM(e){return e.methods.length===1}function LM(e){if(e.methods.length<=1)return!1;const t=br(e);return t?e.methods[0]?.handle!==t.handle:!1}function RM(e){return e?.lines.some(t=>t.method.type==="direct"&&!!t.method.sessionId)??!1}class Rt extends oA{constructor(){super(...arguments),this.name="JourneyError"}}class xM extends bn{constructor(){super(...arguments),this.name="SubmitForCompletionNetworkError"}}function MM(e,t){return e?.type===t?.type&&e?.route===t?.route&&e?.label===t?.label}function NM({plan:e,isSimulated:t,currentPageFromUrlIndex:n,currentPageFromHistoryIndex:r,canLoadReview:o}){const i=e.greenPath[n];if(t&&i||n>=0&&n<=r)return i;const a=e.greenPath[r];if(a?.id==="review"&&!o){const l=e.greenPath.findIndex(u=>u.id==="review"),c=e.greenPath[l-1];return c||e.greenPath[0]}return a}function DM(e,t){const n=new URLSearchParams(e.searchParams),r=new URLSearchParams(t.searchParams);return n.sort(),r.sort(),e.pathname===t.pathname&&n.toString()===r.toString()&&JSON.stringify(e.state)===JSON.stringify(t.state)}function av(e){return Ql(e)&&!e.some(t=>Zl.has(t.code))}function lv(e){return e.some(t=>t.__typename==="UnprocessableTermViolation"?JE.has(t.code):!1)}function cv(e,t,n,r,o){const i=e.some(l=>l.code==="BUYER_IDENTITY_PERSONAL_ORDER_NOT_ALLOWED"),a=e.some(l=>l.code==="BUYER_IDENTITY_COMPANY_LOCATION_REQUIRED");i&&t&&(o.log("redirect_to_storefront","[B2B] Buyer identity violation: personal order not allowed, redirecting to storefront",{redirectSuccess:!!t}),window.location.replace(t)),a&&window.location.replace(n??r)}const OM="journey_init_contact_state",FM="negotiated_missing_contact_violation_observed";function BM({observability:e,negotiated:t,plan:n,identity:r,isOnePageLayout:o,initialPath:i,sessionType:a}){F(()=>{const c=t.current.value,u=t.parts.email.value,d=t.current.fields.allViolations.value??[];e.log(OM,"Initial contact-info state captured at journey initialization",{layout:o?"onePage":"threePage",planPages:n.greenPath.map(p=>p.id).join(","),initialPath:i,sessionType:a,identity:r,customerProfileType:c?.buyerIdentity?.customerProfile?.__typename,hasNegotiatedContactEmail:!!c?.contactInfo?.email,hasNegotiatedCustomerProfileEmail:!!c?.buyerIdentity?.customerProfile?.email,hasProposedEmail:!!u,hasMissingContactViolation:d.some(p=>p.code==="BUYER_IDENTITY_MISSING_CONTACT_METHOD")})},[]);const l=V(!0);$e(()=>{const c=t.current.fields.allViolations.value??[];if(l.current){l.current=!1;return}c.some(d=>d.code==="BUYER_IDENTITY_MISSING_CONTACT_METHOD")&&e.log(FM,"Subsequent negotiation surfaced a missing-contact violation",{hasNegotiatedContactEmail:!!t.current.fields.contactInfo.peek()?.email,hadProposedEmailFallback:!!t.parts.email.peek(),customerProfileType:t.current.peek().buyerIdentity?.customerProfile?.__typename,identity:r,sessionType:a,layout:o?"onePage":"threePage"})})}class VM extends bn{constructor(){super(...arguments),this.name="InfiniteRedirectError",this.defaultGroupingHash="InfiniteRedirectError"}}const Sp=10,Ia=200;class UM{#e={};#t=null;#r=!1;detectInfiniteRedirect(t,n,r){const o=t.pathname;if(this.#t&&clearTimeout(this.#t),this.#e[o]=(this.#e[o]||0)+1,this.#e[o]>=Sp&&!this.#r){const i=new VM(`Detected potential infinite redirect: ${this.#e[o]} navigations to ${o} within ${Ia}ms`),a=n.value;r.error(i,{severity:"error",metadata:{redirectDetails:{navigationCounts:JSON.stringify(this.#e),currentUrl:t.toString(),path:o,threshold:Sp,timeframe:Ia},journeyState:{redirectTo:a.redirectTo?.route}}}),this.#r=!0,this.#e={}}this.#t=setTimeout(()=>{this.#e={},this.#t=null},Ia)}cleanup(){this.#t&&(clearTimeout(this.#t),this.#t=null)}}function zM(){const e=V(null);
19return e.current||(e.current=new UM),F(()=>()=>{e.current?.cleanup()},[]),e.current}function HM(e){const{router:t,checkout:n,observability:r,source:o}=_(),i=oo(),a=n.proposal.facts.delivery??[],l=Je(),c=!!n.proposal.facts.requiresShipping,u=nt(o)?c:n.isShippingRequired.value,d=n.configuration.layout.isOnePage.value,p=rM(),m=oM(),f=Zy(),h=zM();BM({observability:r,negotiated:l,plan:e,identity:n.identity.current.value,isOnePageLayout:d,initialPath:t.currentUrl.value.normalizedPath,sessionType:o.type});const{postPurchaseInquiryStatus:g,paymentLines:y}=se(),v=g.value,P=B(()=>Ul((S,k)=>GM(S,k,r,t,l),Ep({purchasingCompanyHasNegotiatedLocalPickupSelected:f.value,negotiatedDeliveryPending:p,buyerProposalHasDestination:m,deliveryFact:a,observability:r,negotiated:l,plan:e,postPurchaseInquiryStatus:v,proposedPaymentLines:y.value,receipt:n.latestReceipt.value,sessionType:o.type,shippingRequired:u,throttle:i.current,url:t.currentUrl.value})),[]),b=x(S=>{P.value=S},[P]),C=V(d);C.current!==d&&(C.current=d,b({type:"reinitialize",state:Ep({purchasingCompanyHasNegotiatedLocalPickupSelected:f.value,negotiatedDeliveryPending:p,buyerProposalHasDestination:m,deliveryFact:a,observability:r,negotiated:l,plan:e,postPurchaseInquiryStatus:v,proposedPaymentLines:y.value,receipt:n.latestReceipt.value,sessionType:o.type,shippingRequired:u,throttle:i.current,url:t.currentUrl.value})}));const I=V(t.currentUrl.value);return I.current=t.currentUrl.value,F(()=>t.currentUrl.subscribe(S=>{I.current!==S&&(I.current=S,b({type:"clearRedirect"}),h.detectInfiniteRedirect(S,P,r))}),[t,b,h,P,r]),F(()=>t.block(S=>{const k=t.currentUrl.value,E=DM(k,S);return E&&r.leaveErrorBreadcrumb("[useJourneyTracking] Blocked navigating to same route",{current:{path:k.pathname,search:k.search},requested:{path:S.pathname,search:S.search}}),E}),[t,r]),[P,b]}function Ep({purchasingCompanyHasNegotiatedLocalPickupSelected:e,negotiatedDeliveryPending:t,buyerProposalHasDestination:n,deliveryFact:r,observability:o,negotiated:i,plan:a,postPurchaseInquiryStatus:l,proposedPaymentLines:c,receipt:u,sessionType:d,shippingRequired:p,throttle:m,url:f}){const h=i.current.peek(),g=a.greenPath.findIndex(W=>{if(W.skipOverPage?.(h))return!1;const he=zo(W.features,h);return W.fastForwardThroughPage?!W.fastForwardThroughPage(h,he):!0}),y=a.greenPath[g],v=[];o.leaveErrorBreadcrumb("Journey:initializeJourney: initial firstPage",{firstPageIndex:g,firstPage:String(y?.id),plan:JSON.stringify(a.greenPath)}),a.greenPath.slice(0,g).forEach(W=>{if(W.id==="information"){const he=Ji(h?.contactInfo,i.current.fields.allViolations.peek()??[]);o.leaveErrorBreadcrumb("Journey:initializeJourney: revalidating information page",{pageComplete:he,contactInfo:JSON.stringify(h?.contactInfo),violations:i.current.fields.allViolations.peek()??[]}),v.push({id:W.id,skipped:!1,complete:he})}else v.push({id:W.id,skipped:!1,complete:!0})}),v.push({id:y.id,skipped:!1,complete:!1});const b=a.greenPath.findIndex(W=>W.route!==f.normalizedPath?!1:W.skipOverPage?!W.skipOverPage(h):!0),C=c?.some(W=>W.method.type==="direct"&&W.method.sessionId),S=i.current.fields.runningTotal.peek()?.amount===0||C,k=a.greenPath[b]?.id==="review"&&!S,E=k?b-1:b,T=!!a.greenPath[E]?.skipOverPage?.(h);if(t&&n&&!T&&E>g&&y?.blockedOnlyByShippingAddress?.(h,zo(y.features,h))){for(let W=g;W<E;W++){const he=v[W];v[W]=he?{...he,complete:!0}:{id:a.greenPath[W].id,skipped:!0,complete:!0}}v[E]={id:a.greenPath[E].id,skipped:!1,complete:!1},o.log("journey_history_advanced","History advanced past a page blocked only by an unpriced address",{sessionType:d,firstPageIndex:g,currentPageFromUrlIndex:b,advanceTo:E,clamped:k})}const A=v.find(W=>!W.complete&&!W.skipped),R=a.greenPath.findIndex(W=>A?.id===W.id),L=a.greenPath[R],M=a.greenPath[b],D=NM({plan:a,isSimulated:d==="simulated",currentPageFromUrlIndex:b,currentPageFromHistoryIndex:R,canLoadReview:S}),N=a.detours.find(W=>"route"in W&&W.route===f.normalizedPath),U=av(i.current.fields.allViolations.peek()??[]),z=i.current.fields.shippingAddress.peek(),O=r.length>0&&r[0].deliveryAddress?r[0].deliveryAddress:z,X=h?.buyerIdentity?.customerProfile?.__typename==="BusinessCustomerProfile"&&!e&&XE(O)&&ev(d)&&p,ne=new URLSearchParams(f.search),$=N?.type==="processing"&&ne.get("post_purchase")==="true",ee=(N?.type==="postPurchase"||$)&&l==="success"&&u?.status==="processed"&&u.orderCreationStatus.status==="created",te=(N?.type==="shopPayLogin"?a.detours.find(W=>W.type==="shopPayLogin"):void 0)??(N?.type==="offsitePaymentFailed"?a.detours.find(W=>W.type==="offsitePaymentFailed"):void 0)??(ee?a.detours.find(W=>W.type==="postPurchase"):void 0)??(m.status==="queued"?a.detours.find(W=>W.type==="throttle"):void 0)??(U?a.detours.find(W=>W.type==="stockProblems"):void 0)??(X?a.detours.find(W=>W.type==="noAddressLocation"):void 0)??(u?.status==="action_required"||u?.status==="processing"||u?.status==="processing_remote_checkouts"?a.detours.find(W=>W.type==="processing"):void 0)??(u?.status==="processed"&&u.redirectUrl?a.detours.find(W=>W.type==="processing"):void 0)??(u?.status==="processed"?a.detours.find(W=>W.type==="thankYou"):void 0)??(N?.type==="thankYou"&&d==="simulated"?a.detours.find(W=>W.type==="thankYou"):void 0);if(o.leaveErrorBreadcrumb("Journey:initializeJourney: resulting currentPage and expectedDetourFromState",{history:JSON.stringify(v.map(W=>W&&{id:W.id,complete:W.complete,skipped:W.skipped})),normalizedUrlPath:f.normalizedPath,currentPageFromHistory:String(L?.id),currentPage:String(D?.id),expectedDetourFromState:te?.route,receipt:JSON.stringify(u)}),te==null&&D==null)throw new Rt("Failed to initialize Journey: no detour or current page available",{groupingHash:"JourneyError::InitializeJourneyFailure"});return te?{plan:a,history:v,redirectTo:MM(N,te)?void 0:te}:{plan:a,history:v,redirectTo:yn(M,D)?void 0:D}}function qM(e,t,n,r){const o=t.greenPath.findIndex(i=>yn(i,e));if(o===-1)return r.leaveErrorBreadcrumb("validatePrerequisitesForPage: target page not found in plan",{targetPageId:e.id,targetPageRoute:e.route}),t.greenPath[0];if(!n)return r.leaveErrorBreadcrumb("validatePrerequisitesForPage: no negotiated context available",{targetPageId:e.id}),t.greenPath[0];for(let i=0;i<o;i++){const a=t.greenPath[i];let l=!1;if(a.id==="information"?l=Ji(n.contactInfo,n.allViolations??[]):l=!0,!l)return r.leaveErrorBreadcrumb("validatePrerequisitesForPage: prerequisite page not satisfied, redirecting",{targetPageId:e.id,targetPageRoute:e.route,unsatisfiedPrerequisitePageId:a.id,unsatisfiedPrerequisitePageRoute:a.route}),a}return e}function GM(e,t,n,r,o){n.leaveErrorBreadcrumb("Journey:updateJourney: initiated with action",{actionType:t.type});const{plan:i}=e,a=e.redirectTo?{...e,redirectTo:void 0}:e,l=r.currentUrl.value.normalizedPath,c=i.greenPath.find(d=>d.route===l),u=i.detours.find(d=>d.route===l);switch(t.type){case"reinitialize":return t.state;case"clearRedirect":return a;case"skipRemainingPages":{const{plan:d,history:p}=e;if(!c){if(u?.type==="thankYou")return e;const g=typeof window<"u"&&window.location?window.location.href:"SSR: no location available";throw n.leaveErrorBreadcrumb("Skipping to completion, but no current page",{currentDetour:u,currentUrl:g}),new Rt("Missing current page",{groupingHash:"JourneyError::SkipToCompletionNoCurrentPage"})}const m=d.greenPath.findIndex(g=>yn(g,c)),f=p.slice(0,m+1),h=f.pop();f.push({...h,complete:!0});for(let g=m+1;g<d.greenPath.length;g++){const y=f[g];y?f[g]={...y,skipped:!0}:f[g]={id:d.greenPath[g].id,skipped:!0,complete:!1}}return n.leaveErrorBreadcrumb("Journey:updateJourney: on progress, skip to completion",{history:f.map(g=>({id:g?.id,complete:g?.complete,skipped:g?.skipped})),currentDetourRoute:u?.route}),{...a,history:f}}case"progress":{const{plan:d,history:p}=e,{page:m}=t;if(m==null)throw n.leaveErrorBreadcrumb("Journey:updateJourney: progress failed, no next page",{currentPage:c?.id,currentDetour:u?.type,actionType:t.type}),new Rt(`Fail to update journey with "${t.type}": attempted to progress without a next page.`,{groupingHash:"JourneyError::UpdateJourneyProgressNoNextPage"});const f=d.greenPath.findIndex(g=>yn(g,m)),h=p.slice(0,f);for(let g=0;g<f;g++){const y=h[g];y==null?h[g]={id:d.greenPath[g].id,skipped:!0,complete:!0}:y.complete||(h[g]={...y,complete:!0})}return h.push({id:m.id,skipped:!1,complete:!1}),n.leaveErrorBreadcrumb("Journey:updateJourney: on progress",{history:h.map(g=>({id:g?.id,complete:g?.complete,skipped:g?.skipped})),currentPageRoute:m.route}),{...a,history:h}}case"complete":{const{history:d}=e,p=[...d],m=p.pop();return p.push({...m,complete:!0}),n.leaveErrorBreadcrumb("Journey:updateJourney: on complete, set currentPage to undefined",{history:JSON.stringify(p.map(f=>f&&{id:f.id,complete:f.complete,skipped:f.skipped}))}),{...a,history:p}}case"error":{const{plan:d,history:p}=e,{page:m=c}=t;if(m==null)return n.leaveErrorBreadcrumb("Journey:updateJourney: currentPage from state",{history:JSON.stringify(p.map(y=>y?.id)),currentPage:String(c?.id)}),n.error(new Rt(`Fail to update journey with "${t.type}": no next page.`,{groupingHash:"JourneyError::UpdateJourneyErrorCaseNoNextPage"})),{...a,redirectTo:d.greenPath[0]};const f=o?qM(m,d,o.current.peek(),n):m,h=!yn(m,f);o&&h&&n.leaveErrorBreadcrumb("Journey:updateJourney: prerequisite validation redirected",{requestedPage:m.id,redirectedToPage:f.id});const g=d.greenPath.findIndex(y=>yn(y,f));return n.leaveErrorBreadcrumb("Journey:updateJourney: on error",{history:p.map(y=>({id:y?.id,complete:y?.complete,skipped:y?.skipped})),originalTargetPageRoute:m.route,finalTargetPageRoute:f.route,currentDetourRoute:u?.route}),{...a,history:[...p.slice(0,g),{id:f.id,skipped:!1,complete:!1}]}}default:rn(t)}}function $M({plan:e}){const{router:t,observability:n}=_();return x(async(r,o)=>{const i=e.detours.find(l=>l?.type===r);if(!i)throw n.leaveErrorBreadcrumb("Detour, but no matching detour",{detourType:r,detours:e.detours,currentUrl:t.currentUrl.value.href}),new Rt("Detour, but no matching detour",{groupingHash:"JourneyError::DetourNoMatchingDetour"});const a=`${i.route}${e.greenPath[0].queryParams||""}`;t.navigate(a,o?.routerOptions)},[e.detours,e.greenPath,t,n])}function Cp(e){return e.status==="complete"||e.status==="inactive"}function kp(e){return e?.status==="failed"||e?.status==="processed"}function WM(e,t,n){const r=oo(),{checkout:o,client:i,shop:a,source:l,observability:c,url:u,router:d}=_(),p=Ot(),m=o.proposal.negotiated.fields.canUpdateMerchandise.value??!0;return x(async(f,h,g)=>{switch(f.type){case"thankYou":case"postPurchase":{c.log("use_exit_detour_detected",`Tried to progress out of a ${f.type} detour`,{currentPage:h?.route,currentDetour:f.type});return}case"throttle":{n(!0),await new Promise(y=>{if(Cp(r.current)){y();return}const v=r.subscribe(P=>{Cp(P)&&(v(),y())})}),await e({force:!0,include:[],silenceViolations:f.behavior==="redirectToCart"?["non-stock"]:["all"],negotiationStage:"progression",onComplete(y){switch(g?.(y),y.status){case"success":{if(h){t({type:"progress",page:h});const v=`${h.route}${h.queryParams||""}`;d.navigate(v,{replace:!0})}else throw new Rt("Exited throttle, but no next page",{groupingHash:"JourneyError::ExitedThrottleNoNextPage"});break}
19case"fetch_failed":case"error":case"invalid":case"stale":case"denied":case"throttled":case"alreadyCompleted":case"tooManyRequests":c.log("use_exit_detour_throttle_negotiation_non_success","Throttle negotiation completed with non-success result",{status:y.status,currentPage:h?.route});break;default:rn(y)}}}),n(!1);break}case"stockProblems":{if(n(!0),p.parts.merchandiseLines.value.length===0||!m)if(o.configuration.allowRedirectToStorefront)c.log("redirect_to_storefront","[Journey] Stock problems exit detour: redirecting to storefront",{redirectSuccess:a.hasStorefront,currentPage:h?.route,canUpdateMerchandise:m,merchandiseLinesCount:p.parts.merchandiseLines.value.length}),E1({client:i,url:u,source:l,configuration:o.configuration});else{c.log("blocked_redirect_to_storefront","[Journey] Unresolvable stock problems: redirect to storefront was blocked",{hasStorefront:a.hasStorefront,currentPage:h?.route,canUpdateMerchandise:m,merchandiseLinesCount:p.parts.merchandiseLines.value.length});break}else await e({force:!0,silenceViolations:["non-stock"],include:[],onComplete(y){switch(y.status){case"success":{if(h)t({type:"progress",page:h}),d.navigate(h.route,{replace:!0});else throw new Rt("Exited stock problems, but no next page",{groupingHash:"JourneyError::ExitedStockProblemsNoNextPage"});break}case"fetch_failed":case"error":case"invalid":case"stale":case"denied":case"throttled":case"tooManyRequests":case"alreadyCompleted":c.log("use_exit_detour_stock_problems_negotiation_non_success","[Journey] Exiting stock problems detour with non-success result",{resultStatus:y.status,currentPage:h?.route});break;default:rn(y)}}});n(!1);break}case"processing":{n(!0),c.log("use_exit_detour_processing_detected","[Journey] Exiting processing detour"),await new Promise(y=>{if(kp(o.latestReceipt.value)){y();return}const v=nl(()=>{kp(o.latestReceipt.value)&&(v(),y())})}),n(!1);break}case"shopPayLogin":{if(n(!0),h){t({type:"progress",page:h});const y=`${h.route}${h.queryParams||""}`;d.navigate(y,{replace:!0})}else throw new Rt("Exited shop pay login, but no next page",{groupingHash:"JourneyError::ExitedShopPayLoginNoNextPage"});n(!1);break}case"offsitePaymentFailed":{n(!1);break}case"noAddressLocation":case"terminalError":throw new Rt(`Can't progress out of a ${f.type} detour`,{groupingHash:"JourneyError::CantProgressOutOfDetour"});default:rn(f)}},[c,n,e,r,t,d,p.parts.merchandiseLines,m,i,u,l,a.hasStorefront,o])}class uv extends bn{constructor(){super(...arguments),this.name="CheckoutProfileChangeError"}}class wo extends bn{constructor(){super(...arguments),this.name="CheckoutProfileQueryMissingData"}}class YM extends bn{constructor(){super(...arguments),this.name="CheckoutProfileQueryFetchError",this.unactionable=!0}}async function iu(e,t){const{trigger:n,profileRequest:r,graphql:o,extensibility:i,configuration:a,observability:l,userEvents:c,telemetryContext:u,isActive:d}=t,p=d??(()=>!0),m=performance.now(),f=Date.now(),h={hasFinalized:!1},g=()=>{h.hasFinalized||(h.hasFinalized=!0,e())},y=a.profileId.value,v=r?.id,P=(R,L)=>{if(g(),y&&v&&v!==y){A({status:"superseded",activeCheckoutProfileId:a.profileId.value,stage:R,error:L});return}l.debug("checkout_profile_change","[CheckoutProfileChange]: Checkout profile change not applied due to isActive returning false",{configurationRecordId:v,stage:R})};if(u?.source?.type==="simulated"){g();return}if(!p())return P("before_fetch");if(!r?.id){g();return}const b=r,{requireBusinessCriticalOnly:C}=b,I=a.profileKey.peek();if(I&&Fo(gr,I)===Fo(gr,b)){g();return}const S=v!==y,k=S?void 0:a.getProfile(b);try{let R,L;if(k)R=k;else{const D=await ct(async()=>{const{data:N,error:U}=await o.staticQuery(gr,{variables:b,cache:!0});if(U)throw U;if(!N)throw new wo("Checkout profile query returned no data");if(!N.checkoutProfile)throw new wo("Checkout profile query returned no checkout profile data");if(S&&!N.shop)throw new wo("Checkout profile query returned no shop data");return N},{maxAttempts:3,shouldRetry:()=>!C&&p()});R=D.checkoutProfile,L=D.shop}return p()?()=>{try{if(!p()){P("before_apply");return}const D=R.activatedExtensions,{removed:N,kept:U}=jM(i,D);g();const z=X=>X.capabilities.blockProgress&&X.behaviors.value.blockProgress,O=U.filter(z),K=N.filter(z);i.ui.replace({activatedExtensions:D},{keepAlive:!1,reason:"checkout_profile_change"}),n==="negotiation"&&(O.length>0||K.length>0)&&(l.leaveErrorBreadcrumb("[CheckoutProfileChange] Running negotiation interceptors",{identifier:"checkout_profile_configuration_change",reason:"Blocking UI extension removed/updated. Validation errors will be updated, but interceptor behavior (block/allow) will be ignored.",removedBlockingExtensions:Ip(K),updatedBlockingExtensions:Ip(O)}),t.runInterceptors({negotiationStage:"negotiation",skipEffects:!1}).then(X=>{p()&&(t.validationErrors.value=X.errors)}).catch(X=>{l.error(new uv("Error occurred while running interceptors after checkout profile change",{cause:X}))})),a.update({profile:R,requireBusinessCriticalOnly:C,...S&&L?{themeData:L,addressSettings:{shopConfig:L}}:{}}),T()}catch(D){E(D)}}:P("after_fetch")}catch(R){if(!p())return P("fetch_failed",Aa(R));if(C){const L=Aa(R);return l.error(L),l.leaveErrorBreadcrumb("[CheckoutProfileChange] Loa
19ding unrestricted profile after restricted query failure",{checkoutProfileId:v}),iu(g,{...t,profileRequest:{...r,requireBusinessCriticalOnly:!1}})}E(R)}function E(R){const L=Aa(R);g(),l.error(L),A({status:"error",error:L})}function T(){A({status:"success"})}function A({status:R,error:L,activeCheckoutProfileId:M,stage:D}){n!=="initialization"&&(KM({observability:l,userEvents:c,...u},{startTime:m,startTimestamp:f,previousCheckoutProfileId:y,checkoutProfileId:v,activeCheckoutProfileId:M,trigger:n,status:R,stage:D,error:L}),R!=="superseded"&&l.debug("checkout_profile_change",`[CheckoutProfileChange] ${L?"Failed to update":"Updated"} checkout profile`,{trigger:n,previousCheckoutProfileId:y,checkoutProfileId:v,error:L?Es(L):void 0}))}}function jM(e,t){const n=e.ui.search().peek().filter(a=>a.type==="persisted"),r=new Set(t.flatMap(a=>a.targets.map(l=>l.publicIdentifier))),o=n.filter(a=>!r.has(a.targetPublicIdentifier));o.length>0&&e.ui.remove(o.map(a=>a.targetPublicIdentifier),{keepAlive:!1,reason:"checkout_profile_change"});const i=e.ui.search().peek().filter(a=>a.type==="persisted");return{removed:o,kept:i}}function Aa(e){return e instanceof WP||e instanceof YP?new YM("Could not complete checkout profile change, could not query checkout profile",{cause:e}):new uv("Could not complete checkout profile change",{cause:e})}function KM(e,t){const{startTime:n,startTimestamp:r,previousCheckoutProfileId:o,checkoutProfileId:i,activeCheckoutProfileId:a,trigger:l,status:c,stage:u,error:d}=t,p=Math.round(performance.now()-n),{observability:m,userEvents:f,source:h,shop:g,sessionToken:y,current:v}=e,P=h.checkoutSessionIdentifier??"",b=g.id,C=v.fields.buyerIdentity.peek()?.customerProfile?.id,I=rl(i),S=rl(o),k=d?bl(d):void 0,E=d?Es(d):void 0,T=Intl.DateTimeFormat().resolvedOptions().timeZone;c!=="superseded"&&f.monorailEvent({schemaId:"checkout_c1_profile_configuration_change_events/1.0",payload:{eventName:"checkout_profile_configuration_change",eventType:i===o?"business_critical_filter":"checkout_profile_markets_interaction",frontendEventTimestampEpochMs:r,frontendEventTimeZone:T,checkoutToken:P,shopId:b,customerId:C,sessionToken:y,checkoutProfileId:I,previousCheckoutProfileId:S,frontendEventsTimeDifferenceMs:p,errors:k?[k]:void 0}}),m.histogram({name:"checkout_profile_configuration_change",value:p,attributes:{trigger:l,status:c,error:E}});const A={previousCheckoutProfileId:o,checkoutProfileId:i,...a?{activeCheckoutProfileId:a}:{},trigger:l,duration:p,status:c,...u?{stage:u}:{},error:E},R=c==="superseded"?`Checkout profile change to ${i} superseded; active profile is ${a??"none"}`:`Checkout profile changed from ${o} to ${i}`;m.log("checkout_profile_configuration_change",R,A),m.leaveErrorBreadcrumb("[CheckoutProfileChange] Checkout profile change event recorded",{identifier:"checkout_profile_configuration_change",...A})}function Ip(e){return e.map(({id:t,name:n,appName:r,extensionPoint:{target:o}})=>({id:t,name:n,appName:r,target:o}))}const JM=1500,XM=450,G7=64,$7=14;function QM(e){return JM*e+XM}function ZM(e){const t=document.createElement("a");t.href=e,t.rel="noopener",t.referrerPolicy="strict-origin",document.body.appendChild(t),t.click(),t.remove()}function dv(e){return e.method.type==="customOnsite"&&e.method.paymentBrands?.length===1&&e.method.paymentBrands.includes("usdc")}function pv(e){return e.type==="customOnsite"&&e.paymentBrands?.length===1&&e.paymentBrands.includes("usdc")}function eN(e){return e.method.type==="customOnsite"&&(e.method.paymentBrands??[]).some(t=>t.toLowerCase()==="wechatpay")}function tN(e){return e.type==="customOnsite"&&(e.paymentBrands??[]).some(t=>t.toLowerCase()==="wechatpay")}function nN(){const e=H().paymentMethods,t=se().paymentLines;return w(()=>{const n=t.value.at(0);return n?eN(n)||rN(n,e.value):!1})}function rN(e,t){if(!t||t.length===0||!("walletContent"in e.method)||e.method.name!=="SHOP_PAY")return!1;const n=e.method.walletContent?.paymentMethodIdentifier;return!!t.find(o=>tN(o)&&o.paymentMethodIdentifier===n)}const oN={id:"a2a1d4e763e587abf6b17bb3b16c93cedd9799ee63a9f4664a4564d7ee76c64a",type:"query",name:"PollForReceipt",source:""};function su(){const e=H().paymentMethods,t=se().paymentLines;return w(()=>{const n=t.value.at(0);return n?dv(n)||iN(n,e.value):!1})}function iN(e,t){if(!t||t.length===0||!("walletContent"in e.method)||e.method.name!=="SHOP_PAY")return!1;const n=e.method.walletContent?.paymentMethodIdentifier;return!!t.find(o=>pv(o)&&o.paymentMethodIdentifier===n)}const sN=["post-purchase-e2e-tests.myshopify.com","e2e-post-purchase-testing.myshopify.com"];function aN(e){const t=location.hostname;return sN.includes(t)}const Ta=3e3,lN=3e4,cN=1e4,wa={TIMEOUT:12e4,ATTEMPTS:120},Ap="hsa_survey_completed";function W7(e){if(!e)return"";try{return new URL(mv(e)).hostname.replace(/^www\./,"")}catch{return e.replace(/^https?:\/\/(www\.)?/,"")}}const mv=e=>{const t="https://";return e.replace(/^(?:(.*:)?\/\/)?(.*)/i,(n,r,o)=>r?n:`${t}${o}`)},La="3ds_completed",uN=6e5;function jo(e){if(!e)return"none";try{const t=new URL(mv(e)).hostname.toLowerCase().replace(/^www\./,"");return t==="hooks.stripe.com"?"hooks.stripe.com":t==="uk.affirm.com"?"uk.affirm.com":t==="sandbox.uk.affirm.com"?"sandbox.uk.affirm.com":t==="affirm.com"?"affirm.com":t==="sandbox.affirm.com"?"sandbox.affirm.com":t.endsWith(".affirm.com")?"affirm_subdomain":t.endsWith(".stripe.com")?"
19stripe_subdomain":"other"}catch{return"invalid"}}function dN(e){return e.status==="action_required"&&e.action.type==="complete_payment_challenge"&&e.action.offsiteRedirect}function pN(){const e=jP({maxAttempts:wa.ATTEMPTS}),{client:t,checkout:n,persistence:r,observability:o,embed:i,source:a,graphql:{coreGraphql:l}}=_(),c=t.unstable_getSerialization("sessionToken"),u=V(),d=su();return F(()=>()=>{u.current=void 0},[]),x(async p=>{u.current=p;const m=n.latestReceipt.value?.id,f=()=>m!==n.latestReceipt.value?.id,h=()=>u.current===p&&y&&!f(),g=n.latestReceipt.value;if(g?.id==null||g==null)return;p?.(g),o.log("receipt_polling_detected","[Receipt Polling] Receipt polling started with initial receipt",mn(g));let y=!0,v,P=0,b,C=!1,I=Date.now(),S,k=!1,E=!1,T=!1;switch(g.status){case"processing":case"processing_remote_checkouts":{S=g.pollAt;break}case"action_required":{S=await A(g);break}case"polling_for_order":{S=Xs+Date.now();break}}async function A(R){return new Promise(L=>{if(k||(k=!0,Yf(i,`action_required_receipt - ${R.action.type}`)),R.action.type==="complete_payment_challenge"){if(d.value)return L(Date.now()+Ta);if(R.action.offsiteRedirect)return L(void 0)}else if(R.action.type==="pre_payment_buyer_action_required"){if(T)return L(Date.now()+Ta);const z=Date.now(),O={...mn(R),actionType:R.action.type,listenerType:"receipt_polling_hsa_survey_listener",modalSourceType:"receipt_action",surface:"checkout-web"},K=({data:X})=>{X?.type===Ap&&(window.removeEventListener("message",K),T=!0,P=0,I=Date.now(),o.log("hsa_survey_postmessage_received","[Receipt Polling] HSA survey completed postMessage received",{...O,dataType:Ap,elapsedTimeMs:Date.now()-z}),L(Date.now()))};o.log("hsa_survey_postmessage_listener_started","[Receipt Polling] HSA survey completed postMessage listener started",O),window.addEventListener("message",K);return}else if(R.action.type==="complete_payment_challenge_v2"){const z=R.timeout?.millisecondsRemaining;return C&&z===0&&(P=0,I=Date.now()),C=!!z,L(C?Date.now()+Ta:Date.now()+QE)}const M=Date.now(),D=R.action.type==="complete_payment_challenge"?R.action:void 0,N={...mn(R),actionType:R.action.type,listenerType:"receipt_polling_three_ds_listener",modalSourceType:"receipt_action",offsiteRedirect:D?.offsiteRedirect,sourceHostCategory:jo(D?.url),surface:"checkout-web"},U=({data:z,origin:O})=>{if(z.type===La){const K=Date.now()-M;o.log("receipt_polling_detected","[Receipt Polling] 3DS challenge event received",{dataType:La}),o.log("three_ds_postmessage_received","[Receipt Polling] 3DS postMessage received",{...N,dataType:La,elapsedTimeMs:K,originHostCategory:jo(O)}),clearTimeout(b),window.removeEventListener("message",U),L(Date.now())}};b=setTimeout(()=>{n.unstable_overwriteLatestReceipt({status:"failed",id:R.id,failure:{type:"payment",code:"GENERIC_ERROR"}}),window.removeEventListener("message",U),r&&Gi(r,a),o.counter({name:"three_d_secure_challenge_timeout",value:1}),o.log("use_receipt_polling_three_ds_challenge_timed_out","3DS challenge timed out",mn(R)),o.log("three_ds_postmessage_timed_out","[Receipt Polling] 3DS postMessage listener timed out",{...N,elapsedTimeMs:Date.now()-M}),L(void 0)},R.timeout?.millisecondsRemaining||uN),o.log("receipt_polling_detected","[Receipt Polling] Adding event listener for 3DS challenge event"),o.log("three_ds_postmessage_listener_started","[Receipt Polling] 3DS postMessage listener started",N),window.addEventListener("message",U)})}for(;S!=null;){await KP(S-Date.now());const R=Date.now()-I;if(++P,!C&&P>wa.ATTEMPTS&&R>wa.TIMEOUT&&(y=!1,o.leaveErrorBreadcrumb("[ReceiptPolling] Receipt polling timeout",{...mn(g),pollAttempts:P}),o.counter({name:"receipt_polling_timeout",value:1}),o.log("use_receipt_polling_polling_timed_out","Receipt polling timed out",{...mn(n.latestReceipt.value),timePolling:R,pollAttempts:P})),!h())break;const{data:L,error:M}=await l.staticQuery(oN,{cache:!1,variables:{receiptId:n.latestReceipt.value?.id,sessionToken:c}});if(M||L==null||L.receipt.__typename==="ReceiptNotFound"){if(!h())break;S=Date.now()+(e.next().value||60*1e3);continue}if(!h())break;const D=v?Date.now()-v:0,N=aN()?lN:cN,U=v?D>=N:!1;let z;if(!E)try{z=await ZE()}catch(ee){if(!h())break;E=!0,o.leaveErrorBreadcrumb("[ReceiptPolling] Receipt mapper failed to load during polling",{error:String(ee),receiptType:L.receipt.__typename})}if(E){if(L.receipt.__typename==="ProcessingReceipt"||L.receipt.__typename==="WaitingReceipt"){e.reset(),S=Date.now()+L.receipt.pollDelay;continue}if(L.receipt.__typename!=="ProcessedReceipt")break;if(e.reset(),L.receipt.redirectUrl){window.location.replace(L.receipt.redirectUrl);break}if(L.receipt.orderStatusPageUrl){window.location.replace(L.receipt.orderStatusPageUrl);break}S=Xs+Date.now();continue}if(!h()||!z)break;e.reset();const O=z(L.receipt,{pollingTimeoutReached:U});n.latestReceipt.value?.status==="polling_for_order"&&O?.status==="processed"&&(U?o.counter({name:"PostPurchase_order_polling_timeout",value:1}):o.histogram({name:"PostPurchase_order_polling_duration",value:D}));const X=!(!d.value&&dN(O)||ep(O,g)),ne=mn(g),$=mn(O),J={receiptId:$.receiptId,status:$.status,prevReceiptId:ne.receiptId,prevReceiptStatus:ne.status};if(X?(o.log("receipt_polling_detected","[Receipt Polling] Overwriting receipt with latest update",J),n.unstable_overwriteLatestReceipt(O)):ep(O,g)&&o.log("receipt_polling_detected","[Receipt Polling] Skipped overwriting receipt with same receipt",J),!h())break;if(p?.(O),O.status==="processing"||O.status==="processing_remote_checkouts")S=O.pollAt;else if(O.status==="action_required")S=await A(O);else if(O.status==="polling_for_order")S=Xs+Date.now(),v||(v=S);else{r&&Gi(r,a);break}if(!h())break}},[n,r,l,c,o,e,i,d,a])}function mN(){const e=su();return x((t,n)=>{e.value||$c(t)&&Wg(t.action)&&t.action.offsiteRedirect&&n(t.action.url)},[e])}function Tp(e){if(typeof e>"u")return"";try{const t=new URL(e);return`${t.protocol}//${t.host}`}catch{return""}}const fN=["failed","processed"];function fv(){const{currentPage:e,currentDetour:t,history:n}=Ce().value,{observability:r,checkout:{offsitePopupController:o},mobileCheckoutSdk:i,embed:a}=_(),l=V(),c=pN(),u=mN(),d=nN(),p=i.variant.isStandard()||!!a?.isCheckoutKit(),m=x(()=>{document.hidden||(document.removeEventListener("visibilitychange",m),r.log("processing_user_return_to_checkout_initiated","[Processing] User navigated back to checkout after offsite payment",{provider:Tp(l.current)},{exportImmediately:!0}),c(h=>{u(h,()=>{document.addEventListener("visibilitychange",m)})}))},[u,c,r]),f=x(()=>{c(h=>{fN.includes(h.status)&&o.isOpen.value&&o.close({}),u(h,g=>{if(r.leaveErrorBreadcrumb("Redirecting to offsite payment",{receipt:h,currentPage:e,currentDetour:t,history:n}),r.log("processing_offsite_payment_redirect_initiated","[Processing] Redirecting to offsite payment",{provider:Tp(g),providerUrl:g},{exportImmediately:!0}),o.isOpen.value){o.redirect(g);return}d.value?ZM(g):window.location.assign(g),l.current=g,p&&document.addEventListener("visibilitychange",m)})})},[u,d,c,p,t,e,n,m,r,o]);return F(()=>()=>document.removeEventListener("visibilitychange",m),[]),f}function Ls(){const{checkout:e,shop:t}=_();return e.configuration.isUniversalCheckoutFinalizer||t.hasFlagEnabled(eC)}function hv(){const{checkout:e,shop:t}=_();return Ls()&&(e.configuration.isUniversalCheckoutFinalizer||t.hasFlagEnabled(tC))}function hN(e,t){const n=new URL(e,window.location.href);return n.searchParams.set("order_id",t),n.toString()}function gN(){const{shop:{id:e}}=_();return B(()=>{const t=e.split("/").pop();if(!t)return;const n=parseInt(t,10);if(!isNaN(n))return n},[e])}function yN(e,t){const n=e.get("embed"),r=e.get(Jf),o=e.get(jf),i=e.get(Kf),a=e.get(Xf),l=e.get(Zf),c=e.get(Qf),u=e.get("shopify_essential"),d=e.get(al),p=e.get("shop_client_uuid")??t;return{embedParam:n,ecAuthParam:r,ecVersionParam:o,ecColorSchemeParam:i,ecDelegateParam:a,checkoutKitBrandingParam:l,checkoutKitVersionParam:c,shopifyEsse
19ntial:u,skipInterstitial:d,shopClientUuid:p}}function gv({mode:e="set",include:t={}}={}){const{shopClientUuid:n=!1,shopId:r=!1}=t,o=_().embed?.shopClientUuid,i=gN();return x((a,l)=>{r&&i!==void 0&&(e==="set"||!a.has("shop_id"))&&a.set("shop_id",String(i));const{embedParam:c,ecAuthParam:u,ecVersionParam:d,ecColorSchemeParam:p,ecDelegateParam:m,checkoutKitBrandingParam:f,checkoutKitVersionParam:h,shopifyEssential:g,skipInterstitial:y,shopClientUuid:v}=yN(l,o),P=a.has("embed")||a.has("ec_version");(e==="set"||!P)&&(c&&a.set("embed",c),d&&(a.set(jf,d),p&&a.set(Kf,p),u&&a.set(Jf,u),m&&a.set(Xf,m),h&&a.set(Qf,h),f&&a.set(Zf,f)));const C=e==="set"||!a.has("shopify_essential");g&&C&&a.set("shopify_essential",g);const I=e==="set"||!a.has(al);if(y&&I&&a.set(al,y),n){const S=e==="set"||!a.has("shop_client_uuid");v&&S&&a.set("shop_client_uuid",v)}},[o,n,r,e,i])}function vN({redirectProgressEnabled:e=!1}={}){const t=V(!1),{checkout:n,client:r,observability:o}=_(),i=gv({mode:"copy-if-missing"});return x(a=>{if(t.current){o.counter({name:"thank_you_page_already_redirected",value:1});return}t.current=!0;const l=new URL(a,window.location.href),c=new URLSearchParams(r.initialRequest.url.search);return i(l.searchParams,c),e&&n.checkoutExit.startRedirectProgress(),window.location.replace(l.toString())},[i,n.checkoutExit,r.initialRequest.url.search,o,e])}function _N({plan:e,currentDetour:t,dispatch:n,onProgressionChange:r,negotiate:o,negotiated:i,proposedPostPurchaseInquiryStatus:a}){const l=_(),{checkout:c,embed:u,persistence:d,source:p,observability:m,client:f,mobileCheckoutSdk:h,router:g,shop:y}=l,{configuration:v}=c,P=c.latestReceipt.value,{hasExternalReceiptHandling:b}=v,C=c.identity.current.value==="shopPay",I=nv(),S=to(),k=nC(),E=fv(),T=P?.id,A=Je(),R=l.checkout.configuration.layout.isOnePage,L=hv(),M=y.hasFlagEnabled(Hf),D=oo().current.token,N=Ce(),U=Fn(),z=vN({redirectProgressEnabled:C&&!v.isUniversalCheckoutFinalizer&&L&&!t&&!U});F(()=>{b||E()},[T]);const O=x(($,J)=>{setTimeout(()=>{J()},QM($))},[]),K=V("idle"),X=V();F(()=>()=>X.current?.cancel(),[]);const ne=x($=>{if(!$||S)return;m.leaveErrorBreadcrumb("[Journey] handleReceipt callback triggered with",mn($));const J=a.value;if($.status==="processed"&&$.waitingForPostPurchaseDone&&J!=="done")return;const ee=Uy(A),te=(re,de)=>re&&re>0?O(re,de):de();function W(re,de){const le=()=>{g.navigate(re,{replace:!0,state:{...g.currentUrl.value.state,redirectingToThankYou:!0}})};L&&!t?(de?.(),pr(le,["checkout-exit"],{replace:!0,interrupt:!0})):pr(()=>{de?.(),le()}),m.counter({name:"thank_you_page_redirected",value:1,attributes:{shopPay:C,checkoutDesign:R.value?"ONE_STEP":"THREE_STEP",typType:"c1",visibility_state:document.visibilityState}}),r(!1)}function he(re){const de=()=>z(re);if(!L||t||U){de();return}pr(()=>{c.checkoutExit.exit()},["checkout-exit"],{replace:!0,interrupt:!0}),de()}switch($.status){case"abandoned":r(!1),d&&Gi(d,p),k();break;case"failed":{r(!1),d&&Gi(d,p);const re=new URL(window.location.href);if(re.searchParams.get("completed")&&re.searchParams.get("reload_receipt")){m.log("use_handle_receipt_progression_update","[Journey] Reloading processing page after failed receipt",{receiptId:$.id}),m.counter({name:"refresh_processing_step",value:1}),re.searchParams.delete("reload_receipt"),window.location.replace(re.toString());break}if($.failure.type==="inventory"){if(e.detours.find(ae=>ae.type==="stockProblems")==null)throw new Rt("Stock problems receipt, but no matching detour",{groupingHash:"JourneyError::StockProblemsReceiptNoMatchingDetour"});const _e=M?A.lastNegotiation.value:void 0;o({force:!0,onComplete(ae){switch(ae.status){case"success":{if(M){const ke=A.lastJourneyProgression.value,we=A.lastNegotiation.value;if(c.latestReceipt.value?.id!==$.id||we!==_e&&we.type==="error"||(ke.type==="failed"||ke.type==="error")&&ke.negotiationStage==="completion")break}m.leaveErrorBreadcrumb("[Journey] Performed successful negotiation with a failed receipt"),m.log("use_handle_receipt_progression_update","[Journey] Performed successful negotiation with a failed receipt");const ge=I("payment-methods");M&&tn(()=>
19{A.context.inventoryRecoverySignal.value={receiptId:$.id},p1(A.parts)}),n({type:"error",page:ge}),g.navigate({pathname:ge.route,search:g.currentUrl.value.search});break}case"fetch_failed":case"error":case"invalid":case"stale":case"denied":case"throttled":case"tooManyRequests":case"alreadyCompleted":break;default:rn(ae)}}});break}else $.failure.type==="payment"&&(iC.has($.failure.code)?o({include:["captcha"],skipStateUpdates:!0}):($.failure.code==="CUSTOM_REDEEMABLE_NO_LONGER_AVAILABLE"&&o({force:!0,fieldsToResolve:["shopPromotion"]}),k()));if(t?.type==="offsitePaymentFailed"){g.navigate(t.route,{replace:!0});break}const de=aM({departurePageId:g.currentUrl.value.searchParams.get(Br),greenPath:e.greenPath,history:N.value.history,observability:m,negotiated:i,receipt:$});n({type:"error",page:de}),g.navigate(de.route,{replace:!0});break}case"processed":{m.log("use_handle_receipt_progression_update","[Journey] Received processed receipt with redirectUrl",{redirectUrl:$.redirectUrl,receiptId:$.id});const re=e.detours.find(ae=>ae.type==="postPurchase"),de=!!re&&!!$.postPurchasePageRequested&&$.postPurchaseVaultingStatus==="ready"&&J==="success",le=!u?.isFlagshipPartner&&de;if(u?.isFlagshipPartner&&de&&t?.type!=="thankYou"&&m.log("use_handle_receipt_progression_update","[Journey] Skipped post-purchase flow for flagship partner",{receiptId:$.id}),le&&t?.type!=="thankYou"){if(m.leaveErrorBreadcrumb("[Journey] Navigated to post purchase page",{receipt:JSON.stringify({id:$.id,postPurchasePageUrl:$.postPurchasePageUrl,postPurchasePageRequested:$.postPurchasePageRequested,postPurchaseVaultingStatus:$.postPurchaseVaultingStatus}),shopAppDomain:C}),C&&$.postPurchasePageUrl)window.location.replace($.postPurchasePageUrl);else{const ae=re;g.currentUrl.value.searchParams.delete("post_purchase");const ge=`${ae.route}${g.currentUrl.value.search}`;ee($),g.navigate(ge,{replace:!0})}break}if(u?.client?.complete(),v.isUniversalCheckoutFinalizer){if(K.current==="navigating")break;if(K.current!=="requested"){if(r(!1),!X.current){const ae=new rC;X.current=ae,l.events.addEventListener(oC.type,()=>{ae.active&&(K.current="requested",ne($))},{once:!0,signal:ae.signal}),l.events.dispatchEvent(ae)}break}K.current="navigating"}else if($.redirectUrl){const ae=$.redirectUrl;$.skipToThankYouPage?(m.leaveErrorBreadcrumb("[Journey] Forwarded duplicate checkout session to Thank you page",{skipToThankYouPage:!0,receipt:JSON.stringify({id:$.id,redirectUrl:ae,postPurchasePageRequested:$.postPurchasePageRequested,postPurchasePageUrl:$.postPurchasePageUrl})}),n({type:"skipRemainingPages"})):n({type:"complete"}),m.counter({name:"thank_you_page_redirected",value:1,attributes:{shopPay:C,checkoutDesign:R.value?"ONE_STEP":"THREE_STEP",typType:"classic",visibility_state:document.visibilityState}}),m.log("use_handle_receipt_progression_update","[Journey] Redirecting to thank you page with redirectUrl",{redirectUrl:ae});const ge=new URL(ae);return D&&ge.searchParams.set(eh,D),te($?.completedRemoteCheckouts?.length,()=>he(ge.toString()))}const _e=e.detours.find(ae=>ae.type==="thankYou");if(_e?.route){const ae="prevent_order_redirect",ge=new URLSearchParams(g.currentUrl.value.search);let ke=ge.has(ae)&&ge.get(ae)!=="false"?`${_e.route}?${ae}=true`:_e.route;h.variant.recovery&&(ke=hN(ke,$.id));const we=()=>{if(m.log("use_handle_receipt_progression_update","[Journey] thankYouDetour route identified",{thankYouDetourRoute:_e.route}),$.skipToThankYouPage){m.leaveErrorBreadcrumb("[Journey] Forwarded duplicate checkout session to Thank you page",{skipToThankYouPage:!0,receipt:JSON.stringify({id:$.id,redirectUrl:$.redirectUrl,postPurchasePageRequested:$.postPurchasePageRequested,postPurchasePageUrl:$.postPurchasePageUrl})}),n({type:"skipRemainingPages"});const Z=f.cookies.get(Ni);Z&&p.sourceId===Z.split("%3F")[0]&&f.cookies.delete(Ni)}else f.cookies.delete(Ni),n({type:"complete"});ee($)},Ie=Z=>{m.log("use_handle_receipt_progression_update","[Journey] Redirecting to thank you page with thankYouDetourUrl",{thankYouDetourUrl:ke}),te($?.completedRemoteCheckouts?.length,()=>W(ke,Z))},j=v.deferredProfileChangeId;if(j||v.profileKey.peek()?.requireBusinessCriticalOnly){v.update({deferredProfileChangeId:void 0});const Z=j??v.profileId.peek();iu(we,{trigger:"completion",profileRequest:Z?{id:Z,requireBusinessCriticalOnly:!1}:void 0,graphql:l.graphql.coreGraphql,extensibility:l.checkout.extensibility,configuration:v,observability:m,userEvents:l.userEvents,telemetryContext:{source:A.source,shop:A.shop,sessionToken:A.sessionToken,current:A.current}}).then(Ie).catch(()=>{})}else we(),Ie()}else throw new Rt("On thank-you, but no matching detour!",{groupingHash:"JourneyError::OnThankYouNoMatchingDetour"});break}case"polling_for_order":case"action_required":case"processing":{if(t?.type==="processing")break;if($.status==="polling_for_order"&&t?.type==="thankYou"){m.leaveErrorBreadcrumb("[Journey] Skipped navigating to processing page since already on the thank-you page",{receipt:JSON.stringify($),routerCurrentUrl:g.currentUrl.value.toString()});break}e.detours.find(le=>le.type==="processing")?.route&&r(!0);break}case"processing_remote_checkouts":{if(t?.type==="processing")break;const de=e.detours.find(le=>le.type==="processing");if(!de?.route)break;pr(()=>{const le=g.currentUrl.value.search;g.navigate(le?{pathname:de.route,search:le}:de.route,{replace:!0})});break}default:rn($)}},[f,u?.client,u?.isFlagshipPartner,h,k,t,c,n,S,R,M,L,C,N,I,l,v,o,i,A,r,d,e.detours,e.greenPath,U,a,D,z,g,p,m,O]);return ne}function Y7(){const e=H().buyerIdentity,{client:t,shop:n,embed:r,mobileCheckoutSdk:o}=_();return w(()=>!!n.loginLinkVisible&&n.hasStorefront&&!!t.unstable_getSerialization("loginUrl")&&n.customerAccountRequirement==="OPTIONAL"&&!o.enabled&&!r&&!e.value?.customerProfile)}function j7(){const e=H().buyerIdentity,{shop:t,checkout:{identity:n,configuration:r},mobileCheckoutSdk:o,source:i}=_(),a=n.current.value==="shopPay";return w(()=>{const l=t.customerAccountRequirement==="OPTIONAL",c=t.customerAccountRequirement==="REQUIRED",u=t.customerAccountRequirement==="DISABLED",d=()=>!!e.value?.customerProfile;return i.type!=="draftOrder"&&t.hasStorefront&&!o.variant.isPartner()&&r.allowRedirectToStorefront&&!a&&(l||c||u&&d())})}function yv(){const e=H().buyerIdentity;return x(t=>{const n=e.value?.customerProfile,r=e.value?.purchasingCompany;if(n){if(t==="billing")return n.__typename==="CustomerProfile"?n.billingAddresses[0]?.address:r?r.location.billingAddress:void 0;if(t==="shipping")return n.__typename==="CustomerProfile"?n.shippingAddresses[0]?.address:r?r.location.shippingAddress:void 0}},[e])}function bN(){const e=H().buyerIdentity;return x(()=>{const t=e.value?.customerProfile;if(t)return t.email},[e])}function vv(){const{embed:e,mobileCheckoutSdk:t,shop:n,source:r}=_(),o=Ce(),i=H().buyerIdentity,a=Ls(),l=t.variant.isStandard()||e?.isCheckoutKit(),c=!!n.remoteShopsConfigMap?.size;return w(()=>{const u=i.value,d=!!n.loginLinkVisible&&!!u?.customerProfile&&(!!u?.purchasingCompany||!l&&r.type!=="draftOrder"&&n.hasStorefront);return a&&o.value.currentDetour?.type==="thankYou"&&!c&&d})}function _v(e=!1){const{i18n:t,router:n,shop:r}=_(),{buyerIdentity:o}=H();return w(()=>{const i=o.value?.purchasingCompany;if(!r.customerAccountLocationsUrl)return;const a=new URL(r.customerAccountLocationsUrl);return a.searchParams.set("return_to",n.currentUrl.value.pathname),i&&!e&&a.searchParams.set("current_location",i.location.id),a.searchParams.set("locale",t.locale),Str
19ing(a)})}function bv(){const e=V(!0);return Dt(()=>()=>{e.current=!1},[]),e}const Ko="DISCOUNTS_DISCOUNT_CODE_NOT_HONOURED",Pv=new Set(["DISCOUNTS_ALLOCATIONS_MISMATCH","DISCOUNTS_ADDITIONAL_REQUESTED_DISCOUNT_CODE_DISCARDED"]),Sv=new Set(["DISCOUNTS_NO_ENTITLED_LINE_ITEMS","DISCOUNTS_UNSUPPORTED_EXPECTATION","DISCOUNTS_CUSTOMER_USAGE_LIMIT_REACHED","DISCOUNTS_INCOMPATIBLE_PURCHASE_TYPE","DISCOUNTS_USAGE_LIMIT_REACHED","DISCOUNTS_QUANTITY_NOT_IN_RANGE","DISCOUNTS_PURCHASE_NOT_IN_RANGE","DISCOUNTS_NO_ENTITLED_SHIPPING_LINES","DISCOUNTS_CUSTOMER_NOT_ELIGIBLE","DISCOUNTS_DISCOUNT_ALREADY_APPLIED","DISCOUNTS_HIGHER_VALUE_DISCOUNT_APPLIED","DISCOUNTS_MAXIMUM_DISCOUNT_CODE_LIMIT_REACHED","DISCOUNTS_DISCOUNT_CODE_APPLICATION_FAILED","DISCOUNTS_CURRENTLY_INACTIVE",Ko,...Pv]),Rs=new Set(["PAYMENTS_GIFT_CARD_DISABLED"]),Lo=new Set(["PAYMENTS_GIFT_CARD_CURRENCY_MISMATCH","REDUCTION_GIFT_CARD_ALREADY_APPLIED","PAYMENTS_GIFT_CARD_NOT_FOUND","DISCOUNTS_NOT_FOUND","REDUCTION_INVALID_CODE","REDUCTION_INVALID_DISCOUNT_CODE","PAYMENTS_GIFT_CARD_NON_SUFFICIENT_FUNDS","PAYMENTS_GIFT_CARD_ALREADY_APPLIED","PAYMENTS_GIFT_CARD_BUYING_GIFT_CARD","PAYMENTS_GIFT_CARD_EXPIRED","REDUCTION_INVALID_GIFT_CARD_CODE","PAYMENT_GIFT_CARDS_NOT_ALLOWED_FOR_FIXED_SELLING_PLANS","DISCOUNTS_DISCOUNTS_NOT_ALLOWED_FOR_B2B","PAYMENT_GIFT_CARDS_NOT_ALLOWED_FOR_B2B"]),au=new Set([...Sv,...Lo]),K7=new Set(["DISCOUNTS_CURRENTLY_INACTIVE"]),El=new Set(["DISCOUNTS_HIGHER_VALUE_DISCOUNT_APPLIED"]),Ev=new Set([...El,...au]);function Cv(){const{paymentLines:e}=se(),{voidedGiftCardsSignal:t}=xt(),n=x((r,o)=>{if(o.length<r.length)return[];const i=[];return o.forEach(a=>{a.method.type==="giftCard"&&!r.some(l=>l.method.type==="giftCard"&&a.method.code===l.method.code)&&i.push(a.method.code)}),i},[]);return x(({violations:r,remotePaymentLines:o})=>{if(r.some(i=>Rs.has(i.code))){const i=n(o,e.value);t.value=i,e.value=o}},[n,e,t])}const PN=new Map([["billing-address",["billingAddress"]],["contact-information",["contactInfo"]],["payment-methods",["paymentMethods","captcha"]],["shipping-address",["shippingAddress"]],["delivery-method",["deliveryNext"]]]);function kv(e,t){const n=zo(e.features,t),r=new Set(["merchandiseLines"]);for(const o of n){const i=PN.get(o)??[];for(const a of i)r.add(a)}return r}function*SN(e=[],t){e.includes("deliveryNext")||(yield"delivery-method"),e.includes("paymentLines")||(yield"payment-terms-changed",yield"payment-session"),e.includes("billingAddress")||(yield"payment-address"),e.includes("captcha")||(yield"captcha"),t?.includes("localization-extension")||(yield"localization-extension")}function EN({violation:e,currentPageId:t,isOnePageCheckout:n}){return n||t==="payment"?!0:!(sC.has(e.code)||aC.has(e.code)||ql.has(e.code))}function Iv({violations:e,currentPageId:t,isOnePageCheckout:n}){return e.some(r=>EN({violation:r,currentPageId:t,isOnePageCheckout:n}))}function Av(){const{observability:e}=_();return x(()=>{e.log("stock_problems_page_viewed","Stock Problems page viewed")},[e])}
19class CN extends Error{constructor(){super(...arguments),this.name="ProposalNegotiationError"}}function kN(e,t){const{client:n,router:r,checkout:o,shop:i,observability:a,url:l}=_(),c=Je(),{plan:u,currentPage:d,currentDetour:p}=Ce().value,m=Ot(),f=n.unstable_legacyNavigationPerformance,h=_v(!0),g=Cv(),y=bv(),v=o.configuration.layout.isOnePage,{inMemoryApplePayParts:{asPaymentMethod:P}}=Ye(),b=Av();return x(async({onComplete:C,include:I,prefetch:S=!1,negotiationStage:k,...E})=>{const T=d,A=k??"negotiation";A==="progression"&&!S&&t(!0),a.debug("negotiation_triggered","Negotiation triggered",{negotiationStage:A}),A==="progression"&&await m.runBeforeNegotiationListeners(A,{prefetch:S});const R=(()=>{if(I)return I;if(T==null)return;const N=new Set,U=u.greenPath.findIndex(O=>yn(O,T)),z=c.current.value;for(const O of u.greenPath.slice(0,U+1)){const K=kv(O,z);for(const X of K)N.add(X)}return[...N]})(),L=T?zo(T.features,c.current.value):void 0,{silenceViolations:M=[]}=E,D=SN(R,L);try{const N=await m.negotiate({...E,silenceViolations:[...new Set([...M,...D])],skipStateUpdates:S,negotiationStage:A});if(a.log("negotiation_result_completed","Negotiation result completed",{negotiationStatus:N.status,negotiationStage:A,violations:"violations"in N?fn(N.violations):void 0}),y.current){if(S)return;try{const U=N.status==="success"||N.status==="error";if(U&&Ql(N.violations)){const z=u.detours.find(O=>O.type==="stockProblems");if(z==null)throw new Rt("Stock problems, but no matching detour",{groupingHash:"JourneyError::StockProblemsNoMatchingDetourNegotiate"});b(),r.navigate(z.route);return}if(U&&lv(N.violations))return a.log("login_failure_triggered","Buyer identity login failure detected, redirecting to login"),window.location.replace(l.login(window.location.href));switch(U&&cv(N.violations,i.storefrontUrl,h.value,r.currentUrl.value,a),U&&g({violations:N.violations,remotePaymentLines:N.negotiated?.paymentLines?.lines??[]}),N.status){case"success":{const z={type:"success",violations:N.violations,errors:N.errors,negotiationStage:A};m.lastJourneyProgression.value=z,m.hasNegotiatedOnce.value=!0,await m.runListeners(z);break}case"alreadyCompleted":{o.unstable_overwriteLatestReceipt(N.receipt);break}case"error":{f?.cancelNavigation();const z={type:"error",violations:N.violations,errors:N.errors,negotiationStage:A};m.lastNegotiation.value=z,m.hasNegotiatedOnce.value=!0,(A==="progression"||E.runListenersOnError)&&(m.lastJourneyProgression.value=z,await m.runListeners(z)),T&&Iv({violations:N.violations,currentPageId:T.id,isOnePageCheckout:v.value})&&e({type:"error",page:T});break}case"throttled":{const z=u.detours.find(O=>O.type==="throttle");if(z?.route)r.navigate(z.route);else throw new Rt("Throttled, but no matching detour",{groupingHash:"JourneyError::ThrottledNoMatchingDetour"});break}case"invalid":{m.runListeners({type:"invalid",reasons:N.reasons}),T&&e({type:"error",page:T});break}case"denied":T&&e({type:"error",page:T});break;case"fetch_failed":T&&e({type:"error",page:T});break;case"stale":case"tooManyRequests":a.log("negotiate_result_no_dispatch","Handling negotiation result without explicit dispatch",{status:N.status,currentPage:T,currentDetour:p,negotiationStage:A});break;default:rn(N)}A==="progression"&&t(!1)}finally{C?.(N);const U=P.value&&o.wallets.activeSession.value;if(N.status!=="success"&&"violations"in N&&T&&!U){const z=tv({currentPage:T,greenPath:u.greenPath,negotiated:N.negotiated,violations:N.violations});z&&r.navigate(z.route)}}}}catch(N){if(N instanceof Vy)return;const z=N instanceof Error?N:new CN;if(z)throw z}},[P,o,d,h,e,v,y,c,t,f,u.detours,u.greenPath,m,g,r,i?.storefrontUrl,b,l,a,p])}const Tv='GraphQL execution failed with errors: [ "Internal error. Looks like something went wrong on our end.',IN=["Content-Length header of network response exceeds response Body.","Failed to fetch","The operation was aborted.","The network connection was lost.","GraphQL fetch failed with status:",Tv,df],AN=["A server with the specified hostname could not be found.","An SSL error has occurred and a secure connection to the server cannot be made.","cannot parse response","Failed to fetch","Load failed","cancelled","NetworkError when attempting to fetch resource.","The network connection was lost","The operation couldn't be completed. Protocol error","The request timed out."];function wv(e){return e.replace(/\s+/g," ")}const TN=e=>{if(e==="")return!0;const t=wv(e);return IN.some(n=>t.startsWith(n))},wN=e=>{if(e==="")return"unknown";const t=wv(e);return t.startsWith(df)?AN.some(n=>t.endsWith(n))?e:"unknown":t.startsWith(Tv)?"Internal server error":e},LN=()=>{const{source:{checkoutSessionIdentifier:e}}=_(),{email:t}=se();return w(()=>`guest-${e}-${t.value.replace(/[^a-zA-Z0-9]/g,"")}`)},RN="true";function xN(){const e=LN(),t=x(()=>{try{return!!sessionStorage.getItem(e.value)}catch{return!1}},[e]),n=x(()=>{try{sessionStorage.setItem(e.value,RN)}catch{}},[e]);return{isDismissedGuestModal:t,setDismissedGuestModal:n}}
19function MN(){const e=Ot(),t=bv(),{setGuestDismissedModalKey:n}=NN();return x(async({onComplete:r,submitting:o,...i})=>{n(),o.value=!0;const a=await e.complete({...i});t.current&&(o.value=!1,await r?.(a))},[t,e,n])}function NN(){const{setDismissedGuestModal:e}=xN(),{shopPay:t}=_();return{setGuestDismissedModalKey:x(()=>{t.userIdentified.value&&e()},[e,t.userIdentified])}}function DN(e){const{taxExemptions:t}=se(),n=We(e);return w(()=>t.value.find(r=>r.handle===n.value))}function ON(e){const{taxExemptions:t}=se();return x(n=>{const r=t.value.filter(o=>o.handle!==e);t.value=[...r,{handle:e,details:n}]},[e,t])}const wp="EU_REVERSE_CHARGE_EXEMPTION_RULE";function xs(){const e=H().taxExemptions,t=DN(wp).value,n=ON(wp),r=ze("taxExemptions").value,o=ze("shippingAddress").value;if(e.value?.status==="unavailable"||!e.value?.available||e.value?.available.length===0)return null;const{available:i}=e.value,a=i.find(f=>lC(f.handle));if(!a?.details)return null;const l=t?.details?.taxId??"",{registrationFormats:c,warnings:u}=a.details,d=f=>{n({taxId:f.toUpperCase()})},p=f=>cC(f,c),m=r?{type:"pending"}:l?p(l)?l===a.details.taxId&&a.details.status?{type:"resolved",validationStatus:a.details.status}:{type:"resolved",validationStatus:null}:{type:"invalid_format"}:{type:"resolved",validationStatus:null};return{applied:a.applied,taxId:{warnings:u,value:l,loading:r||o,set:d,status:m,reset:()=>n({taxId:""}),validated:{status:a.details.status,taxId:a.details.taxId},format:{valid:l?p(l):!1,validate:p}}}}function J7(){const{userEvents:e}=_(),t=Lv();return({vatId:n})=>{const r=t.build({eventType:"NEGOTIATE",vatId:n});e.monorailEvent(r)}}function FN(){const{userEvents:e}=_(),t=Lv(),n=xs();xh(async(r,o)=>{if(r!=="completion"||o?.retry||!n)return;const{value:i}=n.taxId,a=t.build({eventType:"PAY_NOW_CLICKED",vatId:i});e.monorailEvent(a)})}function Lv(){const{client:e,shop:t,source:n}=_(),r=e.unstable_getSerialization("requestId"),o=H().buyerIdentity.value?.customerProfile,{shippingAddress:i,billingAddress:a,email:l}=se(),c=xs();return{build:({eventType:d,vatId:p})=>({schemaId:"taxes_vat_id_checkout_lifecycle_event/1.0",payload:{eventType:d,shopId:Number(Be(t.id)),customerId:HN(o),checkoutToken:n.
19checkoutSessionIdentifier,requestId:r,vatId:p,vatIdValidationStatus:BN({taxId:c?.taxId,eventType:d}),applied:c?.applied,email:l.value,userAgent:VN(navigator),...UN(i.value),...zN(a.value)}})}}function BN({taxId:e,eventType:t}){if(t!=="NEGOTIATE"&&e){if(e.status.type==="invalid_format")return"INVALID_FORMAT";if(e.status.type==="pending")return"PENDING";if(e.status.validationStatus)return String(e.status.validationStatus)}}function VN(e){return typeof e>"u"?void 0:e.userAgent}function UN(e){return e?{shippingCompanyName:e.company,shippingAddress1:e.address1,shippingAddress2:e.address2,shippingCity:e.city,shippingZipcode:e.postalCode,shippingProvinceCode:e.zoneCode,shippingCountryCode:e.countryCode}:{}}function zN(e){return e?{billingCompanyName:e.company,billingAddress1:e.address1,billingAddress2:e.address2,billingCity:e.city,billingZipcode:e.postalCode,billingProvinceCode:e.zoneCode,billingCountryCode:e.countryCode}:{}}function HN(e){if(!e)return;const t=Number(Be(e.id));return isNaN(t)?void 0:t}const Ra=1;function qN(e,t){const{checkout:n,shop:r,observability:o,url:i,router:a}=_(),l=MN(),{plan:c}=Ce().value,u=Ot(),d=Je(),p=uM(),m=_v(!0),f=Cv();return FN(),x(async(h,g,y,v)=>{const{skipToCompletion:P,...b}=v??{};g?.type!=="processing"&&P&&(o.leaveErrorBreadcrumb("Journey:updateJourney: updating journey HistoryMark onSubmitForCompletion if skipToCompletion is true and detourType is not processing",{skipToCompletion:!0,detourType:g?.type}),e({type:"skipRemainingPages"}));let C=Ra;const I=async()=>{let S=!1;await d.waitForPendingNegotiations({setProgressing:t});const k=C<Ra;await u.runBeforeNegotiationListeners("completion",k?{retry:!0}:void 0),await l({...b,submitting:u.submitting,setProgressing:t,onValidationSuccess:()=>{b.onValidationSuccess?.(),t(!0)},async onComplete(E){if(E.status==="stale"&&E.phase==="interceptors"&&C>0){C-=1,S=!0,t(!0),o.log("submit_for_completion_stale_retried","Stale completion retried automatically");return}switch(E.status==="stale"&&C<Ra&&o.log("submit_for_completion_stale_retry_exhausted","Completion still stale after automatic retry"),await y?.(E),E.status){case"success":{n.unstable_overwriteLatestReceipt(E.receipt);const T={type:"complete"};u.lastJourneyProgression.value=T,await u.runListeners(T);break}case"alreadyCompleted":{n.unstable_overwriteLatestReceipt(E.receipt);break}case"throttled":{const T=c.detours.find(A=>A.type==="throttle");if(T?.route)a.navigate(T.route);else throw new Rt("Throttled, but no detour",{groupingHash:"JourneyError::ThrottledNoDetour"});break}case"rejected":{if(h||o.leaveErrorBreadcrumb("Journey:updateJourney handled rejected submission with an empty currentPage",{resultStatus:String(E.status)}),e({type:"error",page:h}),lv(E.violations))return window.location.replace(i.login(window.location.href));if(cv(E.violations,r.storefrontUrl,m.value,a.currentUrl.value,o),Ql(E.violations)){a.currentUrl.peek().searchParams.delete(Br);const R=c.detours.find(L=>L.type==="stockProblems");if(R==null)throw new Rt("Stock problems, but no matching detour",{groupingHash:"JourneyError::StockProblemsNoMatchingDetour"});a.navigate(R.route);break}f({violations:E.violations,remotePaymentLines:E.negotiated?.paymentLines?.lines??[]});const T={type:"error",violations:E.violations,errors:E.errors,negotiationStage:"completion"};if(u.lastJourneyProgression.value=T,await u.runListeners(T),P)break;const A=tv({violations:E.violations,greenPath:c.greenPath,negotiated:E.negotiated,currentPage:h});A&&(a.currentUrl.peek().searchParams.delete(Br),a.navigate(A.route));break}case"invalid":{t(!1),await u.runListeners({type:"invalid",reasons:E.reasons});break}case"fetch_failed":case"failed":{const T={type:"failed",reason:E.reason,negotiationStage:"completion",fetchFailed:E.status==="fetch_failed"};if(E.status==="fetch_failed")if(TN(E.reason)||!E.isActionable)o.log("use_page_complete_network_error_emitted","submit for completion network error",{reason:E.reason}),o.counter({name:"submit_for_completion_network_error",value:1,attributes:{reason:wN(E.reason)}});else{const A=E.reason;o.error(new xM(A,{groupingHash:`Journey::SubmitForCompletion::NetworkError: ${A}`}),{errorClass:"Journey::SubmitForCompletion::NetworkError"})}u.lastJourneyProgression.value=T,await u.runListeners(T),e({type:"error",page:h}),a.currentUrl.peek().searchParams.delete(Br),p("payment-methods",{replace:g!==void 0});break}default:t(!1),h||o.leaveErrorBreadcrumb("Journey:updateJourney got unexpected submission result with an empty currentPage",{resultStatus:String(E.status)}),e({type:"error",page:h})}(E.status!=="success"||E.receipt.status!=="processing")&&t(!1)}}),S&&await I()};await I()},[t,u,d,l,r,e,n,c.detours,c.greenPath,a,f,i,m,p,o])}function GN(e,t,n){const{router:r,observability:o,checkout:i}=_(),{plan:a}=Ce().value,l=Je(),c=i.configuration.layout.isOnePage,u=x((d,p)=>{const m=a.greenPath.slice(p+1).find(f=>f.skipOverPage==null||!f.skipOverPage(d.negotiated));if(m)t({type:"progress",page:m}),r.navigate(m.route);else throw new Rt("Negotiated, but no next page",{groupingHash:"JourneyError::NegotiatedNoNextPage"})},[a.greenPath,t,r]);return x(async(d,p)=>{n(!0);const m=a.greenPath.findIndex(g=>yn(g,d)),f=l.current.value,h=kv(d,f);try{await e({negotiationStage:"progression",fieldsToResolve:Array.from(h),onComplete(g){switch(o.leaveErrorBreadcrumb("Negotiation completed",{status:g.status,violations:"violations"in g?g.violations.map(y=>y.code):[]}),p?.(g),g.status){case"success":{u(g,m);break}case"error":{Iv({violations:g.violations,currentPageId:a.greenPath[m].id,isOnePageCheckout:c.value})||u(g,m);break}
19case"fetch_failed":case"invalid":case"stale":case"denied":case"throttled":case"tooManyRequests":case"alreadyCompleted":break;default:rn(g)}}})}finally{n(!1)}},[n,a.greenPath,l,e,u,c,o])}function $N({negotiate:e}){return x(()=>{e({prefetch:!0,negotiationStage:"progression"})},[e])}function WN(e){const t=Ng();return t?{schemaId:"shopify_wallet_checkout_track/6.3",payload:{event:"spb_instrument_click__sheet__clicked",eventSubtype:"payment_method",appName:"checkout",pageType:"checkout",checkoutToken:t?.checkoutToken,instrumentId:"USDC",shopId:e,checkoutOne:!0,uniqToken:t?.uniqToken,visitToken:t?.visitToken,microSessionId:t?.microSessionId,microSessionCount:t?.microSessionCount??0,screenWidth:window.innerWidth,themeId:t?.themeId,themeCityHash:t?.themeCityHash||"",contentLanguage:t?.contentLanguage,referer:t?.referer}}:null}function YN(){const e=fv(),t=Is(),n=Zr(),{paymentLines:r}=se(),o=Je(),{i18n:i,observability:a,userEvents:l,checkout:{offsitePopupController:c},shop:{id:u}}=_();return B(()=>({handleOffsitePopupOpen:()=>{const d=r.value.at(0);let p=!1;if(d?.method.type==="customOnsite")p=dv(d);else if(d&&"walletContent"in d.method&&d.method.name==="SHOP_PAY"){const m=d.method.walletContent?.paymentMethodIdentifier;p=!!(o.current?.fields?.paymentMethods?.value||[]).find(g=>pv(g)&&g.paymentMethodIdentifier===m)}if(t.value){if(p){a.counter({name:"offsite_payment_popup_flow_initiated",value:1,attributes:{payment_method_name:"Crypto: USDC",is_shop_pay_wrapped:!!(d&&"walletContent"in d.method&&d.method.name==="SHOP_PAY"),is_mobile:Tf()}});const f=yr(u);if(f){const h=parseInt(f,10);if(!isNaN(h)){const g=WN(h);g&&l&&l.monorailEvent(g)}}}const m={width:600,height:455};c.open({onComplete:()=>e(),onCancel:()=>window.location.reload(),theme:n,popupDimensions:m,isCryptoPayment:p,title:i.translate("general.processing")})}},handleClosingPopup:()=>{t.value&&c.isOpen.value&&c.close({})}}),[t.value,r,a,l,o,c,n,i,e,u])}function jN({journey:e,exitDetour:t,pageComplete:n,pageNegotiate:r}){const{client:o,observability:i,router:a}=_(),l=Le(0),c=w(()=>l.value>0),u=o.unstable_legacyNavigationPerformance,{handleOffsitePopupOpen:d,handleClosingPopup:p}=YN(),m=V(t);m.current=t;const f=V(n);f.current=n;const h=V(r);h.current=r;const g=V(d);g.current=d;const y=V(p);y.current=p;const v=V(a);return v.current=a,{progress:x(async(b,C,I)=>{const S=async O=>{try{await C?.(O)}finally{O.status!=="success"&&y.current()}},k={...I,onProgressBlocked:()=>{try{I?.onProgressBlocked?.()}finally{y.current()}},onValidationSuccess:()=>{try{I?.onValidationSuccess?.()}finally{g.current()}}},{plan:E,currentPage:T,currentDetour:A}=e.value,R=m.current;if(i.leaveErrorBreadcrumb("[Journey] Progress initiated",{id:b,skipToCompletion:k?.skipToCompletion,greenPath:E.greenPath.map(O=>O.route),detours:E.detours.map(O=>O.route),currentPageRoute:T?.route,currentDetourRoute:A?.route}),!k?.skipToCompletion&&A&&T){const O=E.detours.find(X=>X.type==="thankYou"),K=A.type==="processing"?O:T;return u?.start({target:K?.route}),i.leaveErrorBreadcrumb(`[Journey] Exiting "${A.route}" detour, moving to "${K?.route}"`,{currentDetourRoute:A.route,exitDetourTargetRoute:K?.route,targetPageRoute:T.route}),R(A,T,S)}if(T==null){i.debug("journey_progression_blocked","[Journey] Blocked progression because the current page is missing"),k?.onProgressBlocked?.();return}const L=yn(T,E.greenPath[E.greenPath.length-1])||k?.skipToCompletion,M=E.greenPath.findIndex(({id:O})=>O===T.id),D=E.detours.find(O=>O.type==="processing"),N=L?D:E.greenPath[M+1];u?.start({target:N?.route});const U=v.current.currentUrl.peek(),z=E.greenPath.find(O=>O.route===U.normalizedPath)??T;if(L?U.searchParams.set(Br,z.id):U.searchParams.delete(Br),i.leaveErrorBreadcrumb("[Journey] Progressing",{skipToCompletion:k?.skipToCompletion,greenPath:E.greenPath.map(O=>O.route),isLastPage:L,currentPageRoute:T.route,currentDetourRoute:A?.route,nextPageRoute:N?.route}),!L)return h.current(T,S);l.value+=1;try{await f.current(T,A,S,k)}finally{l.value-=1}},[m,e,f,h,l,u,i,y,g]),completing:c}}function KN({children:e,dispatch:t,progressing:n,onProgressionChange:r}){const o=Ce(),{plan:i,currentPage:a,currentDetour:l}=o.value,{observability:c,checkout:u,router:d}=_(),p=oo(),{postPurchaseInquiryStatus:m}=se(),f=kN(t,r),h=Je(),g=GN(f,t,r),y=qN(t,r),v=WM(f,t,r),P=_N({plan:i,currentDetour:l,dispatch:t,onProgressionChange:r,negotiate:f,negotiated:h,proposedPostPurchaseInquiryStatus:m});F(()=>{const A=R=>{if(R.status!=="queued")return;const L=i.detours.find(M=>M.type==="throttle");if(L?.route)d.navigate(L.route);else if(a)throw new Rt(`Throttled, but no matching detour from ${a&&JSON.stringify(a,["id","label","route"])}`,{groupingHash:"JourneyError::ThrottledNoMatchingDetourFromPage"})};return A(p.current),p.subscribe(A)},[p,d,a,i.detours,t]),$e(()=>{const A=u.latestReceipt.value;c.leaveErrorBreadcrumb("[JourneyProgressionInternal] Signal effect for latestReceipt",mn(A)),_t(()=>P(A))});const b=V(m.peek());$e(()=>{const A=l?.type==="thankYou"||l?.type==="postPurchase",R=m.value,L=b.current;if(A&&R!==L){b.current=R;const D=u.latestReceipt.value;c.leaveErrorBreadcrumb("[JourneyProgressionInternal] Signal effect for proposedPostPurchaseInquiryStatus",{...mn(D),previousStatus:L}),_t(()=>P(D))}});const{progress:C,completing:I}=jN({journey:o,exitDetour:v,pageComplete:y,pageNegotiate:g}),S=$M({plan:i}),k=$N({negotiate:f}),E=Av();F(()=>h.pendingFieldsNegotiation.subscribe(A=>{if(A?.status!=="success"&&A?.status!=="error"||o.peek().currentDetour)return;const R=h.current.fields.allViolations.peek()??[];av(R)&&(E(),S("stockProblems",{routerOptions:{replace:!0}}))}),[h,o,S,E]);const T=B(()=>({detour:S,progress:C,negotiate:f,progressing:n,completing:I,prefetch:k}
19),[S,C,n,I,f,k]);return s(pc.Provider,{value:T,children:e})}function JN({plan:e,children:t}){const n=Le(!1),r=x(h=>{n.value=h},[n]),{observability:o,router:i}=_(),a=i.currentUrl.value,[l,c]=HM(e);bs(l,({previousState:h,action:g,nextState:y})=>{o.leaveErrorBreadcrumb("Journey state transition",{previousState:{history:h.history,redirectTo:h.redirectTo?.route},action:g,nextState:{history:y.history,redirectTo:y.redirectTo?.route},routerCurrentUrl:a.normalizedPath})});const{redirectTo:u}=l.value,d=Le(),{pageBeforeDetour:p,completed:m}=nM({router:i,plan:e,journeyStateSignal:l}),f=B(()=>({journeyState:l,currentFocus:d,completed:m,pageBeforeDetour:p}),[l,d,m,p]);if(u!=null){const h=a.search?{pathname:u.route,search:a.search}:u.route;return i.redirect(h),null}return s(Rh.Provider,{value:f,children:[s(Z1,{}),s(KN,{dispatch:c,progressing:n,onProgressionChange:r,children:t})]})}function Rv(e,t){return{type:"throttle",label:e.translate("throttle.title"),...t?{behavior:t}:{},route:"/throttle"}}function xv(e){return{type:"processing",label:e.translate("processing.title"),route:"/processing"}}function Mv(e){return{type:"thankYou",label:e.translate("thank_you.title"),route:"/thank-you"}}function XN(e){return{type:"noAddressLocation",label:e.translate("no_address_location.title"),route:"/no-address-location"}}function Nv(e){return{type:"stockProblems",label:e.translate("stock.title"),route:"/stock-problems"}}function QN(e,t){return{type:"terminalError",route:"/error",label:e.translate("general.title",{shopName:t})}}function Dv(e){return{type:"postPurchase",label:e.translate("post_purchase.title"),route:"/post-purchase"}}function Ms(e){return{type:"offsitePaymentFailed",label:e.translate("offsite_payment_failed.title"),route:"/offsite-payment-failed"}}function ZN(e){return{type:"shopPayLogin",label:e.translate("brand.shop_pay"),route:"/shoppay_login"}}function lu(e,{beforeStock:t=[],afterStock:n=[Dv(e)]}={}){return[Rv(e),xv(e),Mv(e),...t,Nv(e),...n]}function eD({i18n:e,greenPath:t}){return{greenPath:t,detours:[...lu(e,{beforeStock:[XN(e)]}),Ms(e)]}}function tD({i18n:e,reviewEnabled:t,paymentMethods:n,proposedPaymentLines:r,shop:o,checkout:i}){return{greenPath:[{id:"onePage",label:e.translate("general.page_title"),route:"/",features:({isShippingRequired:a})=>{const l=["contact-information","delivery-method","payment-methods","localization-extension"];return a?l.push("shipping-address"):ov(t,r.peek(),{shop:o,checkout:i,paymentMethods:n})||l.push("billing-address"),l}},...t?[sv(e)]:[]],detours:[...lu(e),Ms(e)]}}function nD({i18n:e,isOnePageCheckout:t,reviewEnabled:n}){return{greenPath:[t?{id:"onePage",label:e.translate("general.page_title"),route:"/",features:["payment-methods","billing-address"]}:{id:"payment",label:e.translate("payment.title"),route:"/payment",features:["payment-methods","billing-address"]},...n?[sv(e)]:[]],detours:[...lu(e,{afterStock:[]}),Ms(e)]}}function rD({businessCustomerJourneyPath:e,isShopPay:t,source:n,isOnePageCheckout:r}){return e?"businessCustomer":t?"shopPay":nt(n)?"orderEdit":r?"onePage":"threePage"}function oD({i18n:e,shopName:t,currentUrlSearch:n}){return{greenPath:[{id:"shopPay",label:e.translate("general.page_title"),route:"/shoppay",queryParams:n,features:({isShippingRequired:r})=>[r?"shipping-address":"billing-address","contact-information","delivery-method","payment-methods"]}],detours:[ZN(e),Rv(e,"redirectToCart"),xv(e),Mv(e),Nv(e),QN(e,t),Dv(e),Ms(e)]}}function iD({children:e}){const{i18n:t,observability:n,router:r,shop:o,source:i,checkout:a}=_(),l=a.identity.current.value==="shopPay",c=a.configuration.layout.isOnePage.value,{parts:u}=Ot(),d=H().paymentMethods?.value,p=u.paymentLines,m=iv(),f=Q1(),h=r.currentUrl.value?.search,g=_M(),y=rD({businessCustomerJourneyPath:f,isShopPay:l,source:i,isOnePageCheckout:c}),v=B(()=>{switch(y){case"businessCustomer":return n.leaveErrorBreadcrumb("Using business customer journey plan"),eD({i18n:t,greenPath:f});case"shopPay":return n.leaveErrorBreadcrumb("Using shop pay journey plan"),oD({i18n:t,shopName:o.name,currentUrlSearch:h});case"orderEdit":return n.leaveErrorBreadcrumb("Using order edit checkout journey plan"),n
19D({i18n:t,isOnePageCheckout:c,reviewEnabled:m});case"onePage":return tD({i18n:t,reviewEnabled:m,paymentMethods:d,proposedPaymentLines:p,shop:o,checkout:a});case"threePage":return g}},[f,a,h,t,c,y,n,d,p,m,o,g]);return s(JN,{plan:v,children:e})}function sD(){const{data:e}=ro(),{currentPage:t}=Ce().value,n=Je(),r=se(),{deliveryMethodsAddressErrors:o}=xt(),[i,a]=oe(!0),{setAddressError:l}=eu(o),c=r.shippingAddress.fields.countryCode.value,u=tu(c);return F(()=>{if(!e)return;const d=t?.route==="/information"||t?.route==="/";if(!i||!d){t&&a(!1);return}const{current:p}=n,{allViolations:m,paymentLines:f}=p.value;if(!!uC(f?.lines)&&m?.length){const g=["billing"].flatMap(y=>Array.from(u(y,m)));for(const[y,v]of g)l(y,v)}a(!1)},[t!==void 0,e,n,r]),null}var aD={Canvas:"g9gqqf1 g9gqqf0 _1fragemzj _1fragemyu _1fragemy5 _1fragem133"};function lD({scrollbarGutter:e,children:t}){const n=Zr(),r=n.customProperties.value,o=n.darkModeCustomProperties.value,i=r?.color?.schemes?.scheme1?.base?.background,a=o?.color?.schemes?.scheme1?.base?.background,l=[i&&`html, body { background-color: ${i}; }`,a&&`@media (prefers-color-scheme: dark) { html, body { background-color: ${a}; } }`,e&&`html { scrollbar-gutter: ${e}; }`].filter(Boolean).join(`
20`);return s(q,{children:[s("style",{children:l}),s("div",{className:aD.Canvas,children:t})]})}function cD(e){if(typeof CSS<"u")return CSS.escape(e);const t=String(e),n=t.length;let r=-1,o="";const i=t.charCodeAt(0);if(n===1&&i===45)return`\\${t}`;for(;++r<n;){const a=t.charCodeAt(r);if(a===0){o+="�";continue}if(a>=1&&a<=31||a===127||r===0&&a>=48&&a<=57||r===1&&a>=48&&a<=57&&i===45){o+=`\\${a.toString(16)} `;continue}if(a>=128||a===45||a===95||a>=48&&a<=57||a>=65&&a<=90||a>=97&&a<=122){o+=t.charAt(r);continue}o+=`\\${t.charAt(r)}`}return o}const uD=Lw(e=>bt({colorScheme:e})),dD=Jn(function({children:t,scoped:n}){const r=Zr(),o=cf(),i=r.customProperties.value,a=r.darkModeCustomProperties.value,l=B(()=>{const u=`#CustomProperties-${cD(o)}`,d=i?xp(i):null,p=a?xp(a):null,m=Rp(Lp(i?.color)),f=Rp(Lp(a?.color)),h=d&&Object.keys(d).length>0,g=p&&Object.keys(p).length>0;if(!h&&!g&&!m&&!f)return"";const y=`${h?`${u} {${Jt(d)}}`:""}${m}`,v=`${g?`${u} {${Jt(p)}}`:""}${f}`,P=v?`@media (prefers-color-scheme: dark) { ${v} }`:"",b=`
21      ${y}
22      ${P}
23    `;return n?`@scope { ${b} }`:b},[i,a,o,n]);return s("div",{id:`CustomProperties-${o}`,children:[s("style",{children:l}),t]})});function pD(e){const t=e.color;if(!t||typeof t!="object"||Array.isArray(t))return e;const{schemes:n,...r}=t;return{...e,color:r}}function Lp(e){if(!(!e||typeof e!="object"||!("schemes"in e)))return e.schemes}function cu(e,t){return Object.entries(e).reduce((n,[r,o])=>{const i=t[r];if(i==null)return n;const a=typeof o=="object"&&o!=null&&!Array.isArray(o),l=typeof i=="object"&&i!=null&&!Array.isArray(i);return a&&l?{...n,...cu(o,i)}:a?n:o!=null?{...n,[i]:o}:n},{})}function Rp(e){if(!e||typeof e!="object")return"";const t=jn.color.default;let n="";for(const r of gf){const o=e[r];if(!o||typeof o!="object")continue;const i=cu(o,t);if(Object.keys(i).length===0)continue;const a=uD[r].trim().split(/\s+/).join(".");n+=`.${a} {${Jt(i)}}`}return n}function xp(e){return cu(pD(e),jn)}function mD({children:e}){const{typographyPrimary:t,typographySecondary:n}=rt();return F(()=>{const r=[t,n].map(i=>[{fonts:i.fonts,source:i.sourceBase,weight:i.weightBase},{fonts:i.fonts,source:i.sourceBold,weight:i.weightBold}]).reduce((i,a)=>i.concat(a),[]).filter(i=>i.fonts!==void 0&&i.source!==void 0).map(({fonts:i,source:a,weight:l})=>new FontFace(i,a,{weight:l}));async function o(){await Promise.all(r).then(i=>{i.forEach(a=>{document.fonts.add(a)})})}o()},[t,n]),s(q,{children:e})}function fD({children:e,condition:t}){return t?s(mD,{children:e}):s(q,{children:e})}function hD({children:e,theme:t,shouldLoadFonts:n,scoped:r}){const{customProperties:o}=CT();return s(_f.Provider,{value:t,children:s(dC,{children:s(fD,{condition:!!n,children:o?s(dD,{scoped:r,children:e}):e})})})}function gD({children:e}){const{checkout:t,source:n,router:r}=_(),o=r.currentUrl.value,i=n.type==="simulated",a=Zn(o.search),l=t.configuration.branding.shell,c=t.configuration.branding.theme,u=$l()||i||a;return s(hD,{theme:c,shouldLoadFonts:u,children:s(sx,{shell:l,children:s(yD,{children:e})})})}function yD({children:e}){const{canvas:t}=Fe();return s(lD,{scrollbarGutter:t?.scrollbarGutter,children:e})}function vD(){const{embed:e}=_(),t=OT();return F(()=>
23{if(!t)return;let n=!1;return t.subscribe(r=>{r!==n&&(n=r,e?.client?.dialogChange(r?"open":"close"))})},[t,e]),null}function Ov(e){return e.activatedExtensionId&&e.activatedExtensionId.length>0?e.activatedExtensionId:e.id}function X7(e){const t=e.type==="local"?void 0:e.publicIdentifier,n=e.type==="persisted"?e.targetPublicIdentifier:void 0,r=e.type==="local"?void 0:e.registrationId;return{appId:e.appId,appApiKey:e.appApiKey,apiVersion:e.apiVersion,appName:e.appName,extensionId:e.extensionId,extensionPoint:e.extensionPoint.target,id:Ov(e),name:e.name,placementReference:e.placementReference,type:e.type,version:e.version,publicIdentifier:t,registrationId:r,targetPublicIdentifier:n}}function _D(e){return{message:SD(e),trace:PD(e)}}function bD(e){return typeof e.cause=="object"&&e.cause!=null}function PD(e){const t=String(Fv(e));return e.stack??t??e.message??""}function SD(e){const t=Fv(e);return t?`${t.name}: ${t.message}`:e.message}function Fv(e){if(bD(e)&&"stack"in e.cause)return e.cause}var st=(e=>(e.CheckoutError="CHECKOUT_ERROR",e.ContactError="CONTACT_ERROR",e.DeliveryError="DELIVERY_ERROR",e.DiscountError="DISCOUNT_ERROR",e.InputInvalid="INPUT_INVALID",e.InputRequired="INPUT_REQUIRED",e.InventoryError="INVENTORY_ERROR",e.MerchandiseError="MERCHANDISE_ERROR",e.PaymentError="PAYMENT_ERROR",e))(st||{}),Bv=(e=>(e.ExtensionUsageError="EXTENSION_USAGE_ERROR",e))(Bv||{});const Vv={[qt.ExtensionCustomerPrivacyApiBrowserError]:{eventName:"extension-customer-privacy-api-browser-error",eventType:"interceptor-execution",errorReason:"extension-customer-privacy-api-browser-error"},[qt.ExtensionCustomerPrivacyApiError]:{eventName:"extension-customer-privacy-api-error",eventType:"interceptor-execution",errorReason:"extension-customer-privacy-api-error"},[qt.ExtensionCustomerPrivacyLikelyBotError]:{eventName:"extension-customer-privacy-likely-bot-error",eventType:"interceptor-execution",errorReason:"extension-customer-privacy-likely-bot-error"},[qt.ExtensionCustomerPrivacyServerError]:{eventName:"extension-customer-privacy-server-error",eventType:"interceptor-execution",errorReason:"extension-customer-privacy-server-error"},[qt.ExtensionInterceptorError]:{eventName:"interceptor-execution-broke",eventType:"interceptor-execution",errorReason:"interceptor-execution-broke"},[qt.ExtensionInteractionError]:{eventName:"extension-component-interacted",eventType:"interceptor-execution",errorReason:"extension-component-interacted"},[qt.ExtensionRenderError]:{eventName:"extension-rendered",eventType:"interceptor-execution",errorReason:"extension-rendered"},[qt.ExtensionRunError]:{eventName:"extension-run-error",eventType:"interceptor-execution",errorReason:"extension-run-error"},[qt.ExtensionTimeoutError]:{eventName:"extension-render-timed-out",eventType:"interceptor-execution",errorReason:"extension-render-timed-out"},[qt.ExtensionAssetFetchError]:{eventName:"extension-asset-fetch-error",eventType:"interceptor-execution",errorReason:"extension-asset-fetch-error"},[qt.ExtensionSandboxAssetFetchError]:{eventName:"extension-sandbox-asset-fetch-error",eventType:"interceptor-execution",errorReason:"extension-sandbox-asset-fetch-error"},[qt.ExtensionSandboxUncaughtError]:{eventName:"extension-sandbox-uncaught-error",eventType:"interceptor-execution",errorReason:"extension-sandbox-uncaught-error"},[qt.ExtensionUnsupportedFeatureError]:{eventName:"extension-unsupported-feature-error",eventType:"interceptor-execution",errorReason:"extension-unsupported-feature-error"}};function ED(e){return e in Vv}function CD(e){return e in qt}const kD=({children:e})=>{if(typeof window>"u")return s(q,{children:e});const{observability:t,userEvents:n,checkout:r}=_(),o=zg(),i=wn(),a=r.configuration.layout.isOnePage.value;return F(()=>{const l=(u,d)=>{if(CD(u.name)&&d?.extension){const{extension:p}=d,{trace:m,message:f}=_D(u);if(!Pf(u.name))return;const h={apiVersion:p.apiVersion,appId:p.appId,appApiKey:p.appApiKey,appName:p.appName,appVersion:p.version,code:Bv.ExtensionUsageError,errorName:u.name,extensionId:p.extensionId,extensionName:p.name,extensionType:p.type,message:f,placementReference:p.placementReference,extensionTarget:p.extensionPoint,registrationId:p.registrationId,trace:m,type:"uiExtensionError"};i("uiExtensionError",{...h,timestamp:new Date})}},c=(u,d,p)=>{if(ED(u.name)&&d?.extension){const{extension:m}=d,{eventName:f,eventType:h,errorReason:g}=Vv[u.name],{userToken:y,shopId:v,sessionToken:P,checkoutToken:b,apiClientId:C,sourceId:I,sourceType:S,checkoutSdkVariant:k,checkoutSdkVersion:E,checkoutSdkSchemaVersion:T,pageLoadId:A}=o;n.monorailEvent({schemaId:"checkout_c1_interaction_errors/3.2",payload:{userToken:y,shopId:v,sessionToken:P,pageLoadId:A,checkoutToken:b,apiClientId:C,sourceId:I,sourceType:S,extensionId:Ov(m),extensionPoint:m.extensionPoint,extensionPlacementReference:m.placementReference,extensionInstanceId:m.extensionInstanceId,activatedExtensionIds:p?.extensions?.active,eventType:h,eventName:f,errorMessage:u.message,sourceDesign:a?"c1_redesign":"c1_legacy",errorReason:g,silencedViolation:!1,errorOrigin:"client",errorType:"extension",checkoutSdkVariant:k,checkoutSdkVersion:E,checkoutSdkSchemaVersion:T,extensionPublicIdentifier:m.publicIdentifier,extensionTargetPublicIdentifier:m.targetPublicIdentifier}})}};return t.addOnError(c),t.addOnError(l),()=>{t.removeOnError(c),t.removeOnError(l)}},[t,n,o,a,i]),s(q,{children:e})},ID=100;function AD(){const e=ay(),t=V(new Set);return F(()=>()=>{for(const n of t.current)cancelAnimationFrame(n.handle),clearTimeout(n.timeout),n.resolve();t.current.clear()},[]),tr(n=>{if(n.type==="error"||n.type==="invalid")return new Promise(r=>{const o=()=>
23{if(!i.settled){i.settled=!0,cancelAnimationFrame(i.handle),clearTimeout(i.timeout);try{e()}finally{t.current.delete(i),r()}}},i={handle:requestAnimationFrame(o),resolve:r,settled:!1,timeout:setTimeout(o,ID)};t.current.add(i)})}),null}function TD({i18n:e,buyerIdentity:t}){return!!t.value?.customerProfile?e.translate("review.checkout_a_different_way"):e.translate("review.checkout_as_guest")}function Uv(){const{checkout:{identity:e}}=_(),t=H().buyerIdentity,{inMemoryApplePayParts:{asPaymentMethod:n}}=Ye();return w(()=>e.current.value==="applePay"&&!!t.value?.purchasingCompany&&n.value)}function Ns(){const{checkout:{wallets:e},embed:t}=_(),n=wD(),r=pC(),o=Uv();return x(({shouldResetCustomerInfo:i=!1,shouldRemovePaymentLine:a=!0,isConstrainedAddress:l=!1}={})=>{const c=i&&t?.isFlagshipPartner?t.embedderProposalSnapshot.value??null:null;e.setHasActiveApplePaySubscriptionReview(!1),o.value||e.setEscalatedWallet(null),i&&n(c,l),a&&!c&&r()},[t,n,r,e,o])}function wD(){const{deliveryLines:e,email:t,phone:n,shippingAddress:r,billingAddress:o,billingAddressOption:i,paymentLines:a,tipLines:l,discountLines:c,interfaceFlow:u,externalDeliveryIds:d,cartMetafields:p,attributes:m}=se(),f=bN(),h=yv(),g=Er();return x((y,v=!1)=>{if(u.value=void 0,d.value=void 0,y)t.value=y.email,n.value=y.phone,r.value=y.shippingAddress,o.value=y.billingAddress,y.billingAddressOption&&(i.value=y.billingAddressOption),a.value=y.paymentLines,l.value=y.tipLines,c.value=y.discountLines,p.value=y.cartMetafields;else{const P=f()??"",b=h("shipping"),C=h("billing");t.value=P,n.value="",v||(r.value=b??dl(r.value)),o.value=C??dl(o.value);const I=m.value;m.value=I&&I.filter(S=>S.key!==th)}!g.value&&!v&&Ps(e,void 0)},[m,i,o,p,e,c,t,d,h,f,u,g,a,n,r,l])}function uu({onClick:e,shouldResetCustomerInfo:t,shouldRemovePaymentLine:n,skipRedirect:r}={}){const{negotiate:o,progress:i}=Mt(),a=Ns(),{dispatch:l}=Uc()??{},{client:c,observability:u,persistence:d,router:p,checkout:{identity:{current:m}},i18n:f}=_(),{buyerIdentity:h}=H(),{value:g}=w(()=>TD({i18n:f,buyerIdentity:h})),{currentDetour:y}=Ce().value,v=c.unstable_getSerialization("forcedRedesignWallet"),P=LD(p.currentUrl.value),b=p.currentUrl.value.searchParams.has(Yo),C=v&&P&&!b&&!r,I=x(async S=>{if(u.counter({name:mx,value:1,attributes:{identity:m.value,redirect:!!C}}),C){d?.clearAll(),e?.(),S?.(),window.location.replace(P);return}l?.("addressReset"),fx(p.currentUrl.peek()),e?.(),a({shouldResetCustomerInfo:t,shouldRemovePaymentLine:n}),l?.("reset"),y&&i("checkout-as-guest-action"),S?.(),await o({silenceViolations:["non-stock"]})},[y,l,P,m,o,e,d,i,a,C,u,p,t,n]);return{label:g,onClick:I}}function LD(e){try{const t=new URL(e.href);return t.searchParams.delete(sl),t.searchParams.append(Yo,"1"),t.toString()}catch{return}}function RD(){const{router:e}=_(),t=e.currentUrl.value,{onClick:n}=uu({shouldResetCustomerInfo:!0});F(()=>{t.searchParams.has(Yo)&&(n?.(),hx(t))},[])}function xD(){return RD(),null}const Mp="wallet_deceleration";function MD(){const{walletUsedForSubmissionSignal:e,inMemoryGooglePayParts:{paymentSheetError:t}}=Ye(),{clearForcedCheckoutLayout:n}=ws(ss),{checkout:r,router:o}=_(),i=x(async()=>{e.value=void 0,t.value=void 0,n({wallet:"GOOGLE_PAY"}),ND(o.currentUrl.value),r.unstable_evaluateSupportsSplitShipping(o.currentUrl.value)},[e,t,r,n,o]);return uu({onClick:i,shouldResetCustomerInfo:!0,skipRedirect:!0})}function ND(e){e.searchParams.get(Mp)==="true"&&(e.searchParams.delete(Mp),history.replaceState(null,"",e.href))}function DD({shouldResetCustomerInfo:e}){const t=Ns();return x(()=>{t({shouldResetCustomerInfo:e})},[t,e])}const Np="google_pay_legacy_token_bounce";function OD(){const{checkout:e,embed:t,observability:n,shop:r}=_(),{inMemoryGooglePayParts:{paymentSheetError:o}}=Ye(),{onClick:i}=MD();F(()=>{r.hasFlagEnabled(mC)&&(t||e.wallets.escalatedWallet.value==="GOOGLE_PAY"&&(e.latestReceipt.value||fC({paymentLines:e.proposal.proposed.paymentLines.value})&&(n.counter({name:Np,value:1}),n.log(Np,"[useBounceLegacyGooglePayToken] Detected a legacy Google Pay token on load and returned the buyer to guest checkout"),i?.(()=>{o.value={type:"recovery_notice"}}))))},[])}function FD(){return OD(),null}const zv=ft("NavigationBlockerContext");
23class BD extends Error{constructor(){super(...arguments),this.name="NavigationBlockerTimeout"}}const VD=1e3,Dp=30;function UD({children:e}){const t=V(new Set),n=Le(!1),{observability:r}=_(),o=x(l=>{setTimeout(()=>{t.current.has(l)&&r.error(new BD(`The block associated with the key: ${l} has been blocking for over ${Dp} seconds now. Please check to see you are properly cleaning this up.`))},Dp*VD)},[r]),i=x((l,c)=>{const u=c??"_global",d=t.current;l?(d.add(u),o(u)):d.delete(u),n.value=d.size>0},[n,o]),a=B(()=>({blocking:n,setBlocking:i}),[n,i]);return s(zv.Provider,{value:a,children:e})}const Hv=He({registerPayNowButtonElement:()=>()=>{},payNowButtonElement:null,setPayNowButtonSectionMounted:()=>{},payNowButtonSectionMounted:!1}),Ds=()=>Ee(Hv);function Q7(){const{registerPayNowButtonElement:e}=Ds(),t=V(null);return x(n=>{t.current?.(),t.current=n?e(n):null},[e])}function zD({children:e}){const t=V(new Set),[n,r]=oe(null),[o,i]=oe(0),a=x(d=>(t.current.add(d),r(d),()=>{t.current.delete(d),r(p=>p===d?t.current.values().next().value??null:p)}),[]),l=x(d=>{i(p=>Math.max(0,p+(d?1:-1)))},[]),c=o>0,u=B(()=>({registerPayNowButtonElement:a,payNowButtonElement:n,setPayNowButtonSectionMounted:l,payNowButtonSectionMounted:c}),[a,n,l,c]);return s(Hv.Provider,{value:u,children:e})}function HD(){return Hy(_())}function Z7(){const{embed:e}=_(),n=Ss()?.config?.pixelEventsMode,r=e?.configuration?.pixelMode;return n==="DISABLED"||n==="FORWARD_TO_CLIENT"||r==="DISABLED"||r==="FORWARD_TO_CLIENT"}function eY(){const{mobileCheckoutSdk:e}=_(),t=e.config.version,n=e.config.schema;return!!t||!!n}function qD(e){return e.filter(t=>t.allocationSet.allocatedForTotal?.targets.some(n=>!n.deliveryLineTarget)||t.allocationSet.allocated?.allocations.some(n=>!n.target.deliveryLineTarget))}function qv({isFlagshipPartner:e,embedderProposalSnapshotEmail:t,proposedEmail:n}){if(e)return t||n||void 0}function Gv(e){const t={totalAmount:{any:!0},paymentLines:[],billingAddress:null};return{...e,buyerIdentity:{...e.buyerIdentity,email:"",phone:"",customer:{presentmentCurrency:e.buyerIdentity?.customer?.presentmentCurrency,countryCode:e.buyerIdentity?.customer?.countryCode},marketingConsent:[]},delivery:{deliveryLines:[],noDeliveryRequired:[]},discounts:{lines:qD(e.discounts?.lines??[])},...e.payment?{payment:t}:{},...e.remote&&{remote:{...e.remote,remoteNegotiations:e.remote.remoteNegotiations.map(n=>({...n,payment:t}))}}}}var GD=(e=>(e.SignUp="sign_up_page",e.Payment="payment_page",e.Login="shop_pay_login_page",e.PaymentErrorState="payment_page_error_state",e.PaymentErrorModalGeneric="payment_page_error_modal_generic",e.PaymentErrorModalSignInFailed="payment_page_error_modal_sign_in_failed",e.PaymentErrorModalContinueWithShopPay="payment_page_error_modal_continue_with_shop_pay",e))(GD||{});function $D(e,t){t&&(e.set(CC,t.paymentMethod),t.paymentMethodIdentifier?e.set(bd,t.paymentMethodIdentifier):e.delete(bd))}class WD extends Error{constructor(){super(...arguments),this.name="MissingGuestCheckoutUrlError"}}function du(e="payment_page",{markPrefilledGuestArrival:t=!1}={}){const{client:n,i18n:r,observability:o,userEvents:i,source:a,checkout:l,shop:c,persistence:u,shop:{hasStorefront:d},url:p,shopPay:m,embed:f,router:h}=_(),g=h.currentUrl.value,{checkoutAsGuestUrl:y,profilePreviewToken:v,checkoutProfileContext:P,redirectSource:b}=m.config,C=a.type==="simulated",I=m.user.isAuthenticatedUser,S=c.hasFlagEnabled(hC),k=oo().current.token,E=l.checkpointToken.value,T=l.configuration.renderContextToken.token.value,A=gv({mode:"copy-if-missing",include:{shopClientUuid:!0}}),R=qv({isFlagshipPartner:f?.isFlagshipPartner,embedderProposalSnapshotEmail:f?.embedderProposalSnapshot.value?.email,proposedEmail:l.proposal.proposed.email.value}),L=B(()=>{if(C)return"";if(!y)return d?p.storefront():"";const O=new URL(y);O.searchParams.set(nh,"true"),gC(O),t&&I.value&&yC(a.type)&&S&&vC(O,EC),E&&O.searchParams.set(_C,E),k&&O.searchParams.set(eh,k),v&&P&&(O.searchParams.set(bC,v),O.searchParams.set(PC,P)),Zn(g.search)&&O.searchParams.set(SC,"shop_web"),I.value?O.searchParams.set(_d,"true"):O.searchParams.delete(_d),T?O.searchParams.set("rctx",T):O.searchParams.delete("rctx");const X=new URLSearchParams(g.search).get("_cs");X&&O.searchParams.set("_cs",X);const ne=new URLSearchParams(n.initialRequest.url.search);return A(O.searchParams,ne),R&&!O.searchParams.get("checkout[email]")&&O.searchParams.set("checkout[email]",R),O.href},[C,y,E,n.initialRequest.url.search,v,P,g.search,I.value,k,d,p,T,A,R,t,a.type,S]);let M=r.translate("unauthenticated_modals.generic.cta");(HD()||f?.isCheckoutKit())&&(M=r.translate("checkout_sdk.use_another_payment_method"));const N=x(()=>(C||(I.value&&u?.clearAll(),o.counter({name:"shop_pay_return_to_guest_checkout",value:1,attributes:{redirect_source:b}}),i.monorailEvent({schemaId:"shopify_pay_payment_page_checkout_as_guest/2.1",payload:{...Gn(a,l,c),origin:e}},{exportImmediately:!0})),null),[C,I,u,o,i,a,l,c,e,b]),U=x(O=>
23{if(l.unstable_setRedirectingExternally(!0),N(),!L){l.unstable_setRedirectingExternally(!1),o.error(new WD("redirectToGuestCheckout called without a guest checkout URL"));return}if(!O){window.location.assign(L);return}const K=new URL(L);$D(K.searchParams,O),window.location.assign(K.href)},[l,N,L,o]);return B(()=>({label:M,href:L,onClick:N,redirectToGuestCheckout:U}),[M,L,N,U])}function YD(e){const{negotiate:t}=Mt();return x(n=>t({silenceViolations:["all"],force:!0,customizeNegotiation:Gv,negotiationStage:"negotiation",onComplete:r=>e(n,r)}),[t,e])}function jD(e,t){const{negotiate:n}=Mt();return x(r=>n({silenceViolations:["all"],force:!0,customizeNegotiation:o=>{const i=Gv(o);return{...i,buyerIdentity:{...i.buyerIdentity,email:t}}},negotiationStage:"negotiation",onComplete:()=>e(r)}),[n,t,e])}function tY({clearPii:e}){const{embed:t,checkout:n,userEvents:r,source:o,shop:i}=_(),a=se().shippingAddress.value,{href:l,redirectToGuestCheckout:c}=du("payment_page",{markPrefilledGuestArrival:!e}),u=qv({isFlagshipPartner:t?.isFlagshipPartner,embedderProposalSnapshotEmail:t?.embedderProposalSnapshot.value?.email,proposedEmail:n.proposal.proposed.email.value}),d=YD(c),p=jD(c,u??""),m=n.proposal.negotiated.fields.availableDeliveryAddresses.value,f=!!(m?.length&&m.some(h=>kC(a,h.address)));return x(h=>{if(n.unstable_setRedirectingExternally(!0),!e||f){!e&&l&&r.monorailEvent({schemaId:"shopify_pay_payment_page_ui_interaction/1.2",payload:{...Gn(o,n,i),action:"payment_step_redirect"}},{exportImmediately:!0}),c(h);return}if(u){p(h).catch(()=>{n.unstable_setRedirectingExternally(!1)});return}d(h).catch(()=>{n.unstable_setRedirectingExternally(!1)})},[n,e,l,r,o,i,f,c,u,d,p])}const KD=[3890849,3850711,5198245];function JD(e){return e?KD.includes(e):!1}function XD(){const{observability:e}=_(),t=x(n=>{if(typeof window>"u"||!window.ReactNativeWebView||typeof window.ReactNativeWebView.postMessage!="function")return;const r=JSON.stringify(n);try{window.ReactNativeWebView.postMessage(r)}catch(o){e.log("shop_app_messenger_post_message_failed","Failed to post message to ReactNativeWebView",{error:o})}},[e]);return B(()=>({notify:t}),[t])}function QD(e){return new URL("/pay/session",e).href}function ZD({enabled:e,observability:t,shopServerUrl:n}){const r=V(!1);F(()=>{!e||r.current||(r.current=!0,fetch(QD(n),{method:"GET",credentials:"include",keepalive:!0}).then(o=>{o.ok||t.log("shop_pay_remember_me_session_exchange_failed","Failed to exchange Shop Pay remember-me session",{status:o.status})}).catch(o=>{t.log("shop_pay_remember_me_session_exchange_failed","Failed to exchange Shop Pay remember-me session",{errorMessage:o instanceof Error?o.message:String(o)})}))},[e,t,n])}function eO({children:e}){const{checkout:t,observability:n,source:r,client:o,environment:i,shopPay:a}=_(),l=t.rememberMe.shouldSetRememberMeCookies.value,c=r.type==="simulated",{href:u}=du(),d=Ay().value,p=XD(),m=V(!1),f=t.identity.current.value==="shopPay",h=o.unstable_getSerialization("apiClientId"),g=o.unstable_getSerialization("shopPayConfig"),y=JD(h),v=!c&&d!==void 0&&!y&&!t.configuration.isUniversalCheckoutFinalizer,P=f&&v,b=f&&!c&&!P&&g.has_remember_me_session===!0&&a.user.shopAccountUuid.value!=="",C=V(!1);return $e(()=>{const I=t.latestReceipt.value;if(I!=null)switch(I.status){case"processed":p.notify({checkout_completed:!0});break;case"action_required":I.action.type==="complete_payment_challenge"?p.notify({checkout_error:"threeds_required"}):p.notify({checkout_error:"generic_error"});break;case"failed":I.failure.type==="payment"||I.failure.type==="discount"?p.notify({checkout_in_progress:!1}):p.notify({checkout_error:"generic_error"});break}}),F(()=>{!m.current&&l&&(t.rememberMe.setRememberMeCookies(),m.current=!0)},[l,t.rememberMe]),ZD({enabled:b,observability:n,shopServerUrl:i.services.shopServer.url}),F(()=>{!P||C.current||(C.current=!0,n.log("shop_pay_wrapper_redirecting_to_guest_checkout","Redirecting to guest checkout",{shopPayUnavailableReason:d}),d!=="deferred_payment"&&n.counter({name:"shop_pay_unavailable_redirecting_to_guest_checkout",value:1}),window.location.assign(u))},[u,n,d,P]),P?null:s(q,{children:e})}function tO(){const{client:e}=_(),n=e.unstable_getSerialization("experiments")?.find(l=>l.clientHandle===iA)?.variant,r=Object.values(sr).find(l=>l===n)??sr.Control,o=r===sr.VariantA||r===sr.VariantC,i=r===sr.VariantB||r===sr.VariantC,a=r!==sr.Control;return{variant:r,showPaymentTiles:o,useRedesignedChoiceList:i,showSingleCreditCard:a}}function nO(){const{source:e}=_(),{useRedesignedChoiceList:t}=tO();return t&&e.type!=="shopPayExternal"?"redesigned":"base"}
23class rO extends Error{constructor(){super(...arguments),this.name="TranslationError"}}function oO(e){const t=r=>e.numberFormatter().format(r),n=new Map([["closeNotification",()=>e.translate("general.close_notice_label")],["expandNotification",()=>e.translate("general.expand_notice_label")],["closeModal",()=>e.translate("general.close_modal_label")],["processing",()=>e.translate("general.processing")],["loading",()=>e.translate("general.loading")],["submit",()=>e.translate("general.submit")],["increase",(r={})=>e.translate("general.stepper.increase",r)],["decrease",(r={})=>e.translate("general.stepper.decrease",r)],["minimumReached",(r={})=>e.translate("general.stepper.minimum_reached",r)],["maximumReached",(r={})=>e.translate("general.stepper.maximum_reached",r)],["january",()=>e.translate("general.dates.months.january")],["february",()=>e.translate("general.dates.months.february")],["march",()=>e.translate("general.dates.months.march")],["april",()=>e.translate("general.dates.months.april")],["may",()=>e.translate("general.dates.months.may")],["june",()=>e.translate("general.dates.months.june")],["july",()=>e.translate("general.dates.months.july")],["august",()=>e.translate("general.dates.months.august")],["september",()=>e.translate("general.dates.months.september")],["october",()=>e.translate("general.dates.months.october")],["november",()=>e.translate("general.dates.months.november")],["december",()=>e.translate("general.dates.months.december")],["monday",()=>e.translate("general.dates.weekdays.monday")],["tuesday",()=>e.translate("general.dates.weekdays.tuesday")],["wednesday",()=>e.translate("general.dates.weekdays.wednesday")],["thursday",()=>e.translate("general.dates.weekdays.thursday")],["friday",()=>e.translate("general.dates.weekdays.friday")],["saturday",()=>e.translate("general.dates.weekdays.saturday")],["sunday",()=>e.translate("general.dates.weekdays.sunday")],["mondayAbbreviation",()=>e.translate("general.dates.weekdays_abbreviation.monday")],["tuesdayAbbreviation",()=>e.translate("general.dates.weekdays_abbreviation.tuesday")],["wednesdayAbbreviation",()=>e.translate("general.dates.weekdays_abbreviation.wednesday")],["thursdayAbbreviation",()=>e.translate("general.dates.weekdays_abbreviation.thursday")],["fridayAbbreviation",()=>e.translate("general.dates.weekdays_abbreviation.friday")],["saturdayAbbreviation",()=>e.translate("general.dates.weekdays_abbreviation.saturday")],["sundayAbbreviation",()=>e.translate("general.dates.weekdays_abbreviation.sunday")],["showNextMonth",(r={})=>e.translate("general.datepicker.show_next_month",r)],["showPreviousMonth",(r={})=>e.translate("general.datepicker.show_previous_month",r)],["rangeStart",()=>e.translate("general.datepicker.range_start")],["inRange",()=>e.translate("general.datepicker.in_range")],["rangeEnd",()=>e.translate("general.datepicker.range_end")],["autocompleteOptionsAvailable",({count:r=0}={})=>r===0?e.translate("general.autocomplete_zero_item"):r===1?e.translate("general.autocomplete_single_item"):e.translate("general.autocomplete_multi_item",{number:r})],["qrCode",()=>e.translate("general.qr_code")],["removeChip",()=>e.translate("general.remove_chip")],["removeItem",(r={})=>e.translate("general.remove_item",r)],["removeTag",()=>e.translate("general.remove_tag")],["mapClusterTitle",({count:r=0}={})=>{const o=typeof r=="number"?t(r):r;return r===1?e.translate("general.map.cluster_title.one",{number:o}):e.translate("general.map.cluster_title.other",{number:o})}],["externalNewWindow",()=>e.translate("general.forwarding_indicator.external_and_new_window")],["newWindow",()=>e.translate("general.forwarding_indicator.new_window")],["external",()=>e.translate("general.forwarding_indicator.external")],["expandSheet",()=>e.translate("general.sheet.expand")],["dropzoneDraggedOver",()=>e.translate("general.dropzone.dragged_over")],["dropzoneInvalidFileType",()=>e.translate("general.dropzone.invalid_file_type")],["addFile",()=>e.translate("general.dropzone.add_file")],["reviewItemHeaderChangeValue",()=>e.translate("review.item_header.change_value")],["reviewItemHeaderSection",()=>e.translate("review.item_header.section")],["reviewItemHeaderValue",()=>e.translate("review.item_header.value")],["moneyLinesHeaderItem",()=>e.translate("order_summary.cost_table_item_column_header")],["moneyLinesHeaderValue",()=>e.translate("order_summary.cost_table_value_column_header")],["clipboardCopied",()=>e.translate("clipboard.copied")],["clipboardFailedToCopy",()=>
23e.translate("clipboard.failed_to_copy")],["productThumbnailQuantityLabel",()=>e.translate("order_summary.product_image_quantity_label")]]);return(r,o)=>{const i=n.get(r)?.(o);if(i==null)throw new rO(`Missing UI library translation: ${r}`);return i}}const $v=()=>{const{url:e}=_();return B(()=>[e.cart(),e.storefront()],[e])};function Wv(){const{router:e,shop:t}=_(),n=fi(),{cartLink:{visibility:r}}=Fe(),o=Ce(),i=lo(),a=We(r==="hidden");return w(()=>{const{currentDetour:l}=o.value,c=l?.type==="thankYou";return t.hasStorefront&&!n.value&&!c&&!Zn(e.currentUrl.value.search)&&!!i.value&&!a.value})}function lo(){const{source:e,url:t}=_(),n=e.type==="simulated",r=H().buyerIdentity;return w(()=>{if(n)return new URL(t.cart());let o;return e.cartReturnUrl&&(o=new URL(e.cartReturnUrl)),r.value?.customerProfile&&o&&o.searchParams.append("logged_in","true"),o})}function Yv(e){return e.currentUrlMatches("/thank-you")}function iO(e){return e.currentUrlMatches("/stock-problems")}const jv=at(function({href:t,target:n="auto",children:r,...o},i){const{i18n:a,router:l,url:c,source:u,checkout:d,embed:p,observability:m}=_(),f=lo(),h=cO(),g=new URL(c.storefront()).origin,y=u.type==="simulated",v=d.configuration.isWindowOpenDelegationEnabled,P=$v();if(d.configuration.isUniversalCheckoutFinalizer&&Yv(l))return s("a",{...o,ref:i,"aria-disabled":"true",children:r});let b=n==="_blank",C=n==="_blank",I=fA(t,{cart:gA(f.value),checkout:hA()});const S=aO(I,l,g,h),k=["/information","/shipping","/review","/payment","/thank-you","/cart","/",""],E=["/orders","/profile","/settings"],T=[...k,...E],A=/^\/orders\/.*/;switch(S){case 2:{C=!0,b=!0;break}case 1:{C=!0;break}case 3:{C=!0,I="#";break}case 0:y&&!T.includes(yA(I))&&!A.test(I)&&(I="#");break;default:rn(S)}const R=b?"_blank":void 0,L=b?"noopener noreferrer":void 0,M=Jh({external:b,native:C});return C?s("a",{...o,href:I,target:R,rel:L,ref:i,"aria-describedby":M,onClick:N=>{if(v&&(S===1||S===2)){N.preventDefault(),p?.client?.windowOpenRequest(I).catch(U=>{m.log("window_open_delegation_error","Window open delegation failed in Link component",{url:I,error:U instanceof Error?U.message:String(U)})}),o.onClick?.(N);return}if(y){if(N.preventDefault(),P.includes(I)){const O=new URL(l.currentUrl.value);O.searchParams.set("ce_redirect",I),l.navigate(O);return}const U=a.translate("simulated_checkout.editor_link_new_tab_confirmation",{resolved_to_link:I});confirm(U)&&open(I)}o.onClick?.(N)},children:r}):s(JP,{...o,router:l,href:I,target:R,rel:L,ref:i,"aria-describedby":M,children:r})});jv.displayName="Link";const Kv=new Set(["http","https"]),sO=new Set([...Kv,"mailto","tel","sms"]);function aO(e,t,n,r){let o;try{o=new URL(e,t.currentUrl.value.origin)}catch{return 3}const i=o.protocol.replace(":","");return Kv.has(i)?XP(o,t.prefix)||!e.startsWith("//")&&!e.startsWith(o.protocol)?0:lO(o,t,n,r)?1:2:sO.has(i)?1:3}function lO(e,t,n,r){return e.origin===t.currentUrl.value.origin||e.origin===n||r.includes(e.origin)}function cO(){const{client:e,environment:{services:t},shop:{customerAccounts:n,storefrontDomains:r}}=_(),o=r?.map(l=>`https://${l}`)??[],i=[t.shopServer.url,...o];if(n.domain){const l=`https://${n.domain}`;i.push(l)}const a=e.unstable_getSerialization("loginUrl");return a&&i.push(`https://${new URL(a).host}`),i}function uO({children:e}){const{geolocation:t}=Qc(),{i18n:n,embed:r,checkout:o,observability:i,shop:a}=_(),l=ec({embedder:r?.embedder,shop:a}),c=to(),u=o.configuration.layout.isOnePage.value,d=nO()==="redesigned",p=x(y=>n.numberFormatter().format(y),[n]),{symbol:m,prefixed:f}=QP(n.currency,n),h=B(()=>oO(n),[n]),g=Yy();return s(YT,{currency:{code:n.currency,symbol:m,symbolPrefixed:f},embed:r?{embedder:r.embedder,interstitialBrandingEnabled:l}:void 0,formatNumber:p,geolocation:{countryCode:t.country.code},linkComponent:jv,locale:{direction:n.localeDirection,languageCode:n.locale},onePage:u,editor:c,redesignedChoiceLists:d,translate:h,announcementEmitter:{...g,close:()=>g.emit("closeAnnouncement")},logger:i,children:e})}const dO=ft("ValidationErrorsContext");function Jv(){const e=new Set;return t=>{const n=`${t.message}${t.target}`,r=e.has(n);return e.add(n),!r}}const Op="$.payments",Fp="$.cart.buyerIdentity",Bp="$.cart.deliveryGroups[0].deliveryAddress",Vp="$.cart.localizedField",Up="$.cart.billingAddress",pO="$.cart.poNumber";function Os(){const e=Ot(),{allViolations:t}=H(),n=ze("allViolations"),r=w(()=>n.value?[]:t.value?t.value.filter(o=>o.__typename==="UnprocessableTermViolation"&&tc.has(o.code)).map(o=>({message:o.localizedMessage||o.nonLocalizedMessage,target:o.target})):[]);return w(()=>{const o=[...e.validationErrors.value,...r.value].filter(Jv()),i=o.filter(({target:m})=>m?.startsWith(Bp)&&!!m.replace(`${Bp}.`,"")),a=o.filter(({target:m})=>m?.startsWith(Fp)&&!!m.replace(`${Fp}.`,"")),l=o.filter(({target:m})=>m?.startsWith(Op)&&!!m.replace(`${Op}.`,"")),c=o.filter(({target:m})=>m?.startsWith(Vp)&&!!m.replace(`${Vp}.`,"")),u=o.filter(({target:m})=>m?.startsWith(Up)&&!!m.replace(`${Up}.`,"")),d=o.filter(({target:m})=>m===pO),p=o.filter(m=>![...a,...i,...l,...c,...u,...d].includes(m));return{contactErrors:a,deliveryAddressErrors:i,paymentErrors:l,localizedFieldErrors:c,billingAddressErrors:u,poNumberErrors:d,globalErrors:p}})}function mO({children:e}){const{deliveryMethodsAddressErrors:t}=xt(),{validation:n}=_().checkout,{billingAddressErrors:r,poNumberError:o}=n,{emailInputError:i,phoneInputError:a}=n.contactErrors,{contactErrors:l,deliveryAddressErrors:c,billingAddressErrors:u,poNumberErrors:d,globalErrors:p}=Os().value,{shippingAddress:m}=se(),f=m.fields.countryCode.value,h=ZR(f),g=nx(),y=B(()=>({}),[]),v=x((b,C,I)=>{const S=b.value,k=E=>{b.value=E};!S&&I&&(k(I.message),y[C]=I.message),typeof S=="string"&&y[C]===S&&!I&&(k(void 0),delete y[C])},[y]);F(()=>{v(a,"phone",l.find(({target:b})=>b?.split(".")?.pop()==="phone")),v(i,"email",l.find(({target:b})=>b?.split(".")?.pop()==="email"))},[l,i,v,a]),F(()=>{Object.entries(t).forEach(([b,C])=>{let I=c.find(({target:T})=>{const A=T?.split(".").pop();return A?b==="postalCode"&&A==="zip"||b==="zoneCode"&&A==="provinceCode"||(b==="streetName"||b==="streetNumber")&&A==="address1"||(b==="neighborhood"||b==="line2")&&A==="address2"?!0:A===b:!1});const k=["streetName","streetNumber","line2","neighborhood"].includes(b),E=h?.includes(b);k&&!E&&I&&(I={...I,message:" "}),v(C,b,I)})},[c,t,h,v]),F(()=>{Object.entries(r).forEach(([b,C])=>{const I=u.find(({target:S})=>{const k=S?.split(".").pop();return k?b==="postalCode"&&k==="zip"||b==="zoneCode"&&k==="provinceCode"?!0:k===b:!1});v(C,`billing_${b}`,I)})},[r,u,v]),tr(b=>{b.type==="success"||b.type==="error"?g({errors:b.errors}):b.type==="invalid"&&g({reasons:b.reasons})}),F(()=>{v(o,"poNumber",d[0])},[v,o,d]);const P=B(()=>({globalErrors:p}),[p]);return s(dO.Provider,{value:P,children:e})}const fO=qe({load:()=>Ve(()=>import("./component-WalletApplePayLazy.DCe2EOoS.js"),__vite__mapDeps([69,1,2,3,4,5,70,6,71,41,48,57,7,72,73,61,74,8])).then(e=>e.ApplePaySessionLoader),renderLoading:({children:e})=>e,useError:hO});function hO(e){const{sessionLoadFailed:t}=Ye().inMemoryApplePayParts,{observability:n}=_();F(()=>{e&&(t.value=!0)},[e,n,t])}function gO(){const e=St();return w(()=>e.value?typeof window.ApplePaySession<"u":!1)}function yO(){const e=gO(),{availableWallets:t}=Ye(),n=We(t.some(({name:i})=>i==="APPLE_PAY")),r=V(!1),o=w(()=>(!r.current&&e.value&&n.value&&(r.current=!0),r.current));return s(ve,{when:o,children:s(fO,{})})}function Xv(){const{checkout:e}=_();return!e.configuration.showPayButton}const vO=6e4;function _O({enabled:e,onTimeout:t,timeout:n=vO}){const r=V(null),o=V(t);o.current=t,F(()=>
23{if(e)return r.current=setTimeout(()=>o.current(n),n),()=>{r.current&&clearTimeout(r.current)}},[e,n])}var go={Heading:"n8k95w1 n8k95w0 _1fragemws",textAlignVariant:{start:"n8k95wb n8k95w8 _1fragem126",center:"n8k95wc n8k95w9 _1fragem124",end:"n8k95wd n8k95wa _1fragem125"},displayVariant:{inline:"n8k95wf n8k95we _1fragem69",block:"n8k95wg"},levelVariant:{1:"n8k95w2",2:"n8k95w3",3:"n8k95w4",4:"n8k95w5",5:"n8k95w6",6:"n8k95w7"},visuallyHidden:"n8k95wh _1fragem121"};function Wt({id:e,children:t,accessibilityRole:n,level:r,textAlign:o,autoFocus:i,visibility:a,tabIndex:l,display:c="block"}){const u=gc(),d=r??u??0,p=u?`h${u}`:"h1",m=a==="hidden"?go.visuallyHidden:Y(go.Heading,o&&go.textAlignVariant[o],d?go.levelVariant[d]:void 0,c&&go.displayVariant[c]),f=V(null);return F(()=>{i&&f.current?.focus({preventScroll:!0})},[i]),s(p,{id:e,ref:f,tabIndex:i?-1:l,className:m,role:n==="heading"?void 0:n,children:t})}const bO="MQqMI",PO="Jue6i",SO="kpec9",xa={dialog:bO,background:PO,content:SO};function EO({children:e,dialogLabel:t,renderInlineUntilMounted:n=!1}){const{lock:r}=Xc(),o=Le(!1);F(()=>{r(),o.value=!0},[o,r]);const i=s("div",{className:xa.dialog,role:"dialog","aria-modal":!0,"aria-label":t,children:[s("div",{className:xa.background}),s("div",{className:xa.content,children:e})]});return s(q,{children:[n&&!o.value?s("div",{"aria-hidden":"true",children:i}):null,s(Sr,{children:s(Jc,{children:i})})]})}function CO({renderInlineUntilMounted:e=!1,useConsentCopy:t=!1}){const{i18n:n}=_(),r=t?n.translate("wallets.deceleration.one_more_step_to_complete_order"):n.translate("wallets.deceleration.one_more_step");return s(EO,{dialogLabel:r,renderInlineUntilMounted:e,children:s(Q,{gap:"large-400",alignItems:"center",children:[s(Pe,{children:s(no,{size:"large"})}),s(Wt,{level:2,textAlign:"center",children:r})]})})}const kO=3e3,IO=1e4;function AO({onTransitionComplete:e,useConsentCopy:t=!1}){return s(TO,{onTransitionComplete:e,useConsentCopy:t})}function TO({onTransitionComplete:e,useConsentCopy:t}){const{checkout:n,i18n:r}=_(),o=Xv(),{payNowButtonElement:i,payNowButtonSectionMounted:a}=Ds(),l=!!(i||o&&a),c=V(!1);l&&(c.current=!0);const u=n.configuration.layout.isOnePage,d=u.value,p=c.current,m=V(null),f=V(!1),h=V(!1),g=x(()=>{u.value&&(f.current||(f.current=!0,Lt({content:r.translate("wallets.errors.subscription_review_required"),role:"status"}),n.wallets.setIsDecelerating(!1),e()))},[r,u,e,n.wallets]);return _O({enabled:!0,onTimeout:()=>{h.current=!0,g()},timeout:IO}),F(()=>{if(m.current===null&&(m.current=Date.now()),h.current){g();return}if(!p)return;const y=Date.now()-m.current,v=Math.max(0,kO-y);if(v===0){g();return}const P=setTimeout(()=>{g()},v);return()=>clearTimeout(P)},[g,d,p]),s(CO,{renderInlineUntilMounted:!0,useConsentCopy:t})}function wO(e){const{shop:t,checkout:{configuration:n,identity:r}}=_(),o=r.current.value==="shopPay",i=t.hasFlagEnabled(In);return w(()=>IC({supportsOnePage:AC({isOnePage:n.layout.isOnePage.value,isApplePay3PageVaultedReviewEnabled:i,asPaymentMethod:e.value}),isShopPayActive:o}))}const LO=["address2","company","phone"];function Qv({addressErrors:e}){if(e.size!==1)return;const[t]=e.keys();if(t!==void 0)return RO(t)?t:void 0}function Zv({missingAddressField:e,violations:t}){return e==="company"&&t.some(({code:n})=>n==="DELIVERY_COMPANY_REQUIRED")}
23function nY({addressErrors:e,violations:t}){const n=Qv({addressErrors:e});if(!Zv({missingAddressField:n,violations:t}))return new Map(e);const r=new Map(e);return r.delete(n),r}function RO(e){return LO.includes(e)}function e_({paymentLines:e,paymentMethods:t}){if(!t?.some(o=>o.type==="wallet"&&o.name==="PAYPAL_EXPRESS"))return{status:"not_connected"};const r=Pt(e,"PAYPAL_EXPRESS");if(r&&nc(r)){const{walletContent:o}=r.method;return{status:"connected",email:o?.email??"",token:o?.token??""}}return{status:"not_connected"}}function xO({code:e}){return Kr.has(e)||Ao.has(e)||xC.has(e)||MC.has(e)||tc.has(e)||NC.has(e)||DC===e}function MO({violations:e,getAddressErrorsFromViolations:t}){const n=Array.from(e);if(n.length!==1)return!1;const r=t("shipping",n),o=Qv({addressErrors:r});return Zv({missingAddressField:o,violations:n})}function t_({isPayWithPayPalButton:e}){const{inMemoryPayPalParts:t}=Ye();return e?t.payWithPayPalButtonStatus:t.acceleratedCheckoutButtonStatus}function NO(){const{shop:e,i18n:t,checkout:{configuration:n}}=_(),{shippingAddress:r,paymentLines:o}=se(),i=r.value,a=H(),{value:l}=a.paymentMethods,{inMemoryPayPalParts:{paymentSheetError:c}}=Ye(),{details:u,loading:d}=Yt(i.countryCode),{value:p}=a.allViolations,m=tu(i.countryCode),f=e.hasFlagEnabled(rh),h=B(()=>LC({paymentLines:o.value,isOnePage:n.layout.isOnePage.value})?p?.filter(xO)??[]:[],[p,o,n.layout.isOnePage.value]),y=B(()=>f&&MO({violations:h,getAddressErrorsFromViolations:m}),[h,m,f])?void 0:h[0],v=c.value?.type===as,P=c.value?.type===oh,b=B(()=>{const C=RC(l,"PAYPAL_EXPRESS");if(v&&!C){const I=d?i.countryCode:u?.name;return I?t.translate("wallets.errors.unavailable.unavailable_for_c
23ountry",{walletName:t.translate("brand.paypal"),countryName:I}):t.translate("wallets.errors.unavailable.description",{walletName:t.translate("brand.paypal")})}},[u?.name,d,l,v,i.countryCode,t]);if(P){const C=t.translate("shipping_errors.unavailable_address_country");return{code:Qe.PaymentSheetViolations,tone:"critical",localizedMessage:C,nonLocalizedMessage:C,onDismiss:()=>{c.value=void 0}}}if(b)return{code:Qe.PaymentSheetViolations,tone:"info",localizedMessage:b,nonLocalizedMessage:b,onDismiss:()=>{c.value=void 0}};if(y)return{code:Qe.PaymentSheetViolations,tone:"critical",localizedMessage:t.translate("wallets.recovery_notice"),nonLocalizedMessage:t.translate("wallets.recovery_notice")}}function DO(){const{isInPayPalContextSignal:e}=Ye(),{i18n:t}=_(),n=t_({isPayWithPayPalButton:!0}),{inMemoryPayPalParts:{accountStatus:r}}=Ye();return w(()=>{if(e.value){if(n.value.status==="error")return t.translate("wallets.errors.unavailable.description",{walletName:t.translate("brand.paypal")});if(r.value.status==="error")return t.translate("wallets.errors.generic",{walletName:t.translate("brand.paypal")})}})}const rY=()=>{const{paymentLines:e}=se();return x(()=>{const t=e.value;e.value=jl(t,{method:{type:"wallet",name:"PAYPAL_EXPRESS"}})},[e])};function oY(){const e=Qn(),{checkout:t,shop:n}=_(),r=t.configuration.layout.isOnePage.value,o=n.hasFlagEnabled(wC),i=t.extensibility.ui.hasAtRiskPlacement;return w(()=>{if(r||o&&!i.value)return!1;const a=e.value.enabledDeliveryMethods.includes("PICK_UP");return!t.isShippingRequired.value||!a})}function iY(e){return!!e.value?.method.walletContent?.isVenmo}const sY=()=>{const{paymentLines:e}=se();return w(()=>Pt(e.value,"PAYPAL_EXPRESS"))},aY=()=>{const{paymentLines:e}=se();return w(()=>{const t=Pt(e.value,"PAYPAL_EXPRESS");return!!(t&&nc(t))})},lY=()=>{const{inMemoryPayPalParts:{accountStatus:e}}=Ye(),{progressing:t}=Mt(),n=n_();return w(()=>!!(n.value&&(e.value.status==="loading"||t.value)))},cY=()=>{const e=n_(),t=rc(),n=TC(),r=ti();return w(()=>!n.value&&(t.value||r.value&&r.value.amount<=0)?!1:!!e.value)},n_=()=>{const{paymentLines:e}=se();return w(()=>{const t=Pt(e.value,"PAYPAL_EXPRESS");return!!(t&&!nc(t))})};function OO(e){const{parts:t}=Je(),{paymentMethods:n}=H();$e(()=>{if(e.peek().status==="connected")return;const r=e_({paymentLines:t.paymentLines.value,paymentMethods:n.value});r.status==="connected"&&(e.value=r)})}const zp=new Map,Ma=new Map,Hp=new Map,FO=6e4;function BO(e){const{environment:t,embed:n,observability:r,source:{checkoutSessionIdentifier:o}}=_(),i=H().paymentMethods,a=!!n?.isFlagshipPartner&&!Mf(n?.embedder),l=i.value?.find(m=>m.type==="wallet"&&m.name==="SHOP_PAY"),u=l?.placements?.includes("ACCELERATED_CHECKOUT")?l?.eligibilityToken:void 0,d=t.services.shopServer.url,p=e.buttonStatus;F(()=>{if(!a){p.value={status:"rendered"};return}if(!u){p.value={status:"not_eligible"};return}const f=`${d}|${o||u}`,h=zp.get(f);if(h){p.value=h;return}const g=Hp.get(d)??0;if(Date.now()<g){p.value={status:"error"};return}let y=!1;async function v(){try{const b=await fetch(`${d}/pay/checkout_eligibility/check`,{method:"POST",credentials:"omit",headers:{"Content-Type":"application/json"},body:JSON.stringify({token:u})});if(!b.ok)return b.status===429&&Hp.set(d,Date.now()+FO),r.counter({name:"express_checkout_shop_pay_eligibility",value:1,attributes:{result:"fail_closed",reason:`http_${b.status}`}}),{status:{status:"error"},definitive:!1};let C;try{C=await b.json()}catch{return r.counter({name:"express_checkout_shop_pay_eligibility",value:1,attributes:{result:"not_eligible",reason:"malformed_payload_fail_closed"}}),{status:{status:"not_eligible"},definitive:!1}}const I=C.eligible===!0||C.eligible===!1,k=C.eligible===!1||!I?{status:"not_eligible"}:{status:"rendered"};return r.counter({name:"express_checkout_shop_pay_eligibility",value:1,attributes:{result:k.status,...!I&&{reason:"malformed_payload_fail_closed"}}}),{status:k,definitive:I}}catch{return r.counter({name:"express_checkout_shop_pay_eligibility",value:1,attributes:{result:"fail_closed",reason:"network_error"}}),{status:{status:"error"},definitive:!1}}}let P=Ma.get(f);return P||(P=v().then(({status:b,definitive:C})=>(C&&zp.set(f,b),Ma.delete(f),b)),Ma.set(f,P)),P.then(b=>{y||(p.value=b)}).catch(()=>{}),()=>{y=!0}},[a,u,o,d,p,r])}function VO(e){const t=se().paymentLines;return w(()=>{const n=e.lastClicked.value;return!!Pt(t.value,"PAYPAL_EXPRESS")||n==="PAYPAL_EXPRESS"})}function UO(){const{checkout:{proposal:{negotiated:e,proposed:t},wallets:n},observability:r}=_(),o=n.escalatedWallet.value;F(()=>
23{if(t.email.value)return;const i=e.fields.paymentLines.value?.lines??[];let a;switch(o){case xe.AmazonPay:case xe.BuyWithPrime:a=zO(i,o);break;case"PAYPAL_EXPRESS":case"VENMO":a=HO(i);break;default:return}a?(t.email.value=a,r.log("checkout_wallets_email_recovery","[useRecoverWalletContact] Detected a missing email during a wallet flow and recovered it",{escalatedWallet:o,status:"success"})):r.log("checkout_wallets_email_recovery","[useRecoverWalletContact] Detected a missing email during a wallet flow but was unable to recover it",{escalatedWallet:o,paymentLines:i,status:"failure"})},[])}function zO(e,t){const n=OC(e,t);return n?n.method.walletParams?.email:void 0}function HO(e){const t=Pt(e,"PAYPAL_EXPRESS");if(!(!t||!t.method.walletContent))return t.method.walletContent.email}function qO(e){const{observability:t,router:n}=_(),r=n.currentUrl.value,[o,i]=oe(r.normalizedPath);r.normalizedPath!==o&&(i(r.normalizedPath),e.forEach(({walletName:a,...l})=>{("signal"in l?[l.signal]:l.signals).forEach(c=>{if(c.peek().status!=="error")return;t.counter({name:"wallet_button_status_reset",value:1,attributes:{walletName:a}});const d={status:"not_rendered"};c.value=d})}))}class GO extends bn{constructor(){super(...arguments),this.name="DuplicateWalletError",this.defaultGroupingHash="DuplicateWalletError"}}function $O({asPaymentMethod:e,useConsentCopy:t,isCaliforniaBillingOrShippingAddress:n,hasSubscription:r,transition:o,isABTestActive:i}){return e?!1:t||n&&r?!0:o==="storefront_redirect"&&(n||!i)}function WO({children:e}){const{checkout:t,observability:n,router:r,i18n:o,shop:i,source:a}=_(),l=r.currentUrl.value,c=t.configuration.layout.isOnePage.value,u=i.hasFlagEnabled(In),d=hi(),{forceOnePageCheckoutLayout:p}=ws(In),m=Le(l.searchParams.has(is)&&!t.wallets.hasConsumedApplePaySubscriptionReviewParam.value),{shippingAddress:f}=se(),h=zf(a),g=ki(hn.PayPal,{scope:h}),y=ki(hn.GooglePay,{scope:h}),v=ki(hn.AmazonPay,{scope:h}),P=ki(hn.ApplePay,{scope:h}),b=VO(t.wallets),C=Le(void 0),I=Ar({sdkStatus:{status:"idle"},buttonStatus:{status:"not_rendered"},paymentSheetError:void 0,paymentSheetOpenPromise:void 0,paymentSheetOpenPromiseResolve:void 0}),S=Ar({acceleratedCheckoutButtonStatus:{status:"not_rendered"},payWithPayPalButtonStatus:{status:"not_rendered"},accountStatus:e_({paymentLines:t.proposal.proposed.paymentLines.peek(),paymentMethods:t.proposal.negotiated.fields.paymentMethods.peek()}),isLoadingPaymentSheet:!1,isApproving:!1,paymentSheetError:void 0}),k=Ar({buttonStatus:{status:"not_rendered"}}),E=Ar({buttonStatus:{status:"not_rendered"}}),T=hy(),A=Rf(),R=Ar({asPaymentMethod:!1,buttonStatus:{status:"not_rendered"},paymentSheetError:void 0,subscriptionReviewTransition:m.value&&Ho({applePaySubscriptionsDecelerationActive:d,applePayThreePageVaultedReviewEnabled:u,isOnePageCheckout:c})&&FC({isApplePaySubscriptionsDecelerationActive:d,isApplePaySubscriptionReviewLayoutSupported:c||i.hasFlagEnabled(In),hasSubscriptionReviewQueryParam:m.value,isABTestActive:i.hasFlagEnabled(Uo),variant:T,isCaliforniaBillingOrShippingAddress:A.value})?"storefront_redirect":void 0,prefetchPaymentSession:void 0,initialDeliveryIdentifier:void 0,isLoadingPaymentSheet:!1,sessionLoadFailed:!1,requirePhoneOnNextAttempt:!1,requireBillingPhoneOnNextAttempt:!1,expiresAt:void 0,preCompletionHandler:void 0}),L=Le(void 0),M=Ar({sdkStatus:{status:"idle"},buttonStatus:{status:"not_rendered"},buyWithPrimeButtonStatus:{status:"not_rendered"},buyerDetailsContentLoaded:!1,hasPaymentSheetError:!1,addressError:void 0,buyerDetails:{loading:!1,error:!1,details:void 0},serializedAmazonParams:null}),D=Le(!1),N=Le(void 0),{queryParam:U}=Sy({applePayPaymentSheetError:R.paymentSheetError,applePaySubscriptionReviewTransition:R.subscriptionReviewTransition}),z=wO(R.asPaymentMethod).value,O=t.configuration.addressSettings.nonBillingAddressSettings.value.isRequired("company");OO(S.accountStatus),BO(E),UO();const K=Cy(E),X=Ty({inMemoryGooglePayParts:I,inMemoryPayPalParts:S,inMemoryVenmoParts:k,inMemoryApplePayParts:R,inMemoryAmazonPayParts:M,didIncrementUnusablePartialAddressMetric:D}),ne=B(()=>X?.filter(({placements:j,name:Z})=>(Z==="APPLE_PAY"||Z==="GOOGLE_PAY")&&U==="localization_extension_field_error"||Z==="APPLE_PAY"&&O&&!z?!1:Ey(Z,j,K)),[X,U,O,z,K]),$=We(ne);F(()=>{ne?.length&&performance.mark(BC)},[]);const J=ne?.map(j=>j.name)||[],ee=J.join(",");F(()=>{new Set(J).size!==J.length&&n.error(new GO("Duplicate accelerated wallet(s) found in checkout",{metadata:{duplicatedWallets:[...new Set(J.filter((Z,fe)=>J.indexOf(Z)!==fe))],allWalletNames:J}}))},[ee,n]);const te=ne?.length||0,W=t.wallets.activeSession.value?.wallet!==void 0&&t.wallets.activeSession.value.wallet!=="APPLE_PAY"&&!!t.wallets.isDeceleratingSignal?.value,he=R.subscriptionReviewTransition.value,re=w(()=>oc({checkout:t})),de=re.value&&VC(T),le=$O({asPaymentMethod:R.asPaymentMethod.value,useConsentCopy:de,isCaliforniaBillingOrShippingAddress:A.value,hasSubscription:re.value,transition:he,isABTestActive:i.hasFlagEnabled(Uo)}),_e=he!==void 0&&!W&&le&&Ho({applePaySubscriptionsDecelerationActive:d,applePayThreePageVaultedReviewEnabled:u,isOnePageCheckout:c}),ae=t.wallets.hasActiveApplePaySubscriptionReview.value&&le&&!A.value&&he===void 0;F(()=>{le||(t.wallets.setHasActiveApplePaySubscriptionReview(!1),he!==void 0&&(R.subscriptionReviewTransition.value=void 0,W||t.wallets.setIsDecelerating(!1)))},[he,t.wallets,R.subscriptionReviewTransition,W,le]),F(()=>{he!=="storefront_redirect"||!_e||c||p({wallet:"APPLE_PAY",reason:"subscriptions",asPaymentMethod:!0})},[he,p,c,_e]);const ke=i.hasFlagEnabled(ss)&&!c&&l.searchParams.has(UC);F(()=>{ke&&(t.unstable_forceCheckoutLayoutToOnePage(),_y(n,{wallet:"GOOG
23LE_PAY",reason:"subscriptions",asPaymentMethod:!0,result:"success"}),Lt({content:o.translate("wallets.errors.subscription_review_required"),role:"status"}))},[t,o,n,ke]);const we=x(()=>{m.value=!1,R.subscriptionReviewTransition.value=void 0},[m,R.subscriptionReviewTransition]);qO([{walletName:"applepay",signal:R.buttonStatus},{walletName:"amazonpay",signal:M.buttonStatus},{walletName:"buy_with_prime",signal:M.buyWithPrimeButtonStatus},{walletName:"googlepay",signal:I.buttonStatus},{walletName:"paypal",signals:[S.acceleratedCheckoutButtonStatus,S.payWithPayPalButtonStatus]}]),$e(()=>{const j=f.value,Z=t.wallets.activeSession.value;Z?.wallet==="APPLE_PAY"&&n.log("wallets_shipping_address_update","Shipping address is updated during Apple Pay session",{countryCode:j?.countryCode,isPostalCodePadded:xf(j?.postalCode,j?.countryCode),asPaymentMethod:Z.asPaymentMethod})});const Ie=B(()=>({availableWallets:X,walletUsedForSubmissionSignal:C,persistedPayPalSignal:g,inMemoryPayPalParts:S,inMemoryVenmoParts:k,persistedGooglePaySignal:y,inMemoryGooglePayParts:I,inMemoryApplePayParts:R,applePaySessionHandler:L,persistedApplePaySignal:P,persistedAmazonSignal:v,inMemoryAmazonPayParts:M,inMemoryShopPayParts:E,didIncrementUnusablePartialAddressMetric:D,acceleratedWalletPaymentMethods:$,isInPayPalContextSignal:b,buttonCount:te,receiptErrorSignal:N}),[X,g,y,P,v,$,te,k,C,I,S,R,L,M,E,N,b,D]);return s(zC.Provider,{value:Ie,children:[_e&&s(AO,{onTransitionComplete:we,useConsentCopy:de}),s("span",{role:"status","aria-live":"polite","aria-atomic":"true",className:bt({screenReaders:"only"}),children:ae?o.translate("wallets.errors.subscription_review_required"):""}),e]})}const YO=Jn(function({children:t,AlternativeProposal:n}){return s(zD,{children:s(UD,{children:s(jO,{AlternativeProposal:n,children:[s(ML,{children:t}),s(cT,{})]})})})});function jO({children:e,AlternativeProposal:t}){const{shop:n,checkout:r}=_(),o=r.unstable_graphqlDataRequestInfo?.httpRequestInfo,i=B(()=>{const{country:c,zone:u,coordinates:d}=o?.geolocation??{};return o?{geolocation:{default:c??void 0,country:c??n.country,zone:u??void 0,coordinates:d?{longitude:d.longitude,latitude:d.latitude}:void 0},shop:{}}:void 0},[o,n]),a=typeof window>"u"?null:s(q,{children:[s(AD,{}),s(rx,{}),s(sD,{}),s(xD,{}),s(FD,{})]}),l=t??R1;return s(dy.Provider,{value:i,children:s(B1,{children:s(uO,{children:s(V1,{children:s(HC,{children:s(l,{children:s(gD,{children:s(WO,{children:s(iD,{children:s(mO,{children:s(ly,{children:s(Y1,{children:s(JL,{children:s(O1,{children:s(M0,{children:s(kD,{children:s(Wx,{children:s(z1,{children:s(jx,{children:s(eO,{children:[s(WR,{}),s(KO,{}),s(vD,{}),s(yO,{}),e,a]})})})})})})})})})})})})})})})})})})})})}function KO(){const e=V(!1),t=_(),{embed:n,webMcp:r}=t,o=Ut(pc),i=Je(),{resetAddressErrors:a}=eu(i.context.deliveryMethodsAddressErrors),l=V({journeyProgression:o,negotiator:i,clearShippingAddressErrors:a});if(l.current={journeyProgression:o,negotiator:i,clearShippingAddressErrors:a},!e.current){e.current=!0;const c={get completing(){return l.current.journeyProgression.completing},get progressing(){return l.current.journeyProgression.progressing},detour:(...d)=>l.current.journeyProgression.detour(...d),progress:(...d)=>l.current.journeyProgression.progress(...d),prefetch:()=>l.current.journeyProgression.prefetch(),negotiate:d=>l.current.journeyProgression.negotiate(d)},u=()=>l.current.negotiator.waitForPendingNegotiations();n?.unstable_providePreactContext({journey:c,waitForPendingNegotiations:u,waitForSkeletonRemoved:()=>Ky(),negotiationContext:i.context}),r?.unstable_providePreactContext({loadPickupLocalityServices:()=>ct(()=>Ve(()=>import("./web-mcp-pickup-locality.IS9bxZGr.js"),__vite__mapDeps([75,2,1,3,4,5,76,6,77,78,79,80,81,82,50,59,60,61,83,43,44,45,7,8]))).then(({createPickupLocalityServices:d})=>d(t)),journey:c,clearShippingAddressErrors:()=>l.current.clearShippingAddressErrors(),get negotiator(){return l.current.negotiator},waitForPendingNegotiations:u})}return null}const JO=qe({displayName:"DevTools",load:()=>Ve(()=>import("./DevTools.BKs2AE3N.js"),__vite__mapDeps([84,1,2,3,4,5,6,7,8,85])),suspense:!0}),XO=qe({displayName:"EditorBridge",suspense:!1,load:()=>Ve(()=>import("./EditorBridge.BjRyFVc_.js"),__vite__mapDeps([86,2,1,3,4,5,6,7,8]))});function QO(e,t){e.error(t,{metadata:{privacyPreferences:{component:"PrivacyPreferences",failure:"lazy_load"}}})}function ZO(e){const{observability:t}=_();F(()=>{e&&QO(t,e)},[e,t])}const eF=qe({id:()=>"PrivacyPreferences",displayName:"PrivacyPreferences",suspense:!1,useError:ZO,load:()=>ct(()=>Ve(async()=>{const{deferredPrivacyComponents:e}=await import("./DeferredPrivacy.D0Rwfwql.js");return{deferredPrivacyComponents:e}},__vite__mapDeps([87,1,2,3,4,5,20,21,36,37,6,7,8])).then(({deferredPrivacyComponents:e})=>e.PrivacyPreferences))});function tF(e,t){e.error(t,{metadata:{privacySheet:{component:"PrivacySheet",failure:"lazy_load"}}})}function nF(e){const{observability:t}=_();F(()=>{e&&tF(t,e)},[e,t])}const rF=qe({id:()=>"PrivacySheet",displayName:"PrivacySheet",suspense:!1,useError:nF,load:()=>ct(()=>Ve(async()=>{const{deferredPrivacyComponents:e}=await import("./DeferredPrivacy.D0Rwfwql.js");return{deferredPrivacyComponents:e}},__vite__mapDeps([87,1,2,3,4,5,20,21,36,37,6,7,8])).then(({deferredPrivacyComponents:e})=>e.PrivacySheet))});async function oF(e,t,n){const{universal_redirect_enabled:r,universal_redirect_indicator:o}=n,i={},a=qC(e.searchParams);if((!o||a)&&t.type!=="simulated"&&t.checkoutSessionIdentifier!==null&&e.searchParams.has(nh)&&(i.disable_automatic_redirect=t.checkoutSessionIdentifier),r&&e.searchParams.get("auto_redirect")==="false"&&(i.block_universal_redirect=!0),Object.keys(i).length>0){const l={...i,checkout_version:"c1",edge_redirect:e.searchParams.get("edge_redirect")==="true"};fetch("/shopify_pay/accelerated_checkout",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(l),credentials:"include"})}}function iF({children:e}){return s(q,{children:e})}function sF({children:e}){const t=B(()=>new URL(window.location.href),[]),{client:n,source:r}=_(),o=n.unstable_getSerialization("shopPayConfig");return F(()=>{o&&oF(t,r,{universal_redirect_enabled:o.universal_redirect_enabled,universal_redirect_indicator:o.universal_redirect_indicator})},[t,r,o]),s(q,{children:e})}function aF({children:e}){return typeof window>"u"?s(iF,{children:e}):s(sF,{children:e})}function lF({children:e,context:t,...n}){const r=typeof window>"u",o=St();return s($C.Provider,{value:t,children:s(Kc,{target:"cart",children:s(aF,{children:s(ZP,{router:t.router,children:s(YO,{...n,children:s(GC,{children:[s(hR,{children:e}),s(_R,{}),!r&&s(gR,{}),s(ve,{when:o,children:[s(rF,{}),s(eF,{})]}),s(cF,{}),$l()&&s(XO,{})]})})})})})})}function cF(){const e=St();return to(),s(ve,{when:()=>e.value&&!1,children:s(JO,{})})}function uF(){const{shop:e,checkout:t}=_(),n=hi(),r=e.hasFlagEnabled(In),{inMemoryApplePayParts:{subscriptionReviewTransition:o}}=Ye();return w(()=>o.value!==void 0&&Ho({applePaySubscriptionsDecelerationActive:n,applePayThreePageVaultedReviewEnabled:r,isOnePageCheckout:t.configuration.layout.isOnePage.value}))}function dF(){const{checkout:{wallets:e}}=_(),t=uF();return w(()=>{const n=e.activeSession.value?.wallet!==void 0&&e.activeSession.value.wallet!=="APPLE_PAY"&&!!e.isDeceleratingSignal?.value;return t.value&&!n})}
23function Et(e){return[e].flat(99).filter(Boolean).length>0}var Tr={Divider:"mg7oix2 mg7oix0 _1fragemws mg7oix1",alignmentVariant:{start:"mg7oixc mg7oixb mg7oixa _1fragem64 _1fragem19 _1fragema",center:"mg7oixd mg7oixb mg7oixa _1fragem64 _1fragem19 _1fragema",end:"mg7oixe mg7oixb mg7oixa _1fragem64 _1fragem19 _1fragema"},borderWidthVariant:{base:"mg7oixf",large:"mg7oixg","large-100":"mg7oixh","large-200":"mg7oixi"},styleVariant:{base:"mg7oix3",dashed:"mg7oix4",dotted:"mg7oix5"},contentAlignmentVariant:{start:"mg7oixj",center:"mg7oixk",end:"mg7oixl"},directionVariant:{inline:"mg7oix8 mg7oix6 _1fragemzf",block:"mg7oix9 mg7oix7 _1fragem2s"}};function jr({id:e,borderStyle:t="base",borderWidth:n="base",direction:r="inline",accessibilityRole:o="separator",alignment:i="center",children:a}){const l=Et(a);return s("div",{role:l?void 0:o,className:Y(Tr.Divider,Tr.directionVariant[r],l&&Tr.alignmentVariant[i],Tr.borderWidthVariant[n],Tr.styleVariant[t]),id:e,children:l&&s("div",{className:Y(Tr.contentAlignmentVariant[i]),children:[a,o==="separator"&&s("span",{role:"separator"})]})})}function pF(e){let t=0,n=!0;const r=new Set;return function(){const[i,a]=oe(()=>{if(t===0)return 0;const P=performance.now()-t;return P<e?e-P:0}),[l,c]=oe(!0),u=V(),[d,p]=oe(!1),m=x(()=>{for(const v of r)v(!1)},[]),f=x(()=>{for(const v of r)v(!0)},[]),h=x(()=>{m(),p(!0)},[m]);F(()=>{d&&f()},[d,f]);const g=x(v=>{r.add(c);const P=v.timeStamp-t;a(P)},[]),y=x(v=>{t=v.timeStamp,r.add(c),n&&(n=!1,u.current=setTimeout(h,e))},[h]);return F(()=>(r.add(c),()=>{r.delete(c),u.current&&clearTimeout(u.current)}),[]),{animationEnabled:l,delay:i,onAnimationStart:g,onAnimationIteration:y}}}const pu=4e3,r_=pF(pu);var Vn={Skeleton:"_1sg44lm4 _1sg44lm3 _1fragemvo _1fragem12k _1fragem12f _1fragem12r",Wrapper:"_1sg44lma _1sg44lm9 _1fragemvo",animation:"_1sg44lm6",inline:"_1sg44lm7",hidden:"_1sg44lm8",vars:{animationDelay:"var(--_1sg44lm0)",animationDuration:"var(--_1sg44lm1)",aspectRatio:"var(--_1sg44lm2)"}};const mF=100;function Jo({contentDisplay:e="inline",aspectRatio:t,inlineSize:n,blockSize:r,children:o,id:i,delay:a=!0}){const l=e==="inline"?"span":"div",{className:c,style:u}=Tt({blockSize:r,inlineSize:WC(n,y=>{if(y===void 0){if(!Et(o))return"100%";if(e==="block")return"fitContent"}return y})},{transforms:{inlineSize:y=>qo(y,{fitContent:!0,auto:!0})}}),[d,p]=oe(a);F(()=>{const y=setTimeout(()=>p(!1),mF);return()=>{clearTimeout(y)}},[]);const{animationEnabled:m,delay:f,onAnimationStart:h,onAnimationIteration:g}=r_();return s(l,{className:Y(Vn.Skeleton,e==="inline"&&Vn.inline,d&&Vn.hidden,m&&Vn.animation,c),style:{...Jt({[Vn.vars.aspectRatio]:t?.toString()??"",[Vn.vars.animationDelay]:`${f}ms`,[Vn.vars.animationDuration]:`${pu}ms`}),...u},"aria-hidden":"true",onAnimationStart:h,onAnimationIteration:g,id:i,children:s(l,{className:Y(Vn.Wrapper,c),style:u,children:o})})}const fF=new Map([["small","10ch"],["base","20ch"],["large","30ch"]]);function mu({children:e,delay:t,inlineSize:n,id:r,...o}){return s(G,{...o,children:s(Jo,{delay:t,inlineSize:fF.get(n??"small"),id:r,children:e})})}const hF=1,Na=300;function gF(e,t,n){const r=n??hF;let o,i;return e?(o=e,i=e/r):t&&(o=t,i=t/r),n!==void 0&&o!==void 0&&i!==void 0&&i>Na&&(o*=Na/i,i=Na),{width:o,height:i}}const yF="gP50U",vF={Logo:yF};function o_({width:e}){const{header:{logo:t}}=Fe(),{shop:n}=_(),{width:r,height:o}=gF(t?.maxWidth,e,t?.aspectRatio);return s("img",{alt:t?.altText||n.name,className:vF.Logo,src:t?.image,width:r,height:o})}const Xo=He(void 0);function Da({children:e,style:t}){const{rendered:n}=Ee(Xo)??{},r=B(()=>({pending:t,rendered:n}),[t,n]);return s(Xo.Provider,{value:r,children:e})}function i_({children:e}){const{pending:t}=Ee(Xo)??{},n=B(()=>({pending:void 0,rendered:t}),[t]);return s(Xo.Provider,{value:n,children:e})}function _F(){return Ee(Xo)??{}}function bF(){return YC(_F().pending??{})}const PF="INFORMATION1",SF="ORDER_STATUS1";function fu(){return Ee(wy)}function uY({currentDetour:e}){return e?.type==="thankYou"?SF:PF}function EF({page:e,negotiatedState:t,deactivatedExtensionIds:n,detour:r,placementReferences:o,sourceType:i}){const a=e&&jC(e,t),l=e&&qx(),c=r&&KC(r),u=r&&$x(r),d=r?.type==="thankYou",p=c??a??new Set,m=u??l??new Set;return h=>{const{id:g,extensionPoint:y,placementReference:v}=h;if(n.has(g)||!JC(h,{sourceType:i,isThankYou:d}))return!1;const P=XC(y.target);return!(P==null||(e||r)&&!p.has(P)||ls(P)&&(!v||!o.supported.has(v)||(e||r)&&!m.has(v)))}}function dY(e,t,n,r,o){return e==null?()=>!1:QC(zo(e.features,t),n,r,o)}const s_=He([]),CF=He({deactivatedExtensionIds:new Set,addDeactivatedExtension:()=>{}}),a_=He(null);function kF(){const{deactivatedExtensionIds:e}=IF(),{currentPage:t,currentDetour:n}=Ce().value,{source:r}=_(),o=fu(),i=Je();return EF({page:t,negotiatedState:i.current.peek(),deactivatedExtensionIds:e,detour:n,placementReferences:o,sourceType:r.type})}function l_(e,t,...[n]){const{checkout:{extensibility:r}}=_(),o=kF(),i=Ee(a_),a=fu();return B(()=>{const l=ls(t)&&n?{target:t,placements:a,placementReference:n}:{target:t};return e.filter(c=>i===null||i.has(os(c.extensionPoint.target))).filter(c=>r.ui.unstable_isTargetMatch(c,l)).filter(o)},[o,i,e,t,n,a,r])}function it(e,...[t]){const{checkout:{extensibility:n},shop:r}=_(),o=r.hasFlagEnabled(ZC),i=fu(),a=V([]),l=Ee(s_),c=n.ui.search().value,u=l_([...c,...l],e,t),p=B(()=>
23{if(o)return n.customFields.search(ls(e)&&t?{target:e,placements:i,placementReference:t}:{target:e})},[n,o,e,t,i])?.value,m=B(()=>(p??[]).map(h=>ll("customField",h)),[p]),f=B(()=>ek([...u.map(h=>ll("uiExtension",h)),...m]),[u,m]);return n.ui.enabled.value?f.length>0?f:a.current:m.length>0?m:a.current}function pY(e,t){const n=TF();return x(r=>{if(!e.length)return Promise.resolve(void 0);const o=n.get(e[0],t);return Promise.resolve(o.run(r))},[n,e,t])}function mY(e,t){const{checkout:{extensibility:n}}=_(),r=V([]),o=Ee(s_),i=l_([...t,...o],e),a=B(()=>i.map(l=>ll("uiExtension",l)),[i]);return n.ui.required.value&&!n.ui.enabled.value?r.current:a}function IF(){return Ee(CF)}const AF=He({get:()=>{},findAll:()=>[],blockingExtensions:It(()=>[])});function TF(){return Ee(AF)}function wF({visibleTargets:e,children:t}){const n=B(()=>new Set(e),[e]);return s(a_.Provider,{value:n,children:t})}function qp(e){return Array.from(e.labels||[]).map(t=>t.textContent).join("")}function Hn(e){return e instanceof HTMLInputElement&&(e.type==="checkbox"||e.type==="radio")?e.checked.toString():e.value}function LF(e){if(e.target instanceof HTMLInputElement||e.target instanceof HTMLSelectElement){try{if(e.target.closest("*:-webkit-autofill")===e.target)return"native"}catch{}if(!e.isTrusted)return e.target?.id?.startsWith("autofill_")?"honeypot":"other"}}const c_={screenX:0,screenY:0,pageX:0,pageY:0,offsetX:0,offsetY:0,movementX:0,movementY:0,clientX:0,clientY:0},RF=Object.keys(c_),u_=He(null);function co(){const e=Ee(u_);return x(t=>n=>{if(n&&e){if(n instanceof HTMLAnchorElement||n instanceof HTMLButtonElement)e.set(n,t);else if(n instanceof Element){const r=n.querySelector("button, a");e.set(r??n,t)}}},[e])}function yi({section:e,children:t}){if(typeof window>"u")return s("div",{children:t});const n=wn(),r=V(null),o=B(()=>new WeakMap,[]),i=V(null);function a(d){const p=d.target.closest("a, button, input, select");if(!p||i.current===p)return;i.current=p;const{element:m,shouldCaptureEvent:f}=Ai(p,e,o);f&&n("dom_input_focused",{element:m,timestamp:new Date})}Hg(r,d=>a({target:d}));function l(d){const p=d.target.closest("a, button, input, select");if(!p)return;i.current===p&&(i.current=null);const{element:m,shouldCaptureEvent:f}=Ai(p,e,o);f&&n("dom_input_blurred",{element:m,timestamp:new Date})}function c(d){const p=d.target;if(!(p instanceof Element))return;const m=p.closest("a, button"),f=p.closest("input, select"),h=m??f;if(!h&&!(p instanceof HTMLElement))return;const{element:g,shouldCaptureEvent:y}=Ai(h??p,e,o);y&&n("dom_clicked",{element:g,...c_,...Sf(d.nativeEvent,RF),timestamp:new Date})}function u(d){const p=d.target?.closest("a, button, input, select");if(!p)return;const{element:m,shouldCaptureEvent:f}=Ai(p,e,o);f&&n("dom_input_changed",{element:m,timestamp:new Date})}return s(u_.Provider,{value:o,children:s("div",{ref:r,onFocusCapture:a,onBlurCapture:l,onClickCapture:c,onChangeCapture:u,children:t})})}function Ai(e,t,n){const r=e instanceof HTMLAnchorElement||e instanceof HTMLButtonElement||e instanceof HTMLInputElement||e instanceof HTMLSelectElement;let o=null;o=r?e.type:null;let i=`${t}_`,a=null,l=null;r&&"href"in e&&(l=e.href);let c=!0;if(e instanceof HTMLInputElement&&e.type==="radio")i+=e.name.replace(/[A-Z]/g,(d,p)=>`${p===0?"":"_"}${d.toLowerCase()}`),a=e.id.split("-").slice(-1)[0].toLowerCase();else if(e instanceof HTMLInputElement||e instanceof HTMLSelectElement)i+=e.name.replace(/[A-Z]/g,(u,d)=>`${d===0?"":"_"}${u.toLowerCase()}
23`),a=Hn(e);else{const u=d_(e,n);u?i+=u:c=!1}return i=i.replace(/-/g,"_"),{element:{id:i,tagName:e.tagName,type:o,value:a,...l&&{href:l},name:null},shouldCaptureEvent:c}}function d_(e,t){if(!(e===null||t===null))return t.has(e)?t.get(e):d_(e.parentElement,t)}const xF=new Set(["firstName","lastName","company","address1","address2","city","countryCode","zoneCode","province","zone","postalCode","phone","streetNumber","streetName","neighborhood","line2","district","subdistrict"]);function MF(e){const{key:t}=e;return typeof t!="string"?!1:t.length===1||t==="Backspace"||t==="Delete"}function NF(e){const t=e.closest("#shippingAddressForm, #billingAddressForm, #shopPayAddressForm");if(t?.id==="shippingAddressForm")return"shipping";if(t?.id==="billingAddressForm")return"billing";if(t?.id==="shopPayAddressForm")return"shipping"}function DF(e){return NF(e)}function OF(e){return e.closest("#shippingAddressForm, #billingAddressForm, #shopPayAddressForm")?.querySelector('select[name="countryCode"], input[name="countryCode"], input[name="country"]')?.value||void 0}function FF(e){return!e.id.startsWith("autofill_")&&xF.has(e.name)}function Fs({section:e,children:t}){if(typeof window>"u")return s("div",{children:t});const{checkout:{address:{autofill:n},identity:r},observability:o,userEvents:i,router:a,shop:{id:l},shopPay:c,source:u}=_(),d=a.currentUrl.value,{currentFocus:p}=Ce().value,m=wn(),f=ry(),h=O0(),g=V(null),y=V(new WeakMap),v=V(new WeakMap),P=Hl(d,{isShopPayActive:r.current.value==="shopPay",shopPay:c});function b(L){const{name:M,tagName:D,type:N}=L,U=qp(L);m("change",{element:{...U&&{label:U},...M&&{name:M},tagName:D,type:N,value:Hn(L)},section:e,timestamp:new Date})}function C(L,{recoveredAutofocus:M=!1}={}){const D=p.peek();p.value=e,!M&&(L.target instanceof HTMLInputElement||L.target instanceof HTMLSelectElement)&&y.current.set(L.target,Hn(L.target)),!M&&L.target instanceof HTMLInputElement&&L.target.name!=="email"&&h(P),D!==e&&(m("sectionInteraction",{section:e,timestamp:new Date}),f({type:"section_interaction",section:e}))}Hg(g,L=>C({target:L},{recoveredAutofocus:!0}));function I(L){if(L.target instanceof HTMLInputElement||L.target instanceof HTMLSelectElement){const M=y.current.get(L.target),D=Hn(L.target);y.current.delete(L.target),h(P),M!==D&&b(L.target)}}function S(L){if(!(L.target instanceof Element))return;const M=L.target.closest("a, button"),D=L.target.closest("input, select");if((M??D)&&M){const{tagName:U,textContent:z,id:O}=M,K=(z??"").trim(),X=M.dataset.eventName||K||O;h(P),m("click",{element:{tagName:U,textContent:X??void 0},section:e,timestamp:new Date})}}function k(L){L.target instanceof HTMLInputElement&&v.current.set(L.target,Hn(L.target))}function E(L){if(L.target instanceof HTMLInputElement){h(P);const M=v.current.get(L.target);v.current.delete(L.target),M!==void 0&&M!==Hn(L.target)&&MF(L)&&T(L.target)}}function T(L){if(!FF(L))return;const M=DF(L);if(!M||!n.hasDetected(M)||n.hasEmittedUserEditedAfterAutofill(M))return;const D=yr(l),N=D?Number.parseInt(D,10):void 0;if(N===void 0||Number.isNaN(N)){o.log("autofill_shop_id_parse_failed","Skipped user-edited-after-autofill because shop gid could not be parsed",{shopGid:l,addressType:M});return}i.monorailEvent({schemaId:"checkout_autofill_user_edited_after_autofill/1.0",payload:{shopId:N,checkoutToken:u.checkoutSessionIdentifier||"",country:n.detectedCountryCode(M)??OF(L)??"",addressType:M}}),n.markUserEditedAfterAutofillEmitted(M)}function A(L){const M=y.current.get(L);M!==void 0&&M!==Hn(L)&&T(L)}function R(L){if(L.target instanceof HTMLInputElement||L.target instanceof HTMLSelectElement){const{id:M,name:D,tagName:N,type:U}=L.target;let z=qp(L.target);z.length===0&&(z=M);const O=LF(L);O&&m("autofill",{source:O,element:{...z&&{label:z},...D&&{name:D},tagName:N,type:U,value:Hn(L.target)},timestamp:new Date,section:e}),L.target instanceof HTMLSelectElement&&O!=="native"&&A(L.target)}}return s("div",{ref:g,onFocusCapture:C,onBlurCapture:I,onClickCapture:S,onKeyDownCapture:k,onKeyUpCapture:E,onChangeCapture:R,children:t})}function BF(){const{client:e}=_(),n=e.unstable_getSerialization("experiments")?.find(r=>r.clientHandle===sA)?.variant;return Object.values(ih).find(r=>r===n)}function p_(e,t){const n=_().checkout.configuration.layout.isOnePage.value,r=it("Checkout::Dynamic::Render","ORDER_SUMMARY1"),o=it("Checkout::Dynamic::Render","ORDER_SUMMARY2"),i=it("Checkout::Dynamic::Render","ORDER_SUMMARY3"),a=it("Checkout::Dynamic::Render","ORDER_SUMMARY4"),l=it("Checkout::CartLines::RenderAfter"),c=it("Checkout::CartLineDetails::RenderAfter"),u=it("Checkout::Reductions::RenderBefore"),d=it("Checkout::Reductions::RenderAfter");return n?e==="bottom"?t?.hideMerchandiseLines?[...i]:[...r,...o,...i,...c,...l]:[...c]:[...r,...o,...i,...a,...c,...l,...u,...d]}const m_="checkout-main",fY="checkout-main-header",hY="checkout-pay-button",gY="checkout-review-heading",f_=ft("OrderSummaryContext");function h_(){return Ut(f_)}const hu=({children:e})=>{const t=Le(!1),n=x(o=>{t.value=o},[t]),r=B(()=>({open:t,setOpen:n}),[t,n]);return s(f_.Provider,{value:r,children:e})},yY=()=>{const{checkout:e}=_(),t=e.configuration.visibility.showAside,n=St(),r=ms({base:!0,medium:!1}),o=We(t),i=We(r);return w(()=>!(o.value&&!i.value&&n.value))};function gu(){const{checkout:e,router:t}=_();return w(()=>e.thankYouEntrance.isRevealing.value&&t.currentUrlMatches("/thank-you"))}const VF="cm5pp",UF="gdtca",zF="djSdi",HF="NGRNe",qF="_1Eo4p",GF="_5gERx",$F="mpQwN",WF="gYnYi",YF="uB1DX",jF="Lhk39",KF="GxFSO",JF="eqp7i",XF="EAjaz",QF="i8D
23pn",ZF="lX75M",eB="_0DLUq",tB="nMPKH",nB="WtpiW",rB="ks0CH",oB="GRdxR",iB="Sxi8I",sB="_9F1Rf",aB="i4DWM",lB="_4QenE",cB="QiTI2",ye={Shell:VF,"Config-Footer-positionInline":"FeQiM","Config-Footer-positionEnd":"BwmDa","Shell-layoutAside":"g9PS6","Config-Main-inlineSizeFill":"_46J2H","Config-OrderSummary-inlineSizeFill":"XlQtV","Config-Header-positionStart":"U3Rye","Config-Header-positionInline":"_5ZebG","Config-Header-positionInlineSecondary":"PqnoL","Header-divided":"d5pfT","Shell-variantOnePageCheckout":"oYrwu",MainContent:UF,MainContentPrimary:zF,Footer:HF,"Shell-blockSizeAppLayout":"u5Gkx","Shell-minMobileViewportSize":"KIB4Y","Shell-embeddedUc":"bU4kN","Shell-embeddedUcMainPadding":"ENVeW","Shell-embeddedUcHasOrderSummary4Extensions":"_73ZDy",Banner:qF,Announcement:GF,"Announcement-openTransitionEntered":"_0FhCb","Announcement-opened":"bMbg6",AnnouncementContainer:$F,AnnouncementContent:WF,"Announcement-expanded":"yJIUK",AnnouncementActionButtons:YF,AnnouncementExpandCollapseButton:jF,AnnouncementCloseButton:KF,AnnouncementOverlay:JF,"Announcement-hasOverflow":"X3qgz","Announcement-hasActiveInspector":"rZH98",Header:XF,"Shell-hasAnnouncement":"_96Hty","Shell-announcementOpen":"ck07C","Header-positionStart":"_8wrz5",HeaderContent:QF,"Header-containerContent":"ObllD","Header-positionInline":"Xx7bI","Header-positionInlineSecondary":"oZoJd","Shell-orderSummaryVariantCard":"fv4QL","Shell-exiting":"aLUb3","Header-hasBackgroundImage":"zKcpW",BuyerJourney:ZF,BuyerJourneyContent:eB,"BuyerJourney-containerContent":"hKv1l",Disclosure:tB,DisclosureButton:nB,DisclosureDetails:rB,DisclosureDetailsContent:oB,"Disclosure-divided":"iYA3J",Content:iB,"Content-containerContent":"vzM2m",Main:sB,"Main-inlineSizeFill":"DGMLl","Main-divided":"GI5Fn","slide-from-left":"Fv5RP","slide-from-right":"dQ3Wi",OrderSummary:aB,OrderSummaryContent:lB,"OrderSummary-inlineSizeFill":"LEmIb",FooterContent:cB,"Footer-positionEnd":"fw2Yt","Footer-containerContent":"dmTNG","Footer-divided":"GTe1e"},uB=1e3,Gp="announcement_box",Oa="announcement_content",dB="announcement_action_expand_collapse_buttons";function pB({children:e,onClose:t,onAfterCollapse:n,onAfterExpand:r,onExpand:o,onCollapse:i,open:a=!1,expanded:l=!1}){const{i18n:c}=_(),[u,d]=oe(!1),p=V(null),m=V(null),f=nn(l,"base"),h=nn(a,"base");F(()=>{if(typeof window>"u"||!window.ResizeObserver||!window.MutationObserver)return;const S=m.current;if(!S)return;const k=()=>{l||f!=="exited"||d(S.scrollHeight>S.clientHeight)};k();const E=tk(k,200),T=new ResizeObserver(E);T.observe(S);const A=new MutationObserver(E);return A.observe(S,{childList:!0,subtree:!0,characterData:!0}),()=>{T.disconnect(),A.disconnect()}},[e,l,a,f]);const g=x(()=>{l?i?.():o?.()},[l,i,o]);F(()=>{f==="entered"?r?.():f==="exited"&&n?.()},[r,n,f]);const y=g_(),{environment:{isCheckoutEditor:v},announcement:{colorScheme:P}}=Fe(),b=y[0],C=v?b?.publicIdentifier:void 0,I=v&&y.length>0;return Et(e)?s("section",{id:Gp,className:Y(ye.Announcement,a&&ye["Announcement-opened"],u&&ye["Announcement-hasOverflow"],l&&ye["Announcement-expanded"],ye[Gt("Announcement-expandedTransition",f)],ye[Gt("Announcement-openTransition",h)],I&&ye["Announcement-hasActiveInspector"]),ref:p,children:s("div",{className:Y(ye.AnnouncementContainer,bt({colorLayer:"base",colorScheme:P,backgroundColor:"baseSpecified"})),"data-inspector-id":C,"data-inspector-box":C?"content":void 0,children:[!l&&s("button",{className:ye.AnnouncementOverlay,onClick:S=>{S.preventDefault(),S.stopPropagation(),o?.()},"aria-label":c.translate("thank_you.announcement.expand"),"aria-expanded":!1,"aria-controls":Oa,type:"button"}),s("div",{className:ye.AnnouncementActionButtons,children:[s("button",{id:dB,className:ye.AnnouncementExpandCollapseButton,onClick:g,"aria-label":l?c.translate("thank_you.announcement.collapse"):c.translate("thank_you.announcement.expand"),"aria-expanded":l,"aria-controls":Oa,type:"button",children:s(Me,{type:l?"chevron-up":"chevron-down",size:"base"})}),s("button",{className:ye.AnnouncementCloseButton,onClick:()=>t?.({source:"host"}),"aria-controls":Gp,"aria-expanded":a,"aria-label":c.translate("thank_you.announcement.close"),type:"button",children:s(Me,{type:"x",size:"base"})})]}),s("div",{id:Oa,className:ye.AnnouncementContent,ref:m,"aria-live":"polite","aria-atomic":"true",children:e})]})}):null}function mB(){const e=Fe(),t=nu(),n=Yy(),r=hB(),[o,i]=oe(!1),[a,l]=oe(!1),c=x(({source:f}={})=>{const{announcement:h}=t.configuration;
23h.visibility==="dismissed"||h.visibility==="hidden"||(r(f==="host"?"announcementDismissedFromHost":"announcementDismissedFromExtension"),n.emit("announcementClosed"),t.set("announcement",{...t.configuration.announcement,visibility:"dismissed"}))},[t,n,r]),u=x(()=>{n.emit("announcementAfterCollapsed")},[n]),d=x(()=>{n.emit("announcementAfterExpanded")},[n]),p=x(()=>{i(!0),r("announcementExpanded"),n.emit("announcementExpanded")},[r,n]),m=x(()=>{i(!1),r("announcementCollapsed"),n.emit("announcementCollapsed")},[r,n]);return F(()=>(n.on("closeAnnouncement",c),()=>{n.off("closeAnnouncement",c)}),[c,n]),F(()=>{if(e.announcement.visibility!=="visible"){l(!1);return}const f=setTimeout(()=>{l(!0)},uB);return()=>clearTimeout(f)},[e.announcement.visibility]),{open:a,expanded:o,onAfterCollapse:u,onAfterExpand:d,onClose:c,onExpand:p,onCollapse:m}}function $p(){}function g_(){const{environment:{hasTYPAnnouncementExtensions:e}}=Fe();return fB(e)()}function fB(e){return e!==void 0?()=>[]:()=>{const n=it("purchase.thank-you.announcement.render");return sh(n,"uiExtension").map(cl)}}function hB(){const{environment:{hasTYPAnnouncementExtensions:e}}=Fe();return gB(e)()}function gB(e){return e!==void 0?()=>$p:()=>{const t=g_(),n=wn();if(t.length===0)return $p;const r=t[0];return o=>n?.("extensionUiInteraction",{interaction:o,section:"extension",timestamp:new Date,extension:r,componentType:"Announcement",componentInstanceId:r.id})}}const yB="Vytfl",vB="F3Ebx",_B="qdIKq",bB="OcTba",Xi={CheckoutExitBackdrop:yB,CheckoutExitContent:vB,CheckoutExitFooter:_B,CheckoutExitOrderSummary:bB},PB="F6Nrx",SB="j1xD4",EB="RDtb7",CB="ZXaI9",kB="sEWAT",IB="DTABr",AB="kBVzA",TB="qgQOk",wB="SBffw",Ro={ThankYouEntranceDisclosure:PB,ThankYouEntranceOrderSummary:SB,ThankYouEntranceFooter:EB,ThankYouEntrance:CB,ThankYouEntranceStatus:kB,ThankYouEntranceHeading:IB,ThankYouEntranceCards:AB,ThankYouEntranceActions:TB,ThankYouEntranceBeat:wB},At={none:"0",...jn.spacing},LB={base:"solid",dashed:"dashed",dotted:"dotted"},y_="disclosure_details";function yu({banner:e,announcement:t,header:n,buyerJourney:r,disclosure:o,disclosureOrderSummary:i,footer:a,main:l,orderSummary:c,orderSummaryVariant:u="default",blockSize:d,minMobileViewportSize:p=!1,disclosureId:m=y_,isDisclosureInteractive:f=!0,mainContentId:h=m_}){const g=Fe(),{checkout:{configuration:y,checkoutExit:v},embed:P,router:b}=_(),C=y.visibility.showAside,I=!!P?.isFlagshipPartner,S=zt(P?.embedder),k=S&&y.isUniversalCheckoutFinalizer&&b.currentUrl.value.normalizedPath==="/thank-you",E=it("Checkout::Dynamic::Render","ORDER_SUMMARY4").length>0,T=S&&E,A=I&&g.header.divided===!1,R=g.header.position??"inline",L=v_(),M=gu(),{open:D,expanded:N,onAfterCollapse:U,onAfterExpand:z,onClose:O,onExpand:K,onCollapse:X}=mB(),ne=i?s(Da,{style:g.orderSummary.section,children:i}):void 0;return s("div",{className:Y(ye.Shell,v.isExiting.value&&ye["Shell-exiting"],C&&ye["Shell-layoutAside"],g.main.inlineSize==="fill"&&ye["Config-Main-inlineSizeFill"],g.orderSummary.inlineSize==="fill"&&ye["Config-OrderSummary-inlineSizeFill"],ye[Gt("Config-Header-position",R)],g.footer.position&&ye[Gt("Config-Footer-position",g.footer.position)],g.environment.isOnePageCheckout&&ye["Shell-variantOnePageCheckout"],u==="card"&&ye["Shell-orderSummaryVariantCard"],S&&ye["Shell-embeddedUc"],k&&ye["Shell-embeddedUcMainPadding"],T&&ye["Shell-embeddedUcHasOrderSummary4Extensions"],d&&ye[Gt("Shell-blockSize",d)],p&&ye["Shell-minMobileViewportSize"],Et(t)&&ye["Shell-hasAnnouncement"],D&&ye["Shell-announcementOpen"]),style:{...OB("content",g.content),...BB("content",g.content),...wr("main",g.main),...yo("main",g.main),...wr("order-summary",g.orderSummary),...yo("order-summary",g.orderSummary),...jp("order-summary",g.orderSummary),...wr("header",g.header),...jp("header",{backgroundImage:g.header.banner?.image}),...yo("header",g.header),...A?KB:{},...wr("footer",g.footer),...yo("footer",g.footer),...VB("footer",g.footer),...wr("buyer-journey",g.buyerJourney),...yo("buyer-journey",g.buyerJourney),...wr("announcement",g.announcement)},children:[s(RB,{}),e?s("div",{className:ye.Banner,children:e}):null,t?s(pB,{open:D,expanded:N,onAfterExpand:z,onAfterCollapse:U,onClose:O,onExpand:K,onCollapse:X,children:t}):null,s(Fa,{position:"start",children:[n,g.buyerJourney.position==="header"&&s(Ti,{children:r})]}),s(xB,{id:m,isInteractive:f,details:ne,children:o}),s(MB,{children:[s(NB,{children:[s(Fa,{position:"inline",children:[n,g.buyerJourney.position==="header"&&s(Ti,{children:r})]}),s(Wp,{children:[g.buyerJourney.position==="inline"&&s(Ti,{children:r}),s(Da,{style:g.main.section,children:s("main",{className:Y(ye.MainContentPrimary,L&&Xi.CheckoutExitContent),id:h,children:l})}),g.footer.position==="inline"&&s(Yp,{children:a})]})]}),s(DB,{children:[s(Fa,{position:"inlineSecondary",children:[n,g.buyerJourney.position==="header"&&s(Ti,{children:r})]}),s(Wp,{children:s(Da,{style:g.orderSummary.section,children:s("aside",{className:Y(ye.OrderSummaryContentPrimary,L&&Xi.CheckoutExitOrderSummary,M.value&&Ro.ThankYouEntranceOrderSummary),children:s(Fs,{section:"summary",children:s(yi,{section:"summary",children:c})})})})})]})]}),g.footer.position==="end"&&s(Yp,{children:a})]})}function RB(){const{checkout:e}=_(),{main:{colorScheme:t="scheme1",background:n}={}}=Fe();return e.checkoutExit.isExiting.value?s("div",{className:Y(Xi.CheckoutExitBackdrop,bt({colorLayer:"base",colorScheme:t,backgroundColor:n==="subdued"?"subdued":"baseSpecified"})),"aria-hidden":"true"}):null}function Fa({children:e,position:t}){const{header:{position:n="inline",container:r="fill",colorScheme:o,banner:i,background:a,divided:l}={}}=Fe(),c=t??n;if(!Et(e))return null;const u=l??c==="start";return s("header",{className:Y(ye.Header,ye[Gt("Header-position",c)],ye[Gt("Header-container",r)],u&&ye["Header-divided"],i?.image&&ye["Header-hasBackgroun
23dImage"],c==="start"&&bt({backgroundColor:a==="subdued"?"subdued":"baseSpecified",colorLayer:"base",colorScheme:o})),"data-inspector-id":"header",children:s("div",{className:ye.HeaderContent,children:s(sn,{children:s(Fs,{section:"header",children:s(yi,{section:"header",children:e})})})})})}function Ti({children:e}){const{buyerJourney:{position:t="inline",container:n="fill",visibility:r}={}}=Fe();return!Et(e)||r==="hidden"?null:s("div",{className:Y(ye.BuyerJourney,ye[Gt("BuyerJourney-position",t)],ye[Gt("BuyerJourney-container",n)]),children:s("div",{className:ye.BuyerJourneyContent,children:e})})}function xB({children:e,details:t,id:n=y_,isInteractive:r}){const{content:{divider:{visibility:o="visible"}={}},orderSummary:{background:i,backgroundImage:a,colorScheme:l}={},main:{colorScheme:c="scheme1"},environment:{isCheckoutEditor:u},disclosure:{visibility:d}}=Fe(),p=St(),m=gu(),{checkout:f}=_(),h=zB(),{expanded:g,narrowedToInformationStep:y}=qB(),{open:v,setOpen:P}=h_(),b=v.value||h&&u,[C,I]=oe(),S=V(!1);F(()=>{I(S.current&&!g?"none":void 0),P(g)},[g,P]),F(()=>{S.current=y}),F(()=>{b&&P(!0)},[b,h,P]);const k=()=>{I(void 0),P(!v.peek())},E=vu();if(!Et(e)||f.checkoutExit.isExiting.value||d==="hidden"||d==="hidden-only-checkout"&&!E)return null;const T=a?{backgroundImage:`url(${JSON.stringify(a)})`}:void 0,A=r?v.value:!0,R=!!t&&(p.value||A);return s("aside",{className:Y(ye.Disclosure,o==="visible"&&ye["Disclosure-divided"],bt({colorLayer:"base",colorScheme:c,backgroundColor:"baseSpecified"})),"data-inspector-id":"orderSummary",children:s(Fs,{section:"top_summary",children:s(yi,{section:"top_summary",children:[r?s(Tn,{className:Y(ye.DisclosureButton,m.value&&Ro.ThankYouEntranceDisclosure),background:"transparent",onClick:k,"aria-controls":n,"aria-expanded":A,inlineSize:"100%","data-event-name":A?"order_summary_hide":"order_summary_show",children:e}):s("div",{className:Y(ye.DisclosureButton,m.value&&Ro.ThankYouEntranceDisclosure),children:e}),R&&s(gn,{open:A,id:n,duration:C,children:s("div",{className:Y(ye.DisclosureDetails,m.value&&Ro.ThankYouEntranceDisclosure,bt({colorLayer:"base",colorScheme:l,backgroundColor:i==="subdued"?"subdued":"baseSpecified"})),style:T,children:s("div",{className:ye.DisclosureDetailsContent,children:s(sn,{children:s(UB,{children:t})})})})})]})})})}function MB({children:e}){const{content:{container:t="fill"}={}}=Fe();return Et(e)?s("div",{className:Y(ye.Content,ye[Gt("Content-container",t)]),children:e}):null}function Wp({children:e}){const{checkout:t}=_();return t.checkoutExit.isExiting.value?null:s(q,{children:e})}function NB({children:e}){const{main:{colorScheme:t="scheme1",inlineSize:n,background:r,backgroundImage:o}={},content:{divider:{visibility:i="visible"}={}}}=Fe(),a=B(()=>({current:t}),[t]);if(!Et(e))return null;const l=o?{backgroundImage:`url(${JSON.stringify(o)})`}:void 0;return s("div",{className:Y(ye.Main,n==="fill"&&ye["Main-inlineSizeFill"],i==="visible"&&ye["Main-divided"],bt({colorLayer:"base",colorScheme:t,backgroundColor:r==="subdued"?"subdued":"baseSpecified"})),style:l,children:s("div",{className:ye.MainContent,children:s(ys.Provider,{value:a,children:s(sn,{children:e})})})})}function DB({children:e}){const{orderSummary:{colorScheme:t="scheme2",inlineSize:n,background:r,backgroundImage:o}={}}=Fe(),i=B(()=>({current:t}),[t]);if(!Et(e))return null;const a=o?{backgroundImage:`url(${JSON.stringify(o)})`}:void 0;return s("div",{className:Y(ye.OrderSummary,n==="fill"&&ye["OrderSummary-inlineSizeFill"],bt({colorLayer:"base",colorScheme:t,backgroundColor:r==="subdued"?"subdued":"baseSpecified"})),style:a,"data-inspector-id":"orderSummary",children:s("div",{className:ye.OrderSummaryContent,children:s(ys.Provider,{value:i,children:s(sn,{children:e})})})})}function Yp({children:e}
23){const{footer:{position:t="inline",container:n="fill",colorScheme:r,background:o,divided:i}={}}=Fe(),{checkout:a}=_(),l=v_(),c=gu();if(a.checkoutExit.isExiting.value||!Et(e))return null;const d=i??t==="end";return s("footer",{className:Y(ye.Footer,ye[Gt("Footer-position",t)],ye[Gt("Footer-container",n)],d&&ye["Footer-divided"],l&&Xi.CheckoutExitFooter,t==="end"&&bt({colorLayer:"base",colorScheme:r,backgroundColor:o==="subdued"?"subdued":"baseSpecified"})),"data-inspector-id":"footer",children:s("div",{className:Y(ye.FooterContent,c.value&&Ro.ThankYouEntranceFooter),children:s(sn,{children:s(yi,{section:"footer",children:e})})})})}function vt(e){return t=>t?e[t]:void 0}function OB(e,{divider:{borderStyle:t}={}}={}){return t&&{[`--config-${e}-divider-border-style`]:vt(LB)(t)}}const FB={none:"0px",...jn.borderWidth};function BB(e,{divider:{borderWidth:t}={}}={}){return t&&{[`--config-${e}-divider-border-width`]:vt(FB)(t)}}function wr(e,{inlineSize:t}={}){if(!isNaN(Number(t))&&Number(t)!==0)return{[`--config-${e}-inline-size`]:rs(Number(t))};if(!(e==="main"||e==="order-summary")&&t==="fill")return{[`--config-${e}-inline-size`]:"100%"}}function yo(e,{padding:t}={}){if(Array.isArray(t)){const n=t.length===2?[t[0],t[1],t[0],t[1]]:t;return{[`--config-${e}-padding-block-start`]:vt(At)(n[0]),[`--config-${e}-padding-inline-end`]:vt(At)(n[1]),[`--config-${e}-padding-block-end`]:vt(At)(n[2]),[`--config-${e}-padding-inline-start`]:vt(At)(n[3]),[`--config-${e}-padding`]:`var(--config-${e}-padding-block-start) var(--config-${e}-padding-inline-end) var(--config-${e}-padding-block-end) var(--config-${e}-padding-inline-start)`}}return t&&{[`--config-${e}-padding-block-start`]:vt(At)(t),[`--config-${e}-padding-inline-end`]:vt(At)(t),[`--config-${e}-padding-block-end`]:vt(At)(t),[`--config-${e}-padding-inline-start`]:vt(At)(t),[`--config-${e}-padding`]:vt(At)(t)}}function jp(e,{backgroundImage:t}={}){return t&&{[`--config-${e}-background-image`]:`url(${JSON.stringify(t)})`}}function VB(e,{marginBlockStart:t}={}){return t&&{[`--config-${e}-margin-block-start`]:vt(At)(t)}}function UB({children:e}){const{environment:{isOnePageCheckout:t}}=Fe(),n=vu();return t&&!n?s(wF,{visibleTargets:["purchase.checkout.cart-line-item.render-after","purchase.checkout.reductions.render-before","purchase.checkout.reductions.render-after"],children:e}):s(q,{children:e})}function zB(){const{environment:{hasOrderSummaryExtensions:e}}=Fe();return HB(e)()}function HB(e){return e!==void 0?()=>e:()=>p_("top").length>0}function qB(){const{environment:{shouldExpandOrderSummary:e}}=Fe(),t=BF()===ih.Treatment;return GB(t,e)()}function GB(e,t){return t!==void 0?()=>({expanded:t,narrowedToInformationStep:!1}):()=>{const n=$B(),r=WB(),o=YB();return e&&r&&!n.value&&o.value!==void 0?{expanded:o.value,narrowedToInformationStep:!0}:{expanded:n.value||r,narrowedToInformationStep:!1}}}function $B(){const e=We(p_("top"));return w(()=>e.value.some(t=>{if(t.kind==="customField")return cl(t).required.value;const n=cl(t),r=n.behaviors.value;return r.blockProgress&&n.capabilities.blockProgress||r.alwaysReveal}))}function WB(){const{orderSummary:{defaultState:e}={}}=Fe(),{checkout:{configuration:{layout:{isOnePage:t}}}}=_();return!t.value&&e==="EXPANDED"}function YB(){const e=Ce();return w(()=>{const{currentPage:t,currentDetour:n}=e.value;if(!(n||!t))return t.id==="information"})}function vu(){const{environment:{hasDetour:e}}=Fe();return jB(e)()}function jB(e){return e!==void 0?()=>e:()=>{const{currentDetour:t}=Ce().value;return!!t}}function v_(){const e=hv(),t=vu();return e&&!t}const KB={"--x-shell-header-padding":`${vt(At)("large100")} ${vt(At)("large200")} ${vt(At)("none")} ${vt(At)("large200")}`,"--x-shell-main-padding":`var(--config-main-padding-block-start, ${vt(At)("large100")}) var(--config-main-padding-inline-end, ${vt(At)("large200")}) var(--config-main-padding-block-end, ${vt(At)("large200")}) var(--config-main-padding-inline-start, ${vt(At)("large200")})`},JB={small:"10ch",base:"20ch",large:"30ch",full:"100%"},XB={base:"12px"},QB="Shopify.checkout.partnerInterstitialMinimumVisibleDuration";function ZB(e){return JB[e]}const eV="A5qhV",tV="_4KRKW",Kp={overlay:eV,backgroundOverlay:tV},nV=et("wallet-transition-disclosure-"),rV=et("wallet-transition-main-content-");function oV({layer:e="foreground"}={}){const{embed:t,i18n:n}=_(),r=!t,o=Ke(void 0,nV),i=Ke(void 0,rV),a=s("div",{className:`${Kp.overlay} ${e==="background"?Kp.backgroundOverlay:""}`,role:"status","aria-label":n.translate("general.loading"),style:Jt({[jn.global.borderRadius]:XB.base}),children:s(hu,{children:s(yu,{mainContentId:i,disclosureId:o,isDisclosureInteractive:!1,header:r?s(iV,{}):void 0,disclosure:s(aV,{}),main:s(sV,{}),orderSummary:s(cV,{})})})});return s(Sr,{children:a})}function iV(){const{header:{alignment:e="start",logo:t}={}}=Fe(),{shop:n}=_(),r=t?.image?s(o_,{width:t.maxWidth}):s(Wt,{level:1,accessibilityRole:"presentation",display:"inline",children:n.name});
23return s(gt,{gridTemplateColumns:"1fr",inlineSize:"100%",justifyItems:e,children:r})}function kn({inlineSize:e="base",size:t="small"}){return s(mu,{size:t,inlineSize:e})}function Jp(){return s(G,{type:"small",children:s(Jo,{inlineSize:ZB("full")})})}function Ba(){return s(Q,{rowGap:"base",children:[s(kn,{size:"large",inlineSize:"small"}),s(Q,{rowGap:"small-300",children:[s(Jp,{}),s(Jp,{})]})]})}function sV(){return s(Q,{rowGap:"large-200",children:[s(Ba,{}),s(jr,{}),s(Ba,{}),s(jr,{}),s(Ba,{})]})}function aV(){return s(Q,{direction:"inline",justifyContent:"space-between",alignItems:"center",padding:"large-100 base",minBlockSize:"63px",inlineSize:"100%",children:[s(kn,{inlineSize:"base"}),s(kn,{size:"large",inlineSize:"small"})]})}function lV(e){return e>=1?"64px":`${64*e}px`}function cV(){const{i18n:e}=_(),{merchandiseThumbnail:t,global:n}=rt(),r=t.cornerRadius??n.cornerRadius??"base",o=r==="fullyRounded"?"large":r,i=t.aspectRatio??1,a=lV(i);return s(Q,{rowGap:"large-200",children:[s(G,{accessibilityVisibility:"exclusive",children:e.translate("order_summary.shopping_cart_label")}),s(gt,{gridTemplateColumns:"auto minmax(0, 1fr) auto",gap:"base",alignItems:"center",children:[s(Pe,{borderRadius:o,overflow:"hidden",children:s(Jo,{contentDisplay:"block",inlineSize:a,aspectRatio:i})}),s(Q,{rowGap:"small-500",children:[s(kn,{inlineSize:"base"}),s(kn,{inlineSize:"small"})]}),s(kn,{inlineSize:"small"})]}),s(uV,{})]})}function uV(){return s(Q,{rowGap:"small-100",children:[[0,1,2].map(e=>s(Q,{direction:"inline",justifyContent:"space-between",children:[s(kn,{inlineSize:"small"}),s(kn,{inlineSize:"small"})]},e)),s(Q,{direction:"inline",justifyContent:"space-between",children:[s(kn,{size:"large",inlineSize:"small"}),s(kn,{size:"large",inlineSize:"small"})]})]})}function dV(){const{shop:e,checkout:t,observability:n}=_(),r=dF().value,o=!!t.wallets.isDeceleratingSignal?.value,i=t.isCheckoutLayoutForcedToOnePage.value,a=Xv(),{payNowButtonElement:l,payNowButtonSectionMounted:c}=Ds(),u=!!(l||a&&c),d=e.hasFlagEnabled(rh),p=t.wallets.escalatedWallet.value,m=d?o&&u&&p!==null:o&&u;F(()=>{m&&t.wallets.setIsDecelerating(!1)},[m,t.wallets]);const f=V(!1);return F(()=>{if(!i){f.current=!1;return}if(!u||f.current)return;f.current=!0;const h={wallet:p};n.counter({name:"wallet_3page_vaulted_review_landed",value:1,attributes:h}),n.log("wallet_3page_vaulted_review_landed","Buyer reached the forced one-page wallet vaulted review",h)},[p,i,u,n]),r||!o?null:s(oV,{})}const xo=qe({suspenseName:"review-block",id:()=>"ReviewBlock",displayName:"ReviewBlock",load:()=>ct(()=>Ve(()=>import("./ReviewBlock.CIS5hxp5.js"),__vite__mapDeps([88,1,2,3,4,5,89,22,20,21,23,90,91,92,43,44,45,42,46,47,25,26,41,93,94,6,95,96,97,98,8,99,100,101,102,103,27,28,104,105,106,7])))});function pV(){const{shop:e,client:t,shopPay:n,checkout:{identity:r},source:{checkoutSessionIdentifier:o},url:i}=_(),a=r.current.value==="shopPay",l=parseInt(Be(e.id),10);F(()=>{if(!o)return;c();async function c(){const u=new URL(i.privateAccessToken(a,l));u.searchParams.set("id",o),u.searchParams.set("checkout_type","c1");const d=nk({shop:e,serializations:{get:p=>t.unstable_getSerialization(p)},isShopApp:n.isShopServerOrigin});d?.uniqueToken&&u.searchParams.set("_y",d.uniqueToken),d?.visitToken&&u.searchParams.set("_s",d.visitToken);try{await fetch(u)}catch{}}},[o,l,a,i,e,t,n])}const Di=qe({suspenseName:"information",displayName:"Information",load:()=>ct(()=>Ve(()=>import("./page-Information.Dxf2bOHj.js"),__vite__mapDeps([107,1,91,92,90,2,3,4,5,43,44,45,42,46,47,25,26,41,22,20,21,23,93,108,109,110,111,112,113,114,82,48,115,116,40,117,6,118,119,120,121,122,70,72,57,123,124,102,125,126,127,8,128,129,52,53,7])))}),mV=qe({displayName:"NoAddressLocation",load:()=>ct(()=>Ve(async()=>{const{noAddressLocationPages:e}=await import("./page-lazyNoAddressLocation.BYLrO9MQ.js");return{noAddressLocationPages:e}},__vite__mapDeps([130,1,121,3,4,2,5,6,122,52,53,7,8,131])).then(({noAddressLocationPages:e})=>({default:e.NoAddressLocation})))}),fV=qe({displayName:"NoAddressLocationFullDetour",load:()=>ct(()=>Ve(async()=>{const{noAddressLocationPages:e}=await import("./page-lazyNoAddressLocation.BYLrO9MQ.js");return{noAddressLocationPages:e}}
23,__vite__mapDeps([130,1,121,3,4,2,5,6,122,52,53,7,8,131])).then(({noAddressLocationPages:e})=>({default:e.NoAddressLocationFullDetour})))}),hV=qe({displayName:"NotFound",load:()=>Ve(()=>Promise.resolve().then(()=>S3),void 0)}),Xp=qe({displayName:"OffsitePaymentFailed",load:()=>Ve(()=>import("./stopwatch.BB4J8gXS.js").then(e=>e.O),__vite__mapDeps([121,1,3,4,2,5,6,122]))}),__=qe({suspenseName:"one-page",displayName:"OnePage",load:()=>Ve(()=>import("./OnePage.BzB6QSpS.js").then(e=>e.p),__vite__mapDeps([132,3,1,4,2,5,113,91,92,114,82,48,41,115,116,40,117,90,43,44,45,42,46,47,25,26,22,20,21,23,93,6,118,119,120,121,122,70,72,57,123,124,102,125,126,127,8,128,129,133,31,32,77,74,7,134,135,27,28,103,104,105,136,78,79,137,83,138,139,81,140,141,142,58,110,111,143,12,94,95,96,97,98,99,144,145,146,147,35,148,149,150,151,152,106,153]))}),Qp=qe({suspenseName:"one-page-review",displayName:"OnePageReview",load:()=>ct(()=>Ve(()=>import("./page-OnePageReview.C8FyeiSI.js"),__vite__mapDeps([154,1,108,3,4,109,2,5,110,111,112,155,125,126,115,38,39,6,7,8,156,103,91,92,27,28,104,105,133,31,32,120,121,122,72,70,77,114,82,48,41,116,74,134,100,94,95,96,97,98,99,101,157,138,139,158,159,63,119,58,137,118,160,141,142,12,106,46])))});class vY extends Error{constructor(){super(...arguments),this.name="CardFieldsError"}}class gV extends Error{constructor(t,n){super(t,n),this.name="CardFieldsLoadError",this.diagnostics=n?.diagnostics}}class _Y extends Error{constructor(){super(...arguments),this.name="CardFieldsSetupError"}}class Va extends Error{constructor(){super(...arguments),this.name="CardFieldsScriptTagOnErrorError"}}class yV extends Error{constructor(){super(...arguments),this.name="CardFieldsAppendChildError"}}class vV extends Error{constructor(){super(...arguments),this.name="CardFieldsExecutionError"}}class bY extends Error{constructor(){super(...arguments),this.name="IFrameNotFoundError"}}class PY extends Error{constructor(t,n){super(t),this.name="CardFieldsFetchFailureError",n!==void 0&&(this.httpStatus=n)}toString(){const t=super.toString();return this.httpStatus===void 0?t:`${t} (HTTP Status: ${this.httpStatus})`}}const td=class td extends Error{constructor(){super(...arguments),this.name="CardFieldsOperationalError"}};td.hostedFieldsName="CardFieldsError";let Zp=td;function _V({source:e,integrity:t},n=!0){const r=Date.now();function o(){return new Promise((i,a)=>{if(window.CardFields)return i();const l=document.createElement("script");l.async=!0,l.src=e,l.onload=()=>{if(window.CardFields)return i();setTimeout(()=>{if(!window.CardFields)return a(new vV);i()},0)},t&&(l.integrity=t),l.crossOrigin="anonymous",l.onerror=c=>{let u;c instanceof Event?u=new Va(`Event type: ${c.type}. ${wi(e)}`):typeof c=="string"?u=new Va(`String error: ${c}. ${wi(e)}`):u=new Va(`unknown error type. ${wi(e)}`),document.head.removeChild(l),a(u)};try{document.head.appendChild(l)}catch(c){a(new yV("Failed to append child.",{cause:c}))}})}return(n?ct(o):o()).catch(i=>{let a;try{const l=typeof performance<"u"&&typeof performance.getEntriesByName=="function"?performance.getEntriesByName(e,"resource"):[],c=l[l.length-1],u=typeof navigator>"u"?void 0:navigator.connection;a=Object.fromEntries(Object.entries({errorCause:i instanceof Error?i.name.slice(0,128)||"Error":typeof i,underlyingCauseName:i instanceof Error&&i.cause instanceof Error?i.cause.name.slice(0,128)||"Error":void 0,elapsedMs:Date.now()-r,sdkIntegrity:t?.slice(0,512),networkType:u?.type,networkDownlink:u?.downlink,networkRtt:u?.rtt,networkSaveData:u?.saveData,documentReadyState:document.readyState,documentVisibilityState:document.visibilityState,resourceDurationMs:c?.duration,resourceTransferSize:c?.transferSize,resourceStatus:c?.responseStatus||void 0}).filter(([,d])=>d!==void 0))}catch{a=void 0}throw new gV(`Failed to load CardFields SDK. ${wi(e)}`,{cause:i,diagnostics:a})})}function wi(e){const t=typeof navigator>"u"?"navigator not available":navigator.onLine;return`Script src: ${e} . Internet connection boolean: ${t}`}function bV(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Ua,em;function PV(){return em||(em=1,Ua={SDK_INTEGRITY:"sha256-fu1lH6QOfb8dybbxZiwh4q3DLqiMxbI+Knm2GsdIxqc=",SDK_URL:"https://checkout.pci.shopifyinc.com/build/09497de/card_fields.js"}),Ua}var SV=PV();const tm=bV(SV);function EV(){const{environment:e}=_(),t=e.services.hostedFields.url;return t===tm.SDK_URL?{source:t,integrity:tm.SDK_INTEGRITY}:{source:t}}function CV(){const e=EV();return()=>{_V(e)}}const Cl=qe({suspenseName:"payment",displayName:"Payment",load:()=>ct(()=>Ve(()=>import("./page-Payment.Iqpgr0zI.js"),__vite__mapDeps([161,1,135,3,4,2,5,44,27,28,103,91,92,104,105,123,22,20,21,23,124,136,7,78,79,137,77,83,138,139,81,25,26,140,162,163,141,142,118,117,90,43,45,42,46,47,41,93,111,164,48,165,89,108,109,110,112,57,52,53,158,120,121,6,122,72,70,159,166,167,168,8]))),usePrefetch(){const e=CV();return x(()=>{e()},[e])}}),nm=qe({displayName:"PostPurchase",load:()=>Ve(()=>import("./page-PostPurchase.D72-91fU.js"),__vite__mapDeps([169,1,2,3,4,5,121,6,122,43,44,45,170,171,51,8,12,25,26,14,68,60,65,7,172]))}),b_=qe({displayName:"Processing",load:()=>ct(()=>Ve(()=>import("./page-Processing.5VdcgoKE.js"),__vite__mapDeps([173,1,3,4,2,5,6,121,122,7,8,174])))}),kl=qe({suspenseName:"review",displayName:"Review",load:()=>ct(()=>Ve(()=>import("./page-Review.CBNB9SvL.js"),__vite__mapDeps([175,1,2,3,4,5,108,109,110,111,112,57,52,53,158,120,121,6,122,72,70,159,102,7,8])))}),Il=qe({suspenseName:"shipping",displayName:"Shipping",load:()=>ct(()=>Ve(()=>import("./page-Shipping.466zNPJX.js"),__vite__mapDeps([176,1,125,126,144,22,20,3,4,2,5,21,23,123,91,92,124,128,145,146,95,96,97,147,35,42,43,44,45,46,47,148,149,150,151,52,53,121,6,122,7,8])))}),P_=qe({displayName:"ShopPayLoginLoader",load:()=>Ve(()=>import("./page-ShopPayLoginLoader.OcgRb98F.js"),__vite__mapDeps([177,1,2,3,4,5,178,106,83,155,125,126,115,38,39,6,7,8,156,141,142,179,96,121,122,180]))}),S_=qe({displayName:"StockProblems",load:()=>ct(()=>Ve(()=>import("./page-StockProblems.C4i00a0x.js"),__vite__mapDeps([181,1,121,3,4,2,5,6,122,52,53,182,183,7,8])))}),kV=qe({displayName:"StockProblemsModal",load:()=>ct(()=>Ve(()=>import("./page-StockProblemsModal.DCHDVpXe.js"),__vite__mapDeps([184,1,2,3,4,5,183,182,6,121,122,152,7,8])))});function E_(e){return function(n){const{observability:r}=_();F(()=>
23{if(n){if(aA(n)||lA(n)){r.log("lazy_load_failure",`[LazyLoad] ${e} failed to load`,{component:e,failure:"lazy_load",error:String(n)});return}r.error(n,{metadata:{lazyLoad:{component:e,failure:"lazy_load"}}})}},[n,r])}}const cr=qe({suspenseName:"thank-you",displayName:"ThankYou",useError:E_("ThankYou"),load:()=>ct(()=>Ve(()=>import("./page-ThankYou.B4OwIlOm.js"),__vite__mapDeps([185,1,2,3,4,5,48,41,34,52,53,102,121,6,122,98,95,96,97,146,27,28,18,19,20,21,42,43,44,45,46,47,114,82,115,116,186,54,104,187,188,189,25,26,118,190,191,192,193,145,8,125,126,7,194])))}),Al=qe({displayName:"Throttle",load:()=>ct(()=>Ve(()=>import("./page-Throttle.COQ4BPmF.js"),__vite__mapDeps([195,1,102,2,3,4,5,6,121,122,61,7,8,196])))});var Ht={Paragraph:"_1tx8jg70 _1fragemws",lineClamp:"_1tx8jg72",lineClampCount:"var(--_1tx8jg71)",accessibilityVisibilityVariant:{exclusive:"_1tx8jg71p _1tx8jg71o _1fragem121"},textAlignVariant:{start:"_1tx8jg77 _1tx8jg73 _1fragem126",center:"_1tx8jg78 _1tx8jg74 _1fragem124",end:"_1tx8jg79 _1tx8jg75 _1fragem125",justify:"_1tx8jg7a _1tx8jg76 _1fragem127"},textWrapVariant:{pretty:"_1tx8jg7b"},sizeVariant:{extraSmall:"_1tx8jg7j _1tx8jg7c _1fragemys",small:"_1tx8jg7k _1tx8jg7d _1fragemyt",base:"_1tx8jg7l _1tx8jg7e _1fragemyu",medium:"_1tx8jg7m _1tx8jg7f _1fragemyv",large:"_1tx8jg7n _1tx8jg7g _1fragemyw",extraLarge:"_1tx8jg7o _1tx8jg7h _1fragemyx",extraExtraLarge:"_1tx8jg7p _1tx8jg7i _1fragemyy"},kerningVariant:{base:"_1tx8jg7q",large100:"_1tx8jg7r",large200:"_1tx8jg7s"},letterCaseVariant:{uppercase:"_1tx8jg7t",lowercase:"_1tx8jg7u",capitalize:"_1tx8jg7v",none:"_1tx8jg7w"},fontsVariant:{primary:"_1tx8jg7z _1tx8jg7x _1fragemyg",secondary:"_1tx8jg710 _1tx8jg7y _1fragemyh"},decorationVariant:{none:"_1tx8jg713 _1tx8jg711 _1fragem128",underline:"_1tx8jg714 _1tx8jg712 _1fragem129"},colorVariant:{base:"_1tx8jg71k",subdued:"_1tx8jg71l"},toneVariant:{auto:"_1tx8jg71c",neutral:"_1tx8jg71d",info:"_1tx8jg71e _1tx8jg715 _1tx8jg716 _1fragemxt",success:"_1tx8jg71f _1tx8jg715 _1tx8jg717 _1fragemxu",warning:"_1tx8jg71g _1tx8jg715 _1tx8jg718 _1fragemxv",critical:"_1tx8jg71h _1tx8jg715 _1tx8jg719 _1fragemxr",custom:"_1tx8jg71i _1tx8jg715 _1tx8jg71a _1fragemxs",accent:"_1tx8jg71j _1tx8jg71b _1fragemxq"},typeVariant:{paragraph:"_1tx8jg71m",small:"_1tx8jg71n _1tx8jg7k _1tx8jg7d _1fragemyt"}};function je({accessibilityVisibility:e,children:t,color:n="base",size:r,id:o,textAlign:i,textWrap:a,translate:l,kerning:c,letterCase:u,fonts:d,decoration:p,type:m="paragraph",tone:f="auto",dir:h,lang:g,lineClamp:y}){const v=y!=null&&Number.isFinite(y)&&y>=1?Math.floor(y):void 0,P=v==null?void 0:Jt({[Ht.lineClampCount]:String(v)}),b=(l===!0?"yes":void 0)??(l===!1?"no":void 0),C=e==="exclusive"?Ht.accessibilityVisibilityVariant[e]:Y(Ht.Paragraph,m!=="small"&&r&&Ht.sizeVariant[r],f&&Ht.toneVariant[f],n&&(f==="auto"||f==="neutral")&&Ht.colorVariant[n],i&&i!=="auto"&&Ht.textAlignVariant[i],a&&a!=="wrap"&&Ht.textWrapVariant[a],c&&Ht.kerningVariant[c],u&&Ht.letterCaseVariant[u],d&&Ht.fontsVariant[d],p&&Ht.decorationVariant[p],v!=null&&Ht.lineClamp,Ht.typeVariant[m],{notranslate:l===!1});return s(Gr.Provider,{value:!0,children:s("p",{"aria-hidden":e==="hidden"?!0:void 0,className:C,id:o,translate:b,dir:h,lang:g,style:P,children:t})})}function IV({email:e,phone:t,emailInputError:n,phoneInputError:r,hasViolations:o}){return!e&&!t||(!!n||!!r)||o}function AV(e){const t=e?.filter(({quantity:n})=>n>0)??[];return t.length>0&&t.every(({requiresShipping:n})=>!n)}function TV({isFlagshipPartner:e,hasError:t,hasOnlyDigitalItems:n}){return e&&!t&&!n}const C_=ft("VaultedSectionsContext");function uo(){const e=Ee(C_);return w(()=>e?e.value:{contact:!1,delivery:!1,payment:!1,billing:!1})}function wV(){const e=uo();return w(()=>e.value.contact&&e.value.delivery&&e.value.payment)}function SY(){const e=uo(),{checkout:t,embed:n,shop:r,source:o}=_(),{validation:{contactErrors:{emailInputError:i,phoneInputError:a}}}=t,{current:l}=t.identity,{hasViolations:c}=mi(ic),u=Fe(),d=rt(),p=We(u.main.section),m=We(d.vaulted),f=We(c),h=V(!1);return w(()=>{const g=Pd(p.value),y=Pd(m.value),{contact:v,delivery:P,payment:b}=e.value,C=rk({isContactVaulted:v,configuration:t.configuration,identity:t.identity,embed:n,shop:r}),I=(()=>
23{if(l.value!=="sdkCartHints")return h.current=!1,C;if(!C)return h.current=!1,!1;const T=t.proposal.negotiated.fields.merchandiseLines.value?.lines;return TV({isFlagshipPartner:n?.isFlagshipPartner??!1,hasError:IV({email:t.proposal.proposed.email.value,phone:t.proposal.proposed.phone.value,emailInputError:i.value,phoneInputError:a.value,hasViolations:f.value}),hasOnlyDigitalItems:AV(T)})?h.current:(h.current=!0,!0)})(),S=!nt(o)&&ok({checkout:t}),k=P&&t.isShippingRequired.value;return I||k||b||S?g||y:!1})}function LV(e){return Object.entries(e).some(([t,n])=>{const r=t;return r!=="countryCode"&&r!=="zoneCode"&&Wl(r)&&n!=null&&(typeof n!="string"||n.trim().length>0)})}function RV(e,t){return e.greenPath.some(({route:n})=>n===t)?!0:e.detours.some(({type:n,route:r})=>(n==="stockProblems"||n==="noAddressLocation")&&r===t)}function k_(){const{embed:e,shop:t,checkout:n,router:r,i18n:o}=_(),i=e?.interstitialPartnerDisplayName,{plan:a}=Ce().value,l=r.currentUrl.value.normalizedPath,c=ec({embedder:e?.embedder,shop:t}),u=uo(),{delegatedPaymentInstrument:d}=xt(),p=Le(!1);Dt(()=>{p.value=!!d.peek()},[d,p]);const[m]=oe(()=>{const y=n.proposal.proposed;return{contact:!!(y.email.peek()||y.phone.peek()),delivery:LV(y.shippingAddress.peek())}});if(!RV(a,l)||!c||n.identity.current.value!=="sdkCartHints"||!i)return null;const f=u.value.contact&&m.contact,h=u.value.delivery&&m.delivery,g=u.value.payment&&p.value;return!f&&!h&&!g?null:s(gt,{gridTemplateColumns:"auto 1fr",gap:"small",background:"subdued",borderWidth:"none none base none",padding:"base",children:[s(Me,{type:"info"}),s(je,{textWrap:"pretty",children:o.translate("merchant_redirect.partner_interstitial.account_source_banner",{shop_name:t.name,partner_name:i})})]})}const I_=qe({id:()=>"AnnouncementRuntimeExtensions",displayName:"AnnouncementRuntimeExtensions",load:()=>Ve(()=>import("./AnnouncementRuntimeExtensions.H8r-m80u.js").then(e=>e.A),__vite__mapDeps([15,1,2,3,4,5,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,14,34,35,36,37,8,38,39,40,41,42,43,44,45,46,47,48,49]))});function A_(){const t=it("purchase.thank-you.announcement.render");return B(()=>{const n=sh(t,"uiExtension");return n.length>0?[n[0]]:[]},[t])}const xV=/Version\/(\d+)\.(\d+)\sMobile\/\w+\sSafari/,MV=/Version\/(\d+)[\d.]*.*Safari/,NV=/Chrome\/|Edg(?:e|iOS|A)?\//,DV=/FBAN|FB_IAB|FBAV|Instagram/;function OV(e){const t=navigator.userAgent.match(xV);return t?t[1]===e:!1}function FV(e){const t=navigator.userAgent;if(NV.test(t))return!1;const n=t.match(MV);return n?parseInt(n[1],10)===e:!1}function EY(){return DV.test(navigator.userAgent)}const BV=0,T_=1,VV=2,w_=3,UV=4,_u=5,bu=new Map([["legacy",BV],["block",T_],["inline",VV],["grid",w_],["list",UV],["grid-compact",_u]]);function rm(e,t){return bu.get(e)===t}function CY(e){const t=bu.get(e);return t===w_||t===_u}function kY(e){return typeof e=="string"&&bu.has(e)}const L_=He(null);L_.displayName="ChoiceListContext";function IY(){return Ee(L_)}const R_=He(null);R_.displayName="ChoiceListStyleContext";function zV(){return Ee(R_)||{}}function AY(){return zV().redesigned??!1}const Pu=He(void 0);Pu.displayName="ChoiceListPresentationOverrideContext";function HV(){return Ee(Pu)}function qV(e){return rm(e,T_)||rm(e,_u)}function TY(e){const t=qT(),n=HV();return t&&n!=="base"&&qV(e)?"redesigned":"base"}var tt={Actions:"u2pextc u2pextb _1fragem82 _1fragem9v _1fragemtq _1fragemrx _1fragem6t _1fragempu",ActionsScrollShadow:"u2pext1o",actionLayoutVariant:{inline:"u2pextf u2pextd _1fragemx8 _1fragembu",stacked:"u2pextg u2pexte _1fragemxc _1fragemcd"},blockSize:"u2pextu",modalBlockSize:"var(--u2pextt)",Content:"u2pext14 u2pext13 _1fragemyn",contentPaddingVariant:{base:"u2pext1q u2pext1p _1fragemtq _1fragemrx",none:"u2pext1r"},CloseButton:"u2pext1m u2pext1l _1fragempa _1fragemr3 _1fragemnh _1fragemsw _1fragemwn _1fragem10x _1fragem5u _1fragem133 _1fragem12k _1fragem12p _1fragem12e _1fragem130",Footer:"u2pextm _1fragemyo",Header:"u2pext1b u2pext1a _1fragem64 _1fragembe _1fragem19",HeaderContent:"u2pext1i _1fragemyn _1fragemvo",headerContentPaddingVariant:{base:"u2pext1j",none:"u2pext1k"},headerPaddingVariant:{base:"u2pext1f u2pext1c _1fragemtq _1fragemrx",large:"u2pext1g u2pext1d _1fragemtq _1fragemrx",extraLarge:"u2pext1h u2pext1e _1fragemtq _1fragemrx"},IFrame:"u2pext16 u2pext15 _1fragemeg _1fragemdw _1fragemf0 _1fragemdc _1fragem5u",iframePaddingVariant:{base:"u2pext18 u2pext17 _1fragemtq _1fragemrx _1fragempu",none:"u2pext19"},Modal:"u2pexto u2pextn _1fragemup _1fragemv4 _1fragem64 _1fragem73 _1fragemzf _1fragem5p _1fragemve _1fragemxx _1fragemy5 _1fragem133 _1fragem12n _1fragem12d _1fragem12q",modalTopRadiusVariant:{rounded:"u2pextp",square:"u2pextq"},modalMobileMarginVariant:{base:"u2pextr",none:"u2pexts"},Overlay:"u2pext8 u2pext7 _1fragem108 _1fragem10n _1fragemzt _1fragem112 _1fragemwn _1fragem64 _1fragem1j _1fragem132 _1fragem11k _1fragem12l _1fragem12q _1fragem12f",overlayPaddingVariant:{base:"u2pext9",none:"u2pexta"},ScrollBox:"u2pextw u2pextv _1fragem6t _1fragemuk _1fragemv4",scrollBoxActionsVariant:{withActions:"u2pextx",noActions:"u2pexty"},scrollBoxPaddingVariant:{gap:"u2pext10 u2pextz _1fragem8c _1fragema5",none:"u2pext11",blockStart:"u2pext12"},secondaryActionLayoutVariant:{inline:"u2pextk u2pexti _1fragemx8",stacked:"u2pextl u2pextj _1fragemxc"},SecondaryActions:"u2pexth _1fragem82 _1fragem9v _1fragem6t _1fragemyn",transitionVariant:{entered:"u2pext1",exit:"u2pext2",exiting:"u2pext3",enter:"u2pext4",entering:"u2pext5",exited:"u2pext6"},MobileSafari26BarTop:"u2pext1u u2pext1t u2pext1s _1fragem6y _1fragemwn _1fragem10n _1fragem112 _1fragem11z _1fragem132",MobileSafari26BarBottom:"u2pext1v u2pext1t u2pext1s _1fragem6y _1fragemwn _1fragem10n _1fragem112 _1fragem11z _1fragem132",ModalContentCrossFadeTarget:"u2pext0",overlayMobileSafari26:"u2pext1w"};const om=-1;function GV(e){if(!e||typeof window>"u")return!1;try{return new URL(e,window.location.href).origin!==window.location.origin}catch{return!1}}const $V=et("Modal");function or(e){const t=Ke(e.id,$V),n=BT("modal");if(n){const{active:r,setActive:o}=n;
23n.setActivatorAttributes({"aria-haspopup":"dialog"}),n.attach("onClick",()=>{o(!0)});const i=()=>{o(!1),typeof e.onHide=="function"&&e.onHide()},{children:a}=e;return s(im,{...e,id:t,onHide:i,open:r,children:Et(a)&&s(_c,{children:a})})}return s(im,{...e,id:t})}const WV={"small-100":300,small:300,base:480,"large-100":640,large:640,max:960};function YV(e){return e.endsWith("px")}const im=hg(hw(function({blocking:t,size:n="base",blockSize:r,open:o=!1,heading:i,source:a,iframeRef:l,onIframeLoad:c,iframeId:u,allow:d,accessibilityLabel:p,padding:m="base",primaryAction:f,secondaryActions:h,actionLayout:g="inline",footer:y,children:v,id:P,onAfterShow:b,onShow:C,closeButton:I="visible",dataTestIdForScrollableContent:S,...k}){const E=V(null),T=V(null),A=V(!1),R=FT();F(()=>{if(!(!o||!R))return R.value+=1,()=>{R.value=Math.max(0,R.value-1)}},[o,R]),o&&T.current!==o&&typeof C=="function"&&C(),T.current=o;const{modal:{margin:L}}=rt(),M=L!=null&&L!=="none",D=I==="hidden",{onHide:N,onAfterHide:U}=t?{}:k,[z,O]=oe(),K=!r&&GV(a),X=r??(K||z===om||n==="max"?"100%":void 0),ne=X?Jt({[tt.modalBlockSize]:X}):void 0,$=YV(n)?n:`${WV[n]}px`,{className:J,style:ee}=Tt({maxInlineSize:`@media (inline-size >= extraSmall) ${$}, none`}),te=nn(o,"slow"),[W,he]=oe("");F(()=>{he(tt.transitionVariant[te])},[te]);const{isLocked:re,lock:de,unlock:le}=Xc();F(()=>{o&&!re&&de(),!o&&re&&le()},[re,de,o,le]),F(()=>{if(te==="exited"&&(O(void 0),A.current&&(typeof U=="function"&&U(),A.current=!1)),te==="entered"){if(P&&FV(26)){const Ie=document.getElementById(P),j=document.activeElement,Z=j instanceof HTMLElement&&Ie?.contains(j)===!0&&j.matches('input, textarea, select, [contenteditable="true"]');Ie&&!Z&&Ie.focus()}typeof b=="function"&&b()}},[te,b,U,P]),F(()=>{o||(A.current=!0)},[o]),F(()=>{const Ie=j=>{(j.key==="Escape"||j.key==="Esc")&&!t&&o&&(E.current?.contains(document.activeElement)||!document.getElementById(Xr)?.contains(document.activeElement))&&typeof N=="function"&&N()};return document.addEventListener("keydown",Ie,!1),()=>{document.removeEventListener("keydown",Ie,!1)}},[t,o,N]);const _e=x(Ie=>{if(!r&&!K){const j=Ie.target;if(j?.contentWindow)try{O(j.contentWindow.document.body.scrollHeight)}catch{O(om)}}c?.()},[r,c,K]),ae=x(Ie=>{Ie.target===Ie.currentTarget&&typeof N=="function"&&N()},[N]);if(te==="exited")return null;const ge=i&&!p?gg(P):void 0,ke=!!(f||h),we=OV("26");return s(Sr,{children:s(Pu.Provider,{value:void 0,children:[s("div",{ref:E,className:Y(tt.Overlay,W,tt.overlayPaddingVariant[r==="100%"?"none":"base"],we&&tt.overlayMobileSafari26),onMouseDown:ae,children:s(Jc,{children:s("div",{id:P,className:Y(tt.Modal,tt.modalTopRadiusVariant[r==="100%"?"square":"rounded"],tt.modalMobileMarginVariant[M?"base":"none"],W,J,X&&tt.blockSize),role:"dialog","aria-modal":!0,style:{...ee,...ne},"aria-label":p,"aria-labelledby":ge,children:[a?s(q,{children:s(sn,{level:2,children:[s(sm,{id:P,hideCloseButton:D||t,onHide:N,heading:i}),s(XV,{source:a,iframeRef:l,iframeId:u,allow:d,accessibilityLabel:p,heading:i,iframeHeight:z,blockSize:r,handleIFrameLoad:_e,padding:m})]})}):s("div",{className:Y(tt.ScrollBox,o&&tt.ModalContentCrossFadeTarget,tt.scrollBoxPaddingVariant[m==="base"?i?"gap":"blockStart":"none"],tt.scrollBoxActionsVariant[ke||y?"withActions":"noActions"]),"data-testid":S,children:[s(sn,{level:2,children:[s(sm,{id:P,hideCloseButton:D||t,onHide:N,padding:m,heading:i}),s(JV,{padding:m,children:v})]}),ke&&s("div",{className:tt.ActionsScrollShadow})]}),y&&s("div",{className:tt.Footer,children:s(hs.Provider,{value:!1,children:s(_c,{children:y})})}),ke&&s(jV,{primaryAction:f,secondaryActions:h,actionLayout:g})]})})}),we&&s(q,{children:[s("div",{className:Y(tt.MobileSafari26BarTop,W)}),s("div",{className:Y(tt.MobileSafari26BarBottom,W)})]})]})})},{overlayType:"modal"}));function sm({hideCloseButton:e,id:t,onHide:n,padding:r,heading:o}){const i=typeof o=="string"?s(Wt,{level:1,children:o}):o;return!i&&e?null:s("div",{className:Y(tt.Header,tt.headerPaddingVariant[i?"base":r==="base"?"large":"extraLarge"]),children:[i&&s("div",{id:gg(t),className:Y(tt.HeaderContent,tt.headerContentPaddingVariant[e?"none":"base"]),children:i}),!e&&s(KV,{onHide:n})]})}function jV({primaryAction:e,secondaryActions:t,actionLayout:n="inline"}){return s(_c,{children:s("div",{className:Y(tt.Actions,tt.actionLayoutVariant[n]),children:[(n==="inline"||Et(t))&&s("div",{className:Y(tt.SecondaryActions,tt.secondaryActionLayoutVariant[n]),children:t}),e]})})}function KV({onHide:e}){const t=ln();return s("button",{type:"button",className:tt.CloseButton,onClick:()=>{typeof e=="function"&&e()},"aria-label":t("closeModal")||"Close",children:s(Me,{type:"x",size:"base"})})}function JV({children:e,padding:t="base"}){return Et(e)&&s("div",{className:Y(tt.Content,tt.contentPaddingVariant[t]),children:s(hs.Provider,{value:!1,children:s(i_,{children:e})})})}function XV({source:e,iframeRef:t,iframeId:n,allow:r,accessibilityLabel:o,heading:i,iframeHeight:a,handleIFrameLoad:l,padding:c="base"}){const u=typeof i=="string"?i:void 0,d=r;return s("iframe",{src:e,title:o??u,name:n,className:Y(tt.IFrame,tt.iframePaddingVariant[c]),ref:t,onLoad:l,id:n,...a&&a>0&&{style:{height:a}},...d?{allow:d}:void 0})}function QV({submitButtonAppearance:e,submitText:t,cancelText:n,loading:r,disabled:o,handleSubmit:i,handleCancel:a}){const l=!!n,c=!!t;return s(gt,{gridTemplateColumns:l&&c?"1fr 1fr":"1fr",gap:"base",inlineSize:"100%",children:[l&&s(an,{variant:"secondary",inlineSize:"fill",onClick:a,children:n}),c&&s(an,{variant:"primary",inlineSize:"fill",disabled:o,loading:r,type:"submit",tone:e,onClick:i,children:t})]})}const Tl=["deliveryNext","taxes","landedCostDetails","remoteTaxDetails","total"];function ZV({isStockProblems:e,shippingRequired:t,deliveryMethodOptions:n,mustSelectProvidedShippingRate:r,isSplitShipAndPickup:o,initialPickupOnlySelection:i,deliveryNext:a,currentSelectedMethods:l}){if(e||!t)return;const[c]=n;
23if(!c||r||o)return;if(i?.activeMethod){const{activeMethod:d,targetMethod:p}=i;return{nextMethods:[p],previousMethods:[d==="LOCAL"?"SHIPPING":d],loadingFields:Tl}}return a?.status==="filled"?void 0:{nextMethods:[...n.find(d=>JSON.stringify(d)===JSON.stringify(l))??c],loadingFields:Tl}}var Rr=(e=>(e.Truck="truck",e.PackageDelivery="package-delivery",e.Store="store",e.Location="location",e))(Rr||{});const Su=ft("DeliveryMethodsContext"),x_=He(void 0);function M_(){return Ut(Su)}function eU(){return Ee(x_)}function Bs(e){const t=Ee(Su),n=Tl.includes(e);return w(()=>n&&(t?.initialReconciliationPending.value??!1))}function za(e){return e/sk}function wY(){const{i18n:e}=_();return x(t=>{if(typeof t=="number"){const a=Math.ceil(za(t));return a<1?null:e.translate("shipping.estimated_delivery_date",{count:a})}const{lower:n,upper:r}=t;if(n===void 0||r===void 0)return null;const o=Math.ceil(za(n)),i=Math.ceil(za(r));return i<1?null:o<1||o>i?e.translate("shipping.estimated_delivery_date",{count:i}):e.translate("shipping.estimated_delivery_date_range",{minimum:o,maximum:i})},[e])}function LY(){const e=H().deliveryNext,t=Qn();return w(()=>{const n=e.value;return!n||n.status==="unavailable"||t.value.enabledDeliveryMethods.length>1?!1:n.lines.every(r=>r.status==="not_required"?!0:r.status!=="available"?!1:r.methods.length<2)})}function tU(){const{deliveryNext:e,allViolations:t}=H(),n=ze("deliveryNext");return w(()=>{const r=e.value,o=n.value,i=t.value;if(o)return{value:null,loading:o};const a=i?.some(({code:c})=>ik.has(c));return{value:r?.status==="unavailable"&&(r.hasNoDeliveryMethods||a||!1),loading:!1}})}function RY(){const{allViolations:e}=H(),t=ze("deliveryNext");return w(()=>{const n=t.value;return n?{value:null,loading:n}:{value:e.value?.some(({code:o})=>ak.has(o))??!1,loading:!1}})}function nU(){const e=H().deliveryNext;return w(()=>zr(e.value))}function xY(){const{deliveryLines:e}=se();return w(()=>{const t=e.value;return t.length>0&&t.every(n=>{const r=n.value?.deliveryMethodTypes;return r?.length===1&&r[0]==="PICK_UP"})})}function rU(e){return(e??[]).filter(t=>t.requiresShipping).reduce((t,n)=>t+(n.quantity??0),0)}function MY(){const e=sc();return w(()=>{const t=e.value;if(!t)return{};const n={};for(const r of t){if(r.status!=="available")continue;const o=br(r);if(!o)continue;const{methodType:i}=o,a=rU(r.targetMerchandiseLines);n[i]=(n[i]??0)+a}return n})}const oU="cross-border-consolidation-modal";function iU(){const{checkout:e,i18n:t}=_(),n=M_(),r=e.crossBorderConfirmState.value,o=!!(r&&!r.onCancel),i=Vc(),a=r?()=>{r.onConfirm(n),i(t.translate("split_delivery.cross_border.banner"))}:void 0;return s(or,{id:oU,open:!!r,heading:o?t.translate("split_delivery.cross_border.modal.country_changed_heading"):t.translate("split_delivery.cross_border.modal.heading"),onHide:r?.onCancel,closeButton:o?"hidden":"visible",primaryAction:s(QV,{handleSubmit:a,handleCancel:r?.onCancel,submitText:o?t.translate("general.continue_button_label"):t.translate("split_delivery.cross_border.modal.change_country"),cancelText:o?void 0:t.translate("address_management.address_form.cancel")}),children:s(G,{children:t.translate("split_delivery.cross_border.modal.content")})})}function am(e,t){const n=[],r=e.includes("LOCAL");return(e.includes("SHIPPING")||r)&&n.push(r?["SHIPPING","LOCAL"]:["SHIPPING"]),e.includes("PICK_UP")&&n.push(["PICK_UP"]),e.includes("PICKUP_POINT")&&!t&&n.push(["PICKUP_POINT"]),n}function N_(e){let t=!1,n=!1;for(const r of e){const o=r.includes("SHIPPING");for(const i of r)if(i!=="NONE"){if(i==="SHIPPING"){t=!0;continue}if(i==="PICK_UP"){n=!0;continue}if(!(i==="LOCAL"&&o))return!1}}return t&&n}function sU(e){return(e.value.targetMerchandiseLines??[]).some(t=>t.requiresShipping)}function aU(e){const t=e.filter(sU);return N_(e.map(n=>n.value.deliveryMethodTypes))&&t.some(n=>n.value.deliveryMethodTypes.includes("SHIPPING"))&&t.some(n=>n.value.deliveryMethodTypes.includes("PICK_UP"))}function lU({deliveryNext:e,isThankYouPage:t,proposedDeliveryLines:n,splitShipPickupUiEnabled:r}){if(!r)return!1;const o=N_(ei(e).filter(a=>a.status==="available").map(a=>a.methods.map(({methodType:l})=>l)));return t?o:!(e&&"supportsSplitDeliveryMethod"in e&&e.supportsSplitDeliveryMethod)?!1:aU(n)}function Eu(){const{deliveryNext:e}=H(),t=se(),{shop:n}=_(),r=Ce();return w(()=>lU({deliveryNext:e.value,isThankYouPage:Ts(r.value.currentDetour),proposedDeliveryLines:t.deliveryLines.value,splitShipPickupUiEnabled:n.shipPickupInOneOrderEnabled}))}function Oi(e){const t=V(e);return F(()=>{t.current=e},[e]),t}const cU=()=>{const{userEvents:e,shop:{id:t},checkout:{identity:n},source:r}=_(),o=n.current.value==="shopPay",i=H().buyerIdentity.value?.customerProfile,{negotiating:a,methods:l}=M_(),c=ah();F(()=>{!a.value&&l.value.includes("PICK_UP")&&e.monorailEvent({schemaId:"local_pickup_checkout/3.1",payload:{checkoutToken:r.checkoutSessionIdentifier||"",eventType:"checkout_pickup_tab_selected",shopId:parseInt(Be(t),10),numberLocationsFound:c.value?.methods.length,userId:i?.id?parseInt(Be(i.id),10):void 0,checkoutSurface:o?"shop_pay":"guest_checkout"}})},[i?.id,a.value,o,c.value?.methods.length,e,l.value,r.checkoutSessionIdentifier,t])},uU=(e,t)=>{const n=i=>i.handle===e,r=t?.findIndex(n);return{locationId:t?.find(n)?.originLocation?.id,selectedLocationRank:r}},dU=(e,t)=>{const n=V(),{userEvents:r,shop:{id:o},checkout:{identity:i},source:a}=_(),l=i.current.value==="shopPay",c=H().buyerIdentity.value?.customerProfile,u=ah(),d=u.value?.selectedDeliveryMethodHandle,p=u.value?.methods;F(()=>{const{locationId:m,selectedLocationRank:f}=uU(d,p);m&&d!==n.current&&(n.current=d,r.monorailEvent({schemaId:"local_pickup_checkout/3.1",payload:{eventType:"checkout_pickup_location_selected",checkoutToken:a.checkoutSessionIdentifier||"",shopId:parseInt(Be(o),10),locationId:Be(m),selectedLocationRank:f,userId:c?.id?parseInt(Be(c.id),10):void 0,numberLocationsFound:p?.length||0,checkoutSurface:l?"shop_pay":"guest_checkout"}}))},[c?.id,l,p,r,d,a.checkoutSessionIdentifier,o])},pU=()=>{const e=wn(),t=Eu(),n=Ce(),r=w(()=>t.value&&!Ts(n.value.currentDetour));$e(()=>{r.value&&_t(()=>{e("splitShipAndPickupIntent",{timestamp:new Date})})})};function mU(){return cU(),dU(),pU(),null}function fU(){const{shippingAddress:e}=se(),{shopPay:t,checkout:n}=_(),r=H(),o=lk(),i=n.identity.current.value==="shopPay",a=x(()=>
23{if(!o.value||r.mustSelectProvidedAddress.value)return;const c=t.session.selectedShippingAddress.value;if(!c?.address)return;const d=n.configuration.addressSettings.nonBillingAddressSettings.value.isRequired("phone"),p=t.user.phoneNumber.value;e.value={...c?.address,phone:d&&!c?.address.phone?p:c?.address.phone}},[o,n.configuration.addressSettings.nonBillingAddressSettings,r.mustSelectProvidedAddress,e,t.user.phoneNumber,t.session.selectedShippingAddress]);return{correctShippingAddress:x(c=>{if(!i)return;c.includes("SHIPPING")&&a()},[a,i])}}function D_(e,t){const n=e.find($i),r=t.find($i);return!n&&r?{direction:"entering",pickupType:r}:n&&!r?{direction:"leaving",pickupType:n}:{direction:"none"}}function hU(e){return e.reduce((t,n)=>{const{type:r,deliveryMethodTypes:o,deliveryMethodHandle:i}=n.value;return o.some($i)?{...t,[r]:i}:t},{})}function gU(){const{deliveryLines:e}=se(),t=V({});return{preservePickupSelectionAcrossToggles:x((r,o)=>{const i=D_(r,o);if(i.direction==="leaving"){t.current[i.pickupType]=hU(e.value);return}if(i.direction==="entering")return t.current[i.pickupType]},[e])}}function yU(e,t){return e?.countryCode===t.countryCode&&e?.zoneCode===t.zoneCode&&e?.postalCode===t.postalCode&&e?.city===t.city&&e?.coordinates?.latitude===t.coordinates?.latitude&&e?.coordinates?.longitude===t.coordinates?.longitude}const vU=["phone","company","address2"];function _U(e,t){if(e.coordinates)return!0;const{address1:n,city:r,firstName:o,lastName:i}=e;return n&&r&&o&&i?vU.every(a=>e[a]||!t(a)):!1}function bU(){const{locationAddress:e,shippingAddress:t}=se(),{checkout:n,shop:r}=_(),o=r.hasFlagEnabled(ck),i=V(e.peek()),a=V(!1);return{syncLocationAddressFromShipping:x((c,u)=>{if(o||D_(c,u).direction!=="entering"||a.current)return;const d=i.current;if(d&&!yU(e.value,d)){a.current=!0;return}const p=t.value;if(!p?.countryCode)return;const{isRequired:m}=n.configuration.addressSettings.nonBillingAddressSettings.value,h=_U(p,g=>m(g,{countryCode:p.countryCode,useMerchantSettings:!0}))?p:{};e.value=uk(h,p.countryCode,p.zoneCode),i.current=e.value},[n,o,e,t])}}function lm(e){const t=e.filter(n=>n==="SHIPPING"||n==="LOCAL");if(t.length>0)return t;if(e.length===1&&e[0]==="PICK_UP")return["PICK_UP"];if(e.length===1&&e[0]==="PICKUP_POINT")return["PICKUP_POINT"]}function PU({children:e}){const t=V(void 0),{i18n:n,checkout:r,observability:o,shop:i,router:a,webMcp:l}=_(),c=i.hasFlagEnabled(dk),u=Le(!1),d=Le(!1),p=Uc(),{negotiate:m}=Mt(),{loading:f}=Je(),h=r.identity.current.value==="shopPay",g=Qn(),y=tU(),v=V(new Set),P=V(),{correctShippingAddress:b}=fU(),{syncLocationAddressFromShipping:C}=bU(),{preservePickupSelectionAcrossToggles:I}=gU(),{billingAddressOption:S,deliveryLines:k,discountLines:E,merchandiseLines:T,shippingAddress:A,locationAddress:R}=se(),L=V(lh(A.peek())).current,M=Eu(),{deliveryNext:D}=H(),N=io(),U=a.currentUrlMatches("/stock-problems"),[z]=zL("ONE_TIME_PURCHASE"),O=We(z),[K,X]=Rg(),ne=HL(),$=!c,J=We(K),ee=w(()=>Ef(D.value)||pk(k.value)||M.value),te=w(()=>ee.value?J.value:O.value),W=B(()=>{if(ee.peek())return;const ce=g.peek().enabledDeliveryMethods??[];if(!SU(ce))return;const[ie]=te.peek();if(ie!=="PICK_UP")return{activeMethod:ie,targetMethod:"PICK_UP"}},[ee,te,g]),he=Le(W!=null),re=w(()=>{if(r.proposal.negotiated.fields.mustSelectProvidedShippingRate.value)return te.value;if(!ee.value){const ie=g.value.enabledDeliveryMethods??[],me=Ha(ie),Ne=!!y.value.value&&L,Ge=D.value?.status==="unavailable"&&!Ne,[lt]=te.value;return W&&he.value&&!d.value?[W.targetMethod]:Ge&&!d.value&&me&&lt!=="PICKUP_POINT"?["SHIPPING"]:lt?[lt==="LOCAL"?"SHIPPING":lt]:[]}const ce=te.value.filter(ie=>ie!=="LOCAL");return!ce.includes("SHIPPING")&&te.value.includes("LOCAL")&&ce.push("SHIPPING"),ce}),de=x((ce,ie)=>{if(N.value)return;const me=Ha(ce),Ne=Ha(ie);ie.some($i)&&!Ne&&(!h&&me&&t.current==null&&(t.current=S.value),S.value="custom"),Ne&&!me&&!h&&(i.requireMatchingShippingAndBilling?S.value="shipping":t.current==null?S.value=i.sameBillingAndShippingAddress?"shipping":"custom":S.value=t.current,t.current=void 0)},[i,h,N,S]),le=V(re.peek());$e(()=>{const ce=le.current,ie=re.value;le.current=ie,ce!==ie&&_t(()=>de(ce,ie))});const _e=x((ce,ie,me)=>{de(ie,ce),le.current=ce,b(ce),me?R.value=me:C(ie,ce);const Ne=me?void 0:I(ie,ce),Ge=lm(ce);tn(()=>{i.shipPickupInOneOrderEnabled&&mk(k),X(ce),i.shipPickupInOneOrderEnabled&&Ge&&Sd({deliveryLines:k,merchandiseLines:T.value,deliveryMethodTypes:Ge}),ne(void 0),Ne&&Ps(k,Ne),Ed(E),he.value=!1})},[de,b,R,C,I,i.shipPickupInOneOrderEnabled,k,X,T,ne,E,he]),ae=x((ce,ie=re.value,me)=>{const Ne=!h&&!N.value&&!ie.includes("SHIPPING")&&ce.includes("SHIPPING")?[]:["deliveryNext"];return _e(ce,ie),u.value=!0,p?.dispatch?.("deliveryMethodChanged"),m({include:Ne,onComplete:Ge=>{const lt=f.value.has("deliveryNext");if(Ge.status==="stale"&&lt){const Ft=f.subscribe(kt=>{kt.has("deliveryNext")||(tn(()=>{u.value=!1,me?.()}),Ft())})}else tn(()=>{u.value=!1,me?.()})}})},[re,h,N,_e,u,p,m,f]),ge=w(()=>r.proposal.negotiated.fields.mustSelectProvidedShippingRate.value??!1),ke=w(()=>oc({checkout:r})),we=w(()=>am(g.value.enabledDeliveryMethods??[],ke.value));F(()=>l?.unstable_provideFulfillmentController({getAvailableMethodTypes:()=>we.value,getSelectedMethodTypes:()=>re.value,markBuyerSelection:()=>{d.value=!0,he.value=!1},applyMethodChange:_e,reconcileSameMethod(ce){const ie=lm(ce);i.shipPickupInOneOrderEnabled&&ie&&Sd({deliveryLines:k,merchandiseLines:T.value,deliveryMethodTypes:ie})&&Ed(E)}}),[l,we,re,d,he,_e,k,T,i.shipPickupInOneOrderEnabled,E]);const Ie=w(()=>{const ce=cm(we.value,n,i,$);return ge.value?ce.filter(ie=>re.value.includes(ie.id)):ce}),j=w(()=>
23{if(ge.value)return Ie.value;const ce=v.current,ie=am([...g.value.enabledDeliveryMethods??[],...ce],ke.value),me=ie.length>we.value.length?cm(ie,n,i,$):Ie.value;return me.length>1&&me.forEach(Ne=>ce.add(Ne.id)),me}),Z=B(()=>ZV({isStockProblems:U,shippingRequired:fk(r.proposal),deliveryMethodOptions:j.value.map(({value:ce})=>ce),mustSelectProvidedShippingRate:ge.value,isSplitShipAndPickup:M.value,initialPickupOnlySelection:W,deliveryNext:D.value,currentSelectedMethods:re.value}),[]),fe=Le(Z!=null);$e(()=>{const ce=Ie.value,ie=j.value;if(ce===ie||ie.length<=1){P.current=void 0;return}const me=JSON.stringify([ie.map(({id:Ne})=>Ne),ce.map(({id:Ne})=>Ne)]);P.current!==me&&(P.current=me,o.log("sticky_delivery_method_selector","Showing delivery method selector with previous delivery options because sellability narrowed",{previousOptionCount:ie.length,currentOptionCount:ce.length}))}),F(()=>{if(!Z||d.value){fe.value=!1;return}ae(Z.nextMethods,Z.previousMethods,()=>{fe.value=!1})?.catch(ce=>{tn(()=>{u.value=!1,fe.value=!1}),o.error(ce)})},[]);const be=x(ce=>{const ie=j.value.find(me=>me.id===ce[0]);ie&&(d.value=!0,ae(ie.value))},[j,ae,d]),Te=Oi(be),Se=w(()=>j.value.length<=1),Ae=w(()=>{if(!Se.value)return{options:j,selected:re,select:ce=>{Te.current(ce)},variant:$?"next":"default"}}),Ue=B(()=>({negotiating:u,initialReconciliationPending:fe,methods:re,setSelectedMethodTypes:ae}),[u,fe,re,ae]);return s(Su.Provider,{value:Ue,children:[s(mU,{}),s(ve,{when:M,children:s(iU,{})}),s(x_.Provider,{value:Ae.value,children:e})]})}function Ha(e){return e.includes("SHIPPING")||e.includes("LOCAL")}function SU(e){return e.length===1&&e[0]==="PICK_UP"}function cm(e,t,n,r){const o=[],i=typeof n.translations.delivery_options=="object"?n.translations.delivery_options:void 0,a=e.some(([d])=>d==="PICKUP_POINT"),l=e.find(([d])=>d==="SHIPPING");if(l){const d=!!i?.ship_to_address,p=a&&(!r||d)?t.translate("delivery_options.ship_to_address"):t.translate("delivery_options.ship");o.push({id:"SHIPPING",value:l,label:p,icon:r?Rr.PackageDelivery:Rr.Truck})}const c=e.find(([d])=>d==="PICK_UP");if(c){const d=!!i?.pick_up,p=!!i?.pick_up_from_store,m=a?p:d,f=a?t.translate("delivery_options.pick_up_from_store"):t.translate("delivery_options.pick_up"),h=a?t.translate("delivery_options.pickup_store"):t.translate("delivery_options.pickup");o.push({id:"PICK_UP",value:c,label:r&&!m?h:f,icon:r&&!a?Rr.Location:Rr.Store})}const u=e.find(([d])=>d==="PICKUP_POINT");if(u){const d=!!i?.pickup_point_method_definition,p=r&&!d?t.translate("delivery_options.pickup_point"):t.translate("delivery_options.pickup_point_method_definition");o.push({id:"PICKUP_POINT",value:u,label:p,icon:Rr.Location})}return o}var EU={Abbreviation:"_1qifbzv1 _1qifbzv0 _1fragem128"};function Cu({children:e,id:t,title:n}){return s("abbr",{className:EU.Abbreviation,id:t,title:n,children:e})}const CU="$.availableRedeemables.redeemable",NY=e=>"target"in e?e.target===CU:!1;function qa(e,t){if(!e||!t||e.redemptionSource!==t.redemptionSource)return!1;if(e.redemptionSource==="CUSTOM")return kU(e.redemptionContent,t.redemptionContent);throw Error(`Equality method not supported for redemption source ${e.redemptionSource}`)}function kU(e,t){return!e||!t?!1:e?.paymentMethodIdentifier===t?.paymentMethodIdentifier&&IU(e?.redemptionAttributes,t?.redemptionAttributes)}function IU(e,t){return!e||!t||e.length!==t.length?!1:e.every(n=>t.some(r=>n.key===r.key&&n.value===r.value))}function AU(e){return e.maskedIdentifier?.slice(-4).toUpperCase()}function TU(e){return e?`•••• ${e}`:""}class wU extends Error{constructor(){super(...arguments),this.name="TooManyRedeemablePaymentMethodsError"}}function LU(){const e=H().paymentMethods;return w(()=>{const t=e.value?.flatMap(n=>n.type==="redeemable"&&n.redemptionSource==="CUSTOM"?[n]:[]);if(!(t===void 0||t.length===0)){if(t.length>1)throw new wU(`There can only be a single custom redeemable payment method per redeemable type.
24Gift card is currently the only supported redeemable type`);return t[0]}})}function O_(){const e=LU(),[t,n]=oe([]),r=ac("CUSTOM"),o=B(()=>r.value.filter(m=>{const f=t.some(g=>qa(g,m.method)),h=!m.cost||m.cost.amount===0;return f||h?!1:!!m.method.redemptionContent}),[r.value,t]),i=Ot(),{negotiate:a}
24=Mt(),l=!!e.value,c=x(m=>{const f=y=>y.type==="redeemable"&&y.redemptionSource==="CUSTOM"?!qa(m,y):!0,h=i.parts.paymentLines.value;i.parts.paymentLines.value=h.filter(y=>f(y.method));const g=i.parts.availableRedeemables.value;i.parts.availableRedeemables.value=g?.filter(y=>f(y.paymentMethod))},[i]),u=x((m,f)=>{const h=xU(m,f);if(h){const g=i.parts.paymentLines.value;return i.parts.paymentLines.value=[...g,...h?[h]:[]],new Promise(y=>{a({include:["paymentLines"],onComplete:v=>{v.status==="error"&&v.violations.some(Uf)&&c(h.method),y(v)}})})}else return Promise.resolve(null)},[a,i,c]),d=x(m=>{const f=i.parts.paymentLines.value.length;return c(m),n(h=>[...h,m]),f>i.parts.paymentLines.value.length?new Promise(h=>{a({include:["paymentLines"],onComplete:g=>{n(y=>y.filter(v=>!qa(v,m))),h(g)}})}):Promise.resolve()},[a,i,c]),p=x(()=>{const m=i.parts.paymentLines.value,f=m.length;return i.parts.paymentLines.value=m.filter(h=>{const{method:g}=h;return!(g.type==="redeemable"&&g.redemptionSource==="CUSTOM")}),f>i.parts.paymentLines.value.length?new Promise(h=>{a({include:["paymentLines"],onComplete:g=>{h(g)}})}):Promise.resolve()},[a,i]);return{canApplyGiftCards:l,paymentMethod:e.value,paymentLines:o,submit:u,remove:d,removeAll:p}}function ku(){const e=H().paymentLines;return w(()=>e.value?.lines.filter(t=>t.method.type==="giftCard")??[])}function vi(){const e=ac("STORE_CREDIT"),{paymentLines:t}=O_(),n=ku();return w(()=>{const r=!!e.value.length,o=!!t.length,i=!!n.value.length;return r||o||i})}const RU=0;function xU(e,t){return!t||t.amount<=0?null:{method:e.paymentMethod,cost:{amount:RU,currencyCode:t.currencyCode}}}function um(){const e=hk(),t=gk(),n=H(),r=ri(),o=n.deferredTotal,{i18n:i}=_(),a=We(vy()),l=vi(),c=We(Fe()),u=St(),d=w(()=>{const p=r.value,m=e.value;if(!p||!m)return;const f=i.formatCurrency(p.amount,{currency:p.currencyCode,form:"short"}),h=p.amount<m.amount&&!t.value&&!o.value&&!l.value;return{amountDue:p,paymentDueFormatted:f,priceBeforeReductionsFormatted:i.formatCurrency(m.amount,{currency:m.currencyCode,form:"short"}),showCurrencyCode:c.value.disclosure.style==="base"&&a.value&&(!u.value||!f.includes(p.currencyCode)),showSubtotalBeforeReductions:h,totalAmountDueAccessiblityLabel:h?i.translate("order_summary.price_after_discount_aria_text"):i.translate("order_summary.total_price_label")}});return s(ve,{when:d,children:({amountDue:p,paymentDueFormatted:m,priceBeforeReductionsFormatted:f,showCurrencyCode:h,showSubtotalBeforeReductions:g,totalAmountDueAccessiblityLabel:y})=>s(Q,{alignItems:"end",children:[g?s(q,{children:[s(G,{accessibilityVisibility:"exclusive",children:i.translate("order_summary.total_price_label")}),s(G,{size:"small",color:"subdued",type:"redundant",translate:!1,children:f})]}):null,s(G,{accessibilityVisibility:"exclusive",children:y}),s(Q,{direction:"inline",alignItems:"center",gap:"small-300",children:[h&&s(Cu,{children:s(G,{type:"small",color:"subdued",translate:!1,children:p.currencyCode})}),s(je,{color:"base",size:"large",translate:!1,children:s(G,{type:"strong",children:m})})]})]})})}function F_(){const{i18n:e}=_();return x((t,n={})=>{const r=new Date(t),o=new Date(Date.now()).getFullYear(),i=n.month??"long",a=r.getFullYear()>o?"numeric":void 0;return e.formatDate(r,{month:i,day:"numeric",year:a})},[e])}function Iu(){const{shop:{captureAtFulfillmentEnabled:e}}=_(),t=H(),n=t.buyerIdentity,r=t.paymentFlexibilityPaymentTermsTemplate;return w(()=>r.value?.type==="FULFILLMENT"&&e===!0&&!n.value?.purchasingCompany)}function Au(){const e=oi(),t=Ce(),n=On(),r=H(),o=Iu(),i=F_(),a=vi(),{shop:l,checkout:c,embed:u,i18n:d,source:p,shopPay:m}=_(),{orderSummary:f}=Fe(),h=l?.name,g=f.totalLabel,y=zt(u?.embedder),v=ch(m.app.config);return w(()=>{const{currentPage:P,plan:b,currentDetour:C}=t.value,I=r.deferredTotal.value,S=r.paymentFlexibilityPaymentTermsTemplate.value,k=c.configuration.orderSummary?.layoutStyle==="COMPACT";let E;g==="TOTAL"?E=d.translate("order_summary.total_label"):y?E=d.translate("universal.iframes.subtotal_label"):g==="ORDER_TOTAL"?E=d.translate("order_summary.order_total_label"):k&&h&&!v?E=d.translate("order_summary.pay_merchant_label",{merchant_name:h}):E=d.translate("order_summary.total_label");const T=y?E:d.translate("order_summary.total_due_label"),A=C?.type==="thankYou",R=I&&I.amount.amount>0;if(e.value&&A)return d.translate("order_summary.deferred_payment_info.paid_today_next");if(nt(p))return d.translate("order_summary.total_due_label");if(n.value)return d.translate("order_summary.payment_terms_totals.due_later_checkout_to_draft");if(R)return d.translate("order_summary.payment_terms_totals.due_today_next");if(S){if(o.value)return a.value?T:E;if(S?.dueDate){const L=i(S.dueDate,{month:"short"});return d.translate("order_summary.deferred_total_due_date_label_next",{date:L})}return S?.type==="FULFILLMENT"?d.translate("order_summary.payment_terms_totals.due_on_fulfillment_next"):S?.type==="RECEIPT"?d.translate("order_summary.total_due_later_label"):d.translate("order_summary.payment_terms_totals.due_later_checkout_to_draft")}return A?a.value?d.translate("order_summary.total_paid_label"):d.translate("order_summary.partial_total_label"):yn(P,b.greenPath[b.greenPath.length-1])?a.value?T:E:a.value?T:d.translate("order_summary.partial_total_label")})}function B_({children:e,condition:t}){return t?s("picture",{children:e}):s(q,{children:e})}const MU=new Map(yk({addMaxWidth:!1}).map(({breakpoint:e,query:t})=>[e,t]));function NU(e){return cs(e)?{base:[{source:e.default}],...e.conditionals.reduce((t,n)=>{const r=n.conditions.viewportInlineSize===void 0?"base":n.conditions.viewportInlineSize.min,o=n.conditions.resolution===void 0?[{source:n.value}]:[{source:n.value,resolution:n.conditions.resolution}],i=r in t?t[r]??[]:[];return{...t,[r]:[...i,...o]}},{})}:{base:[{source:e}]}}function V_(e,t){if(!(e||!t||!cs(t)))return Object.entries(NU(t)).sort(([n],[r])=>{const o=Bo[n],i=Bo[r];return o!=null&&i!=null?i-o:0}).map(([n,r])=>{const o=MU.get(n);if(o!==void 0&&Array.isArray(r)){const i=r.map(({source:a,resolution:l})=>[a,l&&`${l}x`].join(" ").trim()).join(", ");return ns("source",{key:o,media:o,srcSet:i})}}
24).filter(Boolean)}function U_(e){if(e)return cs(e)?typeof e.default=="string"?e.default:void 0:e}var z_={"large-200":{boxSize:100},large:{boxSize:86},base:{boxSize:64},small:{boxSize:40},"small-200":{boxSize:32}},DU=1,mt={BadgeWrapper:"_1m6j2n311 _1m6j2n310 _1fragemwi",Badge:"_1m6j2n313 _1m6j2n312 _1fragemfp _1fragemgj _1fragemi7 _1fragemhd _1fragemsw _1fragemr3 _1fragem64 _1fragem19 _1fragembj _1fragemyz",Overlay:"_1m6j2n31a _1m6j2n319 _1fragemwi _1fragem64 _1fragem19 _1fragembj",Placeholder:"_1m6j2n3v _1m6j2n3u _1fragem108 _1fragem10n _1fragemzt _1fragem112 _1fragemwi _1fragem64 _1fragem19 _1fragembj",ProductThumbnail:"_1m6j2n36 _1m6j2n35 _1fragemws",ProductThumbnailImage:"_1m6j2n3t _1m6j2n3s _1fragemzf _1fragem4q _1fragem5u",depthVariant:{0:"_1m6j2n3j",1:"_1m6j2n3k _1m6j2n3i",2:"_1m6j2n3l _1m6j2n3i",legacy:"_1m6j2n3m _1m6j2n3i"},aspectRatioVar:"var(--_1m6j2n30)",borderColorVariant:{base:"_1m6j2n3b",custom:"_1m6j2n3c"},borderRadiusVariant:{base:"_1m6j2n3d",small:"_1m6j2n3e"},borderVariant:{none:"_1m6j2n3y _1m6j2n3w _1fragemeg _1fragemdw _1fragemf0 _1fragemdc",full:"_1m6j2n3z _1m6j2n3x _1fragemk5 _1fragemjl _1fragemkp _1fragemj1"},boxShadowMargin:"_1m6j2n318",productThumbnailSizeVariant:{"large-200":"_1m6j2n3n",large:"_1m6j2n3o",base:"_1m6j2n3p",small:"_1m6j2n3q","small-200":"_1m6j2n3r"},orientationVariant:{landscape:"_1m6j2n3f",portrait:"_1m6j2n3g",square:"_1m6j2n3h"},thumbnailBackgroundVariant:{base:"_1m6j2n39 _1m6j2n37 _1fragem133",subdued:"_1m6j2n3a _1m6j2n38 _1fragem13d"},badgeSizeVariant:{base:"_1m6j2n314",small:"_1m6j2n315"},badgeToneVariant:{auto:"_1m6j2n316",accent:"_1m6j2n317"},visuallyHidden:"_1m6j2n31b _1fragem121"};function Vs({alt:e="",depth:t,size:n,sizes:r,source:o,src:i,srcSet:a,totalItems:l,overlay:c}){const{merchandiseThumbnail:{aspectRatio:u=1,background:d="subdued",border:p="full",fit:m="contain",borderWidth:f,borderColor:h="base",shadow:g,badge:{background:y}={}}={}}=rt(),v=H_(n),P=!y||y==="base"?"auto":"accent",b=V_(i,VU(o)),C=g??"extraSmall",I=FU(f)??q_(v),{className:S}=Tt({boxShadow:C}),{className:k}=Tt({objectFit:m,borderWidth:I});return s("div",{className:Y(mt.ProductThumbnail,mt.thumbnailBackgroundVariant[d],mt.productThumbnailSizeVariant[v],mt.orientationVariant[BU(u)],S,C!=="none"&&mt.boxShadowMargin,t!=null&&mt.depthVariant[t],mt.borderRadiusVariant[v.startsWith("small")?"small":"base"]),style:Jt({[mt.aspectRatioVar]:`${u}`}),children:[i||G_(o)?s(B_,{condition:!!b,children:[b,s("img",{src:i??U_(o),srcSet:a,sizes:r,alt:e,loading:"eager",className:Y(mt.ProductThumbnailImage,mt.borderVariant[p],mt.borderColorVariant[h],k)})]}):s("div",{className:Y(mt.Placeholder,mt.borderVariant[p],mt.borderColorVariant[h],k),children:s(Me,{type:"image",size:OU(v)})}),c!==void 0&&s("div",{className:Y(mt.Overlay,mt.borderVariant[p],mt.borderColorVariant[h]),children:s("strong",{children:c})}),l===void 0?null:s(UU,{size:v,tone:P,children:l})]})}function H_(e){if(typeof e!="string")return"base";const t=e.replace("-100","");return t in z_?t:"base"}function q_(e){return e.startsWith("small")?"base":"large"}function OU(e){return e.startsWith("small")?"small":e.startsWith("large")?"large":"base"}function FU(e){switch(e){case"none":return"none";case"base":return"base";case"large":case"large100":return"large";case"large200":return"large-200";default:return}}function BU(e){return e===1?"square":e<1?"portrait":"landscape"}function G_(e){return typeof e=="string"||cs(e)}function VU(e){return G_(e)?e:void 0}function Us(e){const{merchandiseThumbnail:{aspectRatio:t=1}={}}=rt(),{boxSize:n}=z_[H_(e)];return{blockSize:n/(t<=1?1:t),inlineSize:n*(t>=1?1:t)}}function UU({children:e,size:t,tone:n}){const r=ln(),o=n==="accent"?n:"auto",{className:i}=Tt({borderWidth:q_(t)});return s("div",{className:mt.BadgeWrapper,children:s("div",{className:Y(mt.Badge,mt.badgeSizeVariant[t.startsWith("small")?"small":"base"],mt.badgeToneVariant[o
24],i),children:[s("span",{className:mt.visuallyHidden,children:r("productThumbnailQuantityLabel")}),e]})})}const dm={"StackedThumbnails-fan":"DiYxd","StackedThumbnails-fan-legacy":"XEYoy","StackedThumbnail-fan":"P6qdf","StackedThumbnail-fan-legacy":"jZNeD","StackedThumbnails-inline":"raPom","StackedThumbnail-inline":"jpkdO","StackedThumbnails-inline-discrete":"md55H"};function Tu({variant:e="fan",merchandise:t,size:n,max:r=2,useImageAltTexts:o=!0,useTitleAsAltTextFallback:i=!1,useResponsiveImageSources:a=!1,sortByPrice:l=!1,showQuantityBadges:c=!0}){const u=e==="inline-discrete",d=u&&t.length>r?t.length-r+1:0,m=(l?[...t].sort((h,g)=>pm(g)-pm(h)):t).slice(0,r),f=Us(n);return s("div",{className:dm[`StackedThumbnails-${e}`],style:{"--total":m.length,"--thumbnail-inline-size":rs(f.inlineSize)},children:m.map((h,g)=>{const y=i&&"title"in h?h.title:"",v=d>0&&g===m.length-1,P=c&&u&&!v&&h.quantity>1?h.quantity:void 0;return s("div",{className:dm[`StackedThumbnail-${e}`],style:{"--index":g},children:s(Vs,{src:a&&h.image?h.image.one:h.image?.url,srcSet:a&&h.image?`${h.image.one} 1x, ${h.image.two} 2x, ${h.image.four} 4x`:void 0,size:n,depth:zU(g,e),alt:o?h.image?.altText||y:"",totalItems:P,overlay:v?`+${d}`:void 0})},"stableId"in h?h.stableId:`${g}${h.title}`)})})}function pm(e){return"totalPrice"in e&&e.totalPrice?e.totalPrice.amount:"price"in e&&e.price?e.price.amount:0}function zU(e,t){if(t==="fan")return Math.max(0,Math.min(e,2));if(t==="fan-legacy"&&e>0)return"legacy"}const HU="ik40Z",qU="Tupv7",Ga={Content:HU,LegacyLabel:qU};function $_(){const{disclosure:{style:e}}=Fe(),{open:t}=h_(),{i18n:n,checkout:r,source:o}=_(),i=Au(),a=e==="base",l=w(()=>!t.value),c=r.proposal.facts.merchandiseLines??[],{value:u}=H().merchandiseLines,d=nt(o)?c:u?.lines||[],p=s(Me,{type:t.value?"chevron-up":"chevron-down",size:"small-200",display:"inline"});return a?s(Q,{direction:"inline",justifyContent:"space-between",alignItems:"center",gap:"small-200",padding:"small-300 base",inlineSize:"100%",className:Ga.Content,children:[s(ve,{when:t,fallback:s(Q,{direction:"inline",alignItems:"center",gap:"small-200",children:[s("span",{className:bt({screenReaders:"only"}),children:n.translate("order_summary.title")}),s(Tu,{variant:"inline",size:"small-200",max:3,merchandise:d,useImageAltTexts:!1}),s(G,{size:"large",fonts:"secondary",type:"strong",children:i})]}),children:s(G,{color:"subdued",children:n.translate("order_summary.title")})}),s(Q,{direction:"inline",alignItems:"center",gap:"small-200",children:[s(ve,{when:l,children:s(um,{})}),p]})]}):s(Q,{direction:"inline",justifyContent:"space-between",alignItems:"center",gap:"small-200",padding:"small-300 base",inlineSize:"100%",className:Ga.Content,children:[s(Q,{direction:"inline",alignItems:"center",gap:"small-200",className:Ga.LegacyLabel,children:[n.translate("order_summary.title"),p]}),s(um,{})]})}function W_(){const{checkout:e,embed:t,router:n}=_();return w(()=>!t?.isFlagshipPartner||e.configuration.isUniversalCheckoutFinalizer?!1:n.currentUrl.value.normalizedPath==="/thank-you")}const GU="KwVFv",$U={FlagshipPartnerMask:GU};function WU(){const e=W_();return s(ve,{when:e,children:s("div",{className:$U.FlagshipPartnerMask})})}var vo={PillHint:"_53iem87 _53iem86 _1fragem82 _1fragem9v _1fragempk _1fragemnr _1fragemtg _1fragemrn _1fragem19 _1fragem64 _1fragem11z _1fragem12w",PillHintWrapper:"_53iem8j _1fragempz _1fragemo6 _1fragemtb _1fragemri _1fragem64 _1fragem4q _1fragemzf _1fragem73 _1fragembt",directionVariant:{block:"_53iem8b _53iem88 _1fragem2d",inline:"_53iem8c _53iem89 _1fragem2n",both:"_53iem8d _53iem8a _1fragem2n",none:"_53iem8e"},transitionVariant:{enter:"_53iem80",entering:"_53iem81",entered:"_53iem82",exit:"_53iem83",exiting:"_53iem84",exited:"_53iem85"},iconVariant:{block:"_53iem8f",inline:"_53iem8g",both:"_53iem8h",none:"_53iem8i"}};const YU=({position:e,scrollDirection:t,variant:n})=>{const r=n.content,o=Le("none");t&&(t.block&&t.inline?o.value="both":t.block?o.value="block":t.inline&&(o.value="inline"));const i=B(()=>{const l=e?.scrolledTo.block==="start",c=e?.scrolledTo.inline==="start";return o.value==="both"?l&&c:l||c},[e,o.value]),a=nn(i??!1,i?"base":"fast");return s("div",{className:vo.PillHintWrapper,children:s("div",{className:Y(vo.PillHint,vo.directionVariant[o.value],vo.transitionVariant[a]),children:[r,s(Me,{size:"small",type:o.value==="block"?"arrow-down":"arrow-right",className:vo.iconVariant[o.value]})]})})};var $a={ShadowHint:"eqnwop7 eqnwop6 _1fragemwi _1fragem11k",positionVariant:{inlineStart:"eqnwop8",inlineEnd:"eqnwop9",blockStart:"eqnwopa",blockEnd:"eqnwopb"},transitionVariant:{enter:"eqnwop0",entering:"eqnwop1",entered:"eqnwop2",exit:"eqnwop3",exiting:"eqnwop4",exited:"eqnwop5"}};const jU=({position:e,scrollDirection:t})=>{const n=nn((t?.block&&e?.scrolledTo.block!=="start")??!1,"base"),r=nn((t?.block&&e?.scrolledTo.block!=="end")??!1,"base"),o=nn((t?.inline&&e?.scrolledTo.inline!=="start")??!1,"base"),i=nn((t?.inline&&e?.scrolledTo.inline!=="end")??!1,"base");return s(q,{children:[{name:"blockStart",transition:n},{name:"blockEnd",transition:r},{name:"inlineStart",transition:o},{name:"inlineEnd",transition:i}].map(({name:l,transition:c})=>s("div",{className:Y($a.ShadowHint,$a.positionVariant[l],$a.transitionVariant[c])},l))})};class KU{constructor(){this.dimensions=ue(null),this.container=null,this.resizeObserver=null,this.initialized=!1}getDimensionsSignal(){return this.initialize(),this.dimensions}cleanup(){this.resizeObserver&&(this.resizeObserver.disconnect(),this.resizeObserver=null),this.container&&this.container.parentNode&&(this.container.parentNode.removeChild(this.container),this.container=null),this.initialized=!1,this.dimensions.value=null}initialize(){if(this.initialized||typeof window>"u"||typeof document>"u"||!window.ResizeObserver)return;this.initialized=!0,this.container=document.createElement("div"),this.container.style.cssText=`
25      position: fixed;
26      top: -9999px;
27      left: -9999px;
28      visibility: hidden;
29      pointer-events: none;
30    `,this.container.innerHTML=`
31      <div class="scrollbar-inline-tester" style="width: 100px; height: 100px;
31 overflow-y: scroll;">
32        <div style="height: 200px;"></div>
33      </div>
34      <div class="scrollbar-block-tester" style="width: 100px; height: 100px; overflow-x: scroll;">
35        <div style="width: 200px;"></div>
36      </div>
37    `,document.body.appendChild(this.container);const t=this.container.querySelector(".scrollbar-inline-tester"),n=this.container.querySelector(".scrollbar-block-tester"),r=()=>{this.dimensions.value={inline:t.offsetWidth-t.clientWidth,block:n.offsetHeight-n.clientHeight}};r(),this.resizeObserver=new ResizeObserver(r),this.resizeObserver.observe(n),this.resizeObserver.observe(t)}}const JU=new KU,XU=1/20*1e3,QU=(e,t,n,r,o,i)=>{const a=Le(null),l=Le(null),c=w(()=>{const m=JU.getDimensionsSignal().value;return!m||!l.value?null:n?{inline:l.value.block?m.inline:0,block:l.value.inline?m.block:0}:{inline:0,block:0}}),u=w(()=>c.value?{inline:c.value.inline>0,block:c.value.block>0}:null),d=B(()=>yg(()=>{const m=e.current;if(!m)return;const f=a.value,h=l.value;l.value=nz(m,t),a.value=tz(m,l.value),typeof r=="function"&&r(a.value),o&&typeof o=="function"&&ZU(h,l.value)&&o(l.value),i&&typeof i=="function"&&ez(f,a.value)&&i(a.value)},XU),[t,r,o,i,l,a,e]),p=x(()=>{d()},[d]);return Dt(()=>{const m=e.current;if(!m||!("onscroll"in m)||!window.ResizeObserver)return;p();const f=new ResizeObserver(p);return f.observe(e.current),m.addEventListener("scroll",p,{passive:!0}),()=>{f.disconnect(),m.removeEventListener("scroll",p)}},[e,p]),{scrollPosition:a.value,scrollDirection:l.value,scrollbarDimensions:c.value,scrollbarVisible:u.value}},ZU=(e,t)=>e?.inline!==t.inline||e?.block!==t.block,ez=(e,t)=>{if(!e)return!1;const n=e.scrolledTo.inline!==t.scrolledTo.inline&&t.scrolledTo.inline!==null,r=e.scrolledTo.block!==t.scrolledTo.block&&t.scrolledTo.block!==null;return n||r},mm=(e,t)=>e?"start":t?"end":null,tz=(e,t)=>{const n=e.scrollLeft===0,r=e.scrollTop===0,o=Math.abs(e.scrollLeft),i=Math.abs(o+e.clientWidth-e.scrollWidth)<1,a=Math.abs(e.scrollTop+e.clientHeight-e.scrollHeight)<1;return{position:{inline:o,block:e.scrollTop},scrolledTo:{inline:t.inline?mm(n,i):null,block:t.block?mm(r,a):null}}},nz=(e,t)=>{const n=e.scrollWidth>e.clientWidth,r=e.scrollHeight>e.clientHeight;return{inline:n&&t.inline,block:r&&t.block}};var Bt={ContentWrapper:"_1b9t7yp0",scrollbarWidthNone:"_1b9t7ypi",ScrollBox:"_1b9t7yp2 _1b9t7yp1 _1fragemup _1fragemv4 _1fragemws _1fragem64",ScrollViewportOverlay:"_1b9t7ypg _1b9t7ypf _1fragem108 _1fragem10n _1fragemzt _1fragem112 _1fragemwi _1fragem11z _1fragem12w",visuallyHidden:"_1b9t7yph _1fragem121",borderVariant:{blockStart:"_1b9t7ypn _1b9t7ypj _1fragemel",blockEnd:"_1b9t7ypo _1b9t7ypk _1fragemf5",inlineStart:"_1b9t7ypp _1b9t7ypl _1fragemdh",inlineEnd:"_1b9t7ypq _1b9t7ypm _1frageme1"},clipVariant:{blockStart:"_1b9t7yp8",blockEnd:"_1b9t7yp9"},bleedProductThumbnailsScrollBox:"_1b9t7ypa",bleedProductThumbnailsContentWrapper:"_1b9t7ypc _1b9t7ypb",bleedProductThumbnailsWithBadgeScrollBox:"_1b9t7ypd",bleedProductThumbnailsWithBadgeContentWrapper:"_1b9t7ype _1b9t7ypb"};const Y_=eo(Cc(function({accessibilityActiveDescendant:t,accessibilityLabel:n,accessibilityRole:r="generic",accessibilityVisibility:o="visible",background:i="transparent",backgroundHoverAndFocus:a,bleed:l="none",blockSize:c="auto",border:u="none",borderColor:d,borderRadius:p="none",borderStyle:m,borderWidth:f,children:h,className:g,display:y="auto",hint:v={type:"shadow"},id:P,inlineSize:b="auto",maxBlockSize:C="none",maxInlineSize:I="none",minBlockSize:S="0",minInlineSize:k="0",onScroll:E,onScrollable:T,onScrolledToEdge:A,overflow:R="auto",padding:L="none",paddingBlock:M,paddingBlockEnd:D,paddingBlockStart:N,paddingInline:U,paddingInlineEnd:z,paddingInlineStart:O,scrollbarWidth:K="auto",scrollTo:X}){const{Element:ne,role:$}=ui(r),{className:J,style:ee,styleElement:te}=Tt({backgroundColor:i,backgroundColorHoverAndFocus:a,blockSize:c,..._r({border:u,borderColor:d,borderStyle:m,borderWidth:f}),borderRadius:p,display:y,inlineSize:b,maxBlockSize:C,maxInlineSize:I,minBlockSize:S,minInlineSize:k},{transforms:{display:Sc}}),{className:W,style:he,styleElement:re}=Tt({overflow:R,padding:L,paddingBlock:M,paddingInline:U,paddingBlockEnd:D,paddingBlockStart:N,paddingInlineEnd:z,paddingInlineStart:O}),de=V(null),[le,_e=le]=R.trim().split(/\s+/),ae=B(()=>({inline:_e==="auto",block:le==="auto"}),[_e,le]),{scrollPosition:ge,scrollDirection:ke,scrollbarVisible:we,scrollbarDimensions:Ie}=QU(de,ae,K==="auto",E,T,A),j=Y(ke?.block&&ge?.scrolledTo.block!=="start"&&Bt.borderVariant.blockStart,ke?.block&&ge?.scrolledTo.block!=="end"&&!we?.block&&Bt.borderVariant.blockEnd,ke?.inline&&ge?.scrolledTo.inline!=="start"&&Bt.borderVariant.inlineStart,ke?.inline&&ge?.scrolledTo.inline!=="end"&&!we?.inline&&Bt.borderVariant.inline
37End),Z=Y(l!=="none"&&ke?.block&&ge?.scrolledTo.block!=="start"&&Bt.clipVariant.blockStart,l!=="none"&&ke?.block&&ge?.scrolledTo.block!=="end"&&!we?.block&&Bt.clipVariant.blockEnd);return Dt(()=>{if(!X||!de.current)return;const fe="smooth",be=de.current;if(X instanceof HTMLElement){X.scrollIntoView({behavior:fe,block:"start",inline:"start"});return}const Te=document.dir==="rtl",Se={block:X.block??0,inline:(X.inline??0)*(Te?-1:1)};be.scrollTo({behavior:fe,top:Se.block,left:Se.inline})},[X]),s(q,{children:[te,re,s("div",{"aria-hidden":o==="hidden"?!0:void 0,className:Y(Bt.ScrollBox,J,o==="exclusive"&&Bt.visuallyHidden,l==="product-thumbnails"&&Bt.bleedProductThumbnailsScrollBox,l==="product-thumbnails-with-badge"&&Bt.bleedProductThumbnailsWithBadgeScrollBox,Z),style:ee,children:[s(ne,{id:P,role:$,"aria-activedescendant":t,"aria-label":n,className:Y(Bt.ContentWrapper,K==="none"&&Bt.scrollbarWidthNone,W,g,l==="product-thumbnails"&&Bt.bleedProductThumbnailsContentWrapper,l==="product-thumbnails-with-badge"&&Bt.bleedProductThumbnailsWithBadgeContentWrapper),tabIndex:0,style:he,ref:de,children:h}),s("div",{className:Y(Bt.ScrollViewportOverlay,j),"aria-hidden":"true",role:"presentation",style:{marginInlineEnd:Ie?.inline,marginBlockEnd:Ie?.block},children:[v?.type==="pill"&&s(YU,{variant:v,scrollDirection:ke,position:ge,scrollbarVisible:K==="auto"}),v?.type==="shadow"&&s(jU,{variant:v,scrollDirection:ke,position:ge,scrollbarVisible:K==="auto"})]})]})]})}));var wl={FormattedText:"go06b0",ScrollableTable:"go06b1"};const rz=/<table[\s>]/i;function oz(e){if(typeof DOMParser>"u"||!rz.test(e))return null;const{body:t}=new DOMParser().parseFromString(e,"text/html");return t.querySelector("table")?j_(t.childNodes,!1):null}function j_(e,t){const n=[];for(const[r,o]of Array.from(e).entries()){if(o.nodeType===Node.TEXT_NODE){n.push(o.textContent);continue}if(o.nodeType!==Node.ELEMENT_NODE)continue;const i=o,a=i.tagName.toLowerCase(),l={key:r};for(const d of Array.from(i.attributes))l[d.name]=d.value;const c=i.childNodes.length?j_(i.childNodes,t||a==="table"):void 0,u=ns(a,l,c);a==="table"&&!t?n.push(s(Y_,{overflow:"hidden auto",className:wl.ScrollableTable,children:u},r)):n.push(u)}return n}function Cr({dangerouslySetInnerHTML:e,scrollableContent:t="none",children:n}){const o=Qr()?"span":"div",i=e?.__html,a=B(()=>t==="all"&&i!=null?oz(i):null,[t,i]);return typeof n=="string"?s(q,{children:n.split(`
38`).map((l,c)=>s(q,{children:[c>0&&s("br",{}),l]},`content-${c}}`))}):a?s(o,{className:wl.FormattedText,children:a}):s(o,{dangerouslySetInnerHTML:e,className:wl.FormattedText,children:n})}const wu=He(null);wu.displayName="SelectContext";function iz(){return Ee(wu)}function Qi(e){return`error-for-${e}`}var fm={InlineError:"ksaxnz0 _1fragemxr",Icon:"ksaxnz1 _1fragem19 _1fragemcn _1fragem4v _1fragem6t"};function Lu({children:e,controlID:t,type:n}){return n==="warning"?s(gt,{id:t?Qi(t):void 0,gridAutoFlow:"column",gridTemplateColumns:"minmax(auto, max-content) minmax(0, 1fr)",gridTemplateRows:"minmax(0, 1fr)",gap:"small-300",children:[s("div",{className:fm.Icon,children:s(Me,{type:"info"})}),s(G,{children:e})]}):s("div",{className:fm.InlineError,id:t?Qi(t):void 0,children:e})}function sz(e,t=" "){return e.filter(n=>n!=null&&n!==!1&&n!==""&&n!==0&&typeof n!="function"&&typeof n!="symbol"&&typeof n!="bigint"&&typeof n!="object").join(t)}var az={Truncate:"rermvf1 rermvf0 _1fragemup _1fragemv4 _1fragem5u _1fragem12y"};function _i({children:e}){return s("span",{className:Y(az.Truncate),children:e})}var Zi={floating:"xpgeoa0",positionVariant:{inside:"xpgeoa3 xpgeoa1 _1fragemwi _1fragem11z _1fragem12j _1fragem12e _1fragem12t _1fragem12w _1fragem12z",outside:"xpgeoa4 xpgeoa2 _1fragem5u"},Text:"xpgeoa5",visuallyHidden:"xpgeoa6 _1fragem121"};function Ll({htmlFor:e,label:t,variant:n,className:r}){return s("label",{id:`${e}-label`,htmlFor:e,className:Y(Zi.positionVariant[n],r),children:s("span",{className:Zi.Text,children:s(_i,{children:t})})})}var Oe={Accessory:"_7ozb2u1m _7ozb2u1l _1fragemws _1fragem2d _1fragemyb",accessoryPositionEnd:"_7ozb2u1o",accessoryPositionStart:"_7ozb2u1n",ActualInput:"_7ozb2ur",Field:"_7ozb2uq _7ozb2up _1fragemws _1fragemzf _1fragem11y _1fragem12u _1fragem12b",fieldInsetEnd:"_7ozb2u3",fieldInsetStart:"_7ozb2u2",fieldLabelInside:"_7ozb2uv _7ozb2uu _1fragem12j _1fragem12e _1fragem12t",fieldLetterCaseVariant:{uppercase:"_7ozb2u1q"},fieldMultiline:"_7ozb2u13",fieldPrefixed:"_7ozb2uz _7ozb2uy _1fragem12o",fieldPrefixSpacing:{small:"_7ozb2u10",base:"_7ozb2u11"},fieldTypeVariant:{number:"_7ozb2u14",tel:"_7ozb2u15",text:"_7ozb2u16",email:"_7ozb2u17",url:"_7ozb2u18",password:"_7ozb2u19"},FieldWrapper:"_7ozb2un",fieldWrapperMultiline:"_7ozb2uo",floatingLabelOnContent:"_7ozb2us",floatingLabelOnFocus:"_7ozb2ut",Icon:"_7ozb2u1d _7ozb2u1c _1fragemws _1fragem2d",iconPositionVariant:{start:"_7ozb2u1e",end:"_7ozb2u1f"},MultilineClone:"_7ozb2u1b _7ozb2u1a _1fragem6y",Prefix:"_7ozb2u1h _7ozb2u1g _1fragemws _1fragem2d",prefixInside:"_7ozb2u1i",segmentVariant:{start:"_7ozb2u0",end:"_7ozb2u1"}
38,setFieldLabelIsNotVisible:"_7ozb2u12",Suffix:"_7ozb2u1k _7ozb2u1j _1fragemws _1fragem2d",TextField:"_7ozb2ub _7ozb2ua _1fragemyl _1fragemws _1fragem6t _1fragem133 _1fragemye _1fragem12j _1fragem12d _1fragem12q",textFieldBorderVariant:{none:"_7ozb2uk",full:"_7ozb2ul",blockEnd:"_7ozb2um"},textFieldColorLayerVariant:{control:"_7ozb2ue _7ozb2uc _1fragemy6",controlInvalid:"_7ozb2uf _7ozb2ud _1fragemy7"},textFieldDisabled:"_7ozb2uh _7ozb2ug _1fragemyc _1fragem11z _1fragem11v",textFieldError:"_7ozb2u8",textFieldFocused:"_7ozb2u9",textFieldReadOnly:"_7ozb2uj _7ozb2ui _1fragem11w",withTypography:"_7ozb2u1p",Wrapper:"_7ozb2u5 _7ozb2u4 _1fragem7s _1fragem9l _1fragemws _1fragem6t",wrapperLabelInside:"_7ozb2u7 _7ozb2u6 _1fragemy6",wrapperVarsSetter:{labelInside:"_10vrn9p1 _10vrn9p0",labelOutside:"_10vrn9p2 _10vrn9p0"},inert:"_7ozb2u1r _1fragemz0"};const lz=et("TextField"),cz={"data-1p-ignore":!0,"data-lpignore":"true","data-bwignore":"true","data-form-type":"other"},K_=at(function({accessibilityDescription:t,accessoryEnd:n,accessoryStart:r,ariaActiveDescendant:o,ariaAutocomplete:i,ariaControls:a,ariaExpanded:l,ariaHasPopup:c,ariaLabel:u,ariaLive:d,ariaOwns:p,autoCapitalize:m,autocomplete:f="on",autoCorrect:h,autoFocus:g,controlledValue:y,defaultValue:v,disabled:P,error:b,icon:C,id:I,disablePasswordManagers:S,inputMode:k,label:E,labelAccessibilityVisibility:T="visible",labelPosition:A,labelWhenEmpty:R,letterCase:L,max:M,maxLength:D,min:N,minLength:U,name:z,onBlur:O,onChange:K,onFocus:X,onInput:ne,onInputCommit:$,onKeyDown:J,onWheel:ee,placeholder:te,prefix:W,prefixSpacing:he="base",readOnly:re,required:de,role:le,rows:_e,segment:ae,step:ge,suffix:ke,type:we="text",value:Ie},j){const{control:{border:Z,labelPosition:fe="inside"},textField:{border:be}}=rt(),Te=be||Z||"full",Se=A??fe,Ae=Bn(),Ue=Ie??void 0,ce=y??void 0,ie=Ke(I,lz),me=t?`${ie}-description`:void 0,Ne=me?s(G,{accessibilityVisibility:"exclusive",id:me,children:t}):null,[Ge,lt]=oe(!1),[Ft,kt]=dz(ce??Ue),cn=x(Qt=>{ne?.(Qt),kt(Qt)},[ne,kt]);function De(Qt){_e!==void 0||!K||Qt.key==="Enter"&&K(Qt.currentTarget.value)}const pe=pz(b,ie),Re=!!b&&$n(b)!=="warning",ot=Y(Oe.TextField,Oe.textFieldColorLayerVariant[Re?"controlInvalid":"control"],Oe.textFieldBorderVariant[Te],(P||Ae)&&Oe.textFieldDisabled,Ae&&Oe.inert,re&&Oe.textFieldReadOnly,Ge&&Oe.textFieldFocused,Re&&Oe.textFieldError,ae&&Oe.segmentVariant[ae]),ht=E&&T==="visible";let pt=Oe.floatingLabelOnContent;Se==="outside"?pt=Zi.floating:W&&(pt=Oe.floatingLabelOnFocus);const jt=Se!=="outside"&&!_e&&Te==="full";return s(q,{children:s("div",{className:Y(Oe.Wrapper,Oe.wrapperVarsSetter[Se==="outside"?"labelOutside":"labelInside"],Se==="inside"&&Oe.textFieldColorLayerVariant[b?"controlInvalid":"control"],Se==="inside"&&Oe.wrapperLabelInside,ht&&pt),"data-form-layout-connectable":jt?"true":"false",children:[ht&&Se==="outside"&&s(Ll,{variant:"outside",htmlFor:ie,label:E}),E&&T==="exclusive"&&s("label",{id:`${ie}-label`,htmlFor:ie,className:Zi.visuallyHidden,children:E}),s("div",{className:ot,children:[Ne,ht&&Se==="inside"&&s(Ll,{variant:"inside",htmlFor:ie,label:E}),s(uz,{accessibilityDescription:t,accessoryEnd:n,accessoryStart:r,ariaActiveDescendant:o,ariaAutocomplete:i,ariaControls:a,ariaDescribedBy:me,ariaExpanded:l,ariaHasPopup:c,ariaLabel:u,ariaLive:d,ariaOwns:p,autoCapitalize:m,autocomplete:f,autoCorrect:h,autoFocus:g,controlledValue:y,defaultValue:v,disabled:P,error:b,icon:C,id:ie,disablePasswordManagers:S,inputMode:k,label:E,labelAccessibilityVisibility:T,labelPosition:Se,labelWhenEmpty:R,letterCase:L,localValue:Ft,max:M,maxLength:D,min:N,minLength:U,name:z,onBlur:()=>{lt(!1),O?.()},onChange:K,onFocus:()=>{lt(!0),X?.()},onInput:cn,onInputCommit:$,onKeyDown:J??De,onWheel:ee,placeholder:te,prefix:W,prefixSpacing:he,readOnly:re,ref:j,required:de,role:le,rows:_e,step:ge,suffix:ke,type:we,value:Ie})]}),pe]})})}),J_=K_,uz=at(function({accessoryEnd:t,accessoryStart:n,ariaActiveDescendant:r,ariaAutocomplete:o,ariaControls:i,ariaDescribedBy:a,ariaExpanded:l,ariaHasPopup:c,ariaLabel:u,ariaLive:d,ariaOwns:p,autoCapitalize:m,autocomplete:f,autoCorrect:h,autoFocus:g,disabled:y,labelWhenEmpty:v,error:P,icon:b,id:C,disablePasswordManagers:I,inputMode:S,label:k,labelAccessibilityVisibility:E,labelPosition:T,letterCase:A,localValue:R,max:L,maxLength:M,min:D,minLength:N,name:U,onBlur:z,onChange:O,onFocus:K,onInput:X,onInputCommit:ne,onKeyDown:$,onWheel:J,placeholder:ee,prefix:te,prefixSpacing:W,readOnly:he,required:re,role:de,rows:le,step:_e,suffix:ae,type:ge,value:ke},we){const Ie=ks({active:!!P&&$n(P)!=="warning"}),j=V(),Z=x(Kt=>{typeof we=="function"?we(Kt):we&&(we.current=Kt),j.current=Kt,Ie.current=Kt,Kt&&(R?Kt.value!==R:Kt.value!==(ke??""))&&Kt.dispatchEvent(new Event("input"))},[we,Ie]),fe=sy(),be=ai(),Te=Bn();F(()=>{g&&!Te&&j.current?.focus()},[g,Te]);const{control:{labelPosition:Se="inside"}}=rt(),Ae=T??Se,Ue=typeof b=="object"?b.source:b,ce=typeof b=="object"?b.position??"start":"start",ie=Ue!==""&&Ue&&s("div",{className:Y(Oe.Icon,Oe.iconPositionVariant[ce]),"aria-hidden":"true",onClick:()=>j.current?.focus(),children:s(Me,{type:Ue})}),me=k&&E==="visible",Ge=!!(ge==="email"||f?.split(/\s+/).includes("email"))||ge==="tel",Ft=(!ge||ge==="text")&&!!R;let kt;Ge?kt="ltr":Ft?kt="auto":kt=void 0;const cn=te&&s("div",{id:`${C}-prefix`,className:Y(Oe.Prefix,Oe.withTypography,me&&Ae==="inside"&&Oe.prefixInside),"aria-hidden":"true",onClick:()=>j.current?.focus(),children:te}),De=Y(Oe.Field,Ae==="inside"&&Oe.fieldLabelInside,!!te&&Oe.fieldPrefixed,!!W&&Oe.fieldPrefixSpacing[W],!me&&Oe.setFieldLabelIsNotVisible,!!(te||n||ie&&ce==="start")&&Oe.fieldInsetStart,!!(ae||t||ie&&ce==="end")&&Oe.fieldInsetEnd,!!le&&Oe.fieldMultiline,A&&Oe.fieldLetterCaseVariant[A],ge&&Oe.fieldTypeVariant[ge],Oe.withTypography),pe=a||P?sz([a,P&&Qi(C)]):void 0,Re=S??(ge==="number"?"decimal":void 0),ot=te?` ${C}-prefix`:"",ht=ae?` ${C}-suffix`:"";let pt;Ae==="outside"?pt=ee:E==="visible"&&(pt=v??k);const jt=ns(le?"textarea":"input",{...I?cz:void 0,id:C,min:D,max:L,step:_e,maxLength:M,minLength:N,name:U,placeholder:pt,className:Y(De,Oe.ActualInput),required:re,type:le?void 0:ge,disabled:y,readOnly:he,inputMode:Re,"aria-activedescendant":r,"aria-autocomplete":o,"aria-controls":i,"aria-owns":p,"aria-describedby":pe,"aria-expanded":l,"aria-hidden":Te?!0:void 0,"aria-invalid":P&&$n(P)!=="warning"?"true":void 0,"aria-label":u,"aria-live":d,"aria-required":re,"aria-labelledby":k?`${C}-label${ot}${ht}`:void 0,"aria-haspopup":c,onBlur:({currentTarget:{value:Kt}}
38)=>{if(!fe.current)return;Kt!==(ke||"")&&O?.(Kt),z?.()},onChange(Kt){const{isTrusted:nd,inputType:Ks,currentTarget:{value:Js}}=Kt;Ks!=="insertCompositionText"&&Ks!=="deleteCompositionText"&&ne?.(Js),(!nd||!Ks)&&O?.(Js),X?.(Js)},onFocus:()=>{K?.()},onKeyDown:$,onWheel:J,ref:Z,role:de,rows:le,value:R??"",autoComplete:f,autoFocus:g&&!Te,form:be?.nested?be.id:void 0,tabIndex:Te?-1:void 0,autoCorrect:h,autoCapitalize:m,dir:kt}),Qt=!!le&&s("div",{"aria-hidden":"true",className:Y(Oe.MultilineClone,De),dir:kt,children:[R," "]}),DP=Y(Oe.FieldWrapper,!!le&&Oe.fieldWrapperMultiline),OP=le?s("div",{className:DP,children:[jt,Qt]}):jt,FP=ae&&s("div",{id:`${C}-suffix`,className:Y(Oe.Suffix,Oe.withTypography),"aria-hidden":"true",onClick:()=>j.current?.focus(),children:ae}),BP=n&&s("div",{className:Y(Oe.Accessory,Oe.accessoryPositionStart),children:n}),VP=t&&s("div",{className:Y(Oe.Accessory,Oe.accessoryPositionEnd),children:t});return s(q,{children:[ie,cn,OP,BP,FP,VP]})});function dz(e){const t=mz(e),[n,r]=oe(t),o=V(t),i=V(e);let a=n;return o.current!==t&&(o.current=t,r(t),a=t),typeof e=="object"&&i.current!==e&&r(t),i.current=e,[a,r]}function pz(e,t){if(typeof e!="boolean")return e!==void 0&&e?s(Lu,{controlID:t,type:$n(e)==="warning"?"warning":void 0,children:e&&typeof e=="object"&&"value"in e?e?.value:e}):null}function $n(e){if(e&&typeof e=="object"&&"type"in e)return e.type}function mz(e){if(e!=null)return typeof e=="object"&&"value"in e?e.value==null?void 0:String(e.value):String(e)}var fz={labelInside:"_10vrn9p1 _10vrn9p0",labelOutside:"_10vrn9p2 _10vrn9p0"},Li={Select:"_1k3449n0 _1fragem133 _1fragemyl",selectColorLayerVariant:{control:"_1k3449n3 _1k3449n1 _1fragemy6",controlInvalid:"_1k3449n4 _1k3449n2 _1fragemy7"},inert:"_1k3449n5 _1fragemz0"};const hz="RD23h",gz="VZudx",yz="XDBWz",vz="ZHJU6",_z="_87H7J",bz="VXrUd",Zt={Wrapper:hz,SelectWrapper:gz,"Label-positionInside":"QCxaD",LabelText:yz,"Label-isFloating":"A9HkF",Select:vz,"Label-positionOutside":"D67WW","Select-borderNone":"VQDv5",hasError:_z,"Select-borderFull":"IWR5K","Select-borderBlockEnd":"ADBGS","Select-isDisabled":"_9yhqJ",Selector:bz,"Select-backgroundBase":"oAlPg","Select-isReadOnly":"eSQ74"},Co="",Pz=et("Select");function Sz({children:e,id:t,name:n,label:r,value:o=Co,disabled:i,readOnly:a,required:l,error:c,autocomplete:u="on",placeholder:d,onChange:p,onBlur:m,onFocus:f}){const h=ai(),{control:{border:g,labelPosition:y="inside"},select:{border:v}}=rt(),P=Bn(),b=ks({active:!!c&&$n(c)!=="warning"}),C=Ke(t,Pz),I=v||g||"full",S=c!==void 0&&!!c&&s(Lu,{controlID:C,type:$n(c)==="warning"?"warning":void 0,children:c&&typeof c=="object"&&"value"in c?c?.value:c}),k=!!c&&$n(c)!=="warning",E=Y(Zt.Select,Li.Select,k&&Zt.hasError,(i||P)&&Zt["Select-isDisabled"],P&&Li.inert,a&&Zt["Select-isReadOnly"],Zt[Gt("Select-border",I)]),T=$=>{const J=$.target.value;p?.(J)},[A,R]=oe(0),D=o!==Co||(!!(d&&d!==r)||!!A),N=s("label",{className:Y(Zt.Label,Zt[Gt("Label-position",y)],D&&Zt["Label-isFloating"]),htmlFor:C,children:s("span",{className:Y(Zt.LabelText),children:s(_i,{children:r})})}),U=x(()=>{R($=>$+1)},[]),z=x(()=>{R($=>$-1)},[]),O=B(()=>({readOnly:a,registerEmptyValueOption:U,unregisterEmptyValueOption:z}),[a,U,z]),K=s("div",{children:[y==="outside"?N:null,s("div",{className:Y(Zt.SelectWrapper,Li.selectColorLayerVariant[k?"controlInvalid":"control"]),children:[y==="inside"&&N,s(wu.Provider,{value:O,children:s("select",{name:n,id:C,disabled:i,onChange:T,required:l,value:o,className:E,"aria-describedby":c?Qi(C):void 0,"aria-invalid":c&&$n(c)!=="warning"?"true":void 0,"aria-hidden":P?!0:void 0,autoComplete:u,tabIndex:P?-1:void 0,ref:b,onBlur:()=>{m?.()},onFocus:()=>{f?.()},form:h?.nested?h.id:void 0,children:[d&&(X(o)||d!==r)&&s("option",{value:Co,hidden:d===r,disabled:!0,children:d===r?s(q,{children:" "}):d}),e]})}),s("div",{className:Y(Zt.Selector),children:s(Me,{type:"chevronDown",size:"small-200"})})]})]});function X($){return $===Co||$===void 0||$===null}const ne=y!=="outside"&&I==="full";return s(q,{children:s("div",{className:Y(Zt.Wrapper,y==="inside"&&Li.selectColorLayerVariant[k?"controlInvalid":"control"],fz[y==="outside"?"labelOutside":"labelInside"]),"data-form-layout-connectable":ne?"true":"false",children:[K,S]})})}function Ez({children:e,id:t,value:n,disabled:r,alternateValues:o,accessibilityLabel:i}){const a=iz(),{registerEmptyValueOption:l,unregisterEmptyValueOption:c}=a??{},u=n===Co;return Dt(()=>{if(u&&l&&c)return l(),()=>{c()}},[u,l,c]),a?s("option",{id:t,value:n,disabled:r||a.readOnly,...o?.length&&{"data-alternate-values":JSON.stringify(o)},"aria-label":i,children:e}):(console.warn(`Unable to render Option (id: ${t}). Please verify it is a child of a Select.`),null)}var Ln={PressButton:"_1n78kje1 _1n78kje0 _1fragemk5 _1fragemjl _1fragemkp _1fragemj1 _1fragemm8 _1fragemlo _1fragemms _1frageml4 _1fragempf _1fragemr8 _1fragemnm _1fragemt1 _1fragem1y _1fragemws _1fragemyd _1fragem126 _1fragem128 _1fragem12n _1fragem12d _1fragem12p _1fragem6o _1fragemcn _1fragem11y _1fragem12u _1fragem12v",loading:"_1n78kje2 _1fragemyb _1fragem11z",disabled:"_1n78kje3 _1fragemyb _1fragem11z _1fragem11v",pressed:"_1n78kje4",inert:"_1n78kje5 _1fragemz0",inlineSizeVariant:{fill:"_1n78kje8 _1n78kje6 _1fragemzf _1fragem124 _1fragembj",fitContent:"_1n78kje9 _1n78kje7 _1fragemzg _1fragem124"},Content:"_1n78kjeh _1n78kjeg _1fragem11z _1fragem12j _1fragem12d _1fragem12q",LoadingContent:"_1n78kjej _1n78kjei _1fragem12j _1fragem12d _1fragem12q _1fragem64 _1fragem19",transitionVariant:{entered:"_1n78kjea",exit:"_1n78kjeb",exiting:"_1n78kjec",enter:"_1n78kjed",entering:"_1n78kjee",exited:"_1n78kjef"}};const Cz=at(function({accessibilityLabel:t,id:n,children:r,inlineSize:o="auto",lang:i,loading:a,disabled:l=!1,pressed:c=!1,onClick:u,onBlur:d,onFocus:p},m){const f=Wr(m),h=Bn(),g=o==="auto"?"fit-content":o,y=ln(),v=nn(a??!1,{enter:"slow"}),P=I=>{I?.preventDefault(),u?.(!c)},b=s("span",{className:Y(Ln.LoadingContent),dir:"auto",children:s(no,{accessibilityLabel:y("processing")})}),C=Et(r)&&s("span",{className:Y(Ln.Content),"aria-hidden":a||void 0,children:r});return s(Gr.Provider,{value:!0,children:s("button",{type:"button",id:n,"aria-pressed":c,"aria-busy":a,"aria-label":a?void 0:t,"aria-live":a?"polite":"off","aria-hidden":h?!0:void 0,lang:i,onClick:P,onBlur:d,onFocus:p,className:Y(Ln.PressButton,Ln.inlineSizeVariant[Hi(g)],c&&Ln.pressed,(l||h)&&Ln.disabled,h&&Ln.inert,a&&[Ln.loading,Ln.transitionVariant[v]]),disabled:l||a,tabIndex:h?-1:void 0,ref:f,children:[C,a&&b]})})}),X_={small:"35%",base:"50%",large:"65%",fill:"100%"};function Ri({content:e,delay:t,id:n,lastLineSize:r,lines:o=1,size:i}){const a=B(()=>kz(),[]);return s(je,{id:n,size:i,textAlign:"justify",children:e?s(Jo,{delay:t,children:e}):Array.from({length:o},(l,c)=>
38{const u=c===o-1?r??(o===1?"fill":a):"fill";return s(Jo,{delay:t,inlineSize:X_[u]},c)})})}function kz(){const e=Object.keys(X_);return e[Math.floor(Math.random()*e.length)]}const Iz=new Set(["http:","https:"]);function Az(){const{checkout:{configuration:{isWindowOpenDelegationEnabled:e}},embed:t,observability:n}=_(),r=x(o=>{const i=o.target?.closest?.("a");if(!i)return;const a=i.href;let l;try{l=new URL(a).protocol}catch{return}!Iz.has(l)||i.getAttribute("href")?.startsWith("#")||t?.client?.windowOpenRequest&&(o.preventDefault(),t.client.windowOpenRequest(a).catch(u=>{n.log("window_open_delegation_error","Window open delegation failed in delegated HTML content",{url:a,error:u instanceof Error?u.message:String(u)})}))},[t,n]);if(e)return r}function Tz({children:e}){const t=Az();return t?s("div",{onClick:t,children:e}):s(q,{children:e})}const wz={id:"63eae86e190df32a164601cf96e105e3a69712d555a3abd3ab6d36cde520673e",type:"query",name:"MerchantPolicies",source:""},Lz={id:"1263e051dbbb958a67fe45f4acca32965cf3cea185a1b71afe5ebdb65c4f4160",type:"query",name:"RemoteMerchantPolicies",source:""},Rz=vk(({graphql:{coreGraphql:e},observability:t,shop:n},{checkoutProtocolModalEventSignal:r,defaultPolicy:o,policies:i})=>{const a=_k(i),l=It(()=>Object.values(a));function c(k){return Array.from(a[k]?.policies.values()??[])}function u(){return a[o.shopId]?.policies.get(o.handle)??i[0]??o}const d=ue(!1),p=ue(!1),m=ue(u()),f=It(()=>c(m.value.shopId)),h=It(()=>m.value.shopId),g=It(()=>m.value.sessionToken??""),y=It(()=>n.id===h.value),v=e.query(wz,{variables:()=>({handle:m.value.handle}),skip:()=>!y.value||!d.value}),P=e.query(Lz,{variables:()=>({input:[{sessionToken:g.value,shopId:h.value}]}),skip:()=>y.value||!d.value}),b=It(()=>y.value?v.data.value?.shop?.merchantPolicies[0]?.body:(P.data.value?.shop?.remoteShopConfigurations[0]?.merchantPolicies??[]).find(E=>E.handle===m.value.handle)?.body),C=It(()=>y.value?v.error.value:P.error.value),I=It(()=>y.value?v.loading.value:P.loading.value),S=cA(I.value,(k,E)=>k&&!E&&d.peek()&&p.peek()&&typeof document<"u"&&document.querySelector(uA)!==null,["modal-content-cross-fade"]);return nl(()=>{S.value=I.value}),nl(()=>{C.value&&t.error(C.value)}),{error:C,loading:S,policyBody:b,selectedPolicy:It(()=>m.value),selectedShopPolicies:f,shops:l,show(){p.value=!1,m.value=u(),r&&(r.value="footerContent"),d.value=!0},afterShow(){p.value=!0},hide(){p.value=!1,d.value=!1,r&&(r.value="none")},selectShop(k){const E=m.peek(),T=c(k),A=T.find(R=>R.handle===E.handle)??T[0]??E;A!==E&&pr(()=>{m.value=A}
38,["modal-content-cross-fade"])},selectPolicyHandle(k){const E=m.peek(),T=f.value.find(A=>A.handle===k)??f.value[0]??E;T!==E&&pr(()=>{m.value=T},["modal-content-cross-fade"])}}});function Mo({id:e,heading:t,defaultPolicy:n,policies:r,component:o}){const{i18n:i,shop:a,mobileCheckoutSdk:l,embed:c}=_(),{checkoutProtocolModalEventSignal:u}=xt(),d=r?.length?r:[n],p=a.hasFlagEnabled(uh),m=l.variant.isStandard()||c?.isCheckoutKit(),f=p||m?"100%":void 0,{error:h,loading:g,policyBody:y,selectedPolicy:v,selectedShopPolicies:P,shops:b,show:C,afterShow:I,hide:S,selectShop:k,selectPolicyHandle:E}=bk(Rz,{checkoutProtocolModalEventSignal:u,defaultPolicy:n,policies:d}),T=o??or,A=b.value.length>1||b.value.some(M=>M.policies.size>1),R=()=>s(Tz,{children:s(Cr,{dangerouslySetInnerHTML:{__html:y.value??""},scrollableContent:"all"})}),L=s(ve,{when:()=>!h.value,fallback:i.translate("bad_request.title"),children:s(ve,{when:()=>!g.value,fallback:s(Q,{"aria-busy":!0,gap:"base",children:[s(Ri,{delay:!1,lines:3,lastLineSize:"small"}),s(Ri,{delay:!1,lines:3,lastLineSize:"large"}),s(Ri,{delay:!1,lines:3,lastLineSize:"small"}),s(Ri,{delay:!1,lines:3,lastLineSize:"large"})]}),children:()=>A||v.value.shopId!==a.id?s(ve,{when:()=>y.value,fallback:s(G,{color:"subdued",children:i.translate("remote_policies.unavailable_policy",{policy_name:v.value.name,shop_name:v.value.shopName})}),children:R}):R()})});return s(T,{id:e,onShow:C,onAfterShow:I,onHide:S,heading:t,blockSize:f,children:[s(Pe,{accessibilityRole:"status",accessibilityVisibility:"exclusive",children:g.value?i.translate("general.loading"):null}),A?s(Q,{gap:"base",children:[s(ve,{when:()=>b.value.length>1,children:s(Q,{direction:"inline",gap:"base",children:b.value.map(M=>s(Cz,{pressed:v.value.shopId===M.shopId,onClick:()=>k(M.shopId),children:s(Q,{gap:"small-400",direction:"inline",alignItems:"center",justifyContent:"center",children:s(G,{children:M.shopName})})},M.shopId))})}),s(ve,{when:()=>P.value.length>1,children:s(Sz,{value:v.value.handle,label:i.translate("shop_policies.policy_label"),onChange:E,name:"policy",children:P.value.map(M=>s(Ez,{value:M.handle,children:M.name},M.handle))})}),L]}):L]})}const hm="gid://shopify/App/580111";function Q_(e,t){return e.namespace.toLowerCase()===t.namespace.toLowerCase()&&e.key.toLowerCase()===t.key.toLowerCase()}function xz(e,t){const{namespace:n,key:r}=e.update??e.delete??{};return n==null||r==null?!1:Q_({namespace:n,key:r},t)}function Mz(e,t){return e?.find(n=>Q_(n,t))?.value}function Z_(e,t){for(let n=e.length-1;n>=0;n--)if(xz(e[n],t))return n;return-1}function Nz(e,t){const n=e[Z_(e,t)];if(n)return n.delete?"":n.update?.value}function Dz(e,t,n){const{namespace:r,key:o,type:i}=t,a=n.trim()===""?{delete:{appId:hm,namespace:r,key:o}}:{update:{appId:hm,namespace:r,key:o,type:i,value:n}},l=Z_(e,t);return l===-1?[...e,a]:e.map((c,u)=>u===l?a:c)}function Oz({namespace:e,key:t,type:n}){const{checkout:{proposal:r}}=_(),o=r.proposed.cartMetafields,i=r.negotiated.fields.cartMetafields;return B(()=>{const a={namespace:e,key:t,type:n};return new Pk(It(()=>Nz(o.value,a)??Mz(i.value,a)??""),l=>{o.value=Dz(o.peek(),a,l)})},[t,e,i,o,n])}function Fz({required:e,validations:t}){const{i18n:n}=_(),{minLength:r,maxLength:o}=t;return x(i=>{if(i.trim()==="")return e.value?n.translate("field_errors.address_generic_blank"):void 0;const a=[...i].length;if(r!=null&&a<r)return n.translate("field_errors.custom_field.cart_metafield_value_too_short");if(o!=null&&a>o)return n.translate("field_errors.custom_field.cart_metafield_value_too_long")},[n,o,r,e])}function Bz({field:e}){const{description:t,heading:n,key:r,label:o,required:i}=e,{i18n:a}=_(),{negotiate:l}=Mt(),c=Sk(),u=Oz({...Ek(r),type:"single_line_text_field"}),d=t.value,p=i.value,m=Fz(e),f=Ck(u,c,m);kk(u,c,m,Vo.InvalidCustomFieldValue);const h=()=>{f.onBlur(),!c.peek()&&l({fieldsToResolve:["cartMetafields"],include:[]})},g=p?o.value:a.translate("custom_field.label",{label:o.value});return s(Q,{gap:"small-100",children:[n.value?s(Wt,{children:n}):null,d?s(G,{accessibilityVisibility:"hidden",color:"subdued",children:d}):null,s(J_,{...f,accessibilityDescription:d??void 0,label:g,name:r,onBlur:h,required:p})]})}function Vz({field:e}){return e.type==="TEXT"?s(Bz,{field:e}):s(Uz,{field:e})}function Uz({field:e}
38){const{key:t,heading:n,label:r,description:o,type:i,required:a,target:l}=e;return s(Pe,{border:"base",borderRadius:"base",padding:"base",children:s(Q,{gap:"small-100",children:[s(G,{type:"strong",children:"Custom field placeholder"}),n.value?s(G,{children:n}):null,s(G,{children:a.value?`${r.value} *`:r.value}),o.value?s(G,{color:"subdued",children:o}):null,s(G,{color:"subdued",type:"small",children:[t," · ",i]}),s(G,{color:"subdued",type:"small",children:l.placementReference?`${l.target} · ${l.placementReference}`:l.target})]})})}const zz=qe({id:()=>"RuntimeExtension",displayName:"RuntimeExtension",suspenseName:({extension:e})=>ls(e.extensionPoint.target)?`runtime-extension-${e.id}`:void 0,load:()=>Ve(()=>import("./component-RuntimeExtension.DZ-wjbUd.js"),__vite__mapDeps([197,1,2,3,4,5,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,8,38,39,40,41,42,43,44,45,46,47,48,49,13,6,50,51,52,53,54,7,198]))}),gm={"UiCustomizations-marginBlockStart":"OyeF5","UiCustomizations-marginBlockEnd":"XYPMc"},Hz=e=>s(Pe,{children:e}),qz=({gap:e,children:t,condition:n,marginBlockStart:r,marginBlockEnd:o})=>{const i=e&&n?s(Q,{gap:e,children:t}):s(q,{children:t});return r||o?s("div",{className:Y({[gm["UiCustomizations-marginBlockStart"]]:r,[gm["UiCustomizations-marginBlockEnd"]]:o}),style:{...r&&{"--extensions-margin-block-start":jn.spacing[r]},...o&&{"--extensions-margin-block-end":jn.spacing[o]}},children:i}):s(q,{children:i})};function $t({customizations:e,gap:t,options:n,transformComponents:r,render:o=Hz,marginBlockStart:i,marginBlockEnd:a}){return e.length===0?null:s(qz,{gap:t,condition:e.length>1,marginBlockStart:i,marginBlockEnd:a,children:e.map(l=>l.kind==="uiExtension"?s(zz,{options:n,extension:l.extension,transformComponents:r,render:o},l.extension.id):s(Vz,{field:l.field},l.field.key))})}const Gz=e=>s("svg",{xmlns:"http://www.w3.org/2000/svg",xmlSpace:"preserve",viewBox:"0 0 30 14",...e,children:[s("path",{d:"M7.4 12.8h6.8l3.1-11.6H7.4C4.2 1.2 1.6 3.8 1.6 7s2.6 5.8 5.8 5.8",style:{fillRule:"evenodd",clipRule:"evenodd",fill:"#fff"}}),s("path",{d:"M22.6 0H7.4c-3.9 0-7 3.1-7 7s3.1 7 7 7h15.2c3.9 0 7-3.1 7-7s-3.2-7-7-7m-21 7c0-3.2 2.6-5.8 5.8-5.8h9.9l-3.1 11.6H7.4c-3.2 0-5.8-2.6-5.8-5.8",style:{fillRule:"evenodd",clipRule:"evenodd",fill:"#06f"}}),s("path",{d:"M24.6 4c.2.2.2.6 0 .8L22.5 7l2.2 2.2c.2.2.2.6 0 .8s-.6.2-.8 0l-2.2-2.2-2.2 2.2c-.2.2-.6.2-.8 0s-.2-.6 0-.8L20.8 7l-2.2-2.2c-.2-.2-.2-.6 0-.8s.6-.2.8 0l2.2 2.2L23.8 4c.2-.2.6-.2.8 0",style:{fill:"#fff"}}),s("path",{d:"M12.7 4.1c.2.2.3.6.1.8L8.6 9.8c-.1.1-.2.2-.3.2-.2.1-.5.1-.7-.1L5.4 7.7c-.2-.2-.2-.6 0-.8s.6-.2.8 0L8 8.6l3.8-4.5c.2-.2.6-.2.9 0",style:{fill:"#06f"}})]}),$z="mMltV",Wz="HTJIw",ym={DataSharingOptOutLinkGap:$z,DataSharingOptOutLinkIcon:Wz},Yz="https://privacy.shopify.com",jz="https://privacy.shopify.com/ads-sharing/opt-out/new";function vm(){const{shopPay:e,i18n:t}=_(),{footer:{content:{typography:n}={}}={}}=Fe(),r=e.user.isAuthenticatedUser.value?jz:Yz,o=t.translate("user_consent.privacy_portal_link",{privacy_link_gap:s("span",{className:ym.DataSharingOptOutLinkGap}),privacy_link_logo:s(Gz,{"aria-hidden":"true",focusable:"false",className:ym.DataSharingOptOutLinkIcon})}),i=s(ut,{href:r,target:"_blank",display:"block",children:o});return n?s(G,{size:n.size,color:n.color,type:n.weight==="bold"?"strong":void 0,children:i}):i}function Kz(e,t){e.error(t,{metadata:{privacyPreferencesFooterLink:{component:"PrivacyPreferencesFooterLink",failure:"lazy_load"}}})}function Jz(e){const{observability:t}=_();F(()=>{e&&Kz(t,e)},[e,t])}const _m=qe({id:()=>"PrivacyPreferencesFooterLink",displayName:"PrivacyPreferencesFooterLink",suspense:!1,useError:Jz,load:()=>ct(()=>Ve(async()=>{const{deferredPrivacyComponents:e}=await import("./DeferredPrivacy.D0Rwfwql.js");return{deferredPrivacyComponents:e}},__vite__mapDeps([87,1,2,3,4,5,20,21,36,37,6,7,8])).then(({deferredPrivacyComponents:e})=>e.PrivacyPreferencesFooterLink))});function Xz(){const e=St(),{checkout:{identity:t},consentManager:n}=_();return w(()=>e.value&&t.current.value!=="shopPay"&&n.shouldShowBanner.value)}const Qz=et("DelegatedLinkModal");function Zz(e){const t=Array.isArray(e)?e:[e],n=new Map;return t.map(r=>{if(typeof r!="string"&&typeof r!="number")return r;const o=String(r),i=(n.get(o)??0)+1;return n.set(o,i),s(G,{color:"subdued",children:r},`${o}-${i}`)})}function Ru(){const{embed:e,i18n:t,checkout:{configuration:n},shop:r}=_(),{name:o}=r,i=co(),{currentDetour:a}=Ce().value,l=Xz(),{footer:{alignment:c,content:{visibility:u,typography:d}={}}={}}=Fe(),{localPolicies:p,localPoliciesWithContent:m,remotePolicies:f}=lc(),h=r.hasFlagEnabled(uh),g=e?.embedder==="microsoft",y=e?.embedder==="amazon",v=e?.embedder==="google";let P=d;g?P={...d,size:"extraSmall",color:"subdued",weight:"bold"}:v&&(P={...d,size:"small"});const b=p.find(U=>U.handle==="privacy-policy"),C=b.url,I=C?s(ut,{href:C,target:"_blank",accessibilityLabel:t.translate("user_consent.google_embedded_checkout.privacy_policy_accessibility_label",{shop_name:o}),children:t.translate("user_consent.google_embedded_checkout.privacy_policy")}):s(q,{children:[s(ut,{commandFor:"google-privacy-policy-modal",accessibilityLabel:t.translate("user_consent.google_embedded_checkout.privacy_policy_accessibility_label",{shop_name:o}),children:t.translate("user_consent.google_embedded_checkout.privacy_policy")}),s(Mo,{id:"google-privacy-policy-modal",defaultPolicy:b,heading:t.translate("user_consent.google_embedded_checkout.privacy_policy_modal_title")})]}),S=s(ut,{href:"https://payments.google.com/payments/apis-secure/u/0/get_legal_document?ldo=0&ldt=privacynotice",target:"_blank",accessibilityLabel:t.translate("user_consent.google_embedded_checkout.payments_privacy_notice_accessibility_label"),children:t.translate("user_consent.google_embedded_checkout.payments_privacy_notice")}),k=s(ut,{href:"https://support.google.com/gemini/answer/16730149",target:"_blank",accessibilityLabel:t.translate("user_consent.google_embedded_checkout.learn_more_accessibility_label"),children:t.translate("user_consent.google_embedded_checkout.learn_more")}),E=s(je,{type:"small",textAlign:c,children:Zz(t.translate("user_consent.google_embedded_checkout.terms",{shop_name:o,privacy_policy_link:I,payments_privacy_notice_link:S,learn_more_link:k}))}),R=s(je,{size:"extraSmall",color:"subdued",textAlign:c,children:s(G,{type:"strong",children:["Your purchase from ",o," is subject to the"," ",s(Rl,{href:"https://aka.ms/ConsumerCopilotTerms",heading:"Copilot Terms",children:"Copilot Terms"})," and the ",s(Rl,{href:"https://go.microsoft.com/fwlink/?LinkId=521839",heading:"Privacy Statement",children:"Privacy Statement"}),". We will share your order and payment details with ",o," to complete your order."]})}),L=m.length===0?s(Q,{direction:"inline",alignItems:"center",gap:"small-400 base",justifyContent:c,children:[s(G,{size:"small",color:"subdued",children:t.translate("general.all_rights_reserved",{shop_name:o})}),s(Q,{direction:"inline",gap:"base",accessibilityRole:"unordered-list",children:[s(ve,{when:l,children:s(Pe,{accessibilityRole:"list-item",children:s(_m,{})})}),s(ve,{when:n.visibility.showDataSharingOptOut,children:s(Pe,{accessibilityRole:"list-item",children:s(vm,{})})})]})]}):s(Q,{direction:"inline",justifyContent:c,gap:"small-400 base",accessibilityRole:"unordered-list",children:[(h?m.slice(0,1):m).map(U=>{const{handle:z,name:O}=U,K=h?t.translate("shop_policies.terms_and_policies"):O,X=h?"terms-and-policies-footer-policy-modal":`${z}-footer-policy-modal`;let ne;f.length>0?ne=s(Mo,{id:X,heading:t.translate("shop_policies.terms_and_policies"),defaultPolicy:U,policies:[...p,...f]}
38):ne=s(Mo,{id:X,heading:K,defaultPolicy:U,policies:h?m:void 0});const $=s(an,{variant:"plain",commandFor:X,ref:i(z),children:K});return s(Pe,{accessibilityRole:"list-item",children:[P?s(G,{size:P.size,color:P.color,type:P.weight==="bold"?"strong":void 0,children:$}):$,ne]},z)}),s(ve,{when:l,children:s(Pe,{accessibilityRole:"list-item",children:s(_m,{})})}),s(ve,{when:n.visibility.showDataSharingOptOut,children:s(Pe,{accessibilityRole:"list-item",children:s(vm,{})})})]});let M="purchase.checkout.footer.render-after";a?.type==="thankYou"&&(M="purchase.thank-you.footer.render-after");const D=it(M);return s(Q,{gap:"large-100",children:[g&&R,v&&E,u!=="hidden"&&!y&&L,s($t,{customizations:D,gap:"base"})]})}function Rl({href:e,heading:t,children:n,...r}){const{checkout:o}=_(),i=Ke(void 0,Qz);return o.configuration.isWindowOpenDelegationEnabled?s(ut,{href:e,...r,children:n}):s(q,{children:[s(ut,{commandFor:i,...r,children:n}),s(or,{id:i,source:e,heading:t})]})}Ru.displayName="FooterContent";Rl.displayName="DelegatedLink";function e2(){const{i18n:e,shop:t}=_(),n=`${t.name} ${e.translate("general.page_title")}`;return s("h1",{className:bt({screenReaders:"only"}),children:n})}function eb(){const{client:e,i18n:t}=_(),{checkoutProtocolModalEventSignal:n}=xt(),r=x(()=>{window.location.assign(e.unstable_getSerialization("logoutUrl")||"")},[e]),{hasViolations:o}=mi(Zl);return F(()=>()=>{n.value="none"},[n]),o?s(or,{id:"lost-permissions-modal",heading:t.translate("b2b_errors.lost_permissions_title"),size:"large",accessibilityLabel:t.translate("b2b_errors.lost_permissions_title"),blocking:!0,open:!0,onShow:()=>{n.value="b2bPermissions"},children:s(Q,{gap:"base",children:[s(G,{children:t.translate("b2b_errors.lost_permissions_subtitle")}),s(Q,{direction:"inline",gap:"base",justifyContent:"end",children:s(an,{variant:"primary",onClick:r,children:t.translate("b2b_errors.log_out_link_text")})})]})}):null}function t2({source:e,title:t,onIframeLoad:n}){const[r,o]=oe(),[i,a]=oe(!1);return F(()=>{e?(o(e),a(!0)):a(!1)},[e]),r?s(or,{source:r,open:i,blocking:!0,blockSize:"100%",size:"840px",accessibilityLabel:t,onIframeLoad:()=>n?.(r)}):null}function n2({source:e,logMessage:t,telemetryContext:n,logKey:r=e??void 0}){const{observability:o}=_(),i=V();return F(()=>{e||(i.current=void 0)},[e]),x(a=>{!e||!n||a&&a!==e||i.current!==r&&(i.current=r,o.log("action_required_modal_iframe_loaded",t,{...n,hasModalUrl:!0,...n.actionType!=="pre_payment_buyer_action_required"&&{sourceHostCategory:jo(e)}}))},[r,t,o,e,n])}function r2(){const{checkout:e,shopPay:t,observability:n}=_(),r=V(),o=w(()=>
38{if(Ik(t)&&t.threeDSModalUrl.value){const a=t.threeDSModalUrl.value;return{source:a,logKey:JSON.stringify(["spe",a]),logMessage:"[ActionRequiredModalManager] SPE 3DS action required via threeDSModalUrl",telemetryPayload:{modalSourceType:"spe_three_ds_modal_url",sourceHostCategory:jo(a),hasModalUrl:!0},iframeLoadTelemetryContext:{modalSourceType:"spe_three_ds_modal_url"}}}const i=e.latestReceipt.value;if(i&&$c(i)){const a=i.action;if(Wg(a))return{source:a.offsiteRedirect?void 0:a.url,logKey:JSON.stringify(["receipt",i.id,a.offsiteRedirect,a.url]),logMessage:"[ActionRequiredModalManager] Receipt requires further action",telemetryPayload:{modalSourceType:"receipt_action",sourceHostCategory:jo(a.url),offsiteRedirect:a.offsiteRedirect,actionType:a.type,hasModalUrl:!a.offsiteRedirect},iframeLoadTelemetryContext:{modalSourceType:"receipt_action",offsiteRedirect:a.offsiteRedirect,actionType:a.type}}}if(i?.status==="action_required"&&i.action.type==="pre_payment_buyer_action_required"){const{action:a}=i;return{source:a.url,logKey:JSON.stringify(["receipt",i.id,a.type]),logMessage:"[ActionRequiredModalManager] Receipt requires further action",telemetryPayload:{modalSourceType:"receipt_action",actionType:a.type,hasModalUrl:!0},iframeLoadTelemetryContext:{modalSourceType:"receipt_action",actionType:a.type}}}});return $e(()=>{const i=o.value;if(!i){r.current=void 0;return}r.current!==i.logKey&&(r.current=i.logKey,n.log("action_required_modal_manager_action_required",i.logMessage,i.telemetryPayload))}),o.value}function o2(){const{i18n:e}=_(),t=r2(),n=n2({source:t?.source,logKey:t?.logKey,logMessage:"[ActionRequiredModalManager] Action required modal iframe loaded; this does not prove issuer challenge rendered",telemetryContext:t?.iframeLoadTelemetryContext});return s(t2,{source:t?.source,title:e.translate("processing.action_required"),onIframeLoad:n})}function i2(e,t){return e.has(t)}function s2(e,t){if(!e||!t)return null;const n=t.find(o=>o.method.type==="customOnsite")?.method;return n&&e.find(o=>o.type==="customOnsite"&&o.paymentMethodIdentifier===n.paymentMethodIdentifier&&o?.uiExtension?.approvalScopes&&i2(o.uiExtension.approvalScopes,vA.PaymentSessionModal))||null}function a2(e,t){e.error(t,{metadata:{paymentChallengeModal:{component:"PaymentChallengeModal",failure:"lazy_load"}}})}function l2(e){const{observability:t}=_();F(()=>{e&&a2(t,e)},[e,t])}const c2=qe({id:()=>
38"PaymentChallengeModal",displayName:"PaymentChallengeModal",suspense:!1,useError:l2,load:()=>ct(()=>Ve(()=>import("./component-PaymentChallengeModal.BIAYF72V.js"),__vite__mapDeps([199,1,16,3,4,2,5,17,6,7,8,200])))});function u2(e){return JSON.stringify([e.id,e.action.type,Nr(e.action)?e.action.challengeType:void 0,Nr(e.action)?e.action.challengeData:void 0])}function d2({modalPaymentMethodConfig:e,onModalRender:t}){const{checkout:n,observability:r}=_(),o=V(),i=Le(void 0),a=w(()=>{const c=n.latestReceipt.value;return c&&$g(c)&&Nr(c.action)?c:void 0});$e(()=>{const c=a.value;if(!c||!Nr(c.action)){o.current=void 0;return}const u=!!e.value,d=JSON.stringify([c.id,c.action.challengeType,c.action.challengeData,u]);o.current!==d&&(o.current=d,r.log("payment_challenge_modal_manager_action_required","[PaymentChallengeModalManager] Receipt requires further action",{challengeType:c.action.challengeType,challengeData:c.action.challengeData,hasModalPaymentMethodConfig:u}))}),$e(()=>{const c=a.value;if(!c||!Nr(c.action)){i.value=void 0;return}const u=u2(c),d=c.timeout?.millisecondsRemaining==null?void 0:Date.now()+c.timeout.millisecondsRemaining,p=i.peek();p?.key!==u?i.value={key:u,expiresAt:d}:d!=null&&(i.value={key:u,expiresAt:Math.min(p.expiresAt??d,d)})});const l=w(()=>{const c=a.value,u=e.value;if(!(!c||!Nr(c.action)))return u?{type:c.action.challengeType,data:c.action.challengeData,config:u,expiresAt:i.value?.expiresAt}:null});return s(ve,{when:l,children:c=>s(c2,{challengeType:c.type,challengeData:c.data,receipt:n.latestReceipt.value,paymentMethod:c.config,onModalRender:t,challengeExpiresAt:c.expiresAt})})}function zs(){const e=rc(),{checkout:t}=_(),n=H().deferredTotal;return w(()=>{if(!e.value)return!0;const r=n.value?.amount.amount;return!!(oc({checkout:t})||r)})}function p2(){const{i18n:e,shopPay:t}=_(),{managedByMarketsPro:n}=H(),r=zs();return w(()=>{if(!r.value||!cc({managedByMarketsPro:n.value}))return;const i=t.session.selectedPaymentMethod.value;if(!(!i||!Ak(i)))return e.translate("processing.redirecting_title")})}function m2({isModalRendered:e,modalPaymentMethodConfig:t}){const{i18n:n,checkout:r}=_(),o=p2();return w(()=>{if(o.value)return o.value;const i=r.latestReceipt.value;return i?$c(i)?n.translate("processing.redirecting_notice"):$g(i)?!e.value&&t.value?n.translate("processing.modal_notice",{paymentMethod:t.value.name}):n.translate("processing.wait.short"):!e.value&&t.value?.name&&Tk(t.value)&&i.status==="processing"&&t.value?n.translate("processing.modal_notice",{paymentMethod:t.value.name}):i.status==="processing_remote_checkouts"||i.status==="processed"&&i.completedRemoteCheckouts?.length?n.translate("processing.remote_shops_payments_processing"):n.translate("processing.wait.short"):n.translate("processing.wait.short")})}function f2(e){const{observability:t}=_();F(()=>{e&&t.error(e,{metadata:{cryptoModalManager:{component:"CryptoModalManager",failure:"lazy_load"}}})},[e,t])}const h2=qe({id:()=>"CryptoModalManager",displayName:"CryptoModalManager",suspense:!1,useError:f2,load:()=>ct(()=>Ve(()=>import("./component-CryptoModalManager.CkuPXivY.js"),__vite__mapDeps([201,1,2,3,4,5,188,44,70,6,7,8,202])))});function tb(){const{checkout:e}=_(),{paymentLines:t}=se(),n=H().paymentMethods,r=w(()=>s2(n.value,t.value)),o=Le(!1),i=m2({isModalRendered:o,modalPaymentMethodConfig:r}),a=su();return $e(()=>{if(e.latestReceipt.value)return Lt({content:i.value,role:"alert"})}),s(q,{children:[s(ve,{when:a,fallback:s(o2,{}),children:s(h2,{})}),s(d2,{modalPaymentMethodConfig:r,onModalRender:()=>{o.value=!0}})]})}function nb(){const{i18n:e,url:t,source:n,shop:r,checkout:o,shopPay:i}=_(),a=o.identity.current.value==="shopPay",{plan:l,currentPage:c}=Ce().value,u=rc(),d=n.type==="cartNext"||n.type==="simulated",p=Je(),m=se().paymentLines.value,f=p.current.peek(),h=o.configuration.layout.isOnePage.value,g=us(),y=wk("SHOP_CASH"),v=On(),P=lo(),b=H(),{value:C}=b.managedByMarketsPro,I=cc({managedByMarketsPro:C}),{value:S}=b.paymentFlexibilityPaymentTermsTemplate,k=oi(),E=Pr(f.deliveryNext),T=zr(f.deliveryNext),A=B(()=>m.some(({method:{type:N}})=>N==="paymentOnDelivery"),[m]),R=B(()=>m.some(({method:{type:N}})=>N==="customManualPayment"||N==="manualPayment"),[m]),L=B(()=>r.vaultForPaymentLater&&Lk(m),[r.vaultForPaymentLater,m]),M=!!S&&!k.value,D=Iu();return B(()=>{let N=[];d&&P.value?N=[{id:"cart",route:P.value.toString()}]:N=[];const U=[...N,...l.greenPath,{id:"thankYou",route:"/thank-you"}];let z=c?U.findIndex(ee=>ee.id===c.id):void 0;(z==null||z<0)&&(z=void 0);const O=p.current.peek(),K=z==null?void 0:U.slice(z+1).find(ee=>ee.skipOverPage==null||!ee.skipOverPage(O)),X=z==null?void 0:U.slice(0,z).reverse().find(ee=>ee.skipOverPage==null||!ee.skipOverPage(O));function ne(ee){if(i.isSimulated)return e.translate("general.pay_now_button_label");switch(ee){case"shipping":return e.translate("general.continue_to_shipping_method");case"payment":return e.translate("general.continue_to_payment_method");case"review":return e.translate("general.continue_to_review");case"thankYou":return v.value?e.translate("general.submit_for_review_button_label"):L?e.translate("payment.vault_for_payment_later.pay_button_label"):M&&!D.value?e.translate("general.confirm_order_button_label"):u.value||A||R||g.value||h&&y.value?e.translate("general.complete_purchase_button_label"):I&&!a&&Rk(m)?e.translate("general.continue_to_payment_method"):e.translate("general.pay_now_button_label");default:return e.translate("general.continue_button_label")}}function $(ee){switch(ee){case"review":return e.translate("processing.y
38ou_will_not_be_charged");case"thankYou":return v.value?e.translate("general.submit_for_review_notice_label"):void 0;default:return}}function J(ee){switch(ee){case"cart":return e.translate("general.back_to_cart");case"information":return e.translate("general.back_to_contact_information");case"shipping":return e.translate("general.back_to_shipping_method");case"payment":return e.translate("general.back_to_payment_method");case"buyWithPrime":return e.translate("wallets.return_to_store");default:return e.translate("general.back_button_label")}}return{nextPage:{id:K?.id,label:ne(a?"thankYou":K?.id),notice:$(a?"thankYou":K?.id)},previousPage:{label:J(X?.id),route:X?.route}}},[t,p,e,u.value,c,l.greenPath,d,m,E,T,A,R,L,h,g.value,y.value,D.value])}function g2(){const e=Ce();return w(()=>{const{plan:t}=e.value;return t.greenPath.some(({id:n})=>n==="review")})}function rb(){const{paymentLines:e}=se();return w(()=>{const t=!!Pt(e.value,"SHOP_PAY"),n=!!Pt(e.value,"SHOPIFY_INSTALLMENTS");return xk(e.value)&&!t&&!n})}function y2(){const{i18n:e}=_();return s(uy,{children:s(Q,{gap:"large-400",alignItems:"center",children:[s(Pe,{children:s(no,{size:"large",appearance:"monochrome"})}),s(je,{children:e.translate("general.processing")})]})})}function v2(){const e=g2(),t=We(nb().nextPage.id),n=Is(),{checkout:{offsitePopupController:r}}=_();return w(()=>!n.value||r.isOpen.value?!1:e.value?t.value==="thankYou":!0)}function _2(){const e=rb(),t=Ce(),n=We(nb().nextPage.id),{checkout:r}=_(),o=r.configuration.layout.isOnePage,{inMemoryApplePayParts:{asPaymentMethod:i},walletUsedForSubmissionSignal:a}=Ye(),l=se().paymentLines;return w(()=>{if(!e.value||r.wallets.activeSession.value)return!1;const c=l.value;if(Pt(c,"PAYPAL_EXPRESS"))return!1;const d=Pt(c,"APPLE_PAY");return d?i.value||a.value!=="APPLE_PAY"||!dh(d)?!1:o.value?r.wallets.escalatedWallet.value!=="APPLE_PAY":t.value.currentPage?.id==="information":o.value?!pA({paymentLines:c,walletUsedForSubmission:a.value}):a.value==="GOOGLE_PAY"?t.value.currentPage?.id==="information":n.value==="thankYou"})}function ob(){const{progressing:e}=Mt(),{i18n:t,embed:n}=_(),r=v2(),o=_2(),i=se().paymentLines,a=w(()=>n?.embedder==="google"&&!!Pt(i.value,"GOOGLE_PAY")),l=w(()=>e.value&&(o.value||r.value)&&!a.value);return $e(()=>{if(l.value)return Lt({content:t.translate("general.processing")})}),s(ve,{when:l,children:s(y2,{})})}function ib(e){return function(n){return Object.fromEntries(Array.from(e).map(r=>[r,n[r]]))}}function DY(e){return function(n){return Object.fromEntries(Object.keys(n).filter(r=>!e.has(r)).map(r=>[r,n[r]]))}}const b2="_9sntZ",P2={SkipToContentLink:b2};function sb(){const{i18n:e,embed:t}=_();return t?.isEmbeddedCheckout()?null:s("a",{href:`#${m_}`,className:P2.SkipToContentLink,children:e.translate("general.skip_to_content")})}function ab(){const{embed:e,i18n:t,checkout:{configuration:{allowRedirectToStorefront:n}}}=_(),r=lo(),{checkoutProtocolModalEventSignal:o}=xt(),{lastJourneyProgression:i}=Je(),a=V(!1);$e(()=>{if(!zt(e?.embedder))return;const d=i.value;d.type!=="failed"||d.reason!=="tooManyRequests"||a.current||(a.current=!0,_t(()=>Yf(e,"too_many_requests")))});const l=x(()=>{r.value&&window.location.assign(r.value.toString())},[r]);F(()=>()=>{o.value="none"},[o]);const c=i.value.type==="failed"&&i.value.reason==="tooManyRequests",u=n&&r.value;return c?s(or,{id:"too-many-requests-modal",heading:t.translate("too_many_requests.title"),size:"large",accessibilityLabel:t.translate("too_many_requests.title"),blocking:!0,open:!0,onShow:()=>{o.value="tooManyRequests"},children:s(Q,{gap:"base",children:[s(G,{children:u?t.translate("too_many_requests.body"):t.translate("too_many_requests.body_no_cart")}),u&&s(q,{children:[s(Pe,{display:"@media (inline-size >= small) none, block",children:s(an,{variant:"primary",inlineSize:"fill",onClick:l,children:t.translate("too_many_requests.return_to_cart")})}),s(gt,{display:"@media (inline-size >= small) auto, none",justifyItems:"end",children:s(an,{variant:"primary",onClick:l,children:t.translate("too_many_requests.return_to_cart")})})]})]})}):null}function lb(){const e=ti(),{i18n:t}=_(),n=w(()=>e.value?t.translate("order_summary.total_updated_label_with_price",{totalPrice:t.formatCurrency(e.value.amount,{currency:e.value.currencyCode,form:"name"})}):null),r=V(n.peek());return $e(()=>{const o=n.value,i=r.current;if(r.current=o,!(!o||o===i))return Lt({content:o})}),null}var bm={Progress:"xvcb04 xvcb03 _1fragemel _1frageme1 _1fragemf5 _1fragemdh _1fragemws _1fragemzf _1fragem32 _1fragem5u",toneVariant:{auto:"xvcb05",critical:"xvcb06"}};function S2({accessibilityLabel:e,id:t,max:n=1,tone:r="auto",value:o}){const i=Fn(),a=ln(),l=e||a("processing");return i&&o==null?s(je,{children:l}):s("progress",{id:t,className:Y(bm.Progress,bm.toneVariant[r]),value:o,max:n,"aria-label":l})}function xu({active:e=!1,announceProcessing:t=!0,children:n,loadingIndicatorVariant:r="spinner",showLoadingIndicator:o=!0}){const{i18n:i}=_();F(()=>
38{if(!(!e||!t))return Lt({content:i.translate("general.processing")})},[e,t,i]);const a=e&&o;return s(Pe,{children:[s(Pe,{inert:e,opacity:e&&r==="spinner"?70:void 0,children:n}),s("div",{className:bt({transitionProperty:"opacity",transitionTimingFunction:"easeInOut",transitionDuration:"slowest",pointerEvents:"none"}),style:{opacity:a?1:0},"aria-hidden":!a,children:[r==="progressbar"&&s("div",{className:bt({position:"fixed",insetBlockEnd:"small400",insetInlineStart:"small400",insetInlineEnd:"small400"}),children:s(S2,{accessibilityLabel:i.translate("general.processing")})}),r==="spinner"&&s(Pe,{position:"absolute",insetBlock:"50% auto",insetInline:"50% auto",transform:"translate(-50%, -50%)",children:s(no,{size:"large",accessibilityLabel:i.translate("general.processing")})})]})]})}function cb({children:e}){return s(Mk.Provider,{value:E2,children:e})}const E2=(e,t,n,r,o)=>({onInput:i=>{k2(i,e,r,()=>{n(void 0)})},onChange:i=>I2(i,e),clearError:()=>n(void 0),onBlur:()=>A2(e,r,t,n,o),get touched(){return r.value},get error(){return t.value},get value(){return e.value}});function C2(e,t,n,r,o){if(!t)return;const i=n.value,a=_t(()=>r.value);if(a&&e&&e===i)return;const l=t(e),c=l?{message:String(l?.message??l),origin:"client",type:"inline-validation"}:void 0;T2(a,c)&&o(c)}function k2(e,t,n,r){!t.value&&!e||(n.value=!0,r())}function I2(e,t){!t.value&&!e||(t.value=e)}function A2(e,t,n,r,o){const i=e.value;t.peek()&&C2(i,o,e,n,r)}function T2(e,t){return t?!ph(e)||e.message!==t.message:!0}var w2={colorSchemeVariant:{scheme1:"apn1wd8 apn1wd0 _1fragemxx",scheme2:"apn1wd9 apn1wd1 _1fragemxy",scheme3:"apn1wda apn1wd2 _1fragemxz",scheme4:"apn1wdb apn1wd3 _1fragemy0",scheme5:"apn1wdc apn1wd4 _1fragemy1",scheme6:"apn1wdd apn1wd5 _1fragemy2",scheme7:"apn1wde apn1wd6 _1fragemy3",scheme8:"apn1wdf apn1wd7 _1fragemy4"}};const Mu=He(void 0);Mu.displayName="SectionContext";function L2(){return Ee(Mu)}function kr({accessibilityLabel:e,accessibilityRole:t="section",accessibilityLabelledBy:n,background:r,border:o,borderRadius:i,borderStyle:a,borderWidth:l,children:c,className:u,colorLayer:d,colorScheme:p,containerName:m,display:f,heading:h,id:g,maxBlockSize:y,maxInlineSize:v,minBlockSize:P,minInlineSize:b,overflow:C,padding:I}){const S=L2(),k=t==="section"?(S?.level??0)+1:S?.level??0,E=B(()=>({level:k}),[k]),T=bF(),A=h?s(x2,{headingLevel:k,heading:h,children:c}):c,R=T.background??r,L=T.colorScheme??p,M=d==="control"?"base":"baseSpecified";return s(i_,{children:s(R2,{colorScheme:L,children:s(Mu.Provider,{value:E,children:s(Pe,{accessibilityLabel:e,accessibilityRole:t==="presentation"?void 0:t,"aria-labelledby":n,background:(R==="base"?M:R)??(L?M:void 0),border:o,borderRadius:T.borderRadius??i,borderStyle:T.borderStyle??a,borderWidth:T.borderWidth??l,boxShadow:T.boxShadow,containerName:m,className:Y(L&&w2.colorSchemeVariant[L],u),colorLayer:d||(L?"base":void 0),display:f,id:g,maxBlockSize:y,maxInlineSize:v,minBlockSize:P,minInlineSize:b,overflow:C,padding:T.padding??I,children:k>1&&t==="section"?s(sn,{children:A}):A})})})})}function R2({children:e,colorScheme:t}){const{current:n}=Dc(),r=B(()=>t&&t!==n?{parent:n,current:t}:null,[t,n]);return r?s(ys.Provider,{value:r,children:e}):s(q,{children:e})}function x2({headingLevel:e,heading:t,children:n}){let r;return e===1?r="small":e===2?r="small-300":e===3&&(r="small-500"),e<4?s(Q,{gap:r,children:[s(Wt,{children:t}),s("div",{children:n})]}):s(q,{children:[s(Wt,{children:t}),n]})}const M2=e=>e.lineAllocations.map((t,n)=>ub(e,n)),ub=(e,t)=>{const{lineAllocations:n,...r}=e,o=n[t];if(!o)throw new TypeError(`Missing line allocation at index ${t}`);return{...r,lineComponents:N2(e.lineComponents,t),lineAllocation:o}},N2=(e,t)=>e.map(({lineAllocations:n,...r})=>{const o=n[t]??n[0];if(!o)throw new TypeError("Missing line allocation for merchandise line component");return{...r,lineAllocation:o}});function OY(e){const{proposed:t,negotiated:n}=e;return t?.itemPrice?.amount!==n?.itemPrice?.amount}function D2(e){const{proposed:t,negotiated:n}=e;return t?.quantity!==n?.quantity}function Pm(e){return e.stableId}const O2=/^\$.merchandise.merchandiseLines\[(\d+)\]$/;function db(e,t){const n=F2(t);if(n!=null)return e[n]}function F2(e){const t=O2.exec(e);if(t?.[1]==null)return;const n=parseInt(t[1],10);if(!isNaN(n))return n}function pb(e,t,n){const r=new Set;for(const o of t){if(!n(o)||!("target"in o))continue;const i=db(e,o.target);i?.stableId&&r.add(i.stableId)}return r}function B2(e,t=[]){return pb(e,t,n=>n.code==="MERCHANDISE_OUT_OF_STOCK")}function Nu(e,t=[]){return pb(e,t,n=>Kg([n])||Jg([n]))}function FY(e,t=[]){for(const n of t)if(n.targetMerchandiseLines?.some(({stableId:r})=>e.includes(r))&&n.status==="available"){const r=n.methods.find(({handle:o})=>o===n.selectedDeliveryMethodHandle);if(r?.title)return r.title;continue}return null}function V2(e,t){return[...new Set([...e.map(Pm),...t.map(Pm)])].map(r=>({proposed:e.find(o=>o.stableId===r),negotiated:t.find(o=>o.stableId===r)}))}function mb(e,t,n,r){const o=V2(e,t);if(r)return Sm(o.filter(r));const i=Nu(e,n??[]),a=B2(e,n??[]),l=c=>{if(D2(c))return!0;const u=(c.negotiated||c.proposed)?.stableId;return i.has(u)||a.has(u)};return Sm(o.filter(l))}function BY(e,t,n){const r=e.filter(i=>U2(i)&&n.includes(i.code)).map(i=>db(t?.lines,i.target)).filter(i=>i!==void 0);return r.length===0?null:Array.from(new Map(r.map(i=>[i.stableId,i])).values())}function U2(e){return["AcceptNewTermViolation","ApplyChangeViolation","RemoveTermViolation","UnprocessableTermViolation","UnresolvableTermViolation"].includes(e.__typename)}function Sm(e){return e.flatMap(t=>Nk(t.proposed)?[t]:t.proposed==null?[t]:t.negotiated?[{proposed:void 0,negotiated:t.negotiated}]:[])}function z2(){const e=_().checkout.configuration.layout.isOnePage.value,t=H(),{value:n}=t.merchandiseLines,{value:r}=t.allViolations,{currentDetour:o}=Ce().value,{value:i}=t.legacyRepresentProductsAsFees,a=se().merchandiseLines.value,[l]=oe(a),c=o?.type==="stockProblems"?l:a,u=n?.lines??[],d=f=>i?j2(f):f,p=o?.type==="thankYou"?[]:d(c),m=d(u);return H2(e,p,m,r??[])}function H2(e,t,n,r){const o=Nu(t,r),i=n.filter(({quantity:u,stableId:d})=>u>0&&!o.has(d)),a=mb(t,n,r).map(({proposed:u,negotiated:d})=>d??u),l=i===void 0||i.length===0&&a.length>0;return q2(l?a:i,t,l,e)}function q2(e,t,n,r){return e.flatMap(o=>{const i=t.find(({stableId:c})=>c===o.stableId),a=n&&i?i.lineAllocations:o.lineAllocations;return M2({...o,lineAllocations:a}).map(c=>G2(c,o,r))})}function G2({lineAllocation:e,...t},n,r){return{key:`${t.stableId}-${e.stableId}`,stableId:t.stableId,id:e.stableId,image:t.image,title:t.title,subtitle:t.subtitle,components:t.lineComponents.map($2),parentRelationship:t.parentRelationship,quantity:e.quantity,properties:t.properties,options:t.options,disclosures:n.disclosures,itemPrice:n.itemPrice,compareAtPrice:n.compareAtPrice,unitPrice:e.unitPrice,totalAmountBeforeReductions:e.checkoutPriceBeforeReductions,totalAmountAfterLineDiscounts:e.totalAmountAfterLineDiscounts,deferredAmount:t.deferredAmount,totalPrice:e.totalAmountBeforeReductions,sellingPlan:t.sellingPlan??null,recurringTotal:r?t.recurringTotal:null,lineDiscounts:e.allocations.filter(W2).map(o=>Y2(o,e.stableId))}}const $2=e=>({properties:e.properties,quantity:e.lineAllocation.quantity,stableId:e.lineAllocation.stableId,totalAmountBeforeReductions:e.lineAllocation.checkoutPriceBeforeReductions,merchandise:{deferredAmount:e.deferredAmount,digest:e.digest,disclosures:e.disclosures,giftCard:e.giftCard,image:e.image,options:e.options,itemPrice:e.itemPrice,productType:e.productType,productId:e.productId,vendor:e.vend
38or,requiresShipping:e.requiresShipping,sellingPlan:e.sellingPlan,subtitle:e.subtitle,title:e.title,variantId:e.variantId}}),W2=e=>Lh(e.discountDetails.discount)&&e.discountDetails.discount.presentationLevel==="LINE",Y2=(e,t)=>({id:`allocation-${t}-${mh(e.discountDetails.title)}`,discount:e.discountDetails.discount,amount:e.amount});function j2(e){return e.filter(t=>t.legacyFee===!1)}function Du(){const{checkout:e}=_(),t=e.configuration.layout.isOnePage.value,r=(e.proposal.facts.merchandiseLines??[]).filter(a=>(a?.quantity??-1)>0).map((a,l)=>({key:`${l}${a.title}`,title:a.title,properties:a.properties,image:J2(a.image)??void 0,totalAmountAfterLineDiscounts:a.priceAfterDiscounts,totalAmountBeforeReductions:a.price,quantity:a.quantity,subtitle:a.variantTitle,lineDiscounts:a.appliedDiscounts.filter(K2).map(c=>X2(c,l)),parentTitle:a.parentTitle,components:[],unitPrice:null,totalPrice:a.priceAfterDiscounts})),o=z2();return[...t?o.filter(a=>a.quantity>0):o,...r]}const K2=e=>e.presentationLevel==="LINE",J2=e=>e?{...e,altText:e.altText||""}:null,X2=(e,t)=>({id:`allocation-${t}-${mh(e.title)}`,discount:{type:"applied",title:e.title,presentationLevel:e.presentationLevel},amount:e.amountDiscounted});function Hs(){const e=We(Du()),t=H().remoteMerchandiseDetails,{shop:{id:n}}=_();return w(()=>{const r=t.value?.stableIdToShopId??new Map,o=r.values(),i=new Map([[n,[]]]);for(const l of o)i.set(l,[]);const a=t?.value?.mergedBuyerProposalMerchandise?.__typename==="PurchaseOrderMerchandiseTerms"&&t.value.mergedBuyerProposalMerchandise.merchandiseLines?t.value.mergedBuyerProposalMerchandise.merchandiseLines.map(l=>l.__typename==="PurchaseOrderMerchandiseLine"&&l.merchandise.__typename==="ProductVariantSnapshot"?{key:l.stableId,stableId:l.stableId,id:l.merchandise.variantId??null,image:Fk(l.merchandise.image),title:l.merchandise.productTitle,subtitle:l.merchandise.title??null,quantity:l.quantity.items,properties:Ok(l.merchandise.properties),options:l.merchandise.options??[],itemPrice:po(l.merchandise.price),totalAmountBeforeReductions:po(l.merchandise.price),totalAmountAfterLineDiscounts:po(l.merchandise.price),totalPrice:po(l.merchandise.price),deferredAmount:l.merchandise.deferredAmount?po(l.merchandise.deferredAmount):void 0,sellingPlan:Dk(l.merchandise.sellingPlan),hideRuntimeExtensions:!0,unitPrice:null,components:[],parentRelationship:null,recurringTotal:void 0,lineDiscounts:[]}:void 0).filter(l=>!!l):[];for(const l of[...e.value,...a]){if(!l.stableId){i.get(n)?.push(l);continue}const c=r.get(l.stableId);if(!c){i.get(n)?.push(l);continue}i.get(c)?.push({...l,hideRuntimeExtensions:!0})}return i})}const Q2=2,Z2=3;function eH(e){const{inlineSize:t}=Us(e),n=t+2*DU,r=V(n);r.current=n;const o=Le(Q2),i=V(null);return{ref:x(l=>{if(i.current?.disconnect(),i.current=null,!l||typeof ResizeObserver>"u")return;const c=new ResizeObserver(([u])=>{if(!u)return;const d=u.contentBoxSize?.[0]?.inlineSize??u.contentRect.width;if(d===0)return;const p=l.firstElementChild;if(!p)return;const m=parseFloat(getComputedStyle(p).columnGap)||0,f=Math.floor((d+m)/(r.current+m));o.value=Math.min(Z2,Math.max(1,f))});c.observe(l),i.current=c},[o]),max:o}}var Xe={ResourceItem:"_6zbcq51k _6zbcq51j _1fragem64 _1fragem4q _1fragemws",ResourceItemContent:"_6zbcq52d _6zbcq52c _1fragem64 _1fragem73",ResourceListHeader:"_6zbcq51h _6zbcq51g _1fragem64 _1fragem19 _1fragemzf _1fragema5",ResourceItemLineContainer:"_6zbcq520 _6zbcq51z _1fragem64 _1fragem73",ResourceItemLine:"_6zbcq523 _6zbcq522 _1fragemzp _1fragemzn _1fragemzr _1fragemzl _1fragemm8 _1fragemlo _1fragemms _1frageml4 _1fragem6y",ResourceItemLineVertical:"_6zbcq525 _6zbcq524 _1fragem4q _1fragemwi",ResourceItemLineCurved:"_6zbcq527 _6zbcq526 _1fragemws",ResourceListRowGroup:"_6zbcq56 _6zbcq55 _1fragem64 _1fragem73",ResourceList:"_6zbcq58 _6zbcq57 _1fragem64 _1fragem73",resourceListHeaderBlockPaddingVariant:{none:"_6zbcq51c",base:"_6zbcq51d _6zbcq51b _1fragemo1"},resourceListHeaderHidden:"_6zbcq51f _6zbcq51e _1fragem121",borderVariant:{none:"_6zbcq518",inner:"_6zbcq519",outer:"_6zbcq51a"},primary:"_6zbcq51i _1fragemyn",resourceItemBlockPaddingVariant:{none:"_6zbcq51n",base:"_6zbcq51o"},resourceItemContentHidden:"_6zbcq52a",resourceItemContentNoWrap:"_6zbcq52b _1fragem12y",resourceItemContentAlignSelf:{auto:"_6zbcq51q",baseline:"_6zbcq51r _6zbcq51p _1fragem28"},resourceItemContentInlineAlignment:{start:"_6zbcq51w _6zbcq51t _1fragemc8",center:"_6zbcq51x _6zbcq51u _1fragembj",end:"_6zbcq51y _6zbcq51v _1fragembt"},resourceItemContentPrimary:"_6zbcq529 _6zbcq528 _1fragemyn",groupedResourceItem:"_6zbcq51s",resourceItemSpacingVariant:{small300:"_6zbcq51l",base:"_6zbcq51m"},rowGroupSpacingVariant:{none:"_6zbcq5k",small500:"_6zbcq5l _6zbcq59 _1fragem7n",small400:"_6zbcq5m _6zbcq5a _1fragem7s",small300:"_6zbcq5n _6zbcq5b _1fragem7x",small200:"_6zbcq5o _6zbcq5c _1fragem82",small100:"_6zbcq5p _6zbcq5d _1fragem87",base:"_6zbcq5q _6zbcq5e _1fragem8c",large100:"_6zbcq5r _6zbcq5f _1fragem8h",large200:"_6zbcq5s _6zbcq5g _1fragem8m",large300:"_6zbcq5t _6zbcq5h _1fragem8r",large400:"_6zbcq5u _6zbcq5i _1fragem8w",large500:"_6zbcq5v _6zbcq5j _1fragem91"},rowSpacingVariant:{none:"_6zbcq5w",small500:"_6zbcq5x",small400:"_6zbcq5y",small300:"_6zbcq5z",small200:"_6zbcq510",small100:"_6zbcq511",base:"_6zbcq512",large100:"_6zbcq513",large200:"_6zbcq514",large300:"_6zbcq515",large400:"_6zbcq516",large500:"_6zbcq517"},visuallyHidden:"_6zbcq52e _1fragem121",visibleLine:"_6zbcq521",lineOffsetVar:"var(--_6zbcq54)"};const tH=et("ResourceList");function fb({children:e,title:t,titleHidden:n,spacing:r="base",border:o="none"}){const i=Ke(void 0,tH),a=Y(Xe.ResourceList,r&&Xe.rowGroupSpacingVariant[r],o&&Xe.borderVariant[o
38]),l=t?s(Wt,{id:i,children:t}):null,c=B(()=>({spacing:r}),[r]);return s(q,{children:[t&&n?s("div",{className:Xe.visuallyHidden,children:l}):l,s(sn,{children:s("div",{role:"table","aria-labelledby":i,className:a,children:s(Ou.Provider,{value:c,children:e})})})]})}function hb({children:e,hidden:t,blockPadding:n}){const r=Y(Xe.ResourceListHeader,n&&!t&&Xe.resourceListHeaderBlockPaddingVariant[n]);return s("div",{role:"rowgroup",className:Y(Xe.ResourceListRowGroup,t&&Xe.resourceListHeaderHidden),children:s("div",{role:"row",className:r,children:e})})}function fr({children:e,primary:t,hidden:n}){return s("div",{role:"columnheader",className:Y(t?Xe.primary:void 0,n&&Xe.visuallyHidden),children:e})}const Ou=He(void 0);function gb({children:e}){return e?s("div",{role:"rowgroup",className:Xe.ResourceListRowGroup,children:e}):null}const Fu=He(void 0);function nH({spacing:e,children:t,showLines:n=!0}){const r=B(()=>({spacing:e}),[e]),o=B(()=>({showLines:n}),[n]);return s(Ou.Provider,{value:r,children:s(Fu.Provider,{value:o,children:t})})}function rH({lineOffset:e=0}){const t=Ee(Fu);return s("div",{"aria-hidden":!0,className:Xe.ResourceItemLineContainer,style:Jt({[Xe.lineOffsetVar]:rs(e)}),children:[s("div",{className:Y(Xe.ResourceItemLine,Xe.ResourceItemLineVertical,t?.showLines&&Xe.visibleLine)}),s("div",{className:Y(Xe.ResourceItemLine,Xe.ResourceItemLineCurved,t?.showLines&&Xe.visibleLine)})]})}function vn({alignSelf:e="auto",inlineAlignment:t,children:n,primary:r,hidden:o,minBlockSize:i,noWrap:a}){const{lineItems:l}=rt(),c=t??l?.inlineAlignment??"center",{className:u,style:d}=Tt({minBlockSize:i}),p=Y(Xe.ResourceItemContent,Xe.resourceItemContentInlineAlignment[c],e&&Xe.resourceItemContentAlignSelf[e],r&&Xe.resourceItemContentPrimary,o&&Xe.resourceItemContentHidden,a&&Xe.resourceItemContentNoWrap,u);return s("div",{role:"cell",className:p,style:d,children:o?s("div",{className:Xe.visuallyHidden,children:n}):n})}function qs({children:e,blockPadding:t="none",spacing:n="base",lineOffset:r=0,className:o}){const i=Ee(Ou),a=Ee(Fu);i||console.warn("<ResourceItem /> components must be wrapped in a <ResourceListBody /> component.");const l=Y(Xe.ResourceItem,t&&Xe.resourceItemBlockPaddingVariant[t],i?.spacing&&Xe.rowSpacingVariant[i.spacing],n&&Xe.resourceItemSpacingVariant[n],a&&Xe.groupedResourceItem,o);return s("div",{role:"row",className:l,children:[s(rH,{lineOffset:r}),e]})}const Em=qe({displayName:"ProductDisclosuresDetails",load:()=>ct(()=>Ve(()=>import("./component-ProductDisclosuresDetails.CpqYGDdM.js"),__vite__mapDeps([203,1,2,3,4,5,6,7,8]))),suspense:!1});function oH(e){if(typeof e=="number")return e;if(e==null||typeof e!="string"||e==="auto")return;const t="/";if(e.includes(t)){const[o,i]=e.split(t).map(c=>{const u=Number(c);return isNaN(u)||c.trim()===""?void 0:u}),a=o!==void 0&&o>0,l=i!==void 0&&i>0;if(a&&l)return o/i}const n=Number(e);return isNaN(n)?void 0:n}var Rn={Image:"_1h3po427 _1h3po426 _1fragem5u _1fragemvo",Wrapper:"_1h3po421",aspectRatio:"_1h3po425 _1h3po424 _1fragemws _1fragemzf",aspectRatioVar:"var(--_1h3po420)",inlineSizeVariant:{fill:"_1h3po429",auto:"_1h3po42a"},skeleton:"_1h3po42c",vars:{animationDelay:"var(--_1h3po422)",animationDuration:"var(--_1h3po423)"},hidden:"_1h3po428"};const iH="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",sH=100,yb=eo(function({source:t,src:n,srcSet:r,sizes:o,alt:i="",objectFit:a="contain",loading:l="eager",aspectRatio:c="1/1",accessibilityRole:u="img",border:d="none",borderRadius:p="none",borderStyle:m,borderWidth:f,className:h,id:g,inlineSize:y="fill",onError:v}){const P=["presentation","none"].includes(u),{className:b}=Tt({..._r({border:d,borderStyle:m,borderWidth:f}),borderRadius:p,objectFit:a}),C=V_(n,t),S=!(n||t||r),k=n??U_(t)??r??iH,[E,T]=oe(S);F(()=>{if(!S){T(!1);return}const N=setTimeout(()=>T(!1),sH);return()=>{clearTimeout(N)}},[S]);const{animationEnabled:A,delay:R,onAnimationStart:L,onAnimationIteration:M}=r_();return s(aH,{condition:P,children:s(lH,{condition:y!=="auto",aspectRatio:c,children:s(B_,{condition:!!C,children:[C,s("img",{...v?{onError:N=>v(N.nativeEvent)}:{}
38,src:k,srcSet:r,sizes:o,className:Y(Rn.Image,Rn.inlineSizeVariant[y],S&&A&&Rn.skeleton,S&&E&&Rn.hidden,b,h),style:{...Jt({[Rn.vars.animationDelay]:`${R}ms`,[Rn.vars.animationDuration]:`${pu}ms`})},onAnimationStart:L,onAnimationIteration:M,loading:l,id:g,role:P?u:void 0,alt:P?"":i,"aria-hidden":S?"true":void 0})]})})})});function aH({children:e,condition:t}){return t?s(Pe,{accessibilityVisibility:"hidden",children:e}):s(q,{children:e})}function lH({children:e,condition:t,aspectRatio:n}){const r=oH(n);return t&&r!==void 0?s("div",{className:Y(Rn.Wrapper,Rn.aspectRatio),style:Jt({[Rn.aspectRatioVar]:`${r}`}),children:e}):s(q,{children:e})}const cH={small:16,large:24};function uH({disclosure:e,size:t}){const n=e.symbol;if(n){const r=`${cH[t]}px`,o=t==="small"?"":n.altText??"";return s(Pe,{inlineSize:r,blockSize:r,children:s(yb,{src:n.one,srcSet:`${n.one} 1x, ${n.two} 2x, ${n.four} 4x`,alt:o,accessibilityRole:t==="small"?"presentation":"img",aspectRatio:"1/1",objectFit:"contain"})})}return s(Me,{type:"info",size:t==="small"?"small":"large-100",tone:"auto"})}const dH=et("product-disclosure-modal-"),pH=et("product-disclosure-tooltip-");function xl({disclosures:e,title:t}){const{shop:n}=_(),r=n.hasFlagEnabled(Bk),o=Je(),i=w(()=>o.hasNegotiatedOnce.value||o.pendingFieldsNegotiation.value!==void 0||o.initialUnresolvedFields.value.size===0);return r&&!i.value||!e?.length?null:s(mH,{disclosures:e,title:t})}function mH({disclosures:e,title:t}){const{i18n:n}=_(),r=Ke(void 0,dH),o=Ke(void 0,pH),i=Em.usePrefetch(),a=()=>{i()},l=n.translate("order_summary.product_disclosures.title"),c=n.translate("tooltip.accessibility_label_context",{context:t});return s(q,{children:[s(ut,{commandFor:r,interestFor:o,accessibilityLabel:c,onFocus:a,onMouseEnter:a,textDecoration:"none",tone:"monochrome",verticalAlign:"text-bottom",children:s(Me,{type:"alert-triangle",size:"small"})}),s(Sn,{id:o,children:fH(e)}),s(or,{id:r,heading:l,children:s(Em,{disclosures:e})})]})}function fH(e){return s(Pe,{inlineAlignment:"start",children:s(Q,{gap:"small-200",children:e.map(t=>s(gt,{gridTemplateColumns:"auto minmax(0, 1fr)",gap:"small-200",children:[s(gt,{blockSize:"1lh",placeItems:"center",children:s(uH,{disclosure:t,size:"small"})}),s(je,{textAlign:"start",children:t.title})]},t.id))})})}function vb(e,t){if(t)return e?.embedder?{default:t.two,one:t.two,two:t.four,four:t.four}:{default:t.one,one:t.one,two:t.two,four:t.four}}var Un={Badge:"_99ss3s1 _99ss3s0 _1fragem19 _1fragembj _1fragemzg _1fragemyz",displayVariant:{blockFlex:"_99ss3s6 _99ss3s2 _1fragem64",inlineFlex:"_99ss3s7 _99ss3s3 _1fragem6j",blockGrid:"_99ss3s8 _99ss3s4 _1fragem6t",inlineGrid:"_99ss3s9 _99ss3s5 _1fragem6o"},toneColorVariant:{critical:{base:"_99ss3se",subdued:"_99ss3sf"},warning:{base:"_99ss3sg",subdued:"_99ss3sh"},success:{base:"_99ss3si",subdued:"_99ss3sj"},neutral:{base:"_99ss3sl",subdued:"_99ss3sm _99ss3sk _1fragem13d"},accent:{base:"_99ss3sn",subdued:"_99ss3so"}},sizeVariant:{base:"_99ss3sc _99ss3sa _1fragemt1 _1fragemr8",small100:"_99ss3sd _99ss3sb _1fragemsw _1fragemr3"},borderRadiusVariant:{none:"_99ss3su _99ss3sp _1fragemfk _1fragemge _1fragemi2 _1fragemh8",base:"_99ss3sv _99ss3sq _1fragemfu _1fragemgo _1fragemic _1fragemhi",small:"_99ss3sw _99ss3sr _1fragemfp _1fragemgj _1fragemi7 _1fragemhd",large:"_99ss3sx _99ss3ss _1fragemfz _1fragemgt _1fragemih _1fragemhn",fullyRounded:"_99ss3sy _99ss3st _1fragemg4 _1fragemgy _1fragemim _1fragemhs"},iconVariant:"_99ss3sz _1fragem7s _1fragem9l _1fragemx7",visuallyHidden:"_99ss3s10 _1fragem121"};function _b({accessibilityLabel:e,accessibilityVisibility:t,children:n,color:r="base",borderRadius:o="fullyRounded",display:i="block",icon:a,iconPosition:l="start",id:c,size:u="base",tone:d="auto",visibility:p}){const m=a?s(Me,{size:u,type:a,tone:hH(d)}):null,f=s(q,{children:[l==="start"?m:null,s("span",{children:n}),l==="end"?m:null]}),h=a?`${i}Grid`:`${i}Flex`;return s("div",{id:c,className:Y(Un.Badge,Un.displayVariant[h],Un.toneColorVariant[d==="auto"?"neutral":d][r],Un.sizeVariant[gH(u)],Un.borderRadiusVariant[o],a&&Un.iconVariant,p==="hidden"&&Un.visuallyHidden),"aria-hidden":t==="hidden"?!0:void 0,children:e?s(q,{children:[s("span",{className:Un.visuallyHidden,children:e}),f]}):f})}function hH(e){switch(e){case"accent":case"warning":case"success":return"auto";default:return e}}function gH(e="base"){switch(e){case"small":case"small-100":return"small100";default:return e}}function yH(e,t){for(const n of t){const r=n.lineAllocations.findIndex(i=>i.stableId===e),o=n.lineAllocations[r];if(r>=0&&o)return{lineAllocation:o,parent:n,index:r}}return null}function vH({stableId:e,merchandiseLines:t}){if(!e)return null;const n=yH(e,t);if(!n)return null;const{parent:r,index:o}=n;return ub(r,o)}function _H({stableId:e,merchandiseLines:t}){return!vH({stableId:e,merchandiseLines:t})?.variantId}function Bu(){const{i18n:e}=_();function t(o){return e.formatCurrency(o.amount,{currency:o.currencyCode,form:"short"})}function n(o,i,a,l){const c=e.translate("subscriptions.recurring_totals_with_policies.first_cycles",{count:a,total_price:i}),u=e.translate("subscriptions.recurring_totals_with_policies.following_cycles",{total_price:o,interval:l});return`${c}${u}`}function r({fixedPrice:o,recurringPrice:i,fixedPriceCount:a,interval:l,intervalCount:c}
38){const u=(()=>{switch(l){case"year":return e.translate("subscriptions.recurring_total_intervals.year",{count:c});case"month":return e.translate("subscriptions.recurring_total_intervals.month",{count:c});case"week":return e.translate("subscriptions.recurring_total_intervals.week",{count:c});case"day":return e.translate("subscriptions.recurring_total_intervals.day",{count:c});default:return""}})();return o&&a?n(t(i),t(o),a,u):e.translate("subscriptions.recurring_totals",{total_price:t(i),interval:u})}return r}function VY(){const e=Bu();function t(n){return n?n.map(e):void 0}return t}function bH({available:e,name:t,value:n}){const r=`${t}: ${n}`;return typeof n=="string"&&n.lastIndexOf("https://cdn.shopify.com",0)===0?s(ut,{href:n,children:s(Cm,{condition:e,children:s(G,{size:"small",color:"subdued",children:t})})}):s(Cm,{condition:e,children:s(G,{size:"small",color:"subdued",children:r})})}function Cm({condition:e,children:t}){return e===!1?s(G,{type:"redundant",children:t}):t}function bb({properties:e,available:t}){const n=e.flatMap(({name:r,visible:o,value:i,sourceType:a})=>o&&a!=="MerchandisePropertyValueJson"&&i!==""&&i!==null?[s(Pe,{accessibilityRole:"list-item",children:s(bH,{available:t,name:r,value:i})},r)]:[]);return n.length>0?s(Q,{accessibilityRole:"unordered-list",gap:"small-400",children:n}):null}const PH="dDm6x",SH={wordBreak:PH};function EH({id:e,deferredAmount:t,options:n,properties:r,recurringTotal:o,sellingPlan:i,subtitle:a,title:l,titleSize:c,totalPrice:u,children:d,titleAccessory:p,blockLayoutContent:m,remoteShopName:f,hasFailed:h,hideRuntimeExtensions:g}){const{lineItems:{optionsColor:y="subdued",optionsFormat:v="inline",optionsSeparator:P="comma",optionsTypography:b={},titleTypography:C={}}}=rt(),I=B(()=>e&&!g?{stableId:e}:null,[e,g]),S=c??"small",k=b.size??"small",{i18n:E}=_(),T=n&&n.length>0,A=P==="middot"?" · ":", ",R=Bu(),{value:L}=H().merchandiseLines,M=Ce(),D=w(()=>M.value.currentDetour?.type==="thankYou"?"Checkout::ThankYou::CartLineDetails::RenderAfter":"Checkout::CartLineDetails::RenderAfter"),N=it(D.value),U=_H({stableId:e,merchandiseLines:L?.lines??[]})?[]:N,z={size:k,color:y},O={size:k,color:y},K=f||h;return s(Pe,{className:SH.wordBreak,children:[K?s(Q,{direction:"inline",gap:"small-300",children:[f?s(G,{size:"small",color:"subdued",children:f}):null,h?s(_b,{icon:"alert-circle",tone:"critical",children:E.translate("order_summary.unconfirmed_label")}):null]}):null,s(je,{size:S,children:[s(CH,{condition:C.weight==="bold",children:l}),p]}),s(Q,{children:[m,v==="inline"&&a?s(je,{...O,children:a}):null,v==="inlineDescriptionList"&&T?s(je,{...O,children:n?.map(({name:X,value:ne})=>`${X}: ${ne}`).join(A)}):null,v==="descriptionList"&&T?s(Pe,{accessibilityRole:"unordered-list",children:n?.map(({name:X,value:ne})=>{const $=`${X}: ${ne}`;return s(Pe,{accessibilityRole:"list-item",children:s(G,{...z,children:$})},X)})}):null,i?.name?s(je,{...O,children:i.name}):null,o&&o.fixedPrice&&o.fixedPriceCount?s(je,{...O,children:R(o)}):null,r&&s(bb,{properties:r}),d,I?s($t,{customizations:U,options:I}):null]})]})}function CH({condition:e,children:t}){return e?s(G,{type:"strong",children:t}):t}function kH({amount:e}){const{i18n:t}=_();if(e.amount<=0)return null;const n=t.formatCurrency(-e.amount,{currency:e.currencyCode,form:"short"}),r=t.translate("order_summary.compare_at_sale",{sale_amount:n});return s(je,{type:"small",color:"subdued",children:r})}const Pb=He(null);function IH(){return Ee(Pb)}var Wa={Summary:"_1mwdekd1 _1mwdekd0 _1fragem126 _1fragemzg _1fragem5u",Icon:"_1mwdekd3 _1mwdekd2 _1fragem6e"};function Sb({children:e,id:t}){const{onToggle:n,isOpen:r,contentId:o}=IH()??{},i=r!==void 0;return e?i?s("button",{id:t,className:Wa.Summary,onClick:n,"aria-controls":o,"aria-expanded":r,type:"button",children:[e,s(Me,{size:"small-200",type:r?"chevron-up":"chevron-down",className:Wa.Icon})]}):s("p",{id:t,className:Wa.Summary,children:e}):null}const AH=et("Details"),TH=gw(function({open:t,defaultOpen:n=!1,onToggle:r,onAfterToggle:o,id:i,summary:a,content:l,toggleTransition:c="auto"}){const u=t!==void 0,[d,p]=oe(n),m=u?t:d,f=`${Ke(i,AH)}-content`,h=V(),g=x(b=>{b?.preventDefault();const C=I=>{typeof r=="function"&&r(I?"open":"closed",I?"closed":"open")};u?C(m):p(I=>(C(I),!I))},[u,m,r]),y=b=>{const C=h.current==="entering"&&b==="entered",I=h.current==="exiting"&&b==="exited";
38(C||I)&&typeof o=="function"&&o(C?"closed":"open",C?"open":"closed"),h.current=b};(!l||Array.isArray(l)&&l.length<1)&&console.warn("Details: content is required for toggle functionality");const v=typeof a=="string"?s(Sb,{children:a}):a,P=B(()=>({isOpen:m,onToggle:g,contentId:f}),[f,g,m]);return s(Pb.Provider,{value:P,children:s("div",{id:i,children:[v,s(gn,{id:f,open:m,duration:c==="auto"?"base":"none",onTransition:y,children:l})]})})});var km={overflowHidden:"_1r0jjrp0 _1fragemup _1fragemv4",visuallyHidden:"_1r0jjrp1 _1fragem121"};function Im({accessibilityLabel:e,accessibilityRole:t="generic",accessibilityVisibility:n="visible",alignSelf:r="auto",background:o="transparent",backgroundHoverAndFocus:i,blockSize:a="auto",border:l="none",borderColor:c,borderRadius:u="none",borderStyle:d,borderWidth:p,children:m,display:f="auto",gridColumn:h="auto",gridRow:g="auto",id:y,inlineSize:v="auto",maxBlockSize:P="none",maxInlineSize:b="none",minBlockSize:C="0",minInlineSize:I="0",overflow:S="visible",padding:k="none",paddingBlock:E,paddingBlockEnd:T,paddingBlockStart:A,paddingInline:R,paddingInlineEnd:L,paddingInlineStart:M}){const D=Qr(),{Element:N,role:U}=ui(t,{defaultElement:D?"span":"div"}),{className:z,style:O,styleElement:K}=Tt({alignSelf:r,backgroundColor:o,backgroundColorHoverAndFocus:i,blockSize:a,..._r({border:l,borderColor:c,borderStyle:d,borderWidth:p}),borderRadius:u,display:f,gridColumn:h,gridRow:g,inlineSize:v,maxBlockSize:P,maxInlineSize:b,minBlockSize:C,minInlineSize:I,padding:k,paddingBlock:E,paddingBlockEnd:T,paddingBlockStart:A,paddingInline:R,paddingInlineEnd:L,paddingInlineStart:M},{transforms:{display:Pc}});return s(q,{children:[K,s(N,{"aria-hidden":n==="hidden"?!0:void 0,"aria-label":e,className:Y(n==="exclusive"&&km.visuallyHidden,S==="hidden"&&km.overflowHidden,z),id:y,role:U,style:O,children:m})]})}const wH={auto:"block",inline:"inlineBlock",block:"block"},Am=e=>e==="auto"?"auto":e in en?en[e]:void 0,LH=e=>wH[e];function Vt({blockSize:e="auto",display:t="auto",inlineSize:n="auto",id:r}){const{className:o,style:i}=Tt({blockSize:e,display:t,inlineSize:n},{transforms:{blockSize:Am,display:LH,inlineSize:Am}});return s("div",{className:Y(o),id:r,style:i})}function RH({components:e,id:t}){const n=e.some(({merchandise:h})=>h.disclosures?.length),[r,o]=oe(e.length<=10||n),i=x(()=>{o(h=>!h)},[]),{i18n:a,embed:l}=_(),{lineItems:{optionsColor:c="subdued"}}=rt(),u={size:"small",color:c},d=it("Checkout::CartLineDetails::RenderLineComponents"),p=B(()=>e.reduce((h,{quantity:g})=>h+g,0),[e]),m=B(()=>t?{stableId:t}:null,[t]);if(e.length===0)return null;if(m&&d.length>0){const h=e.filter(({merchandise:g})=>g.disclosures?.length);return s(Q,{gap:"base",overflow:"hidden",children:[s($t,{customizations:d,options:m}),h.map(({stableId:g,merchandise:y})=>s(G,{size:"small",children:[y.title," ",s(xl,{disclosures:y.disclosures,title:y.title})]},g))]})}const f=r?a.translate("order_summary.collapse_component_information",{count:p}):a.translate("order_summary.expand_component_information",{count:p});return s(q,{children:[s(TH,{open:r,onToggle:i,summary:s(Sb,{children:s(G,{color:"subdued",size:"small",children:f})}),content:s(Pe,{paddingBlockStart:"small-400",children:s(Q,{accessibilityRole:"unordered-list",gap:"small-100",children:e.map(({stableId:h,merchandise:{title:g,subtitle:y,image:v,sellingPlan:P,disclosures:b},quantity:C,properties:I})=>{const S=a.translate("order_summary.component_quantity_title",{quantity:C,product_title:g}),k=vb(l,v);return s(gt,{accessibilityRole:"list-item",gridTemplateColumns:"auto minmax(0, 1fr)",gap:"small-300",children:[s(Im,{alignSelf:"start",children:s(Vs,{size:"small",src:k?.one,srcSet:k?`${k.one} 1x, ${k.two} 2x, ${k.four} 4x`:void 0,alt:v?.altText})}),s(Im,{alignSelf:"center",children:s(Q,{children:[b?.length?s(G,{size:"small",children:[S," ",s(xl,{disclosures:b,title:g})]}):s(G,{size:"small",children:S}),y&&s(G,{...u,children:y}),P&&s(G,{...u,children:P.name}),I&&s(bb,{properties:I})]})})]},h)})})})}),s(Vt,{blockSize:"small-400"})]})}function xH({parentTitle:e}){const{i18n:t}=_(),{lineItems:{optionsColor:n}}=rt(),r={type:"small",color:n??"subdued"},o=t.translate("order_summary.group_title_label",{group_title:e});return s(je,{...r,children:o})}function Vu(e){return e.checkoutHideZeroValueDiscountLines===!0}function MH({discount:e,amount:t}){const{i18n:n,shop:r}=_();if(Vu(r)&&t.amount===0)return null;const i=t.amount>0?`(${n.formatCurrency(-t.amount,{currency:t.currencyCode,form:"short"})})`:null,a=(e.type==="code"&&e.codeHidden?n.translate("order_summary.discount_title"):e.title).toUpperCase();return s(gt,{gridAutoFlow:"column",gridAutoColumns:"1fr",gridTemplateColumns:"minmax(auto, max-content) minmax(0, 1fr)",gridTemplateRows:"minmax(0, 1fr)",gap:"small-400",alignItems:"center",alignContent:"center",children:[s(Me,{type:"discount",size:"small"}),s(G,{accessibilityVisibility:"exclusive",children:n.translate("order_summary.discount_code_aria_text")}),s(je,{type:"small",color:"subdued",children:[s(G,{dir:"auto",children:a}),i?` ${i}`:null]})]},e.title)}function Tm({totalAmountBeforeReductions:e,totalAmountAfterDiscounts:t,size:n}){const{i18n:r}=_(),o=t.amount>0?r.formatCurrency(t.amount,{currency:t.currencyCode,form:"short"}):s(G,{letterCase:"uppercase",children:r.translate("order_summary.free_total_label")});return s(q,{children:[s(G,{accessibilityVisibility:"exclusive",children:r.translate("order_summary.original_price")}),s(G,{size:"small",color:"subdued",type:"redundant",children:r.formatCurrency(e.amount,{currency:e.currencyCode,form:"short"})}),s(G,{accessibilityVisibility:"exclusive",children:r.translate("order_summary.price_after_discount_aria_text")}),s(je,{size:n,children:o})]})}function NH({totalAmountBeforeReductions:e,totalAmountAfterLineDiscounts:t,compareAtTotal:n,presentationLevel:r,hasDeferredAmount:o,hasFailed:i,size:a}){const{i18n:l}=_(),{lineItems:{priceTypography:c={}}}=rt();let u;if(i?u="redundant":c.weight==="bold"&&(u="strong"),n&&e.amount<n.amount)return s(Tm,{totalAmountAfterDiscounts:t,totalAmountBeforeReductions:n,size:a});if(e.amount>
38t.amount&&r==="LINE")return s(Tm,{totalAmountAfterDiscounts:t,totalAmountBeforeReductions:e,size:a});const d=e.amount===0&&!o,p=d?"uppercase":void 0,m=t;return s(G,{translate:d,letterCase:p,type:u,tone:i?"critical":void 0,size:a,children:d?l.translate("order_summary.free_total_label"):l.formatCurrency(m.amount,{currency:m.currencyCode,form:"short"})})}function DH(){const{i18n:e}=_();return x(t=>{switch(t){case"MG":return e.translate("units.milligram");case"G":return e.translate("units.gram");case"KG":return e.translate("units.kilogram");case"ML":return e.translate("units.milliliter");case"CL":return e.translate("units.centiliter");case"L":return e.translate("units.liter");case"M3":return e.translate("units.cubic_meter");case"MM":return e.translate("units.millimeter");case"CM":return e.translate("units.centimeter");case"M":return e.translate("units.meter");case"M2":return e.translate("units.square_meter");case"OZ":return e.translate("units.ounce");case"LB":return e.translate("units.pound");case"FLOZ":return e.translate("units.fluid_ounce");case"PT":return e.translate("units.pint");case"QT":return e.translate("units.quart");case"GAL":return e.translate("units.gallon");case"IN":return e.translate("units.inch");case"FT":return e.translate("units.foot");case"YD":return e.translate("units.yard");case"FT2":return e.translate("units.square_foot");case"ITEM":return e.translate("units.item");default:return t}},[e])}function OH(e){const{i18n:t}=_(),n=DH();if(e===null)return"";const{referenceValue:r,referenceUnit:o}=e.measurement,i=n(o),a=r.toString(),l=t.formatCurrency(e.price.amount,{currency:e.price.currencyCode,form:"short"});if(o==="ITEM"){if(r===1)return t.translate("order_summary.unit_price.per_item.single",{price:l});if(r>1)return t.translate("order_summary.unit_price.per_item",{price:l,count:r})}else{if(r===1)return t.translate("order_summary.unit_price.per_unit.single",{price:l,unit:i});if(r>1)return t.translate("order_summary.unit_price.per_unit.plural",{price:l,unit:i,count:a})}return""}function FH({unitPrice:e}){const t=OH(e);return e===null?null:s(je,{type:"small",color:"subdued",children:t})}function BH({unitPrice:e,itemPrice:t,quantity:n}){const o=!!H().buyerIdentity.value?.purchasingCompany&&!e&&n>1&&t,{i18n:i}=_();return e?s(FH,{unitPrice:e}):o?s(q,{children:s(je,{type:"small",color:"subdued",children:[s(G,{accessibilityVisibility:"hidden",children:i.translate("order_summary.price_per_item.label",{price:i.formatCurrency(t.amount,{currency:t.currencyCode,form:"short"})})}),s(G,{accessibilityVisibility:"exclusive",children:i.translate("order_summary.price_per_item.accessibility_label",{price:i.formatCurrency(t.amount,{currency:t.currencyCode,form:"short"})})})]})}):null}const VH="Byb5s",UH={Line:VH},zH={small200:"small-200",small100:"small",base:"base",large100:"large",large200:"large-200"};function Eb(e="base"){return zH[e]}function HH(e){const n=e.parentRelationship?nH:q;return s(n,{spacing:"small100",children:s(qH,{...e})})}function qH({id:e,quantity:t,itemPrice:n,compareAtPrice:r,unitPrice:o,lineDiscounts:i,deferredAmount:a,totalPrice:l,sellingPlan:c,options:u,recurringTotal:d,title:p,subtitle:m,image:f,properties:h,disclosures:g,totalAmountBeforeReductions:y,totalAmountAfterLineDiscounts:v,components:P,hasReturnability:b,parentTitle:C,parentRelationship:I,remoteShopName:S,hasFailed:k,hideRuntimeExtensions:E,hidePrice:T,className:A}){const{shop:R,i18n:L,embed:M}=_(),D=vb(M,f),{lineItems:{quantityVisibility:N="visible",priceLayout:U="inline",priceTypography:z={},titleTypography:O={}},merchandiseThumbnail:{size:K}={}}=rt(),X=R.hasFlagEnabled(Vk),ne=I!==null,$=X&&r?{amount:r.amount*t,currencyCode:r.currencyCode}:null,J=B(()=>{if(X&&r&&n){const _e=(r.amount-n.amount)*t;return _e>0?{amount:_e,currencyCode:r.currencyCode}:null}return null},[X,r,n,t]),ee=z.size,te=ne?"small":Eb(K),W=O.size??"base",{blockSize:he}=Us(te),de=N==="hidden"||t===1&&N==="visibleWhenMultiple"?void 0:t,le=T?null:s(NH,{totalAmountBeforeReductions:y,totalAmountAfterLineDiscounts:v,compareAtTotal:$,presentationLevel:i.length||J?.amount?"LINE":"CART",hasDeferredAmount:!!a?.amount,hasFailed:k,size:ee});return s(qs,{className:A,lineOffset:I?0:he/2,children:[s(vn,{inlineAlignment:"start",children:s(Vs,{size:te,src:D?.one,srcSet:D?`${D.one} 1x, ${D.two} 2x, ${D.four} 4x`:void 0,alt:f?.altText,totalItems:de})}),s(vn,{primary:!0,alignSelf:"baseline",minBlockSize:`${he}px`,children:s(EH,{id:e,title:p,titleSize:W,subtitle:m,properties:h,sellingPlan:c,options:u,recurringTotal:d,totalPrice:l,deferredAmount:a,titleAccessory:g?.length?s(q,{children:[" ",s(xl,{disclosures:g,title:p})]}):void 0,blockLayoutContent:U==="block"?le:void 0,remoteShopName:S,hasFailed:k,hideRuntimeExtensions:E,children:[b?s(G,{size:"small",color:"subdued",children:L.translate("amazon_pay.prime_returnability")}
38):null,s(BH,{unitPrice:o,itemPrice:n,quantity:t}),J?.amount?s(kH,{amount:J}):null,i.length>0||P.length>0?s(q,{children:[i.map(_e=>s(MH,{discount:_e.discount,amount:_e.amount},_e.id)),s(RH,{components:P,id:e})]}):null,P.length<1&&C?s(xH,{parentTitle:C}):null]})}),s(vn,{hidden:!0,children:s(G,{children:t})}),U==="inline"?s(vn,{alignSelf:"baseline",children:s(Pe,{className:UH.Line,inlineAlignment:"end",children:le})}):null]})}const GH="KKoGf",$H="kAxbv",wm={SettleDown:GH,SettleUp:$H};function WH(e){switch(e){case"PICK_UP":return wm.SettleUp;case"SHIPPING":return wm.SettleDown;default:return}}function Cb(e){return e!==qn.Country&&e!==qn.CountryProvince}function YH(e){switch(e){case qn.Country:return["countryCode"];case qn.CountryProvince:return["countryCode","zoneCode"];case qn.CountryProvinceZip:return["countryCode","zoneCode","postalCode"];case qn.CountryProvinceZipAddress:return["countryCode","zoneCode","postalCode","address1"];case qn.Anything:return["countryCode","zoneCode","postalCode","address1","address2","city","company","firstName","lastName","phone"]}}function jH(e,t){return e?.deliveryExpectationPresentmentTitle?.short||t?.short}function KH(e,t,n,r){return t?n==="unavailable"||!r?.maxDeliveryDateTime&&!r?.minDeliveryDateTime:!e}function UY({deliveryMethod:e,localDelivery:t,subscriptionDelivery:n}){const{title:r,carrierName:o}=e;return t||n||(!o||r.toLowerCase().includes(o.replace(/[^\w\s]/,"").toLowerCase())?r:`${o} ${r}`)}function zY(e,t,n,r,o){const i=fy(n??[],e?.handle);let a=KH(e?.displayCheckoutRedesign,t,o,i),l,c,u,d;r||(l=i?.minDeliveryDateTime||e?.minDeliveryDateTime,c=i?.maxDeliveryDateTime||e?.maxDeliveryDateTime,u=jH(i,e?.deliveryPromisePresentmentTitle),d=i?.brandedPromise||e?.brandedPromise,i?.minDeliveryDateTime&&i?.maxDeliveryDateTime&&t&&!d&&(a=!0));const p=i?.minDeliveryDateTime&&i?.maxDeliveryDateTime;return{showEstimatedDeliveryLabel:a,asyncShopPromiseEnabled:t,deliveryExpectationDateTime:p,estimatedDeliveryLabelTitle:u,minDeliveryDate:l,maxDeliveryDate:c,brandedPromise:d}}function HY(e){const t=[],n=[];return e.forEach(r=>{r.type==="SUBSCRIPTION"?t.push(r):n.push(r)}),{subscriptionLines:t,oneTimePurchaseLines:n}}function qY(e,t,n){const r=fy(t,e.handle);let o;return r&&r.minDeliveryDateTime&&r.maxDeliveryDateTime&&n&&(o=r),{deliveryExpectation:o,shopPromise:r?.brandedPromise}}function GY(e){return e.reduce((t,{quantity:n})=>t+n,0)}function $Y(e){return Object.values(e.reduce((t,n)=>{const{id:r,stableId:o,quantity:i}=n,a=r||o;return a&&(t[a]?t[a].quantity+=i:t[a]={...n}),t},{}))}function JH(e){const t={};return e?.deliveryExpectationLines?.forEach(n=>{n.deliveryStrategyHandle&&(t[n.deliveryStrategyHandle]=n)}),t}function XH({deliveryLines:e,deliveryExpectations:t}){const n={};if(!e)return n;const r=JH(t);return e.forEach(o=>{if(o.status!=="available")return;const i=o.methods.find(d=>d.handle===o.selectedDeliveryMethodHandle);if(!i)return;const{brandedPromise:a,handle:l}=i;if(!a||a.handle!==Uk)return;const u=r[l]?.returnability??!1;o.targetMerchandiseLines?.forEach(d=>n[d.stableId]={brandedPromise:a,hasReturnability:u})}),n}function WY(e){if(!e)return[];const t=e.reduce((n,r)=>{const o=r?.flatRateGroupId??ul(),i=n[o];if(i){const a=i.targetMerchandiseLines.map(l=>l.digest);r.targetMerchandiseLines.filter(l=>!a.includes(l.digest)).forEach(l=>i.targetMerchandiseLines.push(l))}else n[o]=r;return n},{});return Object.values(t)}function QH(e,t){const n=V(null),r=V(new Set),o=new Set(e),i=n.current,a=t==null?null:new Set(t);if(i!=null){for(const l of o)!i.has(l)&&(a==null||a.has(l))&&r.current.add(l);for(const l of r.current)o.has(l)||r.current.delete(l)}return n.current=o,r.current}const ZH={position:"end",source:"magnify"};function Lm({hasFilter:e,maxItems:t,merchandiseLines:n,totalLineQuantities:r,deliveryGroup:o}){const[i,a]=oe(""),{i18n:l}=_(),c=t===void 0?n.map(v=>v.key):n.slice(0,t).map(v=>v.key),u=QH(n.map(v=>v.key),c),d=WH(o),{value:p}=sc(),{value:m}=H().deliveryExpectations,f=B(()=>XH({deliveryLines:p,deliveryExpectations:m}),[p,m]),h=B(()=>{const v=i.toLowerCase().split(" ").filter(Boolean);return n.filter(P=>v.every(b=>P.title.toLowerCase().includes(b)||P.subtitle?.toLowerCase().includes(b)))},[i,n]),g=B(()=>h?.reduce((v,P)=>v+P.quantity,0),[h]),y=n.length;return s(q,{children:[e&&s(q,{children:[s(J_,{autoFocus:!0,icon:ZH,controlledValue:i,onInput:v=>a(v),label:l.translate("order_summary.more_items_modal.search_item")}),s(Vt,{blockSize:"large-300"})]}),e&&i&&s(q,{children:[s(Q,{direction:"inline",justifyContent:"space-between",children:[s(G,{color:"subdued",children:l.translate("order_summary.more_items_modal.number_items_shown",{shownNumber:g,totalNumber:r||y||0})}),s(ut,{onClick:()=>a(""),children:l.translate("order_summary.more_items_modal.clear_search")})]}),s(Vt,{blockSize:"large-300"})]}),e&&h.length===0?s(Q,{direction:"inline",justifyContent:"center",gap:"small-400",padding:"none none large-300 none",children:[s(Pe,{inlineSize:"56px",children:s(Me,{size:"fill",type:"alert-circle"})}),s(je,{textAlign:"center",children:l.translate("order_summary.more_items_modal.empty_results",{searchText:i})})]}):s(fb,{title:l.translate("order_summary.shopping_cart_label"),titleHidden:!0,children:[s(hb,{hidden:!0,children:[s(fr,{hidden:!0,children:l.translate("order_summary.product_image_label")}),s(fr,{hidden:!0,children:l.translate("order_summary.description_label")}),s(fr,{hidden:!0,children:l.translate("order_summary.quantity_label")}),s(fr,{hidden:!0,children:l.translate("order_summary.price_label")})]}),s(gb,{children:h.map(({key:v,...P},b)=>{if(t!==void 0&&b>=t)return null;const C=v.substring(0,v.lastIndexOf("-"));return s(HH,{...P,...f[C]??{},className:u.has(v)?d:void 0},v)})})]})]})}const eq=12,Rm=16,tq="merchandise-lines-modal";function Uu({merchandiseLines:e,modalId:t=tq,totalLineQuantities:n,deliveryGroup:r}){const{i18n:o}=_(),i=e.length,a=i>Rm?eq:Rm;return s(q,{children:[s(Lm,{maxItems:a,merchandiseLines:e,totalLineQuantities:n,deliveryGroup:r}),i>a&&s(Q,{direction:"inline",gap:"base",justifyContent:"center",padding:"large-100 none none none",children:[s(an,{inlineAlignment:"center",commandFor:t,children:o.translate("order_summary.view_all_items",{count:n||i||0})}),s(or,{id:t,heading:o.translate("order_summary.number_items",{count:n||i||0}),blockSize:"100%",children:s(Lm,{hasFilter:!0,merchandiseLines:e,totalLineQuantities:n})})]})]})}function nq({merchandiseLinesByDeliveryType:e}){const{i18n:t}=_(),n=w(()=>{const i=new Set;return Array.from(e.value.entries()).map(([a,l])=>({group:a,merchandiseLines:l.map(c=>{const u=i.has(c.key);
38return i.add(c.key),u?{...c,hidePrice:u}:c}),totalLineQuantities:l.reduce((c,u)=>c+u.quantity,0)}))}),r=i=>{switch(i){case"PICK_UP":return t.translate("delivery_options.pickup");case"SHIPPING":return t.translate("delivery_options.ship");case"NOT_REQUIRED":return t.translate("delivery_options.digital_product")}},o=i=>{switch(i){case"PICK_UP":return"merchandise-lines-modal-pick-up";case"SHIPPING":return"merchandise-lines-modal-shipping";case"NOT_REQUIRED":return"merchandise-lines-modal-not-required"}};return s(Q,{gap:"large-200",children:s(Xn,{each:n,getKey:i=>i.group,children:({group:i,merchandiseLines:a,totalLineQuantities:l})=>s(Q,{gap:"base",children:[s(Wt,{level:2,children:r(i)}),s(Uu,{merchandiseLines:a,modalId:o(i),totalLineQuantities:l,deliveryGroup:i})]})})})}function rq({merchandiseLinesByShop:e,totalLineQuantities:t}){const{i18n:n,shop:{id:r,name:o,remoteShopsConfigMap:i},observability:a}=_(),l=new Map,c=e.get(r)??[],u=c.length>0;u&&l.set(n.translate("order_summary.from_shop_heading",{shop_name:o}),{lines:c,includeTotalLineQuantities:!0});const d=B(()=>Array.from(e.entries()).filter(([,y])=>y.length>0).filter(([y])=>y!==r),[e,r]),p=d.filter(([y])=>!i?.get(y)?.name).map(([y])=>y),m=p.length>0,f=p.join(",");F(()=>{p.length!==0&&a.error(new iq("Missing remote shop names",{metadata:{shopIdsWithMissingNames:p}}))},[f,a]);const h=m||d.length>1,g=B(()=>d.flatMap(([y,v])=>v.map(P=>({...P,...h?{remoteShopName:i?.get(y)?.name}:{}}))),[d,h,i]);if(g.length===0)a.error(new oq);else{const y=m||u?n.translate("order_summary.from_other_stores_heading"):n.translate("order_summary.from_multiple_stores_heading"),v=h?y:n.translate("order_summary.from_shop_heading",{shop_name:i.get(d[0][0]).name});l.set(v,{lines:g,includeTotalLineQuantities:!1})}return s(Q,{gap:"large-200",children:Array.from(l.entries()).map(([y,{lines:v,includeTotalLineQuantities:P}])=>s(Q,{gap:"base",children:[s(Wt,{level:2,children:y}),s(Uu,{merchandiseLines:v,totalLineQuantities:P?t:void 0})]},y))})}class oq extends bn{constructor(){super("MerchandiseLinesWithRemote should not be used if there aren't any remote merchandise lines"),this.name="MissingRemoteShopNamesError",this.defaultGroupingHash="missing_remote_shop_names"}}class iq extends bn{constructor(){super(...arguments),this.name="MissingRemoteShopNamesError",this.defaultGroupingHash="missing_remote_shop_names"}}const sq=["PICK_UP","SHIPPING","NOT_REQUIRED"];function kb(e){if(e.length){if(e.includes("PICK_UP"))return"PICK_UP";if(e.includes("SHIPPING")||e.includes("LOCAL"))return"SHIPPING";if(e.every(t=>t==="NONE"))return"NOT_REQUIRED"}}function aq(e){return kb(e.deliveryMethodTypes)}function lq(e){if(e.status==="not_required")return"NOT_REQUIRED";const t=e.methods.find(({handle:n})=>n===e.selectedDeliveryMethodHandle);return kb(t?[t.methodType]:e.methods.map(({methodType:n})=>n))}function cq(e,t){const n=e.lineAllocations[t];if(n)return{properties:e.properties,quantity:n.quantity,stableId:n.stableId,totalAmountBeforeReductions:n.checkoutPriceBeforeReductions,merchandise:e}}function uq(...e){const t=new Map;for(const n of e)for(const r of n??[])for(const o of r.lineComponents){if(t.has(o.stableId))continue;const i=new Map;r.lineAllocations.forEach((a,l)=>{const c=cq(o,l);c&&i.set(a.stableId,c)}),i.size>0&&t.set(o.stableId,{parentStableId:r.stableId,componentsByParentAllocationStableId:i})}return t}function dq(){const e=Eu(),t=Ce(),n=We(Du()),r=se(),o=r.deliveryLines,i=r.merchandiseLines,{deliveryNext:a,merchandiseLines:l}=H();return w(()=>{const c=n.value,u=new Map;if(c.length===0||!e.value)return u;const d=uq(l.value?.lines,i.value),p=new Map;for(const S of c){if(!S.stableId)return u;const k=p.get(S.stableId);k?k.push(S):p.set(S.stableId,[S])}const m=new Map,f=new Set,h=(S,k,E)=>{const T=m.get(S)??new Map;if(!E){T.set(k.key,k),m.set(S,T),f.add(k.key);return}const A=T.get(k.key)?.components??[];T.set(k.key,{...k,components:A.some(({stableId:R})=>R===E.stableId)?A:[...A,E]}),m.set(S,T),f.add(k.key)},g=[],y=new Map,v=(S,k)=>{const E=k.requiresShipping?S:"NOT_REQUIRED";if(!E)return!1;const T=d.get(k.stableId),A=T?.parentStableId??k.stableId;if(!T){const R=y.get(A)??new Set;R.add(E),y.set(A,R)}return g.push({bundleComponent:T,group:E,parentStableId:A}),!0};if(o.value.flatMap(S=>S.value.targetMerchandiseLines??[]).some(S=>{const k=d.get(S.stableId)?.parentStableId??S.stableId;return p.has(k)})&&!Ts(t.value.currentDetour))for(const S of o.value){const k=aq(S.value);for(const E of S.value.targetMerchandiseLines??[])if(!v(k,E))return u}else if(a.value?.status!=="unavailable")for(const S of a.value?.lines??[]){const k=lq(S);for(const E of S.targetMerchandiseLines??[])if(!v(k,E))return u}if(Array.from(y.values()).some(S=>S.size>1))return u;const C=({bundleComponent:S,group:k,parentStableId:E})=>{const T=p.get(E);if(!T)return!0;for(const A of T){if(!S){h(k,A);continue}if(!A.id)return!1;const R=S.componentsByParentAllocationStableId.get(A.id);if(!R)return!1;h(k,A,R)}return!0};for(const S of g)if(!C(S))return u;
38if(c.some(({key:S})=>!f.has(S)))return u;const I=new Map;for(const S of sq){const k=m.get(S);k?.size&&I.set(S,Array.from(k.values()))}return I})}const pq="aFPS3",mq="vlAqA",fq="mLkrk",hq="bLzIf",ko={CollapsibleLineItemsToggleOverlay:pq,CollapsibleLineItemsToggleSizer:mq,CollapsibleLineItemsToggleButton:fq,CollapsedLineItemThumbnails:hq},gq=et("CollapsibleLineItems"),Ya=e=>s(kr,{children:e}),yq=Jn(function(){const t=We(Du()),n=Hs(),{i18n:r,shop:{id:o}}=_(),i=Ce(),{lineItems:{priority:a="base",blockPadding:l,quantityVisibility:c="visible",sectionLayout:u="fixed"},merchandiseThumbnail:{shadow:d}={}}=rt(),p=!!l,m=c!=="hidden",f=t.value.some(R=>R.quantity>1),h=m&&(c==="visible"||f);let g;h?g="product-thumbnails-with-badge":d==="none"&&a==="high"?g=void 0:(d==null||d==="extraSmall")&&(g="product-thumbnails");const y=w(()=>i.value.currentDetour?.type==="thankYou"?{dynamicRender:"Checkout::ThankYou::Dynamic::Render",cartLinesRenderAfter:"Checkout::ThankYou::CartLines::RenderAfter"}:{dynamicRender:"Checkout::Dynamic::Render",cartLinesRenderAfter:"Checkout::CartLines::RenderAfter"}).value,v=it(y.dynamicRender,"ORDER_SUMMARY1"),P=it(y.dynamicRender,"ORDER_SUMMARY2"),b=it(y.cartLinesRenderAfter),C=w(()=>Array.from(n.value.values()).reduce((R,L)=>R+L.reduce((M,D)=>M+D.quantity,0),0)),I=w(()=>Array.from(n.value.entries()).some(([R,L])=>R!==o&&L.length>0)),S=w(()=>t.value.length>0||I.value),k=dq(),E=w(()=>!I.value&&k.value.size>1),T=u==="collapsible"&&!I.value&&t.value.length>1,A=s(Y_,{bleed:g,overflow:"auto hidden",maxBlockSize:"@media (inline-size >= medium) 40vh, none",padding:p?"none":"none none small-500 none",hint:{type:"pill",content:r.translate("order_summary.scroll_order_summary")},accessibilityRole:"section",accessibilityLabel:r.translate("order_summary.shopping_cart_label"),children:s(ve,{when:I,fallback:s(ve,{when:E,fallback:s(Uu,{merchandiseLines:t.value,totalLineQuantities:C.value}),children:s(nq,{merchandiseLinesByDeliveryType:k})}),children:s(rq,{merchandiseLinesByShop:n.value,totalLineQuantities:C.value})})});return s(ve,{when:S,children:s(Q,{gap:"large-200",children:[s($t,{customizations:v,render:Ya}),s(kr,{children:T?s(vq,{merchandiseLines:t.value,showQuantityBadges:m,children:A}):A}),s($t,{customizations:b,render:Ya}),s($t,{customizations:P,gap:"large-200",render:Ya})]})})});function vq({children:e,merchandiseLines:t,showQuantityBadges:n}){const r=Le(!0),{i18n:o}=_(),{size:i}=rt().merchandiseThumbnail??{},a=Eb(i),l=o.translate("order_summary.number_items",{count:t.reduce((g,y)=>g+y.quantity,0)}),c=Ke(void 0,gq),{blockSize:u}=Us(a),d=bq(t),p=()=>{r.value=!r.value},m=()=>s(G,{children:l}),f=g=>s(gt,{gridTemplateColumns:"minmax(0, 1fr) max-content",alignItems:"start",gap:"base",inlineSize:"100%",children:[s(Pe,{minInlineSize:"0",overflow:"hidden",children:g}),s(Q,{direction:"inline",alignItems:"center",gap:"small-300",children:[m(),s(Me,{type:"chevron-down",size:"small-100"})]})]}),h=()=>s(Q,{direction:"inline",alignItems:"center",justifyContent:"space-between",inlineSize:"100%",children:[m(),s(Me,{type:"chevron-up",size:"small-100"})]});return s(Pe,{position:"relative",minBlockSize:`${u}px`,children:[s(gn,{id:`${c}-expanded-content`,open:!r.value,renderChildrenWhenCollapsed:!0,duration:"base",properties:["height","opacity"],children:s(Q,{gap:"base",children:[s("div",{"aria-hidden":"true",children:h()}),s("div",{id:c,children:e})]})}),s(gn,{id:`${c}-thumbnails`,open:r.value,duration:"base",properties:["height","opacity"],children:s("div",{"aria-hidden":"true",children:f(s(_q,{thumbnailMerchandise:d,thumbnailSize:a,showQuantityBadges:n}))})}),s("div",{className:ko.CollapsibleLineItemsToggleOverlay,children:[s("div",{"aria-hidden":"true",className:ko.CollapsibleLineItemsToggleSizer,children:[s(gn,{id:`${c}-expanded-toggle-size`,open:!r.value,duration:"base",properties:["height"],children:h()}),s(gn,{id:`${c}-collapsed-toggle-size`,open:r.value,duration:"base",properties:["height"],children:f(s("div",{className:ko.CollapsedLineItemThumbnails,children:s(Tu,{variant:"inline-discrete",merchandise:d.slice(0,1),size:a,max:1,useImageAltTexts:!1,showQuantityBadges:n})}))})]}),s("div",{className:ko.CollapsibleLineItemsToggleButton,children:s(Tn,{accessibilityLabel:l,"aria-controls":c,"aria-expanded":!r.value,blockSize:"100%",inlineSize:"100%",onClick:p})})]})]})}function _q({thumbnailMerchandise:e,thumbnailSize:t,showQuantityBadges:n}){const{ref:r,max:o}=eH(t);return s("div",{ref:r,className:ko.CollapsedLineItemThumbnails,children:s(Tu,{variant:"inline-discrete",merchandise:e,size:t,max:o.value,useImageAltTexts:!1,showQuantityBadges:n})})}function bq(e){return e.map(t=>({stableId:t.stableId??t.key,image:t.image,quantity:t.quantity,totalPrice:t.totalPrice}))}function Ib(){const e=V();return F(()=>()=>{const t=e.current;t&&Zs.containers.delete(t)},[]),t=>{t&&(e.current&&Zs.containers.delete(e.current),Zs.containers.add(t),e.current=t)}}const Ab=He({spacing:"auto"});function Xt({spacing:e,children:t}){const n=B(()=>({spacing:e}),[e]);return s(Ab.Provider,{value:n,children:t})}function Tb(){return Ee(Ab)}
38var dr={colorVariant:{base:"nfgb6p5",subdued:"nfgb6p6"},groupSpacingVariant:{auto:"nfgb6p9","small-200":"nfgb6pa","small-300":"nfgb6pb","small-400":"nfgb6pc","small-500":"nfgb6pd"},spacingVariant:{auto:"nfgb6p7",none:"nfgb6p8"},visuallyHidden:"nfgb6p4 _1fragem121",MoneyLines:"nfgb6p3 nfgb6p2 _1fragem6t"},Vr={Content:"_1qy6ue68",contentColSpan:"_1qy6ue69",Header:"_1qy6ue67",MoneyLine:"_1qy6ue60",itemSizeVariant:{inherit:"_1qy6ue65",auto:"_1qy6ue66"},layoutVariant:{inherit:"_1qy6ue63 _1qy6ue61 _1fragem7x _1fragem9q _1fragem6t",stackable:"_1qy6ue64 _1qy6ue62 _1fragem64 _1fragem7s _1fragema5 _1fragem7d"}};function Pq(e){return"children"in e&&Et(e.children)}function Ze(e){const{spacing:t}=Tb(),{moneyLines:{color:n="base"}}=rt(),{itemSize:r="inherit",layout:o="inherit",color:i}=e,a=i??n,l=Y(Vr.MoneyLine,r&&Vr.itemSizeVariant[r],t&&dr.groupSpacingVariant[t],o&&Vr.layoutVariant[o]);return s("div",{className:l,role:"row",children:Pq(e)?e.children:s(q,{children:[s(wt,{children:s(G,{color:e.labelColor,children:e.label})}),s(Ct,{loading:e.loading,children:e.loading?s(mu,{size:e.size,emphasis:e.type==="strong"?"bold":void 0,children:e.value}):s(G,{type:e.type,size:e.size,translate:!1,color:a,children:e.value})})]})})}function wt({children:e}){return s("div",{className:Vr.Header,role:"rowheader",children:e})}function Ct({children:e,loading:t,colSpan:n}){return s("div",{className:n?Vr.contentColSpan:Vr.Content,role:"cell","aria-busy":t||void 0,"aria-colspan":n,children:e})}const Sq=et("MoneyLine-Heading"),Eq=at(function(t,n){const{children:r,title:o,titleHidden:i=!0,spacing:a="auto"}=t,l=Ke(void 0,Sq),c=ln(),{moneyLines:{color:u="base"}}=rt(),d=s(Wt,{id:l,children:o});return s(q,{children:[i?s("div",{className:dr.visuallyHidden,children:d}):d,s("div",{role:"table","aria-labelledby":l,children:[s("div",{role:"rowgroup",className:dr.visuallyHidden,children:s("div",{role:"row",children:[s("div",{role:"columnheader",children:c("moneyLinesHeaderItem")}),s("div",{role:"columnheader",children:c("moneyLinesHeaderValue")})]})}),s("div",{role:"rowgroup",className:Y(dr.MoneyLines,dr.colorVariant[u],dr.spacingVariant[a]),ref:n,children:r})]})]})});function ir({condition:e,children:t,skeletonContent:n,...r}){return s(q,{children:[s(mu,{...r,delay:!1,display:e?r.display??"auto":"none",children:n??t},"skeletonTextKey"),s(G,{...r,display:e?"none":r.display??"auto",children:t},"textKey")]})}function Cq(){const{i18n:e}=_(),n=H().alternativePaymentCurrency,r=ze("alternativePaymentCurrency"),{hasNegotiatedAlternativePaymentCurrencySignal:o}=xt(),i=w(()=>{const a=n.value,l=r.value;if(!a&&(!l||!o.value))return;const c=a&&e.translate("order_summary.alternative_payment_currency_total",{amount_due:e.formatCurrency(a.totalWithoutGiftCards.amount,{currency:a.totalWithoutGiftCards.currencyCode,form:"explicit"})});return{loading:l,text:c}});return s(ve,{when:i,children:({loading:a,text:l})=>s(Ze,{children:s(Ct,{children:s(ir,{condition:a,size:"small",color:"subdued",children:a?"$0.00":l})})})})}function kq({children:e}){return typeof e=="function"?e():e}function wb({children:e}){return typeof e=="function"?e():e}function Iq(e){return e.props.condition!==void 0}function Aq(e){return typeof e=="function"?e():e}function Dr({children:e}){let t,n;
38return eS.forEach(e,r=>{tS(r)&&(!t&&Iq(r)?Aq(r.props.condition)&&(t=r):!n&&r.type===wb&&(n=r))}),t??n??null}Dr.When=kq;Dr.Fallback=wb;const Tq=et("TaxesTooltip");function xm({label:e,subdueText:t}){const{i18n:n,source:r}=_(),o=Ke(void 0,Tq);return s(q,{children:[s(G,{color:t?"subdued":void 0,children:e}),s(Me,{type:"question-circle",size:"small",interestFor:o,accessibilityLabel:n.translate("tooltip.accessibility_label_context",{context:e})}),s(Sn,{id:o,children:r.type==="paymentCollection"?n.translate("order_summary.estimated_taxes_finalization_tooltip_content_short"):n.translate("order_summary.estimated_taxes_finalization_tooltip_content")})]})}const wq="•";function Or({totalTax:e,showMoneyLineTaxesTooltip:t,loading:n=!1,taxesLabel:r,hasLandedCostDetails:o=!1,subdueText:i}){const{i18n:a}=_(),l=i?"subdued":void 0;return s(Ze,{color:l,children:[s(wt,{children:s(Dr,{children:[s(Dr.When,{condition:!!r,children:s(G,{color:l,children:r})}),s(Dr.When,{condition:!!o,children:s(G,{color:l,children:a.translate("order_summary.taxes_label")})}),s(Dr.Fallback,{children:s(Q,{direction:"inline",alignItems:"center",gap:"small-300",children:s(xm,{label:a.translate("order_summary.estimated_taxes_label"),subdueText:i})})})]})}),s(Ct,{children:s(Q,{direction:"inline",gap:"small-200",children:[t?s(Q,{direction:"inline",alignItems:"center",gap:"small-300",children:[s(xm,{subdueText:i,label:a.translate("order_summary.estimated_taxes_label_short")}),s(G,{color:l,children:wq})]}
38):null,s(ir,{condition:n,color:l,children:n?"$0.00":a.formatCurrency(e.amount,{currency:e.currencyCode,form:"short"})})]})})]})}const Lq={marginTop:"0"};function zu({id:e,title:t,subdueTitle:n,tooltipText:r,children:o,item:i,hideHeaderItemWhenOpen:a=!1}){const{i18n:l}=_(),c=Le(!1);return s(q,{children:[s(Ze,{children:[s(wt,{children:s(Q,{direction:"inline",gap:"small-200",alignItems:"center",children:[s(Tn,{"aria-expanded":c.value,"aria-controls":`recurring-totals-collapsible-${e}`,onClick:()=>{c.value=!c.value},children:s(gt,{gridAutoFlow:"column",gridAutoColumns:"minmax(auto, max-content)",gridTemplateColumns:"minmax(auto, max-content)",gridTemplateRows:"minmax(0, 1fr)",gap:"small-200",alignItems:"center",alignContent:"center",justifyContent:"start",justifyItems:"start",children:[s(je,{color:n?"subdued":void 0,textAlign:"start",children:t}),s(Me,{type:c.value?"chevron-up":"chevron-down",size:"small-200"})]})}),r?s(Tn,{accessibilityLabel:l.translate("tooltip.accessibility_label_context",{context:t}),overlay:s(Sn,{children:r}),children:s(Me,{type:"question-circle",size:"small"})}):null]})}),i&&!(a&&c.value)?i:null]}),s("div",{style:Lq,children:s(gn,{open:c.value,id:`recurring-totals-collapsible-${e}`,children:o})})]})}function Lb(){const{checkout:e}=_(),t=H().taxes,n=fh();return w(()=>{const r=e.proposal.facts.tax,o=t.value,i=r||(o?.status==="available_total_included"?o.totalIncludedInTarget:null),a=n.value??i;return{localTotalTaxIncluded:i,totalTaxIncluded:a}})}function Rb(){const{i18n:e}=_(),t=Lb();return w(()=>{const{totalTaxIncluded:n}=t.value;return n===null?null:e.translate("order_summary.vat_label_html",{amount:e.formatCurrency(n.amount,{currency:n.currencyCode,form:"short"})})})}function Mm({label:e}){return s(Xt,{spacing:"small-500",children:s(Ze,{children:[s(wt,{children:s(je,{color:"subdued",children:s(Cr,{children:e})})}),s(Ct,{})]})})}function Hu({taxesIncluded:e,variant:t,shopId:n}){const{i18n:r}=_(),o=Jr(),{localTotalTaxIncluded:i,totalTaxIncluded:a}=Lb().value,l=Rb(),c=hh(i),u=w(()=>[...c.value.entries()]),d=w(()=>o.value&&u.value.length>1);if(n){const p=c.value.get(n);if(!p||p.totalTax.amount===0||p.status==="available_total")return null;const m=r.translate("order_summary.vat_label_html",{amount:r.formatCurrency(p.totalTax.amount,{currency:p.totalTax.currencyCode,form:"short"})});return s(Mm,{label:m})}return!e||a===null||l.value===null||a.amount===0?null:t==="card"?s(Pe,{children:s(je,{color:"subdued",children:s(Cr,{children:l})})}):s(ve,{when:d,fallback:s(Mm,{label:l.value}),children:s(zu,{id:"included-tax-money-line",title:l.value,children:s(Xt,{spacing:"small-400",children:s(Xn,{each:u,getKey:([p])=>p,children:([,p])=>s(Or,{totalTax:p.totalTax,taxesLabel:p.shopName,showMoneyLineTaxesTooltip:p.status==="available_total",subdueText:!0})})})})})}function Rq(){const{i18n:e}=_();return x(t=>e.formatCurrency(t.amount,{currency:t.currencyCode,form:"short"}),[e])}function Nm({title:e,value:t,color:n,labelColor:r}){const o=Rq();return s(Ze,{label:e,value:o(t),color:n,labelColor:r})}function xq(e,t){const{i18n:n}=_(),r=F_();if(e){const o=r(e,{month:"short"});return n.translate("order_summary.deferred_total_due_date_label_next",{date:o})}return t?n.translate("order_summary.payment_terms_totals.due_on_fulfillment_next"):n.translate("order_summary.payment_terms_totals.due_later_checkout_to_draft")}function Mq({variant:e=void 0,shopId:t}){const n=H(),{value:r}=n.deferredTotal,o=On(),{checkout:i}=_(),a=ds(),l=w(()=>a.value||!!i.proposal.facts.taxesIncluded),{value:c}=n.paymentFlexibilityPaymentTermsTemplate,u=r&&r.amount.amount>0,d=oi(),p=vi(),m=w(()=>!!(d.value&&!p.value)),f=r?.dueAt||(c?.dueDate?new Date(c.dueDate):null),h=c?.type==="FULFILLMENT",g=xq(f,h);return!u||o.value?null:s(q,{children:[e==="card"?s(Pe,{background:"subdued",padding:"small-300",borderRadius:"small",children:s(Nm,{title:g,value:r.amount,color:"subdued",labelColor:"subdued"})}):s(Xt,{spacing:"small-300",children:s(Nm,{title:g,value:r.amount})}),e!=="card"&&s(ve,{when:m,children:()=>s(Hu,{taxesIncluded:l.value,shopId:t})})]})}const Nq=et("ShippingTooltip");function ja({defaultPolicy:e}){const{i18n:t,embed:n,shop:{merchantPolicies:r}}=_(),o=Ke(void 0,Nq),i="shipping-policy",a=t.translate("shop_policies.shipping_policy"),{localPolicies:l,remotePolicies:c}=lc(),u=r.some(m=>m.handle===i),d=e??(u?l.find(m=>m.handle===i):void 0);if(!d)return null;const p=t.translate("tooltip.accessibility_label_context",{context:a});return zt(n?.embedder)?d.url?s(Tn,{accessibilityLabel:p,"aria-haspopup":"dialog",onClick:()=>n?.client?.windowOpenRequest(d.url),children:s(Me,{type:"question-circle",size:"small"})}):null:s(q,{children:[s(Tn,{accessibilityLabel:p,commandFor:o,children:s(Me,{type:"question-circle",size:"small"})}),s(Mo,{id:o,heading:e?t.translate("shop_policies.terms_and_policies"):a,defaultPolicy:d,policies:e?[...l,...c]:void 0})]})}function xb(e){return e.reduce((t,{total:n}
38)=>t+(n?.amount||0),0)}function Dq(){const{checkout:e}=_(),t=e.proposal.facts.delivery??[],n=xb(t),r=t.flatMap(o=>o.lines.flatMap(i=>i.appliedDiscounts)).reduce((o,{amountDiscounted:i})=>(i?.amount||0)+o,0);return n-r}function Oq(){const{checkout:e}=_(),t=e.proposal.facts.delivery??[],n=Dq(),r=xb(t),o=t.flatMap(({deliveryGroups:i})=>i??[]);return o.length>0?o.map(({groupType:i,methodType:a,total:l,deliveryLines:c})=>{const u=c.flatMap(({appliedDiscounts:d})=>d).reduce((d,{amountDiscounted:p})=>d+(p?.amount??0),0);return{type:i,methodType:a,cost:l.amount-u,costBeforeDiscounts:l.amount,currencyCode:l.currencyCode}}):t[0]?.total==null?null:[{type:"ONE_TIME_PURCHASE",cost:n,costBeforeDiscounts:r,currencyCode:t[0]?.total?.currencyCode}]}function Fq(e){const{checkout:t}=_(),n=t.proposal.facts.delivery??[],r=new Set(e);return n.flatMap(({deliveryGroups:i,lines:a})=>r.size>0&&i?.length?i.filter(({methodType:l})=>r.has(l)).flatMap(({deliveryLines:l})=>l):a).flatMap(({appliedDiscounts:i})=>i).filter(i=>i.amountDiscounted?.amount&&i.amountDiscounted?.amount>0)}function Bq(){const{checkout:e}=_();return w(()=>zk(e.proposal))}function Vq({checkout:e}){return e.proposal.facts.requiresShipping??!0}function Mb(e){return e.reduce((t,{cost:n,costBeforeDiscounts:r})=>({priceBeforeDiscounts:t.priceBeforeDiscounts+r,priceAfterDiscounts:t.priceAfterDiscounts+n}),{priceBeforeDiscounts:0,priceAfterDiscounts:0})}function Uq(e,t=n=>n.amountCombinabilityToken??void 0){if(!e.some(r=>t(r)))return Mb(e);const n=Bl(e,r=>r.costBeforeDiscounts,t);return e.reduce((r,o,i)=>n.has(i)?r:{priceBeforeDiscounts:r.priceBeforeDiscounts+o.costBeforeDiscounts,priceAfterDiscounts:r.priceAfterDiscounts+o.cost},{priceBeforeDiscounts:0,priceAfterDiscounts:0})}function Nb(e){return er(e)?e.allocations.some(t=>t.target.type==="DELIVERYLINE"):!1}function Dm(e,t){return e?e.filter(n=>er(n)?n.allocations.some(r=>r.target.type==="DELIVERYLINE"&&r.target.index!=null&&t.has(r.target.index)):!1):[]}function zq(e,t){const n=new Set,r=new Set;return e&&e.status==="filled"&&e.lines.forEach((o,i)=>{if(o.status!=="available")return;const a=br(o);a&&(a.methodType==="PICK_UP"?r.add(i):n.add(i))}),{shippingDiscountLines:Dm(t,n),pickupDiscountLines:Dm(t,r)}}function Hq({size:e,strong:t=!0}){const{i18n:n}=_(),r=t?"strong":void 0;return s(q,{children:[s(G,{size:e,type:r,accessibilityVisibility:"hidden",children:n.translate("shipping.included_rate_label")}),s(G,{type:r,accessibilityVisibility:"exclusive",children:n.translate("shipping.included_rate_accessibility_label")})]})}function Db({moneyLines:e,deliveryLoading:t,appearance:n,emphasis:r,included:o,shouldConsolidateRateGroupMax:i,getRateGroupMaxKey:a,getLinePrice:l,getPriceLetterCase:c}){const{i18n:u,shop:d}=_(),p=d.hasFlagEnabled(gh),m=e.length>0,f=e[0]?.currencyCode,h=e[0]?.type,{priceBeforeDiscounts:g,priceAfterDiscounts:y}=i??d.marketDrivenShippingEnabled?Uq(e,a):Mb(e),v=m&&g&&g>y&&!p,P=l(y,h),b=s(ir,{condition:t,color:n,type:r==="bold"?"strong":void 0,translate:!1,letterCase:c(y,h),children:P});return t?b:o?s(Hq,{strong:!1}):v?s(Q,{direction:"inline",gap:"small-300",justifyContent:"center",alignItems:"center",children:[s(G,{accessibilityVisibility:"exclusive",children:u.translate("order_summary.original_price")}),s(G,{size:"base",color:"subdued",type:"redundant",translate:!1,children:u.formatCurrency(g,{currency:f})}),s(G,{accessibilityVisibility:"exclusive",children:u.translate("order_summary.price_after_discount_aria_text")}),b]}):b}const _o=({getLinePrice:e,getPriceLetterCase:t,label:n,moneyLines:r,finalMoneyLines:o,forceSubduedStyle:i,discountLines:a,shippingTooltip:l,included:c,shouldConsolidateRateGroupMax:u,getRateGroupMaxKey:d})=>{const p=Ce(),m=w(()=>p.value.currentPage?.id==="information"),{shop:f,checkout:h,i18n:g}=_(),y=!f.hasFlagEnabled(gh),{value:v}=H().deliveryNext,P=St(),b=ze("deliveryNext").value,I=Bs("deliveryNext").value||(P.value?b:!1),S=h.proposal.facts.delivery??[],k=[...new Set(o.flatMap(({methodType:O})=>O===void 0?[]:[O]))],E=Fq(k),T=h.configuration.layout.isOnePage.value,A=B(()=>!r.length&&!S.length||I,[]),R=v?.status==="unavailable"||I||i,L=a?.filter(O=>Nb(O))??[],M=E.length?[...new Set(E.map(O=>O.label))]:[...new Set(L.map(O=>er(O)&&O.discount.type==="code"&&O.discount.codeHidden?g.translate("order_summary.discount_title"):O.title))],D=y?M.map(O=>s(gt,{gridAutoFlow:"column",gridTemplateColumns:"minmax(auto, max-content) minmax(0, 1fr)",gridTemplateRows:"minmax(0, 1fr)",gap:"small-400",alignItems:"center",alignContent:"center",children:[s(Me,{type:"discount",size:"small"}),s(_i,{children:s(G,{color:"subdued",children:O.toUpperCase()})})]},O)):[],N=R||i,U=(m.value||T)&&l,z=i?"subdued":void 0;return s(q,{children:[s(Ze,{itemSize:A?"auto":void 0,color:z,children:[s(wt,{children:s(Q,{direction:"inline",gap:"small-400",alignItems:"center",children:[s(G,{color:z,children:n}),U]})}),s(Ct,{loading:I,children:s(Db,{getLinePrice:e,getPriceLetterCase:t,appearance:N?"subdued":void 0,moneyLines:o,deliveryLoading:I,included:c,shouldConsolidateRateGroupMax:u,getRateGroupMaxKey:d})})]}),D.length>0&&s(Xt,{spacing:"small-400",children:s(Ze,{children:s(wt,{children:D})})})]})},qq=({shopId:e,forceSubduedStyle:t})=>{const n=H(),r=n.deliveryNext.value,o=St(),i=ze("deliveryNext"),a=Bs("deliveryNext"),l=a.value||(o.value?i.value:!1),{checkout:c,i18n:u,shop:{id:d,marketDrivenShippingEnabled:p,remoteShopsConfigMap:m},source:f}=_(),h=c.configuration.layout.isOnePage.value,g=c.proposal.facts.delivery,y=Qn(),v=Sl(y.value.enabledDeliveryMethods),b=eU()?.selected.value??[],C=b.length>0,I=Hk(b).length>0,S=b.includes("PICK_UP"),k=!!e,{visibility:E}=c.configuration,T=n.discountLines.value,A=ou(),R=Oq(),L=qk(e),{allMoneyLines:M,moneyLinesForShop:D}=L.value,N=Jr(),z=Ce().value.currentPage?.id!=="review"&&(!l||N.value),O=u.translate("order_summary.pickup_label"),K=u.translate("order_summary.shipping_label"),ne=V(v?O:K),J=w(()=>{const pe=Sl(y.value.enabledDeliveryMethods)?O:K;if(!(a.value||(o.value?i.value:!1))){const ot=L.value.moneyLinesForShop,ht=nt(f)?g?.[0]?.pickupAddress:ot.length>0&&ot.every(pt=>pt.methodType==="PICK_UP");ne.current=ht?O:pe}return ne.current}).value,ee=!!(r&&r.status==="filled"&&r.lines.some(({status:pe})=>pe!=="not_required")),te=!l&&!ee&&!c.isShippingRequired.value,W=R||D,he=W.filter(ce),re=he.filter(pe=>pe.methodType!=="PICK_UP"),de=he.filter(pe=>pe.methodType==="PICK_UP"),le=W.length===0||he.length>0,_e=!k&&!nt(f)&&C&&le,ae=_e&&S&&!I,ge=_e&&I,ke=ae?O:K,we=w(()=>!!(nt(f)&&Vq({checkout:c})&&so({checkout:c,source:f})?.lines.length));if(A.value||!(E.showShippingLines.value&&!nt(f)||we.value)||te||k&&W.length===0)return null;if(k){const pe=W.some(Re=>ie(Re));return s(_o,{getLinePrice:lt,getPriceLetterCase:Ge,label:J,forceSubduedStyle:t,moneyLines:D,finalMoneyLines:W,discountLines:e===d?T?.lines:void 0,shippingTooltip:void 0,shouldConsolidateRateGroupMax:pe,getRateGroupMaxKey:Ne})}if(N.value&&W.length>1){const pe=W.some(ot=>ie(ot)),Re=me(W);return s(zu,{id:"shipping-money-line",title:J,hideHeaderItemWhenOpen:!0,item:s(Ct,{loading:l,children:s(Db,{getLinePrice:lt,getPriceLetterCase:Ge,moneyLines:W,deliveryLoading:l,shouldConsolidateRateGroupMax:pe,getRateGroupMaxKey:Ne})}),children:s(Xt,{spacing:"small-400",children:Re.map(({shopName:ot,lines:ht})=>{const pt=ht.find(Qt=>Qt.shippingPolicy)?.shippingPolicy,jt=ht.some(Qt=>(Qt.shopId??d)===d&&Qt.hasLocalDiscountApplied);return s(_o,{getLinePrice:lt,getPriceLetterCase:Ge,label:ot,forceSubduedStyle:!0,moneyLines:M,finalMoneyLines:ht,discountLines:jt?T?.lines:void 0,shouldConsolidateRateGroupMax:pe,getRateGroupMaxKey:Ne,shippingTooltip:z&&pt?s(ja,{defaultPolicy:pt}):void 0},ht[0]?.shopId??ot)})})})}if(re.length>0&&de.length>0)return Ae({});if(_e&&I&&S)return Ae({shippingGetLinePrice:re.length>0?lt:Ft,shippingGetPriceLetterCase:re.length>0?Ge:kt,pickupGetLinePrice:cn,pickupGetPriceLetterCase:De});let j=M,Z=W,fe=lt,be=Ge,Te=J,Se=z?s(ja,{defaultPolicy:null}):void 0;return ae?(j=de,Z=de,fe=cn,be=De,Te=ke,Se=void 0):ge&&(j=re,Z=re,Te=ke,re.length===0&&(fe=Ft,be=kt)),s(_o,{getLinePrice:fe,getPriceLetterCase:be,label:Te,forceSubduedStyle:t,moneyLines:j,finalMoneyLines:Z,discountLines:T?.lines,shippingTooltip:Se});function Ae({shippingGetLinePrice:pe=lt,shippingGetPriceLetterCase:Re=Ge,pickupGetLinePrice:ot=lt,pickupGetPriceLetterCase:ht=Ge}){const{shippingDiscountLines:pt,pickupDiscountLines:jt}=zq(r,T?.lines);return s(q,{children:[s(_o,{getLinePrice:pe,getPriceLetterCase:Re,label:K,forceSubduedStyle:t,moneyLines:re,finalMoneyLines:re,discountLines:pt,shippingTooltip:z?s(ja,{defaultPolicy:null}):void 0}),s(_o,{getLinePrice:ot,getPriceLetterCase:ht,label:O,forceSubduedStyle:t,moneyLines:de,finalMoneyLines:de,discountLines:jt,shippingTooltip:void 0})]})}function Ue(pe){return pe.every(Re=>Re.type==="SUBSCRIPTION")}function ce(pe){return pe.methodType!==void 0}function ie(pe){const Re=pe.shopId??d;if(Re===d)return p;const ot=m?.get(Re);return ot?ot.marketDrivenShippingEnabled:!!pe.amountCombinabilityToken}function me(pe){const Re=new Map;for(const ot of pe){const ht=ot.shopId??d,pt=Re.get(ht);pt?pt.lines.push(ot):Re.set(ht,{shopName:ot.shopName??J,lines:[ot]})}return[...Re.values()]}function Ne(pe){const Re=pe.amountCombinabilityToken??void 0;if(!(!Re||!ie(pe)))return`${pe.shopId??d}:${Re}`}function Ge(pe,Re){return v?"uppercase":l||pe===void 0||!M.length&&!g?.length||pe!==0||Re==="SUBSCRIPTION"&&!Ue(M)?"none":"uppercase"}function lt(pe,Re){if(l)return"$0.00";if(pe!==void 0&&(M.length||g?.length)){const ht=Re==="SUBSCRIPTION"&&!Ue(M)?u.translate("shipping.subscription_delivery_description.shipping_price_included"):u.translate("order_summary.free_shipping_total_label");if(pe===0)return ht;const pt=nt(f)?g?.[0]?.total?.currencyCode:M[0].currencyCode;return u.formatCurrency(pe,{currency:pt,form:"short"})}return v?u.translate("order_summary.free_shipping_total_label"):h?u.translate("order_summary.enter_shipping_address"):u.translate("order_summary.shipping_default_value")}function Ft(){return lt(void 0)}function kt(){return Ge(void 0)}function cn(pe,Re){return!de.length&&!g?.length?l?"$0.00":u.translate("order_summary.free_shipping_total_label"):lt(pe,Re)}function De(pe,Re){return!de.length&&!g?.length&&!l?"uppercase":Ge(pe,Re)}},Gq=et("ReductionTooltip");function qu({type:e}){const{i18n:t,shop:{name:n}}=_(),r=Ke(void 0,Gq),o=e==="giftCard"?t.translate("order_summary.gift_cards_apply_to_local_shop",{shop_name:n}):t.translate("order_summary.order_discounts_apply_to_local_shop",{shop_name:n});return s(q,{children:[s(Me,{type:"question-circle",size:"small",interestFor:r}),s(Sn,{id:r,children:s(G,{children:o})})]})}
38function Om({line:e,title:t,amount:n}){const{i18n:r,source:o,shop:i}=_(),a=nt(o)&&n,l=Vu(i);if(e&&!er(e)||e&&e.discount.presentationLevel!=="CART"||e&&e.amount?.amount===0&&l)return null;const c=p=>r.formatCurrency(-p.amount,{currency:p.currencyCode,form:"short",spacedMinusSign:!0});if(e?Nb(e)||e.allocations.length===0:!1)return null;let d=e?.title;return e&&e.discount.type==="custom"&&e.title===""&&(d=r.translate("order_summary.custom_discount")),e&&e.discount.type==="code"&&e.discount.codeHidden&&(d=r.translate("order_summary.discount_title")),s(Ze,{children:[s(wt,{children:s(gt,{gridAutoFlow:"column",gridTemplateColumns:"minmax(auto, max-content) minmax(0, 1fr)",gridTemplateRows:"minmax(0, 1fr)",gap:"small-400",alignItems:"center",alignContent:"center",children:[s(Me,{type:"discount",size:"small"}),s(_i,{children:s(G,{color:"subdued",children:e?d?.toUpperCase():t?.toUpperCase()})})]})}),s(Ct,{children:s(G,{translate:!1,children:a?c(n):e&&$q({line:e,freeShippingLabel:r.translate("order_summary.free_shipping_discount_label"),i18n:r})})})]})}function $q({line:e,freeShippingLabel:t,i18n:n}){if(e.allocations.some(o=>o.target.type==="DELIVERYLINE")||e.allocations.length===0)return t;if(er(e)){const o=e.amount?.amount,i=e.amount?.currencyCode;if(o&&i)return n.formatCurrency(-o,{currency:i,form:"short",spacedMinusSign:!0})}}const Wq=(e,t)=>e?.filter(n=>er(n)&&Gk(n)&&!(t&&n.amount?.amount===0))??[],Yq=({disableTooltip:e=!1})=>{const{i18n:t,checkout:n,source:r,shop:o}=_(),a=H().discountLines,l=n.proposal.facts.orderDiscounts??[],c=nt(r)&&l,u=Vu(o),d=Jr(),p=w(()=>Wq(a.value?.lines,u)),m=w(()=>!e&&d.value),f=w(()=>p.value.length>0),h=w(()=>t.translate("order_summary.discount_order_stacking",{count:p.value.length}));return s(q,{children:[s(ve,{when:f,children:()=>s(Ze,{children:s(wt,{children:s(gt,{gridAutoFlow:"column",gridTemplateColumns:m.value?"minmax(auto, max-content) minmax(auto, max-content)":"minmax(0, 1fr)",gridTemplateRows:"minmax(0, 1fr)",gap:"small-400",alignItems:"center",alignContent:"center",children:[s(G,{children:h}),s(ve,{when:m,children:s(qu,{type:"discount"})})]})})})}),s(Xt,{spacing:"small-500",children:[s(Xn,{each:p,getKey:g=>g.title,children:g=>s(Om,{line:g})}),c&&l.map(g=>s(Om,{title:g.label,amount:g.amount},g.label))]})]})};function jq(e,t){return e||(t?.status==="available_total"?t.totalDuty:null)}const Kq=et("DutyMoneyLineTooltip");function Jq({shopId:e}){const{i18n:t,checkout:n,shop:r}=_(),o=H(),{value:i}=o.landedCostDetails,a=ze("landedCostDetails").value,l=ze("duties").value,c=n.proposal.facts.duty,{value:u}=o.duties,d=Ke(void 0,Kq);if(e&&e!==r.id)return null;const p=jq(c,u),m=i?.incoterm===dc.Ddu&&i.reason===tA.ErrorOccured,f=(l||a)&&!c&&!m,h=p||m,g=m?"subdued":void 0,y=s(Q,{direction:"inline",alignItems:"center",gap:"small-400",children:[s(G,{children:t.translate("order_summary.duties_label")}),m&&!f&&s(q,{children:[s(Me,{type:"question-circle",interestFor:d,accessibilityLabel:t.translate("tooltip.accessibility_label_context",{context:t.translate("order_summary.duties_label")})}),s(Sn,{id:d,children:t.translate("order_summary.error_duties_tooltip")})]})]}),v=m?t.translate("order_summary.may_be_charged_on_delivery"):p&&t.formatCurrency(p.amount,{currency:p.currencyCode,form:"short"});return s(q,{children:h&&s(Ze,{color:g,children:[s(wt,{children:y}),s(Ct,{children:s(Q,{direction:"inline",gap:"small-200",children:s(ir,{condition:f,children:f?"$0.00":v})})})]})})}function Xq(){const{checkout:e}=_(),t=ze("taxes"),{taxes:n}=H();return w(()=>{const r=e.proposal.facts.taxBreakdown;if(r?.length)return{data:r.map(({title:a,amount:l})=>({description:a,amount:l})),loading:!1};if(!n.value||n.value.status!=="available_total")return null;const{taxBreakdown:o}=n.value;return o?.length?{data:o,loading:t.value}:null})}function Qq({data:e,loading:t}){const n=Zq();return s(Xt,{spacing:"small-400",children:e.map(({description:r,amount:o},i)=>s(Or,{loading:t,totalTax:o,taxesLabel:n({description:r})},`${r}-${i}`))})}const Zq=()=>{const{i18n:e}=_();return({description:t})=>{switch(t){case"HST":return e.translate("order_summary.tax_line.hst");case"GST":return e.translate("order_summary.tax_line.gst");case"PST":return e.translate("order_summary.tax_line.pst");case"RST":return e.translate("order_summary.tax_line.rst");case"QST":return e.translate("order_summary.tax_line.qst");case"VPT":return e.translate("order_summary.tax_line.vpt");default:return t}}};function eG({shopId:e}){const{i18n:t,checkout:n,shop:r}=_(),o=H(),{hasNegotiatedOnce:i}
38=Je(),a=ze("taxes"),l=Bs("taxes"),c=ze("landedCostDetails"),u=ze("remoteTaxDetails"),d=Jr(),p=xs(),m=Xq(),f=w(()=>{if(n.proposal.facts.tax)return n.proposal.facts.tax;const E=o.taxes.value;return E?.status==="available_total"?E.totalTax:null}),h=w(()=>!!o.landedCostDetails.value),g=w(()=>{const E=o.taxes.value;return E!==void 0&&E.status!=="pending"}),y=w(()=>n.proposal.facts.tax?!1:l.value?!0:g.value?!1:a.value||!i.value),v=w(()=>(y.value||a.value||c.value||u.value)&&!n.proposal.facts.tax),P=w(()=>{const E=f.value;return E&&E.amount>0?E:y.value?{amount:0,currencyCode:r.currencyCode}:void 0}),b=hh(f.value),C=w(()=>[...b.value.entries()]),I=fh(),S=w(()=>I.value??f.value),k=w(()=>d.value&&C.value.length>1);if(e){const E=b.value.get(e);return!E||E.totalTax.amount===0||E.status==="available_total_included"?null:s(Or,{loading:v.value,totalTax:E.totalTax,hasLandedCostDetails:e===r.id&&h.value})}if(p?.applied&&S.value)return s(Or,{totalTax:S.value});if((!S.value||S.value.amount===0)&&!y.value)return null;if(k.value&&S.value){const E=h.value?t.translate("order_summary.taxes_label"):t.translate("order_summary.estimated_taxes_label"),T=h.value?void 0:t.translate("order_summary.estimated_taxes_finalization_tooltip_content");return s(zu,{id:"tax-money-line",title:E,tooltipText:T,item:s(Ct,{loading:v.value,children:s(ir,{condition:v.value,children:v.value?"$0.00":t.formatCurrency(S.value.amount,{currency:S.value.currencyCode,form:"short"})})}),children:s(Xt,{spacing:"small-400",children:s(Xn,{each:C,getKey:([A])=>A,children:([,A])=>s(Or,{loading:v.value,totalTax:A.totalTax,taxesLabel:A.shopName,subdueText:!0})})})})}return s(ve,{when:m,fallback:s(ve,{when:P,children:E=>s(Or,{loading:v.value,totalTax:E,taxesLabel:y.value?t.translate("order_summary.taxes_label"):void 0,hasLandedCostDetails:h.value})}),children:E=>s(Qq,{data:E.data,loading:E.loading||v.value})})}const tG=et("CombinedDutiesAndTaxesTooltip"),nG=({loading:e,shopId:t})=>{const{i18n:n,shop:r}=_(),o=Ke(void 0,tG);if(t&&t!==r.id)return null;const i=e.value;return s(Ze,{children:[s(wt,{children:s(Q,{direction:"inline",alignItems:"center",gap:"small-400",children:[s(G,{children:n.translate("order_summary.duties_and_taxes_label")}),s(Me,{type:"question-circle",interestFor:o,accessibilityLabel:n.translate("tooltip.accessibility_label_context",{context:n.translate("order_summary.duties_and_taxes_label")})}),s(Sn,{id:o,children:n.translate("order_summary.error_duties_tooltip")})]})}),s(Ct,{children:s(ir,{condition:i,children:i?"$0.00":n.translate("order_summary.may_be_charged_on_delivery")})})]})},rG=({shopId:e})=>{const{checkout:t}=_(),n=H(),r=!!t.proposal.facts.taxesIncluded,o=!!t.proposal.facts.dutiesIncluded,i=ds(),a=yh(),l=n.landedCostDetails,c=ze("landedCostDetails"),u=Bs("landedCostDetails"),d=n.optionalDuties,p=ze("optionalDuties"),m=w(()=>!!d.value?.refuseDutiesPermitted&&!!d.value?.buyerRefusesDuties&&l.value?.incoterm===dc.Ddu),f=w(()=>u.value||p.value||c.value),h=w(()=>!(a.value||o)),g=w(()=>!!e||!(i.value||r));return s(ve,{when:m,fallback:s(q,{children:[s(ve,{when:h,children:s(Jq,{shopId:e})}),s(ve,{when:g,children:s(eG,{shopId:e})})]}),children:s(nG,{loading:f,shopId:e})})};function oG({line:e,disableTooltip:t=!1}){const{i18n:n}=_(),{value:r}=Jr(),o=!t&&r,i=e.method.code.slice(-4).toUpperCase();return s(Ze,{itemSize:"auto",children:[s(wt,{children:s(Q,{direction:"inline",gap:"small-400 small-300",children:[s(G,{children:n.translate("order_summary.gift_card_label")}),s(Q,{direction:"inline",alignItems:"center",gap:"small-400",children:[s(Me,{type:"gift-card"}),s(G,{color:"subdued",accessibilityVisibility:"hidden",children:n.translate("order_summary.gift_card_masked",{last_characters:i})}),s(G,{accessibilityVisibility:"exclusive",children:n.translate("order_summary.gift_card_ending",{last_characters:i})}),o&&s(qu,{type:"giftCard"})]})]})}),s(Ct,{children:s(G,{children:e.cost?n.formatCurrency(-e.cost.amount,{currency:e.cost.currencyCode,form:"short",spacedMinusSign:!0}):""})})]})}function iG({disableTooltip:e=!1}){const t=ku(),n=Jr(),{shop:r,i18n:o}=_(),i=r.hasFlagEnabled($k),a=w(()=>!e&&n.value),l=w(()=>n.value?"minmax(auto, max-content) minmax(auto, max-content)":"minmax(0, 1fr)"),c=w(()=>({total:t.value.reduce((d,p)=>d+(p.cost?.amount||0),0),currencyCode:t.value[0]?.cost?.currencyCode}));if(t.value.length===0)return null;if(i){const{total:u,currencyCode:d}=c.value;return s(Ze,{children:[s(wt,{children:s(gt,{gridAutoFlow:"column",gridTemplateColumns:l.value,gridTemplateRows:"minmax(0, 1fr)",gap:"small-400",alignItems:"center",alignContent:"center",children:[s(G,{children:o.translate("order_summary.gift_card_label")}),s(ve,{when:a,children:s(qu,{type:"giftCard"})})]})}),s(Ct,{children:s(G,{children:o.formatCurrency(-u,{currency:d,form:"short",spacedMinusSign:!0})})})]})}return s(Xn,{each:t,getKey:u=>u.method.code,children:u=>s(oG,{line:u,disableTooltip:e})})}function Gs(){return s(Pe,{children:[s(Vt,{blockSize:"small-200"}),s(jr,{accessibilityRole:"presentation"}),s(Vt,{blockSize:"small-200"})]})}function sG(){const{moneyLines:{divided:e}}=rt(),t=H(),n=t.legacyRepresentProductsAsFees,r=t.legacyMerchandiseLinesAsFees,o=w(()=>!n.value||!r.value?[]:r.value.lines);return s(Xn,{each:o,getKey:i=>i.title,children:i=>s(q,{children:[e&&s(Gs,{}),s(aG,{...i})]})})}function aG({title:e,description:t,total:n}){const{i18n:r}=_(),o=t?s(Q,{direction:"inline",alignItems:"center",gap:"small-400",children:s(G,{children:[e,s("span",{style:{position:"absolute"},children:s(Tn,{padding:"small-500 none none small-500",overlay:s(Sn,{children:t}),accessibilityLabel:r.translate("general.tooltip_accessibility_label"),children:s(Me,{type:"question-circle",size:"small"})})},"description-with-tooltip")]})}):s(G,{children:e});return s(Ze,{label:e,children:[s(wt,{children:o}),s(Ct,{children:s(G,{translate:!1,children:r.formatCurrency(n.amount,{currency:n.currencyCode,form:"short"})})})]})}function lG(e){const t=V(!1);$e(()=>{const n=e.value;if(!t.current){t.current=!0;return}if(n)return Lt({content:n})})}function Fm({content:e}){return lG(e),s(ve,{when:e,children:t=>s(q,{children:cG(t).map(({id:n,line:r})=>s(Ze,{layout:"stackable",children:[s(Pe,{inlineSize:"100%",children:s(wt,{children:s(je,{type:"small",color:"subdued",textAlign:"end",children:r})})}),s(Ct,{})]},n))})})}function cG(e){const t=new Map;return e.split(`
39`).filter(Boolean).map(n=>{const r=t.get(n)??0;return t.set(n,r+1),{id:`${n}:${r}`,line:n}})}function uG(){const{moneyLines:{divided:e}}=rt(),{i18n:t,checkout:n}=_(),{value:r}=ti(),{value:o}=H().deferredTotal,i=n.proposal.facts.previouslyPaidTotal,a=n.proposal.facts.updatedTotal,l=(n.proposal.facts.merchandiseLines??[]).some(m=>m.quantityChange&&m.quantityChange.delta),c=!!(a&&r&&l),u=o&&o.amount.amount>0,d=i&&Number(i.amount)>0,p=(c||i)&&e;return!p&&!c&&!d&&!(u&&r)?null:s(q,{children:[p&&s(Gs,{}),u&&r&&s(Ze,{label:t.translate("order_summary.total_label"),value:t.formatCurrency(r.amount,{currency:r.currencyCode,form:"short"})}),c&&a&&s(Ze,{type:"strong",label:t.translate("order_summary.order_total_updated_label"),value:t.formatCurrency(Number(a.amount),{currency:a.currencyCode,form:"short"})}),d?s(Ze,{type:"strong",label:t.translate("order_summary.total_already_paid_label"),value:t.formatCurrency(-Number(i.amount),{currency:i.currencyCode,form:"short"})}):null]})}var Gu={Content:"_1x41w3p3",Header:"_1x41w3p2",MoneySummary:"_1x41w3p1 _1x41w3p0 _1fragem6t _1fragem19"};function dG(e){return"children"in e&&Et(e.children)}function No(e){const{spacing:t}=Tb(),n=Y(Gu.MoneySummary,t&&dr.groupSpacingVariant[t]);return s(q,{children:s("div",{className:n,role:"row",children:dG(e)?e.children:s(q,{children:[s(Qo,{children:s(G,{type:"strong",size:"large",children:e.label})}),s(Ur,{children:s(Q,{direction:"inline",gap:"small-300",alignItems:"baseline",children:[s(Cu,{children:s(G,{size:"small",color:"subdued",children:e.prefix})}),s(G,{type:"strong",size:"large",children:e.value})]})})]})})})}function Qo({children:e}){return s("div",{className:Gu.Header,role:"rowheader",children:e})}function Ur({children:e,accessibilityColumnIndex:t}){return s("div",{className:Gu.Content,role:"cell","aria-colindex":t,children:e})}function pG(e,t){return t.some(n=>e.has(n))}function Ob(e){const{initialUnresolvedFields:t}=Je();return w(()=>pG(t.value,e))}function mG(){const e=H().paymentFlexibilityPaymentTermsTemplate,t=oi(),n=Iu(),r=On();return w(()=>{if(t.value||n.value)return!1;const o=!!e.value,i=r.value;return o||i})}const fG="_3KD7m",hG="kxIMD",gG="_3XbdQ",Fi={Wrapper:fG,Char:hG,Price:gG,"Price-enter":"baSEe","Price-exit":"dhH4n","Price-exiting":"ldszB","Price-exited":"ZOhB6"},Fb=30;let Ka=0;function yG({formatted:e,money:t}){const{orderSummary:{priceReductionAnimation:n}}=Fe(),r=Fn(),o=V(_t(()=>t.value)),i=Le([{id:Ka++,formatted:_t(()=>e.value)}]),a=St(),l=n==="base";F(()=>{const u=o.current;t.value.currencyCode===u.currencyCode&&t.value.amount<u.amount?i.value=[...i.value,{id:Ka++,formatted:e.value}]:i.value=[{id:Ka++,formatted:e.value}],o.current=t.value},[t.value.amount,t.value.currencyCode,e.value]);const c=x(u=>{i.value=i.value.filter(d=>d.id!==u)},[i]);return l?s("span",{className:Fi.Wrapper,style:{"--delay":`${r?0:Fb}ms`},children:s(ve,{when:a,fallback:e,children:()=>i.value.map((u,d)=>s(vG,{formatted:u.formatted,current:d===i.value.length-1,onDisappear:c,snapshotId:u.id,animated:i.value.length>1},u.id))})}):s(q,{children:e})}function vG({formatted:e,current:t,animated:n,onDisappear:r,snapshotId:o}){const i=Fn(),a=nn(t,"fast",n),l=e.split("");return F(()=>{let c;return a==="exited"&&(i?r(o):c=setTimeout(()=>r(o),e.length*Fb)),()=>{clearTimeout(c)}},[a,i,e,r,o]),s("span",{className:Y(Fi.Price,n&&Fi[`Price-${a}`]),"aria-label":t?e:void 0,"aria-hidden":t?void 0:"true",style:{"--total":l.length},children:l.map((c,u)=>s("span",{className:Fi.Char,style:{"--index":u},children:c},u))})}const _G=["deliveryNext","taxes","duties","landedCostDetails","remoteTaxDetails"];function Bb({alignItems:e="baseline",freeLabel:t,outOfStockLabel:n,paymentDue:r,showCurrencyBadge:o,hideCurrencyCode:i}){const{i18n:a,embed:l}=_(),c=vy(),{orderSummary:u}=Fe(),d=Y0(),p=St(),m=ze("deliveryNext"),f=ze("taxes"),h=ze("duties"),g=ze("landedCostDetails"),y=ze("remoteTaxDetails"),v=H(),P=w(()=>v.deliveryNext.value!==void 0||v.taxes.value!==void 0||v.duties.value!==void 0||v.landedCostDetails.value!==void 0||v.remoteTaxDetails.value!==void 0),b=Ob(_G),C=Le(b.peek()),I=Le(!b.peek()&&P.peek());$e(()=>{!b.value&&P.value&&(I.value=!0)});const S=w(()=>m.value||f.value||h.value||g.value||y.value),k=w(()=>l&&zt(l.embedder)?!1:l?!P.value||S.value:C.peek()&&!I.value),E=!i&&c,T=w(()=>n&&d.value?n:t&&r.value.amount===0?t:a.formatCurrency(r.value.amount,{currency:r.value.currencyCode,form:"short"})),A=t?"uppercase":void 0,R=u.totalDueTypography;let L,M;R?(L=R.weight==="bold"?"strong":"generic",M=R.size??"base"):(L="strong",M="large");const D=s(G,{size:o?"extraSmall":"small",color:"subdued",translate:!1,children:r.value.currencyCode}),N=w(()=>E&&T.value!==n&&T.value!==t&&(!p.value||!nS(r.value.currencyCode,T.value)));
39return s(Q,{alignItems:e,gap:"small-300",direction:"inline",children:[s(ve,{when:N,children:s(Cu,{children:o?s(_b,{color:"subdued",size:"small",children:D}):D})}),s(ir,{condition:k.value,type:L,size:M,translate:!1,letterCase:A,skeletonContent:T.value,children:I.value?s(yG,{formatted:T,money:r}):null})]})}function Bi({label:e,amount:t,hideCurrencyCode:n}){const{moneySummary:{labelTypography:r}}=rt();return s(No,{children:[s(Qo,{children:s(G,{type:"strong",size:r?.size??"large",children:e})}),s(Ur,{children:s(Bb,{paymentDue:t,hideCurrencyCode:n})})]})}function bG({variant:e,showLoadingPlaceholder:t}){const n=ri(),{i18n:r,shop:o}=_(),i=Au(),a=w(()=>!n.value),l=w(()=>n.value?r.formatCurrency(n.value.amount,{currency:n.value.currencyCode,form:"short"}):void 0),c=V({amount:0,currencyCode:o.currencyCode}),u=w(()=>{const d=n.value;return d!=null&&(c.current=d),c.current});return a.value&&!t?null:e==="card"?s(Pe,{background:"subdued",padding:"small-300",borderRadius:"small",children:s(gt,{gridAutoFlow:"column",gridTemplateColumns:"minmax(0, 1fr) minmax(auto, max-content)",gridTemplateRows:"minmax(0, 1fr)",alignItems:"center",alignContent:"center",children:[s(G,{color:"subdued",children:i}),s(G,{color:"subdued",children:l})]})}):s(Xt,{spacing:"small-500",children:s(Bi,{label:i,amount:u,hideCurrencyCode:a.value})})}function PG({children:e}){return s(Xt,{spacing:"small-500",children:s(Ze,{children:[s(wt,{children:s(je,{color:"subdued",children:s(Cr,{children:e})})}),s(Ct,{})]})})}const SG=1.95583;function EG(){const{shop:e}=_(),t=H().buyerIdentity,n=ri(),r=e.hasFlagEnabled(Wk);return w(()=>{if(r)return;const o=t.value,i=o?.countryCode==="BG"&&o?.presentmentCurrency==="EUR",a=n.value;if(!(!i||!a||a.amount<=0))return Number((a.amount*SG).toFixed(2))})}function CG({bgnAmount:e}){const{i18n:t}=_();return s(Ze,{children:s(Ct,{children:s(G,{color:"subdued",children:t.formatCurrency(e,{currency:"BGN",form:"short"})})})})}const Bm=1e8;function kG(e,t){const n=e/t*100,r=Math.round(n*Bm)/Bm;return Math.ceil(r)/100}function IG(e){return e?.installmentPlans?.some(t=>t.type==="MSI")??!1}function YY(e,t){return e.map(n=>n.method.type==="direct"||n.method.type===Yn.CreditCard?{...n,method:{...n.method,creditCardInstallments:t}}:n.method.type==="wallet"&&n.method.name==="SHOP_PAY"&&n.method.walletContent?{...n,method:{...n.method,walletContent:{...n.method.walletContent,creditCardInstallments:t}}}:n)}function jY(e){return e.map(t=>t.method.type==="direct"||t.method.type===Yn.CreditCard?{...t,method:{...t.method,creditCardInstallments:void 0}}:t)}function AG(){const e=ri(),t=Au(),{installmentMonthsSignal:n}=xt(),{i18n:r}=_(),o=H().paymentMethods,i=w(()=>o.value?.some(u=>u.type==="direct"&&!u.alternative&&IG(u))??!1),a=w(()=>{const u=n.value,d=e.value;return!(i.value&&!!u)||!d||!u?d:{...d,amount:kG(d.amount,u)}}),l=w(()=>{const u=n.value;return i.value&&!!u&&!!e.value?r.translate("order_summary.installment_due_today_label"):t.value}),c=w(()=>i.value&&!!n.value);return{amount:a,label:l,isInstallment:c}}const TG=["taxes","duties"],wG=()=>{const{shopPay:e,checkout:t}=_(),n=fi(),r=ey();if(n.value&&r&&t.installments.config.value?.availableLoanTypes.includes("SPLIT_PAY")&&e.session.isInstallmentsSelected.value)return t.installments.chargeAmount.value};function LG({shopId:e}){const t=ri(),n=Yk(),r=w(()=>e?n.value.get(e):t.value),{checkout:o,embed:i,i18n:a,shop:l}=_(),c=Ob(TG),u=ze("deliveryNext"),d=ze("taxes"),p=ze("duties"),m=ze("landedCostDetails"),f=ze("remoteTaxDetails"),{visibility:h}=o.configuration,{moneySummary:{labelColor:g="base",labelTypography:y},moneyLines:{divided:v}}=rt(),P=o.proposal.facts.previouslyPaidTotal,b=oi(),C=vi(),I=wG(),{value:S}=ti(),k=S?.currencyCode,E=mG(),T=l.hasFlagEnabled(jk),A=!!o.proposal.facts.taxesIncluded,R=!!o.proposal.facts.dutiesIncluded,L=ds().value||A,M=yh().value||R,{value:D}=H().landedCostDetails,N=xs(),U=o.proposal.facts.landedCostDetails,{amount:z,label:O,isInstallment:K}=AG(),X=o.configuration.orderSummary?.layoutStyle==="COMPACT",ne=Rb(),$=EG(),J=w(()=>e&&e!==l.id?a.translate("order_summary.total_label"):O.value),ee=w(()=>!r.value),te=w(()=>i&&zt(i.embedder)?!1:c.value),W=V(r.peek()),he=w(()=>{const be=r.value;
39return be!=null&&(W.current=be),W.current}),re=w(()=>he.value??{amount:0,currencyCode:l.currencyCode}),de=V(z.peek()),le=w(()=>{const be=z.value;return be!=null&&(de.current=be),de.current??re.value}),_e=w(()=>K.value?r.value:void 0),ae=he.value!=null&&(u.value||d.value||p.value||m.value||f.value);if((ee.value||!z.value)&&!te.value&&!ae)return null;const ge=(h.showSubtotal.value||P)&&v?s(Gs,{}):null,ke=!b.value&&!C.value,we=N?.applied&&L&&ne.value?s(PG,{children:ne.value}):ke?s(Hu,{taxesIncluded:L,shopId:e}):null;if(e)return s(q,{children:[s(Bi,{label:J,amount:re,hideCurrencyCode:ee.value}),we]});if(X){const be=y?.weight==="base"?"generic":"strong";return s(q,{children:[ge,s(No,{children:[s(Qo,{children:s(Q,{children:s(ve,{when:ne,fallback:s(G,{type:be,color:g,size:y?.size??"large",children:O.value}),children:s(q,{children:[s(G,{type:be,color:g,size:y?.size,children:O.value}),we]})})})}),s(Ur,{children:s(Bb,{paymentDue:le,hideCurrencyCode:ee.value,showCurrencyBadge:!0,alignItems:"center"})})]})]})}const Ie=[D,U].some(be=>be?.incoterm===dc.Ddp),j=M&&Ie?s(q,{children:[s(Vt,{blockSize:"small-400"}),s(jr,{accessibilityRole:"presentation"}),s(Vt,{blockSize:"small-400"}),s(je,{type:"small",color:"subdued",children:s(Cr,{children:a.translate("order_summary.duties_included_label")})})]}):null,Z=T?s(bG,{showLoadingPlaceholder:te.value||ae}):s(Xt,{spacing:"small-500",children:s(Bi,{label:J,amount:re,hideCurrencyCode:ee.value})}),fe=a.translate("order_summary.payment_terms_totals.due_today_next");return s(q,{children:[ge,s(ve,{when:E,children:s(No,{children:[s(Qo,{children:s(G,{children:fe})}),s(Ur,{children:s(Q,{direction:"inline",gap:"small-200",alignItems:"baseline",children:s(ir,{condition:ee.value,size:"medium",translate:!1,children:a.formatCurrency(0,{currency:re.value.currencyCode,form:"short"})})})})]})}),s(ve,{when:_e,children:be=>s(Ze,{label:a.translate("order_summary.total_label"),value:a.formatCurrency(be.amount,{currency:be.currencyCode,form:"short"})})}),s(ve,{when:E,fallback:s(Bi,{label:J,amount:le,hideCurrencyCode:ee.value}),children:Z}),we,I!==void 0&&k?s(No,{children:s(Ur,{accessibilityColumnIndex:2,children:s(G,{size:"small",translate:!1,children:a.translate("payment.pay_in_installments_split_pay_short",{amount:a.formatCurrency(I,{currency:k,form:"short"})})})})}):null,$.value!=null&&s(CG,{bgnAmount:$.value}),j]})}const RG=et("PriceBreakdownItemTooltip");function xG({title:e,tooltipText:t,itemText:n,layout:r}){const{i18n:o}=_(),i=Ke(void 0,RG),a="strong",l="base";return s(Ze,{layout:r,children:[s(wt,{children:s(Q,{direction:"inline",alignItems:"center",gap:"small-300",children:[s(G,{color:l,type:a,children:e}),t?s(q,{children:[s(Me,{type:"question-circle",size:"small",interestFor:i,accessibilityLabel:o.translate("tooltip.accessibility_label_context",{context:e})}),s(Sn,{id:i,children:t})]}):null]})}),s(Ct,{children:s(G,{color:l,type:a,children:n})})]})}const MG=et("RecurringTotalsTooltip"),NG=et("RecurringTotalsLabel");function Vm({cardStyle:e}){const{value:t}=H().recurringTotals,{i18n:n}=_(),r=Bu(),o=Ke(void 0,MG),i=Ke(void 0,NG);if(!t?.length)return null;const a=n.translate("order_summary.recurring_subtotal_label");if(e){const l=t.length===1;return s(Pe,{accessibilityRole:l?"group":void 0,"aria-labelledby":l?i:void 0,background:"subdued",padding:"small-300",borderRadius:"small",children:l?s(gt,{gridAutoFlow:"column",gridTemplateColumns:"minmax(0, 1fr) minmax(auto, max-content)",gridTemplateRows:"minmax(0, 1fr)",alignItems:"center",alignContent:"center",children:[s(Q,{direction:"inline",alignItems:"center",gap:"small-300",children:[s(G,{id:i,color:"base",type:"strong",children:a}),s(G,{color:"base",type:"strong",children:r(t[0])})]}),s(Me,{type:"question-circle",size:"small",interestFor:o,accessibilityLabel:n.translate("tooltip.accessibility_label_context",{context:a})}),s(Sn,{id:o,children:n.translate("order_summary.recurring_total_tooltip")})]}):s(G,{color:"base",type:"strong",children:n.translate("order_summary.recurring_total_multiple_label")})})}return s(q,{children:[s(jr,{accessibilityRole:"presentation"},"recurringTotalsDivider"),t.length===1?s(Xt,{spacing:"small-300",children:s(xG,{title:a,tooltipText:n.translate("order_summary.recurring_total_tooltip"),itemText:r(t[0]),layout:"stackable"})}):s(G,{color:"base",type:"strong",children:n.translate("order_summary.recurring_total_multiple_label")})]})}function DG({line:e}){const{i18n:t}=_();if(!e.cost)return null;const{amount:n,currencyCode:r}=e.cost,o=t.formatCurrency(-n,{currency:r,form:"short",spacedMinusSign:!0}),i=AU(e.method.redemptionContent);return s(Ze,{children:[s(wt,{children:s(Q,{direction:"inline",gap:"base",children:[s(G,{children:t.translate("order_summary.gift_card_label")}),s(Q,{direction:"inline",alignItems:"center",gap:"small-400",children:[s(Me,{type:"gift-card"}),s(G,{accessibilityVisibility:"hidden",children:TU(i)}),s(G,{accessibilityVisibility:"exclusive",children:t.translate("order_summary.gift_card_ending",{last_characters:i||""})})]})]})}),s(Ct,{children:s(G,{type:"strong",children:o})})]})}function OG({line:e}){const{checkout:t,i18n:n,shop:r}=_(),o=r.hasFlagEnabled(Kk),i=o?t.proposal.negotiated.fields.shopPromotion.value:void 0,a=i?.status==="filled"?new Map(i.promotions.map(({promotionId:l,type:c})=>[l,c])):void 0;return e.method.redemptionContent?.details?.map(l=>{const{amount:c,currencyCode:u}=l.destinationAmount,d=n.formatCurrency(-parseFloat(c),{currency:u,form:"short",spacedMinusSign:!0}),p={SHOP_DISCOUNT_OFFER:n.translate("order_summary.exclusive_deal"),SHOP_CASH_BALANCE:n.translate("order_summary.shop_cash_title"),SHOP_PROMOTION:n.translate("order_summary.shop_promotion")},m=l.promotionType??(l.redemptionId==null?void 0:a?.get(l.redemptionId)),h=o&&l.redemptionType==="SHOP_PROMOTION"&&m==="DOORBUSTER"?n.translate("order_summary.flash_deal"):p[l.redemptionType];return h?s(Ze,{type:"strong",label:h,value:d},l.redemptionId):null})}function FG({line:e}){const{i18n:t}=_();if(!e.cost)return null;const n=t.translate("payment.store_credit.label"),r=t.formatCurrency(-e.cost.amount,{currency:e.cost.currencyCode,form:"short",spacedMinusSign:!0});return s(Ze,{type:"strong",label:n,value:r})}function BG({line:e}){switch(e.method.redemptionSource){case"SHOP_CASH":return s(OG,{line:e});case"STORE_CREDIT":return s(FG,{line:e});case"CUSTOM":{const t=e;return s(DG,{line:t},t.method.redemptionContent?.redemptionAttributes[0].value)}default:return null}}function VG(e){if(e.method.redemptionSource==="CUSTOM"){const n=e.method.redemptionContent?.redemptionAttributes[0]?.value||"";return e.method.redemptionSource+n}return e.method.redemptionSource}function UG(){const e=ac("STORE_CREDIT","SHOP_CASH"),{paymentLines:t}=O_(),n=[...e.value,...t];return n.length===0?null:s(q,{children:n.map(r=>s(BG,{line:r},VG(r)))})}function zG(){const{i18n:e,checkout:t}=_(),n=t.proposal.facts.returnFees,r=Number(n?.aggregatedReturnShippingFees?.amount)>0,o=Number(n?.aggregatedRestockingFees?.amount)>0;if(!r&&!o)return null;const i=r?{label:e.translate("order_summary.return_shipping_fee_label"),value:e.formatCurrency(Number(n?.aggregatedReturnShippingFees?.amount),{currency:n?.aggregatedReturnShippingFees?.currencyCode,form:"short"})}:null,a=o?{label:e.translate("order_summary.return_restocking_fee_label"),value:e.formatCurrency(Number(n?.aggregatedRestockingFees?.amount),{currency:n?.aggregatedRestockingFees?.currencyCode,form:"short"})}:null;return{shippingFee:i,restockingFee:a}}function HG(){const{moneyLines:{divided:e}}=rt(),t=zG();if(!t)return null;const{shippingFee:n,restockingFee:r}=t;return s(q,{children:[n&&s(q,{children:[e&&s(Gs,{}),s(Ze,{type:"strong",label:n.label,value:n.value})]}),r&&s(Ze,{type:"strong",label:r.label,value:r.value})]})}function qG(e){const{shop:{id:t}}=_(),n=H(),r=n.remoteTotalDetails,o=If(),i=n.legacyRepresentProductsAsFees,a=n.legacySubtotalBeforeTaxesShippingAndFees,l=n.subtotal;return w(()=>{const c=i.value?a.value:o.value;return e?t===e?l.value:r.value?.perShopRemoteTotals.get(e)?.subtotal:c})}function GG(){const{allViolations:e}=H(),t=ze("allViolations");return w(()=>{const n=["MERCHANDISE_LINE_TRANSFORMERS_RUN_ERROR"];return t.value||!e.value?{merchandiseLineTransformerErrors:[]}:{merchandiseLineTransformerErrors:[...e.value.reduce((i,a)=>(a.__typename==="UnprocessableTermViolation"&&n.includes(a.code)&&i.push({message:a.localizedMessage||a.nonLocalizedMessage,target:a.target}),i),[])].filter(Jv())}})}function $G(e){const t=H(),n=t.merchandiseLines,{shop:{id:r},checkout:o}=_(),i=o.proposal.facts.merchandiseLines??[],{value:a}=t.legacyRepresentProductsAsFees,l=w(()=>Jk(n.value?.lines??[],t.remoteMerchandiseDetails.value)),c=Xk(),u=e?e!==r?{lines:l.value.get(e),factLines:void 0}:{lines:c.value,factLines:i}:{lines:n.value?.lines,factLines:i},d=WG(u?.lines,a),p=u?.lines?.filter(({quantity:f})=>f>0),m=u?.factLines?.reduce((f,h)=>f+h.quantity,0);return{totalLineQuantities:d,totalLineQuantitiesFact:m,merchandiseLinesWithCount:p?.length||0}}function WG(e,t){return t?e?.reduce((n,r)=>r.legacyFee?n:n+r.quantity,0):e?.reduce((n,r)=>n+r.quantity,0)}function YG(e){const{embed:t,i18n:n}=_(),{totalLineQuantities:r,merchandiseLinesWithCount:o}=$G(e);return zt(t?.embedder)?n.translate("order_summary.number_items",{count:r??0}):o>1&&r?n.translate("order_summary.subtotal_label_with_quantity",{count:r}):n.translate("order_summary.subtotal_label")}function jG(e){const{checkout:t,i18n:n}=_(),r=qG(e),o=YG(e);return w(()=>{const i=r.value?n.formatCurrency(r.value.amount,{currency:r.value.currencyCode,form:"short"}):void 0,a=t.latestReceipt.value&&"consolidatedProposedSubtotalBeforeTaxesAndShipping"in t.latestReceipt.value&&t.latestReceipt.value.consolidatedProposedSubtotalBeforeTaxesAndShipping||void 0,l=a?n.formatCurrency(a.amount,{currency:a.currencyCode,form:"short"}):void 0;return{subtotalLabel:o,subtotalValue:i,subtotalOriginalValue:l}})}function KG({shopId:e}){const{subtotalLabel:t,subtotalValue:n,subtotalOriginalValue:r}=jG(e).value;return n?s(Ze,{children:[s(wt,{children:s(G,{children:t})}),s(Ct,{children:r?s(Q,{direction:"inline",gap:"small-300",children:[s(G,{tone:"critical",type:"redundant",translate:!1,children:r}),s(G,{translate:!1,children:n})]}):s(G,{translate:!1,children:n})})]}):null}function JG(){const{i18n:e,checkout:t,source:n}=_(),r=H().tipLines,o=t.proposal.facts.tip,i=w(()=>{const a=r.value?.[0]?.amount,l=nt(n)?o:a;return l&&l.amount>0?l:void 0});return s(ve,{when:i,children:a=>s(Ze,{label:e.translate("order_summary.tip_label"),value:e.formatCurrency(a.amount,{currency:a.currencyCode,form:"short"})})})}
39function XG(){const{i18n:e,checkout:t,embed:n}=_(),{value:r}=Qk(),o=vi(),i=ku(),a=!!t.proposal.facts.taxesIncluded,l=ds().value||a;if(!o.value||!r)return null;const c=s(Hu,{taxesIncluded:l});return zt(n?.embedder)&&i.value.length>0?c:s(q,{children:[s(Ze,{label:e.translate("order_summary.total_price_label"),value:e.formatCurrency(r.amount,{currency:r.currencyCode,form:"short"})}),c]})}function QG(){const e=vh(),{shop:t,embed:n}=_(),r=t.hasFlagEnabled(Zk);return w(()=>{const o=!!n?.embedder&&!zt(n?.embedder);return!!!(r||!e.value||e.value.amount===0||o)})}function ZG({variant:e}){const t=QG(),n=vh();return!t.value||!n.value?null:s(e4,{variant:e,totalSavings:n.value})}function e4({variant:e,totalSavings:t}){const{i18n:n,embed:r}=_(),{deferredTotal:o}=H(),i=zt(r?.embedder)?n.translate("universal.iframes.savings_label").toUpperCase():n.translate("order_summary.total_savings").toUpperCase(),a=n.formatCurrency(t.amount,{currency:t.currencyCode,form:"short"}),l=s(G,{type:"strong",translate:!1,children:a}),c=w(()=>o.value&&o.value.amount.amount>0?"small-200":"small-400");return e==="card"?s(Pe,{children:s(Q,{direction:"inline",alignItems:"center",gap:"small-400",children:[s(Q,{direction:"inline",alignItems:"center",gap:"small-500",children:[s(Me,{type:"savings",size:"small",color:"base"}),s(G,{color:"subdued",children:n.translate("order_summary.total_savings")})]}),s(G,{color:"subdued",translate:!1,children:a})]})}):s(Xt,{spacing:c.value,children:s(No,{children:[s(Qo,{children:s(Q,{direction:"inline",alignItems:"center",gap:"small-300",children:[s(Me,{type:"savings",size:"base",color:"strong"}),s(G,{type:"strong",children:i}),l]})}),s(Ur,{})]})})}const t4=Jn(function(){const{checkout:t,i18n:n,embed:r}=_(),{visibility:o}=t.configuration,{orderSummary:i}=Fe(),a=t.configuration.orderSummary?.headerPosition??i.headerPosition,l=i.isCollapsible??!1,c=i.isCollapsible===!1,u=H(),{currentDetour:d}=Ce().value,p=d?.type==="thankYou",m=Ib(),f=t.proposal.negotiated.fields.additionalMoneyLines.value,h=t.proposal.negotiated.fields.lpmDisclosure,g=ze("lpmDisclosure"),y=w(()=>g.value?void 0:h.value),v=w(()=>{const P=t.latestReceipt.value;return P?.status==="processed"?P.lpmDisclosure:void 0});return s(kr,{children:[s(Eq,{ref:m,title:n.translate("order_summary.cost_table_title"),children:[s(ve,{when:o.showSubtotal,children:[s(KG,{}),s(Yq,{}),s(qq,{}),s(sG,{}),s(HG,{}),s(rG,{}),s(JG,{}),s(XG,{}),s(UG,{})]}),s(uG,{}),s(iG,{}),f?.map(P=>s(Ze,{label:P.label,value:n.formatCurrency(P.amount.amount,{currency:P.amount.currencyCode,form:"short"})},P.id)),a==="BOTTOM"&&l?s(Vt,{blockSize:"small-500"}):s(LG,{}),!p&&s(ve,{when:()=>!y.value,children:s(Cq,{})}),p?s(Fm,{content:v}):s(Fm,{content:y}),s(Mq,{}),!zt(r?.embedder)&&s(ZG,{}),!c&&s(Vm,{})]}),c&&s(ve,{when:()=>u.recurringTotals.value,children:s(Pe,{paddingBlockStart:"small-300",children:s(Vm,{cardStyle:!0})})})]})}),KY="URL not specified for Chat: Please configure your extension to include extensions.targeting.preloads.chat",JY="URL specified for Chat: The URL specified in extensions.targeting.preloads.chat must not be the same origin as the checkout host.",XY="Scope not granted for Chat: Please request access in Partners dashboard to Chat in checkout extensions",QY="224px",ZY="72px",$u=72,ej="415px",tj="700px",nj="100dvi",rj="93dvb",Vb=new Set(["Chat","s-chat"]),Do={};function n4(){const e=ue(null),t=new Set,n=ue(),r=ue(!1),o=ue();let i=[];function a(){for(const p of i)p.disconnect();if(!(!e.value||!o.value||o.value.floatingElementBlockSize==null||typeof IntersectionObserver>"u")){i=[new IntersectionObserver(([p])=>{n.value=p.isIntersecting},{threshold:[0,1],rootMargin:`0px 0px -${o.value.blockEndOffset??0}px 0px`}),new IntersectionObserver(([p])=>{r.value=p.intersectionRatio===1||p.boundingClientRect.bottom<p.rootBounds?.bottom},{threshold:[0,1],rootMargin:`999999px 0px -${(o.value.blockEndOffset??0)+(o.value.floatingElementBlockSize??0)}px 0px`})];for(const p of i)p.observe(e.value)}}const l=e.subscribe(a),c=o.subscribe(a),u=It(()=>!!(e.value&&o.value&&n.value!=null)),d=It(()=>{const p=!!n.value,m=r.value;return o.value?.floatingElementHiddenBelowTrigger?p||m:p&&!m});return{triggerVisible:n,triggerAboveFloatingElement:r,triggerNode:e,triggerNodes:t,config:o,ready:u,floatingElementHidden:d,subscriptions:0,dispose(){l(),c();for(const p of i)p.disconnect();i=[],t.clear()}}}function r4(e){return Do[e]||(Do[e]=n4()),Do[e]}function o4(e){Do[e]?.dispose(),delete Do[e]}function i4(e){const t=r4(e);return F(()=>(t.subscriptions++,()=>{t.subscriptions--,t.subscriptions===0&&o4(e)}),[t,e]),t}function s4(e){const t=i4(e),n=V(null),r=x(o=>{const i=n.current;i&&i!==o&&t.triggerNodes.delete(i),o&&t.triggerNodes.add(o),n.current=o,t.triggerNode.value===i&&i!==o?t.triggerNode.value=o??t.triggerNodes.values().next().value??null:o&&t.triggerNode.value===null&&(t.triggerNode.value=o)},[t]);return{floatingElementHidden:t.floatingElementHidden,ready:t.ready,config:t.config,triggerNode:t.triggerNode,setTriggerNode:r}}function a4(e){return e.every(({quantity:t})=>t===0)}var Ja={Form:"km09ry0 _1fragem5z",Contents:"km09ry1 _1fragemws"};const l4=et("Form");function c4({onSubmit:e,children:t,implicitSubmit:n=!0,disabled:r=!1,id:o,contentsClassName:i}){const a=ln(),l=Ke(void 0,l4),c=o??l,u=ai()!=null,d=B(()=>({id:c,nested:u}),[c,u]);let p=null;n&&(p=s(Pe,{accessibilityVisibility:"exclusive",children:s(u4,{disabled:r,form:d,children:typeof n=="string"?n:a("submit")})}));const m=h=>{h.preventDefault(),h.stopPropagation(),!r&&typeof e=="function"&&e()},f=s("div",{className:Y(Ja.Contents,i),children:t});return u?s(q,{children:[s(pl.Provider,{value:d,children:[f,p]}),s(Sr,{children:s("form",{action:"",method:"POST",noValidate:!0,className:Ja.Form,id:c,onSubmit:m})})]}):s("form",{action:"",method:"POST",noValidate:!0,className:Ja.Form,id:c,onSubmit:m,children:s(pl.Provider,{value:d,children:[f,p]})})}function u4({form:e,children:t,disabled:n}){return s("button",{type:"submit",disabled:n,tabIndex:-1,"aria-hidden":!0,form:e.nested?e.id:void 0,children:t})}var bo={Hidden:"_123qrzt0 _1fragem5z",hiddenOnExtraSmall:"_123qrzt1",hiddenOnSmall:"_123qrzt2",hiddenOnMedium:"_123qrzt3",hiddenOnLarge:"_123qrzt4"};const xi=["extraSmall","small","medium","large"];function Um({above:e,below:t,children:n}){const o=Qr()?"span":"div",{hiddenOnExtraSmall:i,hiddenOnSmall:a,hiddenOnMedium:l,hiddenOnLarge:c}=d4(e,t),u=Y(bo.Hidden,i&&bo.hiddenOnExtraSmall,a&&bo.hiddenOnSmall,l&&bo.hiddenOnMedium,c&&bo.hiddenOnLarge);return s(o,{className:u,children:n})}function d4(e,t){if(e===t)return{hiddenOnExtraSmall:!0,hiddenOnSmall:!0,hiddenOnMedium:!1,hiddenOnLarge:!0};const n=e?xi.indexOf(e)+1:0,r=t?xi.indexOf(t)-1:xi.length-1,o=xi.slice(n,r+1),i=o.indexOf("extraSmall")>=0,a=o.indexOf("small")>=0,l=o.indexOf("medium")>=0,c=o.indexOf("large")>=0;return{hiddenOnExtraSmall:i,hiddenOnSmall:a,hiddenOnMedium:l,hiddenOnLarge:c}}function p4({targetSelector:e,label:t,icon:n}){const r=x(()=>{const o=document.querySelector(e);o&&(o.focus(),o.scrollIntoView({behavior:"smooth"}))},[e]);return s(Pe,{display:"@media (inline-size >= medium) auto, none",children:s(an,{variant:"secondary",size:"small",onClick:r,className:bt({screenReaders:"untilFocus"}),children:s(Q,{direction:"inline",gap:"small-400",alignItems:"center",children:[s(Me,{type:n,size:"small-100"}),s(G,{children:t})]})})})}const Oo=({violations:e,noticeType:t,noticeTitle:n,noticeHeader:r,noticeFooter:o})=>({code:t,tone:"critical",localizedTitle:n,localizedMessage:s(q,{children:[r,s("ul",{style:{listStyle:"inside"},children:e.map(i=>s("li",{children:i.localizedMessageHtml?s("span",{dangerouslySetInnerHTML:{__html:i.localizedMessageHtml}}
39):i.localizedMessage||i.nonLocalizedMessage},i.code))}),o]})}),Ub=()=>{const{i18n:e,shop:t}=_(),n=Pn(),r=ze("shippingAddress"),{allViolations:o}=H(),i=Ce(),{shippingAddress:a}=se();return w(()=>{const l=a.peek();if(n.value&&i.value.currentPage?.id==="information"&&ni(l,{...eI,countryCode:l?.countryCode}))return null;const c=o.value?.filter(u=>Kr.has(u.code))||[];return c.length===0||!n.value||r.value?null:Oo({violations:c,noticeType:Qe.DeliveryViolations,noticeTitle:e.translate("notice_banner.violations_title",{violation:e.translate("notice_banner.individual_violations_title",{scope:Qe.DeliveryViolations})}),noticeHeader:e.translate("notice_banner.editable_shipping_address_violations_message_title"),noticeFooter:e.translate("notice_banner.editable_shipping_address_violations_message_footer",{emailLink:s(ut,{href:`mailto:${t.contactEmail}`,children:e.translate("notice_banner.editable_shipping_address_violations_email_link")})})})})};var dn={Banner:"sdr03s1 sdr03s0 _1fragemk5 _1fragemjl _1fragemkp _1fragemj1 _1fragemm8 _1fragemlo _1fragemms _1frageml4 _1fragempz _1fragemrs _1fragemo6 _1fragemtl _1fragemws _1fragem6t",Button:"sdr03sb sdr03sa _1fragem64 _1fragem19 _1fragembj _1fragem12u",Content:"sdr03sc",ControlCollapsible:"sdr03sf sdr03se _1fragem28",ControlDismiss:"sdr03sg",Icon:"sdr03s9",Heading:"sdr03sd",toneVariant:{critical:"sdr03s3",info:"sdr03s4",success:"sdr03s5",warning:"sdr03s6"},colorVariant:{base:"sdr03s7",subdued:"sdr03s8"},withHeading:"sdr03s2"};const m4=et("Banner"),f4=new Map([["info","info"],["success","check-circle"],["warning","alert-triangle"],["critical","alert-circle"]]);function $s({autoFocus:e,focusable:t,children:n,collapsible:r,dismissible:o,iconHidden:i,color:a="base",id:l,tone:c="auto",heading:u,hidden:d=!1,onDismiss:p,onAfterHide:m}){const f=c==="auto"?"info":c,h=ln(),[g,y]=oe(d),[v,P]=oe(!0),b=V(),C=Ke(void 0,m4),I=ks({active:f==="critical"}),S=V(g);function k(U){b.current=U,I.current=U}const E=Bn(),T=Fn(),A=V(T);A.current=T,F(()=>{if(!e)return;const U=b.current;if(!U)return;const z=()=>{U.focus({preventScroll:!0}),U.style.scrollMarginTop===""&&(U.style.scrollMarginTop="var(--x-spacing-large-500)"),U.scrollIntoView?.({behavior:A.current?"auto":"smooth"})};if(U.getBoundingClientRect().height>0){z();return}if(typeof ResizeObserver>"u"){const K=setTimeout(z,300);return()=>clearTimeout(K)}const O=new ResizeObserver(()=>{U.getBoundingClientRect().height!==0&&(O.disconnect(),z())});return O.observe(U),()=>O.disconnect()},[e]),F(()=>{!S.current&&g&&m?.(),S.current=g},[g,m]),F(()=>{y(d)},[d]);const R=Y(dn.Banner,f&&dn.toneVariant[f],u&&dn.withHeading,dn.colorVariant[a]),L=!!(r&&u),M=!L||L&&!v,D=o&&s("button",{type:"button",className:dn.Button,onClick:()=>{typeof p=="function"&&p(),y(!0)},"aria-label":h("closeNotification"),"aria-hidden":E?!0:void 0,tabIndex:E?-1:void 0,children:s(Me,{type:"x",size:"small"})}),N=s("button",{type:"button",className:dn.Button,onClick:()=>P(U=>!U),"aria-expanded":!v,"aria-controls":`${C}-collapsible-area`,"aria-label":h("expandNotification"),"aria-hidden":E?!0:void 0,tabIndex:E?-1:void 0,children:s(Me,{size:"small",type:v?"chevron-down":"chevron-up"})});return g?null:s("div",{className:R,role:f==="critical"?"alert":"status",...(e||t)&&{tabIndex:-1},ref:k,id:l,children:[!i&&s("div",{className:dn.Icon,children:s(Me,{type:f4.get(f),size:"fill"})}),u&&s("div",{className:dn.Heading,children:s(Wt,{level:3,children:u})}),L&&s("div",{className:dn.ControlCollapsible,children:N}),Et(n)&&s("div",{className:dn.Content,children:s(yc.Provider,{value:"Banner",children:s(sn,{children:L?s(gn,{open:M,id:`${C}-collapsible-area`,children:[u&&s(Vt,{blockSize:"small-200"}),n]}):s(q,{children:[u&&s(Vt,{blockSize:"small-200"}),n]})})})}),D&&s("div",{className:dn.ControlDismiss,children:D})]})}const h4=v0.map(e=>{const t=e.replace(/\$/g,"\\$").replace(/\./g,"\\.").replace(/\[0\]/g,"\\[\\d+\\]");return new RegExp(`^${t}$`)});function g4(e){return h4.some(t=>t.test(e))}function y4(e){switch(e){case"postalCode":return"zip";case"zone":case"zoneCode":return"provinceCode";case"country":return"countryCode";default:return e}}const zb=()=>{const e=Ut(iy),{observability:t}=_();return x(n=>{const r=y4(n),o=r?`${e}.${r}`:e;return g4(o)?o:(t.error(new v4(`Invalid target (${e}) and field (${r}
39) combination`)),"cart")},[e,t])},v4=class extends Error{constructor(){super(...arguments),this.name="InvalidTargetError"}},_4=250,b4=new Set([st.InputInvalid,st.InputRequired]);function P4(e){switch(e){case"cart.buyerIdentity":return st.ContactError;case"cart.deliveryGroups[0].deliveryAddress":return st.DeliveryError;case"cart.paymentLines[0].billingAddress":case"cart.paymentLines[0]":return st.PaymentError;case"cart.discountCode":return st.DiscountError;default:return st.CheckoutError}}function zm(e){return!b4.has(e)}function Hm(e,t){return e?e.target===t.target&&e.errorType===t.errorType&&e.value===t.value&&e.message===t.message:!1}function S4(e){const{message:t,errorType:n,errorValue:r,children:o}=e,a=zb()(),l=qg(),c=V(l),u=V(null),d=V(),p=V(!0);c.current=l;const m=h=>{c.current({...h,timestamp:new Date})},f=uc(h=>{!p.current||!Hm(d.current,h)||!zm(h.errorType)||m(h)},_4);return F(()=>{const h=n||P4(a),g=t??u.current?.textContent??"",y={target:a,errorType:h,value:r||null,message:g};if(!Hm(d.current,y)){if(d.current=y,!zm(h)){m(y);return}f(y)}}),F(()=>()=>{p.current=!1},[]),s("div",{ref:u,children:o})}function _n(e){const{errorType:t,errorValue:n,children:r,...o}=e;return s($s,{...o,children:s(S4,{errorType:t,errorValue:n,children:r})})}function Hb({notice:e,iconHidden:t=!1,errorType:n}){const r=e.localizedMessageHtml||e.localizedMessage||e.nonLocalizedMessage;if(!r)return null;const o=e.tone??"info",i={key:e.code,tone:o,onDismiss:e.onDismiss,dismissible:!!e.onDismiss,heading:e.localizedTitle,collapsible:e.collapsible,iconHidden:t},a=typeof e.localizedMessageHtml=="string"?s("div",{dangerouslySetInnerHTML:{__html:e.localizedMessageHtml}}
39):r;return["critical","warning"].includes(o)?s(_n,{...i,errorType:n??st.CheckoutError,children:a}):s($s,{...i,children:a})}function E4(){const e=Ub().value;return e?s(Hb,{notice:e,errorType:st.DeliveryError}):null}function C4(){const e=H().allViolations,t=w(()=>(e.value?.filter(o=>_h(o.code))??[]).filter((o,i,a)=>i===a.findIndex(l=>l.code===o.code))),n=w(()=>t.value.length>0);return s(ve,{when:n,children:s(Q,{gap:"base",children:s(Xn,{each:t,getKey:r=>r.code,children:({localizedMessage:r,nonLocalizedMessage:o})=>s(_n,{errorType:st.PaymentError,tone:"critical",children:r||o})})})})}function k4(){const{allViolations:e}=H();return w(()=>{const t=e.value?.filter(n=>au.has(n.code))||[];return{violations:t,hasViolations:t.length>0}})}const I4=()=>{const{violations:e,hasViolations:t}=k4().value;return t?s(Q,{gap:"base",children:e.map(({code:n,localizedMessage:r,nonLocalizedMessage:o})=>s(_n,{errorType:st.DiscountError,tone:"warning",children:r||o},n))}):null};function qb(){const e=H().allViolations,{router:t,checkout:{identity:n}}=_(),r=Le(null),{shippingAddress:o}=se(),i=We(Yt(o.value.countryCode)),a=w(()=>jg(e.value??[])),l=w(()=>A4(e.value));F(()=>t.beforeNavigate(()=>{r.value=null}),[r,t]);const c=V(n.current.value);return $e(()=>{const u=n.current.value;u!==c.current&&c.current!==void 0&&(r.value=null),c.current=u}),$e(()=>{const u=l.value;u&&u!==r.peek()&&(r.value=u)}),w(()=>{const u=l.value??r.value,d=u?{...u,tone:"info"}:void 0;let p;return!a.value&&!i.value.loading&&(p=e.value?.find(m=>m.code==="MERCHANDISE_CART_AND_CURRENCY_UPDATED_BASED_ON_COUNTRY")),{banner:d,toast:p}})}function A4(e=[]){const t=e.filter(({code:n})=>tI.has(n));if(t.length===1&&t[0].code==="MERCHANDISE_CART_UPDATED_BASED_ON_COUNTRY")return t[0]}function T4(){const e=qb(),t=Vc(),n=V(null),r=uc(o=>{if(!o)return;const i=o.localizedMessage;if(i===n.current?.message)return;n.current?.hide();const a=t?.(i);a&&(n.current={...a,message:i})},250);return $e(()=>{const o=e.value.toast;o&&_t(()=>{r(o)})}),null}function Wu(){const{shopPay:e,embed:t,mobileCheckoutSdk:n,checkout:{identity:r}}=_(),o=e.app.config,a=!!(t?.isCheckoutKit()||t&&r.current.value!=="shopPay")||n.enabled||ch(o);return{isAppLayout:a,isWebLayout:!a}}class w4 extends Error{constructor(){super(...arguments),this.name="BuyWithPrimeChangeLinkError"}}function es(e){const t=se().paymentLines;return w(()=>ix(t.value,e))}function L4(){const{i18n:e}=_(),{href:t,onClick:n}=du();return s(ut,{href:t,onClick:n,children:e.translate("account_management.checkout_as_guest_link")})}const R4=new Map([["AMOUNT_TOO_SMALL","amount_too_small"],["AUTHENTICATION_ERROR","three_d_secure_failed"],["AUTHENTICATION_REQUIRED","generic_error"],["AUTHORIZATION_ERROR","processing_error"],["CALL_ISSUER","call_issuer"],["CANCELED_PAYPAL_BILLING_AGREEMENT","processing_error"],["CANCELLED_PAYMENT","cancelled_payment"],["CARD_DECLINED","card_declined"],["EXPIRED_BUYER_ACTION","expired_buyer_action"],["EXPIRED_CARD","expired_card"],["FUNDING_ERROR","processing_error"],["INCORRECT_ADDRESS","cannot_verify"],["INCORRECT_CVC","cannot_verify"],["INCORRECT_NUMBER","cannot_verify"],["INCORRECT_PIN","cannot_verify"],["INCORRECT_ZIP","cannot_verify"],["INSUFFICIENT_FUNDS","insufficient_funds"],["INVALID_CURRENCY","processing_error"],["INVALID_CVC","invalid_cvc"],["INVALID_EXPIRY_DATE","invalid_expiry_date"],["INVALID_ITEM_TOTAL","processing_error"],["INVALID_NUMBER","invalid_number"],["INVALID_PAYMENT_METHOD","cannot_verify"],["INVALID_SHIPPING_ADDRESS","invalid_shipping_address"],["INVALID_TOKEN","processing_error"],["INVOICE_ALREADY_PAID","processing_error"],["MISSING_SHIPPING_ADDRESS","missing_shipping_address"],["NAME_MISMATCH","name_mismatch"],["PAYMENT_ABOVE_THRESHOLD","payment_above_threshold"],["PICK_UP_CARD","pick_up_card"],["PUBLIC_PAYMENT_ERROR","generic_error"],["RISKY","risky"],["SHOP_PAY_DECLINED","processing_error_checkout_as_guest"],["SUCCESSFUL_OFFSITE_WITH_GIFT_CARD_ERROR","successful_offsite_with_gift_card_error"],["TEST_MODE_LIVE_CARD","test_mode_live_card"],["THIRD_PARTY_INTERNAL_ERROR","processing_error"],["TOKEN_EXPIRED","processing_error"],["TRANSIENT_ERROR","transient_error"],["UNILATERAL_AUTH_ERROR","processing_error"],["UNPROCESSABLE_TRANSACTION","processing_error"],["CAPTCHA_REQUIRED","captcha_required"],["DECISION_RULE_BLOCK","generic_error"],["CVV_ATTEMPTS_EXCEEDED","cvv_attempts_exceeded"],["CUSTOM_REDEEMABLE_NO_LONGER_AVAILABLE","custom_redeemable_no_longer_available"]]),x4=["SHOP_PAY_DECLINED"];function Gb(e){const{i18n:t}=_();let n="generic_error";return e&&(n=R4.get(e.code)||"generic_error"),t.translate("payment_errors",{scope:n,...e&&x4.includes(e.code)&&{checkout_as_guest_link:s(L4,{})}})}const M4=["AMOUNT_TOO_SMALL"];function N4(){const[e]=[{isBuyWithPrime:!0,checkoutSessionId:es(xe.BuyWithPrime).value},{isBuyWithPrime:!1,checkoutSessionId:es(xe.AmazonPay).value}].filter(({checkoutSessionId:m})=>!!m),{i18n:t,observability:n}=_(),{error:r,hasError:o}=Zg(bh),i=r&&M4.includes(r),a=Gb(i?{type:"payment",code:r}:void 0),{inMemoryAmazonPayParts:{hasPaymentSheetError:l,sdkStatus:c}}=Ye(),u=w(()=>{const m=c.value;return m.status===gi.Available?m.sdk:void 0});if(!o||!e)return null;const{isBuyWithPrime:d,checkoutSessionId:p}=e;return s(ve,{when:u,children:m=>{const f=()=>{try{d?m.buywithprime.changePaymentMethod({amazonPayOptions:{amazonCheckoutSessionId:p,isDeclined:!0}}):m.Pay.changePaymentMethod({amazonCheckoutSessionId:p,isDeclined:o})}catch(h){l.value=!0,n.error(new w4(`Error on changing buyer payment method. Details: ${h}`,{cause:h}))}};return s(_n,{tone:"critical",errorType:st.PaymentError,children:s(je,{children:i?a:s(q,{children:[t.translate("amazon_pay.error_page.payment_decline.message"),s(ut,{onClick:f,children:t.translate("amazon_pay.error_page.payment_decline.link")})]})})})}})}function D4(){const{i18n:e}=_(),{paymentSheetError:t}=Ye().inMemoryApplePayParts,n=e.translate("wallets.errors.generic",{walletName:e.translate("brand.apple_pay")}),r={unhandled_completion_status:e.translate("payment_errors.generic_error"),exceptional_completion_status:n,exceptional_negotiation_status:n,session_terminated:n,failed_to_create_session:n,shipping_options_changed:e.translate("wallets.errors.outdated.shipping_method"),unusable_partial_address:e.translate("wallets.errors.terminal",{walletName:e.translate("brand.apple_pay")}),new_tax_must_be_accepted:e.translate("payment_errors.order_total_changed"),payment_cancelled_while_processing:void 0,ineligible_discount:e.translate("wallets.errors.discount_code"),payment_terms_changed:e.translate("wallets.errors.outdated.payment_terms"),captcha_required:void 0,recovery_notice:e.translate("wallets.recovery_notice")};return w(()=>{const o=t.value?.type,i=t.value?.tone;if(o&&r[o])return{code:Qe.PaymentSheetViolations,tone:i??"critical",localizedMessage:r[o],nonLocalizedMessage:r[o]}})}
39const O4=new Map([["invalid_config","critical"],["config_missing_required_fields","critical"],["unusable_partial_address","critical"],["recovery_notice","critical"],[as,"info"]]);function F4(){const{i18n:e}=_(),{shippingAddress:t}=se(),{inMemoryGooglePayParts:{paymentSheetError:n}}=Ye(),r=We(Yt(t.value.countryCode));return w(()=>{const o=n.value?.type,i=(()=>{if(o==="invalid_config"||o==="config_missing_required_fields")return e.translate("wallets.errors.generic",{walletName:e.translate("brand.google_pay")});if(o==="unusable_partial_address")return e.translate("wallets.errors.terminal",{walletName:e.translate("brand.google_pay")});if(o==="unexpected_terminal_error")return e.translate("wallets.errors.terminal",{walletName:e.translate("brand.google_pay")});if(o===as){const l=r.value.details?.name;return l?e.translate("wallets.errors.unavailable.unavailable_for_country",{walletName:e.translate("brand.google_pay"),countryName:l}):e.translate("wallets.errors.unavailable.description",{walletName:e.translate("brand.google_pay")})}if(o==="recovery_notice")return e.translate("wallets.recovery_notice")})(),a=o?O4.get(o):"critical";if(i)return{code:Qe.PaymentSheetViolations,tone:a,localizedMessage:i,nonLocalizedMessage:i,onDismiss:a==="info"?()=>n.value=void 0:void 0}})}const $b=()=>{const e=Le(!1),t=Le(!1),n=gy(),r=H().allViolations,o=w(()=>r.value?.some(i=>Ph.has(i.code))??!1);return $e(()=>{o.value&&(t.value=!0),!o.value&&e.value&&(e.value=!1,t.value=!1)}),w(()=>{const i=t.value&&!e.value,a=n.value;return!i||!a?null:{code:Qe.PaymentMethodIncompatibleWithPaymentTerms,localizedMessage:a,tone:"info",onDismiss:()=>{e.value=!0}}})};function B4(){const{receiptErrorSignal:e}=Ye();return w(()=>{const t=e.value;if(t)return{code:Qe.PaymentSheetViolations,tone:"critical",localizedMessage:t,nonLocalizedMessage:t}})}function V4(){const{shippingAddress:e}=se(),{inMemoryGooglePayParts:{paymentSheetError:t},inMemoryPayPalParts:{paymentSheetError:n}}=Ye();return F(()=>{let r=!0;return e.fields.countryCode.subscribe(()=>{if(r){r=!1;return}t.value?.type===as&&(t.value=void 0),n.value?.type===oh&&(n.value=void 0)})},[e,t,n]),null}function U4(){V4();const e=D4(),t=F4(),n=We(NO()),r=B4(),o=DO(),i=t_({isPayWithPayPalButton:!1}),a=ax(),l=We(px()),c=$b();return w(()=>{const u=i.value.status==="error",d=!!c.value,p=a.value||r.value||l.value||e.value||t.value||(d?null:n.value)||(u?null:o.value);if(p)return typeof p=="string"?{code:Qe.PaymentSheetViolations,localizedMessage:p,nonLocalizedMessage:p,tone:"critical"}:p})}const z4=new Set(["CART_METAFIELD_GENERIC_ERROR"]),H4=new Set(["CART_METAFIELD_DISALLOWED_ACCESS","CART_METAFIELD_INVALID_KEY_LENGTH","CART_METAFIELD_INVALID_NAMESPACE_LENGTH","CART_METAFIELD_INVALID_TYPE","CART_METAFIELD_INVALID_VALUE"]),q4=new Set([...z4,...H4]),G4=["noAddressLocation","stockProblems","thankYou"],Wb=new Set(["TIP_TIPS_NOT_ALLOWED_FOR_B2B"]),Yb=new Set(["PAYMENTS_METHOD","PAYMENTS_TERMS_CHANGED"]),$4=[...Kr,...nI,...rI,...au,...oI,...Wb,...Yb,...Sh,...iI,...sI,...aI,...Eh,...Rs,...Vf,...tc,...lI,...Zl,...kf,...ic,...Ph,...cI,...q4,"DELIVERY_WRONG_NUMBER_OF_DELIVERY_LINES","DELIVERY_DELIVERY_LINE_DETAIL_CHANGED","DELIVERY_ONLY_EMPTY_TERMS_ACCEPTED","DELIVERY_LOCAL_PICKUP_DELIVERY_LINE_DETAIL_CHANGED","DELIVERY_SELECTED_PICKUP_OPTION_NO_LONGER_AVAILABLE","LOCALIZATION_EXTENSION_FIELD_ERROR","MERCHANDISE_CART_UPDATED_BASED_ON_COUNTRY","MERCHANDISE_CART_AND_CURRENCY_UPDATED_BASED_ON_COUNTRY","MERCHANDISE_EXPECTED_PRICE_MISMATCH","MERCHANDISE_ONLY_EMPTY_TERMS_ACCEPTED","TAX_NEW_TAX_MUST_BE_ACCEPTED","TAX_TAX_INCLUSIVITY_MISMATCH","TIP_NOT_ACCEPTED_BY_SHOP","DISCOUNTS_CUSTOM_DISCOUNT_NOT_HONOURED","PAYMENTS_PAYMENT_FLEXIBILITY_TERMS_ID_MISMATCH","PAYMENTS_PAYPAL_OVER_CAPTURE_DETECTED","WAITING_PENDING_TERMS","ALTERNATIVE_PAYMENT_CURRENCY_UNACCEPTABLE_INPUT_ERROR","ALTERNATIVE_PAYMENT_CURRENCY_INPUT_PROVIDED_BUT_NOT_APPLICABLE_ERROR","REQUIRED_ARTIFACTS_UNAVAILABLE","NON_NEGOTIABLE_TERMS_MISSING_NON_NEGOTIABLE_TERMS","DISCOUNTS_DISCOUNT_TITLE_TOO_LONG"];function W4(){const{i18n:e,router:t}=_(),n=t.currentUrl.value,[r,o]=oe(void 0),i=n.searchParams.get("company_location_changed")==="true";return B(()=>r===!0||!i?null:(o(!1),{code:Qe.CompanyLocationChanged,localizedMessage:e.translate("notice_banner.company_location_changed"),onDismiss:()=>o(!0)}),[r,e,i])}function Y4(){const{i18n:e,shop:t}=_(),n=H().allViolations;return w(()=>(n.value?.filter(o=>ic.has(o.code))||[]).length===0?null:{code:Qe.ContactInformationViolations,localizedTitle:e.translate("notice_banner.contact_information.title"),tone:"critical",localizedMessage:e.translate("notice_banner.contact_information.header",{emailLink:s(ut,{href:`mailto:${t.contactEmail}`,children:e.translate("notice_banner.contact_information.email_link")})})})}var j4={ListItem:"_1585eob1 _1585eob0 _1fragemws _1fragemzh"};function Yu({children:e,id:t}){return s("li",{id:t,className:j4.ListItem,children:e})}var Xa={UnorderedList:"_70q41o2 _70q41o1 _1fragemqt _1fragemsm _1fragemp0 _1fragemuf _1fragem6t _1fragemws _1fragem11h",Wrapper:"_70q41o0",listStyleVariant:{disc:"_70q41o3",none:"_70q41o4"}};function ju({gap:e="base",listStyle:t="disc",accessibilityLabel:n,children:r,id:o}){const{className:i}=Tt({gap:e}),a=Y(Xa.UnorderedList,t&&Xa.listStyleVariant[t],i),l=t==="none"?"list":void 0;return s("div",{className:Xa.Wrapper,children:s("ul",{className:a,role:l,"aria-label":n,id:o,children:r})})}function K4(){const e=H().buyerIdentity,t=Pn(),{shippingAddress:n}=se();return w(()=>{const r=e.value?.purchasingCompany,o=r?.location.shippingAddress?ni(n.value,r.location.shippingAddress):!1;return t.value&&!o})}function J4(){const{i18n:e,shop:t,checkout:n}=_(),r=Pn(),o=K4(),i=Os(),a=n.configuration.layout.isOnePage;return w(()=>{const{deliveryAddressErrors:l}=i.value;if(a.value||o.value||l.length===0)return null;const c=r.value?s(G,{children:e.translate("notice_banner.delivery_address_validation_errors_banner.use_different_address")}):s(G,{children:e.translate("notice_banner.delivery_address_validation_errors_banner.text_html",{contact_us:s(ut,{href:`mailto:${t.contactEmail}`,tone:"monochrome",children:e.translate("notice_banner.delivery_address_validation_errors_banner.contact_us")})})}),[u]=l,d=l.length===1;return{code:Qe.DeliveryAddressValidationErrors,tone:"critical",localizedTitle:d?u.message:e.translate("notice_banner.delivery_address_validation_errors_banner.title"),localizedMessage:d?c:s(q,{children:[s(ju,{children:l.map(m=>s(Yu,{children:s(G,{children:m.messageNode??m.message})},`${m.target}${m.message}`))}),c]})}})}const X4=()=>{const{i18n:e}=_(),t=H().allViolations;return w(()=>(t.value?.filter(r=>Yb.has(r.code))||[]).length===0?null:{code:Qe.PaymentsViolations,localizedMessage:e.translate("payment_errors.available_methods_updated")})};function Q4(){const{i18n:e,shop:t,checkout:n}=_(),[r,o]=oe(!1),i=ou(),a=Pn(),l=n.configuration.layout.isOnePage.value;return r||!i.value||a.value||l||!n.isShippingRequired.value?null:{code:Qe.ShippingAddressIsMissing,localizedTitle:e.translate("thank_you.missing_shipping_address_banner.title"),localizedMessage:s(Cr,{children:e.translate("thank_you.missing_shipping_address_banner.text_html",{contact_us:s(ut,{href:`mailto:${t.contactEmail}`,children:e.translate("thank_you.missing_shipping_address_banner.contact_us")})})}),status:"info",onDismiss:()=>o(!0)}}const Z4=()=>{const e=Le(!1),{allViolations:t}=H();return w(()=>{const n=t.value?.filter(o=>Wb.has(o.code))||[],r=n.length>0?n[0]:null;return e.value||!r?null:{code:Qe.TipsViolations,localizedMessage:r.localizedMessage||r.nonLocalizedMessage,status:"warning",onDismiss:()=>e.value=!0}})};function e$(){const{i18n:e,shop:t,checkout:n}=_(),{allViolations:r}=H(),o=Pn(),{paymentLines:i}=se();return w(()=>
39{if(!!Pt(i.value,"APPLE_PAY")&&!n.isShippingRequired.value||o.value)return null;const l=r.value?.filter(c=>Kr.has(c.code))||[];return l.length===0?null:{violations:l,noticeType:Qe.DeliveryViolations,noticeTitle:e.translate("notice_banner.violations_title",{violation:e.translate("notice_banner.individual_violations_title",{scope:Qe.DeliveryViolations})}),noticeHeader:e.translate("notice_banner.all_violations_content",{emailLink:s("a",{href:`mailto:${t.contactEmail}`,children:e.translate("notice_banner.all_violations_email_link")})})}})}function jb(){const{i18n:e,shop:t,checkout:n}=_(),{allViolations:r,paymentLines:o,paymentMethods:i}=H(),a=Pn(),l=n.configuration.layout.isOnePage.value,c=Ce();return w(()=>{const{currentPage:u}=c.value,d=i.value?.some(f=>f.type==="deferred")&&o.value?.lines?.some(f=>f.method.type==="deferred");if(!(l&&d||!l&&!a.value||u?.id==="payment"))return null;const m=r.value?.filter(f=>_h(f.code))||[];return m.length===0?null:{violations:m,noticeType:Qe.PaymentsViolations,noticeTitle:e.translate("notice_banner.violations_title",{violation:e.translate("notice_banner.individual_violations_title",{scope:Qe.PaymentsViolations})}),noticeHeader:e.translate("notice_banner.all_violations_content",{emailLink:s("a",{href:`mailto:${t.contactEmail}`,children:e.translate("notice_banner.all_violations_email_link")})})}})}function t$(){const{buyerIdentity:e,allViolations:t}=H(),{i18n:n,shop:r,observability:o}=_();return w(()=>{if(!e.value?.purchasingCompany)return null;const i=(t.value||[]).filter(a=>!$4.includes(a.code));for(const a of i)o.counter({name:"b2b_unhandled_violations",value:1,attributes:{violation:a.code}});return i.length===0?null:{violations:i,noticeType:Qe.OtherViolations,noticeTitle:n.translate("notice_banner.violations_title",{violation:n.translate("notice_banner.individual_violations_title",{scope:Qe.OtherViolations})}),noticeHeader:n.translate("notice_banner.all_violations_content",{emailLink:s("a",{href:`mailto:${r.contactEmail}`,children:n.translate("notice_banner.all_violations_email_link")})})}})}function n$(){const e=H().buyerIdentity.value?.purchasingCompany,t=!_().checkout.configuration.layout.isOnePage.value,n=Y4().value,r=W4(),o=Q4(),i=J4().value,a=Z4().value,l=Ub().value,c=X4().value,u=jb().value,d=e$().value,p=t$().value,{currentDetour:m}=Ce().value,f=m?.type&&G4.includes(m.type),{shippingAddress:h}=se();if(!e||f)return[];const g=h.peek(),y=e?.location.shippingAddress||{},v=ni(g,y);return[...u?[Oo(u)]:[],...d?[Oo(d)]:[],...p?[Oo(p)]:[],...n?[n]:[],...r?[r]:[],...o?[o]:[],...i?[i]:[],...a?[a]:[],...l&&t&&v?[l]:[],...c&&t?[c]:[]]}function Kb(){const{client:e,router:t}=_(),n=e.unstable_getSerialization("amazonQueryParams"),r=Ye().inMemoryAmazonPayParts.serializedAmazonParams,o=r.value,{searchParams:i}=t.currentUrl.value;return B(()=>{function a(){if(i&&typeof i.entries=="function"){const d=i.entries();if(d&&typeof d[Symbol.iterator]=="function")return Object.fromEntries(d)}return{}}const l=a();let c=o;o===null&&n&&(r.value=n,c=n);const u={...c,...l};return Object.fromEntries(Ch.map(d=>[d,u[d]]))},[i,o,n,r])}function r$(){const{router:e}=_(),t=Kb(),n=e.currentUrlMatches("/thank-you");return{searchParams:t,isThankYouPage:n}}function Ku(){const{paymentMethods:e}=H(),{paymentLines:t}=se(),{searchParams:n,isThankYouPage:r}=r$(),o=We(n),i=We(r),a=V(!1),l=V(!1);return w(()=>{const c=o.value,u=t.value,d=e.value,p=c.wallet===xe.BuyWithPrime&&!c.amazon_cancelled,[m]=Yl(u,[xe.BuyWithPrime]),f=!!m;return p&&(a.current=!0),f&&(l.current=!0),l.current&&!f&&!p&&(a.current=!1,l.current=!1),uI({paymentLines:u,paymentMethods:d,urlParams:{wallet:a.current?xe.BuyWithPrime:null,amazon_cancelled:null},isThankYouPage:i.value})})}function o$(){const{checkout:e,i18n:t}=_(),{configuration:n}=e,r=e.latestReceipt.value,{lastJourneyProgression:o}=Je(),i=n.layout.isOnePage.value,a=Ku(),c=B(()=>r?.status==="failed"&&r.failure?.type==="payment"&&r?.failure.code==="PRE_CHARGE_ERROR"&&o.value.type!=="success",[o.value,r])&&(i||a.value),{inMemoryAmazonPayParts:{buyerDetails:u}}=Ye(),d=c||u.value.error,p=B(()=>c?Qe.PaymentsViolations:Qe.OtherViolations,[c]);return d?{code:p,localizedMessage:t.translate("wallets.errors.generic",{walletName:t.translate("brand.amazon_pay")}),tone:"critical"}:null}function i$(){const e=H().allViolations,{i18n:t}=_(),n=Ce(),r=Le(void 0);return tr(o=>{o.type==="complete"||o.type==="invalid"||o.type==="failed"||(r.value=o.negotiationStage)}),w(()=>{const o=e.value?.filter(({code:a})=>a==="DELIVERY_DELIVERY_LINE_DETAIL_CHANGED");if(!o?.length)return;const i=n.value.currentPage?.id==="payment";if(r.value==="completion"||r.value==="negotiation"&&i)return{...o[0],tone:"critical",localizedMessage:t.translate("payment.shipping_rate_updated"),localizedMessageHtml:t.translate("payment.shipping_rate_updated"),priority:1}})}function s$(){const{source:e}=_(),{paymentLines:t,buyerIdentity:n}=H(),r=jb(),o=e.type==="draftOrder";return w(()=>!o||n.value?.purchasingCompany||!t.value?.lines?.some(i=>i.method.type==="deferred")?null:r.value)}function a$(){const e=H().allViolations,{i18n:t,url:n}=_();return w(()=>{const r=e.value?.filter(i=>Sh.has(i.code))??[];if(!r.length)return null;const o=s(q,{children:t.translate("notice_banner.return_to_cart_to_update_quantities",{return_to_cart_link_text:s(ut,{tone:"monochrome",href:n.cart(),children:t.translate("notice_banner.return_to_cart_link_text")})})});return r.length===1?{code:r[0].code,localizedTitle:r[0].localizedMessage||r[0].nonLocalizedMessage,localizedMessage:o,c
39ollapsible:!1,tone:"critical"}:{code:Qe.MerchandiseQuantityRulesNotMet,localizedTitle:t.translate("general.errors.merchandise.quantity_rules_not_met"),localizedMessage:o,collapsible:!1,tone:"critical"}})}function l$(){const e=H().merchandiseLines,{i18n:t}=_();return w(()=>{if(e.value?.sellingPlanMismatch)return{code:Qe.SellingPlanDigest,localizedMessage:t.translate("notice_banner.subscription_changed"),status:"warning"}})}function c$(){const{taxes:e,merchandiseLines:t}=H(),{i18n:n}=_(),r=V("unset"),o=V(),i=Ce();return w(()=>{const a=e.value,l=t.value?.priceMismatch,c=i.value.currentPage?.id==="information",u=a?.status==="pending"?void 0:a?.status;return r.current==="unset"&&u&&(r.current=u),l&&r.current!=="unset"&&u&&r.current!==u?(o.current={code:Qe.TaxExemption,localizedMessage:n.translate("change_country.cart_updated_based_on_country")},r.current=u):(!l||c)&&(o.current=void 0),o.current})}function Jb(){const{paymentLines:e}=se(),{checkout:t}=_(),n=t.identity.current.value==="shopPay";return w(()=>dI({paymentLines:e.value,isOnePage:t.configuration.layout.isOnePage.value,isShopPayActive:n}))}function u$(){const e=H(),{allViolations:t}=e,n=e.paymentLines?.value?.lines,{lastJourneyProgression:r}=Je(),o=!!Pt(n,"APPLE_PAY"),i=d$(),a=Jb(),l=w(()=>r.value.type==="success"||r.value.type==="error"?r.value.negotiationStage==="completion":!1),{criticalViolations:c,warningViolations:u}=B(()=>{const f=t.value||[],h=[],g=[];for(const y of f)y.__typename!=="ConfirmChangeViolation"&&y.__typename!=="UnprocessableTermViolation"&&y.__typename!=="RemoveTermViolation"&&y.__typename!=="ArtifactDissatisfactionViolation"||(pI.has(y.code)&&h.push(i(y,"info")),mI.has(y.co
39de)&&g.push(i(y,"warning")),fI.has(y.code)&&l.value&&h.push(i(y,"critical")),hI.has(y.code)&&h.push(i(y,"critical")),o&&!a.value&&gI.has(y.code)&&h.push(i(y,"critical")));return{criticalViolations:h,warningViolations:g}},[t.value,l.value,o,a.value,i]),d=0,p=B(()=>c.length>=1?c.map(f=>f.priority??d).reduce((f,h)=>f>h?f:h):d,[c]),m=B(()=>c.length>=1?c.filter(f=>(f.priority??d)>=p):c,[c,p]);return u.concat(m)}function d$(){const{client:e,i18n:t}=_(),n=e.unstable_getSerialization("logoutUrl")||"",r={PAYMENTS_WALLET_PAYPAL_EXPRESS_ADDRESS_INVALID:t.translate("wallets.errors.terminal",{walletName:t.translate("brand.paypal")}),PROPOSAL_SESSION_IDENTIFIER_NOT_UNIQUE:t.translate("session_errors.session_not_unique"),PROPOSAL_SESSION_ALREADY_FINISHED:t.translate("session_errors.session_already_finished"),DISCOUNTS_CURRENTLY_INACTIVE:t.translate("discount_errors.generic_error"),DISCOUNTS_NO_ENTITLED_LINE_ITEMS:t.translate("discount_errors.generic_error"),DISCOUNTS_USAGE_LIMIT_REACHED:t.translate("discount_errors.generic_error"),DISCOUNTS_CUSTOMER_NOT_ELIGIBLE:t.translate("discount_errors.generic_error"),DISCOUNTS_CUSTOMER_USAGE_LIMIT_REACHED:t.translate("discount_errors.generic_error"),BUYER_IDENTITY_COMPANY_PURCHASE_PERMISSION_REQUIRED:t.translate("b2b_errors.lost_b2b_purchasing_permissions",{logout_url:s(ut,{href:n,children:t.translate("b2b_errors.log_out_link_text")})}),BUYER_IDENTITY_LOST_ACCESS_TO_COMPANY:t.translate("b2b_errors.lost_b2b_purchasing_permissions",{logout_url:s(ut,{href:n,children:t.translate("b2b_errors.log_out_link_text")})}),ARTIFACT_DISSATISFACTION:t.translate("artifact_errors.artifact_dissatisfaction_without_violation"),BUYER_IDENTITY_PRESENTMENT_CURRENCY_DOES_NOT_MATCH:t.translate("general.errors.buyer_identity.buyer_identity_presentment_currency_does_not_match"),[yI]:t.translate("remote.errors.currency_mismatch_removal")};return(o,i)=>{const a=r[o.code];return{...o,localizedMessageHtml:a??o.localizedMessageHtml,localizedMessage:a??o.localizedMessage,tone:i}}}function p$(){const e=a$(),t=U4(),n=o$(),r=l$(),i=qb().value.banner,a=c$(),l=n$(),c=u$(),u=s$(),d=i$(),p=_().checkout.configuration.layout.isOnePage.value,{allViolations:m}=H(),f=w(()=>jg(m.value??[])),h=$b();return[...c,...u.value?[Oo(u.value)]:[],...a.value?[a.value]:[],...r.value?[r.value]:[],...e.value?[e.value]:[],...t.value?[t.value]:[],...n?[n]:[],...l,...i&&!f.value?[i]:[],...h.value?[h.value]:[],...d.value&&!p?[d.value]:[]].filter(vI("localizedMessage"))}function Xb(e,t){const n=e.peek()||{};Object.entries(t).some(([r,o])=>n[r]!==o)&&(e.value={...n,...t})}function m$(){const e=es(xe.AmazonPay),t=es(xe.BuyWithPrime),{hasError:n}=Zg(bh),{checkout:r}=_(),i=r.latestReceipt.value?.id,{persistedAmazonSignal:a}=Ye(),l=!!(n&&(e.value||t.value))&&i!==a.value?.receiptIdForPaymentDecline,c=x(()=>Xb(a,{receiptIdForPaymentDecline:i}),[a,i]);return{hasError:l,clearError:c}}function Qb(){const{checkout:e}=_(),t=e.latestReceipt.value,{persistedApplePaySignal:n,inMemoryApplePayParts:{paymentSheetError:r}}=Ye(),o=Le(!1),i=Le(!1),a=n.value,l=Jb(),c=x(()=>{o.value=!0,i.value=!1},[o,i]),u=o.value,d=i.value;tr(m=>{if(m.type==="error"&&m.negotiationStage==="completion"){const f=m.violations.some(h=>h.code==="PAYMENTS_APPLE_PAY_SESSION_EXPIRED");i.value=f}});const p=B(()=>l.value?d?!0:!t||u?!1:t.status==="failed"&&t.failure.type==="payment"&&a?.receiptIdForPaymentFailure===t.id:!1,[t,l.value,a,u,d]);return F(()=>{p&&(r.value=void 0)},[p,r]),{hasError:p,clearError:c}}function qm(e,t,n,r){if(e?.status!=="failed")return!1;const o=n==="draftOrder"&&e.failure.type==="payment"&&e.failure.hasOffsitePaymentMethod!==!0&&r===e.id;return t===e.id||o}function f$(){const[e,t]=jc(hn.LastSeenErrorReceiptId),n=St(),{checkout:r,client:o,source:i}=_(),a=r.latestReceipt.value,l=o.unstable_getSerialization("receipt")?.latestReceipt,c=l?.__typename==="FailedReceipt"?l.id:void 0,[u,d]=oe(()=>n.peek()?qm(a,e,i.type,c):!0);return F(()=>{const p=qm(a,e,i.type,c);d(p),a?.status==="failed"&&e!==a.id&&t(a.id),a?.status!=="failed"&&t(void 0)},[a?.id,a?.status]),u}const Gm=["discountLines","totalSavings","merchandiseLines","deliveryNext"];function Zb(e){return e.some(({code:t})=>Ev.has(t))}function h$(e){return e.find(t=>Ev.has(t.code))}function g$(e,t){const n=_I(t);e.value=n}function $m(e,t){if(!e)return null;const n="code"in t?t.code:void 0,r="ids"in t?t.ids:void 0,o=e.filter(i=>n?!Ws(i,n):r?!r.includes(i.id):!0);return o.length>0?o:null}const eP=(e,t)=>e.toUpperCase()===t.toUpperCase(),Ws=({discountLine:e},t)=>!!(t&&eP(e.discount.title,t)),y$=(e,t)=>
39t.some(n=>(n.discount.type==="discountCodeTrigger"||n.discount.type==="code")&&Ws(e,n.discount.title)),v$=(e,t,n)=>[...t.reduce((o,i)=>{if(i.errorCode===Ko||y$(i,e))return o;const a=Ws(i,n);return!n||a?o.set(i.discountCode.toUpperCase(),i):o},new Map).values()];function tP(e){return e?.shopPay?.isExternal===!0}function _$(){const{i18n:e}=_(),{voidedGiftCardsSignal:t}=xt(),n=t.peek(),r=B(()=>new Set([...Rs,"REDUCTION_GIFT_CARD_ALREADY_APPLIED"]),[]),o=B(()=>({REDUCTION_GIFT_CARD_ALREADY_APPLIED:()=>e.translate("field_errors.gift_card_already_applied"),PAYMENTS_GIFT_CARD_DISABLED:()=>e.translate("field_errors.gift_card_invalid",{last_four_characters:(n[0]??"").slice(-4).toUpperCase()})}),[n,e]);return x(i=>i.reduce((a,l)=>(r.has(l.code)&&a.push(o[l.code]()),a),[]),[o,r])}function Ys({inputRef:e,headingId:t,monorailSection:n}={}){const{discountCodeWarningSignal:r,reductionsErrorsSignal:o,reductionsValueSignal:i,derivedErrorMessageSignal:a,refreshNegotiationSignal:l,currentDiscountCodeAttemptSignal:c}=xt(),u=Je(),{negotiate:d}=Mt(),p=Le(i.peek()),[m,f]=oe(i.peek().length>0),{discountLines:h,paymentLines:g,reduction:y}=se(),v=r.value,{checkout:P,i18n:b,userEvents:C,shop:I,source:S}=_(),k=qf(I),E=P.identity.current.value==="shopPay",T=h.value,[A,R]=oe([]),L=_$(),M=ay(),{currentPage:D}=Ce().value,N=ze("discountLines").value,U=V(0),[z,O]=oe(!1),K=B(()=>T?.reduce((j,Z)=>(Z.message&&!A.includes(Z.discount.title)&&j.push({id:ul(),discountCode:Z.discount.title,message:Z.message??"",discountLine:Z,tone:"info"}),j),[]),[T,A]);F(()=>{N&&(U.current+=1)},[N,U]),F(()=>{N||O(!1)},[N]),F(()=>{de(z&&N)},[v,N,U,z]);const X=V(D?.id);F(()=>{X.current!==D?.id&&(X.current=D?.id,o.value=[])},[D?.id]);const ne=x(j=>{const Z=r.value??[];r.value=$m(Z,{ids:j}),M()},[M,r]),$=x(j=>{const Z=K.filter(({id:fe})=>j.includes(fe)).map(({discountCode:fe})=>fe);R(fe=>[...fe,...Z]),M()},[K,M]),J=x(j=>{i.value=j,j&&(p.value=j)},[i,p]),ee=x(({clearWarnings:j=!0,preserveValue:Z=!1}={})=>{Z||(J(""),f(!1),c.value=null),j&&(r.value=null)},[c,r,J]),te=x(()=>{t&&document.getElementById(t)?.focus()},[t]),W=x(j=>{J(j?.trim()),o.value.length>0&&(o.value=[])},[J,o]),he=x(()=>{o.value.length>0&&(o.value=[])},[o]),[re,de]=oe(!1),le=x((j,Z)=>{const fe=[],be=[],Te=r.value??[],Se=c.value;for(const Ae of j){const Ue=Ko===Ae.code;switch(Ae.type){case"InputValidationError":case"UnprocessableTermViolation":{if(Lo.has(Ae.code)){fe.push(Ae);break}Z!=="negotiation"&&Rs.has(Ae.code)&&fe.push(Ae);break}case"RemoveTermViolation":case"ConfirmChangeViolation":{const ce=Ae.type==="ConfirmChangeViolation",ie=nA(Ae.targetEntity),me=!!(Se&&ie&&eP(ie.title,Se));if(Pv.has(Ae.code)&&Z!=="completion"&&!me)break;if(Lo.has(Ae.code)){fe.push(Ae);break}if(ie?.discount.type!=="discountCodeTrigger"||!Sv.has(Ae.code))break;const Ne=El.has(Ae.code),lt={message:Ae.localizedMessage??Ae.nonLocalizedMessage,messageHtml:Ae.localizedMessageHtml,discountLine:ie,tone:Ne?"info":"warning",discountCode:ie.discount.title,id:ul(),errorCode:Ae.code,isConfirmChangeViolation:ce};if(Ue){be.push(lt);break}(!Se||me)&&be.push(lt);break}}}return o.value=fe.slice(-1),Se||be.unshift(...Te.filter(Ae=>Ae.errorCode===Ko)),r.value=be.length>0?be:null,{hasWarnings:be.length>0,hasPreserveInputErrors:j.some(Ae=>Lo.has(Ae.code))}},[c,r,o]),_e=x(async()=>{await d({include:[],onComplete:j=>{P.unstable_overwriteLatestReceipt(void 0),l.value=!1,(j.status==="success"||j.status==="error")&&le(j.errors)}})},[le,d,P,l]);$e(()=>{const j=P.latestReceipt.value;l.peek()||!j||!Gg(j)||j.failure?.type!=="discount"||(l.value=!0,_t(()=>{_e()}))}),tr(x(j=>{"errors"in j&&le(j.errors,j.negotiationStage)},[le])),$e(()=>{const j=u.lastJourneyProgression.value;j.type==="error"&&j.negotiationStage==="completion"&&_t(()=>le(j.errors,"completion"))}),bI(({parts:j,reason:Z})=>{const fe=r.peek()??[],be=c.peek(),Te=be&&fe.every(Ue=>!Ws(Ue,be));if(fe.length===0)return{behavior:"allow"};if(Z==="completion"||Te)return r.value=null,{behavior:"allow"};if(Z!=="progression"&&Z!=="negotiation")return{behavior:"allow"};const Se=j.discountLines.peek(),Ae=v$(Se,fe,be);return Ae.length>0&&(j.discountLines.value=[...Se,...Ae.map(({discountLine:Ue})=>Ue)]),{behavior:"allow"}}
39);const ae=x(j=>(j||g.value).filter(fe=>fe.method.type==="giftCard").map(fe=>fe.method.code),[g]),ge=x(()=>h.value.filter(j=>j.discount.type==="code").map(j=>j.discount.title),[h]),ke=x(async()=>{O(!0);const j=i.value,Z=JSON.parse(JSON.stringify(g.value));c.value=j,e?.current?.blur(),te();const fe=ge(),be=new Set(h.value.filter(Te=>Te.discount.type==="code"&&Te.discount.codeHidden).map(Te=>Te.discount.title));await d({include:["deliveryNext"],fieldsToResolve:[...Gm],loading:["deliveryNext","discountLines"],customizeNegotiation:Te=>({...Te,reduction:{code:j}}),onComplete:Te=>{if(Te.status==="success"||Te.status==="error"){const{hasWarnings:Se,hasPreserveInputErrors:Ae}=le(Te.errors);ee({clearWarnings:!Se,preserveValue:Ae});const Ue=Zb(Te.errors);if(Ue&&Te.errors.some(pe=>El.has(pe.code))){const pe=ge(),Re=fe.filter(ot=>!pe.includes(ot));Re.length>0&&(Re.length===1&&be.has(Re[0])?(Lt({content:b.translate("order_summary.discount_has_been_removed")}),Lt({content:b.translate("order_summary.discount_code_applied_with_code",{code:j})})):Lt({content:Re.length>1?b.translate("order_summary.discount_code_replaced_multiple",{code:j}):b.translate("order_summary.discount_code_replaced",{old_code:Re[0],code:j})}))}const ce=Te.negotiated.paymentLines?.lines||[],ie=ae(Z),me=ae(ce),Ne=ie.reduce((De,pe)=>(De[pe]=!0,De),{}),Ge=me.some(De=>Ne[De]===void 0),lt=Z.reduce((De,pe)=>(pe.method.type==="giftCard"&&pe.cost!=null&&pe.cost.amount>0&&(De[pe.method.code]=!0),De),{}),Ft=k&&ce.some(De=>De.method.type==="giftCard"&&De.cost!=null&&De.cost.amount>0&&lt[De.method.code]===void 0);if(!Ue){if(k&&(Ge||Ft)){const pt=g.peek();g.value=[...pt.filter(jt=>!Cd(jt)),...ce.filter(Cd)]}const{runningTotal:De,merchandiseLines:pe}=Te.negotiated;!(De&&De.amount<=0)||Gf(pe?.lines)||Z.some(jt=>jt.method.type==="walletsPlatformPaymentMethod"&&jt.method.name===xe.BuyWithPrime)||g$(g,k&&(Ge||Ft)?ce:Z);const ht=b.translate("order_summary.discount_code_applied_with_code",{code:j});Lt({content:Ge||Ft?b.translate("order_summary.gift_card_applied"):ht}),J(""),f(!1)}const kt=h$(Te.errors),cn=()=>{if(!Ue)return Ge?"gift_card":"discount_code"};C.monorailEvent({schemaId:"checkout_reduction_attempted/2.0",payload:{shopId:parseInt(Be(I.id),10),checkoutToken:S.checkoutSessionIdentifier??"checkout_identifier_undefined",event:Ue?"apply_reduction_failure":"apply_reduction_success",reductionType:cn(),errorMessage:kt?.nonLocalizedMessage,page:"checkout",section:n}}),E&&(Ue?C.monorailEvent({schemaId:"shopify_pay_payment_page_ui_interaction/1.2",payload:{...Gn(S,P,I),action:"add_discount_failure"}}):C.monorailEvent({schemaId:"shopify_pay_payment_page_ui_interaction/1.2",payload:{...Gn(S,P,I),action:Ge?"add_gift_card":"add_discount_success"}}))}},force:!0}),M()},[ee,c,M,te,ae,le,e,E,d,h,g,J,b,i,C,S,P,I,k,n,ge]),we=x(async j=>{const Z=h.value,fe=ge(),be=Z.some(Se=>Se.discount.type==="code"&&Se.discount.title===j&&Se.discount.codeHidden);if(Z.length===1&&te(),tP(u)){const Ae=u.shopPay.discountCodes.value.filter(Ue=>Ue!==j);u.shopPay.updateDiscountCodes(Ae)}h.value=Z.filter(Se=>Se.discount.type==="code"?Se.discount.title!==j:!0),r.value=$m(r.value,{code:j}),R(Se=>Se.filter(Ae=>Ae!==j)),y.value?.code===j&&(y.value=void 0),E&&C.monorailEvent({schemaId:"shopify_pay_payment_page_ui_interaction/1.2",payload:{...Gn(S,P,I),action:"remove_discount"}}),await d({include:["deliveryNext"],fieldsToResolve:[...Gm],loading:["discountLines","deliveryNext"],force:!0,onComplete:Se=>{(Se.status==="success"||Se.status==="error")&&le(Se.errors),Lt({content:be?b.translate("order_summary.discount_has_been_removed"):b.translate("order_summary.discount_code_removed",{code:j}),role:"status"});const Ue=ge().filter(ce=>!fe.includes(ce));if(Ue.length>0){const ce=h.value.some(ie=>ie.discount.type==="code"&&ie.discount.title===Ue[0]&&ie.discount.codeHidden);Lt({content:ce?b.translate("order_summary.discount_has_been_applied"):b.translate("order_summary.discount_code_applied_with_code",{code:Ue[0]}),role:"status"})}}}),M()},[u,h,y,E,d,M,te,C,S,P,I,le,r,ge,b]),Ie=x(async j=>{const Z=g.value;g.value=Z.filter(fe=>fe.method.type==="giftCard"?fe.method.code!==j:!0),g.value.length===1&&te(),E&&C.monorailEvent({schemaId:"shopify_pay_payment_page_ui_interaction/1.2",payload:{...Gn(S,P,I),action:"remove_gift_card"}}),await d({include:["paymentLines"]}),M()},[g,E,d,M,C,S,P,I,te]);return{loading:re,handleSubmit:ke,handleNegotiationErrors:le,dirty:m,setDirty:f,removeDiscount:we,getGiftCards:ae,removeGiftCard:Ie,reductionCodeField:{value:i.value,valueSignal:p,onChange:W,onInput:he,error:xy(o.value),errorSignal:a},discountCodeWarning:v,discountMessages:K,removeDiscountCodeWarnings:ne,removeDiscountCodeMessage:$,giftCardBannerErrors:L(o.value)}}function nP(){const{negotiate:e}=Mt(),{email:t,phone:n,billingAddress:r,paymentLines:o}=se(),{inMemoryApplePayParts:{asPaymentMethod:i}}=Ye(),{checkout:{wallets:a}}=_(),l=H(),{value:c}=l.buyerIdentity,u=c?.customerProfile?.__typename==="CustomerProfile",d=c?.purchasingCompany,p=Er(),m=yv(),f=PI({availableDeliveryAddresses:l.availableDeliveryAddresses?.value,mustSelectProvidedAddress:l.mustSelectProvidedAddress?.value}),h=x(()=>{const v={shouldResetBuyerInfo:!1,shouldRemoveWalletContent:!1,shouldRemoveBillingAddress:!1,forceClearLocalPickupFields:!1},P=i.value;return a.activeSession.value?{...v}:u?{...v,shouldRemoveWalletContent:P,shouldResetBuyerInfo:!P,shouldRemoveBillingAddress:!0}:P?{...v,shouldRemoveWalletContent:!0,shouldRemoveBillingAddress:!d}:p.value?{...v,shouldRemoveBillingAddress:!0,forceClearLocalPickupFields:!0}:{...v,shouldResetBuyerInfo:!0}},[a,u,i,p,d]),g=Ns(),y=Uv();return x(async({shouldPersist:v=!0}={})=>
39{const{shouldResetBuyerInfo:P,shouldRemoveWalletContent:b,shouldRemoveBillingAddress:C,forceClearLocalPickupFields:I}=h();b&&(o.value=jl(o.value,{method:{type:"wallet",name:"APPLE_PAY"}})),y.value||g({shouldResetCustomerInfo:P,shouldRemovePaymentLine:!i.value,isConstrainedAddress:f}),I&&(t.value="",n.value=""),C&&(r.value=m("billing")??dl(r.value)),v&&!a.activeSession.value&&await e({silenceViolations:["non-stock"]})},[g,a,o,t,n,r,e,h,i,y,m,f])}function b$({shouldPersist:e}){const t=nP(),{walletUsedForSubmissionSignal:n,persistedApplePaySignal:r,inMemoryApplePayParts:{paymentSheetError:o,subscriptionReviewTransition:i}}=Ye();return x(()=>{o.value=void 0,i.value=void 0,n.value=void 0,r.value={},t({shouldPersist:e})},[o,i,n,r,t,e])}function P$(){const e=b$({shouldPersist:!1}),{clearError:t,hasError:n}=Qb(),{checkout:r,router:o}=_(),{clearForcedCheckoutLayout:i}=ws(In),a=x(()=>{e(),i({wallet:"APPLE_PAY"}),r.unstable_evaluateSupportsSplitShipping(o.currentUrl.value),n&&t()},[e,r,i,o,t,n]);return uu({onClick:a,shouldResetCustomerInfo:!1,shouldRemovePaymentLine:!1,skipRedirect:!0})}function S$(){const{i18n:e}=_(),{onClick:t}=P$(),n=e.translate("wallets.errors.processing_error_checkout_as_guest",{checkout_as_guest_link:s(ut,{onClick:t,children:e.translate("account_management.checkout_as_guest_link")})});return s(_n,{errorType:st.PaymentError,tone:"critical",children:s(Q,{alignItems:"start",gap:"small-500",children:s(je,{children:n})})})}function E$(){const{inMemoryAmazonPayParts:{buyerDetails:e,buyerDetailsContentLoaded:t}}=Ye(),n=ze("shippingAddress");return w(()=>t.value&&!e.value.loading&&!n.value)}function Wm(e){const t=E$(),{hasViolations:n,violations:r}=G0(e);if(!n||!t.value)return null;const o=new Set;for(const i of r)o.add(i.localizedMessage??i.nonLocalizedMessage);return Array.from(o)}function C$({ignorePrefixes:e}={ignorePrefixes:[]}){const{i18n:t}=_(),n=Wm(new Set([...SI].filter(o=>e.every(i=>!o.startsWith(i))))),r=Wm(new Set([...Kr,...Eh].filter(o=>e.every(i=>!o.startsWith(i)))));return n?{errors:[t.translate("shipping_errors.shipping_method_not_available_generic.one")],type:"no delivery strategy"}:r?{errors:r,type:"invalid address"}:{errors:null,type:null}}function rP(){return C$({ignorePrefixes:["DELIVERY_PHONE_NUMBER","DELIVERY_COMPANY"]}).errors??[]}function k$(){const{i18n:e}=_(),t=rP();return t?.length?s(_n,{tone:"critical",errorType:st.PaymentError,children:[e.translate("wallets.errors.select_different_shipping_address_to_resolve_errors"),s(ju,{children:t.map(n=>s(Yu,{children:s(G,{children:n})},n))})]},"amazon-pay-errors"):null}function I$(e="unknown"){const{observability:t}=_();F(()=>{t.counter({name:"WalletsPlatform_buy_with_prime_prime_unavailable_detour_count",value:1,attributes:{reason:e}}),t.log("use_mark_prime_not_available_shown",`Buy with Prime is not available because ${e}`,{cause:e,severity:"warning"})},[])}function oP(){const e=Ku(),t=We(rP()),{persistedAmazonSignal:n,inMemoryAmazonPayParts:{hasPaymentSheetError:r}}=Ye();return w(()=>{const o=n.value;return!o?.primeError&&!e.value?null:o?.primeError?"terminal error":r.value?"payment sheet error":t.value?.length?"amazon pay error messages":null})}function A$(){const e=oP();return e.value?s(T$,{errorMessagesType:e.value}):null}function T$({errorMessagesType:e}){const{i18n:t,checkout:n}=_(),r=n.configuration.layout.isOnePage.value,{value:o}=H().paymentLines,{persistedAmazonSignal:i}=Ye();return I$(),F(()=>{o?.lines.filter(l=>!(l.method.type==="walletsPlatformPaymentMethod"&&l.method.name===xe.BuyWithPrime))?.length&&Xb(i,{primeError:void 0})},[o,i]),e==="payment sheet error"||e==="terminal error"?s(_n,{errorType:st.PaymentError,tone:"critical",children:t.translate("wallets.errors.generic",{walletName:t.translate("brand.buy_with_prime")})},"amazon-pay-errors"):e==="amazon pay error messages"?r?null:s(k$,{}):w$()}function w$(e){return null}function Ju({errors:e,errorType:t}){return s(q,{children:e.map(n=>s(_n,{tone:"critical",errorType:t,children:n.messageNode??n.message},`${n.target}${n.message}`))})}function L$(e){if(e.startsWith("DISCOUNTS")||e==="ReductionViolations")return st.DiscountError;switch(e){case"NOTE_LENGTH_EXCEEDS_MAXIMUM":case"PROPOSAL_LINE_ITEM_LIMIT_REACHED":case"MERCHANDISE_LINE_LIMIT_REACHED":case"MERCHANDISE_QUANTITY_RULES_INCREMENT_NOT_MET":case"MERCHANDISE_QUANTITY_RULES_MINIMUM_NOT_MET":case"MERCHANDISE_QUANTITY_RULES_MAXIMUM_EXCEEDED":case"MERCHANDISE_CART_UPDATED_BASED_ON_COUNTRY":case"MerchandiseQuantityRulesNotMet":return st.MerchandiseError;case"PAYMENTS_SHIPPING_MUST_MATCH_BILLING":case"ShippingAddressIsMissing":case"DeliveryViolations":case"DeliveryAddressValidationErrors":return st.DeliveryError;case"PAYMENTS_WALLET_PAYPAL_EXPRESS_ADDRESS_INVALID":case"PAYMENT_MANUA
39L_PAYMENTS_NOT_ALLOWED_FOR_B2B":case"PaymentViolations":return st.PaymentError;default:return st.CheckoutError}}function R$(){const e=p$();return e.length>0?e.map(t=>s(Hb,{notice:t,errorType:L$(t.code)},t.code)):null}function x$(){const{globalErrors:e}=Os().value;return e.length>0?s(Ju,{errors:e,errorType:st.CheckoutError}):null}function M$(){const{merchandiseLineTransformerErrors:e}=GG().value;return e.length>0?s(Ju,{errors:e,errorType:st.MerchandiseError}):null}function N$(){const{contactErrors:e}=Os().value,t=uo();return e.length===0?null:t.value.contact?s(Ju,{errors:e,errorType:st.ContactError}):null}function D$(){return!!oP().value?s(A$,{}):null}function O$(){const{hasError:e}=m$(),t=f$();return e&&!t?s(N4,{}):null}function F$(){const{hasError:e}=Qb();return e?s(S$,{}):null}function B$(){const{giftCardBannerErrors:e}=Ys(),{value:t=[]}=H().allViolations,r=_().checkout.configuration.layout.isOnePage.value?void 0:e?.[0],o=t.find(i=>i.code==="PAYMENTS_GIFT_CARDS_UNAVAILABLE");return o?s(_n,{errorType:st.DiscountError,tone:"critical",children:o.localizedMessage}):r?s(_n,{errorType:st.DiscountError,tone:"critical",children:r}):null}const V$=()=>{const{isAppLayout:e}=Wu(),{embed:t,checkout:n}=_(),r=n.configuration.layout.isOnePage.value,{lineItems:{priority:o="base"}}=rt(),i=[R$(),x$(),M$(),N$(),D$(),O$(),B$(),F$()].filter(Boolean);if(i.length===0)return null;const c=e?"none large-200 base large-200":r?"none none base none":"none",d=!!t?.isFlagshipPartner&&o==="high"?"none none small-100 none":"none";return s(Q,{gap:"small-200",padding:`@media (inline-size >= extraSmall) ${d}, ${c}`,children:i})},Ml=Jn(function({section:t="top"}){return{toast:s(T4,{}),top:s(V$,{}),reductions:s(I4,{}),delivery:s(E4,{}),payment:s(C4,{})}[t]});function U$(e){const{source:t}=_(),n=t.type==="simulated",r=V(null),{allRenderedSections:o,getRenderedSection:i}=xt(),a=i({sectionId:e}),l=a.value;return F(()=>{if(!(!n||!r?.current)){if(!l.rendered&&r?.current){a.value={rendered:!0};const c=o.value;o.value={...c,[e]:!0}}return()=>{if(l.rendered){a.value={rendered:!1};const u={...o.value};e in u&&delete u[e],o.value=u}}}},[n,r,l,e,a,o]),B(()=>({sectionRef:r}),[r])}function z$({sectionId:e,children:t}){const{source:n}=_(),r=n.type==="simulated",{sectionRef:o}=U$(e);return r?s(q,{children:[s("div",{ref:o,style:{display:"none"}}),t]}):s(q,{children:t})}const H$={id:"18855ddcbbe672966b615922c0349b29db289bb4e82c4444a93b2c3bfed688bb",type:"mutation",name:"UserDiscountDelete",source:"mutation UserDiscountDelete($code:String!,$shopifyDomain:String!){userDiscountDelete(code:$code,shopifyDomain:$shopifyDomain){userErrors{field message __typename}__typename}}"};function q$(){const{graphql:{shopPayGraphql:e},shop:{myshopifyDomain:t}}=_();return x(async n=>{const{data:r,error:o}=await e.mutate(H$,{variables:{code:n,shopifyDomain:t}});if(o||!r?.userDiscountDelete)return{status:"failed"};const{userDiscountDelete:i}=r;return i.userErrors.length>0?{status:"failed",errors:i.userErrors}:{status:"success"}},[e,t])}function G$(){const{negotiate:e}=Mt(),{handleNegotiationErrors:t,discountCodeWarning:n}=Ys(),{discountLines:r,reduction:o}=se(),{shop:i,source:a,checkout:l,userEvents:c,shopPay:u}=_(),d=u.user.wallet.value,p=q$(),[m,f]=oe(!1),[h,g]=oe(""),y=u.user.shopAccountUuid,v=x((k,E)=>
39{c.monorailEvent({schemaId:"shopify_pay_login_with_shop_sdk_discount_wallet_events/2.0",payload:{...Gn(a,l,i),action:k,shopAccountUuid:E,shopPermanentDomain:i.myshopifyDomain,discountCode:h}})},[c,a,l,i,h]),P=x(async k=>{(await p(h)).status==="success"&&v("invalidated - discount had been deleted",k)},[p,v,h]),[b,C]=oe(()=>r.value.length?"open":"closed"),I=x(k=>{const E=["InputValidationError","UnprocessableTermViolation","RemoveTermViolation"],T=new Set([...Lo,"DISCOUNTS_CUSTOMER_USAGE_LIMIT_REACHED","DISCOUNTS_USAGE_LIMIT_REACHED",Ko]);return k.some(A=>E.includes(A.type)&&T.has(A.code))},[]),S=x(k=>{const E=["InputValidationError","UnprocessableTermViolation","RemoveTermViolation"],T=["DISCOUNTS_PURCHASE_NOT_IN_RANGE","DISCOUNTS_QUANTITY_NOT_IN_RANGE","DISCOUNTS_NO_ENTITLED_LINE_ITEMS"];return k.some(A=>E.includes(A.type)&&T.includes(A.code))},[]);return F(()=>{g(d.latestDiscount?.code??""),h&&C("negotiating_app_discount")},[h,d]),F(()=>{r.value.length===0&&C(k=>k==="negotiating_app_discount"?k:n?"open":"closed")},[n,r.value.length]),F(()=>{const k=h;if(!m&&b==="negotiating_app_discount"&&k){f(!0),o.value={code:k};const E=y.value;e({onComplete:async T=>{if(f(!1),T.status==="success"||T.status==="error"){const A=T.negotiated.discountLines?.lines.some(R=>R.discount.title.toLowerCase()===k?.toLowerCase());h&&(t(T.errors),A?v("applied",E):I(T.errors)?P(E):S(T.errors)&&v("failed to apply - invalid cart",E),o.value=void 0),C(A||n?"open":"closed")}},force:!0})}},[m,t,n,e,h,b,I,v,S,P,c,o,y.value]),{discountLines:r.value,formStatus:b,setFormStatus:C,walletDiscountCode:h}}function $$({children:e}){const{formStatus:t}=G$();return t==="negotiating_app_discount"?s(Pe,{inlineAlignment:"center",children:s(no,{})}):s(q,{children:e})}function Xu(){const{source:e}=_(),t=H().canUpdateDiscountCodes;return w(()=>(t.value??!0)&&!nt(e))}function iP(){const e=H(),t=e.paymentFlexibilityPaymentTermsTemplate,n=On(),r=e.paymentMethods;return w(()=>e.buyerIdentity.value?.purchasingCompany&&(t.value||n.value)?!1:r.value?.some(o=>o.type==="giftCard"))}function W$(){const{i18n:e,shop:{discountCodesEnabled:t}}=_(),n=Xu(),r=iP();return w(()=>{const o=t&&n.value;return r.value&&o?{label:e.translate("order_summary.gift_card_and_discount_label"),placeholder:e.translate("order_summary.gift_card_and_discount_placeholder"),title:e.translate("order_summary.gift_card_and_discount_title")}:r.value?{label:e.translate("order_summary.gift_card_label"),placeholder:e.translate("order_summary.gift_card_placeholder"),title:e.translate("order_summary.gift_card_title")}:o?{label:e.translate("order_summary.discount_label"),placeholder:e.translate("order_summary.discount_placeholder"),title:e.translate("order_summary.discount_title")}:{label:"",placeholder:"",title:""}})}const Y$=e=>typeof e=="string"||typeof e=="number"?e.toString():ph(e)?e.message:kh(e)?e.textValue:"";function j$({children:e,state:t,errors:n}){const r=zb(),o=qg(),i=V([]);return F(()=>{const a=i.current;return Object.entries(n).forEach(([l,c])=>{a.push(c.subscribe(u=>{if(!u)return;const d=r(l),p=t[l]?.value??"",m=p?st.InputInvalid:st.InputRequired,f=Y$(u);o({target:d,errorType:m,value:p,message:f,timestamp:new Date})}))}),()=>{a.forEach(l=>l()),i.current=[]}},[]),e}const K$="Vejp3",Ym={bannerMessage:K$};function jm({messages:e}){const t=r=>r==null?null:s("span",{dangerouslySetInnerHTML:{__html:r}}),n=r=>s(Cr,{children:r.messageHtml?t(r.messageHtml):r.message});return e.length===1?s("div",{className:Ym.bannerMessage,children:n(e[0])}):s(ju,{children:e.map(r=>s(Yu,{children:s("div",{className:Ym.bannerMessage,children:n(r)})},r.id))})}function J$(e,t){return t?[...e.reduce((r,o)=>{const i=r.get(o.tone)??{tone:o.tone,linkedMessages:[]};return i.linkedMessages.push({...o}),r.set(o.tone,i)},new Map).values()]:e.map(r=>({tone:r.tone,linkedMessages:[r]}))}function X$(e){return[...[...e.reduce((r,o)=>r.set(o.discountCode.toLocaleUpperCase(),o),new Map).values()].reduce((r,o)=>r.set(o.message.toLocaleUpperCase(),o),new Map).values()]}function Q$(e){return e.reduce((n,r)=>(n.add(r.discountCode.toLocaleUpperCase()),n),new Set).size}const Km=Jn(function({removeBanner:t,messages:n,grouped:r=!1}){const{i18n:o}=_(),i=B(()=>J$(n,r),[n,r]),a=x((l,c)=>{const u=l.filter(({isConfirmChangeViolation:d})=>d).length;return u===l.length?o.translate("payment.discount_codes_modified_summary",{count:c}
39):u>0?o.translate("payment.discount_codes_removed_or_modified_summary",{count:c}):o.translate("payment.discount_codes_removed_summary",{count:c})},[o]);return n.length===0?null:s(Kc,{target:"cart.discountCode",children:i.map(({tone:l,linkedMessages:c})=>{if(c.length===0)return null;const u=["critical","warning"].includes(l),d=c.map(({id:g})=>g),p=X$(c),m=Q$(c),f=p.length>1,h={iconHidden:!0,onDismiss:()=>t(d),dismissible:!0,tone:l,collapsible:f,heading:f?a(p,m):void 0};return u?s(_n,{...h,errorType:st.DiscountError,children:s(jm,{messages:p})},d[0]):s($s,{...h,children:s(jm,{messages:p})},d[0])})})});var Qa={Chip:"_14brw1 _14brw0 _1fragempf _1fragemnm _1fragemt6 _1fragemrd _1fragem13d _1fragemzg _1fragem11x _1fragemzi",Icon:"_14brw2",Label:"_14brw3"};function Z$({accessibilityLabel:e,children:t,graphic:n,id:r}){const o=Et(t);return s("div",{className:Qa.Chip,id:r,children:[s(Q,{columnGap:"small-400",alignItems:"center",direction:"inline",children:[n&&s("span",{className:o?Qa.Icon:void 0,children:s(Me,{type:n})}),o&&s("span",{className:Qa.Label,children:s(G,{accessibilityVisibility:e?"hidden":void 0,dir:"auto",children:s(_i,{children:t})})})]}),e&&s(G,{accessibilityVisibility:"exclusive",dir:"auto",children:e})]})}var Nn={ClickableChip:"_14gomm21 _14gomm20 _1fragemeg _1fragemdw _1fragemf0 _1fragemdc _1fragem64 _1fragem13d _1fragemzg _1fragemzi",disabled:"_14gomm23 _14gomm22 _1fragemyb _1fragem11v _1fragem11z",hidden:"_14gomm27 _14gomm26 _1fragem6y",linkStyles:"_14gomm29 _14gomm28 _1fragem128",outlineStyles:"_14gomm25 _14gomm24 _1fragemyk",RemoveButton:"_14gomm2b _14gomm2a _1fragempf _1fragemnm _1fragemt6 _1fragemrd"};const eW=ci(at(function({accessibilityLabel:t,children:n,disabled:r=!1,graphic:o,hidden:i=!1,href:a,id:l,removable:c=!1,removeTrackingEvent:u,onAfterHide:d,onClick:p,onMouseEnter:m,onMouseLeave:f,onFocus:h,onBlur:g,onRemove:y,"aria-describedby":v},P){const b=Bn(),C=ln(),I=V(i);F(()=>{!I.current&&i&&d?.(),I.current=i},[i,d]);const S=Y(Nn.ClickableChip,{[Nn.disabled]:r||b,[Nn.hidden]:i}),k=t?C("removeItem",{label:t}):C("removeChip");return s("div",{id:l,className:S,role:"group",children:[s(tW,{"aria-describedby":v,disabled:r,href:a,inert:b,onClick:p,onMouseEnter:m,onMouseLeave:f,onFocus:h,onBlur:g,ref:P,removable:c,children:s(Z$,{accessibilityLabel:t,graphic:o,children:n})}),c&&s("button",{"aria-hidden":b?!0:void 0,"aria-label":k,className:Y(Nn.RemoveButton,Nn.outlineStyles),"data-event-name":u,disabled:r,tabIndex:b?-1:void 0,type:"button",onClick:()=>!(r||b)&&typeof y=="function"?y():void 0,children:s(Me,{type:"x",size:"small"})})]})})),tW=at(function({children:t,disabled:n,href:r,inert:o,removable:i,onClick:a,onMouseEnter:l,onMouseLeave:c,onFocus:u,onBlur:d,"aria-describedby":p},m){const f=Wr(m),h=n??o??!1,g=h?void 0:r,y=()=>!h&&typeof a=="function"?a():void 0,v={onMouseEnter:l,onMouseLeave:c,onFocus:u,onBlur:d};return!g&&!a&&i?s("div",{className:Nn.outlineStyles,ref:f,children:t}):g?s(_s,{"aria-describedby":p,className:Y(Nn.outlineStyles,Nn.linkStyles),href:g,onClick:y,ref:f,...v,children:t}):s("button",{"aria-describedby":p,"aria-hidden":o?!0:void 0,className:Nn.outlineStyles,disabled:n,onClick:y,ref:f,tabIndex:o?-1:void 0,type:"button",...v,children:t})}),nW="pxf3N",rW={TagContainer:nW};function oW({reductionTags:e,headingId:t}){const{i18n:n}=_(),r=Xu(),o=Ib(),{removeDiscount:i,removeGiftCard:a}=Ys({headingId:t});if(e.length===0)return null;let l=0;const c=e.map(d=>d.hideLabel?(l+=1,l):0),u=l;return s(Q,{direction:"inline",gap:"small-300",accessibilityRole:"unordered-list",accessibilityLabel:n.translate("order_summary.gift_card_and_discount_label"),ref:o,children:e.map((d,p)=>{const m=d.hideLabel?n.translate("order_summary.discount_title"):d.code,f=d.originType==="giftCard"?n.translate("order_summary.gift_card_masked",{last_characters:d.code.slice(-4)}):m;let h=f;d.originType==="giftCard"?h=n.translate("order_summary.gift_card_ending",{last_characters:d.code.slice(-4)}):d.hideLabel&&u>1&&(h=n.translate("order_summary.discount_title_with_position",{position:c[p]}));const g=d.originType==="giftCard"?"giftFill":"discount",y=d.originType==="giftCard"?"remove_gift_card":"remove_discount_code",v=d.originType==="discountCode"&&!r.value?void 0:()=>{d.originType==="discountCode"?i(d.code):a(d.code)},b=d.originType==="automatic"?`automatic-discount-tooltip-${p}`:void 0;return s(Pe,{accessibilityRole:"list-item",className:rW.TagContainer,children:[s(eW,{accessibilityLabel:h,graphic:g,id:`tag-${p}`,interestFor:b,removable:!b,onRemove:v,removeTrackingEvent:y,children:f.toUpperCase()}),b&&s(Sn,{id:b,children:n.translate("order_summary.automatic_discount_tooltip")})]},`${d.originType}-${d.code}`)})})}const iW="C4Wzv",sW="wMyvq",Jm={TagListButtonContainer:iW,TagListExpandButton:sW};function aW({headerLevel:e,monorailSection:t,autoFocus:n,autoScroll:r}){return s(ly,{children:s(Kc,{target:"cart",children:s(uW,{headerLevel:e,monorailSection:t,autoFocus:n,autoScroll:r})})})}
39const lW=et("ReductionsInput"),cW=et("ReductionsHeading");function uW({headerLevel:e,monorailSection:t,autoFocus:n,autoScroll:r}){const{i18n:o,shop:{discountCodesEnabled:i,giftCardsEnabled:a},checkout:l}=_(),c=l.identity.current.value==="shopPay",u=Je(),d=l.configuration.layout.isOnePage.value,{reductions:{applyButtonPosition:p,discountTagsDisplay:m,automaticTagsDisplay:f,position:h,spacing:g}}=Fe(),y=St(),v=ms({base:!0,medium:!1}),P=y.value?v??!1:!0,b=Le(!1),C=x(()=>{b.value=!b.value},[b]),I=Xu(),S=co(),{control:{labelPosition:k="inside"}}=rt(),{reductions:{labelPosition:E=k}}=Fe(),{discountLines:T,paymentLines:A}=se(),R=T.value,M=A.value.reduce((De,pe)=>(pe.method.type==="giftCard"&&De.push({originType:"giftCard",code:pe.method.code}),De),[]),D=tP(u)&&u.shopPay.discountCodes.value.length?u.shopPay.discountCodes.value:null,N=D?[...new Set(D)].map(De=>{const pe=R.find(ot=>ot.discount.type==="code"&&ot.title===De),Re=pe?.discount.type==="code"&&!!pe.discount.codeHidden;return{originType:"discountCode",code:De,...Re?{hideLabel:!0}:{}}}):[...R.reduce((De,{discount:pe,title:Re})=>(pe.type==="code"&&!De.has(Re)&&De.set(Re,{originType:"discountCode",code:Re,...pe.codeHidden?{hideLabel:!0}:{}}),De),new Map).values()],U=R.reduce((De,{discount:{type:pe},title:Re})=>((pe==="automatic"||pe==="custom")&&De.push({originType:"automatic",code:Re}),De),[]),z=I.value?N:[],O=[...f==="hidden"?[]:U,...z,...M];O.length===0&&(b.value=!1);const K=m==="always_visible"||m==="base"&&O.length>0&&(!P||b.value);let X=!1;u.lastJourneyProgression.value.type==="error"&&u.lastJourneyProgression.value.negotiationStage==="completion"&&(X=Zb(u.lastJourneyProgression.value.errors));const ne=Ke(void 0,lW),$=Ke(void 0,cW),J=ks({active:X});F(()=>{r&&J.current&&J.current.scrollIntoView({behavior:"smooth"})},[r,J]);const{currentDetour:ee,currentPage:te}=Ce().value,W=it("Checkout::Reductions::RenderBefore"),he=it("Checkout::Reductions::RenderAfter"),re=i&&I.value,de=iP(),le=a&&de.value,{loading:_e,reductionCodeField:ae,dirty:ge,setDirty:ke,handleSubmit:we,discountCodeWarning:Ie,discountMessages:j,removeDiscountCodeWarnings:Z,removeDiscountCodeMessage:fe}=Ys({inputRef:J,headingId:$,monorailSection:t});F(()=>{if(Ie&&Ie.length>0){const De=Ie[0].message.trim();return De?Lt({content:De,role:"status"}):void 0}},[Ie]);const{label:be,title:Te,placeholder:Se}=W$().value,Ae=B(()=>({state:{discountCode:ae.valueSignal},errors:{discountCode:ae.errorSignal}}),[ae]);if(ee&&ee.type!=="shopPayLogin")return null;const Ue=Ie?s(Km,{messages:Ie,removeBanner:Z,grouped:!0}):null,ce=j&&j.length?s(Km,{removeBanner:fe,messages:j}):null,ie=p==="base",me=e!=null&&h==="base"&&E==="outside"&&Te===be,Ne=!ie&&E==="outside"&&!me,Ge=m==="base"&&P&&O.length>0?s(Pe,{colorLayer:"control",className:Jm.TagListButtonContainer,children:s(Tn,{className:Jm.TagListExpandButton,onClick:C,accessibilityLabel:o.translate("order_summary.discount_code_applied_count",{count:O.length}),"data-event-name":b.value?"discount_tags_hide":"discount_tags_show",border:"base",children:s(Q,{paddingInline:"small-300",direction:"inline",gap:"small-400",alignItems:"center",children:[s(Me,{type:"discount",tone:"monochrome"}),s("strong",{children:O.length})]})})}):null,lt=ie?s(an,{variant:"primary",type:"submit",loading:_e,disabled:!ge,accessibilityLabel:o.translate("payment.discount_button_action_label"),"data-event-name":"apply_discount",ref:S("apply_discount"),children:o.translate("order_summary.apply_discount_button_label")}):void 0;let Ft=ae.error;ie||(Ft=ae.error?!0:void 0);const kt=s(K_,{ref:J,id:ne,name:"reductions",label:be,placeholder:Se,...ae,error:Ft,onInput:De=>ke(De.length>0),autoFocus:n,accessoryStart:Ge,accessoryEnd:lt,labelPosition:Ne?void 0:E,labelAccessibilityVisibility:Ne||me?"exclusive":void 0}),cn=s(Pe,{children:[s(Q,{gap:"base",children:[s(c4,{onSubmit:we,children:ie?kt:s(q,{children:[Ne&&s(q,{children:[s(Ll,{variant:"outside",htmlFor:ne,label:be}),s(Vt,{blockSize:"small-400"})]}),s(Q,{gap:"small-300",children:[s(gt,{gap:EI(["small400",g??"small100"]),gridTemplateColumns:"minmax(0, 1fr) minmax(auto, max-content)",gridAutoColumns:"1fr",gridTemplateRows:"minmax(auto, max-content)",gridAutoRows:"minmax(auto, max-content)",children:[kt,s(an,{variant:"primary",type:"submit",loading:_e,disabled:!ge,accessibilityLabel:o.translate("payment.discount_button_action_label"),"data-event-name":"apply_discount",ref:S("apply_discount"),children:d?o.translate("order_summary.apply_discount_button_label"):s(q,{children:[s(Um,{below:"medium",children:o.translate("order_summary.apply_discount_button_label")}),s(Um,{above:"small",children:s(Me,{type:"arrow-right"})})]})})]}),ae.error?s(Lu,{controlID:ne,children:ae.error}):null]})]})}),Ue,ce]}),s(gn,{id:"reduction-tags",open:K,duration:"fast",children:s(Pe,{paddingBlockStart:O.length>0?"base":void 0,children:s(oW,{reductionTags:O,headingId:$})})})]});return s(q,{children:[s(gn,{id:"gift-card-field",open:le||re,duration:"fast",children:s(kr,{children:[s(Wt,{id:$,tabIndex:-1,...e?{level:e}:{visibility:"hidden"},children:Te}),e&&s(Vt,{blockSize:"base"}),s(Q,{gap:"base",children:[s($t,{customizations:W}),s(z$,{sectionId:"reductions",children:c&&d?s($$,{children:cn}):s(j$,{...Ae,children:cn})}),s($t,{customizations:he}),l.configuration.showPayButton&&re&&(d||te?.id==="payment")&&s(p4,{targetSelector:"#checkout-pay-heading",icon:"credit-card",label:o.translate("order_summary.discount_discovery.back_to_finalize_order")})]})]})}),!le&&!re&&s(Ml,{section:"reductions"})]})}const Xm=e=>s(kr,{children:e});function ts({skipWrappingSection:e=!1,hideMerchandiseLines:t=!1,hideAccessibilityTitle:n=!1,monorailSection:r="order_summary",hideReductions:o=!1,reductionsFieldAutoFocus:i=!1,reductionsFieldAutoScroll:a=!1}){const{ready:l}=s4("chat"),{i18n:c,checkout:u,checkout:{configuration:{allowEmptyCart:d,visibility:p,layout:m}}}=_(),f=p.showReductions&&!o,h=m.isOnePage.value,{currentDetour:g}=Ce().value,y=g?.type==="thankYou",v=B(()=>y?"Checkout::ThankYou::Dynamic::Render":"Checkout::Dynamic::Render",[y]),P=it(v,"ORDER_SUMMARY3"),b=it("Checkout::Dynamic::Render","ORDER_SUMMARY4"),C=ms({base:!0,medium:!1}
39),I=St(),S=h&&(I.value?C:!0),k=Hs(),E=u.proposal.facts.merchandiseLines??[];if(h&&!d){const A=[];for(const R of k.value.values())A.push(...R);if(A.push(...E),a4(A))return s(je,{textAlign:"center",children:c.translate("stock.empty_cart_label")})}return s(e?q:kr,{...!e&&{containerName:"s-shell-section"},children:[s(Q,{gap:"large-200",children:[!n&&s(Wt,{visibility:"hidden",children:c.translate("order_summary.title")}),!t&&s(yq,{}),f&&s(aW,{monorailSection:r,autoFocus:i,autoScroll:a}),!y&&s($t,{customizations:P,gap:"large-200",render:Xm}),s(t4,{}),(!S||y)&&s($t,{customizations:y?P:b,gap:"large-200",render:Xm})]}),s(ve,{when:l,children:s(Pe,{minBlockSize:`@media (inline-size >= medium) ${$u}px, 0`})})]})}function dW(){const e=_();return w(()=>zy(e))}function pW(){const{checkout:e}=_();return e.unstable_graphqlDataRequestInfo?.checkoutSheetProtocolConfig??null}function mW(){const{mobileCheckoutSdk:e,embed:t}=_(),n=dW(),r=pW(),o=Ce();return w(()=>!n.value&&!e.enabled&&!t?.isCheckoutKit()?!0:e.enabled&&e.variant.isStandard()||t?.isCheckoutKit()?o.value.currentDetour?.type==="thankYou":!!r?.disclosureEnabled)}function fW(){const{embed:e,checkout:t}=_(),n=!!(e?.platformCategory&&e.platformCategory!=="WEB"),r=e?.platformCategory==="WEB"&&t.configuration.payButton.stickyPayButtonEnabledInWeb,o=n&&t.configuration.payButton.stickyPayButtonEnabledInMobile;return r||o}function Qu(){const{checkout:e,embed:t,shopPay:n}=_(),{progressing:r}=Mt(),o=Ce(),{submitting:i}=Ot();return w(()=>{if(t?.isFlagshipPartner&&i.value||e.isRedirectingExternally.value||e.checkoutExit.isExiting.value)return!0;const{currentPage:l,plan:c}=o.value,u=l&&c.greenPath[c.greenPath.length-1]?.id===l.id;let d=r.value||n.session.isButtonProgressing.value;return l!==void 0&&(d=d&&!!u),d})}function hW(e={}){const[t,n]=oe(null),[r,o]=oe(null),i=V(null),a=x(l=>{if(i.current?.disconnect(),i.current=null,!window.IntersectionObserver||!l){n(null),o(null);return}const c=new IntersectionObserver(u=>{n(u[0])},e);c.observe(l),i.current=c,o(c)},[e.root,e.rootMargin,e.threshold]);return{entry:t,observer:r,ref:a}}function sP(){const e=Is(),{checkout:t,embed:n}=_(),r=rb(),{payNowButtonElement:o}=Ds(),i=zt(n?.embedder),{entry:a,ref:l}=hW({threshold:.5});F(()=>(l(o??null),()=>l(null)),[o,l]);const c=We(a?.isIntersecting);return w(()=>!!(!i&&(t.isRedirectingExternally.value||!e.value&&!t.wallets.activeSession.value&&!r.value&&!c.value)))}function aP(e){return e.status==="available"&&e.methods.some(({methodType:t})=>t==="SHIPPING"||t==="LOCAL")}function oj(){const e=sc();return w(()=>{const t=e.value?.filter(aP);return{shippableDeliveryLines:t?.length?t:void 0}})}function Vi(e){return e?e.status==="unavailable"||e.status==="partial"||e.status==="filled"&&!e.lines.some(aP):!1}function gW({deliveryNext:e,proposedAddress:t,negotiatedAddress:n,reloadStrategy:r}){if(!Vi(e))return!1;const o=Cb(r)?n??t:t;return lh(o)}const yW={initial:{addressInvalid:"empty",addressComplete:"loading",addressReplaced:"loading",countryChanged:"resetting"},empty:{addressComplete:"loading",addressReplaced:"loading",countryChanged:"resetting",reset:"loading"},resetting:{reset:"initial"},loading:{addressComplete:"loading",addressInvalid:"empty",negotiationResolved:"negotiated",countryChanged:"resetting",addressReplaced:"loading"},negotiated:{addressComplete:"loading",addressInvalid:"loading",addressReplaced:"loading",countryChanged:"resetting",addressReset:"resetting",deliveryMethodChanged:"initial"}};function vW(e,t){return Ul((n,r)=>{const o=yW[n.status][r];if(o)return{status:o};t.leaveErrorBreadcrumb("[ShippingMethods] Invalid transition",{prevState:n.status,action:r})},{status:e})}function _W(e,t){const{deliveryMethodsAddressErrors:n,deliveryMethodTimingSignal:r}=xt(),{parts:o}=Je(),{shippingAddress:i}=o,{observability:a,checkout:{wallets:l},checkout:c,shop:{shippingCountries:u}}=_(),d=c.configuration.isAddressDelegationEnabled,p=i.fields.countryCode.value,m=my(p,u),{loading:f}=Yt(p),{negotiate:h}=Mt(),{setAddressError:g}=eu(n),y=B(()=>CI(),[]),{resetAddressSuggestions:v}=jR(y,n),P=tu(p),b=bW(e),C=wg(),I=B(()=>It(()=>{const T=C({countryCode:i.fields.countryCode.value,zoneCode:i.fields.zoneCode.value});return YH(T)}),[C,i.fields.countryCode,i.fields.zoneCode]),S=V();F(()=>{f||(S.current?.(),S.current=void 0)},[f]);const k=uc(()=>{const T=i.peek();if(f){S.current=()=>k();return}const A=m(T),R=I.peek(),L=Za(R,A,T);b.peek()!=="addressReplaced"&&(L.size===0?t("addressComplete"):t("addressInvalid"))},NL);UL(i,()=>{t("countryChanged"),i.fields.postalCode.value=void 0,i.fields.zoneCode.value=void 0,i.fields.city.value=void 0,i.fields.address1.value=void 0,i.fields.address2.value=void 0,t("reset")});const E=B(()=>It(()=>I.value.filter(A=>A!=="countryCode").map(A=>{const R=i.fields[A].value;if(R)return A==="postalCode"?R.replace(/[^a-z0-9]/gi,"").toLowerCase():R.toLowerCase()}
39).join("_")),[i.fields,I]);F(()=>{let T=!1;const A=e.value.status;return(A==="initial"||A==="empty")&&k(),E.subscribe(()=>{if(T){if(l.activeSession.value||b.value==="addressReplaced"||e.value.status==="resetting")return;k()}T=!0})},[l,k,e,b,i,E]),bs(e,({previousState:T,action:A,nextState:R})=>{if(a.leaveErrorBreadcrumb("Shipping methods state transition:",{prevState:T.status,action:A,nextState:R.status}),R.status==="initial"&&k(),R.status==="loading"&&r.peek()===0&&(r.value=Date.now()),A==="reset"){const M=i.peek();for(const D of Object.keys(M))D==="phone"&&il(M.phone)||g(D,void 0);v()}const L=kd(e);if(A==="addressComplete"||A==="reset"||A==="addressReplaced"||A==="addressInvalid"&&(T.status==="negotiated"||d)){if(d){const M=i.peek(),D=m(M);if(D.size>0){for(const[N,U]of D)n[N].peek()===void 0&&g(N,{message:U,origin:"client",type:"inline-validation"});t("addressInvalid"),t("negotiationResolved");return}else for(const[N,U]of Object.entries(n)){const z=U.peek();z&&typeof z=="object"&&z.origin==="client"&&z.type==="inline-validation"&&g(N,void 0)}}a.leaveErrorBreadcrumb("[ShippingMethods] Negotiation started"),h({silenceViolations:["all"],include:[],fieldsToResolve:["deliveryNext"],onComplete(M){const D=L!==kd(e);if(a.leaveErrorBreadcrumb("[ShippingMethods] Negotiation onComplete called",{result:M.status,stale:D}),!D){if(M.status==="stale"||M.status==="invalid"){t("negotiationResolved");return}if(!(A==="reset"||!M)&&(M.status==="success"||M.status==="error")&&"violations"in M){const N=M.negotiated.deliveryNext?.status==="filled";if(A!=="addressReplaced"){const O=lP(n);if(Za(I.peek(),O,i.peek()).size>0)return t(N?"negotiationResolved":"addressInvalid")}const U=P("shipping_address",M.violations),z=A==="addressReplaced"?U:Za(I.peek(),U,i.peek());for(const[O,K]of z)n[O].peek()===void 0&&g(O,K);N||z.size===0?t("negotiationResolved"):t("addressInvalid")}}}}).catch(()=>t("negotiationResolved"))}})}function bW(e){const t=Le();return bs(e,({action:n})=>{t.value=n}),t}const PW=["phone","company","firstName","lastName"];function Za(e,t,n){const r=new Map;for(const[o,i]of t)if(!(o==="coordinates"||o==="name"||o==="oneTimeUse"||o==="handle")&&e.includes(o)){if(PW.includes(o)&&(!n[o]||n[o]?.length===0))continue;r.set(o,i)}return r}const lP=e=>{const t=new Map;for(const[n,r]of Object.entries(e)){const o=r.peek();kh(o)&&o.type==="error"&&t.set(n,o.textValue)}return t};function SW({children:e}){const{current:t,parts:n}=Je(),{deliveryMethodsAddressErrors:r,deliveryMethodTimingSignal:o,deliveryMethodDeltaSignal:i}=xt(),a=FL(),{observability:l,embed:c,events:u}=_(),d=B(()=>{const C=t.fields.deliveryNext.peek()?.status==="filled"?"negotiated":"initial";return vW(C,l)},[t.fields.deliveryNext,l]),p=x(b=>{d.value=b},[d]),m=V(!1);c?.isFlagshipPartner&&!m.current&&(m.current=!0,u.addEventListener("embed:address-replace",()=>{p("addressReplaced")}));const f=V(!1);f.current||(f.current=!0,u.addEventListener("wallet:address-replace",()=>{p("addressReplaced")})),_W(d,p);const h=wg(),g=w(()=>{const b=d.value.status;if(b==="resetting")return{status:"empty"};if(b==="loading")return{status:b};const C=t.fields.deliveryNext.value,I=Vi(C),S=C?.status==="filled"&&!I,k=n.shippingAddress.fields.countryCode.value,E=n.shippingAddress.fields.zoneCode.value,T=h({countryCode:k,zoneCode:E}),A=Cb(T),R=A?n.shippingAddress.peek():n.shippingAddress.value,L=I&&(b==="initial"||b==="empty"&&!A&&lP(r).size===0);return b!=="negotiated"&&!S&&!L?{status:b}:C?I?{status:gW({deliveryNext:C,proposedAddress:R,negotiatedAddress:t.fields.shippingAddress.peek(),reloadStrategy:T})?"error":"empty"}:C.status==="filled"&&S?{status:"filled",deliveryLines:C.lines}:{status:"error"}:{status:"empty"}}),y=Le(g.peek());OL(g);const v=V();F(()=>()=>{v.current&&clearTimeout(v.current)},[]),$e(()=>{const b=g.value;if(v.current&&(clearTimeout(v.current),v.current=void 0),b.status==="loading"&&(v.current=setTimeout(()=>{const I=t.fields.deliveryNext.peek(),S=I?.status==="filled"&&!Vi(I);l.counter({name:"shipping_methods_timeout",value:1,attributes:{deliveryNext:I?.status??"unknown",hasShippingMethods:S}})},3e4)),b.status==="filled"){const S=b.deliveryLines.flatMap(E=>E.status==="available"?E.methods:[]).find(E=>E.methodType==="SHIPPING"&&E.deliveryPromiseProviderApiClientId)?.deliveryPromiseProviderApiClientId,k=o.peek();if(S&&k>0){const E=Be(S),A=Date.now()-k;a(A,Number(E)),i.peek()===0&&(i.value=A)}}const C=b.status==="empty"&&d.peek().status==="negotiated"&&Vi(t.fields.deliveryNext.peek());
39(b.status==="error"||b.status==="filled"||C)&&(o.value=0)});const P=B(()=>({uiStateSignal:g,initialUiStateSignal:y,dispatch:p}),[p,g,y]);return s(Tg.Provider,{value:P,children:e})}function cP({embedder:e,isThankYouDetour:t,normalizedPath:n}){return t&&n==="/thank-you"&&!zt(e)}var dt=(e=>(e.Unavailable="unavailable",e.UnpurchasableB2B="unpurchasableB2B",e.Unpurchasable="unpurchasable",e.OutOfStock="stockProblem",e.QuantityChange="quantityChange",e.PriceChange="priceChange",e.Unshippable="unshippable",e.Unfulfillable="unfulfillable",e.Unknown="unknown",e))(dt||{});const uP={[dt.Unavailable]:{isAddressProblem:!1,isUnpurchasable:!0},[dt.UnpurchasableB2B]:{isAddressProblem:!1,isUnpurchasable:!0},[dt.Unpurchasable]:{isAddressProblem:!1,isUnpurchasable:!0},[dt.OutOfStock]:{isAddressProblem:!1,isUnpurchasable:!1},[dt.QuantityChange]:{isAddressProblem:!1,isUnpurchasable:!1},[dt.PriceChange]:{isAddressProblem:!1,isUnpurchasable:!1},[dt.Unshippable]:{isAddressProblem:!0,isUnpurchasable:!1},[dt.Unfulfillable]:{isAddressProblem:!0,isUnpurchasable:!1},[dt.Unknown]:{isAddressProblem:!1,isUnpurchasable:!1}};function EW(e){return uP[e].isAddressProblem}function dP(e){return uP[e].isUnpurchasable}function CW(){const{negotiate:e}=Mt(),t=se().merchandiseLines,n=H().merchandiseLines,{observability:r}=_(),o=x(i=>{const a=t.value;t.value=a.filter(({stableId:l})=>!i.includes(l))},[t]);return x(async i=>{const a=new Map((n.value?.lines??[]).map(c=>[c.stableId,c])),l=i.reduce((c,{problem:u,line:d})=>{if(EW(u.type))return c;const p=a.get(d.stableId);return(!p||p.quantity===0||dP(u.type))&&c.push(d.stableId),c},[]);try{l.length>0&&(o(l),await e({}))}catch(c){r.leaveErrorBreadcrumb("Failure to update merchandise lines when handling out-of-stock items",{error:c,unavailableMerchandiseIds:l})}},[n,o,e,r])}function kW(e){const t=H0(e),n=U0(e),r=z0(e),o=Kg(e),i=Jg(e),a=Yg(e),l=q0(e),c=[t,n,r,o].filter(Boolean).length>1;return a||c?l?dt.QuantityChange:dt.OutOfStock:t?dt.Unavailable:n?dt.UnpurchasableB2B:r?dt.Unpurchasable:o?dt.Unshippable:i?dt.Unfulfillable:l?dt.QuantityChange:dt.Unknown}function IW(e){return e.quantity>0}function AW(e,t){if(t?.quantity&&t?.quantity>0&&t?.quantity!==e?.quantity)return{type:dt.QuantityChange,negotiatedQuantity:t.quantity,proposedQuantity:e?.quantity}}function pP(e){return dP(e)?e:dt.OutOfStock}function TW(e,t,n){if(!n&&t)return{type:pP(e)}}function wW(e,t){if(t?.itemPrice?.amount&&e?.itemPrice?.amount!==t?.itemPrice?.amount)return{type:dt.PriceChange,negotiatedPrice:t?.itemPrice,proposedPrice:e?.itemPrice}}function LW(e,t,n){const{proposed:r,negotiated:o}=e,i=AW(r,o),a=wW(r,o),l=TW(t,r,o),c=r??o;return n.has(c.stableId)?{line:c,problem:{type:t===dt.Unfulfillable?dt.Unfulfillable:dt.Unshippable}}:o?.quantity===0?{line:c,problem:{type:pP(t)}}:a?{line:c,problem:a}:i?{line:c,problem:i}:l?{line:c,problem:l}:{line:c,problem:{type:dt.OutOfStock}}}function RW(){const{checkout:e}=_(),t=H(),{value:n=[]}=t.allViolations,{value:r}=t.merchandiseLines,o=ze("merchandiseLines").value,i=se().merchandiseLines.value,a=B(()=>r?.lines??[],[r]),l=e.proposal.negotiated.fields.canUpdateMerchandise.value??!0,[c]=oe(()=>kW(n)),[u]=oe(i),d=B(()=>Nu(u,n),[u,n]),p=B(()=>mb(u,a,n).map(g=>LW(g,c,d)),[u,a,n,c,d]),m=a.filter(({stableId:g})=>!d.has(g)).some(IW)&&l,f=!m,h=u.some(g=>{const y=a.find(({stableId:v})=>v===g.stableId);return!y||y.quantity===0||d.has(g.stableId)});return{type:c,lineItems:p,loading:o,cartEmpty:f,hasLineItemsLeftInCart:m,hasUnavailableMerchandise:h,unshippableMerchandiseIds:d}}const xW="/cdn/shopifycloud/checkout-web/assets/c1/assets/ShopLogo.3uo8wELJ.svg",MW="pJt3c",NW="yfbTW",Qm={ShopName:MW,SquareLogo:NW};function Nl({width:e}){const{header:{logo:t}}=Fe(),{embed:n,i18n:r,shop:o,shopPay:i,source:a,url:l,router:c}=_(),u=to(),d=co(),{isAppLayout:p}=Wu(),m=$v(),{brandSettings:f}=o,{lineItems:h}=RW(),g=CW();if(i.visibility.showShopPayBrandedLogo||Zn(c.currentUrl.value.search))return s("img",{src:xW,height:30,width:72,alt:""});let y=s("span",{className:Qm.ShopName,children:s(sn,{level:1,children:s(Wt,{level:1,accessibilityRole:"presentation",display:"inline",children:o.name})})});n?.isFlagshipPartner?y=s(Q,{direction:"inline",gap:"small-200",alignItems:"center",children:[f?.squareLogo?.url&&s(yb,{alt:f.squareLogo.altText||o.name,src:f.squareLogo.url,className:Qm.SquareLogo,borderRadius:"base",inlineSize:"auto"}),y]}):t?.image&&(y=s(o_,{width:e}));const v=a.type!=="simulated"&&!nt(a)&&!p&&!n;if(!(o.hasStorefront&&(v||u)))return y;const C=(o.previewReturnUrl?o.previewReturnUrl:void 0)??t?.link??a.headerLogoUrl??l.storefront(),I=r.translate("editor.navigation.store_logo_accessibility_label"),S=()=>{m.includes(C)&&c.navigate(E=>{const T=new URL(E);
39return T.searchParams.set("ce_redirect",C),T})},k=s("span",{ref:d("logo"),children:s(ut,{href:C,tone:"monochrome",textDecoration:"none",onClick:async()=>{u?S():h.length>0&&await g(h)},display:"block",children:[y,s(G,{accessibilityVisibility:"exclusive",children:I})]})});return t?.image&&t?.maxWidth?s(Pe,{maxInlineSize:`${t.maxWidth}px`,children:k}):k}const mP=qe({displayName:"AccountAvatar",suspense:!1,load:()=>ct(()=>Ve(()=>import("./VaultedContactAvatar.C3VcwZhA.js").then(e=>e.A),__vite__mapDeps([204,1,2,3,4,5,205]))),useError:E_("AccountAvatar")}),DW={small:"8px",base:"12px",large:"16px",fullyRounded:"36px",max:"9999px"},OW=200,FW=1.5,BW={base:kI(0,OW,FW,"ms")},VW={easeOut:"cubic-bezier(0.3, 0.5, 0.5, 1)"},UW={borderRadius:DW,color:wI,transitionDuration:BW,transitionTimingFunction:VW,fontFamily:AI,fontSize:II,letterSpacing:TI,lineHeight:LI};function zW(){const e=Zr(),{router:t,userEvents:n,shop:r,source:o,checkout:i,i18n:a}=_(),l=wn(),c=o.type==="simulated",u=co(),{header:{cartLink:{contentType:d="icon",image:p}={}}}=Fe(),m=lo(),f=t.currentUrl.value.normalizedPath==="/shoppay_login",h=()=>{if(i.identity.current.value==="shopPay"){if(c||f)return;n.monorailEvent({schemaId:"shopify_pay_payment_page_ui_interaction/1.2",payload:{...Gn(o,i,r),action:"return_to_cart"}});return}l("click",{element:{tagName:"a",textContent:g},section:"header",timestamp:new Date,transmitImmediately:!0})},g=a.translate("general.cart");let y;if(d==="text")y=g;else if(d==="image"&&p?.src){const v=RI(e.customProperties.value.fontSize?.base??UW.fontSize.base),P=SL*v;y=s("img",{src:p.src,alt:g,height:P,className:Y(bt({display:"block"}))})}else y=s(Me,{type:"bag",size:"large"});return s("span",{ref:u("cart"),children:s(ut,{href:m.value?.toString(),id:"cart-link",onClick:h,accessibilityLabel:d==="icon"?g:void 0,display:"block",children:y})})}function fP({alignment:e,logo:t,endAccessory:n,endAccessoryAffectsBlockSize:r=!0}){const o=n&&!r?s(Pe,{blockSize:"0px",children:s(Pe,{transform:"translate(0px, -50%)",children:n})}):n,i={start:{columns:o?"minmax(0, 1fr) minmax(auto, max-content)":"minmax(0, 1fr)",markup:s(q,{children:[t,o]})},center:{columns:o?"minmax(auto, max-content) minmax(0, 1fr) minmax(auto, max-content)":"minmax(0, 1fr)",markup:s(q,{children:[o&&s("div",{style:{visibility:"hidden"},children:o}),s(Pe,{inlineAlignment:"center",children:t}),o]})},end:{columns:o?"minmax(auto, max-content) minmax(0, 1fr)":"minmax(0, 1fr)",markup:s(q,{children:[o,s(Pe,{inlineAlignment:"end",children:t})]})}};return s(gt,{gridTemplateColumns:i[e].columns,minInlineSize:"100%",alignItems:"center",alignContent:"center",gap:"large-500",children:i[e].markup})}function HW(){const{checkout:e,router:t}=_(),n=t.currentUrl.value,{header:{alignment:r="start",logo:{visibility:o,maxWidth:i}={}}}=Fe(),a=Wv(),l=vv(),{currentDetour:c}=Ce().value,u=e.configuration.visibility.showHeader&&!(e.configuration.isUniversalCheckoutFinalizer&&c?.type==="thankYou");let d="purchase.checkout.header.render-after";c?.type==="thankYou"&&(d="purchase.thank-you.header.render-after");const p=it(d),m=o!=="hidden"||Zn(n.search),f=m?s(Nl,{width:i}):s("div",{});let h;return a.value?h=s(zW,{}):l.value&&(h=s(mP,{})),s(Q,{gap:"large-100",children:[(h!=null||m)&&u&&s(fP,{alignment:r,logo:f,endAccessory:h,endAccessoryAffectsBlockSize:a.value||!m}),s($t,{customizations:p,gap:"base"})]})}const hP=qe({displayName:"ShopPayCheckout",load:()=>ct(()=>Ve(()=>import("./ShopPayCheckout.CUHctjhb.js"),__vite__mapDeps([206,1,2,3,4,5,137,143,118,6,8,136,7,78,79,178,106,83,70,207])).then(e=>e.ShopPayCheckout))});function qW({children:e}){const{checkout:{configuration:{layout:t},identity:n},router:r,shopPay:{isSimulated:o}}=_();return Ih({isShopPay:n.current.value==="shopPay",isOnePage:t.isOnePage.value,path:r.currentUrl.value.normalizedPath})?s(hP,{simulated:o,children:e}):s(q,{children:e})}const GW="ghhXm",$W={OnePageRouteContent:GW};function WW({children:e}){const{checkout:t}=_(),n=Qu(),r=sP(),o=t.checkoutExit.isExiting.value,i=W_(),a=s(qW,{children:[s(ob,{}),s(tb,{}),s(xu,{active:n.value,announceProcessing:!o,showLoadingIndicator:!o&&r.value,loadingIndicatorVariant:"progressbar",children:s(YW,{routeC
39ontentInert:i.value?!0:void 0,children:e})}),s(WU,{})]});return s(hu,{children:s(cb,{children:s(SW,{children:s(PU,{children:a})})})})}function YW({children:e,routeContentInert:t}){const{header:{logo:{visibility:n}={}},footer:{content:{visibility:r}={}},cartLink:{visibility:o}}=Fe(),{checkout:i,mobileCheckoutSdk:a,shop:l,shopPay:c,source:u,embed:d,router:p}=_(),m=p.currentUrl.value,f=Zn(m.search),h=fW(),g=i.configuration.showFooter,{currentDetour:y}=Ce().value,v=mW().value,b=Ls()&&v&&cP({embedder:d?.embedder,isThankYouDetour:y?.type==="thankYou",normalizedPath:m.normalizedPath});let C="purchase.checkout.header.render-after",I="purchase.checkout.footer.render-after",S="purchase.checkout.chat.render";y?.type==="thankYou"&&(C="purchase.thank-you.header.render-after",I="purchase.thank-you.footer.render-after",S="purchase.thank-you.chat.render");const k=it(C),E=it(I),T=it(S),A=A_(),R=uo(),L=wV(),{isAppLayout:M}=Wu(),D=M&&d?.embedder==="google"&&ec({embedder:d.embedder,shop:l})&&L.value&&y==null,N=St(),U=u.type==="shopPayExternal",z=!i.configuration.visibility.showHeader,O=i.configuration.isUniversalCheckoutFinalizer&&y?.type==="thankYou",K=U?c.visibility.showOnePageShellHeader:O?k.length>0&&N.value:!(d?.isFlagshipPartner&&!zt(d.embedder)&&d.embedder!=="shopApp"||(z||n==="hidden"&&!f&&o==="hidden")&&!a.enabled&&!d?.isCheckoutKit()&&(k.length===0||!N.value)||M&&(!a.enabled||a.variant.isStandard()||d?.isCheckoutKit())),X=HW,ne=H().buyerIdentity.value?.customerProfile,$=ne==null||ne.__typename!=="CustomerProfile",J=y?.type==="thankYou"||$&&!R.value.payment&&!R.value.delivery,ee=B(()=>a.enabled?a.variant.isStandard():d?d.isCheckoutKit()?!0:!h&&(g||E.length>0):(r!=="hidden"||E.length>0&&N.value)&&!M&&!f,[d,h,g,a,r,E.length,M,f,N.value]),te=y?.type!=="shopPayLogin"&&J&&v&&!d?.isFlagshipPartner,W=c.visibility.shouldForceOnePageShellContentAsAppLayout,he=()=>{if(M||W)return"appLayout"},re=s(q,{children:[s(e2,{}),s(Pe,{className:D?$W.OnePageRouteContent:void 0,inert:t,children:e})]});return s(q,{children:[s(sb,{}),s(yu,{banner:s(k_,{}),announcement:y?.type==="thankYou"&&A.length>0?s(I_,{}):void 0,header:K?s(X,{}):void 0,disclosure:te&&!b?s($_,{}):void 0,disclosureOrderSummary:b?void 0:s(ts,{monorailSection:"top_order_summary"}),main:re,orderSummary:s(ts,{}),orderSummaryVariant:b?"card":void 0,footer:ee?s(Ru,{}):void 0,blockSize:he(),minMobileViewportSize:D}),s(eb,{}),s(ab,{}),s(lb,{}),s($t,{customizations:T,transformComponents:jW,render:de=>s(Pe,{minBlockSize:`@media (inline-size >= medium) 0, ${$u}px`,children:de})})]})}const jW=ib(Vb);function KW(e,t,{attributes:n,externalDeliveryIds:r,hasAmazonCancelledParam:o}){const i=[xe.AmazonPay,xe.BuyWithPrime].some(c=>!!xI(e,c)),a=t.some(c=>c.method.type==="walletsPlatformPaymentMethod"&&c.method.name===xe.BuyWithPrime),l=n?.some(({key:c,value:u})=>c===th&&u===xe.BuyWithPrime);return!!(i||a||r||l||o)}function JW(){const{router:e}=_(),t=Ye().inMemoryAmazonPayParts.serializedAmazonParams;return x(n=>{const{keep:r,only:o}=n??{},i=e.currentUrl.value.href,a=new URL(i);Ch.filter(l=>r?!r.includes(l):o?o.includes(l):!0).forEach(l=>{a.searchParams.delete(l)}),MI(t,l=>a.searchParams.get(l)),i!==a.href&&e.navigate(a.href,{replace:!0})},[e,t])}function XW(){return Kb()[NI]==="true"}const QW=qe({load:()=>Ve(()=>import("./component-amazonWalletLazy.BaKPZYh1.js"),__vite__mapDeps([208,1,2,3,4,5,188,44,209,210,58,193,12,6,7,8,211])).then(e=>e.AmazonBuyerDetailsContent),renderLoading:()=>s(e9,{}),useError:ZW});function ZW(e){const{wallets:t}=_().checkout,{buyerDetails:n,buttonStatus:r,sdkStatus:o}=Ye().inMemoryAmazonPayParts,{paymentLines:i}=se(),a=JW(),l=Ns();F(()=>{if(!e)return;r.value={status:"error"},o.value={status:gi.Error},n.value={loading:!1,error:!0,details:void 0},a();const c=t.escalatedWallet.value,u=c===xe.AmazonPay||c===xe.BuyWithPrime,d=i.value.some(p=>p.method.type==="walletsPlatformPaymentMethod"&&(p.method.name===xe.AmazonPay||p.method.name===xe.BuyWithPrime));u?(l({shouldResetCustomerInfo:!0}),t.setEscalatedWallet(null)):d&&(i.value=i.value.filter(p=>p.method.type!=="walletsPlatformPaymentMethod"||p.method.name!==xe.AmazonPay&&p.method.name!==xe.BuyWithPrime))},[e,n,r,a,i,l,o,t])}function e9(){const{buyerDetailsContentLoaded:e}=Ye().inMemoryAmazonPayParts;return F(()=>{e.value=!1},[e]),null}function gP(){const e=H().paymentMethods,{attributes:t,externalDeliveryIds:n,paymentLines:r}=se(),o=XW(),i=St();return s(ve,{when:()=>i.value&&KW(e.value,r.value,{attributes:t.value,externalDeliveryIds:n.value,hasAmazonCancelledParam:o}),children:s(QW,{})})}function t9(){const{i18n:e}=_(),t=Ce(),n=w(()=>t.value.currentDetour?.label??t.value.currentPage?.label??e.translate("general.page_title"));return s("h1",{className:bt({screenReaders:"only"}),children:n})}function n9({title:e,cost:t}){return s(q,{children:[e,"·",t]})}function Zm({deliveryChangeTitle:e,deliveryLines:t}){const{i18n:n}=_();return s(qs,{blockPadding:"base",children:[s(vn,{primary:!0,children:[s(G,{size:"base",type:"strong",children:n.translate("order_summary.shipping_label")}),t.map(({title:r,lineAmount:o})=>s(Q,{direction:"inline",gap:"small-400",alignItems:"center",children:s(n9,{title:s(G,{size:"small",children:r}),cost:s(G,{size:"small",type:"strong",children:n.formatCurrency(o.amount,{currency:o.currencyCode,form:"short"})})})},r))]}),s(vn,{inlineAlignment:"center",children:s(je,{type:"small",textAlign:"end",children:s(G,{type:"strong",children:e})})})]})}const r9="_8A9rc",o9="TeeUi",i9="DQ7YO",Ui={TooltipInvoker:r9,TaxSegment:o9,
39UpdatedLabel:i9},ef=et("TaxRecalculationLineTooltip"),s9="→";function a9({taxRecalculation:e}){const{i18n:t}=_(),n=t.numberFormatter({style:"percent",minimumFractionDigits:0,maximumFractionDigits:3}),r=Ke(void 0,ef),o=Ke(void 0,ef),i=e.beforeLines,a=e.afterLines;return i.length===0&&a.length===0?null:s(qs,{blockPadding:"base",children:[s(vn,{primary:!0,children:[s(G,{size:"base",type:"strong",children:t.translate("delivery_options.shipping_address")}),s(je,{type:"small",children:[s("span",{className:Ui.TaxSegment,children:[t.translate("payment.order_edit_banner_previous_taxes_label")," ",s(tf,{lines:i,tooltipId:r,percentFormatter:n,i18n:t})," ",s("span",{"aria-hidden":"true",children:s9})]})," ",s("span",{className:Ui.TaxSegment,children:[t.translate("payment.order_edit_banner_new_taxes_label")," ",s(tf,{lines:a,tooltipId:o,percentFormatter:n,i18n:t})]})]})]}),s(vn,{inlineAlignment:"center",children:s(je,{type:"small",textAlign:"end",children:s(G,{type:"strong",children:s("span",{className:Ui.UpdatedLabel,children:t.translate("payment.order_edit_banner_single_item_updated").toUpperCase()})})})})]})}function tf({lines:e,tooltipId:t,percentFormatter:n,i18n:r}){if(e.length===0)return s(q,{children:r.translate("payment.order_edit_banner_no_taxes_label")});if(e.length===1)return s(q,{children:nf(e[0],n)});const o=e.map(l=>nf(l,n)).join(" + "),i=e.filter(l=>l.rate!=null);if(i.length===0)return s(q,{children:o});const a=i.reduce((l,c)=>l+(c.rate??0),0);return s(q,{children:[s(Tn,{interestFor:t,className:Ui.TooltipInvoker,children:n.format(a)}),s(Sn,{id:t,children:o})]})}function nf(e,t){return e.rate==null?e.title:`${e.title} ${t.format(e.rate)}`}function l9(){const{i18n:e,checkout:t}=_(),n=Gl(),r=t.proposal.facts.orderNumber,o=t.proposal.facts.delivery??[],i=w(()=>o.length>0?o[0].lines.filter(f=>f.deliveryChange==="ADDED"):[]),a=w(()=>o.length>0?o[0].lines.filter(f=>f.deliveryChange==="REMOVED"):[]),l=w(()=>(t.proposal.facts.merchandiseLines??[]).filter(f=>f.quantityChange&&f.quantityChange.delta)),c=w(()=>{const f=t.proposal.facts.taxRecalculation;return f&&(f.beforeLines.length>0||f.afterLines.length>0)?f:void 0}),u=w(()=>l.value.length>0||i.value.length>0||a.value.length>0||!!c.value),d=w(()=>
39{if(!(!n.value||!u.value))return{formattedAmountOwed:e.formatCurrency(n.value.amount,{currency:n.value.currencyCode,form:"short"})}}),p=w(()=>i.value.length>0?i.value:void 0),m=w(()=>a.value.length>0?a.value:void 0);return s(ve,{when:d,children:({formattedAmountOwed:f})=>s($s,{heading:e.translate("payment.order_edit_banner_title",{amount_owed:f}),collapsible:!0,children:[s(G,{children:e.translate("payment.order_edit_banner_subtitle",{order_number:r?`#${r}`:""})}),s(Vt,{blockSize:"base"}),s(jr,{}),s(fb,{title:e.translate("payment.order_edit_banner_updated_order_label"),titleHidden:!0,border:"inner",spacing:"none",children:[s(hb,{hidden:!0,children:[s(fr,{hidden:!0,children:e.translate("order_summary.product_image_label")}),s(fr,{hidden:!0,children:e.translate("order_summary.description_label")}),s(fr,{hidden:!0,children:e.translate("order_summary.quantity_label")})]}),s(gb,{children:[s(Xn,{each:l,getKey:({title:h,variantTitle:g})=>`${h}${g?`-${g}`:""}`,children:({quantity:h,quantityChange:g,image:y,title:v,variantTitle:P})=>s(qs,{blockPadding:"base",children:[s(vn,{inlineAlignment:"start",children:s(Vs,{alt:y?.altText??"",size:"base",src:y?.url})}),s(vn,{primary:!0,children:[s(G,{size:"base",type:"strong",children:v}),P?s(G,{color:"subdued",size:"small",children:P}):null]}),g&&g.delta&&g.type?s(vn,{inlineAlignment:"center",children:s(c9,{remainingQuantity:h,delta:g.delta,type:g.type})}):null]})}),s(ve,{when:p,children:h=>s(Zm,{deliveryLines:h,deliveryChangeTitle:e.translate("payment.order_edit_banner_single_item_added").toUpperCase()})}),s(ve,{when:m,children:h=>s(Zm,{deliveryLines:h,deliveryChangeTitle:e.translate("payment.order_edit_banner_single_item_removed").toUpperCase()})}),s(ve,{when:c,children:h=>s(a9,{taxRecalculation:h})})]})]})]})})}function c9({remainingQuantity:e,delta:t,type:n}){const{i18n:r}=_();if(t===0)return null;const o=e===0,i=e+t;let a;switch(n){case"INCREMENTED":a=r.translate("payment.order_edit_banner_items_added",{count:t});break;case"DECREMENTED":a=r.translate("payment.order_edit_banner_items_removed.with_quantities",{quantity:i,delta:t});break;case"REMOVED":a=r.translate("payment.order_edit_banner_items_removed.in_full");break;case"RETURNED":a=o?r.translate("payment.order_edit_banner_items_returned.in_full",{quantity:i}):r.translate("payment.order_edit_banner_items_returned.with_quantities",{quantity:i,delta:t});break;case"RETURN_LINE_ITEM_REMOVED":a=o?r.translate("payment.order_edit_banner_items_return_line_item_removed.in_full"):r.translate("payment.order_edit_banner_items_return_line_item_removed.with_quantities",{delta:t});break;default:return null}return s(je,{type:"small",textAlign:"end",children:s(G,{type:"strong",children:a.toUpperCase()})})}const yP={current:void 0};function u9({active:e,breadcrumbs:t}){const{i18n:n}=_(),r=co(),{buyerJourney:{alignment:o}={}}=Fe();return s(Fs,{section:"breadcrumbs",children:s(yi,{section:"breadcrumbs",children:s(Pe,{accessibilityRole:"navigation",accessibilityLabel:n.translate("general.breadcrumb"),inlineAlignment:o,children:s(Q,{direction:"inline",gap:"small-200",accessibilityRole:"ordered-list",children:t.map(({id:i,to:a,disabled:l,content:c},u)=>{const d=t.length!==u+1,p=e===i,f=!p&&!l?s(G,{size:"small",ref:r(i),children:s(ut,{href:a,textDecoration:"none",children:c})}):s(G,{color:p?void 0:"subdued",type:p?"strong":void 0,size:"small",children:c});return s(Q,{direction:"inline",gap:"small-200",alignItems:"center",accessibilityRole:"list-item",accessibilityCurrent:p?"step":void 0,children:[f,d&&s(Me,{type:"chevron-right",size:"small-200"})]},i)})})})})})}function d9(){const{i18n:e,router:t}=_(),n=Je(),{currentPage:r,plan:{greenPath:o}}=Ce().value,i=lo(),a=Wv(),l=n.current.value,c=t.currentUrl.value.normalizedPath,u=B(()=>o.filter(f=>f.skipOverPage?!f.skipOverPage(l):!0),[o,l]),d=u.find(f=>f.route===c)??r,p=B(()=>{const f=u.findIndex(h=>h.id===d?.id);return[...i.value&&a.value?[{id:"cart",to:i.value.toString(),content:e.translate("general.cart"),disabled:!1}]:[],...u.map((h,g)=>({id:h.id,to:h.route,content:h.label,disabled:d?g>f:!1}))]},[i.value,a.value,e,u,d]),m=d?.id;return yP.current={ids:p.map(({id:f})=>f).join(","),activeId:m,showCartLink:a.value,hasCartUrl:!!i.value},{breadcrumbs:p,activeBreadcrumb:m}}function p9(){return Ut(zv)}function m9(){const{paymentLines:e}=se();return w(()=>{const t=Pt(e.value,"APPLE_PAY");return t?dh(t):!1})}function f9(){const{checkout:e,observability:t}=_(),n=e.configuration.layout.isOnePage.value,r=e.latestReceipt.value,{walletUsedForSubmissionSignal:o,receiptErrorSignal:i,inMemoryApplePayParts:{asPaymentMethod:a,paymentSheetError:l}}=Ye(),c=Oi(DI()),u=Oi(nP()),d=m9(),{paymentLines:p}=se(),m=Pt(p.value,"GOOGLE_PAY"),f=!!(m&&OI(m)),h=Oi(DD({shouldResetCustomerInfo:!1})),g=V(new Set),y=Gb(r?.status==="failed"&&r.failure.type==="payment"&&n?r?.failure:void 0);F(()=>
39{if(r?.status==="processing"||r?.status==="polling_for_order")return;const v=o.value,P=d.value&&v!=="APPLE_PAY",b=f&&v!=="GOOGLE_PAY",C=!v&&!P&&!b;if(r){if(g.current.has(r.id))return;t.leaveErrorBreadcrumb("[useHandleReceiptErrorForWallets] Adding to handled receipt ids",{receiptId:r.id,isNonWalletSubmission:C}),g.current.add(r.id)}if(C)return;const I=v==="APPLE_PAY"||P,S=v==="GOOGLE_PAY"||b;if(I&&l.value?.type==="payment_cancelled_while_processing"&&(l.value=void 0),r?.status!=="failed"){i.value=void 0;return}I&&u.current(),b&&h.current(),r.failure.type==="payment"&&(v||P||b)&&!a.value&&(t.log("useHandleReceiptErrorForWallets_selecting_first_available_payment_method","selecting first available payment method",{walletUsedForSubmission:v,applePaySFRPaymentFailure:P,googlePaySFRPaymentFailure:b}),c.current()),(I&&!a.value||S)&&(i.value=y),v==="GOOGLE_PAY"&&(o.value=void 0)},[t,r,i,o,a,l,u,h,y,c,d.value,f]),F(()=>function(){i.value=void 0},[i])}function h9(){const{checkout:e,router:t}=_(),n=t.currentUrl.value,{header:{alignment:r="start",logo:o}}=Fe(),i=vv(),{currentDetour:a}=Ce().value;let l="purchase.checkout.header.render-after";a?.type==="thankYou"&&(l="purchase.thank-you.header.render-after");const c=it(l),u=e.configuration.isUniversalCheckoutFinalizer&&a?.type==="thankYou",d=!u&&(o?.visibility!=="hidden"||Zn(n.search)),p=!u&&i.value,m=d||p;let f;return p?f=s(fP,{alignment:r,logo:d?s(Nl,{width:o?.maxWidth}):s("div",{}),endAccessory:s(mP,{}),endAccessoryAffectsBlockSize:!d}):d&&(f=s(Pe,{inlineAlignment:r,children:s(Nl,{width:o?.maxWidth})})),s(q,{children:[f,c.length>0&&s(q,{children:[m&&s(Vt,{blockSize:"@media (inline-size >= medium) base, large-400"}),s($t,{customizations:c,gap:"base"})]})]})}function g9({children:e}){return s(hu,{children:s(cb,{children:[s(y9,{}),s(tb,{}),s(ob,{}),s(v9,{children:s(_9,{children:e})})]})})}function y9(){return EA(),f9(),null}function v9({children:e}){const{checkout:t}=_(),n=Qu(),r=sP(),o=t.checkoutExit.isExiting.value;return s(xu,{active:n.value,announceProcessing:!o,loadingIndicatorVariant:"progressbar",showLoadingIndicator:!o&&r.value,children:e})}function _9({children:e}){const{header:{logo:{visibility:t}={}},footer:{content:{visibility:n}={}}}=Fe(),{checkout:r,embed:o,router:i}=_(),{currentDetour:a}=Ce().value,c=Ls()&&cP({embedder:o?.embedder,isThankYouDetour:a?.type==="thankYou",normalizedPath:i.currentUrl.value.normalizedPath});let u="purchase.checkout.header.render-after",d="purchase.checkout.footer.render-after",p="purchase.checkout.chat.render";a?.type==="thankYou"&&(u="purchase.thank-you.header.render-after",d="purchase.thank-you.footer.render-after",p="purchase.thank-you.chat.render");const m=it(u),f=it(d),h=it(p),g=A_(),y=r.configuration.isUniversalCheckoutFinalizer&&a?.type==="thankYou",v=m.length>0||!y&&t!=="hidden",P=h9,b=n!=="hidden"||f.length>0,C=iO(i),I=i.currentUrlMatches("/no-address-location"),S=Yv(i),k=i.currentUrlMatches("/shoppay"),E=Ku(),{activeBreadcrumb:T,breadcrumbs:A}=d9(),R=C||I||S||k||A.length<2||E.value,L=s(b9,{children:e});return s(q,{children:[s(sb,{}),s(yu,{banner:s(k_,{}),announcement:a?.type==="thankYou"&&g.length>0?s(I_,{}):void 0,header:v?s(P,{}):void 0,disclosure:c?void 0:s($_,{}),disclosureOrderSummary:c?void 0:s(ts,{monorailSection:"top_order_summary"}),main:L,orderSummary:s(ts,{}),orderSummaryVariant:c?"card":void 0,footer:b?s(Ru,{}):void 0,buyerJourney:R?void 0:s(u9,{active:T,breadcrumbs:A})}),s(eb,{}),s(ab,{}),s(lb,{}),s($t,{customizations:h,transformComponents:E9,render:M=>s(Pe,{minBlockSize:`@media (inline-size >= medium) 0, ${$u}px`,children:M})})]})}function b9({children:e}){const{checkout:t}=_(),{blocking:n}=p9(),r=Qu();return s(q,{children:[s(t9,{}),s(xu,{active:n.value||r.value,announceProcessing:n.value||!t.checkoutExit.isExiting.value,showLoadingIndicator:n.value,children:[s(gP,{}),s(Q,{gap:"base",children:[s(Ml,{section:"toast"}),s(Ml,{section:"top"}),s(l9,{}),s(S9,{children:e})]})]})]})}function P9({condition:e,children:t}){return e?s(kr,{accessibilityRole:"presentation",children:t}):s(q,{children:t})}function S9({children:e}){const{checkout:t,router:n}=_(),r=n.currentUrlMatches("/shipping"),o=n.currentUrlMatches("/payment"),i=n.currentUrlMatches("/review"),a=r||o||i,l=H(),{value:c}=l.deliveryNext,u=t.proposal.facts.delivery??[],d=Pr(c)||u.length>0&&u.every(y=>y.pickupAddress!==null),{value:p}=Gl(),m=ze("total").value,{value:f}=l.paymentLines,h=ze("paymentLines").value,g=B(()=>i?m||h||(p?.amount?p.amount>0:f?.lines&&f.lines.some(y=>y.cost?.amount)):!1,[i,p,f,m,h]);return s(P9,{condition:a,children:[a&&s(q,{children:[s(xo,{showAddress:!d,showPayment:g}),s(Vt,{blockSize:"large-400"})]}),s(Pe,{children:e})]})}const E9=ib(Vb);function C9(e){const t=H().buyerIdentity,r=e?.countryCode&&Zc.includes(e.countryCode)?{hiddenFields:["phone","company"],multiline:!1,countryFormat:"explicit"}:{hiddenFields:["phone","company","firstName","lastName"],multiline:!1,countryFormat:"explicit"},o=We(As(e,r));return w(()=>
39{if(t.value?.purchasingCompany)return o.value})}function ij(){const{billingAddressOption:e,shippingAddress:t}=se(),{checkout:n}=_();$e(()=>{(!n.isShippingRequired.value||t.value.oneTimeUse)&&(e.value="custom")})}function sj(){const{billingAddressOption:e,paymentLines:t}=se(),{shop:n,source:r,checkout:o}=_(),i=H().buyerIdentity.value?.purchasingCompany,a=H(),{value:l}=a.deliveryNext,c=ze("deliveryNext").value;F(()=>{const u=t.value[0],d=l;if(c||!d||d.status!=="filled"||!u)return;const p=Pr(d),m=zr(d);if(p||m)return;const f=!p&&o.isShippingRequired.value;Ah({shopRequireMatchingShippingAndBilling:!!n.requireMatchingShippingAndBilling,selectedPaymentMethodType:u?.method.type,isShippingRequired:f,isOrderSession:nt(r),isB2B:!!i,isPickupPointDeliveryMethod:m})&&e.value!=="shipping"&&(e.value="shipping")},[t.value,l,c,o.isShippingRequired,n.requireMatchingShippingAndBilling,r,i,e])}function aj(){const{source:e,checkout:t}=_(),{buyerIdentity:n,deliveryNext:r}=H(),o=io(),i=Er(),a=Bq(),{deliveryLines:l,shippingAddress:c}=se();return w(()=>{const u=n.value?.purchasingCompany;return(i.value||so({checkout:t,source:e})?.pickupAddress)&&!o.value||zr(r.value)||l.value.flatMap(p=>p.value.deliveryMethodTypes).includes("PICKUP_POINT")||!nt(e)&&!t.isShippingRequired.value&&!u||nt(e)&&!a.value||u&&!t.addressManager.billing.value.suggestedAddress.value.type||c.value.oneTimeUse?"form":"selector"})}function lj(){const{billingAddressOption:e,billingAddress:t}=se(),n=H(),{checkout:r,source:o}=_();return w(()=>{const i=n.paymentLines.value,a=n.shippingAddress.value,l=r.proposal.facts.delivery??[],c=l.length>0&&l[0].deliveryAddress?l[0].deliveryAddress:void 0,u=n.buyerIdentity.value?.purchasingCompany,d=i?.lines?.find(p=>p.method.type===Yn.CreditCard);return d?d.method.billingAddress:e.value==="billing"&&u?.location.billingAddress?u.location.billingAddress:e.value==="shipping"&&u?.location.shippingAddress?u.location.shippingAddress:e.value==="shipping"?nt(o)?c:a:t.value})}function cj(){const t=H().paymentLines?.value?.lines,{hasViolations:n,violations:r}=mi(new Set(["PAYMENTS_SHIPPING_MUST_MATCH_BILLING"])),o=!!Pt(t,"APPLE_PAY");if(!(!n||o))return r.values().next().value.localizedMessage}function k9(){const{shop:e,source:t,checkout:n}=_(),r=Er(),{paymentLines:o}=se(),{buyerIdentity:i}=H(),a=nU();return w(()=>{const l=!r.value&&n.isShippingRequired.value,u=o.value[0];return Ah({shopRequireMatchingShippingAndBilling:!!e.requireMatchingShippingAndBilling,selectedPaymentMethodType:u?.method.type,isShippingRequired:l,isOrderSession:nt(t),isB2B:!!i.value?.purchasingCompany,isPickupPointDeliveryMethod:a.value})})}function uj(e){const t=e,n=C9(t),o=t?.countryCode&&Zc.includes(t.countryCode)?{countryFormat:"explicit"}:{hiddenFields:["firstName","lastName"],countryFormat:"explicit"},i=As(t,o);return n.value??i}function dj(){const{shippingAddress:e}=se(),{checkout:t}=_();return w(()=>(t.proposal.facts.delivery??[])[0]?.deliveryAddress??e.value)}function pj(){const{negotiate:e}=Mt(),{billingAddress:t,billingAddressOption:n}=se(),{checkout:{wallets:r}}=_(),o=V(void 0),i=x(()=>{e({include:["billingAddress"]})},[e]),a=n.value==="custom"?t.fields.countryCode.value:void 0;return F(()=>{!r.activeSession.value&&n.value==="custom"&&a&&a!==o.current&&(o.current=a,i())},[n.value,a,i,r.activeSession.value]),i}const I9="b2b",mj="not_b2b";function A9(){const{paymentMethods:e}=H();return vP(e)}function fj(){const{paymentLines:e}=se(),t=w(()=>e.value.map(n=>n.method));return vP(t)}function vP(e){const{client:t,checkout:{identity:n},shop:r,shopPay:o,source:i}=_(),a=Iy(),l=zs(),c=r.hasFlagEnabled(FI),u=us(["STORE_CREDIT","CUSTOM"]),{buyerIdentity:d,paymentMethods:p}=H();return w(()=>{if(!l.value||n.current.value==="shopPay"||u.value)return!1;const m=e.value??[];if(d.value?.purchasingCompany){const f=p.value?.some(y=>y.type==="direct"&&y.name==="shopify_payments"),h=m.some(y=>y.type==="direct"&&(f||r.storeVaultEnabled)),g=m.some(y=>L9(y,p.value??[]));return T9(i,t)&&(h||g)}return r.storeVaultEnabled&&w9({paymentMethods:m,paypalVaultingEnabled:c,negotiatedPaymentMethods:p,buyerIdentity:d,isShopPayAvailableForSellerOfRecord:a,shopPayDismissed:o.userIdentified.value})})}function T9(e,t){return e.type==="cartNext"||e.type==="simulated"||t.unstable_getSerialization("invoiceLoginType")===I9&&ev(e)}function w9({paymentMethods:e,paypalVaultingEnabled:t,negotiatedPaymentMethods:n,isShopPayAvailableForSellerOfRecord:r,shopPayDismissed:o,buyerIdentity:i}){const a=!o&&!i.value?.customerProfile&&r.value;if(!t&&a)return!1;const l=n.value??[],c=e.map(u=>_P(u,l)).filter(u=>u!==void 0);return t&&c.some(u=>u.type==="wallet"&&u.name==="PAYPAL_EXPRESS"&&u.supportsVaulting)?!0:!a&&c.some(u=>u.type==="direct"&&u.supportsVaulting)}function _P(e,t){if(e.type==="direct")return t.find(n=>n.type==="direct"&&n.paymentMethodIdentifier===e.paymentMethodIdentifier);if(e.type==="wallet"&&e.name==="PAYPAL_EXPRESS")return t.find(n=>n.type==="wallet"&&n.name==="PAYPAL_EXPRESS"&&(!e.walletContent||n.paymentMethodIdentifier===e.walletContent.paymentMethodIdentifier));if(e.type==="bank")return t.find(n=>n.type==="bank"&&n.paymentMethodIdentifier===e.paymentMethodIdentifier)}function L9(e,t){return e.type!=="bank"?!1:"supportsVaulting"in e?e.supportsVaulting:!_P(e,t)?.supportsVaulting||!("selectedToken"in e)||!e.selectedToken?!1:e.selectedType!=="SHOPIFY_PUBLIC_TOKEN"}function R9(e){if(!e)return!1;const t=!!Pt([e],"PAYPAL_EXPRESS"),n=!!Pt([e],"APPLE_PAY"),r=["direct","giftCard","redeemable","walletsPlatform","wallet","noop","deferred","other",...Object.values(Yn)];return t||n||!r.includes(e.method.type)}function bP({fullyCoveredByGiftCard:e,fullyCoveredByRedeemablesAndGiftCards:t,paymentRequired:n,identity:r,isOrderSession:o,isPickupSelected:i,isShippingRequired:a,vaultedDelivery:l,isPointOfSaleLayout:c,purchasingCompany:u,paymentLines:d,billingAddressOption:p,paymentMethods:m,orderEditHasPickupAddress:f,isForceBillingAddressFormEnabled:h}){const g=!i&&a,y=d[0],v=y?.method.type==="direct",b=y?.method.type==="wallet"&&y?.method.name==="APPLE_PAY"&&!u,S=y?.method.type==="wallet"&&y?.method.name==="PAYPAL_EXPRESS"&&BI(m)&&!h,k=VI({lines:d,paymentMethods:m,purchasingCompany:u,isBillingAddressForced:h})||!g,E=y?.method.type==="CREDIT_CARD_ON_FILE",T=wh(m).length>0&&E;if(n&&(!k||b||S||T))return"hidden";if(u&&n&&!t)return R9(y)?"afterPayment":"inContext";if(c)return"afterPayment";if(r==="shopPay"&&l)return"inContext";const R=y?.method.type==="wallet"||y?.method.type==="walletsPlatformPaymentMethod";return!n||e||t?g&&!R&&p==="shipping"?"hidden":"afterPayment":o?f?"afterPayment":a&&v?"inContext":"afterPayment":g&&v?"inContext":"afterPayment"}function x9(e){const t=bP(e),n=t==="beforePayment"||t==="afterPayment",r=e.paymentLines[0]?.method.type,o=r===Yn.CreditCard||r===Yn.PayPal;return n&&!e.billingMustMatchShipping&&!o}function hj(){const e=Th(),t=us(),n=zs(),{source:r,checkout:o,shop:i}=_(),a=Er(),l=uo(),c=fi(),{buyerIdentity:u,paymentMethods:d}=H(),{paymentLines:p,billingAddressOption:m}=se();return w(()=>bP({fullyCoveredByGiftCard:e.value,fullyCoveredByRedeemablesAndGiftCards:t.value,paymentRequired:n.value,identity:o.identity.current.value,isOrderSession:nt(r),isPickupSelected:a.value,isShippingRequired:o.isShippingRequired.value,vaultedDelivery:l.value.delivery,isPointOfSaleLayout:c.value,purchasingCompany:!!u.value?.purchasingCompany,paymentLines:p.value,billingAddressOption:m.value,paymentMethods:d.value,orderEditHasPickupAddress:!!so({checkout:o,source:r})?.pickupAddress,isForceBillingAddressFormEnabled:!Xl({shop:i,checkout:o,paymentMethods:d.value})}))}function M9(e,t){return e.contact===t.contact&&e.delivery===t.delivery&&e.payment===t.payment&&e.billing===t.billing}function N9({children:e}){const{current:{fields:{buyerIdentity:t,shippingAddress:n}}}=Je(),{billingAddress:r,billingAddressOption:o,email:i,paymentLines:a,phone:l,shippingAddress:c}=se(),{checkout:u,embed:d,shop:p,shopPay:m,source:f}=_(),h=d?.isFlagshipPartner,g=H(),y=UI(),v=Qy(),P=Pn(),b=V(!1),C=V(!1),I=Wc(Ao),S=Xg(Ao),k=Qg(Ao),E=A9(),T=zs(),A=Th(),R=us(),L=Er(),M=fi(),D=k9(),{shippingCountries:N}=p,U=On(),z=n.value,O=my(z?.countryCode,N),K=We(O),X=V(),ne=zI(),$=w(()=>Xl({shop:p,checkout:u,paymentMethods:g.paymentMethods.value})),J=w(()=>{const W=u.identity.current.value,he=K.value,re=v.value;if(!b.current){const Z=I.violations.value;b.current=Z.size>0&&!HI(Z)}if(C.current||(C.current=S.violations.value.size>0||u.wallets.escalatedWallet.value!==null&&k.violations.value.size>0),W==="sdkCartHints"&&X.current?.identitySource==="sdkCartHints")return X.current.sections;function de(Z){return Z?.__typename==="CustomerProfile"}function le(){function Z(me){return me.shippingAddresses.length===0}function fe(me){return me.shippingAddresses.length===1&&he(me.shippingAddresses[0].address,"shipping").size>0}function be(me){return de(me)?!!u.addressManager.shipping.value.selectedAddress.value:!1}function Te(me){return me!=null&&he(me,"shipping").size===0}function Se(me,Ne,Ge){return!me&&Ne&&Ge.shippingAddresses.length>0}function Ae(me,Ne,Ge){return Se(Ne,Ge,me)||!Ne&&!Ge?!1:!be(me)}const Ue=n.value,ce=c.value,ie=u.proposal.negotiated.fields.availableDeliveryAddresses.value??[];switch(W){case Qs:return ie.length>0;case"customerAccount":{const me=t.value;return ie.length>0?!0:!(me==null||!de(me?.customerProfile)||Z(me?.customerProfile)||fe(me?.customerProfile)||Ae(me.customerProfile,Ue,ce))}case"shopPay":return m.user.addresses.value.length>0||ie.length>0;case"sdkCartHints":return u.configuration.isAddressDelegationEnabled?!0:ke()&&Te(Ue);case"businessCustomer":return!(P.value&&!re);default:return!0}}function _e(){const Z=!!g.paymentFlexibilityPaymentTermsTemplate.value;switch(W){case Qs:return!1;case"shopPay":{const fe=m.user.paymentMethods.value;return!T.value&&!u.isShippingRequired.value?m.user.addresses.value.length>0:m.enableCardVaulting?fe.some(GI):!0}case"sdkCartHints":return u.configuration.isPaymentInstrumentsDelegationEnabled;case"businessCustomer":{const fe=t.value?.customerProfile;if(nt(f)||!qI(fe))return!1;const be=Z||U.value;return Id({identitySource:W,isOrderSession:nt(f),storeVaultEnabled:p.storeV
39aultEnabled,customerProfile:fe,hasCustomerStoredPaymentMethod:Ad({availablePaymentMethods:g.paymentMethods.value??[],paymentMethodHistory:g.paymentMethodHistory?.value??[]})})?!0:!!wh(g.paymentMethods.value).length||be&&!E.value}case"customerAccount":{if(Id({identitySource:W,isOrderSession:nt(f),storeVaultEnabled:p.storeVaultEnabled,customerProfile:void 0,hasCustomerStoredPaymentMethod:Ad({availablePaymentMethods:g.paymentMethods.value??[],paymentMethodHistory:g.paymentMethodHistory?.value??[]})}))return!0;const fe=ne.value.length===1&&ne.value[0].type==="deferred";return!!(Z&&fe)}default:return y.value.length>0?!0:a.value.length>0}}const ae=Z=>!u.isShippingRequired.value&&!!r.value&&!r.value?.[Z]?.trim();function ge(){switch(W){case"shopPay":{const Z=m.session.selectedPaymentMethod.value,be=cc({managedByMarketsPro:g.managedByMarketsPro.value})&&Z?.paymentMethod==="IDEAL",Te=Z?.paymentMethod==="CUSTOM_ONSITE",Se=!m.user.hasCreditCards.value,Ae=a.value.some(ie=>ie.method.type==="direct");if(Se&&Ae)return!1;const Ue=ae("phone"),ce=ae("firstName");return!T.value||ce||Ue||be||Te}case"amazonPay":case"buyWithPrime":return b.current;case"applePay":case"googlePay":return C.current;case"payPal":return $.value?C.current:!0;case"customerAccount":case"businessCustomer":return nt(f)?!1:x9({fullyCoveredByGiftCard:A.value,fullyCoveredByRedeemablesAndGiftCards:R.value,paymentRequired:T.value,identity:W,isOrderSession:nt(f),isPickupSelected:L.value,isShippingRequired:u.isShippingRequired.value,vaultedDelivery:!1,isPointOfSaleLayout:M.value,purchasingCompany:!!t.value?.purchasingCompany,paymentLines:a.value,billingAddressOption:o.value,paymentMethods:g.paymentMethods.value,orderEditHasPickupAddress:!!so({checkout:u,source:f})?.pickupAddress,isForceBillingAddressFormEnabled:!$.value,billingMustMatchShipping:D.value});default:return!1}}function ke(){switch(W){case Qs:return!1;case"amazonPay":case"businessCustomer":case"buyWithPrime":return!0;case"shopPay":return m.user.isAuthenticatedUser.value;case"sdkCartHints":return h?!0:i.value.length>0||l.value.length>0;case"customerAccount":return de(t.value?.customerProfile)&&!t.value.customerProfile.email?!1:i.value.length>0;default:return i.value.length>0}}const we={contact:ke(),delivery:le(),payment:_e(),billing:ge()},Ie=X.current;return Ie?.identitySource===W&&M9(Ie.sections,we)?Ie.sections:(X.current={identitySource:W,sections:we},X.current.sections)}),te=p.hasFlagEnabled($I)?u.vaultedSections.signal:J;return s(C_.Provider,{value:te,children:[s(gP,{}),e]})}const D9=Jn(function(){const{checkout:{configuration:{layout:t}},router:n}=_();pV();const r=t.isOnePage.value,o=B(()=>[{match:"/processing",render:()=>s(q,{children:[s(b_,{}),s(cr.Preload,{})]})},{match:"/throttle",render:()=>r?s(Al,{}):s(q,{children:[s(Al,{}),s(Di.Preload,{})]})},{match:"/post-purchase",render:()=>s(nm,{}),renderPrefetch:()=>s(nm.Prefetch,{})},{render:({children:i})=>s(q,{children:[s(dV,{}),s(N9,{children:r?s(WW,{children:i}):s(g9,{children:i})})]}),children:[{match:"/thank-you",render:()=>s(cr,{}),renderPrefetch:()=>s(cr.Prefetch,{})},{match:"/offsite-payment-failed",render:()=>s(Xp,{}),renderPrefetch:()=>s(Xp.Prefetch,{})},...r?[{match:"/shoppay_login",render:()=>s(P_,{})},{match:"/review",render:()=>s(Qp,{}),renderPrefetch:()=>s(Qp.Prefetch,{})},{match:"/no-address-location",render:()=>s(fV,{})},{render:({children:i})=>s(q,{children:[s(__,{children:i}),s(cr.Preload,{})]}),children:[{match:"/stock-problems",render:()=>s(kV,{})}]}]:[{match:"/information",render:()=>s(q,{children:[s(Di,{}),s(xo.Preload,{})]}),renderPrefetch:()=>s(Di.Prefetch,{})},{match:"/shipping",render:()=>s(Il,{}),renderPrefetch:()=>s(Il.Prefetch,{})},{match:"/payment",render:()=>s(q,{children:[s(Cl,{}),s(cr.Preload,{})]}),renderPrefetch:()=>s(Cl.Prefetch,{})},{match:"/review",render:()=>s(q,{children:[s(kl,{}),s(cr.Preload,{})]}),renderPrefetch:()=>s(kl.Prefetch,{})},{match:"/stock-problems",render:()=>s(S_,{})},{match:"/no-address-location",render:()=>s(mV,{})},{render:()=>s(hV,{})}]]}],[r]);return rS(n,o)});function O9({checkout:e,shop:t,profileId:n=e.configuration.profileId.peek()}
39){if(!n)return;const r=e.latestReceipt.peek(),o=e.wallets.escalatedWallet.peek(),a=e.configuration.layout.baseName==="three-page"&&(!r||r.status==="failed"||r.status==="abandoned")&&(o==="APPLE_PAY"&&t.hasFlagEnabled(In)||o==="GOOGLE_PAY"&&t.hasFlagEnabled(ss));return{id:n,requireBusinessCriticalOnly:a}}async function F9(e,{loadFrom:t,onQuerySettled:n}){const r=O9(e);if(!r?.requireBusinessCriticalOnly)return;const o=Fo(gr,r),i=e.checkout.configuration.getProfile({...r,requireBusinessCriticalOnly:!1});try{let a=t==="serialized-cache"?await rf(e.graphql.coreGraphql,r):void 0;if(t==="serialized-cache"&&!a){of(e.checkout.configuration.profileKey.peek(),{...r,requireBusinessCriticalOnly:!1});return}(await iu(()=>{},{trigger:"initialization",profileRequest:r,graphql:e.graphql.coreGraphql,configuration:e.checkout.configuration,extensibility:e.checkout.extensibility,observability:e.observability,userEvents:e.userEvents,telemetryContext:{source:e.source,shop:e.shop,sessionToken:e.client.unstable_getSerialization("sessionToken")??"",current:e.checkout.proposal.negotiated}}))?.(),a??=await rf(e.graphql.coreGraphql,r),of(e.checkout.configuration.profileKey.peek(),{...r,requireBusinessCriticalOnly:!!a})}catch(a){if(e.graphql.coreGraphql.cache.delete(o),el(e.observability,a),i){try{e.checkout.extensibility.ui.replace({activatedExtensions:i.activatedExtensions},{keepAlive:!1,reason:"checkout_profile_change"})}catch(l){el(e.observability,l)}try{e.checkout.configuration.update({profile:i,requireBusinessCriticalOnly:!1})}catch(l){el(e.observability,l)}}}finally{n?.(o)}}function el(e,t){e.error(t instanceof Error?t:new wo("Required checkout profile could not be loaded",{cause:t}))}async function rf(e,t){const{data:n}=await e.staticQuery(gr,{variables:t,skip:!0}),r=n?.checkoutProfile;return r?.id===t.id&&r.activatedExtensions?r:void 0}function of(e,t){if(!e||Fo(gr,e)!==Fo(gr,t))throw new wo("Required checkout profile could not be loaded")}const B9=32;function Zu(e){const t=[];return e.__k&&e.__k.forEach(n=>{n&&typeof n.type=="function"?t.push(...Zu(n)):n&&typeof n.type=="string"&&t.push(n)}),t}function V9(e){return e.type===q?"Fragment":typeof e.type=="function"?e.type.displayName||e.type.name:typeof e.type=="string"?e.type:"#text"}function Wn(e,t){const{props:n}=e,r=V9(e);let o="";for(const a in n)if(n.hasOwnProperty(a)&&a!=="children"){let l=n[a];typeof l=="function"&&(l=`function ${l.displayName||l.name}() {}`),l=Object(l)===l&&!l.toString?Object.prototype.toString.call(l):String(l),o+=` ${a}=${JSON.stringify(l)}`}const i=n.children;return`<${r}${o}${t||i&&Array.isArray(i)&&i.length?`>${t||".."}</${r}>`:" />"}`}const U9=50;function*PP(e,t){let n=e,r=0;for(;n&&r<U9;)yield n,n=t(n),r+=1}const z9=/\(.+\)/;function SP(e,t=10){let n=null;const r=[];for(const o of PP(e.__??null,i=>i.__??null)){const i=typeof o.type=="function"&&o.type!==q;if(i&&!n&&(n=o),r.length<t)if(i){const{displayName:a}=o.type;a&&!z9.test(a)&&r.push(a)}else typeof o.type=="string"&&r.push(o.type);else if(n)break}return{closestFunctionParent:n,breadcrumb:r}}
39const H9=/^[a-zA-Z][\w-]{0,63}$/;function Zo(e){return!H9.test(e)||/\d{4,}/.test(e)||e.split(/[_-]/).some(n=>n.length>=8&&/[a-zA-Z]/.test(n)&&/\d/.test(n))?null:e}const sf="https://redacted.invalid";function q9(e){let t;try{t=new URL(e,sf)}catch{return null}return t.origin==="null"?t.protocol.replace(/:$/,""):t.origin===sf?null:t.origin}function EP(e,t=10){const n=e instanceof Element?e:e?.parentElement??null,r=[];for(const o of PP(n,i=>i.parentElement)){const i=o.getAttribute("id"),a=o.getAttribute("data-testid"),l=i==null?null:Zo(i),c=a==null?null:Zo(a),u=o.getAttribute("role");if((l||c||u)&&r.push(`${o.localName}${l?`#${l}`:""}${c?`[${c}]`:""}${u?`(${u})`:""}`),r.length>=t)break}return r}class G9 extends uf{componentDidCatch(t){this.props.terminalErrorHandler.notify(t,{inErrorBoundary:!0})}render(){return this.props.children||null}}const $9="shop-pay-login-iframe",gj="100%",yj="publickey-credentials-get *",tl=9e4;async function Dl(){if(!document.body?.classList.contains("Loading")){Ea(document);return}const e=document.querySelector(".LoadingShell"),t=W9(e);if(t&&(await t,!document.body?.classList.contains("Loading"))){Ea(document);return}const n=e?new Promise(r=>{e.addEventListener("transitionend",function(){e.remove(),r()},{once:!0})}):Promise.resolve();document.body.classList.remove("Loading"),performance.mark("checkout:visible",{detail:{devtools:{dataType:"marker",color:"primary-dark",tooltipText:"The critical elements of checkout are visible to the buyer"}}}),await n,Ea(document)}function W9(e){if(e?.classList.contains("LoadingShell-variantPartnerInterstitial"))return Reflect.get(window,Symbol.for(QB))}function Y9({client:e,isShopPayActive:t,watch:n}){const r=t,o=new AbortController;if(!r){Dl();return}n&&(n.stage="skeleton_wait");const i=()=>{n&&(n.stage="subscribed");let c;c=e.unstable_legacyNavigationPerformance.on("initialLoadingFinish",()=>{n&&(n.stage="loading_finished"),Dl(),c?.()})},a=e.unstable_legacyNavigationPerformance.on("event",c=>{c.type===WI&&(o.abort(),i())}),l=e.unstable_legacyNavigationPerformance.on("navigation",()=>{o.abort(),i()});o.signal.addEventListener("abort",()=>{a(),l()})}function j9({client:e,isShopPayActive:t,isShopPaySdkCheckout:n,observability:r}){if(!t)return;const o={stage:"armed"};return setTimeout(()=>{if(U1(document))return;const i=e.unstable_legacyNavigationPerformance,a={shopPaySdkCheckout:n,stage:o.stage,pen
39dingLoaderCount:i.loaderCount},l=performance.now();r.counter({name:"shop_pay_skeleton_stuck",value:1,exportImmediately:!0,attributes:{delayMs:tl,...a}}),r.log("shop_pay_skeleton_stuck","Shop Pay checkout still showing the loading skeleton",{delayMs:tl,...a,loaderPreviouslyRegistered:i.loaderPreviouslyRegistered,appHasContent:!!e.rootElement?.childElementCount,loginFramePresent:!!document.getElementById($9),documentReadyState:document.readyState,documentVisibilityState:document.visibilityState,reportedAtMs:Math.round(l)},{exportImmediately:!0}),Ky().then(()=>{const c=Math.round(performance.now()-l);r.counter({name:"shop_pay_skeleton_recovered_after_stuck",value:1,exportImmediately:!0,attributes:a}),r.histogram({name:"shop_pay_skeleton_recovery_duration",value:c,attributes:a}),r.log("shop_pay_skeleton_recovered_after_stuck","Shop Pay checkout recovered after its skeleton was reported stuck",{...a,recoveryDurationMs:c},{exportImmediately:!0})}).catch(()=>{})},tl),o}function CP(e){iS(e),e.childNodes.forEach(t=>{t.remove()})}function K9(e,t){CP(t),oS(e,t)}async function J9(e,t,n){const r=t.querySelector(".client-terminal-error-page__stack-trace");r&&r.remove(),CP(e),t.style.display="block",await Dl()}class af extends bn{constructor(){super(...arguments),this.name="UnsafeURLError",this.unactionable=!0}}class X9 extends bn{constructor(){super(...arguments),this.name="InsecurePageError",this.unactionable=!0}}const Q9=new Set(["https://europesnus.nl","https://europesnus.de","https://europesnus.fr","https://europesnus.se","https://suomi-nikotiinipussit.fi","https://www.suomi-nikotiinipussit.fi","https://www.lankeleisi.se","https://fr.stance.eu.com","https://holysmile.de"]),Z9=/^[^.]+\.checkout\.my\.shop\.dev$/i;function e3({pathnamePrefix:e,allowedOrigins:t,client:n,isShopPayActive:r}){const{protocol:o,href:i,host:a,pathname:l,origin:c}=n.initialRequest.url;if(o!=="https:")throw new X9(`Running on an insecure protocol: ${i}`);if(!(Z9.test(a)||r)){if(!t3(i,c,t))throw new af(`Running on an unexpected origin: ${i}. Allowed origins: ${t.join(", ")}`);if(!e.test(l))throw new af(`Running on an unexpected pathname: ${i}. Expected pathname to match: /${e.source}/`)}}function t3(e,t,n){return n.some(o=>{if(t===o)return!0;const i=o.replace(/^https:\/\//,"");return t.endsWith(`.${i}`)||t===`https://www.${i}`?!0:i.includes("/")?e.startsWith(o):!1})||Q9.has(t)}const Ol=new Set(["type","className","id","role","name","data-testid","data-alternate-values","alternateValues","direction","gap","alignItems","justifyContent","inlineSize","padding","borderRadius","borderWidth","display","condition","gridAutoFlow","gridTemplateColumns","gridTemplateRows","size","color","letterCase","translate","variant","loading","wallet","shopPayEmphasis","hideWallets"]);function n3(e){return Ol.has(e)||e.startsWith("aria-")}function lf(e){const t={};for(const n in e.props)if(Object.prototype.hasOwnProperty.call(e.props,n)){const r=e.props[n];n==="href"&&typeof r=="string"?t[n]=q9(r)??"[redacted]":n3(n)?n==="id"&&typeof r=="string"||n==="data-testid"&&typeof r=="string"?t[n]=Zo(r)??"[redacted]":t[n]=r:t[n]="[redacted]"}return{...e,props:t}}function r3({rootElement:e,terminalErrorPageElement:t}){return n=>J9(e,t)}async function o3(e,{bootStartTime:t}){const{client:n,terminalErrorHandler:r}=e,o=e.checkout.identity.current.value==="shopPay",i=j9({client:n,isShopPayActive:o,isShopPaySdkCheckout:YI(e.shopPay),observability:e.observability});await i3(e,{bootStartTime:t}),i&&(i.stage="context_ready");const a=performance.now(),l=s(G9,{terminalErrorHandler:r,children:s(lF,{context:e,children:s(D9,{})})});n.initialRequest.isServerRendered&&e.router.shouldHydrateServerRenderedRoute()?(ps.current=!0,IP(e),f3(l,n.rootElement,e)):K9(l,n.rootElement),i&&(i.stage="rendered"),Y9({client:e.client,isShopPayActive:o,watch:i}),s3(e,{hydrateStartTime:a})}async function i3(e,{bootStartTime:t}){const{events:n,client:r,router:o}=e;o.prefix instanceof RegExp&&e3({pathnamePrefix:o.prefix,allowedOrigins:r.unstable_getSerialization("shop").origins,client:r,isShopPayActive:e.checkout.identity.current.value==="shopPay"}),Object.defineProperty(window,Symbol.for("Shopify.checkout"),{value:{context:e},writable:!0,configurable:!0,enumerable:!1}),await F9(e,{loadFrom:r.initialRequest.isServerRendered?"serialized-cache":"network"});const i=new KI(e,{bootStartTime:t});i.waitUntil(l3(e)),n.dispatchEvent(i),await i.allResolved(),n.dispatchEvent(new JI(i))}async function s3(e,{hydrateStartTime:t}){const{events:n}=e,r=new XI(e,{hydrateStartTime:t});n.dispatchEvent(r),await r.allResolved(),n.dispatchEvent(new QI(r))}function kP({isOnePage:e,isShopPay:t,path:n,uiExtensibility:r}){const o=a3({isOnePage:e,isShopPay:t,path:n});return Ih({isOnePage:e,isShopPay:t,path:n})&&o.push(hP),r.required.value&&o.push(Ry,{load:r.ensureEngineLoaded}),o}function a3({isOnePage:e,isShopPay:t,path:n}){switch(n){case"/processing":return[b_];case"/throttle":return[Al];case"/thank-you":return[cr];case"/shoppay_login":return[P_]}if(t||e)return[__];
39switch(n){case"/shipping":return[Il,xo];case"/payment":return[Cl,xo];case"/review":return[kl,xo];case"/stock-problems":return[S_];default:return[Di]}}async function l3(e){const{checkout:t,router:n}=e,r=kP({isOnePage:t.configuration.layout.isOnePage.value,isShopPay:t.identity.current.value==="shopPay",path:n.currentUrl.value.normalizedPath,uiExtensibility:t.extensibility.ui}),o=Gy(e);o&&r.push(o),await Promise.all(r.map(i=>i.load()))}function IP({environment:e}){if(!e.debug.preact)return;const t=Nt.diffed,n=[];Nt.diffed=r=>{const o=r.__k&&r.__k.some(a=>a&&(!a.type||typeof a.type=="string")),i=Zu(r);if(!n.includes(r.type)&&o&&i&&i.filter(a=>a&&!a.type).length>1){const a=[];for(const l of i)l&&!l.type?a.push(`"${l.props}"`):l&&typeof l.type=="string"&&(a.length>1&&(n.push(r.type),console.warn(`Detected adjacent text-nodes ${a.join(", ")}.
40This doesn't need to be actioned on but could lead to causes of hydration mismatches.
41Text-nodes located in
42${Wn(r.__,Wn(r))}`)),a.length=0)}t?.(r)}}function Fl(e){if(typeof e!="function")return null;const t=e;return t.displayName||t.name||null}function ed(e){const t=[];for(const{name:n}of e)t.includes(n)||t.push(n);return t}function c3(e,t){Promise.resolve(e).then(t).catch(t)}const AP=(e,t,n,r)=>{const o=p=>`${Fl(p.type)??""}${p.__b}`;let i=0,a=!1;const l=Nt.__e;Nt.__e=(p,m,f)=>{if(typeof m.type=="function"&&p&&typeof p.then=="function"&&m.__u&B9){const h={name:Fl(m.type)??"anonymous",key:o(m)};t.push(h,h),i+=1;let g=!1;c3(p,()=>{g||(g=!0,i-=1,n?.(m))})}l(p,m,f)};const c=Nt.diffed;Nt.diffed=p=>{if(typeof p.type=="function"){const m=o(p),f=t.findIndex(h=>h.key===m);if(f!==-1){if(e){const h=Zu(p);p.__k&&h.length===0?console.warn(`Suspended VNode ${Wn(p)} returned no DOM-children, this causes hydration mismatches.`):p.__k&&h.length>1&&console.warn(`Suspended VNode ${Wn(p)} returned > 1 DOM-child, this causes hydration mismatches.`)}t.splice(f,1)}}c?.(p)};const u=Nt.__c;Nt.__c=(p,m)=>{!a&&i<=0&&t.length===0&&d(),u?.(p,m)};const d=()=>{a||(a=!0,Nt.diffed=c,Nt.__e=l,Nt.__c=u,ps.current=!1,r?.())};return{teardown:d}},u3=["id","name","type","role","href","action"];function d3({observability:e,debugMode:t,inProgressBoundaries:n}){const r=[],o=new WeakMap;let i=!1;const a=Nt.diffed;return Nt.diffed=l=>{if(typeof l.type=="string"&&ps.current&&l.props&&l.__e instanceof Element){const c=l.props;for(const u of u3){const d=c[u];if(typeof d!="string"||l.__e.getAttribute(u)===d)continue;let m=o.get(l.__e);if(m?.has(u))continue;m||(m=new Set,o.set(l.__e,m)),m.add(u);const f=ed(n),{closestFunctionParent:h,breadcrumb:g}=SP(l),y=h?Fl(h.type):null,v=EP(l.__e);r.push({attr:u,tag:l.type,reactValue:d,domElement:l.__e,suspendedAtCapture:f,closestFunctionParent:y,vNodePath:g,domPath:v})}}a?.(l)},{flushAndTeardown:()=>{if(Nt.diffed=a,!i){i=!0;for(const{attr:l,tag:c,reactValue:u,domElement:d,suspendedAtCapture:p,closestFunctionParent:m,vNodePath:f,domPath:h}of r){if(!d.isConnected)continue;const g=d.getAttribute(l);
42if(g===u)continue;const y=p.length>0;t&&console.warn(`🏷️ Attr mismatch on <${c} ${l}>: Preact="${u}" vs DOM="${g}" [suspended=${p.join(",")||"none"}, parent=${m??"unknown"}, domPath=${h.join(" < ")||"unknown"}]`),e.log("attr_mismatch",`Preact ${l} !== DOM ${l} at hydration`,{attr:l,tag:c,reactValue:Ol.has(l)?u:"[redacted]",domValue:Ol.has(l)?g:"[redacted]",suspendedAtCapture:y?p.join(","):void 0,closestFunctionParent:m??void 0,vNodePath:f.length?f.join(" < "):void 0,domPath:h.length?h.join(" < "):void 0}),e.counter({name:"attr_mismatch",value:1,attributes:{attr:l,tag:c,hadSuspendingBoundaries:y,closestFunctionParent:m??"unknown"}})}r.length=0}}}}const p3=["font[_mstmutation]",".bb-custom-select-container",".bb-customSelect",'[id$="burner-mail-btn"]',".v-dialog__container",".v-snack"].join(", "),m3=new Set([23428825089,45711851521,66006450177,76695699457,106403332097,106885808129,135675215873,136552710145,174633091073,174633418753,174633648129,174633844737,258397700097,260513136641,304348790785,316208381953]);function TP({apiClientId:e,excessDomChildren:t,hasPriorMismatch:n,serverUserAgent:r,userAgent:o}){if(n||e!=null&&m3.has(e)||r!=null&&r!==o||jI(o)||o.match(/musical_ly|BytedanceWebview/)||o.split(" ").includes("Playwright-checkout-e2e-tests/local")||o.includes("HeadlessChrome"))return!1;const i=Element.prototype.matches;return typeof i!="function"?!0:t.every(a=>!(a instanceof Element)||!i.call(a,p3))}function wP(){const e=new WeakSet;return{register(t,n){const r=n instanceof Element?n:null,o=n?.parentElement??null;let i=!1;for(let a=r??o;a;a=a.parentElement)if(e.has(a)){i=!0;break}if(!i){for(let a=t;a;a=a.__)if(e.has(a)){i=!0;break}}r&&e.add(r),o&&e.add(o),e.add(t);for(let a=t.__;a;a=a.__)if(typeof a.type=="string"){e.add(a);break}return i}}}function LP(e){const t=e.querySelector("nav ol");if(!t)return;const n=Array.from(t.children);return{count:n.length,activeIndex:n.findIndex(r=>r.getAttribute("aria-current")==="step")}}function f3(e,t,{checkout:n,client:r,environment:o,router:i,shop:a,shopPay:l,source:c,observability:u}){const d=n.identity.current.value==="shopPay",p=o.debug.preact,m=LP(t),f=wP(),h=Nt.__m;Nt.__m=(P,b)=>{if(typeof P.type=="string"){const C=P.type,I=($=!1)=>b.map(J=>{if(J instanceof Text)return`Text: ${$?"[redacted]":J.data}`;if(J instanceof Element){const ee=J.getAttribute("id");let te=ee;return ee!=null&&$&&(te=Zo(ee)??"[redacted]"),`<${J.localName}${te==null?"":` id=${te}`} class=${J.getAttribute("class")}>`}return null}).filter(Boolean),{closestFunctionParent:S,breadcrumb:k}=SP(P),E=b.find(Boolean)??P.__e??null,T=E??P.__?.__e??null,A=EP(T);if(p){console.group("🚱 Hydration mismatch"),console.log(`Detected a hydration mismatch for an element with type ${C}
43${Wn(P)}`),S&&typeof S.type=="function"&&console.log(`The closest function parent is ${Wn(S)}`),k.length&&console.log(`Component path: ${k.join(" < ")}`),A.length&&console.log(`DOM ancestry: ${A.join(" < ")}`);const $=I();$.length?console.log(`The different DOM nodes available compared to the hydrated ones were ${$.join(", ")}`):console.log("There were no available DOM nodes, this could be due to a prior mismatch."),console.log("ℹ️ Learn about hydration mismatches: https://videobin.shopify.io/v/gvR4rL"),console.groupEnd()}const R=Hl(window.location.href,{isShopPayActive:d,shopPay:l}),L=_t(()=>{const $=n.configuration.branding.shell.configuration;return{shellHeaderShowHeader:n.configuration.visibility.showHeader,shellHeaderLogoVisibility:$.header.logo?.visibility,shellHeaderCartLinkVisibility:$.cartLink.visibility,shellHeaderIsShopOnWeb:Zn(i.currentUrl.value.search),shellHeaderPrefersDarkMode:r.prefersDarkMode.value}}),M=_t(()=>({cartLinkShopHasStorefront:a.hasStorefront,cartLinkSourceType:c.type,cartLinkHasCartReturnUrl:!!c.cartReturnUrl})),D=yP.current,N=D&&{breadcrumbIds:D.ids,breadcrumbActiveId:D.activeId,breadcrumbShowCartLink:D.showCartLink,breadcrumbHasCartUrl:D.hasCartUrl},U=I(!0),z=S&&typeof S.type=="function"?Wn(lf(S)):void 0,O=r.unstable_getSerialization("serverUserAgent"),K=O!=null&&O!==r.userAgent,X=TP({apiClientId:r.unstable_getSerialization("apiClientId"),excessDomChildren:b,hasPriorMismatch:f.register(P,E),serverUserAgent:O,userAgent:r.userAgent}),ne=ed(g);u.log("hydration_mismatch",`Hydration mismatch for <${C}>`,{domType:C,mismatchedVNode:Wn(lf(P)),closestFunctionParent:z,vNodePath:k.length?k.join(" < "):void 0,domPath:A.length?A.join(" < "):void 0,availableNodeTypes:U||void 0,hasDomNodes:U.length>0,isHydrating:ps.current,hasInProgressBoundaries:g.length>0,suspendedAtCapture:ne.length?ne.join(","):void 0,isActionable:X,isUADivergent:K,serverCrumbCount:m?.count,serverActiveCrumbIndex:m?.activeIndex,page:R,...L,...M,...N}),X&&o.deployStage!=="tophat"&&u.counter({name:"hydration_mismatch",value:1,attributes:{page:R}})}h&&h(P,b)};const g=[],y=d3({observability:u,debugMode:p,inProgressBoundaries:g}),{teardown:v}=AP(p,g,void 0,y.flushAndTeardown);sS(e,t),g.length===0&&v()}const vj=Object.freeze(Object.defineProperty({__proto__:null,captureServerBreadcrumb:LP,collectSuspendedBoundaryNames:ed,createPriorMismatchTracker:wP,criticalAsyncComponents:kP,hydrateApp:o3,initHydrationDebugging:IP,isActionableHydrationMismatch:TP,renderTerminalError:r3,trackSuspendingHydrations:AP},Symbol.toStringTag,{value:"Module"})),h3=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/i;function _j(e){return typeof e=="string"&&h3.test(e)}function bj(){const{shop:{id:e}}=_(),t=Hs();return w(()=>!!t.value.get(e)?.length)}function Pj({accessibilityRole:e,...t}){const n=gc(),r=n==null?"h1":`h${n}`;return ns(r,{...t,role:e==="heading"?void 0:e})}function Sj({isShippingRequired:e,isPickupSelected:t,shippingCountryCode:n,billingCountryCode:r}){return!e||t?r||n:n||r}function Ej(e,t){const n=t?e.countrySpecific[t]?.phoneMarketingDisclosure:void 0;return n===void 0?e.phoneMarketingDisclosure:n}function Cj(){return Ee(Jy)}const js=new Map;function g3(e){js.set(e,performance.now())}function RP(e){return js.has(e)}function xP(e){const t=js.get(e);if(t===void 0)return 0;const n=performance.now()-t;return MP(e),n}function y3(e,t){return RP(e)?t(xP(e)):null}function MP(e){return js.delete(e)}const kj={start:g3,exists:RP,end:xP,endAndRun:y3,remove:MP},v3=et("legal-link-modal");function Ij({handle:e,tone:t}){const{embed:n,i18n:r,shop:{merchantPolicies:o}}=_(),i=r.translate("shop_policies",{scope:e.replace(/-/g,"_")}),{localPolicies:a}=lc(),l=o.some(u=>u.handle===e)?a.find(u=>u.handle===e):void 0,c=Ke(void 0,v3);return l?.url&&zt(n?.embedder)?s(ut,{tone:t,"aria-haspopup":"dialog",onClick:()=>{n?.client?.windowOpenRequest(l.url)},children:i}):l?s(q,{children:[s(ut,{commandFor:c,tone:t,children:i}),s(Mo,{id:c,heading:i,defaultPolicy:l})]}):s(q,{children:i})}const Aj=["phone","company","firstName","lastName","countryCode"];function Tj(){const e=H().buyerIdentity,{shop:t,source:n}=_();return w(()=>!!(t.customerAccountLocationsUrl&&n.type!=="draftOrder"&&!nt(n)&&ZI(e.value?.purchasingCompany)))}var _3=(e=>(e.C1InlineModal="c1_inline_modal",e.C1Modal="c1_modal",e.C1ModalShopPay="c1_modal_shop_pay",e.C1ModalShopPaySignIn="c1_modal_shop_pay_sign_in",e.PaymentRequest="payment_request",e))(_3||{}),b3=(e=>(e.LoginLink="login_link",e.ErrorBannerConfirm="error_banner_confirm",e.ErrorModalClearEmail="error_modal_clear_email",e.ErrorModalContinue="error_modal_continue",e))(b3||{});function P3(){const{currentPage:e}=Ce().value,{router:t,observability:n,shopPay:r}=_(),{search:o,pathname:i}=t.currentUrl.value,a=i.includes("/shoppay"),{replaceShopPayInHistory:l}=_A(),c=e&&!a;return F(()=>{a&&(n.error(new NP('Attempted to render "/shoppay" route in 3 page layout, which is not supported')),n.counter({name:"shop_pay_route_not_found",value:1}),l(r.config.checkoutAsGuestUrl))},[a,n,l,r.config.checkoutAsGuestUrl]),c&&t.redirect({pathname:e.route,search:o}),null}
43class NP extends Error{constructor(t){super(t),this.name="RouteNotFoundError"}}const S3=Object.freeze(Object.defineProperty({__proto__:null,RouteNotFoundError:NP,default:P3},Symbol.toStringTag,{value:"Module"}));var E3=(e=>(e.Unknown="unknown",e.Rejected="rejected",e.Errored="errored",e.InvalidTermsCount="invalid_terms_count",e.InvalidRepaymentsCount="invalid_repayments_count",e.UserUnsynchronized="user_unsynchronized",e.InvalidShippingAddress="invalid_shipping_address",e))(E3||{});function C3(e){return{value:e.amount.toString(),currency:e.currencyCode.toUpperCase()}}function wj(e){if(!(e?.amount==null||!Number.isFinite(e.amount)||!e.currencyCode))return C3({amount:e.amount,currencyCode:e.currencyCode})}function Lj(){const e=Hs();return w(()=>Array.from(e.value.values()).filter(n=>n.length>0).length>1)}function Rj(e){const t=co(),n=e.href?"span":q,{pixelId:r,...o}=e;return s(n,{ref:o.href?t(r):void 0,children:s(an,{...o,ref:o.href?void 0:t(r)})})}function xj(){const{shop:e,observability:t}=_(),n=e.hasFlagEnabled(eA),r=x((o,i,a)=>{n&&t.log(o,`[ECP-SPI-DEBUG] ${i}`,a,{exportImmediately:!0})},[n,t]);return{enabled:n,log:r}}function Mj({endpoint:e,invokingWallet:t}){const n=Le(!1),{checkout:{wallets:r}}=_(),o=x(()=>{n.value&&(n.value=!1,r.clearActiveSession({invokingWallet:t}),e?.value?.call.closePopupWindows())},[n,e,t,r]);return B(()=>({isScrimOpen:n,closePopupWindowsAndScrim:o}),[n,o])}const Nj=e=>{if(!e)return null;const t=e.querySelector("iframe");if(!t)return null;const n=getComputedStyle(t).borderRadius;return n?.includes("px")?parseInt(n,10):null};function Dj(e){const t=V();return F(()=>{t.current=e},[e]),t.current}function Oj(e){const t=Le(void 0);return $e(()=>{const n=e.value;return()=>{t.value=n}}),t}export{gi as $,st as A,Pe as B,Bn as C,Y3 as D,Go as E,et as F,gt as G,Um as H,Me as I,nb as J,Fs as K,ut as L,yi as M,c4 as N,t4 as O,je as P,Rj as Q,rY as R,no as S,K_ as T,$t as U,R3 as V,_n as W,Fe as X,kr as Y,jr as Z,ms as _,Lt as a,nn as a$,Ob as a0,_v as a1,Zr as a2,nu as a3,co as a4,Cr as a5,sn as a6,uH as a7,Lu as a8,Et as a9,GY as aA,$Y as aB,aj as aC,dj as aD,pj as aE,ij as aF,nr as aG,_c as aH,hg as aI,hw as aJ,Tt as aK,xr as aL,N3 as aM,M3 as aN,D3 as aO,f7 as aP,rp as aQ,CR as aR,m7 as aS,Bw as aT,vg as aU,$3 as aV,i_ as aW,bc as aX,Ij as aY,wY as aZ,W3 as a_,ks as aa,Qi as ab,qL as ac,HY as ad,xj as ae,dt as af,vn as ag,Jo as ah,mu as ai,qs as aj,Vs as ak,EH as al,hb as am,fr as an,gb as ao,fb as ap,Da as aq,F2 as ar,RW as as,FY as at,ln as au,An as av,q7 as aw,Tn as ax,Tu as ay,gn as az,Vt as b,Ri as b$,hs as b0,Sr as b1,gg as b2,Y_ as b3,yc as b4,mY as b5,pv as b6,pW as b7,H7 as b8,q1 as b9,fy as bA,$g as bB,wA as bC,x3 as bD,oj as bE,FL as bF,wg as bG,gW as bH,wn as bI,ry as bJ,fY as bK,Cl as bL,mi as bM,$s as bN,cj as bO,Zg as bP,a7 as bQ,l7 as bR,c7 as bS,Gb as bT,f$ as bU,G0 as bV,m9 as bW,ay as bX,ly as bY,j3 as bZ,B0 as b_,fu as ba,uY as bb,Xx as bc,tr as bd,oo as be,gv as bf,my as bg,fi as bh,UY as bi,YY as bj,Ez as bk,Sz as bl,Hq as bm,Us as bn,_i as bo,Wu as bp,XD as bq,EW as br,CW as bs,S4 as bt,or as bu,Bd as bv,C7 as bw,Op as bx,L4 as by,Pn as bz,zs as c,so as c$,Tz as c0,Rz as c1,hy as c2,G3 as c3,Vc as c4,Nu as c5,mb as c6,B7 as c7,u7 as c8,Jb as c9,$7 as cA,fv as cB,m2 as cC,su as cD,h2 as cE,o2 as cF,d2 as cG,s2 as cH,$L as cI,eY as cJ,p$ as cK,Kc as cL,bv as cM,t1 as cN,Nl as cO,bb as cP,$c as cQ,Wg as cR,yH as cS,Xu as cT,fj as cU,k9 as cV,z$ as cW,p4 as cX,aW as cY,hj as cZ,Er as c_,n_ as ca,cY as cb,g2 as cc,Mo as cd,w7 as ce,X3 as cf,Q3 as cg,Qc as ch,zL as ci,Eu as cj,J3 as ck,Z3 as cl,zY as cm,j$ as cn,As as co,ju as cp,Yu as cq,Xz as cr,to as cs,Dc as ct,EY as cu,yb as cv,bj as cw,JM as cx,XM as cy,G7 as cz,uo as d,pY as d$,sj as d0,yl as d1,JT as d2,oa as d3,qw as d4,gl as d5,ow as d6,Nc as d7,Sc as d8,Pc as d9,_j as dA,Os as dB,J_ as dC,p_ as dD,h_ as dE,zg as dF,TF as dG,IF as dH,X7 as dI,TH as dJ,Ss as dK,ey as dL,Xv as dM,O_ as dN,Tj as dO,Ku as dP,es as dQ,N7 as dR,k$ as dS,E$ as dT,rP as dU,eW as dV,xs as dW,tU as dX,RY as dY,Tg as dZ,i2 as d_,ai as da,Wr as db,Mc as dc,Pw as dd,_s as de,Gr as df,zV as dg,Pu as dh,ys as di,R_ as dj,TY as dk,rm as dl,L_ as dm,kY as dn,BV as dp,UV as dq,T_ as dr,_u as ds,IY as dt,qV as du,VV as dv,CY as dw,Pj as dx,GL as dy,dW as dz,mG as e,Vz as e$,A9 as e0,tu as e1,n2 as e2,tY as e3,t2 as e4,X1 as e5,E7 as e6,Vq as e7,K4 as e8,Zc as e9,ro as eA,ii as eB,Z7 as eC,CA as eD,IA as eE,_a as eF,eu as eG,io as eH,Qy as eI,eU as eJ,M_ as eK,UL as eL,Il as eM,Wv as eN,Y7 as eO,PU as eP,E3 as eQ,Dj as eR,Z0 as eS,_3 as eT,_O as eU,Mg as eV,n7 as eW,y7 as eX,Cj as eY,X0 as eZ,zz as e_,Aj as ea,LY as eb,lj as ec,uj as ed,MY as ee,ou as ef,gY as eg,XR as eh,l9 as ei,Iu as ej,vi as ek,s4 as el,Bb as em,EG as en,CG as eo,F_ as ep,Vm as eq,bG as er,Mq as es,AG as et,k4 as eu,eH as ev,$G as ew,yY as ex,ts as ey,Hu as ez,Mt as f,CF as f$,_b as f0,du as f1,HD as f2,wV as f3,xN as f4,ki as f5,bV as f6,GD as f7,gj as f8,$9 as f9,A7 as fA,Ns as fB,uM as fC,Uc as fD,Oi as fE,qR as fF,$R as fG,C3 as fH,JD as fI,Ar as fJ,qc as fK,E_ as fL,J0 as fM,jq as fN,kW as fO,zc as fP,b3 as fQ,hv as fR,Ox as fS,j0 as fT,Ov as fU,kF as fV,g0 as fW,Gc as fX,G1 as fY,s_ as fZ,AF as f_,yj as fa,gN as fb,Mj as fc,R7 as fd,Nj as fe,GR as ff,Xb as fg,Kb as fh,M7 as fi,m$ as fj,p9 as fk,t7 as fl,JW as fm,XW as fn,S7 as fo,C$ as fp,x7 as fq,r$ as fr,Mi as fs,xY as ft,Oj as fu,_x as fv,yx as fw,kj as fx,Px as fy,k7 as fz,ws as g,i1 as g$,Rh as g0,F3 as g1,Yy as g2,si as g3,xh as g4,dY as g5,U7 as g6,z7 as g7,$v as g8,Vu as g9,Sn as gA,LF as gB,nY as gC,NL as gD,sM as gE,I7 as gF,VY as gG,nP as gH,bx as gI,b$ as gJ,ku as gK,IG as gL,jY as gM,DY as gN,NY as gO,TU as gP,_V as gQ,vY as gR,_Y as gS,gV as gT,bY as gU,PY as gV,Zp as gW,EV as gX,D7 as gY,Sj as gZ,Ej as g_,Ps as ga,T7 as gb,Lg as gc,PL as gd,b1 as ge,hY as gf,hW as gg,Ru as gh,aY as gi,fW as gj,yG as gk,ax as gl,wj as gm,Q7 as gn,wO as go,Ux as gp,u0 as gq,C_ as gr,Ib as gs,Ds as gt,Hb as gu,K7 as gv,jR as gw,F0 as gx,sz as gy,_7 as gz,_y as h,b7 as h$,s1 as h0,Qx as h1,Sv as h2,My as h3,O7 as h4,Zx as h5,S1 as h6,v1 as h7,F7 as h8,O9 as h9,TT as hA,QV as hB,QH as hC,WH as hD,g7 as hE,J7 as hF,AU as hG,kG as hH,o7 as hI,Ls as hJ,Ro as hK,Ze as hL,wt as hM,Ct as hN,Yq as hO,JG as hP,UG as hQ,iG as hR,ZG as hS,Eq as hT,z2 as hU,Lj as hV,Xc as hW,Jc as hX,um as hY,mW as hZ,cP as h_,iu as ha,Dy as hb,Oy as hc,TN as hd,wN as he,E1 as hf,q4 as hg,Ci as hh,Xd as hi,Gm as hj,M2 as hk,vH as hl,ub as hm,qa as hn,oN as ho,uN as hp,La as hq,fM as hr,j7 as hs,oY as ht,Vx as hu,Iy as hv,BY as hw,d7 as hx,e7 as hy,rU as hz,Fn as i,H3 as i$,tO as i0,nO as i1,Ml as i2,O0 as i3,Ll as i4,Zi as i5,fz as i6,qg as i7,v7 as i8,Gg as i9,qY as iA,aP as iB,i7 as iC,_F as iD,SY as iE,OY as iF,W7 as iG,K3 as iH,f9 as iI,yq as iJ,FT as iK,jc as iL,h7 as iM,Ng as iN,L7 as iO,lY as iP,p7 as iQ,KG as iR,qq as iS,rG as iT,LG as iU,rr as iV,MT as iW,BT as iX,iw as iY,q3 as iZ,Cc as i_,r7 as ia,I9 as ib,mj as ic,Ju as id,ev as ie,jo as ig,w4 as ih,Wc as ii,DD as ij,P7 as ik,V0 as il,uu as im,IV as io,TV as ip,AV as iq,YD as ir,P$ as is,MD as it,Wm as iu,s7 as iv,Qv as iw,jg as ix,Zy as iy,Rg as iz,an as j,z3 as j0,Im as j1,U3 as j2,S2 as j3,Cu as j4,B3 as j5,Z$ as j6,Lc as j7,V3 as j8,Cz as j9,mw as ja,Sb as jb,JY as jc,KY as jd,XY as je,$u as jf,rj as jg,nj as jh,tj as ji,ej as jj,ZY as jk,QY as jl,A_ as jm,Yx as jn,V7 as jo,vj as jp,Q as k,G as l,Wt as m,Ce as n,Ts as o,it as p,WY as q,AY as r,t_ as s,UW as t,rt as u,DO as v,sY as w,iY as x,Oc as y,Ke as z};

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.