PageSourceSearch

https://shop.netgate.com/cdn/shopifycloud/checkout-web/assets/c1/h…ks-useShopPayProgressIntercepts.CnlV9rdf.js

js netgate.com collected 2026-09-24 08:29:25 UTC 7,023 bytes, 1 lines download raw bytes

1import{q as E,o as h,j as x,h as v,u as _,A as B}from"./esnext-vendor.D7ldIee_.js";import{N as m,$ as k,bz as D,bA as T,bB as V,m as G,bC as M,B as N,bD as R,u as O,v as W,w as q,an as z,O as Y,bE as X,bF as F,bG as H,bH as K}from"./addresses-is-address-empty.-MuOhIyI.js";import{bu as S,b2 as J,bo as w,bp as Q,bt as j,aG as $,z as Z,A as ee,bv as se,bw as I,bx as te}from"./hydrate.ByRIsqvd.js";function xe(){const{shopPay:e,checkout:t}=m(),{paymentMethods:n}=k(),r=t.installments.paymentMethodMustSupportInterestBearingLoans;return{creditCardDisabled:E(o=>{if(!o)return!1;const{expired:s,supportsInstallmentsInterestLoan:c,supportsInstallmentsSplitPayLoan:i}=o,l=D(n.value),p=o?.billingAddressValid&&o?.billingAddress.address.countryCode&&l?.supportedCountries.includes(o.billingAddress.address.countryCode)&&T(l?.availableLoanTypes,i,c);return!!(s||e.session.isInstallmentsSelected.value&&!p||r.value&&!c)},[n,r,e.session.isInstallmentsSelected])}}const oe={id:"fdc8128f690860079c498a10b90912e0f80562eb838162c450f12b65d69b0389",type:"query",name:"MsiCardEligibility",source:"query MsiCardEligibility($checkoutContextInput:CheckoutContextInput!){checkoutSession(checkoutContextInput:$checkoutContextInput){user{paymentMethods{...on CreditCard{id msiEligible __typename}__typename}__typename}__typename}}"},A=Object.freeze({}),ne=V(({checkout:e,graphql:t,shop:n,shopPay:r,source:a})=>{const o=e.proposal.negotiated.fields,s=h(()=>o.buyerIdentity.value?.presentmentCurrency),c=h(()=>G(o.paymentMethods.value??[])),i=h(()=>e.identity.current.value!=="shopPay"||!c.value||s.value!=="MXN"),l=h(()=>r.user.paymentMethods.value.filter(M).map(u=>u.id).sort().join(",")),d=t.shopPayGraphql.query(oe,{variables:{checkoutContextInput:{checkoutVersion:R({source:a}),checkoutIdentifier:a.checkoutSessionIdentifier??"unknown",shopifyDomain:n.myshopifyDomain,shopId:N(n.id)}},skip:()=>i.value});let p=l.peek(),P=s.peek();return x(function(){const g=l.value,y=s.value,U=g!==p||y!==P;p=g,P=y,!(!U||i.peek())&&d.refetch({deduplicate:!0})}),{eligibilityByCardId:h(()=>{if(i.value)return A;const u=d.data.value?.checkoutSession?.user?.paymentMethods;if(!u)return A;const g={};for(const y of u)y.__typename==="CreditCard"&&(g[y.id]=y.msiEligible??!1);return g}),error:d.error,loading:d.loading}});function Be(e){if(e?.method.type!=="wallet")return!1;switch(e.method.name){case"APPLE_PAY":return q(e);case"GOOGLE_PAY":return W(e);case"PAYPAL_EXPRESS":return O(e);default:return!1}}const L=S.get("base")??0;S.get("slow");function De({children:e,open:t=!1,...n}){const a=J(t,"slow")==="entered",{isAppLayout:o}=w(),s=Q(),{checkoutProtocolModalEventSignal:c}=z();return v(()=>{const i=l=>{c.value=l==="modal_open"?"redesign":"none",s.notify({checkout_ui:{type:l,payload:{duration:L}}})};if(!(!a||!o))return i("modal_open"),()=>{i("modal_close")}},[a,o,s,c]),_(j,{size:"large",open:t,...n,children:e})}function Te(){const{value:e}=k().paymentMethods,{billingAddress:t,billingAddressOption:n}=Y(),r=$(),{shopPay:a,checkout:{address:o}}=m(),s=X(n.value==="shipping"?r.value:t.value,{extendedAddressMode:o.extendedAddressMode}),{eligibilityByCardId:c}=F(ne),i=a.session.selectedPaymentMethod.value,l=H(e),d=i!=null&&M(i)?c.value[i.paymentAttributes.id]??!1:!1;
1return({sessionToken:P,creditCardInstallments:b,msiEligibleCard:u=d}={})=>{const g=a.session.hsaRequested.peek();return{method:{type:"wallet",name:"SHOP_PAY",walletContent:{paymentMethod:"CREDIT_CARD",sessionToken:P,billingAddress:s,paymentMethodIdentifier:K(e),...b!=null&&b>0&&{creditCardInstallments:b},...u&&{msiEligibleCard:u},...l&&{hsaRequested:g}}}}}}const ae="/cdn/shopifycloud/checkout-web/assets/c1/assets/apay-logo-light.BOpRNbfJ.svg",le="/cdn/shopifycloud/checkout-web/assets/c1/assets/apay-logo.qbCmTpxR.svg",ie="/cdn/shopifycloud/checkout-web/assets/c1/assets/applepay-logo-borderless-light.D4uI0NI6.svg",re="/cdn/shopifycloud/checkout-web/assets/c1/assets/applepay-logo-borderless.BpIqGUgE.svg",C="/cdn/shopifycloud/checkout-web/assets/c1/assets/applepay-logo.BVeJpuwf.svg",ce="/cdn/shopifycloud/checkout-web/assets/c1/assets/bwp-logo-light.Be3NC6rq.svg",de="/cdn/shopifycloud/checkout-web/assets/c1/assets/bwp-logo.BRDn9X4f.svg",ue="/cdn/shopifycloud/checkout-web/assets/c1/assets/gpay-logo-light.B_DsI0cq.svg",pe="/cdn/shopifycloud/checkout-web/assets/c1/assets/gpay-logo.BbJVlra3.svg",ge="/cdn/shopifycloud/checkout-web/assets/c1/assets/paypal-logo-light.Do6ddnMD.svg",ye="/cdn/shopifycloud/checkout-web/assets/c1/assets/paypal-logo.Q2f7XzPy.svg",he="/cdn/shopifycloud/checkout-web/assets/c1/assets/shop-pay-logo-light.Ts-yoc2V.svg",me="/cdn/shopifycloud/checkout-web/assets/c1/assets/shop-pay-logo.yJ-5VMKh.svg",Pe="/cdn/shopifycloud/checkout-web/assets/c1/assets/venmo-logo-light.Nme_SAlP.svg",be="/cdn/shopifycloud/checkout-web/assets/c1/assets/venmo-logo.DabXQIZQ.svg",fe="e5syv",_e="_7NPtB",Ie="XGA28",Ae="gKSKB",Ce="DWmRr",ve="RULId",ke="SMmkH",Me="EpCJ3",Se="_705vE",we="Zxnlh",f={walletLogo:fe,xxxsmall:_e,xxsmall:Ie,xsmall:Ae,small:Ce,medium:ve,large:ke,AmazonPayLogoVerticalAlignment:Me,BuyWithPrimeLogoVerticalAlignment:Se,ShopPayLogoVerticalAlignment:we};function Ve({size:e="medium",wallet:t,invertColor:n=!1}){const r=Z(),a=ee(r);let o=se();n&&(o=o==="light"?"dark":"light");const{i18n:s,observability:c}=m(),i={amazon_pay:{iconUrl:le,customClassName:"AmazonPayLogoVerticalAlignment",lightIconUrl:ae,altText:s.translate("brand.amazon_pay")},APPLE_PAY:{iconUrl:C,lightIconUrl:C,altText:s.translate("brand.apple_pay")},APPLE_PAY_BORDERLESS:{iconUrl:re,lightIconUrl:ie,altText:s.translate("brand.apple_pay")},buy_with_prime:{iconUrl:de,customClassName:"BuyWithPrimeLogoVerticalAlignment",lightIconUrl:ce,altText:s.translate("brand.buy_with_prime")},GOOGLE_PAY:{iconUrl:pe,lightIconUrl:ue,altText:s.translate("brand.google_pay")},PAYPAL_EXPRESS:{iconUrl:a?be:ye,lightIconUrl:a?Pe:ge,altText:a?s.translate("brand.venmo"):s.translate("brand.paypal")},SHOP_PAY:{iconUrl:me,customClassName:"ShopPayLogoVerticalAlignment",lightIconUrl:he,altText:s.translate("brand.shop_pay")}};if(!(t in i))return c.log("wallet_logo_unsupported_wallet_encountered","Unsupported wallet type in WalletLogo",{wallet:t,severity:"warning"}),null;const l=i[t],d=o==="light"?l.lightIconUrl:l.iconUrl,p=[f.walletLogo,f[e],l.customClassName&&f[l.customClassName]].filter(Boolean).join(" ");return _("img",{src:d,className:p,alt:l.altText})}function Ge(){const{i18n:e}=m(),{isWebLayout:t}=w();return({offerGuestCheckout:n=!1}={})=>n&&t?{message:e.translate("payment_errors.processing_error_checkout_as_guest",{checkout_as_guest_link:e.translate("account_management.checkout_as_guest_link")}),messageNode:e.translate("payment_errors.processing_error_checkout_as_guest",{checkout_as_guest_link:_(te,{})}),target:I}:{message:e.translate("payment_errors.processing_error"),target:I}}function Ne(...e){const[t,n]=e,r=B(n),{shopPay:{progressInterceptor:a}}=m();r.current=n,v(()=>a.intercept(t,()=>r.current()),[a,t])}export{L as M,De as O,ne as S,Ve as W,Ne as a,Ge as b,Te as c,Be as i,xe 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.