PageSourceSearch

https://seeda.app/_next/static/chunks/81965-b82a1866521012f6.js

js seeda.app collected 2026-10-04 13:29:46 UTC 83,184 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[81965],{2244:(e,t,n)=>{n.d(t,{i:()=>a});let o=Symbol.for("better-auth:broadcast-channel");var r=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("undefined"!=typeof window)try{localStorage.setItem(this.name,JSON.stringify({...e,timestamp:Math.floor(Date.now()/1e3)}))}catch{}}setup(){if("undefined"==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 a(e="better-auth.message"){return globalThis[o]||(globalThis[o]=new r(e)),globalThis[o]}},15476:(e,t,n)=>{n.d(t,{ll:()=>u});var o=n(19858);(0,o.E)({FAILED_TO_CREATE_USER:"Failed to create user",USER_ALREADY_EXISTS:"User already exists.",USER_ALREADY_EXISTS_USE_ANOTHER_EMAIL:"User already exists. Use another email.",YOU_CANNOT_BAN_YOURSELF:"You cannot ban yourself",YOU_ARE_NOT_ALLOWED_TO_CHANGE_USERS_ROLE:"You are not allowed to change users role",YOU_ARE_NOT_ALLOWED_TO_CREATE_USERS:"You are not allowed to create users",YOU_ARE_NOT_ALLOWED_TO_LIST_USERS:"You are not allowed to list users",YOU_ARE_NOT_ALLOWED_TO_LIST_USERS_SESSIONS:"You are not allowed to list users sessions",YOU_ARE_NOT_ALLOWED_TO_BAN_USERS:"You are not allowed to ban users",YOU_ARE_NOT_ALLOWED_TO_IMPERSONATE_USERS:"You are not allowed to impersonate users",YOU_ARE_NOT_ALLOWED_TO_REVOKE_USERS_SESSIONS:"You are not allowed to revoke users sessions",YOU_ARE_NOT_ALLOWED_TO_DELETE_USERS:"You are not allowed to delete users",YOU_ARE_NOT_ALLOWED_TO_SET_USERS_PASSWORD:"You are not allowed to set users password",BANNED_USER:"You have been banned from this application",YOU_ARE_NOT_ALLOWED_TO_GET_USER:"You are not allowed to get user",NO_DATA_TO_UPDATE:"No data to update",YOU_ARE_NOT_ALLOWED_TO_UPDATE_USERS:"You are not allowed to update users",YOU_CANNOT_REMOVE_YOURSELF:"You cannot remove yourself",YOU_ARE_NOT_ALLOWED_TO_SET_NON_EXISTENT_VALUE:"You are not allowed to set a non-existent role value",YOU_CANNOT_IMPERSONATE_ADMINS:"You cannot impersonate admins",INVALID_ROLE_TYPE:"Invalid role type"});var r=n(78499);function a(e){return{newRole:e=>{var t;return{authorize(e,n="AND"){let o=!1;for(let[a,i]of Object.entries(e)){let e=t[a];if(!e)return{success:!1,error:`You are not allowed to access resource: ${a}`};if(Array.isArray(i))o=i.every(t=>e.includes(t));else if("object"==typeof i)o="OR"===i.connector?i.actions.some(t=>e.includes(t)):i.actions.every(t=>e.includes(t));else throw new r.$l("Invalid access control request");if(o&&"OR"===n)return{success:o};if(!o&&"AND"===n)return{success:!1,error:`unauthorized to access resource "${a}"`}}return o?{success:o}:{success:!1,error:"Not authorized"}},statements:t=e}},statements:e}}let i=a({user:["create","list","set-role","ban","impersonate","impersonate-admins","delete","set-password","get","update"],session:["list","revoke","delete"]});i.newRole({user:["create","list","set-role","ban","impersonate","delete","set-password","get","update"],session:["list","revoke","delete"]}),i.newRole({user:[],session:[]}),(0,o.E)({INVALID_EMAIL_FORMAT:"Email was not generated in a valid format",FAILED_TO_CREATE_USER:"Failed to create user",COULD_NOT_CREATE_SESSION:"Could not create session",ANONYMOUS_USERS_CANNOT_SIGN_IN_AGAIN_ANONYMOUSLY:"Anonymous users cannot sign in again anonymously",FAILED_TO_DELETE_ANONYMOUS_USER:"Failed to delete anonymous user",USER_IS_NOT_ANONYMOUS:"User is not anonymous",DELETE_ANONYMOUS_USER_DISABLED:"Deleting anonymous users is disabled"}),(0,o.E)({OTP_EXPIRED:"OTP expired",INVALID_OTP:"Invalid OTP",TOO_MANY_ATTEMPTS:"Too many attempts"}),(0,o.E)({INVALID_OAUTH_CONFIGURATION:"Invalid OAuth configuration",TOKEN_URL_NOT_FOUND:"Invalid OAuth configuration. Token URL not found.",PROVIDER_CONFIG_NOT_FOUND:"No config found for provider",PROVIDER_ID_REQUIRED:"Provider ID is required",INVALID_OAUTH_CONFIG:"Invalid OAuth configuration.",SESSION_REQUIRED:"Session is required",ISSUER_MISMATCH:"OAuth issuer mismatch. The authorization server issuer does not match the expected value (RFC 9207).",ISSUER_MISSING:"OAuth issuer parameter missing. The authorization server did not include the required iss parameter (RFC 9207)."}
1),(0,o.E)({INVALID_SESSION_TOKEN:"Invalid session token"});let s=!1,l={dismissed:["credential_returned","cancel_called"],skipped:["user_cancel","tap_outside"]},u=e=>({id:"one-tap",fetchPlugins:[{id:"fedcm-signout-handle",name:"FedCM Sign-Out Handler",hooks:{async onResponse(t){t.request.url.toString().includes("/sign-out")&&e.promptOptions?.fedCM!==!1&&"undefined"!=typeof window&&"IdentityCredential"in window&&navigator.credentials.preventSilentAccess()}}}],getActions:(t,n)=>({oneTap:async(n,o)=>{if(s)return void console.warn("A Google One Tap request is already in progress. Please wait.");if("undefined"==typeof window||!window.document)return void console.warn("Google One Tap is only available in browser environments");if(n?.button){await d();let a="string"==typeof n.button.container?document.querySelector(n.button.container):n.button.container;if(!a)return void console.error("Google One Tap: Button container not found",n.button.container);async function r(e){await t("/one-tap/callback",{method:"POST",body:{idToken:e},...n?.fetchOptions,...o}),(!n?.fetchOptions&&!o||n?.callbackURL)&&(window.location.href=n?.callbackURL??"/")}let{autoSelect:i,cancelOnTapOutside:s,context:l}=n??{},u=l??e.context??"signin";return window.google?.accounts.id.initialize({client_id:e.clientId,callback:async e=>{try{await r(e.credential)}catch(e){console.error("Error during button callback:",e)}},auto_select:i,cancel_on_tap_outside:s,context:u,ux_mode:n?.uxMode||"popup",nonce:n?.nonce,itp_support:!0,...e.additionalOptions}),void window.google?.accounts.id.renderButton(a,n.button.config??{type:"icon"})}async function a(e){await t("/one-tap/callback",{method:"POST",body:{idToken:e},...n?.fetchOptions,...o}),(!n?.fetchOptions&&!o||n?.callbackURL)&&(window.location.href=n?.callbackURL??"/")}let{autoSelect:i,cancelOnTapOutside:u,context:c}=n??{},f=c??e.context??"signin";s=!0;try{await d(),await new Promise((t,o)=>{let r=!1,s=e.promptOptions?.baseDelay??1e3,d=e.promptOptions?.maxAttempts??5;window.google?.accounts.id.initialize({client_id:e.clientId,callback:async e=>{r=!0;try{await a(e.credential),t()}catch(e){console.error("Error during One Tap callback:",e),o(e)}},auto_select:i,cancel_on_tap_outside:u,context:f,ux_mode:n?.uxMode||"popup",nonce:n?.nonce,itp_support:!0,...e.additionalOptions});let c=e=>{r||window.google?.accounts.id.prompt(o=>{if(!r)if(o.isDismissedMoment&&o.isDismissedMoment()){let r=o.getDismissedReason?.();if(l.dismissed.includes(r)){n?.onPromptNotification?.(o),t();return}if(e<d){let t=Math.pow(2,e)*s;setTimeout(()=>c(e+1),t)}else n?.onPromptNotification?.(o),t()}else if(o.isSkippedMoment&&o.isSkippedMoment()){let r=o.getSkippedReason?.();if(!r||l.skipped.includes(r)){n?.onPromptNotification?.(o),t();return}if(e<d){let t=Math.pow(2,e)*s;setTimeout(()=>c(e+1),t)}else n?.onPromptNotification?.(o),t()}else o.isNotDisplayed&&o.isNotDisplayed()&&(n?.onPromptNotification?.(o),t())})};c(0)})}catch(e){throw console.error("Error during Google One Tap flow:",e),e}finally{s=!1}}}),getAtoms:e=>({})}),d=()=>new Promise((e,t)=>{if(window.googleScriptInitialized)return void e();let n=document.createElement("script");n.src="https://accounts.google.com/gsi/client",n.async=!0,n.defer=!0,n.onload=()=>{window.googleScriptInitialized=!0,e()},n.onerror=()=>{t(Error("Failed to load Google Identity Services script"))},document.head.appendChild(n)});(0,o.E)({YOU_ARE_NOT_ALLOWED_TO_CREATE_A_NEW_ORGANIZATION:"You are not allowed to create a new organization",YOU_HAVE_REACHED_THE_MAXIMUM_NUMBER_OF_ORGANIZATIONS:"You have reached the maximum number of organizations",ORGANIZATION_ALREADY_EXISTS:"Organization already exists",ORGANIZATION_SLUG_ALREADY_TAKEN:"Organization slug already taken",ORGANIZATION_NOT_FOUND:"Organization not found",USER_IS_NOT_A_MEMBER_OF_THE_ORGANIZATION:"User is not a member of the organization",YOU_ARE_NOT_ALLOWED_TO_UPDATE_THIS_ORGANIZATION:"You are not allowed to update this organization",YOU_ARE_NOT_ALLOWED_TO_DELETE_THIS_ORGANIZATION:"You are not allowed to delete this organization",NO_ACTIVE_ORGANIZATION:"No active organization",USER_IS_ALREADY_A_MEMBER_OF_THIS_ORGANIZATION:"User is already a member of this organization",MEMBER_NOT_FOUND:"Member not found",ROLE_NOT_FOUND:"Role not found",YOU_ARE_NOT_ALLOWED_TO_CREATE_A_NEW_TEAM:"You are not allowed to create a new team",TEAM_ALREADY_EXISTS:"Team already exists",TEAM_NOT_FOUND:"Team not found",YOU_CANNOT_LEAVE_THE_ORGANIZATION_AS_THE_ONLY_OWNER:"You cannot leave the organization as the only owner",YOU_CANNOT_LEAVE_THE_ORGANIZATION_WITHOUT_AN_OWNER:"You cannot leave the organization without an owner",YOU_ARE_NOT_ALLOWED_TO_DELETE_THIS_MEMBER:"You are not allowed to delete this member",YOU_ARE_NOT_ALLOWED_TO_INVITE_USERS_TO_THIS_ORGANIZATION:"You are not allowed to invite users to this organization",USER_IS_ALREADY_INVITED_TO_THIS_ORGANIZATION:"User is already invited to this organization",INVITATION_NOT_FOUND:"Invitation not found",YOU_ARE_NOT_THE_RECIPIENT_OF_THE_INVITATION:"You are not the recipient of the invitation",EMAIL_VERIFICATION_REQUIRED_BEFORE_ACCEPTING_OR_REJECTING_INVITATION:"Email verification required before accepting or rejecting invitation",YOU_ARE_NOT_ALLOWED_TO_CANCEL_THIS_INVITATION:"You are not allowed to cancel this invitation",INVITER_IS_NO_LONGER_A_MEMBER_OF_THE_ORGANIZATION:"Inviter is no longer a member of the organization",YOU_ARE_NOT_ALLOWED_TO_INVITE_USER_WITH_THIS_ROLE:"You are not allowed to invite a user with this role",FAILED_TO_RETRIEVE_INVITATION:"Failed to retrieve invitation",YOU_HAVE_REACHED_THE_MAXIMUM_NUMBER_OF_TEAMS:"You have reached the maximum number of teams",UNABLE_TO_REMOVE_LAST_TEAM:"Unable to remove last team",YOU_ARE_NOT_ALLOWED_TO_UPDATE_THIS_MEMBER:"You are not allowed to update this member",ORGANIZATION_MEMBERSHIP_LIMIT_REACHED:"Organization membership limit reached",YOU_ARE_NOT_ALLOWED_TO_CREATE_TEAMS_IN_THIS_ORGANIZATION:"You are not allowed to create teams in this organization",YOU_ARE_NOT_ALLOWED_TO_DELETE_TEAMS_IN_THIS_ORGANIZATION:"You are not allowed to delete teams in this organization",YOU_ARE_NOT_ALLOWED_TO_UPDATE_THIS_TEAM:"You are not allowed to update this team",YOU_ARE_NOT_ALLOWED_TO_DELETE_THIS_TEAM:"You are not allowed to delete this team",INVITATION_LIMIT_REACHED:"Invitation limit reached",TEAM_MEMBER_LIMIT_REACHED:"Team member limit reached",USER_IS_NOT_A_MEMBER_OF_THE_TEAM:"User is not a member of the team",YOU_CAN_NOT_ACCESS_THE_MEMBERS_OF_THIS_TEAM:"You are not allowed to list the members of this team",YOU_DO_NOT_HAVE_AN_ACTIVE_TEAM:"You do not have an active team",YOU_ARE_NOT_ALLOWED_TO_CREATE_A_NEW_TEAM_MEMBER:"You are not allowed to create a new member",YOU_ARE_NOT_ALLOWED_TO_REMOVE_A_TEAM_MEMBER:"You are not allowed to remove a team member",YOU_ARE_NOT_ALLOWED_TO_ACCESS_THIS_ORGANIZATION:"You are not allowed to access this organization as an owner",YOU_ARE_NOT_A_MEMBER_OF_THIS_ORGANIZATION:"You are not a member of this organization",MISSING_AC_INSTANCE:"Dynamic Access Control requires a pre-defined ac instance on the server auth plugin. Read server logs for more information",YOU_MUST_BE_IN_AN_ORGANIZATION_TO_CREATE_A_ROLE:"You must be in an organization to create a role",YOU_ARE_NOT_ALLOWED_TO_CREATE_A_ROLE:"You are not allowed to create a role",YOU_ARE_NOT_ALLOWED_TO_UPDATE_A_ROLE:"You are not allowed to update a role",YOU_ARE_NOT_ALLOWED_TO_DELETE_A_ROLE:"You are not allowed to delete a role",YOU_ARE_NOT_ALLOWED_TO_READ_A_ROLE:"You are not allowed to read a role",YOU_ARE_NOT_ALLOWED_TO_LIST_A_ROLE:"You are not allowed to list a role",YOU_ARE_NOT_ALLOWED_TO_GET_A_ROLE:"You are not allowed to get a role",TOO_MANY_ROLES:"This organization has too many roles",INVALID_RESOURCE:"The provided permission includes an invali
1d resource",ROLE_NAME_IS_ALREADY_TAKEN:"That role name is already taken",CANNOT_DELETE_A_PRE_DEFINED_ROLE:"Cannot delete a pre-defined role",ROLE_IS_ASSIGNED_TO_MEMBERS:"Cannot delete a role that is assigned to members. Please reassign the members to a different role first"}),n(2244),n(84881),n(53896),n(95382),n(45153),n(80510);let c=a({organization:["update","delete"],member:["create","update","delete"],invitation:["create","cancel"],team:["create","update","delete"],ac:["create","read","update","delete"]});c.newRole({organization:["update"],invitation:["create","cancel"],member:["create","update","delete"],team:["create","update","delete"],ac:["create","read","update","delete"]}),c.newRole({organization:["update","delete"],member:["create","update","delete"],invitation:["create","cancel"],team:["create","update","delete"],ac:["create","read","update","delete"]}),c.newRole({organization:[],member:[],invitation:[],team:[],ac:["read"]}),(0,o.E)({INVALID_PHONE_NUMBER:"Invalid phone number",PHONE_NUMBER_EXIST:"Phone number already exists",PHONE_NUMBER_NOT_EXIST:"phone number isn't registered",INVALID_PHONE_NUMBER_OR_PASSWORD:"Invalid phone number or password",UNEXPECTED_ERROR:"Unexpected error",OTP_NOT_FOUND:"OTP not found",OTP_EXPIRED:"OTP expired",INVALID_OTP:"Invalid OTP",PHONE_NUMBER_NOT_VERIFIED:"Phone number not verified",PHONE_NUMBER_CANNOT_BE_UPDATED:"Phone number cannot be updated",SEND_OTP_NOT_IMPLEMENTED:"sendOTP not implemented",TOO_MANY_ATTEMPTS:"Too many attempts"}),(0,o.E)({OTP_NOT_ENABLED:"OTP not enabled",OTP_HAS_EXPIRED:"OTP has expired",TOTP_NOT_ENABLED:"TOTP not enabled",TWO_FACTOR_NOT_ENABLED:"Two factor isn't enabled",BACKUP_CODES_NOT_ENABLED:"Backup codes aren't enabled",INVALID_BACKUP_CODE:"Invalid backup code",INVALID_CODE:"Invalid code",TOO_MANY_ATTEMPTS_REQUEST_NEW_CODE:"Too many attempts. Please request a new code.",INVALID_TWO_FACTOR_COOKIE:"Invalid two factor cookie"}),(0,o.E)({INVALID_USERNAME_OR_PASSWORD:"Invalid username or password",EMAIL_NOT_VERIFIED:"Email not verified",UNEXPECTED_ERROR:"Unexpected error",USERNAME_IS_ALREADY_TAKEN:"Username is already taken. Please try another.",USERNAME_TOO_SHORT:"Username is too short",USERNAME_TOO_LONG:"Username is too long",INVALID_USERNAME:"Username is invalid",INVALID_DISPLAY_USERNAME:"Display username is invalid"})},19858:(e,t,n)=>{n.d(t,{E:()=>o});function o(e){return Object.fromEntries(Object.entries(e).map(([e,t])=>[e,{code:e,message:t,toString:()=>e}]))}},45153:(e,t,n)=>{n.d(t,{X:()=>s});var o=n(2244),r=n(84881),a=n(53896);let i=()=>Math.floor(Date.now()/1e3);function s(e){let{sessionAtom:t,sessionSignal:n,$fetch:s,options:l={}}=e,u=l.sessionOptions?.refetchInterval??0,d=l.sessionOptions?.refetchOnWindowFocus??!0,c=l.sessionOptions?.refetchWhenOffline??!1,f={lastSync:0,lastSessionRequest:0,cachedSession:void 0},p=e=>{if(!(c||(0,a.Y)().isOnline))return;if(e?.event==="storage"){f.lastSync=i(),n.set(!n.get());return}let o=t.get(),r=()=>{f.lastSessionRequest=i(),s("/get-session").then(async e=>{let r=e.data,a=e.error||null;if(r?.needsRefresh)try{let e=await s("/get-session",{method:"POST"});r=e.data,a=e.error||null}catch{}let l=r?.session&&r?.user?r:null;t.set({...o,data:l,error:a}),f.lastSync=i(),n.set(!n.get())}).catch(()=>{})};if(e?.event==="poll")return void r();if(e?.event==="visibilitychange"){if(i()-f.lastSessionRequest<5)return;f.lastSessionRequest=i()}if(e?.event==="visibilitychange")return void r();(o?.data===null||o?.data===void 0)&&(f.lastSync=i(),n.set(!n.get()))};return{init:()=>{u&&u>0&&(f.pollInterval=setInterval(()=>{t.get()?.data&&p({event:"poll"})},1e3*u)),f.unsubscribeBroadcast=(0,o.i)().subscribe(()=>{p({event:"storage"})}),d&&(f.unsubscribeFocus=(0,r.x)().subscribe(()=>{p({event:"visibilitychange"})})),f.unsubscribeOnline=(0,a.Y)().subscribe(e=>{e&&p({event:"visibilitychange"})}),(0,o.i)().setup(),(0,r.x)().setup(),(0,a.Y)().setup()},cleanup:()=>{f.pollInterval&&(clearInterval(f.pollInterval),f.pollInterval=void 0),f.unsubscribeBroadcast&&(f.unsubscribeBroadcast(),f.unsubscribeBroadcast=void 0),f.unsubscribeFocus&&(f.unsubscribeFocus(),f.unsubscribeFocus=void 0),f.unsubscribeOnline&&(f.unsubscribeOnline(),f.unsubscribeOnline=void 0),f.lastSync=0,f.lastSessionRequest=0,f.cac
1hedSession=void 0},triggerRefetch:p,broadcastSessionUpdate:e=>{(0,o.i)().post({event:"session",data:{trigger:e},clientId:Math.random().toString(36).substring(7)})}}}},53896:(e,t,n)=>{n.d(t,{Y:()=>a});let o=Symbol.for("better-auth:online-manager");var r=class{listeners=new Set;isOnline="undefined"==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("undefined"==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 a(){return globalThis[o]||(globalThis[o]=new r),globalThis[o]}},68684:(e,t,n)=>{n.d(t,{M:()=>a});var o=n(80510),r=n(20792);function a(e){var t;let{pluginPathMethods:n,pluginsActions:a,pluginsAtoms:i,$fetch:s,$store:l,atomListeners:u}=(0,o.i)(e),d={};for(let[e,t]of Object.entries(i))d[function(e){return`use${e.charAt(0).toUpperCase()+e.slice(1)}`}(e)]=()=>(function(e,t={}){let n=(0,r.useRef)(e.get()),{keys:o,deps:a=[e,o]}=t,i=(0,r.useCallback)(t=>{let r=e=>{n.current!==e&&(n.current=e,t())};if(r(e.value),o?.length){let t;return t=new Set(o).add(void 0),e.listen((e,n,o)=>{t.has(o)&&r(e,n,o)})}return e.listen(r)},a),s=()=>n.current;return(0,r.useSyncExternalStore)(i,s,s)})(t);return t={...a,...d,$fetch:s,$store:l},function e(o=[]){return new Proxy(function(){},{get(n,r){var a;if("string"!=typeof r||"then"===r||"catch"===r||"finally"===r)return;let i=[...o,r],s=t;for(let e of i)if(s&&"object"==typeof s&&e in s)s=s[e];else{s=void 0;break}return"function"==typeof s?s:"object"==typeof(a=s)&&null!==a&&"get"in a&&"function"==typeof a.get&&"lc"in a&&"number"==typeof a.lc?s:e(i)},apply:async(e,t,r)=>{let a="/"+o.map(e=>e.replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`)).join("/"),l=r[0]||{},d=r[1]||{},{query:c,fetchOptions:f,...p}=l,_={...d,...f},E=function(e,t,n){let o=t[e],{fetchOptions:r,query:a,...i}=n||{};return o||(r?.method?r.method:i&&Object.keys(i).length>0?"POST":"GET")}(a,n,l);return await s(a,{..._,body:"GET"===E?void 0:{...p,..._?.body||{}},query:c||_?.query,method:E,async onSuccess(e){if(await _?.onSuccess?.(e),!u||_.disableSignal)return;let t=u.filter(e=>e.matcher(a));if(!t.length)return;let n=new Set;for(let e of t){let t=i[e.signal];if(!t)return;if(n.has(e.signal))continue;n.add(e.signal);let o=t.get();setTimeout(()=>{t.set(!o)},10),e.callback?.(a)}}})}})}()}},78499:(e,t,n)=>{n.d(t,{$l:()=>a}),(0,n(19858).E)({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",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 o={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 r=class extends Error{constructor(e="INTERNAL_SERVER_ERROR",t,n={},r="number"==typeof e?e:o[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"),function(e,t){class n extends e{#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}()){let t=Error.stackTraceLimit;Error.stackTraceLimit=0,super(...e),Error.stackTraceLimit=t}else super(...e);let 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}}Object.defineProperty(n.prototype,"constructor",{get:()=>t,enumerable:!1,configurable:!0})}(r,Error);var a=class extends Error{constructor(e,t){super(e,t),this.name="BetterAuthError",this.message=e,this.stack=""}}},80510:(e,t,n)=>{n.d(t,{i:()=>Q});var o=n(55036);let r=Object.create(null),a=e=>globalThis.process?.env||globalThis.Deno?.env.toObject()||globalThis.__env__||(e?r:globalThis),i=new Proxy(r,{get:(e,t)=>a()[t]??r[t],has:(e,t)=>t in a()||t in r,set:(e,t,n)=>(a(!0)[t]=n,!0),deleteProperty(e,t){if(!t)return!1;let n=a(!0);return delete n[t],!0},ownKeys:()=>Object.keys(a(!0))});function s(e,t){return void 0!==o&&o.env?o.env[e]??t:"undefined"!=typeof Deno?Deno.env.get(e)??t:"undefined"!=typeof Bun?Bun.env[e]??t:t}void 0!==o&&o.env,Object.freeze({get BETTER_AUTH_SECRET(){return s("BETTER_AUTH_SECRET")},get AUTH_SECRET(){return s("AUTH_SECRET")},get BETTER_AUTH_TELEMETRY(){return s("BETTER_AUTH_TELEMETRY")},get BETTER_AUTH_TELEMETRY_ID(){return s("BETTER_AUTH_TELEMETRY_ID")},get NODE_ENV(){return s("NODE_ENV","development")},get PACKAGE_VERSION(){return s("PACKAGE_VERSION","0.0.0")},get BETTER_AUTH_TELEMETRY_ENDPOINT(){return s("BETTER_AUTH_TELEMETRY_ENDPOINT","")}});let l={eterm:4,cons25:4,console:4,cygwin:4,dtterm:4,gnome:4,hurd:4,jfbterm:4,konsole:4,kterm:4,mlterm:4,mosh:24,putty:4,st:4,"rxvt-unicode-24bit":24,terminator:24,"xterm-kitty":24},u=new Map(Object.entries({APPVEYOR:8,BUILDKITE:8,CIRCLECI:24,DRONE:8,GITEA_ACTIONS:24,GITHUB_ACTIONS:24,GITLAB_CI:8,TRAVIS:8})),d=[/ansi/,/color/,/linux/,/direct/,/^con[0-9]*x[0-9]/,/^rxvt/,/^screen/,/^xterm/,/^vt100/,/^vt220/],c={reset:"\x1b[0m",bright:"\x1b[1m",dim:"\x1b[2m",fg:{black:"\x1b[30m",red:"\x1b[31m",green:"\x1b[32m",
1yellow:"\x1b[33m",blue:"\x1b[34m",magenta:"\x1b[35m",cyan:"\x1b[36m",white:"\x1b[37m"}},f=["debug","info","success","warn","error"],p={info:c.fg.blue,success:c.fg.green,warn:c.fg.yellow,error:c.fg.red,debug:c.fg.magenta};(e=>{let t=e?.disabled!==!0,n=e?.level??"warn",o=e?.disableColors!==void 0?!e.disableColors:1!==function(){if(void 0!==s("FORCE_COLOR"))switch(s("FORCE_COLOR")){case"":case"1":case"true":return 4;case"2":return 8;case"3":return 24;default:return 1}if(void 0!==s("NODE_DISABLE_COLORS")&&""!==s("NODE_DISABLE_COLORS")||void 0!==s("NO_COLOR")&&""!==s("NO_COLOR")||"dumb"===s("TERM"))return 1;if(s("TMUX"))return 24;if("TF_BUILD"in i&&"AGENT_NAME"in i)return 4;if("CI"in i){for(let{0:e,1:t}of u)if(e in i)return t;return"codeship"===s("CI_NAME")?8:1}if("TEAMCITY_VERSION"in i)return null!==/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.exec(s("TEAMCITY_VERSION"))?4:1;switch(s("TERM_PROGRAM")){case"iTerm.app":if(!s("TERM_PROGRAM_VERSION")||null!==/^[0-2]\./.exec(s("TERM_PROGRAM_VERSION")))return 8;return 24;case"HyperTerm":case"MacTerm":return 24;case"Apple_Terminal":return 8}if("truecolor"===s("COLORTERM")||"24bit"===s("COLORTERM"))return 24;if(s("TERM")){if(null!==/truecolor/.exec(s("TERM")))return 24;if(null!==/^xterm-256/.exec(s("TERM")))return 8;let e=s("TERM").toLowerCase();if(l[e])return l[e];if(d.some(t=>null!==t.exec(e)))return 4}return s("COLORTERM")?4:1}();return{...Object.fromEntries(f.map(r=>[r,(...[a,...i])=>((r,a,i=[])=>{if(!t||!(f.indexOf(r)>=f.indexOf(n)))return;let s=((e,t,n)=>{let o=new Date().toISOString();return n?`${c.dim}${o}${c.reset} ${p[e]}${e.toUpperCase()}${c.reset} ${c.bright}[Better Auth]:${c.reset} ${t}`:`${o} ${e.toUpperCase()} [Better Auth]: ${t}`})(r,a,o);if(!e||"function"!=typeof e.log)return void("error"===r?console.error(s,...i):"warn"===r?console.warn(s,...i):console.log(s,...i));e.log("success"===r?"info":r,a,...i)})(r,a,i)])),get level(){return n}}})();var _=n(78499);function E(e,t="/api/auth"){try{let t=new URL(e);if("http:"!==t.protocol&&"https:"!==t.protocol)throw new _.$l(`Invalid base URL: ${e}. URL must include 'http://' or 'https://'`)}catch(t){if(t instanceof _.$l)throw t;throw new _.$l(`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 _.$l(`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}var m=n(95382);let h={id:"redirect",name:"Redirect",hooks:{onSuccess(e){if(e.data?.url&&e.data?.redirect&&"undefined"!=typeof window&&window.location&&window.location)try{window.location.href=e.data.url}catch{}}}},g=[],O=0,v=0,T=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=O+4;t<g.length;)g[t]===e?g.splice(t,4):t+=4;let o=t.indexOf(e);~o&&(t.splice(o,1),--n.lc||n.off())}),notify(e,o){v++;let r=!g.length;for(let r of t)g.push(r,n.value,e,o);if(r){for(O=0;O<g.length;O+=4)g[O](g[O+1],g[O+2],g[O+3]);g.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},b=(e,t)=>((e,t,n,o)=>(e.events=e.events||{},e.events[n+10]||(e.events[n+10]=o(t=>{e.events[n].reduceRight((e,t)=>(t(e),e),{shared:{},...t})})),e.events[n]=e.events[n]||[],e.events[n].push(t),()=>{let o=e.events[n],r=o.indexOf(t);o.splice(r,1),o.length||(delete e.events[n],e.events[n+10](),delete e.events[n+10])}))(e,n=>{let o=t(n);o&&e.events[6].push(o)},5,t=>{let n=e.listen;e.listen=(...o)=>(e.lc||e.active||(e.active=!0,t()),n(...o));let o=e.off;return e.events[6]=[],e.off=()=>{o(),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=o}}),y=()=>"undefined"==typeof window;var A=n(45153);function R(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 N(e){return(...t)=>t.reduce((t,n)=>(function e(t,n,o=".",r){if(!R(n))return e(t,{},o,r);let a=Object.assign({},n);for(let n in t){if("__proto__"===n||"constructor"===n)continue;let i=t[n];null!=i&&(r&&r(a,n,i,o)||(Array.isArray(i)&&Array.isArray(a[n])?a[n]=[...i,...a[n]]:R(i)&&R(a[n])?a[n]=e(i,a[n],(o?`${o}.`:"")+n.toString(),r):a[n]=i))}return a})(t,n,"",e),{})}let w=N();N((e,t,n)=>{if(void 0!==e[t]&&"function"==typeof n)return e[t]=n(e[t]),!0}),N((e,t,n)=>{if(Array.isArray(e[t])&&"function"==typeof n)return e[t]=n(e[t]),!0});var I=Object.defineProperty,S=Object.defineProperties,L=Object.getOwnPropertyDescriptors,U=Object.getOwnPropertySymbols,D=Object.prototype.hasOwnProperty,x=Object.prototype.propertyIsEnumerable,C=(e,t,n)=>t in e?I(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,M=(e,t)=>{for(var n in t||(t={}
1))D.call(t,n)&&C(e,n,t[n]);if(U)for(var n of U(t))x.call(t,n)&&C(e,n,t[n]);return e},P=(e,t)=>S(e,L(t)),Y=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)}},k=async(e,t)=>{var n,o,r,a,i,s;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 d of(null==t?void 0:t.plugins)||[]){if(d.init){let o=await (null==(n=d.init)?void 0:n.call(d,e.toString(),t));l=o.options||l,e=o.url}u.onRequest.push(null==(o=d.hooks)?void 0:o.onRequest),u.onResponse.push(null==(r=d.hooks)?void 0:r.onResponse),u.onSuccess.push(null==(a=d.hooks)?void 0:a.onSuccess),u.onError.push(null==(i=d.hooks)?void 0:i.onError),u.onRetry.push(null==(s=d.hooks)?void 0:s.onRetry)}return{url:e,options:l,hooks:u}},B=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}},F=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)}},H=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 o=await n(e.auth.token);if(!o)return t;t.authorization=`Bearer ${o}`}else if("Basic"===e.auth.type){let[o,r]=await Promise.all([n(e.auth.username),n(e.auth.password)]);if(!o||!r)return t;t.authorization=`Basic ${btoa(`${o}:${r}`)}`}else if("Custom"===e.auth.type){let[o,r]=await Promise.all([n(e.auth.prefix),n(e.auth.value)]);if(!r)return t;t.authorization=`${null!=o?o:""} ${r}`}}return t},V=/^application\/(?:[\w!#$%&*.^`~-]*\+)?json(;.+)?$/i;function j(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 W(e){try{return JSON.parse(e)}catch(t){return e}}function G(e){return"function"==typeof e}async function z(e){let t=new Headers(null==e?void 0:e.headers);for(let[n,o]of Object.entries(await H(e)||{}))t.set(n,o);if(!t.has("content-type")){let n=j(null==e?void 0:e.body)?"application/json":null;n&&t.set("content-type",n)}return t}var $=class e extends Error{constructor(t,n){super(n||JSON.stringify(t,null,2)),this.issues=t,Object.setPrototypeOf(this,e.prototype)}};async function q(e,t){let n=await e["~standard"].validate(t);if(n.issues)throw new $(n.issues);return n.value}var X=["get","post","put","patch","delete"],K=async(e,t)=>{var n,o,r,a,i,s,l,u;let{hooks:d,url:c,options:f}=await k(e,t),p=function(e){if(null==e?void 0:e.customFetchImpl)return e.customFetchImpl;if("undefined"!=typeof globalThis&&G(globalThis.fetch))return globalThis.fetch;if("undefined"!=typeof window&&G(window.fetch))return window.fetch;throw Error("No fetch implementation found")}(f),_=new AbortController,E=null!=(n=f.signal)?n:_.signal,m=function(e,t){let{baseURL:n,params:o,query:r}=t||{query:{},params:{},baseURL:""},a=e.startsWith("http")?e.split("/").slice(0,3).join("/"):n||"";if(e.startsWith("@")){let t=e.toString().split("@")[1].split("/")[0];X.includes(t)&&(e=e.replace(`@${t}/`,"/"))}a.endsWith("/")||(a+="/");let[i,s]=e.replace(a,"").split("?"),l=new URLSearchParams(s);for(let[e,t]of Object.entries(r||{})){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(o)if(Array.isArray(o))for(let[e,t]of i.split("/").filter(e=>e.startsWith(":")).entries()){let n=o[e];i=i.replace(t,n)}else for(let[e,t]of Object.entries(o))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"):"",a.startsWith("http"))?new URL(`${i}${u}`,a):`${a}${i}${u}`}(c,f),h=function(e){if(!(null==e?void 0:e.body))return null;let t=new Headers(null==e?void 0:e.headers);if(j(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")&&j(e.body)?new URLSearchParams(e.body).toString():e.body}(f),g=await z(f),O=function(e,t){var n;if(null==t?void 0:t.method)return t.method.toUpperCase();if(e.startsWith("@")){let o=null==(n=e.split("@")[1])?void 0:n.split("/")[0];return X.includes(o)?o.toUpperCase():(null==t?void 0:t.body)?"POST":"GET"}return(null==t?void 0:t.body)?"POST":"GET"}(c,f),v=P(M({},f),{url:m,headers:g,body:h,method:O,signal:E});for(let e of d.onRequest)if(e){let t=await e(v);"object"==typeof t&&null!==t&&(v=t)}("pipeTo"in v&&"function"==typeof v.pipeTo||"function"==typeof(null==(o=null==t?void 0:t.body)?void 0:o.pipe))&&!("duplex"in v)&&(v.duplex="half");let{clearTimeout:T}=function(e,t){let n;return!(null==e?void 0:e.signal)&&(null==e?void 0:e.timeout)&&(n=setTimeout(()=>null==t?void 0:t.abort(),null==e?void 0:e.timeout)),{abortTimeout:n,clearTimeout:()=>{n&&clearTimeout(n)}}}(f,_),b=await p(v.url,v);T();let y={response:b,request:v};for(let e of d.onResponse)if(e){let n=await e(P(M({},y),{response:(null==(r=null==t?void 0:t.hookOptions)?void 0:r.cloneResponse)?b.clone():b}));n instanceof Response?b=n:"object"==typeof n&&null!==n&&(b=n.response)}if(b.ok){if("HEAD"===v.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 o=t.split(";").shift()||"";return V.test(o)?"json":n.has(o)||o.startsWith("text/")?"text":"blob"}(b),n={data:null,response:b,request:v};if("json"===e||"text"===e){let e=await b.text(),t=null!=(a=v.jsonParser)?a:W;n.data=await t(e)}else n.data=await b[e]();for(let e of((null==v?void 0:v.output)&&v.output&&!v.disableValidation&&(n.data=await q(v.output,n.data)),d.onSuccess))e&&await e(P(M({},n),{response:(null==(i=null==t?void 0:t.hookOptions)?void 0:i.cloneResponse)?b.clone():b}));return(null==t?void 0:t.throw)?n.data:{data:n.data,error:null}}let A=null!=(s=null==t?void 0:t.jsonParser)?s:W,R=await b.text(),N=function(e){try{return JSON.parse(e),!0}catch(e){return!1}}(R),w=N?await A(R):null,I={response:b,responseText:R,request:v,error:P(M({},w),{status:b.status,statusText:b.statusText})};for(let e of d.onError)e&&await e(P(M({},I),{response:(null==(l=null==t?void 0:t.hookOptions)?void 0:l.cloneResponse)?b.clone():b}));if(null==t?void 0:t.retry){let n=function(e){if("number"==typeof e)return new B({type:"linear",attempts:e,delay:1e3});switch(e.type){case"linear":return new B(e);case"exponential":return new F(e);default:throw Error("Invalid retry strategy")}}(t.retry),o=null!=(u=t.retryAttempt)?u:0;
1if(await n.shouldAttemptRetry(o,b)){for(let e of d.onRetry)e&&await e(y);let r=n.getDelay(o);return await new Promise(e=>setTimeout(e,r)),await K(e,P(M({},t),{retryAttempt:o+1}))}}if(null==t?void 0:t.throw)throw new Y(b.status,b.statusText,N?w:R);return{data:null,error:P(M({},w),{status:b.status,statusText:b.statusText})}},Z=n(55036);let Q=(e,t)=>{let n="credentials"in Request.prototype,o=function(e,t,n,o,r){if(e)return E(e,t);if(!1!==o){let e=i.BETTER_AUTH_URL||i.NEXT_PUBLIC_BETTER_AUTH_URL||i.PUBLIC_BETTER_AUTH_URL||i.NUXT_PUBLIC_BETTER_AUTH_URL||i.NUXT_PUBLIC_AUTH_URL||("/"!==i.BASE_URL?i.BASE_URL:void 0);if(e)return E(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 _.$l("Could not get origin from request. Please provide a valid base URL.");return E(e,t)}if("undefined"!=typeof window&&window.location)return E(window.location.origin,t)}(e?.baseURL,e?.basePath,void 0,t)??(e=>{if(void 0!==Z){if(Z.env.NEXT_PUBLIC_AUTH_URL)return Z.env.NEXT_PUBLIC_AUTH_URL;if("undefined"==typeof window){if(Z.env.NEXTAUTH_URL)try{return Z.env.NEXTAUTH_URL}catch{}if(Z.env.VERCEL_URL)try{let t=Z.env.VERCEL_URL.startsWith("http")?"":"https://";return`${new URL(`${t}${Z.env.VERCEL_URL}`).origin}${e??"/api/auth"}`}catch{}}}})(e?.basePath)??"/api/auth",r=e?.plugins?.flatMap(e=>e.fetchPlugins).filter(e=>void 0!==e)||[],a={id:"lifecycle-hooks",name:"lifecycle-hooks",hooks:{onSuccess:e?.fetchOptions?.onSuccess,onError:e?.fetchOptions?.onError,onRequest:e?.fetchOptions?.onRequest,onResponse:e?.fetchOptions?.onResponse}},{onSuccess:s,onError:l,onRequest:u,onResponse:d,...c}=e?.fetchOptions||{},f=(e=>async function(t,n){let o,r=P(M(M({},e),n),{plugins:[...(null==e?void 0:e.plugins)||[],(o=e||{},{id:"apply-schema",name:"Apply Schema",version:"1.0.0",async init(e,t){var n,r,a,i;let s=(null==(r=null==(n=o.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:r.schema)||o.schema;if(s){let n=e;(null==(a=s.config)?void 0:a.prefix)&&n.startsWith(s.config.prefix)&&(n=n.replace(s.config.prefix,""),s.config.baseURL&&(e=e.replace(s.config.prefix,s.config.baseURL))),(null==(i=s.config)?void 0:i.baseURL)&&n.startsWith(s.config.baseURL)&&(n=n.replace(s.config.baseURL,""));let o=s.schema[n];if(o){let n=P(M({},t),{method:o.method,output:o.output});return(null==t?void 0:t.disableValidation)||(n=P(M({},n),{body:o.input?await q(o.input,null==t?void 0:t.body):null==t?void 0:t.body,params:o.params?await q(o.params,null==t?void 0:t.params):null==t?void 0:t.params,query:o.query?await q(o.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==e?void 0:e.catchAllError)try{return await K(t,r)}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 K(t,r)})({baseURL:o,...n?{credentials:"include"}:{},method:"GET",jsonParser:e=>e?(0,m.O)(e,{strict:!1}):null,customFetchImpl:fetch,...c,plugins:[a,...c.plugins||[],...e?.disableDefaultFetchPlugins?[]:[h],...r]}),{$sessionSignal:p,session:g,broadcastSessionUpdate:O}=function(e,t){let n=T(!1),o=((e,t,n,o)=>{let r=T({data:null,error:null,isPending:!0,isRefetching:!1,refetch:e=>a(e)}),a=async e=>new Promise(a=>{let i="function"==typeof o?o({data:r.get().data,error:r.get().error,isPending:r.get().isPending}):o;n(t,{...i,query:{...i?.query,...e?.query},async onSuccess(e){r.set({data:e.data,error:null,isPending:!1,isRefetching:!1,refetch:r.value.refetch}),await i?.onSuccess?.(e)},async onError(e){let{request:t}=e,n="number"==typeof t.retry?t.retry:t.retry?.attempts,o=t.retryAttempt||0;if(n&&o<n)return;let a=401===e.error.status;r.set({error:e.error,data:a?null:r.get().data,isPending:!1,isRefetching:!1,refetch:r.value.refetch}),await i?.onError?.(e)},async onRequest(e){let t=r.get();r.set({isPending:null===t.data,data:t.data,error:null,isRefetching:!0,refetch:r.value.refetch}),await i?.onRequest?.(e)}}).catch(e=>{r.set({error:e,data:r.get().data,isPending:!1,isRefetching:!1,refetch:r.value.refetch})}).finally(()=>{a(void 0)})});e=Array.isArray(e)?e:[e];let i=!1;for(let t of e)t.subscribe(async()=>{y()||(i?await a():b(r,()=>{let e=setTimeout(async()=>{i||(await a(),i=!0)},0);return()=>{r.off(),t.off(),clearTimeout(e)}}))});return r})(n,"/get-session",e,{method:"GET"}),r=()=>{};return b(o,()=>{let a=(0,A.X)({sessionAtom:o,sessionSignal:n,$fetch:e,options:t});return a.init(),r=a.broadcastSessionUpdate,()=>{a.cleanup()}}),{session:o,$sessionSignal:n,broadcastSessionUpdate:e=>r(e)}}(f,e),v=e?.plugins||[],R={},N={$sessionSignal:p,session:g}
1,I={"/sign-out":"POST","/revoke-sessions":"POST","/revoke-other-sessions":"POST","/delete-user":"POST"},S=[{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||"/change-email"===e,callback(e){"/sign-out"===e?O("signout"):("/update-user"===e||"/update-session"===e)&&O("updateUser")}}];for(let e of v)e.getAtoms&&Object.assign(N,e.getAtoms?.(f)),e.pathMethods&&Object.assign(I,e.pathMethods),e.atomListeners&&S.push(...e.atomListeners);let L={notify:e=>{N[e].set(!N[e].get())},listen:(e,t)=>{N[e].subscribe(t)},atoms:N};for(let t of v)t.getActions&&(R=w(t.getActions?.(f,L,e)??{},R));return{get baseURL(){return o},pluginsActions:R,pluginsAtoms:N,pluginPathMethods:I,atomListeners:S,$fetch:f,$store:L}}},84881:(e,t,n)=>{n.d(t,{x:()=>a});let o=Symbol.for("better-auth:focus-manager");var r=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("undefined"==typeof window||"undefined"==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 a(){return globalThis[o]||(globalThis[o]=new r),globalThis[o]}},95382:(e,t,n)=>{n.d(t,{O:()=>s});let o={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*:/},r=/^\s*["[{]|^\s*-?\d{1,16}(\.\d{1,17})?([Ee][+-]?\d+)?\s*$/,a={true:!0,false:!1,null:null,undefined:void 0,nan:NaN,infinity:1/0,"-infinity":-1/0},i=/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2})(?:\.(\d{1,7}))?(?:Z|([+-])(\d{2}):(\d{2}))$/;function s(e,t={strict:!0}){return function(e,t={}){let{strict:n=!1,warnings:s=!1,reviver:l,parseDates:u=!0}=t;if("string"!=typeof e)return e;let d=e.trim();if(d.length>0&&'"'===d[0]&&d.endsWith('"')&&!d.slice(1,-1).includes('"'))return d.slice(1,-1);let c=d.toLowerCase();if(c.length<=9&&c in a)return a[c];if(!r.test(d)){if(n)throw SyntaxError("[better-json] Invalid JSON");return e}if(Object.entries(o).some(([e,t])=>{let n=t.test(d);return n&&s&&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(d,(e,t)=>{if("__proto__"===e||"constructor"===e&&t&&"object"==typeof t&&"prototype"in t){s&&console.warn(`[better-json] Dropping "${e}" key to prevent prototype pollution`);return}if(u&&"string"==typeof t){let e=function(e){let t=i.exec(e);if(!t)return null;let[,n,o,r,a,s,l,u,d,c,f]=t,p=new Date(Date.UTC(parseInt(n,10),parseInt(o,10)-1,parseInt(r,10),parseInt(a,10),parseInt(s,10),parseInt(l,10),u?parseInt(u.padEnd(3,"0"),10):0));if(d){let e=(60*parseInt(c,10)+parseInt(f,10))*("+"===d?-1:1);p.setUTCMinutes(p.getUTCMinutes()+e)}
1return p instanceof Date&&!isNaN(p.getTime())?p:null}(t);if(e)return e}return l?l(e,t):t})}catch(t){if(n)throw t;return e}}(e,t)}},95973:(e,t,n)=>{n.d(t,{l$:()=>D,oR:()=>w});var o=n(76471),r=n(98111),a=n(87639),i=n(32812),s=n(20857),l=n(7907),u=n(57505),d=n(17727),c=n(49835),f=n(3395),p=n(20792),_=n(90745),E=function(e){switch(e){case"success":return g;case"info":return v;case"warning":return O;case"error":return T;default:return null}},m=Array(12).fill(0),h=function(e){var t=e.visible,n=e.className;return p.createElement("div",{className:["sonner-loading-wrapper",n].filter(Boolean).join(" "),"data-visible":t},p.createElement("div",{className:"sonner-spinner"},m.map(function(e,t){return p.createElement("div",{className:"sonner-loading-bar",key:"spinner-bar-".concat(t)})})))},g=p.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},p.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),O=p.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},p.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),v=p.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},p.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),T=p.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},p.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),b=p.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},p.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),p.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),y=function(){var e=(0,u._)(p.useState(document.hidden),2),t=e[0],n=e[1];return p.useEffect(function(){var e=function(){n(document.hidden)};return document.addEventListener("visibilitychange",e),function(){return window.removeEventListener("visibilitychange",e)}},[]),t},A=1,R=new function e(){var t=this;(0,r._)(this,e),this.subscribe=function(e){return t.subscribers.push(e),function(){var n=t.subscribers.indexOf(e);t.subscribers.splice(n,1)}},this.publish=function(e){t.subscribers.forEach(function(t){return t(e)})},this.addToast=function(e){t.publish(e),t.toasts=(0,d._)(t.toasts).concat([e])},this.create=function(e){var n,o=e.message,r=(0,l._)(e,["message"]),a="number"==typeof(null==e?void 0:e.id)||(null==(n=e.id)?void 0:n.length)>0?e.id:A++,u=t.toasts.find(function(e){return e.id===a}),d=void 0===e.dismissible||e.dismissible;return t.dismissedToasts.has(a)&&t.dismissedToasts.delete(a),u?t.toasts=t.toasts.map(function(n){return n.id===a?(t.publish((0,s._)((0,i._)({},n,e),{id:a,title:o})),(0,s._)((0,i._)({}
1,n,e),{id:a,dismissible:d,title:o})):n}):t.addToast((0,s._)((0,i._)({title:o},r),{dismissible:d,id:a})),a},this.dismiss=function(e){return e?(t.dismissedToasts.add(e),requestAnimationFrame(function(){return t.subscribers.forEach(function(t){return t({id:e,dismiss:!0})})})):t.toasts.forEach(function(e){t.subscribers.forEach(function(t){return t({id:e.id,dismiss:!0})})}),e},this.message=function(e,n){return t.create((0,s._)((0,i._)({},n),{message:e}))},this.error=function(e,n){return t.create((0,s._)((0,i._)({},n),{message:e,type:"error"}))},this.success=function(e,n){return t.create((0,s._)((0,i._)({},n),{type:"success",message:e}))},this.info=function(e,n){return t.create((0,s._)((0,i._)({},n),{type:"info",message:e}))},this.warning=function(e,n){return t.create((0,s._)((0,i._)({},n),{type:"warning",message:e}))},this.loading=function(e,n){return t.create((0,s._)((0,i._)({},n),{type:"loading",message:e}))},this.promise=function(e,n){if(n){var r,l=void 0;void 0!==n.loading&&(l=t.create((0,s._)((0,i._)({},n),{promise:e,type:"loading",message:n.loading,description:"function"!=typeof n.description?n.description:void 0})));var u=Promise.resolve((0,a._)(e,Function)?e():e),d=void 0!==l,_=u.then(function(e){return(0,o._)(function(){var t,o,s,u,_,E,m,h,g,O,v,T,b,y,A;return(0,f.YH)(this,function(f){switch(f.label){case 0:if(r=["resolve",e],!p.isValidElement(e))return[3,1];return d=!1,this.create({id:l,type:"default",message:e}),[3,22];case 1:if(!(N(e)&&!e.ok))return[3,8];if(d=!1,"function"!=typeof n.error)return[3,3];return[4,n.error("HTTP error! status: ".concat(e.status))];case 2:return o=f.sent(),[3,4];case 3:o=n.error,f.label=4;case 4:if(t=o,"function"!=typeof n.description)return[3,6];return[4,n.description("HTTP error! status: ".concat(e.status))];case 5:return u=f.sent(),[3,7];case 6:u=n.description,f.label=7;case 7:return s=u,_=(void 0===t?"undefined":(0,c._)(t))!=="object"||p.isValidElement(t)?{message:t}:t,this.create((0,i._)({id:l,type:"error",description:s},_)),[3,22];case 8:if(!(0,a._)(e,Error))return[3,15];if(d=!1,"function"!=typeof n.error)return[3,10];return[4,n.error(e)];case 9:return m=f.sent(),[3,11];case 10:m=n.error,f.label=11;case 11:if(E=m,"function"!=typeof n.description)return[3,13];return[4,n.description(e)];case 12:return g=f.sent(),[3,14];case 13:g=n.description,f.label=14;case 14:return h=g,O=(void 0===E?"undefined":(0,c._)(E))!=="object"||p.isValidElement(E)?{message:E}:E,this.create((0,i._)({id:l,type:"error",description:h},O)),[3,22];case 15:if(void 0===n.success)return[3,22];if(d=!1,"function"!=typeof n.success)return[3,17];return[4,n.success(e)];case 16:return T=f.sent(),[3,18];case 17:T=n.success,f.label=18;case 18:if(v=T,"function"!=typeof n.description)return[3,20];return[4,n.description(e)];case 19:return y=f.sent(),[3,21];case 20:y=n.description,f.label=21;case 21:b=y,A=(void 0===v?"undefined":(0,c._)(v))!=="object"||p.isValidElement(v)?{message:v}:v,this.create((0,i._)({id:l,type:"success",description:b},A)),f.label=22;case 22:return[2]}})}).call(t)}).catch(function(e){return(0,o._)(function(){var t,o,a,s,u;return(0,f.YH)(this,function(f){switch(f.label){case 0:if(r=["reject",e],void 0===n.error)return[3,7];if(d=!1,"function"!=typeof n.error)return[3,2];return[4,n.error(e)];case 1:return o=f.sent(),[3,3];case 2:o=n.error,f.label=3;case 3:if(t=o,"function"!=typeof n.description)return[3,5];return[4,n.description(e)];case 4:return s=f.sent(),[3,6];case 5:s=n.description,f.label=6;case 6:a=s,u=(void 0===t?"undefined":(0,c._)(t))!=="object"||p.isValidElement(t)?{message:t}:t,this.create((0,i._)({id:l,type:"error",description:a},u)),f.label=7;case 7:return[2]}})}).call(t)}).finally(function(){d&&(t.dismiss(l),l=void 0),null==n.finally||n.finally.call(n)}),E=function(){return new Promise(function(e,t){return _.then(function(){return"reject"===r[0]?t(r[1]):e(r[1])}).catch(t)})};return"string"!=typeof l&&"number"!=typeof l?{unwrap:E}:Object.assign(l,{unwrap:E})}},this.custom=function(e,n){var o=(null==n?void 0:n.id)||A++;return t.create((0,i._)({jsx:e(o),id:o},n)),o},this.getActiveToasts=function(){return t.toasts.filter(function(e){return!t.dismissedToasts.has(e.id)})},this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set},N=function(e){return e&&(void 0===e?"undefined":(0,c._)(e))==="object"&&"ok"in e&&"boolean"==typeof e.ok&&"status"in e&&"number"==typeof e.status},w=Object.assign(function(e,t){var n=(null==t?void 0:t.id)||A++;return R.addToast((0,s._)((0,i._)({title:e},t),{id:n})),n},{success:R.success,info:R.info,warning:R.warning,error:R.error,custom:R.custom,message:R.message,promise:R.promise,dismiss:R.dismiss,loading:R.loading},{getHistory:function(){return R.toasts},getToasts:function(){return R.getActiveToasts()}});function I(e){return void 0!==e.label}function S(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.filter(Boolean).join(" ")}!function(e){if(e&&"undefined"!=typeof document){var t=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css",t.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}}
vendor: 4,787 bytes, line 1
1("[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}[data-sonner-toaster][dir=rtl],html[dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999;transition:transform .4s ease}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[data-sonner-toast]{--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-rich-colors=true][data-sonner-toast][data-styled=true] [data-description]{color:inherit}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [data-content]{display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [data-close-button]{position:absolute;
vendor: 10,077 bytes, line 1
1left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);background:var(--normal-bg);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast][data-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]::before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]::before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast][data-expanded=true]::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]::before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y,0)) translateX(var(--swipe-amount-x,0));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-sonner-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-theme=dark]{--normal-bg:#000;--normal-bg-hover:hsl(0, 0%, 12%);--normal-border:hsl(0, 0%, 20%);--normal-border-hover:hsl(0, 0%, 25%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}");
1var L=function(e){var t,n,o,r,a,l,c,f,_,m,g,O,v,T=e.invert,A=e.toast,R=e.unstyled,N=e.interacting,w=e.setHeights,L=e.visibleToasts,U=e.heights,D=e.index,x=e.toasts,C=e.expanded,M=e.removeToast,P=e.defaultRichColors,Y=e.closeButton,k=e.style,B=e.cancelButtonStyle,F=e.actionButtonStyle,H=e.className,V=e.descriptionClassName,j=e.duration,W=e.position,G=e.gap,z=e.expandByDefault,$=e.classNames,q=e.icons,X=e.closeButtonAriaLabel,K=(0,u._)(p.useState(null),2),Z=K[0],Q=K[1],J=(0,u._)(p.useState(null),2),ee=J[0],et=J[1],en=(0,u._)(p.useState(!1),2),eo=en[0],er=en[1],ea=(0,u._)(p.useState(!1),2),ei=ea[0],es=ea[1],el=(0,u._)(p.useState(!1),2),eu=el[0],ed=el[1],ec=(0,u._)(p.useState(!1),2),ef=ec[0],ep=ec[1],e_=(0,u._)(p.useState(!1),2),eE=e_[0],em=e_[1],eh=(0,u._)(p.useState(0),2),eg=eh[0],eO=eh[1],ev=(0,u._)(p.useState(0),2),eT=ev[0],eb=ev[1],ey=p.useRef(A.duration||j||4e3),eA=p.useRef(null),eR=p.useRef(null),eN=0===D,ew=D+1<=L,eI=A.type,eS=!1!==A.dismissible,eL=A.className||"",eU=A.descriptionClassName||"",eD=p.useMemo(function(){return U.findIndex(function(e){return e.toastId===A.id})||0},[U,A.id]),ex=p.useMemo(function(){var e;return null!=(e=A.closeButton)?e:Y},[A.closeButton,Y]),eC=p.useMemo(function(){return A.duration||j||4e3},[A.duration,j]),eM=p.useRef(0),eP=p.useRef(0),eY=p.useRef(0),ek=p.useRef(null),eB=(0,u._)(W.split("-"),2),eF=eB[0],eH=eB[1],eV=p.useMemo(function(){return U.reduce(function(e,t,n){return n>=eD?e:e+t.height},0)},[U,eD]),ej=y(),eW=A.invert||T,eG="loading"===eI;eP.current=p.useMemo(function(){return eD*G+eV},[eD,eV]),p.useEffect(function(){ey.current=eC},[eC]),p.useEffect(function(){er(!0)},[]),p.useEffect(function(){var e=eR.current;if(e){var t=e.getBoundingClientRect().height;return eb(t),w(function(e){return[{toastId:A.id,height:t,position:A.position}
1].concat((0,d._)(e))}),function(){return w(function(e){return e.filter(function(e){return e.toastId!==A.id})})}}},[w,A.id]),p.useLayoutEffect(function(){if(eo){var e=eR.current,t=e.style.height;e.style.height="auto";var n=e.getBoundingClientRect().height;e.style.height=t,eb(n),w(function(e){return e.find(function(e){return e.toastId===A.id})?e.map(function(e){return e.toastId===A.id?(0,s._)((0,i._)({},e),{height:n}):e}):[{toastId:A.id,height:n,position:A.position}].concat((0,d._)(e))})}},[eo,A.title,A.description,w,A.id,A.jsx,A.action,A.cancel]);var ez=p.useCallback(function(){es(!0),eO(eP.current),w(function(e){return e.filter(function(e){return e.toastId!==A.id})}),setTimeout(function(){M(A)},200)},[A,M,w,eP]);p.useEffect(function(){if((!A.promise||"loading"!==eI)&&A.duration!==1/0&&"loading"!==A.type){var e;if(C||N||ej){if(eY.current<eM.current){var t=new Date().getTime()-eM.current;ey.current=ey.current-t}eY.current=new Date().getTime()}else ey.current!==1/0&&(eM.current=new Date().getTime(),e=setTimeout(function(){null==A.onAutoClose||A.onAutoClose.call(A,A),ez()},ey.current));return function(){return clearTimeout(e)}}},[C,N,A,eI,ej,ez]),p.useEffect(function(){A.delete&&(ez(),null==A.onDismiss||A.onDismiss.call(A,A))},[ez,A.delete]);var e$=A.icon||(null==q?void 0:q[eI])||E(eI);return p.createElement("li",{tabIndex:0,ref:eR,className:S(void 0===H?"":H,eL,null==$?void 0:$.toast,null==A||null==(t=A.classNames)?void 0:t.toast,null==$?void 0:$.default,null==$?void 0:$[eI],null==A||null==(n=A.classNames)?void 0:n[eI]),"data-sonner-toast":"","data-rich-colors":null!=(m=A.richColors)?m:P,"data-styled":!(A.jsx||A.unstyled||R),"data-mounted":eo,"data-promise":!!A.promise,"data-swiped":eE,"data-removed":ei,"data-visible":ew,"data-y-position":eF,"data-x-position":eH,"data-index":D,"data-front":eN,"data-swiping":eu,"data-dismissible":eS,"data-type":eI,"data-invert":eW,"data-swipe-out":ef,"data-swipe-direction":ee,"data-expanded":!!(C||z&&eo),"data-testid":A.testId,style:(0,i._)({"--index":D,"--toasts-before":D,"--z-index":x.length-D,"--offset":"".concat(ei?eg:eP.current,"px"),"--initial-height":z?"auto":"".concat(eT,"px")},k,A.style),onDragEnd:function(){ed(!1),Q(null),ek.current=null},onPointerDown:function(e){2!==e.button&&!eG&&eS&&(eA.current=new Date,eO(eP.current),e.target.setPointerCapture(e.pointerId),"BUTTON"!==e.target.tagName&&(ed(!0),ek.current={x:e.clientX,y:e.clientY}))},onPointerUp:function(){if(!ef&&eS){ek.current=null;var e,t,n,o,r,a=Number((null==(e=eR.current)?void 0:e.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),i=Number((null==(t=eR.current)?void 0:t.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),s=new Date().getTime()-(null==(n=eA.current)?void 0:n.getTime()),l="x"===Z?a:i,u=Math.abs(l)/s;if(Math.abs(l)>=45||u>.11){eO(eP.current),null==A.onDismiss||A.onDismiss.call(A,A),"x"===Z?et(a>0?"right":"left"):et(i>0?"down":"up"),ez(),ep(!0);return}null==(o=eR.current)||o.style.setProperty("--swipe-amount-x","0px"),null==(r=eR.current)||r.style.setProperty("--swipe-amount-y","0px"),em(!1),ed(!1),Q(null)}},onPointerMove:function(t){if(ek.current&&eS&&!((null==(n=window.getSelection())?void 0:n.toString().length)>0)){var n,o,r,a,i,s,l,d,c=t.clientY-ek.current.y,f=t.clientX-ek.current.x,p=null!=(a=e.swipeDirections)?a:(s=(i=(0,u._)(W.split("-"),2))[0],l=i[1],d=[],s&&d.push(s),l&&d.push(l),d);!Z&&(Math.abs(f)>1||Math.abs(c)>1)&&Q(Math.abs(f)>Math.abs(c)?"x":"y");var _={x:0,y:0},E=function(e){return 1/(1.5+Math.abs(e)/20)};if("y"===Z){if(p.includes("top")||p.includes("bottom"))if(p.includes("top")&&c<0||p.includes("bottom")&&c>0)_.y=c;else{var m=c*E(c);_.y=Math.abs(m)<Math.abs(c)?m:c}}
1else if("x"===Z&&(p.includes("left")||p.includes("right")))if(p.includes("left")&&f<0||p.includes("right")&&f>0)_.x=f;else{var h=f*E(f);_.x=Math.abs(h)<Math.abs(f)?h:f}(Math.abs(_.x)>0||Math.abs(_.y)>0)&&em(!0),null==(o=eR.current)||o.style.setProperty("--swipe-amount-x","".concat(_.x,"px")),null==(r=eR.current)||r.style.setProperty("--swipe-amount-y","".concat(_.y,"px"))}}},ex&&!A.jsx&&"loading"!==eI?p.createElement("button",{"aria-label":void 0===X?"Close toast":X,"data-disabled":eG,"data-close-button":!0,onClick:eG||!eS?function(){}:function(){ez(),null==A.onDismiss||A.onDismiss.call(A,A)},className:S(null==$?void 0:$.closeButton,null==A||null==(o=A.classNames)?void 0:o.closeButton)},null!=(g=null==q?void 0:q.close)?g:b):null,(eI||A.icon||A.promise)&&null!==A.icon&&((null==q?void 0:q[eI])!==null||A.icon)?p.createElement("div",{"data-icon":"",className:S(null==$?void 0:$.icon,null==A||null==(r=A.classNames)?void 0:r.icon)},A.promise||"loading"===A.type&&!A.icon?A.icon||((null==q?void 0:q.loading)?p.createElement("div",{className:S(null==$?void 0:$.loader,null==A||null==(v=A.classNames)?void 0:v.loader,"sonner-loader"),"data-visible":"loading"===eI},q.loading):p.createElement(h,{className:S(null==$?void 0:$.loader,null==A||null==(O=A.classNames)?void 0:O.loader),visible:"loading"===eI})):null,"loading"!==A.type?e$:null):null,p.createElement("div",{"data-content":"",className:S(null==$?void 0:$.content,null==A||null==(a=A.classNames)?void 0:a.content)},p.createElement("div",{"data-title":"",className:S(null==$?void 0:$.title,null==A||null==(l=A.classNames)?void 0:l.title)},A.jsx?A.jsx:"function"==typeof A.title?A.title():A.title),A.description?p.createElement("div",{"data-description":"",className:S(void 0===V?"":V,eU,null==$?void 0:$.description,null==A||null==(c=A.classNames)?void 0:c.description)},"function"==typeof A.description?A.description():A.description):null),p.isValidElement(A.cancel)?A.cancel:A.cancel&&I(A.cancel)?p.createElement("button",{"data-button":!0,"data-cancel":!0,style:A.cancelButtonStyle||B,onClick:function(e){I(A.cancel)&&eS&&(null==A.cancel.onClick||A.cancel.onClick.call(A.cancel,e),ez())},className:S(null==$?void 0:$.cancelButton,null==A||null==(f=A.classNames)?void 0:f.cancelButton)},A.cancel.label):null,p.isValidElement(A.action)?A.action:A.action&&I(A.action)?p.createElement("button",{"data-button":!0,"data-action":!0,style:A.actionButtonStyle||F,onClick:function(e){I(A.action)&&(null==A.action.onClick||A.action.onClick.call(A.action,e),e.defaultPrevented||ez())},className:S(null==$?void 0:$.actionButton,null==A||null==(_=A.classNames)?void 0:_.actionButton)},A.action.label):null)};function U(){if("undefined"==typeof window||"undefined"==typeof document)return"ltr";var e=document.documentElement.getAttribute("dir");return"auto"!==e&&e?e:window.getComputedStyle(document.documentElement).direction}var D=p.forwardRef(function(e,t){var n=e.id,o=e.invert,r=e.position,l=void 0===r?"bottom-right":r,f=e.hotkey,E=void 0===f?["altKey","KeyT"]:f,m=e.expand,h=e.closeButton,g=e.className,O=e.offset,v=e.mobileOffset,T=e.theme,b=void 0===T?"light":T,y=e.richColors,A=e.duration,N=e.style,w=e.visibleToasts,I=void 0===w?3:w,S=e.toastOptions,D=e.dir,x=void 0===D?U():D,C=e.gap,M=void 0===C?14:C,P=e.icons,Y=e.containerAriaLabel,k=(0,u._)(p.useState([]),2),B=k[0],F=k[1],H=p.useMemo(function(){return n?B.filter(function(e){return e.toasterId===n}):B.filter(function(e){return!e.toasterId})},[B,n]),V=p.useMemo(function(){return Array.from(new Set([l].concat(H.filter(function(e){return e.position}).map(function(e){return e.position}))))},[H,l]),j=(0,u._)(p.useState([]),2),W=j[0],G=j[1],z=(0,u._)(p.useState(!1),2),$=z[0],q=z[1],X=(0,u._)(p.useState(!1),2),K=X[0],Z=X[1],Q=(0,u._)(p.useState("system"!==b?b:"undefined"!=typeof window&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),2),J=Q[0],ee=Q[1],et=p.useRef(null),en=E.join("+").replace(/Key/g,"").replace(/Digit/g,""),eo=p.useRef(null),er=p.useRef(!1),ea=p.useCallback(function(e){F(function(t){var n;return(null==(n=t.find(function(t){return t.id===e.id}))?void 0:n.delete)||R.dismiss(e.id),t.filter(function(t){return t.id!==e.id})})},[]);return p.useEffect(function(){return R.subscribe(function(e){if(e.dismiss)return void requestAnimationFrame(function(){F(function(t){return t.map(function(t){return t.id===e.id?(0,s._)((0,i._)({},t),{delete:!0}):t})})});setTimeout(function(){_.flushSync(function(){F(function(t){var n=t.findIndex(function(t){return t.id===e.id});return -1!==n?(0,d._)(t.slice(0,n)).concat([(0,i._)({},t[n],e)],(0,d._)(t.slice(n+1))):[e].concat((0,d._)(t))})})})})},[B]),p.useEffect(function(){if("system"!==b)return void ee(b);if("system"===b&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?ee("dark"):ee("light")),"undefined"!=typeof window){var e=window.matchMedia("(prefers-color-scheme: dark)");try{e.addEventListener("change",function(e){e.matches?ee("dark"):ee("light")})}catch(t){e.addListener(function(e){var t=e.matches;try{t?ee("dark"):ee("light")}catch(e){console.error(e)}})}}},[b]),p.useEffect(function(){B.length<=1&&q(!1)},[B]),p.useEffect(function(){var e=function(e){var t,n;E.every(function(t){return e[t]||e.code===t})&&(q(!0),null==(n=et.current)||n.focus()),"Escape"===e.code&&(document.activeElement===et.current||(null==(t=et.current)?void 0:t.contains(document.activeElement)))&&q(!1)};return document.addEventListener("keydown",e),function(){return document.removeEventListener("keydown",e)}},[E]),p.useEffect(function(){if(et.current)return function(){eo.current&&(eo.current.focus({preventScroll:!0}),eo.current=null,er.current=!1)}},[et.current]),p.createElement("section",{ref:t,"aria-label":"".concat(void 0===Y?"Notifications":Y," ").concat(en),tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},V.map(function(t,n){var r,s,l=(0,u._)(t.split("-"),2),d=l[0],f=l[1];return H.length?p.createElement("ol",{key:t,dir:"auto"===x?U():x,tabIndex:-1,ref:et,className:g,"data-sonner-toaster":!0,"data-sonner-theme":J,"data-y-position":d,"data-x-position":f,style:(0,i._)({"--front-toast-height":"".concat((null==(s=W[0])?void 0:s.height)||0,"px"),"--width":"".concat(356,"px"),"--gap":"".concat(M,"px")},N,(r={},[O,v].forEach(function(e,t){var n=function(e){["top","right","bottom","left"].forEach(function(t){r["".concat(a,"-").concat(t)]="number"==typeof e?"".concat(e,"px"):e})},o=1===t,a=o?"--mobile-offset":"--offset",i=o?"16px":"24px";"number"==typeof e||"string"==typeof e?n(e):(void 0===e?"undefined":(0,c._)(e))==="object"?["top","right","bottom","left"].forEach(function(t){void 0===e[t]?r["".concat(a,"-").concat(t)]=i:r["".concat(a,"-").concat(t)]="number"==typeof e[t]?"".concat(e[t],"px"):e[t]}):n(i)}),r)),onBlur:function(e){er.current&&!e.currentTarget.contains(e.relatedTarget)&&(er.current=!1,eo.current&&(eo.current.focus({preventScroll:!0}),eo.current=null))},onFocus:function(e){!((0,a._)(e.target,HTMLElement)&&"false"===e.target.dataset.dismissible)&&(er.current||(er.current=!0,eo.current=e.relatedTarget))},onMouseEnter:function(){return q(!0)},onMouseMove:function(){return q(!0)},onMouseLeave:function(){K||q(!1)},onDragEnd:function(){return q(!1)},onPointerDown:function(e){(0,a._)(e.target,HTMLElement)&&"false"===e.target.dataset.dismissible||Z(!0)},onPointerUp:function(){return Z(!1)}},H.filter(function(e){return!e.position&&0===n||e.position===t}).map(function(n,r){var a,i;return p.createElement(L,{key:n.id,icons:P,index:r,toast:n,defaultRichColors:y,duration:null!=(a=null==S?void 0:S.duration)?a:A,className:null==S?void 0:S.className,descriptionClassName:null==S?void 0:S.descriptionClassName,invert:o,visibleToasts:I,closeButton:null!=(i=null==S?void 0:S.closeButton)?i:h,interacting:K,position:t,style:null==S?void 0:S.style,unstyled:null==S?void 0:S.unstyled,classNames:null==S?void 0:S.classNames,cancelButtonStyle:null==S?void 0:S.cancelButtonStyle,actionButtonStyle:null==S?void 0:S.actionButtonStyle,closeButtonAriaLabel:null==S?void 0:S.closeButtonAriaLabel,removeToast:ea,toasts:H.filter(function(e){return e.position==n.position}),heights:W.filter(function(e){return e.position==n.position}),setHeights:G,expandByDefault:m,gap:M,expanded:$,swipeDirections:e.swipeDirections})})):null}))})}}]);

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.