PageSourceSearch

https://www.alexander-marcus.com/cdn/shopifycloud/checkout-web/assets/c1/0e9ee714.Cnsf3p8Q.js

js alexander-marcus.com collected 2026-10-09 17:53:52 UTC 13,790 bytes, 1 lines download raw bytes

1import{u as e,S as t,k as n,q as r,T as a,s}from"./2c1ab0fe.qpvfywqb.js";import{f as o,j as i,eg as l,aj as u,b as c,br as d,cj as p,eh as h,ei as m,k as y,x as f,v as g,bM as v}from"./164ad2e3.DcJn775M.js";import{e as _,d2 as b,dj as P,d1 as k,o as E,bD as S,Z as I,dk as C,aa as R,X as B,aO as w,b3 as A,dl as L,dm as x}from"./4b4bc88f.DkycdxSK.js";import{S as N}from"./39921a74.C0GzP1-7.js";import{u as j}from"./7a8217fd.BSo0j5mC.js";import{a as M,u as U,b as D,e as O}from"./e3e348f2.qdNJPs68.js";import{s as T}from"./ccdf3592.DmQuNZVR.js";import{d as F}from"./f67abd2c.CNaB0QaR.js";import{U as G}from"./app.DH8n-1bp.js";import{g as q,a as W,b as J}from"./9dba8418.4R19B40l.js";import{S as $}from"./71b60e0a.DfPLdYsH.js";import{b as H,U as Y}from"./24773686.NjNSWG1C.js";import{v as K,b as Q}from"./1f5e7811.DBGnR3_R.js";import{u as X}from"./22345fd4.Bc95vVsB.js";import{u as Z,a as z,b as V}from"./ec391382.CmRYZq9D.js";function ee({line:n}){const{i18n:r,source:a}=_(),s="paymentCollection"===a.type,{title:l,lineAmount:u}=n,c=0===u.amount?r.translate("shipping.free_rate_label"):r.formatCurrency(u.amount,{currency:u.currencyCode,form:"short"}),d=0===u.amount?"uppercase":void 0;return e(o,{children:[l,s?null:e(t,{children:[" · ",e(i,{type:"strong",letterCase:d,children:c})]})]},l)}const te="shop-pay-hsa-details",ne=`${te}-description`;function re(){const{checkout:e,shop:t,shopPay:r}=_(),a=e.negotiator.current.fields.paymentMethods,{paymentLines:s}=e.negotiator.parts,o=j();return n(()=>{const n=P(a.value),i=t.hasFlagEnabled(k)&&function({identity:e}){return"shopPay"===e.current.value}({identity:e.identity})&&("ELIGIBLE"===n||"ELIGIBLE_LMN_REQUIRED"===n||"ELIGIBLE_LMN_NOT_REQUIRED"===n||"MIXED_CART"===n),{freeOrder:l,giftCard:u,storeCredit:c,redeemables:d}=o.value,p=l||u||c||d;if(!i||r.session.isInstallmentsSelected.value||p)return!1;const h=r.session.selectedPaymentMethod.value;if(h)return"CREDIT_CARD"===h.paymentMethod;const m=s.value[0]?.method,y="wallet"===m?.type&&"SHOP_PAY"===m.name?m.walletContent:void 0,f=null!=y&&"paymentMethod"in y&&"CREDIT_CARD"===y.paymentMethod;return"direct"===m?.type||f})}function ae(){const{checkout:e,shopPay:t}=_(),r=re();return n(()=>r.value&&b(e.proposal.negotiated.fields.paymentMethods.value)&&t.session.hsaRequested.value)}function se(){const{i18n:a,shopPay:s,checkout:i}=_(),d=n(()=>P(i.proposal.negotiated.fields.paymentMethods.value)),p=n(()=>"ELIGIBLE"!==d.value&&"ELIGIBLE_LMN_REQUIRED"!==d.value&&"ELIGIBLE_LMN_NOT_REQUIRED"!==d.value),h="MIXED_CART"===d.value,m=n(()=>!p.value&&s.session.hsaRequested.value),y=h?a.translate("payment.shop_pay_hsa.mixed_cart_description"):a.translate("payment.shop_pay_hsa.description"),f=r(e=>{p.value||s.session.unstable_setHsaRequested(e)},[p,s.session]);return e(c,{background:"base",colorLayer:"control",border:"base",borderRadius:"base",children:[e("span",{id:ne,hidden:!0,children:y}),e(l,{id:te,open:h||m.value,summary:e(c,{padding:"base",children:e(N,{label:a.translate("payment.shop_pay_hsa.label"),checked:m.value,disabled:p.value,onChange:f,icon:"none","aria-controls":`${te}-content`,"aria-describedby":ne})}),content:e(t,{children:[e(u,{}),e(c,{padding:"base",children:e(o,{type:"small",color:"subdued",children:y})})]})})]})}function oe(e){return a(()=>e.some(e=>{if("customField"===e.kind)return E(e).required.peek();const t=E(e);return t.behaviors.peek().blockProgress&&t.capabilities.blockProgress}),[e])}function ie(){const e=_(),{shop:t}=e,r=M(),a=S(),s=t.hasFlagEnabled(I);return n(()=>C(e.checkout,{showPayWithApplePayButton:r.value,paymentFullyCoveredByRedeemablesAndGiftCards:a.value,isApplePayInShopPayKillswitched:s}))}function le(){const e=_(),{checkout:t,shopPay:r}=e,a="shopPay"===t.identity.current.value,s=U().value,o=function(){const{checkout:{identity:e,negotiator:t}}=_(),{paymentLines:r}=t.parts,{inMemoryGooglePayParts:{paymentSheetOpenPromise:a}}=R(),s=function(){const{persistedGooglePaySignal:e}=R(),{checkout:t}=_();return n(()=>{const n=e.value?.receiptIdForPaymentFailure,r=t.latestReceipt.value;return Boolean("failed"===r?.status&&"payment"===r?.failure?.type&&n&&r?.id===n)})}();return n(()=>"googlePay"===e.current.value&&!!B(r.value,"GOOGLE_PAY")&&(void 0!==a?.value||s.value))}().value,i=D().value,l=!a&&s&&!i,u=!a&&o,{showApplePay:c,isApplePayInShopPay:p}=ie().value,h=O(),m=function(){const e=d(),t=e?.config;return"NATIVE"===t?.payActionType}();return{kind:T(t,{showPayWithPayPal:l,showApplePay:c&&!i,showPayWithGooglePay:u,isEmbeddedCheckout:h,shouldRenderCheckoutProtocolButton:m,isInstallmentsSupported:e.checkout.installments.isSupported.value,isInstallmentsSelected:r.session.isInstallmentsSelected.value}),showPayWithPayPal:l,isApplePayInShopPay:p,shouldDeferWalletToReview:i}}function ue(e){return Promise.resolve().then(()=>e())}function ce({existing:e,scope:t,next:n}){return[...e.filter(e=>!function(e,t){return!!e&&(e===t||e.startsWith(`${t}.`))}(e.target,t)),...n]}var de=(e=>(e.BlankEmail="blank_email",e.BlankPhone="blank_phone",e.InvalidEmail="invalid_email",e.InvalidPhone="invalid_phone",e.ShopAccountsInvali
1dEmail="shop_accounts_invalid_email",e.ShopAccountsInvalidPhone="shop_accounts_invalid_phone",e.ShopAccountsPhoneLimitReached="shop_accounts_phone_limit_reached",e))(de||{});function pe(){const{progressContinueWithResult:e}=he();return{progressContinue:r(async()=>"continue"===await e(),[e])}}function he(){const{source:e,observability:t,shopPay:{progressInterceptor:o},checkout:{negotiator:i}}=_(),{createUnverifiedUser:l}=function(){const e=function(){const{shopPay:e,checkout:{negotiator:t}}=_(),{email:r}=t.parts;return n(()=>{const t=r.value.trim(),n=e.userVerification.value,a=K(t,de.BlankEmail),s=Q(t,de.InvalidEmail),o="invalid"===n.status&&n.email===t?de.InvalidEmail:void 0;return{email:t,emailError:a||s||o}})}(),{source:{checkoutSessionIdentifier:t},url:a,shopPay:o}=_(),i=o.user.phoneNumber,l=o.user.unstable_setPhoneNumber,{transactionParams:u}=o.config,c=o.user.isAuthenticatedUser,d=(()=>{const{shopPay:e}=_(),t=e.signup.phoneNumber,r=e.signup.phoneCountryCode,a=X(),o=s(a.isPhoneNumberUtilLoaded),i=s(a.validatePhoneNumber),l=e.user.isAuthenticatedUser;return n(()=>({missingRequiredMobilePhoneNumber:Boolean(!l.value&&(!t.value||o.value&&!i.value(t.value,r.value,!0)))}))})(),p=r(async(n=!0)=>{const{email:r,emailError:s}=e.value;if(c.value||i.value)return{status:"skipped"};if(!u)return{status:"failed",errors:[{field:[],code:"missing_content",message:"Transaction params are missing"}]};const h=[];if(s&&h.push({field:["email"],code:s,message:"email is blank or invalid"}),d.value.missingRequiredMobilePhoneNumber&&h.push({field:["phone"],code:de.InvalidPhone,message:"Mobile phone number is missing or invalid"}),h.length>0)return{status:"failed",errors:h};let m=n?o.signup.hcaptchaToken.value:void 0;if(!m)try{const e=o.signup.captchaRef.value,t=await(e?.execute({async:!0}));t&&(m=t.response)}catch(g){return"challenge-closed"===g?{status:"failed",errors:[]}:{status:"failed",errors:[{field:["hcaptcha"],code:String(g),message:"A captcha error was caught and handled"}]}}let y=null;try{const e=o.signup.phoneNumber.value||"";y=await fetch(a.shopPayCreateUnverifiedUser(),{method:"POST",body:JSON.stringify({email:r,phone:e,hcaptcha_token:m,origin:"c1_unverified_user_signup",checkout_token:t,transaction_params:u}),headers:{"Content-Type":"application/json",accept:"application/json"}})}catch{return{status:"failed",errors:[{field:[],code:"unknown_error",message:"An error was caught and handled during API request"}]}}const f=await y.json();return 200!==y.status?Array.isArray(f?.errors)&&1===f?.errors.length&&"further_authorization_required"===f?.errors[0].code&&n?(o.signup.unstable_setHcaptchaToken(void 0),p(!1)):{status:"failed",errors:f?.errors||[{field:[],code:`response_with_http_error_${y.status}`,message:"Failed to create user"}]}:(l(f.parsed_phone),o.user.unstable_setEmail(r),o.user.unstable_updateFlow("authenticated_user"),{status:"success"})},[c,i,u,e,d,l,o,a,t]);return{createUnverifiedUser:p}}(),{handleCreateUnverifiedUserErrors:u}=function(){const{i18n:e,shopPay:t,checkout:{validation:{contactErrors:{emailInputError:n}}}}=_(),s=p(),{openModal:o}=H(),i=a(()=>({[de.BlankEmail]:e.translate("field_errors.email_blank"),[de.InvalidEmail]:e.translate("field_errors.email_invalid"),[de.ShopAccountsInvalidEmail]:e.translate("field_errors.email_invalid")}),[e]),l=a(()=>({[de.BlankPhone]:e.translate("mobile_phone_number.mobile_phone_invalid"),[de.InvalidPhone]:e.translate("mobile_phone_number.mobile_phone_invalid"),[de.ShopAccountsInvalidPhone]:e.translate("mobile_phone_number.mobile_phone_invalid"),[de.ShopAccountsPhoneLimitReached]:e.translate("mobile_phone_number.phone_limit_reached")}),[e]);return{handleCreateUnverifiedUserErrors:r(e=>{if(0===e.length)return;const r=e.map(e=>e.code),a=i[r.find(e=>e in i)],u=l[r.find(e=>e in l)];return a||u?(n.value=a,t.signup.unstable_setPhoneError(u)):o({type:Y.Generic}),Promise.resolve().then(()=>s())},[i,n,s,o,l,t.signup])}}(),c=p(),d=r(async()=>{try{const e=await l(),n=await o.runInterceptors();i.setValidationErrors(ce({existing:i.validationErrors.value,scope:h,next:q(n)}));const r=W(n);if(!r){const e=J(n);t.log("shop_pay_progress_interceptor_error_reported","Shop Pay progress interceptor reported an error in useShopPayProgressContinue",{interceptorErrors:e})}if("failed"===e?.status)return u(e.errors),"blocked";if(!r)return ue(c),"blocked"}catch(r){const a=r;return F(a.message)||function(e){return G.includes(e.name)}(a)?t.log("shop_pay_progress_continue_unactionable_error","Shop Pay progress continue swallowed an unactionable error in useShopPayProgressContinue",{errorName:a.name,errorMessage:(n=a.message,n?.slice(0,me)),sourceType:e.type}):t.error(a,{errorClass:$.ShopPayProgressIntercept,severity:"error",metadata:{source:{type:e.type},checkout:{token:e.checkoutSessionIdentifier??"checkout_identifier_undefined"}}}),"errored"}var n;return"continue"},[l,c,u,o,i,t,e]);return a(()=>({progressContinueWithResult:d}),[d])}const me=200;function ye(){const{source:e,checkout:t,shop:n,shopPay:a,observability:s,userEvents:o}=_(),i=a.installments,l=a.user.installments;return r(()=>{l.isRejected.value&&!l.isRetryable.value||(i.unstable_setModalOpen(!0,"checkout_button"),s.log("installments_modal_opened","[Installments] Modal opened"),o.monorailEvent({schemaId:"shopify_pay_payment_page_ui_interaction/1.2",payload:{...w(e,t,n),action:"continue_with_installments"}}))},[i,l,s,o,e,t,n])}function fe(e){const{kind:t}=le(),n=function(){const{showApplePay:e}=ie().value,t=R().applePaySessionHandler.value,n=t?.onClickHandler??null,a=V({breadcrumbPrefix:x,isApplePay:!0}),s=r(()=>{n?.({validateButtonPress:a})},[n,a]);return e&&n?s:null}(),s=function(){const{checkout:{identity:e},observability:t,shopPay:n}=_(),s=m(),{nextPage:o}=f(),{progress:i}=g(),{progressContinue:l}=pe(),u=function(){const{observability:e,source:t,router:n}=_(),{currentDetour:r,currentPage:s}=y().value,{nextPage:o,previousPage:i}=f();return a(()=>({ensureShopPayURL:()=>{s||n.navigate("/shoppay",{replace:!0})},logError:(n,{result:a}={})=>{e.error(new A(n,{groupingHash:"ShopPayError::InvalidPageLogger"}),{severity:"error",metadata:{source:{type:t.type},checkout:{token:t.checkoutSessionIdentifier||t.sourceId},event:{currentDetour:JSON.stringify(r),currentPage:JSON.stringify(s),nextPage:JSON.stringify(o),previousPage:JSON.stringify(i),result:JSON.stringify(a)}}})}}),[r,s,e,o,i,n,t.checkoutSessionIdentifier,t.sourceId,t.type])}(),c=v(),d=Z(),p=z(),h=V({breadcrumbPrefix:L}),b=r(async()=>
1{if(h()){d();try{n.session.unstable_setButtonProgressing(!0),await l()?(t.leaveErrorBreadcrumb(`${L} - progress`),await i("shop-pay-progress-button-press",e=>{t.leaveErrorBreadcrumb(`${L} - progression`,{status:e.status,nextPageId:o.id}),"thankYou"!==o.id&&u.logError("Shop Pay button triggered progression when next page is not `thankYou`",{result:e})},{onProgressBlocked:()=>{p("progress_blocked"),t.leaveErrorBreadcrumb(`${L} - progress blocked`,{nextPageId:o.id}),u.ensureShopPayURL()}}),c.notify({checkout_in_progress:!0})):(p("progress_continue"),t.leaveErrorBreadcrumb(`${L} - progress continue failed`,{nextPageId:o.id}),"thankYou"!==o.id&&(u.logError("Shop Pay button is pressed when next page is not `thankYou`"),u.ensureShopPayURL()))}finally{n.session.unstable_setButtonProgressing(!1)}}},[h,d,p,n.session,l,t,i,o,u,c]);return"shopPay"!==e.current.value||s?null:b}(),o=function(){const{checkout:{identity:e},shopPay:t,observability:n}=_(),a=m(),{progressContinue:s}=pe(),o=ye(),i=r(async()=>{t.session.unstable_setButtonProgressing(!0),n.log("installments_cta_clicked","[Installments] Continue to purchase button clicked");try{await s()&&o()}finally{t.session.unstable_setButtonProgressing(!1)}},[t.session,n,s,o]);return a||"shopPay"!==e.current.value||!t.session.isInstallmentsSelected.value?null:i}();return"applePay"===t&&n?n:"installments"===t&&o?o:"default"!==t&&"checkoutProtocol"!==t||!s?e:s}const ge={Button:"liLqL",Sparkles:"b71fw"},ve={Button:"OJbFq","Button-prefersDarkMode":"LhoYl",WalletLogoContainer:"wNUaA"},_e={StickyFooter:"XR3sZ",StickyFooterExperiment:"_4fPUS",StickyFooterAtBottom:"_5FRe7",StickyFooterBuffer:"ZDqoP",SDKStickyFooterBuffer:"zANgR",EmbedStickyFooterBuffer:"_3A6oJ",ButtonContainer:"K8y4t",SDKButtonContainer:"_7S3NK",EmbedButtonContainer:"SdyJr"},be={Wrapper:"GsMGr",Container:"eDhAI",Section:"P0xJW","Container-fixed":"iRlFp","Container-fixed-entering":"_24aJk","Container-fixed-exiting":"ktbnR","Container-fixed-enter":"PCKgT","Container-fixed-exited":"DvZWz",Shadow:"COpTB","Shadow-enter":"_0hDB9","Shadow-exiting":"P1NPi","Shadow-exited":"lQN1j"};export{ee as D,se as H,re as a,ve as b,_e as c,ae as d,pe as e,ye as f,ue as g,le as h,ie as i,he as j,oe as k,be as l,ce as r,ge as s,fe 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.