PageSourceSearch

https://www.clothingarts.com/cdn/shopifycloud/checkout-web/assets/c1/hooks-useWalletsMonorailTrack.ChGbeXsS.js

js clothingarts.com collected 2026-09-29 17:30:43 UTC 4,570 bytes, 1 lines download raw bytes

1import{f as M,h as P,q as u}from"./esnext-vendor.7EcvH7tF.js";import{bw as I,c6 as S,Q as l,H as g}from"./utilities-previous.DaWdZv41.js";import{iX as x}from"./hydrate.__QOXNN3.js";var D=(e=>(e.ApplePay="ApplePay",e.Checkout="Checkout",e.PayPalV6="PayPalV6",e.Venmo="Venmo",e.GooglePay="GooglePay",e.ShopifyPay="ShopifyPay",e.ShopPayApplePay="ShopPayApplePay",e))(D||{}),v=(e=>(e.Attempt="attempt",e.Success="success",e.Cancelled="cancelled",e.Failure="failure",e.Clicked="clicked",e.Initialized="initialized",e.NascarDrawerOpen="open",e.NascarDrawerClose="close",e))(v||{}),a=(e=>(e.Express="express",e.PaymentMethod="payment_method",e))(a||{}),z=(e=>(e.InitCalled="spb_init_called",e.ClickAcceleratedClicked="spb_instrument_click__accelerated__clicked",e.ClickSheetClicked="spb_instrument_click__sheet__clicked",e.ClickAcceleratedInitialized="spb_instrument_click__accelerated__initialized",e.ClickSheetInitialized="spb_instrument_click__sheet__initialized",e.ClickAcceleratedSuccess="spb_instrument_click__accelerated__success",e.ClickSheetSuccess="spb_instrument_click__sheet__success",e.ClickAcceleratedCancelled="spb_instrument_click__accelerated__cancelled",e.ClickSheetCancelled="spb_instrument_click__sheet__cancelled",e.ClickAcceleratedFailed="spb_instrument_click__accelerated__failure",e.ClickSheetFailed="spb_instrument_click__sheet__failure",e.SheetLoaded="spb_instrument_sheet_loaded",e.AuthAcceleratedAttempt="spb_instrument_auth__accelerated__attempt",e.AuthSheetAttempt="spb_instrument_auth__sheet__attempt",e.AuthAcceleratedSuccess="spb_instrument_auth__accelerated__success",e.AuthSheetSuccess="spb_instrument_auth__sheet__success",e.AuthAcceleratedFailure="spb_instrument_auth__accelerated__failure",e.AuthSheetFailure="spb_instrument_auth__sheet__failure",e.AuthorizationAttempt="wallets_authorization_attempt",e.AuthorizationComplete="wallets_authorization_complete",e.CryptoModalCancelled="checkout_crypto_payment_modal__cancelled",e.CryptoModalCompleted="checkout_crypto_payment_modal__completed",e.CryptoModalRendered="checkout_crypto_payment_modal__rendered",e.CryptoModalWalletAction="checkout_crypto_payment_modal__wallet_action",e.CryptoModalError="checkout_crypto_payment_modal__error",e.RecoveryFlowInitiated="spb_instrument_recovery_flow__initiated",e))(z||{});function T(){const e=I();return M(()=>({screenWidth:typeof window>"u"?0:window.innerWidth,cartValue:e.value?.amount,currencyCode:e.value?.currencyCode}))}function q(e,t){const c=S(),{userEvents:s}=l(),r=T();P(()=>{const{defaultAttributes:n}=c.value;if(!n)return;const o=p(e),i=d({walletName:void 0,shopId:n.shopId,eventName:"spb_init_called",nascarData:{...r.value,walletsRenderedCount:t,walletsRenderedNames:o},walletType:"payment_method"});i&&s.monorailEvent(i)},[s,r.value,e,t,c])}function L({state:e,shopId:t,paymentMethods:c,nascarData:s}){const r=p(c);return d({walletName:"NascarDrawer",shopId:t,eventName:e,nascarData:{...s,walletsRenderedNames:r}})}function d({walletName:e,shopId:t,eventName:c,nascarData:s,walletType:r,ttl:n,eventSubtype:o}){const i=x();return i?F({eventName:c,shopId:t,defaultAttributes:i,nascarData:s,walletType:r,walletName:e,ttl:n,eventSubtype:o}):null}function F({eventName:e,shopId:t,defaultAttributes:c,nascarData:s,walletName:r,walletType:n,ttl:o,eventSubtype:i}){const{uniqToken:_,visitToken:m,microSessionId:k,microSessionCount:y=0,themeId:C,themeCityHash:f,contentLanguage:A,referer:b,checkoutToken:w}=c??{};return{schemaId:"shopify_wallet_checkout_track/6.3",payload:{event:e,eventSubtype:i??n??"express",appName:"checkout",pageType:"checkout",checkoutToken:w,instrumentId:r,checkoutOne:!0,uniqToken:_,visitToken:m,microSessionId:k,microSessionCount:y,shopId:t,themeId:C,themeCityHash:f||"",contentLanguage:A,referer:b,...o&&{ttl:o},...s&&{...s}}}}function V(e,t){return`${e?"spb_instrument_click__accelerated_":"spb_instrument_click__sheet_"}_${t}`}function R(e,t){return`spb_instrument_auth__${e?"accelerated":"sheet"}__${t}`}function p(e){return e.map(t=>t.name).join(",")}function O(e){const t=h(e);return u((c,s=a.Express)=>{const r=s===a.Express,n=V(r,c);t({event:n,walletType:s})},[t])}function j(e){const t=h(e);return u((c,s=a.Express)=>{const r=s===a.Express,n=R(r,c);t({event:n,walletType:s})},[t])}function h(e){const{userEvents:t,shop:{id:c}}=l();return u(({event:s,ttl:r,walletType:n,eventSubtype:o})=>{const i=parseInt(g(c),10),_=d({walletName:e,shopId:i,eventName:s,walletType:n,ttl:r,eventSubtype:o});_&&t.monorailEvent(_)},[t,c,e])}export{z as W,D as a,a as b,O as c,v as d,j as e,T as f,F as g,q as h,L as i,h as u};

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.