const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["0d43e753.BrhN0Hg4.js","2c1ab0fe.Dbn2KvkT.js","4b4bc88f.z1yoAwwH.js","app.CooG55fE.js","assets/app.CcGlIMpn.css","assets/wallet-prefilled-guest-return.BZwmSkmD.css","89e2d30a.BHZyUNbR.js","25604ae0.56pfEpxV.js","dada7e07.d_Jgr9HV.js","c6b02d73.Ba1sudbg.js","051149c8.lHD9iIAq.js","69fae6d4.DwAzRqQZ.js","e03065ab.CTM9K0Hk.js","b13c0af6.D4KDplwL.js","f67abd2c.nPTvXZJz.js","e12db40c.DF32J314.js","9dba8418.NidtnoQ4.js","60a453ce.B80X1bY8.js","3d539943.CHiZMBrZ.js","b887ec56.CkWX_kYN.js","fe885b80.D6XeXzR1.js","a6e11e56.DI-bK8ds.js","assets/AdminPreviewBar.BpHI7Zwr.css","33682ee7.D0Q8WdWw.js","e77d135d.Dz0RetrO.js","c610ba76.Btl55GXs.js","66338e00.Da1xn8CS.js","28ac86c0.Dl9oBX48.js","3e6029dd.CPkH6IvK.js","assets/QRCode.BZ_m5G5a.css","30074413.B0lR3PuK.js","assets/Pressable.D9SfDfsb.css","efa0389a.BBF5Yj3v.js","22345fd4.DfRWVvfi.js","assets/Choice.CrYuHUmO.css","9f57d2aa.CuEeAtyX.js","8574876b.DdFjDDde.js","064f6ac1.DHFjHCTV.js","assets/Popover.Bi1nHaU-.css","assets/DateField.CFFsBmUK.css","598fef4e.CSEeJ9se.js","assets/PaymentIcon.gzvCNwz_.css","33d2e4fc.2Yl3W9KZ.js","assets/NumberField.CRpcZnVJ.css","39921a74.bahNnP3U.js","assets/Switch.BS8yVgoP.css","27f09e31.CJyRwTMf.js","137622f3.C5c6_eMX.js","54bf0ebb.C_P0-c6s.js","assets/Sheet.CpR5hiDV.css","d7065744.DH5rilol.js","2fdb3dd3.Dn592ndi.js","47b970b2.DCFIpVFI.js","a9fa9fda.CPgABguf.js","ca3e798e.BBho0lps.js","assets/PhoneField.uZEuHncj.css","1444e6bd.CLS56A6L.js","29034f35.7WHWnwob.js","assets/AnnouncementRuntimeExtensions.DbBB6lBJ.css","f58f39d8.CX1OVCRt.js","21cc90a2.DHzOO82q.js","2210eadb.DF0gIp_2.js","0fb2c600.JolLf_C3.js","2bac2c53.CBL7jHzd.js","7ee73f43.ChJI3xSJ.js","2a0f03e4.pwWkerbZ.js","5ef0d995.Br8DuiXF.js","dd9b68fc.DFTZGjf9.js","adeb5fdb.C5dTm0Yd.js","8498e76b.C-kNWiyY.js","2255f8fa.CYWjsjse.js","3ca8ef7e.CoLpsNbY.js","d08a6c7d.B7aDvSZI.js","d02f7b10.tFae1DZR.js","assets/createWalletValidationLogger.BEEc8l-N.css","16c1b4d1.N3IlorTu.js","ee2bb050.DSvpEDSM.js","17e57de1.C4OivbHV.js","1a6c2867.D8mTtJ_Z.js","assets/ShopPayVerificationTrigger.BnDF3H7t.css","assets/useSandboxTelemetry.BoV0vp4z.css","78ab3dd0.UjAWxVn0.js","d4ea2faa.CFmOkqFN.js","33464469.0y7iVo6f.js","ed9f2238.3jB1CnRm.js","b8733b27.zcrWwlcv.js","384a4e10.CgRnecux.js","843aa2d4.DzLKOBo3.js","7fc410e0.mP12JRDt.js","cdfd59e6.CxVDNOs9.js","3a819064.B6WEUMsF.js","ec391382.Bx3C9xNN.js","24773686.CplnJ3xw.js","assets/WalletApplePayLazy.-zu03NqF.css","7724832f.CArRsZGg.js","9655ebc9.CX4pB1Ku.js","bad03769.CXUOhHfj.js","assets/DevTools.DTK7lleS.css","abd080c1.otBkb2_E.js","2acfb1ce.0mZbMliI.js","b538640d.Dauuuzn-.js","49758c58.B9KpzE-x.js","assets/RuntimeExtension.DWkDBM73.css","7b11cac4.p4SlO03z.js","ca8e826d.v8Ae0DkP.js","assets/Avatar.gBkEAe_p.css","assets/AccountAvatar.CG_WOP4G.css","9d12dea3.ZeWiKAwo.js","b9c0319a.CZrWIGzl.js","74835653.BLveyRHP.js","4b1c22b7.Tf9Z0cR8.js","assets/BillingAddressForm.BdwN7V1K.css","910cd6e2.BdYIBApg.js","17425706.Du5FyTeZ.js","347b440c.Cr4Lo5jt.js","9ce08e25.CVFGyfHb.js","assets/EstimatedDeliveryContent.B_THySFF.css","181d38d3.CkWlyM7r.js","792bb671.B3OvVnSg.js","assets/Middot.D7Ujmshx.css","03fde911.BTI2InDD.js","assets/LocalPickupReviewMethod.aM0rPpGF.css","79974aab.BEktvauy.js","e77f7fe0.ByPUY0fc.js","assets/PaymentLine.DT05kVlY.css","60575ca1.CdLTiRSy.js","assets/DeliveryReviewMethods.DezeyHQn.css","160e80e7.CSHcDjZe.js","9e94a50b.BevpX_k4.js","2f207ddc.C-NdRVJJ.js","71ae3d5c.BgAyZsA9.js","17324a0b.Ce7T0rTN.js","b3389d5c.JToQX7EK.js","dffdfb34.BM70-hlD.js","1f5e7811.a2EjfHnG.js","assets/ShopPayLogo.87JMHPUK.css","0e67bd3b.rVVcKKmW.js","cb5cf153.DR2k6GTr.js","e3e348f2.DlRIwDFx.js","cb38e5c2.BMWpCITo.js","6fb6f9d8.D6yUmBOq.js","0b8657b8.CiDJmOSt.js","55098bf1.C9NOZwx2.js","a422df8c.Cf87EYCO.js","assets/EmptyState.BEvzDDvy.css","f49d4216.CilLybTV.js","7b0c98ea.CmmnLN9P.js","assets/TransitionHeight.CuRoM9zv.css","d22d2b80.B6GNsBAl.js","assets/VatNumberValidationField.CAYYnuvZ.css","0a30a815.BufCjQWG.js","assets/Page.BYM12A8B.css","7e8cd205.LNGy-dY9.js","5fda1420.DV9dKdjd.js","9f047e05.CvzH4-gX.js","9babe369.SH-YgBx8.js","60d61386.C15RyM04.js","656fad11.BwoZBn9X.js","f36e5f3f.BEFoY82o.js","assets/CalloutIcon.BxwwfmsJ.css","890247a7.DDCrLHqn.js","assets/FullScreenBackground.B_iZlQze.css","f8706cb6.H5idtf8V.js","0e9ee714.KXiBhcvk.js","7a8217fd.qHfhLK3T.js","assets/useShopPayProgressIntercepts.CIy8uDiZ.css","71b60e0a.DfPLdYsH.js","assets/StickyPayButton.D-gNjNDa.css","6bfea526.D62LLGBP.js","ac5a19ff.la4o1mqh.js","cc6ff67d.CxMx1fOJ.js","08a3b809.Ce8w6gv6.js","d25d1b95.DYvnxyL-.js","bf513f9c.B3u9Jber.js","e39bc11c.CPXDRKy_.js","bfe75f31.CeEm_sIx.js","assets/Tipping.BcTJoNaV.css","dfca5da5.DtiE-B_a.js","dae24aab.CVNnVl1k.js","assets/Section.CU18S7Ap.css","ddf59287._uCuCuxL.js","01973ac7.D5XeeIWW.js","58314944.C8o0ZBBk.js","945a08d6.DsBMy-Sv.js","7bc8057b.jS2i-qiP.js","assets/constants.xO_7ctnq.css","a25deb9a.e6U0ww9n.js","2b89a178.BVP6w6_h.js","b684bff6.bwJyjEIe.js","9ca7d819.NFD4561s.js","f51e663e.BOJ2cLC5.js","64de7b49.D8TZokHI.js","ca0c3e72.CvmHYoux.js","8e79be58.BLZlQ4SW.js","assets/ShippingMethodSelector.B0hio2RO.css","90e26f5f.BtzmBOQP.js","assets/SubscriptionPriceBreakdown.vTcdVGq4.css","31cc568e.95lmLO5k.js","assets/ShippingMethods.DU0m5rdF.css","65f3d4da.Bb3QiqCm.js","ca5e9c49.C4Dgo0WK.js","f3e117aa.DNLKh0Hn.js","assets/OnePage.C_uC3EPz.css","9e3968a8.Crc99nKZ.js","fc21c11a.DX71sl9j.js","e129c76e.CdUlGY39.js","f78726c8.COms9s2w.js","assets/hooks.BDst-6PZ.css","e477f96c.DtwGO4P4.js","0c0ad074.BVCUV6D7.js","assets/useShopPayButtonClassName.D-F4uQ9M.css","8fe56fc9._gTwhRQ_.js","434e3b0a.oup8Ur0H.js","87bfafec.CxwEzGHg.js","assets/PayButtonSection.CZuxzxFG.css","d2e6a587.BTa3jGZQ.js","assets/MobileOrderSummary.BlloiNDx.css","74122478.BHiyPbai.js","73a9b0a0.D8197R8-.js","86720dbb.Ctpif1U0.js","f692f62f.BHFpWwLS.js","assets/RedirectionNotice.DgiInWJ-.css","assets/PaymentMethodProgressionHost.C0BOgdmL.css","e0989459.CIFtnx6c.js","assets/RememberMeSection.JBO5WNhc.css","4ea44c06.Bq-Mkhny.js","0627daf2.CoS_jBq4.js","dfc03c53.mwpCa0Y6.js","50130ded.Dms84T1v.js","assets/KnownBuyerPaymentMethodSelector.BXqN6ZOx.css","896e8dde.DtEqBzEE.js","633ac094.BZgMP64u.js","24fcbaf6.B9Of6sC3.js","assets/PostPurchase.e2mo8B8q.css","090b00f0.CMjvEOpG.js","assets/Processing.D4vG8dn7.css","b120ac11.DChaXT4D.js","289b89e4.D4ZocZOJ.js","9011490c.Cuc26vX4.js","8c0eaf27.Ddbn1Klw.js","91319467.CDisk9qF.js","assets/ShopPayLoginLoader.B1_neltu.css","0cd5b134.D3PmATiN.js","d6972375.DoYas2DU.js","5c5c2e96.DrOQZbeh.js","f5a7bb50.C5QINtqC.js","a9ba8e86.qHITXxKm.js","909cc5d6.CNFDWHQS.js","be176b00.CeN1iCCX.js","assets/Map.cbVP6Hp_.css","0e4087ec.BYUPwOz2.js","161adb7d.B9_eDsWP.js","9f3d9f8c.CA9K4Kac.js","8d3a12c3.BB_aOzwn.js","4aab4b34.BNmUgsb7.js","assets/ThankYou.B78yzKCK.css","01f1d1bd.CwS7p3FA.js","assets/Throttle.CK6IAVuq.css","7fd9930c.CTP9ZMfg.js","assets/PaymentChallengeModal.Cz9ZxF4h.css","39bf6084.CVKFMawl.js","assets/CryptoModalManager.CqiWenQK.css","7d468a18.Dl8ddV_8.js","1d52cad1.FA5eH2Hc.js","461aedcc.CVT2FeQD.js","assets/ShopPayCheckout.CDRlDVu0.css","825eea7d.dZ8QXu1l.js","assets/TransitionProgress.DTpAQ56v.css","56bd1136.BG0dj4Cd.js","cb8fcd45.CPq8qyv5.js","4c290a1e.B19piqXD.js","assets/amazonWalletLazy.D78LrA7v.css"])))=>i.map(i=>d[i]); import{$ as e,t,m as n,v as r,h as a,T as i,N as o,G as s,F as l,am as c,an as u,u as d,b8 as p,p as m,E as h,a3 as g,i as f,M as y,o as v,s as _,ac as b,Q as k,z as P,q as S,y as w,j as C,k as E,D as x,w as I,g as A,aa as T,n as L,O as R,r as M,af as N,x as D,_ as z,B as O,ab as B,a2 as F,b9 as V,ba as U,Z as q,bb as j,a6 as H,a7 as $,P as Y,a8 as W,a9 as G,bc as K,bd as J,be as Q,bf as X,az as Z,bg as ee}from"./2c1ab0fe.Dbn2KvkT.js";import{ca as te,mI as ne,cN as re,al as ae,u as ie,d as oe,n as se,kW as le,cb as ce,w as ue,mJ as de,hF as pe,bz as me,I as he,dJ as ge,av as fe,mK as ye,U as ve,bp as _e,cF as be,cY as ke,gd as Pe,aY as Se,aX as we,y as Ce,cV as Ee,cR as xe,cQ as Ie,cW as Ae,cX as Te,cM as Le,mL as Re,mM as Me,mN as Ne,eb as De,mv as ze,mO as Oe,mP as Be,dj as Fe,bf as Ve,iX as Ue,_ as qe,ax as je,au as He,mQ as $e,jv as Ye,mR as We,mS as Ge,mT as Ke,mU as Je,mV as Qe,mW as Xe,dG as Ze,dF as et,dE as tt,mX as nt,mY as rt,ae as at,m7 as it,ba as ot,bt as st,m4 as lt,fP as ct,aL as ut,K as dt,fQ as pt,e4 as mt,mZ as ht,m_ as gt,cq as ft,m$ as yt,n0 as vt,fc as _t,kR as bt,s as kt,o as Pt,b4 as St,n1 as wt,e6 as Ct,aw as Et,dM as xt,b0 as It,eV as At,N as Tt,aM as Lt,ag as Rt,c8 as Mt,bC as Nt,v as Dt,t as zt,n2 as Ot,n3 as Bt,ka as Ft,ci as Vt,lh as Ut,em as qt,el as jt,iS as Ht,ei as $t,n4 as Yt,ek as Wt,n5 as Gt,ej as Kt,b7 as Jt,J as Qt,iz as Xt,ix as Zt,aU as en,n6 as tn,ck as nn,a4 as rn,cc as an,lH as on,bb as sn,iu as ln,n7 as cn,i as un,lY as dn,f2 as pn,W as mn,c$ as hn,mF as gn,cd as fn,iO as yn,is as vn,aH as _n,iB as bn,aO as kn,n8 as Pn,jP as Sn,n9 as wn,na as Cn,kF as En,ao as xn,mD as In,nb as An,bg as Tn,ig as Ln,kr as Rn,F as Mn,af as Nn,k9 as Dn,dv as zn,g5 as On,kT as Bn,io as Fn,br as Vn,nc as Un,bl as qn,ib as jn,ie as Hn,ia as $n,lQ as Yn,nd as Wn,kD as Gn,ne as Kn,en as Jn,g$ as Qn,h as Xn,nf as Zn,ng as er,d3 as tr,nh as nr,ez as rr,C as ar,bm as ir,eH as or,ni as sr,ih as lr,nj as cr,lg as ur,l9 as dr,nk as pr,nl as mr,nm as hr,nn as gr,Z as fr,no as yr,hT as vr,np as _r,kV as br,nq as kr,nr as Pr,ns as Sr,dA as wr,nt as Cr,nu as Er,kU as xr,nv as Ir,nw as Ar,nx as Tr,h$ as Lr,hQ as Rr,eJ as Mr,ny as Nr,nz as Dr,nA as zr,eZ as Or,nB as Br,e$ as Fr,nC as Vr,mG as Ur,l as qr,my as jr,mz as Hr,nD as $r,b9 as Yr,nE as Wr,nF as Gr,nG as Kr,mg as Jr,aK as Qr,nH as Xr,jj as Zr,jk as ea,gx as ta,nI as na,nJ as ra,jh as aa,jI as ia,nK as oa,nL as sa,nM as la,nN as ca,ch as ua,cG as da,a6 as pa,lK as ma,jG as ha,eO as ga,gb as fa,e2 as ya,c7 as va,g_ as _a,g7 as ba,gY as ka,nO as Pa,g6 as Sa,aq as wa,e0 as Ca,nP as Ea,m8 as xa,aR as Ia,iv as Aa,nQ as Ta,nR as La,R as Ra,nS as Ma,nT as Na,nU as Da,nV as za,i$ as Oa,nW as Ba,fY as Fa,fZ as Va,nX as Ua,i2 as qa,a5 as ja,nY as Ha,nZ as $a,eY as Ya,aB as Wa,hE as Ga,l5 as Ka,n_ as Ja,bn as Qa,b6 as Xa,b8 as Za,n$ as ei,o0 as ti,o1 as ni,o2 as ri,o3 as ai,o4 as ii,bo as oi,o5 as si,o6 as li,dt as ci,gQ as ui,k as di,kx as pi,o7 as mi,er as hi,iM as gi,jY as fi,d4 as yi,km as vi,aT as _i,o8 as bi,o9 as ki,oa as Pi,bh as Si,dz as wi,fr as Ci,ob as Ei,x as xi,iY as Ii,h4 as Ai,oc as Ti,od as Li,bj as Ri,bk as Mi,kf as Ni,hw as Di,jF as zi,bG as Oi,d9 as Bi,da as Fi,d5 as Vi,oe as Ui,z as qi,of as ji,B as Hi,dU as $i,aC as Yi,bW as Wi,bD as Gi,bU as Ki,og as Ji,oh as Qi,oi as Xi,hJ as Zi,oj as eo,hb as to,ok as no,j1 as ro,ol as ao,om as io,ex as oo,ct as so,ey as lo,l0 as co,on as uo,oo as po,op as mo,dH as ho,g1 as go,d7 as fo,jp as yo,jr as vo,oq as _o,or as bo,os as ko,ot as Po,dd as So,ou as wo,df as Co,iZ as Eo,ov as xo,ow as Io,ox as Ao,oy as To,gR as Lo,oz as Ro,dK as Mo,gH as No,ah as Do,d$ as zo,dL as Oo,oA as Bo,gZ as Fo,cJ as Vo,iq as Uo,jb as qo,kX as jo,jN as Ho,oB as $o,oC as Yo,oD as Wo,S as Go,jR as Ko,i8 as Jo,gV as Qo,oE as Xo,jD as Zo,oF as es,lJ as ts,lI as ns,gW as rs,gX as as,oG as is,oH as os,oI as ss,oJ as ls,h0 as cs,lB as us,g8 as ds,cf as ps,bu as ms,hM as hs,lc as gs,g4 as fs,oK as ys,bw as vs,iT as _s,j2 as bs,ac as ks,gt as Ps,gi as Ss,oL as ws,oM as Cs,oN as Es,f1 as xs,oO as Is,iw as As,ha as Ts,a7 as Ls,lw as Rs,oP as Ms,ji as Ns,jC as Ds,eI as zs,cH as Os,Q as Bs,oQ as Fs,bF as Vs,dy as Us,kP as qs,j6 as js,j7 as Hs,aV as $s,fD as Ys,it as Ws,oR as Gs,lT as Ks,eU as Js,oS as Qs,oT as Xs,oU as Zs,oV as el,m3 as tl}from"./4b4bc88f.z1yoAwwH.js";import{r as nl,w as rl,C as al,s as il,b as ol,D as sl,c as ll,d as cl}from"./69fae6d4.DwAzRqQZ.js";import{s as ul,i as dl,e as pl,S as ml,_ as hl,w as gl,t as fl,O as yl,v as vl,j as _l,m as bl,r as kl,k as Pl,l as Sl,n as wl}from"./app.CooG55fE.js";import{b as Cl,c as El,e as xl,g as Il,d as Al,s as Tl,h as Ll,I as Rl,j as Ml,f as Nl}from"./f67abd2c.nPTvXZJz.js";import{i as Dl,d as zl,c as Ol,b as Bl}from"./e12db40c.DF32J314.js";import{i as Fl}from"./9dba8418.NidtnoQ4.js";import{r as Vl,e as Ul,f as ql,d as jl,g as Hl,h as $l,A as Yl}from"./60a453ce.B80X1bY8.js";import{u as Wl}from"./3d539943.CHiZMBrZ.js";function Gl(e,t){e.error(t instanceof Error?t:new al("Required checkout profile could not be loaded",{cause:t}))}async function Kl(e,t){const{data:n}=await e.staticQuery(te,{variables:t,skip:!0}),r=n?.checkoutProfile;return r?.id===t.id&&r.activatedExtensions?r:void 0}function Jl(t,n){if(!t||e(te,t)!==e(te,n))throw new al("Required checkout profile could not be loaded")}function Ql(e){return function(e,t){if(!t)return;if(void 0!==e[t])return e[t];const n=Object.keys(re);let r;for(const a of n){const n=e[a];if(void 0!==n&&(r=n),a===t)return r}}(e,ne())}function Xl(e){if("object"!=typeof e||!e)return!1;let t=!1;for(const n of Object.keys(e)){if(!(n in re))return!1;t=!0}return t}const Zl=ae("JourneyContext"),ec=ae("JourneyProgressionContext");function tc(){const{journeyState:e,pageBeforeDetour:r,...a}=ie(Zl),{router:i,checkout:{journey:o}}=oe(),s=t(e=>{o.dispatch({type:"reopenStep",stepId:e})},[o]);return n(()=>{const t=i.currentUrl.value.normalizedPath,{plan:n,history:o,redirectTo:l,activeStep:c}=e.value,u=n.detours.find(e=>e.route===t),d=n.greenPath.find(e=>e.route===t),p=r.value,m=d??p;return{...a,plan:n,currentPage:m,currentStep:le(m,c),reopenStep:s,currentDetour:u,history:o,redirectTo:l}})}function nc(){const e=ie(ec),{detour:n,progress:a,progressing:i,completing:o,prefetch:s,negotiate:l}=e,c=t(e=>l({identifier:Symbol("journeyNegotiation"),...e}),[l]);return r(()=>({detour:n,progress:a,progressing:i,completing:o,prefetch:s,negotiate:c}),[n,a,i,o,s,c])}function rc(e){const{checkout:{negotiator:t}}=oe(),n=se(e);a(()=>t.listen((...e)=>n.current(...e)),[n,t])}function ac(e){const{checkout:{negotiator:t}}=oe(),n=se(e);a(()=>t.listenBeforeNegotiation((...e)=>n.current(...e)),[n,t])}function ic({active:e=!0}={}){const{checkout:{negotiator:t}}=oe();a(()=>{if(e)return t.block()},[t,e])}const oc=["information","shipping","payment","review"];function sc(){const e=oe().checkout.latestReceipt;return n(()=>{const t=e.value;return"processed"===t?.status?t:void 0})}function lc(){const e=sc(),n=tc(),a=i(!1),o=t(()=>(a.current=!0,a),[a]),s=t(()=>{if(a.current)return!0;const t="postPurchase"===n.value.currentDetour?.type;return!e.value||Boolean(e.value.redirectUrl)&&!t},[e,n]);return r(()=>({shouldPrevent:s,markAsEmitted:o}),[o,s])}function cc(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 uc={thankYou:"c1_typ",postPurchase:"post_purchase"};function dc(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 pc(e,t,n){const r=[e.split(/(?=[A-Z])/).join("-")];return n?r.push(n):r.push(t?t.replace("_","-"):""),r.filter(e=>Boolean(e)).join("-").toLocaleLowerCase()}function mc(e){return e.checkoutSessionIdentifier}function hc(e){return e||void 0}function gc(e){return e?ue(e):void 0}function fc(e){const t=e?.customerProfile;if(!t)return;const n=ue(t.id),r=t.email??null,a=t.firstName??null,i=t.lastName??null,o=t.phone??null;return{id:n,email:r,firstName:a,lastName:i,ordersCount:t.ordersCount??null,phone:o}}function yc({negotiated:e,shop:t,source:n}){const r=e.current.fields.merchandiseLines.value,a=e.current.fields.remoteMerchandiseDetails?.value,i=r?ge(r.lines,a):void 0,o=function(e,t){return t?t.map(t=>{const n=me(t.variantId??void 0),r=(a=t.lineAllocations,i=e,{totalAmount:wc(a.reduce((e,t)=>e+t.totalAmountAfterLineDiscounts.amount,0),a[0]?.totalAmountAfterLineDiscounts.currencyCode??i)});var a,i;const o=t.itemPrice?t.itemPrice:{amount:0,currencyCode:e};return{cost:r,merchandise:{id:n??null,image:{src:t.image?.url??null},price:o,product:{id:me(t.productId??void 0)??null,title:t.title,untranslatedTitle:t.untranslatedTitle??null,url:t.productUrl??null,vendor:t.vendor,type:t.productType},sku:t.sku??null,title:t.subtitle??null,untranslatedTitle:t.untranslatedSubtitle??null},quantity:t.quantity}}):[]}(t.currencyCode,i),s=e.current.fields.customAttributes.value??[],l=["cartNext","abandonedCart"].includes(n.type)?n.sourceId:null;let c=0,u=0,d=t.currencyCode;return(i?.flatMap(e=>e.lineAllocations)||[]).forEach(e=>{u+=e.totalAmountAfterDiscounts.amount,c+=e.quantity,d=e.totalAmountAfterDiscounts.currencyCode}),{id:l,cost:{totalAmount:wc(u,d)},lines:o,totalQuantity:c,attributes:s}}function vc({shop:e}){return{name:e.name,paymentSettings:{currencyCode:e.currencyCode},myshopifyDomain:e.myshopifyDomain,countryCode:e.countryCode,storefrontUrl:e.storefrontUrl??null}}function _c(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 bc(e){switch(e.type){case"custom":return e.discountType;case"code":return"DISCOUNT_CODE";case"automatic":return"AUTOMATIC"}}function kc(e,t){return{allocationMethod:e.allocationMethod,targetSelection:e.targetSelection,targetType:xc(e.targetType),title:e.title,type:bc(e),value:Ic(e,t)}}function Pc(e){const t=[];return e.forEach(e=>{e.allocations.forEach(e=>{const n=e.discountDetails.discount;El(n)&&t.push({amount:e.amount,discountApplication:kc(n,e.amount)})})}),t}function Sc(e,t){return wc(e.reduce((e,t)=>e+t.totalAmountAfterLineDiscounts.amount,0),e[0]?.totalAmountAfterLineDiscounts.currencyCode??t)}function wc(e,t){return{amount:Number(e.toFixed(2)),currencyCode:t}}function Cc(e){return e.sellingPlan?{sellingPlan:{id:e.sellingPlan.id,name:e.sellingPlan.name}}:null}function Ec(e){return e.map(e=>({key:e.name,value:String(e.value)}))}function xc(e){if(!e)return"";switch(e){case"MERCHANDISELINE":return"LINE_ITEM";case"DELIVERYLINE":return"SHIPPING_LINE";default:return""}}function Ic(e,t){const n=e.value;return"FixedAmountValue"===n.typename?t:{percentage:n.percentage}}function Ac(e,t,n,r){const a=!0===r?.[e],i=n?.[e]&&!0===n[e].value,o=!0===t.current.fields[e]?.value;return a||i||o||!1}function Tc(e,t){const n=new Map;return Nc(e,t).forEach(e=>{Dc(n,e),e.lineComponents.forEach(e=>Dc(n,e))}),n}function Lc(e,t,n,r,a,i=!1){const o=n?.purchaseOrder?.deliveryNext||e.current.fields.deliveryNext.value;if("filled"!==o?.status)return[];const s=e.current.fields.remoteMerchandiseDetails?.value??n?.remoteMerchandiseDetails,l=de(o.lines,s),c=(t?.deliveryLines?.value??[]).map(e=>e.fields.deliveryMethodHandle?.value).filter(Boolean),u=l.filter(e=>"available"===e.status).map(e=>e).flatMap(e=>n?e.methods.map(t=>({method:t,availableDeliveryLine:e})):c.length>0?e.methods.filter(e=>c.includes(e.handle)).map(t=>({method:t,availableDeliveryLine:e})):[]),d=i?pe(u,({method:e})=>e.cost.amount,({method:e,availableDeliveryLine:t})=>"ONE_TIME_PURCHASE"===t.type?fe(e):void 0):new Set;return u.map(({method:e,availableDeliveryLine:t},n)=>function(e,t,n){let r,a=e.cost,i=n?{...e.costAfterDiscounts,amount:0}:e.costAfterDiscounts;switch(e.methodType){case"PICK_UP":r="pickup",a=null,i=null;break;case"PICKUP_POINT":r="pickupPoint";break;case"SHIPPING":r="shipping";break;case"LOCAL":r="local";break;default:return}return{cost:a,costAfterDiscounts:i,description:e.description||null,handle:e.handle,title:e.title||null,type:r,...void 0===t?{}:{targetLineItems:t}}}(e,r&&a?function(e,t,{componentStableIdsByParent:n,parentStableIdByComponent:r}){const{targetMerchandiseLines:a}=e;if(!a)return;const i=new Set(a.map(e=>e.stableId)),o=[],s=new Set;return a.forEach(e=>{const a=r.get(e.stableId);if(void 0===a){const n=t.get(e.stableId);return void(void 0!==n&&o.push(n))}const l=(n.get(a)??[]).every(e=>i.has(e)),c=t.get(a);if(l&&void 0!==c)return void(s.has(a)||(o.push(c),s.add(a)));const u=t.get(e.stableId);void 0!==u&&o.push(u)}),o}(t,r,a):void 0,d.has(n))).filter(Boolean)}function Rc({negotiated:e,source:t,orderId:n,customerId:r,isFirstOrder:a,proposedParts:i,receipt:o,locale:s,shopCurrencyCode:l,marketDrivenShippingEnabled:c=!1}){const u=e.current.fields.contactInfo.value,d=gc(mc(t))??null,p=i?i.email.value:u?.email||o?.purchaseOrder?.email||null,m=i?i.phone.value:u?.phone||o?.purchaseOrder?.phone||null,h=e.current.fields.subtotalAfterMerchandiseDiscounts.value??o?.subtotalAfterMerchandiseDiscounts??null,g=e.current.fields.runningTotal.value??o?.checkoutTotal??null,f=g?.currencyCode??l??null,y=function(e,t,n){return Nc(e,n).map(e=>{const n=gc(e.variantId),r=e.itemPrice?e.itemPrice:{amount:0,currencyCode:t};return{discountAllocations:Pc(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:gc(e.productId)??null,title:e.title,vendor:e.vendor,type:e.productType,untranslatedTitle:e.untranslatedTitle??null,url:e.productUrl??null},sku:hc(e.sku)??null,title:e.subtitle??null,untranslatedTitle:e.untranslatedSubtitle??null},finalLinePrice:Sc(e.lineAllocations,t),sellingPlanAllocation:Cc(e),properties:Ec(e.properties),lineComponents:e.lineComponents.map(e=>function(e,t){const n=gc(e.variantId),r=e.itemPrice?e.itemPrice:{amount:0,currencyCode:t};return{discountAllocations:Pc(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:gc(e.productId)??null,title:e.title,vendor:e.vendor,type:e.productType,untranslatedTitle:e.untranslatedTitle??null,url:e.productUrl??null},sku:hc(e.sku)??null,title:e.subtitle??null,untranslatedTitle:e.untranslatedSubtitle??null},finalLinePrice:Sc(e.lineAllocations,t),sellingPlanAllocation:Cc(e),properties:Ec(e.properties)}}(e,t))}})}(e,l,o),v={selectedDeliveryOptions:Lc(e,i,o,Tc(e,o),zc(e,o),c)},_=Boolean(p)&&Ac("acceptEmailMarketing",e,i,o),b=Ac("acceptSmsMarketing",e,i,o),k=o?.smsMarketingPhone||i?.smsMarketingPhone?.value||e.current.fields.smsMarketingPhone.value||null;let P=!1;P=o?Boolean(b):b&&Boolean(k);const S=P&&k||null,w=function(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((e,t)=>{if(Cl(t)){const n=t.amount;if(!n)return e;e.push(kc(t.discount,n))}return e},[]):[]}(e,o),C=o?.totalSavings||e?.current?.fields?.totalSavings.value||null,E=cc(e)||o?.checkoutTotalTaxes||{amount:0,currencyCode:l},x=function(e,t,n,r){let a={amount:0,currencyCode:t};const i=e.current.fields.deliveryNext.value??r?.purchaseOrder?.deliveryNext;if("filled"===i?.status){const t=e.current.fields.remoteMerchandiseDetails?.value??r?.remoteMerchandiseDetails,o=de(i.lines,t),s=[];o.forEach(e=>{if("available"===e.status){const t=e.selectedDeliveryMethodHandle;if(t){const n=e.methods.filter(e=>e.handle===t&&void 0!==e.costAfterDiscounts);s.push(...n.map(t=>({line:e,method:t})))}}});const l=n?pe(s,({method:e})=>e.cost.amount,({method:e,line:t})=>"ONE_TIME_PURCHASE"===t.type?fe(e):void 0):new Set;a=s.reduce((e,{method:t},n)=>l.has(n)?e:{amount:e.amount+t.costAfterDiscounts.amount,currencyCode:t.costAfterDiscounts.currencyCode},a)}return a}(e,l,c,o),I=i?i.shippingAddress.value:e.current.fields.shippingAddress.value??o?.purchaseOrder?.shippingAddress,A={address1:I?.address1||null,address2:I?.address2||null,city:I?.city||null,country:I?.countryCode||null,countryCode:I?.countryCode||null,firstName:I?.firstName||null,lastName:I?.lastName||null,phone:I?.phone||null,province:I?.zoneCode||null,provinceCode:I?.zoneCode||null,zip:I?.postalCode||null},T=i?i.billingAddress.value:e.current.fields.billingAddress.value??o?.purchaseOrder?.billingAddress,L={address1:T?.address1||null,address2:T?.address2||null,city:T?.city||null,country:T?.countryCode||null,countryCode:T?.countryCode||null,firstName:T?.firstName||null,lastName:T?.lastName||null,phone:T?.phone||null,province:T?.zoneCode||null,provinceCode:T?.zoneCode||null,zip:T?.postalCode||null},R=function({orderId:e,customerId:t,isFirstOrder:n}){const r={id:me(t)??t??null,isFirstOrder:n??null};return{id:me(e)??e??null,customer:r}}({orderId:n,customerId:r,isFirstOrder:a}),M=e.current.fields.customAttributes.value,N=(M?.length?M:void 0)??o?.customAttributes??[],D=function(e,t,n){const r=e.current.fields.paymentLines.value?.lines,a=(r?.length?r:void 0)??n?.purchaseOrder?.paymentLines,i=[];return a?.forEach(e=>{if(!e.cost)return;let n=t||"",r="";switch(e.method.type){case"direct":case he.CreditCard:r=e.method.brand||"";break;case"deferred":r=e.method.displayName||"";break;case"redeemable":n="",r=e.method.redemptionSource;break;case"giftCard":n="gift_card",r="";break;case he.PayPal:case"bank":case"noop":case"paymentOnDelivery":case"other":case"shopWallet":r="";break;default:r=e.method.name}i.push({amount:{amount:e.cost.amount,currencyCode:e.cost.currencyCode},gateway:n,paymentMethod:{type:dc(e.method.type),name:r}})}),i}(e,o?.paymentDetails?.paymentGateway||void 0,o),z=function(e,t,n){const r=e.current.fields.buyerIdentity.value??n?.buyerIdentity;return{country:{isoCode:r?.countryCode??null},language:{isoCode:t},market:{id:r?.market?.id??null,handle:r?.market?.handle??null}}}(e,s,o);return{buyerAcceptsEmailMarketing:_,buyerAcceptsSmsMarketing:P,attributes:N,billingAddress:L,token:d,currencyCode:f,discountApplications:w,discountsAmount:C,email:p,phone:m,lineItems:y,localization:z,order:R,delivery:v,shippingAddress:A,subtotalPrice:h,shippingLine:{price:x},smsMarketingPhone:S,totalTax:E,totalPrice:g,transactions:D}}function Mc(e){return{...e,value:""}}function Nc(e,t){const n=e.current.fields.merchandiseLines.value,r=(n?.lines?.length?n:void 0)??t?.purchaseOrder?.merchandiseLines,a=e.current.fields.remoteMerchandiseDetails?.value??t?.remoteMerchandiseDetails;return r?.lines?.length?ge(r.lines,a):[]}function Dc(e,t){const n=gc(t.variantId);void 0!==n&&e.set(t.stableId,n)}function zc(e,t){const n=new Map,r=new Map;return Nc(e,t).forEach(e=>{0!==e.lineComponents.length&&(n.set(e.stableId,e.lineComponents.map(e=>e.stableId)),e.lineComponents.forEach(t=>{r.set(t.stableId,e.stableId)}))}),{componentStableIdsByParent:n,parentStableIdByComponent:r}}const Oc={sectionComplete:!0,pageSubmit:!0,shippingMethodsFilled:!0,shippingMethodSelected:!0};function Bc(e){if(!(e.type in Oc))return!1;switch(e.type){case"sectionComplete":return"contact"===e.section||"deliveryAddress"===e.section;case"pageSubmit":return"shipping"===e.step;case"shippingMethodsFilled":case"shippingMethodSelected":return"onePage"===e.step}}function Fc(e,t){if(Bc(e))return Rc(t)}function Vc(){const{checkout:{negotiator:e}}=oe(),t=e.current.fields.buyerIdentity;return n(()=>{const e=t.value?.customerProfile;return Boolean("BusinessCustomerProfile"===e?.__typename&&e?.checkoutExperienceConfiguration?.editableShippingAddress)})}function Uc(){const[e,t]=s(!1);return l(()=>{t("undefined"!=typeof window&&window.matchMedia("(prefers-reduced-motion: reduce)").matches)},[]),a(()=>{if("undefined"==typeof window)return;const e=window.matchMedia("(prefers-reduced-motion: reduce)"),n=()=>{t(e.matches)};return e.addListener(n),()=>{e.removeListener(n)}},[]),e}function qc(e){return t=>`${e}${t}`}function jc(e,t){const n=c().replace(/:/g,"");return e??t(n)}const Hc="PortalHost",$c="data-portal-order";function Yc(e){e.setAttribute($c,String(performance.now()))}function Wc(e){let t=null,n=-1;for(let r=e?.firstElementChild??null;r;r=r.nextElementSibling){if("true"===r.firstElementChild?.getAttribute("data-popper-hidden"))continue;const e=Number(r.getAttribute($c));e>n&&(n=e,t=r)}return t}function Gc(e){const t=function(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}(e),n=Wc(document.getElementById(Hc));return t.some(e=>e instanceof Node&&n?.contains(e))}function Kc(e){if(!e)return!1;const t=Wc(document.getElementById(Hc));return t?.contains(e)??!1}function Jc(e){if(!e)return!1;const t=document.getElementById(Hc);return t?.contains(e)??!1}const Qc=qc("Portal");function Xc(){return d("div",{id:Hc})}function Zc({children:e}){const[t,n]=s(null),r=jc(void 0,Qc);return a(()=>{const e=document.getElementById(Hc)??document.body,t=document.createElement("div");return t.setAttribute("id",r),Yc(t),e.appendChild(t),n(t),()=>{e.removeChild(t)}},[r]),t&&u(e,t)}class eu extends Error{constructor(){super(...arguments),this.name="SpriteLoadError",this.groupingHash="checkout-web-ui:sprite-load-error"}}function tu(e,t){return new eu(`Failed to fetch sprite "${function(e){try{const t=new URL(e);return t.username="",t.password="",t.search="",t.hash="",t.toString()}catch{const t=e.indexOf("#"),n=-1===t?e:e.slice(0,t),r=n.indexOf("?");return-1===r?n:n.slice(0,r)}}(e)}": ${t}`)}function nu(e,t){return t instanceof eu?t:tu(e,t instanceof Error?t.message:String(t))}const ru={errorClass:"SpriteLoadError",severity:"warning"};function au(e,t){try{return iu.ensureFetched(e)}catch(n){throw iu.reportLoadFailure(e,n,t),n}}const iu=new class{#e=new Map;#t=new Set;ensureFetched(e){const t=this.#e.get(e);if("resolved"===t?.status)return t.content;if("rejected"===t?.status)throw t.error;if("pending"===t?.status)throw t.promise;throw this.#n(e)}reportLoadFailure(e,t,n){null==n||this.#t.has(e)||(this.#t.add(e),t instanceof Promise?t.catch(t=>{n.error(nu(e,t),ru)}):n.error(nu(e,t),ru))}#n(e){const t=fetch(e).then(t=>{if(!t.ok)throw tu(e,`HTTP ${t.status}`);return t.text()}).then(t=>(this.#e.set(e,{status:"resolved",content:t}),t)).catch(t=>{throw this.#e.set(e,{status:"rejected",error:nu(e,t)}),t});return this.#e.set(e,{status:"pending",promise:t}),t}},ou=["cdn.shopify.com"],su=f(null);function lu({children:e,logger:t}){const n=m([]),a=r(()=>{const e=new Set;return{logger:t,sprites:n,embed(t,r){e.has(t)||(e.add(t),n.value=[{url:t,content:r},...n.peek()])}}},[t,n]);return d(su.Provider,{value:a,children:[e,d(cu,{sprites:n})]})}function cu({sprites:e}){return d("div",{className:"_1rnsrjf0 _1fragem6y","aria-hidden":"true",children:e.value.map(({url:e,content:t})=>d("div",{"data-sprite-url":e,dangerouslySetInnerHTML:{__html:t}},e))})}function uu({iconUrl:e,allowRelativeUrl:t}){const n=m(!1);l(()=>{n.value=!0},[n]);const r=h(su),{spriteUrl:a,symbolId:i}=function(e){const t=e.indexOf("#");return-1===t?{spriteUrl:e,symbolId:""}:{spriteUrl:e.slice(0,t),symbolId:e.slice(t+1)}}(e);if(!function(e,t){let n;try{n=new URL(e)}catch{return t}return!!t||"https:"===n.protocol&&ou.includes(n.hostname)}(a,t))return console.warn(`[SpriteLoader] Blocked icon load from untrusted URL: ${a}`),null;if(!n.value)return d("span",{"aria-hidden":"true",children:d("svg",{viewBox:"0 0 14 14",focusable:"false","aria-hidden":"true"})});if(i)return d(du,{spriteUrl:a,symbolId:i});const o=au(a,r?.logger);return d("span",{dangerouslySetInnerHTML:{__html:o},"aria-hidden":"true"})}function du({spriteUrl:e,symbolId:t}){const n=h(su);if(!n)throw new ye("No sprite registry available");const r=au(e,n.logger);return l(()=>{n.embed(e,r)},[n,e,r]),d("span",{"aria-hidden":"true",children:d("svg",{viewBox:"0 0 14 14",focusable:"false","aria-hidden":"true",children:d("use",{href:`#${t}`})})})}let pu=class extends g{constructor(){super(...arguments),this.state={hasError:!1}}static getDerivedStateFromError(){return{hasError:!0}}render(){return this.state.hasError?this.props.fallback:this.props.children}};function mu({iconUrl:e,fallback:t,allowRelativeUrl:n=!1}){return d(pu,{fallback:t,children:d(p,{fallback:t,children:d(uu,{iconUrl:e,allowRelativeUrl:n})})})}const hu=f(void 0);function gu(){return h(hu)}function fu({children:e,level:t}){const n=gu(),r=t??(n??0)+1;return d(hu.Provider,{value:r,children:e})}const yu=f({colorMix:!1,customProperties:!1,flexGap:!1});function vu({children:e}){const t=r(()=>"undefined"!=typeof CSS&&CSS.supports("color","color-mix(in srgb, red 50%, white)"),[]),n=r(()=>"undefined"==typeof window||"undefined"!=typeof CSS&&CSS.supports("color","var(--test)"),[]),a=r(()=>{if("undefined"==typeof window)return!0;if(!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=1===e.scrollHeight;return e.parentNode?.removeChild(e),t},[]),i=r(()=>({colorMix:t,customProperties:n,flexGap:a}),[t,n,a]);return d(yu.Provider,{value:i,children:e})}const _u=f(null);function bu(){const e=new Map,t=new Set,n=()=>{t.forEach(e=>e())};return{getInteraction:t=>e.get(t),subscribe:e=>(t.add(e),()=>{t.delete(e)}),upsertInteraction(t){const r=e.get(t.id);r&&!Object.keys(t).some(e=>r[e]!==t[e])||(e.set(t.id,{...r,...t}),n())},deleteInteraction(t){e.delete(t)&&n()},clearInteractions(){e.clear(),n()}}}function ku({children:e}){const[t]=s(bu);return d(_u.Provider,{value:t,children:e})}const Pu="forwarding-external-new-window-message";function Su({external:e,native:t}){if(e&&t)return Pu}const wu=f(null),Cu=f(void 0),Eu=qc("Overlay");function xu({activatorRef:e,children:t}){const n=i(new Map),a=jc(void 0,Eu),[o,l]=s(()=>a),[c,u]=s(!1),[p,m]=s({}),h=r(()=>({activatorRef:e,overlayId:o,setOverlayId:l,attach(e,t){n.current?.set(e,t)},trigger(e,t){n.current?.get(e)?.(t)},active:c,setActive:u,activatorAttributes:p,setActivatorAttributes(e){Object.keys(e).every(t=>p[t]===e[t])||m(t=>({...t,...e}))}}),[e,o,n,c,p]);return d(Cu.Provider,{value:h,children:t})}function Iu({children:e}){return d(Cu.Provider,{value:void 0,children:d(wu.Provider,{value:null,children:e})})}function Au(){const e=h(Cu);if(e)return e}const Tu=f(void 0),Lu=()=>h(Tu),Ru=()=>{const e=Lu();return r(()=>({closeOverlay(t){e?.close(t)}}),[e])};function Mu({children:e}){const t=i(new Map),n=r(()=>({register(e,n){t.current.set(e,n)},unregister(e){t.current.delete(e)},close(e){t.current.get(e)?.close()}}),[t]);return d(Tu.Provider,{value:n,children:e})}const Nu=f(void 0);function Du({children:e}){const t=i({sheet:!1,modal:!1}),a=m(0),o=n(()=>a.value>0),s=r(()=>({isLocked:e=>t.current[e],lock(e){t.current[e]=!0},unlock(e){t.current[e]=!1},openModalCount:a,isModalOpen:o}),[a,o]);return d(Nu.Provider,{value:s,children:e})}function zu(e){const t=h(Nu),[n,i]=s(!1);return a(()=>()=>{t&&n&&t.unlock(e)},[t,n,e]),r(()=>{if(!t)return;const{lock:r,unlock:a,isLocked:o}=t;return{setActive(t){i(i=>("function"==typeof t?t(i):t)?o(e)&&!n?(console.warn(`Multiple <${"modal"===e?"Modal":"Sheet"} /> components cannot be rendered at the same time`),i):o(e)?i:(r(e),!0):(n&&a(e),!1))},active:n}},[t,n,e])}function Ou(e){const t=Au(),n=zu(e);return r(()=>{if(!n)return;const{active:e,setActive:r}=n;return t?{...t,setActive:r,active:e}:void 0},[t,n])}const Bu=f(void 0);function Fu({announcementEmitter:e,children:t}){return d(Bu.Provider,{value:e,children:t})}function Vu(){const e=h(Bu);if(!e)throw new ye("Missing AnnouncementContext Context ");return e}var Uu="_14u2r6s0 _1fragem121";const qu=new class{#r=new Set;#a=new Set;#i=new Map;subscribe(e){return this.#r.add(e),()=>{this.#r.delete(e),0===this.#r.size&&this.#o()}}#s(){this.#r.forEach(e=>e(Array.from(this.#a)))}#o(){this.#a.clear(),this.#i.forEach(e=>{clearTimeout(e)})}announce(e){const t=Array.from(this.#a).find(t=>t.content===e.content&&t.role===e.role);if(t){const e=this.#i.get(t);e&&clearTimeout(e),this.#i.delete(t),this.#a.delete(t)}this.#a.add(e),this.#s();const n=setTimeout(()=>{this.#i.delete(e),this.#a.delete(e),this.#s()},1e4);return this.#i.set(e,n),()=>{this.#a.delete(e),clearTimeout(n),this.#i.delete(e),this.#s()}}};function ju({content:e,role:t="status"}){return qu.announce({content:e,role:t})}function Hu(){const[e,t]=s([]),n=e.filter(e=>"status"===e.role),r=e.filter(e=>"alert"===e.role);return a(()=>qu.subscribe(e=>{t(e)}),[]),d(y,{children:[d("div",{role:"status",className:Uu,children:n.map(({content:e,role:t})=>d("span",{children:e},`${e}-${t}`))}),d("div",{role:"alert",className:Uu,children:r.map(({content:e,role:t})=>d("span",{children:e},`${e}-${t}`))})]})}var $u="rij0560 _1fragem121";const Yu=f(null);function Wu(){const e=h(Yu);if(null==e)throw new ve("No app context available");return e}function Gu(){return h(Yu)?.animatedTextFieldLabels??!1}function Ku(){return Wu().currency}function Ju(){return Wu().translate}function Qu(){return Wu().formatNumber}function Xu(){return Wu().geolocation}function Zu(){return Wu().locale}function ed(){return h(Yu)?.disableScrollIntoView??!1}function td({children:e,currency:t,embed:n,linkComponent:a,geolocation:i,locale:o,onePage:s,editor:l,redesignedChoiceLists:c,animatedTextFieldLabels:u=!1,floatTextFieldLabelsOnFocus:p=!1,translate:m,formatNumber:h,announcementEmitter:g,inlineIcons:f,logger:y,disableScrollIntoView:v}){const _=r(()=>({currency:t,embed:n,formatNumber:h,geolocation:i,linkComponent:a,locale:o,onePage:s,editor:l,redesignedChoiceLists:c,animatedTextFieldLabels:u,floatTextFieldLabelsOnFocus:p,translate:m,inlineIcons:f,logger:y,disableScrollIntoView:v}),[t,n,m,h,a,i,o,s,l,c,u,p,f,y,v]);return d(Yu.Provider,{value:_,children:d(Fu,{announcementEmitter:g,children:d(vu,{children:d(fu,{children:d(Du,{children:d(Mu,{children:d(ku,{children:[d(lu,{logger:y,children:e}),d(nd,{}),d(Hu,{})]})})})})})})})}function nd(){const e=Ju();return d(y,{children:[d("div",{id:Pu,"aria-hidden":!0,className:$u,children:e("externalNewWindow")}),d("div",{id:"forwarding-new-window-message","aria-hidden":!0,className:$u,children:e("newWindow")}),d("div",{id:"forwarding-external-message","aria-hidden":!0,className:$u,children:e("external")})]})}function rd(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 ad(e){return/^span\s+\d+$/.test(e)?e:"auto"}function id(e){return console.warn(`Invalid transform value '${String(e)}'. Expected 'none', 'translate()' or 'translate(, )' with px or % magnitudes.`),""}function od(e){return sd(e)}function sd(e){if("0"===e)return 0;const t=ke(e);return void 0===t||"px"!==t.unit&&"%"!==t.unit?void 0:"%"===t.unit?`${t.number}%`:t.number}function ld(e){if("auto"===e||"string"!=typeof e)return"auto";const t=sd(e);return void 0===t?(console.warn(`Invalid inset coordinate '${e}'. Expected a px or % size, or 'auto'. Falling back to 'auto'.`),"auto"):be(t)??"auto"}function cd(e){return dd(e,{auto:!0,fitContent:!0})}function ud(e){return dd(e,{none:!0})}function dd(e,t){if(t?.fitContent&&"fit-content"===e)return"fitContent";if(t&&e in t&&t[e])return e;if("0"===e)return"0";const n=ke(e),r=!n||"px"!==n.unit&&"%"!==n.unit&&"ch"!==n.unit&&"em"!==n.unit&&"lh"!==n.unit&&"vh"!==n.unit?void 0:be(e);if(void 0===r){const n=[t?.auto?"'auto'":void 0,t?.none?"'none'":void 0,t?.fitContent?"'fit-content'":void 0].filter(Boolean);console.warn(`Invalid size value '${String(e)}'. Expected a px, %, ch, em, lh or vh size${n.length>0?`, or ${n.join(", ")}`:""}.`)}return r}function pd(e){return`url(${JSON.stringify(e)})`}const md={auto:"flex",inline:"inlineFlex",block:"flex",none:"none"},hd={auto:"block",inline:"inline",block:"block",none:"none"},gd={auto:"inline",inline:"inline",block:"block",none:"none"},fd={auto:"grid",inline:"inlineGrid",block:"grid",none:"none"},yd=e=>hd[e],vd=e=>gd[e],_d=e=>md[e],bd=e=>fd[e],kd=f(void 0),Pd=()=>h(kd),Sd=f(!1);function wd(){return h(Sd)}const Cd=f(!1);function Ed(){return h(Cd)}const xd=new Map([["none",0],["faster",88.9],["fast",133.333],["base",200],["slow",300],["slower",450],["slowest",675]]);function Id(e,t="slow",n=!1){const[r,o]=s(!n&&e),[l,c]=s(!1),u=i(!n&&e),d=i(()=>{o(u.current),c(!1)}),p=Uc();let m="string"==typeof t?t:t.enter,h="string"==typeof t?t:t.exit;return p&&(m="none",h="none"),a(()=>{let t;e!==u.current&&(t=setTimeout(()=>{c(!0)},0)),u.current=e;const n=setTimeout(d.current,e?xd.get(m??"none"):xd.get(h??"none"));return()=>{clearTimeout(n),clearTimeout(t)}},[m,h,e]),l?e?"entering":"exiting":e===r?e?"entered":"exited":e?"enter":"exit"}var Ad={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 _94sxtbj _1fragem11u",exiting:"_94sxtbq _94sxtbk _1fragem11k",exited:"_94sxtbr _94sxtbl _1fragem11k"}};function Td({id:e,open:t,renderChildrenWhenCollapsed:n=!1,children:r,duration:o="slow",properties:s=["height"],onTransition:l}){const c=Id(t,o),u=i(null);a(()=>{l?.(c)},[c,l]);const p=new Map([["enter",()=>({height:0})],["entering",()=>({height:u?.current?.clientHeight})],["entered",()=>({height:"auto",overflow:"visible"})],["exit",()=>({height:u?.current?.clientHeight})],["exiting",()=>({height:0})],["exited",()=>({height:0})]]),m="exited"===c;return d("div",{id:e,style:{...s.includes("height")&&p.get(c)()},className:v(Ad.Transition,Ad.transitionDurationVariant[o],s.includes("opacity")&&Ad.transitionOpacity[c]),hidden:m,children:d("div",{ref:u,children:m&&!n?null:r})})}const Ld=f(void 0);function Rd({children:e,openByDefault:t,openMap:n,onToggle:a,duration:i="slow",transition:o="revealBlock"}){const s=m({}),l=m(new Set),c=r(()=>({openMap:n,onToggle:a,duration:i,transition:o,openByDefault:t,activatorIdMap:s,togglableLayoutIds:l}),[n,a,i,o,t,s,l]);return d(Ld.Provider,{value:c,children:e})}function Md({layoutId:e,activatorId:t}){const n=h(Ld);if(a(()=>{if(n&&e&&t){const{activatorIdMap:r}=n;r.value[e]||(r.value={...r.value,[e]:t})}},[n,e,t]),n&&e){const{openMap:t,onToggle:r,duration:a,transition:i,openByDefault:o,activatorIdMap:s,togglableLayoutIds:l}=n,c=`${e}-transition`,u=l.value.has(e),d=(t[e]??o)||!u;return{activatorAttributes:{"aria-controls":"revealBlock"===i?c:e,"aria-expanded":d},layoutAttributes:{"aria-labelledby":s.value[e],role:"region"},toggle:()=>{r?.({...o&&Bd(Array.from(l.value)),...t,[e]:!(t[e]??o)})},setToggleable:()=>{if(!l.value.has(e)){const t=new Set(l.value);t.add(e),l.value=t}},open:d,duration:a,transition:i,transitionId:c,isToggleable:u}}}function Nd(e,t){if(!e)return t;const{open:n,duration:r,transition:a,isToggleable:i,transitionId:o}=e;return"revealBlock"===a&&i?d(Td,{open:n,id:o,duration:r,children:t}):n?t:null}Ld.displayName="DisclosureContext";const Dd=qc("DisclosureActivator");function zd(e,t){const n=e.displayName||e.name||"Component",r=_(({id:r,toggles:a,...i},o)=>{const s=jc(r,Dd),l=Md({layoutId:a,activatorId:s});if(l){const{setToggleable:n,activatorAttributes:r,open:a,toggle:c}=l;n();const{toggleEvent:u="onPress",setAriaExpanded:p=!0}=t||{},{onPress:m,onChange:h}=i,{"aria-expanded":g,...f}=r,y={..."onPress"===u?{onPress:()=>{c(),m?.()}}:{onChange:e=>{c(),h?.(e)}},...p?r:f};return d(e,{id:s,..."onChange"===u&&{value:a},...i,...y,ref:o})}return a&&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.`),d(e,{id:r,...i,ref:o})});return r.displayName=`DisclosureActivator(${n})`,r}function Od(e){const t=_((t,n)=>{const{id:r}=t,a=Md({layoutId:r});return Nd(a,d(e,{...t,...a?.layoutAttributes,ref:n}))});return t.displayName=`DisclosureLayout(${e.displayName||e.name||"Component"})`,t}function Bd(e=[]){return"boolean"==typeof e?{}:(Array.isArray(e)?e:[e]).reduce((e,t)=>({...e,[t]:!0}),{})}function Fd(e){return"command"===e?.type&&"clipboard"===e.kind}function Vd(e){return"command"===e?.type&&"visibility"===e.kind}function Ud(e){return"command"===e?.type&&"overlay"===e.kind}function qd(e){return"interest"===e?.type}function jd(){const e=h(_u);if(null===e)throw new ve("No Interactions in context");return e}function Hd(e){const{getInteraction:t,subscribe:n}=jd(),r=()=>e?t(e):void 0;return b(n,r,r)}function $d(){const{getInteraction:e}=jd();return{showOverlay:t(t=>{const n=e(t);Ud(n)?n.open():console.warn(`No overlay found for ID "${t}".`)},[e]),hideOverlay:t(t=>{const n=e(t);Ud(n)?n.close():console.warn(`No overlay found for ID "${t}".`)},[e])}}let Yd="",Wd=[],Gd=0,Kd=0,Jd=[],Qd=!1;class Xd extends Error{}function Zd(){return Gd>=Yd.length}function ep(){return Yd[Gd++]}function tp(e){const t=Yd.substring(Kd,Gd).trim();Wd.push({type:e,text:t})}function np(){return Zd()?cp:Yd[Gd]}function rp(){const e=ep();switch(e){case up:break;case ap:tp("LEFT_PAREN");break;case ip:tp("RIGHT_PAREN");break;case"@":{for(;!hp.has(np());)ep();const e=Yd.substring(Kd,Gd);"@media"===e||"@container"===e?tp("MEDIA_TYPE"):Jd.push(`Invalid media type "${e}" starting at position ${Kd}.`);break}case op:tp("COMMA");break;case lp:case sp:t="=",Zd()||Yd[Gd]!==t||Gd++,tp("COMPARATOR");break;case dp:case pp:for(Kd++;np()!==e;)ep();tp("IDENTIFIER"),ep();break;default:if(function(e){const t=e.charCodeAt(0);return t>=48&&t<=57||t>=97&&t<=122||t>=65&&t<=90}(e)){for(;!hp.has(np());)ep();const e=Yd.substring(Kd,Gd),t=e.toLowerCase();if("and"===t||"or"===t)e!==t?Jd.push(`Keyword "${e}" is not case sensitive at position ${Kd}.`):tp("OPERATOR");else if("inline-size"===t||"block-size"===t)e!==t?Jd.push(`Property "${e}" is not case sensitive at position ${Kd}.`):tp("PROPERTY");else{if(np()===up)for(ep();!mp.has(np());)ep();tp("IDENTIFIER")}}else Jd.push(`Unexpected character "${e}" at position ${Gd}.`)}var t}const ap="(",ip=")",op=",",sp="<",lp=">",cp="\0",up=" ",dp="'",pp='"',mp=new Set([cp,ap,ip,op,sp,lp]),hp=new Set([...mp,up]);let gp=[],fp=0;function yp(e){for(const t of e)if(vp(t))return _p(),!0;return!1}function vp(e){return!kp()&&(Array.isArray(e)?e.includes(Pp().type):Pp().type===e)}function _p(){return kp()||fp++,Sp()}function bp(e,t){if(vp(e))return _p();throw new Xd(`${t}\nInstead we found this word/character: "${Pp().text}"`)}function kp(){return"EOF"===gp[fp].type}function Pp(){return gp[fp]}function Sp(){return gp[fp-1]}const wp="s-default";function Cp(){return{condition:Ep(),value:bp("IDENTIFIER","Expected an identifier").text}}function Ep(){bp("LEFT_PAREN",'Expected a condition to start with a left parenthesis "("');const e=xp();let t=null;vp("COMPARATOR")&&(t=xp(e.operator)),bp("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"}),"OPERATOR"===Pp().type){const e=bp("OPERATOR","Expected an operator");return{type:"compound-condition",left:n,right:Ep(),operator:e.text}}return n}function xp(e){const t=e?Sp():bp(["IDENTIFIER","PROPERTY"],"Expected an identifier or property"),n=bp("COMPARATOR",'Expected a comparison operator (like "<" or ">")');if(e&&e[0]===n.text[0])throw new Xd("Cannot have two different comparison operators (a less-than and a greater-than) in the same condition.");const r=bp("IDENTIFIER"===t.type?"PROPERTY":"IDENTIFIER",`Expected a ${"IDENTIFIER"===t.type?'property (like "inline-size")':'identifier (like "500px")'} to compare against.`);let a=n.text;return"IDENTIFIER"===t.type&&(a="<"===a?">":"<="===a?">=":">"===a?"<":"<="),{type:"condition",property:"PROPERTY"===t.type?t.text:r.text,operator:a,value:"PROPERTY"===t.type?r.text:t.text}}function Ip(e){try{return t=function(e){if(Qd)throw Error("Cannot tokenize recursively");for(Qd=!0,Yd=e,Wd=[],Gd=0,Kd=0,Jd=[];!Zd();)Kd=Gd,rp();if(Kd=Gd,tp("EOF"),Qd=!1,Jd.length)throw new Xd(Jd.join("\n"));return Wd}(e),gp=t,fp=0,function(){const e={responsiveType:bp("MEDIA_TYPE",'Expected a media type such as "@media" or "@container"').text,conditionalValues:[],fallbackValue:"",state:"valid"};if("@container"===e.responsiveType){const t="IDENTIFIER"===Pp().type?_p().text:wp;e.name=t}for(e.conditionalValues.push(Cp());yp(["COMMA"])&&"LEFT_PAREN"===Pp().type;)e.conditionalValues.push(Cp());if("COMMA"!==Sp().type)throw new Xd(`Expected a comma before the fallback value of "${Pp().text}"`);if(e.fallbackValue=bp("IDENTIFIER","Expected a final fallback value to be defined").text,"EOF"!==Pp().type)throw new Xd(`Expected the query to end, instead found "${Pp().text}"`);return e}()}catch(n){if(n instanceof Xd)return{state:"invalid",error:n.message};throw new Error("Unknown error",{cause:n})}var t}function Ap(e){return"string"==typeof e&&e.startsWith("@container")}function Tp(e){return"string"==typeof e&&e.startsWith("@media")}function Lp(e){if(Xl(e))return e.base;if(!Ap(e)&&!Tp(e))return e;const t=Ip(e);return"invalid"===t.state?void 0:t.fallbackValue}function Rp(e,t){if(e===t)return!0;if(Xl(e))return Object.values(e).some(e=>Rp(e,t));if(!Ap(e)&&!Tp(e))return!1;const n=Ip(e);return"invalid"!==n.state&&(n.fallbackValue===t||n.conditionalValues.some(e=>e.value===t))}function Mp(e,t){return Xl(e)?Object.fromEntries(Object.entries(e).map(([e,n])=>[e,t(n)])):t(e)}function Np(e,n){const i=h(_u);if(e&&null===i)throw new ve("No Interactions in context");const o=i?.upsertInteraction,l=i?.deleteInteraction,c="none"===n,u=r(()=>Rp(n,"none"),[n]),[d,p]=s(),[m,g]=s(u);u!==m&&(g(u),"shown"===d&&p(void 0));const f=void 0===d?!c:"shown"===d,y="hidden"===d,v="shown"===d&&u,_=t(()=>p("hidden"),[]),b=t(()=>p(e=>"hidden"===e||u?"shown":void 0),[u]),k=t(()=>p(e=>(void 0===e?c:"shown"!==e)?"shown":"hidden"),[c]);return a(()=>{if(e&&o&&l)return o({id:e,type:"command",kind:"visibility",defaultCommand:"--toggle",hide:_,show:b,toggle:k,visible:f}),()=>{l(e)}},[e,f,_,b,k,o,l]),{hidden:Boolean(e)&&y,display:e&&v?"auto":n}}function Dp(e,{overlayType:n}){const r=_(function(r,i){const{open:o}=r,{upsertInteraction:l,deleteInteraction:c}=jd(),{active:u,setActive:p}=function(e){const t=function(e){return"modal"===e||"sheet"===e?()=>{const t=zu(e),n=s(!1);if(t)return t;const[r,a]=n;return{active:r,setActive:a}}:()=>{const[e,t]=s(!1);return{active:e,setActive:t}}}(e);return t()}(n),m=Au(),{id:h,onClose:g,onHide:f}=r,y=t(()=>{p(!1),"function"==typeof g&&g(),"function"==typeof f&&f()},[p,g,f]),v=t(()=>{p(!0)},[p]);if(a(()=>()=>{h&&c(h)},[h]),a(()=>{h&&l({id:h,type:"command",kind:"overlay",overlayType:n,defaultCommand:"--toggle",close:y,open:v,toggle:()=>{u?y():v()},active:u})},[u,y,c,h,v,l]),h&&!m&&void 0===o){const t={setActive:p,open:u,onClose:y,onHide:y};return d(e,{...r,...t,ref:i})}return d(e,{...r,ref:i})});return r.displayName=`OverlayCommandTargetComponent(${e.displayName||e.name||"Component"})`,r}function zp(e){return t(t=>{"function"==typeof e?e(t):null!=e&&(e.current=t)},[e])}function Op(e,n){const r=zp(e),a=zp(n);return t(e=>{r(e),a(e)},[r,a])}const Bp=["aria-controls","aria-describedby","aria-expanded","aria-haspopup"];function Fp(e,t){return Bp.reduce((n,r)=>({...n,[r]:e?.activatorAttributes[r]??t?.[r]}),{})}const Vp=["onBlur","onClick","onFocus","onKeyDown","onMouseDown","onMouseEnter","onMouseLeave","onMouseUp","onTouchStart"];function Up(e,t){return Vp.map(n=>{return{[n]:(r=t?.[n],a=qp(n,e),function(e){const t="function"==typeof r?r(e):void 0;return a?.(e),t})};var r,a}).reduce((e,t)=>({...e,...t}),{})}function qp(e,t){return function(n){t?.trigger(e,n)}}function jp(e){const t=_(({overlay:t,...n},r)=>{const a=i(null),o=Op(r,a);return t?d(xu,{activatorRef:a,children:[d(e,{...n,ref:o}),t]}):d(e,{...n,ref:r})});return t.displayName=`OverlayActivator(${e.displayName||e.name||"Component"})`,t}function Hp(e,{focusActivatorWhenClosing:t=!1}={}){const n=_((n,r)=>{const{id:i,onClose:o,onHide:s}=n,l=Au(),c=Lu();return a(()=>(i&&c?.register(i,{close(){o?.(),s?.(),l?.setActive(!1),t&&l?.activatorRef.current?.focus({preventScroll:!0})}}),()=>{i&&c?.unregister(i)}),[i,o,s,c,l]),d(e,{...n,ref:r,id:i??l?.overlayId})});return n.displayName=`Overlay(${e.displayName||e.name||"Component"})`,n}function $p(e){if(e)return`${e}Title`}const Yp=(e,t)=>{let n=0,r=null;return function(...a){const i=Date.now();r&&(clearTimeout(r),r=null),i-n>=t&&(e.apply(this,a),n=i),r=setTimeout(()=>{e.apply(this,a),n=Date.now(),r=null},t)}},Wp=f(null);function Gp(){const e=h(Wp);if(null===e)throw new ve("No Popper in context");return e}const Kp=f({}),Jp=()=>h(Kp);function Qp(e,t){if("center"===t)return e;const n=e.startsWith("block");return`${e}Span${n?"Inline":"Block"}${"start"===t?"End":"Start"}`}function Xp(e){return Math.abs(e.left)+Math.abs(e.right)+Math.abs(e.top)+Math.abs(e.bottom)}function Zp(e,t,n){if("ltr"===n)return{position:e,alignment:t};switch(e){case"inlineStart":return{position:"inlineEnd",alignment:t};case"inlineEnd":return{position:"inlineStart",alignment:t};default:return"center"===t?{position:e,alignment:t}:{position:e,alignment:"start"===t?"end":"start"}}}function em(e,t,n,r,a,i,o){const s={x:0,y:0},l="rtl"===o?r.right-n.width:r.left,c=i?l:r.left+r.width/2-n.width/2,u=r.top+r.height/2-n.height/2;switch(e){case"inlineStart":s.x=r.left-n.width-a,"center"===t?s.y=u:"start"===t?s.y=r.top:"end"===t&&(s.y=r.bottom-n.height);break;case"inlineEnd":s.x=r.right+a,"center"===t?s.y=u:"start"===t?s.y=r.top:"end"===t&&(s.y=r.bottom-n.height);break;case"blockStart":s.y=r.top-n.height-a,"center"===t?s.x=c:"start"===t?s.x=r.left:"end"===t&&(s.x=r.right-n.width);break;case"blockEnd":s.y=r.bottom+a,"center"===t?s.x=c:"start"===t?s.x=r.left:"end"===t&&(s.x=r.right-n.width)}return s}function tm(e,t){const n=document.documentElement.clientWidth,r=document.documentElement.clientHeight,a=e.x+t.width,i=e.y+t.height;let o={left:0,right:0,top:0,bottom:0};return a>n&&(o={...o,right:n-a}),e.x<0&&(o={...o,left:-e.x}),i>r&&(o={...o,bottom:i-r}),e.y<0&&(o={...o,top:-e.y}),o}const nm=/^(block|inline)-(start|end)( span-(inline|block)-(start|end))?$/;function rm(e){return nm.test(e)}function am(e){const t=e.match(nm);if(!t)return null;const[,n,r,,a,i]=t;return{axis:n,edge:r,...a&&i?{spanAxis:a,spanEdge:i}:{}}}function im(e){const t=`${e.axis}-${e.edge}`;return e.spanAxis&&e.spanEdge?`${t} span-${e.spanAxis}-${e.spanEdge}`:t}var om={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 sm(e){if(rm(e)){const t=e.indexOf(" "),n=-1===t?e:e.slice(0,t);if(-1===t)return{position:we(n),alignment:"center"};const r=e.slice(t+1);return{position:we(n),alignment:r.includes("start")?"end":"start"}}return{position:"blockStart",alignment:"center"}}function lm(e){return e.split(",").map(e=>e.trim()).filter(e=>!!rm(e))}function cm({activator:e,children:n,hidden:a,id:o,offset:c,minInlineSize:u,positionArea:p="block-start",positionTryFallbacks:h,preventOverflow:g,sameInlineSize:f}){const{rect:y,direction:_}=function(e){const[n,r]=s(null),a=m("ltr"),o=i([]),c=i(null),u=t(()=>{null!==e&&(a.value="rtl"===window.getComputedStyle(e).direction?"rtl":"ltr",r(e.getBoundingClientRect()))},[e,a]);return l(()=>{u();const t=Yp(u,16);c.current=t,window.addEventListener("resize",u),window.addEventListener("scroll",t);for(const e of o.current)e.removeEventListener("scroll",t);const n=e?function(e){const t=[];let n=e.parentElement;for(;n;){const{overflow:e,overflowX:r,overflowY:a}=getComputedStyle(n);(/(auto|scroll|overlay)/.test(e)||/(auto|scroll|overlay)/.test(r)||/(auto|scroll|overlay)/.test(a))&&t.push(n),n=n.parentElement}return t}(e):[];o.current=n;for(const e of n)e.addEventListener("scroll",t);return()=>{window.removeEventListener("resize",u),window.removeEventListener("scroll",t);for(const e of n)e.removeEventListener("scroll",t);o.current=[],c.current=null}},[e,u]),{rect:n,direction:a.value}}(e),[b,k]=function(){const[e,n]=s(null),r=i(null),a=t(e=>{if(r.current?.disconnect(),r.current=null,null!==e&&(n(e.getBoundingClientRect()),"undefined"!=typeof ResizeObserver)){const t=new ResizeObserver(()=>{n(e.getBoundingClientRect())});t.observe(e),r.current=t}},[]);return l(()=>()=>{r.current?.disconnect()},[]),[e,a]}(),P=i(null),S=t(e=>{k(e),P.current=e},[k]),[w,C]=s(""),{current:E,parent:x}=Jp(),I=m("absolute"),{position:A,alignment:T}=sm(p),L=r(()=>{if("none"!==h)return h??function(e){const t=function(e){const t=am(e);return t?im({...t,edge:"start"===t.edge?"end":"start"}):e}(e),n=function(e){const t=am(e);if(!t)return[];const n="block"===t.axis?"inline":"block",r=t.spanAxis&&t.spanEdge?{spanAxis:"inline"===t.spanAxis?"block":"inline",spanEdge:t.spanEdge}:{};return[im({axis:n,edge:"start",...r}),im({axis:n,edge:"end",...r})]}(e);return[t,...n].join(", ")}(p)},[h,p]),{clipping:R,offsets:M,spacing:N,resolvedPosition:D,resolvedAlignment:z}=r(()=>function(e,t,n,r,{offset:a=0,preventOverflow:i=!1,sameInlineSize:o=!1,direction:s="ltr",fallbackPositions:l}={}){const{position:c,alignment:u}=Zp(e,t,s),d=l?.map(({position:e,alignment:t})=>Zp(e,t,s)),p={x:0,y:0};let m={left:0,right:0,top:0,bottom:0},h=0,g=c,f=u;if(!n||!r)return{offsets:p,clipping:m,spacing:h,resolvedPosition:g,resolvedAlignment:f};const y=em(c,u,n,r,a,o,s);if(p.x=y.x,p.y=y.y,i){if(m=tm(p,n),function(e,t){const n=0!==t.top||0!==t.bottom,r=0!==t.left||0!==t.right;return"blockStart"===e||"blockEnd"===e?n:n||r}(c,m)&&d?.length){const e=Xp(m);for(const t of d){const e=em(t.position,t.alignment,n,r,a,o,s),i=tm(e,n);if(0===Xp(i)){p.x=e.x,p.y=e.y,m=i,g=t.position,f=t.alignment;break}}if(Xp(m)>0){let t=e;for(const e of d){const i=em(e.position,e.alignment,n,r,a,o,s),l=tm(i,n),c=Xp(l);c({clipping:R,offsets:M,position:D,alignment:z,popperRect:b,referenceRect:y,spacing:N}),[R,M,D,z,b,y,N]);return l(()=>{const t=e&&function(e){let t=e.parentElement;for(;t&&t!==document.body;){const{position:e}=getComputedStyle(t);if("fixed"===e||"sticky"===e)return!0;t=t.parentElement}return!1}(e)?"fixed":"absolute";I.value=t;const n="absolute"===t?window.scrollX||window.pageXOffset:0,r="absolute"===t&&(window.scrollY||window.pageYOffset||-parseInt(document.body.style.top,10))||0,{x:a,y:i}=function({x:e,y:t}){const n=window.devicePixelRatio||1;return{x:Math.round(e*n)/n||0,y:Math.round(t*n)/n||0}}({x:M.x+N+n,y:M.y+r});C((window.devicePixelRatio||1)<2?`translate(${a}px, ${i}px)`:`translate3d(${a}px, ${i}px, 0)`)},[M.x,M.y,N,e,y]),l(()=>{if(a)return;const e=P.current?.parentElement;e&&Yc(e)},[a]),d(Wp.Provider,{value:O,children:d(Zc,{children:d("div",{className:v(om.Popper,om.positionVariant[I.value],(x??E)&&om.colorSchemeVariant[x??E],a&&om.hidden),style:{...y&&{transform:w,...f&&{width:y.width},...u&&{minWidth:Se(u)}}},ref:S,id:o,"aria-hidden":a||void 0,"data-popper-hidden":a||void 0,children:x&&E?d("div",{className:om.colorSchemeVariant[E],children:n}):n})})})}var um={Arrow:"by0ptke by0ptkd _1fragemwi _1fragemzd _1fragem11z",arrowNudge:"var(--by0ptk6)",arrowPositionVariant:{blockStart:"by0ptkf",blockEnd:"by0ptkg",inlineStart:"by0ptkh",inlineEnd:"by0ptki"},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"}};function dm(e){const{children:n,id:r}=e,o=i(!1),s=Au(),{active:l=!1,setActive:c}=s??{},u=t(e=>{["Escape","Esc"].includes(e.key)&&l&&(e.preventDefault(),c?.(!1))},[l,c]);return a(()=>{if(s&&l)return document.addEventListener("keydown",u),()=>{document.removeEventListener("keydown",u)}},[s,l,u]),s?(s?.attach("onMouseEnter",()=>{o.current||c?.(!0)}),s?.attach("onMouseLeave",()=>{c?.(!1)}),s?.attach("onTouchStart",()=>{o.current=!0}),s?.attach("onClick",()=>{c?.(!l)}),d(y,{children:[l&&d("div",{role:"tooltip",className:Ce({screenReaders:"only"}),children:n}),d(pm,{id:r,open:l,onMouseEnter:()=>{o.current||c?.(!0)},onMouseLeave:()=>{c?.(!1)},children:n})]})):d(pm,{...e})}const pm=Hp(function(e){const n=_(function(n,r){const{id:o,open:l}=n,{upsertInteraction:c,deleteInteraction:u}=jd(),[p,m]=s(!1),h=i(),g=t(()=>{h.current&&(clearTimeout(h.current),h.current=void 0)},[]),f=t(({delay:e=0}={})=>{g(),e>0?h.current=setTimeout(()=>m(!1),e):m(!1)},[g]),y=t(()=>{g(),m(!0)},[g]);return a(()=>()=>{g(),o&&u(o)},[o]),a(()=>{o&&c({id:o,type:"interest",hide:f,show:y,active:p})},[p,f,o,y,c]),d(e,o&&void 0===l?{...n,open:p,ref:r}:{...n,ref:r})});return n.displayName=`InterestTargetComponent(${e.displayName||e.name||"Component"})`,n}(function({children:e,id:t,open:n,onMouseEnter:r,onMouseLeave:a}){const i=Hd(t),o=Au(),{active:s=!1}=o??{};o?.setActivatorAttributes({"aria-controls":s?t:void 0,"aria-expanded":s});const l=i?.invokerRef?.current||o?.activatorRef.current||null,c=Id(Boolean(n),{exit:"base"}),u=Boolean(t&&qd(i)&&!o),p=u?d("div",{id:t,role:"tooltip","aria-hidden":"true",className:Ce({screenReaders:"only"}),children:e}):null;return d(y,{children:[p,"exited"!==c&&d(cm,{activator:l,preventOverflow:!0,offset:8,children:d(mm,{id:u?void 0:t,transition:c,onMouseEnter:()=>{qd(i)&&i.show(),r?.()},onMouseLeave:()=>{qd(i)&&i.hide({delay:100}),a?.()},children:e})})]})}));function mm({children:e,id:t,onMouseEnter:n,onMouseLeave:r,transition:a}){const{clipping:i,spacing:o,position:s}=Gp(),l="blockStart"===s||"blockEnd"===s,c=i.right||i.left,u=l&&c?k({[um.arrowNudge]:`${c+o}px`}):void 0,p=v(um.Tooltip,um.tooltipPositionVariant[s],um.tooltipTransitionVariant[a]);return d("div",{id:t,role:"tooltip","aria-hidden":void 0===t||void 0,onMouseEnter:n,onMouseLeave:r,className:p,style:u,children:[e,d(hm,{})]})}function hm(){const{position:e}=Gp();return d("div",{className:v(um.Arrow,um.arrowPositionVariant[e])})}async function gm(e){if(navigator.clipboard?.writeText)try{return void(await navigator.clipboard.writeText(e))}catch(r){console.warn("navigator.clipboard API failed, trying fallback method",r)}if(void 0===document.execCommand)throw new ve("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 ve("Failed to copy text to clipboard")}const fm=qc("CommandInvoker");function ym(e,{commands:{clipboard:n=!0,visibility:r=!0,overlay:o=!0}={}}={}){const l=e.displayName||e.name||"Component",c=_(function({command:n,commandFor:r,onClick:o,overlay:l,...c},u){const[p,m]=s(!1),[h,g]=s(""),f=Ju(),y=Hd(r),v=Fd(y)&&null!=y.clipboard.text?y:void 0,_=t(async()=>{o?.();const{text:e,onCopy:t,onCopyError:n}=v.clipboard;let r=!1;try{await gm(e),r=!0}catch(a){console.warn("ClipboardItem: failed to copy text to clipboard",a)}finally{if(r){const e=f("clipboardCopied");g(e),m(!0),ju({content:e}),t?.()}else{const e=f("clipboardFailedToCopy");g(e),m(!0),ju({content:e}),n?.()}k(),b.current=setTimeout(()=>{m(!1)},2500)}},[o,v,f]),b=i(),k=()=>{b.current&&clearTimeout(b.current)};return a(()=>()=>k(),[]),d(e,{...c,command:n,commandFor:r,onClick:v?_:o,overlay:v?d(pm,{open:p,children:h}):l,ref:u})}),u=_(function({commandFor:t,id:n,onClick:r,...a},i){const o=jc(n,fm),s=Md({layoutId:t,activatorId:o});if(s){const{setToggleable:t,activatorAttributes:n,toggle:l}=s;t();const c={onClick:()=>{l(),r?.()},...n};return d(e,{...a,id:o,...c,ref:i})}return t&&console.warn(`${l} sets "command" property but is not wrapped inside a Disclosure component. Please ensure that the component is wrapped in a Disclosure component.`),d(e,{...a,id:n,ref:i})}),p=_(function({command:n,commandFor:r,id:a,onClick:o,...s},l){const c=jc(a,fm),{getInteraction:u,upsertInteraction:p}=jd(),m=Hd(r),h=i(null),g=Op(l,h),f=t(e=>{const t=r?u(r):void 0;if(Ud(t)){const{overlayType:n}=t;h.current&&"popover"===n&&e&&p({...t,invokerRef:h})}},[r,u,p]);if(m){let t={};if(Vd(m)){const{hide:e,show:a,toggle:i,visible:s}=m;t={onClick:()=>{switch(n){case"--hide":e();break;case"--show":a();break;case"--toggle":i()}o?.()},"aria-controls":r,"aria-expanded":s}}else if(Ud(m)){const{active:e,close:a,open:i,overlayType:s,toggle:l}=m;t={onClick:()=>{var t;switch(("--show"===n||"--toggle"===n&&!e)&&(t=h.current)instanceof HTMLElement&&document.activeElement!==t&&t.focus({preventScroll:!0}),n){case"--hide":a();break;case"--show":i();break;case"--toggle":l()}f(!e),o?.()},...("modal"===s||"sheet"===s)&&{"aria-haspopup":"dialog"},..."popover"===s&&{"aria-controls":r,"aria-expanded":e}}}return d(e,{...s,command:n,commandFor:r,id:c,...t,ref:g})}return null}),m=_(function({command:t="--auto",commandFor:a,...i},s){const m=Hd(a);if(Md({layoutId:a})&&("--hide"===t||"--show"===t||"--toggle"===t))return d(u,{...i,command:t,commandFor:a,ref:s});if(m&&!qd(m)){const{defaultCommand:e}=m,u="--auto"===t?e:t;if("--copy"===u&&n&&Fd(m))return d(c,{...i,command:u,commandFor:a,ref:s});if(("--hide"===u||"--show"===u||"--toggle"===u)&&(r&&Vd(m)||o&&Ud(m)))return d(p,{...i,command:u,commandFor:a,ref:s});if("--show"===u||"--hide"===u||"--toggle"===u||"--copy"===u){let e;Fd(m)?e="clipboard":Vd(m)?e="visibility":Ud(m)&&(e="overlay"),console.warn(`Command "${t}" targets "${a}" but ${l} does not support ${e} commands.`)}else console.warn(`Unknown command "${t}" for ${l}`)}return d(e,{...i,command:t,commandFor:a,ref:s})});return m.displayName=`CommandInvokerComponent(${l})`,m}function vm(e,{tapToggles:n=!1}={}){const r=e.displayName||e.name||"Component",o=_(function({interestFor:r,...o},s){const{onBlur:l,onClick:c,onFocus:u,onMouseEnter:p,onMouseLeave:m}=o,{getInteraction:h,upsertInteraction:g}=jd(),f=Hd(r),y=i(null),v=i(),_=i(),b=t(e=>{if(_.current?.(),_.current=void 0,!(e instanceof HTMLElement))return;const t=e=>{v.current=e.pointerType};e.addEventListener("pointerenter",t),_.current=()=>{e.removeEventListener("pointerenter",t)}},[]),k=Op(s,y),P=Op(k,b),S=t(e=>{const t=r?h(r):void 0;qd(t)&&g(e?{...t,invokerRef:y}:{...t,invokerRef:void 0})},[r,h,g]),w=qd(f)&&f.active,C=t(e=>{["Escape","Esc"].includes(e.key)&&qd(f)&&(e.preventDefault(),f.hide(),S(!1))},[f,S]);a(()=>{if(w)return document.addEventListener("keydown",C),()=>{document.removeEventListener("keydown",C)}},[w,C]);const E=t(e=>{const t=e.target;t instanceof Node&&!y.current?.contains(t)&&(t instanceof Element&&t.closest('[role="tooltip"]')||qd(f)&&(f.hide(),S(!1)))},[f,S]);if(a(()=>{if(n&&w)return document.addEventListener("click",E),()=>{document.removeEventListener("click",E)}},[w,E]),qd(f)){const t={"aria-describedby":r,onFocus:()=>{("touch"!==v.current||function(e){if(!(e instanceof HTMLElement))return!0;try{return e.matches(":focus-visible")}catch{return!0}}(y.current))&&(f.show(),S(!0)),u?.()},onBlur:()=>{f.hide(),S(!1),l?.()},onMouseLeave:()=>{f.hide({delay:100}),S(!1),m?.()},onMouseEnter:()=>{"touch"!==v.current&&(f.show(),S(!0)),p?.()},...n&&{onClick:()=>{"touch"===v.current&&(f.active?(f.hide(),S(!1)):(f.show(),S(!0))),c?.()}}};return d(e,{...o,...t,ref:P})}return d(e,{...o,ref:s})});return o.displayName=`InterestInvokerComponent(${r})`,o}const _m=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])=>Ee(e)?.map(e=>[e,t])??[[e,t]])),bm={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"},km={center:"center",end:"end",normal:"normal","space-between":"between","space-around":"around","space-evenly":"evenly",start:"start",stretch:"stretch"},Pm={baseline:"baseline",center:"center",end:"end",normal:"normal",start:"start",stretch:"stretch"},Sm={auto:"auto",hidden:"hidden"},wm={alignContent:{...km},placeContent:{...km},alignItems:{...Pm},alignSelf:{auto:"auto",baseline:"baseline",center:"center",end:"end",start:"start",stretch:"stretch"},placeItems:{...Pm},backgroundColor:{base:"base",baseSpecified:"baseSpecified",transparent:"transparent",subdued:"subdued",subdued200:"subdued200"},backgroundColorHoverAndFocus:{base:"base",transparent:"transparent",subdued:"subdued"},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:{...km},justifyItems:{...Pm},objectFit:{contain:"contain",cover:"cover",fill:"fill"},boxShadow:{none:"none",extraSmall:"extraSmall",small:"small",base:"base",large:"large",extraLarge:"extraLarge"},overflow:{...Sm},overflowBlock:{...Sm},overflowInline:{...Sm},padding:{...bm},paddingBlock:{...bm},paddingInline:{...bm},paddingBlockStart:{...bm},paddingBlockEnd:{...bm},paddingInlineStart:{...bm},paddingInlineEnd:{...bm},gap:{...bm},rowGap:{...bm},columnGap:{...bm},position:{absolute:"absolute",relative:"relative",sticky:"sticky"},zIndex:{portal:"portal"}},Cm={borderRadius:{limit:4},borderStyle:{limit:4},borderWidth:{limit:4},gap:{limit:2},insetBlock:{limit:2},insetInline:{limit:2},overflow:{limit:2},padding:{limit:4},paddingBlock:{limit:2},paddingInline:{limit:2},placeContent:{limit:2},placeItems:{limit:2}},Em={backgroundImage:pd,blockSize:cd,gridAutoColumns:e=>e,gridAutoRows:e=>e,gridColumn:ad,gridRow:ad,gridTemplateColumns:rd,gridTemplateRows:rd,inlineSize:cd,insetBlock:ld,insetBlockEnd:ld,insetBlockStart:ld,insetInline:ld,insetInlineEnd:ld,insetInlineStart:ld,maxBlockSize:ud,maxInlineSize:ud,minBlockSize:dd,minInlineSize:dd,transform:function(e){if("none"===e)return"none";if("string"!=typeof e||!e.startsWith("translate(")||!e.endsWith(")"))return id(e);const t=e.slice(10,-1).split(",");if(t.length>2)return id(e);const[n,r]=t;if(void 0===n)return id(e);const a=od(n.trim()),i=void 0===r?0:od(r.trim());return void 0===a||void 0===i?id(e):`translateX(calc(${be(a)} * ${_e.global.transformDirectionModifier})) translateY(${be(i)})`}},xm=/\s+/;function Im(e,t,{filterDefaultValues:n=!1}={}){const r={};for(const[u,d]of Object.entries(e)){if(void 0===d||""===d)continue;const e=u in Cm?Am(d,u):d;void 0!==e&&(r[u]=e)}const a=n?function(e){const t={};for(const[n,r]of Object.entries(e))n in _m&&r===_m[n]||(t[n]=r);return t}(Tm(r,t)):Tm(r,t),i=Mm(a,Em),o=Mm(a,wm),s=Ce(i),{className:l,style:c}=xe(o);return{className:v(s,l),style:c}}function Am(e,t){const{limit:n}=Cm[t];return Mp(e,e=>{if(void 0===e||"string"!=typeof e)return;const t=e.trim().split(xm,n??4);return 1===t.length?t[0]:(3===t.length&&t.push(...t.slice(1,2)),t)})}function Tm(e,t){const n={},r=(e,r)=>{const a=function(e,t){return function(e){return e.property in Em}(e)?function(e,t,n){const r=n?.transforms?.[e]??Em[e];return Mp(t,e=>{if(void 0!==e)return Te(e)?Rm(e.map(e=>r?.(e))):r?.(e)})}(e.property,e.value,t):function(e){return e.property in wm}(e)?function(e,t,n){const r=wm[e],a=t=>{const a=n?.transforms?.[e]?.(t);return r[a??t]};return Mp(t,e=>Te(e)?Rm(e.map(a)):a(e))}(e.property,e.value,t):void 0}({property:e,value:r},t),i=function(e,t){const n=Ee(e);if(!n||0===n.length)return{[e]:t};if(Xl(t)){const e=Object.entries(t),r={};for(const[t,a]of n.entries()){const n={};for(const[r,a]of e)n[r]=Ae(a)?a[t]:a;r[a]=n}return r}const r=Ae(t),a={};for(const[i,o]of n.entries())a[o]=r?t[i]:t;return a}(e,a);for(const[t,o]of Object.entries(i)){const e=Lm(o);if(void 0===e)continue;const r=n[t];if(Xl(e)&&void 0!==r){const a=Xl(r)?r:{base:r};n[t]={...a,...e}}else n[t]=e}};for(const a of Ie)a in e&&r(a,e[a]);for(const[a,i]of Object.entries(e))Ie.includes(a)||r(a,i);return n}function Lm(e){if(!Xl(e))return e;const t=Object.entries(e).filter(([,e])=>void 0!==e&&""!==e);return t.length>0?Object.fromEntries(t):void 0}function Rm(e){if(!Array.isArray(e)||2!==e.length)return e;const[t,n]=e;return[t,n,t,n]}function Mm(e,t){const n={};for(const r of Object.keys(e))r in t||(n[r]=e[r]);return n}const Nm=Object.keys(re).filter(e=>"base"!==e),Dm=new Set([">",">="]),zm=new Set(["<","<="]);function Om(e){return"inline-size"===e}function Bm(e){if("invalid"===e.state)return e;function t(e){return!!Om(e)||(console.warn(`Container queries should be based on the inline dimensions of the container. Use 'inline-size' instead of '${e}'.`),!1)}function n(e){return"compound-condition"===e.type?!("condition"===e.left.type&&!t(e.left.property)||"condition"===e.right.type&&!t(e.right.property))&&(function(e){if("and"!==e.operator)return!1;if("condition"!==e.left.type||"condition"!==e.right.type)return!1;if(e.left.property!==e.right.property)return!1;const t=e.left,n=e.right,r=parseFloat(t.value),a=parseFloat(n.value),i=Dm.has(t.operator),o=Dm.has(n.operator),s=zm.has(t.operator),l=zm.has(n.operator);return!!(i&&l||s&&o)&&(i?r:a)<(s?r:a)}(e)?function(e){const t=e.left,n=e.right,r=Dm.has(t.operator),a=Dm.has(n.operator),i=zm.has(t.operator),o=zm.has(n.operator);let s;if(r&&o)s=t;else{if(!i||!a)return console.warn("Invalid range query structure. Expected one lower bound and one upper bound."),!1;s=n}return!!Dm.has(s.operator)||(console.warn(`Mobile-first approach requires the lower bound of a range to use '>' or '>=' operators. Found '${s.operator}' in condition '${s.property} ${s.operator} ${s.value}'. Use '>' or '>=' instead.`),!1)}(e):n(e.left)&&n(e.right)):!("condition"!==e.type||!t(e.property)||!Dm.has(e.operator)&&(console.warn(`Mobile-first approach requires '>' or '>=' operators. Found '${e.operator}' in condition '${e.property} ${e.operator} ${e.value}'. Use '>' or '>=' instead.`),1))}return e.conditionalValues.every(e=>n(e.condition))?e:{state:"invalid",error:"Expected a mobile-first responsive query, instead found one that does not follow mobile-first principles."}}function Fm(e,t){if("invalid"===e.state)return e;const n=t?` for property '${t}'`:"";function r(e){return"compound-condition"===e.type?r(e.left)&&r(e.right):"condition"===e.type&&!(!Om(o=e.property)&&(console.warn(`Media queries should be based on 'inline-size'. Use 'inline-size' instead of '${o}'.`),1)||(i=e.value,!Nm.includes(i)&&("base"===i?console.warn(`Media queries should use valid breakpoints${n}. Found 'base' (use 'base' only as fallback, minimum condition is 'extraSmall'). Use one of '${Nm.join("', '")}' instead.`):console.warn(`Media queries should use valid breakpoints${n}. Found '${i}'. Use one of '${Nm.join("', '")}' instead.`),1))||(t=e.operator,a=e.value,">="!==t&&(console.warn(`Media queries should use '>=' operator${n}. Found '${t}' (expected '>=' for breakpoint '${a}').`),1)));var t,a,i,o}return e.conditionalValues.every(e=>r(e.condition))?e:{state:"invalid",error:"Expected a valid media query with breakpoint conditions, instead found invalid property, breakpoints, or operators."}}const Vm=qc("ContainerQueryStyle");function Um({cssClassNameSelector:e,property:t,value:n,config:r}){const{className:a,style:i}=Im({[t]:n},r);if(!a)return null;const o=function(e){if(qm.has(e))return qm.get(e)||null;if("undefined"==typeof document)return null;const t=e.split(" ").filter(Boolean);if(0===t.length)return null;const n=[];for(const a of Array.from(document.styleSheets))try{const e=a.cssRules||a.rules;for(const r of Array.from(e))if(r instanceof CSSStyleRule)for(const e of t)new RegExp(`\\.${e}(?![\\w-])`).test(r.selectorText)&&n.push(r.cssText)}catch{continue}const r=n.length>0?n.join("\n"):null;return qm.set(e,r),r}(a);if(!o)return null;const s=function(e,t,n){const r=e.split("\n"),a=[];for(const i of r){const e=i.match(/^([^{]+)\{([^}]+)\}/);if(!e)continue;const r=e[1],o=e[2];if(void 0===r||void 0===o)continue;const s=r.trim(),l=jm(o.trim(),n);if(s.includes("[dir=")){const e=s.match(/\[dir="[^"]+"\]/)?.[0];e&&s.match(/\.([^\s[\]]+)/)&&a.push(`${e} .${t}{${l}}`)}else a.push(`.${t}{${l}}`)}return a.join("")}(o,e,i);return s}const qm=new Map;function jm(e,t){return e.replace(/var\(--[^)]+\)/g,e=>{const n=e.match(/var\(([^)]+)\)/)?.[1];return n&&t[n]?t[n]:e})}function Hm(e){if("compound-condition"===e.type){const t=Hm(e.left),n=Hm(e.right);return`${t} ${e.operator} ${n}`}return`(${e.property} ${e.operator} ${e.value})`}function $m(e,t){const{containerQueryProps:n,mediaQueryProps:a,literalProps:i}=r(()=>{const t={},n={},r={};for(const[i,o]of Object.entries(e||{}))null!=o&&(Ap(o)?t[i]=o:Tp(o)?n[i]=o:r[i]=o);const a=new Set(Object.keys(n).flatMap(e=>Ee(e)??[e]));for(let e=a.size>0;e;){e=!1;for(const[t,i]of Object.entries(r)){if(Le(i))continue;const o=Ee(t),s=o?.at(0);if(void 0!==s&&Ym(s,i))continue;const l=o?.length?o:[t];if(l.some(e=>a.has(e))){n[t]=i,delete r[t];for(const e of l)a.add(e);e=!0}}}return{containerQueryProps:t,mediaQueryProps:n,literalProps:r}},[e]),{className:o,style:s,styleElement:l}=function(e,t){const n=jc(void 0,Vm),{containerQueryCssStrings:a,fallbackClassName:i,fallbackStyle:o}=r(()=>{const r={},a=[];if(!e)return{fallbackClassName:"",fallbackStyle:{},containerQueryCssStrings:a};for(const[s,l]of Object.entries(e)){if(!Ap(l))continue;const e=Bm(Ip(l));if("invalid"===e.state)continue;r[s]=e.fallbackValue;const i=e.conditionalValues.map(r=>{const a=Um({cssClassNameSelector:n,property:s,value:r.value,config:t});return a?`${e.responsiveType}${"@container"===e.responsiveType&&e.name?` ${e.name} `:""}${Hm(r.condition)}{${a}}`:""}).filter(Boolean).join("");a.push({property:s,cssString:i})}const{className:i,style:o}=Im(r,t);return{containerQueryCssStrings:a,fallbackClassName:i,fallbackStyle:o}},[t,e,n]),s=a.length>0?d("style",{children:a.map(({cssString:e})=>e).join("")},n):null;return{className:v(n,i),style:o,styleElement:s}}(n,t),{className:c,style:u}=function(e,t){const{className:n,style:a}=r(()=>{const n={};if(!e)return{className:"",style:{}};for(const[t,r]of Object.entries(e)){if(!Tp(r)){n[t]=r;continue}const e=Fm(Ip(r),t);if("invalid"===e.state)continue;const a={base:e.fallbackValue};for(const t of e.conditionalValues){const e=t.condition;"condition"===e.type&&(a[e.value]=t.value)}n[t]=a}return Im(n,t)},[t,e]);return{className:v(n),style:a}}(a,t),{className:p,style:m}=function(e,t){return r(()=>e&&0!==Object.keys(e).length?Im(e,t,{filterDefaultValues:!0}):{className:"",style:{}},[t,e])}(i,t);!function(e,t,n){const r=new Set,a=new Set,i=new Set,o=new Set;if(0===Object.keys(e).length&&0===Object.keys(t).length&&0===Object.keys(n).length)return;for(const[c,u]of Object.entries(e))if(Ie.includes(c)){const e=Ee(c)??[],t=e.at(0);if(void 0!==t&&Ym(t,u))continue;for(const n of e)r.add(n)}else{if(Ym(c,u))continue;r.add(c)}for(const[c,u]of Object.entries(t))if(Ie.includes(c)){const e=Ee(c)??[],t=e.at(0);if(void 0!==t&&Ym(t,u))continue;for(const n of e)a.add(n)}else{if(Ym(c,u))continue;a.add(c)}for(const[c,u]of Object.entries(n))if(Ie.includes(c)){const e=Ee(c)??[],t=e.at(0);if(void 0!==t&&Ym(t,u))continue;for(const n of e)i.add(n),o.add(n)}else{if(Ym(c,u))continue;i.add(c)}const s=new Set,l=n=>o.has(n)&&(n in t||n in e);for(const c of r)if(a.has(c)||i.has(c)){if(l(c))continue;s.add(c)}for(const c of a)if(i.has(c)){if(l(c))continue;s.add(c)}s.size>0&&console.warn(`ResponsiveStyle: style property conflicts detected - ${Array.from(s).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.`)}(n,a,i),function(e){const t=Object.keys(e).filter(t=>Le(e[t]));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.`)}(i);const h=Object.keys(n).length>0,g=Object.keys(a).length>0;return{className:v(h?o:void 0,g?c:void 0,p),style:{...s,...u,...m},styleElement:l}}function Ym(e,t){const n=_m[e];return void 0!==n&&t===n}const Wm=vm(ym(jp(_(function({ariaBusy:e,ariaHidden:t,ariaLabel:n,ariaLive:r,children:a,className:i,commandFor:o,command:s,href:l,id:c,lang:u,onClick:p,onFocus:m,onMouseEnter:h,target:g,...f},y){const v=Wu().linkComponent,_=wd(),b="function"==typeof p?()=>p():void 0,k="function"==typeof m?()=>m():void 0,P="function"==typeof h?()=>h():void 0,S=i??"_1M6e9",w=Au(),C=Up(w,{onClick:b,onFocus:k,onMouseEnter:P}),E=w?.activatorAttributes,x=!(!t&&!_)||void 0,I=x?-1:void 0;return v?d(v,{className:S,"aria-busy":e||void 0,"aria-hidden":x,"aria-label":n,"aria-live":r,href:l,id:c,lang:u,ref:y,tabIndex:I,target:g,...C,...E,...f,children:a}):d("a",{"aria-busy":e||void 0,"aria-describedby":Su({external:"_blank"===g||!1,native:!0}),"aria-label":n,"aria-live":r,"aria-hidden":x,className:S,href:l,id:c,lang:u,ref:y,rel:"_blank"===g?"noopener noreferrer":void 0,tabIndex:I,target:"_blank"===g?g:void 0,...C,...E,...f,children:a})}))));function Gm(){const e=h(Re);if(null==e)throw new ve("No theme found in context");return e}function Km(){const e=Gm();if("undefined"==typeof window)return e.configuration;const t=i();if(null!=t.current&&t.current.theme!==e&&(t.current=void 0),null==t.current){const n=e.configurationSignal,r=new Map,a={};for(const t of Object.keys(e.configuration))Object.defineProperty(a,t,{enumerable:!0,get:()=>(r.has(t)||r.set(t,P(()=>n.value[t])),r.get(t).value)});t.current={theme:e,watchedKeysSignals:r,reactiveConfiguration:a}}return t.current.reactiveConfiguration}function Jm(e,t){const{global:{cornerRadius:n}}=Km(),r=Me(n);return t?e:r??e}function Qm(e){const t=_(function({disableGlobalBranding:t,...n},r){const a=Jm(n.borderRadius,t),i=t?n:{...n,borderRadius:a};return d(e,{...i,ref:r})});return t.displayName=`GlobalBrandedComponent(${e.displayName||e.name||"Component"})`,t}const Xm=zd(Qm(vm(ym(jp(_(function({accessibilityLabel:e,accessibilityVisibility:t="visible",background:n="transparent",blockSize:r="auto",border:i="none",borderRadius:o="none",borderStyle:s,borderWidth:l,children:c,className:u,command:p,commandFor:m,controlId:h,disabled:g=!1,display:f="auto",expanded:_,href:b,id:k,inlineSize:P="auto",lang:S,loading:w=!1,maxBlockSize:C="none",maxInlineSize:E="none",minBlockSize:x="0",minInlineSize:I="0",onBlur:A,onClick:T,onFocus:L,onPointerDown:R,onPointerEnter:M,onPointerLeave:N,onPointerUp:D,overflow:z="visible",padding:O="none",paddingBlock:B,paddingInline:F,paddingBlockEnd:V,paddingBlockStart:U,paddingInlineEnd:q,paddingInlineStart:j,target:H="auto",type:$="button",...Y},W){a(()=>{null!=_&&null==h&&console.warn('When has an "expanded" prop, it should also have "controlId" defined')},[h,_]);const G=wd(),K=Au(),{className:J,style:Q,styleElement:X}=$m({backgroundColor:n,blockSize:r,...Ne({border:i,borderStyle:s,borderWidth:l}),borderRadius:o,display:f,inlineSize:P,maxBlockSize:C,maxInlineSize:E,minInlineSize:I,minBlockSize:x,padding:O,paddingBlock:B,paddingBlockEnd:V,paddingBlockStart:U,paddingInline:F,paddingInlineEnd:q,paddingInlineStart:j},{transforms:{display:yd}}),Z=v("_1s82kpb1 _1s82kpb0 _1fragemyd _1fragemws _1fragem126 _1fragemyk _1fragem12b _1fragemxw","exclusive"===t&&"_1s82kpb5 _1fragem121",J,"hidden"===z&&"_1s82kpb4 _1s82kpb3 _1fragemup _1fragemv4",G&&"_1s82kpb2 _1fragemz0",u),ee=Pd(),te=zp(W),ne=Up(K,{onClick:()=>{T?.()},onBlur:()=>{A?.()},onFocus:()=>{L?.()},onMouseEnter:()=>{M?.()},onMouseLeave:()=>{N?.()},onMouseDown:e=>{R&&0===e.button&&R?.()},onMouseUp:()=>{D?.()}}),re=w?"assertive":void 0,ae="hidden"===t||G,ie={className:Z,id:k,lang:S,style:Q,tabIndex:ae?-1:void 0,...Fp(K,{"aria-controls":h,"aria-expanded":_}),...ne,...Y};return d(y,{children:[X,d(Cd.Provider,{value:!0,children:b&&void 0===m?d(Wm,{...ie,href:b,ref:te,ariaBusy:w,ariaHidden:!!ae||void 0,ariaLive:re,ariaLabel:e,target:H,children:c}):d("button",{ref:te,type:m?"button":$,disabled:g||w,form:"submit"===$&&ee?.nested?ee.id:void 0,"aria-busy":w,"aria-hidden":!!ae||void 0,"aria-live":re,"aria-label":e,...ie,children:c})})]})})))))),Zm="generic",eh=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 th(e,{defaultRole:t=Zm,defaultElement:n="div"}={}){const r=eh.get(e??t)??eh.get(t)??eh.get(Zm);return{Element:r.element??n,role:r.role}}function nh({accessibilityLabel:e,accessibilityRole:t="generic",accessibilityVisibility:n="visible",alignContent:r,alignItems:a,background:i="transparent",backgroundHoverAndFocus:o,blockSize:s="auto",border:l="none",borderColor:c,borderRadius:u="none",borderStyle:p,borderWidth:m,children:h,columnGap:g,disableGlobalBranding:f,display:_="auto",gap:b="none",gridAutoColumns:k,gridAutoFlow:P,gridAutoRows:S,gridTemplateColumns:w="none",gridTemplateRows:C="none",id:E,inlineSize:x="auto",justifyContent:I,justifyItems:A,maxBlockSize:T="none",maxInlineSize:L="none",minBlockSize:R="0",minInlineSize:M="0",overflow:N="visible",padding:D="none",paddingBlock:z,paddingBlockEnd:O,paddingBlockStart:B,paddingInline:F,paddingInlineEnd:V,paddingInlineStart:U,placeContent:q="normal normal",placeItems:j="normal normal",rowGap:H,...$}){const Y=Md({layoutId:E}),W=Jm(u,f),G=Ed(),{Element:K,role:J}=th(t,{defaultElement:G?"span":"div"}),{className:Q,style:X,styleElement:Z}=$m({gap:b,placeContent:q,placeItems:j,alignContent:r,alignItems:a,backgroundColor:i,backgroundColorHoverAndFocus:o,blockSize:s,...Ne({border:l,borderStyle:p,borderWidth:m}),borderRadius:W,columnGap:g,display:_,gridAutoColumns:k,gridAutoFlow:P,gridAutoRows:S,gridTemplateColumns:w,gridTemplateRows:C,inlineSize:x,justifyContent:I,justifyItems:A,maxBlockSize:T,maxInlineSize:L,minBlockSize:R,minInlineSize:M,padding:D,paddingBlock:z,paddingBlockEnd:O,paddingBlockStart:B,paddingInline:F,paddingInlineEnd:V,paddingInlineStart:U,rowGap:H},{transforms:{blockSize:cd,display:bd}});return Nd(Y,d(y,{children:[Z,d(K,{"aria-hidden":"hidden"===n||void 0,"aria-label":e,className:v("_1mrl40q0 _1fragemws","exclusive"===n&&"_1mrl40q2 _1fragem121","hidden"===N&&"_1mrl40q1 _1fragemup _1fragemv4",Q),id:E,role:J,style:X,...$,...Y?.layoutAttributes,children:h})]}))}const rh=["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 ah=1,ih={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 oh=["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"],sh=["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 lh({interestFor:e,...t}){return e?d(uh,{...t,interestFor:e}):d(ch,{...t})}function ch({accessibilityLabel:e,...t}){const{className:n,children:r}=dh(t);return d("span",{role:e?"img":void 0,"aria-label":e,className:n,id:t.id,children:r})}const uh=vm(_(function({accessibilityLabel:e,"aria-describedby":t,id:n,onBlur:r,onClick:a,onFocus:i,onMouseEnter:o,onMouseLeave:s,...l},c){const{className:u,children:p}=dh(l);return d("span",{role:"img",tabIndex:t?0:void 0,id:n,ref:c,className:v(ih.InterestActivator,u),"aria-label":e,"aria-labelledby":e?void 0:t,"aria-describedby":e?t:void 0,onBlur:r,onClick:a,onFocus:i,onMouseEnter:o,onMouseLeave:s,children:p})}),{tapToggles:!0});function dh({type:e,tone:t="auto",color:n="base",size:r="base",display:a="block",className:i}){const{icons:o}=Km(),s=Wu().inlineIcons??!1;let l;e?l=e:(""===e||console.warn(`"${e}" is not a valid type`),l="empty");const c=oh.includes(l),u=sh.includes(l)?"fill":"outline";let p;switch(r){case"small":p="small-100";break;case"large":p="large-100";break;default:p=r}const m=v(ih.Icon,ih.toneVariant[t],("auto"===t||"neutral"===t)&&ih.colorVariant[n],ih.displayVariant[a],ih.sizeVariant[p],c&&ih.mirrored,ih.fillVariant[u],i);let h=function(e){const t=we(e);return t in ph?ph[t]:rh.includes(t)?t:void 0}(l);h||(console.warn(`"${l}" is not a valid type`),h="empty");const g=o[h],f=g??`/cdn/shopifycloud/checkout-web/assets/c1/assets/sprite.CxF41tjh.svg#${h}`,y=d("svg",{viewBox:"0 0 14 14",focusable:"false","aria-hidden":"true",children:d("use",{href:f})});return{className:m,children:null!=g||s?d(mu,{iconUrl:f,fallback:y,allowRelativeUrl:null==g}):y}}const ph={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"};function mh({message:e,dismiss:t}){const n=Ju();return a(()=>ju({content:e}),[e]),a(()=>{const e=setTimeout(t,5300);return()=>clearTimeout(e)},[t]),d("span",{className:"jmb5zc4 jmb5zc3 _1fragempk _1fragemnr _1fragemtb _1fragemri _1fragemy5 _1fragem120",children:d(nh,{gridAutoFlow:"column",gridTemplateColumns:"minmax(0, 1fr) minmax(auto, max-content)",gridTemplateRows:"minmax(0, 1fr)",alignItems:"center",alignContent:"center",gap:"base",children:[d("span",{children:e}),d(Xm,{onClick:t,accessibilityLabel:n("closeNotification"),children:d(lh,{type:"x",size:"small",tone:"monochrome"})})]})})}const hh=f(null);function gh({children:e,handleToast:n}){const[a,o]=s([]),l=i(0),c=t(e=>{o(t=>t.filter(t=>t.id!==e))},[]),u=t(()=>(l.current+=1,`toast-message-${l.current}`),[]),p=r(()=>({setMessages:o,removeMessage:c,createMessageId:u,handleToast:n}),[o,c,u,n]);return d(hh.Provider,{value:p,children:[e,a.length>0?d(Zc,{children:d(fh,{children:a.map(({id:e,content:t})=>d(mh,{message:t,dismiss:()=>c(e)},e))})}):null]})}function fh({children:e}){const t=Uc(),n=i(null),r=i(void 0);return l(()=>{const e=n.current;if(!e)return;const a=e.offsetHeight,i=a-(r.current??a);r.current=a,t||!e.animate||i<=0||e.animate([{transform:`translateY(${i}px)`},{transform:"translateY(0)"}],{duration:150,easing:"ease-out"})}),d("div",{ref:n,className:"_17vpdjb1 _17vpdjb0 _1fragem8m _1fragemaf _1fragemwn _1fragem132 _1fragem11a _1fragem10v _1fragem6t _1fragemcn _1fragembj _1fragem11z",children:e})}function yh(){const e=h(hh),{setMessages:n,removeMessage:r,createMessageId:a,handleToast:i}=e??{};return t(e=>{if(!n||!r||!a)throw new ve("useToast must be used within Toaster context provider");if("string"!=typeof e||"string"==typeof e&&""===e.trim())return{hide:()=>{}};if(i?.(e))return{hide:()=>{}};const t=a();return n(n=>[...n,{id:t,content:e}]),{hide:()=>r(t)}},[n,r,a,i])}function vh(e,t){if(!e)throw new TypeError(t)}function _h(e){return r(()=>De(e),[])}function bh(e,t){const n=se(t),r=i();r.current||(r.current=e.listen(n.current)),a(()=>()=>r.current?.(),[e,n])}const kh="·",Ph=150,Sh="ASAP",wh=ae("ShippingMethodsContext");function Ch(){const e=h(wh);if(null!=e)return e}function Eh(){const{observability:e}=oe();return t((t,n)=>{e.histogram({name:"checkout_delivery_promise_request_duration_ms",value:t,attributes:{apiClientId:n.toString()}})},[e])}const xh=()=>Oe((e,t)=>{switch(e){case"ignored":if("timeout"===t)return"idle";break;case"idle":if("countryChange"===t)return"debounced";if("otherAddressFieldChange"===t)return"ignored";break;case"debounced":switch(t){case"countryChange":return"debounced";case"otherAddressFieldChange":return"ignored";case"timeout":return"idle"}}},"idle"),Ih=["streetName","streetNumber","neighborhood","line2"];function Ah(e,t){const n=r(xh,[e]),i=n.value;bh(n,({previousState:e,action:n})=>{"debounced"===e&&"timeout"===n&&t()}),a(()=>{let t=!1;return e.fields.countryCode.subscribe(()=>{t&&(n.value="countryChange"),t=!0})},[e.fields.countryCode,n]),a(()=>{if("debounced"===i||"ignored"===i){const e=setTimeout(()=>{n.value="timeout"},100);return()=>{clearTimeout(e)}}},[n,i]),a(()=>{let t=!1;const r=Object.keys(e.fields).filter(e=>!["countryCode",...Ih].includes(e)).map(r=>e.fields[r].subscribe(e=>{e&&t&&(n.value="otherAddressFieldChange")}));return t=!0,()=>{r.forEach(e=>e())}},[e.fields,n])}function Th(){const{shop:{shippingRatesReloadStrategy:e}}=oe();return t(({countryCode:t,zoneCode:n})=>{try{vh("string"==typeof t,"Expected a country code");const r=e.get(t);switch(vh(null!=r,`Could not find a strategy for ${t}`),r.type){case"regional":{const e=Math.max(...r.regions.values());return null==n?e:r.regions.get(n)??e}case"national":return r.strategy}}catch{const t=e.get("ZZ");return"national"===t?.type?t.strategy:ze.Anything}},[e])}function Lh(){const{i18n:e}=oe(),t=new Map;return t.set("year",t=>e.translate("shipping.subscription_delivery_description.subscription_delivery_frequency.year",{count:t})),t.set("month",t=>e.translate("shipping.subscription_delivery_description.subscription_delivery_frequency.month",{count:t})),t.set("week",t=>e.translate("shipping.subscription_delivery_description.subscription_delivery_frequency.week",{count:t})),t.set("day",t=>e.translate("shipping.subscription_delivery_description.subscription_delivery_frequency.day",{count:t})),(e,n)=>{const r=t.get(e);return r?.(n)||""}}function Rh({proposedDeliveryLines:e,onlyShippingOneTimePurchase:t=!1}){return e.value.map(e=>e.value).reduce((e,{type:n,id:r,deliveryMethodTypes:a,deliveryMethodHandle:i})=>{const o=["SHIPPING","LOCAL"];if(t&&("ONE_TIME_PURCHASE"!==n||0===a.length||!a.some(e=>o.includes(e))))return e;const s=Fe(n,r);return{...e,[s]:i}},{})}function Mh(e,t){const n=e.value;void 0!==t?Object.entries(t).forEach(([e,t])=>{const[r,a]=e.split("-"),i=n.find(e=>{const{type:t,id:n}=e.value;return!(t!==r||a&&n&&ue(n)!==a)});i&&(i.value={...i.value,deliveryMethodHandle:t})}):n.forEach(e=>{e.value={...e.value,deliveryMethodHandle:void 0}})}function Nh(e,t,n){const{checkout:{negotiator:r}}=oe(),{parts:a}=r,i=a.deliveryLines.value;function o(e){return!n||e.deliveryMethodTypes.includes(n)}return i.find(n=>{const r=n.peek(),a=r.deliveryMethodTypes.length>0;return r.type===e&&a&&(!t||r.id===t)&&o(r)})||i.find(e=>o(e.peek()))}function Dh(e){const t=Nh(e);return Boolean(t?.fields)}function zh(e,n){const r=Nh(e,n);return[r?.fields.deliveryMethodTypes.value||[],t(e=>{r&&(r.value={...r.value,deliveryMethodTypes:e})},[r])]}function Oh({type:e="ONE_TIME_PURCHASE",id:n,deliveryMethodType:r}){const a=Nh(e,n,r);return[a?.fields.deliveryMethodHandle.value||void 0,t(e=>{a&&(a.value={...a.value,deliveryMethodHandle:e})},[a])]}function Bh(e,t){const n=Nh(e,t);return r(()=>n?.fields.deliveryMethodOptions.value.phone||w(void 0),[n])}function Fh(e,t){const n=Nh(e,t);return r(()=>n?.fields.deliveryMethodOptions.value.instructions||w(void 0),[n])}function Vh(e,a){const i="ONE_TIME_PURCHASE"===a?"SUBSCRIPTION":"ONE_TIME_PURCHASE",{checkout:{negotiator:o}}=oe(),s=o.current.fields.deliveryNext,l=t(e=>je(s.value).filter(He).find(t=>t.type===e),[s]),c=t((e,t)=>{const n=l(e),r=n?.methods.find(e=>e.methodType===t);if(r)return r},[l]),u=t(t=>{const n=e.find(e=>e.handle===t);if(!n)return;if("PICK_UP"===n.methodType){const e=l(i),t=e?.methods.find(e=>"PICK_UP"===e.methodType&&n.title===e.title);return t?.handle}const r=c(i,n.methodType);return r?.handle},[l,c,i,e]),{deliveryLines:d}=o.parts,p=n(()=>Rh({proposedDeliveryLines:d})),m=t(e=>{Mh(d,{[i]:e})},[d,i]),h=p.value;return r(()=>({inverseGroupType:i,inverseGroupDeliveryMethodHandle:h,setInverseGroupDeliveryMethodHandle:m,getInverseGroupDeliveryMethodHandle:u}),[u,h,i,m])}function Uh(){const{checkout:{negotiator:e}}=oe(),{parts:n}=e;return[Be(n.deliveryLines.peek()),t(e=>{n.deliveryLines.value.forEach(t=>{t.value={...t.value,deliveryMethodTypes:e}})},[n.deliveryLines])]}function qh(){const{negotiate:e}=nc(),{i18n:n,checkout:{negotiator:r}}=oe(),{parts:a}=r,i=yh(),o=Ve(),s=Ch();return t(({targetDeliveryMethodType:t,merchandiseStableIds:r})=>{const{orphanedMovedToShipping:l,orphanedRemovedFromCartStableIds:c}=Ue({deliveryLines:a.deliveryLines,merchandiseLines:a.merchandiseLines,targetDeliveryMethodType:t,merchandiseStableIds:r,sellableDeliveryMethodsByStableId:o.value.deliveryMethodsByMerchandise,discountLines:a.discountLines});c.length>0?i(n.translate("stock.removed_from_cart_notice")):l&&i(n.translate("split_delivery.items_moved_to_shipping_toast")),s?.dispatch?.("deliveryMethodChanged"),e({silenceViolations:qe(["deliveryNext","merchandiseLines"])})},[a.deliveryLines,a.merchandiseLines,o,a.discountLines,s,e,i,n])}function jh(){const{checkout:{negotiator:e}}=oe(),{deliveryLines:n,deliveryMacros:r}=e.parts,{negotiate:a}=nc(),i=Rh({proposedDeliveryLines:n,onlyShippingOneTimePurchase:!0}),o=r.value?.length?$e(r.value,i):void 0,s=t(async e=>{if(!e||e===o?.id)return;const t=r.value.find(({id:t})=>t===e);return t?(Mh(n,t.deliveryMethodHandles),a({silenceViolations:qe(["deliveryNext"])})):void 0},[n,r,o,a]);return{selectedMacro:o,setSelectedMacro:s}}function Hh(){const{checkout:{identity:e},shopPay:{config:{tracking:t}}}=oe(),n="shopPay"===e.current.value,a=t.unique,i=t.visit;return r(()=>{if(n)return"undefined"!=typeof window&&window.ShopPay&&(window.ShopPay.trackingUnique=a,window.ShopPay.trackingVisit=i),{trackingUnique:a,trackingVisit:i}},[a,i,n])}function $h(e){throw e}function Yh(e){return function(t){const{observability:n}=oe();a(()=>{t&&(dl(t)||pl(t)?n.log("lazy_load_failure",`[LazyLoad] ${e} failed to load`,{component:e,failure:"lazy_load",error:String(t)}):n.error(t,{metadata:{lazyLoad:{component:e,failure:"lazy_load"}}}))},[t,n])}}const Wh=ae("CheckoutSheetProtocolContext"),Gh=ae("MobileCheckoutSdkContext");function Kh(){const e=h(Wh),t=h(Gh);return null!=e?e:null!=t?t:null}function Jh({checkout:e,shop:t}){return e.configuration.isUniversalCheckoutFinalizer||t.hasFlagEnabled(Ye)}function Qh(){const{checkout:e,shop:t}=oe();return Jh({checkout:e,shop:t})}function Xh(){const{checkout:e,shop:t}=oe();return function({checkout:e,shop:t}){return Jh({checkout:e,shop:t})&&(e.configuration.isUniversalCheckoutFinalizer||t.hasFlagEnabled(We))}({checkout:e,shop:t})}class Zh extends ml{constructor(){super(...arguments),this.name="WebPixelsManagerError"}}class eg extends Error{constructor(){super(...arguments),this.name="WebPixelsManagerCheckoutNativeSdkEnabledError"}}let tg=null;const ng=ae("webPixels");function rg({children:e}){const{client:t,embed:r,environment:{services:l},checkout:{identity:c,thankYouEntrance:u,negotiator:p},observability:m,shop:h,mobileCheckoutSdk:g,source:f,router:y}=oe(),v=n(()=>"shopPay"===c.current.value).value,_=function(){const{shop:e,source:t,checkout:{negotiator:n}}=oe();return o(()=>{const r=n.current.fields.buyerIdentity.value;return{cart:yc({negotiated:n,shop:e,source:t}),customer:fc(r),shop:vc({shop:e}),purchasingCompany:_c(r)}})}(),b=Kh(),k=b?.config?.pixelEventsMode,P=r?.configuration?.pixelMode,S=Boolean(r?.isCheckoutKit({includeLegacyCsk:!1})),w="DISABLED"===k||"DISABLED"===P,{checkoutProtocolPresentedSignal:C}=p.context,E=n(()=>S&&!0===r?.isPreload&&!C.value).value,x=Xh(),I=n(()=>x&&"settled"!==u.phase.value&&(y.currentUrlMatches("/thank-you")||y.currentUrlMatches("/processing")&&null!=u.progress&&"cancelled"!==u.progress.phase.value)).value,A=l.webPixelsManager.url;l.webPixelsManager.type;const T=l.webPixelsManagerExtensions.url,L=i(),R=i(),M=i(!1),[N]=s(()=>{const e=new Promise((e,t)=>{L.current=e,R.current=t});return e.catch(()=>{}),e}),D={[tt]:h.hasFlagEnabled(tt),[et]:h.hasFlagEnabled(et),[Ze]:h.hasFlagEnabled(Ze),[Xe]:h.hasFlagEnabled(Xe),[Qe]:h.hasFlagEnabled(Qe),[Je]:h.hasFlagEnabled(Je),[Ke]:h.hasFlagEnabled(Ke),[Ge]:h.hasFlagEnabled(Ge)},z=Object.entries(D).filter(([e,t])=>t).map(([e])=>e),[O]=s({async publish(e,t,n){try{return(await N).publish(e,t,n)}catch{return!1}},async publishCustomEvent(e,t,n){try{return(await N).publishCustomEvent(e,t,n)}catch{return!1}},async publishDomEvent(e,t,n){try{return(await N).publishDomEvent(e,t,n),{type:"success"}}catch(r){return{type:"error",message:r.message}}},async subscribe(e,t,n){try{return(await N).subscribe(e,t,n)}catch{return()=>!1}},async visitor(e,t){try{return(await N).visitor(e,t),{type:"success"}}catch(n){return{type:"error",message:n.message}}}});return a(()=>{const e=e=>{m.log("web_pixel_manager_init",`WebPixelsProvider init: ${e}`,{outcome:e,shopAppDomain:v},{exportImmediately:"loading"!==e})};if(null===h.webPixelConfigurations)return e("web_pixel_configurations_null");if(!h.storefrontUrl)return e("storefront_url_missing");const n=Boolean(nt(navigator.userAgent)),a=v||n;if("disabled"===h.webPixelManagerVersion)return e("wpm_version_disabled");const i=a?[]:h.webPixelConfigurations;if(w)return R.current?.(new eg("Checkout SDK enabled for partner with pixels suppressed")),void e("pixels_suppressed_by_config");if(E||M.current)return void(E&&!M.current&&e("deferred_for_preload"));if(I)return void e("deferred_for_thank_you");if(M.current=!0,e("loading"),"undefined"!=typeof PerformanceMark)try{window.performance.mark("wpm:start")}catch{}const o=g.variant.isStandard(),s=!r?.isFlagshipPartner&&Boolean(r?.isCheckoutSheetKit),l=function({shopAppDomain:e,isNativeShopApp:t,isCheckoutKit:n,isSdkSurface:r}){let a=n?"checkout-kit":"checkout-one";return r&&(a+="-sdk"),t?a+="-native-shop-app":e&&(a+="-shop-app"),a}({shopAppDomain:v,isNativeShopApp:n,isCheckoutKit:S,isSdkSurface:o||s});try{const e=function({storefrontBaseUrl:e,shopId:t,webPixelConfigurations:n,webPixelManagerVersion:r,initData:a,enabledBetaFlags:i=[],surface:o,sriMap:s,managerBaseUrl:l,extensionsUrl:c,apiClientId:u,checkoutToken:d,facebookCapiEnabled:p=!1}){if(tg)return tg;const m=parseInt(ue(t),10),h=function(){const{modern:e,legacy:t}={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+|)/},n=navigator.userAgent;return n.match(e)?"modern":n.match(t)?"legacy":"unknown"}(),g="modern"===h?"modern":"legacy",f=`${l}/b${r}${g.substring(0,1)}.js`,y=`${c}/cdn/shopifycloud/web-pixels-manager`,v=document.createElement("script");v.setAttribute("async","true"),v.setAttribute("src",f);const _={shopId:m,storefrontBaseUrl:e,extensionsBaseUrl:y,browserTarget:h,surface:o,enabledBetaFlags:JSON.stringify(i),hashVersion:r,publish:"all",...null!=u&&{apiClientId:String(u)},...d&&{checkoutToken:d},...a.customer?.id&&{customerId:a.customer.id},facebookCapiEnabled:String(p)};_.trekkieShim="true";for(const k in _)if(Object.prototype.hasOwnProperty.call(_,k))try{v.dataset[k]=String(_[k])}catch{}const b=s[g];return b&&(v.setAttribute("integrity",b),v.setAttribute("crossorigin","anonymous")),tg=new Promise((t,r)=>{if(v.onload=()=>{if(Boolean(window.Shopify?.analytics?.initialized))return;if(null==window.webPixelsManager||!("init"in window.webPixelsManager))return void r(new Zh("WebPixelManager is not available"));const s=window.webPixelsManager.init({shopId:m,storefrontBaseUrl:e,extensionsBaseUrl:y,surface:o,webPixelsConfigList:n.map(e=>{const t=e.dataSharingAdjustments&&{dataSharingAdjustments:e.dataSharingAdjustments},n=e.integrityHash&&{integrityHash:e.integrityHash};return{configuration:e.configuration,eventPayloadVersion:e.eventPayloadVersion,id:e.idTmp,runtimeContext:e.runtimeContext,scriptVersion:e.scriptVersion,type:e.type,apiClientId:e.apiClientId,privacyPurposes:e.purposes,name:e.name,capabilities:e.capabilities||[],enabledFlags:e.enabledFlags||[],dataSharingState:e.dataSharingState,...t,...n}}),initData:a,enabledBetaFlags:i});window.Shopify||={},window.Shopify.analytics||={},window.Shopify.analytics.publish=s.publishCustomEvent,window.Shopify.analytics.initialized=!0,t(s)},v.onerror=()=>{r(new Zh(`Failed to load WebPixelManager runtime from ${f}`))},document.querySelector(`script[src="${v.src}"]`))r(new Zh("WebPixelsProvider::WebPixelsManagerError::ScriptAlreadyPresent",{groupingHash:"WebPixelsProvider::WebPixelsManagerError::ScriptAlreadyPresent"}));else try{document.body.appendChild(v)}catch{throw new Zh("WebPixelsProvider::WebPixelsManagerError::ScriptAppendError",{groupingHash:"WebPixelsProvider::WebPixelsManagerError::ScriptAppendError"})}}),tg}({storefrontBaseUrl:h.storefrontUrl,shopId:h.id,webPixelConfigurations:i,webPixelManagerVersion:h.webPixelManagerVersion,initData:_,enabledBetaFlags:z,surface:l,sriMap:h.webPixelsManagerSriMap,managerBaseUrl:A,extensionsUrl:T,apiClientId:t.unstable_getSerialization("apiClientId")??void 0,checkoutToken:mc(f)||f.sourceId,facebookCapiEnabled:h.facebookCapiEnabled??!1});let n=!0;e.then(e=>{if(!L.current)throw R.current?.(),new Zh("WebPixelsManager: webPixelsPromiseResolveRef.current is undefined");L.current(e)}).catch(e=>{n=!1,m.log("web_pixels_context_manager_load_error_triggered",`WebPixelsProvider::WebPixelsManagerError::LoadError with error: ${e?.message}`)}).finally(()=>{m.counter({name:"web_pixel_manager_load",value:1,attributes:{status:n?"success":"failed",surface:l}})})}catch(c){R.current?.(c),m.counter({name:"web_pixel_manager_load",value:1,attributes:{status:"failed",surface:l}})}},[E,I]),d(ng.Provider,{value:O,children:e})}function ag(){return ie(ng)}class ig{constructor(e){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=e.webPixels}willAccept(e){return this.acceptableEventTypes.has(e.type)}transmit(e){"pageViewed"===e.type&&this.webPixels.publish("page_viewed",{});const t=function(e){return JSON.stringify(e,(e,t)=>"timestamp"===e||"webPixelCheckout"===e?"":t)}(e);if(t!==this.mostRecentEvent){if(this.mostRecentEvent=t,"shippingMethodsFilled"===e.type||"shippingMethodSelected"===e.type){const t=og(e),n=(t?.delivery?.selectedDeliveryOptions??[]).some(e=>"shipping"===e.type);t&&n&&this.webPixels.publish("checkout_shipping_info_submitted",{checkout:t})}if("sectionComplete"===e.type){const t=og(e);if(t)switch(e.section){case"contact":this.webPixels.publish("checkout_contact_info_submitted",{checkout:t});break;case"deliveryAddress":this.webPixels.publish("checkout_address_info_submitted",{checkout:t})}}if("pageSubmit"===e.type){const t=og(e);t&&this.webPixels.publish("checkout_shipping_info_submitted",{checkout:t})}if("alertDisplayed"===e.type&&this.webPixels.publish("alert_displayed",{alert:{target:e.target,value:e.value,type:e.errorType,message:e.message}}),"uiExtensionError"===e.type&&this.webPixels.publish("ui_extension_errored",{error:{apiVersion:e.apiVersion,appId:e.appId,appName:e.appName??"",appVersion:e.appVersion,extensionName:e.extensionName,message:e.message,placementReference:e.placementReference??null,extensionTarget:e.extensionTarget,trace:e.trace??"",type:e.code}}),function(e){return e.type.startsWith("dom")}(e))if(function(e){return"dom_clicked"===e.type}(e))this.webPixels.publishDomEvent("clicked",{...rt(e,["element","screenX","screenY","pageX","pageY","offsetX","offsetY","movementX","movementY","clientX","clientY"])});else{const t=e.type.replace("dom_","");this.webPixels.publishDomEvent(t,{element:e.element})}}}}function og(e){return Bc({type:e.type,step:e.context.step,section:"section"in e?e.section:void 0})?e.context.webPixelCheckout:void 0}const sg=ae("EventHubContext"),lg=C({displayName:"EventHubClientsLoader",useError:Yh("EventHubClientsLoader"),load:()=>E(()=>hl(async()=>{const{EventHubClientsLoader:e}=await(import("./0d43e753.BrhN0Hg4.js"));return{EventHubClientsLoader:e}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18])).then(({EventHubClientsLoader:e})=>({default:e})))});function cg({children:e}){const t=ag(),n=r(()=>new ug([new ig({webPixels:t})],{bufferUntilConnected:!0}),[t]),a=at();return d(sg.Provider,{value:n,children:[e,d(x,{when:a,children:d(lg,{eventHub:n})})]})}class ug{constructor(e=[],{bufferUntilConnected:t=!1}={}){this.connectedClients=[],this.clients=e,this.pendingEvents=t?[]:void 0}connect(e){if(this.connectedClients=e,this.pendingEvents){const t=this.pendingEvents;this.pendingEvents=void 0,t.forEach(t=>{try{dg(e,t)}catch(n){queueMicrotask(()=>{throw n})}})}}emit(e){this.transmit(e)}transmit(e){try{dg(this.clients,e)}finally{this.transmitToConnectedClients(e)}}transmitToConnectedClients(e){this.pendingEvents?this.pendingEvents.length<2500&&this.pendingEvents.push(e):dg(this.connectedClients,e)}}function dg(e,t){e.forEach(e=>{e.willAccept(t)&&(t.transmitImmediately&&e.transmitImmediately?e.transmitImmediately(t):e.transmit(t))})}function pg(){const{client:e,shop:t,checkout:n,i18n:a,source:i,mobileCheckoutSdk:o,router:s}=oe(),{currentPage:l}=tc().value,{pathname:c}=s.currentUrl.value,u=Hh(),d=u?.trackingUnique??it({serialized:e.unstable_getSerialization("shopifyY"),expiration:e.unstable_getSerialization("shopifyYExpiration")}),p=u?.trackingVisit??it({serialized:e.unstable_getSerialization("shopifyS"),expiration:e.unstable_getSerialization("shopifySExpiration")}),m=n.negotiator.current.fields.buyerIdentity.value?.customerProfile,h=e.unstable_getSerialization("sessionToken"),g=Vc(),f=n.negotiator.current.fields.buyerIdentity.value?.purchasingCompany,{value:y}=n.negotiator.current.fields.paymentFlexibilityPaymentTermsTemplate,v=ot(),{value:_}=n.negotiator.current.fields.deliveryNext,{selectedMacro:b}=jh(),k=Ql({base:!0,small:!1}),P=n.configuration.layout.isOnePage.value,S="shopPay"===n.identity.current.value,w=navigator.connection?.effectiveType??"unknown",C=e.unstable_getSerialization("requestId"),E=l?.id,x=e.unstable_getSerialization("apiClientId")??0,I=e.unstable_getSerialization("workerVersion")??"proxy",A=e.unstable_getSerialization("serverHandling")??"proxy";let T="c1_legacy";P&&(T="c1_redesign"),S&&(T="shop_pay");const L=st(_),{deliveryMacros:R}=n.negotiator.parts,M=R.value,{isServerRendered:N}=e.initialRequest,D=n.configuration.profileId.value;return r(()=>({userToken:d,trackingVisit:p,customerId:m?.id,shopId:t.id,sessionToken:h,checkoutToken:i.checkoutSessionIdentifier,checkoutProfileId:D?parseInt(ue(D),10):void 0,apiClientId:x,sourceId:i.sourceId,sourceType:i.type,identityProvider:void 0,sourceDesign:T,deviceType:k?"mobile":"desktop",locale:a.locale,currency:a.currency,browser:navigator.userAgent,browserConnectionType:w,frontendEventTimeZone:Intl.DateTimeFormat().resolvedOptions().timeZone,clientIp:"0.0.0.0",userAgent:navigator.userAgent,companyContactId:f?m?.id:void 0,companyLocationId:f?.location.id,companyId:f?.company.id,checkoutToDraft:v.value,editableShippingAddress:g.value,payNowOnly:!y&&!v.value,shippingRequired:n.isShippingRequired.value,requestId:C,step:E,pathname:c,checkoutSdkSchemaVersion:o.config.schema||void 0,checkoutSdkVersion:o.config.version||void 0,checkoutSdkVariant:o.variant.value?.toUpperCase(),workerVersion:I,serverHandling:A,reviewPageRequired:t.confirmationPageEnabled,serverRendered:N,clientHydrated:N,..."filled"===_?.status?{selectedDeliveryMacro:L?b:void 0,deliveryMacros:L?M:[],deliveryLines:_.lines.filter(He)}:{selectedDeliveryMacro:void 0,deliveryMacros:[],deliveryLines:[]},pageLoadId:lt}),[d,p,m?.id,t.id,t.confirmationPageEnabled,h,i.checkoutSessionIdentifier,i.sourceId,i.type,D,x,T,k,a.locale,a.currency,w,f,v.value,g.value,y,n.isShippingRequired.value,C,E,c,o,I,A,_,L,b,M,N])}function mg(){if("undefined"==typeof window)return hg;const{shop:e,source:n,i18n:r,checkout:{negotiator:a}}=oe(),i=ie(sg),o=pg(),s=se(o),l=a.parts;return t((t,o)=>{i.emit({type:t,context:{...s.current,href:window.location.href,webPixelCheckout:Fc({type:t,step:s.current.step,section:o.section},{negotiated:a,proposedParts:l,source:n,locale:r.locale,shopCurrencyCode:e.currencyCode,marketDrivenShippingEnabled:e.marketDrivenShippingEnabled})},...o})},[i,s,e,a,l,n,r])}function hg(){}function gg(e,t){const{router:n}=oe();a(()=>{if(""!==n.currentUrl.peek().hash)return;const r=document.activeElement;r&&e.current?.contains(r)&&t(r)},[])}function fg(){const e=mg(),{client:n}=oe();return t(t=>{if(!n.isFirstMeaningfulInteractionMarked.value){const r=performance.now();e("extensionLifecycle",{phase:"timeToFirstMeaningfulCheckoutInteraction",eventValue:r,duration:r,extension:null,section:"extension",initialPageLoad:!0,timestamp:new Date,page:t??""}),n.markFirstMeaningfulInteraction()}},[e,n])}function yg(){const e=mg(),{observability:t}=oe();return function(n){e("alertDisplayed",n),t.log("alert_displayed_event_emitted","Error alert was displayed to the buyer",{event:Mc(n)})}}function vg(){const{checkout:e}=oe(),t=e.configuration.addressSettings.nonBillingAddressSettings;return n(()=>{const e=t.value?.validationEnabled;if(!e)return"BASIC"})}function _g(){const{i18n:e}=oe();return t((t,n)=>ct(e,t,n),[e])}const bg=/(Shop Pay Installments)/i;function kg(e){return e.split(bg).map((e,t)=>t%2==1?e:e.replace(/([Ii])nstallment/g,"$1nstalment")).join("")}const Pg=[{market:"AU",countryCode:"AU",currencyCode:"AUD"},{market:"GB",countryCode:"GB",currencyCode:"GBP"}];function Sg(){const{i18n:e}=oe(),t=function(){const{checkout:e}=oe(),{buyerIdentity:t}=e.negotiator.current.fields,r=ut();return n(()=>function({buyerCountryCode:e,currencyCode:t}){return Pg.find(t=>t.countryCode===e)?.market??Pg.find(e=>e.currencyCode===t)?.market}({buyerCountryCode:t.value?.countryCode,currencyCode:t.value?.presentmentCurrency??r.value?.currencyCode}))}();return r(()=>({translate:(...n)=>{const r=e.translate(...n);return void 0!==t.value&&e.locale.startsWith("en")?function(e){return"string"==typeof e?kg(e):Array.isArray(e)?e.map(e=>"string"==typeof e?kg(e):e):e}(r):r}}),[e,t])}function wg(){const{i18n:e,checkout:t,shopPay:r}=oe(),a=_g(),i=Sg(),o=r.installments.failedAttempt.value,s=o?.retryable&&!o.recoveryAction,{paymentMethods:l,paymentDue:c}=t.negotiator.current.fields,u=n(()=>dt(l.value));if(!t.installments.isSupported.value||!u.value)return"";const d=u.value,p=c.value,m=Boolean(d.cbtEnabled&&p&&(d.minPrice.currencyCode!==p.currencyCode||d.maxPrice.currencyCode!==p.currencyCode)),h=t.installments.ineligibilityReasons.value;if(s&&0===h.length)return i.translate("installments.installments_condition_retryable");const g=e=>{switch(e){case"US":return i.translate("installments.installments_country_adjective.US");case"CA":return i.translate("installments.installments_country_adjective.CA");case"GB":return i.translate("installments.installments_country_adjective.GB");default:return e}},f=!t.installments.isBuyerBlocked.value;if(f&&0===h.length)return"";const y=(f&&h.length>0?h:["user_rejected"]).map(t=>{switch(t){case"amount":return m||d.cbtEnabled&&0===d.availableLoanTypes.length&&p&&p.amount>=d.minPrice.amount&&p.amount<=d.maxPrice.amount?i.translate("installments.installments_condition_generic"):i.translate("installments.installments_condition_amount",{minimum:e.formatCurrency(d.minPrice.amount,{currency:d.minPrice.currencyCode,form:"short"}),maximum:e.formatCurrency(d.maxPrice.amount,{currency:d.maxPrice.currencyCode,form:"short"})});case"billing_address":return i.translate("installments.installments_condition_billing_address");case"billing_shipping_country_mismatch":return i.translate("installments.installments_condition_billing_shipping_country_mismatch");case"shipping_address":return i.translate("installments.installments_condition_shipping_address",{listOfCountryCodes:a(d.supportedCountries.map(g),pt.Or)});case"currency":return m&&p&&d.supportedCurrencies.includes(p.currencyCode)?i.translate("installments.installments_condition_generic"):i.translate("installments.installments_condition_currency",{listOfCurrencyCodes:a(d.supportedCurrencies,pt.Or)});case"gift_cards":return i.translate("installments.installments_condition_gift_cards");case"subscriptions":return i.translate("installments.installments_condition_subscriptions");case"order_edit":return i.translate("installments.installments_condition_order_edit");case"test_mode":return i.translate("installments.installments_condition_test_mode");default:return i.translate("installments.installments_condition_generic")}});return(d.cbtEnabled?[...new Set(y)]:y).join(" ")}function Cg(e,t){return t?.availableLoanTypes?.includes(e)??!1}function Eg(e){const t=function(){const{checkout:{negotiator:e}}=oe(),t=e.current.fields.customAttributes;return n(()=>{const e=mt(ht,t?.value),n=mt(gt,t?.value),r=mt(ft,t?.value),a=mt(yt,t?.value);return{retailTraceId:e?.value||"",deviceId:n?.value||"",locationId:r?.value||"0",userId:a?.value||"0"}})}(),{shop:{id:r},source:{checkoutSessionIdentifier:a},checkout:o}=oe(),s=vt(),l=ut(),c=I(wg()),u=I(e),d=i();return n(()=>{const{retailTraceId:e,deviceId:n,userId:i,locationId:p}=t.value,m=o.installments.config.value,h=l.value?.amount?Number(l.value.amount):0,g={userId:parseInt(i,10),shopId:parseInt(ue(r),10),locationId:parseInt(p,10),posCheckoutToken:e,stage:u.value||"",totalOrderValue:h||0,cartItemsCount:s.value||0,installmentsEligible:o.installments.isCheckoutEligible.value||!1,posDeviceId:n,currency:l.value?.currencyCode||"USD",shopPayCheckoutToken:a,ineligibilityReason:c.value,splitPayEligible:Cg("SPLIT_PAY",m),interestBearingEligible:Cg("INTEREST",m),zeroPercentEligible:Cg("ZERO_PERCENT",m)};return d.current&&_t(d.current,g)?d.current:(d.current=g,g)})}function xg(){const{checkout:{negotiator:e}}=oe(),t=e.current.fields.customAttributes;return n(()=>bt(t.value))}function Ig(e){const{observability:t}=oe(),[n,r]=s(()=>Pt(e));return a(()=>{const r=function(e,t){return"function"==typeof window.requestIdleCallback?window.requestIdleCallback(e):(t?.leaveErrorBreadcrumb("[usePersistedState] requestIdleCallback was not available, used setTimeout fallback"),window.setTimeout(e,0))}(()=>{kt(e,n)},t);return()=>{!function(e,t){"function"==typeof window.cancelIdleCallback?window.cancelIdleCallback(e):"number"==typeof e&&(window.clearTimeout(e),t?.leaveErrorBreadcrumb("[usePersistedState] cancelIdleCallback was not available during cleanup, used clearTimeout fallback"))}(r,t)}},[e,t,n]),[n,r]}function Ag(e,t){const{persistence:n}=oe(),r=n?.get(e,t),a=m(r);return S(()=>{n?.createUpdate(e,t)(a.value)}),a}const Tg=ae("AnalyticsContext");function Lg({children:e}){const t=r(()=>new Mg,[]);return d(Tg.Provider,{value:t,children:e})}function Rg(){return ie(Tg)}class Mg{constructor(){this.eventHistory=[],this.listeners=new Set}emit(e){this.eventHistory.push(e);for(const t of this.listeners)t(e)}subscribe(e){this.listeners.add(e);for(const t of this.eventHistory)e(t);return()=>{this.listeners.delete(e)}}}function Ng(){const e=Rg();return t(t=>e.emit(t),[e])}function Dg(e){const t=Rg();a(()=>t.subscribe(e),[e,t])}const zg=()=>{const{url:e}=oe(),t=e.shopPayRememberMe(),n=sc(),r=n.value?.redirectUrl?.includes(t);return Boolean(r)};function Og({selectedDeliveryMethodHandle:e,methods:n}){const{userEvents:r,shop:{id:a},checkout:{identity:i,negotiator:o},source:s}=oe(),l="shopPay"===i.current.value,c=o.current.fields.buyerIdentity.value?.customerProfile,u=t=>t.handle===e,d=n.find(u)?.originLocation?.id,p=n.findIndex(u);return t(e=>r.monorailEvent({schemaId:"local_pickup_checkout/3.1",payload:{eventType:e,checkoutToken:s.checkoutSessionIdentifier||"",shopId:parseInt(ue(a),10),locationId:d&&ue(d),selectedLocationRank:p,userId:c?.id?parseInt(ue(c.id),10):void 0,numberLocationsFound:n.length||0,checkoutSurface:l?"shop_pay":"guest_checkout"}}),[c?.id,l,d,n.length,r,p,a,s.checkoutSessionIdentifier])}function Bg(e){const t=Kh();return function(e,t){return null==e||"MERCHANT"===e&&"checkout_started"===t}(t?.config?.type,e)}const Fg=580111;function Vg(){const{client:e,userEvents:o,i18n:{locale:l},shop:c,source:u,mobileCheckoutSdk:p,checkout:{negotiator:m}}=oe(),h=m.current.fields.buyerIdentity.value?.customerProfile,g=Bg(),f=function(){const e=tc();return n(()=>{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}})}(),{value:v}=wt(),{value:_}=Ct("ONE_TIME_PURCHASE"),b=Et(_),k=Boolean(b)&&0===b?.costAfterDiscounts.amount,{value:P}=m.current.fields.taxes,{value:w}=m.current.fields.merchandiseLines,{value:C}=m.current.fields.paymentLines,{value:E}=m.current.fields.discountLines,{value:x}=m.current.fields.contactInfo,{value:I}=m.current.fields.buyerIdentity,{value:A}=xt(),[T,L]=s("");function R(e){return e.toFixed(2)}function M(e){return parseInt(ue(e),10)}!function(){const e=i(!1),{userEvents:t,shop:{id:n},source:{checkoutSessionIdentifier:r},checkout:{identity:a}}=oe(),o="shopPay"===a.current.value,s=Ve();S(()=>{s.value.enabledDeliveryMethods.includes("PICK_UP")&&!e.current&&(t.monorailEvent({schemaId:"local_pickup_checkout_availability_viewed/1.1",payload:{shopId:parseInt(ue(n),10),checkoutToken:r||"",sourceName:"checkout_one",checkoutSurface:o?"shop_pay":"guest_checkout"}}),e.current=!0)})}();const N=r(()=>k?void 0:b?.costAfterDiscounts?.amount||b?.cost.amount,[k,b?.costAfterDiscounts?.amount,b?.cost?.amount]),D=r(()=>"USD"===A?.currencyCode?A.amount:void 0,[A?.amount,A?.currencyCode]),z=r(()=>w?.lines?.filter(e=>e.productId).map(e=>M(e.productId)),[w?.lines]),O=r(()=>w?.lines?.filter(e=>e.variantId).map(e=>M(e.variantId)),[w?.lines]),B=r(()=>w?.lines?.map(e=>{const t=e.totalPrice.amount;return void 0===t?"":R(t)}),[w?.lines]),F=r(()=>w?.lines?.every(e=>"USD"===e.totalPrice.currencyCode)?w?.lines?.map(e=>{const t=e.totalPrice.amount;return void 0===t?"":R(t)}):void 0,[w?.lines]),V=r(()=>w?.lines?.map(e=>e.quantity),[w?.lines]),U=r(()=>V?.reduce((e,t)=>e+t,0),[V]),q=r(()=>V?.length,[V]),j=r(()=>C?.lines.filter(e=>"giftCard"===e.method.type&&e.cost?.amount).map(e=>R(e.cost.amount)),[C?.lines]),H=r(()=>{if("thank_you"!==f.value&&"post_purchase"!==f.value)return;const e=C?.lines.find(e=>"giftCard"===e.method.type&&e.cost?.amount)?"giftCard":void 0,t=C?.lines.filter(e=>"giftCard"!==e.method.type).map(e=>e.method.type);return t&&t?.length>0?t[0]:e},[C?.lines,f.value]),$=r(()=>E?.lines.reduce((e,t)=>{if(!Cl(t))return e;let n=e;n||(n=[]);const r=t.amount?.amount;return r&&n.push(R(r)),n},[]),[E]),Y=Hh(),W=t(()=>{const t="available_total"===P?.status?P.totalTax.amount:void 0,n=h?.id?M(h.id):void 0,r=h?.fullName||void 0,a=Y?.trackingUnique??it({serialized:e.unstable_getSerialization("shopifyY"),expiration:e.unstable_getSerialization("shopifyYExpiration")}),i=Y?.trackingVisit??it({serialized:e.unstable_getSerialization("shopifyS"),expiration:e.unstable_getSerialization("shopifySExpiration")});return{schemaId:"checkout_track/3.8",payload:{eventName:"cart_information",cartToken:"cartNext"===u.type?u.sourceId:void 0,customerId:n,trackingUnique:a,shopId:M(c.id),eventTimestampEpochMs:Date.now(),trackingVisit:i,userAgent:navigator.userAgent,landingPage:e.cookies.get("_landing_page")||void 0,customerEmail:h?.email||x?.email,contentLanguage:l,actionName:"query",remoteIp:void 0,totalPrice:A?.amount?R(A?.amount):void 0,customerName:r,lineItemProductIds:z,lineItemVariantIds:O,lineItemTotalPrice:B,lineItemTotalPriceUsd:F,lineItemQuantity:V,currency:I?.presentmentCurrency||c.currencyCode,totalItemCount:U,paymentGatewayId:void 0,gatewayName:void 0,totalPriceUsd:D?R(D):void 0,apiClientId:Fg,currentApiClientId:Fg,paymentMethod:H,paymentProviderId:void 0,currentStep:f.value,checkoutToken:u.checkoutSessionIdentifier,totalShipping:N?R(N):void 0,sourceProcessor:"web_checkout",appliedGiftCards:j?.length?j:void 0,subtotalPrice:v?.amount?R(v.amount):void 0,sourceName:"checkout_one",freeShippingDiscount:k.valueOf(),totalTax:t?R(t):void 0,appliedDiscounts:!$||$.length<1?void 0:$,orderId:void 0,distinctItemCount:q,javascriptEnabled:!0,checkoutPlatform:"checkout_one",checkoutSdkVersion:p.config.version||void 0,checkoutSdkSchemaVersion:p.config.schema||void 0,checkoutSdkVariant:p.variant.value?.toUpperCase()}}},[$,P,k,v,j,u,N,A?.amount,D,f,I?.presentmentCurrency,c,U,V,B,F,O,z,h,x,q,l,H,Y,e,p]);return a(()=>{g&&(T!==f.value&&o.monorailEvent(W()),L(f.value))},[T,f.value,o,W,L,g]),d(y,{})}const Ug=C({suspenseName:"trekkie",displayName:"Trekkie",load:()=>E(()=>hl(()=>import("./b887ec56.CkWX_kYN.js"),__vite__mapDeps([19,2,1,3,4,5,20,11,14,15,16,17,18])))});function qg(){const e=ag(),n=tc(),{router:r,i18n:{locale:a},shop:{currencyCode:i,marketDrivenShippingEnabled:o},source:s,checkout:{negotiator:l}}=oe(),c=l.parts,u=sc(),d=lc(),p=t(()=>{const t=Rc({negotiated:l,source:s,proposedParts:c,locale:a,shopCurrencyCode:i,marketDrivenShippingEnabled:o});requestAnimationFrame(()=>{e.publish("payment_info_submitted",{checkout:t})})},[l,s,e,c,a,i,o]),m=t(()=>{const t=Rc({negotiated:l,source:s,proposedParts:c,locale:a,shopCurrencyCode:i,marketDrivenShippingEnabled:o});e.publish("checkout_started",{checkout:t})},[l,s,e,c,a,i,o]),h=t(()=>{const t=u.value;if(!t)return;if(d.shouldPrevent())return;const c=Rc({negotiated:l,receipt:t,source:s,orderId:t.orderIdentity.id,customerId:t.customerId||void 0,isFirstOrder:t.isFirstOrder,locale:a,shopCurrencyCode:i,marketDrivenShippingEnabled:o});d.markAsEmitted();const p=t.analytics?.checkoutCompletedEventId;let m=!1;function h(){if(m)return;m=!0,window.removeEventListener("pagehide",h),document.removeEventListener("visibilitychange",g);const t=function(e,t){const n=e.find(e=>e.route===t);return n?uc[n.type]??"unknown":"unknown"}(n.value.plan.detours,r.currentUrl.value.normalizedPath),a={...p&&{eventId:p},checkoutCompletedPageType:t},i=Object.keys(a).length>0?a:void 0;e.publish("checkout_completed",{checkout:c},i)}function g(){"hidden"===document.visibilityState&&h()}window.addEventListener("pagehide",h),document.addEventListener("visibilitychange",g),"hidden"===document.visibilityState?h():requestAnimationFrame(h)},[u,l,s,e,r,n,a,i,o,d]);return Dg(t(e=>{"initiate_checkout"===e.type&&m()},[m])),Dg(t(e=>{"add_payment_info"===e.type&&p()},[p])),Dg(t(e=>{"complete_checkout"===e.type&&h()},[h])),null}const jg=["/processing","/thank-you","/error","/post-purchase"],Hg=[It.DirectCheckoutCheckout,It.CheckoutPaymentStep,It.ShopPayInstallmentsAsPaymentMethod,It.ShopPayAsPaymentMethod];function $g(){Hh();const e=Ng(),{currentPage:t,currentDetour:n}=tc().value,{userEvents:r,source:i,router:o,checkout:{negotiator:s}}=oe(),l=function(){const[e,t]=Ig(St.TrackedSourceId),{source:{sourceId:n}}=oe();return a(()=>{t(n)},[n,t]),n===e}(),c=function(){const[e,t]=Ig(St.TrackedCompleteOrderSourceId),n=sc(),r=zg(),{source:{sourceId:i}}=oe();return a(()=>{n.value&&!r&&t(i)},[i,n.value,r,t]),i===e}(),{normalizedPath:u}=o.currentUrl.value,p=sc(),m=xg().value,h=Eg(At.SHOP_PAY_CHECKOUT_COMPLETE),g=s.current.fields.paymentLines?.value?.lines,f=function(){const{client:e}=oe();return e.unstable_getSerialization("shopPayConfig").redirect_source}(),v=mg(),_=zg();return a(()=>{const r=n?.route??t?.route;if(r){v("pageViewed",{timestamp:new Date});const n=["/"];t&&["onePage"].includes(t.id)&&n.includes(r)?e({type:"one_page_checkout_page_view",url:r}):e({type:"page_view",url:r})}},[t,n,v,e]),rc(n=>{"negotiationStage"in n&&"negotiation"===n.negotiationStage||t&&["payment","onePage"].includes(t.id)&&e({type:"add_payment_info"})}),a(()=>{const t=p.value;t&&(_||c||(e({type:"complete_checkout"}),m&&function(e,t,n){e.monorailEvent({schemaId:"retail_shop_pay/2.0",payload:{...n,orderId:ce(t.orderIdentity.id)}})}(r,t,h.value)))},[e,p.value,_,c,m,r,h.value]),a(()=>{"cartNext"!==i.type&&"checkout"!==i.type||l||e({type:"initiate_checkout_once_per_checkout",url:u})},[e,u,i.type,l]),a(()=>{const t=o.currentUrl.value.normalizedPath,n=Boolean(Tt(g,"GOOGLE_PAY")),r="cartNext"===i.type||"checkout"===i.type,a=!f||!Hg.includes(f);r&&(n&&"/processing"===t||!jg.includes(t))&&a&&e({type:"initiate_checkout",url:t})},[]),d(y,{children:[d(Vg,{}),d(Ug,{}),d(qg,{})]})}const Yg=A(function({children:e}){const t=at();return d(Lg,{children:[e,d(x,{when:t,children:d($g,{})})]})});function Wg(){const{userEvents:e,shop:{id:t},source:n,i18n:{locale:r},checkout:{negotiator:a}}=oe(),i=Lt(),{billingAddress:o}=a.parts,s=o.value,{details:l}=Rt(s.countryCode),c=vg();return rc(a=>{if("complete"===a.type&&o&&i.value.defaultAttributes){const a=i.value.defaultAttributes?.uniqToken||"",o=l?.zones?.find(e=>e.code===s.zoneCode)?.name;e.monorailEvent({schemaId:"checkout_address_submission/5.2",payload:{checkoutToken:n.checkoutSessionIdentifier||"",shopId:parseInt(ue(t),10),uniqueToken:a,territory:l?.name||"",context:"Billing address",address1:s.address1||"",address2:s.address2||"",city:s.city||"",zone:o||"",zip:s.postalCode||"",errorCode:"",errorFields:[],locale:r,matchingStrategy:c.value}})}}),null}const Gg=ae("WebPixelTargetContext"),Kg=({children:e,target:t})=>d(Gg.Provider,{value:t,children:e});function Jg(){const{checkout:e}=oe();return e.configuration.branding.shell.configuration.environment.isCheckoutEditor??!1}const Qg=C({displayName:"AdminPreviewBar",load:()=>hl(()=>import("./a6e11e56.DI-bK8ds.js"),__vite__mapDeps([21,1,2,3,4,5,11,14,15,16,17,18,22])),suspense:!1});function Xg(){const{router:e,source:t,shop:n}=oe(),r="no-preview"!==n.configurationPreviewContext,a=i(e.currentUrl.peek()).current,o=function({source:e,isThemeEditor:t,hasServerPreviewContext:n}){return null!=e.previewScript?.name||"simulated"!==e.type&&!t&&n}({source:t,isThemeEditor:Mt(),hasServerPreviewContext:r});return o?d(Qg,{initialUrl:a}):null}function Zg(){const e=i(!1);return a(()=>(e.current=!0,()=>{e.current=!1}),[]),e}const ef=f(void 0);function tf(){const e=h(ef);if(!e)throw new ye("Missing FocusManager Context ");return e.focusErrors}function nf(e){const t=e.defaultView?.getComputedStyle(e.documentElement).direction;return"rtl"===t||"ltr"===t?t:"rtl"===e.dir?"rtl":"ltr"}function rf({children:e}){const n=i(new Set),a=Zg(),o=ed(),s=(e,t,n)=>e.top===t.top?"ltr"===n?e.leftt.right:e.top{let e;for(const t of n.current){if(!t.current)continue;const n={coordinates:t.current.getBoundingClientRect(),ref:t};e&&!s(n.coordinates,e.coordinates,nf(t.current.ownerDocument))||(e=n)}a.current&&e&&function(e,t){const n=e.ref.current;if(!n)return;if(n.focus({preventScroll:!0}),t||function({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}(e))return;""===n.style.scrollMarginTop&&(n.style.scrollMarginTop="var(--x-spacing-large-500)");const r=n.ownerDocument.defaultView?.matchMedia("(prefers-reduced-motion: reduce)").matches??!1;n.scrollIntoView({behavior:r?"instant":"smooth"})}(e,o)},[a,o]),c=t(e=>(n.current.add(e),()=>n.current.delete(e)),[]),u=r(()=>({requestFocus:c,focusErrors:l,numberOfErrors:()=>n.current.size}),[l,c]);return d(ef.Provider,{value:u,children:e})}function af({active:e}){const t=i(null),n=h(ef);return l(()=>{if(n&&e)return n.requestFocus(t)},[e,t,n]),t}function of(){return h(ef)}function sf(e){return document.activeElement===e}const lf='\n a[href],\n area[href],\n input:not([type="hidden"]):not([disabled]):not([tabindex="-1"]),\n select:not([disabled]),\n textarea:not([disabled]),\n button:not([disabled]):not([tabindex="-1"]),\n iframe:not([tabindex="-1"]),\n object,\n embed,\n [tabindex="0"],\n [contenteditable],\n audio[controls],\n video[controls]';function cf(e,t=!0){return!t&&e.matches(lf)?e:e.querySelector(lf)}function uf(e,t=!0){if(!t&&e.matches(lf))return e;const n=e.querySelectorAll(lf);return n[n.length-1]}function df(e){const t=[...document.querySelectorAll(lf)],n=t.findIndex(t=>e===t);return n?t[n+1]:null}function pf(){const{client:e,checkout:{negotiator:t}}=oe(),{paymentLines:r}=t.parts,a=t.current.fields.paymentMethods;return n(()=>{const t=r.value.at(0);if(!t)return null;const n="walletContent"in t.method?t.method.walletContent?.paymentMethodIdentifier:"popupEnabled"in t.method?t.method.paymentMethodIdentifier:void 0,i=a.value?.find(e=>"popupEnabled"in e&&e.popupEnabled&&e.paymentMethodIdentifier===n);return Nt(e)?null:i&&"name"in i?i.name:null})}var mf={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 hf=_(function({accessibilityLabel:e,accessibilityRole:n="generic",accessibilityVisibility:r="visible",autoFocus:a,background:i="transparent",backgroundHoverAndFocus:o,backgroundFit:s,backgroundImage:l,backgroundPosition:c,backgroundRepeat:u="noRepeat",blockAlignment:p,blockSize:m="auto",border:h="none",borderRadius:g="none",borderStyle:f,borderWidth:y,boxShadow:_,children:b,className:P,colorLayer:S,containerName:w,disableGlobalBranding:C,display:E="auto",id:x,inert:I,inlineAlignment:A,inlineSize:T="auto",maxBlockSize:L="none",maxInlineSize:R="none",minBlockSize:M="0",minInlineSize:N="0",opacity:D,overflow:z="visible",padding:O="none",paddingBlock:B,paddingInline:F,paddingBlockEnd:V,paddingBlockStart:U,paddingInlineEnd:q,paddingInlineStart:j,position:H="relative",insetBlock:$,insetInline:Y,transform:W,translate:G,zIndex:K,...J},Q){const{hidden:X,display:Z}=Np(x,E),ee=Md({layoutId:x}),te=p||A,ne=Jm(g,C),re=Op(Q,t(e=>{a&&e&&e.focus({preventScroll:!0})},[a])),{className:ae,style:ie,styleElement:oe}=$m({alignItems:A,backgroundColor:i,backgroundColorHoverAndFocus:o,backgroundImage:l,blockSize:m,...Ne({border:h,borderStyle:f,borderWidth:y}),borderRadius:ne,boxShadow:_,display:Z,inlineSize:T,insetBlock:$,insetInline:Y,justifyContent:p,maxBlockSize:L,maxInlineSize:R,minBlockSize:M,minInlineSize:N,padding:O,paddingBlock:B,paddingInline:F,paddingBlockEnd:V,paddingBlockStart:U,paddingInlineEnd:q,paddingInlineStart:j,position:H,transform:W,zIndex:K},{transforms:{display:te?_d:yd}}),se=Ed(),{Element:le,role:ce}=th(n,{defaultElement:se?"span":"div"}),ue=w?k({[mf.vars.containerNameVar]:w}):void 0,de=d(gf,{condition:I,children:[oe,d(le,{"aria-hidden":!("hidden"!==r&&!I)||void 0,"aria-label":e,className:v("exclusive"===r&&mf.visuallyHidden,l&&s&&mf.backgroundSizeVariant[s],l&&c&&mf.backgroundPositionVariant[c],l&&mf.backgroundRepeatVariant[u],S&&mf.colorLayerVariant[S],w&&mf.containerName,te&&mf.withAlignment,I&&mf.inert,D&&mf.opacityVariant[D],"hidden"===z&&mf.overflowHidden,ae,{notranslate:!1===G},P),id:x,inert:I?" ":void 0,ref:re,role:ce,style:{...ie,...ue},tabIndex:a?-1:void 0,translate:(!0===G?"yes":void 0)??(!1===G?"no":void 0),...J,...ee?.layoutAttributes,children:b})]});return X?null:Nd(ee,de)});function gf({children:e,condition:t}){return null==t?d(y,{children:e}):d(Sd.Provider,{value:t,children:e})}var ff={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 yf({size:e="base",appearance:t="auto",accessibilityLabel:n,id:r}){const a=Uc(),i=Boolean(n&&a),o=function(e="base"){switch(e){case"small-100":return"small";case"large-100":return"large";default:return e}}(e),s=v(ff.Spinner,t&&ff.appearanceVariant[t],ff.sizeVariant[o]),l=d("fill"===o||"large"===o?vf:_f,{...{"aria-label":n,"aria-hidden":n?void 0:"true"}});return i?d(y,{children:n}):d("div",{className:s,id:r,children:l})}function vf(e){return d("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",className:ff.SVG,focusable:"false",...e,children:d("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 _f(e){return d("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",className:ff.SVG,focusable:"false",...e,children:d("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 bf={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"},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 kf=_(function({accessibilityLive:e,accessibilityVisibility:t,children:n,color:r="base",decoration:a,dir:i,display:o="auto",fonts:s,id:l,kerning:c,lang:u,letterCase:p,size:m,translate:h,tone:g="auto",type:f="generic"},_){const b=(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"}})(f),{className:k,styleElement:P}=$m({display:o},{transforms:{display:vd}});return d(y,{children:[P,d(b,{"aria-hidden":"hidden"===t||void 0,"aria-live":e,className:"exclusive"===t?bf.accessibilityVisibilityVariant[t]:v(bf.Text,a&&bf.decorationVariant[a],s&&bf.fontsVariant[s],c&&bf.kerningVariant[c],p&&bf.letterCaseVariant[p],m&&bf.sizeVariant[m],g&&bf.toneVariant[g],r&&("auto"===g||"neutral"===g)&&bf.colorVariant[r],f&&bf.typeVariant[f],k,{notranslate:!1===h}),dir:i,id:l,lang:u,translate:(!0===h?"yes":void 0)??(!1===h?"no":void 0),ref:_,children:n})]})});var Pf,Sf={primary:"_1m2hr9g1b _1m2hr9g17 _1fragem12d","shop-pay":"_1m2hr9g1c _1m2hr9g17 _1fragem12d",secondary:"_1m2hr9g1d _1m2hr9g18 _1fragem12d",tertiary:"_1m2hr9g1e _1m2hr9g19 _1fragem12d",plain:"_1m2hr9g1f _1m2hr9g1a _1fragem12p _1fragem12n _1fragem12d"},wf={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:"_1m2hr9g20 _1m2hr9g1z _1fragem11z",displayVariant:{block:"_1m2hr9gm _1m2hr9gk _1fragem5u",inline:"_1m2hr9gn _1m2hr9gl _1fragem6e"},editorDisabled:"_1m2hr9g21",forcedColorsPrimaryFill:"_1m2hr9g22",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:"_1m2hr9g23",end:"_1m2hr9g24"},Spinner:"_1m2hr9g13 _1m2hr9g12 _1fragemwi _1fragem109 _1fragem113",sizeVariant:{small:"_1m2hr9g1v _1m2hr9g1u",base:"_1m2hr9g1w _1m2hr9g1u",large:"_1m2hr9g1x _1m2hr9g1u",extraLarge:"_1m2hr9g1y _1m2hr9g1u"},textDecorationVariant:{underline:"_1m2hr9g1h _1m2hr9g1g _1fragem129",none:"_1m2hr9g1i"},toneVariant:{critical:"_1m2hr9g1q",monochrome:"_1m2hr9g1r",neutral:"_1m2hr9g1s",custom:"_1m2hr9g1t"},verticalAlignVariant:{"text-bottom":"_1m2hr9go"},inMenu:"_1m2hr9g25",inert:"_1m2hr9g26 _1fragemz0"};const Cf=vm(ym(jp((Pf=_(function({accessibilityLabel:e,accessibilityLive:t,children:n,className:r,disabled:a,command:i,commandFor:o,display:s="block",href:l,id:c,inlineAlignment:u="center",inlineSize:p="auto",loading:m,loadingLabel:h,loadingMode:g="auto",onClick:f,onFocus:y,onMouseEnter:_,overlay:b,segment:k,size:P="base",textDecoration:S,target:w="auto",tone:C="auto",type:E="button",variant:x="auto",verticalAlign:I="baseline",...A},T){const L=a?void 0:l,R=xf(f)?()=>f?.():void 0,M=xf(y)?()=>y?.():void 0,N=xf(_)?()=>_?.():void 0,D=zp(T),z="auto"===x?"secondary":x,O="shop-pay"===z||"auto"===C?"neutral":C,{className:B,style:F,styleElement:V}=$m({inlineSize:p},{transforms:{inlineSize:Ef}}),U=Ju(),q=Uc(),{primaryButton:{border:j="none"},secondaryButton:{border:H="full"},link:{typographyDecoration:$="underline"}}=Km(),Y=Pd(),W=wd(),G=Wu().editor??!1,K=Boolean(a)&&!G,J="plain"===z,Q="in-menu"===z,X=!m&&K?"full":j,Z=(()=>{switch(z){case"tertiary":return"none";case"secondary":return H;default:return X}})(),ee=S||("monochrome"===O?"underline":$),te=v("_1m2hr9gj _1m2hr9gi _1fragem12w _1fragemws _1fragemyd _1fragem126 _1fragem12n _1fragem12p _1fragem12e _1fragemyk",(m||!K)&&!J&&!Q&&"neutral"===O&&wf.colorLayerVariant[z],Sf[Q?"plain":z],!J&&wf.sizeVariant[P],Z&&!J&&wf.borderVariant[Z],("primary"===z||"shop-pay"===z)&&wf.forcedColorsPrimaryFill,wf.displayVariant[s],"text-bottom"===I&&wf.verticalAlignVariant[I],wf.toneVariant[O],B,(K||W)&&wf.disabled,G&&a&&wf.editorDisabled,W&&wf.inert,m&&wf.loading,wf.textDecorationVariant[J?ee:"none"],k&&wf.segmentVariant[k],Q&&wf.inMenu,r),ne=h||U("processing"),re=d("span",{className:v(wf.Content,u&&wf.inlineAlignmentVariant[u]),"aria-hidden":m||void 0,children:n}),ae=d("span",{className:v(wf.LoadingContent,u&&wf.inlineAlignmentVariant[u],!q&&wf.Spinner),dir:"auto",children:[d(yf,{accessibilityLabel:ne}),"extended"===g&&!q&&d("span",{className:wf.ExtendedLoadingContent,dir:"auto",children:d(kf,{children:ne})})]}),ie=Au(),oe=ie?.activatorAttributes,se=void 0!==m;if(L&&void 0===o)return d(Cd.Provider,{value:!0,children:[V,d(Wm,{ariaBusy:se?m:void 0,ariaLabel:m?void 0:e,ariaLive:se?"polite":t,className:te,href:L,id:c,onClick:f,onFocus:y,onMouseEnter:_,overlay:b,ref:D,style:F,target:w,...A,children:[re,m&&ae]})]});const le=Up(ie,{onClick:R,onFocus:M,onMouseEnter:N});return d(Cd.Provider,{value:!0,children:[V,d("button",{"aria-busy":se?m:void 0,"aria-hidden":!!W||void 0,"aria-label":m?void 0:e,"aria-live":se?"polite":t,className:te,disabled:a||m,form:"submit"===E&&Y?.nested?Y.id:void 0,id:c,ref:D,style:F,type:o?"button":E,tabIndex:W?-1:void 0,...le,...oe,...A,children:[re,m&&ae]})]})}),_((e,t)=>{switch(h(wu)){case"Menu":{const n={...e,size:"base",tone:e.tone||"monochrome",variant:"in-menu",textDecoration:"none",inlineAlignment:"start",inlineSize:"fill"};return d("li",{children:d(Pf,{...n,ref:t})})}case"Sheet":{const n={...e,size:"small"};return d(Pf,{...n,ref:t})}case"Banner":{const n={...e,tone:"auto"===e.tone||void 0===e.tone&&"plain"!==e.variant?"monochrome":e.tone};return d(Pf,{...n,ref:t})}default:return d(Pf,{...e,ref:t})}})))));function Ef(e){if("legacy-default"!==e)return"fill"===e?"100%":cd("auto"===e?"fit-content":e)}function xf(e){return"function"==typeof e}var If={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 Af({accessibilityLabel:e,accessibilityLive:t,command:n="--auto",commandFor:r,children:a,display:i="inline",href:o,id:s,lang:l,onClick:c,onFocus:u,onMouseEnter:p,target:m="auto",textDecoration:h,tone:g="auto",verticalAlign:f="baseline",overlay:y,..._}){const{link:{typographyDecoration:b="underline"}}=Km(),k="text-bottom"===f?If.verticalAlignVariant[f]:void 0;return o&&void 0===r?d(Wm,{ariaLabel:e,ariaLive:t,command:n,commandFor:r,className:v(If.Link,If.toneVariant["auto"===g?"neutral":g],If.textDecorationVariant[h||("monochrome"===g?"underline":b)],If.displayVariant[i],k),href:o,id:s,lang:l,onClick:c,onFocus:u,onMouseEnter:p,overlay:y,target:m,..._,children:a}):d(Cf,{accessibilityLabel:e,accessibilityLive:t,command:n,commandFor:r,display:i,onClick:c,onFocus:u,onMouseEnter:p,id:s,overlay:y,textDecoration:h,tone:"auto"===g?"neutral":g,variant:"plain",verticalAlign:f,..._,children:a})}var Tf={Stack:"r0qqvk1 r0qqvk0 _1fragemws _1fragem64",overflowHidden:{hidden:"r0qqvk3 r0qqvk2 _1fragemup _1fragemv4",visible:"r0qqvk4"}};const Lf=_(function({accessibilityCurrent:e,accessibilityLabel:t,accessibilityRole:n="generic",accessibilityLabelledBy:r,alignContent:a="normal",alignItems:i="normal",background:o,backgroundHoverAndFocus:s,blockSize:l="auto",border:c="none",borderRadius:u="none",borderStyle:p,borderWidth:m,children:h,className:g,columnGap:f,disableGlobalBranding:_,display:b="auto",direction:k="block",gap:P,id:S,inlineSize:w="auto",justifyContent:C="normal",maxBlockSize:E="none",maxInlineSize:x="none",minBlockSize:I="0",minInlineSize:A="0",overflow:T="visible",padding:L="none",paddingBlock:R,paddingInline:M,paddingBlockEnd:N,paddingBlockStart:D,paddingInlineEnd:z,paddingInlineStart:O,rowGap:B,...F},V){const{hidden:U,display:q}=Np(S,b),j=Jm(u,_),{className:H,style:$,styleElement:Y}=$m({alignContent:a,alignItems:i,backgroundColor:o,backgroundColorHoverAndFocus:s,...Ne({border:c,borderStyle:p,borderWidth:m}),blockSize:l,borderRadius:j,columnGap:f,display:q,flexDirection:k,flexWrap:k,gap:P,inlineSize:w,justifyContent:C,maxBlockSize:E,maxInlineSize:x,minBlockSize:I,minInlineSize:A,padding:L,paddingBlock:R,paddingBlockEnd:N,paddingBlockStart:D,paddingInline:M,paddingInlineEnd:z,paddingInlineStart:O,rowGap:B},{transforms:{display:_d,flexDirection:e=>"block"===e?"column":"row",flexWrap:e=>"block"===e?"nowrap":"wrap"}}),W=Ed(),{Element:G,role:K}=th(n,{defaultElement:W?"span":"div"});return U?null:d(y,{children:[Y,d(G,{className:v(Tf.Stack,Tf.overflowHidden[T],H,g),role:K,"aria-label":t,"aria-current":e,"aria-labelledby":r,style:$,id:S,...F,ref:V,children:h})]})});var Rf="_1fyvcoo0 _1fragemwn _1fragem11z _1fragem11k";function Mf({children:e}){const t=ed(),n=i(null),r=i(null),a=i(null),o=i(document.activeElement);l(()=>{const e=a.current;if(e){const n=cf(e);n?n.focus({preventScroll:t}):e.focus({preventScroll:t})}const n=o.current;if(n)return()=>{n.focus({preventScroll:t})}},[t]);const s=e=>{const t=a.current;if(t){const n=e?cf(t):uf(t);n?n.focus():t.focus()}};return d(y,{children:[d("button",{className:Rf,ref:n,"aria-hidden":"true",onFocus:()=>s(!1),type:"button"}),T(e,{tabIndex:-1,ref:a}),d("button",{className:Rf,ref:r,"aria-hidden":"true",onFocus:()=>s(!0),type:"button"})]})}const Nf="scrollbar-gutter",Df="stable";function zf(){const[e,n]=s(!1),r=i(0),o=i(null),l=i(null),c=t(()=>{if(!document.body||o.current)return;const{position:e,top:t,overflow:a}=document.body.style,i=function(e){if(!function(e){return function(e){return window.innerWidth>e.clientWidth}(e)&&(t=window.getComputedStyle(e).getPropertyValue(Nf),!t?.split(/\s+/).includes(Df));var t}(e))return null;const t=e.style.getPropertyValue(Nf);return e.style.setProperty(Nf,Df),t}(document.documentElement);o.current={position:e,top:t,overflow:a},l.current=i,r.current=window.scrollY,document.body.style.position="fixed",document.body.style.top=`-${r.current}px`,document.body.style.overflow="hidden",n(!0)},[]),u=t(()=>{if(!document.body)return;var e,t;null!==l.current&&(e=document.documentElement,(t=l.current)?e.style.setProperty(Nf,t):e.style.removeProperty(Nf),l.current=null);const a=o.current;o.current=null,a&&"fixed"!==a.position&&(document.body.style.position=a.position,document.body.style.top=a.top,document.body.style.overflow=a.overflow,window.scrollTo(0,r.current)),n(!1)},[]);return a(()=>()=>{u()},[u]),{isLocked:e,lock:c,unlock:u}}function Of({children:e,isInvisible:t,onClick:r}){const{lock:i}=zf(),{i18n:o}=oe();a(()=>{i()},[i]);const s=n(()=>t?.value??!1),l=d("div",{children:d(x,{when:s,fallback:d(y,{children:[d("div",{className:"hYGiX"}),d("div",{className:"UGCQu",children:e})]}),children:d("div",{className:"yF8Vq",onClick:r,role:"button",tabIndex:0,"aria-label":o.translate("wallets.scrim.cancel"),onKeyDown:e=>{"Escape"!==e.key&&"Enter"!==e.key||!r||r()},children:e})})});return d(Zc,{children:d(Mf,{children:l})})}function Bf({isOpen:e,isInvisible:t,children:n,onClick:r}){return d(x,{when:e,children:d(Of,{isInvisible:t,onClick:r,children:n})})}function Ff({isOpen:e,walletName:t,handleClose:n,handleFocus:r}){return d(Bf,{isOpen:e,children:d(Vf,{handleClose:n,walletName:t,handleFocus:r})})}function Vf({handleClose:e,handleFocus:t,walletName:n}){const{i18n:r}=oe();return d(hf,{children:d(Lf,{gap:"large-400",alignItems:"center",children:[d(kf,{size:"large",children:r.translate("wallets.scrim.continue_purchase_in_window",{walletName:t?d(Af,{tone:"monochrome",onClick:t,children:n}):n})}),d(kf,{children:[d(Af,{tone:"monochrome",onClick:e,children:r.translate("wallets.scrim.cancel")})," ",r.translate("wallets.scrim.and_return_to_checkout")]})]})})}function Uf(){const{checkout:{offsitePopupController:e}}=oe(),t=pf();return d(Ff,{isOpen:e.isOpen,walletName:t.value??"",handleClose:()=>e.close({runCancelCallback:!0}),handleFocus:()=>e.focus()})}const qf=ae("RequestContext");function jf(){return ie(qf)}const Hf=["AE","HK","IE","ZA","ES","KR","PA","PT","ID","TH","CN","JP"],$f=["JP"];function Yf(e,{hiddenFields:t,multiline:n,countryFormat:r,displayName:a}={}){const i=Gf(e,a);if(!i)return;const{addr:o,details:s,zoneFormat:l}=i;return Dt(o,s,t,n,r,l)}function Wf(e,{hiddenFields:t,countryFormat:n,displayName:r}={}){const a=Gf(e,r);if(!a)return;const{addr:i,details:o,zoneFormat:s}=a;return Ot(i,o,t,n,s)}function Gf(e,t){const{i18n:n}=oe(),{details:r}=Rt(e?.countryCode);if(!e)return;if(!r&&e.countryCode)return;const a=r??zt(void 0,n),i=e.countryCode&&Hf.includes(e.countryCode)?"explicit":"short";return{addr:t??!0?e:{...e,firstName:void 0,lastName:void 0},details:a,zoneFormat:i}}function Kf(e){const{details:t,loading:n}=Rt(e?.countryCode);if(!t||!e||n)return{countryName:void 0,zoneName:void 0,loading:n};const r=t.zones.find(t=>t.code===e.zoneCode)?.name;return{countryName:t.name,zoneName:r,loading:n}}function Jf(e){return t(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 Qf=e=>{const n=t((t,n)=>{e[t].value=n},[e]),r=t(()=>{L(()=>{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]),a=t(t=>{e[t].value=void 0},[e]);return{addressErrors:e,setAddressError:n,resetAddressErrors:r,resetAddressFieldErrors:a}},Xf=(e,t)=>({resetAddressSuggestions:function(){Object.entries(t).forEach(([n])=>{Object.keys(e).includes(n)&&void 0!==e[n].peek()&&(t[n].value=void 0)}),L(()=>{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})},resetAddressFieldSuggestions:function(n){t[n].value=void 0,e[n].value=void 0}});function Zf(e,n,a,i){const{i18n:o,checkout:s}=oe(),{geolocation:l}=jf(),c=s.configuration.addressSettings.nonBillingAddressSettings.value,u=s.negotiator.current.fields.deliveryNext,{details:d}=Rt(e),{getIsMobilePhoneFieldVisible:p}=ey(),m=s.address.extendedAddressMode.get(e),h=void 0===i?m:i,g=r(()=>d??l.country,[d,l.country]),f=r(()=>s.address.extendedAddressMode.getFormatFromCountry(g,h),[s.address.extendedAddressMode,h,g]),y=r(()=>a??c,[a,c]),v=r(()=>n??[{value:g.code,label:g.name}],[n,g]);return t((e,t)=>Bt(e,t,{addressSettings:y,countryDetails:d,fallbackCountry:l.country,editFormat:f,availableCountries:v,deliveryNextValue:u.value,isMobilePhoneFieldVisible:p(t),additionalFieldsEnabled:null!==h,i18n:o}),[y,d,f,l.country,h,v,u,p,o])}const ey=()=>{const{checkout:{identity:e},shopPay:n}=oe(),r="shopPay"===e.current.value,a=n.user.isAuthenticatedUser;return{getIsMobilePhoneFieldVisible:t(e=>r&&!a.value&&"shipping"===e,[r,a])}};function ty(){const{i18n:e,checkout:{negotiator:t}}=oe(),{shippingAddress:r}=t.parts;return n(()=>{const t=r.fields.firstName.value,n=r.fields.lastName.value,a=r.value.oneTimeUse;return Vt(t)&&Vt(n)&&!a?e.formatName(t,n,!0):null})}function ny(e,t,n,r){const{i18n:a}=oe();return function(i){if(e&&n.has(e)){if("label"===i)return a.translate("contact",{scope:r?`optional_${e}`:e});const t=`${n.get(e)}_${i}`;return a.translate("contact",{scope:r?`optional_${t}`:t})}return t}}function ry({address:e,nameLinePosition:t,addressDisplayName:n,showPhone:r}){const{countryCode:a=""}=e,{details:i,loading:o}=Rt(a),{i18n:s}=oe();return function(e,t,n,r,a,i=!1){const{firstName:o="",lastName:s="",address1:l="",address2:c="",city:u="",postalCode:d="",company:p="",zoneCode:m="",countryCode:h=""}=e,g=p;let f=oy([o,s]),y=oy([l,c]),v=oy([u,m??"",d,h],", ");if(r){const t=$f.includes(h),n={countryFormat:t?"explicit":"short",zoneFormat:t?"explicit":"short"};f=function({firstName:e,lastName:t,countryDetails:n,locale:r}){const a=n?.formatting.show;if(!a)return oy([e,t]);let i="";const o=a.split("_").find(e=>e.includes("{firstName}")||e.includes("{lastName}"));if(o){let n=o.replace("{lastName}",t).replace("{firstName}",e);if(r){const e=r.toLowerCase(),t=e.startsWith("ja")||e.startsWith("zh")||e.startsWith("ko");n.includes("様")&&!e.startsWith("ja")&&(n=n.replace("様","")),i=t?n.trim().replace(/\s+/g,""):n.trim().replace(/\s\s+/g," ")}}else i=oy([e,t]);return i}({firstName:o,lastName:s,countryDetails:r,locale:a});const l=["address1","address2","firstName","lastName","company",...i?[]:["phone"]];y=Dt(e,r,["city","zoneCode","postalCode","countryCode","firstName","lastName","company","phone"],!1,n.countryFormat,n.zoneFormat).replace(/\s+/g," "),v=Dt(e,r,l,!1,n.countryFormat,n.zoneFormat).replace(/\s+/g," ")}return n?{nameLine:f,companyLine:g,primary:n,secondary:oy([y,v])}:{nameLine:f,companyLine:g,primary:oy(["inline"===t?f:"",g,y],", "),secondary:v}}(e,t,n,o?void 0:i,s.locale,r)}function ay(e){const{checkout:{negotiator:t}}=oe(),n=`${e}Address`,r=t.parts[n].value,{primary:a,secondary:i}=ry({address:r,nameLinePosition:"inline"});return`${a} ${i}`}function iy(e,n){const{checkout:r}=oe(),a=n??r.configuration.addressSettings.nonBillingAddressSettings.value,{details:i}=Rt(e);return t((e,t)=>Ft({addressType:e,violations:t,countryDetails:i,format:i?r.address.extendedAddressMode.getFormatFromCountry(i):void 0,addressSettings:a}),[i,a,r.address.extendedAddressMode])}function oy(e,t=" "){return e.filter(Boolean).join(t)}function sy(){const{checkout:{negotiator:e}}=oe(),t=e.parts.shippingAddress.value,n=!Ut(t),r=Yf(t,{hiddenFields:["phone"]});return!n&&r?r:null}function ly(e){return"failed"===e.status}function cy(e){return"payment"===e.type}function uy(e,t){return e&&t&&e.id===t.id&&e.status===t.status}function dy(e){return"action_required"===e.status&&"complete_payment_challenge"===e.action.type}function py(e){return"action_required"===e.status&&"complete_payment_challenge_v2"===e.action.type}function my(e){return"complete_payment_challenge"===e.type}function hy(e){return"complete_payment_challenge_v2"===e.type}function gy(e=[]){return e?.flatMap(e=>"submitted"===e.status?e.remotePurchaseOrder.deliveryLines?.map(t=>({...t,shopId:e.shopId}))??[]:[])??[]}function fy(e){return e.some(({code:e})=>new Set([...qt,...jt]).has(e))}function yy(e){return e.some(({code:e})=>Ht.has(e))}function vy(e){return e.some(e=>$t.has(e.code)&&"RemoveTermViolation"===e.__typename)}function _y(e){return e.some(e=>Yt.has(e.code)&&"RemoveTermViolation"===e.__typename)}function by(e){return wy({subscribedViolations:e,onlySubscribeToProgression:!0})}function ky(e){return wy({subscribedViolations:e,onlySubscribeToProgression:!1})}function Py(e){return wy({subscribedViolations:e,onlySubscribeToProgression:!0,skipProgressionNegotiations:!0})}function Sy(e){const{checkout:{wallets:t}}=oe(),n=ky(e);return S(()=>{t.activeSession.value&&n.violations.value.size>0&&o(()=>{n.clearViolations()})}),n}function wy({subscribedViolations:e,onlySubscribeToProgression:r,skipProgressionNegotiations:i}){const{observability:o,checkout:{wallets:s,negotiator:l}}=oe(),{lastJourneyProgression:c,lastNegotiation:u}=l,d=r?c:u,p=m({violations:new Set}),h=n(()=>p.value.violations),g=n(()=>p.value.negotiationStage),f=t(()=>{p.value={violations:new Set}},[p]),y=I(e);return a(()=>d.subscribe(e=>{if(s.activeSession.value)return;if("invalid"===e.type)return void o.log("violations_subscription_invalid_result_detected","Not updating violation subscription because of invalid result",{reasons:e.reasons,beforeViolations:h.value});if("error"!==e.type&&"success"!==e.type)return;if(i&&"progression"!==e.negotiationStage&&"completion"!==e.negotiationStage)return;const t=y.value.size>0,n=e.violations.filter(e=>!t||y.value.has(e.code));p.value={violations:new Set(n),negotiationStage:e.negotiationStage}}),[y,o,s,d,i,p,h]),{violations:h,negotiationStage:g,clearViolations:f}}function Cy(e){const{checkout:n,embed:r}=oe(),o=n.wallets.activeSession.value,l=n.latestReceipt.value,{delegatedPaymentInstrument:c}=n.negotiator.context,[u,d]=s(),p=i(c.peek()),m=t(()=>{d(void 0)},[]),h=t(t=>{e.has(t.code)?d(t.code):d(void 0)},[e]);return a(()=>{o||"failed"===l?.status&&"payment"===l.failure?.type&&h(l.failure)},[o,h,l]),a(()=>{if(!r)return;const e=c.value;e!==p.current&&(p.current=e,e&&d(void 0))},[r,c.value]),{error:u,hasError:Boolean(u),clearError:m}}function Ey(e){if("failed"===e?.status&&"hsa_qualification"===e.failure.type&&"SURVEY_EXITED"!==e.failure.code)return e.failure}function xy(){const{checkout:e}=oe(),t=e.wallets.activeSession.value,n=e.latestReceipt.value,[r,i]=s(()=>t?void 0:Ey(n));return a(()=>{t||i(Ey(n))},[t,n]),{error:r,hasError:void 0!==r}}function Iy(){const{checkout:e}=oe(),t=e.wallets.activeSession.value,n=e.latestReceipt.value,[r,i]=s(!1);return a(()=>{t||("failed"===n?.status&&"inventory"===n.failure?.type?i(!0):i(!1))},[t,n]),{hasError:r}}function Ay(){const{checkout:e}=oe(),t=e.wallets.activeSession.value,n=e.latestReceipt.value,[r,i]=s(!1);return a(()=>{t||("failed"===n?.status&&"order"===n.failure?.type?i(!0):i(!1))},[t,n]),{hasError:r}}function Ty(e){const{checkout:{negotiator:t}}=oe(),{allViolations:r}=t.current.fields;return n(()=>Boolean(r.value?.some(t=>t.code===e)))}function Ly(e){return e?"object"==typeof e&&"value"in e?e.value&&"string"==typeof e.value?e.value:e.textValue?e.textValue:"":"string"==typeof e?e:"":""}function Ry(){const e=mg(),{message:t,code:n}=function(){const{checkout:e}=oe(),t=e.wallets.activeSession.value,n=e.latestReceipt.value,[r,i]=s(null),[o,l]=s("");return a(()=>{t||n&&ly(n)&&("payment"===n.failure.type?(i(n.failure.code??null),l("payment_receipt_error")):l(`${n.failure.type}_receipt_error`))},[n,t]),{hasError:Boolean(o),message:o,code:r}}();a(()=>{(t||n)&&e("receiptError",{error:{message:t,code:n||"",silencedViolation:!1,origin:"server",type:"submit-violation"},timestamp:new Date})},[e,t,n]);const{checkout:{negotiator:r}}=oe(),{directPaymentErrors:i,generalPaymentError:l}=r.parts;S(()=>{const t=i.name.value;t&&o(()=>{const{message:n,origin:r}=t;e("paymentError",{error:{message:n,code:"payment_name_error",silencedViolation:!1,origin:r,type:"client"===r?"inline-validation":"submit-violation"},timestamp:new Date})})}),S(()=>{const t=i.verificationValue.value;t&&o(()=>{const{message:n,origin:r}=t;e("paymentError",{error:{message:n,code:"payment_cvv_error",silencedViolation:!1,origin:r,type:"client"===r?"inline-validation":"submit-violation"},timestamp:new Date})})}),S(()=>{const t=i.number.value;t&&o(()=>{const{message:n,origin:r}=t;e("paymentError",{error:{message:n,code:"payment_number_error",silencedViolation:!1,origin:r,type:"client"===r?"inline-validation":"submit-violation"},timestamp:new Date})})}),S(()=>{const t=i.expiry.value;t&&o(()=>{const{message:n,origin:r}=t;e("paymentError",{error:{message:n,code:"payment_expiry_error",silencedViolation:!1,origin:r,type:"client"===r?"inline-validation":"submit-violation"},timestamp:new Date})})}),S(()=>{const t=l.value;t&&o(()=>{e("paymentError",{error:{message:t,code:"general_payment_error"},timestamp:new Date})})});const c=function(){const[e,t]=s([]),[n,r]=s(null),{violations:i}=by(new Set),o=i.value;return rc(e=>{"invalid"===e.type?r(e):r(null)}),a(()=>{let e=null;if(n){const t=n.reasons.filter(e=>e!==Jt.InvalidAddress)[0];t&&(e={message:t,origin:"server",type:"negotiation"})}const r=[];Array.from(o).forEach(e=>{r.push({message:e?.localizedMessage??"",code:e?.code,origin:"server",type:"negotiation"})});const a=[...r];e&&a.push(e),t(a.filter(e=>Boolean(e)))},[n,o]),e}();a(()=>{c?.forEach(({message:t,code:n,field:r,origin:a,type:i})=>{e("violationError",{error:{message:Ly(t),code:n,field:r,origin:a,type:i},timestamp:new Date})})},[e,c]);const{deliveryMethodsAddressErrors:u}=r.context,d=function(e){const[t,n]=s(null),[r,i]=s([]);return S(()=>{Object.entries(e).forEach(([e,t])=>{const r=t.value;n(t=>{let n=null===t?{}:{...t};return r?n={...n,[e]:r}:delete n[e],0===Object.keys(n).length?null:n})})}),a(()=>{if(t){const e=[];Object.keys(t).forEach(n=>{const{message:r,origin:a,type:i}=t[n];e.push({message:r,code:void 0,field:n,origin:a,type:i})}),i(e)}},[t]),r}(u);return a(()=>{d?.forEach(({message:t,code:n,field:r,origin:a,type:i})=>{(t||n||r||a||i)&&e("addressError",{error:{message:Ly(t),code:n,field:r,origin:a,type:i,silencedViolation:!1},timestamp:new Date})})},[e,d]),null}function My(e){return e}function Ny(e,t){if(t)return e.find(e=>e.deliveryStrategyHandle===t)}var Dy=(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))(Dy||{});function zy(){const{client:e,shop:t}=oe();if(!t.hasFlagEnabled(Xt))return null;const n=e.unstable_getSerialization("experiments");return Zt(n)}function Oy(e){return"thankYou"===e?.type||"postPurchase"===e?.type}function By(e,t){return void 0!==e.greenPath.find(e=>e.route===t)}const Fy=()=>{const{i18n:e,checkout:{negotiator:t}}=oe(),r=t.current.fields.paymentFlexibilityPaymentTermsTemplate,a=ot();return n(()=>{const t=r.value;return a.value&&!t?e.translate("notice_banner.payment_method_not_available_with_review_requirement"):t?"FULFILLMENT"===t.type?e.translate("notice_banner.payment_method_not_available_with_fulfillment_terms"):"NET"===t.type?e.translate("notice_banner.payment_method_not_available_with_payment_terms",{paymentTerms:t.translatedName}):e.translate("notice_banner.payment_method_not_available_with_fixed_terms"):void 0})},Vy=ae("ShellContext");function Uy({children:e,shell:t}){return d(Vy.Provider,{value:t,children:e})}function qy(){return ie(Vy)}function jy(){const e=qy(),t=i();if(null!=t.current&&t.current.shell!==e&&(t.current=void 0),null==t.current){const n=new Map,r={};for(const t of Object.keys(e.configuration))Object.defineProperty(r,t,{enumerable:!0,get:()=>(n.has(t)||n.set(t,P(()=>e.configurationSignal.value[t])),n.get(t).value)});t.current={shell:e,watchedKeysSignals:n,reactiveConfiguration:r}}return t.current.reactiveConfiguration}function Hy(){const{checkout:{configuration:e}}=oe(),{orderSummary:t}=jy(),n=e.orderSummary?.currencyBadgeVisibility??t.currencyBadgeVisibility;return!n||"VISIBLE"===n}function $y(e){const{checkout:n,observability:a,router:i,shop:o}=oe(),s=void 0===e||(Array.isArray(e)?e:[e]).some(e=>o.hasFlagEnabled(e)),l=t(e=>{s&&(n.unstable_forceCheckoutLayoutToOnePage(),Yy(a,{...e,result:"success"}))},[n,s,a]),c=t((e={wallet:null})=>{if(!s)return;if(!n.isCheckoutLayoutForcedToOnePage.value)return;const t={wallet:e.wallet};a.counter({name:"wallet_3page_vaulted_review_exited",value:1,attributes:t}),a.log("wallet_3page_vaulted_review_exited","Exited the forced one-page wallet vaulted review",t),i.navigate("/information",{replace:!0}),n.unstable_clearForcedCheckoutLayout()},[n,s,a,i]);return r(()=>({forceOnePageCheckoutLayout:l,clearForcedCheckoutLayout:c}),[c,l])}function Yy(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 Wy(){const{i18n:e}=oe(),t=function(){const{checkout:{negotiator:e}}=oe(),t=e.current.fields.paymentMethods,r=sn("paymentMethods");return n(()=>!(r.value||!t.value||0===t.value?.length)&&Boolean(t.value?.every(e=>"wallet"===e.type||"walletsPlatform"===e.type||"giftCard"===e.type)))}(),{availableWallets:r}=rn(),a=I(r);return n(()=>{if(!(a.value.length>0)&&t.value)return{code:Dy.PaymentSheetViolations,tone:"critical",localizedMessage:e.translate("payment.no_working_method_error"),nonLocalizedMessage:e.translate("payment.no_working_method_error")}})}function Gy(){const e=Gm(),t=qy(),r=Jp();return n(()=>{const n=e.configurationSignal.value.colors,a=t.configurationSignal.value.main,{current:i,parent:o}=r,s=[i,o].map(e=>e?n.schemes?.[e]?.base?.background:void 0).find(e=>e&&!nn(e));if(s)return s.l<50?"light":"dark";const l=a.colorScheme?n.schemes?.[a.colorScheme]?.base?.background:void 0;return l&&!nn(l)&&l.l<50?"light":"dark"}).value}function Ky(){const{shop:{customerAccountRequirement:e},checkout:{negotiator:t}}=oe(),r=t.current.fields.buyerIdentity,{email:a}=t.parts;return n(()=>{const t=Boolean(!!r.value?.customerProfile&&(r.value.customerProfile.email||a.value));return!("REQUIRED"===e||t)})}function Jy(){const{shop:e,checkout:{negotiator:t}}=oe(),{deliveryNext:r}=t.current.fields,{deliveryLines:a}=t.parts,i=tc(),o=Ct("ONE_TIME_PURCHASE");return n(()=>{if(e.shipPickupInOneOrderEnabled){if(Oy(i.value.currentDetour))return en(r.value);const e=a.value.filter(e=>!e.value.deliveryMethodTypes.includes("NONE"));return e.length>0&&e.every(e=>e.value.deliveryMethodTypes.some(tn))}const t=Et(o.value);return tn(t?.methodType)})}function Qy(){const{checkout:e}=oe(),t=Jy();return n(()=>!t.value&&e.isShippingRequired.value)}function Xy(e){const{checkout:{negotiator:t}}=oe(),r=t.current.fields.paymentMethods;return n(()=>r.value?.find(t=>"wallet"===t.type&&t.name===e))}function Zy(){const{client:e,shop:n,source:r,observability:a}=oe();return t((t,i)=>function({client:e,shop:t,source:n,observability:r},{postalCode:a,countryCode:i,city:o,zoneCode:s},l){const c={wallet:l,postalCode:a,countryCode:i,city:o,zoneCode:s,shopId:t.id,sourceId:n.sourceId,sourceType:n.type,checkoutSessionIdentifier:n.checkoutSessionIdentifier,sessionToken:e.unstable_getSerialization("sessionToken")};zl(a,i)||r.log("wallets_hooks_incomplete_postal_code_detected","Detected incomplete shipping postal code during wallet payment submission",c),un(a,i)&&r.log("wallets_shipping_address_invalid_postal_code_detected","Detected padded postal code from wallet payment submission",c)}({client:e,shop:n,source:r,observability:a},t,i),[e,n,r,a])}function ev(){try{const e=window.__WALLET_TIMEOUT_MULTIPLIER;if(null==e)return 1;const t=Number(e);return!Number.isFinite(t)||t<1?1:Math.min(t,10)}catch{return 1}}function tv(){return 1e4*ev()}function nv(){return 45e3*ev()}function rv(e){const t=e.inMemoryApplePayParts.paymentSheetError,r=e.inMemoryGooglePayParts.paymentSheetError;return n(()=>{const e=t.value;if("unusable_partial_address"===e?.type)return"APPLE_PAY";const n=r.value;return"unusable_partial_address"===n?.type?"GOOGLE_PAY":null})}function av({applePayPaymentSheetError:e,applePaySubscriptionReviewTransition:t,isApplePaySubscriptionReviewLayoutSupported:n}={}){const{checkout:i,router:o,shop:s}=oe(),l=o.currentUrl.value,c=s.hasFlagEnabled(Xt),u=ln(),d=s.hasFlagEnabled(an),p=i.configuration.layout.isOnePage.value,{forceOnePageCheckoutLayout:m}=$y(an),{queryParam:h,errorMessage:g,errorTitle:f,tone:y}=function(e){const{i18n:t}=oe(),n=Fy().value,r=[{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:n||"",tone:"info",condition:()=>Boolean(n)},{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:on,errorMessage:t.translate("wallets.errors.subscription_review_required"),tone:"warning"},...["wallet_cart_not_ready","localization_extension_field_error","wallet_processing_failed"].map(e=>({queryParam:e,errorTitle:t.translate("notice_banner.generic_processing_error.title"),errorMessage:t.translate("notice_banner.generic_processing_error.body"),tone:"critical"}))];for(const a of r)if(e.searchParams.has(a.queryParam)){if(a.condition&&!a.condition())continue;return{queryParam:a.queryParam,errorMessage:a.errorMessage||"",errorTitle:a.errorTitle,tone:a.tone}}return{queryParam:"",errorMessage:"",tone:"info"}}(l),v=zy(),_=h===on&&void 0!==t&&(n??Dl({applePayThreePageVaultedReviewEnabled:d,isOnePageCheckout:p})),b=_;return a(()=>{if(h){_&&t&&!i.wallets.hasConsumedApplePaySubscriptionReviewParam.value&&cn({isABTestActive:c,variant:v,isCaliforniaBillingOrShippingAddress:u.value})?(p||m({wallet:"APPLE_PAY",reason:"subscriptions",asPaymentMethod:!0}),i.wallets.consumeApplePaySubscriptionReviewParam(),e&&(e.value=void 0),t.value="storefront_redirect",i.wallets.setHasActiveApplePaySubscriptionReview(!0)):_&&void 0!==t?.value&&!i.wallets.hasConsumedApplePaySubscriptionReviewParam.value&&(t.value=void 0,i.wallets.setIsDecelerating(!1));const n=new URL(l);n.searchParams.delete(h),history.replaceState(null,"",n.href)}},[e,t,v,l,m,c,u,p,h,b,_,n,i.wallets]),r(()=>({queryParam:h,errorMessage:g,errorTitle:f,tone:y,shouldSuppressNotice:b}),[h,g,f,y,b])}const iv=()=>t(e=>{const t=e.current;if(t){const e=t.getBoundingClientRect(),n=e.left+e.width/2,r=e.top+e.height/2;t.dispatchEvent(new MouseEvent("click",{bubbles:!0,cancelable:!1,clientX:n,clientY:r,screenX:window.screenX+n,screenY:window.screenY+r}))}},[]);dn.portableWallets.url;const ov="guest";function sv(e){const{checkout:{negotiator:t}}=oe(),r=t.current.fields.paymentMethods;return n(()=>r.value?.find(t=>"walletsPlatform"===t.type&&t.name===e))}function lv(e){const{checkout:{negotiator:t}}=oe(),r=t.current.fields.paymentLines;return n(()=>r.value?.lines.find(t=>"walletsPlatformPaymentMethod"===t.method.type&&t.method.name===e))}function cv(){const{checkout:{negotiator:e}}=oe(),{email:n,shippingAddress:r,billingAddress:a,billingAddressOption:i,paymentLines:o}=e.parts,s=function(){const{checkout:e}=oe(),n=e.configuration.addressSettings.nonBillingAddressSettings;return t(function({addressSignal:e,buyerDetailsAddress:t}){L(()=>{for(const[r,a]of Object.entries(t)){if("__typename"===r||void 0===a)continue;if("InvalidWalletPrefillingAddress"===t.__typename&&!n.value.isVisible(r))continue;const i=e.fields[r];i&&(i.value=a)}})},[n])}();return t((e,t)=>{t.email&&(n.value=t.email),t.prefillingShippingAddress&&s({addressSignal:r,buyerDetailsAddress:t.prefillingShippingAddress}),t.prefillingBillingAddress&&(i.value="custom",s({addressSignal:a,buyerDetailsAddress:t.prefillingBillingAddress})),t.walletParams&&function({paymentLineSignal:e,walletName:t,walletParams:n,email:r}){const a={method:{name:t,type:"walletsPlatformPaymentMethod",walletParams:n}},i=e.peek();switch(t){case mn.AmazonPay:case mn.BuyWithPrime:{const[e]=Qt(i,[t]),o=n;if(!e||!e.method.walletParams){a.method.walletParams={...o,...r?{email:r}:{}};break}const s=e.method.walletParams;a.method.walletParams={...s,...o,...r?{email:r}:{}}}}e.value=hn(i,a)}({paymentLineSignal:o,walletName:e,walletParams:t.walletParams,email:t.email??void 0})},[a,i,n,s,o,r])}function uv(e=["phone"]){const{checkout:{negotiator:t}}=oe(),{shippingAddress:n}=t.parts,r=n.value;return{formattedAddress:Yf(r,{hiddenFields:e}),address:r}}function dv(){const e=sv(mn.BuyWithPrime);return n(()=>{const{configurationParams:t}=e.value??{configurationParams:{}},{checkoutSupportsSplitCart:n}=t;return Boolean(n)})}var pv=(e=>(e.Api="ApplePay::Exception::API",e))(pv||{}),mv=(e=>(e.Api="PayPal::Exception::API",e.Sdk="PayPal::Exception::SDK",e.Button="PayPal::Exception::Button",e))(mv||{}),hv=(e=>(e.Available="available",e.Loading="loading",e.Error="error",e))(hv||{});function gv(e,t,n){return!("SHOP_PAY"===e&&!n)&&(t?.includes("ACCELERATED_CHECKOUT")??!1)}function fv(e){const{embed:t}=oe(),n=Boolean(t?.isFlagshipPartner)&&!gn(t?.embedder),a=e.buttonStatus.value;return r(()=>"error"!==a.status&&"not_eligible"!==a.status&&(!n||"not_rendered"!==a.status),[a.status,n])}function yv({isCheckoutEditor:e,embedderHostname:t,userAgent:n}){return!!Boolean("undefined"==typeof window||window.self!==window.top)&&(!(e||Boolean(t))||!function(e){const t=_n(e);return Boolean("Safari"===t?.name&&t.version&&Number(t.version)>=17)}(n))}function vv(e,t){return"CN"===e&&!function(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,a]=n[0].split("_").map(e=>Number(e));return void 0!==r&&(r>11||11===r&&void 0!==a&&a>=2)}(t)}function _v(e,t,n){try{return n()}catch(r){if(r instanceof Error&&"InvalidAccessError"===r.name)return e.log(`apple_pay_session_${t}_error`,`Apple Pay ${t} check failed from insecure context`,{errorName:"InvalidAccessError"}),!1;throw r}}function bv(e,t=0){const n="undefined"==typeof window?0:window.innerWidth;return n<=279?2:n<=375?e||3===t?3:2:4}function kv(){const{shop:{shopPayEnabledForPrimarySellerOfRecord:e},checkout:{negotiator:t}}=oe(),{shopPayEnabledForSellerOfRecord:r}=t.current.fields;return n(()=>r.value??e)}function Pv(){const{shop:{hasMultipleLegalEntities:e},checkout:{identity:t,negotiator:r}}=oe(),a=kv(),i=kn(),{deferredTotal:o}=r.current.fields,s=t.current;return n(()=>i.value&&o.value?"deferred_payment":"shopPay"===s.value&&e||a.value?void 0:"shop_pay_disabled")}function Sv(){const e=Pv();return n(()=>void 0===e.value)}function wv(e){const{inMemoryGooglePayParts:o,inMemoryPayPalParts:s,inMemoryAmazonPayParts:l,inMemoryApplePayParts:c,inMemoryVenmoParts:u}=e,{client:{userAgent:d},checkout:{negotiator:p}}=oe(),{value:m}=p.current.fields.paymentMethods,h=m?.some(e=>"wallet"===e.type&&"APPLE_PAY"===e.name)??!1,g=function(e){const t=rv(e);return n(()=>null!==t.value)}(e);!function(e){const t=rv(e),n=e.didIncrementUnusablePartialAddressMetric,{observability:r}=oe();a(()=>{const e=t.value;n.value||null===e||(r.leaveErrorBreadcrumb("Hiding some wallets due to unusable partial address",{wallet:e}),r.counter({name:"wallets_unusable_partial_address",value:1,attributes:{wallet:e.toString()}}),n.value=!0)},[t.value,r,n])}(e);const f=g.value,y=function({inMemoryGooglePayParts:e,hasUnusablePartialAddress:t}){const{checkout:n,shop:a}=oe(),{shippingCountries:i}=a,o=n.configuration.addressSettings.nonBillingAddressSettings.value.isRequired("company"),s=e.sdkStatus.value,l=e.buttonStatus.value,c=n.configuration.layout.isOnePage.value,u=a.hasFlagEnabled(fn);return r(()=>!(o&&!c&&!u||"error"===s.status||"error"===l.status||"not_eligible"===l.status||n.isShippingRequired.value&&0===i?.length||t&&!c),[o,l.status,s.status,n.isShippingRequired,i?.length,c,u,t])}({hasUnusablePartialAddress:f,inMemoryGooglePayParts:o}),v=function({hasApplePayPaymentMethod:e,hasUnusablePartialAddress:t,inMemoryApplePayParts:n}){const a=jf().geolocation.country.code,{shop:o,observability:s,client:{userAgent:l},embed:c}=oe(),u=o.hasFlagEnabled(yn),d=o.hasFlagEnabled(vn)?c?.client?.embedderHostname:void 0,p=i(),m=Jg(),h=at().value,[g]=Uh(),f=g.includes("PICKUP_POINT"),y=n.buttonStatus.value;return r(()=>!!e&&!t&&!n.sessionLoadFailed.value&&!!h&&!f&&(u?!function(e){return!!/Android|HarmonyOS/i.test(e)||!/iPhone|iPad|iPod|Macintosh/.test(e)&&/Mobile|Tablet/.test(e)}(l)&&!yv({isCheckoutEditor:m,embedderHostname:d,userAgent:l})&&!vv(a,l)&&"not_eligible"!==y.status:function({geolocatedCountryCode:e,observability:t,slowCanMakePaymentCache:n,isCheckoutEditor:r,userAgent:a,embedderHostname:i}){if(yv({isCheckoutEditor:r,embedderHostname:i,userAgent:a}))return!1;const o=Boolean(window.ApplePaySession)&&_v(t,"hasOwnProperty",()=>ApplePaySession.hasOwnProperty("canMakePayments"))&&function(e){return"function"==typeof ApplePaySession.supportsVersion&&_v(e,"supportsVersion",()=>ApplePaySession.supportsVersion(bn))}(t);if(!o)return!1;const s=function(e,t){return void 0!==t.current?t.current:t.current=e.measureSync({name:"apple_pay_can_make_payments_complete",functionToMeasure:ApplePaySession.canMakePayments})}(t,n);return!!s&&!vv(e,a)}({geolocatedCountryCode:a,observability:s,slowCanMakePaymentCache:p,isCheckoutEditor:m,userAgent:l,embedderHostname:d})),[e,t,n.sessionLoadFailed.value,h,f,a,s,p,m,l,d,u,y.status])}({hasApplePayPaymentMethod:h,hasUnusablePartialAddress:f,inMemoryApplePayParts:c}),_=function(e){const t=e.sdkStatus,r=e.buttonStatus;return n(()=>t.value.status!==hv.Error&&"error"!==r.value.status)}(l),b=_.value,k=function({inMemoryAmazonPayParts:e}){const t=function(){const{checkout:{negotiator:e}}=oe(),t=e.current.fields.deliveryNext;return n(()=>{const e=t.value;if(!e||"unavailable"===e.status)return!1;const n=e.lines.filter(He);if(1!==n.length)return!1;const[r]=n;return!!r&&r.methods.some(e=>"LOCAL"===e.methodType)})}(),r=dv(),a=e.sdkStatus,i=e.buyWithPrimeButtonStatus;return n(()=>r.value&&!t.value&&a.value.status!==hv.Error&&"error"!==i.value.status)}({inMemoryAmazonPayParts:l}).value,P=n(()=>function(e){const{status:t}=e;return"error"!==t&&"not_eligible"!==t}(u.buttonStatus.value)).value,S=function(e){const n=e.buttonStatus.value.status;return t(e=>{if("APPLE_PAY"!==e.name||"error"!==n)return e;const t=e.placements?.filter(e=>"ACCELERATED_CHECKOUT"!==e);return t?.length?{...e,placements:t}:void 0},[n])}(c),w=function(e){const n=e.acceleratedCheckoutButtonStatus.value,r=e.payWithPayPalButtonStatus.value;return t(e=>{if("PAYPAL_EXPRESS"!==e.name)return e;if(!e.placements||0===e.placements.length)return;const t=e.placements.filter(e=>!("ACCELERATED_CHECKOUT"===e&&"error"===n.status||"PAYMENT_METHOD"===e&&"error"===r.status));return 0!==t.length?{...e,placements:t}:void 0},[n.status,r.status])}(s),C=Sv().value,E=r(()=>{const e=function(){const e=m?.filter(e=>("wallet"===e.type||"walletsPlatform"===e.type)&&function(e){const t=e.name;switch(t){case"PAYPAL_EXPRESS":return!0;case"APPLE_PAY":return v;case"GOOGLE_PAY":return y;case mn.BuyWithPrime:return k;case mn.AmazonPay:return b;case"SHOP_PAY":return C;case"SHOPIFY_INSTALLMENTS":return!1;case"VENMO":return P;default:return R(t)}}(e))??[];return Cv(e)}().flatMap(e=>w(e)??[]).flatMap(e=>S(e)??[]),t=function({maxWalletButtonCount:e,userAgent:t}){if(""===t)return Pn;function n(t=[]){const n=t.indexOf(mn.BuyWithPrime);-1!==n&&(nt.indexOf(e.name)-t.indexOf(n.name))},[m,v,y,k,b,P,S,w,C,d]);return E}const Cv=e=>e.find(e=>e.name===mn.BuyWithPrime)?e.filter(e=>e.name!==mn.AmazonPay):e;function Ev(){const{checkout:{negotiator:e}}=oe(),t=e.current.fields.paymentMethods,r=sn("paymentMethods");return n(()=>!(r.value||!t.value||0===t.value?.length)&&Boolean(t.value?.some(e=>"wallet"===e.type||"walletsPlatform"===e.type)))}function xv(){const{checkout:e,source:t}=oe(),{didIncrementUnusablePartialAddressMetric:r,inMemoryGooglePayParts:a,inMemoryPayPalParts:i,inMemoryVenmoParts:o,inMemoryApplePayParts:s,inMemoryAmazonPayParts:l,inMemoryShopPayParts:c}=rn(),u=I(wv({inMemoryGooglePayParts:a,inMemoryPayPalParts:i,inMemoryVenmoParts:o,inMemoryApplePayParts:s,inMemoryAmazonPayParts:l,didIncrementUnusablePartialAddressMetric:r})),d=I(fv(c)),p=n(()=>u.value?.filter(({placements:e,name:t})=>gv(t,e,d.value)).length),m=Ev();return n(()=>e.configuration.visibility.showExpressCheckout.value&&(p.value>0||"simulated"===t.type&&!p.value&&m.value))}const Iv=f({swappable:new Set,fixed:new Set,supported:new Set,disabled:new Set});function Av({children:e}){const t=Tv();return d(Iv.Provider,{value:t,children:e})}function Tv(){const e=xv(),{shop:{acceptTipPayments:t},checkout:a}=oe(),i=a.configuration.layout.isOnePage.value,o=n(()=>Sn(a.identity.current.value)),s=sn("isShippingRequired"),l=n(()=>!s.value&&!a.isShippingRequired.value);return r(()=>function({showExpressCheckout:e,isOnePageCheckout:t,acceptTipPayments:n,disableDeliveryExtensions:r,isVaultedWalletIdentity:a}){const i=new Set(En),o=new Set([...wn,...Cn]),s=new Set;return e&&!a||s.add("WALLETS1"),r&&s.add("DELIVERY1"),(r||t)&&s.add("DELIVERY2"),t&&(s.add("INFORMATION3"),n||r||(s.add("PAYMENT3"),s.add("PAYMENT4")),(!n&&r||n&&!r)&&s.add("PAYMENT4")),{swappable:i,fixed:o,disabled:s,supported:new Set([...o,...i])}}({showExpressCheckout:e.value,isOnePageCheckout:i,acceptTipPayments:t,disableDeliveryExtensions:l.value,isVaultedWalletIdentity:o.value}),[t,l.value,o.value,i,e.value])}const Lv=new Map([["thankYou",[...wn,...Cn]]]),Rv=C({suspenseName:"extensions",id:()=>"ExtensionsInner",displayName:"ExtensionsInner",load:()=>E(()=>hl(()=>import("./33682ee7.D0Q8WdWw.js"),__vite__mapDeps([23,1,17,2,3,4,5,12,24,25,26,14,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,13,46,47,48,49,50,51,52,53,54,18,55,56,57,58,59,10,60,61,11,15,16]))),renderError:$h});function Mv(e){const{checkout:{extensibility:{ui:t}}}=oe();return d(Av,{children:d(x,{when:t.enabled,fallback:e.children,children:d(Rv,{...e})})})}const Nv=ae("PostPurchaseContext");function Dv({children:e}){const{shop:t,router:r}=oe(),a=n(()=>r.currentUrl.value.search),i=n(()=>r.currentUrl.value.host),o=n(()=>{const e=new URLSearchParams(a.value),n=e.get("script_url"),r=e.get("api_key")||e.get("post_purchase_dev_api_key"),i=e.get("config")??void 0;return t.postPurchase.developmentModeAvailable&&n&&r?{scriptUrl:n,apiKey:r,config:i}:void 0}),s=n(()=>{const e=new URLSearchParams(a.value),n=e.get("uuid"),r=e.get("socket_url");return t.postPurchase.developmentModeAvailable&&n&&r?{uuid:n,socketUrl:r}:void 0}),l=n(()=>{const{extensionAvailable:e,developmentModeAvailable:n}=t.postPurchase,r=o.value,a=n&&Boolean(r),l=`https://${i.value}/checkouts/unstable/changesets`;return{extensionAvailable:e,postPurchaseEnabled:e||a,developmentMode:a,developmentOptions:r,liveReload:s.value,changesetsUrl:l}});return d(Nv.Provider,{value:l.value,children:e})}function zv({checkout:e}){if(!e.configuration.layout.isOnePage.value)return!1;const t=e.unstable_graphqlDataRequestInfo?.checkoutSheetProtocolConfig?.schema;return Boolean(t&&xn.has(t))}function Ov({checkout:e,mobileCheckoutSdk:t}){if(!e.configuration.layout.isOnePage.value)return!1;const{version:n,schema:r}=t.config;return Boolean(n&&r||t.variant.recovery)}function Bv({children:e}){return d(y,{children:e})}const Fv={"checkout-sheet":C({displayName:"CheckoutSheetProtocolProvider",renderError:$h,renderLoading:Bv,load:()=>E(()=>hl(async()=>{const{CheckoutSheetProtocolProvider:e}=await(import("./0fb2c600.JolLf_C3.js"));return{CheckoutSheetProtocolProvider:e}},__vite__mapDeps([62,1,2,3,4,5,63,64,65,66,13,6,14,11,15,16,17,18])).then(({CheckoutSheetProtocolProvider:e})=>({default:e})))}),"mobile-sdk":C({displayName:"MobileCheckoutSdkProvider",renderError:$h,renderLoading:Bv,load:()=>E(()=>hl(async()=>{const{MobileCheckoutSdkProvider:e}=await(import("./dd9b68fc.DFTZGjf9.js"));return{MobileCheckoutSdkProvider:e}},__vite__mapDeps([67,1,2,3,4,5,64,65,66,13,6,14,11,15,16,17,18])).then(({MobileCheckoutSdkProvider:e})=>({default:e})))})};function Vv(e){const t=function(e){return zv(e)?"checkout-sheet":Ov(e)?"mobile-sdk":null}(e);return t?Fv[t]:null}function Uv({children:e}){const t=Vv(oe());return d(t||y,{children:e})}const qv=["closeAnnouncement","announcementAfterCollapsed","announcementAfterExpanded","announcementClosed","announcementExpanded","announcementCollapsed"],jv=ae("AnnouncementEmitterContext");function Hv({children:e}){const n=i(new Map),a=t((e,t)=>{n.current.has(e)||n.current.set(e,new Set);const r=n.current.get(e);r.has(t)||(M(t),r.add(t))},[n]),o=t((e,t)=>{const r=n.current.get(e);if(r)for(const n of r)n(t)},[n]),s=t((e,t)=>{const r=n.current.get(e);r?.has(t)&&(N(t),r.delete(t))},[n]),l=t(e=>{const t=e?[e]:qv;for(const r of t){const e=n.current.get(r);if(e){for(const t of e)N(t);e.clear()}}},[n]),c=r(()=>({on:a,emit:o,off:s,removeAllListeners:l}),[a,o,s,l]);return d(jv.Provider,{value:c,children:e})}function $v(){return ie(jv)}const Yv=f(null),Wv=ae("PendingComponentContext");function Gv({children:e}){const t=r(()=>{const e=w(new Set);return{registerComponent:t=>(e.value=new Set([...e.peek(),t]),()=>{e.value=new Set([...e.peek()].filter(e=>e!==t))}),pendingComponentsSignal:e}},[]);return d(Yv.Provider,{value:t,children:e})}function Kv(){return h(Yv)}const Jv=D,Qv=Jv(({checkout:e,graphql:{coreGraphql:t}},{queueToken:n,serializedReceipt:r,sessionFinished:a})=>{const i=t.query(In,{variables:{checkpointData:e.checkpointToken.peek()??null,queueToken:n??null},skip:An(a,r)});return{context:P(()=>({data:i.data.value??void 0,loading:i.loading.value})),data:i.data,error:i.error}});class Xv extends Error{constructor(){super(...arguments),this.name="InitialNegotiationError"}}const Zv=ae("InitialNegotiationContext");function e_({children:e}){const{client:n,observability:r,url:i,router:o,checkout:s,shopPay:c}=oe(),{negotiator:u}=s,p=!c.isExternal,m=p?u.initializationError.value:void 0,h=n.unstable_getSerialization("sessionFinished"),g=n.unstable_getSerialization("receipt"),f=n.unstable_getSerialization("queueToken"),{context:y,data:v,error:_}=Tn(Qv,{queueToken:f,serializedReceipt:g,sessionFinished:h}),b=function(){const{observability:e}=oe();return t((t,n)=>{const r=Rn(t,n);return r&&(e.counter({name:"negotiation_session_source_missing",value:1}),e.log("negotiation_session_source_missing","An error occurred fetching negotation result due to missing source")),r},[e])}();if(l(()=>{p&&u.prepareStartup()},[p,u]),a(()=>{p&&u.runStartup()},[p,u]),_.value)throw r.leaveErrorBreadcrumb("InitialNegotiation: serialized data",{sessionFinished:h,receiptExist:Boolean(g?.exists),receiptInProgress:Boolean(g?.inProgress),receiptStatus:g?.status}),new Xv(`Error loading cart from negotiateFromSessionQuery: ${_.value.message}`);if(b(g,v.value?.session?.negotiate))return"undefined"==typeof window?o.redirect(i.cart()):window.location.replace(i.cart()),null;if(m)throw m;if(p){const e=y.value;if(null==e.data&&e.loading)return null;const t=e.data?.session?.negotiate?.result;if("CheckpointDenied"===t?.__typename){const e=Ln(t.redirectUrl,"undefined"==typeof window?o.currentUrl.value.toString():void 0);return"undefined"==typeof window?o.redirect(e):window.location.assign(e.href),null}}return d(Zv.Provider,{value:y.value,children:e})}const t_=ae("ExtensionPointContext"),n_=ae("ExtensionContext"),r_=ae("CheckoutEditorBridgeContext");function a_({children:e}){const t=Jg(),n=function(){const{client:e}=oe(),{isCheckoutEditor:t,isServerRendered:n}=e.initialRequest;return!0===t&&!0===n}(),[r,a]=s(null),i=at();return t?d(r_.Provider,{value:r,children:[n||r?e:null,d(x,{when:i,children:d(i_,{setContext:a})})]}):e}const i_=C({load:()=>hl(()=>import("./adeb5fdb.C5dTm0Yd.js"),__vite__mapDeps([68,1,46,26,2,3,4,5,69,70,66,71,63,11,14,15,16,17,18]))}),o_=f({loading:!1}),s_="dev";function l_(){return h(o_)}function c_(e){return!(!e?.version||parseInt(e.version,10)<3)}const u_="dev_mode";function d_({children:e}){const t=function(){const e=function(){const{client:e}=oe();return r(()=>{return t=e.cookies,{get:()=>t.get(u_),set:e=>{const n=(new Date).getTime(),r=new Date(n+18144e5);t.set(u_,e,{expiry:r})},remove:()=>{t.delete(u_)}};var t},[e.cookies])}(),{router:t,shop:n}=oe(),i=r(()=>t.currentUrl.value.searchParams.get("dev")??e.get(),[t,e]),o=null!=i&&(n.allowExtensionDevelopment||!1),[s,l]=z((e,t)=>{switch(t.type){case"fetched":{const e=c_(t.workspace)?{...t.workspace,extensions:(n=t.workspace.extensions,n.filter(e=>"checkout"===e.surface||!!Array.isArray(e.extensionPoints)&&(e.extensionPoints=e.extensionPoints.filter(e=>"object"==typeof e&&"surface"in e&&"checkout"===e?.surface)).length>0).map(e=>({...e,extensionPoints:e.extensionPoints.map(t=>"object"==typeof t?t:{target:t,metafields:e.metafields,surface:"checkout"})})))}:{...t.workspace,extensions:t.workspace.extensions.map(({extensionPoint:e,...t})=>({version:null,...t,extensionPoints:e?[e]:t.extensionPoints}))};return e.appId&&(e.appId=function(e){const t=e.trim();return t.startsWith("gid://shopify/App/")?t:xl("App",t)}(e.appId)),{loading:!1,workspace:e}}case"error":return{loading:!1}}var n},{loading:o});return a(()=>{if(!o)return;let t=!0;return(async()=>{try{const n=await fetch(i),r=await n.json();if(!t)return;e.set(i),l({type:"fetched",workspace:r})}catch{if(!t)return;l({type:"error"})}})(),()=>{t=!1}},[i,e,o]),s}();return d(o_.Provider,{value:t,children:e})}function p_(e,t){return{type:"throttle",label:e.translate("throttle.title"),...t?{behavior:t}:{},route:"/throttle"}}function m_(e){return{type:"processing",label:e.translate("processing.title"),route:"/processing"}}function h_(e){return{type:"thankYou",label:e.translate("thank_you.title"),route:"/thank-you"}}function g_(e){return{type:"stockProblems",label:e.translate("stock.title"),route:"/stock-problems"}}function f_(e,t){return{type:"terminalError",route:"/error",label:e.translate("general.title",{shopName:t})}}function y_(e){return{type:"postPurchase",label:e.translate("post_purchase.title"),route:"/post-purchase"}}function v_(e){return{type:"offsitePaymentFailed",label:e.translate("offsite_payment_failed.title"),route:"/offsite-payment-failed"}}function __(e){return{type:"shopPayLogin",label:e.translate("brand.shop_pay"),route:"/shoppay_login"}}function b_(e,{beforeStock:t=[],afterStock:n=[y_(e)]}={}){return[p_(e),m_(e),h_(e),...t,g_(e),...n]}function k_(e){return{id:"review",label:e.translate("review.title"),route:"/review",features:[]}}function P_(e,t,n){if(!e)return!1;const r=t?.[0]?.method;if("wallet"!==r?.type)return!1;const a=Fl(n);return"APPLE_PAY"===r.name||"PAYPAL_EXPRESS"===r.name&&a}function S_(){const{checkout:e,shop:t,i18n:r}=oe(),{buyerIdentity:a,deliveryNext:i}=e.negotiator.current.fields,o=n(()=>Nn(a.value?.purchasingCompany?.location.shippingAddress)?.countryCode),{details:s}=Rt(o.value),l=I(s),c=t.additionalAddressFieldsEnabled;return n(()=>Dn({purchasingCompany:a.value?.purchasingCompany,shippingCountries:t.shippingCountries,addressSettings:e.configuration.addressSettings.nonBillingAddressSettings.value,countryDetails:l.value,editFormat:e.address.extendedAddressMode.getFormat(o.value,null),deliveryNextValue:i.value,additionalFieldsEnabled:c,i18n:r}))}function w_(){const{checkout:{negotiator:e}}=oe(),{buyerIdentity:t}=e.current.fields,r=Ve();return n(()=>r.value.enabledDeliveryMethods.includes("PICK_UP")&&Boolean(t.value?.purchasingCompany))}function C_({checkout:e,source:t}){const n=e.proposal.facts.delivery??[];if(Mn(t)&&n.length>0)return n[0]}function E_(){const e=w_(),{checkout:t}=oe(),r=t.negotiator.current.fields.deliveryNext;return n(()=>{const n=t.proposal.facts.delivery??[],a=n.length>0&&n.every(e=>null!==e.pickupAddress);return e.value&&(en(r.value)||a)})}function x_(){const e=ot(),{checkout:t,source:r}=oe(),{buyerIdentity:a,shippingAddress:i}=t.negotiator.current.fields,o=E_(),s=w_(),l=Vc();return n(()=>!(l.value||!s.value&&!e.value||o.value||Ut(C_({checkout:t,source:r})?.deliveryAddress??i.value)||a.value?.purchasingCompany?.location.shippingAddress))}function I_(){const e=Vc(),t=w_(),{checkout:r,source:a}=oe(),i=r.negotiator.current.fields.buyerIdentity,o=r.proposal.negotiated.fields.mustSelectProvidedShippingRate;return n(()=>{const n=i.value?.purchasingCompany,s=(o.value??!1)||Boolean(C_({checkout:r,source:a}));return Boolean(n)&&(e.value||t.value&&!s)&&r.isShippingRequired.value})}const A_=["contact-information","shipping-address"],T_=["delivery-method"],L_=["payment-methods","billing-address","localization-extension"];function R_(e){e.parts.email.value.trim()&&e.parts.acceptEmailMarketing.value&&(e.context.emailMarketingConsentGrantReachedSignal.value=!0)}function M_(){const{checkout:{configuration:e,journey:t,negotiator:n}}=oe(),r=e.layout.isOnePage.value;return ac(async(e,a)=>{if("completion"===e)return void R_(n);if("progression"!==e||a?.prefetch||r)return;const i=t.currentDetour.value,o=t.currentPage.value,s=t.plan.value;if(i||null==o||n.context.noAddressLocationModalShownSignal.value)return;const l=n.current.value,c=s.greenPath.findIndex(e=>On(e,o)),u=function(e,t,n){return e.slice(t+1).find(e=>null==e.skipOverPage||!e.skipOverPage(n))}(s.greenPath,c,l);("shipping"===o.id||"information"===o.id&&"shipping"===u?.id)&&R_(n)}),null}function N_({observability:e}){e.log("stock_problems_page_viewed","Stock Problems page viewed")}function D_(e){return{receiptId:e?.id?me(e.id)??e.id:void 0,status:e?.status}}function z_(e){return"complete"===e.status||"inactive"===e.status}function O_(e){return"failed"===e?.status||"processed"===e?.status}const B_="departure_page";function F_({feature:e,greenPath:t,history:n,negotiated:r,observability:a}){let i=V_(t,r,e);const o=n.find(e=>!e.complete&&!e.skipped),s=t.findIndex(e=>e.id===i?.id),l=t.findIndex(e=>o?.id===e.id);if(!i||!(s>=0&&s<=l)){const n=t[l]??U_(t);a.leaveErrorBreadcrumb(`useNavigateToLastPageWithFeature - chosen page with feature ${e} was not visited by user, defaulting to ${n.id}`),i=n}return i}function V_(e,t,n){return[...e].reverse().find(e=>("function"==typeof e.features?e.features(t.current.peek()):e.features).includes(n))}function U_(e){const[t]=e;if(!t)throw new Bn("Cannot choose a journey page from an empty green path",{groupingHash:"JourneyError::EmptyGreenPath"});return t}const q_="checkout_queue_token",j_=1500,H_=450;function $_(){const{observability:e,router:n,checkout:{journey:r,negotiator:a}}=oe(),i=r.state.value.history,o=r.plan.value.greenPath;return t((t,r)=>function({observability:e,router:t},{replace:n,...r}){const a={pathname:F_({...r,observability:e}).route,search:t.currentUrl.value.search};n?t.navigate(a,{replace:n}):t.navigate(a)}({observability:e,router:n},{feature:t,greenPath:o,history:i,negotiated:a,replace:r?.replace}),[o,a,i,e,n])}function Y_(e){return"customOnsite"===e.method.type&&1===e.method.paymentBrands?.length&&e.method.paymentBrands.includes("usdc")}function W_(e){return"customOnsite"===e.type&&1===e.paymentBrands?.length&&e.paymentBrands.includes("usdc")}const G_={id:"98f65f1b789aa2a58a4da4284e773c8d577787273e650e6823704d3715082c59",type:"query",name:"PollForReceipt",source:""};function K_(){const{checkout:{negotiator:e}}=oe(),t=e.current.fields.paymentMethods,r=e.parts.paymentLines;return n(()=>{const e=r.value.at(0);return!!e&&(Y_(e)||function(e,t){if(!t||0===t.length)return!1;if(!("walletContent"in e.method)||"SHOP_PAY"!==e.method.name)return!1;const n=e.method.walletContent?.paymentMethodIdentifier,r=t.find(e=>W_(e)&&e.paymentMethodIdentifier===n);return Boolean(r)}(e,t.value))})}const J_=["post-purchase-e2e-tests.myshopify.com","e2e-post-purchase-testing.myshopify.com"];function Q_(e){const t=location.hostname;return J_.includes(t)}const X_=3e3,Z_=15e3,eb="hsa_survey_completed";function tb(e){if(!e)return"";try{return new URL(nb(e)).hostname.replace(/^www\./,"")}catch{return e.replace(/^https?:\/\/(www\.)?/,"")}}const nb=e=>e.replace(/^(?:(.*:)?\/\/)?(.*)/i,(e,t,n)=>t?e:`https://${n}`),rb="3ds_completed",ab=6e5;function ib(e){if(!e)return"none";try{const t=new URL(nb(e)).hostname.toLowerCase().replace(/^www\./,"");return"hooks.stripe.com"===t?"hooks.stripe.com":"uk.affirm.com"===t?"uk.affirm.com":"sandbox.uk.affirm.com"===t?"sandbox.uk.affirm.com":"affirm.com"===t?"affirm.com":"sandbox.affirm.com"===t?"sandbox.affirm.com":t.endsWith(".affirm.com")?"affirm_subdomain":t.endsWith(".stripe.com")?"stripe_subdomain":"other"}catch{return"invalid"}}const ob=Symbol("pollRequestTimedOut");async function sb(e,t){let n;const r=new Promise(e=>{n=setTimeout(()=>e(ob),t)});try{return await Promise.race([e,r])}finally{clearTimeout(n)}}function lb(e){return"action_required"===e.status&&"complete_payment_challenge"===e.action.type&&e.action.offsiteRedirect}function cb(e){if(void 0===e)return"";try{const t=new URL(e);return`${t.protocol}//${t.host}`}catch{return""}}const ub=["failed","processed"];function db(){const{currentPage:e,currentDetour:r}=tc().value,{observability:o,checkout:{offsitePopupController:s},mobileCheckoutSdk:l,embed:c}=oe(),u=i(),d=function(){const e=B({maxAttempts:120}),{client:n,checkout:r,persistence:o,observability:s,embed:l,source:c,graphql:{coreGraphql:u}}=oe(),d=n.unstable_getSerialization("sessionToken"),p=i(),m=K_();return a(()=>()=>{p.current=void 0},[]),t(async t=>{const n=Symbol("receipt-poll");p.current=n;const a=r.latestReceipt.value?.id,i=()=>p.current===n&&y&&!(a!==r.latestReceipt.value?.id),h=r.latestReceipt.value;if(null==h?.id||null==h)return;t?.(h),s.log("receipt_polling_detected","[Receipt Polling] Receipt polling started with initial receipt",D_(h));let g,f,y=!0,v=0,_=!1,b=Date.now(),k=!1,P=!1,S=!1;switch(h.status){case"processing":case"processing_remote_checkouts":f=h.pollAt;break;case"action_required":f=await w(h);break;case"polling_for_order":f=Yn+Date.now()}async function w(e){return new Promise(t=>{if(r.configuration.isUniversalCheckoutFinalizer&&"complete_payment_challenge"===e.action.type&&!1===e.action.offsiteRedirect&&!m.value||k||(k=!0,qn(l,`action_required_receipt - ${e.action.type}`)),"complete_payment_challenge"===e.action.type){if(m.value)return t(Date.now()+X_);if(e.action.offsiteRedirect)return t(void 0)}else{if("pre_payment_buyer_action_required"===e.action.type){if(S)return t(Date.now()+X_);const n=Date.now(),r={...D_(e),actionType:e.action.type,listenerType:"receipt_polling_hsa_survey_listener",modalSourceType:"receipt_action",surface:"checkout-web"},a=({data:e})=>{e?.type===eb&&(window.removeEventListener("message",a),S=!0,v=0,b=Date.now(),s.log("hsa_survey_postmessage_received","[Receipt Polling] HSA survey completed postMessage received",{...r,dataType:eb,elapsedTimeMs:Date.now()-n}),t(Date.now()))};return s.log("hsa_survey_postmessage_listener_started","[Receipt Polling] HSA survey completed postMessage listener started",r),void window.addEventListener("message",a)}if("complete_payment_challenge_v2"===e.action.type){const n=e.timeout?.millisecondsRemaining;return _&&0===n&&(v=0,b=Date.now()),_=Boolean(n),t(_?Date.now()+X_:Date.now()+jn)}}const n=Date.now(),a="complete_payment_challenge"===e.action.type?e.action:void 0,u={...D_(e),actionType:e.action.type,listenerType:"receipt_polling_three_ds_listener",modalSourceType:"receipt_action",offsiteRedirect:a?.offsiteRedirect,sourceHostCategory:ib(a?.url),surface:"checkout-web"},d=({data:a,origin:o})=>{if(a.type===rb){if(clearTimeout(p),window.removeEventListener("message",d),!i()||!uy(r.latestReceipt.value,e))return void t(void 0);v=0,b=Date.now();const a=Date.now()-n;s.log("receipt_polling_detected","[Receipt Polling] 3DS challenge event received",{dataType:rb}),s.log("three_ds_postmessage_received","[Receipt Polling] 3DS postMessage received",{...u,dataType:rb,elapsedTimeMs:a,originHostCategory:ib(o)}),t(Date.now())}},p=setTimeout(()=>{window.removeEventListener("message",d),i()&&uy(r.latestReceipt.value,e)?(r.unstable_overwriteLatestReceipt({status:"failed",id:e.id,failure:{type:"payment",code:"GENERIC_ERROR"}}),o&&Hn(o,c),s.counter({name:"three_d_secure_challenge_timeout",value:1}),s.log("use_receipt_polling_three_ds_challenge_timed_out","3DS challenge timed out",D_(e)),s.log("three_ds_postmessage_timed_out","[Receipt Polling] 3DS postMessage listener timed out",{...u,elapsedTimeMs:Date.now()-n}),t(void 0)):t(void 0)},e.timeout?.millisecondsRemaining??ab);s.log("receipt_polling_detected","[Receipt Polling] Adding event listener for 3DS challenge event"),s.log("three_ds_postmessage_listener_started","[Receipt Polling] 3DS postMessage listener started",u),window.addEventListener("message",d)})}async function C(){const e={receiptId:r.latestReceipt.value?.id,sessionToken:d},t=await sb(u.staticQuery(G_,{cache:!1,variables:e}),Z_);if(t!==ob)return t;if(E(1),!i())return;const n=u.query(G_,{cache:!1,variables:e});try{const e=await sb(Promise.resolve(n.refetch()),Z_);if(e!==ob)return e}finally{n[Symbol.dispose]()}E(2)}function E(e){s.log("receipt_polling_request_timed_out","[Receipt Polling] Receipt poll request timed out",{...D_(r.latestReceipt.value),attempt:e,timeout:Z_})}for(;null!=f;){await F(f-Date.now());const n=Date.now()-b;if(++v,!_&&v>120&&n>12e4&&(y=!1,s.leaveErrorBreadcrumb("[ReceiptPolling] Receipt polling timeout",{...D_(h),pollAttempts:v}),s.counter({name:"receipt_polling_timeout",value:1}),s.log("use_receipt_polling_polling_timed_out","Receipt polling timed out",{...D_(r.latestReceipt.value),timePolling:n,pollAttempts:v})),!i())break;const a=await C(),l=a?.data,u=a?.error;if(u||null==l||"ReceiptNotFound"===l.receipt.__typename){if(!i())break;f=Date.now()+(e.next().value||6e4);continue}if(!i())break;const d=g?Date.now()-g:0,p=Q_()?3e4:1e4,k=!!g&&d>=p;let S;if(!P)try{S=await $n()}catch(x){if(!i())break;P=!0,s.leaveErrorBreadcrumb("[ReceiptPolling] Receipt mapper failed to load during polling",{error:String(x),receiptType:l.receipt.__typename})}if(P){if("ProcessingReceipt"===l.receipt.__typename||"WaitingReceipt"===l.receipt.__typename){e.reset(),f=Date.now()+l.receipt.pollDelay;continue}if("ProcessedReceipt"!==l.receipt.__typename)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}f=Yn+Date.now();continue}if(!i())break;if(!S)break;e.reset();const E=S(l.receipt,{pollingTimeoutReached:k});"polling_for_order"===r.latestReceipt.value?.status&&"processed"===E?.status&&(k?s.counter({name:"PostPurchase_order_polling_timeout",value:1}):s.histogram({name:"PostPurchase_order_polling_duration",value:d}));const I=!(!m.value&&lb(E)||uy(E,h)),A=D_(h),T=D_(E),L={receiptId:T.receiptId,status:T.status,prevReceiptId:A.receiptId,prevReceiptStatus:A.status};if(I?(s.log("receipt_polling_detected","[Receipt Polling] Overwriting receipt with latest update",L),r.unstable_overwriteLatestReceipt(E)):uy(E,h)&&s.log("receipt_polling_detected","[Receipt Polling] Skipped overwriting receipt with same receipt",L),!i())break;if(t?.(E),"processing"===E.status||"processing_remote_checkouts"===E.status)f=E.pollAt;else if("action_required"===E.status)f=await w(E);else{if("polling_for_order"!==E.status){o&&Hn(o,c);break}f=Yn+Date.now(),g||(g=f)}if(!i())break}},[r,o,u,d,s,e,l,m,c])}(),p=function(){const e=K_();return t((t,n)=>{e.value||dy(t)&&my(t.action)&&t.action.offsiteRedirect&&n(t.action.url)},[e])}(),m=function(){const{checkout:{negotiator:e}}=oe(),t=e.current.fields.paymentMethods,r=e.parts.paymentLines;return n(()=>{const e=r.value.at(0);return!!e&&("customOnsite"===(n=e).method.type&&(n.method.paymentBrands??[]).some(e=>"wechatpay"===e.toLowerCase())||function(e,t){if(!t||0===t.length)return!1;if(!("walletContent"in e.method)||"SHOP_PAY"!==e.method.name)return!1;const n=e.method.walletContent?.paymentMethodIdentifier,r=t.find(e=>{return"customOnsite"===(t=e).type&&(t.paymentBrands??[]).some(e=>"wechatpay"===e.toLowerCase())&&e.paymentMethodIdentifier===n;var t});return Boolean(r)}(e,t.value));var n})}(),h=l.variant.isStandard()||Boolean(c?.isCheckoutKit())||"shopApp"===c?.embedder,g=t(()=>{document.hidden||(document.removeEventListener("visibilitychange",g),o.log("processing_user_return_to_checkout_initiated","[Processing] User navigated back to checkout after offsite payment",{provider:cb(u.current)},{exportImmediately:!0}),d(e=>{p(e,()=>{document.addEventListener("visibilitychange",g)})}))},[p,d,o]),f=t(()=>{d(t=>{ub.includes(t.status)&&s.isOpen.value&&s.close({}),p(t,n=>{o.leaveErrorBreadcrumb("Redirecting to offsite payment",{receipt:t,currentPage:e,currentDetour:r}),o.log("processing_offsite_payment_redirect_initiated","[Processing] Redirecting to offsite payment",{provider:cb(n),providerUrl:n},{exportImmediately:!0}),s.isOpen.value?s.redirect(n):(m.value?function(e){const t=document.createElement("a");t.href=e,t.rel="noopener",t.referrerPolicy="strict-origin",document.body.appendChild(t),t.click(),t.remove()}(n):window.location.assign(n),u.current=n,h&&document.addEventListener("visibilitychange",g))})})},[p,m,d,h,r,e,g,o,s]);return a(()=>()=>document.removeEventListener("visibilitychange",g),[]),f}function*pb(e,t=[]){const{customFields:n,placementReferences:r}=e,a=Wn(t,r);for(const[i,o]of n.entries())a(Gn(o))||(yield`${Kn}[${i}]`)}function mb({violation:e,currentPageId:t,isOnePageCheckout:n}){return!!n||"payment"===t||!(Jn.has(e.code)||Qn.has(e.code)||jt.has(e.code))}function hb(e,t){return e.find(e=>e.type===t)}function gb(e){return"completion"===e.source?"rejected"===e.result.status?e.result.violations:void 0:"success"===e.result.status||"error"===e.result.status?e.result.violations:void 0}const fb={negotiation:{stockProblems:{message:"Stock problems, but no matching detour",groupingHash:"JourneyError::StockProblemsNoMatchingDetourNegotiate"},throttle:{message:"Throttled, but no matching detour",groupingHash:"JourneyError::ThrottledNoMatchingDetour"}},completion:{stockProblems:{message:"Stock problems, but no matching detour",groupingHash:"JourneyError::StockProblemsNoMatchingDetour"},throttle:{message:"Throttled, but no detour",groupingHash:"JourneyError::ThrottledNoDetour"}}};function yb(e,t){const{message:n,groupingHash:r}=fb[e][t];return{type:t,outcome:"error",error:new Bn(n,{groupingHash:r})}}function vb(e,t){const n=gb(e);if(n&&Xn(n)){const n=hb(t,"stockProblems");return null==n?yb(e.source,"stockProblems"):{type:"stockProblems",outcome:"route",route:n.route}}if("throttled"===e.result.status){const n=hb(t,"throttle");return n?.route?{type:"throttle",outcome:"route",route:n.route}:yb(e.source,"throttle")}}function _b(e){const t=gb(e);return!!t&&Zn(t)}function bb(e,{greenPath:t,currentPage:n}){if("success"!==e.status&&"violations"in e)return function({violations:e,greenPath:t,negotiated:n,currentPage:r}){const a=new Set(e.map(Un)),i=t.filter(e=>!e.skipOverPage||!e.skipOverPage(n)),o=i.findIndex(e=>e.id===r?.id);return(-1===o?i:i.slice(0,o)).find(e=>("function"==typeof e.features?e.features(n):e.features).some(e=>a.has(e)))}({currentPage:n,greenPath:t,negotiated:e.negotiated,violations:e.violations})}function kb(){const{shop:{id:e}}=oe();return r(()=>{const t=e.split("/").pop();if(!t)return;const n=parseInt(t,10);return isNaN(n)?void 0:n},[e])}function Pb({mode:e="set",include:n={}}={}){const{shopClientUuid:r=!1,shopId:a=!1}=n,i=oe().embed?.shopClientUuid,o=kb();return t((t,n)=>er(t,n,{mode:e,include:{shopClientUuid:r,shopId:a},embedShopClientUuid:i,shopIdNumber:o}),[i,r,a,e,o])}function Sb(e,t,n,r,a){const i=e.some(e=>"BUYER_IDENTITY_PERSONAL_ORDER_NOT_ALLOWED"===e.code),o=e.some(e=>"BUYER_IDENTITY_COMPANY_LOCATION_REQUIRED"===e.code);i&&t&&(a.log("redirect_to_storefront","[B2B] Buyer identity violation: personal order not allowed, redirecting to storefront",{redirectSuccess:Boolean(t)}),window.location.replace(t)),o&&window.location.replace(n??r)}function wb(){const{client:e,shop:t,checkout:{negotiator:r,configuration:a}}=oe(),i=r.current.fields.buyerIdentity;return n(()=>Boolean(t.loginLinkVisible)&&t.hasStorefront&&a.allowRedirectToStorefront&&Boolean(e.unstable_getSerialization("loginUrl"))&&"OPTIONAL"===t.customerAccountRequirement&&!i.value?.customerProfile)}function Cb(){const{shop:e,checkout:{identity:t,configuration:r,negotiator:a},mobileCheckoutSdk:i,source:o}=oe(),s=a.current.fields.buyerIdentity;return n(()=>{const n="shopPay"===t.current.value,a="OPTIONAL"===e.customerAccountRequirement,l="REQUIRED"===e.customerAccountRequirement,c="DISABLED"===e.customerAccountRequirement;return"draftOrder"!==o.type&&e.hasStorefront&&!i.variant.isPartner()&&r.allowRedirectToStorefront&&!n&&(a||l||c&&Boolean(s.value?.customerProfile))})}function Eb(){const{checkout:{negotiator:e}}=oe(),n=e.current.fields.buyerIdentity;return t(e=>{const t=n.value?.customerProfile,r=n.value?.purchasingCompany;if(t)return"billing"===e?"CustomerProfile"===t.__typename?t.billingAddresses[0]?.address:r?r.location.billingAddress:void 0:"shipping"===e?"CustomerProfile"===t.__typename?t.shippingAddresses[0]?.address:r?r.location.shippingAddress:void 0:void 0},[n])}function xb(){const{embed:e,mobileCheckoutSdk:t,shop:r,source:a,checkout:{negotiator:i,configuration:o}}=oe(),s=tc(),l=i.current.fields.buyerIdentity,c=Qh(),u=Boolean(e)||t.enabled,d=Boolean(r.remoteShopsConfigMap?.size);return n(()=>{const e=l.value,t=Boolean(r.loginLinkVisible)&&Boolean(e?.customerProfile)&&(e?.purchasingCompany?!u:r.hasStorefront&&o.allowRedirectToStorefront&&"draftOrder"!==a.type);return c&&"thankYou"===s.value.currentDetour?.type&&!d&&t})}function Ib(e=!1){const{checkout:{negotiator:t},i18n:r,router:a,shop:i}=oe();return n(()=>sr({checkout:{negotiator:t},i18n:r,router:a,shop:i},{forceRedirect:e}))}function Ab(){const e=i(!0);return l(()=>()=>{e.current=!1},[]),e}class Tb extends Error{constructor(){super(...arguments),this.name="ProposalNegotiationError"}}function Lb(e,n){const{client:r,router:a,checkout:i,shop:o,observability:s,url:l}=oe(),{plan:c,currentPage:u,currentDetour:d}=tc().value,p=i.negotiator,m=r.unstable_legacyNavigationPerformance,h=Ib(!0),g=Ab(),f=i.configuration.layout.isOnePage,y=o.hasFlagEnabled(lr),{inMemoryApplePayParts:{asPaymentMethod:v}}=rn();return t(async({onComplete:t,silenceViolations:r=[],walletValidationAttemptId:_,prefetch:b=!1,negotiationStage:k,...P})=>{const S=u,w=k??"negotiation",C=e=>{if(_)try{s.log("wallet_validation_phase","Wallet validation phase",{attemptId:_,phase:e,negotiationStage:w,prefetch:b,mounted:g.current,hasOnComplete:Boolean(t)})}catch{}};C("entered"),"progression"!==w||b||n(!0),s.debug("negotiation_triggered","Negotiation triggered",{negotiationStage:w}),"progression"===w&&await p.runBeforeNegotiationListeners(w,{prefetch:b});try{C("core_started");const u={...P,silenceViolations:"function"==typeof r?r():r,skipStateUpdates:b,negotiationStage:w};let k=await p.negotiate(u);y&&"stale"===k.status&&"interceptors"===k.phase&&"completion"===w&&!b&&g.current&&(await p.waitForPendingNegotiations(),g.current&&(s.log("negotiate_stale_completion_retried","Stale completion-stage negotiation retried automatically",{attemptId:_}),k=await p.negotiate(u),"stale"===k.status&&s.log("negotiate_stale_completion_retry_exhausted","Completion-stage negotiation still stale after automatic retry",{attemptId:_})));const E=k;if(C("core_returned"),s.log("negotiation_result_completed","Negotiation result completed",{negotiationStatus:E.status,negotiationStage:w,violations:"violations"in E?cr(E.violations):void 0}),g.current){if(b)return void C("callback_skipped_prefetch");const r="success"===E.status||"error"===E.status,u={source:"negotiation",result:E},g=vb(u,c.detours),y="stockProblems"===g?.type;try{if(g)switch(g.outcome){case"error":throw g.error;case"route":switch(g.type){case"stockProblems":return N_({observability:s}),void a.navigate(g.route);case"throttle":a.navigate(g.route)}}if(_b(u))return s.log("login_failure_triggered","Buyer identity login failure detected, redirecting to login"),window.location.replace(l.login(window.location.href));r&&Sb(E.violations,o.storefrontUrl,h.value,a.currentUrl.value,s);const t={source:"journey",negotiationStage:w,runListenersOnError:P.runListenersOnError};switch(E.status){case"success":C("listeners_started"),await ur(p,E,t),C("listeners_returned");break;case"alreadyCompleted":i.unstable_overwriteLatestReceipt(E.receipt);break;case"error":{m?.cancelNavigation(),("progression"===w||Boolean(P.runListenersOnError))&&C("listeners_started");const e=ur(p,E,t);e&&(await e,C("listeners_returned"));break}case"throttled":case"denied":case"fetch_failed":break;case"invalid":ur(p,E,t);break;case"stale":case"tooManyRequests":s.log("negotiate_result_no_dispatch","Handling negotiation result without explicit dispatch",{status:E.status,currentPage:S,currentDetour:d,negotiationStage:w});break;default:R(E)}const c=function(e,{currentPage:t,isOnePageCheckout:n}){if(null!=t)switch(e.status){case"error":return function(e,t,n){return"error"===e.status&&function({violations:e,currentPageId:t,isOnePageCheckout:n}){return e.some(e=>mb({violation:e,currentPageId:t,isOnePageCheckout:n}))}({violations:e.violations,currentPageId:t.id,isOnePageCheckout:n})}(e,t,n)?t:void 0;case"invalid":case"denied":case"fetch_failed":return t;default:return}}(E,{currentPage:S,isOnePageCheckout:f.value});c&&e({type:"error",page:c}),"progression"===w&&n(!1)}finally{C("callback_delivering"),t?.(E),C("callback_returned");const e=v.value&&i.wallets.activeSession.value;if(!y&&S&&!e){const e=bb(E,{currentPage:S,greenPath:c.greenPath});e&&a.navigate(e.route)}}}else C("callback_skipped_unmounted")}catch(E){if(E instanceof dr)return void C("rejected_request_swallowed");C("wrapper_threw");const e=E instanceof Error?E:new Tb;if(e)throw e}},[v,i,u,h,e,f,g,n,m,c,p,a,o?.storefrontUrl,y,l,s,d])}function Rb(){const e=(()=>{const{source:{checkoutSessionIdentifier:e},checkout:{negotiator:t}}=oe(),{email:r}=t.parts;return n(()=>`guest-${e}-${r.value.replace(/[^a-zA-Z0-9]/g,"")}`)})();return{isDismissedGuestModal:t(()=>{try{return Boolean(sessionStorage.getItem(e.value))}catch{return!1}},[e]),setDismissedGuestModal:t(()=>{try{sessionStorage.setItem(e.value,"true")}catch{}},[e])}}const Mb="EU_REVERSE_CHARGE_EXEMPTION_RULE";function Nb(){const{checkout:{negotiator:e}}=oe(),r=e.current.fields.taxExemptions,a=function(e){const{checkout:{negotiator:t}}=oe(),{taxExemptions:r}=t.parts,a=I(e);return n(()=>r.value.find(e=>e.handle===a.value))}(Mb).value,i=function(e){const{checkout:{negotiator:n}}=oe(),{taxExemptions:r}=n.parts;return t(t=>{const n=r.value.filter(t=>t.handle!==e);r.value=[...n,{handle:e,details:t}]},[e,r])}(Mb),o=sn("taxExemptions").value,s=sn("shippingAddress").value;if("unavailable"===r.value?.status||!r.value?.available||0===r.value?.available.length)return null;const{available:l}=r.value,c=l.find(e=>pr(e.handle));if(!c?.details)return null;const u=a?.details?.taxId??"",{registrationFormats:d,warnings:p}=c.details,m=e=>mr(e,d),h=o?{type:"pending"}:u?m(u)?u===c.details.taxId&&c.details.status?{type:"resolved",validationStatus:c.details.status}:{type:"resolved",validationStatus:null}:{type:"invalid_format"}:{type:"resolved",validationStatus:null};return{applied:c.applied,taxId:{warnings:p,value:u,loading:o||s,set:e=>{i({taxId:e.toUpperCase()})},status:h,reset:()=>i({taxId:""}),validated:{status:c.details.status,taxId:c.details.taxId},format:{valid:!!u&&m(u),validate:m}}}}function Db(){const{userEvents:e}=oe(),t=zb();return({vatId:n})=>{const r=t.build({eventType:"NEGOTIATE",vatId:n});e.monorailEvent(r)}}function zb(){const{client:e,shop:t,source:n,checkout:{negotiator:r}}=oe(),a=e.unstable_getSerialization("requestId"),i=r.current.fields.buyerIdentity.value?.customerProfile,{shippingAddress:o,billingAddress:s,email:l}=r.parts,c=Nb();return{build:({eventType:e,vatId:r})=>{return{schemaId:"taxes_vat_id_checkout_lifecycle_event/1.0",payload:{eventType:e,shopId:Number(ue(t.id)),customerId:Vb(i),checkoutToken:n.checkoutSessionIdentifier,requestId:a,vatId:r,vatIdValidationStatus:Ob({taxId:c?.taxId,eventType:e}),applied:c?.applied,email:l.value,userAgent:(u=navigator,void 0===u?void 0:u.userAgent),...Bb(o.value),...Fb(s.value)}};var u}}}function Ob({taxId:e,eventType:t}){if("NEGOTIATE"!==t&&e){if("invalid_format"===e.status.type)return"INVALID_FORMAT";if("pending"===e.status.type)return"PENDING";if(e.status.validationStatus)return String(e.status.validationStatus)}}function Bb(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 Fb(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 Vb(e){if(!e)return;const t=Number(ue(e.id));return isNaN(t)?void 0:t}function Ub(e,n){const{checkout:r,shop:a,observability:i,url:o,router:s}=oe(),l=function(){const{checkout:{negotiator:e}}=oe(),n=Ab(),{setGuestDismissedModalKey:r}=function(){const{setDismissedGuestModal:e}=Rb(),{shopPay:n}=oe();return{setGuestDismissedModalKey:t(()=>{n.userIdentified.value&&e()},[e,n.userIdentified])}}();return t(async({onComplete:t,setSubmitting:a,...i})=>{r(),a(!0);const o=await e.complete({...i});n.current&&(a(!1),await(t?.(o)))},[n,e,r])}(),{plan:c}=tc().value,u=r.negotiator,d=r.negotiator,p=$_(),m=Ib(!0);return function(){const{userEvents:e}=oe(),t=zb(),n=Nb();ac(async(r,a)=>{if("completion"!==r)return;if(a?.retry)return;if(!n)return;const{value:i}=n.taxId,o=t.build({eventType:"PAY_NOW_CLICKED",vatId:i});e.monorailEvent(o)})}(),t(async(t,h,g,f)=>{const{skipToCompletion:y,...v}=f??{};"processing"!==h?.type&&y&&(i.leaveErrorBreadcrumb("Journey:updateJourney: updating journey HistoryMark onSubmitForCompletion if skipToCompletion is true and detourType is not processing",{skipToCompletion:!0,detourType:h?.type}),e({type:"skipRemainingPages"}));let _=1;const b=async()=>{let f=!1;await d.waitForPendingNegotiations({setProgressing:n});const k=_<1;await u.runBeforeNegotiationListeners("completion",k?{retry:!0}:void 0),await l({...v,setSubmitting:e=>u.setSubmitting(e),setProgressing:n,onValidationSuccess:()=>{v.onValidationSuccess?.(),n(!0)},async onComplete(l){if("stale"===l.status&&"interceptors"===l.phase&&_>0)return _-=1,f=!0,n(!0),void i.log("submit_for_completion_stale_retried","Stale completion retried automatically");"stale"===l.status&&_<1&&i.log("submit_for_completion_stale_retry_exhausted","Completion still stale after automatic retry"),await(g?.(l));const d={source:"completion",result:l};switch(l.status){case"success":r.unstable_overwriteLatestReceipt(l.receipt),await gr(u,l);break;case"alreadyCompleted":r.unstable_overwriteLatestReceipt(l.receipt);break;case"throttled":{const e=vb(d,c.detours);if(e)switch(e.outcome){case"error":throw e.error;case"route":s.navigate(e.route)}break}case"rejected":{if(t||i.leaveErrorBreadcrumb("Journey:updateJourney handled rejected submission with an empty currentPage",{resultStatus:String(l.status)}),e({type:"error",page:t}),_b(d))return window.location.replace(o.login(window.location.href));Sb(l.violations,a.storefrontUrl,m.value,s.currentUrl.value,i);const n=vb(d,c.detours);if(n){switch(s.currentUrl.peek().searchParams.delete(B_),n.outcome){case"error":throw n.error;case"route":s.navigate(n.route)}break}if(await gr(u,l),y)break;const r=bb(l,{greenPath:c.greenPath,currentPage:t});r&&(s.currentUrl.peek().searchParams.delete(B_),s.navigate(r.route));break}case"invalid":n(!1),await gr(u,l);break;case"fetch_failed":case"failed":if("fetch_failed"===l.status)if(il(l.reason)||!l.isActionable)i.log("use_page_complete_network_error_emitted","submit for completion network error",{reason:l.reason}),i.counter({name:"submit_for_completion_network_error",value:1,attributes:{reason:ol(l.reason)}});else{const e=l.reason;i.error(new hr(e,{groupingHash:`Journey::SubmitForCompletion::NetworkError: ${e}`}),{errorClass:"Journey::SubmitForCompletion::NetworkError"})}await gr(u,l),e({type:"error",page:t}),s.currentUrl.peek().searchParams.delete(B_),p("payment-methods",{replace:void 0!==h});break;default:n(!1),t||i.leaveErrorBreadcrumb("Journey:updateJourney got unexpected submission result with an empty currentPage",{resultStatus:String(l.status)}),e({type:"error",page:t})}"success"===l.status&&"processing"===l.receipt.status||n(!1)}}),f&&await b()};await b()},[n,u,d,l,a,e,r,c.detours,c.greenPath,s,o,m,p,i])}const qb=new Map([["billing-address",["billingAddress"]],["contact-information",["contactInfo"]],["payment-methods",["paymentMethods","captcha"]],["shipping-address",["shippingAddress"]],["delivery-method",["deliveryNext"]]]);function jb(e,t){const n=fr(e.features,t),r=new Set(["merchandiseLines"]);for(const a of n){const e=qb.get(a)??[];for(const t of e)r.add(t)}return r}function Hb(){const e=window,t=e?.ShopifyAnalytics?.lib;return t?.trekkie?.defaultAttributes}function $b({children:e,dispatch:n,progressing:s,onProgressionChange:l}){const{observability:c,checkout:{journey:u,latestReceipt:p,negotiator:m},router:h}=oe(),g=u.plan.value,f=u.currentPage.value,y=u.currentDetour.value,{postPurchaseInquiryStatus:v}=m.parts,_=Lb(n,l),b=function(e,n,r){const{router:a,observability:i,checkout:o,shop:s}=oe(),{plan:l}=tc().value,c=o.negotiator,u=Tv(),d=o.configuration.layout.isOnePage,p=t((e,t)=>{const r=function(e,{greenPath:t,currentPageIndex:n}){return t.slice(n+1).find(t=>null==t.skipOverPage||!t.skipOverPage(e.negotiated))}(e,{greenPath:l.greenPath,currentPageIndex:t});if(!r)throw new Bn("Negotiated, but no next page",{groupingHash:"JourneyError::NegotiatedNoNextPage"});n({type:"progress",page:r}),a.navigate(r.route)},[l.greenPath,n,a]);return t(async(t,n)=>{r(!0);const a=l.greenPath.findIndex(e=>On(e,t)),o=c.current.value,m=jb(t,o),h=new Set;for(const e of l.greenPath.slice(0,a+1))for(const t of fr(e.features,o))h.add(t);const g=function(e=[]){const t=[];return e.includes("delivery-method")||t.push("delivery-method"),t.push("payment-terms-changed"),t.push("payment-session"),e.includes("billing-address")||t.push("payment-address"),e.includes("payment-methods")||t.push("captcha"),e?.includes("localization-extension")||t.push("localization-extension"),t}([...h]);let f=g;try{await e({negotiationStage:"progression",silenceViolations:()=>(f=[...g,...pb({customFields:c.current.value.customFields??[],placementReferences:u},fr(t.features,c.current.value))],f),fieldsToResolve:Array.from(m),onComplete(e){switch(i.leaveErrorBreadcrumb("Negotiation completed",{status:e.status,violations:"violations"in e?e.violations.map(e=>e.code):[]}),n?.(e),e.status){case"success":case"error":{const n=function({violations:e,silenceViolations:t,currentPageId:n,isOnePageCheckout:r,shop:a}){const i=e.filter(yr);return i.length>0?i:e.some(e=>mb({violation:e,currentPageId:n,isOnePageCheckout:r}))?vr(e,t,a).filter(_r):[]}({violations:e.violations,currentPageId:t.id,isOnePageCheckout:d.value,silenceViolations:f,shop:s});0===n.length&&p(e,a);break}case"fetch_failed":case"invalid":case"stale":case"denied":case"throttled":case"tooManyRequests":case"alreadyCompleted":break;default:R(e)}}})}finally{r(!1)}},[r,l.greenPath,c,u,d,e,p,i,s])}(_,n,l),k=Ub(n,l),P=function(e,n,r,a){const{checkout:i,client:o,shop:s,source:l,observability:c,url:u,router:d}=oe(),p=i.negotiator,m=i.proposal.negotiated.fields.canUpdateMerchandise.value??!0;return t(async(t,h,g)=>{const f=a.value??"";switch(t.type){case"thankYou":case"postPurchase":return void c.log("use_exit_detour_detected",`Tried to progress out of a ${t.type} detour`,{currentPage:h?.route,currentDetour:t.type});case"throttle":r(!0),await new Promise(e=>{if(z_(i.negotiator.throttleState.peek()))return void e();const t=i.negotiator.listenThrottle(n=>{z_(n)&&(t(),e())})}),await e({force:!0,silenceViolations:"redirectToCart"===t.behavior?["non-stock",...Vn]:["all"],negotiationStage:"progression",onComplete(e){switch(g?.(e),e.status){case"success":if(!h)throw new Bn("Exited throttle, but no next page",{groupingHash:"JourneyError::ExitedThrottleNoNextPage"});n({type:"progress",page:h}),d.navigate(`${h.route}${f}`,{replace:!0});break;case"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:e.status,currentPage:h?.route});break;default:R(e)}}}),r(!1);break;case"stockProblems":if(r(!0),0!==p.parts.merchandiseLines.value.length&&m)await e({force:!0,silenceViolations:["non-stock",...Vn],onComplete(e){switch(e.status){case"success":if(!h)throw new Bn("Exited stock problems, but no next page",{groupingHash:"JourneyError::ExitedStockProblemsNoNextPage"});n({type:"progress",page:h}),d.navigate(h.route,{replace:!0});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:e.status,currentPage:h?.route});break;default:R(e)}}});else{if(!i.configuration.allowRedirectToStorefront){c.log("blocked_redirect_to_storefront","[Journey] Unresolvable stock problems: redirect to storefront was blocked",{hasStorefront:s.hasStorefront,currentPage:h?.route,canUpdateMerchandise:m,merchandiseLinesCount:p.parts.merchandiseLines.value.length});break}c.log("redirect_to_storefront","[Journey] Stock problems exit detour: redirecting to storefront",{redirectSuccess:s.hasStorefront,currentPage:h?.route,canUpdateMerchandise:m,merchandiseLinesCount:p.parts.merchandiseLines.value.length}),Fn({client:o,url:u,source:l,configuration:i.configuration})}r(!1);break;case"processing":r(!0),c.log("use_exit_detour_processing_detected","[Journey] Exiting processing detour"),await new Promise(e=>{if(O_(i.latestReceipt.value))return void e();const t=O(()=>{O_(i.latestReceipt.value)&&(t(),e())})}),r(!1);break;case"shopPayLogin":if(r(!0),!h)throw new Bn("Exited shop pay login, but no next page",{groupingHash:"JourneyError::ExitedShopPayLoginNoNextPage"});n({type:"progress",page:h}),d.navigate(`${h.route}${f}`,{replace:!0}),r(!1);break;case"offsitePaymentFailed":r(!1);break;case"terminalError":throw new Bn(`Can't progress out of a ${t.type} detour`,{groupingHash:"JourneyError::CantProgressOutOfDetour"});default:R(t)}},[c,r,e,n,d,a,p.parts.merchandiseLines,m,o,u,l,s.hasStorefront,i])}(_,n,l,u.searchBeforeDetour),w=function({plan:e,currentDetour:n,dispatch:r,onProgressionChange:o,negotiate:s,negotiated:l,proposedPostPurchaseInquiryStatus:c}){const u=oe(),{checkout:d,embed:p,persistence:m,source:h,observability:g,client:f,mobileCheckoutSdk:y,router:v,shop:_}=u,{configuration:b}=d,k=d.latestReceipt.value,{hasExternalReceiptHandling:P}=b,S="shopPay"===d.identity.current.value,w=function(){const{observability:e,checkout:{journey:n,negotiator:r}}=oe(),a=n.state.value.history,i=n.plan.value.greenPath;return t(t=>F_({feature:t,greenPath:i,history:a,negotiated:r,observability:e}),[i,r,a,e])}(),C=Jg(),E=tr(),x=db(),I=k?.id,A=_.hasFlagEnabled(nr)?k?.status:void 0,T=i(),M=u.checkout.negotiator,N=u.checkout.configuration.layout.isOnePage,D=Xh()&&!rr(v.currentUrl.value.search),z=d.negotiator.throttleState.peek().token,O=tc(),B=Uc(),F=function(){const e=i(!1),{checkout:n,client:r,observability:a}=oe(),o=Pb({mode:"copy-if-missing"});return t((t,{showProgress:i=!1}={})=>{if(e.current)return void a.counter({name:"thank_you_page_already_redirected",value:1});e.current=!0;const s=new URL(t,window.location.href),l=new URLSearchParams(r.initialRequest.url.search);return o(s.searchParams,l),i&&n.checkoutExit.startRedirectProgress(),window.location.replace(s.toString())},[o,n.checkoutExit,r.initialRequest.url.search,a])}();a(()=>{const e=T.current;T.current={id:I,status:A},P||e&&e.id===I&&("failed"!==e.status||"processing"!==A)||x()},[I,A]);const V=t((e,t)=>{setTimeout(()=>{t()},function(e){return 1500*e+450}(e))},[]);return t(t=>{if(!t||C)return;g.leaveErrorBreadcrumb("[Journey] handleReceipt callback triggered with",D_(t));const a=c.value;if("processed"===t.status&&t.waitingForPostPurchaseDone&&"done"!==a)return;const i=(e,t)=>e&&e>0?V(e,t):t();switch(t.status){case"abandoned":o(!1),m&&Hn(m,h),E();break;case"failed":{o(!1),m&&Hn(m,h);const a=new URL(window.location.href);if(a.searchParams.get("completed")&&a.searchParams.get("reload_receipt")){g.log("use_handle_receipt_progression_update","[Journey] Reloading processing page after failed receipt",{receiptId:t.id}),g.counter({name:"refresh_processing_step",value:1}),a.searchParams.delete("reload_receipt"),window.location.replace(a.toString());break}if("inventory"===t.failure.type){if(null==hb(e.detours,"stockProblems"))throw new Bn("Stock problems receipt, but no matching detour",{groupingHash:"JourneyError::StockProblemsReceiptNoMatchingDetour"});const n=M.lastNegotiation.value;!function(e){const{paymentMethodIdentifier:t,...n}=e.directPaymentErrors;L(()=>{e.generalPaymentError.value=void 0,e.generalPaymentErrorCode.value=void 0;for(const e of Object.values(n))"server"===e.value?.origin&&(e.value=void 0)})}(M.parts),s({force:!0,silenceViolations:["payment-session","payment-terms-changed"],onComplete(e){switch(e.status){case"success":case"error":{if(Xn(e.violations))break;const a=M.lastJourneyProgression.value,i=M.lastNegotiation.value;if(d.latestReceipt.value?.id!==t.id||"success"===e.status&&i!==n&&"error"===i.type||("failed"===a.type||"error"===a.type)&&"completion"===a.negotiationStage)break;g.leaveErrorBreadcrumb("[Journey] Performed successful negotiation with a failed receipt"),g.log("use_handle_receipt_progression_update","[Journey] Performed successful negotiation with a failed receipt");const o=w("payment-methods");M.context.inventoryRecoverySignal.value={receiptId:t.id},r({type:"error",page:o}),v.navigate({pathname:o.route,search:v.currentUrl.value.search});break}case"fetch_failed":case"invalid":case"stale":case"denied":case"throttled":case"tooManyRequests":case"alreadyCompleted":break;default:R(e)}}});break}if("payment"===t.failure.type&&(ir.has(t.failure.code)?s({silenceViolations:qe(["captcha"]),skipStateUpdates:!0}):("CUSTOM_REDEEMABLE_NO_LONGER_AVAILABLE"===t.failure.code&&s({force:!0,fieldsToResolve:["shopPromotion"]}),E())),"offsitePaymentFailed"===n?.type){v.navigate(n.route,{replace:!0});break}const i=function({departurePageId:e,greenPath:t,history:n,negotiated:r,observability:a,receipt:i}){const o=V_(t,r,"payment-methods");if(function(e){return"payment"===e?.failure.type&&!0===e.failure.hasOffsitePaymentMethod}(i)&&o)return o;const s=function(e,t){return t?e.find(({id:e})=>e===t):void 0}(t,e);if(s)return"review"===s.id?(o||a.leaveErrorBreadcrumb("[Journey] computePageToRedirect: no last page with payment methods found, falling back to first page "),o??U_(t)):s;const l=n.find(e=>!e.complete&&!e.skipped),c=t.findIndex(e=>l?.id===e.id),u=t[c];if(!o){const e=u??U_(t);return a.leaveErrorBreadcrumb("[Journey] computePageToRedirect: no page with payment methods found, falling back to first incomplete page",{fallbackPageId:e?.id}),e}const d=t.findIndex(e=>e.id===o.id);return u&&d>c?(a.leaveErrorBreadcrumb("[Journey] computePageToRedirect: payment methods page is not available from current history, falling back to first incomplete page",{paymentMethodsPageId:o.id,fallbackPageId:u.id}),u):o}({departurePageId:v.currentUrl.value.searchParams.get(B_),greenPath:e.greenPath,history:O.value.history,observability:g,negotiated:l,receipt:t});r({type:"error",page:i}),v.navigate(i.route,{replace:!0});break}case"processed":{g.log("use_handle_receipt_progression_update","[Journey] Received processed receipt with redirectUrl",{redirectUrl:t.redirectUrl,receiptId:t.id});const s=e.detours.find(e=>"postPurchase"===e.type),l=Boolean(s)&&Boolean(t.postPurchasePageRequested)&&"ready"===t.postPurchaseVaultingStatus&&"success"===a,c=!p?.isFlagshipPartner&&l;if(p?.isFlagshipPartner&&l&&"thankYou"!==n?.type&&g.log("use_handle_receipt_progression_update","[Journey] Skipped post-purchase flow for flagship partner",{receiptId:t.id}),c&&"thankYou"!==n?.type){if(g.leaveErrorBreadcrumb("[Journey] Navigated to post purchase page",{receipt:JSON.stringify({id:t.id,postPurchasePageUrl:t.postPurchasePageUrl,postPurchasePageRequested:t.postPurchasePageRequested,postPurchaseVaultingStatus:t.postPurchaseVaultingStatus}),shopAppDomain:S}),S&&t.postPurchasePageUrl)window.location.replace(t.postPurchasePageUrl);else{const e=s;v.currentUrl.value.searchParams.delete("post_purchase");const n=`${e.route}${v.currentUrl.value.search}`;M.applyProcessedReceipt(t),v.navigate(n,{replace:!0})}break}if(p?.client?.complete(),!b.isUniversalCheckoutFinalizer&&ar(p?.embedder))break;if(!b.isUniversalCheckoutFinalizer&&t.redirectUrl){const e=t.redirectUrl;t.skipToThankYouPage?(g.leaveErrorBreadcrumb("[Journey] Forwarded duplicate checkout session to Thank you page",{skipToThankYouPage:!0,receipt:JSON.stringify({id:t.id,redirectUrl:e,postPurchasePageRequested:t.postPurchasePageRequested,postPurchasePageUrl:t.postPurchasePageUrl})}),r({type:"skipRemainingPages"})):r({type:"complete"}),g.counter({name:"thank_you_page_redirected",value:1,attributes:{shopPay:S,checkoutDesign:N.value?"ONE_STEP":"THREE_STEP",typType:"classic",visibility_state:document.visibilityState}}),g.log("use_handle_receipt_progression_update","[Journey] Redirecting to thank you page with redirectUrl",{redirectUrl:e});const a=new URL(e);return z&&a.searchParams.set(q_,z),i(t?.completedRemoteCheckouts?.length,()=>function(e){const t=new URL(e),r=new URL(u.url.shopPayRememberMe()),a=t.origin===r.origin&&t.pathname===r.pathname,i=(S||a)&&!b.isUniversalCheckoutFinalizer&&D&&!n&&!B;!D||n||B||ul(()=>{d.checkoutExit.exit()},["checkout-exit"],{replace:!0,interrupt:!0}),F(e,{showProgress:i})}(a.toString()))}const m=e.detours.find(e=>"thankYou"===e.type);if(!m?.route)throw new Bn("On thank-you, but no matching detour!",{groupingHash:"JourneyError::OnThankYouNoMatchingDetour"});{const e="prevent_order_redirect",a=new URLSearchParams(v.currentUrl.value.search);let s=a.has(e)&&"false"!==a.get(e)?`${m.route}?${e}=true`:m.route;y.variant.recovery&&(s=function(e,t){const n=new URL(e,window.location.href);return n.searchParams.set("order_id",t),n.toString()}(s,t.id));const l=()=>{if(g.log("use_handle_receipt_progression_update","[Journey] thankYouDetour route identified",{thankYouDetourRoute:m.route}),t.skipToThankYouPage){g.leaveErrorBreadcrumb("[Journey] Forwarded duplicate checkout session to Thank you page",{skipToThankYouPage:!0,receipt:JSON.stringify({id:t.id,redirectUrl:t.redirectUrl,postPurchasePageRequested:t.postPurchasePageRequested,postPurchasePageUrl:t.postPurchasePageUrl})}),r({type:"skipRemainingPages"});const e=f.cookies.get(or);e&&h.sourceId===e.split("%3F")[0]&&f.cookies.delete(or)}else f.cookies.delete(or),r({type:"complete"});M.applyProcessedReceipt(t)},c=e=>{g.log("use_handle_receipt_progression_update","[Journey] Redirecting to thank you page with thankYouDetourUrl",{thankYouDetourUrl:s}),i(t?.completedRemoteCheckouts?.length,()=>function(e,t){const r=()=>{v.navigate(e,{replace:!0,state:{...v.currentUrl.value.state,redirectingToThankYou:!0}})};D&&!n?(t?.(),ul(r,["checkout-exit"],{replace:!0,interrupt:!0})):ul(()=>{t?.(),r()}),g.counter({name:"thank_you_page_redirected",value:1,attributes:{shopPay:S,checkoutDesign:N.value?"ONE_STEP":"THREE_STEP",typType:"c1",visibility_state:document.visibilityState}}),o(!1)}(s,e))},d=b.deferredProfileChangeId;if(d||b.profileKey.peek()?.requireBusinessCriticalOnly){b.update({deferredProfileChangeId:void 0});const e=d??b.profileId.peek();rl(l,{trigger:"completion",profileRequest:e?{id:e,requireBusinessCriticalOnly:!1}:void 0,graphql:u.graphql.coreGraphql,extensibility:u.checkout.extensibility,configuration:b,observability:g,userEvents:u.userEvents,telemetryContext:{source:h,shop:u.shop,sessionToken:f.unstable_getSerialization("sessionToken"),current:M.current}}).then(c).catch(()=>{})}else l(),c()}break}case"polling_for_order":case"action_required":case"processing":{if("processing"===n?.type)break;if("polling_for_order"===t.status&&"thankYou"===n?.type){g.leaveErrorBreadcrumb("[Journey] Skipped navigating to processing page since already on the thank-you page",{receipt:JSON.stringify(t),routerCurrentUrl:v.currentUrl.value.toString()});break}const r=e.detours.find(e=>"processing"===e.type);r?.route&&o(!0);break}case"processing_remote_checkouts":{if("processing"===n?.type)break;const t=e.detours.find(e=>"processing"===e.type);if(!t?.route)break;ul(()=>{const e=v.currentUrl.value.search;v.navigate(e?{pathname:t.route,search:e}:t.route,{replace:!0})});break}default:R(t)}},[f,p?.client,p?.embedder,p?.isFlagshipPartner,y,E,n,d,r,C,N,D,S,O,w,u,b,s,l,M,o,m,e.detours,e.greenPath,B,c,z,F,v,h,g,V])}({plan:g,currentDetour:y,dispatch:n,onProgressionChange:l,negotiate:_,negotiated:m,proposedPostPurchaseInquiryStatus:v});a(()=>{const e=e=>{if("queued"!==e.status)return;const t=hb(g.detours,"throttle");if(t?.route)h.navigate(t.route);else if(f)throw new Bn(`Throttled, but no matching detour from ${f&&JSON.stringify(f,["id","label","route"])}`,{groupingHash:"JourneyError::ThrottledNoMatchingDetourFromPage"})};return e(m.throttleState.peek()),m.listenThrottle(e)},[m,h,f,g.detours,n]),S(()=>{const e=p.value;c.leaveErrorBreadcrumb("[JourneyProgressionInternal] Signal effect for latestReceipt",D_(e)),o(()=>w(e))});const C=i(v.peek());S(()=>{const e="thankYou"===y?.type||"postPurchase"===y?.type,t=v.value,n=C.current;if(e&&t!==n){C.current=t;const e=p.value;c.leaveErrorBreadcrumb("[JourneyProgressionInternal] Signal effect for proposedPostPurchaseInquiryStatus",{...D_(e),previousStatus:n}),o(()=>w(e))}});const{progress:E,completing:x}=function({exitDetour:e,pageComplete:n,pageNegotiate:a}){const{client:i,observability:o,router:s,checkout:{journey:l}}=oe(),c=i.unstable_legacyNavigationPerformance,{handleOffsitePopupOpen:u,handleClosingPopup:d}=function(){const e=db(),t=pf(),n=Gm(),{client:a,i18n:i,observability:o,userEvents:s,checkout:{offsitePopupController:l,negotiator:c},shop:{id:u}}=oe(),{paymentLines:d}=c.parts;return r(()=>({handleOffsitePopupOpen:()=>{const r=d.value.at(0);let p=!1;if("customOnsite"===r?.method.type)p=Y_(r);else if(r&&"walletContent"in r.method&&"SHOP_PAY"===r.method.name){const e=r.method.walletContent?.paymentMethodIdentifier,t=(c.current?.fields?.paymentMethods?.value||[]).find(t=>W_(t)&&t.paymentMethodIdentifier===e);p=Boolean(t)}if(t.value){if(p){o.counter({name:"offsite_payment_popup_flow_initiated",value:1,attributes:{payment_method_name:"Crypto: USDC",is_shop_pay_wrapped:Boolean(r&&"walletContent"in r.method&&"SHOP_PAY"===r.method.name),is_mobile:Nt(a)}});const e=me(u);if(e){const t=parseInt(e,10);if(!isNaN(t)){const e=function(e){const t=Hb();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}(t);e&&s&&s.monorailEvent(e)}}}const t={width:600,height:455};l.open({onComplete:()=>e(),onCancel:()=>window.location.reload(),theme:n,popupDimensions:t,isCryptoPayment:p,title:i.translate("general.processing")})}},handleClosingPopup:()=>{t.value&&l.isOpen.value&&l.close({})}}),[t.value,d,o,s,c,l,n,i,e,u,a])}(),p=se(e),m=se(n),h=se(a),g=se(u),f=se(d),y=se(s);return{progress:t(async(e,t,n)=>{const r=async e=>{try{await(t?.(e))}finally{"success"!==e.status&&f.current()}},a={...n,onProgressBlocked:()=>{try{n?.onProgressBlocked?.()}finally{f.current()}},onValidationSuccess:()=>{try{n?.onValidationSuccess?.()}finally{g.current()}}},i=l.plan.value,s=l.currentPage.value,u=l.currentDetour.value,d=p.current;if(o.leaveErrorBreadcrumb("[Journey] Progress initiated",{id:e,skipToCompletion:a?.skipToCompletion,greenPath:i.greenPath.map(e=>e.route),detours:i.detours.map(e=>e.route),currentPageRoute:s?.route,currentDetourRoute:u?.route}),!a?.skipToCompletion&&u&&s){const e=i.detours.find(e=>"thankYou"===e.type),t="processing"===u.type?e:s;return c?.start({target:t?.route}),o.leaveErrorBreadcrumb(`[Journey] Exiting "${u.route}" detour, moving to "${t?.route}"`,{currentDetourRoute:u.route,exitDetourTargetRoute:t?.route,targetPageRoute:s.route}),d(u,s,r)}if(null==s)return o.debug("journey_progression_blocked","[Journey] Blocked progression because the current page is missing"),void a?.onProgressBlocked?.();const v=On(s,i.greenPath[i.greenPath.length-1])||a?.skipToCompletion,_=i.greenPath.findIndex(({id:e})=>e===s.id),b=i.detours.find(e=>"processing"===e.type),k=v?b:i.greenPath[_+1];c?.start({target:k?.route});const P=y.current.currentUrl.peek(),S=i.greenPath.find(e=>e.route===P.normalizedPath)??s;if(v?P.searchParams.set(B_,S.id):P.searchParams.delete(B_),o.leaveErrorBreadcrumb("[Journey] Progressing",{skipToCompletion:a?.skipToCompletion,greenPath:i.greenPath.map(e=>e.route),isLastPage:v,currentPageRoute:s.route,currentDetourRoute:u?.route,nextPageRoute:k?.route}),!v)return h.current(s,r);const w=l.startCompletion();try{await m.current(s,u,r,a)}finally{w()}},[p,m,h,l,c,o,f,g,y]),completing:l.completing}}({exitDetour:P,pageComplete:k,pageNegotiate:b}),I=function({negotiate:e}){return t(()=>{e({prefetch:!0,negotiationStage:"progression",silenceViolations:["all"]})},[e])}({negotiate:_});a(()=>m.pendingFieldsNegotiation.subscribe(e=>{if("success"!==e?.status&&"error"!==e?.status)return;if(u.currentDetour.peek())return;const t=m.current.fields.allViolations.peek()??[];br(t)&&(N_({observability:c}),u.detour("stockProblems",{routerOptions:{replace:!0}}))}),[m,u,c,g.detours,g.greenPath]);const A=r(()=>({detour:u.detour,progress:E,negotiate:_,progressing:s,completing:x,prefetch:I}),[u.detour,E,s,x,_,I]);return d(ec.Provider,{value:A,children:e})}function Yb({plan:e,preservedSearch:t,children:n}){const{observability:o,router:s,checkout:{identity:l,journey:c,negotiator:u},source:p}=oe(),m=s.currentUrl.value,h=function(e,t){const{router:n,checkout:{configuration:r,isShippingRequired:a,negotiator:i,proposal:o},source:s}=oe(),l=Boolean(o.facts.requiresShipping),c=Mn(s)?l:a.value,u=E_();return{plan:e,url:n.currentUrl.value,deliveryFact:o.facts.delivery??[],shippingRequired:c,isOnePageLayout:r.layout.isOnePage.value,postPurchaseInquiryStatus:i.parts.postPurchaseInquiryStatus.value,purchasingCompanyHasNegotiatedLocalPickupSelected:u,preservedSearch:t,router:n}}(e,t);r(()=>c.start(h),[c]),c.update(h),function({observability:e,negotiated:t,plan:n,identity:r,isOnePageLayout:o,initialPath:s,sessionType:l}){a(()=>{const a=t.current.value,i=t.parts.email.value,c=t.current.fields.allViolations.value??[];e.log("journey_init_contact_state","Initial contact-info state captured at journey initialization",{layout:o?"onePage":"threePage",planPages:n.greenPath.map(e=>e.id).join(","),initialPath:s,sessionType:l,identity:r,customerProfileType:a?.buyerIdentity?.customerProfile?.__typename,hasNegotiatedContactEmail:Boolean(a?.contactInfo?.email),hasNegotiatedCustomerProfileEmail:Boolean(a?.buyerIdentity?.customerProfile?.email),hasProposedEmail:Boolean(i),hasMissingContactViolation:c.some(e=>"BUYER_IDENTITY_MISSING_CONTACT_METHOD"===e.code)})},[]);const c=i(!0);S(()=>{const n=t.current.fields.allViolations.value??[];c.current?c.current=!1:n.some(e=>"BUYER_IDENTITY_MISSING_CONTACT_METHOD"===e.code)&&e.log("negotiated_missing_contact_violation_observed","Subsequent negotiation surfaced a missing-contact violation",{hasNegotiatedContactEmail:Boolean(t.current.fields.contactInfo.peek()?.email),hadProposedEmailFallback:Boolean(t.parts.email.peek()),customerProfileType:t.current.peek().buyerIdentity?.customerProfile?.__typename,identity:r,sessionType:l,layout:o?"onePage":"threePage"})})}({observability:o,negotiated:u,plan:e,identity:l.current.value,isOnePageLayout:h.isOnePageLayout,initialPath:h.url.normalizedPath,sessionType:p.type}),a(()=>c.watchNavigation(),[c]);const{state:g,dispatch:f}=c,{redirectTo:y}=g.value,v=r(()=>({journeyState:g,currentFocus:c.currentFocus,completed:c.completed,pageBeforeDetour:c.pageBeforeDetour}),[g,c]);if(null!=y){const e=m.search?{pathname:y.route,search:m.search}:y.route;return s.redirect(e),null}return d(Zl.Provider,{value:v,children:[d(M_,{}),d($b,{dispatch:f,progressing:c.progressing,onProgressionChange:c.setProgressing,children:n})]})}function Wb(){const{shop:e}=oe();return Boolean(e.confirmationPageEnabled)}const Gb=["delivery-method"],Kb=new Set(kr),Jb=new Set(Pr),Qb=new Set(Sr);function Xb({i18n:e,sourceType:t,addressSettings:n,billingAddressSettings:r,hasBlockingUiExtensionForFeatures:a,getSellableDeliveryMethods:i,initialNegotiationData:o,isDraftOrderCheckout:s,isPrePopulatedSourceType:l,isShippingRequired:c,proposedPaymentLines:u,reviewEnabled:d,shippingAddress:p,shippingCountryDetails:m,buyerDestinationCountryDetails:h,mustSelectProvidedShippingRate:g,shop:f,checkout:y,paymentMethods:v,observability:_,recordFastForward:b}){return{greenPath:[{id:"information",label:e.translate("contact.title"),route:"/information",features:({deliveryNext:e})=>Array.from(function*(){yield"contact-information";const t=Ar(e),n=wr(e);(t||n)&&(yield"delivery-method"),en(e)||n||(c?yield"shipping-address":yield"billing-address")}()),fastForwardThroughPage:(e,t,i={})=>{if(a(t,{excludedExtensionTargets:Zb(e.deliveryNext)}))return!1;if(Er(e.paymentLines))return!(!function(e,t){const n=Tt(e?.lines,"PAYPAL_EXPRESS");if(!n)return!1;if("filled"!==t?.status)return!1;const r=n.method.walletContent;return Boolean((r?.email??void 0)&&(r?.token??void 0))}(e.paymentLines,e.deliveryNext)||!xr(e.contactInfo,e.allViolations))&&b("information","paypal_express_and_contact_satisfied");if(Ir(e.paymentLines))return!1;const o=t.find(t=>!((e,t,{trustBuyerDestination:a=!1})=>{switch(t){case"contact-information":return xr(e.contactInfo,e.allViolations);case"shipping-address":return function({shippingAddress:e,addressSettings:t,countryDetails:n,violations:r=[],isDraftOrder:a,state:i}){return!!e&&!(t.isRequired("phone",{countryCode:e?.countryCode})&&a&&(!i.contactInfo?.email||!i.shippingAddress?.phone))&&!!Tr({address:e,addressSettings:t,countryDetails:n})&&r.every(e=>"shipping-address"!==Un(e))}({...a&&e.pendingDelivery?{shippingAddress:e.pendingDelivery.buyerDestination,countryDetails:h}:{shippingAddress:p,countryDetails:m},addressSettings:n,violations:e.allViolations,state:e,isDraftOrder:s});case"billing-address":return function(e,t,n=[]){return!!Tr({address:t,addressSettings:e})&&n.every(e=>"billing-address"!==Un(e))}(r,e.billingAddress,e.allViolations);case"delivery-method":return function(e,t=[]){return"filled"===e?.status&&!!e.lines.some(e=>"methods"in e&&e.methods.some(e=>"PICK_UP"===e.methodType||"PICKUP_POINT"===e.methodType))&&t.every(e=>"delivery-method"!==Un(e))}(e.deliveryNext,e.allViolations);case"payment-methods":case"localization-extension":return!1;default:return R(t)}})(e,t,i));return _.log("journey_page_fast_forward_features_checked","Features evaluated for fast-forward",{pageId:"information",blockingFeature:o??null,isPrePopulatedSourceType:l,allViolations:e.allViolations?.map(e=>e.code)||[]}),l&&void 0===o}},{id:"shipping",label:e.translate("shipping.title"),route:"/shipping",features:Gb,fastForwardThroughPage:e=>{return!a(Gb)&&("cartNext"===t?function(e){const t=function(e){return"filled"!==e?.status?[]:je(e).filter(e=>"available"===e.status)}(e);return 0!==t.length&&t.every(e=>function(e){return 1===e.methods.length}(e)||function(e){if(e.methods.length<=1)return!1;const t=Et(e);return!!t&&e.methods[0]?.handle!==t.handle}(e))}(e.deliveryNext)?b("shipping","cart_next_shipping_selection_determined"):(n=e.paymentLines,!!n?.lines.some(e=>"direct"===e.method.type&&Boolean(e.method.sessionId))&&b("shipping","cart_next_has_direct_payment_session")):!!function({latestNegotiation:e,initialNegotiation:t,isPrePopulatedSourceType:n}){if(!n)return!1;if("filled"!==e?.deliveryNext?.status)return!1;const r=t?.session?.negotiate.result;if("NegotiationResultAvailable"!==r?.__typename||"FilledDeliveryTerms"!==r.buyerProposal.delivery.__typename)return!1;const a=r.buyerProposal.delivery.deliveryLines.map(e=>"DeliveryStrategyReference"===e.selectedDeliveryStrategy?.__typename?e.selectedDeliveryStrategy.handle:void 0).find(e=>void 0!==e);if(void 0===a)return!1;const i=je(e?.deliveryNext).find(e=>"available"===e.status);return void 0!==i&&!(a!==Et(i)?.handle)}({latestNegotiation:e,initialNegotiation:o,isPrePopulatedSourceType:l})&&b("shipping","initial_delivery_selection_preserved"));var n},skipOverPage:({deliveryNext:e,isShippingRequired:t})=>!t||en(e)||wr(e)||g||Cr(i().enabledDeliveryMethods)},{id:"payment",label:e.translate("payment.title"),route:"/payment",features:()=>P_(d,u.peek(),{shop:f,checkout:y,paymentMethods:v})?["payment-methods","localization-extension"]:["payment-methods","billing-address","localization-extension"]},...d?[{id:"review",label:e.translate("review.title"),route:"/review",features:["billing-address"]}]:[]],detours:[{type:"throttle",label:e.translate("throttle.title"),route:"/throttle"},{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 Zb(e){const t=new Set,n=ek(e,"PICK_UP"),r=ek(e,"PICKUP_POINT");return n||tk(t,Kb),r||tk(t,Jb),(n||r)&&tk(t,Qb),t.size>0?t:void 0}function ek(e,t){return je(e).some(e=>"available"===e.status&&Et(e)?.methodType===t)}function tk(e,t){t.forEach(t=>e.add(t))}const nk=["checkout","cartNext","draftOrder"];function rk({children:e}){const{i18n:a,observability:i,router:o,shop:s,source:l,checkout:c}=oe(),u="shopPay"===c.identity.current.value,p=c.configuration.layout.isOnePage.value,{parts:m}=c.negotiator,h=c.negotiator.current.fields.paymentMethods?.value,g=m.paymentLines,f=Wb(),y=function(){const{i18n:e,shop:r,source:a,checkout:i,observability:o}=oe(),{buyerIdentity:s}=i.negotiator.current.fields,l=x_(),c=Vc(),u=S_(),d=w_(),p=I_(),m=t((e,t)=>(o.log("journey_page_fast_forwarded","Fast-forwarded through page",{pageId:e,reason:t}),!0),[o]),h=t(e=>{const t=s.value?.purchasingCompany;return!(!t?.location.shippingAddress||!e)&&Boolean(c.value&&u.value&&zn(t.location.shippingAddress,e))},[s,c,u]);return n(()=>{const t=s.value?.purchasingCompany;if(!t)return;const n=!Mn(a)&&i.isShippingRequired.value&&!l.value,o=p.value,u=()=>({id:"review",label:e.translate("review.title"),route:"/review",features:[]});return i.configuration.layout.isOnePage.value?[{id:"onePage",label:e.translate("general.page_title"),route:"/",features:[...o?A_:[],...n?T_:[],...L_]},...r.confirmationPageEnabled?[u()]:[]]:[...o?[{id:"information",label:e.translate("contact.title"),route:"/information",features:A_,fastForwardThroughPage:({shippingAddress:e})=>!(!h(e)||d.value)&&m("information","business_customer_pre_negotiated_address")}]:[],...n?[{id:"shipping",label:e.translate("shipping.title"),route:"/shipping",features:T_,fastForwardThroughPage:({shippingAddress:e,deliveryNext:t})=>c.value?!!h(e)&&m("shipping","business_customer_pre_negotiated_address"):"unavailable"!==t?.status&&m("shipping","business_customer_no_editable_address_with_delivery"),skipOverPage:({deliveryNext:e})=>en(e)}]:[],{id:"payment",label:e.translate("payment.title"),route:"/payment",features:L_},u()]}).value}(),v=o.currentUrl.value?.search,_=function(){const{i18n:e,shop:n,source:{type:a},checkout:i,observability:o}=oe(),{extensibility:s}=i,l=Ve(),c=Tv(),u=nk.includes(a),d=i.negotiator.unstable_initialNegotiation.value,p=function(){const{checkout:{negotiator:e}}=oe(),t=e.unstable_initialNegotiation.value;if("NegotiationResultAvailable"!==t?.session?.negotiate.result.__typename)return;const{sellerProposal:n}=t.session.negotiate.result;return Lr({delivery:n.delivery,remoteDelivery:Rr(n.remote).remoteDelivery})}(),{details:m}=Rt(p?.countryCode),h=i.negotiator.current.fields.pendingDelivery.value?.buyerDestination,{details:g}=Rt(h?.countryCode),f="draftOrder"===a,y=i.proposal.negotiated.fields.mustSelectProvidedShippingRate.value??!1,v=Wb(),{parts:_}=i.negotiator,b=i.negotiator.current.fields.paymentMethods.value,k=_.paymentLines,P=i.configuration.addressSettings.nonBillingAddressSettings.value,S=Mr(i),w=i.negotiator.current.fields.isShippingRequired.value,C=t((e,{excludedExtensionTargets:t}={})=>s.ui.hasBlockingExtensionForFeatures({features:e,placementReferences:c,excludedExtensionTargets:t}),[c,s.ui]),E=t((e,t)=>(o.log("journey_page_fast_forwarded","Fast-forwarded through page",{pageId:e,reason:t}),!0),[o]);return r(()=>Xb({i18n:e,sourceType:a,addressSettings:P,billingAddressSettings:S,hasBlockingUiExtensionForFeatures:C,getSellableDeliveryMethods:()=>l.value,initialNegotiationData:d,isDraftOrderCheckout:f,isPrePopulatedSourceType:u,isShippingRequired:w,proposedPaymentLines:k,reviewEnabled:v,shippingAddress:p,shippingCountryDetails:m,buyerDestinationCountryDetails:g,mustSelectProvidedShippingRate:y,shop:n,checkout:i,paymentMethods:b,observability:o,recordFastForward:E}),[P,S,C,l.value,d,f,u,w,k,v,p,m,g,y,a,e,n,i,b,o,E])}(),b=function({businessCustomerJourneyPath:e,isShopPay:t,source:n,isOnePageCheckout:r}){return e?"businessCustomer":t?"shopPay":Mn(n)?"orderEdit":r?"onePage":"threePage"}({businessCustomerJourneyPath:y,isShopPay:u,source:l,isOnePageCheckout:p}),k=r(()=>{switch(b){case"businessCustomer":return i.leaveErrorBreadcrumb("Using business customer journey plan"),function({i18n:e,greenPath:t}){return{greenPath:t,detours:[...b_(e),v_(e)]}}({i18n:a,greenPath:y});case"shopPay":return i.leaveErrorBreadcrumb("Using shop pay journey plan"),function({i18n:e,shopName:t}){return{greenPath:[{id:"shopPay",label:e.translate("general.page_title"),route:"/shoppay",features:({isShippingRequired:e})=>[e?"shipping-address":"billing-address","contact-information","delivery-method","payment-methods"]}],detours:[__(e),p_(e,"redirectToCart"),m_(e),h_(e),g_(e),f_(e,t),y_(e),v_(e)]}}({i18n:a,shopName:s.name});case"orderEdit":return i.leaveErrorBreadcrumb("Using order edit checkout journey plan"),function({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?[k_(e)]:[]],detours:[...b_(e,{afterStock:[]}),v_(e)]}}({i18n:a,isOnePageCheckout:p,reviewEnabled:f});case"onePage":return function({i18n:e,reviewEnabled:t,paymentMethods:n,proposedPaymentLines:r,shop:a,checkout:i}){return{greenPath:[{id:"onePage",label:e.translate("general.page_title"),route:"/",features:({isShippingRequired:e})=>{const o=["contact-information","delivery-method","payment-methods","localization-extension"];return e?o.push("shipping-address"):P_(t,r.peek(),{shop:a,checkout:i,paymentMethods:n})||o.push("billing-address"),o}},...t?[k_(e)]:[]],detours:[...b_(e),v_(e)]}}({i18n:a,reviewEnabled:f,paymentMethods:h,proposedPaymentLines:g,shop:s,checkout:c});case"threePage":return _}},[y,c,a,p,b,i,h,g,f,s,_]);return d(Yb,{plan:k,preservedSearch:"shopPay"===b?v:void 0,children:e})}function ak(){return ie(Zv)}function ik(){const{data:e}=ak(),{currentPage:t}=tc().value,{checkout:{negotiator:n}}=oe(),{deliveryMethodsAddressErrors:r}=n.context,[i,o]=s(!0),{setAddressError:l}=Qf(r),c=iy(n.parts.shippingAddress.fields.countryCode.value);return a(()=>{if(!e)return;if(!i||"/information"!==t?.route&&"/"!==t?.route)return void(t&&o(!1));const{current:r}=n,{allViolations:a,paymentLines:s}=r.value;if(Boolean(Nr(s?.lines))&&a?.length){const e=["billing"].flatMap(e=>Array.from(c(e,a)));for(const[t,n]of e)l(t,n)}o(!1)},[void 0!==t,e,n]),null}function ok({scrollbarGutter:e,children:t}){const n=Gm(),r=n.customProperties.value,a=n.darkModeCustomProperties.value,i=r?.color?.schemes?.scheme1?.base?.background,o=a?.color?.schemes?.scheme1?.base?.background,s=[i&&`html, body { background-color: ${i}; }`,o&&`@media (prefers-color-scheme: dark) { html, body { background-color: ${o}; } }`,e&&`html { scrollbar-gutter: ${e}; }`].filter(Boolean).join("\n");return d(y,{children:[d("style",{children:s}),d("div",{className:"g9gqqf1 g9gqqf0 _1fragemzj _1fragemyu _1fragemy5 _1fragem133",children:t})]})}var sk="y3r6mh0";const lk=(ck=e=>Ce({colorScheme:e}),Pe.reduce((e,t)=>({...e,[t]:ck(t)}),{}));var ck;const{surfaceBorder:uk,surfaceControlBorder:dk,...pk}=_e.color.default,mk=A(function({children:e,scoped:t}){const n=Gm(),a=c(),i=n.customProperties.value,o=n.darkModeCustomProperties.value,s=r(()=>{const e=`#CustomProperties-${function(e){if("undefined"!=typeof CSS)return CSS.escape(e);const t=String(e),n=t.length;let r=-1,a="";const i=t.charCodeAt(0);if(1===n&&45===i)return`\\${t}`;for(;++r=1&&e<=31||127===e||0===r&&e>=48&&e<=57||1===r&&e>=48&&e<=57&&45===i?`\\${e.toString(16)} `:e>=128||45===e||95===e||e>=48&&e<=57||e>=65&&e<=90||e>=97&&e<=122?t.charAt(r):`\\${t.charAt(r)}`:"�"}return a}(a)}`,n=i?yk(i):null,r=o?yk(o):null,s=fk(hk(i?.color)),l=fk(hk(o?.color)),c=n&&Object.keys(n).length>0,u=r&&Object.keys(r).length>0;if(!(c||u||s||l))return"";const d=`${c?`${e} {${k(n)}}`:""}${s}`,p=`${u?`${e} {${k(r)}}`:""}${l}`,m=`\n ${d}\n ${p?`@media (prefers-color-scheme: dark) { ${p} }`:""}\n `;return t?`@scope { ${m} }`:m},[i,o,a,t]);return d("div",{id:`CustomProperties-${a}`,children:[d("style",{children:s}),e]})});function hk(e){if(e&&"object"==typeof e&&"schemes"in e)return e.schemes}function gk(e,t){return Object.entries(e).reduce((e,[n,r])=>{const a=t[n];if(null==a)return e;const i="object"==typeof r&&null!=r&&!Array.isArray(r),o="object"==typeof a&&null!=a&&!Array.isArray(a);return i&&o?{...e,...gk(r,a)}:i?e:null!=r?{...e,[a]:r}:e},{})}function fk(e){if(!e||"object"!=typeof e)return"";let t="";for(const n of Pe){const r=e[n];if(!r||"object"!=typeof r)continue;const{surfaceBorderContinuation:a,...i}=r,o=gk(i,pk),s=lk[n].trim().split(/\s+/).join(".");Object.keys(o).length>0&&(t+=`.${s} {${k(o)}}`),"string"==typeof a&&(t+=`.${s}.${sk}.${sk} {${k({[_e.color.default.surfaceBorder]:a,[_e.color.default.surfaceControlBorder]:a})}}`)}return t}function yk(e){return gk(function(e){const t=e.color;if(!t||"object"!=typeof t||Array.isArray(t))return e;const{schemes:n,...r}=t;return{...e,color:r}}(e),_e)}function vk({children:e}){const{typographyPrimary:t,typographySecondary:n}=Km();return a(()=>{const e=[t,n].map(e=>[{fonts:e.fonts,source:e.sourceBase,weight:e.weightBase},{fonts:e.fonts,source:e.sourceBold,weight:e.weightBold}]).reduce((e,t)=>e.concat(t),[]).filter(e=>void 0!==e.fonts&&void 0!==e.source).map(({fonts:e,source:t,weight:n})=>new FontFace(e,t,{weight:n}));!async function(){await Promise.all(e).then(e=>{e.forEach(e=>{document.fonts.add(e)})})}()},[t,n]),d(y,{children:e})}function _k({children:e,condition:t}){return d(t?vk:y,{children:e})}function bk({children:e,theme:t,shouldLoadFonts:n,scoped:r}){const{customProperties:a}=h(yu);return d(Re.Provider,{value:t,children:d(Dr,{children:d(_k,{condition:Boolean(n),children:a?d(mk,{scoped:r,children:e}):e})})})}function kk({children:e}){const{checkout:t,source:n,router:r}=oe(),a=r.currentUrl.value,i="simulated"===n.type,o=rr(a.search),s=t.configuration.branding.shell,l=t.configuration.branding.theme,c=Mt()||i||o;return d(bk,{theme:l,shouldLoadFonts:c,children:d(Uy,{shell:s,children:d(Pk,{children:e})})})}function Pk({children:e}){const{canvas:t}=jy();return d(ok,{scrollbarGutter:t?.scrollbarGutter,children:e})}function Sk(){const{embed:e}=oe(),t=h(Nu)?.isModalOpen,r=n(()=>Boolean(t?.value||e?.presentation?.active.value));return a(()=>{let t=!1;return r.subscribe(n=>{n!==t&&(t=n,e?.client?.dialogChange(n?"open":"close"))})},[r,e]),null}function wk(e){return e.activatedExtensionId&&e.activatedExtensionId.length>0?e.activatedExtensionId:e.id}function Ck(e){const t="local"===e.type?void 0:e.publicIdentifier,n="persisted"===e.type?e.targetPublicIdentifier:void 0,r="local"===e.type?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:wk(e),name:e.name,placementReference:e.placementReference,type:e.type,version:e.version,publicIdentifier:t,registrationId:r,targetPublicIdentifier:n}}function Ek(e){const t=String(Ik(e));return e.stack??t??e.message??""}function xk(e){const t=Ik(e);return t?`${t.name}: ${t.message}`:e.message}function Ik(e){if(function(e){return"object"==typeof e.cause&&null!=e.cause}(e)&&"stack"in e.cause)return e.cause}var Ak=(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))(Ak||{}),Tk=(e=>(e.ExtensionUsageError="EXTENSION_USAGE_ERROR",e))(Tk||{});const Lk={[zr.ExtensionCustomerPrivacyApiBrowserError]:{eventName:"extension-customer-privacy-api-browser-error",eventType:"interceptor-execution",errorReason:"extension-customer-privacy-api-browser-error"},[zr.ExtensionCustomerPrivacyApiError]:{eventName:"extension-customer-privacy-api-error",eventType:"interceptor-execution",errorReason:"extension-customer-privacy-api-error"},[zr.ExtensionCustomerPrivacyGraphqlError]:{eventName:"extension-customer-privacy-graphql-error",eventType:"interceptor-execution",errorReason:"extension-customer-privacy-graphql-error"},[zr.ExtensionCustomerPrivacyLikelyBotError]:{eventName:"extension-customer-privacy-likely-bot-error",eventType:"interceptor-execution",errorReason:"extension-customer-privacy-likely-bot-error"},[zr.ExtensionCustomerPrivacyServerError]:{eventName:"extension-customer-privacy-server-error",eventType:"interceptor-execution",errorReason:"extension-customer-privacy-server-error"},[zr.ExtensionInterceptorError]:{eventName:"interceptor-execution-broke",eventType:"interceptor-execution",errorReason:"interceptor-execution-broke"},[zr.ExtensionInteractionError]:{eventName:"extension-component-interacted",eventType:"interceptor-execution",errorReason:"extension-component-interacted"},[zr.ExtensionRenderError]:{eventName:"extension-rendered",eventType:"interceptor-execution",errorReason:"extension-rendered"},[zr.ExtensionRunError]:{eventName:"extension-run-error",eventType:"interceptor-execution",errorReason:"extension-run-error"},[zr.ExtensionTimeoutError]:{eventName:"extension-render-timed-out",eventType:"interceptor-execution",errorReason:"extension-render-timed-out"},[zr.ExtensionAssetFetchError]:{eventName:"extension-asset-fetch-error",eventType:"interceptor-execution",errorReason:"extension-asset-fetch-error"},[zr.ExtensionSandboxAssetFetchError]:{eventName:"extension-sandbox-asset-fetch-error",eventType:"interceptor-execution",errorReason:"extension-sandbox-asset-fetch-error"},[zr.ExtensionSandboxUncaughtError]:{eventName:"extension-sandbox-uncaught-error",eventType:"interceptor-execution",errorReason:"extension-sandbox-uncaught-error"},[zr.ExtensionUnsupportedFeatureError]:{eventName:"extension-unsupported-feature-error",eventType:"interceptor-execution",errorReason:"extension-unsupported-feature-error"}},Rk=({children:e})=>{if("undefined"==typeof window)return d(y,{children:e});const{observability:t,userEvents:n,checkout:r}=oe(),i=pg(),o=mg(),s=r.configuration.layout.isOnePage.value;return a(()=>{const e=(e,t)=>{if(e.name in zr&&t?.extension){const{extension:n}=t,{trace:r,message:a}=function(e){return{message:xk(e),trace:Ek(e)}}(e);if(!Or(e.name))return;const i={apiVersion:n.apiVersion,appId:n.appId,appApiKey:n.appApiKey,appName:n.appName,appVersion:n.version,code:Tk.ExtensionUsageError,errorName:e.name,extensionId:n.extensionId,extensionName:n.name,extensionType:n.type,message:a,placementReference:n.placementReference,extensionTarget:n.extensionPoint,registrationId:n.registrationId,trace:r,type:"uiExtensionError"};o("uiExtensionError",{...i,timestamp:new Date})}},r=(e,t,r)=>{if(e.name in Lk&&t?.extension){const{extension:a}=t,{eventName:o,eventType:l,errorReason:c}=Lk[e.name],{userToken:u,shopId:d,sessionToken:p,checkoutToken:m,apiClientId:h,sourceId:g,sourceType:f,checkoutSdkVariant:y,checkoutSdkVersion:v,checkoutSdkSchemaVersion:_,pageLoadId:b}=i;n.monorailEvent({schemaId:"checkout_c1_interaction_errors/3.2",payload:{userToken:u,shopId:d,sessionToken:p,pageLoadId:b,checkoutToken:m,apiClientId:h,sourceId:g,sourceType:f,extensionId:wk(a),extensionPoint:a.extensionPoint,extensionPlacementReference:a.placementReference,extensionInstanceId:a.extensionInstanceId,activatedExtensionIds:r?.extensions?.active,eventType:l,eventName:o,errorMessage:e.message,sourceDesign:s?"c1_redesign":"c1_legacy",errorReason:c,silencedViolation:!1,errorOrigin:"client",errorType:"extension",checkoutSdkVariant:y,checkoutSdkVersion:v,checkoutSdkSchemaVersion:_,extensionPublicIdentifier:a.publicIdentifier,extensionTargetPublicIdentifier:a.targetPublicIdentifier}})}};return t.addOnError(r),t.addOnError(e),()=>{t.removeOnError(r),t.removeOnError(e)}},[t,n,i,s,o]),d(y,{children:e})};function Mk(){const e=tf(),t=i(new Set);return a(()=>()=>{for(const e of t.current)cancelAnimationFrame(e.handle),clearTimeout(e.timeout),e.resolve();t.current.clear()},[]),rc(n=>{if("error"===n.type||"invalid"===n.type)return new Promise(n=>{const r=()=>{if(!a.settled){a.settled=!0,cancelAnimationFrame(a.handle),clearTimeout(a.timeout);try{e()}finally{t.current.delete(a),n()}}},a={handle:requestAnimationFrame(r),resolve:n,settled:!1,timeout:setTimeout(r,100)};t.current.add(a)})}),null}function Nk(){const{checkout:{identity:e,negotiator:t}}=oe(),r=t.current.fields.buyerIdentity,{inMemoryApplePayParts:{asPaymentMethod:a}}=rn();return n(()=>"applePay"===e.current.value&&Boolean(r.value?.purchasingCompany)&&a.value)}function Dk(){const{checkout:{wallets:e},embed:n}=oe(),r=function(){const{checkout:{negotiator:e}}=oe(),{deliveryLines:n,email:r,phone:a,shippingAddress:i,billingAddress:o,billingAddressOption:s,paymentLines:l,tipLines:c,discountLines:u,interfaceFlow:d,externalDeliveryIds:p,cartMetafields:m,attributes:h}=e.parts,g=function(){const{checkout:{negotiator:e}}=oe(),n=e.current.fields.buyerIdentity;return t(()=>{const e=n.value?.customerProfile;if(e)return e.email},[n])}(),f=Eb(),y=Jy();return t((e,t=!1)=>{if(d.value=void 0,p.value=void 0,e)r.value=e.email,a.value=e.phone,i.value=e.shippingAddress,o.value=e.billingAddress,e.billingAddressOption&&(s.value=e.billingAddressOption),l.value=e.paymentLines,c.value=e.tipLines,u.value=e.discountLines,m.value=e.cartMetafields;else{const e=g()??"",n=f("shipping"),s=f("billing");r.value=e,a.value="",t||(i.value=n??Ol(i.value)),o.value=s??Ol(o.value);const l=h.value;h.value=l?l.filter(e=>e.key!==Fr):l}y.value||t||Mh(n,void 0)},[h,s,o,m,n,u,r,p,f,g,d,y,l,a,i,c])}(),a=Br(),i=Nk();return t(({shouldResetCustomerInfo:t=!1,shouldRemovePaymentLine:o=!0,isConstrainedAddress:s=!1}={})=>{const l=t&&n?.isFlagshipPartner?n.embedderProposalSnapshot.value??null:null;e.setHasActiveApplePaySubscriptionReview(!1),i.value||e.setEscalatedWallet(null),t&&r(l,s),o&&!l&&a()},[n,r,a,e,i])}function zk({onClick:e,shouldResetCustomerInfo:r,shouldRemovePaymentLine:a,skipRedirect:i}={}){const{negotiate:o,progress:s}=nc(),l=Dk(),{dispatch:c}=Ch()??{},{client:u,observability:d,persistence:p,router:m,checkout:{identity:{current:h},negotiator:g},i18n:f}=oe(),{buyerIdentity:y}=g.current.fields,{value:v}=n(()=>function({i18n:e,buyerIdentity:t}){return Boolean(t.value?.customerProfile)?e.translate("review.checkout_a_different_way"):e.translate("review.checkout_as_guest")}({i18n:f,buyerIdentity:y})),{currentDetour:_}=tc().value,b=u.unstable_getSerialization("forcedRedesignWallet"),k=function(e){try{const t=new URL(e.href);return t.searchParams.delete(pn),t.searchParams.append(ov,"1"),t.toString()}catch{return}}(m.currentUrl.value),P=m.currentUrl.value.searchParams.has(ov),S=b&&k&&!P&&!i;return{label:v,onClick:t(async t=>{if(d.counter({name:"checkout_return_to_guest_checkout",value:1,attributes:{identity:h.value,redirect:Boolean(S)}}),S)return p?.clearAll(),e?.(),t?.(),void window.location.replace(k);var n;c?.("addressReset"),(n=m.currentUrl.peek()).searchParams.has(pn)&&(n.searchParams.delete(pn),history.replaceState(null,"",n.href)),e?.(),l({shouldResetCustomerInfo:r,shouldRemovePaymentLine:a}),c?.("reset"),_&&s("checkout-as-guest-action"),t?.(),await o({silenceViolations:["non-stock"]})},[_,c,k,h,o,e,p,s,l,S,d,m,r,a])}}function Ok(){return function(){const{router:e}=oe(),t=e.currentUrl.value,{onClick:n}=zk({shouldResetCustomerInfo:!0});a(()=>{t.searchParams.has(ov)&&(n?.(),function(e){e.searchParams.has(ov)&&(e.searchParams.delete(ov),history.replaceState(null,"",e.href))}(t))},[])}(),null}const Bk="wallet_deceleration";function Fk(){const{walletUsedForSubmissionSignal:e,inMemoryGooglePayParts:{paymentSheetError:n}}=rn(),{clearForcedCheckoutLayout:r}=$y(fn),{checkout:a,router:i}=oe();return zk({onClick:t(async()=>{var t;e.value=void 0,n.value=void 0,r({wallet:"GOOGLE_PAY"}),"true"===(t=i.currentUrl.value).searchParams.get(Bk)&&(t.searchParams.delete(Bk),history.replaceState(null,"",t.href)),a.unstable_evaluateSupportsSplitShipping(i.currentUrl.value)},[e,n,a,r,i]),shouldResetCustomerInfo:!0,skipRedirect:!0})}function Vk({shouldResetCustomerInfo:e}){const n=Dk();return t(()=>{n({shouldResetCustomerInfo:e})},[n,e])}const Uk="google_pay_legacy_token_bounce";function qk(){return function(){const{checkout:e,embed:t,observability:n}=oe(),{inMemoryGooglePayParts:{paymentSheetError:r}}=rn(),{onClick:i}=Fk();a(()=>{t||"GOOGLE_PAY"===e.wallets.escalatedWallet.value&&(e.latestReceipt.value||Vr({paymentLines:e.proposal.proposed.paymentLines.value})&&(n.counter({name:Uk,value:1}),n.log(Uk,"[useBounceLegacyGooglePayToken] Detected a legacy Google Pay token on load and returned the buyer to guest checkout"),i?.(()=>{r.value={type:"recovery_notice"}})))},[])}(),null}const jk=ae("NavigationBlockerContext");class Hk extends Error{constructor(){super(...arguments),this.name="NavigationBlockerTimeout"}}function $k({children:e}){const n=i(new Set),a=m(!1),{observability:o}=oe(),s=t(e=>{setTimeout(()=>{n.current.has(e)&&o.error(new Hk(`The block associated with the key: ${e} has been blocking for over 30 seconds now. Please check to see you are properly cleaning this up.`))},3e4)},[o]),l=t((e,t)=>{const r=t??"_global",i=n.current;e?(i.add(r),s(r)):i.delete(r),a.value=i.size>0},[a,s]),c=r(()=>({blocking:a,setBlocking:l}),[a,l]);return d(jk.Provider,{value:c,children:e})}const Yk=f({registerPayNowButtonElement:()=>()=>{},payNowButtonElement:null,setPayNowButtonSectionMounted:()=>{},payNowButtonSectionMounted:!1}),Wk=()=>h(Yk);function Gk(){const{registerPayNowButtonElement:e}=Wk(),n=i(null);return t(t=>{n.current?.(),n.current=t?e(t):null},[e])}function Kk({children:e}){const n=i(new Set),[a,o]=s(null),[l,c]=s(0),u=t(e=>(n.current.add(e),o(e),()=>{n.current.delete(e),o(t=>t===e?n.current.values().next().value??null:t)}),[]),p=t(e=>{c(t=>Math.max(0,t+(e?1:-1)))},[]),m=l>0,h=r(()=>({registerPayNowButtonElement:u,payNowButtonElement:a,setPayNowButtonSectionMounted:p,payNowButtonSectionMounted:m}),[u,a,p,m]);return d(Yk.Provider,{value:h,children:e})}function Jk(){return Ov(oe())}function Qk(){const{embed:e}=oe(),t=Kh(),n=t?.config?.pixelEventsMode,r=e?.configuration?.pixelMode;return"DISABLED"===n||"FORWARD_TO_CLIENT"===n||"DISABLED"===r||"FORWARD_TO_CLIENT"===r}function Xk(){const{mobileCheckoutSdk:e}=oe(),t=e.config.version,n=e.config.schema;return Boolean(t)||Boolean(n)}function Zk({isFlagshipPartner:e,embedderProposalSnapshotEmail:t,proposedEmail:n}){if(e)return t||n||void 0}var eP=(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))(eP||{});class tP extends Error{constructor(){super(...arguments),this.name="MissingGuestCheckoutUrlError"}}function nP(e="payment_page",{markPrefilledGuestArrival:n=!1}={}){const{client:a,i18n:i,observability:o,userEvents:s,source:l,checkout:c,shop:u,persistence:d,shop:{hasStorefront:p},url:m,shopPay:h,embed:g,router:f}=oe(),y=f.currentUrl.value,{checkoutAsGuestUrl:v,profilePreviewToken:_,checkoutProfileContext:b,redirectSource:k}=h.config,P="simulated"===l.type,S=h.user.isAuthenticatedUser,w=c.negotiator.throttleState.peek().token,C=c.checkpointToken.value,E=c.configuration.renderContextToken.token.value,x=Pb({mode:"copy-if-missing",include:{shopClientUuid:!0}}),I=Zk({isFlagshipPartner:g?.isFlagshipPartner,embedderProposalSnapshotEmail:g?.embedderProposalSnapshot.value?.email,proposedEmail:c.proposal.proposed.email.value}),A=r(()=>{if(P)return"";if(!v)return p?m.storefront():"";const e=new URL(v);e.searchParams.set(qr,"true"),jr(e),n&&S.value&&Hr(l.type)&&$r(e,Xr),C&&e.searchParams.set(Yr,C),w&&e.searchParams.set(q_,w),_&&b&&(e.searchParams.set(Wr,_),e.searchParams.set(Gr,b)),rr(y.search)&&e.searchParams.set(Kr,"shop_web"),S.value?e.searchParams.set(Jr,"true"):e.searchParams.delete(Jr),E?e.searchParams.set("rctx",E):e.searchParams.delete("rctx");const t=new URLSearchParams(a.initialRequest.url.search);return function(e,t){const n=t.get("_mcs");n&&Ur(n)?e.set("_cs",n):e.delete("_cs")}(e.searchParams,t),x(e.searchParams,t),I&&!e.searchParams.get("checkout[email]")&&e.searchParams.set("checkout[email]",I),e.href},[P,v,C,a.initialRequest.url.search,_,b,y.search,S.value,w,p,m,E,x,I,n,l.type]);let T=i.translate("unauthenticated_modals.generic.cta");(Jk()||g?.isCheckoutKit())&&(T=i.translate("checkout_sdk.use_another_payment_method"));const L=t(()=>(P||(S.value&&d?.clearAll(),o.counter({name:"shop_pay_return_to_guest_checkout",value:1,attributes:{redirect_source:k}}),s.monorailEvent({schemaId:"shopify_pay_payment_page_checkout_as_guest/2.1",payload:{...Qr(l,c,u),origin:e}},{exportImmediately:!0})),null),[P,S,d,o,s,l,c,u,e,k]),R=t(e=>{if(c.unstable_setRedirectingExternally(!0),L(),!A)return c.unstable_setRedirectingExternally(!1),void o.error(new tP("redirectToGuestCheckout called without a guest checkout URL"));if(!e)return void window.location.assign(A);const t=new URL(A);!function(e,t){t&&(e.set(Zr,t.paymentMethod),t.paymentMethodIdentifier?e.set(ea,t.paymentMethodIdentifier):e.delete(ea))}(t.searchParams,e),window.location.assign(t.href)},[c,L,A,o]);return r(()=>({label:T,href:A,onClick:L,redirectToGuestCheckout:R}),[T,A,L,R])}function rP(e,n){const{negotiate:r}=nc();return t(async t=>{let a=!1;return await r({silenceViolations:["all"],force:!0,customizeNegotiation:e=>{const t=function(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:(n=e.discounts?.lines??[],n.filter(e=>e.allocationSet.allocatedForTotal?.targets.some(e=>!e.deliveryLineTarget)||e.allocationSet.allocated?.allocations.some(e=>!e.target.deliveryLineTarget)))},...e.payment?{payment:t}:{},...e.remote&&{remote:{...e.remote,remoteNegotiations:e.remote.remoteNegotiations.map(e=>({...e,payment:t}))}}};var n}(e);return n?{...t,buyerIdentity:{...t.buyerIdentity,email:n}}:t},negotiationStage:"negotiation",onComplete:n=>{a||(a=!0,e(t,n))}}),a},[r,e,n])}function aP({clearPii:e}){const{embed:n,checkout:r,userEvents:a,source:i,shop:o}=oe(),s=r.negotiator.parts.shippingAddress.value,{href:l,redirectToGuestCheckout:c}=nP("payment_page",{markPrefilledGuestArrival:!e}),u=Zk({isFlagshipPartner:n?.isFlagshipPartner,embedderProposalSnapshotEmail:n?.embedderProposalSnapshot.value?.email,proposedEmail:r.proposal.proposed.email.value}),d=t(()=>{L(()=>{r.checkoutExit.setClearingSession(!1),r.unstable_setRedirectingExternally(!1)})},[r]),p=rP(c,u),m=r.proposal.negotiated.fields.availableDeliveryAddresses.value,h=Boolean(m?.length&&m.some(e=>ta(s,e.address)));return t(t=>{if(!r.isRedirectingExternally.peek())if(l)if(L(()=>{r.checkoutExit.setClearingSession(e),r.unstable_setRedirectingExternally(!0)}),e&&!h)p(t).then(e=>{e||d()}).catch(d);else{e||a.monorailEvent({schemaId:"shopify_pay_payment_page_ui_interaction/1.2",payload:{...Qr(i,r,o),action:"payment_step_redirect"}},{exportImmediately:!0});try{c(t)}catch(n){throw d(),n}}else c(t)},[r,e,l,a,i,o,h,c,d,p])}const iP=[3890849,3850711,5198245];function oP(e){return!!e&&iP.includes(e)}function sP(){const{observability:e}=oe(),n=t(t=>{if("undefined"==typeof window||!window.ReactNativeWebView||"function"!=typeof window.ReactNativeWebView.postMessage)return;const n=JSON.stringify(t);try{window.ReactNativeWebView.postMessage(n)}catch(r){e.log("shop_app_messenger_post_message_failed","Failed to post message to ReactNativeWebView",{error:r})}},[e]);return r(()=>({notify:n}),[n])}function lP({children:e}){const{checkout:t,observability:n,source:r,client:o,environment:s,shopPay:l,shop:c}=oe(),u=t.rememberMe.shouldSetRememberMeCookies.value,p="simulated"===r.type,{href:m}=nP(),h=Pv().value,g=sP(),f=i(!1),v="shopPay"===t.identity.current.value,_=o.unstable_getSerialization("apiClientId"),b=o.unstable_getSerialization("shopPayConfig"),k=oP(_),P=!0===b.shop_app_referral_shop_pay_eligible&&"shop_pay_disabled"===h&&c.hasFlagEnabled(na),w=!0===b.shop_pay_sdk_without_shop_pay_eligible,C=w&&"shop_pay_disabled"===h,E=!(p||void 0===h||k||t.configuration.isUniversalCheckoutFinalizer||P||C),x=(C?"shop_pay_sdk":P&&"shop_referral")||void 0,I=v&&E,A=v&&!p&&!I&&!0===b.has_remember_me_session&&""!==l.user.shopAccountUuid.value,T=i(!1),L=i(!1);return S(()=>{const e=t.latestReceipt.value;if(null!=e)switch(e.status){case"processed":g.notify({checkout_completed:!0});break;case"action_required":"complete_payment_challenge"===e.action.type?g.notify({checkout_error:"threeds_required"}):g.notify({checkout_error:"generic_error"});break;case"failed":"payment"===e.failure.type||"discount"===e.failure.type?g.notify({checkout_in_progress:!1}):g.notify({checkout_error:"generic_error"})}}),a(()=>{!f.current&&u&&(t.rememberMe.setRememberMeCookies(),f.current=!0)},[u,t.rememberMe]),function({enabled:e,observability:t,shopServerUrl:n}){const r=i(!1);a(()=>{e&&!r.current&&(r.current=!0,fetch(function(e){return new URL("/pay/session",e).href}(n),{method:"GET",credentials:"include",keepalive:!0}).then(e=>{e.ok||t.log("shop_pay_remember_me_session_exchange_failed","Failed to exchange Shop Pay remember-me session",{status:e.status})}).catch(e=>{t.log("shop_pay_remember_me_session_exchange_failed","Failed to exchange Shop Pay remember-me session",{errorMessage:e instanceof Error?e.message:String(e)})}))},[e,t,n])}({enabled:A,observability:n,shopServerUrl:s.services.shopServer.url}),a(()=>{I&&!T.current&&(T.current=!0,n.log("shop_pay_wrapper_redirecting_to_guest_checkout","Redirecting to guest checkout",{shopPayUnavailableReason:h,sdkEligible:w}),"deferred_payment"!==h&&n.counter({name:"shop_pay_unavailable_redirecting_to_guest_checkout",value:1}),window.location.assign(m))},[m,n,w,h,I]),a(()=>{!v||p||void 0===x||L.current||(L.current=!0,n.log("shop_pay_kept_without_merchant_shop_pay","Keeping checkout in Shop Pay at a merchant with Shop Pay off",{shopPayUnavailableReason:h}),n.counter({name:"shop_pay_kept_without_merchant_shop_pay",value:1,attributes:{reason:x}}))},[v,p,x,n,h]),I?null:d(y,{children:e})}function cP(){const{client:e}=oe(),t=e.unstable_getSerialization("experiments"),n=t?.find(e=>e.clientHandle===ra)?.variant,r=Object.values(aa).find(e=>e===n)??aa.Control;return{variant:r,showPaymentTiles:r===aa.VariantA||r===aa.VariantC,useRedesignedChoiceList:r===aa.VariantB||r===aa.VariantC,showSingleCreditCard:r!==aa.Control}}function uP(){const{source:e}=oe(),{useRedesignedChoiceList:t}=cP();return t&&"shopPayExternal"!==e.type?"redesigned":"base"}class dP extends Error{constructor(){super(...arguments),this.name="TranslationError"}}const pP=()=>{const{url:e}=oe();return r(()=>[e.cart(),e.storefront()],[e])};function mP(){const{router:e,shop:t}=oe(),r=xg(),{cartLink:{visibility:a}}=jy(),i=tc(),o=hP(),s=I("hidden"===a);return n(()=>{const{currentDetour:n}=i.value,a="thankYou"===n?.type;return t.hasStorefront&&!r.value&&!a&&!rr(e.currentUrl.value.search)&&Boolean(o.value)&&!s.value})}function hP(){const{source:e,url:t,checkout:{negotiator:r}}=oe(),a="simulated"===e.type,i=r.current.fields.buyerIdentity;return n(()=>{if(a)return new URL(t.cart());let n;return e.cartReturnUrl&&(n=new URL(e.cartReturnUrl)),Boolean(i.value?.customerProfile)&&n&&n.searchParams.append("logged_in","true"),n})}function gP(e){return e.currentUrlMatches("/thank-you")}const fP=_(function({href:e,target:t="auto",children:n,...r},a){const{i18n:i,router:o,url:s,source:l,checkout:c,embed:u,observability:p}=oe(),m=hP(),h=function(){const{client:e,environment:{services:t},shop:{customerAccounts:n,storefrontDomains:r}}=oe(),a=r?.map(e=>`https://${e}`)??[],i=[t.shopServer.url,...a];if(n.domain){const e=`https://${n.domain}`;i.push(e)}const o=e.unstable_getSerialization("loginUrl");return o&&i.push(`https://${new URL(o).host}`),i}(),g=new URL(s.storefront()).origin,f="simulated"===l.type,y=c.configuration.isWindowOpenDelegationEnabled,v=pP();if(c.configuration.isUniversalCheckoutFinalizer&&gP(o))return d("a",{...r,ref:a,"aria-disabled":"true",children:n});let _="_blank"===t,b="_blank"===t,k=Vl(e,{cart:ql(m.value),checkout:Ul()});const P=function(e,t,n,r){let a;try{a=new URL(e,t.currentUrl.value.origin)}catch{return 3}const i=a.protocol.replace(":","");return yP.has(i)?U(a,t.prefix)||!e.startsWith("//")&&!e.startsWith(a.protocol)?0:function(e,t,n,r){return e.origin===t.currentUrl.value.origin||e.origin===n||r.includes(e.origin)}(a,t,n,r)?1:2:vP.has(i)?1:3}(k,o,g,h),S=["/information","/shipping","/review","/payment","/thank-you","/cart","/","","/orders","/profile","/settings"],w=/^\/orders\/.*/;switch(P){case 2:b=!0,_=!0;break;case 1:b=!0;break;case 3:b=!0,k="#";break;case 0:!f||S.includes(jl(k))||w.test(k)||(k="#");break;default:R(P)}const C=_?"_blank":void 0,E=_?"noopener noreferrer":void 0,x=Su({external:_,native:b});return b?d("a",{...r,href:k,target:C,rel:E,ref:a,"aria-describedby":x,onClick:e=>{if(y&&(1===P||2===P))return e.preventDefault(),u?.client?.windowOpenRequest(k).catch(e=>{p.log("window_open_delegation_error","Window open delegation failed in Link component",{url:k,error:e instanceof Error?e.message:String(e)})}),void r.onClick?.(e);if(f){if(e.preventDefault(),v.includes(k)){const e=new URL(o.currentUrl.value);return e.searchParams.set("ce_redirect",k),void o.navigate(e)}const t=i.translate("simulated_checkout.editor_link_new_tab_confirmation",{resolved_to_link:k});confirm(t)&&open(k)}r.onClick?.(e)},children:n}):d(V,{...r,router:o,href:k,target:C,rel:E,ref:a,"aria-describedby":x,children:n})});fP.displayName="Link";const yP=new Set(["http","https"]),vP=new Set([...yP,"mailto","tel","sms"]);function _P({children:e}){const{geolocation:n}=jf(),{i18n:a,embed:i,checkout:o,observability:s,shop:l}=oe(),c=ia({embedder:i?.embedder}),u=Jg(),p=o.configuration.layout.isOnePage.value,m=l.hasFlagEnabled(oa),h=l.hasFlagEnabled(sa),g="redesigned"===uP(),f=t(e=>a.numberFormatter().format(e),[a]),{symbol:y,prefixed:v}=q(a.currency,a),_=r(()=>function(e){const t=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",(t={})=>e.translate("general.stepper.increase",t)],["decrease",(t={})=>e.translate("general.stepper.decrease",t)],["minimumReached",(t={})=>e.translate("general.stepper.minimum_reached",t)],["maximumReached",(t={})=>e.translate("general.stepper.maximum_reached",t)],["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",(t={})=>e.translate("general.datepicker.show_next_month",t)],["showPreviousMonth",(t={})=>e.translate("general.datepicker.show_previous_month",t)],["rangeStart",()=>e.translate("general.datepicker.range_start")],["inRange",()=>e.translate("general.datepicker.in_range")],["rangeEnd",()=>e.translate("general.datepicker.range_end")],["autocompleteOptionsAvailable",({count:t=0}={})=>0===t?e.translate("general.autocomplete_zero_item"):1===t?e.translate("general.autocomplete_single_item"):e.translate("general.autocomplete_multi_item",{number:t})],["qrCode",()=>e.translate("general.qr_code")],["removeChip",()=>e.translate("general.remove_chip")],["removeItem",(t={})=>e.translate("general.remove_item",t)],["removeTag",()=>e.translate("general.remove_tag")],["mapClusterTitle",({count:t=0}={})=>{const n="number"==typeof t?(r=t,e.numberFormatter().format(r)):t;var r;return 1===t?e.translate("general.map.cluster_title.one",{number:n}):e.translate("general.map.cluster_title.other",{number:n})}],["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",()=>e.translate("clipboard.failed_to_copy")],["productThumbnailQuantityLabel",()=>e.translate("order_summary.product_image_quantity_label")]]);return(e,n)=>{const r=t.get(e)?.(n);if(null==r)throw new dP(`Missing UI library translation: ${e}`);return r}}(a),[a]),b=r(()=>({code:a.currency,symbol:y,symbolPrefixed:v}),[v,y,a.currency]),k=r(()=>i?{embedder:i.embedder,interstitialBrandingEnabled:c}:void 0,[i,c]),P=r(()=>({countryCode:n.country.code}),[n.country.code]),S=r(()=>({direction:a.localeDirection,languageCode:a.locale}),[a.locale,a.localeDirection]),w=$v(),C=r(()=>({...w,close:()=>w.emit("closeAnnouncement")}),[w]);return d(td,{currency:b,embed:k,disableScrollIntoView:ar(i?.embedder),formatNumber:f,geolocation:P,linkComponent:fP,locale:S,onePage:p,editor:u,redesignedChoiceLists:g,animatedTextFieldLabels:m||h,floatTextFieldLabelsOnFocus:h,translate:_,announcementEmitter:C,logger:s,children:e})}const bP=C({load:()=>hl(()=>import("./d08a6c7d.B7aDvSZI.js"),__vite__mapDeps([72,1,2,3,4,5,73,18,74,75,76,77,54,78,79,80,81,82,15,83,84,85,63,86,14,87,88,33,89,6,90,53,91,92,11,16,17,93])).then(e=>e.ApplePaySessionLoader),renderLoading:({children:e})=>e,useError:function(e){const{sessionLoadFailed:t}=rn().inMemoryApplePayParts,{observability:n}=oe();a(()=>{e&&(t.value=!0)},[e,n,t])}});function kP(){const e=function(){const e=at();return n(()=>!!e.value&&void 0!==window.ApplePaySession)}(),{availableWallets:t}=rn(),r=I(t.some(({name:e})=>"APPLE_PAY"===e)),a=i(!1),o=n(()=>(!a.current&&e.value&&r.value&&(a.current=!0),a.current));return d(x,{when:o,children:d(bP,{})})}function PP(){const{checkout:e}=oe();return!e.configuration.showPayButton}function SP({enabled:e,onTimeout:t,timeout:n=6e4}){const r=i(null),o=se(t);a(()=>{if(e)return r.current=setTimeout(()=>o.current(n),n),()=>{r.current&&clearTimeout(r.current)}},[e,o,n])}var wP={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 CP({id:e,children:t,accessibilityRole:n,level:r,textAlign:o,autoFocus:s,visibility:l,tabIndex:c,display:u="block"}){const p=gu(),m=r??p??0,h=p?`h${p}`:"h1",g="hidden"===l?wP.visuallyHidden:v(wP.Heading,o&&wP.textAlignVariant[o],m?wP.levelVariant[m]:void 0,u&&wP.displayVariant[u]),f=i(null);return a(()=>{s&&f.current?.focus({preventScroll:!0})},[s]),d(h,{id:e,ref:f,tabIndex:s?-1:c,className:g,role:"heading"===n?void 0:n,children:t})}function EP({children:e,dialogLabel:t,renderInlineUntilMounted:n=!1}){const{lock:r}=zf(),i=m(!1);a(()=>{r(),i.value=!0},[i,r]);const o=d("div",{className:"MQqMI",role:"dialog","aria-modal":!0,"aria-label":t,children:[d("div",{className:"Jue6i"}),d("div",{className:"kpec9",children:e})]});return d(y,{children:[n&&!i.value?d("div",{"aria-hidden":"true",children:o}):null,d(Zc,{children:d(Mf,{children:o})})]})}function xP({renderInlineUntilMounted:e=!1,useConsentCopy:t=!1}){const{i18n:n}=oe(),r=t?n.translate("wallets.deceleration.one_more_step_to_complete_order"):n.translate("wallets.deceleration.one_more_step");return d(EP,{dialogLabel:r,renderInlineUntilMounted:e,children:d(Lf,{gap:"large-400",alignItems:"center",children:[d(hf,{children:d(yf,{size:"large"})}),d(CP,{level:2,textAlign:"center",children:r})]})})}function IP({onTransitionComplete:e,useConsentCopy:t=!1}){return d(AP,{onTransitionComplete:e,useConsentCopy:t})}function AP({onTransitionComplete:e,useConsentCopy:n}){const{checkout:r,i18n:o}=oe(),s=PP(),{payNowButtonElement:l,payNowButtonSectionMounted:c}=Wk(),u=Boolean(l||s&&c),p=i(!1);u&&(p.current=!0);const m=r.configuration.layout.isOnePage,h=m.value,g=p.current,f=i(null),y=i(!1),v=i(!1),_=t(()=>{m.value&&(y.current||(y.current=!0,ju({content:o.translate("wallets.errors.subscription_review_required"),role:"status"}),r.wallets.setIsDecelerating(!1),e()))},[o,m,e,r.wallets]);return SP({enabled:!0,onTimeout:()=>{v.current=!0,_()},timeout:1e4}),a(()=>{if(null===f.current&&(f.current=Date.now()),v.current)return void _();if(!g)return;const e=Date.now()-f.current,t=Math.max(0,3e3-e);if(0===t)return void _();const n=setTimeout(()=>{_()},t);return()=>clearTimeout(n)},[_,h,g]),d(xP,{renderInlineUntilMounted:!0,useConsentCopy:n})}function TP(e){const{shop:t,checkout:{configuration:r,identity:a}}=oe(),i="shopPay"===a.current.value,o=t.hasFlagEnabled(an);return n(()=>la({supportsOnePage:ca({isOnePage:r.layout.isOnePage.value,isApplePay3PageVaultedReviewEnabled:o,asPaymentMethod:e.value}),isShopPayActive:i}))}const LP=["address2","company","phone"];function RP({addressErrors:e}){if(1!==e.size)return;const[t]=e.keys();var n;return void 0!==t?(n=t,LP.includes(n)?t:void 0):void 0}function MP({missingAddressField:e,violations:t}){return"company"===e&&t.some(({code:e})=>"DELIVERY_COMPANY_REQUIRED"===e)}function NP({addressErrors:e,violations:t}){const n=RP({addressErrors:e});if(!MP({missingAddressField:n,violations:t}))return new Map(e);const r=new Map(e);return r.delete(n),r}function DP({paymentLines:e,paymentMethods:t}){const n=t?.some(e=>"wallet"===e.type&&"PAYPAL_EXPRESS"===e.name);if(!n)return{status:"not_connected"};const r=Tt(e,"PAYPAL_EXPRESS");if(r&&ua(r)){const{walletContent:e}=r.method;return{status:"connected",email:e?.email??"",token:e?.token??""}}return{status:"not_connected"}}function zP({code:e}){return ya.has(e)||va.has(e)||_a.has(e)||ba.has(e)||ka.has(e)||Pa.has(e)||Sa===e}function OP({isPayWithPayPalButton:e}){const{inMemoryPayPalParts:t}=rn();return e?t.payWithPayPalButtonStatus:t.acceleratedCheckoutButtonStatus}function BP(){const{isInPayPalContextSignal:e}=rn(),{i18n:t}=oe(),r=OP({isPayWithPayPalButton:!0}),{inMemoryPayPalParts:{accountStatus:a}}=rn();return n(()=>{if(e.value)return"error"===r.value.status?t.translate("wallets.errors.unavailable.description",{walletName:t.translate("brand.paypal")}):"error"===a.value.status?t.translate("wallets.errors.generic",{walletName:t.translate("brand.paypal")}):void 0})}const FP=()=>{const{checkout:{negotiator:e}}=oe(),{paymentLines:n}=e.parts;return t(()=>{const e=n.value;n.value=hn(e,{method:{type:"wallet",name:"PAYPAL_EXPRESS"}})},[n])};function VP(){const e=Ve(),{checkout:t}=oe(),r=t.configuration.layout.isOnePage.value,a=t.extensibility.ui.hasAtRiskPlacement;return n(()=>{if(r)return!1;if(!a.value)return!1;const n=e.value.enabledDeliveryMethods.includes("PICK_UP");return!t.isShippingRequired.value||!n})}function UP(e){return Boolean(e.value?.method.walletContent?.isVenmo)}const qP=()=>{const{checkout:{negotiator:e}}=oe(),{paymentLines:t}=e.parts;return n(()=>Tt(t.value,"PAYPAL_EXPRESS"))},jP=()=>{const{checkout:{negotiator:e}}=oe(),{paymentLines:t}=e.parts;return n(()=>{const e=Tt(t.value,"PAYPAL_EXPRESS");return Boolean(e&&ua(e))})},HP=()=>{const{inMemoryPayPalParts:{accountStatus:e}}=rn(),{progressing:t}=nc(),r=YP();return n(()=>Boolean(r.value&&("loading"===e.value.status||t.value)))},$P=()=>{const e=YP(),t=da(),r=pa(),a=ut();return n(()=>!(!r.value&&(t.value||a.value&&a.value.amount<=0)||!e.value))},YP=()=>{const{checkout:{negotiator:e}}=oe(),{paymentLines:t}=e.parts;return n(()=>{const e=Tt(t.value,"PAYPAL_EXPRESS");return Boolean(e&&!ua(e))})},WP=new Map,GP=new Map,KP=new Map;class JP extends ml{constructor(){super(...arguments),this.name="DuplicateWalletError",this.defaultGroupingHash="DuplicateWalletError"}}function QP({children:e}){const{checkout:i,observability:o,router:l,i18n:c,shop:u,source:p}=oe(),h=l.currentUrl.value,g=i.configuration.layout.isOnePage.value,f=u.hasFlagEnabled(an),{forceOnePageCheckoutLayout:y}=$y(an),v=m(h.searchParams.has(on)&&!i.wallets.hasConsumedApplePaySubscriptionReviewParam.value),{shippingAddress:_}=i.negotiator.parts,b=Ca(p),k=Ag(St.PayPal,{scope:b}),P=Ag(St.GooglePay,{scope:b}),w=Ag(St.AmazonPay,{scope:b}),C=Ag(St.ApplePay,{scope:b}),E=function(e){const{checkout:{negotiator:t}}=oe(),r=t.parts.paymentLines;return n(()=>{const t=e.lastClicked.value,n=Tt(r.value,"PAYPAL_EXPRESS");return Boolean(n)||"PAYPAL_EXPRESS"===t})}(i.wallets),x=m(void 0),A=_h({sdkStatus:{status:"idle"},buttonStatus:{status:"not_rendered"},paymentSheetError:void 0,paymentSheetOpenPromise:void 0,paymentSheetOpenPromiseResolve:void 0}),T=_h({acceleratedCheckoutButtonStatus:{status:"not_rendered"},payWithPayPalButtonStatus:{status:"not_rendered"},accountStatus:DP({paymentLines:i.proposal.proposed.paymentLines.peek(),paymentMethods:i.proposal.negotiated.fields.paymentMethods.peek()}),isLoadingPaymentSheet:!1,isApproving:!1,paymentSheetError:void 0}),L=_h({buttonStatus:{status:"not_rendered"}}),R=_h({buttonStatus:{status:"not_rendered"}}),M=zy(),N=ln(),D=_h({asPaymentMethod:!1,buttonStatus:{status:"not_rendered"},paymentSheetError:void 0,subscriptionReviewTransition:v.value&&Dl({applePayThreePageVaultedReviewEnabled:f,isOnePageCheckout:g})&&Ea({isApplePaySubscriptionReviewLayoutSupported:g||u.hasFlagEnabled(an),hasSubscriptionReviewQueryParam:v.value,isABTestActive:u.hasFlagEnabled(Xt),variant:M,isCaliforniaBillingOrShippingAddress:N.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}),z=m(void 0),O=_h({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}),B=m(!1),F=m(void 0),{queryParam:V}=av({applePayPaymentSheetError:D.paymentSheetError,applePaySubscriptionReviewTransition:D.subscriptionReviewTransition}),U=TP(D.asPaymentMethod).value,q=i.configuration.addressSettings.nonBillingAddressSettings.value.isRequired("company");!function(e){const{checkout:{negotiator:t}}=oe(),{parts:n}=t,{paymentMethods:r}=t.current.fields;S(()=>{if("connected"===e.peek().status)return;const t=DP({paymentLines:n.paymentLines.value,paymentMethods:r.value});"connected"===t.status&&(e.value=t)})}(T.accountStatus),function(e){const{environment:t,embed:n,observability:r,source:{checkoutSessionIdentifier:i},checkout:{negotiator:o}}=oe(),s=o.current.fields.paymentMethods,l=Boolean(n?.isFlagshipPartner)&&!gn(n?.embedder),c=s.value?.find(e=>"wallet"===e.type&&"SHOP_PAY"===e.name),u=c?.placements?.includes("ACCELERATED_CHECKOUT"),d=u?c?.eligibilityToken:void 0,p=t.services.shopServer.url,m=e.buttonStatus;a(()=>{if(!l)return void(m.value={status:"rendered"});if(!d)return void(m.value={status:"not_eligible"});const e=`${p}|${i||d}`,t=WP.get(e);if(t)return void(m.value=t);const n=KP.get(p)??0;if(Date.now()(n&&WP.set(e,t),GP.delete(e),t)),GP.set(e,o)),o.then(e=>{a||(m.value=e)}).catch(()=>{}),()=>{a=!0}},[l,d,i,p,m,r])}(R),function(){const{checkout:{proposal:{negotiated:e,proposed:t},wallets:n},observability:r}=oe(),i=n.escalatedWallet.value;a(()=>{if(t.email.value)return;const n=e.fields.paymentLines.value?.lines??[];let a;switch(i){case mn.AmazonPay:case mn.BuyWithPrime:a=function(e,t){const n=wa(e,t);if(!n)return;const r=n.method.walletParams;return r?.email}(n,i);break;case"PAYPAL_EXPRESS":case"VENMO":a=function(e){const t=Tt(e,"PAYPAL_EXPRESS");return t&&t.method.walletContent?t.method.walletContent.email:void 0}(n);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:i,status:"success"})):r.log("checkout_wallets_email_recovery","[useRecoverWalletContact] Detected a missing email during a wallet flow but was unable to recover it",{escalatedWallet:i,paymentLines:n,status:"failure"})},[])}();const j=fv(R),H=wv({inMemoryGooglePayParts:A,inMemoryPayPalParts:T,inMemoryVenmoParts:L,inMemoryApplePayParts:D,inMemoryAmazonPayParts:O,didIncrementUnusablePartialAddressMetric:B}),$=r(()=>H?.filter(({placements:e,name:t})=>("APPLE_PAY"!==t&&"GOOGLE_PAY"!==t||"localization_extension_field_error"!==V)&&!("APPLE_PAY"===t&&q&&!U)&&gv(t,e,j)),[H,V,q,U,j]),Y=I($);a(()=>{$?.length&&performance.mark(xa)},[]);const W=$?.map(e=>e.name)||[],G=W.join(",");a(()=>{new Set(W).size!==W.length&&o.error(new JP("Duplicate accelerated wallet(s) found in checkout",{metadata:{duplicatedWallets:[...new Set(W.filter((e,t)=>W.indexOf(e)!==t))],allWalletNames:W}}))},[G,o]);const K=$?.length||0,J=void 0!==i.wallets.activeSession.value?.wallet&&"APPLE_PAY"!==i.wallets.activeSession.value.wallet&&Boolean(i.wallets.isDeceleratingSignal?.value),Q=D.subscriptionReviewTransition.value,X=n(()=>Ia({checkout:i})),Z=X.value&&Aa(M),ee=function({asPaymentMethod:e,useConsentCopy:t,isCaliforniaBillingOrShippingAddress:n,hasSubscription:r,transition:a,isABTestActive:i}){return!e&&(!!(t||n&&r)||"storefront_redirect"===a&&(n||!i))}({asPaymentMethod:D.asPaymentMethod.value,useConsentCopy:Z,isCaliforniaBillingOrShippingAddress:N.value,hasSubscription:X.value,transition:Q,isABTestActive:u.hasFlagEnabled(Xt)}),te=void 0!==Q&&!J&&ee&&Dl({applePayThreePageVaultedReviewEnabled:f,isOnePageCheckout:g}),ne=i.wallets.hasActiveApplePaySubscriptionReview.value&&ee&&!N.value&&void 0===Q;a(()=>{ee||(i.wallets.setHasActiveApplePaySubscriptionReview(!1),void 0!==Q&&(D.subscriptionReviewTransition.value=void 0,J||i.wallets.setIsDecelerating(!1)))},[Q,i.wallets,D.subscriptionReviewTransition,J,ee]),a(()=>{"storefront_redirect"===Q&&te&&!g&&y({wallet:"APPLE_PAY",reason:"subscriptions",asPaymentMethod:!0})},[Q,y,g,te]);const re=u.hasFlagEnabled(fn)&&!g&&h.searchParams.has(Ta);a(()=>{re&&(i.unstable_forceCheckoutLayoutToOnePage(),Yy(o,{wallet:"GOOGLE_PAY",reason:"subscriptions",asPaymentMethod:!0,result:"success"}),ju({content:c.translate("wallets.errors.subscription_review_required"),role:"status"}))},[i,c,o,re]);const ae=t(()=>{v.value=!1,D.subscriptionReviewTransition.value=void 0},[v,D.subscriptionReviewTransition]);!function(e){const{observability:t,router:n}=oe(),r=n.currentUrl.value,[a,i]=s(r.normalizedPath);r.normalizedPath!==a&&(i(r.normalizedPath),e.forEach(({walletName:e,...n})=>{("signal"in n?[n.signal]:n.signals).forEach(n=>{"error"===n.peek().status&&(t.counter({name:"wallet_button_status_reset",value:1,attributes:{walletName:e}}),n.value={status:"not_rendered"})})}))}([{walletName:"applepay",signal:D.buttonStatus},{walletName:"amazonpay",signal:O.buttonStatus},{walletName:"buy_with_prime",signal:O.buyWithPrimeButtonStatus},{walletName:"googlepay",signal:A.buttonStatus},{walletName:"paypal",signals:[T.acceleratedCheckoutButtonStatus,T.payWithPayPalButtonStatus]}]),S(()=>{const e=_.value,t=i.wallets.activeSession.value;"APPLE_PAY"===t?.wallet&&o.log("wallets_shipping_address_update","Shipping address is updated during Apple Pay session",{countryCode:e?.countryCode,isPostalCodePadded:un(e?.postalCode,e?.countryCode),asPaymentMethod:t.asPaymentMethod})});const ie=r(()=>({availableWallets:H,walletUsedForSubmissionSignal:x,persistedPayPalSignal:k,inMemoryPayPalParts:T,inMemoryVenmoParts:L,persistedGooglePaySignal:P,inMemoryGooglePayParts:A,inMemoryApplePayParts:D,applePaySessionHandler:z,persistedApplePaySignal:C,persistedAmazonSignal:w,inMemoryAmazonPayParts:O,inMemoryShopPayParts:R,didIncrementUnusablePartialAddressMetric:B,acceleratedWalletPaymentMethods:Y,isInPayPalContextSignal:E,buttonCount:K,receiptErrorSignal:F}),[H,k,P,C,w,Y,K,L,x,A,T,D,z,O,R,F,E,B]);return d(La.Provider,{value:ie,children:[te&&d(IP,{onTransitionComplete:ae,useConsentCopy:Z}),d("span",{role:"status","aria-live":"polite","aria-atomic":"true",className:Ce({screenReaders:"only"}),children:ne?c.translate("wallets.errors.subscription_review_required"):""}),e]})}const XP=A(function({children:e}){const{embed:n}=oe(),r=t(e=>n?.client?.showToast(e)??!1,[n]);return d(Kk,{children:d($k,{children:d(ZP,{children:[d(gh,{handleToast:r,children:e}),d(Xc,{})]})})})});function ZP({children:e}){const{shop:t,checkout:n}=oe(),a=n.unstable_graphqlDataRequestInfo?.httpRequestInfo,i=r(()=>{const{country:e,zone:n,coordinates:r}=a?.geolocation??{};return a?{geolocation:{default:e??void 0,country:e??t.country,zone:n??void 0,coordinates:r?{longitude:r.longitude,latitude:r.latitude}:void 0},shop:{}}:void 0},[a,t]),o="undefined"==typeof window?null:d(y,{children:[d(Mk,{}),d(Ry,{}),d(ik,{}),d(Ok,{}),d(qk,{})]});return d(qf.Provider,{value:i,children:d(Hv,{children:d(_P,{children:d(Gv,{children:d(e_,{children:d(kk,{children:d(QP,{children:d(rk,{children:d(rf,{children:d(d_,{children:d(rg,{children:d(Uv,{children:d(cg,{children:d(Rk,{children:d(Mv,{children:d(a_,{children:d(Dv,{children:d(lP,{children:[d(Uf,{}),d(eS,{}),d(Sk,{}),d(kP,{}),e,o]})})})})})})})})})})})})})})})})})})}function eS(){const e=i(!1),t=oe(),{embed:n,webMcp:r}=t,a=ie(ec),o=t.checkout.negotiator,{resetAddressErrors:s}=Qf(o.context.deliveryMethodsAddressErrors),l=se({journeyProgression:a,negotiator:o,clearShippingAddressErrors:s});if(!e.current){e.current=!0;const a={get completing(){return l.current.journeyProgression.completing},get progressing(){return l.current.journeyProgression.progressing},detour:(...e)=>l.current.journeyProgression.detour(...e),progress:(...e)=>l.current.journeyProgression.progress(...e),prefetch:()=>l.current.journeyProgression.prefetch(),negotiate:e=>l.current.journeyProgression.negotiate(e)},i=()=>l.current.negotiator.waitForPendingNegotiations();n?.unstable_providePreactContext({journey:a,waitForPendingNegotiations:i,waitForSkeletonRemoved:()=>gl(),negotiationContext:o.context}),r?.unstable_providePreactContext({loadPickupLocalityServices:()=>E(()=>hl(()=>import("./7724832f.CArRsZGg.js"),__vite__mapDeps([94,2,1,3,4,5,95,71,53,54,18,11,14,15,16,17]))).then(({createPickupLocalityServices:e})=>e(t)),journey:a,clearShippingAddressErrors:()=>l.current.clearShippingAddressErrors(),get negotiator(){return l.current.negotiator},waitForPendingNegotiations:i})}return null}const tS=C({displayName:"DevTools",load:()=>hl(()=>import("./bad03769.CXUOhHfj.js"),__vite__mapDeps([96,1,2,3,4,5,63,11,14,15,16,17,18,97])),suspense:!0}),nS=C({displayName:"EditorBridge",suspense:!1,load:()=>hl(()=>import("./abd080c1.otBkb2_E.js"),__vite__mapDeps([98,2,1,3,4,5,16,11,14,15,17,18]))}),rS=C({id:()=>"PrivacyPreferences",displayName:"PrivacyPreferences",suspense:!1,useError:function(e){const{observability:t}=oe();a(()=>{e&&function(e,t){e.error(t,{metadata:{privacyPreferences:{component:"PrivacyPreferences",failure:"lazy_load"}}})}(t,e)},[e,t])},load:()=>E(()=>hl(async()=>{const{deferredPrivacyComponents:e}=await(import("./2acfb1ce.0mZbMliI.js"));return{deferredPrivacyComponents:e}},__vite__mapDeps([99,1,2,3,4,5,48,49,11,14,15,16,17,18])).then(({deferredPrivacyComponents:e})=>e.PrivacyPreferences))}),aS=C({id:()=>"PrivacySheet",displayName:"PrivacySheet",suspense:!1,useError:function(e){const{observability:t}=oe();a(()=>{e&&function(e,t){e.error(t,{metadata:{privacySheet:{component:"PrivacySheet",failure:"lazy_load"}}})}(t,e)},[e,t])},load:()=>E(()=>hl(async()=>{const{deferredPrivacyComponents:e}=await(import("./2acfb1ce.0mZbMliI.js"));return{deferredPrivacyComponents:e}},__vite__mapDeps([99,1,2,3,4,5,48,49,11,14,15,16,17,18])).then(({deferredPrivacyComponents:e})=>e.PrivacySheet))});function iS({children:e}){return d(y,{children:e})}function oS({children:e}){const t=r(()=>new URL(window.location.href),[]),{client:n,source:i}=oe(),o=n.unstable_getSerialization("shopPayConfig");return a(()=>{o&&async function(e,t,n){const{universal_redirect_enabled:r,universal_redirect_indicator:a}=n,i={},o=Ra(e.searchParams);if(a&&!o||"simulated"===t.type||null===t.checkoutSessionIdentifier||!e.searchParams.has(qr)||(i.disable_automatic_redirect=t.checkoutSessionIdentifier),r&&"false"===e.searchParams.get("auto_redirect")&&(i.block_universal_redirect=!0),Object.keys(i).length>0){const t={...i,checkout_version:"c1",edge_redirect:"true"===e.searchParams.get("edge_redirect")};fetch("/shopify_pay/accelerated_checkout",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t),credentials:"include"})}}(t,i,{universal_redirect_enabled:o.universal_redirect_enabled,universal_redirect_indicator:o.universal_redirect_indicator})},[t,i,o]),d(y,{children:e})}function sS({children:e}){const t="undefined"==typeof window;return d(t?iS:oS,{children:e})}function lS({children:e,context:t}){const n="undefined"==typeof window,r=at();return d(Na.Provider,{value:t,children:d(Kg,{target:"cart",children:d(sS,{children:d(j,{router:t.router,children:d(XP,{children:d(Ma,{children:[d(Yg,{children:e}),d(Xg,{}),!n&&d(Wg,{}),d(x,{when:r,children:[d(aS,{}),d(rS,{})]}),d(cS,{}),Mt()&&d(nS,{})]})})})})})})}function cS(){const e=at();return Jg(),d(x,{when:()=>e.value&&!1,children:d(tS,{})})}function uS(e){return[e].flat(99).filter(Boolean).length>0}var dS={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 pS({id:e,borderStyle:t="base",borderWidth:n="base",direction:r="inline",accessibilityRole:a="separator",alignment:i="center",children:o}){const s=uS(o);return d("div",{role:s?void 0:a,className:v(dS.Divider,dS.directionVariant[r],s&&dS.alignmentVariant[i],dS.borderWidthVariant[n],dS.styleVariant[t]),id:e,children:s&&d("div",{className:v(dS.contentAlignmentVariant[i]),children:[o,"separator"===a&&d("span",{role:"separator"})]})})}function mS({children:e,condition:t}){return d(t?"picture":y,{children:e})}const hS=new Map(za({addMaxWidth:!1}).map(({breakpoint:e,query:t})=>[e,t]));function gS(e,t){var n;if(!e&&t&&Da(t))return Object.entries((n=t,Da(n)?{base:[{source:n.default}],...n.conditionals.reduce((e,t)=>{const n=void 0===t.conditions.viewportInlineSize?"base":t.conditions.viewportInlineSize.min,r=void 0===t.conditions.resolution?[{source:t.value}]:[{source:t.value,resolution:t.conditions.resolution}],a=n in e?e[n]??[]:[];return{...e,[n]:[...a,...r]}},{})}:{base:[{source:n}]})).sort(([e],[t])=>{const n=re[e],r=re[t];return null!=n&&null!=r?r-n:0}).map(([e,t])=>{const n=hS.get(e);if(void 0!==n&&Array.isArray(t)){const e=t.map(({source:e,resolution:t})=>[e,t&&`${t}x`].join(" ").trim()).join(", ");return H("source",{key:n,media:n,srcSet:e})}}).filter(Boolean)}function fS(e){if(e)return Da(e)?"string"==typeof e.default?e.default:void 0:e}var yS={"large-200":{boxSize:100},large:{boxSize:86},base:{boxSize:64},small:{boxSize:40},"small-200":{boxSize:32}},vS={BadgeWrapper:"_1m6j2n3v _1m6j2n3u _1fragemwi",Badge:"_1m6j2n3x _1m6j2n3w _1fragemfp _1fragemgj _1fragemi7 _1fragemhd _1fragemsw _1fragemr3 _1fragem64 _1fragem19 _1fragembj _1fragemyz",Overlay:"_1m6j2n314 _1m6j2n313 _1fragemwi _1fragem64 _1fragem19 _1fragembj",Placeholder:"_1m6j2n3p _1m6j2n3o _1fragem108 _1fragem10n _1fragemzt _1fragem112 _1fragemwi _1fragem64 _1fragem19 _1fragembj",ProductThumbnail:"_1m6j2n33 _1m6j2n32 _1fragemws",ProductThumbnailImage:"_1m6j2n3n _1m6j2n3m _1fragemzf _1fragem4q _1fragem5u",depthVariant:{0:"_1m6j2n3d",1:"_1m6j2n3e _1m6j2n3c",2:"_1m6j2n3f _1m6j2n3c",legacy:"_1m6j2n3g _1m6j2n3c"},borderColorVariant:{base:"_1m6j2n38",custom:"_1m6j2n39"},borderRadiusVariant:{base:"_1m6j2n3a",small:"_1m6j2n3b"},borderVariant:{none:"_1m6j2n3s _1m6j2n3q _1fragemeg _1fragemdw _1fragemf0 _1fragemdc",full:"_1m6j2n3t _1m6j2n3r _1fragemk5 _1fragemjl _1fragemkp _1fragemj1"},boxShadowMargin:"_1m6j2n312",productThumbnailSizeVariant:{"large-200":"_1m6j2n3h",large:"_1m6j2n3i",base:"_1m6j2n3j",small:"_1m6j2n3k","small-200":"_1m6j2n3l"},thumbnailBackgroundVariant:{base:"_1m6j2n36 _1m6j2n34 _1fragem133",subdued:"_1m6j2n37 _1m6j2n35 _1fragem13d"},badgeSizeVariant:{base:"_1m6j2n3y",small:"_1m6j2n3z"},badgeToneVariant:{auto:"_1m6j2n310",accent:"_1m6j2n311"},visuallyHidden:"_1m6j2n315 _1fragem121"};function _S({alt:e="",depth:t,size:n,sizes:r,source:a,src:i,srcSet:o,totalItems:s,overlay:l}){const{merchandiseThumbnail:{background:c="subdued",border:u="full",fit:p="contain",borderWidth:m,borderColor:h="base",shadow:g,badge:{background:f}={}}={}}=Km(),y=bS(n),_=f&&"base"!==f?"accent":"auto",b=gS(i,function(e){return SS(e)?e:void 0}(a)),k=g??"extraSmall",P=function(e){switch(e){case"none":return"none";case"base":return"base";case"large":case"large100":return"large";case"large200":return"large-200";default:return}}(m)??kS(y),{className:S}=$m({boxShadow:k}),{className:w}=$m({objectFit:p,borderWidth:P});return d("div",{className:v(vS.ProductThumbnail,vS.thumbnailBackgroundVariant[c],vS.productThumbnailSizeVariant[y],S,"none"!==k&&vS.boxShadowMargin,null!=t&&vS.depthVariant[t],vS.borderRadiusVariant[y.startsWith("small")?"small":"base"]),children:[i||SS(a)?d(mS,{condition:Boolean(b),children:[b,d("img",{src:i??fS(a),srcSet:o,sizes:r,alt:e,loading:"eager",className:v(vS.ProductThumbnailImage,vS.borderVariant[u],vS.borderColorVariant[h],w)})]}):d("div",{className:v(vS.Placeholder,vS.borderVariant[u],vS.borderColorVariant[h],w),children:d(lh,{type:"image",size:PS(y)})}),void 0!==l&&d("div",{className:v(vS.Overlay,vS.borderVariant[u],vS.borderColorVariant[h]),children:d("strong",{children:l})}),void 0===s?null:d(CS,{size:y,tone:_,children:s})]})}function bS(e){if("string"!=typeof e)return"base";const t=e.replace("-100","");return t in yS?t:"base"}function kS(e){return e.startsWith("small")?"base":"large"}function PS(e){return e.startsWith("small")?"small":e.startsWith("large")?"large":"base"}function SS(e){return"string"==typeof e||Da(e)}function wS(e){const{boxSize:t}=yS[bS(e)];return{blockSize:t,inlineSize:t}}function CS({children:e,size:t,tone:n}){const r=Ju(),a="accent"===n?n:"auto",{className:i}=$m({borderWidth:kS(t)});return d("div",{className:vS.BadgeWrapper,children:d("div",{className:v(vS.Badge,vS.badgeSizeVariant[t.startsWith("small")?"small":"base"],vS.badgeToneVariant[a],i),children:[d("span",{className:vS.visuallyHidden,children:r("productThumbnailQuantityLabel")}),e]})})}const ES=function(e){let n=0,r=!0;const o=new Set;return function(){const[l,c]=s(()=>{if(0===n)return 0;const t=performance.now()-n;return t{for(const e of o)e(!1)},[]),f=t(()=>{for(const e of o)e(!0)},[]),y=t(()=>{g(),h(!0)},[g]);a(()=>{m&&f()},[m,f]);const v=t(e=>{o.add(d);const t=e.timeStamp-n;c(t)},[]),_=t(t=>{n=t.timeStamp,o.add(d),r&&(r=!1,p.current=setTimeout(y,e))},[y]);return a(()=>(o.add(d),()=>{o.delete(d),p.current&&clearTimeout(p.current)}),[]),{animationEnabled:u,delay:l,onAnimationStart:v,onAnimationIteration:_}}}(4e3);var xS="var(--_1sg44lm0)",IS="var(--_1sg44lm1)",AS="var(--_1sg44lm2)";function TS({contentDisplay:e="inline",aspectRatio:t,inlineSize:n,blockSize:r,children:i,id:o,delay:l=!0}){const c="inline"===e?"span":"div",{className:u,style:p}=$m({blockSize:r,inlineSize:n},{transforms:{inlineSize:e=>dd(e,{fitContent:!0,auto:!0})}}),[m,h]=s(l);a(()=>{const e=setTimeout(()=>h(!1),100);return()=>{clearTimeout(e)}},[]);const{animationEnabled:g,delay:f,onAnimationStart:y,onAnimationIteration:_}=ES();return d(c,{className:v("_1sg44lm4 _1sg44lm3 _1fragemvo _1fragem12k _1fragem12f _1fragem12r","inline"===e&&"_1sg44lm7",m&&"_1sg44lm8",g&&"_1sg44lm6",u),style:{...k({[AS]:t?.toString()??"",[xS]:`${f}ms`,[IS]:"4000ms"}),...p},"aria-hidden":"true",onAnimationStart:y,onAnimationIteration:_,id:o,children:d(c,{className:v("_1sg44lma _1sg44lm9 _1fragemvo",u),style:p,children:i})})}const LS=new Map([["small","10ch"],["base","20ch"],["large","30ch"]]);function RS({children:e,delay:t,inlineSize:n,id:r,...a}){return d(kf,{...a,children:d(TS,{delay:t,inlineSize:LS.get(n??"small"),id:r,children:e})})}function MS({width:e}){const{header:{logo:t}}=jy(),{shop:n}=oe(),{width:r,height:a}=function(e,t,n){const r=n??1;let a,i;return e?(a=e,i=e/r):t&&(a=t,i=t/r),void 0!==n&&void 0!==a&&void 0!==i&&i>300&&(a*=300/i,i=300),{width:a,height:i}}(t?.maxWidth,e,t?.aspectRatio);return d("img",{alt:t?.altText||n.name,className:"gP50U",src:t?.image,width:r,height:a})}const NS=f(void 0);function DS({children:e,style:t,insetsRows:n}){const{rendered:a,rowsInset:i}=h(NS)??{},o=r(()=>({pending:t,pendingInsetsRows:n,rendered:a,rowsInset:i}),[t,n,a,i]);return d(NS.Provider,{value:o,children:e})}function zS({children:e,rowsInset:t}){const{pending:n}=h(NS)??{},a=r(()=>({pending:void 0,rendered:n,rowsInset:t}),[n,t]);return d(NS.Provider,{value:a,children:e})}function OS(){return h(NS)??{}}function BS(){return h(Iv)}function FS({currentDetour:e}){return"thankYou"===e?.type?"ORDER_STATUS1":"INFORMATION1"}function VS(e,t,n,r,a){return null==e?()=>!1:Ua(fr(e.features,t),n,r,a)}const US=f([]),qS=f({deactivatedExtensionIds:new Set,addDeactivatedExtension:()=>{}}),jS=f(null);function HS(e,t,...[n]){const{checkout:{extensibility:a}}=oe(),i=function(){const{deactivatedExtensionIds:e}=GS(),{currentPage:t,currentDetour:n}=tc().value,{source:a,checkout:{negotiator:i}}=oe(),o=BS(),s=i.current.peek();return r(()=>function({page:e,negotiatedState:t,deactivatedExtensionIds:n,detour:r,placementReferences:a,sourceType:i}){const o=e&&Hl(e,t),s=e&&new Set([...En,...wn]),l=r&&$l(r),c=r&&function(e){const t=Lv.get(e.type)??[];return new Set(t)}(r),u="thankYou"===r?.type,d=l??o??new Set,p=c??s??new Set;return t=>{const{id:o,extensionPoint:s,placementReference:l}=t;if(n.has(o))return!1;if(!Ba(t,{sourceType:i,isThankYou:u}))return!1;const c=Fa(s.target);if(null==c)return!1;if((e||r)&&!d.has(c))return!1;if(Va(c)){if(!l)return!1;if(!a.supported.has(l))return!1;if((e||r)&&!p.has(l))return!1}return!0}}({page:t,negotiatedState:s,deactivatedExtensionIds:e,detour:n,placementReferences:o,sourceType:a.type}),[n,t,e,s,o,a.type])}(),o=h(jS),s=BS();return r(()=>{const r=Va(t)&&n?{target:t,placements:s,placementReference:n}:{target:t};return e.filter(e=>null===o||o.has(ja(e.extensionPoint.target))).filter(e=>a.ui.unstable_isTargetMatch(e,r)).filter(i)},[i,o,e,t,n,s,a])}function $S(e,...[t]){const{checkout:{extensibility:n},shop:a}=oe(),o=a.hasFlagEnabled(qa),s=BS(),l=i([]),c=h(US),u=HS([...n.ui.search().value,...c],e,t),d=r(()=>{if(o)return n.customFields.search(Va(e)&&t?{target:e,placements:s,placementReference:t}:{target:e})},[n,o,e,t,s]),p=d?.value,m=r(()=>(p??[]).map(e=>Ha("customField",e)),[p]),g=r(()=>$a([...u.map(e=>Ha("uiExtension",e)),...m]),[u,m]);return n.ui.enabled.value?g.length>0?g:l.current:m.length>0?m:l.current}function YS(e,n){const r=JS();return t(t=>{const[a]=e;if(!a)return Promise.resolve(void 0);const i=r.get(a,n);return Promise.resolve(i.run(t))},[r,e,n])}function WS(e,t){const{checkout:{extensibility:n}}=oe(),a=i([]),o=HS([...t,...h(US)],e),s=r(()=>o.map(e=>Ha("uiExtension",e)),[o]);return n.ui.required.value&&!n.ui.enabled.value?a.current:s}function GS(){return h(qS)}const KS=f({get:()=>{},findAll:()=>[],blockingExtensions:P(()=>[])});function JS(){return h(KS)}function QS({visibleTargets:e,children:t}){const n=r(()=>new Set(e),[e]);return d(jS.Provider,{value:n,children:t})}function XS(e){return Array.from(e.labels||[]).map(e=>e.textContent).join("")}function ZS(e){return e instanceof HTMLInputElement&&("checkbox"===e.type||"radio"===e.type)?e.checked.toString():e.value}const ew={screenX:0,screenY:0,pageX:0,pageY:0,offsetX:0,offsetY:0,movementX:0,movementY:0,clientX:0,clientY:0},tw=Object.keys(ew),nw=f(null);function rw(){const e=h(nw);return t(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 aw({section:e,children:t}){if("undefined"==typeof window)return d("div",{children:t});const n=mg(),a=i(null),o=r(()=>new WeakMap,[]),s=i(null);function l(t){const r=t.target.closest("a, button, input, select");if(!r)return;if(s.current===r)return;s.current=r;const{element:a,shouldCaptureEvent:i}=iw(r,e,o);i&&n("dom_input_focused",{element:a,timestamp:new Date})}return gg(a,e=>l({target:e})),d(nw.Provider,{value:o,children:d("div",{ref:a,onFocusCapture:l,onBlurCapture:function(t){const r=t.target.closest("a, button, input, select");if(!r)return;s.current===r&&(s.current=null);const{element:a,shouldCaptureEvent:i}=iw(r,e,o);i&&n("dom_input_blurred",{element:a,timestamp:new Date})},onClickCapture:function(t){const r=t.target;if(!(r instanceof Element))return;const a=r.closest("a, button"),i=r.closest("input, select"),s=a??i;if(!(s||r instanceof HTMLElement))return;const{element:l,shouldCaptureEvent:c}=iw(s??r,e,o);c&&n("dom_clicked",{element:l,...ew,...rt(t.nativeEvent,tw),timestamp:new Date})},onChangeCapture:function(t){const r=t.target?.closest("a, button, input, select");if(!r)return;const{element:a,shouldCaptureEvent:i}=iw(r,e,o);i&&n("dom_input_changed",{element:a,timestamp:new Date})},children:t})})}function iw(e,t,n){const r=e instanceof HTMLAnchorElement||e instanceof HTMLButtonElement||e instanceof HTMLInputElement||e instanceof HTMLSelectElement;let a=null;a=r?e.type:null;let i=`${t}_`,o=null,s=null;r&&"href"in e&&(s=e.href);let l=!0;if(e instanceof HTMLInputElement&&"radio"===e.type)i+=e.name.replace(/[A-Z]/g,(e,t)=>`${0===t?"":"_"}${e.toLowerCase()}`),o=e.id.slice(e.id.lastIndexOf("-")+1).toLowerCase();else if(e instanceof HTMLInputElement||e instanceof HTMLSelectElement)i+=e.name.replace(/[A-Z]/g,(e,t)=>`${0===t?"":"_"}${e.toLowerCase()}`),o=ZS(e);else{const t=ow(e,n);t?i+=t:l=!1}return i=i.replace(/-/g,"_"),{element:{id:i,tagName:e.tagName,type:a,value:o,...s&&{href:s},name:null},shouldCaptureEvent:l}}function ow(e,t){if(null!==e&&null!==t)return t.has(e)?t.get(e):ow(e.parentElement,t)}function sw({section:e,children:t}){if("undefined"==typeof window)return d("div",{children:t});const{checkout:{identity:n,journey:r},router:a,shopPay:o}=oe(),s=a.currentUrl.value,{currentFocus:l}=tc().value,c=mg(),u=Ng(),p=fg(),m=i(null),h=i(new WeakMap),g=Ya(s,{isShopPayActive:"shopPay"===n.current.value,shopPay:o});function f(t,{recoveredAutofocus:n=!1}={}){const a=l.peek();r.setCurrentFocus(e),!n&&(t.target instanceof HTMLInputElement||t.target instanceof HTMLSelectElement)&&h.current.set(t.target,ZS(t.target)),!n&&t.target instanceof HTMLInputElement&&"email"!==t.target.name&&p(g),a!==e&&(c("sectionInteraction",{section:e,timestamp:new Date}),u({type:"section_interaction",section:e}))}return gg(m,e=>f({target:e},{recoveredAutofocus:!0})),d("div",{ref:m,onFocusCapture:f,onBlurCapture:function(t){if(t.target instanceof HTMLInputElement||t.target instanceof HTMLSelectElement){const n=h.current.get(t.target),r=ZS(t.target);h.current.delete(t.target),p(g),n!==r&&function(t){const{name:n,tagName:r,type:a}=t,i=XS(t);c("change",{element:{...i&&{label:i},...n&&{name:n},tagName:r,type:a,value:ZS(t)},section:e,timestamp:new Date})}(t.target)}},onClickCapture:function(t){if(!(t.target instanceof Element))return;const n=t.target.closest("a, button"),r=t.target.closest("input, select");if((n??r)&&n){const{tagName:t,textContent:r,id:a}=n,i=(r??"").trim(),o=n.dataset.eventName||i||a;p(g),c("click",{element:{tagName:t,textContent:o??void 0},section:e,timestamp:new Date})}},onKeyUpCapture:function(e){e.target instanceof HTMLInputElement&&p(g)},onChangeCapture:function(t){if(t.target instanceof HTMLInputElement||t.target instanceof HTMLSelectElement){const{id:n,name:r,tagName:a,type:i}=t.target;let o=XS(t.target);0===o.length&&(o=n);const s=function(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"}}(t);s&&c("autofill",{source:s,element:{...o&&{label:o},...r&&{name:r},tagName:a,type:i,value:ZS(t.target)},timestamp:new Date,section:e})}},children:t})}function lw(){const{environment:{hasBlockingScreen:e}}=jy();return(void 0!==(t=e)?()=>t:()=>function(){const e=tc(),{checkout:t}=oe();return n(()=>Boolean(e.value.currentDetour)||t.negotiator.context.noAddressLocationModalShownSignal.value)}().value)();var t}function cw(){const e=Xh(),t=lw();return e&&!t}function uw(){const{checkout:e,router:t}=oe();return n(()=>e.thankYouEntrance.isRevealing.value&&t.currentUrlMatches("/thank-you"))}function dw(){const{checkout:e,client:t,router:r}=oe(),a=Xh(),i=Jg(),o=jl(t.initialRequest.url.pathname).endsWith("/thank-you"),s=a&&!i&&!o;return n(()=>s&&"settled"!==e.thankYouEntrance.phase.value&&r.currentUrlMatches("/thank-you"))}const pw={Shell:"cm5pp","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:"gdtca",MainContentPrimary:"djSdi",Footer:"NGRNe","Shell-blockSizeAppLayout":"u5Gkx","Shell-minMobileViewportSize":"KIB4Y","Shell-embeddedUc":"bU4kN","Shell-embeddedUcMainPadding":"ENVeW","Shell-embeddedUcHasOrderSummary4Extensions":"_73ZDy",Banner:"_1Eo4p",Announcement:"_5gERx","Announcement-openTransitionEntered":"_0FhCb","Announcement-opened":"bMbg6",AnnouncementContainer:"mpQwN",AnnouncementContent:"gYnYi","Announcement-expanded":"yJIUK",AnnouncementActionButtons:"uB1DX",AnnouncementExpandCollapseButton:"Lhk39",AnnouncementCloseButton:"GxFSO",AnnouncementOverlay:"eqp7i","Announcement-hasOverflow":"X3qgz","Announcement-hasActiveInspector":"rZH98",Header:"EAjaz","Shell-hasAnnouncement":"_96Hty","Shell-announcementOpen":"ck07C","Header-positionStart":"_8wrz5",HeaderContent:"i8Dpn","Header-containerContent":"ObllD","Header-positionInline":"Xx7bI","Header-positionInlineSecondary":"oZoJd","Shell-exiting":"aLUb3","Header-thankYouCovered":"Gm2ml","Header-hasBackgroundImage":"zKcpW",BuyerJourney:"lX75M",BuyerJourneyContent:"_0DLUq","BuyerJourney-containerContent":"hKv1l",Disclosure:"nMPKH",DisclosureButton:"WtpiW",DisclosureDetails:"ks0CH",DisclosureDetailsContent:"GRdxR","Disclosure-divided":"iYA3J",Content:"Sxi8I","Content-containerContent":"vzM2m",Main:"_9F1Rf","Main-inlineSizeFill":"DGMLl","Main-divided":"GI5Fn","slide-from-left":"Fv5RP","slide-from-right":"dQ3Wi",OrderSummary:"i4DWM",OrderSummaryContent:"_4QenE","OrderSummary-inlineSizeFill":"LEmIb",FooterContent:"QiTI2","Footer-positionEnd":"fw2Yt","Footer-containerContent":"dmTNG","Footer-divided":"GTe1e"},mw={ThankYouInterstitialShell:"szW4X",ThankYouInterstitialOverlay:"sMSRq",ThankYouInterstitialHeader:"_3Ebqn",ThankYouEntranceDisclosure:"F6Nrx",ThankYouEntranceOrderSummary:"j1xD4",ThankYouEntranceFooter:"RDtb7",ThankYouEntrance:"ZXaI9",ThankYouEntranceStatus:"sEWAT",ThankYouEntranceHeading:"DTABr",ThankYouEntranceCards:"kBVzA",ThankYouEntranceActions:"qgQOk",ThankYouEntranceAvatar:"gJgp9",ThankYouEntranceBeat:"SBffw","ThankYouEntranceAvatar-covered":"_8nmXh"};function hw({header:e,children:t}){const{orderSummary:{colorScheme:n="scheme2",inlineSize:a,backgroundImage:i,section:o}={}}=jy(),{checkout:s}=oe(),l=r(()=>({current:n}),[n]),c=cw(),u=uw();if(!uS(t)&&!uS(e))return null;const p=i?{backgroundImage:`url(${JSON.stringify(i)})`}:void 0;return d("div",{className:v(pw.OrderSummary,"fill"===a&&pw["OrderSummary-inlineSizeFill"],c&&"LCUka",Ce({colorLayer:"base",colorScheme:n,backgroundColor:"baseSpecified"})),style:p,"data-inspector-id":"orderSummary",children:d("div",{className:pw.OrderSummaryContent,children:d(Kp.Provider,{value:l,children:d(fu,{children:[e,s.checkoutExit.isExiting.value?null:d(DS,{style:o,children:d("aside",{className:v(pw.OrderSummaryContentPrimary,c&&"OcTba",u.value&&mw.ThankYouEntranceOrderSummary),children:d(sw,{section:"summary",children:d(aw,{section:"summary",children:t})})})})]})})})})}function gw({children:e,position:t}){const{header:{container:n="fill",colorScheme:r,banner:a,background:i,divided:o}={}}=jy(),s=dw(),l=cw();if(!uS(e))return null;const c=o??"start"===t;return d("header",{className:v(pw.Header,mw.ThankYouInterstitialHeader,pw[$("Header-position",t)],pw[$("Header-container",n)],c&&pw["Header-divided"],a?.image&&pw["Header-hasBackgroundImage"],s.value&&pw["Header-thankYouCovered"],l&&"inlineSecondary"===t&&"LRXpG","start"===t&&Ce({backgroundColor:"subdued"===i?"subdued":"baseSpecified",colorLayer:"base",colorScheme:r})),"data-inspector-id":"header",children:d("div",{className:pw.HeaderContent,children:d(fu,{children:d(sw,{section:"header",children:d(aw,{section:"header",children:e})})})})})}function fw(){const{shopPay:e,embed:t,mobileCheckoutSdk:n,checkout:{identity:r}}=oe(),a=e.app.config,i=Boolean(t?.isCheckoutKit()||t&&"shopPay"!==r.current.value)||n.enabled||Wa(a);return{isAppLayout:i,isWebLayout:!i}}var yw={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 vw=Qm(function({source:e,src:t,srcSet:n,sizes:r,alt:i="",objectFit:o="contain",loading:l="eager",aspectRatio:c="1/1",accessibilityRole:u="img",border:p="none",borderRadius:m="none",borderStyle:h,borderWidth:g,className:f,id:y,inlineSize:_="fill",onError:b,onLoad:P}){const S=["presentation","none"].includes(u),{className:w}=$m({...Ne({border:p,borderStyle:h,borderWidth:g}),borderRadius:m,objectFit:o}),C=gS(t,e),E=!(t||e||n),x=t??fS(e)??n??"data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",[I,A]=s(E);a(()=>{if(!E)return void A(!1);const e=setTimeout(()=>A(!1),100);return()=>{clearTimeout(e)}},[E]);const{animationEnabled:T,delay:L,onAnimationStart:R,onAnimationIteration:M}=ES(),N=b?{onError:e=>b(e.nativeEvent)}:{},D=P?{onLoad:e=>P(e.nativeEvent)}:{};return d(_w,{condition:S,children:d(bw,{condition:"auto"!==_,aspectRatio:c,children:d(mS,{condition:Boolean(C),children:[C,d("img",{...N,...D,src:x,srcSet:n,sizes:r,className:v(yw.Image,yw.inlineSizeVariant[_],E&&T&&yw.skeleton,E&&I&&yw.hidden,w,f),style:{...k({[yw.vars.animationDelay]:`${L}ms`,[yw.vars.animationDuration]:"4000ms"})},onAnimationStart:R,onAnimationIteration:M,loading:l,id:y,role:S?u:void 0,alt:S?"":i,"aria-hidden":E?"true":void 0})]})})})});function _w({children:e,condition:t}){return t?d(hf,{accessibilityVisibility:"hidden",children:e}):d(y,{children:e})}function bw({children:e,condition:t,aspectRatio:n}){const r=function(e){if("number"==typeof e)return e;if(null==e||"string"!=typeof e||"auto"===e)return;if(e.includes("/")){const t=0,[n,r]=e.split("/").map(e=>{const t=Number(e);return isNaN(t)||""===e.trim()?void 0:t});if(void 0!==n&&n>t&&void 0!==r&&r>t)return n/r}const t=Number(e);return isNaN(t)?void 0:t}(n);return t&&void 0!==r?d("div",{className:v(yw.Wrapper,yw.aspectRatio),style:k({[yw.aspectRatioVar]:`${r}`}),children:e}):d(y,{children:e})}var kw=(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))(kw||{});const Pw={[kw.Unavailable]:{isAddressProblem:!1,isUnpurchasable:!0},[kw.UnpurchasableB2B]:{isAddressProblem:!1,isUnpurchasable:!0},[kw.Unpurchasable]:{isAddressProblem:!1,isUnpurchasable:!0},[kw.OutOfStock]:{isAddressProblem:!1,isUnpurchasable:!1},[kw.QuantityChange]:{isAddressProblem:!1,isUnpurchasable:!1},[kw.PriceChange]:{isAddressProblem:!1,isUnpurchasable:!1},[kw.Unshippable]:{isAddressProblem:!0,isUnpurchasable:!1},[kw.Unfulfillable]:{isAddressProblem:!0,isUnpurchasable:!1},[kw.Unknown]:{isAddressProblem:!1,isUnpurchasable:!1}};function Sw(e){return Pw[e].isAddressProblem}function ww(e){return Pw[e].isUnpurchasable}function Cw(){const{negotiate:e}=nc(),{observability:n,checkout:{negotiator:r}}=oe(),a=r.parts.merchandiseLines,i=r.current.fields.merchandiseLines,o=t(e=>{const t=a.value;a.value=t.filter(({stableId:t})=>!e.includes(t))},[a]);return t(async t=>{const r=new Map((i.value?.lines??[]).map(e=>[e.stableId,e])),a=t.reduce((e,{problem:t,line:n})=>{if(Sw(t.type))return e;const a=r.get(n.stableId);return(!a||0===a.quantity||ww(t.type))&&e.push(n.stableId),e},[]);try{a.length>0&&(o(a),await e({}))}catch(s){n.leaveErrorBreadcrumb("Failure to update merchandise lines when handling out-of-stock items",{error:s,unavailableMerchandiseIds:a})}},[i,o,e,n])}function Ew(e){const t=function(e){return e.some(e=>Wt.has(e.code))}(e),n=function(e){return e.some(e=>Gt.has(e.code))}(e),r=function(e){return e.some(e=>Kt.has(e.code))}(e),a=vy(e),i=_y(e),o=fy(e),s=function(e){return e.some(e=>qt.has(e.code))}(e),l=[t,n,r,a].filter(Boolean).length>1;return o||l?s?kw.QuantityChange:kw.OutOfStock:t?kw.Unavailable:n?kw.UnpurchasableB2B:r?kw.Unpurchasable:a?kw.Unshippable:i?kw.Unfulfillable:s?kw.QuantityChange:kw.Unknown}function xw(e){const{proposed:t,negotiated:n}=e;return t?.itemPrice?.amount!==n?.itemPrice?.amount}function Iw(e){return e.stableId}const Aw=/^\$.merchandise.merchandiseLines\[(\d+)\]$/;function Tw(e,t){const n=Lw(t);if(null!=n)return e[n]}function Lw(e){const t=Aw.exec(e);if(null==t?.[1])return;const n=parseInt(t[1],10);return isNaN(n)?void 0:n}function Rw(e,t,n){const r=new Set;for(const a of t){if(!n(a)||!("target"in a))continue;const t=Tw(e,a.target);t?.stableId&&r.add(t.stableId)}return r}function Mw(e,t=[]){return Rw(e,t,e=>vy([e])||_y([e]))}function Nw(e,t=[]){for(const n of t)if(n.targetMerchandiseLines?.some(({stableId:t})=>e.includes(t))&&"available"===n.status){const e=n.methods.find(({handle:e})=>e===n.selectedDeliveryMethodHandle);if(e?.title)return e.title;continue}return null}function Dw(e,t,n,r){const a=function(e,t){return[...new Set([...e.map(Iw),...t.map(Iw)])].map(n=>({proposed:e.find(e=>e.stableId===n),negotiated:t.find(e=>e.stableId===n)}))}(e,t);if(r)return Ow(a.filter(r));const i=Mw(e,n??[]),o=function(e,t=[]){return Rw(e,t,e=>"MERCHANDISE_OUT_OF_STOCK"===e.code)}(e,n??[]);return Ow(a.filter(e=>{if(function(e){const{proposed:t,negotiated:n}=e;return t?.quantity!==n?.quantity}(e))return!0;const t=(e.negotiated||e.proposed)?.stableId;return i.has(t)||o.has(t)}))}function zw(e,t,n){const r=e.filter(e=>function(e){return["AcceptNewTermViolation","ApplyChangeViolation","RemoveTermViolation","UnprocessableTermViolation","UnresolvableTermViolation"].includes(e.__typename)}(e)&&n.includes(e.code)).map(e=>Tw(t?.lines,e.target)).filter(e=>void 0!==e);return 0===r.length?null:Array.from(new Map(r.map(e=>[e.stableId,e])).values())}function Ow(e){return e.flatMap(e=>Ga(e.proposed)||null==e.proposed?[e]:e.negotiated?[{proposed:void 0,negotiated:e.negotiated}]:[])}function Bw(e){return e.quantity>0}function Fw(e){return ww(e)?e:kw.OutOfStock}function Vw(){const{checkout:e}=oe(),{value:t=[]}=e.negotiator.current.fields.allViolations,{value:n}=e.negotiator.current.fields.merchandiseLines,a=sn("merchandiseLines").value,i=e.negotiator.parts.merchandiseLines.value,o=r(()=>n?.lines??[],[n]),l=e.proposal.negotiated.fields.canUpdateMerchandise.value??!0,[c]=s(()=>Ew(t)),[u]=s(i),d=r(()=>Mw(u,t),[u,t]),p=r(()=>Dw(u,o,t).map(e=>function(e,t,n){const{proposed:r,negotiated:a}=e,i=function(e,t){if(t?.quantity&&t?.quantity>0&&t?.quantity!==e?.quantity)return{type:kw.QuantityChange,negotiatedQuantity:t.quantity,proposedQuantity:e?.quantity}}(r,a),o=function(e,t){if(t?.itemPrice?.amount&&e?.itemPrice?.amount!==t?.itemPrice?.amount)return{type:kw.PriceChange,negotiatedPrice:t?.itemPrice,proposedPrice:e?.itemPrice}}(r,a),s=function(e,t,n){if(!n&&t)return{type:Fw(e)}}(t,r,a),l=r??a;return n.has(l.stableId)?{line:l,problem:{type:t===kw.Unfulfillable?kw.Unfulfillable:kw.Unshippable}}:0===a?.quantity?{line:l,problem:{type:Fw(t)}}:o?{line:l,problem:o}:i?{line:l,problem:i}:s?{line:l,problem:s}:{line:l,problem:{type:kw.OutOfStock}}}(e,c,d)),[u,o,t,c,d]),m=o.filter(({stableId:e})=>!d.has(e)).some(Bw)&&l,h=!m,g=u.some(e=>{const t=o.find(({stableId:t})=>t===e.stableId);return!t||0===t.quantity||d.has(e.stableId)});return{type:c,lineItems:p,loading:a,cartEmpty:h,hasLineItemsLeftInCart:m,hasUnavailableMerchandise:g,unshippableMerchandiseIds:d}}function Uw({width:e}){const{header:{logo:t}}=jy(),{embed:n,i18n:r,shop:a,shopPay:i,source:o,url:s,router:l}=oe(),c=Jg(),u=rw(),{isAppLayout:p}=fw(),m=pP(),{brandSettings:h}=a,{lineItems:g}=Vw(),f=Cw();if(i.visibility.showShopPayBrandedLogo||rr(l.currentUrl.value.search))return d("img",{src:"/cdn/shopifycloud/checkout-web/assets/c1/assets/ShopLogo.3uo8wELJ.svg",height:30,width:72,alt:""});let y=d("span",{className:"pJt3c",children:d(fu,{level:1,children:d(CP,{level:1,accessibilityRole:"presentation",display:"inline",children:a.name})})});n?.isFlagshipPartner?y=d(Lf,{direction:"inline",gap:"small-200",alignItems:"center",children:[h?.squareLogo?.url&&d(vw,{alt:h.squareLogo.altText||a.name,src:h.squareLogo.url,className:"yfbTW",borderRadius:"base",inlineSize:"auto"}),y]}):t?.image&&(y=d(MS,{width:e}));const v="simulated"!==o.type&&!Mn(o)&&!p&&!n;if(!a.hasStorefront||!v&&!c)return y;const _=a.previewReturnUrl?a.previewReturnUrl:void 0,b=a.partnerStorefrontUrl&&!c?a.partnerStorefrontUrl:void 0,k=_??t?.link??b??o.headerLogoUrl??s.storefront(),P=r.translate("editor.navigation.store_logo_accessibility_label"),S=d("span",{ref:u("logo"),children:d(Af,{href:k,tone:"monochrome",textDecoration:"none",onClick:async()=>{c?m.includes(k)&&l.navigate(e=>{const t=new URL(e);return t.searchParams.set("ce_redirect",k),t}):g.length>0&&await f(g)},display:"block",children:[y,d(kf,{accessibilityVisibility:"exclusive",children:P})]})});return t?.image&&t?.maxWidth?d(hf,{maxInlineSize:`${t.maxWidth}px`,children:S}):S}function qw(e){return`error-for-${e}`}function jw({children:e,controlID:t,type:n}){return"warning"===n?d(nh,{id:t?qw(t):void 0,gridAutoFlow:"column",gridTemplateColumns:"minmax(auto, max-content) minmax(0, 1fr)",gridTemplateRows:"minmax(0, 1fr)",gap:"small-300",children:[d("div",{className:"ksaxnz1 _1fragem19 _1fragemcn _1fragem4v _1fragem6t",children:d(lh,{type:"info"})}),d(kf,{children:e})]}):d("div",{className:"ksaxnz0 _1fragemxr",id:t?qw(t):void 0,children:e})}var Hw={Checkbox:"_1mmswk94 _1mmswk93 _1fragemws _1fragemyo",Details:"_1mmswk9s",Error:"_1mmswk9l",Icon:"_1mmswk9n _1mmswk9m _1fragem11z _1fragem11k _1fragemwi _1fragem12d _1fragem12t _1fragem12j",Input:"_1mmswk98 _1mmswk97 _1fragemzq _1fragemzo _1fragemzs _1fragemzm _1fragemk5 _1fragemjl _1fragemkp _1fragemj1 _1fragemm8 _1fragemlo _1fragemms _1frageml4 _1fragemyk _1fragem133 _1fragem5u _1fragemzf _1fragem4q _1fragem12j _1fragem12d _1fragem12q",Label:"_1mmswk9g _1mmswk9f _1fragem5u _1fragemvo _1fragemtb",Wrapper:"_1mmswk96 _1mmswk95 _1fragemws _1fragem64",colorLayerControl:"_1mmswk99 _1fragemy6",inputStateVariant:{default:"_1mmswk9d _1mmswk9b _1fragemyd",disabled:"_1mmswk9e _1mmswk9c _1fragem11v _1fragem11z _1fragemyb"},inputError:"_1mmswk9a",labelAndDetailsStateVariant:{default:"_1mmswk9j _1mmswk9h _1fragemyd",disabled:"_1mmswk9k _1mmswk9i _1fragem11v _1fragemyb"},accessibilityVisibilityVariant:{visible:"_1mmswk9p",exclusive:"_1mmswk9q _1mmswk9o _1fragem121"},inert:"_1mmswk9r _1fragemz0"};const $w=qc("Checkbox"),Yw=ym(_(function({accessibilityLabel:e,disabled:t,error:n,id:r,label:a,name:i,details:o,...s},l){const c=jc(r,$w),u=wd(),p="string"==typeof n&&Boolean(n.trim())&&d("div",{className:Hw.Error,children:d(jw,{controlID:c,children:n})}),m=v(Hw.Label,Hw.labelAndDetailsStateVariant[t||u?"disabled":"default"],u&&Hw.inert),h=("string"==typeof a||uS(a))&&d("label",{htmlFor:c,className:m,children:a}),g="string"==typeof o||uS(o),f=g?`${c}-details`:void 0,y=v(Hw.Details,Hw.labelAndDetailsStateVariant[t||u?"disabled":"default"],u&&Hw.inert),_=g&&d("div",{id:f,className:y,children:o});return d("div",{children:[d("div",{className:Hw.Wrapper,children:[d(Ww,{id:c,name:i,error:Boolean(n),accessibilityLabel:e,disabled:t,ref:l,ariaDescribedBy:f,...s}),h]}),_,p]})}),{commands:{clipboard:!1,overlay:!1}}),Ww=_(function({accessibilityLabel:e,checked:t,colorLayer:n,disabled:r,error:a=!1,id:i,name:o,onChange:s,required:l,value:c,accessibilityVisibility:u,ariaDescribedBy:p,command:m,commandFor:h,...g},f){const y=wd(),_=Op(f,af({active:a})),b="inherit"!==n,k=v(Hw.Input,a&&Hw.inputError,Hw.inputStateVariant[r||y?"disabled":"default"],y&&Hw.inert);return d("div",{className:v(Hw.Checkbox,b&&Hw.colorLayerControl,u&&Hw.accessibilityVisibilityVariant[u]),children:[d("input",{type:"checkbox",id:i,name:o,checked:t,value:c,disabled:r,onChange:({currentTarget:e})=>{"function"==typeof s&&s(e.checked)},className:k,"aria-describedby":[p,a&&qw(i)].filter(Boolean).join(" ")||void 0,"aria-label":e||void 0,"aria-hidden":!!y||void 0,"aria-invalid":a||void 0,tabIndex:y?-1:void 0,ref:_,required:l,...g}),d("div",{className:Hw.Icon,children:d(lh,{type:"check",size:"small-200"})})]})}),Gw="gid://shopify/App/580111";function Kw(e,t){return e.namespace.toLowerCase()===t.namespace.toLowerCase()&&e.key.toLowerCase()===t.key.toLowerCase()}function Jw(e,t){const{namespace:n,key:r}=e.update??e.delete??{};return null!=n&&null!=r&&Kw({namespace:n,key:r},t)}function Qw(e,t){return e?.find(e=>Kw(e,t))?.value}function Xw(e,t){let n=-1;for(const[r,a]of e.entries())Jw(a,t)&&(n=r);return n}function Zw({key:e,label:n,required:a},{type:s,validate:l=()=>{}}){const{checkout:{proposal:c},i18n:u}=oe(),d=nc(),p=Ja(e),m=Qa(),h=function({namespace:e,key:t,type:n}){const{checkout:{proposal:a}}=oe(),i=a.proposed.cartMetafields,o=a.negotiated.fields.cartMetafields;return r(()=>{const r={namespace:e,key:t,type:n};return new Ka(P(()=>function(e,t){const n=e[Xw(e,t)];if(n)return n.delete?"":n.update?.value}(i.value,r)??Qw(o.value,r)??""),e=>{i.value=function(e,t,n){const{namespace:r,key:a,type:i}=t,o=""===n.trim()?{delete:{appId:Gw,namespace:r,key:a}}:{update:{appId:Gw,namespace:r,key:a,type:i,value:n}},s=Xw(e,t);return-1===s?[...e,o]:e.map((e,t)=>t===s?o:e)}(i.peek(),r,e)})},[t,e,o,i,n])}({...p,type:s}),g=i(),{handleViolations:f}=function(e,n){const{checkout:{negotiator:r}}=oe(),{customFields:a}=r.current.fields,{lastJourneyProgression:i}=r,s=t(t=>{const r=function(e,t,n){const r=t?.findIndex(e=>e.key===n)??-1;if(-1===r)return;const a=`$.customFields[${r}]`;return e.find(e=>"UnprocessableTermViolation"===e.__typename&&e.code.startsWith("CUSTOM_FIELD")&&e.target===a)}(t,a.value,e);r&&!n.value&&(n.value=r.localizedMessage||r.nonLocalizedMessage)},[a,n,e]);return S(()=>{const e=i.value;"error"===e.type&&"negotiation"!==e.negotiationStage&&o(()=>s(e.violations))}),{handleViolations:t(e=>{"error"===e.status&&s(e.violations)},[s])}}(e,m);Xa(h,m,l,Jt.InvalidCustomFieldValue);const y=a.value;return{value:h,error:m,fieldProps:{label:y?n.value:u.translate("custom_field.label",{label:n.value}),name:e,required:y},negotiate:()=>{const e=h.peek();e!==(g.current??Qw(c.negotiated.fields.cartMetafields.peek(),p)??"")&&!m.peek()&&(g.current=e,d.negotiate({fieldsToResolve:["cartMetafields","customFields"],silenceViolations:[...Vn],onComplete:f}))}}}function eC({field:{description:e,heading:t,key:n},children:r}){const a=e.value;return d(Lf,{gap:"small-100","data-inspector-id":n,"data-inspector-kind":"customField",children:[t.value?d(CP,{children:t}):null,a?d(kf,{color:"subdued",children:a}):null,r]})}function tC({field:e}){const{value:t,error:n,fieldProps:r,negotiate:a}=Zw(e,{type:"boolean"}),i="string"==typeof n.value?n.value:void 0;return d(eC,{field:e,children:d(Yw,{label:e.label.value,name:r.name,checked:"true"===t.value,error:i,onChange:e=>{t.value=String(e),n.value=void 0,a()}})})}const nC=f(null);function rC(e,t=" "){return e.filter(e=>null!=e&&!1!==e&&""!==e&&0!==e&&"function"!=typeof e&&"symbol"!=typeof e&&"bigint"!=typeof e&&"object"!=typeof e).join(t)}nC.displayName="SelectContext";function aC({children:e}){return d("span",{className:v("rermvf1 rermvf0 _1fragemup _1fragemv4 _1fragem5u _1fragem12y"),children:e})}var iC={floating:"xpgeoa0",positionVariant:{inside:"xpgeoa3 xpgeoa1 _1fragemwi _1fragem11z _1fragem12j _1fragem12w _1fragem12z",outside:"xpgeoa4 xpgeoa2 _1fragem5u"},transitionVariant:{base:"xpgeoa7 xpgeoa5 _1fragem12e _1fragem12t",animated:"xpgeoa8 xpgeoa6 _1fragem12d _1fragem12q"},Text:"xpgeoa9",visuallyHidden:"xpgeoaa _1fragem121"};function oC({htmlFor:e,label:t,variant:n,className:r}){const a=Gu();return d("label",{id:`${e}-label`,htmlFor:e,className:v(iC.positionVariant[n],"inside"===n&&iC.transitionVariant[a?"animated":"base"],r),children:d("span",{className:iC.Text,children:d(aC,{children:t})})})}const sC={FormLayout:"fjTgn",FormLayoutGroup:"fa7nz",SpacingSmall100:"RV2tT",SpacingBase:"wOVuC",FormLayoutConnected:"_9Mesh",ControlFocused:"V2zsD",Connectable:"_2g0rh",NotConnectable:"tgYPK",HasErrorOrWarning:"iKgeO"};var lC={Accessory:"_7ozb2u1r _7ozb2u1q _1fragemws _1fragem2d _1fragemyb",accessoryPositionEnd:"_7ozb2u1t",accessoryPositionStart:"_7ozb2u1s",ActualInput:"_7ozb2ur",animatedLabel:"_7ozb2uu",Field:"_7ozb2uq _7ozb2up _1fragemws _1fragemzf _1fragem11y _1fragem12u _1fragem12b",fieldInsetEnd:"_7ozb2u3",fieldInsetStart:"_7ozb2u2",fieldLabelInside:"_7ozb2u10 _7ozb2uz _1fragem12j",fieldLabelInsideTransitionVariant:{base:"_7ozb2ux _7ozb2uv _1fragem12e _1fragem12t",animated:"_7ozb2uy _7ozb2uw _1fragem12d _1fragem12q"},fieldLetterCaseVariant:{uppercase:"_7ozb2u1v"},fieldMultiline:"_7ozb2u18",fieldPrefixed:"_7ozb2u14 _7ozb2u13 _1fragem12o",fieldPrefixSpacing:{small:"_7ozb2u15",base:"_7ozb2u16"},fieldTypeVariant:{number:"_7ozb2u19",tel:"_7ozb2u1a",text:"_7ozb2u1b",email:"_7ozb2u1c",url:"_7ozb2u1d",password:"_7ozb2u1e"},FieldWrapper:"_7ozb2un",fieldWrapperMultiline:"_7ozb2uo",floatingLabelOnContent:"_7ozb2us",floatingLabelOnFocus:"_7ozb2ut",Icon:"_7ozb2u1i _7ozb2u1h _1fragemws _1fragem2d",iconPositionVariant:{start:"_7ozb2u1j",end:"_7ozb2u1k"},MultilineClone:"_7ozb2u1g _7ozb2u1f _1fragem6y",Prefix:"_7ozb2u1m _7ozb2u1l _1fragemws _1fragem2d",prefixInside:"_7ozb2u1n",segmentVariant:{start:"_7ozb2u0",end:"_7ozb2u1"},setFieldLabelIsNotVisible:"_7ozb2u17",Suffix:"_7ozb2u1p _7ozb2u1o _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:"_7ozb2u1u",Wrapper:"_7ozb2u5 _7ozb2u4 _1fragem7s _1fragem9l _1fragemws _1fragem6t",wrapperLabelInside:"_7ozb2u7 _7ozb2u6 _1fragemy6",wrapperVarsSetter:{labelInside:"_10vrn9p1 _10vrn9p0",labelOutside:"_10vrn9p2 _10vrn9p0"},inert:"_7ozb2u1w _1fragemz0"};const cC=qc("TextField"),uC={"data-1p-ignore":!0,"data-lpignore":"true","data-bwignore":"true","data-form-type":"other"},dC=_(function({accessibilityDescription:e,accessoryEnd:n,accessoryStart:r,ariaActiveDescendant:a,ariaAutocomplete:o,ariaControls:l,ariaExpanded:c,ariaHasPopup:u,ariaLabel:p,ariaLive:m,ariaOwns:g,autoCapitalize:f,autocomplete:_="on",autoCorrect:b,autoFocus:k,controlledValue:P,defaultValue:S,disabled:w,error:C,icon:E,id:x,disablePasswordManagers:I,inputMode:A,label:T,labelAccessibilityVisibility:L="visible",labelPosition:R,labelWhenEmpty:M,letterCase:N,max:D,maxLength:z,min:O,minLength:B,name:F,onBlur:V,onChange:U,onFocus:q,onInput:j,onInputCommit:H,onKeyDown:$,onWheel:Y,placeholder:W,prefix:G,prefixSpacing:K="base",readOnly:J,required:Q,role:X,rows:Z,segment:ee,step:te,suffix:ne,type:re="text",value:ae},ie){const{control:{border:oe,labelPosition:se="inside"},textField:{border:le}}=Km(),ce=Gu(),ue=h(Yu)?.floatTextFieldLabelsOnFocus??!1,de=le||oe||"full",pe=R??se,me=wd(),he=null==ae?void 0:ae,ge=null==P?void 0:P,fe=jc(x,cC),ye=e?`${fe}-description`:void 0,ve=ye?d(kf,{accessibilityVisibility:"exclusive",id:ye,children:e}):null,[_e,be]=s(!1),[ke,Pe]=function(e){const t=function(e){if(null!=e){if("object"==typeof e&&"value"in e){if(null==e.value)return;return String(e.value)}return String(e)}}(e),[n,r]=s(t),a=i(t),o=i(e);let l=n;return a.current!==t&&(a.current=t,r(t),l=t),"object"==typeof e&&o.current!==e&&r(t),o.current=e,[l,r]}(ge??he),Se=t(e=>{j?.(e),Pe(e)},[j,Pe]),we=function(e,t){if("boolean"!=typeof e)return void 0!==e&&Boolean(e)?d(jw,{controlID:t,type:"warning"===hC(e)?"warning":void 0,children:e&&"object"==typeof e&&"value"in e?e?.value:e}):null}(C,fe),Ce=Boolean(C)&&"warning"!==hC(C),Ee=v(lC.TextField,lC.textFieldColorLayerVariant[Ce?"controlInvalid":"control"],lC.textFieldBorderVariant[de],(w||me)&&lC.textFieldDisabled,me&&lC.inert,J&&lC.textFieldReadOnly,_e&&lC.textFieldFocused,Ce&&lC.textFieldError,ee&&lC.segmentVariant[ee]),xe=T&&"visible"===L;let Ie=lC.floatingLabelOnContent;"outside"===pe?Ie=iC.floating:G&&(Ie=lC.floatingLabelOnFocus);const Ae="outside"!==pe&&!Z&&"full"===de,Te=Ae&&Boolean(C);return d(y,{children:d("div",{className:v(lC.Wrapper,lC.wrapperVarsSetter["outside"===pe?"labelOutside":"labelInside"],"inside"===pe&&lC.textFieldColorLayerVariant[C?"controlInvalid":"control"],"inside"===pe&&lC.wrapperLabelInside,xe&&Ie,xe&&"inside"===pe&&ue&&lC.floatingLabelOnFocus,Ae?sC.Connectable:sC.NotConnectable,Te&&sC.HasErrorOrWarning,ce&&lC.animatedLabel),children:[xe&&"outside"===pe&&d(oC,{variant:"outside",htmlFor:fe,label:T}),T&&"exclusive"===L&&d("label",{id:`${fe}-label`,htmlFor:fe,className:iC.visuallyHidden,children:T}),d("div",{className:Ee,children:[ve,xe&&"inside"===pe&&d(oC,{variant:"inside",htmlFor:fe,label:T}),d(mC,{accessibilityDescription:e,accessoryEnd:n,accessoryStart:r,ariaActiveDescendant:a,ariaAutocomplete:o,ariaControls:l,ariaDescribedBy:ye,ariaExpanded:c,ariaHasPopup:u,ariaLabel:p,ariaLive:m,ariaOwns:g,autoCapitalize:f,autocomplete:_,autoCorrect:b,autoFocus:k,controlledValue:P,defaultValue:S,disabled:w,error:C,icon:E,id:fe,disablePasswordManagers:I,inputMode:A,label:T,labelAccessibilityVisibility:L,labelPosition:pe,labelWhenEmpty:M,letterCase:N,localValue:ke,max:D,maxLength:z,min:O,minLength:B,name:F,onBlur:()=>{be(!1),V?.()},onChange:U,onFocus:()=>{be(!0),q?.()},onInput:Se,onInputCommit:H,onKeyDown:$??function(e){void 0===Z&&U&&"Enter"===e.key&&U(e.currentTarget.value)},onWheel:Y,placeholder:W,prefix:G,prefixSpacing:K,readOnly:J,ref:ie,required:Q,role:X,rows:Z,step:te,suffix:ne,type:re,value:ae})]}),we]})})}),pC=dC,mC=_(function({accessoryEnd:e,accessoryStart:n,ariaActiveDescendant:r,ariaAutocomplete:o,ariaControls:s,ariaDescribedBy:l,ariaExpanded:c,ariaHasPopup:u,ariaLabel:p,ariaLive:m,ariaOwns:h,autoCapitalize:g,autocomplete:f,autoCorrect:_,autoFocus:b,disabled:k,labelWhenEmpty:P,error:S,icon:w,id:C,disablePasswordManagers:E,inputMode:x,label:I,labelAccessibilityVisibility:A,labelPosition:T,letterCase:L,localValue:R,max:M,maxLength:N,min:D,minLength:z,name:O,onBlur:B,onChange:F,onFocus:V,onInput:U,onInputCommit:q,onKeyDown:j,onWheel:$,placeholder:Y,prefix:W,prefixSpacing:G,readOnly:K,required:J,role:Q,rows:X,step:Z,suffix:ee,type:te,value:ne},re){const ae=af({active:Boolean(S)&&Boolean("warning"!==hC(S))}),ie=i(),oe=t(e=>{"function"==typeof re?re(e):re&&(re.current=e),ie.current=e,ae.current=e,e&&(R?e.value!==R:e.value!==(ne??""))&&e.dispatchEvent(new Event("input"))},[re,ae]),se=Zg(),le=Pd(),ce=wd();a(()=>{b&&!ce&&ie.current?.focus()},[b,ce]);const{control:{labelPosition:ue="inside"}}=Km(),de=T??ue,pe=Gu(),me="object"==typeof w?w.source:w,he="object"==typeof w?w.position??"start":"start",ge=""!==me&&me&&d("div",{className:v(lC.Icon,lC.iconPositionVariant[he]),"aria-hidden":"true",onClick:()=>ie.current?.focus(),children:d(lh,{type:me})}),fe=I&&"visible"===A,ye="email"===te||f?.split(/\s+/).includes("email"),ve=Boolean(ye)||"tel"===te||"number"===te,_e=(!te||"text"===te)&&Boolean(R);let be;be=ve?"ltr":_e?"auto":void 0;const ke=W&&d("div",{id:`${C}-prefix`,className:v(lC.Prefix,lC.withTypography,fe&&"inside"===de&&lC.prefixInside),"aria-hidden":"true",onClick:()=>ie.current?.focus(),children:W}),Pe=v(lC.Field,"inside"===de&&lC.fieldLabelInside,"inside"===de&&lC.fieldLabelInsideTransitionVariant[pe?"animated":"base"],Boolean(W)&&lC.fieldPrefixed,Boolean(G)&&lC.fieldPrefixSpacing[G],Boolean(!fe)&&lC.setFieldLabelIsNotVisible,Boolean(W||n||ge&&"start"===he)&&lC.fieldInsetStart,Boolean(ee||e||ge&&"end"===he)&&lC.fieldInsetEnd,Boolean(X)&&lC.fieldMultiline,L&&lC.fieldLetterCaseVariant[L],te&&lC.fieldTypeVariant[te],lC.withTypography),Se=l||S?rC([l,S&&qw(C)]):void 0,we=x??("number"===te?"decimal":void 0),Ce=W?` ${C}-prefix`:"",Ee=ee?` ${C}-suffix`:"",xe=P??I;let Ie;"outside"===de?Ie=Y:pe&&fe?Ie=W?xe:" ":pe||"visible"!==A||(Ie=xe);const Ae=H(X?"textarea":"input",{...E?uC:void 0,id:C,min:D,max:M,step:Z,maxLength:N,minLength:z,name:O,placeholder:Ie,className:v(Pe,lC.ActualInput),required:J,type:X?void 0:te,disabled:k,readOnly:K,inputMode:we,"aria-activedescendant":r,"aria-autocomplete":o,"aria-controls":s,"aria-owns":h,"aria-describedby":Se,"aria-expanded":c,"aria-hidden":!!ce||void 0,"aria-invalid":Boolean(S)&&"warning"!==hC(S)?"true":void 0,"aria-label":p,"aria-live":m,"aria-required":J,"aria-labelledby":I?`${C}-label${Ce}${Ee}`:void 0,"aria-haspopup":u,onBlur:({currentTarget:{value:e}})=>{se.current&&(e!==(ne||"")&&F?.(e),B?.())},onChange(e){const{currentTarget:{value:t}}=e,n=e.nativeEvent??e,{isTrusted:r}=n,a="inputType"in n?n.inputType:void 0;"insertCompositionText"!==a&&"deleteCompositionText"!==a&&q?.(t),r&&a||F?.(t),U?.(t)},onFocus:()=>{V?.()},onKeyDown:j,onWheel:$,ref:oe,role:Q,rows:X,value:R??"",autoComplete:f,autoFocus:b&&!ce,form:le?.nested?le.id:void 0,tabIndex:ce?-1:void 0,autoCorrect:_,autoCapitalize:g,dir:be}),Te=!0===Boolean(X)&&d("div",{"aria-hidden":"true",className:v(lC.MultilineClone,Pe),dir:be,children:[R," "]}),Le=v(lC.FieldWrapper,Boolean(X)&&lC.fieldWrapperMultiline),Re=X?d("div",{className:Le,children:[Ae,Te]}):Ae,Me=ee&&d("div",{id:`${C}-suffix`,className:v(lC.Suffix,lC.withTypography),"aria-hidden":"true",onClick:()=>ie.current?.focus(),children:ee}),Ne=n&&d("div",{className:v(lC.Accessory,lC.accessoryPositionStart),children:n}),De=e&&d("div",{className:v(lC.Accessory,lC.accessoryPositionEnd),children:e});return d(y,{children:[ge,ke,Re,Ne,Me,De]})});function hC(e){if(e&&"object"==typeof e&&"type"in e)return e.type}var gC={labelInside:"_10vrn9p1 _10vrn9p0",labelOutside:"_10vrn9p2 _10vrn9p0"},fC={Select:"_1k3449n0 _1fragem133 _1fragemyl",selectColorLayerVariant:{control:"_1k3449n3 _1k3449n1 _1fragemy6",controlInvalid:"_1k3449n4 _1k3449n2 _1fragemy7"},inert:"_1k3449n5 _1fragemz0"};const yC={Wrapper:"RD23h",SelectWrapper:"VZudx","Label-positionInside":"QCxaD",LabelText:"XDBWz","Label-isFloating":"A9HkF",Select:"ZHJU6","Label-positionOutside":"D67WW","Select-borderNone":"VQDv5",hasError:"_87H7J","Select-borderFull":"IWR5K","Select-borderBlockEnd":"ADBGS","Select-isDisabled":"_9yhqJ",Selector:"VXrUd","Select-backgroundBase":"oAlPg","Select-isReadOnly":"eSQ74"},vC=qc("Select");function _C({children:e,id:n,name:a,label:i,value:o="",disabled:l,readOnly:c,required:u,error:p,autocomplete:m="on",placeholder:h,onChange:g,onBlur:f,onFocus:_}){const b=Pd(),{control:{border:k,labelPosition:P="inside"},select:{border:S}}=Km(),w=wd(),C=af({active:Boolean(p)&&Boolean("warning"!==hC(p))}),E=jc(n,vC),x=S||k||"full",I=void 0!==p&&Boolean(p)&&d(jw,{controlID:E,type:"warning"===hC(p)?"warning":void 0,children:p&&"object"==typeof p&&"value"in p?p?.value:p}),A=Boolean(p)&&"warning"!==hC(p),T=v(yC.Select,fC.Select,A&&yC.hasError,(l||w)&&yC["Select-isDisabled"],w&&fC.inert,c&&yC["Select-isReadOnly"],yC[$("Select-border",x)]),[L,R]=s(0),M=Boolean(L),N=Boolean(h&&h!==i)||M,D=""!==o||N,z=d("label",{className:v(yC.Label,yC[$("Label-position",P)],D&&yC["Label-isFloating"]),htmlFor:E,children:d("span",{className:v(yC.LabelText),children:d(aC,{children:i})})}),O=t(()=>{R(e=>e+1)},[]),B=t(()=>{R(e=>e-1)},[]),F=r(()=>({readOnly:c,registerEmptyValueOption:O,unregisterEmptyValueOption:B}),[c,O,B]),V=d("div",{children:["outside"===P?z:null,d("div",{className:v(yC.SelectWrapper,fC.selectColorLayerVariant[A?"controlInvalid":"control"]),children:["inside"===P&&z,d(nC.Provider,{value:F,children:d("select",{name:a,id:E,disabled:l,onChange:e=>{const t=e.target.value;g?.(t)},required:u,value:o,className:T,"aria-describedby":p?qw(E):void 0,"aria-invalid":p&&"warning"!==hC(p)?"true":void 0,"aria-hidden":!!w||void 0,autoComplete:m,tabIndex:w?-1:void 0,ref:C,onBlur:()=>{f?.()},onFocus:()=>{_?.()},form:b?.nested?b.id:void 0,children:[h&&(U=o,""===U||null==U||h!==i)&&d("option",{value:"",hidden:h===i,disabled:!0,children:h===i?d(y,{children:" "}):h}),e]})}),d("div",{className:v(yC.Selector),children:d(lh,{type:"chevronDown",size:"small-200"})})]})]});var U;const q="outside"!==P&&"full"===x,j=q&&Boolean(p);return d(y,{children:d("div",{className:v(yC.Wrapper,"inside"===P&&fC.selectColorLayerVariant[A?"controlInvalid":"control"],gC["outside"===P?"labelOutside":"labelInside"],q?sC.Connectable:sC.NotConnectable,j&&sC.HasErrorOrWarning),children:[V,I]})})}function bC({children:e,id:t,value:n,disabled:r,alternateValues:a,accessibilityLabel:i}){const o=h(nC),{registerEmptyValueOption:s,unregisterEmptyValueOption:c}=o??{},u=""===n;return l(()=>{if(u&&s&&c)return s(),()=>{c()}},[u,s,c]),o?d("option",{id:t,value:n,disabled:r||o.readOnly,...a?.length&&{"data-alternate-values":JSON.stringify(a)},"aria-label":i,children:e}):(console.warn(`Unable to render Option (id: ${t}). Please verify it is a child of a Select.`),null)}function kC({field:e}){const{i18n:n}=oe(),r=function({choices:e,required:n,requiredErrorMessage:r}){const{i18n:a}=oe();return t(t=>{if(""===t.trim()){if(!n.value)return;return r.value?.trim()||a.translate("field_errors.custom_field.cart_metafield_value_required")}if(!e?.some(e=>e.value===t))return a.translate("field_errors.custom_field.cart_metafield_invalid_choice")},[e,a,n,r])}(e),{value:a,error:i,fieldProps:o,negotiate:s}=Zw(e,{type:"single_line_text_field",validate:r});return d(eC,{field:e,children:d(_C,{label:o.label,name:o.name,required:o.required,value:a.value,error:"string"==typeof i.value?i.value:void 0,onChange:e=>{a.value=e,i.value=r(e),s()},children:[d(bC,{value:"",disabled:o.required,children:n.translate("custom_field.choice_placeholder")}),e.choices?.map(({label:e,value:t})=>d(bC,{value:t,children:e},t))]})})}const PC=C({displayName:"AsyncDateField",suspense:!1,load:()=>E(()=>hl(async()=>{const{DateField:e}=await(import("./b538640d.Dauuuzn-.js"));return{DateField:e}},__vite__mapDeps([100,1,35,36,2,3,4,5,37,38,39,11,14,15,16,17,18])).then(({DateField:e})=>e)),useError:Yh("DateField"),renderLoading:({field:e})=>d(SC,{field:e})});function SC({field:e}){const{value:t,fieldProps:n}=Zw(e,{type:"date"});return d(eC,{field:e,children:d(pC,{...n,value:t.value,readOnly:!0,inputMode:"numeric",maxLength:10,accessoryEnd:d(lh,{type:"calendar"})})})}const wC=_(function({autocomplete:e,autoFocus:t,defaultValue:n,disabled:r,error:a,id:i,label:o,labelAccessibilityVisibility:s,maxLength:l,minLength:c,name:u,onBlur:p,onChange:m,onFocus:h,onInput:g,placeholder:f,readOnly:y,required:v,rows:_=2,value:b},k){return d(dC,{autocomplete:e,autoFocus:t,defaultValue:n,disabled:r,error:a,id:i,label:o,labelAccessibilityVisibility:s,maxLength:l,minLength:c,name:u,onBlur:p,onChange:m,onFocus:h,onInput:g,placeholder:f,readOnly:y,ref:k,required:v,rows:_>0?_:1,value:b})});function CC(e,t){const{value:n,error:r,fieldProps:a,negotiate:i}=Zw(e,t),o=Za(n,r,t.validate);return{validatedInput:o,fieldProps:a,persist:()=>{o.onBlur(),i()}}}function EC({field:e}){const n="MULTILINE_TEXT"===e.type,r=function({required:e,requiredErrorMessage:n,validations:r}){const{i18n:a}=oe(),{minLength:i,maxLength:o}=r;return t(t=>{if(""===t.trim()){if(!e.value)return;return n.value?.trim()||a.translate("field_errors.custom_field.cart_metafield_value_required")}const r=[...t].length;return null!=i&&ro?a.translate("field_errors.custom_field.cart_metafield_value_too_long"):void 0},[a,o,i,e,n])}(e),{validatedInput:a,fieldProps:i,persist:o}=CC(e,{type:n?"multi_line_text_field":"single_line_text_field",validate:r});return d(eC,{field:e,children:d(n?wC:pC,{...a,label:i.label,name:i.name,required:i.required,onBlur:o})})}function xC({field:e}){switch(e.type){case"TEXT":case"MULTILINE_TEXT":return d(EC,{field:e});case"DATE":return d(PC,{field:e});case"CHOICE":return d(kC,{field:e});case"BOOLEAN":return d(tC,{field:e});default:return null}}const IC=C({id:()=>"RuntimeExtension",displayName:"RuntimeExtension",suspenseName:({extension:e})=>Va(e.extensionPoint.target)?`runtime-extension-${e.id}`:void 0,load:()=>hl(()=>import("./49758c58.B9KpzE-x.js"),__vite__mapDeps([101,1,2,3,4,5,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,13,46,47,48,49,17,50,51,52,53,54,18,55,56,57,58,89,25,12,14,59,24,10,60,61,11,15,16,102]))}),AC=e=>d(hf,{children:e}),TC=({gap:e,children:t,condition:n,marginBlockStart:r,marginBlockEnd:a})=>{const i=e&&n?d(Lf,{gap:e,children:t}):d(y,{children:t});return r||a?d("div",{className:v(r&&"OyeF5",a&&"XYPMc"),style:{...r&&{"--extensions-margin-block-start":_e.spacing[r]},...a&&{"--extensions-margin-block-end":_e.spacing[a]}},children:i}):d(y,{children:i})};function LC({customizations:e,gap:t,options:n,transformComponents:r,render:a=AC,marginBlockStart:i,marginBlockEnd:o}){return 0===e.length?null:d(TC,{gap:t,condition:e.length>1,marginBlockStart:i,marginBlockEnd:o,children:e.map(e=>"uiExtension"===e.kind?d(IC,{options:n,extension:e.extension,transformComponents:r,render:a},e.extension.id):d(xC,{field:e.field},e.field.key))})}const RC=C({displayName:"AccountAvatar",suspense:!1,load:()=>E(()=>hl(()=>import("./7b11cac4.p4SlO03z.js"),__vite__mapDeps([103,1,104,3,4,2,5,105,11,14,15,16,17,18,106]))),useError:Yh("AccountAvatar")}),MC={borderRadius:{small:"8px",base:"12px",large:"16px",fullyRounded:"36px",max:"9999px"},color:ai,transitionDuration:{base:ei(0,200,1.5,"ms")},transitionTimingFunction:{easeOut:"cubic-bezier(0.3, 0.5, 0.5, 1)"},fontFamily:ni,fontSize:ti,letterSpacing:ri,lineHeight:ii};function NC(){const e=Gm(),{router:t,userEvents:n,shop:r,source:a,checkout:i,i18n:o}=oe(),s=mg(),l="simulated"===a.type,c=rw(),{header:{cartLink:{contentType:u="icon",image:p}={}}}=jy(),m=hP(),h="/shoppay_login"===t.currentUrl.value.normalizedPath,g=o.translate("general.cart");let f;if("text"===u)f=g;else if("image"===u&&p?.src){const t=1.7142857142857142*oi(e.customProperties.value.fontSize?.base??MC.fontSize.base);f=d("img",{src:p.src,alt:g,height:t,className:v(Ce({display:"block"}))})}else f=d(lh,{type:"bag",size:"large"});return d("span",{ref:c("cart"),className:v(Ce({display:"block"}),"_3n5ND",i.checkoutExit.isExiting.value&&"rqruX"),children:d(Af,{href:m.value?.toString(),id:"cart-link",onClick:()=>{if("shopPay"!==i.identity.current.value)s("click",{element:{tagName:"a",textContent:g},section:"header",timestamp:new Date,transmitImmediately:!0});else{if(l||h)return;n.monorailEvent({schemaId:"shopify_pay_payment_page_ui_interaction/1.2",payload:{...Qr(a,i,r),action:"return_to_cart"}})}},accessibilityLabel:"icon"===u?g:void 0,display:"block",children:f})})}function DC({alignment:e,logo:t,endAccessory:n,endAccessoryAffectsBlockSize:r=!0}){const a=n&&!r?d(hf,{blockSize:"0px",children:d(hf,{transform:"translate(0px, -50%)",children:n})}):n,i={start:{columns:a?"minmax(0, 1fr) minmax(auto, max-content)":"minmax(0, 1fr)",markup:d(y,{children:[t,a]})},center:{columns:a?"minmax(auto, max-content) minmax(0, 1fr) minmax(auto, max-content)":"minmax(0, 1fr)",markup:d(y,{children:[a&&d("div",{className:"Vc3rW",style:{visibility:"hidden"},children:a}),d(hf,{inlineAlignment:"center",children:t}),a]})},end:{columns:a?"minmax(auto, max-content) minmax(0, 1fr)":"minmax(0, 1fr)",markup:d(y,{children:[a,d(hf,{inlineAlignment:"end",children:t})]})}};return d(nh,{gridTemplateColumns:i[e].columns,minInlineSize:"100%",alignItems:"center",alignContent:"center",gap:"large-500",children:i[e].markup})}function zC(){const{checkout:e,router:t}=oe(),n=t.currentUrl.value,{header:{alignment:r="start",logo:{visibility:a,maxWidth:i}={}}}=jy(),o=mP(),s=xb(),{currentDetour:l}=tc().value,c=e.configuration.visibility.showHeader&&!(e.configuration.isUniversalCheckoutFinalizer&&"thankYou"===l?.type);let u="purchase.checkout.header.render-after";"thankYou"===l?.type&&(u="purchase.thank-you.header.render-after");const p=$S(u),m="hidden"!==a||rr(n.search),h=m?d(Uw,{width:i}):d("div",{});let g;return o.value?g=d(NC,{}):s.value&&(g=d(RC,{})),d(Lf,{gap:"large-100",children:[(null!=g||m)&&c&&d(DC,{alignment:r,logo:h,endAccessory:g,endAccessoryAffectsBlockSize:o.value||!m}),d(LC,{customizations:p,gap:"base"})]})}function OC({children:e,position:t}){const{header:{logo:{visibility:n}={}},cartLink:{visibility:r}}=jy(),{checkout:a,mobileCheckoutSdk:i,shopPay:o,source:s,embed:l,router:c}=oe(),u=c.currentUrl.value,p=rr(u.search),{currentDetour:m}=tc().value;let h="purchase.checkout.header.render-after";"thankYou"===m?.type&&(h="purchase.thank-you.header.render-after");const g=$S(h),{isAppLayout:f}=fw(),y=at(),v="shopPayExternal"===s.type,_=!a.configuration.visibility.showHeader,b=a.configuration.isUniversalCheckoutFinalizer&&"thankYou"===m?.type,k=(()=>{if(v)return o.visibility.showOnePageShellHeader;if(b)return g.length>0&&y.value;if(l?.isFlagshipPartner&&!ar(l.embedder)&&"shopApp"!==l.embedder)return!1;if((_||"hidden"===n&&!p&&"hidden"===r)&&!i.enabled&&!l?.isCheckoutKit()&&(0===g.length||!y.value))return!1;if(f){if(!i.enabled||i.variant.isStandard())return!1;if(l?.isCheckoutKit())return!1}return!0})();return d(gw,{position:t,children:[k?d(zC,{}):null,e]})}const BC={auto:"block",inline:"inlineBlock",block:"block"},FC=e=>"auto"===e?"auto":e in bm?bm[e]:void 0,VC=e=>BC[e];function UC({blockSize:e="auto",display:t="auto",inlineSize:n="auto",id:r}){const{className:a,style:i}=$m({blockSize:e,display:t,inlineSize:n},{transforms:{blockSize:FC,display:VC,inlineSize:FC}});return d("div",{className:v(a),id:r,style:i})}function qC(){const{checkout:e,router:t}=oe(),n=t.currentUrl.value,{header:{alignment:r="start",logo:a}}=jy(),i=xb(),{currentDetour:o}=tc().value;let s="purchase.checkout.header.render-after";"thankYou"===o?.type&&(s="purchase.thank-you.header.render-after");const l=$S(s),c=e.configuration.isUniversalCheckoutFinalizer&&"thankYou"===o?.type,u=!c&&("hidden"!==a?.visibility||rr(n.search)),p=!c&&i.value,m=u||p;let h;return p?h=d(DC,{alignment:r,logo:u?d(Uw,{width:a?.maxWidth}):d("div",{}),endAccessory:d(RC,{}),endAccessoryAffectsBlockSize:!u}):u&&(h=d(hf,{inlineAlignment:r,children:d(Uw,{width:a?.maxWidth})})),d(y,{children:[h,l.length>0&&d(y,{children:[m&&d(UC,{blockSize:"@media (inline-size >= medium) base, large-400"}),d(LC,{customizations:l,gap:"base"})]})]})}function jC({children:e,position:t}){const{header:{logo:{visibility:n}={}}}=jy(),{checkout:r}=oe(),{currentDetour:a}=tc().value;let i="purchase.checkout.header.render-after";"thankYou"===a?.type&&(i="purchase.thank-you.header.render-after");const o=$S(i),s=r.configuration.isUniversalCheckoutFinalizer&&"thankYou"===a?.type,l=o.length>0||!s&&"hidden"!==n;return d(gw,{position:t,children:[l?d(qC,{}):null,e]})}function HC({children:e,content:t,position:n}){const{checkout:{configuration:{layout:r}}}=oe();if(void 0!==t)return d(gw,{position:n,children:[t,e]});const a=r.isOnePage.value?OC:jC;return d(a,{position:n,children:e})}function $C(e,t){const n=oe().checkout.configuration.layout.isOnePage.value,r=$S("Checkout::Dynamic::Render","ORDER_SUMMARY1"),a=$S("Checkout::Dynamic::Render","ORDER_SUMMARY2"),i=$S("Checkout::Dynamic::Render","ORDER_SUMMARY3"),o=$S("Checkout::Dynamic::Render","ORDER_SUMMARY4"),s=$S("Checkout::CartLines::RenderAfter"),l=$S("Checkout::CartLineDetails::RenderAfter"),c=$S("Checkout::Reductions::RenderBefore"),u=$S("Checkout::Reductions::RenderAfter");return n?"bottom"===e?t?.hideMerchandiseLines?[...i]:[...r,...a,...i,...l,...s]:[...l]:[...r,...a,...i,...o,...l,...s,...c,...u]}const YC="checkout-main",WC="checkout-main-header",GC="checkout-pay-button",KC="checkout-review-heading",JC=ae("OrderSummaryContext");function QC(){return ie(JC)}const XC=({children:e})=>{const n=m(!1),a=t(e=>{n.value=e},[n]),i=r(()=>({open:n,setOpen:a}),[n,a]);return d(JC.Provider,{value:i,children:e})},ZC="announcement_box",eE="announcement_content";function tE({children:e,onClose:n,onAfterCollapse:r,onAfterExpand:o,onExpand:l,onCollapse:c,open:u=!1,expanded:p=!1}){const{i18n:m}=oe(),[h,g]=s(!1),f=i(null),y=i(null),_=Id(p,"base"),b=Id(u,"base");a(()=>{if("undefined"==typeof window||!window.ResizeObserver||!window.MutationObserver)return;const e=y.current;if(!e)return;const t=()=>{p||"exited"!==_||g(e.scrollHeight>e.clientHeight)};t();const n=ci(t,200),r=new ResizeObserver(n);r.observe(e);const a=new MutationObserver(n);return a.observe(e,{childList:!0,subtree:!0,characterData:!0}),()=>{r.disconnect(),a.disconnect()}},[e,p,u,_]);const k=t(()=>{p?c?.():l?.()},[p,c,l]);a(()=>{"entered"===_?o?.():"exited"===_&&r?.()},[o,r,_]);const P=rE(),{environment:{isCheckoutEditor:S},announcement:{colorScheme:w}}=jy(),C=P[0],E=S?C?.publicIdentifier:void 0,x=S&&P.length>0;return uS(e)?d("section",{id:ZC,className:v(pw.Announcement,u&&pw["Announcement-opened"],h&&pw["Announcement-hasOverflow"],p&&pw["Announcement-expanded"],pw[$("Announcement-expandedTransition",_)],pw[$("Announcement-openTransition",b)],x&&pw["Announcement-hasActiveInspector"]),ref:f,children:d("div",{className:v(pw.AnnouncementContainer,Ce({colorLayer:"base",colorScheme:w,backgroundColor:"baseSpecified"})),"data-inspector-id":E,"data-inspector-box":E?"content":void 0,children:[!p&&d("button",{className:pw.AnnouncementOverlay,onClick:e=>{e.preventDefault(),e.stopPropagation(),l?.()},"aria-label":m.translate("thank_you.announcement.expand"),"aria-expanded":!1,"aria-controls":eE,type:"button"}),d("div",{className:pw.AnnouncementActionButtons,children:[d("button",{id:"announcement_action_expand_collapse_buttons",className:pw.AnnouncementExpandCollapseButton,onClick:k,"aria-label":p?m.translate("thank_you.announcement.collapse"):m.translate("thank_you.announcement.expand"),"aria-expanded":p,"aria-controls":eE,type:"button",children:d(lh,{type:p?"chevron-up":"chevron-down",size:"base"})}),d("button",{className:pw.AnnouncementCloseButton,onClick:()=>n?.({source:"host"}),"aria-controls":ZC,"aria-expanded":u,"aria-label":m.translate("thank_you.announcement.close"),type:"button",children:d(lh,{type:"x",size:"base"})})]}),d("div",{id:eE,className:pw.AnnouncementContent,ref:y,"aria-live":"polite","aria-atomic":"true",children:e})]})}):null}function nE(){}function rE(){const{environment:{hasTYPAnnouncementExtensions:e}}=jy(),t=function(e){return void 0!==e?()=>[]:()=>{const e=$S("purchase.thank-you.announcement.render");return ui(e,"uiExtension").map(di)}}(e);return t()}const aE={none:"0",..._e.spacing},iE={base:"solid",dashed:"dashed",dotted:"dotted"},oE="disclosure_details";function sE({banner:e,announcement:n,header:r,buyerJourney:i,disclosure:o,disclosureOrderSummary:l,footer:c,main:u,orderSummary:p,blockSize:m,minMobileViewportSize:h=!1,disclosureId:g=oE,isDisclosureInteractive:f=!0,mainContentId:y=YC}){const _=jy(),{checkout:{configuration:b,checkoutExit:k},embed:P,router:S}=oe(),w=b.visibility.showAside,C=Boolean(P?.isFlagshipPartner),E=ar(P?.embedder),x=E&&b.isUniversalCheckoutFinalizer&&"/thank-you"===S.currentUrl.value.normalizedPath,I=$S("Checkout::Dynamic::Render","ORDER_SUMMARY4").length>0,A=E&&I,T=C&&!1===_.header.divided,L=_.header.position??"inline",R=cw(),{open:M,expanded:N,onAfterCollapse:D,onAfterExpand:z,onClose:O,onExpand:B,onCollapse:F}=function(){const e=jy(),n=qy(),r=$v(),i=function(){const{environment:{hasTYPAnnouncementExtensions:e}}=jy();return function(e){return void 0!==e?()=>nE:()=>{const e=rE(),t=mg();if(0===e.length)return nE;const n=e[0];return e=>t?.("extensionUiInteraction",{interaction:e,section:"extension",timestamp:new Date,extension:n,componentType:"Announcement",componentInstanceId:n.id})}}(e)()}(),[o,l]=s(!1),[c,u]=s(!1),d=t(({source:e}={})=>{const{announcement:t}=n.configuration;"dismissed"!==t.visibility&&"hidden"!==t.visibility&&(i("host"===e?"announcementDismissedFromHost":"announcementDismissedFromExtension"),r.emit("announcementClosed"),n.set("announcement",{...n.configuration.announcement,visibility:"dismissed"}))},[n,r,i]),p=t(()=>{r.emit("announcementAfterCollapsed")},[r]),m=t(()=>{r.emit("announcementAfterExpanded")},[r]),h=t(()=>{l(!0),i("announcementExpanded"),r.emit("announcementExpanded")},[i,r]),g=t(()=>{l(!1),i("announcementCollapsed"),r.emit("announcementCollapsed")},[i,r]);return a(()=>(r.on("closeAnnouncement",d),()=>{r.off("closeAnnouncement",d)}),[d,r]),a(()=>{if("visible"!==e.announcement.visibility)return void u(!1);const t=setTimeout(()=>{u(!0)},1e3);return()=>clearTimeout(t)},[e.announcement.visibility]),{open:c,expanded:o,onAfterCollapse:p,onAfterExpand:m,onClose:d,onExpand:h,onCollapse:g}}(),V=l?d(DS,{style:_.orderSummary.section,children:l}):void 0;return d("div",{className:v(pw.Shell,mw.ThankYouInterstitialShell,k.isExiting.value&&pw["Shell-exiting"],w&&pw["Shell-layoutAside"],"fill"===_.main.inlineSize&&pw["Config-Main-inlineSizeFill"],"fill"===_.orderSummary.inlineSize&&pw["Config-OrderSummary-inlineSizeFill"],pw[$("Config-Header-position",L)],_.footer.position&&pw[$("Config-Footer-position",_.footer.position)],_.environment.isOnePageCheckout&&pw["Shell-variantOnePageCheckout"],E&&pw["Shell-embeddedUc"],x&&pw["Shell-embeddedUcMainPadding"],A&&pw["Shell-embeddedUcHasOrderSummary4Extensions"],m&&pw[$("Shell-blockSize",m)],h&&pw["Shell-minMobileViewportSize"],uS(n)&&pw["Shell-hasAnnouncement"],M&&pw["Shell-announcementOpen"]),style:{...fE("content",_.content),...vE("content",_.content),..._E("main",_.main),...bE("main",_.main),..._E("order-summary",_.orderSummary),...bE("order-summary",_.orderSummary),...kE("order-summary",_.orderSummary),..._E("header",_.header),...kE("header",{backgroundImage:_.header.banner?.image}),...bE("header",_.header),...T?wE:{},..._E("footer",_.footer),...bE("footer",_.footer),...PE("footer",_.footer),..._E("buyer-journey",_.buyerJourney),...bE("buyer-journey",_.buyerJourney),..._E("announcement",_.announcement)},children:[d(lE,{}),e?d("div",{className:pw.Banner,children:e}):null,n?d(tE,{open:M,expanded:N,onAfterExpand:z,onAfterCollapse:D,onClose:O,onExpand:B,onCollapse:F,children:n}):null,d(HC,{position:"start",content:r,children:"header"===_.buyerJourney.position&&d(cE,{children:i})}),d(uE,{id:g,isInteractive:f,details:V,children:o}),d(dE,{children:[d(mE,{children:[d(HC,{position:"inline",content:r,children:"header"===_.buyerJourney.position&&d(cE,{children:i})}),d(pE,{children:["inline"===_.buyerJourney.position&&d(cE,{children:i}),d(DS,{style:_.main.section,children:d("main",{className:v(pw.MainContentPrimary,R&&"F3Ebx"),id:y,children:u})}),"inline"===_.footer.position&&d(hE,{children:c})]})]}),d(hw,{header:d(HC,{position:"inlineSecondary",content:r,children:"header"===_.buyerJourney.position&&d(cE,{children:i})}),children:p})]}),"end"===_.footer.position&&d(hE,{children:c})]})}function lE(){const{checkout:e}=oe(),{main:{colorScheme:t="scheme1"}={}}=jy();return e.checkoutExit.isExiting.value?d("div",{className:v("Vytfl",Ce({colorLayer:"base",colorScheme:t,backgroundColor:"baseSpecified"})),"aria-hidden":"true"}):null}function cE({children:e}){const{buyerJourney:{position:t="inline",container:n="fill",visibility:r}={}}=jy();return uS(e)&&"hidden"!==r?d("div",{className:v(pw.BuyerJourney,pw[$("BuyerJourney-position",t)],pw[$("BuyerJourney-container",n)]),children:d("div",{className:pw.BuyerJourneyContent,children:e})}):null}function uE({children:e,details:t,id:r=oE,isInteractive:o}){const{header:{divided:l},orderSummary:{backgroundImage:c,colorScheme:u}={},main:{colorScheme:p="scheme1"},environment:{isCheckoutEditor:m},disclosure:{visibility:h}}=jy(),g=at(),f=uw(),{checkout:y}=oe(),_=l??!0,b=function(){const{environment:{hasOrderSummaryExtensions:e}}=jy(),t=function(e){return void 0!==e?()=>e:()=>$C("top").length>0}(e);return t()}(),{expanded:k,narrowedToInformationStep:P}=function(){const{environment:{shouldExpandOrderSummary:e}}=jy(),t=function(e,t){return void 0!==t?()=>({expanded:t,narrowedToInformationStep:!1}):()=>{const t=function(){const e=I($C("top"));return n(()=>e.value.some(e=>{if("customField"===e.kind)return di(e).required.value;const t=di(e),n=t.behaviors.value;return n.blockProgress&&t.capabilities.blockProgress||n.alwaysReveal}))}(),r=function(){const{orderSummary:{defaultState:e}={}}=jy(),{checkout:{configuration:{layout:{isOnePage:t}}}}=oe();return!t.value&&"EXPANDED"===e}(),a=function(){const e=tc();return n(()=>{const{currentPage:t,currentDetour:n}=e.value;if(!n&&t)return"information"===t.id})}();return e&&r&&!t.value&&void 0!==a.value?{expanded:a.value,narrowedToInformationStep:!0}:{expanded:t.value||r,narrowedToInformationStep:!1}}}(function(){const{client:e}=oe(),t=e.unstable_getSerialization("experiments"),n=t?.find(e=>e.clientHandle===si)?.variant;return Object.values(li).find(e=>e===n)}()===li.Treatment,e);return t()}(),{open:S,setOpen:w}=QC(),C=S.value||b&&m,[E,x]=s(),A=i(!1);a(()=>{x(A.current&&!k?"none":void 0),w(k)},[k,w]),a(()=>{A.current=P}),a(()=>{C&&w(!0)},[C,b,w]);const T=lw();if(!uS(e)||y.checkoutExit.isExiting.value||"hidden"===h||"hidden-only-checkout"===h&&!T)return null;const L=c?{backgroundImage:`url(${JSON.stringify(c)})`}:void 0,R=!o||S.value,M=Boolean(t)&&(g.value||R);return d("aside",{className:v(pw.Disclosure,_&&pw["Disclosure-divided"],Ce({colorLayer:"base",colorScheme:p,backgroundColor:"baseSpecified"})),"data-inspector-id":"orderSummary",children:d(sw,{section:"top_summary",children:d(aw,{section:"top_summary",children:[o?d(Xm,{className:v(pw.DisclosureButton,f.value&&mw.ThankYouEntranceDisclosure),background:"transparent",onClick:()=>{x(void 0),w(!S.peek())},"aria-controls":r,"aria-expanded":R,inlineSize:"100%","data-event-name":R?"order_summary_hide":"order_summary_show",children:e}):d("div",{className:v(pw.DisclosureButton,f.value&&mw.ThankYouEntranceDisclosure),children:e}),M&&d(Td,{open:R,id:r,duration:E,children:d("div",{className:v(pw.DisclosureDetails,f.value&&mw.ThankYouEntranceDisclosure,Ce({colorLayer:"base",colorScheme:u,backgroundColor:"baseSpecified"})),style:L,children:d("div",{className:pw.DisclosureDetailsContent,children:d(fu,{children:d(SE,{children:t})})})})})]})})})}function dE({children:e}){const{content:{container:t="fill"}={}}=jy();return uS(e)?d("div",{className:v(pw.Content,pw[$("Content-container",t)]),children:e}):null}function pE({children:e}){const{checkout:t}=oe();return t.checkoutExit.isExiting.value?null:d(y,{children:e})}function mE({children:e}){const{main:{colorScheme:t="scheme1",inlineSize:n,backgroundImage:a}={},content:{divider:{visibility:i}={}}}=jy(),{client:o}=oe(),s=o.unstable_getSerialization("shop").enabledFlags.includes(pi),l=r(()=>({current:t}),[t]);if(!uS(e))return null;const c=a?{backgroundImage:`url(${JSON.stringify(a)})`}:void 0;return d("div",{className:v(pw.Main,"fill"===n&&pw["Main-inlineSizeFill"],("visible"===i||!s&&void 0===i)&&pw["Main-divided"],Ce({colorLayer:"base",colorScheme:t,backgroundColor:"baseSpecified"})),style:c,children:d("div",{className:pw.MainContent,children:d(Kp.Provider,{value:l,children:d(fu,{children:e})})})})}function hE({children:e}){const{footer:{position:t="inline",container:n="fill",colorScheme:r,background:a,divided:i}={}}=jy(),{checkout:o}=oe(),s=cw(),l=uw();if(o.checkoutExit.isExiting.value||!uS(e))return null;const c=i??"end"===t;return d("footer",{className:v(pw.Footer,pw[$("Footer-position",t)],pw[$("Footer-container",n)],c&&pw["Footer-divided"],s&&"qdIKq","end"===t&&Ce({colorLayer:"base",colorScheme:r,backgroundColor:"subdued"===a?"subdued":"baseSpecified"})),"data-inspector-id":"footer",children:d("div",{className:v(pw.FooterContent,l.value&&mw.ThankYouEntranceFooter),children:d(fu,{children:d(aw,{section:"footer",children:e})})})})}function gE(e){return t=>t?e[t]:void 0}function fE(e,{divider:{borderStyle:t}={}}={}){return t&&{[`--config-${e}-divider-border-style`]:gE(iE)(t)}}const yE={none:"0px",..._e.borderWidth};function vE(e,{divider:{borderWidth:t}={}}={}){return t&&{[`--config-${e}-divider-border-width`]:gE(yE)(t)}}function _E(e,{inlineSize:t}={}){return isNaN(Number(t))||0===Number(t)?"main"!==e&&"order-summary"!==e&&"fill"===t?{[`--config-${e}-inline-size`]:"100%"}:void 0:{[`--config-${e}-inline-size`]:Se(Number(t))}}function bE(e,{padding:t}={}){if(Array.isArray(t)){const n=2===t.length?[t[0],t[1],t[0],t[1]]:t;return{[`--config-${e}-padding-block-start`]:gE(aE)(n[0]),[`--config-${e}-padding-inline-end`]:gE(aE)(n[1]),[`--config-${e}-padding-block-end`]:gE(aE)(n[2]),[`--config-${e}-padding-inline-start`]:gE(aE)(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`]:gE(aE)(t),[`--config-${e}-padding-inline-end`]:gE(aE)(t),[`--config-${e}-padding-block-end`]:gE(aE)(t),[`--config-${e}-padding-inline-start`]:gE(aE)(t),[`--config-${e}-padding`]:gE(aE)(t)}}function kE(e,{backgroundImage:t}={}){return t&&{[`--config-${e}-background-image`]:`url(${JSON.stringify(t)})`}}function PE(e,{marginBlockStart:t}={}){return t&&{[`--config-${e}-margin-block-start`]:gE(aE)(t)}}function SE({children:e}){const{environment:{isOnePageCheckout:t}}=jy(),n=lw();return t&&!n?d(QS,{visibleTargets:["purchase.checkout.cart-line-item.render-after","purchase.checkout.reductions.render-before","purchase.checkout.reductions.render-after"],children:e}):d(y,{children:e})}const wE={"--x-shell-header-padding":`${gE(aE)("large100")} ${gE(aE)("large200")} ${gE(aE)("none")} ${gE(aE)("large200")}`,"--x-shell-main-padding-block-start":`var(--config-main-padding-block-start, ${gE(aE)("large100")})`,"--x-shell-main-padding":`var(--config-main-padding-block-start, ${gE(aE)("large100")}) var(--config-main-padding-inline-end, ${gE(aE)("large200")}) var(--config-main-padding-block-end, ${gE(aE)("large200")}) var(--config-main-padding-inline-start, ${gE(aE)("large200")})`},CE={small:"10ch",base:"20ch",large:"30ch",full:"100%"},EE={FloatingLayer:"PXmun"},xE=qc("wallet-transition-disclosure-"),IE=qc("wallet-transition-main-content-");function AE({active:e,layer:t="foreground"}={}){const{embed:n,i18n:r}=oe(),a=!n,i=jc(void 0,xE),o=jc(void 0,IE),s=d("div",{className:`A5qhV ${"background"===t?"_4KRKW":EE.FloatingLayer}`,role:"status","aria-label":r.translate("general.loading"),style:k({[_e.global.borderRadius]:"12px"}),children:d(XC,{children:d(sE,{mainContentId:o,disclosureId:i,isDisclosureInteractive:!1,header:a?d(TE,{}):null,disclosure:d(DE,{}),main:d(NE,{}),orderSummary:d(zE,{})})})});return d(Zc,{children:d(x,{when:()=>e?.value??!0,children:s})})}function TE(){const{header:{alignment:e="start",logo:t}={}}=jy(),{shop:n}=oe(),r=t?.image?d(MS,{width:t.maxWidth}):d(CP,{level:1,accessibilityRole:"presentation",display:"inline",children:n.name});return d(nh,{gridTemplateColumns:"1fr",inlineSize:"100%",justifyItems:e,children:r})}function LE({inlineSize:e="base",size:t="small"}){return d(RS,{size:t,inlineSize:e})}function RE(){return d(kf,{type:"small",children:d(TS,{inlineSize:CE.full})})}function ME(){return d(Lf,{rowGap:"base",children:[d(LE,{size:"large",inlineSize:"small"}),d(Lf,{rowGap:"small-300",children:[d(RE,{}),d(RE,{})]})]})}function NE(){return d(Lf,{rowGap:"large-200",children:[d(ME,{}),d(pS,{}),d(ME,{}),d(pS,{}),d(ME,{})]})}function DE(){return d(Lf,{direction:"inline",justifyContent:"space-between",alignItems:"center",padding:"large-100 base",minBlockSize:"63px",inlineSize:"100%",children:[d(LE,{inlineSize:"base"}),d(LE,{size:"large",inlineSize:"small"})]})}function zE(){const{i18n:e}=oe(),{merchandiseThumbnail:t,global:n}=Km(),r=t.cornerRadius??n.cornerRadius??"base",a="fullyRounded"===r?"large":r,i=`${wS("base").inlineSize}px`;return d(Lf,{rowGap:"large-200",children:[d(kf,{accessibilityVisibility:"exclusive",children:e.translate("order_summary.shopping_cart_label")}),d(nh,{gridTemplateColumns:"auto minmax(0, 1fr) auto",gap:"base",alignItems:"center",children:[d(hf,{borderRadius:a,overflow:"hidden",children:d(TS,{contentDisplay:"block",inlineSize:i,aspectRatio:1})}),d(Lf,{rowGap:"small-500",children:[d(LE,{inlineSize:"base"}),d(LE,{inlineSize:"small"})]}),d(LE,{inlineSize:"small"})]}),d(OE,{})]})}function OE(){return d(Lf,{rowGap:"small-100",children:[[0,1,2].map(e=>d(Lf,{direction:"inline",justifyContent:"space-between",children:[d(LE,{inlineSize:"small"}),d(LE,{inlineSize:"small"})]},e)),d(Lf,{direction:"inline",justifyContent:"space-between",children:[d(LE,{size:"large",inlineSize:"small"}),d(LE,{size:"large",inlineSize:"small"})]})]})}function BE(){const{checkout:e,observability:t}=oe(),r=function(){const{checkout:{wallets:e}}=oe(),t=function(){const{shop:e,checkout:t}=oe(),r=e.hasFlagEnabled(an),{inMemoryApplePayParts:{subscriptionReviewTransition:a}}=rn();return n(()=>void 0!==a.value&&Dl({applePayThreePageVaultedReviewEnabled:r,isOnePageCheckout:t.configuration.layout.isOnePage.value}))}();return n(()=>{const n=void 0!==e.activeSession.value?.wallet&&"APPLE_PAY"!==e.activeSession.value.wallet&&Boolean(e.isDeceleratingSignal?.value);return t.value&&!n})}().value,o=Boolean(e.wallets.isDeceleratingSignal?.value),s=e.isCheckoutLayoutForcedToOnePage.value,l=PP(),{payNowButtonElement:c,payNowButtonSectionMounted:u}=Wk(),p=Boolean(c||l&&u),m=e.wallets.escalatedWallet.value,h=o&&p&&null!==m;a(()=>{h&&e.wallets.setIsDecelerating(!1)},[h,e.wallets]);const g=i(!1);return a(()=>{if(!s)return void(g.current=!1);if(!p||g.current)return;g.current=!0;const e={wallet:m};t.counter({name:"wallet_3page_vaulted_review_landed",value:1,attributes:e}),t.log("wallet_3page_vaulted_review_landed","Buyer reached the forced one-page wallet vaulted review",e)},[m,s,p,t]),r||!o?null:d(AE,{})}const FE=C({suspenseName:"review-block",id:()=>"ReviewBlock",displayName:"ReviewBlock",load:()=>E(()=>hl(()=>import("./9d12dea3.ZeWiKAwo.js"),__vite__mapDeps([107,1,2,3,4,5,108,32,33,34,109,71,16,63,53,54,18,52,55,37,38,110,111,112,113,114,14,115,116,117,118,119,120,121,122,123,40,41,124,125,126,127,128,11,15,17])))}),VE=C({displayName:"NoAddressLocationModal",load:()=>E(()=>hl(()=>import("./2f207ddc.C-NdRVJJ.js"),__vite__mapDeps([129,1,2,3,4,5,130,11,14,15,16,17,18])))});function UE(){return function(){const e=tc(),{journeyState:t}=ie(Zl);return n(()=>{const{currentPage:n,currentDetour:r}=e.value;return!(!n||r)&&!0===t.value.blockedByMissingLocationAddress})}().value?d(VE,{}):null}const qE=C({suspenseName:"information",displayName:"Information",load:()=>E(()=>hl(()=>import("./17324a0b.Ce7T0rTN.js"),__vite__mapDeps([131,1,71,109,2,3,4,5,16,63,53,54,18,52,33,55,37,38,32,34,110,111,132,133,134,135,78,79,51,136,113,137,138,130,139,81,6,84,140,56,141,142,143,144,145,122,146,147,148,59,12,17,149,150,151,152,153,154,155,128,11,14,15]))),renderError:$h}),jE=C({displayName:"NotFound",load:()=>E(()=>hl(()=>import("./60d61386.C15RyM04.js"),__vite__mapDeps([156,1,2,3,4,5,92,11,14,15,16,17,18]))),renderError:$h}),HE=C({displayName:"OffsitePaymentFailed",load:()=>E(()=>hl(()=>import("./656fad11.BwoZBn9X.js"),__vite__mapDeps([157,1,158,159,160,161,152,2,3,4,5,153,130,11,14,15,16,17,18]))),renderError:$h}),$E=C({suspenseName:"one-page",displayName:"OnePage",load:()=>E(()=>hl(()=>import("./f8706cb6.H5idtf8V.js").then(e=>e.m),__vite__mapDeps([162,3,1,4,2,5,133,71,134,135,78,79,51,33,136,109,16,63,53,54,18,52,55,37,38,32,34,110,111,113,137,138,130,139,81,6,84,140,56,141,142,143,144,145,122,146,147,148,59,12,17,149,163,44,45,164,9,165,91,92,61,166,167,168,169,40,41,123,124,170,15,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,14,188,112,114,115,116,117,118,119,189,190,60,191,192,193,194,195,196,197,198,199,200,201,202]))),renderError:$h}),YE=C({suspenseName:"one-page-review",displayName:"OnePageReview",load:()=>E(()=>hl(()=>import("./9e3968a8.Crc99nKZ.js"),__vite__mapDeps([203,1,2,3,4,5,132,123,33,110,40,41,124,163,44,45,164,9,165,63,91,92,61,16,166,134,135,138,130,167,125,112,113,114,14,115,116,117,118,119,126,204,205,81,82,20,206,207,208,50,64,137,139,209,210,211,18,212,173,213,10,142,214,120,121,177,178,179,122,215,146,147,183,11,15,17,216,127]))),renderError:$h});class WE extends Error{constructor(){super(...arguments),this.name="CardFieldsError"}}class GE extends Error{constructor(e,t){super(e,t),this.name="CardFieldsLoadError",this.diagnostics=t?.diagnostics}}class KE extends Error{constructor(){super(...arguments),this.name="CardFieldsSetupError"}}class JE extends Error{constructor(){super(...arguments),this.name="CardFieldsScriptTagOnErrorError"}}class QE extends Error{constructor(){super(...arguments),this.name="CardFieldsAppendChildError"}}class XE extends Error{constructor(){super(...arguments),this.name="CardFieldsExecutionError"}}class ZE extends Error{constructor(){super(...arguments),this.name="IFrameNotFoundError"}}class ex extends Error{constructor(e,t){super(e),this.name="CardFieldsFetchFailureError",void 0!==t&&(this.httpStatus=t)}toString(){const e=super.toString();return void 0===this.httpStatus?e:`${e} (HTTP Status: ${this.httpStatus})`}}const tx=class extends Error{constructor(){super(...arguments),this.name="CardFieldsOperationalError"}};tx.hostedFieldsName="CardFieldsError";let nx=tx;function rx({source:e,integrity:t},n=!0){const r=Date.now();function a(){return new Promise((n,r)=>{if(window.CardFields)return n();const a=document.createElement("script");a.async=!0,a.src=e,a.onload=()=>{if(window.CardFields)return n();setTimeout(()=>{if(!window.CardFields)return r(new XE);n()},0)},t&&(a.integrity=t),a.crossOrigin="anonymous",a.onerror=t=>{let n;n=t instanceof Event?new JE(`Event type: ${t.type}. ${ax(e)}`):new JE("string"==typeof t?`String error: ${t}. ${ax(e)}`:`unknown error type. ${ax(e)}`),document.head.removeChild(a),r(n)};try{document.head.appendChild(a)}catch(i){r(new QE("Failed to append child.",{cause:i}))}})}return(n?E(a):a()).catch(n=>{let a;try{const i="undefined"!=typeof performance&&"function"==typeof performance.getEntriesByName?performance.getEntriesByName(e,"resource"):[],o=i[i.length-1],s="undefined"==typeof navigator?void 0:navigator.connection;a=Object.fromEntries(Object.entries({errorCause:n instanceof Error?n.name.slice(0,128)||"Error":typeof n,underlyingCauseName:n instanceof Error&&n.cause instanceof Error?n.cause.name.slice(0,128)||"Error":void 0,elapsedMs:Date.now()-r,sdkIntegrity:t?.slice(0,512),networkType:s?.type,networkDownlink:s?.downlink,networkRtt:s?.rtt,networkSaveData:s?.saveData,documentReadyState:document.readyState,documentVisibilityState:document.visibilityState,resourceDurationMs:o?.duration,resourceTransferSize:o?.transferSize,resourceStatus:o?.responseStatus||void 0}).filter(([,e])=>void 0!==e))}catch{a=void 0}throw new GE(`Failed to load CardFields SDK. ${ax(e)}`,{cause:n,diagnostics:a})})}function ax(e){return`Script src: ${e} . Internet connection boolean: ${"undefined"==typeof navigator?"navigator not available":navigator.onLine}`}function ix(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var ox,sx;const lx=ix(sx?ox:(sx=1,ox={SDK_INTEGRITY:"sha256-fu1lH6QOfb8dybbxZiwh4q3DLqiMxbI+Knm2GsdIxqc=",SDK_URL:"https://checkout.pci.shopifyinc.com/build/09497de/card_fields.js"}));function cx(){const{environment:e}=oe(),t=e.services.hostedFields.url;return t===lx.SDK_URL?{source:t,integrity:lx.SDK_INTEGRITY}:{source:t}}const ux=C({suspenseName:"payment",displayName:"Payment",load:()=>E(()=>hl(()=>import("./74122478.BHiyPbai.js"),__vite__mapDeps([217,1,168,3,4,2,5,169,40,41,123,33,110,124,143,32,34,144,170,15,171,172,173,174,18,164,9,165,175,176,218,7,8,136,109,71,16,63,53,54,52,55,37,38,111,219,177,178,179,142,220,155,188,221,122,182,212,222,223,89,224,200,108,132,141,150,151,225,205,138,130,81,82,20,206,207,152,153,226,154,227,228,199,197,229,11,14,17]))),renderError:$h,usePrefetch(){const e=function(){const e=cx();return t(()=>{rx(e)},[e])}();return t(()=>{e()},[e])}}),dx=C({displayName:"PostPurchase",load:()=>E(()=>hl(()=>import("./896e8dde.DtEqBzEE.js"),__vite__mapDeps([230,1,2,3,4,5,130,200,18,231,232,54,24,12,17,152,153,154,37,38,26,66,69,70,11,14,15,16,233]))),renderError:$h}),px=C({displayName:"Processing",load:()=>E(()=>hl(()=>import("./090b00f0.CMjvEOpG.js"),__vite__mapDeps([234,1,160,161,2,3,4,5,154,130,199,166,20,11,14,15,16,17,18,235]))),renderError:$h}),mx=C({suspenseName:"review",displayName:"Review",load:()=>E(()=>hl(()=>import("./b120ac11.DChaXT4D.js"),__vite__mapDeps([236,1,2,3,4,5,132,141,150,151,225,205,138,130,81,82,20,206,207,122,63,152,153,226,154,11,14,15,16,17,18]))),renderError:$h}),hx=C({suspenseName:"shipping",displayName:"Shipping",load:()=>E(()=>hl(()=>import("./289b89e4.D4ZocZOJ.js"),__vite__mapDeps([237,1,146,2,3,4,5,147,189,32,33,34,143,110,144,145,190,60,191,114,14,115,116,192,18,193,71,52,53,54,55,194,195,196,197,198,150,151,152,153,226,154,130,113,11,15,16,17]))),renderError:$h}),gx=C({displayName:"ShopPayLoginLoader",load:()=>E(()=>hl(()=>import("./9011490c.Cuc26vX4.js"),__vite__mapDeps([238,1,2,3,4,5,239,18,186,174,177,178,179,240,78,79,134,135,115,92,215,146,147,50,183,11,14,15,16,17,216,130,241]))),renderError:$h}),fx=C({displayName:"StockProblems",load:()=>E(()=>hl(()=>import("./0cd5b134.D3PmATiN.js"),__vite__mapDeps([242,1,243,158,159,150,151,152,2,3,4,5,153,244,154,130,245,11,14,15,16,17,18]))),renderError:$h}),yx=C({displayName:"StockProblemsModal",load:()=>E(()=>hl(()=>import("./a9ba8e86.qHITXxKm.js"),__vite__mapDeps([246,1,2,3,4,5,245,244,154,130,201,11,14,15,16,17,18]))),renderError:$h}),vx=Yh("ThankYou"),_x=C({suspenseName:"thank-you",displayName:"ThankYou",useError:function(e){const{client:t,observability:n,graphql:{coreGraphql:r}}=oe(),a=sc(),o=a.value?.id,s=a.value?.orderStatusPageUrl,c=t.unstable_getSerialization("sessionToken"),u=i(!1);vx(e),l(()=>{if(!e||u.current)return;function t(e,t,r){t&&(u.current=!0),n.log("thank_you_recovery","[LazyLoad] ThankYou recovery",{outcome:e,waitedMs:r},{exportImmediately:!0,requiresKeepalive:!0}),t&&location.replace(t)}const a=new URLSearchParams(location.search).get("prevent_order_redirect");if(null!==a&&"false"!==a)return void t("prevented");if(s)return void t("redirect",s);if(!o)return void t("not_processed");let i=!1;const l=Date.now();return(async()=>{for(;Date.now()-l<1e4;){if(await F(Yn),i)return;let e;try{const{data:t}=await r.staticQuery(G_,{cache:!1,variables:{receiptId:o,sessionToken:c}});"ProcessedReceipt"===t?.receipt?.__typename&&(e=t.receipt.orderStatusPageUrl)}catch{}if(i)return;if(e)return t("polled",e,Date.now()-l)}t("timed_out")})(),()=>{i=!0}},[r,e,n,s,o,c])},load:()=>E(()=>hl(()=>import("./909cc5d6.CNFDWHQS.js"),__vite__mapDeps([247,1,2,3,4,5,223,47,150,151,122,63,152,153,154,130,117,115,114,14,116,191,192,40,41,30,31,110,178,140,139,56,134,135,52,53,54,18,33,55,211,61,123,124,120,121,248,77,249,250,243,158,159,206,251,37,38,142,252,253,254,190,60,209,210,17,146,147,183,11,15,16,255])),{maxAttempts:1})}),bx=C({displayName:"Throttle",load:()=>E(()=>hl(()=>import("./01f1d1bd.CwS7p3FA.js"),__vite__mapDeps([256,1,2,3,4,5,122,63,153,130,85,11,14,15,16,17,18,257]))),renderError:$h}),kx="URL not specified for Chat: Please configure your extension to include extensions.targeting.preloads.chat",Px="URL specified for Chat: The URL specified in extensions.targeting.preloads.chat must not be the same origin as the checkout host.",Sx="Scope not granted for Chat: Please request access in Partners dashboard to Chat in checkout extensions",wx="224px",Cx="72px",Ex=72,xx="415px",Ix="700px",Ax="100dvi",Tx="93dvb",Lx=new Set(["Chat","s-chat"]);var Rx={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 Mx({accessibilityVisibility:e,children:t,color:n="base",size:r,id:a,textAlign:i,textWrap:o,translate:s,kerning:l,letterCase:c,fonts:u,decoration:p,type:m="paragraph",tone:h="auto",dir:g,lang:f,lineClamp:y}){const _=null!=y&&Number.isFinite(y)&&y>=1?Math.floor(y):void 0,b=null==_?void 0:k({[Rx.lineClampCount]:String(_)}),P=(!0===s?"yes":void 0)??(!1===s?"no":void 0),S="exclusive"===e?Rx.accessibilityVisibilityVariant[e]:v(Rx.Paragraph,"small"!==m&&r&&Rx.sizeVariant[r],h&&Rx.toneVariant[h],n&&("auto"===h||"neutral"===h)&&Rx.colorVariant[n],i&&"auto"!==i&&Rx.textAlignVariant[i],o&&"wrap"!==o&&Rx.textWrapVariant[o],l&&Rx.kerningVariant[l],c&&Rx.letterCaseVariant[c],u&&Rx.fontsVariant[u],p&&Rx.decorationVariant[p],null!=_&&Rx.lineClamp,Rx.typeVariant[m],{notranslate:!1===s});return d(Cd.Provider,{value:!0,children:d("p",{"aria-hidden":"hidden"===e||void 0,className:S,id:a,translate:P,dir:g,lang:f,style:b,children:t})})}function Nx({email:e,phone:t,emailInputError:n,phoneInputError:r,hasViolations:a}){const i=!e&&!t,o=Boolean(n)||Boolean(r);return i||o||a}function Dx(e){const t=e?.filter(({quantity:e})=>e>0)??[];return t.length>0&&t.every(({requiresShipping:e})=>!e)}function zx({isFlagshipPartner:e,hasError:t,hasOnlyDigitalItems:n}){return e&&!t&&!n}function Ox({violations:e}){return n(()=>e.value.size>0)}const Bx=ae("VaultedSectionsContext");function Fx(){const e=h(Bx);return n(()=>e?e.value:{contact:!1,delivery:!1,payment:!1,billing:!1})}function Vx(){const e=Fx();return n(()=>e.value.contact&&e.value.delivery&&e.value.payment)}function Ux(){const e=Fx(),{checkout:t,embed:r,source:a}=oe(),{validation:{contactErrors:{emailInputError:o,phoneInputError:s}}}=t,{current:l}=t.identity,c=Ox(by(hi)),u=jy(),d=Km(),p=I(u.main.section),m=I(d.vaulted),h=i(!1);return n(()=>{const n=gi(p.value),i=gi(m.value),{contact:u,delivery:d,payment:g}=e.value,f=fi({isContactVaulted:u,configuration:t.configuration,identity:t.identity,embed:r}),y=(()=>{if("sdkCartHints"!==l.value)return h.current=!1,f;if(!f)return h.current=!1,!1;const e=t.proposal.negotiated.fields.merchandiseLines.value?.lines;return zx({isFlagshipPartner:r?.isFlagshipPartner??!1,hasError:Nx({email:t.proposal.proposed.email.value,phone:t.proposal.proposed.phone.value,emailInputError:o.value,phoneInputError:s.value,hasViolations:c.value}),hasOnlyDigitalItems:Dx(e)})?h.current:(h.current=!0,!0)})(),v=!Mn(a)&&yi({checkout:t}),_=d&&t.isShippingRequired.value;return!!(y||_||g||v)&&(n||i)})}function qx(){const{embed:e,shop:t,checkout:n,router:r,i18n:a}=oe(),i=e?.interstitialPartnerDisplayName,{plan:o}=tc().value,c=r.currentUrl.value.normalizedPath,u=ia({embedder:e?.embedder}),p=Fx(),{delegatedPaymentInstrument:h}=n.negotiator.context,g=m(!1);l(()=>{g.value=Boolean(h.peek())},[h,g]);const[f]=s(()=>{const e=n.proposal.proposed;return{contact:Boolean(e.email.peek()||e.phone.peek()),delivery:(t=e.shippingAddress.peek(),Object.entries(t).some(([e,t])=>"countryCode"!==e&&"zoneCode"!==e&&vi(e)&&null!=t&&("string"!=typeof t||t.trim().length>0)))};var t});if(!function(e,t){return!!e.greenPath.some(({route:e})=>e===t)||e.detours.some(({type:e,route:n})=>"stockProblems"===e&&n===t)}(o,c))return null;if(!u)return null;if("sdkCartHints"!==n.identity.current.value)return null;if(!i)return null;const y=p.value.contact&&f.contact,v=p.value.delivery&&f.delivery,_=p.value.payment&&g.value;return y||v||_?d(nh,{gridTemplateColumns:"auto 1fr",gap:"small",background:"subdued",borderWidth:"none none base none",padding:"base",children:[d(lh,{type:"info"}),d(Mx,{textWrap:"pretty",children:a.translate("merchant_redirect.partner_interstitial.account_source_banner",{shop_name:t.name,partner_name:i})})]}):null}const jx=C({id:()=>"AnnouncementRuntimeExtensions",displayName:"AnnouncementRuntimeExtensions",load:()=>hl(()=>import("./28ac86c0.Dl9oBX48.js").then(e=>e.A),__vite__mapDeps([27,1,2,3,4,5,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,13,46,26,47,48,49,17,50,51,52,53,54,18,55,56,57,58]))});function Hx(){const e=$S("purchase.thank-you.announcement.render");return r(()=>{const[t]=ui(e,"uiExtension");return t?[t]:[]},[e])}const $x=/Version\/(\d+)\.(\d+)\sMobile\/\w+\sSafari/,Yx=/Version\/(\d+)[\d.]*.*Safari/,Wx=/Chrome\/|Edg(?:e|iOS|A)?\//,Gx=/FBAN|FB_IAB|FBAV|Instagram/;function Kx(){return Gx.test(navigator.userAgent)}const Jx=0,Qx=1,Xx=2,Zx=4,eI=5,tI=new Map([["legacy",0],["block",1],["inline",2],["grid",3],["list",4],["grid-compact",5]]);function nI(e,t){return tI.get(e)===t}function rI(e){const t=tI.get(e);return 3===t||5===t}function aI(e){return"string"==typeof e&&tI.has(e)}const iI=f(null);function oI(){return h(iI)}iI.displayName="ChoiceListContext";const sI=f(null);function lI(){return h(sI)||{}}function cI(){return lI().redesigned??!1}sI.displayName="ChoiceListStyleContext";const uI=f(void 0);function dI(e){return nI(e,1)||nI(e,5)}function pI(e){const t=h(Yu)?.redesignedChoiceLists??!1,n=h(uI);return t&&"base"!==n&&dI(e)?"redesigned":"base"}uI.displayName="ChoiceListPresentationOverrideContext";var mI={Actions:"u2pextj u2pexti _1fragem82 _1fragem9v _1fragemtq _1fragemrx _1fragem6t _1fragempu",ActionsScrollShadow:"u2pext1r",actionLayoutVariant:{inline:"u2pextm u2pextk _1fragemx8 _1fragembu",stacked:"u2pextn u2pextl _1fragemxc _1fragemcd"},Content:"u2pext15 u2pext14 _1fragemyn",contentPaddingVariant:{base:"u2pext1t u2pext1s _1fragemtq _1fragemrx",none:"u2pext1u"},CloseButton:"u2pext1p u2pext1o _1fragempa _1fragemr3 _1fragemnh _1fragemsw _1fragemwn _1fragem10x _1fragem5u _1fragem133 _1fragem12k _1fragem12p _1fragem12e _1fragem130",Footer:"u2pextt _1fragemyo",Header:"u2pext1e u2pext1d _1fragem64 _1fragembe _1fragem19",HeaderContent:"u2pext1l _1fragemyn _1fragemvo",headerContentPaddingVariant:{base:"u2pext1m",none:"u2pext1n"},headerPaddingVariant:{base:"u2pext1i u2pext1f _1fragemtq _1fragemrx",large:"u2pext1j u2pext1g _1fragemtq _1fragemrx",extraLarge:"u2pext1k u2pext1h _1fragemtq _1fragemrx"},IFrame:"u2pext17 u2pext16 _1fragemeg _1fragemdw _1fragemf0 _1fragemdc _1fragem5u",iframeBlockSizeVariant:{fill:"u2pext18",auto:"u2pext19"},iframePaddingVariant:{base:"u2pext1b u2pext1a _1fragemtq _1fragemrx _1fragempu",none:"u2pext1c"},Modal:"u2pextv u2pextu _1fragemup _1fragemv4 _1fragem64 _1fragem73 _1fragemzf _1fragem5p _1fragemve _1fragemxx _1fragemy5 _1fragem133 _1fragem12n _1fragem12d _1fragem12q",Overlay:"u2pexth u2pextg _1fragem108 _1fragem10n _1fragemzt _1fragem112 _1fragemwn _1fragem64 _1fragem1j _1fragem132 _1fragem11k _1fragem12l _1fragem12q _1fragem12f",requestedBlockSize:"var(--u2pextd)",availableBlockSize:"calc(100dvb - var(--u2pext7) - var(--u2pext9))",ScrollBox:"u2pextx u2pextw _1fragem6t _1fragemuk _1fragemv4",scrollBoxActionsVariant:{withActions:"u2pexty",noActions:"u2pextz"},scrollBoxPaddingVariant:{gap:"u2pext11 u2pext10 _1fragem8c _1fragema5",none:"u2pext12",blockStart:"u2pext13"},secondaryActionLayoutVariant:{inline:"u2pextr u2pextp _1fragemx8",stacked:"u2pexts u2pextq _1fragemxc"},SecondaryActions:"u2pexto _1fragem82 _1fragem9v _1fragem6t _1fragemyn",transitionVariant:{entered:"u2pext1",exit:"u2pext2",exiting:"u2pext3",enter:"u2pext4",entering:"u2pext5",exited:"u2pext6"},MobileSafari26BarTop:"u2pext1x u2pext1w u2pext1v _1fragem6y _1fragemwn _1fragem10n _1fragem112 _1fragem11z _1fragem132",MobileSafari26BarBottom:"u2pext1y u2pext1w u2pext1v _1fragem6y _1fragemwn _1fragem10n _1fragem112 _1fragem11z _1fragem132",ModalContentCrossFadeTarget:"u2pext0",overlayMobileSafari26:"u2pext1z"};const hI=qc("Modal");function gI(e){const t=jc(e.id,hI),n=Ou("modal");if(n){const{active:r,setActive:a}=n;n.setActivatorAttributes({"aria-haspopup":"dialog"}),n.attach("onClick",()=>{a(!0)});const i=()=>{a(!1),"function"==typeof e.onHide&&e.onHide()},{children:o}=e;return d(vI,{...e,id:t,onHide:i,open:r,children:uS(o)&&d(Iu,{children:o})})}return d(vI,{...e,id:t})}const fI={"small-100":300,small:300,base:480,"large-100":640,large:640,max:960};function yI(e){if("string"!=typeof e)return{};if(!e.endsWith("%"))return{[mI.requestedBlockSize]:e};const t=Number.parseFloat(e)/100;return{[mI.requestedBlockSize]:`calc(${mI.availableBlockSize} * ${t})`}}const vI=Hp(Dp(function({blocking:e,size:n="base",blockSize:r,open:o=!1,heading:l,source:c,iframeRef:u,onIframeLoad:p,iframeId:m,allow:g,accessibilityLabel:f,padding:_="base",primaryAction:b,secondaryActions:P,actionLayout:S="inline",footer:w,children:C,id:E,onAfterShow:x,onShow:I,closeButton:A="visible",dataTestIdForScrollableContent:T,...L}){const R=i(null),M=i(null),N=i(!1),D=h(Nu)?.openModalCount;a(()=>{if(o&&D)return D.value+=1,()=>{D.value=Math.max(0,D.value-1)}},[o,D]),o&&M.current!==o&&"function"==typeof I&&I(),M.current=o;const z="hidden"===A,{onHide:O,onAfterHide:B}=e?{}:L,[F,V]=s(),U=!r&&function(e){if(!e||"undefined"==typeof window)return!1;try{return new URL(e,window.location.href).origin!==window.location.origin}catch{return!1}}(c),q=r??(U||-1===F||"max"===n?"100%":void 0),j=function(e){return e.endsWith("px")}(n)?n:`${fI[n]}px`,{className:H,style:$,styleElement:Y}=$m({blockSize:q,maxInlineSize:`@media (inline-size >= extraSmall) ${j}, none`}),W={...$,...k(yI(Lp(q)))},G=Id(o,"slow"),[K,J]=s("");a(()=>{J(mI.transitionVariant[G])},[G]);const{isLocked:Q,lock:X,unlock:Z}=zf();a(()=>{o&&!Q&&X(),!o&&Q&&Z()},[Q,X,o,Z]),a(()=>{if("exited"===G&&(V(void 0),N.current&&("function"==typeof B&&B(),N.current=!1)),"entered"===G){if(E&&function(){const e=navigator.userAgent;if(Wx.test(e))return!1;const t=e.match(Yx);return!!t&&void 0!==t[1]&&26===parseInt(t[1],10)}()){const e=document.getElementById(E),t=document.activeElement,n=t instanceof HTMLElement&&!0===e?.contains(t)&&t.matches('input, textarea, select, [contenteditable="true"]');e&&!n&&e.focus()}"function"==typeof x&&x()}},[G,x,B,E]),a(()=>{o||(N.current=!0)},[o]),a(()=>{const t=t=>{"Escape"!==t.key&&"Esc"!==t.key||e||!o||!R.current?.contains(document.activeElement)&&document.getElementById(Hc)?.contains(document.activeElement)||"function"==typeof O&&O()};return document.addEventListener("keydown",t,!1),()=>{document.removeEventListener("keydown",t,!1)}},[e,o,O]);const ee=t(e=>{if(!r&&!U){const t=e.target;if(t?.contentWindow)try{V(t.contentWindow.document.body.scrollHeight)}catch{V(-1)}}p?.()},[r,p,U]),te=t(e=>{e.target===e.currentTarget&&"function"==typeof O&&O()},[O]);if("exited"===G)return null;const ne=l&&!f?$p(E):void 0,re=Boolean(b||P),ae=function(){const e=navigator.userAgent.match($x);return!!e&&"26"===e[1]}();return d(Zc,{children:d(uI.Provider,{value:void 0,children:[Y,d("div",{ref:R,className:v(mI.Overlay,K,ae&&mI.overlayMobileSafari26),onMouseDown:te,children:d(Mf,{children:d("div",{id:E,className:v(mI.Modal,K,H),role:"dialog","aria-modal":!0,style:W,"aria-label":f,"aria-labelledby":ne,children:[c?d(y,{children:d(fu,{level:2,children:[d(_I,{id:E,hideCloseButton:z||e,onHide:O,heading:l}),d(SI,{source:c,iframeRef:u,iframeId:m,allow:g,accessibilityLabel:f,heading:l,iframeHeight:F,blockSize:r,fillAvailableBlockSize:Boolean(q),handleIFrameLoad:ee,padding:_})]})}):d("div",{className:v(mI.ScrollBox,o&&mI.ModalContentCrossFadeTarget,mI.scrollBoxPaddingVariant["base"===_?l?"gap":"blockStart":"none"],mI.scrollBoxActionsVariant[re||w?"withActions":"noActions"]),"data-testid":T,children:[d(fu,{level:2,children:[d(_I,{id:E,hideCloseButton:z||e,onHide:O,padding:_,heading:l}),d(PI,{padding:_,children:C})]}),re&&d("div",{className:mI.ActionsScrollShadow})]}),w&&d("div",{className:mI.Footer,children:d(Sd.Provider,{value:!1,children:d(Iu,{children:w})})}),re&&d(bI,{primaryAction:b,secondaryActions:P,actionLayout:S})]})})}),ae&&d(y,{children:[d("div",{className:v(mI.MobileSafari26BarTop,K)}),d("div",{className:v(mI.MobileSafari26BarBottom,K)})]})]})})},{overlayType:"modal"}));function _I({hideCloseButton:e,id:t,onHide:n,padding:r,heading:a}){const i="string"==typeof a?d(CP,{level:1,children:a}):a;return!i&&e?null:d("div",{className:v(mI.Header,mI.headerPaddingVariant[i?"base":"base"===r?"large":"extraLarge"]),children:[i&&d("div",{id:$p(t),className:v(mI.HeaderContent,mI.headerContentPaddingVariant[e?"none":"base"]),children:i}),!e&&d(kI,{onHide:n})]})}function bI({primaryAction:e,secondaryActions:t,actionLayout:n="inline"}){return d(Iu,{children:d("div",{className:v(mI.Actions,mI.actionLayoutVariant[n]),children:[("inline"===n||uS(t))&&d("div",{className:v(mI.SecondaryActions,mI.secondaryActionLayoutVariant[n]),children:t}),e]})})}function kI({onHide:e}){const t=Ju();return d("button",{type:"button",className:mI.CloseButton,onClick:()=>{"function"==typeof e&&e()},"aria-label":t("closeModal")||"Close",children:d(lh,{type:"x",size:"base"})})}function PI({children:e,padding:t="base"}){return uS(e)&&d("div",{className:v(mI.Content,mI.contentPaddingVariant[t]),children:d(Sd.Provider,{value:!1,children:d(zS,{children:e})})})}function SI({source:e,iframeRef:t,iframeId:n,allow:r,accessibilityLabel:a,heading:i,iframeHeight:o,fillAvailableBlockSize:s,handleIFrameLoad:l,padding:c="base"}){const u=r;return d("iframe",{src:e,title:a??("string"==typeof i?i:void 0),name:n,className:v(mI.IFrame,mI.iframeBlockSizeVariant[s?"fill":"auto"],mI.iframePaddingVariant[c]),ref:t,onLoad:l,id:n,...o&&o>0&&{style:{height:o}},...u?{allow:u}:void 0})}function wI({submitButtonAppearance:e,submitText:t,cancelText:n,loading:r,disabled:a,handleSubmit:i,handleCancel:o}){const s=Boolean(n),l=Boolean(t);return d(nh,{gridTemplateColumns:s&&l?"1fr 1fr":"1fr",gap:"base",inlineSize:"100%",children:[s&&d(Cf,{variant:"secondary",inlineSize:"fill",onClick:o,children:n}),l&&d(Cf,{variant:"primary",inlineSize:"fill",disabled:a,loading:r,type:"submit",tone:e,onClick:i,children:t})]})}const CI=["deliveryNext","taxes","landedCostDetails","remoteTaxDetails","total"];var EI=(e=>(e.Truck="truck",e.PackageDelivery="package-delivery",e.Store="store",e.Location="location",e))(EI||{});const xI=ae("DeliveryMethodsContext"),II=f(void 0);function AI(){return ie(xI)}function TI(){return h(II)}function LI(e){const t=h(xI),r=CI.includes(e);return n(()=>r&&(t?.initialReconciliationPending.value??!1))}function RI(e){return e/bi}function MI(){const{i18n:e}=oe();return t(t=>{if("number"==typeof t){const n=Math.ceil(RI(t));return n<1?null:e.translate("shipping.estimated_delivery_date",{count:n})}const{lower:n,upper:r}=t;if(void 0===n||void 0===r)return null;const a=Math.ceil(RI(n)),i=Math.ceil(RI(r));return i<1?null:a<1||a>i?e.translate("shipping.estimated_delivery_date",{count:i}):e.translate("shipping.estimated_delivery_date_range",{minimum:a,maximum:i})},[e])}function NI(){const{checkout:{negotiator:e}}=oe(),t=e.current.fields.deliveryNext,r=Ve();return n(()=>{const e=t.value;return!(!e||"unavailable"===e.status||r.value.enabledDeliveryMethods.length>1)&&e.lines.every(e=>"not_required"===e.status||"available"===e.status&&e.methods.length<2)})}function DI(){const{checkout:{negotiator:e}}=oe(),{deliveryNext:t,allViolations:r}=e.current.fields,a=sn("deliveryNext");return n(()=>{const e=t.value,n=a.value,i=r.value;if(n)return{value:null,loading:n};const o=i?.some(({code:e})=>ki.has(e));return{value:"unavailable"===e?.status&&(e.hasNoDeliveryMethods||o||!1),loading:!1}})}function zI(){const{checkout:{negotiator:e}}=oe(),{allViolations:t}=e.current.fields,r=sn("deliveryNext");return n(()=>{const e=r.value;return e?{value:null,loading:e}:{value:t.value?.some(({code:e})=>Pi.has(e))??!1,loading:!1}})}function OI(){const{checkout:{negotiator:e}}=oe(),{deliveryLines:t}=e.parts;return n(()=>{const e=t.value;return e.length>0&&e.every(e=>{const t=e.value?.deliveryMethodTypes;return 1===t?.length&&"PICK_UP"===t[0]})})}function BI(e){return(e??[]).filter(e=>e.requiresShipping).reduce((e,t)=>e+(t.quantity??0),0)}function FI(){const e=_i();return n(()=>{const t=e.value;if(!t)return{};const n={};for(const e of t){if("available"!==e.status)continue;const t=Et(e);if(!t)continue;const{methodType:r}=t,a=BI(e.targetMerchandiseLines);n[r]=(n[r]??0)+a}return n})}function VI(){const{checkout:e,i18n:t}=oe(),n=AI(),r=e.crossBorderConfirmState.value,a=Boolean(r&&!r.onCancel),i=yh(),o=r?()=>{r.onConfirm(n),i(t.translate("split_delivery.cross_border.banner"))}:void 0;return d(gI,{id:"cross-border-consolidation-modal",open:Boolean(r),heading:a?t.translate("split_delivery.cross_border.modal.country_changed_heading"):t.translate("split_delivery.cross_border.modal.heading"),onHide:r?.onCancel,closeButton:a?"hidden":"visible",primaryAction:d(wI,{handleSubmit:o,handleCancel:r?.onCancel,submitText:a?t.translate("general.continue_button_label"):t.translate("split_delivery.cross_border.modal.change_country"),cancelText:a?void 0:t.translate("address_management.address_form.cancel")}),children:d(kf,{children:t.translate("split_delivery.cross_border.modal.content")})})}function UI(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 qI(e){let t=!1,n=!1;for(const r of e){const e=r.includes("SHIPPING");for(const a of r)if("NONE"!==a)if("SHIPPING"!==a)if("PICK_UP"!==a){if("LOCAL"!==a||!e)return!1}else n=!0;else t=!0}return t&&n}function jI(e){return(e.value.targetMerchandiseLines??[]).some(e=>e.requiresShipping)}function HI(){const{shop:e,checkout:{negotiator:t}}=oe(),{deliveryNext:r}=t.current.fields,a=tc();return n(()=>function({deliveryNext:e,isThankYouPage:t,proposedDeliveryLines:n,splitShipPickupUiEnabled:r}){if(!r)return!1;const a=qI(je(e).filter(e=>"available"===e.status).map(e=>e.methods.map(({methodType:e})=>e)));return t?a:!!Boolean(e&&"supportsSplitDeliveryMethod"in e&&e.supportsSplitDeliveryMethod)&&function(e){const t=e.filter(jI);return qI(e.map(e=>e.value.deliveryMethodTypes))&&t.some(e=>e.value.deliveryMethodTypes.includes("SHIPPING"))&&t.some(e=>e.value.deliveryMethodTypes.includes("PICK_UP"))}(n)}({deliveryNext:r.value,isThankYouPage:Oy(a.value.currentDetour),proposedDeliveryLines:t.parts.deliveryLines.value,splitShipPickupUiEnabled:e.shipPickupInOneOrderEnabled}))}function $I(e){const t=i(e);return a(()=>{t.current=e},[e]),t}function YI(){return(()=>{const{userEvents:e,shop:{id:t},checkout:{identity:n,negotiator:r},source:i}=oe(),o="shopPay"===n.current.value,s=r.current.fields.buyerIdentity.value?.customerProfile,{negotiating:l,methods:c}=AI(),u=Si();a(()=>{!l.value&&c.value.includes("PICK_UP")&&e.monorailEvent({schemaId:"local_pickup_checkout/3.1",payload:{checkoutToken:i.checkoutSessionIdentifier||"",eventType:"checkout_pickup_tab_selected",shopId:parseInt(ue(t),10),numberLocationsFound:u.value?.methods.length,userId:s?.id?parseInt(ue(s.id),10):void 0,checkoutSurface:o?"shop_pay":"guest_checkout"}})},[s?.id,l.value,o,u.value?.methods.length,e,c.value,i.checkoutSessionIdentifier,t])})(),(()=>{const e=i(),{userEvents:t,shop:{id:n},checkout:{identity:r,negotiator:o},source:s}=oe(),l="shopPay"===r.current.value,c=o.current.fields.buyerIdentity.value?.customerProfile,u=Si(),d=u.value?.selectedDeliveryMethodHandle,p=u.value?.methods;a(()=>{const{locationId:r,selectedLocationRank:a}=((e,t)=>{const n=t=>t.handle===e,r=t?.findIndex(n),a=t?.find(n)?.originLocation?.id;return{locationId:a,selectedLocationRank:r}})(d,p);r&&d!==e.current&&(e.current=d,t.monorailEvent({schemaId:"local_pickup_checkout/3.1",payload:{eventType:"checkout_pickup_location_selected",checkoutToken:s.checkoutSessionIdentifier||"",shopId:parseInt(ue(n),10),locationId:ue(r),selectedLocationRank:a,userId:c?.id?parseInt(ue(c.id),10):void 0,numberLocationsFound:p?.length||0,checkoutSurface:l?"shop_pay":"guest_checkout"}}))},[c?.id,l,p,t,d,s.checkoutSessionIdentifier,n])})(),(()=>{const e=mg(),t=HI(),r=tc(),a=n(()=>t.value&&!Oy(r.value.currentDetour));S(()=>{a.value&&o(()=>{e("splitShipAndPickupIntent",{timestamp:new Date})})})})(),null}function WI(e,t){const n=e.find(Ci),r=t.find(Ci);return!n&&r?{direction:"entering",pickupType:r}:n&&!r?{direction:"leaving",pickupType:n}:{direction:"none"}}const GI=["phone","company","address2"];function KI(){const{checkout:e,shop:n}=oe(),{locationAddress:r,shippingAddress:a}=e.negotiator.parts,o=n.hasFlagEnabled(Ei),s=i(r.peek()),l=i(!1);return{syncLocationAddressFromShipping:t((t,n)=>{if(o)return;if("entering"!==WI(t,n).direction)return;if(l.current)return;const i=s.current;if(i&&!function(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}(r.value,i))return void(l.current=!0);const c=a.value;if(!c?.countryCode)return;const{isRequired:u}=e.configuration.addressSettings.nonBillingAddressSettings.value,d=function(e){if(e.coordinates)return!0;const{address1:t,city:n,firstName:r,lastName:a}=e;return!!(t&&n&&r&&a)&&GI.every(t=>e[t]||!(e=>u(e,{countryCode:c.countryCode,useMerchantSettings:!0}))(t))}(c)?c:{};r.value=xi(d,c.countryCode,c.zoneCode),s.current=r.value},[e,o,r,a])}}function JI(e){const t=e.filter(e=>"SHIPPING"===e||"LOCAL"===e);return t.length>0?t:1===e.length&&"PICK_UP"===e[0]?["PICK_UP"]:1===e.length&&"PICKUP_POINT"===e[0]?["PICKUP_POINT"]:void 0}function QI({children:e}){const s=i(void 0),{i18n:c,checkout:u,observability:p,shop:h,router:g,webMcp:f}=oe(),y=h.hasFlagEnabled(Ii),v=m(!1),_=m(!1),b=Ch(),{negotiate:k}=nc(),{loading:P}=u.negotiator,w="shopPay"===u.identity.current.value,C=Ve(),E=i(new Set),A=i(),{correctShippingAddress:T}=function(){const{shopPay:e,checkout:n}=oe(),{shippingAddress:r}=n.negotiator.parts,a=wi(),i="shopPay"===n.identity.current.value,o=t(()=>{if(!a.value||n.negotiator.current.fields.mustSelectProvidedAddress.value)return;const t=e.session.selectedShippingAddress.value;if(!t?.address)return;const i=n.configuration.addressSettings.nonBillingAddressSettings.value.isRequired("phone"),o=e.user.phoneNumber.value;r.value={...t?.address,phone:i&&!t?.address.phone?o:t?.address.phone}},[a,n.configuration.addressSettings.nonBillingAddressSettings,n.negotiator.current.fields.mustSelectProvidedAddress,r,e.user.phoneNumber,e.session.selectedShippingAddress]);return{correctShippingAddress:t(e=>{i&&e.includes("SHIPPING")&&o()},[o,i])}}(),{syncLocationAddressFromShipping:R}=KI(),{preservePickupSelectionAcrossToggles:M}=function(){const{checkout:{negotiator:e}}=oe(),{deliveryLines:n}=e.parts,r=i({}),a=t((e,t)=>{const a=WI(e,t);if("leaving"!==a.direction)return"entering"===a.direction?r.current[a.pickupType]:void 0;r.current[a.pickupType]=function(e){return e.reduce((e,t)=>{const{type:n,deliveryMethodTypes:r,deliveryMethodHandle:a}=t.value;return r.some(Ci)?{...e,[n]:a}:e},{})}(n.value)},[n]);return{preservePickupSelectionAcrossToggles:a}}(),{billingAddressOption:N,deliveryLines:D,discountLines:z,merchandiseLines:O,shippingAddress:B,locationAddress:F}=u.negotiator.parts,V=HI(),{deliveryNext:U,shippingAddress:q}=u.negotiator.current.fields,j=U.peek(),H=m(Ai(B.peek())||Ai(q.peek())||null!=j&&"unavailable"!==j.status),$=w_();S(()=>{(Ai(q.value)||"filled"===U.value?.status||"partial"===U.value?.status)&&(H.value=!0)});const Y=g.currentUrlMatches("/stock-problems"),[W]=zh("ONE_TIME_PURCHASE"),G=I(W),[K,J]=Uh(),Q=function(){const{checkout:{negotiator:e}}=oe(),{parts:n}=e;return t(e=>{n.deliveryLines.value.forEach(t=>{t.value={...t.value,deliveryMethodHandle:e}})},[n.deliveryLines])}(),X=!y,Z=I(K),ee=n(()=>st(U.value)||Ti(D.value)||V.value),te=n(()=>ee.value?Z.value:G.value),ne=r(()=>{if(ee.peek())return;if(1!==(e=C.peek().enabledDeliveryMethods??[]).length||"PICK_UP"!==e[0])return;var e;const[t]=te.peek();return"PICK_UP"!==t?{activeMethod:t,targetMethod:"PICK_UP"}:void 0},[ee,te,C]),re=m(null!=ne),ae=n(()=>{if(u.proposal.negotiated.fields.mustSelectProvidedShippingRate.value)return te.value;if(!ee.value){const e=XI(C.value.enabledDeliveryMethods??[]),t="unavailable"===U.value?.status&&!H.value,[n]=te.value;return ne&&re.value&&!_.value?[ne.targetMethod]:t&&!_.value&&e&&"PICKUP_POINT"!==n?["SHIPPING"]:n?["LOCAL"===n?"SHIPPING":n]:[]}const e=te.value.filter(e=>"LOCAL"!==e);return!e.includes("SHIPPING")&&te.value.includes("LOCAL")&&e.push("SHIPPING"),e}),ie=t((e,t)=>{if($.value)return;const n=XI(e),r=XI(t);t.some(Ci)&&!r&&(!w&&n&&null==s.current&&(s.current=N.value),N.value="custom"),!r||n||w||(h.requireMatchingShippingAndBilling?N.value="shipping":null==s.current?N.value=h.sameBillingAndShippingAddress?"shipping":"custom":N.value=s.current,s.current=void 0)},[h,w,$,N]),se=i(ae.peek());S(()=>{const e=se.current,t=ae.value;se.current=t,e!==t&&o(()=>ie(e,t))});const le=t((e,t,n)=>{ie(t,e),se.current=e,T(e),n?F.value=n:R(t,e);const r=n?void 0:M(t,e),a=JI(e);L(()=>{h.shipPickupInOneOrderEnabled&&Li(D),J(e),h.shipPickupInOneOrderEnabled&&a&&Ri({deliveryLines:D,merchandiseLines:O.value,deliveryMethodTypes:a}),Q(void 0),r&&Mh(D,r),Mi(z),re.value=!1})},[ie,T,F,R,M,h.shipPickupInOneOrderEnabled,D,J,O,Q,z,re]),ce=t((e,t=ae.value,n)=>{const r=w||$.value||t.includes("SHIPPING")||!e.includes("SHIPPING")?["deliveryNext"]:[],a=qe(r);return le(e,t),v.value=!0,b?.dispatch?.("deliveryMethodChanged"),k({silenceViolations:a,onComplete:e=>{const t=P.value.has("deliveryNext");if("stale"===e.status&&t){const e=P.subscribe(t=>{t.has("deliveryNext")||(L(()=>{v.value=!1,n?.()}),e())})}else L(()=>{v.value=!1,n?.()})}})},[ae,w,$,le,v,b,k,P]),ue=n(()=>u.proposal.negotiated.fields.mustSelectProvidedShippingRate.value??!1),de=n(()=>Ia({checkout:u})),pe=n(()=>UI(C.value.enabledDeliveryMethods??[],de.value));l(()=>f?.unstable_provideFulfillmentController({getAvailableMethodTypes:()=>pe.value,getSelectedMethodTypes:()=>ae.value,markBuyerSelection:()=>{_.value=!0,re.value=!1},applyMethodChange:le,reconcileSameMethod(e){const t=JI(e);h.shipPickupInOneOrderEnabled&&t&&Ri({deliveryLines:D,merchandiseLines:O.value,deliveryMethodTypes:t})&&Mi(z)}}),[f,pe,ae,_,re,le,D,O,h.shipPickupInOneOrderEnabled,z]);const me=n(()=>{const e=ZI(pe.value,c,h,X);return ue.value?e.filter(e=>ae.value.includes(e.id)):e}),he=n(()=>{if(ue.value)return me.value;const e=E.current,t=UI([...C.value.enabledDeliveryMethods??[],...e],de.value),n=t.length>pe.value.length?ZI(t,c,h,X):me.value;return n.length>1&&n.forEach(t=>e.add(t.id)),n}),ge=r(()=>function({isStockProblems:e,shippingRequired:t,deliveryMethodOptions:n,mustSelectProvidedShippingRate:r,isSplitShipAndPickup:a,initialPickupOnlySelection:i,deliveryNext:o,currentSelectedMethods:s}){if(e)return;if(!t)return;const[l]=n;if(l&&!r&&!a){if(i?.activeMethod){const{activeMethod:e,targetMethod:t}=i;return{nextMethods:[t],previousMethods:["LOCAL"===e?"SHIPPING":e],loadingFields:CI}}if("filled"!==o?.status)return{nextMethods:[...n.find(e=>JSON.stringify(e)===JSON.stringify(s))??l],loadingFields:CI}}}({isStockProblems:Y,shippingRequired:Ni(u.proposal),deliveryMethodOptions:he.value.map(({value:e})=>e),mustSelectProvidedShippingRate:ue.value,isSplitShipAndPickup:V.value,initialPickupOnlySelection:ne,deliveryNext:U.value,currentSelectedMethods:ae.value}),[]),fe=m(null!=ge);S(()=>{const e=me.value,t=he.value;if(e===t||t.length<=1)return void(A.current=void 0);const n=JSON.stringify([t.map(({id:e})=>e),e.map(({id:e})=>e)]);A.current!==n&&(A.current=n,p.log("sticky_delivery_method_selector","Showing delivery method selector with previous delivery options because sellability narrowed",{previousOptionCount:t.length,currentOptionCount:e.length}))}),a(()=>{ge&&!_.value?ce(ge.nextMethods,ge.previousMethods,()=>{fe.value=!1})?.catch(e=>{L(()=>{v.value=!1,fe.value=!1}),p.error(e)}):fe.value=!1},[]);const ye=$I(t(e=>{const t=he.value.find(t=>t.id===e[0]);t&&(_.value=!0,ce(t.value))},[he,ce,_])),ve=n(()=>he.value.length<=1),_e=n(()=>{if(!ve.value)return{options:he,selected:ae,select:e=>{ye.current(e)},variant:X?"next":"default"}}),be=r(()=>({negotiating:v,initialReconciliationPending:fe,methods:ae,setSelectedMethodTypes:ce}),[v,fe,ae,ce]);return d(xI.Provider,{value:be,children:[d(YI,{}),d(x,{when:V,children:d(VI,{})}),d(II.Provider,{value:_e.value,children:e})]})}function XI(e){return e.includes("SHIPPING")||e.includes("LOCAL")}function ZI(e,t,n,r){const a=[],i="object"==typeof n.translations.delivery_options?n.translations.delivery_options:void 0,o=e.some(([e])=>"PICKUP_POINT"===e),s=e.find(([e])=>"SHIPPING"===e);if(s){const e=Boolean(i?.ship_to_address),n=!o||r&&!e?t.translate("delivery_options.ship"):t.translate("delivery_options.ship_to_address");a.push({id:"SHIPPING",value:s,label:n,icon:r?EI.PackageDelivery:EI.Truck})}const l=e.find(([e])=>"PICK_UP"===e);if(l){const e=Boolean(i?.pick_up),n=Boolean(i?.pick_up_from_store),s=o?n:e,c=o?t.translate("delivery_options.pick_up_from_store"):t.translate("delivery_options.pick_up"),u=o?t.translate("delivery_options.pickup_store"):t.translate("delivery_options.pickup");a.push({id:"PICK_UP",value:l,label:r&&!s?u:c,icon:r&&!o?EI.Location:EI.Store})}const c=e.find(([e])=>"PICKUP_POINT"===e);if(c){const e=Boolean(i?.pickup_point_method_definition),n=r&&!e?t.translate("delivery_options.pickup_point"):t.translate("delivery_options.pickup_point_method_definition");a.push({id:"PICKUP_POINT",value:c,label:n,icon:EI.Location})}return a}function eA(){const{i18n:e}=oe();return t((t,n={})=>{const r=new Date(t),a=new Date(Date.now()).getFullYear(),i=n.month??"long",o=r.getFullYear()>a?"numeric":void 0;return e.formatDate(r,{month:i,day:"numeric",year:o})},[e])}function tA(){const{shop:{captureAtFulfillmentEnabled:e},checkout:{negotiator:t}}=oe(),{buyerIdentity:r,paymentFlexibilityPaymentTermsTemplate:a}=t.current.fields;return n(()=>"FULFILLMENT"===a.value?.type&&!0===e&&!r.value?.purchasingCompany)}const nA=e=>"target"in e&&"$.availableRedeemables.redeemable"===e.target;function rA(e){switch(e.status){case"success":return!0;case"error":return!e.violations.some(Di);default:return!1}}function aA(e){return!(!e.cost||0===e.cost.amount)&&Boolean(e.method.redemptionContent)}function iA(e,t){if(!e||!t)return!1;if(e.redemptionSource!==t.redemptionSource)return!1;if("CUSTOM"===e.redemptionSource)return function(e,t){return!(!e||!t)&&(e?.paymentMethodIdentifier===t?.paymentMethodIdentifier&&function(e,t){return!(!e||!t)&&(e.length===t.length&&e.every(e=>t.some(t=>e.key===t.key&&e.value===t.value)))}(e?.redemptionAttributes,t?.redemptionAttributes))}(e.redemptionContent,t.redemptionContent);throw Error(`Equality method not supported for redemption source ${e.redemptionSource}`)}function oA(e){return e.maskedIdentifier?.slice(-4).toUpperCase()}function sA(e){return e?`•••• ${e}`:""}class lA extends Error{constructor(){super(...arguments),this.name="TooManyRedeemablePaymentMethodsError"}}function cA(){const{checkout:{negotiator:e}}=oe(),t=e.current.fields.paymentMethods;return n(()=>{const e=t.value?.flatMap(e=>"redeemable"===e.type&&"CUSTOM"===e.redemptionSource?[e]:[]);if(void 0!==e&&0!==e.length){if(e.length>1)throw new lA("There can only be a single custom redeemable payment method per redeemable type.\nGift card is currently the only supported redeemable type");return e[0]}})}function uA(){const e=cA(),[n,a]=s([]),i=zi("CUSTOM"),o=r(()=>i.value.filter(e=>!n.some(t=>iA(t,e.method))&&aA(e)),[i.value,n]),{checkout:{negotiator:l}}=oe(),{negotiate:c}=nc(),u=Boolean(e.value),d=t(e=>{const t=t=>"redeemable"!==t.type||"CUSTOM"!==t.redemptionSource||!iA(e,t),n=l.parts.paymentLines.value;l.parts.paymentLines.value=n.filter(e=>t(e.method));const r=l.parts.availableRedeemables.value;l.parts.availableRedeemables.value=r?.filter(e=>t(e.paymentMethod))},[l]),p=t((e,t)=>{const n=function(e,t){if(!t)return null;if(t.amount<=0)return null;return{method:e.paymentMethod,cost:{amount:mA,currencyCode:t.currencyCode}}}(e,t);if(n){const e=l.parts.paymentLines.value;return l.parts.paymentLines.value=[...e,...n?[n]:[]],new Promise(e=>{c({silenceViolations:qe(["paymentLines"]),onComplete:t=>{"error"===t.status&&t.violations.some(Di)&&d(n.method),e(t)}})})}return Promise.resolve(null)},[c,l,d]),m=t(e=>{const t=l.parts.paymentLines.value.length;return d(e),a(t=>[...t,e]),t>l.parts.paymentLines.value.length?new Promise(t=>{c({silenceViolations:qe(["paymentLines"]),onComplete:n=>{a(t=>t.filter(t=>!iA(t,e))),t(n)}})}):Promise.resolve()},[c,l,d]),h=t(()=>{const e=l.parts.paymentLines.value,t=e.length;return l.parts.paymentLines.value=e.filter(e=>{const{method:t}=e;return!("redeemable"===t.type&&"CUSTOM"===t.redemptionSource)}),t>l.parts.paymentLines.value.length?new Promise(e=>{c({silenceViolations:qe(["paymentLines"]),onComplete:t=>{e(t)}})}):Promise.resolve()},[c,l]);return{canApplyGiftCards:u,paymentMethod:e.value,paymentLines:o,submit:p,remove:m,removeAll:h}}function dA(){const{checkout:{negotiator:e}}=oe(),t=e.current.fields.paymentLines;return n(()=>t.value?.lines.filter(e=>"giftCard"===e.method.type)??[])}function pA(){const e=zi("STORE_CREDIT"),t=zi("CUSTOM"),r=dA();return n(()=>{const n=Boolean(e.value.length),a=t.value.some(e=>null!=e.cost&&0!==e.cost.amount&&Boolean(e.method.redemptionContent)),i=Boolean(r.value.length);return n||a||i})}const mA=0;function hA(){const e=Oi(),t=tc(),r=ot(),a=tA(),i=eA(),o=pA(),{shop:s,checkout:l,embed:c,i18n:u,source:d,shopPay:p}=oe(),{orderSummary:m}=jy(),h=s?.name,g=m.totalLabel,f=ar(c?.embedder),y=Wa(p.app.config);return n(()=>{const{currentPage:n,plan:s,currentDetour:c}=t.value,p=l.negotiator.current.fields.deferredTotal.value,m=l.negotiator.current.fields.paymentFlexibilityPaymentTermsTemplate.value,v="COMPACT"===l.configuration.orderSummary?.layoutStyle;let _;_="TOTAL"===g?u.translate("order_summary.total_label"):f?u.translate("universal.iframes.subtotal_label"):"ORDER_TOTAL"===g?u.translate("order_summary.order_total_label"):v&&h&&!y?u.translate("order_summary.pay_merchant_label",{merchant_name:h}):u.translate("order_summary.total_label");const b=f?_:u.translate("order_summary.total_due_label"),k="thankYou"===c?.type,P=p&&p.amount.amount>0;if(e.value&&k)return u.translate("order_summary.deferred_payment_info.paid_today_next");if(Mn(d))return u.translate("order_summary.total_due_label");if(r.value)return u.translate("order_summary.payment_terms_totals.due_later_checkout_to_draft");if(P)return u.translate("order_summary.payment_terms_totals.due_today_next");if(m){if(a.value)return o.value?b:_;if(m?.dueDate){const e=i(m.dueDate,{month:"short"});return u.translate("order_summary.deferred_total_due_date_label_next",{date:e})}return"FULFILLMENT"===m?.type?u.translate("order_summary.payment_terms_totals.due_on_fulfillment_next"):"RECEIPT"===m?.type?u.translate("order_summary.total_due_later_label"):u.translate("order_summary.payment_terms_totals.due_later_checkout_to_draft")}return k?o.value?u.translate("order_summary.total_paid_label"):u.translate("order_summary.partial_total_label"):On(n,s.greenPath[s.greenPath.length-1])?o.value?b:_:o.value?b:u.translate("order_summary.partial_total_label")})}function gA({children:e,id:t,title:n}){return d("abbr",{className:"_1qifbzv1 _1qifbzv0 _1fragem128",id:t,title:n,children:e})}function fA(){const e=Bi(),t=Fi(),{i18n:r,checkout:{negotiator:a}}=oe(),{deferredTotal:i}=a.current.fields,o=Vi(),s=I(Hy()),l=pA(),c=I(jy()),u=at(),p=n(()=>{const n=o.value,a=e.value;if(!n||!a)return;const d=r.formatCurrency(n.amount,{currency:n.currencyCode,form:"short"}),p=n.amountd(Lf,{alignItems:"end",children:[i?d(y,{children:[d(kf,{accessibilityVisibility:"exclusive",children:r.translate("order_summary.total_price_label")}),d(kf,{size:"small",color:"subdued",type:"redundant",translate:!1,children:n})]}):null,d(kf,{accessibilityVisibility:"exclusive",children:o}),d(Lf,{direction:"inline",alignItems:"center",gap:"small-300",children:[a&&d(gA,{children:d(kf,{type:"small",color:"subdued",translate:!1,children:e.currencyCode})}),d(Mx,{color:"base",size:"large",translate:!1,children:d(kf,{type:"strong",children:t})})]})]})})}const yA={"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 vA({variant:e="fan",merchandise:t,size:n,max:r=2,useImageAltTexts:a=!0,useTitleAsAltTextFallback:i=!1,useResponsiveImageSources:o=!1,sortByPrice:s=!1,showQuantityBadges:l=!0}){const c="inline-discrete"===e,u=c&&t.length>r?t.length-r+1:0,p=(s?[...t].sort((e,t)=>_A(t)-_A(e)):t).slice(0,r),m=wS(n);return d("div",{className:yA[`StackedThumbnails-${e}`],style:{"--total":p.length,"--thumbnail-inline-size":Se(m.inlineSize)},children:p.map((t,r)=>{const s=i&&"title"in t?t.title:"",m=u>0&&r===p.length-1,h=l&&c&&!m&&t.quantity>1?t.quantity:void 0;return d("div",{className:yA[`StackedThumbnail-${e}`],style:{"--index":r},children:d(_S,{src:o&&t.image?t.image.one:t.image?.url,srcSet:o&&t.image?`${t.image.one} 1x, ${t.image.two} 2x, ${t.image.four} 4x`:void 0,size:n,depth:bA(r,e),alt:a?t.image?.altText||s:"",totalItems:h,overlay:m?`+${u}`:void 0})},"stableId"in t?t.stableId:`${r}${t.title}`)})})}function _A(e){return"totalPrice"in e&&e.totalPrice?e.totalPrice.amount:"price"in e&&e.price?e.price.amount:0}function bA(e,t){return"fan"===t?Math.max(0,Math.min(e,2)):"fan-legacy"===t&&e>0?"legacy":void 0}const kA="ik40Z";function PA(){const{disclosure:{style:e}}=jy(),{open:t}=QC(),{i18n:r,checkout:a,source:i}=oe(),o=hA(),s="base"===e,l=n(()=>!t.value),c=a.proposal.facts.merchandiseLines??[],{value:u}=a.negotiator.current.fields.merchandiseLines,p=Mn(i)?c:u?.lines||[],m=d(lh,{type:t.value?"chevron-up":"chevron-down",size:"small-200",display:"inline"});return d(Lf,s?{direction:"inline",justifyContent:"space-between",alignItems:"center",gap:"small-200",padding:"small-300 base",inlineSize:"100%",className:kA,children:[d(x,{when:t,fallback:d(Lf,{direction:"inline",alignItems:"center",gap:"small-200",children:[d("span",{className:Ce({screenReaders:"only"}),children:r.translate("order_summary.title")}),d(vA,{variant:"inline",size:"small-200",max:3,merchandise:p,useImageAltTexts:!1}),d(kf,{size:"large",fonts:"secondary",type:"strong",children:o})]}),children:d(kf,{color:"subdued",children:r.translate("order_summary.title")})}),d(Lf,{direction:"inline",alignItems:"center",gap:"small-200",children:[d(x,{when:l,children:d(fA,{})}),m]})]}:{direction:"inline",justifyContent:"space-between",alignItems:"center",gap:"small-200",padding:"small-300 base",inlineSize:"100%",className:kA,children:[d(Lf,{direction:"inline",alignItems:"center",gap:"small-200",className:"Tupv7",children:[r.translate("order_summary.title"),m]}),d(fA,{})]})}function SA(){const{checkout:e,embed:t,router:r}=oe();return n(()=>!(!t?.isFlagshipPartner||e.configuration.isUniversalCheckoutFinalizer)&&"/thank-you"===r.currentUrl.value.normalizedPath)}function wA(){const e=SA();return d(x,{when:e,children:d("div",{className:"KwVFv"})})}var CA={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 EA=({position:e,scrollDirection:t,variant:n})=>{const a=n.content,i=m("none");t&&(t.block&&t.inline?i.value="both":t.block?i.value="block":t.inline&&(i.value="inline"));const o=r(()=>{const t="start"===e?.scrolledTo.block,n="start"===e?.scrolledTo.inline;return"both"===i.value?t&&n:t||n},[e,i.value]),s=Id(o??!1,o?"base":"fast");return d("div",{className:CA.PillHintWrapper,children:d("div",{className:v(CA.PillHint,CA.directionVariant[i.value],CA.transitionVariant[s]),children:[a,d(lh,{size:"small",type:"block"===i.value?"arrow-down":"arrow-right",className:CA.iconVariant[i.value]})]})})};var xA={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 IA=({position:e,scrollDirection:t})=>{const n=Id((t?.block&&"start"!==e?.scrolledTo.block)??!1,"base"),r=Id((t?.block&&"end"!==e?.scrolledTo.block)??!1,"base"),a=Id((t?.inline&&"start"!==e?.scrolledTo.inline)??!1,"base"),i=Id((t?.inline&&"end"!==e?.scrolledTo.inline)??!1,"base");return d(y,{children:[{name:"blockStart",transition:n},{name:"blockEnd",transition:r},{name:"inlineStart",transition:a},{name:"inlineEnd",transition:i}].map(({name:e,transition:t})=>d("div",{className:v(xA.ShadowHint,xA.positionVariant[e],xA.transitionVariant[t])},e))})},AA=new class{constructor(){this.dimensions=w(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)return;if("undefined"==typeof window||"undefined"==typeof document)return;if(!window.ResizeObserver)return;this.initialized=!0,this.container=document.createElement("div"),this.container.style.cssText="\n position: fixed;\n top: -9999px;\n left: -9999px;\n visibility: hidden;\n pointer-events: none;\n ",this.container.innerHTML='\n
\n
\n
\n
\n
\n
\n ',document.body.appendChild(this.container);const e=this.container.querySelector(".scrollbar-inline-tester"),t=this.container.querySelector(".scrollbar-block-tester"),n=()=>{this.dimensions.value={inline:e.offsetWidth-e.clientWidth,block:t.offsetHeight-t.clientHeight}};n(),this.resizeObserver=new ResizeObserver(n),this.resizeObserver.observe(t),this.resizeObserver.observe(e)}},TA=(e,t)=>e?"start":t?"end":null;var LA="_1b9t7ypn _1b9t7ypj _1fragemel",RA="_1b9t7ypo _1b9t7ypk _1fragemf5",MA="_1b9t7ypp _1b9t7ypl _1fragemdh",NA="_1b9t7ypq _1b9t7ypm _1frageme1",DA="_1b9t7yp8",zA="_1b9t7yp9";const OA=Qm(Od(function({accessibilityActiveDescendant:e,accessibilityLabel:a,accessibilityRole:o="generic",accessibilityVisibility:s="visible",background:c="transparent",backgroundHoverAndFocus:u,bleed:p="none",blockSize:h="auto",border:g="none",borderColor:f,borderRadius:_="none",borderStyle:b,borderWidth:k,children:P,className:S,display:w="auto",hint:C={type:"shadow"},id:E,inlineSize:x="auto",maxBlockSize:I="none",maxInlineSize:A="none",minBlockSize:T="0",minInlineSize:L="0",onScroll:R,onScrollable:M,onScrolledToEdge:N,overflow:D="auto",padding:z="none",paddingBlock:O,paddingBlockEnd:B,paddingBlockStart:F,paddingInline:V,paddingInlineEnd:U,paddingInlineStart:q,scrollbarWidth:j="auto",scrollTo:H}){const{Element:$,role:Y}=th(o),{className:W,style:G,styleElement:K}=$m({backgroundColor:c,backgroundColorHoverAndFocus:u,blockSize:h,...Ne({border:g,borderColor:f,borderStyle:b,borderWidth:k}),borderRadius:_,display:w,inlineSize:x,maxBlockSize:I,maxInlineSize:A,minBlockSize:T,minInlineSize:L},{transforms:{display:_d}}),{className:J,style:Q,styleElement:X}=$m({overflow:D,padding:z,paddingBlock:O,paddingInline:V,paddingBlockEnd:B,paddingBlockStart:F,paddingInlineEnd:U,paddingInlineStart:q}),Z=i(null),[ee,te=ee]=D.trim().split(/\s+/),ne=r(()=>({inline:"auto"===te,block:"auto"===ee}),[te,ee]),{scrollPosition:re,scrollDirection:ae,scrollbarVisible:ie,scrollbarDimensions:oe}=((e,a,i,o,s,c)=>{const u=m(null),d=m(null),p=n(()=>{const e=AA.getDimensionsSignal().value;return e&&d.value?i?{inline:d.value.block?e.inline:0,block:d.value.inline?e.block:0}:{inline:0,block:0}:null}),h=n(()=>p.value?{inline:p.value.inline>0,block:p.value.block>0}:null),g=r(()=>Yp(()=>{const t=e.current;if(!t)return;const n=u.value,r=d.value;var i,l;d.value=((e,t)=>{const n=e.scrollWidth>e.clientWidth,r=e.scrollHeight>e.clientHeight;return{inline:n&&t.inline,block:r&&t.block}})(t,a),u.value=((e,t)=>{const n=0===e.scrollLeft,r=0===e.scrollTop,a=Math.abs(e.scrollLeft),i=Math.abs(a+e.clientWidth-e.scrollWidth)<1,o=Math.abs(e.scrollTop+e.clientHeight-e.scrollHeight)<1;return{position:{inline:a,block:e.scrollTop},scrolledTo:{inline:t.inline?TA(n,i):null,block:t.block?TA(r,o):null}}})(t,d.value),"function"==typeof o&&o(u.value),s&&"function"==typeof s&&(i=r,l=d.value,i?.inline!==l.inline||i?.block!==l.block)&&s(d.value),c&&"function"==typeof c&&((e,t)=>{if(!e)return!1;const n=e.scrolledTo.inline!==t.scrolledTo.inline&&null!==t.scrolledTo.inline,r=e.scrolledTo.block!==t.scrolledTo.block&&null!==t.scrolledTo.block;return n||r})(n,u.value)&&c(u.value)},50),[a,o,s,c,d,u,e]),f=t(()=>{g()},[g]);return l(()=>{const t=e.current;if(!t||!("onscroll"in t))return;let n;f(),t.addEventListener("scroll",f,{passive:!0}),t.addEventListener("load",f,!0),t.addEventListener("transitionend",f),t.addEventListener("animationend",f);const r=new Set,a=()=>{if(!n)return;const e=new Set(t.children);for(const t of r)e.has(t)||(n.unobserve(t),r.delete(t));for(const t of e)r.has(t)||(n.observe(t),r.add(t))};window.ResizeObserver?(n=new ResizeObserver(f),n.observe(t),a()):window.addEventListener("resize",f);const i=window.MutationObserver?new window.MutationObserver(()=>{a(),f()}):void 0;return i?.observe(t,{attributes:!n,characterData:!0,childList:!0,subtree:!0}),()=>{n?.disconnect(),i?.disconnect(),t.removeEventListener("scroll",f),window.removeEventListener("resize",f),t.removeEventListener("load",f,!0),t.removeEventListener("transitionend",f),t.removeEventListener("animationend",f)}},[e,f]),{scrollPosition:u.value,scrollDirection:d.value,scrollbarDimensions:p.value,scrollbarVisible:h.value}})(Z,ne,"auto"===j,R,M,N),se="listbox"===o||ae?.inline||ae?.block,le=v(ae?.block&&"start"!==re?.scrolledTo.block&&LA,ae?.block&&"end"!==re?.scrolledTo.block&&!ie?.block&&RA,ae?.inline&&"start"!==re?.scrolledTo.inline&&MA,ae?.inline&&"end"!==re?.scrolledTo.inline&&!ie?.inline&&NA),ce=v("none"!==p&&ae?.block&&"start"!==re?.scrolledTo.block&&DA,"none"!==p&&ae?.block&&"end"!==re?.scrolledTo.block&&!ie?.block&&zA);return l(()=>{if(!H||!Z.current)return;const e="smooth",t=Z.current;if(H instanceof HTMLElement)return void H.scrollIntoView({behavior:e,block:"start",inline:"start"});const n="rtl"===document.dir,r={block:H.block??0,inline:(H.inline??0)*(n?-1:1)};t.scrollTo({behavior:e,top:r.block,left:r.inline})},[H]),d(y,{children:[K,X,d("div",{"aria-hidden":"hidden"===s||void 0,className:v("_1b9t7yp2 _1b9t7yp1 _1fragemup _1fragemv4 _1fragemws _1fragem64",W,"exclusive"===s&&"_1b9t7yph _1fragem121","product-thumbnails"===p&&"_1b9t7ypa","product-thumbnails-with-badge"===p&&"_1b9t7ypd",ce),style:G,children:[d($,{id:E,role:Y,"aria-activedescendant":e,"aria-label":a,className:v("_1b9t7yp0","none"===j&&"_1b9t7ypi",J,S,"product-thumbnails"===p&&"_1b9t7ypc _1b9t7ypb","product-thumbnails-with-badge"===p&&"_1b9t7ype _1b9t7ypb"),tabIndex:se?0:void 0,style:Q,ref:Z,children:P}),d("div",{className:v("_1b9t7ypg _1b9t7ypf _1fragem108 _1fragem10n _1fragemzt _1fragem112 _1fragemwi _1fragem11z _1fragem12w",le),"aria-hidden":"true",role:"presentation",style:{marginInlineEnd:oe?.inline,marginBlockEnd:oe?.block},children:["pill"===C?.type&&d(EA,{variant:C,scrollDirection:ae,position:re,scrollbarVisible:"auto"===j}),"shadow"===C?.type&&d(IA,{variant:C,scrollDirection:ae,position:re,scrollbarVisible:"auto"===j})]})]})]})}));var BA="go06b0";const FA=/]/i;function VA(e){if("undefined"==typeof DOMParser||!FA.test(e))return null;const{body:t}=(new DOMParser).parseFromString(e,"text/html");return t.querySelector("table")?UA(t.childNodes,!1):null}function UA(e,t){const n=[];for(const[r,a]of Array.from(e).entries()){if(a.nodeType===Node.TEXT_NODE){n.push(a.textContent);continue}if(a.nodeType!==Node.ELEMENT_NODE)continue;const e=a,i=e.tagName.toLowerCase(),o={key:r};for(const t of Array.from(e.attributes))o[t.name]=t.value;const s=e.childNodes.length?UA(e.childNodes,t||"table"===i):void 0,l=H(i,o,s);"table"!==i||t?n.push(l):n.push(d(OA,{overflow:"hidden auto",className:"go06b1",children:l},r))}return n}function qA({dangerouslySetInnerHTML:e,scrollableContent:t="none",children:n}){const a=Ed()?"span":"div",i=e?.__html,o=r(()=>"all"===t&&null!=i?VA(i):null,[t,i]);return"string"==typeof n?d(y,{children:n.split("\n").map((e,t)=>d(y,{children:[t>0&&d("br",{}),e]},`content-${t}}`))}):d(a,o?{className:BA,children:o}:{dangerouslySetInnerHTML:e,className:BA,children:n})}var jA={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 HA=_(function({accessibilityLabel:e,id:t,children:n,inlineSize:r="auto",lang:a,loading:i,disabled:o=!1,pressed:s=!1,onClick:l,onBlur:c,onFocus:u},p){const m=zp(p),h=wd(),g="auto"===r?"fit-content":r,f=Ju(),y=Id(i??!1,{enter:"slow"}),_=d("span",{className:v(jA.LoadingContent),dir:"auto",children:d(yf,{accessibilityLabel:f("processing")})}),b=uS(n)&&d("span",{className:v(jA.Content),"aria-hidden":i||void 0,children:n});return d(Cd.Provider,{value:!0,children:d("button",{type:"button",id:t,"aria-pressed":s,"aria-busy":i,"aria-label":i?void 0:e,"aria-live":i?"polite":"off","aria-hidden":!!h||void 0,lang:a,onClick:e=>{e?.preventDefault(),l?.(!s)},onBlur:c,onFocus:u,className:v(jA.PressButton,jA.inlineSizeVariant[we(g)],s&&jA.pressed,(o||h)&&jA.disabled,h&&jA.inert,i&&[jA.loading,jA.transitionVariant[y]]),disabled:o||i,tabIndex:h?-1:void 0,ref:m,children:[b,i&&_]})})}),$A={small:"35%",base:"50%",large:"65%",fill:"100%"};function YA({content:e,delay:t,id:n,lastLineSize:a,lines:i=1,size:o}){const s=r(()=>function(){const e=Object.keys($A);return e[Math.floor(Math.random()*e.length)]}(),[]);return d(Mx,{id:n,size:o,textAlign:"justify",children:e?d(TS,{delay:t,children:e}):Array.from({length:i},(e,n)=>d(TS,{delay:t,inlineSize:$A[n===i-1?a??(1===i?"fill":s):"fill"]},n))})}const WA=new Set(["http:","https:"]);function GA({children:e}){const n=function(){const{checkout:{configuration:{isWindowOpenDelegationEnabled:e}},embed:n,observability:r}=oe(),a=t(e=>{const t=e.target?.closest?.("a");if(!t)return;const a=t.href;let i;try{i=new URL(a).protocol}catch{return}if(!WA.has(i))return;const o=t.getAttribute("href");o?.startsWith("#")||n?.client?.windowOpenRequest&&(e.preventDefault(),n.client.windowOpenRequest(a).catch(e=>{r.log("window_open_delegation_error","Window open delegation failed in delegated HTML content",{url:a,error:e instanceof Error?e.message:String(e)})}))},[n,r]);if(e)return a}();return n?d("div",{onClick:n,children:e}):d(y,{children:e})}const KA={id:"63eae86e190df32a164601cf96e105e3a69712d555a3abd3ab6d36cde520673e",type:"query",name:"MerchantPolicies",source:""},JA={id:"1263e051dbbb958a67fe45f4acca32965cf3cea185a1b71afe5ebdb65c4f4160",type:"query",name:"RemoteMerchantPolicies",source:""},QA=Jv(({graphql:{coreGraphql:e},observability:t,shop:n},{checkoutProtocolModalEventSignal:r,defaultPolicy:a,policies:i})=>{const o=Ui(i),s=P(()=>Object.values(o));function l(e){return Array.from(o[e]?.policies.values()??[])}function c(){return o[a.shopId]?.policies.get(a.handle)??i[0]??a}const u=w(!1),d=w(!1),p=w(c()),m=P(()=>l(p.value.shopId)),h=P(()=>p.value.shopId),g=P(()=>p.value.sessionToken??""),f=P(()=>n.id===h.value),y=e.query(KA,{variables:()=>({handle:p.value.handle}),skip:()=>!f.value||!u.value}),v=e.query(JA,{variables:()=>({input:[{sessionToken:g.value,shopId:h.value}]}),skip:()=>f.value||!u.value}),_=P(()=>{if(f.value)return y.data.value?.shop?.merchantPolicies[0]?.body;const e=v.data.value?.shop?.remoteShopConfigurations[0]?.merchantPolicies??[];return e.find(e=>e.handle===p.value.handle)?.body}),b=P(()=>f.value?y.error.value:v.error.value),k=P(()=>f.value?y.loading.value:v.loading.value),S=fl(k.value,(e,t)=>e&&!t&&u.peek()&&d.peek()&&"undefined"!=typeof document&&null!==document.querySelector(yl),["modal-content-cross-fade"]);return O(()=>{S.value=k.value}),O(()=>{b.value&&t.error(b.value)}),{error:b,loading:S,policyBody:_,selectedPolicy:P(()=>p.value),selectedShopPolicies:m,shops:s,show(){d.value=!1,p.value=c(),r&&(r.value="footerContent"),u.value=!0},afterShow(){d.value=!0},hide(){d.value=!1,u.value=!1,r&&(r.value="none")},selectShop(e){const t=p.peek(),n=l(e),r=n.find(e=>e.handle===t.handle)??n[0]??t;r!==t&&ul(()=>{p.value=r},["modal-content-cross-fade"])},selectPolicyHandle(e){const t=p.peek(),n=m.value.find(t=>t.handle===e)??m.value[0]??t;n!==t&&ul(()=>{p.value=n},["modal-content-cross-fade"])}}});function XA({id:e,defaultPolicy:t}){const{i18n:n,shop:r,mobileCheckoutSdk:a,embed:i,checkout:{negotiator:o}}=oe(),{checkoutProtocolModalEventSignal:s}=o.context,{localPolicies:l,localPoliciesWithContent:c,remotePolicies:u}=qi(),p=r.hasFlagEnabled(ji),m=u.length>0?[...l,...u]:c,h=p&&m.some(({shopId:e,handle:n})=>e===t.shopId&&n===t.handle)?m:[t],g=p?n.translate("shop_policies.terms_and_policies"):t.name,f=a.variant.isStandard()||i?.isCheckoutKit(),y=p?"@media (inline-size >= extraSmall) 600px, 90%":f?"100%":void 0,{error:v,loading:_,policyBody:b,selectedPolicy:k,selectedShopPolicies:P,shops:S,show:w,afterShow:C,hide:E,selectShop:I,selectPolicyHandle:A}=Tn(QA,{checkoutProtocolModalEventSignal:s,defaultPolicy:t,policies:h}),T=S.value.length>1||S.value.some(e=>e.policies.size>1),L=()=>d(GA,{children:d(qA,{dangerouslySetInnerHTML:{__html:b.value??""},scrollableContent:"all"})}),R=d(x,{when:()=>!v.value,fallback:n.translate("bad_request.title"),children:d(x,{when:()=>!_.value,fallback:d(Lf,{"aria-busy":!0,gap:"base",children:[d(YA,{delay:!1,lines:3,lastLineSize:"small"}),d(YA,{delay:!1,lines:3,lastLineSize:"large"}),d(YA,{delay:!1,lines:3,lastLineSize:"small"}),d(YA,{delay:!1,lines:3,lastLineSize:"large"})]}),children:()=>T||k.value.shopId!==r.id?d(x,{when:()=>b.value,fallback:d(kf,{color:"subdued",children:n.translate("remote_policies.unavailable_policy",{policy_name:k.value.name,shop_name:k.value.shopName})}),children:L}):L()})});return d(gI,{id:e,onShow:w,onAfterShow:C,onHide:E,heading:g,blockSize:y,children:[d(hf,{accessibilityRole:"status",accessibilityVisibility:"exclusive",children:_.value?n.translate("general.loading"):null}),T?d(Lf,{gap:"base",children:[d(x,{when:()=>S.value.length>1,children:d(Lf,{direction:"inline",gap:"base",children:S.value.map(e=>d(HA,{pressed:k.value.shopId===e.shopId,onClick:()=>I(e.shopId),children:d(Lf,{gap:"small-400",direction:"inline",alignItems:"center",justifyContent:"center",children:d(kf,{children:e.shopName})})},e.shopId))})}),d(x,{when:()=>P.value.length>1,children:d(_C,{value:k.value.handle,label:n.translate("shop_policies.policy_label"),onChange:A,name:"policy",children:P.value.map(e=>d(bC,{value:e.handle,children:e.name},e.handle))})}),R]}):R]})}function ZA(e){return!!(e&&"liability"in e&&e.liability)&&("MARKETPLACE"===e.liability||"MERCHANT"===e.liability)}function eT({liability:e}){const{i18n:t,shop:n}=oe(),{footer:{alignment:r}={}}=jy();switch(e){case"MARKETPLACE":return d(Mx,{size:"small",color:"subdued",textAlign:r,children:t.translate("tax.attribution.orders_sold_by_shop_marketplace")});case"MERCHANT":return d(Mx,{size:"small",color:"subdued",textAlign:r,children:t.translate("tax.attribution.orders_sold_by_shop_name",{shop_name:n.name})});default:return null}}const tT=e=>d("svg",{xmlns:"http://www.w3.org/2000/svg",xmlSpace:"preserve",viewBox:"0 0 30 14",...e,children:[d("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"}}),d("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"}}),d("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"}}),d("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"}})]});function nT(){const{shopPay:e,i18n:t}=oe(),{footer:{content:{typography:n}={}}={}}=jy(),r=e.user.isAuthenticatedUser.value?"https://privacy.shopify.com/ads-sharing/opt-out/new":"https://privacy.shopify.com",a=t.translate("user_consent.privacy_portal_link",{privacy_link_gap:d("span",{className:"mMltV"}),privacy_link_logo:d(tT,{"aria-hidden":"true",focusable:"false",className:"HTJIw"})}),i=d(Af,{href:r,target:"_blank",display:"block",children:a});return n?d(kf,{size:n.size,color:n.color,type:"bold"===n.weight?"strong":void 0,children:i}):i}const rT=C({id:()=>"PrivacyPreferencesFooterLink",displayName:"PrivacyPreferencesFooterLink",suspense:!1,useError:function(e){const{observability:t}=oe();a(()=>{e&&function(e,t){e.error(t,{metadata:{privacyPreferencesFooterLink:{component:"PrivacyPreferencesFooterLink",failure:"lazy_load"}}})}(t,e)},[e,t])},load:()=>E(()=>hl(async()=>{const{deferredPrivacyComponents:e}=await(import("./2acfb1ce.0mZbMliI.js"));return{deferredPrivacyComponents:e}},__vite__mapDeps([99,1,2,3,4,5,48,49,11,14,15,16,17,18])).then(({deferredPrivacyComponents:e})=>e.PrivacyPreferencesFooterLink))});function aT(){const e=at(),{checkout:{identity:t},consentManager:r}=oe();return n(()=>e.value&&"shopPay"!==t.current.value&&r.shouldShowBanner.value)}const iT=qc("DelegatedLinkModal");function oT(e){const t=Array.isArray(e)?e:[e],n=new Map;return t.map(e=>{if("string"!=typeof e&&"number"!=typeof e)return e;const t=String(e),r=(n.get(t)??0)+1;return n.set(t,r),d(kf,{color:"subdued",children:e},`${t}-${r}`)})}function sT(){const{embed:e,i18n:t,checkout:{configuration:n,proposal:r},shop:a}=oe(),{name:i}=a,o=rw(),{currentDetour:s}=tc().value,l=aT(),{footer:{alignment:c,content:{visibility:u,typography:p}={}}={}}=jy(),{localPolicies:m,localPoliciesWithContent:h}=qi(),g=a.hasFlagEnabled(ji),f="microsoft"===e?.embedder,v="amazon"===e?.embedder,_="google"===e?.embedder;let b=p;f?b={...p,size:"extraSmall",color:"subdued",weight:"bold"}:_&&(b={...p,size:"small"});const k=m.find(e=>"privacy-policy"===e.handle),P=k.url,S=P?d(Af,{href:P,target:"_blank",accessibilityLabel:t.translate("user_consent.google_embedded_checkout.privacy_policy_accessibility_label",{shop_name:i}),children:t.translate("user_consent.google_embedded_checkout.privacy_policy")}):d(y,{children:[d(Af,{commandFor:"google-privacy-policy-modal",accessibilityLabel:t.translate("user_consent.google_embedded_checkout.privacy_policy_accessibility_label",{shop_name:i}),children:t.translate("user_consent.google_embedded_checkout.privacy_policy")}),d(XA,{id:"google-privacy-policy-modal",defaultPolicy:{...k,name:t.translate("user_consent.google_embedded_checkout.privacy_policy_modal_title")}})]}),w=d(Af,{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")}),C=d(Af,{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=d(Mx,{type:"small",textAlign:c,children:oT(t.translate("user_consent.google_embedded_checkout.terms",{shop_name:i,privacy_policy_link:S,payments_privacy_notice_link:w,learn_more_link:C}))}),I=d(Mx,{size:"extraSmall",color:"subdued",textAlign:c,children:d(kf,{type:"strong",children:["Your purchase from ",i," is subject to the"," ",d(lT,{href:"https://aka.ms/ConsumerCopilotTerms",heading:"Copilot Terms",children:"Copilot Terms"})," and the ",d(lT,{href:"https://go.microsoft.com/fwlink/?LinkId=521839",heading:"Privacy Statement",children:"Privacy Statement"}),". We will share your order and payment details with ",i," to complete your order."]})}),A=0===h.length?d(Lf,{direction:"inline",alignItems:"center",gap:"small-400 base",justifyContent:c,children:[d(kf,{size:"small",color:"subdued",children:t.translate("general.all_rights_reserved",{shop_name:i})}),d(Lf,{direction:"inline",gap:"base",accessibilityRole:"unordered-list",children:[d(x,{when:l,children:d(hf,{accessibilityRole:"list-item",children:d(rT,{})})}),d(x,{when:n.visibility.showDataSharingOptOut,children:d(hf,{accessibilityRole:"list-item",children:d(nT,{})})})]})]}):d(Lf,{direction:"inline",justifyContent:c,gap:"small-400 base",accessibilityRole:"unordered-list",children:[(g?h.slice(0,1):h).map(e=>{const{handle:n,name:r}=e,a=g?t.translate("shop_policies.terms_and_policies"):r,i=g?"terms-and-policies-footer-policy-modal":`${n}-footer-policy-modal`,s=d(XA,{id:i,defaultPolicy:e}),l=d(Cf,{variant:"plain",commandFor:i,ref:o(n),children:a});return d(hf,{accessibilityRole:"list-item",children:[b?d(kf,{size:b.size,color:b.color,type:"bold"===b.weight?"strong":void 0,children:l}):l,s]},n)}),d(x,{when:l,children:d(hf,{accessibilityRole:"list-item",children:d(rT,{})})}),d(x,{when:n.visibility.showDataSharingOptOut,children:d(hf,{accessibilityRole:"list-item",children:d(nT,{})})})]});let T="purchase.checkout.footer.render-after";"thankYou"===s?.type&&(T="purchase.thank-you.footer.render-after");const L=$S(T),R="hidden"!==u&&!v,M=r.negotiated.fields.taxes.value,N=ZA(M);return d(Lf,{gap:"large-100",children:[f&&I,_&&E,R&&A,d(LC,{customizations:L,gap:"base"}),N&&d(eT,{liability:M.liability})]})}function lT({href:e,heading:t,children:n,...r}){const{checkout:a}=oe(),i=jc(void 0,iT);return a.configuration.isWindowOpenDelegationEnabled?d(Af,{href:e,...r,children:n}):d(y,{children:[d(Af,{commandFor:i,...r,children:n}),d(gI,{id:i,source:e,heading:t})]})}function cT(){const{i18n:e,shop:t}=oe(),n=`${t.name} ${e.translate("general.page_title")}`;return d("h1",{className:Ce({screenReaders:"only"}),children:n})}function uT(){const{client:e,i18n:n,checkout:{negotiator:r}}=oe(),{checkoutProtocolModalEventSignal:i}=r.context,o=t(()=>{window.location.assign(e.unstable_getSerialization("logoutUrl")||"")},[e]),s=Ox(by(Hi)).value;return a(()=>()=>{i.value="none"},[i]),s?d(gI,{id:"lost-permissions-modal",heading:n.translate("b2b_errors.lost_permissions_title"),size:"large",accessibilityLabel:n.translate("b2b_errors.lost_permissions_title"),blocking:!0,open:!0,onShow:()=>{i.value="b2bPermissions"},children:d(Lf,{gap:"base",children:[d(kf,{children:n.translate("b2b_errors.lost_permissions_subtitle")}),d(Lf,{direction:"inline",gap:"base",justifyContent:"end",children:d(Cf,{variant:"primary",onClick:o,children:n.translate("b2b_errors.log_out_link_text")})})]})}):null}function dT({source:e,title:t,onIframeLoad:n}){const[r,i]=s(),[o,l]=s(!1);return a(()=>{e?(i(e),l(!0)):l(!1)},[e]),r?d(gI,{source:r,open:o,blocking:!0,blockSize:"100%",size:"840px",accessibilityLabel:t,onIframeLoad:()=>n?.(r)}):null}function pT({source:e,logMessage:n,telemetryContext:r,logKey:o=e??void 0}){const{observability:s}=oe(),l=i();return a(()=>{e||(l.current=void 0)},[e]),t(t=>{e&&r&&(t&&t!==e||l.current!==o&&(l.current=o,s.log("action_required_modal_iframe_loaded",n,{...r,hasModalUrl:!0,..."pre_payment_buyer_action_required"!==r.actionType&&{sourceHostCategory:ib(e)}})))},[o,n,s,e,r])}function mT(){const{i18n:e}=oe(),t=function(){const{checkout:e,shopPay:t,observability:r}=oe(),a=i(),o=n(()=>{if($i(t)&&t.threeDSModalUrl.value){const e=t.threeDSModalUrl.value;return{source:e,logKey:JSON.stringify(["spe",e]),logMessage:"[ActionRequiredModalManager] SPE 3DS action required via threeDSModalUrl",telemetryPayload:{modalSourceType:"spe_three_ds_modal_url",sourceHostCategory:ib(e),hasModalUrl:!0},iframeLoadTelemetryContext:{modalSourceType:"spe_three_ds_modal_url"}}}const n=e.latestReceipt.value;if(n&&dy(n)){const e=n.action;if(my(e))return{source:e.offsiteRedirect?void 0:e.url,logKey:JSON.stringify(["receipt",n.id,e.offsiteRedirect,e.url]),logMessage:"[ActionRequiredModalManager] Receipt requires further action",telemetryPayload:{modalSourceType:"receipt_action",sourceHostCategory:ib(e.url),offsiteRedirect:e.offsiteRedirect,actionType:e.type,hasModalUrl:!e.offsiteRedirect},iframeLoadTelemetryContext:{modalSourceType:"receipt_action",offsiteRedirect:e.offsiteRedirect,actionType:e.type}}}if("action_required"===n?.status&&"pre_payment_buyer_action_required"===n.action.type){const{action:e}=n;return{source:e.url,logKey:JSON.stringify(["receipt",n.id,e.type]),logMessage:"[ActionRequiredModalManager] Receipt requires further action",telemetryPayload:{modalSourceType:"receipt_action",actionType:e.type,hasModalUrl:!0},iframeLoadTelemetryContext:{modalSourceType:"receipt_action",actionType:e.type}}}});return S(()=>{const e=o.value;e?a.current!==e.logKey&&(a.current=e.logKey,r.log("action_required_modal_manager_action_required",e.logMessage,e.telemetryPayload)):a.current=void 0}),o.value}(),r=pT({source:t?.source,logKey:t?.logKey,logMessage:"[ActionRequiredModalManager] Action required modal iframe loaded; this does not prove issuer challenge rendered",telemetryContext:t?.iframeLoadTelemetryContext});return d(dT,{source:t?.source,title:e.translate("processing.action_required"),onIframeLoad:r})}function hT(e,t){return e.has(t)}function gT(e,t){if(!e||!t)return null;const n=t.find(e=>"customOnsite"===e.method.type)?.method;return n&&e.find(e=>"customOnsite"===e.type&&e.paymentMethodIdentifier===n.paymentMethodIdentifier&&e?.uiExtension?.approvalScopes&&hT(e.uiExtension.approvalScopes,Yl.PaymentSessionModal))||null}sT.displayName="FooterContent",lT.displayName="DelegatedLink";const fT=C({id:()=>"PaymentChallengeModal",displayName:"PaymentChallengeModal",suspense:!1,useError:function(e){const{observability:t}=oe();a(()=>{e&&function(e,t){e.error(t,{metadata:{paymentChallengeModal:{component:"PaymentChallengeModal",failure:"lazy_load"}}})}(t,e)},[e,t])},load:()=>E(()=>hl(()=>import("./7fd9930c.CTP9ZMfg.js"),__vite__mapDeps([258,1,28,3,4,2,5,29,11,14,15,16,17,18,259])))});function yT({modalPaymentMethodConfig:e,onModalRender:t}){const{checkout:r,observability:a}=oe(),o=i(),s=m(void 0),l=n(()=>{const e=r.latestReceipt.value;return e&&py(e)&&hy(e.action)?e:void 0});S(()=>{const t=l.value;if(!t||!hy(t.action))return void(o.current=void 0);const n=Boolean(e.value),r=JSON.stringify([t.id,t.action.challengeType,t.action.challengeData,n]);o.current!==r&&(o.current=r,a.log("payment_challenge_modal_manager_action_required","[PaymentChallengeModalManager] Receipt requires further action",{challengeType:t.action.challengeType,hasModalPaymentMethodConfig:n}))}),S(()=>{const e=l.value;if(!e||!hy(e.action))return void(s.value=void 0);const t=function(e){return JSON.stringify([e.id,e.action.type,hy(e.action)?e.action.challengeType:void 0,hy(e.action)?e.action.challengeData:void 0])}(e),n=null==e.timeout?.millisecondsRemaining?void 0:Date.now()+e.timeout.millisecondsRemaining,r=s.peek();r?.key!==t?s.value={key:t,expiresAt:n}:null!=n&&(s.value={key:t,expiresAt:Math.min(r.expiresAt??n,n)})});const c=n(()=>{const t=l.value,n=e.value;if(t&&hy(t.action))return n?{type:t.action.challengeType,data:t.action.challengeData,config:n,expiresAt:s.value?.expiresAt}:null});return d(x,{when:c,children:e=>d(fT,{challengeType:e.type,challengeData:e.data,receipt:r.latestReceipt.value,paymentMethod:e.config,onModalRender:t,challengeExpiresAt:e.expiresAt})})}function vT(){const e=da(),{checkout:t}=oe(),r=t.negotiator.current.fields.deferredTotal;return n(()=>{if(!e.value)return!0;const n=r.value?.amount.amount;return Boolean(Ia({checkout:t})||n)})}function _T({isModalRendered:e,modalPaymentMethodConfig:t}){const{i18n:r,checkout:a}=oe(),i=function(){const{i18n:e,shopPay:t,checkout:{negotiator:r}}=oe(),{managedByMarketsPro:a}=r.current.fields,i=vT();return n(()=>{if(!i.value)return;if(!Yi({managedByMarketsPro:a.value}))return;const n=t.session.selectedPaymentMethod.value;return n&&Wi(n)?e.translate("processing.redirecting_title"):void 0})}();return n(()=>{if(i.value)return i.value;const n=a.latestReceipt.value;return n?dy(n)?r.translate("processing.redirecting_notice"):py(n)?!e.value&&t.value?r.translate("processing.modal_notice",{paymentMethod:t.value.name}):r.translate("processing.wait.short"):!e.value&&t.value?.name&&Gi(t.value)&&"processing"===n.status&&t.value?r.translate("processing.modal_notice",{paymentMethod:t.value.name}):"processing_remote_checkouts"===n.status||"processed"===n.status&&n.completedRemoteCheckouts?.length?r.translate("processing.remote_shops_payments_processing"):r.translate("processing.wait.short"):r.translate("processing.wait.short")})}const bT=C({id:()=>"CryptoModalManager",displayName:"CryptoModalManager",suspense:!1,useError:function(e){const{observability:t}=oe();a(()=>{e&&t.error(e,{metadata:{cryptoModalManager:{component:"CryptoModalManager",failure:"lazy_load"}}})},[e,t])},load:()=>E(()=>hl(()=>import("./39bf6084.CVKFMawl.js"),__vite__mapDeps([260,1,2,3,4,5,76,77,54,81,11,14,15,16,17,18,261])))});function kT(){const{checkout:e}=oe(),{paymentLines:t}=e.negotiator.parts,r=e.negotiator.current.fields.paymentMethods,a=n(()=>gT(r.value,t.value)),i=m(!1),o=_T({isModalRendered:i,modalPaymentMethodConfig:a}),s=K_();return S(()=>{if(e.latestReceipt.value)return ju({content:o.value,role:"alert"})}),d(y,{children:[d(x,{when:s,fallback:d(mT,{}),children:d(bT,{})}),d(yT,{modalPaymentMethodConfig:a,onModalRender:()=>{i.value=!0}})]})}function PT(){const{i18n:e,url:t,source:n,shop:a,checkout:i,shopPay:o}=oe(),s="shopPay"===i.identity.current.value,{plan:l,currentPage:c}=tc().value,u=da(),d="cartNext"===n.type||"simulated"===n.type,p=i.negotiator,m=i.negotiator.parts.paymentLines.value,h=p.current.peek(),g=i.configuration.layout.isOnePage.value,f=Ki(),y=Ji("SHOP_CASH"),v=ot(),_=hP(),{value:b}=i.negotiator.current.fields.managedByMarketsPro,k=Yi({managedByMarketsPro:b}),{value:P}=i.negotiator.current.fields.paymentFlexibilityPaymentTermsTemplate,S=Oi(),w=en(h.deliveryNext),C=wr(h.deliveryNext),E=r(()=>m.some(({method:{type:e}})=>"paymentOnDelivery"===e),[m]),x=r(()=>m.some(({method:{type:e}})=>"customManualPayment"===e||"manualPayment"===e),[m]),I=r(()=>Qi(m),[m]),A=r(()=>a.vaultForPaymentLater&&Xi(m),[a.vaultForPaymentLater,m]),T=Boolean(P)&&!S.value,L=tA();return r(()=>{let t=[];t=d&&_.value?[{id:"cart",route:_.value.toString()}]:[];const n=[...t,...l.greenPath,{id:"thankYou",route:"/thank-you"}];let r=c?n.findIndex(e=>e.id===c.id):void 0;(null==r||r<0)&&(r=void 0);const a=p.current.peek(),i=null==r?void 0:n.slice(r+1).find(e=>null==e.skipOverPage||!e.skipOverPage(a)),h=null==r?void 0:n.slice(0,r).reverse().find(e=>null==e.skipOverPage||!e.skipOverPage(a));return{nextPage:{id:i?.id,label:function(t){if(o.isSimulated)return e.translate("general.pay_now_button_label");switch(t){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"):A?e.translate("payment.vault_for_payment_later.pay_button_label"):T&&!L.value?e.translate("general.confirm_order_button_label"):u.value||E||x||I||f.value||g&&y.value?e.translate("general.complete_purchase_button_label"):k&&!s&&Zi(m)?e.translate("general.continue_to_payment_method"):e.translate("general.pay_now_button_label");default:return e.translate("general.continue_button_label")}}(s?"thankYou":i?.id),notice:function(t){switch(t){case"review":return e.translate("processing.you_will_not_be_charged");case"thankYou":return v.value?e.translate("general.submit_for_review_notice_label"):void 0;default:return}}(s?"thankYou":i?.id)},previousPage:{label:function(t){switch(t){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")}}(h?.id),route:h?.route}}},[t,p,e,u.value,c,l.greenPath,d,m,w,C,E,x,I,A,g,f.value,y.value,L.value])}function ST(){const e=tc();return n(()=>{const{plan:t}=e.value;return t.greenPath.some(({id:e})=>"review"===e)})}function wT(){const{checkout:{negotiator:e}}=oe(),{paymentLines:t}=e.parts;return n(()=>{const e=Boolean(Tt(t.value,"SHOP_PAY")),n=Boolean(Tt(t.value,"SHOPIFY_INSTALLMENTS"));return eo(t.value)&&!e&&!n})}function CT(){const{i18n:e}=oe();return d(Of,{children:d(Lf,{gap:"large-400",alignItems:"center",children:[d(hf,{children:d(yf,{size:"large",appearance:"monochrome"})}),d(Mx,{children:e.translate("general.processing")})]})})}function ET(){const{progressing:e}=nc(),{i18n:t,embed:r,checkout:{negotiator:a}}=oe(),i=function(){const e=ST(),t=I(PT().nextPage.id),r=pf(),{checkout:{offsitePopupController:a}}=oe();return n(()=>!(!r.value||a.isOpen.value||e.value&&"thankYou"!==t.value))}(),o=function(){const e=wT(),t=tc(),r=I(PT().nextPage.id),{checkout:a}=oe(),i=a.configuration.layout.isOnePage,{inMemoryApplePayParts:{asPaymentMethod:o},walletUsedForSubmissionSignal:s}=rn(),l=a.negotiator.parts.paymentLines;return n(()=>{if(!e.value)return!1;if(a.wallets.activeSession.value)return!1;const n=l.value;if(Tt(n,"PAYPAL_EXPRESS"))return!1;const c=Tt(n,"APPLE_PAY");return c?!o.value&&"APPLE_PAY"===s.value&&!!to(c)&&(i.value?"APPLE_PAY"!==a.wallets.escalatedWallet.value:"information"===t.value.currentPage?.id):i.value?!Bl({paymentLines:n,walletUsedForSubmission:s.value}):"GOOGLE_PAY"===s.value?"information"===t.value.currentPage?.id:"thankYou"===r.value})}(),s=a.parts.paymentLines,l=n(()=>"google"===r?.embedder&&Boolean(Tt(s.value,"GOOGLE_PAY"))),c=n(()=>e.value&&(o.value||i.value)&&!l.value);return S(()=>{if(c.value)return ju({content:t.translate("general.processing")})}),d(x,{when:c,children:d(CT,{})})}function xT(e){return function(t){return Object.fromEntries(Array.from(e).map(e=>[e,t[e]]))}}function IT(e){return function(t){return Object.fromEntries(Object.keys(t).filter(t=>!e.has(t)).map(e=>[e,t[e]]))}}function AT(){const{i18n:e,embed:t}=oe();return t?.isEmbeddedCheckout()?null:d("a",{href:`#${YC}`,className:"_9sntZ",children:e.translate("general.skip_to_content")})}function TT(){const{embed:e,i18n:n,checkout:{configuration:{allowRedirectToStorefront:r},negotiator:s}}=oe(),l=hP(),{checkoutProtocolModalEventSignal:c}=s.context,{lastJourneyProgression:u}=s,p=i(!1);S(()=>{if(!ar(e?.embedder))return;const t=u.value;"failed"!==t.type||"tooManyRequests"!==t.reason||p.current||(p.current=!0,o(()=>qn(e,"too_many_requests")))});const m=t(()=>{l.value&&window.location.assign(l.value.toString())},[l]);a(()=>()=>{c.value="none"},[c]);const h="failed"===u.value.type&&"tooManyRequests"===u.value.reason,g=r&&l.value;return h?d(gI,{id:"too-many-requests-modal",heading:n.translate("too_many_requests.title"),size:"large",accessibilityLabel:n.translate("too_many_requests.title"),blocking:!0,open:!0,onShow:()=>{c.value="tooManyRequests"},children:d(Lf,{gap:"base",children:[d(kf,{children:g?n.translate("too_many_requests.body"):n.translate("too_many_requests.body_no_cart")}),g&&d(y,{children:[d(hf,{display:"@media (inline-size >= small) none, block",children:d(Cf,{variant:"primary",inlineSize:"fill",onClick:m,children:n.translate("too_many_requests.return_to_cart")})}),d(nh,{display:"@media (inline-size >= small) auto, none",justifyItems:"end",children:d(Cf,{variant:"primary",onClick:m,children:n.translate("too_many_requests.return_to_cart")})})]})]})}):null}function LT(){const e=ut(),{i18n:t}=oe(),r=n(()=>e.value?t.translate("order_summary.total_updated_label_with_price",{totalPrice:t.formatCurrency(e.value.amount,{currency:e.value.currencyCode,form:"name"})}):null),a=i(r.peek());return S(()=>{const e=r.value,t=a.current;if(a.current=e,e&&e!==t)return ju({content:e})}),null}var RT={Progress:"xvcb04 xvcb03 _1fragemel _1frageme1 _1fragemf5 _1fragemdh _1fragemws _1fragemzf _1fragem32 _1fragem5u",toneVariant:{auto:"xvcb05",critical:"xvcb06"}};function MT({accessibilityLabel:e,id:t,max:n=1,tone:r="auto",value:a}){const i=Uc(),o=Ju(),s=e||o("processing");return i&&null==a?d(Mx,{children:s}):d("progress",{id:t,className:v(RT.Progress,RT.toneVariant[r]),value:a,max:n,"aria-label":s})}function NT({active:e=!1,announceProcessing:t=!0,children:n,loadingIndicatorVariant:r="spinner",showLoadingIndicator:i=!0}){const{i18n:o}=oe();a(()=>{if(e&&t)return ju({content:o.translate("general.processing")})},[e,t,o]);const s=e&&i;return d(hf,{children:[d(hf,{inert:e,opacity:e&&"spinner"===r?70:void 0,children:n}),d("div",{className:Ce({transitionProperty:"opacity",transitionTimingFunction:"easeInOut",transitionDuration:"slowest",pointerEvents:"none"}),style:{opacity:s?1:0},"aria-hidden":!s,children:["progressbar"===r&&d("div",{className:Ce({position:"fixed",insetBlockEnd:"small400",insetInlineStart:"small400",insetInlineEnd:"small400"}),children:d(MT,{accessibilityLabel:o.translate("general.processing")})}),"spinner"===r&&d(hf,{position:"absolute",insetBlock:"50% auto",insetInline:"50% auto",transform:"translate(-50%, -50%)",children:d(yf,{size:"large",accessibilityLabel:o.translate("general.processing")})})]})]})}function DT({children:e}){return d(no.Provider,{value:zT,children:e})}const zT=(e,t,n,r,a)=>({onInput:t=>{!function(e,t,r){(t.value||e)&&(r.value=!0,n(void 0))}(t,e,r)},onChange:t=>function(e,t){(t.value||e)&&(t.value=e)}(t,e),clearError:()=>n(void 0),onBlur:()=>function(e,t,n,r,a){const i=e.value;t.peek()&&function(e,t,n,r,a){if(!t)return;const i=n.value,s=o(()=>r.value);if(s&&e&&e===i)return;const l=t(e),c=l?{message:String(l?.message??l),origin:"client",type:"inline-validation"}:void 0;(function(e,t){return!t||!ro(e)||e.message!==t.message})(s,c)&&a(c)}(i,a,e,n,r)}(e,r,t,n,a),get touched(){return r.value},get error(){return t.value},get value(){return e.value}});var OT={autoBorderVariant:{none:"apn1wdr",extraSmall:"apn1wds",small:"apn1wdt",base:"apn1wdu",large:"apn1wdv",extraLarge:"apn1wdw"},autoBorderWidthVariant:{none:"apn1wdk",base:"apn1wdl",large100:"apn1wdm",large200:"apn1wdn"},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"},continuesColorScheme:"y3r6mh0",layerlessSurfaceBorderReset:"apn1wdi apn1wdh",liftedControlSurface:"apn1wdq",liftedSurface:"apn1wdp",surfaceBorderInherited:"apn1wdg",surfaceBorderReset:"apn1wdh"};const BT=f(void 0);function FT({accessibilityLabel:e,accessibilityRole:t="section",accessibilityLabelledBy:n,background:a,border:i,borderRadius:o,borderStyle:s,borderWidth:l,children:c,className:u,colorLayer:p,colorScheme:m,containerName:g,display:f,heading:y,id:_,maxBlockSize:b,maxInlineSize:k,minBlockSize:P,minInlineSize:S,overflow:w,padding:C}){const E=h(BT),x="section"===t?(E?.level??0)+1:E?.level??0,I=r(()=>({level:x}),[x]),A=Oa(OS().pending??{}),{pending:T,pendingInsetsRows:L,rowsInset:R}=OS(),M=R||!0===L&&UT(A.padding),N=y?d(jT,{headingLevel:x,heading:y,children:c}):c,D=A.background??a,z=A.colorScheme??m,O="subdued200"===D,B="auto"===T?.border&&O,F="control"===p?"base":"baseSpecified",V=("base"===D?F:D)??(z?F:void 0),{current:U}=Jp();return d(zS,{rowsInset:M,children:d(qT,{colorScheme:z,children:d(BT.Provider,{value:I,children:d(hf,{accessibilityLabel:e,accessibilityRole:"presentation"===t?void 0:t,"aria-labelledby":n,background:V,border:i,borderRadius:A.borderRadius??o,borderStyle:A.borderStyle??s,borderWidth:A.borderWidth??l,boxShadow:B?void 0:A.boxShadow,containerName:g,className:v(z&&OT.colorSchemeVariant[z],B&&OT.autoBorderVariant[A.boxShadow??"none"],B&&OT.autoBorderWidthVariant[T?.borderWidth??"base"],O?OT["control"===p?"liftedControlSurface":"liftedSurface"]:VT(V,z,U,p),u),colorLayer:p||(z?"base":void 0),display:f,id:_,maxBlockSize:b,maxInlineSize:k,minBlockSize:P,minInlineSize:S,overflow:w,padding:A.padding??C,children:x>1&&"section"===t?d(fu,{children:N}):N})})})})}function VT(e,t,n,r){if(!t){if(null==e||"transparent"===e||"baseSpecified"===e&&ao.some(e=>e===n))return;return r?OT.surfaceBorderReset:OT.layerlessSurfaceBorderReset}if(t===n)return"transparent"===e?OT.surfaceBorderInherited:"baseSpecified"===e?OT.continuesColorScheme:void 0}function UT(e){return null!=e&&(Array.isArray(e)?e.some(UT):"object"==typeof e?Object.values(e).some(UT):String(e).replace(/@\w+\s*\([^)]*\)/g,"").split(/[\s,]+/).some(e=>""!==e&&"none"!==e))}function qT({children:e,colorScheme:t}){const n=Jp(),{current:a}=n,i=r(()=>t&&t!==a?{parent:a,current:t}:n,[t,a,n]);return d(Kp.Provider,{value:i,children:e})}function jT({headingLevel:e,heading:t,children:n}){let r;return 1===e?r="small":2===e?r="small-300":3===e&&(r="small-500"),e<4?d(Lf,{gap:r,children:[d(CP,{children:t}),d("div",{children:n})]}):d(y,{children:[d(CP,{children:t}),n]})}function HT(e){const{inlineSize:n}=wS(e),r=se(n+2),a=m(2),o=i(null);return{ref:t(e=>{if(o.current?.disconnect(),o.current=null,!e||"undefined"==typeof ResizeObserver)return;const t=new ResizeObserver(([t])=>{if(!t)return;const n=t.contentBoxSize?.[0]?.inlineSize??t.contentRect.width;if(0===n)return;const i=e.firstElementChild;if(!i)return;const o=parseFloat(getComputedStyle(i).columnGap)||0,s=Math.floor((n+o)/(r.current+o));a.value=Math.min(3,Math.max(1,s))});t.observe(e),o.current=t},[a,r]),max:a}}BT.displayName="SectionContext";const $T=e=>e.lineAllocations.map((t,n)=>YT(e,n)),YT=(e,t)=>{const{lineAllocations:n,...r}=e,a=n[t];if(!a)throw new TypeError(`Missing line allocation at index ${t}`);return{...r,lineComponents:WT(e.lineComponents,t),lineAllocation:a}},WT=(e,t)=>e.map(({lineAllocations:e,...n})=>{const r=e[t]??e[0];if(!r)throw new TypeError("Missing line allocation for merchandise line component");return{...n,lineAllocation:r}});function GT(){const{checkout:{configuration:e,negotiator:t}}=oe(),n=e.layout.isOnePage.value,{value:a}=t.current.fields.merchandiseLines,{value:i}=t.current.fields.allViolations,{currentDetour:o}=tc().value,{value:l}=t.current.fields.legacyRepresentProductsAsFees,c=t.parts.merchandiseLines.value,[u]=s(c),d=o?.type,p=a?.lines;return r(()=>{const e=e=>l?function(e){return e.filter(e=>!1===e.legacyFee)}(e):e,t="thankYou"===d?[]:e("stockProblems"===d?u:c),r=e(p??[]);return function(e,t,n,r){const a=Mw(t,r),i=n.filter(({quantity:e,stableId:t})=>e>0&&!a.has(t)),o=Dw(t,n,r).map(({proposed:e,negotiated:t})=>t??e),s=void 0===i||0===i.length&&o.length>0;return function(e,t,n,r){return e.flatMap(e=>{const a=t.find(({stableId:t})=>t===e.stableId),i=n&&a?a.lineAllocations:e.lineAllocations;return $T({...e,lineAllocations:i}).map(t=>function({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(KT),parentRelationship:t.parentRelationship,quantity:e.quantity,properties:t.properties,options:t.options,disclosures:n.disclosures,productId:n.productId,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(JT).map(t=>QT(t,e.stableId))}}(t,e,r))})}(s?o:i,t,s,e)}(n,t,r,i??[])},[u,d,n,l,p,c,i])}const KT=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.vendor,requiresShipping:e.requiresShipping,sellingPlan:e.sellingPlan,subtitle:e.subtitle,title:e.title,variantId:e.variantId}}),JT=e=>El(e.discountDetails.discount)&&"LINE"===e.discountDetails.discount.presentationLevel,QT=(e,t)=>({id:`allocation-${t}-${io(e.discountDetails.title)}`,discount:e.discountDetails.discount,amount:e.amount});function XT(){const{checkout:e}=oe(),t=e.configuration.layout.isOnePage.value,n=(e.proposal.facts.merchandiseLines??[]).filter(e=>(e?.quantity??-1)>0).map((e,t)=>({key:`${t}${e.title}`,title:e.title,properties:e.properties,image:eL(e.image)??void 0,totalAmountAfterLineDiscounts:e.priceAfterDiscounts,totalAmountBeforeReductions:e.price,quantity:e.quantity,subtitle:e.variantTitle,lineDiscounts:e.appliedDiscounts.filter(ZT).map(e=>tL(e,t)),parentTitle:e.parentTitle,components:[],unitPrice:null,totalPrice:e.priceAfterDiscounts})),r=GT();return[...t?r.filter(e=>e.quantity>0):r,...n]}const ZT=e=>"LINE"===e.presentationLevel,eL=e=>e?{...e,altText:e.altText||""}:null,tL=(e,t)=>({id:`allocation-${t}-${io(e.title)}`,discount:{type:"applied",title:e.title,presentationLevel:e.presentationLevel},amount:e.amountDiscounted});function nL(){const e=I(XT()),{shop:{id:t},checkout:{negotiator:r}}=oe(),a=r.current.fields.remoteMerchandiseDetails;return n(()=>{const n=a.value?.stableIdToShopId??new Map,r=n.values(),i=new Map([[t,[]]]);for(const e of r)i.set(e,[]);const o="PurchaseOrderMerchandiseTerms"===a?.value?.mergedBuyerProposalMerchandise?.__typename&&a.value.mergedBuyerProposalMerchandise.merchandiseLines?a.value.mergedBuyerProposalMerchandise.merchandiseLines.map(e=>"PurchaseOrderMerchandiseLine"===e.__typename&&"ProductVariantSnapshot"===e.merchandise.__typename?{key:e.stableId,stableId:e.stableId,id:e.merchandise.variantId??null,image:co(e.merchandise.image),title:e.merchandise.productTitle,subtitle:e.merchandise.title??null,quantity:e.quantity.items,properties:lo(e.merchandise.properties),options:e.merchandise.options??[],itemPrice:so(e.merchandise.price),totalAmountBeforeReductions:so(e.merchandise.price),totalAmountAfterLineDiscounts:so(e.merchandise.price),totalPrice:so(e.merchandise.price),deferredAmount:e.merchandise.deferredAmount?so(e.merchandise.deferredAmount):void 0,sellingPlan:oo(e.merchandise.sellingPlan),hideRuntimeExtensions:!0,unitPrice:null,components:[],parentRelationship:null,recurringTotal:void 0,lineDiscounts:[]}:void 0).filter(e=>Boolean(e)):[];for(const a of[...e.value,...o]){if(!a.stableId){i.get(t)?.push(a);continue}const e=n.get(a.stableId);e?i.get(e)?.push({...a,hideRuntimeExtensions:!0}):i.get(t)?.push(a)}return i})}var rL={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 aL=qc("ResourceList");function iL({children:e,title:t,titleHidden:n,spacing:a="base",border:i="none"}){const o=jc(void 0,aL),s=v(rL.ResourceList,a&&rL.rowGroupSpacingVariant[a],i&&rL.borderVariant[i]),l=t?d(CP,{id:o,children:t}):null,c=r(()=>({spacing:a}),[a]);return d(y,{children:[t&&n?d("div",{className:rL.visuallyHidden,children:l}):l,d(fu,{children:d("div",{role:"table","aria-labelledby":o,className:s,children:d(lL.Provider,{value:c,children:e})})})]})}function oL({children:e,hidden:t,blockPadding:n}){const r=v(rL.ResourceListHeader,n&&!t&&rL.resourceListHeaderBlockPaddingVariant[n]);return d("div",{role:"rowgroup",className:v(rL.ResourceListRowGroup,t&&rL.resourceListHeaderHidden),children:d("div",{role:"row",className:r,children:e})})}function sL({children:e,primary:t,hidden:n}){return d("div",{role:"columnheader",className:v(t?rL.primary:void 0,n&&rL.visuallyHidden),children:e})}const lL=f(void 0);function cL({children:e}){return e?d("div",{role:"rowgroup",className:rL.ResourceListRowGroup,children:e}):null}const uL=f(void 0);function dL({spacing:e,children:t,showLines:n=!0}){const a=r(()=>({spacing:e}),[e]),i=r(()=>({showLines:n}),[n]);return d(lL.Provider,{value:a,children:d(uL.Provider,{value:i,children:t})})}function pL({lineOffset:e=0}){const t=h(uL);return d("div",{"aria-hidden":!0,className:rL.ResourceItemLineContainer,style:k({[rL.lineOffsetVar]:Se(e)}),children:[d("div",{className:v(rL.ResourceItemLine,rL.ResourceItemLineVertical,t?.showLines&&rL.visibleLine)}),d("div",{className:v(rL.ResourceItemLine,rL.ResourceItemLineCurved,t?.showLines&&rL.visibleLine)})]})}function mL({alignSelf:e="auto",inlineAlignment:t,children:n,primary:r,hidden:a,minBlockSize:i,noWrap:o}){const{lineItems:s}=Km(),l=t??s?.inlineAlignment??"center",{className:c,style:u}=$m({minBlockSize:i}),p=v(rL.ResourceItemContent,rL.resourceItemContentInlineAlignment[l],e&&rL.resourceItemContentAlignSelf[e],r&&rL.resourceItemContentPrimary,a&&rL.resourceItemContentHidden,o&&rL.resourceItemContentNoWrap,c);return d("div",{role:"cell",className:p,style:u,children:a?d("div",{className:rL.visuallyHidden,children:n}):n})}function hL({children:e,blockPadding:t="none",spacing:n="base",lineOffset:r=0,className:a}){const i=h(lL),o=h(uL);i||console.warn(" components must be wrapped in a component.");const s=v(rL.ResourceItem,t&&rL.resourceItemBlockPaddingVariant[t],i?.spacing&&rL.rowSpacingVariant[i.spacing],n&&rL.resourceItemSpacingVariant[n],o&&rL.groupedResourceItem,a);return d("div",{role:"row",className:s,children:[d(pL,{lineOffset:r}),e]})}var gL={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 fL({accessibilityLabel:e,accessibilityVisibility:t,children:n,color:r="base",borderRadius:a="fullyRounded",display:i="block",icon:o,iconPosition:s="start",id:l,size:c="base",tone:u="auto",visibility:p}){const m=o?d(lh,{size:c,type:o,tone:yL(u)}):null,h=d(y,{children:["start"===s?m:null,d("span",{children:n}),"end"===s?m:null]});return d("div",{id:l,className:v(gL.Badge,gL.displayVariant[o?`${i}Grid`:`${i}Flex`],gL.toneColorVariant["auto"===u?"neutral":u][r],gL.sizeVariant[vL(c)],gL.borderRadiusVariant[a],o&&gL.iconVariant,"hidden"===p&&gL.visuallyHidden),"aria-hidden":"hidden"===t||void 0,children:e?d(y,{children:[d("span",{className:gL.visuallyHidden,children:e}),h]}):h})}function yL(e){switch(e){case"accent":case"warning":case"success":return"auto";default:return e}}function vL(e="base"){switch(e){case"small":case"small-100":return"small100";default:return e}}function _L(e,t){for(const n of t){const t=n.lineAllocations.findIndex(t=>t.stableId===e),r=n.lineAllocations[t];if(t>=0&&r)return{lineAllocation:r,parent:n,index:t}}return null}function bL({stableId:e,merchandiseLines:t}){if(!e)return null;const n=_L(e,t);if(!n)return null;const{parent:r,index:a}=n;return YT(r,a)}function kL(){const{i18n:e}=oe();function t(t){return e.formatCurrency(t.amount,{currency:t.currencyCode,form:"short"})}return function({fixedPrice:n,recurringPrice:r,fixedPriceCount:a,interval:i,intervalCount:o}){const s=(()=>{switch(i){case"year":return e.translate("subscriptions.recurring_total_intervals.year",{count:o});case"month":return e.translate("subscriptions.recurring_total_intervals.month",{count:o});case"week":return e.translate("subscriptions.recurring_total_intervals.week",{count:o});case"day":return e.translate("subscriptions.recurring_total_intervals.day",{count:o});default:return""}})();return n&&a?function(t,n,r,a){return`${e.translate("subscriptions.recurring_totals_with_policies.first_cycles",{count:r,total_price:n})}${e.translate("subscriptions.recurring_totals_with_policies.following_cycles",{total_price:t,interval:a})}`}(t(r),t(n),a,s):e.translate("subscriptions.recurring_totals",{total_price:t(r),interval:s})}}function PL(){const e=kL();return function(t){return t?t.map(e):void 0}}function SL({available:e,name:t,value:n}){const r=`${t}: ${n}`;return"string"==typeof n&&0===n.lastIndexOf("https://cdn.shopify.com",0)?d(Af,{href:n,children:d(wL,{condition:e,children:d(kf,{size:"small",color:"subdued",children:t})})}):d(wL,{condition:e,children:d(kf,{size:"small",color:"subdued",children:r})})}function wL({condition:e,children:t}){return!1===e?d(kf,{type:"redundant",children:t}):t}function CL({properties:e,available:t}){const n=e.flatMap(({name:e,visible:n,value:r,sourceType:a})=>n&&"MerchandisePropertyValueJson"!==a&&""!==r&&null!==r?[d(hf,{accessibilityRole:"list-item",children:d(SL,{available:t,name:e,value:r})},e)]:[]);return n.length>0?d(Lf,{accessibilityRole:"unordered-list",gap:"small-400",children:n}):null}function EL({id:e,deferredAmount:t,options:a,properties:i,recurringTotal:o,sellingPlan:s,subtitle:l,title:c,titleSize:u,totalPrice:p,children:m,titleAccessory:h,blockLayoutContent:g,remoteShopName:f,hasFailed:y,hideRuntimeExtensions:v}){const{lineItems:{optionsColor:_="subdued",optionsFormat:b="inline",optionsSeparator:k="comma",optionsTypography:P={},titleTypography:S={}}}=Km(),w=r(()=>e&&!v?{stableId:e}:null,[e,v]),C=u??"small",E=P.size??"small",{i18n:x,checkout:{negotiator:I}}=oe(),A=a&&a.length>0,T="middot"===k?" · ":", ",L=kL(),{value:R}=I.current.fields.merchandiseLines,M=tc(),N=$S(n(()=>"thankYou"===M.value.currentDetour?.type?"Checkout::ThankYou::CartLineDetails::RenderAfter":"Checkout::CartLineDetails::RenderAfter").value),D=function({stableId:e,merchandiseLines:t}){const n=bL({stableId:e,merchandiseLines:t});return!n?.variantId}({stableId:e,merchandiseLines:R?.lines??[]})?[]:N,z={size:E,color:_},O={size:E,color:_};return d(hf,{className:"dDm6x",children:[f||y?d(Lf,{direction:"inline",gap:"small-300",children:[f?d(kf,{size:"small",color:"subdued",children:f}):null,y?d(fL,{icon:"alert-circle",tone:"critical",children:x.translate("order_summary.unconfirmed_label")}):null]}):null,d(Mx,{size:C,children:[d(xL,{condition:"bold"===S.weight,children:c}),h]}),d(Lf,{children:[g,"inline"===b&&l?d(Mx,{...O,children:l}):null,"inlineDescriptionList"===b&&A?d(Mx,{...O,children:a?.map(({name:e,value:t})=>`${e}: ${t}`).join(T)}):null,"descriptionList"===b&&A?d(hf,{accessibilityRole:"unordered-list",children:a?.map(({name:e,value:t})=>d(hf,{accessibilityRole:"list-item",children:d(kf,{...z,children:`${e}: ${t}`})},e))}):null,s?.name?d(Mx,{...O,children:s.name}):null,o&&o.fixedPrice&&o.fixedPriceCount?d(Mx,{...O,children:L(o)}):null,i&&d(CL,{properties:i}),m,w?d(LC,{customizations:D,options:w}):null]})]})}function xL({condition:e,children:t}){return e?d(kf,{type:"strong",children:t}):t}function IL(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}}const AL=C({displayName:"ProductDisclosuresDetails",load:()=>E(()=>hl(()=>import("./7d468a18.Dl8ddV_8.js"),__vite__mapDeps([262,1,2,3,4,5,11,14,15,16,17,18]))),suspense:!1}),TL={small:16,large:24};function LL({disclosure:e,size:t}){const n=e.symbol;if(n){const e=`${TL[t]}px`,r="small"===t?"":n.altText??"";return d(hf,{inlineSize:e,blockSize:e,children:d(vw,{src:n.one,srcSet:`${n.one} 1x, ${n.two} 2x, ${n.four} 4x`,alt:r,accessibilityRole:"small"===t?"presentation":"img",aspectRatio:"1/1",objectFit:"contain"})})}return d(lh,{type:"info",size:"small"===t?"small":"large-100",tone:"auto"})}const RL=qc("product-disclosure-modal-"),ML=qc("product-disclosure-tooltip-");function NL({disclosures:e,title:t}){const{checkout:{negotiator:r}}=oe(),a=LI("deliveryNext");return n(()=>!a.value&&(0===r.initialUnresolvedFields.value.size||"fetch_failed"===r.pendingFieldsNegotiation.value?.status)).value&&e?.length?d(DL,{disclosures:e,title:t}):null}function DL({disclosures:e,title:t}){const{i18n:n}=oe(),r=jc(void 0,RL),a=jc(void 0,ML),i=AL.usePrefetch(),o=()=>{i()},s=n.translate("order_summary.product_disclosures.title"),l=n.translate("tooltip.accessibility_label_context",{context:t});return d(y,{children:[d(Af,{commandFor:r,interestFor:a,accessibilityLabel:l,onFocus:o,onMouseEnter:o,textDecoration:"none",tone:"monochrome",verticalAlign:"text-bottom",children:d(lh,{type:"alert-triangle",size:"small"})}),d(dm,{id:a,children:zL(e)}),d(gI,{id:r,heading:s,children:d(AL,{disclosures:e})})]})}function zL(e){return d(hf,{inlineAlignment:"start",children:d(Lf,{gap:"small-200",children:e.map(e=>d(nh,{gridTemplateColumns:"auto minmax(0, 1fr)",gap:"small-200",children:[d(nh,{blockSize:"1lh",placeItems:"center",children:d(LL,{disclosure:e,size:"small"})}),d(Mx,{textAlign:"start",children:e.title})]},e.id))})})}function OL({amount:e}){const{i18n:t}=oe();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 d(Mx,{type:"small",color:"subdued",children:r})}const BL=f(null);var FL="_1mwdekd1 _1mwdekd0 _1fragem126 _1fragemzg _1fragem5u";function VL({children:e,id:t}){const{onToggle:n,isOpen:r,contentId:a}=h(BL)??{};return e?void 0!==r?d("button",{id:t,className:FL,onClick:n,"aria-controls":a,"aria-expanded":r,type:"button",children:[e,d(lh,{size:"small-200",type:r?"chevron-up":"chevron-down",className:"_1mwdekd3 _1mwdekd2 _1fragem6e"})]}):d("p",{id:t,className:FL,children:e}):null}const UL=qc("Details"),qL=function(e){const n=_(function(n,r){const{open:i,defaultOpen:o=!1,onToggle:l,id:c}=n,{upsertInteraction:u,deleteInteraction:p}=jd(),[m,h]=s(o),g=i??m,f=t(()=>{const e=g?"open":"closed",t=g?"closed":"open";void 0===i&&h(!g),l?.(e,t)},[g,l,i]),y=t(()=>{g&&(void 0===i&&h(!1),l?.("open","closed"))},[g,l,i]),v=t(()=>{g||(void 0===i&&h(!0),l?.("closed","open"))},[g,l,i]);return a(()=>()=>{c&&p(c)},[c]),a(()=>{c&&u({id:c,type:"command",kind:"visibility",defaultCommand:"--toggle",hide:y,show:v,toggle:f,visible:g})},[c,g,y,v,f,u]),d(e,c&&void 0===i?{...n,open:m,onToggle:f,ref:r}:{...n,ref:r})});return n.displayName=`ToggleCommandTargetComponent(${e.displayName||e.name||"Component"})`,n}(function({open:e,defaultOpen:n=!1,onToggle:a,onAfterToggle:o,id:l,summary:c,content:u,toggleTransition:p="auto"}){const m=void 0!==e,[h,g]=s(n),f=m?e:h,y=`${jc(l,UL)}-content`,v=i(),_=t(e=>{e?.preventDefault();const t=e=>{"function"==typeof a&&a(e?"open":"closed",e?"closed":"open")};m?t(f):g(e=>(t(e),!e))},[m,f,a]);(!u||Array.isArray(u)&&u.length<1)&&console.warn("Details: content is required for toggle functionality");const b="string"==typeof c?d(VL,{children:c}):c,k=r(()=>({isOpen:f,onToggle:_,contentId:y}),[y,_,f]);return d(BL.Provider,{value:k,children:d("div",{id:l,children:[b,d(Td,{id:y,open:f,duration:"auto"===p?"base":"none",onTransition:e=>{const t="entering"===v.current&&"entered"===e,n="exiting"===v.current&&"exited"===e;(t||n)&&"function"==typeof o&&o(t?"closed":"open",t?"open":"closed"),v.current=e},children:u})]})})});function jL({accessibilityLabel:e,accessibilityRole:t="generic",accessibilityVisibility:n="visible",alignSelf:r="auto",background:a="transparent",backgroundHoverAndFocus:i,blockSize:o="auto",border:s="none",borderColor:l,borderRadius:c="none",borderStyle:u,borderWidth:p,children:m,display:h="auto",gridColumn:g="auto",gridRow:f="auto",id:_,inlineSize:b="auto",maxBlockSize:k="none",maxInlineSize:P="none",minBlockSize:S="0",minInlineSize:w="0",overflow:C="visible",padding:E="none",paddingBlock:x,paddingBlockEnd:I,paddingBlockStart:A,paddingInline:T,paddingInlineEnd:L,paddingInlineStart:R}){const M=Ed(),{Element:N,role:D}=th(t,{defaultElement:M?"span":"div"}),{className:z,style:O,styleElement:B}=$m({alignSelf:r,backgroundColor:a,backgroundColorHoverAndFocus:i,blockSize:o,...Ne({border:s,borderColor:l,borderStyle:u,borderWidth:p}),borderRadius:c,display:h,gridColumn:g,gridRow:f,inlineSize:b,maxBlockSize:k,maxInlineSize:P,minBlockSize:S,minInlineSize:w,padding:E,paddingBlock:x,paddingBlockEnd:I,paddingBlockStart:A,paddingInline:T,paddingInlineEnd:L,paddingInlineStart:R},{transforms:{display:yd}});return d(y,{children:[B,d(N,{"aria-hidden":"hidden"===n||void 0,"aria-label":e,className:v("exclusive"===n&&"_1r0jjrp1 _1fragem121","hidden"===C&&"_1r0jjrp0 _1fragemup _1fragemv4",z),id:_,role:D,style:O,children:m})]})}function HL({components:e,id:n}){const a=e.some(({merchandise:e})=>e.disclosures?.length),[i,o]=s(e.length<=10||a),l=t(()=>{o(e=>!e)},[]),{i18n:c,embed:u}=oe(),{lineItems:{optionsColor:p="subdued"}}=Km(),m={size:"small",color:p},h=$S("Checkout::CartLineDetails::RenderLineComponents"),g=r(()=>e.reduce((e,{quantity:t})=>e+t,0),[e]),f=r(()=>n?{stableId:n}:null,[n]);if(0===e.length)return null;if(f&&h.length>0){const t=e.filter(({merchandise:e})=>e.disclosures?.length);return d(Lf,{gap:"base",overflow:"hidden",children:[d(LC,{customizations:h,options:f}),t.map(({stableId:e,merchandise:t})=>d(kf,{size:"small",children:[t.title," ",d(NL,{disclosures:t.disclosures,title:t.title})]},e))]})}const v=i?c.translate("order_summary.collapse_component_information",{count:g}):c.translate("order_summary.expand_component_information",{count:g});return d(y,{children:[d(qL,{open:i,onToggle:l,summary:d(VL,{children:d(kf,{color:"subdued",size:"small",children:v})}),content:d(hf,{paddingBlockStart:"small-400",children:d(Lf,{accessibilityRole:"unordered-list",gap:"small-100",children:e.map(({stableId:e,merchandise:{title:t,subtitle:n,image:r,sellingPlan:a,disclosures:i},quantity:o,properties:s})=>{const l=c.translate("order_summary.component_quantity_title",{quantity:o,product_title:t}),p=IL(u,r);return d(nh,{accessibilityRole:"list-item",gridTemplateColumns:"auto minmax(0, 1fr)",gap:"small-300",children:[d(jL,{alignSelf:"start",children:d(_S,{size:"small",src:p?.one,srcSet:p?`${p.one} 1x, ${p.two} 2x, ${p.four} 4x`:void 0,alt:r?.altText})}),d(jL,{alignSelf:"center",children:d(Lf,{children:[d(kf,i?.length?{size:"small",children:[l," ",d(NL,{disclosures:i,title:t})]}:{size:"small",children:l}),n&&d(kf,{...m,children:n}),a&&d(kf,{...m,children:a.name}),s&&d(CL,{properties:s})]})})]},e)})})})}),d(UC,{blockSize:"small-400"})]})}function $L({parentTitle:e}){const{i18n:t}=oe(),{lineItems:{optionsColor:n}}=Km(),r={type:"small",color:n??"subdued"},a=t.translate("order_summary.group_title_label",{group_title:e});return d(Mx,{...r,children:a})}function YL(e){return!0===e.checkoutHideZeroValueDiscountLines}function WL({discount:e,amount:t}){const{i18n:n,shop:r}=oe();if(YL(r)&&0===t.amount)return null;const a=t.amount>0?`(${n.formatCurrency(-t.amount,{currency:t.currencyCode,form:"short"})})`:null,i=("code"===e.type&&e.codeHidden?n.translate("order_summary.discount_title"):e.title).toUpperCase();return d(nh,{gridAutoFlow:"column",gridAutoColumns:"1fr",gridTemplateColumns:"minmax(auto, max-content) minmax(0, 1fr)",gridTemplateRows:"minmax(0, 1fr)",gap:"small-400",alignItems:"center",alignContent:"center",children:[d(lh,{type:"discount",size:"small"}),d(kf,{accessibilityVisibility:"exclusive",children:n.translate("order_summary.discount_code_aria_text")}),d(Mx,{type:"small",color:"subdued",children:[d(kf,{dir:"auto",children:i}),a?` ${a}`:null]})]},e.title)}function GL({totalAmountBeforeReductions:e,totalAmountAfterDiscounts:t,size:n}){const{i18n:r}=oe(),a=t.amount>0?r.formatCurrency(t.amount,{currency:t.currencyCode,form:"short"}):d(kf,{letterCase:"uppercase",children:r.translate("order_summary.free_total_label")});return d(y,{children:[d(kf,{accessibilityVisibility:"exclusive",children:r.translate("order_summary.original_price")}),d(kf,{size:"small",color:"subdued",type:"redundant",children:r.formatCurrency(e.amount,{currency:e.currencyCode,form:"short"})}),d(kf,{accessibilityVisibility:"exclusive",children:r.translate("order_summary.price_after_discount_aria_text")}),d(Mx,{size:n,children:a})]})}function KL({totalAmountBeforeReductions:e,totalAmountAfterLineDiscounts:t,compareAtTotal:n,presentationLevel:r,hasDeferredAmount:a,hasFailed:i,size:o}){const{i18n:s}=oe(),{lineItems:{priceTypography:l={}}}=Km();let c;if(i?c="redundant":"bold"===l.weight&&(c="strong"),n&&e.amountt.amount&&"LINE"===r)return d(GL,{totalAmountAfterDiscounts:t,totalAmountBeforeReductions:e,size:o});const u=0===e.amount&&!a,p=t;return d(kf,{translate:u,letterCase:u?"uppercase":void 0,type:c,tone:i?"critical":void 0,size:o,children:u?s.translate("order_summary.free_total_label"):s.formatCurrency(p.amount,{currency:p.currencyCode,form:"short"})})}function JL({unitPrice:e}){const n=function(e){const{i18n:n}=oe(),r=function(){const{i18n:e}=oe();return t(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])}();if(null===e)return"";const{referenceValue:a,referenceUnit:i}=e.measurement,o=r(i),s=a.toString(),l=n.formatCurrency(e.price.amount,{currency:e.price.currencyCode,form:"short"});if("ITEM"===i){if(1===a)return n.translate("order_summary.unit_price.per_item.single",{price:l});if(a>1)return n.translate("order_summary.unit_price.per_item",{price:l,count:a})}else{if(1===a)return n.translate("order_summary.unit_price.per_unit.single",{price:l,unit:o});if(a>1)return n.translate("order_summary.unit_price.per_unit.plural",{price:l,unit:o,count:s})}return""}(e);return null===e?null:d(Mx,{type:"small",color:"subdued",children:n})}function QL({unitPrice:e,itemPrice:t,quantity:n}){const{i18n:r,checkout:{negotiator:a}}=oe(),i=a.current.fields.buyerIdentity.value?.purchasingCompany,o=Boolean(i)&&!e&&n>1&&t;return e?d(JL,{unitPrice:e}):o?d(y,{children:d(Mx,{type:"small",color:"subdued",children:[d(kf,{accessibilityVisibility:"hidden",children:r.translate("order_summary.price_per_item.label",{price:r.formatCurrency(t.amount,{currency:t.currencyCode,form:"short"})})}),d(kf,{accessibilityVisibility:"exclusive",children:r.translate("order_summary.price_per_item.accessibility_label",{price:r.formatCurrency(t.amount,{currency:t.currencyCode,form:"short"})})})]})}):null}const XL={small200:"small-200",small100:"small",base:"base",large100:"large",large200:"large-200"};function ZL(e="base"){return XL[e]}function eR(e){const t=e.parentRelationship;return d(t?dL:y,{spacing:"small100",children:d(tR,{...e})})}function tR({id:e,quantity:t,itemPrice:n,compareAtPrice:a,unitPrice:i,lineDiscounts:o,deferredAmount:s,totalPrice:l,sellingPlan:c,options:u,recurringTotal:p,title:m,subtitle:h,image:g,properties:f,disclosures:v,isHsaEligible:_,totalAmountBeforeReductions:b,totalAmountAfterLineDiscounts:k,components:P,hasReturnability:S,parentTitle:w,parentRelationship:C,remoteShopName:E,hasFailed:x,hideRuntimeExtensions:I,hidePrice:A,className:T}){const{shop:L,i18n:R,embed:M}=oe(),N=IL(M,g),{lineItems:{quantityVisibility:D="visible",priceLayout:z="inline",priceTypography:O={},titleTypography:B={}},merchandiseThumbnail:{size:F}={}}=Km(),V=L.hasFlagEnabled(uo),U=null!==C,q=V&&a?{amount:a.amount*t,currencyCode:a.currencyCode}:null,j=r(()=>{if(V&&a&&n){const e=(a.amount-n.amount)*t;return e>0?{amount:e,currencyCode:a.currencyCode}:null}return null},[V,a,n,t]),H=O.size,$=U?"small":ZL(F),Y=B.size??"base",{blockSize:W}=wS($),G="hidden"===D||1===t&&"visibleWhenMultiple"===D?void 0:t,K=A?null:d(KL,{totalAmountBeforeReductions:b,totalAmountAfterLineDiscounts:k,compareAtTotal:q,presentationLevel:o.length||j?.amount?"LINE":"CART",hasDeferredAmount:Boolean(s?.amount),hasFailed:x,size:H});return d(hL,{className:T,lineOffset:C?0:W/2,children:[d(mL,{inlineAlignment:"start",children:d(_S,{size:$,src:N?.one,srcSet:N?`${N.one} 1x, ${N.two} 2x, ${N.four} 4x`:void 0,alt:g?.altText,totalItems:G})}),d(mL,{primary:!0,alignSelf:"baseline",minBlockSize:`${W}px`,children:d(EL,{id:e,title:m,titleSize:Y,subtitle:h,properties:f,sellingPlan:c,options:u,recurringTotal:p,totalPrice:l,deferredAmount:s,titleAccessory:v?.length?d(y,{children:[" ",d(NL,{disclosures:v,title:m})]}):void 0,blockLayoutContent:"block"===z?K:void 0,remoteShopName:E,hasFailed:x,hideRuntimeExtensions:I,children:[_?d(kf,{size:"small",color:"subdued",children:R.translate("payment.shop_pay_hsa.eligible_product")}):null,S?d(kf,{size:"small",color:"subdued",children:R.translate("amazon_pay.prime_returnability")}):null,d(QL,{unitPrice:i,itemPrice:n,quantity:t}),j?.amount?d(OL,{amount:j}):null,o.length>0||P.length>0?d(y,{children:[o.map(e=>d(WL,{discount:e.discount,amount:e.amount},e.id)),d(HL,{components:P,id:e})]}):null,P.length<1&&w?d($L,{parentTitle:w}):null]})}),d(mL,{hidden:!0,children:d(kf,{children:t})}),"inline"===z?d(mL,{alignSelf:"baseline",children:d(hf,{className:"VnYYd",inlineAlignment:"end",children:K})}):null]})}function nR(e){switch(e){case"PICK_UP":return"kAxbv";case"SHIPPING":return"KKoGf";default:return}}function rR(e){return e!==ze.Country&&e!==ze.CountryProvince}function aR({deliveryMethod:e,localDelivery:t,subscriptionDelivery:n}){const{title:r,carrierName:a}=e;return t||n||(!a||r.toLowerCase().includes(a.replace(/[^\w\s]/,"").toLowerCase())?r:`${a} ${r}`)}function iR(e,t,n,r,a){const i=Ny(n??[],e?.handle);let o,s,l,c,u=function(e,t,n,r){return t?"unavailable"===n||!r?.maxDeliveryDateTime&&!r?.minDeliveryDateTime:!e}(e?.displayCheckoutRedesign,t,a,i);return r||(o=i?.minDeliveryDateTime||e?.minDeliveryDateTime,s=i?.maxDeliveryDateTime||e?.maxDeliveryDateTime,l=function(e,t){return e?.deliveryExpectationPresentmentTitle?.short||t?.short}(i,e?.deliveryPromisePresentmentTitle),c=i?.brandedPromise||e?.brandedPromise,i?.minDeliveryDateTime&&i?.maxDeliveryDateTime&&t&&!c&&(u=!0)),{showEstimatedDeliveryLabel:u,asyncShopPromiseEnabled:t,deliveryExpectationDateTime:i?.minDeliveryDateTime&&i?.maxDeliveryDateTime,estimatedDeliveryLabelTitle:l,minDeliveryDate:o,maxDeliveryDate:s,brandedPromise:c}}function oR(e){const t=[],n=[];return e.forEach(e=>{"SUBSCRIPTION"===e.type?t.push(e):n.push(e)}),{subscriptionLines:t,oneTimePurchaseLines:n}}function sR(e,t,n){const r=Ny(t,e.handle);let a;return r&&r.minDeliveryDateTime&&r.maxDeliveryDateTime&&n&&(a=r),{deliveryExpectation:a,shopPromise:r?.brandedPromise}}function lR(e){return e.reduce((e,{quantity:t})=>e+t,0)}function cR(e){return Object.values(e.reduce((e,t)=>{const{id:n,stableId:r,quantity:a}=t,i=n||r;return i?(e[i]?e[i].quantity+=a:e[i]={...t},e):e},{}))}function uR(e){if(!e)return[];const t=e.reduce((e,t)=>{const n=t?.flatRateGroupId??Wl(),r=e[n];if(r){const e=r.targetMerchandiseLines.map(e=>e.digest);t.targetMerchandiseLines.filter(t=>!e.includes(t.digest)).forEach(e=>r.targetMerchandiseLines.push(e))}else e[n]=t;return e},{});return Object.values(t)}function dR(e,t){const n=i(null),r=i(new Set),a=new Set(e),o=n.current,s=null==t?null:new Set(t);if(null!=o){for(const e of a)o.has(e)||null!=s&&!s.has(e)||r.current.add(e);for(const e of r.current)a.has(e)||r.current.delete(e)}return n.current=a,r.current}const pR={position:"end",source:"magnify"};function mR({hasFilter:e,maxItems:t,merchandiseLines:n,totalLineQuantities:a,deliveryGroup:i}){const[o,l]=s(""),{i18n:c,checkout:u}=oe(),p=new Set(mo(u.proposal.negotiated.fields.paymentMethods.value)),m=void 0===t?n.map(e=>e.key):n.slice(0,t).map(e=>e.key),h=dR(n.map(e=>e.key),m),g=nR(i),{value:f}=_i(),{value:v}=u.negotiator.current.fields.deliveryExpectations,_=r(()=>function({deliveryLines:e,deliveryExpectations:t}){const n={};if(!e)return n;const r=function(e){const t={};return e?.deliveryExpectationLines?.forEach(e=>{e.deliveryStrategyHandle&&(t[e.deliveryStrategyHandle]=e)}),t}(t);return e.forEach(e=>{if("available"!==e.status)return;const t=e.methods.find(t=>t.handle===e.selectedDeliveryMethodHandle);if(!t)return;const{brandedPromise:a,handle:i}=t;if(!a)return;if(a.handle!==po)return;const o=r[i],s=o?.returnability??!1;e.targetMerchandiseLines?.forEach(e=>n[e.stableId]={brandedPromise:a,hasReturnability:s})}),n}({deliveryLines:f,deliveryExpectations:v}),[f,v]),b=r(()=>{const e=o.toLowerCase().split(" ").filter(Boolean);return n.filter(t=>e.every(e=>t.title.toLowerCase().includes(e)||t.subtitle?.toLowerCase().includes(e)))},[o,n]),k=r(()=>b?.reduce((e,t)=>e+t.quantity,0),[b]),P=n.length;return d(y,{children:[e&&d(y,{children:[d(pC,{autoFocus:!0,icon:pR,controlledValue:o,onInput:e=>l(e),label:c.translate("order_summary.more_items_modal.search_item")}),d(UC,{blockSize:"large-300"})]}),e&&o&&d(y,{children:[d(Lf,{direction:"inline",justifyContent:"space-between",children:[d(kf,{color:"subdued",children:c.translate("order_summary.more_items_modal.number_items_shown",{shownNumber:k,totalNumber:a||P||0})}),d(Af,{onClick:()=>l(""),children:c.translate("order_summary.more_items_modal.clear_search")})]}),d(UC,{blockSize:"large-300"})]}),e&&0===b.length?d(Lf,{direction:"inline",justifyContent:"center",gap:"small-400",padding:"none none large-300 none",children:[d(hf,{inlineSize:"56px",children:d(lh,{size:"fill",type:"alert-circle"})}),d(Mx,{textAlign:"center",children:c.translate("order_summary.more_items_modal.empty_results",{searchText:o})})]}):d(iL,{title:c.translate("order_summary.shopping_cart_label"),titleHidden:!0,children:[d(oL,{hidden:!0,children:[d(sL,{hidden:!0,children:c.translate("order_summary.product_image_label")}),d(sL,{hidden:!0,children:c.translate("order_summary.description_label")}),d(sL,{hidden:!0,children:c.translate("order_summary.quantity_label")}),d(sL,{hidden:!0,children:c.translate("order_summary.price_label")})]}),d(cL,{children:b.map(({key:e,...n},r)=>{if(void 0!==t&&r>=t)return null;const a=e.substring(0,e.lastIndexOf("-"));return d(eR,{...n,isHsaEligible:Boolean(n.productId&&p.has(n.productId)),..._[a]??{},className:h.has(e)?g:void 0},e)})})]})]})}function hR({merchandiseLines:e,modalId:t="merchandise-lines-modal",totalLineQuantities:n,deliveryGroup:r}){const{i18n:a}=oe(),i=e.length,o=i>16?12:16;return d(y,{children:[d(mR,{maxItems:o,merchandiseLines:e,totalLineQuantities:n,deliveryGroup:r}),i>o&&d(Lf,{direction:"inline",gap:"base",justifyContent:"center",padding:"large-100 none none none",children:[d(Cf,{inlineAlignment:"center",commandFor:t,children:a.translate("order_summary.view_all_items",{count:n||i||0})}),d(gI,{id:t,heading:a.translate("order_summary.number_items",{count:n||i||0}),blockSize:"100%",children:d(mR,{hasFilter:!0,merchandiseLines:e,totalLineQuantities:n})})]})]})}function gR({merchandiseLinesByDeliveryType:e}){const{i18n:t}=oe(),r=n(()=>{const t=new Set;return Array.from(e.value.entries()).map(([e,n])=>({group:e,merchandiseLines:n.map(e=>{const n=t.has(e.key);return t.add(e.key),n?{...e,hidePrice:n}:e}),totalLineQuantities:n.reduce((e,t)=>e+t.quantity,0)}))}),a=e=>{switch(e){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")}},i=e=>{switch(e){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 d(Lf,{gap:"large-200",children:d(Y,{each:r,getKey:e=>e.group,children:({group:e,merchandiseLines:t,totalLineQuantities:n})=>d(Lf,{gap:"base",children:[d(CP,{level:2,children:a(e)}),d(hR,{merchandiseLines:t,modalId:i(e),totalLineQuantities:n,deliveryGroup:e})]})})})}function fR({merchandiseLinesByShop:e,totalLineQuantities:t}){const{i18n:n,shop:{id:i,name:o,remoteShopsConfigMap:s},observability:l}=oe(),c=new Map,u=e.get(i)??[],p=u.length>0;p&&c.set(n.translate("order_summary.from_shop_heading",{shop_name:o}),{lines:u,includeTotalLineQuantities:!0});const m=r(()=>Array.from(e.entries()).filter(([,e])=>e.length>0).filter(([e])=>e!==i),[e,i]),h=m.filter(([e])=>!s?.get(e)?.name).map(([e])=>e),g=h.length>0,f=h.join(",");a(()=>{0!==h.length&&l.error(new vR("Missing remote shop names",{metadata:{shopIdsWithMissingNames:h}}))},[f,l]);const[y,...v]=m,_=y&&0===v.length?s?.get(y[0])?.name:void 0,b=!_,k=r(()=>m.flatMap(([e,t])=>t.map(t=>({...t,...b?{remoteShopName:s?.get(e)?.name}:{}}))),[m,b,s]);if(0===k.length)l.error(new yR);else{const e=g||p?n.translate("order_summary.from_other_stores_heading"):n.translate("order_summary.from_multiple_stores_heading"),t=_?n.translate("order_summary.from_shop_heading",{shop_name:_}):e;c.set(t,{lines:k,includeTotalLineQuantities:!1})}return d(Lf,{gap:"large-200",children:Array.from(c.entries()).map(([e,{lines:n,includeTotalLineQuantities:r}])=>d(Lf,{gap:"base",children:[d(CP,{level:2,children:e}),d(hR,{merchandiseLines:n,totalLineQuantities:r?t:void 0})]},e))})}class yR extends ml{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 vR extends ml{constructor(){super(...arguments),this.name="MissingRemoteShopNamesError",this.defaultGroupingHash="missing_remote_shop_names"}}const _R=["PICK_UP","SHIPPING","NOT_REQUIRED"];function bR(e){if(e.length)return e.includes("PICK_UP")?"PICK_UP":e.includes("SHIPPING")||e.includes("LOCAL")?"SHIPPING":e.every(e=>"NONE"===e)?"NOT_REQUIRED":void 0}function kR(e){return bR(e.deliveryMethodTypes)}function PR(e){if("not_required"===e.status)return"NOT_REQUIRED";const t=e.methods.find(({handle:t})=>t===e.selectedDeliveryMethodHandle);return bR(t?[t.methodType]:e.methods.map(({methodType:e})=>e))}function SR(e,t){const n=e.lineAllocations[t];if(n)return{properties:e.properties,quantity:n.quantity,stableId:n.stableId,totalAmountBeforeReductions:n.checkoutPriceBeforeReductions,merchandise:e}}const wR="PP6CV",CR=qc("CollapsibleLineItems"),ER=e=>d(FT,{children:e}),xR=A(function(){const e=I(XT()),t=nL(),{i18n:r,shop:{id:a}}=oe(),i=tc(),{lineItems:{priority:o="base",blockPadding:s,quantityVisibility:l="visible",sectionLayout:c="fixed"},merchandiseThumbnail:{shadow:u}={}}=Km(),p=Boolean(s),m="hidden"!==l,h=e.value.some(e=>e.quantity>1);let g;m&&("visible"===l||h)?g="product-thumbnails-with-badge":"none"===u&&"high"===o?g=void 0:null!=u&&"extraSmall"!==u||(g="product-thumbnails");const f=n(()=>"thankYou"===i.value.currentDetour?.type?{dynamicRender:"Checkout::ThankYou::Dynamic::Render",cartLinesRenderAfter:"Checkout::ThankYou::CartLines::RenderAfter"}:{dynamicRender:"Checkout::Dynamic::Render",cartLinesRenderAfter:"Checkout::CartLines::RenderAfter"}).value,y=$S(f.dynamicRender,"ORDER_SUMMARY1"),v=$S(f.dynamicRender,"ORDER_SUMMARY2"),_=$S(f.cartLinesRenderAfter),b=n(()=>Array.from(t.value.values()).reduce((e,t)=>e+t.reduce((e,t)=>e+t.quantity,0),0)),k=n(()=>Array.from(t.value.entries()).some(([e,t])=>e!==a&&t.length>0)),P=n(()=>e.value.length>0||k.value),S=function(){const e=HI(),t=tc(),r=I(XT()),{checkout:{negotiator:a}}=oe(),{deliveryNext:i,merchandiseLines:o}=a.current.fields,{deliveryLines:s,merchandiseLines:l}=a.parts;return n(()=>{const n=r.value,a=new Map;if(0===n.length)return a;if(!e.value)return a;const c=function(...e){const t=new Map;for(const n of e)for(const e of n??[])for(const n of e.lineComponents){if(t.has(n.stableId))continue;const r=new Map;e.lineAllocations.forEach((e,t)=>{const a=SR(n,t);a&&r.set(e.stableId,a)}),r.size>0&&t.set(n.stableId,{parentStableId:e.stableId,componentsByParentAllocationStableId:r})}return t}(o.value?.lines,l.value),u=new Map;for(const e of n){if(!e.stableId)return a;const t=u.get(e.stableId);t?t.push(e):u.set(e.stableId,[e])}const d=new Map,p=new Set,m=(e,t,n)=>{const r=d.get(e)??new Map;if(!n)return r.set(t.key,t),d.set(e,r),void p.add(t.key);const a=r.get(t.key)?.components??[];r.set(t.key,{...t,components:a.some(({stableId:e})=>e===n.stableId)?a:[...a,n]}),d.set(e,r),p.add(t.key)},h=[],g=new Map,f=(e,t)=>{const n=t.requiresShipping?e:"NOT_REQUIRED";if(!n)return!1;const r=c.get(t.stableId),a=r?.parentStableId??t.stableId;if(!r){const e=g.get(a)??new Set;e.add(n),g.set(a,e)}return h.push({bundleComponent:r,group:n,parentStableId:a}),!0};if(s.value.flatMap(e=>e.value.targetMerchandiseLines??[]).some(e=>{const t=c.get(e.stableId)?.parentStableId??e.stableId;return u.has(t)})&&!Oy(t.value.currentDetour))for(const e of s.value){const t=kR(e.value);for(const n of e.value.targetMerchandiseLines??[])if(!f(t,n))return a}else if("unavailable"!==i.value?.status)for(const e of i.value?.lines??[]){const t=PR(e);for(const n of e.targetMerchandiseLines??[])if(!f(t,n))return a}if(Array.from(g.values()).some(e=>e.size>1))return a;const y=({bundleComponent:e,group:t,parentStableId:n})=>{const r=u.get(n);if(!r)return!0;for(const a of r){if(!e){m(t,a);continue}if(!a.id)return!1;const n=e.componentsByParentAllocationStableId.get(a.id);if(!n)return!1;m(t,a,n)}return!0};for(const e of h)if(!y(e))return a;if(n.some(({key:e})=>!p.has(e)))return a;const v=new Map;for(const e of _R){const t=d.get(e);t?.size&&v.set(e,Array.from(t.values()))}return v})}(),w=n(()=>!k.value&&S.value.size>1),C="collapsible"===c&&!k.value&&e.value.length>1,E=d(OA,{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:d(x,{when:k,fallback:d(x,{when:w,fallback:d(hR,{merchandiseLines:e.value,totalLineQuantities:b.value}),children:d(gR,{merchandiseLinesByDeliveryType:S})}),children:d(fR,{merchandiseLinesByShop:t.value,totalLineQuantities:b.value})})});return d(x,{when:P,children:d(Lf,{gap:"large-200",children:[d(LC,{customizations:y,render:ER}),d(FT,{children:C?d(IR,{merchandiseLines:e.value,showQuantityBadges:m,children:E}):E}),d(LC,{customizations:_,render:ER}),d(LC,{customizations:v,gap:"large-200",render:ER})]})})});function IR({children:e,merchandiseLines:t,showQuantityBadges:n}){const r=m(!0),{i18n:a}=oe(),{size:i}=Km().merchandiseThumbnail??{},o=ZL(i),s=a.translate("order_summary.number_items",{count:t.reduce((e,t)=>e+t.quantity,0)}),l=jc(void 0,CR),{blockSize:c}=wS(o),u=function(e){return e.map(e=>({stableId:e.stableId??e.key,image:e.image,quantity:e.quantity,totalPrice:e.totalPrice}))}(t),p=()=>d(kf,{children:s}),h=e=>d(nh,{gridTemplateColumns:"minmax(0, 1fr) max-content",alignItems:"start",gap:"base",inlineSize:"100%",children:[d(hf,{minInlineSize:"0",overflow:"hidden",children:e}),d(Lf,{direction:"inline",alignItems:"center",gap:"small-300",children:[p(),d(lh,{type:"chevron-down",size:"small-100"})]})]}),g=()=>d(Lf,{direction:"inline",alignItems:"center",justifyContent:"space-between",inlineSize:"100%",children:[p(),d(lh,{type:"chevron-up",size:"small-100"})]});return d(hf,{position:"relative",minBlockSize:`${c}px`,children:[d(Td,{id:`${l}-expanded-content`,open:!r.value,renderChildrenWhenCollapsed:!0,duration:"base",properties:["height","opacity"],children:d(Lf,{gap:"base",children:[d("div",{"aria-hidden":"true",children:g()}),d("div",{id:l,children:e})]})}),d(Td,{id:`${l}-thumbnails`,open:r.value,duration:"base",properties:["height","opacity"],children:d("div",{"aria-hidden":"true",children:h(d(AR,{thumbnailMerchandise:u,thumbnailSize:o,showQuantityBadges:n}))})}),d("div",{className:"tndLB",children:[d("div",{"aria-hidden":"true",className:"anPJT",children:[d(Td,{id:`${l}-expanded-toggle-size`,open:!r.value,duration:"base",properties:["height"],children:g()}),d(Td,{id:`${l}-collapsed-toggle-size`,open:r.value,duration:"base",properties:["height"],children:h(d("div",{className:wR,children:d(vA,{variant:"inline-discrete",merchandise:u.slice(0,1),size:o,max:1,useImageAltTexts:!1,showQuantityBadges:n})}))})]}),d("div",{className:"vv9lW",children:d(Xm,{accessibilityLabel:s,"aria-controls":l,"aria-expanded":!r.value,blockSize:"100%",inlineSize:"100%",onClick:()=>{r.value=!r.value}})})]})]})}function AR({thumbnailMerchandise:e,thumbnailSize:t,showQuantityBadges:n}){const{ref:r,max:a}=HT(t);return d("div",{ref:r,className:wR,children:d(vA,{variant:"inline-discrete",merchandise:e,size:t,max:a.value,useImageAltTexts:!1,showQuantityBadges:n})})}function TR(){const e=i();return a(()=>()=>{const t=e.current;t&&vl.containers.delete(t)},[]),t=>{t&&(e.current&&vl.containers.delete(e.current),vl.containers.add(t),e.current=t)}}const LR=f({spacing:"auto"});function RR({spacing:e,children:t}){const n=r(()=>({spacing:e}),[e]);return d(LR.Provider,{value:n,children:t})}function MR(){return h(LR)}var NR={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"},DR={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 zR(e){return"children"in e&&uS(e.children)}function OR(e){const{spacing:t}=MR(),{moneyLines:{color:n="base"}}=Km(),{itemSize:r="inherit",layout:a="inherit",color:i}=e,o=i??n,s=v(DR.MoneyLine,r&&DR.itemSizeVariant[r],t&&NR.groupSpacingVariant[t],a&&DR.layoutVariant[a]);return d("div",{className:s,role:"row",children:zR(e)?e.children:d(y,{children:[d(BR,{children:d(kf,{color:e.labelColor,children:e.label})}),d(FR,{loading:e.loading,children:e.loading?d(RS,{size:e.size,emphasis:"strong"===e.type?"bold":void 0,children:e.value}):d(kf,{type:e.type,size:e.size,translate:!1,color:o,children:e.value})})]})})}function BR({children:e}){return d("div",{className:DR.Header,role:"rowheader",children:e})}function FR({children:e,loading:t,colSpan:n}){return d("div",{className:n?DR.contentColSpan:DR.Content,role:"cell","aria-busy":t||void 0,"aria-colspan":n,children:e})}const VR=qc("MoneyLine-Heading"),UR=_(function(e,t){const{children:n,title:r,titleHidden:a=!0,spacing:i="auto"}=e,o=jc(void 0,VR),s=Ju(),{moneyLines:{color:l="base"}}=Km(),c=d(CP,{id:o,children:r});return d(y,{children:[a?d("div",{className:NR.visuallyHidden,children:c}):c,d("div",{role:"table","aria-labelledby":o,children:[d("div",{role:"rowgroup",className:NR.visuallyHidden,children:d("div",{role:"row",children:[d("div",{role:"columnheader",children:s("moneyLinesHeaderItem")}),d("div",{role:"columnheader",children:s("moneyLinesHeaderValue")})]})}),d("div",{role:"rowgroup",className:v(NR.MoneyLines,NR.colorVariant[l],NR.spacingVariant[i]),ref:t,children:n})]})]})}),qR=qc("ReductionTooltip");function jR({type:e}){const{i18n:t,shop:{name:n}}=oe(),r=jc(void 0,qR),a="giftCard"===e?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 d(y,{children:[d(lh,{type:"question-circle",size:"small",interestFor:r}),d(dm,{id:r,children:d(kf,{children:a})})]})}function HR({line:e,title:t,amount:n}){const{i18n:r,source:a,shop:i}=oe(),o=Mn(a)&&n,s=YL(i);if(e&&!Cl(e)||e&&"CART"!==e.discount.presentationLevel||e&&0===e.amount?.amount&&s)return null;if(e&&(Il(e)||0===e.allocations.length))return null;let l=e?.title;return e&&"custom"===e.discount.type&&""===e.title&&(l=r.translate("order_summary.custom_discount")),e&&"code"===e.discount.type&&e.discount.codeHidden&&(l=r.translate("order_summary.discount_title")),d(OR,{children:[d(BR,{children:d(nh,{gridAutoFlow:"column",gridTemplateColumns:"minmax(auto, max-content) minmax(0, 1fr)",gridTemplateRows:"minmax(0, 1fr)",gap:"small-400",alignItems:"center",alignContent:"center",children:[d(lh,{type:"discount",size:"small"}),d(aC,{children:d(kf,{color:"subdued",children:e?l?.toUpperCase():t?.toUpperCase()})})]})}),d(FR,{children:d(kf,{translate:!1,children:o?(c=n,r.formatCurrency(-c.amount,{currency:c.currencyCode,form:"short",spacedMinusSign:!0})):e&&$R({line:e,freeShippingLabel:r.translate("order_summary.free_shipping_discount_label"),i18n:r})})})]});var c}function $R({line:e,freeShippingLabel:t,i18n:n}){if(e.allocations.some(e=>"DELIVERYLINE"===e.target.type)||0===e.allocations.length)return t;if(Cl(e)){const t=e.amount?.amount,r=e.amount?.currencyCode;if(t&&r)return n.formatCurrency(-t,{currency:r,form:"short",spacedMinusSign:!0})}}const YR=({disableTooltip:e=!1})=>{const{i18n:t,checkout:r,source:a,shop:i}=oe(),o=r.negotiator.current.fields.discountLines,s=r.proposal.facts.orderDiscounts??[],l=Mn(a)&&s,c=YL(i),u=ho(),p=n(()=>{return e=o.value?.lines,t=c,e?.filter(e=>Cl(e)&&go(e)&&!(t&&0===e.amount?.amount))??[];var e,t}),m=n(()=>!e&&u.value),h=n(()=>p.value.length>0),g=n(()=>t.translate("order_summary.discount_order_stacking",{count:p.value.length}));return d(y,{children:[d(x,{when:h,children:()=>d(OR,{children:d(BR,{children:d(nh,{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:[d(kf,{children:g}),d(x,{when:m,children:d(jR,{type:"discount"})})]})})})}),d(RR,{spacing:"small-500",children:[d(Y,{each:p,getKey:e=>e.title,children:e=>d(HR,{line:e})}),l&&s.map(e=>d(HR,{title:e.label,amount:e.amount},e.label))]})]})};function WR({line:e,disableTooltip:t=!1}){const{i18n:n}=oe(),{value:r}=ho(),a=!t&&r,i=fo(e.method).toUpperCase();return d(OR,{itemSize:"auto",children:[d(BR,{children:d(Lf,{direction:"inline",gap:"small-400 small-300",children:[d(kf,{children:n.translate("order_summary.gift_card_label")}),d(Lf,{direction:"inline",alignItems:"center",gap:"small-400",children:[d(lh,{type:"gift-card"}),d(kf,{color:"subdued",accessibilityVisibility:"hidden",children:n.translate("order_summary.gift_card_masked",{last_characters:i})}),d(kf,{accessibilityVisibility:"exclusive",children:n.translate("order_summary.gift_card_ending",{last_characters:i})}),a&&d(jR,{type:"giftCard"})]})]})}),d(FR,{children:d(kf,{children:e.cost?n.formatCurrency(-e.cost.amount,{currency:e.cost.currencyCode,form:"short",spacedMinusSign:!0}):""})})]})}function GR({disableTooltip:e=!1}){const t=dA(),r=ho(),{shop:a,i18n:i}=oe(),o=a.hasFlagEnabled(yo),s=n(()=>!e&&r.value),l=n(()=>r.value?"minmax(auto, max-content) minmax(auto, max-content)":"minmax(0, 1fr)"),c=n(()=>({total:t.value.reduce((e,t)=>e+(t.cost?.amount||0),0),currencyCode:t.value[0]?.cost?.currencyCode}));if(0===t.value.length)return null;if(o){const{total:e,currencyCode:t}=c.value;return d(OR,{children:[d(BR,{children:d(nh,{gridAutoFlow:"column",gridTemplateColumns:l.value,gridTemplateRows:"minmax(0, 1fr)",gap:"small-400",alignItems:"center",alignContent:"center",children:[d(kf,{children:i.translate("order_summary.gift_card_label")}),d(x,{when:s,children:d(jR,{type:"giftCard"})})]})}),d(FR,{children:d(kf,{children:i.formatCurrency(-e,{currency:t,form:"short",spacedMinusSign:!0})})})]})}return d(Y,{each:t,getKey:e=>vo(e.method),children:t=>d(WR,{line:t,disableTooltip:e})})}function KR({line:e}){const{i18n:t}=oe();if(!e.cost)return null;const{amount:n,currencyCode:r}=e.cost,a=t.formatCurrency(-n,{currency:r,form:"short",spacedMinusSign:!0}),i=oA(e.method.redemptionContent);return d(OR,{children:[d(BR,{children:d(Lf,{direction:"inline",gap:"base",children:[d(kf,{children:t.translate("order_summary.gift_card_label")}),d(Lf,{direction:"inline",alignItems:"center",gap:"small-400",children:[d(lh,{type:"gift-card"}),d(kf,{accessibilityVisibility:"hidden",children:sA(i)}),d(kf,{accessibilityVisibility:"exclusive",children:t.translate("order_summary.gift_card_ending",{last_characters:i||""})})]})]})}),d(FR,{children:d(kf,{type:"strong",children:a})})]})}function JR({line:e}){const{checkout:t,i18n:r}=oe(),a=t.proposal.negotiated.fields.shopPromotion,i=n(()=>"filled"===a.value?.status?new Map(a.value.promotions.map(({promotionId:e,type:t})=>[e,t])):void 0);return e.method.redemptionContent?.details?.map(e=>{const{amount:t,currencyCode:n}=e.destinationAmount,a=r.formatCurrency(-parseFloat(t),{currency:n,form:"short",spacedMinusSign:!0}),o={SHOP_DISCOUNT_OFFER:r.translate("order_summary.exclusive_deal"),SHOP_CASH_BALANCE:r.translate("order_summary.shop_cash_title"),SHOP_PROMOTION:r.translate("order_summary.shop_promotion")},s=e.promotionType??(null==e.redemptionId?void 0:i.value?.get(e.redemptionId)),l="SHOP_PROMOTION"===e.redemptionType&&"DOORBUSTER"===s?r.translate("order_summary.flash_deal"):o[e.redemptionType];return l?d(OR,{type:"strong",label:l,value:a},e.redemptionId):null})}function QR({line:e}){const{i18n:t}=oe();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 d(OR,{type:"strong",label:n,value:r})}function XR({line:e}){switch(e.method.redemptionSource){case"SHOP_CASH":return d(JR,{line:e});case"STORE_CREDIT":return d(QR,{line:e});case"CUSTOM":{const t=e;return d(KR,{line:t},t.method.redemptionContent?.redemptionAttributes[0]?.value)}default:return null}}function ZR(){const e=zi("STORE_CREDIT","SHOP_CASH"),{paymentLines:t}=uA(),n=[...e.value,...t];return 0===n.length?null:d(y,{children:n.map(e=>d(XR,{line:e},function(e){if("CUSTOM"===e.method.redemptionSource){const t=e,n=t.method.redemptionContent?.redemptionAttributes[0]?.value||"";return e.method.redemptionSource+n}return e.method.redemptionSource}(e)))})}function eM(){const{i18n:e,checkout:t,source:r}=oe(),a=t.negotiator.current.fields.tipLines,i=t.negotiator.parts.tipLines,o=t.proposal.facts.tip,s=Mn(r),l=at(),c=sn("tipLines"),u=n(()=>!s&&l.value&&c.value),p=n(()=>{if(s)return tM(o);const e=tM(a.value?.[0]?.amount);return u.value?tM(i.value[0]?.amount)??e:e});return d(x,{when:p,children:t=>d(OR,{label:e.translate("order_summary.tip_label"),value:e.formatCurrency(t.amount,{currency:t.currencyCode,form:"short"}),loading:u.value})})}function tM(e){return e&&e.amount>0?e:void 0}function nM(e){return"children"in e&&uS(e.children)}function rM(e){const{spacing:t}=MR(),n=v("_1x41w3p1 _1x41w3p0 _1fragem6t _1fragem19",t&&NR.groupSpacingVariant[t]);return d(y,{children:d("div",{className:n,role:"row",children:nM(e)?e.children:d(y,{children:[d(aM,{children:d(kf,{type:"strong",size:"large",children:e.label})}),d(iM,{children:d(Lf,{direction:"inline",gap:"small-300",alignItems:"baseline",children:[d(gA,{children:d(kf,{size:"small",color:"subdued",children:e.prefix})}),d(kf,{type:"strong",size:"large",children:e.value})]})})]})})})}function aM({children:e}){return d("div",{className:"_1x41w3p2",role:"rowheader",children:e})}function iM({children:e,accessibilityColumnIndex:t}){return d("div",{className:"_1x41w3p3",role:"cell","aria-colindex":t,children:e})}function oM({variant:e}){const t=function(){const e=_o(),{shop:t,embed:r}=oe(),a=t.hasFlagEnabled(bo);return n(()=>{const t=Boolean(r?.embedder)&&!ar(r?.embedder);return!Boolean(a||!e.value||0===e.value.amount||t)})}(),r=_o();return t.value&&r.value?d(sM,{variant:e,totalSavings:r.value}):null}function sM({variant:e,totalSavings:t}){const{i18n:r,embed:a,checkout:{negotiator:i}}=oe(),{deferredTotal:o}=i.current.fields,s=ar(a?.embedder)?r.translate("universal.iframes.savings_label").toUpperCase():r.translate("order_summary.total_savings").toUpperCase(),l=r.formatCurrency(t.amount,{currency:t.currencyCode,form:"short"}),c=d(kf,{type:"strong",translate:!1,children:l}),u=n(()=>o.value&&o.value.amount.amount>0?"small-200":"small-400");return"card"===e?d(hf,{children:d(Lf,{direction:"inline",alignItems:"center",gap:"small-400",children:[d(Lf,{direction:"inline",alignItems:"center",gap:"small-500",children:[d(lh,{type:"savings",size:"small",color:"base"}),d(kf,{color:"subdued",children:r.translate("order_summary.total_savings")})]}),d(kf,{color:"subdued",translate:!1,children:l})]})}):d(RR,{spacing:u.value,children:d(rM,{children:[d(aM,{children:d(Lf,{direction:"inline",alignItems:"center",gap:"small-300",children:[d(lh,{type:"savings",size:"base",color:"strong"}),d(kf,{type:"strong",children:s}),c]})}),d(iM,{})]})})}function lM(){const{embed:e,shop:t}=oe(),r=t.hasFlagEnabled(bo),a=_o(),i=qy();return n(()=>{const t=i.configurationSignal.value.orderSummary?.collapsedSavingsDisplay,n=a.value;return{showTotalSavings:"base"!==t&&!r&&!ar(e?.embedder)&&n&&Boolean(0!==n.amount)}})}function cM(){const{checkout:{negotiator:e}}=oe(),t=e.current.fields.paymentFlexibilityPaymentTermsTemplate,r=Oi(),a=tA(),i=ot();return n(()=>{if(r.value||a.value)return!1;const e=Boolean(t.value),n=i.value;return e||n})}function uM({condition:e,children:t,skeletonContent:n,...r}){return d(y,{children:[d(RS,{...r,delay:!1,display:e?r.display??"auto":"none",children:n??t},"skeletonTextKey"),d(kf,{...r,display:e?"none":r.display??"auto",children:t},"textKey")]})}function dM(){const{i18n:e,checkout:{negotiator:t}}=oe(),{alternativePaymentCurrency:r}=t.current.fields,a=sn("alternativePaymentCurrency"),{hasNegotiatedAlternativePaymentCurrencySignal:i}=t.context,o=n(()=>{const t=r.value,n=a.value;if(t||n&&i.value)return{loading:n,text:t&&e.translate("order_summary.alternative_payment_currency_total",{amount_due:e.formatCurrency(t.totalWithoutGiftCards.amount,{currency:t.totalWithoutGiftCards.currencyCode,form:"explicit"})})}});return d(x,{when:o,children:({loading:e,text:t})=>d(OR,{children:d(FR,{children:d(uM,{condition:e,size:"small",color:"subdued",children:e?"$0.00":t})})})})}const pM={marginTop:"0"},mM=qc("PriceBreakdownCollapsibleTooltip");function hM({id:e,title:t,subdueTitle:n,tooltipText:r,children:a,item:i,hideHeaderItemWhenOpen:o=!1,defaultOpen:s=!1}){const{i18n:l}=oe(),c=m(s),u=jc(void 0,mM);return d(y,{children:[d(OR,{children:[d(BR,{children:d(Lf,{direction:"inline",gap:"small-200",alignItems:"center",children:[d(Xm,{"aria-expanded":c.value,"aria-controls":`recurring-totals-collapsible-${e}`,onClick:()=>{c.value=!c.value},children:d(nh,{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:[d(Mx,{color:n?"subdued":void 0,textAlign:"start",children:t}),d(lh,{type:c.value?"chevron-up":"chevron-down",size:"small-200"})]})}),r?d(y,{children:[d(lh,{type:"question-circle",size:"small",interestFor:u,accessibilityLabel:l.translate("tooltip.accessibility_label_context",{context:t})}),d(dm,{id:u,children:r})]}):null]})}),!i||o&&c.value?null:i]}),d("div",{style:pM,children:d(Td,{open:c.value,id:`recurring-totals-collapsible-${e}`,children:a})})]})}function gM({children:e}){return"function"==typeof e?e():e}function fM({children:e}){let t,n;return W.forEach(e,e=>{var r;G(e)&&(t||void 0===e.props.condition?n||e.type!==gM||(n=e):("function"==typeof(r=e.props.condition)?r():r)&&(t=e))}),t??n??null}fM.When=function({children:e}){return"function"==typeof e?e():e},fM.Fallback=gM;const yM=qc("TaxesTooltip");function vM({label:e,subdueText:t}){const{i18n:n,source:r}=oe(),a=jc(void 0,yM);return d(y,{children:[d(kf,{color:t?"subdued":void 0,children:e}),d(lh,{type:"question-circle",size:"small",interestFor:a,accessibilityLabel:n.translate("tooltip.accessibility_label_context",{context:e})}),d(dm,{id:a,children:"paymentCollection"===r.type?n.translate("order_summary.estimated_taxes_finalization_tooltip_content_short"):n.translate("order_summary.estimated_taxes_finalization_tooltip_content")})]})}function _M({totalTax:e,showMoneyLineTaxesTooltip:t,loading:n=!1,taxesLabel:r,hasLandedCostDetails:a=!1,subdueText:i}){const{i18n:o}=oe(),s=i?"subdued":void 0;return d(OR,{color:s,children:[d(BR,{children:d(fM,{children:[d(fM.When,{condition:Boolean(r),children:d(kf,{color:s,children:r})}),d(fM.When,{condition:Boolean(a),children:d(kf,{color:s,children:o.translate("order_summary.taxes_label")})}),d(fM.Fallback,{children:d(Lf,{direction:"inline",alignItems:"center",gap:"small-300",children:d(vM,{label:o.translate("order_summary.estimated_taxes_label"),subdueText:i})})})]})}),d(FR,{children:d(Lf,{direction:"inline",gap:"small-200",children:[t?d(Lf,{direction:"inline",alignItems:"center",gap:"small-300",children:[d(vM,{subdueText:i,label:o.translate("order_summary.estimated_taxes_label_short")}),d(kf,{color:s,children:"•"})]}):null,d(uM,{condition:n,color:s,children:n?"$0.00":o.formatCurrency(e.amount,{currency:e.currencyCode,form:"short"})})]})})]})}function bM(){const{checkout:e}=oe(),t=e.negotiator.current.fields.taxes,r=ko();return n(()=>{const n=e.proposal.facts.tax,a=t.value,i=n||("available_total_included"===a?.status?a.totalIncludedInTarget:null);return{localTotalTaxIncluded:i,totalTaxIncluded:r.value??i}})}function kM(){const{i18n:e}=oe(),t=bM();return n(()=>{const{totalTaxIncluded:n}=t.value;return null===n?null:e.translate("order_summary.vat_label_html",{amount:e.formatCurrency(n.amount,{currency:n.currencyCode,form:"short"})})})}function PM({label:e}){return d(RR,{spacing:"small-500",children:d(OR,{children:[d(BR,{children:d(Mx,{color:"subdued",children:d(qA,{children:e})})}),d(FR,{})]})})}function SM({taxesIncluded:e,variant:t,shopId:r}){const{i18n:a}=oe(),i=ho(),{localTotalTaxIncluded:o,totalTaxIncluded:s}=bM().value,l=kM(),c=Po(o),u=n(()=>[...c.value.entries()]),p=n(()=>i.value&&u.value.length>1);if(r){const e=c.value.get(r);if(!e||0===e.totalTax.amount||"available_total"===e.status)return null;const t=a.translate("order_summary.vat_label_html",{amount:a.formatCurrency(e.totalTax.amount,{currency:e.totalTax.currencyCode,form:"short"})});return d(PM,{label:t})}return e&&null!==s&&null!==l.value&&0!==s.amount?"card"===t?d(hf,{children:d(Mx,{color:"subdued",children:d(qA,{children:l})})}):d(x,{when:p,fallback:d(PM,{label:l.value}),children:d(hM,{id:"included-tax-money-line",title:l.value,children:d(RR,{spacing:"small-400",children:d(Y,{each:u,getKey:([e])=>e,children:([,e])=>d(_M,{totalTax:e.totalTax,taxesLabel:e.shopName,showMoneyLineTaxesTooltip:"available_total"===e.status,subdueText:!0})})})})}):null}function wM({title:e,value:n,color:r,labelColor:a}){const i=function(){const{i18n:e}=oe();return t(t=>e.formatCurrency(t.amount,{currency:t.currencyCode,form:"short"}),[e])}();return d(OR,{label:e,value:i(n),color:r,labelColor:a})}function CM({variant:e,shopId:t}){const{checkout:r}=oe(),a=r.negotiator.current.fields.deferredTotal,i=ot(),o=So(),s=n(()=>o.value||Boolean(r.proposal.facts.taxesIncluded)),l=r.negotiator.current.fields.paymentFlexibilityPaymentTermsTemplate,c=n(()=>{const e=a.value?.amount;return e&&e.amount>0?e:void 0}),u=n(()=>Boolean(c.value)),p=Oi(),m=pA(),h=n(()=>Boolean(p.value&&!m.value)),g=n(()=>{const e=l.value?.dueDate,t=a.value?.dueAt||(e?new Date(e):null);return t?t.getTime():null}),f=n(()=>"FULFILLMENT"===l.value?.type),v=function(e,t){const{i18n:n}=oe(),r=eA();if(e){const t=r(e,{month:"short"});return n.translate("order_summary.deferred_total_due_date_label_next",{date:t})}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")}(null===g.value?null:new Date(g.value),f.value);return!u.value||i.value?null:d(y,{children:[d(x,{when:c,children:t=>"card"===e?d(hf,{background:"subdued",padding:"small-300",borderRadius:"small",children:d(wM,{title:v,value:t,color:"subdued",labelColor:"subdued"})}):d(RR,{spacing:"small-300",children:d(wM,{title:v,value:t})})}),"card"!==e&&d(x,{when:h,children:()=>d(SM,{taxesIncluded:s.value,shopId:t})})]})}class EM extends Error{constructor(){super(...arguments),this.name="DeliveryError"}}function xM(e){return e.reduce((e,{total:t})=>e+(t?.amount||0),0)}function IM({checkout:e}){return e.proposal.facts.requiresShipping??!0}function AM({size:e,strong:t=!0}){const{i18n:n}=oe(),r=t?"strong":void 0;return d(y,{children:[d(kf,{size:e,type:r,accessibilityVisibility:"hidden",children:n.translate("shipping.included_rate_label")}),d(kf,{type:r,accessibilityVisibility:"exclusive",children:n.translate("shipping.included_rate_accessibility_label")})]})}function TM({moneyLines:e,deliveryLoading:t,appearance:n,emphasis:r,included:a,shouldConsolidateRateGroupMax:i,getRateGroupMaxKey:o,getLinePrice:s,getPriceLetterCase:l}){const{i18n:c,shop:u}=oe(),p=u.hasFlagEnabled(Co),m=e.length>0,h=e[0]?.currencyCode,g=e[0]?.type,{priceBeforeDiscounts:f,priceAfterDiscounts:y}=i??u.marketDrivenShippingEnabled?Al(e,o):Tl(e),v=m&&f&&f>y&&!p,_=s(y,g),b=d(uM,{condition:t,color:n,type:"bold"===r?"strong":void 0,translate:!1,letterCase:l(y,g),children:_});return t?b:a?d(AM,{strong:!1}):v?d(Lf,{direction:"inline",gap:"small-300",justifyContent:"center",alignItems:"center",children:[d(kf,{accessibilityVisibility:"exclusive",children:c.translate("order_summary.original_price")}),d(kf,{size:"base",color:"subdued",type:"redundant",translate:!1,children:c.formatCurrency(f,{currency:h})}),d(kf,{accessibilityVisibility:"exclusive",children:c.translate("order_summary.price_after_discount_aria_text")}),b]}):b}const LM=qc("ShippingTooltip");function RM({defaultPolicy:e}){const{i18n:t,embed:n,shop:{merchantPolicies:r}}=oe(),a=jc(void 0,LM),i="shipping-policy",o=t.translate("shop_policies.shipping_policy"),{localPolicies:s}=qi(),l=r.some(e=>e.handle===i),c=e??(l?s.find(e=>e.handle===i):void 0);if(!c)return null;const u=t.translate("tooltip.accessibility_label_context",{context:o});return ar(n?.embedder)?c.url?d(Xm,{accessibilityLabel:u,"aria-haspopup":"dialog",onClick:()=>n?.client?.windowOpenRequest(c.url),children:d(lh,{type:"question-circle",size:"small"})}):null:d(y,{children:[d(Xm,{accessibilityLabel:u,commandFor:a,children:d(lh,{type:"question-circle",size:"small"})}),d(XA,{id:a,defaultPolicy:c})]})}const MM=({getLinePrice:e,getPriceLetterCase:t,label:a,moneyLines:i,finalMoneyLines:o,forceSubduedStyle:s,discountLines:l,shippingTooltip:c,included:u,shouldConsolidateRateGroupMax:p,getRateGroupMaxKey:m})=>{const h=tc(),g=n(()=>"information"===h.value.currentPage?.id),{shop:f,checkout:v,i18n:_}=oe(),b=!f.hasFlagEnabled(Co),{value:k}=v.negotiator.current.fields.deliveryNext,P=at(),S=sn("deliveryNext").value,w=LI("deliveryNext").value||!!P.value&&S,C=v.proposal.facts.delivery??[],E=function(e){const{checkout:t}=oe(),n=t.proposal.facts.delivery??[],r=new Set(e);return n.flatMap(({deliveryGroups:e,lines:t})=>r.size>0&&e?.length?e.filter(({methodType:e})=>r.has(e)).flatMap(({deliveryLines:e})=>e):t).flatMap(({appliedDiscounts:e})=>e).filter(e=>e.amountDiscounted?.amount&&e.amountDiscounted?.amount>0)}([...new Set(o.flatMap(({methodType:e})=>void 0===e?[]:[e]))]),x=v.configuration.layout.isOnePage.value,I=r(()=>!i.length&&!C.length||w,[]),A=Boolean("unavailable"===k?.status)||w||s,T=l?.filter(e=>Il(e))??[],L=E.length?[...new Set(E.map(e=>e.label))]:[...new Set(T.map(e=>Cl(e)&&"code"===e.discount.type&&e.discount.codeHidden?_.translate("order_summary.discount_title"):e.title))],R=b?L.map(e=>d(nh,{gridAutoFlow:"column",gridTemplateColumns:"minmax(auto, max-content) minmax(0, 1fr)",gridTemplateRows:"minmax(0, 1fr)",gap:"small-400",alignItems:"center",alignContent:"center",children:[d(lh,{type:"discount",size:"small"}),d(aC,{children:d(kf,{color:"subdued",children:e.toUpperCase()})})]},e)):[],M=A||s,N=(g.value||x)&&c,D=s?"subdued":void 0;return d(y,{children:[d(OR,{itemSize:I?"auto":void 0,color:D,children:[d(BR,{children:d(Lf,{direction:"inline",gap:"small-400",alignItems:"center",children:[d(kf,{color:D,children:a}),N]})}),d(FR,{loading:w,children:d(TM,{getLinePrice:e,getPriceLetterCase:t,appearance:M?"subdued":void 0,moneyLines:o,deliveryLoading:w,included:u,shouldConsolidateRateGroupMax:p,getRateGroupMaxKey:m})})]}),R.length>0&&d(RR,{spacing:"small-400",children:d(OR,{children:d(BR,{children:R})})})]})},NM=({shopId:e,forceSubduedStyle:t})=>{const{checkout:r,i18n:a,shop:{id:o,marketDrivenShippingEnabled:s,remoteShopsConfigMap:l},source:c}=oe(),u=r.negotiator.current.fields.deliveryNext.value,p=at(),m=sn("deliveryNext"),h=LI("deliveryNext"),g=h.value||!!p.value&&m.value,f=r.configuration.layout.isOnePage.value,v=r.proposal.facts.delivery,_=Ve(),b=Cr(_.value.enabledDeliveryMethods),k=TI(),P=k?.selected.value??[],S=P.length>0,w=Eo(P).length>0,C=P.includes("PICK_UP"),E=Boolean(e),{visibility:x}=r.configuration,I=r.negotiator.current.fields.discountLines.value,A=x_(),T=function(){const{checkout:e}=oe(),t=e.proposal.facts.delivery??[],n=function(){const{checkout:e}=oe(),t=e.proposal.facts.delivery??[];return xM(t)-t.flatMap(e=>e.lines.flatMap(e=>e.appliedDiscounts)).reduce((e,{amountDiscounted:t})=>(t?.amount||0)+e,0)}(),r=xM(t),a=t.flatMap(({deliveryGroups:e})=>e??[]);return a.length>0?a.map(({groupType:e,methodType:t,total:n,deliveryLines:r})=>{const a=r.flatMap(({appliedDiscounts:e})=>e).reduce((e,{amountDiscounted:t})=>e+(t?.amount??0),0);return{type:e,methodType:t,cost:n.amount-a,costBeforeDiscounts:n.amount,currencyCode:n.currencyCode}}):null==t[0]?.total?null:[{type:"ONE_TIME_PURCHASE",cost:n,costBeforeDiscounts:r,currencyCode:t[0]?.total?.currencyCode}]}(),L=xo(e),{allMoneyLines:R,moneyLinesForShop:M}=L.value,N=ho(),D=tc(),z="review"!==D.value.currentPage?.id&&(!g||N.value),O=a.translate("order_summary.pickup_label"),B=a.translate("order_summary.shipping_label"),F=i(b?O:B),V=n(()=>{const e=Cr(_.value.enabledDeliveryMethods)?O:B;if(!(h.value||p.value&&m.value)){const t=L.value.moneyLinesForShop,n=Mn(c)?v?.[0]?.pickupAddress:t.length>0&&t.every(e=>"PICK_UP"===e.methodType);F.current=n?O:e}return F.current}).value,U=Boolean(u&&"filled"===u.status&&u.lines.some(({status:e})=>"not_required"!==e)),q=!g&&!U&&!r.isShippingRequired.value,j=T||M,H=j.filter(function(e){return void 0!==e.methodType}),$=H.filter(e=>"PICK_UP"!==e.methodType),Y=H.filter(e=>"PICK_UP"===e.methodType),W=0===j.length||H.length>0,G=!E&&!Mn(c)&&S&&W,K=G&&C&&!w,J=G&&w,Q=K?O:B,X=n(()=>Boolean(Mn(c)&&IM({checkout:r})&&C_({checkout:r,source:c})?.lines.length));if(A.value)return null;if(!(x.showShippingLines.value&&!Mn(c)||X.value))return null;if(q)return null;if(E&&0===j.length)return null;if(E){const n=j.some(e=>le(e));return d(MM,{getLinePrice:de,getPriceLetterCase:ue,label:V,forceSubduedStyle:t,moneyLines:M,finalMoneyLines:j,discountLines:e===o?I?.lines:void 0,shippingTooltip:void 0,shouldConsolidateRateGroupMax:n,getRateGroupMaxKey:ce})}if(N.value&&j.length>1){const e=j.some(e=>le(e)),t=function(e){const t=new Map;for(const n of e){const e=n.shopId??o,r=t.get(e);r?r.lines.push(n):t.set(e,{shopName:n.shopName??V,lines:[n]})}return[...t.values()]}(j);return d(hM,{id:"shipping-money-line",title:V,hideHeaderItemWhenOpen:!0,item:d(FR,{loading:g,children:d(TM,{getLinePrice:de,getPriceLetterCase:ue,moneyLines:j,deliveryLoading:g,shouldConsolidateRateGroupMax:e,getRateGroupMaxKey:ce})}),children:d(RR,{spacing:"small-400",children:t.map(({shopName:t,lines:n})=>{const r=n.find(e=>e.shippingPolicy)?.shippingPolicy,a=n.some(e=>(e.shopId??o)===o&&e.hasLocalDiscountApplied);return d(MM,{getLinePrice:de,getPriceLetterCase:ue,label:t,forceSubduedStyle:!0,moneyLines:R,finalMoneyLines:n,discountLines:a?I?.lines:void 0,shouldConsolidateRateGroupMax:e,getRateGroupMaxKey:ce,shippingTooltip:z&&r?d(RM,{defaultPolicy:r}):void 0},n[0]?.shopId??t)})})})}if($.length>0&&Y.length>0)return ie({});if(G&&w&&C)return ie({shippingGetLinePrice:$.length>0?de:pe,shippingGetPriceLetterCase:$.length>0?ue:me,pickupGetLinePrice:he,pickupGetPriceLetterCase:ge});let Z=R,ee=j,te=de,ne=ue,re=V,ae=z?d(RM,{defaultPolicy:null}):void 0;return K?(Z=Y,ee=Y,te=he,ne=ge,re=Q,ae=void 0):J&&(Z=$,ee=$,re=Q,0===$.length&&(te=pe,ne=me)),d(MM,{getLinePrice:te,getPriceLetterCase:ne,label:re,forceSubduedStyle:t,moneyLines:Z,finalMoneyLines:ee,discountLines:I?.lines,shippingTooltip:ae});function ie({shippingGetLinePrice:e=de,shippingGetPriceLetterCase:n=ue,pickupGetLinePrice:r=de,pickupGetPriceLetterCase:a=ue}){const{shippingDiscountLines:i,pickupDiscountLines:o}=Ll(u,I?.lines);return d(y,{children:[d(MM,{getLinePrice:e,getPriceLetterCase:n,label:B,forceSubduedStyle:t,moneyLines:$,finalMoneyLines:$,discountLines:i,shippingTooltip:z?d(RM,{defaultPolicy:null}):void 0}),d(MM,{getLinePrice:r,getPriceLetterCase:a,label:O,forceSubduedStyle:t,moneyLines:Y,finalMoneyLines:Y,discountLines:o,shippingTooltip:void 0})]})}function se(e){return e.every(e=>"SUBSCRIPTION"===e.type)}function le(e){const t=e.shopId??o;if(t===o)return s;const n=l?.get(t);return n?n.marketDrivenShippingEnabled:Boolean(e.amountCombinabilityToken)}function ce(e){const t=e.amountCombinabilityToken??void 0;if(t&&le(e))return`${e.shopId??o}:${t}`}function ue(e,t){return b?"uppercase":g||void 0===e||!R.length&&!v?.length||0!==e?"none":"SUBSCRIPTION"!==t||se(R)?"uppercase":"none"}function de(e,t){if(g)return"$0.00";if(void 0!==e&&(R.length||v?.length)){const n="SUBSCRIPTION"!==t||se(R)?a.translate("order_summary.free_shipping_total_label"):a.translate("shipping.subscription_delivery_description.shipping_price_included");if(0===e)return n;const r=Mn(c)?v?.[0]?.total?.currencyCode:function(e){const[t]=e;if(!t)throw new EM("Formatting a shipping price requires a shipping money line");return t.currencyCode}(R);return a.formatCurrency(e,{currency:r,form:"short"})}return b?a.translate("order_summary.free_shipping_total_label"):f?a.translate("order_summary.enter_shipping_address"):a.translate("order_summary.shipping_default_value")}function pe(){return de(void 0)}function me(){return ue(void 0)}function he(e,t){return Y.length||v?.length?de(e,t):g?"$0.00":a.translate("order_summary.free_shipping_total_label")}function ge(e,t){return Y.length||v?.length||g?ue(e,t):"uppercase"}};function DM(e,t){return e||("available_total"===t?.status?t.totalDuty:null)}const zM=qc("DutyMoneyLineTooltip");function OM({shopId:e}){const{i18n:t,checkout:r,shop:a}=oe(),i=r.negotiator.current.fields.landedCostDetails,o=sn("landedCostDetails"),s=sn("duties"),l=r.proposal.facts.duty,c=r.negotiator.current.fields.duties,u=jc(void 0,zM),p=n(()=>DM(l,c.value)),m=n(()=>i.value?.incoterm===Rl.Ddu&&i.value.reason===Ml.ErrorOccured),h=n(()=>(s.value||o.value)&&!l&&!m.value),g=n(()=>Boolean(p.value||m.value)),f=n(()=>m.value?t.translate("order_summary.may_be_charged_on_delivery"):p.value&&t.formatCurrency(p.value.amount,{currency:p.value.currencyCode,form:"short"}));return e&&e!==a.id?null:d(x,{when:g,children:()=>{const e=m.value?"subdued":void 0;return d(OR,{color:e,children:[d(BR,{children:d(Lf,{direction:"inline",alignItems:"center",gap:"small-400",children:[d(kf,{children:t.translate("order_summary.duties_label")}),m.value&&!h.value&&d(y,{children:[d(lh,{type:"question-circle",interestFor:u,accessibilityLabel:t.translate("tooltip.accessibility_label_context",{context:t.translate("order_summary.duties_label")})}),d(dm,{id:u,children:t.translate("order_summary.error_duties_tooltip")})]})]})}),d(FR,{children:d(Lf,{direction:"inline",gap:"small-200",children:d(uM,{condition:h.value,children:h.value?"$0.00":f.value})})})]})}})}function BM({data:e,loading:t,totalTax:n}){const{i18n:r,shop:a}=oe(),i=FM(),o=a.hasFlagEnabled(Io)&&e.length>2,s=e.map(({description:e,amount:n},r)=>d(_M,{loading:t,totalTax:n,taxesLabel:i({description:e}),subdueText:o},`${e}-${r}`));return o?d(hM,{id:"tax-breakdown-money-line",title:r.translate("order_summary.taxes_label"),defaultOpen:!0,hideHeaderItemWhenOpen:!0,item:n?d(FR,{loading:t,children:d(uM,{condition:t,children:r.formatCurrency(n.amount,{currency:n.currencyCode,form:"short"})})}):void 0,children:d(RR,{spacing:"small-400",children:s})}):d(RR,{spacing:"small-400",children:s})}const FM=()=>{const{i18n:e}=oe();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 VM({shopId:e}){const{i18n:t,checkout:r,shop:a}=oe(),{hasNegotiatedOnce:i}=r.negotiator,o=sn("taxes"),s=LI("taxes"),l=sn("landedCostDetails"),c=sn("remoteTaxDetails"),u=ho(),p=Nb(),m=function(){const{checkout:e}=oe(),t=sn("taxes"),{taxes:r}=e.negotiator.current.fields;return n(()=>{const n=e.proposal.facts.taxBreakdown;if(n?.length)return{data:n.map(({title:e,amount:t})=>({description:e,amount:t})),loading:!1};if(!r.value||"available_total"!==r.value.status)return null;const{taxBreakdown:a}=r.value;return a?.length?{data:a,loading:t.value}:null})}(),h=n(()=>{if(r.proposal.facts.tax)return r.proposal.facts.tax;const e=r.negotiator.current.fields.taxes.value;return"available_total"===e?.status?e.totalTax:null}),g=n(()=>Boolean(r.negotiator.current.fields.landedCostDetails.value)),f=n(()=>{const e=r.negotiator.current.fields.taxes.value;return void 0!==e&&"pending"!==e.status}),y=n(()=>!r.proposal.facts.tax&&(!!s.value||!f.value&&(o.value||!i.value))),v=n(()=>(y.value||o.value||l.value||c.value)&&!r.proposal.facts.tax),_=n(()=>{const e=h.value;return e&&e.amount>0?e:y.value?{amount:0,currencyCode:a.currencyCode}:void 0}),b=Po(h.value),k=n(()=>[...b.value.entries()]),P=ko(),S=n(()=>P.value??h.value),w=n(()=>u.value&&k.value.length>1);if(e){const t=b.value.get(e);return t&&0!==t.totalTax.amount&&"available_total_included"!==t.status?d(_M,{loading:v.value,totalTax:t.totalTax,hasLandedCostDetails:e===a.id&&g.value}):null}if(p?.applied&&S.value)return d(_M,{totalTax:S.value});if(!(S.value&&0!==S.value.amount||y.value))return null;if(w.value&&S.value){const e=g.value?t.translate("order_summary.taxes_label"):t.translate("order_summary.estimated_taxes_label"),n=g.value?void 0:t.translate("order_summary.estimated_taxes_finalization_tooltip_content");return d(hM,{id:"tax-money-line",title:e,tooltipText:n,item:d(FR,{loading:v.value,children:d(uM,{condition:v.value,children:v.value?"$0.00":t.formatCurrency(S.value.amount,{currency:S.value.currencyCode,form:"short"})})}),children:d(RR,{spacing:"small-400",children:d(Y,{each:k,getKey:([e])=>e,children:([,e])=>d(_M,{loading:v.value,totalTax:e.totalTax,taxesLabel:e.shopName,subdueText:!0})})})})}return d(x,{when:m,fallback:d(x,{when:_,children:e=>d(_M,{loading:v.value,totalTax:e,taxesLabel:y.value?t.translate("order_summary.taxes_label"):void 0,hasLandedCostDetails:g.value})}),children:e=>d(BM,{data:e.data,loading:e.loading||v.value,totalTax:h.value})})}const UM=qc("CombinedDutiesAndTaxesTooltip"),qM=({loading:e,shopId:t})=>{const{i18n:n,shop:r}=oe(),a=jc(void 0,UM);if(t&&t!==r.id)return null;const i=e.value;return d(OR,{children:[d(BR,{children:d(Lf,{direction:"inline",alignItems:"center",gap:"small-400",children:[d(kf,{children:n.translate("order_summary.duties_and_taxes_label")}),d(lh,{type:"question-circle",interestFor:a,accessibilityLabel:n.translate("tooltip.accessibility_label_context",{context:n.translate("order_summary.duties_and_taxes_label")})}),d(dm,{id:a,children:n.translate("order_summary.error_duties_tooltip")})]})}),d(FR,{children:d(uM,{condition:i,children:i?"$0.00":n.translate("order_summary.may_be_charged_on_delivery")})})]})},jM=({shopId:e})=>{const{checkout:t}=oe(),r=Boolean(t.proposal.facts.taxesIncluded),a=Boolean(t.proposal.facts.dutiesIncluded),i=So(),o=Ao(),s=t.negotiator.current.fields.landedCostDetails,l=sn("landedCostDetails"),c=LI("landedCostDetails"),u=t.negotiator.current.fields.optionalDuties,p=sn("optionalDuties"),m=n(()=>Boolean(u.value?.refuseDutiesPermitted)&&Boolean(u.value?.buyerRefusesDuties)&&s.value?.incoterm===Rl.Ddu),h=n(()=>c.value||p.value||l.value),g=n(()=>!(o.value||a)),f=n(()=>Boolean(e)||!(i.value||r));return d(x,{when:m,fallback:d(y,{children:[d(x,{when:g,children:d(OM,{shopId:e})}),d(x,{when:f,children:d(VM,{shopId:e})})]}),children:d(qM,{loading:h,shopId:e})})};function HM(){return d(hf,{children:[d(UC,{blockSize:"small-200"}),d(pS,{accessibilityRole:"presentation"}),d(UC,{blockSize:"small-200"})]})}const $M=qc("LegacyFeeMoneyLineTooltip");function YM(){const{moneyLines:{divided:e}}=Km(),{checkout:{negotiator:t}}=oe(),{legacyRepresentProductsAsFees:r,legacyMerchandiseLinesAsFees:a}=t.current.fields,i=n(()=>r.value&&a.value?a.value.lines:[]);return d(Y,{each:i,getKey:e=>e.title,children:t=>d(y,{children:[e&&d(HM,{}),d(WM,{...t})]})})}function WM({title:e,description:t,total:n}){const{i18n:r}=oe(),a=jc(void 0,$M),i=t?d(Lf,{direction:"inline",alignItems:"center",gap:"small-400",children:[d(kf,{children:e}),d(lh,{type:"question-circle",size:"small",interestFor:a,accessibilityLabel:r.translate("general.tooltip_accessibility_label")}),d(dm,{id:a,children:t})]}):d(kf,{children:e});return d(OR,{label:e,children:[d(BR,{children:i}),d(FR,{children:d(kf,{translate:!1,children:r.formatCurrency(n.amount,{currency:n.currencyCode,form:"short"})})})]})}function GM({content:e}){return function(e){const t=i(!1);S(()=>{const n=e.value;if(t.current){if(n)return ju({content:n})}else t.current=!0})}(e),d(x,{when:e,children:e=>d(y,{children:KM(e).map(({id:e,line:t})=>d(OR,{layout:"stackable",children:[d(hf,{inlineSize:"100%",children:d(BR,{children:d(Mx,{type:"small",color:"subdued",textAlign:"end",children:t})})}),d(FR,{})]},e))})})}function KM(e){const t=new Map;return e.split("\n").filter(Boolean).map(e=>{const n=t.get(e)??0;return t.set(e,n+1),{id:`${e}:${n}`,line:e}})}function JM(){const{moneyLines:{divided:e}}=Km(),{i18n:t,checkout:n,shop:r}=oe(),{value:a}=ut(),{value:i}=n.negotiator.current.fields.deferredTotal,o=n.proposal.facts.previouslyPaidTotal,s=n.proposal.facts.updatedTotal,l=n.proposal.facts.waivedTotal,c=(n.proposal.facts.merchandiseLines??[]).some(e=>e.quantityChange&&e.quantityChange.delta),u=Boolean(s&&a&&c),p=i&&i.amount.amount>0,m=o&&Number(o.amount)>0,h=r.hasFlagEnabled(To)&&l&&Number(l.amount)>0,g=(u||o||h)&&e;return g||u||m||h||p&&a?d(y,{children:[g&&d(HM,{}),p&&a&&d(OR,{label:t.translate("order_summary.total_label"),value:t.formatCurrency(a.amount,{currency:a.currencyCode,form:"short"})}),u&&s&&d(OR,{type:"strong",label:t.translate("order_summary.order_total_updated_label"),value:t.formatCurrency(Number(s.amount),{currency:s.currencyCode,form:"short"})}),m?d(OR,{type:"strong",label:t.translate("order_summary.total_already_paid_label"),value:t.formatCurrency(-Number(o.amount),{currency:o.currencyCode,form:"short"})}):null,h&&l?d(OR,{type:"strong",label:t.translate("order_summary.waived_label"),value:t.formatCurrency(-Number(l.amount),{currency:l.currencyCode,form:"short"})}):null]}):null}const QM={Wrapper:"_3KD7m",Char:"kxIMD",Price:"_3XbdQ","Price-enter":"baSEe","Price-exit":"dhH4n","Price-exiting":"ldszB","Price-exited":"ZOhB6"};let XM=0;function ZM({formatted:e,money:r}){const{orderSummary:{priceReductionAnimation:s}}=jy(),l=Uc(),c=i(o(()=>r.value)),u=m([{id:XM++,formatted:o(()=>e.value)}]),p=at(),h="base"===s;a(()=>{const t=c.current,n=r.value.currencyCode===t.currencyCode&&r.value.amountu.value.map((e,t)=>({id:e.id,formatted:e.formatted,current:t===u.value.length-1,animated:u.value.length>1}))),f=t(e=>{u.value=u.value.filter(t=>t.id!==e)},[u]);return h?d("span",{className:QM.Wrapper,style:{"--delay":(l?0:30)+"ms"},children:d(x,{when:p,fallback:e,children:d(Y,{each:g,getKey:e=>e.id,children:e=>d(eN,{formatted:e.formatted,current:e.current,onDisappear:f,snapshotId:e.id,animated:e.animated})})})}):d(y,{children:e})}function eN({formatted:e,current:t,animated:n,onDisappear:r,snapshotId:i}){const o=Uc(),s=Id(t,"fast",n),l=e.split("");return a(()=>{let t;return"exited"===s&&(o?r(i):t=setTimeout(()=>r(i),30*e.length)),()=>{clearTimeout(t)}},[s,o,e,r,i]),d("span",{className:v(QM.Price,n&&QM[`Price-${s}`]),"aria-label":t?e:void 0,"aria-hidden":t?void 0:"true",style:{"--total":l.length},children:l.map((e,t)=>d("span",{className:QM.Char,style:{"--index":t},children:e},t))})}function tN(e){const{checkout:{negotiator:t}}=oe(),{initialUnresolvedFields:r}=t;return n(()=>function(e,t){return t.some(t=>e.has(t))}(r.value,e))}const nN=["deliveryNext","taxes","duties","landedCostDetails","remoteTaxDetails"];function rN({alignItems:e="baseline",freeLabel:t,outOfStockLabel:r,paymentDue:a,showCurrencyBadge:i,hideCurrencyCode:o,size:s}){const{i18n:l,embed:c,checkout:{negotiator:u}}=oe(),p=Hy(),{orderSummary:h}=jy(),g=function(){const{checkout:{negotiator:e}}=oe(),{allViolations:t}=e.current.fields;return n(()=>fy(t.value??[]))}(),f=at(),y=sn("deliveryNext"),v=sn("taxes"),_=sn("duties"),b=sn("landedCostDetails"),k=sn("remoteTaxDetails"),P=n(()=>void 0!==u.current.fields.deliveryNext.value||void 0!==u.current.fields.taxes.value||void 0!==u.current.fields.duties.value||void 0!==u.current.fields.landedCostDetails.value||void 0!==u.current.fields.remoteTaxDetails.value),w=tN(nN),C=m(w.peek()),E=m(!w.peek()&&P.peek());S(()=>{!w.value&&P.value&&(E.value=!0)});const I=n(()=>y.value||v.value||_.value||b.value||k.value),A=n(()=>(!c||!ar(c.embedder))&&(c?!P.value||I.value:C.peek()&&!E.value)),T=!o&&p,L=n(()=>r&&g.value?r:t&&0===a.value.amount?t:l.formatCurrency(a.value.amount,{currency:a.value.currencyCode,form:"short"})),R=t?"uppercase":void 0,M=h.totalDueTypography;let N,D;M?(N="bold"===M.weight?"strong":"generic",D=M.size??"base"):(N="strong",D="large");const z=d(kf,{size:i?"extraSmall":"small",color:"subdued",translate:!1,children:a.value.currencyCode}),O=n(()=>T&&L.value!==r&&L.value!==t&&(!f.value||!K(a.value.currencyCode,L.value)));return d(Lf,{alignItems:e,gap:"small-300",direction:"inline",children:[d(x,{when:O,children:d(gA,{children:i?d(fL,{color:"subdued",size:"small",children:z}):z})}),d(uM,{condition:A.value,type:N,size:s??D,translate:!1,letterCase:R,skeletonContent:L.value,children:E.value?d(ZM,{formatted:L,money:a}):null})]})}const aN=1e8;function iN(e,t){const n=e/t*100,r=Math.round(n*aN)/aN;return Math.ceil(r)/100}function oN(e){return e?.installmentPlans?.some(e=>"MSI"===e.type)??!1}function sN(e,t){return e.map(e=>"direct"===e.method.type||e.method.type===he.CreditCard?{...e,method:{...e.method,creditCardInstallments:t}}:"wallet"===e.method.type&&"SHOP_PAY"===e.method.name&&e.method.walletContent?{...e,method:{...e.method,walletContent:{...e.method.walletContent,creditCardInstallments:t}}}:e)}function lN(e){return e.map(e=>"direct"===e.method.type||e.method.type===he.CreditCard?{...e,method:{...e.method,creditCardInstallments:void 0}}:e)}function cN(){const e=Vi(),t=hA(),{i18n:r,checkout:{negotiator:a}}=oe(),{installmentMonthsSignal:i}=a.context,o=a.current.fields.paymentMethods,s=n(()=>o.value?.some(e=>"direct"===e.type&&!e.alternative&&oN(e))??!1);return{amount:n(()=>{const t=i.value,n=e.value;return s.value&&Boolean(t)&&n&&t?{...n,amount:iN(n.amount,t)}:n}),label:n(()=>{const n=i.value;return s.value&&Boolean(n)&&Boolean(e.value)?r.translate("order_summary.installment_due_today_label"):t.value}),isInstallment:n(()=>s.value&&Boolean(i.value))}}function uN({label:e,amount:t,hideCurrencyCode:n}){const{moneySummary:{labelTypography:r}}=Km();return d(rM,{children:[d(aM,{children:d(kf,{type:"strong",size:r?.size??"large",children:e})}),d(iM,{children:d(rN,{paymentDue:t,hideCurrencyCode:n})})]})}function dN(){const{shop:e,checkout:{negotiator:t}}=oe(),r=t.current.fields.buyerIdentity,a=Vi(),i=e.hasFlagEnabled(Lo);return n(()=>{if(i)return;const e=r.value,t="BG"===e?.countryCode&&"EUR"===e?.presentmentCurrency,n=a.value;return!t||!n||n.amount<=0?void 0:Number((1.95583*n.amount).toFixed(2))})}function pN({bgnAmount:e}){const{i18n:t}=oe();return d(OR,{children:d(FR,{children:d(kf,{color:"subdued",children:t.formatCurrency(e,{currency:"BGN",form:"short"})})})})}function mN({children:e}){return d(RR,{spacing:"small-500",children:d(OR,{children:[d(BR,{children:d(Mx,{color:"subdued",children:d(qA,{children:e})})}),d(FR,{})]})})}const hN=["taxes","duties"];function gN({shopId:e}){const t=Vi(),r=Ro(),a=n(()=>e?r.value.get(e):t.value),{checkout:o,embed:s,i18n:l,shop:c}=oe(),u=tN(hN),p=sn("deliveryNext"),m=sn("taxes"),h=sn("duties"),g=sn("landedCostDetails"),f=sn("remoteTaxDetails"),{visibility:v}=o.configuration,{moneySummary:{labelColor:_="base",labelTypography:b},moneyLines:{divided:k}}=Km(),P=o.proposal.facts.previouslyPaidTotal,S=Oi(),w=pA(),C=(()=>{const{shopPay:e,checkout:t}=oe();if(xg().value&&t.installments.isSupported.value&&t.installments.config.value?.availableLoanTypes.includes("SPLIT_PAY")&&e.session.isInstallmentsSelected.value)return t.installments.chargeAmount.value})(),{value:E}=ut(),I=E?.currencyCode,A=cM(),T=Boolean(o.proposal.facts.taxesIncluded),L=Boolean(o.proposal.facts.dutiesIncluded),R=So().value||T,M=Ao().value||L,{value:N}=o.negotiator.current.fields.landedCostDetails,D=Nb(),z=o.proposal.facts.landedCostDetails,{amount:O,label:B,isInstallment:F}=cN(),V="COMPACT"===o.configuration.orderSummary?.layoutStyle,U=kM(),q=dN(),j=n(()=>e&&e!==c.id?l.translate("order_summary.total_label"):B.value),H=n(()=>!a.value),$=n(()=>(!s||!ar(s.embedder))&&u.value),Y=i(a.peek()),W=n(()=>{const e=a.value;return null!=e&&(Y.current=e),Y.current}),G=n(()=>W.value??{amount:0,currencyCode:c.currencyCode}),K=i(O.peek()),J=n(()=>{const e=O.value;return null!=e&&(K.current=e),K.current??G.value}),Q=n(()=>F.value?a.value:void 0),X=null!=W.value&&(p.value||m.value||h.value||g.value||f.value);if((H.value||!O.value)&&!$.value&&!X)return null;const Z=(v.showSubtotal.value||P)&&k?d(HM,{}):null,ee=!S.value&&!w.value,te=D?.applied&&R&&U.value?d(mN,{children:U.value}):ee?d(SM,{taxesIncluded:R,shopId:e}):null;if(e)return d(y,{children:[d(uN,{label:j,amount:G,hideCurrencyCode:H.value}),te]});if(V){const e="base"===b?.weight?"generic":"strong";return d(y,{children:[Z,d(rM,{children:[d(aM,{children:d(Lf,{children:d(x,{when:U,fallback:d(kf,{type:e,color:_,size:b?.size??"large",children:B.value}),children:d(y,{children:[d(kf,{type:e,color:_,size:b?.size,children:B.value}),te]})})})}),d(iM,{children:d(rN,{paymentDue:J,hideCurrencyCode:H.value,showCurrencyBadge:!0,alignItems:"center"})})]})]})}const ne=[N,z].some(e=>e?.incoterm===Rl.Ddp),re=M&&ne?d(y,{children:[d(UC,{blockSize:"small-400"}),d(pS,{accessibilityRole:"presentation"}),d(UC,{blockSize:"small-400"}),d(Mx,{type:"small",color:"subdued",children:d(qA,{children:l.translate("order_summary.duties_included_label")})})]}):null,ae=d(RR,{spacing:"small-500",children:d(uN,{label:j,amount:G,hideCurrencyCode:H.value})}),ie=l.translate("order_summary.payment_terms_totals.due_today_next");return d(y,{children:[Z,d(x,{when:A,children:d(rM,{children:[d(aM,{children:d(kf,{children:ie})}),d(iM,{children:d(Lf,{direction:"inline",gap:"small-200",alignItems:"baseline",children:d(uM,{condition:H.value,size:"medium",translate:!1,children:l.formatCurrency(0,{currency:G.value.currencyCode,form:"short"})})})})]})}),d(x,{when:Q,children:e=>d(OR,{label:l.translate("order_summary.total_label"),value:l.formatCurrency(e.amount,{currency:e.currencyCode,form:"short"})})}),d(x,{when:A,fallback:d(uN,{label:j,amount:J,hideCurrencyCode:H.value}),children:ae}),te,void 0!==C&&I?d(rM,{children:d(iM,{accessibilityColumnIndex:2,children:d(kf,{size:"small",translate:!1,children:l.translate("payment.pay_in_installments_split_pay_short",{amount:l.formatCurrency(C,{currency:I,form:"short"})})})})}):null,null!=q.value&&d(pN,{bgnAmount:q.value}),re]})}const fN=qc("PriceBreakdownItemTooltip");function yN({title:e,tooltipText:t,itemText:n,layout:r}){const{i18n:a}=oe(),i=jc(void 0,fN),o="strong",s="base";return d(OR,{layout:r,children:[d(BR,{children:d(Lf,{direction:"inline",alignItems:"center",gap:"small-300",children:[d(kf,{color:s,type:o,children:e}),t?d(y,{children:[d(lh,{type:"question-circle",size:"small",interestFor:i,accessibilityLabel:a.translate("tooltip.accessibility_label_context",{context:e})}),d(dm,{id:i,children:t})]}):null]})}),d(FR,{children:d(kf,{color:s,type:o,children:n})})]})}const vN=qc("RecurringTotalsTooltip"),_N=qc("RecurringTotalsLabel");function bN({cardStyle:e}){const{i18n:t,checkout:{negotiator:n}}=oe(),{value:r}=n.current.fields.recurringTotals,a=kL(),i=jc(void 0,vN),o=jc(void 0,_N);if(!r?.length)return null;const s=t.translate("order_summary.recurring_subtotal_label"),[l]=r;if(e){const e=1===r.length;return d(hf,{accessibilityRole:e?"group":void 0,"aria-labelledby":e?o:void 0,background:"subdued",padding:"small-300",borderRadius:"small",children:e&&l?d(nh,{gridAutoFlow:"column",gridTemplateColumns:"minmax(0, 1fr) minmax(auto, max-content)",gridTemplateRows:"minmax(0, 1fr)",alignItems:"center",alignContent:"center",children:[d(Lf,{direction:"inline",alignItems:"center",gap:"small-300",children:[d(kf,{id:o,color:"base",type:"strong",children:s}),d(kf,{color:"base",type:"strong",children:a(l)})]}),d(lh,{type:"question-circle",size:"small",interestFor:i,accessibilityLabel:t.translate("tooltip.accessibility_label_context",{context:s})}),d(dm,{id:i,children:t.translate("order_summary.recurring_total_tooltip")})]}):d(kf,{color:"base",type:"strong",children:t.translate("order_summary.recurring_total_multiple_label")})})}return d(y,{children:[d(pS,{accessibilityRole:"presentation"},"recurringTotalsDivider"),1===r.length&&l?d(RR,{spacing:"small-300",children:d(yN,{title:s,tooltipText:t.translate("order_summary.recurring_total_tooltip"),itemText:a(l),layout:"stackable"})}):d(kf,{color:"base",type:"strong",children:t.translate("order_summary.recurring_total_multiple_label")})]})}function kN(){const{moneyLines:{divided:e}}=Km(),t=function(){const{i18n:e,checkout:t}=oe(),n=t.proposal.facts.returnFees,r=Number(n?.aggregatedReturnShippingFees?.amount)>0,a=Number(n?.aggregatedRestockingFees?.amount)>0;return r||a?{shippingFee:r?{label:e.translate("order_summary.return_shipping_fee_label"),value:e.formatCurrency(Number(n?.aggregatedReturnShippingFees?.amount),{currency:n?.aggregatedReturnShippingFees?.currencyCode,form:"short"})}:null,restockingFee:a?{label:e.translate("order_summary.return_restocking_fee_label"),value:e.formatCurrency(Number(n?.aggregatedRestockingFees?.amount),{currency:n?.aggregatedRestockingFees?.currencyCode,form:"short"})}:null}:null}();if(!t)return null;const{shippingFee:n,restockingFee:r}=t;return d(y,{children:[n&&d(y,{children:[e&&d(HM,{}),d(OR,{type:"strong",label:n.label,value:n.value})]}),r&&d(OR,{type:"strong",label:r.label,value:r.value})]})}function PN(e){const{shop:{id:t},checkout:r}=oe(),a=r.negotiator.current.fields.merchandiseLines,i=r.proposal.facts.merchandiseLines??[],{value:o}=r.negotiator.current.fields.legacyRepresentProductsAsFees,s=n(()=>Mo(a.value?.lines??[],r.negotiator.current.fields.remoteMerchandiseDetails.value)),l=No(),c=e?e!==t?{lines:s.value.get(e),factLines:void 0}:{lines:l.value,factLines:i}:{lines:a.value?.lines,factLines:i},u=function(e,t){return t?e?.reduce((e,t)=>t.legacyFee?e:e+t.quantity,0):e?.reduce((e,t)=>e+t.quantity,0)}(c?.lines,o),d=c?.lines?.filter(({quantity:e})=>e>0),p=c?.factLines?.reduce((e,t)=>e+t.quantity,0);return{totalLineQuantities:u,totalLineQuantitiesFact:p,merchandiseLinesWithCount:d?.length||0}}function SN({shopId:e}){const{subtotalLabel:t,subtotalValue:r,subtotalOriginalValue:a}=function(e){const{checkout:t,i18n:r}=oe(),a=function(e){const{shop:{id:t},checkout:{negotiator:r}}=oe(),{remoteTotalDetails:a,legacyRepresentProductsAsFees:i,legacySubtotalBeforeTaxesShippingAndFees:o,subtotal:s}=r.current.fields,l=wt();return n(()=>{const n=i.value?o.value:l.value;return e?t===e?s.value:a.value?.perShopRemoteTotals.get(e)?.subtotal:n})}(e),i=function(e){const{embed:t,i18n:n}=oe(),{totalLineQuantities:r,merchandiseLinesWithCount:a}=PN(e);return ar(t?.embedder)?n.translate("order_summary.number_items",{count:r??0}):a>1&&r?n.translate("order_summary.subtotal_label_with_quantity",{count:r}):n.translate("order_summary.subtotal_label")}(e);return n(()=>{const e=a.value?r.formatCurrency(a.value.amount,{currency:a.value.currencyCode,form:"short"}):void 0,n=t.latestReceipt.value&&"consolidatedProposedSubtotalBeforeTaxesAndShipping"in t.latestReceipt.value&&t.latestReceipt.value.consolidatedProposedSubtotalBeforeTaxesAndShipping||void 0,o=n?r.formatCurrency(n.amount,{currency:n.currencyCode,form:"short"}):void 0;return{subtotalLabel:i,subtotalValue:e,subtotalOriginalValue:o}})}(e).value;return r?d(OR,{children:[d(BR,{children:d(kf,{children:t})}),d(FR,{children:a?d(Lf,{direction:"inline",gap:"small-300",children:[d(kf,{tone:"critical",type:"redundant",translate:!1,children:a}),d(kf,{translate:!1,children:r})]}):d(kf,{translate:!1,children:r})})]}):null}function wN(){const{i18n:e,checkout:t,embed:n}=oe(),{value:r}=Do(),a=pA(),i=dA(),o=Boolean(t.proposal.facts.taxesIncluded),s=So().value||o;if(!a.value||!r)return null;const l=d(SM,{taxesIncluded:s});return ar(n?.embedder)&&i.value.length>0?l:d(y,{children:[d(OR,{label:e.translate("order_summary.total_price_label"),value:e.formatCurrency(r.amount,{currency:r.currencyCode,form:"short"})}),l]})}const CN=A(function(){const{checkout:e,i18n:t,embed:r}=oe(),{visibility:a}=e.configuration,{orderSummary:i}=jy(),o=e.configuration.orderSummary?.headerPosition??i.headerPosition,s=i.isCollapsible??!1,l=!1===i.isCollapsible,{currentDetour:c}=tc().value,u="thankYou"===c?.type,p=TR(),m=e.proposal.negotiated.fields.additionalMoneyLines.value,h=e.proposal.negotiated.fields.lpmDisclosure,g=sn("lpmDisclosure"),f=n(()=>g.value?void 0:h.value),y=n(()=>{const t=e.latestReceipt.value;return"processed"===t?.status?t.lpmDisclosure:void 0});return d(FT,{children:[d(UR,{ref:p,title:t.translate("order_summary.cost_table_title"),children:[d(x,{when:a.showSubtotal,children:[d(SN,{}),d(YR,{}),d(NM,{}),d(YM,{}),d(kN,{}),d(jM,{}),d(eM,{}),d(wN,{}),d(ZR,{})]}),d(JM,{}),d(GR,{}),m?.map(e=>d(OR,{label:e.label,value:t.formatCurrency(e.amount.amount,{currency:e.amount.currencyCode,form:"short"})},e.id)),"BOTTOM"===o&&s?d(UC,{blockSize:"small-500"}):d(gN,{}),!u&&d(x,{when:()=>!f.value,children:d(dM,{})}),d(GM,u?{content:y}:{content:f}),d(CM,{}),!ar(r?.embedder)&&d(oM,{}),!l&&d(bN,{})]}),l&&d(x,{when:()=>e.negotiator.current.fields.recurringTotals.value,children:d(hf,{paddingBlockStart:"small-300",children:d(bN,{cardStyle:!0})})})]})});function EN({shopId:e,isLocalShop:t}){const{i18n:n}=oe();return d(UR,{title:n.translate("order_summary.cost_table_title"),children:[d(SN,{shopId:e}),t&&d(YR,{disableTooltip:!0}),d(NM,{shopId:e}),d(jM,{shopId:e}),t&&d(eM,{}),t&&d(ZR,{}),t&&d(GR,{disableTooltip:!0}),d(gN,{shopId:e}),t&&d(CM,{shopId:e})]})}function xN(){const{i18n:e,checkout:{negotiator:t}}=oe(),r=eA(),a=cM(),i=Vi(),o=n(()=>{const n=t.current.fields.paymentFlexibilityPaymentTermsTemplate.value;if(n?.dueDate){const t=r(n.dueDate,{month:"short"});return e.translate("order_summary.deferred_total_due_date_label",{date:t})}return"FULFILLMENT"===n?.type?e.translate("order_summary.payment_terms_totals.due_on_fulfillment"):e.translate("order_summary.total_due_later_label")});return d(x,{when:()=>t.current.fields.recurringTotals.value||i.value&&a.value,children:d(Lf,{gap:"small-300",children:[d(bN,{cardStyle:!0}),d(x,{when:()=>a.value?i.value:void 0,children:t=>d(hf,{background:"subdued",padding:"small-300",borderRadius:"small",children:d(nh,{gridAutoFlow:"column",gridTemplateColumns:"minmax(0, 1fr) minmax(auto, max-content)",gridTemplateRows:"minmax(0, 1fr)",alignItems:"center",alignContent:"center",children:[d(kf,{color:"subdued",children:o}),d(kf,{color:"subdued",children:e.formatCurrency(t.amount,{currency:t.currencyCode,form:"short"})})]})})}),d(CM,{variant:"card"})]})})}function IN(){const{i18n:e}=oe(),t=_o(),r=lM(),a=dN(),i=n(()=>r.value.showTotalSavings?t.value:void 0),o=n(()=>null!=a.value||null!=i.value);return d(x,{when:o,children:d(Lf,{alignItems:"end",gap:"small-500",children:[d(x,{when:a,children:e=>d(pN,{bgnAmount:e})}),d(x,{when:i,children:t=>d("div",{className:"_6hall",children:d(Lf,{direction:"inline",alignItems:"center",gap:"small-400",children:[d(Lf,{direction:"inline",alignItems:"center",gap:"small-500",children:[d(lh,{type:"savings",size:"small",color:"base"}),d(kf,{color:"subdued",children:e.translate("order_summary.total_savings")})]}),d(kf,{color:"subdued",translate:!1,children:e.formatCurrency(t.amount,{currency:t.currencyCode,form:"short"})})]})})})]})})}var AN="km09ry0 _1fragem5z";const TN=qc("Form");function LN({onSubmit:e,children:t,implicitSubmit:n=!0,disabled:a=!1,id:i,contentsClassName:o}){const s=Ju(),l=jc(void 0,TN),c=i??l,u=null!=Pd(),p=r(()=>({id:c,nested:u}),[c,u]);let m=null;n&&(m=d(hf,{accessibilityVisibility:"exclusive",children:d(RN,{disabled:a,form:p,children:"string"==typeof n?n:s("submit")})}));const h=t=>{t.preventDefault(),t.stopPropagation(),a||"function"==typeof e&&e()},g=d("div",{className:v("km09ry1 _1fragemws",o),children:t});return u?d(y,{children:[d(kd.Provider,{value:p,children:[g,m]}),d(Zc,{children:d("form",{action:"",method:"POST",noValidate:!0,className:AN,id:c,onSubmit:h})})]}):d("form",{action:"",method:"POST",noValidate:!0,className:AN,id:c,onSubmit:h,children:d(kd.Provider,{value:p,children:[g,m]})})}function RN({form:e,children:t,disabled:n}){return d("button",{type:"submit",disabled:n,tabIndex:-1,"aria-hidden":!0,form:e.nested?e.id:void 0,children:t})}const MN=["extraSmall","small","medium","large"];function NN({above:e,below:t,children:n}){const r=Ed()?"span":"div",{hiddenOnExtraSmall:a,hiddenOnSmall:i,hiddenOnMedium:o,hiddenOnLarge:s}=function(e,t){if(e===t)return{hiddenOnExtraSmall:!0,hiddenOnSmall:!0,hiddenOnMedium:!1,hiddenOnLarge:!0};const n=e?MN.indexOf(e)+1:0,r=t?MN.indexOf(t)-1:MN.length-1,a=MN.slice(n,r+1);return{hiddenOnExtraSmall:a.indexOf("extraSmall")>=0,hiddenOnSmall:a.indexOf("small")>=0,hiddenOnMedium:a.indexOf("medium")>=0,hiddenOnLarge:a.indexOf("large")>=0}}(e,t),l=v("_123qrzt0 _1fragem5z",a&&"_123qrzt1",i&&"_123qrzt2",o&&"_123qrzt3",s&&"_123qrzt4");return d(r,{className:l,children:n})}function DN({targetSelector:e,label:n,icon:r}){const a=t(()=>{const t=document.querySelector(e);t&&(t.focus(),t.scrollIntoView({behavior:"smooth"}))},[e]);return d(hf,{display:"@media (inline-size >= medium) auto, none",children:d(Cf,{variant:"secondary",size:"small",onClick:a,className:Ce({screenReaders:"untilFocus"}),children:d(Lf,{direction:"inline",gap:"small-400",alignItems:"center",children:[d(lh,{type:r,size:"small-100"}),d(kf,{children:n})]})})})}const zN=({violations:e,noticeType:t,noticeTitle:n,noticeHeader:r,noticeFooter:a})=>({code:t,tone:"critical",localizedTitle:n,localizedMessage:d(y,{children:[r,d("ul",{style:{listStyle:"inside"},children:e.map(e=>d("li",{children:e.localizedMessageHtml?d("span",{dangerouslySetInnerHTML:{__html:e.localizedMessageHtml}}):e.localizedMessage||e.nonLocalizedMessage},e.code))}),a]})}),ON=()=>{const{i18n:e,shop:t,checkout:{negotiator:r}}=oe(),a=Vc(),i=sn("shippingAddress"),{allViolations:o}=r.current.fields,s=tc(),{shippingAddress:l}=r.parts;return n(()=>{const n=l.peek();if(a.value&&"information"===s.value.currentPage?.id&&zn(n,{...zo,countryCode:n?.countryCode}))return null;const r=o.value?.filter(e=>ya.has(e.code))||[];return 0===r.length||!a.value||i.value?null:zN({violations:r,noticeType:Dy.DeliveryViolations,noticeTitle:e.translate("notice_banner.violations_title",{violation:e.translate("notice_banner.individual_violations_title",{scope:Dy.DeliveryViolations})}),noticeHeader:e.translate("notice_banner.editable_shipping_address_violations_message_title"),noticeFooter:e.translate("notice_banner.editable_shipping_address_violations_message_footer",{emailLink:d(Af,{href:`mailto:${t.contactEmail}`,children:e.translate("notice_banner.editable_shipping_address_violations_email_link")})})})})};var BN={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 FN=qc("Banner"),VN=new Map([["info","info"],["success","check-circle"],["warning","alert-triangle"],["critical","alert-circle"]]);function UN({autoFocus:e,focusable:t,children:n,collapsible:r,dismissible:o,iconHidden:l,color:c="base",id:u,tone:p="auto",heading:m,hidden:h=!1,onDismiss:g,onAfterHide:f}){const _="auto"===p?"info":p,b=Ju(),[k,P]=s(h),[S,w]=s(!0),C=i(),E=jc(void 0,FN),x=af({active:"critical"===_}),I=i(k),A=wd(),T=Uc(),L=i(T);L.current=T;const R=ed(),M=i(R);M.current=R,a(()=>{if(!e)return;const t=C.current;if(!t)return;const n=()=>{t.focus({preventScroll:!0}),""===t.style.scrollMarginTop&&(t.style.scrollMarginTop="var(--x-spacing-large-500)"),M.current||t.scrollIntoView?.({behavior:L.current?"auto":"smooth"})};if(t.getBoundingClientRect().height>0)return void n();if("undefined"==typeof ResizeObserver){const e=setTimeout(n,300);return()=>clearTimeout(e)}const r=new ResizeObserver(()=>{0!==t.getBoundingClientRect().height&&(r.disconnect(),n())});return r.observe(t),()=>r.disconnect()},[e]),a(()=>{!I.current&&k&&f?.(),I.current=k},[k,f]),a(()=>{P(h)},[h]);const N=v(BN.Banner,_&&BN.toneVariant[_],m&&BN.withHeading,BN.colorVariant[c]),D=Boolean(r&&m),z=!D||D&&!S,O=o&&d("button",{type:"button",className:BN.Button,onClick:()=>{"function"==typeof g&&g(),P(!0)},"aria-label":b("closeNotification"),"aria-hidden":!!A||void 0,tabIndex:A?-1:void 0,children:d(lh,{type:"x",size:"small"})}),B=d("button",{type:"button",className:BN.Button,onClick:()=>w(e=>!e),"aria-expanded":!S,"aria-controls":`${E}-collapsible-area`,"aria-label":b("expandNotification"),"aria-hidden":!!A||void 0,tabIndex:A?-1:void 0,children:d(lh,{size:"small",type:S?"chevron-down":"chevron-up"})});return k?null:d("div",{className:N,role:"critical"===_?"alert":"status",...(e||t)&&{tabIndex:-1},ref:function(e){C.current=e,x.current=e},id:u,children:[!l&&d("div",{className:BN.Icon,children:d(lh,{type:VN.get(_),size:"fill"})}),m&&d("div",{className:BN.Heading,children:d(CP,{level:3,children:m})}),D&&d("div",{className:BN.ControlCollapsible,children:B}),uS(n)&&d("div",{className:BN.Content,children:d(wu.Provider,{value:"Banner",children:d(fu,{children:D?d(Td,{open:z,id:`${E}-collapsible-area`,children:[m&&d(UC,{blockSize:"small-200"}),n]}):d(y,{children:[m&&d(UC,{blockSize:"small-200"}),n]})})})}),O&&d("div",{className:BN.ControlDismiss,children:O})]})}const qN=Object.values({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"}),jN=["buyerJourneyInterceptor","storefrontApiTokenRefresh","getSessionToken","getSessionTokenError","getSessionTokenCached","storefrontApiQueryStart","storefrontApiQuerySuccess","storefrontApiQueryError","storefrontResponseParseError",...qN.flatMap(e=>[`${e}Start`,`${e}Success`,`${e}Error`]),"marketDriverChangeShippingAddressCountryCode","unknownChangeStart","unknownChangeSuccess","unknownChangeError"],HN=["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"].map(e=>{const t=e.replace(/\$/g,"\\$").replace(/\./g,"\\.").replace(/\[0\]/g,"\\[\\d+\\]");return new RegExp(`^${t}$`)}),$N=()=>{const e=ie(Gg),{observability:n}=oe();return t(t=>{const r=function(e){switch(e){case"postalCode":return"zip";case"zone":case"zoneCode":return"provinceCode";case"country":return"countryCode";default:return e}}(t),a=r?`${e}.${r}`:e;return i=a,HN.some(e=>e.test(i))?a:(n.error(new YN(`Invalid target (${e}) and field (${r}) combination`)),"cart");var i},[e,n])},YN=class extends Error{constructor(){super(...arguments),this.name="InvalidTargetError"}},WN=new Set([Ak.InputInvalid,Ak.InputRequired]);function GN(e){return!WN.has(e)}function KN(e,t){return!!e&&e.target===t.target&&e.errorType===t.errorType&&e.value===t.value&&e.message===t.message}function JN(e){const{message:t,errorType:n,errorValue:r,children:o}=e,s=$N()(),l=yg(),c=i(null),u=i(),p=i(!0),m=se(l),h=e=>{m.current({...e,timestamp:new Date})},g=Oo(e=>{p.current&&KN(u.current,e)&&GN(e.errorType)&&h(e)},250);return a(()=>{const e=n||function(e){switch(e){case"cart.buyerIdentity":return Ak.ContactError;case"cart.deliveryGroups[0].deliveryAddress":return Ak.DeliveryError;case"cart.paymentLines[0].billingAddress":case"cart.paymentLines[0]":return Ak.PaymentError;case"cart.discountCode":return Ak.DiscountError;default:return Ak.CheckoutError}}(s),a=t??c.current?.textContent??"",i={target:s,errorType:e,value:r||null,message:a};KN(u.current,i)||(u.current=i,GN(e)?g(i):h(i))}),a(()=>()=>{p.current=!1},[]),d("div",{ref:c,children:o})}function QN(e){const{errorType:t,errorValue:n,children:r,...a}=e;return d(UN,{...a,children:d(JN,{errorType:t,errorValue:n,children:r})})}function XN({notice:e,iconHidden:t=!1,errorType:n}){const r=e.localizedMessageHtml||e.localizedMessage||e.nonLocalizedMessage;if(!r)return null;const a=e.tone??"info",i={key:e.code,tone:a,onDismiss:e.onDismiss,dismissible:Boolean(e.onDismiss),heading:e.localizedTitle,collapsible:e.collapsible,iconHidden:t},o="string"==typeof e.localizedMessageHtml?d("div",{dangerouslySetInnerHTML:{__html:e.localizedMessageHtml}}):r;return["critical","warning"].includes(a)?d(QN,{...i,errorType:n??Ak.CheckoutError,children:o}):d(UN,{...i,children:o})}function ZN(){const e=ON().value;return e?d(XN,{notice:e,errorType:Ak.DeliveryError}):null}function eD(){const{checkout:{negotiator:e}}=oe(),t=e.current.fields.allViolations,r=n(()=>(t.value?.filter(e=>Bo(e.code))??[]).filter((e,t,n)=>t===n.findIndex(t=>t.code===e.code))),a=n(()=>r.value.length>0);return d(x,{when:a,children:d(Lf,{gap:"base",children:d(Y,{each:r,getKey:e=>e.code,children:({localizedMessage:e,nonLocalizedMessage:t})=>d(QN,{errorType:Ak.PaymentError,tone:"critical",children:e||t})})})})}const tD=["discountLines","totalSavings","merchandiseLines","deliveryNext"],nD=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"]),rD=new Set([...sl,...nD]),aD=new Set(["DISCOUNTS_CURRENTLY_INACTIVE"]),iD=new Set(["DISCOUNTS_HIGHER_VALUE_DISCOUNT_APPLIED"]),oD=new Set([...iD,...rD]);function sD(){const{checkout:{negotiator:e}}=oe(),{allViolations:t}=e.current.fields;return n(()=>{const e=t.value?.filter(e=>rD.has(e.code))||[];return{violations:e,hasViolations:e.length>0}})}const lD=()=>{const{violations:e,hasViolations:t}=sD().value;return t?d(Lf,{gap:"base",children:e.map(({code:e,localizedMessage:t,nonLocalizedMessage:n})=>d(QN,{errorType:Ak.DiscountError,tone:"warning",children:t||n},e))}):null};function cD(){const{router:e,checkout:{identity:t,negotiator:r}}=oe(),o=r.current.fields.allViolations,s=m(null),{shippingAddress:l}=r.parts,c=I(Rt(l.value.countryCode)),u=n(()=>yy(o.value??[])),d=n(()=>function(e=[]){const t=e.filter(({code:e})=>Fo.has(e)),[n]=t;if(1===t.length&&"MERCHANDISE_CART_UPDATED_BASED_ON_COUNTRY"===n?.code)return n}(o.value));a(()=>e.beforeNavigate(()=>{s.value=null}),[s,e]);const p=i(t.current.value);return S(()=>{const e=t.current.value;e!==p.current&&void 0!==p.current&&(s.value=null),p.current=e}),S(()=>{const e=d.value;e&&e!==s.peek()&&(s.value=e)}),n(()=>{const e=d.value??s.value,t=e?{...e,tone:"info"}:void 0;let n;return u.value||c.value.loading||(n=o.value?.find(e=>"MERCHANDISE_CART_AND_CURRENCY_UPDATED_BASED_ON_COUNTRY"===e.code)),{banner:t,toast:n}})}function uD(){const e=cD(),t=yh(),n=i(null),r=Oo(e=>{if(!e)return;const r=e.localizedMessage;if(r===n.current?.message)return;n.current?.hide();const a=t?.(r);a&&(n.current={...a,message:r})},250);return S(()=>{const t=e.value.toast;t&&o(()=>{r(t)})}),null}class dD extends Error{constructor(){super(...arguments),this.name="BuyWithPrimeChangeLinkError"}}function pD(e){const{checkout:{negotiator:t}}=oe(),r=t.parts.paymentLines;return n(()=>function(e,t){const[n]=Qt(e,[t]);if(!n?.method?.walletParams)return null;const{checkout_session_id:r}=n.method.walletParams;return r}(r.value,e))}function mD(){const{i18n:e}=oe(),{href:t,onClick:n}=nP();return d(Af,{href:t,onClick:n,children:e.translate("account_management.checkout_as_guest_link")})}const hD=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"],["PAYMENT_METHOD_EXPIRED","payment_method_expired"],["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"]]),gD=["SHOP_PAY_DECLINED"];function fD(e){const{i18n:t}=oe();let n="generic_error";return e&&(n=hD.get(e.code)||"generic_error"),t.translate("payment_errors",{scope:n,...e&&gD.includes(e.code)&&{checkout_as_guest_link:d(mD,{})}})}const yD=["AMOUNT_TOO_SMALL"];function vD(){const[e]=[{isBuyWithPrime:!0,checkoutSessionId:pD(mn.BuyWithPrime).value},{isBuyWithPrime:!1,checkoutSessionId:pD(mn.AmazonPay).value}].filter(({checkoutSessionId:e})=>Boolean(e)),{i18n:t,observability:r}=oe(),{error:a,hasError:i}=Cy(Vo),o=a&&yD.includes(a),s=fD(o?{type:"payment",code:a}:void 0),{inMemoryAmazonPayParts:{hasPaymentSheetError:l,sdkStatus:c}}=rn(),u=n(()=>{const e=c.value;return e.status===hv.Available?e.sdk:void 0});if(!i||!e)return null;const{isBuyWithPrime:p,checkoutSessionId:m}=e;return d(x,{when:u,children:e=>d(QN,{tone:"critical",errorType:Ak.PaymentError,children:d(Mx,{children:o?s:d(y,{children:[t.translate("amazon_pay.error_page.payment_decline.message"),d(Af,{onClick:()=>{r.counter({name:"wallet_change_link_clicked",value:1,attributes:{wallet:p?mn.BuyWithPrime:mn.AmazonPay,link:"payment_decline_banner"}});try{p?e.buywithprime.changePaymentMethod({amazonPayOptions:{amazonCheckoutSessionId:m,isDeclined:!0}}):e.Pay.changePaymentMethod({amazonCheckoutSessionId:m,isDeclined:i})}catch(t){l.value=!0,r.error(new dD(`Error on changing buyer payment method. Details: ${t}`,{cause:t}))}},children:t.translate("amazon_pay.error_page.payment_decline.link")})]})})})})}const _D=new Map([["invalid_config","critical"],["config_missing_required_fields","critical"],["unusable_partial_address","critical"],["recovery_notice","critical"],[ha,"info"]]),bD=()=>{const e=m(!1),t=m(!1),r=Fy(),{checkout:{negotiator:a}}=oe(),i=a.current.fields.allViolations,o=n(()=>i.value?.some(e=>Uo.has(e.code))??!1);return S(()=>{o.value&&(t.value=!0),!o.value&&e.value&&(e.value=!1,t.value=!1)}),n(()=>{const n=t.value&&!e.value,a=r.value;return n&&a?{code:Dy.PaymentMethodIncompatibleWithPaymentTerms,localizedMessage:a,tone:"info",onDismiss:()=>{e.value=!0}}:null})};function kD(){!function(){const{checkout:{negotiator:e}}=oe(),{shippingAddress:t}=e.parts,{inMemoryGooglePayParts:{paymentSheetError:n},inMemoryPayPalParts:{paymentSheetError:r}}=rn();a(()=>{let e=!0;return t.fields.countryCode.subscribe(()=>{e?e=!1:(n.value?.type===ha&&(n.value=void 0),r.value?.type===ga&&(r.value=void 0))})},[t,n,r])}();const e=function(){const{i18n:e}=oe(),{paymentSheetError:t}=rn().inMemoryApplePayParts,r=e.translate("wallets.errors.generic",{walletName:e.translate("brand.apple_pay")}),a={unhandled_completion_status:e.translate("payment_errors.generic_error"),exceptional_completion_status:r,exceptional_negotiation_status:r,session_terminated:r,failed_to_create_session:r,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 n(()=>{const e=t.value?.type,n=t.value?.tone;if(e&&a[e])return{code:Dy.PaymentSheetViolations,tone:n??"critical",localizedMessage:a[e],nonLocalizedMessage:a[e]}})}(),i=function(){const{i18n:e,checkout:{negotiator:t}}=oe(),{shippingAddress:r}=t.parts,{inMemoryGooglePayParts:{paymentSheetError:a}}=rn(),i=I(Rt(r.value.countryCode));return n(()=>{const t=a.value?.type,n=(()=>{if("invalid_config"===t||"config_missing_required_fields"===t)return e.translate("wallets.errors.generic",{walletName:e.translate("brand.google_pay")});if("unusable_partial_address"===t)return e.translate("wallets.errors.terminal",{walletName:e.translate("brand.google_pay")});if("unexpected_terminal_error"===t)return e.translate("wallets.errors.terminal",{walletName:e.translate("brand.google_pay")});if(t===ha){const t=i.value.details?.name;return t?e.translate("wallets.errors.unavailable.unavailable_for_country",{walletName:e.translate("brand.google_pay"),countryName:t}):e.translate("wallets.errors.unavailable.description",{walletName:e.translate("brand.google_pay")})}return"recovery_notice"===t?e.translate("wallets.recovery_notice"):void 0})(),r=t?_D.get(t):"critical";if(n)return{code:Dy.PaymentSheetViolations,tone:r,localizedMessage:n,nonLocalizedMessage:n,onDismiss:"info"===r?()=>a.value=void 0:void 0}})}(),o=I(function(){const{i18n:e,checkout:{configuration:t,negotiator:n}}=oe(),{shippingAddress:a,paymentLines:i}=n.parts,o=a.value,{value:s}=n.current.fields.paymentMethods,{inMemoryPayPalParts:{paymentSheetError:l}}=rn(),{details:c,loading:u}=Rt(o.countryCode),{value:d}=n.current.fields.allViolations,p=iy(o.countryCode),m=r(()=>ma({paymentLines:i.value,isOnePage:t.layout.isOnePage.value})?d?.filter(zP)??[]:[],[d,i,t.layout.isOnePage.value]),h=r(()=>function({violations:e,getAddressErrorsFromViolations:t}){const n=Array.from(e);return 1===n.length&&MP({missingAddressField:RP({addressErrors:t("shipping",n)}),violations:n})}({violations:m,getAddressErrorsFromViolations:p}),[m,p])?void 0:m[0],g=l.value?.type===ha,f=l.value?.type===ga,y=r(()=>{const t=fa(s,"PAYPAL_EXPRESS");if(g&&!t){const t=u?o.countryCode:c?.name;return t?e.translate("wallets.errors.unavailable.unavailable_for_country",{walletName:e.translate("brand.paypal"),countryName:t}):e.translate("wallets.errors.unavailable.description",{walletName:e.translate("brand.paypal")})}},[c?.name,u,s,g,o.countryCode,e]);if(f){const t=e.translate("shipping_errors.unavailable_address_country");return{code:Dy.PaymentSheetViolations,tone:"critical",localizedMessage:t,nonLocalizedMessage:t,onDismiss:()=>{l.value=void 0}}}return y?{code:Dy.PaymentSheetViolations,tone:"info",localizedMessage:y,nonLocalizedMessage:y,onDismiss:()=>{l.value=void 0}}:h?{code:Dy.PaymentSheetViolations,tone:"critical",localizedMessage:e.translate("wallets.recovery_notice"),nonLocalizedMessage:e.translate("wallets.recovery_notice")}:void 0}()),s=function(){const{receiptErrorSignal:e}=rn();return n(()=>{const t=e.value;if(t)return{code:Dy.PaymentSheetViolations,tone:"critical",localizedMessage:t,nonLocalizedMessage:t}})}(),l=BP(),c=OP({isPayWithPayPalButton:!1}),u=Wy(),d=I(function(){const{inMemoryApplePayParts:{paymentSheetError:e,subscriptionReviewTransition:n}}=rn(),{i18n:r,checkout:a,shop:i}=oe(),o=i.hasFlagEnabled(an),s=a.configuration.layout.isOnePage.value,l=Dl({applePayThreePageVaultedReviewEnabled:o,isOnePageCheckout:s}),{queryParam:c,errorMessage:u,errorTitle:d,tone:p,shouldSuppressNotice:m}=av({applePayPaymentSheetError:e,applePaySubscriptionReviewTransition:n,isApplePaySubscriptionReviewLayoutSupported:l}),h=t(()=>({code:Dy.PaymentSheetViolations,tone:"warning",localizedMessage:r.translate("wallets.errors.subscription_review_required")}),[r]);if(c&&!m)return c===on?h():{code:Dy.PaymentSheetViolations,localizedTitle:d,tone:p,localizedMessage:u}}()),p=bD();return n(()=>{const t="error"===c.value.status,n=Boolean(p.value),r=u.value||s.value||d.value||e.value||i.value||(n?null:o.value)||(t?null:l.value);if(r)return"string"==typeof r?{code:Dy.PaymentSheetViolations,localizedMessage:r,nonLocalizedMessage:r,tone:"critical"}:r})}const PD=new Set([...new Set(["CART_METAFIELD_GENERIC_ERROR"]),...new Set(["CART_METAFIELD_DISALLOWED_ACCESS","CART_METAFIELD_INVALID_KEY_LENGTH","CART_METAFIELD_INVALID_NAMESPACE_LENGTH","CART_METAFIELD_INVALID_TYPE","CART_METAFIELD_INVALID_VALUE"])]),SD=["stockProblems","thankYou"],wD=new Set(["TIP_TIPS_NOT_ALLOWED_FOR_B2B"]),CD=new Set(["PAYMENTS_METHOD","PAYMENTS_TERMS_CHANGED"]),ED=[...ya,...qo,...jo,...rD,...Ho,...wD,...CD,...$o,...Yo,...Wo,...Go,...Ko,...Jo,...Qo,...ka,...Xo,...Hi,...Ht,...hi,...Uo,...Zo,...PD,"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 xD({children:e,id:t}){return d("li",{id:t,className:"_1585eob1 _1585eob0 _1fragemws _1fragemzh",children:e})}var ID={UnorderedList:"_70q41o2 _70q41o1 _1fragemqt _1fragemsm _1fragemp0 _1fragemuf _1fragem6t _1fragemws _1fragem11h",Wrapper:"_70q41o0",listStyleVariant:{disc:"_70q41o3",none:"_70q41o4"}};function AD({gap:e="base",listStyle:t="disc",accessibilityLabel:n,children:r,id:a}){const{className:i}=$m({gap:e}),o=v(ID.UnorderedList,t&&ID.listStyleVariant[t],i);return d("div",{className:ID.Wrapper,children:d("ul",{className:o,role:"none"===t?"list":void 0,"aria-label":n,id:a,children:r})})}function TD(){const{checkout:{negotiator:e}}=oe(),t=e.current.fields.buyerIdentity,r=Vc(),{shippingAddress:a}=e.parts;return n(()=>{const e=t.value?.purchasingCompany,n=!!e?.location.shippingAddress&&zn(a.value,e.location.shippingAddress);return r.value&&!n})}function LD(){const{i18n:e,shop:t,checkout:r}=oe(),{allViolations:a,paymentLines:i,paymentMethods:o}=r.negotiator.current.fields,s=Vc(),l=r.configuration.layout.isOnePage.value,c=tc();return n(()=>{const{currentPage:n}=c.value,r=o.value?.some(e=>"deferred"===e.type)&&i.value?.lines?.some(e=>"deferred"===e.method.type);if(!(l&&r||!l&&!s.value||"payment"===n?.id))return null;const u=a.value?.filter(e=>Bo(e.code))||[];return 0===u.length?null:{violations:u,noticeType:Dy.PaymentsViolations,noticeTitle:e.translate("notice_banner.violations_title",{violation:e.translate("notice_banner.individual_violations_title",{scope:Dy.PaymentsViolations})}),noticeHeader:e.translate("notice_banner.all_violations_content",{emailLink:d("a",{href:`mailto:${t.contactEmail}`,children:e.translate("notice_banner.all_violations_email_link")})})}})}function RD(){const{client:e,router:t}=oe(),n=e.unstable_getSerialization("amazonQueryParams"),a=rn().inMemoryAmazonPayParts.serializedAmazonParams,i=a.value,{searchParams:o}=t.currentUrl.value;return r(()=>{const e=function(){if(o&&"function"==typeof o.entries){const e=o.entries();if(e&&"function"==typeof e[Symbol.iterator])return Object.fromEntries(e)}return{}}();let t=i;null===i&&n&&(a.value=n,t=n);const r={...t,...e};return Object.fromEntries(es.map(e=>[e,r[e]]))},[o,i,n,a])}function MD(){const{router:e}=oe();return{searchParams:RD(),isThankYouPage:e.currentUrlMatches("/thank-you")}}function ND(){const{checkout:{negotiator:e}}=oe(),{paymentMethods:t}=e.current.fields,{paymentLines:r}=e.parts,{searchParams:a,isThankYouPage:o}=MD(),s=I(a),l=I(o),c=i(!1),u=i(!1);return n(()=>{const e=s.value,n=r.value,a=t.value,i=e.wallet===mn.BuyWithPrime&&!e.amazon_cancelled,[o]=Qt(n,[mn.BuyWithPrime]),d=Boolean(o);return i&&(c.current=!0),d&&(u.current=!0),!u.current||d||i||(c.current=!1,u.current=!1),ts({paymentLines:n,paymentMethods:a,urlParams:{wallet:c.current?mn.BuyWithPrime:null,amazon_cancelled:null},isThankYouPage:l.value})})}function DD(){const{checkout:e}=oe(),{paymentLines:t}=e.negotiator.parts,r="shopPay"===e.identity.current.value;return n(()=>ns({paymentLines:t.value,isOnePage:e.configuration.layout.isOnePage.value,isShopPayActive:r}))}function zD(){const e=function(){const{i18n:e,url:t,checkout:{negotiator:r}}=oe(),a=r.current.fields.allViolations;return n(()=>{const n=a.value?.filter(e=>$o.has(e.code))??[];if(!n.length)return null;const r=d(y,{children:e.translate("notice_banner.return_to_cart_to_update_quantities",{return_to_cart_link_text:d(Af,{tone:"monochrome",href:t.cart(),children:e.translate("notice_banner.return_to_cart_link_text")})})}),[i]=n;return 1===n.length&&i?{code:i.code,localizedTitle:i.localizedMessage||i.nonLocalizedMessage,localizedMessage:r,collapsible:!1,tone:"critical"}:{code:Dy.MerchandiseQuantityRulesNotMet,localizedTitle:e.translate("general.errors.merchandise.quantity_rules_not_met"),localizedMessage:r,collapsible:!1,tone:"critical"}})}(),a=kD(),o=function(){const{checkout:e,i18n:t}=oe(),{lastJourneyProgression:r}=e.negotiator,a=ND(),{inMemoryAmazonPayParts:{buyerDetails:i}}=rn();return n(()=>{const n=e.latestReceipt.value,o="failed"===n?.status&&"payment"===n.failure?.type&&"PRE_CHARGE_ERROR"===n.failure.code&&"success"!==r.value.type&&(e.configuration.layout.isOnePage.value||a.value);return o||i.value.error?{code:o?Dy.PaymentsViolations:Dy.OtherViolations,localizedMessage:t.translate("wallets.errors.generic",{walletName:t.translate("brand.amazon_pay")}),tone:"critical"}:null})}(),s=function(){const{i18n:e,checkout:{negotiator:t}}=oe(),r=t.current.fields.merchandiseLines;return n(()=>r.value?.sellingPlanMismatch?{code:Dy.SellingPlanDigest,localizedMessage:e.translate("notice_banner.subscription_changed"),status:"warning"}:void 0)}(),l=cD(),c=function(){const{i18n:e,checkout:{negotiator:t}}=oe(),{taxes:r,merchandiseLines:a}=t.current.fields,o=i("unset"),s=i(),l=tc();return n(()=>{const t=r.value,n=a.value?.priceMismatch,i="information"===l.value.currentPage?.id,c="pending"===t?.status?void 0:t?.status;return"unset"===o.current&&c&&(o.current=c),n&&"unset"!==o.current&&c&&o.current!==c?(s.current={code:Dy.TaxExemption,localizedMessage:e.translate("change_country.cart_updated_based_on_country")},o.current=c):n&&!i||(s.current=void 0),s.current})}(),u=function(){const{checkout:{negotiator:e,configuration:t}}=oe(),{buyerIdentity:r}=e.current.fields,{isOnePage:a}=t.layout,i=function(){const{i18n:e,shop:t,checkout:{negotiator:r}}=oe(),a=r.current.fields.allViolations;return n(()=>0===(a.value?.filter(e=>hi.has(e.code))||[]).length?null:{code:Dy.ContactInformationViolations,localizedTitle:e.translate("notice_banner.contact_information.title"),tone:"critical",localizedMessage:e.translate("notice_banner.contact_information.header",{emailLink:d(Af,{href:`mailto:${t.contactEmail}`,children:e.translate("notice_banner.contact_information.email_link")})})})}(),o=function(){const{i18n:e,router:t}=oe(),r=m(!1);return n(()=>{const n="true"===t.currentUrl.value.searchParams.get("company_location_changed");return r.value||!n?null:{code:Dy.CompanyLocationChanged,localizedMessage:e.translate("notice_banner.company_location_changed"),onDismiss:()=>{r.value=!0}}})}(),s=function(){const{i18n:e,shop:t,checkout:r}=oe(),a=m(!1),i=x_(),o=Vc();return n(()=>a.value||!i.value||o.value||r.configuration.layout.isOnePage.value||!r.isShippingRequired.value?null:{code:Dy.ShippingAddressIsMissing,localizedTitle:e.translate("thank_you.missing_shipping_address_banner.title"),localizedMessage:d(qA,{children:e.translate("thank_you.missing_shipping_address_banner.text_html",{contact_us:d(Af,{href:`mailto:${t.contactEmail}`,children:e.translate("thank_you.missing_shipping_address_banner.contact_us")})})}),status:"info",onDismiss:()=>{a.value=!0}})}(),l=function(){const{i18n:e,shop:t,checkout:{configuration:r,validation:a}}=oe(),i=Vc(),o=TD(),s=r.layout.isOnePage;return n(()=>{const n=a.errors.value.deliveryAddressErrors,[r]=n;if(s.value||o.value||!r)return null;const l=i.value?d(kf,{children:e.translate("notice_banner.delivery_address_validation_errors_banner.use_different_address")}):d(kf,{children:e.translate("notice_banner.delivery_address_validation_errors_banner.text_html",{contact_us:d(Af,{href:`mailto:${t.contactEmail}`,tone:"monochrome",children:e.translate("notice_banner.delivery_address_validation_errors_banner.contact_us")})})}),c=1===n.length;return{code:Dy.DeliveryAddressValidationErrors,tone:"critical",localizedTitle:c?r.message:e.translate("notice_banner.delivery_address_validation_errors_banner.title"),localizedMessage:c?l:d(y,{children:[d(AD,{children:n.map(e=>d(xD,{children:d(kf,{children:e.messageNode??e.message})},`${e.target}${e.message}`))}),l]})}})}(),c=(()=>{const e=m(!1),{checkout:{negotiator:t}}=oe(),{allViolations:r}=t.current.fields;return n(()=>{const t=r.value?.filter(e=>wD.has(e.code))||[],n=t.length>0?t[0]:null;return e.value||!n?null:{code:Dy.TipsViolations,localizedMessage:n.localizedMessage||n.nonLocalizedMessage,status:"warning",onDismiss:()=>e.value=!0}})})(),u=ON(),p=(()=>{const{i18n:e,checkout:{negotiator:t}}=oe(),r=t.current.fields.allViolations;return n(()=>0===(r.value?.filter(e=>CD.has(e.code))||[]).length?null:{code:Dy.PaymentsViolations,localizedMessage:e.translate("payment_errors.available_methods_updated")})})(),h=LD(),g=function(){const{i18n:e,shop:t,checkout:r}=oe(),{allViolations:a}=r.negotiator.current.fields,i=Vc(),{paymentLines:o}=r.negotiator.parts;return n(()=>{if(Boolean(Tt(o.value,"APPLE_PAY"))&&!r.isShippingRequired.value)return null;if(i.value)return null;const n=a.value?.filter(e=>ya.has(e.code))||[];return 0===n.length?null:{violations:n,noticeType:Dy.DeliveryViolations,noticeTitle:e.translate("notice_banner.violations_title",{violation:e.translate("notice_banner.individual_violations_title",{scope:Dy.DeliveryViolations})}),noticeHeader:e.translate("notice_banner.all_violations_content",{emailLink:d("a",{href:`mailto:${t.contactEmail}`,children:e.translate("notice_banner.all_violations_email_link")})})}})}(),f=function(){const{i18n:e,shop:t,observability:r,checkout:{negotiator:a}}=oe(),{buyerIdentity:i,allViolations:o}=a.current.fields;return n(()=>{if(!i.value?.purchasingCompany)return null;const n=(o.value||[]).filter(e=>!ED.includes(e.code));for(const e of n)r.counter({name:"b2b_unhandled_violations",value:1,attributes:{violation:e.code}});return 0===n.length?null:{violations:n,noticeType:Dy.OtherViolations,noticeTitle:e.translate("notice_banner.violations_title",{violation:e.translate("notice_banner.individual_violations_title",{scope:Dy.OtherViolations})}),noticeHeader:e.translate("notice_banner.all_violations_content",{emailLink:d("a",{href:`mailto:${t.contactEmail}`,children:e.translate("notice_banner.all_violations_email_link")})})}})}(),v=tc(),{shippingAddress:_}=e.parts;return n(()=>{const t=r.value?.purchasingCompany,{currentDetour:n}=v.value,d=n?.type&&SD.includes(n.type);if(!t||d||e.context.noAddressLocationModalShownSignal.value)return[];const m=t.location.shippingAddress||{},y=zn(_.value,m),b=!a.value;return[...h.value?[zN(h.value)]:[],...g.value?[zN(g.value)]:[],...f.value?[zN(f.value)]:[],...i.value?[i.value]:[],...o.value?[o.value]:[],...s.value?[s.value]:[],...l.value?[l.value]:[],...c.value?[c.value]:[],...u.value&&b&&y?[u.value]:[],...p.value&&b?[p.value]:[]]})}(),p=function(){const{checkout:{negotiator:e}}=oe(),{allViolations:a}=e.current.fields,{lastJourneyProgression:i}=e,o=function(){const{client:e,i18n:n}=oe(),a=e.unstable_getSerialization("logoutUrl")||"",i=r(()=>function(e,t){return{PAYMENTS_WALLET_PAYPAL_EXPRESS_ADDRESS_INVALID:e.translate("wallets.errors.terminal",{walletName:e.translate("brand.paypal")}),PROPOSAL_SESSION_IDENTIFIER_NOT_UNIQUE:e.translate("session_errors.session_not_unique"),PROPOSAL_SESSION_ALREADY_FINISHED:e.translate("session_errors.session_already_finished"),DISCOUNTS_CURRENTLY_INACTIVE:e.translate("discount_errors.generic_error"),DISCOUNTS_NO_ENTITLED_LINE_ITEMS:e.translate("discount_errors.generic_error"),DISCOUNTS_USAGE_LIMIT_REACHED:e.translate("discount_errors.generic_error"),DISCOUNTS_CUSTOMER_NOT_ELIGIBLE:e.translate("discount_errors.generic_error"),DISCOUNTS_CUSTOMER_USAGE_LIMIT_REACHED:e.translate("discount_errors.generic_error"),BUYER_IDENTITY_COMPANY_PURCHASE_PERMISSION_REQUIRED:e.translate("b2b_errors.lost_b2b_purchasing_permissions",{logout_url:d(Af,{href:t,children:e.translate("b2b_errors.log_out_link_text")})}),BUYER_IDENTITY_LOST_ACCESS_TO_COMPANY:e.translate("b2b_errors.lost_b2b_purchasing_permissions",{logout_url:d(Af,{href:t,children:e.translate("b2b_errors.log_out_link_text")})}),ARTIFACT_DISSATISFACTION:e.translate("artifact_errors.artifact_dissatisfaction_without_violation"),BUYER_IDENTITY_PRESENTMENT_CURRENCY_DOES_NOT_MATCH:e.translate("general.errors.buyer_identity.buyer_identity_presentment_currency_does_not_match"),[ls]:e.translate("remote.errors.currency_mismatch_removal")}}(n,a),[n,a]);return t((e,t)=>{const n=i[e.code];return{...e,localizedMessageHtml:n??e.localizedMessageHtml,localizedMessage:n??e.localizedMessage,tone:t}},[i])}(),s=DD();return n(()=>{const t=e.current.fields.paymentLines?.value?.lines,n=Boolean(Tt(t,"APPLE_PAY")),r=("success"===i.value.type||"error"===i.value.type)&&"completion"===i.value.negotiationStage,l=[],c=[];for(const e of a.value||[])"ConfirmChangeViolation"!==e.__typename&&"UnprocessableTermViolation"!==e.__typename&&"RemoveTermViolation"!==e.__typename&&"ArtifactDissatisfactionViolation"!==e.__typename||(rs.has(e.code)&&l.push(o(e,"info")),as.has(e.code)&&c.push(o(e,"warning")),is.has(e.code)&&r&&l.push(o(e,"critical")),os.has(e.code)&&l.push(o(e,"critical")),n&&!s.value&&ss.has(e.code)&&l.push(o(e,"critical")));const u=l.length>=1?l.map(e=>e.priority??0).reduce((e,t)=>e>t?e:t):0,d=l.length>=1?l.filter(e=>(e.priority??0)>=u):l;return c.concat(d)})}(),h=function(){const{source:e,checkout:{negotiator:t}}=oe(),{paymentLines:r,buyerIdentity:a}=t.current.fields,i=LD(),o="draftOrder"===e.type;return n(()=>o&&!a.value?.purchasingCompany&&r.value?.lines?.some(e=>"deferred"===e.method.type)?i.value:null)}(),g=function(){const{i18n:e,checkout:{negotiator:t}}=oe(),r=t.current.fields.allViolations,a=tc(),i=m(void 0);return rc(e=>{"complete"!==e.type&&"invalid"!==e.type&&"failed"!==e.type&&(i.value=e.negotiationStage)}),n(()=>{const t=r.value?.filter(({code:e})=>"DELIVERY_DELIVERY_LINE_DETAIL_CHANGED"===e),[n]=t??[];if(!n)return;const o="payment"===a.value.currentPage?.id;return"completion"===i.value||"negotiation"===i.value&&o?{...n,tone:"critical",localizedMessage:e.translate("payment.shipping_rate_updated"),localizedMessageHtml:e.translate("payment.shipping_rate_updated"),priority:1}:void 0})}(),{checkout:{configuration:f,negotiator:v}}=oe(),{isOnePage:_}=f.layout,{allViolations:b}=v.current.fields,k=bD();return n(()=>{const t=yy(b.value??[]),n=l.value.banner,r=h.value;return[...p.value,...r?[zN(r)]:[],...c.value?[c.value]:[],...s.value?[s.value]:[],...e.value?[e.value]:[],...a.value?[a.value]:[],...o.value?[o.value]:[],...u.value,...n&&!t?[n]:[],...k.value?[k.value]:[],...g.value&&!_.value?[g.value]:[]].filter(cs("localizedMessage"))})}function OD(e,t){const n=e.peek()||{};Object.entries(t).some(([e,t])=>n[e]!==t)&&(e.value={...n,...t})}function BD(){const e=pD(mn.AmazonPay),n=pD(mn.BuyWithPrime),{hasError:r}=Cy(Vo),{checkout:a}=oe(),i=a.latestReceipt.value,o=i?.id,{persistedAmazonSignal:s}=rn();return{hasError:Boolean(r&&(e.value||n.value))&&o!==s.value?.receiptIdForPaymentDecline,clearError:t(()=>OD(s,{receiptIdForPaymentDecline:o}),[s,o])}}function FD(){const{checkout:e}=oe(),n=e.latestReceipt.value,{persistedApplePaySignal:i,inMemoryApplePayParts:{paymentSheetError:o}}=rn(),s=m(!1),l=m(!1),c=i.value,u=DD(),d=t(()=>{s.value=!0,l.value=!1},[s,l]),p=s.value,h=l.value;rc(e=>{if("error"===e.type&&"completion"===e.negotiationStage){const t=e.violations.some(e=>"PAYMENTS_APPLE_PAY_SESSION_EXPIRED"===e.code);l.value=t}});const g=r(()=>!(!u.value||!h&&(!n||p||"failed"!==n.status||"payment"!==n.failure.type||c?.receiptIdForPaymentFailure!==n.id)),[n,u.value,c,p,h]);return a(()=>{g&&(o.value=void 0)},[g,o]),{hasError:g,clearError:d}}function VD(e,t,n,r){if("failed"!==e?.status)return!1;const a="draftOrder"===n&&"payment"===e.failure.type&&!0!==e.failure.hasOffsitePaymentMethod&&r===e.id;return t===e.id||a}function UD(){const[e,t]=Ig(St.LastSeenErrorReceiptId),n=at(),{checkout:r,client:i,source:o}=oe(),l=r.latestReceipt.value,c=i.unstable_getSerialization("receipt")?.latestReceipt,u="FailedReceipt"===c?.__typename?c.id:void 0,[d,p]=s(()=>!n.peek()||VD(l,e,o.type,u));return a(()=>{const n=VD(l,e,o.type,u);p(n),"failed"===l?.status&&e!==l.id&&t(l.id),"failed"!==l?.status&&t(void 0)},[l?.id,l?.status]),d}function qD(e){return e.some(({code:e})=>oD.has(e))}function jD(e,t){if(!e)return null;const n="code"in t?t.code:void 0,r="ids"in t?t.ids:void 0,a=e.filter(e=>n?!$D(e,n):!r||!r.includes(e.id));return a.length>0?a:null}const HD=(e,t)=>e.toUpperCase()===t.toUpperCase(),$D=({discountLine:e},t)=>Boolean(t&&HD(e.discount.title,t));function YD({inputRef:e,headingId:l,monorailSection:c}={}){const{checkout:u,i18n:d,userEvents:p,shop:h,shopPay:g,source:f}=oe(),{discountCodeWarningSignal:y,reductionsErrorsSignal:v,reductionsValueSignal:_,derivedErrorMessageSignal:b,refreshNegotiationSignal:k,currentDiscountCodeAttemptSignal:P}=u.negotiator.context,{negotiate:w}=nc(),C=m(_.peek()),[E,x]=s(_.peek().length>0),I=y.value,{discountLines:A,paymentLines:T,reduction:L}=u.negotiator.parts,R=u.negotiator,M="shopPay"===u.identity.current.value,N=A.value,[D,z]=s([]),O=function(){const{i18n:e,checkout:{negotiator:n}}=oe(),{voidedGiftCardsSignal:a}=n.context,i=a.peek(),o=r(()=>new Set([...Jo,"REDUCTION_GIFT_CARD_ALREADY_APPLIED"]),[]),s=r(()=>({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:(i[0]??"").slice(-4).toUpperCase()})}),[i,e]);return t(e=>e.reduce((e,t)=>o.has(t.code)?(e.push(s[t.code]()),e):e,[]),[s,o])}(),B=tf(),F=tc(),V=n(()=>F.value.currentPage?.id),U=m(0),q=n(()=>U.value>0),j=r(()=>N?.reduce((e,t)=>(t.message&&!D.includes(t.discount.title)&&e.push({id:Wl(),discountCode:t.discount.title,message:t.message??"",discountLine:t,tone:"info"}),e),[]),[N,D]),H=i(V.peek());a(()=>V.subscribe(e=>{H.current!==e&&(H.current=e,v.peek().length>0&&(v.value=[]))}),[V,v]);const $=t(e=>{const t=y.value??[];y.value=jD(t,{ids:e}),B()},[B,y]),Y=t(e=>{const t=j.filter(({id:t})=>e.includes(t)).map(({discountCode:e})=>e);z(e=>[...e,...t]),B()},[j,B]),W=t(e=>{_.value=e,e&&(C.value=e)},[_,C]),G=t(({clearWarnings:e=!0,preserveValue:t=!1}={})=>{t||(W(""),x(!1),P.value=null),e&&(y.value=null)},[P,y,W]),K=t(()=>{l&&document.getElementById(l)?.focus()},[l]),J=t(e=>{W(e?.trim()),v.value.length>0&&(v.value=[])},[W,v]),Q=t(()=>{v.value.length>0&&(v.value=[])},[v]),X=t((e,t)=>{const n=[],r=[],a=y.value??[],i=P.value;for(const o of e){const e=ll===o.code;switch(o.type){case"InputValidationError":case"UnprocessableTermViolation":if(nD.has(o.code)){n.push(o);break}"negotiation"!==t&&Jo.has(o.code)&&n.push(o);break;case"RemoveTermViolation":case"ConfirmChangeViolation":{const a="ConfirmChangeViolation"===o.type,s=Nl(o.targetEntity),l=Boolean(i&&s&&HD(s.title,i));if(cl.has(o.code)&&"completion"!==t&&!l)break;if(nD.has(o.code)){n.push(o);break}if("discountCodeTrigger"!==s?.discount.type||!sl.has(o.code))break;const c=iD.has(o.code),u={message:o.localizedMessage??o.nonLocalizedMessage,messageHtml:o.localizedMessageHtml,discountLine:s,tone:c?"info":"warning",discountCode:s.discount.title,id:Wl(),errorCode:o.code,isConfirmChangeViolation:a};if(e){r.push(u);break}i&&!l||r.push(u);break}}}return v.value=n.slice(-1),i||r.unshift(...a.filter(e=>e.errorCode===ll)),y.value=r.length>0?r:null,{hasWarnings:r.length>0,hasPreserveInputErrors:e.some(e=>nD.has(e.code))}},[P,y,v]),Z=t(async()=>{await w({silenceViolations:[...Vn],onComplete:e=>{u.unstable_overwriteLatestReceipt(void 0),k.value=!1,"success"!==e.status&&"error"!==e.status||X(e.errors)}})},[X,w,u,k]);S(()=>{const e=u.latestReceipt.value;!k.peek()&&e&&ly(e)&&"discount"===e.failure?.type&&(k.value=!0,o(()=>{Z()}))}),rc(t(e=>{"errors"in e&&X(e.errors,e.negotiationStage)},[X])),S(()=>{const e=R.lastJourneyProgression.value;"error"===e.type&&"completion"===e.negotiationStage&&o(()=>X(e.errors,"completion"))}),ps(({parts:e,reason:t})=>{const n=y.peek()??[],r=P.peek(),a=r&&n.every(e=>!$D(e,r));if(0===n.length)return{behavior:"allow"};if("completion"===t||a)return y.value=null,{behavior:"allow"};if("progression"!==t&&"negotiation"!==t)return{behavior:"allow"};const i=e.discountLines.peek(),o=((e,t,n)=>{const r=t.reduce((t,r)=>{if(r.errorCode===ll||((e,t)=>t.some(t=>("discountCodeTrigger"===t.discount.type||"code"===t.discount.type)&&$D(e,t.discount.title)))(r,e))return t;const a=$D(r,n);return!n||a?t.set(r.discountCode.toUpperCase(),r):t},new Map);return[...r.values()]})(i,n,r);return o.length>0&&(e.discountLines.value=[...i,...o.map(({discountLine:e})=>e)]),{behavior:"allow"}});const ee=t(e=>(e||T.value).filter(e=>"giftCard"===e.method.type&&"code"in e.method).map(e=>e.method.code),[T]),te=t(()=>A.value.filter(e=>"code"===e.discount.type).map(e=>e.discount.title),[A]),ne=t(async()=>{U.value+=1;try{const t=_.value,n=JSON.parse(JSON.stringify(T.value));P.value=t,e?.current?.blur(),K();const r=te(),a=new Set(A.value.filter(e=>"code"===e.discount.type&&e.discount.codeHidden).map(e=>e.discount.title));await w({silenceViolations:qe(["deliveryNext"]),fieldsToResolve:[...tD],loading:["deliveryNext","discountLines"],customizeNegotiation:e=>({...e,reduction:{code:t}}),onComplete:e=>{if("success"===e.status||"error"===e.status){const{hasWarnings:i,hasPreserveInputErrors:o}=X(e.errors);G({clearWarnings:!i,preserveValue:o});const s=qD(e.errors);if(s&&e.errors.some(e=>iD.has(e.code))){const e=te(),n=r.filter(t=>!e.includes(t)),[i]=n;void 0!==i&&(1===n.length&&a.has(i)?(ju({content:d.translate("order_summary.discount_has_been_removed")}),ju({content:d.translate("order_summary.discount_code_applied_with_code",{code:t})})):ju({content:n.length>1?d.translate("order_summary.discount_code_replaced_multiple",{code:t}):d.translate("order_summary.discount_code_replaced",{old_code:i,code:t})}))}const l=e.negotiated.paymentLines?.lines||[],m=function(e,t){const n=new Set(e);return t.some(e=>!n.has(e))}(ee(n),ee(l)),g=n.reduce((e,t)=>("giftCard"===t.method.type&&null!=t.cost&&t.cost.amount>0&&(e[vo(t.method)]=!0),e),{}),y=l.some(e=>"giftCard"===e.method.type&&null!=e.cost&&e.cost.amount>0&&void 0===g[vo(e.method)]);if(!s){if(m||y){const e=T.peek();T.value=[...e.filter(e=>!ms(e)),...l.filter(ms)]}const{runningTotal:r,merchandiseLines:a}=e.negotiated,i=r&&r.amount<=0;Boolean(!i||hs(a?.lines))||n.some(e=>"walletsPlatformPaymentMethod"===e.method.type&&e.method.name===mn.BuyWithPrime)||function(e,t){const n=ds(t);e.value=n}(T,m||y?l:n);const o=d.translate("order_summary.discount_code_applied_with_code",{code:t});ju({content:m||y?d.translate("order_summary.gift_card_applied"):o}),W(""),x(!1)}const v=e.errors.find(e=>oD.has(e.code)),_=()=>{if(!s)return m?"gift_card":"discount_code"};p.monorailEvent({schemaId:"checkout_reduction_attempted/2.0",payload:{shopId:parseInt(ue(h.id),10),checkoutToken:f.checkoutSessionIdentifier??"checkout_identifier_undefined",event:s?"apply_reduction_failure":"apply_reduction_success",reductionType:_(),errorMessage:v?.nonLocalizedMessage,page:"checkout",section:c}}),M&&(s?p.monorailEvent({schemaId:"shopify_pay_payment_page_ui_interaction/1.2",payload:{...Qr(f,u,h),action:"add_discount_failure"}}):p.monorailEvent({schemaId:"shopify_pay_payment_page_ui_interaction/1.2",payload:{...Qr(f,u,h),action:m?"add_gift_card":"add_discount_success"}}))}},force:!0})}finally{U.value-=1}B()},[U,G,P,B,K,ee,X,e,M,w,A,T,W,d,_,p,f,u,h,c,te]),re=t(async e=>{const t=A.value,n=te(),r=t.some(t=>"code"===t.discount.type&&t.discount.title===e&&t.discount.codeHidden);if(1===t.length&&K(),$i(g)){const t=g.discountCodes.value.filter(t=>t!==e);g.updateDiscountCodes(t)}A.value=t.filter(t=>"code"!==t.discount.type||t.discount.title!==e),y.value=jD(y.value,{code:e}),z(t=>t.filter(t=>t!==e));const a=L.value;a?.code===e&&(L.value=void 0),M&&p.monorailEvent({schemaId:"shopify_pay_payment_page_ui_interaction/1.2",payload:{...Qr(f,u,h),action:"remove_discount"}}),await w({silenceViolations:qe(["deliveryNext"]),fieldsToResolve:[...tD],loading:["discountLines","deliveryNext"],force:!0,onComplete:t=>{"success"!==t.status&&"error"!==t.status||X(t.errors),ju({content:r?d.translate("order_summary.discount_has_been_removed"):d.translate("order_summary.discount_code_removed",{code:e}),role:"status"});const a=te().filter(e=>!n.includes(e)),[i]=a;void 0!==i&&ju({content:A.value.some(e=>"code"===e.discount.type&&e.discount.title===i&&e.discount.codeHidden)?d.translate("order_summary.discount_has_been_applied"):d.translate("order_summary.discount_code_applied_with_code",{code:i}),role:"status"})}}),B()},[g,A,L,M,w,B,K,p,f,u,h,X,y,te,d]),ae=t(async e=>{const t=T.value;T.value=t.filter(t=>"giftCard"!==t.method.type||!("code"in t.method)||t.method.code!==e),1===T.value.length&&K(),M&&p.monorailEvent({schemaId:"shopify_pay_payment_page_ui_interaction/1.2",payload:{...Qr(f,u,h),action:"remove_gift_card"}}),await w({silenceViolations:qe(["paymentLines"])}),B()},[T,M,w,B,p,f,u,h,K]),ie=_.value,se=v.value,le=r(()=>({value:ie,valueSignal:C,onChange:J,onInput:Q,error:gs(se),errorSignal:b}),[b,C,J,Q,se,ie]),ce=r(()=>O(se),[O,se]);return{loading:q.value,handleSubmit:ne,handleNegotiationErrors:X,dirty:E,setDirty:x,removeDiscount:re,getGiftCards:ee,removeGiftCard:ae,reductionCodeField:le,discountCodeWarning:I,discountMessages:j,removeDiscountCodeWarnings:$,removeDiscountCodeMessage:Y,giftCardBannerErrors:ce}}function WD(){const{negotiate:e}=nc(),{inMemoryApplePayParts:{asPaymentMethod:n}}=rn(),{shop:r,shopPay:a,checkout:{wallets:i,negotiator:o}}=oe(),{email:s,phone:l,billingAddress:c,paymentLines:u}=o.parts,{value:d}=o.current.fields.buyerIdentity,p=Boolean("CustomerProfile"===d?.customerProfile?.__typename),m=d?.purchasingCompany,h=Jy(),g=Eb(),f=fs({availableDeliveryAddresses:o.current.fields.availableDeliveryAddresses?.value,mustSelectProvidedAddress:o.current.fields.mustSelectProvidedAddress?.value}),y=t(()=>{const e={shouldResetBuyerInfo:!1,shouldRemoveWalletContent:!1,shouldRemoveBillingAddress:!1,forceClearLocalPickupFields:!1},t=n.value;return i.activeSession.value?{...e}:p?{...e,shouldRemoveWalletContent:t,shouldResetBuyerInfo:!t,shouldRemoveBillingAddress:!0}:t?{...e,shouldRemoveWalletContent:!0,shouldRemoveBillingAddress:!m}:h.value?{...e,shouldRemoveBillingAddress:!0,forceClearLocalPickupFields:!0}:{...e,shouldResetBuyerInfo:!0}},[i,p,n,h,m]),v=t(()=>{if(r.hasFlagEnabled(ys)&&n.value)return vs(a.session.selectedPaymentMethod.value)?.billingAddress?.address},[n,r,a]),_=Dk(),b=Nk();return t(async({shouldPersist:t=!0}={})=>{const{shouldResetBuyerInfo:r,shouldRemoveWalletContent:a,shouldRemoveBillingAddress:o,forceClearLocalPickupFields:d}=y();a&&(u.value=hn(u.value,{method:{type:"wallet",name:"APPLE_PAY"}})),b.value||_({shouldResetCustomerInfo:r,shouldRemovePaymentLine:!n.value,isConstrainedAddress:f}),d&&(s.value="",l.value=""),o&&(c.value=g("billing")??v()??Ol(c.value)),t&&!i.activeSession.value&&await e({silenceViolations:["non-stock"]})},[_,i,u,s,l,c,e,y,n,b,g,v,f])}function GD({shouldPersist:e}){const n=WD(),{walletUsedForSubmissionSignal:r,persistedApplePaySignal:a,inMemoryApplePayParts:{paymentSheetError:i,subscriptionReviewTransition:o}}=rn();return t(()=>{i.value=void 0,o.value=void 0,r.value=void 0,a.value={},n({shouldPersist:e})},[i,o,r,a,n,e])}function KD(){const e=GD({shouldPersist:!1}),{clearError:n,hasError:r}=FD(),{checkout:a,router:i}=oe(),{clearForcedCheckoutLayout:o}=$y(an);return zk({onClick:t(()=>{e(),o({wallet:"APPLE_PAY"}),a.unstable_evaluateSupportsSplitShipping(i.currentUrl.value),r&&n()},[e,a,o,i,n,r]),shouldResetCustomerInfo:!1,shouldRemovePaymentLine:!1,skipRedirect:!0})}function JD(){const{i18n:e}=oe(),{onClick:t}=KD(),n=e.translate("wallets.errors.processing_error_checkout_as_guest",{checkout_as_guest_link:d(Af,{onClick:t,children:e.translate("account_management.checkout_as_guest_link")})});return d(QN,{errorType:Ak.PaymentError,tone:"critical",children:d(Lf,{alignItems:"start",gap:"small-500",children:d(Mx,{children:n})})})}function QD(){const{inMemoryAmazonPayParts:{buyerDetails:e,buyerDetailsContentLoaded:t}}=rn(),r=sn("shippingAddress");return n(()=>t.value&&!e.value.loading&&!r.value)}function XD(e){const t=QD(),{violations:n}=ky(e),r=n.value;if(0===r.size||!t.value)return null;const a=new Set;for(const i of r)a.add(i.localizedMessage??i.nonLocalizedMessage);return Array.from(a)}function ZD({ignorePrefixes:e}={ignorePrefixes:[]}){const{i18n:t}=oe(),n=XD(new Set([..._s].filter(t=>e.every(e=>!t.startsWith(e))))),r=XD(new Set([...ya,...Ko].filter(t=>e.every(e=>!t.startsWith(e)))));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 ez(){return ZD({ignorePrefixes:["DELIVERY_PHONE_NUMBER","DELIVERY_COMPANY"]}).errors??[]}function tz(){const{i18n:e}=oe(),t=ez();return t?.length?d(QN,{tone:"critical",errorType:Ak.PaymentError,children:[e.translate("wallets.errors.select_different_shipping_address_to_resolve_errors"),d(AD,{children:t.map(e=>d(xD,{children:d(kf,{children:e})},e))})]},"amazon-pay-errors"):null}function nz(){const e=ND(),t=I(ez()),{persistedAmazonSignal:r,inMemoryAmazonPayParts:{hasPaymentSheetError:a}}=rn();return n(()=>{const n=r.value;return n?.primeError||e.value?n?.primeError?"terminal error":a.value?"payment sheet error":t.value?.length?"amazon pay error messages":null:null})}function rz(){const e=nz();return e.value?d(az,{errorMessagesType:e.value}):null}function az({errorMessagesType:e}){const{i18n:t,checkout:n}=oe(),r=n.configuration.layout.isOnePage.value,{value:i}=n.negotiator.current.fields.paymentLines,{persistedAmazonSignal:o}=rn();return function(e="unknown"){const{observability:t}=oe();a(()=>{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"})},[])}(),a(()=>{const e=i?.lines.filter(e=>!("walletsPlatformPaymentMethod"===e.method.type&&e.method.name===mn.BuyWithPrime));e?.length&&OD(o,{primeError:void 0})},[i,o]),"payment sheet error"===e||"terminal error"===e?d(QN,{errorType:Ak.PaymentError,tone:"critical",children:t.translate("wallets.errors.generic",{walletName:t.translate("brand.buy_with_prime")})},"amazon-pay-errors"):"amazon pay error messages"===e?r?null:d(tz,{}):null}function iz({errors:e,errorType:t}){return d(y,{children:e.map(e=>d(QN,{tone:"critical",errorType:t,children:e.messageNode??e.message},`${e.target}${e.message}`))})}function oz(e){if(e.startsWith("DISCOUNTS")||"ReductionViolations"===e)return Ak.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 Ak.MerchandiseError;case"PAYMENTS_SHIPPING_MUST_MATCH_BILLING":case"ShippingAddressIsMissing":case"DeliveryViolations":case"DeliveryAddressValidationErrors":return Ak.DeliveryError;case"PAYMENTS_WALLET_PAYPAL_EXPRESS_ADDRESS_INVALID":case"PAYMENT_MANUAL_PAYMENTS_NOT_ALLOWED_FOR_B2B":case"PaymentViolations":return Ak.PaymentError;default:return Ak.CheckoutError}}function sz(){const e=zD().value;return e.length>0?e.map(e=>d(XN,{notice:e,errorType:oz(e.code)},e.code)):null}function lz(){const{checkout:{validation:e}}=oe(),t=e.errors.value.globalErrors;return t.length>0?d(iz,{errors:t,errorType:Ak.CheckoutError}):null}function cz(){const{merchandiseLineTransformerErrors:e}=function(){const{checkout:{negotiator:e}}=oe(),{allViolations:t}=e.current.fields,r=sn("allViolations");return n(()=>{const e=["MERCHANDISE_LINE_TRANSFORMERS_RUN_ERROR"];return r.value||!t.value?{merchandiseLineTransformerErrors:[]}:{merchandiseLineTransformerErrors:[...t.value.reduce((t,n)=>("UnprocessableTermViolation"===n.__typename&&e.includes(n.code)&&t.push({message:n.localizedMessage||n.nonLocalizedMessage,target:n.target}),t),[])].filter(us())}})}().value;return e.length>0?d(iz,{errors:e,errorType:Ak.MerchandiseError}):null}function uz(){const{checkout:{validation:e}}=oe(),t=e.errors.value.contactErrors,n=Fx();return 0===t.length?null:n.value.contact?d(iz,{errors:t,errorType:Ak.ContactError}):null}function dz(){const e=nz();return Boolean(e.value)?d(rz,{}):null}function pz(){const{hasError:e}=BD(),t=UD();return e&&!t?d(vD,{}):null}function mz(){const{hasError:e}=FD();return e?d(JD,{}):null}function hz(){const{giftCardBannerErrors:e}=YD(),{checkout:{configuration:t,negotiator:n}}=oe(),r=t.layout.isOnePage.value,{value:a=[]}=n.current.fields.allViolations,i=r?void 0:e?.[0],o=a.find(e=>"PAYMENTS_GIFT_CARDS_UNAVAILABLE"===e.code);return o?d(QN,{errorType:Ak.DiscountError,tone:"critical",children:o.localizedMessage}):i?d(QN,{errorType:Ak.DiscountError,tone:"critical",children:i}):null}const gz=()=>{const{isAppLayout:e}=fw(),{embed:t,checkout:n}=oe(),r=n.configuration.layout.isOnePage.value,{lineItems:{priority:a="base"}}=Km(),i=[sz(),lz(),cz(),uz(),dz(),pz(),hz(),mz()].filter(Boolean);if(0===i.length||n.negotiator.context.noAddressLocationModalShownSignal.value)return null;const o=e?"none large-200 base large-200":r?"none none base none":"none",s=Boolean(t?.isFlagshipPartner)&&"high"===a;return d(Lf,{gap:"small-200",padding:`@media (inline-size >= extraSmall) ${s?"none none small-100 none":"none"}, ${o}`,children:i})},fz=A(function({section:e="top"}){return{toast:d(uD,{}),top:d(gz,{}),reductions:d(lD,{}),delivery:d(ZN,{}),payment:d(eD,{})}[e]});function yz({sectionId:e,children:t}){const{source:n}=oe(),o="simulated"===n.type,{sectionRef:s}=function(e){const{source:t,checkout:{negotiator:n}}=oe(),o="simulated"===t.type,s=i(null),{allRenderedSections:l,getRenderedSection:c}=n.context,u=c({sectionId:e}),d=u.value;return a(()=>{if(o&&s?.current){if(!d.rendered&&s?.current){u.value={rendered:!0};const t=l.value;l.value={...t,[e]:!0}}return()=>{if(d.rendered){u.value={rendered:!1};const t={...l.value};e in t&&delete t[e],l.value=t}}}},[o,s,d,e,u,l]),r(()=>({sectionRef:s}),[s])}(e);return d(y,o?{children:[d("div",{ref:s,style:{display:"none"}}),t]}:{children:t})}const vz={id:"18855ddcbbe672966b615922c0349b29db289bb4e82c4444a93b2c3bfed688bb",type:"mutation",name:"UserDiscountDelete",source:"mutation UserDiscountDelete($code:String!,$shopifyDomain:String!){userDiscountDelete(code:$code,shopifyDomain:$shopifyDomain){userErrors{field message __typename}__typename}}"};function _z({children:e}){const{formStatus:n}=function(){const{negotiate:e}=nc(),{handleNegotiationErrors:n,discountCodeWarning:r}=YD(),{shop:i,source:o,checkout:l,userEvents:c,shopPay:u}=oe(),{discountLines:d,reduction:p}=l.negotiator.parts,m=u.user.wallet.value,h=function(){const{graphql:{shopPayGraphql:e},shop:{myshopifyDomain:n}}=oe();return t(async t=>{const{data:r,error:a}=await e.mutate(vz,{variables:{code:t,shopifyDomain:n}});if(a||!r?.userDiscountDelete)return{status:"failed"};const{userDiscountDelete:i}=r;return i.userErrors.length>0?{status:"failed",errors:i.userErrors}:{status:"success"}},[e,n])}(),[g,f]=s(!1),[y,v]=s(""),_=u.user.shopAccountUuid,b=t((e,t)=>{c.monorailEvent({schemaId:"shopify_pay_login_with_shop_sdk_discount_wallet_events/2.0",payload:{...Qr(o,l,i),action:e,shopAccountUuid:t,shopPermanentDomain:i.myshopifyDomain,discountCode:y}})},[c,o,l,i,y]),k=t(async e=>{"success"===(await h(y)).status&&b("invalidated - discount had been deleted",e)},[h,b,y]),[P,S]=s(()=>d.value.length?"open":"closed"),w=t(e=>{const t=["InputValidationError","UnprocessableTermViolation","RemoveTermViolation"],n=new Set([...nD,"DISCOUNTS_CUSTOMER_USAGE_LIMIT_REACHED","DISCOUNTS_USAGE_LIMIT_REACHED",ll]);return e.some(e=>t.includes(e.type)&&n.has(e.code))},[]),C=t(e=>{const t=["InputValidationError","UnprocessableTermViolation","RemoveTermViolation"],n=["DISCOUNTS_PURCHASE_NOT_IN_RANGE","DISCOUNTS_QUANTITY_NOT_IN_RANGE","DISCOUNTS_NO_ENTITLED_LINE_ITEMS"];return e.some(e=>t.includes(e.type)&&n.includes(e.code))},[]);return a(()=>{v(m.latestDiscount?.code??""),y&&S("negotiating_app_discount")},[y,m]),a(()=>{0===d.value.length&&S(e=>"negotiating_app_discount"===e?e:r?"open":"closed")},[r,d.value.length]),a(()=>{const t=y;if(!g&&"negotiating_app_discount"===P&&t){f(!0),p.value={code:t};const a=_.value;e({onComplete:async e=>{if(f(!1),"success"===e.status||"error"===e.status){const i=e.negotiated.discountLines?.lines.some(e=>e.discount.title.toLowerCase()===t?.toLowerCase());y&&(n(e.errors),i?b("applied",a):w(e.errors)?k(a):C(e.errors)&&b("failed to apply - invalid cart",a),p.value=void 0),S(i||r?"open":"closed")}},force:!0})}},[g,n,r,e,y,P,w,b,C,k,c,p,_.value]),{discountLines:d.value,formStatus:P,setFormStatus:S,walletDiscountCode:y}}();return"negotiating_app_discount"===n?d(hf,{inlineAlignment:"center",children:d(yf,{})}):d(y,{children:e})}function bz({children:e,state:t,errors:n}){const r=$N(),o=yg(),s=i([]);return a(()=>{const e=s.current;return Object.entries(n).forEach(([n,a])=>{e.push(a.subscribe(e=>{if(!e)return;const a=r(n),i=t[n]?.value??"",s=i?Ak.InputInvalid:Ak.InputRequired,l="string"==typeof(c=e)||"number"==typeof c?c.toString():ro(c)?c.message:bs(c)?c.textValue:"";var c;o({target:a,errorType:s,value:i,message:l,timestamp:new Date})}))}),()=>{e.forEach(e=>e()),s.current=[]}},[]),e}function kz(){const{source:e,checkout:{negotiator:t}}=oe(),r=t.current.fields.canUpdateDiscountCodes;return n(()=>(r.value??!0)&&!Mn(e))}function Pz(e){const t=e.form;return t?e.hasAttribute("form")&&t.contains(e)?"ancestor":"own":"none"}function Sz(){const{checkout:{negotiator:e}}=oe(),t=e.current.fields.paymentFlexibilityPaymentTermsTemplate,r=ot(),a=e.current.fields.paymentMethods;return n(()=>(!e.current.fields.buyerIdentity.value?.purchasingCompany||!t.value&&!r.value)&&a.value?.some(e=>"giftCard"===e.type))}const wz="_1MTFx";function Cz({messages:e}){const t=e=>{return d(qA,{children:e.messageHtml?(t=e.messageHtml,null==t?null:d("span",{dangerouslySetInnerHTML:{__html:t}})):e.message});var t},[n]=e;return 1===e.length&&n?d("div",{className:wz,children:t(n)}):d(AD,{children:e.map(e=>d(xD,{children:d("div",{className:wz,children:t(e)})},e.id))})}const Ez=A(function({removeBanner:e,messages:n,grouped:a=!1}){const{i18n:i}=oe(),o=r(()=>function(e,t){return t?[...e.reduce((e,t)=>{const n=e.get(t.tone)??{tone:t.tone,linkedMessages:[]};return n.linkedMessages.push({...t}),e.set(t.tone,n)},new Map).values()]:e.map(e=>({tone:e.tone,linkedMessages:[e]}))}(n,a),[n,a]),s=t((e,t)=>{const n=e.filter(({isConfirmChangeViolation:e})=>e).length;return n===e.length?i.translate("payment.discount_codes_modified_summary",{count:t}):n>0?i.translate("payment.discount_codes_removed_or_modified_summary",{count:t}):i.translate("payment.discount_codes_removed_summary",{count:t})},[i]);return 0===n.length?null:d(Kg,{target:"cart.discountCode",children:o.map(({tone:t,linkedMessages:n})=>{if(0===n.length)return null;const r=["critical","warning"].includes(t),a=n.map(({id:e})=>e),i=[...[...n.reduce((e,t)=>e.set(t.discountCode.toLocaleUpperCase(),t),new Map).values()].reduce((e,t)=>e.set(t.message.toLocaleUpperCase(),t),new Map).values()],o=n.reduce((e,t)=>(e.add(t.discountCode.toLocaleUpperCase()),e),new Set).size,l=i.length>1,c={iconHidden:!0,onDismiss:()=>e(a),dismissible:!0,tone:t,collapsible:l,heading:l?s(i,o):void 0};return r?d(QN,{...c,errorType:Ak.DiscountError,children:d(Cz,{messages:i})},a[0]):d(UN,{...c,children:d(Cz,{messages:i})},a[0])})})});function xz({accessibilityLabel:e,children:t,graphic:n,id:r}){const a=uS(t);return d("div",{className:"_14brw1 _14brw0 _1fragempf _1fragemnm _1fragemt6 _1fragemrd _1fragem13d _1fragemzg _1fragem11x _1fragemzi",id:r,children:[d(Lf,{columnGap:"small-400",alignItems:"center",direction:"inline",children:[n&&d("span",{className:a?"_14brw2":void 0,children:d(lh,{type:n})}),a&&d("span",{className:"_14brw3",children:d(kf,{accessibilityVisibility:e?"hidden":void 0,dir:"auto",children:d(aC,{children:t})})})]}),e&&d(kf,{accessibilityVisibility:"exclusive",dir:"auto",children:e})]})}var Iz="_14gomm23 _14gomm22 _1fragemyb _1fragem11v _1fragem11z",Az="_14gomm27 _14gomm26 _1fragem6y",Tz="_14gomm25 _14gomm24 _1fragemyk";const Lz=vm(_(function({accessibilityLabel:e,children:t,disabled:n=!1,graphic:r,hidden:o=!1,href:s,id:l,removable:c=!1,removeTrackingEvent:u,onAfterHide:p,onClick:m,onMouseEnter:h,onMouseLeave:g,onFocus:f,onBlur:y,onRemove:_,"aria-describedby":b},k){const P=wd(),S=Ju(),w=i(o);a(()=>{!w.current&&o&&p?.(),w.current=o},[o,p]);const C=v("_14gomm21 _14gomm20 _1fragemeg _1fragemdw _1fragemf0 _1fragemdc _1fragem64 _1fragem13d _1fragemzg _1fragemzi",{[Iz]:n||P,[Az]:o}),E=e?S("removeItem",{label:e}):S("removeChip");return d("div",{id:l,className:C,role:"group",children:[d(Rz,{"aria-describedby":b,disabled:n,href:s,inert:P,onClick:m,onMouseEnter:h,onMouseLeave:g,onFocus:f,onBlur:y,ref:k,removable:c,children:d(xz,{accessibilityLabel:e,graphic:r,children:t})}),c&&d("button",{"aria-hidden":!!P||void 0,"aria-label":E,className:v("_14gomm2b _14gomm2a _1fragempf _1fragemnm _1fragemt6 _1fragemrd",Tz),"data-event-name":u,disabled:n,tabIndex:P?-1:void 0,type:"button",onClick:()=>n||P||"function"!=typeof _?void 0:_(),children:d(lh,{type:"x",size:"small"})})]})})),Rz=_(function({children:e,disabled:t,href:n,inert:r,removable:a,onClick:i,onMouseEnter:o,onMouseLeave:s,onFocus:l,onBlur:c,"aria-describedby":u},p){const m=zp(p),h=t??r??!1,g=h?void 0:n,f=()=>h||"function"!=typeof i?void 0:i(),y={onMouseEnter:o,onMouseLeave:s,onFocus:l,onBlur:c};return g||i||!a?g?d(Wm,{"aria-describedby":u,className:v(Tz,"_14gomm29 _14gomm28 _1fragem128"),href:g,onClick:f,ref:m,...y,children:e}):d("button",{"aria-describedby":u,"aria-hidden":!!r||void 0,className:Tz,disabled:t,onClick:f,ref:m,tabIndex:r?-1:void 0,type:"button",...y,children:e}):d("div",{className:Tz,ref:m,children:e})});function Mz({reductionTags:e,headingId:t}){const{i18n:n}=oe(),r=kz(),a=TR(),{removeDiscount:i,removeGiftCard:o}=YD({headingId:t});if(0===e.length)return null;const s=e.reduce((e,{hideLabel:t})=>e+(t?1:0),0);let l=0;return d(Lf,{direction:"inline",gap:"small-300",accessibilityRole:"unordered-list",accessibilityLabel:n.translate("order_summary.gift_card_and_discount_label"),ref:a,children:e.map((e,t)=>{e.hideLabel&&(l+=1);const a=e.hideLabel?n.translate("order_summary.discount_title"):e.code,c="giftCard"===e.originType?n.translate("order_summary.gift_card_masked",{last_characters:e.code.slice(-4)}):a;let u=c;"giftCard"===e.originType?u=n.translate("order_summary.gift_card_ending",{last_characters:e.code.slice(-4)}):e.hideLabel&&s>1&&(u=n.translate("order_summary.discount_title_with_position",{position:l}));const p="giftCard"===e.originType?"giftFill":"discount",m="giftCard"===e.originType?"remove_gift_card":"remove_discount_code",h="discountCode"!==e.originType||r.value?()=>{"discountCode"===e.originType?i(e.code):o(e.code)}:void 0,g="automatic"===e.originType?`automatic-discount-tooltip-${t}`:void 0;return d(hf,{accessibilityRole:"list-item",className:"ZWcPq",children:[d(Lz,{accessibilityLabel:u,graphic:p,id:`tag-${t}`,interestFor:g,removable:!g,onRemove:h,removeTrackingEvent:m,children:c.toUpperCase()}),g&&d(dm,{id:g,children:n.translate("order_summary.automatic_discount_tooltip")})]},`${e.originType}-${e.code}`)})})}function Nz({headerLevel:e,monorailSection:t,autoFocus:n,autoScroll:r}){return d(rf,{children:d(Kg,{target:"cart",children:d(Oz,{headerLevel:e,monorailSection:t,autoFocus:n,autoScroll:r})})})}const Dz=qc("ReductionsInput"),zz=qc("ReductionsHeading");function Oz({headerLevel:e,monorailSection:o,autoFocus:s,autoScroll:l}){const{i18n:c,shopPay:u,shop:{discountCodesEnabled:p,giftCardsEnabled:h},checkout:g}=oe(),f="shopPay"===g.identity.current.value,v=g.negotiator,_=g.configuration.layout.isOnePage.value,{reductions:{applyButtonPosition:b,discountTagsDisplay:k,automaticTagsDisplay:P,position:S,spacing:w}}=jy(),C=at(),E=Ql({base:!0,medium:!1}),x=!C.value||(E??!1),I=m(!1),A=t(()=>{I.value=!I.value},[I]),T=kz(),L=rw(),R=function(e){const{observability:n,client:r,checkout:a}=oe(),o=i(null);return{ref:t(t=>{o.current=t,e(t)},[e]),onClick:t(()=>{const e=o.current;if(!e||"shopPay"!==a.identity.current.value)return;const t={owner:Pz(e),mobile:Nt(r)},i="own"!==t.owner,s=i?{exportImmediately:!0,requiresKeepalive:!0}:{};n.counter({name:"reductions_apply_form_owner",value:1,attributes:t,...s}),i&&n.log("reductions_apply_form_owner_mismatch","reductions_apply.form_owner_mismatch",t,s)},[a,r,n])}}(r(()=>L("apply_discount"),[L])),{control:{labelPosition:M="inside"}}=Km(),{reductions:{labelPosition:N=M}}=jy(),{discountLines:D,paymentLines:z}=g.negotiator.parts,O=D.value,B=z.value.reduce((e,t)=>("giftCard"===t.method.type&&"code"in t.method&&e.push({originType:"giftCard",code:t.method.code}),e),[]),F=$i(u)&&u.discountCodes.value.length?u.discountCodes.value:null,V=F?[...new Set(F)].map(e=>{const t=O.find(t=>"code"===t.discount.type&&t.title===e),n="code"===t?.discount.type&&Boolean(t.discount.codeHidden);return{originType:"discountCode",code:e,...n?{hideLabel:!0}:{}}}):[...O.reduce((e,{discount:t,title:n})=>("code"!==t.type||e.has(n)||e.set(n,{originType:"discountCode",code:n,...t.codeHidden?{hideLabel:!0}:{}}),e),new Map).values()],U=O.reduce((e,{discount:{type:t},title:n})=>("automatic"!==t&&"custom"!==t||e.push({originType:"automatic",code:n}),e),[]),q=[..."hidden"===P?[]:U,...T.value?V:[],...B];0===q.length&&(I.value=!1);const j="always_visible"===k||"base"===k&&q.length>0&&(!x||I.value);let H=!1;"error"===v.lastJourneyProgression.value.type&&"completion"===v.lastJourneyProgression.value.negotiationStage&&(H=qD(v.lastJourneyProgression.value.errors));const $=jc(void 0,Dz),Y=jc(void 0,zz),W=af({active:H});a(()=>{l&&W.current&&W.current.scrollIntoView({behavior:"smooth"})},[l,W]);const{currentDetour:G,currentPage:K}=tc().value,J=$S("Checkout::Reductions::RenderBefore"),Q=$S("Checkout::Reductions::RenderAfter"),X=p&&T.value,Z=Sz(),ee=h&&Z.value,{loading:te,reductionCodeField:ne,dirty:re,setDirty:ae,handleSubmit:ie,discountCodeWarning:se,discountMessages:le,removeDiscountCodeWarnings:ce,removeDiscountCodeMessage:ue}=YD({inputRef:W,headingId:Y,monorailSection:o});a(()=>{const[e]=se??[];if(e){const t=e.message.trim();if(!t)return;return ju({content:t,role:"status"})}},[se]);const{label:de,title:pe,placeholder:me}=function(){const{i18n:e,shop:{discountCodesEnabled:t}}=oe(),r=kz(),a=Sz();return n(()=>{const n=t&&r.value;return a.value&&n?{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")}:a.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")}:n?{label:e.translate("order_summary.discount_label"),placeholder:e.translate("order_summary.discount_placeholder"),title:e.translate("order_summary.discount_title")}:{label:"",placeholder:"",title:""}})}().value,he=r(()=>({state:{discountCode:ne.valueSignal},errors:{discountCode:ne.errorSignal}}),[ne]);if(G&&"shopPayLogin"!==G.type||v.context.noAddressLocationModalShownSignal.value)return null;const ge=se?d(Ez,{messages:se,removeBanner:ce,grouped:!0}):null,fe=le&&le.length?d(Ez,{removeBanner:ue,messages:le}):null,ye="base"===b,ve=null!=e&&"base"===S&&"outside"===N&&pe===de,_e=!ye&&"outside"===N&&!ve,be="base"===k&&x&&q.length>0?d(hf,{colorLayer:"control",className:"OuqRS",children:d(Xm,{className:"U9F9G",onClick:A,accessibilityLabel:c.translate("order_summary.discount_code_applied_count",{count:q.length}),"data-event-name":I.value?"discount_tags_hide":"discount_tags_show",border:"base",children:d(Lf,{paddingInline:"small-300",direction:"inline",gap:"small-400",alignItems:"center",children:[d(lh,{type:"discount",tone:"monochrome"}),d("strong",{children:q.length})]})})}):null,ke=ye?d(Cf,{variant:"primary",type:"submit",loading:te,disabled:!re,accessibilityLabel:c.translate("payment.discount_button_action_label"),"data-event-name":"apply_discount",ref:R.ref,onClick:R.onClick,children:c.translate("order_summary.apply_discount_button_label")}):void 0;let Pe=ne.error;ye||(Pe=!!ne.error||void 0);const Se=d(dC,{ref:W,id:$,name:"reductions",label:de,placeholder:me,...ne,error:Pe,onInput:e=>ae(e.length>0),autoFocus:s,accessoryStart:be,accessoryEnd:ke,labelPosition:_e?void 0:N,labelAccessibilityVisibility:_e||ve?"exclusive":void 0}),we=d(hf,{children:[d(Lf,{gap:"base",children:[d(LN,{onSubmit:ie,children:ye?Se:d(y,{children:[_e&&d(y,{children:[d(oC,{variant:"outside",htmlFor:$,label:de}),d(UC,{blockSize:"small-400"})]}),d(Lf,{gap:"small-300",children:[d(nh,{gap:ks(["small400",w??"small100"]),gridTemplateColumns:"minmax(0, 1fr) minmax(auto, max-content)",gridAutoColumns:"1fr",gridTemplateRows:"minmax(auto, max-content)",gridAutoRows:"minmax(auto, max-content)",children:[Se,d(Cf,{variant:"primary",type:"submit",loading:te,disabled:!re,accessibilityLabel:c.translate("payment.discount_button_action_label"),"data-event-name":"apply_discount",ref:R.ref,onClick:R.onClick,children:_?c.translate("order_summary.apply_discount_button_label"):d(y,{children:[d(NN,{below:"medium",children:c.translate("order_summary.apply_discount_button_label")}),d(NN,{above:"small",children:d(lh,{type:"arrow-right"})})]})})]}),ne.error?d(jw,{controlID:$,children:ne.error}):null]})]})}),ge,fe]}),d(Td,{id:"reduction-tags",open:j,duration:"fast",children:d(hf,{paddingBlockStart:q.length>0?"base":void 0,children:d(Mz,{reductionTags:q,headingId:Y})})})]});return d(y,{children:[d(Td,{id:"gift-card-field",open:ee||X,duration:"fast",children:d(FT,{children:[d(CP,{id:Y,tabIndex:-1,...e?{level:e}:{visibility:"hidden"},children:pe}),e&&d(UC,{blockSize:"base"}),d(Lf,{gap:"base",children:[d(LC,{customizations:J}),d(yz,{sectionId:"reductions",children:f&&_?d(_z,{children:we}):d(bz,{...he,children:we})}),d(LC,{customizations:Q}),g.configuration.showPayButton&&X&&(_||"payment"===K?.id)&&d(DN,{targetSelector:"#checkout-pay-heading",icon:"credit-card",label:c.translate("order_summary.discount_discovery.back_to_finalize_order")})]})]})}),!ee&&!X&&d(fz,{section:"reductions"})]})}class Bz extends Error{constructor(){super(...arguments),this.name="MissingIntersectionEntryError"}}const Fz={};function Vz(e){const t=function(e){return Fz[e]||(Fz[e]=function(){const e=w(null),t=new Set,n=w(),r=w(!1),a=w();let i=[];function o(){for(const e of i)e.disconnect();if(e.value&&a.value&&null!=a.value.floatingElementBlockSize&&"undefined"!=typeof IntersectionObserver){i=[new IntersectionObserver(([e])=>{if(!e)throw new Bz("IntersectionObserver callback received no entries");n.value=e.isIntersecting},{threshold:[0,1],rootMargin:`0px 0px -${a.value.blockEndOffset??0}px 0px`}),new IntersectionObserver(([e])=>{if(!e)throw new Bz("IntersectionObserver callback received no entries");const t=e.rootBounds?.bottom;r.value=1===e.intersectionRatio||void 0!==t&&e.boundingClientRect.bottomBoolean(e.value&&a.value&&null!=n.value)),u=P(()=>{const e=Boolean(n.value),t=r.value,i=a.value?.floatingElementHiddenBelowTrigger;return i?e||t:e&&!t});return{triggerVisible:n,triggerAboveFloatingElement:r,triggerNode:e,triggerNodes:t,config:a,ready:c,floatingElementHidden:u,subscriptions:0,dispose(){s(),l();for(const e of i)e.disconnect();i=[],t.clear()}}}()),Fz[e]}(e);return a(()=>(t.subscriptions++,()=>{t.subscriptions--,0===t.subscriptions&&function(e){Fz[e]?.dispose(),delete Fz[e]}(e)}),[t,e]),t}function Uz(e){const n=Vz(e),r=i(null),a=t(e=>{const t=r.current;t&&t!==e&&n.triggerNodes.delete(t),e&&n.triggerNodes.add(e),r.current=e,n.triggerNode.value===t&&t!==e?n.triggerNode.value=e??n.triggerNodes.values().next().value??null:e&&null===n.triggerNode.value&&(n.triggerNode.value=e)},[n]);return{floatingElementHidden:n.floatingElementHidden,ready:n.ready,config:n.config,triggerNode:n.triggerNode,setTriggerNode:a}}function qz({skipWrappingSection:e=!1,hideAccessibilityTitle:t=!1,children:n}){const{ready:r}=Uz("chat"),{i18n:a,checkout:i,checkout:{configuration:{allowEmptyCart:o,layout:s}}}=oe(),l=s.isOnePage.value,c=nL(),u=i.proposal.facts.merchandiseLines??[];if(l&&!o){const e=[];for(const t of c.value.values())e.push(...t);if(e.push(...u),e.every(({quantity:e})=>0===e))return d(Mx,{textAlign:"center",children:a.translate("stock.empty_cart_label")})}return d(e?y:FT,{...!e&&{containerName:"s-shell-section"},children:[d(Lf,{gap:"large-200",children:[!t&&d(CP,{visibility:"hidden",children:a.translate("order_summary.title")}),n]}),d(x,{when:r,children:d(hf,{minBlockSize:"@media (inline-size >= medium) 72px, 0"})})]})}const jz=e=>d(FT,{children:e});function Hz({placement:e}){const{checkout:{configuration:{layout:t}}}=oe(),n=t.isOnePage.value,{currentDetour:r}=tc().value,a="thankYou"===r?.type,i=$S(a?"Checkout::ThankYou::Dynamic::Render":"Checkout::Dynamic::Render",a?"ORDER_SUMMARY3":e),o=Ql({base:!0,medium:!1}),s=at(),l=n&&(!s.value||o);if("ORDER_SUMMARY3"===e){if(a)return null}else if(l&&!a)return null;return d(LC,{customizations:i,gap:"large-200",render:jz})}function $z({skipWrappingSection:e=!1,hideMerchandiseLines:t=!1,hideAccessibilityTitle:n=!1,hideReductions:r=!1,reductionsFieldAutoFocus:a=!1,reductionsFieldAutoScroll:i=!1}){const{checkout:{configuration:{visibility:o}}}=oe(),s=o.showReductions&&!r;return d(qz,{skipWrappingSection:e,hideAccessibilityTitle:n,children:[!t&&d(xR,{}),s&&d(Nz,{monorailSection:"order_summary",autoFocus:a,autoScroll:i}),d(Hz,{placement:"ORDER_SUMMARY3"}),d(CN,{}),d(Hz,{placement:"ORDER_SUMMARY4"})]})}function Yz({children:e}){return at().value?d(y,{children:e}):null}const Wz=()=>hl(()=>import("./1d52cad1.FA5eH2Hc.js"),__vite__mapDeps([263,1,2,3,4,5,11,14,15,16,17,18])),Gz=C({displayName:"EngineOrderSummaryRegion",suspenseName:({slot:e})=>`engine-order-summary-${e}`,useError:Yh("EngineOrderSummaryRegion"),renderError:()=>d(Yz,{children:d($z,{})}),load:()=>E(Wz)});class Kz extends Error{constructor(){super(...arguments),this.name="UnknownNodeTypeError"}}function Jz(e,t){const n=e.get(t);if(!n)throw new Kz(`Unknown node type: ${function(e){const t=e.replace(/[^\w:.-]/g,"");return t.length>64?`${t.slice(0,64)}…`:t}(t)}. The registry has no component for it.`);return n}class Qz extends Error{}class Xz extends Qz{constructor(){super(...arguments),this.name="UnplaceableSlotError",this.code="unplaceable_slot"}}class Zz extends Qz{constructor(){super(...arguments),this.name="UnknownExtensionPlacementError",this.code="unknown_extension_placement"}}function eO(e){return e instanceof Qz?e.code:"unknown_node_type"}function tO({children:e}){const{observability:t,checkout:{configuration:{layout:n}}}=oe();return d(nO,{layout:n,observability:t,children:e})}class nO extends g{constructor(){super(...arguments),this.state={failed:!1},this.caught=!1}componentDidCatch(e){if("undefined"==typeof window)return;if(this.caught||!function(e){return e instanceof Qz||e instanceof Kz}(e)||e===this.letThrough)return;const{layout:t,observability:n}=this.props,r=!t.updated,a={code:eO(e),phase:r?"client-initial":"client-swapped",source:t.trees.peek()?.source};n.counter({name:"layout_render_failure",value:1,attributes:a}),r?(this.caught=!0,n.error(e,{metadata:{layoutFailure:a}}),t.update(void 0),this.setState({failed:!0})):this.letThrough=e}render(){return this.state.failed?null:this.props.children}}function rO({slot:e}){const{checkout:{configuration:t}}=oe(),r=I(e),a=n(()=>{const e=t.layout.trees.value;if(void 0===e)return;const n=r.value,a=aO(e.checkout.pages,n);return"aside"!==n||void 0!==a?.children?a:void 0});return d(x,{when:a,fallback:d($z,{}),children:t=>d(tO,{children:d(Gz,{slot:e,root:t})})})}function aO(e,t){if(!e)return;const[n,r]="disclosure"===t?["order-summary","disclosure"]:["aside","aside-primary"];for(const a of e){if(a.type===n&&a.slot===r)return a;const e=aO(a.children,t);if(e)return e}}function iO(){const e=oe();return n(()=>zv(e))}function oO(){const{checkout:e}=oe();return e.unstable_graphqlDataRequestInfo?.checkoutSheetProtocolConfig??null}function sO(){const{mobileCheckoutSdk:e,embed:t}=oe(),r=iO(),a=oO(),i=tc();return n(()=>!(r.value||e.enabled||t?.isCheckoutKit())||(e.enabled&&e.variant.isStandard()||t?.isCheckoutKit()?"thankYou"===i.value.currentDetour?.type:Boolean(a?.disclosureEnabled)))}function lO(){const{embed:e,checkout:t}=oe(),n=Boolean(e?.platformCategory&&"WEB"!==e.platformCategory),r="WEB"===e?.platformCategory&&t.configuration.payButton.stickyPayButtonEnabledInWeb,a=n&&t.configuration.payButton.stickyPayButtonEnabledInMobile;return r||a}function cO(){const{checkout:e,embed:t,shopPay:r}=oe(),{progressing:a}=nc(),i=tc(),{submitting:o}=e.negotiator;return n(()=>{if(t?.isFlagshipPartner&&o.value)return!0;if(e.isRedirectingExternally.value)return!0;if(e.checkoutExit.isExiting.value)return!0;const{currentPage:n,plan:s}=i.value,l=n&&s.greenPath[s.greenPath.length-1]?.id===n.id;let c=a.value||r.session.isButtonProgressing.value;return void 0!==n&&(c=c&&Boolean(l)),c})}function uO(e={}){const[n,r]=s(null),[a,o]=s(null),l=i(null);return{entry:n,observer:a,ref:t(t=>{if(l.current?.disconnect(),l.current=null,!window.IntersectionObserver||!t)return r(null),void o(null);const n=new IntersectionObserver(e=>{r(e[0]??null)},e);n.observe(t),l.current=n,o(n)},[e.root,e.rootMargin,e.threshold])}}function dO(){const e=pf(),{checkout:t,embed:r}=oe(),i=wT(),{payNowButtonElement:o}=Wk(),s=ar(r?.embedder),{entry:l,ref:c}=uO({threshold:.5});a(()=>(c(o??null),()=>c(null)),[o,c]);const u=I(l?.isIntersecting);return n(()=>Boolean(!s&&(t.isRedirectingExternally.value||!e.value&&!t.wallets.activeSession.value&&!i.value&&!u.value)))}function pO(e){return"available"===e.status&&e.methods.some(({methodType:e})=>"SHIPPING"===e||"LOCAL"===e)}function mO(){const e=_i();return n(()=>{const t=e.value?.filter(pO);return{shippableDeliveryLines:t?.length?t:void 0}})}function hO(e){return!!e&&("unavailable"===e.status||"partial"===e.status||"filled"===e.status&&!e.lines.some(pO))}function gO({deliveryNext:e,proposedAddress:t,negotiatedAddress:n,reloadStrategy:r}){if(!hO(e))return!1;const a=rR(r)?n??t:t;return Ai(a)}const fO={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"}};const yO=["phone","company","firstName","lastName"];function vO(e,t,n){const r=new Map;for(const[a,i]of t)if("coordinates"!==a&&"name"!==a&&"oneTimeUse"!==a&&"handle"!==a&&e.includes(a)){if(yO.includes(a)&&(!n[a]||0===n[a]?.length))continue;r.set(a,i)}return r}const _O=e=>{const t=new Map;for(const[n,r]of Object.entries(e)){const e=r.peek();bs(e)&&"error"===e.type&&t.set(n,e.textValue)}return t};function bO({children:e}){const o=Eh(),{observability:s,embed:l,events:c,checkout:{negotiator:u}}=oe(),{current:p,parts:h}=u,{deliveryMethodsAddressErrors:g,deliveryMethodTimingSignal:f,deliveryMethodDeltaSignal:y}=u.context,v=r(()=>{const e=p.fields.deliveryNext.peek();return function(e,t){return Oe((e,n)=>{const r=fO[e.status][n];if(r)return{status:r};t.leaveErrorBreadcrumb("[ShippingMethods] Invalid transition",{prevState:e.status,action:n})},{status:e})}("filled"===e?.status?"negotiated":"initial",s)},[p.fields.deliveryNext,s]),_=t(e=>{v.value=e},[v]),b=i(!1);l?.isFlagshipPartner&&!b.current&&(b.current=!0,c.addEventListener("embed:address-replace",()=>{_("addressReplaced")}));const k=i(!1);k.current||(k.current=!0,c.addEventListener("wallet:address-replace",()=>{_("addressReplaced")})),function(e,t){const{observability:n,checkout:{wallets:o,negotiator:s},checkout:l,shop:{shippingCountries:c}}=oe(),{deliveryMethodsAddressErrors:u,deliveryMethodTimingSignal:d}=s.context,{shippingAddress:p}=s.parts,h=l.configuration.isAddressDelegationEnabled,g=p.fields.countryCode.value,f=Zf(g,c),{loading:y}=Rt(g),{negotiate:v}=nc(),{setAddressError:_}=Qf(u),b=r(()=>Ps(),[]),{resetAddressSuggestions:k}=Xf(b,u),S=iy(g),w=function(e){const t=m();return bh(e,({action:e})=>{t.value=e}),t}(e),C=Th(),E=r(()=>P(()=>function(e){switch(e){case ze.Country:return["countryCode"];case ze.CountryProvince:return["countryCode","zoneCode"];case ze.CountryProvinceZip:return["countryCode","zoneCode","postalCode"];case ze.CountryProvinceZipAddress:return["countryCode","zoneCode","postalCode","address1"];case ze.Anything:return["countryCode","zoneCode","postalCode","address1","address2","city","company","firstName","lastName","phone"]}}(C({countryCode:p.fields.countryCode.value,zoneCode:p.fields.zoneCode.value}))),[C,p.fields.countryCode,p.fields.zoneCode]),x=i();a(()=>{y||(x.current?.(),x.current=void 0)},[y]);const I=Oo(()=>{const e=p.peek();if(y)return void(x.current=()=>I());const n=f(e),r=vO(E.peek(),n,e);"addressReplaced"!==w.peek()&&(0===r.size?t("addressComplete"):t("addressInvalid"))},150);Ah(p,()=>{t("countryChanged"),p.fields.postalCode.value=void 0,p.fields.zoneCode.value=void 0,p.fields.city.value=void 0,p.fields.address1.value=void 0,p.fields.address2.value=void 0,t("reset")});const A=r(()=>P(()=>E.value.filter(e=>"countryCode"!==e).map(e=>{const t=p.fields[e].value;if(t)return"postalCode"===e?t.replace(/[^a-z0-9]/gi,"").toLowerCase():t.toLowerCase()}).join("_")),[p.fields,E]);a(()=>{let t=!1;const n=e.value.status;return"initial"!==n&&"empty"!==n||I(),A.subscribe(()=>{if(t){if(o.activeSession.value||"addressReplaced"===w.value||"resetting"===e.value.status)return;I()}t=!0})},[o,I,e,w,p,A]),bh(e,({previousState:r,action:a,nextState:i})=>{if(n.leaveErrorBreadcrumb("Shipping methods state transition:",{prevState:r.status,action:a,nextState:i.status}),"initial"===i.status&&I(),"loading"===i.status&&0===d.peek()&&(d.value=Date.now()),"reset"===a){const e=p.peek();for(const t of Object.keys(e))"phone"===t&&Vt(e.phone)||_(t,void 0);k()}const o=Ss(e);if("addressComplete"===a||"reset"===a||"addressReplaced"===a||"addressInvalid"===a&&("negotiated"===r.status||h)){if(h){const e=p.peek(),n=f(e);if(n.size>0){for(const[e,t]of n)void 0===u[e].peek()&&_(e,{message:t,origin:"client",type:"inline-validation"});return t("addressInvalid"),void t("negotiationResolved")}for(const[t,r]of Object.entries(u)){const e=r.peek();e&&"object"==typeof e&&"client"===e.origin&&"inline-validation"===e.type&&_(t,void 0)}}n.leaveErrorBreadcrumb("[ShippingMethods] Negotiation started"),v({silenceViolations:["all"],fieldsToResolve:["deliveryNext"],onComplete(r){const i=o!==Ss(e);if(n.leaveErrorBreadcrumb("[ShippingMethods] Negotiation onComplete called",{result:r.status,stale:i}),!i)if("stale"!==r.status&&"invalid"!==r.status){if("reset"!==a&&r&&("success"===r.status||"error"===r.status)&&"violations"in r){const e="filled"===r.negotiated.deliveryNext?.status;if("addressReplaced"!==a){const n=_O(u);if(vO(E.peek(),n,p.peek()).size>0)return t(e?"negotiationResolved":"addressInvalid")}const n=S("shipping_address",r.violations),i="addressReplaced"===a?n:vO(E.peek(),n,p.peek());for(const[t,r]of i)void 0===u[t].peek()&&_(t,r);e||0===i.size?t("negotiationResolved"):t("addressInvalid")}}else t("negotiationResolved")}}).catch(()=>t("negotiationResolved"))}})}(v,_);const w=Th(),C=n(()=>{const e=v.value.status;if("resetting"===e)return{status:"empty"};if("loading"===e)return{status:e};const t=p.fields.deliveryNext.value,n=hO(t),r="filled"===t?.status&&!n,a=h.shippingAddress.fields.countryCode.value,i=h.shippingAddress.fields.zoneCode.value,o=w({countryCode:a,zoneCode:i}),s=rR(o),l=s?h.shippingAddress.peek():h.shippingAddress.value,c=n&&("initial"===e||"empty"===e&&!s&&0===_O(g).size);return"negotiated"===e||r||c?t?n?{status:gO({deliveryNext:t,proposedAddress:l,negotiatedAddress:p.fields.shippingAddress.peek(),reloadStrategy:o})?"error":"empty"}:"filled"===t.status&&r?{status:"filled",deliveryLines:t.lines}:{status:"error"}:{status:"empty"}:{status:e}}),E=m(C.peek());!function(e){const{shop:{asyncDeliveryPromiseExperienceEnabled:t},observability:n}=oe(),r=i(!1);S(()=>{const a=e.value;if("undefined"==typeof PerformanceMeasure||"undefined"==typeof PerformanceMark)return;let i;r.current&&("loading"===a.status?i=function(){const e=performance.now();return()=>{const r=performance.now()-e;n.histogram({name:"shipping_methods_loading_duration",value:r,attributes:{async_shop_promise:t}})}}():i&&(i(),i=void 0)),r.current=!0})}(C);const x=i();a(()=>()=>{x.current&&clearTimeout(x.current)},[]),S(()=>{const e=C.value;if(x.current&&(clearTimeout(x.current),x.current=void 0),"loading"===e.status&&(x.current=setTimeout(()=>{const e=p.fields.deliveryNext.peek(),t="filled"===e?.status&&!hO(e);s.counter({name:"shipping_methods_timeout",value:1,attributes:{deliveryNext:e?.status??"unknown",hasShippingMethods:t}})},3e4)),"filled"===e.status){const t=e.deliveryLines,n=t.flatMap(e=>"available"===e.status?e.methods:[]).find(e=>"SHIPPING"===e.methodType&&e.deliveryPromiseProviderApiClientId)?.deliveryPromiseProviderApiClientId,r=f.peek();if(n&&r>0){const e=ue(n),t=Date.now()-r;o(t,Number(e)),0===y.peek()&&(y.value=t)}}const t="empty"===e.status&&"negotiated"===v.peek().status&&hO(p.fields.deliveryNext.peek());("error"===e.status||"filled"===e.status||t)&&(f.value=0)});const I=r(()=>({uiStateSignal:C,initialUiStateSignal:E,dispatch:_}),[_,C,E]);return d(wh.Provider,{value:I,children:e})}function kO(){const{checkout:{negotiator:e}}=oe();return n(()=>{const t=e.current.fields.allViolations.value??[],n=e.current.fields.merchandiseLines.value?.lines??[];return Xn(t)&&!n.some(({quantity:e})=>e>0)})}function PO({embedder:e,isThankYouDetour:t,normalizedPath:n}){return t&&"/thank-you"===n&&!ar(e)}const SO=C({displayName:"ShopPayCheckout",load:()=>E(()=>hl(()=>import("./461aedcc.CVT2FeQD.js"),__vite__mapDeps([264,1,2,3,4,5,8,9,173,186,187,18,213,180,14,78,79,92,170,15,171,172,239,174,169,81,6,11,16,17,265])).then(e=>e.ShopPayCheckout))});function wO({children:e}){const{checkout:{configuration:{layout:t},identity:n},router:r,shopPay:{isSimulated:a}}=oe();return ws({isShopPay:"shopPay"===n.current.value,isOnePage:t.isOnePage.value,path:r.currentUrl.value.normalizedPath})?d(SO,{simulated:a,children:e}):d(y,{children:e})}function CO({children:e}){const{checkout:t}=oe(),n=cO(),r=dO(),a=t.checkoutExit.isExiting.value,i=SA(),o=d(wO,{children:[d(ET,{}),d(kT,{}),d(NT,{active:n.value,announceProcessing:!a,showLoadingIndicator:!a&&r.value,loadingIndicatorVariant:"progressbar",children:d(EO,{routeContentInert:!!i.value||void 0,children:e})}),d(wA,{})]});return d(XC,{children:d(DT,{children:d(bO,{children:d(QI,{children:o})})})})}function EO({children:e,routeContentInert:t}){const{footer:{content:{visibility:a}={}}}=jy(),{checkout:i,mobileCheckoutSdk:o,shopPay:s,embed:l,router:c}=oe(),u=c.currentUrl.value,p=rr(u.search),m=lO(),h=i.configuration.showFooter,{rollup:{inlinePadding:g}}=Km(),{currentDetour:f}=tc().value,v=sO().value,_=Qh()&&v&&PO({embedder:l?.embedder,isThankYouDetour:"thankYou"===f?.type,normalizedPath:u.normalizedPath}),b=kO().value;let k="purchase.checkout.footer.render-after",P="purchase.checkout.chat.render";"thankYou"===f?.type&&(k="purchase.thank-you.footer.render-after",P="purchase.thank-you.chat.render");const S=$S(k),w=$S(P),C=Hx(),E=Fx(),x=Vx(),{isAppLayout:I}=fw(),A=I&&"google"===l?.embedder&&x.value&&null==f,T=at(),L=n(()=>{const e=i.negotiator.current.fields.buyerIdentity.value?.customerProfile;return null==e||"CustomerProfile"!==e.__typename}),R=n(()=>{const e=i.proposal.negotiated.fields.taxes.value;return ZA(e)?e.liability:void 0}),M="thankYou"===f?.type||L.value&&!E.value.payment&&!E.value.delivery,N=r(()=>o.enabled?o.variant.isStandard():l?!!l.isCheckoutKit()||!m&&(h||S.length>0):("hidden"!==a||S.length>0&&T.value)&&!I&&!p,[l,m,h,o,a,S.length,I,p,T.value]),D="shopPayLogin"!==f?.type&&M&&v&&!l?.isFlagshipPartner,z=s.visibility.shouldForceOnePageShellContentAsAppLayout,O=d(y,{children:[d(cT,{}),d(hf,{className:A?"ghhXm":void 0,inert:t,children:e})]}),B=(()=>{if(N)return d(sT,{});if(!f&&l?.isFlagshipPartner&&m)return;const e=R.value;return e?ar(l?.embedder)?d(hf,{paddingInline:ks(g)??"base",paddingBlockEnd:"large",children:d(eT,{liability:e})}):d(eT,{liability:e}):void 0})();return d(y,{children:[d(AT,{}),d(sE,{banner:d(qx,{}),announcement:"thankYou"===f?.type&&C.length>0?d(jx,{}):void 0,disclosure:!D||_||b?void 0:d(PA,{}),disclosureOrderSummary:_||b?void 0:d(rO,{slot:"disclosure"}),main:O,orderSummary:b?void 0:d(rO,{slot:"aside"}),footer:B,blockSize:(()=>{if(I||z)return"appLayout"})(),minMobileViewportSize:A}),d(uT,{}),d(TT,{}),d(LT,{}),d(LC,{customizations:w,transformComponents:xO,render:e=>d(hf,{minBlockSize:"@media (inline-size >= medium) 0, 72px",children:e})})]})}const xO=xT(Lx);function IO(){return hl(()=>import("./825eea7d.dZ8QXu1l.js"),__vite__mapDeps([266,1,2,3,4,5,267]))}const AO=C({displayName:"TransitionProgress",suspense:!1,load:()=>E(IO),useError:Yh("TransitionProgress")});function TO(){const{checkout:e,router:t}=oe(),{currentDetour:n}=tc().value,r=Uc();return Xh()&&!e.configuration.isUniversalCheckoutFinalizer&&!rr(t.currentUrl.value.search)&&!r&&!n}function LO(){const{checkout:e,router:t}=oe(),n=TO(),r=t.currentUrl.value.normalizedPath;return a(()=>()=>e.checkoutExit.cancelRedirectProgress(),[e.checkoutExit,r]),d(y,{children:[d(x,{when:()=>n&&e.negotiator.parts.shopPayRememberMeVisible.value,children:d(AO.Preload,{})}),d(x,{when:()=>n&&"visible"===e.checkoutExit.progressPhase.value,children:d(AO,{})})]})}function RO(){const{router:e}=oe(),n=rn().inMemoryAmazonPayParts.serializedAmazonParams;return t(t=>{const{keep:r,only:a}=t??{},i=e.currentUrl.value.href,o=new URL(i);es.filter(e=>r?!r.includes(e):!a||a.includes(e)).forEach(e=>{o.searchParams.delete(e)}),Es(n,e=>o.searchParams.get(e)),i!==o.href&&e.navigate(o.href,{replace:!0})},[e,n])}function MO(){return"true"===RD()[xs]}const NO=C({load:()=>hl(()=>import("./56bd1136.BG0dj4Cd.js"),__vite__mapDeps([268,1,2,3,4,5,76,77,54,269,75,78,79,80,180,254,6,92,169,270,11,14,15,16,17,18,271])).then(e=>e.AmazonBuyerDetailsContent),renderLoading:()=>d(DO,{}),useError:function(e){const{checkout:{wallets:t,negotiator:n}}=oe(),{buyerDetails:r,buttonStatus:i,sdkStatus:o}=rn().inMemoryAmazonPayParts,{paymentLines:s}=n.parts,l=RO(),c=Dk();a(()=>{if(!e)return;i.value={status:"error"},o.value={status:hv.Error},r.value={loading:!1,error:!0,details:void 0},l();const n=t.escalatedWallet.value,a=n===mn.AmazonPay||n===mn.BuyWithPrime,u=s.value.some(e=>"walletsPlatformPaymentMethod"===e.method.type&&(e.method.name===mn.AmazonPay||e.method.name===mn.BuyWithPrime));a?(c({shouldResetCustomerInfo:!0}),t.setEscalatedWallet(null)):u&&(s.value=s.value.filter(e=>"walletsPlatformPaymentMethod"!==e.method.type||e.method.name!==mn.AmazonPay&&e.method.name!==mn.BuyWithPrime))},[e,r,i,l,s,c,o,t])}});function DO(){const{buyerDetailsContentLoaded:e}=rn().inMemoryAmazonPayParts;return a(()=>{e.value=!1},[e]),null}function zO(){const{checkout:{negotiator:e}}=oe(),t=e.current.fields.paymentMethods,{attributes:n,externalDeliveryIds:r,paymentLines:a}=e.parts,i=MO(),o=at();return d(x,{when:()=>o.value&&function(e,t,{attributes:n,externalDeliveryIds:r,hasAmazonCancelledParam:a}){const i=[mn.AmazonPay,mn.BuyWithPrime].some(t=>Boolean(Cs(e,t))),o=t.some(e=>"walletsPlatformPaymentMethod"===e.method.type&&e.method.name===mn.BuyWithPrime),s=n?.some(({key:e,value:t})=>e===Fr&&t===mn.BuyWithPrime);return Boolean(i||o||r||s||a)}(t.value,a.value,{attributes:n.value,externalDeliveryIds:r.value,hasAmazonCancelledParam:i}),children:d(NO,{})})}function OO(){const{i18n:e}=oe(),t=tc(),r=n(()=>t.value.currentDetour?.label??t.value.currentPage?.label??e.translate("general.page_title"));return d("h1",{className:Ce({screenReaders:"only"}),children:r})}function BO({title:e,cost:t}){return d(y,{children:[e,"·",t]})}function FO({deliveryChangeTitle:e,deliveryLines:t,cardLayout:n=!1}){const{i18n:r}=oe();return d(hL,{blockPadding:n?"none":"base",children:[d(mL,{primary:!0,children:[d(kf,{size:"base",type:n?void 0:"strong",children:r.translate("order_summary.shipping_label")}),t.map(({title:e,lineAmount:t})=>d(Lf,{direction:"inline",gap:"small-400",alignItems:"center",children:d(BO,{title:d(kf,{size:"small",children:e}),cost:d(kf,{size:"small",type:"strong",children:r.formatCurrency(t.amount,{currency:t.currencyCode,form:"short"})})})},e))]}),d(mL,{inlineAlignment:"center",children:n?d(fL,{tone:"neutral",children:e}):d(Mx,{type:"small",textAlign:"end",children:d(kf,{type:"strong",children:e.toUpperCase()})})})]})}const VO="TeeUi",UO=qc("TaxRecalculationLineTooltip");function qO({taxRecalculation:e,cardLayout:t=!1}){const{i18n:n}=oe(),r=n.numberFormatter({style:"percent",minimumFractionDigits:0,maximumFractionDigits:3}),a=jc(void 0,UO),i=jc(void 0,UO),o=e.beforeLines,s=e.afterLines;return 0===o.length&&0===s.length?null:d(hL,{blockPadding:t?"none":"base",children:[d(mL,{primary:!0,children:[d(kf,{size:"base",type:t?void 0:"strong",children:n.translate("delivery_options.shipping_address")}),d(Mx,{type:"small",children:[d("span",{className:VO,children:[n.translate("payment.order_edit_banner_previous_taxes_label")," ",d(jO,{lines:o,tooltipId:a,percentFormatter:r,i18n:n})," ",d("span",{"aria-hidden":"true",children:"→"})]})," ",d("span",{className:VO,children:[n.translate("payment.order_edit_banner_new_taxes_label")," ",d(jO,{lines:s,tooltipId:i,percentFormatter:r,i18n:n})]})]})]}),d(mL,{inlineAlignment:"center",children:t?d(fL,{tone:"neutral",children:n.translate("payment.order_edit_banner_single_item_updated")}):d(Mx,{type:"small",textAlign:"end",children:d(kf,{type:"strong",children:d("span",{className:"DQ7YO",children:n.translate("payment.order_edit_banner_single_item_updated").toUpperCase()})})})})]})}function jO({lines:e,tooltipId:t,percentFormatter:n,i18n:r}){if(0===e.length)return d(y,{children:r.translate("payment.order_edit_banner_no_taxes_label")});const[a]=e;if(1===e.length&&a)return d(y,{children:HO(a,n)});const i=e.map(e=>HO(e,n)).join(" + "),o=e.filter(e=>null!=e.rate);if(0===o.length)return d(y,{children:i});const s=o.reduce((e,t)=>e+(t.rate??0),0);return d(y,{children:[d(Xm,{interestFor:t,className:"_8A9rc",children:n.format(s)}),d(dm,{id:t,children:i})]})}function HO(e,t){return null==e.rate?e.title:`${e.title} ${t.format(e.rate)}`}function $O(){const{i18n:e,checkout:t,shop:r}=oe(),a=xt(),i=t.proposal.facts.orderNumber,[o]=t.proposal.facts.delivery??[],s=n(()=>o?.lines.filter(e=>"ADDED"===e.deliveryChange)??[]),l=n(()=>o?.lines.filter(e=>"REMOVED"===e.deliveryChange)??[]),u=n(()=>(t.proposal.facts.merchandiseLines??[]).filter(e=>e.quantityChange&&e.quantityChange.delta)),p=n(()=>{const e=t.proposal.facts.taxRecalculation;return e&&(e.beforeLines.length>0||e.afterLines.length>0)?e:void 0}),h=n(()=>u.value.length>0||s.value.length>0||l.value.length>0||Boolean(p.value)),g=n(()=>{if(a.value&&h.value)return{formattedAmountOwed:e.formatCurrency(a.value.amount,{currency:a.value.currencyCode,form:"short"})}}),f=n(()=>s.value.length>0?s.value:void 0),v=n(()=>l.value.length>0?l.value:void 0),_=m(!1),b=c(),k=r.hasFlagEnabled(Is),P=d(y,{children:[d(kf,{children:e.translate("payment.order_edit_banner_subtitle",{order_number:i?`#${i}`:""})}),d(UC,{blockSize:"base"}),d(pS,{}),k?d(UC,{blockSize:"base"}):null,d(iL,{title:e.translate("payment.order_edit_banner_updated_order_label"),titleHidden:!0,border:k?"none":"inner",spacing:k?"base":"none",children:[d(oL,{hidden:!0,children:[d(sL,{hidden:!0,children:e.translate("order_summary.product_image_label")}),d(sL,{hidden:!0,children:e.translate("order_summary.description_label")}),d(sL,{hidden:!0,children:e.translate("order_summary.quantity_label")})]}),d(cL,{children:[d(Y,{each:u,getKey:({title:e,variantTitle:t})=>`${e}${t?`-${t}`:""}`,children:({quantity:e,quantityChange:t,image:n,title:r,variantTitle:a})=>d(hL,{blockPadding:k?"none":"base",children:[d(mL,{inlineAlignment:"start",children:d(_S,{alt:n?.altText??"",size:k?"small":"base",src:n?.url,totalItems:k&&t?.delta&&t.delta>1?t.delta:void 0})}),d(mL,{primary:!0,children:[d(kf,{size:"base",type:k?void 0:"strong",children:r}),a?d(kf,{color:"subdued",size:"small",children:a}):null]}),t&&t.delta&&t.type?d(mL,{inlineAlignment:"center",children:k?d(YO,{type:t.type}):d(WO,{remainingQuantity:e,delta:t.delta,type:t.type})}):null]})}),d(x,{when:f,children:t=>d(FO,{deliveryLines:t,deliveryChangeTitle:e.translate("payment.order_edit_banner_single_item_added"),cardLayout:k})}),d(x,{when:v,children:t=>d(FO,{deliveryLines:t,deliveryChangeTitle:e.translate("payment.order_edit_banner_single_item_removed"),cardLayout:k})}),d(x,{when:p,children:e=>d(qO,{taxRecalculation:e,cardLayout:k})})]})]})]});return d(x,{when:g,children:({formattedAmountOwed:t})=>{const n=e.translate("payment.order_edit_banner_title",{amount_owed:t});return k?d(hf,{background:"subdued",borderRadius:"base",padding:"large-100",children:[d(CP,{level:3,children:d(Xm,{controlId:b,expanded:_.value,inlineSize:"100%",onClick:()=>{_.value=!_.value},children:d(nh,{gridTemplateColumns:"minmax(0, 1fr) auto",gap:"base",alignItems:"center",children:[d(kf,{size:"base",children:n}),d(lh,{type:_.value?"chevronUp":"chevronDown",size:"small-200"})]})})}),d(Td,{id:b,open:_.value,duration:"base",children:d(fu,{children:d(hf,{padding:"large-100 none none none",children:P})})})]}):d(UN,{heading:n,collapsible:!0,children:P})}})}function YO({type:e}){const{i18n:t}=oe();let n;switch(e){case"INCREMENTED":n=t.translate("payment.order_edit_banner_single_item_added");break;case"DECREMENTED":case"REMOVED":n=t.translate("payment.order_edit_banner_single_item_removed");break;case"RETURNED":n=t.translate("payment.order_edit_banner_single_item_returned");break;case"RETURN_LINE_ITEM_REMOVED":n=t.translate("payment.order_edit_banner_single_item_return_line_item_removed")}return d(fL,{tone:"neutral",children:n})}function WO({remainingQuantity:e,delta:t,type:n}){const{i18n:r}=oe();if(0===t)return null;const a=0===e,i=e+t;let o;switch(n){case"INCREMENTED":o=r.translate("payment.order_edit_banner_items_added",{count:t});break;case"DECREMENTED":o=r.translate("payment.order_edit_banner_items_removed.with_quantities",{quantity:i,delta:t});break;case"REMOVED":o=r.translate("payment.order_edit_banner_items_removed.in_full");break;case"RETURNED":o=a?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":o=a?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 d(Mx,{type:"small",textAlign:"end",children:d(kf,{type:"strong",children:o.toUpperCase()})})}const GO={current:void 0};function KO({active:e,breadcrumbs:t}){const{i18n:n}=oe(),r=rw(),{buyerJourney:{alignment:a}={}}=jy();return d(sw,{section:"breadcrumbs",children:d(aw,{section:"breadcrumbs",children:d(hf,{accessibilityRole:"navigation",accessibilityLabel:n.translate("general.breadcrumb"),inlineAlignment:a,children:d(Lf,{direction:"inline",gap:"small-200",accessibilityRole:"ordered-list",children:t.map(({id:n,to:a,disabled:i,content:o},s)=>{const l=t.length!==s+1,c=e===n,u=d(kf,c||i?{color:c?void 0:"subdued",type:c?"strong":void 0,size:"small",children:o}:{size:"small",ref:r(n),children:d(Af,{href:a,textDecoration:"none",children:o})});return d(Lf,{direction:"inline",gap:"small-200",alignItems:"center",accessibilityRole:"list-item",accessibilityCurrent:c?"step":void 0,children:[u,l&&d(lh,{type:"chevron-right",size:"small-200"})]},n)})})})})})}function JO(){return ie(jk)}function QO(){const{checkout:{negotiator:e}}=oe(),{paymentLines:t}=e.parts;return n(()=>{const e=Tt(t.value,"APPLE_PAY");return!!e&&to(e)})}function XO(){const{checkout:e,observability:t}=oe(),n=e.configuration.layout.isOnePage.value,r=e.latestReceipt.value,{walletUsedForSubmissionSignal:o,receiptErrorSignal:s,inMemoryApplePayParts:{asPaymentMethod:l,paymentSheetError:c}}=rn(),u=$I(As()),d=$I(WD()),p=QO(),{paymentLines:m}=e.negotiator.parts,h=Tt(m.value,"GOOGLE_PAY"),g=Boolean(h&&Ts(h)),f=$I(Vk({shouldResetCustomerInfo:!1})),y=i(new Set),v=fD("failed"===r?.status&&"payment"===r.failure.type&&n?r?.failure:void 0);a(()=>{if("processing"===r?.status||"polling_for_order"===r?.status)return;const e=o.value,n=p.value&&"APPLE_PAY"!==e,a=g&&"GOOGLE_PAY"!==e,i=!e&&!n&&!a;if(r){if(y.current.has(r.id))return;t.leaveErrorBreadcrumb("[useHandleReceiptErrorForWallets] Adding to handled receipt ids",{receiptId:r.id,isNonWalletSubmission:i}),y.current.add(r.id)}if(i)return;const m="APPLE_PAY"===e||n,h="GOOGLE_PAY"===e||a;m&&"payment_cancelled_while_processing"===c.value?.type&&(c.value=void 0),"failed"===r?.status?(m&&d.current(),a&&f.current(),"payment"===r.failure.type&&(e||n||a)&&!l.value&&(t.log("useHandleReceiptErrorForWallets_selecting_first_available_payment_method","selecting first available payment method",{walletUsedForSubmission:e,applePaySFRPaymentFailure:n,googlePaySFRPaymentFailure:a}),u.current()),(m&&!l.value||h)&&(s.value=v),"GOOGLE_PAY"===e&&(o.value=void 0)):s.value=void 0},[t,r,s,o,l,c,d,f,v,u,p.value,g]),a(()=>function(){s.value=void 0},[s])}function ZO({children:e}){return d(XC,{children:d(DT,{children:[d(eB,{}),d(kT,{}),d(ET,{}),d(tB,{children:d(nB,{children:e})})]})})}function eB(){return function(){const{router:e,checkout:{journey:t}}=oe(),n=t.plan.value;a(()=>e.beforeNavigate((e,t)=>{const r=n.greenPath.find(t=>t.route===e.normalizedPath),a=n.greenPath.find(e=>t.pathname.endsWith(e.route));if(!r||!a)return{};if(!oc.includes(r.id)||!oc.includes(a.id))return{};const i=n.greenPath.indexOf(r),o=n.greenPath.indexOf(a);return ul(()=>{},o>i?["page-slide-end"]:["page-slide-start"]),{}}),[e,n.greenPath])}(),XO(),null}function tB({children:e}){const{checkout:t}=oe(),n=cO(),r=dO(),a=t.checkoutExit.isExiting.value;return d(NT,{active:n.value,announceProcessing:!a,loadingIndicatorVariant:"progressbar",showLoadingIndicator:!a&&r.value,children:e})}function nB({children:e}){const{footer:{content:{visibility:t}={}}}=jy(),{checkout:n,embed:a,router:i}=oe(),{currentDetour:o}=tc().value,s=Qh()&&PO({embedder:a?.embedder,isThankYouDetour:"thankYou"===o?.type,normalizedPath:i.currentUrl.value.normalizedPath}),l=kO().value;let c="purchase.checkout.footer.render-after",u="purchase.checkout.chat.render";"thankYou"===o?.type&&(c="purchase.thank-you.footer.render-after",u="purchase.thank-you.chat.render");const p=$S(c),m=$S(u),h=Hx(),g="hidden"!==t||p.length>0,f=function(e){return e.currentUrlMatches("/stock-problems")}(i),v=gP(i),_=i.currentUrlMatches("/shoppay"),b=ND(),{activeBreadcrumb:k,breadcrumbs:P}=function(){const{i18n:e,router:t,checkout:{negotiator:n}}=oe(),{currentPage:a,plan:{greenPath:i}}=tc().value,o=hP(),s=mP(),l=n.current.value,c=t.currentUrl.value.normalizedPath,u=r(()=>i.filter(e=>!e.skipOverPage||!e.skipOverPage(l)),[i,l]),d=u.find(e=>e.route===c)??a,p=r(()=>{const t=u.findIndex(e=>e.id===d?.id);return[...o.value&&s.value?[{id:"cart",to:o.value.toString(),content:e.translate("general.cart"),disabled:!1}]:[],...u.map((e,n)=>({id:e.id,to:e.route,content:e.label,disabled:!!d&&n>t}))]},[o.value,s.value,e,u,d]),m=d?.id;return GO.current={ids:p.map(({id:e})=>e).join(","),activeId:m,showCartLink:s.value,hasCartUrl:Boolean(o.value)},{breadcrumbs:p,activeBreadcrumb:m}}(),S=f||v||_||P.length<2||b.value,w=d(rB,{children:e}),C=(()=>{if(g)return d(sT,{});const e=n.proposal.negotiated.fields.taxes.value;return ZA(e)?d(eT,{liability:e.liability}):void 0})();return d(y,{children:[d(AT,{}),d(sE,{banner:d(qx,{}),announcement:"thankYou"===o?.type&&h.length>0?d(jx,{}):void 0,disclosure:s||l?void 0:d(PA,{}),disclosureOrderSummary:s||l?void 0:d($z,{}),main:w,orderSummary:l?void 0:d($z,{}),footer:C,buyerJourney:S?void 0:d(KO,{active:k,breadcrumbs:P})}),d(uT,{}),d(TT,{}),d(LT,{}),d(LC,{customizations:m,transformComponents:oB,render:e=>d(hf,{minBlockSize:"@media (inline-size >= medium) 0, 72px",children:e})})]})}function rB({children:e}){const{checkout:t}=oe(),{blocking:n}=JO(),r=cO();return d(y,{children:[d(OO,{}),d(NT,{active:n.value||r.value,announceProcessing:n.value||!t.checkoutExit.isExiting.value,showLoadingIndicator:n.value,children:[d(zO,{}),d(Lf,{gap:"base",children:[d(fz,{section:"toast"}),d(fz,{section:"top"}),d($O,{}),d(iB,{children:e})]})]})]})}function aB({condition:e,children:t}){return e?d(FT,{accessibilityRole:"presentation",children:t}):d(y,{children:t})}function iB({children:e}){const{checkout:t,router:r,shop:a}=oe(),{pending:i}=OS(),o=r.currentUrlMatches("/shipping"),s=r.currentUrlMatches("/payment"),l=r.currentUrlMatches("/review"),c=o||s||l,u="/review"===r.currentUrl.value.normalizedPath&&a.hasFlagEnabled(Ls),{deliveryNext:p,paymentLines:m}=t.negotiator.current.fields,h=t.proposal.facts.delivery??[],g=n(()=>en(p.value)||h.length>0&&h.every(e=>null!==e.pickupAddress)),f=xt(),v=sn("total"),_=sn("paymentLines"),b=n(()=>!!r.currentUrlMatches("/review")&&(v.value||_.value||(f.value?.amount?f.value.amount>0:m.value?.lines&&m.value.lines.some(e=>e.cost?.amount)))),k=d(y,{children:[c&&d(y,{children:[d(FE,{showAddress:!g.value,showPayment:b.value}),d(UC,{blockSize:"large-400"})]}),d(hf,{children:e})]});return d(DS,{style:u?void 0:i,children:d(aB,{condition:c,children:k})})}const oB=xT(Lx);function sB(){const{checkout:e}=oe(),{billingAddressOption:t,shippingAddress:n}=e.negotiator.parts;S(()=>{e.isShippingRequired.value&&!n.value.oneTimeUse||(t.value="custom")})}function lB(){const{shop:e,source:t,checkout:n}=oe(),{billingAddressOption:r,paymentLines:i}=n.negotiator.parts,o=n.negotiator.current.fields.buyerIdentity.value?.purchasingCompany,{value:s}=n.negotiator.current.fields.deliveryNext,l=sn("deliveryNext").value;a(()=>{const a=i.value[0],c=s;if(l||!c||"filled"!==c.status||!a)return;const u=en(c),d=wr(c);if(u||d)return;const p=!u&&n.isShippingRequired.value;Rs({shopRequireMatchingShippingAndBilling:Boolean(e.requireMatchingShippingAndBilling),selectedPaymentMethodType:a?.method.type,isShippingRequired:p,isOrderSession:Mn(t),isB2B:Boolean(o),isPickupPointDeliveryMethod:d})&&"shipping"!==r.value&&(r.value="shipping")},[i.value,s,l,n.isShippingRequired,e.requireMatchingShippingAndBilling,t,o,r])}function cB(){const{source:e,checkout:t}=oe(),{buyerIdentity:r,deliveryNext:a}=t.negotiator.current.fields,i=w_(),o=Jy(),s=function(){const{checkout:e}=oe();return n(()=>wo(e.proposal))}(),{deliveryLines:l,shippingAddress:c}=t.negotiator.parts;return n(()=>{const n=r.value?.purchasingCompany;return(o.value||C_({checkout:t,source:e})?.pickupAddress)&&!i.value||wr(a.value)||l.value.flatMap(e=>e.value.deliveryMethodTypes).includes("PICKUP_POINT")||!Mn(e)&&!t.isShippingRequired.value&&!n||Mn(e)&&!s.value||n&&!t.addressManager.billing.value.suggestedAddress.value.type||c.value.oneTimeUse?"form":"selector"})}function uB(){const{checkout:e,source:t}=oe(),{billingAddressOption:r,billingAddress:a}=e.negotiator.parts;return n(()=>{const n=e.negotiator.current.fields.paymentLines.value,i=e.negotiator.current.fields.shippingAddress.value,[o]=e.proposal.facts.delivery??[],s=o?.deliveryAddress??void 0,l=e.negotiator.current.fields.buyerIdentity.value?.purchasingCompany,c=n?.lines?.find(e=>e.method.type===he.CreditCard);return c?c.method.billingAddress:"billing"===r.value&&l?.location.billingAddress?l.location.billingAddress:"shipping"===r.value&&l?.location.shippingAddress?l.location.shippingAddress:"shipping"===r.value?Mn(t)?s:i:a.value})}function dB(){const{checkout:{negotiator:e}}=oe(),t=e.current.fields.paymentLines?.value?.lines,{violations:n}=by(new Set(["PAYMENTS_SHIPPING_MUST_MATCH_BILLING"])),r=n.value,a=Boolean(Tt(t,"APPLE_PAY"));if(0!==r.size&&!a)return r.values().next().value.localizedMessage}function pB(){const{shop:e,source:t,checkout:r}=oe(),a=Jy(),{paymentLines:i}=r.negotiator.parts,{buyerIdentity:o}=r.negotiator.current.fields,s=function(){const{checkout:{negotiator:e}}=oe(),t=e.current.fields.deliveryNext;return n(()=>wr(t.value))}();return n(()=>{const n=!a.value&&r.isShippingRequired.value,l=i.value[0];return Rs({shopRequireMatchingShippingAndBilling:Boolean(e.requireMatchingShippingAndBilling),selectedPaymentMethodType:l?.method.type,isShippingRequired:n,isOrderSession:Mn(t),isB2B:Boolean(o.value?.purchasingCompany),isPickupPointDeliveryMethod:s.value})})}function mB(e){return Wf(e,function(e){const{checkout:{negotiator:t}}=oe(),n=Boolean(t.current.fields.buyerIdentity.value?.purchasingCompany),r=Boolean(e?.countryCode&&$f.includes(e.countryCode)),a=[];return n&&a.push("phone","company"),r||a.push("firstName","lastName"),{hiddenFields:a,countryFormat:"explicit"}}(e))}function hB(e){return mB(e)?.join(", ")}function gB(){const{checkout:e}=oe(),{shippingAddress:t}=e.negotiator.parts;return n(()=>(e.proposal.facts.delivery??[])[0]?.deliveryAddress??t.value)}function fB(){const{negotiate:e}=nc(),{checkout:{wallets:n,negotiator:r}}=oe(),{billingAddress:o,billingAddressOption:s}=r.parts,l=i(void 0),c=t(()=>{e({silenceViolations:qe(["billingAddress"])})},[e]),u="custom"===s.value?o.fields.countryCode.value:void 0;return a(()=>{!n.activeSession.value&&"custom"===s.value&&u&&u!==l.current&&(l.current=u,c())},[s.value,u,c,n.activeSession.value]),c}const yB="b2b",vB="not_b2b";function _B(){const{checkout:{negotiator:e}}=oe(),{paymentMethods:t}=e.current.fields;return kB(t)}function bB(){const{checkout:{negotiator:e}}=oe(),{paymentLines:t}=e.parts;return kB(n(()=>t.value.map(e=>e.method)))}function kB(e){const{client:t,checkout:{identity:r,negotiator:a},shop:i,shopPay:o,source:s}=oe(),l=kv(),c=vT(),u=i.hasFlagEnabled(Ms),d=Ki(["STORE_CREDIT","CUSTOM"]),{buyerIdentity:p,paymentMethods:m}=a.current.fields;return n(()=>{if(!c.value)return!1;if("shopPay"===r.current.value)return!1;if(d.value)return!1;const n=e.value??[];if(p.value?.purchasingCompany){const e=m.value?.some(e=>"direct"===e.type&&"shopify_payments"===e.name),r=n.some(t=>"direct"===t.type&&(e||i.storeVaultEnabled)),a=n.some(e=>function(e,t){if("bank"!==e.type)return!1;if("supportsVaulting"in e)return e.supportsVaulting;const n=PB(e,t);return!!n?.supportsVaulting&&(!(!("selectedToken"in e)||!e.selectedToken)&&"SHOPIFY_PUBLIC_TOKEN"!==e.selectedType)}(e,m.value??[]));return function(e,t){return"cartNext"===e.type||"simulated"===e.type||"b2b"===t.unstable_getSerialization("invoiceLoginType")&&Ns(e)}(s,t)&&(r||a)}return i.storeVaultEnabled&&function({paymentMethods:e,paypalVaultingEnabled:t,negotiatedPaymentMethods:n,isShopPayAvailableForSellerOfRecord:r,shopPayDismissed:a,buyerIdentity:i}){const o=!a&&!i.value?.customerProfile&&r.value;if(!t&&o)return!1;const s=n.value??[],l=e.map(e=>PB(e,s)).filter(e=>void 0!==e);return!(!t||!l.some(e=>"wallet"===e.type&&"PAYPAL_EXPRESS"===e.name&&e.supportsVaulting))||!o&&l.some(e=>"direct"===e.type&&e.supportsVaulting)}({paymentMethods:n,paypalVaultingEnabled:u,negotiatedPaymentMethods:m,buyerIdentity:p,isShopPayAvailableForSellerOfRecord:l,shopPayDismissed:o.userIdentified.value})})}function PB(e,t){return"direct"===e.type?t.find(t=>"direct"===t.type&&t.paymentMethodIdentifier===e.paymentMethodIdentifier):"wallet"===e.type&&"PAYPAL_EXPRESS"===e.name?t.find(t=>"wallet"===t.type&&"PAYPAL_EXPRESS"===t.name&&(!e.walletContent||t.paymentMethodIdentifier===e.walletContent.paymentMethodIdentifier)):"bank"===e.type?t.find(t=>"bank"===t.type&&t.paymentMethodIdentifier===e.paymentMethodIdentifier):void 0}function SB({fullyCoveredByGiftCard:e,fullyCoveredByRedeemablesAndGiftCards:t,paymentRequired:n,identity:r,isOrderSession:a,isPickupSelected:i,isShippingRequired:o,vaultedDelivery:s,isPointOfSaleLayout:l,purchasingCompany:c,paymentLines:u,billingAddressOption:d,paymentMethods:p,orderEditHasPickupAddress:m,isForceBillingAddressFormEnabled:h}){const g=!i&&o,f=u[0],y="direct"===f?.method.type,v="wallet"===f?.method.type&&"APPLE_PAY"===f?.method.name&&!c,_="wallet"===f?.method.type&&"PAYPAL_EXPRESS"===f?.method.name&&zs(p)&&!h,b=Os({lines:u,paymentMethods:p,purchasingCompany:c,isBillingAddressForced:h})||!g,k="CREDIT_CARD_ON_FILE"===f?.method.type,P=Bs(p).length>0&&k;if(n&&(!b||v||_||P))return"hidden";if(c&&n&&!t)return function(e){if(!e)return!1;const t=Boolean(Tt([e],"PAYPAL_EXPRESS")),n=Boolean(Tt([e],"APPLE_PAY")),r=["direct","giftCard","redeemable","walletsPlatform","wallet","noop","deferred","other",...Object.values(he)];return t||n||!r.includes(e.method.type)}(f)?"afterPayment":"inContext";if(l)return"afterPayment";if("shopPay"===r&&s)return"inContext";const S="wallet"===f?.method.type||"walletsPlatformPaymentMethod"===f?.method.type;return!n||e||t?g&&!S&&"shipping"===d?"hidden":"afterPayment":a?m?"afterPayment":o&&y?"inContext":"afterPayment":g&&y?"inContext":"afterPayment"}function wB(){const e=Ds(),t=Ki(),r=vT(),{source:a,checkout:i,shop:o}=oe(),s=Jy(),l=Fx(),c=xg(),{buyerIdentity:u,paymentMethods:d}=i.negotiator.current.fields,{paymentLines:p,billingAddressOption:m}=i.negotiator.parts;return n(()=>SB({fullyCoveredByGiftCard:e.value,fullyCoveredByRedeemablesAndGiftCards:t.value,paymentRequired:r.value,identity:i.identity.current.value,isOrderSession:Mn(a),isPickupSelected:s.value,isShippingRequired:i.isShippingRequired.value,vaultedDelivery:l.value.delivery,isPointOfSaleLayout:c.value,purchasingCompany:Boolean(u.value?.purchasingCompany),paymentLines:p.value,billingAddressOption:m.value,paymentMethods:d.value,orderEditHasPickupAddress:Boolean(C_({checkout:i,source:a})?.pickupAddress),isForceBillingAddressFormEnabled:!Fl({shop:o,checkout:i,paymentMethods:d.value})}))}function CB({children:e}){const{checkout:t,embed:r,shop:a,shopPay:o,source:s}=oe(),{billingAddress:l,billingAddressOption:c,email:u,paymentLines:p,phone:m,shippingAddress:h}=t.negotiator.parts,{buyerIdentity:g,shippingAddress:f}=t.negotiator.current.fields,y=r?.isFlagshipPartner,v=Fs(),_=S_(),b=Vc(),