PageSourceSearch

https://honchosearch.com/cdn/shopifycloud/checkout-web/assets/c1/PaymentErrorBanner.PvaCOaLw.js

js honchosearch.com collected 2026-09-30 11:38:37 UTC 5,872 bytes, 1 lines download raw bytes

1import{h as J,u as b,f as pe,T as Q,A as z}from"./esnext-vendor.7EcvH7tF.js";import{W as ye,e as me,bF as c,A as _e,bG as Pe,f as he,bH as fe,bI as ve,bJ as be,bK as Ee,bL as ge,bM as Se,bN as Ae,bO as Me,bP as Ce}from"./hydrate.DbBIWEk-.js";import{Q as E,a2 as q,b3 as Re,bR as K,l as N,bS as Ie,a1 as Te,bT as Ve,X,aR as Ne,bU as Oe,aY as Be,ad as Le,ac as Fe,bV as De,bW as Ye,bX as we,bY as Ge,bZ as Ue,b_ as He,b$ as ke,S as xe,c0 as We,c1 as Qe,c2 as Xe,c3 as Je,c4 as ze,bi as qe,c5 as Ke}from"./utilities-previous.C42MP_Mw.js";import{h as Ze,a as $e,u as je}from"./hooks-useGeneralPaymentErrorMessage.Boc21OFt.js";function ea({bannerId:e,errorType:r,children:t,...n}){const{observability:i}=E(),{tone:y,...s}=n;return J(()=>{i.log("error_log_banner_error_banner_rendered","[Displayed Error] Error banner was rendered",{bannerId:e})},[e,i]),b(ye,{errorType:r,id:e,tone:y,...s,children:t})}function aa(){const{checkout:e,i18n:r,shopPay:t}=E(),n=q(),{value:i}=n.paymentMethods,{value:y}=n.managedByMarketsPro,s=Ne({managedByMarketsPro:y}),d=pe(()=>Re({checkout:e})),m=me(),{value:g}=n.deferredTotal,o=t.session.selectedPaymentMethod.value,S=t.session.paymentMethodOption.value,{hasViolations:_}=c(K),p=o&&N(o)?Ie(o.paymentAttributes.brand):void 0,A=Te(),P=Q(()=>{if(S?.name!=="SHOPIFY_INSTALLMENTS"){if(A.value||!o||m.value&&!g?.amount.amount)return!0;if(N(o)){if(_)return!1;const h=i?.filter(l=>l.type==="direct").flatMap(l=>l.paymentBrands);if(h&&h.length>0){const l=Ve(o.paymentAttributes);return l?h.includes(l):void 0}}return X(o)?ra(d.value,s,i):!0}},[S?.name,A.value,o,m.value,g?.amount.amount,_,i,d.value,s]),R=Q(()=>{if(o&&P===!1){if(N(o))return p?r.translate("payment.brand_not_available",{brand:p}):r.translate("payment.generic_incorrect_card_info");if(X(o))return d.value?r.translate("payment_errors.payment_method_unavailable_with_subscriptions"):r.translate("payment.shop_pay_ideal_unavailable_error")}},[P,o,p,r,d.value]);return{paymentMethods:i,isSelectedPaymentMethodSupported:P,notSupportedError:R,label:p}}function ra(e,r,t){return!e&&r&&t?.some(n=>Oe(n,["ideal"]))}function ta(e){const{i18n:r}=E();if(e&&e.code!=="SURVEY_EXITED")return r.translate("hsa_qualification_errors",{scope:e.code.toLowerCase()})}function na(){const{i18n:e,checkout:r,embed:t,shopPay:n}=E(),{delegatedPaymentInstrument:i,inventoryRecoverySignal:y}=Be(),{lastJourneyProgression:s}=Le(),{progressing:d}=he(),{walletUsedForSubmissionSignal:m,inMemoryApplePayParts:{asPaymentMethod:g},receiptErrorSignal:o}=Fe(),{paymentMethods:S}=q(),{notSupportedError:_}=aa(),{hasViolations:p,violations:A}=c(K),{hasViolations:P}=c(De),{hasViolations:R}=c(Ye),{hasViolations:h}=c(we),{hasViolations:l}=c(Ge),{violations:O}=c(Ue),Z=!(s.value.type==="success"||s.value.type==="error"?s.value.negotiationStage==="completion":!1)&&O.size===1&&O.values().next().value.code==="PAYMENTS_METHOD",{hasViolations:$}=c(He),I=fe(),{hasError:j,error:M}=ve(ke),{hasError:ee,error:ae}=be(),{hasError:B}=Ee(),{hasError:re}=ge(),L=Se(M?{type:"payment",code:M}:void 0),F=ta(ae),C=xe(),te=C.generalPaymentError.value,f=C.generalPaymentErrorCode.value,ne=Ze(C.directPaymentErrors),D=$e(C.directPaymentErrors),u=z(!1),oe=Ae(),Y=je(te,f),w=Y&&!We(f)&&!Qe(f)&&!Xe(f)&&!Je(f),G=e.translate("order_errors.inventory_reservation_failure"),{hasViolations:U}=Me(Ke),se=!!ze(S.value).length,ie=qe("billingAddress").value,le=Ce().value,ce=m.value==="APPLE_PAY"||le,ue=M==="INCORRECT_CVC"&&n?.session.selectedPaymentMethod.value?.paymentMethod==="CREDIT_CARD",T=y.value,H=T!=null&&T.receiptId===r.latestReceipt.value?.id,k=s.value.type==="failed"&&s.value.negotiationStage==="completion",x=!!(w||D||I||k),V=H&&!T.dismissed&&!x;if(d.value)return{message:void 0,tone:"auto"};let a,v="critical";if(t&&r.configuration.isPaymentInstrumentsDelegationEnabled&&i.value&&U&&!ie&&(a=e.translate("payment_errors.payment_method_billing_address")),w&&(u.current=!0,v="warning",a=Y),I&&(u.current=!0,a=I),(ne||D&&(u.current||B))&&(a=e.translate("payment.generic_incorrect_card_info")),j&&M&&L&&!u.current&&m.value!=="GOOGLE_PAY"&&(!ce||g.value)&&!o.value&&!oe&&!ue&&(a=L),k&&s.value.type==="failed"&&(s.value.fetchFailed?a=e.translate("order_errors.network_failure"):s.value.reason==="decision_rule_block"?a=e.translate("payment_errors.generic_error"):a=e.translate("order_errors.creation_failure")),re&&!u.current&&(a=e.translate("order_errors.creation_failure")),B&&!x&&(H?V:!u.current)&&(a=G,V&&(v="critical")),ee&&F&&!u.current&&(a=F),$&&(a=e.translate("store_credit_errors.generic_error")),P&&(a=e.translate("payment.expired_payment_method")),p){const W=[...A][0]?.nonLocalizedMessage?.split(":")[1]?.toLowerCase().trim();W?a=e.translate("payment.brand_not_available",{brand:e.translate("payment_brand",{scope:W})}):a=e.translate("payment.generic_incorrect_card_info")}h&&(a=e.translate("payment.generic_incorrect_card_info")),l&&(a=e.translate("payment_errors.method_not_available")),R&&(a=e.translate("payment_errors.generic_error")),Z&&(a=e.translate("payment_errors.available_methods_updated"),v="info"),_&&(a=_,v="
1critical"),se&&U&&(a=e.translate("address_management.invalid_billing_address_selected"));const de=V&&a===G?r.latestReceipt.value?.id:void 0;return{message:a,tone:v,inventoryRecoveryReceiptId:de}}function oa({message:e,tone:r,inventoryRecoveryReceiptId:t}){const{observability:n}=E(),i=z(!!t).current;return J(()=>{t&&n.counter({name:"inventory_recovery_error_banner_displayed",value:1})},[t,n]),b(sa,{identifier:"PaymentErrorBanner",tone:r,suppressAutoFocus:i,children:e})}function ya(){const e=na();return e.message?b(oa,{...e}):null}function sa({children:e,identifier:r,tone:t,suppressAutoFocus:n=!1}){return t==="critical"||t==="warning"?b(ea,{errorType:_e.PaymentError,bannerId:r,tone:t,autoFocus:!n,focusable:n,children:e}):b(Pe,{tone:t,children:e})}export{ea as E,ya as P,aa as a,oa as b,sa as c,na 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.