PageSourceSearch

https://godthefatherapparel.com/cdn/shopifycloud/checkout-web/assets/c1/Captcha.FpS8EQr6.js

js godthefatherapparel.com collected 2026-09-29 01:01:36 UTC 4,393 bytes, 1 lines download raw bytes

1import{_ as V}from"./app.DdDscdWN.js";import{d as B,r as D,e as O,o as R,G as y,k as x,h as F,u as n,b3 as U,y as _,E as P,j as w,A as L,b4 as M,f as I,g as z,i as g}from"./esnext-vendor.DDpcaSqU.js";import{H as j}from"./ShopPayCaptcha.D1P4QA8k.js";import{iQ as J,iR as N,e as A,bX as K,ch as W,ac as $,k as T,W as G,C as Q,aj as X,a0 as Y,aa as Z}from"./hydrate.BcfGVx0L.js";import{bG as ee,bp as ae,an as te,T as b,cS as re,cz as oe,af as ne,W as se,bs as ie,bt as le}from"./utilities-previous.Cnwy8G2v.js";import{c as ce}from"./PaymentErrorBanner.CtzH3JZS.js";const Re=B({displayName:"Captcha",load:()=>D(()=>V(()=>Promise.resolve().then(()=>ye),void 0))});function ue({checkout:r,embed:l},s){const a=r.configuration.isUniversalCheckoutFinalizer,e=O(!1),c=J();return R(()=>{s.value?a||y(()=>ee(l,"captcha")):e.value=!1}),R(()=>{if(!(!a||!e.value||!c))return y(()=>{c.value+=1}),()=>{y(()=>{c.value=Math.max(0,c.value-1)})}}),{onOpen:()=>{e.value=a&&!!s.value},onClose:()=>{e.value=!1}}}function q(r,l){return r?.status==="failed"&&l===r.id}function de(){const[r,l]=N(ae.LastSeenCaptchaRequestedErrorReceiptId),s=te(),{checkout:a}=b(),e=a.latestReceipt.value,[c,v]=x(()=>s.peek()?q(e,r):!0);return F(()=>{const u=q(e,r);v(u),e?.status==="failed"&&r!==e.id&&l(e.id),e?.status!=="failed"&&l(void 0)},[e?.id,e?.status]),c}function pe(){const{i18n:r}=b(),{progressing:l}=A(),{hasError:s,error:a}=K(re),e=de();return l.value||!s||!a||e?null:n(ce,{identifier:"CaptchaRequiredBanner",tone:"critical",children:r.translate("payment_errors.captcha_required_without_payment_information")})}let k=!1;const he=U(r=>{const{appContext:{i18n:l,observability:s},captchaSignal:a,errorSignal:e,lastJourneyProgression:c,negotiate:v,onViolation:u}=r,p=_(y(()=>a.value?.sitekey)),f=_(k),S=_(y(()=>!!a.value?.token)),d=P(()=>!!e.value),t=Date.now(),h=k,m=l.translate("captcha.errors.not_solved");w(()=>{const o=a.value;o?o.sitekey&&(p.value=o.sitekey):p.value=void 0}),w(()=>{const o=c.value,i=o.type==="error"?o.violations.map(H=>H.code):[],C=a.value;C&&C.violationCode&&i.includes(C.violationCode)?(u?.(),e.value=m):C?.token&&(e.value=void 0)});const E=P(()=>!!p.value);return{errorSignal:e,hasError:d,hasSiteKey:E,isLoaded:f,sitekey:p,solvedOnLoad:S,handleVerify(o){const i=a.value;i&&(a.value={...i,token:o,violationCode:void 0},v({include:["captcha"],skipStateUpdates:!0}))},handleLoad(){h||s.histogram({name:"captcha_load_time",value:Date.now()-t,attributes:{provider:a.value?.provider,success:!0}}),k=!0,f.value=!0},handleError(o){h||s.histogram({name:"captcha_load_time",value:Date.now()-t,attributes:{provider:a.peek()?.provider,success:!1,error:String(o)}})},validate(o){if(o&&!o.token)return m}}}),ve={Error:"MTtRU"};function fe(){const r=b(),{client:l,i18n:s}=r,a=l.unstable_getSerialization("workerVersion")!=="fast",e=W(),c=oe(),{lastJourneyProgression:v}=ne(),{captcha:u}=se(),{negotiate:p}=A(),f=L(null),{onOpen:S,onClose:d}=ue(r,u),t=M(()=>new he({appContext:r,captchaSignal:u,errorSignal:c,lastJourneyProgression:v,negotiate:p,onViolation:()=>{d(),f.current?.resetCaptcha()}}));ie(u,c,t.validate,le.InvalidCaptcha);const h=L(null),m=$({active:t.hasError.value});R(()=>{u.value&&t.isLoaded.value&&h.current&&(m.current=h.current.querySelector("iframe"))});const E=I(()=>t.isLoaded.value?void 0:"none"),o=I(()=>t.hasError.value?z(ve.Error):void 0);return n(g,{when:()=>{const i=t.solvedOnLoad.value&&!u.value?.sitekey;return!!(u.value?.provider==="hcaptcha"&&!i&&t.sitekey.value)},children:n(T,{gap:"large-100",children:[n(g,{when:()=>e.value&&t.isLoaded.value&&t.hasSiteKey.value,children:n(G,{tone:"critical",errorType:Q.CheckoutError,children:s.translate("payment_errors.captcha_required_without_payment_information")})}),n(g,{when:()=>!t.isLoaded.value,children:n(X,{delay:a,contentDisplay:"block",inlineSize:"302px",blockSize:"83px"})}),n(Y,{accessibilityLabel:s.translate("captcha.title"),display:E.value,children:n(T,{gap:"small-400",children:[n(pe,{}),n("div",{className:o.value,ref:h,children:n(j,{sitekey:t.sitekey.value,onVerify:i=>{d(),t.handleVerify(i)},languageOverride:s.locale,ref:f,onLoad:t.handleLoad,onError:i=>{d(),t.handleError(i)},onOpen:S,onClose:d,onChalExpired:d})}),n(g,{when:t.errorSignal,children:i=>n(Z,{children:i?.message??i})})]})})]})})}const ye=Object.freeze(Object.defineProperty({__proto__:null,default:fe},Symbol.toStringTag,{value:"Module"}));
1export{Re as C};

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.