@neuctra/authix 1.1.2 → 1.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,583 @@
1
+ (function(re,S){typeof exports=="object"&&typeof module<"u"?S(exports,require("react")):typeof define=="function"&&define.amd?define(["exports","react"],S):(re=typeof globalThis<"u"?globalThis:re||self,S(re.NeuctraAuthix={},re.React))})(this,(function(re,S){"use strict";var ze={exports:{}},ke={};/**
2
+ * @license React
3
+ * react-jsx-runtime.production.js
4
+ *
5
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
6
+ *
7
+ * This source code is licensed under the MIT license found in the
8
+ * LICENSE file in the root directory of this source tree.
9
+ */var ct;function ln(){if(ct)return ke;ct=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function r(s,o,i){var a=null;if(i!==void 0&&(a=""+i),o.key!==void 0&&(a=""+o.key),"key"in o){i={};for(var c in o)c!=="key"&&(i[c]=o[c])}else i=o;return o=i.ref,{$$typeof:e,type:s,key:a,ref:o!==void 0?o:null,props:i}}return ke.Fragment=t,ke.jsx=r,ke.jsxs=r,ke}var Ce={};/**
10
+ * @license React
11
+ * react-jsx-runtime.development.js
12
+ *
13
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
14
+ *
15
+ * This source code is licensed under the MIT license found in the
16
+ * LICENSE file in the root directory of this source tree.
17
+ */var dt;function cn(){return dt||(dt=1,process.env.NODE_ENV!=="production"&&(function(){function e(x){if(x==null)return null;if(typeof x=="function")return x.$$typeof===K?null:x.displayName||x.name||null;if(typeof x=="string")return x;switch(x){case b:return"Fragment";case F:return"Profiler";case h:return"StrictMode";case M:return"Suspense";case y:return"SuspenseList";case D:return"Activity"}if(typeof x=="object")switch(typeof x.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),x.$$typeof){case u:return"Portal";case _:return(x.displayName||"Context")+".Provider";case I:return(x._context.displayName||"Context")+".Consumer";case C:var k=x.render;return x=x.displayName,x||(x=k.displayName||k.name||"",x=x!==""?"ForwardRef("+x+")":"ForwardRef"),x;case P:return k=x.displayName||null,k!==null?k:e(x.type)||"Memo";case w:k=x._payload,x=x._init;try{return e(x(k))}catch{}}return null}function t(x){return""+x}function r(x){try{t(x);var k=!1}catch{k=!0}if(k){k=console;var N=k.error,W=typeof Symbol=="function"&&Symbol.toStringTag&&x[Symbol.toStringTag]||x.constructor.name||"Object";return N.call(k,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",W),t(x)}}function s(x){if(x===b)return"<>";if(typeof x=="object"&&x!==null&&x.$$typeof===w)return"<...>";try{var k=e(x);return k?"<"+k+">":"<...>"}catch{return"<...>"}}function o(){var x=L.A;return x===null?null:x.getOwner()}function i(){return Error("react-stack-top-frame")}function a(x){if(J.call(x,"key")){var k=Object.getOwnPropertyDescriptor(x,"key").get;if(k&&k.isReactWarning)return!1}return x.key!==void 0}function c(x,k){function N(){Z||(Z=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",k))}N.isReactWarning=!0,Object.defineProperty(x,"key",{get:N,configurable:!0})}function g(){var x=e(this.type);return B[x]||(B[x]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),x=this.props.ref,x!==void 0?x:null}function p(x,k,N,W,f,j,q,se){return N=j.ref,x={$$typeof:T,type:x,key:k,props:j,_owner:f},(N!==void 0?N:null)!==null?Object.defineProperty(x,"ref",{enumerable:!1,get:g}):Object.defineProperty(x,"ref",{enumerable:!1,value:null}),x._store={},Object.defineProperty(x._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(x,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(x,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:q}),Object.defineProperty(x,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:se}),Object.freeze&&(Object.freeze(x.props),Object.freeze(x)),x}function l(x,k,N,W,f,j,q,se){var X=k.children;if(X!==void 0)if(W)if(Q(X)){for(W=0;W<X.length;W++)m(X[W]);Object.freeze&&Object.freeze(X)}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else m(X);if(J.call(k,"key")){X=e(x);var ae=Object.keys(k).filter(function(ve){return ve!=="key"});W=0<ae.length?"{key: someKey, "+ae.join(": ..., ")+": ...}":"{key: someKey}",Y[X+W]||(ae=0<ae.length?"{"+ae.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
18
+ let props = %s;
19
+ <%s {...props} />
20
+ React keys must be passed directly to JSX without using spread:
21
+ let props = %s;
22
+ <%s key={someKey} {...props} />`,W,X,ae,X),Y[X+W]=!0)}if(X=null,N!==void 0&&(r(N),X=""+N),a(k)&&(r(k.key),X=""+k.key),"key"in k){N={};for(var de in k)de!=="key"&&(N[de]=k[de])}else N=k;return X&&c(N,typeof x=="function"?x.displayName||x.name||"Unknown":x),p(x,X,j,f,o(),N,q,se)}function m(x){typeof x=="object"&&x!==null&&x.$$typeof===T&&x._store&&(x._store.validated=1)}var O=S,T=Symbol.for("react.transitional.element"),u=Symbol.for("react.portal"),b=Symbol.for("react.fragment"),h=Symbol.for("react.strict_mode"),F=Symbol.for("react.profiler"),I=Symbol.for("react.consumer"),_=Symbol.for("react.context"),C=Symbol.for("react.forward_ref"),M=Symbol.for("react.suspense"),y=Symbol.for("react.suspense_list"),P=Symbol.for("react.memo"),w=Symbol.for("react.lazy"),D=Symbol.for("react.activity"),K=Symbol.for("react.client.reference"),L=O.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,J=Object.prototype.hasOwnProperty,Q=Array.isArray,v=console.createTask?console.createTask:function(){return null};O={react_stack_bottom_frame:function(x){return x()}};var Z,B={},U=O.react_stack_bottom_frame.bind(O,i)(),R=v(s(i)),Y={};Ce.Fragment=b,Ce.jsx=function(x,k,N,W,f){var j=1e4>L.recentlyCreatedOwnerStacks++;return l(x,k,N,!1,W,f,j?Error("react-stack-top-frame"):U,j?v(s(x)):R)},Ce.jsxs=function(x,k,N,W,f){var j=1e4>L.recentlyCreatedOwnerStacks++;return l(x,k,N,!0,W,f,j?Error("react-stack-top-frame"):U,j?v(s(x)):R)}})()),Ce}var ut;function dn(){return ut||(ut=1,process.env.NODE_ENV==="production"?ze.exports=ln():ze.exports=cn()),ze.exports}var n=dn();function pt(e,t){return function(){return e.apply(t,arguments)}}const{toString:un}=Object.prototype,{getPrototypeOf:Ve}=Object,{iterator:Ae,toStringTag:ft}=Symbol,Ie=(e=>t=>{const r=un.call(t);return e[r]||(e[r]=r.slice(8,-1).toLowerCase())})(Object.create(null)),oe=e=>(e=e.toLowerCase(),t=>Ie(t)===e),Ne=e=>t=>typeof t===e,{isArray:me}=Array,ye=Ne("undefined");function Ee(e){return e!==null&&!ye(e)&&e.constructor!==null&&!ye(e.constructor)&&te(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const xt=oe("ArrayBuffer");function pn(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&xt(e.buffer),t}const fn=Ne("string"),te=Ne("function"),ht=Ne("number"),Re=e=>e!==null&&typeof e=="object",xn=e=>e===!0||e===!1,Fe=e=>{if(Ie(e)!=="object")return!1;const t=Ve(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(ft in e)&&!(Ae in e)},hn=e=>{if(!Re(e)||Ee(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},gn=oe("Date"),mn=oe("File"),yn=oe("Blob"),bn=oe("FileList"),wn=e=>Re(e)&&te(e.pipe),Sn=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||te(e.append)&&((t=Ie(e))==="formdata"||t==="object"&&te(e.toString)&&e.toString()==="[object FormData]"))},jn=oe("URLSearchParams"),[vn,kn,Cn,En]=["ReadableStream","Request","Response","Headers"].map(oe),Rn=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Te(e,t,{allOwnKeys:r=!1}={}){if(e===null||typeof e>"u")return;let s,o;if(typeof e!="object"&&(e=[e]),me(e))for(s=0,o=e.length;s<o;s++)t.call(null,e[s],s,e);else{if(Ee(e))return;const i=r?Object.getOwnPropertyNames(e):Object.keys(e),a=i.length;let c;for(s=0;s<a;s++)c=i[s],t.call(null,e[c],c,e)}}function gt(e,t){if(Ee(e))return null;t=t.toLowerCase();const r=Object.keys(e);let s=r.length,o;for(;s-- >0;)if(o=r[s],t===o.toLowerCase())return o;return null}const ue=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,mt=e=>!ye(e)&&e!==ue;function $e(){const{caseless:e,skipUndefined:t}=mt(this)&&this||{},r={},s=(o,i)=>{const a=e&&gt(r,i)||i;Fe(r[a])&&Fe(o)?r[a]=$e(r[a],o):Fe(o)?r[a]=$e({},o):me(o)?r[a]=o.slice():(!t||!ye(o))&&(r[a]=o)};for(let o=0,i=arguments.length;o<i;o++)arguments[o]&&Te(arguments[o],s);return r}const Tn=(e,t,r,{allOwnKeys:s}={})=>(Te(t,(o,i)=>{r&&te(o)?e[i]=pt(o,r):e[i]=o},{allOwnKeys:s}),e),On=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),_n=(e,t,r,s)=>{e.prototype=Object.create(t.prototype,s),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),r&&Object.assign(e.prototype,r)},Pn=(e,t,r,s)=>{let o,i,a;const c={};if(t=t||{},e==null)return t;do{for(o=Object.getOwnPropertyNames(e),i=o.length;i-- >0;)a=o[i],(!s||s(a,e,t))&&!c[a]&&(t[a]=e[a],c[a]=!0);e=r!==!1&&Ve(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t},zn=(e,t,r)=>{e=String(e),(r===void 0||r>e.length)&&(r=e.length),r-=t.length;const s=e.indexOf(t,r);return s!==-1&&s===r},An=e=>{if(!e)return null;if(me(e))return e;let t=e.length;if(!ht(t))return null;const r=new Array(t);for(;t-- >0;)r[t]=e[t];return r},In=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&Ve(Uint8Array)),Nn=(e,t)=>{const s=(e&&e[Ae]).call(e);let o;for(;(o=s.next())&&!o.done;){const i=o.value;t.call(e,i[0],i[1])}},Fn=(e,t)=>{let r;const s=[];for(;(r=e.exec(t))!==null;)s.push(r);return s},Ln=oe("HTMLFormElement"),Dn=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(r,s,o){return s.toUpperCase()+o}),yt=(({hasOwnProperty:e})=>(t,r)=>e.call(t,r))(Object.prototype),Un=oe("RegExp"),bt=(e,t)=>{const r=Object.getOwnPropertyDescriptors(e),s={};Te(r,(o,i)=>{let a;(a=t(o,i,e))!==!1&&(s[i]=a||o)}),Object.defineProperties(e,s)},Mn=e=>{bt(e,(t,r)=>{if(te(e)&&["arguments","caller","callee"].indexOf(r)!==-1)return!1;const s=e[r];if(te(s)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")})}})},Bn=(e,t)=>{const r={},s=o=>{o.forEach(i=>{r[i]=!0})};return me(e)?s(e):s(String(e).split(t)),r},Wn=()=>{},Hn=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function Vn(e){return!!(e&&te(e.append)&&e[ft]==="FormData"&&e[Ae])}const $n=e=>{const t=new Array(10),r=(s,o)=>{if(Re(s)){if(t.indexOf(s)>=0)return;if(Ee(s))return s;if(!("toJSON"in s)){t[o]=s;const i=me(s)?[]:{};return Te(s,(a,c)=>{const g=r(a,o+1);!ye(g)&&(i[c]=g)}),t[o]=void 0,i}}return s};return r(e,0)},Yn=oe("AsyncFunction"),Jn=e=>e&&(Re(e)||te(e))&&te(e.then)&&te(e.catch),wt=((e,t)=>e?setImmediate:t?((r,s)=>(ue.addEventListener("message",({source:o,data:i})=>{o===ue&&i===r&&s.length&&s.shift()()},!1),o=>{s.push(o),ue.postMessage(r,"*")}))(`axios@${Math.random()}`,[]):r=>setTimeout(r))(typeof setImmediate=="function",te(ue.postMessage)),Kn=typeof queueMicrotask<"u"?queueMicrotask.bind(ue):typeof process<"u"&&process.nextTick||wt,d={isArray:me,isArrayBuffer:xt,isBuffer:Ee,isFormData:Sn,isArrayBufferView:pn,isString:fn,isNumber:ht,isBoolean:xn,isObject:Re,isPlainObject:Fe,isEmptyObject:hn,isReadableStream:vn,isRequest:kn,isResponse:Cn,isHeaders:En,isUndefined:ye,isDate:gn,isFile:mn,isBlob:yn,isRegExp:Un,isFunction:te,isStream:wn,isURLSearchParams:jn,isTypedArray:In,isFileList:bn,forEach:Te,merge:$e,extend:Tn,trim:Rn,stripBOM:On,inherits:_n,toFlatObject:Pn,kindOf:Ie,kindOfTest:oe,endsWith:zn,toArray:An,forEachEntry:Nn,matchAll:Fn,isHTMLForm:Ln,hasOwnProperty:yt,hasOwnProp:yt,reduceDescriptors:bt,freezeMethods:Mn,toObjectSet:Bn,toCamelCase:Dn,noop:Wn,toFiniteNumber:Hn,findKey:gt,global:ue,isContextDefined:mt,isSpecCompliantForm:Vn,toJSONObject:$n,isAsyncFn:Yn,isThenable:Jn,setImmediate:wt,asap:Kn,isIterable:e=>e!=null&&te(e[Ae])};function A(e,t,r,s,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),r&&(this.config=r),s&&(this.request=s),o&&(this.response=o,this.status=o.status?o.status:null)}d.inherits(A,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:d.toJSONObject(this.config),code:this.code,status:this.status}}});const St=A.prototype,jt={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{jt[e]={value:e}}),Object.defineProperties(A,jt),Object.defineProperty(St,"isAxiosError",{value:!0}),A.from=(e,t,r,s,o,i)=>{const a=Object.create(St);d.toFlatObject(e,a,function(l){return l!==Error.prototype},p=>p!=="isAxiosError");const c=e&&e.message?e.message:"Error",g=t==null&&e?e.code:t;return A.call(a,c,g,r,s,o),e&&a.cause==null&&Object.defineProperty(a,"cause",{value:e,configurable:!0}),a.name=e&&e.name||"Error",i&&Object.assign(a,i),a};const qn=null;function Ye(e){return d.isPlainObject(e)||d.isArray(e)}function vt(e){return d.endsWith(e,"[]")?e.slice(0,-2):e}function kt(e,t,r){return e?e.concat(t).map(function(o,i){return o=vt(o),!r&&i?"["+o+"]":o}).join(r?".":""):t}function Xn(e){return d.isArray(e)&&!e.some(Ye)}const Gn=d.toFlatObject(d,{},null,function(t){return/^is[A-Z]/.test(t)});function Le(e,t,r){if(!d.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,r=d.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,function(b,h){return!d.isUndefined(h[b])});const s=r.metaTokens,o=r.visitor||l,i=r.dots,a=r.indexes,g=(r.Blob||typeof Blob<"u"&&Blob)&&d.isSpecCompliantForm(t);if(!d.isFunction(o))throw new TypeError("visitor must be a function");function p(u){if(u===null)return"";if(d.isDate(u))return u.toISOString();if(d.isBoolean(u))return u.toString();if(!g&&d.isBlob(u))throw new A("Blob is not supported. Use a Buffer instead.");return d.isArrayBuffer(u)||d.isTypedArray(u)?g&&typeof Blob=="function"?new Blob([u]):Buffer.from(u):u}function l(u,b,h){let F=u;if(u&&!h&&typeof u=="object"){if(d.endsWith(b,"{}"))b=s?b:b.slice(0,-2),u=JSON.stringify(u);else if(d.isArray(u)&&Xn(u)||(d.isFileList(u)||d.endsWith(b,"[]"))&&(F=d.toArray(u)))return b=vt(b),F.forEach(function(_,C){!(d.isUndefined(_)||_===null)&&t.append(a===!0?kt([b],C,i):a===null?b:b+"[]",p(_))}),!1}return Ye(u)?!0:(t.append(kt(h,b,i),p(u)),!1)}const m=[],O=Object.assign(Gn,{defaultVisitor:l,convertValue:p,isVisitable:Ye});function T(u,b){if(!d.isUndefined(u)){if(m.indexOf(u)!==-1)throw Error("Circular reference detected in "+b.join("."));m.push(u),d.forEach(u,function(F,I){(!(d.isUndefined(F)||F===null)&&o.call(t,F,d.isString(I)?I.trim():I,b,O))===!0&&T(F,b?b.concat(I):[I])}),m.pop()}}if(!d.isObject(e))throw new TypeError("data must be an object");return T(e),t}function Ct(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(s){return t[s]})}function Je(e,t){this._pairs=[],e&&Le(e,this,t)}const Et=Je.prototype;Et.append=function(t,r){this._pairs.push([t,r])},Et.toString=function(t){const r=t?function(s){return t.call(this,s,Ct)}:Ct;return this._pairs.map(function(o){return r(o[0])+"="+r(o[1])},"").join("&")};function Zn(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function Rt(e,t,r){if(!t)return e;const s=r&&r.encode||Zn;d.isFunction(r)&&(r={serialize:r});const o=r&&r.serialize;let i;if(o?i=o(t,r):i=d.isURLSearchParams(t)?t.toString():new Je(t,r).toString(s),i){const a=e.indexOf("#");a!==-1&&(e=e.slice(0,a)),e+=(e.indexOf("?")===-1?"?":"&")+i}return e}class Tt{constructor(){this.handlers=[]}use(t,r,s){return this.handlers.push({fulfilled:t,rejected:r,synchronous:s?s.synchronous:!1,runWhen:s?s.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){d.forEach(this.handlers,function(s){s!==null&&t(s)})}}const Ot={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Qn={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams<"u"?URLSearchParams:Je,FormData:typeof FormData<"u"?FormData:null,Blob:typeof Blob<"u"?Blob:null},protocols:["http","https","file","blob","url","data"]},Ke=typeof window<"u"&&typeof document<"u",qe=typeof navigator=="object"&&navigator||void 0,er=Ke&&(!qe||["ReactNative","NativeScript","NS"].indexOf(qe.product)<0),tr=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",nr=Ke&&window.location.href||"http://localhost",ee={...Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Ke,hasStandardBrowserEnv:er,hasStandardBrowserWebWorkerEnv:tr,navigator:qe,origin:nr},Symbol.toStringTag,{value:"Module"})),...Qn};function rr(e,t){return Le(e,new ee.classes.URLSearchParams,{visitor:function(r,s,o,i){return ee.isNode&&d.isBuffer(r)?(this.append(s,r.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)},...t})}function sr(e){return d.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function or(e){const t={},r=Object.keys(e);let s;const o=r.length;let i;for(s=0;s<o;s++)i=r[s],t[i]=e[i];return t}function _t(e){function t(r,s,o,i){let a=r[i++];if(a==="__proto__")return!0;const c=Number.isFinite(+a),g=i>=r.length;return a=!a&&d.isArray(o)?o.length:a,g?(d.hasOwnProp(o,a)?o[a]=[o[a],s]:o[a]=s,!c):((!o[a]||!d.isObject(o[a]))&&(o[a]=[]),t(r,s,o[a],i)&&d.isArray(o[a])&&(o[a]=or(o[a])),!c)}if(d.isFormData(e)&&d.isFunction(e.entries)){const r={};return d.forEachEntry(e,(s,o)=>{t(sr(s),o,r,0)}),r}return null}function ar(e,t,r){if(d.isString(e))try{return(t||JSON.parse)(e),d.trim(e)}catch(s){if(s.name!=="SyntaxError")throw s}return(r||JSON.stringify)(e)}const Oe={transitional:Ot,adapter:["xhr","http","fetch"],transformRequest:[function(t,r){const s=r.getContentType()||"",o=s.indexOf("application/json")>-1,i=d.isObject(t);if(i&&d.isHTMLForm(t)&&(t=new FormData(t)),d.isFormData(t))return o?JSON.stringify(_t(t)):t;if(d.isArrayBuffer(t)||d.isBuffer(t)||d.isStream(t)||d.isFile(t)||d.isBlob(t)||d.isReadableStream(t))return t;if(d.isArrayBufferView(t))return t.buffer;if(d.isURLSearchParams(t))return r.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let c;if(i){if(s.indexOf("application/x-www-form-urlencoded")>-1)return rr(t,this.formSerializer).toString();if((c=d.isFileList(t))||s.indexOf("multipart/form-data")>-1){const g=this.env&&this.env.FormData;return Le(c?{"files[]":t}:t,g&&new g,this.formSerializer)}}return i||o?(r.setContentType("application/json",!1),ar(t)):t}],transformResponse:[function(t){const r=this.transitional||Oe.transitional,s=r&&r.forcedJSONParsing,o=this.responseType==="json";if(d.isResponse(t)||d.isReadableStream(t))return t;if(t&&d.isString(t)&&(s&&!this.responseType||o)){const a=!(r&&r.silentJSONParsing)&&o;try{return JSON.parse(t,this.parseReviver)}catch(c){if(a)throw c.name==="SyntaxError"?A.from(c,A.ERR_BAD_RESPONSE,this,null,this.response):c}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:ee.classes.FormData,Blob:ee.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};d.forEach(["delete","get","head","post","put","patch"],e=>{Oe.headers[e]={}});const ir=d.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),lr=e=>{const t={};let r,s,o;return e&&e.split(`
23
+ `).forEach(function(a){o=a.indexOf(":"),r=a.substring(0,o).trim().toLowerCase(),s=a.substring(o+1).trim(),!(!r||t[r]&&ir[r])&&(r==="set-cookie"?t[r]?t[r].push(s):t[r]=[s]:t[r]=t[r]?t[r]+", "+s:s)}),t},Pt=Symbol("internals");function _e(e){return e&&String(e).trim().toLowerCase()}function De(e){return e===!1||e==null?e:d.isArray(e)?e.map(De):String(e)}function cr(e){const t=Object.create(null),r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let s;for(;s=r.exec(e);)t[s[1]]=s[2];return t}const dr=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function Xe(e,t,r,s,o){if(d.isFunction(s))return s.call(this,t,r);if(o&&(t=r),!!d.isString(t)){if(d.isString(s))return t.indexOf(s)!==-1;if(d.isRegExp(s))return s.test(t)}}function ur(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,r,s)=>r.toUpperCase()+s)}function pr(e,t){const r=d.toCamelCase(" "+t);["get","set","has"].forEach(s=>{Object.defineProperty(e,s+r,{value:function(o,i,a){return this[s].call(this,t,o,i,a)},configurable:!0})})}let ne=class{constructor(t){t&&this.set(t)}set(t,r,s){const o=this;function i(c,g,p){const l=_e(g);if(!l)throw new Error("header name must be a non-empty string");const m=d.findKey(o,l);(!m||o[m]===void 0||p===!0||p===void 0&&o[m]!==!1)&&(o[m||g]=De(c))}const a=(c,g)=>d.forEach(c,(p,l)=>i(p,l,g));if(d.isPlainObject(t)||t instanceof this.constructor)a(t,r);else if(d.isString(t)&&(t=t.trim())&&!dr(t))a(lr(t),r);else if(d.isObject(t)&&d.isIterable(t)){let c={},g,p;for(const l of t){if(!d.isArray(l))throw TypeError("Object iterator must return a key-value pair");c[p=l[0]]=(g=c[p])?d.isArray(g)?[...g,l[1]]:[g,l[1]]:l[1]}a(c,r)}else t!=null&&i(r,t,s);return this}get(t,r){if(t=_e(t),t){const s=d.findKey(this,t);if(s){const o=this[s];if(!r)return o;if(r===!0)return cr(o);if(d.isFunction(r))return r.call(this,o,s);if(d.isRegExp(r))return r.exec(o);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,r){if(t=_e(t),t){const s=d.findKey(this,t);return!!(s&&this[s]!==void 0&&(!r||Xe(this,this[s],s,r)))}return!1}delete(t,r){const s=this;let o=!1;function i(a){if(a=_e(a),a){const c=d.findKey(s,a);c&&(!r||Xe(s,s[c],c,r))&&(delete s[c],o=!0)}}return d.isArray(t)?t.forEach(i):i(t),o}clear(t){const r=Object.keys(this);let s=r.length,o=!1;for(;s--;){const i=r[s];(!t||Xe(this,this[i],i,t,!0))&&(delete this[i],o=!0)}return o}normalize(t){const r=this,s={};return d.forEach(this,(o,i)=>{const a=d.findKey(s,i);if(a){r[a]=De(o),delete r[i];return}const c=t?ur(i):String(i).trim();c!==i&&delete r[i],r[c]=De(o),s[c]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const r=Object.create(null);return d.forEach(this,(s,o)=>{s!=null&&s!==!1&&(r[o]=t&&d.isArray(s)?s.join(", "):s)}),r}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,r])=>t+": "+r).join(`
24
+ `)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...r){const s=new this(t);return r.forEach(o=>s.set(o)),s}static accessor(t){const s=(this[Pt]=this[Pt]={accessors:{}}).accessors,o=this.prototype;function i(a){const c=_e(a);s[c]||(pr(o,a),s[c]=!0)}return d.isArray(t)?t.forEach(i):i(t),this}};ne.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),d.reduceDescriptors(ne.prototype,({value:e},t)=>{let r=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(s){this[r]=s}}}),d.freezeMethods(ne);function Ge(e,t){const r=this||Oe,s=t||r,o=ne.from(s.headers);let i=s.data;return d.forEach(e,function(c){i=c.call(r,i,o.normalize(),t?t.status:void 0)}),o.normalize(),i}function zt(e){return!!(e&&e.__CANCEL__)}function be(e,t,r){A.call(this,e??"canceled",A.ERR_CANCELED,t,r),this.name="CanceledError"}d.inherits(be,A,{__CANCEL__:!0});function At(e,t,r){const s=r.config.validateStatus;!r.status||!s||s(r.status)?e(r):t(new A("Request failed with status code "+r.status,[A.ERR_BAD_REQUEST,A.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r))}function fr(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function xr(e,t){e=e||10;const r=new Array(e),s=new Array(e);let o=0,i=0,a;return t=t!==void 0?t:1e3,function(g){const p=Date.now(),l=s[i];a||(a=p),r[o]=g,s[o]=p;let m=i,O=0;for(;m!==o;)O+=r[m++],m=m%e;if(o=(o+1)%e,o===i&&(i=(i+1)%e),p-a<t)return;const T=l&&p-l;return T?Math.round(O*1e3/T):void 0}}function hr(e,t){let r=0,s=1e3/t,o,i;const a=(p,l=Date.now())=>{r=l,o=null,i&&(clearTimeout(i),i=null),e(...p)};return[(...p)=>{const l=Date.now(),m=l-r;m>=s?a(p,l):(o=p,i||(i=setTimeout(()=>{i=null,a(o)},s-m)))},()=>o&&a(o)]}const Ue=(e,t,r=3)=>{let s=0;const o=xr(50,250);return hr(i=>{const a=i.loaded,c=i.lengthComputable?i.total:void 0,g=a-s,p=o(g),l=a<=c;s=a;const m={loaded:a,total:c,progress:c?a/c:void 0,bytes:g,rate:p||void 0,estimated:p&&c&&l?(c-a)/p:void 0,event:i,lengthComputable:c!=null,[t?"download":"upload"]:!0};e(m)},r)},It=(e,t)=>{const r=e!=null;return[s=>t[0]({lengthComputable:r,total:e,loaded:s}),t[1]]},Nt=e=>(...t)=>d.asap(()=>e(...t)),gr=ee.hasStandardBrowserEnv?((e,t)=>r=>(r=new URL(r,ee.origin),e.protocol===r.protocol&&e.host===r.host&&(t||e.port===r.port)))(new URL(ee.origin),ee.navigator&&/(msie|trident)/i.test(ee.navigator.userAgent)):()=>!0,mr=ee.hasStandardBrowserEnv?{write(e,t,r,s,o,i){const a=[e+"="+encodeURIComponent(t)];d.isNumber(r)&&a.push("expires="+new Date(r).toGMTString()),d.isString(s)&&a.push("path="+s),d.isString(o)&&a.push("domain="+o),i===!0&&a.push("secure"),document.cookie=a.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function yr(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function br(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function Ft(e,t,r){let s=!yr(t);return e&&(s||r==!1)?br(e,t):t}const Lt=e=>e instanceof ne?{...e}:e;function pe(e,t){t=t||{};const r={};function s(p,l,m,O){return d.isPlainObject(p)&&d.isPlainObject(l)?d.merge.call({caseless:O},p,l):d.isPlainObject(l)?d.merge({},l):d.isArray(l)?l.slice():l}function o(p,l,m,O){if(d.isUndefined(l)){if(!d.isUndefined(p))return s(void 0,p,m,O)}else return s(p,l,m,O)}function i(p,l){if(!d.isUndefined(l))return s(void 0,l)}function a(p,l){if(d.isUndefined(l)){if(!d.isUndefined(p))return s(void 0,p)}else return s(void 0,l)}function c(p,l,m){if(m in t)return s(p,l);if(m in e)return s(void 0,p)}const g={url:i,method:i,data:i,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,withXSRFToken:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:c,headers:(p,l,m)=>o(Lt(p),Lt(l),m,!0)};return d.forEach(Object.keys({...e,...t}),function(l){const m=g[l]||o,O=m(e[l],t[l],l);d.isUndefined(O)&&m!==c||(r[l]=O)}),r}const Dt=e=>{const t=pe({},e);let{data:r,withXSRFToken:s,xsrfHeaderName:o,xsrfCookieName:i,headers:a,auth:c}=t;if(t.headers=a=ne.from(a),t.url=Rt(Ft(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),c&&a.set("Authorization","Basic "+btoa((c.username||"")+":"+(c.password?unescape(encodeURIComponent(c.password)):""))),d.isFormData(r)){if(ee.hasStandardBrowserEnv||ee.hasStandardBrowserWebWorkerEnv)a.setContentType(void 0);else if(d.isFunction(r.getHeaders)){const g=r.getHeaders(),p=["content-type","content-length"];Object.entries(g).forEach(([l,m])=>{p.includes(l.toLowerCase())&&a.set(l,m)})}}if(ee.hasStandardBrowserEnv&&(s&&d.isFunction(s)&&(s=s(t)),s||s!==!1&&gr(t.url))){const g=o&&i&&mr.read(i);g&&a.set(o,g)}return t},wr=typeof XMLHttpRequest<"u"&&function(e){return new Promise(function(r,s){const o=Dt(e);let i=o.data;const a=ne.from(o.headers).normalize();let{responseType:c,onUploadProgress:g,onDownloadProgress:p}=o,l,m,O,T,u;function b(){T&&T(),u&&u(),o.cancelToken&&o.cancelToken.unsubscribe(l),o.signal&&o.signal.removeEventListener("abort",l)}let h=new XMLHttpRequest;h.open(o.method.toUpperCase(),o.url,!0),h.timeout=o.timeout;function F(){if(!h)return;const _=ne.from("getAllResponseHeaders"in h&&h.getAllResponseHeaders()),M={data:!c||c==="text"||c==="json"?h.responseText:h.response,status:h.status,statusText:h.statusText,headers:_,config:e,request:h};At(function(P){r(P),b()},function(P){s(P),b()},M),h=null}"onloadend"in h?h.onloadend=F:h.onreadystatechange=function(){!h||h.readyState!==4||h.status===0&&!(h.responseURL&&h.responseURL.indexOf("file:")===0)||setTimeout(F)},h.onabort=function(){h&&(s(new A("Request aborted",A.ECONNABORTED,e,h)),h=null)},h.onerror=function(C){const M=C&&C.message?C.message:"Network Error",y=new A(M,A.ERR_NETWORK,e,h);y.event=C||null,s(y),h=null},h.ontimeout=function(){let C=o.timeout?"timeout of "+o.timeout+"ms exceeded":"timeout exceeded";const M=o.transitional||Ot;o.timeoutErrorMessage&&(C=o.timeoutErrorMessage),s(new A(C,M.clarifyTimeoutError?A.ETIMEDOUT:A.ECONNABORTED,e,h)),h=null},i===void 0&&a.setContentType(null),"setRequestHeader"in h&&d.forEach(a.toJSON(),function(C,M){h.setRequestHeader(M,C)}),d.isUndefined(o.withCredentials)||(h.withCredentials=!!o.withCredentials),c&&c!=="json"&&(h.responseType=o.responseType),p&&([O,u]=Ue(p,!0),h.addEventListener("progress",O)),g&&h.upload&&([m,T]=Ue(g),h.upload.addEventListener("progress",m),h.upload.addEventListener("loadend",T)),(o.cancelToken||o.signal)&&(l=_=>{h&&(s(!_||_.type?new be(null,e,h):_),h.abort(),h=null)},o.cancelToken&&o.cancelToken.subscribe(l),o.signal&&(o.signal.aborted?l():o.signal.addEventListener("abort",l)));const I=fr(o.url);if(I&&ee.protocols.indexOf(I)===-1){s(new A("Unsupported protocol "+I+":",A.ERR_BAD_REQUEST,e));return}h.send(i||null)})},Sr=(e,t)=>{const{length:r}=e=e?e.filter(Boolean):[];if(t||r){let s=new AbortController,o;const i=function(p){if(!o){o=!0,c();const l=p instanceof Error?p:this.reason;s.abort(l instanceof A?l:new be(l instanceof Error?l.message:l))}};let a=t&&setTimeout(()=>{a=null,i(new A(`timeout ${t} of ms exceeded`,A.ETIMEDOUT))},t);const c=()=>{e&&(a&&clearTimeout(a),a=null,e.forEach(p=>{p.unsubscribe?p.unsubscribe(i):p.removeEventListener("abort",i)}),e=null)};e.forEach(p=>p.addEventListener("abort",i));const{signal:g}=s;return g.unsubscribe=()=>d.asap(c),g}},jr=function*(e,t){let r=e.byteLength;if(r<t){yield e;return}let s=0,o;for(;s<r;)o=s+t,yield e.slice(s,o),s=o},vr=async function*(e,t){for await(const r of kr(e))yield*jr(r,t)},kr=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}const t=e.getReader();try{for(;;){const{done:r,value:s}=await t.read();if(r)break;yield s}}finally{await t.cancel()}},Ut=(e,t,r,s)=>{const o=vr(e,t);let i=0,a,c=g=>{a||(a=!0,s&&s(g))};return new ReadableStream({async pull(g){try{const{done:p,value:l}=await o.next();if(p){c(),g.close();return}let m=l.byteLength;if(r){let O=i+=m;r(O)}g.enqueue(new Uint8Array(l))}catch(p){throw c(p),p}},cancel(g){return c(g),o.return()}},{highWaterMark:2})},Mt=64*1024,{isFunction:Me}=d,Cr=(({Request:e,Response:t})=>({Request:e,Response:t}))(d.global),{ReadableStream:Bt,TextEncoder:Wt}=d.global,Ht=(e,...t)=>{try{return!!e(...t)}catch{return!1}},Er=e=>{e=d.merge.call({skipUndefined:!0},Cr,e);const{fetch:t,Request:r,Response:s}=e,o=t?Me(t):typeof fetch=="function",i=Me(r),a=Me(s);if(!o)return!1;const c=o&&Me(Bt),g=o&&(typeof Wt=="function"?(u=>b=>u.encode(b))(new Wt):async u=>new Uint8Array(await new r(u).arrayBuffer())),p=i&&c&&Ht(()=>{let u=!1;const b=new r(ee.origin,{body:new Bt,method:"POST",get duplex(){return u=!0,"half"}}).headers.has("Content-Type");return u&&!b}),l=a&&c&&Ht(()=>d.isReadableStream(new s("").body)),m={stream:l&&(u=>u.body)};o&&["text","arrayBuffer","blob","formData","stream"].forEach(u=>{!m[u]&&(m[u]=(b,h)=>{let F=b&&b[u];if(F)return F.call(b);throw new A(`Response type '${u}' is not supported`,A.ERR_NOT_SUPPORT,h)})});const O=async u=>{if(u==null)return 0;if(d.isBlob(u))return u.size;if(d.isSpecCompliantForm(u))return(await new r(ee.origin,{method:"POST",body:u}).arrayBuffer()).byteLength;if(d.isArrayBufferView(u)||d.isArrayBuffer(u))return u.byteLength;if(d.isURLSearchParams(u)&&(u=u+""),d.isString(u))return(await g(u)).byteLength},T=async(u,b)=>{const h=d.toFiniteNumber(u.getContentLength());return h??O(b)};return async u=>{let{url:b,method:h,data:F,signal:I,cancelToken:_,timeout:C,onDownloadProgress:M,onUploadProgress:y,responseType:P,headers:w,withCredentials:D="same-origin",fetchOptions:K}=Dt(u),L=t||fetch;P=P?(P+"").toLowerCase():"text";let J=Sr([I,_&&_.toAbortSignal()],C),Q=null;const v=J&&J.unsubscribe&&(()=>{J.unsubscribe()});let Z;try{if(y&&p&&h!=="get"&&h!=="head"&&(Z=await T(w,F))!==0){let k=new r(b,{method:"POST",body:F,duplex:"half"}),N;if(d.isFormData(F)&&(N=k.headers.get("content-type"))&&w.setContentType(N),k.body){const[W,f]=It(Z,Ue(Nt(y)));F=Ut(k.body,Mt,W,f)}}d.isString(D)||(D=D?"include":"omit");const B=i&&"credentials"in r.prototype,U={...K,signal:J,method:h.toUpperCase(),headers:w.normalize().toJSON(),body:F,duplex:"half",credentials:B?D:void 0};Q=i&&new r(b,U);let R=await(i?L(Q,K):L(b,U));const Y=l&&(P==="stream"||P==="response");if(l&&(M||Y&&v)){const k={};["status","statusText","headers"].forEach(j=>{k[j]=R[j]});const N=d.toFiniteNumber(R.headers.get("content-length")),[W,f]=M&&It(N,Ue(Nt(M),!0))||[];R=new s(Ut(R.body,Mt,W,()=>{f&&f(),v&&v()}),k)}P=P||"text";let x=await m[d.findKey(m,P)||"text"](R,u);return!Y&&v&&v(),await new Promise((k,N)=>{At(k,N,{data:x,headers:ne.from(R.headers),status:R.status,statusText:R.statusText,config:u,request:Q})})}catch(B){throw v&&v(),B&&B.name==="TypeError"&&/Load failed|fetch/i.test(B.message)?Object.assign(new A("Network Error",A.ERR_NETWORK,u,Q),{cause:B.cause||B}):A.from(B,B&&B.code,u,Q)}}},Rr=new Map,Vt=e=>{let t=e?e.env:{};const{fetch:r,Request:s,Response:o}=t,i=[s,o,r];let a=i.length,c=a,g,p,l=Rr;for(;c--;)g=i[c],p=l.get(g),p===void 0&&l.set(g,p=c?new Map:Er(t)),l=p;return p};Vt();const Ze={http:qn,xhr:wr,fetch:{get:Vt}};d.forEach(Ze,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const $t=e=>`- ${e}`,Tr=e=>d.isFunction(e)||e===null||e===!1,Yt={getAdapter:(e,t)=>{e=d.isArray(e)?e:[e];const{length:r}=e;let s,o;const i={};for(let a=0;a<r;a++){s=e[a];let c;if(o=s,!Tr(s)&&(o=Ze[(c=String(s)).toLowerCase()],o===void 0))throw new A(`Unknown adapter '${c}'`);if(o&&(d.isFunction(o)||(o=o.get(t))))break;i[c||"#"+a]=o}if(!o){const a=Object.entries(i).map(([g,p])=>`adapter ${g} `+(p===!1?"is not supported by the environment":"is not available in the build"));let c=r?a.length>1?`since :
25
+ `+a.map($t).join(`
26
+ `):" "+$t(a[0]):"as no adapter specified";throw new A("There is no suitable adapter to dispatch the request "+c,"ERR_NOT_SUPPORT")}return o},adapters:Ze};function Qe(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new be(null,e)}function Jt(e){return Qe(e),e.headers=ne.from(e.headers),e.data=Ge.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),Yt.getAdapter(e.adapter||Oe.adapter,e)(e).then(function(s){return Qe(e),s.data=Ge.call(e,e.transformResponse,s),s.headers=ne.from(s.headers),s},function(s){return zt(s)||(Qe(e),s&&s.response&&(s.response.data=Ge.call(e,e.transformResponse,s.response),s.response.headers=ne.from(s.response.headers))),Promise.reject(s)})}const Kt="1.12.2",Be={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{Be[e]=function(s){return typeof s===e||"a"+(t<1?"n ":" ")+e}});const qt={};Be.transitional=function(t,r,s){function o(i,a){return"[Axios v"+Kt+"] Transitional option '"+i+"'"+a+(s?". "+s:"")}return(i,a,c)=>{if(t===!1)throw new A(o(a," has been removed"+(r?" in "+r:"")),A.ERR_DEPRECATED);return r&&!qt[a]&&(qt[a]=!0,console.warn(o(a," has been deprecated since v"+r+" and will be removed in the near future"))),t?t(i,a,c):!0}},Be.spelling=function(t){return(r,s)=>(console.warn(`${s} is likely a misspelling of ${t}`),!0)};function Or(e,t,r){if(typeof e!="object")throw new A("options must be an object",A.ERR_BAD_OPTION_VALUE);const s=Object.keys(e);let o=s.length;for(;o-- >0;){const i=s[o],a=t[i];if(a){const c=e[i],g=c===void 0||a(c,i,e);if(g!==!0)throw new A("option "+i+" must be "+g,A.ERR_BAD_OPTION_VALUE);continue}if(r!==!0)throw new A("Unknown option "+i,A.ERR_BAD_OPTION)}}const We={assertOptions:Or,validators:Be},ie=We.validators;let fe=class{constructor(t){this.defaults=t||{},this.interceptors={request:new Tt,response:new Tt}}async request(t,r){try{return await this._request(t,r)}catch(s){if(s instanceof Error){let o={};Error.captureStackTrace?Error.captureStackTrace(o):o=new Error;const i=o.stack?o.stack.replace(/^.+\n/,""):"";try{s.stack?i&&!String(s.stack).endsWith(i.replace(/^.+\n.+\n/,""))&&(s.stack+=`
27
+ `+i):s.stack=i}catch{}}throw s}}_request(t,r){typeof t=="string"?(r=r||{},r.url=t):r=t||{},r=pe(this.defaults,r);const{transitional:s,paramsSerializer:o,headers:i}=r;s!==void 0&&We.assertOptions(s,{silentJSONParsing:ie.transitional(ie.boolean),forcedJSONParsing:ie.transitional(ie.boolean),clarifyTimeoutError:ie.transitional(ie.boolean)},!1),o!=null&&(d.isFunction(o)?r.paramsSerializer={serialize:o}:We.assertOptions(o,{encode:ie.function,serialize:ie.function},!0)),r.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?r.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:r.allowAbsoluteUrls=!0),We.assertOptions(r,{baseUrl:ie.spelling("baseURL"),withXsrfToken:ie.spelling("withXSRFToken")},!0),r.method=(r.method||this.defaults.method||"get").toLowerCase();let a=i&&d.merge(i.common,i[r.method]);i&&d.forEach(["delete","get","head","post","put","patch","common"],u=>{delete i[u]}),r.headers=ne.concat(a,i);const c=[];let g=!0;this.interceptors.request.forEach(function(b){typeof b.runWhen=="function"&&b.runWhen(r)===!1||(g=g&&b.synchronous,c.unshift(b.fulfilled,b.rejected))});const p=[];this.interceptors.response.forEach(function(b){p.push(b.fulfilled,b.rejected)});let l,m=0,O;if(!g){const u=[Jt.bind(this),void 0];for(u.unshift(...c),u.push(...p),O=u.length,l=Promise.resolve(r);m<O;)l=l.then(u[m++],u[m++]);return l}O=c.length;let T=r;for(;m<O;){const u=c[m++],b=c[m++];try{T=u(T)}catch(h){b.call(this,h);break}}try{l=Jt.call(this,T)}catch(u){return Promise.reject(u)}for(m=0,O=p.length;m<O;)l=l.then(p[m++],p[m++]);return l}getUri(t){t=pe(this.defaults,t);const r=Ft(t.baseURL,t.url,t.allowAbsoluteUrls);return Rt(r,t.params,t.paramsSerializer)}};d.forEach(["delete","get","head","options"],function(t){fe.prototype[t]=function(r,s){return this.request(pe(s||{},{method:t,url:r,data:(s||{}).data}))}}),d.forEach(["post","put","patch"],function(t){function r(s){return function(i,a,c){return this.request(pe(c||{},{method:t,headers:s?{"Content-Type":"multipart/form-data"}:{},url:i,data:a}))}}fe.prototype[t]=r(),fe.prototype[t+"Form"]=r(!0)});let _r=class an{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let r;this.promise=new Promise(function(i){r=i});const s=this;this.promise.then(o=>{if(!s._listeners)return;let i=s._listeners.length;for(;i-- >0;)s._listeners[i](o);s._listeners=null}),this.promise.then=o=>{let i;const a=new Promise(c=>{s.subscribe(c),i=c}).then(o);return a.cancel=function(){s.unsubscribe(i)},a},t(function(i,a,c){s.reason||(s.reason=new be(i,a,c),r(s.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const r=this._listeners.indexOf(t);r!==-1&&this._listeners.splice(r,1)}toAbortSignal(){const t=new AbortController,r=s=>{t.abort(s)};return this.subscribe(r),t.signal.unsubscribe=()=>this.unsubscribe(r),t.signal}static source(){let t;return{token:new an(function(o){t=o}),cancel:t}}};function Pr(e){return function(r){return e.apply(null,r)}}function zr(e){return d.isObject(e)&&e.isAxiosError===!0}const et={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(et).forEach(([e,t])=>{et[t]=e});function Xt(e){const t=new fe(e),r=pt(fe.prototype.request,t);return d.extend(r,fe.prototype,t,{allOwnKeys:!0}),d.extend(r,t,null,{allOwnKeys:!0}),r.create=function(o){return Xt(pe(e,o))},r}const V=Xt(Oe);V.Axios=fe,V.CanceledError=be,V.CancelToken=_r,V.isCancel=zt,V.VERSION=Kt,V.toFormData=Le,V.AxiosError=A,V.Cancel=V.CanceledError,V.all=function(t){return Promise.all(t)},V.spread=Pr,V.isAxiosError=zr,V.mergeConfig=pe,V.AxiosHeaders=ne,V.formToJSON=e=>_t(d.isHTMLForm(e)?new FormData(e):e),V.getAdapter=Yt.getAdapter,V.HttpStatusCode=et,V.default=V;const{Axios:gs,AxiosError:ms,CanceledError:ys,isCancel:bs,CancelToken:ws,VERSION:Ss,all:js,Cancel:vs,isAxiosError:ks,spread:Cs,toFormData:Es,AxiosHeaders:Rs,HttpStatusCode:Ts,formToJSON:Os,getAdapter:_s,mergeConfig:Ps}=V,Ar=async(e,t)=>{throw new Error("API key is required for signup")};/**
28
+ * @license lucide-react v0.544.0 - ISC
29
+ *
30
+ * This source code is licensed under the ISC license.
31
+ * See the LICENSE file in the root directory of this source tree.
32
+ */const Ir=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Nr=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,r,s)=>s?s.toUpperCase():r.toLowerCase()),Gt=e=>{const t=Nr(e);return t.charAt(0).toUpperCase()+t.slice(1)},Zt=(...e)=>e.filter((t,r,s)=>!!t&&t.trim()!==""&&s.indexOf(t)===r).join(" ").trim(),Fr=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0};/**
33
+ * @license lucide-react v0.544.0 - ISC
34
+ *
35
+ * This source code is licensed under the ISC license.
36
+ * See the LICENSE file in the root directory of this source tree.
37
+ */var Lr={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
38
+ * @license lucide-react v0.544.0 - ISC
39
+ *
40
+ * This source code is licensed under the ISC license.
41
+ * See the LICENSE file in the root directory of this source tree.
42
+ */const Dr=S.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:r=2,absoluteStrokeWidth:s,className:o="",children:i,iconNode:a,...c},g)=>S.createElement("svg",{ref:g,...Lr,width:t,height:t,stroke:e,strokeWidth:s?Number(r)*24/Number(t):r,className:Zt("lucide",o),...!i&&!Fr(c)&&{"aria-hidden":"true"},...c},[...a.map(([p,l])=>S.createElement(p,l)),...Array.isArray(i)?i:[i]]));/**
43
+ * @license lucide-react v0.544.0 - ISC
44
+ *
45
+ * This source code is licensed under the ISC license.
46
+ * See the LICENSE file in the root directory of this source tree.
47
+ */const H=(e,t)=>{const r=S.forwardRef(({className:s,...o},i)=>S.createElement(Dr,{ref:i,iconNode:t,className:Zt(`lucide-${Ir(Gt(e))}`,`lucide-${e}`,s),...o}));return r.displayName=Gt(e),r};/**
48
+ * @license lucide-react v0.544.0 - ISC
49
+ *
50
+ * This source code is licensed under the ISC license.
51
+ * See the LICENSE file in the root directory of this source tree.
52
+ */const tt=H("camera",[["path",{d:"M13.997 4a2 2 0 0 1 1.76 1.05l.486.9A2 2 0 0 0 18.003 7H20a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V9a2 2 0 0 1 2-2h1.997a2 2 0 0 0 1.759-1.048l.489-.904A2 2 0 0 1 10.004 4z",key:"18u6gg"}],["circle",{cx:"12",cy:"13",r:"3",key:"1vg3eu"}]]);/**
53
+ * @license lucide-react v0.544.0 - ISC
54
+ *
55
+ * This source code is licensed under the ISC license.
56
+ * See the LICENSE file in the root directory of this source tree.
57
+ */const Ur=H("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
58
+ * @license lucide-react v0.544.0 - ISC
59
+ *
60
+ * This source code is licensed under the ISC license.
61
+ * See the LICENSE file in the root directory of this source tree.
62
+ */const le=H("circle-alert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]);/**
63
+ * @license lucide-react v0.544.0 - ISC
64
+ *
65
+ * This source code is licensed under the ISC license.
66
+ * See the LICENSE file in the root directory of this source tree.
67
+ */const xe=H("circle-check-big",[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]]);/**
68
+ * @license lucide-react v0.544.0 - ISC
69
+ *
70
+ * This source code is licensed under the ISC license.
71
+ * See the LICENSE file in the root directory of this source tree.
72
+ */const nt=H("circle-check",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/**
73
+ * @license lucide-react v0.544.0 - ISC
74
+ *
75
+ * This source code is licensed under the ISC license.
76
+ * See the LICENSE file in the root directory of this source tree.
77
+ */const Mr=H("database",[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]]);/**
78
+ * @license lucide-react v0.544.0 - ISC
79
+ *
80
+ * This source code is licensed under the ISC license.
81
+ * See the LICENSE file in the root directory of this source tree.
82
+ */const Br=H("ellipsis-vertical",[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"12",cy:"5",r:"1",key:"gxeob9"}],["circle",{cx:"12",cy:"19",r:"1",key:"lyex9k"}]]);/**
83
+ * @license lucide-react v0.544.0 - ISC
84
+ *
85
+ * This source code is licensed under the ISC license.
86
+ * See the LICENSE file in the root directory of this source tree.
87
+ */const rt=H("eye-off",[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]]);/**
88
+ * @license lucide-react v0.544.0 - ISC
89
+ *
90
+ * This source code is licensed under the ISC license.
91
+ * See the LICENSE file in the root directory of this source tree.
92
+ */const st=H("eye",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/**
93
+ * @license lucide-react v0.544.0 - ISC
94
+ *
95
+ * This source code is licensed under the ISC license.
96
+ * See the LICENSE file in the root directory of this source tree.
97
+ */const Wr=H("house",[["path",{d:"M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8",key:"5wwlr5"}],["path",{d:"M3 10a2 2 0 0 1 .709-1.528l7-6a2 2 0 0 1 2.582 0l7 6A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z",key:"r6nss1"}]]);/**
98
+ * @license lucide-react v0.544.0 - ISC
99
+ *
100
+ * This source code is licensed under the ISC license.
101
+ * See the LICENSE file in the root directory of this source tree.
102
+ */const Qt=H("image",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]]);/**
103
+ * @license lucide-react v0.544.0 - ISC
104
+ *
105
+ * This source code is licensed under the ISC license.
106
+ * See the LICENSE file in the root directory of this source tree.
107
+ */const en=H("key-round",[["path",{d:"M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z",key:"1s6t7t"}],["circle",{cx:"16.5",cy:"7.5",r:".5",fill:"currentColor",key:"w0ekpg"}]]);/**
108
+ * @license lucide-react v0.544.0 - ISC
109
+ *
110
+ * This source code is licensed under the ISC license.
111
+ * See the LICENSE file in the root directory of this source tree.
112
+ */const tn=H("key",[["path",{d:"m15.5 7.5 2.3 2.3a1 1 0 0 0 1.4 0l2.1-2.1a1 1 0 0 0 0-1.4L19 4",key:"g0fldk"}],["path",{d:"m21 2-9.6 9.6",key:"1j0ho8"}],["circle",{cx:"7.5",cy:"15.5",r:"5.5",key:"yqb3hr"}]]);/**
113
+ * @license lucide-react v0.544.0 - ISC
114
+ *
115
+ * This source code is licensed under the ISC license.
116
+ * See the LICENSE file in the root directory of this source tree.
117
+ */const Hr=H("link-2",[["path",{d:"M9 17H7A5 5 0 0 1 7 7h2",key:"8i5ue5"}],["path",{d:"M15 7h2a5 5 0 1 1 0 10h-2",key:"1b9ql8"}],["line",{x1:"8",x2:"16",y1:"12",y2:"12",key:"1jonct"}]]);/**
118
+ * @license lucide-react v0.544.0 - ISC
119
+ *
120
+ * This source code is licensed under the ISC license.
121
+ * See the LICENSE file in the root directory of this source tree.
122
+ */const ce=H("loader-circle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);/**
123
+ * @license lucide-react v0.544.0 - ISC
124
+ *
125
+ * This source code is licensed under the ISC license.
126
+ * See the LICENSE file in the root directory of this source tree.
127
+ */const Vr=H("loader",[["path",{d:"M12 2v4",key:"3427ic"}],["path",{d:"m16.2 7.8 2.9-2.9",key:"r700ao"}],["path",{d:"M18 12h4",key:"wj9ykh"}],["path",{d:"m16.2 16.2 2.9 2.9",key:"1bxg5t"}],["path",{d:"M12 18v4",key:"jadmvz"}],["path",{d:"m4.9 19.1 2.9-2.9",key:"bwix9q"}],["path",{d:"M2 12h4",key:"j09sii"}],["path",{d:"m4.9 4.9 2.9 2.9",key:"giyufr"}]]);/**
128
+ * @license lucide-react v0.544.0 - ISC
129
+ *
130
+ * This source code is licensed under the ISC license.
131
+ * See the LICENSE file in the root directory of this source tree.
132
+ */const we=H("lock",[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]]);/**
133
+ * @license lucide-react v0.544.0 - ISC
134
+ *
135
+ * This source code is licensed under the ISC license.
136
+ * See the LICENSE file in the root directory of this source tree.
137
+ */const ot=H("log-out",[["path",{d:"m16 17 5-5-5-5",key:"1bji2h"}],["path",{d:"M21 12H9",key:"dn1m92"}],["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}]]);/**
138
+ * @license lucide-react v0.544.0 - ISC
139
+ *
140
+ * This source code is licensed under the ISC license.
141
+ * See the LICENSE file in the root directory of this source tree.
142
+ */const he=H("mail",[["path",{d:"m22 7-8.991 5.727a2 2 0 0 1-2.009 0L2 7",key:"132q7q"}],["rect",{x:"2",y:"4",width:"20",height:"16",rx:"2",key:"izxlao"}]]);/**
143
+ * @license lucide-react v0.544.0 - ISC
144
+ *
145
+ * This source code is licensed under the ISC license.
146
+ * See the LICENSE file in the root directory of this source tree.
147
+ */const $r=H("map-pin",[["path",{d:"M20 10c0 4.993-5.539 10.193-7.399 11.799a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 16 0",key:"1r0f0z"}],["circle",{cx:"12",cy:"10",r:"3",key:"ilqhr7"}]]);/**
148
+ * @license lucide-react v0.544.0 - ISC
149
+ *
150
+ * This source code is licensed under the ISC license.
151
+ * See the LICENSE file in the root directory of this source tree.
152
+ */const Yr=H("pen-line",[["path",{d:"M13 21h8",key:"1jsn5i"}],["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}]]);/**
153
+ * @license lucide-react v0.544.0 - ISC
154
+ *
155
+ * This source code is licensed under the ISC license.
156
+ * See the LICENSE file in the root directory of this source tree.
157
+ */const Jr=H("phone",[["path",{d:"M13.832 16.568a1 1 0 0 0 1.213-.303l.355-.465A2 2 0 0 1 17 15h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2A18 18 0 0 1 2 4a2 2 0 0 1 2-2h3a2 2 0 0 1 2 2v3a2 2 0 0 1-.8 1.6l-.468.351a1 1 0 0 0-.292 1.233 14 14 0 0 0 6.392 6.384",key:"9njp5v"}]]);/**
158
+ * @license lucide-react v0.544.0 - ISC
159
+ *
160
+ * This source code is licensed under the ISC license.
161
+ * See the LICENSE file in the root directory of this source tree.
162
+ */const Kr=H("save",[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]]);/**
163
+ * @license lucide-react v0.544.0 - ISC
164
+ *
165
+ * This source code is licensed under the ISC license.
166
+ * See the LICENSE file in the root directory of this source tree.
167
+ */const nn=H("send",[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]]);/**
168
+ * @license lucide-react v0.544.0 - ISC
169
+ *
170
+ * This source code is licensed under the ISC license.
171
+ * See the LICENSE file in the root directory of this source tree.
172
+ */const qr=H("settings",[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",key:"1i5ecw"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/**
173
+ * @license lucide-react v0.544.0 - ISC
174
+ *
175
+ * This source code is licensed under the ISC license.
176
+ * See the LICENSE file in the root directory of this source tree.
177
+ */const rn=H("shield",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}]]);/**
178
+ * @license lucide-react v0.544.0 - ISC
179
+ *
180
+ * This source code is licensed under the ISC license.
181
+ * See the LICENSE file in the root directory of this source tree.
182
+ */const He=H("trash-2",[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]]);/**
183
+ * @license lucide-react v0.544.0 - ISC
184
+ *
185
+ * This source code is licensed under the ISC license.
186
+ * See the LICENSE file in the root directory of this source tree.
187
+ */const sn=H("triangle-alert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);/**
188
+ * @license lucide-react v0.544.0 - ISC
189
+ *
190
+ * This source code is licensed under the ISC license.
191
+ * See the LICENSE file in the root directory of this source tree.
192
+ */const Xr=H("user-x",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["line",{x1:"17",x2:"22",y1:"8",y2:"13",key:"3nzzx3"}],["line",{x1:"22",x2:"17",y1:"8",y2:"13",key:"1swrse"}]]);/**
193
+ * @license lucide-react v0.544.0 - ISC
194
+ *
195
+ * This source code is licensed under the ISC license.
196
+ * See the LICENSE file in the root directory of this source tree.
197
+ */const Se=H("user",[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]]);/**
198
+ * @license lucide-react v0.544.0 - ISC
199
+ *
200
+ * This source code is licensed under the ISC license.
201
+ * See the LICENSE file in the root directory of this source tree.
202
+ */const Pe=H("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),Gr={baseUrl:"",apiKey:"",appId:""},je=()=>Gr,Zr=({logoUrl:e,logoLinkUrl:t,title:r="Create Your Account",subtitle:s="Join our platform today",footerText:o="Secure authentication powered by Neuctra Authix",primaryColor:i="#00C214",gradient:a="linear-gradient(135deg, #22c55e, #00C214)",darkMode:c=!0,showAvatar:g=!1,loginUrl:p,onSuccess:l,onError:m})=>{const{baseUrl:O,apiKey:T,appId:u}=je(),b={name:"",email:"",password:"",...g&&{avatarUrl:""}},[h,F]=S.useState(b),[I,_]=S.useState(!1),[C,M]=S.useState(!1),[y,P]=S.useState(null),[w,D]=S.useState({}),K=typeof window<"u"?window.innerWidth<768:!1,L=c?"#ffffff":"#111827",J=c?"#a1a1aa":"#6b7280",Q=c?"rgba(255,255,255,0.05)":"rgba(0,0,0,0.02)",v=c?"rgba(255,255,255,0.1)":"rgba(0,0,0,0.1)",Z=Y=>{const{name:x,value:k}=Y.target;F(N=>({...N,[x]:k})),w[x]&&D(N=>({...N,[x]:void 0}))},B=()=>{const Y={};return h.name.trim()||(Y.name="Name is required"),h.email.trim()?/\S+@\S+\.\S+/.test(h.email)||(Y.email="Invalid email address"):Y.email="Email is required",h.password?h.password.length<6&&(Y.password="Password must be at least 6 characters"):Y.password="Password is required",D(Y),Object.keys(Y).length===0},U=async Y=>{if(Y.preventDefault(),!!B()){M(!0),P(null);try{const x={...h,appId:u},k=await Ar(x,{baseUrl:O,apiKey:T});P({type:"success",text:"Account created successfully!"}),l&&l(k)}catch(x){const k=x.message||"Signup failed. Please try again.";P({type:"error",text:k}),m&&m(x)}finally{M(!1)}}},R={width:"100%",padding:K?"10px 14px 10px 44px":"10px 16px 10px 44px",backgroundColor:Q,border:`1px solid ${v}`,borderRadius:"10px",color:L,fontSize:"15px",outline:"none",transition:"all 0.2s ease",boxSizing:"border-box"};return n.jsxs("div",{style:{display:"flex",justifyContent:"center",alignItems:"center"},children:[n.jsxs("div",{style:{minWidth:K?"320px":"380px",width:"100%",maxWidth:K?"340px":"390px",display:"flex",flexDirection:"column",borderRadius:"10px",fontFamily:"'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif",backgroundColor:c?"#000000":"#ffffff",padding:K?"30px 24px":"18px 28px"},children:[n.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",marginBottom:"10px"},children:[e?n.jsx("a",{href:t||"/",target:"_self",rel:"noopener noreferrer",children:n.jsx("img",{src:e,alt:"Logo",style:{height:"50px",width:"50px",marginBottom:"10px"}})}):n.jsx(Se,{size:40,color:i,style:{marginBottom:"10px"}}),n.jsx("h2",{style:{fontSize:"24px",fontWeight:700,color:L,margin:0},children:r}),n.jsx("p",{style:{fontSize:"14px",color:J},children:s})]}),g&&h.avatarUrl&&n.jsx("div",{style:{display:"flex",justifyContent:"center",marginBottom:"16px"},children:n.jsx("img",{src:h.avatarUrl,alt:"Avatar Preview",style:{width:"60px",height:"60px",borderRadius:"50%",objectFit:"cover",border:`2px solid ${i}30`},onError:Y=>{const x=Y.target;x.style.display="none"}})}),n.jsxs("form",{onSubmit:U,style:{display:"flex",flexDirection:"column",gap:"14px"},children:[n.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"4px"},children:[n.jsx("label",{htmlFor:"signup-name",style:{fontSize:"14px",fontWeight:500,color:L},children:"Full Name"}),n.jsxs("div",{style:{position:"relative"},children:[n.jsx(Se,{size:20,style:{position:"absolute",left:"14px",top:"50%",transform:"translateY(-50%)",color:J}}),n.jsx("input",{id:"signup-name",type:"text",name:"name",placeholder:"Enter your full name",value:h.name,onChange:Z,style:{...R,borderColor:w.name?"#ef4444":v}})]}),w.name&&n.jsx("span",{style:{color:"#ef4444",fontSize:"12px",marginTop:"2px"},children:w.name})]}),n.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"4px"},children:[n.jsx("label",{htmlFor:"signup-email",style:{fontSize:"14px",fontWeight:500,color:L},children:"Email Address"}),n.jsxs("div",{style:{position:"relative"},children:[n.jsx(he,{size:20,style:{position:"absolute",left:"14px",top:"50%",transform:"translateY(-50%)",color:J}}),n.jsx("input",{id:"signup-email",type:"email",name:"email",placeholder:"Enter your email address",value:h.email,onChange:Z,style:{...R,borderColor:w.email?"#ef4444":v}})]}),w.email&&n.jsx("span",{style:{color:"#ef4444",fontSize:"12px",marginTop:"2px"},children:w.email})]}),n.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"4px"},children:[n.jsx("label",{htmlFor:"signup-password",style:{fontSize:"14px",fontWeight:500,color:L},children:"Password"}),n.jsxs("div",{style:{position:"relative"},children:[n.jsx(we,{size:20,style:{position:"absolute",left:"14px",top:"50%",transform:"translateY(-50%)",color:J}}),n.jsx("input",{id:"signup-password",type:I?"text":"password",name:"password",placeholder:"Create a secure password",value:h.password,onChange:Z,style:{...R,borderColor:w.password?"#ef4444":v}}),n.jsx("button",{type:"button",onClick:()=>_(!I),style:{position:"absolute",right:"14px",top:"50%",transform:"translateY(-50%)",background:"transparent",border:"none",color:J,cursor:"pointer",padding:"4px"},children:I?n.jsx(rt,{size:20}):n.jsx(st,{size:20})})]}),w.password&&n.jsx("span",{style:{color:"#ef4444",fontSize:"12px",marginTop:"2px"},children:w.password})]}),g&&n.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"4px"},children:[n.jsx("label",{htmlFor:"signup-avatar",style:{fontSize:"14px",fontWeight:500,color:L},children:"Avatar URL (Optional)"}),n.jsxs("div",{style:{position:"relative"},children:[n.jsx(Qt,{size:20,style:{position:"absolute",left:"14px",top:"50%",transform:"translateY(-50%)",color:J}}),n.jsx("input",{id:"signup-avatar",type:"url",name:"avatarUrl",placeholder:"Paste your avatar image URL",value:h.avatarUrl||"",onChange:Z,style:R})]})]}),p&&n.jsx("div",{style:{display:"flex",justifyContent:"space-between",fontSize:"13px"},children:n.jsx("a",{href:p,style:{color:i,textDecoration:"none",fontWeight:500},children:"Already have an account?"})}),y&&n.jsxs("div",{style:{padding:"12px",borderRadius:"12px",fontSize:"12px",display:"flex",alignItems:"start",gap:"10px",backgroundColor:y.type==="success"?`${i}15`:"rgba(239,68,68,0.1)",border:y.type==="success"?`1px solid ${i}30`:"1px solid rgba(239,68,68,0.3)",color:y.type==="success"?i:"#ef4444"},children:[y.type==="success"?n.jsx(xe,{size:20}):n.jsx(le,{size:20}),n.jsx("span",{children:y.text})]}),n.jsx("button",{type:"submit",disabled:C,style:{padding:"12px",background:a,color:"#fff",border:"none",borderRadius:"10px",fontSize:"14px",fontWeight:600,cursor:C?"not-allowed":"pointer",opacity:C?.7:1,display:"flex",alignItems:"center",justifyContent:"center",gap:"8px"},children:C?n.jsxs(n.Fragment,{children:[n.jsx(Vr,{size:18,style:{animation:"spin 1s linear infinite"}}),"Creating Account..."]}):"Create Account"})]}),n.jsxs("div",{style:{textAlign:"center",fontSize:"12px",color:J,marginTop:"16px",padding:"0 4px"},children:["Secure authentication powered by"," ",n.jsx("span",{style:{color:i,fontWeight:600},children:"Neuctra Authix"})]})]}),n.jsx("style",{children:`
203
+ @keyframes spin {
204
+ from { transform: rotate(0deg); }
205
+ to { transform: rotate(360deg); }
206
+ }
207
+ `})]})},Qr=async(e,t)=>{throw new Error("API key is required for login")},es=({logoUrl:e,logoLinkUrl:t,title:r="Sign In to Your Account",subtitle:s="Welcome back! Please enter your details",footerText:o="Secure authentication powered by Neuctra Authix",primaryColor:i="#00C214",gradient:a="linear-gradient(135deg, #22c55e, #00C214)",darkMode:c=!0,signupUrl:g,onSuccess:p,onError:l})=>{const{baseUrl:m,apiKey:O,appId:T}=je(),[u,b]=S.useState("login"),[h,F]=S.useState(1),[I,_]=S.useState(!1),[C,M]=S.useState(!1),[y,P]=S.useState(null),[w,D]=S.useState(""),[K,L]=S.useState(""),[J,Q]=S.useState({email:"",otp:"",newPassword:"",appId:T}),v=window.innerWidth<768,Z=c?"#ffffff":"#111827",B=c?"#a1a1aa":"#6b7280",U=c?"rgba(255,255,255,0.05)":"rgba(0,0,0,0.02)",R=c?"rgba(255,255,255,0.1)":"rgba(0,0,0,0.1)",Y=async f=>{f.preventDefault(),M(!0),P(null);try{const j=await Qr({email:w,password:K,appId:T},{baseUrl:m,apiKey:O});P({type:"success",text:`Welcome ${j.name}`}),p?.(j)}catch(j){const q=j.message||"Login failed";P({type:"error",text:q}),l?.(j)}finally{M(!1)}},x=f=>{Q({...J,[f.target.name]:f.target.value})},k=async f=>{f.preventDefault(),M(!0),P(null);try{const j=await V.post(`${m}/users/forgot-password`,{email:J.email,appId:T},{headers:{"x-api-key":O}});j.data.success?(F(2),P({type:"success",text:"OTP sent to your email"})):P({type:"error",text:j.data.message||"Failed to send OTP"})}catch(j){P({type:"error",text:j.response?.data?.message||"Something went wrong"})}finally{M(!1)}},N=async f=>{f.preventDefault(),M(!0),P(null);try{const j=await V.post(`${m}/users/reset-password`,J,{headers:{"x-api-key":O}});j.data.success?(P({type:"success",text:"Password reset successfully!"}),F(1),Q({email:"",otp:"",newPassword:"",appId:T}),b("login")):P({type:"error",text:j.data.message||"Reset failed"})}catch(j){P({type:"error",text:j.response?.data?.message||"Something went wrong"})}finally{M(!1)}},W={width:"100%",padding:v?"10px 14px 10px 44px":"10px 16px 10px 44px",backgroundColor:U,border:`1px solid ${R}`,borderRadius:"10px",color:Z,fontSize:"15px",outline:"none",transition:"all 0.2s ease"};return n.jsx("div",{style:{display:"flex",justifyContent:"center",alignItems:"center"},children:n.jsxs("div",{style:{minWidth:v?"320px":"380px",maxWidth:v?"340px":"390px",width:"100%",display:"flex",flexDirection:"column",borderRadius:"10px",fontFamily:"'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif",backgroundColor:c?"#000000":"#ffffff",padding:v?"30px 24px":"18px 28px"},children:[n.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",marginBottom:"10px"},children:[e?n.jsx("a",{href:t||"/",target:"_self",rel:"noopener noreferrer",children:n.jsx("img",{src:e,alt:"Logo",style:{height:"50px",width:"50px",marginBottom:"10px"}})}):n.jsx(Se,{size:40,color:i,style:{marginBottom:"10px"}}),n.jsx("h2",{style:{fontSize:"24px",fontWeight:700,color:Z,margin:0},children:u==="login"?r:h===1?"Forgot Password":"Reset Password"}),n.jsx("p",{style:{fontSize:"14px",color:B},children:u==="login"?s:"Follow the steps to reset your password"})]}),u==="login"&&n.jsxs("form",{onSubmit:Y,style:{display:"flex",flexDirection:"column",gap:"14px"},children:[n.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"4px"},children:[n.jsx("label",{htmlFor:"login-email",style:{fontSize:"14px",fontWeight:500,color:c?"#ffffff":"#000000"},children:"Email Address"}),n.jsxs("div",{style:{position:"relative"},children:[n.jsx(he,{size:20,style:{position:"absolute",left:"14px",top:"50%",transform:"translateY(-50%)",color:B}}),n.jsx("input",{id:"login-email",type:"email",placeholder:"Enter your email",value:w,onChange:f=>D(f.target.value),style:W})]})]}),n.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"4px"},children:[n.jsx("label",{htmlFor:"login-password",style:{fontSize:"14px",fontWeight:500,color:c?"#ffffff":"#000000"},children:"Password"}),n.jsxs("div",{style:{position:"relative"},children:[n.jsx(we,{size:20,style:{position:"absolute",left:"14px",top:"50%",transform:"translateY(-50%)",color:B}}),n.jsx("input",{id:"login-password",type:I?"text":"password",placeholder:"Enter your password",value:K,onChange:f=>L(f.target.value),style:W}),n.jsx("button",{type:"button",onClick:()=>_(!I),style:{position:"absolute",right:"14px",padding:"4px",top:"50%",transform:"translateY(-50%)",background:"transparent",border:"none",color:B,cursor:"pointer"},children:I?n.jsx(rt,{size:20}):n.jsx(st,{size:20})})]})]}),n.jsxs("div",{style:{display:"flex",justifyContent:"space-between",fontSize:"13px"},children:[g&&n.jsx("a",{href:g,style:{color:i,textDecoration:"none",fontWeight:500},children:"Create new account"}),n.jsx("button",{type:"button",onClick:()=>b("forgot"),style:{background:"none",border:"none",color:i,fontWeight:500,cursor:"pointer"},children:"Forgot password?"})]}),n.jsx("button",{type:"submit",disabled:C,style:{padding:"12px",background:a,color:"#fff",border:"none",borderRadius:"10px",fontSize:"14px",fontWeight:600},children:C?"Signing In...":"Sign In"})]}),u==="forgot"&&n.jsxs("form",{onSubmit:h===1?k:N,style:{display:"flex",flexDirection:"column",gap:"14px"},children:[h===1?n.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"4px"},children:[n.jsx("label",{htmlFor:"forgot-email",style:{fontSize:"14px",fontWeight:500,color:c?"#ffffff":"#000000"},children:"Email Address"}),n.jsxs("div",{style:{position:"relative"},children:[n.jsx(he,{size:20,style:{position:"absolute",left:"14px",top:"50%",transform:"translateY(-50%)",color:B}}),n.jsx("input",{id:"forgot-email",type:"email",name:"email",placeholder:"Enter your email",value:J.email,onChange:x,style:W})]})]}):n.jsxs(n.Fragment,{children:[n.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"6px"},children:[n.jsx("label",{htmlFor:"otp",style:{fontSize:"14px",fontWeight:500,color:c?"#ffffff":"#000000"},children:"One-Time Password (OTP)"}),n.jsxs("div",{style:{position:"relative"},children:[n.jsx(en,{size:20,style:{position:"absolute",left:"14px",top:"50%",transform:"translateY(-50%)",color:B}}),n.jsx("input",{id:"otp",type:"text",name:"otp",placeholder:"Enter OTP",value:J.otp,onChange:x,style:W})]})]}),n.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"6px"},children:[n.jsx("label",{htmlFor:"newPassword",style:{fontSize:"14px",fontWeight:500,color:c?"#ffffff":"#000000"},children:"New Password"}),n.jsxs("div",{style:{position:"relative"},children:[n.jsx(we,{size:20,style:{position:"absolute",left:"14px",top:"50%",transform:"translateY(-50%)",color:B}}),n.jsx("input",{id:"newPassword",type:"password",name:"newPassword",placeholder:"Enter new password",value:J.newPassword,onChange:x,style:W})]})]})]}),n.jsx("button",{type:"submit",disabled:C,style:{padding:"12px",background:a,color:"#fff",border:"none",fontSize:"14px",borderRadius:"10px",fontWeight:600},children:C?"Please wait...":h===1?"Send Reset OTP":"Reset Password"}),n.jsx("button",{type:"button",onClick:()=>{b("login"),F(1)},style:{background:"none",border:"none",fontSize:"14px",color:B,marginTop:"6px",cursor:"pointer"},children:"Back to Login"})]}),y&&n.jsxs("div",{style:{marginTop:"16px",padding:"12px",borderRadius:"12px",fontSize:"14px",display:"flex",alignItems:"center",gap:"10px",backgroundColor:y.type==="success"?`${i}15`:"rgba(239,68,68,0.1)",border:y.type==="success"?`1px solid ${i}30`:"1px solid rgba(239,68,68,0.3)",color:y.type==="success"?i:"#ef4444"},children:[y.type==="success"?n.jsx(xe,{size:20}):n.jsx(le,{size:20}),n.jsx("span",{children:y.text})]}),n.jsxs("div",{style:{textAlign:"center",fontSize:"12px",color:B,marginTop:"16px",padding:"0 4px"},children:["Secure authentication powered by"," ",n.jsx("span",{style:{color:i,fontWeight:600},children:"Neuctra Authix"})]})]})})},ts=()=>{if(typeof window>"u")return!1;try{const e=localStorage.getItem("userInfo");return!!(e&&e!=="undefined"&&e!=="null")}catch{return!1}},ns=({children:e,fallback:t=null,width:r,height:s})=>{const[o,i]=S.useState(!1);return S.useEffect(()=>{const a=()=>i(ts());return a(),window.addEventListener("storage",a),()=>window.removeEventListener("storage",a)},[]),o?n.jsx("span",{style:{display:"inline-flex",alignItems:"center",verticalAlign:"middle",width:r,height:s},children:e}):n.jsx(n.Fragment,{children:t})},on=()=>{if(typeof window>"u")return!1;try{const e=localStorage.getItem("userInfo");return!!(e&&e!=="undefined"&&e!=="null")}catch{return!1}},rs=({children:e,fallback:t=null,width:r,height:s})=>{const[o,i]=S.useState(!on());return S.useEffect(()=>{const a=()=>i(!on());return a(),window.addEventListener("storage",a),()=>window.removeEventListener("storage",a)},[]),o?n.jsx("span",{style:{display:"inline-flex",alignItems:"center",verticalAlign:"middle",width:r,height:s},children:e}):n.jsx(n.Fragment,{children:t})},ss=({isOpen:e,onClose:t,onSuccess:r,onError:s,userId:o,token:i,colors:a})=>{const{baseUrl:c,apiKey:g,appId:p}=je(),[l,m]=S.useState(!1),[O,T]=S.useState(""),[u,b]=S.useState("warning"),[h,F]=S.useState(!1);if(S.useEffect(()=>{const y=()=>{F(window.innerWidth<640)};return y(),window.addEventListener("resize",y),()=>window.removeEventListener("resize",y)},[]),!e)return null;const I=async()=>{m(!0),b("processing");try{const{data:y}=await V.delete(`${c}/users/delete/${o}`,{data:{appId:p},headers:{"x-api-key":g}});y.success?(r(y.message||"Account deleted successfully"),b("success"),setTimeout(()=>{localStorage.removeItem("userInfo"),localStorage.removeItem("userToken"),window.location.href="/"},2e3)):(s(y.message||"Failed to delete account"),b("warning"))}catch(y){s(y.response?.data?.message||"Something went wrong"),b("warning")}finally{m(!1)}},_=O.toLowerCase()==="delete my account",C=y=>{y.target===y.currentTarget&&u!=="processing"&&u!=="success"&&t()},M=()=>{switch(u){case"warning":return n.jsxs(n.Fragment,{children:[n.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:"24px",gap:"16px"},children:[n.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"12px",flex:1},children:[n.jsx("div",{style:{width:"40px",height:"40px",borderRadius:"12px",background:"linear-gradient(135deg, #ef4444, #dc2626)",display:"flex",alignItems:"center",justifyContent:"center",color:"white",flexShrink:0},children:n.jsx(He,{size:20})}),n.jsx("div",{children:n.jsx("h3",{style:{color:a.textPrimary,margin:0,fontSize:"20px",fontWeight:700,lineHeight:"1.3"},children:"Delete Account"})})]}),n.jsx("button",{onClick:t,"aria-label":"Close modal",style:{background:"transparent",border:"none",color:a.textTertiary,cursor:"pointer",padding:"8px",borderRadius:"8px",width:"36px",height:"36px",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0,transition:"all 0.2s ease"},onMouseOver:y=>{y.currentTarget.style.backgroundColor=a.border,y.currentTarget.style.color=a.textPrimary},onMouseOut:y=>{y.currentTarget.style.backgroundColor="transparent",y.currentTarget.style.color=a.textTertiary},children:n.jsx(Pe,{size:20})})]}),n.jsxs("div",{style:{display:"flex",gap:"16px",padding:"20px",background:`${a.error}15`,border:`1px solid ${a.error}30`,borderRadius:"12px",marginBottom:"20px"},children:[n.jsx("div",{style:{color:a.error,flexShrink:0,display:"flex",alignItems:"flex-start"},children:n.jsx(sn,{size:24})}),n.jsxs("div",{style:{flex:1},children:[n.jsx("h4",{style:{color:a.textPrimary,margin:"0 0 12px 0",fontSize:"16px",fontWeight:600},children:"Before you proceed..."}),n.jsx("div",{style:{display:"flex",flexDirection:"column",gap:"10px"},children:[{icon:n.jsx(Mr,{size:16}),text:"All your data will be permanently deleted"},{icon:n.jsx(Xr,{size:16}),text:"This action cannot be reversed"},{icon:n.jsx(ot,{size:16}),text:"You will lose access to all services"}].map((y,P)=>n.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"10px",fontSize:"14px",color:a.textSecondary},children:[n.jsx("div",{style:{color:a.error,flexShrink:0},children:y.icon}),n.jsx("span",{children:y.text})]},P))})]})]}),n.jsxs("div",{style:{display:"flex",gap:"12px",flexDirection:h?"column-reverse":"row",justifyContent:"flex-end",alignItems:"stretch"},children:[n.jsx("button",{onClick:t,style:{padding:"10px 24px",borderRadius:"10px",border:`1.5px solid ${a.border}`,background:"transparent",color:a.textPrimary,fontSize:"14px",fontWeight:500,cursor:"pointer",flex:h?"none":1,minWidth:h?"100%":"120px",transition:"all 0.2s ease"},onMouseOver:y=>{y.currentTarget.style.backgroundColor=a.border,y.currentTarget.style.transform="translateY(-1px)"},onMouseOut:y=>{y.currentTarget.style.backgroundColor="transparent",y.currentTarget.style.transform="translateY(0)"},children:"Cancel"}),n.jsxs("button",{onClick:()=>b("confirmation"),style:{padding:"10px 24px",borderRadius:"10px",border:"none",background:"linear-gradient(135deg, #ef4444, #dc2626)",color:"white",fontSize:"14px",fontWeight:600,cursor:"pointer",flex:h?"none":1,minWidth:h?"100%":"140px",display:"flex",alignItems:"center",justifyContent:"center",gap:"8px",transition:"all 0.2s ease",boxShadow:"0 4px 12px rgba(239, 68, 68, 0.4)"},onMouseOver:y=>{y.currentTarget.style.transform="translateY(-1px)",y.currentTarget.style.boxShadow="0 6px 20px rgba(239, 68, 68, 0.5)"},onMouseOut:y=>{y.currentTarget.style.transform="translateY(0)",y.currentTarget.style.boxShadow="0 4px 12px rgba(239, 68, 68, 0.4)"},children:[n.jsx(He,{size:16}),"Continue to Delete"]})]})]});case"confirmation":return n.jsxs(n.Fragment,{children:[n.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"12px",marginBottom:"24px"},children:[n.jsx("div",{style:{width:"40px",height:"40px",borderRadius:"12px",background:"linear-gradient(135deg, #f59e0b, #d97706)",display:"flex",alignItems:"center",justifyContent:"center",color:"white",flexShrink:0},children:n.jsx(sn,{size:24})}),n.jsx("div",{style:{flex:1},children:n.jsx("h3",{style:{color:a.textPrimary,margin:0,fontSize:"20px",fontWeight:700,lineHeight:"1.3"},children:"Confirm Deletion"})})]}),n.jsxs("div",{style:{marginBottom:"24px"},children:[n.jsxs("p",{style:{color:a.textSecondary,marginBottom:"16px",fontSize:"14px",lineHeight:"1.5"},children:["Type"," ",n.jsx("strong",{style:{color:a.textPrimary},children:'"delete my account"'})," ","to confirm:"]}),n.jsx("input",{type:"text",value:O,onChange:y=>T(y.target.value),placeholder:"delete my account",style:{width:"100%",padding:"14px 16px",borderRadius:"10px",border:`2px solid ${_?a.success:a.error}`,backgroundColor:"transparent",color:a.textPrimary,fontSize:"15px",outline:"none",transition:"all 0.2s ease",boxSizing:"border-box"},onFocus:y=>{y.target.style.boxShadow=`0 0 0 3px ${a.accent}20`},onBlur:y=>{y.target.style.boxShadow="none"},autoFocus:!0}),_&&n.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"8px",marginTop:"10px",color:a.success,fontSize:"14px",fontWeight:500},children:[n.jsx(nt,{size:16}),n.jsx("span",{children:"Confirmation accepted"})]})]}),n.jsxs("div",{style:{display:"flex",gap:"12px",flexDirection:"column-reverse",justifyContent:"flex-end",alignItems:"stretch"},children:[n.jsx("button",{onClick:()=>{b("warning"),T("")},style:{padding:"10px 24px",borderRadius:"10px",border:`1.5px solid ${a.border}`,background:"transparent",color:a.textPrimary,fontSize:"14px",fontWeight:500,cursor:"pointer",flex:h?"none":1,minWidth:h?"100%":"120px",transition:"all 0.2s ease"},onMouseOver:y=>{y.currentTarget.style.backgroundColor=a.border,y.currentTarget.style.transform="translateY(-1px)"},onMouseOut:y=>{y.currentTarget.style.backgroundColor="transparent",y.currentTarget.style.transform="translateY(0)"},children:"Go Back"}),n.jsxs("button",{onClick:I,disabled:!_||l,style:{padding:"10px 24px",borderRadius:"10px",border:"none",background:"linear-gradient(135deg, #ef4444, #dc2626)",color:"white",fontSize:"14px",fontWeight:600,cursor:!_||l?"not-allowed":"pointer",flex:h?"none":1,minWidth:h?"100%":"140px",opacity:!_||l?.6:1,display:"flex",alignItems:"center",justifyContent:"center",gap:"8px",transition:"all 0.2s ease",boxShadow:!_||l?"none":"0 4px 12px rgba(239, 68, 68, 0.4)"},onMouseOver:y=>{_&&!l&&(y.currentTarget.style.transform="translateY(-1px)",y.currentTarget.style.boxShadow="0 6px 20px rgba(239, 68, 68, 0.5)")},onMouseOut:y=>{_&&!l&&(y.currentTarget.style.transform="translateY(0)",y.currentTarget.style.boxShadow="0 4px 12px rgba(239, 68, 68, 0.4)")},children:[n.jsx(He,{size:16}),"Yes, Delete My Account"]})]})]});case"processing":return n.jsxs(n.Fragment,{children:[n.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"12px",marginBottom:"24px"},children:[n.jsx("div",{style:{width:"40px",height:"40px",borderRadius:"12px",background:"linear-gradient(135deg, #6b7280, #4b5563)",display:"flex",alignItems:"center",justifyContent:"center",color:"white",flexShrink:0},children:n.jsx(ce,{size:20,style:{animation:"spin 1s linear infinite"}})}),n.jsxs("div",{style:{flex:1},children:[n.jsx("h3",{style:{color:a.textPrimary,margin:0,fontSize:"20px",fontWeight:700,lineHeight:"1.3"},children:"Deleting Account"}),n.jsx("p",{style:{color:a.textTertiary,margin:"4px 0 0 0",fontSize:"14px",lineHeight:"1.4"},children:"Please wait while we process your request"})]})]}),n.jsx("div",{style:{marginBottom:"20px"},children:n.jsx("div",{style:{display:"flex",flexDirection:"column",gap:"12px"},children:[{text:"Removing your data",active:!0},{text:"Closing active sessions",active:!1},{text:"Finalizing deletion",active:!1}].map((y,P)=>n.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"12px",padding:"12px",borderRadius:"8px",transition:"all 0.2s ease",backgroundColor:y.active?`${a.accent}10`:"transparent"},children:[n.jsx("div",{style:{width:"8px",height:"8px",borderRadius:"50%",backgroundColor:y.active?a.accent:a.textTertiary,transition:"all 0.3s ease",boxShadow:y.active?`0 0 0 4px ${a.accent}20`:"none"}}),n.jsx("span",{style:{fontSize:"14px",color:y.active?a.textPrimary:a.textSecondary,fontWeight:y.active?500:400},children:y.text})]},P))})}),n.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"10px",padding:"16px",background:`${a.accent}10`,borderRadius:"10px",fontSize:"14px",color:a.textSecondary},children:[n.jsx(rn,{size:18,style:{color:a.accent,flexShrink:0}}),n.jsx("span",{children:"You will be redirected to the login page shortly"})]})]});case"success":return n.jsxs(n.Fragment,{children:[n.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"12px",marginBottom:"24px"},children:[n.jsx("div",{style:{width:"40px",height:"40px",borderRadius:"12px",background:"linear-gradient(135deg, #10b981, #059669)",display:"flex",alignItems:"center",justifyContent:"center",color:"white",flexShrink:0},children:n.jsx(nt,{size:20})}),n.jsxs("div",{style:{flex:1},children:[n.jsx("h3",{style:{color:a.textPrimary,margin:0,fontSize:"20px",fontWeight:700,lineHeight:"1.3"},children:"Account Deleted"}),n.jsx("p",{style:{color:a.textTertiary,margin:"4px 0 0 0",fontSize:"14px",lineHeight:"1.4"},children:"Your account has been successfully deleted"})]})]}),n.jsxs("div",{style:{textAlign:"center",padding:"20px",background:`${a.success}10`,border:`1px solid ${a.success}20`,borderRadius:"12px",marginBottom:"24px"},children:[n.jsx(nt,{size:48,style:{color:a.success,marginBottom:"12px",display:"block",margin:"0 auto 12px auto"}}),n.jsx("p",{style:{color:a.textPrimary,fontSize:"16px",fontWeight:600,margin:"0 0 8px 0"},children:"Goodbye!"}),n.jsx("p",{style:{color:a.textSecondary,fontSize:"14px",margin:0,lineHeight:"1.5"},children:"Your account and all associated data have been permanently removed from our systems."})]}),n.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"10px",padding:"16px",background:`${a.accent}10`,borderRadius:"10px",fontSize:"14px",color:a.textSecondary,justifyContent:"center"},children:[n.jsx(ce,{size:16,style:{animation:"spin 1s linear infinite",color:a.accent}}),n.jsx("span",{children:"Redirecting to login page..."})]})]})}};return n.jsxs("div",{style:{position:"fixed",inset:0,background:"rgba(0,0,0,0.8)",backdropFilter:"blur(8px)",display:"flex",alignItems:"center",justifyContent:"center",padding:"16px",zIndex:1e4,animation:"fadeIn 0.3s ease-out"},onClick:C,children:[n.jsx("div",{style:{backgroundColor:a.surface,border:`1px solid ${a.border}`,borderRadius:"20px",width:"100%",maxWidth:"480px",padding:"24px",boxShadow:"0 32px 64px rgba(0,0,0,0.4)",animation:"scaleIn 0.3s ease-out"},className:"delete-modal-container",children:M()}),n.jsx("style",{children:`
208
+ @keyframes fadeIn {
209
+ from { opacity: 0; }
210
+ to { opacity: 1; }
211
+ }
212
+
213
+ @keyframes scaleIn {
214
+ from {
215
+ opacity: 0;
216
+ transform: scale(0.9) translateY(20px);
217
+ }
218
+ to {
219
+ opacity: 1;
220
+ transform: scale(1) translateY(0);
221
+ }
222
+ }
223
+
224
+ @keyframes spin {
225
+ from { transform: rotate(0deg); }
226
+ to { transform: rotate(360deg); }
227
+ }
228
+
229
+ .delete-modal-container {
230
+ animation: scaleIn 0.3s ease-out;
231
+ }
232
+
233
+ /* Mobile responsiveness */
234
+ @media (max-width: 480px) {
235
+ .delete-modal-container {
236
+ padding: 20px 16px;
237
+ margin: 0;
238
+ border-radius: 16px 16px 0 0;
239
+ max-height: 90vh;
240
+ overflow-y: auto;
241
+ }
242
+ }
243
+
244
+ @media (max-width: 360px) {
245
+ .delete-modal-container {
246
+ padding: 16px 12px;
247
+ }
248
+ }
249
+
250
+ /* Reduced motion support */
251
+ @media (prefers-reduced-motion: reduce) {
252
+ .delete-modal-container {
253
+ animation: none;
254
+ }
255
+
256
+ * {
257
+ transition: none !important;
258
+ animation: none !important;
259
+ }
260
+ }
261
+ `})]})},os=({isOpen:e,onClose:t,onUpdate:r,colors:s})=>{const[o,i]=S.useState(""),[a,c]=S.useState(!1),[g,p]=S.useState(!1),[l,m]=S.useState({isValid:!1,message:"",type:null});if(S.useEffect(()=>{const u=()=>{p(window.innerWidth<640)};return u(),window.addEventListener("resize",u),()=>window.removeEventListener("resize",u)},[]),S.useEffect(()=>{if(!o.trim()){m({isValid:!1,message:"",type:null});return}try{const u=new URL(o),b=/\.(jpg|jpeg|png|gif|webp|svg)$/i.test(u.pathname);m(b?{isValid:!0,message:"Valid image URL",type:"success"}:{isValid:!1,message:"URL should point to an image file",type:"warning"})}catch{m({isValid:!1,message:"Please enter a valid URL",type:"error"})}},[o]),!e)return null;const O=async()=>{if(!(!o||!l.isValid)){c(!0);try{await r(o)&&(i(""),t())}finally{c(!1)}}},T=u=>{u.target===u.currentTarget&&t()};return n.jsxs("div",{style:{position:"fixed",inset:0,background:"rgba(0,0,0,0.8)",backdropFilter:"blur(8px)",display:"flex",alignItems:"center",justifyContent:"center",padding:"16px",zIndex:1e3},onClick:T,children:[n.jsxs("div",{style:{backgroundColor:s.surface,border:`1px solid ${s.border}`,borderRadius:"20px",width:"100%",maxWidth:"480px",padding:"24px",boxShadow:"0 32px 64px rgba(0,0,0,0.4)",animation:"modalSlideIn 0.3s ease-out"},className:"avatar-modal-container",children:[n.jsxs("div",{style:{display:"flex",alignItems:"flex-start",justifyContent:"space-between",marginBottom:"24px",gap:"16px"},children:[n.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"12px",flex:1},children:[n.jsx("div",{style:{width:"44px",height:"44px",borderRadius:"12px",background:`linear-gradient(135deg, ${s.accent}20, ${s.accent}40)`,display:"flex",alignItems:"center",justifyContent:"center",color:s.accent,flexShrink:0},children:n.jsx(tt,{size:22})}),n.jsx("div",{children:n.jsx("h3",{style:{color:s.textPrimary,margin:0,fontSize:"20px",fontWeight:700,lineHeight:"1.3"},children:"Update Avatar"})})]}),n.jsx("button",{onClick:t,"aria-label":"Close avatar modal",style:{background:"transparent",border:"none",color:s.textTertiary,cursor:"pointer",padding:"8px",borderRadius:"8px",width:"36px",height:"36px",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0,transition:"all 0.2s ease"},onMouseOver:u=>{u.currentTarget.style.backgroundColor=s.border,u.currentTarget.style.color=s.textPrimary},onMouseOut:u=>{u.currentTarget.style.backgroundColor="transparent",u.currentTarget.style.color=s.textTertiary},children:n.jsx(Pe,{size:20})})]}),n.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"20px"},children:[n.jsxs("div",{children:[n.jsxs("label",{htmlFor:"avatar-url",style:{display:"flex",marginBottom:"8px",color:s.textPrimary,fontSize:"14px",fontWeight:500,alignItems:"center",gap:"6px"},children:[n.jsx(Hr,{size:16}),"Avatar URL"]}),n.jsxs("div",{style:{position:"relative"},children:[n.jsx("input",{type:"url",id:"avatar-url",placeholder:"https://example.com/your-avatar.jpg",value:o,onChange:u=>i(u.target.value),style:{width:"100%",padding:"14px 16px",paddingLeft:"44px",borderRadius:"12px",border:`1.5px solid ${l.type==="error"?s.error:l.type==="success"?s.success:s.border}`,backgroundColor:"transparent",color:s.textPrimary,fontSize:"15px",outline:"none",transition:"all 0.2s ease",boxSizing:"border-box"},onFocus:u=>{u.target.style.borderColor=s.accent,u.target.style.boxShadow=`0 0 0 3px ${s.accent}20`},onBlur:u=>{u.target.style.borderColor=l.type==="error"?s.error:l.type==="success"?s.success:s.border,u.target.style.boxShadow="none"},disabled:a}),n.jsx("div",{style:{position:"absolute",left:"16px",top:"50%",transform:"translateY(-50%)",color:s.textTertiary},children:n.jsx(Qt,{size:18})})]}),l.message&&n.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"6px",marginTop:"8px",fontSize:"13px",color:l.type==="success"?s.success:l.type==="error"?s.error:s.textTertiary},children:[l.type==="success"&&n.jsx(xe,{size:14}),l.type==="error"&&n.jsx(le,{size:14}),l.type==="warning"&&n.jsx(le,{size:14}),l.message]})]}),o&&l.type==="success"&&n.jsxs("div",{style:{padding:"16px",backgroundColor:`${s.success}10`,border:`1px solid ${s.success}20`,borderRadius:"12px",textAlign:"center"},children:[n.jsx("p",{style:{color:s.textSecondary,fontSize:"13px",fontWeight:500,margin:"0 0 12px 0"},children:"Preview"}),n.jsx("img",{src:o,alt:"Avatar preview",style:{width:"80px",height:"80px",borderRadius:"50%",objectFit:"cover",border:`2px solid ${s.success}40`,margin:"0 auto"},onError:u=>{u.currentTarget.style.display="none"}})]})]}),n.jsxs("div",{style:{display:"flex",gap:"12px",flexDirection:g?"column-reverse":"row",justifyContent:"flex-end",alignItems:"stretch",marginTop:"24px"},children:[n.jsx("button",{onClick:t,disabled:a,style:{padding:"10px 24px",borderRadius:"10px",border:`1.5px solid ${s.border}`,background:"transparent",color:s.textPrimary,fontSize:"14px",fontWeight:500,cursor:a?"not-allowed":"pointer",flex:g?"none":1,minWidth:g?"100%":"120px",opacity:a?.6:1,transition:"all 0.2s ease"},onMouseOver:u=>{a||(u.currentTarget.style.backgroundColor=s.border,u.currentTarget.style.transform="translateY(-1px)")},onMouseOut:u=>{a||(u.currentTarget.style.backgroundColor="transparent",u.currentTarget.style.transform="translateY(0)")},children:"Cancel"}),n.jsx("button",{onClick:O,disabled:a||!l.isValid,style:{padding:"10px 24px",borderRadius:"10px",border:"none",background:`linear-gradient(135deg, ${s.accent}, ${s.accent}E6)`,color:"#fff",fontSize:"14px",fontWeight:600,cursor:a||!l.isValid?"not-allowed":"pointer",flex:g?"none":1,minWidth:g?"100%":"140px",opacity:a||!l.isValid?.6:1,display:"flex",alignItems:"center",justifyContent:"center",gap:"8px",transition:"all 0.2s ease",boxShadow:a||!l.isValid?"none":`0 4px 12px ${s.accent}40`},onMouseOver:u=>{!a&&l.isValid&&(u.currentTarget.style.transform="translateY(-1px)",u.currentTarget.style.boxShadow=`0 6px 20px ${s.accent}60`)},onMouseOut:u=>{!a&&l.isValid&&(u.currentTarget.style.transform="translateY(0)",u.currentTarget.style.boxShadow=`0 4px 12px ${s.accent}40`)},children:a?n.jsxs(n.Fragment,{children:[n.jsx(ce,{size:16,style:{animation:"spin 1s linear infinite"}}),"Updating..."]}):n.jsxs(n.Fragment,{children:[n.jsx(tt,{size:16}),"Update Avatar"]})})]})]}),n.jsx("style",{children:`
262
+ @keyframes modalSlideIn {
263
+ from {
264
+ opacity: 0;
265
+ transform: scale(0.9) translateY(20px);
266
+ }
267
+ to {
268
+ opacity: 1;
269
+ transform: scale(1) translateY(0);
270
+ }
271
+ }
272
+
273
+ @keyframes spin {
274
+ from { transform: rotate(0deg); }
275
+ to { transform: rotate(360deg); }
276
+ }
277
+
278
+ .avatar-modal-container {
279
+ animation: modalSlideIn 0.3s ease-out;
280
+ }
281
+
282
+ /* Mobile responsiveness */
283
+ @media (max-width: 480px) {
284
+ .avatar-modal-container {
285
+ padding: 20px 16px;
286
+ margin: 0;
287
+ border-radius: 16px 16px 0 0;
288
+ max-height: 90vh;
289
+ overflow-y: auto;
290
+ }
291
+ }
292
+
293
+ @media (max-width: 360px) {
294
+ .avatar-modal-container {
295
+ padding: 16px 12px;
296
+ }
297
+ }
298
+
299
+ /* Reduced motion support */
300
+ @media (prefers-reduced-motion: reduce) {
301
+ .avatar-modal-container {
302
+ animation: none;
303
+ }
304
+
305
+ * {
306
+ transition: none !important;
307
+ }
308
+ }
309
+ `})]})},as=({isOpen:e,onClose:t,onSuccess:r,onError:s,userId:o,colors:i})=>{const{baseUrl:a,apiKey:c,appId:g}=je(),[p,l]=S.useState({currentPassword:"",newPassword:"",confirmPassword:""}),[m,O]=S.useState({}),[T,u]=S.useState(!1),[b,h]=S.useState({currentPassword:!1,newPassword:!1,confirmPassword:!1}),[F,I]=S.useState(!1);if(S.useEffect(()=>{const w=()=>{I(window.innerWidth<640)};return w(),window.addEventListener("resize",w),()=>window.removeEventListener("resize",w)},[]),!e)return null;const _=w=>{const{name:D,value:K}=w.target;l(L=>({...L,[D]:K})),m[D]&&O(L=>({...L,[D]:""}))},C=w=>{h(D=>({...D,[w]:!D[w]}))},M=()=>{const w={};return p.currentPassword||(w.currentPassword="Current password is required"),p.newPassword?p.newPassword.length<6&&(w.newPassword="Password must be at least 6 characters"):w.newPassword="New password is required",p.newPassword!==p.confirmPassword&&(w.confirmPassword="Passwords do not match"),O(w),Object.keys(w).length===0},y=async w=>{if(w.preventDefault(),!!M()){u(!0);try{const{data:D}=await V.put(`${a}/users/change-password/${o}`,{appId:g,currentPassword:p.currentPassword,newPassword:p.newPassword},{headers:{"x-api-key":c}});D.success?(r(D.message||"Password updated successfully"),l({currentPassword:"",newPassword:"",confirmPassword:""}),t()):s(D.message||"Failed to update password")}catch(D){s(D.response?.data?.message||"Something went wrong")}finally{u(!1)}}},P=[{field:"currentPassword",label:"Current Password",icon:n.jsx(tn,{size:18})},{field:"newPassword",label:"New Password",icon:n.jsx(we,{size:18})},{field:"confirmPassword",label:"Confirm Password",icon:n.jsx(we,{size:18})}];return n.jsx("div",{style:{position:"fixed",inset:0,background:"rgba(0,0,0,0.7)",backdropFilter:"blur(6px)",display:"flex",alignItems:"center",justifyContent:"center",padding:"16px",zIndex:1e3},children:n.jsxs("div",{style:{backgroundColor:i.surface,border:`1px solid ${i.border}`,borderRadius:"16px",maxWidth:"440px",width:"100%",padding:"24px",boxShadow:"0 20px 60px rgba(0,0,0,0.4)",maxHeight:"90vh",overflowY:"auto"},className:"change-password-modal",children:[n.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"flex-start",marginBottom:"24px",gap:"12px"},children:[n.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"12px",flex:1},children:[n.jsx("div",{style:{width:"40px",height:"40px",borderRadius:"10px",background:`linear-gradient(135deg, ${i.accent}20, ${i.accent}40)`,display:"flex",alignItems:"center",justifyContent:"center",color:i.accent,flexShrink:0},children:n.jsx(we,{size:20})}),n.jsx("div",{children:n.jsx("h3",{style:{color:i.textPrimary,margin:0,fontSize:"18px",fontWeight:600,lineHeight:"1.4"},children:"Change Password"})})]}),n.jsx("button",{onClick:t,"aria-label":"Close password change modal",style:{background:"transparent",border:"none",color:i.textTertiary,cursor:"pointer",padding:"8px",borderRadius:"8px",flexShrink:0,width:"36px",height:"36px",display:"flex",alignItems:"center",justifyContent:"center"},onMouseOver:w=>{w.currentTarget.style.backgroundColor=i.border,w.currentTarget.style.color=i.textPrimary},onMouseOut:w=>{w.currentTarget.style.backgroundColor="transparent",w.currentTarget.style.color=i.textTertiary},children:n.jsx(Pe,{size:20})})]}),n.jsxs("form",{onSubmit:y,children:[P.map(({field:w,label:D,icon:K})=>n.jsxs("div",{style:{marginBottom:"20px",position:"relative"},children:[n.jsx("label",{htmlFor:w,style:{display:"block",marginBottom:"8px",color:i.textPrimary,fontSize:"14px",fontWeight:500,lineHeight:"1.4"},children:D}),n.jsxs("div",{style:{position:"relative"},children:[n.jsx("div",{style:{position:"absolute",left:"14px",top:"50%",transform:"translateY(-50%)",color:i.textTertiary,zIndex:2},children:K}),n.jsx("input",{type:b[w]?"text":"password",id:w,name:w,placeholder:`Enter ${D.toLowerCase()}`,value:p[w],onChange:_,style:{width:"100%",padding:"14px 48px 14px 44px",borderRadius:"10px",border:`1.5px solid ${m[w]?i.error:i.border}`,backgroundColor:"transparent",color:i.textPrimary,fontSize:"15px",outline:"none",transition:"all 0.2s ease",boxSizing:"border-box"},onFocus:L=>{L.target.style.borderColor=i.accent,L.target.style.boxShadow=`0 0 0 3px ${i.accent}20`},onBlur:L=>{L.target.style.borderColor=m[w]?i.error:i.border,L.target.style.boxShadow="none"}}),n.jsx("button",{type:"button",onClick:()=>C(w),style:{position:"absolute",right:"14px",top:"50%",transform:"translateY(-50%)",background:"transparent",border:"none",cursor:"pointer",color:i.textTertiary,padding:"4px",borderRadius:"4px",width:"32px",height:"32px",display:"flex",alignItems:"center",justifyContent:"center"},onMouseOver:L=>{L.currentTarget.style.backgroundColor=i.border,L.currentTarget.style.color=i.textPrimary},onMouseOut:L=>{L.currentTarget.style.backgroundColor="transparent",L.currentTarget.style.color=i.textTertiary},children:b[w]?n.jsx(rt,{size:18}):n.jsx(st,{size:18})})]}),m[w]&&n.jsxs("div",{style:{fontSize:"13px",color:i.error,marginTop:"6px",display:"flex",alignItems:"center",gap:"6px"},children:[n.jsx("span",{style:{fontSize:"16px"},children:"⚠"}),m[w]]})]},w)),n.jsxs("div",{style:{display:"flex",gap:"12px",flexDirection:F?"column-reverse":"row",justifyContent:"flex-end",alignItems:"stretch"},children:[n.jsx("button",{type:"button",onClick:t,disabled:T,style:{padding:"14px 24px",borderRadius:"10px",border:`1.5px solid ${i.border}`,background:"transparent",color:i.textPrimary,fontSize:"14px",fontWeight:500,cursor:T?"not-allowed":"pointer",flex:F?"none":1,minWidth:F?"100%":"120px",opacity:T?.6:1,transition:"all 0.2s ease"},onMouseOver:w=>{T||(w.currentTarget.style.backgroundColor=i.border,w.currentTarget.style.transform="translateY(-1px)")},onMouseOut:w=>{T||(w.currentTarget.style.backgroundColor="transparent",w.currentTarget.style.transform="translateY(0)")},children:"Cancel"}),n.jsx("button",{type:"submit",disabled:T,style:{padding:"14px 24px",borderRadius:"10px",border:"none",background:`linear-gradient(135deg, ${i.accent}, ${i.accent}E6)`,color:"#fff",fontSize:"14px",fontWeight:600,cursor:T?"not-allowed":"pointer",flex:F?"none":1,minWidth:F?"100%":"140px",opacity:T?.8:1,display:"flex",alignItems:"center",justifyContent:"center",gap:"8px",transition:"all 0.2s ease",boxShadow:T?"none":`0 4px 12px ${i.accent}40`},onMouseOver:w=>{T||(w.currentTarget.style.transform="translateY(-1px)",w.currentTarget.style.boxShadow=`0 6px 20px ${i.accent}60`)},onMouseOut:w=>{T||(w.currentTarget.style.transform="translateY(0)",w.currentTarget.style.boxShadow=`0 4px 12px ${i.accent}40`)},children:T?n.jsxs(n.Fragment,{children:[n.jsx(ce,{size:16,style:{animation:"spin 1s linear infinite"}}),"Updating..."]}):"Update Password"})]})]}),n.jsx("style",{children:`
310
+ @keyframes spin {
311
+ from { transform: rotate(0deg); }
312
+ to { transform: rotate(360deg); }
313
+ }
314
+
315
+ .change-password-modal::-webkit-scrollbar {
316
+ width: 6px;
317
+ }
318
+
319
+ .change-password-modal::-webkit-scrollbar-track {
320
+ background: transparent;
321
+ }
322
+
323
+ .change-password-modal::-webkit-scrollbar-thumb {
324
+ background: ${i.border};
325
+ border-radius: 3px;
326
+ }
327
+
328
+ .change-password-modal::-webkit-scrollbar-thumb:hover {
329
+ background: ${i.textTertiary};
330
+ }
331
+
332
+ /* Mobile responsiveness */
333
+ @media (max-width: 480px) {
334
+ .change-password-modal {
335
+ padding: 20px 16px;
336
+ margin: 0;
337
+ border-radius: 12px 12px 0 0;
338
+ max-height: 85vh;
339
+ }
340
+ }
341
+
342
+ @media (max-width: 360px) {
343
+ .change-password-modal {
344
+ padding: 16px 12px;
345
+ }
346
+ }
347
+ `})]})})},is=({isOpen:e,onClose:t,onVerify:r,onSendOTP:s,verifyFormData:o,setVerifyFormData:i,otpSent:a,verifying:c,user:g,colors:p,darkMode:l})=>{if(!e)return null;const m=()=>{t(),i({email:g?.email||"",otp:"",appId:o.appId})};return n.jsxs("div",{className:"modal-overlay",style:{backgroundColor:l?"rgba(0, 0, 0, 0.8)":"rgba(0, 0, 0, 0.5)"},children:[n.jsxs("div",{className:"verify-email-modal",style:{backgroundColor:p.surface,border:`1px solid ${p.border}`},children:[n.jsxs("div",{className:"modal-header",children:[n.jsx("h3",{style:{color:p.textPrimary},children:"Verify Your Email"}),n.jsx("button",{onClick:m,className:"close-btn",style:{color:p.textTertiary},"aria-label":"Close verification modal",children:n.jsx(Pe,{size:20,"aria-hidden":"true"})})]}),n.jsxs("form",{className:"verify-form",onSubmit:r,children:[n.jsxs("div",{className:"form-group",children:[n.jsx("label",{style:{color:p.textSecondary},children:"Email"}),n.jsxs("div",{className:"input-container",children:[n.jsx(he,{size:18,style:{color:p.textTertiary},"aria-hidden":"true"}),n.jsx("input",{type:"email",value:o.email,onChange:O=>i(T=>({...T,email:O.target.value})),placeholder:"Enter your email",style:{backgroundColor:p.surfaceLight,color:p.textPrimary,borderColor:p.border},required:!0,"aria-required":"true","aria-label":"Email address"})]})]}),a&&n.jsxs("div",{className:"form-group",children:[n.jsx("label",{style:{color:p.textSecondary},children:"OTP"}),n.jsxs("div",{className:"input-container",children:[n.jsx(en,{size:18,style:{color:p.textTertiary},"aria-hidden":"true"}),n.jsx("input",{type:"text",value:o.otp,onChange:O=>i(T=>({...T,otp:O.target.value})),placeholder:"Enter OTP",style:{backgroundColor:p.surfaceLight,color:p.textPrimary,borderColor:p.border},required:!0,"aria-required":"true","aria-label":"One-time password"})]})]}),n.jsx("div",{className:"modal-actions",children:a?n.jsxs("button",{type:"submit",disabled:c,className:"btn-primary",style:{background:`linear-gradient(to right, ${p.accent}, ${p.accentHover})`,opacity:c?.7:1},"aria-label":c?"Verifying email":"Verify email",children:[c?n.jsx(ce,{size:16,className:"spinner","aria-hidden":"true"}):n.jsx(xe,{size:16,"aria-hidden":"true"}),c?"Verifying...":"Verify Email"]}):n.jsxs("button",{type:"button",onClick:s,disabled:c,className:"btn-primary",style:{background:`linear-gradient(to right, ${p.accent}, ${p.accentHover})`,opacity:c?.7:1},"aria-label":c?"Sending OTP":"Send OTP",children:[c?n.jsx(ce,{size:16,className:"spinner","aria-hidden":"true"}):n.jsx(nn,{size:16,"aria-hidden":"true"}),c?"Sending...":"Send OTP"]})})]})]}),n.jsx("style",{children:`
348
+ .modal-overlay {
349
+ position: fixed;
350
+ top: 0;
351
+ left: 0;
352
+ right: 0;
353
+ bottom: 0;
354
+ display: flex;
355
+ align-items: center;
356
+ justify-content: center;
357
+ z-index: 100;
358
+ padding: 20px;
359
+ }
360
+
361
+ .verify-email-modal {
362
+ width: 100%;
363
+ max-width: 440px;
364
+ border-radius: 16px;
365
+ padding: 24px;
366
+ box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
367
+ backdrop-filter: blur(8px);
368
+ }
369
+
370
+ .modal-header {
371
+ display: flex;
372
+ align-items: center;
373
+ justify-content: space-between;
374
+ margin-bottom: 24px;
375
+ }
376
+
377
+ .modal-header h3 {
378
+ margin: 0;
379
+ font-size: 20px;
380
+ font-weight: 600;
381
+ }
382
+
383
+ .close-btn {
384
+ background: none;
385
+ border: none;
386
+ cursor: pointer;
387
+ padding: 4px;
388
+ border-radius: 4px;
389
+ transition: background-color 0.2s ease;
390
+ display: flex;
391
+ align-items: center;
392
+ justify-content: center;
393
+ }
394
+
395
+ .close-btn:hover {
396
+ background-color: ${l?"rgba(255,255,255,0.1)":"rgba(0,0,0,0.1)"};
397
+ }
398
+
399
+ .verify-form {
400
+ display: flex;
401
+ flex-direction: column;
402
+ gap: 20px;
403
+ }
404
+
405
+ .form-group {
406
+ display: flex;
407
+ flex-direction: column;
408
+ gap: 8px;
409
+ }
410
+
411
+ .form-group label {
412
+ font-size: 14px;
413
+ font-weight: 500;
414
+ }
415
+
416
+ .input-container {
417
+ position: relative;
418
+ display: flex;
419
+ align-items: center;
420
+ }
421
+
422
+ .input-container svg {
423
+ position: absolute;
424
+ left: 12px;
425
+ pointer-events: none;
426
+ }
427
+
428
+ .input-container input {
429
+ width: 100%;
430
+ padding: 12px 12px 12px 40px;
431
+ border-radius: 8px;
432
+ border: 1px solid;
433
+ font-size: 14px;
434
+ outline: none;
435
+ transition: border-color 0.2s ease;
436
+ background-color: transparent;
437
+ }
438
+
439
+ .input-container input:focus {
440
+ border-color: ${p.accent};
441
+ box-shadow: 0 0 0 3px ${p.accent}20;
442
+ }
443
+
444
+ .modal-actions {
445
+ display: flex;
446
+ gap: 12px;
447
+ }
448
+
449
+ .modal-actions .btn-primary {
450
+ flex: 1;
451
+ padding: 12px 20px;
452
+ border: none;
453
+ border-radius: 8px;
454
+ color: white;
455
+ font-weight: 500;
456
+ cursor: pointer;
457
+ transition: all 0.2s ease;
458
+ display: flex;
459
+ align-items: center;
460
+ justify-content: center;
461
+ gap: 8px;
462
+ font-size: 14px;
463
+ }
464
+
465
+ .modal-actions .btn-primary:hover:not(:disabled) {
466
+ transform: translateY(-1px);
467
+ box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
468
+ }
469
+
470
+ .modal-actions .btn-primary:disabled {
471
+ opacity: 0.6;
472
+ cursor: not-allowed;
473
+ transform: none;
474
+ }
475
+
476
+ .spinner {
477
+ animation: spin 1s linear infinite;
478
+ }
479
+
480
+ @keyframes spin {
481
+ from { transform: rotate(0deg); }
482
+ to { transform: rotate(360deg); }
483
+ }
484
+
485
+ @media (prefers-reduced-motion: reduce) {
486
+ .close-btn, .modal-actions .btn-primary {
487
+ transition: none;
488
+ }
489
+
490
+ .spinner {
491
+ animation: none;
492
+ }
493
+ }
494
+ `})]})},ls=({token:e,user:t=null,darkMode:r=!0,homeUrl:s,onLogout:o,onVerify:i,primaryColor:a="#00C212"})=>{const{baseUrl:c,apiKey:g,appId:p}=je(),[l,m]=S.useState(t),[O,T]=S.useState(!0),[u,b]=S.useState(!1),[h,F]=S.useState(!1),[I,_]=S.useState(!1),[C,M]=S.useState(!1),[y,P]=S.useState(!1),[w,D]=S.useState(!1),[K,L]=S.useState(!1),[J,Q]=S.useState(!1),[v,Z]=S.useState(null),[B,U]=S.useState(!1),[R,Y]=S.useState({email:"",otp:"",appId:p}),[x,k]=S.useState(!1),[N,W]=S.useState(!1),f=(E,$)=>{Z({type:E,message:$}),setTimeout(()=>Z(null),3e3)},j=()=>{Q(!0);const E=setTimeout(()=>{L(!1),Q(!1)},150);return()=>clearTimeout(E)};S.useEffect(()=>{const E=$=>{const G=document.querySelector(".dropdown-container");G&&!G.contains($.target)&&j()};return K&&document.addEventListener("mousedown",E),()=>{document.removeEventListener("mousedown",E)}},[K]);const q=async()=>{if(!R.email||!/\S+@\S+\.\S+/.test(R.email)){f("error","Please enter a valid email");return}try{W(!0);const E=await V.post(`${c}/users/send-verify-otp/${l?.id}`,{email:R.email},{headers:{"x-api-key":g,"x-app-id":p}});E.data.success?(f("success",E.data.message||"OTP sent to email!"),k(!0)):f("error",E.data.message||"Failed to send OTP")}catch(E){f("error",E.response?.data?.message||"Server error")}finally{W(!1)}},se=async E=>{if(E.preventDefault(),!R.email||!R.otp){f("error","Please fill in all fields");return}try{W(!0);const $=await V.post(`${c}/users/verify-email`,R);if($.data.success){if(f("success",$.data.message||"Email verified!"),l){const G={...l,isVerified:!0};m(G),localStorage.setItem("userInfo",JSON.stringify({...G,token:e})),typeof i=="function"&&i(G)}Y({email:"",otp:"",appId:p}),k(!1),D(!1)}else f("error",$.data.message||"Verification failed")}catch($){f("error",$.response?.data?.message||"Something went wrong")}finally{W(!1)}},X=async E=>{if(!l)return!1;try{const $={...l,avatarUrl:E},{data:G}=await V.put(`${c}/users/update/${l.id}`,$,{headers:{"x-api-key":g}});return G.success?(m($),localStorage.setItem("userInfo",JSON.stringify({...$,token:e})),f("success","Avatar updated successfully!"),!0):(f("error",G.message||"Failed to update avatar"),!1)}catch($){return console.error("Avatar update error:",$),f("error","Failed to update avatar"),!1}},ae=async()=>{if(l){F(!0);try{const{data:E}=await V.put(`${c}/users/update/${l.id}`,l,{headers:{"x-api-key":g}});E.success?(m(E.user),b(!1),localStorage.setItem("userInfo",JSON.stringify({...E.user,token:e})),f("success","Profile updated successfully")):f("error",E.message)}catch(E){console.error(E),f("error","Update failed")}finally{F(!1)}}},de=async E=>{try{const{data:$}=await V.get(`${c}/users/check-user/${E}?appId=${p}`,{headers:{"x-api-key":g}});(!$.success||!$.exists)&&(console.warn("User not found, clearing session..."),localStorage.removeItem("userInfo"),m(null))}catch($){console.error("User check failed:",$),localStorage.removeItem("userInfo"),m(null)}};S.useEffect(()=>{(()=>{if(t)m(t),T(!1),de(t.id);else{const $=localStorage.getItem("userInfo");if($){const G=JSON.parse($);m(G),T(!1),de(G.id)}else T(!1)}})()},[t]),S.useEffect(()=>{l?.email&&Y(E=>({...E,email:l.email}))},[l?.email]);const ve=(E,$)=>{let G=parseInt(E.replace("#",""),16),ge=(G>>16)+$,it=(G>>8&255)+$,lt=(G&255)+$;return ge=Math.min(255,Math.max(0,ge)),it=Math.min(255,Math.max(0,it)),lt=Math.min(255,Math.max(0,lt)),`#${(lt|it<<8|ge<<16).toString(16).padStart(6,"0")}`},z=r?{background:"#000000",surface:"#09090b",surfaceLight:"#27272a",surfaceLighter:"#3f3f46",textPrimary:"#ffffff",textSecondary:"#d4d4d8",textTertiary:"#a1a1aa",accent:a,accentHover:ve(a,-15),success:"#10b981",error:"#ef4444",border:"#27272a",warning:"#f59e0b"}:{background:"#ffffff",surface:"#fafafa",surfaceLight:"#f4f4f5",surfaceLighter:"#e4e4e7",textPrimary:"#18181b",textSecondary:"#52525b",textTertiary:"#71717a",accent:a,accentHover:ve(a,-15),success:"#10b981",error:"#ef4444",border:"#e4e4e7",warning:"#d97706"};if(O)return n.jsx("div",{style:{width:"100%",minHeight:"400px",display:"flex",alignItems:"center",justifyContent:"center",color:z.textPrimary,fontFamily:"'Inter', -apple-system, BlinkMacSystemFont, sans-serif"},children:n.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",gap:"16px",textAlign:"center"},children:[n.jsx(ce,{size:40,color:z.accent,style:{animation:"spin 1s linear infinite"},"aria-hidden":"true"}),n.jsx("p",{style:{color:z.textTertiary,margin:0},children:"Loading your profile..."})]})});if(!l)return n.jsx("div",{style:{width:"100%",minHeight:"400px",display:"flex",alignItems:"center",justifyContent:"center",color:z.textPrimary,fontFamily:"'Inter', -apple-system, BlinkMacSystemFont, sans-serif"},children:n.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",gap:"12px",textAlign:"center"},children:[n.jsx(le,{size:40,color:z.error,"aria-hidden":"true"}),n.jsx("p",{style:{color:z.textTertiary,margin:0},children:"No profile found. Please log in again."})]})});const at=[{label:"Full Name",value:l.name,name:"name",type:"text",icon:Se},{label:"Email Address",value:l.email,name:"email",type:"email",icon:he},{label:"Phone Number",value:l.phone||"Not set",name:"phone",type:"tel",icon:Jr},{label:"Address",value:l.address||"Not provided",name:"address",type:"text",icon:$r}];return n.jsxs("div",{style:{width:"100%",display:"flex",alignItems:"center",justifyContent:"center",color:z.textPrimary,fontFamily:"'Inter', -apple-system, BlinkMacSystemFont, sans-serif",lineHeight:1.5,minHeight:"80vh"},children:[v&&n.jsxs("div",{style:{position:"fixed",top:"20px",right:"20px",padding:"12px 24px",borderRadius:"12px",boxShadow:"0 25px 50px -12px rgba(0, 0, 0, 0.25)",backdropFilter:"blur(8px)",border:"1px solid",zIndex:1e3,display:"flex",alignItems:"center",gap:"8px",fontSize:"12px",fontWeight:500,maxWidth:"400px",animation:"slideIn 0.3s ease-out",...v.type==="success"?{backgroundColor:r?"rgba(16, 185, 129, 0.1)":"rgba(16, 185, 129, 0.05)",borderColor:r?"rgba(16, 185, 129, 0.3)":"rgba(16, 185, 129, 0.2)",color:r?"#34d399":"#059669"}:{backgroundColor:r?"rgba(239, 68, 68, 0.1)":"rgba(239, 68, 68, 0.05)",borderColor:r?"rgba(239, 68, 68, 0.3)":"rgba(239, 68, 68, 0.2)",color:r?"#f87171":"#dc2626"}},role:"alert","aria-live":"polite",children:[v.type==="success"?n.jsx(xe,{size:20,"aria-hidden":"true"}):n.jsx(le,{size:20,"aria-hidden":"true"}),v.message]}),n.jsx("div",{style:{maxWidth:"1200px",margin:"0 auto",width:"100%",boxSizing:"border-box"},children:n.jsxs("div",{style:{display:"grid",gap:"24px",gridTemplateColumns:"1fr",...window.innerWidth>=1024&&{gridTemplateColumns:"1fr 2fr",gap:"10px"},...window.innerWidth>=768&&window.innerWidth<1024&&{gap:"10px"},...window.innerWidth>=600&&window.innerWidth<768&&{gap:"28px"}},children:[n.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"6px",height:"100%"},children:[n.jsxs("section",{style:{backgroundColor:z.surface,borderRadius:"16px",position:"relative",padding:"24px",boxShadow:"0 1px 3px rgba(0, 0, 0, 0.1)",textAlign:"center",display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",flex:1,minHeight:"300px"},children:[s&&n.jsx("a",{href:s||"/",target:"_self",rel:"noopener noreferrer",style:{position:"absolute",top:"18px",left:"18px"},children:n.jsx(Wr,{size:20,style:{color:r?"#ffffff":"#000000"}})}),n.jsxs("div",{style:{position:"relative",display:"inline-block",marginBottom:"16px"},children:[n.jsx("img",{src:l.avatarUrl||`https://api.dicebear.com/9.x/initials/svg?seed=${encodeURIComponent(l.name)}`,alt:`Profile avatar of ${l.name}`,style:{width:"128px",height:"128px",borderRadius:"50%",objectFit:"cover",boxShadow:"0 10px 25px -5px rgba(0, 0, 0, 0.3)",border:`3px solid ${z.border}`},width:128,height:128,loading:"eager"}),n.jsx("button",{onClick:()=>_(!0),style:{position:"absolute",bottom:"8px",right:"8px",backgroundColor:z.accent,color:"white",padding:"8px",borderRadius:"50%",border:"none",cursor:"pointer",transition:"all 0.2s ease",display:"flex",alignItems:"center",justifyContent:"center",width:"32px",height:"32px"},"aria-label":"Change profile picture",children:n.jsx(tt,{size:16,"aria-hidden":"true"})})]}),n.jsx("h2",{style:{fontSize:"24px",fontWeight:600,margin:"0 0 4px 0",color:z.textPrimary},children:l.name}),n.jsx("p",{style:{color:z.textTertiary,margin:"0 0 8px 0"},children:l.email}),n.jsxs("div",{style:{backgroundColor:l.isVerified?r?"rgba(16, 185, 129, 0.1)":"rgba(16, 185, 129, 0.05)":r?"rgba(245, 158, 11, 0.1)":"rgba(245, 158, 11, 0.05)",color:l.isVerified?z.success:z.warning,border:`1px solid ${l.isVerified?r?"rgba(16, 185, 129, 0.3)":"rgba(16, 185, 129, 0.2)":r?"rgba(245, 158, 11, 0.3)":"rgba(245, 158, 11, 0.2)"}`,padding:"6px 12px",borderRadius:"20px",fontSize:"12px",fontWeight:500,display:"inline-flex",alignItems:"center",gap:"6px",marginTop:"8px"},children:[l.isVerified?n.jsx(xe,{size:16,"aria-hidden":"true"}):n.jsx(le,{size:16,"aria-hidden":"true"}),l.isVerified?"Email Verified":"Not Verified"]})]}),n.jsx("nav",{style:{display:"flex",flexDirection:"column",gap:"6px"},children:u?n.jsxs(n.Fragment,{children:[n.jsxs("button",{onClick:()=>b(!1),style:{backgroundColor:z.surfaceLight,border:`1px solid ${z.border}`,color:z.textPrimary,padding:"10px 20px",borderRadius:"6px",borderStyle:"solid",cursor:"pointer",transition:"all 0.2s ease",fontSize:"12px",fontWeight:500,display:"flex",alignItems:"center",justifyContent:"center",gap:"8px",textDecoration:"none",minHeight:"36px",flex:window.innerWidth<1024?"1":"auto"},children:[n.jsx(Pe,{size:16,"aria-hidden":"true"}),"Cancel"]}),n.jsxs("button",{onClick:ae,disabled:h,style:{background:`linear-gradient(to right, ${z.accent}, ${z.accentHover})`,opacity:h?.7:1,color:"white",padding:"10px 20px",borderRadius:"6px",border:"none",cursor:h?"not-allowed":"pointer",transition:"all 0.2s ease",fontSize:"12px",fontWeight:500,display:"flex",alignItems:"center",justifyContent:"center",gap:"8px",textDecoration:"none",minHeight:"36px",flex:window.innerWidth<1024?"1":"auto"},children:[h?n.jsx(ce,{size:16,style:{animation:"spin 1s linear infinite"},"aria-hidden":"true"}):n.jsx(Kr,{size:16,"aria-hidden":"true"}),h?"Saving...":"Save Changes"]})]}):n.jsxs(n.Fragment,{children:[n.jsxs("button",{onClick:()=>b(!0),style:{background:`linear-gradient(to right, ${z.accent}, ${z.accentHover})`,color:"white",padding:"10px 20px",borderRadius:"6px",border:"none",cursor:"pointer",transition:"all 0.2s ease",fontSize:"12px",fontWeight:500,display:"flex",alignItems:"center",justifyContent:"center",gap:"8px",textDecoration:"none",minHeight:"36px",flex:window.innerWidth<1024?"1":"auto"},children:[n.jsx(Yr,{size:16,"aria-hidden":"true"}),"Edit Profile"]}),!l.isVerified&&n.jsxs("button",{onClick:()=>D(!0),disabled:B,style:{background:"linear-gradient(to right, #fbbf24, #f59e0b)",color:"white",padding:"10px 20px",borderRadius:"6px",border:"none",cursor:B?"not-allowed":"pointer",transition:"all 0.2s ease",fontSize:"12px",fontWeight:500,display:"flex",alignItems:"center",justifyContent:"center",gap:"8px",minHeight:"36px",opacity:B?.7:1,flex:window.innerWidth<1024?"1":"auto"},children:[B?n.jsx(ce,{size:14,style:{animation:"spin 1s linear infinite"},"aria-hidden":"true"}):n.jsx(nn,{size:14,"aria-hidden":"true"}),B?"Sending...":"Verify Email"]}),n.jsxs("div",{style:{position:"relative"},children:[n.jsxs("button",{style:{backgroundColor:z.surfaceLight,color:z.textPrimary,padding:"10px 20px",borderRadius:"6px",border:"none",cursor:"pointer",transition:"all 0.2s ease",fontSize:"12px",fontWeight:500,display:"flex",alignItems:"center",justifyContent:"center",gap:"8px",textDecoration:"none",minHeight:"36px",width:"100%",boxSizing:"border-box"},onClick:()=>L(!K),children:[n.jsx(Br,{size:16,"aria-hidden":"true"}),"More Actions"]}),K&&n.jsxs("div",{className:`dropdown-container ${J?"closing":""}`,style:{position:"absolute",bottom:"100%",left:0,right:0,backgroundColor:z.surface,border:`1px solid ${z.border}`,borderRadius:"12px 12px 0 0",boxShadow:"0 -8px 24px rgba(0, 0, 0, 0.25)",zIndex:200,marginBottom:"6px",overflow:"hidden",animation:`${J?"drawerSlideDown":"drawerSlideUp"} 0.25s ease-out forwards`},children:[n.jsxs("button",{onClick:()=>{M(!0),j()},style:{width:"100%",padding:"14px 18px",backgroundColor:"transparent",border:"none",color:z.textPrimary,cursor:"pointer",transition:"all 0.2s ease",fontSize:"13px",fontWeight:500,display:"flex",alignItems:"center",gap:"8px",textAlign:"left"},onMouseEnter:E=>E.currentTarget.style.backgroundColor=z.surfaceLight,onMouseLeave:E=>E.currentTarget.style.backgroundColor="transparent",children:[n.jsx(tn,{size:14,"aria-hidden":"true"}),"Change Password"]}),o&&n.jsxs("button",{onClick:()=>{o(),j()},style:{width:"100%",padding:"14px 18px",backgroundColor:"transparent",border:"none",color:r?"#fca5a5":"#dc2626",cursor:"pointer",transition:"all 0.2s ease",fontSize:"13px",fontWeight:500,display:"flex",alignItems:"center",gap:"8px",textAlign:"left"},onMouseEnter:E=>{E.currentTarget.style.backgroundColor=r?"rgba(239, 68, 68, 0.1)":"rgba(239, 68, 68, 0.05)"},onMouseLeave:E=>E.currentTarget.style.backgroundColor="transparent",children:[n.jsx(ot,{size:14,"aria-hidden":"true"}),"Logout"]}),n.jsxs("button",{onClick:()=>{P(!0),j()},style:{width:"100%",padding:"14px 18px",backgroundColor:"transparent",border:"none",color:"#ef4444",cursor:"pointer",transition:"all 0.2s ease",fontSize:"13px",fontWeight:600,display:"flex",alignItems:"center",gap:"8px",textAlign:"left"},onMouseEnter:E=>{E.currentTarget.style.backgroundColor=r?"rgba(239, 68, 68, 0.1)":"rgba(239, 68, 68, 0.05)"},onMouseLeave:E=>E.currentTarget.style.backgroundColor="transparent",children:[n.jsx(He,{size:14,"aria-hidden":"true"}),"Delete Account"]})]})]})]})})]}),n.jsxs("div",{style:{minWidth:0,display:"flex",flexDirection:"column",gap:"12px"},children:[n.jsxs("section",{style:{backgroundColor:z.surface,borderRadius:"16px",padding:"24px",boxShadow:"0 1px 3px rgba(0, 0, 0, 0.1)"},children:[n.jsxs("h2",{style:{fontSize:"20px",fontWeight:600,margin:"0 0 24px 0",color:z.textSecondary,display:"flex",alignItems:"center",gap:"8px"},children:[n.jsx(Se,{size:20,"aria-hidden":"true"}),"Personal Information"]}),n.jsx("div",{style:{display:"grid",gap:"20px",gridTemplateColumns:"1fr",...window.innerWidth>=600&&{gridTemplateColumns:"1fr 1fr",gap:"20px"}},children:at.map(E=>{const $=E.icon;return n.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"8px"},children:[n.jsxs("label",{style:{color:z.textTertiary,fontSize:"12px",fontWeight:500,display:"flex",alignItems:"center",gap:"8px"},children:[n.jsx($,{size:16,"aria-hidden":"true"}),E.label]}),u?n.jsx("input",{type:E.type,name:E.name,value:l[E.name],onChange:G=>m(ge=>ge&&{...ge,[G.target.name]:G.target.value}),style:{padding:"12px",borderRadius:"8px",border:`1px solid ${a}`,backgroundColor:"transparent",color:z.textPrimary,fontSize:"12px",outline:"none",transition:"border-color 0.2s ease",minHeight:"44px",width:"100%",boxSizing:"border-box"},placeholder:`Enter ${E.label.toLowerCase()}`,"aria-label":E.label}):n.jsx("div",{style:{padding:"12px",borderRadius:"8px",border:"1px solid transparent",fontSize:"12px",minHeight:"44px",display:"flex",alignItems:"center",boxSizing:"border-box",color:z.textPrimary,backgroundColor:r?"rgba(255,255,255,0.05)":"rgba(0,0,0,0.05)"},children:E.value})]},E.name)})})]}),n.jsxs("section",{style:{backgroundColor:z.surface,borderRadius:"16px",padding:"30px 24px",boxShadow:"0 1px 3px rgba(0, 0, 0, 0.1)"},children:[n.jsxs("h2",{style:{fontSize:"20px",fontWeight:600,margin:"0 0 24px 0",color:z.textSecondary,display:"flex",alignItems:"center",gap:"8px"},children:[n.jsx(rn,{size:20,"aria-hidden":"true"}),"Security Status"]}),n.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"16px"},children:[n.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"12px 0"},children:[n.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"12px",color:z.textSecondary},children:[n.jsx(he,{size:16,"aria-hidden":"true"}),n.jsx("span",{children:"Email Verification"})]}),n.jsx("div",{style:{padding:"6px 12px",borderRadius:"8px",fontSize:"12px",fontWeight:500,display:"flex",alignItems:"center",gap:"6px",...l.isVerified?{backgroundColor:r?"rgba(16, 185, 129, 0.1)":"rgba(16, 185, 129, 0.05)",color:z.success,border:`1px solid ${r?"rgba(16, 185, 129, 0.3)":"rgba(16, 185, 129, 0.2)"}`}:{backgroundColor:r?"rgba(245, 158, 11, 0.1)":"rgba(245, 158, 11, 0.05)",color:z.warning,border:`1px solid ${r?"rgba(245, 158, 11, 0.3)":"rgba(245, 158, 11, 0.2)"}`}},children:l.isVerified?n.jsxs(n.Fragment,{children:[n.jsx(xe,{size:16,"aria-hidden":"true"}),"Verified"]}):n.jsxs(n.Fragment,{children:[n.jsx(le,{size:16,"aria-hidden":"true"}),"Not Verified"]})})]}),!l.isVerified&&n.jsx("div",{style:{padding:"12px",borderRadius:"8px",backgroundColor:r?"rgba(100, 100, 100, 0.1)":"rgba(0, 0, 0, 0.05)"},children:n.jsx("p",{style:{color:z.textTertiary,fontSize:"12px",margin:0},children:"Verify your email to unlock all features and enhance your account security."})})]})]})]})]})}),n.jsx(os,{isOpen:I,onClose:()=>{_(!1)},onUpdate:X,colors:z}),n.jsx(as,{baseUrl:c,apiKey:g,appId:p,userId:l.id,isOpen:C,onClose:()=>M(!1),onSuccess:E=>f("success",E),onError:E=>f("error",E),colors:z}),n.jsx(ss,{baseUrl:c,apiKey:g,appId:p,userId:l.id,token:e,isOpen:y,onClose:()=>P(!1),onSuccess:E=>f("success",E),onError:E=>f("error",E),colors:z}),n.jsx(is,{isOpen:w,onClose:()=>{D(!1),k(!1),Y({email:l?.email||"",otp:"",appId:p})},onVerify:se,onSendOTP:q,verifyFormData:R,setVerifyFormData:Y,otpSent:x,verifying:N,user:l,colors:z,darkMode:r}),n.jsx("style",{children:`
495
+ @keyframes slideIn {
496
+ from {
497
+ transform: translateX(100%);
498
+ opacity: 0;
499
+ }
500
+ to {
501
+ transform: translateX(0);
502
+ opacity: 1;
503
+ }
504
+ }
505
+
506
+ @keyframes spin {
507
+ from {
508
+ transform: rotate(0deg);
509
+ }
510
+ to {
511
+ transform: rotate(360deg);
512
+ }
513
+ }
514
+
515
+ @keyframes drawerSlideUp {
516
+ from {
517
+ transform: translateY(20px);
518
+ opacity: 0;
519
+ }
520
+ to {
521
+ transform: translateY(0);
522
+ opacity: 1;
523
+ }
524
+ }
525
+
526
+ @keyframes drawerSlideDown {
527
+ from {
528
+ transform: translateY(0);
529
+ opacity: 1;
530
+ }
531
+ to {
532
+ transform: translateY(20px);
533
+ opacity: 0;
534
+ }
535
+ }
536
+
537
+
538
+ @keyframes slideUp {
539
+ from {
540
+ transform: translateY(10px);
541
+ opacity: 0;
542
+ }
543
+ to {
544
+ transform: translateY(0);
545
+ opacity: 1;
546
+ }
547
+ }
548
+
549
+ /* Responsive design using container queries as fallback */
550
+ @media (max-width: 599px) {
551
+ .profile-main-container {
552
+ padding: 0 12px;
553
+ }
554
+ }
555
+
556
+ @media (min-width: 600px) and (max-width: 767px) {
557
+ .profile-main-container {
558
+ padding: 0 20px;
559
+ }
560
+ }
561
+
562
+ @media (min-width: 768px) and (max-width: 1023px) {
563
+ .profile-main-container {
564
+ padding: 0 24px;
565
+ }
566
+ }
567
+
568
+ @media (min-width: 1024px) {
569
+ .profile-main-container {
570
+ padding: 0 32px;
571
+ }
572
+ }
573
+
574
+ /* Reduced motion support */
575
+ @media (prefers-reduced-motion: reduce) {
576
+ * {
577
+ animation-duration: 0.01ms !important;
578
+ animation-iteration-count: 1 !important;
579
+ transition-duration: 0.01ms !important;
580
+ }
581
+ }
582
+ `})]})},cs=({darkMode:e=!0,primaryColor:t="#3b82f6",onLogout:r,varient:s="classic",propUser:o,className:i="",profileUrl:a,settingsUrl:c,showProfileMenuItem:g=!0,showSettingsMenuItem:p=!0,showViewProfileMenuItem:l=!0,profileLabel:m="My Profile",settingsLabel:O="Settings",viewProfileLabel:T="View Profile",logoutLabel:u="Sign Out"})=>{const{baseUrl:b,apiKey:h,appId:F}=je(),[I,_]=S.useState(!1),[C,M]=S.useState(null),[y,P]=S.useState(!0),[w,D]=S.useState(null),K=S.useRef(null),L=S.useRef(null),[J,Q]=S.useState(!1),[v,Z]=S.useState(!1);S.useEffect(()=>{const f=()=>{Z(window.innerWidth<768)};return f(),window.addEventListener("resize",f),()=>window.removeEventListener("resize",f)},[]);const B=async f=>{try{if(!f)throw new Error("Invalid user ID");const{data:j}=await V.get(`${b}/users/check-user/${f}?appId=${F}`,{headers:{"x-api-key":h},timeout:1e4});(!j.success||!j.exists)&&(console.warn("User not found, clearing session..."),localStorage.removeItem("userInfo"),M(null),D("Session expired"))}catch(j){console.error("User validation failed:",j);const q=j.response?.status===404?"User not found":j.code==="NETWORK_ERROR"?"Network error":"Validation failed";D(q),j.response?.status===404&&(localStorage.removeItem("userInfo"),M(null))}};S.useEffect(()=>{(async()=>{try{if(P(!0),D(null),o){if(!o.id||!o.name||!o.email)throw new Error("Invalid user data provided");M(o),await B(o.id)}else{const j=localStorage.getItem("userInfo");if(j)try{const q=JSON.parse(j);if(!q.id||!q.name||!q.email)throw new Error("Invalid stored user data");M(q),await B(q.id)}catch(q){console.error("Failed to parse stored user data:",q),localStorage.removeItem("userInfo"),D("Invalid user data")}}}catch(j){console.error("User initialization failed:",j),D(j.message||"Failed to load user")}finally{P(!1)}})()},[o]),S.useEffect(()=>{const f=()=>{if(I&&L.current){const j=L.current.getBoundingClientRect(),q=window.innerWidth,se=window.innerHeight,X=280,ae=300,de=q-j.right,ve=j.left,z=se-j.bottom,at=de>=X||de>ve;Q(at),z<ae&&j.top>ae}};return f(),window.addEventListener("resize",f),()=>window.removeEventListener("resize",f)},[I]),S.useEffect(()=>{const f=se=>{K.current&&!K.current.contains(se.target)&&!L.current?.contains(se.target)&&_(!1)},j=se=>{se.key==="Escape"&&_(!1)},q=()=>{I&&_(!1)};return I&&(document.addEventListener("mousedown",f),document.addEventListener("keydown",j),window.addEventListener("scroll",q,{passive:!0})),()=>{document.removeEventListener("mousedown",f),document.removeEventListener("keydown",j),window.removeEventListener("scroll",q)}},[I]);const U=e?{surface:"#000000",surfaceElevated:"#000000",surfaceHover:"#262626",border:"#262626",borderLight:"#404040",textPrimary:"#ffffff",textSecondary:"#a3a3a3",textTertiary:"#737373",accent:t,accentHover:`${t}e6`,error:"#ef4444"}:{surface:"#ffffff",surfaceElevated:"#fafafa",surfaceHover:"#f5f5f5",border:"#e5e5e5",borderLight:"#f0f0f0",textPrimary:"#171717",textSecondary:"#525252",textTertiary:"#a3a3a3",accent:t,accentHover:`${t}e6`,error:"#ef4444"},R={wrapper:{position:"relative",display:"inline-block"},avatarButton:{display:"flex",alignItems:"center",gap:v?"6px":"8px",padding:v?"6px 10px 6px 6px":"8px 12px 8px 8px",borderRadius:"24px",backgroundColor:U.surface,cursor:"pointer",transition:"all 0.2s cubic-bezier(0.4, 0, 0.2, 1)",minWidth:v?"auto":"140px",maxWidth:v?"200px":"none",outline:"none"},avatarImage:{width:v?"28px":"32px",height:v?"28px":"32px",borderRadius:"50%",objectFit:"cover",border:`2px solid ${U.borderLight}`,flexShrink:0},userInfo:{display:"flex",flexDirection:"column",alignItems:"flex-start",flex:1,minWidth:0,overflow:"hidden"},userName:{fontSize:v?"13px":"14px",fontWeight:600,color:U.textPrimary,lineHeight:"1.2",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",maxWidth:v?"80px":"120px"},userEmail:{fontSize:v?"11px":"12px",color:U.textTertiary,lineHeight:"1.2",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",maxWidth:v?"80px":"120px"},chevron:{transition:"transform 0.2s ease",transform:I?"rotate(180deg)":"rotate(0deg)",color:U.textTertiary,flexShrink:0},dropdown:{position:"absolute",top:"100%",marginTop:"8px",[J?"left":"right"]:"0",backgroundColor:U.surfaceElevated,border:`1px solid ${U.border}`,borderRadius:"12px",boxShadow:"0 20px 40px rgba(0,0,0,0.15), 0 4px 12px rgba(0,0,0,0.1)",width:"min(280px, 90vw)",maxWidth:"calc(100vw - 20px)",padding:"6px 6px 16px 6px",zIndex:1e3,fontFamily:"'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif",opacity:I?1:0,pointerEvents:I?"auto":"none",transition:"all 0.2s cubic-bezier(0.4, 0, 0.2, 1)",transform:I?"translateY(0) scale(1)":"translateY(-8px) scale(0.95)",overflow:"hidden"},dropdownSection:{padding:v?"10px 12px":"0px 16px","&:last-child":{borderBottom:"none"}},userSection:{display:"flex",alignItems:"center",gap:v?"10px":"12px",padding:v?"14px":"16px"},dropdownAvatar:{width:v?"40px":"48px",height:v?"40px":"48px",borderRadius:"50%",objectFit:"cover",border:`2px solid ${U.borderLight}`,flexShrink:0},dropdownUserInfo:{display:"flex",flexDirection:"column",flex:1,minWidth:0},dropdownUserName:{fontSize:v?"15px":"16px",fontWeight:600,color:U.textPrimary,lineHeight:"1.2",marginBottom:"2px",overflow:"hidden",textOverflow:"ellipsis"},dropdownUserEmail:{fontSize:v?"13px":"14px",color:U.textSecondary,lineHeight:"1.2",overflow:"hidden",textOverflow:"ellipsis"},menuItem:{display:"flex",alignItems:"center",gap:v?"10px":"12px",padding:v?"10px 12px":"12px 16px",borderRadius:"8px",cursor:"pointer",transition:"all 0.15s ease",color:U.textPrimary,textDecoration:"none",border:"none",background:"none",width:"100%",fontSize:v?"13px":"14px",textAlign:"left",outline:"none"},menuItemText:{flex:1},icon:{width:v?"16px":"18px",height:v?"16px":"18px",color:U.textSecondary,flexShrink:0},logoutButton:{display:"flex",alignItems:"center",gap:v?"10px":"12px",padding:v?"10px 12px":"12px 16px",borderRadius:"8px",cursor:"pointer",transition:"all 0.15s ease",background:"none",border:"none",width:"100%",fontSize:v?"13px":"14px",color:U.error,textAlign:"left",outline:"none"},loadingText:{padding:v?"16px 12px":"20px 16px",textAlign:"center",color:U.textSecondary,fontSize:v?"13px":"14px"},errorState:{padding:v?"16px 12px":"20px 16px",textAlign:"center",color:U.textSecondary,fontSize:v?"13px":"14px",display:"flex",alignItems:"center",justifyContent:"center",gap:"8px",flexDirection:"column"},retryButton:{marginTop:"8px",padding:"8px 16px",backgroundColor:U.accent,color:"#ffffff",border:"none",borderRadius:"6px",cursor:"pointer",fontSize:"12px",fontWeight:500,transition:"background-color 0.2s ease"}},Y=()=>{D(null),P(!0);const f=localStorage.getItem("userInfo");if(f)try{const j=JSON.parse(f);M(j),B(j.id)}catch{D("Invalid user data")}P(!1)},x=(f,j)=>{(f.key==="Enter"||f.key===" ")&&(f.preventDefault(),j())},k=()=>a||C?.profileUrl,N=()=>{const f=k();f&&window.open(f,"_self","noopener,noreferrer")},W=()=>{c&&window.open(c,"_self","noopener,noreferrer")};return n.jsxs("div",{style:R.wrapper,ref:K,className:i,role:"menu","aria-label":"User menu",children:[s==="classic"?n.jsx("div",{ref:L,onClick:()=>_(f=>!f),onKeyDown:f=>x(f,()=>_(j=>!j)),tabIndex:0,role:"button","aria-haspopup":"true","aria-expanded":I,"aria-label":"Toggle user menu",children:C?.avatarUrl?n.jsx("img",{src:C.avatarUrl,alt:`${C?.name||"User"}'s avatar`,style:{width:v?"34px":"40px",height:v?"34px":"40px",borderRadius:"50%",objectFit:"cover",border:`2px solid ${U.borderLight}`,flexShrink:0},loading:"lazy",onError:f=>{const j=f.target;j.onerror=null,j.src=`https://api.dicebear.com/9.x/initials/svg?seed=${encodeURIComponent(C?.name||"User")}`}}):n.jsx("img",{src:`https://api.dicebear.com/9.x/initials/svg?seed=${encodeURIComponent(C?.name||"User")}`,alt:"Default user avatar",style:{width:v?"34px":"40px",height:v?"34px":"40px",borderRadius:"50%",objectFit:"cover",border:`2px solid ${U.borderLight}`,flexShrink:0},loading:"lazy"})}):n.jsxs("div",{ref:L,style:R.avatarButton,onClick:()=>_(f=>!f),onKeyDown:f=>x(f,()=>_(j=>!j)),tabIndex:0,role:"button","aria-haspopup":"true","aria-expanded":I,"aria-label":"Toggle user menu",onMouseOver:f=>{f.currentTarget.style.backgroundColor=U.surfaceHover,f.currentTarget.style.boxShadow="0 4px 12px rgba(0,0,0,0.15)"},onMouseOut:f=>{f.currentTarget.style.backgroundColor=U.surface,f.currentTarget.style.boxShadow="none"},onBlur:f=>{f.currentTarget.style.outline="none"},children:[C?.avatarUrl?n.jsx("img",{src:C.avatarUrl,alt:`${C.name}'s avatar`,style:R.avatarImage,loading:"lazy",onError:f=>{const j=f.target;j.src="https://api.dicebear.com/9.x/glass/svg?seed=Kingston"}}):n.jsx("img",{src:"https://api.dicebear.com/9.x/glass/svg?seed=Kingston",alt:"Default user avatar",style:R.avatarImage,loading:"lazy"}),!v&&n.jsxs("div",{style:R.userInfo,children:[n.jsx("div",{style:R.userName,title:C?.name,children:C?.name||"Guest"}),C?.email&&n.jsx("div",{style:R.userEmail,title:C.email,children:C.email})]}),n.jsx(Ur,{size:v?14:16,style:R.chevron,"aria-hidden":"true"})]}),I&&n.jsx("div",{style:R.dropdown,role:"menu","aria-label":"User options",children:y?n.jsx("div",{style:R.loadingText,role:"status","aria-live":"polite",children:"Loading user information..."}):C?n.jsxs(n.Fragment,{children:[n.jsxs("div",{style:R.userSection,children:[C?.avatarUrl?n.jsx("img",{src:C.avatarUrl,alt:`${C.name}'s profile picture`,style:R.dropdownAvatar,loading:"lazy",onError:f=>{const j=f.target;j.src=`https://api.dicebear.com/9.x/initials/svg?seed=${C.name}`}}):n.jsx("img",{src:`https://api.dicebear.com/9.x/initials/svg?seed=${C.name}`,alt:`${C.name}'s default avatar`,style:R.dropdownAvatar,loading:"lazy"}),n.jsxs("div",{style:R.dropdownUserInfo,children:[n.jsx("div",{style:R.dropdownUserName,title:C.name,children:C.name}),n.jsx("div",{style:R.dropdownUserEmail,title:C.email,children:C.email})]})]}),n.jsxs("div",{style:R.dropdownSection,children:[g&&k()&&n.jsxs("button",{style:R.menuItem,onClick:N,onMouseOver:f=>{f.currentTarget.style.backgroundColor=U.surfaceHover},onMouseOut:f=>{f.currentTarget.style.backgroundColor="transparent"},onKeyDown:f=>x(f,N),role:"menuitem",tabIndex:0,children:[n.jsx(Se,{style:R.icon,"aria-hidden":"true"}),n.jsx("span",{style:R.menuItemText,children:m})]}),p&&c&&n.jsxs("button",{style:R.menuItem,onClick:W,onMouseOver:f=>{f.currentTarget.style.backgroundColor=U.surfaceHover},onMouseOut:f=>{f.currentTarget.style.backgroundColor="transparent"},onKeyDown:f=>x(f,W),role:"menuitem",tabIndex:0,children:[n.jsx(qr,{style:R.icon,"aria-hidden":"true"}),n.jsx("span",{style:R.menuItemText,children:O})]}),l&&C.profileUrl&&n.jsxs("a",{href:C.profileUrl,target:"_self",rel:"noopener noreferrer",style:R.menuItem,onMouseOver:f=>{f.currentTarget.style.backgroundColor=U.surfaceHover},onMouseOut:f=>{f.currentTarget.style.backgroundColor="transparent"},role:"menuitem",tabIndex:0,children:[n.jsx(he,{style:R.icon,"aria-hidden":"true"}),n.jsx("span",{style:R.menuItemText,children:T})]})]}),n.jsx("div",{style:R.dropdownSection,children:n.jsxs("button",{style:R.logoutButton,onClick:r,onMouseOver:f=>{f.currentTarget.style.backgroundColor=U.surfaceHover},onMouseOut:f=>{f.currentTarget.style.backgroundColor="transparent"},onKeyDown:f=>x(f,r),role:"menuitem",tabIndex:0,children:[n.jsx(ot,{style:{...R.icon,color:U.error},"aria-hidden":"true"}),n.jsx("span",{style:R.menuItemText,children:u})]})})]}):n.jsxs("div",{style:R.errorState,role:"alert",children:[n.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[n.jsx(le,{size:16,"aria-hidden":"true"}),n.jsx("span",{children:w||"Not signed in"})]}),w&&w!=="Not signed in"&&n.jsx("button",{style:R.retryButton,onClick:Y,onMouseOver:f=>{f.currentTarget.style.backgroundColor=U.accentHover},onMouseOut:f=>{f.currentTarget.style.backgroundColor=U.accent},children:"Try Again"})]})})]})};re.ReactSignedIn=ns,re.ReactSignedOut=rs,re.ReactUserButton=cs,re.ReactUserLogin=es,re.ReactUserProfile=ls,re.ReactUserSignUp=Zr,Object.defineProperty(re,Symbol.toStringTag,{value:"Module"})}));
583
+ //# sourceMappingURL=neuctra-authix-react.umd.js.map