PageSourceSearch

https://chicgentle.com/cdn/shopifycloud/checkout-web/assets/c1/page-Payment.BYkPj6ZJ.js

js chicgentle.com collected 2026-09-29 10:06:02 UTC 11,843 bytes, 1 lines download raw bytes

1import{u as e,k as C,f as bt,h as vt,o as Ct,S as f,i as m,T as _t,A as Et,q as Rt}from"./esnext-vendor.7EcvH7tF.js";import{u as Mt,T as Ft,S as kt,b as At,G as wt,c as Bt,d as Tt,D as Dt,e as It}from"./useAddressMutationsWithNegotiation.Y6hONWOn.js";import{L as zt,P as Lt,R as Nt,u as xt,S as Ht}from"./RememberMeSection.Cc1eum9k.js";import{A as c,L as Ot,W as d,c_ as Vt,K as Wt,f as Ut,c$ as qt,ce as Gt,s as Yt,bN as $t,bM as Kt,cZ as Jt,M as Qt,p as S,a1 as jt,V as Xt,U as l,d0 as Zt,$ as F,k as N,m as ea,bY as x,R as ta,d1 as aa,b as ra,P as na,X as ia,I as sa,l as oa,d2 as ce,H as la,N as ca,O as da,cP as ua}from"./hydrate.CvWSYK3c.js";import{u as ye,a as Pe,V as ma,e as pa,f as ha,h as ya,i as Pa}from"./components-PaymentMethodProgressionHost.BLIoZXHg.js";import{a as ga,u as fa,b as Sa}from"./hooks-useGeneralPaymentErrorMessage.4RHEltgi.js";import{a as ba}from"./components-RedirectionNotice.module.wDj6pdp6.js";import{B as va}from"./BillingAddressSelector.C_ogBXhv.js";import{C as Ca}from"./Captcha.uTxdGdBM.js";import{u as _a,S as de,b as Ea,d as Ra,c as Ma,P as Fa,a as ka}from"./Page.iFMNx-gv.js";import{u as Aa,P as wa,R as Ba,a as Ta,V as Da,S as Ia}from"./PaymentButtons.Bku8TORf.js";import{P as ue}from"./hooks-useWalletsTimeout.CvRsT5TD.js";import{Q as O,a2 as me,b0 as za,aY as La,ad as H,cN as Na,ae as xa,S as pe,cO as Ha,c7 as Oa,c0 as Va,a4 as Wa,cP as Ua,ak as qa,b7 as he,ab as Ga}from"./utilities-previous.BNOUhCqt.js";import{i as Ya}from"./shared-negotiation-input-redeemable.nWvx5Mgl.js";import{I as $a}from"./ImpressionEventCapture.DHoHQcSz.js";import{K as Ka}from"./KnownBuyerPaymentMethodSelector.D6RXBmES.js";import"./app.9pOKhaB_.js";import"./amazon-pay-useAmazonPayPaymentLine.Dzl9q1le.js";import"./PaymentIcon.BEzHtnxO.js";import"./PaymentLine.DHJD0fA7.js";import"./utilities-publishMessage.BFG4jKHA.js";import"./localization-index.8vJFxOS9.js";import"./Theme-ThemeOverride.aZ96ki1T.js";import"./crypto-constants.wrSwcTv4.js";import"./Choice.CmWf9O2o.js";import"./Checkbox.BcOmMA-W.js";import"./hooks-useUpdateCheckoutAddress.4MSJT9xw.js";import"./hooks-useShopPayExternalAppContext.DJNBHtP3.js";import"./helpers-derivations.BE31Cdos.js";import"./graphql-PaymentSessionMutation.BHouiau8.js";import"./payment-usePaymentExemptionReason.MJlv_Ay4.js";import"./redemption-constants.B8quHqkP.js";import"./shop-pay-normalizeBuyerDetails.UNB2OauO.js";import"./redemption-promotions.BGj0zZCl.js";import"./hooks-useShopPayProgressIntercepts.Dx6SGyxo.js";import"./helpers-credit-card-disabled.Cg-Vgf-8.js";import"./helpers-setAddressErrors.Dkvp0qf9.js";import"./Popover.snh8_-Id.js";import"./ChangeCompanyLocationLink.D2yMha9m.js";import"./BillingAddressForm.BLCoRu_E.js";import"./PhoneField.z-nvF4Oi.js";import"./hooks-useSuppressShopPayModalOnLoad.C3rujIgw.js";import"./business-customer-constants.D2XM6iUD.js";import"./AddressPresenter.mAxMJOkn.js";import"./hooks-useShowShopPayOptin.COfgoH5j.js";import"./shared-permissions.FyWsJaGm.js";import"./Section.DsxTs_3v.js";import"./PayButton-helpers.0kfxXOqw.js";import"./ShopPayCaptcha.BRfpdziH.js";import"./PaymentErrorBanner.CWfF0M8f.js";import"./hooks-useWalletsMonorailTrack.D-8b2KUL.js";import"./hooks-usePaypalRowEffects.BGjLtEwH.js";function Ja(){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:i,source:u,checkout:o,observability:_}=O(),{giftCardsEnabled:k,discountCodesEnabled:p,acceptTipPayments:h}=i,{configuration:b}=o,s=o.latestReceipt.value,ge=Vt(),fe=p&&ge.value,{nextPage:P,previousPage:A}=Wt(),[Se,be]=C(!1),[ve,V]=C(!1),[Ce,_e]=C(!1),Ee=u.type==="simulated",W=me().buyerIdentity.value?.purchasingCompany,E=!!W,Re=u.type==="draftOrder",U=E&&Re,Me=za(),{cartLineChangeLoadingSignal:Fe}=La(),ke=Fe.value,[q,w]=C(!1),[G,Ae]=C(),{negotiate:Y,progress:we,progressing:Be}=Ut(),$=H().isBlocked.value,Te=Na(),B=xa(),K=me(),J=K.paymentMethods,De=E&&!o.isShippingRequired.value,Ie=Aa(),R=!Te.value||B.value,{billingAddressOption:ze,directPaymentErrors:Le,generalPaymentError:Q,generalPaymentErrorCode:j,paymentLines:{value:v}}=pe(),Ne=Ya({shop:i,checkout:o,paymentMethods:J?.value}),xe=v.some(t=>t.method.type==="wallet"||t.method.type==="walletsPlatformPaymentMethod"),He=!R&&o.isShippingRequired.value&&!xe&&ze.value==="shipping"?!1:Ha({lines:v,paymentMethods:J?.value,purchasingCompany:!!W,isBillingAddressForced:!Ne})||!R,X=pe().localizationExtensions.value,{value:Oe}=Oa(),Ve=Oe.length!==0,Z=R&&Ve||!R,T=v.some(t=>t.method.type==="direct"),{displayedPaymentMethods:We}=ye({experienceType:"list"}
1),ee=Pe(We).mode==="knownBuyerShared",Ue=qt().value,qe=Gt(),Ge=Yt({isPayWithPayPalButton:!0}).value.status==="error";Mt();const Ye=K.managedByMarketsPro,te=$||Ee&&P.id!=="review"||qe.value&&Ge||ke,{lastJourneyProgression:$e}=H(),Ke=async()=>{if(!te){w(!0);try{await we("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";w(!1),_e(t.status==="fetch_failed"),V(M||L),be(St)})}catch(t){t instanceof Error&&Ae(t)}finally{w(!1)}}},D=$t(),Je=bt(()=>ga(Le)),I=s?.status==="failed",g=I&&s?.failure.type==="payment"?s.failure:void 0,ae=g?.code==="AUTHENTICATION_ERROR",Qe=I&&s?.failure?.type==="inventory"?s.failure:void 0,je=Ce,Xe=!!(ve||I&&s?.failure?.type==="order"),Ze=g!=null&&!ae,et=Kt(g),tt=Q.value&&!Va(j.value),at=fa(Q.value,j.value),rt=r.translate("payment.title"),nt=r.translate("general.pay_now_button_label"),it=o.configuration.layout.isOnePage.value,st=Jt(),ot=s?.status==="failed"&&s.failure.type==="payment"&&s.failure.code==="GENERIC_ERROR"&&v[0]?.method.type==="walletsPlatformPaymentMethod"&&v[0]?.method.name===Wa.AmazonPay;_a({stage:T&&!a?de.Usable:de.Complete,id:"Payment"}),Qt("payment");const re=!!g,ne=s?.id,ie=!!(g&&Ua.has(g.code));if(vt(()=>{if(!(D||!re||E)){if(ie){_.log("payment_form_skip_negotiate_captcha","[PaymentForm] Skipped negotiate for CAPTCHA_REQUIRED receipt — handled by useHandleReceipt",{receiptId:ne});return}(async()=>await Y({silenceViolations:["all"],fieldsToResolve:["paymentLines"]}))()}},[re,D,E,Y,_,ie,ne]),G)throw G;const lt=S("Checkout::Dynamic::Render","PAYMENT1"),se=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=qa(),pt=jt({base:!0,medium:!1}),ht=!mt.value||pt;let z=null;b.visibility.showAside?ht&&(z=e(la,{above:"small",children:e(ce,{headerLevel:1,monorailSection:"payment"})})):z=e(ce,{headerLevel:1,monorailSection:"payment"});const yt=ut&&!U&&(k||p)?z:null,Pt=U||Me.value?!1:h&&!he(u),gt=Ye.value&&Z&&P.id!=="review",ft=q||Be.value;return Ct(()=>{$e.value.type==="failed"&&V(!0)}),e(f,{children:[e(Ga,{children:rt}),e(Xt,{onSubmit:Ke,disabled:q||$,implicitSubmit:nt,children:e(Ea,{children:[e(Ra,{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(Ja,{}),yt,Pt?e(f,{children:[e(Zt,{sectionId:"tips",children:e(Ft,{renderInSection:!0,headingLevel:1})}),e(l,{customizations:se,render:y})]}):null,X.length>0&&e(f,{children:e(F,{accessibilityLabel:r.translate("localized_fields.additional_information.title"),children:e(N,{gap:"base",children:[e(ea,{id:`${x}-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:x,children:e(N,{gap:"base",children:[e(Lt,{headingId:x,autoFocus:!it}),e(m,{when:b.visibility.showStoreCreditRedemption,children:e(kt,{})}),tt?e(d,{errorType:c.PaymentError,tone:"critical",children:at}):null,e(m,{when:Je,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(At,{})}),n,e(l,{customizations:dt}),e(m,{when:Ie,children:e(Ca,{})})]})}),e(wt,{}),h?e(l,{customizations:oe,render:y}):e(l,{customizations:se,render:y}),He&&(o.isShippingRequired.value||he(u)||De)&&!st.value&&!(ee&&T)?e(va,{}):null,h?e(l,{customizations:le,render:y}):e(l,{customizations:oe,render:y}),e(Nt,{compact:!0}),!h&&e(l,{customizations:le,render:y}),Ue&&!(ee&&T)?e(F,{children:e(ma,{})}):null,e(m,{when:B,children:e(ue,{placement:"default",wrapInSection:!0}
1)}),e(m,{when:b.visibility.showPurchaseOrderNumberField,children:e(pa,{})})]}),gt&&e(ta,{}),e(wa,{}),fe&&e(aa,{targetSelector:'input[name="reductions"]',icon:"discount",label:r.translate("order_summary.discount_discovery.add_code")}),e(m,{when:B,children:e(ue,{placement:"above-pay-button"})}),e(Ma,{children:[e(Fa,{children:[e(Ba,{children:e(Ta,{disabled:!Z||te,loading:ft,defaultLabel:P.label,pixelId:"go_to_next_step"})}),P.notice?e(f,{children:[e(ra,{blockSize:"small-200"}),e(na,{textAlign:"center",color:"subdued",type:"small",children:P.notice})]}):null]}),A.route?e(ka,{children:e(ia,{href:A.route,variant:"plain",inlineSize:"fill",textDecoration:"none",pixelId:"go_to_previous_step",children:e(N,{direction:"inline",gap:"small-200",alignItems:"center",children:[e(sa,{type:"chevron-left",size:"small"}),e(oa,{children:A.label})]})})}):null]}),P.id==="review"?null:e(f,{children:[e(Da,{}),e(Ia,{})]})]})})]})}const ja=({orderFailure:a,inventoryReservationFailure:n,isAmazonPaymentDeclineScenario:r,genericPaymentError:i,processingFailed:u,shouldSuppressReceiptError:o,paymentErrorMessage:_,networkFailure:k})=>{const{i18n:p}=O(),{lastJourneyProgression:h}=H();return r?null:(i||u)&&!o?e(d,{errorType:c.PaymentError,tone:"critical",children:_}):k?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=Bt({enableAutoSelect:!1}),{expandedSlot:n}=Tt(a);return e(Ka,{msiSlot:n,hideChoiceListChrome:!1,detailsPresentation:"boxed"})}function Za(){const{displayedPaymentMethods:a}=ye({experienceType:"list"}),n=Pe(a),r=_t(()=>a.map(i=>"name"in i?i.name:i.type),[a]);return n.mode==="knownBuyerShared"?e($a,{impressionType:"payment",impressionFeatures:ha(r,n),children:e(Xa,{})}):e(ya,{renderVaultingAgreementInline:!1})}function tn(){const a=Et(!1),n=xt(),r=Sa(),{postPurchaseEnabled:i}=ba(),u=Rt(()=>{a.current=!0},[]);return e(ua,{target:"cart.paymentLines[0]",children:[e(ca,{section:"payment",children:e(da,{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(Ht,{})})]})})})}),i&&e(It,{})]})}function er(){return Pa(),null}export{er as PaymentMethodCustomizations,tn 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.