PageSourceSearch

https://tassels.pk/cdn/shopifycloud/checkout-web/assets/c1/d56ce0bb.DXQ9mIKr.js

js tassels.pk collected 2026-10-03 21:39:52 UTC 7,812 bytes, 1 lines download raw bytes

1import{u as e,w as a,l,s as t,m as s,q as n,v as o,t as i,C as r,f as c,z as p,S as d}from"./2c1ab0fe.GMbxnz74.js";import{S as u,aZ as m,cj as v,a9 as b,ck as h,b3 as y,Q as f,aH as _}from"./4c290a1e.DMQ9xOwP.js";import{c as P,c3 as S,a9 as j,c4 as g,c5 as w,h as A,b6 as k,B as L,P as C,L as E,o as z,l as N,ay as H,I as x,H as M,bz as Y,ae as q,c6 as I,c7 as W,M as B,Q as F}from"./164ad2e3.B4L1MRYB.js";import{A as R}from"./app.DGSHpWaV.js";import{T as Q}from"./7b0c98ea.B54fWMkZ.js";import{S as O,b as T}from"./e3e348f2.DAaElZ9-.js";import{c as D}from"./31cc568e.CVMsqQ1x.js";import{s as G}from"./dffdfb34.5SAJ7sQR.js";import"./9f047e05.DwjCPgK0.js";import"./0a7dffce.BcNpdEJk.js";import"./5fda1420.BLaDhoyL.js";import"./60a453ce.Cg9T1Gj2.js";import"./21cc90a2.Ccyorzx_.js";import"./bb728e1c.CHt2JlPY.js";import"./ca5e9c49.DIuWAPOX.js";import"./0c0ad074.Dl7fvU-G.js";import"./cb38e5c2.Hmwo5zs2.js";import"./53bbdad9.oGVvLPt2.js";import"./945a08d6.c61SBjtG.js";import"./2fdb3dd3.DyNzUnPi.js";import"./0e67bd3b.DUa61rto.js";import"./74835653.DeaMa2xw.js";import"./29034f35.DARWjbfB.js";import"./ac5a19ff.BchXgW63.js";import"./47b970b2.C6dKnXeF.js";import"./0727407f.DihGPUji.js";import"./064f6ac1.DPGuEQ9h.js";import"./efa0389a.ZcaEqvMP.js";import"./f1968089.lfvhhPdb.js";import"./55098bf1.SNyaSeYe.js";import"./cb5cf153.CBk88ZOK.js";import"./ed9f2238.BDG257lM.js";import"./ccdf3592.y_I-TghG.js";import"./a422df8c.B9fLTQ4u.js";import"./79974aab.DPBsbYrf.js";import"./d22d2b80.CPLrR--0.js";import"./f49d4216.C2ooXZfg.js";function J({body:a}){return e(g,{children:e(j,{dangerouslySetInnerHTML:{__html:a.value??""},scrollableContent:"all"})})}function K({body:l,loading:t,error:s}){const{i18n:n}=u();return e(a,{when:s,fallback:e(a,{when:t,fallback:e(J,{body:l}),children:e(P,{gap:"base",children:[e(S,{lines:2,lastLineSize:"large"}),e(S,{lines:3,lastLineSize:"small"}),e(S,{lines:2,lastLineSize:"base"}),e(S,{size:"extraLarge",lastLineSize:"large",lines:1}),e(S,{lines:7,lastLineSize:"small"}),e(S,{lines:3,lastLineSize:"base"})]})}),children:n.translate("bad_request.title")})}const U="JtAjb",V="otCH1";function X({id:i,canConfirm:r,onConfirm:c,onHide:p,onShow:d}){const{i18n:b,shop:h}=u(),{checkoutProtocolModalEventSignal:y}=m(),f=b.translate("payment.purchase_options_cancellation_policy_label"),_=h.merchantPolicies.find(({handle:e})=>e===O),S={handle:O,shopId:h.id,shopName:h.name,squareLogo:h.brandSettings?.squareLogo,name:f,url:_?.url??""},j=v(w,{defaultPolicy:S,policies:[S]}),g=l(!1),q=t(()=>{g.current&&"applePaySubscriptionConsent"===y.value&&(y.value="none"),g.current=!1},[y]);s(()=>q,[q]);const I=n(!1),W=n(!1),B=l(null),F=A(),R=k(I.value,"slow"),G=I.value||W.value,J=!I.value||W.value,X=t(e=>{B.current=e,e&&(e.dataset.inertSupported=String("inert"in e))},[]),Z=b.translate("wallets.continue_with",{walletName:b.translate("brand.apple_pay")}),$=I.value?D(f):b.translate("payment.purchase_options_subscription_confirmation_title"),ee=t(()=>{j.show(),I.value=!0},[j,I]),ae=t(()=>{j.hide(),I.value=!1},[j,I]),le=t(()=>{W.value=!0,j.hide(),q(),p()},[W,j,q,p]),te=t(()=>{I.value=!1,W.value=!1,g.current=!0,y.value="applePaySubscriptionConsent",d()},[I,W,y,d]);return e(Y,{id:i,heading:e(P,{direction:"inline",alignItems:"center",gap:"base",children:[e(a,{when:I,children:e(H,{type:"button",padding:"small-400",borderRadius:"base",accessibilityLabel:b.translate("account_management.back"),onClick:ae,children:e(x,{type:"arrow-left",size:"base"})})}),e(M,{level:1,autoFocus:!0,children:$},I.value?"policy":"consent")]}),accessibilityLabel:$,onShow:te,onHide:le,actionLayout:"stacked",primaryAction:e(N,{variant:"primary",type:"button",inlineSize:"fill",disabled:!r.value,onClick:c,children:Z}),children:e(L,{className:"VqsW7",children:e(Q,{contentRef:B,children:e(L,{ref:X,className:"c1X76",padding:"small-200",overflow:"hidden",children:[e(a,{when:()=>F?!I.value:"entered"!==R,children:e(L,{className:o(U,I.value&&V),"data-side":"backward","data-visible":!I.value&&(F||"exit"!==R),position:I.value?"absolute":"relative",inert:G,children:e(C,{children:e(T,{buttonLabel:Z,cancellationPolicyLink:_?e(E,{tone:"monochrome",onClick:ee,children:e(z,{children:f})}):void 0})})})}),e(a,{when:()=>F?I.value:"exited"!==R,children:e(L,{className:o(U,!I.value&&V),"data-side":"forward","data-visible":I.value&&(F||"enter"!==R),position:I.value?"relative":"absolute",inert:J,children:e(K,{body:j.policyBody,loading:j.loading,error:j.error})})})]})})})})}const Z=F("ApplePaySubscriptionConsentModal");function $({supportedNetworks:m,color:v}){const{acceleratedWalletPaymentMethods:P,applePaySessionHandler:S,inMemoryApplePayParts:{buttonStatus:j,paymentSheetError:g}}=b(),w=i(()=>{const e=S.value;return null==e?.createSession||null==e.showApplePayPaymentSheet?null:{createSession:e.createSession,openApplePayPaymentSheet:e.showApplePayPaymentSheet}}),A=l({status:"rendered"});r(()=>{const e=null!=w.value,a=j.value;e&&"not_rendered"===a.status?c(()=>{j.value=A.current}):e||a!==A.current||c(()=>{j.value={status:"not_rendered"}})}),s(()=>()=>{j.value===A.current&&(j.value={status:"not_rendered"})},[j]);const k=q(),L=l(null),{observability:C,i18n:E,checkout:z}=u(),{wallets:N}=z,H=p(I()),x=i(()=>h({hasSubscription:y({checkout:z}),isApplePayAvailable:P.value.some(({name:e})=>
1"APPLE_PAY"===e),variant:H.value})),{showOverlay:M,hideOverlay:Y}=W(),F=B(void 0,Z),Q=n(!1),O=t(()=>{Q.value=!0,C.log("apple_pay_subscription_consent_modal_opened","Apple Pay subscription consent modal opened")},[Q,C]),T=t((e="dismissed")=>{Q.value&&(Q.value=!1,C.log("apple_pay_subscription_consent_modal_closed","Apple Pay subscription consent modal closed",{reason:e}))},[Q,C]),D=()=>{C.log("apple_pay_button_clicked_while_loading","Apple Pay button clicked while already loading the payment sheet. Ignoring click.")},J=()=>{C.error(new R("Apple Pay button clicked without a ready session handler."))},K=e=>{const a=N.activeSession.value;if("APPLE_PAY"===a?.wallet)return void D();const l=w.value;if(l)try{l.openApplePayPaymentSheet(l.createSession({supportedNetworks:m,...e&&{subscriptionConsent:e}}).session),"explicit_modal"===e&&"APPLE_PAY"===N.activeSession.value?.wallet&&C.log("apple_pay_subscription_consent_session_started","Apple Pay session started after subscription consent")}catch(t){const e={error:t,errorName:t instanceof Error?t.name:"Unknown",errorMessage:t instanceof Error?t.message:String(t),...t instanceof Error&&t.stack&&{errorStack:t.stack}};C.leaveErrorBreadcrumb("Failed to create Apple Pay session",e),g.value={type:"failed_to_create_session"},"APPLE_PAY"===N.activeSession.value?.wallet&&N.clearActiveSession({invokingWallet:"APPLE_PAY"})}else J()},U=i(()=>"explicit_modal"===x.value),V=i(()=>Q.value&&U.value&&null!=w.value&&null==N.activeSession.value);r(()=>{Q.value&&(!U.value||null==w.value||null!=N.activeSession.value)&&(T("invalidated"),Y(F))});const $=null!=w.value;return e(d,{children:[e("button",{ref:e=>{L.current=e,k("apple_pay")(e)},className:o(G.ApplePayButton,G[v],_.borderRadius,f({focusRing:"base"})),lang:E.locale,disabled:!$,onClick:()=>{const e=N.activeSession.value;if("APPLE_PAY"===e?.wallet)return void D();const a=x.value;if(U.value)return e?void C.log("apple_pay_subscription_consent_blocked_by_active_wallet","Apple Pay subscription consent blocked by another active wallet.",{activeWallet:e.wallet,requestedWallet:"APPLE_PAY"}):w.value?(L.current?.focus({preventScroll:!0}),void M(F)):void J();K(a)},type:"button","aria-label":E.translate("brand.apple_pay"),"aria-haspopup":U.value?"dialog":void 0}),e(a,{when:()=>U.value||Q.value,children:e(X,{id:F,canConfirm:V,onShow:O,onHide:T,onConfirm:()=>{V.value&&(C.log("apple_pay_subscription_consent_confirmed","Apple Pay subscription consent confirmed"),T("confirmed"),Y(F),K("explicit_modal"))}})})]})}export{$ 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.