PageSourceSearch

https://app.mytravelbuddy.ai/_next/static/chunks/16_t6xwylaqu8.js?dpl=dpl_3JPRMDiZR4n2NJPu5K9M9w9N1Sq2

js mytravelbuddy.ai collected 2026-10-05 12:34:56 UTC 39,046 bytes, 1 lines download raw bytes

1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,617140,e=>{"use strict";var t,n,r=e.i(843476),s=e.i(711241),o=e.i(632781),i=e.i(96315),a=e.i(522016),l=e.i(271645),u=e.i(420865),c=e.i(69355),d=e.i(657688),f=e.i(875021),p=e.i(945060);function h({className:e,priority:t=!1}){return(0,r.jsxs)("div",{className:(0,p.cn)("mx-auto flex w-full flex-col items-center text-center",e),children:[(0,r.jsx)(d.default,{src:f.BRAND_ICON_PATH,alt:"",width:512,height:512,priority:t,className:"h-auto w-36 sm:w-40","aria-hidden":!0}),(0,r.jsxs)("p",{className:"mt-4 text-2xl font-bold tracking-tight sm:text-[1.75rem]",children:[(0,r.jsx)("span",{className:"text-[#1a3d6e]",children:"My"}),(0,r.jsx)("span",{className:"text-teal-500",children:"Travel"}),(0,r.jsx)("span",{className:"text-[#1a3d6e]",children:"Buddy"}),(0,r.jsx)("span",{className:"text-teal-500",children:".ai"})]}),(0,r.jsxs)("p",{className:"mt-2 flex items-center justify-center gap-2 text-[0.65rem] font-semibold uppercase tracking-[0.22em] text-teal-600 sm:text-xs","aria-label":`${f.BRAND_NAME} - ${f.BRAND_TAGLINE}`,children:[(0,r.jsx)(c.Plane,{className:"size-3 shrink-0","aria-hidden":!0}),(0,r.jsx)("span",{children:f.BRAND_TAGLINE}),(0,r.jsx)(u.MapPin,{className:"size-3 shrink-0","aria-hidden":!0})]})]})}var E=e.i(519455);function m(e){return Object.fromEntries(Object.entries(e).map(([e,t])=>[e,{code:e,message:t,toString:()=>e}]))}let g=m({OTP_EXPIRED:"OTP expired",INVALID_OTP:"Invalid OTP",TOO_MANY_ATTEMPTS:"Too many attempts"});var y=e.i(247167);let b=Object.create(null),v=e=>globalThis.process?.env||globalThis.Deno?.env.toObject()||globalThis.__env__||(e?b:globalThis),T=new Proxy(b,{get:(e,t)=>v()[t]??b[t],has:(e,t)=>t in v()||t in b,set:(e,t,n)=>(v(!0)[t]=n,!0),deleteProperty(e,t){if(!t)return!1;let n=v(!0);return delete n[t],!0},ownKeys:()=>Object.keys(v(!0))});function _(e,t){return void 0!==y.default&&y.default.env?y.default.env[e]??t:"u">typeof Deno?Deno.env.get(e)??t:"u">typeof Bun?Bun.env[e]??t:t}void 0!==y.default&&y.default.env,Object.freeze({get BETTER_AUTH_SECRET(){return _("BETTER_AUTH_SECRET")},get AUTH_SECRET(){return _("AUTH_SECRET")},get BETTER_AUTH_TELEMETRY(){return _("BETTER_AUTH_TELEMETRY")},get BETTER_AUTH_TELEMETRY_ID(){return _("BETTER_AUTH_TELEMETRY_ID")},get NODE_ENV(){return _("NODE_ENV","development")},get PACKAGE_VERSION(){return _("PACKAGE_VERSION","0.0.0")},get BETTER_AUTH_TELEMETRY_ENDPOINT(){return _("BETTER_AUTH_TELEMETRY_ENDPOINT","")}}),m({USER_NOT_FOUND:"User not found",FAILED_TO_CREATE_USER:"Failed to create user",FAILED_TO_CREATE_SESSION:"Failed to create session",FAILED_TO_UPDATE_USER:"Failed to update user",FAILED_TO_GET_SESSION:"Failed to get session",INVALID_PASSWORD:"Invalid password",INVALID_EMAIL:"Invalid email",INVALID_EMAIL_OR_PASSWORD:"Invalid email or password",INVALID_USER:"Invalid user",SOCIAL_ACCOUNT_ALREADY_LINKED:"Social account already linked",PROVIDER_NOT_FOUND:"Provider not found",INVALID_TOKEN:"Invalid token",TOKEN_EXPIRED:"Token expired",ID_TOKEN_NOT_SUPPORTED:"id_token not supported",FAILED_TO_GET_USER_INFO:"Failed to get user info",USER_EMAIL_NOT_FOUND:"User email not found",EMAIL_NOT_VERIFIED:"Email not verified",PASSWORD_TOO_SHORT:"Password too short",PASSWORD_TOO_LONG:"Password too long",USER_ALREADY_EXISTS:"User already exists.",USER_ALREADY_EXISTS_USE_ANOTHER_EMAIL:"User already exists. Use another email.",EMAIL_CAN_NOT_BE_UPDATED:"Email can not be updated",CHANGE_EMAIL_DISABLED:"Change email is disabled",CREDENTIAL_ACCOUNT_NOT_FOUND:"Credential account not found",SESSION_EXPIRED:"Session expired. Re-authenticate to perform this action.",FAILED_TO_UNLINK_LAST_ACCOUNT:"You can't unlink your last account",ACCOUNT_NOT_FOUND:"Account not found",USER_ALREADY_HAS_PASSWORD:"User already has a password. Provide that to delete the account.",CROSS_SITE_NAVIGATION_LOGIN_BLOCKED:"Cross-site navigation login blocked. This request appears to be a CSRF attack.",VERIFICATION_EMAIL_NOT_ENABLED:"Verification email isn't enabled",EMAIL_ALREADY_VERIFIED:"Email is already verified",EMAIL_MISMATCH:"Email mismatch",SESSION_NOT_FRESH:"Session is not fresh",LINKED_ACCOUNT_ALREADY_EXISTS:"Linked account already exists",INVALID_ORIGIN:"Invalid origin",INVALID_CALLBACK_URL:"Invalid callbackURL",INVALID_REDIRECT_URL:"Invalid redirectURL",INVALID_ERROR_CALLBACK_URL:"Invalid errorCallbackURL",INVALID_
1NEW_USER_CALLBACK_URL:"Invalid newUserCallbackURL",MISSING_OR_NULL_ORIGIN:"Missing or null Origin",CALLBACK_URL_REQUIRED:"callbackURL is required",FAILED_TO_CREATE_VERIFICATION:"Unable to create verification",FIELD_NOT_ALLOWED:"Field not allowed to be set",ASYNC_VALIDATION_NOT_SUPPORTED:"Async validation is not supported",VALIDATION_ERROR:"Validation Error",MISSING_FIELD:"Field is required",METHOD_NOT_ALLOWED_DEFER_SESSION_REQUIRED:"POST method requires deferSessionRefresh to be enabled in session config",BODY_MUST_BE_AN_OBJECT:"Body must be an object",PASSWORD_ALREADY_SET:"User already has a password set"});let R={OK:200,CREATED:201,ACCEPTED:202,NO_CONTENT:204,MULTIPLE_CHOICES:300,MOVED_PERMANENTLY:301,FOUND:302,SEE_OTHER:303,NOT_MODIFIED:304,TEMPORARY_REDIRECT:307,BAD_REQUEST:400,UNAUTHORIZED:401,PAYMENT_REQUIRED:402,FORBIDDEN:403,NOT_FOUND:404,METHOD_NOT_ALLOWED:405,NOT_ACCEPTABLE:406,PROXY_AUTHENTICATION_REQUIRED:407,REQUEST_TIMEOUT:408,CONFLICT:409,GONE:410,LENGTH_REQUIRED:411,PRECONDITION_FAILED:412,PAYLOAD_TOO_LARGE:413,URI_TOO_LONG:414,UNSUPPORTED_MEDIA_TYPE:415,RANGE_NOT_SATISFIABLE:416,EXPECTATION_FAILED:417,"I'M_A_TEAPOT":418,MISDIRECTED_REQUEST:421,UNPROCESSABLE_ENTITY:422,LOCKED:423,FAILED_DEPENDENCY:424,TOO_EARLY:425,UPGRADE_REQUIRED:426,PRECONDITION_REQUIRED:428,TOO_MANY_REQUESTS:429,REQUEST_HEADER_FIELDS_TOO_LARGE:431,UNAVAILABLE_FOR_LEGAL_REASONS:451,INTERNAL_SERVER_ERROR:500,NOT_IMPLEMENTED:501,BAD_GATEWAY:502,SERVICE_UNAVAILABLE:503,GATEWAY_TIMEOUT:504,HTTP_VERSION_NOT_SUPPORTED:505,VARIANT_ALSO_NEGOTIATES:506,INSUFFICIENT_STORAGE:507,LOOP_DETECTED:508,NOT_EXTENDED:510,NETWORK_AUTHENTICATION_REQUIRED:511};var O=class extends Error{constructor(e="INTERNAL_SERVER_ERROR",t,n={},r="number"==typeof e?e:R[e]){super(t?.message,t?.cause?{cause:t.cause}:void 0),this.status=e,this.body=t,this.headers=n,this.statusCode=r,this.name="APIError",this.status=e,this.headers=n,this.statusCode=r,this.body=t}};Symbol.for("better-call:api-error-headers"),t=O,n=Error,Object.defineProperty((class e extends t{#e;constructor(...e){if(function(){let e=Object.getOwnPropertyDescriptor(Error,"stackTraceLimit");return void 0===e?Object.isExtensible(Error):Object.prototype.hasOwnProperty.call(e,"writable")?e.writable:void 0!==e.set}()){const t=Error.stackTraceLimit;Error.stackTraceLimit=0,super(...e),Error.stackTraceLimit=t}else super(...e);const t=Error().stack;t&&(this.#e=function(e){let t=e.split("\n    at ");return t.length<=1?e:(t.splice(1,1),t.join("\n    at "))}(t.replace(/^Error/,this.name)))}get errorStack(){return this.#e}}).prototype,"constructor",{get:()=>n,enumerable:!1,configurable:!0});var A=class extends Error{constructor(e,t){super(e,t),this.name="BetterAuthError",this.message=e,this.stack=""}};function S(e,t="/api/auth"){try{let t=new URL(e);if("http:"!==t.protocol&&"https:"!==t.protocol)throw new A(`Invalid base URL: ${e}. URL must include 'http://' or 'https://'`)}catch(t){if(t instanceof A)throw t;throw new A(`Invalid base URL: ${e}. Please provide a valid base URL.`,{cause:t})}if(function(e){try{return"/"!==(new URL(e).pathname.replace(/\/+$/,"")||"/")}catch{throw new A(`Invalid base URL: ${e}. Please provide a valid base URL.`)}}(e))return e;let n=e.replace(/\/+$/,"");return t&&"/"!==t?(t=t.startsWith("/")?t:`/${t}`,`${n}${t}`):n}let w={proto:/"(?:_|\\u0{2}5[Ff]){2}(?:p|\\u0{2}70)(?:r|\\u0{2}72)(?:o|\\u0{2}6[Ff])(?:t|\\u0{2}74)(?:o|\\u0{2}6[Ff])(?:_|\\u0{2}5[Ff]){2}"\s*:/,constructor:/"(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)"\s*:/,protoShort:/"__proto__"\s*:/,constructorShort:/"constructor"\s*:/},N=/^\s*["[{]|^\s*-?\d{1,16}(\.\d{1,17})?([Ee][+-]?\d+)?\s*$/,I={true:!0,false:!1,null:null,undefined:void 0,nan:NaN,infinity:1/0,"-infinity":-1/0},L=/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2})(?:\.(\d{1,7}))?(?:Z|([+-])(\d{2}):(\d{2}))$/,x={id:"redirect",name:"Redirect",hooks:{onSuccess(e){if(e.data?.url&&e.data?.redirect&&"u">typeof window&&window.location&&window.location)try{window.location.href=e.data.url}catch{}}}},U=[],D=0,P=globalThis.nanostoresGlobal||={epoch:0},j=e=>{let t=[],n={get:()=>(n.lc||n.listen(()=>{})(),n.value),init:e,lc:0,listen:e=>(n.lc=t.push(e),()=>{for(let t=D+4;t<U.length;)U[t]===e?U.splice(t,4):t+=4;let r=t.indexOf(e);~r&&(t.splice(r,1),--n.lc||n.off())}),notify(e,r){P.epoch++;let s=!U.length;for(let s of t)U.push(s,n.value,e,r);
1if(s){for(D=0;D<U.length;D+=4)U[D](U[D+1],U[D+2],U[D+3]);U.length=0}},off(){},set(e){let t=n.value;t!==e&&(n.value=e,n.notify(t))},subscribe(e){let t=n.listen(e);return e(n.value),t},value:e};return n},C=(e,t)=>{var n,r;return n=n=>{let r=t(n);r&&e.events[6].push(r)},r=t=>{let n=e.listen;e.listen=(...r)=>(e.lc||e.active||(e.active=!0,t()),n(...r));let r=e.off;return e.events[6]=[],e.off=()=>{r(),setTimeout(()=>{if(e.active&&!e.lc){for(let t of(e.active=!1,e.events[6]))t();e.events[6]=[]}},1e3)},()=>{e.listen=n,e.off=r}},e.events=e.events||{},e.events[15]||(e.events[15]=r(t=>{e.events[5].reduceRight((e,t)=>(t(e),e),{shared:{},...t})})),e.events[5]=e.events[5]||[],e.events[5].push(n),()=>{let t=e.events[5],r=t.indexOf(n);t.splice(r,1),t.length||(delete e.events[5],e.events[15](),delete e.events[15])}},k=()=>"u"<typeof window,F=Symbol.for("better-auth:broadcast-channel");var B=class{listeners=new Set;name;constructor(e="better-auth.message"){this.name=e}subscribe(e){return this.listeners.add(e),()=>{this.listeners.delete(e)}}post(e){if("u">typeof window)try{localStorage.setItem(this.name,JSON.stringify({...e,timestamp:Math.floor(Date.now()/1e3)}))}catch{}}setup(){if("u"<typeof window||void 0===window.addEventListener)return()=>{};let e=e=>{if(e.key!==this.name)return;let t=JSON.parse(e.newValue??"{}");t?.event==="session"&&t?.data&&this.listeners.forEach(e=>e(t))};return window.addEventListener("storage",e),()=>{window.removeEventListener("storage",e)}}};function M(e="better-auth.message"){return globalThis[F]||(globalThis[F]=new B(e)),globalThis[F]}let $=Symbol.for("better-auth:focus-manager");var q=class{listeners=new Set;subscribe(e){return this.listeners.add(e),()=>{this.listeners.delete(e)}}setFocused(e){this.listeners.forEach(t=>t(e))}setup(){if("u"<typeof window||"u"<typeof document||void 0===window.addEventListener)return()=>{};let e=()=>{"visible"===document.visibilityState&&this.setFocused(!0)};return document.addEventListener("visibilitychange",e,!1),()=>{document.removeEventListener("visibilitychange",e,!1)}}};function H(){return globalThis[$]||(globalThis[$]=new q),globalThis[$]}let V=Symbol.for("better-auth:online-manager");var G=class{listeners=new Set;isOnline="u"<typeof navigator||navigator.onLine;subscribe(e){return this.listeners.add(e),()=>{this.listeners.delete(e)}}setOnline(e){this.isOnline=e,this.listeners.forEach(t=>t(e))}setup(){if("u"<typeof window||void 0===window.addEventListener)return()=>{};let e=()=>this.setOnline(!0),t=()=>this.setOnline(!1);return window.addEventListener("online",e,!1),window.addEventListener("offline",t,!1),()=>{window.removeEventListener("online",e,!1),window.removeEventListener("offline",t,!1)}}};function W(){return globalThis[V]||(globalThis[V]=new G),globalThis[V]}let Y=()=>Math.floor(Date.now()/1e3);function K(e){return"object"==typeof e&&null!==e&&"data"in e&&"error"in e?e:{data:e,error:null}}function X(e){if(null===e||"object"!=typeof e)return!1;let t=Object.getPrototypeOf(e);return(null===t||t===Object.prototype||null===Object.getPrototypeOf(t))&&!(Symbol.iterator in e)&&(!(Symbol.toStringTag in e)||"[object Module]"===Object.prototype.toString.call(e))}function J(e){return(...t)=>t.reduce((t,n)=>(function e(t,n,r=".",s){if(!X(n))return e(t,{},r,s);let o={...n};for(let n of Object.keys(t)){if("__proto__"===n||"constructor"===n)continue;let i=t[n];null!=i&&(s&&s(o,n,i,r)||(Array.isArray(i)&&Array.isArray(o[n])?o[n]=[...i,...o[n]]:X(i)&&X(o[n])?o[n]=e(i,o[n],(r?`${r}.`:"")+n.toString(),s):o[n]=i))}return o})(t,n,"",e),{})}let Q=J();J((e,t,n)=>{if(void 0!==e[t]&&"function"==typeof n)return e[t]=n(e[t]),!0}),J((e,t,n)=>{if(Array.isArray(e[t])&&"function"==typeof n)return e[t]=n(e[t]),!0});var z=Object.defineProperty,Z=Object.defineProperties,ee=Object.getOwnPropertyDescriptors,et=Object.getOwnPropertySymbols,en=Object.prototype.hasOwnProperty,er=Object.prototype.propertyIsEnumerable,es=(e,t,n)=>t in e?z(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,eo=(e,t)=>{for(var n in t||(t={}))en.call(t,n)&&es(e,n,t[n]);
1if(et)for(var n of et(t))er.call(t,n)&&es(e,n,t[n]);return e},ei=(e,t)=>Z(e,ee(t)),ea=class extends Error{constructor(e,t,n){super(t||e.toString(),{cause:n}),this.status=e,this.statusText=t,this.error=n,Error.captureStackTrace(this,this.constructor)}},el=async(e,t)=>{var n,r,s,o,i,a;let l=t||{},u={onRequest:[null==t?void 0:t.onRequest],onResponse:[null==t?void 0:t.onResponse],onSuccess:[null==t?void 0:t.onSuccess],onError:[null==t?void 0:t.onError],onRetry:[null==t?void 0:t.onRetry]};if(!t||!(null==t?void 0:t.plugins))return{url:e,options:l,hooks:u};for(let c of(null==t?void 0:t.plugins)||[]){if(c.init){let r=await (null==(n=c.init)?void 0:n.call(c,e.toString(),t));l=r.options||l,e=r.url}u.onRequest.push(null==(r=c.hooks)?void 0:r.onRequest),u.onResponse.push(null==(s=c.hooks)?void 0:s.onResponse),u.onSuccess.push(null==(o=c.hooks)?void 0:o.onSuccess),u.onError.push(null==(i=c.hooks)?void 0:i.onError),u.onRetry.push(null==(a=c.hooks)?void 0:a.onRetry)}return{url:e,options:l,hooks:u}},eu=class{constructor(e){this.options=e}shouldAttemptRetry(e,t){return this.options.shouldRetry?Promise.resolve(e<this.options.attempts&&this.options.shouldRetry(t)):Promise.resolve(e<this.options.attempts)}getDelay(){return this.options.delay}},ec=class{constructor(e){this.options=e}shouldAttemptRetry(e,t){return this.options.shouldRetry?Promise.resolve(e<this.options.attempts&&this.options.shouldRetry(t)):Promise.resolve(e<this.options.attempts)}getDelay(e){return Math.min(this.options.maxDelay,this.options.baseDelay*2**e)}},ed=async e=>{let t={},n=async e=>"function"==typeof e?await e():e;if(null==e?void 0:e.auth){if("Bearer"===e.auth.type){let r=await n(e.auth.token);if(!r)return t;t.authorization=`Bearer ${r}`}else if("Basic"===e.auth.type){let[r,s]=await Promise.all([n(e.auth.username),n(e.auth.password)]);if(!r||!s)return t;t.authorization=`Basic ${btoa(`${r}:${s}`)}`}else if("Custom"===e.auth.type){let[r,s]=await Promise.all([n(e.auth.prefix),n(e.auth.value)]);if(!s)return t;t.authorization=`${null!=r?r:""} ${s}`}}return t},ef=/^application\/(?:[\w!#$%&*.^`~-]*\+)?json(;.+)?$/i;function ep(e){if(void 0===e)return!1;let t=typeof e;return"string"===t||"number"===t||"boolean"===t||null===t||"object"===t&&(!!Array.isArray(e)||!e.buffer&&(e.constructor&&"Object"===e.constructor.name||"function"==typeof e.toJSON))}function eh(e){try{return JSON.parse(e)}catch(t){return e}}function eE(e){return"function"==typeof e}async function em(e){let t=new Headers(null==e?void 0:e.headers);for(let[n,r]of Object.entries(await ed(e)||{}))t.set(n,r);if(!t.has("content-type")){let n=ep(null==e?void 0:e.body)?"application/json":null;n&&t.set("content-type",n)}return t}var eg=class e extends Error{constructor(t,n){super(n||JSON.stringify(t,null,2)),this.issues=t,Object.setPrototypeOf(this,e.prototype)}};async function ey(e,t){let n=await e["~standard"].validate(t);if(n.issues)throw new eg(n.issues);return n.value}var eb=["get","post","put","patch","delete"],ev=async(e,t)=>{var n,r,s,o,i,a,l,u;let c,{hooks:d,url:f,options:p}=await el(e,t),h=function(e){if(null==e?void 0:e.customFetchImpl)return e.customFetchImpl;if("u">typeof globalThis&&eE(globalThis.fetch))return globalThis.fetch;if("u">typeof window&&eE(window.fetch))return window.fetch;throw Error("No fetch implementation found")}(p),E=new AbortController,m=null!=(n=p.signal)?n:E.signal,g=function(e,t){let{baseURL:n,params:r,query:s}=t||{query:{},params:{},baseURL:""},o=e.startsWith("http")?e.split("/").slice(0,3).join("/"):n||"";if(e.startsWith("@")){let t=e.toString().split("@")[1].split("/")[0];eb.includes(t)&&(e=e.replace(`@${t}/`,"/"))}o.endsWith("/")||(o+="/");let[i,a]=e.replace(o,"").split("?"),l=new URLSearchParams(a);for(let[e,t]of Object.entries(s||{})){let n;if(null!=t){if("string"==typeof t)n=t;else if(Array.isArray(t)){for(let n of t)l.append(e,n);continue}else n=JSON.stringify(t);l.set(e,n)}}if(r)if(Array.isArray(r))for(let[e,t]of i.split("/").filter(e=>e.startsWith(":")).entries()){let n=r[e];i=i.replace(t,n)}else for(let[e,t]of Object.entries(r))i=i.replace(`:${e}`,String(t));(i=i.split("/").map(encodeURIComponent).join("/")).startsWith("/")&&(i=i.slice(1));let u=l.toString();return(u=u.length>0?`?${u}`.replace(/\+/g,"%20"):"",o.startsWith("http"))?new URL(`${i}${u}`,o):`${o}${i}${u}`}(f,p),y=function(e){if(!(null==e?void 0:e.body))return null;let t=new Headers(null==e?void 0:e.headers);if(ep(e.body)&&!t.has("content-type")){for(let[t,n]of Object.entries(null==e?void 0:e.body))n instanceof Date&&(e.body[t]=n.toISOString());return JSON.stringify(e.body)}return t.has("content-type")&&"application/x-www-form-urlencoded"===t.get("content-type")&&ep(e.body)?new URLSearchParams(e.body).toString():e.body}(p),b=await em(p),v=function(e,t){var n;if(null==t?void 0:t.method)return t.method.toUpperCase();if(e.startsWith("@")){let r=null==(n=e.split("@")[1])?void 0:n.split("/")[0];return eb.includes(r)?r.toUpperCase():(null==t?void 0:t.body)?"POST":"GET"}return(null==t?void 0:t.body)?"POST":"GET"}(f,p),T=ei(eo({},p),{url:g,headers:b,body:y,method:v,signal:m});for(let e of d.onRequest)if(e){let t=await e(T);"object"==typeof t&&null!==t&&(T=t)}("pipeTo"in T&&"function"==typeof T.pipeTo||"function"==typeof(null==(r=null==t?void 0:t.body)?void 0:r.pipe))&&!("duplex"in T)&&(T.duplex="half");let{clearTimeout:_}=(!(null==p?void 0:p.signal)&&(null==p?void 0:p.timeout)&&(c=setTimeout(()=>null==E?void 0:E.abort(),null==p?void 0:p.timeout)),{abortTimeout:c,clearTimeout:()=>{c&&clearTimeout(c)}}),R=await h(T.url,T);_();let O={response:R,request:T};for(let e of d.onResponse)if(e){let n=await e(ei(eo({},O),{response:(null==(s=null==t?void 0:t.hookOptions)?void 0:s.cloneResponse)?R.clone():R}));n instanceof Response?R=n:"object"==typeof n&&null!==n&&(R=n.response)}if(R.ok){if("HEAD"===T.method)return{data:"",error:null};let e=function(e){let t=e.headers.get("content-type"),n=new Set(["image/svg","application/xml","application/xhtml","application/html"]);if(!t)return"json";let r=t.split(";").shift()||"";return ef.test(r)?"json":n.has(r)||r.startsWith("text/")?"text":"blob"}(R),n={data:null,response:R,request:T};if("json"===e||"text"===e){let e=await R.text(),t=null!=(o=T.jsonParser)?o:eh;n.data=await t(e)}else n.data=await R[e]();for(let e of((null==T?void 0:T.output)&&T.output&&!T.disableValidation&&(n.data=await ey(T.output,n.data)),d.onSuccess))e&&await e(ei(eo({},n),{response:(null==(i=null==t?void 0:t.hookOptions)?void 0:i.cloneResponse)?R.clone():R}));return(null==t?void 0:t.throw)?n.data:{data:n.data,error:null}}let A=null!=(a=null==t?void 0:t.jsonParser)?a:eh,S=await R.text(),w=function(e){try{return JSON.parse(e),!0}catch(e){return!1}}(S),N=w?await A(S):null,I={response:R,responseText:S,request:T,error:ei(eo({},N),{status:R.status,statusText:R.statusText})};for(let e of d.onError)e&&await e(ei(eo({},I),{response:(null==(l=null==t?void 0:t.hookOptions)?void 0:l.cloneResponse)?R.clone():R}));if(null==t?void 0:t.retry){let n=function(e){if("number"==typeof e)return new eu({type:"linear",attempts:e,delay:1e3});switch(e.type){case"linear":return new eu(e);case"exponential":return new ec(e);default:throw Error("Invalid retry strategy")}}(t.retry),r=null!=(u=t.retryAttempt)?u:0;
1if(await n.shouldAttemptRetry(r,R)){for(let e of d.onRetry)e&&await e(O);let s=n.getDelay(r);return await new Promise(e=>setTimeout(e,s)),await ev(e,ei(eo({},t),{retryAttempt:r+1}))}}if(null==t?void 0:t.throw)throw new ea(R.status,R.statusText,w?N:S);return{data:null,error:ei(eo({},N),{status:R.status,statusText:R.statusText})}};let eT=function(e){var t;let{pluginPathMethods:n,pluginsActions:r,pluginsAtoms:s,$fetch:o,$store:i,atomListeners:a}=(e=>{var t;let n,r,s,o="credentials"in Request.prototype,i=function(e,t,n,r){if(e)return S(e,t);if(!1!==r){let e=T.BETTER_AUTH_URL||T.NEXT_PUBLIC_BETTER_AUTH_URL||T.PUBLIC_BETTER_AUTH_URL||T.NUXT_PUBLIC_BETTER_AUTH_URL||T.NUXT_PUBLIC_AUTH_URL||("/"!==T.BASE_URL?T.BASE_URL:void 0);if(e)return S(e,t)}n?.headers.get("x-forwarded-host"),n?.headers.get("x-forwarded-proto");if(n){let e=function(e){try{let t=new URL(e);return"null"===t.origin?null:t.origin}catch{return null}}(n.url);if(!e)throw new A("Could not get origin from request. Please provide a valid base URL.");return S(e,t)}if("u">typeof window&&window.location)return S(window.location.origin,t)}(e?.baseURL,e?.basePath,void 0,void 0)??(e=>{if(void 0!==y.default){if(y.default.env.NEXT_PUBLIC_AUTH_URL)return y.default.env.NEXT_PUBLIC_AUTH_URL;if("u"<typeof window){if(y.default.env.NEXTAUTH_URL)try{return y.default.env.NEXTAUTH_URL}catch{}if(y.default.env.VERCEL_URL)try{let t=y.default.env.VERCEL_URL.startsWith("http")?"":"https://";return`${new URL(`${t}${y.default.env.VERCEL_URL}`).origin}${e??"/api/auth"}`}catch{}}}})(e?.basePath)??"/api/auth",a=e?.plugins?.flatMap(e=>e.fetchPlugins).filter(e=>void 0!==e)||[],l={id:"lifecycle-hooks",name:"lifecycle-hooks",hooks:{onSuccess:e?.fetchOptions?.onSuccess,onError:e?.fetchOptions?.onError,onRequest:e?.fetchOptions?.onRequest,onResponse:e?.fetchOptions?.onResponse}},{onSuccess:u,onError:c,onRequest:d,onResponse:f,...p}=e?.fetchOptions||{},h=(t={baseURL:i,...o?{credentials:"include"}:{},method:"GET",jsonParser:e=>e?function(e,t={strict:!0}){return function(e,t={}){let{strict:n=!1,warnings:r=!1,reviver:s,parseDates:o=!0}=t;if("string"!=typeof e)return e;let i=e.trim();if(i.length>0&&'"'===i[0]&&i.endsWith('"')&&!i.slice(1,-1).includes('"'))return i.slice(1,-1);let a=i.toLowerCase();if(a.length<=9&&a in I)return I[a];if(!N.test(i)){if(n)throw SyntaxError("[better-json] Invalid JSON");return e}if(Object.entries(w).some(([e,t])=>{let n=t.test(i);return n&&r&&console.warn(`[better-json] Detected potential prototype pollution attempt using ${e} pattern`),n})&&n)throw Error("[better-json] Potential prototype pollution attempt detected");try{return JSON.parse(i,(e,t)=>{if("__proto__"===e||"constructor"===e&&t&&"object"==typeof t&&"prototype"in t){r&&console.warn(`[better-json] Dropping "${e}" key to prevent prototype pollution`);return}if(o&&"string"==typeof t){let e=function(e){let t=L.exec(e);if(!t)return null;let[,n,r,s,o,i,a,l,u,c,d]=t,f=new Date(Date.UTC(parseInt(n,10),parseInt(r,10)-1,parseInt(s,10),parseInt(o,10),parseInt(i,10),parseInt(a,10),l?parseInt(l.padEnd(3,"0"),10):0));if(u){let e=(60*parseInt(c,10)+parseInt(d,10))*("+"===u?-1:1);f.setUTCMinutes(f.getUTCMinutes()+e)}return f instanceof Date&&!isNaN(f.getTime())?f:null}(t);if(e)return e}return s?s(e,t):t})}catch(t){if(n)throw t;return e}}(e,t)}(e,{strict:!1}):null,customFetchImpl:fetch,...p,plugins:[l,...p.plugins||[],...e?.disableDefaultFetchPlugins?[]:[x],...a]},async function(e,n){let r,s=ei(eo(eo({},t),n),{plugins:[...(null==t?void 0:t.plugins)||[],(r=t||{},{id:"apply-schema",name:"Apply Schema",version:"1.0.0",async init(e,t){var n,s,o,i;let a=(null==(s=null==(n=r.plugins)?void 0:n.find(t=>{var n;return null!=(n=t.schema)&&!!n.config&&(e.startsWith(t.schema.config.baseURL||"")||e.startsWith(t.schema.config.prefix||""))}))?void 0:s.schema)||r.schema;if(a){let n=e;(null==(o=a.config)?void 0:o.prefix)&&n.startsWith(a.config.prefix)&&(n=n.replace(a.config.prefix,""),a.config.baseURL&&(e=e.replace(a.config.prefix,a.config.baseURL))),(null==(i=a.config)?void 0:i.baseURL)&&n.startsWith(a.config.baseURL)&&(n=n.replace(a.config.baseURL,""));let r=a.schema[n];if(r){let n=ei(eo({},t),{method:r.method,output:r.output});return(null==t?void 0:t.disableValidation)||(n=ei(eo({},n),{body:r.input?await ey(r.input,null==t?void 0:t.body):null==t?void 0:t.body,params:r.params?await ey(r.params,null==t?void 0:t.params):null==t?void 0:t.params,query:r.query?await ey(r.query,null==t?void 0:t.query):null==t?void 0:t.query})),{url:e,options:n}}}return{url:e,options:t}}}),...(null==n?void 0:n.plugins)||[]]});if(null==t?void 0:t.catchAllError)try{return await ev(e,s)}catch(e){return{data:null,error:{status:500,statusText:"Fetch Error",message:"Fetch related error. Captured by catchAllError option. See error property for more details.",error:e}}}return await ev(e,s)}),{$sessionSignal:E,session:m,broadcastSessionUpdate:g}=(r=((e,t,n,r)=>{let s=j({data:null,error:null,isPending:!0,isRefetching:!1,refetch:e=>o(e)}),o=async e=>new Promise(o=>{let i="function"==typeof r?r({data:s.get().data,error:s.get().error,
1isPending:s.get().isPending}):r;n(t,{...i,query:{...i?.query,...e?.query},async onSuccess(e){s.set({data:e.data,error:null,isPending:!1,isRefetching:!1,refetch:s.value.refetch}),await i?.onSuccess?.(e)},async onError(e){let{request:t}=e,n="number"==typeof t.retry?t.retry:t.retry?.attempts,r=t.retryAttempt||0;if(n&&r<n)return;let o=401===e.error.status;s.set({error:e.error,data:o?null:s.get().data,isPending:!1,isRefetching:!1,refetch:s.value.refetch}),await i?.onError?.(e)},async onRequest(e){let t=s.get();s.set({isPending:null===t.data,data:t.data,error:null,isRefetching:!0,refetch:s.value.refetch}),await i?.onRequest?.(e)}}).catch(e=>{s.set({error:e,data:s.get().data,isPending:!1,isRefetching:!1,refetch:s.value.refetch})}).finally(()=>{o(void 0)})});e=Array.isArray(e)?e:[e];let i=!1;for(let t of e)t.subscribe(async()=>{k()||(i?await o():C(s,()=>{let e=setTimeout(async()=>{i||(i=!0,await o())},0);return()=>{s.off(),t.off(),clearTimeout(e)}}))});return s})(n=j(!1),"/get-session",h,{method:"GET"}),s=()=>{},C(r,()=>{let t=function(e){let{sessionAtom:t,sessionSignal:n,$fetch:r,options:s={}}=e,o=s.sessionOptions?.refetchInterval??0,i=s.sessionOptions?.refetchOnWindowFocus??!0,a=s.sessionOptions?.refetchWhenOffline??!1,l={lastSync:0,lastSessionRequest:0,cachedSession:void 0},u=e=>{if(!(a||W().isOnline))return;if(e?.event==="storage"){l.lastSync=Y(),n.set(!n.get());return}let s=t.get(),o=()=>{l.lastSessionRequest=Y(),r("/get-session").then(async e=>{let{data:o,error:i}=K(e);if(o?.needsRefresh)try{let e=await r("/get-session",{method:"POST"});({data:o,error:i}=K(e))}catch{}let a=o?.session&&o?.user?o:null;t.set({...s,data:a,error:i}),l.lastSync=Y(),n.set(!n.get())}).catch(()=>{})};if(e?.event==="poll")return void o();if(e?.event==="visibilitychange"){if(Y()-l.lastSessionRequest<5)return;l.lastSessionRequest=Y()}e?.event==="visibilitychange"?o():(s?.data===null||s?.data===void 0)&&(l.lastSync=Y(),n.set(!n.get()))};return{init:()=>{o&&o>0&&(l.pollInterval=setInterval(()=>{t.get()?.data&&u({event:"poll"})},1e3*o)),l.unsubscribeBroadcast=M().subscribe(()=>{u({event:"storage"})}),i&&(l.unsubscribeFocus=H().subscribe(()=>{u({event:"visibilitychange"})})),l.unsubscribeOnline=W().subscribe(e=>{e&&u({event:"visibilitychange"})}),M().setup(),H().setup(),W().setup()},cleanup:()=>{l.pollInterval&&(clearInterval(l.pollInterval),l.pollInterval=void 0),l.unsubscribeBroadcast&&(l.unsubscribeBroadcast(),l.unsubscribeBroadcast=void 0),l.unsubscribeFocus&&(l.unsubscribeFocus(),l.unsubscribeFocus=void 0),l.unsubscribeOnline&&(l.unsubscribeOnline(),l.unsubscribeOnline=void 0),l.lastSync=0,l.lastSessionRequest=0,l.cachedSession=void 0},triggerRefetch:u,broadcastSessionUpdate:e=>{M().post({event:"session",data:{trigger:e},clientId:Math.random().toString(36).substring(7)})}}}({sessionAtom:r,sessionSignal:n,$fetch:h,options:e});return t.init(),s=t.broadcastSessionUpdate,()=>{t.cleanup()}}),{session:r,$sessionSignal:n,broadcastSessionUpdate:e=>s(e)}),b=e?.plugins||[],v={},_={$sessionSignal:E,session:m},R={"/sign-out":"POST","/revoke-sessions":"POST","/revoke-other-sessions":"POST","/delete-user":"POST"},O=[{signal:"$sessionSignal",matcher:e=>"/sign-out"===e||"/update-user"===e||"/update-session"===e||"/sign-up/email"===e||"/sign-in/email"===e||"/delete-user"===e||"/verify-email"===e||"/revoke-sessions"===e||"/revoke-session"===e||"/revoke-other-sessions"===e||"/change-email"===e||"/change-password"===e,callback(e){"/sign-out"===e?g("signout"):("/update-user"===e||"/update-session"===e)&&g("updateUser")}}];for(let e of b)e.getAtoms&&Object.assign(_,e.getAtoms?.(h)),e.pathMethods&&Object.assign(R,e.pathMethods),e.atomListeners&&O.push(...e.atomListeners);let U={notify:e=>{_[e].set(!_[e].get())},listen:(e,t)=>{_[e].subscribe(t)},atoms:_};for(let t of b)t.getActions&&(v=Q(t.getActions?.(h,U,e)??{},v));return{get baseURL(){return i},pluginsActions:v,pluginsAtoms:_,pluginPathMethods:R,atomListeners:O,$fetch:h,$store:U}})(e),u={};for(let[e,t]of Object.entries(s))u[function(e){return`use${e.charAt(0).toUpperCase()+e.slice(1)}`}(e)]=()=>(function(e,t={}){let n=(0,l.useRef)(e.get()),{keys:r,deps:s=[e,r]}=t,o=(0,l.useCallback)(t=>{let s=e=>{n.current!==e&&(n.current=e,t())};if(s(e.value),r?.length){let t;return t=new Set(r).add(void 0),e.listen((e,n,r)=>{t.has(r)&&s(e,n,r)})}return e.listen(s)},s),i=()=>n.current;return(0,l.useSyncExternalStore)(o,i,i)})(t);return t={...r,...u,$fetch:o,$store:i},function e(r=[]){return new Proxy(function(){},{get(n,s){var o;if("string"!=typeof s||"then"===s||"catch"===s||"finally"===s)return;let i=[...r,s],a=t;for(let e of i)if(a&&"object"==typeof a&&e in a)a=a[e];else{a=void 0;break}return"function"==typeof a?a:"object"==typeof(o=a)&&null!==o&&"get"in o&&"function"==typeof o.get&&"lc"in o&&"number"==typeof o.lc?a:e(i)},apply:async(e,t,i)=>{let l="/"+r.map(e=>e.replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`)).join("/"),u=i[0]||{},c=i[1]||{},{query:d,fetchOptions:f,...p}=u,h={...c,...f},E=function(e,t,n){let r=t[e],{fetchOptions:s,query:o,...i}=n||{};return r||(s?.method?s.method:i&&Object.keys(i).length>0?"POST":"GET")}(l,n,u);return await o(l,{...h,body:"GET"===E?void 0:{...p,...h?.body||{}},query:d||h?.query,method:E,async onSuccess(e){if(await h?.onSuccess?.(e),!a||h.disableSignal)return;let t=a.filter(e=>e.matcher(l));if(!t.length)return;let n=new Set;for(let e of t){let t=s[e.signal];if(!t)return;if(n.has(e.signal))continue;n.add(e.signal);let r=t.get();setTimeout(()=>{t.set(!r)},10),e.callback?.(l)}}})}})}()}
1({plugins:[{id:"email-otp",version:"1.6.11",$InferServerPlugin:{},atomListeners:[{matcher:e=>"/email-otp/verify-email"===e||"/sign-in/email-otp"===e||"/email-otp/request-email-change"===e,signal:"$sessionSignal"}],$ERROR_CODES:g}]}),e_=()=>Array.from({length:6},()=>"");function eR(e){return e.replace(/\D/g,"").slice(0,6)}async function eO(e,t){let n=await fetch(`/api/auth${e}`,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify(t)});if(!n.ok){let e=await n.json().catch(()=>null);throw Error(e?.message??e?.error??"Authentication request failed.")}}async function eA(e,t){let n=await fetch(e,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify(t)});if(!n.ok){let e=await n.json().catch(()=>null);throw Error(e?.message??e?.error??"Request failed.")}}async function eS(){await fetch("/api/user/guest",{method:"DELETE",credentials:"include"}).catch(()=>void 0)}e.s(["AuthForm",0,function({googleEnabled:e,facebookEnabled:t,className:n,title:u,description:c,embedded:d=!1,useGuestConversion:f=!1,callbackUrl:m="/trips",onSuccess:g}){let y=c??function(e,t){let n=[e?"Google":null,t?"Facebook":null].filter(e=>null!==e);if(0===n.length)return"Enter your email address and we'll send you a code to sign in.";let r=1===n.length?n[0]:`${n.slice(0,-1).join(", ")} or ${n[n.length-1]}`;return`Sign in with ${r} or enter your email address and we'll send you a code to sign in.`}(e,t),b=(0,l.useRef)([]),v=(0,l.useRef)(!1),T=(0,l.useRef)(e_()),[_,R]=(0,l.useState)("email"),[O,A]=(0,l.useState)(""),[S,w]=(0,l.useState)(e_),[N,I]=(0,l.useState)(null),[L,x]=(0,l.useState)(null),[U,D]=(0,l.useState)(!1),P=S.join(""),j=e=>{requestAnimationFrame(()=>b.current[e]?.focus())},C=e=>{T.current=e,w(e)},k=async()=>{if(!O)return void x("Enter your email address first.");D(!0),x(null),I(null);try{await eO("/email-otp/send-verification-otp",{email:O,type:"sign-in"}),R("code"),C(e_()),I("Check your email for the 6-digit code."),j(0)}catch(e){x(e instanceof Error?e.message:"Could not send a sign-in code.")}finally{D(!1)}},F=async(e=P)=>{if(6!==e.length||v.current){6!==e.length&&x("Enter the full 6-digit code.");return}v.current=!0,D(!0),x(null),I(null);try{let t={email:O,otp:e,name:O.split("@")[0]||O};f?await eA("/api/auth/guest/email-otp",t):(await eA("/api/auth/email-otp",t),await eS()),g?.()}catch(e){x(e instanceof Error?e.message:"The code could not be verified."),j(5)}finally{v.current=!1,D(!1)}},B=async()=>{if(!e)return void x("Google sign-in is not configured yet.");D(!0),x(null);try{await eT.signIn.social({provider:"google",callbackURL:m})}catch(e){x(e instanceof Error?e.message:"Could not start Google sign-in."),D(!1)}},M=async()=>{if(!t)return void x("Facebook sign-in is not configured yet.");D(!0),x(null);try{await eT.signIn.social({provider:"facebook",callbackURL:m})}catch(e){x(e instanceof Error?e.message:"Could not start Facebook sign-in."),D(!1)}},$=(e,t=0)=>{let n=eR(e).slice(0,6-t);if(0===n.length)return;let r=[...T.current];n.split("").forEach((e,n)=>{r[t+n]=e}),C(r),j(Math.min(t+n.length,5)),r.every(e=>""!==e)&&F(r.join(""))};return(0,r.jsxs)("section",{className:(0,p.cn)("w-full max-w-xl rounded-3xl border bg-card p-6 shadow-2xl shadow-foreground/10 sm:p-10",n),children:[d?null:(0,r.jsx)(h,{priority:!0,className:"max-w-[300px] sm:max-w-sm"}),(0,r.jsxs)("div",{className:(0,p.cn)("text-center",d?"mt-0":void 0!==u?"mt-6":"mt-5"),children:[void 0!==u?(0,r.jsx)("h1",{className:(0,p.cn)("font-semibold tracking-tight",d?"text-2xl":"text-3xl sm:text-4xl"),children:u}):null,(0,r.jsx)("p",{className:(0,p.cn)("mx-auto max-w-md text-sm leading-6 text-muted-foreground sm:text-base",void 0!==u?"mt-3":"mt-0"),children:y})]}),(0,r.jsxs)("div",{className:"mt-8 space-y-6",children:["email"===_?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(E.Button,{type:"button",variant:"outline",className:"h-12 w-full gap-3 text-base",disabled:!e||U,onClick:B,children:[(0,r.jsx)("span",{className:"flex h-6 w-6 items-center justify-center rounded-full border text-xs font-semibold",children:"G"}),e?"Sign in with Google":"Google sign-in not configured"]}),t?(0,r.jsxs)(E.Button,{type:"button",variant:"outline",className:"h-12 w-full gap-3 text-base",disabled:U,onClick:M,children:[(0,r.jsx)("span",{className:"flex h-6 w-6 items-center justify-center rounded-full border text-xs font-semibold",children:"f"}),"Sign in with Facebook"]}):null,(0,r.jsxs)("div",{className:"flex items-center gap-3 text-sm text-muted-foreground",children:[(0,r.jsx)("div",{className:"h-px flex-1 bg-border"}),(0,r.jsx)("span",{children:"Or continue with email"}),(0,r.jsx)("div",{className:"h-px flex-1 bg-border"})]}),(0,r.jsxs)("form",{className:"space-y-4",method:"post",action:"#",onSubmit:e=>{e.preventDefault(),k()},children:[(0,r.jsxs)("label",{className:"block space-y-2 text-sm font-medium",children:[(0,r.jsx)("span",{children:"Email address"}),(0,r.jsx)("input",{type:"email",name:"email",value:O,autoComplete:"email",placeholder:"[email protected]",className:"h-12 w-full rounded-xl border bg-background px-4 text-base outline-none transition-colors placeholder:text-muted-foreground
1/70 focus:border-ring focus:ring-2 focus:ring-ring/20",onChange:e=>A(e.target.value)})]}),(0,r.jsxs)(E.Button,{type:"submit",className:"h-12 w-full text-base",disabled:U,children:[U?(0,r.jsx)(o.Loader2,{className:"h-4 w-4 animate-spin"}):(0,r.jsx)(i.Mail,{className:"h-4 w-4"}),"Send sign-in code"]})]})]}):(0,r.jsxs)("form",{className:"space-y-5",onSubmit:e=>{e.preventDefault(),F()},children:[(0,r.jsxs)("button",{type:"button",className:"inline-flex items-center gap-2 text-sm text-muted-foreground transition-colors hover:text-foreground",onClick:()=>{R("email"),C(e_()),x(null)},children:[(0,r.jsx)(s.ArrowLeft,{className:"h-4 w-4"}),"Change email"]}),(0,r.jsxs)("p",{className:"text-center text-sm text-muted-foreground",children:["Check ",(0,r.jsx)("span",{className:"font-medium text-foreground",children:O})," for the 6-digit code and enter it below."]}),(0,r.jsx)("div",{className:"grid grid-cols-6 gap-2 sm:gap-3",children:S.map((e,t)=>(0,r.jsx)("input",{ref:e=>{b.current[t]=e},type:"text",inputMode:"numeric",pattern:"[0-9]*",autoComplete:0===t?"one-time-code":"off",autoCorrect:"off",autoCapitalize:"none",spellCheck:!1,enterKeyHint:5===t?"done":"next",maxLength:6,value:e,"aria-label":`Digit ${t+1} of 6`,className:"aspect-square rounded-2xl border bg-background text-center text-xl font-semibold tabular-nums outline-none transition-colors focus:border-ring focus:ring-2 focus:ring-ring/20 sm:text-2xl",onChange:e=>{let n=e.target.value;if(""===n){let e=[...T.current];e[t]="",C(e);return}let r=eR(n);$(r,r.length>1?0:t)},onKeyDown:e=>{if("Backspace"===e.key||"Delete"===e.key){e.preventDefault(),(e=>{let t=T.current,n=!!t[e],r=[...t];if(n){r[e]="",C(r);return}e>0&&(r[e-1]="",C(r),j(e-1))})(t);return}if("ArrowLeft"===e.key&&t>0){e.preventDefault(),j(t-1);return}"ArrowRight"===e.key&&t<5&&(e.preventDefault(),j(t+1))},onPaste:e=>{let t=e.clipboardData?.getData("text")??"";t&&(e.preventDefault(),$(t,0))},onFocus:e=>{e.target.select()}},t))}),(0,r.jsx)("p",{className:"text-sm text-muted-foreground",children:"Paste the full code into any box to fill it automatically."}),(0,r.jsxs)(E.Button,{type:"submit",className:"h-12 w-full text-base",disabled:U||P.length<6,children:[U&&(0,r.jsx)(o.Loader2,{className:"h-4 w-4 animate-spin"}),"Verify code"]}),(0,r.jsx)("button",{type:"button",className:"mx-auto block text-sm font-medium text-muted-foreground underline-offset-4 hover:text-foreground hover:underline",disabled:U,onClick:()=>void k(),children:"Request a new code"})]}),(N||L)&&(0,r.jsx)("p",{className:(0,p.cn)("rounded-xl border px-4 py-3 text-sm",L?"border-destructive/30 bg-destructive/10 text-destructive":"bg-muted text-muted-foreground"),children:L??N}),(0,r.jsxs)("p",{className:"text-center text-xs leading-5 text-muted-foreground",children:["By continuing, you agree to our"," ",(0,r.jsx)(a.default,{href:"/terms",target:"_blank",className:"font-medium text-foreground underline underline-offset-2",children:"Terms of Use"})," ","and"," ",(0,r.jsx)(a.default,{href:"/privacy",target:"_blank",className:"font-medium text-foreground underline underline-offset-2",children:"Privacy Policy"}),"."]})]})]})}],617140)}]);

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.