1import{u as e,z as n,h as t,q as a,o as i,g as s,S as r,_ as o,w as c,m as l,p as d,s as u,k as m,N as h,H as p}from"./2c1ab0fe.B2yRRyAW.js";import{L as f,B as b,b as v,j as g,S as y,a9 as _,aD as j,ab as k,A as w,d as C,ba as S,b8 as A,b9 as P,f as x,cQ as z,fc as M,fd as R,fe as T,dP as I,dq as L,dp as E,R as B,V as D,o as N,U as O,i as V,dr as F,ds as U,d3 as $,ff as H,eo as J,fg as Y,bQ as q,v as G,p as Q,dR as K,fh as W,k as X,an as Z,ek as ee,af as ne,ag as te,H as ae,a0 as ie,q as se}from"./164ad2e3.-hfWY9cN.js";import{c as re,n as oe,J as ce,ex as le,aH as de,ag as ue,bJ as me,ab as he,ae as pe,ac as fe}from"./4b4bc88f.JFrEI7LU.js";import{C as be}from"./b3389d5c.BeFZm6h8.js";import{u as ve,S as ge,P as ye,L as _e,R as je}from"./73a9b0a0.D2P9KQKP.js";import{M as ke}from"./0b8657b8.-bvTvyc8.js";import{P as we}from"./fc21c11a.aqndU9GV.js";import{P as Ce}from"./e3e348f2.CUB8gYam.js";import{b as Se,c as Ae,S as Pe}from"./dfca5da5.CtpsmRuf.js";import{S as xe}from"./79974aab.Du4uYIZv.js";import{f as ze,g as Me,h as Re,j as Te,k as Ie,L as Le,l as Ee,m as Be,n as De,U as Ne,V as Oe,P as Ve}from"./f8706cb6.BKYQh9AK.js";import{S as Fe}from"./39921a74.DpNP_yGV.js";import{O as Ue}from"./7a8217fd.C2rM5fX2.js";import{MobileOrderSummary as $e}from"./d2e6a587.DsEYL8br.js";import{b as He,a as Je}from"./bf513f9c.BITc5iYn.js";import{u as Ye,e as qe,G as Ge,T as Qe}from"./6bfea526.DhpjKDX-.js";import{u as Ke}from"./e129c76e.D6dvxVQ1.js";import{a as We,H as Xe}from"./0e9ee714.p7sY_b4Y.js";import{a as Ze}from"./01973ac7.BHLY876L.js";import{a as en,W as nn,P as tn}from"./c10167e6.CgbE6jxX.js";import{y as an,z as sn,E as rn,u as on,b as cn,f as ln,g as dn,V as un,a as mn}from"./86720dbb.C0NBtMoX.js";import{a as hn,b as pn}from"./app.C_W8kcQ4.js";import{v as fn}from"./dffdfb34.CA8WE4ll.js";import{a as bn}from"./24773686.DbrpS9Ga.js";import"./d0bb51ec.CiN57OqX.js";import"./f67abd2c.Boj0gJpa.js";import"./60a453ce.aSs2kW8G.js";import"./e12db40c.ZpKYxNRe.js";import"./9dba8418.BqWu-Ch9.js";import"./81e109b1.DOkM2TK2.js";import"./0e67bd3b.DYIAHGYe.js";import"./74835653.B3C9_9vV.js";import"./3ca8ef7e.CGmhNbCs.js";import"./2495faa4.B5RDSEV2.js";import"./a9fa9fda.DtwHg2w5.js";import"./ca3e798e.j1SNghYW.js";import"./47b970b2.B55cGlxq.js";import"./22345fd4.CQJ0n-1P.js";import"./064f6ac1.CZOb24JP.js";import"./efa0389a.DgBvBH2e.js";import"./4b1c22b7.BOiV_1od.js";import"./e0989459.bnt6Bm9T.js";import"./cdfd59e6.DxvM3skh.js";import"./e477f96c.BeMbLJgj.js";import"./1ed8f5e3.CRF_7oqg.js";import"./7ee73f43.DtddgRqM.js";import"./cb5cf153.BGCuT8HB.js";import"./cb38e5c2.6itoXFFb.js";import"./1f5e7811.PrD3cLrR.js";import"./0c0ad074.BoVClIit.js";import"./ccdf3592.8u-hHDlt.js";import"./87bfafec.CxwEzGHg.js";import"./434e3b0a.B1BBnK_d.js";import"./55098bf1.OVeEjE2R.js";import"./71ae3d5c.BTocP6cf.js";import"./dae24aab.xiAL8T3Q.js";import"./e77f7fe0.B1UY2cg5.js";import"./598fef4e.C__a6xIj.js";import"./a25deb9a.BCJws3RR.js";import"./945a08d6.zhlWcV3z.js";import"./58314944.DeRGAACO.js";import"./7bc8057b.C2psJszD.js";import"./d25d1b95.DkedqTWK.js";import"./c6c0cbda.AqWWc50G.js";import"./f1968089.B9S0NE97.js";import"./2b89a178.FWorZmkI.js";import"./b684bff6.YNZp59HI.js";import"./a422df8c.p_hgP_ap.js";import"./17425706.ozCo4ACy.js";import"./cf29e63b.CWl11nWq.js";import"./6fb6f9d8.D5bv4loK.js";import"./1444e6bd.m8JEnfnf.js";import"./ed9f2238.DoGJCDiA.js";import"./78ab3dd0.CxYXHIAF.js";import"./910cd6e2.DZkJplDp.js";import"./347b440c.b4pdpzx1.js";import"./9ce08e25.q3KqAteP.js";import"./181d38d3.T13hkdEm.js";import"./792bb671.B3OvVnSg.js";import"./d6447d9e.IglBvAnL.js";import"./f49d4216.Dq3WwT1N.js";import"./f51e663e.DTa726QN.js";import"./64de7b49.BpfyYV-0.js";import"./8e79be58.DGz48SHb.js";import"./90e26f5f.QVrWOr6w.js";import"./31cc568e.95lmLO5k.js";import"./65f3d4da.Bb3QiqCm.js";import"./2fdb3dd3.CAXoTPkz.js";import"./ca5e9c49.DCsOjSbY.js";
1import"./f3e117aa.CW9Vq1VP.js";import"./7b0c98ea.DsQmemn7.js";import"./8599b02a.C02H2K0N.js";import"./ac5a19ff.BhdcadwW.js";import"./cc6ff67d.C_qUEjhN.js";import"./08a3b809.DE8GX3m3.js";import"./e39bc11c.DZRk2vl_.js";import"./d4ea2faa.BWUhdW6Q.js";import"./fe885b80.D8CKOxv4.js";import"./f78726c8.90HJ76iF.js";import"./71b60e0a.DfPLdYsH.js";import"./ec391382.DK5Vlhzz.js";import"./b9c0319a.B2HCovnd.js";import"./17e57de1.d8zWzF56.js";import"./f692f62f.T4hOHGz4.js";import"./9babe369.YjVJF-bz.js";import"./d22d2b80.Bn2GBJa_.js";function vn({href:n,children:t,onClick:a}){return e(f,{tone:"monochrome",href:n,onClick:a,children:t})}function gn({onClick:n}){const{i18n:t}=re();return e(vn,{href:"https://www.shopify.com/legal/cookies",onClick:n,children:t.translate("user_consent.policy")})}function yn({onClick:n}){const{i18n:t}=re();return e(vn,{href:"https://help.shop.app/en/shop/shopping/ads-personalization",onClick:n,children:t.translate("user_consent.detailed_view.learn_about_ads")})}function _n({title:n,description:t,checked:a,onChange:i,disabled:s,badgeLabel:r}){const o=e(g,{children:t});return e(y,{gap:"small-200",children:[e(y,{direction:"inline",gap:"small-200",alignItems:"center",children:[e(g,{type:"strong",children:n}),r?e(j,{color:"subdued",children:r}):null]}),e(k,{gridTemplateColumns:"minmax(0, 1fr) minmax(auto, max-content)",gap:"base",alignItems:"start",children:[o,e(Fe,{checked:a,onChange:i,disabled:s,accessibilityLabel:n})]})]})}function jn({open:i,onClose:s,onConsentSaved:r}){const{consentManager:o,i18n:c,shopPay:l}=re(),d=l.user.shopAccountUuid,u=d.value,m=o.trackingConsentSelection?.value,h=void 0!==m,[p,f]=n(!1),[j,k]=n(!1),[w,C]=n(!1),[S,A]=n(null),[P,x]=n(!1);t(()=>{if(!i)return;const e=o.trackingConsentSelection?.peek();f(e?.analytics??!1),k(e?.marketing??!1),C(!1),A(null),x(!1)},[o,u,i]),t(()=>{i&&!w&&m&&(f(m.analytics),k(m.marketing))},[w,i,m]);const z=a(async()=>{if(P||!h)return;const e=d.value;x(!0),A(null);const n=await o.setTrackingConsent({analytics:p,marketing:j});l.user.shopAccountUuid.value===e&&(n.success?(r?.(),s()):A(c.translate("user_consent.error_saving_consent")),x(!1))},[p,o,c,h,P,j,r,s,l,d]),M=c.translate("user_consent.detailed_view.description",{cookie_policy_href:e(gn,{})}),R=e(v,{inlineSize:"@media (inline-size >= small) auto, 100%",children:e(b,{variant:"primary",onClick:z,inlineSize:"fill",loading:P||!h,disabled:P||!h,children:e(v,{minInlineSize:"100px",inlineAlignment:"center",children:e(g,{children:c.translate("user_consent.detailed_view.save")})})})});return e(Ue,{heading:c.translate("user_consent.title"),accessibilityLabel:c.translate("user_consent.manage"),open:i,onHide:s,primaryAction:R,children:e(y,{gap:"base",children:[e(y,{gap:"small-200",children:[S&&e(_,{tone:"critical",children:S}),e(g,{children:M})]}),e(y,{gap:"base",children:[e(_n,{title:c.translate("user_consent.detailed_view.necessary"),description:c.translate("user_consent.detailed_view.necessary_description"),checked:!0,disabled:!0,badgeLabel:c.translate("user_consent.detailed_view.required")}),e(_n,{title:c.translate("user_consent.detailed_view.analytics"),description:c.translate("user_consent.detailed_view.analytics_description"),checked:p,onChange:e=>{f(e),C(!0)},disabled:P||!h}),e(_n,{title:c.translate("user_consent.detailed_view.advertising"),description:c.translate("user_consent.detailed_view.advertising_description",{learn_about_ads_href:e(yn,{})}),checked:j,onChange:e=>{k(e),C(!0)},disabled:P||!h})]})]})})}function kn(){const{consentManager:l,i18n:d,mobileCheckoutSdk:u,observability:m,shopPay:h}=re(),p=h.user.shopAccountUuid,[f,b]=n(!1),[g,j]=n(null),[k,x]=n(p.value),z=i(!1),M=s(void 0);t(()=>{k!==p.value&&(x(p.value),z.value=!1,j(null))},[z,k,p.value]);const R=a(()=>{j(null),b(!0)},[]),T=a(()=>{b(!1)},[]),I=a(()=>{z.value=!0},[z]),L=a(async()=>{const e=p.value;j(null);const n=await l.acceptAll();h.user.shopAccountUuid.value===e&&(n.success?I():j(d.translate("user_consent.error_saving_consent")))},[I,d,h,p,l]),E=a(async()=>{const e=p.value;j(null);const n=await l.rejectAll();h.user.shopAccountUuid.value===e&&(n.success?I():j(d.translate("user_consent.error_saving_consent")))},[I,d,h,p,l]),B=I,D=k===p.value,N=D&&(l.shouldShowBanner.value||z.value),O=function(e,n){const t=s(null),a=s(e),i=s(!1),r=s(null);if(a.current&&!e&&"undefined"!=typeof document){const e=t.current,n=document.activeElement,a=e&&n instanceof HTMLElement&&e.contains(n),s=e&&S(e);i.current=Boolean(a),r.current=a&&s?A(s):null}return a.current=e,o(()=>
1{if(!i.current||!n)return;i.current=!1;const a=e?t.current&&P(t.current):r.current;r.current=null,a?.isConnected&&document.activeElement===document.body&&a.focus({preventScroll:!0})},[n,e]),t}(N,D),V=s(N);t(()=>{const e=!V.current&&N;if(V.current=N,e)return w({content:d.translate("user_consent.title")})},[d,N]),t(()=>{D&&M.current!==p.value&&(M.current=p.value,m.counter({name:"inline_user_consent_shown",value:1,attributes:{shown:N}}))},[D,N,p.value,m]);const F=e(y,{gap:"small-300",children:[g&&e(_,{tone:"critical",children:g}),e(c,{when:z,fallback:e(wn,{onAcceptAll:L,onManageCookiesClick:R,onRejectAll:E}),children:e(Cn,{onManageCookiesClick:R})})]}),U=e(jn,{open:f,onClose:T,onConsentSaved:B});if(!N)return null;const $=e(v,{ref:O,background:"subdued",borderRadius:"large",padding:"base",children:e(y,{gap:"base",accessibilityRole:"group",accessibilityLabel:d.translate("user_consent.title"),children:F})}),H=u.variant.isPartner();return e(r,{children:[!H&&e(v,{display:"@media (inline-size >= small) none, auto",children:e(C,{blockSize:"base"})}),$,U]})}function wn({onManageCookiesClick:t,onAcceptAll:i,onRejectAll:s}){const{i18n:r}=re(),[o,c]=n(null),l=null!==o,d=a(async()=>{l||(c("accept"),await i(),c(null))},[l,i]),u=a(async()=>{l||(c("reject"),await s(),c(null))},[l,s]);return e(y,{gap:"base",children:[e(g,{type:"strong",children:r.translate("user_consent.accelerated_view.title")}),e(x,{children:e(g,{children:r.translate("user_consent.accelerated_view.description",{cookie_policy_href:e(gn,{})})})}),e(y,{direction:"inline",gap:"small-200",children:[e(b,{inlineAlignment:"center",onClick:d,size:"small",variant:"secondary",loading:"accept"===o,disabled:l,children:r.translate("user_consent.accelerated_view.accept_all")}),e(b,{inlineAlignment:"center",onClick:u,size:"small",variant:"secondary",loading:"reject"===o,disabled:l,children:r.translate("user_consent.accelerated_view.reject_all")}),e(b,{inlineAlignment:"center",onClick:t,size:"small",variant:"plain",textDecoration:"none",disabled:l,accessibilityLabel:r.translate("user_consent.manage"),children:r.translate("user_consent.accelerated_view.manage")})]})]})}function Cn({onManageCookiesClick:n}){const{i18n:t}=re();return e(v,{autoFocus:!0,children:e(g,{children:t.translate("user_consent.accelerated_view.consent_collected",{manage_cookies_href:e(Sn,{onManageCookiesClick:n})})})})}function Sn({onManageCookiesClick:n}){const{i18n:t}=re();return e(vn,{onClick:n,children:t.translate("user_consent.manage")})}vn.displayName="CookiesLink";const An=e=>(e=>"ShopCashCheckoutCashbackIncentive"===e.__typename)(e)&&e.expectedAmount.amount>0,Pn=e=>(e=>"ShopCashCheckoutFlatAmountCashbackIncentive"===e.__typename)(e)&&e.minimumOrderValueSatisfied,xn="https://cdn.shopify.com/shop-assets/static_uploads/shop-cash/",zn=`${xn}checkout_banner_coin_light.png`,Mn=`${xn}checkout_banner_coin_light_2x.png`,Rn=`${xn}checkout_banner_coin_light_4x.png`,Tn=`${xn}checkout_banner_coin_dark.png`,In=`${xn}checkout_banner_coin_dark_2x.png`,Ln=`${xn}checkout_banner_coin_dark_4x.png`,En=({expectedAmount:n,incentives:t,i18n:a,darkMode:i,incentivePresentation:s})=>{const r=null!=n&&0!==n.amount,o=r?a.formatCurrency(n.amount,{currency:n.currencyCode}):"",c=r?(({i18n:e,incentives:n,formattedTotalAmount:t})=>{if(!n||0===n.length)return;const a=n.find(An),i=n.find(Pn),s=a?.displayName;if(a&&s&&i){const n=e.formatCurrency(a.expectedAmount.amount,{currency:a.expectedAmount.currencyCode}),r=e.formatCurrency(i.cashbackAmount.amount,{currency:i.cashbackAmount.currencyCode});return{title:e.translate("shop_cash.rewards_banner_title",{formattedAmount:t}),description:e.translate("shop_cash.reward_banner_description_combined_rewards",{promotionAmount:n,promotionDisplayName:s,offerAmount:r})}}if(a&&s&&!i){const n=e.formatCurrency(a.expectedAmount.amount,{currency:a.expectedAmount.currencyCode}),t=a.remainingRewardLimit?.amount===a.expectedAmount.amount;return{title:e.translate("shop_cash.reward_banner_title_with_promotion_attribution",{formattedAmount:n,promotionDisplayName:s}),description:t?e.translate("shop_cash.reward_banner_description_max"):void 0}}})({i18n:a,incentives:t,formattedTotalAmount:o}):void 0,d=r?c?.title??a.translate("shop_cash.rewards_banner_title",{formattedAmount:o}):"",u=c?.description,m=u?`${d} ${u}`:d,h=r&&(t?.some(e=>Pn(e)||An(e))??!1);if(ze(s,"cashbackBanner",h?m:void 0),!r)return null;const p=i?Tn:zn,f=i?In:Mn,b=i?Ln:Rn,v=l("F7fwo",i?"iJGCf":"gXkBh");return e(y,{direction:"inline",alignItems:"center",gap:"small-300",className:v,borderRadius:"large",children:[e(z,{src:p,srcSet:`${p} 1x, ${f} 2x, ${b} 4x`,aspectRatio:"auto"}),u?e(y,{direction:"block",gap:"none",className:"VnjPc",children:[e(g,{children:d}),e(g,{type:"small",children:u})]}):e(g,{children:d})]})};function Bn(){const{i18n:n}=re(),t=Me(),{isEarningCashback:a,cashback:i,incentivePresentation:s}=He();return a&&i?e(v,{children:[e(C,{blockSize:"large-200"}),e(En,{expectedAmount:i.expectedAmount,incentives:i.incentives,i18n:n,darkMode:t,incentivePresentation:s})]}):null}function Dn(){const n=M();return Re({ineligibilityReasonLabel:n}),e(en,{ineligibilityReason:n})}function Nn({selectorShowsTiles:n,children:t}){const{checkout:{negotiator:a}}=re(),{buyerHasActedSignal:r}=a.context,c=an(),d=s(null),u=s(null),m=s(!1),h=oe(n.value&&r.value),p=i(null);o(()=>{const e=u.current;if(!e||"undefined"==typeof MutationObserver)return;const n=new MutationObserver(n=>{if(!e.hasChildNodes())return m.current=!1,void(p.value=null);n.some(e=>e.addedNodes.length>0)&&h.current&&hn()&&(m.current=!0,p.value={from:pn(),withMotion:c.loaded})});return n.observe(e,{childList:!0,subtree:!0}),()=>n.disconnect()},[p,h,c]),o(()=>
1{if(m.current){m.current=!1;for(const e of[d.current,u.current])for(const n of e?.getAnimations?.()??[])n.cancel(),n.play()}});const f=null!==p.value&&p.value.withMotion;return e("div",{ref:d,className:l("ISVtv",f&&"p8IP4",f&&rn),children:e("div",{ref:u,className:l("eRezU",f&&sn[p.value?.from??"end"]),children:t})})}const On=n=>e(v,{children:n});function Vn({customizations:n,selectorShowsTiles:t}){return 0===n.length?null:e(r,{children:n.map(n=>"uiExtension"===n.kind?e(Nn,{selectorShowsTiles:t,children:e(R,{extension:n.extension,render:On})},n.extension.id):e(T,{field:n.field},n.field.key))})}const Fn=h(function(){const{checkout:n,i18n:t,source:a,shop:s}=re(),{acceptTipPayments:o,discountCodesEnabled:l}=s,h=ve(),p=E(),f=l&&p.value;Ye(),function(){const{checkout:{negotiator:e}}=re(),{payment:n,directPaymentFieldsFilled:t}=e.context,{paymentLines:a,directPaymentErrors:i}=e.parts,s=Te();d(()=>{const e=s.value||(r=i,Object.keys(r).filter(e=>"paymentMethodIdentifier"!==e).some(e=>null!=r[e].value));var r,o,c;n.value=(o=a.value,c=t.value,o.some(e=>"direct"!==e.method.type||Boolean(e.method.sessionId)||c)&&!e)})}();const b=I(),v=function(){const{checkout:e}=re(),{displayedPaymentMethods:n}=on({experienceType:"list"}),t=u(cn(n)),a=I(),i=L(),s=ln(),r=Je();return m(()=>{const n=null!==dn(e.identity,r.value)||s.value.freeOrder||s.value.giftCard||s.value.storeCredit||s.value.redeemables,o=!i.value&&("inContext"===a.value||"afterPayment"===a.value);return e.configuration.visibility.showStoreCreditRedemption.value&&!n&&"singlePaymentMethodCreditCard"===t.value.mode&&o})}(),g=m(()=>n.configuration.visibility.showStoreCreditRedemption.value&&!v.value),_=B().value,j=D(),k=m(()=>function({identity:e}){switch(e.current.value){case"guest":case"customerAccount":case"shopPay":return!0;default:return!1}}({identity:n.identity})),w=j?.tippingPaymentAllowed??!0,C=!ce(a)&&o&&w&&n.configuration.visibility.showTips,S=m(()=>n.installments.isSupported.value),A=We(),P=Ie({showTips:C,billingFormPosition:b.value}),x=N("purchase.checkout.payment-method-list.render-before"),z=N("purchase.checkout.payment-method-list.render-after"),M=i(!1);return e($,{target:"cart.paymentLines[0]",children:e(y,{accessibilityRole:"group",accessibilityLabelledBy:"payment",gap:"base",children:[e(Un,{}),e(O,{customizations:x}),e(Ze,{}),e(Le,{}),e(c,{when:g,children:e(qe,{})}),e(c,{when:S,children:e(Dn,{})}),e(V,{children:e(y,{gap:"large-300",children:[e(nn,{dynamicPaymentExtensions:P.shift()||[],children:[e(tn,{selectorShowsTiles:M,renderVaultingAgreementInline:!1,afterPaymentSelector:e(c,{when:A,children:e(Xe,{})})}),e(c,{when:h,children:e(ge,{})}),e(Vn,{customizations:z,selectorShowsTiles:M}),e(Vn,{customizations:P.shift()||[],selectorShowsTiles:M}),e(c,{when:k,children:e(Ge,{})})]}),e(c,{when:v,children:e(qe,{})}),_&&e(un,{}),e(c,{when:n.configuration.visibility.showPurchaseOrderNumberField,children:e(mn,{showHeading:!1})}),C&&e(r,{children:[e(F,{sectionId:"tips",children:e(Qe,{})}),e(O,{customizations:P.shift()||[]})]}),e(O,{customizations:P.flat()}),f&&e(U,{targetSelector:'input[name="reductions"]',icon:"discount",label:t.translate("order_summary.discount_discovery.add_code")})]})})]})})});function Un(){const{router:n}=re(),t="payment",a=m(()=>Ee(n,t));return e(ye,{headingId:t,autoFocus:a.value})}function $n(){const{embed:n,router:t}=re(),i=t.currentUrl.value,{label:s}=H(),r=J({clearPii:!0}),o=Y(),{isAppLayout:c}=q(),{progressing:l}=G(),{setEditorShopPay:d}=fn(),u=a(()=>{d?d(!1):l.value||r()},[d,l,r]);return o||n?.isCheckoutKit()||!c&&!le(i.search)?e(f,{onClick:u,textDecoration:"none",children:s}):null}function Hn(){const n=function(){const e=bn(),n=a(()=>{(e=>{de()?e.bridge.iframeClosed():window.close()})(e)},[e]);return n}(),t=ue(),i=Q({base:!0,small:!1}),s=me()&&(!t.value||(i??!1)),{i18n:r,shop:{name:o},shopPay:c}=re();if(!c.visibility.showReturnToStore)return null;if(!s)return null;const l=r.translate("shop_pay_external.return_to_store",{shopName:o});return e(y,{alignItems:"center",children:[e(C,{blockSize:"base"}),e(f,{onClick:n,children:l})]})}function Jn(){const{checkout:{identity:n},source:t,shopPay:a,mobileCheckoutSdk:i}
1=re(),{visibility:{showCheckoutAsGuestFeature:s}}=a;if("shopPay"!==n.current.value||!s)return null;const o="shopPayExternal"===t.type?e(Hn,{}):e($n,{}),c=i.variant.isPartner();return e(r,{children:[e(C,{blockSize:"large-100"}),e(v,{inlineAlignment:"center",children:o}),c?e(C,{blockSize:"base"}):e(v,{display:"@media (inline-size >= small) auto, none",children:e(C,{blockSize:"base"})})]})}const Yn=h(function({onReady:n,includeContactInVaultedExtensions:a,showMobileOrderSummary:i,showVaultedStateMarketingDisclosureBelowPayment:s,phoneMarketingPlacement:o,isSectionCustomized:l,showVaultedStateMarketingDisclosureOnMobile:d,expressCheckoutSlot:h,showVaultedCardConsentSpacing:f}){const b=K(),g=W(),_=he(),j=Ke(),{checkout:k,embed:w,i18n:S,mobileCheckoutSdk:A,source:P,shop:x,shopPay:z}=re(),M=X(),R=k.negotiator.current.fields.managedByMarketsPro,T=u(Q({base:!0,medium:!1})),I=ue(),L=Z(),E=m(()=>L.configurationSignal.value.main.spacing),B=m(()=>{const{position:e}=L.configurationSignal.value.reductions;return z.visibility.shouldRenderFloatingShopPayButton?"none":"base"===e?"large-200":i.value&&null!=E.value?pe(E.value)??"base":"base"}),{localizationExtensions:V}=k.negotiator.parts,U=m(()=>V.value.length>0),$=m(()=>f?.value&&!U.value?"large-200":"none"),H=qn(T),J=m(()=>s.value&&!d.value&&(!T.value||!l.value)),Y=m(()=>"belowPayment"===o.value),q=D(),G=u(q?.tippingPaymentAllowed??!0),se=m(()=>b.value.payment&&x.acceptTipPayments&&G.value&&k.configuration.visibility.showTips),oe=ee(),le=A.variant.isPartner(),de=m(()=>"shopPay"===k.identity.current.value&&"shopPayExternal"!==P.type&&""!==z.user.shopAccountUuid.value&&!ce(P)),me=e(c,{when:de,children:e(kn,{})}),ve=m(()=>"thankYou"===M.value.currentDetour?.type?"Checkout::ThankYou::Dynamic::Render":"Checkout::Dynamic::Render"),ge=N(ve.value,"ORDER_SUMMARY4"),ye=m(()=>"wallets"!==h.value&&Boolean(R.value)),ze=Be({includeContact:a}),Me=m(()=>!T.value&&!ce(P)&&se.value),Re=m(()=>!T.value&&g.value&&ze.value.length>0),Te=m(()=>Me.value||Re.value||ye.value);t(()=>{const e=setTimeout(n,0);return()=>clearTimeout(e)},[n]);const Ie=x.hasFlagEnabled(fe),Le=e(c,{when:i,children:e($e,{})}),Ee=e(y,{gap:"base",children:[e(c,{when:Me,children:e(v,{display:"@media (inline-size >= medium) auto, none",children:e(F,{sectionId:"tips",children:[e(c,{when:()=>!l.value,children:e(C,{blockSize:"large-300"})}),e(Qe,{})]})})}),e(c,{when:Re,children:e(Oe,{extensions:ze})}),e(c,{when:ye,children:e(y,{gap:"base",padding:"@media (inline-size >= medium) large-400 none none none, none",children:e(ke,{textProps:{color:"subdued",size:"small"}})})})]});return e(r,{children:e(Se,{min:"medium",accessibilityLabel:S.translate("payment.title"),hideDivider:!0,children:[e(c,{when:()=>!b.value.payment,children:e(r,{children:[e(ne,{section:"payment",children:e(te,{section:"payment",children:e(Se,{max:"medium",accessibilityLabel:S.translate("payment.title"),children:e(Fn,{})})})}),e(c,{when:k.configuration.visibility.showCashRedemption,children:e(De,{})}),e(Ne,{})]})}),e(c,{when:U,children:e(Ae,{accessibilityLabel:S.translate("localized_fields.additional_information.title"),children:e(y,{gap:"base",padding:"@media (inline-size >= medium) large-400 none none none, none",children:[e(ae,{level:2,children:S.translate("localized_fields.additional_information.title")}),e(p,{each:V,children:(n,t)=>e(_e,{localizationExtension:n,index:t})})]})})}),e(c,{when:()=>T.value&&!ce(P)&&se.value,children:e(v,{display:"@media (inline-size >= medium) none, auto",children:[e(F,{sectionId:"tips",children:e(Qe,{renderInSection:T})}),e(c,{when:()=>!w?.isFlagshipPartner,children:e(Pe,{spacing:pe(E.value)})})]})}),e(c,{when:()=>T.value&&g.value&&ze.value.length,children:e(Oe,{extensions:ze,hideDivider:"whenEmpty"})}),e(ne,{section:"summary",children:e(te,{section:"summary",children:e("div",{ref:H,children:[e(xe,{target:"mobileOrderSummary",children:e(Se,{max:"medium",hideDivider:!0,children:[e(c,{when:()=>!0===T.value,children:e(je,{})}),e(Ve,{showEmailMarketingOptIn:J,showPhoneMarketingOptIn:Y,paddingBlockStart:$}),!Ie&&Le,e(y,{gap:B.value,"data-testid":"onepage-pay-button-cluster",children:[Ie?e(r,{children:[Le,e(c,{when:Te,children:Ee})]}):Ee,e(c,{when:()=>!0!==T.value,children:e(je,{})}),e(y,{gap:"large-200",children:[e(c,{when:j,children:e(be,{})}),e(c,{when:_,children:e(Ce,{placement:"above-pay-button"})}),e(we,{buttonHidden:oe}),e(c,{when:_,children:e(Ce,{placement:"default"})}),e(c,{when:()=>!I.value||T.value,children:e(ie,{above:"medium",children:e(O,{customizations:ge,gap:"large-200"})})})]})]}),e(c,{when:k.configuration.visibility.showShopCashRewardsBanner,children:e(Bn,{})}),le?null:e(r,{children:[e(Jn,{}),me]})]})}),le?e(r,{children:[e(Jn,{}),me]}):null]})})})]})})});function qn(e){const{setTriggerNode:n}=se("chat"),t=i(null);return d(()=>{n(e.value?t.value:null)}),a(e=>{t.value=e},[t])}export{Yn as default,qn as useChatHideTriggerRef};
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.