PageSourceSearch

https://societysplant.com/cdn/shopifycloud/checkout-web/assets/c1/page-ThankYou.ZNDSrmuF.js

js societysplant.com collected 2026-09-28 23:58:40 UTC 149,212 bytes, 2 lines download raw bytes

1import{k as re,u as e,S as O,A as $,h as F,e as ne,T as ue,y as Pn,q as W,f as S,g as B,_ as Wn,ai as ar,E as Ke,j as Vn,l as ye,i as E,p as ln,D as rr,av as or,X as Bt,x as Ft,W as Gn,aB as ir,L as sr,Y as lr,Z as cr,n as Kn,o as ur}from"./esnext-vendor.DDpcaSqU.js";import{eJ as j,i as he,k as _,I as oe,l as k,cv as dr,X as pr,G as U,aa as Ut,cT as hr,P as w,n as L,a0 as H,cA as Mn,gN as mr,q as mn,r as Ht,af as _r,a7 as Me,L as ke,B as R,a8 as An,d0 as yr,dg as zt,cD as Ye,aj as De,cr as Qe,W as Rn,aG as gr,er as Yt,hM as fr,hN as qt,hO as br,c7 as vr,a2 as Ze,b as kr,bM as Cr,s as ve,U as on,hP as Oe,fZ as $t,hQ as Ee,am as _n,F as Ln,hR as en,hS as nn,hT as tn,hU as Sr,gI as Tr,hV as Ir,hW as Pr,hX as wr,hY as Er,hZ as Mr,M as xn,b0 as Wt,bC as Ar,b6 as Rr,H as Lr,eE as Vt,h_ as xr,a1 as Gt,$ as wn,h as Kt,a as Dr,bw as Or,S as Nr,h$ as yn,cw as jt,i0 as Br,i1 as Fr,dN as Ur,O as Hr,Q as zr,aE as Yr,aF as qr,i2 as $r,eG as Wr,cp as Vr,bp as Gr,i3 as Kr,i4 as jr,R as Qr,p as Zr,j as Xr,m as Jr,o as eo}from"./hydrate.BcfGVx0L.js";import{I as je,T as v,a5 as N,ai as se,jq as no,jr as Dn,bL as Qt,eo as On,aO as to,aK as Xe,b7 as gn,js as ao,cs as Zt,aw as Xt,aA as En,W as ro,aY as Jt,bI as ea,dt as na,jt as oo,bV as ta,ju as io,V as jn,aU as so,jv as aa,cG as lo,aJ as ra,dm as co,jw as uo,cQ as po,c3 as ho,b9 as mo,dT as _o,b8 as yo,jx as go,bk as Nn,jy as fo,b3 as bo,eB as vo,ey as oa,n as Bn,jz as ko,cC as Co,ej as ia,jA as cn,bO as So,D as To,jB as Io,an as Po,jC as wo,jD as Eo,eT as Mo,g2 as Ao,jE as Ro,bb as Qn,av as Lo,ih as xo,jd as Do,ag as Oo}from"./utilities-previous.Cnwy8G2v.js";import{a as Ae,u as No,T as Bo}from"./stopwatch.B56VZk5r.js";import{E as sa}from"./EmailField.DprXO6cp.js";import{S as Le}from"./Section-SectionStyleOverride.CdNufRZ0.js";import{C as Fo,u as Uo,S as Zn,c as Ho}from"./CalloutHeader.DC7jgv42.js";import{b as la,i as zo,s as ca,c as Yo,a as qo}from"./shipping-methods-consolidated-included.Cuff-UKu.js";import{d as ua,b as $o}from"./MerchandiseModal.BklvgDzs.js";import{P as q}from"./PaymentIcon.-ypvsmSq.js";import{P as Wo}from"./Pressable.ChoeO1LE.js";import{u as Vo,A as Je,S as fn}from"./utilities-stable-ref.dCtJn23l.js";import{C as da}from"./Checkbox.CdJzVizb.js";import{P as Go}from"./PhoneField.rAEISard.js";import{v as Ko,a as jo,S as un,c as Qo}from"./useShopPayButtonClassName.C6ri8rG_.js";import{l as $e,m as Zo,r as pa,S as ha,M as ma,R as _a,n as Xo,c as Jo,o as ei,h as ni,a as Ge,p as ti,I as ai,f as ri,g as Q,j as oi,k as ii,q as si,P as li,s as ci,C as ui,t as di}from"./useAuthorizeUrl-index.CkivndK9.js";import{g as pi,T as hi}from"./Theme-ThemeOverride.CSLUDabY.js";import{P as mi,M as _i,m as ya}from"./Map.zn3N8TdH.js";import{P as yi}from"./Popover.ZkMcWGfE.js";import{I as gi}from"./hooks-useStableHostMethodsReferences.CidTc5Dm.js";import{I as ga}from"./shop-pay-installments-monorail.B1-OWrOB.js";import{S as bn,P as fi}from"./shared-shop-theme.BKb8cP_L.js";import{S as bi}from"./ShipmentLine.DhermpYE.js";import{a as vi,i as ki}from"./EstimatedDeliveryContent.DhMNjS2y.js";import{D as Ci,B as Si}from"./BuyWithPrimeOrderTrackingButton.BiUJIFce.js";import{S as Ti,a as Ii}from"./ShipmentBreakdown.BDcVtteK.js";import{a as Fn,u as Pi}from"./hooks-useShouldRevealCustomization.djt7DCHB.js";import"./app.DdDscdWN.js";import{f as wi}from"./shared-permissions.B59tuyWB.js";import{T as Ei}from"./TransitionHeight.Bhh9D1te.js";import{v as Mi}from"./dist-v4.EwEgHOG0.js";import"./graphql-PaymentSessionMutation.C-nDEOnn.js";import"./hooks-useShopPayExternalAppContext.R6pnDxYu.js";import"./FormLayout.UkTBTXMZ.js";import"./amazon-pay-useAmazonPayPaymentLine.X7jqQiq6.js";import"./hooks-useSuppressShopPayModalOnLoad.Cvo-K0z2.js";import"./ShippingMethodRateLabel.D5IEFYQ5.js";import"./shipping-methods-grouping.BdWvUqFk.js";import"./amazon-constants.D9ZwhJsy.js";const Ai={id:"0c62c3aaedf84bd307e1134828e5fcc88a47d83c453c97544a6cc8711e6444af",type:"mutation",name:"SubscribeForShippingUpdates",source:""};class Xn extends Error{constructor(){super(...arguments),this.name="SubscribeForShippingUpdateError"}}function Ri(){const{client:n,observability:t,graphql:{coreGraphql:a}}=v(),r=n.unstable_getSerialization("sessionToken"),[o,i]=re(),[s,l]=re("idle"),u=j()?.orderIdentity?.id;async function d(m){if(l("loading"),i(void 0),!r||!u){l("failed"),i("SUBSCRIPTION_FAILED"),t.error(new Xn("Missing sessionToken or orderId"));return}const{data:p}=await a.mutate(Ai,{variables:{sessionToken:r,orderId:u,email:m}});if(p){const{__typename:h}=p?.subscribeForShippingUpdates;switch(h){case"SubscribeForShippingUpdatesSuccess":l("subscribed");return;case"SubscribeForShippingUpdatesFailure":l("failed"),i(p?.subscribeForShippingUpdates.code);return;
1default:l("idle"),t.error(new Xn("Undefined subscribeForShippingUpdates type"))}}}return{submitSubscribeForShippingUpdate:d,status:s,error:o}}function Un(){const{checkout:n}=v(),t=Ae(),r=j()?.isRedacted??!1,o=!!t?.shopAppEligible,i=!!t?.shopAppQrCodeKillswitch;return!r&&o&&!i&&!n.configuration.isUniversalCheckoutFinalizer}function fa(){const n=j();if(n?.orderIdentity?.id)return Number(je(n.orderIdentity.id))}var sn=(n=>(n[n.DisplayButton=0]="DisplayButton",n[n.DisplayForm=1]="DisplayForm",n))(sn||{});function Li({children:n,open:t,label:a,onClick:r,icon:o}){return t?e(O,{children:n}):e(_,{direction:"inline",gap:"base",children:e(he,{onClick:r,"aria-expanded":!1,children:e(_,{direction:"inline",gap:"small-200",alignItems:"center",children:[e(oe,{type:o}),e(k,{children:a})]})})})}const xi=({label:n,onInputValueChange:t,error:a,value:r})=>{const o=$();return F(()=>{o.current?.focus()},[a]),e(sa,{id:"email",name:"email",label:n,ref:o,onInput:t,required:!0,error:a,value:r})},Di=({onHandleSubmit:n,isFormSubmitting:t,subscriptionErrorMessage:a})=>{const r=ne(""),{i18n:o}=v(),i=r.value,s=ue(()=>Pn(void 0),[a]),l=s.value,[c,u]=re(!1),d=o.translate("thank_you.order_updates_submit_subscription"),m=ue(()=>({state:{email:r},errors:{email:s}}),[r,s]),p=()=>{if(u(!1),!/@/.test(i)){s.value=o.translate("field_errors.email_invalid");return}s.value=void 0,n(i)},h=y=>{s.value=void 0,u(!0),r.value=y};return F(()=>{c||(l||a)&&(s.value=l||a)},[c,l,a,s]),e(hr,{target:"order.deliveryUpdates",children:e(dr,{...m,children:e(pr,{onSubmit:p,implicitSubmit:d,children:e(_,{gap:"small-300",children:[e(U,{gap:"small-400 small-200",gridTemplateColumns:"minmax(0, 50%) minmax(auto, max-content)",gridAutoColumns:"1fr",gridTemplateRows:"minmax(auto, max-content)",gridAutoRows:"minmax(auto, max-content)",children:[e(xi,{label:o.translate("contact.email_label"),value:i,error:!!l,onInputValueChange:h}),e(he,{variant:"primary",type:"submit",loading:t,children:d})]}),l?e(Ut,{controlID:"email",children:l}):null]})})})})},Oi=()=>{const{i18n:n}=v(),{value:t}=N().contactInfo,{submitSubscribeForShippingUpdate:a,status:r,error:o}=Ri(),[i,s]=re(sn.DisplayButton),[l,c]=re(!0),u=y=>{y&&a(y)},m=W(y=>{switch(y){case"SUBSCRIPTION_FAILED":return n.translate("thank_you.order_updates_subscribe_to_email_notifications_failed");case"EMAIL_ALREADY_EXISTS":return n.translate("thank_you.order_updates_subscribe_to_email_notifications_email_already_exists");case"INVALID_REQUEST_INPUT":case"INVALID_EMAIL":return n.translate("field_errors.email_invalid")}},[n])(o);F(()=>{c(r!=="subscribed")},[r,o]);const p=()=>{t?.email?u(t.email):s(sn.DisplayForm)},h={subTitle:n.translate("thank_you.order_status_updates_with_email"),fieldLabel:n.translate("thank_you.order_updates_subscribe_to_email_notifications")};return e(O,{children:[e(w,{children:h.subTitle}),l&&e(_,{gap:"base",padding:"base none none none",children:e(Li,{label:h.fieldLabel,open:i===sn.DisplayForm,icon:"email",onClick:p,children:e(Di,{onHandleSubmit:u,isFormSubmitting:r==="loading",subscriptionErrorMessage:m})})})]})},Ni=()=>{const{i18n:n,shop:t}=v(),a=t.hasFlagEnabled(se),r=n.translate("thank_you.order_updates_title");return e(H,{accessibilityLabel:r,colorLayer:a?void 0:"control",children:e(_,{gap:"small-200",children:[e(L,{children:r}),e(Oi,{})]})})};function Bi(n,t=!0){const{router:a}=v(),r=Mn();F(()=>{if(t&&n&&!r){window.history&&(window.history.replaceState(null,document.title,window.location.href),window.history.pushState(null,document.title,window.location.href));const o=()=>{document.hidden||(window.location.href=n)};return window.addEventListener("popstate",o),()=>{window.removeEventListener("popstate",o)}}},[t,n,a,r])}function Fi(){const n=N(),t=n.buyerIdentity,a=no(),r=mr(),o=n.contactInfo,s=j()?.isRedacted??!1;return S(()=>!s&&r.value&&!o?.value?.email&&!t?.value?.purchasingCompany&&!a.value)}function Ui(){const n=N().paymentLines,t=Ae();return S(()=>(n.value?n.value.lines.some(({method:r})=>r.type==="wallet"&&r.name==="SHOPIFY_INSTALLMENTS"):!1)&&!!t?.installmentsHighlightEligible)}function Hi(){const n=N(),t=n.deliveryNext,a=n.deliveryExpectations;return S(()=>{const r=t.value,o=a.value,i=r?.status==="filled",s=o?.status==="filled",l=i&&r.lines.some(p=>p.type==="ONE_TIME_PURCHASE"&&p.status==="available"&&p.methods.some(h=>h?.brandedPromise)),c=i?new Set(r.lines.filter(p=>p.status==="available").map(p=>p.status==="available"?p.selectedDeliveryMethodHandle:null)):null,u=s&&o.deliveryExpectationLine
1s.some(({brandedPromise:p,deliveryStrategyHandle:h})=>p&&c?.has(h)),d=l||u,m=s&&o.deliveryExpectationLines.some(({brandedPromise:p,deliveryExpectationPresentmentTitle:h})=>!p&&h?.short&&h?.long);return!!(d||m)})}function qe(){const{deliveryNext:n}=N(),t=Hi(),a=mn(),r=ua(),o=Dn();return S(()=>{const i=Qt(n.value),s=Ht(a.value.currentDetour),l=o.value.length>=On,{oneTimePurchaseLines:c,subscriptionLines:u}=_r(to(n.value).filter(Xe)),{groups:d,nonShippableCount:m}=la(c),p=n.value?.status==="filled"&&d.length+m===1;return i&&l&&!p||p&&u.length>=2||r.value||t.value&&s})}const zi="MultibancoBuyerActionInfo",Yi=(n,t)=>n.length===0?t:Object.keys(t).reduce((r,o)=>n.includes(o)?r:{...r,[o]:t[o]},{}),Hn=()=>{const{userEvents:n,checkout:t,shop:{myshopifyDomain:a,id:r},source:{checkoutSessionIdentifier:o="checkout_identifier_undefined"}}=v(),i=t.configuration.layout.isOnePage.value,s=Number(je(r)),l=i?"checkout_one_redesign":"checkout_one",c=ue(()=>({checkoutToken:o,shopId:s,checkoutVersion:l,shopifyDomain:a}),[o,l,a,s]);return{track:W((d,m,p)=>{n.monorailEvent({schemaId:d,payload:Yi(p?.omit??[],{...c,...m})})},[c,n])}};function qi(){if(typeof window>"u"||!window.shopAppExperimentFlags)return;function n(t){const a={control:"c",treatment:"t"}[t];return a||t}return window.shopAppExperimentFlags.sort((t,a)=>t.name<a.name?-1:1).map(t=>`${t.name}=${n(t.group)}:r`).join(",")}function ba(){return qi()}function Ce(n){const t=gn(),a=fa(),{track:r}=Hn(),o=ba();return{track:W(s=>{a&&r("order_status_page_interaction/4.0",{interactionType:n,interactionValue:s,orderId:a,pageviewToken:t.value.defaultAttributes?.microSessionId??"",sessionToken:t.value.defaultAttributes?.visitToken??"",experimentFlags:o},{omit:["shopifyDomain"]})},[o,n,r,a,t])}}function $i(){const n=N().paymentLines,t=j()?.paymentDetails,{track:a}=Ce("follow_link"),{i18n:r,source:o,shop:{contactEmail:i}}=v(),s=o.type==="simulated",l=S(()=>{const d=n.value?.lines,m=(d?ao(d):void 0)?.cost;if(m)return r.formatCurrency(m.amount,{form:"short",currency:m.currencyCode});const p=Number.parseFloat(t?.paymentAmount??""),h=t?.paymentCurrency;return Number.isFinite(p)&&h?r.formatCurrency(p,{form:"short",currency:h}):0}),c=S(()=>r.translate("payment.pending_payment.multibanco.buyer_action_info",{amount_due:l.value})),u=t?.buyerActionInfo;return e(_,{gap:"base",children:e(_,{gap:"small-200",children:[e(L,{children:c}),e(_,{direction:"inline",gap:"base",children:e(Me,{children:r.translate("payment.pending_payment.multibanco.instruction_html",{contact_us:e(ke,{href:s?void 0:`mailto:${i}`,onClick:s?void 0:()=>a("contact_us"),children:r.translate("thank_you.contact_us")})})})}),e(U,{gridTemplateColumns:"@media (inline-size >= small) 'repeat(3, minmax(0, 1fr))', 'minmax(0, 1fr)'",gridAutoColumns:"@media (inline-size >= small) 'repeat(3, minmax(0, 1fr))', 'minmax(0, 1fr)'",gridTemplateRows:"minmax(auto, max-content)",gridAutoRows:"minmax(auto, max-content)",gap:"small-200",children:[e(H,{children:e(_,{gap:"base",children:[e(_,{gap:"small-200",children:e(L,{children:r.translate("payment.pending_payment.multibanco.entity")})}),e(_,{gap:"small-200",children:e(k,{children:u?.entity})})]})}),e(H,{children:e(_,{gap:"base",children:[e(_,{gap:"small-200",children:e(L,{children:r.translate("payment.pending_payment.multibanco.reference")})}),e(_,{gap:"small-200",children:e(k,{children:u?.reference})})]})}),e(H,{children:e(_,{gap:"base",children:[e(_,{gap:"small-200",children:e(L,{children:r.translate("payment.pending_payment.multibanco.amount")})}),e(_,{gap:"small-200",children:e(k,{children:l})})]})})]})]})})}function Wi(){const{i18n:n,shop:t}=v(),a=j()?.paymentDetails?.buyerActionInfo,r=t.hasFlagEnabled(se);return a?.__typename!==zi?null:e(H,{accessibilityLabel:n.translate("thank_you.customer_information_title"),colorLayer:r?void 0:"control",children:e($i,{})})}function va(n){return!!(n?.label&&n?.text)}function Vi(n){return n.details?.filter(va)??[]}function ka(n,t){const a=n.amount;if(!(a?.amount==null||!a.currencyCode))return{accessibleAmount:t.formatCurrency(a.amount,{form:"name",currency:a.currencyCode}),value:`${t.formatCurrency(a.amount,{form:"short",currency:a.currencyCode})} ${a.currencyCode}`}}function Ca(n,t){if(!n)return;const a=new Date(n);return{date:t.formatDate(a,{month:"short",day:"numeric",year:"numeric"}),time:t.formatDate(a,{hour:"numeric",minute:"2-digit"})}}function Sa(n){if(n.status==="expired")return!0;
1if(!n.expiresAt)return!1;const t=new Date(n.expiresAt).getTime();return Number.isFinite(t)&&t<=Date.now()}const Gi="TNF54",Ki="Bedu9",ji="RExUg",Qi="CMO8N",Zi="Bgyek",Xi="JuwoV",Ji="_8A0Cd",es="JIcdC",ns="Xaalv",Pe={Chains:Gi,Chain:Ki,ChainOpen:ji,Steps:Qi,Step:Zi,Chin:Xi,ChainBody:Ji,ChainBodyInner:es,ChainHeader:ns},ts={familymart:"familymart",lawson:"lawson",ministop:"ministop",seicomart:"seicomart"},Jn="Asia/Tokyo";function Ta(n){return!!(n?.label&&n?.text)}function Ia(n){return n.key??n.label??"konbini"}function as(n,t){const a=n.amount;if(!(a?.amount==null||!a.currencyCode))return{accessibleAmount:t.formatCurrency(a.amount,{form:"name",currency:a.currencyCode}),value:`${t.formatCurrency(a.amount,{form:"short",currency:a.currencyCode})} ${a.currencyCode}`}}function rs(n,t){if(!n)return;const a=new Date(n),r=t.formatDate(a,{month:"short",day:"numeric",year:"numeric",timeZone:Jn}),o=t.formatDate(a,{hour:"numeric",minute:"2-digit",hour12:!0,timeZone:Jn});return t.translate("payment.lpm.konbini.voucher.expiry_date_time",{date:r,time:o})}function os({detail:n,id:t}){const{i18n:a}=v(),r=ne(!1),o=async()=>{try{await zt(n.text),r.value=!0}catch{r.value=!1}},i=a.translate("payment.lpm.konbini.voucher.code_copied");return e(O,{children:[e(yr,{id:t,name:t,label:n.label,value:n.text,readOnly:!0,accessoryEnd:e(he,{variant:"tertiary",size:"small",onClick:o,accessibilityLabel:r.value?i:a.translate("payment.lpm.konbini.voucher.copy_code",{label:n.label}),children:e(oe,{type:r.value?"check":"clipboard"})})}),e("p",{role:"status","aria-live":"polite",className:Zt({screenReaders:"only"}),children:r.value?i:""})]})}function is({instructionSet:n,open:t,onToggle:a}){const r=Ia(n),o=n.label??r,i=(n.details??[]).filter(Ta),s=(n.steps??[]).filter(Boolean),l=`konbini-chain-${r}-instructions`;return e("div",{id:`konbini-chain-${r}`,className:B(Pe.Chain,t&&Pe.ChainOpen),children:[e(Wo,{accessibilityRole:"expandableControl",accessibilityLabel:o,controlId:l,expanded:t,onPress:a,className:Pe.ChainHeader,padding:"base",children:e(U,{gridTemplateColumns:"auto minmax(0, 1fr) auto",gap:"small-300",alignItems:"center",children:[e(q,{type:ts[r]??"konbini",active:!0,accessibilityVisibility:"hidden"}),e(k,{type:"strong",children:o}),e(oe,{type:t?"chevronUp":"chevronDown",size:"small"})]})}),e("div",{className:Pe.ChainBody,children:e(U,{id:l,gridTemplateRows:t?"minmax(0, 1fr)":"minmax(0, 0fr)",children:e("div",{className:Pe.ChainBodyInner,children:e(R,{inert:!t,padding:"base",paddingBlockStart:"none",children:e(_,{gap:"base",children:[e(U,{gridTemplateColumns:i.length>1?"minmax(0, 1fr) minmax(0, 1fr)":"1fr",gap:"small-400",children:i.map((c,u)=>e(os,{detail:c,id:`konbini-${r}-code-${u}`},c.label))}),s.length>0?e("ol",{className:Pe.Steps,children:s.map(c=>e("li",{className:Pe.Step,children:e(k,{color:"subdued",size:"base",children:c})},`${r}-${c}`))}):null]})})})})})]})}function ss({amount:n,expired:t}){const{i18n:a}=v();return t?e(L,{level:1,children:a.translate("payment.lpm.konbini.voucher.expired_title")}):n?e(L,{level:1,children:[e(k,{accessibilityVisibility:"exclusive",children:a.translate("payment.lpm.konbini.voucher.pay",{amount:n.accessibleAmount})}),e(k,{accessibilityVisibility:"hidden",size:"extraLarge",children:a.translate("payment.lpm.konbini.voucher.pay",{amount:n.value})})]}):null}function ls({expiryDate:n,expired:t}){const{i18n:a}=v();if(!n)return null;const r=e(k,{color:"subdued",size:"base",type:"strong",children:n});return e(k,{color:"subdued",size:"base",children:t?a.translate("payment.lpm.konbini.voucher.expired",{date:r}):a.translate("payment.lpm.konbini.voucher.expires_at",{date:r})})}function cs({paymentInstructions:n}){const{i18n:t}=v(),a=(n.instructionSets??[]).filter(c=>(c.details??[]).some(Ta)),r=ne(null);if(a.length===0)return null;const o=as(n,t),i=Sa(n),s=rs(n.expiresAt,t),l=t.translate("payment.lpm.konbini.voucher.label");return e(An,{children:e(_,{gap:"none",children:[e(R,{accessibilityLabel:l,accessibilityRole:"section",background:"base",colorLayer:"control",border:"base",borderRadius:i?"large":"large large none none",padding:"large-100",inlineSize:"100%",children:e(_,{gap:"base",children:[e(_,{gap:"small-300",children:[e(U,{alignItems:"start",ga
1p:"base",gridTemplateColumns:"minmax(0, 1fr) auto",children:[e(ss,{amount:o,expired:i}),e(q,{type:"konbini",active:!0,accessibilityVisibility:"hidden"})]}),i?null:e(k,{color:"subdued",size:"base",children:t.translate("payment.lpm.konbini.voucher.choose_outlet")}),e(ls,{expiryDate:s,expired:i})]}),i?null:e("div",{className:Pe.Chains,role:"group","aria-label":l,children:a.map(c=>{const u=Ia(c);return e(is,{instructionSet:c,open:r.value===u,onToggle:()=>{r.value=r.value===u?null:u}},u)})})]})}),i?null:e(R,{className:Pe.Chin,padding:"base",paddingInline:"large-100",children:e(k,{color:"subdued",size:"base",children:t.translate("payment.lpm.konbini.voucher.keep_receipt")})})]})})}const us="Gltpp",ds={CodeValue:us};function ps({details:n}){const{i18n:t}=v();return e(_,{gap:"small-500",children:n.map(a=>e(R,{borderRadius:"base",className:ds.CodeValue,inlineSize:"100%",children:e(k,{type:"small",color:"subdued",children:t.translate("payment.pending_payment.multibanco.labelled_code",{label:a.label,code:a.text})})},a.label))})}function hs({step:n,expiry:t}){const{i18n:a}=v();return n?e(_,{gap:"none",children:[e(k,{color:"subdued",size:"base",children:n}),t?e(k,{color:"subdued",size:"base",children:a.translate("payment.pending_payment.multibanco.expires_at",{date:e(k,{color:"subdued",size:"base",type:"strong",children:t})})}):null]}):null}function ms({expiry:n}){const{i18n:t}=v();return n?e(k,{color:"subdued",size:"base",children:t.translate("payment.pending_payment.multibanco.expired",{date:e(k,{color:"subdued",size:"base",type:"strong",children:n})})}):null}function _s({amount:n,expired:t}){const{i18n:a}=v();return t?e(L,{level:1,children:a.translate("payment.pending_payment.multibanco.expired_title")}):n?e(L,{level:1,children:[e(k,{accessibilityVisibility:"exclusive",children:a.translate("payment.pending_payment.multibanco.pay",{amount:n.accessibleAmount})}),e(k,{accessibilityVisibility:"hidden",size:"extraLarge",children:a.translate("payment.pending_payment.multibanco.pay",{amount:n.value})})]}):null}function ys({paymentInstructions:n}){const{i18n:t}=v(),a=n.instructionSets?.find(({key:u})=>u==="multibanco");if(!a)return null;const r=Vi(a);if(r.length===0)return null;const o=ka(n,t),i=Sa(n),s=Ca(n.expiresAt,t),l=s?t.translate("payment.pending_payment.multibanco.expiry_date_time",s):void 0,c=t.translate("payment.pending_payment.multibanco.label");return e(An,{children:e(R,{accessibilityLabel:c,accessibilityRole:"section",background:"base",colorLayer:"control",border:"base",borderRadius:"large",padding:"large-100",inlineSize:"100%",children:e(_,{gap:"small-200",children:[e(U,{alignItems:"start",gap:"base",gridTemplateColumns:"minmax(0, 1fr) auto",children:[e(_s,{amount:o,expired:i}),e(q,{type:"multibanco",active:!0,accessibilityVisibility:"hidden"})]}),i?e(ms,{expiry:l}):e(hs,{step:a.steps?.[0],expiry:l}),e(ps,{details:r})]})})})}const gs="/cdn/shopifycloud/checkout-web/assets/c1/assets/add-to-apple-wallet.c2C6mOjH.svg",fs="_8CGB7",bs="chT5l",et={AppleWalletBadge:fs,AppleWalletAction:bs},vs=/Shop App\/[^/]+\/iOS\//;function ks(n){const t=Xt(n);return t==="iOS"||t==="Mac OS"||vs.test(n)}function Cs({passUrl:n}){const{client:t,i18n:a}=v();return!n||!ks(t.userAgent)?null:e(R,{className:et.AppleWalletAction,paddingBlockStart:"large-100",children:e(U,{justifyItems:"center",children:e(ke,{href:n,children:e(Ye,{src:gs,alt:a.translate("payment.pending_payment.apple_wallet.badge_alt"),className:et.AppleWalletBadge,inlineSize:"auto"})})})})}const Ss=200,Ts=8,nt=8;function Pa(n){return Math.round(n/nt)*nt}function wa(n,t){try{const a=new URL(n);return a.searchParams.set("width",t.toString()),a.toString()}catch{return n}}function Is(n){try{const t=Number(new URL(n).searchParams.get("width"));return Number.isFinite(t)&&t>0?Pa(t):void 0}catch{return}}function Ps(n,t){const a=Is(n);return a!=null&&Math.abs(a-t)<Ts}function ws(n){const t=$(null),a=$(n),r=$(null),o=$(0),i=ne(n),s=ne(!1);return Wn(()=>{o.current+=1,a.current=n,r.current=null,i.value=n,s.value=!1},[n,s,i]),Wn(()=>{const l=t.current;if(!n||!l)return;const c=typeof ResizeObserver<"u";let u,d=!1;const m=()=>{o.current+=1,r.current=null,s.value=!1,u&&(clearTimeout(u),u=void 0)},p=(f,b)=>{const C=wa(n,f),T=new window.Image;T.onload=()=>{!d&&b===o.current&&(a.current=C,r.current=null,i.value=C,s.value=!1)},T.onerror=()=>{!d&&b===o.current&&(r.current=null,s.value=!1)},T.src=C},h=f=>{const b=Pa(f);if(b<=0)return;const C=a.current;if(C&&Ps(C,b)){m();return}if(r.current===b){s.value=!0;return}r.current=b;const T=o.current+1;o.current=T,s.value=!0,u&&clearTimeout(u),u=setTimeout(()=>p(b,T),Ss)},y=()=>{h(l.getBoundingClientRect().width)};if(y(),!c)return window.addEventListener("resize",y),()=>{d=!0,u&&clearTimeout(u),window.removeEventListener("resize",y)};const g=new ResizeObserver(([f])=>{f&&h(f.contentRect.width)});return g.observe(l),()=>{d=!0,u&&clearTimeout(u),g.disconnect()}},[n,s,i]),{containerRef:t,imageUrl:i,isLoading:s}}const Es="TBsba",Ms="PITIE",As="Fmqjk",kn={BarcodePicture:Es,BarcodeImage:Ms,LoadingOverlay:As},Rs=510;function Ls({imageUrl:n,altText:t,height:a,printWidth:r=Rs}){const{containerRef:o,imageUrl:i,isLoading:s}=ws(n),l=i.value||n,c=wa(n,r);return e(R,{ref:o,inlineSize:"100%",blockSize:a,children:e(R,{inlineSize:"100%",blockSize:"100%",position:"relative",children:[e("picture",{className:kn.BarcodePicture,children:[e("source",{media:"print",srcSet:c}),e(Ye,{src:l,alt:t,className:kn.BarcodeImage,inlineSize:"auto",objectFit:"contain"})]}),s.value?e("div",{"aria-hidden":"true",className:kn.LoadingOverlay,children:e(De,{contentDisplay:"block",inlineSize:"100%",blockSize:"100%",delay:!1})}):null]})})}const xs="OVcKI",Ds={ReferenceValue:xs},Os="67.5px",Ns="510px";function Bs({barcode:n,detail:t}){if(!n?.imageUrl)return null;const a=t?`${t.label}: ${t.text}`:"";return e(R,{inlineSize:"100%",maxInlineSize:Ns,children:e(Ls,{imageUrl:n.imageUrl,altText:n.altText||a,height:Os})})}function Fs({step:n,expiry:t}){const{i18n:a}=v();return n?e(_,{gap:"none",children:[e(k,{color:"subdued",size:"base",children:n}),t?e(k,{color:"subdued",size:"base",children:a.translate("payment.pending_payment.oxxo.expires_at",{date:e(k,{color:"subdued",size:"base",type:"strong",children:t})})}):null]}):null}function Us({detail:n}){const{i18n:t}=v(),a=t.translate("payment.pending_payment.oxxo.reference_number");return e(R,{borderRadius:"base",className:Ds.ReferenceValue,inlineSize:"100%",children:e(k,{type:"small",color:"subdued",children:[a," ",n.text]})})}function Hs({paymentInstructions:n}){const{i18n:t}=v(),a=n.instructionSets?.find(({key:u})=>u==="oxxo");if(!a)return null;const r=ka(n,t),o=a.details?.find(va),i=a.steps?.[0],s=Ca(n.expiresAt,t),l=s?t.translate("payment.pending_payment.oxxo.expiry_date_time",s):void 0,c=t.translate("payment.pending_payment.oxxo.label");return e(An,{children:e(R,{accessibilityLabel:c,accessibilityRole:"section",background:"base",colorLayer:"control",border:"base",borderRadius:"large",padding:"large-100",inlineSize:"100%",children:e(_,{gap:"small-200",children:[e(U,{alignItems:"start",ga
1p:"base",gridTemplateColumns:"minmax(0, 1fr) auto",children:[r?e(L,{level:1,children:[e(k,{accessibilityVisibility:"exclusive",children:t.translate("payment.pending_payment.oxxo.pay",{amount:r.accessibleAmount})}),e(k,{accessibilityVisibility:"hidden",size:"extraLarge",children:t.translate("payment.pending_payment.oxxo.pay",{amount:r.value})})]}):null,e(q,{type:"oxxo",active:!0,accessibilityVisibility:"hidden"})]}),e(Fs,{step:i,expiry:l}),e(_,{gap:"none",children:[e(Bs,{barcode:a.barcode,detail:o}),o?e(Us,{detail:o}):null,e(Cs,{passUrl:a.appleWalletPassUrl})]})]})})})}function zs({paymentInstructions:n}){switch(n.method?.toLowerCase()){case"multibanco":return e(ys,{paymentInstructions:n});case"oxxo":return e(Hs,{paymentInstructions:n});case"konbini":return e(cs,{paymentInstructions:n});default:return null}}function Ys(){const t=j()?.paymentDetails?.buyerActionInfo?.paymentInstructions;return t?e(zs,{paymentInstructions:t}):null}function qs(){const{i18n:n}=v();return e(k,{size:"small",color:"subdued",children:e(Me,{children:n.translate("shop_pay_remember_me.terms_and_privacy_html",{privacy_href:e(Ws,{}),terms_href:e($s,{})})})})}function $s(){const{i18n:n}=v();return e(O,{children:e(ke,{target:"_blank",href:"https://shop.app/terms-of-service",tone:"monochrome",accessibilityLabel:n.translate("shop_pay_remember_me.new_window_disclaimer"),children:[n.translate("shop_pay_remember_me.terms_of_service"),e(oe,{type:"external",size:"small",display:"inline"})]})})}function Ws(){const{i18n:n}=v();return e(O,{children:e(ke,{target:"_blank",href:"https://www.shopify.com/legal/privacy/app-users",tone:"monochrome",accessibilityLabel:n.translate("shop_pay_remember_me.new_window_disclaimer"),children:[n.translate("shop_pay_remember_me.privacy_policy"),e(oe,{type:"external",size:"small",display:"inline"})]})})}function Vs({field:n="phone",link:t}){const{i18n:a}=v();return e(O,{children:[e(k,{color:"subdued",children:e(Me,{children:[n==="phone"?a.translate("shop_pay_remember_me.description_html"):a.translate("shop_pay_remember_me.email_description_html")," ",t]})}),e(qs,{})]})}function Ea(){const{shopPayArtifact:n}=N();return S(()=>!!n.value?.optIn)}class Gs extends Error{constructor(){super(...arguments),this.name="OptInFetchError"}}function Ks(){const{userEvents:n,source:t,checkout:a,shop:r,i18n:o,url:i,shop:{checkoutPublicAccessToken:s},source:{checkoutSessionIdentifier:l}}=v(),c=Ea(),u=N(),{value:d}=u.shippingAddress,{value:m}=u.contactInfo,[p,h]=re(c.peek()),[y,g]=re(!1),[f,b]=re(d?.phone||m?.phone||""),[C,T]=re(m?.email??""),[I,P]=re(),[D,M]=re(),x=!m?.phone,{validatePhoneNumber:V}=Vo(),Y=W(A=>{const te=Ko(A,o.translate("field_errors.email_blank")),J=jo(A,o.translate("field_errors.email_invalid"));return te||J},[o]),Z=W(()=>{I&&P(void 0)},[I]),X=W(async()=>{if(M(void 0),x){const A=!f.includes("+");if(!V(f,A?d?.countryCode:void 0)){P(o.translate("field_errors.thank_you_remember_me_phone_invalid"));return}}else{const A=Y(C);if(A){P(A);return}}n.monorailEvent({schemaId:"shopify_pay_user_optin_ui_interaction/3.2",payload:{...En(t,a,r),action:x?"update_phone_input":"update_email_input",phoneNumber:f,email:C,source:"thank_you_page",trigger:"manual"}});try{g(!0);const A=await fetch(i.shopPayOptin(l),{method:"POST",body:JSON.stringify({checkout:{vault_phone:f,vault_email:C,is_checkout_one:!0}}),headers:{"Content-Type":"application/json","X-Shopify-Checkout-Version":"2025-03-18",accept:"application/json",authorization:`Basic ${s}`}});if(A.status===200){const{success:te}=await A.json();te?h(!0):M(o.translate("shop_pay_remember_me.errors.optin_retry"));return}throw new Gs("Opt in request didn't succeed")}catch{P(o.translate("shop_pay_remember_me.errors.optin"))}finally{g(!1)}},[n,t,a,r,i,l,s,f,C,x,d?.countryCode,V,Y,o]);return{hasOptedIn:p,loading:y,errorBannerContent:D,handleSave:X,showPhoneField:x,phoneNumber:f,setPhoneNumber:b,email:C,setEmail:T,inputError:I,handleInput:Z,countryCode:d?.countryCode||""}}function js(n){return n?{borderWidth:"base none none none",background:"subdued",padding:"base",borderRadius:"none none base base"}:{borderWidth:"base",background:"base",padding:"base",borderRadius:"base"}}function Qs(){const{track:n}=Ce("follow_link"),{i18n:t,userEvents:a,source:r,checkout:o,shop:i}=v(),{hasOptedIn:s,loading:l,errorBannerContent:c,handleSave:u,showPhoneField:d,phoneNumber:m,setPhoneNumber:p,email:h,setEmail:y,inputError:g,handleInput:f,countryCode:b}=Ks(),C=ne(s),{value:T}=N().deliveryNext,{value:I}=Qe(),P=Qt(T),D=js(!P||I),M=ro().shippingAddress,x=S(()=>M.value.oneTimeUse?t.translate("thank_you.opt_in_payment_only_welcome_message_html",{shopify_pay:e(un,{inline:!0,color:"branded",size:"xsmall"})}):t.translate("thank_you.opt_in_welcome_message_html",{shopify_pay:e(un,{inline:!0,color:"branded",size:"xsmall"})})),V=S(()=>M.value.oneTimeUse?t.translate("shop_pay_remember_me.payment_information_only_label"):t.translate("shop_pay_remember_me.label")),Y=e(O,{children:V});F(()=>{a.monorailEvent({schemaId:"shopify_pay_user_optin_ui_impression/1.0",payload:{...En(r,o,i),source:"thank_you_page",elementType:"remember_me_box"}})},[a,r,o,i]);const Z=()=>{const te=!C.value;a.monorailEvent({schemaId:"shopify_pay_user_optin_ui_interaction/3.2",payload:{...En(r,o,i),action:te?"click_remember_me_box":"unclick_remember_me_box",phoneNumber:m,email:h,source:"thank_you_page",trigger:"manual"}}),C.value=te},X=e(ke,{target:"_blank",href:"https://shop.app/pay",onClick:()=>{n("learn_more_pay")},children:t.translate("shop_pay_remember_me.learn_more")});return e(R,{...D,children:s?e(U,{gridAutoFlow:"column",gridTemplateColumns:"minmax(0, 1fr) minmax(auto, max-content)",gridTemplateRows:"minmax(0, 1fr)",gap:"base",alignItems:"end",alignContent:"end",children:[e(Me,{children:x}),X]}):e(_,{gap:"base",children:[c?e(Rn,{tone:"critical",children:c}):null,e(_,{direction:"inline",gap:"base",children:e(da,{checked:C.value,onChange:Z,label:Y})}),e(gr,{open:C.value,id:"thankYouRememberMe",children:e(_,{gap:"base",children:[e(R,{padding:"small-200 none none none",children:e(_,{gap:"small-300",children:[e(U,{gap:"small-400 base",gridTemplateColumns:"minmax(auto, max-content) minmax(auto, max-content)",gridAutoColumns:"1fr",gridTemplateRows:"minmax(auto, max-content)",gridAutoRows:"minmax(auto, max-content)",children:[d?e(Go,{id:"phone",disabled:l,countryCode:b,label:t.translate("shop_pay_remember_me.mobile_phone_number"),icon:"mobile",value:m,error:!!g,onChange:p,onInput:f}):e(sa,{disabled:l,id:"email",name:"email",label:t.translate("shop_pay_remember_me.email_label"),value:h,error:!!g,onChange:y,onInput:f,required:!1}),e(he,{variant:"primary",onClick:u,loading:l,children:t.translate("shop_pay_remember_me.save")})]}),g?e(Ut,{controlID:d?"phone":"email",children:g}):null]})}),e(Vs,{field:d?"phone":"email",link:X})]})})]})})}const Zs=300,Xs=5e3,Js=n=>{const{duration:t=Xs,onClose:a,text:r,subText:o,actionText:i,handleAction:s,id:l,variant:c="default"}=n,[u,d]=re(!1);F(()=>{d(!0);const p=setTimeout(()=>{if(t!==0){d(!1);const h=setTimeout(()=>{a(l)},Zs);return()=>clearTimeout(h)}},t);return()=>clearTimeout(p)},[t,l,a]);const m=$e(c==="error"?"text-poppy-d1":"text-black");return e("div",{className:$e("z-max mx-auto flex w-85 transform items-center justify-start gap-x-3 rounded-md border-[0.5px] border-solid border-grayscale-l2l px-4 py-3 text-white shadow-lg transition-transform duration-300 ease-in-out sm_bottom-0 sm_max-w-none sm_rounded-none",u?"translate-y-0":"translate-y-94",c==="error"?"bg-poppy-l2":"bg-white"),"data-testid":"shop-toast-element",children:[c!=="error"&&e(Zo,{className:"size-8 flex-shrink-0 text-purple-primary"}),e("div",{className:"flex flex-col overflow-hidden",children:[e("div",{className:$e("font-sans text-body-title-small",m),children:r}),o&&e("div",{className:$e("truncate font-sans text-caption",m),children:o})]}),i&&s&&e("button",{type:"button","aria-label":i,className:$e("ml-auto h-8 w-fit max-w-[40%] rounded-sm100 px-3 font-sans text-button-medium",c==="error"?"bg-poppy-d1 text-white":"bg-grayscale-l5 text-black"),"data-testid":"toast-action-button",onClick:s,children:i})]})},el=()=>{const{instanceId:n}=Xo(),{trackPageImpression:t}=Jo(),[a,r]=re([]),{recordCounter:o}=ei(),i=W(c=>{r(u=>u.filter(d=>d.id!==c))},[]),s=W(c=>{r(u=>[...u,c])},[]),l=ue(()=>({renderToast:({detail:u})=>{u.flow&&o("shop_js_toast_rendered",{attributes:{flow:u.flow,variant:u.variant||"default"}}),t({allowDuplicates:!0,analyticsTraceId:u.analyticsTraceId,flow:u.flow,page:"RENDER_TOAST"}),s(u)}}),[s,o,t]);return ni(l),ar(e(ti,{instanceId:n,type:"toast",variant:"default",children:e("div",{className:"fixed inset-x-0 bottom-8 z-max mx-auto flex flex-col items-center gap-3",children:a.map(c=>e(Js,{...c,onClose:i},c.id))})}),Ge.body)},nl=()=>pa(({element:n,...t})=>e(_a,{element:n,featureName:"ShopToastManager",children:e(ha,{children:e(ma,{children:e(el,{...t})})})}),{methods:["renderToast"],name:"shop-toast-manager",props:{},shadow:"open"}),tl={id:"520f926255e48c24cf1b0e497a7dfa36db1b5b10f628941f45c629153aa67e5f",type:"query",name:"PendingPayEscrowReceipt",source:""},al=1e3,rl=Jt(({graphql:{coreGraphql:n}},{receiptId:t,retries:a,sessionToken:r,skip:o})=>{const i=Pn(1),s=Pn(!o.peek()),l=n.query(tl,{variables:()=>({receiptId:t.value,sessionToken:r.value}),skip:()=>o.value}),c=Ke(()=>ol(l.data.value,l.error.value));let u=!0;function d(){!u||i.peek()>=a||(u=!1,setTimeout(()=>{l.loading.peek()||l.refetch(),i.value++,u=!0,i.peek()<a?d():s.value=!1},al))}return Vn(function(){c.value&&(s.value=!1,u=!1)}),Vn(function(){l.loading.value||s.value&&d()}),{attempts:Ke(()=>i.value),error:l.error,loading:Ke(()=>s.value),pendingPayEscrow:c}});function ol(n,t){return!!(n?.receipt?.__typename==="ProcessedReceipt"&&n?.receipt?.shopAppLinksAndResources?.hasPendingPayEscrow)&&!t}const il=5;function Ma(){return!!Ae()?.payEscrowMayExist}function sl(){const{client:n}=v(),t=n.unstable_getSerialization("sessionToken"),a=j()?.id,r=Ma(),[o,i]=re(!r),{attempts:s,loading:l,pendingPayEscrow:c}=ea(rl,{receiptId:ye(a),retries:il,sessionToken:ye(t),skip:ye(!r||!
1a||!t)}),u={status:"verified_user",isVerifiedShopAccount:o,setIsVerifiedShopAccount:i,loading:l.value,fetchAttempts:s.peek()};return r?l.value?{...u,status:"fetching_status"}:{...u,status:c.value?"split_user":"verified_user"}:u}function ll(){const{i18n:n}=v(),{track:t}=Ce("pay_escrow"),{isVerifiedShopAccount:a,setIsVerifiedShopAccount:r,loading:o,status:i,fetchAttempts:s}=sl();F(()=>{!a&&i==="verified_user"&&!o&&(t("verify_button_removed"),r(!0))},[a,i,o,t,r]);const l=W(c=>{const{email:u}=c;u&&(t("verify_action_completed"),cl({email:u,text:n.translate("thank_you.verify_shop_account_confirmation")})),r(!0)},[t,r,n]);return{status:i,isVerifiedShopAccount:a,loading:o,handleSetIsVerifiedShopAccount:l,fetchAttempts:s}}const cl=({email:n,text:t})=>{customElements.get("shop-toast-manager")||nl();const a=document.createElement("shop-toast-manager");document.body.appendChild(a),a.renderToast({flow:"thank_you_page_escrow",text:t,subText:n})};function ul(){const n=ye(No()),t=Ea(),a=ye(Ma());return S(()=>!!((n.value||t.value)&&!a.value))}function dl(){const{i18n:n}=v(),t=N().buyerIdentity.value?.purchasingCompany;return t?e(_,{gap:"small-200",children:[e(L,{children:n.translate("thank_you.company_location_section_title")}),e(_,{children:[e(w,{children:t.company.name}),e(w,{children:t.location.name})]})]}):null}function pl({lines:n}){return n.length>0?e(_,{children:n.map(t=>e(w,{children:t},t))}):null}function hl(){const{i18n:n}=v(),t=N().deliveryNext,a=S(()=>na(t.value).find(({method:r})=>r.methodType==="PICK_UP")?.method.pickupLocation);return e(E,{when:a,children:r=>e(_,{gap:"small-200",children:[e(L,{children:n.translate("thank_you.pick_up_in_store_marker.shipping")}),e(Je,{address:r.address,multiline:!0})]})})}class tt extends Error{constructor(){super(...arguments),this.name="PaymentMethodError"}}const at=" · ";function ze({children:n}){return e("bdi",{children:n})}function dn({label:n,fallback:t}){return n?e(ze,{children:n}):e(O,{children:t})}function Aa({cost:n,method:t}){const{shop:a,i18n:r,observability:o}=v(),i=N(),{value:s}=i.paymentMethods,{value:l}=i.paymentFlexibilityPaymentTermsTemplate,c=Yt(),u=j(),d=u?.paymentDetails,m=u?.paymentExtensionBrand,p=Ra({paymentDetails:d}),h=a.hasFlagEnabled(oo),y=!!ta().value?.amount,g=l&&!y,f=!n||g?null:e(k,{children:[at,r.formatCurrency(n.amount,{currency:n.currencyCode,form:"explicit"})]});switch(t.type){case"direct":case jn.CreditCard:return e(ml,{method:t,payment:f,installmentInfo:n&&d?.installmentDetails?{cost:n,installmentDetails:d.installmentDetails}:null});case jn.PayPal:return e(rt,{payment:f});case"wallet":{if(t.name==="PAYPAL_EXPRESS")return e(rt,{payment:f});if(t.name==="SHOPIFY_INSTALLMENTS")return e(_l,{walletContent:t.walletContent});if(t.name==="SHOP_PAY")return e(ot,{payment:f,paymentDetails:d,walletContent:t.walletContent,paymentExtensionBrand:m,installmentInfo:n&&d?.installmentDetails?{cost:n,installmentDetails:d.installmentDetails}:null});const b=T=>{switch(T){case"APPLE_PAY":return e(q,{type:"apple-pay"});case"GOOGLE_PAY":return e(q,{type:"google-pay"});default:return o.error(new tt(`Unknown wallet payment method for icon: ${T}`)),null}},C=T=>{switch(T){case"APPLE_PAY":return r.translate("brand.apple_pay");case"GOOGLE_PAY":return r.translate("brand.google_pay");default:return o.error(new tt(`Unknown wallet payment method for label: ${T}`)),null}};return e(_,{direction:"inline",alignItems:"center",gap:"small-200",children:[b(t.name),e(w,{children:[e(dn,{label:p({displayBrandLabel:!0}),fallback:C(t.name)}),f]})]})}case"shopWallet":return e(ot,{payment:f,paymentDetails:d});case"walletsPlatformPaymentMethod":return e(U,{gridAutoFlow:"column",gridTemplateColumns:"minmax(auto, max-content) minmax(0, 1fr)",gridTemplateRows:"minmax(0, 1fr)",alignItems:"center",alignContent:"center",gap:"small-300",children:[e(q,{type:t.name}),e(w,{children:[e(dn,{label:d?.paymentDescriptor??p({displayBrandLabel:!0})}),f]})]});case"local":{const C=s?.find(T=>T.type==="local"&&T.name===t.name)?.displayName||t.name;return e(_,{direction:"inline",alignItems:"center",gap:"small-200",children:[e(q,{type:t.name}),e(w,{children:[C,f]})]})}case"paymentOnDelivery":return e(_,{direction:"inline",alignItems:"center",gap:"small-200",children:[e(q,{type:"cash"}),e(w,{children:[r.translate("payment_gateway.cash_on_delivery_label"),f]})]});case"manualPayment":case"customManualPayment":return e(_,{direction:"inline",alignItems:"center",gap:"small-200",children:[e(q,{type:"cash"}),e(w,{children:[t.name,f]})]});case"deferred":return c.value?null:e(_,{children:l&&l.type!=="FIXED"?e(O,{children:[e(w,{children:l.translatedName}),e(w,{children:r.translate("payment_gateway.deferred_payment_label")})]}):e(w,{children:[r.translate("payment_gateway.deferred_payment_label"),f]})});
1case"giftCard":{if(h)return null;const b=t.code.slice(-4).toUpperCase();return e(_,{direction:"inline",alignItems:"center",gap:"small-200",children:[e(q,{type:"gift-card"}),e(w,{children:[e(ze,{children:r.translate("payment.masked_digits_label",{last_digits:b})}),f]})]})}case"redeemable":{if(t.redemptionSource==="STORE_CREDIT")return e(_,{direction:"inline",alignItems:"center",gap:"small-200",children:[e(q,{type:"store-credit"}),e(w,{children:[r.translate("payment.store_credit.label"),f]})]});if(t.redemptionSource==="SHOP_CASH"){const b=t.redemptionContent;return b?.redemptionPaymentOptionKind==="ZERO_BALANCE_OFFER"?null:b?.details?.length?b.details.map(C=>{if(!io.includes(C.redemptionType))return null;const T=C.destinationAmount&&!g?e(k,{children:[at,r.formatCurrency(parseFloat(C.destinationAmount.amount),{currency:C.destinationAmount.currencyCode,form:"short"})]}):null;return C.redemptionType==="SHOP_CASH_BALANCE"?e(_,{direction:"inline",alignItems:"center",gap:"small-200",children:[e(q,{type:"shop-cash"}),e(w,{children:[r.translate("order_summary.shop_cash_title"),T]})]},C.redemptionType):null}):e(_,{direction:"inline",alignItems:"center",gap:"small-200",children:[e(q,{type:"shop-cash"}),e(w,{children:[r.translate("order_summary.shop_cash_title"),f]})]})}if(t.redemptionSource==="CUSTOM"){const b=t.redemptionContent,C=b?fr(b)?.toUpperCase():"";return e(_,{direction:"inline",alignItems:"center",gap:"small-200",children:[e(q,{type:"gift-card"}),e(w,{children:[e(ze,{children:r.translate("payment.ends_with_label",{last_digits:C||""})}),f]})]})}return null}case"offsite":case"customOnsite":{const b=d?.paymentIcon,T=!!m||!b||["generic","usdc"].includes(b)?La(m,r):t.name;return e(_,{direction:"inline",alignItems:"center",gap:"small-200",children:[e(q,{type:m||b||"generic"}),e(w,{children:[T,f]})]})}case"bank":return e(_,{gap:"small-400",children:[e(k,{children:t.bankName}),e(_,{direction:"inline",alignItems:"center",gap:"small-200",children:[e(q,{type:pi(t.bankName??"")}),e(w,{children:[e(ze,{children:r.translate("payment.masked_digits_label",{last_digits:t.lastDigits??""})}),t.lastDigits?" · ":null,n?.amount&&r.formatCurrency(n.amount,{currency:n.currencyCode,form:"short"})]})]})]});default:return null}}function ml({method:n,payment:t,installmentInfo:a}){const{i18n:r}=v(),o=N().buyerIdentity.value?.purchasingCompany,i=N().paymentFlexibilityPaymentTermsTemplate,s=Yt(),l=S(()=>i.value&&!s.value?i.value.translatedName:void 0),c=n.brand??"generic",u=n.type==="direct"?n.creditCardLastFourDigits:n.displayLastDigits,d=c==="MAESTRO"?r.translate("payment_gateway.debit_card_label"):r.translate("payment_gateway.credit_card_label"),m=u?e(ze,{children:r.translate("payment.masked_digits_label",{last_digits:u})}):d,p=(()=>{const h=a?.installmentDetails?.count,y=a?.cost;if(!h||!y)return null;const g=qt(y.amount,h);return r.translate("payment.msi_installment_plan",{amount:r.formatCurrency(g,{currency:y.currencyCode,form:"explicit"}),num_payments:h})})();return e(_,{gap:"small-400",children:[e(E,{when:l,children:h=>e(w,{children:h})}),e(_,{direction:"inline",alignItems:"center",gap:"small-200",children:[e(q,{type:c}),e(w,{children:[m,t]})]}),p?e(k,{color:"subdued",children:p}):null,n.type==="direct"&&n.vaultingAgreement?e(_,{direction:"inline",alignItems:"center",gap:"small-400",children:[e(
1oe,{size:"small",type:"check"}),e(k,{color:"subdued",children:o?r.translate("payment.card_vaulted_company_location"):r.translate("payment.payment_method_saved")})]}):null]})}function rt({payment:n}){const{i18n:t}=v();return e(_,{direction:"inline",alignItems:"center",gap:"small-200",children:[e(q,{type:"paypal"}),e(w,{children:[t.translate("brand.paypal"),n]})]})}function _l({walletContent:n}){const{i18n:t}=v(),a=Ae(),r=()=>n?.creditCardBrand?e(q,{type:n.creditCardBrand}):e(un,{color:"branded",size:"xsmall"}),o=()=>n?.creditCardLastFourDigits&&t.translate("payment.masked_digits_label",{last_digits:n.creditCardLastFourDigits}),i=()=>a?e(w,{children:e(ke,{target:"_blank",href:a.shopInstallmentsViewSchedules,children:t.translate("shop_pay_remember_me.installments.view_schedule")})}):null;return e(_,{gap:"small-300",children:[e(_,{direction:"inline",alignItems:"center",gap:"small-200",children:[r(),e(w,{children:e(ze,{children:o()})})]}),e(w,{children:t.translate("shop_pay_remember_me.installments.paid_in_installments")}),i()]})}function ot({payment:n,paymentDetails:t,walletContent:a,paymentExtensionBrand:r,installmentInfo:o}){const i=Ra({paymentDetails:t}),{i18n:s}=v(),{value:l}=N().managedByMarketsPro,c=so({managedByMarketsPro:l}),u=(()=>{const d=o?.installmentDetails?.count,m=o?.cost;if(!d||!m)return null;const p=qt(m.amount,d);return s.translate("payment.msi_installment_plan",{amount:s.formatCurrency(p,{currency:m.currencyCode,form:"explicit"}),num_payments:d})})();return r?e(_,{direction:"inline",alignItems:"center",gap:"small-200",children:[e(q,{type:r}),e(w,{children:[La(r,s),n]})]}):t?.paymentCardBrand?e(_,{gap:"small-400",children:[e(_,{direction:"inline",alignItems:"center",gap:"small-200",children:[e(q,{type:t.paymentCardBrand}),e(w,{children:[e(dn,{label:i({displayBrandLabel:!1})}),n]})]}),u?e(k,{color:"subdued",children:u}):null]}):c&&a?.paymentMethod==="IDEAL"?e(_,{direction:"inline",alignItems:"center",gap:"small-200",children:[e(q,{type:"ideal"}),e(w,{children:[s.translate("payment.ideal_label"),n]})]}):e(_,{gap:"small-400",children:[e(_,{direction:"inline",alignItems:"center",gap:"small-200",children:[e(q,{type:"shop-pay"}),e(w,{children:[e(dn,{label:i({displayBrandLabel:!0}),fallback:s.translate("payment_gateway.shop_pay.name")}),n]})]}),u?e(k,{color:"subdued",children:u}):null]})}function Ra({paymentDetails:n}){const{i18n:t}=v();return W(({displayBrandLabel:a})=>{if(!n||!n.creditCardLastFourDigits)return null;const r=gl(n),o=t.translate("payment.masked_digits_label",{last_digits:n.creditCardLastFourDigits});return r&&a?`${r} ${o}`:o},[n,t])}const yl=new Map([["UNKNOWN",void 0],["AMERICAN_EXPRESS","American Express"],["BOGUS","Test Payment Gateway"],["CARTESBANCAIRES","Cartes Bancaires"],["DANKORT","Dankort"],["DINERS_CLUB","Diners Club"],["DISCOVER","Discover"],["EFTPOS_AU","EftposAu"],["ELO","Elo"],["FORBRUGSFORENINGEN","Forbrugsforeningen"],["GIROCARD","girocard"],["HYPERCARD","HyperCard"],["INTERAC","Interac"],["JCB","JCB"],["LASER","Laser"],["MAESTRO","Maestro"],["MASTER","Mastercard"],["SOLO","Solo"],["SWITCH","Switch"],["UNIONPAY","UnionPay"],["VISA","Visa"]]);function gl(n){return n?.paymentCardBrand?yl.get(n.paymentCardBrand):void 0}function La(n,t){switch(n){case"alipay":return t.translate("payment.alipay_label");case"bancontact":return t.translate("payment.bancontact_label");case"blik":return t.translate("payment.blik_label");case"bizum":return t.translate("payment.bizum_label");case"eps":return t.translate("payment.eps_label");case"ideal":return t.translate("payment.ideal_label");case"mobilepay":return t.translate("payment.mobilepay_label");case"oxxo":return t.translate("payment.oxxo_label");case"mb":return t.translate("payment.multibanco_label");case"mbway":return t.translate("payment.mb_way_label");case"paynow":return t.translate("payment.paynow_label");case"przelewy24":return t.translate("payment.przelewy24_label");case"satispay":return t.translate("payment.satispay_label");case"scalapay":return t.translate("payment.scalapay_label");case"swish":return t.translate("payment.swish_label");case"twint":return t.translate("payment.twint_label");case"usdc":return t.translate("payment.usdc_label");case"vipps":return t.translate("payment.vipps_label");case"wechatpay":return t.translate("payment.wechat_pay_label");case null:case void 0:return"";default:return n}}function fl(){const{i18n:n}=v(),t=N(),a=t.shippingAddress,r=t.deliveryNext,o=S(()=>na(r.value).find(({method:l})=>l.methodType==="PICKUP_POINT")?.method.pickupLocation),i=S(()=>{const l=o.value,c=a.value??l?.address;if(c)return l?.name?{...c,lastName:l.name}:c}),s=S(()=>{const l=o.value;return l?.type==="PickupPointLocation"&&l.carrierCode?l:void 0});return e(E,{when:i,children:l=>e(_,{gap:"small-200",children:[e(L,{children:n.translate("pickup_point.title")}),e(Je,{address:l,multiline:!0,hiddenFields:["firstName"]}),e(E,{when:s,children:c=>e(mi,{pickupLocation:c})})]})})}function xe(){return j()?.completedRemoteCheckouts}const it=" · ",Cn="unknown";function bl(){const{i18n:n,shop:{name:t,remoteShopsConfigMap:a}}=v(),r=N().paymentLines,o=ye(xe()),i=S(()=>
1{if(!o.value?.length)return;const c=[],u=new Map([[Cn,{method:null,items:[]}]]);return r.value?.lines.forEach(d=>{const m=st(d.method);u.set(m,{method:d.method,items:[{shopName:t,cost:d.cost,textKey:`local-${m}`}]})}),o.value.forEach(d=>{const{status:m,shopId:p}=d,h=a?.get(p)?.name||n.translate("thank_you.thank_you_from_other_store");if(m==="failed"){c.push({textKey:`failed-${p}`,remoteShopName:h});return}d.remotePurchaseOrder.paymentLines?.forEach(y=>{const{cost:g,method:f}=y;if(f){const b=st(f);u.has(b)||u.set(b,{method:f,items:[]}),u.get(b)?.items.push({shopName:h,cost:g,textKey:`${b}-${d.checkoutSessionToken}`})}else u.get(Cn)?.items.push({shopName:h,cost:g,textKey:`${Cn}-${d.checkoutSessionToken}`})})}),{failedCheckouts:c,groupedPayments:Array.from(u.entries()).map(([d,{method:m,items:p}])=>({key:d,method:m,items:p}))}}),s=S(()=>i.value?.groupedPayments??[]),l=S(()=>i.value?.failedCheckouts??[]);return e(E,{when:i,children:e(_,{gap:"small-400",children:[e(ln,{each:s,getKey:c=>c.key,children:({method:c,items:u})=>c?e(_,{gap:"small-400",children:[e(Aa,{cost:void 0,method:c}),e(_,{gap:"small-400",children:u.map(({cost:d,shopName:m,textKey:p})=>e(k,{children:[m,d&&e(O,{children:[it,n.formatCurrency(d.amount,{currency:d.currencyCode,form:"explicit"})]})]},p))})]}):u.map(({shopName:d,textKey:m})=>e(k,{children:d},m))}),e(ln,{each:l,getKey:c=>c.textKey,children:({remoteShopName:c})=>e(k,{children:[c,it,n.translate("thank_you.payment_method_not_charged")]})})]})})}function st(n){const t=[aa(n)];return"brand"in n&&n.brand&&t.push(n.brand),"creditCardLastFourDigits"in n&&n.creditCardLastFourDigits&&t.push(n.creditCardLastFourDigits),"displayLastDigits"in n&&t.push(n.displayLastDigits),"code"in n&&t.push(n.code.slice(-4)),n.type==="wallet"&&n.walletContent&&("lastDigits"in n.walletContent&&n.walletContent.lastDigits&&t.push(n.walletContent.lastDigits),"creditCardLastFourDigits"in n.walletContent&&n.walletContent?.creditCardLastFourDigits&&t.push(n.walletContent.creditCardLastFourDigits)),t.join("-")}const lt=" · ";function vl({completedRemoteCheckouts:n}){const t=qe().value,{i18n:a,shop:{name:r,remoteShopsConfigMap:o}}=v(),i=br(n);if(!i.length)return null;const s=i.map(l=>{const c=`${o?.get(l.shopId)?.name||a.translate("thank_you.thank_you_from_other_store")}${lt}`;return e(w,{children:[c,l.title]},l.handle)});if(t){const l=`${r}${lt}${a.translate("shipping.split_shipping_multiple_shipment_label")}`;return e(_,{gap:"small-200",children:[e(k,{color:"subdued",children:a.translate("thank_you.shipping_method_title")}),l,s]})}return e(_,{gap:"small-200",children:[e(L,{children:a.translate("thank_you.shipping_method_title")}),s]})}function ct({shippingRequired:n=!0}={}){const{i18n:t}=v(),a=N().shippingAddress,r=qe();return n?e(E,{when:a,children:o=>e(_,{gap:"small-200",children:[e(E,{when:r,fallback:e(L,{children:t.translate("thank_you.shipping_address_title")}),children:e(k,{color:"subdued",children:t.translate("thank_you.shipping_address_title")})}),e(Je,{address:o,multiline:!0})]})}):null}function kl(){const n=N(),t=n.deliveryNext,a=n.remoteMerchandiseDetails,{i18n:r,shop:o}=v(),i=o.hasFlagEnabled(lo),s=ye(xe()),l=S(()=>!!s.value?.some(h=>h.status==="submitted")),c=S(()=>{const h=t.value;return!!(h&&h.status!=="unavailable")}),u=S(()=>{const h=t.value;if(!h||h.status==="unavailable")return[];const y=i&&h.lines.some(g=>g.targetMerchandiseLines?.some(f=>f.properties.some(b=>b.name==="_shopify_non_subscription_item")));return h.lines.filter(g=>!y||g.type!=="SUBSCRIPTION")}),d=S(()=>{const h=new Set(u.value.map(({type:y})=>y));return h.size>1&&h.has("SUBSCRIPTION")}),m=S(()=>{const h=new Set;return ra(u.value).flatMap((y,g)=>{const f=co(y);if(!f)return[];if(y.type==="ONE_TIME_PURCHASE"&&y.status==="available"&&zo({line:y,method:f})){const b=ca(f,y.id??`index-${g}`);if(h.has(b))return[];h.add(b)}return[{deliveryLine:y,selectedDeliveryMethod:f}]})}),p=(h,y)=>!d.value&&h.type==="ONE_TIME_PURCHASE"?y?.title:h.type==="ONE_TIME_PURCHASE"?`${r.translate("shipping.shipping_method_first_shipment_group_title",{count:1})} · ${y?.title}`:`${r.translate("shipping.shipping_method_recurring_shipments_group_title.other")} · ${y?.title}`;return e(E,{when:c,children:e(_,{gap:"small-200",children:[e(L,{children:r.translate("thank_you.shipping_method_title")}),e(ln,{each:m,getKey:({selectedDeliveryMethod:h})=>h.handle,children:({deliveryLine:h,selectedDeliveryMethod:y})=>{const g=p(h,y);if(l.value){const{shopName:f}=uo({deliveryLine:h,remoteMerchandiseDetails:a.value,remoteShopsConfigMap:o.remoteShopsConfigMap,localShopId:o.id,localShopName:o.name});return e(w,{children:`${f} · ${y.title}`})}return e(w,{children:g})}})]})})}function Cl({shippingRequired:n,showMethods:t}){const a=xe();return!n&&!a?.length?null:t?e(O,{children:[e(ct,{shippingRequired:n}),e(kl,{})]}):e(O,{children:[e(ct,{shippingRequired:n}),a?.length?e(vl,{completedRemoteCheckouts:a}):null]})}function Sl(){const{i18n:n}=v(),{track:t}=Ce("follow_link");return e(O,{children:e(U,{gridAutoFlow:"column",gridTemplateColumns:"minmax(0, 1fr) minmax(auto, max-content)",gridTemplateRows:"minmax(0, 1fr)",gap:"base",alignItems:"end",alignContent:"end",children:[e(k,{children:n.translate("completed_with_
1shop_pay.text",{shopPay:e(un,{inline:!0,color:"branded",size:"xsmall"})})}),e(ke,{target:"_blank",href:"https://shop.app/pay",onClick:()=>t("learn_more_pay"),children:n.translate("completed_with_shop_pay.learn_more")})]})})}function Tl({message:n,loading:t}){return t?e(De,{children:e(vr,{lines:1,size:"base"})}):n?e(k,{children:n}):null}function Il({message:n,loading:t,completedWithShopPay:a}){return e(_,{gap:"small-300",children:[e(Ze,{}),e(kr,{blockSize:"small-500"}),n||t?e(Tl,{message:n,loading:t}):null,a?e(Sl,{}):null]})}function Pl(){const{checkout:n,i18n:t,shop:a,url:r,mobileCheckoutSdk:o,source:i,embed:s}=v(),{billingAddress:l,buyerIdentity:c,contactInfo:u,deliveryNext:d,paymentLines:m}=N(),p=S(()=>m.value?.lines??[]),h=po(),y=qe(),g=Qe(),f=ul(),b=Cr(),C=mn(),T=ve("Checkout::CustomerInformation::RenderAfter"),I=ve("Checkout::ThankYou::CustomerInformation::RenderAfter"),P=t.translate("thank_you.customer_information_title"),D=t.translate("thank_you.contact_information_title"),M=t.translate("thank_you.payment_method_title"),x=t.translate("thank_you.billing_address_title"),V=t.translate("thank_you.view_business_customer_account"),Y=i.type==="draftOrder",Z=o.variant.isStandard()||s?.isCheckoutKit(),X=!a.hasFlagEnabled(ho),A=S(()=>{const K=n.latestReceipt.value;return K?.status==="processed"?K:void 0}),te=S(()=>{const K=A.value?.shopAppLinksAndResources;return K?{...K}:void 0}),J=S(()=>A.value?.isRedacted??!1),G=S(()=>!!A.value?.completedRemoteCheckouts?.length),ge=S(()=>c.value?.purchasingCompany),le=S(()=>l.value??ge.value?.location.billingAddress),Se=S(()=>!!c.value?.customerProfile),Te=S(()=>{const K=c.value,_e=u.value;return[K?.purchasingCompany?K.customerProfile?.fullName:void 0,_e?.email??_e?.phone].filter(He=>!!He)}),fe=S(()=>mo(d.value)),Re=S(()=>_o(d.value)),ee=S(()=>!Re.value&&!fe.value),Ne=S(()=>!y.value),Ie=S(()=>!!b.value.shippableDeliveryLines?.length),de=S(()=>!y.value||g.value),Be=S(()=>!Z&&!Y&&a.hasStorefront&&Se.value),Fe=S(()=>!n.configuration.isUniversalCheckoutFinalizer&&!!a.loginLinkVisible&&(Be.value||!!ge.value)),me=S(()=>{const K=p.value;return!!(!h.value&&K.length||G.value||yo({checkout:n})&&K.length)}),Ue=S(()=>!G.value&&p.value.length>0),ja=S(()=>!g.value),Qa=S(()=>!g.value&&me.value||!!le.value),Za=S(()=>!J.value),Xa=S(()=>{const K=n.rememberMe.response.value,_e=n.rememberMe.status.value,He=!!K?.data,er=p.value.some(({method:$n,cost:tr})=>tr?.amount&&$n.type==="wallet"&&["SHOP_PAY","SHOPIFY_INSTALLMENTS"].includes($n.name)),qn=!!((X?te.value?.shopPayOrder:!!er)||He),nr=He||_e==="loading";if(!(J.value||n.configuration.isUniversalCheckoutFinalizer||!qn&&!nr))return{completedWithShopPay:qn,loading:_e==="loading",message:K?.data}}),Ja=S(()=>!J.value&&!n.configuration.isUniversalCheckoutFinalizer&&f.value),Yn=()=>e(E,{when:me,children:e(_,{gap:"small-200",children:[e(E,{when:de,fallback:e(k,{color:"subdued",children:M}),children:e(L,{children:M})}),e(E,{when:Ue,children:e(_,{gap:"small-200",children:e(ln,{each:p,getKey:({method:K,cost:_e})=>`${aa(K)}-${_e?.amount}`,children:({method:K,cost:_e})=>e(Aa,{cost:_e,method:K})})})}),e(E,{when:G,children:e(bl,{})})]})});return e(wl,{sectionTitle:P,renderAsCard:de,afterStack:e(E,{when:Ja,children:e(Qs,{})}),children:[e(U,{gridAutoFlow:"column",gridTemplateColumns:"minmax(auto, max-content) minmax(0, 1fr)",gridTemplateRows:"minmax(0, 1fr)",justifyContent:"end",justifyItems:"end",children:[e(L,{children:P}),e(E,{when:Fe,children:e(ke,{href:r.account(),children:V})})]}),e(U,{gridTemplateColumns:"@media (inline-size >= small) 'repeat(2, minmax(0, 1fr))', 'minmax(0, 1fr)'",gridAutoColumns:"@media (inline-size >= small) 'repeat(2, minmax(0, 1fr))', 'minmax(0, 1fr)'",gridTemplateRows:"minmax(auto, max-content)",gridAutoRows:"minmax(auto, max-content)",gap:"large-100",children:[e(H,{children:e(ut,{renderAsCard:de,children:[e(E,{when:Za,children:e(El,{contactInformationLines:Te,renderAsCard:de,title:D})}),e(E,{when:ge,children:e(dl,{})}),e(E,{when:g,fallback:e(O,{children:[e(E,{when:fe,children:e(hl,{})}),e(E,{when:Re,children:e(fl,{})}),e(E,{when:ee,children:e(Ml,{shippingRequired:Ie,showMethods:Ne})})]}),children:Yn()})]})}),e(E,{when:Qa,children:e(H,{children:e(ut,{renderAsCard:de,children:[e(E,{when:ja,children:Yn()}),e(E,{when:le,children:K=>e(_,{gap:"small-200",children:[e(E,{when:de,fallback:e(k,{color:"subdued",children:x}),children:e(L,{children:x})}),e(Je,{address:K,multiline:!0})]})})]})})})]}),e(E,{when:Xa,children:({completedWithShopPay:K,loading:_e,message:He})=>e(Il,{message:He,loading:_e,completedWithShopPay:K})}),e(Al,{journey:C,defaultExtensions:T,thankYouExtensions:I})]})}function wl({afterStack:n,children:t,renderAsCard:a,sectionTitle:r}){const{shop:o}=v(),i=o.hasFlagEnabled(se),s=a.value;return e(Le,{target:s?"edgeToEdgeCard":"plain",children:e(H,{accessibilityLabel:r,colorLayer:s&&!i?"control":void 0,children:[e(_,{gap:"base",padding:s?"base":"base none",children:t}),n]})})}function ut({children:n,renderAsCard:t}){return e(_,{gap:t.value?"base":"large-100",children:n})}
1function El({contactInformationLines:n,renderAsCard:t,title:a}){return e(_,{gap:"small-200",children:[e(E,{when:t,fallback:e(k,{color:"subdued",children:a}),children:e(L,{children:a})}),e(pl,{lines:n.value})]})}function Ml({shippingRequired:n,showMethods:t}){return e(Cl,{shippingRequired:n.value,showMethods:t.value})}function Al({journey:n,defaultExtensions:t,thankYouExtensions:a}){const r=n.value.currentDetour?.type==="thankYou"?a:t;return e(on,{customizations:r})}function Rl(){const{i18n:n,shop:t}=v(),a=t.hasFlagEnabled(se),r=N().contactInfo,o=go(),i=S(()=>r.value?.email?n.translate("thank_you.gift_card_email_title",{count:o.value}):n.translate("thank_you.gift_card_text_title",{count:o.value})),s=S(()=>r.value?.email?n.translate("thank_you.gift_card_confirmation_by_email_typ",{count:o.value}):n.translate("thank_you.gift_card_confirmation_by_text_typ",{count:o.value}));return e(H,{accessibilityLabel:i.value,colorLayer:a?void 0:"control",children:e(_,{gap:"base",children:[e(L,{children:i}),e(w,{children:e(Me,{children:s})})]})})}const Ll=(...n)=>{const t=n.find(a=>a?.firstName&&a?.lastName)||n.find(a=>a?.lastName);return t?{firstName:t.firstName,lastName:t.lastName}:{}},xl=" • ";function dt(){const{i18n:n,checkout:t}=v(),a=ye(j()),{buyerIdentity:r,shippingAddress:o,billingAddress:i}=N(),s=Nn(),c=xe()?.some(b=>b.status==="failed"),u=Oe(),d=$t(),m=S(()=>!d||t.thankYouEntrance.phase.value==="settled"),p=S(()=>{const b=r.value?.purchasingCompany,C=r.value?.customerProfile,{firstName:T,lastName:I}=b&&C?{firstName:C.firstName??void 0,lastName:C.lastName??void 0}:Ll(i.value,o.value),P=a.value?.isRedacted?null:n.formatName(T,I);return P?n.translate("thank_you.page_title",{display_name:P}):n.translate("thank_you.page_title_no_name")}),h=S(()=>{const b=a.value?.orderIdentity.buyerIdentifier||null,C=!!a.value?.completedRemoteCheckouts?.length;return!s.value&&b&&!C?n.translate("order_summary.confirmation_number_label",{confirmation_number:`${b}`}):null}),y=S(()=>{const b=a.value?.purchaseOrderNumber;return b?n.translate("thank_you.purchase_order_number_title",{purchase_order_number:b}):null}),g=S(()=>!!h.value||!!y.value);if(c)return null;const f=e(O,{children:[e(E,{when:g,children:()=>e(w,{color:"subdued",textAlign:u?"center":void 0,children:[e(E,{when:h,children:b=>e(O,{children:[b,e(E,{when:y,children:xl})]})}),y]})}),e(L,{level:1,autoFocus:m.value,textAlign:u?"center":void 0,children:p})]});return u?e(Le,{target:"card",children:e(H,{accessibilityRole:"presentation",className:Ee.ThankYouEntranceHeading,colorLayer:"control",children:e(_,{gap:"small-300",children:f})})}):e(Fo,{status:"success",children:f})}const pt=n=>n.reduce((t,a)=>t+(a.quantity??0),0);function Dl({confirmedShops:n,failedShops:t}){const{i18n:a}=v(),r=ue(()=>pt(n),[n]),o=ue(()=>pt(t),[t]),i=r+o;return e(L,{children:a.translate("thank_you.confirmed_items_count",{confirmed_count:r,total_count:i})})}function Ol({thumbnailUrl:n,thumbnailAlt:t,primaryText:a,secondaryText:r,orderAmount:o,checkoutUrl:i,buttonText:s}){const{i18n:l}=v(),c=o?l.formatCurrency(o.amount,{currency:o.currencyCode,form:"short"}):void 0;return e(U,{gridAutoFlow:"column",gridTemplateColumns:"minmax(auto, max-content) minmax(0, 1fr) minmax(auto, max-content)",gridTemplateRows:"minmax(0, 1fr)",gap:"base",children:[e(_n,{alt:t,size:"small",src:n}),e(_,{gap:"base",children:[e(U,{gridAutoFlow:"column",gridTemplateColumns:"minmax(0, 1fr) minmax(auto, max-content)",gridTemplateRows:"minmax(0, 1fr)",gap:"base",children:[e(_,{children:[a,r&&e(k,{color:"subdued",children:r})]}),c?e(k,{type:"strong",children:c}):null]}),i&&s&&e(R,{inlineSize:"@media (inline-size >= extraSmall) fit-content, 100%",children:e(he,{variant:"secondary",size:"small",onClick:()=>window.open(i,"_blank"),inlineSize:"fill",children:e(U,{gridAutoFlow:"column",gridTemplateColumns:"minmax(0, 1fr) minmax(auto, max-content)",gridTemplateRows:"minmax(0, 1fr)",gap:"small-400",alignItems:"center",alignContent:"center",children:[e(k,{children:s}),e(oe,{type:"external",size:"small"})]})})})]})]})}function ht({image:n,quantity:t,title:a,subtitle:r,totalPrice:o}){const{i18n:i}=v();return e(U,{gridAutoFlow:"column",gridTemplateColumns:"minmax(auto, max-content) minmax(0, 1fr) minmax(auto, max-content)",gridTemplateRows:"minmax(0, 1fr)",gap:"base",children:[e(R,{children:e(_n,{alt:n?.altText,size:"base",src:n?.url,totalItems:t})}),e(R,{blockAlignment:"center",children:e(_,{children:[e(k,{children:a}),r&&e(k,{color:"subdued",children:r})]})}),o?e(R,{blockAlignment:"center",children:e(k,{children:i.formatCurrency(o.amount,{currency:o.currencyCode,form:"short"})})}):null]})}const Nl="·";function Bl({deliveryLines:n,merchandiseItems:t}){const{i18n:a}=v(),r=!!(n&&n.length>=On);if(!r&&(!t||!t.length))return null;if(r){const o=[];return n?.forEach(i=>
1{if(!Xe(i))return;const s=i.methods.find(l=>l.handle===i.selectedDeliveryMethodHandle);s&&o.push({line:i,selectedMethod:s})}),o.length?e(_,{gap:"large-200",children:o.map(({line:i,selectedMethod:s},l)=>e(_,{gap:"base",children:[e(_,{children:[e(_,{direction:"inline",gap:"small-400",children:[e(k,{type:"strong",children:a.translate("shipping.split_shipping_shipment_number",{number:l+1})}),e(k,{children:Nl}),e(k,{children:s.title})]}),e(k,{color:"subdued",children:s.deliveryPromisePresentmentTitle?.long})]}),i.targetMerchandiseLines?.map(c=>{const u=t?.find(d=>d.id===c.stableId);return u?e(ht,{image:u.image,quantity:u.quantity,title:u.title,subtitle:u.subtitle,totalPrice:u.totalPrice},c.id):null})]},i.id||l))}):null}return e(_,{gap:"base",children:t?.map(o=>e(ht,{image:o.image,quantity:o.quantity,title:o.title,subtitle:o.subtitle,totalPrice:o.totalPrice},o.id))})}const mt="·",Fl=xn("ShopOrderSummaryTooltip");function Ul({details:n}){const{i18n:t,shop:a}=v(),r=n.shopId===a.id,o=Ln(void 0,Fl),i=!!("deliveryLines"in n&&n.deliveryLines&&n.deliveryLines.length>=On);return e(Mr,{title:t.translate("order_summary.cost_table_title"),children:[n.subtotal&&e(en,{children:[e(nn,{children:e(_,{direction:"inline",gap:"small-400",children:[e(k,{children:t.translate("order_summary.subtotal_label")}),n.quantity&&e(O,{children:[e(k,{children:mt}),e(k,{children:t.translate("thank_you.thank_you_item_label",{count:n.quantity})})]})]})}),e(tn,{children:e(k,{children:t.formatCurrency(n.subtotal.amount,{currency:n.subtotal.currencyCode,form:"short"})})})]}),r&&e(Sr,{disableTooltip:!0}),"shippingTotal"in n&&n.shippingTotal&&e(en,{children:[e(nn,{children:e(_,{direction:"inline",gap:"small-400",children:[e(k,{children:t.translate("order_summary.shipping_label")}),n.deliveryMethodHandle&&!i&&e(O,{children:[e(k,{children:mt}),e(k,{children:n.deliveryMethodHandle})]})]})}),e(tn,{children:e(k,{letterCase:n.shippingTotal.amount===0?"uppercase":void 0,children:n.shippingTotal.amount===0?t.translate("order_summary.free_shipping_total_label"):t.formatCurrency(n.shippingTotal.amount,{currency:n.shippingTotal.currencyCode,form:"short"})})})]}),"estimatedTaxes"in n&&n.estimatedTaxes&&e(en,{children:[e(nn,{children:e(_,{direction:"inline",gap:"small-300",alignItems:"center",children:[e(k,{children:t.translate("order_summary.estimated_taxes_label")}),e(oe,{type:"question-circle",size:"small",interestFor:o,accessibilityLabel:t.translate("tooltip.accessibility_label_context",{context:t.translate("order_summary.estimated_taxes_label")})}),e(Tr,{id:o,children:t.translate("order_summary.estimated_taxes_finalization_tooltip_content")})]})}),e(tn,{children:e(k,{children:t.formatCurrency(n.estimatedTaxes.amount,{currency:n.estimatedTaxes.currencyCode,form:"short"})})})]}),r&&e(Ir,{}),r&&e(Pr,{}),r&&e(wr,{disableTooltip:!0}),"checkoutTotal"in n&&n.checkoutTotal&&e(en,{children:[e(nn,{children:e(L,{level:1,children:t.translate("order_summary.total_label")})}),e(tn,{children:e(L,{level:1,children:t.formatCurrency(n.checkoutTotal.amount,{currency:n.checkoutTotal.currencyCode,form:"short"})})})]}),r&&e(Er,{})]})}function Hl({details:n,open:t,onClose:a,onAfterHide:r}){const{i18n:o}=v();return e(Ar,{id:`order-modal-${n.shopId}`,open:t,onHide:a,onAfterHide:r,heading:n.shopName?o.translate("thank_you.thank_you_from_shop",{shop_name:n.shopName}):o.translate("thank_you.thank_you_from_other_store"),size:"base",children:e(Wt,{children:e(_,{gap:"base",children:[e(H,{children:e(Bl,{deliveryLines:"deliveryLines"in n?n.deliveryLines:void 0,merchandiseItems:n.merchandiseItems})}),e(Ze,{}),e(H,{children:e(Ul,{details:n})}),"orderConfirmationNumber"in n&&n.orderConfirmationNumber&&e(k,{color:"subdued",children:o.translate("order_summary.confirmation_number_label",{confirmation_number:n.orderConfirmationNumber})}),"trackingUrl"in n&&n.trackingUrl&&e(he,{variant:"primary",size:"base",inlineSize:"fill",onClick:n.trackingUrl?()=>window.open(n.trackingUrl,"_blank"):void 0,children:e(_,{direction:"inline",gap:"small-200",alignItems:"center",children:[e(k,{children:o.translate("thank_you.track_your_order_link_text")}),e(oe,{type:"external",size:"small"})]})})]})})})}function vn(){const n=N().contactInfo;return S(()=>{const t=n.value,a=t?.email!=null&&t?.email.length>0,r=t?.phone!=null&&t?.phone.length>0;return{confirmWithEmail:a,confirmWithPhone:r}})}function zl({itemCount:n}){const{i18n:t}=v(),{confirmWithEmail:a,confirmWithPhone:r}=vn().value,o=n>1,i=(()=>
1{if(a)return o?t.translate("thank_you.thank_you_confirmed_with_email_description.multi_store"):t.translate("thank_you.thank_you_confirmed_with_email_description.single_store");if(r)return o?t.translate("thank_you.thank_you_confirmed_with_phone_description.multi_store"):t.translate("thank_you.thank_you_confirmed_with_phone_description.single_store")})();return e(Rn,{tone:"info",iconHidden:!0,heading:t.translate("thank_you.confirmed"),children:e(w,{children:i})})}function Yl({itemCount:n}){const{i18n:t}=v();return e(Rn,{tone:"critical",heading:t.translate("thank_you.thank_you_unconfirmed_items_heading",{count:n}),children:e(w,{children:t.translate("thank_you.thank_you_unconfirmed_items_description",{count:n})})})}function _t({status:n,detailsList:t}){const a=ne(null),r=ne(!1),{shop:o,i18n:i}=v(),s=o.hasFlagEnabled(se),l=!!xe()?.some(p=>p.status==="failed"),c=o.hasFlagEnabled(fo);if(!t.length)return null;const u=n==="confirmed",d=t[0].status==="failed"?t[0].recoveryUrl:void 0,m=t.find(p=>p.shopId===a.value);return e(O,{children:[e(H,{overflow:"hidden",colorLayer:s?void 0:"control",children:e(_,{gap:"base",children:[e(ql,{isConfirmed:u,hasFailedRemoteCheckouts:l,detailsList:t}),t.map((p,h)=>{const y=h===t.length-1;return e(_,{gap:"base",children:[e(Ol,{primaryText:e(_,{direction:"inline",gap:"small-400",children:[e(ke,{textDecoration:"none",onClick:()=>{a.value=p.shopId,r.value=!0},children:i.translate("thank_you.thank_you_item_label",{count:p.quantity??0})}),e(k,{children:Rr}),e(k,{children:p.shopName||i.translate("thank_you.thank_you_from_other_store")})]}),secondaryText:$l({details:p,i18n:i}),orderAmount:p.checkoutTotal,thumbnailUrl:p.merchandiseItems?.[0]?.image?.url,thumbnailAlt:p.merchandiseItems?.[0]?.image?.altText,...p.status==="failed"?Vl({details:p,i18n:i,isSingleCheckoutButtonEnabled:c}):Wl({details:p,i18n:i})}),!y&&e(Lr,{below:"small",children:e(Ze,{direction:"inline",borderWidth:"base"})})]},p.shopId)}),!u&&c&&d&&e(he,{onClick:()=>window.open(d,"_blank"),inlineSize:"fill",variant:"primary",children:e(U,{gridAutoFlow:"column",gridAutoColumns:"minmax(auto, max-content)",gridTemplateColumns:"minmax(auto, max-content)",gridTemplateRows:"minmax(0, 1fr)",gap:"small-400",alignItems:"center",alignContent:"center",children:[e(k,{children:i.translate("thank_you.checkout_again")}),e(oe,{type:"external",size:"small"})]})})]})}),m&&e(Hl,{open:r.value,onClose:()=>r.value=!1,onAfterHide:()=>a.value=null,details:m})]})}function ql({isConfirmed:n,hasFailedRemoteCheckouts:t,detailsList:a}){if(n)return t?e(zl,{itemCount:a.length}):null;const r=a.filter(o=>o.status==="failed").reduce((o,i)=>o+(i.quantity||0),0);return e(Yl,{itemCount:r})}function $l({details:n,i18n:t}){if(n.status==="failed")return t.translate("payment_errors.generic_error");if("orderConfirmationNumber"in n&&n.orderConfirmationNumber)return t.translate("order_summary.confirmation_number_label",{confirmation_number:n.orderConfirmationNumber})}function Wl({details:n,i18n:t}){return{buttonText:n.shopName?t.translate("thank_you.checkout_on_remote_shop_link_text",{remoteShopName:n.shopName}):t.translate("thank_you.checkout_on_another_store")}}function Vl({details:n,i18n:t,isSingleCheckoutButtonEnabled:a}){return a?{checkoutUrl:void 0,buttonText:void 0}:{checkoutUrl:n.recoveryUrl,buttonText:n.shopName?t.translate("thank_you.checkout_on_remote_shop_link_text",{remoteShopName:n.shopName}):t.translate("thank_you.checkout_on_another_store")}}function Gl(){const n=Dn();return S(()=>{const t=n.value.filter(Xe);if(!t.length)return;const[{methods:[{costAfterDiscounts:{currencyCode:a}}]}]=t;return{amount:t.reduce((o,i)=>{const s=i.methods?.find(({handle:l})=>l===i.selectedDeliveryMethodHandle);return s?o+(s.costAfterDiscounts.amount??0):o},0),currencyCode:a}})}function Kl(){const n=j(),t=bo(),a=ta();return S(()=>{const r=n?.purchaseOrder.paymentDue,o=n?.checkoutTotal;return vo({paymentDue:r,checkoutTotal:o,orderDeposit:a.value,hasFixedSellingPlan:t.value})})}function yt(n){return n?.length?n.reduce((t,a)=>t+a.quantity,0):0}function jl(n){if(n?.length)return n.reduce((t,a)=>a.lineAmount?{amount:(t?.amount||0)+a.lineAmount.amount,currencyCode:a.lineAmount.currencyCode}:t,void 0)}function Ql(n){return n.map(({stableId:a,title:r,subtitle:o,image:i,quantity:s,totalPrice:l})=>a?{id:a,title:r,subtitle:o||void 0,image:i?.url?{url:i.url,altText:i.altText||void 0}:void 0,quantity:s,totalPrice:l}:null).filter(a=>a!==null)}function gt(n){return n.map(({stableId:a,title:r,productTitle:o,image:i,quantity:s,price:l})=>({id:a,title:o,subtitle:r||void 0,image:i?{url:i.url,altText:i.altText||void 0}:void 0,quantity:s,totalPrice:l})).filter(a=>a!==null)}function Zl(){const n=xe(),{shop:{name:t,id:a,brandSettings:r,remoteShopsConfigMap:o}}=v(),{totalLineQuantities:i}=Vt(),s=Kl(),l=j(),c=xr(),d=N().taxes.value,{value:m}=oa("ONE_TIME_PURCHASE"),p=Bn(m),h=Dn(),y=Gl();return ue(()=>{const g=[],f=[];if(!n?.length)return{confirmedShops:[],failedShops:[]};if(i&&i>0){const b=Ql(c)||[],C=d&&d.status==="available_total"?d.totalTax:void 0,T={shopId:a,shopName:t,shopLogo:r?.squareLogo?.url,quantity:i,checkoutTotal:s.value,merchandiseItems:b,subtotal:l?.subtotal,estimatedTaxes:C,shippingTotal:y.value,deliveryMethodHandle:p?.title,orderConfirmationNumber:l?.orderIdentity?.buyerIdentifier||void 0,trackingUrl:l?.orderStatusPageUrl||void 0,deliveryLines:h.value,status:"confirmed"};g.push(T)}
1return n?.length&&n.forEach(b=>{if(b.status==="submitted"){const{orderIdentity:{buyerIdentifier:C},orderStatusPageUrl:T,remotePurchaseOrder:{merchandiseLines:I,deliveryLines:P,checkoutTotal:D,subtotalBeforeTaxesAndShipping:M,tax:x}}=b,V={shopId:b.shopId,shopName:o?.get(b.shopId)?.name,shopLogo:o?.get(b.shopId)?.brandSettings?.squareLogo?.url,quantity:yt(I),checkoutTotal:D,subtotal:M,estimatedTaxes:x,shippingTotal:jl(P),merchandiseItems:gt(I)||[],deliveryMethodHandle:P?.[0]?.title,orderConfirmationNumber:C||void 0,trackingUrl:T||void 0,status:"confirmed"};g.push(V)}if(b.status==="failed"){const{recoveryUrl:C,merchandiseLines:T,checkoutTotal:I,subtotalBeforeTaxesAndShipping:P,tax:D}=b,M={shopId:b.shopId,shopName:o?.get(b.shopId)?.name,shopLogo:o?.get(b.shopId)?.brandSettings?.squareLogo?.url,quantity:yt(T),checkoutTotal:I,subtotal:P,estimatedTaxes:D,merchandiseItems:gt(T)||[],recoveryUrl:C,status:"failed"};f.push(M)}}),{confirmedShops:g,failedShops:f}},[n,a,t,i,s.value,l,r?.squareLogo?.url,o,c,d,p,h.value,y.value])}function Xl(){const{confirmedShops:n,failedShops:t}=Zl(),a=!!t?.length,r=!!n?.length;return!r&&!a?null:e(_,{gap:"base",children:[a?e(Dl,{confirmedShops:n,failedShops:t}):null,r?e(_t,{status:"confirmed",detailsList:n}):null,a?e(_t,{status:"failed",detailsList:t}):null]})}const Jl=()=>{const{i18n:n}=v();return e(_,{padding:"base",children:e(L,{children:n.translate("thank_you.offers.title")})})},ft=(n,t=Q)=>{if(n.origin!=="https://shop.app"||n.data===void 0||n.data.type!=="redirect")return;const a=n.data.redirect_to;if(a===void 0)return;const r=new URL(a);`${r.protocol}//${r.hostname}`=="https://shop.app"&&(n.data.open_in_new_tab!==void 0&&n.data.open_in_new_tab===!0&&typeof t.open=="function"?t.open(a,"_blank","noopener,noreferrer"):t.location.href=a)},ec=({shopId:n,personalizeAds:t,placement:a,checkoutToken:r,orderId:o,hideButtons:i,hideHeader:s,accentColor:l,darkMode:c})=>{const u=$(null);F(()=>{const m=h=>{h.origin==="https://shop.app"&&clearTimeout(p)},p=setTimeout(()=>{u.current?.iframeRef?.current&&(u.current.iframeRef.current.style.height="0px")},2e3);return Q.addEventListener("message",ft),Q.addEventListener("message",m),()=>{Q.removeEventListener("message",ft),clearTimeout(p)}},[]);const{authorizeUrl:d}=oi({avoidPayAltDomain:!0,avoidSdkSession:!0,analyticsContext:"shopCashOffers",proxy:!0,locale:void 0,flow:"shop_cash_offers",redirectType:"iframe",responseType:"code",clientId:"",shopId:n,personalizeAds:t,placement:a,checkoutToken:r,orderId:o,hideButtons:i,hideHeader:s,accentColor:l,darkMode:c});return e(ii,{proxy:!0,insideModal:!1,ref:u,src:d,scrolling:"no",variant:"default"})},nc=()=>pa(({element:n,...t})=>e(_a,{element:n,featureName:"ShopCashOffers",children:e(ha,{children:e(ma,{children:e(ai,{children:e(ri,{children:e(ec,{...t})})})})})}),{name:"shop-cash-offers",props:{shopId:"number",personalizeAds:"boolean",placement:"string",orderId:"number",checkoutToken:"string",hideButtons:"boolean",hideHeader:"boolean",accentColor:"string",darkMode:"boolean"},shadow:"open"});function tc(){const{shop:n}=v(),t=n.hasFlagEnabled(ko),{colors:{global:a,schemes:r={}}}=Gt(),{main:o}=wn(),i=r[o.colorScheme??"scheme1"],s=o.section?.colorScheme?r[o.section.colorScheme]:void 0,l=t?an(s,a?.control)??an(i,a?.control)??an(r.scheme1,a?.control):an(i),c=l===void 0?t:bt(l),u=a?.accent,d=u!==void 0&&c!==bt(u);return{...c?null:{dark_mode:"true"},...d?{accent_color:u.toRgb()}:null}}function an(n,t){if(n==null)return;const a=n.control?.background??t;return a==null||Co(a)?n.base?.background:a}function bt(n){return typeof n>"u"?!1:n.getYiqPerceivedBrightness()>=.65}const vt=new URL("https://shop.app"),kt=String(!0),Ct="thank_you",ac="https://shop.app/offers-compact",rc="211px",St="100%";function oc(n,t){const a=new URL(n).toString(),r=new URLSearchParams(t).toString();return`${a}?${r}`.toString()}const ic=rr(({shopId:n,personalizeAds:t,preview:a,orderId:r,checkoutSessionIdentifier:o,setHeight:i},s)=>{const l=String(t),c=tc(),{i18n:u,observability:d,url:m}=v(),p=$(null),h=$(null),y=()=>p.current?.shadowRoot?.querySelector("iframe")??h.current,g=!!r||a;if(F(()=>{const f={type:g?"iframe":"shop-js-iframe"};d.counter({name:"shop_ads_2p_rail_render_started",value:1,attributes:f}),d.log("shop_ads_2p_rail_render_started","shop_ads_2p_rail_render_started",{...f})},[g,d]),F(()=>{const f=b=>{if(b.origin!==vt.origin)return;const C=b?.data?.type,T=b?.data?.redirect_to;
1if(C==="resize_iframe"){let I=b?.data?.height;const P=b?.data?.width;if(typeof I=="number"&&typeof P=="number"){I=I>0?I:0,i(I);const D={type:I>0?"with_content":"without_content"};d.counter({name:"shop_ads_2p_rail_resize",value:1,attributes:D}),d.log("shop_ads_2p_rail_resize","shop_ads_2p_rail_resize",{height:I,width:P,...D});const M=y();M&&(M.style.height=`${I}px`,M.style.width=St)}}else if(g&&C==="redirect"&&T!==void 0){const I=new URL(T);(I.origin===vt.origin||I.origin===new URL(m.storefront()).origin)&&(b.data.open_in_new_tab!==void 0&&b.data.open_in_new_tab===!0?window.open(T,"_blank","noopener,noreferrer"):window.location.assign(T))}};return window.addEventListener("message",f),()=>{window.removeEventListener("message",f)}},[g,i,d,m]),or(s,()=>({iframeElement:y}),[]),g){const f=oc(ac,{shop_id:String(n),placement:Ct,hide_header:kt,personalize_ads:l,merchant_url:m.storefront(),...a?{preview:String(a)}:null,...r?{order_id:String(r)}:null,...o?{checkout_token:o}:null,...c});return e("iframe",{ref:h,id:"offers",title:u.translate("thank_you.offers.title"),src:f,width:St,height:rc,scrolling:"no"})}else return typeof window<"u"&&typeof customElements<"u"&&!customElements.get("shop-cash-offers")&&nc(),e("shop-cash-offers",{"shop-id":n,"personalize-ads":l,"hide-header":kt,"dark-mode":c.dark_mode,"accent-color":c.accent_color,placement:Ct,"order-id":r,"checkout-token":o,ref:p})});function sc({preview:n}){const{shop:t,source:{checkoutSessionIdentifier:a},consentManager:r}=v(),{id:o}=t,i=parseInt(je(o),10),s=r.saleOfDataAllowed.value&&r.marketingAllowed.value,[l,c]=re(),u=t.hasFlagEnabled(se),d=j(),m=d?.orderIdentity.id?ia(d.orderIdentity.id):void 0,p=$(null);return e(H,{colorLayer:u?void 0:"control",display:l===0?"none":"block",children:[e(Jl,{}),e(ic,{checkoutSessionIdentifier:a,orderId:m,personalizeAds:s,shopId:i,ref:p,setHeight:c,preview:n})]})}const pn=(n,t)=>{try{const a=new URL(n.replace(/\/$/,""));return Object.entries(t).forEach(([r,o])=>{a.searchParams.append(r,o)}),a.toString()}catch{return n}},rn=102,lc=32,cc=20,uc=n=>e("svg",{xmlns:"http://www.w3.org/2000/svg",width:32,height:32,viewBox:"0 0 318 350",...n,children:e("path",{d:"M9.267 33.017C37.148 13.574 77.319 0 120.113 0c114.074 0 197.039 77.132 197.039 182.787 0 98.501-
171.299 167.213-170.479 167.213C61.764 350 .848 292.972.848 216.482c0-51.855 31.182-90.1 75.205-104.994l35.641 60.274c-23.975 11.006-33.018 27.221-33.018 47.307 0 33.017 27.881 56.404 68.052 56.404 49.269 0 88.156-38.905 88.156-91.402 0-61.577-48.608-108.223-114.716-108.223a132.56 132.56 0 0 0-73.243 21.388z"})}),dc="gTxFI",pc="kfcrU",Tt={Container:dc,overlay:pc},hc="white";function xa({color:n="branded",containerSize:t=lc,iconSize:a=cc,backgroundColor:r=hc,overlay:o=!1}){const i=n==="branded"?bn.toRgb():n;return e("div",{className:B(Tt.Container,o?Tt.overlay:""),style:{backgroundColor:r,height:t,width:t,borderRadius:"10px"},children:e(uc,{"aria-hidden":"true",style:{fill:i},height:a,width:a})})}const mc="_3nOgQ",_c="NmBBp",yc="_0wOrq",gc="I6KnV",fc="e1FkT",bc="Ww91E",vc="sCXu3",kc="iIHiG",Cc="oacnN",Sc="_8Slfk",Tc="_2i0qK",Ic="xjUvL",Pc="Iiyyo",ae={Root:mc,Ready:_c,Track:yc,Fill:gc,FillDelivered:fc,Rail:bc,Marker:vc,StageIcon:kc,Confirmed:Cc,Delivered:Sc,InTransit:Tc,OutForDelivery:Ic,CheckPath:Pc},wc=xn("tracking-delivered-gradient-");function Ec(){return e("svg",{"aria-hidden":"true",viewBox:"0 0 40 40",children:[e("circle",{cx:"20",cy:"20",fill:"#000",r:"20"}),e("path",{className:ae.CheckPath,d:"m12.25 20.5 5 5 10.5-12",fill:"none",stroke:"white",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"3.25"})]})}function Mc(){const n=Ln(void 0,wc);return e("svg",{"aria-hidden":"true",viewBox:"0 0 40 40",children:[e("defs",{children:e("linearGradient",{id:n,x1:"0",x2:"1",children:[e("stop",{offset:"0",stopColor:"#3ccd7f"}),e("stop",{offset:"1",stopColor:"#56bc39"})]})}),e("circle",{cx:"20",cy:"20",fill:`url(#${n})`,r:"20"}),e("path",{clipRule:"evenodd",d:"M12.5914 21.8064 12.5926 21.8055 12.5944 21.8042 12.6 21.8001 12.6185 21.7863C12.6341 21.7746 12.6562 21.758 12.6844 21.7365 12.7406 21.6937 12.8211 21.6316 12.9223 21.5514 13.1245 21.3909 13.4102 21.1574 13.7514 20.8594 14.4326 20.2647 15.3426 19.407 16.2553 18.3551 18.0477 16.2895 20 13.3052 20 10 20 5.58172 16.4183 2 12 2 7.58172 2 4 5.58172 4 10c0 3.3052 1.95225 6.2895 3.74471 8.3551.91273 1.0519 1.82269 1.9096 2.50389 2.5043.3412.298.6269.5315.8291.692.1012.0802.1817.1423.2379.1851.0282.0215.0503.0381.0659.0498l.0185.0138.0056.0041.0025.0018c.352.2582.8313.2585 1.1833.0004ZM11.9978 12.5A2.5 2.5 0 1 0 11.9978 7.5a2.5 2.5 0 0 0 0 5Z",fill:"white",fillRule:"evenodd",transform:"translate(8 8)"})]})}function Ac({animate:n=!0}={}){return e("div",{"aria-hidden":"true",className:B(ae.Root,{[ae.Ready]:n}),children:e("div",{className:ae.Track,children:[e("span",{className:ae.Fill}),e("span",{className:ae.FillDelivered}),e("span",{className:ae.Rail}),e("span",{className:ae.Marker,children:[e("span",{className:B(ae.StageIcon,ae.Confirmed),children:e(Ec,{})}),e("span",{className:B(ae.StageIcon,ae.InTransit)}),e("span",{className:B(ae.StageIcon,ae.OutForDelivery)}),e("span",{className:B(ae.StageIcon,ae.Delivered),children:e(Mc,{})})]})]})})}const Rc=n=>e("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 393 63",...n,children:[e("path",{fill:"currentColor",d:"M57.69 28.063q.963 0 1.827.357a4.1 4.1 0 0 1 1.527 1.095q.672.74 1.054 1.901.382 1.154.382 2.781v.017q0 2.016-.581 3.453-.581 1.435-1.669 2.208-1.079.763-2.581.763-1.104 0-1.992-.398a4.1 4.1 0 0 1-1.461-1.112 3.9 3.9 0 0 1-.772-1.627l-.017-.092h2.1l.034.083q.157.415.448.73.299.316.714.49.423.167.946.167.945 0 1.544-.556.605-.566.905-1.503a7.7 7.7 0 0 0 .348-2.092q.009-.124.009-.24v-.241l-.374-2q0-.681-.315-1.238a2.4 2.4 0 0 0-.855-.88 2.27 2.27 0 0 0-1.204-.323 2.3 2.3 0 0 0-1.187.315q-.54.315-.863.864a2.3 2.3 0 0 0-.324 1.212v.016q0 .697.307 1.237.307.531.838.838.532.308 1.212.308t1.22-.3.856-.83.315-1.203v-.017h.498v2.208h-.29a2.9 2.9 0 0 1-.64.88q-.422.407-1.046.656-.613.249-1.444.249-1.146 0-2.025-.515a3.73 3.73 0 0 1-1.386-1.41q-.498-.898-.498-2.026v-.017q0-1.22.564-2.166a4 4 0 0 1 1.577-1.494q1.013-.549 2.3-.548m8.559 10.666a1.3 1.3 0 0 1-.947-.373 1.28 1.28 0 0 1-.373-.93q0-.555.373-.93.382-.381.947-.382.572 0 .946.382.373.375.373.93 0 .547-.373.93-.375.373-.946.373m0-6.159a1.3 1.3 0 0 1-.947-.373 1.28 1.28 0 0 1-.373-.93q0-.555.373-.93.382
1-.381.947-.382.572 0 .946.382.373.375.373.93 0 .547-.373.93-.375.373-.946.373m9.579 7.77v-2.3h-5.86v-1.75l.946-1.619a155 155 0 0 1 1.959-3.22q.497-.798.987-1.57.498-.78.996-1.518h3.014v7.91h1.618v1.768H77.87v2.3zm-3.868-4.018h3.9v-6.25h-.124q-.365.564-.755 1.162-.382.597-.772 1.22t-.772 1.253q-.381.622-.755 1.254-.374.623-.722 1.236zm12.484 4.018v-9.87h-.15l-2.98 2.1v-2.009l3.13-2.2h2.133V40.34z"}),e("rect",{width:24,height:12,x:334,y:28.5,stroke:"currentColor",opacity:.35,rx:3.8}),e("path",{fill:"currentColor",d:"M359.5 32.781v4.076a2.21 2.21 0 0 0 1.328-2.038c0-.89-.523-1.693-1.328-2.038",opacity:.4}),e("rect",{width:21,height:9,x:335.5,y:30,fill:"currentColor",rx:2.5}),e("path",{fill:"currentColor",fillRule:"evenodd",d:"M317.771 31.104c2.487 0 4.879.922 6.681 2.576a.355.355 0 0 0 .487-.004l1.297-1.263a.34.34 0 0 0 .105-.248.34.34 0 0 0-.108-.246c-4.731-4.375-12.195-4.375-16.926 0a.35.35 0 0 0-.108.246c0 .093.037.182.105.248l1.298 1.263c.133.13.35.131.486.004 1.803-1.654 4.195-2.576 6.683-2.576m-.004 4.22c1.357 0 2.666.512 3.672 1.436a.344.344 0 0 0 .484-.006l1.287-1.32a.367.367 0 0 0-.005-.519 7.9 7.9 0 0 0-10.873 0 .367.367 0 0 0-.005.52l1.287 1.319a.34.34 0 0 0 .483.006 5.43 5.43 0 0 1 3.67-1.436m2.525 2.794a.4.4 0 0 1-.103.28l-2.177 2.455a.32.32 0 0 1-.241.113.32.32 0 0 1-.242-.113l-2.177-2.455a.4.4 0 0 1-.102-.28.4.4 0 0 1 .113-.276c1.39-1.314 3.426-1.314 4.816 0 .07.07.111.17.113.276M301.7 29.682c0-.633-.478-1.146-1.067-1.146h-1.066c-.589 0-1.067.513-1.067 1.146v9.934c0 .633.478 1.146 1.067 1.146h1.066c.589 0 1.067-.513 1.067-1.146zm-7.434 1.3h1.067c.589 0 1.066.525 1.066 1.173v7.434c0 .648-.477 1.173-1.066 1.173h-1.067c-.589 0-1.067-.525-1.067-1.173v-7.434c0-.648.478-1.174 1.067-1.174m-4.332 2.648h-1.067c-.589 0-1.066.532-1.066 1.189v4.755c0 .656.477 1.188 1.066 1.188h1.067c.589 0 1.067-.532 1.067-1.188v-4.755c0-.657-.478-1.189-1.067-1.189m-5.301 2.445h-1.066c-.589 0-1.067.525-1.067 1.172v2.344c0 .647.478 1.171 1.067 1.171h1.066c.589 0 1.067-.524 1.067-1.171v-2.344c0-.647-.478-1.172-1.067-1.172",clipRule:"evenodd"})]}),Lc="RqWCL",xc="vcF4y",Dc="Z7YHY",Oc="U17Bl",Nc="XiB25",Bc="rRjrG",Fc="nm5oZ",Uc="pXsW1",Hc="XAh5C",zc="rjvR4",be={Phone:Lc,PhoneReady:xc,Screen:Dc,StatusBar:Oc,Clock:Nc,Island:Bc,Banner:Fc,AppIcon:Uc,Copy:Hc,Time:zc},Yc=28,qc=17;function It(n,t){return new Intl.DateTimeFormat(t,{hour:"numeric",minute:"2-digit"}).formatToParts(n).filter(({type:a})=>a!=="dayPeriod").map(({value:a})=>a).join("").trim()}function $c(n){const t=new Date(n),a=n.getHours(),r=a>=20?"tomorrow":"today";return a>=20||a<9?(a>=20&&t.setDate(t.getDate()+1),t.setHours(9,0,0,0)):t.setHours(t.getHours()+1,0,0,0),{day:r,time:t}}function Wc({animate:n=!0,title:t,body:a,time:r,now:o}={}){const{i18n:i}=v(),s=o?It(o,i.locale):"",l=o?$c(o):void 0,c=l?It(l.time,i.locale):"";let u="";return l?.day==="today"?u=i.translate("thank_you.qr_code.phone_banner.body_today",{time:c}):l&&(u=i.translate("thank_you.qr_code.phone_banner.body_tomorrow",{time:c})),e("div",{"aria-hidden":"true",className:B(be.Phone,{[be.PhoneReady]:n}),children:e("div",{className:be.Screen,children:[e("div",{className:be.StatusBar,children:[e(Rc,{"aria-hidden":"true"}),e("span",{className:be.Clock,dir:"auto",children:s}),e("span",{className:be.Island})]}),e("div",{className:be.Banner,children:[e("span",{className:be.AppIcon,children:e(xa,{backgroundColor:bn.toRgb(),color:"white",containerSize:Yc,iconSize:qc})}),e("span",{className:be.Copy,children:[e("strong",{dir:"auto",children:t??i.translate("thank_you.qr_code.phone_banner.title")}),e("span",{dir:"auto",children:a??u})]}),e("span",{className:be.Time,dir:"auto",children:r??i.translate("thank_you.qr_code.phone_banner.time")})]})]})})}const Vc="HLHdp",Gc="E1A3F",Kc="_2gHo1",Sn={PhoneReveal:Vc,PhoneRevealReady:Gc,BarReveal:Kc};function jc({treatment:n,isReady:t=!0,now:a}){return n==="phone"?e("div",{"aria-hidden":"true",className:B(Sn.PhoneReveal,{[Sn.PhoneRevealReady]:t}),children:e(Wc,{animate:t,now:a})}):e("div",{"aria-hidden":"true",className:Sn.BarReveal,children:e(U,{accessibilityVisibility:"hidden",gridTemplateRows:t?"1fr":"0fr",overflow:"hidden",children:e(Ac,{animate:t})})})}const Qc="eB1Wk",Zc="Ipunz",Xc="F0OjS",Jc="_3ne1k",eu="_5eMgt",nu="WYqsK",tu="smgwg",au="v7JCj",ru="cnARA",ou="UIp5B",iu="IATLg",su="JN61f",lu="JwOzi",ce={QrCodeSkeleton:Qc,QrC
1ode:Zc,QrCodeLoaded:Xc,Popover:Jc,StyledQrPopover:eu,TrackingPopover:nu,PopoverContent:tu,PhonePopoverContent:au,PopoverContentStack:ru,TrackingPopoverContent:ou,PopoverCopy:iu,QrCodeCopy:su,TrackingHeadline:lu},cu=[cn.Bar,cn.Phone];function uu(n){return cu.includes(n??"")}function du(n){const t=ne(void 0);return F(()=>{if(!n)return;let a;const r=()=>{t.value=new Date},o=6e4-Date.now()%6e4;r();const i=window.setTimeout(()=>{r(),a=window.setInterval(r,6e4)},o);return()=>{window.clearTimeout(i),a!==void 0&&window.clearInterval(a)}},[n,t]),t.value}function pu({link:n,label:t,message:a,installCampaign:r,styledQrCode:o,onQrCodeInteraction:i}){const{i18n:s,observability:l}=v(),c=Oe(),u=ne(!1),d=$(null),m=$(0),p=ne(!1),h=ne(!1),y=Kt(),g=!u.value,f=h.value,b=u.value&&f,C=r?.variant,T=uu(C),I=T?a?.subtitle:a?.title,P=T?void 0:a?.subtitle,D=W(()=>{i?.()},[i]),M=W(()=>{u.value=!0,d.current!==null&&(l.histogram({name:"qr_code_load_time",value:Math.round(performance.now()-d.current),unit:"ms",attributes:{page:"thank_you"}}),d.current=null)},[l,u]),x=C===cn.Phone,V=du(x),Y=W(()=>{h.value=!0,m.current+=1,!u.value&&d.current===null&&(d.current=performance.now())},[h,u]),Z=W(()=>{h.value=!1,p.value=!1},[p,h]);F(()=>{if(!(!f||!I))return Dr({content:I})},[f,I]),F(()=>{y&&b&&(p.value=!0)},[p,y,b]);const X=A=>{f&&!p.value&&A.propertyName==="filter"&&(p.value=!0)};return e(R,{children:e(ga,{impressionType:"download_shop_button",impressionFeatures:["desktop","qr_code"],children:e(he,{inlineSize:c?"fill":void 0,onClick:D,overlay:e(hi,{theme:{popover:{cornerRadius:20}},children:e(yi,{keepMounted:!0,padding:"none",positionArea:"inline-end",onHide:Z,onShow:Y,children:e(R,{className:B(ce.Popover,{[ce.TrackingPopover]:T,[ce.StyledQrPopover]:o}),children:e(R,{padding:"none",className:B(ce.PopoverContent,{[ce.TrackingPopoverContent]:T,[ce.PhonePopoverContent]:x}),children:e(_,{gap:"none",className:ce.PopoverContentStack,children:[e(U,{gridTemplateColumns:"auto minmax(0, 1fr)",columnGap:"none",children:[e(U,{gridTemplateColumns:"1fr",children:[g?e(R,{className:ce.QrCodeSkeleton,children:e(De,{contentDisplay:"block",inlineSize:"100%",blockSize:"100%"})}):null,e(R,{className:B(ce.QrCode,{[ce.QrCodeLoaded]:b}),padding:"none",onTransitionEnd:X,children:[o?e("img",{src:n,height:rn,width:rn,alt:s.translate("thank_you.qr_code.iframe_title"),"aria-hidden":g,onLoad:M}):e(gi,{src:n,height:rn,width:rn,title:s.translate("thank_you.qr_code.iframe_title"),"aria-hidden":g,onLoad:M}),o?null:e(xa,{overlay:!0})]})]}),e(R,{children:e(U,{gridTemplateColumns:"1fr",blockSize:"100%",children:e(R,{className:ce.QrCodeCopy,children:e(_,{gap:"none",className:ce.PopoverCopy,children:[e(R,{className:B({[ce.TrackingHeadline]:T}),children:I?e(L,{level:3,children:I}):null}),P?e(w,{children:e(Me,{children:P})}):null]})})})})]}),T?e(jc,{isReady:p.value,treatment:C,now:V},m.current):null]})})})})}),children:t})})})}const Pt="order_status_page";class hu extends Error{constructor(){super(...arguments),this.name="ShopMobileClipboardInteractionError"}}function mu({label:n,link:t,onClipboardInteraction:a}){const r=Ae(),o=gn(),{observability:i,mobileCheckoutSdk:s,embed:l}=v(),c=Oe(),u=s.variant.isStandard()||l?.isCheckoutKit();if(!r)return null;const d=r?.mobileUrlAttributionPayload,m=o.value.defaultAttributes?.visitToken;return e(R,{children:e(ga,{impressionType:"download_shop_button",impressionFeatures:["mobile"],children:e(he,{inlineSize:c?"@media (inline-size >= medium) auto, fill":void 0,onClick:async()=>{try{const g=y(d,m);await zt(g)}catch(g){g instanceof Error&&i.error(new hu(g.message,{cause:g}))}finally{a?.();const g=h(t,m);window.location.href=g}},children:n})})});function h(g,f){const b=new URL(g);return f&&b.searchParams.set("sid",f),u&&b.searchParams.set("open_externally","true"),b.toString()}function y(g,f){return f?`${g},${f},${Pt}`:`${g},,${Pt}`}}function Da({label:n,message:t,mobileLinkToShop:a,desktopLinkToShop:r,styledQrCode:o,installCampaign:i,onClipboardInteraction:s,onQrCodeInteraction:l}){return So()?e(mu,{label:n,link:a,onClipboardInteraction:s}):e(pu,{label:n,link:r,message:t,styledQrCode:o,installCampaign:i,onQrCodeInteraction:l})}const wt="installments_order",_u="open.shop.app";function yu(){const{i18n:n}=v(),t=Ae(),{track:a}=Ce("shop_pay_installments_highlight_button");if(F(()=>{t&&a("shop_button_rendered")},[t,a]),!t)return null;const{shopInstallmentsMobileUrl:r,qrCodeUrl:o}=t,i={title:n.translate("installments.installments_highlight_qr_flow_modal.title"),subtitle:n.translate("installments.installments_highlight_qr_flow_modal.subtitle")}
1,s=pn(r,{utm_content:wt}),l=pn(o,{link_provider:_u,utm_content:wt});return e(Da,{label:n.translate("installments.installments_highlight_shop_button_get_reminders"),message:i,desktopLinkToShop:l,mobileLinkToShop:s,onClipboardInteraction:()=>{a("arrive")},onQrCodeInteraction:()=>{a("arrive_show_qr_code")}})}function gu(){const{i18n:n,shop:t}=v(),a=t.hasFlagEnabled(se),r=n.translate("installments.installments_highlight_headline");return e(H,{accessibilityLabel:r,colorLayer:a?void 0:"control",children:e(_,{gap:"large-200",children:[e(L,{children:r}),e(_,{gap:"base",children:[e(w,{children:e(Me,{children:n.translate("installments.installments_highlight_copy")})}),e(yu,{})]})]})})}function Et({shipmentGroups:n,title:t,subtitle:a,subtitleIcon:r,address:o,addressHeading:i,modalHeader:s}){const{shop:l}=v(),c=l.hasFlagEnabled(se);return e(H,{overflow:"hidden",colorLayer:c?void 0:"control",children:e(_,{gap:"base",children:[e(_,{gap:"small-200",children:[e(L,{level:2,children:t}),a&&e(_,{direction:"inline",gap:"small-400",alignItems:"center",children:[r&&e(oe,{type:r}),e(k,{color:"subdued",children:a})]})]}),n.map((u,d)=>e(bi,{merchandiseLines:u.merchandiseLines,deliveryMethod:u.deliveryMethod,deliveryMethodHandle:u.deliveryMethod.handle,modalHeader:s(d),showPrice:!1,showPriceInModal:!0,showDeliveryIcon:!1,choiceListContext:!1,isNotFirstLine:d>0,showDivider:!1,subtitle:u.deliveryMethod.pickupLocation?.type==="PickupInStoreLocation"?u.deliveryMethod.pickupLocation.instructions:void 0},u.id)),o&&e(_,{gap:"small-200",children:[e(L,{level:3,children:i}),e(Je,{address:o,multiline:!0})]})]})})}function fu(n,{i18n:t}){const a=n.filter(({selectedMethod:o})=>o.methodType==="PICK_UP");if(a.length===0)return;const[r]=a;return{shipmentGroups:a.map(({id:o,line:i,selectedMethod:s})=>({id:o,deliveryMethod:s,merchandiseLines:(i.targetMerchandiseLines??[]).filter(l=>l.requiresShipping)})),title:t.translate("delivery_options.pickup"),subtitle:t.translate("split_delivery.separate_pickup_email_notice"),address:r.selectedMethod.pickupLocation?.address,addressHeading:t.translate("thank_you.pick_up_in_store_marker.shipping"),modalHeader:()=>t.translate("delivery_options.pickup")}}function bu(n,{checkout:t,i18n:a,shop:r}){const{shippingAddress:o}=t.latestReceipt.value?.status==="processed"?t.latestReceipt.value.purchaseOrder:{},i=n.filter(({selectedMethod:m})=>m.methodType==="SHIPPING");if(i.length===0)return;const s=i.map(({line:m,selectedMethod:p})=>({line:m,method:p})),l=r.marketDrivenShippingEnabled?vi(i.map(({line:m})=>m),s):new Set,c=new Map;i.forEach((m,p)=>{const h=ca(m.selectedMethod,m.line.id??`index-${p}`);c.has(h)||c.set(h,m)});const u=Yo(s).flatMap(({key:m,methods:p,merchandiseLines:h})=>{const y=c.get(m),g=p[0];if(!y||!g)return[];const b=p.find(C=>!l.has(C))??qo(g);return[{id:y.id,deliveryMethod:b,merchandiseLines:h.filter(C=>C.requiresShipping)}]}),d=u.length;return{shipmentGroups:u,title:a.translate("order_summary.shipping_label"),subtitle:d>1?a.translate("shipping.split_shipping_multiple_shipment_notice_one_time_purchase",{quantity:d}):void 0,subtitleIcon:"truck",address:o,addressHeading:a.translate("thank_you.shipping_address_title"),modalHeader:m=>d===1?a.translate("order_summary.shipping_label"):a.translate("shipping.split_shipping_merchandise_shipment_number",{number:m+1,total:d})}}function vu(n){return n.status!=="filled"?[]:n.lines.filter(Xe).flatMap(t=>{const a=Bn(t);return a?[{id:t.id??To(),line:t,selectedMethod:a}]:[]})}function ku(){const n=v(),{deliveryNext:t}=n.checkout.latestReceipt.value?.status==="processed"?n.checkout.latestReceipt.value.purchaseOrder??{}:{};if(!t)return null;const a=vu(t).filter(({line:i})=>i.type==="ONE_TIME_PURCHASE"),r=fu(a,n),o=bu(a,n);return e(_,{gap:"base",children:[r&&e(Et,{...r}),o&&e(Et,{...o})]})}function Cu(){const{i18n:n,shop:t}=v(),a=t.hasFlagEnabled(se),r=n.translate("shipping.shipping_method_title"),o=N().deliveryNext,i=$o(),s=ua(),l=mn(),c=S(()=>{const T=o.value;if(T?.status!=="filled")return[];const I=Io(T.lines).filter(Xe);return ra(I)}),u=S(()=>c.value.filter(({type:T})=>T==="ONE_TIME_PURCHASE")),d=S(()=>la(u.value).groups),m=S(()=>d.value.length),p=S(()=>c.value.filter(({type:T})=>T==="SUBSCRIPTION")),h=S(()=>p.value.length>0),y=S(()=>c.value.map(({methods:T})=>T[0]?.handle)),g=S(()=>n.translate("shipping.shipping_method_first_shipment_group_title",{count:m.value})),f=S(()=>h.value&&!i.value.showShipmentBreakdown&&!Ht(l.value.currentDetour)),b=S(()=>
1{if(h.value||s.value)return n.translate("shipping.split_shipping_multiple_shipment_notice");if(m.value>1)return n.translate("shipping.split_shipping_multiple_shipment_notice_one_time_purchase",{quantity:m.value})}),C=t.marketDrivenShippingEnabled&&ki(u.value);return e(E,{when:()=>o.value?.status==="filled",children:()=>e(Le,{target:"plain",children:e(H,{accessibilityLabel:r,children:e(_,{gap:"base",padding:"small-300 none none none",children:[e(_,{gap:"small-400",children:[e(L,{level:2,children:r}),e(E,{when:()=>i.value.showShipmentBreakdown,fallback:e(Su,{multipleShipmentsHeading:b}),children:e(Ti,{})})]}),e(_,{gap:"large-200",children:[e(_,{gap:"small-200",children:[e(E,{when:f,children:()=>e(L,{level:3,children:g.value})}),e(Le,{target:"edgeToEdgeCard",children:e(H,{accessibilityRole:"presentation",colorLayer:a?void 0:"control",children:e(Ci,{deliveryLines:c.value,selectedDeliveryMethodHandles:y.value,choiceListContext:!1,showGroupPrices:!C,shipmentGroups:d.value})})})]}),e(Ii,{subscriptionLines:p.value})]})]})})})})}function Su({multipleShipmentsHeading:n}){return e(E,{when:n,children:t=>e(_,{direction:"inline",gap:"small-400",alignItems:"center",children:[e(
1oe,{type:"truck"}),e(k,{color:"subdued",children:t})]})})}function Tu(n){return n.some(t=>t.key==="_shopify_buyer_membership_key"&&t.value==="buy_with_prime")}const Mt="/cdn/shopifycloud/checkout-web/assets/c1/assets/envelope.C3KgH2Yk.svg",Iu="sv7SI",Pu="fF5mZ",wu="k3nMX",Eu="oMEEK",Mu="p3BjS",We={Backdrop:Iu,BackdropFill:Pu,BackgroundImage:wu,Content:Eu,Envelope:Mu};function Au({active:n,children:t,products:a,colorLayer:r}){const o=ne(new Set),[i]=a.filter(({src:l})=>l&&!o.value.has(l));function s(l){if(!(l.target instanceof HTMLImageElement))return;const c=l.target.getAttribute("src");c&&(o.value=new Set([...o.value,c]))}return e("div",{onErrorCapture:s,children:e(U,{children:[n?e(H,{accessibilityRole:"presentation",className:B(We.Backdrop,Ee.ThankYouEntranceStatus),colorLayer:r,overflow:"hidden",children:e(R,{background:"subdued",className:We.BackdropFill,overflow:"hidden",position:"absolute",children:i?e(Ye,{alt:"",className:We.BackgroundImage,inlineSize:"auto",objectFit:"cover",src:i.src}):null})}):null,e(_,{alignItems:n?"center":void 0,className:We.Content,padding:n?"base":void 0,paddingBlockStart:n?"large-300":void 0,children:[n?e(_,{alignItems:"center",className:Ee.ThankYouEntranceStatus,children:[i?e(_n,{src:i.src}):null,o.value.has(Mt)?null:e(R,{className:We.Envelope,inlineSize:"95px",children:e(Ye,{alt:"",aspectRatio:"95/102",src:Mt})})]}):null,e(R,{inlineSize:"100%",children:t})]})]})})}const Oa=Bt(void 0);function Na(){return Ft(Oa)}const Ru="Q3L2z",Lu="wpbKf",xu="_1H07Y",Tn={StaticMapContainer:Ru,StaticMapContainerWithOverlay:Lu,StaticMapOverlay:xu};function Du({src:n,title:t,overlayTitle:a,overlayLabel:r,overlay:o,onError:i}){const s=Po();return e(E,{when:s,fallback:e(De,{contentDisplay:"block",aspectRatio:"2 / 1"}),children:e("div",{className:B(Tn.StaticMapContainer,{[Tn.StaticMapContainerWithOverlay]:!!o}),children:[e(Ye,{src:n,alt:t??"Map",loading:"lazy",objectFit:"cover",aspectRatio:"2/1",onError:i?()=>i():void 0}),r?e("div",{"aria-hidden":"true",className:Tn.StaticMapOverlay,children:e(_,{gap:"small-500",alignItems:"center",children:[a?e(k,{color:"subdued",type:"small",children:a}):null,e(k,{type:"strong",children:r})]})}):null,o]})})}function Ou(n,t){return n?t?n.dark:n.light:null}function Nu(){v();const n=Fn(),t=j();return Ou(t?.mapUrl,n)}const Bu="_1hWL4",Fu="l8QVy",Uu="pJQCE",Hu="_35R1C",zu="_9uLa0",Yu="_1w8la",qu="xQXew",$u="gj4N0",Wu="VImf6",Vu="_9CuNx",Gu="O8Seo",Ku="_01CKh",ju="KQs71",Qu="Ic4fS",Zu="IMQvT",Xu="_7hUKC",Ju="QZR8x",ie={ProductMapMarker:Bu,"ProductMapMarker-borderColorBase":"Kv2J9","ProductMapMarker-borderColorCustom":"Wv7wJ","ProductMapMarker-badgeToneBase":"WtS0D","ProductMapMarker-badgeToneAccent":"GgkBH",ProductMapMarkerCards:Fu,ProductMapMarkerPin:Uu,ProductMapMarkerPinBody:Hu,ProductMapMarkerPinGlyph:zu,ProductMapMarkerLabel:Yu,ProductMapMarkerLabelEnter:qu,ProductMapMarkerCard:$u,ProductMapMarkerCardEnter:Wu,ProductMapMarkerCardPrimary:Vu,ProductMapMarkerCardShadowReveal:Gu,ProductMapMarkerCheckmark:Ku,ProductMapMarkerCheckmarkEnter:ju,ProductMapMarkerCheckmarkSvg:Qu,ProductMapMarkerCheckmarkPath:Zu,ProductMapMarkerCheckmarkPathDraw:Xu,ProductMapMarkerCards2:Ju},Ba=5;function Fa({children:n,products:t}){const a=t.slice(0,Ba),{merchandiseThumbnail:{borderColor:r="base",badge:{background:o}={}}={}}=Gt(),i=!o||o==="base"?"base":"accent";return e("div",{className:B(ie.ProductMapMarker,ie[Gn("ProductMapMarker-borderColor",r)],ie[Gn("ProductMapMarker-badgeTone",i)]),children:[a.length>0?e("div",{"aria-hidden":"true",className:B(ie.ProductMapMarkerCards,a.length===2&&ie.ProductMapMarkerCards2),children:a.map((s,l)=>e("div",{className:B(ie.ProductMapMarkerCard,l===0&&ie.ProductMapMarkerCardPrimary),children:[e(_n,{src:s.src}),l===0&&e("span",{className:ie.ProductMapMarkerCheckmark,children:e("svg",{"aria-hidden":"true",className:ie.ProductMapMarkerCheckmarkSvg,focusable:"false",viewBox:"0 0 75 75",children:e("path",{className:ie.ProductMapMarkerCheckmarkPath,d:"M20 39 L32 50 L56 25",fill:"none",pathLength:"1"})})})]},s.key))}):e(ed,{}),e(R,{background:"base",borderRadius:"fullyRounded",boxShadow:"base",className:ie.ProductMapMarkerLabel,minBlockSize:"26px",overflow:"hidden",paddingBlock:"small-400",paddingInline:"small-200",children:e(U,{alignItems:"center",columnGap:"small-400",gridAutoFlow:"column",children:n})})]})}function ed(){return e("svg",{"aria-hidden":"true",className:ie.ProductMapMarkerPin,focusable:"false",width:"48",height:"57",viewBox:"0 0 48 57",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[e("path",{className:ie.ProductMapMarkerPinBody,d:"M7.02944 7.02944C16.402 -2.34315 31.598 -2.34315 40.9706 7.02944C50.3431 16.402 50.3431 31.598 40.9706 40.9706L26.1665 55.7747C24.97 56.9712 23.03 56.9712 21.8335 55.7747L7.02944 40.9706C-2.34315 31.598 -2.34315 16.402 7.02944 7.02944Z"}),e("path",{className:ie.ProductMapMarkerPinGlyph,clipRule:"evenodd",d:"M24 11.832C30.7191 11.8321 36.166 17.2794 36.1664 23.9985C36.1664 30.7179 30.7194 36.1648 24 36.1649C17.2806 36.1648 11.8335 30.7179 11.8335 23.9985C11.834 17.2795 17.2809 11.8321 24 11.832ZM29.7483 19.6037C29.2536 19.1915 28.5173 19.2586 28.1046 19.7526L22.6617 26.2832L19.8149 23.5063C19.3539 23.0565 18.6152 23.0655 18.1651 23.526C17.7154 23.9872 17.7253 24.7259 18.1864 25.1758L21.3173 28.2307C21.4104 28.3216 21.5315 28.4409 21.6469 28.536C21.7723 28.6393 21.9738 28.7869 22.2546 28.8672C22.61 28.9687 22.99 28.9485 23.3331 28.811C23.6038 28.7022 23.7903 28.5361 23.9043 28.4206C24.0094 28.314 24.1173 28.1817 24.2005 28.0818L29.8971 21.2474C30.3088 20.7526 30.2425 20.0161 29.7483 19.6037Z",fillRule:"evenodd"})]})}
1const nd="QiTzJ",td="BsmDF",At={MapFallback:nd,BackgroundImage:td};function ad({children:n,products:t,background:a="subdued"}){const r=ne(new Set),o=t.filter(({src:l})=>l&&!r.value.has(l)),i=a==="product"?o[0]?.src:void 0;function s(l){if(!(l.target instanceof HTMLImageElement))return;const c=l.target.getAttribute("src");c&&(r.value=new Set([...r.value,c]))}return e(R,{background:"subdued",className:At.MapFallback,inlineSize:"100%",onErrorCapture:s,overflow:"hidden",position:"relative",children:[i?e(Ye,{alt:"",className:At.BackgroundImage,inlineSize:"auto",objectFit:"cover",src:i}):null,e(Fa,{products:o,children:n})]})}function Ua({title:n,markerTitle:t,markerLabel:a,fallbackTitle:r=t,products:o,failedSources:i,...s}){const l=Nu(),c=l?i.value.has(l):i.value.size>0;function u(){i.value=new Set([...i.value,l])}const d=e(O,{children:[e(k,{color:"subdued",children:r}),e(Or,{children:e(k,{type:"strong",children:e("bdi",{children:a})})})]});return c?e(ad,{products:o??[],background:o?"product":"subdued",children:d}):l?e(Du,{src:l,title:n,overlayTitle:o?void 0:t,overlayLabel:o?void 0:a,overlay:o?e(Fa,{products:o,children:d}):void 0,onError:u},l):e(_i,{...s,title:n,onLoadFailure:u})}function Ha(){const{checkout:n,shop:t}=v(),{acceptEmailMarketing:a,buyerIdentity:r,contactInfo:o}=N();return S(()=>!r.value?.purchasingCompany&&o.value?.email!==void 0&&t.emailMarketing!=="OFF"&&!a.value&&n.latestReceipt.value?.status==="processed"&&n.latestReceipt.value.eligibleForMarketingOptIn)}const rd=/^(e_[0-9a-f]{32})_(.+?)(?:_osp)?$/;function od(n){if(!n)return{clientHandle:null,variant:null};let t;try{t=new URL(n).searchParams.get("utm_campaign")}catch{return{clientHandle:null,variant:null}}if(!t)return{clientHandle:null,variant:null};const a=rd.exec(t);return a?{clientHandle:a[1],variant:a[2]}:{clientHandle:null,variant:null}}function id(n){return od(n)}const sd="CGD68",ld="MPVYO",cd="_3MQvk",ud="_8PSDP",dd="fWnnD",pd="_1IOC2",hd="bDnw9",md="lK5x7",_d="c0CTL",yd="_4davv",gd="_38oLJ",fd="oXdcI",bd="hOZAu",vd="_2Vr9X",kd="ogNqn",Cd="aAfSd",Sd="kujmI",Td="q19KC",Id="_6rZN2",Pd="E1DyI",wd="gRzAZ",Ed="EHhRv",Md="KaI2p",Ad="taDzR",Rd="gvU7N",Ld="w7U7g",xd="Cl5Kz",Dd="Dh152",Od="TjYGl",Nd="EzlVD",Bd="JcEQU",Fd="HEqog",Ud="OaqG3",Hd="xHfD9",zd="Qhbfd",Yd="_1C9SL",qd="jvrs3",$d="ayiZt",Wd="JVpja",Vd="y2YPD",Gd="t0uAF",Kd="rLm9q",jd="PXe2R",Qd="_63ITw",z={Root:sd,VisualLabel:ld,Layer:cd,Phrase:ud,Token:dd,IntroToken:pd,ShopButtonAnimationCharOut:hd,FinalToken:md,ShopButtonAnimationCharIn:_d,IconSpacer:yd,ShopLogoSpacer:gd,Icon:fd,BellIcon:bd,ShopButtonAnimationBellRing:vd,ShopLogoToken:kd,ShopLogo:Cd,StaticLabel:Sd,StaticShopLogoWrapper:Td,AccessibleLabel:Id,Delay0:Pd,Delay1:wd,Delay2:Ed,Delay3:Md,Delay4:Ad,Delay5:Rd,Delay6:Ld,Delay7:xd,Delay8:Dd,Delay9:Od,Delay10:Nd,Delay11:Bd,Delay12:Fd,Delay13:Ud,Delay14:Hd,Delay15:zd,Delay16:Yd,Delay17:qd,Delay18:$d,Delay19:Wd,Delay20:Vd,Delay21:Gd,Delay22:Kd,Delay23:jd,Delay24:Qd};function Zd({icon:n,introText:t,finalPrefix:a,accessibleLabel:r,staticLabel:o}){const{i18n:i}=v(),{locale:s,localeDirection:l}=i,c=p=>l==="rtl"&&ir(p)?"rtl":"ltr",[u,d]=re(!1);F(()=>{d(!0)},[]);const m=za(a,s,u).length;return e("span",{className:z.Root,children:[e("span",{className:z.VisualLabel,"aria-hidden":"true",children:[e("span",{className:z.Layer,children:e("span",{className:z.Phrase,dir:c(t),children:[e("span",{className:B(z.Token,z.IntroToken,z.IconToken,z.Delay0),children:n}),e("span",{className:z.IconSpacer}),Rt({text:t,tokenClassName:z.IntroToken,locale:s,graphemesEnabled:u,delayOffset:1})]})}),e("span",{className:z.Layer,children:e("span",{className:z.Phrase,dir:c(a),children:[Rt({text:a,tokenClassName:z.FinalToken,locale:s,graphemesEnabled:u}),e("span",{className:z.ShopLogoSpacer}),e("span",{className:B(z.Token,z.FinalToken,z.ShopLogoToken,z[Ya(m)]),children:e(fn,{className:z.ShopLogo,"aria-hidden":"true"})})]})})]}),e("span",{className:z.StaticLabel,dir:c(r),"data-testid":"static-label","aria-hidden":"true",children:o}),e("span",{className:z.AccessibleLabel,children:r})]})}const Xd=/^(ar|fa|ur|he|iw|hi|th)\b/i;function za(n,t,a){const r=n.match(/\s+|\S+/gu)??[];
1if(!a||Xd.test(t)||typeof Intl.Segmenter!="function")return r;let i;try{i=new Intl.Segmenter(t,{granularity:"grapheme"})}catch{return r}return r.flatMap(s=>/^\s+$/u.test(s)?[s]:Array.from(i.segment(s),l=>l.segment))}function Rt({text:n,tokenClassName:t,locale:a,graphemesEnabled:r,delayOffset:o=0}){return za(n,a,r).map((i,s)=>{const l=s+o;return e("span",{className:B(z.Token,t,z[Ya(l)]),children:i.replaceAll(" "," ")},`${l}-${i}`)})}function Ya(n){return`Delay${Math.min(n,24)}`}function Jd(){return e(_,{direction:"inline",alignItems:"center",className:z.StaticShopLogoWrapper,children:e(fn,{className:z.ShopLogo,"aria-hidden":"true"})})}function ep(){return e("svg",{className:B(z.Icon,z.BellIcon),viewBox:"0 0 16 16","aria-hidden":"true",focusable:"false",children:e("path",{fill:"currentColor",d:"M8.00016 1.5C10.4655 1.50006 12.5234 3.3978 12.8439 5.90137L13.4718 10.8096C13.5286 11.2533 13.3853 11.6709 13.1173 11.9805L13.1203 12H13.1007C12.8276 12.305 12.4309 12.5 11.9836 12.5H10.8908C10.3479 13.6581 9.2848 14.4999 8.00016 14.5C6.71553 14.5 5.6524 13.6581 5.10953 12.5H4.01578C3.56841 12.4998 3.17155 12.3052 2.8986 12H2.88004L2.88199 11.9814C2.61413 11.6719 2.47168 11.2533 2.52848 10.8096L3.15641 5.90137C3.47688 3.3978 5.53483 1.50006 8.00016 1.5ZM6.25504 12.5C6.68857 13.1293 7.32689 13.5 8.00016 13.5C8.67344 13.5 9.31174 13.1293 9.74527 12.5H6.25504Z"})})}const np="mnuHb",tp="ZHLC1",ap="ggkpn",rp="jNjME",Ve={ShopOrderUpdates:np,"ShopOrderUpdates-redesign":"LOmaT",ManageOrderButton:tp,ShopLogoWrapper:ap,ShopLogo:rp},Lt={delivery:"delivery_order",pickup:"pickup_order"},op="/qr/u/download.svg";function ip(n){const t=new URL(n);return t.pathname=op,t.toString()}class sp extends Error{constructor(){super(...arguments),this.name="PickupInstallCampaignAssignmentError"}}function qa({className:n,variant:t="delivery"}={}){const{i18n:a,observability:r,shop:o}=v(),i=Oe(),s=j(),l=Ae(),c=id(l?.mobileUrl),u=a.translate("app_promotions.animated_shop_button.final_prefix"),d={icon:e(ep,{}),introText:a.translate("app_promotions.animated_shop_button.intro.value_props"),finalPrefix:u,accessibleLabel:`${u}Shop`,staticLabel:e(O,{children:[u,e(Jd,{})]})},{track:m}=Ce("order_updates"),p=Qo();F(()=>{l&&m("shop_button_rendered")},[l,m]);const h=t==="pickup"&&c.clientHandle!==null&&c.variant!==null;if(F(()=>{h&&r.error(new sp("Pickup order received an install campaign assignment"),{severity:"warning",metadata:{installCampaign:{clientHandle:c.clientHandle,variant:c.variant}}})},[h,c.clientHandle,c.variant,r]),!l)return null;const{mobileUrl:y,orderTrackingMobileUrl:g,qrCodeUrl:f,buyerHasOrderTrackingPush:b,orderTrackingPushCtaVariant:C}=l,T=t!=="pickup"&&b!==!0&&C==="treatment",I={shop:e("span",{className:Ve.ShopLogoWrapper,children:e(fn,{className:Ve.ShopLogo,"aria-label":"Shop"})})};let P,D;t==="pickup"?(P=a.translate("app_promotions.track_pickup_with_shop_logo",I),D={title:a.translate("thank_you.qr_code.pickup_title"),subtitle:a.translate("thank_you.qr_code.pickup_description")}):(b===!0?P=a.translate("app_promotions.order_updates_track_order_logo",I):T?P=a.translate("app_promotions.get_notified_with_shop_logo",I):P=e(Zd,{...d}),D=c.variant===cn.LegacyCopy?{title:a.translate("thank_you.qr_code.legacy_shipping_title"),subtitle:a.translate("thank_you.qr_code.legacy_shipping_description")}:{title:a.translate("thank_you.qr_code.shipping_title"),subtitle:a.translate("thank_you.qr_code.shipping_description")});const M=pn(T&&g?g:y,{utm_content:Lt[t]}),x=o.hasFlagEnabled(wo),V=pn(x?ip(f):f,{link_provider:"open.shop.app",utm_content:Lt[t],...x?{qr_secure_deferred:"true",qr_style:"rounded",qr_error_correction_level:"m",qr_branded_center:"true","qr_branded_center_options[padding]":"0.08"}:{}}),Y=e(Da,{label:P,message:D,mobileLinkToShop:M,desktopLinkToShop:V,styledQrCode:x,installCampaign:t==="pickup"?void 0:c,onClipboardInteraction:()=>{m("arrive")},onQrCodeInteraction:()=>{m("arrive_show_qr_code")}}),Z=i?s?.orderStatusPageUrl:void 0;return e("div",{className:B(Ve.ShopOrderUpdates,Z?void 0:p,n,{[Ve["ShopOrderUpdates-redesign"]]:i}),children:Z?e(U,{gridTemplateColumns:"@media (inline-size >= medium) 'repeat(2, minmax(0, 1fr))', 'minmax(0, 1fr)'",gap:"base",children:[e("div",{className:p,children:Y}),e(he,{className:Ve.ManageOrderButton,inlineSize:"fill",variant:"secondary",href:Z,children:a.translate("thank_you.manage_order_label")})]}):Y})}function $a(){const t=j()?.paymentDetails?.financialPendingReason;return{financialPendingReason:t,isBuyerActionRequired:t==="BUYER_ACTION_REQUIRED",isProviderActionRequired:["NETWORK_ACTION_REQUIRED","PARTNER_ACTION_REQUIRED","SLOW_COMPLETION_CONFIRMATION","SLOW_COMPLETION_PAYMENT"].includes(t??"")}}const zn=({isPickup:n}={isPickup:!1})=>{const{i18n:t}=v(),a=vn(),r=ye($a()),o=ye(n),i=t.translate("thank_you.thank_you_title_payments_app_pending_buyer_action_required"),s=t.translate("thank_you.thank_you_title_payments_app_pending_default");return S(()=>{const{confirmWithEmail:h,confirmWithPhone:y}=a.value,g=r.value;return{pendingOrderConfirmationTitle:l(g),pendingOrderConfirmationMessage:c({confirmWithEmail:h,confirmWithPhone:y,isPickup:o.value,financialPendingReason:g}),isOrderPendingStatus:!!g.financialPendingReason}});function l(h){return h.isBuyerActionRequired?i:s}function c({confirmWithEmail:h,confirmWithPhone:y,isPickup:g,financialPendingReason:f}){return f.isBuyerActionRequired?d({confirmWithEmail:h,confirmWithPhone:y,isPickup:g}):f.isProviderActionRequired?t.translate("thank_you.thank_you_payments_app_pending_payment_description_provider_action_required_default"):p({confirmWithEmail:h,confirmWithPhone:y,isPickup:g})}function u({confirmWithEmail:h,confirmWithPhone:y}){return h&&y?t.translate("thank_you.thank_you_payments_app_pending_payment_description_buyer_action_required_with_email_and_phone_pick_up"):h?t.translate("thank_you.thank_you_payments_app_pending_payment_description_buyer_action_required_with_email_pick_up"):y?t.translate("thank_you.thank_you_payments_app_pending_payment_description_buyer_action_required_with_phone_pick_up"):t.translate("thank_you.thank_you_payments_app_pending_payment_description_buyer_action_required_with_missing_pick_up")}function d({confirmWithEmail:h,confirmWithPhone:y,isPickup:g}){return g?u({confirmWithEmail:h,confirmWithPhone:y}):h&&y?t.translate("thank_you.thank_you_payments_app_pending_payment_description_buyer_action_required_with_email_and_phone"):h?t.translate("thank_you.thank_you_payments_app_pending_payment_description_buyer_action_required_with_email"):y?t.translate("thank_you.thank_you_payments_app_pending_payment_description_buyer_action_required_with_phone"):t.translate("thank_you.thank_you_payments_app_pending_payment_description_buyer_action_required_with_missing")}function m({confirmWithEmail:h,confirmWithPhone:y}){return h&&y?t.translate("thank_you.thank_you_payments_app_pending_payment_description_default_with_email_and_phone_pick_up"):h?t.translate("thank_you.thank_you_payments_app_pending_payment_description_default_with_email_pick_up"):y?t.translate("thank_you.thank_you_payments_app_pending_payment_description_default_with_phone_pick_up"):t.translate("thank_you.thank_you_payments_app_pending_payment_description_default_with_missing_pick_up")}function p({confirmWithEmail:h,confirmWithPhone:y,isPickup:g}){return g?m({confirmWithEmail:h,confirmWithPhone:y}):h&&y?t.translate("thank_you.thank_you_payments_app_pending_payment_description_default_with_email_and_phone"):h?t.translate("thank_you.thank_you_payments_app_pending_payment_description_default_with_email"):y?t.translate("thank_you.thank_you_payments_app_pending_payment_description_default_with_phone"):t.translate("thank_you.thank_you_payments_app_pending_payment_description_default_with_missing")}};function Wa(n,{legacyRepresentProductsAsFees:t=!1,remoteMerchandiseDetails:a}={}){return(n?.length?n.map(o=>({giftCard:o.giftCard,key:o.stableId,legacyFee:o.legacyFee,quantity:o.quantity,requiresShipping:o.requiresShipping,src:o.image?.two}
1)):cp(a)).filter(({quantity:o,legacyFee:i})=>o>0&&!(t&&i)).map(({giftCard:o,key:i,requiresShipping:s,src:l})=>({giftCard:o,key:i,requiresShipping:s,src:l}))}function lp(n,{legacyRepresentProductsAsFees:t=!1,remoteMerchandiseDetails:a}={}){const r=Wa(n,{legacyRepresentProductsAsFees:t,remoteMerchandiseDetails:a}),o=[];for(const i of r)if(!(!i.requiresShipping||i.giftCard||!i.src)&&(o.push({key:i.key,src:i.src}),o.length===Ba))break;return o}function cp(n){const t=n?.mergedBuyerProposalMerchandise;return t?.__typename!=="PurchaseOrderMerchandiseTerms"?[]:t.merchandiseLines.map(a=>({giftCard:a.merchandise.giftCard,key:a.stableId,legacyFee:"legacyFee"in a&&a.legacyFee===!0,quantity:a.quantity.items,requiresShipping:a.merchandise.requiresShipping,src:a.merchandise.image?.two}))}const up={id:"766f1a73f6f5729d8de999514e11f6d1a0015979328b3a23a3ffe084b071b5ed",type:"mutation",name:"EmailMarketingOptIn",source:""};function dp({optInState:n}){const{i18n:t}=v();let a,r;return n.value==="loading"?(a=e(Nr,{size:"small"}),r=t.translate("marketing.accept_marketing_checkbox_label")):n.value==="opt_in_pending"?(a=e(oe,{type:"email",size:"small"}),r=t.translate("marketing.pending_accept_marketing_checkbox_label")):(a=e(oe,{type:"check",size:"small"}),r=t.translate("marketing.post_accept_marketing_checkbox_label")),e(_,{direction:"inline",gap:"base",alignItems:"center",children:[a,r]})}function Va({colorLayer:n}){const{track:t}=Hn(),{client:a,i18n:r,observability:o,userEvents:i,shop:{id:s,myshopifyDomain:l},source:c,checkout:u,graphql:{coreGraphql:d}}=v(),m=ne("not_opted_in"),p=gn(),h=N().buyerIdentity.value?.customerProfile,y=j(),g=a.unstable_getSerialization("sessionToken"),f=c.type==="simulated",b=u.configuration.layout.isOnePage.value;F(()=>{t("thank_you_page_email_consent_page_view/4.0",{page:"thank_you",customerId:h?.id?Number(je(h.id)):void 0,orderId:ia(y?.orderIdentity.id),sessionToken:p?.value?.defaultAttributes?.visitToken,uniqueToken:p?.value?.defaultAttributes?.uniqToken})},[h?.id,y,t,p?.value?.defaultAttributes?.uniqToken,p?.value?.defaultAttributes?.visitToken]);async function C(T){if(f){m.value="opted_in";return}if(!T)return;const I=Number(je(s));i.monorailEvent({schemaId:"checkout_email_marketing_optin_ui_interaction/1.0",payload:{checkoutToken:c.checkoutSessionIdentifier||c.sourceId,shopId:Number.isNaN(I)?0:I,shopifyDomain:l,action:"click_email_opt_in",origin:"thank_you_page",checkoutVersion:b?"checkout_one_redesign":"checkout_one"}}),m.value="loading";const{data:P,error:D}=await d.mutate(up,{variables:{orderId:y.orderIdentity.id,sessionInput:{sessionToken:g}}});if(D){m.value="not_opted_in",D instanceof sr||o.error(D);return}const M=P?.subscribeToMarketing.__typename;M==="MarketingOptInFailure"&&P?.subscribeToMarketing.code!=="ALREADY_SUBSCRIBED"?m.value="not_opted_in":M==="MarketingOptInFailure"&&P?.subscribeToMarketing.code==="ALREADY_SUBSCRIBED"?m.value="opted_in":M==="MarketingOptInSuccess"&&(m.value=P?.subscribeToMarketing.pending?"opt_in_pending":"opted_in")}return e(R,{borderWidth:"base none none none",background:"subdued",padding:"base",colorLayer:n,children:e(E,{when:()=>m.value==="not_opted_in",fallback:e(dp,{optInState:m}),children:e(da,{id:"marketing_opt_in",name:"marketing_opt_in",onChange:C,label:r.translate("marketing.accept_marketing_checkbox_label")})})})}function Ga({children:n}){return typeof n!="string"?null:e(O,{children:n.split(`
2`).filter(Boolean).map(t=>e(w,{children:t},t))})}const pp=({deliveryInformation:n,paymentInstructions:t,color:a,textAlign:r})=>{const{i18n:o}=v(),{confirmWithEmail:i,confirmWithPhone:s}=vn().value,{isOrderPendingStatus:l,pendingOrderConfirmationMessage:c}=zn().value,u=yn().value,d=Un(),m=Ae()?.buyerHasOrderTrackingPush,p=()=>{if(l)return c;if(i&&s)return u?o.translate("thank_you.thank_you_confirmed_with_email_and_phone_description.multi_store"):o.translate("thank_you.thank_you_confirmed_with_email_and_phone_description.single_store");if(i)return u?o.translate("thank_you.thank_you_confirmed_with_email_description.multi_store"):d&&m===!0?o.translate("thank_you.thank_you_confirmed_with_
2shop_updates_description"):o.translate("thank_you.thank_you_confirmed_with_email_description.single_store");if(s)return u?o.translate("thank_you.thank_you_confirmed_with_phone_description.multi_store"):o.translate("thank_you.thank_you_confirmed_with_phone_description.single_store")},h=()=>p()||o.translate("thank_you.thank_you_confirmed_order_with_missing"),y=()=>n?e(O,{children:[e(k,{type:"strong",children:o.translate("thank_you.delivery_information_label")})," ",e(Me,{children:n})]}):null,g=t&&t.length>0;return e(_,{gap:"small-300",children:[g?null:e(w,{color:a,textAlign:r,children:h()}),n?e(w,{color:a,textAlign:r,children:y()}):null,g?e(_,{gap:"base",children:t.map(f=>e(Ga,{children:f},f))}):null]})};function hp({children:n,shippingAddress:t,deliveryInformation:a,deliveryMethodType:r,paymentInstructions:o,isBuyWithPrime:i,legacyRepresentProductsAsFees:s,merchandiseLines:l,remoteMerchandiseDetails:c}){const{shop:u,i18n:d,checkout:m}=v(),p=Na(),h=u.hasFlagEnabled(se),y=Oe(),{track:g}=Ce("map"),f=Fn(),b=qe().value,{pendingOrderConfirmationTitle:C,isOrderPendingStatus:T}=zn().value,I=Ha(),P=yn().value,D=Un()&&!P,M=T?C:P?d.translate("thank_you.confirmed_orders_title"):d.translate("thank_you.thank_you_title"),x=jt(t,{countryFormat:"explicit",hiddenFields:["address1","address2","company","firstName","lastName","phone","postalCode","countryCode"]}),V=y&&u.hasFlagEnabled(Eo)&&r==="SHIPPING",Y=j(),Z=Y?.completedRemoteCheckouts?.some(me=>me.status==="submitted"&&(me.remotePurchaseOrder.deliveryLines?.length??0)>1)??!1,X=Y?.isRedacted??!1,A=S(()=>!X&&I.value),te=ne(new Set),J=Y?.mapVisibility==="VISIBLE",G=ue(()=>J&&t?.coordinates&&x?{label:x,position:{lat:t.coordinates.latitude,lng:t.coordinates.longitude}}:null,[t,x,J]),ge=ue(()=>V?lp(l,{legacyRepresentProductsAsFees:s,remoteMerchandiseDetails:c}):[],[V,s,l,c]),le=!b&&!P&&!Z,Se=V&&le,Te=Wa(l,{legacyRepresentProductsAsFees:s,remoteMerchandiseDetails:c}),fe=y&&le&&!X&&!m.isShippingRequired.value&&Te.length>0&&Te.every(({requiresShipping:me})=>!me),Re=ue(()=>G?[{type:"destination",title:d.translate("thank_you.marker.shipping"),headerDisabled:!0,...G}]:[],[G,d]);let ee=null;if(G&&!fe){const me=d.translate("thank_you.marker.shipping"),Ue=`${d.translate("thank_you.shipping_address_map_title",{address:G.label})}`;ee=e(Ua,{failedSources:te,title:Ue,markerTitle:me,markerLabel:G.label,fallbackTitle:d.translate("shipping.shipping_address_title"),products:Se?ge:void 0,options:{mapOptions:{center:G.position,styles:f?ya:[]}},markers:Re,handleClick:()=>g("click"),handleDoubleClick:()=>g("dblclick"),handleDragEnd:()=>g("dragend"),handleZoomChanged:()=>g("zoom_changed")})}const Ne=ee===null?"none":"base",Ie=ee&&p?e(R,{ref:p,children:ee}):ee,de=e(O,{children:[e(L,{textAlign:y?"center":void 0,children:M}),e(pp,{color:y?"subdued":void 0,deliveryInformation:a,paymentInstructions:o,textAlign:y?"center":void 0})]}),Be=D?e(qa,{variant:"delivery"}):null,Fe=e(O,{children:[e(_,{gap:"base",borderWidth:y?void 0:`${Ne} none none none`,padding:"base",children:[y?e(_,{gap:"small-300",children:de}):de,Be]}),i&&!b&&e(_,{gap:"base",borderWidth:y?void 0:`${Ne} none none none`,padding:"base",children:e(Si,{})}),e(E,{when:A,children:e(Va,{colorLayer:h?void 0:"control"})})]});return y?e(O,{children:[Ie?e(H,{accessibilityRole:"presentation",colorLayer:h?void 0:"control",overflow:"hidden",className:Ee.ThankYouEntranceStatus,children:Ie}):null,e(Au,{active:fe,colorLayer:h?void 0:"control",products:Te.flatMap(({key:me,src:Ue})=>Ue?[{key:me,src:Ue}]:[]),children:n}),e(H,{accessibilityLabel:M,colorLayer:h?void 0:"control",overflow:"hidden",children:Fe})]}):e(H,{accessibilityLabel:M,colorLayer:h?void 0:"control",overflow:"hidden",className:Ee.ThankYouEntranceStatus,children:[Ie,Fe]})}const Ka=Bt(null);var mp={ProgressTracker:"_1ojciyd1 _1ojciyd0 _1fragemqt _1fragemsm _1fragemp0 _1fragemuf _1fragem11h _1fragemzk"};function _p({activeStep:n,children:t}){const a=lr.toArray(t).map(i=>cr(i)?i.props.id:void 0),r=a.join("|"),o=ue(()=>({steps:a.reduce((i,s,l)=>(i[s]={active:n?n===s:l===0,completed:a.indexOf(n)>a.indexOf(s)},i),{})}),[n,r]);return e(Ka.Provider,{value:o,children:e("ol",{className:mp.ProgressTracker,role:"list",children:t})})}function yp(){const n=Ft(Ka);if(n===null)throw new Mo("<Step />  must be used inside of an <ProgressTracker />");return n}var we={Step:"_4xihkw1 _4xihkw0 _1fragem64",Icon:"_4xihkw4",Label:"_4xihkw5",Connector:"_4xihkw6",completed:"_4xihkw2",active:"_4xihkw3"};function gp({children:n,description:t,icon:a,iconTone:r,id:o,label:i,state:s,stateHidden:l=!0}){const{steps:c}=yp(),u=Object.keys(c).indexOf(o)===0,{[o]:{active:d,completed:m}}=c,p=B(we.Step,m&&we.completed);return e(O,{children:[!u&&e(vp,{active:d,completed:m}),e("li",{className:p,"aria-current":d,children:[e(fp,{active:d,completed:m,type:a,tone:r}),e(bp,{active:d,completed:m,description:t,label:i,state:s,stateHidden:l}),n]})]})}function fp({active:n,tone:t="accent",type:a,completed:r}){const o=B(we.Icon,n&&we.active,r&&we.completed);return e("div",{className:o,children:e(oe,{type:a,tone:n||r?t:void 0})})}function bp({active:n,completed:t,description:a,label:r,state:o,stateHidden:i}){const s=B(we.Label,(n||t)&&we.completed);return e(O,{children:[e("div",{className:s,children:[i?e(k,{accessibilityVisibility:"exclusive",children:o}):e(w,{children:o}),e(w,{children:e(k,{type:n||t?"strong":"generic",children:r})})]}),(n||t)&&a&&e(w,{type:"small",color:"subdued",children:a})]})}function vp({active:n,completed:t}){const a=B(we.Connector,(n||t)&&we.completed);return e("li",{className:a,"aria-hidden":!0})}function kp({activeStep:n="inReview"}){const{i18n:t,shop:a}=v(),r=a.hasFlagEnabled(se),o=t.formatDate(new Date,{month:"long",day:"2-digit",timeZone:a.timeZone}),i=[{id:"submitted",date:o,label:t.translate("thank_you.breadcrumbs_submitted"),state:t.translate("thank_you.breadcrumbs_submitted"),icon:"arrow-right"},{id:"inReview",date:o,label:t.translate("thank_you.breadcrumbs_in_review"),state:t.translate("thank_you.breadcrumbs_in_review"),icon:"note"},{id:"confirmed",label:t.translate("thank_you.breadcrumbs_confirmed"),state:t.translate("thank_you.breadcrumbs_confirmed"),icon:"check"}];return e(H,{colorLayer:r?void 0:"control",children:[e(_,{gap:"base",padding:"base",children:e(_p,{activeStep:n,children:i.map(s=>e(gp,{description:s.date,icon:s.icon,id:s.id,label:s.label,state:s.state},s.id))})}),e(Ze,{}),e(_,{gap:"base",padding:"base",children:[e(L,{children:t.translate("thank_you.thank_you_title_review")}),e(w,{children:t.translate("thank_you.thank_you_confirmed_order_with_draft")})]})]})}function Cp({children:n,paymentInstructions:t}){const{value:a}=Qe(),{shop:r,i18n:o}=v(),i=Na(),s=r.hasFlagEnabled(se),l=Oe(),c=N().deliveryNext,u=Ao(c.value,"ONE_TIME_PURCHASE",!0),d=u?.status==="available"?u.methods.find(ee=>ee.methodType==="PICK_UP")?.pickupLocation:void 0,{confirmWithEmail:m,confirmWithPhone:p}=vn().value,{isOrderPendingStatus:h,pendingOrderConfirmationTitle:y,pendingOrderConfirmationMessage:g}=zn({isPickup:!0}).value,f=Fn(),{track:b}=Ce("map"),C=j(),T=ne(new Set),I=yn().value,P=Un()&&!I,D=jt(d?.address,{hiddenFields:["address1","address2","company","firstName","lastName","phone","postalCode","countryCode"]}),M=Te(),x=C?.isRedacted??!1,V=Ha(),Y=S(()=>!x&&V.value),Z=o.translate("thank_you.pick_up_in_store_marker.shipping"),X=d?.name||D,A=d?.address?.coordinates,te=l?C?.mapVisibility==="VISIBLE"&&A?.accuracy==="PRECISE":!r.hasFlagEnabled(Ro)&&!!A;let J=null;if(te&&A){const ee=`${o.translate("thank_you.shipping_address_map_title",{address:X??D})}`;J=e(Ua,{failedSources:T,title:ee,markerTitle:Z,markerLabel:X,options:{mapOptions:{styles:f?ya:[]}},markers:Re(),handleDragEnd:()=>b("dragend")})}const G=J?e(R,{borderWidth:l?void 0:"none none base none",ref:i,children:J}):null,ge=e(O,{children:[e(L,{textAlign:l?"center":void 0,children:M}),e(w,{color:l?"subdued":void 0,textAlign:l?"center":void 0,children:fe()})]}),le=P?e(qa,{variant:a?"delivery":"pickup"}):null,Se=e(O,{children:[e(_,{gap:"base",padding:"base",children:[l?e(_,{gap:"small-300",children:ge}):ge,t&&t.length>0&&e(_,{gap:"base",children:[e(Ze,{direction:"inline"}),t.map(ee=>e(Ga,{children:ee},ee))]}),le]}),e(E,{when:Y,children:e(Va,{colorLayer:s?void 0:"control"})})]});if(!l)return e(H,{accessibilityLabel:M,colorLayer:s?void 0:"control",className:Ee.ThankYouEntranceStatus,children:[G,Se]});return e(O,{children:[J?e(H,{accessibilityRole:"presentation",colorLayer:s?void 0:"control",overflow:"hidden",className:Ee.ThankYouEntranceStatus,children:G}):null,n,e(H,{accessibilityLabel:M,colorLayer:s?void 0:"control",overflow:"hidden",children:Se})]});function Te(){return h?y:o.translate("thank_you.thank_you_title")}function fe(){return h?g:a?m&&p?o.translate("thank_you.thank_you_confirmed_with_email_and_phone_description.single_store"):m?o.translate("thank_you.thank_you_confirmed_with_email_description.single_store"):p?o.translate("thank_you.thank_you_confirmed_with_phone_description.single_store"):o.translate("thank_you.thank_you_confirmed_order_with_missing"):m&&p?o.translate("thank_you.thank_you_confirmed_order_with_email_and_phone_pick_up"):m?o.translate("thank_you.thank_you_confirmed_order_with_email_pick_up"):p?o.translate("thank_you.thank_you_confirmed_order_with_phone_pick_up"):o.translate("thank_you.thank_you_confirmed_order_with_missing")}function Re(){const ee=d?.address?.coordinates;return ee?[{type:"destination",title:Z,position:{lat:ee.latitude,lng:ee.longitude},label:X,headerDisabled:!0}]:[]}}function Sp({children:n}){const t=N(),{value:a}=t.paymentLines,{value:r}=t.shippingAddress,{value:o}=oa("ONE_TIME_PURCHASE"),{value:i}=t.customAttributes,{value:s}=t.legacyRepresentProductsAsFees,{value:l}=t.remoteMerchandiseDetails,c=Bn(o),u=Nn(),{value:d}=Qe();if(xe()?.some(y=>y.status==="failed"))return null;if(u.value)return e(O,{children:[n,e(kp,{})]});const p=a?.lines.map(({method:y,specialInstructions:g})=>y.type==="paymentOnDelivery"||y.type==="customManualPayment"||y.type==="manualPayment"?g??y.paymentInstructions:null).filter(
2Boolean),h=c?.methodType==="LOCAL"?c.description:void 0;return d||c?.methodType==="PICK_UP"?e(Cp,{paymentInstructions:p,children:n}):e(hp,{shippingAddress:r,legacyRepresentProductsAsFees:s,merchandiseLines:t.merchandiseLines.value?.lines,remoteMerchandiseDetails:l,paymentInstructions:p,deliveryInformation:h,deliveryMethodType:c?.methodType,isBuyWithPrime:Tu(i??[]),children:n})}function Tp(){const n=Nn(),{financialPendingReason:t}=$a(),a=xe()?.some(r=>r.status==="failed");return!n.value&&!t&&!a}const Ip=3e3,Pp=2e3,wp="(max-width: 749px)";function Ep(){const{checkout:n,client:t,router:a}=v(),r=$t(),o=Mn(),i=Tp(),s=yn().value,l=Kt(),c=i&&!s,u=a.currentUrl.value.normalizedPath,d=wi(t.initialRequest.url.pathname).endsWith(u),m=$(r&&c&&!o&&!d).current,p=ne(m?"waiting-for-hydration":"complete"),h=p.value,y=ne("centered"),g=n.thankYouEntrance,f=g.isRevealing.value,b=ne(null),C=$(null),T=$(null),{lock:I,unlock:P}=Br(),D=l||!c,M=W(()=>{Kn(()=>{p.value="complete",g.skip()})},[g,p]),x=W(()=>{Kn(()=>{g.settle(),M()})},[g,M]),V=W(()=>{p.value==="running"&&g.reveal()},[g,p]);F(()=>{if(!m){g.skip();return}if(D){x();return}p.value==="waiting-for-hydration"&&(p.value="running")},[g,x,m,D,p]),F(()=>{if(!m||h!=="running")return;const A=window.setTimeout(x,Ip);return()=>window.clearTimeout(A)},[h,x,m]),F(()=>{if(!f)return;const A=window.setTimeout(x,Pp);return()=>{window.clearTimeout(A),x()}},[f,x]),F(()=>{if(!(!m||h!=="running"))return window.scrollTo(0,0),I(),P},[h,I,m,P]);const Y=W(()=>{const A=C.current,te=T.current;if(!A||!te)return;const J=A.getBoundingClientRect(),G=te.getBoundingClientRect();b.value={x:J.left+J.width/2-(G.left+G.width/2),y:J.top+J.height/2-(G.top+G.height/2)}},[b]),Z=W(A=>{C.current=A,p.value==="waiting-for-hydration"&&(y.value=A&&window.matchMedia(wp).matches?"traveling":"centered"),Y()},[Y,y,p]),X=W(A=>{T.current=A,Y()},[Y]);return{isContentHidden:g.phase.value==="pending"&&m,isEntranceRevealing:f,mode:y.value,morphOffset:b.value,onDrawn:Y,onEntranceSettled:x,onRevealed:V,onSettled:M,registerMapTarget:Z,registerMark:X,shouldAnimate:m,status:p.value}}const Mp="_1BgJP",Ap="coXlQ",Rp="Ea8kH",Lp="HDNQw",xp="JnQXy",Dp="BoaBN",Op="_98hLo",pe={ThankYouInterstitial:Mp,"ThankYouInterstitial-running":"In8pu",ThankYouInterstitialBackdrop:Ap,"ThankYouInterstitial-scrollContained":"_8DY5a",ThankYouInterstitialGraphic:Rp,ThankYouInterstitialDisc:Lp,ThankYouInterstitialStroke:xp,ThankYouInterstitialCircle:Dp,ThankYouInterstitialCheckmark:Op,"ThankYouInterstitialGraphic-running":"NiSUe","ThankYouInterstitial-traveling":"t5tTv"},hn=56,xt=hn/2,Np=26.5,Bp=75,Fp=hn/Bp,Up="M 6 40.1 C 7.1 34.6 11.5 31.9 16.5 33 C 19.2 33.6 21.8 36.5 24.1 38.8 L 34.8 49.6 L 52.2 26.8";function Hp({appearance:n,centerOnScreen:t=!1,confirmation:a,mode:r,morphOffset:o,onDrawn:i,onRevealed:s,onSettled:l,registerMark:c,status:u}){const d=o??{x:0,y:0},m=zp(t),p=u==="running",h=r==="traveling",y=f=>{f.target===f.currentTarget&&l()},g=f=>{f.target===f.currentTarget&&i()};return e("div",{ref:m,className:B(pe.ThankYouInterstitial,{[pe["ThankYouInterstitial-running"]]:p,[pe["ThankYouInterstitial-traveling"]]:h}),role:"status","aria-label":a,children:[e(k,{accessibilityVisibility:"exclusive",children:a}),e("div",{className:pe.ThankYouInterstitialBackdrop,"aria-hidden":"true",onAnimationStart:p?s:void 0,onAnimationEnd:p&&h?l:void 0}),e("div",{className:B(pe.ThankYouInterstitialGraphic,{[pe["ThankYouInterstitialGraphic-running"]]:p}),ref:c,onAnimationEnd:p&&!h?y:void 0,style:{"--morph-x":`${d.x}px`,"--morph-y":`${d.y}px`,"--thank-you-interstitial-disc-color":n==="shopPay"?bn.toRgb():void 0,"--thank-you-interstitial-stroke-color":n==="shopPay"?fi.Grayscale.White.toRgb():void 0},"aria-hidden":"true",children:e("div",{className:pe.ThankYouInterstitialDisc,children:e("svg",{className:pe.ThankYouInterstitialStroke,viewBox:`0 0 ${hn} ${hn}`,focusable:"false","aria-hidden":"true",onAnimationStart:p&&h?g:void 0,children:[e("circle",{className:pe.ThankYouInterstitialCircle,cx:xt,cy:xt,r:Np,pathLength:"1"}),e("g",{transform:`scale(${Fp})`,children:e("path",{className:pe.ThankYouInterstitialCheckmark,d:Up})})]})})})]})}function zp(n){const t=$(null);return F(()=>{const a=t.current;if(!n||!a||typeof IntersectionObserver>"u")return;const r=[document.documentElement,document.body];for(const i of r)i.classList.add(pe["ThankYouInterstitial-scrollContained"]);const o=new IntersectionObserver(([i])=>{if(!i?.isIntersecting)return;const s=i.boundingClientRect.bottom-i.intersectionRect.bottom;a.style.setProperty("--offscreen-block-end",`${s}px`)},{threshold:Array.from({length:101},(i,s)=>s/100)});return o.observe(a),()=>{o.disconnect();for(const i of r)i.classList.remove(pe["ThankYouInterstitial-scrollContained"])}},[n]),t}const Yp={"ThankYouContent-hidden":"_3UsL1"};function qp({children:n}){const{i18n:t,checkout:a}=v(),r=Ep(),o=$p(j());if(!r.shouldAnimate)return e(O,{children:n});const i=r.status==="complete"?null:e(Hp,{appearance:o,centerOnScreen:a.configuration.isUniversalCheckoutFinalizer,confirmation:`${t.translate("thank_you.thank_you_title")}`,mode:r.mode,morphOffset:r.morphOffset,onDrawn:r.onDrawn,onRevealed:r.onRevealed,onSettled:r.onSettled,registerMark:r.registerMark,status:r.status});return e(Oa.Provider,{value:r.registerMapTarget,children:[r.status==="running"?e(Fr,{children:e("div",{children:i})}):i,e(R,{className:B({[Yp["ThankYouContent-hidden"]]:r.isContentHidden,[Ee.ThankYouEntrance]:r.isEntranceRevealing}),inert:r.isContentHidden,children:n}),r.isEntranceRevealing?e("span",{className:Ee.ThankYouEntranceBeat,"aria-hidden":"true",onAnimationEnd:r.onEntranceSettled}):null]})}function $p(n){return n?.shopAppLinksAndResources.shopPayOrder?"shopPay":"merchant"}const Wp=xn("ThankYouOrderSummaryContent");function Vp(){const{checkout:n,i18n:t,source:a}=v(),{value:r}=N().merchandiseLines,{open:o,setOpen:i}=Ur(),s=Ln(void 0,Wp),l=`${s}-heading`,c=t.translate("order_summary.title"),u=ve("Checkout::ThankYou::Dynamic::Render","ORDER_SUMMARY1"),d=ve("Checkout::ThankYou::CartLineDetails::RenderAfter"),m=ve("Checkout::ThankYou::CartLines::RenderAfter"),p=ve("Checkout::ThankYou::Dynamic::Render","ORDER_SUMMARY2"),h=ve("Checkout::ThankYou::Dynamic::Render","ORDER_SUMMARY3"),y=Pi([...u,...d,...m,...p,...h]);ur(()=>{i(y.value)});const g=n.proposal.facts.merchandiseLines??[],f=Qn(a)?g:r?.lines||[],{totalLineQuantities:b=0,totalLineQuantitiesFact:C=0}=Vt(),T=t.translate("order_summary.number_items",{count:Qn(a)?C:b}),I=o.value,P=()=>{i(!o.peek())},D=n.configuration.visibility.showAside;return e(R,{display:D?"@media (inline-size >= medium) none, auto":"auto",children:e(H,{accessibilityLabelledBy:l,colorLayer:"control",padding:"base",children:[e(L,{id:l,level:2,visibility:"hidden",children:c}),e(Hr,{section:"top_summary",children:e(zr,{section:"top_summary",children:e(Ei,{children:[e(Yr,{"aria-controls":s,"aria-expanded":I,"data-event-name":I?"order_summary_hide":"order_summary_show",inlineSize:"100%",onClick:P,children:e(U,{alignItems:"center",gap:"small-200",gridTemplateColumns:"minmax(0, 1fr) minmax(auto, max-content) minmax(auto, max-content)",children:[I?e(k,{size:"large",type:"strong",children:c}):e(k,{children:[e("span",{className:Zt({screenReaders:"only"}),children:c})," ",T]}),!I&&e(_,{direction:"inline",alignItems:"center",gap:"small-200",children:[e(qr,{variant:"fan-legacy",size:"small",merchandise:f,useImageAltTexts:!1,sortByPrice:!0}),e($r,{})]}),e(oe,{type:I?"chevron-up":"chevron-down",size:"small-200"})]})}),I?e("div",{id:s,children:e(R,{paddingBlockStart:"large-200",children:e(Wr,{skipWrappingSection:!0,hideAccessibilityTitle:!0})})},"thank-you-order-summary-open"):e("div",{id:s},"thank-you-order-summary-closed")]})})})]})})}const Dt={},Gp=(n,t)=>{const a=Q.screenLeft===void 0?Q.screenX:Q.screenLeft,r=Q.screenTop===void 0?Q.screenY:Q.screenTop;let o;Q.innerWidth?o=Q.innerWidth:Ge.documentElement.clientWidth?o=Ge.documentElement.clientWidth:o=screen.width;let i;Q.innerHeight?i=Q.innerHeight:Ge.documentElement.clientHeight?i=Ge.documentElement.clientHeight:i=screen.height;
2const s=Math.max(1,o/Q.screen.availWidth),l=(o-n)/2/s+a,c=(i-t)/2/s+r;return{height:t/s,left:l,top:c,width:n/s}},Kp=n=>{n?.close()},jp=(n,t,a="SignInWithShop")=>{const r=Gp(365,554);Dt[a]?.();const o=Q.open(n,"SignInWithShop",`popup,width=${r.width},height=${r.height},top=${r.top},left=${r.left}`),i=c=>{si({allowedOrigins:[li,ci,ui,Q.location.origin],event:c,source:o})&&t(c)},s=()=>Kp(o);t(new MessageEvent("message",{data:{type:"windoidopened"}}));const l=setInterval(()=>{o?.closed&&(t(new MessageEvent("message",{data:{type:"windoidclosed"}})),clearInterval(l))},200);return["beforeunload","unload","pagehide"].forEach(c=>{Q.addEventListener(c,s,{once:!0})}),Q.addEventListener("message",i),Dt[a]=()=>{["beforeunload","unload","pagehide"].forEach(c=>{Q.removeEventListener(c,s)}),Q.removeEventListener("message",i),clearInterval(l)},o};let In=null;function Qp(){return In||(In=Mi()),In}const Zp=(n,t)=>{const a=di({...n,analyticsTraceId:Qp(),uxMode:"windoid"});if(!a){console.warn?.("Failed to build authorize URL due to incorrect parameters",n);return}let r=null;r=jp(a,i=>{switch(i.data.type){case"completed":t.onComplete?.(i.data),r?.close();break;case"error":t.onError?.(i.data),r?.close();break;case"windoidopened":t.onWindoidOpen?.();break}})},Xp={"aria-label":"Shop",style:{fill:bn.toRgb(),width:44,height:17}},Jp=({loading:n,onSignInCompleted:t,fetchAttempts:a=1})=>{const{i18n:r,shop:o}=v(),i=qe().value,s=r.translate("thank_you.verify_shop_account_title"),{track:l}=Ce("pay_escrow"),{value:c}=N().contactInfo,u=!i,d=o.hasFlagEnabled(se);F(()=>{if(n&&a>=1){l("verify_button_blurred_rendered");return}l("verify_button_rendered")},[n,l,a]);const m=()=>{l("verify_button_clicked"),Zp({loginHint:c?.email??"",codeChallenge:"test-code-challenge",codeChallengeMethod:"S256",flow:"thank_you_page_escrow",prompt:"login",proxy:!0,responseType:"code"},{onComplete:t})};return e(Le,{target:u?"card":"plain",children:e(H,{accessibilityLabel:s,colorLayer:u&&!d?"control":void 0,children:n?e(_,{padding:u?void 0:"base none",gap:"base",children:[e(De,{blockSize:"22px",inlineSize:"120px"}),e(De,{blockSize:"16px",inlineSize:"100%"}),e(De,{blockSize:"16px",inlineSize:"100%"})]}):e(_,{padding:u?void 0:"base none",gap:"large-200",children:[e(U,{gridAutoFlow:"column",gridTemplateColumns:"minmax(auto, max-content) minmax(0, 1fr)",gridTemplateRows:"minmax(0, 1fr)",justifyContent:"end",justifyItems:"end",alignItems:"center",alignContent:"center",children:[e(L,{level:2,children:s}),e(fn,{...Xp})]}),e(w,{color:"subdued",children:r.translate("thank_you.verify_shop_account_message")}),e(he,{id:"verify-account-button",variant:"secondary",onClick:m,children:r.translate("thank_you.verify_shop_account_cta")})]})})})};function eh({showVerifyShopAccountButton:n}){const t=fa(),a=Ae(),r=gn(),{track:o}=Hn(),i=ba();return{track:()=>{if(!t||!a)return;const{buyerHasShopApp:l,buyerHasShopPay:c,shopPayOrder:u,orderUpdateOptions:d}=a,m=d.filter(p=>p!=="arrive").join(",");o("order_status_page_view/4.2",{page:"thank_you",orderId:t,isShopPayOrder:u,userHasShop:l,userHasPay:c,shippingUpdateOptions:m,experimentFlags:i,pageviewToken:r.value.defaultAttributes?.microSessionId??"",sessionToken:r.value.defaultAttributes?.visitToken??"",showVerifyShopAccountButton:n},{omit:["shopifyDomain","checkoutToken"]})}}}function nh(){const{checkout:n}=v(),t=n.configuration.isUniversalCheckoutFinalizer;F(()=>
2{if(!t)return;const a=r=>{r.composedPath().some(th)&&r.preventDefault()};return document.addEventListener("click",a,!0),document.addEventListener("auxclick",a,!0),()=>{document.removeEventListener("click",a,!0),document.removeEventListener("auxclick",a,!0)}},[t])}function th(n){return n instanceof HTMLAnchorElement&&n.hasAttribute("href")}const ah={id:"ebcee8be9e6c7c28fbd55d8183745df83661612f69510c509fb5bd01a8b778e2",type:"query",name:"PublisherSettings",source:""},rh=Jt(({graphql:{coreGraphql:n}},{skip:t})=>{const a=n.query(ah,{skip:()=>t.value});return{adsPublisherSettingsTypEnabled:Ke(()=>a.data.value?.shop?.adsPublisherSettingsTypEnabled??!1),draftAdsPublisherSettingsTypEnabled:Ke(()=>a.data.value?.shop?.draftAdsPublisherSettingsTypEnabled??!1),error:a.error,loading:a.loading}});function oh({inEditor:n,adsPublisherSettingsTypEnabled:t,draftAdsPublisherSettingsTypEnabled:a,isAllowedLocale:r,isAllowedCountry:o}){const i=t,s=a;return n?{preview:!0,shouldRender:s}:{preview:!1,shouldRender:i&&r&&o}}const Ot=["CA","US"],ih=["en","de","fr","es"];function sh(){const{billingAddress:n,shippingAddress:t}=N(),{i18n:a}=v(),{geolocation:r}=Vr(),o=ye(Mn()),i=Ot.includes(r.country.code),s=S(()=>(t.value??n.value)?.countryCode??""),l=S(()=>Ot.includes(s.value)&&i),c=S(()=>!o.value&&(!Nt(a.locale)||!l.value)),{adsPublisherSettingsTypEnabled:u,draftAdsPublisherSettingsTypEnabled:d,loading:m}=ea(rh,{skip:c});return S(()=>c.value&&!o.value||m.value?{shouldRender:!1,preview:!1}:oh({adsPublisherSettingsTypEnabled:u.value,draftAdsPublisherSettingsTypEnabled:d.value,isAllowedLocale:Nt(a.locale),isAllowedCountry:l.value,inEditor:o.value}))}function Nt(n){return ih.some(t=>n===t||n.startsWith(`${t}-`))}const lh=/Shop App\/|FBAN|FBAV|FB_IAB|Instagram|musical_ly|Bytedance|TikTok|Snapchat|Line\/|MicroMessenger|Pinterest|Twitter\/|LinkedInApp|GSA\/|;\s?wv/;function ch(n){return lh.test(n)}const uh=/Shop App\/[^/]+\/(iOS|Android)\//;function dh(n){return uh.exec(n)?.[1]??Xt(n)}function ph(n,t=!1){const{observability:a}=v(),r=$(n),o=$(t),i=$(0),s=$(),l=$(!1),c=$(0),u=$(null);r.current=n,o.current=t,i.current===0&&(i.current=Date.now());const{contactInfo:d,merchandiseLines:m}=N();s.current===void 0&&(s.current=!!(d.peek()?.email||d.peek()?.phone||m.peek()?.lines?.length));const p=ue(()=>{const f=typeof navigator>"u"?"":navigator.userAgent;return{is_in_app_webview:ch(f),browser_family:Lo(f).name,os_family:dh(f)}},[]),h=W(()=>{u.current==null&&document.visibilityState==="visible"&&!o.current&&r.current!=null&&(u.current=Date.now())},[]),y=W(()=>{u.current!=null&&(c.current+=Date.now()-u.current,u.current=null)},[]),g=W(()=>c.current+(u.current==null?0:Date.now()-u.current),[]);F(()=>{h();const f=()=>{document.visibilityState==="visible"?h():y(),a.log("typ_visibility_changed","Thank You Page visibility changed",{...p,receipt_masked:o.current,visibility_state:document.visibilityState,receipt_loaded:r.current!=null,ms_since_mount:Date.now()-i.current,visible_ms_with_receipt:g()},{exportImmediately:!0})},b=C=>{y(),a.log("typ_pagehide","Thank You Page hidden",{...p,receipt_masked:o.current,persisted:C.persisted,receipt_loaded:r.current!=null,ms_since_mount:Date.now()-i.current,visible_ms_with_receipt:g()},{exportImmediately:!0})};return document.addEventListener("visibilitychange",f),window.addEventListener("pagehide",b),()=>{y(),document.removeEventListener("visibilitychange",f),window.removeEventListener("pagehide",b)}},[a,h,y,g,p]),F(()=>{l.current||n==null||(l.current=!0,h(),a.log("typ_receipt_rendered","Thank You Page rendered with order receipt",{...p,receipt_masked:o.current,order_details_at_mount:s.current,ms_to_receipt:Date.now()-i.current,visibility_state:document.visibilityState},{exportImmediately:!0,requiresKeepalive:!0}))},[a,n,h,p])}function hh(n){const{observability:t,checkout:a}=v(),r=$(!1);F(()=>{r.current||(r.current=!0,t.counter({name:"thank_you_page_rendered",value:1,attributes:{shopPay:a.identity.current.value==="shopPay",checkoutDesign:a.configuration.layout.isOnePage.value?"ONE_STEP":"THREE_STEP",typType:"c1",visibility_state:document.visibilityState,receiptLoaded:n!=null}}))},[a,a.identity,t,n])}const mh="_4Qmfj",_h={ThankYou:mh};function am(){const{i18n:n,url:t,shop:a,source:r,checkout:o,embed:i,router:s}=v(),{contactEmail:l,hasStorefront:c,externalDomain:u,previewReturnUrl:d}=a,{handleSetIsVerifiedShopAccount:m,status:p,isVerifiedShopAccount:h,fetchAttempts:y}=ll(),g=N().buyerIdentity.value?.purchasingCompany,f=Gr().value,{track:b}=Ce("follow_link"),C=r.type==="simulated",T=!!i?.isFlagshipPartner,I=j(),P=I?.paymentDetails?.buyerActionInfo,D=xo(),M=Ui(),x=Fi(),V=qe(),Y=Qe(),{currentDetour:Z}=mn().value,X=Kr().value,A=Oe(),te=A&&X&&jr({embedder:i?.embedder,isThankYouDetour:Z?.type==="thankYou",normalizedPath:s.currentUrl.value.normalizedPath}),{main:{section:J}}=wn(),G=sh(),ge=o.configuration.layout.isOnePage.value,le=o.configuration.isUniversalCheckoutFinalizer,Se=a.hasFlagEnabled(se),Te=!Se&&Do(J);Oo("thank-you");const{track:fe}=eh({showVerifyShopAccountButton:p==="split_user"});Uo({stage:I===void 0?Zn.Usable:Zn.Complete,id:"ThankYou"}),Ho("ThankYou"),F(()=>{fe()},[fe]);const Re=ve("Checkout::ThankYou::Dynamic::Render","ORDER_STATUS1"),ee=ve("Checkout::ThankYou::Dynamic::Render","ORDER_STATUS2"),Ne=ve("Checkout::ThankYou::Dynamic::Render","ORDER_STATUS3"),{header:{logo:Ie}}=wn(),de=ue(()=>{if(!c&&u)return`https://${u}`;if(C)return t.storefront();if(d)return d;if(Ie?.link)return Ie.link;if(r.headerLogoUrl)return r.headerLogoUrl;if(c&&t.storefront())return t.storefront()},[C,Ie?.link,r.headerLogoUrl,c,t,u,d]);Bi(de,c&&!f&&!le),nh(),ph(I,T),hh(I);const Be=e(O,{children:[e(Bo,{children:n.translate("thank_you.title")}),e(_,{gap:"@media (inline-size >= medium) large-500, large-300",children:[!A&&e(dt,{}),e(yh,{resetSectionStyle:Se,children:[e(Le,{target:"card",children:e(Qr,{grouped:!0,children:[e(
2on,{customizations:Re}),P&&e(Ys,{}),e(Le,{target:"edgeToEdgeCard",children:e(Sp,{children:A?e(dt,{}):null})}),te&&e(Vp,{}),e(Xl,{}),e(E,{when:Y,children:e(ku,{})}),!le&&G.value.shouldRender&&e(Le,{target:"edgeToEdgeCard",children:e(sc,{preview:G.value.preview})}),e(E,{when:x,children:e(Ni,{})}),!le&&e(E,{when:M,children:e(gu,{})}),e(E,{when:D,children:e(Rl,{})}),P&&e(Wi,{}),e(on,{customizations:ee}),e(E,{when:()=>V.value&&!Y.value,children:e(Cu,{})}),h||le?null:e(Jp,{onSignInCompleted:m,loading:p==="fetching_status",fetchAttempts:y}),e(Pl,{}),e(on,{customizations:Ne})]})}),e(Zr,{children:[!g&&!f&&o.configuration.allowRedirectToStorefront&&e(Xr,{children:e(he,{variant:"primary",size:"large",inlineSize:"fill",href:de,onClick:C?void 0:()=>b("continue_shopping"),children:n.translate("thank_you.return_to_store_link_label")})}),!le&&e(Jr,{children:e(w,{textAlign:"center",children:e(Me,{children:n.translate("thank_you.contact_us_html",{contact_us:e(ke,{href:C?void 0:`mailto:${l}`,onClick:C?void 0:()=>b("contact_us"),children:n.translate("thank_you.contact_us")})})})})})]})]})]})]}),Fe=ge?e(R,{className:_h.ThankYou,padding:`@media (inline-size >= extraSmall) small-300 none, (inline-size >= medium) none, ${Te?"small-300 none":"none"}`,children:Be}):Be;return e(qp,{children:Fe})}function yh({children:n,resetSectionStyle:t}){const a=e(eo,{children:n});return t?e(Wt,{children:a}):a}export{am as default};

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.