PageSourceSearch

https://store.sixshooterrecords.com/cdn/shopifycloud/checkout-web/…/c1/component-ApplePayButton.WdYwP0gK.js

js sixshooterrecords.com collected 2026-09-24 18:41:36 UTC 8,475 bytes, 1 lines download raw bytes

1import{u as e,i as A,A as z,q as v,h as G,e as F,g as O,f as N,p as V,G as U,l as K,S as Z}from"./esnext-vendor.DQ9BNaJe.js";import{T as D,as as ee,bF as te,ai as ne,cv as ae,b4 as oe,cw as se,aO as ie}from"./addresses-is-address-empty.BB1pvxM5.js";import{k as J,bQ as _,a6 as le,bR as re,bS as ce,i as ue,aN as pe,B as q,P as de,L as me,l as ve,j as ye,ax as be,I as he,n as Pe,bi as Se,a5 as fe,bT as _e,bU as ge,C as Ae,J as Ce}from"./hydrate.D4A9Cb0p.js";import{A as we}from"./app.B3Jiyyyv.js";import{T as ke}from"./TransitionHeight.EYTEkufm.js";import{S as $,b as Le}from"./hooks-useWalletsTimeout.BeFlWkI9.js";import{c as Me}from"./localization-index.Cz2QAhoe.js";import{s as j}from"./components-DeliveryTransition.BO7XHCCw.js";import"./shared-permissions.g_hGDKr0.js";import"./hooks-useShopPayExternalAppContext.xiQcN-hk.js";import"./Page.B9MyjEfr.js";import"./useShopPayButtonClassName.BXi9zWEB.js";import"./shared-shop-theme.DkQ4xpRa.js";import"./hooks-useShowShopPayOptin.BFq7voDt.js";import"./AddressPresenter.B3e4WG12.js";import"./hooks-useShouldRevealCustomization.Cb4-X8Fo.js";import"./shop-pay-installments-types.BePBAMcY.js";import"./hooks-useForceShopPayUrl.DYdyymiT.js";import"./ChangeCompanyLocationLink.braqVZes.js";import"./BillingAddressForm.DkbefRCe.js";import"./utilities-previous.DZk5oM9s.js";import"./amazon-pay-useAmazonPayPaymentLine.CsQac3SS.js";import"./PhoneField.BCRFK9Q9.js";import"./hooks-useSuppressShopPayModalOnLoad.CwJgxtUb.js";import"./components-RedirectionNotice.module.2Lrm8ufW.js";import"./Choice.Cm0SI98l.js";import"./Checkbox.DPa0lYMg.js";import"./ImpressionEventCapture.C-19abdk.js";import"./ShopPayLogo.DScRW63P.js";import"./cross-border-hooks.DsyMg8eX.js";import"./shop-pay-installments-monorail.C66kAadE.js";import"./hooks-useShopPayNewSignupLoginExperiment.9bCmRvur.js";import"./IncentiveBadge.BlLsspj4.js";import"./Section-SectionStyleOverride.CpTfyWrO.js";import"./AutocompleteField-hooks.D_BZmTUO.js";import"./PendingShipping.DO6DGZ4q.js";function xe({body:y}){return e(re,{children:e(le,{dangerouslySetInnerHTML:{__html:y.value??""},scrollableContent:"all"})})}function Ee({body:y,loading:C,error:w}){const{i18n:S}=D();return e(A,{when:w,fallback:e(A,{when:C,fallback:e(xe,{body:y}),children:e(J,{gap:"base",children:[e(_,{lines:2,lastLineSize:"large"}),e(_,{lines:3,lastLineSize:"small"}),e(_,{lines:2,lastLineSize:"base"}),e(_,{size:"extraLarge",lastLineSize:"large",lines:1}),e(_,{lines:7,lastLineSize:"small"}),e(_,{lines:3,lastLineSize:"base"})]})}),children:S.translate("bad_request.title")})}const He="VqsW7",Ie="c1X76",Re="JtAjb",g={SubscriptionConsentModal:He,Views:Ie,Pane:Re,"Pane-outgoing":"otCH1"};function Be({id:y,canConfirm:C,onConfirm:w,onHide:S,onShow:r}){const{i18n:b,shop:i}=D(),{checkoutProtocolModalEventSignal:c}=ee(),k=b.translate("payment.purchase_options_cancellation_policy_label"),L=i.merchantPolicies.find(({handle:m})=>m===$),a={handle:$,shopId:i.id,shopName:i.name,squareLogo:i.brandSettings?.squareLogo,name:k,url:L?.url??""},o=te(ce,{defaultPolicy:a,policies:[a]}),f=z(!1),s=v(()=>{f.current&&c.value==="applePaySubscriptionConsent"&&(c.value="none"),f.current=!1},[c]);G(()=>s,[s]);const n=F(!1),u=F(!1),I=z(null),h=ue(),p=pe(n.value,"slow"),l=n.value||u.value,T=!n.value||u.value,M=v(m=>{I.current=m,m&&(m.dataset.inertSupported=String("inert"in m))},[]),x=b.translate("wallets.continue_with",{walletName:b.translate("brand.apple_pay")}),E=n.value?Me(k):b.translate("payment.purchase_options_subscription_confirmation_title"),R=v(()=>{o.show(),n.value=!0},[o,n]),P=v(()=>{o.hide(),n.value=!1},[o,n]),B=v(()=>{u.value=!0,o.hide(),s(),S()},[u,o,s,S]),W=v(()=>{n.value=!1,u.value=!1,f.current=!0,c.value="applePaySubscriptionConsent",r()},[n,u,c,r]);return e(Se,{id:y,heading:e(J,{direction:"inline",alignItems:"center",gap:"base",children:[e(A,{when:n,children:e(be,{type:"button",padding:"small-400",borderRadius:"base",accessibilityLabel:b.translate("account_management.back"),onClick:P,children:e(he,{type:"arrow-left",size:"base"})})}),e(Pe,{level:1,autoFocus:!0,children:E},n.value?"policy":"consent")]}),accessibilityLabel:E,onShow:W,onHide:B,actionLayout:"stacked",primaryAction:e(ye,{variant:"primary",type:"button",inlineSize:"fill",disabled:!C.value,onClick:w,children:x}),children:e(q,{className:g.SubscriptionConsentModal,children:e(ke,{c
1ontentRef:I,children:e(q,{ref:M,className:g.Views,padding:"small-200",overflow:"hidden",children:[e(A,{when:()=>h?!n.value:p!=="entered",children:e(q,{className:O(g.Pane,n.value&&g["Pane-outgoing"]),"data-side":"backward","data-visible":!n.value&&(h||p!=="exit"),position:n.value?"absolute":"relative",inert:l,children:e(de,{children:e(Le,{buttonLabel:x,cancellationPolicyLink:L?e(me,{tone:"monochrome",onClick:R,children:e(ve,{children:k})}):void 0})})})}),e(A,{when:()=>h?n.value:p!=="exited",children:e(q,{className:O(g.Pane,!n.value&&g["Pane-outgoing"]),"data-side":"forward","data-visible":n.value&&(h||p!=="enter"),position:n.value?"relative":"absolute",inert:T,children:e(Ee,{body:o.policyBody,loading:o.loading,error:o.error})})})]})})})})}const Ne=Ce("ApplePaySubscriptionConsentModal");function Pt({supportedNetworks:y,color:C}){const{acceleratedWalletPaymentMethods:w,applePaySessionHandler:S,inMemoryApplePayParts:{buttonStatus:r,paymentSheetError:b}}=ne(),i=N(()=>{const t=S.value;return t?.createSession==null||t.showApplePayPaymentSheet==null?null:{createSession:t.createSession,openApplePayPaymentSheet:t.showApplePayPaymentSheet}}),c=z({status:"rendered"});V(()=>{const t=i.value!=null,H=r.value;t&&H.status==="not_rendered"?U(()=>{r.value=c.current}):!t&&H===c.current&&U(()=>{r.value={status:"not_rendered"}})}),G(()=>()=>{r.value===c.current&&(r.value={status:"not_rendered"})},[r]);const k=fe(),L=z(null),{observability:a,i18n:o,checkout:f}=D(),{wallets:s}=f,n=K(_e()),u=N(()=>ae({hasSubscription:oe({checkout:f}),isApplePayAvailable:w.value.some(({name:t})=>t==="APPLE_PAY"),variant:n.value})),{showOverlay:I,hideOverlay:h}=ge(),p=Ae(void 0,Ne),l=F(!1),T=v(()=>{l.value=!0,a.log("apple_pay_subscription_consent_modal_opened","Apple Pay subscription consent modal opened")},[l,a]),M=v((t="dismissed")=>{l.value&&(l.value=!1,a.log("apple_pay_subscription_consent_modal_closed","Apple Pay subscription consent modal closed",{reason:t}))},[l,a]),x=()=>{a.log("apple_pay_button_clicked_while_loading","Apple Pay button clicked while already loading the payment sheet. Ignoring click.")},E=()=>{a.error(new we("Apple Pay button clicked without a ready session handler."))},R=t=>{if(s.activeSession.value?.wallet==="APPLE_PAY"){x();return}const Y=i.value;if(!Y){E();return}try{Y.openApplePayPaymentSheet(Y.createSession({supportedNetworks:y,...t&&{subscriptionConsent:t}}).session),t==="explicit_modal"&&s.activeSession.value?.wallet==="APPLE_PAY"&&a.log("apple_pay_subscription_consent_session_started","Apple Pay session started after subscription consent")}catch(d){const X={error:d,errorName:d instanceof Error?d.name:"Unknown",errorMessage:d instanceof Error?d.message:String(d),...d instanceof Error&&d.stack&&{errorStack:d.stack}};a.leaveErrorBreadcrumb("Failed to create Apple Pay session",X),b.value={type:"failed_to_create_session"},s.activeSession.value?.wallet==="APPLE_PAY"&&s.clearActiveSession({invokingWallet:"APPLE_PAY"})}},P=N(()=>u.value==="explicit_modal"),B=N(()=>l.value&&P.value&&i.value!=null&&s.activeSession.value==null);V(()=>{if(!l.value)return;(!P.value||i.value==null||s.activeSession.value!=null)&&(M("invalidated"),h(p))});const W=()=>{const t=s.activeSession.value;if(t?.wallet==="APPLE_PAY"){x();return}const H=u.value;if(P.value){if(t){a.log("apple_pay_subscription_consent_blocked_by_active_wallet","Apple Pay subscription consent blocked by another active wallet.",{activeWallet:t.wallet,requestedWallet:"APPLE_PAY"});return}if(!i.value){E();return}L.current?.focus({preventScroll:!0}),I(p);return}R(H)},m=()=>{B.value&&(a.log("apple_pay_subscription_consent_confirmed","Apple Pay subscription consent confirmed"),M("confirmed"),h(p),R("explicit_modal"))},Q=i.value!=null;return e(Z,{children:[e("button",{ref:t=>{L.current=t,k("apple_pay")(t)},className:O(j.ApplePayButton,j[C],ie.borderRadius,se({focusRing:"base"})),lang:o.locale,disabled:!Q,onClick:W,type:"button","aria-label":o.translate("brand.apple_pay"),"aria-haspopup":P.value?"dialog":void 0}),e(A,{when:()=>P.value||l.value,children:e(Be,{id:p,canConfirm:B,onShow:T,onHide:M,onConfirm:m})})]})}export{Pt as ApplePayButton};

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.