PageSourceSearch

https://piaffe.ca/cdn/shopifycloud/checkout-web/assets/c1/164ad2e3.DcJn775M.js

js piaffe.ca collected 2026-10-10 01:16:57 UTC 757,218 bytes, 2 lines download raw bytes

1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["0d43e753.q0AEPPk1.js","2c1ab0fe.qpvfywqb.js","4b4bc88f.DkycdxSK.js","app.DH8n-1bp.js","assets/app.CcGlIMpn.css","assets/wallet-prefilled-guest-return.BJvF0-q4.css","89e2d30a.C7YQuTRu.js","25604ae0.56pfEpxV.js","dada7e07.DLvpJNXh.js","051149c8.lHD9iIAq.js","d0bb51ec.CWfbNPnY.js","e03065ab.V1fBuv4e.js","29034f35.C5vHFLlG.js","f67abd2c.CNaB0QaR.js","e12db40c.DhbHW8sF.js","9dba8418.4R19B40l.js","60a453ce.DBFo6PRx.js","b887ec56.Cj9CT5mu.js","fe885b80.BxcRVx2R.js","a6e11e56.DS0vijQb.js","assets/AdminPreviewBar.BpHI7Zwr.css","33682ee7.CpW0FJxZ.js","e77d135d.Dz0RetrO.js","c610ba76.D5HkYGh_.js","66338e00.ClCcLcum.js","28ac86c0.Bqxr0lQy.js","3e6029dd.CzD4uDEq.js","assets/QRCode.BZ_m5G5a.css","30074413.CFLdnyrE.js","assets/Pressable.D9SfDfsb.css","efa0389a.BiVLFqoF.js","22345fd4.Bc95vVsB.js","assets/Choice.CrYuHUmO.css","9f57d2aa.CWVDsc-j.js","8574876b.DO_JQrVo.js","064f6ac1.BoVb1opw.js","assets/Popover.Bi1nHaU-.css","assets/DateField.CFFsBmUK.css","598fef4e.C71uub5O.js","assets/PaymentIcon.gzvCNwz_.css","33d2e4fc.BYSXPXJF.js","assets/NumberField.CRpcZnVJ.css","39921a74.C0GzP1-7.js","assets/Switch.BS8yVgoP.css","27f09e31.B5qg3Kcy.js","137622f3.dz4lSUSx.js","54bf0ebb.hjCERqmO.js","assets/Sheet.CpR5hiDV.css","1ed8f5e3.DIMgWfc5.js","assets/floating-layer.DfWUBaTh.css","2fdb3dd3.BI5ol3i8.js","47b970b2.Bc5Vmfq5.js","a9fa9fda.BO9gwssW.js","ca3e798e.XLlup-KR.js","assets/PhoneField.uZEuHncj.css","1444e6bd.DTqbRn9m.js","assets/AnnouncementRuntimeExtensions.DbBB6lBJ.css","f58f39d8.z0CUAjnp.js","21cc90a2.DHzOO82q.js","413b21e2.B8hOJrbg.js","2210eadb.DF0gIp_2.js","0fb2c600.Bo6-8SvA.js","7ee73f43.DRXbjRuN.js","2a0f03e4.4YrlE9ly.js","5ef0d995.DNLAl7vb.js","dd9b68fc.DYq4O2td.js","adeb5fdb.DPHh0ZHS.js","8498e76b.DNC0kLsb.js","2255f8fa.QeXR1fCM.js","3ca8ef7e.DgXbCH_R.js","2495faa4.DgGNI16D.js","d08a6c7d.CjXYCwoA.js","78ab3dd0.DsAxQUAi.js","d4ea2faa.Bh5JwQU0.js","13b13169.Cb1_vpIS.js","cdfd59e6.C61oFvbb.js","7fc410e0.Bp5sUnag.js","d02f7b10.DVcRILKJ.js","ed9f2238.Brwxl8Yi.js","33464469.-7QSUaH-.js","b8733b27.DmG2FsdC.js","ec391382.CmRYZq9D.js","24773686.NjNSWG1C.js","7724832f.BlBKH641.js","9655ebc9.CX4pB1Ku.js","bad03769.BSG78o-C.js","assets/DevTools.DTK7lleS.css","abd080c1.BjhS_mo-.js","2acfb1ce.Bd5HdRya.js","9d12dea3.BnxcbyZh.js","b9c0319a.8x5xdIiw.js","74835653.Cr7sKbVy.js","4b1c22b7.zkM5jsqa.js","assets/BillingAddressForm.BdwN7V1K.css","910cd6e2.D9laAOO_.js","17425706.DtdfKQJ3.js","347b440c.xpK15B3S.js","9ce08e25.dSvNrRyM.js","assets/EstimatedDeliveryContent.B_THySFF.css","181d38d3.C21ZO0gV.js","792bb671.B3OvVnSg.js","assets/Middot.D7Ujmshx.css","03fde911.DIt7XTZh.js","assets/LocalPickupReviewMethod.aM0rPpGF.css","79974aab.Cl0DLekt.js","e77f7fe0.Bl46DOUC.js","assets/PaymentLine.DT05kVlY.css","60575ca1.DccN8mN8.js","assets/DeliveryReviewMethods.DezeyHQn.css","160e80e7.D73xYRbj.js","9e94a50b.BevpX_k4.js","17324a0b.B5yU3OQE.js","b3389d5c.AQoeX8aG.js","dffdfb34.DKxh4eql.js","1f5e7811.DBGnR3_R.js","assets/ShopPayLogo.87JMHPUK.css","1d34c07e.h4dJAaCz.js","assets/ExpressCheckoutButton.BnDF3H7t.css","0e67bd3b.BulkkgyN.js","55098bf1.CjSE9kMx.js","cb5cf153.CNHN3NCG.js","e3e348f2.qdNJPs68.js","71ae3d5c.ChDO3fdz.js","cb38e5c2.k1ouuKLe.js","6fb6f9d8.BoDxvz0l.js","0b8657b8.CeR0nGry.js","a422df8c.CDURsRjM.js","assets/EmptyState.BEvzDDvy.css","f49d4216.Che8BnjU.js","d22d2b80.BRIhtVxA.js","7b0c98ea.B8saOsP6.js","assets/TransitionHeight.CuRoM9zv.css","assets/VatNumberValidationField.d9bKhKtH.css","0a30a815.Sdk8igBG.js","assets/Page.BYM12A8B.css","7e8cd205.zj2H1LWr.js","5fda1420.BAnkPE-E.js","9f047e05.Dakmnowc.js","9babe369.DN4Uiit5.js","4421b714.Dh884clZ.js","d6972375.DJB6il6z.js","f36e5f3f.AHx55B5Q.js","assets/CalloutIcon.BxwwfmsJ.css","assets/lazyNoAddressLocation.D14orovx.css","60d61386.D7LWPn_C.js","656fad11.CEjbwnlb.js","890247a7.BaF-8gx1.js","assets/FullScreenBackground.B_iZlQze.css","f8706cb6.PbccX-7u.js","0e9ee714.Cnsf3p8Q.js","7a8217fd.BSo0j5mC.js","8599b02a.D6crYzGJ.js","assets/useShopPayProgressIntercepts.CIy8uDiZ.css","ccdf3592.DmQuNZVR.js","71b60e0a.DfPLdYsH.js","assets/StickyPayButton.Cv62Qqkq.css","6bfea526.WQUqRMom.js","ac5a19ff.C1i8fdUP.js","cc6ff67d.RYXq9KZi.js","08a3b809.BKNVX2Vm.js","d25d1b95.CoPrVoCi.js","bf513f9c.DfVLzm1y.js","e39bc11c.CaER5qTM.js","cf29e63b.B0brOI65.js","assets/Tipping.BcTJoNaV.css","dfca5da5.cHkNyCYM.js","dae24aab.LuzlJRmB.js","assets/Section.CU18S7Ap.css","a25deb9a.B5l1rGH9.js","01973ac7.CzRJWXtH.js","58314944.CL_6FNuP.js","945a08d6.DPoKhjkl.js","7bc8057b.Cjs5rQ1q.js","assets/constants.xO_7ctnq.css","f1968089.BiyF2g2x.js","2b89a178.DlMzn79y.js","b684bff6.Do6MtAvQ.js","d6447d9e.yVMcZZjx.js","f51e663e.D3CveQI2.js","64de7b49.BnCPa5-S.js","8e79be58.4pj59tZ-.js","assets/ShippingMethodSelector.B0hio2RO.css","90e26f5f.Ac9ME8KB.js","assets/SubscriptionPriceBreakdown.vTcdVGq4.css","31cc568e.95lmLO5k.js","assets/ShippingLines.LcqrKXE1.css","65f3d4da.Bb3QiqCm.js","ca5e9c49.BzUOvyL4.js","f3e117aa.CgyApM5y.js","assets/OnePage.D7X_C-3s.css","9e3968a8.OliBXJQv.js","fc21c11a.CvREKW2p.js","e129c76e.83DznIAr.js","f78726c8.CFtLd10H.js","assets/hooks.CKE1iCma.css","e477f96c.Bg2MTFPd.js","0c0ad074.BuZ9_cdp.js","assets/useShopPayButtonClassName.BrcQzLuH.css","434e3b0a.oup8Ur0H.js","87bfafec.CxwEzGHg.js","assets/PayButtonSection.CZuxzxFG.css","d2e6a587.D5dE5VhU.js","assets/MobileOrderSummary.DjDhVpQB.css","74122478.2SbWy0c1.js","73a9b0a0.B8dxuTLG.js","81e109b1.DOkM2TK2.js","86720dbb.CVGIgA6H.js","f692f62f.0aS
15Pgyt.js","assets/RedirectionNotice.DgiInWJ-.css","assets/PaymentMethodProgressionHost.C0BOgdmL.css","e0989459.E2HGFiMB.js","assets/RememberMeSection.JBO5WNhc.css","4ea44c06.BJ1yyodf.js","0627daf2.DIdp-Zy5.js","dfc03c53.J0k3tRlF.js","50130ded.CjqsTI7m.js","assets/KnownBuyerPaymentMethodSelector.BXqN6ZOx.css","896e8dde.CQJy4dqd.js","633ac094.DaIaay63.js","24fcbaf6.Cd2o8g7p.js","assets/PostPurchase.e2mo8B8q.css","090b00f0.cUuumSvd.js","assets/Processing.D4vG8dn7.css","b120ac11.qNyvQcQH.js","289b89e4.C_njo7ZS.js","9011490c.N3S78_D5.js","8c0eaf27.C9Dbz7-c.js","91319467.1b0jd4Is.js","assets/ShopPayLoginLoader.B1_neltu.css","0cd5b134.ruuUh1pL.js","5c5c2e96.BDcgz6pV.js","f5a7bb50.BkfiKMG-.js","a9ba8e86.PcZlLY23.js","909cc5d6.IAUlDmbN.js","c57e39e6.RlK8qkMK.js","be176b00.DhP6fIrZ.js","17e57de1.lSRGFmhc.js","assets/Map.cbVP6Hp_.css","0e4087ec.XClKfnuM.js","9f3d9f8c.B_aPjp35.js","8d3a12c3.B5mHj3-g.js","4aab4b34.DYQSODAj.js","assets/ThankYou.C_OUQj1y.css","01f1d1bd.LFyw4KSz.js","assets/Throttle.CK6IAVuq.css","b538640d.BCalcArF.js","49758c58.BTDNmyJ_.js","assets/RuntimeExtension.DWkDBM73.css","7fd9930c.xcSdfvu9.js","assets/PaymentChallengeModal.Cz9ZxF4h.css","39bf6084.CPd-tVKF.js","ee2bb050.DwFu9ie-.js","assets/CryptoModalManager.CqiWenQK.css","7d468a18.C8tnppXa.js","1d52cad1.tBkMHxgN.js","7b11cac4._ooKg-g0.js","ca8e826d.HfkPR0Gb.js","assets/Avatar.gBkEAe_p.css","assets/AccountAvatar.CG_WOP4G.css","461aedcc.DT1ChOns.js","assets/ShopPayCheckout.CDRlDVu0.css","56bd1136.DtirGq33.js","cb8fcd45.D3zibvVj.js","8536083a.IvjmFsYB.js","assets/WalletSandbox.BoV0vp4z.css","4c290a1e.DDvW1vJ_.js","assets/amazonWalletLazy.D78LrA7v.css"])))=>i.map(i=>d[i]);
2import{a2 as e,k as t,q as n,T as r,h as a,g as i,M as o,C as s,_ as l,ak as c,am as u,u as d,b7 as p,o as m,B as h,Z as g,X as f,S as y,m as v,D as _,L as b,v as P,p as k,y as S,i as w,j as C,z as E,N as x,a9 as I,n as A,s as T,I as L,r as R,ad as N,t as M,a0 as D,w as z,aa as O,a5 as B,b8 as F,b9 as V,a1 as U,ba as q,W as j,a6 as H,J as $,a7 as Y,a8 as W,bb as G,bc as J,bd as K,be as Q,ax as X,bf as Z}from"./2c1ab0fe.qpvfywqb.js";import{c5 as ee,mw as te,cN as ne,ao as re,u as ae,e as ie,p as oe,c6 as se,y as le,mx as ce,h_ as ue,bu as de,L as pe,dW as me,ay as he,my as ge,es as fe,d9 as ye,cD as ve,cY as _e,gl as be,a$ as Pe,a_ as ke,C as Se,cV as we,cR as Ce,cQ as Ee,cW as xe,cX as Ie,cM as Ae,mz as Te,mA as Le,mB as Re,eq as Ne,mi as Me,mC as De,mD as ze,dh as Oe,fE as Be,j6 as Fe,a2 as Ve,aA as Ue,aw as qe,mE as je,jK as He,mF as $e,mG as Ye,mH as We,mI as Ge,mJ as Je,mK as Ke,dT as Qe,dS as Xe,dR as Ze,dQ as et,mL as tt,mM as nt,al as rt,lY as at,be as it,br as ot,lT as st,fY as lt,k as ct,fZ as ut,e2 as dt,mN as pt,mO as mt,co as ht,mP as gt,mQ as ft,aP as yt,kT as vt,s as _t,q as bt,b8 as Pt,mR as kt,e4 as St,az as wt,dZ as Ct,b4 as Et,eT as xt,X as It,aQ as At,an as Tt,c3 as Lt,bx as Rt,gU as Nt,gS as Mt,x as Dt,w as zt,mS as Ot,mT as Bt,kl as Ft,cf as Vt,mU as Ut,bb as qt,mV as jt,mW as Ht,mX as $t,mY as Yt,mZ as Wt,lh as Gt,ek as Jt,ej as Kt,j0 as Qt,eg as Xt,m_ as Zt,ei as en,m$ as tn,eh as nn,N as rn,ht as an,hr as on,aX as sn,n0 as ln,ci as cn,aa as un,c7 as dn,lw as pn,bf as mn,ho as hn,n1 as gn,a as fn,lM as yn,e_ as vn,W as _n,d0 as bn,mt as Pn,c8 as kn,hv as Sn,aK as wn,hw as Cn,aT as En,n2 as xn,n3 as In,n4 as An,kH as Tn,j$ as Ln,ar as Rn,mr as Nn,n5 as Mn,c9 as Dn,iD as z
2n,lf as On,f3 as Bn,J as Fn,am as Vn,kk as Un,dn as qn,ec as jn,h as Hn,T as $n,n6 as Yn,bz as Wn,ip as Gn,i9 as Jn,iK as Kn,bl as Qn,bh as Xn,iz as Zn,iC as er,iy as tr,lE as nr,fp as rr,lO as ar,lN as ir,ft as or,fq as sr,lP as lr,m5 as cr,d4 as ur,eC as dr,I as pr,bi as mr,n7 as hr,n8 as gr,kF as fr,n9 as yr,el as vr,gQ as _r,iE as br,na as Pr,lg as kr,l6 as Sr,nb as wr,nc as Cr,nd as Er,ne as xr,nf as Ir,ng as Ar,du as Tr,nh as Lr,ni as Rr,nj as Nr,nk as Mr,nl as Dr,nm as zr,nn as Or,eL as Br,no as Fr,eX as Vr,np as Ur,mu as qr,Q as jr,ml as Hr,mm as $r,nq as Yr,bd as Wr,nr as Gr,ns as Jr,nt as Kr,nu as Qr,aO as Xr,nv as Zr,jt as ea,ju as ta,gD as na,nw as ra,nx as aa,js as ia,gq as oa,ny as sa,nz as la,gN as ca,nA as ua,nB as da,ce as pa,cK as ma,ab as ha,lz as ga,jR as fa,fi as ya,gj as va,bS as _a,gP as ba,gf as Pa,nC as ka,ge as Sa,at as wa,ea as Ca,nD as Ea,lZ as xa,aW as Ia,hp as Aa,nE as Ta,nF as La,$ as Ra,nG as Na,nH as Ma,nI as Da,nJ as za,jc as Oa,nK as Ba,g5 as Fa,g6 as Va,nL as Ua,ir as qa,ah as ja,nM as Ha,nN as $a,eK as Ya,nO as Wa,nP as Ga,dB as Ja,gF as Ka,o as Qa,kz as Xa,nQ as Za,ep as ei,iX as ti,k8 as ni,d5 as ri,aI as ai,nR as ii,nS as oi,nT as si,cG as li,dt as ci,fz as ui,nU as di,z as pi,j7 as mi,hb as hi,nV as gi,nW as fi,jb as yi,cd as vi,kq as _i,jQ as bi,hR as Pi,bU as ki,A as Si,dH as wi,dI as Ci,d7 as Ei,nX as xi,F as Ii,nY as Ai,l2 as Ti,nZ as Li,bj as Ri,ba as Ni,bc as Mi,eN as Di,B as zi,bF as Oi,by as Bi,bD as Fi,n_ as Vi,n$ as Ui,i1 as qi,o0 as ji,hi as Hi,o1 as $i,j9 as Yi,o2 as Wi,hZ as Gi,o3 as Ji,eA as Ki,cr as Qi,eB as Xi,kZ as Zi,o4 as eo,o5 as to,o6 as no,o7 as ro,dU as ao,o8 as io,dO as oo,ga as so,o9 as lo,oa as co,da as uo,jz as po,jB as mo,dM as ho,dL as go,ob as fo,dd as yo,j8 as vo,oc as _o,od as bo,gG as Po,oe as ko,dN as So,dX as wo,gv as Co,ai as Eo,e9 as xo,dY as Io,of as Ao,gO as To,cF as Lo,hm as Ro,jm as No,kU as Mo,jZ as Do,og as zo,oh as Oo,oi as Bo,S as Fo,k1 as Vo,gK as Uo,oj as qo,jO as jo,ok as Ho,ly as $o,lx as Yo,gL as Wo,gM as Go,ol as Jo,om as Ko,on as Qo,oo as Xo,gR as Zo,gg as es,dp as ts,cb as ns,bn as rs,i3 as as,l9 as is,gd as os,j1 as ss,ja as ls,aj as cs,h1 as us,gT as ds,op as ps,oq as ms,or as hs,os as gs,ot as fs,ou as ys,fe as vs,ov as _s,ow as bs,ox as Ps,eZ as ks,oy as Ss,hq as ws,hh as Cs,ac as Es,lr as xs,oz as Is,jN as As,fa as Ts,cL as Ls,_ as Rs,oA as Ns,bT as Ms,ds as Ds,kR as zs,jh as Os,ji as Bs,aY as Fs,fM as Vs,hl as Us,oB as qs,lW as js,lH as Hs,eQ as $s,oC as Ys,oD as Ws,oE as Gs,oF as Js}from"./4b4bc88f.DkycdxSK.js";import{r as Ks,w as Qs,C as Xs,D as Zs,s as el,b as tl,c as nl,d as rl}from"./d0bb51ec.CWfbNPnY.js";import{s as al,i as il,c as ol,S as sl,_ as ll,j as cl,w as ul,t as dl,O as pl,u as ml,v as hl,k as gl,m as fl,r as yl,l as vl,n as _l,o as bl}from"./app.DH8n-1bp.js";import{a as Pl,b as kl,h as Sl,I as wl,j as Cl,c as El,s as xl,k as Il,e as Al}from"./f67abd2c.CNaB0QaR.js";import{i as Tl,d as Ll,c as Rl,b as Nl}from"./e12db40c.DhbHW8sF.js";import{i as Ml}from"./9dba8418.4R19B40l.js";import{f as Dl,r as zl,e as Ol,g as Bl,d as Fl,h as Vl,j as Ul,A as ql}from"./60a453ce.DBFo6PRx.js";function jl(e,t){e.error(t instanceof Error?t:new Xs("Required checkout profile could not be loaded",{cause:t}))}async function Hl(e,t){const{data:n}=await e.staticQuery(ee,{variables:t,skip:!0}),r=n?.checkoutProfile;return r?.id===t.id&&r.activatedExtensions?r:void 0}function $l(t,n){if(!t||e(ee,t)!==e(ee,n))throw new Xs("Required checkout profile could not be loaded")}function Yl(e){return function(e,t){if(!t)return;if(void 0!==e[t])return e[t];const n=Object.keys(ne);for(let r=n.indexOf(t);r>=0;r--){const t=n[r];if(void 0!==e[t])return e[t]}}(e,te())}function Wl(e){if("object"!=typeof e||!e)return!1;let t=!1;for(const n of Object.keys(e)){if(!(n in ne))return!1;t=!0}return t}const Gl=re("JourneyContext"),Jl=re("JourneyProgressionContext");function Kl(){const{journeyState:e,pageBeforeDetour:n,...r}=ae(Gl),{router:a}=ie();return t(()=>{const t=a.currentUrl.value.normalizedPath,{plan:i,history:o,redirectTo:s}=e.value,l=i.detours.find(e=>
2e.route===t),c=i.greenPath.find(e=>e.route===t),u=n.value;return{...r,plan:i,currentPage:c??u,currentDetour:l,history:o,redirectTo:s,journeyState:e}})}function Ql(){const e=ae(Jl),{detour:t,progress:a,progressing:i,completing:o,prefetch:s,negotiate:l}=e,c=n(e=>l({identifier:Symbol("journeyNegotiation"),...e}),[l]);return r(()=>({detour:t,progress:a,progressing:i,completing:o,prefetch:s,negotiate:c}),[t,a,i,o,s,c])}function Xl(e){const{checkout:{negotiator:t}}=ie(),n=oe(e);a(()=>t.listen((...e)=>n.current(...e)),[n,t])}function Zl(e){const{checkout:{negotiator:t}}=ie(),n=oe(e);a(()=>t.listenBeforeNegotiation((...e)=>n.current(...e)),[n,t])}function ec({active:e=!0}={}){const{checkout:{negotiator:t}}=ie();a(()=>{if(e)return t.block()},[t,e])}const tc=["information","shipping","payment","review"];function nc(){const e=ie().checkout.latestReceipt;return t(()=>{const t=e.value;return"processed"===t?.status?t:void 0})}function rc(){const e=nc(),t=Kl(),a=i(!1),o=n(()=>(a.current=!0,a),[a]),s=n(()=>{if(a.current)return!0;const n="postPurchase"===t.value.currentDetour?.type;return!e.value||Boolean(e.value.redirectUrl)&&!n},[e,t]);return r(()=>({shouldPrevent:s,markAsEmitted:o}),[o,s])}function ac(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 ic={thankYou:"c1_typ",postPurchase:"post_purchase"};function oc(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 sc(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 lc(e){return e.checkoutSessionIdentifier}function cc(e){return e||void 0}function uc(e){return e?le(e):void 0}function dc(e){const t=e?.customerProfile;if(!t)return;const n=le(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 pc({negotiated:e,shop:t,source:n}){const r=e.current.fields.merchandiseLines.value,a=e.current.fields.remoteMerchandiseDetails?.value,i=r?me(r.lines,a):void 0,o=function(e,t){return t?t.map(t=>{const n=de(t.variantId??void 0),r=(a=t.lineAllocations,i=e,{totalAmount:_c(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:de(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:_c(u,d)},lines:o,totalQuantity:c,attributes:s}}function mc({shop:e}){return{name:e.name,paymentSettings:{currencyCode:e.currencyCode},myshopifyDomain:e.myshopifyDomain,countryCode:e.countryCode,storefrontUrl:e.storefrontUrl??null}}function hc(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}}}
2function gc(e){switch(e.type){case"custom":return e.discountType;case"code":return"DISCOUNT_CODE";case"automatic":return"AUTOMATIC"}}function fc(e,t){return{allocationMethod:e.allocationMethod,targetSelection:e.targetSelection,targetType:kc(e.targetType),title:e.title,type:gc(e),value:Sc(e,t)}}function yc(e){const t=[];return e.forEach(e=>{e.allocations.forEach(e=>{const n=e.discountDetails.discount;kl(n)&&t.push({amount:e.amount,discountApplication:fc(n,e.amount)})})}),t}function vc(e,t){return _c(e.reduce((e,t)=>e+t.totalAmountAfterLineDiscounts.amount,0),e[0]?.totalAmountAfterLineDiscounts.currencyCode??t)}function _c(e,t){return{amount:Number(e.toFixed(2)),currencyCode:t}}function bc(e){return e.sellingPlan?{sellingPlan:{id:e.sellingPlan.id,name:e.sellingPlan.name}}:null}function Pc(e){return e.map(e=>({key:e.name,value:String(e.value)}))}function kc(e){if(!e)return"";switch(e){case"MERCHANDISELINE":return"LINE_ITEM";case"DELIVERYLINE":return"SHIPPING_LINE";default:return""}}function Sc(e,t){const n=e.value;return"FixedAmountValue"===n.typename?t:{percentage:n.percentage}}function wc(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 Cc(e,t){const n=new Map;return Ac(e,t).forEach(e=>{Tc(n,e),e.lineComponents.forEach(e=>Tc(n,e))}),n}function Ec(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=ce(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?ue(u,({method:e})=>e.cost.amount,({method:e,availableDeliveryLine:t})=>"ONE_TIME_PURCHASE"===t.type?he(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 xc({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=uc(lc(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 Ac(e,n).map(e=>{const n=uc(e.variantId),r=e.itemPrice?e.itemPrice:{amount:0,currencyCode:t};return{discountAllocations:yc(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:uc(e.productId)??null,title:e.title,vendor:e.vendor,type:e.productType,untranslatedTitle:e.untranslatedTitle??null,url:e.productUrl??null},sku:cc(e.sku)??null,title:e.subtitle??null,untranslatedTitle:e.untranslatedSubtitle??null},finalLinePrice:vc(e.lineAllocations,t),sellingPlanAllocation:bc(e),properties:Pc(e.properties),lineComponents:e.lineComponents.map(e=>function(e,t){const n=uc(e.variantId),r=e.itemPrice?e.itemPrice:{amount:0,currencyCode:t};return{discountAllocations:yc(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:uc(e.productId)??null,title:e.title,vendor:e.vend
2or,type:e.productType,untranslatedTitle:e.untranslatedTitle??null,url:e.productUrl??null},sku:cc(e.sku)??null,title:e.subtitle??null,untranslatedTitle:e.untranslatedSubtitle??null},finalLinePrice:vc(e.lineAllocations,t),sellingPlanAllocation:bc(e),properties:Pc(e.properties)}}(e,t))}})}(e,l,o),v={selectedDeliveryOptions:Ec(e,i,o,Cc(e,o),Lc(e,o),c)},_=Boolean(p)&&wc("acceptEmailMarketing",e,i,o),b=wc("acceptSmsMarketing",e,i,o),P=o?.smsMarketingPhone||i?.smsMarketingPhone?.value||e.current.fields.smsMarketingPhone.value||null;let k=!1;k=o?Boolean(b):b&&Boolean(P);const S=k&&P||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(Pl(t)){const n=t.amount;if(!n)return e;e.push(fc(t.discount,n))}return e},[]):[]}(e,o),C=o?.totalSavings||e?.current?.fields?.totalSavings.value||null,E=ac(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=ce(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?ue(s,({method:e})=>e.cost.amount,({method:e,line:t})=>"ONE_TIME_PURCHASE"===t.type?he(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:de(t)??t??null,isFirstOrder:n??null};return{id:de(e)??e??null,customer:r}}({orderId:n,customerId:r,isFirstOrder:a}),N=e.current.fields.customAttributes.value,M=(N?.length?N: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 pe.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 pe.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:oc(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:k,attributes:M,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 Ic(e){return{...e,value:"<redacted>"}}function Ac(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?me(r.lines,a):[]}function Tc(e,t){const n=uc(t.variantId);void 0!==n&&e.set(t.stableId,n)}function Lc(e,t){const n=new Map,r=new Map;
2return Ac(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 Rc={sectionComplete:!0,pageSubmit:!0,shippingMethodsFilled:!0,shippingMethodSelected:!0};function Nc(e){if(!(e.type in Rc))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 Mc(e,t){if(Nc(e))return xc(t)}function Dc(){const{checkout:{negotiator:e}}=ie(),n=e.current.fields.buyerIdentity;return t(()=>{const e=n.value?.customerProfile;return Boolean("BusinessCustomerProfile"===e?.__typename&&e?.checkoutExperienceConfiguration?.editableShippingAddress)})}function zc(){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 Oc(e){return t=>`${e}${t}`}function Bc(e,t){const n=c().replace(/:/g,"");return e??t(n)}const Fc="PortalHost",Vc="data-portal-order";function Uc(e){e.setAttribute(Vc,String(performance.now()))}function qc(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(Vc));e>n&&(n=e,t=r)}return t}function jc(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=qc(document.getElementById(Fc));return t.some(e=>e instanceof Node&&n?.contains(e))}function Hc(e){if(!e)return!1;const t=qc(document.getElementById(Fc));return t?.contains(e)??!1}function $c(e){if(!e)return!1;const t=document.getElementById(Fc);return t?.contains(e)??!1}const Yc=Oc("Portal");function Wc(){return d("div",{id:Fc})}function Gc({children:e}){const[t,n]=s(null),r=Bc(void 0,Yc);return a(()=>{const e=document.getElementById(Fc)??document.body,t=document.createElement("div");return t.setAttribute("id",r),Uc(t),e.appendChild(t),n(t),()=>{e.removeChild(t)}},[r]),t&&u(e,t)}class Jc extends Error{constructor(){super(...arguments),this.name="SpriteLoadError",this.groupingHash="checkout-web-ui:sprite-load-error"}}function Kc(e,t){return new Jc(`Failed to fetch sprite "${function(e){try{const t=new URL(e);return t.username="",t.password="",t.search="",t.hash="",t.toString()}catch{return e.split("#")[0].split("?")[0]}}(e)}": ${t}`)}function Qc(e,t){return t instanceof Jc?t:Kc(e,t instanceof Error?t.message:String(t))}const Xc={errorClass:"SpriteLoadError",severity:"warning"};function Zc(e,t){try{return eu.ensureFetched(e)}catch(n){throw eu.reportLoadFailure(e,n,t),n}}const eu=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(Qc(e,t),Xc)}):n.error(Qc(e,t),Xc))}#n(e){const t=fetch(e).then(t=>{if(!t.ok)throw Kc(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:Qc(e,t)}),t});return this.#e.set(e,{status:"pending",promise:t}),t}},tu=["cdn.shopify.com"],nu=f(null);function ru({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(nu.Provider,{value:a,children:[e,d(au,{sprites:n})]})}function au({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 iu({iconUrl:e,allowRelativeUrl:t}){const n=m(!1);l(()=>{n.value=!0},[n]);const r=h(nu),{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&&tu.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(ou,{spriteUrl:a,symbolId:i});const o=Zc(a,r?.logger);return d("span",{dangerouslySetInnerHTML:{__html:o},"aria-hidden":"true"})}function ou({spriteUrl:e,symbolId:t}){const n=h(nu);if(!n)throw new ge("No sprite registry available");const r=Zc(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 su=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 lu({iconUrl:e,fallback:t,allowRelativeUrl:n=!1}){return d(su,{fallback:t,children:d(p,{fallback:t,children:d(iu,{iconUrl:e,allowRelativeUrl:n})})})}const cu=f(void 0);function uu(){return h(cu)}function du({children:e,level:t}){const n=uu(),r=t??(n??0)+1;return d(cu.Provider,{value:r,children:e})}const pu=f({colorMix:!1,customProperties:!1,flexGap:!1});function mu({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;
2if(!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(pu.Provider,{value:i,children:e})}const hu=f(null);function gu({children:e}){const[t,a]=s(new Map),i=n(e=>t.get(e),[t]),o=n(e=>{a(t=>{const n=t.get(e.id);if(n&&!Object.keys(e).some(t=>n[t]!==e[t]))return t;const r=new Map(t);return r.set(e.id,{...n,...e}),r})},[]),l=n(e=>{a(t=>{const n=new Map(t);return n.delete(e),n})},[]),c=n(()=>{a(new Map)},[]),u=r(()=>({getInteraction:i,upsertInteraction:o,deleteInteraction:l,clearInteractions:c}),[c,l,i,o]);return d(hu.Provider,{value:u,children:e})}const fu="forwarding-external-new-window-message";function yu({external:e,native:t}){if(e&&t)return fu}const vu=f(null),_u=f(void 0),bu=Oc("Overlay");function Pu({activatorRef:e,children:t}){const n=i(new Map),a=Bc(void 0,bu),[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(_u.Provider,{value:h,children:t})}function ku({children:e}){return d(_u.Provider,{value:void 0,children:d(vu.Provider,{value:null,children:e})})}function Su(){const e=h(_u);if(e)return e}const wu=f(void 0),Cu=()=>h(wu),Eu=()=>{const e=Cu();return r(()=>({closeOverlay(t){e?.close(t)}}),[e])};function xu({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(wu.Provider,{value:n,children:e})}const Iu=f(void 0);function Au({children:e}){const n=i({sheet:!1,modal:!1}),a=m(0),o=t(()=>a.value>0),s=r(()=>({isLocked:e=>n.current[e],lock(e){n.current[e]=!0},unlock(e){n.current[e]=!1},openModalCount:a,isModalOpen:o}),[a,o]);return d(Iu.Provider,{value:s,children:e})}function Tu(e){const t=h(Iu),[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 Lu(e){const t=Su(),n=Tu(e);return r(()=>{if(!n)return;const{active:e,setActive:r}=n;return t?{...t,setActive:r,active:e}:void 0},[t,n])}const Ru=f(void 0);function Nu({announcementEmitter:e,children:t}){return d(Ru.Provider,{value:e,children:t})}function Mu(){const e=h(Ru);if(!e)throw new ge("Missing AnnouncementContext Context ");return e}var Du="_14u2r6s0 _1fragem121";const zu=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 Ou({content:e,role:t="status"}){return zu.announce({content:e,role:t})}function Bu(){const[e,t]=s([]),n=e.filter(e=>"status"===e.role),r=e.filter(e=>"alert"===e.role);return a(()=>zu.subscribe(e=>{t(e)}),[]),d(y,{children:[d("div",{role:"status",className:Du,children:n.map(({content:e,role:t})=>d("span",{children:e},`${e}-${t}`))}),d("div",{role:"alert",className:Du,children:r.map(({content:e,role:t})=>d("span",{children:e},`${e}-${t}`))})]})}var Fu="rij0560 _1fragem121";const Vu=f(null);function Uu(){const e=h(Vu);if(null==e)throw new fe("No app context available");return e}function qu(){return h(Vu)?.animatedTextFieldLabels??!1}function ju(){return Uu().currency}function Hu(){return Uu().translate}function $u(){return Uu().formatNumber}function Yu(){return Uu().geolocation}function Wu(){return Uu().locale}function Gu({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}){const v=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}),[t,n,m,h,a,i,o,s,l,c,u,p,f,y]);return d(Vu.Provider,{value:v,children:d(Nu,{announcementEmitter:g,children:d(mu,{children:d(du,{children:d(Au,{children:d(xu,{children:d(gu,{children:[d(ru,{logger:y,children:e}),d(Ju,{}),d(Bu,{})]})})})})})})})}function Ju(){const e=Hu();
2return d(y,{children:[d("div",{id:fu,"aria-hidden":!0,className:Fu,children:e("externalNewWindow")}),d("div",{id:"forwarding-new-window-message","aria-hidden":!0,className:Fu,children:e("newWindow")}),d("div",{id:"forwarding-external-message","aria-hidden":!0,className:Fu,children:e("external")})]})}function Ku(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 Qu(e){return/^span\s+\d+$/.test(e)?e:"auto"}function Xu(e){return console.warn(`Invalid transform value '${String(e)}'. Expected 'none', 'translate(<size>)' or 'translate(<size>, <size>)' with px or % magnitudes.`),""}function Zu(e){return ed(e)}function ed(e){if("0"===e)return 0;const t=_e(e);return void 0===t||"px"!==t.unit&&"%"!==t.unit?void 0:"%"===t.unit?`${t.number}%`:t.number}function td(e){if("auto"===e||"string"!=typeof e)return"auto";const t=ed(e);return void 0===t?(console.warn(`Invalid inset coordinate '${e}'. Expected a px or % size, or 'auto'. Falling back to 'auto'.`),"auto"):ve(t)??"auto"}function nd(e){return ad(e,{auto:!0,fitContent:!0})}function rd(e){return ad(e,{none:!0})}function ad(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=_e(e),r=!n||"px"!==n.unit&&"%"!==n.unit&&"ch"!==n.unit&&"em"!==n.unit&&"lh"!==n.unit&&"vh"!==n.unit?void 0:ve(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 id(e){return`url(${JSON.stringify(e)})`}const od={auto:"flex",inline:"inlineFlex",block:"flex",none:"none"},sd={auto:"block",inline:"inline",block:"block",none:"none"},ld={auto:"inline",inline:"inline",block:"block",none:"none"},cd={auto:"grid",inline:"inlineGrid",block:"grid",none:"none"},ud=e=>sd[e],dd=e=>ld[e],pd=e=>od[e],md=e=>cd[e],hd=f(void 0),gd=()=>h(hd),fd=f(!1);function yd(){return h(fd)}const vd=f(!1);function _d(){return h(vd)}const bd=new Map([["none",0],["faster",88.9],["fast",133.333],["base",200],["slow",300],["slower",450],["slowest",675]]);function Pd(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=zc();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?bd.get(m??"none"):bd.get(h??"none"));return()=>{clearTimeout(n),clearTimeout(t)}},[m,h,e]),l?e?"entering":"exiting":e===r?e?"entered":"exited":e?"enter":"exit"}var kd={Transition:"_94sxtb1 _94sxtb0 _1fragemup _1fragemv4 _1fragemws _1fragem12q",transitionDurationVariant:{none:"_94sxtb9 _94sxtb2 _1fragem12i",faster:"_94sxtba _94sxtb3 _1fragem12c",fast:"_94sxtbb _94sxtb4 _1fragem12d",base:"_94sxtbc _94sxtb5 _1fragem12e",slow:"_94sxtbd _94sxtb6 _1fragem12f",slower:"_94sxtbe _94sxtb7 _1fragem12g",slowest:"_94sxtbf _94sxtb8 _1fragem12h"},transitionOpacity:{enter:"_94sxtbm _94sxtbg _1fragem11k",entering:"_94sxtbn _94sxtbh _1fragem11u",entered:"_94sxtbo _94sxtbi _1fragem11u",exit:"_94sxtbp _94
2sxtbj _1fragem11u",exiting:"_94sxtbq _94sxtbk _1fragem11k",exited:"_94sxtbr _94sxtbl _1fragem11k"}};function Sd({id:e,open:t,renderChildrenWhenCollapsed:n=!1,children:r,duration:o="slow",properties:s=["height"],onTransition:l}){const c=Pd(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(kd.Transition,kd.transitionDurationVariant[o],s.includes("opacity")&&kd.transitionOpacity[c]),hidden:m,children:d("div",{ref:u,children:m&&!n?null:r})})}const wd=f(void 0);function Cd({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(wd.Provider,{value:c,children:e})}function Ed({layoutId:e,activatorId:t}){const n=h(wd);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&&Td(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}}}wd.displayName="DisclosureContext";const xd=Oc("DisclosureActivator");function Id(e,t){const n=e.displayName||e.name||"Component",r=_(({id:r,toggles:a,...i},o)=>{const s=Bc(r,xd),l=Ed({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 Ad(e){const t=_((t,n)=>{const{id:r}=t,a=Ed({layoutId:r});if(a){const{open:r,duration:i,transition:o,isToggleable:s,transitionId:l,layoutAttributes:c}=a,u=d(e,{...t,...c,ref:n});return"revealBlock"===o&&s?d(Sd,{open:r,id:l,duration:i,children:u}):r?u:null}return d(e,{...t,ref:n})});return t.displayName=`DisclosureLayout(${e.displayName||e.name||"Component"})`,t}function Td(e=[]){return"boolean"==typeof e?{}:(Array.isArray(e)?e:[e]).reduce((e,t)=>({...e,[t]:!0}),{})}function Ld(e){return"command"===e?.type&&"clipboard"===e.kind}function Rd(e){return"command"===e?.type&&"visibility"===e.kind}function Nd(e){return"command"===e?.type&&"overlay"===e.kind}function Md(e){return"interest"===e?.type}function Dd(){const e=h(hu);if(null===e)throw new fe("No Interactions in context");return e}function zd(){const{getInteraction:e}=Dd();return{showOverlay:n(t=>{const n=e(t);Nd(n)?n.open():console.warn(`No overlay found for ID "${t}".`)},[e]),hideOverlay:n(t=>{const n=e(t);Nd(n)?n.close():console.warn(`No overlay found for ID "${t}".`)},[e])}}let Od="",Bd=[],Fd=0,Vd=0,Ud=[],qd=!1;class jd extends Error{}function Hd(){return Fd>=Od.length}function $d(){return Od[Fd++]}function Yd(e){const t=Od.substring(Vd,Fd).trim();Bd.push({type:e,text:t})}function Wd(){return Hd()?ep:Od[Fd]}function Gd(){const e=$d();switch(e){case tp:break;case Jd:Yd("LEFT_PAREN");break;case Kd:Yd("RIGHT_PAREN");break;case"@":{for(;!ip.has(Wd());)$d();const e=Od.substring(Vd,Fd);"@media"===e||"@container"===e?Yd("MEDIA_TYPE"):Ud.push(`Invalid media type "${e}" starting at position ${Vd}.`);break}case Qd:Yd("COMMA");break;case Zd:case Xd:t="=",Hd()||Od[Fd]!==t||Fd++,Yd("COMPARATOR");break;case np:case rp:for(Vd++;Wd()!==e;)$d();Yd("IDENTIFIER"),$d();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(;!ip.has(Wd());)$d();const e=Od.substring(Vd,Fd),t=e.toLowerCase();if("and"===t||"or"===t)e!==t?Ud.push(`Keyword "${e}" is not case sensitive at position ${Vd}.`):Yd("OPERATOR");else if("inline-size"===t||"block-size"===t)e!==t?Ud.push(`Property "${e}" is not case sensitive at position ${Vd}.`):Yd("PROPERTY");else{if(Wd()===tp)for($d();!ap.has(Wd());)$d();Yd("IDENTIFIER")}}else Ud.push(`Unexpected character "${e}" at position ${Fd}.`)}var t}const Jd="(",Kd=")",Qd=",",Xd="<",Zd=">",ep="\0",tp=" ",np="'",rp='"',ap=new Set([ep,Jd,Kd,Qd,Xd,Zd]),ip=new Set([...ap,tp]);let op=[],sp=0;function lp(e){for(const t of e)if(cp(t))return up(),!0;return!1}function cp(e){return!pp()&&(Array.isArray(e)?e.includes(mp().type):mp().type===e)}function up(){return pp()||sp++,hp()}function dp(e,t){if(cp(e))return up();throw new jd(`${t}\nInstead we found this word/character: "${mp().text}"`)}function pp(){return"EOF"===op[sp].type}function mp(){return op[sp]}function hp(){return op[sp-1]}const gp="s-default";function fp(){return{condition:yp(),value:dp("IDENTIFIER","Expected an identifier").text}}function yp(){dp("LEFT_PAREN",'Expected a condition to start with a left parenthesis "("');const e=vp();let t=null;cp("COMPARATOR")&&(t=vp(e.operator)),dp("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"===mp().type){const e=dp("OPERATOR","Expected an operator");return{type:"compound-condition",left:n,right:yp(),operator:e.text}}return n}function vp(e){const t=e?hp():dp(["IDENTIFIER","PROPERTY"],"Expected an identifier or property"),n=dp("COMPARATOR",'Expected a comparison operator (like "<" or ">")');if(e&&e[0]===n.text[0])throw new jd("Cannot have two different c
2omparison operators (a less-than and a greater-than) in the same condition.");const r=dp("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 _p(e){try{return t=function(e){if(qd)throw Error("Cannot tokenize recursively");for(qd=!0,Od=e,Bd=[],Fd=0,Vd=0,Ud=[];!Hd();)Vd=Fd,Gd();if(Vd=Fd,Yd("EOF"),qd=!1,Ud.length)throw new jd(Ud.join("\n"));return Bd}(e),op=t,sp=0,function(){const e={responsiveType:dp("MEDIA_TYPE",'Expected a media type such as "@media" or "@container"').text,conditionalValues:[],fallbackValue:"",state:"valid"};if("@container"===e.responsiveType){const t="IDENTIFIER"===mp().type?up().text:gp;e.name=t}for(e.conditionalValues.push(fp());lp(["COMMA"])&&"LEFT_PAREN"===mp().type;)e.conditionalValues.push(fp());if("COMMA"!==hp().type)throw new jd(`Expected a comma before the fallback value of "${mp().text}"`);if(e.fallbackValue=dp("IDENTIFIER","Expected a final fallback value to be defined").text,"EOF"!==mp().type)throw new jd(`Expected the query to end, instead found "${mp().text}"`);return e}()}catch(n){if(n instanceof jd)return{state:"invalid",error:n.message};throw new Error("Unknown error",{cause:n})}var t}function bp(e){return"string"==typeof e&&e.startsWith("@container")}function Pp(e){return"string"==typeof e&&e.startsWith("@media")}function kp(e){if(Wl(e))return e.base;if(!bp(e)&&!Pp(e))return e;const t=_p(e);return"invalid"===t.state?void 0:t.fallbackValue}function Sp(e,t){if(e===t)return!0;if(Wl(e))return Object.values(e).some(e=>Sp(e,t));if(!bp(e)&&!Pp(e))return!1;const n=_p(e);return"invalid"!==n.state&&(n.fallbackValue===t||n.conditionalValues.some(e=>e.value===t))}function wp(e,t){return Wl(e)?Object.fromEntries(Object.entries(e).map(([e,n])=>[e,t(n)])):t(e)}function Cp(e){const t=e,i=_(function(e,i){const{upsertInteraction:o,deleteInteraction:l}=Dd(),{display:c}=e,u="none"===c,p=r(()=>Sp(c,"none"),[c]),[m,h]=s(),[g,f]=s(p);p!==g&&(f(p),"shown"===m&&h(void 0));const y=void 0===m?!u:"shown"===m,v="hidden"===m,_="shown"===m&&p,b=n(()=>h("hidden"),[]),P=n(()=>h(e=>"hidden"===e||p?"shown":void 0),[p]),k=n(()=>h(e=>(void 0===e?u:"shown"!==e)?"shown":"hidden"),[u]),{id:S}=e;if(a(()=>(S&&o({id:S,type:"command",kind:"visibility",defaultCommand:"--toggle",hide:b,show:P,toggle:k,visible:y}),()=>{S&&l(S)}),[S,y,b,P,k,o,l]),S&&v)return null;const w=S&&_?{...e,display:"auto"}:e;return d(t,{...w,ref:i})});return i.displayName=`VisibilityCommandTargetComponent(${e.displayName||e.name||"Component"})`,i}function Ep(e,{overlayType:t}){const r=_(function(r,i){const{open:o}=r,{upsertInteraction:l,deleteInteraction:c}=Dd(),{active:u,setActive:p}=function(e){const t=function(e){return"modal"===e||"sheet"===e?()=>{const t=Tu(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()}(t),m=Su(),{id:h,onClose:g,onHide:f}=r,y=n(()=>{p(!1),"function"==typeof g&&g(),"function"==typeof f&&f()},[p,g,f]),v=n(()=>{p(!0)},[p]);if(a(()=>()=>{h&&c(h)},[h]),a(()=>{h&&l({id:h,type:"command",kind:"overlay",overlayType:t,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 xp(e){return n(t=>{"function"==typeof e?e(t):null!=e&&(e.current=t)},[e])}function Ip(e,t){const r=xp(e),a=xp(t);return n(e=>{r(e),a(e)},[r,a])}const Ap=["aria-controls","aria-describedby","aria-expanded","aria-haspopup"];function Tp(e,t){return Ap.reduce((n,r)=>({...n,[r]:e?.activatorAttributes[r]??t?.[r]}),{})}const Lp=["onBlur","onClick","onFocus","onKeyDown","onMouseDown","onMouseEnter","onMouseLeave","onMouseUp","onTouchStart"];function Rp(e,t){return Lp.map(n=>{return{[n]:(r=t?.[n],a=Np(n,e),function(e){const t="function"==typeof r?r(e):void 0;return a?.(e),t})};var r,a}).reduce((e,t)=>
2({...e,...t}),{})}function Np(e,t){return function(n){t?.trigger(e,n)}}function Mp(e){const t=_(({overlay:t,...n},r)=>{const a=i(null),o=Ip(r,a);return t?d(Pu,{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 Dp(e,{focusActivatorWhenClosing:t=!1}={}){const n=_((n,r)=>{const{id:i,onClose:o,onHide:s}=n,l=Su(),c=Cu();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 zp(e){if(e)return`${e}Title`}const Op=(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)}},Bp=f(null);function Fp(){const e=h(Bp);if(null===e)throw new fe("No Popper in context");return e}const Vp=f({}),Up=()=>h(Vp);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 jp(e){return Math.abs(e.left)+Math.abs(e.right)+Math.abs(e.top)+Math.abs(e.bottom)}function Hp(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 $p(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 Yp(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 Wp=/^(block|inline)-(start|end)( span-(inline|block)-(start|end))?$/;function Gp(e){return Wp.test(e)}function Jp(e){const t=e.match(Wp);if(!t)return null;const[,n,r,,a,i]=t;return{axis:n,edge:r,...a&&i?{spanAxis:a,spanEdge:i}:{}}}function Kp(e){const t=`${e.axis}-${e.edge}`;return e.spanAxis&&e.spanEdge?`${t} span-${e.spanAxis}-${e.spanEdge}`:t}var Qp={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 Xp(e){if(Gp(e)){const[t,n]=e.split(" ");return e.includes(" ")?{position:ke(t),alignment:n.includes("start")?"end":"start"}:{position:ke(t),alignment:"center"}}return{position:"blockStart",alignment:"center"}}function Zp(e){return e.split(",").map(e=>e.trim()).filter(e=>!!Gp(e))}function em({activator:e,children:t,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[t,r]=s(null),a=m("ltr"),o=i([]),c=i(null),u=n(()=>{null!==e&&(a.value="rtl"===window.getComputedStyle(e).direction?"rtl":"ltr",r(e.getBoundingClientRect()))},[e,a]);return l(()=>{u();const t=Op(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.pu
2sh(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:t,direction:a.value}}(e),[b,P]=function(){const[e,t]=s(null),r=i(null),a=n(e=>{if(r.current?.disconnect(),r.current=null,null!==e&&(t(e.getBoundingClientRect()),"undefined"!=typeof ResizeObserver)){const n=new ResizeObserver(()=>{t(e.getBoundingClientRect())});n.observe(e),r.current=n}},[]);return l(()=>()=>{r.current?.disconnect()},[]),[e,a]}(),k=i(null),S=n(e=>{P(e),k.current=e},[P]),[w,C]=s(""),{current:E,parent:x}=Up(),I=m("absolute"),{position:A,alignment:T}=Xp(p),L=r(()=>{if("none"!==h)return h??function(e){const t=function(e){const t=Jp(e);return t?Kp({...t,edge:"start"===t.edge?"end":"start"}):e}(e),n=function(e){const t=Jp(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[Kp({axis:n,edge:"start",...r}),Kp({axis:n,edge:"end",...r})]}(e);return[t,...n].join(", ")}(p)},[h,p]),{clipping:R,offsets:N,spacing:M,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}=Hp(e,t,s),d=l?.map(({position:e,alignment:t})=>Hp(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=$p(c,u,n,r,a,o,s);if(p.x=y.x,p.y=y.y,i){if(m=Yp(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=jp(m);for(const t of d){const e=$p(t.position,t.alignment,n,r,a,o,s),i=Yp(e,n);if(0===jp(i)){p.x=e.x,p.y=e.y,m=i,g=t.position,f=t.alignment;break}}if(jp(m)>0){let t=e;for(const e of d){const i=$p(e.position,e.alignment,n,r,a,o,s),l=Yp(i,n),c=jp(l);c<t&&(t=c,p.x=i.x,p.y=i.y,m=l,g=e.position,f=e.alignment)}}}m.right&&!m.left&&(p.x+=m.right,h=-10),!m.right&&m.left&&(p.x=0,h=10)}return{offsets:p,clipping:m,spacing:h,resolvedPosition:g,resolvedAlignment:f}}(A,T,b,y,{direction:_,offset:c,preventOverflow:g,sameInlineSize:f,fallbackPositions:L?Zp(L).map(Xp):void 0}),[_,c,A,T,b,g,y,f,L]),O=r(()=>({clipping:R,offsets:N,position:D,alignment:z,popperRect:b,referenceRect:y,spacing:M}),[R,N,D,z,b,y,M]);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:N.x+M+n,y:N.y+r});C((window.devicePixelRatio||1)<2?`translate(${a}px, ${i}px)`:`translate3d(${a}px, ${i}px, 0)`)},[N.x,N.y,M,e]),l(()=>{if(a)return;const e=k.current?.parentElement;e&&Uc(e)},[a]),d(Bp.Provider,{value:O,children:d(Gc,{children:d("div",{className:v(Qp.Popper,Qp.positionVariant[I.value],(x??E)&&Qp.colorSchemeVariant[x??E],a&&Qp.hidden),style:{...y&&{transform:w,...f&&{width:y.width},...u&&{minWidth:Pe(u)}}},ref:S,id:o,"aria-hidden":a||void 0,"data-popper-hidden":a||void 0,children:x&&E?d("div",{className:Qp.colorSchemeVariant[E],children:t}):t})})})}var tm={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 nm(e){const{children:t,id:r}=e,o=i(!1),s=Su(),{active:l=!1,setActive:c}=s??{},u=n(e=>
2{["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:Se({screenReaders:"only"}),children:t}),d(rm,{id:r,open:l,onMouseEnter:()=>{o.current||c?.(!0)},onMouseLeave:()=>{c?.(!1)},children:t})]})):d(rm,{...e})}const rm=Dp(function(e){const t=_(function(t,r){const{id:o,open:l}=t,{upsertInteraction:c,deleteInteraction:u}=Dd(),[p,m]=s(!1),h=i(),g=n(()=>{h.current&&(clearTimeout(h.current),h.current=void 0)},[]),f=n(({delay:e=0}={})=>{g(),e>0?h.current=setTimeout(()=>m(!1),e):m(!1)},[g]),y=n(()=>{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?{...t,open:p,ref:r}:{...t,ref:r})});return t.displayName=`InterestTargetComponent(${e.displayName||e.name||"Component"})`,t}(function({children:e,id:t,open:n,onMouseEnter:r,onMouseLeave:a}){const{getInteraction:i}=Dd(),o=t?i(t):void 0,s=Su(),{active:l=!1}=s??{};s?.setActivatorAttributes({"aria-controls":l?t:void 0,"aria-expanded":l});const c=o?.invokerRef?.current||s?.activatorRef.current||null,u=Pd(Boolean(n),{exit:"base"}),p=Boolean(t&&Md(o)&&!s),m=p?d("div",{id:t,role:"tooltip","aria-hidden":"true",className:Se({screenReaders:"only"}),children:e}):null;return d(y,{children:[m,"exited"!==u&&d(em,{activator:c,preventOverflow:!0,offset:8,children:d(am,{id:p?void 0:t,transition:u,onMouseEnter:()=>{Md(o)&&o.show(),r?.()},onMouseLeave:()=>{Md(o)&&o.hide({delay:100}),a?.()},children:e})})]})}));function am({children:e,id:t,onMouseEnter:n,onMouseLeave:r,transition:a}){const{clipping:i,spacing:o,position:s}=Fp(),l="blockStart"===s||"blockEnd"===s,c=i.right||i.left,u=l&&c?b({[tm.arrowNudge]:`${c+o}px`}):void 0,p=v(tm.Tooltip,tm.tooltipPositionVariant[s],tm.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(im,{})]})}function im(){const{position:e}=Fp();return d("div",{className:v(tm.Arrow,tm.arrowPositionVariant[e])})}async function om(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 fe("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 fe("Failed to copy text to clipboard")}const sm=Oc("CommandInvoker");function lm(e,{commands:{clipboard:t=!0,visibility:r=!0,overlay:o=!0}={}}={}){const l=e.displayName||e.name||"Component",c=_(function({command:t,commandFor:r,onClick:o,overlay:l,...c},u){const{getInteraction:p}=Dd(),[m,h]=s(!1),[g,f]=s(""),y=Hu(),v=r?p(r):void 0,_=Ld(v)&&null!=v.clipboard.text?v:void 0,b=n(async()=>{o?.();const{text:e,onCopy:t,onCopyError:n}=_.clipboard;let r=!1;try{await om(e),r=!0}catch(a){console.warn("ClipboardItem: failed to copy text to clipboard",a)}finally{if(r){const e=y("clipboardCopied");f(e),h(!0),Ou({content:e}),t?.()}else{const e=y("clipboardFailedToCopy");f(e),h(!0),Ou({content:e}),n?.()}k(),P.current=setTimeout(()=>{h(!1)},2500)}},[o,_,y]),P=i(),k=()=>{P.current&&clearTimeout(P.current)};return a(()=>()=>k(),[]),d(e,{...c,command:t,commandFor:r,onClick:_?b:o,overlay:_?d(rm,{open:m,children:g}):l,ref:u})}),u=_(function({commandFor:t,id:n,onClick:r,...a},i){const o=Bc(n,sm),s=Ed({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}
2)}),p=_(function({command:t,commandFor:r,id:a,onClick:o,...s},l){const c=Bc(a,sm),{getInteraction:u,upsertInteraction:p}=Dd(),m=r?u(r):void 0,h=i(null),g=Ip(l,h),f=n(e=>{const t=r?u(r):void 0;if(Nd(t)){const{overlayType:n}=t;h.current&&"popover"===n&&e&&p({...t,invokerRef:h})}},[r,u,p]);if(m){let n={};if(Rd(m)){const{hide:e,show:a,toggle:i,visible:s}=m;n={onClick:()=>{switch(t){case"--hide":e();break;case"--show":a();break;case"--toggle":i()}o?.()},"aria-controls":r,"aria-expanded":s}}else if(Nd(m)){const{active:e,close:a,open:i,overlayType:s,toggle:l}=m;n={onClick:()=>{var n;switch(("--show"===t||"--toggle"===t&&!e)&&(n=h.current)instanceof HTMLElement&&document.activeElement!==n&&n.focus({preventScroll:!0}),t){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:t,commandFor:r,id:c,...n,ref:g})}return null}),m=_(function({command:n="--auto",commandFor:a,...i},s){const{getInteraction:m}=Dd();if(Ed({layoutId:a})&&("--hide"===n||"--show"===n||"--toggle"===n))return d(u,{...i,command:n,commandFor:a,ref:s});const h=a?m(a):void 0;if(h&&!Md(h)){const{defaultCommand:e}=h,u="--auto"===n?e:n;if("--copy"===u&&t&&Ld(h))return d(c,{...i,command:u,commandFor:a,ref:s});if(("--hide"===u||"--show"===u||"--toggle"===u)&&(r&&Rd(h)||o&&Nd(h)))return d(p,{...i,command:u,commandFor:a,ref:s});if("--show"===u||"--hide"===u||"--toggle"===u||"--copy"===u){let e;Ld(h)?e="clipboard":Rd(h)?e="visibility":Nd(h)&&(e="overlay"),console.warn(`Command "${n}" targets "${a}" but ${l} does not support ${e} commands.`)}else console.warn(`Unknown command "${n}" for ${l}`)}return d(e,{...i,command:n,commandFor:a,ref:s})});return m.displayName=`CommandInvokerComponent(${l})`,m}function cm(e,{tapToggles:t=!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}=Dd(),f=r?h(r):void 0,y=i(null),v=i(),_=i(),b=n(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)}},[]),P=Ip(s,y),k=Ip(P,b),S=n(e=>{const t=r?h(r):void 0;Md(t)&&g(e?{...t,invokerRef:y}:{...t,invokerRef:void 0})},[r,h,g]),w=Md(f)&&f.active,C=n(e=>{["Escape","Esc"].includes(e.key)&&Md(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=n(e=>{const t=e.target;t instanceof Node&&!y.current?.contains(t)&&(t instanceof Element&&t.closest('[role="tooltip"]')||Md(f)&&(f.hide(),S(!1)))},[f,S]);if(a(()=>{if(t&&w)return document.addEventListener("click",E),()=>{document.removeEventListener("click",E)}},[w,E]),Md(f)){const n={"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?.()},...t&&{onClick:()=>{"touch"===v.current&&(f.active?(f.hide(),S(!1)):(f.show(),S(!0))),c?.()}}};return d(e,{...o,...n,ref:k})}return d(e,{...o,ref:s})});return o.displayName=`InterestInvokerComponent(${r})`,o}const um=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])=>we(e)?.map(e=>[e,t])??[[e,t]])),dm={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"},pm={center:"center",end:"end",normal:"normal","space-between":"between","space-around":"around","space-evenly":"evenly",start:"start",stretch:"stretch"},mm={baseline:"baseline",center:"center",end:"end",normal:"normal",start:"start",stretch:"stretch"},hm={auto:"auto",hidden:"hidden"},gm={alignContent:{...pm},placeContent:{...pm},alignItems:{...mm},alignSelf:{auto:"auto",baseline:"baseline",center:"center",end:"end",start:"start",stretch:"stretch"},placeItems:{...mm}
2,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:{...pm},justifyItems:{...mm},objectFit:{contain:"contain",cover:"cover",fill:"fill"},boxShadow:{none:"none",extraSmall:"extraSmall",small:"small",base:"base",large:"large",extraLarge:"extraLarge"},overflow:{...hm},overflowBlock:{...hm},overflowInline:{...hm},padding:{...dm},paddingBlock:{...dm},paddingInline:{...dm},paddingBlockStart:{...dm},paddingBlockEnd:{...dm},paddingInlineStart:{...dm},paddingInlineEnd:{...dm},gap:{...dm},rowGap:{...dm},columnGap:{...dm},position:{absolute:"absolute",relative:"relative",sticky:"sticky"},zIndex:{portal:"portal"}},fm={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}},ym={backgroundImage:id,blockSize:nd,gridAutoColumns:e=>e,gridAutoRows:e=>e,gridColumn:Qu,gridRow:Qu,gridTemplateColumns:Ku,gridTemplateRows:Ku,inlineSize:nd,insetBlock:td,insetBlockEnd:td,insetBlockStart:td,insetInline:td,insetInlineEnd:td,insetInlineStart:td,maxBlockSize:rd,maxInlineSize:rd,minBlockSize:ad,minInlineSize:ad,transform:function(e){if("none"===e)return"none";if("string"!=typeof e||!e.startsWith("translate(")||!e.endsWith(")"))return Xu(e);const t=e.slice(10,-1).split(",");if(t.length>2)return Xu(e);const n=Zu(t[0].trim()),r=2===t.length?Zu(t[1].trim()):0;return void 0===n||void 0===r?Xu(e):`translateX(calc(${ve(n)} * ${ye.global.transformDirectionModifier})) translateY(${ve(r)})`}},vm=/\s+/;function _m(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 fm?bm(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 um&&r===um[n]||(t[n]=r);return t}(Pm(r,t)):Pm(r,t),i=wm(a,ym),o=wm(a,gm),s=Se(i),{className:l,style:c}=Ce(o);return{className:v(s,l),style:c}}function bm(e,t){const{limit:n}=fm[t];return wp(e,e=>{if(void 0===e||"string"!=typeof e)return;const t=e.trim().split(vm,n??4);return 1===t.length?t[0]:(3===t.length&&t.push(t[1]),t)})}function Pm(e,t){const n={},r=(e,r)=>{const a=function(e,t){return function(e){return e.property in ym}(e)?function(e,t,n){const r=n?.transforms?.[e]??ym[e];return wp(t,e=>{if(void 0!==e)return Ie(e)?Sm(e.map(e=>r?.(e))):r?.(e)})}(e.property,e.value,t):function(e){return e.property in gm}(e)?function(e,t,n){const r=gm[e],a=t=>{const a=n?.transforms?.[e]?.(t);return r[a??t]};return wp(t,e=>Ie(e)?Sm(e.map(a)):a(e))}(e.property,e.value,t):void 0}({property:e,value:r},t),i=function(e,t){const n=we(e);if(!n||0===n.length)return{[e]:t};if(Wl(t)){const e=Object.entries(t),r={};for(let t=0;t<n.length;t++){const a=n[t],i={};for(const[n,r]of e)i[n]=xe(r)?r[t]:r;r[a]=i}return r}const r=xe(t),a={};for(let i=0;i<n.length;i++)a[n[i]]=r?t[i]:t;return a}(e,a);for(const[t,o]of Object.entries(i)){const e=km(o);if(void 0===e)continue;const r=n[t];if(Wl(e)&&void 0!==r){const a=Wl(r)?r:{base:r};n[t]={...a,...e}}else n[t]=e}};for(const a of Ee)a in e&&r(a,e[a]);for(const[a,i]of Object.entries(e))Ee.includes(a)||r(a,i);return n}function km(e){if(!Wl(e))return e;const t=Object.entries(e).filter(([,e])=>void 0!==e&&""!==e);return t.length>0?Object.fromEntries(t):void 0}function Sm(e){if(!Array.isArray(e)||2!==e.length)return e;const[t,n]=e;return[t,n,t,n]}function wm(e,t){const n={};for(const r of Object.keys(e))r in t||(n[r]=e[r]);return n}const Cm=Object.keys(ne).filter(e=>"base"!==e),Em=new Set([">",">="]),xm=new Set(["<","<="]);function Im(e){return"inline-size"===e}function Am(e){if("invalid"===e.state)return e;function t(e){return!!Im(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))&&
2(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=Em.has(t.operator),o=Em.has(n.operator),s=xm.has(t.operator),l=xm.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=Em.has(t.operator),a=Em.has(n.operator),i=xm.has(t.operator),o=xm.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!!Em.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)||!Em.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 Tm(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&&!(!Im(o=e.property)&&(console.warn(`Media queries should be based on 'inline-size'. Use 'inline-size' instead of '${o}'.`),1)||(i=e.value,!Cm.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 '${Cm.join("', '")}' instead.`):console.warn(`Media queries should use valid breakpoints${n}. Found '${i}'. Use one of '${Cm.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 Lm=Oc("ContainerQueryStyle");function Rm({cssClassNameSelector:e,property:t,value:n,config:r}){const{className:a,style:i}=_m({[t]:n},r);if(!a)return null;const o=function(e){if(Nm.has(e))return Nm.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 Nm.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){const r=e[1].trim(),i=Mm(e[2].trim(),n);if(r.includes("[dir=")){const e=r.match(/\[dir="[^"]+"\]/)?.[0];e&&r.match(/\.([^\s[\]]+)/)&&a.push(`${e} .${t}{${i}}`)}else a.push(`.${t}{${i}}`)}}return a.join("")}(o,e,i);return s}const Nm=new Map;function Mm(e,t){return e.replace(/var\(--[^)]+\)/g,e=>{const n=e.match(/var\(([^)]+)\)/)?.[1];return n&&t[n]?t[n]:e})}function Dm(e){if("compound-condition"===e.type){const t=Dm(e.left),n=Dm(e.right);return`${t} ${e.operator} ${n}`}return`(${e.property} ${e.operator} ${e.value})`}function zm(e,t){const{containerQueryProps:n,mediaQueryProps:a,literalProps:i}=r(()=>{const t={},n={},r={};for(const[i,o]of Object.entries(e||{}))null!=o&&(bp(o)?t[i]=o:Pp(o)?n[i]=o:r[i]=o);const a=new Set(Object.keys(n).flatMap(e=>we(e)??[e]));for(let e=a.size>0;e;){e=!1;for(const[t,i]of Object.entries(r)){if(Ae(i))continue;const o=we(t);if(o?.length&&Om(o[0],i))continue;const s=o?.length?o:[t];if(s.some(e=>a.has(e))){n[t]=i,delete r[t];for(const e of s)a.add(e);e=!0}}}return{containerQueryProps:t,mediaQueryProps:n,literalProps:r}},[e]),{className:o,style:s,styleElement:l}=function(e,t){const n=Bc(void 0,Lm),{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(!bp(l))continue;const e=Am(_p(l));if("invalid"===e.state)continue;r[s]=e.fallbackValue;const i=e.conditionalValues.map(r=>{const a=Rm({cssClassNameSelector:n,property:s,value:r.value,config:t});return a?`${e.responsiveType}${"@container"===e.responsiveType&&e.name?` ${e.name} `:""}${Dm(r.condition)}{${a}}`:""}
2).filter(Boolean).join("");a.push({property:s,cssString:i})}const{className:i,style:o}=_m(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(!Pp(r)){n[t]=r;continue}const e=Tm(_p(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 _m(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?_m(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(Ee.includes(c)){const e=we(c)??[];if(e.length>0&&Om(e[0],u))continue;for(const t of e)r.add(t)}else{if(Om(c,u))continue;r.add(c)}for(const[c,u]of Object.entries(t))if(Ee.includes(c)){const e=we(c)??[];if(e.length>0&&Om(e[0],u))continue;for(const t of e)a.add(t)}else{if(Om(c,u))continue;a.add(c)}for(const[c,u]of Object.entries(n))if(Ee.includes(c)){const e=we(c)??[];if(e.length>0&&Om(e[0],u))continue;for(const t of e)i.add(t),o.add(t)}else{if(Om(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=>Ae(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 Om(e,t){const n=um[e];return void 0!==n&&t===n}const Bm=cm(lm(Mp(_(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=Uu().linkComponent,_=yd(),b="function"==typeof p?()=>p():void 0,P="function"==typeof m?()=>m():void 0,k="function"==typeof h?()=>h():void 0,S=i??"_1M6e9",w=Su(),C=Rp(w,{onClick:b,onFocus:P,onMouseEnter:k}),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":yu({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 Fm(){const e=h(Te);if(null==e)throw new fe("No theme found in context");return e}function Vm(){const e=Fm();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 Um(e){const t=_(function({disableGlobalBranding:t,...n},r){const{global:{cornerRadius:a}}=Vm(),i=Le(a),o=t?n:{...n,borderRadius:i??n.borderRadius};return d(e,{...o,ref:r})});return t.displayName=`GlobalBrandedComponent(${e.displayName||e.name||"Component"})`,t}const qm=Id(Um(cm(lm(Mp(_(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:P,inlineSize:k="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:N,onPointerLeave:M,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 <Clickable /> has an "expanded" prop, it should also have "controlId" defined')},[h,_]);const G=yd(),J=Su(),{className:K,style:Q,styleElement:X}=zm({backgroundColor:n,blockSize:r,...Re({border:i,borderStyle:s,borderWidth:l}),borderRadius:o,display:f,inlineSize:k,maxBlockSize:C,maxInlineSize:E,minInlineSize:I,minBlockSize:x,padding:O,paddingBlock:B,paddingBlockEnd:V,paddingBlockStart:U,paddingInline:F,paddingInlineEnd:q,paddingInlineStart:j},{transforms:{display:ud}}
2),Z=v("_1s82kpb1 _1s82kpb0 _1fragemyd _1fragemws _1fragem126 _1fragemyk _1fragem12b _1fragemxw","exclusive"===t&&"_1s82kpb5 _1fragem121",K,"hidden"===z&&"_1s82kpb4 _1s82kpb3 _1fragemup _1fragemv4",G&&"_1s82kpb2 _1fragemz0",u),ee=gd(),te=xp(W),ne=Rp(J,{onClick:()=>{T?.()},onBlur:()=>{A?.()},onFocus:()=>{L?.()},onMouseEnter:()=>{N?.()},onMouseLeave:()=>{M?.()},onMouseDown:e=>{R&&0===e.button&&R?.()},onMouseUp:()=>{D?.()}}),re=w?"assertive":void 0,ae="hidden"===t||G,ie={className:Z,id:P,lang:S,style:Q,tabIndex:ae?-1:void 0,...Tp(J,{"aria-controls":h,"aria-expanded":_}),...ne,...Y};return d(y,{children:[X,d(vd.Provider,{value:!0,children:b&&void 0===m?d(Bm,{...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})})]})})))))),jm="generic",Hm=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 $m(e,{defaultRole:t=jm,defaultElement:n="div"}={}){const r=Hm.get(e??t)??Hm.get(t)??Hm.get(jm);return{Element:r.element??n,role:r.role}}const Ym=Ad(Um(function({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,display:f="auto",gap:_="none",gridAutoColumns:b,gridAutoFlow:P,gridAutoRows:k,gridTemplateColumns:S="none",gridTemplateRows:w="none",id:C,inlineSize:E="auto",justifyContent:x,justifyItems:I,maxBlockSize:A="none",maxInlineSize:T="none",minBlockSize:L="0",minInlineSize:R="0",overflow:N="visible",padding:M="none",paddingBlock:D,paddingBlockEnd:z,paddingBlockStart:O,paddingInline:B,paddingInlineEnd:F,paddingInlineStart:V,placeContent:U="normal normal",placeItems:q="normal normal",rowGap:j,...H}){const $=_d(),{Element:Y,role:W}=$m(t,{defaultElement:$?"span":"div"}),{className:G,style:J,styleElement:K}=zm({gap:_,placeContent:U,placeItems:q,alignContent:r,alignItems:a,backgroundColor:i,backgroundColorHoverAndFocus:o,blockSize:s,...Re({border:l,borderStyle:p,borderWidth:m}),borderRadius:u,columnGap:g,display:f,gridAutoColumns:b,gridAutoFlow:P,gridAutoRows:k,gridTemplateColumns:S,gridTemplateRows:w,inlineSize:E,justifyContent:x,justifyItems:I,maxBlockSize:A,maxInlineSize:T,minBlockSize:L,minInlineSize:R,padding:M,paddingBlock:D,paddingBlockEnd:z,paddingBlockStart:O,paddingInline:B,paddingInlineEnd:F,paddingInlineStart:V,rowGap:j},{transforms:{blockSize:nd,display:md}});return d(y,{children:[K,d(Y,{"aria-hidden":"hidden"===n||void 0,"aria-label":e,className:v("_1mrl40q0 _1fragemws","exclusive"===n&&"_1mrl40q2 _1fragem121","hidden"===N&&"_1mrl40q1 _1fragemup _1fragemv4",G),id:C,role:W,style:J,...H,children:h})]})})),Wm=["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"];
2var Gm=1,Jm={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 Km=["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"],Qm=["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 Xm({interestFor:e,...t}){return e?d(eh,{...t,interestFor:e}):d(Zm,{...t})}function Zm({accessibilityLabel:e,...t}){const{className:n,children:r}=th(t);return d("span",{role:e?"img":void 0,"aria-label":e,className:n,id:t.id,children:r})}const eh=cm(_(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}=th(l);return d("span",{role:"img",tabIndex:t?0:void 0,id:n,ref:c,className:v(Jm.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 th({type:e,tone:t="auto",color:n="base",size:r="base",display:a="block",className:i}){const{icons:o}=Vm(),s=Uu().inlineIcons??!1;let l;e?l=e:(""===e||console.warn(`"${e}" is not a valid <Icon /> type`),l="empty");const c=Km.includes(l),u=Qm.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(Jm.Icon,Jm.toneVariant[t],("auto"===t||"neutral"===t)&&Jm.colorVariant[n],Jm.displayVariant[a],Jm.sizeVariant[p],c&&Jm.mirrored,Jm.fillVariant[u],i);let h=function(e){const t=ke(e);return t in nh?nh[t]:Wm.includes(t)?t:void 0}(l);h||(console.warn(`"${l}" is not a valid <Icon /> 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(lu,{iconUrl:f,fallback:y,allowRelativeUrl:null==g}):y}}const nh={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 rh({message:e,dismiss:t}){const n=Hu();return a(()=>Ou({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(Ym,{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(qm,{onClick:t,accessibilityLabel:n("closeNotification"),children:d(Xm,{type:"x",size:"small",tone:"monochrome"})})]})})}const ah=f(null);function ih({children:e,handleToast:t}){const[a,o]=s([]),l=i(0),c=n(e=>{o(t=>t.filter(t=>t.id!==e))},[]),u=n(()=>(l.current+=1,`toast-message-${l.current}`),[]),p=r(()=>({setMessages:o,removeMessage:c,createMessageId:u,handleToast:t}),[o,c,u,t]);return d(ah.Provider,{value:p,children:[e,a.length>0?d(Gc,{children:d(oh,{children:a.map(({id:e,content:t})=>d(rh,{message:t,dismiss:()=>c(e)},e))})}):null]})}function oh({children:e}){const t=zc(),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 sh(){const e=h(ah),{setMessages:t,removeMessage:r,createMessageId:a,handleToast:i}=e??{};return n(e=>{if(!t||!r||!a)throw new fe("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 n=a();return t(t=>[...t,{id:n,content:e}]),{hide:()=>r(n)}},[t,r,a,i])}function lh(e,t){if(!e)throw new TypeError(t)}function ch(e){return r(()=>Ne(e),[])}function uh(e,t){const n=oe(t),r=i();r.current||(r.current=e.listen(n.current)),a(()=>()=>r.current?.(),[e,n])}const dh="·",ph=150,mh="ASAP",hh=re("ShippingMethodsContext");function gh(){const e=h(hh);if(null!=e)return e}function fh(){const{observability:e}=ie();return n((t,n)=>{e.histogram({name:"checkout_delivery_promise_request_duration_ms",value:t,attributes:{apiClientId:n.toString()}})},[e])}const yh=()=>De((e,t)=>
2{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"),vh=["streetName","streetNumber","neighborhood","line2"];function _h(e,t){const n=r(yh,[e]),i=n.value;uh(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",...vh].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 bh(){const{shop:{shippingRatesReloadStrategy:e}}=ie();return n(({countryCode:t,zoneCode:n})=>{try{lh("string"==typeof t,"Expected a country code");const r=e.get(t);switch(lh(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:Me.Anything}},[e])}function Ph(){const{i18n:e}=ie(),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 kh({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=Oe(n,r);return{...e,[s]:i}},{})}function Sh(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&&le(n)!==a)});i&&(i.value={...i.value,deliveryMethodHandle:t})}):n.forEach(e=>{e.value={...e.value,deliveryMethodHandle:void 0}})}function wh(e,t,n){const{checkout:{negotiator:r}}=ie(),{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 Ch(e){const t=wh(e);return Boolean(t?.fields)}function Eh(e,t){const r=wh(e,t);return[r?.fields.deliveryMethodTypes.value||[],n(e=>{r&&(r.value={...r.value,deliveryMethodTypes:e})},[r])]}function xh({type:e="ONE_TIME_PURCHASE",id:t,deliveryMethodType:r}){const a=wh(e,t,r);return[a?.fields.deliveryMethodHandle.value||void 0,n(e=>{a&&(a.value={...a.value,deliveryMethodHandle:e})},[a])]}function Ih(e,t){const n=wh(e,t);return r(()=>n?.fields.deliveryMethodOptions.value.phone||S(void 0),[n])}function Ah(e,t){const n=wh(e,t);return r(()=>n?.fields.deliveryMethodOptions.value.instructions||S(void 0),[n])}function Th(e,a){const i="ONE_TIME_PURCHASE"===a?"SUBSCRIPTION":"ONE_TIME_PURCHASE",{checkout:{negotiator:o}}=ie(),s=o.current.fields.deliveryNext,l=n(e=>Ue(s.value).filter(qe).find(t=>t.type===e),[s]),c=n((e,t)=>{const n=l(e),r=n?.methods.find(e=>e.methodType===t);if(r)return r},[l]),u=n(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=t(()=>kh({proposedDeliveryLines:d})),m=n(e=>{Sh(d,{[i]:e})},[d,i]),h=p.value;return r(()=>({inverseGroupType:i,inverseGroupDeliveryMethodHandle:h,setInverseGroupDeliveryMethodHandle:m,getInverseGroupDeliveryMethodHandle:u}),[u,h,i,m])}function Lh(){const{checkout:{negotiator:e}}=ie(),{parts:t}=e;return[ze(t.deliveryLines.peek()),n(e=>{t.deliveryLines.value.forEach(t=>{t.value={...t.value,deliveryMethodTypes:e}})},[t.deliveryLines])]}function Rh(){const{negotiate:e}=Ql(),{i18n:t,checkout:{negotiator:r}}=ie(),{parts:a}=r,i=sh(),o=Be(),s=gh();return n(({targetDeliveryMethodType:n,merchandiseStableIds:r})=>{const{orphanedMovedToShipping:l,orphanedRemovedFromCartStableIds:c}=Fe({deliveryLines:a.deliveryLines,merchandiseLines:a.merchandiseLines,targetDeliveryMethodType:n,merchandiseStableIds:r,sellableDeliveryMethodsByStableId:o.value.deliveryMethodsByMerchandise,discountLines:a.discountLines});c.length>0?i(t.translate("stock.removed_from_cart_notice")):l&&i(t.translate("split_delivery.items_moved_to_shipping_toast")),s?.dispatch?.("deliveryMethodChanged"),e({silenceViolations:Ve(["deliveryNext","merchandiseLines"])})},[a.deliveryLines,a.merchandiseLines,o,a.discountLines,s,e,i,t])}function Nh(){const{checkout:{negotiator:e}}=ie(),{deliveryLines:t,deliveryMacros:r}=e.parts,{negotiate:a}=Ql(),i=kh({proposedDeliveryLines:t,onlyShippingOneTimePurchase:!0}),o=r.value?.length?je(r.value,i):void 0,s=n(async e=>{if(!e||e===o?.id)return;const n=r.value.find(({id:t})=>t===e);return n?(Sh(t,n.deliveryMethodHandles),a({silenceViolations:Ve(["deliveryNext"])})):void 0},[t,r,o,a]);return{selectedMacro:o,setSelectedMacro:s}}function Mh(){const{checkout:{identity:e},shopPay:{config:{tracking:t}}}=ie(),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 Dh(e){return function(t){const{observability:n}=ie();a(()=>{t&&(il(t)||ol(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 zh=re("CheckoutSheetProtocolContext"),Oh=re("MobileCheckoutSdkContext");function Bh(){const e=h(zh),t=h(Oh);return null!=e?e:null!=t?t:null}function Fh(){const{checkout:e,shop:t}=ie();return e.configuration.isUniversalCheckoutFinalizer||t.hasFlagEnabled(He)}function Vh(){const{checkout:e,shop:t}=ie();return Fh()&&(e.configuration.isUniversalCheckoutFinalizer||t.hasFlagEnabled($e))}class Uh extends sl{constructor(){super(...arguments),this.name="WebPixelsManagerError"}}
2class qh extends Error{constructor(){super(...arguments),this.name="WebPixelsManagerCheckoutNativeSdkEnabledError"}}let jh=null;const Hh=re("webPixels");function $h({children:e}){const{client:t,embed:n,environment:{services:r},checkout:{identity:l,thankYouEntrance:c,negotiator:u},observability:p,shop:m,mobileCheckoutSdk:h,source:g,router:f}=ie(),y="shopPay"===l.current.value,v=m.hasFlagEnabled(Ye),_=function(){const{shop:e,source:t,checkout:{negotiator:n}}=ie();return o(()=>{const r=n.current.fields.buyerIdentity.value;return{cart:pc({negotiated:n,shop:e,source:t}),customer:dc(r),shop:mc({shop:e}),purchasingCompany:hc(r)}})}(),b=Bh(),P=b?.config?.pixelEventsMode,k=n?.configuration?.pixelMode,S=Boolean(n?.isCheckoutKit({includeLegacyCsk:!1})),w="DISABLED"===P||"DISABLED"===k,{checkoutProtocolPresentedSignal:C}=u.context,E=C.value,x=S&&!0===n?.isPreload&&!E,I=Vh()&&"settled"!==c.phase.value&&(f.currentUrlMatches("/thank-you")||f.currentUrlMatches("/processing")&&null!=c.progress&&"cancelled"!==c.progress.phase.value),A=r.webPixelsManager.url;r.webPixelsManager.type;const T=r.webPixelsManagerExtensions.url,L=i(),R=i(),N=i(!1),[M]=s(()=>{const e=new Promise((e,t)=>{L.current=e,R.current=t});return e.catch(()=>{}),e}),D={[et]:m.hasFlagEnabled(et),[Ze]:m.hasFlagEnabled(Ze),[Xe]:m.hasFlagEnabled(Xe),[Qe]:m.hasFlagEnabled(Qe),[Ke]:m.hasFlagEnabled(Ke),[Je]:m.hasFlagEnabled(Je),[Ge]:m.hasFlagEnabled(Ge),[We]:m.hasFlagEnabled(We)},z=Object.entries(D).filter(([e,t])=>t).map(([e])=>e),[O]=s({async publish(e,t,n){try{return(await M).publish(e,t,n)}catch{return!1}},async publishCustomEvent(e,t,n){try{return(await M).publishCustomEvent(e,t,n)}catch{return!1}},async publishDomEvent(e,t,n){try{return(await M).publishDomEvent(e,t,n),{type:"success"}}catch(r){return{type:"error",message:r.message}}},async subscribe(e,t,n){try{return(await M).subscribe(e,t,n)}catch{return()=>!1}},async visitor(e,t){try{return(await M).visitor(e,t),{type:"success"}}catch(n){return{type:"error",message:n.message}}}});return a(()=>{const e=e=>{p.log("web_pixel_manager_init",`WebPixelsProvider init: ${e}`,{outcome:e,shopAppDomain:y},{exportImmediately:"loading"!==e})};if(null===m.webPixelConfigurations)return e("web_pixel_configurations_null");if(!m.storefrontUrl)return e("storefront_url_missing");const r=Boolean(tt(navigator.userAgent));if(r&&!v)return e("shop_mobile_app_context");const a=y||r;if("disabled"===m.webPixelManagerVersion)return e("wpm_version_disabled");const i=a?[]:m.webPixelConfigurations;if(w)return R.current?.(new qh("Checkout SDK enabled for partner with pixels suppressed")),void e("pixels_suppressed_by_config");if(x||N.current)return void(x&&!N.current&&e("deferred_for_preload"));if(I)return void e("deferred_for_thank_you");if(N.current=!0,e("loading"),"undefined"!=typeof PerformanceMark)try{window.performance.mark("wpm:start")}catch{}const o=h.variant.isStandard(),s=!n?.isFlagshipPartner&&Boolean(n?.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:y,isNativeShopApp:r,isCheckoutKit:S,isSdkSurface:o||s});try{const e=function({storefrontBaseUrl:e,shopId:t,webPixelConfigurations:n,webPixelManagerVersion:r,initData:a,enabledBetaFlags:i=[],surface:o,monorailRegion:s,sriMap:l,managerBaseUrl:c,extensionsUrl:u,apiClientId:d,checkoutToken:p,facebookCapiEnabled:m=!1}){if(jh)return jh;const h=parseInt(le(t),10),g=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"}(),f="modern"===g?"modern":"legacy",y=`${c}/b${r}${f.substring(0,1)}.js`,v=`${u}/cdn/shopifycloud/web-pixels-manager`,_=document.createElement("script");_.setAttribute("async","true"),_.setAttribute("src",y);const b={shopId:h,storefrontBaseUrl:e,extensionsBaseUrl:v,browserTarget:g,surface:o,enabledBetaFlags:JSON.stringify(i),hashVersion:r,publish:"all",...null!=d&&{apiClientId:String(d)},...p&&{checkoutToken:p},...a.customer?.id&&{customerId:a.customer.id},facebookCapiEnabled:String(m)};b.trekkieShim="true";for(const k in b)if(Object.prototype.hasOwnProperty.call(b,k))try{_.dataset[k]=String(b[k])}catch{}const P=l[f];return P&&(_.setAttribute("integrity",P),_.setAttribute("crossorigin","anonymous")),jh=new Promise((t,r)=>{if(_.onload=()=>
2{if(Boolean(window.Shopify?.analytics?.initialized))return;if(null==window.webPixelsManager||!("init"in window.webPixelsManager))return void r(new Uh("WebPixelManager is not available"));const l=window.webPixelsManager.init({shopId:h,storefrontBaseUrl:e,extensionsBaseUrl:v,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,monorailRegion:s});window.Shopify||={},window.Shopify.analytics||={},window.Shopify.analytics.publish=l.publishCustomEvent,window.Shopify.analytics.initialized=!0,t(l)},_.onerror=()=>{r(new Uh(`Failed to load WebPixelManager runtime from ${y}`))},document.querySelector(`script[src="${_.src}"]`))r(new Uh("WebPixelsProvider::WebPixelsManagerError::ScriptAlreadyPresent",{groupingHash:"WebPixelsProvider::WebPixelsManagerError::ScriptAlreadyPresent"}));else try{document.body.appendChild(_)}catch{throw new Uh("WebPixelsProvider::WebPixelsManagerError::ScriptAppendError",{groupingHash:"WebPixelsProvider::WebPixelsManagerError::ScriptAppendError"})}}),jh}({storefrontBaseUrl:m.storefrontUrl,shopId:m.id,webPixelConfigurations:i,webPixelManagerVersion:m.webPixelManagerVersion,initData:_,enabledBetaFlags:z,surface:l,sriMap:m.webPixelsManagerSriMap,managerBaseUrl:A,extensionsUrl:T,apiClientId:t.unstable_getSerialization("apiClientId")??void 0,checkoutToken:lc(g)||g.sourceId,facebookCapiEnabled:m.facebookCapiEnabled??!1});let n=!0;e.then(e=>{if(!L.current)throw R.current?.(),new Uh("WebPixelsManager: webPixelsPromiseResolveRef.current is undefined");L.current(e)}).catch(e=>{n=!1,p.log("web_pixels_context_manager_load_error_triggered",`WebPixelsProvider::WebPixelsManagerError::LoadError with error: ${e?.message}`)}).finally(()=>{p.counter({name:"web_pixel_manager_load",value:1,attributes:{status:n?"success":"failed",surface:l}})})}catch(c){R.current?.(c),p.counter({name:"web_pixel_manager_load",value:1,attributes:{status:"failed",surface:l}})}},[x,I]),d(Hh.Provider,{value:O,children:e})}function Yh(){return ae(Hh)}class Wh{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=Gh(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=Gh(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=Gh(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",{...nt(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 Gh(e){return Nc({type:e.type,step:e.context.step,section:"section"in e?e.section:void 0})?e.context.webPixelCheckout:void 0}const Jh=re("EventHubContext"),Kh=w({displayName:"EventHubClientsLoader",useError:Dh("EventHubClientsLoader"),load:()=>C(()=>ll(async()=>{const{EventHubClientsLoader:e}=await(import("./0d43e753.q0AEPPk1.js"));return{EventHubClientsLoader:e}}
2,__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16])).then(({EventHubClientsLoader:e})=>({default:e})))});function Qh({children:e}){const t=Yh(),n=r(()=>new Xh([new Wh({webPixels:t})],{bufferUntilConnected:!0}),[t]),a=rt();return d(Jh.Provider,{value:n,children:[e,d(E,{when:a,children:d(Kh,{eventHub:n})})]})}class Xh{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{Zh(e,t)}catch(n){queueMicrotask(()=>{throw n})}})}}emit(e){this.transmit(e)}transmit(e){try{Zh(this.clients,e)}finally{this.transmitToConnectedClients(e)}}transmitToConnectedClients(e){this.pendingEvents?this.pendingEvents.length<2500&&this.pendingEvents.push(e):Zh(this.connectedClients,e)}}function Zh(e,t){e.forEach(e=>{e.willAccept(t)&&(t.transmitImmediately&&e.transmitImmediately?e.transmitImmediately(t):e.transmit(t))})}function eg(){const{client:e,shop:t,checkout:n,i18n:a,source:i,mobileCheckoutSdk:o,router:s}=ie(),{currentPage:l}=Kl().value,{pathname:c}=s.currentUrl.value,u=Mh(),d=u?.trackingUnique??at({serialized:e.unstable_getSerialization("shopifyY"),expiration:e.unstable_getSerialization("shopifyYExpiration")}),p=u?.trackingVisit??at({serialized:e.unstable_getSerialization("shopifyS"),expiration:e.unstable_getSerialization("shopifySExpiration")}),m=n.negotiator.current.fields.buyerIdentity.value?.customerProfile,h=e.unstable_getSerialization("sessionToken"),g=Dc(),f=n.negotiator.current.fields.buyerIdentity.value?.purchasingCompany,{value:y}=n.negotiator.current.fields.paymentFlexibilityPaymentTermsTemplate,v=it(),{value:_}=n.negotiator.current.fields.deliveryNext,{selectedMacro:b}=Nh(),P=Yl({base:!0,small:!1}),k=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";k&&(T="c1_redesign"),S&&(T="shop_pay");const L=ot(_),{deliveryMacros:R}=n.negotiator.parts,N=R.value,{isServerRendered:M}=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(le(D),10):void 0,apiClientId:x,sourceId:i.sourceId,sourceType:i.type,identityProvider:void 0,sourceDesign:T,deviceType:P?"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:M,clientHydrated:M,..."filled"===_?.status?{selectedDeliveryMacro:L?b:void 0,deliveryMacros:L?N:[],deliveryLines:_.lines.filter(qe)}:{selectedDeliveryMacro:void 0,deliveryMacros:[],deliveryLines:[]},pageLoadId:st}),[d,p,m?.id,t.id,t.confirmationPageEnabled,h,i.checkoutSessionIdentifier,i.sourceId,i.type,D,x,T,P,a.locale,a.currency,w,f,v.value,g.value,y,n.isShippingRequired.value,C,E,c,o,I,A,_,L,b,N,M])}function tg(){if("undefined"==typeof window)return ng;const{shop:e,source:t,i18n:r,checkout:{negotiator:a}}=ie(),i=ae(Jh),o=eg(),s=oe(o),l=a.parts;return n((n,o)=>{i.emit({type:n,context:{...s.current,href:window.location.href,webPixelCheckout:Mc({type:n,step:s.current.step,section:o.section},{negotiated:a,proposedParts:l,source:t,locale:r.locale,shopCurrencyCode:e.currencyCode,marketDrivenShippingEnabled:e.marketDrivenShippingEnabled})},...o})},[i,s,e,a,l,t,r])}function ng(){}function rg(e,t){const{router:n}=ie();a(()=>
2{if(""!==n.currentUrl.peek().hash)return;const r=document.activeElement;r&&e.current?.contains(r)&&t(r)},[])}function ag(){const e=tg(),{client:t}=ie();return n(n=>{if(!t.isFirstMeaningfulInteractionMarked.value){const r=performance.now();e("extensionLifecycle",{phase:"timeToFirstMeaningfulCheckoutInteraction",eventValue:r,duration:r,extension:null,section:"extension",initialPageLoad:!0,timestamp:new Date,page:n??""}),t.markFirstMeaningfulInteraction()}},[e,t])}function ig(){const e=tg(),{observability:t}=ie();return function(n){e("alertDisplayed",n),t.log("alert_displayed_event_emitted","Error alert was displayed to the buyer",{event:Ic(n)})}}function og(){const{checkout:e}=ie(),n=e.configuration.addressSettings.nonBillingAddressSettings;return t(()=>{const e=n.value?.validationEnabled;if(!e)return"BASIC"})}function sg(){const{i18n:e}=ie();return n((t,n)=>lt(e,t,n),[e])}function lg(){const{i18n:e,checkout:n,shopPay:r}=ie(),a=sg(),i=r.user.installments.isRetryable.value,{paymentMethods:o,paymentDue:s}=n.negotiator.current.fields,l=t(()=>ct(o.value));if(!n.installments.isSupported.value||!l.value)return"";const c=l.value,u=s.value,d=Boolean(c.cbtEnabled&&u&&(c.minPrice.currencyCode!==u.currencyCode||c.maxPrice.currencyCode!==u.currencyCode));if(i)return e.translate("installments.installments_condition_retryable");const p=t=>{switch(t){case"US":return e.translate("installments.installments_country_adjective.US");case"CA":return e.translate("installments.installments_country_adjective.CA");case"GB":return e.translate("installments.installments_country_adjective.GB");default:return t}},m=n.installments.ineligibilityReasons.value,h=!r.user.installments.isRejected.value;if(h&&0===m.length)return"";const g=(h&&m.length>0?m:["user_rejected"]).map(t=>{switch(t){case"amount":return d||c.cbtEnabled&&0===c.availableLoanTypes.length&&u&&u.amount>=c.minPrice.amount&&u.amount<=c.maxPrice.amount?e.translate("installments.installments_condition_generic"):e.translate("installments.installments_condition_amount",{minimum:e.formatCurrency(c.minPrice.amount,{currency:c.minPrice.currencyCode,form:"short"}),maximum:e.formatCurrency(c.maxPrice.amount,{currency:c.maxPrice.currencyCode,form:"short"})});case"billing_address":return e.translate("installments.installments_condition_billing_address");case"billing_shipping_country_mismatch":return e.translate("installments.installments_condition_billing_shipping_country_mismatch");case"shipping_address":return e.translate("installments.installments_condition_shipping_address",{listOfCountryCodes:a(c.supportedCountries.map(p),ut.Or)});case"currency":return d&&u&&c.supportedCurrencies.includes(u.currencyCode)?e.translate("installments.installments_condition_generic"):e.translate("installments.installments_condition_currency",{listOfCurrencyCodes:a(c.supportedCurrencies,ut.Or)});case"gift_cards":return e.translate("installments.installments_condition_gift_cards");case"subscriptions":return e.translate("installments.installments_condition_subscriptions");case"order_edit":return e.translate("installments.installments_condition_order_edit");case"test_mode":return e.translate("installments.installments_condition_test_mode");default:return e.translate("installments.installments_condition_generic")}});return(c.cbtEnabled?[...new Set(g)]:g).join(" ")}function cg(e,t){return t?.availableLoanTypes?.includes(e)??!1}function ug(e){const{retailTraceId:n,deviceId:a,userId:i,locationId:o}=function(){const{checkout:{negotiator:e}}=ie(),n=e.current.fields.customAttributes;return t(()=>{const e=dt(pt,n?.value),t=dt(mt,n?.value),r=dt(ht,n?.value),a=dt(gt,n?.value);return{retailTraceId:e?.value||"",deviceId:t?.value||"",locationId:r?.value||"0",userId:a?.value||"0"}})}().value,{shop:{id:s},source:{checkoutSessionIdentifier:l},checkout:c}=ie(),u=ft(),{value:d}=yt(),p=c.installments.config.value,m=d?.amount?Number(d.amount):0,h=c.installments.isCheckoutEligible.value,g=lg(),f=cg("SPLIT_PAY",p),y=cg("INTEREST",p),v=cg("ZERO_PERCENT",p),_=d?.currencyCode,b=_||"USD";return r(()=>({userId:parseInt(i,10),shopId:parseInt(le(s),10),locationId:parseInt(o,10),posCheckoutToken:n,stage:e||"",totalOrderValue:m||0,cartItemsCount:u.value||0,installmentsEligible:h||!1,posDeviceId:a,currency:b,shopPayCheckoutToken:l,ineligibilityReason:g,splitPayEligible:f,interestBearingEligible:y,zeroPercentEligible:v}),[e,n,a,i,o,m,h,s,u.value,b,l,g,f,y,v])}function dg(){const{checkout:{negotiator:e}}=ie(),n=e.current.fields.customAttributes;return t(()=>vt(n.value))}function pg(e){const{observability:t}=ie(),[n,r]=s(()=>bt(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))}(()=>{_t(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 mg(e,t){const{persistence:n}=ie(),r=n?.get(e,t),a=m(r);return k(()=>{n?.createUpdate(e,t)(a.value)}),a}const hg=re("AnalyticsContext");function gg({children:e}){const t=r(()=>new yg,[]);return d(hg.Provider,{value:t,children:e})}function fg(){return ae(hg)}class yg{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 vg(){const e=fg();return n(t=>e.emit(t),[e])}function _g(e){const t=fg();a(()=>t.subscribe(e),[e,t])}const bg=()=>{const{url:e}=ie(),t=e.shopPayRememberMe(),n=nc(),r=n.value?.redirectUrl?.includes(t);return Boolean(r)};function Pg({selectedDeliveryMethodHandle:e,methods:t}){const{userEvents:r,shop:{id:a},checkout:{identity:i,negotiator:o},source:s}=ie(),l="shopPay"===i.current.value,c=o.current.fields.buyerIdentity.value?.customerProfile,u=t=>t.handle===e,d=t.find(u)?.originLocation?.id,p=t.findIndex(u);return n(e=>r.monorailEvent({schemaId:"local_pickup_checkout/3.1",payload:{eventType:e,checkoutToken:s.checkoutSessionIdentifier||"",shopId:parseInt(le(a),10),locationId:d&&le(d),selectedLocationRank:p,userId:c?.id?parseInt(le(c.id),10):void 0,numberLocationsFound:t.length||0,checkoutSurface:l?"shop_pay":"guest_checkout"}}),[c?.id,l,d,t.length,r,p,a,s.checkoutSessionIdentifier])}function kg(e){const t=Bh();return function(e,t){return null==e||"MERCHANT"===e&&"checkout_started"===t}(t?.config?.type,e)}const Sg=580111;function wg(){const{client:e,userEvents:o,i18n:{locale:l},shop:c,source:u,mobileCheckoutSdk:p,checkout:{negotiator:m}}=ie(),h=m.current.fields.buyerIdentity.value?.customerProfile,g=kg(),f=function(){const e=Kl();return t(()=>{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}=kt(),{value:_}=St("ONE_TIME_PURCHASE"),b=wt(_),P=Boolean(b)&&0===b?.costAfterDiscounts.amount,{value:S}=m.current.fields.taxes,{value:w}=m.current.fields.merchandiseLines,{value:C}=m.current.fields.paymentLines,{value:E}=m.current.fields.discountLines,{value:x}
2=m.current.fields.contactInfo,{value:I}=m.current.fields.buyerIdentity,{value:A}=Ct(),[T,L]=s("");function R(e){return e.toFixed(2)}function N(e){return parseInt(le(e),10)}!function(){const e=i(!1),{userEvents:t,shop:{id:n},source:{checkoutSessionIdentifier:r},checkout:{identity:a}}=ie(),o="shopPay"===a.current.value,s=Be();k(()=>{s.value.enabledDeliveryMethods.includes("PICK_UP")&&!e.current&&(t.monorailEvent({schemaId:"local_pickup_checkout_availability_viewed/1.1",payload:{shopId:parseInt(le(n),10),checkoutToken:r||"",sourceName:"checkout_one",checkoutSurface:o?"shop_pay":"guest_checkout"}}),e.current=!0)})}();const M=r(()=>P?void 0:b?.costAfterDiscounts?.amount||b?.cost.amount,[P,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=>N(e.productId)),[w?.lines]),O=r(()=>w?.lines?.filter(e=>e.variantId).map(e=>N(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(!Pl(t))return e;let n=e;n||(n=[]);const r=t.amount?.amount;return r&&n.push(R(r)),n},[]),[E]),Y=Mh(),W=n(()=>{const t="available_total"===S?.status?S.totalTax.amount:void 0,n=h?.id?N(h.id):void 0,r=h?.fullName||void 0,a=Y?.trackingUnique??at({serialized:e.unstable_getSerialization("shopifyY"),expiration:e.unstable_getSerialization("shopifyYExpiration")}),i=Y?.trackingVisit??at({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:N(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:Sg,currentApiClientId:Sg,paymentMethod:H,paymentProviderId:void 0,currentStep:f.value,checkoutToken:u.checkoutSessionIdentifier,totalShipping:M?R(M):void 0,sourceProcessor:"web_checkout",appliedGiftCards:j?.length?j:void 0,subtotalPrice:v?.amount?R(v.amount):void 0,sourceName:"checkout_one",freeShippingDiscount:P.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()}}},[$,S,P,v,j,u,M,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 Cg=w({suspenseName:"trekkie",displayName:"Trekkie",load:()=>C(()=>ll(()=>import("./b887ec56.Cj9CT5mu.js"),__vite__mapDeps([17,2,1,3,4,5,18,10,13,14,15,16])))});function Eg(){const e=Yh(),{plan:t}=Kl().value,{router:r,i18n:{locale:a},shop:{currencyCode:i,marketDrivenShippingEnabled:o},source:s,checkout:{negotiator:l}}=ie(),c=l.parts,u=nc(),d=rc(),p=n(()=>{const t=xc({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=n(()=>{const t=xc({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=n(()=>{const n=u.value;if(!n)return;if(d.shouldPrevent())return;const c=xc({negotiated:l,receipt:n,source:s,orderId:n.orderIdentity.id,customerId:n.customerId||void 0,isFirstOrder:n.isFirstOrder,locale:a,shopCurrencyCode:i,marketDrivenShippingEnabled:o});d.markAsEmitted();const p=n.analytics?.checkoutCompletedEventId;let m=!1;function h(){if(m)return;m=!0,window.removeEventListener("pagehide",h),document.removeEventListener("visibilitychange",g);const n=function(e,t){const n=e.find(e=>e.route===t);return n?ic[n.type]??"unknown":"unknown"}(t.detours,r.currentUrl.value.normalizedPath),a={...p&&{eventId:p},checkoutCompletedPageType:n},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,t.detours,a,i,o,d]);return _g(n(e=>{"initiate_checkout"===e.type&&m()},[m])),_g(n(e=>{"add_payment_info"===e.type&&p()},[p])),_g(n(e=>{"complete_checkout"===e.type&&h()}
2,[h])),null}const xg=["/processing","/thank-you","/error","/post-purchase"],Ig=[Et.DirectCheckoutCheckout,Et.CheckoutPaymentStep,Et.ShopPayInstallmentsAsPaymentMethod,Et.ShopPayAsPaymentMethod];function Ag(){Mh();const e=vg(),{currentPage:t,currentDetour:n}=Kl().value,{userEvents:r,source:i,router:o,checkout:{negotiator:s}}=ie(),l=function(){const[e,t]=pg(Pt.TrackedSourceId),{source:{sourceId:n}}=ie();return a(()=>{t(n)},[n,t]),n===e}(),c=function(){const[e,t]=pg(Pt.TrackedCompleteOrderSourceId),n=nc(),r=bg(),{source:{sourceId:i}}=ie();return a(()=>{n.value&&!r&&t(i)},[i,n.value,r,t]),i===e}(),{normalizedPath:u}=o.currentUrl.value,p=nc(),m=dg().value,h=ug(xt.SHOP_PAY_CHECKOUT_COMPLETE),g=s.current.fields.paymentLines?.value?.lines,f=function(){const{client:e}=ie();return e.unstable_getSerialization("shopPayConfig").redirect_source}(),v=tg(),_=bg();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]),Xl(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:se(t.orderIdentity.id)}})}(r,t,h)))},[e,p.value,_,c,m,r,h]),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(It(g,"GOOGLE_PAY")),r="cartNext"===i.type||"checkout"===i.type,a=!f||!Ig.includes(f);r&&(n&&"/processing"===t||!xg.includes(t))&&a&&e({type:"initiate_checkout",url:t})},[]),d(y,{children:[d(wg,{}),d(Cg,{}),d(Eg,{})]})}const Tg=x(function({children:e}){const t=rt();return d(gg,{children:[e,d(E,{when:t,children:d(Ag,{})})]})});function Lg(){const{userEvents:e,shop:{id:t},source:n,i18n:{locale:r},checkout:{negotiator:a}}=ie(),i=At(),{billingAddress:o}=a.parts,s=o.value,{details:l}=Tt(s.countryCode),c=og();return Xl(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.
2checkoutSessionIdentifier||"",shopId:parseInt(le(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 Rg=re("WebPixelTargetContext"),Ng=({children:e,target:t})=>d(Rg.Provider,{value:t,children:e});function Mg(){const{checkout:e}=ie();return e.configuration.branding.shell.configuration.environment.isCheckoutEditor??!1}const Dg=w({displayName:"AdminPreviewBar",load:()=>ll(()=>import("./a6e11e56.DS0vijQb.js"),__vite__mapDeps([19,1,2,3,4,5,10,13,14,15,16,20])),suspense:!1});function zg(){const{router:e,source:t,shop:n}=ie(),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:Lt(),hasServerPreviewContext:r});return o?d(Dg,{initialUrl:a}):null}function Og(){const e=i(!1);return a(()=>(e.current=!0,()=>{e.current=!1}),[]),e}const Bg=f(void 0);function Fg(){const e=h(Bg);if(!e)throw new ge("Missing FocusManager Context ");return e.focusErrors}function Vg(e){const t=e.defaultView?.getComputedStyle(e.documentElement).direction;return"rtl"===t||"ltr"===t?t:"rtl"===e.dir?"rtl":"ltr"}function Ug({children:e}){const t=i(new Set),a=Og(),o=(e,t,n)=>e.top===t.top?"ltr"===n?e.left<t.left:e.right>t.right:e.top<t.top,s=n(()=>{let e;for(const n of t.current){if(!n.current)continue;const t={coordinates:n.current.getBoundingClientRect(),ref:n};e&&!o(t.coordinates,e.coordinates,Vg(n.current.ownerDocument))||(e=t)}a.current&&e&&function(e){const t=e.ref.current;if(!t)return;if(t.focus({preventScroll:!0}),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;""===t.style.scrollMarginTop&&(t.style.scrollMarginTop="var(--x-spacing-large-500)");const n=t.ownerDocument.defaultView?.matchMedia("(prefers-reduced-motion: reduce)").matches??!1;t.scrollIntoView({behavior:n?"instant":"smooth"})}(e)},[a]),l=n(e=>(t.current.add(e),()=>t.current.delete(e)),[]),c=r(()=>({requestFocus:l,focusErrors:s,numberOfErrors:()=>t.current.size}),[s,l]);return d(Bg.Provider,{value:c,children:e})}function qg({active:e}){const t=i(null),n=h(Bg);return l(()=>{if(n&&e)return n.requestFocus(t)},[e,t,n]),t}function jg(){return h(Bg)}function Hg(e){return document.activeElement===e}const $g='\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 Yg(e,t=!0){return!t&&e.matches($g)?e:e.querySelector($g)}function Wg(e,t=!0){if(!t&&e.matches($g))return e;const n=e.querySelectorAll($g);return n[n.length-1]}function Gg(e){const t=[...document.querySelectorAll($g)],n=t.findIndex(t=>e===t);return n?t[n+1]:null}function Jg(){const{client:e,checkout:{negotiator:n}}=ie(),{paymentLines:r}=n.parts,a=n.current.fields.paymentMethods;return t(()=>{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 Rt(e)?null:i&&"name"in i?i.name:null})}var Kg={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 Qg=Um(Cp(Ad(_(function({accessibilityLabel:e,accessibilityRole:t="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:P,className:k,colorLayer:S,containerName:w,display:C="auto",id:E,inert:x,inlineAlignment:I,inlineSize:A="auto",maxBlockSize:T="none",maxInlineSize:L="none",minBlockSize:R="0",minInlineSize:N="0",opacity:M,overflow:D="visible",padding:z="none",paddingBlock:O,paddingInline:B,paddingBlockEnd:F,paddingBlockStart:V,paddingInlineEnd:U,paddingInlineStart:q,position:j="relative",insetBlock:H,insetInline:$,transform:Y,translate:W,zIndex:G,...J},K){const Q=p||I,X=Ip(K,n(e=>{a&&e&&e.focus({preventScroll:!0})},[a])),{className:Z,style:ee,styleElement:te}=zm({alignItems:I,backgroundColor:i,backgroundColorHoverAndFocus:o,backgroundImage:l,blockSize:m,...Re({border:h,borderStyle:f,borderWidth:y}
2),borderRadius:g,boxShadow:_,display:C,inlineSize:A,insetBlock:H,insetInline:$,justifyContent:p,maxBlockSize:T,maxInlineSize:L,minBlockSize:R,minInlineSize:N,padding:z,paddingBlock:O,paddingInline:B,paddingBlockEnd:F,paddingBlockStart:V,paddingInlineEnd:U,paddingInlineStart:q,position:j,transform:Y,zIndex:G},{transforms:{display:Q?pd:ud}}),ne=_d(),{Element:re,role:ae}=$m(t,{defaultElement:ne?"span":"div"}),ie=w?b({[Kg.vars.containerNameVar]:w}):void 0;return d(Xg,{condition:x,children:[te,d(re,{"aria-hidden":!("hidden"!==r&&!x)||void 0,"aria-label":e,className:v("exclusive"===r&&Kg.visuallyHidden,l&&s&&Kg.backgroundSizeVariant[s],l&&c&&Kg.backgroundPositionVariant[c],l&&Kg.backgroundRepeatVariant[u],S&&Kg.colorLayerVariant[S],w&&Kg.containerName,Q&&Kg.withAlignment,x&&Kg.inert,M&&Kg.opacityVariant[M],"hidden"===D&&Kg.overflowHidden,Z,{notranslate:!1===W},k),id:E,inert:x?" ":void 0,ref:X,role:ae,style:{...ee,...ie},tabIndex:a?-1:void 0,translate:(!0===W?"yes":void 0)??(!1===W?"no":void 0),...J,children:P})]})}))));function Xg({children:e,condition:t}){return null==t?d(y,{children:e}):d(fd.Provider,{value:t,children:e})}var Zg={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 ef({size:e="base",appearance:t="auto",accessibilityLabel:n,id:r}){const a=zc(),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(Zg.Spinner,t&&Zg.appearanceVariant[t],Zg.sizeVariant[o]),l=d("fill"===o||"large"===o?tf:nf,{...{"aria-label":n,"aria-hidden":n?void 0:"true"}});return i?d(y,{children:n}):d("div",{className:s,id:r,children:l})}function tf(e){return d("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",className:Zg.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 nf(e){return d("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",className:Zg.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 rf={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 af=_(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:P,styleElement:k}=zm({display:o},{transforms:{display:dd}});return d(y,{children:[k,d(b,{"aria-hidden":"hidden"===t||void 0,"aria-live":e,className:"exclusive"===t?rf.accessibilityVisibilityVariant[t]:v(rf.Text,a&&rf.decorationVariant[a],s&&rf.fontsVariant[s],c&&rf.kerningVariant[c],p&&rf.letterCaseVariant[p],m&&rf.sizeVariant[m],g&&rf.toneVariant[g],r&&("auto"===g||"neutral"===g)&&rf.colorVariant[r],f&&rf.typeVariant[f],P,{notranslate:!1===h}),dir:i,id:l,lang:u,translate:(!0===h?"yes":void 0)??(!1===h?"no":void 0),ref:_,children:n})]})});var of,sf={primary:"_1m2hr9g1b _1m2hr9g17 _1fragem12d","shop-pay":"_1m2hr9g1c _1m2hr9g17 _1fragem12d",secondary:"_1m2hr9g1d _1m2hr9g18 _1fragem12d",tert
2iary:"_1m2hr9g1e _1m2hr9g19 _1fragem12d",plain:"_1m2hr9g1f _1m2hr9g1a _1fragem12p _1fragem12n _1fragem12d"},lf={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=cm(lm(Mp((of=_(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:P,size:k="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=df(f)?()=>f?.():void 0,N=df(y)?()=>y?.():void 0,M=df(_)?()=>_?.():void 0,D=xp(T),z="auto"===x?"secondary":x,O="shop-pay"===z||"auto"===C?"neutral":C,{className:B,style:F,styleElement:V}=zm({inlineSize:p},{transforms:{inlineSize:uf}}),U=Hu(),q=zc(),{primaryButton:{border:j="none"},secondaryButton:{border:H="full"},link:{typographyDecoration:$="underline"}}=Vm(),Y=gd(),W=yd(),G=Uu().editor??!1,J=Boolean(a)&&!G,K="plain"===z,Q="in-menu"===z,X=!m&&J?"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||!J)&&!K&&!Q&&"neutral"===O&&lf.colorLayerVariant[z],sf[Q?"plain":z],!K&&lf.sizeVariant[k],Z&&!K&&lf.borderVariant[Z],("primary"===z||"shop-pay"===z)&&lf.forcedColorsPrimaryFill,lf.displayVariant[s],"text-bottom"===I&&lf.verticalAlignVariant[I],lf.toneVariant[O],B,(J||W)&&lf.disabled,G&&a&&lf.editorDisabled,W&&lf.inert,m&&lf.loading,lf.textDecorationVariant[K?ee:"none"],P&&lf.segmentVariant[P],Q&&lf.inMenu,r),ne=h||U("processing"),re=d("span",{className:v(lf.Content,u&&lf.inlineAlignmentVariant[u]),"aria-hidden":m||void 0,children:n}),ae=d("span",{className:v(lf.LoadingContent,u&&lf.inlineAlignmentVariant[u],!q&&lf.Spinner),dir:"auto",children:[d(ef,{accessibilityLabel:ne}),"extended"===g&&!q&&d("span",{className:lf.ExtendedLoadingContent,dir:"auto",children:d(af,{children:ne})})]}),ie=Su(),oe=ie?.activatorAttributes,se=void 0!==m;if(L&&void 0===o)return d(vd.Provider,{value:!0,children:[V,d(Bm,{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=Rp(ie,{onClick:R,onFocus:N,onMouseEnter:M});return d(vd.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)=>
2{switch(h(vu)){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(of,{...n,ref:t})})}case"Sheet":{const n={...e,size:"small"};return d(of,{...n,ref:t})}case"Banner":{const n={...e,tone:"auto"===e.tone||void 0===e.tone&&"plain"!==e.variant?"monochrome":e.tone};return d(of,{...n,ref:t})}default:return d(of,{...e,ref:t})}})))));function uf(e){if("legacy-default"!==e)return"fill"===e?"100%":nd("auto"===e?"fit-content":e)}function df(e){return"function"==typeof e}var pf={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 mf({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"}}=Vm(),P="text-bottom"===f?pf.verticalAlignVariant[f]:void 0;return o&&void 0===r?d(Bm,{ariaLabel:e,ariaLive:t,command:n,commandFor:r,className:v(pf.Link,pf.toneVariant["auto"===g?"neutral":g],pf.textDecorationVariant[h||("monochrome"===g?"underline":b)],pf.displayVariant[i],P),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 hf={Stack:"r0qqvk1 r0qqvk0 _1fragemws _1fragem64",overflowHidden:{hidden:"r0qqvk3 r0qqvk2 _1fragemup _1fragemv4",visible:"r0qqvk4"}};const gf=Um(Cp(_(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,display:_="auto",direction:b="block",gap:P,id:k,inlineSize:S="auto",justifyContent:w="normal",maxBlockSize:C="none",maxInlineSize:E="none",minBlockSize:x="0",minInlineSize:I="0",overflow:A="visible",padding:T="none",paddingBlock:L,paddingInline:R,paddingBlockEnd:N,paddingBlockStart:M,paddingInlineEnd:D,paddingInlineStart:z,rowGap:O,...B},F){const{className:V,style:U,styleElement:q}=zm({alignContent:a,alignItems:i,backgroundColor:o,backgroundColorHoverAndFocus:s,...Re({border:c,borderStyle:p,borderWidth:m}),blockSize:l,borderRadius:u,columnGap:f,display:_,flexDirection:b,flexWrap:b,gap:P,inlineSize:S,justifyContent:w,maxBlockSize:C,maxInlineSize:E,minBlockSize:x,minInlineSize:I,padding:T,paddingBlock:L,paddingBlockEnd:N,paddingBlockStart:M,paddingInline:R,paddingInlineEnd:D,paddingInlineStart:z,rowGap:O},{transforms:{display:pd,flexDirection:e=>"block"===e?"column":"row",flexWrap:e=>"block"===e?"nowrap":"wrap"}}),j=_d(),{Element:H,role:$}=$m(n,{defaultElement:j?"span":"div"});return d(y,{children:[q,d(H,{className:v(hf.Stack,hf.overflowHidden[A],V,g),role:$,"aria-label":t,"aria-current":e,"aria-labelledby":r,style:U,id:k,...B,ref:F,children:h})]})})));var ff="_1fyvcoo0 _1fragemwn _1fragem11z _1fragem11k";function yf({children:e}){const t=i(null),n=i(null),r=i(null),a=i(document.activeElement);l(()=>{const e=r.current;if(e){const t=Yg(e);t?t.focus():e.focus()}const t=a.current;if(t)return()=>{t.focus()}},[]);const o=e=>{const t=r.current;if(t){const n=e?Yg(t):Wg(t);n?n.focus():t.focus()}};return d(y,{children:[d("button",{className:ff,ref:t,"aria-hidden":"true",onFocus:()=>o(!1),type:"button"}),I(e,{tabIndex:-1,ref:r}),d("button",{className:ff,ref:n,"aria-hidden":"true",onFocus:()=>o(!0),type:"button"})]})}const vf="scrollbar-gutter",_f="stable";function bf(){const[e,t]=s(!1),r=i(0),o=i(null),l=i(null),c=n(()=>
2{if(!document.body||o.current)return;const{position:e,top:n,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(vf),!t?.split(/\s+/).includes(_f));var t}(e))return null;const t=e.style.getPropertyValue(vf);return e.style.setProperty(vf,_f),t}(document.documentElement);o.current={position:e,top:n,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",t(!0)},[]),u=n(()=>{if(!document.body)return;var e,n;null!==l.current&&(e=document.documentElement,(n=l.current)?e.style.setProperty(vf,n):e.style.removeProperty(vf),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)),t(!1)},[]);return a(()=>()=>{u()},[u]),{isLocked:e,lock:c,unlock:u}}function Pf({children:e,isInvisible:n,onClick:r}){const{lock:i}=bf(),{i18n:o}=ie();a(()=>{i()},[i]);const s=t(()=>n?.value??!1),l=d("div",{children:d(E,{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(Gc,{children:d(yf,{children:l})})}function kf({isOpen:e,isInvisible:t,children:n,onClick:r}){return d(E,{when:e,children:d(Pf,{isInvisible:t,onClick:r,children:n})})}function Sf({isOpen:e,walletName:t,handleClose:n,handleFocus:r}){return d(kf,{isOpen:e,children:d(wf,{handleClose:n,walletName:t,handleFocus:r})})}function wf({handleClose:e,handleFocus:t,walletName:n}){const{i18n:r}=ie();return d(Qg,{children:d(gf,{gap:"large-400",alignItems:"center",children:[d(af,{size:"large",children:r.translate("wallets.scrim.continue_purchase_in_window",{walletName:t?d(mf,{tone:"monochrome",onClick:t,children:n}):n})}),d(af,{children:[d(mf,{tone:"monochrome",onClick:e,children:r.translate("wallets.scrim.cancel")})," ",r.translate("wallets.scrim.and_return_to_checkout")]})]})})}function Cf(){const{checkout:{offsitePopupController:e}}=ie(),t=Jg();return d(Sf,{isOpen:e.isOpen,walletName:t.value??"",handleClose:()=>e.close({runCancelCallback:!0}),handleFocus:()=>e.focus()})}const Ef={address1:!0,address2:!0,city:!0,company:!0,countryCode:!0,district:!0,firstName:!0,lastName:!0,line2:!0,neighborhood:!0,phone:!0,postalCode:!0,streetName:!0,streetNumber:!0,subdistrict:!0,zoneCode:!0},xf=new Set(Object.values(Nt).flat());function If(e){return Object.hasOwn(Ef,e)}function Af({address:e,addressSettings:t,countryDetails:n}){if(!e)return!1;const{isRequired:r}=t,a=e.countryCode,i=n&&n.code===a&&!n.isFallback?n:void 0,o=i?new Set(Mt({country:i,editFormat:i.formatting.edit,addressSettings:t})):void 0;for(const s of Object.keys(e))if(If(s)&&!xf.has(s)&&(!o||o.has(s))&&("postalCode"===s&&i?i.postalCodeRequired:r(s,{countryCode:a}))&&(null==e[s]||0===e[s]?.length))return!1;return!0}const Tf=re("RequestContext");function Lf(){return ae(Tf)}const Rf=["AE","HK","IE","ZA","ES","KR","PA","PT","ID","TH","CN","JP"],Nf=["JP"];function Mf(e,{hiddenFields:t,multiline:n,countryFormat:r,displayName:a}={}){const i=zf(e,a);if(!i)return;const{addr:o,details:s,zoneFormat:l}=i;return Dt(o,s,t,n,r,l)}function Df(e,{hiddenFields:t,countryFormat:n,displayName:r}={}){const a=zf(e,r);if(!a)return;const{addr:i,details:o,zoneFormat:s}=a;return Ot(i,o,t,n,s)}function zf(e,t){const{i18n:n}=ie(),{details:r}=Tt(e?.countryCode);if(!e)return;if(!r&&e.countryCode)return;const a=r??zt(void 0,n),i=e.countryCode&&Rf.includes(e.countryCode)?"explicit":"short";return{addr:t??!0?e:{...e,firstName:void 0,lastName:void 0},details:a,zoneFormat:i}}function Of(e){const{details:t,loading:n}=Tt(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 Bf(e){return n(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 Ff=e=>{const t=n((t,n)=>{e[t].value=n},[e]),r=n(()=>{A(()=>{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=n(t=>{e[t].value=void 0},[e]);return{addressErrors:e,setAddressError:t,resetAddressErrors:r,resetAddressFieldErrors:a}},Vf=(e,t)=>
2({resetAddressSuggestions:function(){Object.entries(t).forEach(([n])=>{Object.keys(e).includes(n)&&void 0!==e[n].peek()&&(t[n].value=void 0)}),A(()=>{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 Uf(e,t,a,i){const{i18n:o,checkout:s}=ie(),{geolocation:l}=Lf(),c=s.configuration.addressSettings.nonBillingAddressSettings.value,u=s.negotiator.current.fields.deliveryNext,{details:d}=Tt(e),{getIsMobilePhoneFieldVisible:p}=qf(),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(()=>t??[{value:g.code,label:g.name}],[t,g]);return n((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 qf=()=>{const{checkout:{identity:e},shopPay:t}=ie(),r="shopPay"===e.current.value,a=t.user.isAuthenticatedUser;return{getIsMobilePhoneFieldVisible:n(e=>r&&!a.value&&"shipping"===e,[r,a])}};function jf(){const{i18n:e,checkout:{negotiator:n}}=ie(),{shippingAddress:r}=n.parts;return t(()=>{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 Hf(e,t,n,r){const{i18n:a}=ie();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 $f({address:e,nameLinePosition:t,addressDisplayName:n,showPhone:r}){const{countryCode:a=""}=e,{details:i,loading:o}=Tt(a),{i18n:s}=ie();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=Jf([o,s]),y=Jf([l,c]),v=Jf([u,m??"",d,h],", ");if(r){const t=Nf.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 Jf([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=Jf([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:Jf([y,v])}:{nameLine:f,companyLine:g,primary:Jf(["inline"===t?f:"",g,y],", "),secondary:v}}(e,t,n,o?void 0:i,s.locale,r)}function Yf(e){const{checkout:{negotiator:t}}=ie(),n=`${e}Address`,r=t.parts[n].value,{primary:a,secondary:i}=$f({address:r,nameLinePosition:"inline"});return`${a} ${i}`}function Wf(e,t){const{checkout:n}=ie(),a=t??n.configuration.addressSettings.nonBillingAddressSettings.value,{details:i}=Tt(e),o=i?n.address.extendedAddressMode.getFormatFromCountry(i):void 0;return r(()=>Mt({country:i,editFormat:o,addressSettings:a}),[i,o,a])}function Gf(e,t){const{checkout:r}=ie(),a=t??r.configuration.addressSettings.nonBillingAddressSettings.value,{details:i}=Tt(e);return n((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 Jf(e,t=" "){return e.filter(Boolean).join(t)}function Kf(e){return"string"==typeof e?""!==e.trim():null!=e}function Qf(e){return Object.entries(e).filter(([e,t])=>If(e)&&Kf(t)).map(([e])=>e)}function Xf(e){return Kf(e.address1)||Kf(e.streetName)}function Zf(e){const t=Object.fromEntries(Object.entries(e).filter(([t,n])=>
2If(t)&&Kf(n)&&!function(e,t,n){if("string"!=typeof n)return!1;if("address1"===t){const t=Yt({countryCode:e.countryCode,address1:void 0,address2:void 0,line2:void 0,streetName:e.streetName,streetNumber:e.streetNumber});return Kf(t)&&n.trim()===t?.trim()}if("address2"===t){const t=Wt({countryCode:e.countryCode,address1:void 0,address2:void 0,line2:e.line2,neighborhood:e.neighborhood});return Kf(t)&&n.trim()===t?.trim()}return!1}(e,t,n)).map(([e,t])=>[e,"string"==typeof t?t.trim():t]).sort(([e],[t])=>e.localeCompare(t)));return $t(JSON.stringify(t))}function ey(e,t,n,r,a,i,o){o.monorailEvent({schemaId:"checkout_address_completion/1.0",payload:{shopId:parseInt(le(r),10),checkoutToken:a||"unknown",country:e||"unknown",section:n,completedFields:t,isBillingDefaultToShippingAddress:i}})}function ty(){const{checkout:{negotiator:e}}=ie(),t=e.parts.shippingAddress.value,n=!Gt(t),r=Mf(t,{hiddenFields:["phone"]});return!n&&r?r:null}function ny(e){return"failed"===e.status}function ry(e){return"payment"===e.type}function ay(e,t){return e&&t&&e.id===t.id&&e.status===t.status}function iy(e){return"action_required"===e.status&&"complete_payment_challenge"===e.action.type}function oy(e){return"action_required"===e.status&&"complete_payment_challenge_v2"===e.action.type}function sy(e){return"complete_payment_challenge"===e.type}function ly(e){return"complete_payment_challenge_v2"===e.type}function cy(e){return{receiptId:e?.id?de(e.id)??e.id:void 0,status:e?.status}}function uy(e=[]){return e?.flatMap(e=>"submitted"===e.status?e.remotePurchaseOrder.deliveryLines?.map(t=>({...t,shopId:e.shopId}))??[]:[])??[]}function dy(e){return e.some(({code:e})=>new Set([...Jt,...Kt]).has(e))}function py(e){return e.some(({code:e})=>Qt.has(e))}function my(e){return e.some(e=>Xt.has(e.code)&&"RemoveTermViolation"===e.__typename)}function hy(e){return e.some(e=>Zt.has(e.code)&&"RemoveTermViolation"===e.__typename)}function gy(e){return _y({subscribedViolations:e,onlySubscribeToProgression:!0})}function fy(e){return _y({subscribedViolations:e,onlySubscribeToProgression:!1})}function yy(e){return _y({subscribedViolations:e,onlySubscribeToProgression:!0,skipProgressionNegotiations:!0})}function vy(e){const{checkout:{wallets:t}}=ie(),n=fy(e);return k(()=>{t.activeSession.value&&n.violations.value.size>0&&o(()=>{n.clearViolations()})}),n}function _y({subscribedViolations:e,onlySubscribeToProgression:r,skipProgressionNegotiations:i}){const{observability:o,checkout:{wallets:s,negotiator:l}}=ie(),{lastJourneyProgression:c,lastNegotiation:u}=l,d=r?c:u,p=m({violations:new Set}),h=t(()=>p.value.violations),g=t(()=>p.value.negotiationStage),f=n(()=>{p.value={violations:new Set}},[p]),y=T(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 by(e){const{checkout:t,embed:r}=ie(),o=t.wallets.activeSession.value,l=t.latestReceipt.value,{delegatedPaymentInstrument:c}=t.negotiator.context,[u,d]=s(),p=i(c.peek()),m=n(()=>{d(void 0)},[]),h=n(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 Py(e){if("failed"===e?.status&&"hsa_qualification"===e.failure.type&&"SURVEY_EXITED"!==e.failure.code)return e.failure}function ky(){const{checkout:e}=ie(),t=e.wallets.activeSession.value,n=e.latestReceipt.value,[r,i]=s(()=>t?void 0:Py(n));return a(()=>{t||i(Py(n))},[t,n]),{error:r,hasError:void 0!==r}}function Sy(){const{checkout:e}
2=ie(),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 wy(){const{checkout:e}=ie(),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 Cy(e){const{checkout:{negotiator:n}}=ie(),{allViolations:r}=n.current.fields;return t(()=>Boolean(r.value?.some(t=>t.code===e)))}function Ey(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 xy(){const e=tg(),{message:t,code:n}=function(){const{checkout:e}=ie(),t=e.wallets.activeSession.value,n=e.latestReceipt.value,[r,i]=s(null),[o,l]=s("");return a(()=>{t||n&&ny(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}}=ie(),{directPaymentErrors:i,generalPaymentError:l}=r.parts;k(()=>{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})})}),k(()=>{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})})}),k(()=>{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})})}),k(()=>{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})})}),k(()=>{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}=gy(new Set),o=i.value;return Xl(e=>{"invalid"===e.type?r(e):r(null)}),a(()=>{let e=null;if(n){const t=n.reasons.filter(e=>e!==qt.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:Ey(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 k(()=>{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:Ey(t),code:n,field:r,origin:a,type:i,silencedViolation:!1},timestamp:new Date})})},[e,d]),null}function Iy(e){return e}function Ay(e,t){if(t)return e.find(e=>e.deliveryStrategyHandle===t)}var Ty=(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))(Ty||{});function Ly(){const{client:e,shop:t}=ie();if(!t.hasFlagEnabled(an))return null;const n=e.unstable_getSerialization("experiments");return on(n)}function Ry(e){return"thankYou"===e?.type||"postPurchase"===e?.type}function Ny(e,t){return void 0!==e.greenPath.find(e=>e.route===t)}const My=()=>{const{i18n:e,checkout:{negotiator:n}}=ie(),r=n.current.fields.paymentFlexibilityPaymentTermsTemplate,a=it();return t(()=>{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})},Dy=re("ShellContext");function zy({children:e,shell:t}){return d(Dy.Provider,{value:t,children:e})}function Oy(){return ae(Dy)}function By(){const e=Oy(),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)});
2t.current={shell:e,watchedKeysSignals:n,reactiveConfiguration:r}}return t.current.reactiveConfiguration}function Fy(){const{checkout:{configuration:e}}=ie(),{orderSummary:t}=By(),n=e.orderSummary?.currencyBadgeVisibility??t.currencyBadgeVisibility;return!n||"VISIBLE"===n}function Vy(e){const{checkout:t,observability:a,router:i,shop:o}=ie(),s=void 0===e||(Array.isArray(e)?e:[e]).some(e=>o.hasFlagEnabled(e)),l=n(e=>{s&&(t.unstable_forceCheckoutLayoutToOnePage(),Uy(a,{...e,result:"success"}))},[t,s,a]),c=n((e={wallet:null})=>{if(!s)return;if(!t.isCheckoutLayoutForcedToOnePage.value)return;const n={wallet:e.wallet};a.counter({name:"wallet_3page_vaulted_review_exited",value:1,attributes:n}),a.log("wallet_3page_vaulted_review_exited","Exited the forced one-page wallet vaulted review",n),i.navigate("/information",{replace:!0}),t.unstable_clearForcedCheckoutLayout()},[t,s,a,i]);return r(()=>({forceOnePageCheckoutLayout:l,clearForcedCheckoutLayout:c}),[c,l])}function Uy(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 qy(){const{i18n:e}=ie(),n=function(){const{checkout:{negotiator:e}}=ie(),n=e.current.fields.paymentMethods,r=mn("paymentMethods");return t(()=>!(r.value||!n.value||0===n.value?.length)&&Boolean(n.value?.every(e=>"wallet"===e.type||"walletsPlatform"===e.type||"giftCard"===e.type)))}(),{availableWallets:r}=un(),a=T(r);return t(()=>{if(!(a.value.length>0)&&n.value)return{code:Ty.PaymentSheetViolations,tone:"critical",localizedMessage:e.translate("payment.no_working_method_error"),nonLocalizedMessage:e.translate("payment.no_working_method_error")}})}function jy(){const e=Fm(),n=Oy(),r=Up();return t(()=>{const t=e.configurationSignal.value.colors,a=n.configurationSignal.value.main,{current:i,parent:o}=r,s=[i,o].map(e=>e?t.schemes?.[e]?.base?.background:void 0).find(e=>e&&!cn(e));if(s)return s.l<50?"light":"dark";const l=a.colorScheme?t.schemes?.[a.colorScheme]?.base?.background:void 0;return l&&!cn(l)&&l.l<50?"light":"dark"}).value}function Hy(){const{shop:{customerAccountRequirement:e},checkout:{negotiator:n}}=ie(),r=n.current.fields.buyerIdentity,{email:a}=n.parts;return t(()=>{const t=Boolean(!!r.value?.customerProfile&&(r.value.customerProfile.email||a.value));return!("REQUIRED"===e||t)})}function $y(){const{shop:e,checkout:{negotiator:n}}=ie(),{deliveryNext:r}=n.current.fields,{deliveryLines:a}=n.parts,i=Kl(),o=St("ONE_TIME_PURCHASE");return t(()=>{if(e.shipPickupInOneOrderEnabled){if(Ry(i.value.currentDetour))return sn(r.value);const e=a.value.filter(e=>!e.value.deliveryMethodTypes.includes("NONE"));return e.length>0&&e.every(e=>e.value.deliveryMethodTypes.some(ln))}const t=wt(o.value);return ln(t?.methodType)})}function Yy(){const{checkout:e}=ie(),n=$y();return t(()=>!n.value&&e.isShippingRequired.value)}function Wy(e){const{checkout:{negotiator:n}}=ie(),r=n.current.fields.paymentMethods;return t(()=>r.value?.find(t=>"wallet"===t.type&&t.name===e))}function Gy(){const{client:e,shop:t,source:r,observability:a}=ie();return n((n,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")};Ll(a,i)||r.log("wallets_hooks_incomplete_postal_code_detected","Detected incomplete shipping postal code during wallet payment submission",c),fn(a,i)&&r.log("wallets_shipping_address_invalid_postal_code_detected","Detected padded postal code from wallet payment submission",c)}({client:e,shop:t,source:r,observability:a},n,i),[e,t,r,a])}function Jy(){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 Ky(){return 1e4*Jy()}function Qy(){return 45e3*Jy()}function Xy(e){const n=e.inMemoryApplePayParts.paymentSheetError,r=e.inMemoryGooglePayParts.paymentSheetError;return t(()=>{const e=n.value;if("unusable_partial_address"===e?.type)return"APPLE_PAY";const t=r.value;return"unusable_partial_address"===t?.type?"GOOGLE_PAY":null})}function Zy({applePayPaymentSheetError:e,applePaySubscriptionReviewTransition:t,isApplePaySubscriptionReviewLayoutSupported:n}={}){const{checkout:i,router:o,shop:s}=ie(),l=o.currentUrl.value,c=s.hasFlagEnabled(an),u=hn(),d=s.hasFlagEnabled(dn),p=i.configuration.layout.isOnePage.value,{forceOnePageCheckoutLayout:m}=Vy(dn),{queryParam:h,errorMessage:g,errorTitle:f,tone:y}=function(e){const{i18n:t}=ie(),n=My().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:pn,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=Ly(),_=h===pn&&void 0!==t&&(n??Tl({applePayThreePageVaultedReviewEnabled:d,isOnePageCheckout:p})),b=_;return a(()=>
2{if(h){_&&t&&!i.wallets.hasConsumedApplePaySubscriptionReviewParam.value&&gn({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 ev=()=>n(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}))}},[]);yn.portableWallets.url;const tv="guest";function nv(e){const{checkout:{negotiator:n}}=ie(),r=n.current.fields.paymentMethods;return t(()=>r.value?.find(t=>"walletsPlatform"===t.type&&t.name===e))}function rv(e){const{checkout:{negotiator:n}}=ie(),r=n.current.fields.paymentLines;return t(()=>r.value?.lines.find(t=>"walletsPlatformPaymentMethod"===t.method.type&&t.method.name===e))}function av(){const{checkout:{negotiator:e}}=ie(),{email:t,shippingAddress:r,billingAddress:a,billingAddressOption:i,paymentLines:o}=e.parts,s=function(){const{checkout:e}=ie(),t=e.configuration.addressSettings.nonBillingAddressSettings;return n(function({addressSignal:e,buyerDetailsAddress:n}){A(()=>{for(const[r,a]of Object.entries(n)){if("__typename"===r||void 0===a)continue;if("InvalidWalletPrefillingAddress"===n.__typename&&!t.value.isVisible(r))continue;const i=e.fields[r];i&&(i.value=a)}})},[t])}();return n((e,n)=>{n.email&&(t.value=n.email),n.prefillingShippingAddress&&s({addressSignal:r,buyerDetailsAddress:n.prefillingShippingAddress}),n.prefillingBillingAddress&&(i.value="custom",s({addressSignal:a,buyerDetailsAddress:n.prefillingBillingAddress})),n.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 _n.AmazonPay:case _n.BuyWithPrime:{const[e]=rn(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=bn(i,a)}({paymentLineSignal:o,walletName:e,walletParams:n.walletParams,email:n.email??void 0})},[a,i,t,s,o,r])}function iv(e=["phone"]){const{checkout:{negotiator:t}}=ie(),{shippingAddress:n}=t.parts,r=n.value;return{formattedAddress:Mf(r,{hiddenFields:e}),address:r}}function ov(){const e=nv(_n.BuyWithPrime);return t(()=>{const{configurationParams:t}=e.value??{configurationParams:{}},{checkoutSupportsSplitCart:n}=t;return Boolean(n)})}var sv=(e=>(e.Api="ApplePay::Exception::API",e))(sv||{}),lv=(e=>(e.Api="PayPal::Exception::API",e.Sdk="PayPal::Exception::SDK",e.Button="PayPal::Exception::Button",e))(lv||{}),cv=(e=>(e.Available="available",e.Loading="loading",e.Error="error",e))(cv||{});function uv(e,t,n){return!("SHOP_PAY"===e&&!n)&&(t?.includes("ACCELERATED_CHECKOUT")??!1)}function dv(e){const{embed:t}=ie(),n=Boolean(t?.isFlagshipPartner)&&!Pn(t?.embedder),a=e.buttonStatus.value;return r(()=>"error"!==a.status&&"not_eligible"!==a.status&&(!n||"not_rendered"!==a.status),[a.status,n])}function pv(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 mv(e,t=0){const n="undefined"==typeof window?0:window.innerWidth;return n<=279?2:n<=375?e||3===t?3:2:4}function hv(){const{shop:{shopPayEnabledForPrimarySellerOfRecord:e},checkout:{negotiator:n}}=ie(),{shopPayEnabledForSellerOfRecord:r}=n.current.fields;return t(()=>r.value??e)}function gv(){const{shop:{hasMultipleLegalEntities:e},checkout:{identity:n,negotiator:r}}=ie(),a=hv(),i=En(),{deferredTotal:o}=r.current.fields,s=n.current;return t(()=>i.value&&o.value?"deferred_payment":"shopPay"===s.value&&e||a.value?void 0:"shop_pay_disabled")}function fv(){const e=gv();return t(()=>void 0===e.value)}function yv(e){const{inMemoryGooglePayParts:o,inMemoryPayPalParts:s,inMemoryAmazonPayParts:l,inMemoryApplePayParts:c,inMemoryVenmoParts:u}=e,{client:{userAgent:d},checkout:{negotiator:p}}=ie(),{value:m}=p.current.fields.paymentMethods,h=m?.some(e=>"wallet"===e.type&&"APPLE_PAY"===e.name)??!1,g=function(e){const n=Xy(e);return t(()=>null!==n.value)}(e);
2!function(e){const t=Xy(e),n=e.didIncrementUnusablePartialAddressMetric,{observability:r}=ie();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}=ie(),{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(kn);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=Lf().geolocation.country.code,{shop:o,observability:s,client:{userAgent:l},embed:c}=ie(),u=o.hasFlagEnabled(Sn)?c?.client?.embedderHostname:void 0,d=i(),p=Mg(),m=rt().value,[h]=Lh(),g=h.includes("PICKUP_POINT");return r(()=>!!e&&!t&&!n.sessionLoadFailed.value&&!!m&&!g&&function({geolocatedCountryCode:e,observability:t,slowCanMakePaymentCache:n,isCheckoutEditor:r,userAgent:a,embedderHostname:i}){if(Boolean("undefined"==typeof window||window.self!==window.top)){const e=r||Boolean(i),t=function(e){const t=wn(e);return Boolean("Safari"===t?.name&&t.version&&Number(t.version)>=17)}(a);if(!e||!t)return!1}
2const o=Boolean(window.ApplePaySession)&&pv(t,"hasOwnProperty",()=>ApplePaySession.hasOwnProperty("canMakePayments"))&&function(e){return"function"==typeof ApplePaySession.supportsVersion&&pv(e,"supportsVersion",()=>ApplePaySession.supportsVersion(Cn))}(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&&("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)}(a))}({geolocatedCountryCode:a,observability:s,slowCanMakePaymentCache:d,isCheckoutEditor:p,userAgent:l,embedderHostname:u}),[e,t,n.sessionLoadFailed.value,m,g,a,s,d,p,l,u])}({hasApplePayPaymentMethod:h,hasUnusablePartialAddress:f,inMemoryApplePayParts:c}),_=function(e){const n=e.sdkStatus,r=e.buttonStatus;return t(()=>n.value.status!==cv.Error&&"error"!==r.value.status)}(l),b=_.value,P=function({inMemoryAmazonPayParts:e}){const n=function(){const{checkout:{negotiator:e}}=ie(),n=e.current.fields.deliveryNext;return t(()=>{const e=n.value;if(!e||"unavailable"===e.status)return!1;const t=e.lines.filter(qe);if(1!==t.length)return!1;const[r]=t;return!!r&&r.methods.some(e=>"LOCAL"===e.methodType)})}(),r=ov(),a=e.sdkStatus,i=e.buyWithPrimeButtonStatus;return t(()=>r.value&&!n.value&&a.value.status!==cv.Error&&"error"!==i.value.status)}({inMemoryAmazonPayParts:l}).value,k=t(()=>function(e){const{status:t}=e;return"error"!==t&&"not_eligible"!==t}(u.buttonStatus.value)).value,S=function(e){const t=e.buttonStatus.value.status;return n(e=>{if("APPLE_PAY"!==e.name||"error"!==t)return e;const n=e.placements?.filter(e=>"ACCELERATED_CHECKOUT"!==e);return n?.length?{...e,placements:n}:void 0},[t])}(c),w=function(e){const t=e.acceleratedCheckoutButtonStatus.value,r=e.payWithPayPalButtonStatus.value;return n(e=>{if("PAYPAL_EXPRESS"!==e.name)return e;if(!e.placements||0===e.placements.length)return;const n=e.placements.filter(e=>!("ACCELERATED_CHECKOUT"===e&&"error"===t.status||"PAYMENT_METHOD"===e&&"error"===r.status));return 0!==n.length?{...e,placements:n}:void 0},[t.status,r.status])}(s),C=fv().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 _n.BuyWithPrime:return P;case _n.AmazonPay:return b;case"SHOP_PAY":return C;case"SHOPIFY_INSTALLMENTS":return!1;case"VENMO":return k;default:return L(t)}}(e))??[];return vv(e)}().flatMap(e=>w(e)??[]).flatMap(e=>S(e)??[]),t=function({maxWalletButtonCount:e,userAgent:t}){if(""===t)return xn;function n(t=[]){const n=t.indexOf(_n.BuyWithPrime);-1!==n&&(n<e||(t.splice(n,1),t.splice(e-1,0,_n.BuyWithPrime)))}if(t.match(/Apple Mail|Chromium|Crosswalk|Dragon|Electron|; MSIE xyz;|Trident 7.0|.\*rv|Pale Moon|Puffin|QQ Browser|SeaMonkey|Sogou Explorer|UC Browser|Vivaldi/i))return["SHOP_PAY","PAYPAL_EXPRESS",_n.BuyWithPrime,_n.AmazonPay,"APPLE_PAY","GOOGLE_PAY","VENMO"];if(t.match(/Edge|Firefox Mobile|Iron|OPR|Yandex Browser/i)||t.match(/Firefox/i)&&!t.match(/Firefox iOS/i))return["SHOP_PAY","PAYPAL_EXPRESS",_n.BuyWithPrime,_n.AmazonPay,"GOOGLE_PAY","APPLE_PAY","VENMO"];if(t.match(/Android/i)){const e=["SHOP_PAY","PAYPAL_EXPRESS","GOOGLE_PAY",_n.BuyWithPrime,_n.AmazonPay,"VENMO"];return n(e),e}if(t.match(/CFNetwork|Chrome Mobile iOS|Coc Coc|Googlebot|Maxthon|Safari|Mobile Safari|Mobile Safari UI\/WKWebView|Oper Mini|Pinterest|Shopify Mobile/i)||t.match(/Safari/i)&&!t.match(/Chrome/i)){const e=["SHOP_PAY","PAYPAL_EXPRESS","APPLE_PAY",_n.BuyWithPrime,_n.AmazonPay,"GOOGLE_PAY","VENMO"];return n(e),e}if(t.match(/Amazon Silk|Chrome|Chrome Mobile WebView|Chrome Mobile|Opera|Opera Mobile|Samsung Internet/i))return["SHOP_PAY","PAYPAL_EXPRESS",_n.BuyWithPrime,_n.AmazonPay,"GOOGLE_PAY","APPLE_PAY","VENMO"];if(t.match(/Facebook|Instagram|Firefox iOS/)){const e=["SHOP_PAY","PAYPAL_EXPRESS","APPLE_PAY",_n.BuyWithPrime,_n.AmazonPay,"GOOGLE_PAY","VENMO"];return n(e),e}return t.match(/IE/),["SHOP_PAY","PAYPAL_EXPRESS",_n.BuyWithPrime,_n.AmazonPay,"APPLE_PAY","GOOGLE_PAY","VENMO"]}({maxWalletButtonCount:mv(C,e.length),userAgent:d});return e.sort((e,n)=>t.indexOf(e.name)-t.indexOf(n.name))},[m,v,y,P,b,k,S,w,C,d]);return E}const vv=e=>e.find(e=>e.name===_n.BuyWithPrime)?e.filter(e=>e.name!==_n.AmazonPay):e;function _v(){const{checkout:{negotiator:e}}=ie(),n=e.current.fields.paymentMethods,r=mn("paymentMethods");return t(()=>!(r.value||!n.value||0===n.value?.length)&&Boolean(n.value?.some(e=>"wallet"===e.type||"walletsPlatform"===e.type)))}function bv(){const{checkout:e,source:n}
2=ie(),{didIncrementUnusablePartialAddressMetric:r,inMemoryGooglePayParts:a,inMemoryPayPalParts:i,inMemoryVenmoParts:o,inMemoryApplePayParts:s,inMemoryAmazonPayParts:l,inMemoryShopPayParts:c}=un(),u=T(yv({inMemoryGooglePayParts:a,inMemoryPayPalParts:i,inMemoryVenmoParts:o,inMemoryApplePayParts:s,inMemoryAmazonPayParts:l,didIncrementUnusablePartialAddressMetric:r})),d=T(dv(c)),p=t(()=>u.value?.filter(({placements:e,name:t})=>uv(t,e,d.value)).length),m=_v();return t(()=>e.configuration.visibility.showExpressCheckout.value&&(p.value>0||"simulated"===n.type&&!p.value&&m.value))}const Pv=f({swappable:new Set,fixed:new Set,supported:new Set,disabled:new Set});function kv({children:e}){const t=Sv();return d(Pv.Provider,{value:t,children:e})}function Sv(){const e=bv(),{shop:{acceptTipPayments:t},checkout:n}=ie(),a=n.configuration.layout.isOnePage.value,i=Ln(n.identity.current.value),o=!mn("isShippingRequired").value&&!n.isShippingRequired.value;return r(()=>function({showExpressCheckout:e,isOnePageCheckout:t,acceptTipPayments:n,disableDeliveryExtensions:r,isVaultedWalletIdentity:a}){const i=new Set(Tn),o=new Set([...In,...An]),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:a,acceptTipPayments:t,disableDeliveryExtensions:o,isVaultedWalletIdentity:i}),[t,o,i,a,e.value])}const wv=new Map([["thankYou",[...In,...An]]]),Cv=w({suspenseName:"extensions",id:()=>"ExtensionsInner",displayName:"ExtensionsInner",load:()=>ll(()=>import("./33682ee7.CpW0FJxZ.js"),__vite__mapDeps([21,1,16,2,3,4,5,11,22,23,24,13,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,12,56,57,9,58,59,60,10,14,15]))});function Ev(e){const{checkout:{extensibility:{ui:t}}}=ie();return d(kv,{children:d(E,{when:t.enabled,fallback:e.children,children:d(Cv,{...e})})})}const xv=re("PostPurchaseContext");function Iv({children:e}){const{shop:{postPurchase:{extensionAvailable:t,developmentModeAvailable:n}},router:a}=ie(),i=a.currentUrl.value,o=r(()=>{const e=new URLSearchParams(i.search),t=e.get("script_url"),r=e.get("api_key")||e.get("post_purchase_dev_api_key"),a=e.get("config")??void 0;return n&&t&&r?{scriptUrl:t,apiKey:r,config:a}:void 0},[n,i.search]),s=n&&Boolean(o),l=r(()=>{const e=new URLSearchParams(i.search),t=e.get("uuid"),r=e.get("socket_url");return n&&t&&r?{uuid:t,socketUrl:r}:void 0},[n,i.search]),c=r(()=>{const e=`https://${i.host}/checkouts/unstable/changesets`;return{extensionAvailable:t,postPurchaseEnabled:t||s,developmentMode:s,developmentOptions:o,liveReload:l,changesetsUrl:e}},[t,s,o,l,i.host]);return d(xv.Provider,{value:c,children:e})}function Av({checkout:e}){if(!e.configuration.layout.isOnePage.value)return!1;const t=e.unstable_graphqlDataRequestInfo?.checkoutSheetProtocolConfig?.schema;return Boolean(t&&Rn.has(t))}function Tv({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 Lv({children:e}){return d(y,{children:e})}const Rv={"checkout-sheet":w({displayName:"CheckoutSheetProtocolProvider",renderError:Dv,renderLoading:Lv,load:()=>C(()=>ll(async()=>{const{CheckoutSheetProtocolProvider:e}=await(import("./0fb2c600.Bo6-8SvA.js"));return{CheckoutSheetProtocolProvider:e}},__vite__mapDeps([61,1,2,3,4,5,15,62,63,64,12,6,13,10,14,16])).then(({CheckoutSheetProtocolProvider:e})=>({default:e})))}),"mobile-sdk":w({displayName:"MobileCheckoutSdkProvider",renderError:Dv,renderLoading:Lv,load:()=>C(()=>ll(async()=>{const{MobileCheckoutSdkProvider:e}=await(import("./dd9b68fc.DYq4O2td.js"));return{MobileCheckoutSdkProvider:e}},__vite__mapDeps([65,1,2,3,4,5,62,63,64,12,6,13,10,14,15,16])).then(({MobileCheckoutSdkProvider:e})=>({default:e})))})};function Nv(e){const t=function(e){return Av(e)?"checkout-sheet":Tv(e)?"mobile-sdk":null}(e);return t?Rv[t]:null}function Mv({children:e}){const t=Nv(ie());return d(t||y,{children:e})}function Dv(e){throw e}const zv=["closeAnnouncement","announcementAfterCollapsed","announcementAfterExpanded","announcementClosed","announcementExpanded","announcementCollapsed"],Ov=re("AnnouncementEmitterContext");function Bv({children:e}){const t=i(new Map),a=n((e,n)=>{t.current.has(e)||t.current.set(e,new Set);const r=t.current.get(e);r.has(n)||(R(n),r.add(n))},[t]),o=n((e,n)=>{const r=t.current.get(e);if(r)for(const t of r)t(n)},[t]),s=n((e,n)=>{const r=t.current.get(e);r?.has(n)&&(N(n),r.delete(n))},[t]),l=n(e=>{const n=e?[e]:zv;for(const r of n){const e=t.current.get(r);if(e){for(const t of e)N(t);e.clear()}}},[t]),c=r(()=>({on:a,emit:o,off:s,removeAllListeners:l}),[a,o,s,l]);return d(Ov.Provider,{value:c,children:e})}function Fv(){return ae(Ov)}const Vv=f(null),Uv=re("PendingComponentContext");function qv({children:e}){const t=r(()=>{const e=S(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(Vv.Provider,{value:t,children:e})}function jv(){return h(Vv)}const Hv=M,$v=Hv(({checkout:e,graphql:{coreGraphql:t}}
2,{queueToken:n,serializedReceipt:r,sessionFinished:a})=>{const i=t.query(Nn,{variables:{checkpointData:e.checkpointToken.peek()??null,queueToken:n??null},skip:Mn(a,r)});return{context:P(()=>({data:i.data.value??void 0,loading:i.loading.value})),data:i.data,error:i.error}});class Yv extends Error{constructor(){super(...arguments),this.name="InitialNegotiationError"}}const Wv=re("InitialNegotiationContext");function Gv({children:e}){const{client:t,observability:r,url:i,router:o,checkout:s,shopPay:c}=ie(),{negotiator:u}=s,p=!c.isExternal,m=p?u.initializationError.value:void 0,h=t.unstable_getSerialization("sessionFinished"),g=t.unstable_getSerialization("receipt"),f=t.unstable_getSerialization("queueToken"),{context:y,data:v,error:_}=Dn($v,{queueToken:f,serializedReceipt:g,sessionFinished:h}),b=function(){const{observability:e}=ie();return n((t,n)=>{const r=On(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 Yv(`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=zn(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(Wv.Provider,{value:y.value,children:e})}const Jv=re("ExtensionPointContext"),Kv=re("ExtensionContext"),Qv=re("CheckoutEditorBridgeContext");function Xv({children:e}){const t=Mg(),n=function(){const{client:e}=ie(),{isCheckoutEditor:t,isServerRendered:n}=e.initialRequest;return!0===t&&!0===n}(),[r,a]=s(null),i=rt();return t?d(Qv.Provider,{value:r,children:[n||r?e:null,d(E,{when:i,children:d(Zv,{setContext:a})})]}):e}const Zv=w({load:()=>ll(()=>import("./adeb5fdb.DPHh0ZHS.js"),__vite__mapDeps([66,1,44,24,2,3,4,5,67,68,64,69,70,10,13,14,15,16]))}),e_=f({loading:!1}),t_="dev";function n_(){return h(e_)}function r_(e){return!(!e?.version||parseInt(e.version,10)<3)}const a_="dev_mode";function i_({children:e}){const t=function(){const e=function(){const{client:e}=ie();return r(()=>{return t=e.cookies,{get:()=>t.get(a_),set:e=>{const n=(new Date).getTime(),r=new Date(n+18144e5);t.set(a_,e,{expiry:r})},remove:()=>{t.delete(a_)}};var t},[e.cookies])}(),{router:t,shop:n}=ie(),i=r(()=>t.currentUrl.value.searchParams.get("dev")??e.get(),[t,e]),o=null!=i&&(n.allowExtensionDevelopment||!1),[s,l]=D((e,t)=>{switch(t.type){case"fetched":{const e=r_(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:Bn("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(e_.Provider,{value:t,children:e})}function o_(e,t){return{type:"throttle",label:e.translate("throttle.title"),...t?{behavior:t}:{},route:"/throttle"}}function s_(e){return{type:"processing",label:e.translate("processing.t
2itle"),route:"/processing"}}function l_(e){return{type:"thankYou",label:e.translate("thank_you.title"),route:"/thank-you"}}function c_(e){return{type:"noAddressLocation",label:e.translate("no_address_location.title"),route:"/no-address-location"}}function u_(e){return{type:"stockProblems",label:e.translate("stock.title"),route:"/stock-problems"}}function d_(e,t){return{type:"terminalError",route:"/error",label:e.translate("general.title",{shopName:t})}}function p_(e){return{type:"postPurchase",label:e.translate("post_purchase.title"),route:"/post-purchase"}}function m_(e){return{type:"offsitePaymentFailed",label:e.translate("offsite_payment_failed.title"),route:"/offsite-payment-failed"}}function h_(e){return{type:"shopPayLogin",label:e.translate("brand.shop_pay"),route:"/shoppay_login"}}function g_(e,{beforeStock:t=[],afterStock:n=[p_(e)]}={}){return[o_(e),s_(e),l_(e),...t,u_(e),...n]}function f_(e){return{id:"review",label:e.translate("review.title"),route:"/review",features:[]}}function y_(e,t,n){if(!e)return!1;const r=t?.[0]?.method;if("wallet"!==r?.type)return!1;const a=Ml(n);return"APPLE_PAY"===r.name||"PAYPAL_EXPRESS"===r.name&&a}function v_(){const{checkout:e,shop:n,i18n:r}=ie(),{buyerIdentity:a,deliveryNext:i}=e.negotiator.current.fields,o=t(()=>Vn(a.value?.purchasingCompany?.location.shippingAddress)?.countryCode),{details:s}=Tt(o.value),l=T(s),c=n.additionalAddressFieldsEnabled;return t(()=>Un({purchasingCompany:a.value?.purchasingCompany,shippingCountries:n.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 __(){const{checkout:{negotiator:e}}=ie(),{buyerIdentity:n}=e.current.fields,r=Be();return t(()=>r.value.enabledDeliveryMethods.includes("PICK_UP")&&Boolean(n.value?.purchasingCompany))}function b_({checkout:e,source:t}){const n=e.proposal.facts.delivery??[];if(Fn(t)&&n.length>0)return n[0]}function P_(){const e=__(),{checkout:n}=ie(),r=n.negotiator.current.fields.deliveryNext;return t(()=>{const t=n.proposal.facts.delivery??[],a=t.length>0&&t.every(e=>null!==e.pickupAddress);return e.value&&(sn(r.value)||a)})}function k_(){const e=it(),{checkout:n,source:r}=ie(),{buyerIdentity:a,shippingAddress:i}=n.negotiator.current.fields,o=P_(),s=__(),l=Dc();return t(()=>!(l.value||!s.value&&!e.value||o.value||Gt(b_({checkout:n,source:r})?.deliveryAddress??i.value)||a.value?.purchasingCompany?.location.shippingAddress))}function S_(){const e=Dc(),n=__(),{checkout:r,source:a}=ie(),i=r.negotiator.current.fields.buyerIdentity,o=r.proposal.negotiated.fields.mustSelectProvidedShippingRate;return t(()=>{const t=i.value?.purchasingCompany,s=(o.value??!1)||Boolean(b_({checkout:r,source:a}));return Boolean(t)&&(e.value||n.value&&!s)&&r.isShippingRequired.value})}const w_=["contact-information","shipping-address"],C_=["delivery-method"],E_=["payment-methods","billing-address","localization-extension"];function x_(e,t){return e?.id===t?.id&&e?.route===t?.route}function I_(e){e.parts.email.value.trim()&&e.parts.acceptEmailMarketing.value&&(e.context.emailMarketingConsentGrantReachedSignal.value=!0)}function A_(){const e=Kl(),{checkout:t}=ie(),n=t.negotiator,r=t.configuration.layout.isOnePage.value;return Zl(async(t,a)=>{if("completion"===t)return void I_(n);if("progression"!==t||a?.prefetch||r)return;const{currentDetour:i,currentPage:o,plan:s}=e.value;if(i||null==o)return;const l=n.current.value,c=s.greenPath.findIndex(e=>x_(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)&&I_(n)}),null}function T_(e){const t="string"==typeof e?e:e.type;return Fn(e)||"draftOrder"===t}function L_(e){if(!("target"in e))return;const[t,n]=(r=e.target,r.split("$.")[1]?.split(".").map(e=>e.replace(/\[\d+\]/g,""))??[]);var r;switch(t){case"payment":return"billingAddress"===n?"billing-address":"payment-methods";case"tip":return"payment-methods";case"buyerIdentity":return"contact-information";case"delivery":return jn.has(e.code)?"shipping-address":"delivery-method";case"cart":switch(n){case"buyerIdentity":return"contact-information";case"deliveryGroups":return"shipping-address"}}}function R_(e,t=[]){return Boolean(e?.email??e?.phone)&&t.every(e=>"contact-information"!==L_(e))}class N_ extends cl{constructor(){super(...arguments),this.name="JourneyError"}}class M_ extends sl{constructor(){super(...arguments),this.name="SubmitForCompletionNetworkError"}}function D_(e){return Hn(e)&&!e.some(e=>$n.has(e.code))}function z_(e){return e.some(e=>"UnprocessableTermViolation"===e.__typename&&Yn.has(e.code))}function O_(){return ae(Wv)}class B_ extends sl{constructor(){super(...arguments),this.name="InfiniteRedirectError",this.defaultGroupingHash="InfiniteRedirectError"}}class F_{#l={};#c=null;#u=!1;detectInfiniteRedirect(e,t,n){const r=e.pathname;if(this.#c&&clearTimeout(this.#c),this.#l[r]=(this.#l[r]||0)+1,this.#l[r]>=10&&!this.#u){const a=new B_(`Detected potential infinite redirect: ${this.#l[r]} navigations to ${r} within 200ms`),i=t.value;n.error(a,{severity:"error",metadata:{redirectDetails:{navigationCounts:JSON.stringify(this.#l),currentUrl:e.toString(),path:r,threshold:10,timeframe:200},journeyState:{redirectTo:i.redirectTo?.route}}}),this.#u=!0,this.#l={}}this.#c=setTimeout(()=>{this.#l={},this.#c=null},200)}cleanup(){this.#c&&(clearTimeout(this.#c),this.#c=null)}}function V_(e){const{router:t,checkout:o,observability:s,source:l}=ie(),c=o.proposal.facts.delivery??[],u=o.negotiator,d=Boolean(o.proposal.facts.requiresShipping),p=Fn(l)?d:o.isShippingRequired.value,m=o.configuration.layout.isOnePage.value,h=function(){const{data:e}=O_();return"NegotiationResultAvailable"===e?.session?.negotiate.result.__typename&&"PendingTerms"===e.session.negotiate.result.sellerProposal.delivery.__typename}(),g=function(){const{data:e}=O_(),{checkout:t}
2=ie(),n=e?.session?.negotiate.result;let r;if("NegotiationResultAvailable"===n?.__typename&&"PendingTerms"===n.sellerProposal.delivery.__typename){const{sellerProposal:e,buyerProposal:t}=n;r=Gn({delivery:e.delivery,buyerDelivery:t.delivery,remoteDelivery:Jn(e.remote).remoteDelivery})}const{details:a}=Tt(r?.countryCode);return null!=r&&Af({address:r,addressSettings:t.configuration.addressSettings.nonBillingAddressSettings.value,countryDetails:a})}(),f=P_(),y=function(){const e=i(null);return e.current||(e.current=new F_),a(()=>()=>{e.current?.cleanup()},[]),e.current}();!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);k(()=>{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:s,negotiated:u,plan:e,identity:o.identity.current.value,isOnePageLayout:m,initialPath:t.currentUrl.value.normalizedPath,sessionType:l.type});const{postPurchaseInquiryStatus:v,paymentLines:_}=o.negotiator.parts,b=v.value,P=()=>function({purchasingCompanyHasNegotiatedLocalPickupSelected:e,negotiatedDeliveryPending:t,buyerProposalHasDestination:n,deliveryFact:r,observability:a,negotiatedState:i,plan:o,postPurchaseInquiryStatus:s,proposedPaymentLines:l,receipt:c,sessionType:u,shippingRequired:d,throttle:p,url:m}){const h=o.greenPath.findIndex(e=>{if(e.skipOverPage?.(i))return!1;const t=Dl(e.features,i);return!e.fastForwardThroughPage||!e.fastForwardThroughPage(i,t)}),g=o.greenPath[h];if(!g)throw new N_("Cannot initialize a journey without a reachable green-path page",{groupingHash:"JourneyError::InitializeJourneyNoReachablePage"});const f=[];a.leaveErrorBreadcrumb("Journey:initializeJourney: initial firstPage",{firstPageIndex:h,firstPage:g.id,plan:JSON.stringify(o.greenPath)}),o.greenPath.slice(0,h).forEach(e=>{if("information"===e.id){const t=R_(i.contactInfo,i.allViolations??[]);a.leaveErrorBreadcrumb("Journey:initializeJourney: revalidating information page",{pageComplete:t,contactInfo:JSON.stringify(i.contactInfo),violations:i.allViolations??[]}),f.push({id:e.id,skipped:!1,complete:t})}else f.push({id:e.id,skipped:!1,complete:!0})}),f.push({id:g.id,skipped:!1,complete:!1});const y=o.greenPath.findIndex(e=>!(e.route!==m.normalizedPath||e.skipOverPage&&e.skipOverPage(i))),v=l.some(e=>"direct"===e.method.type&&e.method.sessionId),_=0===i.runningTotal?.amount||v,b="review"===o.greenPath[y]?.id&&!_,P=b?y-1:y,k=o.greenPath[P],S=Boolean(k?.skipOverPage?.(i));if(t&&n&&k&&!S&&P>h&&g.blockedOnlyByShippingAddress?.(i,Dl(g.features,i))){for(const[e,t]of o.greenPath.entries()){if(e<h)continue;if(e>=P)break;const n=f[e];f[e]=n?{...n,complete:!0}:{id:t.id,skipped:!0,complete:!0}}f[P]={id:k.id,skipped:!1,complete:!1},a.log("journey_history_advanced","History advanced past a page blocked only by an unpriced address",{sessionType:u,firstPageIndex:h,currentPageFromUrlIndex:y,advanceTo:P,clamped:b})}const w=f.find(e=>!e.complete&&!e.skipped),C=o.greenPath.findIndex(e=>w?.id===e.id),E=o.greenPath[C],x=o.greenPath[y],I=function({plan:e,isSimulated:t,currentPageFromUrlIndex:n,currentPageFromHistoryIndex:r,canLoadReview:a}){const i=e.greenPath[n];if(t&&i)return i;if(n>=0&&n<=r)return i;const o=e.greenPath[r];if("review"===o?.id&&!a){const t=e.greenPath.findIndex(e=>"review"===e.id);return e.greenPath[t-1]||e.greenPath[0]}return o}({plan:o,isSimulated:"simulated"===u,currentPageFromUrlIndex:y,currentPageFromHistoryIndex:C,canLoadReview:_}),A=o.detours.find(e=>"route"in e&&e.route===m.normalizedPath),T=D_(i.allViolations??[]),L=i.shippingAddress,[R]=r,N=R?.deliveryAddress??L,M="BusinessCustomerProfile"===i.buyerIdentity?.customerProfile?.__typename&&!e&&Wn(N)&&T_(u)&&d,D=new URLSearchParams(m.search),z="processing"===A?.type&&"true"===D.get("post_purchase"),O=("postPurchase"===A?.type||z)&&"success"===s&&"processed"===c?.status&&"created"===c.orderCreationStatus.status,B=("shopPayLogin"===A?.type?o.detours.find(e=>"shopPayLogin"===e.type):void 0)??("offsitePaymentFailed"===A?.type?o.detours.find(e=>"offsitePaymentFailed"===e.type):void 0)??(O?o.detours.find(e=>"postPurchase"===e.type):void 0)??("queued"===p.status?o.detours.find(e=>"throttle"===e.type):void 0)??(T?o.detours.find(e=>"stockProblems"===e.type):void 0)??(M?o.detours.find(e=>"noAddressLocation"===e.type):void 0)??("action_required"===c?.status||"processing"===c?.status||"processing_remote_checkouts"===c?.status?o.detours.find(e=>"processing"===e.type):void 0)??("processed"===c?.status&&c.redirectUrl?o.detours.find(e=>"processing"===e.type):void 0)??("processed"===c?.status?o.detours.find(e=>"thankYou"===e.type):void 0)??("thankYou"===A?.type&&"simulated"===u?o.detours.find(e=>"thankYou"===e.type):void 0);if(a.leaveErrorBreadcrumb("Journey:initializeJourney: resulting currentPage and expectedDetourFromState",{history:JSON.stringify(f.map(e=>e&&{id:e.id,complete:e.complete,skipped:e.skipped})),normalizedUrlPath:m.normalizedPath,currentPageFromHistory:String(E?.id),currentPage:String(I?.id),expectedDetourFromState:B?.route,receipt:JSON.stringify(c)}),null==B&&null==I)throw new N_("Failed to initialize Journey: no detour or current page available",{groupingHash:"JourneyError::InitializeJourneyFailure"});return B?{plan:o,history:f,redirectTo:(F=A,V=B,F?.type===V?.type&&F?.route===V?.route?void 0:B)}:{plan:o,history:f,redirectTo:x_(x,I)?void 0:I};var F,V}({purchasingCompanyHasNegotiatedLocalPickupSelected:f.value,negotiatedDeliveryPending:h,buyerProposalHasDestination:g,deliveryFact:c,observability:s,negotiatedState:u.current.peek(),plan:e,postPurchaseInquiryStatus:b,proposedPaymentLines:_.value,receipt:o.latestReceipt.value,sessionType:l.type,shippingRequired:p,throttle:o.negotiator.throttleState.peek(),url:t.currentUrl.value}),S=r(()=>De((e,n)=>function(e,t,n,r,a){n.leaveErrorBreadcrumb("Journey:updateJourney: initiated with action",{actionType:t.type});const{plan:i}=e,o=e.redirectTo?{...e,redirectTo:void 0}:e,s=r.currentUrl.value.normalizedPath,l=i.greenPath.find(e=>e.route===s),c=i.detours.find(e=>e.route===s);switch(t.type){case"reinitialize":return t.state;case"clearRedirect":return o;case"skipRemainingPages":{const{plan:t,history:r}=e;if(!l){if("thankYou"===c?.type)return e;const t="undefined"!=typeof window&&window.location?window.location.href:"SSR: no location available";throw n.leaveErrorBreadcrumb("Skipping to completion, but no current page",{currentDetour:c,currentUrl:t}),new N_("Missing current page",{groupingHash:"JourneyError::SkipToCompletionNoCurrentPage"})}const a=t.greenPath.findIndex(e=>x_(e,l)),i=r.slice(0,a+1),s=i.pop();i.push({...s,complete:!0});for(const[e,n]of t.greenPath.entries()){if(e<=a)continue;const t=i[e];i[e]=t?{...t,skipped:!0}:{id:n.id,skipped:!0,complete:!1}}return n.leaveErrorBreadcrumb("Journey:updateJourney: on progress, skip to completion",{history:i.map(e=>({id:e?.id,complete:e?.complete,skipped:e?.skipped})),currentDetourRoute:c?.route}),{...o,history:i}}case"progress":{const{plan:r,history:a}=e,{page:i}=t;if(null==i)throw n.leaveErrorBreadcrumb("Journey:updateJourney: progress failed, no next page",{currentPage:l?.id,currentDetour:c?.type,actionType:t.type}),new N_(`Fail to update journey with "${t.type}": attempted to progress without a next page.`,{groupingHash:"JourneyError::UpdateJourneyProgressNoNextPage"});const s=r.greenPath.findIndex(e=>x_(e,i)),u=a.slice(0,s);for(const[e,t]of r.greenPath.entries()){if(e>=s)break;const n=u[e];null==n?u[e]={id:t.id,skipped:!0,complete:!0}
2:n.complete||(u[e]={...n,complete:!0})}return u.push({id:i.id,skipped:!1,complete:!1}),n.leaveErrorBreadcrumb("Journey:updateJourney: on progress",{history:u.map(e=>({id:e?.id,complete:e?.complete,skipped:e?.skipped})),currentPageRoute:i.route}),{...o,history:u}}case"complete":{const{history:t}=e,r=[...t],a=r.pop();return r.push({...a,complete:!0}),n.leaveErrorBreadcrumb("Journey:updateJourney: on complete, set currentPage to undefined",{history:JSON.stringify(r.map(e=>e&&{id:e.id,complete:e.complete,skipped:e.skipped}))}),{...o,history:r}}case"error":{const{plan:r,history:i}=e,{page:s=l}=t;if(null==s)return n.leaveErrorBreadcrumb("Journey:updateJourney: currentPage from state",{history:JSON.stringify(i.map(e=>e?.id)),currentPage:String(l?.id)}),n.error(new N_(`Fail to update journey with "${t.type}": no next page.`,{groupingHash:"JourneyError::UpdateJourneyErrorCaseNoNextPage"})),{...o,redirectTo:r.greenPath[0]};const u=a?function(e,t,n,r){const[a]=t.greenPath;if(!a)throw new N_("Cannot validate journey prerequisites without a green-path page",{groupingHash:"JourneyError::ValidatePrerequisitesNoGreenPath"});const i=t.greenPath.findIndex(t=>x_(t,e));if(-1===i)return r.leaveErrorBreadcrumb("validatePrerequisitesForPage: target page not found in plan",{targetPageId:e.id,targetPageRoute:e.route}),a;if(!n)return r.leaveErrorBreadcrumb("validatePrerequisitesForPage: no negotiated context available",{targetPageId:e.id}),a;for(const[o,s]of t.greenPath.entries()){if(o>=i)break;let t=!1;if(t="information"!==s.id||R_(n.contactInfo,n.allViolations??[]),!t)return r.leaveErrorBreadcrumb("validatePrerequisitesForPage: prerequisite page not satisfied, redirecting",{targetPageId:e.id,targetPageRoute:e.route,unsatisfiedPrerequisitePageId:s.id,unsatisfiedPrerequisitePageRoute:s.route}),s}return e}(s,r,a.current.peek(),n):s,d=!x_(s,u);a&&d&&n.leaveErrorBreadcrumb("Journey:updateJourney: prerequisite validation redirected",{requestedPage:s.id,redirectedToPage:u.id});const p=r.greenPath.findIndex(e=>x_(e,u));return n.leaveErrorBreadcrumb("Journey:updateJourney: on error",{history:i.map(e=>({id:e?.id,complete:e?.complete,skipped:e?.skipped})),originalTargetPageRoute:s.route,finalTargetPageRoute:u.route,currentDetourRoute:c?.route}),{...o,history:[...i.slice(0,p),{id:u.id,skipped:!1,complete:!1}]}}default:L(t)}}(e,n,s,t,u),P()),[]),w=n(e=>{S.value=e},[S]),C=i(m);C.current!==m&&(C.current=m,w({type:"reinitialize",state:P()}));const E=oe(t.currentUrl.value);return a(()=>t.currentUrl.subscribe(e=>{E.current!==e&&(E.current=e,w({type:"clearRedirect"}),y.detectInfiniteRedirect(e,S,s))}),[t,w,y,S,s,E]),a(()=>t.block(e=>{const n=t.currentUrl.value,r=function(e,t){const n=new URLSearchParams(e.searchParams),r=new URLSearchParams(t.searchParams);return n.sort(),r.sort(),e.pathname===t.pathname&&n.toString()===r.toString()&&JSON.stringify(e.state)===JSON.stringify(t.state)}(n,e);return r&&s.leaveErrorBreadcrumb("[useJourneyTracking] Blocked navigating to same route",{current:{path:n.pathname,search:n.search},requested:{path:e.pathname,search:e.search}}),r}),[t,s]),[S,w]}function U_(e){return"complete"===e.status||"inactive"===e.status}function q_(e){return"failed"===e?.status||"processed"===e?.status}const j_="checkout_queue_token",H_="departure_page";function $_({violations:e,greenPath:t,negotiated:n,currentPage:r}){const a=new Set(e.map(L_)),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)))}function Y_(){const{router:e}=ie(),t=W_();return n((n,r)=>{const a={pathname:t(n).route,search:e.currentUrl.value.search};r?.replace?e.navigate(a,r):e.navigate(a)},[t,e])}function W_(){const{observability:e,checkout:{negotiator:t}}=ie(),{history:r,plan:a}=Kl().value;return n(n=>function({feature:e,greenPath:t,history:n,negotiated:r,observability:a}){let i=G_(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]??J_(t);a.leaveErrorBreadcrumb(`useNavigateToLastPageWithFeature - chosen page with feature ${e} was not visited by user, defaulting to ${n.id}`),i=n}return i}({feature:n,greenPath:a.greenPath,history:r,negotiated:t,observability:e}),[a.greenPath,t,r,e])}function G_(e,t,n){return[...e].reverse().find(e=>("function"==typeof e.features?e.features(t.current.peek()):e.features).includes(n))}function J_(e){const[t]=e;if(!t)throw new N_("Cannot choose a journey page from an empty green path",{groupingHash:"JourneyError::EmptyGreenPath"});return t}const K_=1500,Q_=450,X_=64,Z_=14;function eb(e){return"customOnsite"===e.method.type&&1===e.method.paymentBrands?.length&&e.method.paymentBrands.includes("usdc")}function tb(e){return"customOnsite"===e.type&&1===e.paymentBrands?.length&&e.paymentBrands.includes("usdc")}const nb={id:"870f80356142f85974bcf60f65fc2c30e21bc4a859ce39ada752a824cdbdca88",type:"query",name:"PollForReceipt",source:""};function rb(){const{checkout:{negotiator:e}}=ie(),n=e.current.fields.paymentMethods,r=e.parts.paymentLines;return t(()=>{const e=r.value.at(0);return!!e&&(eb(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=>tb(e)&&e.paymentMethodIdentifier===n);return Boolean(r)}(e,n.value))})}const ab=["post-purchase-e2e-tests.myshopify.com","e2e-post-purchase-testing.myshopify.com"];function ib(e){const t=location.hostname;
2return ab.includes(t)}const ob=3e3,sb=15e3,lb="hsa_survey_completed";function cb(e){if(!e)return"";try{return new URL(ub(e)).hostname.replace(/^www\./,"")}catch{return e.replace(/^https?:\/\/(www\.)?/,"")}}const ub=e=>e.replace(/^(?:(.*:)?\/\/)?(.*)/i,(e,t,n)=>t?e:`https://${n}`),db="3ds_completed",pb=6e5;function mb(e){if(!e)return"none";try{const t=new URL(ub(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 hb=Symbol("pollRequestTimedOut");async function gb(e,t){let n;const r=new Promise(e=>{n=setTimeout(()=>e(hb),t)});try{return await Promise.race([e,r])}finally{clearTimeout(n)}}function fb(e){return"action_required"===e.status&&"complete_payment_challenge"===e.action.type&&e.action.offsiteRedirect}function yb(e){if(void 0===e)return"";try{const t=new URL(e);return`${t.protocol}//${t.host}`}catch{return""}}const vb=["failed","processed"];function _b(){const{currentPage:e,currentDetour:r}=Kl().value,{observability:o,checkout:{offsitePopupController:s},mobileCheckoutSdk:l,embed:c}=ie(),u=i(),d=function(){const e=O({maxAttempts:120}),{client:t,checkout:r,persistence:o,observability:s,embed:l,source:c,graphql:{coreGraphql:u}}=ie(),d=t.unstable_getSerialization("sessionToken"),p=i(),m=rb();return a(()=>()=>{p.current=void 0},[]),n(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",cy(h));let g,f,y=!0,v=0,_=!1,b=Date.now(),P=!1,k=!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=nr+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||P||(P=!0,Xn(l,`action_required_receipt - ${e.action.type}`)),"complete_payment_challenge"===e.action.type){if(m.value)return t(Date.now()+ob);if(e.action.offsiteRedirect)return t(void 0)}else{if("pre_payment_buyer_action_required"===e.action.type){if(S)return t(Date.now()+ob);const n=Date.now(),r={...cy(e),actionType:e.action.type,listenerType:"receipt_polling_hsa_survey_listener",modalSourceType:"receipt_action",surface:"checkout-web"},a=({data:e})=>{e?.type===lb&&(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:lb,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()+ob:Date.now()+Zn)}}const n=Date.now(),a="complete_payment_challenge"===e.action.type?e.action:void 0,u={...cy(e),actionType:e.action.type,listenerType:"receipt_polling_three_ds_listener",modalSourceType:"receipt_action",offsiteRedirect:a?.offsiteRedirect,sourceHostCategory:mb(a?.url),surface:"checkout-web"},d=({data:a,origin:o})=>{if(a.type===db){if(clearTimeout(p),window.removeEventListener("message",d),!i()||!ay(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:db}),s.log("three_ds_postmessage_received","[Receipt Polling] 3DS postMessage received",{...u,dataType:db,elapsedTimeMs:a,originHostCategory:mb(o)}),t(Date.now())}},p=setTimeout(()=>{window.removeEventListener("message",d),i()&&ay(r.latestReceipt.value,e)?(r.unstable_overwriteLatestReceipt({status:"failed",id:e.id,failure:{type:"payment",code:"GENERIC_ERROR"}}),o&&er(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",cy(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)}
2,e.timeout?.millisecondsRemaining??pb);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 gb(u.staticQuery(nb,{cache:!1,variables:e}),sb);if(t!==hb)return t;if(E(1),!i())return;const n=u.query(nb,{cache:!1,variables:e});try{const e=await gb(Promise.resolve(n.refetch()),sb);if(e!==hb)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",{...cy(r.latestReceipt.value),attempt:e,timeout:sb})}for(;null!=f;){await B(f-Date.now());const n=Date.now()-b;if(++v,!_&&v>120&&n>12e4&&(y=!1,s.leaveErrorBreadcrumb("[ReceiptPolling] Receipt polling timeout",{...cy(h),pollAttempts:v}),s.counter({name:"receipt_polling_timeout",value:1}),s.log("use_receipt_polling_polling_timed_out","Receipt polling timed out",{...cy(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=ib()?3e4:1e4,P=!!g&&d>=p;let S;if(!k)try{S=await tr()}catch(x){if(!i())break;k=!0,s.leaveErrorBreadcrumb("[ReceiptPolling] Receipt mapper failed to load during polling",{error:String(x),receiptType:l.receipt.__typename})}if(k){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=nr+Date.now();continue}if(!i())break;if(!S)break;e.reset();const E=S(l.receipt,{pollingTimeoutReached:P});"polling_for_order"===r.latestReceipt.value?.status&&"processed"===E?.status&&(P?s.counter({name:"PostPurchase_order_polling_timeout",value:1}):s.histogram({name:"PostPurchase_order_polling_duration",value:d}));const I=!(!m.value&&fb(E)||ay(E,h)),A=cy(h),T=cy(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)):ay(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&&er(o,c);break}f=nr+Date.now(),g||(g=f)}if(!i())break}},[r,o,u,d,s,e,l,m,c])}(),p=function(){const e=rb();return n((t,n)=>{e.value||iy(t)&&sy(t.action)&&t.action.offsiteRedirect&&n(t.action.url)},[e])}(),m=function(){const{checkout:{negotiator:e}}=ie(),n=e.current.fields.paymentMethods,r=e.parts.paymentLines;return t(()=>{const e=r.value.at(0);return!!e&&("customOnsite"===(t=e).method.type&&(t.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,n.value));var t})}(),h=l.variant.isStandard()||Boolean(c?.isCheckoutKit()),g=n(()=>{document.hidden||(document.removeEventListener("visibilitychange",g),o.log("processing_user_return_to_checkout_initiated","[Processing] User navigated back to checkout after offsite payment",{provider:yb(u.current)},{exportImmediately:!0}),d(e=>{p(e,()=>{document.addEventListener("visibilitychange",g)})}))},[p,d,o]),f=n(()=>{d(t=>{vb.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:yb(n),providerUrl:n},{exportImmediately:!0}),s.isOpen.value?s.redirect(n):(m.value?function(e){const t=document.createElement("a");
2t.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 bb(){const{shop:{id:e}}=ie();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:t={}}={}){const{shopClientUuid:r=!1,shopId:a=!1}=t,i=ie().embed?.shopClientUuid,o=bb();return n((t,n)=>{a&&void 0!==o&&("set"===e||!t.has("shop_id"))&&t.set("shop_id",String(o));const{embedParam:s,ecAuthParam:l,ecVersionParam:c,ecColorSchemeParam:u,ecDelegateParam:d,checkoutKitBrandingParam:p,checkoutKitVersionParam:m,shopifyEssential:h,skipInterstitial:g,shopClientUuid:f}=function(e,t){return{embedParam:e.get("embed"),ecAuthParam:e.get(ir),ecVersionParam:e.get(rr),ecColorSchemeParam:e.get(ar),ecDelegateParam:e.get(or),checkoutKitBrandingParam:e.get(lr),checkoutKitVersionParam:e.get(sr),shopifyEssential:e.get("shopify_essential"),skipInterstitial:e.get(cr),shopClientUuid:e.get("shop_client_uuid")??t}}(n,i),y=t.has("embed")||t.has("ec_version");("set"===e||!y)&&(s&&t.set("embed",s),c&&(t.set(rr,c),u&&t.set(ar,u),l&&t.set(ir,l),d&&t.set(or,d),m&&t.set(sr,m),p&&t.set(lr,p)));const v="set"===e||!t.has("shopify_essential");h&&v&&t.set("shopify_essential",h);const _="set"===e||!t.has(cr);if(g&&_&&t.set(cr,g),r){const n="set"===e||!t.has("shop_client_uuid");f&&n&&t.set("shop_client_uuid",f)}},[i,r,a,e,o])}function kb(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 Sb(){const{client:e,shop:n,checkout:{negotiator:r,configuration:a}}=ie(),i=r.current.fields.buyerIdentity;return t(()=>Boolean(n.loginLinkVisible)&&n.hasStorefront&&a.allowRedirectToStorefront&&Boolean(e.unstable_getSerialization("loginUrl"))&&"OPTIONAL"===n.customerAccountRequirement&&!i.value?.customerProfile)}function wb(){const{shop:e,checkout:{identity:n,configuration:r,negotiator:a},mobileCheckoutSdk:i,source:o}=ie(),s=a.current.fields.buyerIdentity,l="shopPay"===n.current.value;return t(()=>{const t="OPTIONAL"===e.customerAccountRequirement,n="REQUIRED"===e.customerAccountRequirement,a="DISABLED"===e.customerAccountRequirement;return"draftOrder"!==o.type&&e.hasStorefront&&!i.variant.isPartner()&&r.allowRedirectToStorefront&&!l&&(t||n||a&&Boolean(s.value?.customerProfile))})}function Cb(){const{checkout:{negotiator:e}}=ie(),t=e.current.fields.buyerIdentity;return n(e=>{const n=t.value?.customerProfile,r=t.value?.purchasingCompany;if(n)return"billing"===e?"CustomerProfile"===n.__typename?n.billingAddresses[0]?.address:r?r.location.billingAddress:void 0:"shipping"===e?"CustomerProfile"===n.__typename?n.shippingAddresses[0]?.address:r?r.location.shippingAddress:void 0:void 0},[t])}function Eb(){const{embed:e,mobileCheckoutSdk:n,shop:r,source:a,checkout:{negotiator:i,configuration:o}}=ie(),s=Kl(),l=i.current.fields.buyerIdentity,c=Fh(),u=Boolean(e)||n.enabled,d=Boolean(r.remoteShopsConfigMap?.size);return t(()=>{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 xb(e=!1){const{i18n:n,router:r,shop:a,checkout:{negotiator:i}}=ie(),{buyerIdentity:o}=i.current.fields;return t(()=>{const t=o.value?.purchasingCompany;if(!a.customerAccountLocationsUrl)return;const i=new URL(a.customerAccountLocationsUrl);return i.searchParams.set("return_to",r.currentUrl.value.pathname),t&&!e&&i.searchParams.set("current_location",t.location.id),i.searchParams.set("locale",n.locale),String(i)})}function Ib(){const e=i(!0);return l(()=>()=>{e.current=!1},[]),e}const Ab=["discountLines","totalSavings","merchandiseLines","deliveryNext"],Tb=new Set(["PAYMENTS_GIFT_CARD_DISABLED"]),Lb=new Set(["PAYMENTS_GIFT_CARD_CURRENCY_MISMATCH","REDUCTION_GIFT_CARD_ALREADY_APPLIED","PAYMENTS_GIFT_CARD_NOT_FOUND","DISCOUNTS_NOT_FOUND","REDUCTION_INVA
2LID_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"]),Rb=new Set([...Zs,...Lb]),Nb=new Set(["DISCOUNTS_CURRENTLY_INACTIVE"]),Mb=new Set(["DISCOUNTS_HIGHER_VALUE_DISCOUNT_APPLIED"]),Db=new Set([...Mb,...Rb]);function zb(){const{checkout:{negotiator:e}}=ie(),{paymentLines:t}=e.parts,{voidedGiftCardsSignal:r}=e.context,a=n((e,t)=>{if(t.length<e.length)return[];const n=[];return t.forEach(t=>{const r=t.method;"giftCard"===r.type&&"code"in r&&!e.some(e=>"giftCard"===e.method.type&&"code"in e.method&&r.code===e.method.code)&&n.push(r.code)}),n},[]);return n(({violations:e,remotePaymentLines:n})=>{if(e.some(e=>Tb.has(e.code))){const e=a(n,t.value);r.value=e,t.value=n}},[a,t,r])}function*Ob(e,t=[]){const{customFields:n,placementReferences:r}=e,a=gr(t,r);for(const[i,o]of n.entries())a(fr(o))||(yield`${yr}[${i}]`)}function Bb({violations:e,currentPageId:t,isOnePageCheckout:n}){return e.some(e=>function({violation:e,currentPageId:t,isOnePageCheckout:n}){return!!n||"payment"===t||!(vr.has(e.code)||_r.has(e.code)||Kt.has(e.code))}({violation:e,currentPageId:t,isOnePageCheckout:n}))}function Fb(){const{observability:e}=ie();return n(()=>{e.log("stock_problems_page_viewed","Stock Problems page viewed")},[e])}class Vb extends Error{constructor(){super(...arguments),this.name="ProposalNegotiationError"}}function Ub(){const e=(()=>{const{source:{checkoutSessionIdentifier:e},checkout:{negotiator:n}}=ie(),{email:r}=n.parts;return t(()=>`guest-${e}-${r.value.replace(/[^a-zA-Z0-9]/g,"")}`)})();return{isDismissedGuestModal:n(()=>{try{return Boolean(sessionStorage.getItem(e.value))}catch{return!1}},[e]),setDismissedGuestModal:n(()=>{try{sessionStorage.setItem(e.value,"true")}catch{}},[e])}}const qb="EU_REVERSE_CHARGE_EXEMPTION_RULE";function jb(){const{checkout:{negotiator:e}}=ie(),r=e.current.fields.taxExemptions,a=function(e){const{checkout:{negotiator:n}}=ie(),{taxExemptions:r}=n.parts,a=T(e);return t(()=>r.value.find(e=>e.handle===a.value))}(qb).value,i=function(e){const{checkout:{negotiator:t}}=ie(),{taxExemptions:r}=t.parts;return n(t=>{const n=r.value.filter(t=>t.handle!==e);r.value=[...n,{handle:e,details:t}]},[e,r])}(qb),o=mn("taxExemptions").value,s=mn("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=>wr(e.handle));if(!c?.details)return null;const u=a?.details?.taxId??"",{registrationFormats:d,warnings:p}=c.details,m=e=>Cr(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 Hb(){const{userEvents:e}=ie(),t=$b();return({vatId:n})=>{const r=t.build({eventType:"NEGOTIATE",vatId:n});e.monorailEvent(r)}}function $b(){const{client:e,shop:t,source:n,checkout:{negotiator:r}}=ie(),a=e.unstable_getSerialization("requestId"),i=r.current.fields.buyerIdentity.value?.customerProfile,{shippingAddress:o,billingAddress:s,email:l}=r.parts,c=jb();return{build:({eventType:e,vatId:r})=>{return{schemaId:"taxes_vat_id_checkout_lifecycle_event/1.0",payload:{eventType:e,shopId:Number(le(t.id)),customerId:Jb(i),checkoutToken:n.
2checkoutSessionIdentifier,requestId:a,vatId:r,vatIdValidationStatus:Yb({taxId:c?.taxId,eventType:e}),applied:c?.applied,email:l.value,userAgent:(u=navigator,void 0===u?void 0:u.userAgent),...Wb(o.value),...Gb(s.value)}};var u}}}function Yb({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 Wb(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 Gb(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 Jb(e){if(!e)return;const t=Number(le(e.id));return isNaN(t)?void 0:t}function Kb(e,t){const{checkout:r,shop:a,observability:i,url:o,router:s}=ie(),l=function(){const{checkout:{negotiator:e}}=ie(),t=Ib(),{setGuestDismissedModalKey:r}=function(){const{setDismissedGuestModal:e}=Ub(),{shopPay:t}=ie();return{setGuestDismissedModalKey:n(()=>{t.userIdentified.value&&e()},[e,t.userIdentified])}}();return n(async({onComplete:n,setSubmitting:a,...i})=>{r(),a(!0);const o=await e.complete({...i});t.current&&(a(!1),await(n?.(o)))},[t,e,r])}(),{plan:c}=Kl().value,u=r.negotiator,d=r.negotiator,p=Y_(),m=xb(!0),h=zb();return function(){const{userEvents:e}=ie(),t=$b(),n=jb();Zl(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)})}(),n(async(n,g,f,y)=>{const{skipToCompletion:v,..._}=y??{};"processing"!==g?.type&&v&&(i.leaveErrorBreadcrumb("Journey:updateJourney: updating journey HistoryMark onSubmitForCompletion if skipToCompletion is true and detourType is not processing",{skipToCompletion:!0,detourType:g?.type}),e({type:"skipRemainingPages"}));let b=1;const P=async()=>{let y=!1;await d.waitForPendingNegotiations({setProgressing:t});const k=b<1;await u.runBeforeNegotiationListeners("completion",k?{retry:!0}:void 0),await l({..._,setSubmitting:e=>u.setSubmitting(e),setProgressing:t,onValidationSuccess:()=>{_.onValidationSuccess?.(),t(!0)},async onComplete(l){if("stale"===l.status&&"interceptors"===l.phase&&b>0)return b-=1,y=!0,t(!0),void i.log("submit_for_completion_stale_retried","Stale completion retried automatically");switch("stale"===l.status&&b<1&&i.log("submit_for_completion_stale_retry_exhausted","Completion still stale after automatic retry"),await(f?.(l)),l.status){case"success":r.unstable_overwriteLatestReceipt(l.receipt),await Er(u,l);break;case"alreadyCompleted":r.unstable_overwriteLatestReceipt(l.receipt);break;case"throttled":{const e=c.detours.find(e=>"throttle"===e.type);if(!e?.route)throw new N_("Throttled, but no detour",{groupingHash:"JourneyError::ThrottledNoDetour"});s.navigate(e.route);break}case"rejected":{if(n||i.leaveErrorBreadcrumb("Journey:updateJourney handled rejected submission with an empty currentPage",{resultStatus:String(l.status)}),e({type:"error",page:n}),z_(l.violations))return window.location.replace(o.login(window.location.href));if(kb(l.violations,a.storefrontUrl,m.value,s.currentUrl.value,i),Hn(l.violations)){s.currentUrl.peek().searchParams.delete(H_);const e=c.detours.find(e=>"stockProblems"===e.type);if(null==e)throw new N_("Stock problems, but no matching detour",{groupingHash:"JourneyError::StockProblemsNoMatchingDetour"});s.navigate(e.route);break}if(h({violations:l.violations,remotePaymentLines:l.negotiated?.paymentLines?.lines??[]}),await Er(u,l),v)break;const t=$_({violations:l.violations,greenPath:c.greenPath,negotiated:l.negotiated,currentPage:n});t&&(s.currentUrl.peek().searchParams.delete(H_),s.navigate(t.route));break}case"invalid":t(!1),await Er(u,l);break;case"fetch_failed":case"failed":if("fetch_failed"===l.status)if(el(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:tl(l.reason)}});else{const e=l.reason;i.error(new M_(e,{groupingHash:`Journey::SubmitForCompletion::NetworkError: ${e}`}),{errorClass:"Journey::SubmitForCompletion::NetworkError"})}await Er(u,l),e({type:"error",page:n}),s.currentUrl.peek().searchParams.delete(H_),p("payment-methods",{replace:void 0!==g});break;default:t(!1),n||i.leaveErrorBreadcrumb("Journey:updateJourney got unexpected submission result with an empty currentPage",{resultStatus:String(l.status)}),e({type:"error",page:n})}"success"===l.status&&"processing"===l.receipt.status||t(!1)}}),y&&await P()};await P()},[t,u,d,l,a,e,r,c.detours,c.greenPath,s,h,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 Xb(e,t){const n=Dl(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 Zb(){const e=window,t=e?.ShopifyAnalytics?.lib;return t?.trekkie?.defaultAttributes}function eP({children:e,dispatch:s,progressing:l,onProgressionChange:c}){const u=Kl(),{plan:p,currentPage:h,currentDetour:g}=u.value,{observability:f,checkout:y,router:v}=ie(),{postPurchaseInquiryStatus:_}=y.negotiator.parts,b=function(e,t){const{client:r,router:a,checkout:i,shop:o,observability:s,url:l}=ie(),c=i.negotiator,u=Sv(),{plan:d,currentPage:p,currentDetour:m}=Kl().value,h=i.negotiator,g=r.unstable_legacyNavigationPerformance,f=xb(!0),y=zb(),v=Ib(),_=i.configuration.layout.isOnePage,b=o.hasFlagEnabled(br),{inMemoryApplePayParts:{asPaymentMethod:P}}
2=un(),k=Fb();return n(async({onComplete:n,walletValidationAttemptId:r,prefetch:S=!1,negotiationStage:w,...C})=>{const E=p,x=w??"negotiation",I=e=>{if(r)try{s.log("wallet_validation_phase","Wallet validation phase",{attemptId:r,phase:e,negotiationStage:x,prefetch:S,mounted:v.current,hasOnComplete:Boolean(n)})}catch{}};I("entered"),"progression"!==x||S||t(!0),s.debug("negotiation_triggered","Negotiation triggered",{negotiationStage:x}),"progression"===x&&await h.runBeforeNegotiationListeners(x,{prefetch:S});const A=E?Dl(E.features,c.current.value):void 0,T=[...new Set([...C.silenceViolations??[],...Ob({customFields:c.current.value.customFields??[],placementReferences:u},A)])];try{I("core_started");const c={...C,silenceViolations:T,skipStateUpdates:S,negotiationStage:x};let u=await h.negotiate(c);b&&"stale"===u.status&&"interceptors"===u.phase&&"completion"===x&&!S&&v.current&&(await h.waitForPendingNegotiations(),v.current&&(s.log("negotiate_stale_completion_retried","Stale completion-stage negotiation retried automatically",{attemptId:r}),u=await h.negotiate(c),"stale"===u.status&&s.log("negotiate_stale_completion_retry_exhausted","Completion-stage negotiation still stale after automatic retry",{attemptId:r})));const p=u;if(I("core_returned"),s.log("negotiation_result_completed","Negotiation result completed",{negotiationStatus:p.status,negotiationStage:x,violations:"violations"in p?Pr(p.violations):void 0}),v.current){if(S)return void I("callback_skipped_prefetch");try{const n="success"===p.status||"error"===p.status;if(n&&Hn(p.violations)){const e=d.detours.find(e=>"stockProblems"===e.type);if(null==e)throw new N_("Stock problems, but no matching detour",{groupingHash:"JourneyError::StockProblemsNoMatchingDetourNegotiate"});return k(),void a.navigate(e.route)}if(n&&z_(p.violations))return s.log("login_failure_triggered","Buyer identity login failure detected, redirecting to login"),window.location.replace(l.login(window.location.href));n&&kb(p.violations,o.storefrontUrl,f.value,a.currentUrl.value,s),n&&y({violations:p.violations,remotePaymentLines:p.negotiated?.paymentLines?.lines??[]});const r={source:"journey",negotiationStage:x,runListenersOnError:C.runListenersOnError};switch(p.status){case"success":I("listeners_started"),await kr(h,p,r),I("listeners_returned");break;case"alreadyCompleted":i.unstable_overwriteLatestReceipt(p.receipt);break;case"error":{g?.cancelNavigation(),("progression"===x||Boolean(C.runListenersOnError))&&I("listeners_started");const t=kr(h,p,r);t&&(await t,I("listeners_returned")),E&&Bb({violations:p.violations,currentPageId:E.id,isOnePageCheckout:_.value})&&e({type:"error",page:E});break}case"throttled":{const e=d.detours.find(e=>"throttle"===e.type);if(!e?.route)throw new N_("Throttled, but no matching detour",{groupingHash:"JourneyError::ThrottledNoMatchingDetour"});a.navigate(e.route);break}case"invalid":kr(h,p,r),E&&e({type:"error",page:E});break;case"denied":case"fetch_failed":E&&e({type:"error",page:E});break;case"stale":case"tooManyRequests":s.log("negotiate_result_no_dispatch","Handling negotiation result without explicit dispatch",{status:p.status,currentPage:E,currentDetour:m,negotiationStage:x});break;default:L(p)}"progression"===x&&t(!1)}finally{I("callback_delivering"),n?.(p),I("callback_returned");const e=P.value&&i.wallets.activeSession.value;if("success"!==p.status&&"violations"in p&&E&&!e){const e=$_({currentPage:E,greenPath:d.greenPath,negotiated:p.negotiated,violations:p.violations});e&&a.navigate(e.route)}}}else I("callback_skipped_unmounted")}catch(R){if(R instanceof Sr)return void I("rejected_request_swallowed");I("wrapper_threw");const e=R instanceof Error?R:new Vb;if(e)throw e}},[P,i,p,f,e,_,v,c,t,g,u,d,h,y,a,o?.storefrontUrl,b,k,l,s,m])}(s,c),P=y.negotiator,S=function(e,t,r){const{router:a,observability:i,checkout:o}=ie(),{plan:s}=Kl().value,l=o.negotiator,c=o.configuration.layout.isOnePage,u=n((e,n)=>{const r=s.greenPath.slice(n+1).find(t=>null==t.skipOverPage||!t.skipOverPage(e.negotiated));if(!r)throw new N_("Negotiated, but no next page",{groupingHash:"JourneyError::NegotiatedNoNextPage"});t({type:"progress",page:r}),a.navigate(r.route)},[s.greenPath,t,a]);return n(async(t,n)=>{r(!0);const a=s.greenPath.findIndex(e=>x_(e,t)),o=l.current.value,d=Xb(t,o),p=new Set;for(const e of s.greenPath.slice(0,a+1))for(const t of Dl(e.features,o))p.add(t);const m=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}([...p]);try{await e({negotiationStage:"progression",silenceViolations:m,fieldsToResolve:Array.from(d),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":u(e,a);break;case"error":Bb({violations:e.violations,currentPageId:t.id,isOnePageCheckout:c.value})||u(e,a);break;
2case"fetch_failed":case"invalid":case"stale":case"denied":case"throttled":case"tooManyRequests":case"alreadyCompleted":break;default:L(e)}}})}finally{r(!1)}},[r,s.greenPath,l,e,u,c,i])}(b,s,c),w=Kb(s,c),C=function(e,t,r){const{checkout:a,client:i,shop:o,source:s,observability:l,url:c,router:u}=ie(),d=a.negotiator,p=a.proposal.negotiated.fields.canUpdateMerchandise.value??!0;return n(async(n,m,h)=>{switch(n.type){case"thankYou":case"postPurchase":return void l.log("use_exit_detour_detected",`Tried to progress out of a ${n.type} detour`,{currentPage:m?.route,currentDetour:n.type});case"throttle":r(!0),await new Promise(e=>{if(U_(a.negotiator.throttleState.peek()))return void e();const t=a.negotiator.listenThrottle(n=>{U_(n)&&(t(),e())})}),await e({force:!0,silenceViolations:"redirectToCart"===n.behavior?["non-stock",...Qn]:["all"],negotiationStage:"progression",onComplete(e){switch(h?.(e),e.status){case"success":if(!m)throw new N_("Exited throttle, but no next page",{groupingHash:"JourneyError::ExitedThrottleNoNextPage"});{t({type:"progress",page:m});const e=`${m.route}${m.queryParams||""}`;u.navigate(e,{replace:!0})}break;case"fetch_failed":case"error":case"invalid":case"stale":case"denied":case"throttled":case"alreadyCompleted":case"tooManyRequests":l.log("use_exit_detour_throttle_negotiation_non_success","Throttle negotiation completed with non-success result",{status:e.status,currentPage:m?.route});break;default:L(e)}}}),r(!1);break;case"stockProblems":if(r(!0),0!==d.parts.merchandiseLines.value.length&&p)await e({force:!0,silenceViolations:["non-stock",...Qn],onComplete(e){switch(e.status){case"success":if(!m)throw new N_("Exited stock problems, but no next page",{groupingHash:"JourneyError::ExitedStockProblemsNoNextPage"});t({type:"progress",page:m}),u.navigate(m.route,{replace:!0});break;case"fetch_failed":case"error":case"invalid":case"stale":case"denied":case"throttled":case"tooManyRequests":case"alreadyCompleted":l.log("use_exit_detour_stock_problems_negotiation_non_success","[Journey] Exiting stock problems detour with non-success result",{resultStatus:e.status,currentPage:m?.route});break;default:L(e)}}});else{if(!a.configuration.allowRedirectToStorefront){l.log("blocked_redirect_to_storefront","[Journey] Unresolvable stock problems: redirect to storefront was blocked",{hasStorefront:o.hasStorefront,currentPage:m?.route,canUpdateMerchandise:p,merchandiseLinesCount:d.parts.merchandiseLines.value.length});break}l.log("redirect_to_storefront","[Journey] Stock problems exit detour: redirecting to storefront",{redirectSuccess:o.hasStorefront,currentPage:m?.route,canUpdateMerchandise:p,merchandiseLinesCount:d.parts.merchandiseLines.value.length}),Kn({client:i,url:c,source:s,configuration:a.configuration})}r(!1);break;case"processing":r(!0),l.log("use_exit_detour_processing_detected","[Journey] Exiting processing detour"),await new Promise(e=>{if(q_(a.latestReceipt.value))return void e();const t=z(()=>{q_(a.latestReceipt.value)&&(t(),e())})}),r(!1);break;case"shopPayLogin":if(r(!0),!m)throw new N_("Exited shop pay login, but no next page",{groupingHash:"JourneyError::ExitedShopPayLoginNoNextPage"});{t({type:"progress",page:m});const e=`${m.route}${m.queryParams||""}`;u.navigate(e,{replace:!0})}r(!1);break;case"offsitePaymentFailed":r(!1);break;case"noAddressLocation":case"terminalError":throw new N_(`Can't progress out of a ${n.type} detour`,{groupingHash:"JourneyError::CantProgressOutOfDetour"});default:L(n)}},[l,r,e,t,u,d.parts.merchandiseLines,p,i,c,s,o.hasStorefront,a])}(b,s,c),E=function({plan:e,currentDetour:t,dispatch:r,onProgressionChange:o,negotiate:s,negotiated:l,proposedPostPurchaseInquiryStatus:c}){const u=ie(),{checkout:d,embed:p,persistence:m,source:h,observability:g,client:f,mobileCheckoutSdk:y,router:v}=u,{configuration:_}=d,b=d.latestReceipt.value,{hasExternalReceiptHandling:P}=_,k="shopPay"===d.identity.current.value,S=W_(),w=Mg(),C=ur(),E=_b(),x=b?.id,I=u.checkout.negotiator,T=u.checkout.configuration.layout.isOnePage,R=Vh()&&!dr(v.currentUrl.value.search),N=d.negotiator.throttleState.peek().token,M=Kl(),D=zc(),z=function({redirectProgressEnabled:e=!1}={}){const t=i(!1),{checkout:r,client:a,observability:o}=ie(),s=Pb({mode:"copy-if-missing"});return n(n=>
2{if(t.current)return void o.counter({name:"thank_you_page_already_redirected",value:1});t.current=!0;const i=new URL(n,window.location.href),l=new URLSearchParams(a.initialRequest.url.search);return s(i.searchParams,l),e&&r.checkoutExit.startRedirectProgress(),window.location.replace(i.toString())},[s,r.checkoutExit,a.initialRequest.url.search,o,e])}({redirectProgressEnabled:k&&!_.isUniversalCheckoutFinalizer&&R&&!t&&!D});a(()=>{P||E()},[x]);const O=n((e,t)=>{setTimeout(()=>{t()},function(e){return 1500*e+450}(e))},[]);return n(n=>{if(!n||w)return;g.leaveErrorBreadcrumb("[Journey] handleReceipt callback triggered with",cy(n));const a=c.value;if("processed"===n.status&&n.waitingForPostPurchaseDone&&"done"!==a)return;const i=(e,t)=>e&&e>0?O(e,t):t();switch(n.status){case"abandoned":o(!1),m&&er(m,h),C();break;case"failed":{o(!1),m&&er(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:n.id}),g.counter({name:"refresh_processing_step",value:1}),a.searchParams.delete("reload_receipt"),window.location.replace(a.toString());break}if("inventory"===n.failure.type){if(null==e.detours.find(e=>"stockProblems"===e.type))throw new N_("Stock problems receipt, but no matching detour",{groupingHash:"JourneyError::StockProblemsReceiptNoMatchingDetour"});const t=I.lastNegotiation.value;s({force:!0,silenceViolations:["payment-session","payment-terms-changed"],onComplete(e){switch(e.status){case"success":{const e=I.lastJourneyProgression.value,a=I.lastNegotiation.value;if(d.latestReceipt.value?.id!==n.id||a!==t&&"error"===a.type||("failed"===e.type||"error"===e.type)&&"completion"===e.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 i=S("payment-methods");A(()=>{I.context.inventoryRecoverySignal.value={receiptId:n.id},function(e){const{paymentMethodIdentifier:t,...n}=e.directPaymentErrors;A(()=>{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)})}(I.parts)}),r({type:"error",page:i}),v.navigate({pathname:i.route,search:v.currentUrl.value.search});break}case"fetch_failed":case"error":case"invalid":case"stale":case"denied":case"throttled":case"tooManyRequests":case"alreadyCompleted":break;default:L(e)}}});break}if("payment"===n.failure.type&&(mr.has(n.failure.code)?s({silenceViolations:Ve(["captcha"]),skipStateUpdates:!0}):("CUSTOM_REDEEMABLE_NO_LONGER_AVAILABLE"===n.failure.code&&s({force:!0,fieldsToResolve:["shopPromotion"]}),C())),"offsitePaymentFailed"===t?.type){v.navigate(t.route,{replace:!0});break}const i=function({departurePageId:e,greenPath:t,history:n,negotiated:r,observability:a,receipt:i}){const o=G_(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??J_(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??J_(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(H_),greenPath:e.greenPath,history:M.value.history,observability:g,negotiated:l,receipt:n});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:n.redirectUrl,receiptId:n.id});const s=e.detours.find(e=>"postPurchase"===e.type),l=Boolean(s)&&Boolean(n.postPurchasePageRequested)&&"ready"===n.postPurchaseVaultingStatus&&"success"===a,c=!p?.isFlagshipPartner&&l;if(p?.isFlagshipPartner&&l&&"thankYou"!==t?.type&&g.log("use_handle_receipt_progression_update","[Journey] Skipped post-purchase flow for flagship partner",{receiptId:n.id}),c&&"thankYou"!==t?.type){if(g.leaveErrorBreadcrumb("[Journey] Navigated to post purchase page",{receipt:JSON.stringify({id:n.id,postPurchasePageUrl:n.postPurchasePageUrl,postPurchasePageRequested:n.postPurchasePageRequested,postPurchaseVaultingStatus:n.postPurchaseVaultingStatus}),shopAppDomain:k}),k&&n.postPurchasePageUrl)window.location.replace(n.postPurchasePageUrl);else{const e=s;v.currentUrl.value.searchParams.delete("post_purchase");const t=`${e.route}${v.currentUrl.value.search}`;I.applyProcessedReceipt(n),v.navigate(t,{replace:!0})}break}if(p?.client?.complete(),!_.isUniversalCheckoutFinalizer&&pr(p?.embedder))break;if(!_.isUniversalCheckoutFinalizer&&n.redirectUrl){const e=n.redirectUrl;n.skipToThankYouPage?(g.leaveErrorBreadcrumb("[Journey] Forwarded duplicate checkout session to Thank you page",{skipToThankYouPage:!0,receipt:JSON.stringify({id:n.id,redirectUrl:e,postPurchasePageRequested:n.postPurchasePageRequested,postPurchasePageUrl:n.postPurchasePageUrl})}),r({type:"skipRemainingPages"})):r({type:"complete"}),g.counter({name:"thank_you_page_redirected",value:1,attributes:{shopPay:k,checkoutDesign:T.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 N&&a.searchParams.set(j_,N),i(n?.completedRemoteCheckouts?.length,()=>{return e=a.toString(),!R||t||D||al(()=>{d.checkoutExit.exit()},["checkout-exit"],{replace:!0,interrupt:!0}),void z(e);var e})}const m=e.detours.find(e=>"thankYou"===e.type);if(!m?.route)throw new N_("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,n.id));const l=()=>{if(g.log("use_handle_receipt_progression_update","[Journey] thankYouDetour route identified",{thankYouDetourRoute:m.route}),n.skipToThankYouPage){g.leaveErrorBreadcrumb("[Journey] Forwarded duplicate checkout session to Thank you page",{skipToThankYouPage:!0,receipt:JSON.stringify({id:n.id,redirectUrl:n.redirectUrl,postPurchasePageRequested:n.postPurchasePageRequested,postPurchasePageUrl:n.postPurchasePageUrl})}),r({type:"skipRemainingPages"});const e=f.cookies.get(hr);e&&h.sourceId===e.split("%3F")[0]&&f.cookies.delete(hr)}else f.cookies.delete(hr),r({type:"complete"});I.applyProcessedReceipt(n)},c=e=>{g.log("use_handle_receipt_progression_update","[Journey] Redirecting to thank you page with thankYouDetourUrl",{thankYouDetourUrl:s}),i(n?.completedRemoteCheckouts?.length,()=>function(e,n){const r=()=>{v.navigate(e,{replace:!0,state:{...v.currentUrl.value.state,redirectingToThankYou:!0}})};R&&!t?(n?.(),al(r,["checkout-exit"],{replace:!0,interrupt:!0})):al(()=>{n?.(),r()}),g.counter({name:"thank_you_page_redirected",value:1,attributes:{shopPay:k,checkoutDesign:T.value?"ONE_STEP":"THREE_STEP",typType:"c1",visibility_state:document.visibilityState}}),o(!1)}(s,e))},d=_.deferredProfileChangeId;if(d||_.profileKey.peek()?.requireBusinessCriticalOnly){_.update({deferredProfileChangeId:void 0});const e=d??_.profileId.peek();Qs(l,{trigger:"completion",profileRequest:e?{id:e,requireBusinessCriticalOnly:!1}:void 0,graphql:u.graphql.coreGraphql,extensibility:u.checkout.extensibility,configuration:_,observability:g,userEvents:u.userEvents,telemetryContext:{source:h,shop:u.shop,sessionToken:f.unstable_getSerialization("sessionToken"),current:I.current}}).then(c).catch(()=>{})}else l(),c()}break}case"polling_for_order":case"action_required":case"processing":{if("processing"===t?.type)break;if("polling_for_order"===n.status&&"thankYou"===t?.type){g.leaveErrorBreadcrumb("[Journey] Skipped navigating to processing page since already on the thank-you page",{receipt:JSON.stringify(n),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"===t?.type)break;const n=e.detours.find(e=>"processing"===e.type);if(!n?.route)break;al(()=>{const e=v.currentUrl.value.search;v.navigate(e?{pathname:n.route,search:e}:n.route,{replace:!0})});break}default:L(n)}},[f,p?.client,p?.embedder,p?.isFlagshipPartner,y,C,t,d,r,w,T,R,k,M,S,u,_,s,l,I,o,m,e.detours,e.greenPath,D,c,N,z,v,h,g,O])}({plan:p,currentDetour:g,dispatch:s,onProgressionChange:c,negotiate:b,negotiated:P,proposedPostPurchaseInquiryStatus:_});a(()=>{const{negotiator:e}=y,t=e=>{if("queued"!==e.status)return;const t=p.detours.find(e=>"throttle"===e.type);if(t?.route)v.navigate(t.route);else if(h)throw new N_(`Throttled, but no matching detour from ${h&&JSON.stringify(h,["id","label","route"])}`,{groupingHash:"JourneyError::ThrottledNoMatchingDetourFromPage"})};return t(e.throttleState.peek()),e.listenThrottle(t)},[y,v,h,p.detours,s]),k(()=>{const e=y.latestReceipt.value;f.leaveErrorBreadcrumb("[JourneyProgressionInternal] Signal effect for latestReceipt",cy(e)),o(()=>E(e))});const x=i(_.peek());k(()=>{const e="thankYou"===g?.type||"postPurchase"===g?.type,t=_.value,n=x.current;if(e&&t!==n){x.current=t;const e=y.latestReceipt.value;f.leaveErrorBreadcrumb("[JourneyProgressionInternal] Signal effect for proposedPostPurchaseInquiryStatus",{...cy(e),previousStatus:n}),o(()=>E(e))}});const{progress:I,completing:T}=function({journey:e,exitDetour:a,pageComplete:i,pageNegotiate:o}){const{client:s,observability:l,router:c}=ie(),u=m(0),d=t(()=>u.value>0),p=s.unstable_legacyNavigationPerformance,{handleOffsitePopupOpen:h,handleClosingPopup:g}
2=function(){const e=_b(),t=Jg(),n=Fm(),{client:a,i18n:i,observability:o,userEvents:s,checkout:{offsitePopupController:l,negotiator:c},shop:{id:u}}=ie(),{paymentLines:d}=c.parts;return r(()=>({handleOffsitePopupOpen:()=>{const r=d.value.at(0);let p=!1;if("customOnsite"===r?.method.type)p=eb(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=>tb(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:Rt(a)}});const e=de(u);if(e){const t=parseInt(e,10);if(!isNaN(t)){const e=function(e){const t=Zb();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])}(),f=oe(a),y=oe(i),v=oe(o),_=oe(h),b=oe(g),P=oe(c);return{progress:n(async(t,n,r)=>{const a=async e=>{try{await(n?.(e))}finally{"success"!==e.status&&b.current()}},i={...r,onProgressBlocked:()=>{try{r?.onProgressBlocked?.()}finally{b.current()}},onValidationSuccess:()=>{try{r?.onValidationSuccess?.()}finally{_.current()}}},{plan:o,currentPage:s,currentDetour:c}=e.value,d=f.current;if(l.leaveErrorBreadcrumb("[Journey] Progress initiated",{id:t,skipToCompletion:i?.skipToCompletion,greenPath:o.greenPath.map(e=>e.route),detours:o.detours.map(e=>e.route),currentPageRoute:s?.route,currentDetourRoute:c?.route}),!i?.skipToCompletion&&c&&s){const e=o.detours.find(e=>"thankYou"===e.type),t="processing"===c.type?e:s;return p?.start({target:t?.route}),l.leaveErrorBreadcrumb(`[Journey] Exiting "${c.route}" detour, moving to "${t?.route}"`,{currentDetourRoute:c.route,exitDetourTargetRoute:t?.route,targetPageRoute:s.route}),d(c,s,a)}if(null==s)return l.debug("journey_progression_blocked","[Journey] Blocked progression because the current page is missing"),void i?.onProgressBlocked?.();const m=x_(s,o.greenPath[o.greenPath.length-1])||i?.skipToCompletion,h=o.greenPath.findIndex(({id:e})=>e===s.id),g=o.detours.find(e=>"processing"===e.type),k=m?g:o.greenPath[h+1];p?.start({target:k?.route});const S=P.current.currentUrl.peek(),w=o.greenPath.find(e=>e.route===S.normalizedPath)??s;if(m?S.searchParams.set(H_,w.id):S.searchParams.delete(H_),l.leaveErrorBreadcrumb("[Journey] Progressing",{skipToCompletion:i?.skipToCompletion,greenPath:o.greenPath.map(e=>e.route),isLastPage:m,currentPageRoute:s.route,currentDetourRoute:c?.route,nextPageRoute:k?.route}),!m)return v.current(s,a);u.value+=1;try{await y.current(s,c,a,i)}finally{u.value-=1}},[f,e,y,v,u,p,l,b,_,P]),completing:d}}({journey:u,exitDetour:C,pageComplete:w,pageNegotiate:S}),R=function({plan:e}){const{router:t,observability:r}=ie();return n(async(n,a)=>{const i=e.detours.find(e=>e?.type===n);if(!i)throw r.leaveErrorBreadcrumb("Detour, but no matching detour",{detourType:n,detours:e.detours,currentUrl:t.currentUrl.value.href}),new N_("Detour, but no matching detour",{groupingHash:"JourneyError::DetourNoMatchingDetour"});const[o]=e.greenPath;if(!o)throw new N_("Cannot detour without a green-path page",{groupingHash:"JourneyError::EmptyGreenPath"});const s=`${i.route}${o.queryParams||""}`;t.navigate(s,a?.routerOptions)},[e.detours,e.greenPath,t,r])}({plan:p}),N=function({negotiate:e}){return n(()=>{e({prefetch:!0,negotiationStage:"progression",silenceViolations:["all"]})},[e])}({negotiate:b}),M=Fb();a(()=>P.pendingFieldsNegotiation.subscribe(e=>{"success"!==e?.status&&"error"!==e?.status||u.peek().currentDetour||D_(P.current.fields.allViolations.peek()??[])&&(M(),R("stockProblems",{routerOptions:{replace:!0}}))}),[P,u,R,M]);const D=r(()=>({detour:R,progress:I,negotiate:b,progressing:l,completing:T,prefetch:N}),[R,I,l,T,b,N]);return d(Jl.Provider,{value:D,children:e})}function tP({plan:e,children:a}){const o=m(!1),s=n(e=>{o.value=e},[o]),{observability:l,router:c}=ie(),u=c.currentUrl.value,[p,h]=V_(e);uh(p,({previousState:e,action:t,nextState:n})=>{l.leaveErrorBreadcrumb("Journey state transition",{previousState:{redirectTo:e.redirectTo?.route},action:t,nextState:{redirectTo:n.redirectTo?.route},routerCurrentUrl:u.normalizedPath})});const{redirectTo:g}
2=p.value,f=m(),{pageBeforeDetour:y,completed:v}=function({router:e,plan:n,journeyStateSignal:r}){const a=i(void 0),o=t(()=>{const t=e.currentUrl.value.normalizedPath;return n.greenPath.find(e=>e.route===t)});return{pageBeforeDetour:t(()=>{const t=o.value;t&&(a.current=t);const i=a.current,s=e.currentUrl.value.normalizedPath,{history:l}=r.value,c=n.detours.find(e=>e.route===s);if(t)return t;if(c&&i)return i;if(c&&!i){const e=n.greenPath[0],t=l.find(e=>!e.complete);return n.greenPath.find(e=>e.id===t?.id)??e}}),completed:t(()=>{return t=r.value.plan.detours.find(t=>t.route===e.currentUrl.value.normalizedPath),"thankYou"===t?.type;var t})}}({router:c,plan:e,journeyStateSignal:p}),_=r(()=>({journeyState:p,currentFocus:f,completed:v,pageBeforeDetour:y}),[p,f,v,y]);if(null!=g){const e=u.search?{pathname:g.route,search:u.search}:g.route;return c.redirect(e),null}return d(Gl.Provider,{value:_,children:[d(A_,{}),d(eP,{dispatch:h,progressing:o,onProgressionChange:s,children:a})]})}function nP(){const{shop:e}=ie();return Boolean(e.confirmationPageEnabled)}const rP=["delivery-method"],aP=new Set(xr),iP=new Set(Ir),oP=new Set(Ar);function sP({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,mustSelectProvidedShippingRate:h,shop:g,checkout:f,paymentMethods:y,observability:v,recordFastForward:_}){const b=(e,t)=>a(t,{excludedExtensionTargets:lP(e.deliveryNext)})?{gatedBy:"extension"}:Nr(e.paymentLines)?{gatedBy:"paypalExpress",satisfied:dP(e.paymentLines,e.deliveryNext)&&R_(e.contactInfo,e.allViolations)}:Mr(e.paymentLines)?{gatedBy:"googlePay"}:{gatedBy:null,unsatisfied:t.filter(t=>!((e,t)=>{switch(t){case"contact-information":return R_(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))&&!!Af({address:e,addressSettings:t,countryDetails:n})&&r.every(e=>"shipping-address"!==L_(e))}({shippingAddress:p,addressSettings:n,countryDetails:m,violations:e.allViolations,state:e,isDraftOrder:s});case"billing-address":return function(e,t,n=[]){return!!Af({address:t,addressSettings:e})&&n.every(e=>"billing-address"!==L_(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"!==L_(e))}(e.deliveryNext,e.allViolations);case"payment-methods":case"localization-extension":return!1;default:return L(t)}})(e,t))};return{greenPath:[{id:"information",label:e.translate("contact.title"),route:"/information",features:({deliveryNext:e})=>Array.from(function*(){yield"contact-information",Rr(e)||Tr(e)?yield"delivery-method":c?yield"shipping-address":yield"billing-address"}()),fastForwardThroughPage:(e,t)=>{const n=b(e,t);if("extension"===n.gatedBy)return!1;if("paypalExpress"===n.gatedBy)return!!n.satisfied&&_("information","paypal_express_and_contact_satisfied");if("googlePay"===n.gatedBy)return!1;const[r]=n.unsatisfied;return v.log("journey_page_fast_forward_features_checked","Features evaluated for fast-forward",{pageId:"information",blockingFeature:r??null,isPrePopulatedSourceType:l,allViolations:e.allViolations?.map(e=>e.code)||[]}),l&&void 0===r},blockedOnlyByShippingAddress:(e,t)=>{const r=b(e,t),a=s&&n.isRequired("phone",{countryCode:e.shippingAddress?.countryCode})&&(!e.contactInfo?.email||!e.shippingAddress?.phone);return null===r.gatedBy&&l&&!a&&1===r.unsatisfied.length&&"shipping-address"===r.unsatisfied[0]&&(e.allViolations??[]).every(e=>"shipping-address"!==L_(e))}},{id:"shipping",label:e.translate("shipping.title"),route:"/shipping",features:rP,fastForwardThroughPage:e=>{return!a(rP)&&("cartNext"===t?function(e){const t=function(e){return"filled"!==e?.status?[]:Ue(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=wt(e);return!!t&&e.methods[0]?.handle!==t.handle}(e))}(e.deliveryNext)?_("shipping","cart_next_shipping_selection_determined"):(n=e.paymentLines,!!n?.lines.some(e=>"direct"===e.method.type&&Boolean(e.method.sessionId))&&_("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=Ue(e?.deliveryNext).find(e=>"available"===e.status);return void 0!==i&&!(a!==wt(i)?.handle)}({latestNegotiation:e,initialNegotiation:o,isPrePopulatedSourceType:l})&&_("shipping","initial_delivery_selection_preserved"));var n},skipOverPage:({deliveryNext:e,isShippingRequired:t})=>!t||sn(e)||Tr(e)||h||Lr(i().enabledDeliveryMethods)},{id:"payment",label:e.translate("payment.title"),route:"/payment",features:()=>y_(d,u.peek(),{shop:g,checkout:f,paymentMethods:y})?["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"}
2,{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 lP(e){const t=new Set,n=cP(e,"PICK_UP"),r=cP(e,"PICKUP_POINT");return n||uP(t,aP),r||uP(t,iP),(n||r)&&uP(t,oP),t.size>0?t:void 0}function cP(e,t){return Ue(e).some(e=>"available"===e.status&&wt(e)?.methodType===t)}function uP(e,t){t.forEach(t=>e.add(t))}function dP(e,t){const n=It(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))}function pP(e){const{billingAddressSettings:t,nonBillingAddressSettings:n}=e.configuration.addressSettings;return e.isShippingRequired.value?t.value:n.value}const mP=["checkout","cartNext","draftOrder"];function hP({children:e}){const{i18n:a,observability:i,router:o,shop:s,source:l,checkout:c}=ie(),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=nP(),y=function(){const{i18n:e,shop:r,source:a,checkout:i,observability:o}=ie(),{buyerIdentity:s}=i.negotiator.current.fields,l=k_(),c=Dc(),u=v_(),d=__(),p=S_(),m=n((e,t)=>(o.log("journey_page_fast_forwarded","Fast-forwarded through page",{pageId:e,reason:t}),!0),[o]),h=n(e=>{const t=s.value?.purchasingCompany;return!(!t?.location.shippingAddress||!e)&&Boolean(c.value&&u.value&&qn(t.location.shippingAddress,e))},[s,c,u]);return t(()=>{const t=s.value?.purchasingCompany;if(!t)return;const n=!Fn(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?w_:[],...n?C_:[],...E_]},...r.confirmationPageEnabled?[u()]:[]]:[...o?[{id:"information",label:e.translate("contact.title"),route:"/information",features:w_,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:C_,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})=>sn(e)}]:[],{id:"payment",label:e.translate("payment.title"),route:"/payment",features:E_},u()]}).value}(),v=o.currentUrl.value?.search,_=function(){const{i18n:e,shop:t,source:{type:a},checkout:i,observability:o}=ie(),{extensibility:s}=i,l=Be(),c=Sv(),u=mP.includes(a),{data:d}=O_(),p=function(){const{data:e}=O_();if("NegotiationResultAvailable"!==e?.session?.negotiate.result.__typename)return;const{sellerProposal:t}=e.session.negotiate.result;return Gn({delivery:t.delivery,remoteDelivery:Jn(t.remote).remoteDelivery})}(),{details:m}=Tt(p?.countryCode),h="draftOrder"===a,g=i.proposal.negotiated.fields.mustSelectProvidedShippingRate.value??!1,f=nP(),{parts:y}=i.negotiator,v=i.negotiator.current.fields.paymentMethods.value,_=y.paymentLines,b=i.configuration.addressSettings.nonBillingAddressSettings.value,P=pP(i),k=i.negotiator.current.fields.isShippingRequired.value,S=n((e,{excludedExtensionTargets:t}={})=>s.ui.hasBlockingExtensionForFeatures({features:e,placementReferences:c,excludedExtensionTargets:t}),[c,s.ui]),w=n((e,t)=>(o.log("journey_page_fast_forwarded","Fast-forwarded through page",{pageId:e,reason:t}),!0),[o]);return r(()=>sP({i18n:e,sourceType:a,addressSettings:b,billingAddressSettings:P,hasBlockingUiExtensionForFeatures:S,getSellableDeliveryMethods:()=>l.value,initialNegotiationData:d,isDraftOrderCheckout:h,isPrePopulatedSourceType:u,isShippingRequired:k,proposedPaymentLines:_,reviewEnabled:f,shippingAddress:p,shippingCountryDetails:m,mustSelectProvidedShippingRate:g,shop:t,checkout:i,paymentMethods:v,observability:o,recordFastForward:w}),[b,P,S,l.value,d,h,u,k,_,f,p,m,g,a,e,t,i,v,o,w])}(),b=function({businessCustomerJourneyPath:e,isShopPay:t,source:n,isOnePageCheckout:r}){return e?"businessCustomer":t?"shopPay":Fn(n)?"orderEdit":r?"onePage":"threePage"}({businessCustomerJourneyPath:y,isShopPay:u,source:l,isOnePageCheckout:p}),P=r(()=>{switch(b){case"businessCustomer":return i.leaveErrorBreadcrumb("Using business customer journey plan"),function({i18n:e,greenPath:t}){return{greenPath:t,detours:[...g_(e,{beforeStock:[c_(e)]}),m_(e)]}}({i18n:a,greenPath:y});case"shopPay":return i.leaveErrorBreadcrumb("Using shop pay journey plan"),function({i18n:e,shopName:t,currentUrlSearch:n}){return{greenPath:[{id:"shopPay",label:e.translate("general.page_title"),route:"/shoppay",queryParams:n,features:({isShippingRequired:e})=>[e?"shipping-address":"billing-address","contact-information","delivery-method","payment-methods"]}],detours:[h_(e),o_(e,"redirectToCart"),s_(e),l_(e),u_(e),d_(e,t),p_(e),m_(e)]}}({i18n:a,shopName:s.name,currentUrlSearch:v});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?[f_(e)]:[]],detours:[...g_(e,{afterStock:[]}),m_(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"):y_(t,r.peek(),{shop:a,checkout:i,paymentMethods:n})||o.push("billing-address"),o}}
2,...t?[f_(e)]:[]],detours:[...g_(e),m_(e)]}}({i18n:a,reviewEnabled:f,paymentMethods:h,proposedPaymentLines:g,shop:s,checkout:c});case"threePage":return _}},[y,c,v,a,p,b,i,h,g,f,s,_]);return d(tP,{plan:P,children:e})}function gP(){const{data:e}=O_(),{currentPage:t}=Kl().value,{checkout:{negotiator:n}}=ie(),{deliveryMethodsAddressErrors:r}=n.context,[i,o]=s(!0),{setAddressError:l}=Ff(r),c=Gf(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(Dr(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 fP({scrollbarGutter:e,children:t}){const n=Fm(),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 yP="y3r6mh0";const vP=(_P=e=>Se({colorScheme:e}),be.reduce((e,t)=>({...e,[t]:_P(t)}),{}));var _P;const{surfaceBorder:bP,surfaceControlBorder:PP,...kP}=ye.color.default,SP=x(function({children:e,scoped:t}){const n=Fm(),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<n;){const e=t.charCodeAt(r);a+=0!==e?e>=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?xP(i):null,r=o?xP(o):null,s=EP(wP(i?.color)),l=EP(wP(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} {${b(n)}}`:""}${s}`,p=`${u?`${e} {${b(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 wP(e){if(e&&"object"==typeof e&&"schemes"in e)return e.schemes}function CP(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,...CP(r,a)}:i?e:null!=r?{...e,[a]:r}:e},{})}function EP(e){if(!e||"object"!=typeof e)return"";let t="";for(const n of be){const r=e[n];if(!r||"object"!=typeof r)continue;const{surfaceBorderContinuation:a,...i}=r,o=CP(i,kP),s=vP[n].trim().split(/\s+/).join(".");Object.keys(o).length>0&&(t+=`.${s} {${b(o)}}`),"string"==typeof a&&(t+=`.${s}.${yP}.${yP} {${b({[ye.color.default.surfaceBorder]:a,[ye.color.default.surfaceControlBorder]:a})}}`)}return t}function xP(e){return CP(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),ye)}function IP({children:e}){const{typographyPrimary:t,typographySecondary:n}=Vm();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 AP({children:e,condition:t}){return d(t?IP:y,{children:e})}function TP({children:e,theme:t,shouldLoadFonts:n,scoped:r}){const{customProperties:a}=h(pu);return d(Te.Provider,{value:t,children:d(zr,{children:d(AP,{condition:Boolean(n),children:a?d(SP,{scoped:r,children:e}):e})})})}function LP({children:e}){const{checkout:t,source:n,router:r}=ie(),a=r.currentUrl.value,i="simulated"===n.type,o=dr(a.search),s=t.configuration.branding.shell,l=t.configuration.branding.theme,c=Lt()||i||o;return d(TP,{theme:l,shouldLoadFonts:c,children:d(zy,{shell:s,children:d(RP,{children:e})})})}function RP({children:e}){const{canvas:t}=By();return d(fP,{scrollbarGutter:t?.scrollbarGutter,children:e})}function NP(){const{embed:e}=ie(),n=h(Iu)?.isModalOpen,r=t(()=>Boolean(n?.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 MP(e){return e.activatedExtensionId&&e.activatedExtensionId.length>0?e.activatedExtensionId:e.id}function DP(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:MP(e),name:e.name,placementReference:e.placementReference,type:e.type,version:e.version,publicIdentifier:t,registrationId:r,targetPublicIdentifier:n}}function zP(e){const t=String(BP(e));return e.stack??t??e.message??""}function OP(e){const t=BP(e);return t?`${t.name}: ${t.message}`:e.message}function BP(e){if(function(e){return"object"==typeof e.cause&&null!=e.cause}(e)&&"stack"in e.cause)return e.cause}var FP=(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_E
2RROR",e.PaymentError="PAYMENT_ERROR",e))(FP||{}),VP=(e=>(e.ExtensionUsageError="EXTENSION_USAGE_ERROR",e))(VP||{});const UP={[Or.ExtensionCustomerPrivacyApiBrowserError]:{eventName:"extension-customer-privacy-api-browser-error",eventType:"interceptor-execution",errorReason:"extension-customer-privacy-api-browser-error"},[Or.ExtensionCustomerPrivacyApiError]:{eventName:"extension-customer-privacy-api-error",eventType:"interceptor-execution",errorReason:"extension-customer-privacy-api-error"},[Or.ExtensionCustomerPrivacyGraphqlError]:{eventName:"extension-customer-privacy-graphql-error",eventType:"interceptor-execution",errorReason:"extension-customer-privacy-graphql-error"},[Or.ExtensionCustomerPrivacyLikelyBotError]:{eventName:"extension-customer-privacy-likely-bot-error",eventType:"interceptor-execution",errorReason:"extension-customer-privacy-likely-bot-error"},[Or.ExtensionCustomerPrivacyServerError]:{eventName:"extension-customer-privacy-server-error",eventType:"interceptor-execution",errorReason:"extension-customer-privacy-server-error"},[Or.ExtensionInterceptorError]:{eventName:"interceptor-execution-broke",eventType:"interceptor-execution",errorReason:"interceptor-execution-broke"},[Or.ExtensionInteractionError]:{eventName:"extension-component-interacted",eventType:"interceptor-execution",errorReason:"extension-component-interacted"},[Or.ExtensionRenderError]:{eventName:"extension-rendered",eventType:"interceptor-execution",errorReason:"extension-rendered"},[Or.ExtensionRunError]:{eventName:"extension-run-error",eventType:"interceptor-execution",errorReason:"extension-run-error"},[Or.ExtensionTimeoutError]:{eventName:"extension-render-timed-out",eventType:"interceptor-execution",errorReason:"extension-render-timed-out"},[Or.ExtensionAssetFetchError]:{eventName:"extension-asset-fetch-error",eventType:"interceptor-execution",errorReason:"extension-asset-fetch-error"},[Or.ExtensionSandboxAssetFetchError]:{eventName:"extension-sandbox-asset-fetch-error",eventType:"interceptor-execution",errorReason:"extension-sandbox-asset-fetch-error"},[Or.ExtensionSandboxUncaughtError]:{eventName:"extension-sandbox-uncaught-error",eventType:"interceptor-execution",errorReason:"extension-sandbox-uncaught-error"},[Or.ExtensionUnsupportedFeatureError]:{eventName:"extension-unsupported-feature-error",eventType:"interceptor-execution",errorReason:"extension-unsupported-feature-error"}},qP=({children:e})=>{if("undefined"==typeof window)return d(y,{children:e});const{observability:t,userEvents:n,checkout:r}=ie(),i=eg(),o=tg(),s=r.configuration.layout.isOnePage.value;return a(()=>{const e=(e,t)=>{if(e.name in Or&&t?.extension){const{extension:n}=t,{trace:r,message:a}=function(e){return{message:OP(e),trace:zP(e)}}(e);if(!Br(e.name))return;const i={apiVersion:n.apiVersion,appId:n.appId,appApiKey:n.appApiKey,appName:n.appName,appVersion:n.version,code:VP.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 UP&&t?.extension){const{extension:a}=t,{eventName:o,eventType:l,errorReason:c}=UP[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:MP(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 jP(){const e=Fg(),t=i(new Set);return a(()=>()=>{for(const e of t.current)cancelAnimationFrame(e.handle),clearTimeout(e.timeout),e.resolve();t.current.clear()},[]),Xl(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 HP(){const{checkout:{identity:e,negotiator:n}}=ie(),r=n.current.fields.buyerIdentity,{inMemoryApplePayParts:{asPaymentMethod:a}}=un();return t(()=>"applePay"===e.current.value&&Boolean(r.value?.purchasingCompany)&&a.value)}function $P(){const{checkout:{wallets:e},embed:t}=ie(),r=function(){const{checkout:{negotiator:e}}=ie(),{deliveryLines:t,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}}=ie(),t=e.current.fields.buyerIdentity;return n(()=>{const e=t.value?.customerProfile;if(e)return e.email},[t])}(),f=Cb(),y=$y();return n((e,n=!1)=>
2{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()??"",t=f("shipping"),s=f("billing");r.value=e,a.value="",n||(i.value=t??Rl(i.value)),o.value=s??Rl(o.value);const l=h.value;h.value=l?l.filter(e=>e.key!==Vr):l}y.value||n||Sh(t,void 0)},[h,s,o,m,t,u,r,p,f,g,d,y,l,a,i,c])}(),a=Fr(),i=HP();return n(({shouldResetCustomerInfo:n=!1,shouldRemovePaymentLine:o=!0,isConstrainedAddress:s=!1}={})=>{const l=n&&t?.isFlagshipPartner?t.embedderProposalSnapshot.value??null:null;e.setHasActiveApplePaySubscriptionReview(!1),i.value||e.setEscalatedWallet(null),n&&r(l,s),o&&!l&&a()},[t,r,a,e,i])}function YP({onClick:e,shouldResetCustomerInfo:r,shouldRemovePaymentLine:a,skipRedirect:i}={}){const{negotiate:o,progress:s}=Ql(),l=$P(),{dispatch:c}=gh()??{},{client:u,observability:d,persistence:p,router:m,checkout:{identity:{current:h},negotiator:g},i18n:f}=ie(),{buyerIdentity:y}=g.current.fields,{value:v}=t(()=>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:_}=Kl().value,b=u.unstable_getSerialization("forcedRedesignWallet"),P=function(e){try{const t=new URL(e.href);return t.searchParams.delete(vn),t.searchParams.append(tv,"1"),t.toString()}catch{return}}(m.currentUrl.value),k=m.currentUrl.value.searchParams.has(tv),S=b&&P&&!k&&!i;return{label:v,onClick:n(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(P);var n;c?.("addressReset"),(n=m.currentUrl.peek()).searchParams.has(vn)&&(n.searchParams.delete(vn),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,P,h,o,e,p,s,l,S,d,m,r,a])}}function WP(){return function(){const{router:e}=ie(),t=e.currentUrl.value,{onClick:n}=YP({shouldResetCustomerInfo:!0});a(()=>{t.searchParams.has(tv)&&(n?.(),function(e){e.searchParams.has(tv)&&(e.searchParams.delete(tv),history.replaceState(null,"",e.href))}(t))},[])}(),null}const GP="wallet_deceleration";function JP(){const{walletUsedForSubmissionSignal:e,inMemoryGooglePayParts:{paymentSheetError:t}}=un(),{clearForcedCheckoutLayout:r}=Vy(kn),{checkout:a,router:i}=ie();return YP({onClick:n(async()=>{var n;e.value=void 0,t.value=void 0,r({wallet:"GOOGLE_PAY"}),"true"===(n=i.currentUrl.value).searchParams.get(GP)&&(n.searchParams.delete(GP),history.replaceState(null,"",n.href)),a.unstable_evaluateSupportsSplitShipping(i.currentUrl.value)},[e,t,a,r,i]),shouldResetCustomerInfo:!0,skipRedirect:!0})}function KP({shouldResetCustomerInfo:e}){const t=$P();return n(()=>{t({shouldResetCustomerInfo:e})},[t,e])}const QP="google_pay_legacy_token_bounce";function XP(){return function(){const{checkout:e,embed:t,observability:n}=ie(),{inMemoryGooglePayParts:{paymentSheetError:r}}=un(),{onClick:i}=JP();a(()=>{t||"GOOGLE_PAY"===e.wallets.escalatedWallet.value&&(e.latestReceipt.value||Ur({paymentLines:e.proposal.proposed.paymentLines.value})&&(n.counter({name:QP,value:1}),n.log(QP,"[useBounceLegacyGooglePayToken] Detected a legacy Google Pay token on load and returned the buyer to guest checkout"),i?.(()=>{r.value={type:"recovery_notice"}})))},[])}(),null}const ZP=re("NavigationBlockerContext");class ek extends Error{constructor(){super(...arguments),this.name="NavigationBlockerTimeout"}}function tk({children:e}){const t=i(new Set),a=m(!1),{observability:o}=ie(),s=n(e=>{setTimeout(()=>{t.current.has(e)&&o.error(new ek(`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=n((e,n)=>{const r=n??"_global",i=t.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(ZP.Provider,{value:c,children:e})}const nk=f({registerPayNowButtonElement:()=>()=>{},payNowButtonElement:null,setPayNowButtonSectionMounted:()=>{},payNowButtonSectionMounted:!1}),rk=()=>h(nk);function ak(){const{registerPayNowButtonElement:e}=rk(),t=i(null);return n(n=>{t.current?.(),t.current=n?e(n):null},[e])}function ik({children:e}){const t=i(new Set),[a,o]=s(null),[l,c]=s(0),u=n(e=>(t.current.add(e),o(e),()=>{t.current.delete(e),o(n=>n===e?t.current.values().next().value??null:n)}),[]),p=n(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(nk.Provider,{value:h,children:e})}function ok(){return Tv(ie())}function sk(){const{embed:e}=ie(),t=Bh(),n=t?.config?.pixelEventsMode,r=e?.configuration?.pixelMode;return"DISABLED"===n||"FORWARD_TO_CLIENT"===n||"DISABLED"===r||"FORWARD_TO_CLIENT"===r}function lk(){const{mobileCheckoutSdk:e}=ie(),t=e.config.version,n=e.config.schema;return Boolean(t)||Boolean(n)}function ck({isFlagshipPartner:e,embedderProposalSnapshotEmail:t,proposedEmail:n}){if(e)return t||n||void 0}function uk(e){const t={totalAmount:{any:!0},paymentLines:[],billingAddress:null};
2return{...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}var dk=(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))(dk||{});class pk extends Error{constructor(){super(...arguments),this.name="MissingGuestCheckoutUrlError"}}function mk(e="payment_page",{markPrefilledGuestArrival:t=!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}=ie(),y=f.currentUrl.value,{checkoutAsGuestUrl:v,profilePreviewToken:_,checkoutProfileContext:b,redirectSource:P}=h.config,k="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=ck({isFlagshipPartner:g?.isFlagshipPartner,embedderProposalSnapshotEmail:g?.embedderProposalSnapshot.value?.email,proposedEmail:c.proposal.proposed.email.value}),A=r(()=>{if(k)return"";if(!v)return p?m.storefront():"";const e=new URL(v);e.searchParams.set(jr,"true"),Hr(e),t&&S.value&&$r(l.type)&&Yr(e,Zr),C&&e.searchParams.set(Wr,C),w&&e.searchParams.set(j_,w),_&&b&&(e.searchParams.set(Gr,_),e.searchParams.set(Jr,b)),dr(y.search)&&e.searchParams.set(Kr,"shop_web"),S.value?e.searchParams.set(Qr,"true"):e.searchParams.delete(Qr),E?e.searchParams.set("rctx",E):e.searchParams.delete("rctx");const n=new URLSearchParams(a.initialRequest.url.search);return function(e,t){const n=t.get("_mcs");n&&qr(n)?e.set("_cs",n):e.delete("_cs")}(e.searchParams,n),x(e.searchParams,n),I&&!e.searchParams.get("checkout[email]")&&e.searchParams.set("checkout[email]",I),e.href},[k,v,C,a.initialRequest.url.search,_,b,y.search,S.value,w,p,m,E,x,I,t,l.type]);let T=i.translate("unauthenticated_modals.generic.cta");(ok()||g?.isCheckoutKit())&&(T=i.translate("checkout_sdk.use_another_payment_method"));const L=n(()=>(k||(S.value&&d?.clearAll(),o.counter({name:"shop_pay_return_to_guest_checkout",value:1,attributes:{redirect_source:P}}),s.monorailEvent({schemaId:"shopify_pay_payment_page_checkout_as_guest/2.1",payload:{...Xr(l,c,u),origin:e}},{exportImmediately:!0})),null),[k,S,d,o,s,l,c,u,e,P]),R=n(e=>{if(c.unstable_setRedirectingExternally(!0),L(),!A)return c.unstable_setRedirectingExternally(!1),void o.error(new pk("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(ea,t.paymentMethod),t.paymentMethodIdentifier?e.set(ta,t.paymentMethodIdentifier):e.delete(ta))}(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 hk(e){const{negotiate:t}=Ql();return n(n=>t({silenceViolations:["all"],force:!0,customizeNegotiation:uk,negotiationStage:"negotiation",onComplete:t=>e(n,t)}),[t,e])}function gk({clearPii:e}){const{embed:t,checkout:r,userEvents:a,source:i,shop:o}=ie(),s=r.negotiator.parts.shippingAddress.value,{href:l,redirectToGuestCheckout:c}=mk("payment_page",{markPrefilledGuestArrival:!e}),u=ck({isFlagshipPartner:t?.isFlagshipPartner,embedderProposalSnapshotEmail:t?.embedderProposalSnapshot.value?.email,proposedEmail:r.proposal.proposed.email.value}),d=hk(c),p=function(e,t){const{negotiate:r}=Ql();return n(n=>r({silenceViolations:["all"],force:!0,customizeNegotiation:e=>{const n=uk(e);return{...n,buyerIdentity:{...n.buyerIdentity,email:t}}},negotiationStage:"negotiation",onComplete:()=>e(n)}),[r,t,e])}(c,u??""),m=r.proposal.negotiated.fields.availableDeliveryAddresses.value,h=Boolean(m?.length&&m.some(e=>na(s,e.address)));return n(t=>
2{if(r.unstable_setRedirectingExternally(!0),!e||h)return!e&&l&&a.monorailEvent({schemaId:"shopify_pay_payment_page_ui_interaction/1.2",payload:{...Xr(i,r,o),action:"payment_step_redirect"}},{exportImmediately:!0}),void c(t);u?p(t).catch(()=>{r.unstable_setRedirectingExternally(!1)}):d(t).catch(()=>{r.unstable_setRedirectingExternally(!1)})},[r,e,l,a,i,o,h,c,u,d,p])}const fk=[3890849,3850711,5198245];function yk(e){return!!e&&fk.includes(e)}function vk(){const{observability:e}=ie(),t=n(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:t}),[t])}function _k({children:e}){const{checkout:t,observability:n,source:r,client:o,environment:s,shopPay:l,shop:c}=ie(),u=t.rememberMe.shouldSetRememberMeCookies.value,p="simulated"===r.type,{href:m}=mk(),h=gv().value,g=vk(),f=i(!1),v="shopPay"===t.identity.current.value,_=o.unstable_getSerialization("apiClientId"),b=o.unstable_getSerialization("shopPayConfig"),P=yk(_),S=!0===b.shop_app_referral_shop_pay_eligible&&"shop_pay_disabled"===h&&c.hasFlagEnabled(ra),w=!0===b.shop_pay_sdk_without_shop_pay_eligible,C=w&&"shop_pay_disabled"===h,E=!(p||void 0===h||P||t.configuration.isUniversalCheckoutFinalizer||S||C),x=v&&E,I=v&&!p&&!x&&!0===b.has_remember_me_session&&""!==l.user.shopAccountUuid.value,A=i(!1),T=i(!1);return k(()=>{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:I,observability:n,shopServerUrl:s.services.shopServer.url}),a(()=>{x&&!A.current&&(A.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,x]),a(()=>{v&&!p&&C&&!T.current&&(T.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:"shop_pay_sdk"}}))},[C,v,p,n,h]),x?null:d(y,{children:e})}function bk(){const{client:e}=ie(),t=e.unstable_getSerialization("experiments"),n=t?.find(e=>e.clientHandle===aa)?.variant,r=Object.values(ia).find(e=>e===n)??ia.Control;return{variant:r,showPaymentTiles:r===ia.VariantA||r===ia.VariantC,useRedesignedChoiceList:r===ia.VariantB||r===ia.VariantC,showSingleCreditCard:r!==ia.Control}}function Pk(){const{source:e}=ie(),{useRedesignedChoiceList:t}=bk();return t&&"shopPayExternal"!==e.type?"redesigned":"base"}class kk extends Error{constructor(){super(...arguments),this.name="TranslationError"}}const Sk=()=>{const{url:e}=ie();return r(()=>[e.cart(),e.storefront()],[e])};function wk(){const{router:e,shop:n}=ie(),r=dg(),{cartLink:{visibility:a}}=By(),i=Kl(),o=Ck(),s=T("hidden"===a);return t(()=>{const{currentDetour:t}=i.value,a="thankYou"===t?.type;return n.hasStorefront&&!r.value&&!a&&!dr(e.currentUrl.value.search)&&Boolean(o.value)&&!s.value})}function Ck(){const{source:e,url:n,checkout:{negotiator:r}}=ie(),a="simulated"===e.type,i=r.current.fields.buyerIdentity;return t(()=>{if(a)return new URL(n.cart());let t;return e.cartReturnUrl&&(t=new URL(e.cartReturnUrl)),Boolean(i.value?.customerProfile)&&t&&t.searchParams.append("logged_in","true"),t})}function Ek(e){return e.currentUrlMatches("/thank-you")}const xk=_(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}=ie(),m=Ck(),h=function(){const{client:e,environment:{services:t},shop:{customerAccounts:n,storefrontDomains:r}}=ie(),a=r?.map(e=>`https://${e}
2`)??[],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=Sk();if(c.configuration.isUniversalCheckoutFinalizer&&Ek(o))return d("a",{...r,ref:a,"aria-disabled":"true",children:n});let _="_blank"===t,b="_blank"===t,P=zl(e,{cart:Bl(m.value),checkout:Ol()});const k=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 Ik.has(i)?V(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:Ak.has(i)?1:3}(P,o,g,h),S=["/information","/shipping","/review","/payment","/thank-you","/cart","/","","/orders","/profile","/settings"],w=/^\/orders\/.*/;switch(k){case 2:b=!0,_=!0;break;case 1:b=!0;break;case 3:b=!0,P="#";break;case 0:!f||S.includes(Fl(P))||w.test(P)||(P="#");break;default:L(k)}const C=_?"_blank":void 0,E=_?"noopener noreferrer":void 0,x=yu({external:_,native:b});return b?d("a",{...r,href:P,target:C,rel:E,ref:a,"aria-describedby":x,onClick:e=>{if(y&&(1===k||2===k))return e.preventDefault(),u?.client?.windowOpenRequest(P).catch(e=>{p.log("window_open_delegation_error","Window open delegation failed in Link component",{url:P,error:e instanceof Error?e.message:String(e)})}),void r.onClick?.(e);if(f){if(e.preventDefault(),v.includes(P)){const e=new URL(o.currentUrl.value);return e.searchParams.set("ce_redirect",P),void o.navigate(e)}const t=i.translate("simulated_checkout.editor_link_new_tab_confirmation",{resolved_to_link:P});confirm(t)&&open(P)}r.onClick?.(e)},children:n}):d(F,{...r,router:o,href:P,target:C,rel:E,ref:a,"aria-describedby":x,children:n})});xk.displayName="Link";const Ik=new Set(["http","https"]),Ak=new Set([...Ik,"mailto","tel","sms"]);function Tk({children:e}){const{geolocation:t}=Lf(),{i18n:a,embed:i,checkout:o,observability:s,shop:l}=ie(),c=oa({embedder:i?.embedder}),u=Mg(),p=o.configuration.layout.isOnePage.value,m=l.hasFlagEnabled(sa),h=l.hasFlagEnabled(la),g="redesigned"===Pk(),f=n(e=>a.numberFormatter().format(e),[a]),{symbol:y,prefixed:v}=U(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",()=>
2e.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 kk(`Missing UI library translation: ${e}`);return r}}(a),[a]),b=r(()=>({code:a.currency,symbol:y,symbolPrefixed:v}),[v,y,a.currency]),P=r(()=>i?{embedder:i.embedder,interstitialBrandingEnabled:c}:void 0,[i,c]),k=r(()=>({countryCode:t.country.code}),[t.country.code]),S=r(()=>({direction:a.localeDirection,languageCode:a.locale}),[a.locale,a.localeDirection]),w=Fv(),C=r(()=>({...w,close:()=>w.emit("closeAnnouncement")}),[w]);return d(Gu,{currency:b,embed:P,formatNumber:f,geolocation:k,linkComponent:xk,locale:S,onePage:p,editor:u,redesignedChoiceLists:g,animatedTextFieldLabels:m||h,floatTextFieldLabelsOnFocus:h,translate:_,announcementEmitter:C,logger:s,children:e})}function Lk(){const e=new Set;return t=>{const n=`${t.message}${t.target}`,r=e.has(n);return e.add(n),!r}}const Rk="$.payments",Nk="$.cart.buyerIdentity",Mk="$.cart.deliveryGroups[0].deliveryAddress",Dk="$.cart.localizedField",zk="$.cart.billingAddress";function Ok(){const{checkout:{negotiator:e}}=ie(),{allViolations:n}=e.current.fields,r=mn("allViolations"),a=t(()=>r.value?[]:n.value?n.value.filter(e=>"UnprocessableTermViolation"===e.__typename&&ca.has(e.code)).map(e=>({message:e.localizedMessage||e.nonLocalizedMessage,target:e.target})):[]);return t(()=>{const t=[...e.validationErrors.value,...a.value].filter(Lk()),n=t.filter(({target:e})=>e?.startsWith(Mk)&&Boolean(e.replace(`${Mk}.`,""))),r=t.filter(({target:e})=>e?.startsWith(Nk)&&Boolean(e.replace(`${Nk}.`,""))),i=t.filter(({target:e})=>e?.startsWith(Rk)&&Boolean(e.replace(`${Rk}.`,""))),o=t.filter(({target:e})=>e?.startsWith(Dk)&&Boolean(e.replace(`${Dk}.`,""))),s=t.filter(({target:e})=>e?.startsWith(zk)&&Boolean(e.replace(`${zk}.`,""))),l=t.filter(({target:e})=>"$.cart.poNumber"===e),c=t.filter(e=>![...r,...n,...i,...o,...s,...l].includes(e));return{contactErrors:r,deliveryAddressErrors:n,paymentErrors:i,localizedFieldErrors:o,billingAddressErrors:s,poNumberErrors:l,globalErrors:c}})}const Bk={provinceCode:"zoneCode",zip:"postalCode"},Fk=/^addressLineComponents\.(streetName|streetNumber|additionalInformation|district|subdistrict)$/;function Vk(e){if(!e)return;let t;if(e.startsWith(Mk)?t="delivery":e.startsWith(zk)&&(t="billing"),!t)return;const n="delivery"===t?Mk:zk,r=e.slice(n.length);if(""===r)return{addressType:t};if(!r.startsWith("."))return;const a=r.slice(1),i=a.match(Fk)?.[1],o="additionalInformation"===i?"line2":Bk[i??a]??i??a;return If(o)?{addressType:t,field:o}:{addressType:t}}function Uk(e){return Object.entries(Nt).find(([,t])=>t.includes(e))?.[0]}function qk({addressLine:e,renderedFields:t}){return t.includes(e)||t.some(t=>Nt[e].includes(t))}function jk({validationErrors:e,addressType:t,renderedFields:n}){const r=Object.values(Nt).flatMap(e=>n.filter(t=>e.includes(t)).slice(0,1)),a=new Map,i=new Map,o=(e,t,n,r=!1)=>{(i.get(e)??-1)>=n||(i.set(e,n),a.set(e,r?{...t,message:" "}:t))};for(const s of e){const e=Vk(s.target);if(!e||e.addressType!==t)continue;const a=s.target?.includes(".addressLineComponents.")??!1,i=e.field;let l=void 0===i,c=i??"address1";if(i&&!n.includes(i)){const e="address1"===i||"address2"===i?i:Uk(i);e&&qk({addressLine:e,renderedFields:n})?c=e:(c="address1",l=!0)}const u=void 0!==i&&c!==i,d=!a&&s.target?.split(".").pop()!==c;let p=2;if(l?p=0:d&&(p=1),o(c,s,p),"address1"!==c&&"address2"!==c)continue;const m=!i||a||u?Nt[c].filter(e=>n.includes(e)):Nt[c];for(const t of m)o(t,s,l?0:1,!r.includes(t))}return a}function Hk({children:e}){const{checkout:t}=ie(),{validation:o,negotiator:s}=t,{deliveryMethodsAddressErrors:l}=s.context,{billingAddressErrors:c,poNumberError:u}=o,{emailInputError:p,phoneInputError:m}=o.contactErrors,{contactErrors:h,deliveryAddressErrors:g,billingAddressErrors:f,poNumberErrors:v}=Ok().value,{shippingAddress:_,billingAddress:b}=s.parts,P=_.fields.countryCode.value,k=b.fields.countryCode.value,S=Wf(P),w=Wf(k,pP(t)),C=function(){const e=i(new Set),{userEvents:t,shop:{id:r,sameBillingAndShippingAddress:a},source:{checkoutSessionIdentifier:o},checkout:{negotiator:s}}=ie(),{value:l}=s.current.fields.shippingAddress,{value:c}=s.current.fields.billingAddress,{value:u}=s.current.fields.localizationExtensions;return n(({errors:n,reasons:i})=>{if(l&&Xf(l)){const s=`shipping:${Zf(l)}`;e.current.has(s)||n?.some(e=>Ut.has(e.code))||i?.includes(qt.InvalidAddress)||(ey(l.countryCode??"unknown",Qf(l),"shipping_address",r,o,a,t),e.current.add(s))}if(c&&Xf(c)){const s=`billing:${Zf(c)}`;e.current.has(s)||n?.some(e=>jt.has(e.code))||i?.includes(qt.InvalidAddress)||(ey(c.countryCode??"unknown",Qf(c),"billing_address",r,o,a,t),e.current.add(s))}if(u&&u?.length>0){const{cacheKey:i,keysOnly:s}=function(e){const t=e.filter(e=>e.value&&"string"==typeof e.value&&""!==e.value.trim());return{cacheKey:t.map(e=>`${e.key}:${$t(e.value.trim())}`).join("|"),keysOnly:t.map(e=>e.key)}}(u);if(s.length>0){const u=`localization:${i}`;e.current.has(u)||n?.some(e=>Ht.has(e.code))||(ey(l?.countryCode??c?.countryCode??"unknown",s,"localized_id",r,o,a,t),e.current.add(u))}}},[l,c,u,r,o,a,t])}(),E=r(()=>({}),[]),x=n((e,t,n)=>{const r=e.value,a="string"==typeof r&&E[t]===r;!n||r&&!a?!n&&a&&(e.value=void 0,delete E[t]):(e.value=n.message,E[t]=n.message)},[E]);a(()=>{x(m,"phone",h.find(({target:e})=>"phone"===e?.split(".")?.pop())),x(p,"email",h.find(({target:e})=>"email"===e?.split(".")?.pop()))},[h,p,x,m]);const I=r(()=>jk({validationErrors:g,addressType:"delivery",renderedFields:S}),[g,S]);a(()=>{Object.entries(l).forEach(([e,t])=>{If(e)&&x(t,e,I.get(e))})},[I,l,x]);const A=r(()=>jk({validationErrors:f,addressType:"billing",renderedFields:w}),[f,w]);return a(()=>
2{Object.entries(c).forEach(([e,t])=>{If(e)&&x(t,`billing_${e}`,A.get(e))})},[A,c,x]),Xl(e=>{"success"===e.type||"error"===e.type?C({errors:e.errors}):"invalid"===e.type&&C({reasons:e.reasons})}),a(()=>{x(u,"poNumber",v[0])},[x,u,v]),d(y,{children:e})}const $k=w({load:()=>ll(()=>import("./d08a6c7d.CjXYCwoA.js"),__vite__mapDeps([71,1,2,3,4,5,72,73,13,74,31,75,76,14,77,78,79,16,80,52,53,6,81,82,10,15])).then(e=>e.ApplePaySessionLoader),renderLoading:({children:e})=>e,useError:function(e){const{sessionLoadFailed:t}=un().inMemoryApplePayParts,{observability:n}=ie();a(()=>{e&&(t.value=!0)},[e,n,t])}});function Yk(){const e=function(){const e=rt();return t(()=>!!e.value&&void 0!==window.ApplePaySession)}(),{availableWallets:n}=un(),r=T(n.some(({name:e})=>"APPLE_PAY"===e)),a=i(!1),o=t(()=>(!a.current&&e.value&&r.value&&(a.current=!0),a.current));return d(E,{when:o,children:d($k,{})})}function Wk(){const{checkout:e}=ie();return!e.configuration.showPayButton}function Gk({enabled:e,onTimeout:t,timeout:n=6e4}){const r=i(null),o=oe(t);a(()=>
2{if(e)return r.current=setTimeout(()=>o.current(n),n),()=>{r.current&&clearTimeout(r.current)}},[e,o,n])}var Jk={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 Kk({id:e,children:t,accessibilityRole:n,level:r,textAlign:o,autoFocus:s,visibility:l,tabIndex:c,display:u="block"}){const p=uu(),m=r??p??0,h=p?`h${p}`:"h1",g="hidden"===l?Jk.visuallyHidden:v(Jk.Heading,o&&Jk.textAlignVariant[o],m?Jk.levelVariant[m]:void 0,u&&Jk.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 Qk({children:e,dialogLabel:t,renderInlineUntilMounted:n=!1}){const{lock:r}=bf(),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(Gc,{children:d(yf,{children:o})})]})}function Xk({renderInlineUntilMounted:e=!1,useConsentCopy:t=!1}){const{i18n:n}=ie(),r=t?n.translate("wallets.deceleration.one_more_step_to_complete_order"):n.translate("wallets.deceleration.one_more_step");return d(Qk,{dialogLabel:r,renderInlineUntilMounted:e,children:d(gf,{gap:"large-400",alignItems:"center",children:[d(Qg,{children:d(ef,{size:"large"})}),d(Kk,{level:2,textAlign:"center",children:r})]})})}function Zk({onTransitionComplete:e,useConsentCopy:t=!1}){return d(eS,{onTransitionComplete:e,useConsentCopy:t})}function eS({onTransitionComplete:e,useConsentCopy:t}){const{checkout:r,i18n:o}=ie(),s=Wk(),{payNowButtonElement:l,payNowButtonSectionMounted:c}=rk(),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),_=n(()=>{m.value&&(y.current||(y.current=!0,Ou({content:o.translate("wallets.errors.subscription_review_required"),role:"status"}),r.wallets.setIsDecelerating(!1),e()))},[o,m,e,r.wallets]);return Gk({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(Xk,{renderInlineUntilMounted:!0,useConsentCopy:t})}function tS(e){const{shop:n,checkout:{configuration:r,identity:a}}=ie(),i="shopPay"===a.current.value,o=n.hasFlagEnabled(dn);return t(()=>ua({supportsOnePage:da({isOnePage:r.layout.isOnePage.value,isApplePay3PageVaultedReviewEnabled:o,asPaymentMethod:e.value}),isShopPayActive:i}))}const nS=["address2","company","phone"];function rS({addressErrors:e}){if(1!==e.size)return;const[t]=e.keys();var n;return void 0!==t?(n=t,nS.includes(n)?t:void 0):void 0}function aS({missingAddressField:e,violations:t}){return"company"===e&&t.some(({code:e})=>"DELIVERY_COMPANY_REQUIRED"===e)}function iS({addressErrors:e,violations:t}){const n=rS({addressErrors:e});if(!aS({missingAddressField:n,violations:t}))return new Map(e);const r=new Map(e);return r.delete(n),r}function oS({paymentLines:e,paymentMethods:t}){const n=t?.some(e=>"wallet"===e.type&&"PAYPAL_EXPRESS"===e.name);if(!n)return{status:"not_connected"};const r=It(e,"PAYPAL_EXPRESS");if(r&&pa(r)){const{walletContent:e}=r.method;return{status:"connected",email:e?.email??"",token:e?.token??""}}return{status:"not_connected"}}function sS({code:e}){return jn.has(e)||_a.has(e)||ba.has(e)||Pa.has(e)||ca.has(e)||ka.has(e)||Sa===e}function lS({isPayWithPayPalButton:e}){const{inMemoryPayPalParts:t}=un();return e?t.payWithPayPalButtonStatus:t.acceleratedCheckoutButtonStatus}function cS(){const{isInPayPalContextSignal:e}=un(),{i18n:n}=ie(),r=lS({isPayWithPayPalButton:!0}),{inMemoryPayPalParts:{accountStatus:a}}=un();return t(()=>{if(e.value)return"error"===r.value.status?n.translate("wallets.errors.unavailable.description",{walletName:n.translate("brand.paypal")}):"error"===a.value.status?n.translate("wallets.errors.generic",{walletName:n.translate("brand.paypal")}):void 0})}const uS=()=>{const{checkout:{negotiator:e}}=ie(),{paymentLines:t}=e.parts;return n(()=>{const e=t.value;t.value=bn(e,{method:{type:"wallet",name:"PAYPAL_EXPRESS"}}
2)},[t])};function dS(){const e=Be(),{checkout:n}=ie(),r=n.configuration.layout.isOnePage.value,a=n.extensibility.ui.hasAtRiskPlacement;return t(()=>{if(r)return!1;if(!a.value)return!1;const t=e.value.enabledDeliveryMethods.includes("PICK_UP");return!n.isShippingRequired.value||!t})}function pS(e){return Boolean(e.value?.method.walletContent?.isVenmo)}const mS=()=>{const{checkout:{negotiator:e}}=ie(),{paymentLines:n}=e.parts;return t(()=>It(n.value,"PAYPAL_EXPRESS"))},hS=()=>{const{checkout:{negotiator:e}}=ie(),{paymentLines:n}=e.parts;return t(()=>{const e=It(n.value,"PAYPAL_EXPRESS");return Boolean(e&&pa(e))})},gS=()=>{const{inMemoryPayPalParts:{accountStatus:e}}=un(),{progressing:n}=Ql(),r=yS();return t(()=>Boolean(r.value&&("loading"===e.value.status||n.value)))},fS=()=>{const e=yS(),n=ma(),r=ha(),a=yt();return t(()=>!(!r.value&&(n.value||a.value&&a.value.amount<=0)||!e.value))},yS=()=>{const{checkout:{negotiator:e}}=ie(),{paymentLines:n}=e.parts;return t(()=>{const e=It(n.value,"PAYPAL_EXPRESS");return Boolean(e&&!pa(e))})},vS=new Map,_S=new Map,bS=new Map;class PS extends sl{constructor(){super(...arguments),this.name="DuplicateWalletError",this.defaultGroupingHash="DuplicateWalletError"}}function kS({children:e}){const{checkout:i,observability:o,router:l,i18n:c,shop:u,source:p}=ie(),h=l.currentUrl.value,g=i.configuration.layout.isOnePage.value,f=u.hasFlagEnabled(dn),{forceOnePageCheckoutLayout:y}=Vy(dn),v=m(h.searchParams.has(pn)&&!i.wallets.hasConsumedApplePaySubscriptionReviewParam.value),{shippingAddress:_}=i.negotiator.parts,b=Ca(p),P=mg(Pt.PayPal,{scope:b}),S=mg(Pt.GooglePay,{scope:b}),w=mg(Pt.AmazonPay,{scope:b}),C=mg(Pt.ApplePay,{scope:b}),E=function(e){const{checkout:{negotiator:n}}=ie(),r=n.parts.paymentLines;return t(()=>{const t=e.lastClicked.value,n=It(r.value,"PAYPAL_EXPRESS");return Boolean(n)||"PAYPAL_EXPRESS"===t})}(i.wallets),x=m(void 0),I=ch({sdkStatus:{status:"idle"},buttonStatus:{status:"not_rendered"},paymentSheetError:void 0,paymentSheetOpenPromise:void 0,paymentSheetOpenPromiseResolve:void 0}),A=ch({acceleratedCheckoutButtonStatus:{status:"not_rendered"},payWithPayPalButtonStatus:{status:"not_rendered"},accountStatus:oS({paymentLines:i.proposal.proposed.paymentLines.peek(),paymentMethods:i.proposal.negotiated.fields.paymentMethods.peek()}),isLoadingPaymentSheet:!1,isApproving:!1,paymentSheetError:void 0}),L=ch({buttonStatus:{status:"not_rendered"}}),R=ch({buttonStatus:{status:"not_rendered"}}),N=Ly(),M=hn(),D=ch({asPaymentMethod:!1,buttonStatus:{status:"not_rendered"},paymentSheetError:void 0,subscriptionReviewTransition:v.value&&Tl({applePayThreePageVaultedReviewEnabled:f,isOnePageCheckout:g})&&Ea({isApplePaySubscriptionReviewLayoutSupported:g||u.hasFlagEnabled(dn),hasSubscriptionReviewQueryParam:v.value,isABTestActive:u.hasFlagEnabled(an),variant:N,isCaliforniaBillingOrShippingAddress:M.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=ch({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}=Zy({applePayPaymentSheetError:D.paymentSheetError,applePaySubscriptionReviewTransition:D.subscriptionReviewTransition}),U=tS(D.asPaymentMethod).value,q=i.configuration.addressSettings.nonBillingAddressSettings.value.isRequired("company");!function(e){const{checkout:{negotiator:t}}=ie(),{parts:n}=t,{paymentMethods:r}=t.current.fields;k(()=>{if("connected"===e.peek().status)return;const t=oS({paymentLines:n.paymentLines.value,paymentMethods:r.value});"connected"===t.status&&(e.value=t)})}(A.accountStatus),function(e){const{environment:t,embed:n,observability:r,source:{checkoutSessionIdentifier:i},checkout:{negotiator:o}}=ie(),s=o.current.fields.paymentMethods,l=Boolean(n?.isFlagshipPartner)&&!Pn(n?.embedder),c=s.value?.find(e=>"wallet"===e.type&&"SHOP_PAY"===e.name),u=c?.placements?.includes("ACCELERATE
2D_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=vS.get(e);if(t)return void(m.value=t);const n=bS.get(p)??0;if(Date.now()<n)return void(m.value={status:"error"});let a=!1,o=_S.get(e);return o||(o=async function(){try{const e=await fetch(`${p}/pay/checkout_eligibility/check`,{method:"POST",credentials:"omit",headers:{"Content-Type":"application/json"},body:JSON.stringify({token:d})});if(!e.ok)return 429===e.status&&bS.set(p,Date.now()+6e4),r.counter({name:"express_checkout_shop_pay_eligibility",value:1,attributes:{result:"fail_closed",reason:`http_${e.status}`}}),{status:{status:"error"},definitive:!1};let t;try{t=await e.json()}catch{return r.counter({name:"express_checkout_shop_pay_eligibility",value:1,attributes:{result:"not_eligible",reason:"malformed_payload_fail_closed"}}),{status:{status:"not_eligible"},definitive:!1}}const n=!0===t.eligible||!1===t.eligible,a=!1!==t.eligible&&n?{status:"rendered"}:{status:"not_eligible"};return r.counter({name:"express_checkout_shop_pay_eligibility",value:1,attributes:{result:a.status,...!n&&{reason:"malformed_payload_fail_closed"}}}),{status:a,definitive:n}}catch{return r.counter({name:"express_checkout_shop_pay_eligibility",value:1,attributes:{result:"fail_closed",reason:"network_error"}}),{status:{status:"error"},definitive:!1}}}().then(({status:t,definitive:n})=>(n&&vS.set(e,t),_S.delete(e),t)),_S.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}=ie(),i=n.escalatedWallet.value;a(()=>{if(t.email.value)return;const n=e.fields.paymentLines.value?.lines??[];let a;switch(i){case _n.AmazonPay:case _n.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=It(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=dv(R),H=yv({inMemoryGooglePayParts:I,inMemoryPayPalParts:A,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)&&uv(t,e,j)),[H,V,q,U,j]),Y=T($);a(()=>{$?.length&&performance.mark(xa)},[]);const W=$?.map(e=>e.name)||[],G=W.join(",");a(()=>{new Set(W).size!==W.length&&o.error(new PS("Duplicate accelerated wallet(s) found in checkout",{metadata:{duplicatedWallets:[...new Set(W.filter((e,t)=>W.indexOf(e)!==t))],allWalletNames:W}}))},[G,o]);const J=$?.length||0,K=void 0!==i.wallets.activeSession.value?.wallet&&"APPLE_PAY"!==i.wallets.activeSession.value.wallet&&Boolean(i.wallets.isDeceleratingSignal?.value),Q=D.subscriptionReviewTransition.value,X=t(()=>Ia({checkout:i})),Z=X.value&&Aa(N),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:M.value,hasSubscription:X.value,transition:Q,isABTestActive:u.hasFlagEnabled(an)}),te=void 0!==Q&&!K&&ee&&Tl({applePayThreePageVaultedReviewEnabled:f,isOnePageCheckout:g}),ne=i.wallets.hasActiveApplePaySubscriptionReview.value&&ee&&!M.value&&void 0===Q;a(()=>{ee||(i.wallets.setHasActiveApplePaySubscriptionReview(!1),void 0!==Q&&(D.subscriptionReviewTransition.value=void 0,K||i.wallets.setIsDecelerating(!1)))},[Q,i.wallets,D.subscriptionReviewTransition,K,ee]),a(()=>{"storefront_redirect"===Q&&te&&!g&&y({wallet:"APPLE_PAY",reason:"subscriptions",asPaymentMethod:!0})},[Q,y,g,te]);const re=u.hasFlagEnabled(kn)&&!g&&h.searchParams.has(Ta);a(()=>{re&&(i.unstable_forceCheckoutLayoutToOnePage(),Uy(o,{wallet:"GOOG
2LE_PAY",reason:"subscriptions",asPaymentMethod:!0,result:"success"}),Ou({content:c.translate("wallets.errors.subscription_review_required"),role:"status"}))},[i,c,o,re]);const ae=n(()=>{v.value=!1,D.subscriptionReviewTransition.value=void 0},[v,D.subscriptionReviewTransition]);!function(e){const{observability:t,router:n}=ie(),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:I.buttonStatus},{walletName:"paypal",signals:[A.acceleratedCheckoutButtonStatus,A.payWithPayPalButtonStatus]}]),k(()=>{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:fn(e?.postalCode,e?.countryCode),asPaymentMethod:t.asPaymentMethod})});const oe=r(()=>({availableWallets:H,walletUsedForSubmissionSignal:x,persistedPayPalSignal:P,inMemoryPayPalParts:A,inMemoryVenmoParts:L,persistedGooglePaySignal:S,inMemoryGooglePayParts:I,inMemoryApplePayParts:D,applePaySessionHandler:z,persistedApplePaySignal:C,persistedAmazonSignal:w,inMemoryAmazonPayParts:O,inMemoryShopPayParts:R,did
2IncrementUnusablePartialAddressMetric:B,acceleratedWalletPaymentMethods:Y,isInPayPalContextSignal:E,buttonCount:J,receiptErrorSignal:F}),[H,P,S,C,w,Y,J,L,x,I,A,D,z,O,R,F,E,B]);return d(La.Provider,{value:oe,children:[te&&d(Zk,{onTransitionComplete:ae,useConsentCopy:Z}),d("span",{role:"status","aria-live":"polite","aria-atomic":"true",className:Se({screenReaders:"only"}),children:ne?c.translate("wallets.errors.subscription_review_required"):""}),e]})}const SS=x(function({children:e}){const{embed:t}=ie(),r=n(e=>t?.client?.showToast(e)??!1,[t]);return d(ik,{children:d(tk,{children:d(wS,{children:[d(ih,{handleToast:r,children:e}),d(Wc,{})]})})})});function wS({children:e}){const{shop:t,checkout:n}=ie(),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(jP,{}),d(xy,{}),d(gP,{}),d(WP,{}),d(XP,{})]});return d(Tf.Provider,{value:i,children:d(Bv,{children:d(Tk,{children:d(qv,{children:d(Gv,{children:d(LP,{children:d(kS,{children:d(hP,{children:d(Hk,{children:d(Ug,{children:d(i_,{children:d($h,{children:d(Mv,{children:d(Qh,{children:d(qP,{children:d(Ev,{children:d(Xv,{children:d(Iv,{children:d(_k,{children:[d(Cf,{}),d(CS,{}),d(NP,{}),d(Yk,{}),e,o]})})})})})})})})})})})})})})})})})})})}function CS(){const e=i(!1),t=ie(),{embed:n,webMcp:r}=t,a=ae(Jl),o=t.checkout.negotiator,{resetAddressErrors:s}=Ff(o.context.deliveryMethodsAddressErrors),l=oe({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:()=>ul(),negotiationContext:o.context}),r?.unstable_providePreactContext({loadPickupLocalityServices:()=>C(()=>ll(()=>import("./7724832f.BlBKH641.js"),__vite__mapDeps([83,2,1,3,4,5,84,69,52,53,10,13,14,15,16]))).then(({createPickupLocalityServices:e})=>e(t)),journey:a,clearShippingAddressErrors:()=>l.current.clearShippingAddressErrors(),get negotiator(){return l.current.negotiator},waitForPendingNegotiations:i})}return null}const ES=w({displayName:"DevTools",load:()=>ll(()=>import("./bad03769.BSG78o-C.js"),__vite__mapDeps([85,1,2,3,4,5,70,10,13,14,15,16,86])),suspense:!0}),xS=w({displayName:"EditorBridge",suspense:!1,load:()=>ll(()=>import("./abd080c1.BjhS_mo-.js"),__vite__mapDeps([87,2,1,3,4,5,15,10,13,14,16]))}),IS=w({id:()=>"PrivacyPreferences",displayName:"PrivacyPreferences",suspense:!1,useError:function(e){const{observability:t}=ie();a(()=>{e&&function(e,t){e.error(t,{metadata:{privacyPreferences:{component:"PrivacyPreferences",failure:"lazy_load"}}})}(t,e)},[e,t])},load:()=>C(()=>ll(async()=>{const{deferredPrivacyComponents:e}=await(import("./2acfb1ce.Bd5HdRya.js"));return{deferredPrivacyComponents:e}},__vite__mapDeps([88,1,2,3,4,5,46,47,10,13,14,15,16])).then(({deferredPrivacyComponents:e})=>e.PrivacyPreferences))}),AS=w({id:()=>"PrivacySheet",displayName:"PrivacySheet",suspense:!1,useError:function(e){const{observability:t}=ie();a(()=>{e&&function(e,t){e.error(t,{metadata:{privacySheet:{component:"PrivacySheet",failure:"lazy_load"}}})}(t,e)},[e,t])},load:()=>C(()=>ll(async()=>{const{deferredPrivacyComponents:e}=await(import("./2acfb1ce.Bd5HdRya.js"));return{deferredPrivacyComponents:e}},__vite__mapDeps([88,1,2,3,4,5,46,47,10,13,14,15,16])).then(({deferredPrivacyComponents:e})=>e.PrivacySheet))});function TS({children:e}){return d(y,{children:e})}function LS({children:e}){const t=r(()=>new URL(window.location.href),[]),{client:n,source:i}=ie(),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(jr)||(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 RS({children:e}){const t="undefined"==typeof window;return d(t?TS:LS,{children:e})}function NS({children:e,context:t}){const n="undefined"==typeof window,r=rt();return d(Ma.Provider,{value:t,children:d(Ng,{target:"cart",children:d(RS,{children:d(q,{router:t.router,children:d(SS,{children:d(Na,{children:[d(Tg,{children:e}),d(zg,{}),!n&&d(Lg,{}),d(E,{when:r,children:[d(AS,{}),d(IS,{})]}),d(MS,{}
2),Lt()&&d(xS,{})]})})})})})})}function MS(){const e=rt();return Mg(),d(E,{when:()=>e.value&&!1,children:d(ES,{})})}function DS(e){return[e].flat(99).filter(Boolean).length>0}var zS={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 OS({id:e,borderStyle:t="base",borderWidth:n="base",direction:r="inline",accessibilityRole:a="separator",alignment:i="center",children:o}){const s=DS(o);return d("div",{role:s?void 0:a,className:v(zS.Divider,zS.directionVariant[r],s&&zS.alignmentVariant[i],zS.borderWidthVariant[n],zS.styleVariant[t]),id:e,children:s&&d("div",{className:v(zS.contentAlignmentVariant[i]),children:[o,"separator"===a&&d("span",{role:"separator"})]})})}function BS({children:e,condition:t}){return d(t?"picture":y,{children:e})}const FS=new Map(za({addMaxWidth:!1}).map(({breakpoint:e,query:t})=>[e,t]));function VS(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=ne[e],r=ne[t];return null!=n&&null!=r?r-n:0}).map(([e,t])=>{const n=FS.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 j("source",{key:n,media:n,srcSet:e})}}).filter(Boolean)}function US(e){if(e)return Da(e)?"string"==typeof e.default?e.default:void 0:e}var qS={"large-200":{boxSize:100},large:{boxSize:86},base:{boxSize:64},small:{boxSize:40},"small-200":{boxSize:32}},jS={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 HS({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}={}}={}}=Vm(),y=$S(n),_=f&&"base"!==f?"accent":"auto",b=VS(i,function(e){return GS(e)?e:void 0}(a)),P=g??"extraSmall",k=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)??YS(y),{className:S}=zm({boxShadow:P}),{className:w}=zm({objectFit:p,borderWidth:k});
2return d("div",{className:v(jS.ProductThumbnail,jS.thumbnailBackgroundVariant[c],jS.productThumbnailSizeVariant[y],S,"none"!==P&&jS.boxShadowMargin,null!=t&&jS.depthVariant[t],jS.borderRadiusVariant[y.startsWith("small")?"small":"base"]),children:[i||GS(a)?d(BS,{condition:Boolean(b),children:[b,d("img",{src:i??US(a),srcSet:o,sizes:r,alt:e,loading:"eager",className:v(jS.ProductThumbnailImage,jS.borderVariant[u],jS.borderColorVariant[h],w)})]}):d("div",{className:v(jS.Placeholder,jS.borderVariant[u],jS.borderColorVariant[h],w),children:d(Xm,{type:"image",size:WS(y)})}),void 0!==l&&d("div",{className:v(jS.Overlay,jS.borderVariant[u],jS.borderColorVariant[h]),children:d("strong",{children:l})}),void 0===s?null:d(KS,{size:y,tone:_,children:s})]})}function $S(e){if("string"!=typeof e)return"base";const t=e.replace("-100","");return t in qS?t:"base"}function YS(e){return e.startsWith("small")?"base":"large"}function WS(e){return e.startsWith("small")?"small":e.startsWith("large")?"large":"base"}function GS(e){return"string"==typeof e||Da(e)}function JS(e){const{boxSize:t}=qS[$S(e)];return{blockSize:t,inlineSize:t}}function KS({children:e,size:t,tone:n}){const r=Hu(),a="accent"===n?n:"auto",{className:i}=zm({borderWidth:YS(t)});return d("div",{className:jS.BadgeWrapper,children:d("div",{className:v(jS.Badge,jS.badgeSizeVariant[t.startsWith("small")?"small":"base"],jS.badgeToneVariant[a],i),children:[d("span",{className:jS.visuallyHidden,children:r("productThumbnailQuantityLabel")}),e]})})}const QS=function(e){let t=0,r=!0;const o=new Set;return function(){const[l,c]=s(()=>{if(0===t)return 0;const n=performance.now()-t;return n<e?e-n:0}),[u,d]=s(!0),p=i(),[m,h]=s(!1),g=n(()=>{for(const e of o)e(!1)},[]),f=n(()=>{for(const e of o)e(!0)},[]),y=n(()=>{g(),h(!0)},[g]);a(()=>{m&&f()},[m,f]);const v=n(e=>{o.add(d);const n=e.timeStamp-t;c(n)},[]),_=n(n=>{t=n.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)",ZS="var(--_1sg44lm1)",ew="var(--_1sg44lm2)";function tw({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}=zm({blockSize:r,inlineSize:n},{transforms:{inlineSize:e=>ad(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:_}=QS();return d(c,{className:v("_1sg44lm4 _1sg44lm3 _1fragemvo _1fragem12k _1fragem12f _1fragem12r","inline"===e&&"_1sg44lm7",m&&"_1sg44lm8",g&&"_1sg44lm6",u),style:{...b({[ew]:t?.toString()??"",[XS]:`${f}ms`,[ZS]:"4000ms"}),...p},"aria-hidden":"true",onAnimationStart:y,onAnimationIteration:_,id:o,children:d(c,{className:v("_1sg44lma _1sg44lm9 _1fragemvo",u),style:p,children:i})})}const nw=new Map([["small","10ch"],["base","20ch"],["large","30ch"]]);function rw({children:e,delay:t,inlineSize:n,id:r,...a}){return d(af,{...a,children:d(tw,{delay:t,inlineSize:nw.get(n??"small"),id:r,children:e})})}function aw({width:e}){const{header:{logo:t}}=By(),{shop:n}=ie(),{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 iw=f(void 0);function ow({children:e,style:t,insetsRows:n}){const{rendered:a,rowsInset:i}=h(iw)??{},o=r(()=>({pending:t,pendingInsetsRows:n,rendered:a,rowsInset:i}),[t,n,a,i]);return d(iw.Provider,{value:o,children:e})}function sw({children:e,rowsInset:t}){const{pending:n}=h(iw)??{},a=r(()=>({pending:void 0,rendered:n,rowsInset:t}),[n,t]);return d(iw.Provider,{value:a,children:e})}function lw(){return h(iw)??{}}function cw(){return h(Pv)}function uw({currentDetour:e}){return"thankYou"===e?.type?"ORDER_STATUS1":"INFORMATION1"}function dw(e,t,n,r,a){return null==e?()=>!1:Ua(Dl(e.features,t),n,r,a)}const pw=f([]),mw=f({deactivatedExtensionIds:new Set,addDeactivatedExtension:()=>{}}),hw=f(null);function gw(e,t,...[n]){const{checkout:{extensibility:a}}=ie(),i=function(){const{deactivatedExtensionIds:e}=_w(),{currentPage:t,currentDetour:n}=Kl().value,{source:a,checkout:{negotiator:i}}=ie(),o=cw(),s=i.current.peek();return r(()=>function({page:e,negotiatedState:t,deactivatedExtensionIds:n,detour:r,placementReferences:a,sourceType:i}){const o=e&&Vl(e,t),s=e&&new Set([...Tn,...In]),l=r&&Ul(r),c=r&&function(e){const t=wv.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;
2if((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(hw),s=cw();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 fw(e,...[t]){const{checkout:{extensibility:n},shop:a}=ie(),o=a.hasFlagEnabled(qa),s=cw(),l=i([]),c=h(pw),u=gw([...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 yw(e,t){const r=Pw();return n(n=>{const[a]=e;if(!a)return Promise.resolve(void 0);const i=r.get(a,t);return Promise.resolve(i.run(n))},[r,e,t])}function vw(e,t){const{checkout:{extensibility:n}}=ie(),a=i([]),o=gw([...t,...h(pw)],e),s=r(()=>o.map(e=>Ha("uiExtension",e)),[o]);return n.ui.required.value&&!n.ui.enabled.value?a.current:s}function _w(){return h(mw)}const bw=f({get:()=>{},findAll:()=>[],blockingExtensions:P(()=>[])});function Pw(){return h(bw)}function kw({visibleTargets:e,children:t}){const n=r(()=>new Set(e),[e]);return d(hw.Provider,{value:n,children:t})}function Sw(e){return Array.from(e.labels||[]).map(e=>e.textContent).join("")}function ww(e){return e instanceof HTMLInputElement&&("checkbox"===e.type||"radio"===e.type)?e.checked.toString():e.value}function Cw(e){if(e.target instanceof HTMLInputElement||e.target instanceof HTMLSelectElement){try{if(e.target.closest("*:-webkit-autofill")===e.target)return"native"}catch{}if(!e.isTrusted)return e.target?.id?.startsWith("autofill_")?"honeypot":"other"}}const Ew={screenX:0,screenY:0,pageX:0,pageY:0,offsetX:0,offsetY:0,movementX:0,movementY:0,clientX:0,clientY:0},xw=Object.keys(Ew),Iw=f(null);function Aw(){const e=h(Iw);return n(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 Tw({section:e,children:t}){if("undefined"==typeof window)return d("div",{children:t});const n=tg(),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}=Lw(r,e,o);i&&n("dom_input_focused",{element:a,timestamp:new Date})}return rg(a,e=>l({target:e})),d(Iw.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}=Lw(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}=Lw(s??r,e,o);c&&n("dom_clicked",{element:l,...Ew,...nt(t.nativeEvent,xw),timestamp:new Date})},onChangeCapture:function(t){const r=t.target?.closest("a, button, input, select");if(!r)return;const{element:a,shouldCaptureEvent:i}=Lw(r,e,o);i&&n("dom_input_changed",{element:a,timestamp:new Date})},children:t})})}function Lw(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=ww(e);else{const t=Rw(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 Rw(e,t){if(null!==e&&null!==t)return t.has(e)?t.get(e):Rw(e.parentElement,t)}function Nw({section:e,children:t}){if("undefined"==typeof window)return d("div",{children:t});const{checkout:{identity:n},router:r,shopPay:a}=ie(),o=r.currentUrl.value,{currentFocus:s}=Kl().value,l=tg(),c=vg(),u=ag(),p=i(null),m=i(new WeakMap),h=Ya(o,{isShopPayActive:"shopPay"===n.current.value,shopPay:a});function g(t,{recoveredAutofocus:n=!1}={}){const r=s.peek();s.value=e,!n&&(t.target instanceof HTMLInputElement||t.target instanceof HTMLSelectElement)&&m.current.set(t.target,ww(t.target)),!n&&t.target instanceof HTMLInputElement&&"email"!==t.target.name&&u(h),r!==e&&(l("sectionInteraction",{section:e,timestamp:new Date}),c({type:"section_interaction",section:e}))}return rg(p,e=>g({target:e},{recoveredAutofocus:!0})),d("div",{ref:p,onFocusCapture:g,onBlurCapture:function(t){if(t.target instanceof HTMLInputElement||t.target instanceof HTMLSelectElement){const n=m.current.get(t.target),r=ww(t.target);m.current.delete(t.target),u(h),n!==r&&function(t){const{name:n,tagName:r,type:a}=t,i=Sw(t);l("change",{element:{...i&&{label:i},...n&&{name:n},tagName:r,type:a,value:ww(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;u(h),l("click",{element:{tagName:t,textContent:o??void 0},section:e,timestamp:new Date})}},onKeyUpCapture:function(e){e.target instanceof HTMLInputElement&&u(h)},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=Sw(t.target);0===o.length&&(o=n);const s=Cw(t);s&&l("autofill",{source:s,element:{...o&&{label:o},...r&&{name:r},tagName:a,type:i,value:ww(t.target)},timestamp:new Date,section:e})}},children:t})}function Mw(e,t){const n=ie().checkout.configuration.layout.isOnePage.value,r=fw("Checkout::Dynamic::Render","ORDER_SUMMARY1"),a=fw("Checkout::Dynamic::Render","ORDER_SUMMARY2"),i=fw("Checkout::Dynamic::Render","ORDER_SUMMARY3"),o=fw("Checkout::Dynamic::Render","ORDER_SUMMARY4"),s=fw("Checkout::CartLines::RenderAfter"),l=fw("Checkout::CartLineDetails::RenderAfter"),c=fw("Checkout::Reductions::RenderBefore"),u=fw("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 Dw="checkout-main",zw="checkout-main-header",Ow="checkout-pay-button",Bw="checkout-review-heading",Fw=re("OrderSummaryContext");function Vw(){return ae(Fw)}const Uw=({children:e})=>{const t=m(!1),a=n(e=>{t.value=e},[t]),i=r(()=>({open:t,setOpen:a}),[t,a]);return d(Fw.Provider,{value:i,children:e})};function qw(){const{checkout:e,router:n}=ie();return t(()=>e.thankYouEntrance.isRevealing.value&&n.currentUrlMatches("/thank-you"))}const jw={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-hasBackgroun
2dImage":"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"},Hw="announcement_box",$w="announcement_content";function Yw({children:e,onClose:t,onAfterCollapse:r,onAfterExpand:o,onExpand:l,onCollapse:c,open:u=!1,expanded:p=!1}){const{i18n:m}=ie(),[h,g]=s(!1),f=i(null),y=i(null),_=Pd(p,"base"),b=Pd(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=Ja(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 P=n(()=>{p?c?.():l?.()},[p,c,l]);a(()=>{"entered"===_?o?.():"exited"===_&&r?.()},[o,r,_]);const k=Gw(),{environment:{isCheckoutEditor:S},announcement:{colorScheme:w}}=By(),C=k[0],E=S?C?.publicIdentifier:void 0,x=S&&k.length>0;return DS(e)?d("section",{id:Hw,className:v(jw.Announcement,u&&jw["Announcement-opened"],h&&jw["Announcement-hasOverflow"],p&&jw["Announcement-expanded"],jw[H("Announcement-expandedTransition",_)],jw[H("Announcement-openTransition",b)],x&&jw["Announcement-hasActiveInspector"]),ref:f,children:d("div",{className:v(jw.AnnouncementContainer,Se({colorLayer:"base",colorScheme:w,backgroundColor:"baseSpecified"})),"data-inspector-id":E,"data-inspector-box":E?"content":void 0,children:[!p&&d("button",{className:jw.AnnouncementOverlay,onClick:e=>{e.preventDefault(),e.stopPropagation(),l?.()},"aria-label":m.translate("thank_you.announcement.expand"),"aria-expanded":!1,"aria-controls":$w,type:"button"}),d("div",{className:jw.AnnouncementActionButtons,children:[d("button",{id:"announcement_action_expand_collapse_buttons",className:jw.AnnouncementExpandCollapseButton,onClick:P,"aria-label":p?m.translate("thank_you.announcement.collapse"):m.translate("thank_you.announcement.expand"),"aria-expanded":p,"aria-controls":$w,type:"button",children:d(Xm,{type:p?"chevron-up":"chevron-down",size:"base"})}),d("button",{className:jw.AnnouncementCloseButton,onClick:()=>t?.({source:"host"}),"aria-controls":Hw,"aria-expanded":u,"aria-label":m.translate("thank_you.announcement.close"),type:"button",children:d(Xm,{type:"x",size:"base"})})]}),d("div",{id:$w,className:jw.AnnouncementContent,ref:y,"aria-live":"polite","aria-atomic":"true",children:e})]})}):null}function Ww(){}function Gw(){const{environment:{hasTYPAnnouncementExtensions:e}}=By(),t=function(e){return void 0!==e?()=>[]:()=>{const e=fw("purchase.thank-you.announcement.render");return Ka(e,"uiExtension").map(Qa)}}(e);return t()}const Jw={ThankYouInterstitialShell:"szW4X",ThankYouInterstitialOverlay:"sMSRq",ThankYouInterstitialHeader:"_3Ebqn",ThankYouEntranceDisclosure:"F6Nrx",ThankYouEntranceOrderSummary:"j1xD4",ThankYouEntranceFooter:"RDtb7",ThankYouEntrance:"ZXaI9",ThankYouEntranceStatus:"sEWAT",ThankYouEntranceHeading:"DTABr",ThankYouEntranceCards:"kBVzA",ThankYouEntranceActions:"qgQOk",ThankYouEntranceBeat:"SBffw"},Kw={none:"0",...ye.spacing},Qw={base:"solid",dashed:"dashed",dotted:"dotted"},Xw="disclosure_details";function Zw({banner:e,announcement:t,header:r,buyerJourney:i,disclosure:o,disclosureOrderSummary:l,footer:c,main:u,orderSummary:p,blockSize:m,minMobileViewportSize:h=!1,disclosureId:g=Xw,isDisclosureInteractive:f=!0,mainContentId:y=Dw}){const _=By(),{checkout:{configuration:b,checkoutExit:P},embed:k,router:S}=ie(),w=b.visibility.showAside,C=Boolean(k?.isFlagshipPartner),E=pr(k?.embedder),x=E&&b.isUniversalCheckoutFinalizer&&"/thank-you"===S.currentUrl.value.normalizedPath,I=fw("Checkout::Dynamic::Render","ORDER_SUMMARY4").length>0,A=E&&I,T=C&&!1===_.header.divided,L=_.header.position??"inline",R=_C(),N=qw(),{open:M,expanded:D,onAfterCollapse:z,onAfterExpand:O,onClose:B,onExpand:F,onCollapse:V}=function(){const e=By(),t=Oy(),r=Fv(),i=function(){const{environment:{hasTYPAnnouncementExtensions:e}}=By();return function(e){return void 0!==e?()=>Ww:()=>{const e=Gw(),t=tg();if(0===e.length)return Ww;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=n(({source:e}={})=>{const{announcement:n}=t.configuration;
2"dismissed"!==n.visibility&&"hidden"!==n.visibility&&(i("host"===e?"announcementDismissedFromHost":"announcementDismissedFromExtension"),r.emit("announcementClosed"),t.set("announcement",{...t.configuration.announcement,visibility:"dismissed"}))},[t,r,i]),p=n(()=>{r.emit("announcementAfterCollapsed")},[r]),m=n(()=>{r.emit("announcementAfterExpanded")},[r]),h=n(()=>{l(!0),i("announcementExpanded"),r.emit("announcementExpanded")},[i,r]),g=n(()=>{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}}(),U=l?d(ow,{style:_.orderSummary.section,children:l}):void 0;return d("div",{className:v(jw.Shell,Jw.ThankYouInterstitialShell,P.isExiting.value&&jw["Shell-exiting"],w&&jw["Shell-layoutAside"],"fill"===_.main.inlineSize&&jw["Config-Main-inlineSizeFill"],"fill"===_.orderSummary.inlineSize&&jw["Config-OrderSummary-inlineSizeFill"],jw[H("Config-Header-position",L)],_.footer.position&&jw[H("Config-Footer-position",_.footer.position)],_.environment.isOnePageCheckout&&jw["Shell-variantOnePageCheckout"],E&&jw["Shell-embeddedUc"],x&&jw["Shell-embeddedUcMainPadding"],A&&jw["Shell-embeddedUcHasOrderSummary4Extensions"],m&&jw[H("Shell-blockSize",m)],h&&jw["Shell-minMobileViewportSize"],DS(t)&&jw["Shell-hasAnnouncement"],M&&jw["Shell-announcementOpen"]),style:{...uC("content",_.content),...pC("content",_.content),...mC("main",_.main),...hC("main",_.main),...mC("order-summary",_.orderSummary),...hC("order-summary",_.orderSummary),...gC("order-summary",_.orderSummary),...mC("header",_.header),...gC("header",{backgroundImage:_.header.banner?.image}),...hC("header",_.header),...T?bC:{},...mC("footer",_.footer),...hC("footer",_.footer),...fC("footer",_.footer),...mC("buyer-journey",_.buyerJourney),...hC("buyer-journey",_.buyerJourney),...mC("announcement",_.announcement)},children:[d(eC,{}),e?d("div",{className:jw.Banner,children:e}):null,t?d(Yw,{open:M,expanded:D,onAfterExpand:O,onAfterCollapse:z,onClose:B,onExpand:F,onCollapse:V,children:t}):null,d(tC,{position:"start",children:[r,"header"===_.buyerJourney.position&&d(nC,{children:i})]}),d(rC,{id:g,isInteractive:f,details:U,children:o}),d(aC,{children:[d(oC,{children:[d(tC,{position:"inline",children:[r,"header"===_.buyerJourney.position&&d(nC,{children:i})]}),d(iC,{children:["inline"===_.buyerJourney.position&&d(nC,{children:i}),d(ow,{style:_.main.section,children:d("main",{className:v(jw.MainContentPrimary,R&&"F3Ebx"),id:y,children:u})}),"inline"===_.footer.position&&d(lC,{children:c})]})]}),d(sC,{children:[d(tC,{position:"inlineSecondary",children:[r,"header"===_.buyerJourney.position&&d(nC,{children:i})]}),d(iC,{children:d(ow,{style:_.orderSummary.section,children:d("aside",{className:v(jw.OrderSummaryContentPrimary,R&&"OcTba",N.value&&Jw.ThankYouEntranceOrderSummary),children:d(Nw,{section:"summary",children:d(Tw,{section:"summary",children:p})})})})})]})]}),"end"===_.footer.position&&d(lC,{children:c})]})}function eC(){const{checkout:e}=ie(),{main:{colorScheme:t="scheme1"}={}}=By();return e.checkoutExit.isExiting.value?d("div",{className:v("Vytfl",Se({colorLayer:"base",colorScheme:t,backgroundColor:"baseSpecified"})),"aria-hidden":"true"}):null}function tC({children:e,position:n}){const{header:{position:r="inline",container:a="fill",colorScheme:i,banner:o,background:s,divided:l}={}}=By(),c=n??r,u=function(){const{checkout:e,client:n,router:r}=ie(),a=Vh(),i=Mg(),o=Fl(n.initialRequest.url.pathname).endsWith("/thank-you"),s=a&&!i&&!o;return t(()=>s&&"settled"!==e.thankYouEntrance.phase.value&&r.currentUrlMatches("/thank-you"))}(),p=_C();if(!DS(e))return null;const m=l??"start"===c;return d("header",{className:v(jw.Header,Jw.ThankYouInterstitialHeader,jw[H("Header-position",c)],jw[H("Header-container",a)],m&&jw["Header-divided"],o?.image&&jw["Header-hasBackgroun
2dImage"],u.value&&jw["Header-thankYouCovered"],p&&"inlineSecondary"===c&&"LRXpG","start"===c&&Se({backgroundColor:"subdued"===s?"subdued":"baseSpecified",colorLayer:"base",colorScheme:i})),"data-inspector-id":"header",children:d("div",{className:jw.HeaderContent,children:d(du,{children:d(Nw,{section:"header",children:d(Tw,{section:"header",children:e})})})})})}function nC({children:e}){const{buyerJourney:{position:t="inline",container:n="fill",visibility:r}={}}=By();return DS(e)&&"hidden"!==r?d("div",{className:v(jw.BuyerJourney,jw[H("BuyerJourney-position",t)],jw[H("BuyerJourney-container",n)]),children:d("div",{className:jw.BuyerJourneyContent,children:e})}):null}function rC({children:e,details:n,id:r=Xw,isInteractive:o}){const{header:{divided:l},orderSummary:{backgroundImage:c,colorScheme:u}={},main:{colorScheme:p="scheme1"},environment:{isCheckoutEditor:m},disclosure:{visibility:h}}=By(),g=rt(),f=qw(),{checkout:y}=ie(),_=l??!0,b=function(){const{environment:{hasOrderSummaryExtensions:e}}=By(),t=function(e){return void 0!==e?()=>e:()=>Mw("top").length>0}(e);return t()}(),{expanded:P,narrowedToInformationStep:k}=function(){const{environment:{shouldExpandOrderSummary:e}}=By(),n=function(e,n){return void 0!==n?()=>({expanded:n,narrowedToInformationStep:!1}):()=>{const n=function(){const e=T(Mw("top"));return t(()=>e.value.some(e=>{if("customField"===e.kind)return Qa(e).required.value;const t=Qa(e),n=t.behaviors.value;return n.blockProgress&&t.capabilities.blockProgress||n.alwaysReveal}))}(),r=function(){const{orderSummary:{defaultState:e}={}}=By(),{checkout:{configuration:{layout:{isOnePage:t}}}}=ie();return!t.value&&"EXPANDED"===e}(),a=function(){const e=Kl();return t(()=>{const{currentPage:t,currentDetour:n}=e.value;if(!n&&t)return"information"===t.id})}();return e&&r&&!n.value&&void 0!==a.value?{expanded:a.value,narrowedToInformationStep:!0}:{expanded:n.value||r,narrowedToInformationStep:!1}}}(function(){const{client:e}=ie(),t=e.unstable_getSerialization("experiments"),n=t?.find(e=>e.clientHandle===Wa)?.variant;return Object.values(Ga).find(e=>e===n)}()===Ga.Treatment,e);return n()}(),{open:S,setOpen:w}=Vw(),C=S.value||b&&m,[E,x]=s(),I=i(!1);a(()=>{x(I.current&&!P?"none":void 0),w(P)},[P,w]),a(()=>{I.current=k}),a(()=>{C&&w(!0)},[C,b,w]);const A=vC();if(!DS(e)||y.checkoutExit.isExiting.value||"hidden"===h||"hidden-only-checkout"===h&&!A)return null;const L=c?{backgroundImage:`url(${JSON.stringify(c)})`}:void 0,R=!o||S.value,N=Boolean(n)&&(g.value||R);return d("aside",{className:v(jw.Disclosure,_&&jw["Disclosure-divided"],Se({colorLayer:"base",colorScheme:p,backgroundColor:"baseSpecified"})),"data-inspector-id":"orderSummary",children:d(Nw,{section:"top_summary",children:d(Tw,{section:"top_summary",children:[o?d(qm,{className:v(jw.DisclosureButton,f.value&&Jw.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(jw.DisclosureButton,f.value&&Jw.ThankYouEntranceDisclosure),children:e}),N&&d(Sd,{open:R,id:r,duration:E,children:d("div",{className:v(jw.DisclosureDetails,f.value&&Jw.ThankYouEntranceDisclosure,Se({colorLayer:"base",colorScheme:u,backgroundColor:"baseSpecified"})),style:L,children:d("div",{className:jw.DisclosureDetailsContent,children:d(du,{children:d(yC,{children:n})})})})})]})})})}function aC({children:e}){const{content:{container:t="fill"}={}}=By();return DS(e)?d("div",{className:v(jw.Content,jw[H("Content-container",t)]),children:e}):null}function iC({children:e}){const{checkout:t}=ie();return t.checkoutExit.isExiting.value?null:d(y,{children:e})}function oC({children:e}){const{main:{colorScheme:t="scheme1",inlineSize:n,backgroundImage:a}={},content:{divider:{visibility:i}={}}}=By(),{client:o}=ie(),s=o.unstable_getSerialization("shop").enabledFlags.includes(Xa),l=r(()=>({current:t}),[t]);if(!DS(e))return null;const c=a?{backgroundImage:`url(${JSON.stringify(a)})`}:void 0;return d("div",{className:v(jw.Main,"fill"===n&&jw["Main-inlineSizeFill"],("visible"===i||!s&&void 0===i)&&jw["Main-divided"],Se({colorLayer:"base",colorScheme:t,backgroundColor:"baseSpecified"})),style:c,children:d("div",{className:jw.MainContent,children:d(Vp.Provider,{value:l,children:d(du,{children:e})})})})}function sC({children:e}){const{orderSummary:{colorScheme:t="scheme2",inlineSize:n,backgroundImage:a}={}}=By(),i=r(()=>({current:t}),[t]),o=_C();if(!DS(e))return null;const s=a?{backgroundImage:`url(${JSON.stringify(a)})`}:void 0;return d("div",{className:v(jw.OrderSummary,"fill"===n&&jw["OrderSummary-inlineSizeFill"],o&&"LCUka",Se({colorLayer:"base",colorScheme:t,backgroundColor:"baseSpecified"}
2)),style:s,"data-inspector-id":"orderSummary",children:d("div",{className:jw.OrderSummaryContent,children:d(Vp.Provider,{value:i,children:d(du,{children:e})})})})}function lC({children:e}){const{footer:{position:t="inline",container:n="fill",colorScheme:r,background:a,divided:i}={}}=By(),{checkout:o}=ie(),s=_C(),l=qw();if(o.checkoutExit.isExiting.value||!DS(e))return null;const c=i??"end"===t;return d("footer",{className:v(jw.Footer,jw[H("Footer-position",t)],jw[H("Footer-container",n)],c&&jw["Footer-divided"],s&&"qdIKq","end"===t&&Se({colorLayer:"base",colorScheme:r,backgroundColor:"subdued"===a?"subdued":"baseSpecified"})),"data-inspector-id":"footer",children:d("div",{className:v(jw.FooterContent,l.value&&Jw.ThankYouEntranceFooter),children:d(du,{children:d(Tw,{section:"footer",children:e})})})})}function cC(e){return t=>t?e[t]:void 0}function uC(e,{divider:{borderStyle:t}={}}={}){return t&&{[`--config-${e}-divider-border-style`]:cC(Qw)(t)}}const dC={none:"0px",...ye.borderWidth};function pC(e,{divider:{borderWidth:t}={}}={}){return t&&{[`--config-${e}-divider-border-width`]:cC(dC)(t)}}function mC(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`]:Pe(Number(t))}}function hC(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`]:cC(Kw)(n[0]),[`--config-${e}-padding-inline-end`]:cC(Kw)(n[1]),[`--config-${e}-padding-block-end`]:cC(Kw)(n[2]),[`--config-${e}-padding-inline-start`]:cC(Kw)(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`]:cC(Kw)(t),[`--config-${e}-padding-inline-end`]:cC(Kw)(t),[`--config-${e}-padding-block-end`]:cC(Kw)(t),[`--config-${e}-padding-inline-start`]:cC(Kw)(t),[`--config-${e}-padding`]:cC(Kw)(t)}}function gC(e,{backgroundImage:t}={}){return t&&{[`--config-${e}-background-image`]:`url(${JSON.stringify(t)})`}}function fC(e,{marginBlockStart:t}={}){return t&&{[`--config-${e}-margin-block-start`]:cC(Kw)(t)}}function yC({children:e}){const{environment:{isOnePageCheckout:t}}=By(),n=vC();return t&&!n?d(kw,{visibleTargets:["purchase.checkout.cart-line-item.render-after","purchase.checkout.reductions.render-before","purchase.checkout.reductions.render-after"],children:e}):d(y,{children:e})}function vC(){const{environment:{hasDetour:e}}=By(),t=function(e){return void 0!==e?()=>e:()=>{const{currentDetour:e}=Kl().value;return Boolean(e)}}(e);return t()}function _C(){const e=Vh(),t=vC();return e&&!t}const bC={"--x-shell-header-padding":`${cC(Kw)("large100")} ${cC(Kw)("large200")} ${cC(Kw)("none")} ${cC(Kw)("large200")}`,"--x-shell-main-padding-block-start":`var(--config-main-padding-block-start, ${cC(Kw)("large100")})`,"--x-shell-main-padding":`var(--config-main-padding-block-start, ${cC(Kw)("large100")}) var(--config-main-padding-inline-end, ${cC(Kw)("large200")}) var(--config-main-padding-block-end, ${cC(Kw)("large200")}) var(--config-main-padding-inline-start, ${cC(Kw)("large200")})`},PC={small:"10ch",base:"20ch",large:"30ch",full:"100%"},kC=Oc("wallet-transition-disclosure-"),SC=Oc("wallet-transition-main-content-");function wC({layer:e="foreground"}={}){const{embed:t,i18n:n}=ie(),r=!t,a=Bc(void 0,kC),i=Bc(void 0,SC),o=d("div",{className:"A5qhV "+("background"===e?"_4KRKW":""),role:"status","aria-label":n.translate("general.loading"),style:b({[ye.global.borderRadius]:"12px"}),children:d(Uw,{children:d(Zw,{mainContentId:i,disclosureId:a,isDisclosureInteractive:!1,header:r?d(CC,{}):void 0,disclosure:d(TC,{}),main:d(AC,{}),orderSummary:d(LC,{})})})});return d(Gc,{children:o})}function CC(){const{header:{alignment:e="start",logo:t}={}}=By(),{shop:n}=ie(),r=t?.image?d(aw,{width:t.maxWidth}):d(Kk,{level:1,accessibilityRole:"presentation",display:"inline",children:n.name});
2return d(Ym,{gridTemplateColumns:"1fr",inlineSize:"100%",justifyItems:e,children:r})}function EC({inlineSize:e="base",size:t="small"}){return d(rw,{size:t,inlineSize:e})}function xC(){return d(af,{type:"small",children:d(tw,{inlineSize:PC.full})})}function IC(){return d(gf,{rowGap:"base",children:[d(EC,{size:"large",inlineSize:"small"}),d(gf,{rowGap:"small-300",children:[d(xC,{}),d(xC,{})]})]})}function AC(){return d(gf,{rowGap:"large-200",children:[d(IC,{}),d(OS,{}),d(IC,{}),d(OS,{}),d(IC,{})]})}function TC(){return d(gf,{direction:"inline",justifyContent:"space-between",alignItems:"center",padding:"large-100 base",minBlockSize:"63px",inlineSize:"100%",children:[d(EC,{inlineSize:"base"}),d(EC,{size:"large",inlineSize:"small"})]})}function LC(){const{i18n:e}=ie(),{merchandiseThumbnail:t,global:n}=Vm(),r=t.cornerRadius??n.cornerRadius??"base",a="fullyRounded"===r?"large":r,i=`${JS("base").inlineSize}px`;return d(gf,{rowGap:"large-200",children:[d(af,{accessibilityVisibility:"exclusive",children:e.translate("order_summary.shopping_cart_label")}),d(Ym,{gridTemplateColumns:"auto minmax(0, 1fr) auto",gap:"base",alignItems:"center",children:[d(Qg,{borderRadius:a,overflow:"hidden",children:d(tw,{contentDisplay:"block",inlineSize:i,aspectRatio:1})}),d(gf,{rowGap:"small-500",children:[d(EC,{inlineSize:"base"}),d(EC,{inlineSize:"small"})]}),d(EC,{inlineSize:"small"})]}),d(RC,{})]})}function RC(){return d(gf,{rowGap:"small-100",children:[[0,1,2].map(e=>d(gf,{direction:"inline",justifyContent:"space-between",children:[d(EC,{inlineSize:"small"}),d(EC,{inlineSize:"small"})]},e)),d(gf,{direction:"inline",justifyContent:"space-between",children:[d(EC,{size:"large",inlineSize:"small"}),d(EC,{size:"large",inlineSize:"small"})]})]})}function NC(){const{checkout:e,observability:n}=ie(),r=function(){const{checkout:{wallets:e}}=ie(),n=function(){const{shop:e,checkout:n}=ie(),r=e.hasFlagEnabled(dn),{inMemoryApplePayParts:{subscriptionReviewTransition:a}}=un();return t(()=>void 0!==a.value&&Tl({applePayThreePageVaultedReviewEnabled:r,isOnePageCheckout:n.configuration.layout.isOnePage.value}))}();return t(()=>{const t=void 0!==e.activeSession.value?.wallet&&"APPLE_PAY"!==e.activeSession.value.wallet&&Boolean(e.isDeceleratingSignal?.value);return n.value&&!t})}().value,o=Boolean(e.wallets.isDeceleratingSignal?.value),s=e.isCheckoutLayoutForcedToOnePage.value,l=Wk(),{payNowButtonElement:c,payNowButtonSectionMounted:u}=rk(),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};n.counter({name:"wallet_3page_vaulted_review_landed",value:1,attributes:e}),n.log("wallet_3page_vaulted_review_landed","Buyer reached the forced one-page wallet vaulted review",e)},[m,s,p,n]),r||!o?null:d(wC,{})}const MC=w({suspenseName:"review-block",id:()=>"ReviewBlock",displayName:"ReviewBlock",load:()=>C(()=>ll(()=>import("./9d12dea3.BnxcbyZh.js"),__vite__mapDeps([89,1,2,3,4,5,90,30,31,32,91,69,15,70,52,53,51,54,35,36,92,93,94,95,96,13,97,98,99,100,101,102,103,104,105,38,39,106,107,108,109,110,10,14,16])))}),DC=w({suspenseName:"information",displayName:"Information",load:()=>C(()=>ll(()=>import("./17324a0b.B5yU3OQE.js"),__vite__mapDeps([111,1,69,91,2,3,4,5,15,70,52,53,51,31,54,35,36,30,32,92,93,112,113,114,115,116,117,50,118,95,119,120,121,122,123,72,6,78,124,55,125,126,127,128,129,57,11,16,104,130,131,132,133,134,135,136,137,138,110,10,13,14])))}),zC=w({displayName:"NoAddressLocation",load:()=>C(()=>ll(async()=>{const{noAddressLocationPages:e}=await(import("./4421b714.Dh884clZ.js"));return{noAddressLocationPages:e}},__vite__mapDeps([139,1,140,141,142,133,134,135,2,3,4,5,136,122,10,13,14,15,16,143])).then(({noAddressLocationPages:e})=>({default:e.NoAddressLocation})))}),OC=w({displayName:"NoAddressLocationFullDetour",load:()=>C(()=>ll(async()=>{const{noAddressLocationPages:e}=await(import("./4421b714.Dh884clZ.js"));return{noAddressLocationPages:e}},__vite__mapDeps([139,1,140,141,142,133,134,135,2,3,4,5,136,122,10,13,14,15,16,143])).then(({noAddressLocationPages:e})=>({default:e.NoAddressLocationFullDetour})))}),BC=w({displayName:"NotFound",load:()=>ll(()=>import("./60d61386.D7LWPn_C.js"),__vite__mapDeps([144,1,2,3,4,5,82,10,13,14,15,16]))}
2),FC=w({displayName:"OffsitePaymentFailed",load:()=>ll(()=>import("./656fad11.CEjbwnlb.js"),__vite__mapDeps([145,1,141,142,146,147,135,2,3,4,5,136,122,10,13,14,15,16]))}),VC=w({suspenseName:"one-page",displayName:"OnePage",load:()=>ll(()=>import("./f8706cb6.PbccX-7u.js").then(e=>e.o),__vite__mapDeps([148,3,1,4,2,5,113,69,114,115,116,117,50,31,118,91,15,70,52,53,51,54,35,36,30,32,92,93,95,119,120,121,122,123,72,6,78,124,55,125,126,127,128,129,57,11,16,104,130,131,132,149,42,43,150,151,152,153,13,154,82,81,155,156,157,38,39,105,106,158,14,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,94,96,97,98,99,100,101,177,178,58,179,180,181,182,183,184,185,186,187,188,189]))}),UC=w({suspenseName:"one-page-review",displayName:"OnePageReview",load:()=>C(()=>ll(()=>import("./9e3968a8.OliBXJQv.js"),__vite__mapDeps([190,1,2,3,4,5,112,105,31,92,38,39,106,149,42,43,150,151,152,121,122,153,13,15,154,82,114,115,81,155,107,94,95,96,97,98,99,100,101,108,191,192,72,73,18,193,194,195,48,49,62,120,123,196,197,198,161,199,9,119,200,102,103,165,166,167,104,70,201,130,131,171,10,14,16,202,109])))});class qC extends Error{constructor(){super(...arguments),this.name="CardFieldsError"}}class jC extends Error{constructor(e,t){super(e,t),this.name="CardFieldsLoadError",this.diagnostics=t?.diagnostics}}class HC extends Error{constructor(){super(...arguments),this.name="CardFieldsSetupError"}}class $C extends Error{constructor(){super(...arguments),this.name="CardFieldsScriptTagOnErrorError"}}class YC extends Error{constructor(){super(...arguments),this.name="CardFieldsAppendChildError"}}class WC extends Error{constructor(){super(...arguments),this.name="CardFieldsExecutionError"}}class GC extends Error{constructor(){super(...arguments),this.name="IFrameNotFoundError"}}class JC 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 KC=class extends Error{constructor(){super(...arguments),this.name="CardFieldsOperationalError"}};KC.hostedFieldsName="CardFieldsError";let QC=KC;function XC({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 WC);n()},0)},t&&(a.integrity=t),a.crossOrigin="anonymous",a.onerror=t=>{let n;n=t instanceof Event?new $C(`Event type: ${t.type}. ${ZC(e)}`):new $C("string"==typeof t?`String error: ${t}. ${ZC(e)}`:`unknown error type. ${ZC(e)}`),document.head.removeChild(a),r(n)};try{document.head.appendChild(a)}catch(i){r(new YC("Failed to append child.",{cause:i}))}})}return(n?C(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 jC(`Failed to load CardFields SDK. ${ZC(e)}`,{cause:n,diagnostics:a})})}function ZC(e){return`Script src: ${e} . Internet connection boolean: ${"undefined"==typeof navigator?"navigator not available":navigator.onLine}`}function eE(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var tE,nE;const rE=eE(nE?tE:(nE=1,tE={SDK_INTEGRITY:"sha256-fu1lH6QOfb8dybbxZiwh4q3DLqiMxbI+Knm2GsdIxqc=",SDK_URL:"https://checkout.pci.shopifyinc.com/build/09497de/card_fields.js"}));function aE(){const{environment:e}=ie(),t=e.services.hostedFields.url;return t===rE.SDK_URL?{source:t,integrity:rE.SDK_INTEGRITY}:{source:t}}const iE=w({suspenseName:"payment",displayName:"Payment",load:()=>C(()=>ll(()=>import("./74122478.2SbWy0c1.js"),__vite__mapDeps([203,1,156,3,4,2,5,157,38,39,105,31,92,106,
2126,30,32,127,158,14,159,160,161,162,150,151,152,163,164,204,7,8,205,118,91,69,15,70,52,53,51,54,35,36,93,206,165,166,167,119,207,138,176,208,104,170,198,209,210,75,211,187,90,112,125,133,134,212,192,121,122,153,72,73,18,193,194,135,136,213,137,214,215,186,184,216,10,13,16]))),usePrefetch(){const e=function(){const e=aE();return n(()=>{XC(e)},[e])}();return n(()=>{e()},[e])}}),oE=w({displayName:"PostPurchase",load:()=>ll(()=>import("./896e8dde.CQJy4dqd.js"),__vite__mapDeps([217,1,2,3,4,5,122,187,218,219,53,22,11,16,135,136,137,35,36,24,64,67,68,10,13,14,15,220]))}),sE=w({displayName:"Processing",load:()=>C(()=>ll(()=>import("./090b00f0.cUuumSvd.js"),__vite__mapDeps([221,1,146,147,2,3,4,5,137,122,186,154,18,10,13,14,15,16,222])))}),lE=w({suspenseName:"review",displayName:"Review",load:()=>C(()=>ll(()=>import("./b120ac11.qNyvQcQH.js"),__vite__mapDeps([223,1,2,3,4,5,112,125,133,134,212,192,121,122,153,72,73,18,193,194,104,70,135,136,213,137,10,13,14,15,16])))}),cE=w({suspenseName:"shipping",displayName:"Shipping",load:()=>C(()=>ll(()=>import("./289b89e4.C_njo7ZS.js"),__vite__mapDeps([224,1,130,131,177,30,31,3,4,2,5,32,126,92,127,128,178,58,179,96,13,97,98,180,69,51,52,53,54,181,182,183,184,185,133,134,135,136,213,137,122,95,10,14,15,16])))}),uE=w({displayName:"ShopPayLoginLoader",load:()=>ll(()=>import("./9011490c.N3S78_D5.js"),__vite__mapDeps([225,1,2,3,4,5,226,168,162,165,166,167,227,116,117,114,115,97,82,201,130,131,48,49,171,10,13,14,15,16,202,122,228]))}),dE=w({displayName:"StockProblems",load:()=>C(()=>ll(()=>import("./0cd5b134.ruuUh1pL.js"),__vite__mapDeps([229,1,140,141,142,133,134,135,2,3,4,5,136,230,137,122,231,10,13,14,15,16])))}),pE=w({displayName:"StockProblemsModal",load:()=>C(()=>ll(()=>import("./a9ba8e86.PcZlLY23.js"),__vite__mapDeps([232,1,2,3,4,5,231,230,137,122,188,10,13,14,15,16])))}),mE=Dh("ThankYou"),hE=w({suspenseName:"thank-you",displayName:"ThankYou",useError:function(e){const{client:t,observability:n,graphql:{coreGraphql:r}}=ie(),a=nc(),o=a.value?.id,s=a.value?.orderStatusPageUrl,c=t.unstable_getSerialization("sessionToken"),u=i(!1);mE(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 B(nr),i)return;let e;try{const{data:t}=await r.staticQuery(nb,{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:()=>C(()=>ll(()=>import("./909cc5d6.IAUlDmbN.js"),__vite__mapDeps([233,1,2,3,4,5,210,45,133,134,104,70,135,136,137,122,99,97,96,13,98,179,38,39,28,29,92,166,124,123,55,114,115,51,52,53,31,54,234,205,60,105,106,102,103,235,236,237,238,140,141,142,193,35,36,119,239,240,241,178,58,196,197,16,130,131,171,10,14,15,242])),{maxAttempts:1})}),gE=w({displayName:"Throttle",load:()=>C(()=>ll(()=>import("./01f1d1bd.LFyw4KSz.js"),__vite__mapDeps([243,1,2,3,4,5,104,70,136,122,80,13,10,14,15,16,244])))}),fE="URL not specified for Chat: Please configure your extension to include extensions.targeting.preloads.chat",yE="URL specified for Chat: The URL specified in extensions.targeting.preloads.chat must not be the same origin as the checkout host.",vE="Scope not granted for Chat: Please request access in Partners dashboard to Chat in checkout extensions",_E="224px",bE="72px",PE=72,kE="415px",SE="700px",wE="100dvi",CE="93dvb",EE=new Set(["Chat","s-chat"]);var xE={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 _1tx8jg71
25 _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 IE({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,P=null==_?void 0:b({[xE.lineClampCount]:String(_)}),k=(!0===s?"yes":void 0)??(!1===s?"no":void 0),S="exclusive"===e?xE.accessibilityVisibilityVariant[e]:v(xE.Paragraph,"small"!==m&&r&&xE.sizeVariant[r],h&&xE.toneVariant[h],n&&("auto"===h||"neutral"===h)&&xE.colorVariant[n],i&&"auto"!==i&&xE.textAlignVariant[i],o&&"wrap"!==o&&xE.textWrapVariant[o],l&&xE.kerningVariant[l],c&&xE.letterCaseVariant[c],u&&xE.fontsVariant[u],p&&xE.decorationVariant[p],null!=_&&xE.lineClamp,xE.typeVariant[m],{notranslate:!1===s});return d(vd.Provider,{value:!0,children:d("p",{"aria-hidden":"hidden"===e||void 0,className:S,id:a,translate:k,dir:g,lang:f,style:P,children:t})})}function AE({email:e,phone:t,emailInputError:n,phoneInputError:r,hasViolations:a}){const i=!e&&!t,o=Boolean(n)||Boolean(r);return i||o||a}function TE(e){const t=e?.filter(({quantity:e})=>e>0)??[];return t.length>0&&t.every(({requiresShipping:e})=>!e)}function LE({isFlagshipPartner:e,hasError:t,hasOnlyDigitalItems:n}){return e&&!t&&!n}function RE({violations:e}){return t(()=>e.value.size>0)}const NE=re("VaultedSectionsContext");function ME(){const e=h(NE);return t(()=>e?e.value:{contact:!1,delivery:!1,payment:!1,billing:!1})}function DE(){const e=ME();return t(()=>e.value.contact&&e.value.delivery&&e.value.payment)}function zE(){const e=ME(),{checkout:n,embed:r,source:a}=ie(),{validation:{contactErrors:{emailInputError:o,phoneInputError:s}}}=n,{current:l}=n.identity,c=RE(gy(ei)),u=By(),d=Vm(),p=T(u.main.section),m=T(d.vaulted),h=i(!1);return t(()=>{const t=ti(p.value),i=ti(m.value),{contact:u,delivery:d,payment:g}=e.value,f=ni({isContactVaulted:u,configuration:n.configuration,identity:n.identity,embed:r}),y=(()=>{if("sdkCartHints"!==l.value)return h.current=!1,f;if(!f)return h.current=!1,!1;const e=n.proposal.negotiated.fields.merchandiseLines.value?.lines;return LE({isFlagshipPartner:r?.isFlagshipPartner??!1,hasError:AE({email:n.proposal.proposed.email.value,phone:n.proposal.proposed.phone.value,emailInputError:o.value,phoneInputError:s.value,hasViolations:c.value}),hasOnlyDigitalItems:TE(e)})?h.current:(h.current=!0,!0)})(),v=!Fn(a)&&ri({checkout:n}),_=d&&n.isShippingRequired.value;return!!(y||_||g||v)&&(t||i)})}function OE(){const{embed:e,shop:t,checkout:n,router:r,i18n:a}=ie(),i=e?.interstitialPartnerDisplayName,{plan:o}=Kl().value,c=r.currentUrl.value.normalizedPath,u=oa({embedder:e?.embedder}),p=ME(),{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&&If(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||"noAddressLocation"===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(Ym,{gridTemplateColumns:"auto 1fr",gap:"small",background:"subdued",borderWidth:"none none base none",padding:"base",children:[d(Xm,{type:"info"}),d(IE,{textWrap:"pretty",children:a.translate("merchant_redirect.partner_interstitial.account_source_banner",{shop_name:t.name,partner_name:i})})]}):null}const BE=w({id:()=>"AnnouncementRuntimeExtensions",displayName:"AnnouncementRuntimeExtensions",load:()=>ll(()=>import("./28ac86c0.Bqxr0lQy.js").then(e=>e.A),__vite__mapDeps([25,1,2,3,4,5,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,24,45,46,47,16,48,49,50,51,52,53,54,55,12,56]))});function FE(){const e=fw("purchase.thank-you.announcement.render");return r(()=>{const[t]=Ka(e,"uiExtension");return t?[t]:[]},[e])}const VE=/Version\/(\d+)\.(\d+)\sMobile\/\w+\sSafari/,UE=/Version\/(\d+)[\d.]*.*Safari/,qE=/Chrome\/|Edg(?:e|iOS|A)?\//,jE=/FBAN|FB_IAB|FBAV|Instagram/;function HE(){return jE.test(navigator.userAgent)}const $E=0,YE=1,WE=2,GE=4,JE=5,KE=new Map([["legacy",0],["block",1],["inline",2],["grid",3],["list",4],["grid-compact",5]]);function QE(e,t){return KE.get(e)===t}function XE(e){const t=KE.get(e);return 3===t||5===t}function ZE(e){return"string"==typeof e&&KE.has(e)}const ex=f(null);function tx(){return h(ex)}ex.displayName="ChoiceListContext";const nx=f(null);function rx(){return h(nx)||{}}function ax(){return rx().redesigned??!1}nx.displayName="ChoiceListStyleContext";const ix=f(void 0);function ox(e){return QE(e,1)||QE(e,5)}function sx(e){const t=h(Vu)?.redesignedChoiceLists??!1,n=h(ix);return t&&"base"!==n&&ox(e)?"redesigned":"base"}ix.displayName="ChoiceListPresentationOverrideContext";var lx={Actions:"u2pexth u2pextg _1fragem82 _1fragem9v _1fragemtq _1fragemrx _1fragem6t _1fragempu",ActionsScrollShadow:"u2pext1p",actionLayoutVariant:{inline:"u2pextk u2pexti _1fragemx8 _1fragembu",stacked:"u2pextl u2pextj _1fragemxc _1fragemcd"},Content:"u2pext13 u2pext12 _1fragemyn",contentPaddingVariant:{base:"u2pext1r u2pext1q _1fragemtq _1fragemrx",none:"u2pext1s"},CloseButton:"u2pext1n u2pext1m _1fragempa _1fragemr3 _1fragemnh _1fragemsw _1fragemwn _1fragem10x _1fragem5u _1fragem133 _1fragem12k _1fragem12p _1fragem12e _1fragem130",Footer:"u2pextr _1fragemyo",Header:"u2pext1c u2pext1b _1fragem64 _1fragembe _1fragem19",HeaderContent:"u2pext1j _1fragemyn _1fragemvo",headerContentPaddingVariant:{base:"u2pext1k",none:"u2pext1l"},headerPaddingVariant:{base:"u2pext1g u2pext1d _1fragemtq _1fragemrx",large:"u2pext1h u2pext1e _1fragemtq _1fragemrx",extraLarge:"u2pext1i u2pext1f _1fragemtq _1fragemrx"},IFrame:"u2pext15 u2pext14 _1fragemeg _1fragemdw _1fragemf0 _1fragemdc _1fragem5u",iframeBlockSizeVariant:{fill:"u2pext16",auto:"u2pext17"},iframePaddingVariant:{base:"u2pext19 u2pext18 _1fragemtq _1fragemrx _1fragempu",none:"u2pext1a"},Modal:"u2pextt u2pexts _1fragemup _1fragemv4 _1fragem64 _1fragem73 _1fragemzf _1fragem5p _1fragemve _1fragemxx _1fragemy5 _1fragem133 _1fragem12n _1fragem12d _1fragem12q",Overlay:"u2pextf u2pexte _1fragem108 _1fragem10n _1fragemzt _1fragem112 _1fragemwn _1fragem64 _1fragem1j _1fragem132 _1fragem11k _1fragem12l _1fragem12q _1fragem12f",requestedBlockSize:"var(--u2pextb)",availableBlockSize:"calc(100dvb - var(--u2pext7) - var(--u2pext9))",ScrollBox:"u2pextv u2pextu _1fragem6t _1fragemuk _1fragemv4",scrollBoxActionsVariant:{withActions:"u2pextw",noActions:"u2pextx"},scrollBoxPaddingVariant:{gap:"u2pextz u2pexty _1fragem8c _1fragema5",none:"u2pext10",blockStart:"u2pext11"},secondaryActionLayoutVariant:{inline:"u2pextp u2pextn _1fragemx8",stacked:"u2pextq u2pexto _1fragemxc"},SecondaryActions:"u2pextm _1fragem82 _1fragem9v _1fragem6t _1fragemyn",transitionVariant:{entered:"u2pext1",exit:"u2pext2",exiting:"u2pext3",enter:"u2pext4",entering:"u2pext5",exited:"u2pext6"},MobileSafari26BarTop:"u2pext1v u2pext1u u2pext1t _1fragem6y _1fragemwn _1fragem10n _1fragem112 _1fragem11z _1fragem132",MobileSafari26BarBottom:"u2pext1w u2pext1u u2pext1t _1fragem6y _1fragemwn _1fragem10n _1fragem112 _1fragem11z _1fragem132",ModalContentCrossFadeTarget:"u2pext0",overlayMobileSafari26:"u2pext1x"};const cx=Oc("Modal");function ux(e){const t=Bc(e.id,cx),n=Lu("modal");if(n){const{active:r,setActive:a}=n;
2n.setActivatorAttributes({"aria-haspopup":"dialog"}),n.attach("onClick",()=>{a(!0)});const i=()=>{a(!1),"function"==typeof e.onHide&&e.onHide()},{children:o}=e;return d(mx,{...e,id:t,onHide:i,open:r,children:DS(o)&&d(ku,{children:o})})}return d(mx,{...e,id:t})}const dx={"small-100":300,small:300,base:480,"large-100":640,large:640,max:960};function px(e){if("string"!=typeof e)return{};if(!e.endsWith("%"))return{[lx.requestedBlockSize]:e};const t=Number.parseFloat(e)/100;return{[lx.requestedBlockSize]:`calc(${lx.availableBlockSize} * ${t})`}}const mx=Dp(Ep(function({blocking:e,size:t="base",blockSize:r,open:o=!1,heading:l,source:c,iframeRef:u,onIframeLoad:p,iframeId:m,allow:g,accessibilityLabel:f,padding:_="base",primaryAction:P,secondaryActions:k,actionLayout:S="inline",footer:w,children:C,id:E,onAfterShow:x,onShow:I,closeButton:A="visible",dataTestIdForScrollableContent:T,...L}){const R=i(null),N=i(null),M=i(!1),D=h(Iu)?.openModalCount;a(()=>{if(o&&D)return D.value+=1,()=>{D.value=Math.max(0,D.value-1)}},[o,D]),o&&N.current!==o&&"function"==typeof I&&I(),N.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"===t?"100%":void 0),j=function(e){return e.endsWith("px")}(t)?t:`${dx[t]}px`,{className:H,style:$,styleElement:Y}=zm({blockSize:q,maxInlineSize:`@media (inline-size >= extraSmall) ${j}, none`}),W={...$,...b(px(kp(q)))},G=Pd(o,"slow"),[J,K]=s("");a(()=>{K(lx.transitionVariant[G])},[G]);const{isLocked:Q,lock:X,unlock:Z}=bf();a(()=>{o&&!Q&&X(),!o&&Q&&Z()},[Q,X,o,Z]),a(()=>{if("exited"===G&&(V(void 0),M.current&&("function"==typeof B&&B(),M.current=!1)),"entered"===G){if(E&&function(){const e=navigator.userAgent;if(qE.test(e))return!1;const t=e.match(UE);return!!t&&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||(M.current=!0)},[o]),a(()=>{const t=t=>{"Escape"!==t.key&&"Esc"!==t.key||e||!o||!R.current?.contains(document.activeElement)&&document.getElementById(Fc)?.contains(document.activeElement)||"function"==typeof O&&O()};return document.addEventListener("keydown",t,!1),()=>{document.removeEventListener("keydown",t,!1)}},[e,o,O]);const ee=n(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=n(e=>{e.target===e.currentTarget&&"function"==typeof O&&O()},[O]);if("exited"===G)return null;const ne=l&&!f?zp(E):void 0,re=Boolean(P||k),ae=function(){const e=navigator.userAgent.match(VE);return!!e&&"26"===e[1]}();return d(Gc,{children:d(ix.Provider,{value:void 0,children:[Y,d("div",{ref:R,className:v(lx.Overlay,J,ae&&lx.overlayMobileSafari26),onMouseDown:te,children:d(yf,{children:d("div",{id:E,className:v(lx.Modal,J,H),role:"dialog","aria-modal":!0,style:W,"aria-label":f,"aria-labelledby":ne,children:[c?d(y,{children:d(du,{level:2,children:[d(hx,{id:E,hideCloseButton:z||e,onHide:O,heading:l}),d(vx,{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(lx.ScrollBox,o&&lx.ModalContentCrossFadeTarget,lx.scrollBoxPaddingVariant["base"===_?l?"gap":"blockStart":"none"],lx.scrollBoxActionsVariant[re||w?"withActions":"noActions"]),"data-testid":T,children:[d(du,{level:2,children:[d(hx,{id:E,hideCloseButton:z||e,onHide:O,padding:_,heading:l}),d(yx,{padding:_,children:C})]}),re&&d("div",{className:lx.ActionsScrollShadow})]}),w&&d("div",{className:lx.Footer,children:d(fd.Provider,{value:!1,children:d(ku,{children:w})})}),re&&d(gx,{primaryAction:P,secondaryActions:k,actionLayout:S})]})})}),ae&&d(y,{children:[d("div",{className:v(lx.MobileSafari26BarTop,J)}),d("div",{className:v(lx.MobileSafari26BarBottom,J)})]})]})})},{overlayType:"modal"}));function hx({hideCloseButton:e,id:t,onHide:n,padding:r,heading:a}){const i="string"==typeof a?d(Kk,{level:1,children:a}):a;return!i&&e?null:d("div",{className:v(lx.Header,lx.headerPaddingVariant[i?"base":"base"===r?"large":"extraLarge"]),children:[i&&d("div",{id:zp(t),className:v(lx.HeaderContent,lx.headerContentPaddingVariant[e?"none":"base"]),children:i}),!e&&d(fx,{onHide:n})]})}function gx({primaryAction:e,secondaryActions:t,actionLayout:n="inline"}){return d(ku,{children:d("div",{className:v(lx.Actions,lx.actionLayoutVariant[n]),children:[("inline"===n||DS(t))&&d("div",{className:v(lx.SecondaryActions,lx.secondaryActionLayoutVariant[n]),children:t}),e]})})}function fx({onHide:e}){const t=Hu();return d("button",{type:"button",className:lx.CloseButton,onClick:()=>{"function"==typeof e&&e()},"aria-label":t("closeModal")||"Close",children:d(Xm,{type:"x",size:"base"})})}function yx({children:e,padding:t="base"}){return DS(e)&&d("div",{className:v(lx.Content,lx.contentPaddingVariant[t]),children:d(fd.Provider,{value:!1,children:d(sw,{children:e})})})}function vx({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(lx.IFrame,lx.iframeBlockSizeVariant[s?"fill":"auto"],lx.iframePaddingVariant[c]),ref:t,onLoad:l,id:n,...o&&o>0&&{style:{height:o}},...u?{allow:u}:void 0})}function _x({submitButtonAppearance:e,submitText:t,cancelText:n,loading:r,disabled:a,handleSubmit:i,handleCancel:o}){const s=Boolean(n),l=Boolean(t);return d(Ym,{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 bx=["deliveryNext","taxes","landedCostDetails","remoteTaxDetails","total"];var Px=(e=>(e.Truck="truck",e.PackageDelivery="package-delivery",e.Store="store",e.Location="location",e))(Px||{});const kx=re("DeliveryMethodsContext"),Sx=f(void 0);function wx(){return ae(kx)}function Cx(){return h(Sx)}function Ex(e){const n=h(kx),r=bx.includes(e);return t(()=>r&&(n?.initialReconciliationPending.value??!1))}function xx(e){return e/ii}function Ix(){const{i18n:e}=ie();return n(t=>{if("number"==typeof t){const n=Math.ceil(xx(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(xx(n)),i=Math.ceil(xx(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 Ax(){const{checkout:{negotiator:e}}=ie(),n=e.current.fields.deliveryNext,r=Be();return t(()=>{const e=n.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 Tx(){const{checkout:{negotiator:e}}=ie(),{deliveryNext:n,allViolations:r}=e.current.fields,a=mn("deliveryNext");return t(()=>{const e=n.value,t=a.value,i=r.value;if(t)return{value:null,loading:t};const o=i?.some(({code:e})=>oi.has(e));return{value:"unavailable"===e?.status&&(e.hasNoDeliveryMethods||o||!1),loading:!1}})}function Lx(){const{checkout:{negotiator:e}}=ie(),{allViolations:n}=e.current.fields,r=mn("deliveryNext");return t(()=>{const e=r.value;return e?{value:null,loading:e}:{value:n.value?.some(({code:e})=>si.has(e))??!1,loading:!1}})}function Rx(){const{checkout:{negotiator:e}}=ie(),{deliveryLines:n}=e.parts;return t(()=>{const e=n.value;return e.length>0&&e.every(e=>{const t=e.value?.deliveryMethodTypes;return 1===t?.length&&"PICK_UP"===t[0]})})}function Nx(e){return(e??[]).filter(e=>e.requiresShipping).reduce((e,t)=>
2e+(t.quantity??0),0)}function Mx(){const e=ai();return t(()=>{const t=e.value;if(!t)return{};const n={};for(const e of t){if("available"!==e.status)continue;const t=wt(e);if(!t)continue;const{methodType:r}=t,a=Nx(e.targetMerchandiseLines);n[r]=(n[r]??0)+a}return n})}function Dx(){const{checkout:e,i18n:t}=ie(),n=wx(),r=e.crossBorderConfirmState.value,a=Boolean(r&&!r.onCancel),i=sh(),o=r?()=>{r.onConfirm(n),i(t.translate("split_delivery.cross_border.banner"))}:void 0;return d(ux,{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(_x,{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(af,{children:t.translate("split_delivery.cross_border.modal.content")})})}function zx(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 Ox(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 Bx(e){return(e.value.targetMerchandiseLines??[]).some(e=>e.requiresShipping)}function Fx(){const{shop:e,checkout:{negotiator:n}}=ie(),{deliveryNext:r}=n.current.fields,a=Kl();return t(()=>function({deliveryNext:e,isThankYouPage:t,proposedDeliveryLines:n,splitShipPickupUiEnabled:r}){if(!r)return!1;const a=Ox(Ue(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(Bx);return Ox(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:Ry(a.value.currentDetour),proposedDeliveryLines:n.parts.deliveryLines.value,splitShipPickupUiEnabled:e.shipPickupInOneOrderEnabled}))}function Vx(e){const t=i(e);return a(()=>{t.current=e},[e]),t}function Ux(){return(()=>{const{userEvents:e,shop:{id:t},checkout:{identity:n,negotiator:r},source:i}=ie(),o="shopPay"===n.current.value,s=r.current.fields.buyerIdentity.value?.customerProfile,{negotiating:l,methods:c}=wx(),u=li();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(le(t),10),numberLocationsFound:u.value?.methods.length,userId:s?.id?parseInt(le(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}=ie(),l="shopPay"===r.current.value,c=o.current.fields.buyerIdentity.value?.customerProfile,u=li(),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(le(n),10),locationId:le(r),selectedLocationRank:a,userId:c?.id?parseInt(le(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=tg(),n=Fx(),r=Kl(),a=t(()=>n.value&&!Ry(r.value.currentDetour));k(()=>{a.value&&o(()=>{e("splitShipAndPickupIntent",{timestamp:new Date})})})})(),null}
2function qx(e,t){const n=e.find(ui),r=t.find(ui);return!n&&r?{direction:"entering",pickupType:r}:n&&!r?{direction:"leaving",pickupType:n}:{direction:"none"}}const jx=["phone","company","address2"];function Hx(){const{checkout:e,shop:t}=ie(),{locationAddress:r,shippingAddress:a}=e.negotiator.parts,o=t.hasFlagEnabled(di),s=i(r.peek()),l=i(!1);return{syncLocationAddressFromShipping:n((t,n)=>{if(o)return;if("entering"!==qx(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)&&jx.every(t=>e[t]||!(e=>u(e,{countryCode:c.countryCode,useMerchantSettings:!0}))(t))}(c)?c:{};r.value=pi(d,c.countryCode,c.zoneCode),s.current=r.value},[e,o,r,a])}}function $x(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 Yx({children:e}){const s=i(void 0),{i18n:l,checkout:c,observability:u,shop:p,router:h,webMcp:g}=ie(),f=p.hasFlagEnabled(mi),y=m(!1),v=m(!1),_=gh(),{negotiate:b}=Ql(),{loading:P}=c.negotiator,S="shopPay"===c.identity.current.value,w=Be(),C=i(new Set),x=i(),{correctShippingAddress:I}=function(){const{shopPay:e,checkout:t}=ie(),{shippingAddress:r}=t.negotiator.parts,a=ci(),i="shopPay"===t.identity.current.value,o=n(()=>
2{if(!a.value||t.negotiator.current.fields.mustSelectProvidedAddress.value)return;const n=e.session.selectedShippingAddress.value;if(!n?.address)return;const i=t.configuration.addressSettings.nonBillingAddressSettings.value.isRequired("phone"),o=e.user.phoneNumber.value;r.value={...n?.address,phone:i&&!n?.address.phone?o:n?.address.phone}},[a,t.configuration.addressSettings.nonBillingAddressSettings,t.negotiator.current.fields.mustSelectProvidedAddress,r,e.user.phoneNumber,e.session.selectedShippingAddress]);return{correctShippingAddress:n(e=>{i&&e.includes("SHIPPING")&&o()},[o,i])}}(),{syncLocationAddressFromShipping:L}=Hx(),{preservePickupSelectionAcrossToggles:R}=function(){const{checkout:{negotiator:e}}=ie(),{deliveryLines:t}=e.parts,r=i({}),a=n((e,n)=>{const a=qx(e,n);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(ui)?{...e,[n]:a}:e},{})}(t.value)},[t]);return{preservePickupSelectionAcrossToggles:a}}(),{billingAddressOption:N,deliveryLines:M,discountLines:D,merchandiseLines:z,shippingAddress:O,locationAddress:B}=c.negotiator.parts,F=Fx(),{deliveryNext:V,shippingAddress:U}=c.negotiator.current.fields,q=V.peek(),j=m(hi(O.peek())||hi(U.peek())||null!=q&&"unavailable"!==q.status),H=__();k(()=>{(hi(U.value)||"filled"===V.value?.status||"partial"===V.value?.status)&&(j.value=!0)});const $=h.currentUrlMatches("/stock-problems"),[Y]=Eh("ONE_TIME_PURCHASE"),W=T(Y),[G,J]=Lh(),K=function(){const{checkout:{negotiator:e}}=ie(),{parts:t}=e;return n(e=>{t.deliveryLines.value.forEach(t=>{t.value={...t.value,deliveryMethodHandle:e}})},[t.deliveryLines])}(),Q=!f,X=T(G),Z=t(()=>ot(V.value)||gi(M.value)||F.value),ee=t(()=>Z.value?X.value:W.value),te=r(()=>{if(Z.peek())return;if(1!==(e=w.peek().enabledDeliveryMethods??[]).length||"PICK_UP"!==e[0])return;var e;const[t]=ee.peek();return"PICK_UP"!==t?{activeMethod:t,targetMethod:"PICK_UP"}:void 0},[Z,ee,w]),ne=m(null!=te),re=t(()=>{if(c.proposal.negotiated.fields.mustSelectProvidedShippingRate.value)return ee.value;if(!Z.value){const e=Wx(w.value.enabledDeliveryMethods??[]),t="unavailable"===V.value?.status&&!j.value,[n]=ee.value;return te&&ne.value&&!v.value?[te.targetMethod]:t&&!v.value&&e&&"PICKUP_POINT"!==n?["SHIPPING"]:n?["LOCAL"===n?"SHIPPING":n]:[]}const e=ee.value.filter(e=>"LOCAL"!==e);return!e.includes("SHIPPING")&&ee.value.includes("LOCAL")&&e.push("SHIPPING"),e}),ae=n((e,t)=>{if(H.value)return;const n=Wx(e),r=Wx(t);t.some(ui)&&!r&&(!S&&n&&null==s.current&&(s.current=N.value),N.value="custom"),!r||n||S||(p.requireMatchingShippingAndBilling?N.value="shipping":null==s.current?N.value=p.sameBillingAndShippingAddress?"shipping":"custom":N.value=s.current,s.current=void 0)},[p,S,H,N]),oe=i(re.peek());k(()=>{const e=oe.current,t=re.value;oe.current=t,e!==t&&o(()=>ae(e,t))});const se=n((e,t,n)=>{ae(t,e),oe.current=e,I(e),n?B.value=n:L(t,e);const r=n?void 0:R(t,e),a=$x(e);A(()=>{p.shipPickupInOneOrderEnabled&&fi(M),J(e),p.shipPickupInOneOrderEnabled&&a&&yi({deliveryLines:M,merchandiseLines:z.value,deliveryMethodTypes:a}),K(void 0),r&&Sh(M,r),vi(D),ne.value=!1})},[ae,I,B,L,R,p.shipPickupInOneOrderEnabled,M,J,z,K,D,ne]),le=n((e,t=re.value,n)=>{const r=S||H.value||t.includes("SHIPPING")||!e.includes("SHIPPING")?["deliveryNext"]:[],a=Ve(r);return se(e,t),y.value=!0,_?.dispatch?.("deliveryMethodChanged"),b({silenceViolations:a,onComplete:e=>{const t=P.value.has("deliveryNext");if("stale"===e.status&&t){const e=P.subscribe(t=>{t.has("deliveryNext")||(A(()=>{y.value=!1,n?.()}),e())})}else A(()=>{y.value=!1,n?.()})}})},[re,S,H,se,y,_,b,P]),ce=t(()=>c.proposal.negotiated.fields.mustSelectProvidedShippingRate.value??!1),ue=t(()=>Ia({checkout:c})),de=t(()=>zx(w.value.enabledDeliveryMethods??[],ue.value));a(()=>g?.unstable_provideFulfillmentController({getAvailableMethodTypes:()=>de.value,getSelectedMethodTypes:()=>re.value,markBuyerSelection:()=>{v.value=!0,ne.value=!1},applyMethodChange:se,reconcileSameMethod(e){const t=$x(e);p.shipPickupInOneOrderEnabled&&t&&yi({deliveryLines:M,merchandiseLines:z.value,deliveryMethodTypes:t})&&vi(D)}}),[g,de,re,v,ne,se,M,z,p.shipPickupInOneOrderEnabled,D]);const pe=t(()=>{const e=Gx(de.value,l,p,Q);return ce.value?e.filter(e=>re.value.includes(e.id)):e}),me=t(()=>{if(ce.value)return pe.value;const e=C.current,t=zx([...w.value.enabledDeliveryMethods??[],...e],ue.value),n=t.length>de.value.length?Gx(t,l,p,Q):pe.value;return n.length>
21&&n.forEach(t=>e.add(t.id)),n}),he=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:bx}}if("filled"!==o?.status)return{nextMethods:[...n.find(e=>JSON.stringify(e)===JSON.stringify(s))??l],loadingFields:bx}}}({isStockProblems:$,shippingRequired:_i(c.proposal),deliveryMethodOptions:me.value.map(({value:e})=>e),mustSelectProvidedShippingRate:ce.value,isSplitShipAndPickup:F.value,initialPickupOnlySelection:te,deliveryNext:V.value,currentSelectedMethods:re.value}),[]),ge=m(null!=he);k(()=>{const e=pe.value,t=me.value;if(e===t||t.length<=1)return void(x.current=void 0);const n=JSON.stringify([t.map(({id:e})=>e),e.map(({id:e})=>e)]);x.current!==n&&(x.current=n,u.log("sticky_delivery_method_selector","Showing delivery method selector with previous delivery options because sellability narrowed",{previousOptionCount:t.length,currentOptionCount:e.length}))}),a(()=>{he&&!v.value?le(he.nextMethods,he.previousMethods,()=>{ge.value=!1})?.catch(e=>{A(()=>{y.value=!1,ge.value=!1}),u.error(e)}):ge.value=!1},[]);const fe=Vx(n(e=>{const t=me.value.find(t=>t.id===e[0]);t&&(v.value=!0,le(t.value))},[me,le,v])),ye=t(()=>me.value.length<=1),ve=t(()=>{if(!ye.value)return{options:me,selected:re,select:e=>{fe.current(e)},variant:Q?"next":"default"}}),_e=r(()=>({negotiating:y,initialReconciliationPending:ge,methods:re,setSelectedMethodTypes:le}),[y,ge,re,le]);return d(kx.Provider,{value:_e,children:[d(Ux,{}),d(E,{when:F,children:d(Dx,{})}),d(Sx.Provider,{value:ve.value,children:e})]})}function Wx(e){return e.includes("SHIPPING")||e.includes("LOCAL")}function Gx(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?Px.PackageDelivery:Px.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?Px.Location:Px.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:Px.Location})}return a}function Jx(){const{i18n:e}=ie();return n((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 Kx(){const{shop:{captureAtFulfillmentEnabled:e},checkout:{negotiator:n}}=ie(),{buyerIdentity:r,paymentFlexibilityPaymentTermsTemplate:a}=n.current.fields;return t(()=>"FULFILLMENT"===a.value?.type&&!0===e&&!r.value?.purchasingCompany)}const Qx=e=>"target"in e&&"$.availableRedeemables.redeemable"===e.target;function Xx(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 Zx(e){return e.maskedIdentifier?.slice(-4).toUpperCase()}function eI(e){return e?`•••• ${e}`:""}
2class tI extends Error{constructor(){super(...arguments),this.name="TooManyRedeemablePaymentMethodsError"}}function nI(){const e=function(){const{checkout:{negotiator:e}}=ie(),n=e.current.fields.paymentMethods;return t(()=>{const e=n.value?.flatMap(e=>"redeemable"===e.type&&"CUSTOM"===e.redemptionSource?[e]:[]);if(void 0!==e&&0!==e.length){if(e.length>1)throw new tI("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]}})}(),[a,i]=s([]),o=bi("CUSTOM"),l=r(()=>o.value.filter(e=>{const t=a.some(t=>Xx(t,e.method)),n=!e.cost||0===e.cost.amount;return!t&&!n&&Boolean(e.method.redemptionContent)}),[o.value,a]),{checkout:{negotiator:c}}=ie(),{negotiate:u}=Ql(),d=Boolean(e.value),p=n(e=>{const t=t=>"redeemable"!==t.type||"CUSTOM"!==t.redemptionSource||!Xx(e,t),n=c.parts.paymentLines.value;c.parts.paymentLines.value=n.filter(e=>t(e.method));const r=c.parts.availableRedeemables.value;c.parts.availableRedeemables.value=r?.filter(e=>t(e.paymentMethod))},[c]),m=n((e,t)=>{const n=function(e,t){if(!t)return null;if(t.amount<=0)return null;return{method:e.paymentMethod,cost:{amount:iI,currencyCode:t.currencyCode}}}(e,t);if(n){const e=c.parts.paymentLines.value;return c.parts.paymentLines.value=[...e,...n?[n]:[]],new Promise(e=>{u({silenceViolations:Ve(["paymentLines"]),onComplete:t=>{"error"===t.status&&t.violations.some(Pi)&&p(n.method),e(t)}})})}return Promise.resolve(null)},[u,c,p]),h=n(e=>{const t=c.parts.paymentLines.value.length;return p(e),i(t=>[...t,e]),t>c.parts.paymentLines.value.length?new Promise(t=>{u({silenceViolations:Ve(["paymentLines"]),onComplete:n=>{i(t=>t.filter(t=>!Xx(t,e))),t(n)}})}):Promise.resolve()},[u,c,p]),g=n(()=>{const e=c.parts.paymentLines.value,t=e.length;return c.parts.paymentLines.value=e.filter(e=>{const{method:t}=e;return!("redeemable"===t.type&&"CUSTOM"===t.redemptionSource)}),t>c.parts.paymentLines.value.length?new Promise(e=>{u({silenceViolations:Ve(["paymentLines"]),onComplete:t=>{e(t)}})}):Promise.resolve()},[u,c]);return{canApplyGiftCards:d,paymentMethod:e.value,paymentLines:l,submit:m,remove:h,removeAll:g}}function rI(){const{checkout:{negotiator:e}}=ie(),n=e.current.fields.paymentLines;return t(()=>n.value?.lines.filter(e=>"giftCard"===e.method.type)??[])}function aI(){const e=bi("STORE_CREDIT"),{paymentLines:n}=nI(),r=rI();return t(()=>{const t=Boolean(e.value.length),a=Boolean(n.length),i=Boolean(r.value.length);return t||a||i})}const iI=0;function oI(){const e=ki(),n=Kl(),r=it(),a=Kx(),i=Jx(),o=aI(),{shop:s,checkout:l,embed:c,i18n:u,source:d,shopPay:p}=ie(),{orderSummary:m}=By(),h=s?.name,g=m.totalLabel,f=pr(c?.embedder),y=Si(p.app.config);return t(()=>{const{currentPage:t,plan:s,currentDetour:c}=n.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"),P="thankYou"===c?.type,k=p&&p.amount.amount>0;if(e.value&&P)return u.translate("order_summary.deferred_payment_info.paid_today_next");if(Fn(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(k)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 P?o.value?u.translate("order_summary.total_paid_label"):u.translate("order_summary.partial_total_label"):x_(t,s.greenPath[s.greenPath.length-1])?o.value?b:_:o.value?b:u.translate("order_summary.partial_total_label")})}function sI({children:e,id:t,title:n}){return d("abbr",{className:"_1qifbzv1 _1qifbzv0 _1fragem128",id:t,title:n,children:e})}function lI(){const e=wi(),n=Ci(),{i18n:r,checkout:{negotiator:a}}=ie(),{deferredTotal:i}=a.current.fields,o=Ei(),s=T(Fy()),l=aI(),c=T(By()),u=rt(),p=t(()=>{const t=o.value,a=e.value;if(!t||!a)return;const d=r.formatCurrency(t.amount,{currency:t.currencyCode,form:"short"}),p=t.amount<a.amount&&!n.value&&!i.value&&!l.value;return{amountDue:t,paymentDueFormatted:d,priceBeforeReductionsFormatted:r.formatCurrency(a.amount,{currency:a.currencyCode,form:"short"}),showCurrencyCode:"base"===c.value.disclosure.style&&s.value&&(!u.value||!d.includes(t.currencyCode)),showSubtotalBeforeReductions:p,totalAmountDueAccessiblityLabel:p?r.translate("order_summary.price_after_discount_aria_text"):r.translate("order_summary.total_price_label")}});return d(E,{when:p,children:({amountDue:e,paymentDueFormatted:t,priceBeforeReductionsFormatted:n,showCurrencyCode:a,showSubtotalBeforeReductions:i,totalAmountDueAccessiblityLabel:o})=>d(gf,{alignItems:"end",children:[i?d(y,{children:[d(af,{accessibilityVisibility:"exclusive",children:r.translate("order_summary.total_price_label")}),d(af,{size:"small",color:"subdued",type:"redundant",translate:!1,children:n})]}):null,d(af,{accessibilityVisibility:"exclusive",children:o}),d(gf,{direction:"inline",alignItems:"center",gap:"small-300",children:[a&&d(sI,{children:d(af,{type:"small",color:"subdued",translate:!1,children:e.currencyCode})}),d(IE,{color:"base",size:"large",translate:!1,children:d(af,{type:"strong",children:t})})]})]})})}const cI={"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 uI({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)=>
2dI(t)-dI(e)):t).slice(0,r),m=JS(n);return d("div",{className:cI[`StackedThumbnails-${e}`],style:{"--total":p.length,"--thumbnail-inline-size":Pe(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:cI[`StackedThumbnail-${e}`],style:{"--index":r},children:d(HS,{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:pI(r,e),alt:a?t.image?.altText||s:"",totalItems:h,overlay:m?`+${u}`:void 0})},"stableId"in t?t.stableId:`${r}${t.title}`)})})}function dI(e){return"totalPrice"in e&&e.totalPrice?e.totalPrice.amount:"price"in e&&e.price?e.price.amount:0}function pI(e,t){return"fan"===t?Math.max(0,Math.min(e,2)):"fan-legacy"===t&&e>0?"legacy":void 0}const mI="ik40Z";function hI(){const{disclosure:{style:e}}=By(),{open:n}=Vw(),{i18n:r,checkout:a,source:i}=ie(),o=oI(),s="base"===e,l=t(()=>!n.value),c=a.proposal.facts.merchandiseLines??[],{value:u}=a.negotiator.current.fields.merchandiseLines,p=Fn(i)?c:u?.lines||[],m=d(Xm,{type:n.value?"chevron-up":"chevron-down",size:"small-200",display:"inline"});return d(gf,s?{direction:"inline",justifyContent:"space-between",alignItems:"center",gap:"small-200",padding:"small-300 base",inlineSize:"100%",className:mI,children:[d(E,{when:n,fallback:d(gf,{direction:"inline",alignItems:"center",gap:"small-200",children:[d("span",{className:Se({screenReaders:"only"}),children:r.translate("order_summary.title")}),d(uI,{variant:"inline",size:"small-200",max:3,merchandise:p,useImageAltTexts:!1}),d(af,{size:"large",fonts:"secondary",type:"strong",children:o})]}),children:d(af,{color:"subdued",children:r.translate("order_summary.title")})}),d(gf,{direction:"inline",alignItems:"center",gap:"small-200",children:[d(E,{when:l,children:d(lI,{})}),m]})]}:{direction:"inline",justifyContent:"space-between",alignItems:"center",gap:"small-200",padding:"small-300 base",inlineSize:"100%",className:mI,children:[d(gf,{direction:"inline",alignItems:"center",gap:"small-200",className:"Tupv7",children:[r.translate("order_summary.title"),m]}),d(lI,{})]})}function gI(){const{checkout:e,embed:n,router:r}=ie();return t(()=>!(!n?.isFlagshipPartner||e.configuration.isUniversalCheckoutFinalizer)&&"/thank-you"===r.currentUrl.value.normalizedPath)}function fI(){const e=gI();return d(E,{when:e,children:d("div",{className:"KwVFv"})})}var yI={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 vI=({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=Pd(o??!1,o?"base":"fast");return d("div",{className:yI.PillHintWrapper,children:d("div",{className:v(yI.PillHint,yI.directionVariant[i.value],yI.transitionVariant[s]),children:[a,d(Xm,{size:"small",type:"block"===i.value?"arrow-down":"arrow-right",className:yI.iconVariant[i.value]})]})})};var _I={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 bI=({position:e,scrollDirection:t})=>{const n=Pd((t?.block&&"start"!==e?.scrolledTo.block)??!1,"base"),r=Pd((t?.block&&"end"!==e?.scrolledTo.block)??!1,"base"),a=Pd((t?.inline&&"start"!==e?.scrolledTo.inline)??!1,"base"),i=Pd((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(_I.ShadowHint,_I.positionVariant[e],_I.transitionVariant[t])},e))})},PI=new class{constructor(){this.dimensions=S(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      <div class="scrollbar-inline-tester" style="width: 100px; height: 100px;
2 overflow-y: scroll;">\n        <div style="height: 200px;"></div>\n      </div>\n      <div class="scrollbar-block-tester" style="width: 100px; height: 100px; overflow-x: scroll;">\n        <div style="width: 200px;"></div>\n      </div>\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)}},kI=(e,t)=>e?"start":t?"end":null;var SI="_1b9t7ypn _1b9t7ypj _1fragemel",wI="_1b9t7ypo _1b9t7ypk _1fragemf5",CI="_1b9t7ypp _1b9t7ypl _1fragemdh",EI="_1b9t7ypq _1b9t7ypm _1frageme1",xI="_1b9t7yp8",II="_1b9t7yp9";const AI=Um(Ad(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:P,children:k,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:N,onScrolledToEdge:M,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}=$m(o),{className:W,style:G,styleElement:J}=zm({backgroundColor:c,backgroundColorHoverAndFocus:u,blockSize:h,...Re({border:g,borderColor:f,borderStyle:b,borderWidth:P}
2),borderRadius:_,display:w,inlineSize:x,maxBlockSize:I,maxInlineSize:A,minBlockSize:T,minInlineSize:L},{transforms:{display:pd}}),{className:K,style:Q,styleElement:X}=zm({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=t(()=>{const e=PI.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=t(()=>p.value?{inline:p.value.inline>0,block:p.value.block>0}:null),g=r(()=>Op(()=>{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?kI(n,i):null,block:t.block?kI(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=n(()=>{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,N,M),se="listbox"===o||ae?.inline||ae?.block,le=v(ae?.block&&"start"!==re?.scrolledTo.block&&SI,ae?.block&&"end"!==re?.scrolledTo.block&&!ie?.block&&wI,ae?.inline&&"start"!==re?.scrolledTo.inline&&CI,ae?.inline&&"end"!==re?.scrolledTo.inline&&!ie?.inline&&EI),ce=v("none"!==p&&ae?.block&&"start"!==re?.scrolledTo.block&&xI,"none"!==p&&ae?.block&&"end"!==re?.scrolledTo.block&&!ie?.block&&II);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:[J,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",K,S,"product-thumbnails"===p&&"_1b9t7ypc _1b9t7ypb","product-thumbnails-with-badge"===p&&"_1b9t7ype _1b9t7ypb"),tabIndex:se?0:void 0,style:Q,ref:Z,children:k}),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(vI,{variant:C,scrollDirection:ae,position:re,scrollbarVisible:"auto"===j}),"shadow"===C?.type&&d(bI,{variant:C,scrollDirection:ae,position:re,scrollbarVisible:"auto"===j})]})]})]})}));var TI="go06b0";const LI=/<table[\s>]/i;function RI(e){if("undefined"==typeof DOMParser||!LI.test(e))return null;const{body:t}=(new DOMParser).parseFromString(e,"text/html");return t.querySelector("table")?NI(t.childNodes,!1):null}function NI(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?NI(e.childNodes,t||"table"===i):void 0,l=j(i,o,s);"table"!==i||t?n.push(l):n.push(d(AI,{overflow:"hidden auto",className:"go06b1",children:l},r))}return n}function MI({dangerouslySetInnerHTML:e,scrollableContent:t="none",children:n}){const a=_d()?"span":"div",i=e?.__html,o=r(()=>"all"===t&&null!=i?RI(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:TI,children:o}:{dangerouslySetInnerHTML:e,className:TI,children:n})}const DI=f(null);function zI(e){return`error-for-${e}`}DI.displayName="SelectContext";function OI({children:e,controlID:t,type:n}){return"warning"===n?d(Ym,{id:t?zI(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(Xm,{type:"info"})}),d(af,{children:e})]}):d("div",{className:"ksaxnz0 _1fragemxr",id:t?zI(t):void 0,children:e})}function BI(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)}function FI({children:e}){return d("span",{className:v("rermvf1 rermvf0 _1fragemup _1fragemv4 _1fragem5u _1fragem12y"),children:e})}var VI={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 UI({htmlFor:e,label:t,variant:n,className:r}){const a=qu();return d("label",{id:`${e}-label`,htmlFor:e,className:v(VI.positionVariant[n],"inside"===n&&VI.transitionVariant[a?"animated":"base"],r),children:d("span",{className:VI.Text,children:d(FI,{children:t})})})}const qI={FormLayout:"fjTgn",FormLayoutGroup:"fa7nz",SpacingSmall100:"RV2tT",SpacingBase:"wOVuC",FormLayoutConnected:"_9Mesh",ControlFocused:"V2zsD",Connectable:"_2g0rh",NotConnectable:"tgYPK",HasErrorOrWarning:"iKgeO"};
2var jI={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 HI=Oc("TextField"),$I={"data-1p-ignore":!0,"data-lpignore":"true","data-bwignore":"true","data-form-type":"other"},YI=_(function({accessibilityDescription:e,accessoryEnd:t,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:P,controlledValue:k,defaultValue:S,disabled:w,error:C,icon:E,id:x,disablePasswordManagers:I,inputMode:A,label:T,labelAccessibilityVisibility:L="visible",labelPosition:R,labelWhenEmpty:N,letterCase:M,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:J="base",readOnly:K,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}}=Vm(),ce=qu(),ue=h(Vu)?.floatTextFieldLabelsOnFocus??!1,de=le||oe||"full",pe=R??se,me=yd(),he=null==ae?void 0:ae,ge=null==k?void 0:k,fe=Bc(x,HI),ye=e?`${fe}-description`:void 0,ve=ye?d(af,{accessibilityVisibility:"exclusive",id:ye,children:e}):null,[_e,be]=s(!1),[Pe,ke]=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=n(e=>{j?.(e),ke(e)},[j,ke]),we=function(e,t){if("boolean"!=typeof e)return void 0!==e&&Boolean(e)?d(OI,{controlID:t,type:"warning"===JI(e)?"warning":void 0,children:e&&"object"==typeof e&&"value"in e?e?.value:e}):null}(C,fe),Ce=Boolean(C)&&"warning"!==JI(C),Ee=v(jI.TextField,jI.textFieldColorLayerVariant[Ce?"controlInvalid":"control"],jI.textFieldBorderVariant[de],(w||me)&&jI.textFieldDisabled,me&&jI.inert,K&&jI.textFieldReadOnly,_e&&jI.textFieldFocused,Ce&&jI.textFieldError,ee&&jI.segmentVariant[ee]),xe=T&&"visible"===L;let Ie=jI.floatingLabelOnContent;"outside"===pe?Ie=VI.floating:G&&(Ie=jI.floatingLabelOnFocus);const Ae="outside"!==pe&&!Z&&"full"===de,Te=Ae&&Boolean(C);return d(y,{children:d("div",{className:v(jI.Wrapper,jI.wrapperVarsSetter["outside"===pe?"labelOutside":"labelInside"],"inside"===pe&&jI.textFieldColorLayerVariant[C?"controlInvalid":"control"],"inside"===pe&&jI.wrapperLabelInside,xe&&Ie,xe&&"inside"===pe&&ue&&jI.floatingLabelOnFocus,Ae?qI.Connectable:qI.NotConnectable,Te&&qI.HasErrorOrWarning,ce&&jI.animatedLabel),children:[xe&&"outside"===pe&&d(UI,{variant:"outside",htmlFor:fe,label:T}),T&&"exclusive"===L&&d("label",{id:`${fe}-label`,htmlFor:fe,className:VI.visuallyHidden,children:T}),d("div",{className:Ee,children:[ve,xe&&"inside"===pe&&d(UI,{variant:"inside",htmlFor:fe,label:T}),d(GI,{accessibilityDescription:e,accessoryEnd:t,accessoryStart:r,ariaActiveDescendant:a,ariaAutocomplete:o,ariaControl
2s:l,ariaDescribedBy:ye,ariaExpanded:c,ariaHasPopup:u,ariaLabel:p,ariaLive:m,ariaOwns:g,autoCapitalize:f,autocomplete:_,autoCorrect:b,autoFocus:P,controlledValue:k,defaultValue:S,disabled:w,error:C,icon:E,id:fe,disablePasswordManagers:I,inputMode:A,label:T,labelAccessibilityVisibility:L,labelPosition:pe,labelWhenEmpty:N,letterCase:M,localValue:Pe,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:J,readOnly:K,ref:ie,required:Q,role:X,rows:Z,step:te,suffix:ne,type:re,value:ae})]}),we]})})}),WI=YI,GI=_(function({accessoryEnd:e,accessoryStart:t,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:P,labelWhenEmpty:k,error:S,icon:w,id:C,disablePasswordManagers:E,inputMode:x,label:I,labelAccessibilityVisibility:A,labelPosition:T,letterCase:L,localValue:R,max:N,maxLength:M,min:D,minLength:z,name:O,onBlur:B,onChange:F,onFocus:V,onInput:U,onInputCommit:q,onKeyDown:H,onWheel:$,placeholder:Y,prefix:W,prefixSpacing:G,readOnly:J,required:K,role:Q,rows:X,step:Z,suffix:ee,type:te,value:ne},re){const ae=qg({active:Boolean(S)&&Boolean("warning"!==JI(S))}),ie=i(),oe=n(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=Og(),le=gd(),ce=yd();a(()=>{b&&!ce&&ie.current?.focus()},[b,ce]);const{control:{labelPosition:ue="inside"}}=Vm(),de=T??ue,pe=qu(),me="object"==typeof w?w.source:w,he="object"==typeof w?w.position??"start":"start",ge=""!==me&&me&&d("div",{className:v(jI.Icon,jI.iconPositionVariant[he]),"aria-hidden":"true",onClick:()=>ie.current?.focus(),children:d(Xm,{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 Pe=W&&d("div",{id:`${C}-prefix`,className:v(jI.Prefix,jI.withTypography,fe&&"inside"===de&&jI.prefixInside),"aria-hidden":"true",onClick:()=>ie.current?.focus(),children:W}),ke=v(jI.Field,"inside"===de&&jI.fieldLabelInside,"inside"===de&&jI.fieldLabelInsideTransitionVariant[pe?"animated":"base"],Boolean(W)&&jI.fieldPrefixed,Boolean(G)&&jI.fieldPrefixSpacing[G],Boolean(!fe)&&jI.setFieldLabelIsNotVisible,Boolean(W||t||ge&&"start"===he)&&jI.fieldInsetStart,Boolean(ee||e||ge&&"end"===he)&&jI.fieldInsetEnd,Boolean(X)&&jI.fieldMultiline,L&&jI.fieldLetterCaseVariant[L],te&&jI.fieldTypeVariant[te],jI.withTypography),Se=l||S?BI([l,S&&zI(C)]):void 0,we=x??("number"===te?"decimal":void 0),Ce=W?` ${C}-prefix`:"",Ee=ee?` ${C}-suffix`:"",xe=k??I;let Ie;"outside"===de?Ie=Y:pe&&fe?Ie=W?xe:" ":pe||"visible"!==A||(Ie=xe);const Ae=j(X?"textarea":"input",{...E?$I:void 0,id:C,min:D,max:N,step:Z,maxLength:M,minLength:z,name:O,placeholder:Ie,className:v(ke,jI.ActualInput),required:K,type:X?void 0:te,disabled:P,readOnly:J,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"!==JI(S)?"true":void 0,"aria-label":p,"aria-live":m,"aria-required":K,"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:H,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(jI.MultilineClone,ke),dir:be,children:[R," "]}),Le=v(jI.FieldWrapper,Boolean(X)&&jI.fieldWrapperMultiline),Re=X?d("div",{className:Le,children:[Ae,Te]}):Ae,Ne=ee&&d("div",{id:`${C}-suffix`,className:v(jI.Suffix,jI.withTypography),"aria-hidden":"true",onClick:()=>ie.current?.focus(),children:ee}),Me=t&&d("div",{className:v(jI.Accessory,jI.accessoryPositionStart),children:t}),De=e&&d("div",{className:v(jI.Accessory,jI.accessoryPositionEnd),children:e});return d(y,{children:[ge,Pe,Re,Me,Ne,De]})});function JI(e){if(e&&"object"==typeof e&&"type"in e)return e.type}var KI={labelInside:"_10vrn9p1 _10vrn9p0",labelOutside:"_10vrn9p2 _10vrn9p0"},QI={Select:"_1k3449n0 _1fragem133 _1fragemyl",selectColorLayerVariant:{control:"_1k3449n3 _1k3449n1 _1fragemy6",controlInvalid:"_1k3449n4 _1k3449n2 _1fragemy7"},inert:"_1k3449n5 _1fragemz0"};const XI={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"},ZI=Oc("Select");function eA({children:e,id:t,name:a,label:i,value:o="",disabled:l,readOnly:c,required:u,error:p,autocomplete:m="on",placeholder:h,onChange:g,onBlur:f,onF
2ocus:_}){const b=gd(),{control:{border:P,labelPosition:k="inside"},select:{border:S}}=Vm(),w=yd(),C=qg({active:Boolean(p)&&Boolean("warning"!==JI(p))}),E=Bc(t,ZI),x=S||P||"full",I=void 0!==p&&Boolean(p)&&d(OI,{controlID:E,type:"warning"===JI(p)?"warning":void 0,children:p&&"object"==typeof p&&"value"in p?p?.value:p}),A=Boolean(p)&&"warning"!==JI(p),T=v(XI.Select,QI.Select,A&&XI.hasError,(l||w)&&XI["Select-isDisabled"],w&&QI.inert,c&&XI["Select-isReadOnly"],XI[H("Select-border",x)]),[L,R]=s(0),N=Boolean(L),M=Boolean(h&&h!==i)||N,D=""!==o||M,z=d("label",{className:v(XI.Label,XI[H("Label-position",k)],D&&XI["Label-isFloating"]),htmlFor:E,children:d("span",{className:v(XI.LabelText),children:d(FI,{children:i})})}),O=n(()=>{R(e=>e+1)},[]),B=n(()=>{R(e=>e-1)},[]),F=r(()=>({readOnly:c,registerEmptyValueOption:O,unregisterEmptyValueOption:B}),[c,O,B]),V=d("div",{children:["outside"===k?z:null,d("div",{className:v(XI.SelectWrapper,QI.selectColorLayerVariant[A?"controlInvalid":"control"]),children:["inside"===k&&z,d(DI.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?zI(E):void 0,"aria-invalid":p&&"warning"!==JI(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(XI.Selector),children:d(Xm,{type:"chevronDown",size:"small-200"})})]})]});var U;const q="outside"!==k&&"full"===x,j=q&&Boolean(p);return d(y,{children:d("div",{className:v(XI.Wrapper,"inside"===k&&QI.selectColorLayerVariant[A?"controlInvalid":"control"],KI["outside"===k?"labelOutside":"labelInside"],q?qI.Connectable:qI.NotConnectable,j&&qI.HasErrorOrWarning),children:[V,I]})})}function tA({children:e,id:t,value:n,disabled:r,alternateValues:a,accessibilityLabel:i}){const o=h(DI),{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)}var nA={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 rA=_(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=xp(p),h=yd(),g="auto"===r?"fit-content":r,f=Hu(),y=Pd(i??!1,{enter:"slow"}),_=d("span",{className:v(nA.LoadingContent),dir:"auto",children:d(ef,{accessibilityLabel:f("processing")})}),b=DS(n)&&d("span",{className:v(nA.Content),"aria-hidden":i||void 0,children:n});return d(vd.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(nA.PressButton,nA.inlineSizeVariant[ke(g)],s&&nA.pressed,(o||h)&&nA.disabled,h&&nA.inert,i&&[nA.loading,nA.transitionVariant[y]]),disabled:o||i,tabIndex:h?-1:void 0,ref:m,children:[b,i&&_]})})}),aA={small:"35%",base:"50%",large:"65%",fill:"100%"};function iA({content:e,delay:t,id:n,lastLineSize:a,lines:i=1,size:o}){const s=r(()=>function(){const e=Object.keys(aA);return e[Math.floor(Math.random()*e.length)]}(),[]);return d(IE,{id:n,size:o,textAlign:"justify",children:e?d(tw,{delay:t,children:e}):Array.from({length:i},(e,n)=>
2d(tw,{delay:t,inlineSize:aA[n===i-1?a??(1===i?"fill":s):"fill"]},n))})}const oA=new Set(["http:","https:"]);function sA({children:e}){const t=function(){const{checkout:{configuration:{isWindowOpenDelegationEnabled:e}},embed:t,observability:r}=ie(),a=n(e=>{const n=e.target?.closest?.("a");if(!n)return;const a=n.href;let i;try{i=new URL(a).protocol}catch{return}if(!oA.has(i))return;const o=n.getAttribute("href");o?.startsWith("#")||t?.client?.windowOpenRequest&&(e.preventDefault(),t.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)})}))},[t,r]);if(e)return a}();return t?d("div",{onClick:t,children:e}):d(y,{children:e})}const lA={id:"63eae86e190df32a164601cf96e105e3a69712d555a3abd3ab6d36cde520673e",type:"query",name:"MerchantPolicies",source:""},cA={id:"1263e051dbbb958a67fe45f4acca32965cf3cea185a1b71afe5ebdb65c4f4160",type:"query",name:"RemoteMerchantPolicies",source:""},uA=Hv(({graphql:{coreGraphql:e},observability:t,shop:n},{checkoutProtocolModalEventSignal:r,defaultPolicy:a,policies:i})=>{const o=xi(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=S(!1),d=S(!1),p=S(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(lA,{variables:()=>({handle:p.value.handle}),skip:()=>!f.value||!u.value}),v=e.query(cA,{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),w=dl(k.value,(e,t)=>e&&!t&&u.peek()&&d.peek()&&"undefined"!=typeof document&&null!==document.querySelector(pl),["modal-content-cross-fade"]);return z(()=>{w.value=k.value}),z(()=>{b.value&&t.error(b.value)}),{error:b,loading:w,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&&al(()=>{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&&al(()=>{p.value=n},["modal-content-cross-fade"])}}});function dA({id:e,defaultPolicy:t}){const{i18n:n,shop:r,mobileCheckoutSdk:a,embed:i,checkout:{negotiator:o}}=ie(),{checkoutProtocolModalEventSignal:s}=o.context,{localPolicies:l,localPoliciesWithContent:c,remotePolicies:u}=Ii(),p=r.hasFlagEnabled(Ai),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:P,selectedShopPolicies:k,shops:S,show:w,afterShow:C,hide:x,selectShop:I,selectPolicyHandle:A}=Dn(uA,{checkoutProtocolModalEventSignal:s,defaultPolicy:t,policies:h}),T=S.value.length>1||S.value.some(e=>e.policies.size>1),L=()=>d(sA,{children:d(MI,{dangerouslySetInnerHTML:{__html:b.value??""},scrollableContent:"all"})}),R=d(E,{when:()=>!v.value,fallback:n.translate("bad_request.title"),children:d(E,{when:()=>!_.value,fallback:d(gf,{"aria-busy":!0,gap:"base",children:[d(iA,{delay:!1,lines:3,lastLineSize:"small"}),d(iA,{delay:!1,lines:3,lastLineSize:"large"}),d(iA,{delay:!1,lines:3,lastLineSize:"small"}),d(iA,{delay:!1,lines:3,lastLineSize:"large"})]}),children:()=>T||P.value.shopId!==r.id?d(E,{when:()=>b.value,fallback:d(af,{color:"subdued",children:n.translate("remote_policies.unavailable_policy",{policy_name:P.value.name,shop_name:P.value.shopName})}),children:L}):L()})});return d(ux,{id:e,onShow:w,onAfterShow:C,onHide:x,heading:g,blockSize:y,children:[d(Qg,{accessibilityRole:"status",accessibilityVisibility:"exclusive",children:_.value?n.translate("general.loading"):null}),T?d(gf,{gap:"base",children:[d(E,{when:()=>S.value.length>1,children:d(gf,{direction:"inline",gap:"base",children:S.value.map(e=>d(rA,{pressed:P.value.shopId===e.shopId,onClick:()=>I(e.shopId),children:d(gf,{gap:"small-400",direction:"inline",alignItems:"center",justifyContent:"center",children:d(af,{children:e.shopName})})},e.shopId))})}),d(E,{when:()=>k.value.length>1,children:d(eA,{value:P.value.handle,label:n.translate("shop_policies.policy_label"),onChange:A,name:"policy",children:k.value.map(e=>d(tA,{value:e.handle,children:e.name},e.handle))})}),R]}):R]})}function pA(e){return!!(e&&"liability"in e&&e.liability)&&("MARKETPLACE"===e.liability||"MERCHANT"===e.liability)}function mA({liability:e}){const{i18n:t,shop:n}=ie(),{footer:{alignment:r}={}}=By();switch(e){case"MARKETPLACE":return d(IE,{size:"small",color:"subdued",textAlign:r,children:t.translate("tax.attribution.orders_sold_by_shop_marketplace")});case"MERCHANT":return d(IE,{size:"small",color:"subdued",textAlign:r,children:t.translate("tax.attribution.orders_sold_by_shop_name",{shop_name:n.name})});default:return null}}var hA={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 gA=Oc("Checkbox"),fA=lm(_(function({accessibilityLabel:e,disabled:t,error:n,id:r,label:a,name:i,details:o,...s},l){const c=Bc(r,gA),u=yd(),p="string"==typeof n&&Boolean(n.trim())&&d("div",{className:hA.Error,children:d(OI,{controlID:c,children:n})}),m=v(hA.Label,hA.labelAndDetailsStateVariant[t||u?"disabled":"default"],u&&hA.inert),h=("string"==typeof a||DS(a))&&d("label",{htmlFor:c,className:m,children:a}),g="string"==typeof o||DS(o),f=g?`${c}-details`:void 0,y=v(hA.Details,hA.labelAndDetailsStateVariant[t||u?"disabled":"default"],u&&hA.inert),_=g&&d("div",{id:f,className:y,children:o});return d("div",{children:[d("div",{className:hA.Wrapper,children:[d(yA,{id:c,name:i,error:Boolean(n),accessibilityLabel:e,disabled:t,ref:l,ariaDescribedBy:f,...s}),h]}),_,p]})}),{commands:{clipboard:!1,overlay:!1}}),yA=_(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=yd(),_=Ip(f,qg({active:a})),b="inherit"!==n,P=v(hA.Input,a&&hA.inputError,hA.inputStateVariant[r||y?"disabled":"default"],y&&hA.inert);return d("div",{className:v(hA.Checkbox,b&&hA.colorLayerControl,u&&hA.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)}
2,className:P,"aria-describedby":[p,a&&zI(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:hA.Icon,children:d(Xm,{type:"check",size:"small-200"})})]})}),vA="gid://shopify/App/580111";function _A(e,t){return e.namespace.toLowerCase()===t.namespace.toLowerCase()&&e.key.toLowerCase()===t.key.toLowerCase()}function bA(e,t){const{namespace:n,key:r}=e.update??e.delete??{};return null!=n&&null!=r&&_A({namespace:n,key:r},t)}function PA(e,t){return e?.find(e=>_A(e,t))?.value}function kA(e,t){for(let n=e.length-1;n>=0;n--)if(bA(e[n],t))return n;return-1}function SA({key:e,label:t,required:a},{type:s,validate:l=()=>{}}){const{checkout:{proposal:c},i18n:u}=ie(),d=Ql(),p=Li(e),m=Ri(),h=function({namespace:e,key:t,type:n}){const{checkout:{proposal:a}}=ie(),i=a.proposed.cartMetafields,o=a.negotiated.fields.cartMetafields;return r(()=>{const r={namespace:e,key:t,type:n};return new Ti(P(()=>function(e,t){const n=e[kA(e,t)];if(n)return n.delete?"":n.update?.value}(i.value,r)??PA(o.value,r)??""),e=>{i.value=function(e,t,n){const{namespace:r,key:a,type:i}=t,o=""===n.trim()?{delete:{appId:vA,namespace:r,key:a}}:{update:{appId:vA,namespace:r,key:a,type:i,value:n}},s=kA(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,t){const{checkout:{negotiator:r}}=ie(),{customFields:a}=r.current.fields,{lastJourneyProgression:i}=r,s=n(n=>{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)}(n,a.value,e);r&&!t.value&&(t.value=r.localizedMessage||r.nonLocalizedMessage)},[a,t,e]);return k(()=>{const e=i.value;"error"===e.type&&"negotiation"!==e.negotiationStage&&o(()=>s(e.violations))}),{handleViolations:n(e=>{"error"===e.status&&s(e.violations)},[s])}}(e,m);Ni(h,m,l,qt.InvalidCustomFieldValue);const y=a.value;return{value:h,error:m,fieldProps:{label:y?t.value:u.translate("custom_field.label",{label:t.value}),name:e,required:y},negotiate:()=>{const e=h.peek();e!==(g.current??PA(c.negotiated.fields.cartMetafields.peek(),p)??"")&&!m.peek()&&(g.current=e,d.negotiate({fieldsToResolve:["cartMetafields","customFields"],silenceViolations:[...Qn],onComplete:f}))}}}function wA({field:{description:e,heading:t,key:n},children:r}){const a=e.value;return d(gf,{gap:"small-100","data-inspector-id":n,"data-inspector-kind":"customField",children:[t.value?d(Kk,{children:t}):null,a?d(af,{color:"subdued",children:a}):null,r]})}function CA({field:e}){const t=function({required:e,requiredErrorMessage:t}){const{i18n:r}=ie();return n(n=>{if(e.value&&"true"!==n)return t.value?.trim()||r.translate("field_errors.custom_field.cart_metafield_value_required")},[r,e,t])}(e),{value:r,error:a,fieldProps:i,negotiate:o}=SA(e,{type:"boolean",validate:t}),s="string"==typeof a.value?a.value:void 0;return d(wA,{field:e,children:d(fA,{label:e.label.value,name:i.name,required:i.required,
2checked:"true"===r.value,error:s,onChange:e=>{const n=String(e);r.value=n,a.value=t(n),o()}})})}function EA({field:e}){const{i18n:t}=ie(),r=function({choices:e,required:t,requiredErrorMessage:r}){const{i18n:a}=ie();return n(n=>{if(""===n.trim()){if(!t.value)return;return r.value?.trim()||a.translate("field_errors.custom_field.cart_metafield_value_required")}if(!e?.some(e=>e.value===n))return a.translate("field_errors.custom_field.cart_metafield_invalid_choice")},[e,a,t,r])}(e),{value:a,error:i,fieldProps:o,negotiate:s}=SA(e,{type:"single_line_text_field",validate:r});return d(wA,{field:e,children:d(eA,{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(tA,{value:"",disabled:o.required,children:t.translate("custom_field.choice_placeholder")}),e.choices?.map(({label:e,value:t})=>d(tA,{value:t,children:e},t))]})})}const xA=w({displayName:"AsyncDateField",suspense:!1,load:()=>C(()=>ll(async()=>{const{DateField:e}=await(import("./b538640d.BCalcArF.js"));return{DateField:e}},__vite__mapDeps([245,1,33,34,3,4,2,5,35,36,37,10,13,14,15,16])).then(({DateField:e})=>e)),useError:Dh("DateField"),renderLoading:({field:e})=>d(IA,{field:e})});function IA({field:e}){const{value:t,fieldProps:n}=SA(e,{type:"date"});return d(wA,{field:e,children:d(WI,{...n,value:t.value,readOnly:!0,inputMode:"numeric",maxLength:10,accessoryEnd:d(Xm,{type:"calendar"})})})}const AA=_(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},P){return d(YI,{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:P,required:v,rows:_>0?_:1,value:b})});function TA(e,t){const{value:n,error:r,fieldProps:a,negotiate:i}=SA(e,t),o=Mi(n,r,t.validate);return{validatedInput:o,fieldProps:a,persist:()=>{o.onBlur(),i()}}}function LA({field:e}){const t="MULTILINE_TEXT"===e.type,r=function({required:e,requiredErrorMessage:t,validations:r}){const{i18n:a}=ie(),{minLength:i,maxLength:o}=r;return n(n=>{if(""===n.trim()){if(!e.value)return;return t.value?.trim()||a.translate("field_errors.custom_field.cart_metafield_value_required")}const r=[...n].length;return null!=i&&r<i?a.translate("field_errors.custom_field.cart_metafield_value_too_short"):null!=o&&r>o?a.translate("field_errors.custom_field.cart_metafield_value_too_long"):void 0},[a,o,i,e,t])}(e),{validatedInput:a,fieldProps:i,persist:o}=TA(e,{type:t?"multi_line_text_field":"single_line_text_field",validate:r});return d(wA,{field:e,children:d(t?AA:WI,{...a,label:i.label,name:i.name,required:i.required,onBlur:o})})}function RA({field:e}){switch(e.type){case"TEXT":case"MULTILINE_TEXT":return d(LA,{field:e});case"DATE":return d(xA,{field:e});case"CHOICE":return d(EA,{field:e});case"BOOLEAN":return d(CA,{field:e});default:return null}}const NA=w({id:()=>"RuntimeExtension",displayName:"RuntimeExtension",suspenseName:({extension:e})=>Va(e.extensionPoint.target)?`runtime-extension-${e.id}`:void 0,load:()=>ll(()=>import("./49758c58.BTDNmyJ_.js"),__vite__mapDeps([246,1,2,3,4,5,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,16,48,49,50,51,52,53,54,55,12,56,75,23,11,13,57,22,9,58,59,60,10,14,15,247]))}),MA=e=>d(Qg,{children:e}),DA=({gap:e,children:t,condition:n,marginBlockStart:r,marginBlockEnd:a})=>{const i=e&&n?d(gf,{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":ye.spacing[r]},...a&&{"--extensions-margin-block-end":ye.spacing[a]}},children:i}):d(y,{children:i})};function zA({customizations:e,gap:t,options:n,transformComponents:r,render:a=MA,marginBlockStart:i,marginBlockEnd:o}){return 0===e.length?null:d(DA,{gap:t,condition:e.length>1,marginBlockStart:i,marginBlockEnd:o,children:e.map(e=>"uiExtension"===e.kind?d(NA,{options:n,extension:e.extension,transformComponents:r,render:a},e.extension.id):d(RA,{field:e.field},e.field.key))})}const OA=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
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 BA(){const{shopPay:e,i18n:t}=ie(),{footer:{content:{typography:n}={}}={}}=By(),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(OA,{"aria-hidden":"true",focusable:"false",className:"HTJIw"})}),i=d(mf,{href:r,target:"_blank",display:"block",children:a});return n?d(af,{size:n.size,color:n.color,type:"bold"===n.weight?"strong":void 0,children:i}):i}const FA=w({id:()=>"PrivacyPreferencesFooterLink",displayName:"PrivacyPreferencesFooterLink",suspense:!1,useError:function(e){const{observability:t}=ie();a(()=>{e&&function(e,t){e.error(t,{metadata:{privacyPreferencesFooterLink:{component:"PrivacyPreferencesFooterLink",failure:"lazy_load"}}})}(t,e)},[e,t])},load:()=>C(()=>ll(async()=>{const{deferredPrivacyComponents:e}=await(import("./2acfb1ce.Bd5HdRya.js"));return{deferredPrivacyComponents:e}},__vite__mapDeps([88,1,2,3,4,5,46,47,10,13,14,15,16])).then(({deferredPrivacyComponents:e})=>e.PrivacyPreferencesFooterLink))});function VA(){const e=rt(),{checkout:{identity:n},consentManager:r}=ie();return t(()=>e.value&&"shopPay"!==n.current.value&&r.shouldShowBanner.value)}const UA=Oc("DelegatedLinkModal");function qA(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(af,{color:"subdued",children:e},`${t}-${r}`)})}function jA(){const{embed:e,i18n:t,checkout:{configuration:n,proposal:r},shop:a}=ie(),{name:i}=a,o=Aw(),{currentDetour:s}=Kl().value,l=VA(),{footer:{alignment:c,content:{visibility:u,typography:p}={}}={}}=By(),{localPolicies:m,localPoliciesWithContent:h}=Ii(),g=a.hasFlagEnabled(Ai),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 P=m.find(e=>"privacy-policy"===e.handle),k=P.url,S=k?d(mf,{href:k,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(mf,{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(dA,{id:"google-privacy-policy-modal",defaultPolicy:{...P,name:t.translate("user_consent.google_embedded_checkout.privacy_policy_modal_title")}})]}),w=d(mf,{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(mf,{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")}),x=d(IE,{type:"small",textAlign:c,children:qA(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(IE,{size:"extraSmall",color:"subdued",textAlign:c,children:d(af,{type:"strong",children:["Your purchase from ",i," is subject to the"," ",d(HA,{href:"https://aka.ms/ConsumerCopilotTerms",heading:"Copilot Terms",children:"Copilot Terms"})," and the ",d(HA,{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(gf,{direction:"inline",alignItems:"center",gap:"small-400 base",justifyContent:c,children:[d(af,{size:"small",color:"subdued",children:t.translate("general.all_rights_reserved",{shop_name:i})}),d(gf,{direction:"inline",gap:"base",accessibilityRole:"unordered-list",children:[d(E,{when:l,children:d(Qg,{accessibilityRole:"list-item",children:d(FA,{})})}),d(E,{when:n.visibility.showDataSharingOptOut,children:d(Qg,{accessibilityRole:"list-item",children:d(BA,{})})})]})]}):d(gf,{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(dA,{id:i,defaultPolicy:e}),l=d(cf,{variant:"plain",commandFor:i,ref:o(n),children:a});return d(Qg,{accessibilityRole:"list-item",children:[b?d(af,{size:b.size,color:b.color,type:"bold"===b.weight?"strong":void 0,children:l}):l,s]},n)}),d(E,{when:l,children:d(Qg,{accessibilityRole:"list-item",children:d(FA,{})})}),d(E,{when:n.visibility.showDataSharingOptOut,children:d(Qg,{accessibilityRole:"list-item",children:d(BA,{})})})]});let T="purchase.checkout.footer.render-after";"thankYou"===s?.type&&(T="purchase.thank-you.footer.render-after");const L=fw(T),R="hidden"!==u&&!v,N=r.negotiated.fields.taxes.value,M=pA(N);return d(gf,{gap:"large-100",children:[f&&I,_&&x,R&&A,d(zA,{customizations:L,gap:"base"}),M&&d(mA,{liability:N.liability})]})}function HA({href:e,heading:t,children:n,...r}){const{checkout:a}=ie(),i=Bc(void 0,UA);return a.configuration.isWindowOpenDelegationEnabled?d(mf,{href:e,...r,children:n}):d(y,{children:[d(mf,{commandFor:i,...r,children:n}),d(ux,{id:i,source:e,heading:t})]})}function $A(){const{i18n:e,shop:t}=ie(),n=`${t.name} ${e.translate("general.page_title")}`;return d("h1",{className:Se({screenReaders:"only"}),children:n})}
2function YA(){const{client:e,i18n:t,checkout:{negotiator:r}}=ie(),{checkoutProtocolModalEventSignal:i}=r.context,o=n(()=>{window.location.assign(e.unstable_getSerialization("logoutUrl")||"")},[e]),s=RE(gy($n)).value;return a(()=>()=>{i.value="none"},[i]),s?d(ux,{id:"lost-permissions-modal",heading:t.translate("b2b_errors.lost_permissions_title"),size:"large",accessibilityLabel:t.translate("b2b_errors.lost_permissions_title"),blocking:!0,open:!0,onShow:()=>{i.value="b2bPermissions"},children:d(gf,{gap:"base",children:[d(af,{children:t.translate("b2b_errors.lost_permissions_subtitle")}),d(gf,{direction:"inline",gap:"base",justifyContent:"end",children:d(cf,{variant:"primary",onClick:o,children:t.translate("b2b_errors.log_out_link_text")})})]})}):null}function WA({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(ux,{source:r,open:o,blocking:!0,blockSize:"100%",size:"840px",accessibilityLabel:t,onIframeLoad:()=>n?.(r)}):null}function GA({source:e,logMessage:t,telemetryContext:r,logKey:o=e??void 0}){const{observability:s}=ie(),l=i();return a(()=>{e||(l.current=void 0)},[e]),n(n=>{e&&r&&(n&&n!==e||l.current!==o&&(l.current=o,s.log("action_required_modal_iframe_loaded",t,{...r,hasModalUrl:!0,..."pre_payment_buyer_action_required"!==r.actionType&&{sourceHostCategory:mb(e)}})))},[o,t,s,e,r])}function JA(){const{i18n:e}=ie(),n=function(){const{checkout:e,shopPay:n,observability:r}=ie(),a=i(),o=t(()=>{if(Di(n)&&n.threeDSModalUrl.value){const e=n.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:mb(e),hasModalUrl:!0},iframeLoadTelemetryContext:{modalSourceType:"spe_three_ds_modal_url"}}}const t=e.latestReceipt.value;if(t&&iy(t)){const e=t.action;if(sy(e))return{source:e.offsiteRedirect?void 0:e.url,logKey:JSON.stringify(["receipt",t.id,e.offsiteRedirect,e.url]),logMessage:"[ActionRequiredModalManager] Receipt requires further action",telemetryPayload:{modalSourceType:"receipt_action",sourceHostCategory:mb(e.url),offsiteRedirect:e.offsiteRedirect,actionType:e.type,hasModalUrl:!e.offsiteRedirect},iframeLoadTelemetryContext:{modalSourceType:"receipt_action",offsiteRedirect:e.offsiteRedirect,actionType:e.type}}}if("action_required"===t?.status&&"pre_payment_buyer_action_required"===t.action.type){const{action:e}=t;return{source:e.url,logKey:JSON.stringify(["receipt",t.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 k(()=>{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=GA({source:n?.source,logKey:n?.logKey,logMessage:"[ActionRequiredModalManager] Action required modal iframe loaded; this does not prove issuer challenge rendered",telemetryContext:n?.iframeLoadTelemetryContext});return d(WA,{source:n?.source,title:e.translate("processing.action_required"),onIframeLoad:r})}function KA(e,t){return e.has(t)}function QA(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&&KA(e.uiExtension.approvalScopes,ql.PaymentSessionModal))||null}jA.displayName="FooterContent",HA.displayName="DelegatedLink";const XA=w({id:()=>
2"PaymentChallengeModal",displayName:"PaymentChallengeModal",suspense:!1,useError:function(e){const{observability:t}=ie();a(()=>{e&&function(e,t){e.error(t,{metadata:{paymentChallengeModal:{component:"PaymentChallengeModal",failure:"lazy_load"}}})}(t,e)},[e,t])},load:()=>C(()=>ll(()=>import("./7fd9930c.xcSdfvu9.js"),__vite__mapDeps([248,1,26,3,4,2,5,27,10,13,14,15,16,249])))});function ZA({modalPaymentMethodConfig:e,onModalRender:n}){const{checkout:r,observability:a}=ie(),o=i(),s=m(void 0),l=t(()=>{const e=r.latestReceipt.value;return e&&oy(e)&&ly(e.action)?e:void 0});k(()=>{const t=l.value;if(!t||!ly(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}))}),k(()=>{const e=l.value;if(!e||!ly(e.action))return void(s.value=void 0);const t=function(e){return JSON.stringify([e.id,e.action.type,ly(e.action)?e.action.challengeType:void 0,ly(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=t(()=>{const t=l.value,n=e.value;if(t&&ly(t.action))return n?{type:t.action.challengeType,data:t.action.challengeData,config:n,expiresAt:s.value?.expiresAt}:null});return d(E,{when:c,children:e=>d(XA,{challengeType:e.type,challengeData:e.data,receipt:r.latestReceipt.value,paymentMethod:e.config,onModalRender:n,challengeExpiresAt:e.expiresAt})})}function eT(){const e=ma(),{checkout:n}=ie(),r=n.negotiator.current.fields.deferredTotal;return t(()=>{if(!e.value)return!0;const t=r.value?.amount.amount;return Boolean(Ia({checkout:n})||t)})}function tT({isModalRendered:e,modalPaymentMethodConfig:n}){const{i18n:r,checkout:a}=ie(),i=function(){const{i18n:e,shopPay:n,checkout:{negotiator:r}}=ie(),{managedByMarketsPro:a}=r.current.fields,i=eT();return t(()=>{if(!i.value)return;if(!zi({managedByMarketsPro:a.value}))return;const t=n.session.selectedPaymentMethod.value;return t&&Oi(t)?e.translate("processing.redirecting_title"):void 0})}();return t(()=>{if(i.value)return i.value;const t=a.latestReceipt.value;return t?iy(t)?r.translate("processing.redirecting_notice"):oy(t)?!e.value&&n.value?r.translate("processing.modal_notice",{paymentMethod:n.value.name}):r.translate("processing.wait.short"):!e.value&&n.value?.name&&Bi(n.value)&&"processing"===t.status&&n.value?r.translate("processing.modal_notice",{paymentMethod:n.value.name}):"processing_remote_checkouts"===t.status||"processed"===t.status&&t.completedRemoteCheckouts?.length?r.translate("processing.remote_shops_payments_processing"):r.translate("processing.wait.short"):r.translate("processing.wait.short")})}const nT=w({id:()=>"CryptoModalManager",displayName:"CryptoModalManager",suspense:!1,useError:function(e){const{observability:t}=ie();a(()=>{e&&t.error(e,{metadata:{cryptoModalManager:{component:"CryptoModalManager",failure:"lazy_load"}}})},[e,t])},load:()=>C(()=>ll(()=>import("./39bf6084.CPd-tVKF.js"),__vite__mapDeps([250,1,2,3,4,5,251,236,53,72,10,13,14,15,16,252])))});function rT(){const{checkout:e}=ie(),{paymentLines:n}=e.negotiator.parts,r=e.negotiator.current.fields.paymentMethods,a=t(()=>QA(r.value,n.value)),i=m(!1),o=tT({isModalRendered:i,modalPaymentMethodConfig:a}),s=rb();return k(()=>{if(e.latestReceipt.value)return Ou({content:o.value,role:"alert"})}),d(y,{children:[d(E,{when:s,fallback:d(JA,{}),children:d(nT,{})}),d(ZA,{modalPaymentMethodConfig:a,onModalRender:()=>{i.value=!0}})]})}function aT(){const{i18n:e,url:t,source:n,shop:a,checkout:i,shopPay:o}=ie(),s="shopPay"===i.identity.current.value,{plan:l,currentPage:c}=Kl().value,u=ma(),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=Fi(),y=Vi("SHOP_CASH"),v=it(),_=Ck(),{value:b}=i.negotiator.current.fields.managedByMarketsPro,P=zi({managedByMarketsPro:b}),{value:k}=i.negotiator.current.fields.paymentFlexibilityPaymentTermsTemplate,S=ki(),w=sn(h.deliveryNext),C=Tr(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(()=>a.vaultForPaymentLater&&Ui(m),[a.vaultForPaymentLater,m]),A=Boolean(k)&&!S.value,T=Kx();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"):I?e.translate("payment.vault_for_payment_later.pay_button_label"):A&&!T.value?e.translate("general.confirm_order_button_label"):u.value||E||x||f.value||g&&y.value?e.translate("general.complete_purchase_button_label"):P&&!s&&qi(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.y
2ou_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,g,f.value,y.value,T.value])}function iT(){const e=Kl();return t(()=>{const{plan:t}=e.value;return t.greenPath.some(({id:e})=>"review"===e)})}function oT(){const{checkout:{negotiator:e}}=ie(),{paymentLines:n}=e.parts;return t(()=>{const e=Boolean(It(n.value,"SHOP_PAY")),t=Boolean(It(n.value,"SHOPIFY_INSTALLMENTS"));return ji(n.value)&&!e&&!t})}function sT(){const{i18n:e}=ie();return d(Pf,{children:d(gf,{gap:"large-400",alignItems:"center",children:[d(Qg,{children:d(ef,{size:"large",appearance:"monochrome"})}),d(IE,{children:e.translate("general.processing")})]})})}function lT(){const{progressing:e}=Ql(),{i18n:n,embed:r,checkout:{negotiator:a}}=ie(),i=function(){const e=iT(),n=T(aT().nextPage.id),r=Jg(),{checkout:{offsitePopupController:a}}=ie();return t(()=>!(!r.value||a.isOpen.value||e.value&&"thankYou"!==n.value))}(),o=function(){const e=oT(),n=Kl(),r=T(aT().nextPage.id),{checkout:a}=ie(),i=a.configuration.layout.isOnePage,{inMemoryApplePayParts:{asPaymentMethod:o},walletUsedForSubmissionSignal:s}=un(),l=a.negotiator.parts.paymentLines;return t(()=>{if(!e.value)return!1;if(a.wallets.activeSession.value)return!1;const t=l.value;if(It(t,"PAYPAL_EXPRESS"))return!1;const c=It(t,"APPLE_PAY");return c?!o.value&&"APPLE_PAY"===s.value&&!!Hi(c)&&(i.value?"APPLE_PAY"!==a.wallets.escalatedWallet.value:"information"===n.value.currentPage?.id):i.value?!Nl({paymentLines:t,walletUsedForSubmission:s.value}):"GOOGLE_PAY"===s.value?"information"===n.value.currentPage?.id:"thankYou"===r.value})}(),s=a.parts.paymentLines,l=t(()=>"google"===r?.embedder&&Boolean(It(s.value,"GOOGLE_PAY"))),c=t(()=>e.value&&(o.value||i.value)&&!l.value);return k(()=>{if(c.value)return Ou({content:n.translate("general.processing")})}),d(E,{when:c,children:d(sT,{})})}function cT(e){return function(t){return Object.fromEntries(Array.from(e).map(e=>[e,t[e]]))}}function uT(e){return function(t){return Object.fromEntries(Object.keys(t).filter(t=>!e.has(t)).map(e=>[e,t[e]]))}}function dT(){const{i18n:e,embed:t}=ie();return t?.isEmbeddedCheckout()?null:d("a",{href:`#${Dw}`,className:"_9sntZ",children:e.translate("general.skip_to_content")})}function pT(){const{embed:e,i18n:t,checkout:{configuration:{allowRedirectToStorefront:r},negotiator:s}}=ie(),l=Ck(),{checkoutProtocolModalEventSignal:c}=s.context,{lastJourneyProgression:u}=s,p=i(!1);k(()=>{if(!pr(e?.embedder))return;const t=u.value;"failed"!==t.type||"tooManyRequests"!==t.reason||p.current||(p.current=!0,o(()=>Xn(e,"too_many_requests")))});const m=n(()=>{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(ux,{id:"too-many-requests-modal",heading:t.translate("too_many_requests.title"),size:"large",accessibilityLabel:t.translate("too_many_requests.title"),blocking:!0,open:!0,onShow:()=>{c.value="tooManyRequests"},children:d(gf,{gap:"base",children:[d(af,{children:g?t.translate("too_many_requests.body"):t.translate("too_many_requests.body_no_cart")}),g&&d(y,{children:[d(Qg,{display:"@media (inline-size >= small) none, block",children:d(cf,{variant:"primary",inlineSize:"fill",onClick:m,children:t.translate("too_many_requests.return_to_cart")})}),d(Ym,{display:"@media (inline-size >= small) auto, none",justifyItems:"end",children:d(cf,{variant:"primary",onClick:m,children:t.translate("too_many_requests.return_to_cart")})})]})]})}):null}function mT(){const e=yt(),{i18n:n}=ie(),r=t(()=>e.value?n.translate("order_summary.total_updated_label_with_price",{totalPrice:n.formatCurrency(e.value.amount,{currency:e.value.currencyCode,form:"name"})}):null),a=i(r.peek());return k(()=>{const e=r.value,t=a.current;if(a.current=e,e&&e!==t)return Ou({content:e})}),null}var hT={Progress:"xvcb04 xvcb03 _1fragemel _1frageme1 _1fragemf5 _1fragemdh _1fragemws _1fragemzf _1fragem32 _1fragem5u",toneVariant:{auto:"xvcb05",critical:"xvcb06"}};function gT({accessibilityLabel:e,id:t,max:n=1,tone:r="auto",value:a}){const i=zc(),o=Hu(),s=e||o("processing");return i&&null==a?d(IE,{children:s}):d("progress",{id:t,className:v(hT.Progress,hT.toneVariant[r]),value:a,max:n,"aria-label":s})}function fT({active:e=!1,announceProcessing:t=!0,children:n,loadingIndicatorVariant:r="spinner",showLoadingIndicator:i=!0}){const{i18n:o}=ie();a(()=>
2{if(e&&t)return Ou({content:o.translate("general.processing")})},[e,t,o]);const s=e&&i;return d(Qg,{children:[d(Qg,{inert:e,opacity:e&&"spinner"===r?70:void 0,children:n}),d("div",{className:Se({transitionProperty:"opacity",transitionTimingFunction:"easeInOut",transitionDuration:"slowest",pointerEvents:"none"}),style:{opacity:s?1:0},"aria-hidden":!s,children:["progressbar"===r&&d("div",{className:Se({position:"fixed",insetBlockEnd:"small400",insetInlineStart:"small400",insetInlineEnd:"small400"}),children:d(gT,{accessibilityLabel:o.translate("general.processing")})}),"spinner"===r&&d(Qg,{position:"absolute",insetBlock:"50% auto",insetInline:"50% auto",transform:"translate(-50%, -50%)",children:d(ef,{size:"large",accessibilityLabel:o.translate("general.processing")})})]})]})}function yT({children:e}){return d($i.Provider,{value:vT,children:e})}const vT=(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||!Yi(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 _T={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 PT({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:P,minBlockSize:k,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(lw().pending??{}),{pending:T,pendingInsetsRows:L,rowsInset:R}=lw(),N=R||!0===L&&ST(A.padding),M=y?d(CT,{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}=Up();return d(sw,{rowsInset:N,children:d(wT,{colorScheme:z,children:d(bT.Provider,{value:I,children:d(Qg,{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&&_T.colorSchemeVariant[z],B&&_T.autoBorderVariant[A.boxShadow??"none"],B&&_T.autoBorderWidthVariant[T?.borderWidth??"base"],O?_T["control"===p?"liftedControlSurface":"liftedSurface"]:kT(V,z,U,p),u),colorLayer:p||(z?"base":void 0),display:f,id:_,maxBlockSize:b,maxInlineSize:P,minBlockSize:k,minInlineSize:S,overflow:w,padding:A.padding??C,children:x>1&&"section"===t?d(du,{children:M}):M})})})})}function kT(e,t,n,r){if(!t){if(null==e||"transparent"===e||"baseSpecified"===e&&Wi.some(e=>e===n))return;return r?_T.surfaceBorderReset:_T.layerlessSurfaceBorderReset}if(t===n)return"transparent"===e?_T.surfaceBorderInherited:"baseSpecified"===e?_T.continuesColorScheme:void 0}function ST(e){return null!=e&&(Array.isArray(e)?e.some(ST):"object"==typeof e?Object.values(e).some(ST):String(e).replace(/@\w+\s*\([^)]*\)/g,"").split(/[\s,]+/).some(e=>
2""!==e&&"none"!==e))}function wT({children:e,colorScheme:t}){const n=Up(),{current:a}=n,i=r(()=>t&&t!==a?{parent:a,current:t}:n,[t,a,n]);return d(Vp.Provider,{value:i,children:e})}function CT({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(gf,{gap:r,children:[d(Kk,{children:t}),d("div",{children:n})]}):d(y,{children:[d(Kk,{children:t}),n]})}function ET(e){const{inlineSize:t}=JS(e),r=oe(t+2),a=m(2),o=i(null);return{ref:n(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 xT=e=>e.lineAllocations.map((t,n)=>IT(e,n)),IT=(e,t)=>{const{lineAllocations:n,...r}=e,a=n[t];if(!a)throw new TypeError(`Missing line allocation at index ${t}`);return{...r,lineComponents:AT(e.lineComponents,t),lineAllocation:a}},AT=(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 TT(e){const{proposed:t,negotiated:n}=e;return t?.itemPrice?.amount!==n?.itemPrice?.amount}function LT(e){return e.stableId}const RT=/^\$.merchandise.merchandiseLines\[(\d+)\]$/;function NT(e,t){const n=MT(t);if(null!=n)return e[n]}function MT(e){const t=RT.exec(e);if(null==t?.[1])return;const n=parseInt(t[1],10);return isNaN(n)?void 0:n}function DT(e,t,n){const r=new Set;for(const a of t){if(!n(a)||!("target"in a))continue;const t=NT(e,a.target);t?.stableId&&r.add(t.stableId)}return r}function zT(e,t=[]){return DT(e,t,e=>my([e])||hy([e]))}function OT(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 BT(e,t,n,r){const a=function(e,t){return[...new Set([...e.map(LT),...t.map(LT)])].map(n=>({proposed:e.find(e=>e.stableId===n),negotiated:t.find(e=>e.stableId===n)}))}(e,t);if(r)return VT(a.filter(r));const i=zT(e,n??[]),o=function(e,t=[]){return DT(e,t,e=>"MERCHANDISE_OUT_OF_STOCK"===e.code)}(e,n??[]);return VT(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 FT(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=>NT(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 VT(e){return e.flatMap(e=>Gi(e.proposed)||null==e.proposed?[e]:e.negotiated?[{proposed:void 0,negotiated:e.negotiated}]:[])}function UT(){const{checkout:{configuration:e,negotiator:t}}=ie(),n=e.layout.isOnePage.value,{value:a}=t.current.fields.merchandiseLines,{value:i}=t.current.fields.allViolations,{currentDetour:o}=Kl().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=zT(t,r),i=n.filter(({quantity:e,stableId:t})=>e>0&&!a.has(t)),o=BT(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 xT({...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(qT),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=>HT(t,e.stableId))}}(t,e,r))})}(s?o:i,t,s,e)}(n,t,r,i??[])},[u,d,n,l,p,c,i])}const qT=e=>({properties:e.properties,quantity:e.lineAllocation.quantity,stableId:e.lineAllocation.stableId,totalAmountBeforeReductions:e.lineAllocation.checkoutPriceBeforeReductions,merchandise:{deferredAmount:e.deferredAmount,digest:e.digest,disclosures:e.disclosures,giftCard:e.giftCard,image:e.image,options:e.options,itemPrice:e.itemPrice,productType:e.productType,productId:e.productId,vendor:e.vend
2or,requiresShipping:e.requiresShipping,sellingPlan:e.sellingPlan,subtitle:e.subtitle,title:e.title,variantId:e.variantId}}),jT=e=>kl(e.discountDetails.discount)&&"LINE"===e.discountDetails.discount.presentationLevel,HT=(e,t)=>({id:`allocation-${t}-${Ji(e.discountDetails.title)}`,discount:e.discountDetails.discount,amount:e.amount});function $T(){const{checkout:e}=ie(),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:WT(e.image)??void 0,totalAmountAfterLineDiscounts:e.priceAfterDiscounts,totalAmountBeforeReductions:e.price,quantity:e.quantity,subtitle:e.variantTitle,lineDiscounts:e.appliedDiscounts.filter(YT).map(e=>GT(e,t)),parentTitle:e.parentTitle,components:[],unitPrice:null,totalPrice:e.priceAfterDiscounts})),r=UT();return[...t?r.filter(e=>e.quantity>0):r,...n]}const YT=e=>"LINE"===e.presentationLevel,WT=e=>e?{...e,altText:e.altText||""}:null,GT=(e,t)=>({id:`allocation-${t}-${Ji(e.title)}`,discount:{type:"applied",title:e.title,presentationLevel:e.presentationLevel},amount:e.amountDiscounted});function JT(){const e=T($T()),{shop:{id:n},checkout:{negotiator:r}}=ie(),a=r.current.fields.remoteMerchandiseDetails;return t(()=>{const t=a.value?.stableIdToShopId??new Map,r=t.values(),i=new Map([[n,[]]]);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:Zi(e.merchandise.image),title:e.merchandise.productTitle,subtitle:e.merchandise.title??null,quantity:e.quantity.items,properties:Xi(e.merchandise.properties),options:e.merchandise.options??[],itemPrice:Qi(e.merchandise.price),totalAmountBeforeReductions:Qi(e.merchandise.price),totalAmountAfterLineDiscounts:Qi(e.merchandise.price),totalPrice:Qi(e.merchandise.price),deferredAmount:e.merchandise.deferredAmount?Qi(e.merchandise.deferredAmount):void 0,sellingPlan:Ki(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(n)?.push(a);continue}const e=t.get(a.stableId);e?i.get(e)?.push({...a,hideRuntimeExtensions:!0}):i.get(n)?.push(a)}return i})}var KT={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 QT=Oc("ResourceList");function XT({children:e,title:t,titleHidden:n,spacing:a="base",border:i="none"}){const o=Bc(void 0,QT),s=v(KT.ResourceList,a&&KT.rowGroupSpacingVariant[a],i&&KT.borderVariant[i]),l=t?d(Kk,{id:o,children:t}):null,c=r(()=>({spacing:a}),[a]);return d(y,{children:[t&&n?d("div",{className:KT.visuallyHidden,children:l}):l,d(du,{children:d("div",{role:"table","aria-labelledby":o,className:s,children:d(tL.Provider,{value:c,children:e})})})]})}function ZT({children:e,hidden:t,blockPadding:n}){const r=v(KT.ResourceListHeader,n&&!t&&KT.resourceListHeaderBlockPaddingVariant[n]);return d("div",{role:"rowgroup",className:v(KT.ResourceListRowGroup,t&&KT.resourceListHeaderHidden),children:d("div",{role:"row",className:r,children:e})})}function eL({children:e,primary:t,hidden:n}){return d("div",{role:"columnheader",className:v(t?KT.primary:void 0,n&&KT.visuallyHidden),children:e})}const tL=f(void 0);function nL({children:e}){return e?d("div",{role:"rowgroup",className:KT.ResourceListRowGroup,children:e}):null}const rL=f(void 0);function aL({spacing:e,children:t,showLines:n=!0}){const a=r(()=>({spacing:e}),[e]),i=r(()=>({showLines:n}),[n]);return d(tL.Provider,{value:a,children:d(rL.Provider,{value:i,children:t})})}function iL({lineOffset:e=0}){const t=h(rL);
2return d("div",{"aria-hidden":!0,className:KT.ResourceItemLineContainer,style:b({[KT.lineOffsetVar]:Pe(e)}),children:[d("div",{className:v(KT.ResourceItemLine,KT.ResourceItemLineVertical,t?.showLines&&KT.visibleLine)}),d("div",{className:v(KT.ResourceItemLine,KT.ResourceItemLineCurved,t?.showLines&&KT.visibleLine)})]})}function oL({alignSelf:e="auto",inlineAlignment:t,children:n,primary:r,hidden:a,minBlockSize:i,noWrap:o}){const{lineItems:s}=Vm(),l=t??s?.inlineAlignment??"center",{className:c,style:u}=zm({minBlockSize:i}),p=v(KT.ResourceItemContent,KT.resourceItemContentInlineAlignment[l],e&&KT.resourceItemContentAlignSelf[e],r&&KT.resourceItemContentPrimary,a&&KT.resourceItemContentHidden,o&&KT.resourceItemContentNoWrap,c);return d("div",{role:"cell",className:p,style:u,children:a?d("div",{className:KT.visuallyHidden,children:n}):n})}function sL({children:e,blockPadding:t="none",spacing:n="base",lineOffset:r=0,className:a}){const i=h(tL),o=h(rL);i||console.warn("<ResourceItem /> components must be wrapped in a <ResourceListBody /> component.");const s=v(KT.ResourceItem,t&&KT.resourceItemBlockPaddingVariant[t],i?.spacing&&KT.rowSpacingVariant[i.spacing],n&&KT.resourceItemSpacingVariant[n],o&&KT.groupedResourceItem,a);return d("div",{role:"row",className:s,children:[d(iL,{lineOffset:r}),e]})}var lL={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 cL({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
2:u="auto",visibility:p}){const m=o?d(Xm,{size:c,type:o,tone:uL(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(lL.Badge,lL.displayVariant[o?`${i}Grid`:`${i}Flex`],lL.toneColorVariant["auto"===u?"neutral":u][r],lL.sizeVariant[dL(c)],lL.borderRadiusVariant[a],o&&lL.iconVariant,"hidden"===p&&lL.visuallyHidden),"aria-hidden":"hidden"===t||void 0,children:e?d(y,{children:[d("span",{className:lL.visuallyHidden,children:e}),h]}):h})}function uL(e){switch(e){case"accent":case"warning":case"success":return"auto";default:return e}}function dL(e="base"){switch(e){case"small":case"small-100":return"small100";default:return e}}function pL(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 mL({stableId:e,merchandiseLines:t}){if(!e)return null;const n=pL(e,t);if(!n)return null;const{parent:r,index:a}=n;return IT(r,a)}function hL(){const{i18n:e}=ie();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 gL(){const e=hL();return function(t){return t?t.map(e):void 0}}function fL({available:e,name:t,value:n}){const r=`${t}: ${n}`;return"string"==typeof n&&0===n.lastIndexOf("https://cdn.shopify.com",0)?d(mf,{href:n,children:d(yL,{condition:e,children:d(af,{size:"small",color:"subdued",children:t})})}):d(yL,{condition:e,children:d(af,{size:"small",color:"subdued",children:r})})}function yL({condition:e,children:t}){return!1===e?d(af,{type:"redundant",children:t}):t}function vL({properties:e,available:t}){const n=e.flatMap(({name:e,visible:n,value:r,sourceType:a})=>n&&"MerchandisePropertyValueJson"!==a&&""!==r&&null!==r?[d(Qg,{accessibilityRole:"list-item",children:d(fL,{available:t,name:e,value:r})},e)]:[]);return n.length>0?d(gf,{accessibilityRole:"unordered-list",gap:"small-400",children:n}):null}function _L({id:e,deferredAmount:n,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:P="comma",optionsTypography:k={},titleTypography:S={}}}=Vm(),w=r(()=>e&&!v?{stableId:e}:null,[e,v]),C=u??"small",E=k.size??"small",{i18n:x,checkout:{negotiator:I}}=ie(),A=a&&a.length>0,T="middot"===P?" · ":", ",L=hL(),{value:R}=I.current.fields.merchandiseLines,N=Kl(),M=fw(t(()=>"thankYou"===N.value.currentDetour?.type?"Checkout::ThankYou::CartLineDetails::RenderAfter":"Checkout::CartLineDetails::RenderAfter").value),D=function({stableId:e,merchandiseLines:t}){const n=mL({stableId:e,merchandiseLines:t});return!n?.variantId}({stableId:e,merchandiseLines:R?.lines??[]})?[]:M,z={size:E,color:_},O={size:E,color:_};return d(Qg,{className:"dDm6x",children:[f||y?d(gf,{direction:"inline",gap:"small-300",children:[f?d(af,{size:"small",color:"subdued",children:f}):null,y?d(cL,{icon:"alert-circle",tone:"critical",children:x.translate("order_summary.unconfirmed_label")}):null]}):null,d(IE,{size:C,children:[d(bL,{condition:"bold"===S.weight,children:c}),h]}),d(gf,{children:[g,"inline"===b&&l?d(IE,{...O,children:l}):null,"inlineDescriptionList"===b&&A?d(IE,{...O,children:a?.map(({name:e,value:t})=>`${e}: ${t}`).join(T)}):null,"descriptionList"===b&&A?d(Qg,{accessibilityRole:"unordered-list",children:a?.map(({name:e,value:t})=>d(Qg,{accessibilityRole:"list-item",children:d(af,{...z,children:`${e}: ${t}`})},e))}
2):null,s?.name?d(IE,{...O,children:s.name}):null,o&&o.fixedPrice&&o.fixedPriceCount?d(IE,{...O,children:L(o)}):null,i&&d(vL,{properties:i}),m,w?d(zA,{customizations:D,options:w}):null]})]})}function bL({condition:e,children:t}){return e?d(af,{type:"strong",children:t}):t}function PL(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 kL=w({displayName:"ProductDisclosuresDetails",load:()=>C(()=>ll(()=>import("./7d468a18.C8tnppXa.js"),__vite__mapDeps([253,1,2,3,4,5,10,13,14,15,16]))),suspense:!1});var SL={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 wL=Um(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:P,onLoad:k}){const S=["presentation","none"].includes(u),{className:w}=zm({...Re({border:p,borderStyle:h,borderWidth:g}),borderRadius:m,objectFit:o}),C=VS(t,e),E=!(t||e||n),x=t??US(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:N}=QS(),M=P?{onError:e=>P(e.nativeEvent)}:{},D=k?{onLoad:e=>k(e.nativeEvent)}:{};return d(CL,{condition:S,children:d(EL,{condition:"auto"!==_,aspectRatio:c,children:d(BS,{condition:Boolean(C),children:[C,d("img",{...M,...D,src:x,srcSet:n,sizes:r,className:v(SL.Image,SL.inlineSizeVariant[_],E&&T&&SL.skeleton,E&&I&&SL.hidden,w,f),style:{...b({[SL.vars.animationDelay]:`${L}ms`,[SL.vars.animationDuration]:"4000ms"})},onAnimationStart:R,onAnimationIteration:N,loading:l,id:y,role:S?u:void 0,alt:S?"":i,"aria-hidden":E?"true":void 0})]})})})});function CL({children:e,condition:t}){return t?d(Qg,{accessibilityVisibility:"hidden",children:e}):d(y,{children:e})}function EL({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(SL.Wrapper,SL.aspectRatio),style:b({[SL.aspectRatioVar]:`${r}`}),children:e}):d(y,{children:e})}const xL={small:16,large:24};function IL({disclosure:e,size:t}){const n=e.symbol;if(n){const e=`${xL[t]}px`,r="small"===t?"":n.altText??"";return d(Qg,{inlineSize:e,blockSize:e,children:d(wL,{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(Xm,{type:"info",size:"small"===t?"small":"large-100",tone:"auto"})}const AL=Oc("product-disclosure-modal-"),TL=Oc("product-disclosure-tooltip-");function LL({disclosures:e,title:n}){const{checkout:{negotiator:r}}=ie(),a=Ex("deliveryNext");return t(()=>!a.value&&(0===r.initialUnresolvedFields.value.size||"fetch_failed"===r.pendingFieldsNegotiation.value?.status)).value&&e?.length?d(RL,{disclosures:e,title:n}):null}function RL({disclosures:e,title:t}){const{i18n:n}=ie(),r=Bc(void 0,AL),a=Bc(void 0,TL),i=kL.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(mf,{commandFor:r,interestFor:a,accessibilityLabel:l,onFocus:o,onMouseEnter:o,textDecoration:"none",tone:"monochrome",verticalAlign:"text-bottom",children:d(Xm,{type:"alert-triangle",size:"small"})}),d(nm,{id:a,children:NL(e)}),d(ux,{id:r,heading:s,children:d(kL,{disclosures:e})})]})}function NL(e){return d(Qg,{inlineAlignment:"start",children:d(gf,{gap:"small-200",children:e.map(e=>d(Ym,{gridTemplateColumns:"auto minmax(0, 1fr)",gap:"small-200",children:[d(Ym,{blockSize:"1lh",placeItems:"center",children:d(IL,{disclosure:e,size:"small"})}),d(IE,{textAlign:"start",children:e.title})]},e.id))})})}function ML({amount:e}){const{i18n:t}=ie();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(IE,{type:"small",color:"subdued",children:r})}const DL=f(null);var zL="_1mwdekd1 _1mwdekd0 _1fragem126 _1fragemzg _1fragem5u";function OL({children:e,id:t}){const{onToggle:n,isOpen:r,contentId:a}=h(DL)??{};return e?void 0!==r?d("button",{id:t,className:zL,onClick:n,"aria-controls":a,"aria-expanded":r,type:"button",children:[e,d(Xm,{size:"small-200",type:r?"chevron-up":"chevron-down",className:"_1mwdekd3 _1mwdekd2 _1fragem6e"})]}):d("p",{id:t,className:zL,children:e}):null}const BL=Oc("Details"),FL=function(e){const t=_(function(t,r){const{open:i,defaultOpen:o=!1,onToggle:l,id:c}=t,{upsertInteraction:u,deleteInteraction:p}=Dd(),[m,h]=s(o),g=i??m,f=n(()=>{const e=g?"open":"closed",t=g?"closed":"open";void 0===i&&h(!g),l?.(e,t)},[g,l,i]),y=n(()=>{g&&(void 0===i&&h(!1),l?.("open","closed"))},[g,l,i]),v=n(()=>{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?{...t,open:m,onToggle:f,ref:r}:{...t,ref:r})});return t.displayName=`ToggleCommandTargetComponent(${e.displayName||e.name||"Component"})`,t}(function({open:e,defaultOpen:t=!1,onToggle:a,onAfterToggle:o,id:l,summary:c,content:u,toggleTransition:p="auto"}){const m=void 0!==e,[h,g]=s(t),f=m?e:h,y=`${Bc(l,BL)}-content`,v=i(),_=n(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(OL,{children:c}):c,P=r(()=>({isOpen:f,onToggle:_,contentId:y}),[y,_,f]);return d(DL.Provider,{value:P,children:d("div",{id:l,children:[b,d(Sd,{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 VL({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:P="none",maxInlineSize:k="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 N=_d(),{Element:M,role:D}=$m(t,{defaultElement:N?"span":"div"}),{className:z,style:O,styleElement:B}=zm({alignSelf:r,backgroundColor:a,backgroundColorHoverAndFocus:i,blockSize:o,...Re({border:s,borderColor:l,borderStyle:u,borderWidth:p}),borderRadius:c,display:h,gridColumn:g,gridRow:f,inlineSize:b,maxBlockSize:P,maxInlineSize:k,minBlockSize:S,minInlineSize:w,padding:E,paddingBlock:x,paddingBlockEnd:I,paddingBlockStart:A,paddingInline:T,paddingInlineEnd:L,paddingInlineStart:R},{transforms:{display:ud}});return d(y,{children:[B,d(M,{"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})]})}const UL={auto:"block",inline:"inlineBlock",block:"block"},qL=e=>"auto"===e?"auto":e in dm?dm[e]:void 0,jL=e=>UL[e];function HL({blockSize:e="auto",display:t="auto",inlineSize:n="auto",id:r}){const{className:a,style:i}=zm({blockSize:e,display:t,inlineSize:n},{transforms:{blockSize:qL,display:jL,inlineSize:qL}});return d("div",{className:v(a),id:r,style:i})}function $L({components:e,id:t}){const a=e.some(({merchandise:e})=>e.disclosures?.length),[i,o]=s(e.length<=10||a),l=n(()=>{o(e=>!e)},[]),{i18n:c,embed:u}=ie(),{lineItems:{optionsColor:p="subdued"}}=Vm(),m={size:"small",color:p},h=fw("Checkout::CartLineDetails::RenderLineComponents"),g=r(()=>e.reduce((e,{quantity:t})=>e+t,0),[e]),f=r(()=>t?{stableId:t}:null,[t]);if(0===e.length)return null;if(f&&h.length>0){const t=e.filter(({merchandise:e})=>e.disclosures?.length);return d(gf,{gap:"base",overflow:"hidden",children:[d(zA,{customizations:h,options:f}),t.map(({stableId:e,merchandise:t})=>d(af,{size:"small",children:[t.title," ",d(LL,{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(FL,{open:i,onToggle:l,summary:d(OL,{children:d(af,{color:"subdued",size:"small",children:v})}),content:d(Qg,{paddingBlockStart:"small-400",children:d(gf,{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=PL(u,r);return d(Ym,{accessibilityRole:"list-item",gridTemplateColumns:"auto minmax(0, 1fr)",gap:"small-300",children:[d(VL,{alignSelf:"start",children:d(HS,{size:"small",src:p?.one,srcSet:p?`${p.one} 1x, ${p.two} 2x, ${p.four} 4x`:void 0,alt:r?.altText})}),d(VL,{alignSelf:"center",children:d(gf,{children:[d(af,i?.length?{size:"small",children:[l," ",d(LL,{disclosures:i,title:t})]}:{size:"small",children:l}),n&&d(af,{...m,children:n}),a&&d(af,{...m,children:a.name}),s&&d(vL,{properties:s})]})})]},e)})})})}),d(HL,{blockSize:"small-400"})]})}function YL({parentTitle:e}){const{i18n:t}=ie(),{lineItems:{optionsColor:n}}=Vm(),r={type:"small",color:n??"subdued"},a=t.translate("order_summary.group_title_label",{group_title:e});return d(IE,{...r,children:a})}function WL(e){return!0===e.checkoutHideZeroValueDiscountLines}function GL({discount:e,amount:t}){const{i18n:n,shop:r}=ie();if(WL(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(Ym,{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(Xm,{type:"discount",size:"small"}),d(af,{accessibilityVisibility:"exclusive",children:n.translate("order_summary.discount_code_aria_text")}),d(IE,{type:"small",color:"subdued",children:[d(af,{dir:"auto",children:i}),a?` ${a}`:null]})]},e.title)}function JL({totalAmountBeforeReductions:e,totalAmountAfterDiscounts:t,size:n}){const{i18n:r}=ie(),a=t.amount>0?r.formatCurrency(t.amount,{currency:t.currencyCode,form:"short"}):d(af,{letterCase:"uppercase",children:r.translate("order_summary.free_total_label")});return d(y,{children:[d(af,{accessibilityVisibility:"exclusive",children:r.translate("order_summary.original_price")}),d(af,{size:"small",color:"subdued",type:"redundant",children:r.formatCurrency(e.amount,{currency:e.currencyCode,form:"short"})}),d(af,{accessibilityVisibility:"exclusive",children:r.translate("order_summary.price_after_discount_aria_text")}),d(IE,{size:n,children:a})]})}function KL({totalAmountBeforeReductions:e,totalAmountAfterLineDiscounts:t,compareAtTotal:n,presentationLevel:r,hasDeferredAmount:a,hasFailed:i,size:o}){const{i18n:s}=ie(),{lineItems:{priceTypography:l={}}}=Vm();let c;if(i?c="redundant":"bold"===l.weight&&(c="strong"),n&&e.amount<n.amount)return d(JL,{totalAmountAfterDiscounts:t,totalAmountBeforeReductions:n,size:o});if(e.amount>t.amount&&"LINE"===r)return d(JL,{totalAmountAfterDiscounts:t,totalAmountBeforeReductions:e,size:o});const u=0===e.amount&&!a,p=t;return d(af,{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 QL({unitPrice:e}){const t=function(e){const{i18n:t}=ie(),r=function(){const{i18n:e}=ie();return n(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=t.formatCurrency(e.price.amount,{currency:e.price.currencyCode,form:"short"});if("ITEM"===i){if(1===a)return t.translate("order_summary.unit_price.per_item.single",{price:l});if(a>1)return t.translate("order_summary.unit_price.per_item",{price:l,count:a})}else{if(1===a)return t.translate("order_summary.unit_price.per_unit.single",{price:l,unit:o});if(a>1)return t.translate("order_summary.unit_price.per_unit.plural",{price:l,unit:o,count:s})}return""}(e);return null===e?null:d(IE,{type:"small",color:"subdued",children:t})}function XL({unitPrice:e,itemPrice:t,quantity:n}){const{i18n:r,checkout:{negotiator:a}}=ie(),i=a.current.fields.buyerIdentity.value?.purchasingCompany,o=Boolean(i)&&!e&&n>1&&t;return e?d(QL,{unitPrice:e}):o?d(y,{children:d(IE,{type:"small",color:"subdued",children:[d(af,{accessibilityVisibility:"hidden",children:r.translate("order_summary.price_per_item.label",{price:r.formatCurrency(t.amount,{currency:t.currencyCode,form:"short"})})}),d(af,{accessibilityVisibility:"exclusive",children:r.translate("order_summary.price_per_item.accessibility_label",{price:r.formatCurrency(t.amount,{currency:t.currencyCode,form:"short"})})})]})}):null}const ZL={small200:"small-200",small100:"small",base:"base",large100:"large",large200:"large-200"};function eR(e="base"){return ZL[e]}function tR(e){const t=e.parentRelationship;return d(t?aL:y,{spacing:"small100",children:d(nR,{...e})})}function nR({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:P,components:k,hasReturnability:S,parentTitle:w,parentRelationship:C,remoteShopName:E,hasFailed:x,hideRuntimeExtensions:I,hidePrice
2:A,className:T}){const{shop:L,i18n:R,embed:N}=ie(),M=PL(N,g),{lineItems:{quantityVisibility:D="visible",priceLayout:z="inline",priceTypography:O={},titleTypography:B={}},merchandiseThumbnail:{size:F}={}}=Vm(),V=L.hasFlagEnabled(eo),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":eR(F),Y=B.size??"base",{blockSize:W}=JS($),G="hidden"===D||1===t&&"visibleWhenMultiple"===D?void 0:t,J=A?null:d(KL,{totalAmountBeforeReductions:b,totalAmountAfterLineDiscounts:P,compareAtTotal:q,presentationLevel:o.length||j?.amount?"LINE":"CART",hasDeferredAmount:Boolean(s?.amount),hasFailed:x,size:H});return d(sL,{className:T,lineOffset:C?0:W/2,children:[d(oL,{inlineAlignment:"start",children:d(HS,{size:$,src:M?.one,srcSet:M?`${M.one} 1x, ${M.two} 2x, ${M.four} 4x`:void 0,alt:g?.altText,totalItems:G})}),d(oL,{primary:!0,alignSelf:"baseline",minBlockSize:`${W}px`,children:d(_L,{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(LL,{disclosures:v,title:m})]}):void 0,blockLayoutContent:"block"===z?J:void 0,remoteShopName:E,hasFailed:x,hideRuntimeExtensions:I,children:[_?d(af,{size:"small",color:"subdued",children:R.translate("payment.shop_pay_hsa.eligible_product")}):null,S?d(af,{size:"small",color:"subdued",children:R.translate("amazon_pay.prime_returnability")}):null,d(XL,{unitPrice:i,itemPrice:n,quantity:t}),j?.amount?d(ML,{amount:j}):null,o.length>0||k.length>0?d(y,{children:[o.map(e=>d(GL,{discount:e.discount,amount:e.amount},e.id)),d($L,{components:k,id:e})]}):null,k.length<1&&w?d(YL,{parentTitle:w}):null]})}),d(oL,{hidden:!0,children:d(af,{children:t})}),"inline"===z?d(oL,{alignSelf:"baseline",children:d(Qg,{className:"VnYYd",inlineAlignment:"end",children:J})}):null]})}function rR(e){switch(e){case"PICK_UP":return"kAxbv";case"SHIPPING":return"KKoGf";default:return}}function aR(e){return e!==Me.Country&&e!==Me.CountryProvince}function iR({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 oR(e,t,n,r,a){const i=Ay(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 sR(e){const t=[],n=[];return e.forEach(e=>{"SUBSCRIPTION"===e.type?t.push(e):n.push(e)}),{subscriptionLines:t,oneTimePurchaseLines:n}}function lR(e,t,n){const r=Ay(t,e.handle);let a;return r&&r.minDeliveryDateTime&&r.maxDeliveryDateTime&&n&&(a=r),{deliveryExpectation:a,shopPromise:r?.brandedPromise}}function cR(e){return e.reduce((e,{quantity:t})=>e+t,0)}function uR(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 dR(e){if(!e)return[];const t=e.reduce((e,t)=>{const n=t?.flatRateGroupId??ml(),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 pR(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 mR={position:"end",source:"magnify"};function hR({hasFilter:e,maxItems:t,merchandiseLines:n,totalLineQuantities:a,deliveryGroup:i}){const[o,l]=s(""),{i18n:c,checkout:u}=ie(),p=new Set(no(u.proposal.negotiated.fields.paymentMethods.value)),m=void 0===t?n.map(e=>e.key):n.slice(0,t).map(e=>e.key),h=pR(n.map(e=>e.key),m),g=rR(i),{value:f}=ai(),{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={};
2return 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!==to)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]),P=r(()=>b?.reduce((e,t)=>e+t.quantity,0),[b]),k=n.length;return d(y,{children:[e&&d(y,{children:[d(WI,{autoFocus:!0,icon:mR,controlledValue:o,onInput:e=>l(e),label:c.translate("order_summary.more_items_modal.search_item")}),d(HL,{blockSize:"large-300"})]}),e&&o&&d(y,{children:[d(gf,{direction:"inline",justifyContent:"space-between",children:[d(af,{color:"subdued",children:c.translate("order_summary.more_items_modal.number_items_shown",{shownNumber:P,totalNumber:a||k||0})}),d(mf,{onClick:()=>l(""),children:c.translate("order_summary.more_items_modal.clear_search")})]}),d(HL,{blockSize:"large-300"})]}),e&&0===b.length?d(gf,{direction:"inline",justifyContent:"center",gap:"small-400",padding:"none none large-300 none",children:[d(Qg,{inlineSize:"56px",children:d(Xm,{size:"fill",type:"alert-circle"})}),d(IE,{textAlign:"center",children:c.translate("order_summary.more_items_modal.empty_results",{searchText:o})})]}):d(XT,{title:c.translate("order_summary.shopping_cart_label"),titleHidden:!0,children:[d(ZT,{hidden:!0,children:[d(eL,{hidden:!0,children:c.translate("order_summary.product_image_label")}),d(eL,{hidden:!0,children:c.translate("order_summary.description_label")}),d(eL,{hidden:!0,children:c.translate("order_summary.quantity_label")}),d(eL,{hidden:!0,children:c.translate("order_summary.price_label")})]}),d(nL,{children:b.map(({key:e,...n},r)=>{if(void 0!==t&&r>=t)return null;const a=e.substring(0,e.lastIndexOf("-"));return d(tR,{...n,isHsaEligible:Boolean(n.productId&&p.has(n.productId)),..._[a]??{},className:h.has(e)?g:void 0},e)})})]})]})}function gR({merchandiseLines:e,modalId:t="merchandise-lines-modal",totalLineQuantities:n,deliveryGroup:r}){const{i18n:a}=ie(),i=e.length,o=i>16?12:16;return d(y,{children:[d(hR,{maxItems:o,merchandiseLines:e,totalLineQuantities:n,deliveryGroup:r}),i>o&&d(gf,{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(ux,{id:t,heading:a.translate("order_summary.number_items",{count:n||i||0}),blockSize:"100%",children:d(hR,{hasFilter:!0,merchandiseLines:e,totalLineQuantities:n})})]})]})}function fR({merchandiseLinesByDeliveryType:e}){const{i18n:n}=ie(),r=t(()=>{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 n.translate("delivery_options.pickup");case"SHIPPING":return n.translate("delivery_options.ship");case"NOT_REQUIRED":return n.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(gf,{gap:"large-200",children:d($,{each:r,getKey:e=>e.group,children:({group:e,merchandiseLines:t,totalLineQuantities:n})=>d(gf,{gap:"base",children:[d(Kk,{level:2,children:a(e)}),d(gR,{merchandiseLines:t,modalId:i(e),totalLineQuantities:n,deliveryGroup:e})]})})})}function yR({merchandiseLinesByShop:e,totalLineQuantities:t}){const{i18n:n,shop:{id:i,name:o,remoteShopsConfigMap:s},observability:l}=ie(),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 _R("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=!_,P=r(()=>m.flatMap(([e,t])=>t.map(t=>({...t,...b?{remoteShopName:s?.get(e)?.name}:{}}))),[m,b,s]);if(0===P.length)l.error(new vR);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:P,includeTotalLineQuantities:!1})}return d(gf,{gap:"large-200",children:Array.from(c.entries()).map(([e,{lines:n,includeTotalLineQuantities:r}])=>d(gf,{gap:"base",children:[d(Kk,{level:2,children:e}),d(gR,{merchandiseLines:n,totalLineQuantities:r?t:void 0})]},e))})}class vR extends sl{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 _R extends sl{constructor(){super(...arguments),this.name="MissingRemoteShopNamesError",this.defaultGroupingHash="missing_remote_shop_names"}}const bR=["PICK_UP","SHIPPING","NOT_REQUIRED"];function PR(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 PR(e.deliveryMethodTypes)}function SR(e){if("not_required"===e.status)return"NOT_REQUIRED";const t=e.methods.find(({handle:t})=>t===e.selectedDeliveryMethodHandle);return PR(t?[t.methodType]:e.methods.map(({methodType:e})=>e))}function wR(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 CR="PP6CV",ER=Oc("CollapsibleLineItems"),xR=e=>d(PT,{children:e}),IR=x(function(){const e=T($T()),n=JT(),{i18n:r,shop:{id:a}}=ie(),i=Kl(),{lineItems:{priority:o="base",blockPadding:s,quantityVisibility:l="visible",sectionLayout:c="fixed"},merchandiseThumbnail:{shadow:u}={}}=Vm(),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=t(()=>"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=fw(f.dynamicRender,"ORDER_SUMMARY1"),v=fw(f.dynamicRender,"ORDER_SUMMARY2"),_=fw(f.cartLinesRenderAfter),b=t(()=>Array.from(n.value.values()).reduce((e,t)=>
2e+t.reduce((e,t)=>e+t.quantity,0),0)),P=t(()=>Array.from(n.value.entries()).some(([e,t])=>e!==a&&t.length>0)),k=t(()=>e.value.length>0||P.value),S=function(){const e=Fx(),n=Kl(),r=T($T()),{checkout:{negotiator:a}}=ie(),{deliveryNext:i,merchandiseLines:o}=a.current.fields,{deliveryLines:s,merchandiseLines:l}=a.parts;return t(()=>{const t=r.value,a=new Map;if(0===t.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=wR(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 t){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)})&&!Ry(n.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=SR(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(t.some(({key:e})=>!p.has(e)))return a;const v=new Map;for(const e of bR){const t=d.get(e);t?.size&&v.set(e,Array.from(t.values()))}return v})}(),w=t(()=>!P.value&&S.value.size>1),C="collapsible"===c&&!P.value&&e.value.length>1,x=d(AI,{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(E,{when:P,fallback:d(E,{when:w,fallback:d(gR,{merchandiseLines:e.value,totalLineQuantities:b.value}),children:d(fR,{merchandiseLinesByDeliveryType:S})}),children:d(yR,{merchandiseLinesByShop:n.value,totalLineQuantities:b.value})})});return d(E,{when:k,children:d(gf,{gap:"large-200",children:[d(zA,{customizations:y,render:xR}),d(PT,{children:C?d(AR,{merchandiseLines:e.value,showQuantityBadges:m,children:x}):x}),d(zA,{customizations:_,render:xR}),d(zA,{customizations:v,gap:"large-200",render:xR})]})})});function AR({children:e,merchandiseLines:t,showQuantityBadges:n}){const r=m(!0),{i18n:a}=ie(),{size:i}=Vm().merchandiseThumbnail??{},o=eR(i),s=a.translate("order_summary.number_items",{count:t.reduce((e,t)=>e+t.quantity,0)}),l=Bc(void 0,ER),{blockSize:c}=JS(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(af,{children:s}),h=e=>d(Ym,{gridTemplateColumns:"minmax(0, 1fr) max-content",alignItems:"start",gap:"base",inlineSize:"100%",children:[d(Qg,{minInlineSize:"0",overflow:"hidden",children:e}),d(gf,{direction:"inline",alignItems:"center",gap:"small-300",children:[p(),d(Xm,{type:"chevron-down",size:"small-100"})]})]}),g=()=>d(gf,{direction:"inline",alignItems:"center",justifyContent:"space-between",inlineSize:"100%",children:[p(),d(Xm,{type:"chevron-up",size:"small-100"})]});return d(Qg,{position:"relative",minBlockSize:`${c}px`,children:[d(Sd,{id:`${l}-expanded-content`,open:!r.value,renderChildrenWhenCollapsed:!0,duration:"base",properties:["height","o
2pacity"],children:d(gf,{gap:"base",children:[d("div",{"aria-hidden":"true",children:g()}),d("div",{id:l,children:e})]})}),d(Sd,{id:`${l}-thumbnails`,open:r.value,duration:"base",properties:["height","opacity"],children:d("div",{"aria-hidden":"true",children:h(d(TR,{thumbnailMerchandise:u,thumbnailSize:o,showQuantityBadges:n}))})}),d("div",{className:"tndLB",children:[d("div",{"aria-hidden":"true",className:"anPJT",children:[d(Sd,{id:`${l}-expanded-toggle-size`,open:!r.value,duration:"base",properties:["height"],children:g()}),d(Sd,{id:`${l}-collapsed-toggle-size`,open:r.value,duration:"base",properties:["height"],children:h(d("div",{className:CR,children:d(uI,{variant:"inline-discrete",merchandise:u.slice(0,1),size:o,max:1,useImageAltTexts:!1,showQuantityBadges:n})}))})]}),d("div",{className:"vv9lW",children:d(qm,{accessibilityLabel:s,"aria-controls":l,"aria-expanded":!r.value,blockSize:"100%",inlineSize:"100%",onClick:()=>{r.value=!r.value}})})]})]})}function TR({thumbnailMerchandise:e,thumbnailSize:t,showQuantityBadges:n}){const{ref:r,max:a}=ET(t);return d("div",{ref:r,className:CR,children:d(uI,{variant:"inline-discrete",merchandise:e,size:t,max:a.value,useImageAltTexts:!1,showQuantityBadges:n})})}function LR(){const e=i();return a(()=>()=>{const t=e.current;t&&hl.containers.delete(t)},[]),t=>{t&&(e.current&&hl.containers.delete(e.current),hl.containers.add(t),e.current=t)}}const RR=f({spacing:"auto"});function NR({spacing:e,children:t}){const n=r(()=>({spacing:e}),[e]);return d(RR.Provider,{value:n,children:t})}function MR(){return h(RR)}var DR={colorVariant:{base:"nfgb6p5",subdued:"nfgb6p6"},groupSpacingVariant:{auto:"nfgb6p9","small-200":"nfgb6pa","small-300":"nfgb6pb","small-400":"nfgb6pc","small-500":"nfgb6pd"},spacingVariant:{auto:"nfgb6p7",none:"nfgb6p8"},visuallyHidden:"nfgb6p4 _1fragem121",MoneyLines:"nfgb6p3 nfgb6p2 _1fragem6t"},zR={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 OR(e){return"children"in e&&DS(e.children)}function BR(e){const{spacing:t}=MR(),{moneyLines:{color:n="base"}}=Vm(),{itemSize:r="inherit",layout:a="inherit",color:i}=e,o=i??n,s=v(zR.MoneyLine,r&&zR.itemSizeVariant[r],t&&DR.groupSpacingVariant[t],a&&zR.layoutVariant[a]);return d("div",{className:s,role:"row",children:OR(e)?e.children:d(y,{children:[d(FR,{children:d(af,{color:e.labelColor,children:e.label})}),d(VR,{loading:e.loading,children:e.loading?d(rw,{size:e.size,emphasis:"strong"===e.type?"bold":void 0,children:e.value}):d(af,{type:e.type,size:e.size,translate:!1,color:o,children:e.value})})]})})}function FR({children:e}){return d("div",{className:zR.Header,role:"rowheader",children:e})}function VR({children:e,loading:t,colSpan:n}){return d("div",{className:n?zR.contentColSpan:zR.Content,role:"cell","aria-busy":t||void 0,"aria-colspan":n,children:e})}const UR=Oc("MoneyLine-Heading"),qR=_(function(e,t){const{children:n,title:r,titleHidden:a=!0,spacing:i="auto"}=e,o=Bc(void 0,UR),s=Hu(),{moneyLines:{color:l="base"}}=Vm(),c=d(Kk,{id:o,children:r});return d(y,{children:[a?d("div",{className:DR.visuallyHidden,children:c}):c,d("div",{role:"table","aria-labelledby":o,children:[d("div",{role:"rowgroup",className:DR.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(DR.MoneyLines,DR.colorVariant[l],DR.spacingVariant[i]),ref:t,children:n})]})]})});function jR({children:e}){return"function"==typeof e?e():e}function HR({children:e}){let t,n;return Y.forEach(e,e=>{var r;W(e)&&(t||void 0===e.props.condition?n||e.type!==jR||(n=e):("function"==typeof(r=e.props.condition)?r():r)&&(t=e))}),t??n??null}function $R({condition:e,children:t,skeletonContent:n,...r}){return d(y,{children:[d(rw,{...r,delay:!1,display:e?r.display??"auto":"none",children:n??t},"skeletonTextKey"),d(af,{...r,display:e?"none":r.display??"auto",children:t},"textKey")]})}HR.When=function({children:e}){return"function"==typeof e?e():e},HR.Fallback=jR;const YR=Oc("TaxesTooltip");function WR({label:e,subdueText:t}){const{i18n:n,source:r}=ie(),a=Bc(void 0,YR);return d(y,{children:[d(af,{color:t?"subdued":void 0,children:e}),d(Xm,{type:"question-circle",size:"small",interestFor:a,accessibilityLabel:n.translate("tooltip.accessibility_label_context",{context:e})}),d(nm,{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 GR({totalTax:e,showMoneyLineTaxesTooltip:t,loading:n=!1,taxesLabel:r,hasLandedCostDetails:a=!1,subdueText:i}){const{i18n:o}=ie(),s=i?"subdued":void 0;return d(BR,{color:s,children:[d(FR,{children:d(HR,{children:[d(HR.When,{condition:Boolean(r),children:d(af,{color:s,children:r})}),d(HR.When,{condition:Boolean(a),children:d(af,{color:s,children:o.translate("order_summary.taxes_label")})}),d(HR.Fallback,{children:d(gf,{direction:"inline",alignItems:"center",gap:"small-300",children:d(WR,{label:o.translate("order_summary.estimated_taxes_label"),subdueText:i})})})]})}),d(VR,{children:d(gf,{direction:"inline",gap:"small-200",children:[t?d(gf,{direction:"inline",alignItems:"center",gap:"small-300",children:[d(WR,{subdueText:i,label:o.translate("order_summary.estimated_taxes_label_short")}),d(af,{color:s,children:"•"})]}):null,d($R,{condition:n,color:s,children:n?"$0.00":o.formatCurrency(e.amount,{currency:e.currencyCode,form:"short"})})]})})]})}const JR={marginTop:"0"};function KR({id:e,title:t,subdueTitle:n,tooltipText:r,children:a,item:i,hideHeaderItemWhenOpen:o=!1,defaultOpen:s=!1}){const{i18n:l}=ie(),c=m(s);return d(y,{children:[d(BR,{children:[d(FR,{children:d(gf,{direction:"inline",gap:"small-200",alignItems:"center",children:[d(qm,{"aria-expanded":c.value,"aria-controls":`recurring-totals-collapsible-${e}`,onClick:()=>{c.value=!c.value},children:d(Ym,{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(IE,{color:n?"subdued":void 0,textAlign:"start",children:t}),d(Xm,{type:c.value?"chevron-up":"chevron-down",size:"small-200"})]})}),r?d(qm,{accessibilityLabel:l.translate("tooltip.accessibility_label_context",{context:t}),overlay:d(nm,{children:r}),children:d(Xm,{type:"question-circle",size:"small"})}):null]})}),!i||o&&c.value?null:i]}),d("div",{style:JR,children:d(Sd,{open:c.value,id:`recurring-totals-collapsible-${e}`,children:a})})]})}function QR(){const{checkout:e}
2=ie(),n=e.negotiator.current.fields.taxes,r=ro();return t(()=>{const t=e.proposal.facts.tax,a=n.value,i=t||("available_total_included"===a?.status?a.totalIncludedInTarget:null);return{localTotalTaxIncluded:i,totalTaxIncluded:r.value??i}})}function XR(){const{i18n:e}=ie(),n=QR();return t(()=>{const{totalTaxIncluded:t}=n.value;return null===t?null:e.translate("order_summary.vat_label_html",{amount:e.formatCurrency(t.amount,{currency:t.currencyCode,form:"short"})})})}function ZR({label:e}){return d(NR,{spacing:"small-500",children:d(BR,{children:[d(FR,{children:d(IE,{color:"subdued",children:d(MI,{children:e})})}),d(VR,{})]})})}function eN({taxesIncluded:e,variant:n,shopId:r}){const{i18n:a}=ie(),i=ao(),{localTotalTaxIncluded:o,totalTaxIncluded:s}=QR().value,l=XR(),c=io(o),u=t(()=>[...c.value.entries()]),p=t(()=>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(ZR,{label:t})}return e&&null!==s&&null!==l.value&&0!==s.amount?"card"===n?d(Qg,{children:d(IE,{color:"subdued",children:d(MI,{children:l})})}):d(E,{when:p,fallback:d(ZR,{label:l.value}),children:d(KR,{id:"included-tax-money-line",title:l.value,children:d(NR,{spacing:"small-400",children:d($,{each:u,getKey:([e])=>e,children:([,e])=>d(GR,{totalTax:e.totalTax,taxesLabel:e.shopName,showMoneyLineTaxesTooltip:"available_total"===e.status,subdueText:!0})})})})}):null}function tN({title:e,value:t,color:r,labelColor:a}){const i=function(){const{i18n:e}=ie();return n(t=>e.formatCurrency(t.amount,{currency:t.currencyCode,form:"short"}),[e])}();return d(BR,{label:e,value:i(t),color:r,labelColor:a})}function nN({variant:e,shopId:n}){const{checkout:r}=ie(),{value:a}=r.negotiator.current.fields.deferredTotal,i=it(),o=oo(),s=t(()=>o.value||Boolean(r.proposal.facts.taxesIncluded)),{value:l}=r.negotiator.current.fields.paymentFlexibilityPaymentTermsTemplate,c=a&&a.amount.amount>0,u=ki(),p=aI(),m=t(()=>Boolean(u.value&&!p.value)),h=function(e,t){const{i18n:n}=ie(),r=Jx();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")}(a?.dueAt||(l?.dueDate?new Date(l.dueDate):null),"FULFILLMENT"===l?.type);return!c||i.value?null:d(y,{children:["card"===e?d(Qg,{background:"subdued",padding:"small-300",borderRadius:"small",children:d(tN,{title:h,value:a.amount,color:"subdued",labelColor:"subdued"})}):d(NR,{spacing:"small-300",children:d(tN,{title:h,value:a.amount})}),"card"!==e&&d(E,{when:m,children:()=>d(eN,{taxesIncluded:s.value,shopId:n})})]})}const rN=Oc("ReductionTooltip");function aN({type:e}){const{i18n:t,shop:{name:n}}=ie(),r=Bc(void 0,rN),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(Xm,{type:"question-circle",size:"small",interestFor:r}),d(nm,{id:r,children:d(af,{children:a})})]})}function iN({line:e,title:t,amount:n}){const{i18n:r,source:a,shop:i}=ie(),o=Fn(a)&&n,s=WL(i);if(e&&!Pl(e)||e&&"CART"!==e.discount.presentationLevel||e&&0===e.amount?.amount&&s)return null;if(e&&(Sl(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(BR,{children:[d(FR,{children:d(Ym,{gridAutoFlow:"column",gridTemplateColumns:"minmax(auto, max-content) minmax(0, 1fr)",gridTemplateRows:"minmax(0, 1fr)",gap:"small-400",alignItems:"center",alignContent:"center",children:[d(Xm,{type:"discount",size:"small"}),d(FI,{children:d(af,{color:"subdued",children:e?l?.toUpperCase():t?.toUpperCase()})})]})}),d(VR,{children:d(af,{translate:!1,children:o?(c=n,r.formatCurrency(-c.amount,{currency:c.currencyCode,form:"short",spacedMinusSign:!0})):e&&oN({line:e,freeShippingLabel:r.translate("order_summary.free_shipping_discount_label"),i18n:r})})})]});var c}function oN({line:e,freeShippingLabel:t,i18n:n}){if(e.allocations.some(e=>"DELIVERYLINE"===e.target.type)||0===e.allocations.length)return t;if(Pl(e)){const t=e.amount?.amount,r=e.amount?.currencyCode;if(t&&r)return n.formatCurrency(-t,{currency:r,form:"short",spacedMinusSign:!0})}}const sN=({disableTooltip:e=!1})=>{const{i18n:n,checkout:r,source:a,shop:i}
2=ie(),o=r.negotiator.current.fields.discountLines,s=r.proposal.facts.orderDiscounts??[],l=Fn(a)&&s,c=WL(i),u=ao(),p=t(()=>{return e=o.value?.lines,t=c,e?.filter(e=>Pl(e)&&so(e)&&!(t&&0===e.amount?.amount))??[];var e,t}),m=t(()=>!e&&u.value),h=t(()=>p.value.length>0),g=t(()=>n.translate("order_summary.discount_order_stacking",{count:p.value.length}));return d(y,{children:[d(E,{when:h,children:()=>d(BR,{children:d(FR,{children:d(Ym,{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(af,{children:g}),d(E,{when:m,children:d(aN,{type:"discount"})})]})})})}),d(NR,{spacing:"small-500",children:[d($,{each:p,getKey:e=>e.title,children:e=>d(iN,{line:e})}),l&&s.map(e=>d(iN,{title:e.label,amount:e.amount},e.label))]})]})};function lN(e,t){return e||("available_total"===t?.status?t.totalDuty:null)}const cN=Oc("DutyMoneyLineTooltip");function uN({shopId:e}){const{i18n:t,checkout:n,shop:r}=ie(),{value:a}=n.negotiator.current.fields.landedCostDetails,i=mn("landedCostDetails").value,o=mn("duties").value,s=n.proposal.facts.duty,{value:l}=n.negotiator.current.fields.duties,c=Bc(void 0,cN);if(e&&e!==r.id)return null;const u=lN(s,l),p=a?.incoterm===wl.Ddu&&a.reason===Cl.ErrorOccured,m=(o||i)&&!s&&!p,h=u||p,g=p?"subdued":void 0,f=d(gf,{direction:"inline",alignItems:"center",gap:"small-400",children:[d(af,{children:t.translate("order_summary.duties_label")}),p&&!m&&d(y,{children:[d(Xm,{type:"question-circle",interestFor:c,accessibilityLabel:t.translate("tooltip.accessibility_label_context",{context:t.translate("order_summary.duties_label")})}),d(nm,{id:c,children:t.translate("order_summary.error_duties_tooltip")})]})]}),v=p?t.translate("order_summary.may_be_charged_on_delivery"):u&&t.formatCurrency(u.amount,{currency:u.currencyCode,form:"short"});return d(y,{children:h&&d(BR,{color:g,children:[d(FR,{children:f}),d(VR,{children:d(gf,{direction:"inline",gap:"small-200",children:d($R,{condition:m,children:m?"$0.00":v})})})]})})}function dN({data:e,loading:t,totalTax:n}){const{i18n:r,shop:a}=ie(),i=pN(),o=a.hasFlagEnabled(lo)&&e.length>2,s=e.map(({description:e,amount:n},r)=>d(GR,{loading:t,totalTax:n,taxesLabel:i({description:e}),subdueText:o},`${e}-${r}`));return o?d(KR,{id:"tax-breakdown-money-line",title:r.translate("order_summary.taxes_label"),defaultOpen:!0,hideHeaderItemWhenOpen:!0,item:n?d(VR,{loading:t,children:d($R,{condition:t,children:r.formatCurrency(n.amount,{currency:n.currencyCode,form:"short"})})}):void 0,children:d(NR,{spacing:"small-400",children:s})}):d(NR,{spacing:"small-400",children:s})}const pN=()=>{const{i18n:e}=ie();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 mN({shopId:e}){const{i18n:n,checkout:r,shop:a}=ie(),{hasNegotiatedOnce:i}=r.negotiator,o=mn("taxes"),s=Ex("taxes"),l=mn("landedCostDetails"),c=mn("remoteTaxDetails"),u=ao(),p=jb(),m=function(){const{checkout:e}=ie(),n=mn("taxes"),{taxes:r}=e.negotiator.current.fields;return t(()=>{const t=e.proposal.facts.taxBreakdown;if(t?.length)return{data:t.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:n.value}:null})}(),h=t(()=>{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=t(()=>Boolean(r.negotiator.current.fields.landedCostDetails.value)),f=t(()=>{const e=r.negotiator.current.fields.taxes.value;return void 0!==e&&"pending"!==e.status}),y=t(()=>!r.proposal.facts.tax&&(!!s.value||!f.value&&(o.value||!i.value))),v=t(()=>(y.value||o.value||l.value||c.value)&&!r.proposal.facts.tax),_=t(()=>{const e=h.value;return e&&e.amount>0?e:y.value?{amount:0,currencyCode:a.currencyCode}:void 0}),b=io(h.value),P=t(()=>[...b.value.entries()]),k=ro(),S=t(()=>k.value??h.value),w=t(()=>u.value&&P.value.length>1);if(e){const t=b.value.get(e);return t&&0!==t.totalTax.amount&&"available_total_included"!==t.status?d(GR,{loading:v.value,totalTax:t.totalTax,hasLandedCostDetails:e===a.id&&g.value}):null}if(p?.applied&&S.value)return d(GR,{totalTax:S.value});if(!(S.value&&0!==S.value.amount||y.value))return null;if(w.value&&S.value){const e=g.value?n.translate("order_summary.taxes_label"):n.translate("order_summary.estimated_taxes_label"),t=g.value?void 0:n.translate("order_summary.estimated_taxes_finalization_tooltip_content");return d(KR,{id:"tax-money-line",title:e,tooltipText:t,item:d(VR,{loading:v.value,children:d($R,{condition:v.value,children:v.value?"$0.00":n.formatCurrency(S.value.amount,{currency:S.value.currencyCode,form:"short"})})}),children:d(NR,{spacing:"small-400",children:d($,{each:P,getKey:([e])=>e,children:([,e])=>d(GR,{loading:v.value,totalTax:e.totalTax,taxesLabel:e.shopName,subdueText:!0})})})})}return d(E,{when:m,fallback:d(E,{when:_,children:e=>d(GR,{loading:v.value,totalTax:e,taxesLabel:y.value?n.translate("order_summary.taxes_label"):void 0,hasLandedCostDetails:g.value})}),children:e=>d(dN,{data:e.data,loading:e.loading||v.value,totalTax:h.value})})}const hN=Oc("CombinedDutiesAndTaxesTooltip"),gN=({loading:e,shopId:t})=>{const{i18n:n,shop:r}=ie(),a=Bc(void 0,hN);if(t&&t!==r.id)return null;const i=e.value;return d(BR,{children:[d(FR,{children:d(gf,{direction:"inline",alignItems:"center",gap:"small-400",children:[d(af,{children:n.translate("order_summary.duties_and_taxes_label")}),d(Xm,{type:"question-circle",interestFor:a,accessibilityLabel:n.translate("tooltip.accessibility_label_context",{context:n.translate("order_summary.duties_and_taxes_label")})}),d(nm,{id:a,children:n.translate("order_summary.error_duties_tooltip")})]})}),d(VR,{children:d($R,{condition:i,children:i?"$0.00":n.translate("order_summary.may_be_charged_on_delivery")})})]})},fN=({shopId:e})=>{const{checkout:n}=ie(),r=Boolean(n.proposal.facts.taxesIncluded),a=Boolean(n.proposal.facts.dutiesIncluded),i=oo(),o=co(),s=n.negotiator.current.fields.landedCostDetails,l=mn("landedCostDetails"),c=Ex("landedCostDetails"),u=n.negotiator.current.fields.optionalDuties,p=mn("optionalDuties"),m=t
2(()=>Boolean(u.value?.refuseDutiesPermitted)&&Boolean(u.value?.buyerRefusesDuties)&&s.value?.incoterm===wl.Ddu),h=t(()=>c.value||p.value||l.value),g=t(()=>!(o.value||a)),f=t(()=>Boolean(e)||!(i.value||r));return d(E,{when:m,fallback:d(y,{children:[d(E,{when:g,children:d(uN,{shopId:e})}),d(E,{when:f,children:d(mN,{shopId:e})})]}),children:d(gN,{loading:h,shopId:e})})};function yN({line:e,disableTooltip:t=!1}){const{i18n:n}=ie(),{value:r}=ao(),a=!t&&r,i=uo(e.method).toUpperCase();return d(BR,{itemSize:"auto",children:[d(FR,{children:d(gf,{direction:"inline",gap:"small-400 small-300",children:[d(af,{children:n.translate("order_summary.gift_card_label")}),d(gf,{direction:"inline",alignItems:"center",gap:"small-400",children:[d(Xm,{type:"gift-card"}),d(af,{color:"subdued",accessibilityVisibility:"hidden",children:n.translate("order_summary.gift_card_masked",{last_characters:i})}),d(af,{accessibilityVisibility:"exclusive",children:n.translate("order_summary.gift_card_ending",{last_characters:i})}),a&&d(aN,{type:"giftCard"})]})]})}),d(VR,{children:d(af,{children:e.cost?n.formatCurrency(-e.cost.amount,{currency:e.cost.currencyCode,form:"short",spacedMinusSign:!0}):""})})]})}function vN({disableTooltip:e=!1}){const n=rI(),r=ao(),{shop:a,i18n:i}=ie(),o=a.hasFlagEnabled(po),s=t(()=>!e&&r.value),l=t(()=>r.value?"minmax(auto, max-content) minmax(auto, max-content)":"minmax(0, 1fr)"),c=t(()=>({total:n.value.reduce((e,t)=>e+(t.cost?.amount||0),0),currencyCode:n.value[0]?.cost?.currencyCode}));if(0===n.value.length)return null;if(o){const{total:e,currencyCode:t}=c.value;return d(BR,{children:[d(FR,{children:d(Ym,{gridAutoFlow:"column",gridTemplateColumns:l.value,gridTemplateRows:"minmax(0, 1fr)",gap:"small-400",alignItems:"center",alignContent:"center",children:[d(af,{children:i.translate("order_summary.gift_card_label")}),d(E,{when:s,children:d(aN,{type:"giftCard"})})]})}),d(VR,{children:d(af,{children:i.formatCurrency(-e,{currency:t,form:"short",spacedMinusSign:!0})})})]})}return d($,{each:n,getKey:e=>mo(e.method),children:t=>d(yN,{line:t,disableTooltip:e})})}const _N=Oc("PriceBreakdownItemTooltip");function bN({title:e,tooltipText:t,itemText:n,layout:r}){const{i18n:a}=ie(),i=Bc(void 0,_N),o="strong",s="base";return d(BR,{layout:r,children:[d(FR,{children:d(gf,{direction:"inline",alignItems:"center",gap:"small-300",children:[d(af,{color:s,type:o,children:e}),t?d(y,{children:[d(Xm,{type:"question-circle",size:"small",interestFor:i,accessibilityLabel:a.translate("tooltip.accessibility_label_context",{context:e})}),d(nm,{id:i,children:t})]}):null]})}),d(VR,{children:d(af,{color:s,type:o,children:n})})]})}const PN=Oc("RecurringTotalsTooltip"),kN=Oc("RecurringTotalsLabel");function SN({cardStyle:e}){const{i18n:t,checkout:{negotiator:n}}=ie(),{value:r}=n.current.fields.recurringTotals,a=hL(),i=Bc(void 0,PN),o=Bc(void 0,kN);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(Qg,{accessibilityRole:e?"group":void 0,"aria-labelledby":e?o:void 0,background:"subdued",padding:"small-300",borderRadius:"small",children:e&&l?d(Ym,{gridAutoFlow:"column",gridTemplateColumns:"minmax(0, 1fr) minmax(auto, max-content)",gridTemplateRows:"minmax(0, 1fr)",alignItems:"center",alignContent:"center",children:[d(gf,{direction:"inline",alignItems:"center",gap:"small-300",children:[d(af,{id:o,color:"base",type:"strong",children:s}),d(af,{color:"base",type:"strong",children:a(l)})]}),d(Xm,{type:"question-circle",size:"small",interestFor:i,accessibilityLabel:t.translate("tooltip.accessibility_label_context",{context:s})}),d(nm,{id:i,children:t.translate("order_summary.recurring_total_tooltip")})]}):d(af,{color:"base",type:"strong",children:t.translate("order_summary.recurring_total_multiple_label")})})}return d(y,{children:[d(OS,{accessibilityRole:"presentation"},"recurringTotalsDivider"),1===r.length&&l?d(NR,{spacing:"small-300",children:d(bN,{title:s,tooltipText:t.translate("order_summary.recurring_total_tooltip"),itemText:a(l),layout:"stackable"})}):d(af,{color:"base",type:"strong",children:t.translate("order_summary.recurring_total_multiple_label")})]})}function wN({line:e}){const{i18n:t}=ie();if(!e.cost)return null;const{amount:n,currencyCode:r}=e.cost,a=t.formatCurrency(-n,{currency:r,form:"short",spacedMinusSign:!0}),i=Zx(e.method.redemptionContent);return d(BR,{children:[d(FR,{children:d(gf,{direction:"inline",gap:"base",children:[d(af,{children:t.translate("order_summary.gift_card_label")}),d(gf,{direction:"inline",alignItems:"center",gap:"small-400",children:[d(Xm,{type:"gift-card"}),d(af,{accessibilityVisibility:"hidden",children:eI(i)}),d(af,{accessibilityVisibility:"exclusive",children:t.translate("order_summary.gift_card_ending",{last_characters:i||""})})]})]})}),d(VR,{children:d(af,{type:"strong",children:a})})]})}function CN({line:e}){const{checkout:t,i18n:n}=ie(),r=t.proposal.negotiated.fields.shopPromotion.value,a="filled"===r?.status?new Map(r.promotions.map(({promotionId:e,type:t})=>[e,t])):void 0;return e.method.redemptionContent?.details?.map(e=>{const{amount:t,currencyCode:r}=e.destinationAmount,i=n.formatCurrency(-parseFloat(t),{currency:r,form:"short",spacedMinusSign:!0}),o={SHOP_DISCOUNT_OFFER:n.translate("order_summary.exclusive_deal"),SHOP_CASH_BALANCE:n.translate("order_summary.shop_cash_title"),SHOP_PROMOTION:n.translate("order_summary.shop_promotion")},s=e.promotionType??(null==e.redemptionId?void 0:a?.get(e.redemptionId)),l="SHOP_PROMOTION"===e.redemptionType&&"DOORBUSTER"===s?n.translate("order_summary.flash_deal"):o[e.redemptionType];return l?d(BR,{type:"strong",label:l,value:i},e.redemptionId):null})}function EN({line:e}){const{i18n:t}=ie();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(BR,{type:"strong",label:n,value:r})}function xN({line:e}){switch(e.method.redemptionSource){case"SHOP_CASH":return d(CN,{line:e});case"STORE_CREDIT":return d(EN,{line:e});case"CUSTOM":{const t=e;return d(wN,{line:t},t.method.redemptionContent?.redemptionAttributes[0]?.value)}default:return null}}function IN(){const e=bi("STORE_CREDIT","SHOP_CASH"),{paymentLines:t}=nI(),n=[...e.value,...t];return 0===n.length?null:d(y,{children:n.map(e=>d(xN,{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 AN(){const{i18n:e,checkout:n,source:r}=ie(),a=n.negotiator.current.fields.tipLines,i=n.proposal.facts.tip,o=t(()=>{const e=a.value?.[0]?.amount,t=Fn(r)?i:e;return t&&t.amount>0?t:void 0});return d(E,{when:o,children:t=>d(BR,{label:e.translate("order_summary.tip_label"),value:e.formatCurrency(t.amount,{currency:t.currencyCode,form:"short"})})})}function TN(e){return"children"in e&&DS(e.children)}function LN(e){const{spacing:t}=MR(),n=v("_1x41w3p1 _1x41w3p0 _1fragem6t _1fragem19",t&&DR.groupSpacingVariant[t]);return d(y,{children:d("div",{className:n,role:"row",children:TN(e)?e.children:d(y,{children:[d(RN,{children:d(af,{type:"strong",size:"large",children:e.label})}),d(NN,{children:d(gf,{direction:"inline",gap:"small-300",alignItems:"baseline",children:[d(sI,{children:d(af,{size:"small",color:"subdued",children:e.prefix})}),d(af,{type:"strong",size:"large",children:e.value})]})})]})})})}function RN({children:e}){return d("div",{className:"_1x41w3p2",role:"rowheader",children:e})}function NN({children:e,accessibilityColumnIndex:t}){return d("div",{className:"_1x41w3p3",role:"cell","aria-colindex":t,children:e})}function MN({variant:e}){const n=function(){const e=ho(),{shop:n,embed:r}=ie(),a=n.hasFlagEnabled(go);return t(()=>{const t=Boolean(r?.embedder)&&!pr(r?.embedder);return!Boolean(a||!e.value||0===e.value.amount||t)})}(),r=ho();return n.value&&r.value?d(DN,{variant:e,totalSavings:r.value}):null}function DN({variant:e,totalSavings:n}){const{i18n:r,embed:a,checkout:{negotiator:i}}=ie(),{deferredTotal:o}
2=i.current.fields,s=pr(a?.embedder)?r.translate("universal.iframes.savings_label").toUpperCase():r.translate("order_summary.total_savings").toUpperCase(),l=r.formatCurrency(n.amount,{currency:n.currencyCode,form:"short"}),c=d(af,{type:"strong",translate:!1,children:l}),u=t(()=>o.value&&o.value.amount.amount>0?"small-200":"small-400");return"card"===e?d(Qg,{children:d(gf,{direction:"inline",alignItems:"center",gap:"small-400",children:[d(gf,{direction:"inline",alignItems:"center",gap:"small-500",children:[d(Xm,{type:"savings",size:"small",color:"base"}),d(af,{color:"subdued",children:r.translate("order_summary.total_savings")})]}),d(af,{color:"subdued",translate:!1,children:l})]})}):d(NR,{spacing:u.value,children:d(LN,{children:[d(RN,{children:d(gf,{direction:"inline",alignItems:"center",gap:"small-300",children:[d(Xm,{type:"savings",size:"base",color:"strong"}),d(af,{type:"strong",children:s}),c]})}),d(NN,{})]})})}function zN(){const{i18n:e,checkout:{negotiator:n}}=ie(),{alternativePaymentCurrency:r}=n.current.fields,a=mn("alternativePaymentCurrency"),{hasNegotiatedAlternativePaymentCurrencySignal:i}=n.context,o=t(()=>{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(E,{when:o,children:({loading:e,text:t})=>d(BR,{children:d(VR,{children:d($R,{condition:e,size:"small",color:"subdued",children:e?"$0.00":t})})})})}class ON extends Error{constructor(){super(...arguments),this.name="DeliveryError"}}function BN(e){return e.reduce((e,{total:t})=>e+(t?.amount||0),0)}function FN({checkout:e}){return e.proposal.facts.requiresShipping??!0}function VN({size:e,strong:t=!0}){const{i18n:n}=ie(),r=t?"strong":void 0;return d(y,{children:[d(af,{size:e,type:r,accessibilityVisibility:"hidden",children:n.translate("shipping.included_rate_label")}),d(af,{type:r,accessibilityVisibility:"exclusive",children:n.translate("shipping.included_rate_accessibility_label")})]})}function UN({moneyLines:e,deliveryLoading:t,appearance:n,emphasis:r,included:a,shouldConsolidateRateGroupMax:i,getRateGroupMaxKey:o,getLinePrice:s,getPriceLetterCase:l}){const{i18n:c,shop:u}=ie(),p=u.hasFlagEnabled(yo),m=e.length>0,h=e[0]?.currencyCode,g=e[0]?.type,{priceBeforeDiscounts:f,priceAfterDiscounts:y}=i??u.marketDrivenShippingEnabled?El(e,o):xl(e),v=m&&f&&f>y&&!p,_=s(y,g),b=d($R,{condition:t,color:n,type:"bold"===r?"strong":void 0,translate:!1,letterCase:l(y,g),children:_});return t?b:a?d(VN,{strong:!1}):v?d(gf,{direction:"inline",gap:"small-300",justifyContent:"center",alignItems:"center",children:[d(af,{accessibilityVisibility:"exclusive",children:c.translate("order_summary.original_price")}),d(af,{size:"base",color:"subdued",type:"redundant",translate:!1,children:c.formatCurrency(f,{currency:h})}),d(af,{accessibilityVisibility:"exclusive",children:c.translate("order_summary.price_after_discount_aria_text")}),b]}):b}const qN=Oc("ShippingTooltip");function jN({defaultPolicy:e}){const{i18n:t,embed:n,shop:{merchantPolicies:r}}=ie(),a=Bc(void 0,qN),i="shipping-policy",o=t.translate("shop_policies.shipping_policy"),{localPolicies:s}=Ii(),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 pr(n?.embedder)?c.url?d(qm,{accessibilityLabel:u,"aria-haspopup":"dialog",onClick:()=>n?.client?.windowOpenRequest(c.url),children:d(Xm,{type:"question-circle",size:"small"})}):null:d(y,{children:[d(qm,{accessibilityLabel:u,commandFor:a,children:d(Xm,{type:"question-circle",size:"small"})}),d(dA,{id:a,defaultPolicy:c})]})}const HN=({getLinePrice:e,getPriceLetterCase:n,label:a,moneyLines:i,finalMoneyLines:o,forceSubduedStyle:s,discountLines:l,shippingTooltip:c,included:u,shouldConsolidateRateGroupMax:p,getRateGroupMaxKey:m})=>{const h=Kl(),g=t(()=>"information"===h.value.currentPage?.id),{shop:f,checkout:v,i18n:_}=ie(),b=!f.hasFlagEnabled(yo),{value:P}=v.negotiator.current.fields.deliveryNext,k=rt(),S=mn("deliveryNext").value,w=Ex("deliveryNext").value||!!k.value&&S,C=v.proposal.facts.delivery??[],E=function(e){const{checkout:t}=ie(),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"===P?.status)||w||s,T=l?.filter(e=>Sl(e))??[],L=E.length?[...new Set(E.map(e=>e.label))]:[...new Set(T.map(e=>Pl(e)&&"code"===e.discount.type&&e.discount.codeHidden?_.translate("order_summary.discount_title"):e.title))],R=b?L.map(e=>d(Ym,{gridAutoFlow:"column",gridTemplateColumns:"minmax(auto, max-content) minmax(0, 1fr)",gridTemplateRows:"minmax(0, 1fr)",gap:"small-400",alignItems:"center",alignContent:"center",children:[d(Xm,{type:"discount",size:"small"}),d(FI,{children:d(af,{color:"subdued",children:e.toUpperCase()})})]},e)):[],N=A||s,M=(g.value||x)&&c,D=s?"subdued":void 0;return d(y,{children:[d(BR,{itemSize:I?"auto":void 0,color:D,children:[d(FR,{children:d(gf,{direction:"inline",gap:"small-400",alignItems:"center",children:[d(af,{color:D,children:a}),M]})}),d(VR,{loading:w,children:d(UN,{getLinePrice:e,getPriceLetterCase:n,appearance:N?"subdued":void 0,moneyLines:o,deliveryLoading:w,included:u,shouldConsolidateRateGroupMax:p,getRateGroupMaxKey:m})})]}),R.length>0&&d(NR,{spacing:"small-400",children:d(BR,{children:d(FR,{children:R})})})]})},$N=({shopId:e,forceSubduedStyle:n})=>{const{checkout:r,i18n:a,shop:{id:o,marketDrivenShippingEnabled:s,remoteShopsConfigMap:l},source:c}=ie(),u=r.negotiator.current.fields.deliveryNext.value,p=rt(),m=mn("deliveryNext"),h=Ex("deliveryNext"),g=h.value||!!p.value&&m.value,f=r.configuration.layout.isOnePage.value,v=r.proposal.facts.delivery,_=Be(),b=Lr(_.value.enabledDeliveryMethods),P=Cx(),k=P?.selected.value??[],S=k.length>0,w=vo(k).length>0,C=k.includes("PICK_UP"),E=Boolean(e),{visibility:x}
2=r.configuration,I=r.negotiator.current.fields.discountLines.value,A=k_(),T=function(){const{checkout:e}=ie(),t=e.proposal.facts.delivery??[],n=function(){const{checkout:e}=ie(),t=e.proposal.facts.delivery??[];return BN(t)-t.flatMap(e=>e.lines.flatMap(e=>e.appliedDiscounts)).reduce((e,{amountDiscounted:t})=>(t?.amount||0)+e,0)}(),r=BN(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=_o(e),{allMoneyLines:R,moneyLinesForShop:N}=L.value,M=ao(),D=Kl(),z="review"!==D.value.currentPage?.id&&(!g||M.value),O=a.translate("order_summary.pickup_label"),B=a.translate("order_summary.shipping_label"),F=i(b?O:B),V=t(()=>{const e=Lr(_.value.enabledDeliveryMethods)?O:B;if(!(h.value||p.value&&m.value)){const t=L.value.moneyLinesForShop,n=Fn(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||N,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&&!Fn(c)&&S&&W,J=G&&C&&!w,K=G&&w,Q=J?O:B,X=t(()=>Boolean(Fn(c)&&FN({checkout:r})&&b_({checkout:r,source:c})?.lines.length));if(A.value)return null;if(!(x.showShippingLines.value&&!Fn(c)||X.value))return null;if(q)return null;if(E&&0===j.length)return null;if(E){const t=j.some(e=>le(e));return d(HN,{getLinePrice:de,getPriceLetterCase:ue,label:V,forceSubduedStyle:n,moneyLines:N,finalMoneyLines:j,discountLines:e===o?I?.lines:void 0,shippingTooltip:void 0,shouldConsolidateRateGroupMax:t,getRateGroupMaxKey:ce})}if(M.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(KR,{id:"shipping-money-line",title:V,hideHeaderItemWhenOpen:!0,item:d(VR,{loading:g,children:d(UN,{getLinePrice:de,getPriceLetterCase:ue,moneyLines:j,deliveryLoading:g,shouldConsolidateRateGroupMax:e,getRateGroupMaxKey:ce})}),children:d(NR,{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(HN,{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(jN,{defaultPolicy:r}):void 0},n[0]?.shopId??t)})})})}if($.length>0&&Y.length>0)return oe({});if(G&&w&&C)return oe({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(jN,{defaultPolicy:null}):void 0;return J?(Z=Y,ee=Y,te=he,ne=ge,re=Q,ae=void 0):K&&(Z=$,ee=$,re=Q,0===$.length&&(te=pe,ne=me)),d(HN,{getLinePrice:te,getPriceLetterCase:ne,label:re,forceSubduedStyle:n,moneyLines:Z,finalMoneyLines:ee,discountLines:I?.lines,shippingTooltip:ae});function oe({shippingGetLinePrice:e=de,shippingGetPriceLetterCase:t=ue,pickupGetLinePrice:r=de,pickupGetPriceLetterCase:a=ue}){const{shippingDiscountLines:i,pickupDiscountLines:o}=Il(u,I?.lines);return d(y,{children:[d(HN,{getLinePrice:e,getPriceLetterCase:t,label:B,forceSubduedStyle:n,moneyLines:$,finalMoneyLines:$,discountLines:i,shippingTooltip:z?d(jN,{defaultPolicy:null}):void 0}),d(HN,{getLinePrice:r,getPriceLetterCase:a,label:O,forceSubduedStyle:n,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=Fn(c)?v?.[0]?.total?.currencyCode:function(e){const[t]=e;if(!t)throw new ON("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 YN(){return d(Qg,{children:[d(HL,{blockSize:"small-200"}),d(OS,{accessibilityRole:"presentation"}),d(HL,{blockSize:"small-200"})]})}function WN(){const{moneyLines:{divided:e}}=Vm(),{checkout:{negotiator:n}}=ie(),{legacyRepresentProductsAsFees:r,legacyMerchandiseLinesAsFees:a}=n.current.fields,i=t(()=>r.value&&a.value?a.value.lines:[]);return d($,{each:i,getKey:e=>e.title,children:t=>d(y,{children:[e&&d(YN,{}),d(GN,{...t})]})})}function GN({title:e,description:t,total:n}){const{i18n:r}=ie(),a=t?d(gf,{direction:"inline",alignItems:"center",gap:"small-400",children:d(af,{children:[e,d("span",{style:{position:"absolute"},children:d(qm,{padding:"small-500 none none small-500",overlay:d(nm,{children:t}),accessibilityLabel:r.translate("general.tooltip_accessibility_label"),children:d(Xm,{type:"question-circle",size:"small"})})},"description-with-tooltip")]})}):d(af,{children:e});return d(BR,{label:e,children:[d(FR,{children:a}),d(VR,{children:d(af,{translate:!1,children:r.formatCurrency(n.amount,{currency:n.currencyCode,form:"short"})})})]})}function JN({content:e}){return function(e){const t=i(!1);k(()=>{const n=e.value;if(t.current){if(n)return Ou({content:n})}else t.current=!0})}(e),d(E,{when:e,children:e=>d(y,{children:KN(e).map(({id:e,line:t})=>d(BR,{layout:"stackable",children:[d(Qg,{inlineSize:"100%",children:d(FR,{children:d(IE,{type:"small",color:"subdued",textAlign:"end",children:t})})}),d(VR,{})]},e))})})}function KN(e){const t=new Map;
2return 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 QN(){const{moneyLines:{divided:e}}=Vm(),{i18n:t,checkout:n,shop:r}=ie(),{value:a}=yt(),{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(bo)&&l&&Number(l.amount)>0,g=(u||o||h)&&e;return g||u||m||h||p&&a?d(y,{children:[g&&d(YN,{}),p&&a&&d(BR,{label:t.translate("order_summary.total_label"),value:t.formatCurrency(a.amount,{currency:a.currencyCode,form:"short"})}),u&&s&&d(BR,{type:"strong",label:t.translate("order_summary.order_total_updated_label"),value:t.formatCurrency(Number(s.amount),{currency:s.currencyCode,form:"short"})}),m?d(BR,{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(BR,{type:"strong",label:t.translate("order_summary.waived_label"),value:t.formatCurrency(-Number(l.amount),{currency:l.currencyCode,form:"short"})}):null]}):null}const XN={Wrapper:"_3KD7m",Char:"kxIMD",Price:"_3XbdQ","Price-enter":"baSEe","Price-exit":"dhH4n","Price-exiting":"ldszB","Price-exited":"ZOhB6"};let ZN=0;function eM({formatted:e,money:t}){const{orderSummary:{priceReductionAnimation:r}}=By(),s=zc(),l=i(o(()=>t.value)),c=m([{id:ZN++,formatted:o(()=>e.value)}]),u=rt(),p="base"===r;a(()=>{const n=l.current,r=t.value.currencyCode===n.currencyCode&&t.value.amount<n.amount;c.value=r?[...c.value,{id:ZN++,formatted:e.value}]:[{id:ZN++,formatted:e.value}],l.current=t.value},[t.value.amount,t.value.currencyCode,e.value]);const h=n(e=>{c.value=c.value.filter(t=>t.id!==e)},[c]);return p?d("span",{className:XN.Wrapper,style:{"--delay":(s?0:30)+"ms"},children:d(E,{when:u,fallback:e,children:()=>c.value.map((e,t)=>d(tM,{formatted:e.formatted,current:t===c.value.length-1,onDisappear:h,snapshotId:e.id,animated:c.value.length>1},e.id))})}):d(y,{children:e})}function tM({formatted:e,current:t,animated:n,onDisappear:r,snapshotId:i}){const o=zc(),s=Pd(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(XN.Price,n&&XN[`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:XN.Char,style:{"--index":t},children:e},t))})}function nM(e){const{checkout:{negotiator:n}}=ie(),{initialUnresolvedFields:r}=n;return t(()=>function(e,t){return t.some(t=>e.has(t))}(r.value,e))}const rM=["deliveryNext","taxes","duties","landedCostDetails","remoteTaxDetails"];function aM({alignItems:e="baseline",freeLabel:n,outOfStockLabel:r,paymentDue:a,showCurrencyBadge:i,hideCurrencyCode:o,size:s}){const{i18n:l,embed:c,checkout:{negotiator:u}}=ie(),p=Fy(),{orderSummary:h}=By(),g=function(){const{checkout:{negotiator:e}}=ie(),{allViolations:n}=e.current.fields;return t(()=>dy(n.value??[]))}(),f=rt(),y=mn("deliveryNext"),v=mn("taxes"),_=mn("duties"),b=mn("landedCostDetails"),P=mn("remoteTaxDetails"),S=t(()=>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=nM(rM),C=m(w.peek()),x=m(!w.peek()&&S.peek());k(()=>{!w.value&&S.value&&(x.value=!0)});const I=t(()=>y.value||v.value||_.value||b.value||P.value),A=t(()=>(!c||!pr(c.embedder))&&(c?!S.value||I.value:C.peek()&&!x.value)),T=!o&&p,L=t(()=>r&&g.value?r:n&&0===a.value.amount?n:l.formatCurrency(a.value.amount,{currency:a.value.currencyCode,form:"short"})),R=n?"uppercase":void 0,N=h.totalDueTypography;let M,D;N?(M="bold"===N.weight?"strong":"generic",D=N.size??"base"):(M="strong",D="large");const z=d(af,{size:i?"extraSmall":"small",color:"subdued",translate:!1,children:a.value.currencyCode}),O=t(()=>T&&L.value!==r&&L.value!==n&&(!f.value||!G(a.value.currencyCode,L.value)));
2return d(gf,{alignItems:e,gap:"small-300",direction:"inline",children:[d(E,{when:O,children:d(sI,{children:i?d(cL,{color:"subdued",size:"small",children:z}):z})}),d($R,{condition:A.value,type:M,size:s??D,translate:!1,letterCase:R,skeletonContent:L.value,children:x.value?d(eM,{formatted:L,money:a}):null})]})}function iM({label:e,amount:t,hideCurrencyCode:n}){const{moneySummary:{labelTypography:r}}=Vm();return d(LN,{children:[d(RN,{children:d(af,{type:"strong",size:r?.size??"large",children:e})}),d(NN,{children:d(aM,{paymentDue:t,hideCurrencyCode:n})})]})}function oM({variant:e,showLoadingPlaceholder:n}){const r=Ei(),{i18n:a,shop:o}=ie(),s=oI(),l=t(()=>!r.value),c=t(()=>r.value?a.formatCurrency(r.value.amount,{currency:r.value.currencyCode,form:"short"}):void 0),u=i({amount:0,currencyCode:o.currencyCode}),p=t(()=>{const e=r.value;return null!=e&&(u.current=e),u.current});return l.value&&!n?null:"card"===e?d(Qg,{background:"subdued",padding:"small-300",borderRadius:"small",children:d(Ym,{gridAutoFlow:"column",gridTemplateColumns:"minmax(0, 1fr) minmax(auto, max-content)",gridTemplateRows:"minmax(0, 1fr)",alignItems:"center",alignContent:"center",children:[d(af,{color:"subdued",children:s}),d(af,{color:"subdued",children:c})]})}):d(NR,{spacing:"small-500",children:d(iM,{label:s,amount:p,hideCurrencyCode:l.value})})}function sM(){const{shop:e,checkout:{negotiator:n}}=ie(),r=n.current.fields.buyerIdentity,a=Ei(),i=e.hasFlagEnabled(Po);return t(()=>{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 lM({bgnAmount:e}){const{i18n:t}=ie();return d(BR,{children:d(VR,{children:d(af,{color:"subdued",children:t.formatCurrency(e,{currency:"BGN",form:"short"})})})})}const cM=1e8;function uM(e,t){const n=e/t*100,r=Math.round(n*cM)/cM;return Math.ceil(r)/100}function dM(e){return e?.installmentPlans?.some(e=>"MSI"===e.type)??!1}function pM(e,t){return e.map(e=>"direct"===e.method.type||e.method.type===pe.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 mM(e){return e.map(e=>"direct"===e.method.type||e.method.type===pe.CreditCard?{...e,method:{...e.method,creditCardInstallments:void 0}}:e)}function hM(){const e=Ei(),n=oI(),{i18n:r,checkout:{negotiator:a}}=ie(),{installmentMonthsSignal:i}=a.context,o=a.current.fields.paymentMethods,s=t(()=>o.value?.some(e=>"direct"===e.type&&!e.alternative&&dM(e))??!1);return{amount:t(()=>{const t=i.value,n=e.value;return s.value&&Boolean(t)&&n&&t?{...n,amount:uM(n.amount,t)}:n}),label:t(()=>{const t=i.value;return s.value&&Boolean(t)&&Boolean(e.value)?r.translate("order_summary.installment_due_today_label"):n.value}),isInstallment:t(()=>s.value&&Boolean(i.value))}}function gM(){const{checkout:{negotiator:e}}=ie(),n=e.current.fields.paymentFlexibilityPaymentTermsTemplate,r=ki(),a=Kx(),i=it();return t(()=>{if(r.value||a.value)return!1;const e=Boolean(n.value),t=i.value;return e||t})}function fM({children:e}){return d(NR,{spacing:"small-500",children:d(BR,{children:[d(FR,{children:d(IE,{color:"subdued",children:d(MI,{children:e})})}),d(VR,{})]})})}const yM=["taxes","duties"];function vM({shopId:e}){const n=Ei(),r=ko(),a=t(()=>e?r.value.get(e):n.value),{checkout:o,embed:s,i18n:l,shop:c}=ie(),u=nM(yM),p=mn("deliveryNext"),m=mn("taxes"),h=mn("duties"),g=mn("landedCostDetails"),f=mn("remoteTaxDetails"),{visibility:v}=o.configuration,{moneySummary:{labelColor:_="base",labelTypography:b},moneyLines:{divided:P}}=Vm(),k=o.proposal.facts.previouslyPaidTotal,S=ki(),w=aI(),C=(()=>{const{shopPay:e,checkout:t}=ie();if(dg().value&&t.installments.isSupported.value&&t.installments.config.value?.availableLoanTypes.includes("SPLIT_PAY")&&e.session.isInstallmentsSelected.value)return t.installments.chargeAmount.value})(),{value:x}=yt(),I=x?.currencyCode,A=gM(),T=c.hasFlagEnabled(So),L=Boolean(o.proposal.facts.taxesIncluded),R=Boolean(o.proposal.facts.dutiesIncluded),N=oo().value||L,M=co().value||R,{value:D}=o.negotiator.current.fields.landedCostDetails,z=jb(),O=o.proposal.facts.landedCostDetails,{amount:B,label:F,isInstallment:V}=hM(),U="COMPACT"===o.configuration.orderSummary?.layoutStyle,q=XR(),j=sM(),H=t(()=>e&&e!==c.id?l.translate("order_summary.total_label"):F.value),$=t(()=>!a.value),Y=t(()=>(!s||!pr(s.embedder))&&u.value),W=i(a.peek()),G=t(()=>{const e=a.value;return null!=e&&(W.current=e),W.current}),J=t(()=>G.value??{amount:0,currencyCode:c.currencyCode}),K=i(B.peek()),Q=t(()=>{const e=B.value;return null!=e&&(K.current=e),K.current??J.value}),X=t(()=>V.value?a.value:void 0),Z=null!=G.value&&(p.value||m.value||h.value||g.value||f.value);if(($.value||!B.value)&&!Y.value&&!Z)return null;const ee=(v.showSubtotal.value||k)&&P?d(YN,{}
2):null,te=!S.value&&!w.value,ne=z?.applied&&N&&q.value?d(fM,{children:q.value}):te?d(eN,{taxesIncluded:N,shopId:e}):null;if(e)return d(y,{children:[d(iM,{label:H,amount:J,hideCurrencyCode:$.value}),ne]});if(U){const e="base"===b?.weight?"generic":"strong";return d(y,{children:[ee,d(LN,{children:[d(RN,{children:d(gf,{children:d(E,{when:q,fallback:d(af,{type:e,color:_,size:b?.size??"large",children:F.value}),children:d(y,{children:[d(af,{type:e,color:_,size:b?.size,children:F.value}),ne]})})})}),d(NN,{children:d(aM,{paymentDue:Q,hideCurrencyCode:$.value,showCurrencyBadge:!0,alignItems:"center"})})]})]})}const re=[D,O].some(e=>e?.incoterm===wl.Ddp),ae=M&&re?d(y,{children:[d(HL,{blockSize:"small-400"}),d(OS,{accessibilityRole:"presentation"}),d(HL,{blockSize:"small-400"}),d(IE,{type:"small",color:"subdued",children:d(MI,{children:l.translate("order_summary.duties_included_label")})})]}):null,oe=T?d(oM,{showLoadingPlaceholder:Y.value||Z}):d(NR,{spacing:"small-500",children:d(iM,{label:H,amount:J,hideCurrencyCode:$.value})}),se=l.translate("order_summary.payment_terms_totals.due_today_next");return d(y,{children:[ee,d(E,{when:A,children:d(LN,{children:[d(RN,{children:d(af,{children:se})}),d(NN,{children:d(gf,{direction:"inline",gap:"small-200",alignItems:"baseline",children:d($R,{condition:$.value,size:"medium",translate:!1,children:l.formatCurrency(0,{currency:J.value.currencyCode,form:"short"})})})})]})}),d(E,{when:X,children:e=>d(BR,{label:l.translate("order_summary.total_label"),value:l.formatCurrency(e.amount,{currency:e.currencyCode,form:"short"})})}),d(E,{when:A,fallback:d(iM,{label:H,amount:Q,hideCurrencyCode:$.value}),children:oe}),ne,void 0!==C&&I?d(LN,{children:d(NN,{accessibilityColumnIndex:2,children:d(af,{size:"small",translate:!1,children:l.translate("payment.pay_in_installments_split_pay_short",{amount:l.formatCurrency(C,{currency:I,form:"short"})})})})}):null,null!=j.value&&d(lM,{bgnAmount:j.value}),ae]})}function _M(){const{moneyLines:{divided:e}}=Vm(),t=function(){const{i18n:e,checkout:t}=ie(),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(YN,{}),d(BR,{type:"strong",label:n.label,value:n.value})]}),r&&d(BR,{type:"strong",label:r.label,value:r.value})]})}function bM(e){const{shop:{id:n},checkout:r}=ie(),a=r.negotiator.current.fields.merchandiseLines,i=r.proposal.facts.merchandiseLines??[],{value:o}=r.negotiator.current.fields.legacyRepresentProductsAsFees,s=t(()=>wo(a.value?.lines??[],r.negotiator.current.fields.remoteMerchandiseDetails.value)),l=Co(),c=e?e!==n?{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 PM({shopId:e}){const{subtotalLabel:n,subtotalValue:r,subtotalOriginalValue:a}=function(e){const{checkout:n,i18n:r}=ie(),a=function(e){const{shop:{id:n},checkout:{negotiator:r}}=ie(),{remoteTotalDetails:a,legacyRepresentProductsAsFees:i,legacySubtotalBeforeTaxesShippingAndFees:o,subtotal:s}=r.current.fields,l=kt();return t(()=>{const t=i.value?o.value:l.value;return e?n===e?s.value:a.value?.perShopRemoteTotals.get(e)?.subtotal:t})}(e),i=function(e){const{embed:t,i18n:n}=ie(),{totalLineQuantities:r,merchandiseLinesWithCount:a}=bM(e);return pr(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 t(()=>{const e=a.value?r.formatCurrency(a.value.amount,{currency:a.value.currencyCode,form:"short"}):void 0,t=n.latestReceipt.value&&"consolidatedProposedSubtotalBeforeTaxesAndShipping"in n.latestReceipt.value&&n.latestReceipt.value.consolidatedProposedSubtotalBeforeTaxesAndShipping||void 0,o=t?r.formatCurrency(t.amount,{currency:t.currencyCode,form:"short"}):void 0;return{subtotalLabel:i,subtotalValue:e,subtotalOriginalValue:o}})}(e).value;return r?d(BR,{children:[d(FR,{children:d(af,{children:n})}),d(VR,{children:a?d(gf,{direction:"inline",gap:"small-300",children:[d(af,{tone:"critical",type:"redundant",translate:!1,children:a}),d(af,{translate:!1,children:r})]}):d(af,{translate:!1,children:r})})]}):null}function kM(){const{i18n:e,checkout:t,embed:n}=ie(),{value:r}=Eo(),a=aI(),i=rI(),o=Boolean(t.proposal.facts.taxesIncluded),s=oo().value||o;if(!a.value||!r)return null;const l=d(eN,{taxesIncluded:s});return pr(n?.embedder)&&i.value.length>0?l:d(y,{children:[d(BR,{label:e.translate("order_summary.total_price_label"),value:e.formatCurrency(r.amount,{currency:r.currencyCode,form:"short"})}),l]})}const SM=x(function(){const{checkout:e,i18n:n,embed:r}=ie(),{visibility:a}=e.configuration,{orderSummary:i}=By(),o=e.configuration.orderSummary?.headerPosition??i.headerPosition,s=i.isCollapsible??!1,l=!1===i.isCollapsible,{currentDetour:c}=Kl().value,u="thankYou"===c?.type,p=LR(),m=e.proposal.negotiated.fields.additionalMoneyLines.value,h=e.proposal.negotiated.fields.lpmDisclosure,g=mn("lpmDisclosure"),f=t(()=>g.value?void 0:h.value),y=t(()=>{const t=e.latestReceipt.value;return"processed"===t?.status?t.lpmDisclosure:void 0});return d(PT,{children:[d(qR,{ref:p,title:n.translate("order_summary.cost_table_title"),children:[d(E,{when:a.showSubtotal,children:[d(PM,{}),d(sN,{}),d($N,{}),d(WN,{}),d(_M,{}),d(fN,{}),d(AN,{}),d(kM,{}),d(IN,{})]}),d(QN,{}),d(vN,{}),m?.map(e=>d(BR,{label:e.label,value:n.formatCurrency(e.amount.amount,{currency:e.amount.currencyCode,form:"short"})},e.id)),"BOTTOM"===o&&s?d(HL,{blockSize:"small-500"}):d(vM,{}),!u&&d(E,{when:()=>!f.value,children:d(zN,{})}),d(JN,u?{content:y}:{content:f}),d(nN,{}),!pr(r?.embedder)&&d(MN,{}),!l&&d(SN,{})]}),l&&d(E,{when:()=>e.negotiator.current.fields.recurringTotals.value,children:d(Qg,{paddingBlockStart:"small-300",children:d(SN,{cardStyle:!0})})})]})});function wM({shopId:e,isLocalShop:t}){const{i18n:n}=ie();return d(qR,{title:n.translate("order_summary.cost_table_title"),children:[d(PM,{shopId:e}),t&&d(sN,{disableTooltip:!0}
2),d($N,{shopId:e}),d(fN,{shopId:e}),t&&d(AN,{}),t&&d(IN,{}),t&&d(vN,{disableTooltip:!0}),d(vM,{shopId:e}),t&&d(nN,{shopId:e})]})}var CM="km09ry0 _1fragem5z";const EM=Oc("Form");function xM({onSubmit:e,children:t,implicitSubmit:n=!0,disabled:a=!1,id:i,contentsClassName:o}){const s=Hu(),l=Bc(void 0,EM),c=i??l,u=null!=gd(),p=r(()=>({id:c,nested:u}),[c,u]);let m=null;n&&(m=d(Qg,{accessibilityVisibility:"exclusive",children:d(IM,{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(hd.Provider,{value:p,children:[g,m]}),d(Gc,{children:d("form",{action:"",method:"POST",noValidate:!0,className:CM,id:c,onSubmit:h})})]}):d("form",{action:"",method:"POST",noValidate:!0,className:CM,id:c,onSubmit:h,children:d(hd.Provider,{value:p,children:[g,m]})})}function IM({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 AM=["extraSmall","small","medium","large"];function TM({above:e,below:t,children:n}){const r=_d()?"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?AM.indexOf(e)+1:0,r=t?AM.indexOf(t)-1:AM.length-1,a=AM.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 LM({targetSelector:e,label:t,icon:r}){const a=n(()=>{const t=document.querySelector(e);t&&(t.focus(),t.scrollIntoView({behavior:"smooth"}))},[e]);return d(Qg,{display:"@media (inline-size >= medium) auto, none",children:d(cf,{variant:"secondary",size:"small",onClick:a,className:Se({screenReaders:"untilFocus"}),children:d(gf,{direction:"inline",gap:"small-400",alignItems:"center",children:[d(Xm,{type:r,size:"small-100"}),d(af,{children:t})]})})})}const RM=({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}}
2):e.localizedMessage||e.nonLocalizedMessage},e.code))}),a]})}),NM=()=>{const{i18n:e,shop:n,checkout:{negotiator:r}}=ie(),a=Dc(),i=mn("shippingAddress"),{allViolations:o}=r.current.fields,s=Kl(),{shippingAddress:l}=r.parts;return t(()=>{const t=l.peek();if(a.value&&"information"===s.value.currentPage?.id&&qn(t,{...xo,countryCode:t?.countryCode}))return null;const r=o.value?.filter(e=>jn.has(e.code))||[];return 0===r.length||!a.value||i.value?null:RM({violations:r,noticeType:Ty.DeliveryViolations,noticeTitle:e.translate("notice_banner.violations_title",{violation:e.translate("notice_banner.individual_violations_title",{scope:Ty.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(mf,{href:`mailto:${n.contactEmail}`,children:e.translate("notice_banner.editable_shipping_address_violations_email_link")})})})})};var MM={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 DM=Oc("Banner"),zM=new Map([["info","info"],["success","check-circle"],["warning","alert-triangle"],["critical","alert-circle"]]);function OM({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=Hu(),[P,k]=s(h),[S,w]=s(!0),C=i(),E=Bc(void 0,DM),x=qg({active:"critical"===_}),I=i(P),A=yd(),T=zc(),L=i(T);L.current=T,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)"),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&&P&&f?.(),I.current=P},[P,f]),a(()=>{k(h)},[h]);const R=v(MM.Banner,_&&MM.toneVariant[_],m&&MM.withHeading,MM.colorVariant[c]),N=Boolean(r&&m),M=!N||N&&!S,D=o&&d("button",{type:"button",className:MM.Button,onClick:()=>{"function"==typeof g&&g(),k(!0)},"aria-label":b("closeNotification"),"aria-hidden":!!A||void 0,tabIndex:A?-1:void 0,children:d(Xm,{type:"x",size:"small"})}),z=d("button",{type:"button",className:MM.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(Xm,{size:"small",type:S?"chevron-down":"chevron-up"})});return P?null:d("div",{className:R,role:"critical"===_?"alert":"status",...(e||t)&&{tabIndex:-1},ref:function(e){C.current=e,x.current=e},id:u,children:[!l&&d("div",{className:MM.Icon,children:d(Xm,{type:zM.get(_),size:"fill"})}),m&&d("div",{className:MM.Heading,children:d(Kk,{level:3,children:m})}),N&&d("div",{className:MM.ControlCollapsible,children:z}),DS(n)&&d("div",{className:MM.Content,children:d(vu.Provider,{value:"Banner",children:d(du,{children:N?d(Sd,{open:M,id:`${E}-collapsible-area`,children:[m&&d(HL,{blockSize:"small-200"}),n]}):d(y,{children:[m&&d(HL,{blockSize:"small-200"}),n]})})})}),D&&d("div",{className:MM.ControlDismiss,children:D})]})}const BM=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"}),FM=["buyerJourneyInterceptor","storefrontApiTokenRefresh","getSessionToken","getSessionTokenError","getSessionTokenCached","storefrontApiQueryStart","storefrontApiQuerySuccess","storefrontApiQueryError","storefrontResponseParseError",...BM.flatMap(e=>[`${e}Start`,`${e}Success`,`${e}Error`]),"marketDriverChangeShippingAddressCountryCode","unknownChangeStart","unknownChangeSuccess","unknownChangeError"],VM=["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}$`)}),UM=()=>{const e=ae(Rg),{observability:t}=ie();return n(n=>{const r=function(e){switch(e){case"postalCode":return"zip";case"zone":case"zoneCode":return"provinceCode";case"country":return"countryCode";default:return e}}(n),a=r?`${e}.${r}`:e;return i=a,VM.some(e=>e.test(i))?a:(t.error(new qM(`Invalid target (${e}) and field (${r}
2) combination`)),"cart");var i},[e,t])},qM=class extends Error{constructor(){super(...arguments),this.name="InvalidTargetError"}},jM=new Set([FP.InputInvalid,FP.InputRequired]);function HM(e){return!jM.has(e)}function $M(e,t){return!!e&&e.target===t.target&&e.errorType===t.errorType&&e.value===t.value&&e.message===t.message}function YM(e){const{message:t,errorType:n,errorValue:r,children:o}=e,s=UM()(),l=ig(),c=i(null),u=i(),p=i(!0),m=oe(l),h=e=>{m.current({...e,timestamp:new Date})},g=Io(e=>{p.current&&$M(u.current,e)&&HM(e.errorType)&&h(e)},250);return a(()=>{const e=n||function(e){switch(e){case"cart.buyerIdentity":return FP.ContactError;case"cart.deliveryGroups[0].deliveryAddress":return FP.DeliveryError;case"cart.paymentLines[0].billingAddress":case"cart.paymentLines[0]":return FP.PaymentError;case"cart.discountCode":return FP.DiscountError;default:return FP.CheckoutError}}(s),a=t??c.current?.textContent??"",i={target:s,errorType:e,value:r||null,message:a};$M(u.current,i)||(u.current=i,HM(e)?g(i):h(i))}),a(()=>()=>{p.current=!1},[]),d("div",{ref:c,children:o})}function WM(e){const{errorType:t,errorValue:n,children:r,...a}=e;return d(OM,{...a,children:d(YM,{errorType:t,errorValue:n,children:r})})}function GM({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}}
2):r;return["critical","warning"].includes(a)?d(WM,{...i,errorType:n??FP.CheckoutError,children:o}):d(OM,{...i,children:o})}function JM(){const e=NM().value;return e?d(GM,{notice:e,errorType:FP.DeliveryError}):null}function KM(){const{checkout:{negotiator:e}}=ie(),n=e.current.fields.allViolations,r=t(()=>(n.value?.filter(e=>Ao(e.code))??[]).filter((e,t,n)=>t===n.findIndex(t=>t.code===e.code))),a=t(()=>r.value.length>0);return d(E,{when:a,children:d(gf,{gap:"base",children:d($,{each:r,getKey:e=>e.code,children:({localizedMessage:e,nonLocalizedMessage:t})=>d(WM,{errorType:FP.PaymentError,tone:"critical",children:e||t})})})})}function QM(){const{checkout:{negotiator:e}}=ie(),{allViolations:n}=e.current.fields;return t(()=>{const e=n.value?.filter(e=>Rb.has(e.code))||[];return{violations:e,hasViolations:e.length>0}})}const XM=()=>{const{violations:e,hasViolations:t}=QM().value;return t?d(gf,{gap:"base",children:e.map(({code:e,localizedMessage:t,nonLocalizedMessage:n})=>d(WM,{errorType:FP.DiscountError,tone:"warning",children:t||n},e))}):null};function ZM(){const{router:e,checkout:{identity:n,negotiator:r}}=ie(),o=r.current.fields.allViolations,s=m(null),{shippingAddress:l}=r.parts,c=T(Tt(l.value.countryCode)),u=t(()=>py(o.value??[])),d=t(()=>function(e=[]){const t=e.filter(({code:e})=>To.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(n.current.value);return k(()=>{const e=n.current.value;e!==p.current&&void 0!==p.current&&(s.value=null),p.current=e}),k(()=>{const e=d.value;e&&e!==s.peek()&&(s.value=e)}),t(()=>{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 eD(){const e=ZM(),t=sh(),n=i(null),r=Io(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 k(()=>{const t=e.value.toast;t&&o(()=>{r(t)})}),null}function tD(){const{shopPay:e,embed:t,mobileCheckoutSdk:n,checkout:{identity:r}}=ie(),a=e.app.config,i=Boolean(t?.isCheckoutKit()||t&&"shopPay"!==r.current.value)||n.enabled||Si(a);return{isAppLayout:i,isWebLayout:!i}}class nD extends Error{constructor(){super(...arguments),this.name="BuyWithPrimeChangeLinkError"}}function rD(e){const{checkout:{negotiator:n}}=ie(),r=n.parts.paymentLines;return t(()=>function(e,t){const[n]=rn(e,[t]);if(!n?.method?.walletParams)return null;const{checkout_session_id:r}=n.method.walletParams;return r}(r.value,e))}function aD(){const{i18n:e}=ie(),{href:t,onClick:n}=mk();return d(mf,{href:t,onClick:n,children:e.translate("account_management.checkout_as_guest_link")})}const iD=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"]]),oD=["SHOP_PAY_DECLINED"];function sD(e){const{i18n:t}=ie();let n="generic_error";return e&&(n=iD.get(e.code)||"generic_error"),t.translate("payment_errors",{scope:n,...e&&oD.includes(e.code)&&{checkout_as_guest_link:d(aD,{})}})}const lD=["AMOUNT_TOO_SMALL"];function cD(){const[e]=[{isBuyWithPrime:!0,checkoutSessionId:rD(_n.BuyWithPrime).value},{isBuyWithPrime:!1,checkoutSessionId:rD(_n.AmazonPay).value}].filter(({checkoutSessionId:e})=>Boolean(e)),{i18n:n,observability:r}=ie(),{error:a,hasError:i}=by(Lo),o=a&&lD.includes(a),s=sD(o?{type:"payment",code:a}:void 0),{inMemoryAmazonPayParts:{hasPaymentSheetError:l,sdkStatus:c}}=un(),u=t(()=>{const e=c.value;return e.status===cv.Available?e.sdk:void 0});if(!i||!e)return null;const{isBuyWithPrime:p,checkoutSessionId:m}=e;return d(E,{when:u,children:e=>d(WM,{tone:"critical",errorType:FP.PaymentError,children:d(IE,{children:o?s:d(y,{children:[n.translate("amazon_pay.error_page.payment_decline.message"),d(mf,{onClick:()=>{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 nD(`Error on changing buyer payment method. Details: ${t}`,{cause:t}))}},children:n.translate("amazon_pay.error_page.payment_decline.link")})]})})})})}
2const uD=new Map([["invalid_config","critical"],["config_missing_required_fields","critical"],["unusable_partial_address","critical"],["recovery_notice","critical"],[fa,"info"]]),dD=()=>{const e=m(!1),n=m(!1),r=My(),{checkout:{negotiator:a}}=ie(),i=a.current.fields.allViolations,o=t(()=>i.value?.some(e=>Ro.has(e.code))??!1);return k(()=>{o.value&&(n.value=!0),!o.value&&e.value&&(e.value=!1,n.value=!1)}),t(()=>{const t=n.value&&!e.value,a=r.value;return t&&a?{code:Ty.PaymentMethodIncompatibleWithPaymentTerms,localizedMessage:a,tone:"info",onDismiss:()=>{e.value=!0}}:null})};function pD(){!function(){const{checkout:{negotiator:e}}=ie(),{shippingAddress:t}=e.parts,{inMemoryGooglePayParts:{paymentSheetError:n},inMemoryPayPalParts:{paymentSheetError:r}}=un();a(()=>{let e=!0;return t.fields.countryCode.subscribe(()=>{e?e=!1:(n.value?.type===fa&&(n.value=void 0),r.value?.type===ya&&(r.value=void 0))})},[t,n,r])}();const e=function(){const{i18n:e}=ie(),{paymentSheetError:n}=un().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 t(()=>{const e=n.value?.type,t=n.value?.tone;if(e&&a[e])return{code:Ty.PaymentSheetViolations,tone:t??"critical",localizedMessage:a[e],nonLocalizedMessage:a[e]}})}(),i=function(){const{i18n:e,checkout:{negotiator:n}}=ie(),{shippingAddress:r}=n.parts,{inMemoryGooglePayParts:{paymentSheetError:a}}=un(),i=T(Tt(r.value.countryCode));return t(()=>{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===fa){const t=i.value.details?.name;return t?e.translate("wallets.errors.unavailable.unavailable_for_c
2ountry",{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?uD.get(t):"critical";if(n)return{code:Ty.PaymentSheetViolations,tone:r,localizedMessage:n,nonLocalizedMessage:n,onDismiss:"info"===r?()=>a.value=void 0:void 0}})}(),o=T(function(){const{i18n:e,checkout:{configuration:t,negotiator:n}}=ie(),{shippingAddress:a,paymentLines:i}=n.parts,o=a.value,{value:s}=n.current.fields.paymentMethods,{inMemoryPayPalParts:{paymentSheetError:l}}=un(),{details:c,loading:u}=Tt(o.countryCode),{value:d}=n.current.fields.allViolations,p=Gf(o.countryCode),m=r(()=>ga({paymentLines:i.value,isOnePage:t.layout.isOnePage.value})?d?.filter(sS)??[]:[],[d,i,t.layout.isOnePage.value]),h=r(()=>function({violations:e,getAddressErrorsFromViolations:t}){const n=Array.from(e);return 1===n.length&&aS({missingAddressField:rS({addressErrors:t("shipping",n)}),violations:n})}({violations:m,getAddressErrorsFromViolations:p}),[m,p])?void 0:m[0],g=l.value?.type===fa,f=l.value?.type===ya,y=r(()=>{const t=va(s,"PAYPAL_EXPRESS");if(g&&!t){const t=u?o.countryCode:c?.name;return t?e.translate("wallets.errors.unavailable.unavailable_for_c
2ountry",{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:Ty.PaymentSheetViolations,tone:"critical",localizedMessage:t,nonLocalizedMessage:t,onDismiss:()=>{l.value=void 0}}}return y?{code:Ty.PaymentSheetViolations,tone:"info",localizedMessage:y,nonLocalizedMessage:y,onDismiss:()=>{l.value=void 0}}:h?{code:Ty.PaymentSheetViolations,tone:"critical",localizedMessage:e.translate("wallets.recovery_notice"),nonLocalizedMessage:e.translate("wallets.recovery_notice")}:void 0}()),s=function(){const{receiptErrorSignal:e}=un();return t(()=>{const t=e.value;if(t)return{code:Ty.PaymentSheetViolations,tone:"critical",localizedMessage:t,nonLocalizedMessage:t}})}(),l=cS(),c=lS({isPayWithPayPalButton:!1}),u=qy(),d=T(function(){const{inMemoryApplePayParts:{paymentSheetError:e,subscriptionReviewTransition:t}}=un(),{i18n:r,checkout:a,shop:i}=ie(),o=i.hasFlagEnabled(dn),s=a.configuration.layout.isOnePage.value,l=Tl({applePayThreePageVaultedReviewEnabled:o,isOnePageCheckout:s}),{queryParam:c,errorMessage:u,errorTitle:d,tone:p,shouldSuppressNotice:m}=Zy({applePayPaymentSheetError:e,applePaySubscriptionReviewTransition:t,isApplePaySubscriptionReviewLayoutSupported:l}),h=n(()=>({code:Ty.PaymentSheetViolations,tone:"warning",localizedMessage:r.translate("wallets.errors.subscription_review_required")}),[r]);
2if(c&&!m)return c===pn?h():{code:Ty.PaymentSheetViolations,localizedTitle:d,tone:p,localizedMessage:u}}()),p=dD();return t(()=>{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:Ty.PaymentSheetViolations,localizedMessage:r,nonLocalizedMessage:r,tone:"critical"}:r})}const mD=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"])]),hD=["noAddressLocation","stockProblems","thankYou"],gD=new Set(["TIP_TIPS_NOT_ALLOWED_FOR_B2B"]),fD=new Set(["PAYMENTS_METHOD","PAYMENTS_TERMS_CHANGED"]),yD=[...jn,...No,...Mo,...Rb,...Do,...gD,...fD,...zo,...Oo,...Bo,...Fo,...Vo,...Tb,...Uo,...ca,...qo,...$n,...Qt,...ei,...Ro,...jo,...mD,"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 vD({children:e,id:t}){return d("li",{id:t,className:"_1585eob1 _1585eob0 _1fragemws _1fragemzh",children:e})}var _D={UnorderedList:"_70q41o2 _70q41o1 _1fragemqt _1fragemsm _1fragemp0 _1fragemuf _1fragem6t _1fragemws _1fragem11h",Wrapper:"_70q41o0",listStyleVariant:{disc:"_70q41o3",none:"_70q41o4"}};function bD({gap:e="base",listStyle:t="disc",accessibilityLabel:n,children:r,id:a}){const{className:i}=zm({gap:e}),o=v(_D.UnorderedList,t&&_D.listStyleVariant[t],i);return d("div",{className:_D.Wrapper,children:d("ul",{className:o,role:"none"===t?"list":void 0,"aria-label":n,id:a,children:r})})}function PD(){const{checkout:{negotiator:e}}=ie(),n=e.current.fields.buyerIdentity,r=Dc(),{shippingAddress:a}=e.parts;return t(()=>{const e=n.value?.purchasingCompany,t=!!e?.location.shippingAddress&&qn(a.value,e.location.shippingAddress);return r.value&&!t})}function kD(){const{i18n:e,shop:n,checkout:r}=ie(),{allViolations:a,paymentLines:i,paymentMethods:o}=r.negotiator.current.fields,s=Dc(),l=r.configuration.layout.isOnePage.value,c=Kl();return t(()=>{const{currentPage:t}=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"===t?.id))return null;const u=a.value?.filter(e=>Ao(e.code))||[];return 0===u.length?null:{violations:u,noticeType:Ty.PaymentsViolations,noticeTitle:e.translate("notice_banner.violations_title",{violation:e.translate("notice_banner.individual_violations_title",{scope:Ty.PaymentsViolations})}),noticeHeader:e.translate("notice_banner.all_violations_content",{emailLink:d("a",{href:`mailto:${n.contactEmail}`,children:e.translate("notice_banner.all_violations_email_link")})})}})}function SD(){const{client:e,router:t}=ie(),n=e.unstable_getSerialization("amazonQueryParams"),a=un().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(Ho.map(e=>[e,r[e]]))},[o,i,n,a])}function wD(){const{router:e}=ie();return{searchParams:SD(),isThankYouPage:e.currentUrlMatches("/thank-you")}}function CD(){const{checkout:{negotiator:e}}=ie(),{paymentMethods:n}=e.current.fields,{paymentLines:r}=e.parts,{searchParams:a,isThankYouPage:o}=wD(),s=T(a),l=T(o),c=i(!1),u=i(!1);return t(()=>
2{const e=s.value,t=r.value,a=n.value,i=e.wallet===_n.BuyWithPrime&&!e.amazon_cancelled,[o]=rn(t,[_n.BuyWithPrime]),d=Boolean(o);return i&&(c.current=!0),d&&(u.current=!0),!u.current||d||i||(c.current=!1,u.current=!1),$o({paymentLines:t,paymentMethods:a,urlParams:{wallet:c.current?_n.BuyWithPrime:null,amazon_cancelled:null},isThankYouPage:l.value})})}function ED(){const{checkout:e}=ie(),{paymentLines:n}=e.negotiator.parts,r="shopPay"===e.identity.current.value;return t(()=>Yo({paymentLines:n.value,isOnePage:e.configuration.layout.isOnePage.value,isShopPayActive:r}))}function xD(){const e=function(){const{i18n:e,url:n,checkout:{negotiator:r}}=ie(),a=r.current.fields.allViolations;return t(()=>{const t=a.value?.filter(e=>zo.has(e.code))??[];if(!t.length)return null;const r=d(y,{children:e.translate("notice_banner.return_to_cart_to_update_quantities",{return_to_cart_link_text:d(mf,{tone:"monochrome",href:n.cart(),children:e.translate("notice_banner.return_to_cart_link_text")})})}),[i]=t;return 1===t.length&&i?{code:i.code,localizedTitle:i.localizedMessage||i.nonLocalizedMessage,localizedMessage:r,collapsible:!1,tone:"critical"}:{code:Ty.MerchandiseQuantityRulesNotMet,localizedTitle:e.translate("general.errors.merchandise.quantity_rules_not_met"),localizedMessage:r,collapsible:!1,tone:"critical"}})}(),a=pD(),o=function(){const{checkout:e,i18n:n}=ie(),{lastJourneyProgression:r}=e.negotiator,a=CD(),{inMemoryAmazonPayParts:{buyerDetails:i}}=un();return t(()=>{const t=e.latestReceipt.value,o="failed"===t?.status&&"payment"===t.failure?.type&&"PRE_CHARGE_ERROR"===t.failure.code&&"success"!==r.value.type&&(e.configuration.layout.isOnePage.value||a.value);return o||i.value.error?{code:o?Ty.PaymentsViolations:Ty.OtherViolations,localizedMessage:n.translate("wallets.errors.generic",{walletName:n.translate("brand.amazon_pay")}),tone:"critical"}:null})}(),s=function(){const{i18n:e,checkout:{negotiator:n}}=ie(),r=n.current.fields.merchandiseLines;return t(()=>r.value?.sellingPlanMismatch?{code:Ty.SellingPlanDigest,localizedMessage:e.translate("notice_banner.subscription_changed"),status:"warning"}:void 0)}(),l=ZM(),c=function(){const{i18n:e,checkout:{negotiator:n}}=ie(),{taxes:r,merchandiseLines:a}=n.current.fields,o=i("unset"),s=i(),l=Kl();return t(()=>{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:Ty.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:n}}=ie(),{buyerIdentity:r}=e.current.fields,{isOnePage:a}=n.layout,i=function(){const{i18n:e,shop:n,checkout:{negotiator:r}}=ie(),a=r.current.fields.allViolations;return t(()=>0===(a.value?.filter(e=>ei.has(e.code))||[]).length?null:{code:Ty.ContactInformationViolations,localizedTitle:e.translate("notice_banner.contact_information.title"),tone:"critical",localizedMessage:e.translate("notice_banner.contact_information.header",{emailLink:d(mf,{href:`mailto:${n.contactEmail}`,children:e.translate("notice_banner.contact_information.email_link")})})})}(),o=function(){const{i18n:e,router:n}=ie(),r=m(!1);return t(()=>{const t="true"===n.currentUrl.value.searchParams.get("company_location_changed");return r.value||!t?null:{code:Ty.CompanyLocationChanged,localizedMessage:e.translate("notice_banner.company_location_changed"),onDismiss:()=>{r.value=!0}}})}(),s=function(){const{i18n:e,shop:n,checkout:r}=ie(),a=m(!1),i=k_(),o=Dc();return t(()=>a.value||!i.value||o.value||r.configuration.layout.isOnePage.value||!r.isShippingRequired.value?null:{code:Ty.ShippingAddressIsMissing,localizedTitle:e.translate("thank_you.missing_shipping_address_banner.title"),localizedMessage:d(MI,{children:e.translate("thank_you.missing_shipping_address_banner.text_html",{contact_us:d(mf,{href:`mailto:${n.contactEmail}`,children:e.translate("thank_you.missing_shipping_address_banner.contact_us")})})}),status:"info",onDismiss:()=>{a.value=!0}})}(),l=function(){const{i18n:e,shop:n,checkout:r}=ie(),a=Dc(),i=PD(),o=Ok(),s=r.configuration.layout.isOnePage;return t(()=>{const{deliveryAddressErrors:t}=o.value,[r]=t;if(s.value||i.value||!r)return null;const l=a.value?d(af,{children:e.translate("notice_banner.delivery_address_validation_errors_banner.use_different_address")}):d(af,{children:e.translate("notice_banner.delivery_address_validation_errors_banner.text_html",{contact_us:d(mf,{href:`mailto:${n.contactEmail}`,tone:"monochrome",children:e.translate("notice_banner.delivery_address_validation_errors_banner.contact_us")})})}),c=1===t.length;return{code:Ty.DeliveryAddressValidationErrors,tone:"critical",localizedTitle:c?r.message:e.translate("notice_banner.delivery_address_validation_errors_banner.title"),localizedMessage:c?l:d(y,{children:[d(bD,{children:t.map(e=>d(vD,{children:d(af,{children:e.messageNode??e.message})},`${e.target}${e.message}`))}),l]})}})}(),c=(()=>{const e=m(!1),{checkout:{negotiator:n}}=ie(),{allViolations:r}=n.current.fields;return t(()=>{const t=r.value?.filter(e=>gD.has(e.code))||[],n=t.length>0?t[0]:null;return e.value||!n?null:{code:Ty.TipsViolations,localizedMessage:n.localizedMessage||n.nonLocalizedMessage,status:"warning",onDismiss:()=>e.value=!0}})})(),u=NM(),p=(()=>{const{i18n:e,checkout:{negotiator:n}}=ie(),r=n.current.fields.allViolations;return t(()=>0===(r.value?.filter(e=>fD.has(e.code))||[]).length?null:{code:Ty.PaymentsViolations,localizedMessage:e.translate("payment_errors.available_methods_updated")})})(),h=kD(),g=function(){const{i18n:e,shop:n,checkout:r}=ie(),{allViolations:a}=r.negotiator.current.fields,i=Dc(),{paymentLines:o}=r.negotiator.parts;return t(()=>{if(Boolean(It(o.value,"APPLE_PAY"))&&!r.isShippingRequired.value)return null;if(i.value)return null;const t=a.value?.filter(e=>jn.has(e.code))||[];return 0===t.length?null:{violations:t,noticeType:Ty.DeliveryViolations,noticeTitle:e.translate("notice_banner.violations_title",{violation:e.translate("notice_banner.individual_violations_title",{scope:Ty.DeliveryViolations})}),noticeHeader:e.translate("notice_banner.all_violations_content",{emailLink:d("a",{href:`mailto:${n.contactEmail}`,children:e.translate("notice_banner.all_violations_email_link")})})}})}(),f=function(){const{i18n:e,shop:n,observability:r,checkout:{negotiator:a}}=ie(),{buyerIdentity:i,allViolations:o}=a.current.fields;return t(()=>{if(!i.value?.purchasingCompany)return null;const t=(o.value||[]).filter(e=>!yD.includes(e.code));for(const e of t)r.counter({name:"b2b_unhandled_violations",value:1,attributes:{violation:e.code}});return 0===t.length?null:{violations:t,noticeType:Ty.OtherViolations,noticeTitle:e.translate("notice_banner.violations_title",{violation:e.translate("notice_banner.individual_violations_title",{scope:Ty.OtherViolations})}),noticeHeader:e.translate("notice_banner.all_violations_content",{emailLink:d("a",{href:`mailto:${n.contactEmail}`,children:e.translate("notice_banner.all_violations_email_link")})})}})}(),v=Kl(),{shippingAddress:_}=e.parts;return t(()=>{const e=r.value?.purchasingCompany,{currentDetour:t}=v.value,n=t?.type&&hD.includes(t.type);if(!e||n)return[];const d=e.location.shippingAddress||{},m=qn(_.value,d),y=!a.value;return[...h.value?[RM(h.value)]:[],...g.value?[RM(g.value)]:[],...f.value?[RM(f.value)]:[],...i.value?[i.value]:[],...o.value?[o.value]:[],...s.value?[s.value]:[],...l.value?[l.value]:[],...c.value?[c.value]:[],...u.value&&y&&m?[u.value]:[],...p.value&&y?[p.value]:[]]})}(),p=function(){const{checkout:{negotiator:e}}=ie(),{allViolations:a}=e.current.fields,{lastJourneyProgression:i}=e,o=function(){const{client:e,i18n:t}=ie(),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_USAG
2E_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(mf,{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(mf,{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"),[Xo]:e.translate("remote.errors.currency_mismatch_removal")}}(t,a),[t,a]);return n((e,t)=>{const n=i[e.code];return{...e,localizedMessageHtml:n??e.localizedMessageHtml,localizedMessage:n??e.localizedMessage,tone:t}},[i])}(),s=ED();return t(()=>{const t=e.current.fields.paymentLines?.value?.lines,n=Boolean(It(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||(Wo.has(e.code)&&l.push(o(e,"info")),Go.has(e.code)&&c.push(o(e,"warning")),Jo.has(e.code)&&r&&l.push(o(e,"critical")),Ko.has(e.code)&&l.push(o(e,"critical")),n&&!s.value&&Qo.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:n}}=ie(),{paymentLines:r,buyerIdentity:a}=n.current.fields,i=kD(),o="draftOrder"===e.type;return t(()=>o&&!a.value?.purchasingCompany&&r.value?.lines?.some(e=>"deferred"===e.method.type)?i.value:null)}(),g=function(){const{i18n:e,checkout:{negotiator:n}}=ie(),r=n.current.fields.allViolations,a=Kl(),i=m(void 0);return Xl(e=>{"complete"!==e.type&&"invalid"!==e.type&&"failed"!==e.type&&(i.value=e.negotiationStage)}),t(()=>{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}}=ie(),{isOnePage:_}=f.layout,{allViolations:b}=v.current.fields,P=dD();return t(()=>{const t=py(b.value??[]),n=l.value.banner,r=h.value;return[...p.value,...r?[RM(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]:[],...P.value?[P.value]:[],...g.value&&!_.value?[g.value]:[]].filter(Zo("localizedMessage"))})}function ID(e,t){const n=e.peek()||{};Object.entries(t).some(([e,t])=>n[e]!==t)&&(e.value={...n,...t})}function AD(){const e=rD(_n.AmazonPay),t=rD(_n.BuyWithPrime),{hasError:r}=by(Lo),{checkout:a}=ie(),i=a.latestReceipt.value,o=i?.id,{persistedAmazonSignal:s}=un();return{hasError:Boolean(r&&(e.value||t.value))&&o!==s.value?.receiptIdForPaymentDecline,clearError:n(()=>ID(s,{receiptIdForPaymentDecline:o}),[s,o])}}function TD(){const{checkout:e}=ie(),t=e.latestReceipt.value,{persistedApplePaySignal:i,inMemoryApplePayParts:{paymentSheetError:o}}=un(),s=m(!1),l=m(!1),c=i.value,u=ED(),d=n(()=>{s.value=!0,l.value=!1},[s,l]),p=s.value,h=l.value;Xl(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&&(!t||p||"failed"!==t.status||"payment"!==t.failure.type||c?.receiptIdForPaymentFailure!==t.id)),[t,u.value,c,p,h]);return a(()=>{g&&(o.value=void 0)},[g,o]),{hasError:g,clearError:d}}function LD(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}
2function RD(){const[e,t]=pg(Pt.LastSeenErrorReceiptId),n=rt(),{checkout:r,client:i,source:o}=ie(),l=r.latestReceipt.value,c=i.unstable_getSerialization("receipt")?.latestReceipt,u="FailedReceipt"===c?.__typename?c.id:void 0,[d,p]=s(()=>!n.peek()||LD(l,e,o.type,u));return a(()=>{const n=LD(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 ND(e){return e.some(({code:e})=>Db.has(e))}function MD(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?!zD(e,n):!r||!r.includes(e.id));return a.length>0?a:null}const DD=(e,t)=>e.toUpperCase()===t.toUpperCase(),zD=({discountLine:e},t)=>Boolean(t&&DD(e.discount.title,t));function OD({inputRef:e,headingId:l,monorailSection:c}={}){const{checkout:u,i18n:d,userEvents:p,shop:h,shopPay:g,source:f}=ie(),{discountCodeWarningSignal:y,reductionsErrorsSignal:v,reductionsValueSignal:_,derivedErrorMessageSignal:b,refreshNegotiationSignal:P,currentDiscountCodeAttemptSignal:S}=u.negotiator.context,{negotiate:w}=Ql(),C=m(_.peek()),[E,x]=s(_.peek().length>0),I=y.value,{discountLines:A,paymentLines:T,reduction:L}=u.negotiator.parts,R=u.negotiator,N=ts(h),M="shopPay"===u.identity.current.value,D=A.value,[z,O]=s([]),B=function(){const{i18n:e,checkout:{negotiator:t}}=ie(),{voidedGiftCardsSignal:a}=t.context,i=a.peek(),o=r(()=>new Set([...Tb,"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 n(e=>e.reduce((e,t)=>o.has(t.code)?(e.push(s[t.code]()),e):e,[]),[s,o])}(),F=Fg(),V=Kl(),U=t(()=>V.value.currentPage?.id),q=m(0),j=t(()=>q.value>0),H=r(()=>D?.reduce((e,t)=>(t.message&&!z.includes(t.discount.title)&&e.push({id:ml(),discountCode:t.discount.title,message:t.message??"",discountLine:t,tone:"info"}),e),[]),[D,z]),$=i(U.peek());a(()=>U.subscribe(e=>{$.current!==e&&($.current=e,v.peek().length>0&&(v.value=[]))}),[U,v]);const Y=n(e=>{const t=y.value??[];y.value=MD(t,{ids:e}),F()},[F,y]),W=n(e=>{const t=H.filter(({id:t})=>e.includes(t)).map(({discountCode:e})=>e);O(e=>[...e,...t]),F()},[H,F]),G=n(e=>{_.value=e,e&&(C.value=e)},[_,C]),J=n(({clearWarnings:e=!0,preserveValue:t=!1}={})=>{t||(G(""),x(!1),S.value=null),e&&(y.value=null)},[S,y,G]),K=n(()=>{l&&document.getElementById(l)?.focus()},[l]),Q=n(e=>{G(e?.trim()),v.value.length>0&&(v.value=[])},[G,v]),X=n(()=>{v.value.length>0&&(v.value=[])},[v]),Z=n((e,t)=>{const n=[],r=[],a=y.value??[],i=S.value;for(const o of e){const e=nl===o.code;switch(o.type){case"InputValidationError":case"UnprocessableTermViolation":if(Lb.has(o.code)){n.push(o);break}"negotiation"!==t&&Tb.has(o.code)&&n.push(o);break;case"RemoveTermViolation":case"ConfirmChangeViolation":{const a="ConfirmChangeViolation"===o.type,s=Al(o.targetEntity),l=Boolean(i&&s&&DD(s.title,i));if(rl.has(o.code)&&"completion"!==t&&!l)break;if(Lb.has(o.code)){n.push(o);break}if("discountCodeTrigger"!==s?.discount.type||!Zs.has(o.code))break;const c=Mb.has(o.code),u={message:o.localizedMessage??o.nonLocalizedMessage,messageHtml:o.localizedMessageHtml,discountLine:s,tone:c?"info":"warning",discountCode:s.discount.title,id:ml(),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===nl)),y.value=r.length>0?r:null,{hasWarnings:r.length>0,hasPreserveInputErrors:e.some(e=>Lb.has(e.code))}},[S,y,v]),ee=n(async()=>{await w({silenceViolations:[...Qn],onComplete:e=>{u.unstable_overwriteLatestReceipt(void 0),P.value=!1,"success"!==e.status&&"error"!==e.status||Z(e.errors)}})},[Z,w,u,P]);k(()=>{const e=u.latestReceipt.value;!P.peek()&&e&&ny(e)&&"discount"===e.failure?.type&&(P.value=!0,o(()=>{ee()}))}),Xl(n(e=>{"errors"in e&&Z(e.errors,e.negotiationStage)},[Z])),k(()=>{const e=R.lastJourneyProgression.value;"error"===e.type&&"completion"===e.negotiationStage&&o(()=>Z(e.errors,"completion"))}),ns(({parts:e,reason:t})=>{const n=y.peek()??[],r=S.peek(),a=r&&n.every(e=>!zD(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===nl||((e,t)=>t.some(t=>("discountCodeTrigger"===t.discount.type||"code"===t.discount.type)&&zD(e,t.discount.title)))(r,e))return t;const a=zD(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"}}
2);const te=n(e=>(e||T.value).filter(e=>"giftCard"===e.method.type&&"code"in e.method).map(e=>e.method.code),[T]),ne=n(()=>A.value.filter(e=>"code"===e.discount.type).map(e=>e.discount.title),[A]),re=n(async()=>{q.value+=1;try{const t=_.value,n=JSON.parse(JSON.stringify(T.value));S.value=t,e?.current?.blur(),K();const r=ne(),a=new Set(A.value.filter(e=>"code"===e.discount.type&&e.discount.codeHidden).map(e=>e.discount.title));await w({silenceViolations:Ve(["deliveryNext"]),fieldsToResolve:[...Ab],loading:["deliveryNext","discountLines"],customizeNegotiation:e=>({...e,reduction:{code:t}}),onComplete:e=>{if("success"===e.status||"error"===e.status){const{hasWarnings:i,hasPreserveInputErrors:o}=Z(e.errors);J({clearWarnings:!i,preserveValue:o});const s=ND(e.errors);if(s&&e.errors.some(e=>Mb.has(e.code))){const e=ne(),n=r.filter(t=>!e.includes(t)),[i]=n;void 0!==i&&(1===n.length&&a.has(i)?(Ou({content:d.translate("order_summary.discount_has_been_removed")}),Ou({content:d.translate("order_summary.discount_code_applied_with_code",{code:t})})):Ou({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))}(te(n),te(l)),g=n.reduce((e,t)=>("giftCard"===t.method.type&&null!=t.cost&&t.cost.amount>0&&(e[mo(t.method)]=!0),e),{}),y=N&&l.some(e=>"giftCard"===e.method.type&&null!=e.cost&&e.cost.amount>0&&void 0===g[mo(e.method)]);if(!s){if(N&&(m||y)){const e=T.peek();T.value=[...e.filter(e=>!rs(e)),...l.filter(rs)]}const{runningTotal:r,merchandiseLines:a}=e.negotiated,i=r&&r.amount<=0;Boolean(!i||as(a?.lines))||n.some(e=>"walletsPlatformPaymentMethod"===e.method.type&&e.method.name===_n.BuyWithPrime)||function(e,t){const n=es(t);e.value=n}(T,N&&(m||y)?l:n);const o=d.translate("order_summary.discount_code_applied_with_code",{code:t});Ou({content:m||y?d.translate("order_summary.gift_card_applied"):o}),G(""),x(!1)}const v=e.errors.find(e=>Db.has(e.code)),_=()=>{if(!s)return m?"gift_card":"discount_code"};p.monorailEvent({schemaId:"checkout_reduction_attempted/2.0",payload:{shopId:parseInt(le(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:{...Xr(f,u,h),action:"add_discount_failure"}}):p.monorailEvent({schemaId:"shopify_pay_payment_page_ui_interaction/1.2",payload:{...Xr(f,u,h),action:m?"add_gift_card":"add_discount_success"}}))}},force:!0})}finally{q.value-=1}F()},[q,J,S,F,K,te,Z,e,M,w,A,T,G,d,_,p,f,u,h,N,c,ne]),ae=n(async e=>{const t=A.value,n=ne(),r=t.some(t=>"code"===t.discount.type&&t.discount.title===e&&t.discount.codeHidden);if(1===t.length&&K(),Di(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=MD(y.value,{code:e}),O(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:{...Xr(f,u,h),action:"remove_discount"}}),await w({silenceViolations:Ve(["deliveryNext"]),fieldsToResolve:[...Ab],loading:["discountLines","deliveryNext"],force:!0,onComplete:t=>{"success"!==t.status&&"error"!==t.status||Z(t.errors),Ou({content:r?d.translate("order_summary.discount_has_been_removed"):d.translate("order_summary.discount_code_removed",{code:e}),role:"status"});const a=ne().filter(e=>!n.includes(e)),[i]=a;void 0!==i&&Ou({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"})}}),F()},[g,A,L,M,w,F,K,p,f,u,h,Z,y,ne,d]),oe=n(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:{...Xr(f,u,h),action:"remove_gift_card"}}),await w({silenceViolations:Ve(["paymentLines"])}),F()},[T,M,w,F,p,f,u,h,K]),se=_.value,ce=v.value,ue=r(()=>({value:se,valueSignal:C,onChange:Q,onInput:X,error:is(ce),errorSignal:b}),[b,C,Q,X,ce,se]),de=r(()=>B(ce),[B,ce]);return{loading:j.value,handleSubmit:re,handleNegotiationErrors:Z,dirty:E,setDirty:x,removeDiscount:ae,getGiftCards:te,removeGiftCard:oe,reductionCodeField:ue,discountCodeWarning:I,discountMessages:H,removeDiscountCodeWarnings:Y,removeDiscountCodeMessage:W,giftCardBannerErrors:de}}function BD(){const{negotiate:e}=Ql(),{inMemoryApplePayParts:{asPaymentMethod:t}}=un(),{checkout:{wallets:r,negotiator:a}}=ie(),{email:i,phone:o,billingAddress:s,paymentLines:l}=a.parts,{value:c}=a.current.fields.buyerIdentity,u=Boolean("CustomerProfile"===c?.customerProfile?.__typename),d=c?.purchasingCompany,p=$y(),m=Cb(),h=os({availableDeliveryAddresses:a.current.fields.availableDeliveryAddresses?.value,mustSelectProvidedAddress:a.current.fields.mustSelectProvidedAddress?.value}),g=n(()=>{const e={shouldResetBuyerInfo:!1,shouldRemoveWalletContent:!1,shouldRemoveBillingAddress:!1,forceClearLocalPickupFields:!1},n=t.value;return r.activeSession.value?{...e}:u?{...e,shouldRemoveWalletContent:n,shouldResetBuyerInfo:!n,shouldRemoveBillingAddress:!0}:n?{...e,shouldRemoveWalletContent:!0,shouldRemoveBillingAddress:!d}:p.value?{...e,shouldRemoveBillingAddress:!0,forceClearLocalPickupFields:!0}:{...e,shouldResetBuyerInfo:!0}},[r,u,t,p,d]),f=$P(),y=HP();return n(async({shouldPersist:n=!0}={})=>{const{shouldResetBuyerInfo:a,shouldRemoveWalletContent:c,shouldRemoveBillingAddress:u,forceClearLocalPickupFields:d}=g();c&&(l.value=bn(l.value,{method:{type:"wallet",name:"APPLE_PAY"}})),y.value||f({shouldResetCustomerInfo:a,shouldRemovePaymentLine:!t.value,isConstrainedAddress:h}),d&&(i.value="",o.value=""),u&&(s.value=m("billing")??Rl(s.value)),n&&!r.activeSession.value&&await e({silenceViolations:["non-stock"]})},[f,r,l,i,o,s,e,g,t,y,m,h])}function FD({shouldPersist:e}){const t=BD(),{walletUsedForSubmissionSignal:r,persistedApplePaySignal:a,inMemoryApplePayParts:{paymentSheetError:i,subscriptionReviewTransition:o}}=un();return n(()=>{i.value=void 0,o.value=void 0,r.value=void 0,a.value={},t({shouldPersist:e})},[i,o,r,a,t,e])}function VD(){const e=FD({shouldPersist:!1}),{clearError:t,hasError:r}=TD(),{checkout:a,router:i}=ie(),{clearForcedCheckoutLayout:o}=Vy(dn);return YP({onClick:n(()=>{e(),o({wallet:"APPLE_PAY"}),a.unstable_evaluateSupportsSplitShipping(i.currentUrl.value),r&&t()},[e,a,o,i,t,r]),shouldResetCustomerInfo:!1,shouldRemovePaymentLine:!1,skipRedirect:!0})}function UD(){const{i18n:e}=ie(),{onClick:t}=VD(),n=e.translate("wallets.errors.processing_error_checkout_as_guest",{checkout_as_guest_link:d(mf,{onClick:t,children:e.translate("account_management.checkout_as_guest_link")})});return d(WM,{errorType:FP.PaymentError,tone:"critical",children:d(gf,{alignItems:"start",ga
2p:"small-500",children:d(IE,{children:n})})})}function qD(){const{inMemoryAmazonPayParts:{buyerDetails:e,buyerDetailsContentLoaded:n}}=un(),r=mn("shippingAddress");return t(()=>n.value&&!e.value.loading&&!r.value)}function jD(e){const t=qD(),{violations:n}=fy(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 HD({ignorePrefixes:e}={ignorePrefixes:[]}){const{i18n:t}=ie(),n=jD(new Set([...ss].filter(t=>e.every(e=>!t.startsWith(e))))),r=jD(new Set([...jn,...Vo].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 $D(){return HD({ignorePrefixes:["DELIVERY_PHONE_NUMBER","DELIVERY_COMPANY"]}).errors??[]}function YD(){const{i18n:e}=ie(),t=$D();return t?.length?d(WM,{tone:"critical",errorType:FP.PaymentError,children:[e.translate("wallets.errors.select_different_shipping_address_to_resolve_errors"),d(bD,{children:t.map(e=>d(vD,{children:d(af,{children:e})},e))})]},"amazon-pay-errors"):null}function WD(){const e=CD(),n=T($D()),{persistedAmazonSignal:r,inMemoryAmazonPayParts:{hasPaymentSheetError:a}}=un();return t(()=>{const t=r.value;return t?.primeError||e.value?t?.primeError?"terminal error":a.value?"payment sheet error":n.value?.length?"amazon pay error messages":null:null})}function GD(){const e=WD();return e.value?d(JD,{errorMessagesType:e.value}):null}function JD({errorMessagesType:e}){const{i18n:t,checkout:n}=ie(),r=n.configuration.layout.isOnePage.value,{value:i}=n.negotiator.current.fields.paymentLines,{persistedAmazonSignal:o}=un();return function(e="unknown"){const{observability:t}=ie();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===_n.BuyWithPrime));e?.length&&ID(o,{primeError:void 0})},[i,o]),"payment sheet error"===e||"terminal error"===e?d(WM,{errorType:FP.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(YD,{}):null}function KD({errors:e,errorType:t}){return d(y,{children:e.map(e=>d(WM,{tone:"critical",errorType:t,children:e.messageNode??e.message},`${e.target}${e.message}`))})}function QD(e){if(e.startsWith("DISCOUNTS")||"ReductionViolations"===e)return FP.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 FP.MerchandiseError;case"PAYMENTS_SHIPPING_MUST_MATCH_BILLING":case"ShippingAddressIsMissing":case"DeliveryViolations":case"DeliveryAddressValidationErrors":return FP.DeliveryError;case"PAYMENTS_WALLET_PAYPAL_EXPRESS_ADDRESS_INVALID":case"PAYMENT_MANUAL_PAYMENTS_NOT_ALLOWED_FOR_B2B":case"PaymentViolations":return FP.PaymentError;default:return FP.CheckoutError}}function XD(){const e=xD().value;return e.length>0?e.map(e=>d(GM,{notice:e,errorType:QD(e.code)},e.code)):null}function ZD(){const{globalErrors:e}=Ok().value;return e.length>0?d(KD,{errors:e,errorType:FP.CheckoutError}):null}function ez(){const{merchandiseLineTransformerErrors:e}=function(){const{checkout:{negotiator:e}}=ie(),{allViolations:n}=e.current.fields,r=mn("allViolations");return t(()=>{const e=["MERCHANDISE_LINE_TRANSFORMERS_RUN_ERROR"];return r.value||!n.value?{merchandiseLineTransformerErrors:[]}:{merchandiseLineTransformerErrors:[...n.value.reduce((t,n)=>("UnprocessableTermViolation"===n.__typename&&e.includes(n.code)&&t.push({message:n.localizedMessage||n.nonLocalizedMessage,target:n.target}),t),[])].filter(Lk())}})}().value;return e.length>0?d(KD,{errors:e,errorType:FP.MerchandiseError}):null}function tz(){const{contactErrors:e}=Ok().value,t=ME();return 0===e.length?null:t.value.contact?d(KD,{errors:e,errorType:FP.ContactError}):null}function nz(){const e=WD();return Boolean(e.value)?d(GD,{}):null}function rz(){const{hasError:e}=AD(),t=RD();return e&&!t?d(cD,{}):null}function az(){const{hasError:e}=TD();return e?d(UD,{}):null}function iz(){const{giftCardBannerErrors:e}=OD(),{checkout:{configuration:t,negotiator:n}}=ie(),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(WM,{errorType:FP.DiscountError,tone:"critical",children:o.localizedMessage}):i?d(WM,{errorType:FP.DiscountError,tone:"critical",children:i}):null}const oz=()=>{const{isAppLayout:e}=tD(),{embed:t,checkout:n}=ie(),r=n.configuration.layout.isOnePage.value,{lineItems:{priority:a="base"}}
2=Vm(),i=[XD(),ZD(),ez(),tz(),nz(),rz(),iz(),az()].filter(Boolean);if(0===i.length)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(gf,{gap:"small-200",padding:`@media (inline-size >= extraSmall) ${s?"none none small-100 none":"none"}, ${o}`,children:i})},sz=x(function({section:e="top"}){return{toast:d(eD,{}),top:d(oz,{}),reductions:d(XM,{}),delivery:d(JM,{}),payment:d(KM,{})}[e]});function lz({sectionId:e,children:t}){const{source:n}=ie(),o="simulated"===n.type,{sectionRef:s}=function(e){const{source:t,checkout:{negotiator:n}}=ie(),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 cz={id:"18855ddcbbe672966b615922c0349b29db289bb4e82c4444a93b2c3bfed688bb",type:"mutation",name:"UserDiscountDelete",source:"mutation UserDiscountDelete($code:String!,$shopifyDomain:String!){userDiscountDelete(code:$code,shopifyDomain:$shopifyDomain){userErrors{field message __typename}__typename}}"};function uz({children:e}){const{formStatus:t}=function(){const{negotiate:e}=Ql(),{handleNegotiationErrors:t,discountCodeWarning:r}=OD(),{shop:i,source:o,checkout:l,userEvents:c,shopPay:u}=ie(),{discountLines:d,reduction:p}=l.negotiator.parts,m=u.user.wallet.value,h=function(){const{graphql:{shopPayGraphql:e},shop:{myshopifyDomain:t}}=ie();return n(async n=>{const{data:r,error:a}=await e.mutate(cz,{variables:{code:n,shopifyDomain:t}});if(a||!r?.userDiscountDelete)return{status:"failed"};const{userDiscountDelete:i}=r;return i.userErrors.length>0?{status:"failed",errors:i.userErrors}:{status:"success"}},[e,t])}(),[g,f]=s(!1),[y,v]=s(""),_=u.user.shopAccountUuid,b=n((e,t)=>
2{c.monorailEvent({schemaId:"shopify_pay_login_with_shop_sdk_discount_wallet_events/2.0",payload:{...Xr(o,l,i),action:e,shopAccountUuid:t,shopPermanentDomain:i.myshopifyDomain,discountCode:y}})},[c,o,l,i,y]),P=n(async e=>{"success"===(await h(y)).status&&b("invalidated - discount had been deleted",e)},[h,b,y]),[k,S]=s(()=>d.value.length?"open":"closed"),w=n(e=>{const t=["InputValidationError","UnprocessableTermViolation","RemoveTermViolation"],n=new Set([...Lb,"DISCOUNTS_CUSTOMER_USAGE_LIMIT_REACHED","DISCOUNTS_USAGE_LIMIT_REACHED",nl]);return e.some(e=>t.includes(e.type)&&n.has(e.code))},[]),C=n(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 n=y;if(!g&&"negotiating_app_discount"===k&&n){f(!0),p.value={code:n};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()===n?.toLowerCase());y&&(t(e.errors),i?b("applied",a):w(e.errors)?P(a):C(e.errors)&&b("failed to apply - invalid cart",a),p.value=void 0),S(i||r?"open":"closed")}},force:!0})}},[g,t,r,e,y,k,w,b,C,P,c,p,_.value]),{discountLines:d.value,formStatus:k,setFormStatus:S,walletDiscountCode:y}}();return"negotiating_app_discount"===t?d(Qg,{inlineAlignment:"center",children:d(ef,{})}):d(y,{children:e})}function dz({children:e,state:t,errors:n}){const r=UM(),o=ig(),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?FP.InputInvalid:FP.InputRequired,l="string"==typeof(c=e)||"number"==typeof c?c.toString():Yi(c)?c.message:ls(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 pz(){const{source:e,checkout:{negotiator:n}}=ie(),r=n.current.fields.canUpdateDiscountCodes;return t(()=>(r.value??!0)&&!Fn(e))}function mz(){const{checkout:{negotiator:e}}=ie(),n=e.current.fields.paymentFlexibilityPaymentTermsTemplate,r=it(),a=e.current.fields.paymentMethods;return t(()=>(!e.current.fields.buyerIdentity.value?.purchasingCompany||!n.value&&!r.value)&&a.value?.some(e=>"giftCard"===e.type))}const hz="_1MTFx";function gz({messages:e}){const t=e=>{return d(MI,{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:hz,children:t(n)}):d(bD,{children:e.map(e=>d(vD,{children:d("div",{className:hz,children:t(e)})},e.id))})}const fz=x(function({removeBanner:e,messages:t,grouped:a=!1}){const{i18n:i}=ie(),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]}))}(t,a),[t,a]),s=n((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===t.length?null:d(Ng,{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(WM,{...c,errorType:FP.DiscountError,children:d(gz,{messages:i})},a[0]):d(OM,{...c,children:d(gz,{messages:i})},a[0])})})});function yz({accessibilityLabel:e,children:t,graphic:n,id:r}){const a=DS(t);return d("div",{className:"_14brw1 _14brw0 _1fragempf _1fragemnm _1fragemt6 _1fragemrd _1fragem13d _1fragemzg _1fragem11x _1fragemzi",id:r,children:[d(gf,{columnGap:"small-400",alignItems:"center",direction:"inline",children:[n&&d("span",{className:a?"_14brw2":void 0,children:d(Xm,{type:n})}),a&&d("span",{className:"_14brw3",children:d(af,{accessibilityVisibility:e?"hidden":void 0,dir:"auto",children:d(FI,{children:t})})})]}),e&&d(af,{accessibilityVisibility:"exclusive",dir:"auto",children:e})]})}var vz="_14gomm23 _14gomm22 _1fragemyb _1fragem11v _1fragem11z",_z="_14gomm27 _14gomm26 _1fragem6y",bz="_14gomm25 _14gomm24 _1fragemyk";const Pz=cm(_(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},P){const k=yd(),S=Hu(),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",{[vz]:n||k,[_z]:o}),E=e?S("removeItem",{label:e}):S("removeChip");return d("div",{id:l,className:C,role:"group",children:[d(kz,{"aria-describedby":b,disabled:n,href:s,inert:k,onClick:m,onMouseEnter:h,onMouseLeave:g,onFocus:f,onBlur:y,ref:P,removable:c,children:d(yz,{accessibilityLabel:e,graphic:r,children:t})}),c&&d("button",{"aria-hidden":!!k||void 0,"aria-label":E,className:v("_14gomm2b _14gomm2a _1fragempf _1fragemnm _1fragemt6 _1fragemrd",bz),"data-event-name":u,disabled:n,tabIndex:k?-1:void 0,type:"button",onClick:()=>n||k||"function"!=typeof _?void 0:_(),children:d(Xm,{type:"x",size:"small"})})]})})),kz=_(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=xp(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(Bm,{"aria-describedby":u,className:v(bz,"_14gomm29 _14gomm28 _1fragem128"),href:g,onClick:f,ref:m,...y,children:e}):d("button",{"aria-describedby":u,"aria-hidden":!!r||void 0,className:bz,disabled:t,onClick:f,ref:m,tabIndex:r?-1:void 0,type:"button",...y,children:e}):d("div",{className:bz,ref:m,children:e})});function Sz({reductionTags:e,headingId:t}){const{i18n:n}=ie(),r=pz(),a=LR(),{removeDiscount:i,removeGiftCard:o}=OD({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(gf,{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(Qg,{accessibilityRole:"list-item",className:"ZWcPq",children:[d(Pz,{accessibilityLabel:u,graphic:p,id:`tag-${t}`,interestFor:g,removable:!g,onRemove:h,removeTrackingEvent:m,children:c.toUpperCase()}),g&&d(nm,{id:g,children:n.translate("order_summary.automatic_discount_tooltip")})]},`${e.originType}-${e.code}`)})})}function wz({headerLevel:e,monorailSection:t,autoFocus:n,autoScroll:r}){return d(Ug,{children:d(Ng,{target:"cart",children:d(xz,{headerLevel:e,monorailSection:t,autoFocus:n,autoScroll:r})})})}
2const Cz=Oc("ReductionsInput"),Ez=Oc("ReductionsHeading");function xz({headerLevel:e,monorailSection:i,autoFocus:o,autoScroll:s}){const{i18n:l,shopPay:c,shop:{discountCodesEnabled:u,giftCardsEnabled:p},checkout:h}=ie(),g="shopPay"===h.identity.current.value,f=h.negotiator,v=h.configuration.layout.isOnePage.value,{reductions:{applyButtonPosition:_,discountTagsDisplay:b,automaticTagsDisplay:P,position:k,spacing:S}}=By(),w=rt(),C=Yl({base:!0,medium:!1}),E=!w.value||(C??!1),x=m(!1),I=n(()=>{x.value=!x.value},[x]),A=pz(),T=Aw(),{control:{labelPosition:L="inside"}}=Vm(),{reductions:{labelPosition:R=L}}=By(),{discountLines:N,paymentLines:M}=h.negotiator.parts,D=N.value,z=M.value.reduce((e,t)=>("giftCard"===t.method.type&&"code"in t.method&&e.push({originType:"giftCard",code:t.method.code}),e),[]),O=Di(c)&&c.discountCodes.value.length?c.discountCodes.value:null,B=O?[...new Set(O)].map(e=>{const t=D.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}:{}}}):[...D.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()],F=D.reduce((e,{discount:{type:t},title:n})=>("automatic"!==t&&"custom"!==t||e.push({originType:"automatic",code:n}),e),[]),V=[..."hidden"===P?[]:F,...A.value?B:[],...z];0===V.length&&(x.value=!1);const U="always_visible"===b||"base"===b&&V.length>0&&(!E||x.value);let q=!1;"error"===f.lastJourneyProgression.value.type&&"completion"===f.lastJourneyProgression.value.negotiationStage&&(q=ND(f.lastJourneyProgression.value.errors));const j=Bc(void 0,Cz),H=Bc(void 0,Ez),$=qg({active:q});a(()=>{s&&$.current&&$.current.scrollIntoView({behavior:"smooth"})},[s,$]);const{currentDetour:Y,currentPage:W}=Kl().value,G=fw("Checkout::Reductions::RenderBefore"),J=fw("Checkout::Reductions::RenderAfter"),K=u&&A.value,Q=mz(),X=p&&Q.value,{loading:Z,reductionCodeField:ee,dirty:te,setDirty:ne,handleSubmit:re,discountCodeWarning:ae,discountMessages:oe,removeDiscountCodeWarnings:se,removeDiscountCodeMessage:le}=OD({inputRef:$,headingId:H,monorailSection:i});a(()=>{const[e]=ae??[];if(e){const t=e.message.trim();if(!t)return;return Ou({content:t,role:"status"})}},[ae]);const{label:ce,title:ue,placeholder:de}=function(){const{i18n:e,shop:{discountCodesEnabled:n}}=ie(),r=pz(),a=mz();return t(()=>{const t=n&&r.value;return a.value&&t?{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")}:t?{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,pe=r(()=>({state:{discountCode:ee.valueSignal},errors:{discountCode:ee.errorSignal}}),[ee]);if(Y&&"shopPayLogin"!==Y.type)return null;const me=ae?d(fz,{messages:ae,removeBanner:se,grouped:!0}):null,he=oe&&oe.length?d(fz,{removeBanner:le,messages:oe}):null,ge="base"===_,fe=null!=e&&"base"===k&&"outside"===R&&ue===ce,ye=!ge&&"outside"===R&&!fe,ve="base"===b&&E&&V.length>0?d(Qg,{colorLayer:"control",className:"OuqRS",children:d(qm,{className:"U9F9G",onClick:I,accessibilityLabel:l.translate("order_summary.discount_code_applied_count",{count:V.length}),"data-event-name":x.value?"discount_tags_hide":"discount_tags_show",border:"base",children:d(gf,{paddingInline:"small-300",direction:"inline",gap:"small-400",alignItems:"center",children:[d(Xm,{type:"discount",tone:"monochrome"}),d("strong",{children:V.length})]})})}):null,_e=ge?d(cf,{variant:"primary",type:"submit",loading:Z,disabled:!te,accessibilityLabel:l.translate("payment.discount_button_action_label"),"data-event-name":"apply_discount",ref:T("apply_discount"),children:l.translate("order_summary.apply_discount_button_label")}):void 0;let be=ee.error;ge||(be=!!ee.error||void 0);const Pe=d(YI,{ref:$,id:j,name:"reductions",label:ce,placeholder:de,...ee,error:be,onInput:e=>ne(e.length>0),autoFocus:o,accessoryStart:ve,accessoryEnd:_e,labelPosition:ye?void 0:R,labelAccessibilityVisibility:ye||fe?"exclusive":void 0}),ke=d(Qg,{children:[d(gf,{gap:"base",children:[d(xM,{onSubmit:re,children:ge?Pe:d(y,{children:[ye&&d(y,{children:[d(UI,{variant:"outside",htmlFor:j,label:ce}),d(HL,{blockSize:"small-400"})]}),d(gf,{gap:"small-300",children:[d(Ym,{gap:cs(["small400",S??"small100"]),gridTemplateColumns:"minmax(0, 1fr) minmax(auto, max-content)",gridAutoColumns:"1fr",gridTemplateRows:"minmax(auto, max-content)",gridAutoRows:"minmax(auto, max-content)",children:[Pe,d(cf,{variant:"primary",type:"submit",loading:Z,disabled:!te,accessibilityLabel:l.translate("payment.discount_button_action_label"),"data-event-name":"apply_discount",ref:T("apply_discount"),children:v?l.translate("order_summary.apply_discount_button_label"):d(y,{children:[d(TM,{below:"medium",children:l.translate("order_summary.apply_discount_button_label")}),d(TM,{above:"small",children:d(Xm,{type:"arrow-right"})})]})})]}),ee.error?d(OI,{controlID:j,children:ee.error}):null]})]})}),me,he]}),d(Sd,{id:"reduction-tags",open:U,duration:"fast",children:d(Qg,{paddingBlockStart:V.length>0?"base":void 0,children:d(Sz,{reductionTags:V,headingId:H})})})]});return d(y,{children:[d(Sd,{id:"gift-card-field",open:X||K,duration:"fast",children:d(PT,{children:[d(Kk,{id:H,tabIndex:-1,...e?{level:e}:{visibility:"hidden"},children:ue}),e&&d(HL,{blockSize:"base"}),d(gf,{gap:"base",children:[d(zA,{customizations:G}),d(lz,{sectionId:"reductions",children:g&&v?d(uz,{children:ke}):d(dz,{...pe,children:ke})}),d(zA,{customizations:J}),h.configuration.showPayButton&&K&&(v||"payment"===W?.id)&&d(LM,{targetSelector:"#checkout-pay-heading",icon:"credit-card",label:l.translate("order_summary.discount_discovery.back_to_finalize_order")})]})]})}),!X&&!K&&d(sz,{section:"reductions"})]})}const Iz={};function Az(e){const t=function(e){return Iz[e]||(Iz[e]=function(){const e=S(null),t=new Set,n=S(),r=S(!1),a=S();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])=>{n.value=e.isIntersecting},{threshold:[0,1],rootMargin:`0px 0px -${a.value.blockEndOffset??0}px 0px`}),new IntersectionObserver(([e])=>{r.value=1===e.intersectionRatio||e.boundingClientRect.bottom<e.rootBounds?.bottom},{threshold:[0,1],rootMargin:`999999px 0px -${(a.value.blockEndOffset??0)+(a.value.floatingElementBlockSize??0)}px 0px`})];for(const t of i)t.observe(e.value)}}const s=e.subscribe(o),l=a.subscribe(o),c=P(()=>Boolean(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()}}}()),Iz[e]}(e);return a(()=>(t.subscriptions++,()=>{t.subscriptions--,0===t.subscriptions&&function(e){Iz[e]?.dispose(),delete Iz[e]}(e)}),[t,e]),t}function Tz(e){const t=Az(e),r=i(null),a=n(e=>{const n=r.current;n&&n!==e&&t.triggerNodes.delete(n),e&&t.triggerNodes.add(e),r.current=e,t.triggerNode.value===n&&n!==e?t.triggerNode.value=e??t.triggerNodes.values().next().value??null:e&&null===t.triggerNode.value&&(t.triggerNode.value=e)},[t]);return{floatingElementHidden:t.floatingElementHidden,ready:t.ready,config:t.config,triggerNode:t.triggerNode,setTriggerNode:a}}function Lz({skipWrappingSection:e=!1,hideAccessibilityTitle:t=!1,children:n}){const{ready:r}=Tz("chat"),{i18n:a,checkout:i,checkout:{configuration:{allowEmptyCart:o,layout:s}}}=ie(),l=s.isOnePage.value,c=JT(),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(IE,{textAlign:"center",children:a.translate("stock.empty_cart_label")})}return d(e?y:PT,{...!e&&{containerName:"s-shell-section"},children:[d(gf,{gap:"large-200",children:[!t&&d(Kk,{visibility:"hidden",children:a.translate("order_summary.title")}),n]}),d(E,{when:r,children:d(Qg,{minBlockSize:"@media (inline-size >= medium) 72px, 0"})})]})}const Rz=e=>d(PT,{children:e});function Nz({placement:e}){const{checkout:{configuration:{layout:t}}}=ie(),n=t.isOnePage.value,{currentDetour:r}=Kl().value,a="thankYou"===r?.type,i=fw(a?"Checkout::ThankYou::Dynamic::Render":"Checkout::Dynamic::Render",a?"ORDER_SUMMARY3":e),o=Yl({base:!0,medium:!1}),s=rt(),l=n&&(!s.value||o);if("ORDER_SUMMARY3"===e){if(a)return null}else if(l&&!a)return null;return d(zA,{customizations:i,gap:"large-200",render:Rz})}function Mz({skipWrappingSection:e=!1,hideMerchandiseLines:t=!1,hideAccessibilityTitle:n=!1,hideReductions:r=!1,reductionsFieldAutoFocus:a=!1,reductionsFieldAutoScroll:i=!1}){const{checkout:{configuration:{visibility:o}}}=ie(),s=o.showReductions&&!r;return d(Lz,{skipWrappingSection:e,hideAccessibilityTitle:n,children:[!t&&d(IR,{}
2),s&&d(wz,{monorailSection:"order_summary",autoFocus:a,autoScroll:i}),d(Nz,{placement:"ORDER_SUMMARY3"}),d(SM,{}),d(Nz,{placement:"ORDER_SUMMARY4"})]})}function Dz({children:e}){return rt().value?d(y,{children:e}):null}const zz=()=>ll(()=>import("./1d52cad1.tBkMHxgN.js"),__vite__mapDeps([254,1,2,3,4,5,10,13,14,15,16])),Oz=w({displayName:"EngineOrderSummaryRegion",suspenseName:({slot:e})=>`engine-order-summary-${e}`,useError:Dh("EngineOrderSummaryRegion"),renderError:()=>d(Dz,{children:d(Mz,{})}),load:()=>C(zz)});function Bz({slot:e}){const{checkout:{configuration:{layout:t}}}=ie(),n=t.trees.value;if(void 0===n)return d(Mz,{});const r=Fz(n.checkout.pages,e);return r?d(Oz,{slot:e,root:r}):d(Mz,{})}function Fz(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=Fz(a.children,t);if(e)return e}}function Vz(){const e=ie();return t(()=>Av(e))}function Uz(){const{checkout:e}=ie();return e.unstable_graphqlDataRequestInfo?.checkoutSheetProtocolConfig??null}function qz(){const{mobileCheckoutSdk:e,embed:n}=ie(),r=Vz(),a=Uz(),i=Kl();return t(()=>!(r.value||e.enabled||n?.isCheckoutKit())||(e.enabled&&e.variant.isStandard()||n?.isCheckoutKit()?"thankYou"===i.value.currentDetour?.type:Boolean(a?.disclosureEnabled)))}function jz(){const{embed:e,checkout:t}=ie(),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 Hz(){const{checkout:e,embed:n,shopPay:r}=ie(),{progressing:a}=Ql(),i=Kl(),{submitting:o}=e.negotiator;return t(()=>{if(n?.isFlagshipPartner&&o.value)return!0;if(e.isRedirectingExternally.value)return!0;if(e.checkoutExit.isExiting.value)return!0;const{currentPage:t,plan:s}=i.value,l=t&&s.greenPath[s.greenPath.length-1]?.id===t.id;let c=a.value||r.session.isButtonProgressing.value;return void 0!==t&&(c=c&&Boolean(l)),c})}function $z(e={}){const[t,r]=s(null),[a,o]=s(null),l=i(null);return{entry:t,observer:a,ref:n(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 Yz(){const e=Jg(),{checkout:n,embed:r}=ie(),i=oT(),{payNowButtonElement:o}=rk(),s=pr(r?.embedder),{entry:l,ref:c}=$z({threshold:.5});a(()=>(c(o??null),()=>c(null)),[o,c]);const u=T(l?.isIntersecting);return t(()=>Boolean(!s&&(n.isRedirectingExternally.value||!e.value&&!n.wallets.activeSession.value&&!i.value&&!u.value)))}function Wz(e){return"available"===e.status&&e.methods.some(({methodType:e})=>"SHIPPING"===e||"LOCAL"===e)}function Gz(){const e=ai();return t(()=>{const t=e.value?.filter(Wz);return{shippableDeliveryLines:t?.length?t:void 0}})}function Jz(e){return!!e&&("unavailable"===e.status||"partial"===e.status||"filled"===e.status&&!e.lines.some(Wz))}function Kz({deliveryNext:e,proposedAddress:t,negotiatedAddress:n,reloadStrategy:r}){if(!Jz(e))return!1;const a=aR(r)?n??t:t;return hi(a)}const Qz={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 Xz=["phone","company","firstName","lastName"];function Zz(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(Xz.includes(a)&&(!n[a]||0===n[a]?.length))continue;r.set(a,i)}return r}const eO=e=>{const t=new Map;for(const[n,r]of Object.entries(e)){const e=r.peek();ls(e)&&"error"===e.type&&t.set(n,e.textValue)}return t};function tO({children:e}){const o=fh(),{observability:s,embed:l,events:c,checkout:{negotiator:u}}=ie(),{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 De((e,n)=>{const r=Qz[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]),_=n(e=>{v.value=e},[v]),b=i(!1);
2l?.isFlagshipPartner&&!b.current&&(b.current=!0,c.addEventListener("embed:address-replace",()=>{_("addressReplaced")}));const S=i(!1);S.current||(S.current=!0,c.addEventListener("wallet:address-replace",()=>{_("addressReplaced")})),function(e,t){const{observability:n,checkout:{wallets:o,negotiator:s},checkout:l,shop:{shippingCountries:c}}=ie(),{deliveryMethodsAddressErrors:u,deliveryMethodTimingSignal:d}=s.context,{shippingAddress:p}=s.parts,h=l.configuration.isAddressDelegationEnabled,g=p.fields.countryCode.value,f=Uf(g,c),{loading:y}=Tt(g),{negotiate:v}=Ql(),{setAddressError:_}=Ff(u),b=r(()=>us(),[]),{resetAddressSuggestions:k}=Vf(b,u),S=Gf(g),w=function(e){const t=m();return uh(e,({action:e})=>{t.value=e}),t}(e),C=bh(),E=r(()=>P(()=>function(e){switch(e){case Me.Country:return["countryCode"];case Me.CountryProvince:return["countryCode","zoneCode"];case Me.CountryProvinceZip:return["countryCode","zoneCode","postalCode"];case Me.CountryProvinceZipAddress:return["countryCode","zoneCode","postalCode","address1"];case Me.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=Io(()=>{const e=p.peek();if(y)return void(x.current=()=>I());const n=f(e),r=Zz(E.peek(),n,e);"addressReplaced"!==w.peek()&&(0===r.size?t("addressComplete"):t("addressInvalid"))},150);_h(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]),uh(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=ds(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!==ds(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=eO(u);if(Zz(E.peek(),n,p.peek()).size>0)return t(e?"negotiationResolved":"addressInvalid")}const n=S("shipping_address",r.violations),i="addressReplaced"===a?n:Zz(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=bh(),C=t(()=>{const e=v.value.status;if("resetting"===e)return{status:"empty"};if("loading"===e)return{status:e};const t=p.fields.deliveryNext.value,n=Jz(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=aR(o),l=s?h.shippingAddress.peek():h.shippingAddress.value,c=n&&("initial"===e||"empty"===e&&!s&&0===eO(g).size);return"negotiated"===e||r||c?t?n?{status:Kz({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}=ie(),r=i(!1);k(()=>{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)},[]),k(()=>{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&&!Jz(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=le(n),t=Date.now()-r;o(t,Number(e)),0===y.peek()&&(y.value=t)}}const t="empty"===e.status&&"negotiated"===v.peek().status&&Jz(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(hh.Provider,{value:I,children:e})}function nO({embedder:e,isThankYouDetour:t,normalizedPath:n}){return t&&"/thank-you"===n&&!pr(e)}var rO=(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))(rO||{});const aO={[rO.Unavailable]:{isAddressProblem:!1,isUnpurchasable:!0},[rO.UnpurchasableB2B]:{isAddressProblem:!1,isUnpurchasable:!0},[rO.Unpurchasable]:{isAddressProblem:!1,isUnpurchasable:!0},[rO.OutOfStock]:{isAddressProblem:!1,isUnpurchasable:!1},[rO.QuantityChange]:{isAddressProblem:!1,isUnpurchasable:!1},[rO.PriceChange]:{isAddressProblem:!1,isUnpurchasable:!1},[rO.Unshippable]:{isAddressProblem:!0,isUnpurchasable:!1},[rO.Unfulfillable]:{isAddressProblem:!0,isUnpurchasable:!1},[rO.Unknown]:{isAddressProblem:!1,isUnpurchasable:!1}};function iO(e){return aO[e].isAddressProblem}function oO(e){return aO[e].isUnpurchasable}function sO(){const{negotiate:e}=Ql(),{observability:t,checkout:{negotiator:r}}=ie(),a=r.parts.merchandiseLines,i=r.current.fields.merchandiseLines,o=n(e=>{const t=a.value;a.value=t.filter(({stableId:t})=>!e.includes(t))},[a]);return n(async n=>{const r=new Map((i.value?.lines??[]).map(e=>[e.stableId,e])),a=n.reduce((e,{problem:t,line:n}
2)=>{if(iO(t.type))return e;const a=r.get(n.stableId);return(!a||0===a.quantity||oO(t.type))&&e.push(n.stableId),e},[]);try{a.length>0&&(o(a),await e({}))}catch(s){t.leaveErrorBreadcrumb("Failure to update merchandise lines when handling out-of-stock items",{error:s,unavailableMerchandiseIds:a})}},[i,o,e,t])}function lO(e){const t=function(e){return e.some(e=>en.has(e.code))}(e),n=function(e){return e.some(e=>tn.has(e.code))}(e),r=function(e){return e.some(e=>nn.has(e.code))}(e),a=my(e),i=hy(e),o=dy(e),s=function(e){return e.some(e=>Jt.has(e.code))}(e),l=[t,n,r,a].filter(Boolean).length>1;return o||l?s?rO.QuantityChange:rO.OutOfStock:t?rO.Unavailable:n?rO.UnpurchasableB2B:r?rO.Unpurchasable:a?rO.Unshippable:i?rO.Unfulfillable:s?rO.QuantityChange:rO.Unknown}function cO(e){return e.quantity>0}function uO(e){return oO(e)?e:rO.OutOfStock}function dO(){const{checkout:e}=ie(),{value:t=[]}=e.negotiator.current.fields.allViolations,{value:n}=e.negotiator.current.fields.merchandiseLines,a=mn("merchandiseLines").value,i=e.negotiator.parts.merchandiseLines.value,o=r(()=>n?.lines??[],[n]),l=e.proposal.negotiated.fields.canUpdateMerchandise.value??!0,[c]=s(()=>lO(t)),[u]=s(i),d=r(()=>zT(u,t),[u,t]),p=r(()=>BT(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:rO.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:rO.PriceChange,negotiatedPrice:t?.itemPrice,proposedPrice:e?.itemPrice}}(r,a),s=function(e,t,n){if(!n&&t)return{type:uO(e)}}(t,r,a),l=r??a;return n.has(l.stableId)?{line:l,problem:{type:t===rO.Unfulfillable?rO.Unfulfillable:rO.Unshippable}}:0===a?.quantity?{line:l,problem:{type:uO(t)}}:o?{line:l,problem:o}:i?{line:l,problem:i}:s?{line:l,problem:s}:{line:l,problem:{type:rO.OutOfStock}}}(e,c,d)),[u,o,t,c,d]),m=o.filter(({stableId:e})=>!d.has(e)).some(cO)&&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 pO({width:e}){const{header:{logo:t}}=By(),{embed:n,i18n:r,shop:a,shopPay:i,source:o,url:s,router:l}=ie(),c=Mg(),u=Aw(),{isAppLayout:p}=tD(),m=Sk(),{brandSettings:h}=a,{lineItems:g}=dO(),f=sO();if(i.visibility.showShopPayBrandedLogo||dr(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(du,{level:1,children:d(Kk,{level:1,accessibilityRole:"presentation",display:"inline",children:a.name})})});n?.isFlagshipPartner?y=d(gf,{direction:"inline",gap:"small-200",alignItems:"center",children:[h?.squareLogo?.url&&d(wL,{alt:h.squareLogo.altText||a.name,src:h.squareLogo.url,className:"yfbTW",borderRadius:"base",inlineSize:"auto"}),y]}):t?.image&&(y=d(aw,{width:e}));const v="simulated"!==o.type&&!Fn(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,P=_??t?.link??b??o.headerLogoUrl??s.storefront(),k=r.translate("editor.navigation.store_logo_accessibility_label"),S=d("span",{ref:u("logo"),children:d(mf,{href:P,tone:"monochrome",textDecoration:"none",onClick:async()=>{c?m.includes(P)&&l.navigate(e=>{const t=new URL(e);return t.searchParams.set("ce_redirect",P),t}):g.length>0&&await f(g)},display:"block",children:[y,d(af,{accessibilityVisibility:"exclusive",children:k})]})});return t?.image&&t?.maxWidth?d(Qg,{maxInlineSize:`${t.maxWidth}px`,children:S}):S}const mO=w({displayName:"AccountAvatar",suspense:!1,load:()=>C(()=>ll(()=>import("./7b11cac4._ooKg-g0.js"),__vite__mapDeps([255,1,256,3,4,2,5,257,10,13,14,15,16,258]))),useError:Dh("AccountAvatar")}),hO={borderRadius:{small:"8px",base:"12px",large:"16px",fullyRounded:"36px",max:"9999px"},color:fs,transitionDuration:{base:ps(0,200,1.5,"ms")},transitionTimingFunction:{easeOut:"cubic-bezier(0.3, 0.5, 0.5, 1)"},fontFamily:hs,fontSize:ms,letterSpacing:gs,lineHeight:ys};function gO(){const e=Fm(),{router:t,userEvents:n,shop:r,source:a,checkout:i,i18n:o}=ie(),s=tg(),l="simulated"===a.type,c=Aw(),{header:{cartLink:{contentType:u="icon",image:p}={}}}=By(),m=Ck(),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*vs(e.customProperties.value.fontSize?.base??hO.fontSize.base);f=d("img",{src:p.src,alt:g,height:t,className:v(Se({display:"block"}))})}else f=d(Xm,{type:"bag",size:"large"});return d("span",{ref:c("cart"),children:d(mf,{href:m.value?.toString(),id:"cart-link",onClick:()=>
2{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:{...Xr(a,i,r),action:"return_to_cart"}})}},accessibilityLabel:"icon"===u?g:void 0,display:"block",children:f})})}function fO({alignment:e,logo:t,endAccessory:n,endAccessoryAffectsBlockSize:r=!0}){const a=n&&!r?d(Qg,{blockSize:"0px",children:d(Qg,{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",{style:{visibility:"hidden"},children:a}),d(Qg,{inlineAlignment:"center",children:t}),a]})},end:{columns:a?"minmax(auto, max-content) minmax(0, 1fr)":"minmax(0, 1fr)",markup:d(y,{children:[a,d(Qg,{inlineAlignment:"end",children:t})]})}};return d(Ym,{gridTemplateColumns:i[e].columns,minInlineSize:"100%",alignItems:"center",alignContent:"center",gap:"large-500",children:i[e].markup})}function yO(){const{checkout:e,router:t}=ie(),n=t.currentUrl.value,{header:{alignment:r="start",logo:{visibility:a,maxWidth:i}={}}}=By(),o=wk(),s=Eb(),{currentDetour:l}=Kl().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=fw(u),m="hidden"!==a||dr(n.search),h=m?d(pO,{width:i}):d("div",{});let g;return o.value?g=d(gO,{}):s.value&&(g=d(mO,{})),d(gf,{gap:"large-100",children:[(null!=g||m)&&c&&d(fO,{alignment:r,logo:h,endAccessory:g,endAccessoryAffectsBlockSize:o.value||!m}),d(zA,{customizations:p,gap:"base"})]})}const vO=w({displayName:"ShopPayCheckout",load:()=>C(()=>ll(()=>import("./461aedcc.DT1ChOns.js"),__vite__mapDeps([259,1,2,3,4,5,8,161,174,175,199,13,116,117,82,158,14,159,160,226,168,162,157,72,6,10,15,16,260])).then(e=>e.ShopPayCheckout))});function _O({children:e}){const{checkout:{configuration:{layout:t},identity:n},router:r,shopPay:{isSimulated:a}}=ie();return _s({isShopPay:"shopPay"===n.current.value,isOnePage:t.isOnePage.value,path:r.currentUrl.value.normalizedPath})?d(vO,{simulated:a,children:e}):d(y,{children:e})}function bO({children:e}){const{checkout:t}=ie(),n=Hz(),r=Yz(),a=t.checkoutExit.isExiting.value,i=gI(),o=d(_O,{children:[d(lT,{}),d(rT,{}),d(fT,{active:n.value,announceProcessing:!a,showLoadingIndicator:!a&&r.value,loadingIndicatorVariant:"progressbar",children:d(PO,{routeContentInert:!!i.value||void 0,children:e})}),d(fI,{})]});return d(Uw,{children:d(yT,{children:d(tO,{children:d(Yx,{children:o})})})})}function PO({children:e,routeContentInert:t}){const{header:{logo:{visibility:n}={}},footer:{content:{visibility:a}={}},cartLink:{visibility:i}}=By(),{checkout:o,mobileCheckoutSdk:s,shopPay:l,source:c,embed:u,router:p}=ie(),m=p.currentUrl.value,h=dr(m.search),g=jz(),f=o.configuration.showFooter,{rollup:{inlinePadding:v}}=Vm(),{currentDetour:_}=Kl().value,b=qz().value,P=Fh()&&b&&nO({embedder:u?.embedder,isThankYouDetour:"thankYou"===_?.type,normalizedPath:m.normalizedPath});let k="purchase.checkout.header.render-after",S="purchase.checkout.footer.render-after",w="purchase.checkout.chat.render";"thankYou"===_?.type&&(k="purchase.thank-you.header.render-after",S="purchase.thank-you.footer.render-after",w="purchase.thank-you.chat.render");const C=fw(k),E=fw(S),x=fw(w),I=FE(),A=ME(),T=DE(),{isAppLayout:L}=tD(),R=L&&"google"===u?.embedder&&oa({embedder:u.embedder})&&T.value&&null==_,N=rt(),M="shopPayExternal"===c.type,D=!o.configuration.visibility.showHeader,z=o.configuration.isUniversalCheckoutFinalizer&&"thankYou"===_?.type,O=(()=>{if(M)return l.visibility.showOnePageShellHeader;if(z)return C.length>0&&N.value;if(u?.isFlagshipPartner&&!pr(u.embedder)&&"shopApp"!==u.embedder)return!1;if((D||"hidden"===n&&!h&&"hidden"===i)&&!s.enabled&&!u?.isCheckoutKit()&&(0===C.length||!N.value))return!1;if(L){if(!s.enabled||s.variant.isStandard())return!1;if(u?.isCheckoutKit())return!1}return!0})(),B=yO,F=o.negotiator.current.fields.buyerIdentity.value?.customerProfile,V=null==F||"CustomerProfile"!==F.__typename,U="thankYou"===_?.type||V&&!A.value.payment&&!A.value.delivery,q=r(()=>s.enabled?s.variant.isStandard():u?!!u.isCheckoutKit()||!g&&(f||E.length>0):("hidden"!==a||E.length>0&&N.value)&&!L&&!h,[u,g,f,s,a,E.length,L,h,N.value]),j="shopPayLogin"!==_?.type&&U&&b&&!u?.isFlagshipPartner,H=l.visibility.shouldForceOnePageShellContentAsAppLayout,$=d(y,{children:[d($A,{}),d(Qg,{className:R?"ghhXm":void 0,inert:t,children:e})]}),Y=(()=>
2{if(q)return d(jA,{});if(!_&&u?.isFlagshipPartner&&g)return;const e=o.proposal.negotiated.fields.taxes.value;return pA(e)?pr(u?.embedder)?d(Qg,{paddingInline:cs(v)??"base",paddingBlockEnd:"large",children:d(mA,{liability:e.liability})}):d(mA,{liability:e.liability}):void 0})();return d(y,{children:[d(dT,{}),d(Zw,{banner:d(OE,{}),announcement:"thankYou"===_?.type&&I.length>0?d(BE,{}):void 0,header:O?d(B,{}):void 0,disclosure:j&&!P?d(hI,{}):void 0,disclosureOrderSummary:P?void 0:d(Bz,{slot:"disclosure"}),main:$,orderSummary:d(Bz,{slot:"aside"}),footer:Y,blockSize:(()=>{if(L||H)return"appLayout"})(),minMobileViewportSize:R}),d(YA,{}),d(pT,{}),d(mT,{}),d(zA,{customizations:x,transformComponents:kO,render:e=>d(Qg,{minBlockSize:"@media (inline-size >= medium) 0, 72px",children:e})})]})}const kO=cT(EE);function SO(){const{router:e}=ie(),t=un().inMemoryAmazonPayParts.serializedAmazonParams;return n(n=>{const{keep:r,only:a}=n??{},i=e.currentUrl.value.href,o=new URL(i);Ho.filter(e=>r?!r.includes(e):!a||a.includes(e)).forEach(e=>{o.searchParams.delete(e)}),Ps(t,e=>o.searchParams.get(e)),i!==o.href&&e.navigate(o.href,{replace:!0})},[e,t])}function wO(){return"true"===SD()[ks]}const CO=w({load:()=>ll(()=>import("./56bd1136.DtirGq33.js"),__vite__mapDeps([261,1,2,3,4,5,251,236,53,262,263,116,117,264,168,241,6,82,157,265,10,13,14,15,16,266])).then(e=>e.AmazonBuyerDetailsContent),renderLoading:()=>d(EO,{}),useError:function(e){const{checkout:{wallets:t,negotiator:n}}=ie(),{buyerDetails:r,buttonStatus:i,sdkStatus:o}=un().inMemoryAmazonPayParts,{paymentLines:s}=n.parts,l=SO(),c=$P();a(()=>{if(!e)return;i.value={status:"error"},o.value={status:cv.Error},r.value={loading:!1,error:!0,details:void 0},l();const n=t.escalatedWallet.value,a=n===_n.AmazonPay||n===_n.BuyWithPrime,u=s.value.some(e=>"walletsPlatformPaymentMethod"===e.method.type&&(e.method.name===_n.AmazonPay||e.method.name===_n.BuyWithPrime));a?(c({shouldResetCustomerInfo:!0}),t.setEscalatedWallet(null)):u&&(s.value=s.value.filter(e=>"walletsPlatformPaymentMethod"!==e.method.type||e.method.name!==_n.AmazonPay&&e.method.name!==_n.BuyWithPrime))},[e,r,i,l,s,c,o,t])}});function EO(){const{buyerDetailsContentLoaded:e}=un().inMemoryAmazonPayParts;return a(()=>{e.value=!1},[e]),null}function xO(){const{checkout:{negotiator:e}}=ie(),t=e.current.fields.paymentMethods,{attributes:n,externalDeliveryIds:r,paymentLines:a}=e.parts,i=wO(),o=rt();return d(E,{when:()=>o.value&&function(e,t,{attributes:n,externalDeliveryIds:r,hasAmazonCancelledParam:a}){const i=[_n.AmazonPay,_n.BuyWithPrime].some(t=>Boolean(bs(e,t))),o=t.some(e=>"walletsPlatformPaymentMethod"===e.method.type&&e.method.name===_n.BuyWithPrime),s=n?.some(({key:e,value:t})=>e===Vr&&t===_n.BuyWithPrime);return Boolean(i||o||r||s||a)}(t.value,a.value,{attributes:n.value,externalDeliveryIds:r.value,hasAmazonCancelledParam:i}),children:d(CO,{})})}function IO(){const{i18n:e}=ie(),n=Kl(),r=t(()=>n.value.currentDetour?.label??n.value.currentPage?.label??e.translate("general.page_title"));return d("h1",{className:Se({screenReaders:"only"}),children:r})}function AO({title:e,cost:t}){return d(y,{children:[e,"·",t]})}function TO({deliveryChangeTitle:e,deliveryLines:t,cardLayout:n=!1}){const{i18n:r}=ie();return d(sL,{blockPadding:n?"none":"base",children:[d(oL,{primary:!0,children:[d(af,{size:"base",type:n?void 0:"strong",children:r.translate("order_summary.shipping_label")}),t.map(({title:e,lineAmount:t})=>d(gf,{direction:"inline",gap:"small-400",alignItems:"center",children:d(AO,{title:d(af,{size:"small",children:e}),cost:d(af,{size:"small",type:"strong",children:r.formatCurrency(t.amount,{currency:t.currencyCode,form:"short"})})})},e))]}),d(oL,{inlineAlignment:"center",children:n?d(cL,{tone:"neutral",children:e}):d(IE,{type:"small",textAlign:"end",children:d(af,{type:"strong",children:e.toUpperCase()})})})]})}const LO="TeeUi",RO=Oc("TaxRecalculationLineTooltip");function NO({taxRecalculation:e,cardLayout:t=!1}){const{i18n:n}=ie(),r=n.numberFormatter({style:"percent",minimumFractionDigits:0,maximumFractionDigits:3}),a=Bc(void 0,RO),i=Bc(void 0,RO),o=e.beforeLines,s=e.afterLines;return 0===o.length&&0===s.length?null:d(sL,{blockPadding:t?"none":"base",children:[d(oL,{primary:!0,children:[d(af,{size:"base",type:t?void 0:"strong",children:n.translate("delivery_options.shipping_address")}),d(IE,{type:"small",children:[d("span",{className:LO,children:[n.translate("payment.order_edit_banner_previous_taxes_label")," ",d(MO,{lines:o,tooltipId:a,percentFormatter:r,i18n:n})," ",d("span",{"aria-hidden":"true",children:"→"})]})," ",d("span",{className:LO,children:[n.translate("payment.order_edit_banner_new_taxes_label")," ",d(MO,{lines:s,tooltipId:i,percentFormatter:r,i18n:n})]})]})]}),d(oL,{inlineAlignment:"center",children:t?d(cL,{tone:"neutral",children:n.translate("payment.order_edit_banner_single_item_updated")}):d(IE,{type:"small",textAlign:"end",children:d(af,{type:"strong",children:d("span",{className:"DQ7YO",children:n.translate("payment.order_edit_banner_single_item_updated").toUpperCase()})})})})]})}function MO({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:DO(a,n)});const i=e.map(e=>DO(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)=>
2e+(t.rate??0),0);return d(y,{children:[d(qm,{interestFor:t,className:"_8A9rc",children:n.format(s)}),d(nm,{id:t,children:i})]})}function DO(e,t){return null==e.rate?e.title:`${e.title} ${t.format(e.rate)}`}function zO(){const{i18n:e,checkout:n,shop:r}=ie(),a=Ct(),i=n.proposal.facts.orderNumber,[o]=n.proposal.facts.delivery??[],s=t(()=>o?.lines.filter(e=>"ADDED"===e.deliveryChange)??[]),l=t(()=>o?.lines.filter(e=>"REMOVED"===e.deliveryChange)??[]),u=t(()=>(n.proposal.facts.merchandiseLines??[]).filter(e=>e.quantityChange&&e.quantityChange.delta)),p=t(()=>{const e=n.proposal.facts.taxRecalculation;return e&&(e.beforeLines.length>0||e.afterLines.length>0)?e:void 0}),h=t(()=>u.value.length>0||s.value.length>0||l.value.length>0||Boolean(p.value)),g=t(()=>{if(a.value&&h.value)return{formattedAmountOwed:e.formatCurrency(a.value.amount,{currency:a.value.currencyCode,form:"short"})}}),f=t(()=>s.value.length>0?s.value:void 0),v=t(()=>l.value.length>0?l.value:void 0),_=m(!1),b=c(),P=r.hasFlagEnabled(Ss),k=d(y,{children:[d(af,{children:e.translate("payment.order_edit_banner_subtitle",{order_number:i?`#${i}`:""})}),d(HL,{blockSize:"base"}),d(OS,{}),P?d(HL,{blockSize:"base"}):null,d(XT,{title:e.translate("payment.order_edit_banner_updated_order_label"),titleHidden:!0,border:P?"none":"inner",spacing:P?"base":"none",children:[d(ZT,{hidden:!0,children:[d(eL,{hidden:!0,children:e.translate("order_summary.product_image_label")}),d(eL,{hidden:!0,children:e.translate("order_summary.description_label")}),d(eL,{hidden:!0,children:e.translate("order_summary.quantity_label")})]}),d(nL,{children:[d($,{each:u,getKey:({title:e,variantTitle:t})=>`${e}${t?`-${t}`:""}`,children:({quantity:e,quantityChange:t,image:n,title:r,variantTitle:a})=>d(sL,{blockPadding:P?"none":"base",children:[d(oL,{inlineAlignment:"start",children:d(HS,{alt:n?.altText??"",size:P?"small":"base",src:n?.url,totalItems:P&&t?.delta&&t.delta>1?t.delta:void 0})}),d(oL,{primary:!0,children:[d(af,{size:"base",type:P?void 0:"strong",children:r}),a?d(af,{color:"subdued",size:"small",children:a}):null]}),t&&t.delta&&t.type?d(oL,{inlineAlignment:"center",children:P?d(OO,{type:t.type}):d(BO,{remainingQuantity:e,delta:t.delta,type:t.type})}):null]})}),d(E,{when:f,children:t=>d(TO,{deliveryLines:t,deliveryChangeTitle:e.translate("payment.order_edit_banner_single_item_added"),cardLayout:P})}),d(E,{when:v,children:t=>d(TO,{deliveryLines:t,deliveryChangeTitle:e.translate("payment.order_edit_banner_single_item_removed"),cardLayout:P})}),d(E,{when:p,children:e=>d(NO,{taxRecalculation:e,cardLayout:P})})]})]})]});return d(E,{when:g,children:({formattedAmountOwed:t})=>{const n=e.translate("payment.order_edit_banner_title",{amount_owed:t});return P?d(Qg,{background:"subdued",borderRadius:"base",padding:"large-100",children:[d(Kk,{level:3,children:d(qm,{controlId:b,expanded:_.value,inlineSize:"100%",onClick:()=>{_.value=!_.value},children:d(Ym,{gridTemplateColumns:"minmax(0, 1fr) auto",gap:"base",alignItems:"center",children:[d(af,{size:"base",children:n}),d(Xm,{type:_.value?"chevronUp":"chevronDown",size:"small-200"})]})})}),d(Sd,{id:b,open:_.value,duration:"base",children:d(du,{children:d(Qg,{padding:"large-100 none none none",children:k})})})]}):d(OM,{heading:n,collapsible:!0,children:k})}})}function OO({type:e}){const{i18n:t}=ie();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(cL,{tone:"neutral",children:n})}function BO({remainingQuantity:e,delta:t,type:n}){const{i18n:r}=ie();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(IE,{type:"small",textAlign:"end",children:d(af,{type:"strong",children:o.toUpperCase()})})}const FO={current:void 0};function VO({active:e,breadcrumbs:t}){const{i18n:n}=ie(),r=Aw(),{buyerJourney:{alignment:a}={}}=By();return d(Nw,{section:"breadcrumbs",children:d(Tw,{section:"breadcrumbs",children:d(Qg,{accessibilityRole:"navigation",accessibilityLabel:n.translate("general.breadcrumb"),inlineAlignment:a,children:d(gf,{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(af,c||i?{color:c?void 0:"subdued",type:c?"
2strong":void 0,size:"small",children:o}:{size:"small",ref:r(n),children:d(mf,{href:a,textDecoration:"none",children:o})});return d(gf,{direction:"inline",gap:"small-200",alignItems:"center",accessibilityRole:"list-item",accessibilityCurrent:c?"step":void 0,children:[u,l&&d(Xm,{type:"chevron-right",size:"small-200"})]},n)})})})})})}function UO(){return ae(ZP)}function qO(){const{checkout:{negotiator:e}}=ie(),{paymentLines:n}=e.parts;return t(()=>{const e=It(n.value,"APPLE_PAY");return!!e&&Hi(e)})}function jO(){const{checkout:e,observability:t}=ie(),n=e.configuration.layout.isOnePage.value,r=e.latestReceipt.value,{walletUsedForSubmissionSignal:o,receiptErrorSignal:s,inMemoryApplePayParts:{asPaymentMethod:l,paymentSheetError:c}}=un(),u=Vx(ws()),d=Vx(BD()),p=qO(),{paymentLines:m}=e.negotiator.parts,h=It(m.value,"GOOGLE_PAY"),g=Boolean(h&&Cs(h)),f=Vx(KP({shouldResetCustomerInfo:!1})),y=i(new Set),v=sD("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 HO(){const{checkout:e,router:t}=ie(),n=t.currentUrl.value,{header:{alignment:r="start",logo:a}}=By(),i=Eb(),{currentDetour:o}=Kl().value;let s="purchase.checkout.header.render-after";"thankYou"===o?.type&&(s="purchase.thank-you.header.render-after");const l=fw(s),c=e.configuration.isUniversalCheckoutFinalizer&&"thankYou"===o?.type,u=!c&&("hidden"!==a?.visibility||dr(n.search)),p=!c&&i.value,m=u||p;let h;return p?h=d(fO,{alignment:r,logo:u?d(pO,{width:a?.maxWidth}):d("div",{}),endAccessory:d(mO,{}),endAccessoryAffectsBlockSize:!u}):u&&(h=d(Qg,{inlineAlignment:r,children:d(pO,{width:a?.maxWidth})})),d(y,{children:[h,l.length>0&&d(y,{children:[m&&d(HL,{blockSize:"@media (inline-size >= medium) base, large-400"}),d(zA,{customizations:l,gap:"base"})]})]})}function $O({children:e}){return d(Uw,{children:d(yT,{children:[d(YO,{}),d(rT,{}),d(lT,{}),d(WO,{children:d(GO,{children:e})})]})})}function YO(){return function(){const{router:e}=ie(),{plan:t}=Kl().value;a(()=>e.beforeNavigate((e,n)=>{const r=t.greenPath.find(t=>t.route===e.normalizedPath),a=t.greenPath.find(e=>n.pathname.endsWith(e.route));if(!r||!a)return{};if(!tc.includes(r.id)||!tc.includes(a.id))return{};const i=t.greenPath.indexOf(r),o=t.greenPath.indexOf(a);return al(()=>{},o>i?["page-slide-end"]:["page-slide-start"]),{}}),[e,t.greenPath])}(),jO(),null}function WO({children:e}){const{checkout:t}=ie(),n=Hz(),r=Yz(),a=t.checkoutExit.isExiting.value;return d(fT,{active:n.value,announceProcessing:!a,loadingIndicatorVariant:"progressbar",showLoadingIndicator:!a&&r.value,children:e})}function GO({children:e}){const{header:{logo:{visibility:t}={}},footer:{content:{visibility:n}={}}}=By(),{checkout:a,embed:i,router:o}=ie(),{currentDetour:s}=Kl().value,l=Fh()&&nO({embedder:i?.embedder,isThankYouDetour:"thankYou"===s?.type,normalizedPath:o.currentUrl.value.normalizedPath});let c="purchase.checkout.header.render-after",u="purchase.checkout.footer.render-after",p="purchase.checkout.chat.render";"thankYou"===s?.type&&(c="purchase.thank-you.header.render-after",u="purchase.thank-you.footer.render-after",p="purchase.thank-you.chat.render");const m=fw(c),h=fw(u),g=fw(p),f=FE(),v=a.configuration.isUniversalCheckoutFinalizer&&"thankYou"===s?.type,_=m.length>
20||!v&&"hidden"!==t,b=HO,P="hidden"!==n||h.length>0,k=function(e){return e.currentUrlMatches("/stock-problems")}(o),S=o.currentUrlMatches("/no-address-location"),w=Ek(o),C=o.currentUrlMatches("/shoppay"),E=CD(),{activeBreadcrumb:x,breadcrumbs:I}=function(){const{i18n:e,router:t,checkout:{negotiator:n}}=ie(),{currentPage:a,plan:{greenPath:i}}=Kl().value,o=Ck(),s=wk(),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 FO.current={ids:p.map(({id:e})=>e).join(","),activeId:m,showCartLink:s.value,hasCartUrl:Boolean(o.value)},{breadcrumbs:p,activeBreadcrumb:m}}(),A=k||S||w||C||I.length<2||E.value,T=d(JO,{children:e}),L=(()=>{if(P)return d(jA,{});const e=a.proposal.negotiated.fields.taxes.value;return pA(e)?d(mA,{liability:e.liability}):void 0})();return d(y,{children:[d(dT,{}),d(Zw,{banner:d(OE,{}),announcement:"thankYou"===s?.type&&f.length>0?d(BE,{}):void 0,header:_?d(b,{}):void 0,disclosure:l?void 0:d(hI,{}),disclosureOrderSummary:l?void 0:d(Mz,{}),main:T,orderSummary:d(Mz,{}),footer:L,buyerJourney:A?void 0:d(VO,{active:x,breadcrumbs:I})}),d(YA,{}),d(pT,{}),d(mT,{}),d(zA,{customizations:g,transformComponents:XO,render:e=>d(Qg,{minBlockSize:"@media (inline-size >= medium) 0, 72px",children:e})})]})}function JO({children:e}){const{checkout:t}=ie(),{blocking:n}=UO(),r=Hz();return d(y,{children:[d(IO,{}),d(fT,{active:n.value||r.value,announceProcessing:n.value||!t.checkoutExit.isExiting.value,showLoadingIndicator:n.value,children:[d(xO,{}),d(gf,{gap:"base",children:[d(sz,{section:"toast"}),d(sz,{section:"top"}),d(zO,{}),d(QO,{children:e})]})]})]})}function KO({condition:e,children:t}){return e?d(PT,{accessibilityRole:"presentation",children:t}):d(y,{children:t})}function QO({children:e}){const{checkout:t,router:n,shop:a}=ie(),{pending:i}=lw(),o=n.currentUrlMatches("/shipping"),s=n.currentUrlMatches("/payment"),l=n.currentUrlMatches("/review"),c="/review"===n.currentUrl.value.normalizedPath,u=o||s||l,p=c&&a.hasFlagEnabled(Es),{value:m}=t.negotiator.current.fields.deliveryNext,h=t.proposal.facts.delivery??[],g=sn(m)||h.length>0&&h.every(e=>null!==e.pickupAddress),{value:f}=Ct(),v=mn("total").value,{value:_}=t.negotiator.current.fields.paymentLines,b=mn("paymentLines").value,P=r(()=>!!l&&(v||b||(f?.amount?f.amount>0:_?.lines&&_.lines.some(e=>e.cost?.amount))),[l,f,_,v,b]);return d(ow,{style:p?void 0:i,children:d(KO,{condition:u,children:d(y,{children:[u&&d(y,{children:[d(MC,{showAddress:!g,showPayment:P}),d(HL,{blockSize:"large-400"})]}),d(Qg,{children:e})]})})})}const XO=cT(EE);function ZO(){const{checkout:e}=ie(),{billingAddressOption:t,shippingAddress:n}=e.negotiator.parts;k(()=>{e.isShippingRequired.value&&!n.value.oneTimeUse||(t.value="custom")})}function eB(){const{shop:e,source:t,checkout:n}=ie(),{billingAddressOption:r,paymentLines:i}=n.negotiator.parts,o=n.negotiator.current.fields.buyerIdentity.value?.purchasingCompany,{value:s}=n.negotiator.current.fields.deliveryNext,l=mn("deliveryNext").value;a(()=>{const a=i.value[0],c=s;if(l||!c||"filled"!==c.status||!a)return;const u=sn(c),d=Tr(c);if(u||d)return;const p=!u&&n.isShippingRequired.value;xs({shopRequireMatchingShippingAndBilling:Boolean(e.requireMatchingShippingAndBilling),selectedPaymentMethodType:a?.method.type,isShippingRequired:p,isOrderSession:Fn(t),isB2B:Boolean(o),isPickupPointDeliveryMethod:d})&&"shipping"!==r.value&&(r.value="shipping")},[i.value,s,l,n.isShippingRequired,e.requireMatchingShippingAndBilling,t,o,r])}function tB(){const{source:e,checkout:n}=ie(),{buyerIdentity:r,deliveryNext:a}=n.negotiator.current.fields,i=__(),o=$y(),s=function(){const{checkout:e}=ie();return t(()=>fo(e.proposal))}(),{deliveryLines:l,shippingAddress:c}=n.negotiator.parts;return t(()=>{const t=r.value?.purchasingCompany;return(o.value||b_({checkout:n,source:e})?.pickupAddress)&&!i.value||Tr(a.value)||l.value.flatMap(e=>e.value.deliveryMethodTypes).includes("PICKUP_POINT")||!Fn(e)&&!n.isShippingRequired.value&&!t||Fn(e)&&!s.value||t&&!n.addressManager.billing.value.suggestedAddress.value.type||c.value.oneTimeUse?"form":"selector"})}function nB(){const{checkout:e,source:n}=ie(),{billingAddressOption:r,billingAddress:a}=e.negotiator.parts;return t(()=>{const t=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=t?.lines?.find(e=>
2e.method.type===pe.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?Fn(n)?s:i:a.value})}function rB(){const{checkout:{negotiator:e}}=ie(),t=e.current.fields.paymentLines?.value?.lines,{violations:n}=gy(new Set(["PAYMENTS_SHIPPING_MUST_MATCH_BILLING"])),r=n.value,a=Boolean(It(t,"APPLE_PAY"));if(0!==r.size&&!a)return r.values().next().value.localizedMessage}function aB(){const{shop:e,source:n,checkout:r}=ie(),a=$y(),{paymentLines:i}=r.negotiator.parts,{buyerIdentity:o}=r.negotiator.current.fields,s=function(){const{checkout:{negotiator:e}}=ie(),n=e.current.fields.deliveryNext;return t(()=>Tr(n.value))}();return t(()=>{const t=!a.value&&r.isShippingRequired.value,l=i.value[0];return xs({shopRequireMatchingShippingAndBilling:Boolean(e.requireMatchingShippingAndBilling),selectedPaymentMethodType:l?.method.type,isShippingRequired:t,isOrderSession:Fn(n),isB2B:Boolean(o.value?.purchasingCompany),isPickupPointDeliveryMethod:s.value})})}function iB(e){return Df(e,function(e){const{checkout:{negotiator:t}}=ie(),n=Boolean(t.current.fields.buyerIdentity.value?.purchasingCompany),r=Boolean(e?.countryCode&&Nf.includes(e.countryCode)),a=[];return n&&a.push("phone","company"),r||a.push("firstName","lastName"),{hiddenFields:a,countryFormat:"explicit"}}(e))}function oB(e){return iB(e)?.join(", ")}function sB(){const{checkout:e}=ie(),{shippingAddress:n}=e.negotiator.parts;return t(()=>(e.proposal.facts.delivery??[])[0]?.deliveryAddress??n.value)}function lB(){const{negotiate:e}=Ql(),{checkout:{wallets:t,negotiator:r}}=ie(),{billingAddress:o,billingAddressOption:s}=r.parts,l=i(void 0),c=n(()=>{e({silenceViolations:Ve(["billingAddress"])})},[e]),u="custom"===s.value?o.fields.countryCode.value:void 0;return a(()=>{!t.activeSession.value&&"custom"===s.value&&u&&u!==l.current&&(l.current=u,c())},[s.value,u,c,t.activeSession.value]),c}const cB="b2b",uB="not_b2b";function dB(){const{checkout:{negotiator:e}}=ie(),{paymentMethods:t}=e.current.fields;return mB(t)}function pB(){const{checkout:{negotiator:e}}=ie(),{paymentLines:n}=e.parts;return mB(t(()=>n.value.map(e=>e.method)))}function mB(e){const{client:n,checkout:{identity:r,negotiator:a},shop:i,shopPay:o,source:s}=ie(),l=hv(),c=eT(),u=i.hasFlagEnabled(Is),d=Fi(["STORE_CREDIT","CUSTOM"]),{buyerIdentity:p,paymentMethods:m}=a.current.fields;return t(()=>{if(!c.value)return!1;if("shopPay"===r.current.value)return!1;if(d.value)return!1;const t=e.value??[];if(p.value?.purchasingCompany){const e=m.value?.some(e=>"direct"===e.type&&"shopify_payments"===e.name),r=t.some(t=>"direct"===t.type&&(e||i.storeVaultEnabled)),a=t.some(e=>function(e,t){if("bank"!==e.type)return!1;if("supportsVaulting"in e)return e.supportsVaulting;const n=hB(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")&&T_(e)}(s,n)&&(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=>hB(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:t,paypalVaultingEnabled:u,negotiatedPaymentMethods:m,buyerIdentity:p,isShopPayAvailableForSellerOfRecord:l,shopPayDismissed:o.userIdentified.value})})}function hB(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 gB({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&&Ts(p)&&!h,b=Ls({lines:u,paymentMethods:p,purchasingCompany:c,isBillingAddressForced:h})||!g,P="CREDIT_CARD_ON_FILE"===f?.method.type,k=Rs(p).length>0&&P;if(n&&(!b||v||_||k))return"hidden";if(c&&n&&!t)return function(e){if(!e)return!1;const t=Boolean(It([e],"PAYPAL_EXPRESS")),n=Boolean(It([e],"APPLE_PAY")),r=["direct","giftCard","redeemable","walletsPlatform","wallet","noop","deferred","other",...Object.values(pe)];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 fB(){const e=As(),n=Fi(),r=eT(),{source:a,checkout:i,shop:o}=ie(),s=$y(),l=ME(),c=dg(),{buyerIdentity:u,paymentMethods:d}=i.negotiator.current.fields,{paymentLines:p,billingAddressOption:m}=i.negotiator.parts;return t(()=>gB({fullyCoveredByGiftCard:e.value,fullyCoveredByRedeemablesAndGiftCards:n.value,paymentRequired:r.value,identity:i.identity.current.value,isOrderSession:Fn(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(b_({checkout:i,source:a})?.pickupAddress),isForceBillingAddressFormEnabled:!Ml({shop:o,checkout:i,paymentMethods:d.value})}))}function yB({children:e}){const{checkout:n,embed:r,shop:a,shopPay:o,source:s}=ie(),{billingAddress:l,billingAddressOption:c,email:u,paymentLines:p,phone:m,shippingAddress:h}=n.negotiator.parts,{buyerIdentity:g,shippingAddress:f}=n.negotiator.current.fields,y=r?.isFlagshipPartner,v=Ns(),_=v_(),b=Dc(),P=i(!1),k=i(!1),S=fy(_a),w=yy(_a),C=vy(_a),E=dB(),x=eT(),I=As(),A=Fi(),L=$y(),R=dg(),N=aB(),{shippingCountries:M}=a,D=it(),z=f.value,O=Uf(z?.countryCode,M),B=T(O),F=i(),V=Ms(),U=t(()=>Ml({shop:a,checkout:n,paymentMethods:n.negotiator.current.fields.paymentMethods.value})),q=t(()=>{const e=n.identity.current.value,t=B.value,r=_.value;if(!P.current){const e=S.violations.value;P.current=e.size>0&&!Ds(e)}if(k.current||(k.current=w.violations.value.size>0||null!==n.wallets.escalatedWallet.value&&C.violations.value.size>0),"sdkCartHints"===e&&"sdkCartHints"===F.current?.identitySource)return F.current.sections;function i(e){return"CustomerProfile"===e?.__typename}const d=e=>!n.isShippingRequired.value&&Boolean(l.value)&&!l.value?.[e]?.trim();function T(){switch(e){case zs:return!1;case"amazonPay":case"businessCustomer":case"buyWithPrime":return!0;case"shopPay":return o.user.isAuthenticatedUser.value;case"sdkCartHints":return!!y||u.value.length>0||m.value.length>0;case"customerAccount":return!(i(g.value?.customerProfile)&&!g.value.customerProfile.email)&&u.value.length>0;default:return u.value.length>0}}const M={contact:T(),delivery:function(){const a=f.value,s=h.value,l=n.proposal.negotiated.fields.availableDeliveryAddresses.value??[];switch(e){case zs:return l.length>0;case"customerAccount":{const e=g.value;return l.length>0||!(null==e||!i(e?.customerProfile)||(u=e?.customerProfile,0===u.shippingAddresses.length)||function(e){const[n]=e.shippingAddresses;return 1===e.shippingAddresses.length&&null!=n&&t(n.address,"shipping").size>0}(e?.customerProfile)||function(e,t,r){return!(function(e,t,n){return!e&&t&&n.shippingAddresses.length>0}(t,r,e)||!t&&!r||function(e){if(i(e)){const e=n.addressManager.shipping.value;return Boolean(e.selectedAddress.value)}return!1}(e))}(e.customerProfile,a,s))}case"shopPay":return o.user.addresses.value.length>0||l.length>0;case"sdkCartHints":return!!n.configuration.isAddressDelegationEnabled||T()&&null!=(c=a)&&0===t(c,"shipping").size;case"businessCustomer":return!(b.value&&!r);default:return!0}var c,u}(),payment:function(){const t=Boolean(n.negotiator.current.fields.paymentFlexibilityPaymentTermsTemplate.value);switch(e){case zs:return!1;case"shopPay":{const e=o.user.paymentMethods.value;return x.value||n.isShippingRequired.value?!o.enableCardVaulting||e.some(Vs):o.user.addresses.value.length>0}case"sdkCartHints":return n.configuration.isPaymentInstrumentsDelegationEnabled;case"businessCustomer":{const r=g.value?.customerProfile;if(Fn(s)||!Fs(r))return!1;const i=t||D.value;
2return!!Os({identitySource:e,isOrderSession:Fn(s),storeVaultEnabled:a.storeVaultEnabled,customerProfile:r,hasCustomerStoredPaymentMethod:Bs({availablePaymentMethods:n.negotiator.current.fields.paymentMethods.value??[],paymentMethodHistory:n.negotiator.current.fields.paymentMethodHistory?.value??[]})})||(Boolean(Rs(n.negotiator.current.fields.paymentMethods.value).length)||i&&!E.value)}case"customerAccount":{if(Os({identitySource:e,isOrderSession:Fn(s),storeVaultEnabled:a.storeVaultEnabled,customerProfile:void 0,hasCustomerStoredPaymentMethod:Bs({availablePaymentMethods:n.negotiator.current.fields.paymentMethods.value??[],paymentMethodHistory:n.negotiator.current.fields.paymentMethodHistory?.value??[]})}))return!0;const[r]=V.value,i=1===V.value.length&&"deferred"===r?.type;return Boolean(t&&i)}default:return v.value.length>0||p.value.length>0}}(),billing:function(){switch(e){case"shopPay":{const e=o.session.selectedPaymentMethod.value,t=zi({managedByMarketsPro:n.negotiator.current.fields.managedByMarketsPro.value})&&"IDEAL"===e?.paymentMethod,r="CUSTOM_ONSITE"===e?.paymentMethod,a=!o.user.hasCreditCards.value,i=p.value.some(e=>"direct"===e.method.type);if(a&&i)return!1;const s=d("phone"),l=d("firstName");return!x.value||l||s||t||r}case"amazonPay":case"buyWithPrime":return P.current;case"applePay":case"googlePay":return k.current;case"payPal":return!U.value||k.current;case"customerAccount":case"businessCustomer":return!Fn(s)&&function(e){const t=gB(e),n="beforePayment"===t||"afterPayment"===t,r=e.paymentLines[0]?.method.type,a=r===pe.CreditCard||r===pe.PayPal;return n&&!e.billingMustMatchShipping&&!a}({fullyCoveredByGiftCard:I.value,fullyCoveredByRedeemablesAndGiftCards:A.value,paymentRequired:x.value,identity:e,isOrderSession:Fn(s),isPickupSelected:L.value,isShippingRequired:n.isShippingRequired.value,vaultedDelivery:!1,isPointOfSaleLayout:R.value,purchasingCompany:Boolean(g.value?.purchasingCompany),paymentLines:p.value,billingAddressOption:c.value,paymentMethods:n.negotiator.current.fields.paymentMethods.value,orderEditHasPickupAddress:Boolean(b_({checkout:n,source:s})?.pickupAddress),isForceBillingAddressFormEnabled:!U.value,billingMustMatchShipping:N.value});default:return!1}}()},z=F.current,O=z?.identitySource===e&&function(e,t){return e.contact===t.contact&&e.delivery===t.delivery&&e.payment===t.payment&&e.billing===t.billing}(z.sections,M);return O?z.sections:(F.current={identitySource:e,sections:M},F.current.sections)}),j=a.hasFlagEnabled(Us)?n.vaultedSections.signal:q;return d(NE.Provider,{value:j,children:[d(xO,{}),e]})}const vB=x(function(){const{checkout:{configuration:{layout:e}},router:t}=ie();!function(){const{shop:e,client:t,shopPay:n,checkout:{identity:r},source:{checkoutSessionIdentifier:i},url:o}=ie(),s="shopPay"===r.current.value,l=parseInt(le(e.id),10);a(()=>{i&&async function(){const e=new URL(o.privateAccessToken(s,l));e.searchParams.set("id",i),e.searchParams.set("checkout_type","c1");const r=Za({serializations:{get:e=>t.unstable_getSerialization(e)},isShopApp:n.isShopServerOrigin});r?.uniqueToken&&e.searchParams.set("_y",r.uniqueToken),r?.visitToken&&e.searchParams.set("_s",r.visitToken);try{await fetch(e)}catch{}}()},[i,l,s,o,t,n])}();const n=e.isOnePage.value,i=r(()=>[{match:"/processing",render:()=>d(y,{children:[d(sE,{}),d(hE.Preload,{})]})},{match:"/throttle",render:()=>n?d(gE,{}):d(y,{children:[d(gE,{}),d(DC.Preload,{})]})},{match:"/post-purchase",render:()=>d(oE,{}),renderPrefetch:()=>d(oE.Prefetch,{})},{render:({children:e})=>d(y,{children:[d(NC,{}),d(yB,{children:d(n?bO:$O,{children:e})})]}),children:[{match:"/thank-you",render:()=>d(hE,{}),renderPrefetch:()=>d(hE.Prefetch,{})},{match:"/offsite-payment-failed",render:()=>d(FC,{}),renderPrefetch:()=>d(FC.Prefetch,{})},...n?[{match:"/shoppay_login",render:()=>d(uE,{})},{match:"/review",render:()=>d(UC,{}),renderPrefetch:()=>d(UC.Prefetch,{})},{match:"/no-address-location",render:()=>d(OC,{})},{render:({children:e})=>d(y,{children:[d(VC,{children:e}),d(hE.Preload,{})]}),children:[{match:"/stock-problems",render:()=>d(pE,{})}]}]:[{match:"/information",render:()=>d(y,{children:[d(DC,{}),d(MC.Preload,{})]}),renderPrefetch:()=>d(DC.Prefetch,{})},{match:"/shipping",render:()=>d(cE,{}),renderPrefetch:()=>d(cE.Prefetch,{})},{match:"/payment",render:()=>d(y,{children:[d(iE,{}),d(hE.Preload,{})]}),renderPrefetch:()=>d(iE.Prefetch,{})},{match:"/review",render:()=>
2d(y,{children:[d(lE,{}),d(hE.Preload,{})]}),renderPrefetch:()=>d(lE.Prefetch,{})},{match:"/stock-problems",render:()=>d(dE,{})},{match:"/no-address-location",render:()=>d(zC,{})},{render:()=>d(BC,{})}]]}],[n]);return J(t,i)});class _B extends g{componentDidCatch(e){this.props.terminalErrorHandler.notify(e,{inErrorBoundary:!0})}render(){return this.props.children||null}}function bB(e){const t=[];return e.__k?(e.__k.forEach(e=>{e&&"function"==typeof e.type?t.push(...bB(e)):e&&"string"==typeof e.type&&t.push(e)}),t):t}function PB(e,t){const{props:n}=e,r=function(e){return e.type===y?"Fragment":"function"==typeof e.type?e.type.displayName||e.type.name:"string"==typeof e.type?e.type:"#text"}(e);let a="";for(const o in n)if(n.hasOwnProperty(o)&&"children"!==o){let e=n[o];"function"==typeof e&&(e=`function ${e.displayName||e.name}() {}`),e=Object(e)!==e||e.toString?String(e):Object.prototype.toString.call(e),a+=` ${o}=${JSON.stringify(e)}`}const i=n.children;return`<${r}${a}${t||i&&Array.isArray(i)&&i.length?`>${t||".."}</${r}>`:" />"}`}function*kB(e,t){let n=e,r=0;for(;n&&r<50;)yield n,n=t(n),r+=1}const SB=/\(.+\)/;function wB(e,t=10){let n=null;const r=[];for(const a of kB(e.__??null,e=>e.__??null)){const e="function"==typeof a.type&&a.type!==y;if(e&&!n&&(n=a),r.length<t)if(e){const{displayName:e}=a.type;e&&!SB.test(e)&&r.push(e)}else"string"==typeof a.type&&r.push(a.type);else if(n)break}return{closestFunctionParent:n,breadcrumb:r}}
2const CB=/^[a-zA-Z][\w-]{0,63}$/;function EB(e){return CB.test(e)?/\d{4,}/.test(e)||e.split(/[_-]/).some(e=>e.length>=8&&/[a-zA-Z]/.test(e)&&/\d/.test(e))?null:e:null}const xB="https://redacted.invalid";function IB(e){let t;try{t=new URL(e,xB)}catch{return null}return"null"===t.origin?t.protocol.replace(/:$/,""):t.origin===xB?null:t.origin}function AB(e,t=10){const n=e instanceof Element?e:e?.parentElement??null,r=[];for(const a of kB(n,e=>e.parentElement)){const e=a.getAttribute("id"),n=a.getAttribute("data-testid"),i=null==e?null:EB(e),o=null==n?null:EB(n),s=a.getAttribute("role");if((i||o||s)&&r.push(`${a.localName}${i?`#${i}`:""}${o?`[${o}]`:""}${s?`(${s})`:""}`),r.length>=t)break}return r}const TB=new Set(["type","className","id","role","name","data-testid","data-alternate-values","alternateValues","direction","gap","alignItems","justifyContent","inlineSize","padding","borderRadius","borderWidth","display","condition","gridAutoFlow","gridTemplateColumns","gridTemplateRows","size","color","letterCase","translate","variant","loading","wallet","shopPayEmphasis","hideWallets"]);function LB(e){return TB.has(e)||e.startsWith("aria-")}function RB(e){const t={};for(const n in e.props)if(Object.prototype.hasOwnProperty.call(e.props,n)){const r=e.props[n];"href"===n&&"string"==typeof r?t[n]=IB(r)??"[redacted]":LB(n)?t[n]="id"===n&&"string"==typeof r||"data-testid"===n&&"string"==typeof r?EB(r)??"[redacted]":r:t[n]="[redacted]"}return{...e,props:t}}function NB(e){if("function"!=typeof e)return null;const t=e;return t.displayName||t.name||null}function MB(e){const t=[];for(const{name:n}of e)t.includes(n)||t.push(n);return t}const DB=["id","name","type","role","href","action"],zB=["font[_mstmutation]",".bb-custom-select-container",".bb-customSelect",'[id$="burner-mail-btn"]',".v-dialog__container",".v-snack"].join(", "),OB=new Set([23428825089,45711851521,66006450177,76695699457,106403332097,106885808129,135675215873,136552710145,174633091073,174633418753,174633648129,174633844737,258397700097,260513136641,304348790785,316208381953]);function BB(e,{parent:t,observability:n,debugMode:r,deployStage:a,userAgent:i,serverUserAgent:o,apiClientId:s,page:l,mismatchContext:c}){!function(e){if(!e)return;const t=K.diffed,n=[];K.diffed=e=>{const r=e.__k&&e.__k.some(e=>e&&(!e.type||"string"==typeof e.type)),a=bB(e);if(!n.includes(e.type)&&r&&a&&a.filter(e=>e&&!e.type).length>1){const t=[];for(const r of a)r&&!r.type?t.push(`"${r.props}"`):r&&"string"==typeof r.type&&(t.length>1&&(n.push(e.type),console.warn(`Detected adjacent text-nodes ${t.join(", ")}.\nThis doesn't need to be actioned on but could lead to causes of hydration mismatches.\nText-nodes located in\n${PB(e.__,PB(e))}`)),t.length=0)}t?.(e)}}(r),qs.current=!0;const u=function(){const e=new WeakSet;return{register(t,n){const r=n instanceof Element?n:null,a=n?.parentElement??null;let i=!1;for(let o=r??a;o;o=o.parentElement)if(e.has(o)){i=!0;break}if(!i)for(let o=t;o;o=o.__)if(e.has(o)){i=!0;break}r&&e.add(r),a&&e.add(a),e.add(t);for(let o=t.__;o;o=o.__)if("string"==typeof o.type){e.add(o);break}return i}}}(),d=K.__m;K.__m=(e,t)=>{if("string"==typeof e.type){const d=e.type,m=(e=!1)=>t.map(t=>{if(t instanceof Text)return`Text: ${e?"[redacted]":t.data}`;if(t instanceof Element){const n=t.getAttribute("id");let r=n;return null!=n&&e&&(r=EB(n)??"[redacted]"),`<${t.localName}${null==r?"":` id=${r}`} class=${t.getAttribute("class")}>`}return null}).filter(Boolean),{closestFunctionParent:h,breadcrumb:g}=wB(e),f=t.find(Boolean)??e.__e??null,y=AB(f??e.__?.__e??null);if(r){console.group("🚱 Hydration mismatch"),console.log(`Detected a hydration mismatch for an element with type ${d}\n${PB(e)}`),h&&"function"==typeof h.type&&console.log(`The closest function parent is ${PB(h)}`),g.length&&console.log(`Component path: ${g.join(" < ")}`),y.length&&console.log(`DOM ancestry: ${y.join(" < ")}`);const t=m();t.length?console.log(`The different DOM nodes available compared to the hydrated ones were ${t.join(", ")}`):console.log("There were no available DOM nodes, this could be due to a prior mismatch."),console.log("ℹ️ Learn about hydration mismatches: https://videobin.shopify.io/v/gvR4rL"),console.groupEnd()}const v=m(!0),_=h&&"function"==typeof h.type?PB(RB(h)):void 0,b=null!=o&&o!==i,P=function({apiClientId:e,excessDomChildren:t,hasPriorMismatch:n,serverUserAgent:r,userAgent:a}){if(n)return!1;if(null!=e&&OB.has(e))return!1;if(null!=r&&r!==a)return!1;if(js(a))return!1;if(a.match(/musical_ly|BytedanceWebview/))return!1;if(a.split(" ").includes("Playwright-checkout-e2e-tests/local"))return!1;if(a.includes("HeadlessChrome"))return!1;const i=Element.prototype.matches;return"function"!=typeof i||t.every(e=>
2!(e instanceof Element&&i.call(e,zB)))}({apiClientId:s,excessDomChildren:t,hasPriorMismatch:u.register(e,f),serverUserAgent:o,userAgent:i}),k=MB(p),S=l();n.log("hydration_mismatch",`Hydration mismatch for <${d}>`,{...c?.(),domType:d,mismatchedVNode:PB(RB(e)),closestFunctionParent:_,vNodePath:g.length?g.join(" < "):void 0,domPath:y.length?y.join(" < "):void 0,availableNodeTypes:v||void 0,hasDomNodes:v.length>0,isHydrating:qs.current,hasInProgressBoundaries:p.length>0,suspendedAtCapture:k.length?k.join(","):void 0,isActionable:P,isUADivergent:b,page:S}),P&&"tophat"!==a&&n.counter({name:"hydration_mismatch",value:1,attributes:{page:S}})}d&&d(e,t)};const p=[],m=function({observability:e,debugMode:t,inProgressBoundaries:n}){const r=[],a=new WeakMap;let i=!1;const o=K.diffed;return K.diffed=e=>{if("string"==typeof e.type&&qs.current&&e.props&&e.__e instanceof Element){const t=e.props;for(const i of DB){const o=t[i];if("string"!=typeof o)continue;if(e.__e.getAttribute(i)===o)continue;let s=a.get(e.__e);if(s?.has(i))continue;s||(s=new Set,a.set(e.__e,s)),s.add(i);const l=MB(n),{closestFunctionParent:c,breadcrumb:u}=wB(e),d=c?NB(c.type):null,p=AB(e.__e);r.push({attr:i,tag:e.type,reactValue:o,domElement:e.__e,suspendedAtCapture:l,closestFunctionParent:d,vNodePath:u,domPath:p})}}o?.(e)},{flushAndTeardown:()=>{if(K.diffed=o,!i){i=!0;for(const{attr:n,tag:a,reactValue:i,domElement:o,suspendedAtCapture:s,closestFunctionParent:l,vNodePath:c,domPath:u}of r){if(!o.isConnected)continue;const r=o.getAttribute(n);if(r===i)continue;const d=s.length>0;t&&console.warn(`🏷️ Attr mismatch on <${a} ${n}>: Preact="${i}" vs DOM="${r}" [suspended=${s.join(",")||"none"}, parent=${l??"unknown"}, domPath=${u.join(" < ")||"unknown"}]`),e.log("attr_mismatch",`Preact ${n} !== DOM ${n} at hydration`,{attr:n,tag:a,reactValue:TB.has(n)?i:"[redacted]",domValue:TB.has(n)?r:"[redacted]",suspendedAtCapture:d?s.join(","):void 0,closestFunctionParent:l??void 0,vNodePath:c.length?c.join(" < "):void 0,domPath:u.length?u.join(" < "):void 0}),e.counter({name:"attr_mismatch",value:1,attributes:{attr:n,tag:a,hadSuspendingBoundaries:d,closestFunctionParent:l??"unknown"}})}r.length=0}}}}({observability:n,debugMode:r,inProgressBoundaries:p}),{teardown:h}=((e,t,n,r)=>{const a=e=>`${NB(e.type)??""}${e.__b}`;let i=0,o=!1;const s=K.__e;K.__e=(e,n,r)=>{if("function"==typeof n.type&&e&&"function"==typeof e.then&&Boolean(32&n.__u)){const r={name:NB(n.type)??"anonymous",key:a(n)};t.push(r,r),i+=1;let s=!1;o=e,l=()=>{s||(s=!0,i-=1)},Promise.resolve(o).then(l).catch(l)}var o,l;s(e,n,r)};const l=K.diffed;K.diffed=n=>{if("function"==typeof n.type){const r=a(n),i=t.findIndex(e=>e.key===r);if(-1!==i){if(e){const e=bB(n);n.__k&&0===e.length?console.warn(`Suspended VNode ${PB(n)} returned no DOM-children, this causes hydration mismatches.`):n.__k&&e.length>1&&console.warn(`Suspended VNode ${PB(n)} returned > 1 DOM-child, this causes hydration mismatches.`)}t.splice(i,1)}}l?.(n)};const c=K.__c;K.__c=(e,n)=>{!o&&i<=0&&0===t.length&&u(),c?.(e,n)};const u=()=>{o||(o=!0,K.diffed=l,K.__e=s,K.__c=c,qs.current=!1,r?.())};return{teardown:u}})(r,p,0,m.flushAndTeardown);Q(e,t),0===p.length&&h()}const FB="shop-pay-login-iframe",VB="100%",UB="publickey-credentials-get *",qB=9e4;async function jB(e){if(!document.body?.classList.contains("Loading"))return void fl(document);const t=document.querySelector(".LoadingShell"),n=function(e){if(e?.classList.contains("LoadingShell-variantPartnerInterstitial"))return Reflect.get(window,Symbol.for("Shopify.checkout.partnerInterstitialMinimumVisibleDuration"))}(t);if((n||e)&&(n&&await n,e&&(await e.fill(),yl(),t?.remove()),!document.body?.classList.contains("Loading")))return void fl(document);const r=t?.isConnected?new Promise(e=>{const n=()=>{clearTimeout(r),t.removeEventListener("transitionend",n),t.remove(),e()},r=setTimeout(n,1e3);t.addEventListener("transitionend",n)}):Promise.resolve();document.body.classList.remove("Loading"),performance.mark("checkout:visible",{detail:{devtools:{dataType:"marker",color:"primary-dark",tooltipText:"The critical elements of checkout are visible to the buyer"}}}),await r,fl(document)}
2function HB(e){Z(e),e.childNodes.forEach(e=>{e.remove()})}class $B extends sl{constructor(){super(...arguments),this.name="UnsafeURLError",this.unactionable=!0}}class YB extends sl{constructor(){super(...arguments),this.name="InsecurePageError",this.unactionable=!0}}const WB=new Set(["https://europesnus.nl","https://europesnus.de","https://europesnus.fr","https://europesnus.se","https://suomi-nikotiinipussit.fi","https://www.suomi-nikotiinipussit.fi","https://www.lankeleisi.se","https://fr.stance.eu.com","https://holysmile.de"]),GB=/^[^.]+\.checkout\.my\.shop\.dev$/i;function JB({isOnePage:e,isShopPay:t,path:n,uiExtensibility:r}){const a=function({isOnePage:e,isShopPay:t,path:n}){switch(n){case"/processing":return[sE];case"/throttle":return[gE];case"/thank-you":return[hE];case"/shoppay_login":return[uE]}if(t||e)return[VC];switch(n){case"/shipping":return[cE,MC];case"/payment":return[iE,MC];case"/review":return[lE,MC];case"/stock-problems":return[dE];default:return[DC]}}({isOnePage:e,isShopPay:t,path:n});return _s({isOnePage:e,isShopPay:t,path:n})&&a.push(vO),r.required.value&&a.push(Cv,{load:r.ensureEngineLoaded}),a}function KB(e){const t=e.querySelector('footer[data-inspector-id="footer"]');return t?t.parentElement?.querySelector(":scope > main")?"inline":"end":"none"}function QB(e){const t=e.querySelector("nav ol");if(!t)return;const n=Array.from(t.children);return{count:n.length,activeIndex:n.findIndex(e=>"step"===e.getAttribute("aria-current"))}}const XB=Object.freeze(Object.defineProperty({__proto__:null,captureServerBreadcrumb:QB,captureServerFooterPosition:KB,criticalAsyncComponents:JB,hydrateApp:async function(t,{bootStartTime:n,bootPhaseTimings:r}){const{client:a,terminalErrorHandler:i}=t,s="shopPay"===t.checkout.identity.current.value,l=t.checkout.thankYouEntrance.progress;l?_l(l,{currentUrl:t.router.currentUrl,latestReceipt:t.checkout.latestReceipt}):bl()&&yl();const c=function({client:e,isShopPayActive:t,isShopPaySdkCheckout:n,observability:r}){if(!t)return;const a={stage:"armed"};return setTimeout(()=>{if(gl(document))return;const t=e.unstable_legacyNavigationPerformance,i={shopPaySdkCheckout:n,stage:a.stage,pen
2dingLoaderCount:t.loaderCount},o=performance.now();r.counter({name:"shop_pay_skeleton_stuck",value:1,exportImmediately:!0,attributes:{delayMs:qB,...i}}),r.log("shop_pay_skeleton_stuck","Shop Pay checkout still showing the loading skeleton",{delayMs:qB,...i,loaderPreviouslyRegistered:t.loaderPreviouslyRegistered,appHasContent:Boolean(e.rootElement?.childElementCount),loginFramePresent:Boolean(document.getElementById(FB)),documentReadyState:document.readyState,documentVisibilityState:document.visibilityState,reportedAtMs:Math.round(o)},{exportImmediately:!0}),ul().then(()=>{const e=Math.round(performance.now()-o);r.counter({name:"shop_pay_skeleton_recovered_after_stuck",value:1,exportImmediately:!0,attributes:i}),r.histogram({name:"shop_pay_skeleton_recovery_duration",value:e,attributes:i}),r.log("shop_pay_skeleton_recovered_after_stuck","Shop Pay checkout recovered after its skeleton was reported stuck",{...i,recoveryDurationMs:e},{exportImmediately:!0})}).catch(()=>{})},qB),a}({client:a,isShopPayActive:s,isShopPaySdkCheckout:$s(t.shopPay),observability:t.observability});await async function(t,{bootStartTime:n,bootPhaseTimings:r}){const{events:a,client:i,router:o}=t;o.prefix instanceof RegExp&&function({pathnamePrefix:e,allowedOrigins:t,client:n,isShopPayActive:r}){const{protocol:a,href:i,host:o,pathname:s,origin:l}=n.initialRequest.url;if("https:"!==a)throw new YB(`Running on an insecure protocol: ${i}`);if(!GB.test(o)&&!r){if(!function(e,t,n){return n.some(n=>{if(t===n)return!0;const r=n.replace(/^https:\/\//,"");return!!t.endsWith(`.${r}`)||t===`https://www.${r}`||!!r.includes("/")&&e.startsWith(n)})||WB.has(t)}(i,l,t))throw new $B(`Running on an unexpected origin: ${i}. Allowed origins: ${t.join(", ")}`);if(!e.test(s))throw new $B(`Running on an unexpected pathname: ${i}. Expected pathname to match: /${e.source}/`)}}({pathnamePrefix:o.prefix,allowedOrigins:i.unstable_getSerialization("shop").origins,client:i,isShopPayActive:"shopPay"===t.checkout.identity.current.value}),Object.defineProperty(window,Symbol.for("Shopify.checkout"),{value:{context:t},writable:!0,configurable:!0,enumerable:!1}),await async function(t,{loadFrom:n,onQuerySettled:r}){const a=Ks(t);if(!a?.requireBusinessCriticalOnly)return;const i=e(ee,a),o=t.checkout.configuration.getProfile({...a,requireBusinessCriticalOnly:!1});try{let e="serialized-cache"===n?await Hl(t.graphql.coreGraphql,a):void 0;if("serialized-cache"===n&&!e)return $l(t.checkout.configuration.profileKey.peek(),{...a,requireBusinessCriticalOnly:!1}),void s("missing_cached_profile");const r=await Qs(()=>{},{trigger:"initialization",profileRequest:a,graphql:t.graphql.coreGraphql,configuration:t.checkout.configuration,extensibility:t.checkout.extensibility,observability:t.observability,userEvents:t.userEvents,telemetryContext:{source:t.source,shop:t.shop,sessionToken:t.client.unstable_getSerialization("sessionToken")??"",current:t.checkout.proposal.negotiated}});r?.(),e??=await Hl(t.graphql.coreGraphql,a),$l(t.checkout.configuration.profileKey.peek(),{...a,requireBusinessCriticalOnly:Boolean(e)}),e||s("query_failure")}catch(l){if(t.graphql.coreGraphql.cache.delete(i),jl(t.observability,l),o){s("preparation_failure");try{t.checkout.extensibility.ui.replace({activatedExtensions:o.activatedExtensions},{keepAlive:!1,reason:"checkout_profile_change"})}catch(c){jl(t.observability,c)}try{t.checkout.configuration.update({profile:o,requireBusinessCriticalOnly:!1})}catch(c){jl(t.observability,c)}}}finally{r?.(i)}function s(e){"simulated"!==t.source.type&&t.observability.counter({name:"checkout_profile_unrestricted_fallback",value:1,attributes:{trigger:"initialization",reason:e}})}}(t,{loadFrom:i.initialRequest.isServerRendered?"serialized-cache":"network"});const s=new Ys(t,{bootStartTime:n,bootPhaseTimings:r});s.waitUntil(async function(e){const{checkout:t,router:n}=e,r=JB({isOnePage:t.configuration.layout.isOnePage.value,isShopPay:"shopPay"===t.identity.current.value,path:n.currentUrl.value.normalizedPath,uiExtensibility:t.extensibility.ui}),a=Nv(e);a&&r.push(a),await Promise.all(r.map(e=>e.load()))}(t)),a.dispatchEvent(s),await s.allResolved(),a.dispatchEvent(new Ws(s))}(t,{bootStartTime:n,bootPhaseTimings:r}),Kh.preload(),c&&(c.stage="context_ready");const u=performance.now(),p=d(_B,{terminalErrorHandler:i,children:d(NS,{context:t,children:d(vB,{})})});a.initialRequest.isServerRendered&&t.router.shouldHydrateServerRenderedRoute()?function(e,t,n){const r="shopPay"===n.checkout.identity.current.value,a=QB(t),i=KB(t);BB(e,{parent:t,observability:n.observability,debugMode:n.environment.debug.preact,deployStage:n.environment.deployStage,userAgent:n.client.userAgent,serverUserAgent:n.client.unstable_getSerialization("serverUserAgent"),apiClientId:n.client.unstable_getSerialization("apiClientId"),page:()=>Ya(window.location.href,{isShopPayActive:r,shopPay:n.shopPay}),mismatchContext:()=>{const e=o(()=>{const e=n.checkout.configuration.branding.shell.configuration;return{shellHeaderShowHeader:n.checkout.configuration.visibility.showHeader,shellHeaderLogoVisibility:e.header.logo?.visibility,shellHeaderCartLinkVisibility:e.cartLink.visibility,shellHeaderIsShopOnWeb:dr(n.router.currentUrl.value.search),shellHeaderPrefersDarkMode:n.client.prefersDarkMode.value}}),t=o(()=>({cartLinkShopHasStorefront:n.shop.hasStorefront,cartLinkSourceType:n.source.type,cartLinkHasCartReturnUrl:Boolean(n.source.cartReturnUrl)})),r=FO.current,s=r&&{breadcrumbIds:r.ids,breadcrumbActiveId:r.activeId,breadcrumbShowCartLink:r.showCartLink,breadcrumbHasCartUrl:r.hasCartUrl},l=o(()=>{const{footer:e}=n.checkout.configuration.branding.shell.configuration;return{serverFooterPosition:i,shellFooterPosition:e.position,shellFooterContentVisibility:e.content?.visibility,shellFooterConfigShowFooter:n.checkout.configuration.showFooter,shellFooterMobileCheckoutSdkEnabled:n.mobileCheckoutSdk.enabled,shellFooterMobileCheckoutSdkVariant:n.mobileCheckoutSdk.variant.value,shellFooterIsEmbed:null!=n.embed,shellFooterIsCheckoutKit:n.embed?.isCheckoutKit()}});return{serverCrumbCount:a?.count,serverActiveCrumbIndex:a?.activeIndex,...e,...l,...t,...s}}})}(p,a.rootElement,t):function(e,t){HB(t),X(e,t)}(p,a.rootElement),c&&(c.stage="rendered"),function({client:e,isShopPayActive:t,progress:n,watch:r}){const a=t||Boolean(n),i=new AbortController;if(!a)return void jB();r&&(r.stage="skeleton_wait");const o=()=>{let t;r&&(r.stage="subscribed"),t=e.unstable_legacyNavigationPerformance.on("initialLoadingFinish",()=>{r&&(r.stage="loading_finished"),jB(n),t?.()})},s=e.unstable_legacyNavigationPerformance.on("event",e=>
2{e.type===Hs&&(i.abort(),o())}),l=e.unstable_legacyNavigationPerformance.on("navigation",()=>{i.abort(),o()});i.signal.addEventListener("abort",()=>{s(),l()})}({client:t.client,isShopPayActive:s,progress:l,watch:c}),async function(e,{hydrateStartTime:t}){const{events:n}=e,r=new Gs(e,{hydrateStartTime:t});n.dispatchEvent(r),await r.allResolved(),n.dispatchEvent(new Js(r))}(t,{hydrateStartTime:u})},renderTerminalError:function({rootElement:e,terminalErrorPageElement:t}){return n=>async function(e,t){HB(e),vl(t)||await jB()}(e,t)}},Symbol.toStringTag,{value:"Module"}));export{mh as $,Ou as A,cf as B,dA as C,MI as D,Df as E,wA as F,rw as G,Kk as H,Qv as I,Vm as J,qI as K,mf as L,ux as M,ny as N,jv as O,xv as P,Uv as Q,pB as R,gf as S,YI as T,zA as U,Uz as V,hv as W,zc as X,hO as Y,Vy as Z,Uy as _,Aw as a,sB as a$,TM as a0,Xm as a1,Ry as a2,dR as a3,ax as a4,lS as a5,cS as a6,mS as a7,pS as a8,WM as a9,sL as aA,HS as aB,_L as aC,ZT as aD,eL as aE,nL as aF,XT as aG,uR as aH,cL as aI,em as aJ,Hv as aK,Eu as aL,qm as aM,gh as aN,MT as aO,dO as aP,OT as aQ,Zb as aR,cv as aS,nM as aT,xb as aU,Dd as aV,Hu as aW,uI as aX,Sd as aY,cR as aZ,tB as a_,FP as aa,Ym as ab,lm as ac,yd as ad,Ip as ae,Nw as af,Tw as ag,SM as ah,xM as ai,OS as aj,uS as ak,ec as al,Fm as am,Oy as an,du as ao,IL as ap,Nh as aq,sR as ar,Mz as as,Lz as at,Nz as au,wz as av,IR as aw,rO as ax,oL as ay,tw as az,Qg as b,bh as b$,lB as b0,ZO as b1,Su as b2,DS as b3,ku as b4,Dp as b5,Ep as b6,zm as b7,Nd as b8,Hc as b9,j_ as bA,Ix as bB,dh as bC,pg as bD,by as bE,ED as bF,qg as bG,OI as bH,pM as bI,tA as bJ,eA as bK,tD as bL,vk as bM,iO as bN,sO as bO,YM as bP,VN as bQ,JS as bR,iR as bS,FI as bT,Dc as bU,Ay as bV,Uf as bW,dg as bX,oy as bY,Gz as bZ,fh as b_,jc as ba,$c as bb,Gg as bc,Yg as bd,Wg as be,Hg as bf,Bp as bg,qp as bh,sw as bi,Vu as bj,Pd as bk,fd as bl,Gc as bm,zp as bn,AI as bo,vu as bp,kg as bq,Bh as br,vw as bs,tb as bt,n_ as bu,t_ as bv,cw as bw,uw as bx,Xl as by,Pb as bz,ef as c,JA as c$,Kz as c0,vg as c1,zw as c2,iE as c3,gM as c4,RE as c5,g
2y as c6,OM as c7,rB as c8,ky as c9,Ky as cA,Ih as cB,Ah as cC,Lf as cD,Eh as cE,Fx as cF,Th as cG,oR as cH,dz as cI,Mf as cJ,AA as cK,bD as cL,vD as cM,fA as cN,VA as cO,Mg as cP,Up as cQ,HE as cR,wL as cS,K_ as cT,Q_ as cU,X_ as cV,Z_ as cW,_b as cX,tT as cY,rb as cZ,nT as c_,Sy as ca,wy as cb,sD as cc,RD as cd,fy as ce,qO as cf,eT as cg,oc as ch,sc as ci,Fg as cj,Ug as ck,Ph as cl,sg as cm,iA as cn,sA as co,uA as cp,Ly as cq,zd as cr,sh as cs,pL as ct,BT as cu,zT as cv,Cy as cw,yS as cx,fS as cy,iT as cz,HL as d,ex as d$,ZA as d0,QA as d1,Oh as d2,lk as d3,xD as d4,Ng as d5,Ib as d6,pO as d7,vL as d8,iy as d9,Id as dA,Mp as dB,pd as dC,ud as dD,xp as dE,Rp as dF,Tp as dG,Bm as dH,vd as dI,lc as dJ,Ok as dK,WI as dL,fv as dM,zh as dN,Vz as dO,fB as dP,$y as dQ,ME as dR,b_ as dS,eB as dT,rx as dU,ix as dV,Vp as dW,nx as dX,sx as dY,zI as dZ,QE as d_,sy as da,gd as db,Wu as dc,Yu as dd,nI as de,CD as df,rD as dg,iv as dh,YD as di,qD as dj,$D as dk,Pz as dl,jb as dm,Tx as dn,Lx as dp,hh as dq,pz as dr,aB as ds,lz as dt,LM as du,um as dv,id as dw,Ld as dx,om as dy,rm as dz,Jw as e,v_ as e$,ZE as e0,$E as e1,GE as e2,YE as e3,JE as e4,tx as e5,ox as e6,WE as e7,XE as e8,yA as e9,aI as eA,aM as eB,sM as eC,lM as eD,Jx as eE,SN as eF,oM as eG,nN as eH,hM as eI,QM as eJ,ET as eK,bM as eL,eN as eM,O_ as eN,sk as eO,rc as eP,ac as eQ,_g as eR,$f as eS,zO as eT,Kx as eU,ug as eV,Gk as eW,Dh as eX,Ff as eY,__ as eZ,KD as e_,Mw as ea,Vw as eb,eg as ec,Pw as ed,_w as ee,DP as ef,FL as eg,Rk as eh,Wk as ei,dB as ej,Gf as ek,GA as el,gk as em,WA as en,S_ as eo,Ny as ep,FN as eq,PD as er,Nf as es,Ax as et,nB as eu,iB as ev,Mx as ew,k_ as ex,Bw as ey,yw as ez,IE as f,Gl as f$,Cx as f0,wx as f1,_h as f2,cE as f3,wk as f4,Sb as f5,Yx as f6,Yh as f7,Bf as f8,lw as f9,rv as fA,wD as fB,xc as fC,Rx as fD,ov as fE,nv as fF,lv as fG,Hy as fH,Wy as fI,pP as fJ,$P as fK,Y_ as fL,kf as fM,wf as fN,yk as fO,ch as fP,lN as fQ,lO as fR,Mh as fS,Ek as fT,gv as fU,MP as fV,BM as fW,r_ as fX,pw as fY,bw as fZ,mw as f_,lg as fa,NA as fb,RA as fc,mk as fd,ok as fe,DE as ff,Ub as fg,mg as fh,eE as fi,FM as fj,dk as fk,VB as fl,FB as fm,UB as fn,bb as fo,ev as fp,Sf as fq,ID as fr,SD as fs,av as ft,AD as fu,UO as fv,SO as fw,wO as fx,Iy as fy,HD as fz,Vx as g,IT as g$,Fv as g0,Zl as g1,dw as g2,Jv as g3,Kv as g4,Sk as g5,WL as g6,x_ as g7,Xb as g8,Sh as g9,iS as gA,ph as gB,Yy as gC,gL as gD,BD as gE,sv as gF,FD as gG,rI as gH,dM as gI,mM as gJ,uT as gK,Qx as gL,eI as gM,XC as gN,qC as gO,HC as gP,jC as gQ,GC as gR,JC as gS,QC as gT,aE as gU,mD as gV,lh as gW,Ab as gX,xT as gY,ON as gZ,mL as g_,Gy as ga,jy as gb,kh as gc,Wm as gd,Ow as ge,$z as gf,jA as gg,hS as gh,jz as gi,pA as gj,eM as gk,qy as gl,tS as gm,bv as gn,NE as go,ow as gp,LR as gq,rk as gr,GM as gs,Nb as gt,Vf as gu,og as gv,BI as gw,Hf as gx,nm as gy,Cw as gz,KA as h,vy as h$,Xx as h0,nb as h1,pb as h2,db as h3,wb as h4,dS as h5,_v as h6,Of as h7,Rh as h8,FT as h9,BR as hA,FR as hB,VR as hC,sN as hD,AN as hE,IN as hF,vN as hG,MN as hH,qR as hI,UT as hJ,gI as hK,bf as hL,yf as hM,lI as hN,qz as hO,nO as hP,nD as hQ,KP as hR,ty as hS,YP as hT,AE as hU,LE as hV,TE as hW,hk as hX,VD as hY,JP as hZ,jD as h_,pR as ha,rR as hb,Pg as hc,Nx as hd,gu as he,_x as hf,Hb as hg,bk as hh,Pk as hi,oB as hj,sz as hk,ag as hl,UI as hm,VI as hn,KI as ho,ig as hp,jf as hq,ry as hr,cB as hs,uB as ht,T_ as hu,mb as hv,Zx as hw,uM as hx,uy as hy,Fh as hz,PT as i,rS as i0,py as i1,P_ as i2,Lh as i3,lR as i4,Wz as i5,yy as i6,zE as i7,TT as i8,cb as i9,ju as iA,rA as iB,gp as iC,OL as iD,yE as iE,fE as iF,vE as iG,PE as iH,CE as iI,wE as iJ,SE as iK,kE as iL,bE as iM,_E as iN,FE as iO,XB as iP,Ch as ia,jO as ib,Gm as ic,Yf as id,Qy as ie,gS as ig,jg as ih,w
2M as ii,bd as ij,aD as ik,uu as il,Uu as im,Pu as io,Lu as ip,Td as iq,Cd as ir,Ad as is,VL as it,$u as iu,gT as iv,sI as iw,Mu as ix,yz as iy,bp as iz,af as j,Kl as k,By as l,tg as m,TA as n,fw as o,Yl as p,Tz as q,Bc as r,Oc as s,xh as t,JT as u,Ql as v,nc as w,aT as x,Vh as y,ak as z};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.