PageSourceSearch

https://capes.com/cdn/shopifycloud/checkout-web/assets/c1/page-Payment.Dt_HWmCo.js

js capes.com collected 2026-09-26 21:08:36 UTC 11,786 bytes, 1 lines download raw bytes

1import{u as e,k as C,f as bt,h as vt,p as Ct,S as f,i as m,T as _t,A as Et,q as Rt}from"./esnext-vendor.B9Da21W6.js";import{u as Mt,T as Ft,S as At,b as kt,G as Tt,c as wt,d as Bt,D as Dt,e as It}from"./useAddressMutationsWithNegotiation.qYbyFTyH.js";import{L as zt,P as Lt,R as xt,u as Ht,S as Nt}from"./RememberMeSection.Cvwu6d1U.js";import{A as c,L as Ot,W as d,cT as Ut,J as Vt,f as Wt,cU as qt,cb as Gt,s as Kt,bU as Yt,bT as Jt,cV as $t,p as S,_ as Qt,N as jt,U as l,cW as Xt,Y as F,k as x,m as Zt,bK as H,cX as ea,b as ta,P as aa,Q as ra,I as na,l as sa,cY as ce,H as ia,K as oa,M as la,cL as ca}from"./hydrate.DZ4YTm7p.js";import{u as ye,a as Pe,V as da,b as ua,c as ma,d as pa,e as ha}from"./components-PaymentMethodProgressionHost.DtGKVVH3.js";import{a as ya,u as Pa,b as ga}from"./hooks-useGeneralPaymentErrorMessage.EV5zhNz-.js";import{a as fa}from"./components-RedirectionNotice.module.CsVdFi0g.js";import{B as Sa}from"./BillingAddressSelector.DB4kH3hG.js";import{C as ba}from"./Captcha.kpGPI4W4.js";import{M as va}from"./MarketsProDisclaimer.BqGHM17j.js";import{b as Ca,d as _a,c as Ea,P as Ra,a as Ma}from"./Page.jjGbeNkl.js";import{u as Fa,P as Aa,R as ka,a as Ta,V as wa,S as Ba}from"./PaymentButtons.MV6WHZES.js";import{P as de}from"./hooks-useWalletsTimeout.CS-oFfve.js";import{u as Da,S as ue,T as Ia}from"./stopwatch.CfKlh48v.js";import{S as O,a4 as me,bR as za,an as La,af as N,cR as xa,ag as Ha,T as pe,l as Na,cS as Oa,bP as Ua,cd as Va,a6 as Wa,cT as qa,am as Ga,b4 as he}from"./addresses-is-address-empty.Bn2lNY_L.js";import{u as Ka}from"./graphql-PaymentSessionMutation.CAXCwUvV.js";import{I as Ya}from"./shop-pay-installments-monorail.BAOukcZ1.js";import{K as Ja}from"./KnownBuyerPaymentMethodSelector.pYr-ld5Z.js";import"./app.DbSrjjlA.js";import"./amazon-pay-useAmazonPayPaymentLine.Ju006AId.js";import"./PaymentIcon.CIva5Q4J.js";import"./PaymentLine.ClzCacf5.js";import"./localization-index.1YNaS8kx.js";import"./Theme-ThemeOverride.DZIcf8ya.js";import"./IncentiveBadge.DborNHa8.js";import"./Choice.DSKmQsTS.js";import"./Checkbox.DQyvbr9E.js";import"./hooks-useUpdateCheckoutAddress.DUYbpduS.js";import"./hooks-useShopPayExternalAppContext.DWwMuRnz.js";import"./helpers-derivations.Dug6X2_v.js";import"./redemption-promotions.DicFJEgz.js";import"./shared-buyer-consent.B_gDyRCR.js";import"./payment-usePaymentExemptionReason.B4VABxaE.js";import"./shop-pay-normalizeBuyerDetails.CCnGCeBZ.js";import"./hooks-useShopPayProgressIntercepts.C0rljcs-.js";import"./cvv-cvvBridge.B-VIACTq.js";import"./proposal-delegated-payment-instrument.Gc2rhfd3.js";import"./Popover.BScgzCsS.js";import"./hooks-useShowShopPayOptin.Br0M25ky.js";import"./AddressPresenter.BIgrto4P.js";import"./hooks-useReplaceShopPayInHistory.DPpLejwu.js";import"./Section.BlBY023l.js";import"./ChangeCompanyLocationLink.r3PUjspg.js";import"./BillingAddressForm.pnsu7UK8.js";import"./PhoneField.C0TeiZrn.js";import"./hooks-useSuppressShopPayModalOnLoad.DFOLDSdS.js";import"./ShopPayCaptcha.DPBCCrUk.js";import"./PaymentErrorBanner.DceAStMH.js";import"./PayButton-helpers.Cc_ffyKs.js";import"./cross-border-hooks.xPE4TSQ5.js";import"./hooks-usePaypalRowEffects.Dk4UUNlc.js";function $a(){const{i18n:a,shop:{developmentShop:n},url:r}=O();return n?e(d,{errorType:c.PaymentError,tone:"warning",children:a.translate("payment_errors.development_store_with_order_limit",{development_store_order_testing_docs_link:e(Ot,{href:r.developmentStoreOrderTestingDocs(),children:a.translate("payment_errors.development_store_order_testing_docs_link")})})}):null}const y=a=>e(F,{children:a});function Qa({hostedFieldsLoaded:a,children:n}){const{i18n:r,shop:s,source:u,checkout:o,observability:_}=O(),{giftCardsEnabled:A,discountCodesEnabled:p,acceptTipPayments:h}=s,{configuration:b}=o,i=o.latestReceipt.value,ge=Ut(),fe=p&&ge.value,{nextPage:P,previousPage:k}=Vt(),[Se,be]=C(!1),[ve,U]=C(!1),[Ce,_e]=C(!1),Ee=u.type==="simulated",V=me().buyerIdentity.value?.purchasingCompany,E=!!V,Re=u.type==="draftOrder",W=E&&Re,Me=za(),{cartLineChangeLoadingSignal:Fe}=La(),Ae=Fe.value,[q,T]=C(!1),[G,ke]=C(),{negotiate:K,progress:Te,progressing:we}=Wt(),Y=N().isBlocked.value,Be=xa(),w=Ha(),J=me(),$=J.paymentMethods,De=E&&!o.isShippingRequired.value,Ie=Fa(),R=!Be.value||w.value,{billingAddressOption:ze,directPaymentErrors:Le,generalPaymentError:Q,generalPaymentErrorCode:j,paymentLines:{value:v}}=pe(),xe=Na({shop:s,checkout:o,paymentMethods:$?.value}),He=v.some(t=>t.method.type==="wallet"||t.method.type==="walletsPlatformPaymentMethod"),Ne=!R&&o.isShippingRequired.value&&!He&&ze.value==="shipping"?!1:Oa({lines:v,paymentMethods:$?.value,purchasingCompany:!!V,isBillingAddressForced:!xe})||!R,X=pe().localizationExtensions.value,{value:Oe}=Ua(),Ue=Oe.length!==0,Z=R&&Ue||!R,B=v.some(t=>t.method.type==="direct"),{displayedPaymentMethods:Ve}=ye({experienceType:"list"}
1),ee=Pe(Ve).mode==="knownBuyerShared",We=qt().value,qe=Gt(),Ge=Kt({isPayWithPayPalButton:!0}).value.status==="error";Mt();const Ke=J.managedByMarketsPro,te=Y||Ee&&P.id!=="review"||qe.value&&Ge||Ae,{lastJourneyProgression:Ye}=N(),Je=async()=>{if(!te){T(!0);try{await Te("payment-form-submit",t=>{const M=t.status==="failed",L="receipt"in t&&t.receipt?.status==="failed"&&t.receipt?.failure?.type==="order",St=t.status==="success"&&"receipt"in t&&t.receipt.status==="failed";T(!1),_e(t.status==="fetch_failed"),U(M||L),be(St)})}catch(t){t instanceof Error&&ke(t)}finally{T(!1)}}},D=Yt(),$e=bt(()=>ya(Le)),I=i?.status==="failed",g=I&&i?.failure.type==="payment"?i.failure:void 0,ae=g?.code==="AUTHENTICATION_ERROR",Qe=I&&i?.failure?.type==="inventory"?i.failure:void 0,je=Ce,Xe=!!(ve||I&&i?.failure?.type==="order"),Ze=g!=null&&!ae,et=Jt(g),tt=Q.value&&!Va(j.value),at=Pa(Q.value,j.value),rt=r.translate("payment.title"),nt=r.translate("general.pay_now_button_label"),st=o.configuration.layout.isOnePage.value,it=$t(),ot=i?.status==="failed"&&i.failure.type==="payment"&&i.failure.code==="GENERIC_ERROR"&&v[0]?.method.type==="walletsPlatformPaymentMethod"&&v[0]?.method.name===Wa.AmazonPay;Da({stage:B&&!a?ue.Usable:ue.Complete,id:"Payment"}),Ka("payment");const re=!!g,ne=i?.id,se=!!(g&&qa.has(g.code));if(vt(()=>{if(!(D||!re||E)){if(se){_.log("payment_form_skip_negotiate_captcha","[PaymentForm] Skipped negotiate for CAPTCHA_REQUIRED receipt — handled by useHandleReceipt",{receiptId:ne});return}(async()=>await K({silenceViolations:["all"],fieldsToResolve:["paymentLines"]}))()}},[re,D,E,K,_,se,ne]),G)throw G;const lt=S("Checkout::Dynamic::Render","PAYMENT1"),ie=S("Checkout::Dynamic::Render","PAYMENT2"),oe=S("Checkout::Dynamic::Render","PAYMENT3"),le=S("Checkout::Dynamic::Render","PAYMENT4"),ct=S("purchase.checkout.payment-method-list.render-before"),dt=S("purchase.checkout.payment-method-list.render-after"),ut=b.visibility.showReductions,mt=Ga(),pt=Qt({base:!0,medium:!1}),ht=!mt.value||pt;let z=null;b.visibility.showAside?ht&&(z=e(ia,{above:"small",children:e(ce,{headerLevel:1,monorailSection:"payment"})})):z=e(ce,{headerLevel:1,monorailSection:"payment"});const yt=ut&&!W&&(A||p)?z:null,Pt=W||Me.value?!1:h&&!he(u),gt=Ke.value&&Z&&P.id!=="review",ft=q||we.value;return Ct(()=>{Ye.value.type==="failed"&&U(!0)}),e(f,{children:[e(Ia,{children:rt}),e(jt,{onSubmit:Je,disabled:q||Y,implicitSubmit:nt,children:e(Ca,{children:[e(_a,{children:[e(l,{customizations:lt,render:y}),e(ja,{genericPaymentError:Ze,shouldSuppressReceiptError:D,inventoryReservationFailure:Qe,isAmazonPaymentDeclineScenario:ot,networkFailure:je,orderFailure:Xe,paymentErrorMessage:et,processingFailed:Se}),e($a,{}),yt,Pt?e(f,{children:[e(Xt,{sectionId:"tips",children:e(Ft,{renderInSection:!0,headingLevel:1})}),e(l,{customizations:ie,render:y})]}):null,X.length>0&&e(f,{children:e(F,{accessibilityLabel:r.translate("localized_fields.additional_information.title"),children:e(x,{gap:"base",children:[e(Zt,{id:`${H}-localized-fields`,level:1,children:r.translate("localized_fields.additional_information.title")}),X.map((t,M)=>{const L=`${t.value.key}${M}`;return e(zt,{localizationExtension:t,index:M},L)})]})})}),e(f,{}),e(F,{accessibilityRole:"group",accessibilityLabelledBy:H,children:e(x,{gap:"base",children:[e(Lt,{headingId:H,autoFocus:!st}),e(m,{when:b.visibility.showStoreCreditRedemption,children:e(At,{})}),tt?e(d,{errorType:c.PaymentError,tone:"critical",children:at}):null,e(m,{when:$e,children:e(d,{errorType:c.PaymentError,tone:"critical",children:r.translate("payment.generic_incorrect_card_info")})}),ae?e(d,{errorType:c.PaymentError,tone:"critical",children:r.translate("payment_errors.three_d_secure_failed")}):null,e(l,{customizations:ct}),e(m,{when:b.visibility.showStoreCreditRedemption,children:e(kt,{})}),n,e(l,{customizations:dt}),e(m,{when:Ie,children:e(ba,{})})]})}),e(Tt,{}),h?e(l,{customizations:oe,render:y}):e(l,{customizations:ie,render:y}),Ne&&(o.isShippingRequired.value||he(u)||De)&&!it.value&&!(ee&&B)?e(Sa,{}):null,h?e(l,{customizations:le,render:y}):e(l,{customizations:oe,render:y}),e(xt,{compact:!0}),!h&&e(l,{customizations:le,render:y}),We&&!(ee&&B)?e(F,{children:e(da,{})}):null,e(m,{when:w,children:e(de,{placement:"default",wrapInSection:!0}
1)}),e(m,{when:b.visibility.showPurchaseOrderNumberField,children:e(ua,{})})]}),gt&&e(va,{}),e(Aa,{}),fe&&e(ea,{targetSelector:'input[name="reductions"]',icon:"discount",label:r.translate("order_summary.discount_discovery.add_code")}),e(m,{when:w,children:e(de,{placement:"above-pay-button"})}),e(Ea,{children:[e(Ra,{children:[e(ka,{children:e(Ta,{disabled:!Z||te,loading:ft,defaultLabel:P.label,pixelId:"go_to_next_step"})}),P.notice?e(f,{children:[e(ta,{blockSize:"small-200"}),e(aa,{textAlign:"center",color:"subdued",type:"small",children:P.notice})]}):null]}),k.route?e(Ma,{children:e(ra,{href:k.route,variant:"plain",inlineSize:"fill",textDecoration:"none",pixelId:"go_to_previous_step",children:e(x,{direction:"inline",gap:"small-200",alignItems:"center",children:[e(na,{type:"chevron-left",size:"small"}),e(sa,{children:k.label})]})})}):null]}),P.id==="review"?null:e(f,{children:[e(wa,{}),e(Ba,{})]})]})})]})}const ja=({orderFailure:a,inventoryReservationFailure:n,isAmazonPaymentDeclineScenario:r,genericPaymentError:s,processingFailed:u,shouldSuppressReceiptError:o,paymentErrorMessage:_,networkFailure:A})=>{const{i18n:p}=O(),{lastJourneyProgression:h}=N();return r?null:(s||u)&&!o?e(d,{errorType:c.PaymentError,tone:"critical",children:_}):A?e(d,{errorType:c.PaymentError,tone:"critical",children:p.translate("order_errors.network_failure")}):n?e(d,{errorType:c.PaymentError,tone:"critical",children:p.translate("order_errors.inventory_reservation_failure")}):a?h.value.type==="failed"&&h.value.reason==="decision_rule_block"?e(d,{errorType:c.PaymentError,tone:"critical",children:p.translate("payment_errors.generic_error")}):e(d,{errorType:c.PaymentError,tone:"critical",children:p.translate("order_errors.creation_failure")}):null};function Xa(){const a=wt({enableAutoSelect:!1}),{expandedSlot:n}=Bt(a);return e(Ja,{msiSlot:n,hideChoiceListChrome:!1,detailsPresentation:"boxed"})}function Za(){const{displayedPaymentMethods:a}=ye({experienceType:"list"}),n=Pe(a),r=_t(()=>a.map(s=>"name"in s?s.name:s.type),[a]);return n.mode==="knownBuyerShared"?e(Ya,{impressionType:"payment",impressionFeatures:ma(r,n),children:e(Xa,{})}):e(pa,{renderVaultingAgreementInline:!1})}function en(){const a=Et(!1),n=Ht(),r=ga(),{postPurchaseEnabled:s}=fa(),u=Rt(()=>{a.current=!0},[]);
1return e(ca,{target:"cart.paymentLines[0]",children:[e(oa,{section:"payment",children:e(la,{section:"payment",children:e(Qa,{hostedFieldsLoaded:a.current,children:e(Dt,{blurValidationEnabled:!0,onSetFieldErrors:r,onLoadSuccess:u,children:[e(er,{}),e(Za,{}),e(m,{when:n,children:e(Nt,{})})]})})})}),s&&e(It,{})]})}function er(){return ha(),null}export{er as PaymentMethodCustomizations,en as default};

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.