1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["b887ec56.Clqyq4cC.js","2c1ab0fe.GMbxnz74.js","4c290a1e.C6TDJ9Fn.js","app.CepNJbvh.js","assets/app.BuSMBobh.css","assets/previous.Cyrg41An.css","91319467.CaV5Q69j.js","9f047e05.CCJUgz_L.js","0a7dffce.DfUtZWCu.js","5fda1420.KYpufQ--.js","60a453ce.CkhHeRBc.js","21cc90a2.DAzJmttM.js","bb728e1c.iawBHR84.js","a6e11e56.QtfnEVw1.js","assets/AdminPreviewBar.A5eloOEy.css","33682ee7.C-Y_Biui.js","55098bf1.CKQdNNxq.js","c610ba76.DOr3dG4L.js","66338e00.Df-ivAxs.js","28ac86c0.Deh4Zwxw.js","3e6029dd.miub7kSV.js","assets/QRCode.XhNv4hkB.css","30074413.De6sKHuf.js","assets/Pressable.D9SfDfsb.css","efa0389a.Cyj781OI.js","assets/Choice.CIaVEvsx.css","9f57d2aa.BJCp05MT.js","8574876b.DlqSeZRL.js","064f6ac1.B1U3VPaO.js","assets/Popover.Bi1nHaU-.css","assets/DateField.BkE3n11i.css","598fef4e.Bhe6r8fJ.js","assets/PaymentIcon.DUuFvlux.css","33d2e4fc.BbuKnZ8U.js","assets/NumberField.C0qMELBD.css","39921a74.CJtpdeBf.js","assets/Switch.CxvbvO76.css","27f09e31.DMLD1D1f.js","137622f3.CzAjC5bM.js","54bf0ebb.BA0O2evN.js","assets/Sheet.CVSBHI9d.css","1ed8f5e3.DkmKdCgD.js","assets/floating-layer.DfWUBaTh.css","2fdb3dd3.YdlRJDkL.js","53bbdad9.CGJC_1cv.js","47b970b2.hK1atmf1.js","29034f35.BtTRppF-.js","ac5a19ff.CRrh5Bdw.js","0727407f.CsUvC--9.js","assets/PhoneField.-WW1pYgW.css","assets/AnnouncementRuntimeExtensions.54OByf3e.css","413b21e2.Bib5DUlj.js","9c384ce8.CFjjgE6K.js","2210eadb.DF0gIp_2.js","0fb2c600.DURonCiC.js","7ee73f43.BDuSjxVB.js","2a0f03e4.C7RPc5cd.js","05a2a9c8.BOU7FMWw.js","dd9b68fc.DuKfnJQQ.js","adeb5fdb.DrALAaZG.js","8498e76b.QkOh7Vlw.js","2255f8fa.BCU-NIF_.js","d08a6c7d.B8v-AHSc.js","ed9f2238.D-8_6d2f.js","13b13169.Db0IGzkq.js","7fc410e0.B54X0yKF.js","33464469.6IaCgV4U.js","b8733b27.B0VmlfYu.js","ec391382.3QXLMag7.js","865e4eaf.DBasL1xH.js","6f1b819b.CFRiXcHU.js","6a2fc6d6.Cw2cQrl7.js","cf29e63b.ByW6Fn7D.js","cb38e5c2.DHRUgYmP.js","e477f96c.BxtSUGa4.js","e39bc11c.BPwkTsU-.js","08a3b809.BxtDOfoo.js","bff2ff9b.Wb1R3ZbF.js","bad03769.CJ3kHUtl.js","assets/DevTools._zFCztlm.css","abd080c1.Bld-jP37.js","2acfb1ce.Ijr4U99n.js","9d12dea3.CFb6oyR5.js","b9c0319a.D71hsLxR.js","74835653.CRP9zX7D.js","31cc568e.eY_zQ4dB.js","assets/index.CiYh36Pk.css","assets/BillingAddressForm.2HXntA0X.css","910cd6e2.Bo65wEs8.js","f1968089.C3ZYp3_Z.js","347b440c.C7wvTwkm.js","d5d34b3b.81uMJHYl.js","assets/EstimatedDeliveryContent.D-6PyHqX.css","181d38d3.Ty4Mx6im.js","assets/Middot.kivijyjU.css","60575ca1.CFFQXMam.js","assets/DeliveryReviewMethods.BKEojKjz.css","79974aab.hHH-4idQ.js","6720fa5f.Dt8m7rOm.js","assets/Rollup.DH9hPBhl.css","a25deb9a.DBfpGDzj.js","e77f7fe0.xbyxUO7Z.js","assets/PaymentLine.B_vs66ws.css","17324a0b.530ZMA5x.js","a535174a.DY3UqTS3.js","5fd968f2.B6YCmvlZ.js","01973ac7.BeRwXye5.js","58314944.1jO_vh_4.js","assets/Captcha.CJQgLR0i.css","dffdfb34.CC5iYpqj.js","0c0ad074.A9YqaSW6.js","945a08d6.BXUdjYDL.js","assets/useShopPayButtonClassName.Lp0gX49z.css","0e67bd3b.rrDC0LWO.js","cb5cf153.bw-I465_.js","e3e348f2.tCxUo2up.js","ca5e9c49.BT49yYQL.js","ccdf3592.CGA4lGQ3.js","a422df8c.BXxALpKm.js","assets/EmptyState.CZwDb_Yh.css","7b0c98ea.CqdLBMXo.js","assets/TransitionHeight.CuRoM9zv.css","d22d2b80.DxyGtOjJ.js","f49d4216.BS85dmZ4.js","assets/VatNumberValidationField.DQ_xYwKQ.css","f692f62f.DHgy7Fzw.js","assets/RedirectionNotice.B8v_QGNW.css","4421b714.BYrT6l1A.js","611e718a.BXIcslXp.js","assets/OffsitePaymentFailed.BxwwfmsJ.css","assets/lazyNoAddressLocation.D14orovx.css","f8706cb6.DdvEXEb-.js","0e9ee714.BA_VwDAk.js","assets/StickyPayButton.pnFPnjHJ.css","f3fe2775.BSk1ex1h.js","cc6ff67d.CUDxlVK0.js","87bfafec.B2XXZnjV.js","assets/hasViolationsIgnoringCodes.CQ_TUsw-.css","dfca5da5.BFrL439g.js","assets/Section.CU18S7Ap.css","7a8217fd.CuaDs8we.js","assets/useShopPayProgressIntercepts.DIc3vsmn.css","2b89a178.BDUoZw0Z.js","b684bff6.BpL4wH2U.js","d6447d9e.BzCGA_q1.js","f51e663e.OfMKRQgE.js","64de7b49.BK-M1NIF.js","8e79be58.wwMOsjg7.js","assets/ShippingMethodSelector.D038PkOR.css","90e26f5f.Cw5CUJLD.js","assets/SubscriptionPriceBreakdown.vTcdVGq4.css","assets/ShippingLines.DCj76NbH.css","f3e117aa.VqIXr3nP.js","assets/OnePage.B8fMdKm8.css","9e3968a8.BkxhPgDc.js","fc21c11a.DWv4DzIO.js","4ea44c06.DbVsWVFA.js","assets/PaymentButtons.DCbwzC5k.css","assets/PayButtonSection.ClYw8kJs.css","d2e6a587.DCUh30CB.js","assets/MobileOrderSummary.DZEwkLmi.css","74122478.DYo3h4hN.js","73a9b0a0.CCXikibA.js","86720dbb.mJ-rOycE.js","7114e006.Dn0MarCB.js","assets/MissingFields.BbxB_6wt.css","assets/PaymentMethodProgressionHost.DAMvZY87.css","e0989459.C_VA_d49.js","assets/RememberMeSection.Bn_OeoXz.css","dfc03c53.DlMWgvou.js","50130ded.D6F2mjeI.js","assets/KnownBuyerPaymentMethodSelector.Bd3JbrzP.css","896e8dde.CekI2eW1.js","7743efb2.DYndzlOV.js","24fcbaf6.D_Bnb16m.js","assets/PostPurchase.aTy1CbYq.css","090b00f0.Bv4Scbrt.js","assets/Processing.Ch-n6nER.css","b120ac11.BgvUa8ae.js","289b89e4.DGXbMz6B.js","9011490c.DbWlkmGr.js","8c0eaf27.2fgFaqTf.js","assets/ShopPayLoginLoader.CunaH0SG.css","0cd5b134.W7CkO7xe.js","5c5c2e96.CVCPr6-x.js","f5a7bb50.W2ESKrfp.js","a9ba8e86.DGdpkm6F.js","909cc5d6.BWrUC81U.js","c57e39e6.BkBRz_xN.js","be176b00.DFWVMQsh.js","3a819064.Dx-RF2LD.js","assets/Map.C9t3_4_W.css","9f3d9f8c.Dpq-Tdnd.js","8d3a12c3.BHkZ7Hh5.js","0e4087ec.BozHSIap.js","4aab4b34.DxKnKnlM.js","assets/ThankYou.Bln4cIyL.css","01f1d1bd.DypWlcT3.js","assets/Throttle.C87GyOG8.css","49758c58.DurVmlXX.js","assets/RuntimeExtension.DWkDBM73.css","7fd9930c.Bul6Y4p8.js","assets/PaymentChallengeModal.5hHrDP3d.css","39bf6084.Yx6sACLY.js","assets/CryptoModalManager.CqiWenQK.css","7d468a18.B6GjLA7W.js","7a21cd4e.DndnGEih.js","assets/VaultedContactAvatar.BPBriSxT.css","461aedcc.Bsfg9GWc.js","assets/ShopPayCheckout.D0eB6thV.css","56bd1136.BGuQJKXV.js","8536083a.BLo7Yz4V.js","assets/WalletSandbox.DOuxlppk.css","assets/amazonWalletLazy.hSB1Y1Ss.css"])))=>i.map(i=>d[i]); 2import{ag as e,t,s as n,T as r,l as a,m as i,f as o,x as s,_ as l,ae as c,ai as u,u as d,ba as p,q as m,E as h,a2 as g,X as f,S as y,v,D as _,H as b,G as P,C as k,y as S,o as w,p as C,N as E,w as x,$ as I,n as A,z as T,a as L,r as N,a4 as R,Q as M,j as D,a0 as O,V as z,bb as B,bc as V,R as F,bd as U,au as q,W as j,F as H,Y as $,Z as Y,be as W,bf as G,b6 as J,bg as K,at as Q,bh as X}from"./2c1ab0fe.GMbxnz74.js";import{kT as Z,n7 as ee,cZ as te,al as ne,aS as re,S as ae,aw as ie,ed as oe,J as se,n8 as le,dr as ce,g as ue,V as de,ee as pe,aJ as me,aa as he,T as ge,n9 as fe,eN as ye,df as ve,cG as _e,d8 as be,gW as Pe,bb as ke,ba as Se,Q as we,d5 as Ce,d1 as Ee,d0 as xe,d6 as Ie,d7 as Ae,cY as Te,na as Le,nb as Ne,nc as Re,eL as Me,mv as De,nd as Oe,ne as ze,dw as Be,g3 as Ve,ju as Fe,y as Ue,W as qe,aK as je,aF as He,nf as $e,j_ as Ye,ng as We,nh as Ge,aZ as Je,ni as Ke,e5 as Qe,nj as Xe,nk as Ze,nl as et,ea as tt,e9 as nt,e8 as rt,e7 as at,nm as it,eY as ot,m7 as st,gG as lt,nn as ct,no as ut,m8 as dt,bg as pt,bG as mt,m2 as ht,gx as gt,dd as ft,gy as yt,em as vt,np as _t,nq as bt,cA as Pt,nr as kt,ns as St,bv as wt,l7 as Ct,bm as Et,bj as xt,bk as It,nt as At,eo as Tt,n as Lt,eh as Nt,ak as Rt,fk as Mt,_ as Dt,c2 as Ot,ah as zt,ch as Bt,bH as Vt,hr as Ft,hp as Ut,I as qt,nu as jt,H as Ht,n4 as $t,kC as Yt,cr as Wt,nv as Gt,nw as Jt,bp as Kt,nx as Qt,ny as Xt,nz as Zt,nA as en,nB as tn,lt as nn,eD as rn,eC as an,jj as on,ez as sn,nC as ln,eB as cn,nD as un,eA as dn,fv as pn,hL as mn,hO as hn,hK as gn,b4 as fn,nE as yn,ct as vn,a9 as _n,hF as bn,lJ as Pn,bh as kn,hJ as Sn,nF as wn,aN as Cn,lW as En,fr as xn,a1 as In,w as An,mK as Tn,gP as Ln,hR as Nn,as as Rn,hS as Mn,b1 as Dn,nG as On,nH as zn,nI as Bn,kX as Vn,kf as Fn,nJ as Un,iY as qn,aT as jn,ao as Hn,h as $n,b6 as Yn,ag as Wn,kB as Gn,z as Jn,ev as Kn,dm as Qn,kq as Xn,nK as Zn,t as er,iK as tr,iw as nr,
2j2 as rr,bx as ar,bF as ir,iU as or,iX as sr,iT as lr,lS as cr,fU as ur,lZ as dr,lY as pr,fY as mr,fV as hr,l_ as gr,mi as fr,d9 as yr,eV as vr,bE as _r,cX as br,nL as Pr,nM as kr,kV as Sr,nN as wr,eE as Cr,hn as Er,nO as xr,nP as Ir,lj as Ar,nQ as Tr,nR as Lr,nS as Nr,nT as Rr,nU as Mr,nV as Dr,dP as Or,nW as zr,nX as Br,nY as Vr,nZ as Fr,n_ as Ur,n$ as qr,o0 as jr,o1 as Hr,fo as $r,o2 as Yr,o3 as Wr,mA as Gr,e$ as Jr,mz as Kr,mB as Qr,o4 as Xr,br as Zr,o5 as ea,o6 as ta,o7 as na,o8 as ra,ax as aa,o9 as ia,jM as oa,jN as sa,e as la,jL as ca,g$ as ua,hk as da,oa as pa,ob as ma,A as ha,cP as ga,ab as fa,fH as ya,fI as va,lN as _a,k4 as ba,fJ as Pa,gU as ka,c1 as Sa,hm as wa,C as Ca,oc as Ea,gR as xa,aq as Ia,et as Aa,od as Ta,m9 as La,b3 as Na,hM as Ra,oe as Ma,of as Da,og as Oa,Z as za,oh as Ba,oi as Va,oj as Fa,ok as Ua,js as qa,ol as ja,gF as Ha,gH as $a,om as Ya,iM as Wa,on as Ga,oo as Ja,op as Ka,dW as Qa,hd as Xa,dz as Za,kO as ei,oq as ti,eI as ni,je as ri,ko as ai,da as ii,a_ as oi,or as si,os as li,ot as ci,cS as ui,dN as di,i as pi,ou as mi,K as hi,jo as gi,f as fi,ov as yi,ow as vi,jr as _i,dh as bi,kG as Pi,k3 as ki,ib as Si,c4 as wi,aP as Ci,dY as Ei,dZ as xi,dc as Ii,aW as Ai,ox as Ti,cp as Li,oy as Ni,cj as Ri,lf as Mi,oz as Di,cq as Oi,bo as zi,bq as Bi,fc as Vi,aQ as Fi,bQ as Ui,bI as qi,bO as ji,jy as Hi,mT as $i,ip as Yi,oA as Wi,D as Gi,oB as Ji,f8 as Ki,ik as Qi,oC as Xi,az as Zi,ay as eo,aB as to,aC as no,oD as ro,E as ao,oE as io,oF as oo,oG as so,eb as lo,oH as co,e3 as uo,oI as po,ds as mo,jn as ho,oJ as go,gM as fo,oK as yo,oL as vo,cn as _o,jS as bo,jU as Po,he as ko,mS as So,e2 as wo,ef as Co,h4 as Eo,e1 as xo,e0 as Io,oM as Ao,cf as To,es as Lo,eg as No,oN as Ro,hl as Mo,cR as Do,hH as Oo,jF as zo,l8 as Bo,ke as Vo,oO as Fo,oP as Uo,oQ as qo,dl as jo,kh as Ho,hh as $o,oR as Yo,k1 as Wo,oS as Go,lM as Jo,lL as Ko,hi as Qo,hj as Xo,oT as Zo,oU as es,oV as ts,oW as ns,ho as rs,gS as as,x as is,cl as os,by as ss,iq as ls,lm as cs,gQ as us,jk as ds,jp as ps,ai as ms,hx as hs,hq as gs,oX as fs,oY as ys,oZ as vs,o_ as _s,o$ as bs,p0 as Ps,f4 as ks,p1 as Ss,p2 as ws,p3 as Cs,fq as Es,hN as xs,B as Is,ac as As,lE as Ts,p4 as Ls,jx as Ns,fA as Rs,cW as Ms,Y as Ds,p5 as Os,c3 as zs,dM as Bs,l5 as Vs,jA as Fs,jB as Us,b5 as qs,gc as js,kg as Hs,p6 as $s,m5 as Ys,lV as Ws,ff as Gs,p7 as Js,p8 as Ks,p9 as Qs,pa as Xs,kP as Zs,fi as el,fs as tl,pb as nl,bf as rl}from"./4c290a1e.C6TDJ9Fn.js";import{r as al,w as il,C as ol,b as sl,c as ll,D as cl,s as ul,f as dl,d as pl,e as ml}from"./9f047e05.CCJUgz_L.js";import{j as hl,S as gl,_ as fl,r as yl,J as vl,P as _l,w as bl,O as Pl,i as kl,c as Sl,t as wl,u as Cl,v as El,x as xl,y as Il,z as Al,B as Tl,D as Ll,E as Nl}from"./app.CepNJbvh.js";import{i as Rl,b as Ml,c as Dl,s as Ol,e as zl,f as Bl,I as Vl,g as Fl,d as Ul}from"./0a7dffce.DfUtZWCu.js";import{i as ql,u as jl}from"./5fda1420.KYpufQ--.js";import{i as Hl,f as $l,r as Yl,j as Wl,k as Gl,h as Jl,l as Kl,m as Ql,A as Xl}from"./60a453ce.CkhHeRBc.js";import{d as Zl,i as ec,c as tc,b as nc}from"./21cc90a2.DAzJmttM.js";import{d as rc}from"./bb728e1c.iawBHR84.js";function ac(e,t){e.error(t instanceof Error?t:new ol("Required checkout profile could not be loaded",{cause:t}))}async function ic(e,t){const{data:n}=await e.staticQuery(Z,{variables:t,skip:!0}),r=n?.checkoutProfile;return r?.id===t.id&&r.activatedExtensions?r:void 0}function oc(t,n){if(!t||e(Z,t)!==e(Z,n))throw new ol("Required checkout profile could not be loaded")}function sc(e){return function(e,t){if(!t)return;if(void 0!==e[t])return e[t];const n=Object.keys(te);for(let r=n.indexOf(t);r>=0;r--){const t=n[r];if(void 0!==e[t])return e[t]}}(e,ee())}function lc(e){if("object"!=typeof e||!e)return!1;let t=!1;for(const n of Object.keys(e)){if(!(n in te))return!1;t=!0}return t}function cc(e){return{analyticsProcessingAllowed:e.analyticsProcessingAllowed.value,marketingAllowed:e.marketingAllowed.value}}const uc=ne("JourneyContext"),dc=ne("JourneyProgressionContext");function pc(){const{journeyState:e,pageBeforeDetour:n,...r}=re(uc),{router:a}=ae();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 mc(){const e=re(dc),{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 hc(e){const t=ie(),n=a(e);n.current=e,i(()=>t.listen((...e)=>n.current(...e)),[t])}function gc(e){const t=ie(),n=a(e);n.current=e,i(()=>t.listenBeforeNegotiation((...e)=>n.current(...e)),[t])}function fc({active:e=!0}={}){const t=ie();i(()=>{if(e)return t.block()},[t,e])}const yc=["information","shipping","payment","review"];function vc(){const e=ae().checkout.latestReceipt.value;return"processed"===e?.status?e:void 0}function _c(){const e=vc(),t=pc(),r=a(!1),i=n(()=>(r.current=!0,r),[r]);return{shouldPrevent:n(()=>{if(r.current)return!0;const n="postPurchase"===t.value.currentDetour?.type;return!e||Boolean(e.redirectUrl)&&!n},[e,t]),markAsEmitted:i}}function bc(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 Pc={thankYou:"c1_typ",postPurchase:"post_purchase"};function kc(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 wc(e){return e.checkoutSessionIdentifier}function Cc(e){return e||void 0}function Ec(e){return e?se(e):void 0}function xc(e){const t=e?.customerProfile;if(!t)return;const n=se(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 Ic({negotiated:e,shop:t,source:n}){const r=e.current.fields.merchandiseLines.value,a=e.current.fields.remoteMerchandiseDetails?.value,i=r?pe(r.lines,a):void 0,o=function(e,t){return t?t.map(t=>{const n=ue(t.variantId??void 0),r={totalAmount:Dc((a=t.lineAllocations).reduce((e,t)=>e+t.totalAmountAfterLineDiscounts.amount,0),a[0]?.totalAmountAfterLineDiscounts.currencyCode)};var a;const i=t.itemPrice?t.itemPrice:{amount:0,currencyCode:e};return{cost:r,merchandise:{id:n??null,image:{src:t.image?.url??null},price:i,product:{id:ue(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:Dc(u,d)},lines:o,totalQuantity:c,attributes:s}}function Ac({shop:e}){return{name:e.name,paymentSettings:{currencyCode:e.currencyCode},myshopifyDomain:e.myshopifyDomain,countryCode:e.countryCode,storefrontUrl:e.storefrontUrl??null}}function Tc(e){const t=e?.purchasingCompany;if(t)return{company:{id:t.company.id,externalId:t.company.externalId??null,name:t.company.name},location:{id:t.location.id,externalId:t.location.externalId??null,name:t.location.name}}}function Lc(e){switch(e.type){case"custom":return e.discountType;case"code":return"DISCOUNT_CODE";case"automatic":return"AUTOMATIC"}}function Nc(e,t){return{allocationMethod:e.allocationMethod,targetSelection:e.targetSelection,targetType:Bc(e.targetType),title:e.title,type:Lc(e),value:Vc(e,t)}}function Rc(e){const t=[];
2return e.forEach(e=>{e.allocations.forEach(e=>{const n=e.discountDetails.discount;Ml(n)&&t.push({amount:e.amount,discountApplication:Nc(n,e.amount)})})}),t}function Mc(e){return Dc(e.reduce((e,t)=>e+t.totalAmountAfterLineDiscounts.amount,0),e[0]?.totalAmountAfterLineDiscounts?.currencyCode)}function Dc(e,t){return{amount:Number(e.toFixed(2)),currencyCode:t}}function Oc(e){return e.sellingPlan?{sellingPlan:{id:e.sellingPlan.id,name:e.sellingPlan.name}}:null}function zc(e){return e.map(e=>({key:e.name,value:String(e.value)}))}function Bc(e){if(!e)return"";switch(e){case"MERCHANDISELINE":return"LINE_ITEM";case"DELIVERYLINE":return"SHIPPING_LINE";default:return""}}function Vc(e,t){const n=e.value;return"FixedAmountValue"===n.typename?t:{percentage:n.percentage}}function Fc(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 Uc(e,t){const n=new Map;return $c(e,t).forEach(e=>{Yc(n,e),e.lineComponents.forEach(e=>Yc(n,e))}),n}function qc(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=le(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?ce(u,({method:e})=>e.cost.amount,({method:e,availableDeliveryLine:t})=>"ONE_TIME_PURCHASE"===t.type?me(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 jc({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=Ec(wc(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 $c(e,n).map(e=>{const n=Ec(e.variantId),r=e.itemPrice?e.itemPrice:{amount:0,currencyCode:t};return{discountAllocations:Rc(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:Ec(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:Mc(e.lineAllocations),sellingPlanAllocation:Oc(e),properties:zc(e.properties),lineComponents:e.lineComponents.map(e=>function(e,t){const n=Ec(e.variantId),r=e.itemPrice?e.itemPrice:{amount:0,currencyCode:t};return{discountAllocations:Rc(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:Ec(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:Mc(e.lineAllocations),sellingPlanAllocation:Oc(e),properties:zc(e.properties)}}(e,t))}})}(e,l,o),v={selectedDeliveryOptions:qc(e,i,o,Uc(e,o),Wc(e,o),c)},_=Boolean(p)&&Fc("acceptEmailMarketing",e,i,o),b=Fc("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(Rl(t)){const n=t.amount;if(!n)return e;e.push(Nc(t.discount,n))}return e},[]):[]}(e,o),C=o?.totalSavings||e?.current?.fields?.totalSavings.value||null,E=bc(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=le(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?ce(s,({method:e})=>e.cost.amount,({method:e,line:t})=>"ONE_TIME_PURCHASE"===t.type?me(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},N=function({orderId:e,customerId:t,isFirstOrder:n}){const r={id:ue(t)??t??null,isFirstOrder:n??null};return{id:ue(e)??e??null,customer:r}}({orderId:n,customerId:r,isFirstOrder:a}),R=e.current.fields.customAttributes.value,M=(R?.length?R: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 de.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 de.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:kc(e.method.type),name:r}})}),i}(e,o?.paymentDetails?.paymentGateway||void 0,o),O=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:O,order:N,delivery:v,shippingAddress:A,subtotalPrice:h,shippingLine:{price:x},smsMarketingPhone:S,totalTax:E,totalPrice:g,transactions:D}}function Hc(e){return{...e,value:"<redacted>"}}function $c(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?pe(r.lines,a):[]}function Yc(e,t){const n=Ec(t.variantId);void 0!==n&&e.set(t.stableId,n)}function Wc(e,t){const n=new Map,r=new Map;
2return $c(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 Gc={sectionComplete:!0,pageSubmit:!0,shippingMethodsFilled:!0,shippingMethodSelected:!0};function Jc(e){if(!(e.type in Gc))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 Kc(e,t){if(Jc(e))return jc(t)}function Qc(){const e=ge().buyerIdentity;return t(()=>{const t=e.value?.customerProfile;return Boolean("BusinessCustomerProfile"===t?.__typename&&t?.checkoutExperienceConfiguration?.editableShippingAddress)})}function Xc(){const[e,t]=s(!1);return l(()=>{t("undefined"!=typeof window&&window.matchMedia("(prefers-reduced-motion: reduce)").matches)},[]),i(()=>{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 Zc(e){return t=>`${e}${t}`}function eu(e,t){const n=c().replace(/:/g,"");return e??t(n)}const tu="PortalHost",nu="data-portal-order";function ru(e){e.setAttribute(nu,String(performance.now()))}function au(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(nu));e>n&&(n=e,t=r)}return t}function iu(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=au(document.getElementById(tu));return t.some(e=>e instanceof Node&&n?.contains(e))}function ou(e){if(!e)return!1;const t=au(document.getElementById(tu));return t?.contains(e)??!1}function su(e){if(!e)return!1;const t=document.getElementById(tu);return t?.contains(e)??!1}const lu=Zc("Portal");function cu(){return d("div",{id:tu})}function uu({children:e}){const[t,n]=s(null),r=eu(void 0,lu);return i(()=>{const e=document.getElementById(tu)??document.body,t=document.createElement("div");return t.setAttribute("id",r),ru(t),e.appendChild(t),n(t),()=>{e.removeChild(t)}},[r]),t&&u(e,t)}class du extends Error{constructor(){super(...arguments),this.name="SpriteLoadError",this.groupingHash="checkout-web-ui:sprite-load-error"}}function pu(e,t){return new du(`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 mu(e,t){return t instanceof du?t:pu(e,t instanceof Error?t.message:String(t))}const hu={errorClass:"SpriteLoadError",severity:"warning"};function gu(e,t){try{return fu.ensureFetched(e)}catch(n){throw fu.reportLoadFailure(e,n,t),n}}const fu=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(mu(e,t),hu)}):n.error(mu(e,t),hu))}#n(e){const t=fetch(e).then(t=>{if(!t.ok)throw pu(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:mu(e,t)}),t});return this.#e.set(e,{status:"pending",promise:t}),t}},yu=["cdn.shopify.com"],vu=f(null);function _u({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(vu.Provider,{value:a,children:[e,d(bu,{sprites:n})]})}function bu({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 Pu({iconUrl:e,allowRelativeUrl:t}){const n=m(!1);l(()=>{n.value=!0},[n]);const r=h(vu),{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&&yu.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(ku,{spriteUrl:a,symbolId:i});const o=gu(a,r?.logger);return d("span",{dangerouslySetInnerHTML:{__html:o},"aria-hidden":"true"})}function ku({spriteUrl:e,symbolId:t}){const n=h(vu);if(!n)throw new fe("No sprite registry available");const r=gu(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 wu({iconUrl:e,fallback:t,allowRelativeUrl:n=!1}){return d(Su,{fallback:t,children:d(p,{fallback:t,children:d(Pu,{iconUrl:e,allowRelativeUrl:n})})})}const Cu=f(void 0);function Eu(){return h(Cu)}function xu({children:e,level:t}){const n=Eu(),r=t??(n??0)+1;return d(Cu.Provider,{value:r,children:e})}const Iu=f({colorMix:!1,customProperties:!1,flexGap:!1});function Au({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(Iu.Provider,{value:i,children:e})}const Tu=f(null);function Lu({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(Tu.Provider,{value:u,children:e})}const Nu="forwarding-external-new-window-message";function Ru({external:e,native:t}){if(e&&t)return Nu}const Mu=f(null),Du=f(void 0),Ou=Zc("Overlay");function zu({activatorRef:e,children:t}){const n=a(new Map),i=eu(void 0,Ou),[o,l]=s(()=>i),[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(Du.Provider,{value:h,children:t})}function Bu({children:e}){return d(Du.Provider,{value:void 0,children:d(Mu.Provider,{value:null,children:e})})}function Vu(){const e=h(Du);if(e)return e}const Fu=f(void 0),Uu=()=>h(Fu),qu=()=>{const e=Uu();return r(()=>({closeOverlay(t){e?.close(t)}}),[e])};function ju({children:e}){const t=a(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(Fu.Provider,{value:n,children:e})}const Hu=f(void 0);function $u({children:e}){const n=a({sheet:!1,modal:!1}),i=m(0),o=t(()=>i.value>0),s=r(()=>({isLocked:e=>n.current[e],lock(e){n.current[e]=!0},unlock(e){n.current[e]=!1},openModalCount:i,isModalOpen:o}),[i,o]);return d(Hu.Provider,{value:s,children:e})}function Yu(e){const t=h(Hu),[n,a]=s(!1);return i(()=>()=>{t&&n&&t.unlock(e)},[t,n,e]),r(()=>{if(!t)return;const{lock:r,unlock:i,isLocked:o}=t;return{setActive(t){a(a=>("function"==typeof t?t(a):t)?o(e)&&!n?(console.warn(`Multiple <${"modal"===e?"Modal":"Sheet"} /> components cannot be rendered at the same time`),a):o(e)?a:(r(e),!0):(n&&i(e),!1))},active:n}},[t,n,e])}function Wu(e){const t=Vu(),n=Yu(e);return r(()=>{if(!n)return;const{active:e,setActive:r}=n;return t?{...t,setActive:r,active:e}:void 0},[t,n])}const Gu=f(void 0);function Ju({announcementEmitter:e,children:t}){return d(Gu.Provider,{value:e,children:t})}function Ku(){const e=h(Gu);if(!e)throw new fe("Missing AnnouncementContext Context ");return e}var Qu="_14u2r6s0 _1fragem121";const Xu=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 Zu({content:e,role:t="status"}){return Xu.announce({content:e,role:t})}function ed(){const[e,t]=s([]),n=e.filter(e=>"status"===e.role),r=e.filter(e=>"alert"===e.role);return i(()=>Xu.subscribe(e=>{t(e)}),[]),d(y,{children:[d("div",{role:"status",className:Qu,children:n.map(({content:e,role:t})=>d("span",{children:e},`${e}-${t}`))}),d("div",{role:"alert",className:Qu,children:r.map(({content:e,role:t})=>d("span",{children:e},`${e}-${t}`))})]})}var td="rij0560 _1fragem121";const nd=f(null);function rd(){const e=h(nd);if(null==e)throw new ye("No app context available");return e}function ad(){return rd().currency}function id(){return rd().translate}function od(){return rd().formatNumber}function sd(){return rd().geolocation}function ld(){return rd().locale}function cd({children:e,currency:t,embed:n,linkComponent:a,geolocation:i,locale:o,onePage:s,editor:l,redesignedChoiceLists:c,translate:u,formatNumber:p,announcementEmitter:m,inlineIcons:h,logger:g}){const f=r(()=>({currency:t,embed:n,formatNumber:p,geolocation:i,linkComponent:a,locale:o,onePage:s,editor:l,redesignedChoiceLists:c,translate:u,inlineIcons:h,logger:g}),[t,n,u,p,a,i,o,s,l,c,h,g]);return d(nd.Provider,{value:f,children:d(Ju,{announcementEmitter:m,children:d(Au,{children:d(xu,{children:d($u,{children:d(ju,{children:d(Lu,{children:[d(_u,{logger:g,children:e}),d(ud,{}),d(ed,{})]})})})})})})})}function ud(){const e=id();
2return d(y,{children:[d("div",{id:Nu,"aria-hidden":!0,className:td,children:e("externalNewWindow")}),d("div",{id:"forwarding-new-window-message","aria-hidden":!0,className:td,children:e("newWindow")}),d("div",{id:"forwarding-external-message","aria-hidden":!0,className:td,children:e("external")})]})}function dd(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 pd(e){return/^span\s+\d+$/.test(e)?e:"auto"}function md(e){return console.warn(`Invalid transform value '${String(e)}'. Expected 'none', 'translate(<size>)' or 'translate(<size>, <size>)' with px or % magnitudes.`),""}function hd(e){return gd(e)}function gd(e){if("0"===e)return 0;const t=be(e);return void 0===t||"px"!==t.unit&&"%"!==t.unit?void 0:"%"===t.unit?`${t.number}%`:t.number}function fd(e){if("auto"===e||"string"!=typeof e)return"auto";const t=gd(e);return void 0===t?(console.warn(`Invalid inset coordinate '${e}'. Expected a px or % size, or 'auto'. Falling back to 'auto'.`),"auto"):_e(t)??"auto"}function yd(e){return _d(e,{auto:!0,fitContent:!0})}function vd(e){return _d(e,{none:!0})}function _d(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=be(e),r=!n||"px"!==n.unit&&"%"!==n.unit&&"ch"!==n.unit&&"em"!==n.unit&&"lh"!==n.unit&&"vh"!==n.unit?void 0:_e(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 bd(e){return`url(${JSON.stringify(e)})`}const Pd={auto:"flex",inline:"inlineFlex",block:"flex",none:"none"},kd={auto:"block",inline:"inline",block:"block",none:"none"},Sd={auto:"inline",inline:"inline",block:"block",none:"none"},wd={auto:"grid",inline:"inlineGrid",block:"grid",none:"none"},Cd=e=>kd[e],Ed=e=>Sd[e],xd=e=>Pd[e],Id=e=>wd[e],Ad=f(void 0),Td=()=>h(Ad),Ld=f(!1);function Nd(){return h(Ld)}const Rd=f(!1);function Md(){return h(Rd)}const Dd=new Map([["none",0],["faster",88.9],["fast",133.333],["base",200],["slow",300],["slower",450],["slowest",675]]);function Od(e,t="slow",n=!1){const[r,o]=s(!n&&e),[l,c]=s(!1),u=a(!n&&e),d=a(()=>{o(u.current),c(!1)}),p=Xc();let m="string"==typeof t?t:t.enter,h="string"==typeof t?t:t.exit;return p&&(m="none",h="none"),i(()=>{let t;e!==u.current&&(t=setTimeout(()=>{c(!0)},0)),u.current=e;const n=setTimeout(d.current,e?Dd.get(m??"none"):Dd.get(h??"none"));return()=>{clearTimeout(n),clearTimeout(t)}},[m,h,e]),l?e?"entering":"exiting":e===r?e?"entered":"exited":e?"enter":"exit"}var zd={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 Bd({id:e,open:t,renderChildrenWhenCollapsed:n=!1,children:r,duration:o="slow",properties:s=["height"],onTransition:l}){const c=Od(t,o),u=a(null);i(()=>{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(zd.Transition,zd.transitionDurationVariant[o],s.includes("opacity")&&zd.transitionOpacity[c]),hidden:m,children:d("div",{ref:u,children:m&&!n?null:r})})}const Vd=f(void 0);function Fd({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(Vd.Provider,{value:c,children:e})}function Ud({layoutId:e,activatorId:t}){const n=h(Vd);if(i(()=>{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&&$d(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}}}Vd.displayName="DisclosureContext";const qd=Zc("DisclosureActivator");function jd(e,t){const n=e.displayName||e.name||"Component",r=_(({id:r,toggles:a,...i},o)=>{const s=eu(r,qd),l=Ud({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 Hd(e){const t=_((t,n)=>{const{id:r}=t,a=Ud({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(Bd,{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 $d(e=[]){return"boolean"==typeof e?{}:(Array.isArray(e)?e:[e]).reduce((e,t)=>({...e,[t]:!0}),{})}function Yd(e){return"command"===e?.type&&"clipboard"===e.kind}function Wd(e){return"command"===e?.type&&"visibility"===e.kind}function Gd(e){return"command"===e?.type&&"overlay"===e.kind}function Jd(e){return"interest"===e?.type}function Kd(){const e=h(Tu);if(null===e)throw new ye("No Interactions in context");return e}function Qd(){const{getInteraction:e}=Kd();return{showOverlay:n(t=>{const n=e(t);Gd(n)?n.open():console.warn(`No overlay found for ID "${t}".`)},[e]),hideOverlay:n(t=>{const n=e(t);Gd(n)?n.close():console.warn(`No overlay found for ID "${t}".`)},[e])}}let Xd="",Zd=[],ep=0,tp=0,np=[],rp=!1;class ap extends Error{}function ip(){return ep>=Xd.length}function op(){return Xd[ep++]}function sp(e){const t=Xd.substring(tp,ep).trim();Zd.push({type:e,text:t})}function lp(){return ip()?gp:Xd[ep]}function cp(){const e=op();switch(e){case fp:break;case up:sp("LEFT_PAREN");break;case dp:sp("RIGHT_PAREN");break;case"@":{for(;!bp.has(lp());)op();const e=Xd.substring(tp,ep);"@media"===e||"@container"===e?sp("MEDIA_TYPE"):np.push(`Invalid media type "${e}" starting at position ${tp}.`);break}case pp:sp("COMMA");break;case hp:case mp:t="=",ip()||Xd[ep]!==t||ep++,sp("COMPARATOR");break;case yp:case vp:for(tp++;lp()!==e;)op();sp("IDENTIFIER"),op();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(;!bp.has(lp());)op();const e=Xd.substring(tp,ep),t=e.toLowerCase();if("and"===t||"or"===t)e!==t?np.push(`Keyword "${e}" is not case sensitive at position ${tp}.`):sp("OPERATOR");else if("inline-size"===t||"block-size"===t)e!==t?np.push(`Property "${e}" is not case sensitive at position ${tp}.`):sp("PROPERTY");else{if(lp()===fp)for(op();!_p.has(lp());)op();sp("IDENTIFIER")}}else np.push(`Unexpected character "${e}" at position ${ep}.`)}var t}const up="(",dp=")",pp=",",mp="<",hp=">",gp="\0",fp=" ",yp="'",vp='"',_p=new Set([gp,up,dp,pp,mp,hp]),bp=new Set([..._p,fp]);let Pp=[],kp=0;function Sp(e){for(const t of e)if(wp(t))return Cp(),!0;return!1}function wp(e){return!xp()&&(Array.isArray(e)?e.includes(Ip().type):Ip().type===e)}function Cp(){return xp()||kp++,Ap()}function Ep(e,t){if(wp(e))return Cp();throw new ap(`${t}\nInstead we found this word/character: "${Ip().text}"`)}function xp(){return"EOF"===Pp[kp].type}function Ip(){return Pp[kp]}function Ap(){return Pp[kp-1]}const Tp="s-default";function Lp(){return{condition:Np(),value:Ep("IDENTIFIER","Expected an identifier").text}}function Np(){Ep("LEFT_PAREN",'Expected a condition to start with a left parenthesis "("');const e=Rp();let t=null;wp("COMPARATOR")&&(t=Rp(e.operator)),Ep("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"===Ip().type){const e=Ep("OPERATOR","Expected an operator");return{type:"compound-condition",left:n,right:Np(),operator:e.text}}return n}function Rp(e){const t=e?Ap():Ep(["IDENTIFIER","PROPERTY"],"Expected an identifier or property"),n=Ep("COMPARATOR",'Expected a comparison operator (like "<" or ">")');if(e&&e[0]===n.text[0])throw new ap("Cannot have two different c
2omparison operators (a less-than and a greater-than) in the same condition.");const r=Ep("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 Mp(e){try{return t=function(e){if(rp)throw Error("Cannot tokenize recursively");for(rp=!0,Xd=e,Zd=[],ep=0,tp=0,np=[];!ip();)tp=ep,cp();if(tp=ep,sp("EOF"),rp=!1,np.length)throw new ap(np.join("\n"));return Zd}(e),Pp=t,kp=0,function(){const e={responsiveType:Ep("MEDIA_TYPE",'Expected a media type such as "@media" or "@container"').text,conditionalValues:[],fallbackValue:"",state:"valid"};if("@container"===e.responsiveType){const t="IDENTIFIER"===Ip().type?Cp().text:Tp;e.name=t}for(e.conditionalValues.push(Lp());Sp(["COMMA"])&&"LEFT_PAREN"===Ip().type;)e.conditionalValues.push(Lp());if("COMMA"!==Ap().type)throw new ap(`Expected a comma before the fallback value of "${Ip().text}"`);if(e.fallbackValue=Ep("IDENTIFIER","Expected a final fallback value to be defined").text,"EOF"!==Ip().type)throw new ap(`Expected the query to end, instead found "${Ip().text}"`);return e}()}catch(n){if(n instanceof ap)return{state:"invalid",error:n.message};throw new Error("Unknown error",{cause:n})}var t}function Dp(e){return"string"==typeof e&&e.startsWith("@container")}function Op(e){return"string"==typeof e&&e.startsWith("@media")}function zp(e){if(lc(e))return e.base;if(!Dp(e)&&!Op(e))return e;const t=Mp(e);return"invalid"===t.state?void 0:t.fallbackValue}function Bp(e,t){if(e===t)return!0;if(lc(e))return Object.values(e).some(e=>Bp(e,t));if(!Dp(e)&&!Op(e))return!1;const n=Mp(e);return"invalid"!==n.state&&(n.fallbackValue===t||n.conditionalValues.some(e=>e.value===t))}function Vp(e,t){return lc(e)?Object.fromEntries(Object.entries(e).map(([e,n])=>[e,t(n)])):t(e)}function Fp(e){const t=e,a=_(function(e,a){const{upsertInteraction:o,deleteInteraction:l}=Kd(),{display:c}=e,u="none"===c,p=r(()=>Bp(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(i(()=>(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:a})});return a.displayName=`VisibilityCommandTargetComponent(${e.displayName||e.name||"Component"})`,a}function Up(e,{overlayType:t}){const r=_(function(r,a){const{open:o}=r,{upsertInteraction:l,deleteInteraction:c}=Kd(),{active:u,setActive:p}=function(e){const t=function(e){return"modal"===e||"sheet"===e?()=>{const t=Yu(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=Vu(),{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(i(()=>()=>{h&&c(h)},[h]),i(()=>{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:a})}return d(e,{...r,ref:a})});return r.displayName=`OverlayCommandTargetComponent(${e.displayName||e.name||"Component"})`,r}function qp(e){return n(t=>{"function"==typeof e?e(t):null!=e&&(e.current=t)},[e])}function jp(e,t){const r=qp(e),a=qp(t);return n(e=>{r(e),a(e)},[r,a])}const Hp=["aria-controls","aria-describedby","aria-expanded","aria-haspopup"];function $p(e,t){return Hp.reduce((n,r)=>({...n,[r]:e?.activatorAttributes[r]??t?.[r]}),{})}const Yp=["onBlur","onClick","onFocus","onKeyDown","onMouseDown","onMouseEnter","onMouseLeave","onMouseUp","onTouchStart"];function Wp(e,t){return Yp.map(n=>{return{[n]:(r=t?.[n],a=Gp(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 Gp(e,t){return function(n){t?.trigger(e,n)}}function Jp(e){const t=_(({overlay:t,...n},r)=>{const i=a(null),o=jp(r,i);return t?d(zu,{activatorRef:i,children:[d(e,{...n,ref:o}),t]}):d(e,{...n,ref:r})});return t.displayName=`OverlayActivator(${e.displayName||e.name||"Component"})`,t}function Kp(e,{focusActivatorWhenClosing:t=!1}={}){const n=_((n,r)=>{const{id:a,onClose:o,onHide:s}=n,l=Vu(),c=Uu();return i(()=>(a&&c?.register(a,{close(){o?.(),s?.(),l?.setActive(!1),t&&l?.activatorRef.current?.focus({preventScroll:!0})}}),()=>{a&&c?.unregister(a)}),[a,o,s,c,l]),d(e,{...n,ref:r,id:a??l?.overlayId})});return n.displayName=`Overlay(${e.displayName||e.name||"Component"})`,n}function Qp(e){if(e)return`${e}Title`}const Xp=(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)}},Zp=f(null);function em(){const e=h(Zp);if(null===e)throw new ye("No Popper in context");return e}const tm=f({}),nm=()=>h(tm);function rm(e,t){if("center"===t)return e;const n=e.startsWith("block");return`${e}Span${n?"Inline":"Block"}${"start"===t?"End":"Start"}`}function am(e){return Math.abs(e.left)+Math.abs(e.right)+Math.abs(e.top)+Math.abs(e.bottom)}function im(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 om(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 sm(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 lm=/^(block|inline)-(start|end)( span-(inline|block)-(start|end))?$/;function cm(e){return lm.test(e)}function um(e){const t=e.match(lm);if(!t)return null;const[,n,r,,a,i]=t;return{axis:n,edge:r,...a&&i?{spanAxis:a,spanEdge:i}:{}}}function dm(e){const t=`${e.axis}-${e.edge}`;return e.spanAxis&&e.spanEdge?`${t} span-${e.spanAxis}-${e.spanEdge}`:t}var pm={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 mm(e){if(cm(e)){const[t,n]=e.split(" ");return e.includes(" ")?{position:Se(t),alignment:n.includes("start")?"end":"start"}:{position:Se(t),alignment:"center"}}return{position:"blockStart",alignment:"center"}}function hm(e){return e.split(",").map(e=>e.trim()).filter(e=>!!cm(e))}function gm({activator:e,children:t,hidden:i,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),i=m("ltr"),o=a([]),c=a(null),u=n(()=>{null!==e&&(i.value="rtl"===window.getComputedStyle(e).direction?"rtl":"ltr",r(e.getBoundingClientRect()))},[e,i]);return l(()=>{u();const t=Xp(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:i.value}}(e),[b,P]=function(){const[e,t]=s(null),r=a(null),i=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,i]}(),k=a(null),S=n(e=>{P(e),k.current=e},[P]),[w,C]=s(""),{current:E,parent:x}=nm(),I=m("absolute"),{position:A,alignment:T}=mm(p),L=r(()=>{if("none"!==h)return h??function(e){const t=function(e){const t=um(e);return t?dm({...t,edge:"start"===t.edge?"end":"start"}):e}(e),n=function(e){const t=um(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[dm({axis:n,edge:"start",...r}),dm({axis:n,edge:"end",...r})]}(e);return[t,...n].join(", ")}(p)},[h,p]),{clipping:N,offsets:R,spacing:M,resolvedPosition:D,resolvedAlignment:O}=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}=im(e,t,s),d=l?.map(({position:e,alignment:t})=>im(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=om(c,u,n,r,a,o,s);if(p.x=y.x,p.y=y.y,i){if(m=sm(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=am(m);for(const t of d){const e=om(t.position,t.alignment,n,r,a,o,s),i=sm(e,n);if(0===am(i)){p.x=e.x,p.y=e.y,m=i,g=t.position,f=t.alignment;break}}if(am(m)>0){let t=e;for(const e of d){const i=om(e.position,e.alignment,n,r,a,o,s),l=sm(i,n),c=am(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?hm(L).map(mm):void 0}),[_,c,A,T,b,g,y,f,L]),z=r(()=>({clipping:N,offsets:R,position:D,alignment:O,popperRect:b,referenceRect:y,spacing:M}),[N,R,D,O,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:R.x+M+n,y:R.y+r});C((window.devicePixelRatio||1)<2?`translate(${a}px, ${i}px)`:`translate3d(${a}px, ${i}px, 0)`)},[R.x,R.y,M,e]),l(()=>{if(i)return;const e=k.current?.parentElement;e&&ru(e)},[i]),d(Zp.Provider,{value:z,children:d(uu,{children:d("div",{className:v(pm.Popper,pm.positionVariant[I.value],(x??E)&&pm.colorSchemeVariant[x??E],i&&pm.hidden),style:{...y&&{transform:w,...f&&{width:y.width},...u&&{minWidth:ke(u)}}},ref:S,id:o,"aria-hidden":i||void 0,"data-popper-hidden":i||void 0,children:x&&E?d("div",{className:pm.colorSchemeVariant[E],children:t}):t})})})}var fm={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 ym(e){const{children:t,id:r}=e,o=a(!1),s=Vu(),{active:l=!1,setActive:c}=s??{},u=n(e=>
2{["Escape","Esc"].includes(e.key)&&l&&(e.preventDefault(),c?.(!1))},[l,c]);return i(()=>{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:we({screenReaders:"only"}),children:t}),d(vm,{id:r,open:l,onMouseEnter:()=>{o.current||c?.(!0)},onMouseLeave:()=>{c?.(!1)},children:t})]})):d(vm,{...e})}const vm=Kp(function(e){const t=_(function(t,r){const{id:o,open:l}=t,{upsertInteraction:c,deleteInteraction:u}=Kd(),[p,m]=s(!1),h=a(),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 i(()=>()=>{g(),o&&u(o)},[o]),i(()=>{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}=Kd(),o=t?i(t):void 0,s=Vu(),{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=Od(Boolean(n),{exit:"base"}),p=Boolean(t&&Jd(o)&&!s),m=p?d("div",{id:t,role:"tooltip","aria-hidden":"true",className:we({screenReaders:"only"}),children:e}):null;return d(y,{children:[m,"exited"!==u&&d(gm,{activator:c,preventOverflow:!0,offset:8,children:d(_m,{id:p?void 0:t,transition:u,onMouseEnter:()=>{Jd(o)&&o.show(),r?.()},onMouseLeave:()=>{Jd(o)&&o.hide({delay:100}),a?.()},children:e})})]})}));function _m({children:e,id:t,onMouseEnter:n,onMouseLeave:r,transition:a}){const{clipping:i,spacing:o,position:s}=em(),l="blockStart"===s||"blockEnd"===s,c=i.right||i.left,u=l&&c?b({[fm.arrowNudge]:`${c+o}px`}):void 0,p=v(fm.Tooltip,fm.tooltipPositionVariant[s],fm.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(bm,{})]})}function bm(){const{position:e}=em();return d("div",{className:v(fm.Arrow,fm.arrowPositionVariant[e])})}async function Pm(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 ye("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 ye("Failed to copy text to clipboard")}const km=Zc("CommandInvoker");function Sm(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}=Kd(),[m,h]=s(!1),[g,f]=s(""),y=id(),v=r?p(r):void 0,_=Yd(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 Pm(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),Zu({content:e}),t?.()}else{const e=y("clipboardFailedToCopy");f(e),h(!0),Zu({content:e}),n?.()}k(),P.current=setTimeout(()=>{h(!1)},2500)}},[o,_,y]),P=a(),k=()=>{P.current&&clearTimeout(P.current)};return i(()=>()=>k(),[]),d(e,{...c,command:t,commandFor:r,onClick:_?b:o,overlay:_?d(vm,{open:m,children:g}):l,ref:u})}),u=_(function({commandFor:t,id:n,onClick:r,...a},i){const o=eu(n,km),s=Ud({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:i,onClick:o,...s},l){const c=eu(i,km),{getInteraction:u,upsertInteraction:p}=Kd(),m=r?u(r):void 0,h=a(null),g=jp(l,h),f=n(e=>{const t=r?u(r):void 0;if(Gd(t)){const{overlayType:n}=t;h.current&&"popover"===n&&e&&p({...t,invokerRef:h})}},[r,u,p]);if(m){let n={};if(Wd(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(Gd(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}=Kd();if(Ud({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&&!Jd(h)){const{defaultCommand:e}=h,u="--auto"===n?e:n;if("--copy"===u&&t&&Yd(h))return d(c,{...i,command:u,commandFor:a,ref:s});if(("--hide"===u||"--show"===u||"--toggle"===u)&&(r&&Wd(h)||o&&Gd(h)))return d(p,{...i,command:u,commandFor:a,ref:s});if("--show"===u||"--hide"===u||"--toggle"===u||"--copy"===u){let e;Yd(h)?e="clipboard":Wd(h)?e="visibility":Gd(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 wm(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}=Kd(),f=r?h(r):void 0,y=a(null),v=a(),_=a(),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=jp(s,y),k=jp(P,b),S=n(e=>{const t=r?h(r):void 0;Jd(t)&&g(e?{...t,invokerRef:y}:{...t,invokerRef:void 0})},[r,h,g]),w=Jd(f)&&f.active,C=n(e=>{["Escape","Esc"].includes(e.key)&&Jd(f)&&(e.preventDefault(),f.hide(),S(!1))},[f,S]);i(()=>{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"]')||Jd(f)&&(f.hide(),S(!1)))},[f,S]);if(i(()=>{if(t&&w)return document.addEventListener("click",E),()=>{document.removeEventListener("click",E)}},[w,E]),Jd(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 Cm=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])=>Ce(e)?.map(e=>[e,t])??[[e,t]])),Em={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"},xm={center:"center",end:"end",normal:"normal","space-between":"between","space-around":"around","space-evenly":"evenly",start:"start",stretch:"stretch"},Im={baseline:"baseline",center:"center",end:"end",normal:"normal",start:"start",stretch:"stretch"},Am={auto:"auto",hidden:"hidden"},Tm={alignContent:{...xm},placeContent:{...xm},alignItems:{...Im},alignSelf:{auto:"auto",baseline:"baseline",center:"center",end:"end",start:"start",stretch:"stretch"},placeItems:{...Im}
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:{...xm},justifyItems:{...Im},objectFit:{contain:"contain",cover:"cover",fill:"fill"},boxShadow:{none:"none",extraSmall:"extraSmall",small:"small",base:"base",large:"large",extraLarge:"extraLarge"},overflow:{...Am},overflowBlock:{...Am},overflowInline:{...Am},padding:{...Em},paddingBlock:{...Em},paddingInline:{...Em},paddingBlockStart:{...Em},paddingBlockEnd:{...Em},paddingInlineStart:{...Em},paddingInlineEnd:{...Em},gap:{...Em},rowGap:{...Em},columnGap:{...Em},position:{absolute:"absolute",relative:"relative",sticky:"sticky"},zIndex:{portal:"portal"}},Lm={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}},Nm={backgroundImage:bd,blockSize:yd,gridAutoColumns:e=>e,gridAutoRows:e=>e,gridColumn:pd,gridRow:pd,gridTemplateColumns:dd,gridTemplateRows:dd,inlineSize:yd,insetBlock:fd,insetBlockEnd:fd,insetBlockStart:fd,insetInline:fd,insetInlineEnd:fd,insetInlineStart:fd,maxBlockSize:vd,maxInlineSize:vd,minBlockSize:_d,minInlineSize:_d,transform:function(e){if("none"===e)return"none";if("string"!=typeof e||!e.startsWith("translate(")||!e.endsWith(")"))return md(e);const t=e.slice(10,-1).split(",");if(t.length>2)return md(e);const n=hd(t[0].trim()),r=2===t.length?hd(t[1].trim()):0;return void 0===n||void 0===r?md(e):`translateX(calc(${_e(n)} * ${ve.global.transformDirectionModifier})) translateY(${_e(r)})`}},Rm=/\s+/;function Mm(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 Lm?Dm(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 Cm&&r===Cm[n]||(t[n]=r);return t}(Om(r,t)):Om(r,t),i=Vm(a,Nm),o=Vm(a,Tm),s=we(i),{className:l,style:c}=Ee(o);return{className:v(s,l),style:c}}function Dm(e,t){const{limit:n}=Lm[t];return Vp(e,e=>{if(void 0===e||"string"!=typeof e)return;const t=e.trim().split(Rm,n??4);return 1===t.length?t[0]:(3===t.length&&t.push(t[1]),t)})}function Om(e,t){const n={},r=(e,r)=>{const a=function(e,t){return function(e){return e.property in Nm}(e)?function(e,t,n){const r=n?.transforms?.[e]??Nm[e];return Vp(t,e=>{if(void 0!==e)return Ae(e)?Bm(e.map(e=>r?.(e))):r?.(e)})}(e.property,e.value,t):function(e){return e.property in Tm}(e)?function(e,t,n){const r=Tm[e],a=t=>{const a=n?.transforms?.[e]?.(t);return r[a??t]};return Vp(t,e=>Ae(e)?Bm(e.map(a)):a(e))}(e.property,e.value,t):void 0}({property:e,value:r},t),i=function(e,t){const n=Ce(e);if(!n||0===n.length)return{[e]:t};if(lc(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]=Ie(r)?r[t]:r;r[a]=i}return r}const r=Ie(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=zm(o);if(void 0===e)continue;const r=n[t];if(lc(e)&&void 0!==r){const a=lc(r)?r:{base:r};n[t]={...a,...e}}else n[t]=e}};for(const a of xe)a in e&&r(a,e[a]);for(const[a,i]of Object.entries(e))xe.includes(a)||r(a,i);return n}function zm(e){if(!lc(e))return e;const t=Object.entries(e).filter(([,e])=>void 0!==e&&""!==e);return t.length>0?Object.fromEntries(t):void 0}function Bm(e){if(!Array.isArray(e)||2!==e.length)return e;const[t,n]=e;return[t,n,t,n]}function Vm(e,t){const n={};for(const r of Object.keys(e))r in t||(n[r]=e[r]);return n}const Fm=Object.keys(te).filter(e=>"base"!==e),Um=new Set([">",">="]),qm=new Set(["<","<="]);function jm(e){return"inline-size"===e}function Hm(e){if("invalid"===e.state)return e;function t(e){return!!jm(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=Um.has(t.operator),o=Um.has(n.operator),s=qm.has(t.operator),l=qm.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=Um.has(t.operator),a=Um.has(n.operator),i=qm.has(t.operator),o=qm.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!!Um.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)||!Um.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 $m(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&&!(!jm(o=e.property)&&(console.warn(`Media queries should be based on 'inline-size'. Use 'inline-size' instead of '${o}'.`),1)||(i=e.value,!Fm.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 '${Fm.join("', '")}' instead.`):console.warn(`Media queries should use valid breakpoints${n}. Found '${i}'. Use one of '${Fm.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 Ym=Zc("ContainerQueryStyle");function Wm({cssClassNameSelector:e,property:t,value:n,config:r}){const{className:a,style:i}=Mm({[t]:n},r);if(!a)return null;const o=function(e){if(Gm.has(e))return Gm.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 Gm.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=Jm(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 Gm=new Map;function Jm(e,t){return e.replace(/var\(--[^)]+\)/g,e=>{const n=e.match(/var\(([^)]+)\)/)?.[1];return n&&t[n]?t[n]:e})}function Km(e){if("compound-condition"===e.type){const t=Km(e.left),n=Km(e.right);return`${t} ${e.operator} ${n}`}return`(${e.property} ${e.operator} ${e.value})`}function Qm(e,t){const{containerQueryProps:n,mediaQueryProps:a,literalProps:i}=r(()=>{const t={},n={},r={};for(const[i,o]of Object.entries(e||{}))null!=o&&(Dp(o)?t[i]=o:Op(o)?n[i]=o:r[i]=o);const a=new Set(Object.keys(n).flatMap(e=>Ce(e)??[e]));for(let e=a.size>0;e;){e=!1;for(const[t,i]of Object.entries(r)){if(Te(i))continue;const o=Ce(t);if(o?.length&&Xm(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=eu(void 0,Ym),{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(!Dp(l))continue;const e=Hm(Mp(l));if("invalid"===e.state)continue;r[s]=e.fallbackValue;const i=e.conditionalValues.map(r=>{const a=Wm({cssClassNameSelector:n,property:s,value:r.value,config:t});return a?`${e.responsiveType}${"@container"===e.responsiveType&&e.name?` ${e.name} `:""}${Km(r.condition)}{${a}}`:""}
2).filter(Boolean).join("");a.push({property:s,cssString:i})}const{className:i,style:o}=Mm(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(!Op(r)){n[t]=r;continue}const e=$m(Mp(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 Mm(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?Mm(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(xe.includes(c)){const e=Ce(c)??[];if(e.length>0&&Xm(e[0],u))continue;for(const t of e)r.add(t)}else{if(Xm(c,u))continue;r.add(c)}for(const[c,u]of Object.entries(t))if(xe.includes(c)){const e=Ce(c)??[];if(e.length>0&&Xm(e[0],u))continue;for(const t of e)a.add(t)}else{if(Xm(c,u))continue;a.add(c)}for(const[c,u]of Object.entries(n))if(xe.includes(c)){const e=Ce(c)??[];if(e.length>0&&Xm(e[0],u))continue;for(const t of e)i.add(t),o.add(t)}else{if(Xm(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=>Te(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 Xm(e,t){const n=Cm[e];return void 0!==n&&t===n}const Zm=wm(Sm(Jp(_(function({ariaBusy:e,ariaHidden:t,ariaLabel:n,ariaLive:r,children:a,className:i,commandFor:o,command:s,href:l,id:c,lang:u,onClick:p,onFocus:m,onMouseEnter:h,target:g,...f},y){const v=rd().linkComponent,_=Nd(),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=Vu(),C=Wp(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":Ru({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 eh(){const e=h(Le);if(null==e)throw new ye("No theme found in context");return e}function th(){const e=eh();if("undefined"==typeof window)return e.configuration;const t=a();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 nh(e){const t=_(function({disableGlobalBranding:t,...n},r){const{global:{cornerRadius:a}}=th(),i=Ne(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 rh=jd(nh(wm(Sm(Jp(_(function({accessibilityLabel:e,accessibilityVisibility:t="visible",background:n="transparent",blockSize:r="auto",border:a="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:N,onPointerEnter:R,onPointerLeave:M,onPointerUp:D,overflow:O="visible",padding:z="none",paddingBlock:B,paddingInline:V,paddingBlockEnd:F,paddingBlockStart:U,paddingInlineEnd:q,paddingInlineStart:j,target:H="auto",type:$="button",...Y},W){i(()=>{null!=_&&null==h&&console.warn('When <Clickable /> has an "expanded" prop, it should also have "controlId" defined')},[h,_]);const G=Nd(),J=Vu(),{className:K,style:Q,styleElement:X}=Qm({backgroundColor:n,blockSize:r,...Re({border:a,borderStyle:s,borderWidth:l}),borderRadius:o,display:f,inlineSize:k,maxBlockSize:C,maxInlineSize:E,minInlineSize:I,minBlockSize:x,padding:z,paddingBlock:B,paddingBlockEnd:F,paddingBlockStart:U,paddingInline:V,paddingInlineEnd:q,paddingInlineStart:j},{transforms:{display:Cd}}
2),Z=v("_1s82kpb1 _1s82kpb0 _1fragemyd _1fragemws _1fragem126 _1fragemyk _1fragem12b _1fragemxw","exclusive"===t&&"_1s82kpb5 _1fragem121",K,"hidden"===O&&"_1s82kpb4 _1s82kpb3 _1fragemup _1fragemv4",G&&"_1s82kpb2 _1fragemz0",u),ee=Td(),te=qp(W),ne=Wp(J,{onClick:()=>{T?.()},onBlur:()=>{A?.()},onFocus:()=>{L?.()},onMouseEnter:()=>{R?.()},onMouseLeave:()=>{M?.()},onMouseDown:e=>{N&&0===e.button&&N?.()},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,...$p(J,{"aria-controls":h,"aria-expanded":_}),...ne,...Y};return d(y,{children:[X,d(Rd.Provider,{value:!0,children:b&&void 0===m?d(Zm,{...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})})]})})))))),ah="generic",ih=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 oh(e,{defaultRole:t=ah,defaultElement:n="div"}={}){const r=ih.get(e??t)??ih.get(t)??ih.get(ah);return{Element:r.element??n,role:r.role}}const sh=Hd(nh(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:N="0",overflow:R="visible",padding:M="none",paddingBlock:D,paddingBlockEnd:O,paddingBlockStart:z,paddingInline:B,paddingInlineEnd:V,paddingInlineStart:F,placeContent:U="normal normal",placeItems:q="normal normal",rowGap:j,...H}){const $=Md(),{Element:Y,role:W}=oh(t,{defaultElement:$?"span":"div"}),{className:G,style:J,styleElement:K}=Qm({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:N,padding:M,paddingBlock:D,paddingBlockEnd:O,paddingBlockStart:z,paddingInline:B,paddingInlineEnd:V,paddingInlineStart:F,rowGap:j},{transforms:{blockSize:yd,display:Id}});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"===R&&"_1mrl40q1 _1fragemup _1fragemv4",G),id:C,role:W,style:J,...H,children:h})]})})),lh=["alertCircle","alertTriangle","alertTriangleFilled","arrowDown","arrowLeft","arrowRight","arrowUp","arrowUpRight","bag","bullet","calendar","camera","caretDown","cart","cashDollar","categories","check","checkCircle","checkCircleFilled","chevronDown","chevronLeft","chevronRight","chevronUp","circle","clipboard","clock","creditCard","delete","delivered","delivery","disabled","discount","edit","email","empty","external","filter","geolocation","giftCard","globe","grid","image","info","infoFilled","listBulleted","location","lock","map","menu","menuHorizontal","menuVertical","minus","mobile","note","order","organization","packageDelivery","plus","profile","questionCircle","questionCircleFilled","reorder","reset","return","savings","search","settings","star","starFilled","starHalf","store","truck","upload","x","xCircle","xCircleFilled"];var ch=1,uh={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:"a8x1wu
2i"},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 dh=["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"],ph=["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 mh({interestFor:e,...t}){return e?d(gh,{...t,interestFor:e}):d(hh,{...t})}function hh({accessibilityLabel:e,...t}){const{className:n,children:r}=fh(t);return d("span",{role:e?"img":void 0,"aria-label":e,className:n,id:t.id,children:r})}const gh=wm(_(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}=fh(l);return d("span",{role:"img",tabIndex:t?0:void 0,id:n,ref:c,className:v(uh.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 fh({type:e,tone:t="auto",color:n="base",size:r="base",display:a="block",className:i}){const{icons:o}=th(),s=rd().inlineIcons??!1;let l;e?l=e:(""===e||console.warn(`"${e}" is not a valid <Icon /> type`),l="empty");const c=dh.includes(l),u=ph.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(uh.Icon,uh.toneVariant[t],("auto"===t||"neutral"===t)&&uh.colorVariant[n],uh.displayVariant[a],uh.sizeVariant[p],c&&uh.mirrored,uh.fillVariant[u],i);let h=function(e){const t=Se(e);return t in yh?yh[t]:lh.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(wu,{iconUrl:f,fallback:y,allowRelativeUrl:null==g}):y}}const yh={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 vh({message:e,dismiss:t}){const n=id();return i(()=>Zu({content:e}),[e]),i(()=>{const e=setTimeout(t,5300);return()=>clearTimeout(e)},[t]),d("span",{className:"jmb5zc4 jmb5zc3 _1fragempk _1fragemnr _1fragemtb _1fragemri _1fragemy5 _1fragem120",children:d(sh,{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(rh,{onClick:t,accessibilityLabel:n("closeNotification"),children:d(mh,{type:"x",size:"small",tone:"monochrome"})})]})})}const _h=f(null);function bh({children:e,handleToast:t}){const[i,o]=s([]),l=a(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(_h.Provider,{value:p,children:[e,i.length>0?d(uu,{children:d(Ph,{children:i.map(({id:e,content:t})=>d(vh,{message:t,dismiss:()=>c(e)},e))})}):null]})}function Ph({children:e}){const t=Xc(),n=a(null),r=a(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 kh(){const e=h(_h),{setMessages:t,removeMessage:r,createMessageId:a,handleToast:i}=e??{};return n(e=>{if(!t||!r||!a)throw new ye("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 Sh(e,t){if(!e)throw new TypeError(t)}function wh(e){return r(()=>Me(e),[])}function Ch(e,t){const n=a(t);n.current=t;const r=a();r.current||(r.current=e.listen(n.current)),i(()=>()=>r.current?.(),[e,n])}const Eh="·",xh=150,Ih="ASAP",Ah=ne("ShippingMethodsContext");function Th(){const e=h(Ah);if(null!=e)return e}function Lh(){const{observability:e}=ae();return n((t,n)=>{e.histogram({name:"checkout_delivery_promise_request_duration_ms",value:t,attributes:{apiClientId:n.toString()}})},[e])}const Nh=()=>Oe((e,t)=>{switch(e){case"ignored":if("timeout"===t)return"idle";break;case"idle":if("countryChange"===t)return"debounced";if("otherAddressFieldChange"===t)return"ignored";break;case"debounced":switch(t){case"countryChange":return"debounced";case"otherAddressFieldChange":return"ignored";case"timeout":return"idle"}}},"idle"),Rh=["streetName","streetNumber","neighborhood","line2"];function Mh(e,t){const n=r(Nh,[e]),a=n.value;Ch(n,({previousState:e,action:n})=>{"debounced"===e&&"timeout"===n&&t()}),i(()=>{let t=!1;return e.fields.countryCode.subscribe(()=>{t&&(n.value="countryChange"),t=!0})},[e.fields.countryCode,n]),i(()=>
2{if("debounced"===a||"ignored"===a){const e=setTimeout(()=>{n.value="timeout"},100);return()=>{clearTimeout(e)}}},[n,a]),i(()=>{let t=!1;const r=Object.keys(e.fields).filter(e=>!["countryCode",...Rh].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 Dh(){const{shop:{shippingRatesReloadStrategy:e}}=ae();return n(({countryCode:t,zoneCode:n})=>{try{Sh("string"==typeof t,"Expected a country code");const r=e.get(t);switch(Sh(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:De.Anything}},[e])}function Oh(){const{i18n:e}=ae(),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 zh({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=Be(n,r);return{...e,[s]:i}},{})}function Bh(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&&se(n)!==a)});i&&(i.value={...i.value,deliveryMethodHandle:t})}):n.forEach(e=>{e.value={...e.value,deliveryMethodHandle:void 0}})}function Vh(e,t,n){const{parts:r}=ie(),a=r.deliveryLines.value;function i(e){return!n||e.deliveryMethodTypes.includes(n)}return a.find(n=>{const r=n.peek(),a=r.deliveryMethodTypes.length>0;return r.type===e&&a&&(!t||r.id===t)&&i(r)})||a.find(e=>i(e.peek()))}function Fh(e){const t=Vh(e);return Boolean(t?.fields)}function Uh(e,t){const r=Vh(e,t);return[r?.fields.deliveryMethodTypes.value||[],n(e=>{r&&(r.value={...r.value,deliveryMethodTypes:e})},[r])]}function qh({type:e="ONE_TIME_PURCHASE",id:t,deliveryMethodType:r}){const a=Vh(e,t,r);return[a?.fields.deliveryMethodHandle.value||void 0,n(e=>{a&&(a.value={...a.value,deliveryMethodHandle:e})},[a])]}function jh(e,t){const n=Vh(e,t);return r(()=>n?.fields.deliveryMethodOptions.value.phone||S(void 0),[n])}function Hh(e,t){const n=Vh(e,t);return r(()=>n?.fields.deliveryMethodOptions.value.instructions||S(void 0),[n])}function $h(e,r){const a="ONE_TIME_PURCHASE"===r?"SUBSCRIPTION":"ONE_TIME_PURCHASE",i=ge().deliveryNext,o=e=>je(i.value).filter(He).find(t=>t.type===e),{deliveryLines:s}=qe(),l=t(()=>zh({proposedDeliveryLines:s})),c=n(e=>{Bh(s,{[a]:e})},[s,a]);return{inverseGroupType:a,inverseGroupDeliveryMethodHandle:l.value,setInverseGroupDeliveryMethodHandle:c,getInverseGroupDeliveryMethodHandle:t=>{const n=e.find(e=>e.handle===t);if(!n)return;if("PICK_UP"===n.methodType){const e=o(a),t=e?.methods.find(e=>"PICK_UP"===e.methodType&&n.title===e.title);return t?.handle}const r=((e,t)=>{const n=o(e),r=n?.methods.find(e=>e.methodType===t);if(r)return r})(a,n.methodType);return r?.handle}}}function Yh(){const{parts:e}=ie();return[ze(e.deliveryLines.peek()),n(t=>{e.deliveryLines.value.forEach(e=>{e.value={...e.value,deliveryMethodTypes:t}})},[e.deliveryLines])]}function Wh(){const{parts:e}=ie(),{negotiate:t}=mc(),{i18n:r}=ae(),a=kh(),i=Ve(),o=Th();return n(({targetDeliveryMethodType:n,merchandiseStableIds:s})=>{const{orphanedMovedToShipping:l,orphanedRemovedFromCartStableIds:c}=Fe({deliveryLines:e.deliveryLines,merchandiseLines:e.merchandiseLines,targetDeliveryMethodType:n,merchandiseStableIds:s,sellableDeliveryMethodsByStableId:i.value.deliveryMethodsByMerchandise,discountLines:e.discountLines});c.length>0?a(r.translate("stock.removed_from_cart_notice")):l&&a(r.translate("split_delivery.items_moved_to_shipping_toast")),o?.dispatch?.("deliveryMethodChanged"),t({legacyFiltering:{include:["deliveryNext","merchandiseLines"]},silenceViolations:Ue(["deliveryNext","merchandiseLines"])})},[e.deliveryLines,e.merchandiseLines,i,e.discountLines,o,t,a,r])}function Gh(){const{deliveryLines:e,deliveryMacros:t}=qe(),{negotiate:a}=mc(),i=zh({proposedDeliveryLines:e,onlyShippingOneTimePurchase:!0}),o=r(()=>{if(t.value?.length)return $e(t.value,i)},[t.value,i]),s=n(async n=>{if(!n||n===o?.id)return;const r=t.value.find(({id:e})=>e===n);return r?(Bh(e,r.deliveryMethodHandles),a({legacyFiltering:{include:["contactInfo","shippingAddress","merchandiseLines","deliveryNext"]},silenceViolations:Ue(["deliveryNext"])})):void 0},[e,t,o,a]);return{selectedMacro:o,setSelectedMacro:s}}function Jh(){const{checkout:{identity:e},shopPay:{config:{tracking:t}}}=ae(),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])}
2const Kh=ne("CheckoutSheetProtocolContext"),Qh=ne("MobileCheckoutSdkContext");function Xh(){const e=h(Kh),t=h(Qh);return null!=e?e:null!=t?t:null}function Zh(e){const t=Xh();return function(e,t){return null==e||"MERCHANT"===e&&"checkout_started"===t}(t?.config?.type,e)}function eg(){const{checkout:e,shop:t}=ae();return e.configuration.isUniversalCheckoutFinalizer||t.hasFlagEnabled(Ye)}function tg(){const{checkout:e,shop:t}=ae();return eg()&&(e.configuration.isUniversalCheckoutFinalizer||t.hasFlagEnabled(We))}class ng extends gl{constructor(){super(...arguments),this.name="WebPixelsManagerError"}}class rg extends Error{constructor(){super(...arguments),this.name="WebPixelsManagerCheckoutNativeSdkEnabledError"}}let ag=null;const ig=ne("webPixels");function og({children:e}){const{client:t,embed:n,environment:{services:r},checkout:{identity:l,thankYouEntrance:c},observability:u,shop:p,mobileCheckoutSdk:m,source:h,router:g}=ae(),f="shopPay"===l.current.value,y=p.hasFlagEnabled(Ge),v=function(){const e=he(),{shop:t,source:n}=ae();return o(()=>{const r=e.current.fields.buyerIdentity.value;return{cart:Ic({negotiated:e,shop:t,source:n}),customer:xc(r),shop:Ac({shop:t}),purchasingCompany:Tc(r)}})}(),_=Xh(),b=_?.config?.pixelEventsMode,P=n?.configuration?.pixelMode,k=Boolean(n?.isCheckoutKit({includeLegacyCsk:!1})),S="DISABLED"===b||"DISABLED"===P,{checkoutProtocolPresentedSignal:w}=Je(),C=w.value,E=k&&!0===n?.isPreload&&!C,x=tg()&&"settled"!==c.phase.value&&(g.currentUrlMatches("/thank-you")||g.currentUrlMatches("/processing")&&null!=c.progress&&"cancelled"!==c.progress.phase.value),I=r.webPixelsManager.url;r.webPixelsManager.type;const A=r.webPixelsManagerExtensions.url,T=a(),L=a(),N=a(!1),[R]=s(()=>{const e=new Promise((e,t)=>{T.current=e,L.current=t});return e.catch(()=>{}),e}),M={[at]:p.hasFlagEnabled(at),[rt]:p.hasFlagEnabled(rt),[nt]:p.hasFlagEnabled(nt),[tt]:p.hasFlagEnabled(tt),[et]:p.hasFlagEnabled(et),[Ze]:p.hasFlagEnabled(Ze),[Xe]:p.hasFlagEnabled(Xe),[Qe]:p.hasFlagEnabled(Qe),[Ke]:p.hasFlagEnabled(Ke)},D=Object.entries(M).filter(([e,t])=>t).map(([e])=>e),[O]=s({async publish(e,t,n){try{return(await R).publish(e,t,n)}catch{return!1}},async publishCustomEvent(e,t,n){try{return(await R).publishCustomEvent(e,t,n)}catch{return!1}},async publishDomEvent(e,t,n){try{return(await R).publishDomEvent(e,t,n),{type:"success"}}catch(r){return{type:"error",message:r.message}}},async subscribe(e,t,n){try{return(await R).subscribe(e,t,n)}catch{return()=>!1}},async visitor(e,t){try{return(await R).visitor(e,t),{type:"success"}}catch(n){return{type:"error",message:n.message}}}});return i(()=>{const e=e=>{u.log("web_pixel_manager_init",`WebPixelsProvider init: ${e}`,{outcome:e,shopAppDomain:f},{exportImmediately:"loading"!==e})};if(null===p.webPixelConfigurations)return e("web_pixel_configurations_null");if(!p.storefrontUrl)return e("storefront_url_missing");const r=Boolean(it(navigator.userAgent));if(r&&!y)return e("shop_mobile_app_context");const a=f||r;if("disabled"===p.webPixelManagerVersion)return e("wpm_version_disabled");const i=a?[]:p.webPixelConfigurations;if(S)return L.current?.(new rg("Checkout SDK enabled for partner with pixels suppressed")),void e("pixels_suppressed_by_config");if(E||N.current)return void(E&&!N.current&&e("deferred_for_preload"));if(x)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=m.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:f,isNativeShopApp:r,isCheckoutKit:k,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(ag)return ag;const h=parseInt(se(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")),ag=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 ng("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 ng(`Failed to load WebPixelManager runtime from ${y}`))},document.querySelector(`script[src="${_.src}"]`))r(new ng("WebPixelsProvider::WebPixelsManagerError::ScriptAlreadyPresent",{groupingHash:"WebPixelsProvider::WebPixelsManagerError::ScriptAlreadyPresent"}));else try{document.body.appendChild(_)}catch{throw new ng("WebPixelsProvider::WebPixelsManagerError::ScriptAppendError",{groupingHash:"WebPixelsProvider::WebPixelsManagerError::ScriptAppendError"})}}),ag}({storefrontBaseUrl:p.storefrontUrl,shopId:p.id,webPixelConfigurations:i,webPixelManagerVersion:p.webPixelManagerVersion,initData:v,enabledBetaFlags:D,surface:l,sriMap:p.webPixelsManagerSriMap,managerBaseUrl:I,extensionsUrl:A,apiClientId:t.unstable_getSerialization("apiClientId")??void 0,checkoutToken:wc(h)||h.sourceId,facebookCapiEnabled:p.facebookCapiEnabled??!1});let n=!0;e.then(e=>{if(!T.current)throw L.current?.(),new ng("WebPixelsManager: webPixelsPromiseResolveRef.current is undefined");T.current(e)}).catch(e=>{n=!1,u.log("web_pixels_context_manager_load_error_triggered",`WebPixelsProvider::WebPixelsManagerError::LoadError with error: ${e?.message}`)}).finally(()=>{u.counter({name:"web_pixel_manager_load",value:1,attributes:{status:n?"success":"failed",surface:l}})})}catch(c){L.current?.(c),u.counter({name:"web_pixel_manager_load",value:1,attributes:{status:"failed",surface:l}})}},[E,x]),d(ig.Provider,{value:O,children:e})}function sg(){return re(ig)}const lg=new Map([[6167201,"hydrogen"],[12875497473,"headless"],[88312,"buy_button"],[1354745,"draft_order"]]);function cg(e,t,n){const r=new Set([129785,6517121,757165]),a=new Set([3890849,3850711,5198245]);return lg.has(e)?lg.get(e):r.has(e)?"retail":a.has(e)?"shop_app":t===ot.CartPermalink?"permalink":580111===e?"online_store":n}function ug(){const e=window,t=e?.ShopifyAnalytics?.lib;return t?.trekkie?.defaultAttributes}function dg({eventName:e,checkoutType:t,walletName:r,progressionStepName:a,redirectSource:i,trackingUnique:o,trackingVisit:s}){const{client:l,checkout:c,consentManager:u,i18n:d,observability:p,userEvents:m,shop:h,source:g}=ae(),{id:f}=h,y=ge().buyerIdentity.value?.customerProfile,v=Zh(e),_=Xh(),b=_?.config?.type,P=parseInt(se(f),10),k=l.unstable_getSerialization("apiClientId")??0,S=o??(l.cookies.get("_shopify_y")||void 0),w=s??(l.cookies.get("_shopify_s")||void 0);return n(()=>{const n=u.analyticsProcessingAllowed.value,o=u.marketingAllowed.value,s=Boolean(n||o),l={eventName:e,buyerConsentAnalyticsAllowed:n,buyerConsentMarketingAllowed:o,progressionStepName:a,userToken:S,walletName:r};if(!("checkout_started"===e&&"ShopifyPay"===r||s)||!v)return p.counter({name:"checkout_lifecycle_events_blocked_by_privacy",value:1,attributes:{eventName:e,application:"checkout-web"}}),void p.log("checkout_lifecycle_events_not_emitting_event","checkout_lifecycle_events.not_emitting_event",{logPayload:l});const h="contact_information"===a?1:void 0,f=pg(g.type),_=f?g.sourceId:void 0,C=c.configuration.profileId.value,E=function({eventName:e,walletName:t,shopId:n,checkoutSessionIdentifier:r="default",checkoutProfileId:a,trackingVisitToken:i,userToken:o,sourceId:s,sourceType:l,customerId:c,apiClientId:u=0,checkoutType:d,currency:p,locale:m,progressionStepName:h,progressionStepNumber:g,redirectSource:f,checkoutProtocolType:y,consentManager:v}){const _=ug(),b="MERCHANT"===y?{apiName:"mobile_checkout_sdk_merchant",checkoutType:cg(u,f,"api")}:{};return{schemaId:"checkout_lifecycle_events/7.7",payload:{checkoutChainToken:r||"default",checkoutProfileId:a,eventName:e,checkoutType:cg(u,f),checkoutExperience:t?"wallet":"web",entryPoint:"checkout",checkoutPlatform:"checkout_one",checkoutVersion:[d],walletName:t,apiClientId:u||0,currency:p||_?.currency,shopId:n,customerId:c,sourceId:s,sourceType:l,userToken:o||_?.uniqToken,deprecatedVisitToken:i||_?.visitToken,referrer:_?.referer,userAgent:navigator.userAgent,contentLanguage:m,eventTime:(new Date).toISOString(),progressionStepName:h,progressionStepNumber:g,buyerConsentAnalyticsAllowed:v.analyticsProcessingAllowed.value,buyerConsentSaleOfDataAllowed:v.saleOfDataAllowed.value,buyerConsentMarketingAllowed:v.marketingAllowed.value,...b}}}({eventName:e,walletName:r,shopId:P,checkoutSessionIdentifier:g.checkoutSessionIdentifier,checkoutProfileId:C?parseInt(se(C),10):void 0,trackingVisitToken:w,userToken:S,sourceId:_,sourceType:f,customerId:y?.id?parseInt(se(y.id),10):void 0,apiClientId:k,checkoutType:t,currency:d.currency,locale:d.locale,progressionStepName:a,progressionStepNumber:h,redirectSource:i,checkoutProtocolType:b,consentManager:u}),x=E.payload.entryPoint;p.log("checkout_lifecycle_events_emitting_event","checkout_lifecycle_events.emitting_event",{...l,progressionStepNumber:h,"context.sourceType":g.type,"context.sourceId":g.sourceId,checkoutType:t,entryPoint:x}),m.monorailEvent(E),p.counter({name:"checkout_lifecycle_events_emitted",value:1,attributes:{application:"checkout-web",eventName:e,checkoutType:g.type,isWallet:r?"true":"false",...r?{walletName:r}:{}}})},[e,a,S,r,P,g,c.configuration.profileId,w,y?.id,k,t,d,i,p,m,v,b,u])}function pg(e){const t={orderEdit:"order",paymentCollection:"paymentCollection",cartNext:"cart",checkout:"checkout",abandonedCart:"abandoned_cart",simulated:"simulated",draftOrder:"draft_order",buyItNow:void 0,shopPayExternal:void 0,other:void 0};return Object.keys(t).includes(e)?t[e]:void 0}function mg(e){return dg({eventName:"checkout_progression",checkoutType:ae().checkout.configuration.layout.isOnePage.value?"one_page":"three_page",walletName:e,progressionStepName:"contact_information"})}function hg(e,t,n,r){return dg({eventName:"checkout_started",checkoutType:ae().checkout.configuration.layout.isOnePage.value?"one_page":"three_page",walletName:e,redirectSource:t,trackingUnique:n,trackingVisit:r})}var gg=(e=>(e.Lifecycle="checkout_lifecycle_events/7.7",e))(gg||{});class fg{constructor({observability:e,userEvents:t,shopPay:n,isShopPayActive:r,router:a,consentManager:i,shouldEmitEvent:o=!0,context:s,target:l}){this.acceptableEventType=new Set(["pageViewed","sectionComplete","shippingMethodsFilled","sectionInteraction","dom_clicked"]),this.#l=!0,this.#c=e,this.#u=t,this.#d=n,this.#p=r,this.#m=a,this.#h=i,this.#l=o,this.#g=s,this.#f=l}#c;#u;#d;#p;#m;#h;#l;#g;#f;willAccept(e){return this.acceptableEventType.has(e.type)}transmit(e){if(!this.#l||!this.#y(e))return this.#c.counter({name:"checkout_lifecycle_events_blocked_by_privacy",value:1,attributes:{eventName:"checkout_progression",application:"checkout-web"}}),void this.#v(!1);const t=this.#_(e);t&&void 0!==t.progressionStepName&&void 0!==t.progressionStepNumber&&(this.#v(!0,t),this.#u.monorailEvent({schemaId:gg.Lifecycle,payload:t}),this.#c.counter({name:"checkout_lifecycle_events_emitted",value:1,attributes:{application:"checkout-web",eventName:"checkout_progression",checkoutType:t.checkoutType,isWallet:t.walletName?"true":"false",...t.walletName?{walletName:t.walletName}:{}}}))}transmitImmediately(e){if(!this.#l||!this.#y(e))return this.#c.counter({name:"checkout_lifecycle_events_blocked_by_privacy",value:1,attributes:{eventName:"checkout_progression",application:"checkout-web"}}),void this.#v(!1);const t=this.#_(e);t&&void 0!==t.progressionStepName&&void 0!==t.progressionStepNumber&&(this.#v(!0,t),this.#u.monorailEvent({schemaId:gg.Lifecycle,payload:t},{exportImmediately:!0}),this.#c.counter({name:"checkout_lifecycle_events_emitted",value:1,attributes:{application:"checkout-web",eventName:"checkout_progression",checkoutType:t.checkoutType,isWallet:t.walletName?"true":"false",...t.walletName?{walletName:t.walletName}:{}}}))}#_(e){const{context:t,type:n}=e;this.#g=t,this.#f=st(this.#b(t),{isShopPayActive:this.#p,shopPay:this.#d});const r=this.#P(e.timestamp);if(!r)return null;if(this.#k()){if("pageViewed"===n){if(this.#S()){const[e,t]=this.#w("contact");return{...r,progressionStepName:e,progressionStepNumber:t}}if(this.#C()){const[e,t]=this.#w("review");return{...r,progressionStepName:e,progressionStepNumber:t}}}if("shippingMethodsFilled"===n){const[e,t]=this.#w("shipping");return{...r,progressionStepName:e,progressionStepNumber:t,...this.#E()}}if("sectionInteraction"===n&&"payment"===e.section){const[e,t]=this.#w("payment");return{...r,progressionStepName:e,progressionStepNumber:t}}
2if("dom_clicked"===n){if("summary_pay_button"===e.element.id){if(this.#g.reviewPageRequired){const[e,t]=this.#w("review_order_clicked");return{...r,progressionStepName:e,progressionStepNumber:t}}{const[e,t]=this.#w("pay_now_clicked");return{...r,progressionStepName:e,progressionStepNumber:t}}}if("review_pay_button"===e.element.id){const[e,t]=this.#w("pay_now_clicked");return{...r,progressionStepName:e,progressionStepNumber:t}}}}if(this.#x()){if("pageViewed"===n&&this.#I()){const[e,t]=this.#w(this.#g.step);return{...r,progressionStepName:e,progressionStepNumber:t,..."shipping"===e?this.#E():{}}}if("dom_clicked"===n){if("payment_go_to_next_step"===e.element.id){const[e,t]=this.#w(this.#g.reviewPageRequired?"review_order_clicked":"pay_now_clicked");return{...r,progressionStepName:e,progressionStepNumber:t}}if("review_go_to_next_step"===e.element.id){const[e,t]=this.#w("pay_now_clicked");return{...r,progressionStepName:e,progressionStepNumber:t}}}}return null}#b(e){const t=this.#m.currentUrl.value;return e.pathname?new URL(e.pathname,t):t}#P(e){if(!this.#g)return null;const t=pg(this.#g.sourceType),n=t?this.#g.sourceId:void 0;return{userToken:this.#g.userToken,apiClientId:this.#g.apiClientId,sourceId:n,sourceType:t,currency:this.#g.currency,shopId:parseInt(se(this.#g.shopId),10),checkoutChainToken:this.#g.checkoutToken,checkoutProfileId:this.#g.checkoutProfileId,checkoutExperience:"web",checkoutPlatform:"checkout_one",eventName:"checkout_progression",deprecatedVisitToken:this.#g.trackingVisit,requestId:this.#g.requestId,checkoutVersion:[this.#k()?"one_page":"three_page",this.#g.workerVersion,this.#g.serverHandling],checkoutType:cg(this.#g.apiClientId),entryPoint:void 0,eventTime:e.toISOString(),buyerConsentAnalyticsAllowed:this.#A(),buyerConsentSaleOfDataAllowed:this.#T(),buyerConsentMarketingAllowed:this.#L()}}#y(e){const t=e.context.consent;return t?(n=t,Boolean(n.analyticsProcessingAllowed||n.marketingAllowed)):Boolean(this.#A()||this.#L());var n}#A(){return this.#h.analyticsProcessingAllowed.value}#T(){return this.#h.saleOfDataAllowed.value}#L(){return this.#h.marketingAllowed.value}#w(e){const{shippingRequired:t,reviewPageRequired:n}=this.#g||{};let r=2;t&&(r=3);let a=r+1;n&&(a=r+3);const i=r+1;switch(e){case"information":case"contact":case"deliveryAddress":return["contact_information",1];case"shipping":case"delivery":return["shipping",2];case"payment":return["payment",r];case"pay_now_clicked":return["pay_now_clicked",a];case"review_order_clicked":return["review_order_clicked",i];case"review":return["review",t?5:4];default:return[void 0,void 0]}}#k(){return"c1_redesign"===this.#g?.sourceDesign}#x(){return"c1_legacy"===this.#g?.sourceDesign}#C(){return this.#f&&/review/.test(this.#f)}#I(){return["information","shipping","payment","review"].some(e=>this.#f&&new RegExp(e).test(this.#f))}#S(){return this.#f&&/information/.test(this.#f)}#E(){return this.#g?{shippingMacroCostLocal:String(this.#g.selectedDeliveryMacro?.cost?.amount),shippingMacroList:this.#g.deliveryMacros?.map(({id:e})=>e),numDeliveryLines:[this.#g.deliveryLines?.filter(({type:e})=>"ONE_TIME_PURCHASE"===e).length||0,this.#g.deliveryLines?.filter(({type:e})=>"SUBSCRIPTION"===e).length||0],shippingMacroSelected:this.#g?.selectedDeliveryMacro?.id}:{}}#v(e,t){const n={buyerConsentAnalyticsAllowed:this.#A(),buyerConsentMarketingAllowed:this.#L()};e&&t?this.#c.log("buyer_progression_events_adapter_event_transmitted","Emitting checkout lifecycle event",{...n,progressionStepName:t.progressionStepName,progressionStepNumber:t.progressionStepNumber,userToken:t.userToken,"context.sourceType":this.#g?.sourceType,"context.sourceId":this.#g?.sourceId,"context.apiClientId":this.#g?.apiClientId}):this.#c.log("buyer_progression_events_adapter_event_not_transmitted","Not emitting checkout lifecycle event",n)}}class yg extends Error{constructor(e){super(`Unknown event type: ${e}`),this.name="UnknownEventTypeError"}}function vg(e){return{shopId:se(e.shopId),checkoutToken:e.checkoutSessionIdentifier?se(e.checkoutSessionIdentifier):void 0,customerId:e.customerId?se(e.customerId):void 0}}function _g(e,t){try{switch(e.eventTypeName){case"shopify.apps.app_runtime.AppRuntimeClientEvent":return function(e,t){switch(e.type){case"UI_EXTENSION_ERROR":return function(e,t){const n=lt(e.extensionTarget);return{event:{eventTypeName:e.eventTypeName,type:e.type,apiVersion:e.apiVersion,appId:se(e.appId),appApiKey:e.appApiKey,appVersion:e.appVersion,code:e.code,errorName:e.errorName,extensionId:e.extensionId?se(e.extensionId):void 0,registrationId:e.registrationId,message:e.message,schemaVersion:e.schemaVersion,extensionTarget:n,placementReference:e.placementReference,context:e.context},context:vg(t),__brand:"PreparedEventRefineryPayload"}}(e,t);case"UI_EXTENSION_MOUNT_START":case"UI_EXTENSION_MOUNT_END":return function(e,t){const n=lt(e.extensionTarget);
2return{event:{...e,appId:se(e.appId),extensionId:e.extensionId?se(e.extensionId):void 0,extensionTarget:n},context:vg(t),__brand:"PreparedEventRefineryPayload"}}(e,t);case"UI_EXTENSION_FETCH":return function(e,t){const n=lt(e.extensionTarget);return{event:{eventTypeName:e.eventTypeName,type:e.type,apiVersion:e.apiVersion,appId:se(e.appId),appApiKey:e.appApiKey,appVersion:e.appVersion,extensionId:e.extensionId?se(e.extensionId):void 0,registrationId:e.registrationId,extensionTarget:n,placementReference:e.placementReference,durationMs:e.durationMs,httpStatus:e.httpStatus,httpMethod:e.httpMethod,requestUrl:e.requestUrl,context:e.context},context:vg(t),__brand:"PreparedEventRefineryPayload"}}(e,t);default:throw new yg(e.type)}}(e,t);case"shopify.event.BuyerEvent":return function(e,t){return{event:{eventTypeName:e.eventTypeName,type:e.type,checkoutToken:e.checkoutToken},context:vg(t),__brand:"PreparedEventRefineryPayload"}}(e,t);case"shopify.advertising.incentives.IncentivePresentedEvent":return function(e,t){return{event:e,context:vg(t),__brand:"PreparedEventRefineryPayload"}}(e,t);default:throw new yg(e.eventTypeName)}}catch(n){return{__brand:"PreparedEventRefineryPayload",error:n}}}class bg{constructor(e){this.acceptableEventTypes=new Set(["alertDisplayed","uiExtensionError"]),this.#u=e.userEvents,this.#N=e.source}#u;#N;willAccept(e){return this.acceptableEventTypes.has(e.type)}transmit(e){const{context:t}=e,n=wc(this.#N),r=parseInt(se(t.shopId),10),a={pageUrl:t.href??window.location.href,shopId:r,checkoutToken:n?se(n):"",eventName:e.type,userToken:t.userToken};if("alertDisplayed"===e.type){const{target:t,value:n,errorType:r,message:i}=e;this.#u.monorailEvent({schemaId:"checkout_error_capture/1.0",payload:{...a,errorTarget:t,errorValue:n??void 0,errorType:r,errorMessage:i}})}if("uiExtensionError"===e.type){const{apiVersion:r,appId:i,appName:o,appVersion:s,extensionName:l,placementReference:c,extensionTarget:u,trace:d,code:p,message:m}=e;this.#u.monorailEvent({schemaId:"checkout_error_capture/1.0",payload:{...a,extensionApiVersion:r,extensionAppId:i,extensionAppName:o??"",extensionAppVersion:s,extensionName:l,extensionPlacementReference:c??"",errorTarget:u,errorTrace:d??"",errorType:p,errorMessage:m}}),"local"!==e.extensionType&&this.#u.refineryEvent(_g({...void 0===e.placementReference?{extensionTarget:e.extensionTarget,placementReference:void 0}:{extensionTarget:e.extensionTarget,placementReference:e.placementReference},eventTypeName:"shopify.apps.app_runtime.AppRuntimeClientEvent",type:"UI_EXTENSION_ERROR",apiVersion:e.apiVersion,appId:e.appId,appApiKey:e.appApiKey,appVersion:e.appVersion,code:e.code,errorName:e.errorName,extensionId:e.extensionId,registrationId:e.registrationId,message:e.message,schemaVersion:1,context:e.context},{shopId:t.shopId,checkoutSessionIdentifier:n,customerId:t.customerId}))}}}const Pg="checkout_c1_extension_skeleton_dimensions/3.4";class kg{constructor(e,t,n=!0){this.client=e,this.userEvents=t,this.shouldEmitEvent=n}transmit(e){this.shouldEmitEvent&&"extensionDimension"===e.type&&(this.userEvents.monorailEvent({schemaId:Pg,payload:this.mapEventToMonorailSchema(e)}),this.client.counter({name:"extension_dimension_event",value:1,attributes:{skeleton_size:e.skeletonSize,extension_size:e.extensionSize,skeleton_size_source:e.skeletonSizeSource,skeleton_size_match:e.skeletonSizeMatch,extension_type:e.extension.type}}))}willAccept(e){return"extensionDimension"===e.type}transmitImmediately(e){this.shouldEmitEvent&&"extensionDimension"===e.type&&(this.userEvents.monorailEvent({schemaId:Pg,payload:this.mapEventToMonorailSchema(e)},{exportImmediately:!0}),this.client.counter({name:"extension_dimension_event",value:1,attributes:{skeleton_size:e.skeletonSize,extension_size:e.extensionSize,skeleton_size_source:e.skeletonSizeSource,skeleton_size_match:e.skeletonSizeMatch,extension_type:e.extension.type}}))}mapEventToMonorailSchema(e){const{context:t,extension:n}=e;return{userToken:t.userToken,customerId:t.customerId,shopId:parseInt(se(t.shopId),10),sessionToken:t.sessionToken,checkoutToken:t.checkoutToken,apiClientId:t.apiClientId,deviceType:t.deviceType,locale:t.locale,currency:t.currency,browser:t.browser,browserConnectionType:t.browserConnectionType,extensionInstanceId:e.extensionInstanceId,step:e.page,pageLoadId:t.pageLoadId,extensionId:n.extensionId,extensionApiClientId:n.appId,extensionRegistrationId:n.registrationId,extensionType:n.type,extensionPoint:n.extensionPoint.target,extensionPlacementReference:n.placementReference,extensionWidth:e.width,extensionHeight:e.height,viewportWidth:e.viewportWidth,viewportHe
2ight:e.viewportHeight,extensionPositionX:e.positionX,extensionPositionY:e.positionY,publicIdentifier:e.targetPublicIdentifier||e.publicIdentifier,targetPublicIdentifier:e.targetPublicIdentifier,skeletonHeight:e.skeletonHeight,countryCode:e.countryCode,configurationRecordId:t.checkoutProfileId}}}const Sg=new Set(["941ed414-846b-48da-ba78-f015038d42a1","b837b75c-d827-4a16-9fe6-0b556bbbcfa2","bead5f8a-a991-4378-8ac3-b757353d3423","3caac7fb-9307-42ea-ad62-5bddbc7fb6c9","800c1727-ae5b-4f7d-be6c-502933f9257d","2382db67-d84b-4c12-a2a7-2ae97e93f8aa","22d72ba7-bed0-4301-9eb1-50b47b797d65","9b1870d3-fdc9-4b48-9143-2dc2715e5f48","62ea86bc-927b-492c-a434-af86abdffa37","df2e3eb6-8403-4239-a060-586ad8e84c4c","9ad836e8-e0d7-41c9-b46e-323373cad94f","cd33b11c-1347-4482-9468-35d3c2466ece","a5f4f09b-f177-41c6-b9f2-4c5af0a06756","742df6b1-ec95-47f4-9bab-c39cff66fa64","580e5211-39d7-4f9b-9feb-61966d75d7d6","90d86972-4f99-40aa-a733-81fb169e125a"]),wg=new Set([...Sg,"de6f8c7c-99d4-4ed7-bef3-9bc5485e5afa","81ef0db5-f008-4775-abf0-9eea53e348b9","5a4dcc13-5e28-43d3-8fe0-9047c8b1e9a1","36d82657-0623-44a6-a765-ca8ca2bb1d70","68757a68-0d13-43c7-9d92-389fa35ceae9","fe246ebb-49e3-49f6-bf7b-62a1bfd3fd0c","c2efdc0e-0538-4111-ba60-c300fce86c62","756d9412-1da6-41a5-b317-f590511ead72","cb60c3d0-6406-4e9c-9558-b5088a3f8610","7aaf94fa-1c49-48eb-ad72-32c7d9a3c1da","3f51fa85-5bda-4dbb-bd3a-15711c90bff2","1b8ddc3b-7fb7-46c7-aa56-c5b359d5005c","6cff6580-7b31-4bf4-86de-daea0d733c8d","b6873cb2-1546-469d-921b-f64ecbd95548","4ded2224-9d1e-4861-8c10-bee777c11f7c","d65d9a59-47d0-4bde-a637-4d2df8354d1c","2b415f2a-38a2-4bb1-8df6-509443baef72","1d0d6217-e99f-4c5a-b0c0-f0a0acb29072","f2f6b43a-dc2b-4583-b5df-1023da235bde","7437505c-bad7-4735-977b-c32c56e7a92d","d20aee3b-4068-409d-ad66-88032bd6ee0f","ad9dbcd5-9772-48cc-a914-8a672640661a","86c7aec0-d984-4bdd-b30d-73068c7de1a2","7dd5c930-e1a5-49d7-a9cd-6aa012abd302","d6796644-c5fa-4454-8043-e927276c22f6","3a5daf6a-54b6-40f9-a665-d95de608415b","9b2c4a74-34c5-4394-b13c-74d689e45675","1a828591-4b2f-4784-adf7-c314917c8eb9","c602fcb4-51ba-4524-a0a7-55288b7f810a","baed0a29-534e-4f7f-8123-c72e0ef0a0bd","b64f0497-e450-453a-898f-6e3181fadaed","4aea3abe-18e4-4902-a9e8-241f92c98e4b","b1a20474-31b5-496c-93d9-856734fe321a","d00e75dc-b367-40f9-a37a-95a89a875e9f","6200a1a6-b4a0-4d2b-9733-ab7cccf2aa59","e7e403b2-970f-4341-9ed0-f10f54fc1f33","54aedcf6-a0a7-4ccf-8572-bbbfe9230037","db5704ac-aa91-4fd8-9fae-0e80b98f0882","b471b42d-8e9a-457f-a3c0-88d8e479bb8d","dc14e7f0-c251-4287-ae5e-d6e9f88f3b23","35563e44-df53-4ac0-8562-3710c5f82d8b","506f9167-3a90-463a-a58d-558988306e6b","a6a1267a-f3dc-425b-990b-811748126dc1","b69beea0-269d-4448-84b9-d99e5c05e833","c44a7a57-1140-4fc4-aa9a-8058f665287c","319648e8-8032-48a2-ac6e-ce2f58f8a553","df4e106f-4b61-4585-b3eb-5a53dd01d89e","2f3f3eea-fc1f-4dd7-8f34-26bd31d5163f","12d50b8f-7ef5-4eac-b347-561b9bacd485","e1e4907d-6174-4760-a073-761a6eab7baf"]);class Cg{#c;#u;#N;constructor(e){this.#c=e.observability,this.#u=e.userEvents,this.#N=e.source}willAccept(e){return"extensionFetchCall"===e.type}transmit(e){if(!this.willAccept(e))return;const t=e,n=this.#R(t.httpStatus),r="registrationId"in t.extension?t.extension.registrationId:void 0,a=null!=r&&wg.has(r),i={destination:t.destination,isHighValueExtension:a,...n&&{http_status_bucket:n},...t.errorType&&{error_type:t.errorType}},o=t.duration??0;if(this.#c.histogram({name:"extension_fetch_call_duration",value:o,unit:"ms",attributes:i}),a&&"type"in t.extension&&"registrationId"in t.extension&&("persisted"===t.extension.type||"global"===t.extension.type)&&this.#c.log("extension_fetch_call_duration","Extension fetch call duration",{value:o,unit:"ms",appId:t.extension.appId,extensionRegistrationId:t.extension.registrationId,...i}),"local"!==t.extension.type&&"storefront"!==t.destination){const e=wc(this.#N);this.#u.refineryEvent(_g({eventTypeName:"shopify.apps.app_runtime.AppRuntimeClientEvent",type:"UI_EXTENSION_FETCH",apiVersion:t.extension.apiVersion,appId:t.extension.appId,appApiKey:t.extension.appApiKey,appVersion:t.extension.version,extensionId:t.extension.extensionId,registrationId:t.extension.registrationId,extensionTarget:t.extension.extensionPoint.target,placementReference:t.extension.placementReference,durationMs:t.duration,httpStatus:t.httpStatus,httpMethod:t.httpMethod,requestUrl:t.requestUrl,context:t.context},{shopId:t.context.shopId,checkoutSessionIdentifier:e,customerId:t.context.customerId}))}}transmitImmediately(e){this.transmit(e)}#R(e){if(void 0!==e)return String(100*Math.floor(e/100))}}class Eg{#N;#u;constructor(e){this.#N=e.source,this.#u=e.userEvents}willAccept(e){if("extensionLifecycle"!==e.type)return!1;const{extension:t,phase:n}=e;return("mountStart"===n||"mountSuccess"===n||"mountError"===n)&&null!=t}transmit(e){if(!this.willAccept(e))return;const{extension:t,mountId:n}=e,r=wc(this.#N),a={...void 0===t.placementReference?{extensionTarget:t.extensionPoint.target,placementReference:void 0}:{extensionTarget:t.extensionPoint.target,placementReference:t.placementReference},eventTypeName:"shopify.apps.app_runtime.AppRuntimeClientEvent",apiVersion:t.apiVersion,appId:t.appId,appApiKey:t.appApiKey,appVersion:t.version,extensionId:t.extensionId,mou
2ntId:n,registrationId:t.registrationId,schemaVersion:1,context:e.context};let i;var o;i="mountStart"===e.phase?{...a,type:"UI_EXTENSION_MOUNT_START"}:{...a,type:"UI_EXTENSION_MOUNT_END",durationMs:e.duration??0,...e.error?.name&&{failureErrorName:e.error.name},mountOutcome:"mountSuccess"===e.phase?"SUCCESS":(o=e.error,o?.name&&ct(o.name)?"APP_FAILURE":"OTHER_FAILURE")},this.#u.refineryEvent(_g(i,{shopId:e.context.shopId,checkoutSessionIdentifier:r,customerId:e.context.customerId}))}}const xg=["buyerUsable","timeToFirstMeaningfulCheckoutInteraction","apiObjectEnd","apiRead","appMetafieldsLoadEnd","sandboxIframeLoadEnd","postPurchaseIframeLoadEnd","sandboxJsFetchEnd","sandboxJsFetchPostPurchaseEnd","sandboxJsFetch2023_04End","sandboxJsFetch2025_07End","sandboxPolyfillFetchEnd","sandboxJsEvalEnd","sandboxJsEval2025_07End","sandboxJsEval2023_04End","partnerJsFetchEnd","partnerJsEvalEnd","executionEnd","partnerJsExecEnd","skeletonEnd","timeToSettleEnd"],Ig=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"}),Ag=["buyerJourneyInterceptor","storefrontApiTokenRefresh","getSessionToken","getSessionTokenError","getSessionTokenCached","storefrontApiQueryStart","storefrontApiQuerySuccess","storefrontApiQueryError","storefrontResponseParseError",...Ig.flatMap(e=>[`${e}Start`,`${e}Success`,`${e}Error`]),"marketDriverChangeShippingAddressCountryCode","unknownChangeStart","unknownChangeSuccess","unknownChangeError"];class Tg{constructor(){this.type="extensionBuyerJourneyBlock"}map(e){if(e.type!==this.type)return;const t=e.extension.registrationId;return{type:"counter",name:"extension_buyer_journey_block_event",value:1,attributes:{isHighValueExtension:null!=t&&wg.has(t)}}}}class Lg{constructor(){this.type="extensionInteraction"}map(e){if(e.type!==this.type)return;let t=e.interaction;Ag.includes(t)||(t="unknownEvent");const n=e.error?sl(e.error):void 0;return null==e.duration?{type:"counter",name:"extension_interaction_count_event",value:1,attributes:{event_name:t,validation_error:n}}:{type:"histogram",name:"extension_interaction_distribution_event",value:e.duration,attributes:{event_name:t,validation_error:n}}}}class Ng{constructor(){this.type="extensionLifecycle"}map(e){if(e.type!==this.type)return;if(xg.includes(e.phase))return;const t=e.extension?.registrationId,n={step:e.phase,checkoutType:cg(e.context.apiClientId),isRemoteDom:!!e.extension?.apiVersion&&Hl(e.extension?.apiVersion),isHighValueExtension:null!=t&&wg.has(t)};return void 0!==e.error&&(n.error=sl(e.error)),null==e.duration?{type:"counter",name:"extension_lifecycle_count_event",value:1,attributes:n}:null!=e.duration?{type:"histogram",name:"extension_lifecycle_distribution_event",value:e.duration,attributes:n}:void 0}}class Rg{constructor(e){this.client=e}#M=new Map([new Tg,new Lg,new Ng].map(e=>[e.type,e]));willAccept(e){return this.#M.has(e.type)}transmit(e){const t=this.#D(e);if(!t)return;const{name:n,value:r,attributes:a,unit:i,type:o}=t;switch(o){case"histogram":this.client.histogram({name:n,value:r,attributes:a,unit:i});break;case"gauge":this.client.gauge({name:n,value:r,attributes:a,unit:i});break;case"counter":this.client.counter({name:n,value:r,attributes:a,unit:i})}}transmitImmediately(e){this.transmit(e)}#D(e){const t=this.#M.get(e.type);return t?.map(e)}}var Mg=(e=>(e.InteractionAndImpression="checkout_c1_interaction_and_impression_events/2.25",e))(Mg||{});function Dg(e){return function(e){return e.replace(/([a-z])([A-Z]+)/g,(e,t,n)=>`${t} ${n}`).replace(/([A-Z])([A-Z]+)([^a-zA-Z0-9]*)$/,(e,t,n,r)=>t+n.toLowerCase()+r).replace(/([A-Z]+)([A-Z][a-z])/g,(e,t,n)=>`${t.toLowerCase()} ${n}`)}(e).replace(/\W+/g," ").split(/ |\B(?=[A-Z])/).map(e=>e.toLowerCase()).join("_")}class Og{constructor(e,t=!0){this.client=e,this.shouldEmitEvent=t,this.acceptableEventType=new Set(["extensionLifecycle","extensionInteraction","extensionUiInteraction","extensionBuyerJourneyBlock","extensionFetchCall","click","change","inventoryPriceChange","autofill","
2impression","moreShippingOptions","deliveryMacroInteraction","splitShipAndPickupIntent"])}willAccept(e){return this.acceptableEventType.has(e.type)}transmit(e){this.shouldEmitEvent&&this.client.monorailEvent({schemaId:Mg.InteractionAndImpression,payload:this.mapEventToMonorailSchema(e)})}transmitImmediately(e){this.shouldEmitEvent&&this.client.monorailEvent({schemaId:Mg.InteractionAndImpression,payload:this.mapEventToMonorailSchema(e)},{exportImmediately:!0})}commonExtensionEventFields(e){return null===e.extension?{}:{extensionId:e.extension.extensionId,extensionApiClientId:e.extension.appId,extensionRegistrationId:e.extension.registrationId,extensionPublicIdentifier:e.extension.publicIdentifier,extensionTargetPublicIdentifier:e.extension.targetPublicIdentifier,extensionType:e.extension.type,extensionPoint:e.extension.extensionPoint.target,extensionPlacementReference:e.extension.placementReference,section:e.section}}mapEventToMonorailSchema(e){const{context:t,timestamp:n,type:r}=e,a={frontendEventTimestampEpochMs:n.getTime(),userToken:t.userToken,customerId:t.customerId,shopId:t.shopId,sessionToken:t.sessionToken,checkoutToken:t.checkoutToken,checkoutProfileId:t.checkoutProfileId,apiClientId:t.apiClientId,sourceId:t.sourceId,sourceType:t.sourceType,identityProvider:t.identityProvider,sourceDesign:t.sourceDesign,deviceType:t.deviceType,locale:t.locale,currency:t.currency,browser:t.browser,browserConnectionType:t.browserConnectionType,frontendEventTimeZone:t.frontendEventTimeZone,companyContactId:t.companyContactId,companyLocationId:t.companyLocationId,checkoutToDraft:t.checkoutToDraft,editableShippingAddress:t.editableShippingAddress,payNowOnly:t.payNowOnly,clientIp:t.clientIp,checkoutSdkVersion:t.checkoutSdkVersion,checkoutSdkVariant:t.checkoutSdkVariant,checkoutSdkSchemaVersion:t.checkoutSdkSchemaVersion,serverRendered:t.serverRendered,clientHydrated:t.clientHydrated,pageLoadId:t.pageLoadId};switch(r){case"change":{const t="tel"===e.element.type||"email"===e.element.name?"contact":e.element.name;return{...a,eventName:(t?`${Dg(t)}_`:"")+"field_value_changed",eventType:`${e.element.type?`${e.element.type}_`:""}${e.element.tagName.toLowerCase()}_change`,fieldValue:e.element.value,labelValue:e.element.label,section:e.section}}case"click":return{...a,eventName:(e.element.textContent?`${Dg(e.element.textContent)}_`:"")+"clicked",eventType:`${e.element.tagName.toLowerCase()}_click`,labelValue:e.element.label,section:e.section,identityProvider:e.identityProvider};case"autofill":return{...a,eventName:`${Dg(e.element.name?.toLocaleLowerCase()??"")}_autofill`,eventType:`${Dg(e.source)}_autofill`,section:e.section};case"extensionLifecycle":{const t=e=>{switch(e){case"mountError":return"extension_mount_failed";case"mountStart":return"extension_mount_started";case"mountSuccess":return"extension_mount_ended";case"sandboxIframeLoadEnd":return"extension_sandbox_iframe_load_ended";case"postPurchaseIframeLoadEnd":return"extension_post_purchase_iframe_load_ended";case"sandboxJsFetchEnd":return"extension_sandbox_js_fetch_ended";case"sandboxJsFetchPostPurchaseEnd":return"extension_sandbox_js_fetch_post_purchase_ended";case"sandboxJsFetch2023_04End":return"extension_sandbox_js_fetch_2023_04_ended";case"sandboxJsFetch2025_07End":return"extension_sandbox_js_fetch_2025_07_ended";case"sandboxPolyfillFetchEnd":return"extension_sandbox_polyfill_fetch_ended";case"sandboxJsEvalEnd":return"extension_sandbox_js_eval_ended";case"sandboxJsEval2025_07End":return"extension_sandbox_js_eval_2025_07_ended";case"sandboxJsEval2023_04End":return"extension_sandbox_js_eval_2023_04_ended";case"partnerJsFetchEnd":return"extension_partner_js_fetch_ended";case"partnerJsEvalEnd":return"extension_partner_js_eval_ended";case"partnerJsExecEnd":return"extension_partner_js_exec_ended";case"apiObjectEnd":return"extension_api_object_ended";case"apiRead":return"extension_api_read";case"appMetafieldsLoadEnd":return"extension_app_metafields_load_ended";case"jsLoadingEnd":return"extension_js_loading_ended";case"executionEnd":return"extension_execution_ended";case"skeletonEnd":return"extension_skeleton_ended";case"visible":return"extension_visible";case"buyerUsable":return"extension_buyer_usable";case"waitTimeAfterExecution":return"extension_wait_time_after_execution";case"checkoutProfileChangeDestroy":return"extension_destroyed_by_checkout_profile_change";case"timeToFirstMeaningfulCheckoutInteraction":return"extension_time_to_first_meaningful_checkout_interaction";case"timeToSettleEnd":return"extension_time_to_settle_ended";default:return`extension_${e}`}};return{...a,...void 0!==e.duration&&{frontendEventsTimeDifferenceMs:Math.round(e.duration)},...void 0!==e.eventValue&&{eventValue:e.eventValue.toString()},...void 0!==e.apiPropertyName&&{eventValue:e.apiPropertyName},...this.commonExtensionEventFields(e),eventName:t(e.phase),eventType:"extension_lifecycle",step:e.page,extensionInstanceId:e.instanceId,...e.mountId&&{mountId:e.mountId},...void 0!==e.ttsCompletionReason&&{extensionTtsCompletionReason:e.ttsCompletionReason}
2,...void 0!==e.ttsRenderObserved&&{extensionTtsRenderObserved:e.ttsRenderObserved},...void 0!==e.ttsRequestCount&&{extensionTtsRequestCount:e.ttsRequestCount},initialLoad:e.initialPageLoad,transferredBundleSize:e.transferredBundleSize,bundleSize:e.bundleSize,validationErrors:e.error?[ll(e.error)]:[]}}case"extensionFetchCall":return{...a,...this.commonExtensionEventFields(e),eventName:e.errorType?"extension_network_call_errored":"extension_network_call_ended",eventType:"extension_lifecycle",frontendEventsTimeDifferenceMs:Math.round(e.duration),fetchDestination:e.origin,fetchHttpStatus:e.httpStatus,fetchErrorType:e.errorType};case"extensionBuyerJourneyBlock":return{...a,...this.commonExtensionEventFields(e),eventName:"extension_buyer_journey_blocked",eventType:"extension_buyer_journey_block_progress",eventValue:e.reason,validationErrors:e.validationErrors.map(e=>JSON.stringify(e))};case"extensionInteraction":{const t=e=>{switch(e){case"updateNoteStart":return"note_update_started";case"updateNoteSuccess":return"note_update_succeeded";case"updateNoteError":return"note_update_errored";case"removeNoteStart":return"note_remove_started";case"removeNoteSuccess":return"note_remove_succeeded";case"removeNoteError":return"note_remove_errored";case"updateMetafieldStart":return"metafield_update_started";case"updateMetafieldSuccess":return"metafield_update_succeeded";case"updateMetafieldError":return"metafield_update_errored";case"removeMetafieldStart":return"metafield_remove_started";case"removeMetafieldSuccess":return"metafield_remove_succeeded";case"removeMetafieldError":return"metafield_remove_errored";case"updateCartMetafieldStart":return"cart_metafield_update_started";case"updateCartMetafieldSuccess":return"cart_metafield_update_succeeded";case"updateCartMetafieldError":return"cart_metafield_update_errored";case"removeCartMetafieldStart":return"cart_metafield_remove_started";case"removeCartMetafieldSuccess":return"cart_metafield_remove_succeeded";case"removeCartMetafieldError":return"cart_metafield_remove_errored";case"updateAttributeStart":return"attribute_update_started";case"updateAttributeSuccess":return"attribute_update_succeeded";case"updateAttributeError":return"attribute_update_errored";case"removeAttributeStart":return"attribute_remove_started";case"removeAttributeSuccess":return"attribute_remove_succeeded";case"removeAttributeError":return"attribute_remove_errored";case"addCartLineStart":return"cart_line_add_started";case"removeCartLineStart":return"cart_line_remove_started";case"updateCartLineStart":return"cart_line_update_started";case"addCartLineSuccess":return"cart_line_add_succeeded";case"addCartLineError":return"cart_line_add_errored";case"removeCartLineSuccess":return"cart_line_remove_succeeded";case"removeCartLineError":return"cart_line_remove_errored";case"updateCartLineError":return"cart_line_update_errored";case"updateCartLineSuccess":return"cart_line_update_succeeded";case"addDiscountCodeStart":return"discount_code_add_started";case"addDiscountCodeSuccess":return"discount_code_add_succeeded";case"addDiscountCodeError":return"discount_code_add_errored";case"removeDiscountCodeStart":return"discount_code_remove_started";case"removeDiscountCodeSuccess":return"discount_code_remove_succeeded";case"removeDiscountCodeError":return"discount_code_remove_errored";case"addGiftCardStart":return"gift_card_add_started";case"removeGiftCardStart":return"gift_card_remove_started";case"addGiftCardSuccess":return"gift_card_add_succeeded";case"removeGiftCardSuccess":return"gift_card_remove_succeeded";case"addGiftCardError":return"gift_card_add_errored";case"removeGiftCardError":return"gift_card_remove_errored";case"getSessionToken":return"session_token_retrieved";case"getSessionTokenError":return"session_token_retrieval_errored";case"getSessionTokenCached":return"cached_session_token_retrieved";case"storefrontApiTokenRefresh":return"storefront_api_token_refreshed";case"storefrontApiQueryStart":return"storefront_api_query_started";case"storefrontApiQueryError":return"storefront_api_query_errored";case"storefrontApiQuerySuccess":return"storefront_api_query_succeeded";case"storefrontResponseParseError":return"storefront_response_parse_errored";case"updateShippingAddressStart":return"shipping_address_update_started";case"updateShippingAddressSuccess":return"shipping_address_update_succeeded";case"updateShippingAddressError":return"shipping_address_update_errored";case"buyerJourneyInterceptor":return"buyer_journey_intercept_ran";case"redeemableAddChangeStart":return"redeemable_add_started";case"redeemableAddChangeSuccess":return"redeemable_add_succeeded";case"redeemableAddChangeError":return"redeemable_add_errored";case"updatePaymentMethodAttributesStart":return"payment_method_attributes_change_started";case"updatePaymentMethodAttributesSuccess":return"payment_method_attributes_change_succeeded";case"updatePaymentMethodAttributesError":return"payment_method_attributes_change_errored";case"changeVisitorConsentStart":return"visitor_consent_change_started";case"changeVisitorConsentSuccess":return"visitor_consent_change_succeeded";case"changeVisitorConsentError":return"visitor_consent_change_errored";case"marketDriverChangeShippingAddressCountryCode":return"market_driver_change_shipping_address_country_code";default:return"unknown_event"}};return{...a,...e.duration&&{frontendEventsTimeDifferenceMs:Math.round(e.duration)},...this.commonExtensionEventFields(e),eventName:`extension_${t(e.interaction)}
2`,eventType:"extension_interaction",validationErrors:e.error?[ll(e.error)]:[],extensionInstanceId:e.extensionInstanceId,initialLoad:e.initialLoad,...e.eventId&&{eventValue:e.eventId},...void 0!==e.throttleCounter&&{throttleCounter:e.throttleCounter}}}case"extensionUiInteraction":{const t=e=>{switch(e){case"modalOpen":return"modal_opened";case"modalClose":return"modal_closed";case"modalRender":return"modal_rendered";case"mapRender":return"map_rendered";case"sheetOpen":return"sheet_opened";case"sheetClose":return"sheet_closed";case"sheetRender":return"sheet_rendered";case"announcementExpanded":return"announcement_expanded";case"announcementCollapsed":return"announcement_collapsed";case"announcementDismissedFromHost":return"announcement_dismissed_from_host";case"announcementDismissedFromExtension":return"announcement_dismissed_from_extension"}},n=e=>{switch(e){case"modalOpen":case"modalClose":case"sheetOpen":case"sheetClose":case"announcementExpanded":case"announcementCollapsed":case"announcementDismissedFromHost":case"announcementDismissedFromExtension":return"component_buyer_interaction";case"modalRender":case"sheetRender":case"mapRender":return"component_lifecycle"}};return{...a,componentType:e.componentType,componentInstanceId:e.componentInstanceId,...this.commonExtensionEventFields(e),eventName:t(e.interaction),eventType:n(e.interaction)}}case"impression":return{...a,eventType:"impression",eventName:`${e.impressionType}_impression`,eventValue:e.eventValue,impressionFeatures:e.impressionFeatures,section:e.section,identityProvider:e.identityProvider,..."delivery_macros"===e.impressionType?zg(t.selectedDeliveryMacro,t.deliveryMacros||[],t.deliveryLines||[]):{}};case"moreShippingOptions":return{...a,eventType:"more_shipping_options",eventName:e.subEvent,...zg(t.selectedDeliveryMacro,t.deliveryMacros||[],t.deliveryLines||[])};case"deliveryMacroInteraction":return{...a,eventType:"delivery_macro_interaction",eventName:e.subEvent,...zg(t.selectedDeliveryMacro,t.deliveryMacros||[],t.deliveryLines||[])};case"splitShipAndPickupIntent":return{...a,eventType:"split_ship_and_pickup",eventName:"split_ship_and_pickup_intended"};default:return{...a,eventName:"unknown_interaction_event",eventType:"interaction"}}}}function zg(e,t,n){return{shippingNumSplits:n?.length,splitShippingDeliveryGroups:JSON.stringify(n.map(e=>({id:e.id,numItems:e.targetMerchandiseLines?.length??0,productItemIds:e.targetMerchandiseLines?.map(e=>e.id?se(e.id):"")??[],deliveryMethods:e.methods.map(e=>({title:e.title,handle:e.handle,cost:e.cost.amount,deliveryEstimate:e.deliveryPromisePresentmentTitle?.long}))}))),splitShippingMacros:JSON.stringify(t.map(t=>({selected:e?.id===t.id,handle:t.id,cost:t.cost.amount,title:t.title,methods:Object.entries(t.deliveryMethodHandles).map(([e,t])=>({deliveryGroup:e,deliveryMethod:t}))})))}}class Bg{constructor(e){this.client=e,this.acceptableEventType=new Set(["receiptError","paymentError","violationError","addressError"])}willAccept(e){return this.acceptableEventType.has(e.type)}transmit(e){this.client.monorailEvent({schemaId:"checkout_c1_interaction_errors/3.2",payload:this.mapEventToMonorailSchema(e)})}transmitImmediately(e){this.client.monorailEvent({schemaId:"checkout_c1_interaction_errors/3.2",payload:this.mapEventToMonorailSchema(e)},{exportImmediately:!0})}mapEventToMonorailSchema(e){const{context:t,type:n}=e,r={userToken:t.userToken,shopId:t.shopId,sessionToken:t.sessionToken,checkoutToken:t.checkoutToken,apiClientId:t.apiClientId,sourceId:t.sourceId,sourceType:t.sourceType,sourceDesign:t.sourceDesign,requestId:t.requestId,checkoutSdkVersion:t.checkoutSdkVersion,checkoutSdkVariant:t.checkoutSdkVariant,checkoutSdkSchemaVersion:t.checkoutSdkSchemaVersion};switch(n){case"receiptError":return{...r,errorMessage:e.error.message||"",eventName:"receipt_error",eventType:"error",errorReason:e.error.code||e.error.field||"",silencedViolation:e.error.silencedViolation||!1,errorOrigin:e.error.origin||"",errorType:e.error.type||""};case"addressError":return{...r,errorMessage:e.error.message||"",eventName:"address_error",eventType:"error",errorReason:e.error.code||e.error.field||"",silencedViolation:!1,errorOrigin:e.error.origin||"",errorType:e.error.type||""};case"paymentError":return{...r,errorMessage:e.error.message||"",eventName:"payment_error",eventType:"error",errorReason:e.error.code||e.error.field||"",silencedViolation:e.error.silencedViolation||!1,errorOrigin:e.error.origin||"",errorType:e.error.type||""};case"violationError":return{...r,errorMessage:e.error.message||"",eventName:"validation_error",eventType:"error",errorReason:e.error.code||e.error.field||"",silencedViolation:e.error.silencedViolation||!1,errorOrigin:e.error.origin||"",errorType:e.error.type||""}}return{...r,errorMessage:"Unknown error",eventName:"error",eventType:"interaction_error",errorReason:"",silencedViolation:!1,errorOrigin:"unknown",errorType:"unknown"}}}class Vg{constructor(e,t=!0){this.observability=e,this.shouldEmitEvent=t,this.acceptedTypes=new Set(["click"])}willAccept(e){return this.acceptedTypes.has(e.type)}transmit(e){if(!this.shouldEmitEvent)return;const t=this.createDescriptiveLogName(e),{context:n,...r}=e;this.observability.log("telemetry_events_adapter_event_transmitted",t,r)}createDescriptiveLogName(e){const{section:t,type:n,element:r}=e;return[t,n,r.tagName.toLowerCase()].join("_")}}class Fg{constructor(e){this.acceptableEventTypes=new Set(["alertDisplayed","uiExtensionError","pageViewed","sectionComplete","shippingMethodSelected","shippingMethodsFilled","sectionInteraction","pageSubmit","dom_
2clicked","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=Ug(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=Ug(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=Ug(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",{...ut(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 Ug(e){return Jc({type:e.type,step:e.context.step,section:"section"in e?e.section:void 0})?e.context.webPixelCheckout:void 0}const qg=ne("EventHubContext");function jg({children:e}){const{observability:t,userEvents:n,shopPay:a,checkout:{identity:i},source:o,router:s,consentManager:l}=ae(),c="shopPay"===i.current.value,u=sg(),p=Zh(),m=r(()=>{const e=[new Og(n,p),new Bg(n),new Rg(t),new kg(t,n,p),new Cg({observability:t,userEvents:n,source:o}),new Eg({userEvents:n,source:o}),new Vg(t,p),new Fg({webPixels:u}),new fg({observability:t,userEvents:n,shopPay:a,isShopPayActive:c,router:s,consentManager:l}),new bg({userEvents:n,source:o})];return new Hg(e)},[t,n,a,c,u,o,p,s,l]);return d(qg.Provider,{value:m,children:e})}class Hg{constructor(e){this.clients=e}emit(e){this.transmit(e)}transmit(e){this.clients.forEach(t=>{t.willAccept(e)&&(e.transmitImmediately&&t.transmitImmediately?t.transmitImmediately(e):t.transmit(e))})}}function $g(){const{client:e,shop:t,checkout:n,i18n:a,source:i,mobileCheckoutSdk:o,router:s}=ae(),{currentPage:l}=pc().value,{pathname:c}=s.currentUrl.value,u=Jh(),d=u?.trackingUnique??dt({serialized:e.unstable_getSerialization("shopifyY"),expiration:e.unstable_getSerialization("shopifyYExpiration")}),p=u?.trackingVisit??dt({serialized:e.unstable_getSerialization("shopifyS"),expiration:e.unstable_getSerialization("shopifySExpiration")}),m=ge(),h=m.buyerIdentity.value?.customerProfile,g=e.unstable_getSerialization("sessionToken"),f=Qc(),y=ge().buyerIdentity.value?.purchasingCompany,{value:v}=m.paymentFlexibilityPaymentTermsTemplate,_=pt(),{value:b}=m.deliveryNext,{selectedMacro:P}=Gh(),k=sc({base:!0,small:!1}),S=n.configuration.layout.isOnePage.value,w="shopPay"===n.identity.current.value,C=navigator.connection?.effectiveType??"unknown",E=e.unstable_getSerialization("requestId"),x=l?.id,I=e.unstable_getSerialization("apiClientId")??0,A=e.unstable_getSerialization("workerVersion")??"proxy",T=e.unstable_getSerialization("serverHandling")??"proxy";let L="c1_legacy";S&&(L="c1_redesign"),w&&(L="shop_pay");const N=mt(b),{deliveryMacros:R}=qe(),M=R.value,{isServerRendered:D}=e.initialRequest,O=n.configuration.profileId.value;return r(()=>({userToken:d,trackingVisit:p,customerId:h?.id,shopId:t.id,sessionToken:g,checkoutToken:i.checkoutSessionIdentifier,checkoutProfileId:O?parseInt(se(O),10):void 0,apiClientId:I,sourceId:i.sourceId,sourceType:i.type,identityProvi
2der:void 0,sourceDesign:L,deviceType:k?"mobile":"desktop",locale:a.locale,currency:a.currency,browser:navigator.userAgent,browserConnectionType:C,frontendEventTimeZone:Intl.DateTimeFormat().resolvedOptions().timeZone,clientIp:"0.0.0.0",userAgent:navigator.userAgent,companyContactId:y?h?.id:void 0,companyLocationId:y?.location.id,companyId:y?.company.id,checkoutToDraft:_.value,editableShippingAddress:f.value,payNowOnly:!v&&!_.value,shippingRequired:n.isShippingRequired.value,requestId:E,step:x,pathname:c,checkoutSdkSchemaVersion:o.config.schema||void 0,checkoutSdkVersion:o.config.version||void 0,checkoutSdkVariant:o.variant.value?.toUpperCase(),workerVersion:A,serverHandling:T,reviewPageRequired:t.confirmationPageEnabled,serverRendered:D,clientHydrated:D,..."filled"===b?.status?{selectedDeliveryMacro:N?P:void 0,deliveryMacros:N?M:[],deliveryLines:b.lines.filter(He)}:{selectedDeliveryMacro:void 0,deliveryMacros:[],deliveryLines:[]},pageLoadId:ht}),[d,p,h?.id,t.id,t.confirmationPageEnabled,g,i.checkoutSessionIdentifier,i.sourceId,i.type,O,I,L,k,a.locale,a.currency,C,y,_.value,f.value,v,n.isShippingRequired.value,E,x,c,o,A,T,b,N,P,M,D])}function Yg(){if("undefined"==typeof window)return Wg;const{shop:e,consentManager:t,source:r,i18n:i}=ae(),o=re(qg),s=$g(),l=a(s),c=he(),u=qe();return l.current=s,n((n,a)=>{o.emit({type:n,context:{...l.current,href:window.location.href,consent:cc(t),webPixelCheckout:Kc({type:n,step:l.current.step,section:a.section},{negotiated:c,proposedParts:u,source:r,locale:i.locale,shopCurrencyCode:e.currencyCode,marketDrivenShippingEnabled:e.marketDrivenShippingEnabled})},...a})},[o,l,e,t,c,u,r,i])}function Wg(){}function Gg(e,t){const{router:n}=ae();i(()=>{if(""!==n.currentUrl.peek().hash)return;const r=document.activeElement;r&&e.current?.contains(r)&&t(r)},[])}function Jg(){const e=Yg(),{client:t}=ae();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 Kg(){const e=Yg(),{observability:t}=ae();return function(n){e("alertDisplayed",n),t.log("alert_displayed_event_emitted","Error alert was displayed to the buyer",{event:Hc(n)})}}function Qg(){const{checkout:e}=ae(),n=e.configuration.addressSettings.nonBillingAddressSettings;return t(()=>{const e=n.value?.validationEnabled;if(!e)return"BASIC"})}function Xg(){const{i18n:e}=ae();return n((t,n)=>gt(e,t,n),[e])}function Zg(){const{i18n:e,checkout:n,shopPay:r}=ae(),a=Xg(),i=r.user.installments.isRetryable.value,{paymentMethods:o,paymentDue:s}=ge(),l=t(()=>ft(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),yt.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,yt.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 ef(e,t){return t?.availableLoanTypes?.includes(e)??!1}function tf(e){const{retailTraceId:n,deviceId:a,userId:i,locationId:o}=function(){const e=ge().customAttributes;return t(()=>{const t=vt(_t,e?.value),n=vt(bt,e?.value),r=vt(Pt,e?.value),a=vt(kt,e?.value);return{retailTraceId:t?.value||"",deviceId:n?.value||"",locationId:r?.value||"0",userId:a?.value||"0"}})}().value,{shop:{id:s},source:{checkoutSessionIdentifier:l},checkout:c}=ae(),u=St(),{value:d}=wt(),p=c.installments.config.value,m=d?.amount?Number(d.amount):0,h=c.installments.isCheckoutEligible.value,g=Zg(),f=ef("SPLIT_PAY",p),y=ef("INTEREST",p),v=ef("ZERO_PERCENT",p),_=d?.currencyCode,b=_||"USD";return r(()=>({userId:parseInt(i,10),shopId:parseInt(se(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 nf(){const e=ge().customAttributes;return t(()=>Ct(e.value))}function rf(e){const{observability:t}=ae(),[n,r]=s(()=>xt(e));return i(()=>{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))}(()=>{Et(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 af(e,t){const{persistence:n}
2=ae(),r=n?.get(e,t),a=m(r);return k(()=>{n?.createUpdate(e,t)(a.value)}),a}const of=ne("AnalyticsContext");function sf({children:e}){const t=r(()=>new cf,[]);return d(of.Provider,{value:t,children:e})}function lf(){return re(of)}class cf{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 uf(){const e=lf();return n(t=>e.emit(t),[e])}function df(e){const t=lf();i(()=>t.subscribe(e),[e,t])}const pf=()=>{const{url:e}=ae(),t=e.shopPayRememberMe(),n=vc(),r=n?.redirectUrl?.includes(t);return Boolean(r)};function mf({selectedDeliveryMethodHandle:e,methods:t}){const{userEvents:r,shop:{id:a},checkout:{identity:i},source:o}=ae(),s="shopPay"===i.current.value,l=ge().buyerIdentity.value?.customerProfile,c=t=>t.handle===e,u=t.find(c)?.originLocation?.id,d=t.findIndex(c);return n(e=>r.monorailEvent({schemaId:"local_pickup_checkout/3.1",payload:{eventType:e,checkoutToken:o.checkoutSessionIdentifier||"",shopId:parseInt(se(a),10),locationId:u&&se(u),selectedLocationRank:d,userId:l?.id?parseInt(se(l.id),10):void 0,numberLocationsFound:t.length||0,checkoutSurface:s?"shop_pay":"guest_checkout"}}),[l?.id,s,u,t.length,r,d,a,o.checkoutSessionIdentifier])}const hf=580111;function gf(){const{client:e,userEvents:o,i18n:{locale:l},shop:c,source:u,mobileCheckoutSdk:p}=ae(),m=ge(),h=m.buyerIdentity.value?.customerProfile,g=Zh(),f=function(){const e=pc();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}=At(),{value:_}=Tt("ONE_TIME_PURCHASE"),b=Lt(_),P=Boolean(b)&&0===b?.costAfterDiscounts.amount,{value:S}=m.taxes,{value:w}=m.merchandiseLines,{value:C}=m.paymentLines,{value:E}=m.discountLines,{value:x}=m.contactInfo,{value:I}=m.buyerIdentity,{value:A}=Nt(),[T,L]=s("");function N(e){return e.toFixed(2)}function R(e){return parseInt(se(e),10)}!function(){const e=a(!1),{userEvents:t,shop:{id:n},source:{checkoutSessionIdentifier:r},checkout:{identity:i}}=ae(),o="shopPay"===i.current.value,s=Ve();k(()=>{s.value.enabledDeliveryMethods.includes("PICK_UP")&&!e.current&&(t.monorailEvent({schemaId:"local_pickup_checkout_availability_viewed/1.1",payload:{shopId:parseInt(se(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]),O=r(()=>w?.lines?.filter(e=>e.productId).map(e=>R(e.productId)),[w?.lines]),z=r(()=>w?.lines?.filter(e=>e.variantId).map(e=>R(e.variantId)),[w?.lines]),B=r(()=>w?.lines?.map(e=>{const t=e.totalPrice.amount;return void 0===t?"":N(t)}),[w?.lines]),V=r(()=>w?.lines?.every(e=>"USD"===e.totalPrice.currencyCode)?w?.lines?.map(e=>{const t=e.totalPrice.amount;return void 0===t?"":N(t)}):void 0,[w?.lines]),F=r(()=>w?.lines?.map(e=>e.quantity),[w?.lines]),U=r(()=>F?.reduce((e,t)=>e+t,0),[F]),q=r(()=>F?.length,[F]),j=r(()=>C?.lines.filter(e=>"giftCard"===e.method.type&&e.cost?.amount).map(e=>N(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(!Rl(t))return e;let n=e;n||(n=[]);const r=t.amount?.amount;return r&&n.push(N(r)),n},[]),[E]),Y=Jh(),W=n(()=>{const t="available_total"===S?.status?S.totalTax.amount:void 0,n=h?.id?R(h.id):void 0,r=h?.fullName||void 0,a=Y?.trackingUnique??dt({serialized:e.unstable_getSerialization("shopifyY"),expiration:e.unstable_getSerialization("shopifyYExpiration")}),i=Y?.trackingVisit??dt({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:R(c.id),eventTimestampEpochMs:Date.now(),trackingVisit:i,userAgent:navigator.userAgent,landingPage:e.co
2okies.get("_landing_page")||void 0,customerEmail:h?.email||x?.email,contentLanguage:l,actionName:"query",remoteIp:void 0,totalPrice:A?.amount?N(A?.amount):void 0,customerName:r,lineItemProductIds:O,lineItemVariantIds:z,lineItemTotalPrice:B,lineItemTotalPriceUsd:V,lineItemQuantity:F,currency:I?.presentmentCurrency||c.currencyCode,totalItemCount:U,paymentGatewayId:void 0,gatewayName:void 0,totalPriceUsd:D?N(D):void 0,apiClientId:hf,currentApiClientId:hf,paymentMethod:H,paymentProviderId:void 0,currentStep:f.value,checkoutToken:u.checkoutSessionIdentifier,totalShipping:M?N(M):void 0,sourceProcessor:"web_checkout",appliedGiftCards:j?.length?j:void 0,subtotalPrice:v?.amount?N(v.amount):void 0,sourceName:"checkout_one",freeShippingDiscount:P.valueOf(),totalTax:t?N(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,F,B,V,z,O,h,x,q,l,H,Y,e,p]);return i(()=>{g&&(T!==f.value&&o.monorailEvent(W()),L(f.value))},[T,f.value,o,W,L,g]),d(y,{})}const ff=w({suspenseName:"trekkie",displayName:"Trekkie",load:()=>C(()=>fl(()=>import("./b887ec56.Clqyq4cC.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12])))});function yf(){const e=he(),t=qe(),r=sg(),{plan:a}=pc().value,{router:i,i18n:{locale:o},shop:{currencyCode:s,marketDrivenShippingEnabled:l},source:c}=ae(),u=vc(),d=_c(),p=n(()=>{const n=jc({negotiated:e,source:c,proposedParts:t,locale:o,shopCurrencyCode:s,marketDrivenShippingEnabled:l});requestAnimationFrame(()=>{r.publish("payment_info_submitted",{checkout:n})})},[e,c,r,t,o,s,l]),m=n(()=>{const n=jc({negotiated:e,source:c,proposedParts:t,locale:o,shopCurrencyCode:s,marketDrivenShippingEnabled:l});r.publish("checkout_started",{checkout:n})},[e,c,r,t,o,s,l]),h=n(()=>
2{if(!u)return;if(d.shouldPrevent())return;const t=jc({negotiated:e,receipt:u,source:c,orderId:u.orderIdentity.id,customerId:u.customerId||void 0,isFirstOrder:u.isFirstOrder,locale:o,shopCurrencyCode:s,marketDrivenShippingEnabled:l});d.markAsEmitted();const n=u.analytics?.checkoutCompletedEventId;let p=!1;function m(){if(p)return;p=!0,window.removeEventListener("pagehide",m),document.removeEventListener("visibilitychange",h);const e=function(e,t){const n=e.find(e=>e.route===t);return n?Pc[n.type]??"unknown":"unknown"}(a.detours,i.currentUrl.value.normalizedPath),o={...n&&{eventId:n},checkoutCompletedPageType:e},s=Object.keys(o).length>0?o:void 0;r.publish("checkout_completed",{checkout:t},s)}function h(){"hidden"===document.visibilityState&&m()}window.addEventListener("pagehide",m),document.addEventListener("visibilitychange",h),"hidden"===document.visibilityState?m():requestAnimationFrame(m)},[u,e,c,r,i,a.detours,o,s,l,d]);return df(n(e=>{"initiate_checkout"===e.type&&m()},[m])),df(n(e=>{"add_payment_info"===e.type&&p()},[p])),df(n(e=>{"complete_checkout"===e.type&&h()},[h])),null}const vf=["/processing","/thank-you","/error","/post-purchase"],_f=[ot.DirectCheckoutCheckout,ot.CheckoutPaymentStep,ot.ShopPayInstallmentsAsPaymentMethod,ot.ShopPayAsPaymentMethod];function bf(){Jh();const e=uf(),{currentPage:t,currentDetour:n}=pc().value,{userEvents:r,source:a,router:o}=ae(),s=function(){const[e,t]=rf(It.TrackedSourceId),{source:{sourceId:n}}=ae();return i(()=>{t(n)},[n,t]),{previouslyTracked:n===e}}(),l=function(){const[e,t]=rf(It.TrackedCompleteOrderSourceId),n=vc(),r=pf(),{source:{sourceId:a}}=ae();return i(()=>{n&&!r&&t(a)},[a,n,r,t]),{previouslyTracked:a===e}}(),{normalizedPath:c}=o.currentUrl.value,u=vc(),p=nf().value,m=tf(Mt.SHOP_PAY_CHECKOUT_COMPLETE),h=ge().paymentLines?.value?.lines,g=function(){const{client:e}=ae();return e.unstable_getSerialization("shopPayConfig").redirect_source}(),f=Yg(),v=pf();return i(()=>{const r=n?.route??t?.route;if(r){f("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,f,e]),hc(n=>{"negotiationStage"in n&&"negotiation"===n.negotiationStage||t&&["payment","onePage"].includes(t.id)&&e({type:"add_payment_info"})}),i(()=>{u&&(v||l.previouslyTracked||(e({type:"complete_checkout"}),p&&function(e,t,n){e.monorailEvent({schemaId:"retail_shop_pay/2.0",payload:{...n,orderId:oe(t.orderIdentity.id)}})}(r,u,m)))},[e,u,v,l,p,r,m]),i(()=>{"cartNext"!==a.type&&"checkout"!==a.type||s.previouslyTracked||e({type:"initiate_checkout_once_per_checkout",url:c})},[e,c,a.type,s.previouslyTracked]),i(()=>{const t=o.currentUrl.value.normalizedPath,n=Boolean(Dt(h,"GOOGLE_PAY")),r="cartNext"===a.type||"checkout"===a.type,i=!g||!_f.includes(g);r&&(n&&"/processing"===t||!vf.includes(t))&&i&&e({type:"initiate_checkout",url:t})},[]),d(y,{children:[d(gf,{}),d(ff,{}),d(yf,{})]})}const Pf=E(function({children:e}){const t=Rt();return d(sf,{children:[e,d(x,{when:t,children:d(bf,{})})]})});function kf(){const{userEvents:e,shop:{id:t},source:n,i18n:{locale:r}}=ae(),a=Ot(),{billingAddress:i}=qe(),o=i.value,{details:s}=zt(o.countryCode),l=Qg();return hc(c=>{if("complete"===c.type&&i&&a.value.defaultAttributes){const i=a.value.defaultAttributes?.uniqToken||"",c=s?.zones?.find(e=>e.code===o.zoneCode)?.name;e.monorailEvent({schemaId:"checkout_address_submission/5.2",payload:{checkoutToken:n.
2checkoutSessionIdentifier||"",shopId:parseInt(se(t),10),uniqueToken:i,territory:s?.name||"",context:"Billing address",address1:o.address1||"",address2:o.address2||"",city:o.city||"",zone:c||"",zip:o.postalCode||"",errorCode:"",errorFields:[],locale:r,matchingStrategy:l.value}})}}),null}const Sf=ne("WebPixelTargetContext"),wf=({children:e,target:t})=>d(Sf.Provider,{value:t,children:e});function Cf(){const{checkout:e}=ae();return e.configuration.branding.shell.configuration.environment.isCheckoutEditor??!1}const Ef=w({displayName:"AdminPreviewBar",load:()=>fl(()=>import("./a6e11e56.QtfnEVw1.js"),__vite__mapDeps([13,1,2,3,4,5,7,8,9,10,11,12,14])),suspense:!1});function xf(){const{router:e,source:t,shop:n}=ae(),r="no-preview"!==n.configurationPreviewContext,i=a(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:Bt(),hasServerPreviewContext:r});return o?d(Ef,{initialUrl:i}):null}function If(){const e=a(!1);return i(()=>(e.current=!0,()=>{e.current=!1}),[]),e}const Af=f(void 0);function Tf(){const e=h(Af);if(!e)throw new fe("Missing FocusManager Context ");return e.focusErrors}function Lf(e){const t=e.defaultView?.getComputedStyle(e.documentElement).direction;return"rtl"===t||"ltr"===t?t:"rtl"===e.dir?"rtl":"ltr"}function Nf({children:e}){const t=a(new Set),i=If(),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,Lf(n.current.ownerDocument))||(e=t)}i.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)},[i]),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(Af.Provider,{value:c,children:e})}function Rf({active:e}){const t=a(null),n=h(Af);return l(()=>{if(n&&e)return n.requestFocus(t)},[e,t,n]),t}function Mf(){return h(Af)}function Df(e){return document.activeElement===e}const Of='\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 zf(e,t=!0){return!t&&e.matches(Of)?e:e.querySelector(Of)}function Bf(e,t=!0){if(!t&&e.matches(Of))return e;const n=e.querySelectorAll(Of);return n[n.length-1]}function Vf(e){const t=[...document.querySelectorAll(Of)],n=t.findIndex(t=>e===t);return n?t[n+1]:null}function Ff(){const{paymentLines:e}=qe(),n=ge().paymentMethods;return t(()=>{const t=e.value.at(0);if(!t)return null;const r="walletContent"in t.method?t.method.walletContent?.paymentMethodIdentifier:"popupEnabled"in t.method?t.method.paymentMethodIdentifier:void 0,a=n.value?.find(e=>"popupEnabled"in e&&e.popupEnabled&&e.paymentMethodIdentifier===r);return Vt()?null:a&&"name"in a?a.name:null})}var Uf={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 qf=nh(Fp(Hd(_(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:N="0",minInlineSize:R="0",opacity:M,overflow:D="visible",padding:O="none",paddingBlock:z,paddingInline:B,paddingBlockEnd:V,paddingBlockStart:F,paddingInlineEnd:U,paddingInlineStart:q,position:j="relative",insetBlock:H,insetInline:$,transform:Y,translate:W,zIndex:G,...J},K){const Q=p||I,X=jp(K,n(e=>{a&&e&&e.focus({preventScroll:!0})},[a])),{className:Z,style:ee,styleElement:te}=Qm({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:N,minInlineSize:R,padding:O,paddingBlock:z,paddingInline:B,paddingBlockEnd:V,paddingBlockStart:F,paddingInlineEnd:U,paddingInlineStart:q,position:j,transform:Y,zIndex:G},{transforms:{display:Q?xd:Cd}}),ne=Md(),{Element:re,role:ae}=oh(t,{defaultElement:ne?"span":"div"}),ie=w?b({[Uf.vars.containerNameVar]:w}):void 0;return d(jf,{condition:x,children:[te,d(re,{"aria-hidden":!("hidden"!==r&&!x)||void 0,"aria-label":e,className:v("exclusive"===r&&Uf.visuallyHidden,l&&s&&Uf.backgroundSizeVariant[s],l&&c&&Uf.backgroundPositionVariant[c],l&&Uf.backgroundRepeatVariant[u],S&&Uf.colorLayerVariant[S],w&&Uf.containerName,Q&&Uf.withAlignment,x&&Uf.inert,M&&Uf.opacityVariant[M],"hidden"===D&&Uf.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 jf({children:e,condition:t}){return null==t?d(y,{children:e}):d(Ld.Provider,{value:t,children:e})}var Hf={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 $f({size:e="base",appearance:t="auto",accessibilityLabel:n,id:r}){const a=Xc(),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(Hf.Spinner,t&&Hf.appearanceVariant[t],Hf.sizeVariant[o]),l=d("fill"===o||"large"===o?Yf:Wf,{...{"aria-label":n,"aria-hidden":n?void 0:"true"}});return i?d(y,{children:n}):d("div",{className:s,id:r,children:l})}function Yf(e){return d("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",className:Hf.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 Wf(e){return d("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",className:Hf.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 Gf={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 Jf=_(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}=Qm({display:o},{transforms:{display:Ed}});return d(y,{children:[k,d(b,{"aria-hidden":"hidden"===t||void 0,"aria-live":e,className:"exclusive"===t?Gf.accessibilityVisibilityVariant[t]:v(Gf.Text,a&&Gf.decorationVariant[a],s&&Gf.fontsVariant[s],c&&Gf.kerningVariant[c],p&&Gf.letterCaseVariant[p],m&&Gf.sizeVariant[m],g&&Gf.toneVariant[g],r&&("auto"===g||"neutral"===g)&&Gf.colorVariant[r],f&&Gf.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 Kf,Qf={primary:"_1m2hr9g1b _1m2hr9g17 _1fragem12d","shop-pay":"_1m2hr9g1c _1m2hr9g17 _1fragem12d",secondary:"_1m2hr9g1d _1m2hr9g18 _1fragem12d",tert
2iary:"_1m2hr9g1e _1m2hr9g19 _1fragem12d",plain:"_1m2hr9g1f _1m2hr9g1a _1fragem12p _1fragem12n _1fragem12d"},Xf={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 Zf=wm(Sm(Jp((Kf=_(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,N=ty(f)?()=>f?.():void 0,R=ty(y)?()=>y?.():void 0,M=ty(_)?()=>_?.():void 0,D=qp(T),O="auto"===x?"secondary":x,z="shop-pay"===O||"auto"===C?"neutral":C,{className:B,style:V,styleElement:F}=Qm({inlineSize:p},{transforms:{inlineSize:ey}}),U=id(),q=Xc(),{primaryButton:{border:j="none"},secondaryButton:{border:H="full"},link:{typographyDecoration:$="underline"}}=th(),Y=Td(),W=Nd(),G=rd().editor??!1,J=Boolean(a)&&!G,K="plain"===O,Q="in-menu"===O,X=!m&&J?"full":j,Z=(()=>{switch(O){case"tertiary":return"none";case"secondary":return H;default:return X}})(),ee=S||("monochrome"===z?"underline":$),te=v("_1m2hr9gj _1m2hr9gi _1fragem12w _1fragemws _1fragemyd _1fragem126 _1fragem12n _1fragem12p _1fragem12e _1fragemyk",(m||!J)&&!K&&!Q&&"neutral"===z&&Xf.colorLayerVariant[O],Qf[Q?"plain":O],!K&&Xf.sizeVariant[k],Z&&!K&&Xf.borderVariant[Z],("primary"===O||"shop-pay"===O)&&Xf.forcedColorsPrimaryFill,Xf.displayVariant[s],"text-bottom"===I&&Xf.verticalAlignVariant[I],Xf.toneVariant[z],B,(J||W)&&Xf.disabled,G&&a&&Xf.editorDisabled,W&&Xf.inert,m&&Xf.loading,Xf.textDecorationVariant[K?ee:"none"],P&&Xf.segmentVariant[P],Q&&Xf.inMenu,r),ne=h||U("processing"),re=d("span",{className:v(Xf.Content,u&&Xf.inlineAlignmentVariant[u]),"aria-hidden":m||void 0,children:n}),ae=d("span",{className:v(Xf.LoadingContent,u&&Xf.inlineAlignmentVariant[u],!q&&Xf.Spinner),dir:"auto",children:[d($f,{accessibilityLabel:ne}),"extended"===g&&!q&&d("span",{className:Xf.ExtendedLoadingContent,dir:"auto",children:d(Jf,{children:ne})})]}),ie=Vu(),oe=ie?.activatorAttributes,se=void 0!==m;if(L&&void 0===o)return d(Rd.Provider,{value:!0,children:[F,d(Zm,{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:V,target:w,...A,children:[re,m&&ae]})]});const le=Wp(ie,{onClick:N,onFocus:R,onMouseEnter:M});return d(Rd.Provider,{value:!0,children:[F,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:V,type:o?"button":E,tabIndex:W?-1:void 0,...le,...oe,...A,children:[re,m&&ae]})]})}),_((e,t)=>
2{switch(h(Mu)){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(Kf,{...n,ref:t})})}case"Sheet":{const n={...e,size:"small"};return d(Kf,{...n,ref:t})}case"Banner":{const n={...e,tone:"auto"===e.tone||void 0===e.tone&&"plain"!==e.variant?"monochrome":e.tone};return d(Kf,{...n,ref:t})}default:return d(Kf,{...e,ref:t})}})))));function ey(e){if("legacy-default"!==e)return"fill"===e?"100%":yd("auto"===e?"fit-content":e)}function ty(e){return"function"==typeof e}var ny={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 ry({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"}}=th(),P="text-bottom"===f?ny.verticalAlignVariant[f]:void 0;return o&&void 0===r?d(Zm,{ariaLabel:e,ariaLive:t,command:n,commandFor:r,className:v(ny.Link,ny.toneVariant["auto"===g?"neutral":g],ny.textDecorationVariant[h||("monochrome"===g?"underline":b)],ny.displayVariant[i],P),href:o,id:s,lang:l,onClick:c,onFocus:u,onMouseEnter:p,overlay:y,target:m,..._,children:a}):d(Zf,{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 ay={Stack:"r0qqvk1 r0qqvk0 _1fragemws _1fragem64",overflowHidden:{hidden:"r0qqvk3 r0qqvk2 _1fragemup _1fragemv4",visible:"r0qqvk4"}};const iy=nh(Fp(_(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:N,paddingBlockEnd:R,paddingBlockStart:M,paddingInlineEnd:D,paddingInlineStart:O,rowGap:z,...B},V){const{className:F,style:U,styleElement:q}=Qm({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:R,paddingBlockStart:M,paddingInline:N,paddingInlineEnd:D,paddingInlineStart:O,rowGap:z},{transforms:{display:xd,flexDirection:e=>"block"===e?"column":"row",flexWrap:e=>"block"===e?"nowrap":"wrap"}}),j=Md(),{Element:H,role:$}=oh(n,{defaultElement:j?"span":"div"});return d(y,{children:[q,d(H,{className:v(ay.Stack,ay.overflowHidden[A],F,g),role:$,"aria-label":t,"aria-current":e,"aria-labelledby":r,style:U,id:k,...B,ref:V,children:h})]})})));var oy="_1fyvcoo0 _1fragemwn _1fragem11z _1fragem11k";function sy({children:e}){const t=a(null),n=a(null),r=a(null),i=a(document.activeElement);l(()=>{const e=r.current;if(e){const t=zf(e);t?t.focus():e.focus()}const t=i.current;if(t)return()=>{t.focus()}},[]);const o=e=>{const t=r.current;if(t){const n=e?zf(t):Bf(t);n?n.focus():t.focus()}};return d(y,{children:[d("button",{className:oy,ref:t,"aria-hidden":"true",onFocus:()=>o(!1),type:"button"}),I(e,{tabIndex:-1,ref:r}),d("button",{className:oy,ref:n,"aria-hidden":"true",onFocus:()=>o(!0),type:"button"})]})}const ly="scrollbar-gutter",cy="stable";function uy(){const[e,t]=s(!1),r=a(0),o=a(null),l=a(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(ly),!t?.split(/\s+/).includes(cy));var t}(e))return null;const t=e.style.getPropertyValue(ly);return e.style.setProperty(ly,cy),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(ly,n):e.style.removeProperty(ly),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 i(()=>()=>{u()},[u]),{isLocked:e,lock:c,unlock:u}}function dy({children:e,isInvisible:n,onClick:r}){const{lock:a}=uy(),{i18n:o}=ae();i(()=>{a()},[a]);const s=t(()=>n?.value??!1),l=d("div",{children:d(x,{when:s,fallback:d(y,{children:[d("div",{className:"hYGiX"}),d("div",{className:"UGCQu",children:e})]}),children:d("div",{className:"yF8Vq",onClick:r,role:"button",tabIndex:0,"aria-label":o.translate("wallets.scrim.cancel"),onKeyDown:e=>{"Escape"!==e.key&&"Enter"!==e.key||!r||r()},children:e})})});return d(uu,{children:d(sy,{children:l})})}function py({isOpen:e,isInvisible:t,children:n,onClick:r}){return d(x,{when:e,children:d(dy,{isInvisible:t,onClick:r,children:n})})}function my({isOpen:e,walletName:t,handleClose:n,handleFocus:r}){return d(py,{isOpen:e,children:d(hy,{handleClose:n,walletName:t,handleFocus:r})})}function hy({handleClose:e,handleFocus:t,walletName:n}){const{i18n:r}=ae();return d(qf,{children:d(iy,{gap:"large-400",alignItems:"center",children:[d(Jf,{size:"large",children:r.translate("wallets.scrim.continue_purchase_in_window",{walletName:t?d(ry,{tone:"monochrome",onClick:t,children:n}):n})}),d(Jf,{children:[d(ry,{tone:"monochrome",onClick:e,children:r.translate("wallets.scrim.cancel")})," ",r.translate("wallets.scrim.and_return_to_checkout")]})]})})}function gy(){const{checkout:{offsitePopupController:e}}=ae(),t=Ff();return d(my,{isOpen:e.isOpen,walletName:t.value??"",handleClose:()=>e.close({runCancelCallback:!0}),handleFocus:()=>e.focus()})}const fy=new Set(["coordinates","name","oneTimeUse","handle"]),yy=new Set(Object.values(Ft).flat());function vy(e){return!fy.has(e)}function _y({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(Ut({country:i,editFormat:i.formatting.edit,addressSettings:t})):void 0;for(const s of Object.keys(e))if(vy(s)&&!yy.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 by=ne("RequestContext");function Py(){return re(by)}const ky=["AE","HK","IE","ZA","ES","KR","PA","PT","ID","TH","CN","JP"],Sy=["JP"];function wy(e,{hiddenFields:t,multiline:n,countryFormat:r,displayName:a}={}){const i=Ey(e,a);if(!i)return;const{addr:o,details:s,zoneFormat:l}=i;return qt(o,s,t,n,r,l)}function Cy(e,{hiddenFields:t,countryFormat:n,displayName:r}={}){const a=Ey(e,r);if(!a)return;const{addr:i,details:o,zoneFormat:s}=a;return jt(i,o,t,n,s)}function Ey(e,t){const{i18n:n}=ae(),{details:r}=zt(e?.countryCode);if(!e)return;if(!r&&e.countryCode)return;const a=r??Ht(void 0,n),i=e.countryCode&&ky.includes(e.countryCode)?"explicit":"short";return{addr:t??!0?e:{...e,firstName:void 0,lastName:void 0},details:a,zoneFormat:i}}function xy(e){const{details:t,loading:n}=zt(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 Iy(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 Ay=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}},Ty=(e,t)=>({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 Ly(e,t,a,i){const{i18n:o,checkout:s}=ae(),{geolocation:l}=Py(),c=s.configuration.addressSettings.nonBillingAddressSettings.value,u=ge().deliveryNext,{details:d}=zt(e),{getIsMobilePhoneFieldVisible:p}=Ny(),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)=>$t(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 Ny=()=>{const{checkout:{identity:e},shopPay:t}=ae(),r="shopPay"===e.current.value,a=t.user.isAuthenticatedUser;return{getIsMobilePhoneFieldVisible:n(e=>r&&!a.value&&"shipping"===e,[r,a])}};function Ry(){const{shippingAddress:e}=qe(),{i18n:n}=ae();return t(()=>{const t=e.fields.firstName.value,r=e.fields.lastName.value,a=e.value.oneTimeUse;return Wt(t)&&Wt(r)&&!a?n.formatName(t,r,!0):null})}function My(e,t,n,r){const{i18n:a}=ae();
2return 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 Dy({address:e,nameLinePosition:t,addressDisplayName:n,showPhone:r}){const{countryCode:a=""}=e,{details:i,loading:o}=zt(a),{i18n:s}=ae();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=By([o,s]),y=By([l,c]),v=By([u,m??"",d,h],", ");if(r){const t=Sy.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 By([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=By([e,t]);return i}({firstName:o,lastName:s,countryDetails:r,locale:a});const l=["address1","address2","firstName","lastName","company",...i?[]:["phone"]];y=qt(e,r,["city","zoneCode","postalCode","countryCode","firstName","lastName","company","phone"],!1,n.countryFormat,n.zoneFormat).replace(/\s+/g," "),v=qt(e,r,l,!1,n.countryFormat,n.zoneFormat).replace(/\s+/g," ")}return n?{nameLine:f,companyLine:g,primary:n,secondary:By([y,v])}:{nameLine:f,companyLine:g,primary:By(["inline"===t?f:"",g,y],", "),secondary:v}}(e,t,n,o?void 0:i,s.locale,r)}function Oy(e){const t=qe()[`${e}Address`].value,{primary:n,secondary:r}=Dy({address:t,nameLinePosition:"inline"});return`${n} ${r}`}function zy(e,t){const{checkout:r}=ae(),a=t??r.configuration.addressSettings.nonBillingAddressSettings.value,{details:i}=zt(e);return n((e,t)=>Yt({addressType:e,violations:t,countryDetails:i,format:i?r.address.extendedAddressMode.getFormatFromCountry(i):void 0,addressSettings:a}),[i,a,r.address.extendedAddressMode])}function By(e,t=" "){return e.filter(Boolean).join(t)}function Vy(e){return"string"==typeof e?""!==e.trim():null!=e}function Fy(e){return Object.entries(e).filter(([e,t])=>vy(e)&&Vy(t)).map(([e])=>e)}function Uy(e){return Vy(e.address1)||Vy(e.streetName)}function qy(e){const t=Object.fromEntries(Object.entries(e).filter(([t,n])=>vy(t)&&Vy(n)&&!function(e,t,n){if("string"!=typeof n)return!1;if("address1"===t){const t=en({countryCode:e.countryCode,address1:void 0,address2:void 0,line2:void 0,streetName:e.streetName,streetNumber:e.streetNumber});return Vy(t)&&n.trim()===t?.trim()}if("address2"===t){const t=tn({countryCode:e.countryCode,address1:void 0,address2:void 0,line2:e.line2,neighborhood:e.neighborhood});return Vy(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 Zt(JSON.stringify(t))}function jy(e,t,n,r,a,i,o){o.monorailEvent({schemaId:"checkout_address_completion/1.0",payload:{shopId:parseInt(se(r),10),checkoutToken:a||"unknown",country:e||"unknown",section:n,completedFields:t,isBillingDefaultToShippingAddress:i}})}function Hy(){const e=qe().shippingAddress.value,t=!nn(e),n=wy(e,{hiddenFields:["phone"]});return!t&&n?n:null}function $y(e){return"failed"===e.status}function Yy(e){return"payment"===e.type}function Wy(e,t){return e&&t&&e.id===t.id&&e.status===t.status}function Gy(e){return"action_required"===e.status&&"complete_payment_challenge"===e.action.type}function Jy(e){return"action_required"===e.status&&"complete_payment_challenge_v2"===e.action.type}function Ky(e){return"complete_payment_challenge"===e.type}function Qy(e){return"complete_payment_challenge_v2"===e.type}function Xy(e){return{receiptId:e?.id?ue(e.id)??e.id:void 0,status:e?.status}}function Zy(e=[]){return e?.flatMap(e=>"submitted"===e.status?e.remotePurchaseOrder.deliveryLines?.map(t=>({...t,shopId:e.shopId}))??[]:[])??[]}function ev(e){return e.some(({code:e})=>new Set([...rn,...an]).has(e))}function tv(e){return e.some(({code:e})=>on.has(e))}function nv(e){return e.some(e=>sn.has(e.code)&&"RemoveTermViolation"===e.__typename)}function rv(e){return e.some(e=>ln.has(e.code)&&"RemoveTermViolation"===e.__typename)}function av(e){const t=dv({subscribedViolations:e,onlySubscribeToProgression:!0}),{violations:n,negotiationStage:r}=t.snapshot.value;return{hasViolations:n.size>0,violations:n,negotiationStage:r,clearViolations:t.clearViolations}}function iv(e){const t=ov(e);return{violations:t.violations.value,hasViolations:t.violations.value.size>0,clearViolations:t.clearViolations}}function ov(e){return dv({subscribedViolations:e,onlySubscribeToProgression:!1})}function sv(e){const t=lv(e);return{violations:t.violations.value,hasViolations:t.violations.value.size>0}}function lv(e){return dv({subscribedViolations:e,onlySubscribeToProgression:!0,skipProgressionNegotiations:!0})}function cv(e){const t=uv(e);return{violations:t.violations.value,hasViolations:t.violations.value.size>0}}function uv(e){const{checkout:{wallets:t}}=ae(),n=ov(e);return k(()=>{t.activeSession.value&&n.violations.value.size>0&&o(()=>{n.clearViolations()})}),n}function dv({subscribedViolations:e,onlySubscribeToProgression:r,skipProgressionNegotiations:a}){const{observability:o,checkout:{wallets:s}}=ae(),{lastJourneyProgression:l,lastNegotiation:c}=he(),u=r?l:c,d=m({violations:new Set}),p=t(()=>d.value.violations),h=n(()=>{d.value={violations:new Set}},[d]),g=T(e);return i(()=>u.subscribe(e=>{if(s.activeSession.value)return;if("invalid"===e.type)return void o.log("violations_subscription_invali
2d_result_detected","Not updating violation subscription because of invalid result",{reasons:e.reasons,beforeViolations:p.value});if("error"!==e.type&&"success"!==e.type)return;if(a&&"progression"!==e.negotiationStage&&"completion"!==e.negotiationStage)return;const t=g.value.size>0,n=e.violations.filter(e=>!t||g.value.has(e.code));d.value={violations:new Set(n),negotiationStage:e.negotiationStage}}),[g,o,s,u,a,d,p]),{snapshot:d,violations:p,clearViolations:h}}function pv(e){const{checkout:t,embed:r}=ae(),o=t.wallets.activeSession.value,l=t.latestReceipt.value,{delegatedPaymentInstrument:c}=Je(),[u,d]=s(),p=a(c.peek()),m=n(()=>{d(void 0)},[]),h=n(t=>{e.has(t.code)?d(t.code):d(void 0)},[e]);return i(()=>{o||"failed"===l?.status&&"payment"===l.failure?.type&&h(l.failure)},[o,h,l]),i(()=>{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 mv(e){if("failed"===e?.status&&"hsa_qualification"===e.failure.type&&"SURVEY_EXITED"!==e.failure.code)return e.failure}function hv(){const{checkout:e}=ae(),t=e.wallets.activeSession.value,n=e.latestReceipt.value,[r,a]=s(()=>t?void 0:mv(n));return i(()=>{t||a(mv(n))},[t,n]),{error:r,hasError:void 0!==r}}function gv(){const{checkout:e}=ae(),t=e.wallets.activeSession.value,n=e.latestReceipt.value,[r,a]=s(!1);return i(()=>{t||("failed"===n?.status&&"inventory"===n.failure?.type?a(!0):a(!1))},[t,n]),{hasError:r}}function fv(){const{checkout:e}=ae(),t=e.wallets.activeSession.value,n=e.latestReceipt.value,[r,a]=s(!1);return i(()=>{t||("failed"===n?.status&&"order"===n.failure?.type?a(!0):a(!1))},[t,n]),{hasError:r}}function yv(e){const{allViolations:n}=ge();return t(()=>Boolean(n.value?.some(t=>t.code===e)))}function vv(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 _v(){const e=Yg(),{message:t,code:n}=function(){const{checkout:e}=ae(),t=e.wallets.activeSession.value,n=e.latestReceipt.value,[r,a]=s(null),[o,l]=s("");return i(()=>{t||n&&$y(n)&&("payment"===n.failure.type?(a(n.failure.code??null),l("payment_receipt_error")):l(`${n.failure.type}_receipt_error`))},[n,t]),{hasError:Boolean(o),message:o,code:r}}();i(()=>{(t||n)&&e("receiptError",{error:{message:t,code:n||"",silencedViolation:!1,origin:"server",type:"submit-violation"},timestamp:new Date})},[e,t,n]);const{directPaymentErrors:r,generalPaymentError:a}=qe();k(()=>{const t=r.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=r.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=r.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=r.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=a.value;t&&o(()=>{e("paymentError",{error:{message:t,code:"general_payment_error"},timestamp:new Date})})});const l=function(){const[e,t]=s([]),[n,r]=s(null),{violations:a}=av(new Set);return hc(e=>{"invalid"===e.type?r(e):r(null)}),i(()=>{let e=null;if(n){const t=n.reasons.filter(e=>e!==Kt.InvalidAddress)[0];t&&(e={message:t,origin:"server",type:"negotiation"})}const r=[];Array.from(a).forEach(e=>{r.push({message:e?.localizedMessage??"",code:e?.code,origin:"server",type:"negotiation"})});const i=[...r];e&&i.push(e),t(i.filter(e=>Boolean(e)))},[n,a]),e}();i(()=>{l?.forEach(({message:t,code:n,field:r,origin:a,type:i})=>
2{e("violationError",{error:{message:vv(t),code:n,field:r,origin:a,type:i},timestamp:new Date})})},[e,l]);const{deliveryMethodsAddressErrors:c}=Je(),u=function(e){const[t,n]=s(null),[r,a]=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})})}),i(()=>{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})}),a(e)}},[t]),r}(c);return i(()=>{u?.forEach(({message:t,code:n,field:r,origin:a,type:i})=>{(t||n||r||a||i)&&e("addressError",{error:{message:vv(t),code:n,field:r,origin:a,type:i,silencedViolation:!1},timestamp:new Date})})},[e,u]),null}function bv(e){return e}function Pv(e,t){if(t)return e.find(e=>e.deliveryStrategyHandle===t)}var kv=(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))(kv||{});function Sv(){const{client:e,shop:t}=ae();if(!t.hasFlagEnabled(mn))return null;const n=e.unstable_getSerialization("experiments");return hn(n)}function wv(){const{shop:e}=ae(),t=e.hasFlagEnabled(gn),n=e.hasFlagEnabled(mn);return t||n}function Cv(e){return"thankYou"===e?.type||"postPurchase"===e?.type}function Ev(e,t){return void 0!==e.greenPath.find(e=>e.route===t)}const xv=()=>{const{i18n:e}=ae(),n=ge().paymentFlexibilityPaymentTermsTemplate,r=pt();return t(()=>{const t=n.value;return r.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})},Iv=ne("ShellContext");function Av({children:e,shell:t}){return d(Iv.Provider,{value:t,children:e})}function Tv(){return re(Iv)}function Lv(){const e=Tv(),t=a();if(null!=t.current&&t.current.shell!==e&&(t.current=void 0),null==t.current){const n=new Map,r={};for(const t of Object.keys(e.configuration))Object.defineProperty(r,t,{enumerable:!0,get:()=>(n.has(t)||n.set(t,P(()=>e.configurationSignal.value[t])),n.get(t).value)});t.current={shell:e,watchedKeysSignals:n,reactiveConfiguration:r}}return t.current.reactiveConfiguration}function Nv(){const{checkout:{configuration:e}}=ae(),{orderSummary:t}=Lv(),n=e.orderSummary?.currencyBadgeVisibility??t.currencyBadgeVisibility;return!n||"VISIBLE"===n}function Rv(e){const{checkout:t,observability:a,router:i,shop:o}=ae(),s=void 0===e||(Array.isArray(e)?e:[e]).some(e=>o.hasFlagEnabled(e)),l=n(e=>{s&&(t.unstable_forceCheckoutLayoutToOnePage(),Mv(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 Mv(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 Dv(){const{i18n:e}=ae(),n=function(){const e=ge().paymentMethods,n=kn("paymentMethods");return t(()=>!(n.value||!e.value||0===e.value?.length)&&Boolean(e.value?.every(e=>"wallet"===e.type||"walletsPlatform"===e.type||"giftCard"===e.type)))}(),{availableWallets:r}=_n(),a=T(r);return t(()=>{if(!(a.value.length>0)&&n.value)return{code:kv.PaymentSheetViolations,tone:"critical",localizedMessage:e.translate("payment.no_working_method_error"),nonLocalizedMessage:e.translate("payment.no_working_method_error")}})}function Ov(){const e=eh(),n=Tv(),r=nm();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&&!vn(e));if(s)return s.l<50?"light":"dark";const l=a.colorScheme?t.schemes?.[a.colorScheme]?.base?.background:void 0;return l&&!vn(l)&&l.l<50?"light":"dark"}).value}function zv(){const{shop:{customerAccountRequirement:e}}=ae(),n=ge().buyerIdentity,{email:r}=qe();return t(()=>{const t=Boolean(!!n.value?.customerProfile&&(n.value.customerProfile.email||r.value));return!("REQUIRED"===e||t)})}function Bv(){const{shop:e}=ae(),{deliveryNext:n}=ge(),{deliveryLines:r}=qe(),a=pc(),i=Tt("ONE_TIME_PURCHASE");return t(()=>{if(e.shipPickupInOneOrderEnabled){if(Cv(a.value.currentDetour))return fn(n.value);const e=r.value.filter(e=>!e.value.deliveryMethodTypes.includes("NONE"));return e.length>0&&e.every(e=>e.value.deliveryMethodTypes.some(yn))}const t=Lt(i.value);return yn(t?.methodType)})}function Vv(){const{checkout:e}=ae(),n=Bv();return t(()=>!n.value&&e.isShippingRequired.value)}function Fv(e){const n=ge().paymentMethods;return t(()=>n.value?.find(t=>"wallet"===t.type&&t.name===e))}function Uv(){const{client:e,shop:t,source:r,observability:a}=ae(),i=e.unstable_getSerialization("sessionToken");return n(({postalCode:e,countryCode:n,city:o,zoneCode:s},l)=>{const c={wallet:l,postalCode:e,countryCode:n,city:o,zoneCode:s,shopI
2d:t.id,sourceId:r.sourceId,sourceType:r.type,checkoutSessionIdentifier:r.checkoutSessionIdentifier,sessionToken:i};Zl(e,n)||a.log("wallets_hooks_incomplete_postal_code_detected","Detected incomplete shipping postal code during wallet payment submission",c),Cn(e,n)&&a.log("wallets_shipping_address_invalid_postal_code_detected","Detected padded postal code from wallet payment submission",c)},[a,t.id,r.sourceId,r.type,r.checkoutSessionIdentifier,i])}function qv(){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 jv(){return 1e4*qv()}function Hv(){return 45e3*qv()}function $v(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 Yv({applePayPaymentSheetError:e,applePaySubscriptionReviewTransition:t,isApplePaySubscriptionReviewLayoutSupported:n}={}){const{checkout:a,router:o,shop:s}=ae(),l=o.currentUrl.value,c=wv(),u=s.hasFlagEnabled(mn),d=Sn(),p=s.hasFlagEnabled(bn),m=a.configuration.layout.isOnePage.value,{forceOnePageCheckoutLayout:h}=Rv(bn),{queryParam:g,errorMessage:f,errorTitle:y,tone:v}=function(e){const{i18n:t}=ae(),n=wv(),r=xv().value,a=[{queryParam:"wallet_unsupported_apple_pay_payment_method",errorMessage:t.translate("wallets.errors.unavailable_terminal.instructions"),tone:"critical"},{queryParam:"wallet_unsupported_google_pay_payment_method",errorMessage:t.translate("wallets.errors.unavailable_terminal.instructions"),tone:"critical"},{queryParam:"wallets_payment_invalid_country",errorMessage:t.translate("wallets.errors.generic"),tone:"critical"},{queryParam:"wallet_shipping_country_unavailable",errorMessage:t.translate("shipping_errors.unavailable_address_country"),tone:"critical"},{queryParam:"wallet_currency_change",errorMessage:t.translate("change_country.cart_updated_based_on_country"),tone:"info"},{queryParam:"wallet_captcha_required",errorMessage:t.translate("captcha.errors.not_solved"),tone:"info"},{queryParam:"wallet_payment_method_not_applicable",errorMessage:r||"",tone:"info",condition:()=>Boolean(r)},{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",condition:()=>n},...["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 i of a)if(e.searchParams.has(i.queryParam)){if(i.condition&&!i.condition())continue;return{queryParam:i.queryParam,errorMessage:i.errorMessage||"",errorTitle:i.errorTitle,tone:i.tone}}return{queryParam:"",errorMessage:"",tone:"info"}}(l),_=Sv(),b=g===Pn&&void 0!==t&&(n??ec({applePaySubscriptionsDecelerationActive:c,applePayThreePageVaultedReviewEnabled:p,isOnePageCheckout:m})),P=b;return i(()=>{if(g){b&&t&&!a.wallets.hasConsumedApplePaySubscriptionReviewParam.value&&wn({isABTestActive:u,variant:_,isCaliforniaBillingOrShippingAddress:d.value})?(m||h({wallet:"APPLE_PAY",reason:"subscriptions",asPaymentMethod:!0}),a.wallets.consumeApplePaySubscriptionReviewParam(),e&&(e.value=void 0),t.value="storefront_redirect",a.wallets.setHasActiveApplePaySubscriptionReview(!0)):b&&void 0!==t?.value&&!a.wallets.hasConsumedApplePaySubscriptionReviewParam.value&&(t.value=void 0,a.wallets.setIsDecelerating(!1));const n=new URL(l);n.searchParams.delete(g),history.replaceState(null,"",n.href)}},[e,t,_,l,h,u,d,m,g,P,b,n,a.wallets]),r(()=>({queryParam:g,errorMessage:f,errorTitle:y,tone:v,shouldSuppressNotice:P}),[g,f,y,v,P])}const Wv=()=>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,
2clientX:n,clientY:r,screenX:window.screenX+n,screenY:window.screenY+r}))}},[]);En.portableWallets.url;const Gv="guest";function Jv(e){const n=ge().paymentMethods;return t(()=>n.value?.find(t=>"walletsPlatform"===t.type&&t.name===e))}function Kv(e){const n=ge().paymentLines;return t(()=>n.value?.lines.find(t=>"walletsPlatformPaymentMethod"===t.method.type&&t.method.name===e))}function Qv(){const{email:e,shippingAddress:t,billingAddress:r,billingAddressOption:a,paymentLines:i}=qe(),o=function(){const{checkout:e}=ae(),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((n,s)=>{s.email&&(e.value=s.email),s.prefillingShippingAddress&&o({addressSignal:t,buyerDetailsAddress:s.prefillingShippingAddress}),s.prefillingBillingAddress&&(a.value="custom",o({addressSignal:r,buyerDetailsAddress:s.prefillingBillingAddress})),s.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 In.AmazonPay:case In.BuyWithPrime:{const[e]=pn(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=An(i,a)}({paymentLineSignal:i,walletName:n,walletParams:s.walletParams,email:s.email??void 0})},[r,a,e,o,i,t])}function Xv(e=["phone"]){const{shippingAddress:t}=qe(),n=t.value;return{formattedAddress:wy(n,{hiddenFields:e}),address:n}}function Zv(){const e=Jv(In.BuyWithPrime);return t(()=>{const{configurationParams:t}=e.value??{configurationParams:{}},{checkoutSupportsSplitCart:n}=t;return Boolean(n)})}var e_=(e=>(e.Api="ApplePay::Exception::API",e))(e_||{}),t_=(e=>(e.Api="PayPal::Exception::API",e.Sdk="PayPal::Exception::SDK",e.Button="PayPal::Exception::Button",e))(t_||{}),n_=(e=>(e.Available="available",e.Loading="loading",e.Error="error",e))(n_||{});function r_(e,t,n){return!("SHOP_PAY"===e&&!n)&&(t?.includes("ACCELERATED_CHECKOUT")??!1)}function a_(e){const{embed:t}=ae(),n=Boolean(t?.isFlagshipPartner)&&!Tn(t?.embedder),a=e.buttonStatus.value;return r(()=>"error"!==a.status&&"not_eligible"!==a.status&&(!n||"not_rendered"!==a.status),[a.status,n])}function i_(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 o_(e,t=0){const n="undefined"==typeof window?0:window.innerWidth;return n<=279?2:n<=375?e||3===t?3:2:4}function s_(){const{shop:{shopPayEnabledForPrimarySellerOfRecord:e}}=ae(),{shopPayEnabledForSellerOfRecord:n}=ge();return t(()=>n.value??e)}function l_(){const{shop:{hasMultipleLegalEntities:e},checkout:{identity:n}}=ae(),r=s_(),a=Dn(),{deferredTotal:i}=ge(),o=n.current;return t(()=>a.value&&i.value?"deferred_payment":"shopPay"===o.value&&e||r.value?void 0:"shop_pay_disabled")}function c_(){const e=l_();return t(()=>void 0===e.value)}function u_(e){const{inMemoryGooglePayParts:o,inMemoryPayPalParts:s,inMemoryAmazonPayParts:l,inMemoryApplePayParts:c,inMemoryVenmoParts:u}=e,{value:d}=ge().paymentMethods,p=d?.some(e=>"wallet"===e.type&&"APPLE_PAY"===e.name)??!1,m=function(e){const n=$v(e);return t(()=>null!==n.value)}(e);!function(e){const t=$v(e),n=e.didIncrementUnusablePartialAddressMetric,{observability:r}=ae();i(()=>{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 h=m.value,g=function({inMemoryGooglePayParts:e,hasUnusablePartialAddress:t}){const{checkout:n,shop:a}=ae(),{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(Ln);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])}
2({hasUnusablePartialAddress:h,inMemoryGooglePayParts:o}),f=function({hasApplePayPaymentMethod:e,hasUnusablePartialAddress:t,inMemoryApplePayParts:n}){const i=Py().geolocation.country.code,{shop:o,observability:s,client:{userAgent:l},embed:c}=ae(),u=o.hasFlagEnabled(Nn)?c?.client?.embedderHostname:void 0,d=a(),p=Cf(),m=Rt().value,[h]=Yh(),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=Rn(e);return Boolean("Safari"===t?.name&&t.version&&Number(t.version)>=17)}(a);if(!e||!t)return!1}const o=Boolean(window.ApplePaySession)&&i_(t,"hasOwnProperty",()=>ApplePaySession.hasOwnProperty("canMakePayments"))&&function(e){return"function"==typeof ApplePaySession.supportsVersion&&i_(e,"supportsVersion",()=>ApplePaySession.supportsVersion(Mn))}(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:i,observability:s,slowCanMakePaymentCache:d,isCheckoutEditor:p,userAgent:l,embedderHostname:u}),[e,t,n.sessionLoadFailed.value,m,g,i,s,d,p,l,u])}({hasApplePayPaymentMethod:p,hasUnusablePartialAddress:h,inMemoryApplePayParts:c}),y=function(e){const n=e.sdkStatus,r=e.buttonStatus;return t(()=>n.value.status!==n_.Error&&"error"!==r.value.status)}(l),v=y.value,_=function({inMemoryAmazonPayParts:e}){const n=function(){const e=ge().deliveryNext;return t(()=>{const t=e.value;if(!t||"unavailable"===t.status)return!1;const n=t.lines.filter(He);if(1!==n.length)return!1;const[r]=n;return!!r&&r.methods.some(e=>"LOCAL"===e.methodType)})}(),r=Zv(),a=e.sdkStatus,i=e.buyWithPrimeButtonStatus;return t(()=>r.value&&!n.value&&a.value.status!==n_.Error&&"error"!==i.value.status)}({inMemoryAmazonPayParts:l}).value,b=t(()=>function(e){const{status:t}=e;return"error"!==t&&"not_eligible"!==t}(u.buttonStatus.value)).value,P=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),k=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),S=c_().value,{client:{userAgent:w}}=ae(),C=r(()=>{const e=function(){const e=d?.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 f;case"GOOGLE_PAY":return g;case In.BuyWithPrime:return _;case In.AmazonPay:return v;case"SHOP_PAY":return S;case"SHOPIFY_INSTALLMENTS":return!1;case"VENMO":return b;default:return L(t)}}(e))??[];return d_(e)}().flatMap(e=>k(e)??[]).flatMap(e=>P(e)??[]),t=function({maxWalletButtonCount:e,userAgent:t}){if(""===t)return On;function n(t=[]){const n=t.indexOf(In.BuyWithPrime);-1!==n&&(n<e||(t.splice(n,1),t.splice(e-1,0,In.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",In.BuyWithPrime,In.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",In.BuyWithPrime,In.AmazonPay,"GOOGLE_PAY","APPLE_PAY","VENMO"];
2if(t.match(/Android/i)){const e=["SHOP_PAY","PAYPAL_EXPRESS","GOOGLE_PAY",In.BuyWithPrime,In.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",In.BuyWithPrime,In.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",In.BuyWithPrime,In.AmazonPay,"GOOGLE_PAY","APPLE_PAY","VENMO"];if(t.match(/Facebook|Instagram|Firefox iOS/)){const e=["SHOP_PAY","PAYPAL_EXPRESS","APPLE_PAY",In.BuyWithPrime,In.AmazonPay,"GOOGLE_PAY","VENMO"];return n(e),e}return t.match(/IE/),["SHOP_PAY","PAYPAL_EXPRESS",In.BuyWithPrime,In.AmazonPay,"APPLE_PAY","GOOGLE_PAY","VENMO"]}({maxWalletButtonCount:o_(S,e.length),userAgent:w});return e.sort((e,n)=>t.indexOf(e.name)-t.indexOf(n.name))},[d,f,g,_,v,b,P,k,S,w]);return C}const d_=e=>e.find(e=>e.name===In.BuyWithPrime)?e.filter(e=>e.name!==In.AmazonPay):e;function p_(){const e=ge().paymentMethods,n=kn("paymentMethods");return t(()=>!(n.value||!e.value||0===e.value?.length)&&Boolean(e.value?.some(e=>"wallet"===e.type||"walletsPlatform"===e.type)))}function m_(){const{checkout:e,source:n}=ae(),{didIncrementUnusablePartialAddressMetric:r,inMemoryGooglePayParts:a,inMemoryPayPalParts:i,inMemoryVenmoParts:o,inMemoryApplePayParts:s,inMemoryAmazonPayParts:l,inMemoryShopPayParts:c}=_n(),u=T(u_({inMemoryGooglePayParts:a,inMemoryPayPalParts:i,inMemoryVenmoParts:o,inMemoryApplePayParts:s,inMemoryAmazonPayParts:l,didIncrementUnusablePartialAddressMetric:r})),d=T(a_(c)),p=t(()=>u.value?.filter(({placements:e,name:t})=>r_(t,e,d.value)).length),m=p_();return t(()=>e.configuration.visibility.showExpressCheckout.value&&(p.value>0||"simulated"===n.type&&!p.value&&m.value))}const h_=f({swappable:new Set,fixed:new Set,supported:new Set,disabled:new Set});function g_({children:e}){const t=f_();return d(h_.Provider,{value:t,children:e})}function f_(){const e=m_(),{shop:{acceptTipPayments:t},checkout:n}=ae(),a=n.configuration.layout.isOnePage.value,i=Fn(n.identity.current.value),o=!kn("isShippingRequired").value&&!n.isShippingRequired.value;return r(()=>function({showExpressCheckout:e,isOnePageCheckout:t,acceptTipPayments:n,disableDeliveryExtensions:r,isVaultedWalletIdentity:a}){const i=new Set(Vn),o=new Set([...zn,...Bn]),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 y_=new Map([["thankYou",[...zn,...Bn]]]),v_=w({suspenseName:"extensions",id:()=>"ExtensionsInner",displayName:"ExtensionsInner",load:()=>fl(()=>import("./33682ee7.C-Y_Biui.js"),__vite__mapDeps([15,1,10,2,3,4,5,16,17,18,8,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,11,53,7,9,12]))});function __(e){const{checkout:{extensibility:{ui:t}}}=ae();return d(g_,{children:d(x,{when:t.enabled,fallback:e.children,children:d(v_,{...e})})})}const b_=ne("PostPurchaseContext");function P_({children:e}){const{shop:{postPurchase:{extensionAvailable:t,developmentModeAvailable:n}},router:a}=ae(),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(b_.Provider,{value:c,children:e})}function k_(){return re(Un)}function S_({children:e}){const{router:t,checkout:{negotiator:n}}
2=ae(),r=n.initializationError.value,{data:a,loading:o}=k_();if(r)throw r;const s=a?.session?.negotiate?.result,c="CheckpointDenied"===s?.__typename;if(l(()=>{n.prepareStartup()},[n]),i(()=>{n.runStartup()},[n]),null==a&&o)return null;if(c){const e=qn(s.redirectUrl,"undefined"==typeof window?t.currentUrl.value.toString():void 0);return"undefined"==typeof window?t.redirect(e):window.location.assign(e.href),null}return d(jn.Provider,{value:n,children:e})}function w_({checkout:e}){if(!e.configuration.layout.isOnePage.value)return!1;const t=e.unstable_graphqlDataRequestInfo?.checkoutSheetProtocolConfig?.schema;return Boolean(t&&Hn.has(t))}function C_({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 E_({children:e}){return d(y,{children:e})}const x_={"checkout-sheet":w({displayName:"CheckoutSheetProtocolProvider",renderError:T_,renderLoading:E_,load:()=>C(()=>fl(async()=>{const{CheckoutSheetProtocolProvider:e}=await(import("./0fb2c600.DURonCiC.js"));return{CheckoutSheetProtocolProvider:e}},__vite__mapDeps([54,1,2,3,4,5,9,55,56,57,8,7,10,11,12])).then(({CheckoutSheetProtocolProvider:e})=>({default:e})))}),"mobile-sdk":w({displayName:"MobileCheckoutSdkProvider",renderError:T_,renderLoading:E_,load:()=>C(()=>fl(async()=>{const{MobileCheckoutSdkProvider:e}=await(import("./dd9b68fc.DuKfnJQQ.js"));return{MobileCheckoutSdkProvider:e}},__vite__mapDeps([58,1,2,3,4,5,55,56,57,9,8,7,10,11,12])).then(({MobileCheckoutSdkProvider:e})=>({default:e})))})};function I_(e){const t=function(e){return w_(e)?"checkout-sheet":C_(e)?"mobile-sdk":null}(e);return t?x_[t]:null}function A_({children:e}){const t=I_(ae());return d(t||y,{children:e})}function T_(e){throw e}const L_=["closeAnnouncement","announcementAfterCollapsed","announcementAfterExpanded","announcementClosed","announcementExpanded","announcementCollapsed"],N_=ne("AnnouncementEmitterContext");function R_({children:e}){const t=a(new Map),i=n((e,n)=>{t.current.has(e)||t.current.set(e,new Set);const r=t.current.get(e);r.has(n)||(N(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)&&(R(n),r.delete(n))},[t]),l=n(e=>{const n=e?[e]:L_;for(const r of n){const e=t.current.get(r);if(e){for(const t of e)R(t);e.clear()}}},[t]),c=r(()=>({on:i,emit:o,off:s,removeAllListeners:l}),[i,o,s,l]);return d(N_.Provider,{value:c,children:e})}function M_(){return re(N_)}const D_=f(null),O_=ne("PendingComponentContext");function z_({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(D_.Provider,{value:t,children:e})}function B_(){return h(D_)}const V_=ne("ExtensionPointContext"),F_=ne("ExtensionContext"),U_=ne("CheckoutEditorBridgeContext");function q_({children:e}){const t=Cf(),n=function(){const{client:e}=ae(),{isCheckoutEditor:t,isServerRendered:n}=e.initialRequest;return!0===t&&!0===n}(),[r,a]=s(null),i=Rt();return t?d(U_.Provider,{value:r,children:[n||r?e:null,d(x,{when:i,children:d(j_,{setContext:a})})]}):e}const j_=w({load:()=>fl(()=>import("./adeb5fdb.DrALAaZG.js"),__vite__mapDeps([59,1,37,18,2,3,4,5,60,61,57,12,7,8,9,10,11]))}),H_=f({loading:!1}),$_="dev";function Y_(){return h(H_)}function W_(e){return!(!e?.version||parseInt(e.version,10)<3)}const G_="dev_mode";function J_({children:e}){const t=function(){const e=function(){const{client:e}=ae();return r(()=>{return t=e.cookies,{get:()=>t.get(G_),set:e=>{const n=(new Date).getTime(),r=new Date(n+18144e5);t.set(G_,e,{expiry:r})},remove:()=>{t.delete(G_)}};var t},[e.cookies])}(),{router:t,shop:n}=ae(),a=r(()=>t.currentUrl.value.searchParams.get("dev")??e.get(),[t,e]),o=null!=a&&(n.allowExtensionDevelopment||!1),[s,l]=M((e,t)=>{switch(t.type){case"fetched":{const e=W_(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:$n("App",t)}(e.appId)),{loading:!1,workspace:e}}case"error":return{loading:!1}}var n},{loading:o});return i(()=>
2{if(!o)return;let t=!0;return(async()=>{try{const n=await fetch(a),r=await n.json();if(!t)return;e.set(a),l({type:"fetched",workspace:r})}catch{if(!t)return;l({type:"error"})}})(),()=>{t=!1}},[a,e,o]),s}();return d(H_.Provider,{value:t,children:e})}function K_(e,t){return{type:"throttle",label:e.translate("throttle.title"),...t?{behavior:t}:{},route:"/throttle"}}function Q_(e){return{type:"processing",label:e.translate("processing.title"),route:"/processing"}}function X_(e){return{type:"thankYou",label:e.translate("thank_you.title"),route:"/thank-you"}}function Z_(e){return{type:"noAddressLocation",label:e.translate("no_address_location.title"),route:"/no-address-location"}}function eb(e){return{type:"stockProblems",label:e.translate("stock.title"),route:"/stock-problems"}}function tb(e,t){return{type:"terminalError",route:"/error",label:e.translate("general.title",{shopName:t})}}function nb(e){return{type:"postPurchase",label:e.translate("post_purchase.title"),route:"/post-purchase"}}function rb(e){return{type:"offsitePaymentFailed",label:e.translate("offsite_payment_failed.title"),route:"/offsite-payment-failed"}}function ab(e){return{type:"shopPayLogin",label:e.translate("brand.shop_pay"),route:"/shoppay_login"}}function ib(e,{beforeStock:t=[],afterStock:n=[nb(e)]}={}){return[K_(e),Q_(e),X_(e),...t,eb(e),...n]}function ob(e){return{id:"review",label:e.translate("review.title"),route:"/review",features:[]}}function sb(e,t,n){if(!e)return!1;const r=t?.[0]?.method;if("wallet"!==r?.type)return!1;const a=ql(n);return"APPLE_PAY"===r.name||"PAYPAL_EXPRESS"===r.name&&a}function lb(){const{buyerIdentity:e,deliveryNext:n}=ge(),{checkout:r,shop:a,i18n:i}=ae(),o=t(()=>Wn(e.value?.purchasingCompany?.location.shippingAddress)?.countryCode),{details:s}=zt(o.value),l=T(s),c=a.additionalAddressFieldsEnabled;return t(()=>Gn({purchasingCompany:e.value?.purchasingCompany,shippingCountries:a.shippingCountries,addressSettings:r.configuration.addressSettings.nonBillingAddressSettings.value,countryDetails:l.value,editFormat:r.address.extendedAddressMode.getFormat(o.value,null),deliveryNextValue:n.value,additionalFieldsEnabled:c,i18n:i}))}function cb(){const{buyerIdentity:e}=ge(),n=Ve();return t(()=>n.value.enabledDeliveryMethods.includes("PICK_UP")&&Boolean(e.value?.purchasingCompany))}function ub({checkout:e,source:t}){const n=e.proposal.facts.delivery??[];if(Yn(t)&&n.length>0)return n[0]}function db(){const e=cb(),n=ge().deliveryNext,{checkout:r}=ae();return t(()=>{const t=r.proposal.facts.delivery??[],a=t.length>0&&t.every(e=>null!==e.pickupAddress);return e.value&&(fn(n.value)||a)})}function pb(){const e=pt(),{buyerIdentity:n,shippingAddress:r}=ge(),{checkout:a,source:i}=ae(),o=db(),s=cb(),l=Qc();return t(()=>!(l.value||!s.value&&!e.value||o.value||nn(ub({checkout:a,source:i})?.deliveryAddress??r.value)||n.value?.purchasingCompany?.location.shippingAddress))}function mb(){const e=ge().buyerIdentity,n=Qc(),r=cb(),{checkout:a,source:i}=ae(),o=a.proposal.negotiated.fields.mustSelectProvidedShippingRate;return t(()=>{const t=e.value?.purchasingCompany,s=(o.value??!1)||Boolean(ub({checkout:a,source:i}));return Boolean(t)&&(n.value||r.value&&!s)&&a.isShippingRequired.value})}const hb=["contact-information","shipping-address"],gb=["delivery-method"],fb=["payment-methods","billing-address","localization-extension"];function yb(e,t){return e?.id===t?.id&&e?.route===t?.route}function vb(e){e.parts.email.value.trim()&&e.parts.acceptEmailMarketing.value&&(e.context.emailMarketingConsentGrantReachedSignal.value=!0)}function _b(){const e=pc(),t=he(),{checkout:n}=ae(),r=n.configuration.layout.isOnePage.value;return gc(async(n,a)=>{if("completion"===n)return void vb(t);if("progression"!==n||a?.prefetch||r)return;const{currentDetour:i,currentPage:o,plan:s}=e.value;if(i||null==o)return;const l=t.current.value,c=s.greenPath.findIndex(e=>yb(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)&&vb(t)}),null}function bb(e){const t="string"==typeof e?e:e.type;return Yn(e)||"draftOrder"===t}function Pb(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 Kn.has(e.code)?"shipping-address":"delivery-method";case"cart":switch(n){case"buyerIdentity":return"contact-information";case"deliveryGroups":return"shipping-address"}}}function kb(e,t=[]){return Boolean(e?.email??e?.phone)&&t.every(e=>"contact-information"!==Pb(e))}class Sb extends yl{constructor(){super(...arguments),this.name="JourneyError"}}class wb extends gl{constructor(){super(...arguments),this.name="SubmitForCompletionNetworkError"}}function Cb(e){return Qn(e)&&!e.some(e=>Xn.has(e.code))}function Eb(e){return e.some(e=>"UnprocessableTermViolation"===e.__typename&&Zn.has(e.code))}class xb extends gl{constructor(){super(...arguments),this.name="InfiniteRedirectError",this.defaultGroupingHash="InfiniteRedirectError"}}class Ib{#O={};#z=null;#B=!1;detectInfiniteRedirect(e,t,n){const r=e.pathname;if(this.#z&&clearTimeout(this.#z),this.#O[r]=(this.#O[r]||0)+1,this.#O[r]>=10&&!this.#B){const a=new xb(`Detected potential infinite redirect: ${this.#O[r]} navigations to ${r} within 200ms`),i=t.value;n.error(a,{severity:"error",metadata:{redirectDetails:{navigationCounts:JSON.stringify(this.#O),currentUrl:e.toString(),path:r,threshold:10,timeframe:200},journeyState:{redirectTo:i.redirectTo?.route}}}),this.#B=!0,this.#O={}}this.#z=setTimeout(()=>{this.#O={},this.#z=null},200)}cleanup(){this.#z&&(clearTimeout(this.#z),this.#z=null)}}function Ab(e){const{router:t,checkout:o,observability:s,source:l}
2=ae(),c=o.proposal.facts.delivery??[],u=he(),d=Boolean(o.proposal.facts.requiresShipping),p=Yn(l)?d:o.isShippingRequired.value,m=o.configuration.layout.isOnePage.value,h=function(){const{data:e}=k_();return"NegotiationResultAvailable"===e?.session?.negotiate.result.__typename&&"PendingTerms"===e.session.negotiate.result.sellerProposal.delivery.__typename}(),g=function(){const{data:e}=k_(),{checkout:t}=ae(),n=e?.session?.negotiate.result;let r;if("NegotiationResultAvailable"===n?.__typename&&"PendingTerms"===n.sellerProposal.delivery.__typename){const{sellerProposal:e,buyerProposal:t}=n;r=tr({delivery:e.delivery,buyerDelivery:t.delivery,remoteDelivery:nr(e.remote).remoteDelivery})}const{details:a}=zt(r?.countryCode);return null!=r&&_y({address:r,addressSettings:t.configuration.addressSettings.nonBillingAddressSettings.value,countryDetails:a})}(),f=db(),y=function(){const e=a(null);return e.current||(e.current=new Ib),i(()=>()=>{e.current?.cleanup()},[]),e.current}();!function({observability:e,negotiated:t,plan:n,identity:r,isOnePageLayout:o,initialPath:s,sessionType:l}){i(()=>{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=a(!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:_}=qe(),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=$l(e.features,i);return!e.fastForwardThroughPage||!e.fastForwardThroughPage(i,t)}),g=o.greenPath[h],f=[];a.leaveErrorBreadcrumb("Journey:initializeJourney: initial firstPage",{firstPageIndex:h,firstPage:String(g?.id),plan:JSON.stringify(o.greenPath)}),o.greenPath.slice(0,h).forEach(e=>{if("information"===e.id){const t=kb(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=Boolean(o.greenPath[P]?.skipOverPage?.(i));if(t&&n&&!k&&P>h&&g?.blockedOnlyByShippingAddress?.(i,$l(g.features,i))){for(let e=h;e<P;e++){const t=f[e];f[e]=t?{...t,complete:!0}:{id:o.greenPath[e].id,skipped:!0,complete:!0}}f[P]={id:o.greenPath[P].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 S=f.find(e=>!e.complete&&!e.skipped),w=o.greenPath.findIndex(e=>
2S?.id===e.id),C=o.greenPath[w],E=o.greenPath[y],x=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:w,canLoadReview:_}),I=o.detours.find(e=>"route"in e&&e.route===m.normalizedPath),A=Cb(i.allViolations??[]),T=i.shippingAddress,L=r.length>0&&r[0].deliveryAddress?r[0].deliveryAddress:T,N="BusinessCustomerProfile"===i?.buyerIdentity?.customerProfile?.__typename&&!e&&er(L)&&bb(u)&&d,R=new URLSearchParams(m.search),M="processing"===I?.type&&"true"===R.get("post_purchase"),D=("postPurchase"===I?.type||M)&&"success"===s&&"processed"===c?.status&&"created"===c.orderCreationStatus.status,O=("shopPayLogin"===I?.type?o.detours.find(e=>"shopPayLogin"===e.type):void 0)??("offsitePaymentFailed"===I?.type?o.detours.find(e=>"offsitePaymentFailed"===e.type):void 0)??(D?o.detours.find(e=>"postPurchase"===e.type):void 0)??("queued"===p.status?o.detours.find(e=>"throttle"===e.type):void 0)??(A?o.detours.find(e=>"stockProblems"===e.type):void 0)??(N?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"===I?.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(C?.id),currentPage:String(x?.id),expectedDetourFromState:O?.route,receipt:JSON.stringify(c)}),null==O&&null==x)throw new Sb("Failed to initialize Journey: no detour or current page available",{groupingHash:"JourneyError::InitializeJourneyFailure"});return O?{plan:o,history:f,redirectTo:(z=I,B=O,z?.type===B?.type&&z?.route===B?.route?void 0:O)}:{plan:o,history:f,redirectTo:yb(E,x)?void 0:x};var z,B}({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(()=>Oe((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 Sb("Missing current page",{groupingHash:"JourneyError::SkipToCompletionNoCurrentPage"})}const a=t.greenPath.findIndex(e=>yb(e,l)),i=r.slice(0,a+1),s=i.pop();i.push({...s,complete:!0});for(let e=a+1;e<t.greenPath.length;e++){const n=i[e];i[e]=n?{...n,skipped:!0}:{id:t.greenPath[e].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 Sb(`Fail to update journey with "${t.type}": attempted to progress without a next page.`,{groupingHash:"JourneyError::UpdateJourneyProgressNoNextPage"});const s=r.greenPath.findIndex(e=>yb(e,i)),u=a.slice(0,s);for(let e=0;e<s;e++){const t=u[e];null==t?u[e]={id:r.greenPath[e].id,skipped:!0,complete:!0}:t.complete||(u[e]={...t,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 Sb(`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.findIndex(t=>yb(t,e));if(-1===a)return r.leaveErrorBreadcrumb("validatePrerequisitesForPage: target page not found in plan",{targetPageId:e.id,targetPageRoute:e.route}),t.greenPath[0];if(!n)return r.leaveErrorBreadcrumb("validatePrerequisitesForPage: no negotiated context available",{targetPageId:e.id}),t.greenPath[0];for(let i=0;i<a;i++){const a=t.greenPath[i];let o=!1;if(o="information"!==a.id||kb(n.contactInfo,n.allViolations??[]),!o)return r.leaveErrorBreadcrumb("validatePrerequisitesForPage: prerequisite page not satisfied, redirecting",{targetPageId:e.id,targetPageRoute:e.route,unsatisfiedPrerequisitePageId:a.id,unsatisfiedPrerequisitePageRoute:a.route}),a}return e}(s,r,a.current.peek(),n):s,d=!yb(s,u);a&&d&&n.leaveErrorBreadcrumb("Journey:updateJourney: prerequisite validation redirected",{requestedPage:s.id,redirectedToPage:u.id});const p=r.greenPath.findIndex(e=>yb(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=a(m);C.current!==m&&(C.current=m,w({type:"reinitialize",state:P()}));const E=a(t.currentUrl.value);return E.current=t.currentUrl.value,i(()=>t.currentUrl.subscribe(e=>{E.current!==e&&(E.current=e,w({type:"clearRedirect"}),y.detectInfiniteRedirect(e,S,s))}),[t,w,y,S,s]),i(()=>t.block(e=>{const n=t.currentUrl.value,r=function(e,t){const n=new URLSearchParams(e.searchParams),r=new
2URLSearchParams(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 Tb(e){return"complete"===e.status||"inactive"===e.status}function Lb(e){return"failed"===e?.status||"processed"===e?.status}const Nb="checkout_queue_token",Rb="departure_page";function Mb({violations:e,greenPath:t,negotiated:n,currentPage:r}){const a=new Set(e.map(Pb)),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 Db(){const{router:e}=ae(),t=Ob();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 Ob(){const{observability:e}=ae(),{history:t,plan:r}=pc().value,a=he();return n(n=>function({feature:e,greenPath:t,history:n,negotiated:r,observability:a}){let i=zb(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]??t[0];a.leaveErrorBreadcrumb(`useNavigateToLastPageWithFeature - chosen page with feature ${e} was not visited by user, defaulting to ${n?.id}`),i=n}return i}({feature:n,greenPath:r.greenPath,history:t,negotiated:a,observability:e}),[r.greenPath,a,t,e])}function zb(e,t,n){return[...e].reverse().find(e=>("function"==typeof e.features?e.features(t.current.peek()):e.features).includes(n))}const Bb=1500,Vb=450,Fb=64,Ub=14;function qb(e){return"customOnsite"===e.method.type&&1===e.method.paymentBrands?.length&&e.method.paymentBrands.includes("usdc")}function jb(e){return"customOnsite"===e.type&&1===e.paymentBrands?.length&&e.paymentBrands.includes("usdc")}const Hb={id:"658bb809ab07c0463243990c0c79fd8f2eacb112e7ea5c8f2cef6bc7b109127a",type:"query",name:"PollForReceipt",source:""};function $b(){const e=ge().paymentMethods,n=qe().paymentLines;return t(()=>{const t=n.value.at(0);return!!t&&(qb(t)||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=>jb(e)&&e.paymentMethodIdentifier===n);return Boolean(r)}(t,e.value))})}const Yb=["post-purchase-e2e-tests.myshopify.com","e2e-post-purchase-testing.myshopify.com"];function Wb(e){const t=location.hostname;return Yb.includes(t)}const Gb=3e3,Jb=15e3,Kb="hsa_survey_completed";function Qb(e){if(!e)return"";try{return new URL(Xb(e)).hostname.replace(/^www\./,"")}catch{return e.replace(/^https?:\/\/(www\.)?/,"")}}const Xb=e=>e.replace(/^(?:(.*:)?\/\/)?(.*)/i,(e,t,n)=>t?e:`https://${n}`),Zb="3ds_completed",eP=6e5;function tP(e){if(!e)return"none";try{const t=new URL(Xb(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 nP=Symbol("pollRequestTimedOut");async function rP(e,t){let n;const r=new Promise(e=>{n=setTimeout(()=>e(nP),t)});try{return await Promise.race([e,r])}finally{clearTimeout(n)}}function aP(e){return"action_required"===e.status&&"complete_payment_challenge"===e.action.type&&e.action.offsiteRedirect}function iP(e){if(void 0===e)return"";try{const t=new URL(e);return`${t.protocol}//${t.host}`}catch{return""}}const oP=["failed","processed"];function sP(){const{currentPage:e,currentDetour:r,history:o}=pc().value,{observability:s,checkout:{offsitePopupController:l},mobileCheckoutSdk:c,embed:u}=ae(),d=a(),p=function(){const e=O({maxAttempts:120}),{client:t,checkout:r,persistence:o,observability:s,embed:l,source:c,graphql:{coreGraphql:u}}
2=ae(),d=t.unstable_getSerialization("sessionToken"),p=a(),m=$b();return i(()=>()=>{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",Xy(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=cr+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,ir(l,`action_required_receipt - ${e.action.type}`)),"complete_payment_challenge"===e.action.type){if(m.value)return t(Date.now()+Gb);if(e.action.offsiteRedirect)return t(void 0)}else{if("pre_payment_buyer_action_required"===e.action.type){if(S)return t(Date.now()+Gb);const n=Date.now(),r={...Xy(e),actionType:e.action.type,listenerType:"receipt_polling_hsa_survey_listener",modalSourceType:"receipt_action",surface:"checkout-web"},a=({data:e})=>{e?.type===Kb&&(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:Kb,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()+Gb:Date.now()+or)}}const n=Date.now(),a="complete_payment_challenge"===e.action.type?e.action:void 0,u={...Xy(e),actionType:e.action.type,listenerType:"receipt_polling_three_ds_listener",modalSourceType:"receipt_action",offsiteRedirect:a?.offsiteRedirect,sourceHostCategory:tP(a?.url),surface:"checkout-web"},d=({data:a,origin:o})=>{if(a.type===Zb){if(clearTimeout(p),window.removeEventListener("message",d),!i()||!Wy(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:Zb}),s.log("three_ds_postmessage_received","[Receipt Polling] 3DS postMessage received",{...u,dataType:Zb,elapsedTimeMs:a,originHostCategory:tP(o)}),t(Date.now())}},p=setTimeout(()=>{window.removeEventListener("message",d),i()&&Wy(r.latestReceipt.value,e)?(r.unstable_overwriteLatestReceipt({status:"failed",id:e.id,failure:{type:"payment",code:"GENERIC_ERROR"}}),o&&sr(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",Xy(e)),s.log("three_ds_postmessage_timed_out","[Receipt Polling] 3DS postMessage listener timed out",{...u,elapsedTimeMs:Date.now()-n}),t(void 0)):t(void 0)},e.timeout?.millisecondsRemaining??eP);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 rP(u.staticQuery(Hb,{cache:!1,variables:e}),Jb);if(t!==nP)return t;if(E(1),!i())return;const n=u.query(Hb,{cache:!1,variables:e});try{const e=await rP(Promise.resolve(n.refetch()),Jb);if(e!==nP)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",{...Xy(r.latestReceipt.value),attempt:e,timeout:Jb})}for(;null!=f;){await z(f-Date.now());const n=Date.now()-b;if(++v,!_&&v>120&&n>12e4&&(y=!1,s.leaveErrorBreadcrumb("[ReceiptPolling] Receipt polling timeout",{...Xy(h),pollAttempts:v}),s.counter({name:"receipt_polling_timeout",value:1}),s.log("use_receipt_polling_polling_timed_out","Receipt polling timed out",{...Xy(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=Wb()?3e4:1e4,P=!!g&&d>=p;let S;if(!k)try{S=await lr()}
2catch(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=cr+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&&aP(E)||Wy(E,h)),A=Xy(h),T=Xy(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)):Wy(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&&sr(o,c);break}f=cr+Date.now(),g||(g=f)}if(!i())break}},[r,o,u,d,s,e,l,m,c])}(),m=function(){const e=$b();return n((t,n)=>{e.value||Gy(t)&&Ky(t.action)&&t.action.offsiteRedirect&&n(t.action.url)},[e])}(),h=function(){const e=ge().paymentMethods,n=qe().paymentLines;return t(()=>{const t=n.value.at(0);return!!t&&("customOnsite"===(r=t).method.type&&(r.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)}(t,e.value));var r})}(),g=c.variant.isStandard()||Boolean(u?.isCheckoutKit()),f=n(()=>{document.hidden||(document.removeEventListener("visibilitychange",f),s.log("processing_user_return_to_checkout_initiated","[Processing] User navigated back to checkout after offsite payment",{provider:iP(d.current)},{exportImmediately:!0}),p(e=>{m(e,()=>{document.addEventListener("visibilitychange",f)})}))},[m,p,s]),y=n(()=>{p(t=>{oP.includes(t.status)&&l.isOpen.value&&l.close({}),m(t,n=>{s.leaveErrorBreadcrumb("Redirecting to offsite payment",{receipt:t,currentPage:e,currentDetour:r,history:o}),s.log("processing_offsite_payment_redirect_initiated","[Processing] Redirecting to offsite payment",{provider:iP(n),providerUrl:n},{exportImmediately:!0}),l.isOpen.value?l.redirect(n):(h.value?function(e){const t=document.createElement("a");t.href=e,t.rel="noopener",t.referrerPolicy="strict-origin",document.body.appendChild(t),t.click(),t.remove()}(n):window.location.assign(n),d.current=n,g&&document.addEventListener("visibilitychange",f))})})},[m,h,p,g,r,e,o,f,s,l]);return i(()=>()=>document.removeEventListener("visibilitychange",f),[]),y}function lP(){const{shop:{id:e}}=ae();return r(()=>{const t=e.split("/").pop();if(!t)return;const n=parseInt(t,10);return isNaN(n)?void 0:n},[e])}function cP({mode:e="set",include:t={}}={}){const{shopClientUuid:r=!1,shopId:a=!1}=t,i=ae().embed?.shopClientUuid,o=lP();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(pr),ecVersionParam:e.get(ur),ecColorSchemeParam:e.get(dr),ecDelegateParam:e.get(mr),checkoutKitBrandingParam:e.get(gr),checkoutKitVersionParam:e.get(hr),shopifyEsse
2ntial:e.get("shopify_essential"),skipInterstitial:e.get(fr),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(ur,c),u&&t.set(dr,u),l&&t.set(pr,l),d&&t.set(mr,d),m&&t.set(hr,m),p&&t.set(gr,p)));const v="set"===e||!t.has("shopify_essential");h&&v&&t.set("shopify_essential",h);const _="set"===e||!t.has(fr);if(g&&_&&t.set(fr,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 uP(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 dP(){const e=ge().buyerIdentity,{client:n,shop:r,embed:a,mobileCheckoutSdk:i}=ae();return t(()=>Boolean(r.loginLinkVisible)&&r.hasStorefront&&Boolean(n.unstable_getSerialization("loginUrl"))&&"OPTIONAL"===r.customerAccountRequirement&&!i.enabled&&!a&&!e.value?.customerProfile)}function pP(){const e=ge().buyerIdentity,{shop:n,checkout:{identity:r,configuration:a},mobileCheckoutSdk:i,source:o}=ae(),s="shopPay"===r.current.value;return t(()=>{const t="OPTIONAL"===n.customerAccountRequirement,r="REQUIRED"===n.customerAccountRequirement,l="DISABLED"===n.customerAccountRequirement;return"draftOrder"!==o.type&&n.hasStorefront&&!i.variant.isPartner()&&a.allowRedirectToStorefront&&!s&&(t||r||l&&Boolean(e.value?.customerProfile))})}function mP(){const e=ge().buyerIdentity;return n(t=>{const n=e.value?.customerProfile,r=e.value?.purchasingCompany;if(n)return"billing"===t?"CustomerProfile"===n.__typename?n.billingAddresses[0]?.address:r?r.location.billingAddress:void 0:"shipping"===t?"CustomerProfile"===n.__typename?n.shippingAddresses[0]?.address:r?r.location.shippingAddress:void 0:void 0},[e])}function hP(){const{embed:e,mobileCheckoutSdk:n,shop:r,source:a}=ae(),i=pc(),o=ge().buyerIdentity,s=eg(),l=n.variant.isStandard()||e?.isCheckoutKit(),c=Boolean(r.remoteShopsConfigMap?.size);return t(()=>{const e=o.value,t=Boolean(r.loginLinkVisible)&&Boolean(e?.customerProfile)&&(Boolean(e?.purchasingCompany)||!l&&"draftOrder"!==a.type&&r.hasStorefront);return s&&"thankYou"===i.value.currentDetour?.type&&!c&&t})}function gP(e=!1){const{i18n:n,router:r,shop:a}=ae(),{buyerIdentity:i}=ge();return t(()=>{const t=i.value?.purchasingCompany;if(!a.customerAccountLocationsUrl)return;const o=new URL(a.customerAccountLocationsUrl);return o.searchParams.set("return_to",r.currentUrl.value.pathname),t&&!e&&o.searchParams.set("current_location",t.location.id),o.searchParams.set("locale",n.locale),String(o)})}function fP(){const e=a(!0);return l(()=>()=>{e.current=!1},[]),e}const yP=["discountLines","totalSavings","merchandiseLines","deliveryNext"],vP=new Set(["PAYMENTS_GIFT_CARD_DISABLED"]),_P=new Set(["PAYMENTS_GIFT_CARD_CURRENCY_MISMATCH","REDUCTION_GIFT_CARD_ALREADY_APPLIED","PAYMENTS_GIFT_CARD_NOT_FOUND","DISCOUNTS_NOT_FOUND","REDUCTION_INVALID_CODE","REDUCTION_INVALID_DISCOUNT_CODE","PAYMENTS_GIFT_CARD_NON_SUFFICIENT_FUNDS","PAYMENTS_GIFT_CARD_ALREADY_APPLIED","PAYMENTS_GIFT_CARD_BUYING_GIFT_CARD","PAYMENTS_GIFT_CARD_EXPIRED","REDUCTION_INVALID_GIFT_CARD_CODE","PAYMENT_GIFT_CARDS_NOT_ALLOWED_FOR_FIXED_SELLING_PLANS","DISCOUNTS_DISCOUNTS_NOT_ALLOWED_FOR_B2B","PAYMENT_GIFT_CARDS_NOT_ALLOWED_FOR_B2B"]),bP=new Set([...cl,..._P]),PP=new Set(["DISCOUNTS_CURRENTLY_INACTIVE"]),kP=new Set(["DISCOUNTS_HIGHER_VALUE_DISCOUNT_APPLIED"]),SP=new Set([...kP,...bP]);function wP(){const{paymentLines:e}=qe(),{voidedGiftCardsSignal:t}=Je(),r=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:n,remotePaymentLines:a})=>{if(n.some(e=>vP.has(e.code))){const n=r(a,e.value);t.value=n,e.value=a}},[r,e,t])}const CP=new Map([["billing-address",["billingAddress"]],["contact-information",["contactInfo"]],["payment-methods",["paymentMethods","captcha"]],["shipping-address",["shippingAddress"]],["delivery-method",["deliveryNext"]]]);function EP(e,t){const n=$l(e.features,t),r=new Set(["merchandiseLines"]);for(const a of n){const e=CP.get(a)??[];for(const t of e)r.add(t)}return r}function xP({currentPage:e,plan:t},n){const r=new Set;if(!e)return r;const a=t.greenPath.findIndex(t=>yb(t,e));for(const i of t.greenPath.slice(0,a+1))for(const e of EP(i,n))r.add(e);return r}function*IP(e=[],t){e.includes("deliveryNext")||(yield"delivery-method"),e.includes("paymentLines")||(yield"payment-terms-changed",yield"payment-session"),e.includes("billingAddress")||(yield"payment-address"),e.includes("captcha")||(yield"captcha"),t?.includes("localization-extension")||(yield"localization-extension")}function*AP(e,t=[]){const{customFields:n,placementReferences:r}=e,a=kr(t,r);
2for(const[i,o]of n.entries())a(Sr(o))||(yield`${wr}[${i}]`)}function TP({violations:e,currentPageId:t,isOnePageCheckout:n}){return e.some(e=>function({violation:e,currentPageId:t,isOnePageCheckout:n}){return!!n||"payment"===t||!(Cr.has(e.code)||Er.has(e.code)||an.has(e.code))}({violation:e,currentPageId:t,isOnePageCheckout:n}))}function LP(){const{observability:e}=ae();return n(()=>{e.log("stock_problems_page_viewed","Stock Problems page viewed")},[e])}class NP extends Error{constructor(){super(...arguments),this.name="ProposalNegotiationError"}}function RP(){const e=(()=>{const{source:{checkoutSessionIdentifier:e}}=ae(),{email:n}=qe();return t(()=>`guest-${e}-${n.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 MP="EU_REVERSE_CHARGE_EXEMPTION_RULE";function DP(){const e=ge().taxExemptions,r=function(e){const{taxExemptions:n}=qe(),r=T(e);return t(()=>n.value.find(e=>e.handle===r.value))}(MP).value,a=function(e){const{taxExemptions:t}=qe();return n(n=>{const r=t.value.filter(t=>t.handle!==e);t.value=[...r,{handle:e,details:n}]},[e,t])}(MP),i=kn("taxExemptions").value,o=kn("shippingAddress").value;if("unavailable"===e.value?.status||!e.value?.available||0===e.value?.available.length)return null;const{available:s}=e.value,l=s.find(e=>Tr(e.handle));if(!l?.details)return null;const c=r?.details?.taxId??"",{registrationFormats:u,warnings:d}=l.details,p=e=>Lr(e,u),m=i?{type:"pending"}:c?p(c)?c===l.details.taxId&&l.details.status?{type:"resolved",validationStatus:l.details.status}:{type:"resolved",validationStatus:null}:{type:"invalid_format"}:{type:"resolved",validationStatus:null};return{applied:l.applied,taxId:{warnings:d,value:c,loading:i||o,set:e=>{a({taxId:e.toUpperCase()})},status:m,reset:()=>a({taxId:""}),validated:{status:l.details.status,taxId:l.details.taxId},format:{valid:!!c&&p(c),validate:p}}}}function OP(){const{userEvents:e}=ae(),t=zP();return({vatId:n})=>{const r=t.build({eventType:"NEGOTIATE",vatId:n});e.monorailEvent(r)}}function zP(){const{client:e,shop:t,source:n}=ae(),r=e.unstable_getSerialization("requestId"),a=ge().buyerIdentity.value?.customerProfile,{shippingAddress:i,billingAddress:o,email:s}=qe(),l=DP();return{build:({eventType:e,vatId:c})=>{return{schemaId:"taxes_vat_id_checkout_lifecycle_event/1.0",payload:{eventType:e,shopId:Number(se(t.id)),customerId:UP(a),checkoutToken:n.
2checkoutSessionIdentifier,requestId:r,vatId:c,vatIdValidationStatus:BP({taxId:l?.taxId,eventType:e}),applied:l?.applied,email:s.value,userAgent:(u=navigator,void 0===u?void 0:u.userAgent),...VP(i.value),...FP(o.value)}};var u}}}function BP({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 VP(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 FP(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 UP(e){if(!e)return;const t=Number(se(e.id));return isNaN(t)?void 0:t}function qP(e,t){const{checkout:r,shop:a,observability:i,url:o,router:s}=ae(),l=function(){const e=ie(),t=fP(),{setGuestDismissedModalKey:r}=function(){const{setDismissedGuestModal:e}=RP(),{shopPay:t}=ae();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}=pc().value,u=ie(),d=he(),p=Db(),m=gP(!0),h=wP();return function(){const{userEvents:e}=ae(),t=zP(),n=DP();gc(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);const e={type:"complete"};u.recordProgression(e),await u.runListeners(e);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 Sb("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}),Eb(l.violations))return window.location.replace(o.login(window.location.href));if(uP(l.violations,a.storefrontUrl,m.value,s.currentUrl.value,i),Qn(l.violations)){s.currentUrl.peek().searchParams.delete(Rb);const e=c.detours.find(e=>"stockProblems"===e.type);if(null==e)throw new Sb("Stock problems, but no matching detour",{groupingHash:"JourneyError::StockProblemsNoMatchingDetour"});s.navigate(e.route);break}h({violations:l.violations,remotePaymentLines:l.negotiated?.paymentLines?.lines??[]});const t={type:"error",violations:l.violations,errors:l.errors,negotiationStage:"completion"};if(u.recordProgression(t),await u.runListeners(t),v)break;const r=Mb({violations:l.violations,greenPath:c.greenPath,negotiated:l.negotiated,currentPage:n});r&&(s.currentUrl.peek().searchParams.delete(Rb),s.navigate(r.route));break}
2case"invalid":t(!1),await u.runListeners({type:"invalid",reasons:l.reasons});break;case"fetch_failed":case"failed":{const t={type:"failed",reason:l.reason,negotiationStage:"completion",fetchFailed:"fetch_failed"===l.status};if("fetch_failed"===l.status)if(ul(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:dl(l.reason)}});else{const e=l.reason;i.error(new wb(e,{groupingHash:`Journey::SubmitForCompletion::NetworkError: ${e}`}),{errorClass:"Journey::SubmitForCompletion::NetworkError"})}u.recordProgression(t),await u.runListeners(t),e({type:"error",page:n}),s.currentUrl.peek().searchParams.delete(Rb),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])}function jP({children:e,dispatch:s,progressing:l,onProgressionChange:c}){const u=pc(),{plan:p,currentPage:h,currentDetour:g}=u.value,{observability:f,checkout:y,router:v}=ae(),{postPurchaseInquiryStatus:_}=qe(),b=function(e,t){const{client:r,router:a,checkout:i,shop:o,observability:s,url:l}=ae(),c=he(),u=f_(),d=o.hasFlagEnabled(xr),{plan:p,currentPage:m,currentDetour:h}=pc().value,g=ie(),f=r.unstable_legacyNavigationPerformance,y=gP(!0),v=wP(),_=fP(),b=i.configuration.layout.isOnePage,{inMemoryApplePayParts:{asPaymentMethod:P}}=_n(),k=LP();return n(async({onComplete:n,prefetch:r=!1,negotiationStage:S,legacyFiltering:w,...C})=>{const E=m,x=S??"negotiation";"progression"!==x||r||t(!0),s.debug("negotiation_triggered","Negotiation triggered",{negotiationStage:x}),"progression"===x&&await g.runBeforeNegotiationListeners(x,{prefetch:r});const I=E?$l(E.features,c.current.value):void 0;let A=C.silenceViolations??[];if(!d){const e=w?.include??[...xP({currentPage:E,plan:p},c.current.value)];A=[...(w?w.silenceViolations:C.silenceViolations)??[],...IP(e,I)]}A=[...new Set([...A,...AP({customFields:c.current.value.customFields??[],placementReferences:u},I)])];try{const c=await g.negotiate({...C,silenceViolations:A,skipStateUpdates:r,negotiationStage:x});if(s.log("negotiation_result_completed","Negotiation result completed",{negotiationStatus:c.status,negotiationStage:x,violations:"violations"in c?Ir(c.violations):void 0}),_.current){if(r)return;try{const n="success"===c.status||"error"===c.status;if(n&&Qn(c.violations)){const e=p.detours.find(e=>"stockProblems"===e.type);if(null==e)throw new Sb("Stock problems, but no matching detour",{groupingHash:"JourneyError::StockProblemsNoMatchingDetourNegotiate"});return k(),void a.navigate(e.route)}if(n&&Eb(c.violations))return s.log("login_failure_triggered","Buyer identity login failure detected, redirecting to login"),window.location.replace(l.login(window.location.href));switch(n&&uP(c.violations,o.storefrontUrl,y.value,a.currentUrl.value,s),n&&v({violations:c.violations,remotePaymentLines:c.negotiated?.paymentLines?.lines??[]}),c.status){case"success":{const e={type:"success",violations:c.violations,errors:c.errors,negotiationStage:x};g.recordNegotiation(e,{progression:!0}),await g.runListeners(e);break}case"alreadyCompleted":i.unstable_overwriteLatestReceipt(c.receipt);break;case"error":{f?.cancelNavigation();const t={type:"error",violations:c.violations,errors:c.errors,negotiationStage:x};g.recordNegotiation(t),("progression"===x||C.runListenersOnError)&&(g.recordProgression(t),await g.runListeners(t)),E&&TP({violations:c.violations,currentPageId:E.id,isOnePageCheckout:b.value})&&e({type:"error",page:E});break}case"throttled":{const e=p.detours.find(e=>"throttle"===e.type);if(!e?.route)throw new Sb("Throttled, but no matching detour",{groupingHash:"JourneyError::ThrottledNoMatchingDetour"});a.navigate(e.route);break}case"invalid":g.runListeners({type:"invalid",reasons:c.reasons}),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:c.status,currentPage:E,currentDetour:h,negotiationStage:x});break;default:L(c)}"progression"===x&&t(!1)}finally{n?.(c);const e=P.value&&i.wallets.activeSession.value;if("success"!==c.status&&"violations"in c&&E&&!e){const e=Mb({currentPage:E,greenPath:
2p.greenPath,negotiated:c.negotiated,violations:c.violations});e&&a.navigate(e.route)}}}}catch(T){if(T instanceof Ar)return;const e=T instanceof Error?T:new NP;if(e)throw e}},[P,i,m,y,e,b,_,c,t,f,u,p,g,v,a,o?.storefrontUrl,d,k,l,s,h])}(s,c),P=he(),S=function(e,t,r){const{router:a,observability:i,checkout:o,shop:s}=ae(),l=s.hasFlagEnabled(xr),{plan:c}=pc().value,u=he(),d=o.configuration.layout.isOnePage,p=n((e,n)=>{const r=c.greenPath.slice(n+1).find(t=>null==t.skipOverPage||!t.skipOverPage(e.negotiated));if(!r)throw new Sb("Negotiated, but no next page",{groupingHash:"JourneyError::NegotiatedNoNextPage"});t({type:"progress",page:r}),a.navigate(r.route)},[c.greenPath,t,a]);return n(async(t,n)=>{r(!0);const a=c.greenPath.findIndex(e=>yb(e,t)),o=u.current.value,s=EP(t,o),m=(()=>{if(!l)return;const e=new Set;for(const t of c.greenPath.slice(0,a+1))for(const n of $l(t.features,o))e.add(n);return 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}([...e])})();try{await e({negotiationStage:"progression",silenceViolations:m,fieldsToResolve:Array.from(s),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":p(e,a);break;case"error":TP({violations:e.violations,currentPageId:c.greenPath[a].id,isOnePageCheckout:d.value})||p(e,a);break;case"fetch_failed":case"invalid":case"stale":case"denied":case"throttled":case"tooManyRequests":case"alreadyCompleted":break;default:L(e)}}})}finally{r(!1)}},[r,c.greenPath,u,e,p,d,i,l])}(b,s,c),w=qP(s,c),C=function(e,t,r){const{checkout:a,client:i,shop:o,source:s,observability:l,url:c,router:u}=ae(),d=ie(),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(Tb(a.negotiator.throttleState.peek()))return void e();const t=a.negotiator.listenThrottle(n=>{Tb(n)&&(t(),e())})}),await e({legacyFiltering:{include:[],silenceViolations:"redirectToCart"===n.behavior?["non-stock"]:["all"]},force:!0,silenceViolations:"redirectToCart"===n.behavior?["non-stock",...ar]:["all"],negotiationStage:"progression",onComplete(e){switch(h?.(e),e.status){case"success":if(!m)throw new Sb("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({legacyFiltering:{silenceViolations:["non-stock"],include:[]},force:!0,silenceViolations:["non-stock",...ar],onComplete(e){switch(e.status){case"success":if(!m)throw new Sb("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}),rr({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(Lb(a.latestReceipt.value))return void e();const t=D(()=>{Lb(a.latestReceipt.value)&&(t(),e())})}),r(!1);break;case"shopPayLogin":if(r(!0),!m)throw new Sb("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 Sb(`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=ae(),{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=Ob(),w=Cf(),C=yr(),E=sP(),x=b?.id,I=he(),T=u.checkout.configuration.layout.isOnePage,N=tg()&&!vr(v.currentUrl.value.search),R=d.negotiator.throttleState.peek().token,M=pc(),D=Xc(),O=function({redirectProgressEnabled:e=!1}={}){const t=a(!1),{checkout:r,client:i,observability:o}=ae(),s=cP({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 a=new URL(n,window.location.href),l=new URLSearchParams(i.initialRequest.url.search);return s(a.searchParams,l),e&&r.checkoutExit.startRedirectProgress(),window.location.replace(a.toString())},[s,r.checkoutExit,i.initialRequest.url.search,o,e])}({redirectProgressEnabled:k&&!_.isUniversalCheckoutFinalizer&&N&&!t&&!D});i(()=>{P||E()},[x]);const z=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",Xy(n));const a=c.value;if("processed"===n.status&&n.waitingForPostPurchaseDone&&"done"!==a)return;const i=(e,t)=>e&&e>0?z(e,t):t();switch(n.status){case"abandoned":o(!1),m&&sr(m,h),C();break;case"failed":{o(!1),m&&sr(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 Sb("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&&(br.has(n.failure.code)?s({legacyFiltering:{include:["captcha"]},silenceViolations:Ue(["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=zb(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??t[0]):s;const l=n.find(e=>!e.complete&&!e.skipped),c=t.findIndex(e=>l?.id===e.id);if(!o){const e=t[c]??t[0];return a.leaveErrorBreadcrumb("[Journey] computePageToRedirect: no page with payment methods found, falling back to first incomplete page",{fallbackPageId:e?.id}),e}const u=t.findIndex(e=>e.id===o.id);if(c>=0&&u>c){const e=t[c];return a.leaveErrorBreadcrumb("[Journey] computePageToRedirect: payment methods page is not available from current history, falling back to first incomplete page",{paymentMethodsPageId:o.id,fallbackPageId:e.id}),e}return o}({departurePageId:v.currentUrl.value.searchParams.get(Rb),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&&_r(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 R&&a.searchParams.set(Nb,R),i(n?.completedRemoteCheckouts?.length,()=>{return e=a.toString(),!N||t||D||hl(()=>{d.checkoutExit.exit()},["checkout-exit"],{replace:!0,interrupt:!0}),void O(e);var e})}const m=e.detours.find(e=>"thankYou"===e.type);if(!m?.route)throw new Sb("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(Pr);e&&h.sourceId===e.split("%3F")[0]&&f.cookies.delete(Pr)}else f.cookies.delete(Pr),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}})};N&&!t?(n?.(),hl(r,["checkout-exit"],{replace:!0,interrupt:!0})):hl(()=>{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();il(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;hl(()=>{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,N,k,M,S,u,_,s,l,I,o,m,e.detours,e.greenPath,D,c,R,O,v,h,g,z])}({plan:p,currentDetour:g,dispatch:s,onProgressionChange:c,negotiate:b,negotiated:P,proposedPostPurchaseInquiryStatus:_});i(()=>{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 Sb(`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",Xy(e)),o(()=>E(e))});const x=a(_.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",{...Xy(e),previousStatus:n}),o(()=>E(e))}});const{progress:I,completing:T}=function({journey:e,exitDetour:i,pageComplete:o,pageNegotiate:s}){const{client:l,observability:c,router:u}=ae(),d=m(0),p=t(()=>d.value>0),h=l.unstable_legacyNavigationPerformance,{handleOffsitePopupOpen:g,handleClosingPopup:f}=function(){const e=sP(),t=Ff(),n=eh(),{paymentLines:a}=qe(),i=he(),{i18n:o,observability:s,userEvents:l,checkout:{offsitePopupController:c},shop:{id:u}}=ae();return r(()=>({handleOffsitePopupOpen:()=>{const r=a.value.at(0);let d=!1;if("customOnsite"===r?.method.type)d=qb(r);else if(r&&"walletContent"in r.method&&"SHOP_PAY"===r.method.name){const e=r.method.walletContent?.paymentMethodIdentifier,t=(i.current?.fields?.paymentMethods?.value||[]).find(t=>jb(t)&&t.paymentMethodIdentifier===e);d=Boolean(t)}if(t.value){if(d){s.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:Vt()}});const e=ue(u);if(e){const t=parseInt(e,10);if(!isNaN(t)){const e=function(e){const t=ug();
2return 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&&l&&l.monorailEvent(e)}}}const t={width:600,height:455};c.open({onComplete:()=>e(),onCancel:()=>window.location.reload(),theme:n,popupDimensions:t,isCryptoPayment:d,title:o.translate("general.processing")})}},handleClosingPopup:()=>{t.value&&c.isOpen.value&&c.close({})}}),[t.value,a,s,l,i,c,n,o,e,u])}(),y=a(i);y.current=i;const v=a(o);v.current=o;const _=a(s);_.current=s;const b=a(g);b.current=g;const P=a(f);P.current=f;const k=a(u);return k.current=u,{progress:n(async(t,n,r)=>{const a=async e=>{try{await(n?.(e))}finally{"success"!==e.status&&P.current()}},i={...r,onProgressBlocked:()=>{try{r?.onProgressBlocked?.()}finally{P.current()}},onValidationSuccess:()=>{try{r?.onValidationSuccess?.()}finally{b.current()}}},{plan:o,currentPage:s,currentDetour:l}=e.value,u=y.current;if(c.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:l?.route}),!i?.skipToCompletion&&l&&s){const e=o.detours.find(e=>"thankYou"===e.type),t="processing"===l.type?e:s;return h?.start({target:t?.route}),c.leaveErrorBreadcrumb(`[Journey] Exiting "${l.route}" detour, moving to "${t?.route}"`,{currentDetourRoute:l.route,exitDetourTargetRoute:t?.route,targetPageRoute:s.route}),u(l,s,a)}if(null==s)return c.debug("journey_progression_blocked","[Journey] Blocked progression because the current page is missing"),void i?.onProgressBlocked?.();const p=yb(s,o.greenPath[o.greenPath.length-1])||i?.skipToCompletion,m=o.greenPath.findIndex(({id:e})=>e===s.id),g=o.detours.find(e=>"processing"===e.type),f=p?g:o.greenPath[m+1];h?.start({target:f?.route});const S=k.current.currentUrl.peek(),w=o.greenPath.find(e=>e.route===S.normalizedPath)??s;if(p?S.searchParams.set(Rb,w.id):S.searchParams.delete(Rb),c.leaveErrorBreadcrumb("[Journey] Progressing",{skipToCompletion:i?.skipToCompletion,greenPath:o.greenPath.map(e=>e.route),isLastPage:p,currentPageRoute:s.route,currentDetourRoute:l?.route,nextPageRoute:f?.route}),!p)return _.current(s,a);d.value+=1;try{await v.current(s,l,a,i)}finally{d.value-=1}},[y,e,v,_,d,h,c,P,b]),completing:p}}({journey:u,exitDetour:C,pageComplete:w,pageNegotiate:S}),N=function({plan:e}){const{router:t,observability:r}=ae();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 Sb("Detour, but no matching detour",{groupingHash:"JourneyError::DetourNoMatchingDetour"});const o=`${i.route}${e.greenPath[0].queryParams||""}`;t.navigate(o,a?.routerOptions)},[e.detours,e.greenPath,t,r])}({plan:p}),R=function({negotiate:e}){return n(()=>{e({prefetch:!0,negotiationStage:"progression",silenceViolations:["all"]})},[e])}({negotiate:b}),M=LP();i(()=>P.pendingFieldsNegotiation.subscribe(e=>{"success"!==e?.status&&"error"!==e?.status||u.peek().currentDetour||Cb(P.current.fields.allViolations.peek()??[])&&(M(),N("stockProblems",{routerOptions:{replace:!0}}))}),[P,u,N,M]);const O=r(()=>({detour:N,progress:I,negotiate:b,progressing:l,completing:T,prefetch:R}),[N,I,l,T,b,R]);return d(dc.Provider,{value:O,children:e})}function HP({plan:e,children:i}){const o=m(!1),s=n(e=>{o.value=e},[o]),{observability:l,router:c}=ae(),u=c.currentUrl.value,[p,h]=Ab(e);Ch(p,({previousState:e,action:t,nextState:n})=>{l.leaveErrorBreadcrumb("Journey state transition",{previousState:{history:e.history,redirectTo:e.redirectTo?.route},action:t,nextState:{history:n.history,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 i=a(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&&(i.current=t);const a=i.current,s=e.currentUrl.value.normalizedPath,{history:l}=r.value,c=n.detours.find(e=>e.route===s);if(t)return t;if(c&&a)return a;if(c&&!a){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(uc.Provider,{value:_,children:[d(_b,{}),d(jP,{dispatch:h,progressing:o,onProgressionChange:s,children:i})]})}function $P({disabled:e,key:t,variants:n}){const{client:r,router:a}=ae(),i=a.currentUrl.value;if(e)return;const o=new URLSearchParams(i.search).get(t);if(o&&n.includes(o))return o;const s=r.cookies.get(t);return s&&n.includes(s)?s:void 0}function YP(){const{shop:e}=ae(),t=function(){const e=$P({key:"operatziya_y",variants:[Nr.Control,Nr.Treatment]}),{client:t}=ae(),n=t.unstable_getSerialization("experiments"),r=n?.find(e=>e.clientHandle===vl)?.variant===Nr.Treatment;return e||(r?Nr.Treatment:Nr.Control)}()===Nr.Treatment;return Boolean(e.confirmationPageEnabled)||t}const WP=["delivery-method"],GP=new Set(Rr),JP=new Set(Mr),KP=new Set(Dr);function QP({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:XP(e.deliveryNext)})?{gatedBy:"extension"}:Vr(e.paymentLines)?{gatedBy:"paypalExpress",satisfied:tk(e.paymentLines,e.deliveryNext)&&kb(e.contactInfo,e.allViolations)}:Fr(e.paymentLines)?{gatedBy:"googlePay"}:{gatedBy:null,unsatisfied:t.filter(t=>!((e,t)=>{switch(t){case"contact-information":return kb(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))&&!!_y({address:e,addressSettings:t,countryDetails:n})&&r.every(e=>"shipping-address"!==Pb(e))}({shippingAddress:p,addressSettings:n,countryDetails:m,violations:e.allViolations,state:e,isDraftOrder:s});case"billing-address":return function(e,t,n=[]){return!!_y({address:t,addressSettings:e})&&n.every(e=>"billing-address"!==Pb(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"!==Pb(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",Br(e)||Or(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"!==Pb(e))}},{id:"shipping",label:e.translate("shipping.title"),route:"/shipping",features:WP,fastForwardThroughPage:e=>{return!a(WP)&&("cartNext"===t?function(e){const t=function(e){return"filled"!==e?.status?[]:je(e).filter(e=>"available"===e.status)}(e);return 0!==t.length&&t.every(e=>function(e){return 1===e.methods.length}(e)||function(e){if(e.methods.length<=1)return!1;const t=Lt(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=je(e?.deliveryNext).find(e=>"available"===e.status);return void 0!==i&&!(a!==Lt(i)?.handle)}({latestNegotiation:e,initialNegotiation:o,isPrePopulatedSourceType:l})&&_("shipping","initial_delivery_selection_preserved"));var n},skipOverPage:({deliveryNext:e,isShippingRequired:t})=>!t||fn(e)||Or(e)||h||zr(i().enabledDeliveryMethods)},{id:"payment",label:e.translate("payment.title"),route:"/payment",features:()=>sb(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 XP(e){const t=new Set,n=ZP(e,"PICK_UP"),r=ZP(e,"PICKUP_POINT");return n||ek(t,GP),r||ek(t,JP),(n||r)&&ek(t,KP),t.size>0?t:void 0}function ZP(e,t){return je(e).some(e=>"available"===e.status&&Lt(e)?.methodType===t)}function ek(e,t){t.forEach(t=>e.add(t))}function tk(e,t){const n=Dt(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 nk(e){const{billingAddressSettings:t,nonBillingAddressSettings:n}=e.configuration.addressSettings;return e.isShippingRequired.value?t.value:n.value}const rk=["checkout","cartNext","draftOrder"];function ak({children:e}){const{i18n:a,observability:i,router:o,shop:s,source:l,checkout:c}=ae(),u="shopPay"===c.identity.current.value,p=c.configuration.layout.isOnePage.value,{parts:m}=ie(),h=ge().paymentMethods?.value,g=m.paymentLines,f=YP(),y=function(){const{i18n:e,shop:r,source:a,checkout:i,observability:o}=ae(),{buyerIdentity:s}=ge(),l=pb(),c=Qc(),u=lb(),d=cb(),p=mb(),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&&Jn(t.location.shippingAddress,e))},[s,c,u]);return t(()=>{const t=s.value?.purchasingCompany;if(!t)return;const n=!Yn(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?hb:[],...n?gb:[],...fb]},...r.confirmationPageEnabled?[u()]:[]]:[...o?[{id:"information",label:e.translate("contact.title"),route:"/information",features:hb,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:gb,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})=>fn(e)}]:[],{id:"payment",label:e.translate("payment.title"),route:"/payment",features:fb},u()]}).value}(),v=o.currentUrl.value?.search,_=function(){const{i18n:e,shop:t,source:{type:a},checkout:i,observability:o}=ae(),{extensibility:s}=i,l=Ve(),c=f_(),u=rk.includes(a),{data:d}=k_(),p=function(){const{data:e}=k_();if("NegotiationResultAvailable"!==e?.session?.negotiate.result.__typename)return;const{sellerProposal:t}=e.session.negotiate.result;return tr({delivery:t.delivery,remoteDelivery:nr(t.remote).remoteDelivery})}(),{details:m}=zt(p?.countryCode),h="draftOrder"===a,g=i.proposal.negotiated.fields.mustSelectProvidedShippingRate.value??!1,f=YP(),{parts:y}=ie(),v=ge(),_=v.paymentMethods.value,b=y.paymentLines,P=i.configuration.addressSettings.nonBillingAddressSettings.value,k=nk(i),S=v.isShippingRequired.value,w=n((e,{excludedExtensionTargets:t}={})=>s.ui.hasBlockingExtensionForFeatures({features:e,placementReferences:c,excludedExtensionTargets:t}),[c,s.ui]),C=n((e,t)=>(o.log("journey_page_fast_forwarded","Fast-forwarded through page",{pageId:e,reason:t}),!0),[o]);return r(()=>QP({i18n:e,sourceType:a,addressSettings:P,billingAddressSettings:k,hasBlockingUiExtensionForFeatures:w,getSellableDeliveryMethods:()=>l.value,initialNegotiationData:d,isDraftOrderCheckout:h,isPrePopulatedSourceType:u,isShippingRequired:S,proposedPaymentLines:b,reviewEnabled:f,shippingAddress:p,shippingCountryDetails:m,mustSelectProvidedShippingRate:g,shop:t,checkout:i,paymentMethods:_,observability:o,recordFastForward:C}),[P,k,w,l.value,d,h,u,S,b,f,p,m,g,a,e,t,i,_,o,C])}(),b=function({businessCustomerJourneyPath:e,isShopPay:t,source:n,isOnePageCheckout:r}){return e?"businessCustomer":t?"shopPay":Yn(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:[...ib(e,{beforeStock:[Z_(e)]}),rb(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:[ab(e),K_(e,"redirectToCart"),Q_(e),X_(e),eb(e),tb(e,t),nb(e),rb(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?[ob(e)]:[]],detours:[...ib(e,{afterStock:[]}),rb(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"):sb(t,r.peek(),{shop:a,checkout:i,paymentMethods:n})||o.push("billing-address"),o}},...t?[ob(e)]:[]],detours:[...ib(e),rb(e)]}}({i18n:a,reviewEnabled:f,paymentMethods:h,proposedPaymentLines:g,
2shop:s,checkout:c});case"threePage":return _}},[y,c,v,a,p,b,i,h,g,f,s,_]);return d(HP,{plan:P,children:e})}function ik(){const{data:e}=k_(),{currentPage:t}=pc().value,n=he(),r=qe(),{deliveryMethodsAddressErrors:a}=Je(),[o,l]=s(!0),{setAddressError:c}=Ay(a),u=zy(r.shippingAddress.fields.countryCode.value);return i(()=>{if(!e)return;if(!o||"/information"!==t?.route&&"/"!==t?.route)return void(t&&l(!1));const{current:r}=n,{allViolations:a,paymentLines:i}=r.value;if(Boolean(Ur(i?.lines))&&a?.length){const e=["billing"].flatMap(e=>Array.from(u(e,a)));for(const[t,n]of e)c(t,n)}l(!1)},[void 0!==t,e,n,r]),null}function ok({scrollbarGutter:e,children:t}){const n=eh(),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})]})}const sk=(lk=e=>we({colorScheme:e}),Pe.reduce((e,t)=>({...e,[t]:lk(t)}),{}));var lk;const ck=E(function({children:e,scoped:t}){const n=eh(),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?mk(i):null,r=o?mk(o):null,s=pk(uk(i?.color)),l=pk(uk(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 uk(e){if(e&&"object"==typeof e&&"schemes"in e)return e.schemes}function dk(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,...dk(r,a)}:i?e:null!=r?{...e,[a]:r}:e},{})}function pk(e){if(!e||"object"!=typeof e)return"";const t=ve.color.default;let n="";for(const r of Pe){const a=e[r];if(!a||"object"!=typeof a)continue;const i=dk(a,t);0!==Object.keys(i).length&&(n+=`.${sk[r].trim().split(/\s+/).join(".")} {${b(i)}}`)}return n}function mk(e){return dk(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),ve)}function hk({children:e}){const{typographyPrimary:t,typographySecondary:n}=th();return i(()=>{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 gk({children:e,condition:t}){return d(t?hk:y,{children:e})}function fk({children:e,theme:t,shouldLoadFonts:n,scoped:r}){const{customProperties:a}=h(Iu);return d(Le.Provider,{value:t,children:d(qr,{children:d(gk,{condition:Boolean(n),children:a?d(ck,{scoped:r,children:e}):e})})})}function yk({children:e}){const{checkout:t,source:n,router:r}=ae(),a=r.currentUrl.value,i="simulated"===n.type,o=vr(a.search),s=t.configuration.branding.shell,l=t.configuration.branding.theme,c=Bt()||i||o;return d(fk,{theme:l,shouldLoadFonts:c,children:d(Av,{shell:s,children:d(vk,{children:e})})})}function vk({children:e}){const{canvas:t}=Lv();return d(ok,{scrollbarGutter:t?.scrollbarGutter,children:e})}function _k(){const{embed:e}=ae(),n=h(Hu)?.isModalOpen,r=t(()=>Boolean(n?.value||e?.presentation?.active.value));return i(()=>{let t=!1;return r.subscribe(n=>{n!==t&&(t=n,e?.client?.dialogChange(n?"open":"close"))})},[r,e]),null}function bk(e){return e.activatedExtensionId&&e.activatedExtensionId.length>0?e.activatedExtensionId:e.id}function Pk(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:bk(e),name:e.name,placementReference:e.placementReference,type:e.type,version:e.version,publicIdentifier:t,registrationId:r,targetPublicIdentifier:n}}function kk(e){const t=String(wk(e));return e.stack??t??e.message??""}function Sk(e){const t=wk(e);return t?`${t.name}: ${t.message}`:e.message}function wk(e){if(function(e){return"object"==typeof e.cause&&null!=e.cause}(e)&&"stack"in e.cause)return e.cause}var Ck=(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))(Ck||{}),Ek=(e=>(e.ExtensionUsageError="EXTENSION_USAGE_ERROR",e))(Ek||{});const xk={[jr.ExtensionCustomerPrivacyApiBrowserError]:{eventName:"extension-customer-privacy-api-browser-error",eventType:"interceptor-execution",errorReason:"extension-customer-privacy-api-browser-error"},[jr.ExtensionCustomerPrivacyApiError]:{eventName:"extension-customer-privacy-api-error",eventType:"interceptor-execution",errorReason:"extension-customer-privacy-api-error"},[jr.ExtensionCustomerPrivacyLikelyBotError]:{eventName:"extension-customer-privacy-likely-bot-error",eventType:"interceptor-execution",errorReason:"extension-customer-privacy-likely-bot-error"},[jr.ExtensionCustomerPrivacyServerError]:{eventName:"extension-customer-privacy-server-error",eventType:"interceptor-execution",errorReason:"extension-customer-privacy-server-error"},[jr.ExtensionInterceptorError]:{eventName:"interceptor-execution-broke",eventType:"interceptor-execution",errorReason:"interceptor-execution-broke"},[jr.ExtensionInteractionError]:{eventName:"extension-component-interacted",eventType:"interceptor-execution",errorReason:"extension-component-interacted"},[jr.ExtensionRenderError]:{eventName:"extension-rendered",eventType:"interceptor-execution",errorReason:"extension-rendered"},[jr.ExtensionRunError]:{eventName:"extension-run-error",eventType:"interceptor-execution",errorReason:"extension-run-error"},[jr.ExtensionTimeoutError]:{eventName:"extension-render-timed-out",eventType:"interceptor-execution",errorReason:"extension-render-timed-out"},[jr.ExtensionAssetFetchError]:{eventName:"extension-asset-fetch-error",eventType:"interceptor-execution",errorReason:"extension-asset-fetch-error"},[jr.ExtensionSandboxAssetFetchError]:{eventName:"extension-sandbox-asset-fetch-error",eventType:"interceptor-execution",errorReason:"extension-sandbox-asset-fetch-error"},[jr.ExtensionSandboxUncaughtError]:{eventName:"extension-sandbox-uncaught-error",eventType:"interceptor-execution",errorReason:"extension-sandbox-uncaught-error"},[jr.ExtensionUnsupportedFeatureError]:{eventName:"extension-unsupported-feature-error",eventType:"interceptor-execution",errorReason:"extension-unsupported-feature-error"}},Ik=({children:e})=>{if("undefined"==typeof window)return d(y,{children:e});const{observability:t,userEvents:n,checkout:r}=ae(),a=$g(),o=Yg(),s=r.configuration.layout.isOnePage.value;return i(()=>{const e=(e,t)=>{if(e.name in jr&&t?.extension){const{extension:n}=t,{trace:r,message:a}=function(e){return{message:Sk(e),trace:kk(e)}}(e);if(!ct(e.name))return;const i={apiVersion:n.apiVersion,appId:n.appId,appApiKey:n.appApiKey,appName:n.appName,appVersion:n.version,code:Ek.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 xk&&t?.extension){const{extension:i}=t,{eventName:o,eventType:l,errorReason:c}=xk[e.name],{userToken:u,shopId:d,sessionToken:p,checkoutToken:m,apiClientId:h,sourceId:g,sourceType:f,checkoutSdkVariant:y,checkoutSdkVersion:v,checkoutSdkSchemaVersion:_,pageLoadId:b}=a;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:bk(i),extensionPoint:i.extensionPoint,extensionPlacementReference:i.placementReference,extensionInstanceId:i.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:i.publicIdentifier,extensionTargetPublicIdentifier:i.targetPublicIdentifier}})}};return t.addOnError(r),t.addOnError(e),()=>{t.removeOnError(r),t.removeOnError(e)}},[t,n,a,s,o]),d(y,{children:e})};
2function Ak(){const e=Tf(),t=a(new Set);return i(()=>()=>{for(const e of t.current)cancelAnimationFrame(e.handle),clearTimeout(e.timeout),e.resolve();t.current.clear()},[]),hc(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 Tk(){const{checkout:{identity:e}}=ae(),n=ge().buyerIdentity,{inMemoryApplePayParts:{asPaymentMethod:r}}=_n();return t(()=>"applePay"===e.current.value&&Boolean(n.value?.purchasingCompany)&&r.value)}function Lk(){const{checkout:{wallets:e},embed:t}=ae(),r=function(){const{deliveryLines:e,email:t,phone:r,shippingAddress:a,billingAddress:i,billingAddressOption:o,paymentLines:s,tipLines:l,discountLines:c,interfaceFlow:u,externalDeliveryIds:d,cartMetafields:p,attributes:m}=qe(),h=function(){const e=ge().buyerIdentity;return n(()=>{const t=e.value?.customerProfile;if(t)return t.email},[e])}(),g=mP(),f=Bv();return n((n,y=!1)=>{if(u.value=void 0,d.value=void 0,n)t.value=n.email,r.value=n.phone,a.value=n.shippingAddress,i.value=n.billingAddress,n.billingAddressOption&&(o.value=n.billingAddressOption),s.value=n.paymentLines,l.value=n.tipLines,c.value=n.discountLines,p.value=n.cartMetafields;else{const e=h()??"",n=g("shipping"),o=g("billing");t.value=e,r.value="",y||(a.value=n??tc(a.value)),i.value=o??tc(i.value);const s=m.value;m.value=s?s.filter(e=>e.key!==$r):s}f.value||y||Bh(e,void 0)},[m,o,i,p,e,c,t,d,g,h,u,f,s,r,a,l])}(),a=Hr(),i=Tk();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 Nk({onClick:e,shouldResetCustomerInfo:r,shouldRemovePaymentLine:a,skipRedirect:i}={}){const{negotiate:o,progress:s}=mc(),l=Lk(),{dispatch:c}=Th()??{},{client:u,observability:d,persistence:p,router:m,checkout:{identity:{current:h}},i18n:g}=ae(),{buyerIdentity:f}=ge(),{value:y}=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:g,buyerIdentity:f})),{currentDetour:v}=pc().value,_=u.unstable_getSerialization("forcedRedesignWallet"),b=function(e){try{const t=new URL(e.href);return t.searchParams.delete(xn),t.searchParams.append(Gv,"1"),t.toString()}catch{return}}(m.currentUrl.value),P=m.currentUrl.value.searchParams.has(Gv),k=_&&b&&!P&&!i;return{label:y,onClick:n(async t=>{if(d.counter({name:"checkout_return_to_guest_checkout",value:1,attributes:{identity:h.value,redirect:Boolean(k)}}),k)return p?.clearAll(),e?.(),t?.(),void window.location.replace(b);var n;c?.("addressReset"),(n=m.currentUrl.peek()).searchParams.has(xn)&&(n.searchParams.delete(xn),history.replaceState(null,"",n.href)),e?.(),l({shouldResetCustomerInfo:r,shouldRemovePaymentLine:a}),c?.("reset"),v&&s("checkout-as-guest-action"),t?.(),await o({silenceViolations:["non-stock"]})},[v,c,b,h,o,e,p,s,l,k,d,m,r,a])}}function Rk(){return function(){const{router:e}=ae(),t=e.currentUrl.value,{onClick:n}=Nk({shouldResetCustomerInfo:!0});i(()=>{t.searchParams.has(Gv)&&(n?.(),function(e){e.searchParams.has(Gv)&&(e.searchParams.delete(Gv),history.replaceState(null,"",e.href))}(t))},[])}(),null}const Mk="wallet_deceleration";function Dk(){const{walletUsedForSubmissionSignal:e,inMemoryGooglePayParts:{paymentSheetError:t}}=_n(),{clearForcedCheckoutLayout:r}=Rv(Ln),{checkout:a,router:i}=ae();return Nk({onClick:n(async()=>{var n;e.value=void 0,t.value=void 0,r({wallet:"GOOGLE_PAY"}),"true"===(n=i.currentUrl.value).searchParams.get(Mk)&&(n.searchParams.delete(Mk),history.replaceState(null,"",n.href)),a.unstable_evaluateSupportsSplitShipping(i.currentUrl.value)},[e,t,a,r,i]),shouldResetCustomerInfo:!0,skipRedirect:!0})}function Ok({shouldResetCustomerInfo:e}){const t=Lk();return n(()=>{t({shouldResetCustomerInfo:e})},[t,e])}const zk="google_pay_legacy_token_bounce";function Bk(){return function(){const{checkout:e,embed:t,observability:n,shop:r}=ae(),{inMemoryGooglePayParts:{paymentSheetError:a}}=_n(),{onClick:o}=Dk();i(()=>{r.hasFlagEnabled(Yr)&&(t||"GOOGLE_PAY"===e.wallets.escalatedWallet.value&&(e.latestReceipt.value||Wr({paymentLines:e.proposal.proposed.paymentLines.value})&&(n.counter({name:zk,value:1}
2),n.log(zk,"[useBounceLegacyGooglePayToken] Detected a legacy Google Pay token on load and returned the buyer to guest checkout"),o?.(()=>{a.value={type:"recovery_notice"}}))))},[])}(),null}const Vk=ne("NavigationBlockerContext");class Fk extends Error{constructor(){super(...arguments),this.name="NavigationBlockerTimeout"}}function Uk({children:e}){const t=a(new Set),i=m(!1),{observability:o}=ae(),s=n(e=>{setTimeout(()=>{t.current.has(e)&&o.error(new Fk(`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",a=t.current;e?(a.add(r),s(r)):a.delete(r),i.value=a.size>0},[i,s]),c=r(()=>({blocking:i,setBlocking:l}),[i,l]);return d(Vk.Provider,{value:c,children:e})}const qk=f({registerPayNowButtonElement:()=>()=>{},payNowButtonElement:null,setPayNowButtonSectionMounted:()=>{},payNowButtonSectionMounted:!1}),jk=()=>h(qk);function Hk(){const{registerPayNowButtonElement:e}=jk(),t=a(null);return n(n=>{t.current?.(),t.current=n?e(n):null},[e])}function $k({children:e}){const t=a(new Set),[i,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:i,setPayNowButtonSectionMounted:p,payNowButtonSectionMounted:m}),[u,i,p,m]);return d(qk.Provider,{value:h,children:e})}function Yk(){return C_(ae())}function Wk(){const{embed:e}=ae(),t=Xh(),n=t?.config?.pixelEventsMode,r=e?.configuration?.pixelMode;return"DISABLED"===n||"FORWARD_TO_CLIENT"===n||"DISABLED"===r||"FORWARD_TO_CLIENT"===r}function Gk(){const{mobileCheckoutSdk:e}=ae(),t=e.config.version,n=e.config.schema;return Boolean(t)||Boolean(n)}function Jk({isFlagshipPartner:e,embedderProposalSnapshotEmail:t,proposedEmail:n}){if(e)return t||n||void 0}function Kk(e){const t={totalAmount:{any:!0},paymentLines:[],billingAddress:null};return{...e,buyerIdentity:{...e.buyerIdentity,email:"",phone:"",customer:{presentmentCurrency:e.buyerIdentity?.customer?.presentmentCurrency,countryCode:e.buyerIdentity?.customer?.countryCode},marketingConsent:[]},delivery:{deliveryLines:[],noDeliveryRequired:[]},discounts:{lines:(n=e.discounts?.lines??[],n.filter(e=>e.allocationSet.allocatedForTotal?.targets.some(e=>!e.deliveryLineTarget)||e.allocationSet.allocated?.allocations.some(e=>!e.target.deliveryLineTarget)))},...e.payment?{payment:t}:{},...e.remote&&{remote:{...e.remote,remoteNegotiations:e.remote.remoteNegotiations.map(e=>({...e,payment:t}))}}};var n}var Qk=(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))(Qk||{});class Xk extends Error{constructor(){super(...arguments),this.name="MissingGuestCheckoutUrlError"}}function Zk(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}=ae(),y=f.currentUrl.value,{checkoutAsGuestUrl:v,profilePreviewToken:_,checkoutProfileContext:b,redirectSource:P}=h.config,k="simulated"===l.type,S=h.user.isAuthenticatedUser,w=u.hasFlagEnabled(Gr),C=c.negotiator.throttleState.peek().token,E=c.checkpointToken.value,x=c.configuration.renderContextToken.token.value,I=cP({mode:"copy-if-missing",include:{shopClientUuid:!0}}),A=Jk({isFlagshipPartner:g?.isFlagshipPartner,embedderProposalSnapshotEmail:g?.embedderProposalSnapshot.value?.email,proposedEmail:c.proposal.proposed.email.value}),T=r(()=>{if(k)return"";if(!v)return p?m.storefront():"";const e=new URL(v);e.searchParams.set(Jr,"true"),Kr(e),t&&S.value&&Qr(l.type)&&w&&Xr(e,ia),E&&e.searchParams.set(Zr,E),C&&e.searchParams.set(Nb,C),_&&b&&(e.searchParams.set(ea,_),e.searchParams.set(ta,b)),vr(y.search)&&e.searchParams.set(na,"shop_web"),S.value?e.searchParams.set(ra,"true"):e.searchParams.delete(ra),x?e.searchParams.set("rctx",x):e.searchParams.delete("rctx");const n=new URLSearchParams(y.search).get("_cs");n&&e.searchParams.set("_cs",n);
2const r=new URLSearchParams(a.initialRequest.url.search);return I(e.searchParams,r),A&&!e.searchParams.get("checkout[email]")&&e.searchParams.set("checkout[email]",A),e.href},[k,v,E,a.initialRequest.url.search,_,b,y.search,S.value,C,p,m,x,I,A,t,l.type,w]);let L=i.translate("unauthenticated_modals.generic.cta");(Yk()||g?.isCheckoutKit())&&(L=i.translate("checkout_sdk.use_another_payment_method"));const N=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:{...aa(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),N(),!T)return c.unstable_setRedirectingExternally(!1),void o.error(new Xk("redirectToGuestCheckout called without a guest checkout URL"));if(!e)return void window.location.assign(T);const t=new URL(T);!function(e,t){t&&(e.set(oa,t.paymentMethod),t.paymentMethodIdentifier?e.set(sa,t.paymentMethodIdentifier):e.delete(sa))}(t.searchParams,e),window.location.assign(t.href)},[c,N,T,o]);return r(()=>({label:L,href:T,onClick:N,redirectToGuestCheckout:R}),[L,T,N,R])}function eS(e){const{negotiate:t}=mc();return n(n=>t({silenceViolations:["all"],force:!0,customizeNegotiation:Kk,negotiationStage:"negotiation",onComplete:t=>e(n,t)}),[t,e])}function tS({clearPii:e}){const{embed:t,checkout:r,userEvents:a,source:i,shop:o}=ae(),s=qe().shippingAddress.value,{href:l,redirectToGuestCheckout:c}=Zk("payment_page",{markPrefilledGuestArrival:!e}),u=Jk({isFlagshipPartner:t?.isFlagshipPartner,embedderProposalSnapshotEmail:t?.embedderProposalSnapshot.value?.email,proposedEmail:r.proposal.proposed.email.value}),d=eS(c),p=function(e,t){const{negotiate:r}=mc();return n(n=>r({silenceViolations:["all"],force:!0,customizeNegotiation:e=>{const n=Kk(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=>la(s,e.address)));return n(t=>{if(r.unstable_setRedirectingExternally(!0),!e||h)return!e&&l&&a.monorailEvent({schemaId:"shopify_pay_payment_page_ui_interaction/1.2",payload:{...aa(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 nS=[3890849,3850711,5198245];function rS(e){return!!e&&nS.includes(e)}function aS(){const{observability:e}=ae(),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 iS({children:e}){const{checkout:t,observability:n,source:r,client:o,environment:s,shopPay:l}=ae(),c=t.rememberMe.shouldSetRememberMeCookies.value,u="simulated"===r.type,{href:p}=Zk(),m=l_().value,h=aS(),g=a(!1),f="shopPay"===t.identity.current.value,v=o.unstable_getSerialization("apiClientId"),_=o.unstable_getSerialization("shopPayConfig"),b=rS(v),P=!u&&void 0!==m&&!b&&!t.configuration.isUniversalCheckoutFinalizer,S=f&&P,w=f&&!u&&!S&&!0===_.has_remember_me_session&&""!==l.user.shopAccountUuid.value,C=a(!1);return k(()=>{const e=t.latestReceipt.value;if(null!=e)switch(e.status){case"processed":h.notify({checkout_completed:!0});break;case"action_required":"complete_payment_challenge"===e.action.type?h.notify({checkout_error:"threeds_required"}):h.notify({checkout_error:"generic_error"});break;case"failed":"payment"===e.failure.type||"discount"===e.failure.type?h.notify({checkout_in_progress:!1}):h.notify({checkout_error:"generic_error"})}}),i(()=>{!g.current&&c&&(t.rememberMe.setRememberMeCookies(),g.current=!0)},[c,t.rememberMe]),function({enabled:e,observability:t,shopServerUrl:n}){const r=a(!1);i(()=>{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:w,observability:n,shopServerUrl:s.services.shopServer.url}),i(()=>{S&&!C.current&&(C.current=!0,n.log("shop_pay_wrapper_redirecting_to_guest_checkout","Redirecting to guest checkout",{shopPayUnavailableReason:m}),"deferred_payment"!==m&&n.counter({name:"shop_pay_unavailable_redirecting_to_guest_checkout",value:1}),window.location.assign(p))},[p,n,m,S]),S?null:d(y,{children:e})}function oS(){const{client:e}=ae(),t=e.unstable_getSerialization("experiments"),n=t?.find(e=>e.clientHandle===_l)?.variant,r=Object.values(ca).find(e=>e===n)??ca.Control;return{variant:r,showPaymentTiles:r===ca.VariantA||r===ca.VariantC,useRedesignedChoiceList:r===ca.VariantB||r===ca.VariantC,showSingleCreditCard:r!==ca.Control}}function sS(){const{source:e}=ae(),{useRedesignedChoiceList:t}=oS();return t&&"shopPayExternal"!==e.type?"redesigned":"base"}
2class lS extends Error{constructor(){super(...arguments),this.name="TranslationError"}}const cS=()=>{const{url:e}=ae();return r(()=>[e.cart(),e.storefront()],[e])};function uS(){const{router:e,shop:n}=ae(),r=nf(),{cartLink:{visibility:a}}=Lv(),i=pc(),o=dS(),s=T("hidden"===a);return t(()=>{const{currentDetour:t}=i.value,a="thankYou"===t?.type;return n.hasStorefront&&!r.value&&!a&&!vr(e.currentUrl.value.search)&&Boolean(o.value)&&!s.value})}function dS(){const{source:e,url:n}=ae(),r="simulated"===e.type,a=ge().buyerIdentity;return t(()=>{if(r)return new URL(n.cart());let t;return e.cartReturnUrl&&(t=new URL(e.cartReturnUrl)),Boolean(a.value?.customerProfile)&&t&&t.searchParams.append("logged_in","true"),t})}function pS(e){return e.currentUrlMatches("/thank-you")}const mS=_(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}=ae(),m=dS(),h=function(){const{client:e,environment:{services:t},shop:{customerAccounts:n,storefrontDomains:r}}=ae(),a=r?.map(e=>`https://${e}`)??[],i=[t.shopServer.url,...a];if(n.domain){const e=`https://${n.domain}`;i.push(e)}const o=e.unstable_getSerialization("loginUrl");return o&&i.push(`https://${new URL(o).host}`),i}(),g=new URL(s.storefront()).origin,f="simulated"===l.type,y=c.configuration.isWindowOpenDelegationEnabled,v=cS();if(c.configuration.isUniversalCheckoutFinalizer&&pS(o))return d("a",{...r,ref:a,"aria-disabled":"true",children:n});let _="_blank"===t,b="_blank"===t,P=Yl(e,{cart:Gl(m.value),checkout:Wl()});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 hS.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:gS.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(Jl(P))||w.test(P)||(P="#");break;default:L(k)}const C=_?"_blank":void 0,E=_?"noopener noreferrer":void 0,x=Ru({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(B,{...r,router:o,href:P,target:C,rel:E,ref:a,"aria-describedby":x,children:n})});mS.displayName="Link";const hS=new Set(["http","https"]),gS=new Set([...hS,"mailto","tel","sms"]);function fS({children:e}){const{geolocation:t}=Py(),{i18n:a,embed:i,checkout:o,observability:s,shop:l}=ae(),c=ua({embedder:i?.embedder,shop:l}),u=Cf(),p=o.configuration.layout.isOnePage.value,m="redesigned"===sS(),h=n(e=>a.numberFormatter().format(e),[a]),{symbol:g,prefixed:f}=F(a.currency,a),y=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 lS(`Missing UI library translation: ${e}`);return r}}(a),[a]),v=M_();return d(cd,{currency:{code:a.currency,symbol:g,symbolPrefixed:f},embed:i?{embedder:i.embedder,interstitialBrandingEnabled:c}:void 0,formatNumber:h,geolocation:{countryCode:t.country.code},linkComponent:mS,locale:{direction:a.localeDirection,languageCode:a.locale},onePage:p,editor:u,redesignedChoiceLists:m,translate:y,announcementEmitter:{...v,close:()=>v.emit("closeAnnouncement")},logger:s,children:e})}const yS=ne("ValidationErrorsContext");function vS(){const e=new Set;return t=>{const n=`${t.message}${t.target}`,r=e.has(n);return e.add(n),!r}}const _S="$.payments",bS="$.cart.buyerIdentity",PS="$.cart.deliveryGroups[0].deliveryAddress",kS="$.cart.localizedField",SS="$.cart.billingAddress";function wS(){const e=ie(),{allViolations:n}=ge(),r=kn("allViolations"),a=t(()=>r.value?[]:n.value?n.value.filter(e=>"UnprocessableTermViolation"===e.__typename&&da.has(e.code)).map(e=>({message:e.localizedMessage||e.nonLocalizedMessage,target:e.target})):[]);return t(()=>{const t=[...e.validationErrors.value,...a.value].filter(vS()),n=t.filter(({target:e})=>e?.startsWith(PS)&&Boolean(e.replace(`${PS}.`,""))),r=t.filter(({target:e})=>e?.startsWith(bS)&&Boolean(e.replace(`${bS}.`,""))),i=t.filter(({target:e})=>e?.startsWith(_S)&&Boolean(e.replace(`${_S}.`,""))),o=t.filter(({target:e})=>e?.startsWith(kS)&&Boolean(e.replace(`${kS}.`,""))),s=t.filter(({target:e})=>e?.startsWith(SS)&&Boolean(e.replace(`${SS}.`,""))),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}})}function CS({children:e}){const{deliveryMethodsAddressErrors:t}=Je(),{validation:o}=ae().checkout,{billingAddressErrors:s,poNumberError:l}=o,{emailInputError:c,phoneInputError:u}=o.contactErrors,{contactErrors:p,deliveryAddressErrors:m,billingAddressErrors:h,poNumberErrors:g,globalErrors:f}=wS().value,{shippingAddress:y}=qe(),v=function(e){const{checkout:t}=ae(),n=t.configuration.addressSettings.nonBillingAddressSettings.value,{details:a}=zt(e),i=a?t.address.extendedAddressMode.getFormatFromCountry(a):void 0;return r(()=>Gt({countryDetails:a,format:i,addressSettings:n}),[a,i,n])}(y.fields.countryCode.value),_=function(){const e=a(new Set),{userEvents:t,shop:{id:r,sameBillingAndShippingAddress:i},source:{checkoutSessionIdentifier:o}}=ae(),s=ge(),{value:l}=s.shippingAddress,{value:c}=s.billingAddress,{value:u}=s.localizationExtensions;return n(({errors:n,reasons:a})=>{if(l&&Uy(l)){const s=`shipping:${qy(l)}`;e.current.has(s)||n?.some(e=>Jt.has(e.code))||a?.includes(Kt.InvalidAddress)||(jy(l.countryCode??"unknown",Fy(l),"shipping_address",r,o,i,t),e.current.add(s))}if(c&&Uy(c)){const s=`billing:${qy(c)}`;e.current.has(s)||n?.some(e=>Qt.has(e.code))||a?.includes(Kt.InvalidAddress)||(jy(c.countryCode??"unknown",Fy(c),"billing_address",r,o,i,t),e.current.add(s))}if(u&&u?.length>0){const{cacheKey:a,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}:${Zt(e.value.trim())}`).join("|"),keysOnly:t.map(e=>e.key)}}(u);if(s.length>0){const u=`localization:${a}`;e.current.has(u)||n?.some(e=>Xt.has(e.code))||(jy(l?.countryCode??c?.countryCode??"unknown",s,"localized_id",r,o,i,t),e.current.add(u))}}},[l,c,u,r,o,i,t])}(),b=r(()=>({}),[]),P=n((e,t,n)=>{const r=e.value,a=t=>{e.value=t};!r&&n&&(a(n.message),b[t]=n.message),"string"!=typeof r||b[t]!==r||n||(a(void 0),delete b[t])},[b]);i(()=>{P(u,"phone",p.find(({target:e})=>"phone"===e?.split(".")?.pop())),P(c,"email",p.find(({target:e})=>"email"===e?.split(".")?.pop()))},[p,c,P,u]),i(()=>{Object.entries(t).forEach(([e,t])=>{let n=m.find(({target:t})=>{const n=t?.split(".").pop();return!!n&&("postalCode"===e&&"zip"===n||"zoneCode"===e&&"provinceCode"===n||("streetName"===e||"streetNumber"===e)&&"address1"===n||("neighborhood"===e||"line2"===e)&&"address2"===n||n===e)});const r=["streetName","streetNumber","line2","neighborhood"].includes(e),a=v?.includes(e);r&&!a&&n&&(n={...n,message:" "}),P(t,e,n)})},[m,t,v,P]),i(()=>
2{Object.entries(s).forEach(([e,t])=>{const n=h.find(({target:t})=>{const n=t?.split(".").pop();return!!n&&("postalCode"===e&&"zip"===n||"zoneCode"===e&&"provinceCode"===n||n===e)});P(t,`billing_${e}`,n)})},[s,h,P]),hc(e=>{"success"===e.type||"error"===e.type?_({errors:e.errors}):"invalid"===e.type&&_({reasons:e.reasons})}),i(()=>{P(l,"poNumber",g[0])},[P,l,g]);const k=r(()=>({globalErrors:f}),[f]);return d(yS.Provider,{value:k,children:e})}const ES=w({load:()=>fl(()=>import("./d08a6c7d.B8v-AHSc.js"),__vite__mapDeps([62,1,2,3,4,5,63,8,64,44,65,11,66,10,67,68,7,9,12])).then(e=>e.ApplePaySessionLoader),renderLoading:({children:e})=>e,useError:function(e){const{sessionLoadFailed:t}=_n().inMemoryApplePayParts,{observability:n}=ae();i(()=>{e&&(t.value=!0)},[e,n,t])}});function xS(){const e=function(){const e=Rt();return t(()=>!!e.value&&void 0!==window.ApplePaySession)}(),{availableWallets:n}=_n(),r=T(n.some(({name:e})=>"APPLE_PAY"===e)),i=a(!1),o=t(()=>(!i.current&&e.value&&r.value&&(i.current=!0),i.current));return d(x,{when:o,children:d(ES,{})})}function IS(){const{checkout:e}=ae();return!e.configuration.showPayButton}function AS({enabled:e,onTimeout:t,timeout:n=6e4}){const r=a(null),o=a(t);o.current=t,i(()=>{if(e)return r.current=setTimeout(()=>o.current(n),n),()=>{r.current&&clearTimeout(r.current)}},[e,n])}var TS={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 LS({id:e,children:t,accessibilityRole:n,level:r,textAlign:o,autoFocus:s,visibility:l,tabIndex:c,display:u="block"}){const p=Eu(),m=r??p??0,h=p?`h${p}`:"h1",g="hidden"===l?TS.visuallyHidden:v(TS.Heading,o&&TS.textAlignVariant[o],m?TS.levelVariant[m]:void 0,u&&TS.displayVariant[u]),f=a(null);return i(()=>{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 NS({children:e,dialogLabel:t,renderInlineUntilMounted:n=!1}){const{lock:r}=uy(),a=m(!1);i(()=>{r(),a.value=!0},[a,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&&!a.value?d("div",{"aria-hidden":"true",children:o}):null,d(uu,{children:d(sy,{children:o})})]})}function RS({renderInlineUntilMounted:e=!1,useConsentCopy:t=!1}){const{i18n:n}=ae(),r=t?n.translate("wallets.deceleration.one_more_step_to_complete_order"):n.translate("wallets.deceleration.one_more_step");return d(NS,{dialogLabel:r,renderInlineUntilMounted:e,children:d(iy,{gap:"large-400",alignItems:"center",children:[d(qf,{children:d($f,{size:"large"})}),d(LS,{level:2,textAlign:"center",children:r})]})})}function MS({onTransitionComplete:e,useConsentCopy:t=!1}){return d(DS,{onTransitionComplete:e,useConsentCopy:t})}function DS({onTransitionComplete:e,useConsentCopy:t}){const{checkout:r,i18n:o}=ae(),s=IS(),{payNowButtonElement:l,payNowButtonSectionMounted:c}=jk(),u=Boolean(l||s&&c),p=a(!1);u&&(p.current=!0);const m=r.configuration.layout.isOnePage,h=m.value,g=p.current,f=a(null),y=a(!1),v=a(!1),_=n(()=>{m.value&&(y.current||(y.current=!0,Zu({content:o.translate("wallets.errors.subscription_review_required"),role:"status"}),r.wallets.setIsDecelerating(!1),e()))},[o,m,e,r.wallets]);return AS({enabled:!0,onTimeout:()=>{v.current=!0,_()},timeout:1e4}),i(()=>{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(RS,{renderInlineUntilMounted:!0,useConsentCopy:t})}function OS(e){const{shop:n,checkout:{configuration:r,identity:a}}=ae(),i="shopPay"===a.current.value,o=n.hasFlagEnabled(bn);return t(()=>pa({supportsOnePage:ma({isOnePage:r.layout.isOnePage.value,isApplePay3PageVaultedReviewEnabled:o,asPaymentMethod:e.value}),isShopPayActive:i}))}const zS=["address2","company","phone"];function BS({addressErrors:e}){if(1!==e.size)return;const[t]=e.keys();var n;return void 0!==t?(n=t,zS.includes(n)?t:void 0):void 0}function VS({missingAddressField:e,violations:t}){return"company"===e&&t.some(({code:e})=>"DELIVERY_COMPANY_REQUIRED"===e)}function FS({addressErrors:e,violations:t}){const n=BS({addressErrors:e});if(!VS({missingAddressField:n,violations:t}))return new Map(e);const r=new Map(e);return r.delete(n),r}function US({paymentLines:e,paymentMethods:t}){const n=t?.some(e=>"wallet"===e.type&&"PAYPAL_EXPRESS"===e.name);if(!n)return{status:"not_connected"};const r=Dt(e,"PAYPAL_EXPRESS");if(r&&ha(r)){const{walletContent:e}=r.method;return{status:"connected",email:e?.email??"",token:e?.token??""}}return{status:"not_connected"}}function qS({code:e}){return Kn.has(e)||Sa.has(e)||wa.has(e)||Ca.has(e)||da.has(e)||Ea.has(e)||xa===e}function jS({isPayWithPayPalButton:e}){const{inMemoryPayPalParts:t}=_n();return e?t.payWithPayPalButtonStatus:t.acceleratedCheckoutButtonStatus}function HS(){const{isInPayPalContextSignal:e}=_n(),{i18n:n}
2=ae(),r=jS({isPayWithPayPalButton:!0}),{inMemoryPayPalParts:{accountStatus:a}}=_n();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 $S=()=>{const{paymentLines:e}=qe();return n(()=>{const t=e.value;e.value=An(t,{method:{type:"wallet",name:"PAYPAL_EXPRESS"}})},[e])};function YS(){const e=Ve(),{checkout:n,shop:r}=ae(),a=n.configuration.layout.isOnePage.value,i=r.hasFlagEnabled(ya),o=n.extensibility.ui.hasAtRiskPlacement;return t(()=>{if(a)return!1;if(i&&!o.value)return!1;const t=e.value.enabledDeliveryMethods.includes("PICK_UP");return!n.isShippingRequired.value||!t})}function WS(e){return Boolean(e.value?.method.walletContent?.isVenmo)}const GS=()=>{const{paymentLines:e}=qe();return t(()=>Dt(e.value,"PAYPAL_EXPRESS"))},JS=()=>{const{paymentLines:e}=qe();return t(()=>{const t=Dt(e.value,"PAYPAL_EXPRESS");return Boolean(t&&ha(t))})},KS=()=>{const{inMemoryPayPalParts:{accountStatus:e}}=_n(),{progressing:n}=mc(),r=XS();return t(()=>Boolean(r.value&&("loading"===e.value.status||n.value)))},QS=()=>{const e=XS(),n=ga(),r=fa(),a=wt();return t(()=>!(!r.value&&(n.value||a.value&&a.value.amount<=0)||!e.value))},XS=()=>{const{paymentLines:e}=qe();return t(()=>{const t=Dt(e.value,"PAYPAL_EXPRESS");return Boolean(t&&!ha(t))})},ZS=new Map,ew=new Map,tw=new Map;class nw extends gl{constructor(){super(...arguments),this.name="DuplicateWalletError",this.defaultGroupingHash="DuplicateWalletError"}}function rw({children:e}){const{checkout:a,observability:o,router:l,i18n:c,shop:u,source:p}=ae(),h=l.currentUrl.value,g=a.configuration.layout.isOnePage.value,f=u.hasFlagEnabled(bn),y=wv(),{forceOnePageCheckoutLayout:v}=Rv(bn),_=m(h.searchParams.has(Pn)&&!a.wallets.hasConsumedApplePaySubscriptionReviewParam.value),{shippingAddress:b}=qe(),P=Aa(p),S=af(It.PayPal,{scope:P}),w=af(It.GooglePay,{scope:P}),C=af(It.AmazonPay,{scope:P}),E=af(It.ApplePay,{scope:P}),x=function(e){const n=qe().paymentLines;return t(()=>{const t=e.lastClicked.value,r=Dt(n.value,"PAYPAL_EXPRESS");return Boolean(r)||"PAYPAL_EXPRESS"===t})}(a.wallets),I=m(void 0),A=wh({sdkStatus:{status:"idle"},buttonStatus:{status:"not_rendered"},paymentSheetError:void 0,paymentSheetOpenPromise:void 0,paymentSheetOpenPromiseResolve:void 0}),L=wh({acceleratedCheckoutButtonStatus:{status:"not_rendered"},payWithPayPalButtonStatus:{status:"not_rendered"},accountStatus:US({paymentLines:a.proposal.proposed.paymentLines.peek(),paymentMethods:a.proposal.negotiated.fields.paymentMethods.peek()}),isLoadingPaymentSheet:!1,isApproving:!1,paymentSheetError:void 0}),N=wh({buttonStatus:{status:"not_rendered"}}),R=wh({buttonStatus:{status:"not_rendered"}}),M=Sv(),D=Sn(),O=wh({asPaymentMethod:!1,buttonStatus:{status:"not_rendered"},paymentSheetError:void 0,subscriptionReviewTransition:_.value&&ec({applePaySubscriptionsDecelerationActive:y,applePayThreePageVaultedReviewEnabled:f,isOnePageCheckout:g})&&Ta({isApplePaySubscriptionsDecelerationActive:y,isApplePaySubscriptionReviewLayoutSupported:g||u.hasFlagEnabled(bn),hasSubscriptionReviewQueryParam:_.value,isABTestActive:u.hasFlagEnabled(mn),variant:M,isCaliforniaBillingOrShippingAddress:D.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),B=wh({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}),V=m(!1),F=m(void 0),{queryParam:U}=Yv({applePayPaymentSheetError:O.paymentSheetError,applePaySubscriptionReviewTransition:O.subscriptionReviewTransition}),q=OS(O.asPaymentMethod).value,j=a.configuration.addressSettings.nonBillingAddressSettings.value.isRequired("company");!function(e){const{parts:t}=he(),{paymentMethods:n}=ge();k(()=>
2{if("connected"===e.peek().status)return;const r=US({paymentLines:t.paymentLines.value,paymentMethods:n.value});"connected"===r.status&&(e.value=r)})}(L.accountStatus),function(e){const{environment:t,embed:n,observability:r,source:{checkoutSessionIdentifier:a}}=ae(),o=ge().paymentMethods,s=Boolean(n?.isFlagshipPartner)&&!Tn(n?.embedder),l=o.value?.find(e=>"wallet"===e.type&&"SHOP_PAY"===e.name),c=l?.placements?.includes("ACCELERATED_CHECKOUT"),u=c?l?.eligibilityToken:void 0,d=t.services.shopServer.url,p=e.buttonStatus;i(()=>{if(!s)return void(p.value={status:"rendered"});if(!u)return void(p.value={status:"not_eligible"});const e=`${d}|${a||u}`,t=ZS.get(e);if(t)return void(p.value=t);const n=tw.get(d)??0;if(Date.now()<n)return void(p.value={status:"error"});let i=!1,o=ew.get(e);return o||(o=async function(){try{const e=await fetch(`${d}/pay/checkout_eligibility/check`,{method:"POST",credentials:"omit",headers:{"Content-Type":"application/json"},body:JSON.stringify({token:u})});if(!e.ok)return 429===e.status&&tw.set(d,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&&ZS.set(e,t),ew.delete(e),t)),ew.set(e,o)),o.then(e=>{i||(p.value=e)}).catch(()=>{}),()=>{i=!0}},[s,u,a,d,p,r])}(R),function(){const{checkout:{proposal:{negotiated:e,proposed:t},wallets:n},observability:r}=ae(),a=n.escalatedWallet.value;i(()=>{if(t.email.value)return;const n=e.fields.paymentLines.value?.lines??[];let i;switch(a){case In.AmazonPay:case In.BuyWithPrime:i=function(e,t){const n=Ia(e,t);if(!n)return;const r=n.method.walletParams;return r?.email}(n,a);break;case"PAYPAL_EXPRESS":case"VENMO":i=function(e){const t=Dt(e,"PAYPAL_EXPRESS");return t&&t.method.walletContent?t.method.walletContent.email:void 0}(n);break;default:return}i?(t.email.value=i,r.log("checkout_wallets_email_recovery","[useRecoverWalletContact] Detected a missing email during a wallet flow and recovered it",{escalatedWallet:a,status:"success"})):r.log("checkout_wallets_email_recovery","[useRecoverWalletContact] Detected a missing email during a wallet flow but was unable to recover it",{escalatedWallet:a,paymentLines:n,status:"failure"})},[])}();const H=a_(R),$=u_({inMemoryGooglePayParts:A,inMemoryPayPalParts:L,inMemoryVenmoParts:N,inMemoryApplePayParts:O,inMemoryAmazonPayParts:B,didIncrementUnusablePartialAddressMetric:V}),Y=r(()=>$?.filter(({placements:e,name:t})=>("APPLE_PAY"!==t&&"GOOGLE_PAY"!==t||"localization_extension_field_error"!==U)&&!("APPLE_PAY"===t&&j&&!q)&&r_(t,e,H)),[$,U,j,q,H]),W=T(Y);i(()=>{Y?.length&&performance.mark(La)},[]);const G=Y?.map(e=>e.name)||[],J=G.join(",");i(()=>{new Set(G).size!==G.length&&o.error(new nw("Duplicate accelerated wallet(s) found in checkout",{metadata:{duplicatedWallets:[...new Set(G.filter((e,t)=>G.indexOf(e)!==t))],allWalletNames:G}}))},[J,o]);const K=Y?.length||0,Q=void 0!==a.wallets.activeSession.value?.wallet&&"APPLE_PAY"!==a.wallets.activeSession.value.wallet&&Boolean(a.wallets.isDeceleratingSignal?.value),X=O.subscriptionReviewTransition.value,Z=t(()=>Na({checkout:a})),ee=Z.value&&Ra(M),te=function({asPaymentMethod:e,useConsentCopy:t,isCaliforniaBillingOrShippingAddress:n,hasSubscription:r,transition:a,isABTestActive:i}){return!e&&(!!(t||n&&r)||"storefront_redirect"===a&&(n||!i))}({asPaymentMethod:O.asPaymentMethod.value,useConsentCopy:ee,isCaliforniaBillingOrShippingAddress:D.value,hasSubscription:Z.value,transition:X,isABTestActive:u.hasFlagEnabled(mn)}),ne=void 0!==X&&!Q&&te&&ec({applePaySubscriptionsDecelerationActive:y,applePayThreePageVaultedReviewEnabled:f,isOnePageCheckout:g}),re=a.wallets.hasActiveApplePaySubscriptionReview.value&&te&&!D.value&&void 0===X;i(()=>{te||(a.wallets.setHasActiveApplePaySubscriptionReview(!1),void 0!==X&&(O.subscriptionReviewTransition.value=void 0,Q||a.wallets.setIsDecelerating(!1)))},[X,a.wallets,O.subscriptionReviewTransition,Q,te]),i(()=>{"storefront_redirect"===X&&ne&&!g&&v({wallet:"APPLE_PAY",reason:"subscriptions",asPaymentMethod:!0})},[X,v,g,ne]);const ie=u.hasFlagEnabled(Ln)&&!g&&h.searchParams.has(Ma);i(()=>{ie&&(a.unstable_forceCheckoutLayoutToOnePage(),Mv(o,{wallet:"GOOG
2LE_PAY",reason:"subscriptions",asPaymentMethod:!0,result:"success"}),Zu({content:c.translate("wallets.errors.subscription_review_required"),role:"status"}))},[a,c,o,ie]);const oe=n(()=>{_.value=!1,O.subscriptionReviewTransition.value=void 0},[_,O.subscriptionReviewTransition]);!function(e){const{observability:t,router:n}=ae(),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:O.buttonStatus},{walletName:"amazonpay",signal:B.buttonStatus},{walletName:"buy_with_prime",signal:B.buyWithPrimeButtonStatus},{walletName:"googlepay",signal:A.buttonStatus},{walletName:"paypal",signals:[L.acceleratedCheckoutButtonStatus,L.payWithPayPalButtonStatus]}]),k(()=>{const e=b.value,t=a.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:Cn(e?.postalCode,e?.countryCode),asPaymentMethod:t.asPaymentMethod})});const se=r(()=>({availableWallets:$,walletUsedForSubmissionSignal:I,persistedPayPalSignal:S,inMemoryPayPalParts:L,inMemoryVenmoParts:N,persistedGooglePaySignal:w,inMemoryGooglePayParts:A,inMemoryApplePayParts:O,applePaySessionHandler:z,persistedApplePaySignal:E,persistedAmazonSignal:C,inMemoryAmazonPayParts:B,inMemoryShopPayParts:R,did
2IncrementUnusablePartialAddressMetric:V,acceleratedWalletPaymentMethods:W,isInPayPalContextSignal:x,buttonCount:K,receiptErrorSignal:F}),[$,S,w,E,C,W,K,N,I,A,L,O,z,B,R,F,x,V]);return d(Da.Provider,{value:se,children:[ne&&d(MS,{onTransitionComplete:oe,useConsentCopy:ee}),d("span",{role:"status","aria-live":"polite","aria-atomic":"true",className:we({screenReaders:"only"}),children:re?c.translate("wallets.errors.subscription_review_required"):""}),e]})}const aw=E(function({children:e,AlternativeProposal:t}){const{embed:r}=ae(),a=n(e=>r?.client?.showToast(e)??!1,[r]);return d($k,{children:d(Uk,{children:d(iw,{AlternativeProposal:t,children:[d(bh,{handleToast:a,children:e}),d(cu,{})]})})})});function iw({children:e,AlternativeProposal:t}){const{shop:n,checkout:a}=ae(),i=a.unstable_graphqlDataRequestInfo?.httpRequestInfo,o=r(()=>{const{country:e,zone:t,coordinates:r}=i?.geolocation??{};return i?{geolocation:{default:e??void 0,country:e??n.country,zone:t??void 0,coordinates:r?{longitude:r.longitude,latitude:r.latitude}:void 0},shop:{}}:void 0},[i,n]),s="undefined"==typeof window?null:d(y,{children:[d(Ak,{}),d(_v,{}),d(ik,{}),d(Rk,{}),d(Bk,{})]}),l=t??S_;return d(by.Provider,{value:o,children:d(R_,{children:d(fS,{children:d(z_,{children:d(Oa,{children:d(l,{children:d(yk,{children:d(rw,{children:d(ak,{children:d(CS,{children:d(Nf,{children:d(J_,{children:d(og,{children:d(A_,{children:d(jg,{children:d(Ik,{children:d(__,{children:d(q_,{children:d(P_,{children:d(iS,{children:[d(gy,{}),d(ow,{}),d(_k,{}),d(xS,{}),e,s]})})})})})})})})})})})})})})})})})})})})}function ow(){const e=a(!1),t=ae(),{embed:n,webMcp:r}=t,i=re(dc),o=he(),{resetAddressErrors:s}=Ay(o.context.deliveryMethodsAddressErrors),l=a({journeyProgression:i,negotiator:o,clearShippingAddressErrors:s});if(l.current={journeyProgression:i,negotiator:o,clearShippingAddressErrors:s},!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:()=>bl(),negotiationContext:o.context}),r?.unstable_providePreactContext({loadPickupLocalityServices:()=>C(()=>fl(()=>import("./865e4eaf.DBasL1xH.js"),__vite__mapDeps([69,2,1,3,4,5,70,9,8,71,12,72,73,51,74,61,67,75,76,77,46,47,7,10,11]))).then(({createPickupLocalityServices:e})=>e(t)),journey:a,clearShippingAddressErrors:()=>l.current.clearShippingAddressErrors(),get negotiator(){return l.current.negotiator},waitForPendingNegotiations:i})}return null}const sw=w({displayName:"DevTools",load:()=>fl(()=>import("./bad03769.CJ3kHUtl.js"),__vite__mapDeps([78,1,2,3,4,5,12,7,8,9,10,11,79])),suspense:!0}),lw=w({displayName:"EditorBridge",suspense:!1,load:()=>fl(()=>import("./abd080c1.Bld-jP37.js"),__vite__mapDeps([80,2,1,3,4,5,7,8,9,10,11,12]))}),cw=w({id:()=>"PrivacyPreferences",displayName:"PrivacyPreferences",suspense:!1,useError:function(e){const{observability:t}=ae();i(()=>{e&&function(e,t){e.error(t,{metadata:{privacyPreferences:{component:"PrivacyPreferences",failure:"lazy_load"}}})}(t,e)},[e,t])},load:()=>C(()=>fl(async()=>{const{deferredPrivacyComponents:e}=await(import("./2acfb1ce.Ijr4U99n.js"));return{deferredPrivacyComponents:e}},__vite__mapDeps([81,1,2,3,4,5,39,40,7,8,9,10,11,12])).then(({deferredPrivacyComponents:e})=>e.PrivacyPreferences))}),uw=w({id:()=>"PrivacySheet",displayName:"PrivacySheet",suspense:!1,useError:function(e){const{observability:t}=ae();i(()=>{e&&function(e,t){e.error(t,{metadata:{privacySheet:{component:"PrivacySheet",failure:"lazy_load"}}})}(t,e)},[e,t])},load:()=>C(()=>fl(async()=>{const{deferredPrivacyComponents:e}=await(import("./2acfb1ce.Ijr4U99n.js"));return{deferredPrivacyComponents:e}},__vite__mapDeps([81,1,2,3,4,5,39,40,7,8,9,10,11,12])).then(({deferredPrivacyComponents:e})=>e.PrivacySheet))});function dw({children:e}){return d(y,{children:e})}function pw({children:e}){const t=r(()=>new URL(window.location.href),[]),{client:n,source:a}=ae(),o=n.unstable_getSerialization("shopPayConfig");return i(()=>{o&&async function(e,t,n){const{universal_redirect_enabled:r,universal_redirect_indicator:a}=n,i={},o=za(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,a,{universal_redirect_enabled:o.universal_redirect_enabled,universal_redirect_indicator:o.universal_redirect_indicator})},[t,a,o]),d(y,{children:e})}function mw({children:e}){const t="undefined"==typeof window;return d(t?dw:pw,{children:e})}function hw({children:e,context:t,...n}){const r="undefined"==typeof window,a=Rt();return d(Va.Provider,{value:t,children:d(wf,{target:"cart",children:d(mw,{children:d(U,{router:t.router,children:d(aw,{...n,children:d(Ba,{
2children:[d(Pf,{children:e}),d(xf,{}),!r&&d(kf,{}),d(x,{when:a,children:[d(uw,{}),d(cw,{})]}),d(gw,{}),Bt()&&d(lw,{})]})})})})})})}function gw(){const e=Rt();return Cf(),d(x,{when:()=>e.value&&!1,children:d(sw,{})})}function fw(e){return[e].flat(99).filter(Boolean).length>0}var yw={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 vw({id:e,borderStyle:t="base",borderWidth:n="base",direction:r="inline",accessibilityRole:a="separator",alignment:i="center",children:o}){const s=fw(o);return d("div",{role:s?void 0:a,className:v(yw.Divider,yw.directionVariant[r],s&&yw.alignmentVariant[i],yw.borderWidthVariant[n],yw.styleVariant[t]),id:e,children:s&&d("div",{className:v(yw.contentAlignmentVariant[i]),children:[o,"separator"===a&&d("span",{role:"separator"})]})})}function _w({children:e,condition:t}){return d(t?"picture":y,{children:e})}const bw=new Map(Ua({addMaxWidth:!1}).map(({breakpoint:e,query:t})=>[e,t]));function Pw(e,t){var n;if(!e&&t&&Fa(t))return Object.entries((n=t,Fa(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=te[e],r=te[t];return null!=n&&null!=r?r-n:0}).map(([e,t])=>{const n=bw.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 q("source",{key:n,media:n,srcSet:e})}}).filter(Boolean)}function kw(e){if(e)return Fa(e)?"string"==typeof e.default?e.default:void 0:e}var Sw={"large-200":{boxSize:100},large:{boxSize:86},base:{boxSize:64},small:{boxSize:40},"small-200":{boxSize:32}},ww={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 Cw({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}={}}={}}=th(),y=Ew(n),_=f&&"base"!==f?"accent":"auto",b=Pw(i,function(e){return Aw(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)??xw(y),{className:S}=Qm({boxShadow:P}),{className:w}=Qm({objectFit:p,borderWidth:k});
2return d("div",{className:v(ww.ProductThumbnail,ww.thumbnailBackgroundVariant[c],ww.productThumbnailSizeVariant[y],S,"none"!==P&&ww.boxShadowMargin,null!=t&&ww.depthVariant[t],ww.borderRadiusVariant[y.startsWith("small")?"small":"base"]),children:[i||Aw(a)?d(_w,{condition:Boolean(b),children:[b,d("img",{src:i??kw(a),srcSet:o,sizes:r,alt:e,loading:"eager",className:v(ww.ProductThumbnailImage,ww.borderVariant[u],ww.borderColorVariant[h],w)})]}):d("div",{className:v(ww.Placeholder,ww.borderVariant[u],ww.borderColorVariant[h],w),children:d(mh,{type:"image",size:Iw(y)})}),void 0!==l&&d("div",{className:v(ww.Overlay,ww.borderVariant[u],ww.borderColorVariant[h]),children:d("strong",{children:l})}),void 0===s?null:d(Lw,{size:y,tone:_,children:s})]})}function Ew(e){if("string"!=typeof e)return"base";const t=e.replace("-100","");return t in Sw?t:"base"}function xw(e){return e.startsWith("small")?"base":"large"}function Iw(e){return e.startsWith("small")?"small":e.startsWith("large")?"large":"base"}function Aw(e){return"string"==typeof e||Fa(e)}function Tw(e){const{boxSize:t}=Sw[Ew(e)];return{blockSize:t,inlineSize:t}}function Lw({children:e,size:t,tone:n}){const r=id(),a="accent"===n?n:"auto",{className:i}=Qm({borderWidth:xw(t)});return d("div",{className:ww.BadgeWrapper,children:d("div",{className:v(ww.Badge,ww.badgeSizeVariant[t.startsWith("small")?"small":"base"],ww.badgeToneVariant[a],i),children:[d("span",{className:ww.visuallyHidden,children:r("productThumbnailQuantityLabel")}),e]})})}const Nw=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=a(),[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]);i(()=>{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 i(()=>(o.add(d),()=>{o.delete(d),p.current&&clearTimeout(p.current)}),[]),{animationEnabled:u,delay:l,onAnimationStart:v,onAnimationIteration:_}}}(4e3);var Rw="var(--_1sg44lm0)",Mw="var(--_1sg44lm1)",Dw="var(--_1sg44lm2)";function Ow({contentDisplay:e="inline",aspectRatio:t,inlineSize:n,blockSize:r,children:a,id:o,delay:l=!0}){const c="inline"===e?"span":"div",{className:u,style:p}=Qm({blockSize:r,inlineSize:n},{transforms:{inlineSize:e=>_d(e,{fitContent:!0,auto:!0})}}),[m,h]=s(l);i(()=>{const e=setTimeout(()=>h(!1),100);return()=>{clearTimeout(e)}},[]);const{animationEnabled:g,delay:f,onAnimationStart:y,onAnimationIteration:_}=Nw();return d(c,{className:v("_1sg44lm4 _1sg44lm3 _1fragemvo _1fragem12k _1fragem12f _1fragem12r","inline"===e&&"_1sg44lm7",m&&"_1sg44lm8",g&&"_1sg44lm6",u),style:{...b({[Dw]:t?.toString()??"",[Rw]:`${f}ms`,[Mw]:"4000ms"}),...p},"aria-hidden":"true",onAnimationStart:y,onAnimationIteration:_,id:o,children:d(c,{className:v("_1sg44lma _1sg44lm9 _1fragemvo",u),style:p,children:a})})}const zw=new Map([["small","10ch"],["base","20ch"],["large","30ch"]]);function Bw({children:e,delay:t,inlineSize:n,id:r,...a}){return d(Jf,{...a,children:d(Ow,{delay:t,inlineSize:zw.get(n??"small"),id:r,children:e})})}function Vw({width:e}){const{header:{logo:t}}=Lv(),{shop:n}=ae(),{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 Fw=f(void 0);function Uw({children:e,style:t,insetsRows:n}){const{rendered:a,rowsInset:i}=h(Fw)??{},o=r(()=>({pending:t,pendingInsetsRows:n,rendered:a,rowsInset:i}),[t,n,a,i]);return d(Fw.Provider,{value:o,children:e})}function qw({children:e,rowsInset:t}){const{pending:n}=h(Fw)??{},a=r(()=>({pending:void 0,rendered:n,rowsInset:t}),[n,t]);return d(Fw.Provider,{value:a,children:e})}function jw(){return h(Fw)??{}}function Hw(){return h(h_)}function $w({currentDetour:e}){return"thankYou"===e?.type?"ORDER_STATUS1":"INFORMATION1"}function Yw(e,t,n,r,a){return null==e?()=>!1:Ya($l(e.features,t),n,r,a)}const Ww=f([]),Gw=f({deactivatedExtensionIds:new Set,addDeactivatedExtension:()=>{}}),Jw=f(null);function Kw(e,t,...[n]){const{checkout:{extensibility:a}}=ae(),i=function(){const{deactivatedExtensionIds:e}=eC(),{currentPage:t,currentDetour:n}=pc().value,{source:r}=ae(),a=Hw();return function({page:e,negotiatedState:t,deactivatedExtensionIds:n,detour:r,placementReferences:a,sourceType:i}){const o=e&&Kl(e,t),s=e&&new Set([...Vn,...zn]),l=r&&Ql(r),c=r&&function(e){const t=y_.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(!ja(t,{sourceType:i,isThankYou:u}))return!1;const c=Ha(s.target);if(null==c)return!1;
2if((e||r)&&!d.has(c))return!1;if($a(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:he().current.peek(),deactivatedExtensionIds:e,detour:n,placementReferences:a,sourceType:r.type})}(),o=h(Jw),s=Hw();return r(()=>{const r=$a(t)&&n?{target:t,placements:s,placementReference:n}:{target:t};return e.filter(e=>null===o||o.has(lt(e.extensionPoint.target))).filter(e=>a.ui.unstable_isTargetMatch(e,r)).filter(i)},[i,o,e,t,n,s,a])}function Qw(e,...[t]){const{checkout:{extensibility:n},shop:i}=ae(),o=i.hasFlagEnabled(Wa),s=Hw(),l=a([]),c=h(Ww),u=Kw([...n.ui.search().value,...c],e,t),d=r(()=>{if(o)return n.customFields.search($a(e)&&t?{target:e,placements:s,placementReference:t}:{target:e})},[n,o,e,t,s]),p=d?.value,m=r(()=>(p??[]).map(e=>Ga("customField",e)),[p]),g=r(()=>Ja([...u.map(e=>Ga("uiExtension",e)),...m]),[u,m]);return n.ui.enabled.value?g.length>0?g:l.current:m.length>0?m:l.current}function Xw(e,t){const r=nC();return n(n=>{if(!e.length)return Promise.resolve(void 0);const a=r.get(e[0],t);return Promise.resolve(a.run(n))},[r,e,t])}function Zw(e,t){const{checkout:{extensibility:n}}=ae(),i=a([]),o=Kw([...t,...h(Ww)],e),s=r(()=>o.map(e=>Ga("uiExtension",e)),[o]);return n.ui.required.value&&!n.ui.enabled.value?i.current:s}function eC(){return h(Gw)}const tC=f({get:()=>{},findAll:()=>[],blockingExtensions:P(()=>[])});function nC(){return h(tC)}function rC({visibleTargets:e,children:t}){const n=r(()=>new Set(e),[e]);return d(Jw.Provider,{value:n,children:t})}function aC(e){return Array.from(e.labels||[]).map(e=>e.textContent).join("")}function iC(e){return e instanceof HTMLInputElement&&("checkbox"===e.type||"radio"===e.type)?e.checked.toString():e.value}function oC(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 sC={screenX:0,screenY:0,pageX:0,pageY:0,offsetX:0,offsetY:0,movementX:0,movementY:0,clientX:0,clientY:0},lC=Object.keys(sC),cC=f(null);function uC(){const e=h(cC);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 dC({section:e,children:t}){if("undefined"==typeof window)return d("div",{children:t});const n=Yg(),i=a(null),o=r(()=>new WeakMap,[]),s=a(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}=pC(r,e,o);i&&n("dom_input_focused",{element:a,timestamp:new Date})}return Gg(i,e=>l({target:e})),d(cC.Provider,{value:o,children:d("div",{ref:i,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}=pC(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}=pC(s??r,e,o);c&&n("dom_clicked",{element:l,...sC,...ut(t.nativeEvent,lC),timestamp:new Date})},onChangeCapture:function(t){const r=t.target?.closest("a, button, input, select");if(!r)return;const{element:a,shouldCaptureEvent:i}=pC(r,e,o);i&&n("dom_input_changed",{element:a,timestamp:new Date})},children:t})})}function pC(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.split("-").slice(-1)[0].toLowerCase();else if(e instanceof HTMLInputElement||e instanceof HTMLSelectElement)i+=e.name.replace(/[A-Z]/g,(e,t)=>`${0===t?"":"_"}${e.toLowerCase()}`),o=iC(e);
2else{const t=mC(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 mC(e,t){if(null!==e&&null!==t)return t.has(e)?t.get(e):mC(e.parentElement,t)}function hC({section:e,children:t}){if("undefined"==typeof window)return d("div",{children:t});const{checkout:{identity:n},router:r,shopPay:i}=ae(),o=r.currentUrl.value,{currentFocus:s}=pc().value,l=Yg(),c=uf(),u=Jg(),p=a(null),m=a(new WeakMap),h=st(o,{isShopPayActive:"shopPay"===n.current.value,shopPay:i});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,iC(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 Gg(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=iC(t.target);m.current.delete(t.target),u(h),n!==r&&function(t){const{name:n,tagName:r,type:a}=t,i=aC(t);l("change",{element:{...i&&{label:i},...n&&{name:n},tagName:r,type:a,value:iC(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=aC(t.target);0===o.length&&(o=n);const s=oC(t);s&&l("autofill",{source:s,element:{...o&&{label:o},...r&&{name:r},tagName:a,type:i,value:iC(t.target)},timestamp:new Date,section:e})}},children:t})}function gC(e,t){const n=ae().checkout.configuration.layout.isOnePage.value,r=Qw("Checkout::Dynamic::Render","ORDER_SUMMARY1"),a=Qw("Checkout::Dynamic::Render","ORDER_SUMMARY2"),i=Qw("Checkout::Dynamic::Render","ORDER_SUMMARY3"),o=Qw("Checkout::Dynamic::Render","ORDER_SUMMARY4"),s=Qw("Checkout::CartLines::RenderAfter"),l=Qw("Checkout::CartLineDetails::RenderAfter"),c=Qw("Checkout::Reductions::RenderBefore"),u=Qw("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 fC="checkout-main",yC="checkout-main-header",vC="checkout-pay-button",_C="checkout-review-heading",bC=ne("OrderSummaryContext");function PC(){return re(bC)}const kC=({children:e})=>{const t=m(!1),a=n(e=>{t.value=e},[t]),i=r(()=>({open:t,setOpen:a}),[t,a]);return d(bC.Provider,{value:i,children:e})};function SC(){const{checkout:e,router:n}=ae();return t(()=>e.thankYouEntrance.isRevealing.value&&n.currentUrlMatches("/thank-you"))}const wC={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"},CC="announcement_box",EC="announcement_content";function xC({children:e,onClose:t,onAfterCollapse:r,onAfterExpand:o,onExpand:l,onCollapse:c,open:u=!1,expanded:p=!1}){const{i18n:m}=ae(),[h,g]=s(!1),f=a(null),y=a(null),_=Od(p,"base"),b=Od(u,"base");i(()=>{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=Qa(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]);i(()=>{"entered"===_?o?.():"exited"===_&&r?.()},[o,r,_]);const k=AC(),{environment:{isCheckoutEditor:S},announcement:{colorScheme:w}}=Lv(),C=k[0],E=S?C?.publicIdentifier:void 0,x=S&&k.length>0;return fw(e)?d("section",{id:CC,className:v(wC.Announcement,u&&wC["Announcement-opened"],h&&wC["Announcement-hasOverflow"],p&&wC["Announcement-expanded"],wC[j("Announcement-expandedTransition",_)],wC[j("Announcement-openTransition",b)],x&&wC["Announcement-hasActiveInspector"]),ref:f,children:d("div",{className:v(wC.AnnouncementContainer,we({colorLayer:"base",colorScheme:w,backgroundColor:"baseSpecified"})),"data-inspector-id":E,"data-inspector-box":E?"content":void 0,children:[!p&&d("button",{className:wC.AnnouncementOverlay,onClick:e=>{e.preventDefault(),e.stopPropagation(),l?.()},"aria-label":m.translate("thank_you.announcement.expand"),"aria-expanded":!1,"aria-controls":EC,type:"button"}),d("div",{className:wC.AnnouncementActionButtons,children:[d("button",{id:"announcement_action_expand_collapse_buttons",className:wC.AnnouncementExpandCollapseButton,onClick:P,"aria-label":p?m.translate("thank_you.announcement.collapse"):m.translate("thank_you.announcement.expand"),"aria-expanded":p,"aria-controls":EC,type:"button",children:d(mh,{type:p?"chevron-up":"chevron-down",size:"base"})}),d("button",{className:wC.AnnouncementCloseButton,onClick:()=>t?.({source:"host"}),"aria-controls":CC,"aria-expanded":u,"aria-label":m.translate("thank_you.announcement.close"),type:"button",children:d(mh,{type:"x",size:"base"})})]}),d("div",{id:EC,className:wC.AnnouncementContent,ref:y,"aria-live":"polite","aria-atomic":"true",children:e})]})}):null}function IC(){}function AC(){const{environment:{hasTYPAnnouncementExtensions:e}}=Lv(),t=function(e){return void 0!==e?()=>[]:()=>{const e=Qw("purchase.thank-you.announcement.render");return Xa(e,"uiExtension").map(Za)}}(e);return t()}const TC={ThankYouInterstitialShell:"szW4X",ThankYouInterstitialOverlay:"sMSRq",ThankYouInterstitialHeader:"_3Ebqn",ThankYouEntranceDisclosure:"F6Nrx",ThankYouEntranceOrderSummary:"j1xD4",ThankYouEntranceFooter:"RDtb7",ThankYouEntrance:"ZXaI9",ThankYouEntranceStatus:"sEWAT",ThankYouEntranceHeading:"DTABr",ThankYouEntranceCards:"kBVzA",ThankYouEntranceActions:"qgQOk",ThankYouEntranceBeat:"SBffw"},LC={none:"0",...ve.spacing},NC={base:"solid",dashed:"dashed",dotted:"dotted"},RC="disclosure_details";function MC({banner:e,announcement:t,header:r,buyerJourney:a,disclosure:o,disclosureOrderSummary:l,footer:c,main:u,orderSummary:p,blockSize:m,minMobileViewportSize:h=!1,disclosureId:g=RC,isDisclosureInteractive:f=!0,mainContentId:y=fC}){const _=Lv(),{checkout:{configuration:b,checkoutExit:P},embed:k,router:S}=ae(),w=b.visibility.showAside,C=Boolean(k?.isFlagshipPartner),E=_r(k?.embedder),x=E&&b.isUniversalCheckoutFinalizer&&"/thank-you"===S.currentUrl.value.normalizedPath,I=Qw("Checkout::Dynamic::Render","ORDER_SUMMARY4").length>0,A=E&&I,T=C&&!1===_.header.divided,L=_.header.position??"inline",N=e
2E(),R=SC(),{open:M,expanded:D,onAfterCollapse:O,onAfterExpand:z,onClose:B,onExpand:V,onCollapse:F}=function(){const e=Lv(),t=Tv(),r=M_(),a=function(){const{environment:{hasTYPAnnouncementExtensions:e}}=Lv();return function(e){return void 0!==e?()=>IC:()=>{const e=AC(),t=Yg();if(0===e.length)return IC;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;"dismissed"!==n.visibility&&"hidden"!==n.visibility&&(a("host"===e?"announcementDismissedFromHost":"announcementDismissedFromExtension"),r.emit("announcementClosed"),t.set("announcement",{...t.configuration.announcement,visibility:"dismissed"}))},[t,r,a]),p=n(()=>{r.emit("announcementAfterCollapsed")},[r]),m=n(()=>{r.emit("announcementAfterExpanded")},[r]),h=n(()=>{l(!0),a("announcementExpanded"),r.emit("announcementExpanded")},[a,r]),g=n(()=>{l(!1),a("announcementCollapsed"),r.emit("announcementCollapsed")},[a,r]);return i(()=>(r.on("closeAnnouncement",d),()=>{r.off("closeAnnouncement",d)}),[d,r]),i(()=>{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(Uw,{style:_.orderSummary.section,children:l}):void 0;return d("div",{className:v(wC.Shell,TC.ThankYouInterstitialShell,P.isExiting.value&&wC["Shell-exiting"],w&&wC["Shell-layoutAside"],"fill"===_.main.inlineSize&&wC["Config-Main-inlineSizeFill"],"fill"===_.orderSummary.inlineSize&&wC["Config-OrderSummary-inlineSizeFill"],wC[j("Config-Header-position",L)],_.footer.position&&wC[j("Config-Footer-position",_.footer.position)],_.environment.isOnePageCheckout&&wC["Shell-variantOnePageCheckout"],E&&wC["Shell-embeddedUc"],x&&wC["Shell-embeddedUcMainPadding"],A&&wC["Shell-embeddedUcHasOrderSummary4Extensions"],m&&wC[j("Shell-blockSize",m)],h&&wC["Shell-minMobileViewportSize"],fw(t)&&wC["Shell-hasAnnouncement"],M&&wC["Shell-announcementOpen"]),style:{...$C("content",_.content),...WC("content",_.content),...GC("main",_.main),...JC("main",_.main),...GC("order-summary",_.orderSummary),...JC("order-summary",_.orderSummary),...KC("order-summary",_.orderSummary),...GC("header",_.header),...KC("header",{backgroundImage:_.header.banner?.image}),...JC("header",_.header),...T?tE:{},...GC("footer",_.footer),...JC("footer",_.footer),...QC("footer",_.footer),...GC("buyer-journey",_.buyerJourney),...JC("buyer-journey",_.buyerJourney),...GC("announcement",_.announcement)},children:[d(DC,{}),e?d("div",{className:wC.Banner,children:e}):null,t?d(xC,{open:M,expanded:D,onAfterExpand:z,onAfterCollapse:O,onClose:B,onExpand:V,onCollapse:F,children:t}):null,d(OC,{position:"start",children:[r,"header"===_.buyerJourney.position&&d(zC,{children:a})]}),d(BC,{id:g,isInteractive:f,details:U,children:o}),d(VC,{children:[d(UC,{children:[d(OC,{position:"inline",children:[r,"header"===_.buyerJourney.position&&d(zC,{children:a})]}),d(FC,{children:["inline"===_.buyerJourney.position&&d(zC,{children:a}),d(Uw,{style:_.main.section,children:d("main",{className:v(wC.MainContentPrimary,N&&"F3Ebx"),id:y,children:u})}),"inline"===_.footer.position&&d(jC,{children:c})]})]}),d(qC,{children:[d(OC,{position:"inlineSecondary",children:[r,"header"===_.buyerJourney.position&&d(zC,{children:a})]}),d(FC,{children:d(Uw,{style:_.orderSummary.section,children:d("aside",{className:v(wC.OrderSummaryContentPrimary,N&&"OcTba",R.value&&TC.ThankYouEntranceOrderSummary),children:d(hC,{section:"summary",children:d(dC,{section:"summary",children:p})})})})})]})]}),"end"===_.footer.position&&d(jC,{children:c})]})}function DC(){const{checkout:e}=ae(),{main:{colorScheme:t="scheme1",background:n}={}}=Lv();return e.checkoutExit.isExiting.value?d("div",{className:v("Vytfl",we({colorLayer:"base",colorScheme:t,backgroundColor:"subdued"===n?"subdued":"baseSpecified"})),"aria-hidden":"true"}):null}function OC({children:e,position:n}){const{header:{position:r="inline",container:a="fill",colorScheme:i,banner:o,background:s,divided:l}={}}=Lv(),c=n??r,u=function(){const{checkout:e,client:n,router:r}=ae(),a=tg(),i=Cf(),o=Jl(n.initialRequest.url.pathname).endsWith("/thank-you"),s=a&&!i&&!o;return t(()=>s&&"settled"!==e.thankYouEntrance.phase.value&&r.currentUrlMatches("/thank-you"))}(),p=eE();if(!fw(e))return null;const m=l??"start"===c;return d("header",{className:v(wC.Header,TC.ThankYouInterstitialHeader,wC[j("Header-position",c)],wC[j("Header-container",a)],m&&wC["Header-divided"],o?.image&&wC["Header-hasBackgroun
2dImage"],u.value&&wC["Header-thankYouCovered"],p&&"inlineSecondary"===c&&"LRXpG","start"===c&&we({backgroundColor:"subdued"===s?"subdued":"baseSpecified",colorLayer:"base",colorScheme:i})),"data-inspector-id":"header",children:d("div",{className:wC.HeaderContent,children:d(xu,{children:d(hC,{section:"header",children:d(dC,{section:"header",children:e})})})})})}function zC({children:e}){const{buyerJourney:{position:t="inline",container:n="fill",visibility:r}={}}=Lv();return fw(e)&&"hidden"!==r?d("div",{className:v(wC.BuyerJourney,wC[j("BuyerJourney-position",t)],wC[j("BuyerJourney-container",n)]),children:d("div",{className:wC.BuyerJourneyContent,children:e})}):null}function BC({children:e,details:n,id:r=RC,isInteractive:o}){const{header:{divided:l},orderSummary:{background:c,backgroundImage:u,colorScheme:p}={},main:{colorScheme:m="scheme1"},environment:{isCheckoutEditor:h},disclosure:{visibility:g}}=Lv(),f=Rt(),y=SC(),{checkout:_}=ae(),b=l??!0,P=function(){const{environment:{hasOrderSummaryExtensions:e}}=Lv(),t=function(e){return void 0!==e?()=>e:()=>gC("top").length>0}(e);return t()}(),{expanded:k,narrowedToInformationStep:S}=function(){const{environment:{shouldExpandOrderSummary:e}}=Lv(),n=function(e,n){return void 0!==n?()=>({expanded:n,narrowedToInformationStep:!1}):()=>{const n=function(){const e=T(gC("top"));return t(()=>e.value.some(e=>{if("customField"===e.kind)return Za(e).required.value;const t=Za(e),n=t.behaviors.value;return n.blockProgress&&t.capabilities.blockProgress||n.alwaysReveal}))}(),r=function(){const{orderSummary:{defaultState:e}={}}=Lv(),{checkout:{configuration:{layout:{isOnePage:t}}}}=ae();return!t.value&&"EXPANDED"===e}(),a=function(){const e=pc();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}=ae(),t=e.unstable_getSerialization("experiments"),n=t?.find(e=>e.clientHandle===Pl)?.variant;return Object.values(Ka).find(e=>e===n)}()===Ka.Treatment,e);return n()}(),{open:w,setOpen:C}=PC(),E=w.value||P&&h,[x,I]=s(),A=a(!1);i(()=>{I(A.current&&!k?"none":void 0),C(k)},[k,C]),i(()=>{A.current=S}),i(()=>{E&&C(!0)},[E,P,C]);const L=ZC();if(!fw(e)||_.checkoutExit.isExiting.value||"hidden"===g||"hidden-only-checkout"===g&&!L)return null;const N=u?{backgroundImage:`url(${JSON.stringify(u)})`}:void 0,R=!o||w.value,M=Boolean(n)&&(f.value||R);return d("aside",{className:v(wC.Disclosure,b&&wC["Disclosure-divided"],we({colorLayer:"base",colorScheme:m,backgroundColor:"baseSpecified"})),"data-inspector-id":"orderSummary",children:d(hC,{section:"top_summary",children:d(dC,{section:"top_summary",children:[o?d(rh,{className:v(wC.DisclosureButton,y.value&&TC.ThankYouEntranceDisclosure),background:"transparent",onClick:()=>{I(void 0),C(!w.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(wC.DisclosureButton,y.value&&TC.ThankYouEntranceDisclosure),children:e}),M&&d(Bd,{open:R,id:r,duration:x,children:d("div",{className:v(wC.DisclosureDetails,y.value&&TC.ThankYouEntranceDisclosure,we({colorLayer:"base",colorScheme:p,backgroundColor:"subdued"===c?"subdued":"baseSpecified"})),style:N,children:d("div",{className:wC.DisclosureDetailsContent,children:d(xu,{children:d(XC,{children:n})})})})})]})})})}function VC({children:e}){const{content:{container:t="fill"}={}}=Lv();return fw(e)?d("div",{className:v(wC.Content,wC[j("Content-container",t)]),children:e}):null}function FC({children:e}){const{checkout:t}=ae();return t.checkoutExit.isExiting.value?null:d(y,{children:e})}function UC({children:e}){const{main:{colorScheme:t="scheme1",inlineSize:n,background:a,backgroundImage:i}={},content:{divider:{visibility:o}={}}}=Lv(),{client:s}=ae(),l=s.unstable_getSerialization("shop").enabledFlags.includes(ei),c=r(()=>({current:t}),[t]);if(!fw(e))return null;const u=i?{backgroundImage:`url(${JSON.stringify(i)})`}:void 0;return d("div",{className:v(wC.Main,"fill"===n&&wC["Main-inlineSizeFill"],("visible"===o||
2!l&&void 0===o)&&wC["Main-divided"],we({colorLayer:"base",colorScheme:t,backgroundColor:"subdued"===a?"subdued":"baseSpecified"})),style:u,children:d("div",{className:wC.MainContent,children:d(tm.Provider,{value:c,children:d(xu,{children:e})})})})}function qC({children:e}){const{orderSummary:{colorScheme:t="scheme2",inlineSize:n,background:a,backgroundImage:i}={}}=Lv(),o=r(()=>({current:t}),[t]),s=eE();if(!fw(e))return null;const l=i?{backgroundImage:`url(${JSON.stringify(i)})`}:void 0;return d("div",{className:v(wC.OrderSummary,"fill"===n&&wC["OrderSummary-inlineSizeFill"],s&&"LCUka",we({colorLayer:"base",colorScheme:t,backgroundColor:"subdued"===a?"subdued":"baseSpecified"})),style:l,"data-inspector-id":"orderSummary",children:d("div",{className:wC.OrderSummaryContent,children:d(tm.Provider,{value:o,children:d(xu,{children:e})})})})}function jC({children:e}){const{footer:{position:t="inline",container:n="fill",colorScheme:r,background:a,divided:i}={}}=Lv(),{checkout:o}=ae(),s=eE(),l=SC();if(o.checkoutExit.isExiting.value||!fw(e))return null;const c=i??"end"===t;return d("footer",{className:v(wC.Footer,wC[j("Footer-position",t)],wC[j("Footer-container",n)],c&&wC["Footer-divided"],s&&"qdIKq","end"===t&&we({colorLayer:"base",colorScheme:r,backgroundColor:"subdued"===a?"subdued":"baseSpecified"})),"data-inspector-id":"footer",children:d("div",{className:v(wC.FooterContent,l.value&&TC.ThankYouEntranceFooter),children:d(xu,{children:d(dC,{section:"footer",children:e})})})})}function HC(e){return t=>t?e[t]:void 0}function $C(e,{divider:{borderStyle:t}={}}={}){return t&&{[`--config-${e}-divider-border-style`]:HC(NC)(t)}}const YC={none:"0px",...ve.borderWidth};function WC(e,{divider:{borderWidth:t}={}}={}){return t&&{[`--config-${e}-divider-border-width`]:HC(YC)(t)}}function GC(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`]:ke(Number(t))}}function JC(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`]:HC(LC)(n[0]),[`--config-${e}-padding-inline-end`]:HC(LC)(n[1]),[`--config-${e}-padding-block-end`]:HC(LC)(n[2]),[`--config-${e}-padding-inline-start`]:HC(LC)(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`]:HC(LC)(t),[`--config-${e}-padding-inline-end`]:HC(LC)(t),[`--config-${e}-padding-block-end`]:HC(LC)(t),[`--config-${e}-padding-inline-start`]:HC(LC)(t),[`--config-${e}-padding`]:HC(LC)(t)}}function KC(e,{backgroundImage:t}={}){return t&&{[`--config-${e}-background-image`]:`url(${JSON.stringify(t)})`}}function QC(e,{marginBlockStart:t}={}){return t&&{[`--config-${e}-margin-block-start`]:HC(LC)(t)}}function XC({children:e}){const{environment:{isOnePageCheckout:t}}=Lv(),n=ZC();return t&&!n?d(rC,{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 ZC(){const{environment:{hasDetour:e}}=Lv(),t=function(e){return void 0!==e?()=>e:()=>{const{currentDetour:e}=pc().value;return Boolean(e)}}(e);return t()}function eE(){const e=tg(),t=ZC();return e&&!t}const tE={"--x-shell-header-padding":`${HC(LC)("large100")} ${HC(LC)("large200")} ${HC(LC)("none")} ${HC(LC)("large200")}`,"--x-shell-main-padding":`var(--config-main-padding-block-start, ${HC(LC)("large100")}) var(--config-main-padding-inline-end, ${HC(LC)("large200")}) var(--config-main-padding-block-end, ${HC(LC)("large200")}) var(--config-main-padding-inline-start, ${HC(LC)("large200")})`},nE={small:"10ch",base:"20ch",large:"30ch",full:"100%"},rE=Zc("wallet-transition-disclosure-"),aE=Zc("wallet-transition-main-content-");function iE({layer:e="foreground"}={}){const{embed:t,i18n:n}=ae(),r=!t,a=eu(void 0,rE),i=eu(void 0,aE),o=d("div",{className:"A5qhV "+("background"===e?"_4KRKW":""),role:"status","aria-label":n.translate("general.loading"),style:b({[ve.global.borderRadius]:"12px"}),children:d(kC,{children:d(MC,{mainContentId:i,disclosureId:a,isDisclosureInteractive:!1,header:r?d(oE,{}):void 0,disclosure:d(dE,{}),main:d(uE,{}),orderSummary:d(pE,{})})})});return d(uu,{children:o})}function oE(){const{header:{alignment:e="start",logo:t}={}}=Lv(),{shop:n}
2=ae(),r=t?.image?d(Vw,{width:t.maxWidth}):d(LS,{level:1,accessibilityRole:"presentation",display:"inline",children:n.name});return d(sh,{gridTemplateColumns:"1fr",inlineSize:"100%",justifyItems:e,children:r})}function sE({inlineSize:e="base",size:t="small"}){return d(Bw,{size:t,inlineSize:e})}function lE(){return d(Jf,{type:"small",children:d(Ow,{inlineSize:nE.full})})}function cE(){return d(iy,{rowGap:"base",children:[d(sE,{size:"large",inlineSize:"small"}),d(iy,{rowGap:"small-300",children:[d(lE,{}),d(lE,{})]})]})}function uE(){return d(iy,{rowGap:"large-200",children:[d(cE,{}),d(vw,{}),d(cE,{}),d(vw,{}),d(cE,{})]})}function dE(){return d(iy,{direction:"inline",justifyContent:"space-between",alignItems:"center",padding:"large-100 base",minBlockSize:"63px",inlineSize:"100%",children:[d(sE,{inlineSize:"base"}),d(sE,{size:"large",inlineSize:"small"})]})}function pE(){const{i18n:e}=ae(),{merchandiseThumbnail:t,global:n}=th(),r=t.cornerRadius??n.cornerRadius??"base",a="fullyRounded"===r?"large":r,i=`${Tw("base").inlineSize}px`;return d(iy,{rowGap:"large-200",children:[d(Jf,{accessibilityVisibility:"exclusive",children:e.translate("order_summary.shopping_cart_label")}),d(sh,{gridTemplateColumns:"auto minmax(0, 1fr) auto",gap:"base",alignItems:"center",children:[d(qf,{borderRadius:a,overflow:"hidden",children:d(Ow,{contentDisplay:"block",inlineSize:i,aspectRatio:1})}),d(iy,{rowGap:"small-500",children:[d(sE,{inlineSize:"base"}),d(sE,{inlineSize:"small"})]}),d(sE,{inlineSize:"small"})]}),d(mE,{})]})}function mE(){return d(iy,{rowGap:"small-100",children:[[0,1,2].map(e=>d(iy,{direction:"inline",justifyContent:"space-between",children:[d(sE,{inlineSize:"small"}),d(sE,{inlineSize:"small"})]},e)),d(iy,{direction:"inline",justifyContent:"space-between",children:[d(sE,{size:"large",inlineSize:"small"}),d(sE,{size:"large",inlineSize:"small"})]})]})}function hE(){const{shop:e,checkout:n,observability:r}=ae(),o=function(){const{checkout:{wallets:e}}=ae(),n=function(){const{shop:e,checkout:n}=ae(),r=wv(),a=e.hasFlagEnabled(bn),{inMemoryApplePayParts:{subscriptionReviewTransition:i}}=_n();return t(()=>void 0!==i.value&&ec({applePaySubscriptionsDecelerationActive:r,applePayThreePageVaultedReviewEnabled:a,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,s=Boolean(n.wallets.isDeceleratingSignal?.value),l=n.isCheckoutLayoutForcedToOnePage.value,c=IS(),{payNowButtonElement:u,payNowButtonSectionMounted:p}=jk(),m=Boolean(u||c&&p),h=e.hasFlagEnabled(va),g=n.wallets.escalatedWallet.value,f=h?s&&m&&null!==g:s&&m;i(()=>{f&&n.wallets.setIsDecelerating(!1)},[f,n.wallets]);const y=a(!1);return i(()=>{if(!l)return void(y.current=!1);if(!m||y.current)return;y.current=!0;const e={wallet:g};r.counter({name:"wallet_3page_vaulted_review_landed",value:1,attributes:e}),r.log("wallet_3page_vaulted_review_landed","Buyer reached the forced one-page wallet vaulted review",e)},[g,l,m,r]),o||!s?null:d(iE,{})}const gE=w({suspenseName:"review-block",id:()=>"ReviewBlock",displayName:"ReviewBlock",load:()=>C(()=>fl(()=>import("./9d12dea3.CFb6oyR5.js"),__vite__mapDeps([82,1,2,3,4,5,83,24,25,84,85,86,9,46,47,45,48,49,28,29,44,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,31,32,102,7,8,10,11,12])))}),fE=w({suspenseName:"information",displayName:"Information",load:()=>C(()=>fl(()=>import("./17324a0b.530ZMA5x.js"),__vite__mapDeps([103,1,85,2,3,4,5,86,84,9,46,47,45,48,49,28,29,44,24,25,87,104,105,106,107,108,109,110,73,111,112,7,43,113,89,16,114,115,116,63,117,118,119,97,120,121,122,10,123,124,125,126,8,11,12])))}),yE=w({displayName:"NoAddressLocation",load:()=>C(()=>fl(async()=>{const{noAddressLocationPages:e}=await(import("./4421b714.BYrT6l1A.js"));return{noAddressLocationPages:e}},__vite__mapDeps([127,1,128,2,3,4,5,116,129,7,8,9,10,11,12,130])).then(({noAddressLocationPages:e})=>({default:e.NoAddressLocation})))}),vE=w({displayName:"NoAddressLocationFullDetour",load:()=>C(()=>fl(async()=>{const{noAddressLocationPages:e}=await(import("./4421b714.BYrT6l1A.js"));return{noAddressLocationPages:e}},__vite__mapDeps([127,1,128,2,3,4,5,116,129,7,8,9,10,11,12,130])).then(({noAddressLocationPages:e})=>({default:e.NoAddressLocationFullDetour})))}),_E=w({displayName:"NotFound",load:()=>fl(()=>Promise.resolve().then(()=>zV),void 0)}
2),bE=w({displayName:"OffsitePaymentFailed",load:()=>fl(()=>import("./611e718a.BXIcslXp.js").then(e=>e.O),__vite__mapDeps([128,1,2,3,4,5,116,129]))}),PE=w({suspenseName:"one-page",displayName:"OnePage",load:()=>fl(()=>import("./f8706cb6.DdvEXEb-.js").then(e=>e.o),__vite__mapDeps([131,3,1,4,2,5,109,85,86,110,73,44,111,112,7,43,113,84,9,46,47,45,48,49,28,29,24,25,87,89,16,114,115,116,63,117,118,119,97,120,121,122,10,123,124,132,35,36,74,68,8,133,134,31,32,101,102,135,11,76,77,136,75,72,137,138,139,98,99,12,106,107,140,141,142,143,88,90,91,92,93,94,144,145,146,147,148,149,150,151,152,100,153]))}),kE=w({suspenseName:"one-page-review",displayName:"OnePageReview",load:()=>C(()=>fl(()=>import("./9e3968a8.BkxhPgDc.js"),__vite__mapDeps([154,1,2,3,4,5,104,105,106,107,108,98,85,86,99,132,35,36,115,116,117,74,110,73,44,111,112,68,8,133,95,88,89,90,91,92,93,48,94,96,155,156,6,63,157,41,42,55,114,140,141,136,16,158,138,139,97,159,120,121,7,9,10,11,12,160,100,101,31,32,102])))});class SE extends Error{constructor(){super(...arguments),this.name="CardFieldsError"}}
2class wE extends Error{constructor(e,t){super(e,t),this.name="CardFieldsLoadError",this.diagnostics=t?.diagnostics}}class CE extends Error{constructor(){super(...arguments),this.name="CardFieldsSetupError"}}class EE extends Error{constructor(){super(...arguments),this.name="CardFieldsScriptTagOnErrorError"}}class xE extends Error{constructor(){super(...arguments),this.name="CardFieldsAppendChildError"}}class IE extends Error{constructor(){super(...arguments),this.name="CardFieldsExecutionError"}}class AE extends Error{constructor(){super(...arguments),this.name="IFrameNotFoundError"}}class TE 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 LE=class extends Error{constructor(){super(...arguments),this.name="CardFieldsOperationalError"}};LE.hostedFieldsName="CardFieldsError";let NE=LE;function RE({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 IE);n()},0)},t&&(a.integrity=t),a.crossOrigin="anonymous",a.onerror=t=>{let n;n=t instanceof Event?new EE(`Event type: ${t.type}. ${ME(e)}`):new EE("string"==typeof t?`String error: ${t}. ${ME(e)}`:`unknown error type. ${ME(e)}`),document.head.removeChild(a),r(n)};try{document.head.appendChild(a)}catch(i){r(new xE("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 wE(`Failed to load CardFields SDK. ${ME(e)}`,{cause:n,diagnostics:a})})}function ME(e){return`Script src: ${e} . Internet connection boolean: ${"undefined"==typeof navigator?"navigator not available":navigator.onLine}`}function DE(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var OE,zE;const BE=DE(zE?OE:(zE=1,OE={SDK_INTEGRITY:"sha256-fu1lH6QOfb8dybbxZiwh4q3DLqiMxbI+Knm2GsdIxqc=",SDK_URL:"https://checkout.pci.shopifyinc.com/build/09497de/card_fields.js"}));function VE(){const{environment:e}=ae(),t=e.services.hostedFields.url;return t===BE.SDK_URL?{source:t,integrity:BE.SDK_INTEGRITY}:{source:t}}const FE=w({suspenseName:"payment",displayName:"Payment",load:()=>C(()=>fl(()=>import("./74122478.DYo3h4hN.js"),__vite__mapDeps([161,1,134,3,4,2,5,47,31,32,101,102,118,24,25,85,86,119,135,11,76,77,136,75,72,137,162,6,113,84,9,46,45,48,49,28,29,44,87,163,138,139,16,140,141,74,164,125,126,143,165,98,99,12,107,166,167,168,116,83,104,105,106,108,117,156,115,63,157,7,169,170,171,8,10]))),usePrefetch(){const e=function(){const e=VE();return()=>{RE(e)}}();return n(()=>{e()},[e])}}),UE=w({displayName:"PostPurchase",load:()=>fl(()=>import("./896e8dde.CekI2eW1.js"),__vite__mapDeps([172,1,2,3,4,5,116,173,174,47,52,10,16,7,28,29,18,60,61,57,8,9,11,12,175]))}),qE=w({displayName:"Processing",load:()=>C(()=>fl(()=>import("./090b00f0.Bv4Scbrt.js"),__vite__mapDeps([176,1,2,3,4,5,7,116,6,8,9,10,11,12,177])))}),jE=w({suspenseName:"review",displayName:"Review",load:()=>C(()=>fl(()=>import("./b120ac11.BgvUa8ae.js"),__vite__mapDeps([178,1,2,3,4,5,104,105,106,107,108,117,156,115,116,6,63,157,97,7,8,9,10,11,12])))}),HE=w({suspenseName:"shipping",displayName:"Shipping",load:()=>C(()=>fl(()=>
2import("./289b89e4.DGXbMz6B.js"),__vite__mapDeps([179,1,120,121,144,24,3,4,2,5,25,118,85,86,119,123,145,11,146,90,91,92,147,48,45,46,47,49,148,149,150,151,7,116,8,9,10,12])))}),$E=w({displayName:"ShopPayLoginLoader",load:()=>fl(()=>import("./9011490c.DbWlkmGr.js"),__vite__mapDeps([180,1,2,3,4,5,181,100,75,138,139,6,111,91,159,120,121,41,42,7,8,9,10,11,12,160,116,182]))}),YE=w({displayName:"StockProblems",load:()=>C(()=>fl(()=>import("./0cd5b134.W7CkO7xe.js"),__vite__mapDeps([183,1,128,2,3,4,5,116,129,184,7,185,8,9,10,11,12])))}),WE=w({displayName:"StockProblemsModal",load:()=>C(()=>fl(()=>import("./a9ba8e86.DGdpkm6F.js"),__vite__mapDeps([186,1,2,3,4,5,185,184,7,116,152,8,9,10,11,12])))});function GE(e){return function(t){const{observability:n}=ae();i(()=>{t&&(kl(t)||Sl(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 JE=GE("ThankYou"),KE=w({suspenseName:"thank-you",displayName:"ThankYou",useError:function(e){const{client:t,observability:n,graphql:{coreGraphql:r}}=ae(),i=vc(),o=i?.id,s=i?.orderStatusPageUrl,c=t.unstable_getSerialization("sessionToken"),u=a(!1);JE(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 z(cr),i)return;let e;try{const{data:t}=await r.staticQuery(Hb,{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(()=>fl(()=>import("./909cc5d6.BWrUC81U.js"),__vite__mapDeps([187,1,2,3,4,5,167,38,97,7,116,93,90,91,92,146,31,32,22,23,44,45,46,47,48,49,110,73,111,112,188,6,53,101,102,189,12,190,191,128,129,28,29,16,192,193,194,195,145,11,10,120,121,8,9,196])),{maxAttempts:1})}),QE=w({displayName:"Throttle",load:()=>C(()=>fl(()=>import("./01f1d1bd.DypWlcT3.js"),__vite__mapDeps([197,1,97,2,3,4,5,9,116,67,7,8,10,11,12,198])))});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 _1tx8jg715 _1tx8jg716 _1fragemxt",success:"_1tx8jg71f _1tx8jg715 _1tx8jg717 _1fragemxu",warning:"_1tx8jg71g _1tx8jg715 _1tx8jg718 _1fragemxv",critical:"_1tx8jg71h _1tx8jg715 _1tx8jg719 _1fragemxr",custom:"_1tx8jg71i _1tx8jg715 _1tx8jg71a _1fragemxs",accent:"_1tx8jg71j _1tx8jg71b _1fragemxq"},typeVariant:{paragraph:"_1tx8jg71m",small:"_1tx8jg71n _1tx8jg7k _1tx8jg7d _1fragemyt"}};function ZE({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
2],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(Rd.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 ex({email:e,phone:t,emailInputError:n,phoneInputError:r,hasViolations:a}){const i=!e&&!t,o=Boolean(n)||Boolean(r);return i||o||a}function tx(e){const t=e?.filter(({quantity:e})=>e>0)??[];return t.length>0&&t.every(({requiresShipping:e})=>!e)}function nx({isFlagshipPartner:e,hasError:t,hasOnlyDigitalItems:n}){return e&&!t&&!n}const rx=ne("VaultedSectionsContext");function ax(){const e=h(rx);return t(()=>e?e.value:{contact:!1,delivery:!1,payment:!1,billing:!1})}function ix(){const e=ax();return t(()=>e.value.contact&&e.value.delivery&&e.value.payment)}function ox(){const e=ax(),{checkout:n,embed:r,shop:i,source:o}=ae(),{validation:{contactErrors:{emailInputError:s,phoneInputError:l}}}=n,{current:c}=n.identity,{hasViolations:u}=av(ni),d=Lv(),p=th(),m=T(d.main.section),h=T(p.vaulted),g=T(u),f=a(!1);return t(()=>{const t=ri(m.value),a=ri(h.value),{contact:u,delivery:d,payment:p}=e.value,y=ai({isContactVaulted:u,configuration:n.configuration,identity:n.identity,embed:r,shop:i}),v=(()=>{if("sdkCartHints"!==c.value)return f.current=!1,y;if(!y)return f.current=!1,!1;const e=n.proposal.negotiated.fields.merchandiseLines.value?.lines;return nx({isFlagshipPartner:r?.isFlagshipPartner??!1,hasError:ex({email:n.proposal.proposed.email.value,phone:n.proposal.proposed.phone.value,emailInputError:s.value,phoneInputError:l.value,hasViolations:g.value}),hasOnlyDigitalItems:tx(e)})?f.current:(f.current=!0,!0)})(),_=!Yn(o)&&ii({checkout:n}),b=d&&n.isShippingRequired.value;return!!(v||b||p||_)&&(t||a)})}function sx(){const{embed:e,shop:t,checkout:n,router:r,i18n:a}=ae(),i=e?.interstitialPartnerDisplayName,{plan:o}=pc().value,c=r.currentUrl.value.normalizedPath,u=ua({embedder:e?.embedder,shop:t}),p=ax(),{delegatedPaymentInstrument:h}=Je(),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&&vy(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(sh,{gridTemplateColumns:"auto 1fr",gap:"small",background:"subdued",borderWidth:"none none base none",padding:"base",children:[d(mh,{type:"info"}),d(ZE,{textWrap:"pretty",children:a.translate("merchant_redirect.partner_interstitial.account_source_banner",{shop_name:t.name,partner_name:i})})]}):null}const lx=w({id:()=>"AnnouncementRuntimeExtensions",displayName:"AnnouncementRuntimeExtensions",load:()=>fl(()=>import("./28ac86c0.Deh4Zwxw.js").then(e=>e.A),__vite__mapDeps([19,1,2,3,4,5,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,18,38,39,40,10,41,42,43,44,45,46,47,48,49,50]))});function cx(){const e=Qw("purchase.thank-you.announcement.render");return r(()=>{const t=Xa(e,"uiExtension");return t.length>0?[t[0]]:[]},[e])}const ux=/Version\/(\d+)\.(\d+)\sMobile\/\w+\sSafari/,dx=/Version\/(\d+)[\d.]*.*Safari/,px=/Chrome\/|Edg(?:e|iOS|A)?\//,mx=/FBAN|FB_IAB|FBAV|Instagram/;function hx(){return mx.test(navigator.userAgent)}const gx=0,fx=1,yx=2,vx=4,_x=5,bx=new Map([["legacy",0],["block",1],["inline",2],["grid",3],["list",4],["grid-compact",5]]);function Px(e,t){return bx.get(e)===t}function kx(e){const t=bx.get(e);return 3===t||5===t}function Sx(e){return"string"==typeof e&&bx.has(e)}const wx=f(null);function Cx(){return h(wx)}wx.displayName="ChoiceListContext";const Ex=f(null);function xx(){return h(Ex)||{}}function Ix(){return xx().redesigned??!1}Ex.displayName="ChoiceListStyleContext";const Ax=f(void 0);function Tx(e){return Px(e,1)||Px(e,5)}function Lx(e){const t=h(nd)?.redesignedChoiceLists??!1,n=h(Ax);return t&&"base"!==n&&Tx(e)?"redesigned":"base"}Ax.displayName="ChoiceListPresentationOverrideContext";var Nx={Actions:"u2pextc u2pextb _1fragem82 _1fragem9v _1fragemtq _1fragemrx _1fragem6t _1fragempu",ActionsScrollShadow:"u2pext1n",actionLayoutVariant:{inline:"u2pextf u2pextd _1fragemx8 _1fragembu",stacked:"u2pextg u2pexte _1fragemxc _1fragemcd"},hasBlockSize:"u2pextt",Content:"u2pext13 u2pext12 _1fragemyn",contentPaddingVariant:{base:"u2pext1p u2pext1o _1fragemtq _1fragemrx",none:"u2pext1q"},CloseButton:"u2pext1l u2pext1k _1fragempa _1fragemr3 _1fragemnh _1fragemsw _1fragemwn _1fragem10x _1fragem5u _1fragem133 _1fragem12k _1fragem12p _1fragem12e _1fragem130",Footer:"u2pextm _1fragemyo",Header:"u2pext1a u2pext19 _1fragem64 _1fragembe _1fragem19",HeaderContent:"u2pext1h _1fragemyn _1fragemvo",headerContentPaddingVariant:{base:"u2pext1i",none:"u2pext1j"},headerPaddingVariant:{base:"u2pext1e u2pext1b _1fragemtq _1fragemrx",large:"u2pext1f u2pext1c _1fragemtq _1fragemrx",extraLarge:"u2pext1g u2pext1d _1fragemtq _1fragemrx"},IFrame:"u2pext15 u2pext14 _1fragemeg _1fragemdw _1fragemf0 _1fragemdc _1fragem5u",iframePaddingVariant:{base:"u2pext17 u2pext16 _1fragemtq _1fragemrx _1fragempu",none:"u2pext18"},Modal:"u2pexto u2pextn _1fragemup _1fragemv4 _1fragem64 _1fragem73 _1fragemzf _1fragem5p _1fragemve _1fragemxx _1fragemy5 _1fragem133 _1fragem12n _1fragem12d _1fragem12q",modalTopRadiusVariant:{rounded:"u2pextp",square:"u2pextq"},modalMobileMarginVariant:{base:"u2pextr",none:"u2pexts"},Overlay:"u2pext8 u2pext7 _1fragem108 _1fragem10n _1fragemzt _1fragem112 _1fragemwn _1fragem64 _1fragem1j _1fragem132 _1fragem11k _1fragem12l _1fragem12q _1fragem12f",overlayPaddingVariant:{base:"u2pext9",none:"u2pexta"},ScrollBox:"u2pextv u2pextu _1fragem6t _1fragemuk _1fragemv4",scrollBoxActionsVariant:{withActions:"u2pextw",noActions:"u2pextx"},scrollBoxPaddingVariant:{gap:"u2pextz u2pexty _1fragem8c _1fragema5",none:"u2pext10",blockStart:"u2pext11"},secondaryActionLayoutVariant:{inline:"u2pextk u2pexti _1fragemx8",stacked:"u2pextl u2pextj _1fragemxc"},SecondaryActions:"u2pexth _1fragem82 _1fragem9v _1fragem6t _1fragemyn",transitionVariant:{entered:"u2pext1",exit:"u2pext2",exiting:"u2pext3",enter:"u2pext4",entering:"u2pext5",exited:"u2pext6"},MobileSafari26BarTop:"u2pext1t u2pext1s u2pext1r _1fragem6y _1fragemwn _1fragem10n _1fragem112 _1fragem11z _1fragem132",MobileSafari26BarBottom:"u2pext1u u2pext1s u2pext1r _1fragem6y _1fragemwn _1fragem10n _1fragem112 _1fragem11z _1fragem132",ModalContentCrossFadeTarget:"u2pext0",overlayMobileSafari26:"u2pext1v"};const Rx=Zc("Modal");function Mx(e){const t=eu(e.id,Rx),n=Wu("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(Ox,{...e,id:t,onHide:i,open:r,children:fw(o)&&d(Bu,{children:o})})}return d(Ox,{...e,id:t})}const Dx={"small-100":300,small:300,base:480,"large-100":640,large:640,max:960},Ox=Kp(Up(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:b,secondaryActions:P,actionLayout:k="inline",footer:S,children:w,id:C,onAfterShow:E,onShow:x,closeButton:I="visible",dataTestIdForScrollableContent:A,...T}){const L=a(null),N=a(null),R=a(!1),M=h(Hu)?.openModalCount;i(()=>{if(o&&M)return M.value+=1,()=>{M.value=Math.max(0,M.value-1)}},[o,M]),o&&N.current!==o&&"function"==typeof x&&x(),N.current=o;const{modal:{margin:D}}=th(),O=null!=D&&"none"!==D,z="hidden"===I,{onHide:B,onAfterHide:V}=e?{}:T,[F,U]=s(),q=!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),j=r??(q||-1===F||"max"===t?"100%":void 0),H=function(e){return e.endsWith("px")}(t)?t:`${Dx[t]}px`,{className:$,style:Y,styleElement:W}=Qm({blockSize:j,maxInlineSize:`@media (inline-size >= extraSmall) ${H}, none`}),G=Od(o,"slow"),[J,K]=s("");i(()=>{K(Nx.transitionVariant[G])},[G]);const{isLocked:Q,lock:X,unlock:Z}=uy();i(()=>{o&&!Q&&X(),!o&&Q&&Z()},[Q,X,o,Z]),i(()=>{if("exited"===G&&(U(void 0),R.current&&("function"==typeof V&&V(),R.current=!1)),"entered"===G){if(C&&function(){const e=navigator.userAgent;if(px.test(e))return!1;const t=e.match(dx);return!!t&&26===parseInt(t[1],10)}()){const e=document.getElementById(C),t=document.activeElement,n=t instanceof HTMLElement&&!0===e?.contains(t)&&t.matches('input, textarea, select, [contenteditable="true"]');e&&!n&&e.focus()}"function"==typeof E&&E()}},[G,E,V,C]),i(()=>{o||(R.current=!0)},[o]),i(()=>{const t=t=>{"Escape"!==t.key&&"Esc"!==t.key||e||!o||!L.current?.contains(document.activeElement)&&document.getElementById(tu)?.contains(document.activeElement)||"function"==typeof B&&B()};return document.addEventListener("keydown",t,!1),()=>{document.removeEventListener("keydown",t,!1)}},[e,o,B]);const ee=n(e=>{if(!r&&!q){const t=e.target;if(t?.contentWindow)try{U(t.contentWindow.document.body.scrollHeight)}catch{U(-1)}}p?.()},[r,p,q]),te=n(e=>{e.target===e.currentTarget&&"function"==typeof B&&B()},[B]);if("exited"===G)return null;const ne=l&&!f?Qp(C):void 0,re=Boolean(b||P),ae=function(){const e=navigator.userAgent.match(ux);return!!e&&"26"===e[1]}();return d(uu,{children:d(Ax.Provider,{value:void 0,children:[W,d("div",{ref:L,className:v(Nx.Overlay,J,Nx.overlayPaddingVariant[r?"none":"base"],ae&&Nx.overlayMobileSafari26),onMouseDown:te,children:d(sy,{children:d("div",{id:C,className:v(Nx.Modal,Nx.modalTopRadiusVariant["100%"===zp(r)?"square":"rounded"],Nx.modalMobileMarginVariant[O?"base":"none"],J,$,j&&Nx.hasBlockSize),role:"dialog","aria-modal":!0,style:Y,"aria-label":f,"aria-labelledby":ne,children:[c?d(y,{children:d(xu,{level:2,children:[d(zx,{id:C,hideCloseButton:z||e,onHide:B,heading:l}),d(Ux,{source:c,iframeRef:u,iframeId:m,allow:g,accessibilityLabel:f,heading:l,iframeHeight:F,blockSize:r,handleIFrameLoad:ee,padding:_})]})}):d("div",{className:v(Nx.ScrollBox,o&&Nx.ModalContentCrossFadeTarget,Nx.scrollBoxPaddingVariant["base"===_?l?"gap":"blockStart":"none"],Nx.scrollBoxActionsVariant[re||S?"withActions":"noActions"]),"data-testid":A,children:[d(xu,{level:2,children:[d(zx,{id:C,hideCloseButton:z||e,onHide:B,padding:_,heading:l}),d(Fx,{padding:_,children:w})]}),re&&d("div",{className:Nx.ActionsScrollShadow})]}),S&&d("div",{className:Nx.Footer,children:d(Ld.Provider,{value:!1,children:d(Bu,{children:S})})}),re&&d(Bx,{primaryAction:b,secondaryActions:P,actionLayout:k})]})})}),ae&&d(y,{children:[d("div",{className:v(Nx.MobileSafari26BarTop,J)}),d("div",{className:v(Nx.MobileSafari26BarBottom,J)})]})]})})},{overlayType:"modal"}));function zx({hideCloseButton:e,id:t,onHide:n,padding:r,heading:a}){const i="string"==typeof a?d(LS,{level:1,children:a}):a;return!i&&e?null:d("div",{className:v(Nx.Header,Nx.headerPaddingVariant[i?"base":"base"===r?"large":"extraLarge"]),children:[i&&d("div",{id:Qp(t),className:v(Nx.HeaderContent,Nx.headerContentPaddingVariant[e?"none":"base"]),children:i}),!e&&d(Vx,{onHide:n})]})}function Bx({primaryAction:e,secondaryActions:t,actionLayout:n="inline"}){return d(Bu,{children:d("div",{className:v(Nx.Actions,Nx.actionLayoutVariant[n]),children:[("inline"===n||fw(t))&&d("div",{className:v(Nx.SecondaryActions,Nx.secondaryActionLayoutVariant[n]),children:t}),e]})})}function Vx({onHide:e}){const t=id();return d("button",{type:"button",className:Nx.CloseButton,onClick:()=>{"function"==typeof e&&e()},"aria-label":t("closeModal")||"Close",children:d(mh,{type:"x",size:"base"})})}function Fx({children:e,padding:t="base"}){return fw(e)&&d("div",{className:v(Nx.Content,Nx.contentPaddingVariant[t]),children:d(Ld.Provider,{value:!1,children:d(qw,{children:e})})})}function Ux({source:e,iframeRef:t,iframeId:n,allow:r,accessibilityLabel:a,heading:i,iframeHeight:o,handleIFrameLoad:s,padding:l="base"}){const c=r;return d("iframe",{src:e,title:a??("string"==typeof i?i:void 0),name:n,className:v(Nx.IFrame,Nx.iframePaddingVariant[l]),ref:t,onLoad:s,id:n,...o&&o>0&&{style:{height:o}},...c?{allow:c}:void 0})}function qx({submitButtonAppearance:e,submitText:t,cancelText:n,loading:r,disabled:a,handleSubmit:i,handleCancel:o}){const s=Boolean(n),l=Boolean(t);return d(sh,{gridTemplateColumns:s&&l?"1fr 1fr":"1fr",gap:"base",inlineSize:"100%",children:[s&&d(Zf,{variant:"secondary",inlineSize:"fill",onClick:o,children:n}),l&&d(Zf,{variant:"primary",inlineSize:"fill",disabled:a,loading:r,type:"submit",tone:e,onClick:i,children:t})]})}const jx=["deliveryNext","taxes","landedCostDetails","remoteTaxDetails","total"];var Hx=(e=>(e.Truck="truck",e.PackageDelivery="package-delivery",e.Store="store",e.Location="location",e))(Hx||{});const $x=ne("DeliveryMethodsContext"),Yx=f(void 0);function Wx(){return re($x)}function Gx(){return h(Yx)}function Jx(e){const n=h($x),r=jx.includes(e);return t(()=>r&&(n?.initialReconciliationPending.value??!1))}function Kx(e){return e/si}function Qx(){const{i18n:e}=ae();return n(t=>{if("number"==typeof t){const n=Math.ceil(Kx(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(Kx(n)),i=Math.ceil(Kx(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 Xx(){const e=ge().deliveryNext,n=Ve();return t(()=>{const t=e.value;return!(!t||"unavailable"===t.status||n.value.enabledDeliveryMethods.length>1)&&t.lines.every(e=>"not_required"===e.status||"available"===e.status&&e.methods.length<2)})}function Zx(){const{deliveryNext:e,allViolations:n}=ge(),r=kn("deliveryNext");return t(()=>{const t=e.value,a=r.value,i=n.value;if(a)return{value:null,loading:a};const o=i?.some(({code:e})=>li.has(e));return{value:"unavailable"===t?.status&&(t.hasNoDeliveryMethods||o||!1),loading:!1}})}function eI(){const{allViolations:e}=ge(),n=kn("deliveryNext");return t(()=>{const t=n.value;return t?{value:null,loading:t}:{value:e.value?.some(({code:e})=>ci.has(e))??!1,loading:!1}})}function tI(){const{deliveryLines:e}=qe();return t(()=>{const t=e.value;return t.length>0&&t.every(e=>{const t=e.value?.deliveryMethodTypes;return 1===t?.length&&"PICK_UP"===t[0]})})}function nI(e){return(e??[]).filter(e=>e.requiresShipping).reduce((e,t)=>
2e+(t.quantity??0),0)}function rI(){const e=oi();return t(()=>{const t=e.value;if(!t)return{};const n={};for(const e of t){if("available"!==e.status)continue;const t=Lt(e);if(!t)continue;const{methodType:r}=t,a=nI(e.targetMerchandiseLines);n[r]=(n[r]??0)+a}return n})}function aI(){const{checkout:e,i18n:t}=ae(),n=Wx(),r=e.crossBorderConfirmState.value,a=Boolean(r&&!r.onCancel),i=kh(),o=r?()=>{r.onConfirm(n),i(t.translate("split_delivery.cross_border.banner"))}:void 0;return d(Mx,{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(qx,{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(Jf,{children:t.translate("split_delivery.cross_border.modal.content")})})}function iI(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 oI(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 sI(e){return(e.value.targetMerchandiseLines??[]).some(e=>e.requiresShipping)}function lI(){const{deliveryNext:e}=ge(),n=qe(),{shop:r}=ae(),a=pc();return t(()=>function({deliveryNext:e,isThankYouPage:t,proposedDeliveryLines:n,splitShipPickupUiEnabled:r}){if(!r)return!1;const a=oI(je(e).filter(e=>"available"===e.status).map(e=>e.methods.map(({methodType:e})=>e)));return t?a:!!Boolean(e&&"supportsSplitDeliveryMethod"in e&&e.supportsSplitDeliveryMethod)&&function(e){const t=e.filter(sI);return oI(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:e.value,isThankYouPage:Cv(a.value.currentDetour),proposedDeliveryLines:n.deliveryLines.value,splitShipPickupUiEnabled:r.shipPickupInOneOrderEnabled}))}function cI(e){const t=a(e);return i(()=>{t.current=e},[e]),t}function uI(){return(()=>{const{userEvents:e,shop:{id:t},checkout:{identity:n},source:r}=ae(),a="shopPay"===n.current.value,o=ge().buyerIdentity.value?.customerProfile,{negotiating:s,methods:l}=Wx(),c=ui();i(()=>{!s.value&&l.value.includes("PICK_UP")&&e.monorailEvent({schemaId:"local_pickup_checkout/3.1",payload:{checkoutToken:r.checkoutSessionIdentifier||"",eventType:"checkout_pickup_tab_selected",shopId:parseInt(se(t),10),numberLocationsFound:c.value?.methods.length,userId:o?.id?parseInt(se(o.id),10):void 0,checkoutSurface:a?"shop_pay":"guest_checkout"}})},[o?.id,s.value,a,c.value?.methods.length,e,l.value,r.checkoutSessionIdentifier,t])})(),(()=>{const e=a(),{userEvents:t,shop:{id:n},checkout:{identity:r},source:o}=ae(),s="shopPay"===r.current.value,l=ge().buyerIdentity.value?.customerProfile,c=ui(),u=c.value?.selectedDeliveryMethodHandle,d=c.value?.methods;i(()=>{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}})(u,d);r&&u!==e.current&&(e.current=u,t.monorailEvent({schemaId:"local_pickup_checkout/3.1",payload:{eventType:"checkout_pickup_location_selected",checkoutToken:o.checkoutSessionIdentifier||"",shopId:parseInt(se(n),10),locationId:se(r),selectedLocationRank:a,userId:l?.id?parseInt(se(l.id),10):void 0,numberLocationsFound:d?.length||0,checkoutSurface:s?"shop_pay":"guest_checkout"}}))},[l?.id,s,d,t,u,o.checkoutSessionIdentifier,n])})(),(()=>{const e=Yg(),n=lI(),r=pc(),a=t(()=>n.value&&!Cv(r.value.currentDetour));k(()=>{a.value&&o(()=>{e("splitShipAndPickupIntent",{timestamp:new Date})})})})(),null}function dI(e,t){const n=e.find(pi),r=t.find(pi);return!n&&r?{direction:"entering",pickupType:r}:n&&!r?{direction:"leaving",pickupType:n}:{direction:"none"}}const pI=["phone","company","address2"];function mI(){const{locationAddress:e,shippingAddress:t}=qe(),{checkout:r,shop:i}=ae(),o=i.hasFlagEnabled(mi),s=a(e.peek()),l=a(!1);return{syncLocationAddressFromShipping:n((n,a)=>
2{if(o)return;if("entering"!==dI(n,a).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}(e.value,i))return void(l.current=!0);const c=t.value;if(!c?.countryCode)return;const{isRequired:u}=r.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)&&pI.every(t=>e[t]||!(e=>u(e,{countryCode:c.countryCode,useMerchantSettings:!0}))(t))}(c)?c:{};e.value=hi(d,c.countryCode,c.zoneCode),s.current=e.value},[r,o,e,t])}}function hI(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 gI({children:e}){const s=a(void 0),{i18n:l,checkout:c,observability:u,shop:p,router:h,webMcp:g}=ae(),f=p.hasFlagEnabled(gi),y=m(!1),v=m(!1),_=Th(),{negotiate:b}=mc(),{loading:P}=he(),S="shopPay"===c.identity.current.value,w=Ve(),C=a(new Set),E=a(),{correctShippingAddress:I}=function(){const{shippingAddress:e}=qe(),{shopPay:t,checkout:r}=ae(),a=ge(),i=di(),o="shopPay"===r.identity.current.value,s=n(()=>{if(!i.value||a.mustSelectProvidedAddress.value)return;const n=t.session.selectedShippingAddress.value;if(!n?.address)return;const o=r.configuration.addressSettings.nonBillingAddressSettings.value.isRequired("phone"),s=t.user.phoneNumber.value;e.value={...n?.address,phone:o&&!n?.address.phone?s:n?.address.phone}},[i,r.configuration.addressSettings.nonBillingAddressSettings,a.mustSelectProvidedAddress,e,t.user.phoneNumber,t.session.selectedShippingAddress]);return{correctShippingAddress:n(e=>{o&&e.includes("SHIPPING")&&s()},[s,o])}}(),{syncLocationAddressFromShipping:L}=mI(),{preservePickupSelectionAcrossToggles:N}=function(){const{deliveryLines:e}=qe(),t=a({}),r=n((n,r)=>{const a=dI(n,r);if("leaving"!==a.direction)return"entering"===a.direction?t.current[a.pickupType]:void 0;t.current[a.pickupType]=function(e){return e.reduce((e,t)=>{const{type:n,deliveryMethodTypes:r,deliveryMethodHandle:a}=t.value;return r.some(pi)?{...e,[n]:a}:e},{})}(e.value)},[e]);return{preservePickupSelectionAcrossToggles:r}}(),{billingAddressOption:R,deliveryLines:M,discountLines:D,merchandiseLines:O,shippingAddress:z,locationAddress:B}=qe(),V=lI(),{deliveryNext:F,shippingAddress:U}=ge(),q=F.peek(),j=m(fi(z.peek())||fi(U.peek())||null!=q&&"unavailable"!==q.status),H=cb();k(()=>{(fi(U.value)||"filled"===F.value?.status||"partial"===F.value?.status)&&(j.value=!0)});const $=h.currentUrlMatches("/stock-problems"),[Y]=Uh("ONE_TIME_PURCHASE"),W=T(Y),[G,J]=Yh(),K=function(){const{parts:e}=ie();return n(t=>{e.deliveryLines.value.forEach(e=>{e.value={...e.value,deliveryMethodHandle:t}})},[e.deliveryLines])}(),Q=!f,X=T(G),Z=t(()=>mt(F.value)||yi(M.value)||V.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=fI(w.value.enabledDeliveryMethods??[]),t="unavailable"===F.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}),oe=n((e,t)=>{if(H.value)return;const n=fI(e),r=fI(t);t.some(pi)&&!r&&(!S&&n&&null==s.current&&(s.current=R.value),R.value="custom"),!r||n||S||(p.requireMatchingShippingAndBilling?R.value="shipping":null==s.current?R.value=p.sameBillingAndShippingAddress?"shipping":"custom":R.value=s.current,s.current=void 0)},[p,S,H,R]),se=a(re.peek());k(()=>{const e=se.current,t=re.value;se.current=t,e!==t&&o(()=>oe(e,t))});const le=n((e,t,n)=>{oe(t,e),se.current=e,I(e),n?B.value=n:L(t,e);const r=n?void 0:N(t,e),a=hI(e);A(()=>{p.shipPickupInOneOrderEnabled&&vi(M),J(e),p.shipPickupInOneOrderEnabled&&a&&_i({deliveryLines:M,merchandiseLines:O.value,deliveryMethodTypes:a}),K(void 0),r&&Bh(M,r),bi(D),ne.value=!1})},[oe,I,B,L,N,p.shipPickupInOneOrderEnabled,M,J,O,K,D,ne]),ce=n((e,t=re.value,n)=>{const r=S||H.value||t.includes("SHIPPING")||!e.includes("SHIPPING")?["deliveryNext"]:[],a=Ue(r);return le(e,t),y.value=!0,_?.dispatch?.("deliveryMethodChanged"),b({legacyFiltering:{include:r},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?.()})}})}
2,[re,S,H,le,y,_,b,P]),ue=t(()=>c.proposal.negotiated.fields.mustSelectProvidedShippingRate.value??!1),de=t(()=>Na({checkout:c})),pe=t(()=>iI(w.value.enabledDeliveryMethods??[],de.value));i(()=>g?.unstable_provideFulfillmentController({getAvailableMethodTypes:()=>pe.value,getSelectedMethodTypes:()=>re.value,markBuyerSelection:()=>{v.value=!0,ne.value=!1},applyMethodChange:le,reconcileSameMethod(e){const t=hI(e);p.shipPickupInOneOrderEnabled&&t&&_i({deliveryLines:M,merchandiseLines:O.value,deliveryMethodTypes:t})&&bi(D)}}),[g,pe,re,v,ne,le,M,O,p.shipPickupInOneOrderEnabled,D]);const me=t(()=>{const e=yI(pe.value,l,p,Q);return ue.value?e.filter(e=>re.value.includes(e.id)):e}),fe=t(()=>{if(ue.value)return me.value;const e=C.current,t=iI([...w.value.enabledDeliveryMethods??[],...e],de.value),n=t.length>pe.value.length?yI(t,l,p,Q):me.value;return n.length>1&&n.forEach(t=>e.add(t.id)),n}),ye=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:jx}}if("filled"!==o?.status)return{nextMethods:[...n.find(e=>JSON.stringify(e)===JSON.stringify(s))??l],loadingFields:jx}}}({isStockProblems:$,shippingRequired:Pi(c.proposal),deliveryMethodOptions:fe.value.map(({value:e})=>e),mustSelectProvidedShippingRate:ue.value,isSplitShipAndPickup:V.value,initialPickupOnlySelection:te,deliveryNext:F.value,currentSelectedMethods:re.value}),[]),ve=m(null!=ye);k(()=>{const e=me.value,t=fe.value;if(e===t||t.length<=1)return void(E.current=void 0);const n=JSON.stringify([t.map(({id:e})=>e),e.map(({id:e})=>e)]);E.current!==n&&(E.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}))}),i(()=>{ye&&!v.value?ce(ye.nextMethods,ye.previousMethods,()=>{ve.value=!1})?.catch(e=>{A(()=>{y.value=!1,ve.value=!1}),u.error(e)}):ve.value=!1},[]);const _e=cI(n(e=>{const t=fe.value.find(t=>t.id===e[0]);t&&(v.value=!0,ce(t.value))},[fe,ce,v])),be=t(()=>fe.value.length<=1),Pe=t(()=>{if(!be.value)return{options:fe,selected:re,select:e=>{_e.current(e)},variant:Q?"next":"default"}}),ke=r(()=>({negotiating:y,initialReconciliationPending:ve,methods:re,setSelectedMethodTypes:ce}),[y,ve,re,ce]);return d($x.Provider,{value:ke,children:[d(uI,{}),d(x,{when:V,children:d(aI,{})}),d(Yx.Provider,{value:Pe.value,children:e})]})}function fI(e){return e.includes("SHIPPING")||e.includes("LOCAL")}function yI(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?Hx.PackageDelivery:Hx.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?Hx.Location:Hx.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:Hx.Location})}return a}function vI(){const{i18n:e}=ae();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 _I(){const{shop:{captureAtFulfillmentEnabled:e}}=ae(),n=ge(),r=n.buyerIdentity,a=n.paymentFlexibilityPaymentTermsTemplate;return t(()=>"FULFILLMENT"===a.value?.type&&!0===e&&!r.value?.purchasingCompany)}const bI=e=>"target"in e&&"$.availableRedeemables.redeemable"===e.target;function PI(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 kI(e){return e.maskedIdentifier?.slice(-4).toUpperCase()}function SI(e){return e?`â¢â¢â¢â¢ ${e}`:""}
2class wI extends Error{constructor(){super(...arguments),this.name="TooManyRedeemablePaymentMethodsError"}}function CI(){const e=function(){const e=ge().paymentMethods;return t(()=>{const t=e.value?.flatMap(e=>"redeemable"===e.type&&"CUSTOM"===e.redemptionSource?[e]:[]);if(void 0!==t&&0!==t.length){if(t.length>1)throw new wI("There can only be a single custom redeemable payment method per redeemable type.\nGift card is currently the only supported redeemable type");return t[0]}})}(),[a,i]=s([]),o=ki("CUSTOM"),l=r(()=>o.value.filter(e=>{const t=a.some(t=>PI(t,e.method)),n=!e.cost||0===e.cost.amount;return!t&&!n&&Boolean(e.method.redemptionContent)}),[o.value,a]),c=ie(),{negotiate:u}=mc(),d=Boolean(e.value),p=n(e=>{const t=t=>"redeemable"!==t.type||"CUSTOM"!==t.redemptionSource||!PI(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({legacyFiltering:{include:["paymentLines"]},silenceViolations:Ue(["paymentLines"]),onComplete:t=>{"error"===t.status&&t.violations.some(Si)&&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({legacyFiltering:{include:["paymentLines"]},silenceViolations:Ue(["paymentLines"]),onComplete:n=>{i(t=>t.filter(t=>!PI(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({legacyFiltering:{include:["paymentLines"]},silenceViolations:Ue(["paymentLines"]),onComplete:t=>{e(t)}})}):Promise.resolve()},[u,c]);return{canApplyGiftCards:d,paymentMethod:e.value,paymentLines:l,submit:m,remove:h,removeAll:g}}function EI(){const e=ge().paymentLines;return t(()=>e.value?.lines.filter(e=>"giftCard"===e.method.type)??[])}function xI(){const e=ki("STORE_CREDIT"),{paymentLines:n}=CI(),r=EI();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 AI(){const e=wi(),n=pc(),r=pt(),a=ge(),i=_I(),o=vI(),s=xI(),{shop:l,checkout:c,embed:u,i18n:d,source:p,shopPay:m}=ae(),{orderSummary:h}=Lv(),g=l?.name,f=h.totalLabel,y=_r(u?.embedder),v=Ci(m.app.config);return t(()=>{const{currentPage:t,plan:l,currentDetour:u}=n.value,m=a.deferredTotal.value,h=a.paymentFlexibilityPaymentTermsTemplate.value,_="COMPACT"===c.configuration.orderSummary?.layoutStyle;let b;b="TOTAL"===f?d.translate("order_summary.total_label"):y?d.translate("universal.iframes.subtotal_label"):"ORDER_TOTAL"===f?d.translate("order_summary.order_total_label"):_&&g&&!v?d.translate("order_summary.pay_merchant_label",{merchant_name:g}):d.translate("order_summary.total_label");const P=y?b:d.translate("order_summary.total_due_label"),k="thankYou"===u?.type,S=m&&m.amount.amount>0;if(e.value&&k)return d.translate("order_summary.deferred_payment_info.paid_today_next");if(Yn(p))return d.translate("order_summary.total_due_label");if(r.value)return d.translate("order_summary.payment_terms_totals.due_later_checkout_to_draft");if(S)return d.translate("order_summary.payment_terms_totals.due_today_next");if(h){if(i.value)return s.value?P:b;if(h?.dueDate){const e=o(h.dueDate,{month:"short"});return d.translate("order_summary.deferred_total_due_date_label_next",{date:e})}return"FULFILLMENT"===h?.type?d.translate("order_summary.payment_terms_totals.due_on_fulfillment_next"):"RECEIPT"===h?.type?d.translate("order_summary.total_due_later_label"):d.translate("order_summary.payment_terms_totals.due_later_checkout_to_draft")}return k?s.value?d.translate("order_summary.total_paid_label"):d.translate("order_summary.partial_total_label"):yb(t,l.greenPath[l.greenPath.length-1])?s.value?P:b:s.value?P:d.translate("order_summary.partial_total_label")})}function TI({children:e,id:t,title:n}){return d("abbr",{className:"_1qifbzv1 _1qifbzv0 _1fragem128",id:t,title:n,children:e})}function LI(){const e=Ei(),n=xi(),r=ge(),a=Ii(),i=r.deferredTotal,{i18n:o}=ae(),s=T(Nv()),l=xI(),c=T(Lv()),u=Rt(),p=t(()=>{const t=a.value,r=e.value;if(!t||!r)return;const d=o.formatCurrency(t.amount,{currency:t.currencyCode,form:"short"}),p=t.amount<r.amount&&!n.value&&!i.value&&!l.value;return{amountDue:t,paymentDueFormatted:d,priceBeforeReductionsFormatted:o.formatCurrency(r.amount,{currency:r.currencyCode,form:"short"}),showCurrencyCode:"base"===c.value.disclosure.style&&s.value&&(!u.value||!d.includes(t.currencyCode)),showSubtotalBeforeReductions:p,totalAmountDueAccessiblityLabel:p?o.translate("order_summary.price_after_discount_aria_text"):o.translate("order_summary.total_price_label")}});return d(x,{when:p,children:({amountDue:e,paymentDueFormatted:t,priceBeforeReductionsFormatted:n,showCurrencyCode:r,showSubtotalBeforeReductions:a,totalAmountDueAccessiblityLabel:i})=>d(iy,{alignItems:"end",children:[a?d(y,{children:[d(Jf,{accessibilityVisibility:"exclusive",children:o.translate("order_summary.total_price_label")}),d(Jf,{size:"small",color:"subdued",type:"redundant",translate:!1,children:n})]}):null,d(Jf,{accessibilityVisibility:"exclusive",children:i}),d(iy,{direction:"inline",alignItems:"center",gap:"small-300",children:[r&&d(TI,{children:d(Jf,{type:"small",color:"subdued",translate:!1,children:e.currencyCode})}),d(ZE,{color:"base",size:"large",translate:!1,children:d(Jf,{type:"strong",children:t})})]})]})})}const NI={"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 RI({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)=>
2MI(t)-MI(e)):t).slice(0,r),m=Tw(n);return d("div",{className:NI[`StackedThumbnails-${e}`],style:{"--total":p.length,"--thumbnail-inline-size":ke(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:NI[`StackedThumbnail-${e}`],style:{"--index":r},children:d(Cw,{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:DI(r,e),alt:a?t.image?.altText||s:"",totalItems:h,overlay:m?`+${u}`:void 0})},"stableId"in t?t.stableId:`${r}${t.title}`)})})}function MI(e){return"totalPrice"in e&&e.totalPrice?e.totalPrice.amount:"price"in e&&e.price?e.price.amount:0}function DI(e,t){return"fan"===t?Math.max(0,Math.min(e,2)):"fan-legacy"===t&&e>0?"legacy":void 0}const OI="ik40Z";function zI(){const{disclosure:{style:e}}=Lv(),{open:n}=PC(),{i18n:r,checkout:a,source:i}=ae(),o=AI(),s="base"===e,l=t(()=>!n.value),c=a.proposal.facts.merchandiseLines??[],{value:u}=ge().merchandiseLines,p=Yn(i)?c:u?.lines||[],m=d(mh,{type:n.value?"chevron-up":"chevron-down",size:"small-200",display:"inline"});return d(iy,s?{direction:"inline",justifyContent:"space-between",alignItems:"center",gap:"small-200",padding:"small-300 base",inlineSize:"100%",className:OI,children:[d(x,{when:n,fallback:d(iy,{direction:"inline",alignItems:"center",gap:"small-200",children:[d("span",{className:we({screenReaders:"only"}),children:r.translate("order_summary.title")}),d(RI,{variant:"inline",size:"small-200",max:3,merchandise:p,useImageAltTexts:!1}),d(Jf,{size:"large",fonts:"secondary",type:"strong",children:o})]}),children:d(Jf,{color:"subdued",children:r.translate("order_summary.title")})}),d(iy,{direction:"inline",alignItems:"center",gap:"small-200",children:[d(x,{when:l,children:d(LI,{})}),m]})]}:{direction:"inline",justifyContent:"space-between",alignItems:"center",gap:"small-200",padding:"small-300 base",inlineSize:"100%",className:OI,children:[d(iy,{direction:"inline",alignItems:"center",gap:"small-200",className:"Tupv7",children:[r.translate("order_summary.title"),m]}),d(LI,{})]})}function BI(){const{checkout:e,embed:n,router:r}=ae();return t(()=>!(!n?.isFlagshipPartner||e.configuration.isUniversalCheckoutFinalizer)&&"/thank-you"===r.currentUrl.value.normalizedPath)}function VI(){const e=BI();return d(x,{when:e,children:d("div",{className:"KwVFv"})})}var FI={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 UI=({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=Od(o??!1,o?"base":"fast");return d("div",{className:FI.PillHintWrapper,children:d("div",{className:v(FI.PillHint,FI.directionVariant[i.value],FI.transitionVariant[s]),children:[a,d(mh,{size:"small",type:"block"===i.value?"arrow-down":"arrow-right",className:FI.iconVariant[i.value]})]})})};var qI={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 jI=({position:e,scrollDirection:t})=>{const n=Od((t?.block&&"start"!==e?.scrolledTo.block)??!1,"base"),r=Od((t?.block&&"end"!==e?.scrolledTo.block)??!1,"base"),a=Od((t?.inline&&"start"!==e?.scrolledTo.inline)??!1,"base"),i=Od((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(qI.ShadowHint,qI.positionVariant[e],qI.transitionVariant[t])},e))})},HI=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)}},$I=(e,t)=>e?"start":t?"end":null;var YI="_1b9t7ypn _1b9t7ypj _1fragemel",WI="_1b9t7ypo _1b9t7ypk _1fragemf5",GI="_1b9t7ypp _1b9t7ypl _1fragemdh",JI="_1b9t7ypq _1b9t7ypm _1frageme1",KI="_1b9t7yp8",QI="_1b9t7yp9";const XI=nh(Hd(function({accessibilityActiveDescendant:e,accessibilityLabel:i,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:N,onScrollable:R,onScrolledToEdge:M,overflow:D="auto",padding:O="none",paddingBlock:z,paddingBlockEnd:B,paddingBlockStart:V,paddingInline:F,paddingInlineEnd:U,paddingInlineStart:q,scrollbarWidth:j="auto",scrollTo:H}){const{Element:$,role:Y}=oh(o),{className:W,style:G,styleElement:J}=Qm({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:xd}}),{className:K,style:Q,styleElement:X}=Qm({overflow:D,padding:O,paddingBlock:z,paddingInline:F,paddingBlockEnd:B,paddingBlockStart:V,paddingInlineEnd:U,paddingInlineStart:q}),Z=a(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=HI.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(()=>Xp(()=>{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?$I(n,i):null,block:t.block?$I(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,N,R,M),se="listbox"===o||ae?.inline||ae?.block,le=v(ae?.block&&"start"!==re?.scrolledTo.block&&YI,ae?.block&&"end"!==re?.scrolledTo.block&&!ie?.block&&WI,ae?.inline&&"start"!==re?.scrolledTo.inline&&GI,ae?.inline&&"end"!==re?.scrolledTo.inline&&!ie?.inline&&JI),ce=v("none"!==p&&ae?.block&&"start"!==re?.scrolledTo.block&&KI,"none"!==p&&ae?.block&&"end"!==re?.scrolledTo.block&&!ie?.block&&QI);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":i,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(UI,{variant:C,scrollDirection:ae,position:re,scrollbarVisible:"auto"===j}),"shadow"===C?.type&&d(jI,{variant:C,scrollDirection:ae,position:re,scrollbarVisible:"auto"===j})]})]})]})}));var ZI="go06b0";const eA=/<table[\s>]/i;function tA(e){if("undefined"==typeof DOMParser||!eA.test(e))return null;const{body:t}=(new DOMParser).parseFromString(e,"text/html");return t.querySelector("table")?nA(t.childNodes,!1):null}function nA(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?nA(e.childNodes,t||"table"===i):void 0,l=q(i,o,s);"table"!==i||t?n.push(l):n.push(d(XI,{overflow:"hidden auto",className:"go06b1",children:l},r))}return n}function rA({dangerouslySetInnerHTML:e,scrollableContent:t="none",children:n}){const a=Md()?"span":"div",i=e?.__html,o=r(()=>"all"===t&&null!=i?tA(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}}`))}
2):d(a,o?{className:ZI,children:o}:{dangerouslySetInnerHTML:e,className:ZI,children:n})}const aA=f(null);function iA(e){return`error-for-${e}`}aA.displayName="SelectContext";function oA({children:e,controlID:t,type:n}){return"warning"===n?d(sh,{id:t?iA(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(mh,{type:"info"})}),d(Jf,{children:e})]}):d("div",{className:"ksaxnz0 _1fragemxr",id:t?iA(t):void 0,children:e})}function sA(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 lA({children:e}){return d("span",{className:v("rermvf1 rermvf0 _1fragemup _1fragemv4 _1fragem5u _1fragem12y"),children:e})}var cA={floating:"xpgeoa0",positionVariant:{inside:"xpgeoa3 xpgeoa1 _1fragemwi _1fragem11z _1fragem12j _1fragem12e _1fragem12t _1fragem12w _1fragem12z",outside:"xpgeoa4 xpgeoa2 _1fragem5u"},Text:"xpgeoa5",visuallyHidden:"xpgeoa6 _1fragem121"};function uA({htmlFor:e,label:t,variant:n,className:r}){return d("label",{id:`${e}-label`,htmlFor:e,className:v(cA.positionVariant[n],r),children:d("span",{className:cA.Text,children:d(lA,{children:t})})})}const dA={FormLayout:"fjTgn",FormLayoutGroup:"fa7nz",SpacingSmall100:"RV2tT",SpacingBase:"wOVuC",FormLayoutConnected:"_9Mesh",Connectable:"_2g0rh",NotConnectable:"tgYPK"};var pA={Accessory:"_7ozb2u1m _7ozb2u1l _1fragemws _1fragem2d _1fragemyb",accessoryPositionEnd:"_7ozb2u1o",accessoryPositionStart:"_7ozb2u1n",ActualInput:"_7ozb2ur",Field:"_7ozb2uq _7ozb2up _1fragemws _1fragemzf _1fragem11y _1fragem12u _1fragem12b",fieldInsetEnd:"_7ozb2u3",fieldInsetStart:"_7ozb2u2",fieldLabelInside:"_7ozb2uv _7ozb2uu _1fragem12j _1fragem12e _1fragem12t",fieldLetterCaseVariant:{uppercase:"_7ozb2u1q"},fieldMultiline:"_7ozb2u13",fieldPrefixed:"_7ozb2uz _7ozb2uy _1fragem12o",fieldPrefixSpacing:{small:"_7ozb2u10",base:"_7ozb2u11"},fieldTypeVariant:{number:"_7ozb2u14",tel:"_7ozb2u15",text:"_7ozb2u16",email:"_7ozb2u17",url:"_7ozb2u18",password:"_7ozb2u19"},FieldWrapper:"_7ozb2un",fieldWrapperMultiline:"_7ozb2uo",floatingLabelOnContent:"_7ozb2us",floatingLabelOnFocus:"_7ozb2ut",Icon:"_7ozb2u1d _7ozb2u1c _1fragemws _1fragem2d",iconPositionVariant:{start:"_7ozb2u1e",end:"_7ozb2u1f"},MultilineClone:"_7ozb2u1b _7ozb2u1a _1fragem6y",Prefix:"_7ozb2u1h _7ozb2u1g _1fragemws _1fragem2d",prefixInside:"_7ozb2u1i",segmentVariant:{start:"_7ozb2u0",end:"_7ozb2u1"},setFieldLabelIsNotVisible:"_7ozb2u12",Suffix:"_7ozb2u1k _7ozb2u1j _1fragemws _1fragem2d",TextField:"_7ozb2ub _7ozb2ua _1fragemyl _1fragemws _1fragem6t _1fragem133 _1fragemye _1fragem12j _1fragem12d _1fragem12q",textFieldBorderVariant:{none:"_7ozb2uk",full:"_7ozb2ul",blockEnd:"_7ozb2um"},textFieldColorLayerVariant:{control:"_7ozb2ue _7ozb2uc _1fragemy6",controlInvalid:"_7ozb2uf _7ozb2ud _1fragemy7"},textFieldDisabled:"_7ozb2uh _7ozb2ug _1fragemyc _1fragem11z _1fragem11v",textFieldError:"_7ozb2u8",textFieldFocused:"_7ozb2u9",textFieldReadOnly:"_7ozb2uj _7ozb2ui _1fragem11w",withTypography:"_7ozb2u1p",Wrapper:"_7ozb2u5 _7ozb2u4 _1fragem7s _1fragem9l _1fragemws _1fragem6t",wrapperLabelInside:"_7ozb2u7 _7ozb2u6 _1fragemy6",wrapperVarsSetter:{labelInside:"_10vrn9p1 _10vrn9p0",labelOutside:"_10vrn9p2 _10vrn9p0"},inert:"_7ozb2u1r _1fragemz0"};const mA=Zc("TextField"),hA={"data-1p-ignore":!0,"data-lpignore":"true","data-bwignore":"true","data-form-type":"other"},gA=_(function({accessibilityDescription:e,accessoryEnd:t,accessoryStart:r,ariaActiveDescendant:i,ariaAutocomplete:o,ariaControls:l,ariaExpanded:c,ariaHasPopup:u,ariaLabel:p,ariaLive:m,ariaOwns:h,autoCapitalize:g,autocomplete:f="on",autoCorrect:_,autoFocus:b,controlledValue:P,defaultValue:k,disabled:S,error:w,icon:C,id:E,disablePasswordManagers:x,inputMode:I,label:A,labelAccessibilityVisibility:T="visible",labelPosition:L,labelWhenEmpty:N,letterCase:R,max:M,maxLength:D,min:O,minLength:z,name:B,onBlur:V,onChange:F,onFocus:U,onInput:q,onInputCommit:j,onKeyDown:H,onWheel:$,placeholder:Y,prefix:W,prefixSpacing:G="base",readOnly:J,required:K,role:Q,rows:X,segment:Z,step:ee,suffix:te,type:ne="text",value:re},ae){const{control:{border:ie,labelPosition:oe="inside"},textField:{border:se}}=th(),le=se||ie||"full",ce=L??oe,ue=Nd(),de=null==re?void 0:re,pe=null==P?void 0:P,me=eu(E,mA),he=e?`${me}-description`:void 0,ge=he?d(Jf,{accessibilityVisibility:"exclusive",id:he,children:e}):null,[fe,ye]=s(!1),[ve,_e]=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),i=a(t),o=a(e);let l=n;return i.current!==t&&(i.current=t,r(t),l=t),"object"==typeof e&&o.current!==e&&r(t),o.current=e,[l,r]}(pe??de),be=n(e=>{q?.(e),_e(e)},[q,_e]),Pe=function(e,t){if("boolean"!=typeof e)return void 0!==e&&Boolean(e)?d(oA,{controlID:t,type:"warning"===vA(e)?"warning":void 0,children:e&&"object"==typeof e&&"value"in e?e?.value:e}):null}(w,me),ke=Boolean(w)&&"warning"!==vA(w),Se=v(pA.TextField,pA.textFieldColorLayerVariant[ke?"controlInvalid":"control"],pA.textFieldBorderVariant[le],(S||ue)&&pA.textFieldDisabled,ue&&pA.inert,J&&pA.textFieldReadOnly,fe&&pA.textFieldFocused,ke&&pA.textFieldError,Z&&pA.segmentVariant[Z]),we=A&&"visible"===T;let Ce=pA.floatingLabelOnContent;"outside"===ce?Ce=cA.floating:W&&(Ce=pA.floatingLabelOnFocus);const Ee="outside"!==ce&&!X&&"full"===le;return d(y,{children:d("div",{className:v(pA.Wrapper,pA.wrapperVarsSetter["outside"===ce?"labelOutside":"labelInside"],"inside"===ce&&pA.textFieldColorLayerVariant[w?"controlInvalid":"control"],"inside"===ce&&pA.wrapperLabelInside,we&&Ce,Ee?dA.Connectable:dA.NotConnectable),children:[we&&"outside"===ce&&d(uA,{variant:"outside",htmlFor:me,label:A}),A&&"exclusive"===T&&d("label",{id:`${me}-label`,htmlFor:me,className:cA.visuallyHidden,children:A}),d("div",{className:Se,children:[ge,we&&"inside"===ce&&d(uA,{variant:"inside",htmlFor:me,label:A}),d(yA,{accessibilityDescription:e,accessoryEnd:t,accessoryStart:r,ariaActiveDescendant:i,ariaAutocomplete:o,ariaControl
2s:l,ariaDescribedBy:he,ariaExpanded:c,ariaHasPopup:u,ariaLabel:p,ariaLive:m,ariaOwns:h,autoCapitalize:g,autocomplete:f,autoCorrect:_,autoFocus:b,controlledValue:P,defaultValue:k,disabled:S,error:w,icon:C,id:me,disablePasswordManagers:x,inputMode:I,label:A,labelAccessibilityVisibility:T,labelPosition:ce,labelWhenEmpty:N,letterCase:R,localValue:ve,max:M,maxLength:D,min:O,minLength:z,name:B,onBlur:()=>{ye(!1),V?.()},onChange:F,onFocus:()=>{ye(!0),U?.()},onInput:be,onInputCommit:j,onKeyDown:H??function(e){void 0===X&&F&&"Enter"===e.key&&F(e.currentTarget.value)},onWheel:$,placeholder:Y,prefix:W,prefixSpacing:G,readOnly:J,ref:ae,required:K,role:Q,rows:X,step:ee,suffix:te,type:ne,value:re})]}),Pe]})})}),fA=gA,yA=_(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:N,max:R,maxLength:M,min:D,minLength:O,name:z,onBlur:B,onChange:V,onFocus:F,onInput:U,onInputCommit:j,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=Rf({active:Boolean(S)&&Boolean("warning"!==vA(S))}),ie=a(),oe=n(e=>{"function"==typeof re?re(e):re&&(re.current=e),ie.current=e,ae.current=e,e&&(N?e.value!==N:e.value!==(ne??""))&&e.dispatchEvent(new Event("input"))},[re,ae]),se=If(),le=Td(),ce=Nd();i(()=>{b&&!ce&&ie.current?.focus()},[b,ce]);const{control:{labelPosition:ue="inside"}}=th(),de=T??ue,pe="object"==typeof w?w.source:w,me="object"==typeof w?w.position??"start":"start",he=""!==pe&&pe&&d("div",{className:v(pA.Icon,pA.iconPositionVariant[me]),"aria-hidden":"true",onClick:()=>ie.current?.focus(),children:d(mh,{type:pe})}),ge=I&&"visible"===A,fe="email"===te||f?.split(/\s+/).includes("email"),ye=Boolean(fe)||"tel"===te||"number"===te,ve=(!te||"text"===te)&&Boolean(N);let _e;_e=ye?"ltr":ve?"auto":void 0;const be=W&&d("div",{id:`${C}-prefix`,className:v(pA.Prefix,pA.withTypography,ge&&"inside"===de&&pA.prefixInside),"aria-hidden":"true",onClick:()=>ie.current?.focus(),children:W}),Pe=v(pA.Field,"inside"===de&&pA.fieldLabelInside,Boolean(W)&&pA.fieldPrefixed,Boolean(G)&&pA.fieldPrefixSpacing[G],Boolean(!ge)&&pA.setFieldLabelIsNotVisible,Boolean(W||t||he&&"start"===me)&&pA.fieldInsetStart,Boolean(ee||e||he&&"end"===me)&&pA.fieldInsetEnd,Boolean(X)&&pA.fieldMultiline,L&&pA.fieldLetterCaseVariant[L],te&&pA.fieldTypeVariant[te],pA.withTypography),ke=l||S?sA([l,S&&iA(C)]):void 0,Se=x??("number"===te?"decimal":void 0),we=W?` ${C}-prefix`:"",Ce=ee?` ${C}-suffix`:"";let Ee;"outside"===de?Ee=Y:"visible"===A&&(Ee=k??I);const xe=q(X?"textarea":"input",{...E?hA:void 0,id:C,min:D,max:R,step:Z,maxLength:M,minLength:O,name:z,placeholder:Ee,className:v(Pe,pA.ActualInput),required:K,type:X?void 0:te,disabled:P,readOnly:J,inputMode:Se,"aria-activedescendant":r,"aria-autocomplete":o,"aria-controls":s,"aria-owns":h,"aria-describedby":ke,"aria-expanded":c,"aria-hidden":!!ce||void 0,"aria-invalid":Boolean(S)&&"warning"!==vA(S)?"true":void 0,"aria-label":p,"aria-live":m,"aria-required":K,"aria-labelledby":I?`${C}-label${we}${Ce}`:void 0,"aria-haspopup":u,onBlur:({currentTarget:{value:e}})=>{se.current&&(e!==(ne||"")&&V?.(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&&j?.(t),r&&a||V?.(t),U?.(t)},onFocus:()=>{F?.()},onKeyDown:H,onWheel:$,ref:oe,role:Q,rows:X,value:N??"",autoComplete:f,autoFocus:b&&!ce,form:le?.nested?le.id:void 0,tabIndex:ce?-1:void 0,autoCorrect:_,autoCapitalize:g,dir:_e}),Ie=!0===Boolean(X)&&d("div",{"aria-hidden":"true",className:v(pA.MultilineClone,Pe),dir:_e,children:[N," "]}),Ae=v(pA.FieldWrapper,Boolean(X)&&pA.fieldWrapperMultiline),Te=X?d("div",{className:Ae,children:[xe,Ie]}):xe,Le=ee&&d("div",{id:`${C}-suffix`,className:v(pA.Suffix,pA.withTypography),"aria-hidden":"true",onClick:()=>ie.current?.focus(),children:ee}),Ne=t&&d("div",{className:v(pA.Accessory,pA.accessoryPositionStart),children:t}),Re=e&&d("div",{className:v(pA.Accessory,pA.accessoryPositionEnd),children:e});return d(y,{children:[he,be,Te,Ne,Le,Re]})});function vA(e){if(e&&"object"==typeof e&&"type"in e)return e.type}var _A={labelInside:"_10vrn9p1 _10vrn9p0",labelOutside:"_10vrn9p2 _10vrn9p0"},bA={Select:"_1k3449n0 _1fragem133 _1fragemyl",selectColorLayerVariant:{control:"_1k3449n3 _1k3449n1 _1fragemy6",controlInvalid:"_1k3449n4 _1k3449n2 _1fragemy7"},inert:"_1k3449n5 _1fragemz0"};const PA={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"},kA=Zc("Select");function SA({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=Td(),{control:{border:P,labelPosition:k="inside"},select:{border:S}}=th(),w=Nd(),C=Rf({active:Boolean(p)&&Boolean("warning"!==vA(p))}),E=eu(t,kA),x=S||P||"full",I=void 0!==p&&Boolean(p)&&d(oA,{controlID:E,type:"warning"===vA(p)?"warning":void 0,children:p&&"object"==typeof p&&"value"in p?p?.value:p}),A=Boolean(p)&&"warning"!==vA(p),T=v(PA.Select,bA.Select,A&&PA.hasError,(l||w)&&PA["Select-isDisabled"],w&&bA.inert,c&&PA["Select-isReadOnly"],PA[j("Select-border",x)]),[L,N]=s(0),R=Boolean(L),M=Boolean(h&&h!==i)||R,D=""!==o||M,O=d("label",{className:v(PA.Label,PA[j("Label-position",k)],D&&PA["Label-isFloating"]),htmlFor:E,children:d("span",{className:v(PA.LabelText),children:d(lA,{children:i})})}),z=n(()=>{N(e=>e+1)},[]),B=n(()=>{N(e=>e-1)},[]),V=r(()=>({readOnly:c,registerEmptyValueOption:z,unregisterEmptyValueOption:B}),[c,z,B]),F=d("div",{children:["outside"===k?O:null,d("div",{className:v(PA.SelectWrapper,bA.selectColorLayerVariant[A?"controlInvalid":"control"]),children:["inside"===k&&O,d(aA.Provider,{value:V,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?iA(E):void 0,"aria-invalid":p&&"warning"!==vA(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(PA.Selector),children:d(mh,{type:"chevronDown",size:"small-200"})})]})]});var U;const q="outside"!==k&&"full"===x;return d(y,{children:d("div",{className:v(PA.Wrapper,"inside"===k&&bA.selectColorLayerVariant[A?"controlInvalid":"control"],_A["outside"===k?"labelOutside":"labelInside"],q?dA.Connectable:dA.NotConnectable),children:[F,I]})})}function wA({children:e,id:t,value:n,disabled:r,alternateValues:a,accessibilityLabel:i}){const o=h(aA),{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 CA={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 EA=_(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=qp(p),h=Nd(),g="auto"===r?"fit-content":r,f=id(),y=Od(i??!1,{enter:"slow"}),_=d("span",{className:v(CA.LoadingContent),dir:"auto",children:d($f,{accessibilityLabel:f("processing")})}),b=fw(n)&&d("span",{className:v(CA.Content),"aria-hidden":i||void 0,children:n});return d(Rd.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(CA.PressButton,CA.inlineSizeVariant[Se(g)],s&&CA.pressed,(o||h)&&CA.disabled,h&&CA.inert,i&&[CA.loading,CA.transitionVariant[y]]),disabled:o||i,tabIndex:h?-1:void 0,ref:m,children:[b,i&&_]})})}),xA={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(xA);return e[Math.floor(Math.random()*e.length)]}(),[]);return d(ZE,{id:n,size:o,textAlign:"justify",children:e?d(Ow,{delay:t,children:e}):Array.from({length:i},(e,n)=>
2d(Ow,{delay:t,inlineSize:xA[n===i-1?a??(1===i?"fill":s):"fill"]},n))})}const AA=new Set(["http:","https:"]);function TA({children:e}){const t=function(){const{checkout:{configuration:{isWindowOpenDelegationEnabled:e}},embed:t,observability:r}=ae(),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(!AA.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:""},NA={id:"1263e051dbbb958a67fe45f4acca32965cf3cea185a1b71afe5ebdb65c4f4160",type:"query",name:"RemoteMerchantPolicies",source:""},RA=Ai(({graphql:{coreGraphql:e},observability:t,shop:n},{checkoutProtocolModalEventSignal:r,defaultPolicy:a,policies:i})=>{const o=Ti(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(NA,{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=wl(k.value,(e,t)=>e&&!t&&u.peek()&&d.peek()&&"undefined"!=typeof document&&null!==document.querySelector(Cl),["modal-content-cross-fade"]);return D(()=>{w.value=k.value}),D(()=>{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&&hl(()=>{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&&hl(()=>{p.value=n},["modal-content-cross-fade"])}}});function MA({id:e,defaultPolicy:t}){const{i18n:n,shop:r,mobileCheckoutSdk:a,embed:i}=ae(),{checkoutProtocolModalEventSignal:o}=Je(),{localPolicies:s,localPoliciesWithContent:l,remotePolicies:c}=Li(),u=r.hasFlagEnabled(Ni),p=c.length>0?[...s,...c]:l,m=u&&p.some(({shopId:e,handle:n})=>e===t.shopId&&n===t.handle)?p:[t],h=u?n.translate("shop_policies.terms_and_policies"):t.name,g=a.variant.isStandard()||i?.isCheckoutKit(),f=u?"@media (inline-size >= extraSmall) 600px, 90%":g?"100%":void 0,{error:y,loading:v,policyBody:_,selectedPolicy:b,selectedShopPolicies:P,shops:k,show:S,afterShow:w,hide:C,selectShop:E,selectPolicyHandle:I}=Ri(RA,{checkoutProtocolModalEventSignal:o,defaultPolicy:t,policies:m}),A=k.value.length>1||k.value.some(e=>e.policies.size>1),T=()=>d(TA,{children:d(rA,{dangerouslySetInnerHTML:{__html:_.value??""},scrollableContent:"all"})}),L=d(x,{when:()=>!y.value,fallback:n.translate("bad_request.title"),children:d(x,{when:()=>!v.value,fallback:d(iy,{"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:()=>A||b.value.shopId!==r.id?d(x,{when:()=>_.value,fallback:d(Jf,{color:"subdued",children:n.translate("remote_policies.unavailable_policy",{policy_name:b.value.name,shop_name:b.value.shopName})}),children:T}):T()})});return d(Mx,{id:e,onShow:S,onAfterShow:w,onHide:C,heading:h,blockSize:f,children:[d(qf,{accessibilityRole:"status",accessibilityVisibility:"exclusive",children:v.value?n.translate("general.loading"):null}),A?d(iy,{gap:"base",children:[d(x,{when:()=>k.value.length>1,children:d(iy,{direction:"inline",gap:"base",children:k.value.map(e=>d(EA,{pressed:b.value.shopId===e.shopId,onClick:()=>E(e.shopId),children:d(iy,{gap:"small-400",direction:"inline",alignItems:"center",justifyContent:"center",children:d(Jf,{children:e.shopName})})},e.shopId))})}),d(x,{when:()=>P.value.length>1,children:d(SA,{value:b.value.handle,label:n.translate("shop_policies.policy_label"),onChange:I,name:"policy",children:P.value.map(e=>d(wA,{value:e.handle,children:e.name},e.handle))})}),L]}):L]})}var DA={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 OA=Zc("Checkbox"),zA=Sm(_(function({accessibilityLabel:e,disabled:t,error:n,id:r,label:a,name:i,details:o,...s},l){const c=eu(r,OA),u=Nd(),p="string"==typeof n&&Boolean(n.trim())&&d("div",{className:DA.Error,children:d(oA,{controlID:c,children:n})}),m=v(DA.Label,DA.labelAndDetailsStateVariant[t||u?"disabled":"default"],u&&DA.inert),h=("string"==typeof a||fw(a))&&d("label",{htmlFor:c,className:m,children:a}),g="string"==typeof o||fw(o),f=g?`${c}-details`:void 0,y=v(DA.Details,DA.labelAndDetailsStateVariant[t||u?"disabled":"default"],u&&DA.inert),_=g&&d("div",{id:f,className:y,children:o});return d("div",{children:[d("div",{className:DA.Wrapper,children:[d(BA,{id:c,name:i,error:Boolean(n),accessibilityLabel:e,disabled:t,ref:l,ariaDescribedBy:f,...s}),h]}),_,p]})}),{commands:{clipboard:!1,overlay:!1}}),BA=_(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=Nd(),_=jp(f,Rf({active:a})),b="inherit"!==n,P=v(DA.Input,a&&DA.inputError,DA.inputStateVariant[r||y?"disabled":"default"],y&&DA.inert);return d("div",{className:v(DA.Checkbox,b&&DA.colorLayerControl,u&&DA.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&&iA(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:DA.Icon,children:d(mh,{type:"check",size:"small-200"})})]})}),VA="gid://shopify/App/580111";function FA(e,t){return e.namespace.toLowerCase()===t.namespace.toLowerCase()&&e.key.toLowerCase()===t.key.toLowerCase()}function UA(e,t){const{namespace:n,key:r}=e.update??e.delete??{};return null!=n&&null!=r&&FA({namespace:n,key:r},t)}function qA(e,t){return e?.find(e=>FA(e,t))?.value}function jA(e,t){for(let n=e.length-1;n>=0;n--)if(UA(e[n],t))return n;return-1}function HA({key:e,label:t,required:i},{type:s,validate:l=()=>{}}){const{checkout:{proposal:c},i18n:u}=ae(),d=mc(),p=Di(e),m=Oi(),h=function({namespace:e,key:t,type:n}){const{checkout:{proposal:a}}=ae(),i=a.proposed.cartMetafields,o=a.negotiated.fields.cartMetafields;return r(()=>{const r={namespace:e,key:t,type:n};return new Mi(P(()=>function(e,t){const n=e[jA(e,t)];if(n)return n.delete?"":n.update?.value}(i.value,r)??qA(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=jA(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=a(),{handleViolations:f}=function(e,t){const{current:r,lastJourneyProgression:a}=he(),{customFields:i}=r.fields,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,i.value,e);r&&!t.value&&(t.value=r.localizedMessage||r.nonLocalizedMessage)},[i,t,e]);return k(()=>{const e=a.value;"error"===e.type&&"negotiation"!==e.negotiationStage&&o(()=>s(e.violations))}),{handleViolations:n(e=>{"error"===e.status&&s(e.violations)},[s])}}(e,m);zi(h,m,l,Kt.InvalidCustomFieldValue);const y=i.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??qA(c.negotiated.fields.cartMetafields.peek(),p)??"")&&!m.peek()&&(g.current=e,d.negotiate({fieldsToResolve:["cartMetafields","customFields"],legacyFiltering:{include:[]},silenceViolations:[...ar],onComplete:f}))}}}function $A({field:{description:e,heading:t,key:n},children:r}){const a=e.value;return d(iy,{gap:"small-100","data-inspector-id":n,"data-inspector-kind":"customField",children:[t.value?d(LS,{children:t}):null,a?d(Jf,{color:"subdued",children:a}):null,r]})}function YA({field:e}){const t=function({required:e,requiredErrorMessage:t}){const{i18n:r}=ae();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}=HA(e,{type:"boolean",validate:t}),s="string"==typeof a.value?a.value:void 0;return d($A,{field:e,children:d(zA,{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 WA({field:e}){const t=function({choices:e,required:t,requiredErrorMessage:r}){const{i18n:a}=ae();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:r,error:a,fieldProps:i,negotiate:o}=HA(e,{type:"single_line_text_field",validate:t});return d($A,{field:e,children:d(SA,{label:i.label,name:i.name,required:i.required,value:r.value,error:"string"==typeof a.value?a.value:void 0,placeholder:i.label,onChange:e=>{r.value=e,a.value=t(e),o()},children:e.choices?.map(({label:e,value:t})=>d(wA,{value:t,children:e},t))})})}const GA=w({displayName:"AsyncDateField",suspense:!1,load:()=>C(()=>fl(async()=>{const{DateField:e}=await import("./9f57d2aa.BJCp05MT.js").then(e=>e.b);return{DateField:e}},__vite__mapDeps([26,1,27,3,4,2,5,28,29,30])).then(({DateField:e})=>e)),useError:GE("DateField"),renderLoading:({field:e})=>d(JA,{field:e})});function JA({field:e}){const{value:t,fieldProps:n}=HA(e,{type:"date"});return d($A,{field:e,children:d(fA,{...n,value:t.value,readOnly:!0,inputMode:"numeric",maxLength:10,accessoryEnd:d(mh,{type:"calendar"})})})}const KA=_(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(gA,{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 QA(e,t){const{value:n,error:r,fieldProps:a,negotiate:i}=HA(e,t),o=Bi(n,r,t.validate);return{validatedInput:o,fieldProps:a,persist:()=>{o.onBlur(),i()}}}function XA({field:e}){const t="MULTILINE_TEXT"===e.type,r=function({required:e,requiredErrorMessage:t,validations:r}){const{i18n:a}=ae(),{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}=QA(e,{type:t?"multi_line_text_field":"single_line_text_field",validate:r});return d($A,{field:e,children:d(t?KA:fA,{...a,label:i.label,name:i.name,required:i.required,onBlur:o})})}function ZA({field:e}){switch(e.type){case"TEXT":case"MULTILINE_TEXT":return d(XA,{field:e});case"DATE":return d(GA,{field:e});case"CHOICE":return d(WA,{field:e});case"BOOLEAN":return d(YA,{field:e});default:return null}}const eT=w({id:()=>"RuntimeExtension",displayName:"RuntimeExtension",suspenseName:({extension:e})=>$a(e.extensionPoint.target)?`runtime-extension-${e.id}`:void 0,load:()=>fl(()=>import("./49758c58.DurVmlXX.js"),__vite__mapDeps([199,1,2,3,4,5,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,10,41,42,43,44,45,46,47,48,49,50,17,8,51,52,11,53,7,9,12,200]))}),tT="OyeF5",nT="XYPMc",rT=e=>d(qf,{children:e}),aT=({gap:e,children:t,condition:n,marginBlockStart:r,marginBlockEnd:a})=>{const i=e&&n?d(iy,{gap:e,children:t}):d(y,{children:t});return r||a?d("div",{className:v({[tT]:r,[nT]:a}),style:{...r&&{"--extensions-margin-block-start":ve.spacing[r]},...a&&{"--extensions-margin-block-end":ve.spacing[a]}},children:i}):d(y,{children:i})};function iT({customizations:e,gap:t,options:n,transformComponents:r,render:a=rT,marginBlockStart:i,marginBlockEnd:o}){return 0===e.length?null:d(aT,{gap:t,condition:e.length>1,marginBlockStart:i,marginBlockEnd:o,children:e.map(e=>"uiExtension"===e.kind?d(eT,{options:n,extension:e.extension,transformComponents:r,render:a},e.extension.id):d(ZA,{field:e.field},e.field.key))})}
2const oT=e=>d("svg",{xmlns:"http://www.w3.org/2000/svg",xmlSpace:"preserve",viewBox:"0 0 30 14",...e,children:[d("path",{d:"M7.4 12.8h6.8l3.1-11.6H7.4C4.2 1.2 1.6 3.8 1.6 7s2.6 5.8 5.8 5.8",style:{fillRule:"evenodd",clipRule:"evenodd",fill:"#fff"}}),d("path",{d:"M22.6 0H7.4c-3.9 0-7 3.1-7 7s3.1 7 7 7h15.2c3.9 0 7-3.1 7-7s-3.2-7-7-7m-21 7c0-3.2 2.6-5.8 5.8-5.8h9.9l-3.1 11.6H7.4c-3.2 0-5.8-2.6-5.8-5.8",style:{fillRule:"evenodd",clipRule:"evenodd",fill:"#06f"}}),d("path",{d:"M24.6 4c.2.2.2.6 0 .8L22.5 7l2.2 2.2c.2.2.2.6 0 .8s-.6.2-.8 0l-2.2-2.2-2.2 2.2c-.2.2-.6.2-.8 0s-.2-.6 0-.8L20.8 7l-2.2-2.2c-.2-.2-.2-.6 0-.8s.6-.2.8 0l2.2 2.2L23.8 4c.2-.2.6-.2.8 0",style:{fill:"#fff"}}),d("path",{d:"M12.7 4.1c.2.2.3.6.1.8L8.6 9.8c-.1.1-.2.2-.3.2-.2.1-.5.1-.7-.1L5.4 7.7c-.2-.2-.2-.6 0-.8s.6-.2.8 0L8 8.6l3.8-4.5c.2-.2.6-.2.9 0",style:{fill:"#06f"}})]});function sT(){const{shopPay:e,i18n:t}=ae(),{footer:{content:{typography:n}={}}={}}=Lv(),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(oT,{"aria-hidden":"true",focusable:"false",className:"HTJIw"})}),i=d(ry,{href:r,target:"_blank",display:"block",children:a});return n?d(Jf,{size:n.size,color:n.color,type:"bold"===n.weight?"strong":void 0,children:i}):i}const lT=w({id:()=>"PrivacyPreferencesFooterLink",displayName:"PrivacyPreferencesFooterLink",suspense:!1,useError:function(e){const{observability:t}=ae();i(()=>{e&&function(e,t){e.error(t,{metadata:{privacyPreferencesFooterLink:{component:"PrivacyPreferencesFooterLink",failure:"lazy_load"}}})}(t,e)},[e,t])},load:()=>C(()=>fl(async()=>{const{deferredPrivacyComponents:e}=await(import("./2acfb1ce.Ijr4U99n.js"));return{deferredPrivacyComponents:e}},__vite__mapDeps([81,1,2,3,4,5,39,40,7,8,9,10,11,12])).then(({deferredPrivacyComponents:e})=>e.PrivacyPreferencesFooterLink))});function cT(){const e=Rt(),{checkout:{identity:n},consentManager:r}=ae();return t(()=>e.value&&"shopPay"!==n.current.value&&r.shouldShowBanner.value)}const uT=Zc("DelegatedLinkModal");function dT(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(Jf,{color:"subdued",children:e},`${t}-${r}`)})}function pT(){const{embed:e,i18n:t,checkout:{configuration:n},shop:r}=ae(),{name:a}=r,i=uC(),{currentDetour:o}=pc().value,s=cT(),{footer:{alignment:l,content:{visibility:c,typography:u}={}}={}}=Lv(),{localPolicies:p,localPoliciesWithContent:m}=Li(),h=r.hasFlagEnabled(Ni),g="microsoft"===e?.embedder,f="amazon"===e?.embedder,v="google"===e?.embedder;let _=u;g?_={...u,size:"extraSmall",color:"subdued",weight:"bold"}:v&&(_={...u,size:"small"});const b=p.find(e=>"privacy-policy"===e.handle),P=b.url,k=P?d(ry,{href:P,target:"_blank",accessibilityLabel:t.translate("user_consent.google_embedded_checkout.privacy_policy_accessibility_label",{shop_name:a}),children:t.translate("user_consent.google_embedded_checkout.privacy_policy")}):d(y,{children:[d(ry,{commandFor:"google-privacy-policy-modal",accessibilityLabel:t.translate("user_consent.google_embedded_checkout.privacy_policy_accessibility_label",{shop_name:a}),children:t.translate("user_consent.google_embedded_checkout.privacy_policy")}),d(MA,{id:"google-privacy-policy-modal",defaultPolicy:{...b,name:t.translate("user_consent.google_embedded_checkout.privacy_policy_modal_title")}})]}),S=d(ry,{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")}),w=d(ry,{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")}),C=d(ZE,{type:"small",textAlign:l,children:dT(t.translate("user_consent.google_embedded_checkout.terms",{shop_name:a,privacy_policy_link:k,payments_privacy_notice_link:S,learn_more_link:w}))}),E=d(ZE,{size:"extraSmall",color:"subdued",textAlign:l,children:d(Jf,{type:"strong",children:["Your purchase from ",a," is subject to the"," ",d(mT,{href:"https://aka.ms/ConsumerCopilotTerms",heading:"Copilot Terms",children:"Copilot Terms"})," and the ",d(mT,{href:"https://go.microsoft.com/fwlink/?LinkId=521839",heading:"Privacy Statement",children:"Privacy Statement"}),". We will share your order and payment details with ",a," to complete your order."]})}),I=0===m.length?d(iy,{direction:"inline",alignItems:"center",gap:"small-400 base",justifyContent:l,children:[d(Jf,{size:"small",color:"subdued",children:t.translate("general.all_rights_reserved",{shop_name:a})}),d(iy,{direction:"inline",gap:"base",accessibilityRole:"unordered-list",children:[d(x,{when:s,children:d(qf,{accessibilityRole:"list-item",children:d(lT,{})})}),d(x,{when:n.visibility.showDataSharingOptOut,children:d(qf,{accessibilityRole:"list-item",children:d(sT,{})})})]})]}):d(iy,{direction:"inline",justifyContent:l,gap:"small-400 base",accessibilityRole:"unordered-list",children:[(h?m.slice(0,1):m).map(e=>{const{handle:n,name:r}=e,a=h?t.translate("shop_policies.terms_and_policies"):r,o=h?"terms-and-policies-footer-policy-modal":`${n}-footer-policy-modal`,s=d(MA,{id:o,defaultPolicy:e}),l=d(Zf,{variant:"plain",commandFor:o,ref:i(n),children:a});return d(qf,{accessibilityRole:"list-item",children:[_?d(Jf,{size:_.size,color:_.color,type:"bold"===_.weight?"strong":void 0,children:l}):l,s]},n)}),d(x,{when:s,children:d(qf,{accessibilityRole:"list-item",children:d(lT,{})})}),d(x,{when:n.visibility.showDataSharingOptOut,children:d(qf,{accessibilityRole:"list-item",children:d(sT,{})})})]});let A="purchase.checkout.footer.render-after";"thankYou"===o?.type&&(A="purchase.thank-you.footer.render-after");const T=Qw(A);
2return d(iy,{gap:"large-100",children:[g&&E,v&&C,"hidden"!==c&&!f&&I,d(iT,{customizations:T,gap:"base"})]})}function mT({href:e,heading:t,children:n,...r}){const{checkout:a}=ae(),i=eu(void 0,uT);return a.configuration.isWindowOpenDelegationEnabled?d(ry,{href:e,...r,children:n}):d(y,{children:[d(ry,{commandFor:i,...r,children:n}),d(Mx,{id:i,source:e,heading:t})]})}function hT(){const{i18n:e,shop:t}=ae(),n=`${t.name} ${e.translate("general.page_title")}`;return d("h1",{className:we({screenReaders:"only"}),children:n})}function gT(){const{client:e,i18n:t}=ae(),{checkoutProtocolModalEventSignal:r}=Je(),a=n(()=>{window.location.assign(e.unstable_getSerialization("logoutUrl")||"")},[e]),{hasViolations:o}=av(Xn);return i(()=>()=>{r.value="none"},[r]),o?d(Mx,{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:()=>{r.value="b2bPermissions"},children:d(iy,{gap:"base",children:[d(Jf,{children:t.translate("b2b_errors.lost_permissions_subtitle")}),d(iy,{direction:"inline",gap:"base",justifyContent:"end",children:d(Zf,{variant:"primary",onClick:a,children:t.translate("b2b_errors.log_out_link_text")})})]})}):null}function fT({source:e,title:t,onIframeLoad:n}){const[r,a]=s(),[o,l]=s(!1);return i(()=>{e?(a(e),l(!0)):l(!1)},[e]),r?d(Mx,{source:r,open:o,blocking:!0,blockSize:"100%",size:"840px",accessibilityLabel:t,onIframeLoad:()=>n?.(r)}):null}function yT({source:e,logMessage:t,telemetryContext:r,logKey:o=e??void 0}){const{observability:s}=ae(),l=a();return i(()=>{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:tP(e)}})))},[o,t,s,e,r])}function vT(){const{i18n:e}=ae(),n=function(){const{checkout:e,shopPay:n,observability:r}=ae(),i=a(),o=t(()=>{if(Vi(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:tP(e),hasModalUrl:!0},iframeLoadTelemetryContext:{modalSourceType:"spe_three_ds_modal_url"}}}const t=e.latestReceipt.value;if(t&&Gy(t)){const e=t.action;if(Ky(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:tP(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?i.current!==e.logKey&&(i.current=e.logKey,r.log("action_required_modal_manager_action_required",e.logMessage,e.telemetryPayload)):i.current=void 0}),o.value}(),r=yT({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(fT,{source:n?.source,title:e.translate("processing.action_required"),onIframeLoad:r})}function _T(e,t){return e.has(t)}function bT(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&&_T(e.uiExtension.approvalScopes,Xl.PaymentSessionModal))||null}pT.displayName="FooterContent",mT.displayName="DelegatedLink";const PT=w({id:()=>
2"PaymentChallengeModal",displayName:"PaymentChallengeModal",suspense:!1,useError:function(e){const{observability:t}=ae();i(()=>{e&&function(e,t){e.error(t,{metadata:{paymentChallengeModal:{component:"PaymentChallengeModal",failure:"lazy_load"}}})}(t,e)},[e,t])},load:()=>C(()=>fl(()=>import("./7fd9930c.Bul6Y4p8.js"),__vite__mapDeps([201,1,20,3,4,2,5,21,7,8,9,10,11,12,202])))});function kT({modalPaymentMethodConfig:e,onModalRender:n}){const{checkout:r,observability:i}=ae(),o=a(),s=m(void 0),l=t(()=>{const e=r.latestReceipt.value;return e&&Jy(e)&&Qy(e.action)?e:void 0});k(()=>{const t=l.value;if(!t||!Qy(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,i.log("payment_challenge_modal_manager_action_required","[PaymentChallengeModalManager] Receipt requires further action",{challengeType:t.action.challengeType,challengeData:t.action.challengeData,hasModalPaymentMethodConfig:n}))}),k(()=>{const e=l.value;if(!e||!Qy(e.action))return void(s.value=void 0);const t=function(e){return JSON.stringify([e.id,e.action.type,Qy(e.action)?e.action.challengeType:void 0,Qy(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&&Qy(t.action))return n?{type:t.action.challengeType,data:t.action.challengeData,config:n,expiresAt:s.value?.expiresAt}:null});return d(x,{when:c,children:e=>d(PT,{challengeType:e.type,challengeData:e.data,receipt:r.latestReceipt.value,paymentMethod:e.config,onModalRender:n,challengeExpiresAt:e.expiresAt})})}function ST(){const e=ga(),{checkout:n}=ae(),r=ge().deferredTotal;return t(()=>{if(!e.value)return!0;const t=r.value?.amount.amount;return Boolean(Na({checkout:n})||t)})}function wT({isModalRendered:e,modalPaymentMethodConfig:n}){const{i18n:r,checkout:a}=ae(),i=function(){const{i18n:e,shopPay:n}=ae(),{managedByMarketsPro:r}=ge(),a=ST();return t(()=>{if(!a.value)return;if(!Fi({managedByMarketsPro:r.value}))return;const t=n.session.selectedPaymentMethod.value;return t&&Ui(t)?e.translate("processing.redirecting_title"):void 0})}();return t(()=>{if(i.value)return i.value;const t=a.latestReceipt.value;return t?Gy(t)?r.translate("processing.redirecting_notice"):Jy(t)?!e.value&&n.value?r.translate("processing.modal_notice",{paymentMethod:n.value.name}):r.translate("processing.wait.short"):!e.value&&n.value?.name&&qi(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 CT=w({id:()=>"CryptoModalManager",displayName:"CryptoModalManager",suspense:!1,useError:function(e){const{observability:t}=ae();i(()=>{e&&t.error(e,{metadata:{cryptoModalManager:{component:"CryptoModalManager",failure:"lazy_load"}}})},[e,t])},load:()=>C(()=>fl(()=>import("./39bf6084.Yx6sACLY.js"),__vite__mapDeps([203,1,2,3,4,5,190,47,63,7,8,9,10,11,12,204])))});function ET(){const{checkout:e}=ae(),{paymentLines:n}=qe(),r=ge().paymentMethods,a=t(()=>bT(r.value,n.value)),i=m(!1),o=wT({isModalRendered:i,modalPaymentMethodConfig:a}),s=$b();return k(()=>{if(e.latestReceipt.value)return Zu({content:o.value,role:"alert"})}),d(y,{children:[d(x,{when:s,fallback:d(vT,{}),children:d(CT,{})}),d(kT,{modalPaymentMethodConfig:a,onModalRender:()=>{i.value=!0}})]})}function xT(){const{i18n:e,url:t,source:n,shop:a,checkout:i,shopPay:o}=ae(),s="shopPay"===i.identity.current.value,{plan:l,currentPage:c}=pc().value,u=ga(),d="cartNext"===n.type||"simulated"===n.type,p=he(),m=qe().paymentLines.value,h=p.current.peek(),g=i.configuration.layout.isOnePage.value,f=ji(),y=Hi("SHOP_CASH"),v=pt(),_=dS(),b=ge(),{value:P}=b.managedByMarketsPro,k=Fi({managedByMarketsPro:P}),{value:S}=b.paymentFlexibilityPaymentTermsTemplate,w=wi(),C=fn(h.deliveryNext),E=Or(h.deliveryNext),x=r(()=>m.some(({method:{type:e}})=>"paymentOnDelivery"===e),[m]),I=r(()=>m.some(({method:{type:e}})=>"customManualPayment"===e||"manualPayment"===e),[m]),A=r(()=>a.vaultForPaymentLater&&$i(m),[a.vaultForPaymentLater,m]),T=Boolean(S)&&!w.value,L=_I();return r(()=>{let t=[];t=d&&_.value?[{id:"cart",route:_.value.toString()}]:[];const n=[...t,...l.greenPath,{id:"thankYou",route:"/thank-you"}];let r=c?n.findIndex(e=>e.id===c.id):void 0;(null==r||r<0)&&(r=void 0);const a=p.current.peek(),i=null==r?void 0:n.slice(r+1).find(e=>null==e.skipOverPage||!e.skipOverPage(a)),h=null==r?void 0:n.slice(0,r).reverse().find(e=>null==e.skipOverPage||!e.skipOverPage(a));return{nextPage:{id:i?.id,label:function(t){if(o.isSimulated)return e.translate("general.pay_now_button_label");switch(t){case"shipping":return e.translate("general.continue_to_shipping_method");case"payment":return e.translate("general.continue_to_payment_method");case"review":return e.translate("general.continue_to_review");case"thankYou":return v.value?e.translate("general.submit_for_review_button_label"):A?e.translate("payment.vault_for_payment_later.pay_button_label"):T&&!L.value?e.translate("general.confirm_order_button_label"):u.value||x||I||f.value||g&&y.value?e.translate("general.complete_purchase_button_label"):k&&!s&&Yi(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,C,E,x,I,A,g,f.value,y.value,L.value])}function IT(){const e=pc();return t(()=>{const{plan:t}=e.value;return t.greenPath.some(({id:e})=>"review"===e)})}function AT(){const{paymentLines:e}=qe();return t(()=>{const t=Boolean(Dt(e.value,"SHOP_PAY")),n=Boolean(Dt(e.value,"SHOPIFY_INSTALLMENTS"));return Wi(e.value)&&!t&&!n})}function TT(){const{i18n:e}=ae();return d(dy,{children:d(iy,{gap:"large-400",alignItems:"center",children:[d(qf,{children:d($f,{size:"large",appearance:"monochrome"})}),d(ZE,{children:e.translate("general.processing")})]})})}function LT(){const{progressing:e}=mc(),{i18n:n,embed:r}=ae(),a=function(){const e=IT(),n=T(xT().nextPage.id),r=Ff(),{checkout:{offsitePopupController:a}}=ae();return t(()=>!(!r.value||a.isOpen.value||e.value&&"thankYou"!==n.value))}(),i=function(){const e=AT(),n=pc(),r=T(xT().nextPage.id),{checkout:a}=ae(),i=a.configuration.layout.isOnePage,{inMemoryApplePayParts:{asPaymentMethod:o},walletUsedForSubmissionSignal:s}=_n(),l=qe().paymentLines;return t(()=>{if(!e.value)return!1;if(a.wallets.activeSession.value)return!1;const t=l.value;if(Dt(t,"PAYPAL_EXPRESS"))return!1;const c=Dt(t,"APPLE_PAY");return c?!o.value&&"APPLE_PAY"===s.value&&!!Gi(c)&&(i.value?"APPLE_PAY"!==a.wallets.escalatedWallet.value:"information"===n.value.currentPage?.id):i.value?!nc({paymentLines:t,walletUsedForSubmission:s.value}):"GOOGLE_PAY"===s.value?"information"===n.value.currentPage?.id:"thankYou"===r.value})}(),o=qe().paymentLines,s=t(()=>"google"===r?.embedder&&Boolean(Dt(o.value,"GOOGLE_PAY"))),l=t(()=>e.value&&(i.value||a.value)&&!s.value);return k(()=>{if(l.value)return Zu({content:n.translate("general.processing")})}),d(x,{when:l,children:d(TT,{})})}function NT(e){return function(t){return Object.fromEntries(Array.from(e).map(e=>[e,t[e]]))}}function RT(e){return function(t){return Object.fromEntries(Object.keys(t).filter(t=>!e.has(t)).map(e=>[e,t[e]]))}}function MT(){const{i18n:e,embed:t}=ae();return t?.isEmbeddedCheckout()?null:d("a",{href:`#${fC}`,className:"_9sntZ",children:e.translate("general.skip_to_content")})}function DT(){const{embed:e,i18n:t,checkout:{configuration:{allowRedirectToStorefront:r}}}=ae(),s=dS(),{checkoutProtocolModalEventSignal:l}=Je(),{lastJourneyProgression:c}=he(),u=a(!1);k(()=>{if(!_r(e?.embedder))return;const t=c.value;"failed"!==t.type||"tooManyRequests"!==t.reason||u.current||(u.current=!0,o(()=>ir(e,"too_many_requests")))});const p=n(()=>{s.value&&window.location.assign(s.value.toString())},[s]);i(()=>()=>{l.value="none"},[l]);const m="failed"===c.value.type&&"tooManyRequests"===c.value.reason,h=r&&s.value;return m?d(Mx,{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:()=>{l.value="tooManyRequests"},children:d(iy,{gap:"base",children:[d(Jf,{children:h?t.translate("too_many_requests.body"):t.translate("too_many_requests.body_no_cart")}),h&&d(y,{children:[d(qf,{display:"@media (inline-size >= small) none, block",children:d(Zf,{variant:"primary",inlineSize:"fill",onClick:p,children:t.translate("too_many_requests.return_to_cart")})}),d(sh,{display:"@media (inline-size >= small) auto, none",justifyItems:"end",children:d(Zf,{variant:"primary",onClick:p,children:t.translate("too_many_requests.return_to_cart")})})]})]})}):null}function OT(){const e=wt(),{i18n:n}=ae(),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),i=a(r.peek());return k(()=>{const e=r.value,t=i.current;if(i.current=e,e&&e!==t)return Zu({content:e})}),null}var zT={Progress:"xvcb04 xvcb03 _1fragemel _1frageme1 _1fragemf5 _1fragemdh _1fragemws _1fragemzf _1fragem32 _1fragem5u",toneVariant:{auto:"xvcb05",critical:"xvcb06"}};function BT({accessibilityLabel:e,id:t,max:n=1,tone:r="auto",value:a}){const i=Xc(),o=id(),s=e||o("processing");return i&&null==a?d(ZE,{children:s}):d("progress",{id:t,className:v(zT.Progress,zT.toneVariant[r]),value:a,max:n,"aria-label":s})}function VT({active:e=!1,announceProcessing:t=!0,children:n,loadingIndicatorVariant:r="spinner",showLoadingIndicator:a=!0}){const{i18n:o}=ae();i(()=>
2{if(e&&t)return Zu({content:o.translate("general.processing")})},[e,t,o]);const s=e&&a;return d(qf,{children:[d(qf,{inert:e,opacity:e&&"spinner"===r?70:void 0,children:n}),d("div",{className:we({transitionProperty:"opacity",transitionTimingFunction:"easeInOut",transitionDuration:"slowest",pointerEvents:"none"}),style:{opacity:s?1:0},"aria-hidden":!s,children:["progressbar"===r&&d("div",{className:we({position:"fixed",insetBlockEnd:"small400",insetInlineStart:"small400",insetInlineEnd:"small400"}),children:d(BT,{accessibilityLabel:o.translate("general.processing")})}),"spinner"===r&&d(qf,{position:"absolute",insetBlock:"50% auto",insetInline:"50% auto",transform:"translate(-50%, -50%)",children:d($f,{size:"large",accessibilityLabel:o.translate("general.processing")})})]})]})}function FT({children:e}){return d(Ji.Provider,{value:UT,children:e})}const UT=(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||!Ki(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 qT={autoBorderVariant:{none:"apn1wdm",extraSmall:"apn1wdn",small:"apn1wdo",base:"apn1wdp",large:"apn1wdq",extraLarge:"apn1wdr"},autoBorderWidthVariant:{none:"apn1wdh",base:"apn1wdi",large100:"apn1wdj",large200:"apn1wdk"},colorSchemeVariant:{scheme1:"apn1wd8 apn1wd0 _1fragemxx",scheme2:"apn1wd9 apn1wd1 _1fragemxy",scheme3:"apn1wda apn1wd2 _1fragemxz",scheme4:"apn1wdb apn1wd3 _1fragemy0",scheme5:"apn1wdc apn1wd4 _1fragemy1",scheme6:"apn1wdd apn1wd5 _1fragemy2",scheme7:"apn1wde apn1wd6 _1fragemy3",scheme8:"apn1wdf apn1wd7 _1fragemy4"}};const jT=f(void 0);function HT({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(jT),x="section"===t?(E?.level??0)+1:E?.level??0,I=r(()=>({level:x}),[x]),A=qa(jw().pending??{}),{pending:T,pendingInsetsRows:L,rowsInset:N}=jw(),R=N||!0===L&&$T(A.padding),M=y?d(WT,{headingLevel:x,heading:y,children:c}):c,D=A.background??a,O=A.colorScheme??m,z="auto"===T?.border&&"subdued200"===D,B="control"===p?"base":"baseSpecified";return d(qw,{rowsInset:R,children:d(YT,{colorScheme:O,children:d(jT.Provider,{value:I,children:d(qf,{accessibilityLabel:e,accessibilityRole:"presentation"===t?void 0:t,"aria-labelledby":n,background:("base"===D?B:D)??(O?B:void 0),border:i,borderRadius:A.borderRadius??o,borderStyle:A.borderStyle??s,borderWidth:A.borderWidth??l,boxShadow:z?void 0:A.boxShadow,containerName:g,className:v(O&&qT.colorSchemeVariant[O],z&&qT.autoBorderVariant[A.boxShadow??"none"],z&&qT.autoBorderWidthVariant[T?.borderWidth??"base"],u),colorLayer:p||(O?"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(xu,{children:M}):M})})})})}function $T(e){return null!=e&&(Array.isArray(e)?e.some($T):"object"==typeof e?Object.values(e).some($T):String(e).replace(/@\w+\s*\([^)]*\)/g,"").split(/[\s,]+/).some(e=>""!==e&&"none"!==e))}function YT({children:e,colorScheme:t}){const n=nm(),{current:a}=n,i=r(()=>t&&t!==a?{parent:a,current:t}:n,[t,a,n]);return d(tm.Provider,{value:i,children:e})}function WT({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(iy,{gap:r,children:[d(LS,{children:t}),d("div",{children:n})]}):d(y,{children:[d(LS,{children:t}),n]})}function GT(e){const{inlineSize:t}=Tw(e),r=t+2,i=a(r);i.current=r;const o=m(2),s=a(null);return{ref:n(e=>{if(s.current?.disconnect(),s.current=null,!e||"undefined"==typeof ResizeObserver)return;const t=new ResizeObserver(([t])=>
2{if(!t)return;const n=t.contentBoxSize?.[0]?.inlineSize??t.contentRect.width;if(0===n)return;const r=e.firstElementChild;if(!r)return;const a=parseFloat(getComputedStyle(r).columnGap)||0,s=Math.floor((n+a)/(i.current+a));o.value=Math.min(3,Math.max(1,s))});t.observe(e),s.current=t},[o]),max:o}}jT.displayName="SectionContext";const JT=e=>e.lineAllocations.map((t,n)=>KT(e,n)),KT=(e,t)=>{const{lineAllocations:n,...r}=e,a=n[t];if(!a)throw new TypeError(`Missing line allocation at index ${t}`);return{...r,lineComponents:QT(e.lineComponents,t),lineAllocation:a}},QT=(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 XT(e){const{proposed:t,negotiated:n}=e;return t?.itemPrice?.amount!==n?.itemPrice?.amount}function ZT(e){return e.stableId}const eL=/^\$.merchandise.merchandiseLines\[(\d+)\]$/;function tL(e,t){const n=nL(t);if(null!=n)return e[n]}function nL(e){const t=eL.exec(e);if(null==t?.[1])return;const n=parseInt(t[1],10);return isNaN(n)?void 0:n}function rL(e,t,n){const r=new Set;for(const a of t){if(!n(a)||!("target"in a))continue;const t=tL(e,a.target);t?.stableId&&r.add(t.stableId)}return r}function aL(e,t=[]){return rL(e,t,e=>nv([e])||rv([e]))}function iL(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 oL(e,t,n,r){const a=function(e,t){return[...new Set([...e.map(ZT),...t.map(ZT)])].map(n=>({proposed:e.find(e=>e.stableId===n),negotiated:t.find(e=>e.stableId===n)}))}(e,t);if(r)return lL(a.filter(r));const i=aL(e,n??[]),o=function(e,t=[]){return rL(e,t,e=>"MERCHANDISE_OUT_OF_STOCK"===e.code)}(e,n??[]);return lL(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 sL(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=>tL(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 lL(e){return e.flatMap(e=>Qi(e.proposed)||null==e.proposed?[e]:e.negotiated?[{proposed:void 0,negotiated:e.negotiated}]:[])}function cL(){const e=ae().checkout.configuration.layout.isOnePage.value,t=ge(),{value:n}=t.merchandiseLines,{value:r}=t.allViolations,{currentDetour:a}=pc().value,{value:i}=t.legacyRepresentProductsAsFees,o=qe().merchandiseLines.value,[l]=s(o),c="stockProblems"===a?.type?l:o,u=n?.lines??[],d=e=>i?function(e){return e.filter(e=>!1===e.legacyFee)}(e):e;return function(e,t,n,r){const a=aL(t,r),i=n.filter(({quantity:e,stableId:t})=>e>0&&!a.has(t)),o=oL(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 JT({...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(uL),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(dL).map(t=>pL(t,e.stableId))}}(t,e,r))})}(s?o:i,t,s,e)}(e,"thankYou"===a?.type?[]:d(c),d(u),r??[])}const uL=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}}),dL=e=>Ml(e.discountDetails.discount)&&"LINE"===e.discountDetails.discount.presentationLevel,pL=(e,t)=>({id:`allocation-${t}-${Xi(e.discountDetails.title)}`,discount:e.discountDetails.discount,amount:e.amount});function mL(){const{checkout:e}=ae(),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:gL(e.image)??void 0,totalAmountAfterLineDiscounts:e.priceAfterDiscounts,totalAmountBeforeReductions:e.price,quantity:e.quantity,subtitle:e.variantTitle,lineDiscounts:e.appliedDiscounts.filter(hL).map(e=>fL(e,t)),parentTitle:e.parentTitle,components:[],unitPrice:null,totalPrice:e.priceAfterDiscounts})),r=cL();return[...t?r.filter(e=>e.quantity>0):r,...n]}const hL=e=>"LINE"===e.presentationLevel,gL=e=>e?{...e,altText:e.altText||""}:null,fL=(e,t)=>({id:`allocation-${t}-${Xi(e.title)}`,discount:{type:"applied",title:e.title,presentationLevel:e.presentationLevel},amount:e.amountDiscounted});function yL(){const e=T(mL()),n=ge().remoteMerchandiseDetails,{shop:{id:r}}=ae();return t(()=>{const t=n.value?.stableIdToShopId??new Map,a=t.values(),i=new Map([[r,[]]]);for(const e of a)i.set(e,[]);const o="PurchaseOrderMerchandiseTerms"===n?.value?.mergedBuyerProposalMerchandise?.__typename&&n.value.mergedBuyerProposalMerchandise.merchandiseLines?n.value.mergedBuyerProposalMerchandise.merchandiseLines.map(e=>"PurchaseOrderMerchandiseLine"===e.__typename&&"ProductVariantSnapshot"===e.merchandise.__typename?{key:e.stableId,stableId:e.stableId,id:e.merchandise.variantId??null,image:no(e.merchandise.image),title:e.merchandise.productTitle,subtitle:e.merchandise.title??null,quantity:e.quantity.items,properties:to(e.merchandise.properties),options:e.merchandise.options??[],itemPrice:eo(e.merchandise.price),totalAmountBeforeReductions:eo(e.merchandise.price),totalAmountAfterLineDiscounts:eo(e.merchandise.price),totalPrice:eo(e.merchandise.price),deferredAmount:e.merchandise.deferredAmount?eo(e.merchandise.deferredAmount):void 0,sellingPlan:Zi(e.merchandise.sellingPlan),hideRuntimeExtensions:!0,unitPrice:null,components:[],parentRelationship:null,recurringTotal:void 0,lineDiscounts:[]}:void 0).filter(e=>Boolean(e)):[];for(const n of[...e.value,...o]){if(!n.stableId){i.get(r)?.push(n);continue}const e=t.get(n.stableId);e?i.get(e)?.push({...n,hideRuntimeExtensions:!0}):i.get(r)?.push(n)}return i})}var vL={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 _L=Zc("ResourceList");function bL({children:e,title:t,titleHidden:n,spacing:a="base",border:i="none"}){const o=eu(void 0,_L),s=v(vL.ResourceList,a&&vL.rowGroupSpacingVariant[a],i&&vL.borderVariant[i]),l=t?d(LS,{id:o,children:t}):null,c=r(()=>({spacing:a}),[a]);return d(y,{children:[t&&n?d("div",{className:vL.visuallyHidden,children:l}):l,d(xu,{children:d("div",{role:"table","aria-labelledby":o,className:s,children:d(SL.Provider,{value:c,children:e})})})]})}function PL({children:e,hidden:t,blockPadding:n}){const r=v(vL.ResourceListHeader,n&&!t&&vL.resourceListHeaderBlockPaddingVariant[n]);return d("div",{role:"rowgroup",className:v(vL.ResourceListRowGroup,t&&vL.resourceListHeaderHidden),children:d("div",{role:"row",className:r,children:e})})}function kL({children:e,primary:t,hidden:n}){return d("div",{role:"columnheader",className:v(t?vL.primary:void 0,n&&vL.visuallyHidden),children:e})}const SL=f(void 0);function wL({children:e}){return e?d("div",{role:"rowgroup",className:vL.ResourceListRowGroup,children:e}):null}const CL=f(void 0);function EL({spacing:e,children:t,showLines:n=!0}){const a=r(()=>({spacing:e}),[e]),i=r(()=>({showLines:n}),[n]);return d(SL.Provider,{value:a,children:d(CL.Provider,{value:i,children:t})})}function xL({lineOffset:e=0}){const t=h(CL);
2return d("div",{"aria-hidden":!0,className:vL.ResourceItemLineContainer,style:b({[vL.lineOffsetVar]:ke(e)}),children:[d("div",{className:v(vL.ResourceItemLine,vL.ResourceItemLineVertical,t?.showLines&&vL.visibleLine)}),d("div",{className:v(vL.ResourceItemLine,vL.ResourceItemLineCurved,t?.showLines&&vL.visibleLine)})]})}function IL({alignSelf:e="auto",inlineAlignment:t,children:n,primary:r,hidden:a,minBlockSize:i,noWrap:o}){const{lineItems:s}=th(),l=t??s?.inlineAlignment??"center",{className:c,style:u}=Qm({minBlockSize:i}),p=v(vL.ResourceItemContent,vL.resourceItemContentInlineAlignment[l],e&&vL.resourceItemContentAlignSelf[e],r&&vL.resourceItemContentPrimary,a&&vL.resourceItemContentHidden,o&&vL.resourceItemContentNoWrap,c);return d("div",{role:"cell",className:p,style:u,children:a?d("div",{className:vL.visuallyHidden,children:n}):n})}function AL({children:e,blockPadding:t="none",spacing:n="base",lineOffset:r=0,className:a}){const i=h(SL),o=h(CL);i||console.warn("<ResourceItem /> components must be wrapped in a <ResourceListBody /> component.");const s=v(vL.ResourceItem,t&&vL.resourceItemBlockPaddingVariant[t],i?.spacing&&vL.rowSpacingVariant[i.spacing],n&&vL.resourceItemSpacingVariant[n],o&&vL.groupedResourceItem,a);return d("div",{role:"row",className:s,children:[d(xL,{lineOffset:r}),e]})}var TL={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 LL({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(mh,{size:c,type:o,tone:NL(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(TL.Badge,TL.displayVariant[o?`${i}Grid`:`${i}Flex`],TL.toneColorVariant["auto"===u?"neutral":u][r],TL.sizeVariant[RL(c)],TL.borderRadiusVariant[a],o&&TL.iconVariant,"hidden"===p&&TL.visuallyHidden),"aria-hidden":"hidden"===t||void 0,children:e?d(y,{children:[d("span",{className:TL.visuallyHidden,children:e}),h]}):h})}function NL(e){switch(e){case"accent":case"warning":case"success":return"auto";default:return e}}function RL(e="base"){switch(e){case"small":case"small-100":return"small100";default:return e}}function ML(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 DL({stableId:e,merchandiseLines:t}){if(!e)return null;const n=ML(e,t);if(!n)return null;const{parent:r,index:a}=n;return KT(r,a)}function OL(){const{i18n:e}=ae();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 zL(){const e=OL();return function(t){return t?t.map(e):void 0}}function BL({available:e,name:t,value:n}){const r=`${t}: ${n}`;return"string"==typeof n&&0===n.lastIndexOf("https://cdn.shopify.com",0)?d(ry,{href:n,children:d(VL,{condition:e,children:d(Jf,{size:"small",color:"subdued",children:t})})}):d(VL,{condition:e,children:d(Jf,{size:"small",color:"subdued",children:r})})}function VL({condition:e,children:t}){return!1===e?d(Jf,{type:"redundant",children:t}):t}function FL({properties:e,available:t}){const n=e.flatMap(({name:e,visible:n,value:r,sourceType:a})=>n&&"MerchandisePropertyValueJson"!==a&&""!==r&&null!==r?[d(qf,{accessibilityRole:"list-item",children:d(BL,{available:t,name:e,value:r})},e)]:[]);return n.length>0?d(iy,{accessibilityRole:"unordered-list",gap:"small-400",children:n}):null}function UL({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={}}}=th(),w=r(()=>e&&!v?{stableId:e}:null,[e,v]),C=u??"small",E=k.size??"small",{i18n:x}=ae(),I=a&&a.length>0,A="middot"===P?" · ":", ",T=OL(),{value:L}=ge().merchandiseLines,N=pc(),R=Qw(t(()=>"thankYou"===N.value.currentDetour?.type?"Checkout::ThankYou::CartLineDetails::RenderAfter":"Checkout::CartLineDetails::RenderAfter").value),M=function({stableId:e,merchandiseLines:t}){const n=DL({stableId:e,merchandiseLines:t});return!n?.variantId}({stableId:e,merchandiseLines:L?.lines??[]})?[]:R,D={size:E,color:_},O={size:E,color:_};return d(qf,{className:"dDm6x",children:[f||y?d(iy,{direction:"inline",gap:"small-300",children:[f?d(Jf,{size:"small",color:"subdued",children:f}):null,y?d(LL,{icon:"alert-circle",tone:"critical",children:x.translate("order_summary.unconfirmed_label")}):null]}):null,d(ZE,{size:C,children:[d(qL,{condition:"bold"===S.weight,children:c}),h]}),d(iy,{children:[g,"inline"===b&&l?d(ZE,{...O,children:l}):null,"inlineDescriptionList"===b&&I?d(ZE,{...O,children:a?.map(({name:e,value:t})=>`${e}: ${t}`).join(A)}):null,"descriptionList"===b&&I?d(qf,{accessibilityRole:"unordered-list",children:a?.map(({name:e,value:t})=>d(qf,{accessibilityRole:"list-item",children:d(Jf,{...D,children:`${e}: ${t}`})},e))}
2):null,s?.name?d(ZE,{...O,children:s.name}):null,o&&o.fixedPrice&&o.fixedPriceCount?d(ZE,{...O,children:T(o)}):null,i&&d(FL,{properties:i}),m,w?d(iT,{customizations:M,options:w}):null]})]})}function qL({condition:e,children:t}){return e?d(Jf,{type:"strong",children:t}):t}function jL(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 HL=w({displayName:"ProductDisclosuresDetails",load:()=>C(()=>fl(()=>import("./7d468a18.B6GjLA7W.js"),__vite__mapDeps([205,1,2,3,4,5,7,8,9,10,11,12]))),suspense:!1});var $L={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 YL=nh(function({source:e,src:t,srcSet:n,sizes:r,alt:a="",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}){const k=["presentation","none"].includes(u),{className:S}=Qm({...Re({border:p,borderStyle:h,borderWidth:g}),borderRadius:m,objectFit:o}),w=Pw(t,e),C=!(t||e||n),E=t??kw(e)??n??"data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",[x,I]=s(C);i(()=>{if(!C)return void I(!1);const e=setTimeout(()=>I(!1),100);return()=>{clearTimeout(e)}},[C]);const{animationEnabled:A,delay:T,onAnimationStart:L,onAnimationIteration:N}=Nw(),R=P?{onError:e=>P(e.nativeEvent)}:{};return d(WL,{condition:k,children:d(GL,{condition:"auto"!==_,aspectRatio:c,children:d(_w,{condition:Boolean(w),children:[w,d("img",{...R,src:E,srcSet:n,sizes:r,className:v($L.Image,$L.inlineSizeVariant[_],C&&A&&$L.skeleton,C&&x&&$L.hidden,S,f),style:{...b({[$L.vars.animationDelay]:`${T}ms`,[$L.vars.animationDuration]:"4000ms"})},onAnimationStart:L,onAnimationIteration:N,loading:l,id:y,role:k?u:void 0,alt:k?"":a,"aria-hidden":C?"true":void 0})]})})})});function WL({children:e,condition:t}){return t?d(qf,{accessibilityVisibility:"hidden",children:e}):d(y,{children:e})}function GL({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($L.Wrapper,$L.aspectRatio),style:b({[$L.aspectRatioVar]:`${r}`}),children:e}):d(y,{children:e})}const JL={small:16,large:24};function KL({disclosure:e,size:t}){const n=e.symbol;if(n){const e=`${JL[t]}px`,r="small"===t?"":n.altText??"";return d(qf,{inlineSize:e,blockSize:e,children:d(YL,{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(mh,{type:"info",size:"small"===t?"small":"large-100",tone:"auto"})}const QL=Zc("product-disclosure-modal-"),XL=Zc("product-disclosure-tooltip-");function ZL({disclosures:e,title:n}){const r=he(),a=Jx("deliveryNext");return t(()=>!a.value&&(0===r.initialUnresolvedFields.value.size||"fetch_failed"===r.pendingFieldsNegotiation.value?.status)).value&&e?.length?d(eN,{disclosures:e,title:n}):null}function eN({disclosures:e,title:t}){const{i18n:n}=ae(),r=eu(void 0,QL),a=eu(void 0,XL),i=HL.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(ry,{commandFor:r,interestFor:a,accessibilityLabel:l,onFocus:o,onMouseEnter:o,textDecoration:"none",tone:"monochrome",verticalAlign:"text-bottom",children:d(mh,{type:"alert-triangle",size:"small"})}),d(ym,{id:a,children:tN(e)}),d(Mx,{id:r,heading:s,children:d(HL,{disclosures:e})})]})}function tN(e){return d(qf,{inlineAlignment:"start",children:d(iy,{gap:"small-200",children:e.map(e=>d(sh,{gridTemplateColumns:"auto minmax(0, 1fr)",gap:"small-200",children:[d(sh,{blockSize:"1lh",placeItems:"center",children:d(KL,{disclosure:e,size:"small"})}),d(ZE,{textAlign:"start",children:e.title})]},e.id))})})}function nN({amount:e}){const{i18n:t}=ae();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(ZE,{type:"small",color:"subdued",children:r})}const rN=f(null);var aN="_1mwdekd1 _1mwdekd0 _1fragem126 _1fragemzg _1fragem5u";function iN({children:e,id:t}){const{onToggle:n,isOpen:r,contentId:a}=h(rN)??{};return e?void 0!==r?d("button",{id:t,className:aN,onClick:n,"aria-controls":a,"aria-expanded":r,type:"button",children:[e,d(mh,{size:"small-200",type:r?"chevron-up":"chevron-down",className:"_1mwdekd3 _1mwdekd2 _1fragem6e"})]}):d("p",{id:t,className:aN,children:e}):null}
2const oN=Zc("Details"),sN=function(e){const t=_(function(t,r){const{open:a,defaultOpen:o=!1,onToggle:l,id:c}=t,{upsertInteraction:u,deleteInteraction:p}=Kd(),[m,h]=s(o),g=a??m,f=n(()=>{const e=g?"open":"closed",t=g?"closed":"open";void 0===a&&h(!g),l?.(e,t)},[g,l,a]),y=n(()=>{g&&(void 0===a&&h(!1),l?.("open","closed"))},[g,l,a]),v=n(()=>{g||(void 0===a&&h(!0),l?.("closed","open"))},[g,l,a]);return i(()=>()=>{c&&p(c)},[c]),i(()=>{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===a?{...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:i,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=`${eu(l,oN)}-content`,v=a(),_=n(e=>{e?.preventDefault();const t=e=>{"function"==typeof i&&i(e?"open":"closed",e?"closed":"open")};m?t(f):g(e=>(t(e),!e))},[m,f,i]);(!u||Array.isArray(u)&&u.length<1)&&console.warn("Details: content is required for toggle functionality");const b="string"==typeof c?d(iN,{children:c}):c,P=r(()=>({isOpen:f,onToggle:_,contentId:y}),[y,_,f]);return d(rN.Provider,{value:P,children:d("div",{id:l,children:[b,d(Bd,{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 lN({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:N}){const R=Md(),{Element:M,role:D}=oh(t,{defaultElement:R?"span":"div"}),{className:O,style:z,styleElement:B}=Qm({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:N},{transforms:{display:Cd}});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",O),id:_,role:D,style:z,children:m})]})}const cN={auto:"block",inline:"inlineBlock",block:"block"},uN=e=>"auto"===e?"auto":e in Em?Em[e]:void 0,dN=e=>cN[e];function pN({blockSize:e="auto",display:t="auto",inlineSize:n="auto",id:r}){const{className:a,style:i}=Qm({blockSize:e,display:t,inlineSize:n},{transforms:{blockSize:uN,display:dN,inlineSize:uN}});return d("div",{className:v(a),id:r,style:i})}function mN({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}=ae(),{lineItems:{optionsColor:p="subdued"}}=th(),m={size:"small",color:p},h=Qw("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(iy,{gap:"base",overflow:"hidden",children:[d(iT,{customizations:h,options:f}),t.map(({stableId:e,merchandise:t})=>d(Jf,{size:"small",children:[t.title," ",d(ZL,{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(sN,{open:i,onToggle:l,summary:d(iN,{children:d(Jf,{color:"subdued",size:"small",children:v})}),content:d(qf,{paddingBlockStart:"small-400",children:d(iy,{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=jL(u,r);return d(sh,{accessibilityRole:"list-item",gridTemplateColumns:"auto minmax(0, 1fr)",gap:"small-300",children:[d(lN,{alignSelf:"start",children:d(Cw,{size:"small",src:p?.one,srcSet:p?`${p.one} 1x, ${p.two} 2x, ${p.four} 4x`:void 0,alt:r?.altText})}),d(lN,{alignSelf:"center",children:d(iy,{children:[d(Jf,i?.length?{size:"small",children:[l," ",d(ZL,{disclosures:i,title:t})]}:{size:"small",children:l}),n&&d(Jf,{...m,children:n}),a&&d(Jf,{...m,children:a.name}),s&&d(FL,{properties:s})]})})]},e)})})})}),d(pN,{blockSize:"small-400"})]})}function hN({parentTitle:e}){const{i18n:t}=ae(),{lineItems:{optionsColor:n}}=th(),r={type:"small",color:n??"subdued"},a=t.translate("order_summary.group_title_label",{group_title:e});return d(ZE,{...r,children:a})}function gN(e){return!0===e.checkoutHideZeroValueDiscountLines}function fN({discount:e,amount:t}){const{i18n:n,shop:r}=ae();if(gN(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(sh,{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(mh,{type:"discount",size:"small"}),d(Jf,{accessibilityVisibility:"exclusive",children:n.translate("order_summary.discount_code_aria_text")}),d(ZE,{type:"small",color:"subdued",children:[d(Jf,{dir:"auto",children:i}),a?` ${a}`:null]})]},e.title)}function yN({totalAmountBeforeReductions:e,totalAmountAfterDiscounts:t,size:n}){const{i18n:r}=ae(),a=t.amount>0?r.formatCurrency(t.amount,{currency:t.currencyCode,form:"short"}):d(Jf,{letterCase:"uppercase",children:r.translate("order_summary.free_total_label")});return d(y,{children:[d(Jf,{accessibilityVisibility:"exclusive",children:r.translate("order_summary.original_price")}),d(Jf,{size:"small",color:"subdued",type:"redundant",children:r.formatCurrency(e.amount,{currency:e.currencyCode,form:"short"})}),d(Jf,{accessibilityVisibility:"exclusive",children:r.translate("order_summary.price_after_discount_aria_text")}),d(ZE,{size:n,children:a})]})}function vN({totalAmountBeforeReductions:e,totalAmountAfterLineDiscounts:t,compareAtTotal:n,presentationLevel:r,hasDeferredAmount:a,hasFailed:i,size:o}){const{i18n:s}=ae(),{lineItems:{priceTypography:l={}}}=th();let c;if(i?c="redundant":"bold"===l.weight&&(c="strong"),n&&e.amount<n.amount)return d(yN,{totalAmountAfterDiscounts:t,totalAmountBeforeReductions:n,size:o});if(e.amount>t.amount&&"LINE"===r)return d(yN,{totalAmountAfterDiscounts:t,totalAmountBeforeReductions:e,size:o});const u=0===e.amount&&!a,p=t;return d(Jf,{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 _N({unitPrice:e}){const t=function(e){const{i18n:t}=ae(),r=function(){const{i18n:e}=ae();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(ZE,{type:"small",color:"subdued",children:t})}function bN({unitPrice:e,itemPrice:t,quantity:n}){const r=ge().buyerIdentity.value?.purchasingCompany,a=Boolean(r)&&!e&&n>1&&t,{i18n:i}=ae();return e?d(_N,{unitPrice:e}):a?d(y,{children:d(ZE,{type:"small",color:"subdued",children:[d(Jf,{accessibilityVisibility:"hidden",children:i.translate("order_summary.price_per_item.label",{price:i.formatCurrency(t.amount,{currency:t.currencyCode,form:"short"})})}),d(Jf,{accessibilityVisibility:"exclusive",children:i.translate("order_summary.price_per_item.accessibility_label",{price:i.formatCurrency(t.amount,{currency:t.currencyCode,form:"short"})})})]})}):null}const PN={small200:"small-200",small100:"small",base:"base",large100:"large",large200:"large-200"};function kN(e="base"){return PN[e]}function SN(e){const t=e.parentRelationship;return d(t?EL:y,{spacing:"small100",children:d(wN,{...e})})}function wN({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:N,embed:R}=ae(),M=jL(R,g),{lineItems:{quantityVisibility:D="visible",priceLayout:O="inline",priceTypography:z={},titleTypography:B={}},merchandiseThumbnail:{size:V}={}}=th(),F=L.hasFlagEnabled(ro),U=null!==C,q=F&&a?{amount:a.amount*t,currencyCode:a.currencyCode}:null,j=r(()=>{if(F&&a&&n){const e=(a.amount-n.amount)*t;return e>0?{amount:e,currencyCode:a.currencyCode}:null}return null},[F,a,n,t]),H=z.size,$=U?"small":kN(V),Y=B.size??"base",{blockSize:W}=Tw($),G="hidden"===D||1===t&&"visibleWhenMultiple"===D?void 0:t,J=A?null:d(vN,{totalAmountBeforeReductions:b,totalAmountAfterLineDiscounts:P,compareAtTotal:q,presentationLevel:o.length||j?.amount?"LINE":"CART",hasDeferredAmount:Boolean(s?.amount),hasFailed:x,size:H});return d(AL,{className:T,lineOffset:C?0:W/2,children:[d(IL,{inlineAlignment:"start",children:d(Cw,{size:$,src:M?.one,srcSet:M?`${M.one} 1x, ${M.two} 2x, ${M.four} 4x`:void 0,alt:g?.altText,totalItems:G})}),d(IL,{primary:!0,alignSelf:"baseline",minBlockSize:`${W}px`,children:d(UL,{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(ZL,{disclosures:v,title:m})]}):void 0,blockLayoutContent:"block"===O?J:void 0,remoteShopName:E,hasFailed:x,hideRuntimeExtensions:I,children:[_?d(Jf,{size:"small",color:"subdued",children:N.translate("payment.shop_pay_hsa.eligible_product")}):null,S?d(Jf,{size:"small",color:"subdued",children:N.translate("amazon_pay.prime_returnability")}):null,d(bN,{unitPrice:i,itemPrice:n,quantity:t}),j?.amount?d(nN,{amount:j}):null,o.length>0||k.length>0?d(y,{children:[o.map(e=>d(fN,{discount:e.discount,amount:e.amount},e.id)),d(mN,{components:k,id:e})]}):null,k.length<1&&w?d(hN,{parentTitle:w}):null]})}),d(IL,{hidden:!0,children:d(Jf,{children:t})}),"inline"===O?d(IL,{alignSelf:"baseline",children:d(qf,{className:"VnYYd",inlineAlignment:"end",children:J})}):null]})}function CN(e){switch(e){case"PICK_UP":return"kAxbv";case"SHIPPING":return"KKoGf";default:return}}function EN(e){return e!==De.Country&&e!==De.CountryProvince}function xN({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 IN(e,t,n,r,a){const i=Pv(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 AN(e){const t=[],n=[];return e.forEach(e=>{"SUBSCRIPTION"===e.type?t.push(e):n.push(e)}),{subscriptionLines:t,oneTimePurchaseLines:n}}function TN(e,t,n){const r=Pv(t,e.handle);let a;return r&&r.minDeliveryDateTime&&r.maxDeliveryDateTime&&n&&(a=r),{deliveryExpectation:a,shopPromise:r?.brandedPromise}}function LN(e){return e.reduce((e,{quantity:t})=>e+t,0)}function NN(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 RN(e){if(!e)return[];const t=e.reduce((e,t)=>{const n=t?.flatRateGroupId??ao(),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 MN(e,t){const n=a(null),r=a(new Set),i=new Set(e),o=n.current,s=null==t?null:new Set(t);if(null!=o){for(const e of i)o.has(e)||null!=s&&!s.has(e)||r.current.add(e);for(const e of r.current)i.has(e)||r.current.delete(e)}return n.current=i,r.current}const DN={position:"end",source:"magnify"};function ON({hasFilter:e,maxItems:t,merchandiseLines:n,totalLineQuantities:a,deliveryGroup:i}){const[o,l]=s(""),{i18n:c,checkout:u}=ae(),p=new Set(oo(u.proposal.negotiated.fields.paymentMethods.value)),m=void 0===t?n.map(e=>e.key):n.slice(0,t).map(e=>e.key),h=MN(n.map(e=>e.key),m),g=CN(i),{value:f}=oi(),{value:v}=ge().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!==io)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(fA,{autoFocus:!0,icon:DN,controlledValue:o,onInput:e=>l(e),label:c.translate("order_summary.more_items_modal.search_item")}),d(pN,{blockSize:"large-300"})]}),e&&o&&d(y,{children:[d(iy,{direction:"inline",justifyContent:"space-between",children:[d(Jf,{color:"subdued",children:c.translate("order_summary.more_items_modal.number_items_shown",{shownNumber:P,totalNumber:a||k||0})}),d(ry,{onClick:()=>l(""),children:c.translate("order_summary.more_items_modal.clear_search")})]}),d(pN,{blockSize:"large-300"})]}),e&&0===b.length?d(iy,{direction:"inline",justifyContent:"center",gap:"small-400",padding:"none none large-300 none",children:[d(qf,{inlineSize:"56px",children:d(mh,{size:"fill",type:"alert-circle"})}),d(ZE,{textAlign:"center",children:c.translate("order_summary.more_items_modal.empty_results",{searchText:o})})]}):d(bL,{title:c.translate("order_summary.shopping_cart_label"),titleHidden:!0,children:[d(PL,{hidden:!0,children:[d(kL,{hidden:!0,children:c.translate("order_summary.product_image_label")}),d(kL,{hidden:!0,children:c.translate("order_summary.description_label")}),d(kL,{hidden:!0,children:c.translate("order_summary.quantity_label")}),d(kL,{hidden:!0,children:c.translate("order_summary.price_label")})]}),d(wL,{children:b.map(({key:e,...n},r)=>{if(void 0!==t&&r>=t)return null;const a=e.substring(0,e.lastIndexOf("-"));return d(SN,{...n,isHsaEligible:Boolean(n.productId&&p.has(n.productId)),..._[a]??{},className:h.has(e)?g:void 0},e)})})]})]})}function zN({merchandiseLines:e,modalId:t="merchandise-lines-modal",totalLineQuantities:n,deliveryGroup:r}){const{i18n:a}=ae(),i=e.length,o=i>16?12:16;return d(y,{children:[d(ON,{maxItems:o,merchandiseLines:e,totalLineQuantities:n,deliveryGroup:r}),i>o&&d(iy,{direction:"inline",gap:"base",justifyContent:"center",padding:"large-100 none none none",children:[d(Zf,{inlineAlignment:"center",commandFor:t,children:a.translate("order_summary.view_all_items",{count:n||i||0})}),d(Mx,{id:t,heading:a.translate("order_summary.number_items",{count:n||i||0}),blockSize:"100%",children:d(ON,{hasFilter:!0,merchandiseLines:e,totalLineQuantities:n})})]})]})}function BN({merchandiseLinesByDeliveryType:e}){const{i18n:n}=ae(),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(iy,{gap:"large-200",children:d(H,{each:r,getKey:e=>e.group,children:({group:e,merchandiseLines:t,totalLineQuantities:n})=>d(iy,{gap:"base",children:[d(LS,{level:2,children:a(e)}),d(zN,{merchandiseLines:t,modalId:i(e),totalLineQuantities:n,deliveryGroup:e})]})})})}function VN({merchandiseLinesByShop:e,totalLineQuantities:t}){const{i18n:n,shop:{id:a,name:o,remoteShopsConfigMap:s},observability:l}=ae(),c=new Map,u=e.get(a)??[],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!==a),[e,a]),h=m.filter(([e])=>!s?.get(e)?.name).map(([e])=>e),g=h.length>0,f=h.join(",");i(()=>
2{0!==h.length&&l.error(new UN("Missing remote shop names",{metadata:{shopIdsWithMissingNames:h}}))},[f,l]);const y=g||m.length>1,v=r(()=>m.flatMap(([e,t])=>t.map(t=>({...t,...y?{remoteShopName:s?.get(e)?.name}:{}}))),[m,y,s]);if(0===v.length)l.error(new FN);else{const e=g||p?n.translate("order_summary.from_other_stores_heading"):n.translate("order_summary.from_multiple_stores_heading"),t=y?e:n.translate("order_summary.from_shop_heading",{shop_name:s.get(m[0][0]).name});c.set(t,{lines:v,includeTotalLineQuantities:!1})}return d(iy,{gap:"large-200",children:Array.from(c.entries()).map(([e,{lines:n,includeTotalLineQuantities:r}])=>d(iy,{gap:"base",children:[d(LS,{level:2,children:e}),d(zN,{merchandiseLines:n,totalLineQuantities:r?t:void 0})]},e))})}class FN extends gl{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 UN extends gl{constructor(){super(...arguments),this.name="MissingRemoteShopNamesError",this.defaultGroupingHash="missing_remote_shop_names"}}const qN=["PICK_UP","SHIPPING","NOT_REQUIRED"];function jN(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 HN(e){return jN(e.deliveryMethodTypes)}function $N(e){if("not_required"===e.status)return"NOT_REQUIRED";const t=e.methods.find(({handle:t})=>t===e.selectedDeliveryMethodHandle);return jN(t?[t.methodType]:e.methods.map(({methodType:e})=>e))}function YN(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 WN="PP6CV",GN=Zc("CollapsibleLineItems"),JN=e=>d(HT,{children:e}),KN=E(function(){const e=T(mL()),n=yL(),{i18n:r,shop:{id:a}}=ae(),i=pc(),{lineItems:{priority:o="base",blockPadding:s,quantityVisibility:l="visible",sectionLayout:c="fixed"},merchandiseThumbnail:{shadow:u}={}}=th(),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=Qw(f.dynamicRender,"ORDER_SUMMARY1"),v=Qw(f.dynamicRender,"ORDER_SUMMARY2"),_=Qw(f.cartLinesRenderAfter),b=t(()=>Array.from(n.value.values()).reduce((e,t)=>e+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=lI(),n=pc(),r=T(mL()),a=qe(),i=a.deliveryLines,o=a.merchandiseLines,{deliveryNext:s,merchandiseLines:l}=ge();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=YN(n,t);a&&r.set(e.stableId,a)}),r.size>0&&t.set(n.stableId,{parentStableId:e.stableId,componentsByParentAllocationStableId:r})}return t}(l.value?.lines,o.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(i.value.flatMap(e=>e.value.targetMerchandiseLines??[]).some(e=>{const t=c.get(e.stableId)?.parentStableId??e.stableId;return u.has(t)})&&!Cv(n.value.currentDetour))for(const e of i.value){const t=HN(e.value);for(const n of e.value.targetMerchandiseLines??[])if(!f(t,n))return a}else if("unavailable"!==s.value?.status)for(const e of s.value?.lines??[]){const t=$N(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;
2if(t.some(({key:e})=>!p.has(e)))return a;const v=new Map;for(const e of qN){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,E=d(XI,{bleed:g,overflow:"auto hidden",maxBlockSize:"@media (inline-size >= medium) 40vh, none",padding:p?"none":"none none small-500 none",hint:{type:"pill",content:r.translate("order_summary.scroll_order_summary")},accessibilityRole:"section",accessibilityLabel:r.translate("order_summary.shopping_cart_label"),children:d(x,{when:P,fallback:d(x,{when:w,fallback:d(zN,{merchandiseLines:e.value,totalLineQuantities:b.value}),children:d(BN,{merchandiseLinesByDeliveryType:S})}),children:d(VN,{merchandiseLinesByShop:n.value,totalLineQuantities:b.value})})});return d(x,{when:k,children:d(iy,{gap:"large-200",children:[d(iT,{customizations:y,render:JN}),d(HT,{children:C?d(QN,{merchandiseLines:e.value,showQuantityBadges:m,children:E}):E}),d(iT,{customizations:_,render:JN}),d(iT,{customizations:v,gap:"large-200",render:JN})]})})});function QN({children:e,merchandiseLines:t,showQuantityBadges:n}){const r=m(!0),{i18n:a}=ae(),{size:i}=th().merchandiseThumbnail??{},o=kN(i),s=a.translate("order_summary.number_items",{count:t.reduce((e,t)=>e+t.quantity,0)}),l=eu(void 0,GN),{blockSize:c}=Tw(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(Jf,{children:s}),h=e=>d(sh,{gridTemplateColumns:"minmax(0, 1fr) max-content",alignItems:"start",gap:"base",inlineSize:"100%",children:[d(qf,{minInlineSize:"0",overflow:"hidden",children:e}),d(iy,{direction:"inline",alignItems:"center",gap:"small-300",children:[p(),d(mh,{type:"chevron-down",size:"small-100"})]})]}),g=()=>d(iy,{direction:"inline",alignItems:"center",justifyContent:"space-between",inlineSize:"100%",children:[p(),d(mh,{type:"chevron-up",size:"small-100"})]});return d(qf,{position:"relative",minBlockSize:`${c}px`,children:[d(Bd,{id:`${l}-expanded-content`,open:!r.value,renderChildrenWhenCollapsed:!0,duration:"base",properties:["height","opacity"],children:d(iy,{gap:"base",children:[d("div",{"aria-hidden":"true",children:g()}),d("div",{id:l,children:e})]})}),d(Bd,{id:`${l}-thumbnails`,open:r.value,duration:"base",properties:["height","opacity"],children:d("div",{"aria-hidden":"true",children:h(d(XN,{thumbnailMerchandise:u,thumbnailSize:o,showQuantityBadges:n}))})}),d("div",{className:"tndLB",children:[d("div",{"aria-hidden":"true",className:"anPJT",children:[d(Bd,{id:`${l}-expanded-toggle-size`,open:!r.value,duration:"base",properties:["height"],children:g()}),d(Bd,{id:`${l}-collapsed-toggle-size`,open:r.value,duration:"base",properties:["height"],children:h(d("div",{className:WN,children:d(RI,{variant:"inline-discrete",merchandise:u.slice(0,1),size:o,max:1,useImageAltTexts:!1,showQuantityBadges:n})}))})]}),d("div",{className:"vv9lW",children:d(rh,{accessibilityLabel:s,"aria-controls":l,"aria-expanded":!r.value,blockSize:"100%",inlineSize:"100%",onClick:()=>{r.value=!r.value}})})]})]})}function XN({thumbnailMerchandise:e,thumbnailSize:t,showQuantityBadges:n}){const{ref:r,max:a}=GT(t);return d("div",{ref:r,className:WN,children:d(RI,{variant:"inline-discrete",merchandise:e,size:t,max:a.value,useImageAltTexts:!1,showQuantityBadges:n})})}function ZN(){const e=a();return i(()=>()=>{const t=e.current;t&&El.containers.delete(t)},[]),t=>{t&&(e.current&&El.containers.delete(e.current),El.containers.add(t),e.current=t)}}const eR=f({spacing:"auto"});function tR({spacing:e,children:t}){const n=r(()=>({spacing:e}),[e]);return d(eR.Provider,{value:n,children:t})}function nR(){return h(eR)}var rR={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"},aR={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 iR(e){return"children"in e&&fw(e.children)}function oR(e){const{spacing:t}=nR(),{moneyLines:{color:n="base"}}=th(),{itemSize:r="inherit",layout:a="inherit",color:i}=e,o=i??n,s=v(aR.MoneyLine,r&&aR.itemSizeVariant[r],t&&rR.groupSpacingVariant[t],a&&aR.layoutVariant[a]);return d("div",{className:s,role:"row",children:iR(e)?e.children:d(y,{children:[d(sR,{children:d(Jf,{color:e.labelColor,children:e.label})}),d(lR,{loading:e.loading,children:e.loading?d(Bw,{size:e.size,emphasis:"strong"===e.type?"bold":void 0,children:e.value}):d(Jf,{type:e.type,size:e.size,translate:!1,color:o,children:e.value})})]})})}function sR({children:e}){return d("div",{className:aR.Header,role:"rowheader",children:e})}function lR({children:e,loading:t,colSpan:n}){return d("div",{className:n?aR.contentColSpan:aR.Content,role:"cell","aria-busy":t||void 0,"aria-colspan":n,children:e})}const cR=Zc("MoneyLine-Heading"),uR=_(function(e,t){const{children:n,title:r,titleHidden:a=!0,spacing:i="auto"}=e,o=eu(void 0,cR),s=id(),{moneyLines:{color:l="base"}}=th(),c=d(LS,{id:o,children:r});return d(y,{children:[a?d("div",{className:rR.visuallyHidden,children:c}):c,d("div",{role:"table","aria-labelledby":o,children:[d("div",{role:"rowgroup",className:rR.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(rR.MoneyLines,rR.colorVariant[l],rR.spacingVariant[i]),ref:t,children:n})]})]})});function dR({condition:e,children:t,skeletonContent:n,...r}){return d(y,{children:[d(Bw,{...r,delay:!1,display:e?r.display??"auto":"none",children:n??t},"skeletonTextKey"),d(Jf,{...r,display:e?"none":r.display??"auto",children:t},"textKey")]})}function pR(){const{i18n:e}=ae(),n=ge().alternativePaymentCurrency,r=kn("alternativePaymentCurrency"),{hasNegotiatedAlternativePaymentCurrencySignal:a}=Je(),i=t(()=>{const t=n.value,i=r.value;if(t||i&&a.value)return{loading:i,text:t&&e.translate("order_summary.alternative_payment_currency_total",{amount_due:e.formatCurrency(t.totalWithoutGiftCards.amount,{currency:t.totalWithoutGiftCards.currencyCode,form:"explicit"})})}});return d(x,{when:i,children:({loading:e,text:t})=>d(oR,{children:d(lR,{children:d(dR,{condition:e,size:"small",color:"subdued",children:e?"$0.00":t})})})})}function mR({children:e}){return"function"==typeof e?e():e}function hR({children:e}){let t,n;return $.forEach(e,e=>{var r;Y(e)&&(t||void 0===e.props.condition?n||e.type!==mR||(n=e):("function"==typeof(r=e.props.condition)?r():r)&&(t=e))}),t??n??null}hR.When=function({children:e}){return"function"==typeof e?e():e},hR.Fallback=mR;const gR=Zc("TaxesTooltip");function fR({label:e,subdueText:t}){const{i18n:n,source:r}=ae(),a=eu(void 0,gR);return d(y,{children:[d(Jf,{color:t?"subdued":void 0,children:e}),d(mh,{type:"question-circle",size:"small",interestFor:a,accessibilityLabel:n.translate("tooltip.accessibility_label_context",{context:e})}),d(ym,{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 yR({totalTax:e,showMoneyLineTaxesTooltip:t,loading:n=!1,taxesLabel:r,hasLandedCostDetails:a=!1,subdueText:i}){const{i18n:o}=ae(),s=i?"subdued":void 0;return d(oR,{color:s,children:[d(sR,{children:d(hR,{children:[d(hR.When,{condition:Boolean(r),children:d(Jf,{color:s,children:r})}),d(hR.When,{condition:Boolean(a),children:d(Jf,{color:s,children:o.translate("order_summary.taxes_label")})}),d(hR.Fallback,{children:d(iy,{direction:"inline",alignItems:"center",gap:"small-300",children:d(fR,{label:o.translate("order_summary.estimated_taxes_label"),subdueText:i})})})]})}),d(lR,{children:d(iy,{direction:"inline",gap:"small-200",children:[t?d(iy,{direction:"inline",alignItems:"center",gap:"small-300",children:[d(fR,{subdueText:i,label:o.translate("order_summary.estimated_taxes_label_short")}),d(Jf,{color:s,children:"â¢"})]}):null,d(dR,{condition:n,color:s,children:n?"$0.00":o.formatCurrency(e.amount,{currency:e.currencyCode,form:"short"})})]})})]})}const vR={marginTop:"0"};function _R({id:e,title:t,subdueTitle:n,tooltipText:r,children:a,item:i,hideHeaderItemWhenOpen:o=!1,defaultOpen:s=!1}){const{i18n:l}=ae(),c=m(s);return d(y,{children:[d(oR,{children:[d(sR,{children:d(iy,{direction:"inline",gap:"small-200",alignItems:"center",children:[d(rh,{"aria-expanded":c.value,"aria-controls":`recurring-totals-collapsible-${e}`,onClick:()=>{c.value=!c.value},children:d(sh,{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(ZE,{color:n?"subdued":void 0,textAlign:"start",children:t}),d(mh,{type:c.value?"chevron-up":"chevron-down",size:"small-200"})]})}),r?d(rh,{accessibilityLabel:l.translate("tooltip.accessibility_label_context",{context:t}),overlay:d(ym,{children:r}),children:d(mh,{type:"question-circle",size:"small"})}):null]})}),!i||o&&c.value?null:i]}),d("div",{style:vR,children:d(Bd,{open:c.value,id:`recurring-totals-collapsible-${e}`,children:a})})]})}function bR(){const{checkout:e}
2=ae(),n=ge().taxes,r=so();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 PR(){const{i18n:e}=ae(),n=bR();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 kR({label:e}){return d(tR,{spacing:"small-500",children:d(oR,{children:[d(sR,{children:d(ZE,{color:"subdued",children:d(rA,{children:e})})}),d(lR,{})]})})}function SR({taxesIncluded:e,variant:n,shopId:r}){const{i18n:a}=ae(),i=lo(),{localTotalTaxIncluded:o,totalTaxIncluded:s}=bR().value,l=PR(),c=co(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(kR,{label:t})}return e&&null!==s&&null!==l.value&&0!==s.amount?"card"===n?d(qf,{children:d(ZE,{color:"subdued",children:d(rA,{children:l})})}):d(x,{when:p,fallback:d(kR,{label:l.value}),children:d(_R,{id:"included-tax-money-line",title:l.value,children:d(tR,{spacing:"small-400",children:d(H,{each:u,getKey:([e])=>e,children:([,e])=>d(yR,{totalTax:e.totalTax,taxesLabel:e.shopName,showMoneyLineTaxesTooltip:"available_total"===e.status,subdueText:!0})})})})}):null}function wR({title:e,value:t,color:r,labelColor:a}){const i=function(){const{i18n:e}=ae();return n(t=>e.formatCurrency(t.amount,{currency:t.currencyCode,form:"short"}),[e])}();return d(oR,{label:e,value:i(t),color:r,labelColor:a})}function CR({variant:e,shopId:n}){const r=ge(),{value:a}=r.deferredTotal,i=pt(),{checkout:o}=ae(),s=uo(),l=t(()=>s.value||Boolean(o.proposal.facts.taxesIncluded)),{value:c}=r.paymentFlexibilityPaymentTermsTemplate,u=a&&a.amount.amount>0,p=wi(),m=xI(),h=t(()=>Boolean(p.value&&!m.value)),g=function(e,t){const{i18n:n}=ae(),r=vI();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||(c?.dueDate?new Date(c.dueDate):null),"FULFILLMENT"===c?.type);return!u||i.value?null:d(y,{children:["card"===e?d(qf,{background:"subdued",padding:"small-300",borderRadius:"small",children:d(wR,{title:g,value:a.amount,color:"subdued",labelColor:"subdued"})}):d(tR,{spacing:"small-300",children:d(wR,{title:g,value:a.amount})}),"card"!==e&&d(x,{when:h,children:()=>d(SR,{taxesIncluded:l.value,shopId:n})})]})}const ER=Zc("ShippingTooltip");function xR({defaultPolicy:e}){const{i18n:t,embed:n,shop:{merchantPolicies:r}}=ae(),a=eu(void 0,ER),i="shipping-policy",o=t.translate("shop_policies.shipping_policy"),{localPolicies:s}=Li(),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 _r(n?.embedder)?c.url?d(rh,{accessibilityLabel:u,"aria-haspopup":"dialog",onClick:()=>n?.client?.windowOpenRequest(c.url),children:d(mh,{type:"question-circle",size:"small"})}):null:d(y,{children:[d(rh,{accessibilityLabel:u,commandFor:a,children:d(mh,{type:"question-circle",size:"small"})}),d(MA,{id:a,defaultPolicy:c})]})}function IR(e){return e.reduce((e,{total:t})=>e+(t?.amount||0),0)}function AR({checkout:e}){return e.proposal.facts.requiresShipping??!0}function TR({size:e,strong:t=!0}){const{i18n:n}=ae(),r=t?"strong":void 0;return d(y,{children:[d(Jf,{size:e,type:r,accessibilityVisibility:"hidden",children:n.translate("shipping.included_rate_label")}),d(Jf,{type:r,accessibilityVisibility:"exclusive",children:n.translate("shipping.included_rate_accessibility_label")})]})}function LR({moneyLines:e,deliveryLoading:t,appearance:n,emphasis:r,included:a,shouldConsolidateRateGroupMax:i,getRateGroupMaxKey:o,getLinePrice:s,getPriceLetterCase:l}){const{i18n:c,shop:u}=ae(),p=u.hasFlagEnabled(mo),m=e.length>0,h=e[0]?.currencyCode,g=e[0]?.type,{priceBeforeDiscounts:f,priceAfterDiscounts:y}=i??u.marketDrivenShippingEnabled?Dl(e,o):Ol(e),v=m&&f&&f>
2y&&!p,_=s(y,g),b=d(dR,{condition:t,color:n,type:"bold"===r?"strong":void 0,translate:!1,letterCase:l(y,g),children:_});return t?b:a?d(TR,{strong:!1}):v?d(iy,{direction:"inline",gap:"small-300",justifyContent:"center",alignItems:"center",children:[d(Jf,{accessibilityVisibility:"exclusive",children:c.translate("order_summary.original_price")}),d(Jf,{size:"base",color:"subdued",type:"redundant",translate:!1,children:c.formatCurrency(f,{currency:h})}),d(Jf,{accessibilityVisibility:"exclusive",children:c.translate("order_summary.price_after_discount_aria_text")}),b]}):b}const NR=({getLinePrice:e,getPriceLetterCase:n,label:a,moneyLines:i,finalMoneyLines:o,forceSubduedStyle:s,discountLines:l,shippingTooltip:c,included:u,shouldConsolidateRateGroupMax:p,getRateGroupMaxKey:m})=>{const h=pc(),g=t(()=>"information"===h.value.currentPage?.id),{shop:f,checkout:v,i18n:_}=ae(),b=!f.hasFlagEnabled(mo),{value:P}=ge().deliveryNext,k=Rt(),S=kn("deliveryNext").value,w=Jx("deliveryNext").value||!!k.value&&S,C=v.proposal.facts.delivery??[],E=function(e){const{checkout:t}=ae(),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=>zl(e))??[],L=E.length?[...new Set(E.map(e=>e.label))]:[...new Set(T.map(e=>Rl(e)&&"code"===e.discount.type&&e.discount.codeHidden?_.translate("order_summary.discount_title"):e.title))],N=b?L.map(e=>d(sh,{gridAutoFlow:"column",gridTemplateColumns:"minmax(auto, max-content) minmax(0, 1fr)",gridTemplateRows:"minmax(0, 1fr)",gap:"small-400",alignItems:"center",alignContent:"center",children:[d(mh,{type:"discount",size:"small"}),d(lA,{children:d(Jf,{color:"subdued",children:e.toUpperCase()})})]},e)):[],R=A||s,M=(g.value||x)&&c,D=s?"subdued":void 0;return d(y,{children:[d(oR,{itemSize:I?"auto":void 0,color:D,children:[d(sR,{children:d(iy,{direction:"inline",gap:"small-400",alignItems:"center",children:[d(Jf,{color:D,children:a}),M]})}),d(lR,{loading:w,children:d(LR,{getLinePrice:e,getPriceLetterCase:n,appearance:R?"subdued":void 0,moneyLines:o,deliveryLoading:w,included:u,shouldConsolidateRateGroupMax:p,getRateGroupMaxKey:m})})]}),N.length>0&&d(tR,{spacing:"small-400",children:d(oR,{children:d(sR,{children:N})})})]})},RR=({shopId:e,forceSubduedStyle:n})=>{const r=ge(),i=r.deliveryNext.value,o=Rt(),s=kn("deliveryNext"),l=Jx("deliveryNext"),c=l.value||!!o.value&&s.value,{checkout:u,i18n:p,shop:{id:m,marketDrivenShippingEnabled:h,remoteShopsConfigMap:g},source:f}=ae(),v=u.configuration.layout.isOnePage.value,_=u.proposal.facts.delivery,b=Ve(),P=zr(b.value.enabledDeliveryMethods),k=Gx(),S=k?.selected.value??[],w=S.length>0,C=ho(S).length>0,E=S.includes("PICK_UP"),x=Boolean(e),{visibility:I}=u.configuration,A=r.discountLines.value,T=pb(),L=function(){const{checkout:e}=ae(),t=e.proposal.facts.delivery??[],n=function(){const{checkout:e}=ae(),t=e.proposal.facts.delivery??[];return IR(t)-t.flatMap(e=>e.lines.flatMap(e=>e.appliedDiscounts)).reduce((e,{amountDiscounted:t})=>(t?.amount||0)+e,0)}(),r=IR(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}]}(),N=go(e),{allMoneyLines:R,moneyLinesForShop:M}=N.value,D=lo(),O=pc(),z="review"!==O.value.currentPage?.id&&(!c||D.value),B=p.translate("order_summary.pickup_label"),V=p.translate("order_summary.shipping_label"),F=a(P?B:V),U=t(()=>{const e=zr(b.value.enabledDeliveryMethods)?B:V;if(!(l.value||o.value&&s.value)){const t=N.value.moneyLinesForShop,n=Yn(f)?_?.[0]?.pickupAddress:t.length>0&&t.every(e=>"PICK_UP"===e.methodType);F.current=n?B:e}return F.current}).value,q=Boolean(i&&"filled"===i.status&&i.lines.some(({status:e})=>"not_required"!==e)),j=!c&&!q&&!u.isShippingRequired.value,H=L||M,$=H.filter(function(e){return void 0!==e.methodType}),Y=$.filter(e=>"PICK_UP"!==e.methodType),W=$.filter(e=>"PICK_UP"===e.methodType),G=0===H.length||$.length>0,J=!x&&!Yn(f)&&w&&G,K=J&&E&&!C,Q=J&&C,X=K?B:V,Z=t(()=>Boolean(Yn(f)&&AR({checkout:u})&&ub({checkout:u,source:f})?.lines.length));if(T.value)return null;if(!(I.showShippingLines.value&&!Yn(f)||Z.value))return null;if(j)return null;if(x&&0===H.length)return null;if(x){const t=H.some(e=>ce(e));return d(NR,{getLinePrice:pe,getPriceLetterCase:de,label:U,forceSubduedStyle:n,moneyLines:M,finalMoneyLines:H,discountLines:e===m?A?.lines:void 0,shippingTooltip:void 0,shouldConsolidateRateGroupMax:t,getRateGroupMaxKey:ue})}if(D.value&&H.length>1){const e=H.some(e=>ce(e)),t=function(e){const t=new Map;for(const n of e){const e=n.shopId??m,r=t.get(e);r?r.lines.push(n):t.set(e,{shopName:n.shopName??U,lines:[n]})}return[...t.values()]}(H);return d(_R,{id:"shipping-money-line",title:U,hideHeaderItemWhenOpen:!0,item:d(lR,{loading:c,children:d(LR,{getLinePrice:pe,getPriceLetterCase:de,moneyLines:H,deliveryLoading:c,shouldConsolidateRateGroupMax:e,getRateGroupMaxKey:ue})}),children:d(tR,{spacing:"small-400",children:t.map(({shopName:t,lines:n})=>{const r=n.find(e=>e.shippingPolicy)?.shippingPolicy,a=n.some(e=>(e.shopId??m)===m&&e.hasLocalDiscountApplied);return d(NR,{getLinePrice:pe,getPriceLetterCase:de,label:t,forceSubduedStyle:!0,moneyLines:R,finalMoneyLines:n,discountLines:a?A?.lines:void 0,shouldConsolidateRateGroupMax:e,getRateGroupMaxKey:ue,shippingTooltip:z&&r?d(xR,{defaultPolicy:r}):void 0},n[0]?.shopId??t)})})})}if(Y.length>0&&W.length>0)return se({});if(J&&C&&E)return se({shippingGetLinePrice:Y.length>0?pe:me,shippingGetPriceLetterCase:Y.length>0?de:he,pickupGetLinePrice:fe,pickupGetPriceLetterCase:ye});let ee=R,te=H,ne=pe,re=de,ie=U,oe=z?d(xR,{defaultPolicy:null}):void 0;return K?(ee=W,te=W,ne=fe,re=ye,ie=X,oe=void 0):Q&&(ee=Y,te=Y,ie=X,0===Y.length&&(ne=me,re=he)),d(NR,{getLinePrice:ne,getPriceLetterCase:re,label:ie,forceSubduedStyle:n,moneyLines:ee,finalMoneyLines:te,discountLines:A?.lines,shippingTooltip:oe});function se({shippingGetLinePrice:e=pe,shippingGetPriceLetterCase:t=de,pickupGetLinePrice:r=pe,pickupGetPriceLetterCase:a=de}){const{shippingDiscountLines:o,pickupDiscountLines:s}=Bl(i,A?.lines);return d(y,{children:[d(NR,{getLinePrice:e,getPriceLetterCase:t,label:V,forceSubduedStyle:n,moneyLines:Y,f
2inalMoneyLines:Y,discountLines:o,shippingTooltip:z?d(xR,{defaultPolicy:null}):void 0}),d(NR,{getLinePrice:r,getPriceLetterCase:a,label:B,forceSubduedStyle:n,moneyLines:W,finalMoneyLines:W,discountLines:s,shippingTooltip:void 0})]})}function le(e){return e.every(e=>"SUBSCRIPTION"===e.type)}function ce(e){const t=e.shopId??m;if(t===m)return h;const n=g?.get(t);return n?n.marketDrivenShippingEnabled:Boolean(e.amountCombinabilityToken)}function ue(e){const t=e.amountCombinabilityToken??void 0;if(t&&ce(e))return`${e.shopId??m}:${t}`}function de(e,t){return P?"uppercase":c||void 0===e||!R.length&&!_?.length||0!==e?"none":"SUBSCRIPTION"!==t||le(R)?"uppercase":"none"}function pe(e,t){if(c)return"$0.00";if(void 0!==e&&(R.length||_?.length)){const n="SUBSCRIPTION"!==t||le(R)?p.translate("order_summary.free_shipping_total_label"):p.translate("shipping.subscription_delivery_description.shipping_price_included");if(0===e)return n;const r=Yn(f)?_?.[0]?.total?.currencyCode:R[0].currencyCode;return p.formatCurrency(e,{currency:r,form:"short"})}return P?p.translate("order_summary.free_shipping_total_label"):v?p.translate("order_summary.enter_shipping_address"):p.translate("order_summary.shipping_default_value")}function me(){return pe(void 0)}function he(){return de(void 0)}function fe(e,t){return W.length||_?.length?pe(e,t):c?"$0.00":p.translate("order_summary.free_shipping_total_label")}function ye(e,t){return W.length||_?.length||c?de(e,t):"uppercase"}},MR=Zc("ReductionTooltip");function DR({type:e}){const{i18n:t,shop:{name:n}}=ae(),r=eu(void 0,MR),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(mh,{type:"question-circle",size:"small",interestFor:r}),d(ym,{id:r,children:d(Jf,{children:a})})]})}function OR({line:e,title:t,amount:n}){const{i18n:r,source:a,shop:i}=ae(),o=Yn(a)&&n,s=gN(i);if(e&&!Rl(e)||e&&"CART"!==e.discount.presentationLevel||e&&0===e.amount?.amount&&s)return null;if(e&&(zl(e)||0===e.allocations.length))return null;let l=e?.title;return e&&"custom"===e.discount.type&&""===e.title&&(l=r.translate("order_summary.custom_discount")),e&&"code"===e.discount.type&&e.discount.codeHidden&&(l=r.translate("order_summary.discount_title")),d(oR,{children:[d(sR,{children:d(sh,{gridAutoFlow:"column",gridTemplateColumns:"minmax(auto, max-content) minmax(0, 1fr)",gridTemplateRows:"minmax(0, 1fr)",gap:"small-400",alignItems:"center",alignContent:"center",children:[d(mh,{type:"discount",size:"small"}),d(lA,{children:d(Jf,{color:"subdued",children:e?l?.toUpperCase():t?.toUpperCase()})})]})}),d(lR,{children:d(Jf,{translate:!1,children:o?(c=n,r.formatCurrency(-c.amount,{currency:c.currencyCode,form:"short",spacedMinusSign:!0})):e&&zR({line:e,freeShippingLabel:r.translate("order_summary.free_shipping_discount_label"),i18n:r})})})]});var c}function zR({line:e,freeShippingLabel:t,i18n:n}){if(e.allocations.some(e=>"DELIVERYLINE"===e.target.type)||0===e.allocations.length)return t;if(Rl(e)){const t=e.amount?.amount,r=e.amount?.currencyCode;if(t&&r)return n.formatCurrency(-t,{currency:r,form:"short",spacedMinusSign:!0})}}const BR=({disableTooltip:e=!1})=>{const{i18n:n,checkout:r,source:a,shop:i}=ae(),o=ge().discountLines,s=r.proposal.facts.orderDiscounts??[],l=Yn(a)&&s,c=gN(i),u=lo(),p=t(()=>{return e=o.value?.lines,t=c,e?.filter(e=>Rl(e)&&fo(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(x,{when:h,children:()=>d(oR,{children:d(sR,{children:d(sh,{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(Jf,{children:g}),d(x,{when:m,children:d(DR,{type:"discount"})})]})})})}),d(tR,{spacing:"small-500",children:[d(H,{each:p,getKey:e=>e.title,children:e=>d(OR,{line:e})}),l&&s.map(e=>d(OR,{title:e.label,amount:e.amount},e.label))]})]})};function VR(e,t){return e||("available_total"===t?.status?t.totalDuty:null)}const FR=Zc("DutyMoneyLineTooltip");function UR({shopId:e}){const{i18n:t,checkout:n,shop:r}=ae(),a=ge(),{value:i}=a.landedCostDetails,o=kn("landedCostDetails").value,s=kn("duties").value,l=n.proposal.facts.duty,{value:c}=a.duties,u=eu(void 0,FR);if(e&&e!==r.id)return null;const p=VR(l,c),m=i?.incoterm===Vl.Ddu&&i.reason===Fl.ErrorOccured,h=(s||o)&&!l&&!m,g=p||m,f=m?"subdued":void 0,v=d(iy,{direction:"inline",alignItems:"center",gap:"small-400",children:[d(Jf,{children:t.translate("order_summary.duties_label")}),m&&!h&&d(y,{children:[d(mh,{type:"question-circle",interestFor:u,accessibilityLabel:t.translate("tooltip.accessibility_label_context",{context:t.translate("order_summary.duties_label")})}),d(ym,{id:u,children:t.translate("order_summary.error_duties_tooltip")})]})]}),_=m?t.translate("order_summary.may_be_charged_on_delivery"):p&&t.formatCurrency(p.amount,{currency:p.currencyCode,form:"short"});return d(y,{children:g&&d(oR,{color:f,children:[d(sR,{children:v}),d(lR,{children:d(iy,{direction:"inline",gap:"small-200",children:d(dR,{condition:h,children:h?"$0.00":_})})})]})})}function qR({data:e,loading:t,totalTax:n}){const{i18n:r,shop:a}=ae(),i=jR(),o=a.hasFlagEnabled(yo)&&e.length>2,s=e.map(({description:e,amount:n},r)=>d(yR,{loading:t,totalTax:n,taxesLabel:i({description:e}),subdueText:o},`${e}-${r}`));return o?d(_R,{id:"tax-breakdown-money-line",title:r.translate("order_summary.taxes_label"),defaultOpen:!0,hideHeaderItemWhenOpen:!0,item:n?d(lR,{loading:t,children:d(dR,{condition:t,children:r.formatCurrency(n.amount,{currency:n.currencyCode,form:"short"})})}):void 0,children:d(tR,{spacing:"small-400",children:s})}):d(tR,{spacing:"small-400",children:s})}const jR=()=>{const{i18n:e}=ae();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 HR({shopId:e}){const{i18n:n,checkout:r,shop:a}=ae(),i=ge(),{hasNegotiatedOnce:o}=he(),s=kn("taxes"),l=Jx("taxes"),c=kn("landedCostDetails"),u=kn("remoteTaxDetails"),p=lo(),m=DP(),h=function(){const{checkout:e}=ae(),n=kn("taxes"),{taxes:r}=ge();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})}(),g=t(()=>{if(r.proposal.facts.tax)return r.proposal.facts.tax;const e=i.taxes.value;return"available_total"===e?.status?e.totalTax:null}),f=t(()=>Boolean(i.landedCostDetails.value)),y=t(()=>{const e=i.taxes.value;return void 0!==e&&"pending"!==e.status}),v=t(()=>!r.proposal.facts.tax&&(!!l.value||!y.value&&(s.value||!o.value))),_=t(()=>(v.value||s.value||c.value||u.value)&&!r.proposal.facts.tax),b=t(()=>{const e=g.value;return e&&e.amount>0?e:v.value?{amount:0,currencyCode:a.currencyCode}:void 0}),P=co(g.value),k=t(()=>[...P.value.entries()]),S=so(),w=t(()=>S.value??g.value),C=t(()=>p.value&&k.value.length>1);if(e){const t=P.value.get(e);return t&&0!==t.totalTax.amount&&"available_total_included"!==t.status?d(yR,{loading:_.value,totalTax:t.totalTax,hasLandedCostDetails:e===a.id&&f.value}):null}if(m?.applied&&w.value)return d(yR,{totalTax:w.value});if(!(w.value&&0!==w.value.amount||v.value))return null;if(C.value&&w.value){const e=f.value?n.translate("order_summary.taxes_label"):n.translate("order_summary.estimated_taxes_label"),t=f.value?void 0:n.translate("order_summary.estimated_taxes_finalization_tooltip_content");return d(_R,{id:"tax-money-line",title:e,tooltipText:t,item:d(lR,{loading:_.value,children:d(dR,{condition:_.value,children:_.value?"$0.00":n.formatCurrency(w.value.amount,{currency:w.value.currencyCode,form:"short"})})}),children:d(tR,{spacing:"small-400",children:d(H,{each:k,getKey:([e])=>e,children:([,e])=>d(yR,{loading:_.value,totalTax:e.totalTax,taxesLabel:e.shopName,subdueText:!0})})})})}return d(x,{when:h,fallback:d(x,{when:b,children:e=>d(yR,{loading:_.value,totalTax:e,taxesLabel:v.value?n.translate("order_summary.taxes_label"):void 0,hasLandedCostDetails:f.value})}),children:e=>d(qR,{data:e.data,loading:e.loading||_.value,totalTax:g.value})})}const $R=Zc("CombinedDutiesAndTaxesTooltip"),YR=({loading:e,shopId:t})=>{const{i18n:n,shop:r}=ae(),a=eu(void 0,$R);if(t&&t!==r.id)return null;const i=e.value;return d(oR,{children:[d(sR,{children:d(iy,{direction:"inline",alignItems:"center",gap:"small-400",children:[d(Jf,{children:n.translate("order_summary.duties_and_taxes_label")}),d(mh,{type:"question-circle",interestFor:a,accessibilityLabel:n.translate("tooltip.accessibility_label_context",{context:n.translate("order_summary.duties_and_taxes_label")})}),d(ym,{id:a,children:n.translate("order_summary.error_duties_tooltip")})]})}),d(lR,{children:d(dR,{condition:i,children:i?"$0.00":n.translate("order_summary.may_be_charged_on_delivery")})})]})},WR=({shopId:e})=>{const{checkout:n}
2=ae(),r=ge(),a=Boolean(n.proposal.facts.taxesIncluded),i=Boolean(n.proposal.facts.dutiesIncluded),o=uo(),s=vo(),l=r.landedCostDetails,c=kn("landedCostDetails"),u=Jx("landedCostDetails"),p=r.optionalDuties,m=kn("optionalDuties"),h=t(()=>Boolean(p.value?.refuseDutiesPermitted)&&Boolean(p.value?.buyerRefusesDuties)&&l.value?.incoterm===Vl.Ddu),g=t(()=>u.value||m.value||c.value),f=t(()=>!(s.value||i)),v=t(()=>Boolean(e)||!(o.value||a));return d(x,{when:h,fallback:d(y,{children:[d(x,{when:f,children:d(UR,{shopId:e})}),d(x,{when:v,children:d(HR,{shopId:e})})]}),children:d(YR,{loading:g,shopId:e})})};function GR({line:e,disableTooltip:t=!1}){const{i18n:n}=ae(),{value:r}=lo(),a=!t&&r,i=_o(e.method).toUpperCase();return d(oR,{itemSize:"auto",children:[d(sR,{children:d(iy,{direction:"inline",gap:"small-400 small-300",children:[d(Jf,{children:n.translate("order_summary.gift_card_label")}),d(iy,{direction:"inline",alignItems:"center",gap:"small-400",children:[d(mh,{type:"gift-card"}),d(Jf,{color:"subdued",accessibilityVisibility:"hidden",children:n.translate("order_summary.gift_card_masked",{last_characters:i})}),d(Jf,{accessibilityVisibility:"exclusive",children:n.translate("order_summary.gift_card_ending",{last_characters:i})}),a&&d(DR,{type:"giftCard"})]})]})}),d(lR,{children:d(Jf,{children:e.cost?n.formatCurrency(-e.cost.amount,{currency:e.cost.currencyCode,form:"short",spacedMinusSign:!0}):""})})]})}function JR({disableTooltip:e=!1}){const n=EI(),r=lo(),{shop:a,i18n:i}=ae(),o=a.hasFlagEnabled(bo),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(oR,{children:[d(sR,{children:d(sh,{gridAutoFlow:"column",gridTemplateColumns:l.value,gridTemplateRows:"minmax(0, 1fr)",gap:"small-400",alignItems:"center",alignContent:"center",children:[d(Jf,{children:i.translate("order_summary.gift_card_label")}),d(x,{when:s,children:d(DR,{type:"giftCard"})})]})}),d(lR,{children:d(Jf,{children:i.formatCurrency(-e,{currency:t,form:"short",spacedMinusSign:!0})})})]})}return d(H,{each:n,getKey:e=>Po(e.method),children:t=>d(GR,{line:t,disableTooltip:e})})}function KR(e){return"children"in e&&fw(e.children)}function QR(e){const{spacing:t}=nR(),n=v("_1x41w3p1 _1x41w3p0 _1fragem6t _1fragem19",t&&rR.groupSpacingVariant[t]);return d(y,{children:d("div",{className:n,role:"row",children:KR(e)?e.children:d(y,{children:[d(XR,{children:d(Jf,{type:"strong",size:"large",children:e.label})}),d(ZR,{children:d(iy,{direction:"inline",gap:"small-300",alignItems:"baseline",children:[d(TI,{children:d(Jf,{size:"small",color:"subdued",children:e.prefix})}),d(Jf,{type:"strong",size:"large",children:e.value})]})})]})})})}function XR({children:e}){return d("div",{className:"_1x41w3p2",role:"rowheader",children:e})}function ZR({children:e,accessibilityColumnIndex:t}){return d("div",{className:"_1x41w3p3",role:"cell","aria-colindex":t,children:e})}const eM={Wrapper:"_3KD7m",Char:"kxIMD",Price:"_3XbdQ","Price-enter":"baSEe","Price-exit":"dhH4n","Price-exiting":"ldszB","Price-exited":"ZOhB6"};let tM=0;function nM({formatted:e,money:t}){const{orderSummary:{priceReductionAnimation:r}}=Lv(),s=Xc(),l=a(o(()=>t.value)),c=m([{id:tM++,formatted:o(()=>e.value)}]),u=Rt(),p="base"===r;i(()=>{const n=l.current,r=t.value.currencyCode===n.currencyCode&&t.value.amount<n.amount;c.value=r?[...c.value,{id:tM++,formatted:e.value}]:[{id:tM++,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:eM.Wrapper,style:{"--delay":(s?0:30)+"ms"},children:d(x,{when:u,fallback:e,children:()=>c.value.map((e,t)=>d(rM,{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 rM({formatted:e,current:t,animated:n,onDisappear:r,snapshotId:a}){const o=Xc(),s=Od(t,"fast",n),l=e.split("");return i(()=>{let t;return"exited"===s&&(o?r(a):t=setTimeout(()=>r(a),30*e.length)),()=>{clearTimeout(t)}},[s,o,e,r,a]),d("span",{className:v(eM.Price,n&&eM[`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:eM.Char,style:{"--index":t},children:e},t))})}function aM(e){const{initialUnresolvedFields:n}=he();return t(()=>function(e,t){return t.some(t=>e.has(t))}(n.value,e))}const iM=["deliveryNext","taxes","duties","landedCostDetails","remoteTaxDetails"];function oM({alignItems:e="baseline",freeLabel:n,outOfStockLabel:r,paymentDue:a,showCurrencyBadge:i,hideCurrencyCode:o,size:s}){const{i18n:l,embed:c}=ae(),u=Nv(),{orderSummary:p}=Lv(),h=function(){const{allViolations:e}=ge();return t(()=>ev(e.value??[]))}(),g=Rt(),f=kn("deliveryNext"),y=kn("taxes"),v=kn("duties"),_=kn("landedCostDetails"),b=kn("remoteTaxDetails"),P=ge(),S=t(()=>void 0!==P.deliveryNext.value||void 0!==P.taxes.value||void 0!==P.duties.value||void 0!==P.landedCostDetails.value||void 0!==P.remoteTaxDetails.value),w=aM(iM),C=m(w.peek()),E=m(!w.peek()&&S.peek());k(()=>{!w.value&&S.value&&(E.value=!0)});const I=t(()=>f.value||y.value||v.value||_.value||b.value),A=t(()=>(!c||!_r(c.embedder))&&(c?!S.value||I.value:C.peek()&&!E.value)),T=!o&&u,L=t(()=>r&&h.value?r:n&&0===a.value.amount?n:l.formatCurrency(a.value.amount,{currency:a.value.currencyCode,form:"short"})),N=n?"uppercase":void 0,R=p.totalDueTypography;let M,D;R?(M="bold"===R.weight?"strong":"generic",D=R.size??"base"):(M="strong",D="large");const O=d(Jf,{size:i?"extraSmall":"small",color:"subdued",translate:!1,children:a.value.currencyCode}),z=t(()=>T&&L.value!==r&&L.value!==n&&(!g.value||!W(a.value.currencyCode,L.value)));
2return d(iy,{alignItems:e,gap:"small-300",direction:"inline",children:[d(x,{when:z,children:d(TI,{children:i?d(LL,{color:"subdued",size:"small",children:O}):O})}),d(dR,{condition:A.value,type:M,size:s??D,translate:!1,letterCase:N,skeletonContent:L.value,children:E.value?d(nM,{formatted:L,money:a}):null})]})}const sM=1e8;function lM(e,t){const n=e/t*100,r=Math.round(n*sM)/sM;return Math.ceil(r)/100}function cM(e){return e?.installmentPlans?.some(e=>"MSI"===e.type)??!1}function uM(e,t){return e.map(e=>"direct"===e.method.type||e.method.type===de.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 dM(e){return e.map(e=>"direct"===e.method.type||e.method.type===de.CreditCard?{...e,method:{...e.method,creditCardInstallments:void 0}}:e)}function pM(){const e=Ii(),n=AI(),{installmentMonthsSignal:r}=Je(),{i18n:a}=ae(),i=ge().paymentMethods,o=t(()=>i.value?.some(e=>"direct"===e.type&&!e.alternative&&cM(e))??!1);return{amount:t(()=>{const t=r.value,n=e.value;return o.value&&Boolean(t)&&n&&t?{...n,amount:lM(n.amount,t)}:n}),label:t(()=>{const t=r.value;return o.value&&Boolean(t)&&Boolean(e.value)?a.translate("order_summary.installment_due_today_label"):n.value}),isInstallment:t(()=>o.value&&Boolean(r.value))}}function mM(){const e=ge().paymentFlexibilityPaymentTermsTemplate,n=wi(),r=_I(),a=pt();return t(()=>{if(n.value||r.value)return!1;const t=Boolean(e.value),i=a.value;return t||i})}function hM({label:e,amount:t,hideCurrencyCode:n}){const{moneySummary:{labelTypography:r}}=th();return d(QR,{children:[d(XR,{children:d(Jf,{type:"strong",size:r?.size??"large",children:e})}),d(ZR,{children:d(oM,{paymentDue:t,hideCurrencyCode:n})})]})}function gM({variant:e,showLoadingPlaceholder:n}){const r=Ii(),{i18n:i,shop:o}=ae(),s=AI(),l=t(()=>!r.value),c=t(()=>r.value?i.formatCurrency(r.value.amount,{currency:r.value.currencyCode,form:"short"}):void 0),u=a({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(qf,{background:"subdued",padding:"small-300",borderRadius:"small",children:d(sh,{gridAutoFlow:"column",gridTemplateColumns:"minmax(0, 1fr) minmax(auto, max-content)",gridTemplateRows:"minmax(0, 1fr)",alignItems:"center",alignContent:"center",children:[d(Jf,{color:"subdued",children:s}),d(Jf,{color:"subdued",children:c})]})}):d(tR,{spacing:"small-500",children:d(hM,{label:s,amount:p,hideCurrencyCode:l.value})})}function fM({children:e}){return d(tR,{spacing:"small-500",children:d(oR,{children:[d(sR,{children:d(ZE,{color:"subdued",children:d(rA,{children:e})})}),d(lR,{})]})})}function yM(){return d(qf,{children:[d(pN,{blockSize:"small-200"}),d(vw,{accessibilityRole:"presentation"}),d(pN,{blockSize:"small-200"})]})}function vM(){const{shop:e}=ae(),n=ge().buyerIdentity,r=Ii(),a=e.hasFlagEnabled(ko);return t(()=>{if(a)return;const e=n.value,t="BG"===e?.countryCode&&"EUR"===e?.presentmentCurrency,i=r.value;return!t||!i||i.amount<=0?void 0:Number((1.95583*i.amount).toFixed(2))})}function _M({bgnAmount:e}){const{i18n:t}=ae();return d(oR,{children:d(lR,{children:d(Jf,{color:"subdued",children:t.formatCurrency(e,{currency:"BGN",form:"short"})})})})}const bM=["taxes","duties"];function PM({shopId:e}){const n=Ii(),r=So(),i=t(()=>e?r.value.get(e):n.value),{checkout:o,embed:s,i18n:l,shop:c}=ae(),u=aM(bM),p=kn("deliveryNext"),m=kn("taxes"),h=kn("duties"),g=kn("landedCostDetails"),f=kn("remoteTaxDetails"),{visibility:v}=o.configuration,{moneySummary:{labelColor:_="base",labelTypography:b},moneyLines:{divided:P}}=th(),k=o.proposal.facts.previouslyPaidTotal,S=wi(),w=xI(),C=(()=>{const{shopPay:e,checkout:t}=ae();if(nf().value&&t.installments.isSupported.value&&t.installments.config.value?.availableLoanTypes.includes("SPLIT_PAY")&&e.session.isInstallmentsSelected.value)return t.installments.chargeAmount.value})(),{value:E}=wt(),I=E?.currencyCode,A=mM(),T=c.hasFlagEnabled(wo),L=Boolean(o.proposal.facts.taxesIncluded),N=Boolean(o.proposal.facts.dutiesIncluded),R=uo().value||L,M=vo().value||N,{value:D}=ge().landedCostDetails,O=DP(),z=o.proposal.facts.landedCostDetails,{amount:B,label:V,isInstallment:F}=pM(),U="COMPACT"===o.configuration.orderSummary?.layoutStyle,q=PR(),j=vM(),H=t(()=>e&&e!==c.id?l.translate("order_summary.total_label"):V.value),$=t(()=>!i.value),Y=t(()=>(!s||!_r(s.embedder))&&u.value),W=a(i.peek()),G=t(()=>{const e=i.value;return null!=e&&(W.current=e),W.current}),J=t(()=>G.value??{amount:0,currencyCode:c.currencyCode}),K=a(B.peek()),Q=t(()=>{const e=B.value;return null!=e&&(K.current=e),K.current??J.value}),X=t(()=>F.value?i.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(yM,{}
2):null,te=!S.value&&!w.value,ne=O?.applied&&R&&q.value?d(fM,{children:q.value}):te?d(SR,{taxesIncluded:R,shopId:e}):null;if(e)return d(y,{children:[d(hM,{label:H,amount:J,hideCurrencyCode:$.value}),ne]});if(U){const e="base"===b?.weight?"generic":"strong";return d(y,{children:[ee,d(QR,{children:[d(XR,{children:d(iy,{children:d(x,{when:q,fallback:d(Jf,{type:e,color:_,size:b?.size??"large",children:V.value}),children:d(y,{children:[d(Jf,{type:e,color:_,size:b?.size,children:V.value}),ne]})})})}),d(ZR,{children:d(oM,{paymentDue:Q,hideCurrencyCode:$.value,showCurrencyBadge:!0,alignItems:"center"})})]})]})}const re=[D,z].some(e=>e?.incoterm===Vl.Ddp),ie=M&&re?d(y,{children:[d(pN,{blockSize:"small-400"}),d(vw,{accessibilityRole:"presentation"}),d(pN,{blockSize:"small-400"}),d(ZE,{type:"small",color:"subdued",children:d(rA,{children:l.translate("order_summary.duties_included_label")})})]}):null,oe=T?d(gM,{showLoadingPlaceholder:Y.value||Z}):d(tR,{spacing:"small-500",children:d(hM,{label:H,amount:J,hideCurrencyCode:$.value})}),se=l.translate("order_summary.payment_terms_totals.due_today_next");return d(y,{children:[ee,d(x,{when:A,children:d(QR,{children:[d(XR,{children:d(Jf,{children:se})}),d(ZR,{children:d(iy,{direction:"inline",gap:"small-200",alignItems:"baseline",children:d(dR,{condition:$.value,size:"medium",translate:!1,children:l.formatCurrency(0,{currency:J.value.currencyCode,form:"short"})})})})]})}),d(x,{when:X,children:e=>d(oR,{label:l.translate("order_summary.total_label"),value:l.formatCurrency(e.amount,{currency:e.currencyCode,form:"short"})})}),d(x,{when:A,fallback:d(hM,{label:H,amount:Q,hideCurrencyCode:$.value}),children:oe}),ne,void 0!==C&&I?d(QR,{children:d(ZR,{accessibilityColumnIndex:2,children:d(Jf,{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(_M,{bgnAmount:j.value}),ie]})}const kM=Zc("PriceBreakdownItemTooltip");function SM({title:e,tooltipText:t,itemText:n,layout:r}){const{i18n:a}=ae(),i=eu(void 0,kM),o="strong",s="base";return d(oR,{layout:r,children:[d(sR,{children:d(iy,{direction:"inline",alignItems:"center",gap:"small-300",children:[d(Jf,{color:s,type:o,children:e}),t?d(y,{children:[d(mh,{type:"question-circle",size:"small",interestFor:i,accessibilityLabel:a.translate("tooltip.accessibility_label_context",{context:e})}),d(ym,{id:i,children:t})]}):null]})}),d(lR,{children:d(Jf,{color:s,type:o,children:n})})]})}const wM=Zc("RecurringTotalsTooltip"),CM=Zc("RecurringTotalsLabel");function EM({cardStyle:e}){const{value:t}=ge().recurringTotals,{i18n:n}=ae(),r=OL(),a=eu(void 0,wM),i=eu(void 0,CM);if(!t?.length)return null;const o=n.translate("order_summary.recurring_subtotal_label");if(e){const e=1===t.length;return d(qf,{accessibilityRole:e?"group":void 0,"aria-labelledby":e?i:void 0,background:"subdued",padding:"small-300",borderRadius:"small",children:e?d(sh,{gridAutoFlow:"column",gridTemplateColumns:"minmax(0, 1fr) minmax(auto, max-content)",gridTemplateRows:"minmax(0, 1fr)",alignItems:"center",alignContent:"center",children:[d(iy,{direction:"inline",alignItems:"center",gap:"small-300",children:[d(Jf,{id:i,color:"base",type:"strong",children:o}),d(Jf,{color:"base",type:"strong",children:r(t[0])})]}),d(mh,{type:"question-circle",size:"small",interestFor:a,accessibilityLabel:n.translate("tooltip.accessibility_label_context",{context:o})}),d(ym,{id:a,children:n.translate("order_summary.recurring_total_tooltip")})]}):d(Jf,{color:"base",type:"strong",children:n.translate("order_summary.recurring_total_multiple_label")})})}return d(y,{children:[d(vw,{accessibilityRole:"presentation"},"recurringTotalsDivider"),1===t.length?d(tR,{spacing:"small-300",children:d(SM,{title:o,tooltipText:n.translate("order_summary.recurring_total_tooltip"),itemText:r(t[0]),layout:"stackable"})}):d(Jf,{color:"base",type:"strong",children:n.translate("order_summary.recurring_total_multiple_label")})]})}function xM({line:e}){const{i18n:t}=ae();if(!e.cost)return null;const{amount:n,currencyCode:r}=e.cost,a=t.formatCurrency(-n,{currency:r,form:"short",spacedMinusSign:!0}),i=kI(e.method.redemptionContent);return d(oR,{children:[d(sR,{children:d(iy,{direction:"inline",gap:"base",children:[d(Jf,{children:t.translate("order_summary.gift_card_label")}),d(iy,{direction:"inline",alignItems:"center",gap:"small-400",children:[d(mh,{type:"gift-card"}),d(Jf,{accessibilityVisibility:"hidden",children:SI(i)}),d(Jf,{accessibilityVisibility:"exclusive",children:t.translate("order_summary.gift_card_ending",{last_characters:i||""})})]})]})}),d(lR,{children:d(Jf,{type:"strong",children:a})})]})}function IM({line:e}){const{checkout:t,i18n:n}
2=ae(),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(oR,{type:"strong",label:l,value:i},e.redemptionId):null})}function AM({line:e}){const{i18n:t}=ae();if(!e.cost)return null;const n=t.translate("payment.store_credit.label"),r=t.formatCurrency(-e.cost.amount,{currency:e.cost.currencyCode,form:"short",spacedMinusSign:!0});return d(oR,{type:"strong",label:n,value:r})}function TM({line:e}){switch(e.method.redemptionSource){case"SHOP_CASH":return d(IM,{line:e});case"STORE_CREDIT":return d(AM,{line:e});case"CUSTOM":{const t=e;return d(xM,{line:t},t.method.redemptionContent?.redemptionAttributes[0].value)}default:return null}}function LM(){const e=ki("STORE_CREDIT","SHOP_CASH"),{paymentLines:t}=CI(),n=[...e.value,...t];return 0===n.length?null:d(y,{children:n.map(e=>d(TM,{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 NM(e){const n=ge(),r=n.merchandiseLines,{shop:{id:a},checkout:i}=ae(),o=i.proposal.facts.merchandiseLines??[],{value:s}=n.legacyRepresentProductsAsFees,l=t(()=>Co(r.value?.lines??[],n.remoteMerchandiseDetails.value)),c=Eo(),u=e?e!==a?{lines:l.value.get(e),factLines:void 0}:{lines:c.value,factLines:o}:{lines:r.value?.lines,factLines:o},d=function(e,t){return t?e?.reduce((e,t)=>t.legacyFee?e:e+t.quantity,0):e?.reduce((e,t)=>e+t.quantity,0)}(u?.lines,s),p=u?.lines?.filter(({quantity:e})=>e>0),m=u?.factLines?.reduce((e,t)=>e+t.quantity,0);return{totalLineQuantities:d,totalLineQuantitiesFact:m,merchandiseLinesWithCount:p?.length||0}}function RM({shopId:e}){const{subtotalLabel:n,subtotalValue:r,subtotalOriginalValue:a}=function(e){const{checkout:n,i18n:r}=ae(),a=function(e){const{shop:{id:n}}=ae(),r=ge(),a=r.remoteTotalDetails,i=At(),o=r.legacyRepresentProductsAsFees,s=r.legacySubtotalBeforeTaxesShippingAndFees,l=r.subtotal;return t(()=>{const t=o.value?s.value:i.value;return e?n===e?l.value:a.value?.perShopRemoteTotals.get(e)?.subtotal:t})}(e),i=function(e){const{embed:t,i18n:n}=ae(),{totalLineQuantities:r,merchandiseLinesWithCount:a}=NM(e);return _r(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(oR,{children:[d(sR,{children:d(Jf,{children:n})}),d(lR,{children:a?d(iy,{direction:"inline",gap:"small-300",children:[d(Jf,{tone:"critical",type:"redundant",translate:!1,children:a}),d(Jf,{translate:!1,children:r})]}):d(Jf,{translate:!1,children:r})})]}):null}function MM(){const{i18n:e,checkout:n,source:r}=ae(),a=ge().tipLines,i=n.proposal.facts.tip,o=t(()=>{const e=a.value?.[0]?.amount,t=Yn(r)?i:e;return t&&t.amount>0?t:void 0});return d(x,{when:o,children:t=>d(oR,{label:e.translate("order_summary.tip_label"),value:e.formatCurrency(t.amount,{currency:t.currencyCode,form:"short"})})})}function DM({variant:e}){const n=function(){const e=xo(),{shop:n,embed:r}=ae(),a=n.hasFlagEnabled(Io);return t(()=>{const t=Boolean(r?.embedder)&&!_r(r?.embedder);return!Boolean(a||!e.value||0===e.value.amount||t)})}(),r=xo();return n.value&&r.value?d(OM,{variant:e,totalSavings:r.value}):null}function OM({variant:e,totalSavings:n}){const{i18n:r,embed:a}=ae(),{deferredTotal:i}=ge(),o=_r(a?.embedder)?r.translate("universal.iframes.savings_label").toUpperCase():r.translate("order_summary.total_savings").toUpperCase(),s=r.formatCurrency(n.amount,{currency:n.currencyCode,form:"short"}),l=d(Jf,{type:"strong",translate:!1,children:s}),c=t(()=>i.value&&i.value.amount.amount>0?"small-200":"small-400");return"card"===e?d(qf,{children:d(iy,{direction:"inline",alignItems:"center",gap:"small-400",children:[d(iy,{direction:"inline",alignItems:"center",gap:"small-500",children:[d(mh,{type:"savings",size:"small",color:"base"}),d(Jf,{color:"subdued",children:r.translate("order_summary.total_savings")})]}),d(Jf,{color:"subdued",translate:!1,children:s})]})}):d(tR,{spacing:c.value,children:d(QR,{children:[d(XR,{children:d(iy,{direction:"inline",alignItems:"center",gap:"small-300",children:[d(mh,{type:"savings",size:"base",color:"strong"}),d(Jf,{type:"strong",children:o}),l]})}),d(ZR,{})]})})}function zM(){const{moneyLines:{divided:e}}=th(),n=ge(),r=n.legacyRepresentProductsAsFees,a=n.legacyMerchandiseLinesAsFees,i=t(()=>r.value&&a.value?a.value.lines:[]);return d(H,{each:i,getKey:e=>e.title,children:t=>d(y,{children:[e&&d(yM,{}),d(BM,{...t})]})})}function BM({title:e,description:t,total:n}){const{i18n:r}=ae(),a=t?d(iy,{direction:"inline",alignItems:"center",gap:"small-400",children:d(Jf,{children:[e,d("span",{style:{position:"absolute"},children:d(rh,{padding:"small-500 none none small-500",overlay:d(ym,{children:t}),accessibilityLabel:r.translate("general.tooltip_accessibility_label"),children:d(mh,{type:"question-circle",size:"small"})})},"description-with-tooltip")]})}):d(Jf,{children:e});return d(oR,{label:e,children:[d(sR,{children:a}),d(lR,{children:d(Jf,{translate:!1,children:r.formatCurrency(n.amount,{currency:n.currencyCode,form:"short"})})})]})}
2function VM({content:e}){return function(e){const t=a(!1);k(()=>{const n=e.value;if(t.current){if(n)return Zu({content:n})}else t.current=!0})}(e),d(x,{when:e,children:e=>d(y,{children:FM(e).map(({id:e,line:t})=>d(oR,{layout:"stackable",children:[d(qf,{inlineSize:"100%",children:d(sR,{children:d(ZE,{type:"small",color:"subdued",textAlign:"end",children:t})})}),d(lR,{})]},e))})})}function FM(e){const t=new Map;return e.split("\n").filter(Boolean).map(e=>{const n=t.get(e)??0;return t.set(e,n+1),{id:`${e}:${n}`,line:e}})}function UM(){const{moneyLines:{divided:e}}=th(),{i18n:t,checkout:n,shop:r}=ae(),{value:a}=wt(),{value:i}=ge().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(Ao)&&l&&Number(l.amount)>0,g=(u||o||h)&&e;return g||u||m||h||p&&a?d(y,{children:[g&&d(yM,{}),p&&a&&d(oR,{label:t.translate("order_summary.total_label"),value:t.formatCurrency(a.amount,{currency:a.currencyCode,form:"short"})}),u&&s&&d(oR,{type:"strong",label:t.translate("order_summary.order_total_updated_label"),value:t.formatCurrency(Number(s.amount),{currency:s.currencyCode,form:"short"})}),m?d(oR,{type:"strong",label:t.translate("order_summary.total_already_paid_label"),value:t.formatCurrency(-Number(o.amount),{currency:o.currencyCode,form:"short"})}):null,h&&l?d(oR,{type:"strong",label:t.translate("order_summary.waived_label"),value:t.formatCurrency(-Number(l.amount),{currency:l.currencyCode,form:"short"})}):null]}):null}function qM(){const{moneyLines:{divided:e}}=th(),t=function(){const{i18n:e,checkout:t}=ae(),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(yM,{}),d(oR,{type:"strong",label:n.label,value:n.value})]}),r&&d(oR,{type:"strong",label:r.label,value:r.value})]})}function jM(){const{i18n:e,checkout:t,embed:n}=ae(),{value:r}=To(),a=xI(),i=EI(),o=Boolean(t.proposal.facts.taxesIncluded),s=uo().value||o;if(!a.value||!r)return null;const l=d(SR,{taxesIncluded:s});return _r(n?.embedder)&&i.value.length>0?l:d(y,{children:[d(oR,{label:e.translate("order_summary.total_price_label"),value:e.formatCurrency(r.amount,{currency:r.currencyCode,form:"short"})}),l]})}const HM=E(function(){const{checkout:e,i18n:n,embed:r}=ae(),{visibility:a}=e.configuration,{orderSummary:i}=Lv(),o=e.configuration.orderSummary?.headerPosition??i.headerPosition,s=i.isCollapsible??!1,l=!1===i.isCollapsible,c=ge(),{currentDetour:u}=pc().value,p="thankYou"===u?.type,m=ZN(),h=e.proposal.negotiated.fields.additionalMoneyLines.value,g=e.proposal.negotiated.fields.lpmDisclosure,f=kn("lpmDisclosure"),y=t(()=>f.value?void 0:g.value),v=t(()=>{const t=e.latestReceipt.value;return"processed"===t?.status?t.lpmDisclosure:void 0});return d(HT,{children:[d(uR,{ref:m,title:n.translate("order_summary.cost_table_title"),children:[d(x,{when:a.showSubtotal,children:[d(RM,{}),d(BR,{}),d(RR,{}),d(zM,{}),d(qM,{}),d(WR,{}),d(MM,{}),d(jM,{}),d(LM,{})]}),d(UM,{}),d(JR,{}),h?.map(e=>d(oR,{label:e.label,value:n.formatCurrency(e.amount.amount,{currency:e.amount.currencyCode,form:"short"})},e.id)),"BOTTOM"===o&&s?d(pN,{blockSize:"small-500"}):d(PM,{}),!p&&d(x,{when:()=>!y.value,children:d(pR,{})}),d(VM,p?{content:v}:{content:y}),d(CR,{}),!_r(r?.embedder)&&d(DM,{}),!l&&d(EM,{})]}),l&&d(x,{when:()=>c.recurringTotals.value,children:d(qf,{paddingBlockStart:"small-300",children:d(EM,{cardStyle:!0})})})]})});var $M="km09ry0 _1fragem5z";const YM=Zc("Form");function WM({onSubmit:e,children:t,implicitSubmit:n=!0,disabled:a=!1,id:i,contentsClassName:o}){const s=id(),l=eu(void 0,YM),c=i??l,u=null!=Td(),p=r(()=>({id:c,nested:u}),[c,u]);let m=null;n&&(m=d(qf,{accessibilityVisibility:"exclusive",children:d(GM,{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(Ad.Provider,{value:p,children:[g,m]}),d(uu,{children:d("form",{action:"",method:"POST",noValidate:!0,className:$M,id:c,onSubmit:h})})]}):d("form",{action:"",method:"POST",noValidate:!0,className:$M,id:c,onSubmit:h,children:d(Ad.Provider,{value:p,children:[g,m]})})}function GM({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 JM=["extraSmall","small","medium","large"];function KM({above:e,below:t,children:n}){const r=Md()?"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?JM.indexOf(e)+1:0,r=t?JM.indexOf(t)-1:JM.length-1,a=JM.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 QM({targetSelector:e,label:t,icon:r}){const a=n(()=>{const t=document.querySelector(e);t&&(t.focus(),t.scrollIntoView({behavior:"smooth"}))},[e]);return d(qf,{display:"@media (inline-size >= medium) auto, none",children:d(Zf,{variant:"secondary",size:"small",onClick:a,className:we({screenReaders:"untilFocus"}),children:d(iy,{direction:"inline",gap:"small-400",alignItems:"center",children:[d(mh,{type:r,size:"small-100"}),d(Jf,{children:t})]})})})}const XM=({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]})}),ZM=()=>{const{i18n:e,shop:n}=ae(),r=Qc(),a=kn("shippingAddress"),{allViolations:i}=ge(),o=pc(),{shippingAddress:s}=qe();return t(()=>{const t=s.peek();if(r.value&&"information"===o.value.currentPage?.id&&Jn(t,{...Lo,countryCode:t?.countryCode}))return null;const l=i.value?.filter(e=>Kn.has(e.code))||[];return 0===l.length||!r.value||a.value?null:XM({violations:l,noticeType:kv.DeliveryViolations,noticeTitle:e.translate("notice_banner.violations_title",{violation:e.translate("notice_banner.individual_violations_title",{scope:kv.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(ry,{href:`mailto:${n.contactEmail}`,children:e.translate("notice_banner.editable_shipping_address_violations_email_link")})})})})};var eD={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 tD=Zc("Banner"),nD=new Map([["info","info"],["success","check-circle"],["warning","alert-triangle"],["critical","alert-circle"]]);function rD({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=id(),[P,k]=s(h),[S,w]=s(!0),C=a(),E=eu(void 0,tD),x=Rf({active:"critical"===_}),I=a(P),A=Nd(),T=Xc(),L=a(T);L.current=T,i(()=>{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]),i(()=>{!I.current&&P&&f?.(),I.current=P},[P,f]),i(()=>{k(h)},[h]);const N=v(eD.Banner,_&&eD.toneVariant[_],m&&eD.withHeading,eD.colorVariant[c]),R=Boolean(r&&m),M=!R||R&&!S,D=o&&d("button",{type:"button",className:eD.Button,onClick:()=>{"function"==typeof g&&g(),k(!0)},"aria-label":b("closeNotification"),"aria-hidden":!!A||void 0,tabIndex:A?-1:void 0,children:d(mh,{type:"x",size:"small"})}),O=d("button",{type:"button",className:eD.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(mh,{size:"small",type:S?"chevron-down":"chevron-up"})});return P?null:d("div",{className:N,role:"critical"===_?"alert":"status",...(e||t)&&{tabIndex:-1},ref:function(e){C.current=e,x.current=e},id:u,children:[!l&&d("div",{className:eD.Icon,children:d(mh,{type:nD.get(_),size:"fill"})}),m&&d("div",{className:eD.Heading,children:d(LS,{level:3,children:m})}),R&&d("div",{className:eD.ControlCollapsible,children:O}),fw(n)&&d("div",{className:eD.Content,children:d(Mu.Provider,{value:"Banner",children:d(xu,{children:R?d(Bd,{open:M,id:`${E}-collapsible-area`,children:[m&&d(pN,{blockSize:"small-200"}),n]}):d(y,{children:[m&&d(pN,{blockSize:"small-200"}),n]})})})}),D&&d("div",{className:eD.ControlDismiss,children:D})]})}const aD=["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}$`)}),iD=()=>{const e=re(Sf),{observability:t}=ae();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,aD.some(e=>e.test(i))?a:(t.error(new oD(`Invalid target (${e}) and field (${r}
2) combination`)),"cart");var i},[e,t])},oD=class extends Error{constructor(){super(...arguments),this.name="InvalidTargetError"}},sD=new Set([Ck.InputInvalid,Ck.InputRequired]);function lD(e){return!sD.has(e)}function cD(e,t){return!!e&&e.target===t.target&&e.errorType===t.errorType&&e.value===t.value&&e.message===t.message}function uD(e){const{message:t,errorType:n,errorValue:r,children:o}=e,s=iD()(),l=Kg(),c=a(l),u=a(null),p=a(),m=a(!0);c.current=l;const h=e=>{c.current({...e,timestamp:new Date})},g=No(e=>{m.current&&cD(p.current,e)&&lD(e.errorType)&&h(e)},250);return i(()=>{const e=n||function(e){switch(e){case"cart.buyerIdentity":return Ck.ContactError;case"cart.deliveryGroups[0].deliveryAddress":return Ck.DeliveryError;case"cart.paymentLines[0].billingAddress":case"cart.paymentLines[0]":return Ck.PaymentError;case"cart.discountCode":return Ck.DiscountError;default:return Ck.CheckoutError}}(s),a=t??u.current?.textContent??"",i={target:s,errorType:e,value:r||null,message:a};cD(p.current,i)||(p.current=i,lD(e)?g(i):h(i))}),i(()=>()=>{m.current=!1},[]),d("div",{ref:u,children:o})}function dD(e){const{errorType:t,errorValue:n,children:r,...a}=e;return d(rD,{...a,children:d(uD,{errorType:t,errorValue:n,children:r})})}function pD({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(dD,{...i,errorType:n??Ck.CheckoutError,children:o}):d(rD,{...i,children:o})}function mD(){const e=ZM().value;return e?d(pD,{notice:e,errorType:Ck.DeliveryError}):null}function hD(){const e=ge().allViolations,n=t(()=>(e.value?.filter(e=>Ro(e.code))??[]).filter((e,t,n)=>t===n.findIndex(t=>t.code===e.code))),r=t(()=>n.value.length>0);return d(x,{when:r,children:d(iy,{gap:"base",children:d(H,{each:n,getKey:e=>e.code,children:({localizedMessage:e,nonLocalizedMessage:t})=>d(dD,{errorType:Ck.PaymentError,tone:"critical",children:e||t})})})})}function gD(){const{allViolations:e}=ge();return t(()=>{const t=e.value?.filter(e=>bP.has(e.code))||[];return{violations:t,hasViolations:t.length>0}})}const fD=()=>{const{violations:e,hasViolations:t}=gD().value;return t?d(iy,{gap:"base",children:e.map(({code:e,localizedMessage:t,nonLocalizedMessage:n})=>d(dD,{errorType:Ck.DiscountError,tone:"warning",children:t||n},e))}):null};function yD(){const e=ge().allViolations,{router:n,checkout:{identity:r}}=ae(),o=m(null),{shippingAddress:s}=qe(),l=T(zt(s.value.countryCode)),c=t(()=>tv(e.value??[])),u=t(()=>function(e=[]){const t=e.filter(({code:e})=>Mo.has(e));if(1===t.length&&"MERCHANDISE_CART_UPDATED_BASED_ON_COUNTRY"===t[0].code)return t[0]}(e.value));i(()=>n.beforeNavigate(()=>{o.value=null}),[o,n]);const d=a(r.current.value);return k(()=>{const e=r.current.value;e!==d.current&&void 0!==d.current&&(o.value=null),d.current=e}),k(()=>{const e=u.value;e&&e!==o.peek()&&(o.value=e)}),t(()=>{const t=u.value??o.value,n=t?{...t,tone:"info"}:void 0;let r;return c.value||l.value.loading||(r=e.value?.find(e=>"MERCHANDISE_CART_AND_CURRENCY_UPDATED_BASED_ON_COUNTRY"===e.code)),{banner:n,toast:r}})}function vD(){const e=yD(),t=kh(),n=a(null),r=No(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 _D(){const{shopPay:e,embed:t,mobileCheckoutSdk:n,checkout:{identity:r}}=ae(),a=e.app.config,i=Boolean(t?.isCheckoutKit()||t&&"shopPay"!==r.current.value)||n.enabled||Ci(a);return{isAppLayout:i,isWebLayout:!i}}class bD extends Error{constructor(){super(...arguments),this.name="BuyWithPrimeChangeLinkError"}}function PD(e){const n=qe().paymentLines;return t(()=>function(e,t){const[n]=pn(e,[t]);if(!n?.method?.walletParams)return null;const{checkout_session_id:r}=n.method.walletParams;return r}(n.value,e))}function kD(){const{i18n:e}=ae(),{href:t,onClick:n}=Zk();return d(ry,{href:t,onClick:n,children:e.translate("account_management.checkout_as_guest_link")})}const SD=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"]]),wD=["SHOP_PAY_DECLINED"];function CD(e){const{i18n:t}=ae();let n="generic_error";return e&&(n=SD.get(e.code)||"generic_error"),t.translate("payment_errors",{scope:n,...e&&wD.includes(e.code)&&{checkout_as_guest_link:d(kD,{})}})}const ED=["AMOUNT_TOO_SMALL"];function xD(){const[e]=[{isBuyWithPrime:!0,checkoutSessionId:PD(In.BuyWithPrime).value},{isBuyWithPrime:!1,checkoutSessionId:PD(In.AmazonPay).value}].filter(({checkoutSessionId:e})=>Boolean(e)),{i18n:n,observability:r}=ae(),{error:a,hasError:i}
2=pv(Do),o=a&&ED.includes(a),s=CD(o?{type:"payment",code:a}:void 0),{inMemoryAmazonPayParts:{hasPaymentSheetError:l,sdkStatus:c}}=_n(),u=t(()=>{const e=c.value;return e.status===n_.Available?e.sdk:void 0});if(!i||!e)return null;const{isBuyWithPrime:p,checkoutSessionId:m}=e;return d(x,{when:u,children:e=>d(dD,{tone:"critical",errorType:Ck.PaymentError,children:d(ZE,{children:o?s:d(y,{children:[n.translate("amazon_pay.error_page.payment_decline.message"),d(ry,{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 bD(`Error on changing buyer payment method. Details: ${t}`,{cause:t}))}},children:n.translate("amazon_pay.error_page.payment_decline.link")})]})})})})}const ID=new Map([["invalid_config","critical"],["config_missing_required_fields","critical"],["unusable_partial_address","critical"],["recovery_notice","critical"],[ba,"info"]]),AD=()=>{const e=m(!1),n=m(!1),r=xv(),a=ge().allViolations,i=t(()=>a.value?.some(e=>Oo.has(e.code))??!1);return k(()=>{i.value&&(n.value=!0),!i.value&&e.value&&(e.value=!1,n.value=!1)}),t(()=>{const t=n.value&&!e.value,a=r.value;return t&&a?{code:kv.PaymentMethodIncompatibleWithPaymentTerms,localizedMessage:a,tone:"info",onDismiss:()=>{e.value=!0}}:null})};function TD(){!function(){const{shippingAddress:e}=qe(),{inMemoryGooglePayParts:{paymentSheetError:t},inMemoryPayPalParts:{paymentSheetError:n}}=_n();i(()=>{let r=!0;return e.fields.countryCode.subscribe(()=>{r?r=!1:(t.value?.type===ba&&(t.value=void 0),n.value?.type===Pa&&(n.value=void 0))})},[e,t,n])}();const e=function(){const{i18n:e}=ae(),{paymentSheetError:n}=_n().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:kv.PaymentSheetViolations,tone:t??"critical",localizedMessage:a[e],nonLocalizedMessage:a[e]}})}(),a=function(){const{i18n:e}=ae(),{shippingAddress:n}=qe(),{inMemoryGooglePayParts:{paymentSheetError:r}}=_n(),a=T(zt(n.value.countryCode));return t(()=>{const t=r.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===ba){const t=a.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})(),i=t?ID.get(t):"critical";if(n)return{code:kv.PaymentSheetViolations,tone:i,localizedMessage:n,nonLocalizedMessage:n,onDismiss:"info"===i?()=>r.value=void 0:void 0}})}(),o=T(function(){const{shop:e,i18n:t,checkout:{configuration:n}}=ae(),{shippingAddress:a,paymentLines:i}=qe(),o=a.value,s=ge(),{value:l}=s.paymentMethods,{inMemoryPayPalParts:{paymentSheetError:c}}=_n(),{details:u,loading:d}=zt(o.countryCode),{value:p}=s.allViolations,m=zy(o.countryCode),h=e.hasFlagEnabled(va),g=r(()=>_a({paymentLines:i.value,isOnePage:n.layout.isOnePage.value})?p?.filter(qS)??[]:[],[p,i,n.layout.isOnePage.value]),f=r(()=>h&&function({violations:e,getAddressErrorsFromViolations:t}){const n=Array.from(e);return 1===n.length&&VS({missingAddressField:BS({addressErrors:t("shipping",n)}),violations:n})}({violations:g,getAddressErrorsFromViolations:m}),[g,m,h])?void 0:g[0],y=c.value?.type===ba,v=c.value?.type===Pa,_=r(()=>{const e=ka(l,"PAYPAL_EXPRESS");if(y&&!e){const e=d?o.countryCode:u?.name;return e?t.translate("wallets.errors.unavailable.unavailable_for_c
2ountry",{walletName:t.translate("brand.paypal"),countryName:e}):t.translate("wallets.errors.unavailable.description",{walletName:t.translate("brand.paypal")})}},[u?.name,d,l,y,o.countryCode,t]);if(v){const e=t.translate("shipping_errors.unavailable_address_country");return{code:kv.PaymentSheetViolations,tone:"critical",localizedMessage:e,nonLocalizedMessage:e,onDismiss:()=>{c.value=void 0}}}return _?{code:kv.PaymentSheetViolations,tone:"info",localizedMessage:_,nonLocalizedMessage:_,onDismiss:()=>{c.value=void 0}}:f?{code:kv.PaymentSheetViolations,tone:"critical",localizedMessage:t.translate("wallets.recovery_notice"),nonLocalizedMessage:t.translate("wallets.recovery_notice")}:void 0}()),s=function(){const{receiptErrorSignal:e}=_n();return t(()=>{const t=e.value;if(t)return{code:kv.PaymentSheetViolations,tone:"critical",localizedMessage:t,nonLocalizedMessage:t}})}(),l=HS(),c=jS({isPayWithPayPalButton:!1}),u=Dv(),d=T(function(){const{inMemoryApplePayParts:{paymentSheetError:e,subscriptionReviewTransition:t}}=_n(),{i18n:r,checkout:a,shop:i}=ae(),o=wv(),s=i.hasFlagEnabled(bn),l=a.configuration.layout.isOnePage.value,c=ec({applePaySubscriptionsDecelerationActive:o,applePayThreePageVaultedReviewEnabled:s,isOnePageCheckout:l}),{queryParam:u,errorMessage:d,errorTitle:p,tone:m,shouldSuppressNotice:h}=Yv({applePayPaymentSheetError:e,applePaySubscriptionReviewTransition:t,isApplePaySubscriptionReviewLayoutSupported:c}),g=n(()=>({code:kv.PaymentSheetViolations,tone:"warning",localizedMessage:r.translate("wallets.errors.subscription_review_required")}),[r]);if(u&&!h)return u===Pn?g():{code:kv.PaymentSheetViolations,localizedTitle:p,tone:m,localizedMessage:d}}()),p=AD();return t(()=>{const t="error"===c.value.status,n=Boolean(p.value),r=u.value||s.value||d.value||e.value||a.value||(n?null:o.value)||(t?null:l.value);if(r)return"string"==typeof r?{code:kv.PaymentSheetViolations,localizedMessage:r,nonLocalizedMessage:r,tone:"critical"}:r})}const LD=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"])]),ND=["noAddressLocation","stockProblems","thankYou"],RD=new Set(["TIP_TIPS_NOT_ALLOWED_FOR_B2B"]),MD=new Set(["PAYMENTS_METHOD","PAYMENTS_TERMS_CHANGED"]),DD=[...Kn,...zo,...Bo,...bP,...Vo,...RD,...MD,...Fo,...Uo,...qo,...jo,...Ho,...vP,...$o,...da,...Yo,...Xn,...on,...ni,...Oo,...Wo,...LD,"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 OD({children:e,id:t}){return d("li",{id:t,className:"_1585eob1 _1585eob0 _1fragemws _1fragemzh",children:e})}var zD={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}=Qm({gap:e}),o=v(zD.UnorderedList,t&&zD.listStyleVariant[t],i);return d("div",{className:zD.Wrapper,children:d("ul",{className:o,role:"none"===t?"list":void 0,"aria-label":n,id:a,children:r})})}function VD(){const e=ge().buyerIdentity,n=Qc(),{shippingAddress:r}=qe();return t(()=>{const t=e.value?.purchasingCompany,a=!!t?.location.shippingAddress&&Jn(r.value,t.location.shippingAddress);return n.value&&!a})}function FD(){const{i18n:e,shop:n,checkout:r}=ae(),{allViolations:a,paymentLines:i,paymentMethods:o}=ge(),s=Qc(),l=r.configuration.layout.isOnePage.value,c=pc();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=>Ro(e.code))||[];return 0===u.length?null:{violations:u,noticeType:kv.PaymentsViolations,noticeTitle:e.translate("notice_banner.violations_title",{violation:e.translate("notice_banner.individual_violations_title",{scope:kv.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 UD(){const{client:e,router:t}=ae(),n=e.unstable_getSerialization("amazonQueryParams"),a=_n().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(Go.map(e=>[e,r[e]]))},[o,i,n,a])}function qD(){const{router:e}=ae();return{searchParams:UD(),isThankYouPage:e.currentUrlMatches("/thank-you")}}function jD(){const{paymentMethods:e}=ge(),{paymentLines:n}=qe(),{searchParams:r,isThankYouPage:i}=qD(),o=T(r),s=T(i),l=a(!1),c=a(!1);return t(()=>{const t=o.value,r=n.value,a=e.value,i=t.wallet===In.BuyWithPrime&&!t.amazon_cancelled,[u]=pn(r,[In.BuyWithPrime]),d=Boolean(u);return i&&(l.current=!0),d&&(c.current=!0),!c.current||d||i||(l.current=!1,c.current=!1),Jo({paymentLines:r,paymentMethods:a,urlParam
2s:{wallet:l.current?In.BuyWithPrime:null,amazon_cancelled:null},isThankYouPage:s.value})})}function HD(){const{paymentLines:e}=qe(),{checkout:n}=ae(),r="shopPay"===n.identity.current.value;return t(()=>Ko({paymentLines:e.value,isOnePage:n.configuration.layout.isOnePage.value,isShopPayActive:r}))}function $D(){const e=function(){const e=ge().allViolations,{i18n:n,url:r}=ae();return t(()=>{const t=e.value?.filter(e=>Fo.has(e.code))??[];if(!t.length)return null;const a=d(y,{children:n.translate("notice_banner.return_to_cart_to_update_quantities",{return_to_cart_link_text:d(ry,{tone:"monochrome",href:r.cart(),children:n.translate("notice_banner.return_to_cart_link_text")})})});return 1===t.length?{code:t[0].code,localizedTitle:t[0].localizedMessage||t[0].nonLocalizedMessage,localizedMessage:a,collapsible:!1,tone:"critical"}:{code:kv.MerchandiseQuantityRulesNotMet,localizedTitle:n.translate("general.errors.merchandise.quantity_rules_not_met"),localizedMessage:a,collapsible:!1,tone:"critical"}})}(),n=TD(),i=function(){const{checkout:e,i18n:t}=ae(),{configuration:n}=e,a=e.latestReceipt.value,{lastJourneyProgression:i}=he(),o=n.layout.isOnePage.value,s=jD(),l=r(()=>"failed"===a?.status&&"payment"===a.failure?.type&&"PRE_CHARGE_ERROR"===a?.failure.code&&"success"!==i.value.type,[i.value,a])&&(o||s.value),{inMemoryAmazonPayParts:{buyerDetails:c}}=_n(),u=l||c.value.error,d=r(()=>l?kv.PaymentsViolations:kv.OtherViolations,[l]);return u?{code:d,localizedMessage:t.translate("wallets.errors.generic",{walletName:t.translate("brand.amazon_pay")}),tone:"critical"}:null}(),o=function(){const e=ge().merchandiseLines,{i18n:n}=ae();return t(()=>e.value?.sellingPlanMismatch?{code:kv.SellingPlanDigest,localizedMessage:n.translate("notice_banner.subscription_changed"),status:"warning"}:void 0)}(),l=yD().value.banner,c=function(){const{taxes:e,merchandiseLines:n}=ge(),{i18n:r}=ae(),i=a("unset"),o=a(),s=pc();return t(()=>{const t=e.value,a=n.value?.priceMismatch,l="information"===s.value.currentPage?.id,c="pending"===t?.status?void 0:t?.status;return"unset"===i.current&&c&&(i.current=c),a&&"unset"!==i.current&&c&&i.current!==c?(o.current={code:kv.TaxExemption,localizedMessage:r.translate("change_country.cart_updated_based_on_country")},i.current=c):a&&!l||(o.current=void 0),o.current})}(),u=function(){const e=ge().buyerIdentity.value?.purchasingCompany,n=!ae().checkout.configuration.layout.isOnePage.value,a=function(){const{i18n:e,shop:n}=ae(),r=ge().allViolations;return t(()=>0===(r.value?.filter(e=>ni.has(e.code))||[]).length?null:{code:kv.ContactInformationViolations,localizedTitle:e.translate("notice_banner.contact_information.title"),tone:"critical",localizedMessage:e.translate("notice_banner.contact_information.header",{emailLink:d(ry,{href:`mailto:${n.contactEmail}`,children:e.translate("notice_banner.contact_information.email_link")})})})}().value,i=function(){const{i18n:e,router:t}=ae(),n=t.currentUrl.value,[a,i]=s(void 0),o="true"===n.searchParams.get("company_location_changed");return r(()=>!0!==a&&o?(i(!1),{code:kv.CompanyLocationChanged,localizedMessage:e.translate("notice_banner.company_location_changed"),onDismiss:()=>i(!0)}):null,[a,e,o])}(),o=function(){const{i18n:e,shop:t,checkout:n}=ae(),[r,a]=s(!1),i=pb(),o=Qc(),l=n.configuration.layout.isOnePage.value;return r||!i.value||o.value||l||!n.isShippingRequired.value?null:{code:kv.ShippingAddressIsMissing,localizedTitle:e.translate("thank_you.missing_shipping_address_banner.title"),localizedMessage:d(rA,{children:e.translate("thank_you.missing_shipping_address_banner.text_html",{contact_us:d(ry,{href:`mailto:${t.contactEmail}`,children:e.translate("thank_you.missing_shipping_address_banner.contact_us")})})}),status:"info",onDismiss:()=>a(!0)}}(),l=function(){const{i18n:e,shop:n,checkout:r}=ae(),a=Qc(),i=VD(),o=wS(),s=r.configuration.layout.isOnePage;return t(()=>{const{deliveryAddressErrors:t}=o.value;if(s.value||i.value||0===t.length)return null;const r=a.value?d(Jf,{children:e.translate("notice_banner.delivery_address_validation_errors_banner.use_different_address")}):d(Jf,{children:e.translate("notice_banner.delivery_address_validation_errors_banner.text_html",{contact_us:d(ry,{href:`mailto:${n.contactEmail}`,tone:"monochrome",children:e.translate("notice_banner.delivery_address_validation_errors_banner.contact_us")})})}),[l]=t,c=1===t.length;return{code:kv.DeliveryAddressValidationErrors,tone:"critical",localizedTitle:c?l.message:e.translate("notice_banner.delivery_address_validation_errors_banner.title"),localizedMessage:c?r:d(y,{children:[d(BD,{children:t.map(e=>d(OD,{children:d(Jf,{children:e.messageNode??e.message})},`${e.target}${e.message}`))}),r]})}})}().value,c=(()=>{const e=m(!1),{allViolations:n}=ge();return t(()=>{const t=n.value?.filter(e=>RD.has(e.code))||[],r=t.length>0?t[0]:null;return e.value||!r?null:{code:kv.TipsViolations,localizedMessage:r.localizedMessage||r.nonLocalizedMessage,status:"warning",onDismiss:()=>e.value=!0}})})().value,u=ZM().value,p=(()=>{const{i18n:e}=ae(),n=ge().allViolations;return t(()=>0===(n.value?.filter(e=>MD.has(e.code))||[]).length?null:{code:kv.PaymentsViolations,localizedMessage:e.translate("payment_errors.available_methods_updated")})})().value,h=FD().value,g=function(){const{i18n:e,shop:n,checkout:r}=ae(),{allViolations:a}=ge(),i=Qc(),{paymentLines:o}=qe();return t(()=>{if(Boolean(Dt(o.value,"APPLE_PAY"))&&!r.isShippingRequired.value)return null;if(i.value)return null;const t=a.value?.filter(e=>Kn.has(e.code))||[];return 0===t.length?null:{violations:t,noticeType:kv.DeliveryViolations,noticeTitle:e.translate("notice_banner.violations_title",{violation:e.translate("notice_banner.individual_violations_title",{scope:kv.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")})})}})}().value,f=function(){const{buyerIdentity:e,allViolations:n}=ge(),{i18n:r,shop:a,observability:i}=ae();return t(()=>{if(!e.value?.purchasingCompany)return null;const t=(n.value||[]).filter(e=>!DD.includes(e.code));for(const e of t)i.counter({name:"b2b_unhandled_violations",value:1,attributes:{violation:e.code}});return 0===t.length?null:{violations:t,noticeType:kv.OtherViolations,noticeTitle:r.translate("notice_banner.violations_title",{violation:r.translate("notice_banner.individual_violations_title",{scope:kv.OtherViolations})}),noticeHeader:r.translate("notice_banner.all_violations_content",{emailLink:d("a",{href:`mailto:${a.contactEmail}`,children:r.translate("notice_banner.all_violations_email_link")})})}})}().value,{currentDetour:v}=pc().value,_=v?.type&&ND.includes(v.type),{shippingAddress:b}=qe();if(!e||_)return[];const P=b.peek(),k=e?.location.shippingAddress||{},S=Jn(P,k);return[...h?[XM(h)]:[],...g?[XM(g)]:[],...f?[XM(f)]:[],...a?[a]:[],...i?[i]:[],...o?[o]:[],...l?[l]:[],...c?[c]:[],...u&&n&&S?[u]:[],...p&&n?[p]:[]]}(),p=function(){const e=ge(),{allViolations:n}=e,a=e.paymentLines?.value?.lines,{lastJourneyProgression:i}=he(),o=Boolean(Dt(a,"APPLE_PAY")),s=function(){const{client:e,i18n:t}=ae(),n=e.unstable_getSerialization("logoutUrl")||"",r={PAYMENTS_WALLET_PAYPAL_EXPRESS_ADDRESS_INVALID:t.translate("wallets.errors.terminal",{walletName:t.translate("brand.paypal")}),PROPOSAL_SESSION_IDENTIFIER_NOT_UNIQUE:t.translate("session_errors.session_not_unique"),PROPOSAL_SESSION_ALREADY_FINISHED:t.translate("session_errors.session_already_finished"),DISCOUNTS_CURRENTLY_INACTIVE:t.translate("discount_errors.generic_error"),DISCOUNTS_NO_ENTITLED_LINE_ITEMS:t.translate("discount_errors.generic_error"),DISCOUNTS_USAG
2E_LIMIT_REACHED:t.translate("discount_errors.generic_error"),DISCOUNTS_CUSTOMER_NOT_ELIGIBLE:t.translate("discount_errors.generic_error"),DISCOUNTS_CUSTOMER_USAGE_LIMIT_REACHED:t.translate("discount_errors.generic_error"),BUYER_IDENTITY_COMPANY_PURCHASE_PERMISSION_REQUIRED:t.translate("b2b_errors.lost_b2b_purchasing_permissions",{logout_url:d(ry,{href:n,children:t.translate("b2b_errors.log_out_link_text")})}),BUYER_IDENTITY_LOST_ACCESS_TO_COMPANY:t.translate("b2b_errors.lost_b2b_purchasing_permissions",{logout_url:d(ry,{href:n,children:t.translate("b2b_errors.log_out_link_text")})}),ARTIFACT_DISSATISFACTION:t.translate("artifact_errors.artifact_dissatisfaction_without_violation"),BUYER_IDENTITY_PRESENTMENT_CURRENCY_DOES_NOT_MATCH:t.translate("general.errors.buyer_identity.buyer_identity_presentment_currency_does_not_match"),[ns]:t.translate("remote.errors.currency_mismatch_removal")};return(e,t)=>{const n=r[e.code];return{...e,localizedMessageHtml:n??e.localizedMessageHtml,localizedMessage:n??e.localizedMessage,tone:t}}}(),l=HD(),c=t(()=>("success"===i.value.type||"error"===i.value.type)&&"completion"===i.value.negotiationStage),{criticalViolations:u,warningViolations:p}=r(()=>{const e=n.value||[],t=[],r=[];for(const n of e)"ConfirmChangeViolation"!==n.__typename&&"UnprocessableTermViolation"!==n.__typename&&"RemoveTermViolation"!==n.__typename&&"ArtifactDissatisfactionViolation"!==n.__typename||(Qo.has(n.code)&&t.push(s(n,"info")),Xo.has(n.code)&&r.push(s(n,"warning")),Zo.has(n.code)&&c.value&&t.push(s(n,"critical")),es.has(n.code)&&t.push(s(n,"critical")),o&&!l.value&&ts.has(n.code)&&t.push(s(n,"critical")));return{criticalViolations:t,warningViolations:r}},[n.value,c.value,o,l.value,s]),m=r(()=>u.length>=1?u.map(e=>e.priority??0).reduce((e,t)=>e>t?e:t):0,[u]),h=r(()=>u.length>=1?u.filter(e=>(e.priority??0)>=m):u,[u,m]);return p.concat(h)}(),h=function(){const{source:e}=ae(),{paymentLines:n,buyerIdentity:r}=ge(),a=FD(),i="draftOrder"===e.type;return t(()=>i&&!r.value?.purchasingCompany&&n.value?.lines?.some(e=>"deferred"===e.method.type)?a.value:null)}(),g=function(){const e=ge().allViolations,{i18n:n}=ae(),r=pc(),a=m(void 0);return hc(e=>{"complete"!==e.type&&"invalid"!==e.type&&"failed"!==e.type&&(a.value=e.negotiationStage)}),t(()=>{const t=e.value?.filter(({code:e})=>"DELIVERY_DELIVERY_LINE_DETAIL_CHANGED"===e);if(!t?.length)return;const i="payment"===r.value.currentPage?.id;return"completion"===a.value||"negotiation"===a.value&&i?{...t[0],tone:"critical",localizedMessage:n.translate("payment.shipping_rate_updated"),localizedMessageHtml:n.translate("payment.shipping_rate_updated"),priority:1}:void 0})}(),f=ae().checkout.configuration.layout.isOnePage.value,{allViolations:v}=ge(),_=t(()=>tv(v.value??[])),b=AD();return[...p,...h.value?[XM(h.value)]:[],...c.value?[c.value]:[],...o.value?[o.value]:[],...e.value?[e.value]:[],...n.value?[n.value]:[],...i?[i]:[],...u,...l&&!_.value?[l]:[],...b.value?[b.value]:[],...g.value&&!f?[g.value]:[]].filter(rs("localizedMessage"))}function YD(e,t){const n=e.peek()||{};Object.entries(t).some(([e,t])=>n[e]!==t)&&(e.value={...n,...t})}function WD(){const e=PD(In.AmazonPay),t=PD(In.BuyWithPrime),{hasError:r}=pv(Do),{checkout:a}=ae(),i=a.latestReceipt.value,o=i?.id,{persistedAmazonSignal:s}=_n();return{hasError:Boolean(r&&(e.value||t.value))&&o!==s.value?.receiptIdForPaymentDecline,clearError:n(()=>YD(s,{receiptIdForPaymentDecline:o}),[s,o])}}function GD(){const{checkout:e}=ae(),t=e.latestReceipt.value,{persistedApplePaySignal:a,inMemoryApplePayParts:{paymentSheetError:o}}=_n(),s=m(!1),l=m(!1),c=a.value,u=HD(),d=n(()=>{s.value=!0,l.value=!1},[s,l]),p=s.value,h=l.value;hc(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 i(()=>{g&&(o.value=void 0)},[g,o]),{hasError:g,clearError:d}}function JD(e,t,n,r){if("failed"!==e?.status)return!1;const a="draftOrder"===n&&"payment"===e.failure.type&&!0!==e.failure.hasOffsitePaymentMethod&&r===e.id;return t===e.id||a}function KD(){const[e,t]=rf(It.LastSeenErrorReceiptId),n=Rt(),{checkout:r,client:a,source:o}=ae(),l=r.latestReceipt.value,c=a.unstable_getSerialization("receipt")?.latestReceipt,u="FailedReceipt"===c?.__typename?c.id:void 0,[d,p]=s(()=>!n.peek()||JD(l,e,o.type,u));return i(()=>{const n=JD(l,e,o.type,u);p(n),"failed"===l?.status&&e!==l.id&&t(l.id),"failed"!==l?.status&&t(void 0)},[l?.id,l?.status]),d}function QD(e){return e.some(({code:e})=>SP.has(e))}function XD(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?!eO(e,n):!r||!r.includes(e.id));return a.length>0?a:null}const ZD=(e,t)=>e.toUpperCase()===t.toUpperCase(),eO=({discountLine:e},t)=>Boolean(t&&ZD(e.discount.title,t));function tO({inputRef:e,headingId:t,monorailSection:l}={}){const{discountCodeWarningSignal:c,reductionsErrorsSignal:u,reductionsValueSignal:d,derivedErrorMessageSignal:p,refreshNegotiationSignal:h,currentDiscountCodeAttemptSignal:g}=Je(),f=he(),{negotiate:y}=mc(),v=m(d.peek()),[_,b]=s(d.peek().length>0),{discountLines:P,paymentLines:S,reduction:w}=qe(),C=c.value,{checkout:E,i18n:x,userEvents:I,shop:A,shopPay:T,source:L}=ae(),N=is(A),R="shopPay"===E.identity.current.value,M=P.value,[D,O]=s([]),z=function(){const{i18n:e}=ae(),{voidedGiftCardsSignal:t}=Je(),a=t.peek(),i=r(()=>new Set([...vP,"REDUCTION_GIFT_CARD_ALREADY_APPLIED"]),[]),o=r(()=>({REDUCTION_GIFT_CARD_ALREADY_APPLIED:()=>e.translate("field_errors.gift_card_already_applied"),PAYMENTS_GIFT_CARD_DISABLED:()=>
2e.translate("field_errors.gift_card_invalid",{last_four_characters:(a[0]??"").slice(-4).toUpperCase()})}),[a,e]);return n(e=>e.reduce((e,t)=>i.has(t.code)?(e.push(o[t.code]()),e):e,[]),[o,i])}(),B=Tf(),{currentPage:V}=pc().value,F=kn("discountLines").value,U=a(0),[q,j]=s(!1),H=r(()=>M?.reduce((e,t)=>(t.message&&!D.includes(t.discount.title)&&e.push({id:ao(),discountCode:t.discount.title,message:t.message??"",discountLine:t,tone:"info"}),e),[]),[M,D]);i(()=>{F&&(U.current+=1)},[F,U]),i(()=>{F||j(!1)},[F]),i(()=>{ee(q&&F)},[C,F,U,q]);const $=a(V?.id);i(()=>{$.current!==V?.id&&($.current=V?.id,u.value=[])},[V?.id]);const Y=n(e=>{const t=c.value??[];c.value=XD(t,{ids:e}),B()},[B,c]),W=n(e=>{const t=H.filter(({id:t})=>e.includes(t)).map(({discountCode:e})=>e);O(e=>[...e,...t]),B()},[H,B]),G=n(e=>{d.value=e,e&&(v.value=e)},[d,v]),J=n(({clearWarnings:e=!0,preserveValue:t=!1}={})=>{t||(G(""),b(!1),g.value=null),e&&(c.value=null)},[g,c,G]),K=n(()=>{t&&document.getElementById(t)?.focus()},[t]),Q=n(e=>{G(e?.trim()),u.value.length>0&&(u.value=[])},[G,u]),X=n(()=>{u.value.length>0&&(u.value=[])},[u]),[Z,ee]=s(!1),te=n((e,t)=>{const n=[],r=[],a=c.value??[],i=g.value;for(const o of e){const e=pl===o.code;switch(o.type){case"InputValidationError":case"UnprocessableTermViolation":if(_P.has(o.code)){n.push(o);break}"negotiation"!==t&&vP.has(o.code)&&n.push(o);break;case"RemoveTermViolation":case"ConfirmChangeViolation":{const a="ConfirmChangeViolation"===o.type,s=Ul(o.targetEntity),l=Boolean(i&&s&&ZD(s.title,i));if(ml.has(o.code)&&"completion"!==t&&!l)break;if(_P.has(o.code)){n.push(o);break}if("discountCodeTrigger"!==s?.discount.type||!cl.has(o.code))break;const c=kP.has(o.code),u={message:o.localizedMessage??o.nonLocalizedMessage,messageHtml:o.localizedMessageHtml,discountLine:s,tone:c?"info":"warning",discountCode:s.discount.title,id:ao(),errorCode:o.code,isConfirmChangeViolation:a};if(e){r.push(u);break}i&&!l||r.push(u);break}}}return u.value=n.slice(-1),i||r.unshift(...a.filter(e=>e.errorCode===pl)),c.value=r.length>0?r:null,{hasWarnings:r.length>0,hasPreserveInputErrors:e.some(e=>_P.has(e.code))}},[g,c,u]),ne=n(async()=>{await y({legacyFiltering:{include:[]},silenceViolations:[...ar],onComplete:e=>{E.unstable_overwriteLatestReceipt(void 0),h.value=!1,"success"!==e.status&&"error"!==e.status||te(e.errors)}})},[te,y,E,h]);k(()=>{const e=E.latestReceipt.value;!h.peek()&&e&&$y(e)&&"discount"===e.failure?.type&&(h.value=!0,o(()=>{ne()}))}),hc(n(e=>{"errors"in e&&te(e.errors,e.negotiationStage)},[te])),k(()=>{const e=f.lastJourneyProgression.value;"error"===e.type&&"completion"===e.negotiationStage&&o(()=>te(e.errors,"completion"))}),os(({parts:e,reason:t})=>{const n=c.peek()??[],r=g.peek(),a=r&&n.every(e=>!eO(e,r));if(0===n.length)return{behavior:"allow"};if("completion"===t||a)return c.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===pl||((e,t)=>t.some(t=>("discountCodeTrigger"===t.discount.type||"code"===t.discount.type)&&eO(e,t.discount.title)))(r,e))return t;const a=eO(r,n);return!n||a?t.set(r.discountCode.toUpperCase(),r):t},new Map);return[...r.values()]})(i,n,r);return o.length>0&&(e.discountLines.value=[...i,...o.map(({discountLine:e})=>e)]),{behavior:"allow"}});const re=n(e=>(e||S.value).filter(e=>"giftCard"===e.method.type&&"code"in e.method).map(e=>e.method.code),[S]),ie=n(()=>P.value.filter(e=>"code"===e.discount.type).map(e=>e.discount.title),[P]),oe=n(async()=>{j(!0);const t=d.value,n=JSON.parse(JSON.stringify(S.value));g.value=t,e?.current?.blur(),K();const r=ie(),a=new Set(P.value.filter(e=>"code"===e.discount.type&&e.discount.codeHidden).map(e=>e.discount.title));await y({legacyFiltering:{include:["deliveryNext"]},silenceViolations:Ue(["deliveryNext"]),fieldsToResolve:[...yP],loading:["deliveryNext","discountLines"],customizeNegotiation:e=>({...e,reduction:{code:t}}),onComplete:e=>{if("success"===e.status||"error"===e.status){const{hasWarnings:i,hasPreserveInputErrors:o}=te(e.errors);J({clearWarnings:!i,preserveValue:o});const s=QD(e.errors);if(s&&e.errors.some(e=>kP.has(e.code))){const e=ie(),n=r.filter(t=>!e.includes(t));n.length>0&&(1===n.length&&a.has(n[0])?(Zu({content:x.translate("order_summary.discount_has_been_removed")}),Zu({content:x.translate("order_summary.discount_code_applied_with_code",{code:t})})):Zu({content:n.length>1?x.translate("order_summary.discount_code_replaced_multiple",{code:t}):x.translate("order_summary.discount_code_replaced",{old_code:n[0],code:t})}))}const c=e.negotiated.paymentLines?.lines||[],u=re(n),d=re(c),p=u.reduce((e,t)=>
2(e[t]=!0,e),{}),m=d.some(e=>void 0===p[e]),h=n.reduce((e,t)=>("giftCard"===t.method.type&&null!=t.cost&&t.cost.amount>0&&(e[Po(t.method)]=!0),e),{}),g=N&&c.some(e=>"giftCard"===e.method.type&&null!=e.cost&&e.cost.amount>0&&void 0===h[Po(e.method)]);if(!s){if(N&&(m||g)){const e=S.peek();S.value=[...e.filter(e=>!ss(e)),...c.filter(ss)]}const{runningTotal:r,merchandiseLines:a}=e.negotiated,i=r&&r.amount<=0;Boolean(!i||ls(a?.lines))||n.some(e=>"walletsPlatformPaymentMethod"===e.method.type&&e.method.name===In.BuyWithPrime)||function(e,t){const n=as(t);e.value=n}(S,N&&(m||g)?c:n);const o=x.translate("order_summary.discount_code_applied_with_code",{code:t});Zu({content:m||g?x.translate("order_summary.gift_card_applied"):o}),G(""),b(!1)}const f=e.errors.find(e=>SP.has(e.code)),y=()=>{if(!s)return m?"gift_card":"discount_code"};I.monorailEvent({schemaId:"checkout_reduction_attempted/2.0",payload:{shopId:parseInt(se(A.id),10),checkoutToken:L.checkoutSessionIdentifier??"checkout_identifier_undefined",event:s?"apply_reduction_failure":"apply_reduction_success",reductionType:y(),errorMessage:f?.nonLocalizedMessage,page:"checkout",section:l}}),R&&(s?I.monorailEvent({schemaId:"shopify_pay_payment_page_ui_interaction/1.2",payload:{...aa(L,E,A),action:"add_discount_failure"}}):I.monorailEvent({schemaId:"shopify_pay_payment_page_ui_interaction/1.2",payload:{...aa(L,E,A),action:m?"add_gift_card":"add_discount_success"}}))}},force:!0}),B()},[J,g,B,K,re,te,e,R,y,P,S,G,x,d,I,L,E,A,N,l,ie]),le=n(async e=>{const t=P.value,n=ie(),r=t.some(t=>"code"===t.discount.type&&t.discount.title===e&&t.discount.codeHidden);if(1===t.length&&K(),Vi(T)){const t=T.discountCodes.value.filter(t=>t!==e);T.updateDiscountCodes(t)}P.value=t.filter(t=>"code"!==t.discount.type||t.discount.title!==e),c.value=XD(c.value,{code:e}),O(t=>t.filter(t=>t!==e));const a=w.value;a?.code===e&&(w.value=void 0),R&&I.monorailEvent({schemaId:"shopify_pay_payment_page_ui_interaction/1.2",payload:{...aa(L,E,A),action:"remove_discount"}}),await y({legacyFiltering:{include:["deliveryNext"]},silenceViolations:Ue(["deliveryNext"]),fieldsToResolve:[...yP],loading:["discountLines","deliveryNext"],force:!0,onComplete:t=>{"success"!==t.status&&"error"!==t.status||te(t.errors),Zu({content:r?x.translate("order_summary.discount_has_been_removed"):x.translate("order_summary.discount_code_removed",{code:e}),role:"status"});const a=ie().filter(e=>!n.includes(e));a.length>0&&Zu({content:P.value.some(e=>"code"===e.discount.type&&e.discount.title===a[0]&&e.discount.codeHidden)?x.translate("order_summary.discount_has_been_applied"):x.translate("order_summary.discount_code_applied_with_code",{code:a[0]}),role:"status"})}}),B()},[T,P,w,R,y,B,K,I,L,E,A,te,c,ie,x]),ce=n(async e=>{const t=S.value;S.value=t.filter(t=>"giftCard"!==t.method.type||!("code"in t.method)||t.method.code!==e),1===S.value.length&&K(),R&&I.monorailEvent({schemaId:"shopify_pay_payment_page_ui_interaction/1.2",payload:{...aa(L,E,A),action:"remove_gift_card"}}),await y({legacyFiltering:{include:["paymentLines"]},silenceViolations:Ue(["paymentLines"])}),B()},[S,R,y,B,I,L,E,A,K]);return{loading:Z,handleSubmit:oe,handleNegotiationErrors:te,dirty:_,setDirty:b,removeDiscount:le,getGiftCards:re,removeGiftCard:ce,reductionCodeField:{value:d.value,valueSignal:v,onChange:Q,onInput:X,error:cs(u.value),errorSignal:p},discountCodeWarning:C,discountMessages:H,removeDiscountCodeWarnings:Y,removeDiscountCodeMessage:W,giftCardBannerErrors:z(u.value)}}function nO(){const{negotiate:e}=mc(),{email:t,phone:r,billingAddress:a,paymentLines:i}=qe(),{inMemoryApplePayParts:{asPaymentMethod:o}}=_n(),{checkout:{wallets:s}}=ae(),l=ge(),{value:c}=l.buyerIdentity,u=Boolean("CustomerProfile"===c?.customerProfile?.__typename),d=c?.purchasingCompany,p=Bv(),m=mP(),h=us({availableDeliveryAddresses:l.availableDeliveryAddresses?.value,mustSelectProvidedAddress:l.mustSelectProvidedAddress?.value}),g=n(()=>{const e={shouldResetBuyerInfo:!1,shouldRemoveWalletContent:!1,shouldRemoveBillingAddress:!1,forceClearLocalPickupFields:!1},t=o.value;return s.activeSession.value?{...e}:u?{...e,shouldRemoveWalletContent:t,shouldResetBuyerInfo:!t,shouldRemoveBillingAddress:!0}:t?{...e,shouldRemoveWalletContent:!0,shouldRemoveBillingAddress:!d}:p.value?{...e,shouldRemoveBillingAddress:!0,forceClearLocalPickupFields:!0}:{...e,shouldResetBuyerInfo:!0}},[s,u,o,p,d]),f=Lk(),y=Tk();return n(async({shouldPersist:n=!0}={})=>{const{shouldResetBuyerInfo:l,shouldRemoveWalletContent:c,shouldRemoveBillingAddress:u,forceClearLocalPickupFields:d}=g();c&&(i.value=An(i.value,{method:{type:"wallet",name:"APPLE_PAY"}})),y.value||f({shouldResetCustomerInfo:l,shouldRemovePaymentLine:!o.value,isConstrainedAddress:h}),d&&(t.value="",r.value=""),u&&(a.value=m("billing")??tc(a.value)),n&&!s.activeSession.value&&await e({silenceViolations:["non-stock"]})},[f,s,i,t,r,a,e,g,o,y,m,h])}function rO({shouldPersist:e}){const t=nO(),{walletUsedForSubmissionSignal:r,persistedApplePaySignal:a,inMemoryApplePayParts:{paymentSheetError:i,subscriptionReviewTransition:o}}=_n();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 aO(){const e=rO({shouldPersist:!1}),{clearError:t,hasError:r}=GD(),{checkout:a,router:i}=ae(),{clearForcedCheckoutLayout:o}=Rv(bn);return Nk({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 iO(){const{i18n:e}=ae(),{onClick:t}=aO(),n=e.translate("wallets.errors.processing_error_checkout_as_guest",{checkout_as_guest_link:d(ry,{onClick:t,children:e.translate("account_management.checkout_as_guest_link")})});return d(dD,{errorType:Ck.PaymentError,tone:"critical",children:d(iy,{alignItems:"start",ga
2p:"small-500",children:d(ZE,{children:n})})})}function oO(){const{inMemoryAmazonPayParts:{buyerDetails:e,buyerDetailsContentLoaded:n}}=_n(),r=kn("shippingAddress");return t(()=>n.value&&!e.value.loading&&!r.value)}function sO(e){const t=oO(),{hasViolations:n,violations:r}=iv(e);if(!n||!t.value)return null;const a=new Set;for(const i of r)a.add(i.localizedMessage??i.nonLocalizedMessage);return Array.from(a)}function lO({ignorePrefixes:e}={ignorePrefixes:[]}){const{i18n:t}=ae(),n=sO(new Set([...ds].filter(t=>e.every(e=>!t.startsWith(e))))),r=sO(new Set([...Kn,...Ho].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 cO(){return lO({ignorePrefixes:["DELIVERY_PHONE_NUMBER","DELIVERY_COMPANY"]}).errors??[]}function uO(){const{i18n:e}=ae(),t=cO();return t?.length?d(dD,{tone:"critical",errorType:Ck.PaymentError,children:[e.translate("wallets.errors.select_different_shipping_address_to_resolve_errors"),d(BD,{children:t.map(e=>d(OD,{children:d(Jf,{children:e})},e))})]},"amazon-pay-errors"):null}function dO(){const e=jD(),n=T(cO()),{persistedAmazonSignal:r,inMemoryAmazonPayParts:{hasPaymentSheetError:a}}=_n();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 pO(){const e=dO();return e.value?d(mO,{errorMessagesType:e.value}):null}function mO({errorMessagesType:e}){const{i18n:t,checkout:n}=ae(),r=n.configuration.layout.isOnePage.value,{value:a}=ge().paymentLines,{persistedAmazonSignal:o}=_n();return function(e="unknown"){const{observability:t}=ae();i(()=>{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"})},[])}(),i(()=>{const e=a?.lines.filter(e=>!("walletsPlatformPaymentMethod"===e.method.type&&e.method.name===In.BuyWithPrime));e?.length&&YD(o,{primeError:void 0})},[a,o]),"payment sheet error"===e||"terminal error"===e?d(dD,{errorType:Ck.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(uO,{}):null}function hO({errors:e,errorType:t}){return d(y,{children:e.map(e=>d(dD,{tone:"critical",errorType:t,children:e.messageNode??e.message},`${e.target}${e.message}`))})}function gO(e){if(e.startsWith("DISCOUNTS")||"ReductionViolations"===e)return Ck.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 Ck.MerchandiseError;case"PAYMENTS_SHIPPING_MUST_MATCH_BILLING":case"ShippingAddressIsMissing":case"DeliveryViolations":case"DeliveryAddressValidationErrors":return Ck.DeliveryError;case"PAYMENTS_WALLET_PAYPAL_EXPRESS_ADDRESS_INVALID":case"PAYMENT_MANUAL_PAYMENTS_NOT_ALLOWED_FOR_B2B":case"PaymentViolations":return Ck.PaymentError;default:return Ck.CheckoutError}}function fO(){const e=$D();return e.length>0?e.map(e=>d(pD,{notice:e,errorType:gO(e.code)},e.code)):null}function yO(){const{globalErrors:e}=wS().value;return e.length>0?d(hO,{errors:e,errorType:Ck.CheckoutError}):null}function vO(){const{merchandiseLineTransformerErrors:e}=function(){const{allViolations:e}=ge(),n=kn("allViolations");return t(()=>{const t=["MERCHANDISE_LINE_TRANSFORMERS_RUN_ERROR"];return n.value||!e.value?{merchandiseLineTransformerErrors:[]}:{merchandiseLineTransformerErrors:[...e.value.reduce((e,n)=>("UnprocessableTermViolation"===n.__typename&&t.includes(n.code)&&e.push({message:n.localizedMessage||n.nonLocalizedMessage,target:n.target}),e),[])].filter(vS())}})}().value;return e.length>0?d(hO,{errors:e,errorType:Ck.MerchandiseError}):null}function _O(){const{contactErrors:e}=wS().value,t=ax();return 0===e.length?null:t.value.contact?d(hO,{errors:e,errorType:Ck.ContactError}):null}function bO(){const e=dO();return Boolean(e.value)?d(pO,{}):null}function PO(){const{hasError:e}=WD(),t=KD();return e&&!t?d(xD,{}):null}function kO(){const{hasError:e}=GD();return e?d(iO,{}):null}function SO(){const{giftCardBannerErrors:e}=tO(),{value:t=[]}=ge().allViolations,n=ae().checkout.configuration.layout.isOnePage.value?void 0:e?.[0],r=t.find(e=>"PAYMENTS_GIFT_CARDS_UNAVAILABLE"===e.code);return r?d(dD,{errorType:Ck.DiscountError,tone:"critical",children:r.localizedMessage}):n?d(dD,{errorType:Ck.DiscountError,tone:"critical",children:n}):null}const wO=()=>{const{isAppLayout:e}=_D(),{embed:t,checkout:n}
2=ae(),r=n.configuration.layout.isOnePage.value,{lineItems:{priority:a="base"}}=th(),i=[fO(),yO(),vO(),_O(),bO(),PO(),SO(),kO()].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(iy,{gap:"small-200",padding:`@media (inline-size >= extraSmall) ${s?"none none small-100 none":"none"}, ${o}`,children:i})},CO=E(function({section:e="top"}){return{toast:d(vD,{}),top:d(wO,{}),reductions:d(fD,{}),delivery:d(mD,{}),payment:d(hD,{})}[e]});function EO({sectionId:e,children:t}){const{source:n}=ae(),o="simulated"===n.type,{sectionRef:s}=function(e){const{source:t}=ae(),n="simulated"===t.type,o=a(null),{allRenderedSections:s,getRenderedSection:l}=Je(),c=l({sectionId:e}),u=c.value;return i(()=>{if(n&&o?.current){if(!u.rendered&&o?.current){c.value={rendered:!0};const t=s.value;s.value={...t,[e]:!0}}return()=>{if(u.rendered){c.value={rendered:!1};const t={...s.value};e in t&&delete t[e],s.value=t}}}},[n,o,u,e,c,s]),r(()=>({sectionRef:o}),[o])}(e);return d(y,o?{children:[d("div",{ref:s,style:{display:"none"}}),t]}:{children:t})}const xO={id:"18855ddcbbe672966b615922c0349b29db289bb4e82c4444a93b2c3bfed688bb",type:"mutation",name:"UserDiscountDelete",source:"mutation UserDiscountDelete($code:String!,$shopifyDomain:String!){userDiscountDelete(code:$code,shopifyDomain:$shopifyDomain){userErrors{field message __typename}__typename}}"};function IO({children:e}){const{formStatus:t}=function(){const{negotiate:e}=mc(),{handleNegotiationErrors:t,discountCodeWarning:r}=tO(),{discountLines:a,reduction:o}=qe(),{shop:l,source:c,checkout:u,userEvents:d,shopPay:p}=ae(),m=p.user.wallet.value,h=function(){const{graphql:{shopPayGraphql:e},shop:{myshopifyDomain:t}}=ae();return n(async n=>{const{data:r,error:a}=await e.mutate(xO,{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(""),_=p.user.shopAccountUuid,b=n((e,t)=>
2{d.monorailEvent({schemaId:"shopify_pay_login_with_shop_sdk_discount_wallet_events/2.0",payload:{...aa(c,u,l),action:e,shopAccountUuid:t,shopPermanentDomain:l.myshopifyDomain,discountCode:y}})},[d,c,u,l,y]),P=n(async e=>{"success"===(await h(y)).status&&b("invalidated - discount had been deleted",e)},[h,b,y]),[k,S]=s(()=>a.value.length?"open":"closed"),w=n(e=>{const t=["InputValidationError","UnprocessableTermViolation","RemoveTermViolation"],n=new Set([..._P,"DISCOUNTS_CUSTOMER_USAGE_LIMIT_REACHED","DISCOUNTS_USAGE_LIMIT_REACHED",pl]);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 i(()=>{v(m.latestDiscount?.code??""),y&&S("negotiating_app_discount")},[y,m]),i(()=>{0===a.value.length&&S(e=>"negotiating_app_discount"===e?e:r?"open":"closed")},[r,a.value.length]),i(()=>{const n=y;if(!g&&"negotiating_app_discount"===k&&n){f(!0),o.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),o.value=void 0),S(i||r?"open":"closed")}},force:!0})}},[g,t,r,e,y,k,w,b,C,P,d,o,_.value]),{discountLines:a.value,formStatus:k,setFormStatus:S,walletDiscountCode:y}}();return"negotiating_app_discount"===t?d(qf,{inlineAlignment:"center",children:d($f,{})}):d(y,{children:e})}function AO({children:e,state:t,errors:n}){const r=iD(),o=Kg(),s=a([]);return i(()=>{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?Ck.InputInvalid:Ck.InputRequired,l="string"==typeof(c=e)||"number"==typeof c?c.toString():Ki(c)?c.message:ps(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 TO(){const{source:e}=ae(),n=ge().canUpdateDiscountCodes;return t(()=>(n.value??!0)&&!Yn(e))}function LO(){const e=ge(),n=e.paymentFlexibilityPaymentTermsTemplate,r=pt(),a=e.paymentMethods;return t(()=>(!e.buyerIdentity.value?.purchasingCompany||!n.value&&!r.value)&&a.value?.some(e=>"giftCard"===e.type))}const NO="_1MTFx";function RO({messages:e}){const t=e=>{return d(rA,{children:e.messageHtml?(t=e.messageHtml,null==t?null:d("span",{dangerouslySetInnerHTML:{__html:t}})):e.message});var t};return 1===e.length?d("div",{className:NO,children:t(e[0])}):d(BD,{children:e.map(e=>d(OD,{children:d("div",{className:NO,children:t(e)})},e.id))})}const MO=E(function({removeBanner:e,messages:t,grouped:a=!1}){const{i18n:i}=ae(),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(wf,{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(dD,{...c,errorType:Ck.DiscountError,children:d(RO,{messages:i})},a[0]):d(rD,{...c,children:d(RO,{messages:i})},a[0])})})});function DO({accessibilityLabel:e,children:t,graphic:n,id:r}){const a=fw(t);return d("div",{className:"_14brw1 _14brw0 _1fragempf _1fragemnm _1fragemt6 _1fragemrd _1fragem13d _1fragemzg _1fragem11x _1fragemzi",id:r,children:[d(iy,{columnGap:"small-400",alignItems:"center",direction:"inline",children:[n&&d("span",{className:a?"_14brw2":void 0,children:d(mh,{type:n})}),a&&d("span",{className:"_14brw3",children:d(Jf,{accessibilityVisibility:e?"hidden":void 0,dir:"auto",children:d(lA,{children:t})})})]}),e&&d(Jf,{accessibilityVisibility:"exclusive",dir:"auto",children:e})]})}var OO="_14gomm23 _14gomm22 _1fragemyb _1fragem11v _1fragem11z",zO="_14gomm27 _14gomm26 _1fragem6y",BO="_14gomm25 _14gomm24 _1fragemyk";const VO=wm(_(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=Nd(),S=id(),w=a(o);i(()=>{!w.current&&o&&p?.(),w.current=o},[o,p]);const C=v("_14gomm21 _14gomm20 _1fragemeg _1fragemdw _1fragemf0 _1fragemdc _1fragem64 _1fragem13d _1fragemzg _1fragemzi",{[OO]:n||k,[zO]:o}),E=e?S("removeItem",{label:e}):S("removeChip");return d("div",{id:l,className:C,role:"group",children:[d(FO,{"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(DO,{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",BO),"data-event-name":u,disabled:n,tabIndex:k?-1:void 0,type:"button",onClick:()=>n||k||"function"!=typeof _?void 0:_(),children:d(mh,{type:"x",size:"small"})})]})})),FO=_(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=qp(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(Zm,{"aria-describedby":u,className:v(BO,"_14gomm29 _14gomm28 _1fragem128"),href:g,onClick:f,ref:m,...y,children:e}):d("button",{"aria-describedby":u,"aria-hidden":!!r||void 0,className:BO,disabled:t,onClick:f,ref:m,tabIndex:r?-1:void 0,type:"button",...y,children:e}):d("div",{className:BO,ref:m,children:e})});function UO({reductionTags:e,headingId:t}){const{i18n:n}
2=ae(),r=TO(),a=ZN(),{removeDiscount:i,removeGiftCard:o}=tO({headingId:t});if(0===e.length)return null;let s=0;const l=e.map(e=>e.hideLabel?(s+=1,s):0),c=s;return d(iy,{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)=>{const a=e.hideLabel?n.translate("order_summary.discount_title"):e.code,s="giftCard"===e.originType?n.translate("order_summary.gift_card_masked",{last_characters:e.code.slice(-4)}):a;let u=s;"giftCard"===e.originType?u=n.translate("order_summary.gift_card_ending",{last_characters:e.code.slice(-4)}):e.hideLabel&&c>1&&(u=n.translate("order_summary.discount_title_with_position",{position:l[t]}));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(qf,{accessibilityRole:"list-item",className:"ZWcPq",children:[d(VO,{accessibilityLabel:u,graphic:p,id:`tag-${t}`,interestFor:g,removable:!g,onRemove:h,removeTrackingEvent:m,children:s.toUpperCase()}),g&&d(ym,{id:g,children:n.translate("order_summary.automatic_discount_tooltip")})]},`${e.originType}-${e.code}`)})})}function qO({headerLevel:e,monorailSection:t,autoFocus:n,autoScroll:r}){return d(Nf,{children:d(wf,{target:"cart",children:d($O,{headerLevel:e,monorailSection:t,autoFocus:n,autoScroll:r})})})}const jO=Zc("ReductionsInput"),HO=Zc("ReductionsHeading");function $O({headerLevel:e,monorailSection:a,autoFocus:o,autoScroll:s}){const{i18n:l,shopPay:c,shop:{discountCodesEnabled:u,giftCardsEnabled:p},checkout:h}=ae(),g="shopPay"===h.identity.current.value,f=he(),v=h.configuration.layout.isOnePage.value,{reductions:{applyButtonPosition:_,discountTagsDisplay:b,automaticTagsDisplay:P,position:k,spacing:S}}=Lv(),w=Rt(),C=sc({base:!0,medium:!1}),E=!w.value||(C??!1),x=m(!1),I=n(()=>{x.value=!x.value},[x]),A=TO(),T=uC(),{control:{labelPosition:L="inside"}}=th(),{reductions:{labelPosition:N=L}}=Lv(),{discountLines:R,paymentLines:M}=qe(),D=R.value,O=M.value.reduce((e,t)=>("giftCard"===t.method.type&&"code"in t.method&&e.push({originType:"giftCard",code:t.method.code}),e),[]),z=Vi(c)&&c.discountCodes.value.length?c.discountCodes.value:null,B=z?[...new Set(z)].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()],V=D.reduce((e,{discount:{type:t},title:n})=>("automatic"!==t&&"custom"!==t||e.push({originType:"automatic",code:n}),e),[]),F=[..."hidden"===P?[]:V,...A.value?B:[],...O];0===F.length&&(x.value=!1);const U="always_visible"===b||"base"===b&&F.length>0&&(!E||x.value);let q=!1;"error"===f.lastJourneyProgression.value.type&&"completion"===f.lastJourneyProgression.value.negotiationStage&&(q=QD(f.lastJourneyProgression.value.errors));const j=eu(void 0,jO),H=eu(void 0,HO),$=Rf({active:q});i(()=>{s&&$.current&&$.current.scrollIntoView({behavior:"smooth"})},[s,$]);const{currentDetour:Y,currentPage:W}=pc().value,G=Qw("Checkout::Reductions::RenderBefore"),J=Qw("Checkout::Reductions::RenderAfter"),K=u&&A.value,Q=LO(),X=p&&Q.value,{loading:Z,reductionCodeField:ee,dirty:te,setDirty:ne,handleSubmit:re,discountCodeWarning:ie,discountMessages:oe,removeDiscountCodeWarnings:se,removeDiscountCodeMessage:le}=tO({inputRef:$,headingId:H,monorailSection:a});i(()=>{if(ie&&ie.length>0){const e=ie[0].message.trim();if(!e)return;return Zu({content:e,role:"status"})}},[ie]);const{label:ce,title:ue,placeholder:de}=function(){const{i18n:e,shop:{discountCodesEnabled:n}}=ae(),r=TO(),a=LO();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_t
2itle")}: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=ie?d(MO,{messages:ie,removeBanner:se,grouped:!0}):null,ge=oe&&oe.length?d(MO,{removeBanner:le,messages:oe}):null,fe="base"===_,ye=null!=e&&"base"===k&&"outside"===N&&ue===ce,ve=!fe&&"outside"===N&&!ye,_e="base"===b&&E&&F.length>0?d(qf,{colorLayer:"control",className:"OuqRS",children:d(rh,{className:"U9F9G",onClick:I,accessibilityLabel:l.translate("order_summary.discount_code_applied_count",{count:F.length}),"data-event-name":x.value?"discount_tags_hide":"discount_tags_show",border:"base",children:d(iy,{paddingInline:"small-300",direction:"inline",gap:"small-400",alignItems:"center",children:[d(mh,{type:"discount",tone:"monochrome"}),d("strong",{children:F.length})]})})}):null,be=fe?d(Zf,{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 Pe=ee.error;fe||(Pe=!!ee.error||void 0);const ke=d(gA,{ref:$,id:j,name:"reductions",label:ce,placeholder:de,...ee,error:Pe,onInput:e=>ne(e.length>0),autoFocus:o,accessoryStart:_e,accessoryEnd:be,labelPosition:ve?void 0:N,labelAccessibilityVisibility:ve||ye?"exclusive":void 0}),Se=d(qf,{children:[d(iy,{gap:"base",children:[d(WM,{onSubmit:re,children:fe?ke:d(y,{children:[ve&&d(y,{children:[d(uA,{variant:"outside",htmlFor:j,label:ce}),d(pN,{blockSize:"small-400"})]}),d(iy,{gap:"small-300",children:[d(sh,{gap:ms(["small400",S??"small100"]),gridTemplateColumns:"minmax(0, 1fr) minmax(auto, max-content)",gridAutoColumns:"1fr",gridTemplateRows:"minmax(auto, max-content)",gridAutoRows:"minmax(auto, max-content)",children:[ke,d(Zf,{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(KM,{below:"medium",children:l.translate("order_summary.apply_discount_button_label")}),d(KM,{above:"small",children:d(mh,{type:"arrow-right"})})]})})]}),ee.error?d(oA,{controlID:j,children:ee.error}):null]})]})}),me,ge]}),d(Bd,{id:"reduction-tags",open:U,duration:"fast",children:d(qf,{paddingBlockStart:F.length>0?"base":void 0,children:d(UO,{reductionTags:F,headingId:H})})})]});return d(y,{children:[d(Bd,{id:"gift-card-field",open:X||K,duration:"fast",children:d(HT,{children:[d(LS,{id:H,tabIndex:-1,...e?{level:e}:{visibility:"hidden"},children:ue}),e&&d(pN,{blockSize:"base"}),d(iy,{gap:"base",children:[d(iT,{customizations:G}),d(EO,{sectionId:"reductions",children:g&&v?d(IO,{children:Se}):d(AO,{...pe,children:Se})}),d(iT,{customizations:J}),h.configuration.showPayButton&&K&&(v||"payment"===W?.id)&&d(QM,{targetSelector:"#checkout-pay-heading",icon:"credit-card",label:l.translate("order_summary.discount_discovery.back_to_finalize_order")})]})]})}),!X&&!K&&d(CO,{section:"reductions"})]})}const YO="URL not specified for Chat: Please configure your extension to include extensions.targeting.preloads.chat",WO="URL specified for Chat: The URL specified in extensions.targeting.preloads.chat must not be the same origin as the checkout host.",GO="Scope not granted for Chat: Please request access in Partners dashboard to Chat in checkout extensions",JO="224px",KO="72px",QO=72,XO="415px",ZO="700px",ez="100dvi",tz="93dvb",nz=new Set(["Chat","s-chat"]),rz={};function az(e){const t=function(e){return rz[e]||(rz[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()}}}()),rz[e]}(e);return i(()=>(t.subscriptions++,()=>{t.subscriptions--,0===t.subscriptions&&function(e){rz[e]?.dispose(),delete rz[e]}(e)}),[t,e]),t}function iz(e){const t=az(e),r=a(null),i=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:i}
2}const oz=e=>d(HT,{children:e});function sz({skipWrappingSection:e=!1,hideMerchandiseLines:t=!1,hideAccessibilityTitle:n=!1,monorailSection:a="order_summary",hideReductions:i=!1,reductionsFieldAutoFocus:o=!1,reductionsFieldAutoScroll:s=!1}){const{ready:l}=iz("chat"),{i18n:c,checkout:u,checkout:{configuration:{allowEmptyCart:p,visibility:m,layout:h}}}=ae(),g=m.showReductions&&!i,f=h.isOnePage.value,{currentDetour:v}=pc().value,_="thankYou"===v?.type,b=Qw(r(()=>_?"Checkout::ThankYou::Dynamic::Render":"Checkout::Dynamic::Render",[_]),"ORDER_SUMMARY3"),P=Qw("Checkout::Dynamic::Render","ORDER_SUMMARY4"),k=sc({base:!0,medium:!1}),S=Rt(),w=f&&(!S.value||k),C=yL(),E=u.proposal.facts.merchandiseLines??[];if(f&&!p){const e=[];for(const t of C.value.values())e.push(...t);if(e.push(...E),e.every(({quantity:e})=>0===e))return d(ZE,{textAlign:"center",children:c.translate("stock.empty_cart_label")})}return d(e?y:HT,{...!e&&{containerName:"s-shell-section"},children:[d(iy,{gap:"large-200",children:[!n&&d(LS,{visibility:"hidden",children:c.translate("order_summary.title")}),!t&&d(KN,{}),g&&d(qO,{monorailSection:a,autoFocus:o,autoScroll:s}),!_&&d(iT,{customizations:b,gap:"large-200",render:oz}),d(HM,{}),(!w||_)&&d(iT,{customizations:_?b:P,gap:"large-200",render:oz})]}),d(x,{when:l,children:d(qf,{minBlockSize:"@media (inline-size >= medium) 72px, 0"})})]})}function lz(){const e=ae();return t(()=>w_(e))}function cz(){const{checkout:e}=ae();return e.unstable_graphqlDataRequestInfo?.checkoutSheetProtocolConfig??null}function uz(){const{mobileCheckoutSdk:e,embed:n}=ae(),r=lz(),a=cz(),i=pc();return t(()=>!(r.value||e.enabled||n?.isCheckoutKit())||(e.enabled&&e.variant.isStandard()||n?.isCheckoutKit()?"thankYou"===i.value.currentDetour?.type:Boolean(a?.disclosureEnabled)))}function dz(){const{embed:e,checkout:t}=ae(),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 pz(){const{checkout:e,embed:n,shopPay:r}=ae(),{progressing:a}=mc(),i=pc(),{submitting:o}=ie();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 mz(e={}){const[t,r]=s(null),[i,o]=s(null),l=a(null);return{entry:t,observer:i,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])},e);n.observe(t),l.current=n,o(n)},[e.root,e.rootMargin,e.threshold])}}function hz(){const e=Ff(),{checkout:n,embed:r}=ae(),a=AT(),{payNowButtonElement:o}=jk(),s=_r(r?.embedder),{entry:l,ref:c}=mz({threshold:.5});i(()=>(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&&!a.value&&!u.value)))}function gz(e){return"available"===e.status&&e.methods.some(({methodType:e})=>"SHIPPING"===e||"LOCAL"===e)}function fz(){const e=oi();return t(()=>{const t=e.value?.filter(gz);return{shippableDeliveryLines:t?.length?t:void 0}})}function yz(e){return!!e&&("unavailable"===e.status||"partial"===e.status||"filled"===e.status&&!e.lines.some(gz))}function vz({deliveryNext:e,proposedAddress:t,negotiatedAddress:n,reloadStrategy:r}){if(!yz(e))return!1;const a=EN(r)?n??t:t;return fi(a)}const _z={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 bz=["phone","company","firstName","lastName"];function Pz(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(bz.includes(a)&&(!n[a]||0===n[a]?.length))continue;r.set(a,i)}return r}const kz=e=>{const t=new Map;for(const[n,r]of Object.entries(e)){const e=r.peek();ps(e)&&"error"===e.type&&t.set(n,e.textValue)}return t};function Sz({children:e}){const{current:o,parts:s}=he(),{deliveryMethodsAddressErrors:l,deliveryMethodTimingSignal:c,deliveryMethodDeltaSignal:u}=Je(),p=Lh(),{observability:h,embed:g,events:f}=ae(),y=r(()=>{const e=o.fields.deliveryNext.peek();return function(e,t){return Oe((e,n)=>{const r=_z[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",h)},[o.fields.deliveryNext,h]),v=n(e=>{y.value=e},[y]),_=a(!1);g?.isFlagshipPartner&&!_.current&&(_.current=!0,f.addEventListener("embed:address-replace",()=>{v("addressReplaced")}));const b=a(!1);b.current||(b.current=!0,f.addEventListener("wallet:address-replace",()=>{v("addressReplaced")})),function(e,t){const{deliveryMethodsAddressErrors:n,deliveryMethodTimingSignal:o}=Je(),{parts:s}=he(),{shippingAddress:l}=s,{observability:c,checkout:{wallets:u},checkout:d,shop:{shippingCountries:p}}=ae(),h=d.configuration.isAddressDelegationEnabled,g=l.fields.countryCode.value,f=Ly(g,p),{loading:y}=zt(g),{negotiate:v}=mc(),{setAddressError:_}=Ay(n),b=r(()=>hs(),[]),{resetAddressSuggestions:k}=Ty(b,n),S=zy(g),w=function(e){const t=m();return Ch(e,({action:e})=>{t.value=e}),t}(e),C=Dh(),E=r(()=>P(()=>function(e){switch(e){case De.Country:return["countryCode"];case De.CountryProvince:return["countryCode","zoneCode"];case De.CountryProvinceZip:return["countryCode","zoneCode","postalCode"];case De.CountryProvinceZipAddress:return["countryCode","zoneCode","postalCode","address1"];case De.Anything:return["countryCode","zoneCode","postalCode","address1","address2","city","company","firstName","lastName","phone"]}}(C({countryCode:l.fields.countryCode.value,zoneCode:l.fields.zoneCode.value}))),[C,l.fields.countryCode,l.fields.zoneCode]),x=a();i(()=>{y||(x.current?.(),x.current=void 0)},[y]);const I=No(()=>{const e=l.peek();if(y)return void(x.current=()=>I());const n=f(e),r=Pz(E.peek(),n,e);
2"addressReplaced"!==w.peek()&&(0===r.size?t("addressComplete"):t("addressInvalid"))},150);Mh(l,()=>{t("countryChanged"),l.fields.postalCode.value=void 0,l.fields.zoneCode.value=void 0,l.fields.city.value=void 0,l.fields.address1.value=void 0,l.fields.address2.value=void 0,t("reset")});const A=r(()=>P(()=>E.value.filter(e=>"countryCode"!==e).map(e=>{const t=l.fields[e].value;if(t)return"postalCode"===e?t.replace(/[^a-z0-9]/gi,"").toLowerCase():t.toLowerCase()}).join("_")),[l.fields,E]);i(()=>{let t=!1;const n=e.value.status;return"initial"!==n&&"empty"!==n||I(),A.subscribe(()=>{if(t){if(u.activeSession.value||"addressReplaced"===w.value||"resetting"===e.value.status)return;I()}t=!0})},[u,I,e,w,l,A]),Ch(e,({previousState:r,action:a,nextState:i})=>{if(c.leaveErrorBreadcrumb("Shipping methods state transition:",{prevState:r.status,action:a,nextState:i.status}),"initial"===i.status&&I(),"loading"===i.status&&0===o.peek()&&(o.value=Date.now()),"reset"===a){const e=l.peek();for(const t of Object.keys(e))"phone"===t&&Wt(e.phone)||_(t,void 0);k()}const s=gs(e);if("addressComplete"===a||"reset"===a||"addressReplaced"===a||"addressInvalid"===a&&("negotiated"===r.status||h)){if(h){const e=l.peek(),r=f(e);if(r.size>0){for(const[e,t]of r)void 0===n[e].peek()&&_(e,{message:t,origin:"client",type:"inline-validation"});return t("addressInvalid"),void t("negotiationResolved")}for(const[t,a]of Object.entries(n)){const e=a.peek();e&&"object"==typeof e&&"client"===e.origin&&"inline-validation"===e.type&&_(t,void 0)}}c.leaveErrorBreadcrumb("[ShippingMethods] Negotiation started"),v({legacyFiltering:{silenceViolations:["all"],include:[]},silenceViolations:["all"],fieldsToResolve:["deliveryNext"],onComplete(r){const i=s!==gs(e);if(c.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 r=kz(n);if(Pz(E.peek(),r,l.peek()).size>0)return t(e?"negotiationResolved":"addressInvalid")}const i=S("shipping_address",r.violations),o="addressReplaced"===a?i:Pz(E.peek(),i,l.peek());for(const[t,r]of o)void 0===n[t].peek()&&_(t,r);e||0===o.size?t("negotiationResolved"):t("addressInvalid")}}else t("negotiationResolved")}}).catch(()=>t("negotiationResolved"))}})}(y,v);const S=Dh(),w=t(()=>{const e=y.value.status;if("resetting"===e)return{status:"empty"};if("loading"===e)return{status:e};const t=o.fields.deliveryNext.value,n=yz(t),r="filled"===t?.status&&!n,a=s.shippingAddress.fields.countryCode.value,i=s.shippingAddress.fields.zoneCode.value,c=S({countryCode:a,zoneCode:i}),u=EN(c),d=u?s.shippingAddress.peek():s.shippingAddress.value,p=n&&("initial"===e||"empty"===e&&!u&&0===kz(l).size);return"negotiated"===e||r||p?t?n?{status:vz({deliveryNext:t,proposedAddress:d,negotiatedAddress:o.fields.shippingAddress.peek(),reloadStrategy:c})?"error":"empty"}:"filled"===t.status&&r?{status:"filled",deliveryLines:t.lines}:{status:"error"}:{status:"empty"}:{status:e}}),C=m(w.peek());!function(e){const{shop:{asyncDeliveryPromiseExperienceEnabled:t},observability:n}=ae(),r=a(!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})}(w);const E=a();i(()=>()=>{E.current&&clearTimeout(E.current)},[]),k(()=>{const e=w.value;if(E.current&&(clearTimeout(E.current),E.current=void 0),"loading"===e.status&&(E.current=setTimeout(()=>{const e=o.fields.deliveryNext.peek(),t="filled"===e?.status&&!yz(e);h.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=c.peek();if(n&&r>0){const e=se(n),t=Date.now()-r;p(t,Number(e)),0===u.peek()&&(u.value=t)}}const t="empty"===e.status&&"negotiated"===y.peek().status&&yz(o.fields.deliveryNext.peek());("error"===e.status||"filled"===e.status||t)&&(c.value=0)});
2const x=r(()=>({uiStateSignal:w,initialUiStateSignal:C,dispatch:v}),[v,w,C]);return d(Ah.Provider,{value:x,children:e})}function wz({embedder:e,isThankYouDetour:t,normalizedPath:n}){return t&&"/thank-you"===n&&!_r(e)}var Cz=(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))(Cz||{});const Ez={[Cz.Unavailable]:{isAddressProblem:!1,isUnpurchasable:!0},[Cz.UnpurchasableB2B]:{isAddressProblem:!1,isUnpurchasable:!0},[Cz.Unpurchasable]:{isAddressProblem:!1,isUnpurchasable:!0},[Cz.OutOfStock]:{isAddressProblem:!1,isUnpurchasable:!1},[Cz.QuantityChange]:{isAddressProblem:!1,isUnpurchasable:!1},[Cz.PriceChange]:{isAddressProblem:!1,isUnpurchasable:!1},[Cz.Unshippable]:{isAddressProblem:!0,isUnpurchasable:!1},[Cz.Unfulfillable]:{isAddressProblem:!0,isUnpurchasable:!1},[Cz.Unknown]:{isAddressProblem:!1,isUnpurchasable:!1}};function xz(e){return Ez[e].isAddressProblem}function Iz(e){return Ez[e].isUnpurchasable}function Az(){const{negotiate:e}=mc(),t=qe().merchandiseLines,r=ge().merchandiseLines,{observability:a}=ae(),i=n(e=>{const n=t.value;t.value=n.filter(({stableId:t})=>!e.includes(t))},[t]);return n(async t=>{const n=new Map((r.value?.lines??[]).map(e=>[e.stableId,e])),o=t.reduce((e,{problem:t,line:r})=>{if(xz(t.type))return e;const a=n.get(r.stableId);return(!a||0===a.quantity||Iz(t.type))&&e.push(r.stableId),e},[]);try{o.length>0&&(i(o),await e({}))}catch(s){a.leaveErrorBreadcrumb("Failure to update merchandise lines when handling out-of-stock items",{error:s,unavailableMerchandiseIds:o})}},[r,i,e,a])}function Tz(e){const t=function(e){return e.some(e=>cn.has(e.code))}(e),n=function(e){return e.some(e=>un.has(e.code))}(e),r=function(e){return e.some(e=>dn.has(e.code))}(e),a=nv(e),i=rv(e),o=ev(e),s=function(e){return e.some(e=>rn.has(e.code))}(e),l=[t,n,r,a].filter(Boolean).length>1;return o||l?s?Cz.QuantityChange:Cz.OutOfStock:t?Cz.Unavailable:n?Cz.UnpurchasableB2B:r?Cz.Unpurchasable:a?Cz.Unshippable:i?Cz.Unfulfillable:s?Cz.QuantityChange:Cz.Unknown}function Lz(e){return e.quantity>0}function Nz(e){return Iz(e)?e:Cz.OutOfStock}function Rz(){const{checkout:e}=ae(),t=ge(),{value:n=[]}=t.allViolations,{value:a}=t.merchandiseLines,i=kn("merchandiseLines").value,o=qe().merchandiseLines.value,l=r(()=>a?.lines??[],[a]),c=e.proposal.negotiated.fields.canUpdateMerchandise.value??!0,[u]=s(()=>Tz(n)),[d]=s(o),p=r(()=>aL(d,n),[d,n]),m=r(()=>oL(d,l,n).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:Cz.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:Cz.PriceChange,negotiatedPrice:t?.itemPrice,proposedPrice:e?.itemPrice}}(r,a),s=function(e,t,n){if(!n&&t)return{type:Nz(e)}}(t,r,a),l=r??a;return n.has(l.stableId)?{line:l,problem:{type:t===Cz.Unfulfillable?Cz.Unfulfillable:Cz.Unshippable}}:0===a?.quantity?{line:l,problem:{type:Nz(t)}}:o?{line:l,problem:o}:i?{line:l,problem:i}:s?{line:l,problem:s}:{line:l,problem:{type:Cz.OutOfStock}}}(e,u,p)),[d,l,n,u,p]),h=l.filter(({stableId:e})=>!p.has(e)).some(Lz)&&c,g=!h,f=d.some(e=>{const t=l.find(({stableId:t})=>t===e.stableId);return!t||0===t.quantity||p.has(e.stableId)});return{type:u,lineItems:m,loading:i,cartEmpty:g,hasLineItemsLeftInCart:h,hasUnavailableMerchandise:f,unshippableMerchandiseIds:p}}function Mz({width:e}){const{header:{logo:t}}=Lv(),{embed:n,i18n:r,shop:a,shopPay:i,source:o,url:s,router:l}=ae(),c=Cf(),u=uC(),{isAppLayout:p}=_D(),m=cS(),{brandSettings:h}=a,{lineItems:g}=Rz(),f=Az();if(i.visibility.showShopPayBrandedLogo||vr(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(xu,{level:1,children:d(LS,{level:1,accessibilityRole:"presentation",display:"inline",children:a.name})})});n?.isFlagshipPartner?y=d(iy,{direction:"inline",gap:"small-200",alignItems:"center",children:[h?.squareLogo?.url&&d(YL,{alt:h.squareLogo.altText||a.name,src:h.squareLogo.url,className:"yfbTW",borderRadius:"base",inlineSize:"auto"}),y]}):t?.image&&(y=d(Vw,{width:e}));const v="simulated"!==o.type&&!Yn(o)&&!p&&!n;if(!a.hasStorefront||!v&&!c)return y;const _=(a.previewReturnUrl?a.previewReturnUrl:void 0)??t?.link??o.headerLogoUrl??s.storefront(),b=r.translate("editor.navigation.store_logo_accessibility_label"),P=d("span",{ref:u("logo"),children:d(ry,{href:_,tone:"monochrome",textDecoration:"none",onClick:async()=>{c?m.includes(_)&&l.navigate(e=>{const t=new URL(e);return t.searchParams.set("ce_redirect",_),t}):g.length>0&&await f(g)},display:"block",children:[y,d(Jf,{accessibilityVisibility:"exclusive",children:b})]})});return t?.image&&t?.maxWidth?d(qf,{maxInlineSize:`${t.maxWidth}px`,children:P}):P}
2const Dz=w({displayName:"AccountAvatar",suspense:!1,load:()=>C(()=>fl(()=>import("./7a21cd4e.DndnGEih.js").then(e=>e.A),__vite__mapDeps([206,1,2,3,4,5,207]))),useError:GE("AccountAvatar")}),Oz={borderRadius:{small:"8px",base:"12px",large:"16px",fullyRounded:"36px",max:"9999px"},color:bs,transitionDuration:{base:fs(0,200,1.5,"ms")},transitionTimingFunction:{easeOut:"cubic-bezier(0.3, 0.5, 0.5, 1)"},fontFamily:vs,fontSize:ys,letterSpacing:_s,lineHeight:Ps};function zz(){const e=eh(),{router:t,userEvents:n,shop:r,source:a,checkout:i,i18n:o}=ae(),s=Yg(),l="simulated"===a.type,c=uC(),{header:{cartLink:{contentType:u="icon",image:p}={}}}=Lv(),m=dS(),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*ks(e.customProperties.value.fontSize?.base??Oz.fontSize.base);f=d("img",{src:p.src,alt:g,height:t,className:v(we({display:"block"}))})}else f=d(mh,{type:"bag",size:"large"});return d("span",{ref:c("cart"),children:d(ry,{href:m.value?.toString(),id:"cart-link",onClick:()=>{if("shopPay"!==i.identity.current.value)s("click",{element:{tagName:"a",textContent:g},section:"header",timestamp:new Date,transmitImmediately:!0});else{if(l||h)return;n.monorailEvent({schemaId:"shopify_pay_payment_page_ui_interaction/1.2",payload:{...aa(a,i,r),action:"return_to_cart"}})}},accessibilityLabel:"icon"===u?g:void 0,display:"block",children:f})})}function Bz({alignment:e,logo:t,endAccessory:n,endAccessoryAffectsBlockSize:r=!0}){const a=n&&!r?d(qf,{blockSize:"0px",children:d(qf,{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(qf,{inlineAlignment:"center",children:t}),a]})},end:{columns:a?"minmax(auto, max-content) minmax(0, 1fr)":"minmax(0, 1fr)",markup:d(y,{children:[a,d(qf,{inlineAlignment:"end",children:t})]})}};return d(sh,{gridTemplateColumns:i[e].columns,minInlineSize:"100%",alignItems:"center",alignContent:"center",gap:"large-500",children:i[e].markup})}function Vz(){const{checkout:e,router:t}=ae(),n=t.currentUrl.value,{header:{alignment:r="start",logo:{visibility:a,maxWidth:i}={}}}=Lv(),o=uS(),s=hP(),{currentDetour:l}=pc().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=Qw(u),m="hidden"!==a||vr(n.search),h=m?d(Mz,{width:i}):d("div",{});let g;return o.value?g=d(zz,{}):s.value&&(g=d(Dz,{})),d(iy,{gap:"large-100",children:[(null!=g||m)&&c&&d(Bz,{alignment:r,logo:h,endAccessory:g,endAccessoryAffectsBlockSize:o.value||!m}),d(iT,{customizations:p,gap:"base"})]})}const Fz=w({displayName:"ShopPayCheckout",load:()=>C(()=>fl(()=>import("./461aedcc.Bsfg9GWc.js"),__vite__mapDeps([208,1,2,3,4,5,136,142,89,8,135,11,76,77,181,100,75,63,7,9,10,12,209])).then(e=>e.ShopPayCheckout))});function Uz({children:e}){const{checkout:{configuration:{layout:t},identity:n},router:r,shopPay:{isSimulated:a}}=ae();return Ss({isShopPay:"shopPay"===n.current.value,isOnePage:t.isOnePage.value,path:r.currentUrl.value.normalizedPath})?d(Fz,{simulated:a,children:e}):d(y,{children:e})}function qz({children:e}){const{checkout:t}=ae(),n=pz(),r=hz(),a=t.checkoutExit.isExiting.value,i=BI(),o=d(Uz,{children:[d(LT,{}),d(ET,{}),d(VT,{active:n.value,announceProcessing:!a,showLoadingIndicator:!a&&r.value,loadingIndicatorVariant:"progressbar",children:d(jz,{routeC
2ontentInert:!!i.value||void 0,children:e})}),d(VI,{})]});return d(kC,{children:d(FT,{children:d(Sz,{children:d(gI,{children:o})})})})}function jz({children:e,routeContentInert:t}){const{header:{logo:{visibility:n}={}},footer:{content:{visibility:a}={}},cartLink:{visibility:i}}=Lv(),{checkout:o,mobileCheckoutSdk:s,shop:l,shopPay:c,source:u,embed:p,router:m}=ae(),h=m.currentUrl.value,g=vr(h.search),f=dz(),v=o.configuration.showFooter,{currentDetour:_}=pc().value,b=uz().value,P=eg()&&b&&wz({embedder:p?.embedder,isThankYouDetour:"thankYou"===_?.type,normalizedPath:h.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=Qw(k),E=Qw(S),x=Qw(w),I=cx(),A=ax(),T=ix(),{isAppLayout:L}=_D(),N=L&&"google"===p?.embedder&&ua({embedder:p.embedder,shop:l})&&T.value&&null==_,R=Rt(),M="shopPayExternal"===u.type,D=!o.configuration.visibility.showHeader,O=o.configuration.isUniversalCheckoutFinalizer&&"thankYou"===_?.type,z=(()=>{if(M)return c.visibility.showOnePageShellHeader;if(O)return C.length>0&&R.value;if(p?.isFlagshipPartner&&!_r(p.embedder)&&"shopApp"!==p.embedder)return!1;if((D||"hidden"===n&&!g&&"hidden"===i)&&!s.enabled&&!p?.isCheckoutKit()&&(0===C.length||!R.value))return!1;if(L){if(!s.enabled||s.variant.isStandard())return!1;if(p?.isCheckoutKit())return!1}return!0})(),B=Vz,V=ge().buyerIdentity.value?.customerProfile,F=null==V||"CustomerProfile"!==V.__typename,U="thankYou"===_?.type||F&&!A.value.payment&&!A.value.delivery,q=r(()=>s.enabled?s.variant.isStandard():p?!!p.isCheckoutKit()||!f&&(v||E.length>0):("hidden"!==a||E.length>0&&R.value)&&!L&&!g,[p,f,v,s,a,E.length,L,g,R.value]),j="shopPayLogin"!==_?.type&&U&&b&&!p?.isFlagshipPartner,H=c.visibility.shouldForceOnePageShellContentAsAppLayout,$=d(y,{children:[d(hT,{}),d(qf,{className:N?"ghhXm":void 0,inert:t,children:e})]});return d(y,{children:[d(MT,{}),d(MC,{banner:d(sx,{}),announcement:"thankYou"===_?.type&&I.length>0?d(lx,{}):void 0,header:z?d(B,{}):void 0,disclosure:j&&!P?d(zI,{}):void 0,disclosureOrderSummary:P?void 0:d(sz,{monorailSection:"top_order_summary"}),main:$,orderSummary:d(sz,{}),footer:q?d(pT,{}):void 0,blockSize:(()=>{if(L||H)return"appLayout"})(),minMobileViewportSize:N}),d(gT,{}),d(DT,{}),d(OT,{}),d(iT,{customizations:x,transformComponents:Hz,render:e=>d(qf,{minBlockSize:"@media (inline-size >= medium) 0, 72px",children:e})})]})}const Hz=NT(nz);function $z(){const{router:e}=ae(),t=_n().inMemoryAmazonPayParts.serializedAmazonParams;return n(n=>{const{keep:r,only:a}=n??{},i=e.currentUrl.value.href,o=new URL(i);Go.filter(e=>r?!r.includes(e):!a||a.includes(e)).forEach(e=>{o.searchParams.delete(e)}),Cs(t,e=>o.searchParams.get(e)),i!==o.href&&e.navigate(o.href,{replace:!0})},[e,t])}function Yz(){return"true"===UD()[Es]}const Wz=w({load:()=>fl(()=>import("./56bd1136.BGuQJKXV.js"),__vite__mapDeps([210,1,2,3,4,5,190,47,211,212,195,7,8,9,10,11,12,213])).then(e=>e.AmazonBuyerDetailsContent),renderLoading:()=>d(Gz,{}),useError:function(e){const{wallets:t}=ae().checkout,{buyerDetails:n,buttonStatus:r,sdkStatus:a}=_n().inMemoryAmazonPayParts,{paymentLines:o}=qe(),s=$z(),l=Lk();i(()=>{if(!e)return;r.value={status:"error"},a.value={status:n_.Error},n.value={loading:!1,error:!0,details:void 0},s();const i=t.escalatedWallet.value,c=i===In.AmazonPay||i===In.BuyWithPrime,u=o.value.some(e=>"walletsPlatformPaymentMethod"===e.method.type&&(e.method.name===In.AmazonPay||e.method.name===In.BuyWithPrime));c?(l({shouldResetCustomerInfo:!0}),t.setEscalatedWallet(null)):u&&(o.value=o.value.filter(e=>"walletsPlatformPaymentMethod"!==e.method.type||e.method.name!==In.AmazonPay&&e.method.name!==In.BuyWithPrime))},[e,n,r,s,o,l,a,t])}});function Gz(){const{buyerDetailsContentLoaded:e}=_n().inMemoryAmazonPayParts;return i(()=>{e.value=!1},[e]),null}function Jz(){const e=ge().paymentMethods,{attributes:t,externalDeliveryIds:n,paymentLines:r}=qe(),a=Yz(),i=Rt();return d(x,{when:()=>i.value&&function(e,t,{attributes:n,externalDeliveryIds:r,hasAmazonCancelledParam:a}){const i=[In.AmazonPay,In.BuyWithPrime].some(t=>Boolean(ws(e,t))),o=t.some(e=>"walletsPlatformPaymentMethod"===e.method.type&&e.method.name===In.BuyWithPrime),s=n?.some(({ke
2y:e,value:t})=>e===$r&&t===In.BuyWithPrime);return Boolean(i||o||r||s||a)}(e.value,r.value,{attributes:t.value,externalDeliveryIds:n.value,hasAmazonCancelledParam:a}),children:d(Wz,{})})}function Kz(){const{i18n:e}=ae(),n=pc(),r=t(()=>n.value.currentDetour?.label??n.value.currentPage?.label??e.translate("general.page_title"));return d("h1",{className:we({screenReaders:"only"}),children:r})}function Qz({title:e,cost:t}){return d(y,{children:[e,"·",t]})}function Xz({deliveryChangeTitle:e,deliveryLines:t}){const{i18n:n}=ae();return d(AL,{blockPadding:"base",children:[d(IL,{primary:!0,children:[d(Jf,{size:"base",type:"strong",children:n.translate("order_summary.shipping_label")}),t.map(({title:e,lineAmount:t})=>d(iy,{direction:"inline",gap:"small-400",alignItems:"center",children:d(Qz,{title:d(Jf,{size:"small",children:e}),cost:d(Jf,{size:"small",type:"strong",children:n.formatCurrency(t.amount,{currency:t.currencyCode,form:"short"})})})},e))]}),d(IL,{inlineAlignment:"center",children:d(ZE,{type:"small",textAlign:"end",children:d(Jf,{type:"strong",children:e})})})]})}const Zz="TeeUi",eB=Zc("TaxRecalculationLineTooltip");function tB({taxRecalculation:e}){const{i18n:t}=ae(),n=t.numberFormatter({style:"percent",minimumFractionDigits:0,maximumFractionDigits:3}),r=eu(void 0,eB),a=eu(void 0,eB),i=e.beforeLines,o=e.afterLines;return 0===i.length&&0===o.length?null:d(AL,{blockPadding:"base",children:[d(IL,{primary:!0,children:[d(Jf,{size:"base",type:"strong",children:t.translate("delivery_options.shipping_address")}),d(ZE,{type:"small",children:[d("span",{className:Zz,children:[t.translate("payment.order_edit_banner_previous_taxes_label")," ",d(nB,{lines:i,tooltipId:r,percentFormatter:n,i18n:t})," ",d("span",{"aria-hidden":"true",children:"â"})]})," ",d("span",{className:Zz,children:[t.translate("payment.order_edit_banner_new_taxes_label")," ",d(nB,{lines:o,tooltipId:a,percentFormatter:n,i18n:t})]})]})]}),d(IL,{inlineAlignment:"center",children:d(ZE,{type:"small",textAlign:"end",children:d(Jf,{type:"strong",children:d("span",{className:"DQ7YO",children:t.translate("payment.order_edit_banner_single_item_updated").toUpperCase()})})})})]})}function nB({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")});if(1===e.length)return d(y,{children:rB(e[0],n)});const a=e.map(e=>rB(e,n)).join(" + "),i=e.filter(e=>null!=e.rate);if(0===i.length)return d(y,{children:a});const o=i.reduce((e,t)=>e+(t.rate??0),0);return d(y,{children:[d(rh,{interestFor:t,className:"_8A9rc",children:n.format(o)}),d(ym,{id:t,children:a})]})}function rB(e,t){return null==e.rate?e.title:`${e.title} ${t.format(e.rate)}`}function aB(){const{i18n:e,checkout:n}=ae(),r=Nt(),a=n.proposal.facts.orderNumber,i=n.proposal.facts.delivery??[],o=t(()=>i.length>0?i[0].lines.filter(e=>"ADDED"===e.deliveryChange):[]),s=t(()=>i.length>0?i[0].lines.filter(e=>"REMOVED"===e.deliveryChange):[]),l=t(()=>(n.proposal.facts.merchandiseLines??[]).filter(e=>e.quantityChange&&e.quantityChange.delta)),c=t(()=>{const e=n.proposal.facts.taxRecalculation;return e&&(e.beforeLines.length>0||e.afterLines.length>0)?e:void 0}),u=t(()=>l.value.length>0||o.value.length>0||s.value.length>0||Boolean(c.value)),p=t(()=>{if(r.value&&u.value)return{formattedAmountOwed:e.formatCurrency(r.value.amount,{currency:r.value.currencyCode,form:"short"})}}),m=t(()=>o.value.length>0?o.value:void 0),h=t(()=>s.value.length>0?s.value:void 0);return d(x,{when:p,children:({formattedAmountOwed:t})=>d(rD,{heading:e.translate("payment.order_edit_banner_title",{amount_owed:t}),collapsible:!0,children:[d(Jf,{children:e.translate("payment.order_edit_banner_subtitle",{order_number:a?`#${a}`:""})}),d(pN,{blockSize:"base"}),d(vw,{}),d(bL,{title:e.translate("payment.order_edit_banner_updated_order_label"),titleHidden:!0,border:"inner",spacing:"none",children:[d(PL,{hidden:!0,children:[d(kL,{hidden:!0,children:e.translate("order_summary.product_image_label")}),d(kL,{hidden:!0,children:e.translate("order_summary.description_label")}),d(kL,{hidden:!0,children:e.translate("order_summary.quantity_label")})]}),d(wL,{children:[d(H,{each:l,getKey:({title:e,variantTitle:t})=>`${e}${t?`-${t}`:""}`,children:({quantity:e,quantityChange:t,image:n,title:r,variantTitle:a})=>d(AL,{blockPadding:"base",children:[d(IL,{inlineAlignment:"start",children:d(Cw,{alt:n?.altText??"",size:"base",src:n?.url})}),d(IL,{primary:!0,children:[d(Jf,{size:"base",type:"strong",children:r}
2),a?d(Jf,{color:"subdued",size:"small",children:a}):null]}),t&&t.delta&&t.type?d(IL,{inlineAlignment:"center",children:d(iB,{remainingQuantity:e,delta:t.delta,type:t.type})}):null]})}),d(x,{when:m,children:t=>d(Xz,{deliveryLines:t,deliveryChangeTitle:e.translate("payment.order_edit_banner_single_item_added").toUpperCase()})}),d(x,{when:h,children:t=>d(Xz,{deliveryLines:t,deliveryChangeTitle:e.translate("payment.order_edit_banner_single_item_removed").toUpperCase()})}),d(x,{when:c,children:e=>d(tB,{taxRecalculation:e})})]})]})]})})}function iB({remainingQuantity:e,delta:t,type:n}){const{i18n:r}=ae();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(ZE,{type:"small",textAlign:"end",children:d(Jf,{type:"strong",children:o.toUpperCase()})})}const oB={current:void 0};function sB({active:e,breadcrumbs:t}){const{i18n:n}=ae(),r=uC(),{buyerJourney:{alignment:a}={}}=Lv();return d(hC,{section:"breadcrumbs",children:d(dC,{section:"breadcrumbs",children:d(qf,{accessibilityRole:"navigation",accessibilityLabel:n.translate("general.breadcrumb"),inlineAlignment:a,children:d(iy,{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(Jf,c||i?{color:c?void 0:"subdued",type:c?"strong":void 0,size:"small",children:o}:{size:"small",ref:r(n),children:d(ry,{href:a,textDecoration:"none",children:o})});return d(iy,{direction:"inline",gap:"small-200",alignItems:"center",accessibilityRole:"list-item",accessibilityCurrent:c?"step":void 0,children:[u,l&&d(mh,{type:"chevron-right",size:"small-200"})]},n)})})})})})}function lB(){return re(Vk)}function cB(){const{paymentLines:e}=qe();return t(()=>{const t=Dt(e.value,"APPLE_PAY");return!!t&&Gi(t)})}function uB(){const{checkout:e,observability:t}=ae(),n=e.configuration.layout.isOnePage.value,r=e.latestReceipt.value,{walletUsedForSubmissionSignal:o,receiptErrorSignal:s,inMemoryApplePayParts:{asPaymentMethod:l,paymentSheetError:c}}=_n(),u=cI(xs()),d=cI(nO()),p=cB(),{paymentLines:m}=qe(),h=Dt(m.value,"GOOGLE_PAY"),g=Boolean(h&&Is(h)),f=cI(Ok({shouldResetCustomerInfo:!1})),y=a(new Set),v=CD("failed"===r?.status&&"payment"===r.failure.type&&n?r?.failure:void 0);i(()=>{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]),i(()=>function(){s.value=void 0},[s])}function dB(){const{checkout:e,router:t}=ae(),n=t.currentUrl.value,{header:{alignment:r="start",logo:a}}=Lv(),i=hP(),{currentDetour:o}=pc().value;let s="purchase.checkout.header.render-after";"thankYou"===o?.type&&(s="purchase.thank-you.header.render-after");const l=Qw(s),c=e.configuration.isUniversalCheckoutFinalizer&&"thankYou"===o?.type,u=!c&&("hidden"!==a?.visibility||vr(n.search)),p=!c&&i.value,m=u||p;let h;return p?h=d(Bz,{alignment:r,logo:u?d(Mz,{width:a?.maxWidth}):d("div",{}),endAccessory:d(Dz,{}),endAccessoryAffectsBlockSize:!u}):u&&(h=d(qf,{inlineAlignment:r,children:d(Mz,{width:a?.maxWidth})})),d(y,{children:[h,l.length>0&&d(y,{children:[m&&d(pN,{blockSize:"@media (inline-size >= medium) base, large-400"}),d(iT,{customizations:l,gap:"base"})]})]})}function pB({children:e}){return d(kC,{children:d(FT,{children:[d(mB,{}),d(ET,{}),d(LT,{}),d(hB,{children:d(gB,{children:e})})]})})}function mB(){return function(){const{router:e}=ae(),{plan:t}=pc().value;i(()=>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(!yc.includes(r.id)||!yc.includes(a.id))return{};const i=t.greenPath.indexOf(r),o=t.greenPath.indexOf(a);return hl(()=>{},o>i?["page-slide-end"]:["page-slide-start"]),{}}),[e,t.greenPath])}(),uB(),null}function hB({children:e}){const{checkout:t}=ae(),n=pz(),r=hz(),a=t.checkoutExit.isExiting.value;return d(VT,{active:n.value,announceProcessing:!a,loadingIndicatorVariant:"progressbar",showLoadingIndicator:!a&&r.value,children:e})}function gB({children:e}){const{header:{logo:{visibility:t}={}},footer:{content:{visibility:n}={}}}=Lv(),{checkout:a,embed:i,router:o}=ae(),{currentDetour:s}=pc().value,l=eg()&&wz({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=Qw(c),h=Qw(u),g=Qw(p),f=cx(),v=a.configuration.isUniversalCheckoutFinalizer&&"thankYou"===s?.type,_=m.length>
20||!v&&"hidden"!==t,b=dB,P="hidden"!==n||h.length>0,k=function(e){return e.currentUrlMatches("/stock-problems")}(o),S=o.currentUrlMatches("/no-address-location"),w=pS(o),C=o.currentUrlMatches("/shoppay"),E=jD(),{activeBreadcrumb:x,breadcrumbs:I}=function(){const{i18n:e,router:t}=ae(),n=he(),{currentPage:a,plan:{greenPath:i}}=pc().value,o=dS(),s=uS(),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 oB.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(fB,{children:e});return d(y,{children:[d(MT,{}),d(MC,{banner:d(sx,{}),announcement:"thankYou"===s?.type&&f.length>0?d(lx,{}):void 0,header:_?d(b,{}):void 0,disclosure:l?void 0:d(zI,{}),disclosureOrderSummary:l?void 0:d(sz,{monorailSection:"top_order_summary"}),main:T,orderSummary:d(sz,{}),footer:P?d(pT,{}):void 0,buyerJourney:A?void 0:d(sB,{active:x,breadcrumbs:I})}),d(gT,{}),d(DT,{}),d(OT,{}),d(iT,{customizations:g,transformComponents:_B,render:e=>d(qf,{minBlockSize:"@media (inline-size >= medium) 0, 72px",children:e})})]})}function fB({children:e}){const{checkout:t}=ae(),{blocking:n}=lB(),r=pz();return d(y,{children:[d(Kz,{}),d(VT,{active:n.value||r.value,announceProcessing:n.value||!t.checkoutExit.isExiting.value,showLoadingIndicator:n.value,children:[d(Jz,{}),d(iy,{gap:"base",children:[d(CO,{section:"toast"}),d(CO,{section:"top"}),d(aB,{}),d(vB,{children:e})]})]})]})}function yB({condition:e,children:t}){return e?d(HT,{accessibilityRole:"presentation",children:t}):d(y,{children:t})}function vB({children:e}){const{checkout:t,router:n,shop:a}=ae(),{pending:i}=jw(),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(As),m=ge(),{value:h}=m.deliveryNext,g=t.proposal.facts.delivery??[],f=fn(h)||g.length>0&&g.every(e=>null!==e.pickupAddress),{value:v}=Nt(),_=kn("total").value,{value:b}=m.paymentLines,P=kn("paymentLines").value,k=r(()=>!!l&&(_||P||(v?.amount?v.amount>0:b?.lines&&b.lines.some(e=>e.cost?.amount))),[l,v,b,_,P]);return d(Uw,{style:p?void 0:i,children:d(yB,{condition:u,children:d(y,{children:[u&&d(y,{children:[d(gE,{showAddress:!f,showPayment:k}),d(pN,{blockSize:"large-400"})]}),d(qf,{children:e})]})})})}const _B=NT(nz);function bB(){const{billingAddressOption:e,shippingAddress:t}=qe(),{checkout:n}=ae();k(()=>{n.isShippingRequired.value&&!t.value.oneTimeUse||(e.value="custom")})}function PB(){const{billingAddressOption:e,paymentLines:t}=qe(),{shop:n,source:r,checkout:a}=ae(),o=ge().buyerIdentity.value?.purchasingCompany,s=ge(),{value:l}=s.deliveryNext,c=kn("deliveryNext").value;i(()=>{const i=t.value[0],s=l;if(c||!s||"filled"!==s.status||!i)return;const u=fn(s),d=Or(s);if(u||d)return;const p=!u&&a.isShippingRequired.value;Ts({shopRequireMatchingShippingAndBilling:Boolean(n.requireMatchingShippingAndBilling),selectedPaymentMethodType:i?.method.type,isShippingRequired:p,isOrderSession:Yn(r),isB2B:Boolean(o),isPickupPointDeliveryMethod:d})&&"shipping"!==e.value&&(e.value="shipping")},[t.value,l,c,a.isShippingRequired,n.requireMatchingShippingAndBilling,r,o,e])}function kB(){const{source:e,checkout:n}=ae(),{buyerIdentity:r,deliveryNext:a}=ge(),i=cb(),o=Bv(),s=function(){const{checkout:e}=ae();return t(()=>po(e.proposal))}(),{deliveryLines:l,shippingAddress:c}=qe();return t(()=>{const t=r.value?.purchasingCompany;return(o.value||ub({checkout:n,source:e})?.pickupAddress)&&!i.value||Or(a.value)||l.value.flatMap(e=>e.value.deliveryMethodTypes).includes("PICKUP_POINT")||!Yn(e)&&!n.isShippingRequired.value&&!t||Yn(e)&&!s.value||t&&!n.addressManager.billing.value.suggestedAddress.value.type||c.value.oneTimeUse?"form":"selector"})}function SB(){const{billingAddressOption:e,billingAddress:n}=qe(),r=ge(),{checkout:a,source:i}=ae();return t(()=>{const t=r.paymentLines.value,o=r.shippingAddress.value,s=a.proposal.facts.delivery??[],l=s.length>0&&s[0].deliveryAddress?s[0].deliveryAddress:void 0,c=r.buyerIdentity.value?.purchasingCompany,u=t?.lines?.find(e=>
2e.method.type===de.CreditCard);return u?u.method.billingAddress:"billing"===e.value&&c?.location.billingAddress?c.location.billingAddress:"shipping"===e.value&&c?.location.shippingAddress?c.location.shippingAddress:"shipping"===e.value?Yn(i)?l:o:n.value})}function wB(){const e=ge(),t=e.paymentLines?.value?.lines,{hasViolations:n,violations:r}=av(new Set(["PAYMENTS_SHIPPING_MUST_MATCH_BILLING"])),a=Boolean(Dt(t,"APPLE_PAY"));if(n&&!a)return r.values().next().value.localizedMessage}function CB(){const{shop:e,source:n,checkout:r}=ae(),a=Bv(),{paymentLines:i}=qe(),{buyerIdentity:o}=ge(),s=function(){const e=ge().deliveryNext;return t(()=>Or(e.value))}();return t(()=>{const t=!a.value&&r.isShippingRequired.value,l=i.value[0];return Ts({shopRequireMatchingShippingAndBilling:Boolean(e.requireMatchingShippingAndBilling),selectedPaymentMethodType:l?.method.type,isShippingRequired:t,isOrderSession:Yn(n),isB2B:Boolean(o.value?.purchasingCompany),isPickupPointDeliveryMethod:s.value})})}function EB(e){const n=e,r=function(e){const n=ge().buyerIdentity,r=e?.countryCode&&Sy.includes(e.countryCode),a=T(wy(e,r?{hiddenFields:["phone","company"],multiline:!1,countryFormat:"explicit"}:{hiddenFields:["phone","company","firstName","lastName"],multiline:!1,countryFormat:"explicit"}));return t(()=>{if(n.value?.purchasingCompany)return a.value})}(n),a=wy(n,n?.countryCode&&Sy.includes(n.countryCode)?{countryFormat:"explicit"}:{hiddenFields:["firstName","lastName"],countryFormat:"explicit"});return r.value??a}function xB(){const{shippingAddress:e}=qe(),{checkout:n}=ae();return t(()=>(n.proposal.facts.delivery??[])[0]?.deliveryAddress??e.value)}function IB(){const{negotiate:e}=mc(),{billingAddress:t,billingAddressOption:r}=qe(),{checkout:{wallets:o}}=ae(),s=a(void 0),l=n(()=>{e({legacyFiltering:{include:["billingAddress"]},silenceViolations:Ue(["billingAddress"])})},[e]),c="custom"===r.value?t.fields.countryCode.value:void 0;return i(()=>{!o.activeSession.value&&"custom"===r.value&&c&&c!==s.current&&(s.current=c,l())},[r.value,c,l,o.activeSession.value]),l}const AB="b2b",TB="not_b2b";function LB(){const{paymentMethods:e}=ge();return RB(e)}function NB(){const{paymentLines:e}=qe();return RB(t(()=>e.value.map(e=>e.method)))}function RB(e){const{client:n,checkout:{identity:r},shop:a,shopPay:i,source:o}=ae(),s=s_(),l=ST(),c=a.hasFlagEnabled(Ls),u=ji(["STORE_CREDIT","CUSTOM"]),{buyerIdentity:d,paymentMethods:p}=ge();return t(()=>{if(!l.value)return!1;if("shopPay"===r.current.value)return!1;if(u.value)return!1;const t=e.value??[];if(d.value?.purchasingCompany){const e=p.value?.some(e=>"direct"===e.type&&"shopify_payments"===e.name),r=t.some(t=>"direct"===t.type&&(e||a.storeVaultEnabled)),i=t.some(e=>function(e,t){if("bank"!==e.type)return!1;if("supportsVaulting"in e)return e.supportsVaulting;const n=MB(e,t);return!!n?.supportsVaulting&&(!(!("selectedToken"in e)||!e.selectedToken)&&"SHOPIFY_PUBLIC_TOKEN"!==e.selectedType)}(e,p.value??[]));return function(e,t){return"cartNext"===e.type||"simulated"===e.type||"b2b"===t.unstable_getSerialization("invoiceLoginType")&&bb(e)}(o,n)&&(r||i)}return a.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=>MB(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:c,negotiatedPaymentMethods:p,buyerIdentity:d,isShopPayAvailableForSellerOfRecord:s,shopPayDismissed:i.userIdentified.value})})}function MB(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 DB({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&&Rs(p)&&!h,b=Ms({lines:u,paymentMethods:p,purchasingCompany:c,isBillingAddressForced:h}
2)||!g,P="CREDIT_CARD_ON_FILE"===f?.method.type,k=Ds(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(Dt([e],"PAYPAL_EXPRESS")),n=Boolean(Dt([e],"APPLE_PAY")),r=["direct","giftCard","redeemable","walletsPlatform","wallet","noop","deferred","other",...Object.values(de)];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 OB(){const e=Ns(),n=ji(),r=ST(),{source:a,checkout:i,shop:o}=ae(),s=Bv(),l=ax(),c=nf(),{buyerIdentity:u,paymentMethods:d}=ge(),{paymentLines:p,billingAddressOption:m}=qe();return t(()=>DB({fullyCoveredByGiftCard:e.value,fullyCoveredByRedeemablesAndGiftCards:n.value,paymentRequired:r.value,identity:i.identity.current.value,isOrderSession:Yn(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(ub({checkout:i,source:a})?.pickupAddress),isForceBillingAddressFormEnabled:!ql({shop:o,checkout:i,paymentMethods:d.value})}))}function zB({children:e}){const{current:{fields:{buyerIdentity:n,shippingAddress:r}}}=he(),{billingAddress:i,billingAddressOption:o,email:s,paymentLines:l,phone:c,shippingAddress:u}=qe(),{checkout:p,embed:m,shop:h,shopPay:g,source:f}=ae(),y=m?.isFlagshipPartner,v=ge(),_=Os(),b=lb(),P=Qc(),k=a(!1),S=a(!1),w=ov(Sa),C=lv(Sa),E=uv(Sa),x=LB(),I=ST(),A=Ns(),L=ji(),N=Bv(),R=nf(),M=CB(),{shippingCountries:D}=h,O=pt(),z=r.value,B=Ly(z?.countryCode,D),V=T(B),F=a(),U=zs(),q=t(()=>ql({shop:h,checkout:p,paymentMethods:v.paymentMethods.value})),j=t(()=>{const e=p.identity.current.value,t=V.value,a=b.value;if(!k.current){const e=w.violations.value;k.current=e.size>0&&!Bs(e)}if(S.current||(S.current=C.violations.value.size>0||null!==p.wallets.escalatedWallet.value&&E.violations.value.size>0),"sdkCartHints"===e&&"sdkCartHints"===F.current?.identitySource)return F.current.sections;function d(e){return"CustomerProfile"===e?.__typename}const m=e=>!p.isShippingRequired.value&&Boolean(i.value)&&!i.value?.[e]?.trim();function T(){switch(e){case Vs:return!1;case"amazonPay":case"businessCustomer":case"buyWithPrime":return!0;case"shopPay":return g.user.isAuthenticatedUser.value;case"sdkCartHints":return!!y||s.value.length>0||c.value.length>0;case"customerAccount":return!(d(n.value?.customerProfile)&&!n.value.customerProfile.email)&&s.value.length>0;default:return s.value.length>0}}const D={contact:T(),delivery:function(){const i=r.value,o=u.value,s=p.proposal.negotiated.fields.availableDeliveryAddresses.value??[];switch(e){case Vs:return s.length>0;case"customerAccount":{const e=n.value;return s.length>0||!(null==e||!d(e?.customerProfile)||(c=e?.customerProfile,0===c.shippingAddresses.length)||function(e){return 1===e.shippingAddresses.length&&t(e.shippingAddresses[0].address,"shipping").size>0}(e?.customerProfile)||function(e,t,n){return!(function(e,t,n){return!e&&t&&n.shippingAddresses.length>0}(t,n,e)||!t&&!n||function(e){if(d(e)){const e=p.addressManager.shipping.value;return Boolean(e.selectedAddress.value)}return!1}(e))}(e.customerProfile,i,o))}case"shopPay":return g.user.addresses.value.length>0||s.length>0;case"sdkCartHints":return!!p.configuration.isAddressDelegationEnabled||T()&&null!=(l=i)&&0===t(l,"shipping").size;case"businessCustomer":return!(P.value&&!a);default:return!0}var l,c}(),payment:function(){const t=Boolean(v.paymentFlexibilityPaymentTermsTemplate.value);switch(e){case Vs:return!1;case"shopPay":{const e=g.user.paymentMethods.value;return I.value||p.isShippingRequired.value?!g.enableCardVaulting||e.some(js):g.user.addresses.value.length>0}case"sdkCartHints":return p.configuration.isPaymentInstrumentsDelegationEnabled;case"businessCustomer":{const r=n.value?.customerProfile;if(Yn(f)||!qs(r))return!1;const a=t||O.value;return!!Fs({identitySource:e,isOrderSession:Yn(f),storeVaultEnabled:h.storeV
2aultEnabled,customerProfile:r,hasCustomerStoredPaymentMethod:Us({availablePaymentMethods:v.paymentMethods.value??[],paymentMethodHistory:v.paymentMethodHistory?.value??[]})})||(Boolean(Ds(v.paymentMethods.value).length)||a&&!x.value)}case"customerAccount":{if(Fs({identitySource:e,isOrderSession:Yn(f),storeVaultEnabled:h.storeVaultEnabled,customerProfile:void 0,hasCustomerStoredPaymentMethod:Us({availablePaymentMethods:v.paymentMethods.value??[],paymentMethodHistory:v.paymentMethodHistory?.value??[]})}))return!0;const n=1===U.value.length&&"deferred"===U.value[0].type;return Boolean(t&&n)}default:return _.value.length>0||l.value.length>0}}(),billing:function(){switch(e){case"shopPay":{const e=g.session.selectedPaymentMethod.value,t=Fi({managedByMarketsPro:v.managedByMarketsPro.value})&&"IDEAL"===e?.paymentMethod,n="CUSTOM_ONSITE"===e?.paymentMethod,r=!g.user.hasCreditCards.value,a=l.value.some(e=>"direct"===e.method.type);if(r&&a)return!1;const i=m("phone"),o=m("firstName");return!I.value||o||i||t||n}case"amazonPay":case"buyWithPrime":return k.current;case"applePay":case"googlePay":return S.current;case"payPal":return!q.value||S.current;case"customerAccount":case"businessCustomer":return!Yn(f)&&function(e){const t=DB(e),n="beforePayment"===t||"afterPayment"===t,r=e.paymentLines[0]?.method.type,a=r===de.CreditCard||r===de.PayPal;return n&&!e.billingMustMatchShipping&&!a}({fullyCoveredByGiftCard:A.value,fullyCoveredByRedeemablesAndGiftCards:L.value,paymentRequired:I.value,identity:e,isOrderSession:Yn(f),isPickupSelected:N.value,isShippingRequired:p.isShippingRequired.value,vaultedDelivery:!1,isPointOfSaleLayout:R.value,purchasingCompany:Boolean(n.value?.purchasingCompany),paymentLines:l.value,billingAddressOption:o.value,paymentMethods:v.paymentMethods.value,orderEditHasPickupAddress:Boolean(ub({checkout:p,source:f})?.pickupAddress),isForceBillingAddressFormEnabled:!q.value,billingMustMatchShipping:M.value});default:return!1}}()},z=F.current,B=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,D);return B?z.sections:(F.current={identitySource:e,sections:D},F.current.sections)}),H=h.hasFlagEnabled(Hs)?p.vaultedSections.signal:j;return d(rx.Provider,{value:H,children:[d(Jz,{}),e]})}const BB=E(function(){const{checkout:{configuration:{layout:e}},router:t}=ae();!function(){const{shop:e,client:t,shopPay:n,checkout:{identity:r},source:{checkoutSessionIdentifier:a},url:o}=ae(),s="shopPay"===r.current.value,l=parseInt(se(e.id),10);i(()=>{a&&async function(){const e=new URL(o.privateAccessToken(s,l));e.searchParams.set("id",a),e.searchParams.set("checkout_type","c1");const r=ti({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{}}()},[a,l,s,o,t,n])}();const n=e.isOnePage.value,a=r(()=>[{match:"/processing",render:()=>d(y,{children:[d(qE,{}),d(KE.Preload,{})]})},{match:"/throttle",render:()=>n?d(QE,{}):d(y,{children:[d(QE,{}),d(fE.Preload,{})]})},{match:"/post-purchase",render:()=>d(UE,{}),renderPrefetch:()=>d(UE.Prefetch,{})},{render:({children:e})=>d(y,{children:[d(hE,{}),d(zB,{children:d(n?qz:pB,{children:e})})]}),children:[{match:"/thank-you",render:()=>d(KE,{}),renderPrefetch:()=>d(KE.Prefetch,{})},{match:"/offsite-payment-failed",render:()=>d(bE,{}),renderPrefetch:()=>d(bE.Prefetch,{})},...n?[{match:"/shoppay_login",render:()=>d($E,{})},{match:"/review",render:()=>d(kE,{}),renderPrefetch:()=>d(kE.Prefetch,{})},{match:"/no-address-location",render:()=>d(vE,{})},{render:({children:e})=>d(y,{children:[d(PE,{children:e}),d(KE.Preload,{})]}),children:[{match:"/stock-problems",render:()=>d(WE,{})}]}]:[{match:"/information",render:()=>d(y,{children:[d(fE,{}),d(gE.Preload,{})]}),renderPrefetch:()=>d(fE.Prefetch,{})},{match:"/shipping",render:()=>d(HE,{}),renderPrefetch:()=>d(HE.Prefetch,{})},{match:"/payment",render:()=>d(y,{children:[d(FE,{}),d(KE.Preload,{})]}),renderPrefetch:()=>d(FE.Prefetch,{})},{match:"/review",render:()=>d(y,{children:[d(jE,{}),d(KE.Preload,{})]}),renderPrefetch:()=>d(jE.Prefetch,{})},{match:"/stock-problems",render:()=>d(YE,{})},{match:"/no-address-location",render:()=>d(yE,{})},{render:()=>d(_E,{})}]]}],[n]);return G(t,a)});class VB extends g{componentDidCatch(e){this.props.terminalErrorHandler.notify(e,{inErrorBoundary:!0})}render(){return this.props.children||null}}function FB(e){const t=[];
2return e.__k?(e.__k.forEach(e=>{e&&"function"==typeof e.type?t.push(...FB(e)):e&&"string"==typeof e.type&&t.push(e)}),t):t}function UB(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*qB(e,t){let n=e,r=0;for(;n&&r<50;)yield n,n=t(n),r+=1}const jB=/\(.+\)/;function HB(e,t=10){let n=null;const r=[];for(const a of qB(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&&!jB.test(e)&&r.push(e)}else"string"==typeof a.type&&r.push(a.type);else if(n)break}return{closestFunctionParent:n,breadcrumb:r}}
2const $B=/^[a-zA-Z][\w-]{0,63}$/;function YB(e){return $B.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 WB="https://redacted.invalid";function GB(e){let t;try{t=new URL(e,WB)}catch{return null}return"null"===t.origin?t.protocol.replace(/:$/,""):t.origin===WB?null:t.origin}function JB(e,t=10){const n=e instanceof Element?e:e?.parentElement??null,r=[];for(const a of qB(n,e=>e.parentElement)){const e=a.getAttribute("id"),n=a.getAttribute("data-testid"),i=null==e?null:YB(e),o=null==n?null:YB(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 KB=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 QB(e){return KB.has(e)||e.startsWith("aria-")}function XB(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]=GB(r)??"[redacted]":QB(n)?t[n]="id"===n&&"string"==typeof r||"data-testid"===n&&"string"==typeof r?YB(r)??"[redacted]":r:t[n]="[redacted]"}return{...e,props:t}}function ZB(e){if("function"!=typeof e)return null;const t=e;return t.displayName||t.name||null}function eV(e){const t=[];for(const{name:n}of e)t.includes(n)||t.push(n);return t}const tV=["id","name","type","role","href","action"],nV=["font[_mstmutation]",".bb-custom-select-container",".bb-customSelect",'[id$="burner-mail-btn"]',".v-dialog__container",".v-snack"].join(", "),rV=new Set([23428825089,45711851521,66006450177,76695699457,106403332097,106885808129,135675215873,136552710145,174633091073,174633418753,174633648129,174633844737,258397700097,260513136641,304348790785,316208381953]);function aV(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=J.diffed,n=[];J.diffed=e=>{const r=e.__k&&e.__k.some(e=>e&&(!e.type||"string"==typeof e.type)),a=FB(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${UB(e.__,UB(e))}`)),t.length=0)}t?.(e)}}(r),$s.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=J.__m;J.__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=YB(n)??"[redacted]"),`<${t.localName}${null==r?"":` id=${r}`} class=${t.getAttribute("class")}>`}return null}).filter(Boolean),{closestFunctionParent:h,breadcrumb:g}=HB(e),f=t.find(Boolean)??e.__e??null,y=JB(f??e.__?.__e??null);if(r){console.group("ð± Hydration mismatch"),console.log(`Detected a hydration mismatch for an element with type ${d}\n${UB(e)}`),h&&"function"==typeof h.type&&console.log(`The closest function parent is ${UB(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?UB(XB(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&&rV.has(e))return!1;if(null!=r&&r!==a)return!1;if(Ys(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=>!(e instanceof Element&&i.call(e,nV)))}({apiClientId:s,excessDomChildren:t,hasPriorMismatch:u.register(e,f),serverUserAgent:o,userAgent:i}),k=eV(p),S=l();n.log("hydration_mismatch",`Hydration mismatch for <${d}>`,{...c?.(),domType:d,mismatchedVNode:UB(XB(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:$s.current,hasInProgressBoundaries:p.length>0,suspendedAtCapture:k.length?k.join(","):void 0,isActionable:P,isUADivergent:b,page:S}
2),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=J.diffed;return J.diffed=e=>{if("string"==typeof e.type&&$s.current&&e.props&&e.__e instanceof Element){const t=e.props;for(const i of tV){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=eV(n),{closestFunctionParent:c,breadcrumb:u}=HB(e),d=c?ZB(c.type):null,p=JB(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(J.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:KB.has(n)?i:"[redacted]",domValue:KB.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=>`${ZB(e.type)??""}${e.__b}`;let i=0,o=!1;const s=J.__e;J.__e=(e,n,r)=>{if("function"==typeof n.type&&e&&"function"==typeof e.then&&Boolean(32&n.__u)){const r={name:ZB(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=J.diffed;J.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=FB(n);n.__k&&0===e.length?console.warn(`Suspended VNode ${UB(n)} returned no DOM-children, this causes hydration mismatches.`):n.__k&&e.length>1&&console.warn(`Suspended VNode ${UB(n)} returned > 1 DOM-child, this causes hydration mismatches.`)}t.splice(i,1)}}l?.(n)};const c=J.__c;J.__c=(e,n)=>{!o&&i<=0&&0===t.length&&u(),c?.(e,n)};const u=()=>{o||(o=!0,J.diffed=l,J.__e=s,J.__c=c,$s.current=!1,r?.())};return{teardown:u}})(r,p,0,m.flushAndTeardown);K(e,t),0===p.length&&h()}const iV="shop-pay-login-iframe",oV="100%",sV="publickey-credentials-get *",lV=9e4;async function cV(e){if(!document.body?.classList.contains("Loading"))return void Il(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(),Al(),t?.remove()),!document.body?.classList.contains("Loading")))return void Il(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,Il(document)}function uV(e){X(e),e.childNodes.forEach(e=>{e.remove()})}class dV extends gl{constructor(){super(...arguments),this.name="UnsafeURLError",this.unactionable=!0}}class pV extends gl{constructor(){super(...arguments),this.name="InsecurePageError",this.unactionable=!0}}const mV=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"]),hV=/^[^.]+\.checkout\.my\.shop\.dev$/i;function gV({isOnePage:e,isShopPay:t,path:n,uiExtensibility:r}){const a=function({isOnePage:e,isShopPay:t,path:n}){switch(n){case"/processing":return[qE];case"/throttle":return[QE];case"/thank-you":return[KE];case"/shoppay_login":return[$E]}if(t||e)return[PE];switch(n){case"/shipping":return[HE,gE];case"/payment":return[FE,gE];case"/review":return[jE,gE];case"/stock-problems":return[YE];default:return[fE]}}({isOnePage:e,isShopPay:t,path:n});return Ss({isOnePage:e,isShopPay:t,path:n})&&a.push(Fz),r.required.value&&a.push(v_,{load:r.ensureEngineLoaded}),a}function fV(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 yV=Object.freeze(Object.defineProperty({__proto__:null,captureServerBreadcrumb:fV,criticalAsyncComponents:gV,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?Ll(l,{currentUrl:t.router.currentUrl,latestReceipt:t.checkout.latestReceipt}):Nl()&&Al();const c=function({client:e,isShopPayActive:t,isShopPaySdkCheckout:n,observability:r}){if(!t)return;const a={stage:"armed"};return setTimeout(()=>{if(xl(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:lV,...i}}),r.log("shop_pay_skeleton_stuck","Shop Pay checkout still showing the loading skeleton",{delayMs:lV,...i,loaderPreviouslyRegistered:t.loaderPreviouslyRegistered,appHasContent:Boolean(e.rootElement?.childElementCount),loginFramePresent:Boolean(document.getElementById(iV)),documentReadyState:document.readyState,documentVisibilityState:document.visibilityState,reportedAtMs:Math.round(o)},{exportImmediately:!0}),bl().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(()=>{})},lV),a}({client:a,isShopPayActive:s,isShopPaySdkCheckout:Gs(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 pV(`Running on an insecure protocol: ${i}`);if(!hV.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)})||mV.has(t)}(i,l,t))throw new dV(`Running on an unexpected origin: ${i}. Allowed origins: ${t.join(", ")}`);if(!e.test(s))throw new dV(`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=al(t);if(!a?.requireBusinessCriticalOnly)return;const i=e(Z,a),o=t.checkout.configuration.getProfile({...a,requireBusinessCriticalOnly:!1});try{let e="serialized-cache"===n?await ic(t.graphql.coreGraphql,a):void 0;if("serialized-cache"===n&&!e)return oc(t.checkout.configuration.profileKey.peek(),{...a,requireBusinessCriticalOnly:!1}),void s("missing_cached_profile");const r=await il(()=>{},{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 ic(t.graphql.coreGraphql,a),oc(t.checkout.configuration.profileKey.peek(),{...a,requireBusinessCriticalOnly:Boolean(e)}),e||s("query_failure")}catch(l){if(t.graphql.coreGraphql.cache.delete(i),ac(t.observability,l),o){s("preparation_failure");try{t.checkout.extensibility.ui.replace({activatedExtensions:o.activatedExtensions},{keepAlive:!1,reason:"checkout_profile_change"})}catch(c){ac(t.observability,c)}try{t.checkout.configuration.update({profile:o,requireBusinessCriticalOnly:!1})}catch(c){ac(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 Js(t,{bootStartTime:n,bootPhaseTimings:r});s.waitUntil(async function(e){const{checkout:t,router:n}=e,r=gV({isOnePage:t.configuration.layout.isOnePage.value,isShopPay:"shopPay"===t.identity.current.value,path:n.currentUrl.value.normalizedPath,uiExtensibility:t.extensibility.ui}),a=I_(e);a&&r.push(a),await Promise.all(r.map(e=>e.load()))}(t)),a.dispatchEvent(s),await s.allResolved(),a.dispatchEvent(new Ks(s))}(t,{bootStartTime:n,bootPhaseTimings:r}),c&&(c.stage="context_ready");const u=performance.now(),p=d(VB,{terminalErrorHandler:i,children:d(hw,{context:t,children:d(BB,{})})});a.initialRequest.isServerRendered&&t.router.shouldHydrateServerRenderedRoute()?function(e,t,n){const r="shopPay"===n.checkout.identity.current.value,a=fV(t);aV(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:()=>st(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:vr(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=oB.current,i=r&&{breadcrumbIds:r.ids,breadcrumbActiveId:r.activeId,breadcrumbShowCartLink:r.showCartLink,breadcrumbHasCartUrl:r.hasCartUrl};return{serverCrumbCount:a?.count,serverActiveCrumbIndex:a?.activeIndex,...e,...t,...i}}})}(p,a.rootElement,t):function(e,t){uV(t),Q(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 cV();r&&(r.stage="skeleton_wait");const o=()=>{let t;r&&(r.stage="subscribed"),t=e.unstable_legacyNavigationPerformance.on("initialLoadingFinish",()=>{r&&(r.stage="loading_finished"),cV(n),t?.()})},s=e.unstable_legacyNavigationPerformance.on("event",e=>{e.type===Ws&&(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 Qs(e,{hydrateStartTime:t});n.dispatchEvent(r),await r.allResolved(),n.dispatchEvent(new Xs(r))}(t,{hydrateStartTime:u})},renderTerminalError:function({rootElement:e,terminalErrorPageElement:t}){return n=>async function(e,t){uV(e),Tl(t)||await cV()}(e,t)}},Symbol.toStringTag,{value:"Module"}));function vV({accessibilityRole:e,...t}){const n=Eu();return q(null==n?"h1":`h${n}`,{...t,role:"heading"===e?void 0:e})}function _V(){return h(U_)}const bV=["AT","AU","BE","BR","CA","CH","DE","DK","ES","FR","GB","HK","IN","IT","JP","LU","NL","NO","NZ","SA","SE","US","SG"],PV=["CA","US"],kV="google";function SV({children:e,theme:t}){const n=eh(),r=a(t),o=a();if(null==o.current){const e=new Zs(n.configuration);e.replace(rc(n.configuration,t),!1),o.current=e}return i(()=>{r.current=t,o.current?.replace(rc(n.configurationSignal.peek(),t),!1)},[t,n]),k(()=>{o.current.replace(rc(n.configurationSignal.value,r.current),!1)}),d(Le.Provider,{value:o.current,children:e})}const wV=["phone","company","firstName","lastName","countryCode"];function CV(e){return e.some(e=>e.deliveryPredictionEligible)}
2function EV({selectedMethods:e,deliveryExpectationLines:t,deliveryPromiseText:n}){const r=new Map;for(const o of t){const{deliveryStrategyHandle:e}=o;e&&r.set(e,o)}const a=e.flatMap(e=>{if(!e.deliveryPredictionEligible)return[];const t=r.get(e.handle);return"shop_promise"===t?.brandedPromise?.handle?[t]:[]})[0];if(!a)return;const i=a.brandedPromise;return i&&n?{brandedPromise:i,deliveryPromiseText:n}:void 0}var xV=(e=>(e.C1InlineModal="c1_inline_modal",e.C1Modal="c1_modal",e.C1ModalShopPay="c1_modal_shop_pay",e.C1ModalShopPaySignIn="c1_modal_shop_pay_sign_in",e.PaymentRequest="payment_request",e))(xV||{}),IV=(e=>(e.LoginLink="login_link",e.ErrorBannerConfirm="error_banner_confirm",e.ErrorModalClearEmail="error_modal_clear_email",e.ErrorModalContinue="error_modal_continue",e))(IV||{});const AV={Actions:"MV9Am"};function TV({children:e}){return d(HT,{containerName:"s-shell-section",accessibilityRole:"presentation",children:d(iy,{gap:"large-300",children:e})})}function LV({grouped:e,children:t}){return d(iy,{gap:e?"base":"large-400",className:TC.ThankYouEntranceCards,children:t})}function NV({children:e}){const t=Qw("Checkout::Actions::RenderBefore");return d(y,{children:[d(iT,{customizations:t,gap:"base"}),d("div",{className:v(AV.Actions,TC.ThankYouEntranceActions),children:e})]})}function RV({children:e}){const t=sc({base:!0,medium:!1}),{setTriggerNode:r}=iz("chat"),{currentDetour:a}=pc().value,i=n(e=>{r(t&&"thankYou"!==a?.type?e:null)},[t,a,r]);return d("div",{className:AV.PrimaryAction,ref:i,children:e})}function MV({children:e}){return d("div",{className:AV.SecondaryAction,children:e})}function DV({hasError:e,children:t}){const{i18n:n,shop:r}=ae(),a=e?`${n.translate("general.error_page_title")} - `:"",i=r?n.translate("general.full_title",{pageTitle:`${a}${t}`,shopName:r.name}):n.translate("general.loading_title");return jl(i),null}class OV extends Error{constructor(e){super(e),this.name="RouteNotFoundError"}}const zV=Object.freeze(Object.defineProperty({__proto__:null,RouteNotFoundError:OV,default:function(){const{currentPage:e}=pc().value,{router:t,observability:n,shopPay:r}=ae(),{search:a,pathname:o}=t.currentUrl.value,s=o.includes("/shoppay"),{replaceShopPayInHistory:l}=el(),c=e&&!s;return i(()=>{s&&(n.error(new OV('Attempted to render "/shoppay" route in 3 page layout, which is not supported')),n.counter({name:"shop_pay_route_not_found",value:1}),l(r.config.checkoutAsGuestUrl))},[s,n,l,r.config.checkoutAsGuestUrl]),c?(t.redirect({pathname:e.route,search:a}),null):null}},Symbol.toStringTag,{value:"Module"}));function BV(){const e=qe().paymentLines;return t(()=>{const[t]=pn(e.value,[In.BuyWithPrime]);return t})}function VV(){const{clearForcedCheckoutLayout:e}=Rv(tl),{inMemoryAmazonPayParts:{serializedAmazonParams:t,buyerDetails:r}}=_n();return Nk({shouldResetCustomerInfo:!0,skipRedirect:!0,shouldRemovePaymentLine:!0,onClick:n(()=>{e({wallet:In.AmazonPay}),nl(t),r.value={loading:!1,error:!1,details:void 0}},[e,t,r])})}function FV(){const{isOnePage:e}=ae().checkout.configuration.layout,t=Hr(),r=Lk();return n(()=>{e.value?r({shouldResetCustomerInfo:!0}):t()},[e,t,r])}function UV(){const e=ae().checkout.latestReceipt.value?.id,{persistedAmazonSignal:t}=_n();return Nk({shouldResetCustomerInfo:!0,onClick:n(()=>{YD(t,{receiptIdForAupError:e,receiptIdForPaymentDecline:e})},[t,e])})}var qV=(e=>(e.Unknown="unknown",e.Rejected="rejected",e.Errored="errored",e.InvalidTermsCount="invalid_terms_count",e.InvalidRepaymentsCount="invalid_repayments_count",e.UserUnsynchronized="user_unsynchronized",e.InvalidShippingAddress="invalid_shipping_address",e))(qV||{});function jV(e){for(const t of e)if("not_required"!==t.status)for(const e of t.methods)if(e.handle===t.selectedDeliveryMethodHandle)return e}
2class HV extends Error{constructor(){super(...arguments),this.name="PaymentMethodDoNotMatchError"}}var $V=(e=>(e.ShopPayProgressIntercept="ShopPay::Exception::ShopPayProgressIntercept",e))($V||{}),YV=(e=>(e.Online="online",e.RetailPos="retail_pos",e))(YV||{}),WV=(e=>(e.Dismissed="dismissed",e.Pending="pending",e.Verified="verified",e))(WV||{}),GV=(e=>(e.Generic="generic",e.SignInFailed="sign_in_failed",e.ContinueWithShopPay="continue_with_shop_pay",e))(GV||{});function JV(){const{observability:e,source:t,shopPay:r}=ae();return{openModal:n(n=>{r.user.isUnauthenticatedUser.value?r.session.unstable_setUnauthenticatedErrorModal(n):e.error(new rl("Cannot open an unauthenticated error modal outside of the unauthenticated flow",{groupingHash:"ShopPayError::UnauthenticatedErrorModal"}),{severity:"error",metadata:{source:{type:t.type},checkout:{token:t.checkoutSessionIdentifier||t.sourceId},event:{modalType:n.type,shopPayFlow:r.user.flow.value}}})},[e,t,r])}}function KV(){const e=yL();return t(()=>Array.from(e.value.values()).filter(e=>e.length>0).length>1)}function QV(e){const t=uC(),n=e.href?"span":y,{pixelId:r,...a}=e;return d(n,{ref:a.href?t(r):void 0,children:d(Zf,{...a,ref:a.href?void 0:t(r)})})}function XV(e=e=>{}){const t={},n=performance.now();return{marks:t,referenceTime:n,mark:r=>{t[r]=performance.now()-n,e({mark:r,timestamps:{...t}})}}}function ZV({endpoint:e,invokingWallet:t}){const a=m(!1),{checkout:{wallets:i}}=ae(),o=n(()=>{a.value&&(a.value=!1,i.clearActiveSession({invokingWallet:t}),e?.value?.call.closePopupWindows())},[a,e,t,i]);return r(()=>({isScrimOpen:a,closePopupWindowsAndScrim:o}),[a,o])}const eF=e=>{if(!e)return null;const t=e.querySelector("iframe");if(!t)return null;const n=getComputedStyle(t).borderRadius;return n?.includes("px")?parseInt(n,10):null};export{QV as $,HS as A,qf as B,GS as C,Ih as D,WS as E,Ck as F,kV as G,LS as H,mh as I,sh as J,Sm as K,ry as L,eu as M,Nd as N,jp as O,ZE as P,Zc as Q,xT as R,$f as S,gA as T,iT as U,hC as V,dD as W,dC as X,LV as Y,HM as Z,WM as _,Zu as a,rm as a$,$S as a0,fc as a1,Lv as a2,HT as a3,th as a4,vw as a5,sc as a6,eh as a7,Tv as a8,rA as a9,SV as aA,Uw as aB,Kd as aC,id as aD,RI as aE,Bd as aF,LN as aG,kB as aH,xB as aI,IB as aJ,bB as aK,Vu as aL,fw as aM,Bu as aN,Kp as aO,Up as aP,Qm as aQ,Gd as aR,ou as aS,iu as aT,su as aU,Vf as aV,zf as aW,Bf as aX,Df as aY,gm as aZ,Zp as a_,xu as aa,KL as ab,Gh as ac,AN as ad,uC as ae,Cz as af,IL as ag,Ow as ah,Bw as ai,AL as aj,Cw as ak,UL as al,PL as am,kL as an,wL as ao,bL as ap,NN as aq,nL as ar,Rz as as,iL as at,n_ as au,aM as av,gP as aw,qu as ax,rh as ay,Th as az,pN as b,Nf as b$,qw as b0,nd as b1,Qx as b2,EV as b3,CV as b4,Eh as b5,Od as b6,Ld as b7,uu as b8,Qp as b9,Qc as bA,Pv as bB,Jy as bC,mM as bD,av as bE,rD as bF,wB as bG,pv as bH,hv as bI,gv as bJ,fv as bK,CD as bL,KD as bM,iv as bN,cB as bO,fz as bP,Lh as bQ,Dh as bR,vz as bS,Yg as bT,uf as bU,yC as bV,FE as bW,ST as bX,kc as bY,Sc as bZ,Tf as b_,XI as ba,Mu as bb,Zw as bc,jb as bd,Y_ as be,$_ as bf,Hw as bg,$w as bh,hc as bi,cP as bj,Nb as bk,xN as bl,uM as bm,wA as bn,SA as bo,Ly as bp,nf as bq,TR as br,Tw as bs,lA as bt,_D as bu,aS as bv,xz as bw,Az as bx,uD as by,Mx as bz,iy as c,fA as c$,oA as c0,Oh as c1,Xg as c2,IA as c3,TA as c4,RA as c5,Sv as c6,Qd as c7,kh as c8,QS as c9,nm as cA,hx as cB,YL as cC,Bb as cD,Vb as cE,Fb as cF,Ub as cG,sP as cH,wT as cI,$b as cJ,CT as cK,vT as cL,kT as cM,bT as cN,HV as cO,Ax as cP,vV as cQ,Qh as cR,Gk as cS,fP as cT,Mz as cU,FL as cV,$D as cW,wf as cX,Gy as cY,Ky as cZ,wS as c_,_I as ca,HD as cb,aL as cc,oL as cd,O_ as ce,yv as cf,XS as cg,IT as ch,MA as ci,jv as cj,jh as ck,Hh as cl,Py as cm,Uh as cn,lI as co,qh as cp,$h as cq,IN as cr,AO as cs,wy as ct,KA as cu,BD as cv,OD as cw,zA as cx,cT as cy,Cf as cz,NB as d,nC as d$,c_ as d0,CB as d1,CI as d2,jD as d3,PD as d4,Xv as d5,uO as d6,oO as d7,cO as d8,VO as d9,OB as dA,Bv as dB,ax as dC,ub as dD,PB as dE,xx as dF,tm as dG,Ex as dH,Lx as dI,Rf as dJ,iA as dK,Px as dL,wx as dM,Sx as dN,gx as dO,vx as dP,fx as dQ,_x as dR,Cx as dS,Tx as dT,yx as dU,kx as dV,BA as dW,ML as dX,gC as dY,PC as dZ,$g as d_,DP as da,Zx as db,eI as dc,Ah as dd,TO as de,EO as df,QM as dg,qO as dh,Cm as di,bd as dj,Yd as dk,Pm as dl,vm as dm,jd as dn,Jp as dp,xd as dq,Cd as dr,Td as ds,qp as dt,Wp as du,$p as dv,Zm as dw,Rd as dx,Kh as dy,lz as dz,pc as e,Mh as e$,eC as e0,Pk as e1,sN as e2,Xh as e3,JV as e4,GV as e5,_S as e6,$V as e7,IS as e8,_T as e9,CR as eA,pM as eB,gD as eC,GT as eD,NM as eE,sz as eF,SR as eG,k_ as eH,Wk as eI,_c as eJ,bc as eK,df as eL,VV as eM,Dy as eN,aB as eO,qV as eP,tf as eQ,xV as eR,AS as eS,YV as eT,GE as eU,Ay as eV,cb as eW,hO as eX,lb as eY,Gx as eZ,Wx as e_,Xw as ea,LB as eb,zy as ec,yT as ed,tS as ee,fT as ef,mb as eg,Ev as eh,AR as ei,VD as ej,Sy as ek,wV as el,Xx as em,SB as en,EB as eo,rI as ep,pb as eq,_C as er,xI as es,iz as et,oM as eu,vM as ev,_M as ew,vI as ex,EM as ey,gM as ez,cz as f,wh as f$,HE as f0,uS as f1,dP as f2,gI as f3,sg as f4,hg as f5,Iy as f6,_V as f7,jw as f8,Zg as f9,UD as fA,FV as fB,Qv as fC,WD as fD,lB as fE,mg as fF,$z as fG,Yz as fH,bv as fI,BV as fJ,jV as fK,lO as fL,Kv as fM,qD as fN,jc as fO,tI as fP,Zv as fQ,Jv as fR,t_ as fS,zv as fT,Fv as fU,Lk as fV,Db as fW,cI as fX,py as fY,hy as fZ,rS as f_,eT as fa,ZA as fb,LL as fc,Zk as fd,Yk as fe,ix as ff,RP as fg,af as fh,WV as fi,XV as fj,DE as fk,qx as fl,ch as fm,Oy as f
2n,CO as fo,Qk as fp,oV as fq,iV as fr,sV as fs,lP as ft,ZV as fu,Wv as fv,eF as fw,my as fx,UV as fy,YD as fz,s_ as g,RT as g$,_g as g0,VR as g1,Tz as g2,Jh as g3,IV as g4,tg as g5,bk as g6,Ig as g7,wg as g8,W_ as g9,OS as gA,m_ as gB,Sg as gC,rx as gD,ZN as gE,jk as gF,pD as gG,PP as gH,Ty as gI,Qg as gJ,PV as gK,bV as gL,sA as gM,My as gN,ym as gO,oC as gP,FS as gQ,xh as gR,nk as gS,Vv as gT,zL as gU,nO as gV,e_ as gW,rO as gX,EI as gY,cM as gZ,dM as g_,Ww as ga,tC as gb,Gw as gc,uc as gd,M_ as ge,wc as gf,gc as gg,Yw as gh,V_ as gi,F_ as gj,cS as gk,gN as gl,xP as gm,Bh as gn,Uv as go,Ov as gp,zh as gq,lh as gr,vC as gs,mz as gt,pT as gu,JS as gv,dz as gw,nM as gx,Dv as gy,Hk as gz,Xc as h,KV as h$,bI as h0,SI as h1,RE as h2,SE as h3,CE as h4,wE as h5,AE as h6,TE as h7,NE as h8,VE as h9,Jg as hA,uA as hB,cA as hC,_A as hD,Kg as hE,Ry as hF,$y as hG,Yy as hH,AB as hI,TB as hJ,bb as hK,tP as hL,kI as hM,lM as hN,Zy as hO,eg as hP,TC as hQ,oR as hR,sR as hS,lR as hT,BR as hU,MM as hV,LM as hW,JR as hX,DM as hY,uR as hZ,cL as h_,LD as ha,Dg as hb,Sh as hc,yP as hd,JT as he,DL as hf,KT as hg,PI as hh,Hb as hi,eP as hj,Zb as hk,$P as hl,pP as hm,YS as hn,p_ as ho,xy as hp,Wh as hq,sL as hr,mf as hs,nI as ht,Lu as hu,MN as hv,CN as hw,OP as hx,oS as hy,sS as hz,mc as i,EA as i$,uy as i0,sy as i1,LI as i2,uz as i3,wz as i4,bD as i5,ov as i6,Ok as i7,Hy as i8,Nk as i9,ld as iA,sd as iB,QA as iC,$A as iD,Dd as iE,ug as iF,Hv as iG,KS as iH,Mf as iI,RM as iJ,RR as iK,WR as iL,PM as iM,rd as iN,zu as iO,Wu as iP,$d as iQ,Fd as iR,Hd as iS,lN as iT,od as iU,BT as iV,TI as iW,Ku as iX,DO as iY,Dp as iZ,ad as i_,ex as ia,nx as ib,tx as ic,eS as id,aO as ie,Dk as ig,sO as ih,cv as ii,BS as ij,tv as ik,db as il,Yh as im,TN as io,gz as ip,sv as iq,ox as ir,XT as is,Qb as it,Fh as iu,uB as iv,KN as iw,B_ as ix,b_ as iy,rf as iz,Rv as j,Tp as j0,iN as j1,WO as j2,YO as j3,GO as j4,QO as j5,tz as j6,ez as j7,ZO as j8,XO as j9,KO as ja,JO as jb,cx as jc,yL as jd,Cy as je,dA as jf,k
2D as jg,yV as jh,Mv as k,Zf as l,RV as m,KM as n,Jf as o,MV as p,DV as q,TV as r,NV as s,Oz as t,vc as u,Cv as v,Qw as w,RN as x,Ix as y,jS 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.