PageSourceSearch

https://app.useapprentice.com/_next/static/chunks/67691-c857ab3c952d2bc4.js

js useapprentice.com collected 2026-10-01 23:43:57 UTC 23,232 bytes, 1 lines download raw bytes

1try{!function(){var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="0f9305ce-ab62-47d8-a19a-cb1258408ece",e._sentryDebugIdIdentifier="sentry-dbid-0f9305ce-ab62-47d8-a19a-cb1258408ece")}()}catch(e){}"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[67691],{14491:(e,t,n)=>{n.d(t,{A:()=>s});var r=n(95155),a=n(12115),o=n(2821),i=n(35235);let s=e=>{let{label:t,checked:n,id:s,onChange:c,className:l="",disabled:d=!1,error:u,hint:h}=e,p=(0,a.useId)(),m=null!=s?s:p,f="".concat(m,"-hint");return(0,r.jsxs)("div",{children:[(0,r.jsxs)("label",{className:(0,o.A)(i.cFY,"min-h-touch cursor-pointer",d&&"cursor-not-allowed opacity-60"),children:[(0,r.jsx)("input",{id:m,type:"checkbox",className:(0,o.A)(i.bEW,"h-5 w-5 focus-visible:outline-none",d&&"cursor-not-allowed opacity-60",l),checked:n,onChange:e=>c(e.target.checked),disabled:d,"aria-invalid":u||void 0,"aria-describedby":h?f:void 0}),t&&(0,r.jsx)("span",{className:"text-sm font-medium text-gray-700 dark:text-gray-300",children:t})]}),h&&(0,r.jsx)("p",{id:f,className:u?i.YmH:i.Irc,children:h})]})}},24379:(e,t,n)=>{n.d(t,{L:()=>d});var r=n(95155),a=n(12115),o=n(99708),i=n(92960),s=n(57405),c=n(35235),l=n(25016);function d(e){let{value:t,onChange:n,disabled:d,error:u,id:h="phone"}=e,[p,m]=(0,a.useState)("US");return(0,r.jsxs)("div",{children:[(0,r.jsx)("label",{htmlFor:h,className:c.mz,children:"Phone number"}),(0,r.jsxs)("div",{className:"flex gap-2",children:[(0,r.jsxs)("span",{"aria-label":"Country code: United States, locked",className:(0,l.cn)(c.R$,"inline-flex w-28 shrink-0 items-center justify-center gap-1.5 rounded-lg border border-dashed border-gray-200 px-3 text-sm font-medium text-gray-500 dark:border-gray-700 dark:text-gray-400"),children:[(0,r.jsx)(o.A,{"aria-hidden":"true",className:"h-3.5 w-3.5"}),"+1 (US)"]}),(0,r.jsx)("div",{className:"min-w-0 flex-1",children:(0,r.jsx)(i.A,{id:h,type:"tel",inputMode:"tel",autoComplete:"tel-national",value:t,disabled:d,onChange:function(e){var t,r,a;t=e.target.value,r=p,n((a=(0,s.BK)({countryCode:r,nationalNumber:t}),a.ok?{ok:!0,e164:a.e164,display:t}:{ok:!1,reason:a.reason,display:t}))},placeholder:"(555) 555-5555",className:c.R$,"aria-invalid":!!u,"aria-describedby":u?"".concat(h,"-error"):void 0,"aria-label":"Phone number"})})]}),u&&(0,r.jsx)("p",{id:"".concat(h,"-error"),className:"mt-1 text-sm text-error-600 dark:text-error-400",children:u})]})}},49419:(e,t,n)=>{n.d(t,{P:()=>l});var r=n(95155),a=n(15239),o=n(52619),i=n.n(o),s=n(35235);function c(){return(0,r.jsxs)("div",{className:"mt-2 flex items-center gap-1.5 text-xs text-gray-500 dark:text-gray-400",children:[(0,r.jsx)("span",{children:"Powered by"}),(0,r.jsx)(a.default,{src:"/images/logo/logo.svg",alt:"Apprentice",width:80,height:16,className:"h-4 w-auto dark:hidden"}),(0,r.jsx)(a.default,{src:"/images/logo/logo-dark.svg",alt:"Apprentice",width:80,height:16,className:"hidden h-4 w-auto dark:block"})]})}function l(e){let{messageTypes:t="appointment reminders, updates, and communications",className:n="",compact:a=!1,showLogo:o=!0}=e,l="text-xs leading-relaxed ".concat(s.VoQ," ").concat(n);return a?(0,r.jsxs)("div",{children:[(0,r.jsxs)("p",{className:l,children:["By opting in, you agree to receive SMS messages from ",(0,r.jsx)("strong",{children:"Apprentice"})," regarding"," ",t,". Message frequency varies. Message and data rates may apply. Text HELP for help, STOP to cancel."," ",(0,r.jsx)(i(),{href:"https://useapprentice.com/terms",target:"_blank",rel:"noopener noreferrer",className:"underline hover:text-gray-700 dark:hover:text-gray-200",children:"Terms"})," ","&"," ",(0,r.jsx)(i(),{href:"https://useapprentice.com/privacy",target:"_blank",rel:"noopener noreferrer",className:"underline hover:text-gray-700 dark:hover:text-gray-200",children:"Privacy Policy"}),"."]}),o&&(0,r.jsx)(c,{})]}):(0,r.jsxs)("div",{children:[(0,r.jsxs)("p",{className:l,children:["By checking this box, you agree to re
1ceive SMS text messages from"," ",(0,r.jsx)("strong",{children:"Apprentice"})," regarding ",t,". Message frequency varies. Message and data rates may apply. Text HELP for help, STOP to cancel at any time. View our"," ",(0,r.jsx)(i(),{href:"https://useapprentice.com/terms",target:"_blank",rel:"noopener noreferrer",className:"underline hover:text-gray-700 dark:hover:text-gray-200",children:"Terms of Service"})," ","and"," ",(0,r.jsx)(i(),{href:"https://useapprentice.com/privacy",target:"_blank",rel:"noopener noreferrer",className:"underline hover:text-gray-700 dark:hover:text-gray-200",children:"Privacy Policy"}),"."]}),o&&(0,r.jsx)(c,{})]})}},57405:(e,t,n)=>{n.d(t,{BK:()=>a,yv:()=>o});var r=n(90104);function a(e){let t=e.nationalNumber.trim();if(!t)return{ok:!1,reason:"empty"};let n=(0,r.l)(t,e.countryCode);return n?n.number.startsWith("+155555501")?{ok:!1,reason:"test_range_in_production"}:n.isValid()?{ok:!0,e164:n.number}:{ok:!1,reason:"invalid_format"}:{ok:!1,reason:"invalid_format"}}function o(e){if(!e.startsWith("+"))return!1;let t=(0,r.l)(e);return!!t&&"1"===t.countryCallingCode&&(void 0===t.country||"US"===t.country||"CA"===t.country)}},67691:(e,t,n)=>{n.d(t,{P:()=>k});var r=n(95155),a=n(12115),o=n(52619),i=n.n(o),s=n(20063),c=n(44517),l=n(32587),d=n(24379),u=n(94478),h=n(76898),p=n(95838),m=n(14491),f=n(92960),g=n(8231),y=n(49419),_=n(32949),v=n(19549),b=n(98901),x=n(75864),w=n(89883);function k(e){let{mode:t,onSuccess:n,signInRedirectUrl:o="/signin",onActiveLink:k,attribution:j}=e,S=(0,s.useRouter)(),N=(0,h.p)(),[A,P]=(0,a.useState)("collect"),[C,T]=(0,a.useState)(null),[F,M]=(0,a.useState)(""),[E,I]=(0,a.useState)(null),[D,R]=(0,a.useState)(""),[L,K]=(0,a.useState)(""),[q,O]=(0,a.useState)(!1),[V,U]=(0,a.useState)(!1),[W,B]=(0,a.useState)(null),[J,z]=(0,a.useState)(null),X=(0,a.useRef)(void 0);(0,a.useEffect)(()=>{let e="0x4AAAAAADJkNKGNUkMQ-1na";if(!e)return void _.vF.error("phone-auth.turnstile.missing-site-key");let t="cf-turnstile-script",n=!1;function r(){if(n)return;let t=window.turnstile;if(!t)return;let r=document.querySelector("[data-phone-auth-turnstile-host]");r&&(X.current=t.render(r,{sitekey:e,callback:e=>z(e),"expired-callback":()=>z(null),"error-callback":()=>z(null)}))}let a=document.getElementById(t);if(a)window.turnstile?r():a.addEventListener("load",r,{once:!0});else{let e=document.createElement("script");e.id=t,e.src="https://challenges.cloudflare.com/turnstile/v0/api.js",e.async=!0,e.defer=!0,e.onload=r,document.head.appendChild(e)}return()=>{n=!0;let e=X.current;if(void 0!==e){let t=window.turnstile;null==t||t.remove(e),X.current=void 0}}},[]);let $="signup"===t,H=$?"sign_up":"sign_in";async function Q(){if(I(null),!C){I("Enter a valid phone number."),(0,b.F)("".concat(H,"_with_phone_validation_error"),{method:"phone",reason:"invalid_phone",source:"phone_auth_flow_client"});return}if("signup"===t){if(!D.trim()||!L.trim()){I("Enter your first and last name."),(0,b.F)("sign_up_with_phone_validation_error",{method:"phone",reason:"missing_name",source:"phone_auth_flow_client"});return}if(!q){I("You must accept the terms to continue."),(0,b.F)("sign_up_with_phone_validation_error",{method:"phone",reason:"terms_not_accepted",source:"phone_auth_flow_client"});return}}if(!J){I("Verification challenge not ready. Please wait a moment."),(0,b.F)("".concat(H,"_with_phone_validation_error"),{method:"phone",reason:"turnstile_not_ready",source:"phone_auth_flow_client"});return}(0,b.F)("".concat(H,"_submit"),{method:"phone",hasInvitation:!1,source:"phone_auth_flow_client"}),$&&(0,w.SP)(),U(!0);try{let n=await fetch("/api/auth/phone/send-otp",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({phone:C,turnstileToken:J,mode:t,surface:l.Capacitor.isNativePlatform()?l.Capacitor.getPlatform():"web"})}),r={};try{r=await n.json()}catch(e){_.vF.warn("phone-auth.send-otp.json_parse_failed",{message:e instanceof Error?e.message:"unknown"})}if(!n.ok){var e;let t=429===n.status?"rate_limited":403===n.status?"turnstile_failed":null!=(e=r.error)?e:"http_".concat(n.status);(0,b.F)("".concat(H,"_with_phone_send_error"),{method:"phone",status:n.status,reason:t,source:"phone_auth_flow_client"}),429===n.status?c.Ay.error("Too many requests. Try again in a minute."):403===n.status?c.Ay.error("Verification failed. Please refresh and try again."):"no_phone_account"===r.error?(0,c.Ay)("It looks like you may have signed up with a different method. Try signing in with email or Google, then add your phone in account settings.",{duration:8e3}):c.Ay.error("We couldn't send your code. Please try again in a moment.");return}if("signup"===t&&"active_link"===r.matchKind){if((0,b.F)("sign_up_with_phone_redirected_to_signin",{method:"phone",reason:"active_account_exists",source:"phone_auth_flow_client"}),k)return void k();(0,c.Ay)("We found an account with this number. Please sign in with your existing method, then add phone in account settings.",{duration:8e3}),S.push(o);return}if("signin"===t&&"active_link"!==r.matchKind){(0,b.F)("sign_in_with_phone_redirected_to_signup",{method:"phone",reason:"no_existing_account",source:"phone_auth_flow_client"}),(0,c.Ay)("We don't have an account for this number. Please sign up to create one.",{duration:8e3}),S.push("/signup");return}z(null);let a=window.turnstile;a&&void 0!==X.current&&a.reset(X.current),P("otp"),(0,b.F)("phone_otp_sent",{method:"phone",intent:t,matchKind:r.matchKind,source:"phone_auth_flow_client"})}catch(e){_.vF.error("phone-auth.send-otp.exception",{message:e instanceof Error?e.message:"unknown"}),(0,b.F)("".concat(H,"_with_phone_send_error"),{method:"phone",reason:"network_error",errorMessage:e instanceof Error?e.message:"unknown",source:"phone_auth_flow_client"}),c.Ay.error("Network error. Try again.")}finally{U(!1)}}async function G(e){if(C){B(null),U(!0);try{var r,a,o,i;let s="signup"===t?{phone:C,token:e,firstName:D.trim(),lastName:L.trim(),acceptTerms:q,mode:"signup"}
1:{phone:C,token:e,mode:"signin"},c=await fetch("/api/auth/phone/verify-otp",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(s)}),l={};try{l=await c.json()}catch(e){_.vF.warn("phone-auth.verify-otp.json_parse_failed",{message:e instanceof Error?e.message:"unknown"})}if(!c.ok){B("invalid_otp"===l.error?"That code didn't match. Try again.":"Verification failed."),(0,b.F)("".concat(H,"_with_phone_verify_error"),{method:"phone",status:c.status,reason:null!=(r=l.error)?r:"http_".concat(c.status),source:"phone_auth_flow_client"});return}if(!l.userId){B("Verification failed."),(0,b.F)("".concat(H,"_with_phone_verify_error"),{method:"phone",reason:"missing_user_id",source:"phone_auth_flow_client"});return}let d=await (0,b.E)(l.userId);if("signup"===t){let e=(0,x.SK)(),t=null!=(a=e.gclid)?a:null==j?void 0:j.gclid;try{let e=await (0,v.am)({firstName:D.trim()||null,lastName:L.trim()||null,phone:C});await (0,v.vH)("phone",e,t,{userId:l.userId}),(0,b.F)("sign_up_success",{method:"phone",outcome:l.outcome,hashedUserId:d,source:"phone_auth_flow_client"})}catch(e){_.vF.error("phone-auth.signup-tracking.exception",{message:e instanceof Error?e.message:"unknown"})}await (0,v.Cf)("phone",{gclid:t,gbraid:null!=(o=e.gbraid)?o:null==j?void 0:j.gbraid,wbraid:null!=(i=e.wbraid)?i:null==j?void 0:j.wbraid})||_.vF.info("phone-auth.signup-tracking.provenance_not_accepted",{userId:l.userId})}else(0,b.F)("sign_in_with_phone_success",{method:"phone",outcome:l.outcome,hashedUserId:d,source:"phone_auth_flow_client"});n(l.userId)}catch(e){_.vF.error("phone-auth.verify-otp.exception",{message:e instanceof Error?e.message:"unknown"}),(0,b.F)("".concat(H,"_with_phone_verify_error"),{method:"phone",reason:"network_error",errorMessage:e instanceof Error?e.message:"unknown",source:"phone_auth_flow_client"}),B("Network error. Try again.")}finally{U(!1)}}}let Y=(0,r.jsx)("div",{"data-phone-auth-turnstile-host":!0,className:"collect"===A?void 0:"hidden"});return"otp"===A&&C?(0,r.jsxs)(r.Fragment,{children:[Y,(0,r.jsx)(u.Q,{phone:C,onComplete:G,onResend:Q,error:null!=W?W:void 0})]}):(0,r.jsxs)("form",{method:"post",action:"",onSubmit:e=>{e.preventDefault(),Q()},className:"space-y-4",children:["signup"===t&&(0,r.jsxs)("div",{className:"grid grid-cols-2 gap-3",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)(g.A,{htmlFor:"phone-auth-first-name",children:"First name"}),(0,r.jsx)(f.A,{id:"phone-auth-first-name",value:D,onChange:e=>R(e.target.value),autoComplete:"given-name",placeholder:"Jane","aria-label":"First name"})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)(g.A,{htmlFor:"phone-auth-last-name",children:"Last name"}),(0,r.jsx)(f.A,{id:"phone-auth-last-name",value:L,onChange:e=>K(e.target.value),autoComplete:"family-name",placeholder:"Doe","aria-label":"Last name"})]})]}),(0,r.jsx)(d.L,{value:F,onChange:function(e){M(e.display),T(e.ok&&e.e164?e.e164:null),I(null)},error:null!=E?E:void 0}),"signup"===t&&(0,r.jsx)(m.A,{id:"phone-auth-terms",checked:q,onChange:O,label:(0,r.jsxs)(r.Fragment,{children:["I accept the"," ",(0,r.jsx)(i(),{href:"/terms",target:"_blank",rel:"noopener",className:"underline",children:"terms"})," ","and"," ",(0,r.jsx)(i(),{href:"/privacy",target:"_blank",rel:"noopener",className:"underline",children:"privacy policy"}),"."]})}),Y,(0,r.jsx)(y.P,{compact:!0,showLogo:!1,messageTypes:"one-time verification codes for sign-in and account verification"}),(0,r.jsx)(p.A,{type:"submit",loading:V,disabled:!N,className:"w-full",children:N?"Send verification code":"Starting up…"})]})}},75864:(e,t,n)=>{n.d(t,{SK:()=>c,RP:()=>s,uB:()=>l,Vx:()=>d});let r=["gclid","gbraid","wbraid","fbclid","ttclid","rdt_cid","utm_source","utm_medium","utm_campaign","utm_content","utm_term"];function a(e){let t={};for(let n of r){let r=e[n];"string"==typeof r&&r.length>0&&(t[n]=r)}return t}var o=n(86497);let i="ap_attr";function s(e){let t=new URLSearchParams(e),n={};for(let[e,r]of t.entries())n[e]=r;return a(n)}function c(){if("undefined"==typeof document)return{};let e=document.cookie.split("; ").find(e=>e.startsWith("".concat(i,"=")));if(!e)return{};var t=e.slice(i.length+1);if(!t)return{};try{let e=JSON.parse(decodeURIComponent(t));if(!e||"object"!=typeof e||Array.isArray(e))return{};return a(e)}catch(e){return o.k.debug("[attribution-cookie] Failed to parse cookie value",{error:e}),{}}}function l(){if("undefined"==typeof document)return{};let e={};for(let t of document.cookie.split("; "))t.startsWith("_fbp=")?e.fbp=t.slice(5):t.startsWith("_fbc=")&&(e.fbc=t.slice(5));return e}function d(e){if("undefined"==typeof document)return;let t=encodeURIComponent(JSON.stringify(e)),n="".concat(i,"=").concat(t,"; path=/; max-age=").concat(7776e3,"; SameSite=Lax"),r="undefined"!=typeof location?location.hostname:"";("useapprentice.com"===r||r.endsWith(".useapprentice.com"))&&(n+="; domain=.useapprentice.com"),document.cookie=n}}
1,76898:(e,t,n)=>{n.d(t,{p:()=>a});var r=n(12115);function a(){let[e,t]=(0,r.useState)(!1);return(0,r.useEffect)(()=>{t(!0)},[]),e}},89883:(e,t,n)=>{n.d(t,{nh:()=>g,Jh:()=>w,SP:()=>k});var r=n(32587);let a={signup_page:"ViewContent",signup_started:"Lead"};Object.keys(a);var o=n(75864),i=n(4672),s=n(68160);let c="[A-Za-z0-9_.-]{1,200}",l=new RegExp("^".concat(c,"$"));function d(e){return"string"==typeof e&&l.test(e)}new RegExp("^fb\\.\\d\\.\\d{10,16}\\.".concat(c,"$"));var u=n(86497);let h={signup_page:"fb_mobile_content_view"},p=new Set,m=new Set,f=0;function g(){for(let e of(p.clear(),m))clearTimeout(e);m.clear(),f+=1}function y(){let e=(0,i.G)();return null!==e&&!e.ad_storage_ok}function _(e,t,n){let r=function(){let e=window.fbq;return"function"==typeof e?e:null}();if(!r)return!1;try{return r("track",e,{content_name:t},{eventID:n}),!0}catch(t){return u.k.debug("[AnonymousMeta] fbq track failed",{eventName:e,error:t}),!1}}function v(e){let t=window.setTimeout(()=>{m.delete(t),e()},200);m.add(t)}async function b(e,t){let r=h[e];if(!r)return void u.k.debug("[AnonymousMeta] No honest native Meta equivalent for this moment — not logging",{contentName:e});try{let[{metaEventsService:a},{whenAdConsentBaselineApplied:o}]=await Promise.all([Promise.resolve().then(n.bind(n,45884)),n.e(15267).then(n.bind(n,15267))]),i=await o(1e4);if(t!==f)return void u.k.debug("[AnonymousMeta] Visit ended while waiting for ad-consent baseline — dropping stale log",{contentName:e});if(!i){p.delete(e),u.k.debug("[AnonymousMeta] Ad-consent baseline never landed — moment released",{contentName:e});return}let s=Date.now()+1e4;for(;!a.isInitialized;){if(t!==f)return void u.k.debug("[AnonymousMeta] Visit ended while waiting for native SDK init — dropping stale log",{contentName:e});if(Date.now()>=s){p.delete(e),u.k.debug("[AnonymousMeta] Native SDK never initialized — moment released",{contentName:e});return}await new Promise(e=>setTimeout(e,200))}if(t!==f)return void u.k.debug("[AnonymousMeta] Visit ended once native SDK finished initializing — dropping stale log",{contentName:e});await a.logEvent(r,{content_name:e})||(t===f&&p.delete(e),u.k.debug("[AnonymousMeta] Native log failed — moment released",{contentName:e}))}catch(n){t===f&&p.delete(e),u.k.debug("[AnonymousMeta] Native log failed — moment released",{contentName:e,error:n})}}function x(e){try{if(p.has(e))return null;p.add(e);let t=a[e],n=(0,s.gw)();if(function(){try{return r.Capacitor.isNativePlatform()}catch(e){return u.k.debug("[AnonymousMeta] Platform check failed; assuming web",{error:e}),!1}}())return b(e,f),{eventId:n,nativeLogged:e in h,pixelFired:!1,pixelRetryScheduled:!1,serverDispatched:!1};let i=function(e,t,n){if(y())return{fired:!1,retryScheduled:!1};if(_(e,t,n))return{fired:!0,retryScheduled:!1};if("function"!=typeof window.setTimeout)return{fired:!1,retryScheduled:!1};let r=Date.now()+3e3,a=()=>{if(!y()&&!_(e,t,n)){if(Date.now()>=r)return void u.k.debug("[AnonymousMeta] fbq never loaded — pixel half dropped",{eventName:e,contentName:t});v(a)}};return v(a),{fired:!1,retryScheduled:!0}}(t,e,n);return{eventId:n,nativeLogged:!1,pixelFired:i.fired,pixelRetryScheduled:i.retryScheduled,serverDispatched:function(e,t,n){if("function"!=typeof fetch)return!1;let r={eventName:e,eventId:n,contentName:t},a=function(){try{let{origin:e,pathname:t}=window.location;return"".concat(e).concat(t)}catch(e){u.k.debug("[AnonymousMeta] Could not read location",{error:e});return}}();a&&(r.eventSourceUrl=a);let i=function(){try{let e=new URLSearchParams(window.location.search).get("fbclid");if(d(e))return e}catch(e){u.k.debug("[AnonymousMeta] Could not read fbclid from location",{error:e})}let e=(0,o.SK)().fbclid;return d(e)?e:void 0}();i&&(r.fbclid=i);try{return fetch("/api/analytics/meta-anonymous",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(r),keepalive:!0}).catch(t=>{u.k.debug("[AnonymousMeta] CAPI POST failed — event dropped",{eventName:e,error:t})}),!0}catch(t){return u.k.debug("[AnonymousMeta] CAPI POST could not be dispatched",{eventName:e,error:t}),!1}}(t,e,n)}}catch(t){return u.k.debug("[AnonymousMeta] Unexpected error dispatching moment",{contentName:e,error:t}),null}}function w(){return x("signup_page")}function k(){return x("signup_started")}},94478:(e,t,n)=>{n.d(t,{Q:()=>o});var r=n(95155),a=n(12115);function o(e){let{phone:t,onComplete:n,onResend:o,resendCooldownSec:i=60,error:s}=e,[c,l]=(0,a.useState)(["","","","","",""]),[d,u]=(0,a.useState)(i),[h,p]=(0,a.useState)(0),m=(0,a.useRef)([]);function f(e){e.preventDefault();let t=e.clipboardData.getData("text").trim().slice(0,6);if(!/^\d{1,6}$/.test(t))return;let r=[...c];t.split("").forEach((e,t)=>{r[t]=e}),l(r);let a=r.join("");6===a.length&&n(a)}async function g(){d>0||(u(i),p(e=>e+1),await o())}return(0,a.useEffect)(()=>{let e=setInterval(()=>{u(e=>e>0?e-1:0)},1e3);return()=>clearInterval(e)},[h]),(0,r.jsxs)("div",{className:"space-y-4",children:[(0,r.jsxs)("p",{className:"text-sm text-gray-600 dark:text-gray-400",children:["We sent a 6-digit code to ",(0,r.jsx)("span",{className:"font-medium",children:t}),"."]}),(0,r.jsx)("div",{className:"flex gap-2",role:"group","aria-label":"6-digit verification code",children:c.map((e,t)=>(0,r.jsx)("input",{type:"text",inputMode:"numeric",maxLength:1,value:e,ref:e=>{e&&(m.current[t]=e)},onChange:e=>(function(e,t){if(!/^\d?$/.test(t))return;let r=[...c];if(r[e]=t,l(r),t&&e<5){var a;null==(a=m.current[e+1])||a.focus()}let o=r.join("");6===o.length&&r.every(e=>""!==e)&&n(o)})(t,e.target.value),onPaste:f,"aria-label":"Digit ".concat(t+1," of 6"),className:"h-12 w-12 rounded-md border border-gray-300 text-center text-xl font-semibold dark:border-gray-600 dark:bg-gray-800"},t))}
1),s&&(0,r.jsx)("p",{className:"text-sm text-error-600 dark:text-error-400",role:"alert",children:s}),(0,r.jsx)("button",{type:"button",onClick:g,disabled:d>0,className:"text-sm text-accent-600 disabled:text-gray-500 dark:text-accent-400 dark:disabled:text-gray-450",children:d>0?"Resend code in ".concat(d,"s"):"Resend code"})]})}},95838:(e,t,n)=>{n.d(t,{A:()=>s});var r=n(95155),a=n(35235),o=n(12115),i=n(19766);let s=(0,o.forwardRef)(function(e,t){var n;let{children:o,size:s="md",variant:c="primary",startIcon:l,title:d,endIcon:u,onClick:h,className:p="",disabled:m=!1,loading:f=!1,type:g="button",style:y,theme:_="adaptive",fullWidth:v=!1,...b}=e,x={primary:"".concat(a.TjX.primary," ").concat(a.ouu),secondary:"".concat(a.TjX.secondary," ").concat(a.ouu),outline:a.TjX.outline,quiet:a.TjX.quiet,record:a.TjX.record,warning:"".concat(a.TjX.warning," ").concat(a.ouu),destructive:"".concat(a.TjX.destructive," ").concat(a.ouu),icon:a.BqA},w="light"===_&&null!=(n=({primary:"bg-primary-500 text-white hover:bg-primary-600 disabled:bg-primary-300",secondary:"bg-gray-100 text-gray-700 hover:bg-primary-50 disabled:bg-gray-300",outline:"bg-white text-gray-700 ring-1 ring-inset ring-gray-300 hover:bg-primary-50/50",quiet:"bg-transparent text-gray-700 hover:bg-primary-50/60",record:"bg-gray-100 text-gray-900 hover:bg-gray-200",destructive:"bg-error-600 text-white hover:bg-error-700 disabled:bg-error-300",warning:"bg-warning-600 text-white hover:bg-warning-700 disabled:bg-warning-300"})[c])?n:x[c],k=new Set(["warning","destructive"]),j="primary"===c?"bg-white dark:bg-primary-500":k.has(c)?"bg-white":"bg-primary dark:bg-white",S=m||f;return(0,r.jsx)("button",{ref:t,type:g,title:d,"aria-label":null!=d?d:f&&"string"==typeof o?o:void 0,"aria-busy":f||void 0,className:"".concat("icon"===c?"".concat(a.BqA," ").concat(p):"inline-flex items-center justify-center gap-2 rounded-md font-medium transition ".concat(v?"w-full":""," ").concat(p," ").concat({sm:"px-4 py-3 text-sm",md:"px-5 py-3.5 text-sm",lg:"px-6 py-4 text-base"}[s]," ").concat(w)," ").concat(S?a.KMS:""),onClick:f?void 0:h,disabled:S,style:y,...b,children:f?(0,r.jsx)(i.i,{size:"sm",colorClass:j}):(0,r.jsxs)(r.Fragment,{children:[l&&(0,r.jsx)("span",{className:"flex items-center",children:l}),o,u&&(0,r.jsx)("span",{className:"flex items-center",children:u})]})})})},99708:(e,t,n)=>{n.d(t,{A:()=>r});let r=(0,n(71847).A)("Lock",[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]])}}]);

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.