profile-manager-secure 1.0.2 → 1.0.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.
@@ -6,7 +6,7 @@
6
6
  *
7
7
  * This source code is licensed under the MIT license found in the
8
8
  * LICENSE file in the root directory of this source tree.
9
- */var _r=Symbol.for("react.element"),kd=Symbol.for("react.portal"),jd=Symbol.for("react.fragment"),wd=Symbol.for("react.strict_mode"),Sd=Symbol.for("react.profiler"),Cd=Symbol.for("react.provider"),bd=Symbol.for("react.context"),zd=Symbol.for("react.forward_ref"),Td=Symbol.for("react.suspense"),Pd=Symbol.for("react.memo"),Ed=Symbol.for("react.lazy"),Io=Symbol.iterator;function Nd(e){return e===null||typeof e!="object"?null:(e=Io&&e[Io]||e["@@iterator"],typeof e=="function"?e:null)}var Ha={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},$a=Object.assign,Ka={};function Un(e,t,n){this.props=e,this.context=t,this.refs=Ka,this.updater=n||Ha}Un.prototype.isReactComponent={};Un.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};Un.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Qa(){}Qa.prototype=Un.prototype;function Is(e,t,n){this.props=e,this.context=t,this.refs=Ka,this.updater=n||Ha}var _s=Is.prototype=new Qa;_s.constructor=Is;$a(_s,Un.prototype);_s.isPureReactComponent=!0;var _o=Array.isArray,Ga=Object.prototype.hasOwnProperty,Ls={current:null},Xa={key:!0,ref:!0,__self:!0,__source:!0};function Ya(e,t,n){var r,i={},s=null,o=null;if(t!=null)for(r in t.ref!==void 0&&(o=t.ref),t.key!==void 0&&(s=""+t.key),t)Ga.call(t,r)&&!Xa.hasOwnProperty(r)&&(i[r]=t[r]);var a=arguments.length-2;if(a===1)i.children=n;else if(1<a){for(var c=Array(a),d=0;d<a;d++)c[d]=arguments[d+2];i.children=c}if(e&&e.defaultProps)for(r in a=e.defaultProps,a)i[r]===void 0&&(i[r]=a[r]);return{$$typeof:_r,type:e,key:s,ref:o,props:i,_owner:Ls.current}}function Id(e,t){return{$$typeof:_r,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function Ms(e){return typeof e=="object"&&e!==null&&e.$$typeof===_r}function _d(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var Lo=/\/+/g;function ui(e,t){return typeof e=="object"&&e!==null&&e.key!=null?_d(""+e.key):t.toString(36)}function ol(e,t,n,r,i){var s=typeof e;(s==="undefined"||s==="boolean")&&(e=null);var o=!1;if(e===null)o=!0;else switch(s){case"string":case"number":o=!0;break;case"object":switch(e.$$typeof){case _r:case kd:o=!0}}if(o)return o=e,i=i(o),e=r===""?"."+ui(o,0):r,_o(i)?(n="",e!=null&&(n=e.replace(Lo,"$&/")+"/"),ol(i,t,n,"",function(d){return d})):i!=null&&(Ms(i)&&(i=Id(i,n+(!i.key||o&&o.key===i.key?"":(""+i.key).replace(Lo,"$&/")+"/")+e)),t.push(i)),1;if(o=0,r=r===""?".":r+":",_o(e))for(var a=0;a<e.length;a++){s=e[a];var c=r+ui(s,a);o+=ol(s,t,n,c,i)}else if(c=Nd(e),typeof c=="function")for(e=c.call(e),a=0;!(s=e.next()).done;)s=s.value,c=r+ui(s,a++),o+=ol(s,t,n,c,i);else if(s==="object")throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return o}function Hr(e,t,n){if(e==null)return e;var r=[],i=0;return ol(e,r,"","",function(s){return t.call(n,s,i++)}),r}function Ld(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(n){(e._status===0||e._status===-1)&&(e._status=1,e._result=n)},function(n){(e._status===0||e._status===-1)&&(e._status=2,e._result=n)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var Le={current:null},al={transition:null},Md={ReactCurrentDispatcher:Le,ReactCurrentBatchConfig:al,ReactCurrentOwner:Ls};function Ja(){throw Error("act(...) is not supported in production builds of React.")}q.Children={map:Hr,forEach:function(e,t,n){Hr(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return Hr(e,function(){t++}),t},toArray:function(e){return Hr(e,function(t){return t})||[]},only:function(e){if(!Ms(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};q.Component=Un;q.Fragment=jd;q.Profiler=Sd;q.PureComponent=Is;q.StrictMode=wd;q.Suspense=Td;q.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Md;q.act=Ja;q.cloneElement=function(e,t,n){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var r=$a({},e.props),i=e.key,s=e.ref,o=e._owner;if(t!=null){if(t.ref!==void 0&&(s=t.ref,o=Ls.current),t.key!==void 0&&(i=""+t.key),e.type&&e.type.defaultProps)var a=e.type.defaultProps;for(c in t)Ga.call(t,c)&&!Xa.hasOwnProperty(c)&&(r[c]=t[c]===void 0&&a!==void 0?a[c]:t[c])}var c=arguments.length-2;if(c===1)r.children=n;else if(1<c){a=Array(c);for(var d=0;d<c;d++)a[d]=arguments[d+2];r.children=a}return{$$typeof:_r,type:e.type,key:i,ref:s,props:r,_owner:o}};q.createContext=function(e){return e={$$typeof:bd,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:Cd,_context:e},e.Consumer=e};q.createElement=Ya;q.createFactory=function(e){var t=Ya.bind(null,e);return t.type=e,t};q.createRef=function(){return{current:null}};q.forwardRef=function(e){return{$$typeof:zd,render:e}};q.isValidElement=Ms;q.lazy=function(e){return{$$typeof:Ed,_payload:{_status:-1,_result:e},_init:Ld}};q.memo=function(e,t){return{$$typeof:Pd,type:e,compare:t===void 0?null:t}};q.startTransition=function(e){var t=al.transition;al.transition={};try{e()}finally{al.transition=t}};q.unstable_act=Ja;q.useCallback=function(e,t){return Le.current.useCallback(e,t)};q.useContext=function(e){return Le.current.useContext(e)};q.useDebugValue=function(){};q.useDeferredValue=function(e){return Le.current.useDeferredValue(e)};q.useEffect=function(e,t){return Le.current.useEffect(e,t)};q.useId=function(){return Le.current.useId()};q.useImperativeHandle=function(e,t,n){return Le.current.useImperativeHandle(e,t,n)};q.useInsertionEffect=function(e,t){return Le.current.useInsertionEffect(e,t)};q.useLayoutEffect=function(e,t){return Le.current.useLayoutEffect(e,t)};q.useMemo=function(e,t){return Le.current.useMemo(e,t)};q.useReducer=function(e,t,n){return Le.current.useReducer(e,t,n)};q.useRef=function(e){return Le.current.useRef(e)};q.useState=function(e){return Le.current.useState(e)};q.useSyncExternalStore=function(e,t,n){return Le.current.useSyncExternalStore(e,t,n)};q.useTransition=function(){return Le.current.useTransition()};q.version="18.3.1";Va.exports=q;var C=Va.exports;const Ut=vd(C);/**
9
+ */var _r=Symbol.for("react.element"),kd=Symbol.for("react.portal"),jd=Symbol.for("react.fragment"),wd=Symbol.for("react.strict_mode"),Sd=Symbol.for("react.profiler"),Cd=Symbol.for("react.provider"),bd=Symbol.for("react.context"),zd=Symbol.for("react.forward_ref"),Td=Symbol.for("react.suspense"),Pd=Symbol.for("react.memo"),Ed=Symbol.for("react.lazy"),Io=Symbol.iterator;function Nd(e){return e===null||typeof e!="object"?null:(e=Io&&e[Io]||e["@@iterator"],typeof e=="function"?e:null)}var Ha={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},$a=Object.assign,Ka={};function Hn(e,t,n){this.props=e,this.context=t,this.refs=Ka,this.updater=n||Ha}Hn.prototype.isReactComponent={};Hn.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};Hn.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Qa(){}Qa.prototype=Hn.prototype;function _s(e,t,n){this.props=e,this.context=t,this.refs=Ka,this.updater=n||Ha}var Ls=_s.prototype=new Qa;Ls.constructor=_s;$a(Ls,Hn.prototype);Ls.isPureReactComponent=!0;var _o=Array.isArray,Ga=Object.prototype.hasOwnProperty,Ms={current:null},Xa={key:!0,ref:!0,__self:!0,__source:!0};function Ya(e,t,n){var r,i={},s=null,o=null;if(t!=null)for(r in t.ref!==void 0&&(o=t.ref),t.key!==void 0&&(s=""+t.key),t)Ga.call(t,r)&&!Xa.hasOwnProperty(r)&&(i[r]=t[r]);var a=arguments.length-2;if(a===1)i.children=n;else if(1<a){for(var c=Array(a),u=0;u<a;u++)c[u]=arguments[u+2];i.children=c}if(e&&e.defaultProps)for(r in a=e.defaultProps,a)i[r]===void 0&&(i[r]=a[r]);return{$$typeof:_r,type:e,key:s,ref:o,props:i,_owner:Ms.current}}function Id(e,t){return{$$typeof:_r,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function Ds(e){return typeof e=="object"&&e!==null&&e.$$typeof===_r}function _d(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var Lo=/\/+/g;function di(e,t){return typeof e=="object"&&e!==null&&e.key!=null?_d(""+e.key):t.toString(36)}function ol(e,t,n,r,i){var s=typeof e;(s==="undefined"||s==="boolean")&&(e=null);var o=!1;if(e===null)o=!0;else switch(s){case"string":case"number":o=!0;break;case"object":switch(e.$$typeof){case _r:case kd:o=!0}}if(o)return o=e,i=i(o),e=r===""?"."+di(o,0):r,_o(i)?(n="",e!=null&&(n=e.replace(Lo,"$&/")+"/"),ol(i,t,n,"",function(u){return u})):i!=null&&(Ds(i)&&(i=Id(i,n+(!i.key||o&&o.key===i.key?"":(""+i.key).replace(Lo,"$&/")+"/")+e)),t.push(i)),1;if(o=0,r=r===""?".":r+":",_o(e))for(var a=0;a<e.length;a++){s=e[a];var c=r+di(s,a);o+=ol(s,t,n,c,i)}else if(c=Nd(e),typeof c=="function")for(e=c.call(e),a=0;!(s=e.next()).done;)s=s.value,c=r+di(s,a++),o+=ol(s,t,n,c,i);else if(s==="object")throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return o}function Hr(e,t,n){if(e==null)return e;var r=[],i=0;return ol(e,r,"","",function(s){return t.call(n,s,i++)}),r}function Ld(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(n){(e._status===0||e._status===-1)&&(e._status=1,e._result=n)},function(n){(e._status===0||e._status===-1)&&(e._status=2,e._result=n)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var Le={current:null},al={transition:null},Md={ReactCurrentDispatcher:Le,ReactCurrentBatchConfig:al,ReactCurrentOwner:Ms};function Za(){throw Error("act(...) is not supported in production builds of React.")}q.Children={map:Hr,forEach:function(e,t,n){Hr(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return Hr(e,function(){t++}),t},toArray:function(e){return Hr(e,function(t){return t})||[]},only:function(e){if(!Ds(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};q.Component=Hn;q.Fragment=jd;q.Profiler=Sd;q.PureComponent=_s;q.StrictMode=wd;q.Suspense=Td;q.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Md;q.act=Za;q.cloneElement=function(e,t,n){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var r=$a({},e.props),i=e.key,s=e.ref,o=e._owner;if(t!=null){if(t.ref!==void 0&&(s=t.ref,o=Ms.current),t.key!==void 0&&(i=""+t.key),e.type&&e.type.defaultProps)var a=e.type.defaultProps;for(c in t)Ga.call(t,c)&&!Xa.hasOwnProperty(c)&&(r[c]=t[c]===void 0&&a!==void 0?a[c]:t[c])}var c=arguments.length-2;if(c===1)r.children=n;else if(1<c){a=Array(c);for(var u=0;u<c;u++)a[u]=arguments[u+2];r.children=a}return{$$typeof:_r,type:e.type,key:i,ref:s,props:r,_owner:o}};q.createContext=function(e){return e={$$typeof:bd,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:Cd,_context:e},e.Consumer=e};q.createElement=Ya;q.createFactory=function(e){var t=Ya.bind(null,e);return t.type=e,t};q.createRef=function(){return{current:null}};q.forwardRef=function(e){return{$$typeof:zd,render:e}};q.isValidElement=Ds;q.lazy=function(e){return{$$typeof:Ed,_payload:{_status:-1,_result:e},_init:Ld}};q.memo=function(e,t){return{$$typeof:Pd,type:e,compare:t===void 0?null:t}};q.startTransition=function(e){var t=al.transition;al.transition={};try{e()}finally{al.transition=t}};q.unstable_act=Za;q.useCallback=function(e,t){return Le.current.useCallback(e,t)};q.useContext=function(e){return Le.current.useContext(e)};q.useDebugValue=function(){};q.useDeferredValue=function(e){return Le.current.useDeferredValue(e)};q.useEffect=function(e,t){return Le.current.useEffect(e,t)};q.useId=function(){return Le.current.useId()};q.useImperativeHandle=function(e,t,n){return Le.current.useImperativeHandle(e,t,n)};q.useInsertionEffect=function(e,t){return Le.current.useInsertionEffect(e,t)};q.useLayoutEffect=function(e,t){return Le.current.useLayoutEffect(e,t)};q.useMemo=function(e,t){return Le.current.useMemo(e,t)};q.useReducer=function(e,t,n){return Le.current.useReducer(e,t,n)};q.useRef=function(e){return Le.current.useRef(e)};q.useState=function(e){return Le.current.useState(e)};q.useSyncExternalStore=function(e,t,n){return Le.current.useSyncExternalStore(e,t,n)};q.useTransition=function(){return Le.current.useTransition()};q.version="18.3.1";Va.exports=q;var j=Va.exports;const Vt=vd(j);/**
10
10
  * @license React
11
11
  * react-jsx-runtime.production.min.js
12
12
  *
@@ -14,7 +14,7 @@
14
14
  *
15
15
  * This source code is licensed under the MIT license found in the
16
16
  * LICENSE file in the root directory of this source tree.
17
- */var Dd=C,Rd=Symbol.for("react.element"),Fd=Symbol.for("react.fragment"),Ad=Object.prototype.hasOwnProperty,Od=Dd.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,Wd={key:!0,ref:!0,__self:!0,__source:!0};function Za(e,t,n){var r,i={},s=null,o=null;n!==void 0&&(s=""+n),t.key!==void 0&&(s=""+t.key),t.ref!==void 0&&(o=t.ref);for(r in t)Ad.call(t,r)&&!Wd.hasOwnProperty(r)&&(i[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)i[r]===void 0&&(i[r]=t[r]);return{$$typeof:Rd,type:e,key:s,ref:o,props:i,_owner:Od.current}}Hl.Fragment=Fd;Hl.jsx=Za;Hl.jsxs=Za;Ua.exports=Hl;var l=Ua.exports,Fi={},qa={exports:{}},Ke={},ec={exports:{}},tc={};/**
17
+ */var Dd=j,Rd=Symbol.for("react.element"),Fd=Symbol.for("react.fragment"),Ad=Object.prototype.hasOwnProperty,Od=Dd.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,Wd={key:!0,ref:!0,__self:!0,__source:!0};function Ja(e,t,n){var r,i={},s=null,o=null;n!==void 0&&(s=""+n),t.key!==void 0&&(s=""+t.key),t.ref!==void 0&&(o=t.ref);for(r in t)Ad.call(t,r)&&!Wd.hasOwnProperty(r)&&(i[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)i[r]===void 0&&(i[r]=t[r]);return{$$typeof:Rd,type:e,key:s,ref:o,props:i,_owner:Od.current}}Hl.Fragment=Fd;Hl.jsx=Ja;Hl.jsxs=Ja;Ua.exports=Hl;var l=Ua.exports,Ai={},qa={exports:{}},Ke={},ec={exports:{}},tc={};/**
18
18
  * @license React
19
19
  * scheduler.production.min.js
20
20
  *
@@ -22,7 +22,7 @@
22
22
  *
23
23
  * This source code is licensed under the MIT license found in the
24
24
  * LICENSE file in the root directory of this source tree.
25
- */(function(e){function t(b,M){var F=b.length;b.push(M);e:for(;0<F;){var H=F-1>>>1,K=b[H];if(0<i(K,M))b[H]=M,b[F]=K,F=H;else break e}}function n(b){return b.length===0?null:b[0]}function r(b){if(b.length===0)return null;var M=b[0],F=b.pop();if(F!==M){b[0]=F;e:for(var H=0,K=b.length,h=K>>>1;H<h;){var E=2*(H+1)-1,V=b[E],$=E+1,Q=b[$];if(0>i(V,F))$<K&&0>i(Q,V)?(b[H]=Q,b[$]=F,H=$):(b[H]=V,b[E]=F,H=E);else if($<K&&0>i(Q,F))b[H]=Q,b[$]=F,H=$;else break e}}return M}function i(b,M){var F=b.sortIndex-M.sortIndex;return F!==0?F:b.id-M.id}if(typeof performance=="object"&&typeof performance.now=="function"){var s=performance;e.unstable_now=function(){return s.now()}}else{var o=Date,a=o.now();e.unstable_now=function(){return o.now()-a}}var c=[],d=[],x=1,y=null,g=3,k=!1,S=!1,m=!1,N=typeof setTimeout=="function"?setTimeout:null,p=typeof clearTimeout=="function"?clearTimeout:null,u=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function f(b){for(var M=n(d);M!==null;){if(M.callback===null)r(d);else if(M.startTime<=b)r(d),M.sortIndex=M.expirationTime,t(c,M);else break;M=n(d)}}function j(b){if(m=!1,f(b),!S)if(n(c)!==null)S=!0,A(v);else{var M=n(d);M!==null&&W(j,M.startTime-b)}}function v(b,M){S=!1,m&&(m=!1,p(T),T=-1),k=!0;var F=g;try{for(f(M),y=n(c);y!==null&&(!(y.expirationTime>M)||b&&!Z());){var H=y.callback;if(typeof H=="function"){y.callback=null,g=y.priorityLevel;var K=H(y.expirationTime<=M);M=e.unstable_now(),typeof K=="function"?y.callback=K:y===n(c)&&r(c),f(M)}else r(c);y=n(c)}if(y!==null)var h=!0;else{var E=n(d);E!==null&&W(j,E.startTime-M),h=!1}return h}finally{y=null,g=F,k=!1}}var w=!1,z=null,T=-1,D=5,L=-1;function Z(){return!(e.unstable_now()-L<D)}function U(){if(z!==null){var b=e.unstable_now();L=b;var M=!0;try{M=z(!0,b)}finally{M?P():(w=!1,z=null)}}else w=!1}var P;if(typeof u=="function")P=function(){u(U)};else if(typeof MessageChannel<"u"){var X=new MessageChannel,re=X.port2;X.port1.onmessage=U,P=function(){re.postMessage(null)}}else P=function(){N(U,0)};function A(b){z=b,w||(w=!0,P())}function W(b,M){T=N(function(){b(e.unstable_now())},M)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(b){b.callback=null},e.unstable_continueExecution=function(){S||k||(S=!0,A(v))},e.unstable_forceFrameRate=function(b){0>b||125<b?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):D=0<b?Math.floor(1e3/b):5},e.unstable_getCurrentPriorityLevel=function(){return g},e.unstable_getFirstCallbackNode=function(){return n(c)},e.unstable_next=function(b){switch(g){case 1:case 2:case 3:var M=3;break;default:M=g}var F=g;g=M;try{return b()}finally{g=F}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(b,M){switch(b){case 1:case 2:case 3:case 4:case 5:break;default:b=3}var F=g;g=b;try{return M()}finally{g=F}},e.unstable_scheduleCallback=function(b,M,F){var H=e.unstable_now();switch(typeof F=="object"&&F!==null?(F=F.delay,F=typeof F=="number"&&0<F?H+F:H):F=H,b){case 1:var K=-1;break;case 2:K=250;break;case 5:K=1073741823;break;case 4:K=1e4;break;default:K=5e3}return K=F+K,b={id:x++,callback:M,priorityLevel:b,startTime:F,expirationTime:K,sortIndex:-1},F>H?(b.sortIndex=F,t(d,b),n(c)===null&&b===n(d)&&(m?(p(T),T=-1):m=!0,W(j,F-H))):(b.sortIndex=K,t(c,b),S||k||(S=!0,A(v))),b},e.unstable_shouldYield=Z,e.unstable_wrapCallback=function(b){var M=g;return function(){var F=g;g=M;try{return b.apply(this,arguments)}finally{g=F}}}})(tc);ec.exports=tc;var Bd=ec.exports;/**
25
+ */(function(e){function t(b,M){var F=b.length;b.push(M);e:for(;0<F;){var H=F-1>>>1,K=b[H];if(0<i(K,M))b[H]=M,b[F]=K,F=H;else break e}}function n(b){return b.length===0?null:b[0]}function r(b){if(b.length===0)return null;var M=b[0],F=b.pop();if(F!==M){b[0]=F;e:for(var H=0,K=b.length,h=K>>>1;H<h;){var E=2*(H+1)-1,V=b[E],$=E+1,Q=b[$];if(0>i(V,F))$<K&&0>i(Q,V)?(b[H]=Q,b[$]=F,H=$):(b[H]=V,b[E]=F,H=E);else if($<K&&0>i(Q,F))b[H]=Q,b[$]=F,H=$;else break e}}return M}function i(b,M){var F=b.sortIndex-M.sortIndex;return F!==0?F:b.id-M.id}if(typeof performance=="object"&&typeof performance.now=="function"){var s=performance;e.unstable_now=function(){return s.now()}}else{var o=Date,a=o.now();e.unstable_now=function(){return o.now()-a}}var c=[],u=[],x=1,y=null,g=3,k=!1,C=!1,m=!1,N=typeof setTimeout=="function"?setTimeout:null,p=typeof clearTimeout=="function"?clearTimeout:null,d=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function f(b){for(var M=n(u);M!==null;){if(M.callback===null)r(u);else if(M.startTime<=b)r(u),M.sortIndex=M.expirationTime,t(c,M);else break;M=n(u)}}function w(b){if(m=!1,f(b),!C)if(n(c)!==null)C=!0,A(v);else{var M=n(u);M!==null&&W(w,M.startTime-b)}}function v(b,M){C=!1,m&&(m=!1,p(T),T=-1),k=!0;var F=g;try{for(f(M),y=n(c);y!==null&&(!(y.expirationTime>M)||b&&!J());){var H=y.callback;if(typeof H=="function"){y.callback=null,g=y.priorityLevel;var K=H(y.expirationTime<=M);M=e.unstable_now(),typeof K=="function"?y.callback=K:y===n(c)&&r(c),f(M)}else r(c);y=n(c)}if(y!==null)var h=!0;else{var E=n(u);E!==null&&W(w,E.startTime-M),h=!1}return h}finally{y=null,g=F,k=!1}}var S=!1,z=null,T=-1,D=5,L=-1;function J(){return!(e.unstable_now()-L<D)}function U(){if(z!==null){var b=e.unstable_now();L=b;var M=!0;try{M=z(!0,b)}finally{M?P():(S=!1,z=null)}}else S=!1}var P;if(typeof d=="function")P=function(){d(U)};else if(typeof MessageChannel<"u"){var Y=new MessageChannel,re=Y.port2;Y.port1.onmessage=U,P=function(){re.postMessage(null)}}else P=function(){N(U,0)};function A(b){z=b,S||(S=!0,P())}function W(b,M){T=N(function(){b(e.unstable_now())},M)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(b){b.callback=null},e.unstable_continueExecution=function(){C||k||(C=!0,A(v))},e.unstable_forceFrameRate=function(b){0>b||125<b?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):D=0<b?Math.floor(1e3/b):5},e.unstable_getCurrentPriorityLevel=function(){return g},e.unstable_getFirstCallbackNode=function(){return n(c)},e.unstable_next=function(b){switch(g){case 1:case 2:case 3:var M=3;break;default:M=g}var F=g;g=M;try{return b()}finally{g=F}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(b,M){switch(b){case 1:case 2:case 3:case 4:case 5:break;default:b=3}var F=g;g=b;try{return M()}finally{g=F}},e.unstable_scheduleCallback=function(b,M,F){var H=e.unstable_now();switch(typeof F=="object"&&F!==null?(F=F.delay,F=typeof F=="number"&&0<F?H+F:H):F=H,b){case 1:var K=-1;break;case 2:K=250;break;case 5:K=1073741823;break;case 4:K=1e4;break;default:K=5e3}return K=F+K,b={id:x++,callback:M,priorityLevel:b,startTime:F,expirationTime:K,sortIndex:-1},F>H?(b.sortIndex=F,t(u,b),n(c)===null&&b===n(u)&&(m?(p(T),T=-1):m=!0,W(w,F-H))):(b.sortIndex=K,t(c,b),C||k||(C=!0,A(v))),b},e.unstable_shouldYield=J,e.unstable_wrapCallback=function(b){var M=g;return function(){var F=g;g=M;try{return b.apply(this,arguments)}finally{g=F}}}})(tc);ec.exports=tc;var Bd=ec.exports;/**
26
26
  * @license React
27
27
  * react-dom.production.min.js
28
28
  *
@@ -30,14 +30,14 @@
30
30
  *
31
31
  * This source code is licensed under the MIT license found in the
32
32
  * LICENSE file in the root directory of this source tree.
33
- */var Ud=C,$e=Bd;function _(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var nc=new Set,xr={};function dn(e,t){Mn(e,t),Mn(e+"Capture",t)}function Mn(e,t){for(xr[e]=t,e=0;e<t.length;e++)nc.add(t[e])}var mt=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Ai=Object.prototype.hasOwnProperty,Vd=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,Mo={},Do={};function Hd(e){return Ai.call(Do,e)?!0:Ai.call(Mo,e)?!1:Vd.test(e)?Do[e]=!0:(Mo[e]=!0,!1)}function $d(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function Kd(e,t,n,r){if(t===null||typeof t>"u"||$d(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function Me(e,t,n,r,i,s,o){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=s,this.removeEmptyString=o}var ze={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){ze[e]=new Me(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];ze[t]=new Me(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){ze[e]=new Me(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){ze[e]=new Me(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){ze[e]=new Me(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){ze[e]=new Me(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){ze[e]=new Me(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){ze[e]=new Me(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){ze[e]=new Me(e,5,!1,e.toLowerCase(),null,!1,!1)});var Ds=/[\-:]([a-z])/g;function Rs(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(Ds,Rs);ze[t]=new Me(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(Ds,Rs);ze[t]=new Me(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(Ds,Rs);ze[t]=new Me(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){ze[e]=new Me(e,1,!1,e.toLowerCase(),null,!1,!1)});ze.xlinkHref=new Me("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){ze[e]=new Me(e,1,!1,e.toLowerCase(),null,!0,!0)});function Fs(e,t,n,r){var i=ze.hasOwnProperty(t)?ze[t]:null;(i!==null?i.type!==0:r||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(Kd(t,n,i,r)&&(n=null),r||i===null?Hd(t)&&(n===null?e.removeAttribute(t):e.setAttribute(t,""+n)):i.mustUseProperty?e[i.propertyName]=n===null?i.type===3?!1:"":n:(t=i.attributeName,r=i.attributeNamespace,n===null?e.removeAttribute(t):(i=i.type,n=i===3||i===4&&n===!0?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}var wt=Ud.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,$r=Symbol.for("react.element"),hn=Symbol.for("react.portal"),xn=Symbol.for("react.fragment"),As=Symbol.for("react.strict_mode"),Oi=Symbol.for("react.profiler"),rc=Symbol.for("react.provider"),lc=Symbol.for("react.context"),Os=Symbol.for("react.forward_ref"),Wi=Symbol.for("react.suspense"),Bi=Symbol.for("react.suspense_list"),Ws=Symbol.for("react.memo"),Pt=Symbol.for("react.lazy"),ic=Symbol.for("react.offscreen"),Ro=Symbol.iterator;function Qn(e){return e===null||typeof e!="object"?null:(e=Ro&&e[Ro]||e["@@iterator"],typeof e=="function"?e:null)}var fe=Object.assign,di;function nr(e){if(di===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);di=t&&t[1]||""}return`
34
- `+di+e}var pi=!1;function fi(e,t){if(!e||pi)return"";pi=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(d){var r=d}Reflect.construct(e,[],t)}else{try{t.call()}catch(d){r=d}e.call(t.prototype)}else{try{throw Error()}catch(d){r=d}e()}}catch(d){if(d&&r&&typeof d.stack=="string"){for(var i=d.stack.split(`
33
+ */var Ud=j,$e=Bd;function _(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var nc=new Set,xr={};function dn(e,t){Rn(e,t),Rn(e+"Capture",t)}function Rn(e,t){for(xr[e]=t,e=0;e<t.length;e++)nc.add(t[e])}var mt=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Oi=Object.prototype.hasOwnProperty,Vd=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,Mo={},Do={};function Hd(e){return Oi.call(Do,e)?!0:Oi.call(Mo,e)?!1:Vd.test(e)?Do[e]=!0:(Mo[e]=!0,!1)}function $d(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function Kd(e,t,n,r){if(t===null||typeof t>"u"||$d(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function Me(e,t,n,r,i,s,o){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=s,this.removeEmptyString=o}var ze={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){ze[e]=new Me(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];ze[t]=new Me(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){ze[e]=new Me(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){ze[e]=new Me(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){ze[e]=new Me(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){ze[e]=new Me(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){ze[e]=new Me(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){ze[e]=new Me(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){ze[e]=new Me(e,5,!1,e.toLowerCase(),null,!1,!1)});var Rs=/[\-:]([a-z])/g;function Fs(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(Rs,Fs);ze[t]=new Me(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(Rs,Fs);ze[t]=new Me(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(Rs,Fs);ze[t]=new Me(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){ze[e]=new Me(e,1,!1,e.toLowerCase(),null,!1,!1)});ze.xlinkHref=new Me("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){ze[e]=new Me(e,1,!1,e.toLowerCase(),null,!0,!0)});function As(e,t,n,r){var i=ze.hasOwnProperty(t)?ze[t]:null;(i!==null?i.type!==0:r||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(Kd(t,n,i,r)&&(n=null),r||i===null?Hd(t)&&(n===null?e.removeAttribute(t):e.setAttribute(t,""+n)):i.mustUseProperty?e[i.propertyName]=n===null?i.type===3?!1:"":n:(t=i.attributeName,r=i.attributeNamespace,n===null?e.removeAttribute(t):(i=i.type,n=i===3||i===4&&n===!0?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}var wt=Ud.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,$r=Symbol.for("react.element"),gn=Symbol.for("react.portal"),yn=Symbol.for("react.fragment"),Os=Symbol.for("react.strict_mode"),Wi=Symbol.for("react.profiler"),rc=Symbol.for("react.provider"),lc=Symbol.for("react.context"),Ws=Symbol.for("react.forward_ref"),Bi=Symbol.for("react.suspense"),Ui=Symbol.for("react.suspense_list"),Bs=Symbol.for("react.memo"),Pt=Symbol.for("react.lazy"),ic=Symbol.for("react.offscreen"),Ro=Symbol.iterator;function Gn(e){return e===null||typeof e!="object"?null:(e=Ro&&e[Ro]||e["@@iterator"],typeof e=="function"?e:null)}var fe=Object.assign,pi;function nr(e){if(pi===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);pi=t&&t[1]||""}return`
34
+ `+pi+e}var fi=!1;function hi(e,t){if(!e||fi)return"";fi=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(u){var r=u}Reflect.construct(e,[],t)}else{try{t.call()}catch(u){r=u}e.call(t.prototype)}else{try{throw Error()}catch(u){r=u}e()}}catch(u){if(u&&r&&typeof u.stack=="string"){for(var i=u.stack.split(`
35
35
  `),s=r.stack.split(`
36
36
  `),o=i.length-1,a=s.length-1;1<=o&&0<=a&&i[o]!==s[a];)a--;for(;1<=o&&0<=a;o--,a--)if(i[o]!==s[a]){if(o!==1||a!==1)do if(o--,a--,0>a||i[o]!==s[a]){var c=`
37
- `+i[o].replace(" at new "," at ");return e.displayName&&c.includes("<anonymous>")&&(c=c.replace("<anonymous>",e.displayName)),c}while(1<=o&&0<=a);break}}}finally{pi=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?nr(e):""}function Qd(e){switch(e.tag){case 5:return nr(e.type);case 16:return nr("Lazy");case 13:return nr("Suspense");case 19:return nr("SuspenseList");case 0:case 2:case 15:return e=fi(e.type,!1),e;case 11:return e=fi(e.type.render,!1),e;case 1:return e=fi(e.type,!0),e;default:return""}}function Ui(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case xn:return"Fragment";case hn:return"Portal";case Oi:return"Profiler";case As:return"StrictMode";case Wi:return"Suspense";case Bi:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case lc:return(e.displayName||"Context")+".Consumer";case rc:return(e._context.displayName||"Context")+".Provider";case Os:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Ws:return t=e.displayName||null,t!==null?t:Ui(e.type)||"Memo";case Pt:t=e._payload,e=e._init;try{return Ui(e(t))}catch{}}return null}function Gd(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Ui(t);case 8:return t===As?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function Vt(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function sc(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Xd(e){var t=sc(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var i=n.get,s=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(o){r=""+o,s.call(this,o)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(o){r=""+o},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Kr(e){e._valueTracker||(e._valueTracker=Xd(e))}function oc(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=sc(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function vl(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function Vi(e,t){var n=t.checked;return fe({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function Fo(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=Vt(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function ac(e,t){t=t.checked,t!=null&&Fs(e,"checked",t,!1)}function Hi(e,t){ac(e,t);var n=Vt(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?$i(e,t.type,n):t.hasOwnProperty("defaultValue")&&$i(e,t.type,Vt(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Ao(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function $i(e,t,n){(t!=="number"||vl(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var rr=Array.isArray;function zn(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t["$"+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty("$"+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=""+Vt(n),t=null,i=0;i<e.length;i++){if(e[i].value===n){e[i].selected=!0,r&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function Ki(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(_(91));return fe({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function Oo(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(_(92));if(rr(n)){if(1<n.length)throw Error(_(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:Vt(n)}}function cc(e,t){var n=Vt(t.value),r=Vt(t.defaultValue);n!=null&&(n=""+n,n!==e.value&&(e.value=n),t.defaultValue==null&&e.defaultValue!==n&&(e.defaultValue=n)),r!=null&&(e.defaultValue=""+r)}function Wo(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function uc(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function Qi(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?uc(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var Qr,dc=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,n,r,i){MSApp.execUnsafeLocalFunction(function(){return e(t,n,r,i)})}:e}(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(Qr=Qr||document.createElement("div"),Qr.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=Qr.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function gr(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var sr={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Yd=["Webkit","ms","Moz","O"];Object.keys(sr).forEach(function(e){Yd.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),sr[t]=sr[e]})});function pc(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||sr.hasOwnProperty(e)&&sr[e]?(""+t).trim():t+"px"}function fc(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=pc(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}var Jd=fe({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Gi(e,t){if(t){if(Jd[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(_(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(_(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(_(61))}if(t.style!=null&&typeof t.style!="object")throw Error(_(62))}}function Xi(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Yi=null;function Bs(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Ji=null,Tn=null,Pn=null;function Bo(e){if(e=Dr(e)){if(typeof Ji!="function")throw Error(_(280));var t=e.stateNode;t&&(t=Xl(t),Ji(e.stateNode,e.type,t))}}function hc(e){Tn?Pn?Pn.push(e):Pn=[e]:Tn=e}function xc(){if(Tn){var e=Tn,t=Pn;if(Pn=Tn=null,Bo(e),t)for(e=0;e<t.length;e++)Bo(t[e])}}function gc(e,t){return e(t)}function yc(){}var hi=!1;function mc(e,t,n){if(hi)return e(t,n);hi=!0;try{return gc(e,t,n)}finally{hi=!1,(Tn!==null||Pn!==null)&&(yc(),xc())}}function yr(e,t){var n=e.stateNode;if(n===null)return null;var r=Xl(n);if(r===null)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(e=e.type,r=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!r;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error(_(231,t,typeof n));return n}var Zi=!1;if(mt)try{var Gn={};Object.defineProperty(Gn,"passive",{get:function(){Zi=!0}}),window.addEventListener("test",Gn,Gn),window.removeEventListener("test",Gn,Gn)}catch{Zi=!1}function Zd(e,t,n,r,i,s,o,a,c){var d=Array.prototype.slice.call(arguments,3);try{t.apply(n,d)}catch(x){this.onError(x)}}var or=!1,kl=null,jl=!1,qi=null,qd={onError:function(e){or=!0,kl=e}};function ep(e,t,n,r,i,s,o,a,c){or=!1,kl=null,Zd.apply(qd,arguments)}function tp(e,t,n,r,i,s,o,a,c){if(ep.apply(this,arguments),or){if(or){var d=kl;or=!1,kl=null}else throw Error(_(198));jl||(jl=!0,qi=d)}}function pn(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function vc(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function Uo(e){if(pn(e)!==e)throw Error(_(188))}function np(e){var t=e.alternate;if(!t){if(t=pn(e),t===null)throw Error(_(188));return t!==e?null:e}for(var n=e,r=t;;){var i=n.return;if(i===null)break;var s=i.alternate;if(s===null){if(r=i.return,r!==null){n=r;continue}break}if(i.child===s.child){for(s=i.child;s;){if(s===n)return Uo(i),e;if(s===r)return Uo(i),t;s=s.sibling}throw Error(_(188))}if(n.return!==r.return)n=i,r=s;else{for(var o=!1,a=i.child;a;){if(a===n){o=!0,n=i,r=s;break}if(a===r){o=!0,r=i,n=s;break}a=a.sibling}if(!o){for(a=s.child;a;){if(a===n){o=!0,n=s,r=i;break}if(a===r){o=!0,r=s,n=i;break}a=a.sibling}if(!o)throw Error(_(189))}}if(n.alternate!==r)throw Error(_(190))}if(n.tag!==3)throw Error(_(188));return n.stateNode.current===n?e:t}function kc(e){return e=np(e),e!==null?jc(e):null}function jc(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=jc(e);if(t!==null)return t;e=e.sibling}return null}var wc=$e.unstable_scheduleCallback,Vo=$e.unstable_cancelCallback,rp=$e.unstable_shouldYield,lp=$e.unstable_requestPaint,xe=$e.unstable_now,ip=$e.unstable_getCurrentPriorityLevel,Us=$e.unstable_ImmediatePriority,Sc=$e.unstable_UserBlockingPriority,wl=$e.unstable_NormalPriority,sp=$e.unstable_LowPriority,Cc=$e.unstable_IdlePriority,$l=null,ut=null;function op(e){if(ut&&typeof ut.onCommitFiberRoot=="function")try{ut.onCommitFiberRoot($l,e,void 0,(e.current.flags&128)===128)}catch{}}var lt=Math.clz32?Math.clz32:up,ap=Math.log,cp=Math.LN2;function up(e){return e>>>=0,e===0?32:31-(ap(e)/cp|0)|0}var Gr=64,Xr=4194304;function lr(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function Sl(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,i=e.suspendedLanes,s=e.pingedLanes,o=n&268435455;if(o!==0){var a=o&~i;a!==0?r=lr(a):(s&=o,s!==0&&(r=lr(s)))}else o=n&~i,o!==0?r=lr(o):s!==0&&(r=lr(s));if(r===0)return 0;if(t!==0&&t!==r&&!(t&i)&&(i=r&-r,s=t&-t,i>=s||i===16&&(s&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0<t;)n=31-lt(t),i=1<<n,r|=e[n],t&=~i;return r}function dp(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function pp(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,s=e.pendingLanes;0<s;){var o=31-lt(s),a=1<<o,c=i[o];c===-1?(!(a&n)||a&r)&&(i[o]=dp(a,t)):c<=t&&(e.expiredLanes|=a),s&=~a}}function es(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function bc(){var e=Gr;return Gr<<=1,!(Gr&4194240)&&(Gr=64),e}function xi(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Lr(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-lt(t),e[t]=n}function fp(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0<n;){var i=31-lt(n),s=1<<i;t[i]=0,r[i]=-1,e[i]=-1,n&=~s}}function Vs(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-lt(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}var ie=0;function zc(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var Tc,Hs,Pc,Ec,Nc,ts=!1,Yr=[],Mt=null,Dt=null,Rt=null,mr=new Map,vr=new Map,Nt=[],hp="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function Ho(e,t){switch(e){case"focusin":case"focusout":Mt=null;break;case"dragenter":case"dragleave":Dt=null;break;case"mouseover":case"mouseout":Rt=null;break;case"pointerover":case"pointerout":mr.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":vr.delete(t.pointerId)}}function Xn(e,t,n,r,i,s){return e===null||e.nativeEvent!==s?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:s,targetContainers:[i]},t!==null&&(t=Dr(t),t!==null&&Hs(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function xp(e,t,n,r,i){switch(t){case"focusin":return Mt=Xn(Mt,e,t,n,r,i),!0;case"dragenter":return Dt=Xn(Dt,e,t,n,r,i),!0;case"mouseover":return Rt=Xn(Rt,e,t,n,r,i),!0;case"pointerover":var s=i.pointerId;return mr.set(s,Xn(mr.get(s)||null,e,t,n,r,i)),!0;case"gotpointercapture":return s=i.pointerId,vr.set(s,Xn(vr.get(s)||null,e,t,n,r,i)),!0}return!1}function Ic(e){var t=qt(e.target);if(t!==null){var n=pn(t);if(n!==null){if(t=n.tag,t===13){if(t=vc(n),t!==null){e.blockedOn=t,Nc(e.priority,function(){Pc(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function cl(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=ns(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);Yi=r,n.target.dispatchEvent(r),Yi=null}else return t=Dr(n),t!==null&&Hs(t),e.blockedOn=n,!1;t.shift()}return!0}function $o(e,t,n){cl(e)&&n.delete(t)}function gp(){ts=!1,Mt!==null&&cl(Mt)&&(Mt=null),Dt!==null&&cl(Dt)&&(Dt=null),Rt!==null&&cl(Rt)&&(Rt=null),mr.forEach($o),vr.forEach($o)}function Yn(e,t){e.blockedOn===t&&(e.blockedOn=null,ts||(ts=!0,$e.unstable_scheduleCallback($e.unstable_NormalPriority,gp)))}function kr(e){function t(i){return Yn(i,e)}if(0<Yr.length){Yn(Yr[0],e);for(var n=1;n<Yr.length;n++){var r=Yr[n];r.blockedOn===e&&(r.blockedOn=null)}}for(Mt!==null&&Yn(Mt,e),Dt!==null&&Yn(Dt,e),Rt!==null&&Yn(Rt,e),mr.forEach(t),vr.forEach(t),n=0;n<Nt.length;n++)r=Nt[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<Nt.length&&(n=Nt[0],n.blockedOn===null);)Ic(n),n.blockedOn===null&&Nt.shift()}var En=wt.ReactCurrentBatchConfig,Cl=!0;function yp(e,t,n,r){var i=ie,s=En.transition;En.transition=null;try{ie=1,$s(e,t,n,r)}finally{ie=i,En.transition=s}}function mp(e,t,n,r){var i=ie,s=En.transition;En.transition=null;try{ie=4,$s(e,t,n,r)}finally{ie=i,En.transition=s}}function $s(e,t,n,r){if(Cl){var i=ns(e,t,n,r);if(i===null)bi(e,t,r,bl,n),Ho(e,r);else if(xp(i,e,t,n,r))r.stopPropagation();else if(Ho(e,r),t&4&&-1<hp.indexOf(e)){for(;i!==null;){var s=Dr(i);if(s!==null&&Tc(s),s=ns(e,t,n,r),s===null&&bi(e,t,r,bl,n),s===i)break;i=s}i!==null&&r.stopPropagation()}else bi(e,t,r,null,n)}}var bl=null;function ns(e,t,n,r){if(bl=null,e=Bs(r),e=qt(e),e!==null)if(t=pn(e),t===null)e=null;else if(n=t.tag,n===13){if(e=vc(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return bl=e,null}function _c(e){switch(e){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(ip()){case Us:return 1;case Sc:return 4;case wl:case sp:return 16;case Cc:return 536870912;default:return 16}default:return 16}}var _t=null,Ks=null,ul=null;function Lc(){if(ul)return ul;var e,t=Ks,n=t.length,r,i="value"in _t?_t.value:_t.textContent,s=i.length;for(e=0;e<n&&t[e]===i[e];e++);var o=n-e;for(r=1;r<=o&&t[n-r]===i[s-r];r++);return ul=i.slice(e,1<r?1-r:void 0)}function dl(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function Jr(){return!0}function Ko(){return!1}function Qe(e){function t(n,r,i,s,o){this._reactName=n,this._targetInst=i,this.type=r,this.nativeEvent=s,this.target=o,this.currentTarget=null;for(var a in e)e.hasOwnProperty(a)&&(n=e[a],this[a]=n?n(s):s[a]);return this.isDefaultPrevented=(s.defaultPrevented!=null?s.defaultPrevented:s.returnValue===!1)?Jr:Ko,this.isPropagationStopped=Ko,this}return fe(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=Jr)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=Jr)},persist:function(){},isPersistent:Jr}),t}var Vn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Qs=Qe(Vn),Mr=fe({},Vn,{view:0,detail:0}),vp=Qe(Mr),gi,yi,Jn,Kl=fe({},Mr,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Gs,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==Jn&&(Jn&&e.type==="mousemove"?(gi=e.screenX-Jn.screenX,yi=e.screenY-Jn.screenY):yi=gi=0,Jn=e),gi)},movementY:function(e){return"movementY"in e?e.movementY:yi}}),Qo=Qe(Kl),kp=fe({},Kl,{dataTransfer:0}),jp=Qe(kp),wp=fe({},Mr,{relatedTarget:0}),mi=Qe(wp),Sp=fe({},Vn,{animationName:0,elapsedTime:0,pseudoElement:0}),Cp=Qe(Sp),bp=fe({},Vn,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),zp=Qe(bp),Tp=fe({},Vn,{data:0}),Go=Qe(Tp),Pp={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Ep={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},Np={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Ip(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Np[e])?!!t[e]:!1}function Gs(){return Ip}var _p=fe({},Mr,{key:function(e){if(e.key){var t=Pp[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=dl(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?Ep[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Gs,charCode:function(e){return e.type==="keypress"?dl(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?dl(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),Lp=Qe(_p),Mp=fe({},Kl,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Xo=Qe(Mp),Dp=fe({},Mr,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Gs}),Rp=Qe(Dp),Fp=fe({},Vn,{propertyName:0,elapsedTime:0,pseudoElement:0}),Ap=Qe(Fp),Op=fe({},Kl,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),Wp=Qe(Op),Bp=[9,13,27,32],Xs=mt&&"CompositionEvent"in window,ar=null;mt&&"documentMode"in document&&(ar=document.documentMode);var Up=mt&&"TextEvent"in window&&!ar,Mc=mt&&(!Xs||ar&&8<ar&&11>=ar),Yo=" ",Jo=!1;function Dc(e,t){switch(e){case"keyup":return Bp.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Rc(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var gn=!1;function Vp(e,t){switch(e){case"compositionend":return Rc(t);case"keypress":return t.which!==32?null:(Jo=!0,Yo);case"textInput":return e=t.data,e===Yo&&Jo?null:e;default:return null}}function Hp(e,t){if(gn)return e==="compositionend"||!Xs&&Dc(e,t)?(e=Lc(),ul=Ks=_t=null,gn=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return Mc&&t.locale!=="ko"?null:t.data;default:return null}}var $p={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Zo(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!$p[e.type]:t==="textarea"}function Fc(e,t,n,r){hc(r),t=zl(t,"onChange"),0<t.length&&(n=new Qs("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var cr=null,jr=null;function Kp(e){Gc(e,0)}function Ql(e){var t=vn(e);if(oc(t))return e}function Qp(e,t){if(e==="change")return t}var Ac=!1;if(mt){var vi;if(mt){var ki="oninput"in document;if(!ki){var qo=document.createElement("div");qo.setAttribute("oninput","return;"),ki=typeof qo.oninput=="function"}vi=ki}else vi=!1;Ac=vi&&(!document.documentMode||9<document.documentMode)}function ea(){cr&&(cr.detachEvent("onpropertychange",Oc),jr=cr=null)}function Oc(e){if(e.propertyName==="value"&&Ql(jr)){var t=[];Fc(t,jr,e,Bs(e)),mc(Kp,t)}}function Gp(e,t,n){e==="focusin"?(ea(),cr=t,jr=n,cr.attachEvent("onpropertychange",Oc)):e==="focusout"&&ea()}function Xp(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Ql(jr)}function Yp(e,t){if(e==="click")return Ql(t)}function Jp(e,t){if(e==="input"||e==="change")return Ql(t)}function Zp(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var st=typeof Object.is=="function"?Object.is:Zp;function wr(e,t){if(st(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!Ai.call(t,i)||!st(e[i],t[i]))return!1}return!0}function ta(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function na(e,t){var n=ta(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=ta(n)}}function Wc(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Wc(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Bc(){for(var e=window,t=vl();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=vl(e.document)}return t}function Ys(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function qp(e){var t=Bc(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&Wc(n.ownerDocument.documentElement,n)){if(r!==null&&Ys(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var i=n.textContent.length,s=Math.min(r.start,i);r=r.end===void 0?s:Math.min(r.end,i),!e.extend&&s>r&&(i=r,r=s,s=i),i=na(n,s);var o=na(n,r);i&&o&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==o.node||e.focusOffset!==o.offset)&&(t=t.createRange(),t.setStart(i.node,i.offset),e.removeAllRanges(),s>r?(e.addRange(t),e.extend(o.node,o.offset)):(t.setEnd(o.node,o.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n<t.length;n++)e=t[n],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var e1=mt&&"documentMode"in document&&11>=document.documentMode,yn=null,rs=null,ur=null,ls=!1;function ra(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;ls||yn==null||yn!==vl(r)||(r=yn,"selectionStart"in r&&Ys(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),ur&&wr(ur,r)||(ur=r,r=zl(rs,"onSelect"),0<r.length&&(t=new Qs("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=yn)))}function Zr(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var mn={animationend:Zr("Animation","AnimationEnd"),animationiteration:Zr("Animation","AnimationIteration"),animationstart:Zr("Animation","AnimationStart"),transitionend:Zr("Transition","TransitionEnd")},ji={},Uc={};mt&&(Uc=document.createElement("div").style,"AnimationEvent"in window||(delete mn.animationend.animation,delete mn.animationiteration.animation,delete mn.animationstart.animation),"TransitionEvent"in window||delete mn.transitionend.transition);function Gl(e){if(ji[e])return ji[e];if(!mn[e])return e;var t=mn[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Uc)return ji[e]=t[n];return e}var Vc=Gl("animationend"),Hc=Gl("animationiteration"),$c=Gl("animationstart"),Kc=Gl("transitionend"),Qc=new Map,la="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function $t(e,t){Qc.set(e,t),dn(t,[e])}for(var wi=0;wi<la.length;wi++){var Si=la[wi],t1=Si.toLowerCase(),n1=Si[0].toUpperCase()+Si.slice(1);$t(t1,"on"+n1)}$t(Vc,"onAnimationEnd");$t(Hc,"onAnimationIteration");$t($c,"onAnimationStart");$t("dblclick","onDoubleClick");$t("focusin","onFocus");$t("focusout","onBlur");$t(Kc,"onTransitionEnd");Mn("onMouseEnter",["mouseout","mouseover"]);Mn("onMouseLeave",["mouseout","mouseover"]);Mn("onPointerEnter",["pointerout","pointerover"]);Mn("onPointerLeave",["pointerout","pointerover"]);dn("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));dn("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));dn("onBeforeInput",["compositionend","keypress","textInput","paste"]);dn("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));dn("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));dn("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var ir="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),r1=new Set("cancel close invalid load scroll toggle".split(" ").concat(ir));function ia(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,tp(r,t,void 0,e),e.currentTarget=null}function Gc(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;e:{var s=void 0;if(t)for(var o=r.length-1;0<=o;o--){var a=r[o],c=a.instance,d=a.currentTarget;if(a=a.listener,c!==s&&i.isPropagationStopped())break e;ia(i,a,d),s=c}else for(o=0;o<r.length;o++){if(a=r[o],c=a.instance,d=a.currentTarget,a=a.listener,c!==s&&i.isPropagationStopped())break e;ia(i,a,d),s=c}}}if(jl)throw e=qi,jl=!1,qi=null,e}function ae(e,t){var n=t[cs];n===void 0&&(n=t[cs]=new Set);var r=e+"__bubble";n.has(r)||(Xc(t,e,2,!1),n.add(r))}function Ci(e,t,n){var r=0;t&&(r|=4),Xc(n,e,r,t)}var qr="_reactListening"+Math.random().toString(36).slice(2);function Sr(e){if(!e[qr]){e[qr]=!0,nc.forEach(function(n){n!=="selectionchange"&&(r1.has(n)||Ci(n,!1,e),Ci(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[qr]||(t[qr]=!0,Ci("selectionchange",!1,t))}}function Xc(e,t,n,r){switch(_c(t)){case 1:var i=yp;break;case 4:i=mp;break;default:i=$s}n=i.bind(null,t,n,e),i=void 0,!Zi||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(i=!0),r?i!==void 0?e.addEventListener(t,n,{capture:!0,passive:i}):e.addEventListener(t,n,!0):i!==void 0?e.addEventListener(t,n,{passive:i}):e.addEventListener(t,n,!1)}function bi(e,t,n,r,i){var s=r;if(!(t&1)&&!(t&2)&&r!==null)e:for(;;){if(r===null)return;var o=r.tag;if(o===3||o===4){var a=r.stateNode.containerInfo;if(a===i||a.nodeType===8&&a.parentNode===i)break;if(o===4)for(o=r.return;o!==null;){var c=o.tag;if((c===3||c===4)&&(c=o.stateNode.containerInfo,c===i||c.nodeType===8&&c.parentNode===i))return;o=o.return}for(;a!==null;){if(o=qt(a),o===null)return;if(c=o.tag,c===5||c===6){r=s=o;continue e}a=a.parentNode}}r=r.return}mc(function(){var d=s,x=Bs(n),y=[];e:{var g=Qc.get(e);if(g!==void 0){var k=Qs,S=e;switch(e){case"keypress":if(dl(n)===0)break e;case"keydown":case"keyup":k=Lp;break;case"focusin":S="focus",k=mi;break;case"focusout":S="blur",k=mi;break;case"beforeblur":case"afterblur":k=mi;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":k=Qo;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":k=jp;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":k=Rp;break;case Vc:case Hc:case $c:k=Cp;break;case Kc:k=Ap;break;case"scroll":k=vp;break;case"wheel":k=Wp;break;case"copy":case"cut":case"paste":k=zp;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":k=Xo}var m=(t&4)!==0,N=!m&&e==="scroll",p=m?g!==null?g+"Capture":null:g;m=[];for(var u=d,f;u!==null;){f=u;var j=f.stateNode;if(f.tag===5&&j!==null&&(f=j,p!==null&&(j=yr(u,p),j!=null&&m.push(Cr(u,j,f)))),N)break;u=u.return}0<m.length&&(g=new k(g,S,null,n,x),y.push({event:g,listeners:m}))}}if(!(t&7)){e:{if(g=e==="mouseover"||e==="pointerover",k=e==="mouseout"||e==="pointerout",g&&n!==Yi&&(S=n.relatedTarget||n.fromElement)&&(qt(S)||S[vt]))break e;if((k||g)&&(g=x.window===x?x:(g=x.ownerDocument)?g.defaultView||g.parentWindow:window,k?(S=n.relatedTarget||n.toElement,k=d,S=S?qt(S):null,S!==null&&(N=pn(S),S!==N||S.tag!==5&&S.tag!==6)&&(S=null)):(k=null,S=d),k!==S)){if(m=Qo,j="onMouseLeave",p="onMouseEnter",u="mouse",(e==="pointerout"||e==="pointerover")&&(m=Xo,j="onPointerLeave",p="onPointerEnter",u="pointer"),N=k==null?g:vn(k),f=S==null?g:vn(S),g=new m(j,u+"leave",k,n,x),g.target=N,g.relatedTarget=f,j=null,qt(x)===d&&(m=new m(p,u+"enter",S,n,x),m.target=f,m.relatedTarget=N,j=m),N=j,k&&S)t:{for(m=k,p=S,u=0,f=m;f;f=fn(f))u++;for(f=0,j=p;j;j=fn(j))f++;for(;0<u-f;)m=fn(m),u--;for(;0<f-u;)p=fn(p),f--;for(;u--;){if(m===p||p!==null&&m===p.alternate)break t;m=fn(m),p=fn(p)}m=null}else m=null;k!==null&&sa(y,g,k,m,!1),S!==null&&N!==null&&sa(y,N,S,m,!0)}}e:{if(g=d?vn(d):window,k=g.nodeName&&g.nodeName.toLowerCase(),k==="select"||k==="input"&&g.type==="file")var v=Qp;else if(Zo(g))if(Ac)v=Jp;else{v=Xp;var w=Gp}else(k=g.nodeName)&&k.toLowerCase()==="input"&&(g.type==="checkbox"||g.type==="radio")&&(v=Yp);if(v&&(v=v(e,d))){Fc(y,v,n,x);break e}w&&w(e,g,d),e==="focusout"&&(w=g._wrapperState)&&w.controlled&&g.type==="number"&&$i(g,"number",g.value)}switch(w=d?vn(d):window,e){case"focusin":(Zo(w)||w.contentEditable==="true")&&(yn=w,rs=d,ur=null);break;case"focusout":ur=rs=yn=null;break;case"mousedown":ls=!0;break;case"contextmenu":case"mouseup":case"dragend":ls=!1,ra(y,n,x);break;case"selectionchange":if(e1)break;case"keydown":case"keyup":ra(y,n,x)}var z;if(Xs)e:{switch(e){case"compositionstart":var T="onCompositionStart";break e;case"compositionend":T="onCompositionEnd";break e;case"compositionupdate":T="onCompositionUpdate";break e}T=void 0}else gn?Dc(e,n)&&(T="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(T="onCompositionStart");T&&(Mc&&n.locale!=="ko"&&(gn||T!=="onCompositionStart"?T==="onCompositionEnd"&&gn&&(z=Lc()):(_t=x,Ks="value"in _t?_t.value:_t.textContent,gn=!0)),w=zl(d,T),0<w.length&&(T=new Go(T,e,null,n,x),y.push({event:T,listeners:w}),z?T.data=z:(z=Rc(n),z!==null&&(T.data=z)))),(z=Up?Vp(e,n):Hp(e,n))&&(d=zl(d,"onBeforeInput"),0<d.length&&(x=new Go("onBeforeInput","beforeinput",null,n,x),y.push({event:x,listeners:d}),x.data=z))}Gc(y,t)})}function Cr(e,t,n){return{instance:e,listener:t,currentTarget:n}}function zl(e,t){for(var n=t+"Capture",r=[];e!==null;){var i=e,s=i.stateNode;i.tag===5&&s!==null&&(i=s,s=yr(e,n),s!=null&&r.unshift(Cr(e,s,i)),s=yr(e,t),s!=null&&r.push(Cr(e,s,i))),e=e.return}return r}function fn(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function sa(e,t,n,r,i){for(var s=t._reactName,o=[];n!==null&&n!==r;){var a=n,c=a.alternate,d=a.stateNode;if(c!==null&&c===r)break;a.tag===5&&d!==null&&(a=d,i?(c=yr(n,s),c!=null&&o.unshift(Cr(n,c,a))):i||(c=yr(n,s),c!=null&&o.push(Cr(n,c,a)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var l1=/\r\n?/g,i1=/\u0000|\uFFFD/g;function oa(e){return(typeof e=="string"?e:""+e).replace(l1,`
38
- `).replace(i1,"")}function el(e,t,n){if(t=oa(t),oa(e)!==t&&n)throw Error(_(425))}function Tl(){}var is=null,ss=null;function os(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var as=typeof setTimeout=="function"?setTimeout:void 0,s1=typeof clearTimeout=="function"?clearTimeout:void 0,aa=typeof Promise=="function"?Promise:void 0,o1=typeof queueMicrotask=="function"?queueMicrotask:typeof aa<"u"?function(e){return aa.resolve(null).then(e).catch(a1)}:as;function a1(e){setTimeout(function(){throw e})}function zi(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&i.nodeType===8)if(n=i.data,n==="/$"){if(r===0){e.removeChild(i),kr(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=i}while(n);kr(t)}function Ft(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?")break;if(t==="/$")return null}}return e}function ca(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"){if(t===0)return e;t--}else n==="/$"&&t++}e=e.previousSibling}return null}var Hn=Math.random().toString(36).slice(2),ct="__reactFiber$"+Hn,br="__reactProps$"+Hn,vt="__reactContainer$"+Hn,cs="__reactEvents$"+Hn,c1="__reactListeners$"+Hn,u1="__reactHandles$"+Hn;function qt(e){var t=e[ct];if(t)return t;for(var n=e.parentNode;n;){if(t=n[vt]||n[ct]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=ca(e);e!==null;){if(n=e[ct])return n;e=ca(e)}return t}e=n,n=e.parentNode}return null}function Dr(e){return e=e[ct]||e[vt],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function vn(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(_(33))}function Xl(e){return e[br]||null}var us=[],kn=-1;function Kt(e){return{current:e}}function ce(e){0>kn||(e.current=us[kn],us[kn]=null,kn--)}function oe(e,t){kn++,us[kn]=e.current,e.current=t}var Ht={},Ne=Kt(Ht),Fe=Kt(!1),ln=Ht;function Dn(e,t){var n=e.type.contextTypes;if(!n)return Ht;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i={},s;for(s in n)i[s]=t[s];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function Ae(e){return e=e.childContextTypes,e!=null}function Pl(){ce(Fe),ce(Ne)}function ua(e,t,n){if(Ne.current!==Ht)throw Error(_(168));oe(Ne,t),oe(Fe,n)}function Yc(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var i in r)if(!(i in t))throw Error(_(108,Gd(e)||"Unknown",i));return fe({},n,r)}function El(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Ht,ln=Ne.current,oe(Ne,e),oe(Fe,Fe.current),!0}function da(e,t,n){var r=e.stateNode;if(!r)throw Error(_(169));n?(e=Yc(e,t,ln),r.__reactInternalMemoizedMergedChildContext=e,ce(Fe),ce(Ne),oe(Ne,e)):ce(Fe),oe(Fe,n)}var ht=null,Yl=!1,Ti=!1;function Jc(e){ht===null?ht=[e]:ht.push(e)}function d1(e){Yl=!0,Jc(e)}function Qt(){if(!Ti&&ht!==null){Ti=!0;var e=0,t=ie;try{var n=ht;for(ie=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}ht=null,Yl=!1}catch(i){throw ht!==null&&(ht=ht.slice(e+1)),wc(Us,Qt),i}finally{ie=t,Ti=!1}}return null}var jn=[],wn=0,Nl=null,Il=0,Ge=[],Xe=0,sn=null,xt=1,gt="";function Yt(e,t){jn[wn++]=Il,jn[wn++]=Nl,Nl=e,Il=t}function Zc(e,t,n){Ge[Xe++]=xt,Ge[Xe++]=gt,Ge[Xe++]=sn,sn=e;var r=xt;e=gt;var i=32-lt(r)-1;r&=~(1<<i),n+=1;var s=32-lt(t)+i;if(30<s){var o=i-i%5;s=(r&(1<<o)-1).toString(32),r>>=o,i-=o,xt=1<<32-lt(t)+i|n<<i|r,gt=s+e}else xt=1<<s|n<<i|r,gt=e}function Js(e){e.return!==null&&(Yt(e,1),Zc(e,1,0))}function Zs(e){for(;e===Nl;)Nl=jn[--wn],jn[wn]=null,Il=jn[--wn],jn[wn]=null;for(;e===sn;)sn=Ge[--Xe],Ge[Xe]=null,gt=Ge[--Xe],Ge[Xe]=null,xt=Ge[--Xe],Ge[Xe]=null}var He=null,Ve=null,ue=!1,rt=null;function qc(e,t){var n=Ye(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,t=e.deletions,t===null?(e.deletions=[n],e.flags|=16):t.push(n)}function pa(e,t){switch(e.tag){case 5:var n=e.type;return t=t.nodeType!==1||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,He=e,Ve=Ft(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,He=e,Ve=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=sn!==null?{id:xt,overflow:gt}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=Ye(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,He=e,Ve=null,!0):!1;default:return!1}}function ds(e){return(e.mode&1)!==0&&(e.flags&128)===0}function ps(e){if(ue){var t=Ve;if(t){var n=t;if(!pa(e,t)){if(ds(e))throw Error(_(418));t=Ft(n.nextSibling);var r=He;t&&pa(e,t)?qc(r,n):(e.flags=e.flags&-4097|2,ue=!1,He=e)}}else{if(ds(e))throw Error(_(418));e.flags=e.flags&-4097|2,ue=!1,He=e}}}function fa(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;He=e}function tl(e){if(e!==He)return!1;if(!ue)return fa(e),ue=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!os(e.type,e.memoizedProps)),t&&(t=Ve)){if(ds(e))throw eu(),Error(_(418));for(;t;)qc(e,t),t=Ft(t.nextSibling)}if(fa(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(_(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){Ve=Ft(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}Ve=null}}else Ve=He?Ft(e.stateNode.nextSibling):null;return!0}function eu(){for(var e=Ve;e;)e=Ft(e.nextSibling)}function Rn(){Ve=He=null,ue=!1}function qs(e){rt===null?rt=[e]:rt.push(e)}var p1=wt.ReactCurrentBatchConfig;function Zn(e,t,n){if(e=n.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(n._owner){if(n=n._owner,n){if(n.tag!==1)throw Error(_(309));var r=n.stateNode}if(!r)throw Error(_(147,e));var i=r,s=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===s?t.ref:(t=function(o){var a=i.refs;o===null?delete a[s]:a[s]=o},t._stringRef=s,t)}if(typeof e!="string")throw Error(_(284));if(!n._owner)throw Error(_(290,e))}return e}function nl(e,t){throw e=Object.prototype.toString.call(t),Error(_(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function ha(e){var t=e._init;return t(e._payload)}function tu(e){function t(p,u){if(e){var f=p.deletions;f===null?(p.deletions=[u],p.flags|=16):f.push(u)}}function n(p,u){if(!e)return null;for(;u!==null;)t(p,u),u=u.sibling;return null}function r(p,u){for(p=new Map;u!==null;)u.key!==null?p.set(u.key,u):p.set(u.index,u),u=u.sibling;return p}function i(p,u){return p=Bt(p,u),p.index=0,p.sibling=null,p}function s(p,u,f){return p.index=f,e?(f=p.alternate,f!==null?(f=f.index,f<u?(p.flags|=2,u):f):(p.flags|=2,u)):(p.flags|=1048576,u)}function o(p){return e&&p.alternate===null&&(p.flags|=2),p}function a(p,u,f,j){return u===null||u.tag!==6?(u=Mi(f,p.mode,j),u.return=p,u):(u=i(u,f),u.return=p,u)}function c(p,u,f,j){var v=f.type;return v===xn?x(p,u,f.props.children,j,f.key):u!==null&&(u.elementType===v||typeof v=="object"&&v!==null&&v.$$typeof===Pt&&ha(v)===u.type)?(j=i(u,f.props),j.ref=Zn(p,u,f),j.return=p,j):(j=ml(f.type,f.key,f.props,null,p.mode,j),j.ref=Zn(p,u,f),j.return=p,j)}function d(p,u,f,j){return u===null||u.tag!==4||u.stateNode.containerInfo!==f.containerInfo||u.stateNode.implementation!==f.implementation?(u=Di(f,p.mode,j),u.return=p,u):(u=i(u,f.children||[]),u.return=p,u)}function x(p,u,f,j,v){return u===null||u.tag!==7?(u=rn(f,p.mode,j,v),u.return=p,u):(u=i(u,f),u.return=p,u)}function y(p,u,f){if(typeof u=="string"&&u!==""||typeof u=="number")return u=Mi(""+u,p.mode,f),u.return=p,u;if(typeof u=="object"&&u!==null){switch(u.$$typeof){case $r:return f=ml(u.type,u.key,u.props,null,p.mode,f),f.ref=Zn(p,null,u),f.return=p,f;case hn:return u=Di(u,p.mode,f),u.return=p,u;case Pt:var j=u._init;return y(p,j(u._payload),f)}if(rr(u)||Qn(u))return u=rn(u,p.mode,f,null),u.return=p,u;nl(p,u)}return null}function g(p,u,f,j){var v=u!==null?u.key:null;if(typeof f=="string"&&f!==""||typeof f=="number")return v!==null?null:a(p,u,""+f,j);if(typeof f=="object"&&f!==null){switch(f.$$typeof){case $r:return f.key===v?c(p,u,f,j):null;case hn:return f.key===v?d(p,u,f,j):null;case Pt:return v=f._init,g(p,u,v(f._payload),j)}if(rr(f)||Qn(f))return v!==null?null:x(p,u,f,j,null);nl(p,f)}return null}function k(p,u,f,j,v){if(typeof j=="string"&&j!==""||typeof j=="number")return p=p.get(f)||null,a(u,p,""+j,v);if(typeof j=="object"&&j!==null){switch(j.$$typeof){case $r:return p=p.get(j.key===null?f:j.key)||null,c(u,p,j,v);case hn:return p=p.get(j.key===null?f:j.key)||null,d(u,p,j,v);case Pt:var w=j._init;return k(p,u,f,w(j._payload),v)}if(rr(j)||Qn(j))return p=p.get(f)||null,x(u,p,j,v,null);nl(u,j)}return null}function S(p,u,f,j){for(var v=null,w=null,z=u,T=u=0,D=null;z!==null&&T<f.length;T++){z.index>T?(D=z,z=null):D=z.sibling;var L=g(p,z,f[T],j);if(L===null){z===null&&(z=D);break}e&&z&&L.alternate===null&&t(p,z),u=s(L,u,T),w===null?v=L:w.sibling=L,w=L,z=D}if(T===f.length)return n(p,z),ue&&Yt(p,T),v;if(z===null){for(;T<f.length;T++)z=y(p,f[T],j),z!==null&&(u=s(z,u,T),w===null?v=z:w.sibling=z,w=z);return ue&&Yt(p,T),v}for(z=r(p,z);T<f.length;T++)D=k(z,p,T,f[T],j),D!==null&&(e&&D.alternate!==null&&z.delete(D.key===null?T:D.key),u=s(D,u,T),w===null?v=D:w.sibling=D,w=D);return e&&z.forEach(function(Z){return t(p,Z)}),ue&&Yt(p,T),v}function m(p,u,f,j){var v=Qn(f);if(typeof v!="function")throw Error(_(150));if(f=v.call(f),f==null)throw Error(_(151));for(var w=v=null,z=u,T=u=0,D=null,L=f.next();z!==null&&!L.done;T++,L=f.next()){z.index>T?(D=z,z=null):D=z.sibling;var Z=g(p,z,L.value,j);if(Z===null){z===null&&(z=D);break}e&&z&&Z.alternate===null&&t(p,z),u=s(Z,u,T),w===null?v=Z:w.sibling=Z,w=Z,z=D}if(L.done)return n(p,z),ue&&Yt(p,T),v;if(z===null){for(;!L.done;T++,L=f.next())L=y(p,L.value,j),L!==null&&(u=s(L,u,T),w===null?v=L:w.sibling=L,w=L);return ue&&Yt(p,T),v}for(z=r(p,z);!L.done;T++,L=f.next())L=k(z,p,T,L.value,j),L!==null&&(e&&L.alternate!==null&&z.delete(L.key===null?T:L.key),u=s(L,u,T),w===null?v=L:w.sibling=L,w=L);return e&&z.forEach(function(U){return t(p,U)}),ue&&Yt(p,T),v}function N(p,u,f,j){if(typeof f=="object"&&f!==null&&f.type===xn&&f.key===null&&(f=f.props.children),typeof f=="object"&&f!==null){switch(f.$$typeof){case $r:e:{for(var v=f.key,w=u;w!==null;){if(w.key===v){if(v=f.type,v===xn){if(w.tag===7){n(p,w.sibling),u=i(w,f.props.children),u.return=p,p=u;break e}}else if(w.elementType===v||typeof v=="object"&&v!==null&&v.$$typeof===Pt&&ha(v)===w.type){n(p,w.sibling),u=i(w,f.props),u.ref=Zn(p,w,f),u.return=p,p=u;break e}n(p,w);break}else t(p,w);w=w.sibling}f.type===xn?(u=rn(f.props.children,p.mode,j,f.key),u.return=p,p=u):(j=ml(f.type,f.key,f.props,null,p.mode,j),j.ref=Zn(p,u,f),j.return=p,p=j)}return o(p);case hn:e:{for(w=f.key;u!==null;){if(u.key===w)if(u.tag===4&&u.stateNode.containerInfo===f.containerInfo&&u.stateNode.implementation===f.implementation){n(p,u.sibling),u=i(u,f.children||[]),u.return=p,p=u;break e}else{n(p,u);break}else t(p,u);u=u.sibling}u=Di(f,p.mode,j),u.return=p,p=u}return o(p);case Pt:return w=f._init,N(p,u,w(f._payload),j)}if(rr(f))return S(p,u,f,j);if(Qn(f))return m(p,u,f,j);nl(p,f)}return typeof f=="string"&&f!==""||typeof f=="number"?(f=""+f,u!==null&&u.tag===6?(n(p,u.sibling),u=i(u,f),u.return=p,p=u):(n(p,u),u=Mi(f,p.mode,j),u.return=p,p=u),o(p)):n(p,u)}return N}var Fn=tu(!0),nu=tu(!1),_l=Kt(null),Ll=null,Sn=null,eo=null;function to(){eo=Sn=Ll=null}function no(e){var t=_l.current;ce(_l),e._currentValue=t}function fs(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function Nn(e,t){Ll=e,eo=Sn=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(Re=!0),e.firstContext=null)}function Ze(e){var t=e._currentValue;if(eo!==e)if(e={context:e,memoizedValue:t,next:null},Sn===null){if(Ll===null)throw Error(_(308));Sn=e,Ll.dependencies={lanes:0,firstContext:e}}else Sn=Sn.next=e;return t}var en=null;function ro(e){en===null?en=[e]:en.push(e)}function ru(e,t,n,r){var i=t.interleaved;return i===null?(n.next=n,ro(t)):(n.next=i.next,i.next=n),t.interleaved=n,kt(e,r)}function kt(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var Et=!1;function lo(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function lu(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function yt(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function At(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,ne&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,kt(e,n)}return i=r.interleaved,i===null?(t.next=t,ro(r)):(t.next=i.next,i.next=t),r.interleaved=t,kt(e,n)}function pl(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Vs(e,n)}}function xa(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,s=null;if(n=n.firstBaseUpdate,n!==null){do{var o={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};s===null?i=s=o:s=s.next=o,n=n.next}while(n!==null);s===null?i=s=t:s=s.next=t}else i=s=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:s,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function Ml(e,t,n,r){var i=e.updateQueue;Et=!1;var s=i.firstBaseUpdate,o=i.lastBaseUpdate,a=i.shared.pending;if(a!==null){i.shared.pending=null;var c=a,d=c.next;c.next=null,o===null?s=d:o.next=d,o=c;var x=e.alternate;x!==null&&(x=x.updateQueue,a=x.lastBaseUpdate,a!==o&&(a===null?x.firstBaseUpdate=d:a.next=d,x.lastBaseUpdate=c))}if(s!==null){var y=i.baseState;o=0,x=d=c=null,a=s;do{var g=a.lane,k=a.eventTime;if((r&g)===g){x!==null&&(x=x.next={eventTime:k,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var S=e,m=a;switch(g=t,k=n,m.tag){case 1:if(S=m.payload,typeof S=="function"){y=S.call(k,y,g);break e}y=S;break e;case 3:S.flags=S.flags&-65537|128;case 0:if(S=m.payload,g=typeof S=="function"?S.call(k,y,g):S,g==null)break e;y=fe({},y,g);break e;case 2:Et=!0}}a.callback!==null&&a.lane!==0&&(e.flags|=64,g=i.effects,g===null?i.effects=[a]:g.push(a))}else k={eventTime:k,lane:g,tag:a.tag,payload:a.payload,callback:a.callback,next:null},x===null?(d=x=k,c=y):x=x.next=k,o|=g;if(a=a.next,a===null){if(a=i.shared.pending,a===null)break;g=a,a=g.next,g.next=null,i.lastBaseUpdate=g,i.shared.pending=null}}while(!0);if(x===null&&(c=y),i.baseState=c,i.firstBaseUpdate=d,i.lastBaseUpdate=x,t=i.shared.interleaved,t!==null){i=t;do o|=i.lane,i=i.next;while(i!==t)}else s===null&&(i.shared.lanes=0);an|=o,e.lanes=o,e.memoizedState=y}}function ga(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var r=e[t],i=r.callback;if(i!==null){if(r.callback=null,r=n,typeof i!="function")throw Error(_(191,i));i.call(r)}}}var Rr={},dt=Kt(Rr),zr=Kt(Rr),Tr=Kt(Rr);function tn(e){if(e===Rr)throw Error(_(174));return e}function io(e,t){switch(oe(Tr,t),oe(zr,e),oe(dt,Rr),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Qi(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=Qi(t,e)}ce(dt),oe(dt,t)}function An(){ce(dt),ce(zr),ce(Tr)}function iu(e){tn(Tr.current);var t=tn(dt.current),n=Qi(t,e.type);t!==n&&(oe(zr,e),oe(dt,n))}function so(e){zr.current===e&&(ce(dt),ce(zr))}var de=Kt(0);function Dl(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Pi=[];function oo(){for(var e=0;e<Pi.length;e++)Pi[e]._workInProgressVersionPrimary=null;Pi.length=0}var fl=wt.ReactCurrentDispatcher,Ei=wt.ReactCurrentBatchConfig,on=0,pe=null,ve=null,je=null,Rl=!1,dr=!1,Pr=0,f1=0;function Te(){throw Error(_(321))}function ao(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!st(e[n],t[n]))return!1;return!0}function co(e,t,n,r,i,s){if(on=s,pe=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,fl.current=e===null||e.memoizedState===null?y1:m1,e=n(r,i),dr){s=0;do{if(dr=!1,Pr=0,25<=s)throw Error(_(301));s+=1,je=ve=null,t.updateQueue=null,fl.current=v1,e=n(r,i)}while(dr)}if(fl.current=Fl,t=ve!==null&&ve.next!==null,on=0,je=ve=pe=null,Rl=!1,t)throw Error(_(300));return e}function uo(){var e=Pr!==0;return Pr=0,e}function at(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return je===null?pe.memoizedState=je=e:je=je.next=e,je}function qe(){if(ve===null){var e=pe.alternate;e=e!==null?e.memoizedState:null}else e=ve.next;var t=je===null?pe.memoizedState:je.next;if(t!==null)je=t,ve=e;else{if(e===null)throw Error(_(310));ve=e,e={memoizedState:ve.memoizedState,baseState:ve.baseState,baseQueue:ve.baseQueue,queue:ve.queue,next:null},je===null?pe.memoizedState=je=e:je=je.next=e}return je}function Er(e,t){return typeof t=="function"?t(e):t}function Ni(e){var t=qe(),n=t.queue;if(n===null)throw Error(_(311));n.lastRenderedReducer=e;var r=ve,i=r.baseQueue,s=n.pending;if(s!==null){if(i!==null){var o=i.next;i.next=s.next,s.next=o}r.baseQueue=i=s,n.pending=null}if(i!==null){s=i.next,r=r.baseState;var a=o=null,c=null,d=s;do{var x=d.lane;if((on&x)===x)c!==null&&(c=c.next={lane:0,action:d.action,hasEagerState:d.hasEagerState,eagerState:d.eagerState,next:null}),r=d.hasEagerState?d.eagerState:e(r,d.action);else{var y={lane:x,action:d.action,hasEagerState:d.hasEagerState,eagerState:d.eagerState,next:null};c===null?(a=c=y,o=r):c=c.next=y,pe.lanes|=x,an|=x}d=d.next}while(d!==null&&d!==s);c===null?o=r:c.next=a,st(r,t.memoizedState)||(Re=!0),t.memoizedState=r,t.baseState=o,t.baseQueue=c,n.lastRenderedState=r}if(e=n.interleaved,e!==null){i=e;do s=i.lane,pe.lanes|=s,an|=s,i=i.next;while(i!==e)}else i===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function Ii(e){var t=qe(),n=t.queue;if(n===null)throw Error(_(311));n.lastRenderedReducer=e;var r=n.dispatch,i=n.pending,s=t.memoizedState;if(i!==null){n.pending=null;var o=i=i.next;do s=e(s,o.action),o=o.next;while(o!==i);st(s,t.memoizedState)||(Re=!0),t.memoizedState=s,t.baseQueue===null&&(t.baseState=s),n.lastRenderedState=s}return[s,r]}function su(){}function ou(e,t){var n=pe,r=qe(),i=t(),s=!st(r.memoizedState,i);if(s&&(r.memoizedState=i,Re=!0),r=r.queue,po(uu.bind(null,n,r,e),[e]),r.getSnapshot!==t||s||je!==null&&je.memoizedState.tag&1){if(n.flags|=2048,Nr(9,cu.bind(null,n,r,i,t),void 0,null),we===null)throw Error(_(349));on&30||au(n,t,i)}return i}function au(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=pe.updateQueue,t===null?(t={lastEffect:null,stores:null},pe.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function cu(e,t,n,r){t.value=n,t.getSnapshot=r,du(t)&&pu(e)}function uu(e,t,n){return n(function(){du(t)&&pu(e)})}function du(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!st(e,n)}catch{return!0}}function pu(e){var t=kt(e,1);t!==null&&it(t,e,1,-1)}function ya(e){var t=at();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Er,lastRenderedState:e},t.queue=e,e=e.dispatch=g1.bind(null,pe,e),[t.memoizedState,e]}function Nr(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=pe.updateQueue,t===null?(t={lastEffect:null,stores:null},pe.updateQueue=t,t.lastEffect=e.next=e):(n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e)),e}function fu(){return qe().memoizedState}function hl(e,t,n,r){var i=at();pe.flags|=e,i.memoizedState=Nr(1|t,n,void 0,r===void 0?null:r)}function Jl(e,t,n,r){var i=qe();r=r===void 0?null:r;var s=void 0;if(ve!==null){var o=ve.memoizedState;if(s=o.destroy,r!==null&&ao(r,o.deps)){i.memoizedState=Nr(t,n,s,r);return}}pe.flags|=e,i.memoizedState=Nr(1|t,n,s,r)}function ma(e,t){return hl(8390656,8,e,t)}function po(e,t){return Jl(2048,8,e,t)}function hu(e,t){return Jl(4,2,e,t)}function xu(e,t){return Jl(4,4,e,t)}function gu(e,t){if(typeof t=="function")return e=e(),t(e),function(){t(null)};if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function yu(e,t,n){return n=n!=null?n.concat([e]):null,Jl(4,4,gu.bind(null,t,e),n)}function fo(){}function mu(e,t){var n=qe();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&ao(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function vu(e,t){var n=qe();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&ao(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function ku(e,t,n){return on&21?(st(n,t)||(n=bc(),pe.lanes|=n,an|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,Re=!0),e.memoizedState=n)}function h1(e,t){var n=ie;ie=n!==0&&4>n?n:4,e(!0);var r=Ei.transition;Ei.transition={};try{e(!1),t()}finally{ie=n,Ei.transition=r}}function ju(){return qe().memoizedState}function x1(e,t,n){var r=Wt(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},wu(e))Su(t,n);else if(n=ru(e,t,n,r),n!==null){var i=_e();it(n,e,r,i),Cu(n,t,r)}}function g1(e,t,n){var r=Wt(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(wu(e))Su(t,i);else{var s=e.alternate;if(e.lanes===0&&(s===null||s.lanes===0)&&(s=t.lastRenderedReducer,s!==null))try{var o=t.lastRenderedState,a=s(o,n);if(i.hasEagerState=!0,i.eagerState=a,st(a,o)){var c=t.interleaved;c===null?(i.next=i,ro(t)):(i.next=c.next,c.next=i),t.interleaved=i;return}}catch{}finally{}n=ru(e,t,i,r),n!==null&&(i=_e(),it(n,e,r,i),Cu(n,t,r))}}function wu(e){var t=e.alternate;return e===pe||t!==null&&t===pe}function Su(e,t){dr=Rl=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Cu(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Vs(e,n)}}var Fl={readContext:Ze,useCallback:Te,useContext:Te,useEffect:Te,useImperativeHandle:Te,useInsertionEffect:Te,useLayoutEffect:Te,useMemo:Te,useReducer:Te,useRef:Te,useState:Te,useDebugValue:Te,useDeferredValue:Te,useTransition:Te,useMutableSource:Te,useSyncExternalStore:Te,useId:Te,unstable_isNewReconciler:!1},y1={readContext:Ze,useCallback:function(e,t){return at().memoizedState=[e,t===void 0?null:t],e},useContext:Ze,useEffect:ma,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,hl(4194308,4,gu.bind(null,t,e),n)},useLayoutEffect:function(e,t){return hl(4194308,4,e,t)},useInsertionEffect:function(e,t){return hl(4,2,e,t)},useMemo:function(e,t){var n=at();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=at();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=x1.bind(null,pe,e),[r.memoizedState,e]},useRef:function(e){var t=at();return e={current:e},t.memoizedState=e},useState:ya,useDebugValue:fo,useDeferredValue:function(e){return at().memoizedState=e},useTransition:function(){var e=ya(!1),t=e[0];return e=h1.bind(null,e[1]),at().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=pe,i=at();if(ue){if(n===void 0)throw Error(_(407));n=n()}else{if(n=t(),we===null)throw Error(_(349));on&30||au(r,t,n)}i.memoizedState=n;var s={value:n,getSnapshot:t};return i.queue=s,ma(uu.bind(null,r,s,e),[e]),r.flags|=2048,Nr(9,cu.bind(null,r,s,n,t),void 0,null),n},useId:function(){var e=at(),t=we.identifierPrefix;if(ue){var n=gt,r=xt;n=(r&~(1<<32-lt(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=Pr++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=f1++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},m1={readContext:Ze,useCallback:mu,useContext:Ze,useEffect:po,useImperativeHandle:yu,useInsertionEffect:hu,useLayoutEffect:xu,useMemo:vu,useReducer:Ni,useRef:fu,useState:function(){return Ni(Er)},useDebugValue:fo,useDeferredValue:function(e){var t=qe();return ku(t,ve.memoizedState,e)},useTransition:function(){var e=Ni(Er)[0],t=qe().memoizedState;return[e,t]},useMutableSource:su,useSyncExternalStore:ou,useId:ju,unstable_isNewReconciler:!1},v1={readContext:Ze,useCallback:mu,useContext:Ze,useEffect:po,useImperativeHandle:yu,useInsertionEffect:hu,useLayoutEffect:xu,useMemo:vu,useReducer:Ii,useRef:fu,useState:function(){return Ii(Er)},useDebugValue:fo,useDeferredValue:function(e){var t=qe();return ve===null?t.memoizedState=e:ku(t,ve.memoizedState,e)},useTransition:function(){var e=Ii(Er)[0],t=qe().memoizedState;return[e,t]},useMutableSource:su,useSyncExternalStore:ou,useId:ju,unstable_isNewReconciler:!1};function tt(e,t){if(e&&e.defaultProps){t=fe({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}function hs(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:fe({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Zl={isMounted:function(e){return(e=e._reactInternals)?pn(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=_e(),i=Wt(e),s=yt(r,i);s.payload=t,n!=null&&(s.callback=n),t=At(e,s,i),t!==null&&(it(t,e,i,r),pl(t,e,i))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=_e(),i=Wt(e),s=yt(r,i);s.tag=1,s.payload=t,n!=null&&(s.callback=n),t=At(e,s,i),t!==null&&(it(t,e,i,r),pl(t,e,i))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=_e(),r=Wt(e),i=yt(n,r);i.tag=2,t!=null&&(i.callback=t),t=At(e,i,r),t!==null&&(it(t,e,r,n),pl(t,e,r))}};function va(e,t,n,r,i,s,o){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,s,o):t.prototype&&t.prototype.isPureReactComponent?!wr(n,r)||!wr(i,s):!0}function bu(e,t,n){var r=!1,i=Ht,s=t.contextType;return typeof s=="object"&&s!==null?s=Ze(s):(i=Ae(t)?ln:Ne.current,r=t.contextTypes,s=(r=r!=null)?Dn(e,i):Ht),t=new t(n,s),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=Zl,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=i,e.__reactInternalMemoizedMaskedChildContext=s),t}function ka(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&Zl.enqueueReplaceState(t,t.state,null)}function xs(e,t,n,r){var i=e.stateNode;i.props=n,i.state=e.memoizedState,i.refs={},lo(e);var s=t.contextType;typeof s=="object"&&s!==null?i.context=Ze(s):(s=Ae(t)?ln:Ne.current,i.context=Dn(e,s)),i.state=e.memoizedState,s=t.getDerivedStateFromProps,typeof s=="function"&&(hs(e,t,s,n),i.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof i.getSnapshotBeforeUpdate=="function"||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(t=i.state,typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount(),t!==i.state&&Zl.enqueueReplaceState(i,i.state,null),Ml(e,n,i,r),i.state=e.memoizedState),typeof i.componentDidMount=="function"&&(e.flags|=4194308)}function On(e,t){try{var n="",r=t;do n+=Qd(r),r=r.return;while(r);var i=n}catch(s){i=`
37
+ `+i[o].replace(" at new "," at ");return e.displayName&&c.includes("<anonymous>")&&(c=c.replace("<anonymous>",e.displayName)),c}while(1<=o&&0<=a);break}}}finally{fi=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?nr(e):""}function Qd(e){switch(e.tag){case 5:return nr(e.type);case 16:return nr("Lazy");case 13:return nr("Suspense");case 19:return nr("SuspenseList");case 0:case 2:case 15:return e=hi(e.type,!1),e;case 11:return e=hi(e.type.render,!1),e;case 1:return e=hi(e.type,!0),e;default:return""}}function Vi(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case yn:return"Fragment";case gn:return"Portal";case Wi:return"Profiler";case Os:return"StrictMode";case Bi:return"Suspense";case Ui:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case lc:return(e.displayName||"Context")+".Consumer";case rc:return(e._context.displayName||"Context")+".Provider";case Ws:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Bs:return t=e.displayName||null,t!==null?t:Vi(e.type)||"Memo";case Pt:t=e._payload,e=e._init;try{return Vi(e(t))}catch{}}return null}function Gd(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Vi(t);case 8:return t===Os?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function Ht(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function sc(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Xd(e){var t=sc(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var i=n.get,s=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(o){r=""+o,s.call(this,o)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(o){r=""+o},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Kr(e){e._valueTracker||(e._valueTracker=Xd(e))}function oc(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=sc(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function vl(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function Hi(e,t){var n=t.checked;return fe({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function Fo(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=Ht(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function ac(e,t){t=t.checked,t!=null&&As(e,"checked",t,!1)}function $i(e,t){ac(e,t);var n=Ht(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?Ki(e,t.type,n):t.hasOwnProperty("defaultValue")&&Ki(e,t.type,Ht(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Ao(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function Ki(e,t,n){(t!=="number"||vl(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var rr=Array.isArray;function Pn(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t["$"+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty("$"+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=""+Ht(n),t=null,i=0;i<e.length;i++){if(e[i].value===n){e[i].selected=!0,r&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function Qi(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(_(91));return fe({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function Oo(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(_(92));if(rr(n)){if(1<n.length)throw Error(_(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:Ht(n)}}function cc(e,t){var n=Ht(t.value),r=Ht(t.defaultValue);n!=null&&(n=""+n,n!==e.value&&(e.value=n),t.defaultValue==null&&e.defaultValue!==n&&(e.defaultValue=n)),r!=null&&(e.defaultValue=""+r)}function Wo(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function uc(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function Gi(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?uc(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var Qr,dc=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,n,r,i){MSApp.execUnsafeLocalFunction(function(){return e(t,n,r,i)})}:e}(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(Qr=Qr||document.createElement("div"),Qr.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=Qr.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function gr(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var sr={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Yd=["Webkit","ms","Moz","O"];Object.keys(sr).forEach(function(e){Yd.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),sr[t]=sr[e]})});function pc(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||sr.hasOwnProperty(e)&&sr[e]?(""+t).trim():t+"px"}function fc(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=pc(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}var Zd=fe({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Xi(e,t){if(t){if(Zd[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(_(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(_(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(_(61))}if(t.style!=null&&typeof t.style!="object")throw Error(_(62))}}function Yi(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Zi=null;function Us(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Ji=null,En=null,Nn=null;function Bo(e){if(e=Dr(e)){if(typeof Ji!="function")throw Error(_(280));var t=e.stateNode;t&&(t=Xl(t),Ji(e.stateNode,e.type,t))}}function hc(e){En?Nn?Nn.push(e):Nn=[e]:En=e}function xc(){if(En){var e=En,t=Nn;if(Nn=En=null,Bo(e),t)for(e=0;e<t.length;e++)Bo(t[e])}}function gc(e,t){return e(t)}function yc(){}var xi=!1;function mc(e,t,n){if(xi)return e(t,n);xi=!0;try{return gc(e,t,n)}finally{xi=!1,(En!==null||Nn!==null)&&(yc(),xc())}}function yr(e,t){var n=e.stateNode;if(n===null)return null;var r=Xl(n);if(r===null)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(e=e.type,r=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!r;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error(_(231,t,typeof n));return n}var qi=!1;if(mt)try{var Xn={};Object.defineProperty(Xn,"passive",{get:function(){qi=!0}}),window.addEventListener("test",Xn,Xn),window.removeEventListener("test",Xn,Xn)}catch{qi=!1}function Jd(e,t,n,r,i,s,o,a,c){var u=Array.prototype.slice.call(arguments,3);try{t.apply(n,u)}catch(x){this.onError(x)}}var or=!1,kl=null,jl=!1,es=null,qd={onError:function(e){or=!0,kl=e}};function ep(e,t,n,r,i,s,o,a,c){or=!1,kl=null,Jd.apply(qd,arguments)}function tp(e,t,n,r,i,s,o,a,c){if(ep.apply(this,arguments),or){if(or){var u=kl;or=!1,kl=null}else throw Error(_(198));jl||(jl=!0,es=u)}}function pn(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function vc(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function Uo(e){if(pn(e)!==e)throw Error(_(188))}function np(e){var t=e.alternate;if(!t){if(t=pn(e),t===null)throw Error(_(188));return t!==e?null:e}for(var n=e,r=t;;){var i=n.return;if(i===null)break;var s=i.alternate;if(s===null){if(r=i.return,r!==null){n=r;continue}break}if(i.child===s.child){for(s=i.child;s;){if(s===n)return Uo(i),e;if(s===r)return Uo(i),t;s=s.sibling}throw Error(_(188))}if(n.return!==r.return)n=i,r=s;else{for(var o=!1,a=i.child;a;){if(a===n){o=!0,n=i,r=s;break}if(a===r){o=!0,r=i,n=s;break}a=a.sibling}if(!o){for(a=s.child;a;){if(a===n){o=!0,n=s,r=i;break}if(a===r){o=!0,r=s,n=i;break}a=a.sibling}if(!o)throw Error(_(189))}}if(n.alternate!==r)throw Error(_(190))}if(n.tag!==3)throw Error(_(188));return n.stateNode.current===n?e:t}function kc(e){return e=np(e),e!==null?jc(e):null}function jc(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=jc(e);if(t!==null)return t;e=e.sibling}return null}var wc=$e.unstable_scheduleCallback,Vo=$e.unstable_cancelCallback,rp=$e.unstable_shouldYield,lp=$e.unstable_requestPaint,xe=$e.unstable_now,ip=$e.unstable_getCurrentPriorityLevel,Vs=$e.unstable_ImmediatePriority,Sc=$e.unstable_UserBlockingPriority,wl=$e.unstable_NormalPriority,sp=$e.unstable_LowPriority,Cc=$e.unstable_IdlePriority,$l=null,ut=null;function op(e){if(ut&&typeof ut.onCommitFiberRoot=="function")try{ut.onCommitFiberRoot($l,e,void 0,(e.current.flags&128)===128)}catch{}}var lt=Math.clz32?Math.clz32:up,ap=Math.log,cp=Math.LN2;function up(e){return e>>>=0,e===0?32:31-(ap(e)/cp|0)|0}var Gr=64,Xr=4194304;function lr(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function Sl(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,i=e.suspendedLanes,s=e.pingedLanes,o=n&268435455;if(o!==0){var a=o&~i;a!==0?r=lr(a):(s&=o,s!==0&&(r=lr(s)))}else o=n&~i,o!==0?r=lr(o):s!==0&&(r=lr(s));if(r===0)return 0;if(t!==0&&t!==r&&!(t&i)&&(i=r&-r,s=t&-t,i>=s||i===16&&(s&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0<t;)n=31-lt(t),i=1<<n,r|=e[n],t&=~i;return r}function dp(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function pp(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,s=e.pendingLanes;0<s;){var o=31-lt(s),a=1<<o,c=i[o];c===-1?(!(a&n)||a&r)&&(i[o]=dp(a,t)):c<=t&&(e.expiredLanes|=a),s&=~a}}function ts(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function bc(){var e=Gr;return Gr<<=1,!(Gr&4194240)&&(Gr=64),e}function gi(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Lr(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-lt(t),e[t]=n}function fp(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0<n;){var i=31-lt(n),s=1<<i;t[i]=0,r[i]=-1,e[i]=-1,n&=~s}}function Hs(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-lt(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}var ie=0;function zc(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var Tc,$s,Pc,Ec,Nc,ns=!1,Yr=[],Dt=null,Rt=null,Ft=null,mr=new Map,vr=new Map,Nt=[],hp="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function Ho(e,t){switch(e){case"focusin":case"focusout":Dt=null;break;case"dragenter":case"dragleave":Rt=null;break;case"mouseover":case"mouseout":Ft=null;break;case"pointerover":case"pointerout":mr.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":vr.delete(t.pointerId)}}function Yn(e,t,n,r,i,s){return e===null||e.nativeEvent!==s?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:s,targetContainers:[i]},t!==null&&(t=Dr(t),t!==null&&$s(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function xp(e,t,n,r,i){switch(t){case"focusin":return Dt=Yn(Dt,e,t,n,r,i),!0;case"dragenter":return Rt=Yn(Rt,e,t,n,r,i),!0;case"mouseover":return Ft=Yn(Ft,e,t,n,r,i),!0;case"pointerover":var s=i.pointerId;return mr.set(s,Yn(mr.get(s)||null,e,t,n,r,i)),!0;case"gotpointercapture":return s=i.pointerId,vr.set(s,Yn(vr.get(s)||null,e,t,n,r,i)),!0}return!1}function Ic(e){var t=qt(e.target);if(t!==null){var n=pn(t);if(n!==null){if(t=n.tag,t===13){if(t=vc(n),t!==null){e.blockedOn=t,Nc(e.priority,function(){Pc(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function cl(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=rs(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);Zi=r,n.target.dispatchEvent(r),Zi=null}else return t=Dr(n),t!==null&&$s(t),e.blockedOn=n,!1;t.shift()}return!0}function $o(e,t,n){cl(e)&&n.delete(t)}function gp(){ns=!1,Dt!==null&&cl(Dt)&&(Dt=null),Rt!==null&&cl(Rt)&&(Rt=null),Ft!==null&&cl(Ft)&&(Ft=null),mr.forEach($o),vr.forEach($o)}function Zn(e,t){e.blockedOn===t&&(e.blockedOn=null,ns||(ns=!0,$e.unstable_scheduleCallback($e.unstable_NormalPriority,gp)))}function kr(e){function t(i){return Zn(i,e)}if(0<Yr.length){Zn(Yr[0],e);for(var n=1;n<Yr.length;n++){var r=Yr[n];r.blockedOn===e&&(r.blockedOn=null)}}for(Dt!==null&&Zn(Dt,e),Rt!==null&&Zn(Rt,e),Ft!==null&&Zn(Ft,e),mr.forEach(t),vr.forEach(t),n=0;n<Nt.length;n++)r=Nt[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<Nt.length&&(n=Nt[0],n.blockedOn===null);)Ic(n),n.blockedOn===null&&Nt.shift()}var In=wt.ReactCurrentBatchConfig,Cl=!0;function yp(e,t,n,r){var i=ie,s=In.transition;In.transition=null;try{ie=1,Ks(e,t,n,r)}finally{ie=i,In.transition=s}}function mp(e,t,n,r){var i=ie,s=In.transition;In.transition=null;try{ie=4,Ks(e,t,n,r)}finally{ie=i,In.transition=s}}function Ks(e,t,n,r){if(Cl){var i=rs(e,t,n,r);if(i===null)zi(e,t,r,bl,n),Ho(e,r);else if(xp(i,e,t,n,r))r.stopPropagation();else if(Ho(e,r),t&4&&-1<hp.indexOf(e)){for(;i!==null;){var s=Dr(i);if(s!==null&&Tc(s),s=rs(e,t,n,r),s===null&&zi(e,t,r,bl,n),s===i)break;i=s}i!==null&&r.stopPropagation()}else zi(e,t,r,null,n)}}var bl=null;function rs(e,t,n,r){if(bl=null,e=Us(r),e=qt(e),e!==null)if(t=pn(e),t===null)e=null;else if(n=t.tag,n===13){if(e=vc(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return bl=e,null}function _c(e){switch(e){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(ip()){case Vs:return 1;case Sc:return 4;case wl:case sp:return 16;case Cc:return 536870912;default:return 16}default:return 16}}var Lt=null,Qs=null,ul=null;function Lc(){if(ul)return ul;var e,t=Qs,n=t.length,r,i="value"in Lt?Lt.value:Lt.textContent,s=i.length;for(e=0;e<n&&t[e]===i[e];e++);var o=n-e;for(r=1;r<=o&&t[n-r]===i[s-r];r++);return ul=i.slice(e,1<r?1-r:void 0)}function dl(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function Zr(){return!0}function Ko(){return!1}function Qe(e){function t(n,r,i,s,o){this._reactName=n,this._targetInst=i,this.type=r,this.nativeEvent=s,this.target=o,this.currentTarget=null;for(var a in e)e.hasOwnProperty(a)&&(n=e[a],this[a]=n?n(s):s[a]);return this.isDefaultPrevented=(s.defaultPrevented!=null?s.defaultPrevented:s.returnValue===!1)?Zr:Ko,this.isPropagationStopped=Ko,this}return fe(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=Zr)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=Zr)},persist:function(){},isPersistent:Zr}),t}var $n={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Gs=Qe($n),Mr=fe({},$n,{view:0,detail:0}),vp=Qe(Mr),yi,mi,Jn,Kl=fe({},Mr,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Xs,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==Jn&&(Jn&&e.type==="mousemove"?(yi=e.screenX-Jn.screenX,mi=e.screenY-Jn.screenY):mi=yi=0,Jn=e),yi)},movementY:function(e){return"movementY"in e?e.movementY:mi}}),Qo=Qe(Kl),kp=fe({},Kl,{dataTransfer:0}),jp=Qe(kp),wp=fe({},Mr,{relatedTarget:0}),vi=Qe(wp),Sp=fe({},$n,{animationName:0,elapsedTime:0,pseudoElement:0}),Cp=Qe(Sp),bp=fe({},$n,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),zp=Qe(bp),Tp=fe({},$n,{data:0}),Go=Qe(Tp),Pp={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Ep={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},Np={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Ip(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Np[e])?!!t[e]:!1}function Xs(){return Ip}var _p=fe({},Mr,{key:function(e){if(e.key){var t=Pp[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=dl(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?Ep[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Xs,charCode:function(e){return e.type==="keypress"?dl(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?dl(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),Lp=Qe(_p),Mp=fe({},Kl,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Xo=Qe(Mp),Dp=fe({},Mr,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Xs}),Rp=Qe(Dp),Fp=fe({},$n,{propertyName:0,elapsedTime:0,pseudoElement:0}),Ap=Qe(Fp),Op=fe({},Kl,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),Wp=Qe(Op),Bp=[9,13,27,32],Ys=mt&&"CompositionEvent"in window,ar=null;mt&&"documentMode"in document&&(ar=document.documentMode);var Up=mt&&"TextEvent"in window&&!ar,Mc=mt&&(!Ys||ar&&8<ar&&11>=ar),Yo=" ",Zo=!1;function Dc(e,t){switch(e){case"keyup":return Bp.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Rc(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var mn=!1;function Vp(e,t){switch(e){case"compositionend":return Rc(t);case"keypress":return t.which!==32?null:(Zo=!0,Yo);case"textInput":return e=t.data,e===Yo&&Zo?null:e;default:return null}}function Hp(e,t){if(mn)return e==="compositionend"||!Ys&&Dc(e,t)?(e=Lc(),ul=Qs=Lt=null,mn=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return Mc&&t.locale!=="ko"?null:t.data;default:return null}}var $p={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Jo(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!$p[e.type]:t==="textarea"}function Fc(e,t,n,r){hc(r),t=zl(t,"onChange"),0<t.length&&(n=new Gs("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var cr=null,jr=null;function Kp(e){Gc(e,0)}function Ql(e){var t=jn(e);if(oc(t))return e}function Qp(e,t){if(e==="change")return t}var Ac=!1;if(mt){var ki;if(mt){var ji="oninput"in document;if(!ji){var qo=document.createElement("div");qo.setAttribute("oninput","return;"),ji=typeof qo.oninput=="function"}ki=ji}else ki=!1;Ac=ki&&(!document.documentMode||9<document.documentMode)}function ea(){cr&&(cr.detachEvent("onpropertychange",Oc),jr=cr=null)}function Oc(e){if(e.propertyName==="value"&&Ql(jr)){var t=[];Fc(t,jr,e,Us(e)),mc(Kp,t)}}function Gp(e,t,n){e==="focusin"?(ea(),cr=t,jr=n,cr.attachEvent("onpropertychange",Oc)):e==="focusout"&&ea()}function Xp(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Ql(jr)}function Yp(e,t){if(e==="click")return Ql(t)}function Zp(e,t){if(e==="input"||e==="change")return Ql(t)}function Jp(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var st=typeof Object.is=="function"?Object.is:Jp;function wr(e,t){if(st(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!Oi.call(t,i)||!st(e[i],t[i]))return!1}return!0}function ta(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function na(e,t){var n=ta(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=ta(n)}}function Wc(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Wc(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Bc(){for(var e=window,t=vl();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=vl(e.document)}return t}function Zs(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function qp(e){var t=Bc(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&Wc(n.ownerDocument.documentElement,n)){if(r!==null&&Zs(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var i=n.textContent.length,s=Math.min(r.start,i);r=r.end===void 0?s:Math.min(r.end,i),!e.extend&&s>r&&(i=r,r=s,s=i),i=na(n,s);var o=na(n,r);i&&o&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==o.node||e.focusOffset!==o.offset)&&(t=t.createRange(),t.setStart(i.node,i.offset),e.removeAllRanges(),s>r?(e.addRange(t),e.extend(o.node,o.offset)):(t.setEnd(o.node,o.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n<t.length;n++)e=t[n],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var e1=mt&&"documentMode"in document&&11>=document.documentMode,vn=null,ls=null,ur=null,is=!1;function ra(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;is||vn==null||vn!==vl(r)||(r=vn,"selectionStart"in r&&Zs(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),ur&&wr(ur,r)||(ur=r,r=zl(ls,"onSelect"),0<r.length&&(t=new Gs("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=vn)))}function Jr(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var kn={animationend:Jr("Animation","AnimationEnd"),animationiteration:Jr("Animation","AnimationIteration"),animationstart:Jr("Animation","AnimationStart"),transitionend:Jr("Transition","TransitionEnd")},wi={},Uc={};mt&&(Uc=document.createElement("div").style,"AnimationEvent"in window||(delete kn.animationend.animation,delete kn.animationiteration.animation,delete kn.animationstart.animation),"TransitionEvent"in window||delete kn.transitionend.transition);function Gl(e){if(wi[e])return wi[e];if(!kn[e])return e;var t=kn[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Uc)return wi[e]=t[n];return e}var Vc=Gl("animationend"),Hc=Gl("animationiteration"),$c=Gl("animationstart"),Kc=Gl("transitionend"),Qc=new Map,la="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function Kt(e,t){Qc.set(e,t),dn(t,[e])}for(var Si=0;Si<la.length;Si++){var Ci=la[Si],t1=Ci.toLowerCase(),n1=Ci[0].toUpperCase()+Ci.slice(1);Kt(t1,"on"+n1)}Kt(Vc,"onAnimationEnd");Kt(Hc,"onAnimationIteration");Kt($c,"onAnimationStart");Kt("dblclick","onDoubleClick");Kt("focusin","onFocus");Kt("focusout","onBlur");Kt(Kc,"onTransitionEnd");Rn("onMouseEnter",["mouseout","mouseover"]);Rn("onMouseLeave",["mouseout","mouseover"]);Rn("onPointerEnter",["pointerout","pointerover"]);Rn("onPointerLeave",["pointerout","pointerover"]);dn("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));dn("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));dn("onBeforeInput",["compositionend","keypress","textInput","paste"]);dn("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));dn("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));dn("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var ir="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),r1=new Set("cancel close invalid load scroll toggle".split(" ").concat(ir));function ia(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,tp(r,t,void 0,e),e.currentTarget=null}function Gc(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;e:{var s=void 0;if(t)for(var o=r.length-1;0<=o;o--){var a=r[o],c=a.instance,u=a.currentTarget;if(a=a.listener,c!==s&&i.isPropagationStopped())break e;ia(i,a,u),s=c}else for(o=0;o<r.length;o++){if(a=r[o],c=a.instance,u=a.currentTarget,a=a.listener,c!==s&&i.isPropagationStopped())break e;ia(i,a,u),s=c}}}if(jl)throw e=es,jl=!1,es=null,e}function ae(e,t){var n=t[us];n===void 0&&(n=t[us]=new Set);var r=e+"__bubble";n.has(r)||(Xc(t,e,2,!1),n.add(r))}function bi(e,t,n){var r=0;t&&(r|=4),Xc(n,e,r,t)}var qr="_reactListening"+Math.random().toString(36).slice(2);function Sr(e){if(!e[qr]){e[qr]=!0,nc.forEach(function(n){n!=="selectionchange"&&(r1.has(n)||bi(n,!1,e),bi(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[qr]||(t[qr]=!0,bi("selectionchange",!1,t))}}function Xc(e,t,n,r){switch(_c(t)){case 1:var i=yp;break;case 4:i=mp;break;default:i=Ks}n=i.bind(null,t,n,e),i=void 0,!qi||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(i=!0),r?i!==void 0?e.addEventListener(t,n,{capture:!0,passive:i}):e.addEventListener(t,n,!0):i!==void 0?e.addEventListener(t,n,{passive:i}):e.addEventListener(t,n,!1)}function zi(e,t,n,r,i){var s=r;if(!(t&1)&&!(t&2)&&r!==null)e:for(;;){if(r===null)return;var o=r.tag;if(o===3||o===4){var a=r.stateNode.containerInfo;if(a===i||a.nodeType===8&&a.parentNode===i)break;if(o===4)for(o=r.return;o!==null;){var c=o.tag;if((c===3||c===4)&&(c=o.stateNode.containerInfo,c===i||c.nodeType===8&&c.parentNode===i))return;o=o.return}for(;a!==null;){if(o=qt(a),o===null)return;if(c=o.tag,c===5||c===6){r=s=o;continue e}a=a.parentNode}}r=r.return}mc(function(){var u=s,x=Us(n),y=[];e:{var g=Qc.get(e);if(g!==void 0){var k=Gs,C=e;switch(e){case"keypress":if(dl(n)===0)break e;case"keydown":case"keyup":k=Lp;break;case"focusin":C="focus",k=vi;break;case"focusout":C="blur",k=vi;break;case"beforeblur":case"afterblur":k=vi;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":k=Qo;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":k=jp;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":k=Rp;break;case Vc:case Hc:case $c:k=Cp;break;case Kc:k=Ap;break;case"scroll":k=vp;break;case"wheel":k=Wp;break;case"copy":case"cut":case"paste":k=zp;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":k=Xo}var m=(t&4)!==0,N=!m&&e==="scroll",p=m?g!==null?g+"Capture":null:g;m=[];for(var d=u,f;d!==null;){f=d;var w=f.stateNode;if(f.tag===5&&w!==null&&(f=w,p!==null&&(w=yr(d,p),w!=null&&m.push(Cr(d,w,f)))),N)break;d=d.return}0<m.length&&(g=new k(g,C,null,n,x),y.push({event:g,listeners:m}))}}if(!(t&7)){e:{if(g=e==="mouseover"||e==="pointerover",k=e==="mouseout"||e==="pointerout",g&&n!==Zi&&(C=n.relatedTarget||n.fromElement)&&(qt(C)||C[vt]))break e;if((k||g)&&(g=x.window===x?x:(g=x.ownerDocument)?g.defaultView||g.parentWindow:window,k?(C=n.relatedTarget||n.toElement,k=u,C=C?qt(C):null,C!==null&&(N=pn(C),C!==N||C.tag!==5&&C.tag!==6)&&(C=null)):(k=null,C=u),k!==C)){if(m=Qo,w="onMouseLeave",p="onMouseEnter",d="mouse",(e==="pointerout"||e==="pointerover")&&(m=Xo,w="onPointerLeave",p="onPointerEnter",d="pointer"),N=k==null?g:jn(k),f=C==null?g:jn(C),g=new m(w,d+"leave",k,n,x),g.target=N,g.relatedTarget=f,w=null,qt(x)===u&&(m=new m(p,d+"enter",C,n,x),m.target=f,m.relatedTarget=N,w=m),N=w,k&&C)t:{for(m=k,p=C,d=0,f=m;f;f=hn(f))d++;for(f=0,w=p;w;w=hn(w))f++;for(;0<d-f;)m=hn(m),d--;for(;0<f-d;)p=hn(p),f--;for(;d--;){if(m===p||p!==null&&m===p.alternate)break t;m=hn(m),p=hn(p)}m=null}else m=null;k!==null&&sa(y,g,k,m,!1),C!==null&&N!==null&&sa(y,N,C,m,!0)}}e:{if(g=u?jn(u):window,k=g.nodeName&&g.nodeName.toLowerCase(),k==="select"||k==="input"&&g.type==="file")var v=Qp;else if(Jo(g))if(Ac)v=Zp;else{v=Xp;var S=Gp}else(k=g.nodeName)&&k.toLowerCase()==="input"&&(g.type==="checkbox"||g.type==="radio")&&(v=Yp);if(v&&(v=v(e,u))){Fc(y,v,n,x);break e}S&&S(e,g,u),e==="focusout"&&(S=g._wrapperState)&&S.controlled&&g.type==="number"&&Ki(g,"number",g.value)}switch(S=u?jn(u):window,e){case"focusin":(Jo(S)||S.contentEditable==="true")&&(vn=S,ls=u,ur=null);break;case"focusout":ur=ls=vn=null;break;case"mousedown":is=!0;break;case"contextmenu":case"mouseup":case"dragend":is=!1,ra(y,n,x);break;case"selectionchange":if(e1)break;case"keydown":case"keyup":ra(y,n,x)}var z;if(Ys)e:{switch(e){case"compositionstart":var T="onCompositionStart";break e;case"compositionend":T="onCompositionEnd";break e;case"compositionupdate":T="onCompositionUpdate";break e}T=void 0}else mn?Dc(e,n)&&(T="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(T="onCompositionStart");T&&(Mc&&n.locale!=="ko"&&(mn||T!=="onCompositionStart"?T==="onCompositionEnd"&&mn&&(z=Lc()):(Lt=x,Qs="value"in Lt?Lt.value:Lt.textContent,mn=!0)),S=zl(u,T),0<S.length&&(T=new Go(T,e,null,n,x),y.push({event:T,listeners:S}),z?T.data=z:(z=Rc(n),z!==null&&(T.data=z)))),(z=Up?Vp(e,n):Hp(e,n))&&(u=zl(u,"onBeforeInput"),0<u.length&&(x=new Go("onBeforeInput","beforeinput",null,n,x),y.push({event:x,listeners:u}),x.data=z))}Gc(y,t)})}function Cr(e,t,n){return{instance:e,listener:t,currentTarget:n}}function zl(e,t){for(var n=t+"Capture",r=[];e!==null;){var i=e,s=i.stateNode;i.tag===5&&s!==null&&(i=s,s=yr(e,n),s!=null&&r.unshift(Cr(e,s,i)),s=yr(e,t),s!=null&&r.push(Cr(e,s,i))),e=e.return}return r}function hn(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function sa(e,t,n,r,i){for(var s=t._reactName,o=[];n!==null&&n!==r;){var a=n,c=a.alternate,u=a.stateNode;if(c!==null&&c===r)break;a.tag===5&&u!==null&&(a=u,i?(c=yr(n,s),c!=null&&o.unshift(Cr(n,c,a))):i||(c=yr(n,s),c!=null&&o.push(Cr(n,c,a)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var l1=/\r\n?/g,i1=/\u0000|\uFFFD/g;function oa(e){return(typeof e=="string"?e:""+e).replace(l1,`
38
+ `).replace(i1,"")}function el(e,t,n){if(t=oa(t),oa(e)!==t&&n)throw Error(_(425))}function Tl(){}var ss=null,os=null;function as(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var cs=typeof setTimeout=="function"?setTimeout:void 0,s1=typeof clearTimeout=="function"?clearTimeout:void 0,aa=typeof Promise=="function"?Promise:void 0,o1=typeof queueMicrotask=="function"?queueMicrotask:typeof aa<"u"?function(e){return aa.resolve(null).then(e).catch(a1)}:cs;function a1(e){setTimeout(function(){throw e})}function Ti(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&i.nodeType===8)if(n=i.data,n==="/$"){if(r===0){e.removeChild(i),kr(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=i}while(n);kr(t)}function At(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?")break;if(t==="/$")return null}}return e}function ca(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"){if(t===0)return e;t--}else n==="/$"&&t++}e=e.previousSibling}return null}var Kn=Math.random().toString(36).slice(2),ct="__reactFiber$"+Kn,br="__reactProps$"+Kn,vt="__reactContainer$"+Kn,us="__reactEvents$"+Kn,c1="__reactListeners$"+Kn,u1="__reactHandles$"+Kn;function qt(e){var t=e[ct];if(t)return t;for(var n=e.parentNode;n;){if(t=n[vt]||n[ct]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=ca(e);e!==null;){if(n=e[ct])return n;e=ca(e)}return t}e=n,n=e.parentNode}return null}function Dr(e){return e=e[ct]||e[vt],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function jn(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(_(33))}function Xl(e){return e[br]||null}var ds=[],wn=-1;function Qt(e){return{current:e}}function ce(e){0>wn||(e.current=ds[wn],ds[wn]=null,wn--)}function oe(e,t){wn++,ds[wn]=e.current,e.current=t}var $t={},Ne=Qt($t),Fe=Qt(!1),ln=$t;function Fn(e,t){var n=e.type.contextTypes;if(!n)return $t;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i={},s;for(s in n)i[s]=t[s];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function Ae(e){return e=e.childContextTypes,e!=null}function Pl(){ce(Fe),ce(Ne)}function ua(e,t,n){if(Ne.current!==$t)throw Error(_(168));oe(Ne,t),oe(Fe,n)}function Yc(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var i in r)if(!(i in t))throw Error(_(108,Gd(e)||"Unknown",i));return fe({},n,r)}function El(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||$t,ln=Ne.current,oe(Ne,e),oe(Fe,Fe.current),!0}function da(e,t,n){var r=e.stateNode;if(!r)throw Error(_(169));n?(e=Yc(e,t,ln),r.__reactInternalMemoizedMergedChildContext=e,ce(Fe),ce(Ne),oe(Ne,e)):ce(Fe),oe(Fe,n)}var ht=null,Yl=!1,Pi=!1;function Zc(e){ht===null?ht=[e]:ht.push(e)}function d1(e){Yl=!0,Zc(e)}function Gt(){if(!Pi&&ht!==null){Pi=!0;var e=0,t=ie;try{var n=ht;for(ie=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}ht=null,Yl=!1}catch(i){throw ht!==null&&(ht=ht.slice(e+1)),wc(Vs,Gt),i}finally{ie=t,Pi=!1}}return null}var Sn=[],Cn=0,Nl=null,Il=0,Ge=[],Xe=0,sn=null,xt=1,gt="";function Zt(e,t){Sn[Cn++]=Il,Sn[Cn++]=Nl,Nl=e,Il=t}function Jc(e,t,n){Ge[Xe++]=xt,Ge[Xe++]=gt,Ge[Xe++]=sn,sn=e;var r=xt;e=gt;var i=32-lt(r)-1;r&=~(1<<i),n+=1;var s=32-lt(t)+i;if(30<s){var o=i-i%5;s=(r&(1<<o)-1).toString(32),r>>=o,i-=o,xt=1<<32-lt(t)+i|n<<i|r,gt=s+e}else xt=1<<s|n<<i|r,gt=e}function Js(e){e.return!==null&&(Zt(e,1),Jc(e,1,0))}function qs(e){for(;e===Nl;)Nl=Sn[--Cn],Sn[Cn]=null,Il=Sn[--Cn],Sn[Cn]=null;for(;e===sn;)sn=Ge[--Xe],Ge[Xe]=null,gt=Ge[--Xe],Ge[Xe]=null,xt=Ge[--Xe],Ge[Xe]=null}var He=null,Ve=null,ue=!1,rt=null;function qc(e,t){var n=Ye(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,t=e.deletions,t===null?(e.deletions=[n],e.flags|=16):t.push(n)}function pa(e,t){switch(e.tag){case 5:var n=e.type;return t=t.nodeType!==1||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,He=e,Ve=At(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,He=e,Ve=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=sn!==null?{id:xt,overflow:gt}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=Ye(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,He=e,Ve=null,!0):!1;default:return!1}}function ps(e){return(e.mode&1)!==0&&(e.flags&128)===0}function fs(e){if(ue){var t=Ve;if(t){var n=t;if(!pa(e,t)){if(ps(e))throw Error(_(418));t=At(n.nextSibling);var r=He;t&&pa(e,t)?qc(r,n):(e.flags=e.flags&-4097|2,ue=!1,He=e)}}else{if(ps(e))throw Error(_(418));e.flags=e.flags&-4097|2,ue=!1,He=e}}}function fa(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;He=e}function tl(e){if(e!==He)return!1;if(!ue)return fa(e),ue=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!as(e.type,e.memoizedProps)),t&&(t=Ve)){if(ps(e))throw eu(),Error(_(418));for(;t;)qc(e,t),t=At(t.nextSibling)}if(fa(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(_(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){Ve=At(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}Ve=null}}else Ve=He?At(e.stateNode.nextSibling):null;return!0}function eu(){for(var e=Ve;e;)e=At(e.nextSibling)}function An(){Ve=He=null,ue=!1}function eo(e){rt===null?rt=[e]:rt.push(e)}var p1=wt.ReactCurrentBatchConfig;function qn(e,t,n){if(e=n.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(n._owner){if(n=n._owner,n){if(n.tag!==1)throw Error(_(309));var r=n.stateNode}if(!r)throw Error(_(147,e));var i=r,s=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===s?t.ref:(t=function(o){var a=i.refs;o===null?delete a[s]:a[s]=o},t._stringRef=s,t)}if(typeof e!="string")throw Error(_(284));if(!n._owner)throw Error(_(290,e))}return e}function nl(e,t){throw e=Object.prototype.toString.call(t),Error(_(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function ha(e){var t=e._init;return t(e._payload)}function tu(e){function t(p,d){if(e){var f=p.deletions;f===null?(p.deletions=[d],p.flags|=16):f.push(d)}}function n(p,d){if(!e)return null;for(;d!==null;)t(p,d),d=d.sibling;return null}function r(p,d){for(p=new Map;d!==null;)d.key!==null?p.set(d.key,d):p.set(d.index,d),d=d.sibling;return p}function i(p,d){return p=Ut(p,d),p.index=0,p.sibling=null,p}function s(p,d,f){return p.index=f,e?(f=p.alternate,f!==null?(f=f.index,f<d?(p.flags|=2,d):f):(p.flags|=2,d)):(p.flags|=1048576,d)}function o(p){return e&&p.alternate===null&&(p.flags|=2),p}function a(p,d,f,w){return d===null||d.tag!==6?(d=Di(f,p.mode,w),d.return=p,d):(d=i(d,f),d.return=p,d)}function c(p,d,f,w){var v=f.type;return v===yn?x(p,d,f.props.children,w,f.key):d!==null&&(d.elementType===v||typeof v=="object"&&v!==null&&v.$$typeof===Pt&&ha(v)===d.type)?(w=i(d,f.props),w.ref=qn(p,d,f),w.return=p,w):(w=ml(f.type,f.key,f.props,null,p.mode,w),w.ref=qn(p,d,f),w.return=p,w)}function u(p,d,f,w){return d===null||d.tag!==4||d.stateNode.containerInfo!==f.containerInfo||d.stateNode.implementation!==f.implementation?(d=Ri(f,p.mode,w),d.return=p,d):(d=i(d,f.children||[]),d.return=p,d)}function x(p,d,f,w,v){return d===null||d.tag!==7?(d=rn(f,p.mode,w,v),d.return=p,d):(d=i(d,f),d.return=p,d)}function y(p,d,f){if(typeof d=="string"&&d!==""||typeof d=="number")return d=Di(""+d,p.mode,f),d.return=p,d;if(typeof d=="object"&&d!==null){switch(d.$$typeof){case $r:return f=ml(d.type,d.key,d.props,null,p.mode,f),f.ref=qn(p,null,d),f.return=p,f;case gn:return d=Ri(d,p.mode,f),d.return=p,d;case Pt:var w=d._init;return y(p,w(d._payload),f)}if(rr(d)||Gn(d))return d=rn(d,p.mode,f,null),d.return=p,d;nl(p,d)}return null}function g(p,d,f,w){var v=d!==null?d.key:null;if(typeof f=="string"&&f!==""||typeof f=="number")return v!==null?null:a(p,d,""+f,w);if(typeof f=="object"&&f!==null){switch(f.$$typeof){case $r:return f.key===v?c(p,d,f,w):null;case gn:return f.key===v?u(p,d,f,w):null;case Pt:return v=f._init,g(p,d,v(f._payload),w)}if(rr(f)||Gn(f))return v!==null?null:x(p,d,f,w,null);nl(p,f)}return null}function k(p,d,f,w,v){if(typeof w=="string"&&w!==""||typeof w=="number")return p=p.get(f)||null,a(d,p,""+w,v);if(typeof w=="object"&&w!==null){switch(w.$$typeof){case $r:return p=p.get(w.key===null?f:w.key)||null,c(d,p,w,v);case gn:return p=p.get(w.key===null?f:w.key)||null,u(d,p,w,v);case Pt:var S=w._init;return k(p,d,f,S(w._payload),v)}if(rr(w)||Gn(w))return p=p.get(f)||null,x(d,p,w,v,null);nl(d,w)}return null}function C(p,d,f,w){for(var v=null,S=null,z=d,T=d=0,D=null;z!==null&&T<f.length;T++){z.index>T?(D=z,z=null):D=z.sibling;var L=g(p,z,f[T],w);if(L===null){z===null&&(z=D);break}e&&z&&L.alternate===null&&t(p,z),d=s(L,d,T),S===null?v=L:S.sibling=L,S=L,z=D}if(T===f.length)return n(p,z),ue&&Zt(p,T),v;if(z===null){for(;T<f.length;T++)z=y(p,f[T],w),z!==null&&(d=s(z,d,T),S===null?v=z:S.sibling=z,S=z);return ue&&Zt(p,T),v}for(z=r(p,z);T<f.length;T++)D=k(z,p,T,f[T],w),D!==null&&(e&&D.alternate!==null&&z.delete(D.key===null?T:D.key),d=s(D,d,T),S===null?v=D:S.sibling=D,S=D);return e&&z.forEach(function(J){return t(p,J)}),ue&&Zt(p,T),v}function m(p,d,f,w){var v=Gn(f);if(typeof v!="function")throw Error(_(150));if(f=v.call(f),f==null)throw Error(_(151));for(var S=v=null,z=d,T=d=0,D=null,L=f.next();z!==null&&!L.done;T++,L=f.next()){z.index>T?(D=z,z=null):D=z.sibling;var J=g(p,z,L.value,w);if(J===null){z===null&&(z=D);break}e&&z&&J.alternate===null&&t(p,z),d=s(J,d,T),S===null?v=J:S.sibling=J,S=J,z=D}if(L.done)return n(p,z),ue&&Zt(p,T),v;if(z===null){for(;!L.done;T++,L=f.next())L=y(p,L.value,w),L!==null&&(d=s(L,d,T),S===null?v=L:S.sibling=L,S=L);return ue&&Zt(p,T),v}for(z=r(p,z);!L.done;T++,L=f.next())L=k(z,p,T,L.value,w),L!==null&&(e&&L.alternate!==null&&z.delete(L.key===null?T:L.key),d=s(L,d,T),S===null?v=L:S.sibling=L,S=L);return e&&z.forEach(function(U){return t(p,U)}),ue&&Zt(p,T),v}function N(p,d,f,w){if(typeof f=="object"&&f!==null&&f.type===yn&&f.key===null&&(f=f.props.children),typeof f=="object"&&f!==null){switch(f.$$typeof){case $r:e:{for(var v=f.key,S=d;S!==null;){if(S.key===v){if(v=f.type,v===yn){if(S.tag===7){n(p,S.sibling),d=i(S,f.props.children),d.return=p,p=d;break e}}else if(S.elementType===v||typeof v=="object"&&v!==null&&v.$$typeof===Pt&&ha(v)===S.type){n(p,S.sibling),d=i(S,f.props),d.ref=qn(p,S,f),d.return=p,p=d;break e}n(p,S);break}else t(p,S);S=S.sibling}f.type===yn?(d=rn(f.props.children,p.mode,w,f.key),d.return=p,p=d):(w=ml(f.type,f.key,f.props,null,p.mode,w),w.ref=qn(p,d,f),w.return=p,p=w)}return o(p);case gn:e:{for(S=f.key;d!==null;){if(d.key===S)if(d.tag===4&&d.stateNode.containerInfo===f.containerInfo&&d.stateNode.implementation===f.implementation){n(p,d.sibling),d=i(d,f.children||[]),d.return=p,p=d;break e}else{n(p,d);break}else t(p,d);d=d.sibling}d=Ri(f,p.mode,w),d.return=p,p=d}return o(p);case Pt:return S=f._init,N(p,d,S(f._payload),w)}if(rr(f))return C(p,d,f,w);if(Gn(f))return m(p,d,f,w);nl(p,f)}return typeof f=="string"&&f!==""||typeof f=="number"?(f=""+f,d!==null&&d.tag===6?(n(p,d.sibling),d=i(d,f),d.return=p,p=d):(n(p,d),d=Di(f,p.mode,w),d.return=p,p=d),o(p)):n(p,d)}return N}var On=tu(!0),nu=tu(!1),_l=Qt(null),Ll=null,bn=null,to=null;function no(){to=bn=Ll=null}function ro(e){var t=_l.current;ce(_l),e._currentValue=t}function hs(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function _n(e,t){Ll=e,to=bn=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(Re=!0),e.firstContext=null)}function Je(e){var t=e._currentValue;if(to!==e)if(e={context:e,memoizedValue:t,next:null},bn===null){if(Ll===null)throw Error(_(308));bn=e,Ll.dependencies={lanes:0,firstContext:e}}else bn=bn.next=e;return t}var en=null;function lo(e){en===null?en=[e]:en.push(e)}function ru(e,t,n,r){var i=t.interleaved;return i===null?(n.next=n,lo(t)):(n.next=i.next,i.next=n),t.interleaved=n,kt(e,r)}function kt(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var Et=!1;function io(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function lu(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function yt(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Ot(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,ne&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,kt(e,n)}return i=r.interleaved,i===null?(t.next=t,lo(r)):(t.next=i.next,i.next=t),r.interleaved=t,kt(e,n)}function pl(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Hs(e,n)}}function xa(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,s=null;if(n=n.firstBaseUpdate,n!==null){do{var o={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};s===null?i=s=o:s=s.next=o,n=n.next}while(n!==null);s===null?i=s=t:s=s.next=t}else i=s=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:s,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function Ml(e,t,n,r){var i=e.updateQueue;Et=!1;var s=i.firstBaseUpdate,o=i.lastBaseUpdate,a=i.shared.pending;if(a!==null){i.shared.pending=null;var c=a,u=c.next;c.next=null,o===null?s=u:o.next=u,o=c;var x=e.alternate;x!==null&&(x=x.updateQueue,a=x.lastBaseUpdate,a!==o&&(a===null?x.firstBaseUpdate=u:a.next=u,x.lastBaseUpdate=c))}if(s!==null){var y=i.baseState;o=0,x=u=c=null,a=s;do{var g=a.lane,k=a.eventTime;if((r&g)===g){x!==null&&(x=x.next={eventTime:k,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var C=e,m=a;switch(g=t,k=n,m.tag){case 1:if(C=m.payload,typeof C=="function"){y=C.call(k,y,g);break e}y=C;break e;case 3:C.flags=C.flags&-65537|128;case 0:if(C=m.payload,g=typeof C=="function"?C.call(k,y,g):C,g==null)break e;y=fe({},y,g);break e;case 2:Et=!0}}a.callback!==null&&a.lane!==0&&(e.flags|=64,g=i.effects,g===null?i.effects=[a]:g.push(a))}else k={eventTime:k,lane:g,tag:a.tag,payload:a.payload,callback:a.callback,next:null},x===null?(u=x=k,c=y):x=x.next=k,o|=g;if(a=a.next,a===null){if(a=i.shared.pending,a===null)break;g=a,a=g.next,g.next=null,i.lastBaseUpdate=g,i.shared.pending=null}}while(!0);if(x===null&&(c=y),i.baseState=c,i.firstBaseUpdate=u,i.lastBaseUpdate=x,t=i.shared.interleaved,t!==null){i=t;do o|=i.lane,i=i.next;while(i!==t)}else s===null&&(i.shared.lanes=0);an|=o,e.lanes=o,e.memoizedState=y}}function ga(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var r=e[t],i=r.callback;if(i!==null){if(r.callback=null,r=n,typeof i!="function")throw Error(_(191,i));i.call(r)}}}var Rr={},dt=Qt(Rr),zr=Qt(Rr),Tr=Qt(Rr);function tn(e){if(e===Rr)throw Error(_(174));return e}function so(e,t){switch(oe(Tr,t),oe(zr,e),oe(dt,Rr),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Gi(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=Gi(t,e)}ce(dt),oe(dt,t)}function Wn(){ce(dt),ce(zr),ce(Tr)}function iu(e){tn(Tr.current);var t=tn(dt.current),n=Gi(t,e.type);t!==n&&(oe(zr,e),oe(dt,n))}function oo(e){zr.current===e&&(ce(dt),ce(zr))}var de=Qt(0);function Dl(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Ei=[];function ao(){for(var e=0;e<Ei.length;e++)Ei[e]._workInProgressVersionPrimary=null;Ei.length=0}var fl=wt.ReactCurrentDispatcher,Ni=wt.ReactCurrentBatchConfig,on=0,pe=null,ve=null,je=null,Rl=!1,dr=!1,Pr=0,f1=0;function Te(){throw Error(_(321))}function co(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!st(e[n],t[n]))return!1;return!0}function uo(e,t,n,r,i,s){if(on=s,pe=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,fl.current=e===null||e.memoizedState===null?y1:m1,e=n(r,i),dr){s=0;do{if(dr=!1,Pr=0,25<=s)throw Error(_(301));s+=1,je=ve=null,t.updateQueue=null,fl.current=v1,e=n(r,i)}while(dr)}if(fl.current=Fl,t=ve!==null&&ve.next!==null,on=0,je=ve=pe=null,Rl=!1,t)throw Error(_(300));return e}function po(){var e=Pr!==0;return Pr=0,e}function at(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return je===null?pe.memoizedState=je=e:je=je.next=e,je}function qe(){if(ve===null){var e=pe.alternate;e=e!==null?e.memoizedState:null}else e=ve.next;var t=je===null?pe.memoizedState:je.next;if(t!==null)je=t,ve=e;else{if(e===null)throw Error(_(310));ve=e,e={memoizedState:ve.memoizedState,baseState:ve.baseState,baseQueue:ve.baseQueue,queue:ve.queue,next:null},je===null?pe.memoizedState=je=e:je=je.next=e}return je}function Er(e,t){return typeof t=="function"?t(e):t}function Ii(e){var t=qe(),n=t.queue;if(n===null)throw Error(_(311));n.lastRenderedReducer=e;var r=ve,i=r.baseQueue,s=n.pending;if(s!==null){if(i!==null){var o=i.next;i.next=s.next,s.next=o}r.baseQueue=i=s,n.pending=null}if(i!==null){s=i.next,r=r.baseState;var a=o=null,c=null,u=s;do{var x=u.lane;if((on&x)===x)c!==null&&(c=c.next={lane:0,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),r=u.hasEagerState?u.eagerState:e(r,u.action);else{var y={lane:x,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null};c===null?(a=c=y,o=r):c=c.next=y,pe.lanes|=x,an|=x}u=u.next}while(u!==null&&u!==s);c===null?o=r:c.next=a,st(r,t.memoizedState)||(Re=!0),t.memoizedState=r,t.baseState=o,t.baseQueue=c,n.lastRenderedState=r}if(e=n.interleaved,e!==null){i=e;do s=i.lane,pe.lanes|=s,an|=s,i=i.next;while(i!==e)}else i===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function _i(e){var t=qe(),n=t.queue;if(n===null)throw Error(_(311));n.lastRenderedReducer=e;var r=n.dispatch,i=n.pending,s=t.memoizedState;if(i!==null){n.pending=null;var o=i=i.next;do s=e(s,o.action),o=o.next;while(o!==i);st(s,t.memoizedState)||(Re=!0),t.memoizedState=s,t.baseQueue===null&&(t.baseState=s),n.lastRenderedState=s}return[s,r]}function su(){}function ou(e,t){var n=pe,r=qe(),i=t(),s=!st(r.memoizedState,i);if(s&&(r.memoizedState=i,Re=!0),r=r.queue,fo(uu.bind(null,n,r,e),[e]),r.getSnapshot!==t||s||je!==null&&je.memoizedState.tag&1){if(n.flags|=2048,Nr(9,cu.bind(null,n,r,i,t),void 0,null),we===null)throw Error(_(349));on&30||au(n,t,i)}return i}function au(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=pe.updateQueue,t===null?(t={lastEffect:null,stores:null},pe.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function cu(e,t,n,r){t.value=n,t.getSnapshot=r,du(t)&&pu(e)}function uu(e,t,n){return n(function(){du(t)&&pu(e)})}function du(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!st(e,n)}catch{return!0}}function pu(e){var t=kt(e,1);t!==null&&it(t,e,1,-1)}function ya(e){var t=at();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Er,lastRenderedState:e},t.queue=e,e=e.dispatch=g1.bind(null,pe,e),[t.memoizedState,e]}function Nr(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=pe.updateQueue,t===null?(t={lastEffect:null,stores:null},pe.updateQueue=t,t.lastEffect=e.next=e):(n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e)),e}function fu(){return qe().memoizedState}function hl(e,t,n,r){var i=at();pe.flags|=e,i.memoizedState=Nr(1|t,n,void 0,r===void 0?null:r)}function Zl(e,t,n,r){var i=qe();r=r===void 0?null:r;var s=void 0;if(ve!==null){var o=ve.memoizedState;if(s=o.destroy,r!==null&&co(r,o.deps)){i.memoizedState=Nr(t,n,s,r);return}}pe.flags|=e,i.memoizedState=Nr(1|t,n,s,r)}function ma(e,t){return hl(8390656,8,e,t)}function fo(e,t){return Zl(2048,8,e,t)}function hu(e,t){return Zl(4,2,e,t)}function xu(e,t){return Zl(4,4,e,t)}function gu(e,t){if(typeof t=="function")return e=e(),t(e),function(){t(null)};if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function yu(e,t,n){return n=n!=null?n.concat([e]):null,Zl(4,4,gu.bind(null,t,e),n)}function ho(){}function mu(e,t){var n=qe();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&co(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function vu(e,t){var n=qe();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&co(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function ku(e,t,n){return on&21?(st(n,t)||(n=bc(),pe.lanes|=n,an|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,Re=!0),e.memoizedState=n)}function h1(e,t){var n=ie;ie=n!==0&&4>n?n:4,e(!0);var r=Ni.transition;Ni.transition={};try{e(!1),t()}finally{ie=n,Ni.transition=r}}function ju(){return qe().memoizedState}function x1(e,t,n){var r=Bt(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},wu(e))Su(t,n);else if(n=ru(e,t,n,r),n!==null){var i=_e();it(n,e,r,i),Cu(n,t,r)}}function g1(e,t,n){var r=Bt(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(wu(e))Su(t,i);else{var s=e.alternate;if(e.lanes===0&&(s===null||s.lanes===0)&&(s=t.lastRenderedReducer,s!==null))try{var o=t.lastRenderedState,a=s(o,n);if(i.hasEagerState=!0,i.eagerState=a,st(a,o)){var c=t.interleaved;c===null?(i.next=i,lo(t)):(i.next=c.next,c.next=i),t.interleaved=i;return}}catch{}finally{}n=ru(e,t,i,r),n!==null&&(i=_e(),it(n,e,r,i),Cu(n,t,r))}}function wu(e){var t=e.alternate;return e===pe||t!==null&&t===pe}function Su(e,t){dr=Rl=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Cu(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Hs(e,n)}}var Fl={readContext:Je,useCallback:Te,useContext:Te,useEffect:Te,useImperativeHandle:Te,useInsertionEffect:Te,useLayoutEffect:Te,useMemo:Te,useReducer:Te,useRef:Te,useState:Te,useDebugValue:Te,useDeferredValue:Te,useTransition:Te,useMutableSource:Te,useSyncExternalStore:Te,useId:Te,unstable_isNewReconciler:!1},y1={readContext:Je,useCallback:function(e,t){return at().memoizedState=[e,t===void 0?null:t],e},useContext:Je,useEffect:ma,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,hl(4194308,4,gu.bind(null,t,e),n)},useLayoutEffect:function(e,t){return hl(4194308,4,e,t)},useInsertionEffect:function(e,t){return hl(4,2,e,t)},useMemo:function(e,t){var n=at();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=at();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=x1.bind(null,pe,e),[r.memoizedState,e]},useRef:function(e){var t=at();return e={current:e},t.memoizedState=e},useState:ya,useDebugValue:ho,useDeferredValue:function(e){return at().memoizedState=e},useTransition:function(){var e=ya(!1),t=e[0];return e=h1.bind(null,e[1]),at().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=pe,i=at();if(ue){if(n===void 0)throw Error(_(407));n=n()}else{if(n=t(),we===null)throw Error(_(349));on&30||au(r,t,n)}i.memoizedState=n;var s={value:n,getSnapshot:t};return i.queue=s,ma(uu.bind(null,r,s,e),[e]),r.flags|=2048,Nr(9,cu.bind(null,r,s,n,t),void 0,null),n},useId:function(){var e=at(),t=we.identifierPrefix;if(ue){var n=gt,r=xt;n=(r&~(1<<32-lt(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=Pr++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=f1++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},m1={readContext:Je,useCallback:mu,useContext:Je,useEffect:fo,useImperativeHandle:yu,useInsertionEffect:hu,useLayoutEffect:xu,useMemo:vu,useReducer:Ii,useRef:fu,useState:function(){return Ii(Er)},useDebugValue:ho,useDeferredValue:function(e){var t=qe();return ku(t,ve.memoizedState,e)},useTransition:function(){var e=Ii(Er)[0],t=qe().memoizedState;return[e,t]},useMutableSource:su,useSyncExternalStore:ou,useId:ju,unstable_isNewReconciler:!1},v1={readContext:Je,useCallback:mu,useContext:Je,useEffect:fo,useImperativeHandle:yu,useInsertionEffect:hu,useLayoutEffect:xu,useMemo:vu,useReducer:_i,useRef:fu,useState:function(){return _i(Er)},useDebugValue:ho,useDeferredValue:function(e){var t=qe();return ve===null?t.memoizedState=e:ku(t,ve.memoizedState,e)},useTransition:function(){var e=_i(Er)[0],t=qe().memoizedState;return[e,t]},useMutableSource:su,useSyncExternalStore:ou,useId:ju,unstable_isNewReconciler:!1};function tt(e,t){if(e&&e.defaultProps){t=fe({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}function xs(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:fe({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Jl={isMounted:function(e){return(e=e._reactInternals)?pn(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=_e(),i=Bt(e),s=yt(r,i);s.payload=t,n!=null&&(s.callback=n),t=Ot(e,s,i),t!==null&&(it(t,e,i,r),pl(t,e,i))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=_e(),i=Bt(e),s=yt(r,i);s.tag=1,s.payload=t,n!=null&&(s.callback=n),t=Ot(e,s,i),t!==null&&(it(t,e,i,r),pl(t,e,i))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=_e(),r=Bt(e),i=yt(n,r);i.tag=2,t!=null&&(i.callback=t),t=Ot(e,i,r),t!==null&&(it(t,e,r,n),pl(t,e,r))}};function va(e,t,n,r,i,s,o){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,s,o):t.prototype&&t.prototype.isPureReactComponent?!wr(n,r)||!wr(i,s):!0}function bu(e,t,n){var r=!1,i=$t,s=t.contextType;return typeof s=="object"&&s!==null?s=Je(s):(i=Ae(t)?ln:Ne.current,r=t.contextTypes,s=(r=r!=null)?Fn(e,i):$t),t=new t(n,s),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=Jl,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=i,e.__reactInternalMemoizedMaskedChildContext=s),t}function ka(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&Jl.enqueueReplaceState(t,t.state,null)}function gs(e,t,n,r){var i=e.stateNode;i.props=n,i.state=e.memoizedState,i.refs={},io(e);var s=t.contextType;typeof s=="object"&&s!==null?i.context=Je(s):(s=Ae(t)?ln:Ne.current,i.context=Fn(e,s)),i.state=e.memoizedState,s=t.getDerivedStateFromProps,typeof s=="function"&&(xs(e,t,s,n),i.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof i.getSnapshotBeforeUpdate=="function"||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(t=i.state,typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount(),t!==i.state&&Jl.enqueueReplaceState(i,i.state,null),Ml(e,n,i,r),i.state=e.memoizedState),typeof i.componentDidMount=="function"&&(e.flags|=4194308)}function Bn(e,t){try{var n="",r=t;do n+=Qd(r),r=r.return;while(r);var i=n}catch(s){i=`
39
39
  Error generating stack: `+s.message+`
40
- `+s.stack}return{value:e,source:t,stack:i,digest:null}}function _i(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function gs(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var k1=typeof WeakMap=="function"?WeakMap:Map;function zu(e,t,n){n=yt(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Ol||(Ol=!0,zs=r),gs(e,t)},n}function Tu(e,t,n){n=yt(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var i=t.value;n.payload=function(){return r(i)},n.callback=function(){gs(e,t)}}var s=e.stateNode;return s!==null&&typeof s.componentDidCatch=="function"&&(n.callback=function(){gs(e,t),typeof r!="function"&&(Ot===null?Ot=new Set([this]):Ot.add(this));var o=t.stack;this.componentDidCatch(t.value,{componentStack:o!==null?o:""})}),n}function ja(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new k1;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(i.add(n),e=M1.bind(null,e,t,n),t.then(e,e))}function wa(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function Sa(e,t,n,r,i){return e.mode&1?(e.flags|=65536,e.lanes=i,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=yt(-1,1),t.tag=2,At(n,t,1))),n.lanes|=1),e)}var j1=wt.ReactCurrentOwner,Re=!1;function Ie(e,t,n,r){t.child=e===null?nu(t,null,n,r):Fn(t,e.child,n,r)}function Ca(e,t,n,r,i){n=n.render;var s=t.ref;return Nn(t,i),r=co(e,t,n,r,s,i),n=uo(),e!==null&&!Re?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,jt(e,t,i)):(ue&&n&&Js(t),t.flags|=1,Ie(e,t,r,i),t.child)}function ba(e,t,n,r,i){if(e===null){var s=n.type;return typeof s=="function"&&!jo(s)&&s.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=s,Pu(e,t,s,r,i)):(e=ml(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(s=e.child,!(e.lanes&i)){var o=s.memoizedProps;if(n=n.compare,n=n!==null?n:wr,n(o,r)&&e.ref===t.ref)return jt(e,t,i)}return t.flags|=1,e=Bt(s,r),e.ref=t.ref,e.return=t,t.child=e}function Pu(e,t,n,r,i){if(e!==null){var s=e.memoizedProps;if(wr(s,r)&&e.ref===t.ref)if(Re=!1,t.pendingProps=r=s,(e.lanes&i)!==0)e.flags&131072&&(Re=!0);else return t.lanes=e.lanes,jt(e,t,i)}return ys(e,t,n,r,i)}function Eu(e,t,n){var r=t.pendingProps,i=r.children,s=e!==null?e.memoizedState:null;if(r.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},oe(bn,Ue),Ue|=n;else{if(!(n&1073741824))return e=s!==null?s.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,oe(bn,Ue),Ue|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=s!==null?s.baseLanes:n,oe(bn,Ue),Ue|=r}else s!==null?(r=s.baseLanes|n,t.memoizedState=null):r=n,oe(bn,Ue),Ue|=r;return Ie(e,t,i,n),t.child}function Nu(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function ys(e,t,n,r,i){var s=Ae(n)?ln:Ne.current;return s=Dn(t,s),Nn(t,i),n=co(e,t,n,r,s,i),r=uo(),e!==null&&!Re?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,jt(e,t,i)):(ue&&r&&Js(t),t.flags|=1,Ie(e,t,n,i),t.child)}function za(e,t,n,r,i){if(Ae(n)){var s=!0;El(t)}else s=!1;if(Nn(t,i),t.stateNode===null)xl(e,t),bu(t,n,r),xs(t,n,r,i),r=!0;else if(e===null){var o=t.stateNode,a=t.memoizedProps;o.props=a;var c=o.context,d=n.contextType;typeof d=="object"&&d!==null?d=Ze(d):(d=Ae(n)?ln:Ne.current,d=Dn(t,d));var x=n.getDerivedStateFromProps,y=typeof x=="function"||typeof o.getSnapshotBeforeUpdate=="function";y||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(a!==r||c!==d)&&ka(t,o,r,d),Et=!1;var g=t.memoizedState;o.state=g,Ml(t,r,o,i),c=t.memoizedState,a!==r||g!==c||Fe.current||Et?(typeof x=="function"&&(hs(t,n,x,r),c=t.memoizedState),(a=Et||va(t,n,a,r,g,c,d))?(y||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount()),typeof o.componentDidMount=="function"&&(t.flags|=4194308)):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=c),o.props=r,o.state=c,o.context=d,r=a):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{o=t.stateNode,lu(e,t),a=t.memoizedProps,d=t.type===t.elementType?a:tt(t.type,a),o.props=d,y=t.pendingProps,g=o.context,c=n.contextType,typeof c=="object"&&c!==null?c=Ze(c):(c=Ae(n)?ln:Ne.current,c=Dn(t,c));var k=n.getDerivedStateFromProps;(x=typeof k=="function"||typeof o.getSnapshotBeforeUpdate=="function")||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(a!==y||g!==c)&&ka(t,o,r,c),Et=!1,g=t.memoizedState,o.state=g,Ml(t,r,o,i);var S=t.memoizedState;a!==y||g!==S||Fe.current||Et?(typeof k=="function"&&(hs(t,n,k,r),S=t.memoizedState),(d=Et||va(t,n,d,r,g,S,c)||!1)?(x||typeof o.UNSAFE_componentWillUpdate!="function"&&typeof o.componentWillUpdate!="function"||(typeof o.componentWillUpdate=="function"&&o.componentWillUpdate(r,S,c),typeof o.UNSAFE_componentWillUpdate=="function"&&o.UNSAFE_componentWillUpdate(r,S,c)),typeof o.componentDidUpdate=="function"&&(t.flags|=4),typeof o.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof o.componentDidUpdate!="function"||a===e.memoizedProps&&g===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&g===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=S),o.props=r,o.state=S,o.context=c,r=d):(typeof o.componentDidUpdate!="function"||a===e.memoizedProps&&g===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&g===e.memoizedState||(t.flags|=1024),r=!1)}return ms(e,t,n,r,s,i)}function ms(e,t,n,r,i,s){Nu(e,t);var o=(t.flags&128)!==0;if(!r&&!o)return i&&da(t,n,!1),jt(e,t,s);r=t.stateNode,j1.current=t;var a=o&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&o?(t.child=Fn(t,e.child,null,s),t.child=Fn(t,null,a,s)):Ie(e,t,a,s),t.memoizedState=r.state,i&&da(t,n,!0),t.child}function Iu(e){var t=e.stateNode;t.pendingContext?ua(e,t.pendingContext,t.pendingContext!==t.context):t.context&&ua(e,t.context,!1),io(e,t.containerInfo)}function Ta(e,t,n,r,i){return Rn(),qs(i),t.flags|=256,Ie(e,t,n,r),t.child}var vs={dehydrated:null,treeContext:null,retryLane:0};function ks(e){return{baseLanes:e,cachePool:null,transitions:null}}function _u(e,t,n){var r=t.pendingProps,i=de.current,s=!1,o=(t.flags&128)!==0,a;if((a=o)||(a=e!==null&&e.memoizedState===null?!1:(i&2)!==0),a?(s=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(i|=1),oe(de,i&1),e===null)return ps(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data==="$!"?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(o=r.children,e=r.fallback,s?(r=t.mode,s=t.child,o={mode:"hidden",children:o},!(r&1)&&s!==null?(s.childLanes=0,s.pendingProps=o):s=ti(o,r,0,null),e=rn(e,r,n,null),s.return=t,e.return=t,s.sibling=e,t.child=s,t.child.memoizedState=ks(n),t.memoizedState=vs,e):ho(t,o));if(i=e.memoizedState,i!==null&&(a=i.dehydrated,a!==null))return w1(e,t,o,r,a,i,n);if(s){s=r.fallback,o=t.mode,i=e.child,a=i.sibling;var c={mode:"hidden",children:r.children};return!(o&1)&&t.child!==i?(r=t.child,r.childLanes=0,r.pendingProps=c,t.deletions=null):(r=Bt(i,c),r.subtreeFlags=i.subtreeFlags&14680064),a!==null?s=Bt(a,s):(s=rn(s,o,n,null),s.flags|=2),s.return=t,r.return=t,r.sibling=s,t.child=r,r=s,s=t.child,o=e.child.memoizedState,o=o===null?ks(n):{baseLanes:o.baseLanes|n,cachePool:null,transitions:o.transitions},s.memoizedState=o,s.childLanes=e.childLanes&~n,t.memoizedState=vs,r}return s=e.child,e=s.sibling,r=Bt(s,{mode:"visible",children:r.children}),!(t.mode&1)&&(r.lanes=n),r.return=t,r.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function ho(e,t){return t=ti({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function rl(e,t,n,r){return r!==null&&qs(r),Fn(t,e.child,null,n),e=ho(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function w1(e,t,n,r,i,s,o){if(n)return t.flags&256?(t.flags&=-257,r=_i(Error(_(422))),rl(e,t,o,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(s=r.fallback,i=t.mode,r=ti({mode:"visible",children:r.children},i,0,null),s=rn(s,i,o,null),s.flags|=2,r.return=t,s.return=t,r.sibling=s,t.child=r,t.mode&1&&Fn(t,e.child,null,o),t.child.memoizedState=ks(o),t.memoizedState=vs,s);if(!(t.mode&1))return rl(e,t,o,null);if(i.data==="$!"){if(r=i.nextSibling&&i.nextSibling.dataset,r)var a=r.dgst;return r=a,s=Error(_(419)),r=_i(s,r,void 0),rl(e,t,o,r)}if(a=(o&e.childLanes)!==0,Re||a){if(r=we,r!==null){switch(o&-o){case 4:i=2;break;case 16:i=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:i=32;break;case 536870912:i=268435456;break;default:i=0}i=i&(r.suspendedLanes|o)?0:i,i!==0&&i!==s.retryLane&&(s.retryLane=i,kt(e,i),it(r,e,i,-1))}return ko(),r=_i(Error(_(421))),rl(e,t,o,r)}return i.data==="$?"?(t.flags|=128,t.child=e.child,t=D1.bind(null,e),i._reactRetry=t,null):(e=s.treeContext,Ve=Ft(i.nextSibling),He=t,ue=!0,rt=null,e!==null&&(Ge[Xe++]=xt,Ge[Xe++]=gt,Ge[Xe++]=sn,xt=e.id,gt=e.overflow,sn=t),t=ho(t,r.children),t.flags|=4096,t)}function Pa(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),fs(e.return,t,n)}function Li(e,t,n,r,i){var s=e.memoizedState;s===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i}:(s.isBackwards=t,s.rendering=null,s.renderingStartTime=0,s.last=r,s.tail=n,s.tailMode=i)}function Lu(e,t,n){var r=t.pendingProps,i=r.revealOrder,s=r.tail;if(Ie(e,t,r.children,n),r=de.current,r&2)r=r&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Pa(e,n,t);else if(e.tag===19)Pa(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(oe(de,r),!(t.mode&1))t.memoizedState=null;else switch(i){case"forwards":for(n=t.child,i=null;n!==null;)e=n.alternate,e!==null&&Dl(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),Li(t,!1,i,n,s);break;case"backwards":for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&Dl(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}Li(t,!0,n,null,s);break;case"together":Li(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function xl(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function jt(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),an|=t.lanes,!(n&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(_(153));if(t.child!==null){for(e=t.child,n=Bt(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=Bt(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function S1(e,t,n){switch(t.tag){case 3:Iu(t),Rn();break;case 5:iu(t);break;case 1:Ae(t.type)&&El(t);break;case 4:io(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,i=t.memoizedProps.value;oe(_l,r._currentValue),r._currentValue=i;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(oe(de,de.current&1),t.flags|=128,null):n&t.child.childLanes?_u(e,t,n):(oe(de,de.current&1),e=jt(e,t,n),e!==null?e.sibling:null);oe(de,de.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return Lu(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),oe(de,de.current),r)break;return null;case 22:case 23:return t.lanes=0,Eu(e,t,n)}return jt(e,t,n)}var Mu,js,Du,Ru;Mu=function(e,t){for(var n=t.child;n!==null;){if(n.tag===5||n.tag===6)e.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}};js=function(){};Du=function(e,t,n,r){var i=e.memoizedProps;if(i!==r){e=t.stateNode,tn(dt.current);var s=null;switch(n){case"input":i=Vi(e,i),r=Vi(e,r),s=[];break;case"select":i=fe({},i,{value:void 0}),r=fe({},r,{value:void 0}),s=[];break;case"textarea":i=Ki(e,i),r=Ki(e,r),s=[];break;default:typeof i.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=Tl)}Gi(n,r);var o;n=null;for(d in i)if(!r.hasOwnProperty(d)&&i.hasOwnProperty(d)&&i[d]!=null)if(d==="style"){var a=i[d];for(o in a)a.hasOwnProperty(o)&&(n||(n={}),n[o]="")}else d!=="dangerouslySetInnerHTML"&&d!=="children"&&d!=="suppressContentEditableWarning"&&d!=="suppressHydrationWarning"&&d!=="autoFocus"&&(xr.hasOwnProperty(d)?s||(s=[]):(s=s||[]).push(d,null));for(d in r){var c=r[d];if(a=i!=null?i[d]:void 0,r.hasOwnProperty(d)&&c!==a&&(c!=null||a!=null))if(d==="style")if(a){for(o in a)!a.hasOwnProperty(o)||c&&c.hasOwnProperty(o)||(n||(n={}),n[o]="");for(o in c)c.hasOwnProperty(o)&&a[o]!==c[o]&&(n||(n={}),n[o]=c[o])}else n||(s||(s=[]),s.push(d,n)),n=c;else d==="dangerouslySetInnerHTML"?(c=c?c.__html:void 0,a=a?a.__html:void 0,c!=null&&a!==c&&(s=s||[]).push(d,c)):d==="children"?typeof c!="string"&&typeof c!="number"||(s=s||[]).push(d,""+c):d!=="suppressContentEditableWarning"&&d!=="suppressHydrationWarning"&&(xr.hasOwnProperty(d)?(c!=null&&d==="onScroll"&&ae("scroll",e),s||a===c||(s=[])):(s=s||[]).push(d,c))}n&&(s=s||[]).push("style",n);var d=s;(t.updateQueue=d)&&(t.flags|=4)}};Ru=function(e,t,n,r){n!==r&&(t.flags|=4)};function qn(e,t){if(!ue)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function Pe(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&14680064,r|=i.flags&14680064,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function C1(e,t,n){var r=t.pendingProps;switch(Zs(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Pe(t),null;case 1:return Ae(t.type)&&Pl(),Pe(t),null;case 3:return r=t.stateNode,An(),ce(Fe),ce(Ne),oo(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(tl(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,rt!==null&&(Es(rt),rt=null))),js(e,t),Pe(t),null;case 5:so(t);var i=tn(Tr.current);if(n=t.type,e!==null&&t.stateNode!=null)Du(e,t,n,r,i),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(_(166));return Pe(t),null}if(e=tn(dt.current),tl(t)){r=t.stateNode,n=t.type;var s=t.memoizedProps;switch(r[ct]=t,r[br]=s,e=(t.mode&1)!==0,n){case"dialog":ae("cancel",r),ae("close",r);break;case"iframe":case"object":case"embed":ae("load",r);break;case"video":case"audio":for(i=0;i<ir.length;i++)ae(ir[i],r);break;case"source":ae("error",r);break;case"img":case"image":case"link":ae("error",r),ae("load",r);break;case"details":ae("toggle",r);break;case"input":Fo(r,s),ae("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!s.multiple},ae("invalid",r);break;case"textarea":Oo(r,s),ae("invalid",r)}Gi(n,s),i=null;for(var o in s)if(s.hasOwnProperty(o)){var a=s[o];o==="children"?typeof a=="string"?r.textContent!==a&&(s.suppressHydrationWarning!==!0&&el(r.textContent,a,e),i=["children",a]):typeof a=="number"&&r.textContent!==""+a&&(s.suppressHydrationWarning!==!0&&el(r.textContent,a,e),i=["children",""+a]):xr.hasOwnProperty(o)&&a!=null&&o==="onScroll"&&ae("scroll",r)}switch(n){case"input":Kr(r),Ao(r,s,!0);break;case"textarea":Kr(r),Wo(r);break;case"select":case"option":break;default:typeof s.onClick=="function"&&(r.onclick=Tl)}r=i,t.updateQueue=r,r!==null&&(t.flags|=4)}else{o=i.nodeType===9?i:i.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=uc(n)),e==="http://www.w3.org/1999/xhtml"?n==="script"?(e=o.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=o.createElement(n,{is:r.is}):(e=o.createElement(n),n==="select"&&(o=e,r.multiple?o.multiple=!0:r.size&&(o.size=r.size))):e=o.createElementNS(e,n),e[ct]=t,e[br]=r,Mu(e,t,!1,!1),t.stateNode=e;e:{switch(o=Xi(n,r),n){case"dialog":ae("cancel",e),ae("close",e),i=r;break;case"iframe":case"object":case"embed":ae("load",e),i=r;break;case"video":case"audio":for(i=0;i<ir.length;i++)ae(ir[i],e);i=r;break;case"source":ae("error",e),i=r;break;case"img":case"image":case"link":ae("error",e),ae("load",e),i=r;break;case"details":ae("toggle",e),i=r;break;case"input":Fo(e,r),i=Vi(e,r),ae("invalid",e);break;case"option":i=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},i=fe({},r,{value:void 0}),ae("invalid",e);break;case"textarea":Oo(e,r),i=Ki(e,r),ae("invalid",e);break;default:i=r}Gi(n,i),a=i;for(s in a)if(a.hasOwnProperty(s)){var c=a[s];s==="style"?fc(e,c):s==="dangerouslySetInnerHTML"?(c=c?c.__html:void 0,c!=null&&dc(e,c)):s==="children"?typeof c=="string"?(n!=="textarea"||c!=="")&&gr(e,c):typeof c=="number"&&gr(e,""+c):s!=="suppressContentEditableWarning"&&s!=="suppressHydrationWarning"&&s!=="autoFocus"&&(xr.hasOwnProperty(s)?c!=null&&s==="onScroll"&&ae("scroll",e):c!=null&&Fs(e,s,c,o))}switch(n){case"input":Kr(e),Ao(e,r,!1);break;case"textarea":Kr(e),Wo(e);break;case"option":r.value!=null&&e.setAttribute("value",""+Vt(r.value));break;case"select":e.multiple=!!r.multiple,s=r.value,s!=null?zn(e,!!r.multiple,s,!1):r.defaultValue!=null&&zn(e,!!r.multiple,r.defaultValue,!0);break;default:typeof i.onClick=="function"&&(e.onclick=Tl)}switch(n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return Pe(t),null;case 6:if(e&&t.stateNode!=null)Ru(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(_(166));if(n=tn(Tr.current),tn(dt.current),tl(t)){if(r=t.stateNode,n=t.memoizedProps,r[ct]=t,(s=r.nodeValue!==n)&&(e=He,e!==null))switch(e.tag){case 3:el(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&el(r.nodeValue,n,(e.mode&1)!==0)}s&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[ct]=t,t.stateNode=r}return Pe(t),null;case 13:if(ce(de),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(ue&&Ve!==null&&t.mode&1&&!(t.flags&128))eu(),Rn(),t.flags|=98560,s=!1;else if(s=tl(t),r!==null&&r.dehydrated!==null){if(e===null){if(!s)throw Error(_(318));if(s=t.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(_(317));s[ct]=t}else Rn(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Pe(t),s=!1}else rt!==null&&(Es(rt),rt=null),s=!0;if(!s)return t.flags&65536?t:null}return t.flags&128?(t.lanes=n,t):(r=r!==null,r!==(e!==null&&e.memoizedState!==null)&&r&&(t.child.flags|=8192,t.mode&1&&(e===null||de.current&1?ke===0&&(ke=3):ko())),t.updateQueue!==null&&(t.flags|=4),Pe(t),null);case 4:return An(),js(e,t),e===null&&Sr(t.stateNode.containerInfo),Pe(t),null;case 10:return no(t.type._context),Pe(t),null;case 17:return Ae(t.type)&&Pl(),Pe(t),null;case 19:if(ce(de),s=t.memoizedState,s===null)return Pe(t),null;if(r=(t.flags&128)!==0,o=s.rendering,o===null)if(r)qn(s,!1);else{if(ke!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=Dl(e),o!==null){for(t.flags|=128,qn(s,!1),r=o.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;n!==null;)s=n,e=r,s.flags&=14680066,o=s.alternate,o===null?(s.childLanes=0,s.lanes=e,s.child=null,s.subtreeFlags=0,s.memoizedProps=null,s.memoizedState=null,s.updateQueue=null,s.dependencies=null,s.stateNode=null):(s.childLanes=o.childLanes,s.lanes=o.lanes,s.child=o.child,s.subtreeFlags=0,s.deletions=null,s.memoizedProps=o.memoizedProps,s.memoizedState=o.memoizedState,s.updateQueue=o.updateQueue,s.type=o.type,e=o.dependencies,s.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return oe(de,de.current&1|2),t.child}e=e.sibling}s.tail!==null&&xe()>Wn&&(t.flags|=128,r=!0,qn(s,!1),t.lanes=4194304)}else{if(!r)if(e=Dl(o),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),qn(s,!0),s.tail===null&&s.tailMode==="hidden"&&!o.alternate&&!ue)return Pe(t),null}else 2*xe()-s.renderingStartTime>Wn&&n!==1073741824&&(t.flags|=128,r=!0,qn(s,!1),t.lanes=4194304);s.isBackwards?(o.sibling=t.child,t.child=o):(n=s.last,n!==null?n.sibling=o:t.child=o,s.last=o)}return s.tail!==null?(t=s.tail,s.rendering=t,s.tail=t.sibling,s.renderingStartTime=xe(),t.sibling=null,n=de.current,oe(de,r?n&1|2:n&1),t):(Pe(t),null);case 22:case 23:return vo(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?Ue&1073741824&&(Pe(t),t.subtreeFlags&6&&(t.flags|=8192)):Pe(t),null;case 24:return null;case 25:return null}throw Error(_(156,t.tag))}function b1(e,t){switch(Zs(t),t.tag){case 1:return Ae(t.type)&&Pl(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return An(),ce(Fe),ce(Ne),oo(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return so(t),null;case 13:if(ce(de),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(_(340));Rn()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return ce(de),null;case 4:return An(),null;case 10:return no(t.type._context),null;case 22:case 23:return vo(),null;case 24:return null;default:return null}}var ll=!1,Ee=!1,z1=typeof WeakSet=="function"?WeakSet:Set,O=null;function Cn(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){he(e,t,r)}else n.current=null}function ws(e,t,n){try{n()}catch(r){he(e,t,r)}}var Ea=!1;function T1(e,t){if(is=Cl,e=Bc(),Ys(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,s=r.focusNode;r=r.focusOffset;try{n.nodeType,s.nodeType}catch{n=null;break e}var o=0,a=-1,c=-1,d=0,x=0,y=e,g=null;t:for(;;){for(var k;y!==n||i!==0&&y.nodeType!==3||(a=o+i),y!==s||r!==0&&y.nodeType!==3||(c=o+r),y.nodeType===3&&(o+=y.nodeValue.length),(k=y.firstChild)!==null;)g=y,y=k;for(;;){if(y===e)break t;if(g===n&&++d===i&&(a=o),g===s&&++x===r&&(c=o),(k=y.nextSibling)!==null)break;y=g,g=y.parentNode}y=k}n=a===-1||c===-1?null:{start:a,end:c}}else n=null}n=n||{start:0,end:0}}else n=null;for(ss={focusedElem:e,selectionRange:n},Cl=!1,O=t;O!==null;)if(t=O,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,O=e;else for(;O!==null;){t=O;try{var S=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(S!==null){var m=S.memoizedProps,N=S.memoizedState,p=t.stateNode,u=p.getSnapshotBeforeUpdate(t.elementType===t.type?m:tt(t.type,m),N);p.__reactInternalSnapshotBeforeUpdate=u}break;case 3:var f=t.stateNode.containerInfo;f.nodeType===1?f.textContent="":f.nodeType===9&&f.documentElement&&f.removeChild(f.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(_(163))}}catch(j){he(t,t.return,j)}if(e=t.sibling,e!==null){e.return=t.return,O=e;break}O=t.return}return S=Ea,Ea=!1,S}function pr(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var i=r=r.next;do{if((i.tag&e)===e){var s=i.destroy;i.destroy=void 0,s!==void 0&&ws(t,n,s)}i=i.next}while(i!==r)}}function ql(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function Ss(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function Fu(e){var t=e.alternate;t!==null&&(e.alternate=null,Fu(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[ct],delete t[br],delete t[cs],delete t[c1],delete t[u1])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function Au(e){return e.tag===5||e.tag===3||e.tag===4}function Na(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Au(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Cs(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Tl));else if(r!==4&&(e=e.child,e!==null))for(Cs(e,t,n),e=e.sibling;e!==null;)Cs(e,t,n),e=e.sibling}function bs(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(bs(e,t,n),e=e.sibling;e!==null;)bs(e,t,n),e=e.sibling}var Ce=null,nt=!1;function Tt(e,t,n){for(n=n.child;n!==null;)Ou(e,t,n),n=n.sibling}function Ou(e,t,n){if(ut&&typeof ut.onCommitFiberUnmount=="function")try{ut.onCommitFiberUnmount($l,n)}catch{}switch(n.tag){case 5:Ee||Cn(n,t);case 6:var r=Ce,i=nt;Ce=null,Tt(e,t,n),Ce=r,nt=i,Ce!==null&&(nt?(e=Ce,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):Ce.removeChild(n.stateNode));break;case 18:Ce!==null&&(nt?(e=Ce,n=n.stateNode,e.nodeType===8?zi(e.parentNode,n):e.nodeType===1&&zi(e,n),kr(e)):zi(Ce,n.stateNode));break;case 4:r=Ce,i=nt,Ce=n.stateNode.containerInfo,nt=!0,Tt(e,t,n),Ce=r,nt=i;break;case 0:case 11:case 14:case 15:if(!Ee&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var s=i,o=s.destroy;s=s.tag,o!==void 0&&(s&2||s&4)&&ws(n,t,o),i=i.next}while(i!==r)}Tt(e,t,n);break;case 1:if(!Ee&&(Cn(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(a){he(n,t,a)}Tt(e,t,n);break;case 21:Tt(e,t,n);break;case 22:n.mode&1?(Ee=(r=Ee)||n.memoizedState!==null,Tt(e,t,n),Ee=r):Tt(e,t,n);break;default:Tt(e,t,n)}}function Ia(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new z1),t.forEach(function(r){var i=R1.bind(null,e,r);n.has(r)||(n.add(r),r.then(i,i))})}}function et(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var i=n[r];try{var s=e,o=t,a=o;e:for(;a!==null;){switch(a.tag){case 5:Ce=a.stateNode,nt=!1;break e;case 3:Ce=a.stateNode.containerInfo,nt=!0;break e;case 4:Ce=a.stateNode.containerInfo,nt=!0;break e}a=a.return}if(Ce===null)throw Error(_(160));Ou(s,o,i),Ce=null,nt=!1;var c=i.alternate;c!==null&&(c.return=null),i.return=null}catch(d){he(i,t,d)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)Wu(t,e),t=t.sibling}function Wu(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(et(t,e),ot(e),r&4){try{pr(3,e,e.return),ql(3,e)}catch(m){he(e,e.return,m)}try{pr(5,e,e.return)}catch(m){he(e,e.return,m)}}break;case 1:et(t,e),ot(e),r&512&&n!==null&&Cn(n,n.return);break;case 5:if(et(t,e),ot(e),r&512&&n!==null&&Cn(n,n.return),e.flags&32){var i=e.stateNode;try{gr(i,"")}catch(m){he(e,e.return,m)}}if(r&4&&(i=e.stateNode,i!=null)){var s=e.memoizedProps,o=n!==null?n.memoizedProps:s,a=e.type,c=e.updateQueue;if(e.updateQueue=null,c!==null)try{a==="input"&&s.type==="radio"&&s.name!=null&&ac(i,s),Xi(a,o);var d=Xi(a,s);for(o=0;o<c.length;o+=2){var x=c[o],y=c[o+1];x==="style"?fc(i,y):x==="dangerouslySetInnerHTML"?dc(i,y):x==="children"?gr(i,y):Fs(i,x,y,d)}switch(a){case"input":Hi(i,s);break;case"textarea":cc(i,s);break;case"select":var g=i._wrapperState.wasMultiple;i._wrapperState.wasMultiple=!!s.multiple;var k=s.value;k!=null?zn(i,!!s.multiple,k,!1):g!==!!s.multiple&&(s.defaultValue!=null?zn(i,!!s.multiple,s.defaultValue,!0):zn(i,!!s.multiple,s.multiple?[]:"",!1))}i[br]=s}catch(m){he(e,e.return,m)}}break;case 6:if(et(t,e),ot(e),r&4){if(e.stateNode===null)throw Error(_(162));i=e.stateNode,s=e.memoizedProps;try{i.nodeValue=s}catch(m){he(e,e.return,m)}}break;case 3:if(et(t,e),ot(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{kr(t.containerInfo)}catch(m){he(e,e.return,m)}break;case 4:et(t,e),ot(e);break;case 13:et(t,e),ot(e),i=e.child,i.flags&8192&&(s=i.memoizedState!==null,i.stateNode.isHidden=s,!s||i.alternate!==null&&i.alternate.memoizedState!==null||(yo=xe())),r&4&&Ia(e);break;case 22:if(x=n!==null&&n.memoizedState!==null,e.mode&1?(Ee=(d=Ee)||x,et(t,e),Ee=d):et(t,e),ot(e),r&8192){if(d=e.memoizedState!==null,(e.stateNode.isHidden=d)&&!x&&e.mode&1)for(O=e,x=e.child;x!==null;){for(y=O=x;O!==null;){switch(g=O,k=g.child,g.tag){case 0:case 11:case 14:case 15:pr(4,g,g.return);break;case 1:Cn(g,g.return);var S=g.stateNode;if(typeof S.componentWillUnmount=="function"){r=g,n=g.return;try{t=r,S.props=t.memoizedProps,S.state=t.memoizedState,S.componentWillUnmount()}catch(m){he(r,n,m)}}break;case 5:Cn(g,g.return);break;case 22:if(g.memoizedState!==null){La(y);continue}}k!==null?(k.return=g,O=k):La(y)}x=x.sibling}e:for(x=null,y=e;;){if(y.tag===5){if(x===null){x=y;try{i=y.stateNode,d?(s=i.style,typeof s.setProperty=="function"?s.setProperty("display","none","important"):s.display="none"):(a=y.stateNode,c=y.memoizedProps.style,o=c!=null&&c.hasOwnProperty("display")?c.display:null,a.style.display=pc("display",o))}catch(m){he(e,e.return,m)}}}else if(y.tag===6){if(x===null)try{y.stateNode.nodeValue=d?"":y.memoizedProps}catch(m){he(e,e.return,m)}}else if((y.tag!==22&&y.tag!==23||y.memoizedState===null||y===e)&&y.child!==null){y.child.return=y,y=y.child;continue}if(y===e)break e;for(;y.sibling===null;){if(y.return===null||y.return===e)break e;x===y&&(x=null),y=y.return}x===y&&(x=null),y.sibling.return=y.return,y=y.sibling}}break;case 19:et(t,e),ot(e),r&4&&Ia(e);break;case 21:break;default:et(t,e),ot(e)}}function ot(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(Au(n)){var r=n;break e}n=n.return}throw Error(_(160))}switch(r.tag){case 5:var i=r.stateNode;r.flags&32&&(gr(i,""),r.flags&=-33);var s=Na(e);bs(e,s,i);break;case 3:case 4:var o=r.stateNode.containerInfo,a=Na(e);Cs(e,a,o);break;default:throw Error(_(161))}}catch(c){he(e,e.return,c)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function P1(e,t,n){O=e,Bu(e)}function Bu(e,t,n){for(var r=(e.mode&1)!==0;O!==null;){var i=O,s=i.child;if(i.tag===22&&r){var o=i.memoizedState!==null||ll;if(!o){var a=i.alternate,c=a!==null&&a.memoizedState!==null||Ee;a=ll;var d=Ee;if(ll=o,(Ee=c)&&!d)for(O=i;O!==null;)o=O,c=o.child,o.tag===22&&o.memoizedState!==null?Ma(i):c!==null?(c.return=o,O=c):Ma(i);for(;s!==null;)O=s,Bu(s),s=s.sibling;O=i,ll=a,Ee=d}_a(e)}else i.subtreeFlags&8772&&s!==null?(s.return=i,O=s):_a(e)}}function _a(e){for(;O!==null;){var t=O;if(t.flags&8772){var n=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:Ee||ql(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!Ee)if(n===null)r.componentDidMount();else{var i=t.elementType===t.type?n.memoizedProps:tt(t.type,n.memoizedProps);r.componentDidUpdate(i,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var s=t.updateQueue;s!==null&&ga(t,s,r);break;case 3:var o=t.updateQueue;if(o!==null){if(n=null,t.child!==null)switch(t.child.tag){case 5:n=t.child.stateNode;break;case 1:n=t.child.stateNode}ga(t,o,n)}break;case 5:var a=t.stateNode;if(n===null&&t.flags&4){n=a;var c=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":c.autoFocus&&n.focus();break;case"img":c.src&&(n.src=c.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var d=t.alternate;if(d!==null){var x=d.memoizedState;if(x!==null){var y=x.dehydrated;y!==null&&kr(y)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(_(163))}Ee||t.flags&512&&Ss(t)}catch(g){he(t,t.return,g)}}if(t===e){O=null;break}if(n=t.sibling,n!==null){n.return=t.return,O=n;break}O=t.return}}function La(e){for(;O!==null;){var t=O;if(t===e){O=null;break}var n=t.sibling;if(n!==null){n.return=t.return,O=n;break}O=t.return}}function Ma(e){for(;O!==null;){var t=O;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{ql(4,t)}catch(c){he(t,n,c)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var i=t.return;try{r.componentDidMount()}catch(c){he(t,i,c)}}var s=t.return;try{Ss(t)}catch(c){he(t,s,c)}break;case 5:var o=t.return;try{Ss(t)}catch(c){he(t,o,c)}}}catch(c){he(t,t.return,c)}if(t===e){O=null;break}var a=t.sibling;if(a!==null){a.return=t.return,O=a;break}O=t.return}}var E1=Math.ceil,Al=wt.ReactCurrentDispatcher,xo=wt.ReactCurrentOwner,Je=wt.ReactCurrentBatchConfig,ne=0,we=null,ye=null,be=0,Ue=0,bn=Kt(0),ke=0,Ir=null,an=0,ei=0,go=0,fr=null,De=null,yo=0,Wn=1/0,ft=null,Ol=!1,zs=null,Ot=null,il=!1,Lt=null,Wl=0,hr=0,Ts=null,gl=-1,yl=0;function _e(){return ne&6?xe():gl!==-1?gl:gl=xe()}function Wt(e){return e.mode&1?ne&2&&be!==0?be&-be:p1.transition!==null?(yl===0&&(yl=bc()),yl):(e=ie,e!==0||(e=window.event,e=e===void 0?16:_c(e.type)),e):1}function it(e,t,n,r){if(50<hr)throw hr=0,Ts=null,Error(_(185));Lr(e,n,r),(!(ne&2)||e!==we)&&(e===we&&(!(ne&2)&&(ei|=n),ke===4&&It(e,be)),Oe(e,r),n===1&&ne===0&&!(t.mode&1)&&(Wn=xe()+500,Yl&&Qt()))}function Oe(e,t){var n=e.callbackNode;pp(e,t);var r=Sl(e,e===we?be:0);if(r===0)n!==null&&Vo(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&Vo(n),t===1)e.tag===0?d1(Da.bind(null,e)):Jc(Da.bind(null,e)),o1(function(){!(ne&6)&&Qt()}),n=null;else{switch(zc(r)){case 1:n=Us;break;case 4:n=Sc;break;case 16:n=wl;break;case 536870912:n=Cc;break;default:n=wl}n=Xu(n,Uu.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function Uu(e,t){if(gl=-1,yl=0,ne&6)throw Error(_(327));var n=e.callbackNode;if(In()&&e.callbackNode!==n)return null;var r=Sl(e,e===we?be:0);if(r===0)return null;if(r&30||r&e.expiredLanes||t)t=Bl(e,r);else{t=r;var i=ne;ne|=2;var s=Hu();(we!==e||be!==t)&&(ft=null,Wn=xe()+500,nn(e,t));do try{_1();break}catch(a){Vu(e,a)}while(!0);to(),Al.current=s,ne=i,ye!==null?t=0:(we=null,be=0,t=ke)}if(t!==0){if(t===2&&(i=es(e),i!==0&&(r=i,t=Ps(e,i))),t===1)throw n=Ir,nn(e,0),It(e,r),Oe(e,xe()),n;if(t===6)It(e,r);else{if(i=e.current.alternate,!(r&30)&&!N1(i)&&(t=Bl(e,r),t===2&&(s=es(e),s!==0&&(r=s,t=Ps(e,s))),t===1))throw n=Ir,nn(e,0),It(e,r),Oe(e,xe()),n;switch(e.finishedWork=i,e.finishedLanes=r,t){case 0:case 1:throw Error(_(345));case 2:Jt(e,De,ft);break;case 3:if(It(e,r),(r&130023424)===r&&(t=yo+500-xe(),10<t)){if(Sl(e,0)!==0)break;if(i=e.suspendedLanes,(i&r)!==r){_e(),e.pingedLanes|=e.suspendedLanes&i;break}e.timeoutHandle=as(Jt.bind(null,e,De,ft),t);break}Jt(e,De,ft);break;case 4:if(It(e,r),(r&4194240)===r)break;for(t=e.eventTimes,i=-1;0<r;){var o=31-lt(r);s=1<<o,o=t[o],o>i&&(i=o),r&=~s}if(r=i,r=xe()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*E1(r/1960))-r,10<r){e.timeoutHandle=as(Jt.bind(null,e,De,ft),r);break}Jt(e,De,ft);break;case 5:Jt(e,De,ft);break;default:throw Error(_(329))}}}return Oe(e,xe()),e.callbackNode===n?Uu.bind(null,e):null}function Ps(e,t){var n=fr;return e.current.memoizedState.isDehydrated&&(nn(e,t).flags|=256),e=Bl(e,t),e!==2&&(t=De,De=n,t!==null&&Es(t)),e}function Es(e){De===null?De=e:De.push.apply(De,e)}function N1(e){for(var t=e;;){if(t.flags&16384){var n=t.updateQueue;if(n!==null&&(n=n.stores,n!==null))for(var r=0;r<n.length;r++){var i=n[r],s=i.getSnapshot;i=i.value;try{if(!st(s(),i))return!1}catch{return!1}}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function It(e,t){for(t&=~go,t&=~ei,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-lt(t),r=1<<n;e[n]=-1,t&=~r}}function Da(e){if(ne&6)throw Error(_(327));In();var t=Sl(e,0);if(!(t&1))return Oe(e,xe()),null;var n=Bl(e,t);if(e.tag!==0&&n===2){var r=es(e);r!==0&&(t=r,n=Ps(e,r))}if(n===1)throw n=Ir,nn(e,0),It(e,t),Oe(e,xe()),n;if(n===6)throw Error(_(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,Jt(e,De,ft),Oe(e,xe()),null}function mo(e,t){var n=ne;ne|=1;try{return e(t)}finally{ne=n,ne===0&&(Wn=xe()+500,Yl&&Qt())}}function cn(e){Lt!==null&&Lt.tag===0&&!(ne&6)&&In();var t=ne;ne|=1;var n=Je.transition,r=ie;try{if(Je.transition=null,ie=1,e)return e()}finally{ie=r,Je.transition=n,ne=t,!(ne&6)&&Qt()}}function vo(){Ue=bn.current,ce(bn)}function nn(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,s1(n)),ye!==null)for(n=ye.return;n!==null;){var r=n;switch(Zs(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&Pl();break;case 3:An(),ce(Fe),ce(Ne),oo();break;case 5:so(r);break;case 4:An();break;case 13:ce(de);break;case 19:ce(de);break;case 10:no(r.type._context);break;case 22:case 23:vo()}n=n.return}if(we=e,ye=e=Bt(e.current,null),be=Ue=t,ke=0,Ir=null,go=ei=an=0,De=fr=null,en!==null){for(t=0;t<en.length;t++)if(n=en[t],r=n.interleaved,r!==null){n.interleaved=null;var i=r.next,s=n.pending;if(s!==null){var o=s.next;s.next=i,r.next=o}n.pending=r}en=null}return e}function Vu(e,t){do{var n=ye;try{if(to(),fl.current=Fl,Rl){for(var r=pe.memoizedState;r!==null;){var i=r.queue;i!==null&&(i.pending=null),r=r.next}Rl=!1}if(on=0,je=ve=pe=null,dr=!1,Pr=0,xo.current=null,n===null||n.return===null){ke=1,Ir=t,ye=null;break}e:{var s=e,o=n.return,a=n,c=t;if(t=be,a.flags|=32768,c!==null&&typeof c=="object"&&typeof c.then=="function"){var d=c,x=a,y=x.tag;if(!(x.mode&1)&&(y===0||y===11||y===15)){var g=x.alternate;g?(x.updateQueue=g.updateQueue,x.memoizedState=g.memoizedState,x.lanes=g.lanes):(x.updateQueue=null,x.memoizedState=null)}var k=wa(o);if(k!==null){k.flags&=-257,Sa(k,o,a,s,t),k.mode&1&&ja(s,d,t),t=k,c=d;var S=t.updateQueue;if(S===null){var m=new Set;m.add(c),t.updateQueue=m}else S.add(c);break e}else{if(!(t&1)){ja(s,d,t),ko();break e}c=Error(_(426))}}else if(ue&&a.mode&1){var N=wa(o);if(N!==null){!(N.flags&65536)&&(N.flags|=256),Sa(N,o,a,s,t),qs(On(c,a));break e}}s=c=On(c,a),ke!==4&&(ke=2),fr===null?fr=[s]:fr.push(s),s=o;do{switch(s.tag){case 3:s.flags|=65536,t&=-t,s.lanes|=t;var p=zu(s,c,t);xa(s,p);break e;case 1:a=c;var u=s.type,f=s.stateNode;if(!(s.flags&128)&&(typeof u.getDerivedStateFromError=="function"||f!==null&&typeof f.componentDidCatch=="function"&&(Ot===null||!Ot.has(f)))){s.flags|=65536,t&=-t,s.lanes|=t;var j=Tu(s,a,t);xa(s,j);break e}}s=s.return}while(s!==null)}Ku(n)}catch(v){t=v,ye===n&&n!==null&&(ye=n=n.return);continue}break}while(!0)}function Hu(){var e=Al.current;return Al.current=Fl,e===null?Fl:e}function ko(){(ke===0||ke===3||ke===2)&&(ke=4),we===null||!(an&268435455)&&!(ei&268435455)||It(we,be)}function Bl(e,t){var n=ne;ne|=2;var r=Hu();(we!==e||be!==t)&&(ft=null,nn(e,t));do try{I1();break}catch(i){Vu(e,i)}while(!0);if(to(),ne=n,Al.current=r,ye!==null)throw Error(_(261));return we=null,be=0,ke}function I1(){for(;ye!==null;)$u(ye)}function _1(){for(;ye!==null&&!rp();)$u(ye)}function $u(e){var t=Gu(e.alternate,e,Ue);e.memoizedProps=e.pendingProps,t===null?Ku(e):ye=t,xo.current=null}function Ku(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&32768){if(n=b1(n,t),n!==null){n.flags&=32767,ye=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{ke=6,ye=null;return}}else if(n=C1(n,t,Ue),n!==null){ye=n;return}if(t=t.sibling,t!==null){ye=t;return}ye=t=e}while(t!==null);ke===0&&(ke=5)}function Jt(e,t,n){var r=ie,i=Je.transition;try{Je.transition=null,ie=1,L1(e,t,n,r)}finally{Je.transition=i,ie=r}return null}function L1(e,t,n,r){do In();while(Lt!==null);if(ne&6)throw Error(_(327));n=e.finishedWork;var i=e.finishedLanes;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(_(177));e.callbackNode=null,e.callbackPriority=0;var s=n.lanes|n.childLanes;if(fp(e,s),e===we&&(ye=we=null,be=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||il||(il=!0,Xu(wl,function(){return In(),null})),s=(n.flags&15990)!==0,n.subtreeFlags&15990||s){s=Je.transition,Je.transition=null;var o=ie;ie=1;var a=ne;ne|=4,xo.current=null,T1(e,n),Wu(n,e),qp(ss),Cl=!!is,ss=is=null,e.current=n,P1(n),lp(),ne=a,ie=o,Je.transition=s}else e.current=n;if(il&&(il=!1,Lt=e,Wl=i),s=e.pendingLanes,s===0&&(Ot=null),op(n.stateNode),Oe(e,xe()),t!==null)for(r=e.onRecoverableError,n=0;n<t.length;n++)i=t[n],r(i.value,{componentStack:i.stack,digest:i.digest});if(Ol)throw Ol=!1,e=zs,zs=null,e;return Wl&1&&e.tag!==0&&In(),s=e.pendingLanes,s&1?e===Ts?hr++:(hr=0,Ts=e):hr=0,Qt(),null}function In(){if(Lt!==null){var e=zc(Wl),t=Je.transition,n=ie;try{if(Je.transition=null,ie=16>e?16:e,Lt===null)var r=!1;else{if(e=Lt,Lt=null,Wl=0,ne&6)throw Error(_(331));var i=ne;for(ne|=4,O=e.current;O!==null;){var s=O,o=s.child;if(O.flags&16){var a=s.deletions;if(a!==null){for(var c=0;c<a.length;c++){var d=a[c];for(O=d;O!==null;){var x=O;switch(x.tag){case 0:case 11:case 15:pr(8,x,s)}var y=x.child;if(y!==null)y.return=x,O=y;else for(;O!==null;){x=O;var g=x.sibling,k=x.return;if(Fu(x),x===d){O=null;break}if(g!==null){g.return=k,O=g;break}O=k}}}var S=s.alternate;if(S!==null){var m=S.child;if(m!==null){S.child=null;do{var N=m.sibling;m.sibling=null,m=N}while(m!==null)}}O=s}}if(s.subtreeFlags&2064&&o!==null)o.return=s,O=o;else e:for(;O!==null;){if(s=O,s.flags&2048)switch(s.tag){case 0:case 11:case 15:pr(9,s,s.return)}var p=s.sibling;if(p!==null){p.return=s.return,O=p;break e}O=s.return}}var u=e.current;for(O=u;O!==null;){o=O;var f=o.child;if(o.subtreeFlags&2064&&f!==null)f.return=o,O=f;else e:for(o=u;O!==null;){if(a=O,a.flags&2048)try{switch(a.tag){case 0:case 11:case 15:ql(9,a)}}catch(v){he(a,a.return,v)}if(a===o){O=null;break e}var j=a.sibling;if(j!==null){j.return=a.return,O=j;break e}O=a.return}}if(ne=i,Qt(),ut&&typeof ut.onPostCommitFiberRoot=="function")try{ut.onPostCommitFiberRoot($l,e)}catch{}r=!0}return r}finally{ie=n,Je.transition=t}}return!1}function Ra(e,t,n){t=On(n,t),t=zu(e,t,1),e=At(e,t,1),t=_e(),e!==null&&(Lr(e,1,t),Oe(e,t))}function he(e,t,n){if(e.tag===3)Ra(e,e,n);else for(;t!==null;){if(t.tag===3){Ra(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(Ot===null||!Ot.has(r))){e=On(n,e),e=Tu(t,e,1),t=At(t,e,1),e=_e(),t!==null&&(Lr(t,1,e),Oe(t,e));break}}t=t.return}}function M1(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=_e(),e.pingedLanes|=e.suspendedLanes&n,we===e&&(be&n)===n&&(ke===4||ke===3&&(be&130023424)===be&&500>xe()-yo?nn(e,0):go|=n),Oe(e,t)}function Qu(e,t){t===0&&(e.mode&1?(t=Xr,Xr<<=1,!(Xr&130023424)&&(Xr=4194304)):t=1);var n=_e();e=kt(e,t),e!==null&&(Lr(e,t,n),Oe(e,n))}function D1(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Qu(e,n)}function R1(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(_(314))}r!==null&&r.delete(t),Qu(e,n)}var Gu;Gu=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Fe.current)Re=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return Re=!1,S1(e,t,n);Re=!!(e.flags&131072)}else Re=!1,ue&&t.flags&1048576&&Zc(t,Il,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;xl(e,t),e=t.pendingProps;var i=Dn(t,Ne.current);Nn(t,n),i=co(null,t,r,e,i,n);var s=uo();return t.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Ae(r)?(s=!0,El(t)):s=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,lo(t),i.updater=Zl,t.stateNode=i,i._reactInternals=t,xs(t,r,e,n),t=ms(null,t,r,!0,s,n)):(t.tag=0,ue&&s&&Js(t),Ie(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(xl(e,t),e=t.pendingProps,i=r._init,r=i(r._payload),t.type=r,i=t.tag=A1(r),e=tt(r,e),i){case 0:t=ys(null,t,r,e,n);break e;case 1:t=za(null,t,r,e,n);break e;case 11:t=Ca(null,t,r,e,n);break e;case 14:t=ba(null,t,r,tt(r.type,e),n);break e}throw Error(_(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:tt(r,i),ys(e,t,r,i,n);case 1:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:tt(r,i),za(e,t,r,i,n);case 3:e:{if(Iu(t),e===null)throw Error(_(387));r=t.pendingProps,s=t.memoizedState,i=s.element,lu(e,t),Ml(t,r,null,n);var o=t.memoizedState;if(r=o.element,s.isDehydrated)if(s={element:r,isDehydrated:!1,cache:o.cache,pendingSuspenseBoundaries:o.pendingSuspenseBoundaries,transitions:o.transitions},t.updateQueue.baseState=s,t.memoizedState=s,t.flags&256){i=On(Error(_(423)),t),t=Ta(e,t,r,n,i);break e}else if(r!==i){i=On(Error(_(424)),t),t=Ta(e,t,r,n,i);break e}else for(Ve=Ft(t.stateNode.containerInfo.firstChild),He=t,ue=!0,rt=null,n=nu(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Rn(),r===i){t=jt(e,t,n);break e}Ie(e,t,r,n)}t=t.child}return t;case 5:return iu(t),e===null&&ps(t),r=t.type,i=t.pendingProps,s=e!==null?e.memoizedProps:null,o=i.children,os(r,i)?o=null:s!==null&&os(r,s)&&(t.flags|=32),Nu(e,t),Ie(e,t,o,n),t.child;case 6:return e===null&&ps(t),null;case 13:return _u(e,t,n);case 4:return io(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Fn(t,null,r,n):Ie(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:tt(r,i),Ca(e,t,r,i,n);case 7:return Ie(e,t,t.pendingProps,n),t.child;case 8:return Ie(e,t,t.pendingProps.children,n),t.child;case 12:return Ie(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,s=t.memoizedProps,o=i.value,oe(_l,r._currentValue),r._currentValue=o,s!==null)if(st(s.value,o)){if(s.children===i.children&&!Fe.current){t=jt(e,t,n);break e}}else for(s=t.child,s!==null&&(s.return=t);s!==null;){var a=s.dependencies;if(a!==null){o=s.child;for(var c=a.firstContext;c!==null;){if(c.context===r){if(s.tag===1){c=yt(-1,n&-n),c.tag=2;var d=s.updateQueue;if(d!==null){d=d.shared;var x=d.pending;x===null?c.next=c:(c.next=x.next,x.next=c),d.pending=c}}s.lanes|=n,c=s.alternate,c!==null&&(c.lanes|=n),fs(s.return,n,t),a.lanes|=n;break}c=c.next}}else if(s.tag===10)o=s.type===t.type?null:s.child;else if(s.tag===18){if(o=s.return,o===null)throw Error(_(341));o.lanes|=n,a=o.alternate,a!==null&&(a.lanes|=n),fs(o,n,t),o=s.sibling}else o=s.child;if(o!==null)o.return=s;else for(o=s;o!==null;){if(o===t){o=null;break}if(s=o.sibling,s!==null){s.return=o.return,o=s;break}o=o.return}s=o}Ie(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,Nn(t,n),i=Ze(i),r=r(i),t.flags|=1,Ie(e,t,r,n),t.child;case 14:return r=t.type,i=tt(r,t.pendingProps),i=tt(r.type,i),ba(e,t,r,i,n);case 15:return Pu(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:tt(r,i),xl(e,t),t.tag=1,Ae(r)?(e=!0,El(t)):e=!1,Nn(t,n),bu(t,r,i),xs(t,r,i,n),ms(null,t,r,!0,e,n);case 19:return Lu(e,t,n);case 22:return Eu(e,t,n)}throw Error(_(156,t.tag))};function Xu(e,t){return wc(e,t)}function F1(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Ye(e,t,n,r){return new F1(e,t,n,r)}function jo(e){return e=e.prototype,!(!e||!e.isReactComponent)}function A1(e){if(typeof e=="function")return jo(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Os)return 11;if(e===Ws)return 14}return 2}function Bt(e,t){var n=e.alternate;return n===null?(n=Ye(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function ml(e,t,n,r,i,s){var o=2;if(r=e,typeof e=="function")jo(e)&&(o=1);else if(typeof e=="string")o=5;else e:switch(e){case xn:return rn(n.children,i,s,t);case As:o=8,i|=8;break;case Oi:return e=Ye(12,n,t,i|2),e.elementType=Oi,e.lanes=s,e;case Wi:return e=Ye(13,n,t,i),e.elementType=Wi,e.lanes=s,e;case Bi:return e=Ye(19,n,t,i),e.elementType=Bi,e.lanes=s,e;case ic:return ti(n,i,s,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case rc:o=10;break e;case lc:o=9;break e;case Os:o=11;break e;case Ws:o=14;break e;case Pt:o=16,r=null;break e}throw Error(_(130,e==null?e:typeof e,""))}return t=Ye(o,n,t,i),t.elementType=e,t.type=r,t.lanes=s,t}function rn(e,t,n,r){return e=Ye(7,e,r,t),e.lanes=n,e}function ti(e,t,n,r){return e=Ye(22,e,r,t),e.elementType=ic,e.lanes=n,e.stateNode={isHidden:!1},e}function Mi(e,t,n){return e=Ye(6,e,null,t),e.lanes=n,e}function Di(e,t,n){return t=Ye(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function O1(e,t,n,r,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=xi(0),this.expirationTimes=xi(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=xi(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function wo(e,t,n,r,i,s,o,a,c){return e=new O1(e,t,n,a,c),t===1?(t=1,s===!0&&(t|=8)):t=0,s=Ye(3,null,null,t),e.current=s,s.stateNode=e,s.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},lo(s),e}function W1(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:hn,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function Yu(e){if(!e)return Ht;e=e._reactInternals;e:{if(pn(e)!==e||e.tag!==1)throw Error(_(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(Ae(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(_(171))}if(e.tag===1){var n=e.type;if(Ae(n))return Yc(e,n,t)}return t}function Ju(e,t,n,r,i,s,o,a,c){return e=wo(n,r,!0,e,i,s,o,a,c),e.context=Yu(null),n=e.current,r=_e(),i=Wt(n),s=yt(r,i),s.callback=t??null,At(n,s,i),e.current.lanes=i,Lr(e,i,r),Oe(e,r),e}function ni(e,t,n,r){var i=t.current,s=_e(),o=Wt(i);return n=Yu(n),t.context===null?t.context=n:t.pendingContext=n,t=yt(s,o),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=At(i,t,o),e!==null&&(it(e,i,o,s),pl(e,i,o)),o}function Ul(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function Fa(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function So(e,t){Fa(e,t),(e=e.alternate)&&Fa(e,t)}function B1(){return null}var Zu=typeof reportError=="function"?reportError:function(e){console.error(e)};function Co(e){this._internalRoot=e}ri.prototype.render=Co.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(_(409));ni(e,t,null,null)};ri.prototype.unmount=Co.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;cn(function(){ni(null,e,null,null)}),t[vt]=null}};function ri(e){this._internalRoot=e}ri.prototype.unstable_scheduleHydration=function(e){if(e){var t=Ec();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Nt.length&&t!==0&&t<Nt[n].priority;n++);Nt.splice(n,0,e),n===0&&Ic(e)}};function bo(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function li(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function Aa(){}function U1(e,t,n,r,i){if(i){if(typeof r=="function"){var s=r;r=function(){var d=Ul(o);s.call(d)}}var o=Ju(t,r,e,0,null,!1,!1,"",Aa);return e._reactRootContainer=o,e[vt]=o.current,Sr(e.nodeType===8?e.parentNode:e),cn(),o}for(;i=e.lastChild;)e.removeChild(i);if(typeof r=="function"){var a=r;r=function(){var d=Ul(c);a.call(d)}}var c=wo(e,0,!1,null,null,!1,!1,"",Aa);return e._reactRootContainer=c,e[vt]=c.current,Sr(e.nodeType===8?e.parentNode:e),cn(function(){ni(t,c,n,r)}),c}function ii(e,t,n,r,i){var s=n._reactRootContainer;if(s){var o=s;if(typeof i=="function"){var a=i;i=function(){var c=Ul(o);a.call(c)}}ni(t,o,e,i)}else o=U1(n,t,e,i,r);return Ul(o)}Tc=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=lr(t.pendingLanes);n!==0&&(Vs(t,n|1),Oe(t,xe()),!(ne&6)&&(Wn=xe()+500,Qt()))}break;case 13:cn(function(){var r=kt(e,1);if(r!==null){var i=_e();it(r,e,1,i)}}),So(e,1)}};Hs=function(e){if(e.tag===13){var t=kt(e,134217728);if(t!==null){var n=_e();it(t,e,134217728,n)}So(e,134217728)}};Pc=function(e){if(e.tag===13){var t=Wt(e),n=kt(e,t);if(n!==null){var r=_e();it(n,e,t,r)}So(e,t)}};Ec=function(){return ie};Nc=function(e,t){var n=ie;try{return ie=e,t()}finally{ie=n}};Ji=function(e,t,n){switch(t){case"input":if(Hi(e,n),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var i=Xl(r);if(!i)throw Error(_(90));oc(r),Hi(r,i)}}}break;case"textarea":cc(e,n);break;case"select":t=n.value,t!=null&&zn(e,!!n.multiple,t,!1)}};gc=mo;yc=cn;var V1={usingClientEntryPoint:!1,Events:[Dr,vn,Xl,hc,xc,mo]},er={findFiberByHostInstance:qt,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},H1={bundleType:er.bundleType,version:er.version,rendererPackageName:er.rendererPackageName,rendererConfig:er.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:wt.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=kc(e),e===null?null:e.stateNode},findFiberByHostInstance:er.findFiberByHostInstance||B1,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var sl=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!sl.isDisabled&&sl.supportsFiber)try{$l=sl.inject(H1),ut=sl}catch{}}Ke.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=V1;Ke.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!bo(t))throw Error(_(200));return W1(e,t,null,n)};Ke.createRoot=function(e,t){if(!bo(e))throw Error(_(299));var n=!1,r="",i=Zu;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(i=t.onRecoverableError)),t=wo(e,1,!1,null,null,n,!1,r,i),e[vt]=t.current,Sr(e.nodeType===8?e.parentNode:e),new Co(t)};Ke.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(_(188)):(e=Object.keys(e).join(","),Error(_(268,e)));return e=kc(t),e=e===null?null:e.stateNode,e};Ke.flushSync=function(e){return cn(e)};Ke.hydrate=function(e,t,n){if(!li(t))throw Error(_(200));return ii(null,e,t,!0,n)};Ke.hydrateRoot=function(e,t,n){if(!bo(e))throw Error(_(405));var r=n!=null&&n.hydratedSources||null,i=!1,s="",o=Zu;if(n!=null&&(n.unstable_strictMode===!0&&(i=!0),n.identifierPrefix!==void 0&&(s=n.identifierPrefix),n.onRecoverableError!==void 0&&(o=n.onRecoverableError)),t=Ju(t,null,e,1,n??null,i,!1,s,o),e[vt]=t.current,Sr(e),r)for(e=0;e<r.length;e++)n=r[e],i=n._getVersion,i=i(n._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[n,i]:t.mutableSourceEagerHydrationData.push(n,i);return new ri(t)};Ke.render=function(e,t,n){if(!li(t))throw Error(_(200));return ii(null,e,t,!1,n)};Ke.unmountComponentAtNode=function(e){if(!li(e))throw Error(_(40));return e._reactRootContainer?(cn(function(){ii(null,null,e,!1,function(){e._reactRootContainer=null,e[vt]=null})}),!0):!1};Ke.unstable_batchedUpdates=mo;Ke.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!li(n))throw Error(_(200));if(e==null||e._reactInternals===void 0)throw Error(_(38));return ii(e,t,n,!1,r)};Ke.version="18.3.1-next-f1338f8080-20240426";function qu(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(qu)}catch(e){console.error(e)}}qu(),qa.exports=Ke;var $1=qa.exports,Oa=$1;Fi.createRoot=Oa.createRoot,Fi.hydrateRoot=Oa.hydrateRoot;const ed=C.createContext(void 0),K1=({children:e})=>{const[t,n]=C.useState(!1),[r,i]=C.useState(!1),[s,o]=C.useState(!0),[a,c]=C.useState(()=>sessionStorage.getItem("sessionToken")),[d,x]=C.useState(()=>{const f=localStorage.getItem("theme");return f==="light"||f==="dark"?f:"dark"}),y=async()=>{try{const j=await(await fetch("/api/auth/status")).json();n(j.initialized),i(j.unlocked),j.unlocked||(c(null),sessionStorage.removeItem("sessionToken"))}catch(f){console.error("Failed to check auth status:",f)}finally{o(!1)}};C.useEffect(()=>{y()},[]),C.useEffect(()=>{document.documentElement.setAttribute("data-theme",d),localStorage.setItem("theme",d)},[d]);const g=()=>{x(f=>f==="dark"?"light":"dark")},k=async(f,j)=>{o(!0);try{const v=await fetch("/api/auth/initialize",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({password:f,hint:j})}),w=await v.json();return v.ok&&w.success?(c(w.token),sessionStorage.setItem("sessionToken",w.token),n(!0),i(!0),!0):!1}catch(v){return console.error("Failed to initialize vault:",v),!1}finally{o(!1)}},S=async f=>{o(!0);try{const j=await fetch("/api/auth/unlock",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({password:f})}),v=await j.json();return j.ok&&v.success?(c(v.token),sessionStorage.setItem("sessionToken",v.token),i(!0),!0):!1}catch(j){return console.error("Failed to unlock vault:",j),!1}finally{o(!1)}},m=async()=>{try{await fetch("/api/auth/lock",{method:"POST"})}catch(f){console.error("Failed to lock vault:",f)}finally{c(null),sessionStorage.removeItem("sessionToken"),i(!1)}},N=async()=>{try{return(await(await fetch("/api/auth/hint")).json()).hint||null}catch(f){return console.error("Failed to get hint:",f),null}},p=async(f,j={})=>{const v={...j.headers,Authorization:`Bearer ${a}`,"Content-Type":"application/json"},w=await fetch(f,{...j,headers:v});return w.status===401&&(c(null),sessionStorage.removeItem("sessionToken"),i(!1)),w},u=f=>{c(f),sessionStorage.setItem("sessionToken",f)};return l.jsx(ed.Provider,{value:{isInitialized:t,isAuthenticated:r,isLoading:s,sessionToken:a,theme:d,toggleTheme:g,checkStatus:y,initializeVault:k,unlockVault:S,lockVault:m,getHint:N,fetchWithAuth:p,updateSessionToken:u},children:e})},St=()=>{const e=C.useContext(ed);if(!e)throw new Error("useAuth must be used within an AuthProvider");return e};/**
40
+ `+s.stack}return{value:e,source:t,stack:i,digest:null}}function Li(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function ys(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var k1=typeof WeakMap=="function"?WeakMap:Map;function zu(e,t,n){n=yt(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Ol||(Ol=!0,Ts=r),ys(e,t)},n}function Tu(e,t,n){n=yt(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var i=t.value;n.payload=function(){return r(i)},n.callback=function(){ys(e,t)}}var s=e.stateNode;return s!==null&&typeof s.componentDidCatch=="function"&&(n.callback=function(){ys(e,t),typeof r!="function"&&(Wt===null?Wt=new Set([this]):Wt.add(this));var o=t.stack;this.componentDidCatch(t.value,{componentStack:o!==null?o:""})}),n}function ja(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new k1;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(i.add(n),e=M1.bind(null,e,t,n),t.then(e,e))}function wa(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function Sa(e,t,n,r,i){return e.mode&1?(e.flags|=65536,e.lanes=i,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=yt(-1,1),t.tag=2,Ot(n,t,1))),n.lanes|=1),e)}var j1=wt.ReactCurrentOwner,Re=!1;function Ie(e,t,n,r){t.child=e===null?nu(t,null,n,r):On(t,e.child,n,r)}function Ca(e,t,n,r,i){n=n.render;var s=t.ref;return _n(t,i),r=uo(e,t,n,r,s,i),n=po(),e!==null&&!Re?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,jt(e,t,i)):(ue&&n&&Js(t),t.flags|=1,Ie(e,t,r,i),t.child)}function ba(e,t,n,r,i){if(e===null){var s=n.type;return typeof s=="function"&&!wo(s)&&s.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=s,Pu(e,t,s,r,i)):(e=ml(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(s=e.child,!(e.lanes&i)){var o=s.memoizedProps;if(n=n.compare,n=n!==null?n:wr,n(o,r)&&e.ref===t.ref)return jt(e,t,i)}return t.flags|=1,e=Ut(s,r),e.ref=t.ref,e.return=t,t.child=e}function Pu(e,t,n,r,i){if(e!==null){var s=e.memoizedProps;if(wr(s,r)&&e.ref===t.ref)if(Re=!1,t.pendingProps=r=s,(e.lanes&i)!==0)e.flags&131072&&(Re=!0);else return t.lanes=e.lanes,jt(e,t,i)}return ms(e,t,n,r,i)}function Eu(e,t,n){var r=t.pendingProps,i=r.children,s=e!==null?e.memoizedState:null;if(r.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},oe(Tn,Ue),Ue|=n;else{if(!(n&1073741824))return e=s!==null?s.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,oe(Tn,Ue),Ue|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=s!==null?s.baseLanes:n,oe(Tn,Ue),Ue|=r}else s!==null?(r=s.baseLanes|n,t.memoizedState=null):r=n,oe(Tn,Ue),Ue|=r;return Ie(e,t,i,n),t.child}function Nu(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function ms(e,t,n,r,i){var s=Ae(n)?ln:Ne.current;return s=Fn(t,s),_n(t,i),n=uo(e,t,n,r,s,i),r=po(),e!==null&&!Re?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,jt(e,t,i)):(ue&&r&&Js(t),t.flags|=1,Ie(e,t,n,i),t.child)}function za(e,t,n,r,i){if(Ae(n)){var s=!0;El(t)}else s=!1;if(_n(t,i),t.stateNode===null)xl(e,t),bu(t,n,r),gs(t,n,r,i),r=!0;else if(e===null){var o=t.stateNode,a=t.memoizedProps;o.props=a;var c=o.context,u=n.contextType;typeof u=="object"&&u!==null?u=Je(u):(u=Ae(n)?ln:Ne.current,u=Fn(t,u));var x=n.getDerivedStateFromProps,y=typeof x=="function"||typeof o.getSnapshotBeforeUpdate=="function";y||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(a!==r||c!==u)&&ka(t,o,r,u),Et=!1;var g=t.memoizedState;o.state=g,Ml(t,r,o,i),c=t.memoizedState,a!==r||g!==c||Fe.current||Et?(typeof x=="function"&&(xs(t,n,x,r),c=t.memoizedState),(a=Et||va(t,n,a,r,g,c,u))?(y||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount()),typeof o.componentDidMount=="function"&&(t.flags|=4194308)):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=c),o.props=r,o.state=c,o.context=u,r=a):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{o=t.stateNode,lu(e,t),a=t.memoizedProps,u=t.type===t.elementType?a:tt(t.type,a),o.props=u,y=t.pendingProps,g=o.context,c=n.contextType,typeof c=="object"&&c!==null?c=Je(c):(c=Ae(n)?ln:Ne.current,c=Fn(t,c));var k=n.getDerivedStateFromProps;(x=typeof k=="function"||typeof o.getSnapshotBeforeUpdate=="function")||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(a!==y||g!==c)&&ka(t,o,r,c),Et=!1,g=t.memoizedState,o.state=g,Ml(t,r,o,i);var C=t.memoizedState;a!==y||g!==C||Fe.current||Et?(typeof k=="function"&&(xs(t,n,k,r),C=t.memoizedState),(u=Et||va(t,n,u,r,g,C,c)||!1)?(x||typeof o.UNSAFE_componentWillUpdate!="function"&&typeof o.componentWillUpdate!="function"||(typeof o.componentWillUpdate=="function"&&o.componentWillUpdate(r,C,c),typeof o.UNSAFE_componentWillUpdate=="function"&&o.UNSAFE_componentWillUpdate(r,C,c)),typeof o.componentDidUpdate=="function"&&(t.flags|=4),typeof o.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof o.componentDidUpdate!="function"||a===e.memoizedProps&&g===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&g===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=C),o.props=r,o.state=C,o.context=c,r=u):(typeof o.componentDidUpdate!="function"||a===e.memoizedProps&&g===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&g===e.memoizedState||(t.flags|=1024),r=!1)}return vs(e,t,n,r,s,i)}function vs(e,t,n,r,i,s){Nu(e,t);var o=(t.flags&128)!==0;if(!r&&!o)return i&&da(t,n,!1),jt(e,t,s);r=t.stateNode,j1.current=t;var a=o&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&o?(t.child=On(t,e.child,null,s),t.child=On(t,null,a,s)):Ie(e,t,a,s),t.memoizedState=r.state,i&&da(t,n,!0),t.child}function Iu(e){var t=e.stateNode;t.pendingContext?ua(e,t.pendingContext,t.pendingContext!==t.context):t.context&&ua(e,t.context,!1),so(e,t.containerInfo)}function Ta(e,t,n,r,i){return An(),eo(i),t.flags|=256,Ie(e,t,n,r),t.child}var ks={dehydrated:null,treeContext:null,retryLane:0};function js(e){return{baseLanes:e,cachePool:null,transitions:null}}function _u(e,t,n){var r=t.pendingProps,i=de.current,s=!1,o=(t.flags&128)!==0,a;if((a=o)||(a=e!==null&&e.memoizedState===null?!1:(i&2)!==0),a?(s=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(i|=1),oe(de,i&1),e===null)return fs(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data==="$!"?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(o=r.children,e=r.fallback,s?(r=t.mode,s=t.child,o={mode:"hidden",children:o},!(r&1)&&s!==null?(s.childLanes=0,s.pendingProps=o):s=ti(o,r,0,null),e=rn(e,r,n,null),s.return=t,e.return=t,s.sibling=e,t.child=s,t.child.memoizedState=js(n),t.memoizedState=ks,e):xo(t,o));if(i=e.memoizedState,i!==null&&(a=i.dehydrated,a!==null))return w1(e,t,o,r,a,i,n);if(s){s=r.fallback,o=t.mode,i=e.child,a=i.sibling;var c={mode:"hidden",children:r.children};return!(o&1)&&t.child!==i?(r=t.child,r.childLanes=0,r.pendingProps=c,t.deletions=null):(r=Ut(i,c),r.subtreeFlags=i.subtreeFlags&14680064),a!==null?s=Ut(a,s):(s=rn(s,o,n,null),s.flags|=2),s.return=t,r.return=t,r.sibling=s,t.child=r,r=s,s=t.child,o=e.child.memoizedState,o=o===null?js(n):{baseLanes:o.baseLanes|n,cachePool:null,transitions:o.transitions},s.memoizedState=o,s.childLanes=e.childLanes&~n,t.memoizedState=ks,r}return s=e.child,e=s.sibling,r=Ut(s,{mode:"visible",children:r.children}),!(t.mode&1)&&(r.lanes=n),r.return=t,r.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function xo(e,t){return t=ti({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function rl(e,t,n,r){return r!==null&&eo(r),On(t,e.child,null,n),e=xo(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function w1(e,t,n,r,i,s,o){if(n)return t.flags&256?(t.flags&=-257,r=Li(Error(_(422))),rl(e,t,o,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(s=r.fallback,i=t.mode,r=ti({mode:"visible",children:r.children},i,0,null),s=rn(s,i,o,null),s.flags|=2,r.return=t,s.return=t,r.sibling=s,t.child=r,t.mode&1&&On(t,e.child,null,o),t.child.memoizedState=js(o),t.memoizedState=ks,s);if(!(t.mode&1))return rl(e,t,o,null);if(i.data==="$!"){if(r=i.nextSibling&&i.nextSibling.dataset,r)var a=r.dgst;return r=a,s=Error(_(419)),r=Li(s,r,void 0),rl(e,t,o,r)}if(a=(o&e.childLanes)!==0,Re||a){if(r=we,r!==null){switch(o&-o){case 4:i=2;break;case 16:i=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:i=32;break;case 536870912:i=268435456;break;default:i=0}i=i&(r.suspendedLanes|o)?0:i,i!==0&&i!==s.retryLane&&(s.retryLane=i,kt(e,i),it(r,e,i,-1))}return jo(),r=Li(Error(_(421))),rl(e,t,o,r)}return i.data==="$?"?(t.flags|=128,t.child=e.child,t=D1.bind(null,e),i._reactRetry=t,null):(e=s.treeContext,Ve=At(i.nextSibling),He=t,ue=!0,rt=null,e!==null&&(Ge[Xe++]=xt,Ge[Xe++]=gt,Ge[Xe++]=sn,xt=e.id,gt=e.overflow,sn=t),t=xo(t,r.children),t.flags|=4096,t)}function Pa(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),hs(e.return,t,n)}function Mi(e,t,n,r,i){var s=e.memoizedState;s===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i}:(s.isBackwards=t,s.rendering=null,s.renderingStartTime=0,s.last=r,s.tail=n,s.tailMode=i)}function Lu(e,t,n){var r=t.pendingProps,i=r.revealOrder,s=r.tail;if(Ie(e,t,r.children,n),r=de.current,r&2)r=r&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Pa(e,n,t);else if(e.tag===19)Pa(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(oe(de,r),!(t.mode&1))t.memoizedState=null;else switch(i){case"forwards":for(n=t.child,i=null;n!==null;)e=n.alternate,e!==null&&Dl(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),Mi(t,!1,i,n,s);break;case"backwards":for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&Dl(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}Mi(t,!0,n,null,s);break;case"together":Mi(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function xl(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function jt(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),an|=t.lanes,!(n&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(_(153));if(t.child!==null){for(e=t.child,n=Ut(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=Ut(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function S1(e,t,n){switch(t.tag){case 3:Iu(t),An();break;case 5:iu(t);break;case 1:Ae(t.type)&&El(t);break;case 4:so(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,i=t.memoizedProps.value;oe(_l,r._currentValue),r._currentValue=i;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(oe(de,de.current&1),t.flags|=128,null):n&t.child.childLanes?_u(e,t,n):(oe(de,de.current&1),e=jt(e,t,n),e!==null?e.sibling:null);oe(de,de.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return Lu(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),oe(de,de.current),r)break;return null;case 22:case 23:return t.lanes=0,Eu(e,t,n)}return jt(e,t,n)}var Mu,ws,Du,Ru;Mu=function(e,t){for(var n=t.child;n!==null;){if(n.tag===5||n.tag===6)e.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}};ws=function(){};Du=function(e,t,n,r){var i=e.memoizedProps;if(i!==r){e=t.stateNode,tn(dt.current);var s=null;switch(n){case"input":i=Hi(e,i),r=Hi(e,r),s=[];break;case"select":i=fe({},i,{value:void 0}),r=fe({},r,{value:void 0}),s=[];break;case"textarea":i=Qi(e,i),r=Qi(e,r),s=[];break;default:typeof i.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=Tl)}Xi(n,r);var o;n=null;for(u in i)if(!r.hasOwnProperty(u)&&i.hasOwnProperty(u)&&i[u]!=null)if(u==="style"){var a=i[u];for(o in a)a.hasOwnProperty(o)&&(n||(n={}),n[o]="")}else u!=="dangerouslySetInnerHTML"&&u!=="children"&&u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&u!=="autoFocus"&&(xr.hasOwnProperty(u)?s||(s=[]):(s=s||[]).push(u,null));for(u in r){var c=r[u];if(a=i!=null?i[u]:void 0,r.hasOwnProperty(u)&&c!==a&&(c!=null||a!=null))if(u==="style")if(a){for(o in a)!a.hasOwnProperty(o)||c&&c.hasOwnProperty(o)||(n||(n={}),n[o]="");for(o in c)c.hasOwnProperty(o)&&a[o]!==c[o]&&(n||(n={}),n[o]=c[o])}else n||(s||(s=[]),s.push(u,n)),n=c;else u==="dangerouslySetInnerHTML"?(c=c?c.__html:void 0,a=a?a.__html:void 0,c!=null&&a!==c&&(s=s||[]).push(u,c)):u==="children"?typeof c!="string"&&typeof c!="number"||(s=s||[]).push(u,""+c):u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&(xr.hasOwnProperty(u)?(c!=null&&u==="onScroll"&&ae("scroll",e),s||a===c||(s=[])):(s=s||[]).push(u,c))}n&&(s=s||[]).push("style",n);var u=s;(t.updateQueue=u)&&(t.flags|=4)}};Ru=function(e,t,n,r){n!==r&&(t.flags|=4)};function er(e,t){if(!ue)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function Pe(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&14680064,r|=i.flags&14680064,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function C1(e,t,n){var r=t.pendingProps;switch(qs(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Pe(t),null;case 1:return Ae(t.type)&&Pl(),Pe(t),null;case 3:return r=t.stateNode,Wn(),ce(Fe),ce(Ne),ao(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(tl(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,rt!==null&&(Ns(rt),rt=null))),ws(e,t),Pe(t),null;case 5:oo(t);var i=tn(Tr.current);if(n=t.type,e!==null&&t.stateNode!=null)Du(e,t,n,r,i),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(_(166));return Pe(t),null}if(e=tn(dt.current),tl(t)){r=t.stateNode,n=t.type;var s=t.memoizedProps;switch(r[ct]=t,r[br]=s,e=(t.mode&1)!==0,n){case"dialog":ae("cancel",r),ae("close",r);break;case"iframe":case"object":case"embed":ae("load",r);break;case"video":case"audio":for(i=0;i<ir.length;i++)ae(ir[i],r);break;case"source":ae("error",r);break;case"img":case"image":case"link":ae("error",r),ae("load",r);break;case"details":ae("toggle",r);break;case"input":Fo(r,s),ae("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!s.multiple},ae("invalid",r);break;case"textarea":Oo(r,s),ae("invalid",r)}Xi(n,s),i=null;for(var o in s)if(s.hasOwnProperty(o)){var a=s[o];o==="children"?typeof a=="string"?r.textContent!==a&&(s.suppressHydrationWarning!==!0&&el(r.textContent,a,e),i=["children",a]):typeof a=="number"&&r.textContent!==""+a&&(s.suppressHydrationWarning!==!0&&el(r.textContent,a,e),i=["children",""+a]):xr.hasOwnProperty(o)&&a!=null&&o==="onScroll"&&ae("scroll",r)}switch(n){case"input":Kr(r),Ao(r,s,!0);break;case"textarea":Kr(r),Wo(r);break;case"select":case"option":break;default:typeof s.onClick=="function"&&(r.onclick=Tl)}r=i,t.updateQueue=r,r!==null&&(t.flags|=4)}else{o=i.nodeType===9?i:i.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=uc(n)),e==="http://www.w3.org/1999/xhtml"?n==="script"?(e=o.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=o.createElement(n,{is:r.is}):(e=o.createElement(n),n==="select"&&(o=e,r.multiple?o.multiple=!0:r.size&&(o.size=r.size))):e=o.createElementNS(e,n),e[ct]=t,e[br]=r,Mu(e,t,!1,!1),t.stateNode=e;e:{switch(o=Yi(n,r),n){case"dialog":ae("cancel",e),ae("close",e),i=r;break;case"iframe":case"object":case"embed":ae("load",e),i=r;break;case"video":case"audio":for(i=0;i<ir.length;i++)ae(ir[i],e);i=r;break;case"source":ae("error",e),i=r;break;case"img":case"image":case"link":ae("error",e),ae("load",e),i=r;break;case"details":ae("toggle",e),i=r;break;case"input":Fo(e,r),i=Hi(e,r),ae("invalid",e);break;case"option":i=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},i=fe({},r,{value:void 0}),ae("invalid",e);break;case"textarea":Oo(e,r),i=Qi(e,r),ae("invalid",e);break;default:i=r}Xi(n,i),a=i;for(s in a)if(a.hasOwnProperty(s)){var c=a[s];s==="style"?fc(e,c):s==="dangerouslySetInnerHTML"?(c=c?c.__html:void 0,c!=null&&dc(e,c)):s==="children"?typeof c=="string"?(n!=="textarea"||c!=="")&&gr(e,c):typeof c=="number"&&gr(e,""+c):s!=="suppressContentEditableWarning"&&s!=="suppressHydrationWarning"&&s!=="autoFocus"&&(xr.hasOwnProperty(s)?c!=null&&s==="onScroll"&&ae("scroll",e):c!=null&&As(e,s,c,o))}switch(n){case"input":Kr(e),Ao(e,r,!1);break;case"textarea":Kr(e),Wo(e);break;case"option":r.value!=null&&e.setAttribute("value",""+Ht(r.value));break;case"select":e.multiple=!!r.multiple,s=r.value,s!=null?Pn(e,!!r.multiple,s,!1):r.defaultValue!=null&&Pn(e,!!r.multiple,r.defaultValue,!0);break;default:typeof i.onClick=="function"&&(e.onclick=Tl)}switch(n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return Pe(t),null;case 6:if(e&&t.stateNode!=null)Ru(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(_(166));if(n=tn(Tr.current),tn(dt.current),tl(t)){if(r=t.stateNode,n=t.memoizedProps,r[ct]=t,(s=r.nodeValue!==n)&&(e=He,e!==null))switch(e.tag){case 3:el(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&el(r.nodeValue,n,(e.mode&1)!==0)}s&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[ct]=t,t.stateNode=r}return Pe(t),null;case 13:if(ce(de),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(ue&&Ve!==null&&t.mode&1&&!(t.flags&128))eu(),An(),t.flags|=98560,s=!1;else if(s=tl(t),r!==null&&r.dehydrated!==null){if(e===null){if(!s)throw Error(_(318));if(s=t.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(_(317));s[ct]=t}else An(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Pe(t),s=!1}else rt!==null&&(Ns(rt),rt=null),s=!0;if(!s)return t.flags&65536?t:null}return t.flags&128?(t.lanes=n,t):(r=r!==null,r!==(e!==null&&e.memoizedState!==null)&&r&&(t.child.flags|=8192,t.mode&1&&(e===null||de.current&1?ke===0&&(ke=3):jo())),t.updateQueue!==null&&(t.flags|=4),Pe(t),null);case 4:return Wn(),ws(e,t),e===null&&Sr(t.stateNode.containerInfo),Pe(t),null;case 10:return ro(t.type._context),Pe(t),null;case 17:return Ae(t.type)&&Pl(),Pe(t),null;case 19:if(ce(de),s=t.memoizedState,s===null)return Pe(t),null;if(r=(t.flags&128)!==0,o=s.rendering,o===null)if(r)er(s,!1);else{if(ke!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=Dl(e),o!==null){for(t.flags|=128,er(s,!1),r=o.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;n!==null;)s=n,e=r,s.flags&=14680066,o=s.alternate,o===null?(s.childLanes=0,s.lanes=e,s.child=null,s.subtreeFlags=0,s.memoizedProps=null,s.memoizedState=null,s.updateQueue=null,s.dependencies=null,s.stateNode=null):(s.childLanes=o.childLanes,s.lanes=o.lanes,s.child=o.child,s.subtreeFlags=0,s.deletions=null,s.memoizedProps=o.memoizedProps,s.memoizedState=o.memoizedState,s.updateQueue=o.updateQueue,s.type=o.type,e=o.dependencies,s.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return oe(de,de.current&1|2),t.child}e=e.sibling}s.tail!==null&&xe()>Un&&(t.flags|=128,r=!0,er(s,!1),t.lanes=4194304)}else{if(!r)if(e=Dl(o),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),er(s,!0),s.tail===null&&s.tailMode==="hidden"&&!o.alternate&&!ue)return Pe(t),null}else 2*xe()-s.renderingStartTime>Un&&n!==1073741824&&(t.flags|=128,r=!0,er(s,!1),t.lanes=4194304);s.isBackwards?(o.sibling=t.child,t.child=o):(n=s.last,n!==null?n.sibling=o:t.child=o,s.last=o)}return s.tail!==null?(t=s.tail,s.rendering=t,s.tail=t.sibling,s.renderingStartTime=xe(),t.sibling=null,n=de.current,oe(de,r?n&1|2:n&1),t):(Pe(t),null);case 22:case 23:return ko(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?Ue&1073741824&&(Pe(t),t.subtreeFlags&6&&(t.flags|=8192)):Pe(t),null;case 24:return null;case 25:return null}throw Error(_(156,t.tag))}function b1(e,t){switch(qs(t),t.tag){case 1:return Ae(t.type)&&Pl(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Wn(),ce(Fe),ce(Ne),ao(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return oo(t),null;case 13:if(ce(de),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(_(340));An()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return ce(de),null;case 4:return Wn(),null;case 10:return ro(t.type._context),null;case 22:case 23:return ko(),null;case 24:return null;default:return null}}var ll=!1,Ee=!1,z1=typeof WeakSet=="function"?WeakSet:Set,O=null;function zn(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){he(e,t,r)}else n.current=null}function Ss(e,t,n){try{n()}catch(r){he(e,t,r)}}var Ea=!1;function T1(e,t){if(ss=Cl,e=Bc(),Zs(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,s=r.focusNode;r=r.focusOffset;try{n.nodeType,s.nodeType}catch{n=null;break e}var o=0,a=-1,c=-1,u=0,x=0,y=e,g=null;t:for(;;){for(var k;y!==n||i!==0&&y.nodeType!==3||(a=o+i),y!==s||r!==0&&y.nodeType!==3||(c=o+r),y.nodeType===3&&(o+=y.nodeValue.length),(k=y.firstChild)!==null;)g=y,y=k;for(;;){if(y===e)break t;if(g===n&&++u===i&&(a=o),g===s&&++x===r&&(c=o),(k=y.nextSibling)!==null)break;y=g,g=y.parentNode}y=k}n=a===-1||c===-1?null:{start:a,end:c}}else n=null}n=n||{start:0,end:0}}else n=null;for(os={focusedElem:e,selectionRange:n},Cl=!1,O=t;O!==null;)if(t=O,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,O=e;else for(;O!==null;){t=O;try{var C=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(C!==null){var m=C.memoizedProps,N=C.memoizedState,p=t.stateNode,d=p.getSnapshotBeforeUpdate(t.elementType===t.type?m:tt(t.type,m),N);p.__reactInternalSnapshotBeforeUpdate=d}break;case 3:var f=t.stateNode.containerInfo;f.nodeType===1?f.textContent="":f.nodeType===9&&f.documentElement&&f.removeChild(f.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(_(163))}}catch(w){he(t,t.return,w)}if(e=t.sibling,e!==null){e.return=t.return,O=e;break}O=t.return}return C=Ea,Ea=!1,C}function pr(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var i=r=r.next;do{if((i.tag&e)===e){var s=i.destroy;i.destroy=void 0,s!==void 0&&Ss(t,n,s)}i=i.next}while(i!==r)}}function ql(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function Cs(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function Fu(e){var t=e.alternate;t!==null&&(e.alternate=null,Fu(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[ct],delete t[br],delete t[us],delete t[c1],delete t[u1])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function Au(e){return e.tag===5||e.tag===3||e.tag===4}function Na(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Au(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function bs(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Tl));else if(r!==4&&(e=e.child,e!==null))for(bs(e,t,n),e=e.sibling;e!==null;)bs(e,t,n),e=e.sibling}function zs(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(zs(e,t,n),e=e.sibling;e!==null;)zs(e,t,n),e=e.sibling}var Ce=null,nt=!1;function Tt(e,t,n){for(n=n.child;n!==null;)Ou(e,t,n),n=n.sibling}function Ou(e,t,n){if(ut&&typeof ut.onCommitFiberUnmount=="function")try{ut.onCommitFiberUnmount($l,n)}catch{}switch(n.tag){case 5:Ee||zn(n,t);case 6:var r=Ce,i=nt;Ce=null,Tt(e,t,n),Ce=r,nt=i,Ce!==null&&(nt?(e=Ce,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):Ce.removeChild(n.stateNode));break;case 18:Ce!==null&&(nt?(e=Ce,n=n.stateNode,e.nodeType===8?Ti(e.parentNode,n):e.nodeType===1&&Ti(e,n),kr(e)):Ti(Ce,n.stateNode));break;case 4:r=Ce,i=nt,Ce=n.stateNode.containerInfo,nt=!0,Tt(e,t,n),Ce=r,nt=i;break;case 0:case 11:case 14:case 15:if(!Ee&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var s=i,o=s.destroy;s=s.tag,o!==void 0&&(s&2||s&4)&&Ss(n,t,o),i=i.next}while(i!==r)}Tt(e,t,n);break;case 1:if(!Ee&&(zn(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(a){he(n,t,a)}Tt(e,t,n);break;case 21:Tt(e,t,n);break;case 22:n.mode&1?(Ee=(r=Ee)||n.memoizedState!==null,Tt(e,t,n),Ee=r):Tt(e,t,n);break;default:Tt(e,t,n)}}function Ia(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new z1),t.forEach(function(r){var i=R1.bind(null,e,r);n.has(r)||(n.add(r),r.then(i,i))})}}function et(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var i=n[r];try{var s=e,o=t,a=o;e:for(;a!==null;){switch(a.tag){case 5:Ce=a.stateNode,nt=!1;break e;case 3:Ce=a.stateNode.containerInfo,nt=!0;break e;case 4:Ce=a.stateNode.containerInfo,nt=!0;break e}a=a.return}if(Ce===null)throw Error(_(160));Ou(s,o,i),Ce=null,nt=!1;var c=i.alternate;c!==null&&(c.return=null),i.return=null}catch(u){he(i,t,u)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)Wu(t,e),t=t.sibling}function Wu(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(et(t,e),ot(e),r&4){try{pr(3,e,e.return),ql(3,e)}catch(m){he(e,e.return,m)}try{pr(5,e,e.return)}catch(m){he(e,e.return,m)}}break;case 1:et(t,e),ot(e),r&512&&n!==null&&zn(n,n.return);break;case 5:if(et(t,e),ot(e),r&512&&n!==null&&zn(n,n.return),e.flags&32){var i=e.stateNode;try{gr(i,"")}catch(m){he(e,e.return,m)}}if(r&4&&(i=e.stateNode,i!=null)){var s=e.memoizedProps,o=n!==null?n.memoizedProps:s,a=e.type,c=e.updateQueue;if(e.updateQueue=null,c!==null)try{a==="input"&&s.type==="radio"&&s.name!=null&&ac(i,s),Yi(a,o);var u=Yi(a,s);for(o=0;o<c.length;o+=2){var x=c[o],y=c[o+1];x==="style"?fc(i,y):x==="dangerouslySetInnerHTML"?dc(i,y):x==="children"?gr(i,y):As(i,x,y,u)}switch(a){case"input":$i(i,s);break;case"textarea":cc(i,s);break;case"select":var g=i._wrapperState.wasMultiple;i._wrapperState.wasMultiple=!!s.multiple;var k=s.value;k!=null?Pn(i,!!s.multiple,k,!1):g!==!!s.multiple&&(s.defaultValue!=null?Pn(i,!!s.multiple,s.defaultValue,!0):Pn(i,!!s.multiple,s.multiple?[]:"",!1))}i[br]=s}catch(m){he(e,e.return,m)}}break;case 6:if(et(t,e),ot(e),r&4){if(e.stateNode===null)throw Error(_(162));i=e.stateNode,s=e.memoizedProps;try{i.nodeValue=s}catch(m){he(e,e.return,m)}}break;case 3:if(et(t,e),ot(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{kr(t.containerInfo)}catch(m){he(e,e.return,m)}break;case 4:et(t,e),ot(e);break;case 13:et(t,e),ot(e),i=e.child,i.flags&8192&&(s=i.memoizedState!==null,i.stateNode.isHidden=s,!s||i.alternate!==null&&i.alternate.memoizedState!==null||(mo=xe())),r&4&&Ia(e);break;case 22:if(x=n!==null&&n.memoizedState!==null,e.mode&1?(Ee=(u=Ee)||x,et(t,e),Ee=u):et(t,e),ot(e),r&8192){if(u=e.memoizedState!==null,(e.stateNode.isHidden=u)&&!x&&e.mode&1)for(O=e,x=e.child;x!==null;){for(y=O=x;O!==null;){switch(g=O,k=g.child,g.tag){case 0:case 11:case 14:case 15:pr(4,g,g.return);break;case 1:zn(g,g.return);var C=g.stateNode;if(typeof C.componentWillUnmount=="function"){r=g,n=g.return;try{t=r,C.props=t.memoizedProps,C.state=t.memoizedState,C.componentWillUnmount()}catch(m){he(r,n,m)}}break;case 5:zn(g,g.return);break;case 22:if(g.memoizedState!==null){La(y);continue}}k!==null?(k.return=g,O=k):La(y)}x=x.sibling}e:for(x=null,y=e;;){if(y.tag===5){if(x===null){x=y;try{i=y.stateNode,u?(s=i.style,typeof s.setProperty=="function"?s.setProperty("display","none","important"):s.display="none"):(a=y.stateNode,c=y.memoizedProps.style,o=c!=null&&c.hasOwnProperty("display")?c.display:null,a.style.display=pc("display",o))}catch(m){he(e,e.return,m)}}}else if(y.tag===6){if(x===null)try{y.stateNode.nodeValue=u?"":y.memoizedProps}catch(m){he(e,e.return,m)}}else if((y.tag!==22&&y.tag!==23||y.memoizedState===null||y===e)&&y.child!==null){y.child.return=y,y=y.child;continue}if(y===e)break e;for(;y.sibling===null;){if(y.return===null||y.return===e)break e;x===y&&(x=null),y=y.return}x===y&&(x=null),y.sibling.return=y.return,y=y.sibling}}break;case 19:et(t,e),ot(e),r&4&&Ia(e);break;case 21:break;default:et(t,e),ot(e)}}function ot(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(Au(n)){var r=n;break e}n=n.return}throw Error(_(160))}switch(r.tag){case 5:var i=r.stateNode;r.flags&32&&(gr(i,""),r.flags&=-33);var s=Na(e);zs(e,s,i);break;case 3:case 4:var o=r.stateNode.containerInfo,a=Na(e);bs(e,a,o);break;default:throw Error(_(161))}}catch(c){he(e,e.return,c)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function P1(e,t,n){O=e,Bu(e)}function Bu(e,t,n){for(var r=(e.mode&1)!==0;O!==null;){var i=O,s=i.child;if(i.tag===22&&r){var o=i.memoizedState!==null||ll;if(!o){var a=i.alternate,c=a!==null&&a.memoizedState!==null||Ee;a=ll;var u=Ee;if(ll=o,(Ee=c)&&!u)for(O=i;O!==null;)o=O,c=o.child,o.tag===22&&o.memoizedState!==null?Ma(i):c!==null?(c.return=o,O=c):Ma(i);for(;s!==null;)O=s,Bu(s),s=s.sibling;O=i,ll=a,Ee=u}_a(e)}else i.subtreeFlags&8772&&s!==null?(s.return=i,O=s):_a(e)}}function _a(e){for(;O!==null;){var t=O;if(t.flags&8772){var n=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:Ee||ql(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!Ee)if(n===null)r.componentDidMount();else{var i=t.elementType===t.type?n.memoizedProps:tt(t.type,n.memoizedProps);r.componentDidUpdate(i,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var s=t.updateQueue;s!==null&&ga(t,s,r);break;case 3:var o=t.updateQueue;if(o!==null){if(n=null,t.child!==null)switch(t.child.tag){case 5:n=t.child.stateNode;break;case 1:n=t.child.stateNode}ga(t,o,n)}break;case 5:var a=t.stateNode;if(n===null&&t.flags&4){n=a;var c=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":c.autoFocus&&n.focus();break;case"img":c.src&&(n.src=c.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var u=t.alternate;if(u!==null){var x=u.memoizedState;if(x!==null){var y=x.dehydrated;y!==null&&kr(y)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(_(163))}Ee||t.flags&512&&Cs(t)}catch(g){he(t,t.return,g)}}if(t===e){O=null;break}if(n=t.sibling,n!==null){n.return=t.return,O=n;break}O=t.return}}function La(e){for(;O!==null;){var t=O;if(t===e){O=null;break}var n=t.sibling;if(n!==null){n.return=t.return,O=n;break}O=t.return}}function Ma(e){for(;O!==null;){var t=O;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{ql(4,t)}catch(c){he(t,n,c)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var i=t.return;try{r.componentDidMount()}catch(c){he(t,i,c)}}var s=t.return;try{Cs(t)}catch(c){he(t,s,c)}break;case 5:var o=t.return;try{Cs(t)}catch(c){he(t,o,c)}}}catch(c){he(t,t.return,c)}if(t===e){O=null;break}var a=t.sibling;if(a!==null){a.return=t.return,O=a;break}O=t.return}}var E1=Math.ceil,Al=wt.ReactCurrentDispatcher,go=wt.ReactCurrentOwner,Ze=wt.ReactCurrentBatchConfig,ne=0,we=null,ye=null,be=0,Ue=0,Tn=Qt(0),ke=0,Ir=null,an=0,ei=0,yo=0,fr=null,De=null,mo=0,Un=1/0,ft=null,Ol=!1,Ts=null,Wt=null,il=!1,Mt=null,Wl=0,hr=0,Ps=null,gl=-1,yl=0;function _e(){return ne&6?xe():gl!==-1?gl:gl=xe()}function Bt(e){return e.mode&1?ne&2&&be!==0?be&-be:p1.transition!==null?(yl===0&&(yl=bc()),yl):(e=ie,e!==0||(e=window.event,e=e===void 0?16:_c(e.type)),e):1}function it(e,t,n,r){if(50<hr)throw hr=0,Ps=null,Error(_(185));Lr(e,n,r),(!(ne&2)||e!==we)&&(e===we&&(!(ne&2)&&(ei|=n),ke===4&&It(e,be)),Oe(e,r),n===1&&ne===0&&!(t.mode&1)&&(Un=xe()+500,Yl&&Gt()))}function Oe(e,t){var n=e.callbackNode;pp(e,t);var r=Sl(e,e===we?be:0);if(r===0)n!==null&&Vo(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&Vo(n),t===1)e.tag===0?d1(Da.bind(null,e)):Zc(Da.bind(null,e)),o1(function(){!(ne&6)&&Gt()}),n=null;else{switch(zc(r)){case 1:n=Vs;break;case 4:n=Sc;break;case 16:n=wl;break;case 536870912:n=Cc;break;default:n=wl}n=Xu(n,Uu.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function Uu(e,t){if(gl=-1,yl=0,ne&6)throw Error(_(327));var n=e.callbackNode;if(Ln()&&e.callbackNode!==n)return null;var r=Sl(e,e===we?be:0);if(r===0)return null;if(r&30||r&e.expiredLanes||t)t=Bl(e,r);else{t=r;var i=ne;ne|=2;var s=Hu();(we!==e||be!==t)&&(ft=null,Un=xe()+500,nn(e,t));do try{_1();break}catch(a){Vu(e,a)}while(!0);no(),Al.current=s,ne=i,ye!==null?t=0:(we=null,be=0,t=ke)}if(t!==0){if(t===2&&(i=ts(e),i!==0&&(r=i,t=Es(e,i))),t===1)throw n=Ir,nn(e,0),It(e,r),Oe(e,xe()),n;if(t===6)It(e,r);else{if(i=e.current.alternate,!(r&30)&&!N1(i)&&(t=Bl(e,r),t===2&&(s=ts(e),s!==0&&(r=s,t=Es(e,s))),t===1))throw n=Ir,nn(e,0),It(e,r),Oe(e,xe()),n;switch(e.finishedWork=i,e.finishedLanes=r,t){case 0:case 1:throw Error(_(345));case 2:Jt(e,De,ft);break;case 3:if(It(e,r),(r&130023424)===r&&(t=mo+500-xe(),10<t)){if(Sl(e,0)!==0)break;if(i=e.suspendedLanes,(i&r)!==r){_e(),e.pingedLanes|=e.suspendedLanes&i;break}e.timeoutHandle=cs(Jt.bind(null,e,De,ft),t);break}Jt(e,De,ft);break;case 4:if(It(e,r),(r&4194240)===r)break;for(t=e.eventTimes,i=-1;0<r;){var o=31-lt(r);s=1<<o,o=t[o],o>i&&(i=o),r&=~s}if(r=i,r=xe()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*E1(r/1960))-r,10<r){e.timeoutHandle=cs(Jt.bind(null,e,De,ft),r);break}Jt(e,De,ft);break;case 5:Jt(e,De,ft);break;default:throw Error(_(329))}}}return Oe(e,xe()),e.callbackNode===n?Uu.bind(null,e):null}function Es(e,t){var n=fr;return e.current.memoizedState.isDehydrated&&(nn(e,t).flags|=256),e=Bl(e,t),e!==2&&(t=De,De=n,t!==null&&Ns(t)),e}function Ns(e){De===null?De=e:De.push.apply(De,e)}function N1(e){for(var t=e;;){if(t.flags&16384){var n=t.updateQueue;if(n!==null&&(n=n.stores,n!==null))for(var r=0;r<n.length;r++){var i=n[r],s=i.getSnapshot;i=i.value;try{if(!st(s(),i))return!1}catch{return!1}}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function It(e,t){for(t&=~yo,t&=~ei,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-lt(t),r=1<<n;e[n]=-1,t&=~r}}function Da(e){if(ne&6)throw Error(_(327));Ln();var t=Sl(e,0);if(!(t&1))return Oe(e,xe()),null;var n=Bl(e,t);if(e.tag!==0&&n===2){var r=ts(e);r!==0&&(t=r,n=Es(e,r))}if(n===1)throw n=Ir,nn(e,0),It(e,t),Oe(e,xe()),n;if(n===6)throw Error(_(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,Jt(e,De,ft),Oe(e,xe()),null}function vo(e,t){var n=ne;ne|=1;try{return e(t)}finally{ne=n,ne===0&&(Un=xe()+500,Yl&&Gt())}}function cn(e){Mt!==null&&Mt.tag===0&&!(ne&6)&&Ln();var t=ne;ne|=1;var n=Ze.transition,r=ie;try{if(Ze.transition=null,ie=1,e)return e()}finally{ie=r,Ze.transition=n,ne=t,!(ne&6)&&Gt()}}function ko(){Ue=Tn.current,ce(Tn)}function nn(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,s1(n)),ye!==null)for(n=ye.return;n!==null;){var r=n;switch(qs(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&Pl();break;case 3:Wn(),ce(Fe),ce(Ne),ao();break;case 5:oo(r);break;case 4:Wn();break;case 13:ce(de);break;case 19:ce(de);break;case 10:ro(r.type._context);break;case 22:case 23:ko()}n=n.return}if(we=e,ye=e=Ut(e.current,null),be=Ue=t,ke=0,Ir=null,yo=ei=an=0,De=fr=null,en!==null){for(t=0;t<en.length;t++)if(n=en[t],r=n.interleaved,r!==null){n.interleaved=null;var i=r.next,s=n.pending;if(s!==null){var o=s.next;s.next=i,r.next=o}n.pending=r}en=null}return e}function Vu(e,t){do{var n=ye;try{if(no(),fl.current=Fl,Rl){for(var r=pe.memoizedState;r!==null;){var i=r.queue;i!==null&&(i.pending=null),r=r.next}Rl=!1}if(on=0,je=ve=pe=null,dr=!1,Pr=0,go.current=null,n===null||n.return===null){ke=1,Ir=t,ye=null;break}e:{var s=e,o=n.return,a=n,c=t;if(t=be,a.flags|=32768,c!==null&&typeof c=="object"&&typeof c.then=="function"){var u=c,x=a,y=x.tag;if(!(x.mode&1)&&(y===0||y===11||y===15)){var g=x.alternate;g?(x.updateQueue=g.updateQueue,x.memoizedState=g.memoizedState,x.lanes=g.lanes):(x.updateQueue=null,x.memoizedState=null)}var k=wa(o);if(k!==null){k.flags&=-257,Sa(k,o,a,s,t),k.mode&1&&ja(s,u,t),t=k,c=u;var C=t.updateQueue;if(C===null){var m=new Set;m.add(c),t.updateQueue=m}else C.add(c);break e}else{if(!(t&1)){ja(s,u,t),jo();break e}c=Error(_(426))}}else if(ue&&a.mode&1){var N=wa(o);if(N!==null){!(N.flags&65536)&&(N.flags|=256),Sa(N,o,a,s,t),eo(Bn(c,a));break e}}s=c=Bn(c,a),ke!==4&&(ke=2),fr===null?fr=[s]:fr.push(s),s=o;do{switch(s.tag){case 3:s.flags|=65536,t&=-t,s.lanes|=t;var p=zu(s,c,t);xa(s,p);break e;case 1:a=c;var d=s.type,f=s.stateNode;if(!(s.flags&128)&&(typeof d.getDerivedStateFromError=="function"||f!==null&&typeof f.componentDidCatch=="function"&&(Wt===null||!Wt.has(f)))){s.flags|=65536,t&=-t,s.lanes|=t;var w=Tu(s,a,t);xa(s,w);break e}}s=s.return}while(s!==null)}Ku(n)}catch(v){t=v,ye===n&&n!==null&&(ye=n=n.return);continue}break}while(!0)}function Hu(){var e=Al.current;return Al.current=Fl,e===null?Fl:e}function jo(){(ke===0||ke===3||ke===2)&&(ke=4),we===null||!(an&268435455)&&!(ei&268435455)||It(we,be)}function Bl(e,t){var n=ne;ne|=2;var r=Hu();(we!==e||be!==t)&&(ft=null,nn(e,t));do try{I1();break}catch(i){Vu(e,i)}while(!0);if(no(),ne=n,Al.current=r,ye!==null)throw Error(_(261));return we=null,be=0,ke}function I1(){for(;ye!==null;)$u(ye)}function _1(){for(;ye!==null&&!rp();)$u(ye)}function $u(e){var t=Gu(e.alternate,e,Ue);e.memoizedProps=e.pendingProps,t===null?Ku(e):ye=t,go.current=null}function Ku(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&32768){if(n=b1(n,t),n!==null){n.flags&=32767,ye=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{ke=6,ye=null;return}}else if(n=C1(n,t,Ue),n!==null){ye=n;return}if(t=t.sibling,t!==null){ye=t;return}ye=t=e}while(t!==null);ke===0&&(ke=5)}function Jt(e,t,n){var r=ie,i=Ze.transition;try{Ze.transition=null,ie=1,L1(e,t,n,r)}finally{Ze.transition=i,ie=r}return null}function L1(e,t,n,r){do Ln();while(Mt!==null);if(ne&6)throw Error(_(327));n=e.finishedWork;var i=e.finishedLanes;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(_(177));e.callbackNode=null,e.callbackPriority=0;var s=n.lanes|n.childLanes;if(fp(e,s),e===we&&(ye=we=null,be=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||il||(il=!0,Xu(wl,function(){return Ln(),null})),s=(n.flags&15990)!==0,n.subtreeFlags&15990||s){s=Ze.transition,Ze.transition=null;var o=ie;ie=1;var a=ne;ne|=4,go.current=null,T1(e,n),Wu(n,e),qp(os),Cl=!!ss,os=ss=null,e.current=n,P1(n),lp(),ne=a,ie=o,Ze.transition=s}else e.current=n;if(il&&(il=!1,Mt=e,Wl=i),s=e.pendingLanes,s===0&&(Wt=null),op(n.stateNode),Oe(e,xe()),t!==null)for(r=e.onRecoverableError,n=0;n<t.length;n++)i=t[n],r(i.value,{componentStack:i.stack,digest:i.digest});if(Ol)throw Ol=!1,e=Ts,Ts=null,e;return Wl&1&&e.tag!==0&&Ln(),s=e.pendingLanes,s&1?e===Ps?hr++:(hr=0,Ps=e):hr=0,Gt(),null}function Ln(){if(Mt!==null){var e=zc(Wl),t=Ze.transition,n=ie;try{if(Ze.transition=null,ie=16>e?16:e,Mt===null)var r=!1;else{if(e=Mt,Mt=null,Wl=0,ne&6)throw Error(_(331));var i=ne;for(ne|=4,O=e.current;O!==null;){var s=O,o=s.child;if(O.flags&16){var a=s.deletions;if(a!==null){for(var c=0;c<a.length;c++){var u=a[c];for(O=u;O!==null;){var x=O;switch(x.tag){case 0:case 11:case 15:pr(8,x,s)}var y=x.child;if(y!==null)y.return=x,O=y;else for(;O!==null;){x=O;var g=x.sibling,k=x.return;if(Fu(x),x===u){O=null;break}if(g!==null){g.return=k,O=g;break}O=k}}}var C=s.alternate;if(C!==null){var m=C.child;if(m!==null){C.child=null;do{var N=m.sibling;m.sibling=null,m=N}while(m!==null)}}O=s}}if(s.subtreeFlags&2064&&o!==null)o.return=s,O=o;else e:for(;O!==null;){if(s=O,s.flags&2048)switch(s.tag){case 0:case 11:case 15:pr(9,s,s.return)}var p=s.sibling;if(p!==null){p.return=s.return,O=p;break e}O=s.return}}var d=e.current;for(O=d;O!==null;){o=O;var f=o.child;if(o.subtreeFlags&2064&&f!==null)f.return=o,O=f;else e:for(o=d;O!==null;){if(a=O,a.flags&2048)try{switch(a.tag){case 0:case 11:case 15:ql(9,a)}}catch(v){he(a,a.return,v)}if(a===o){O=null;break e}var w=a.sibling;if(w!==null){w.return=a.return,O=w;break e}O=a.return}}if(ne=i,Gt(),ut&&typeof ut.onPostCommitFiberRoot=="function")try{ut.onPostCommitFiberRoot($l,e)}catch{}r=!0}return r}finally{ie=n,Ze.transition=t}}return!1}function Ra(e,t,n){t=Bn(n,t),t=zu(e,t,1),e=Ot(e,t,1),t=_e(),e!==null&&(Lr(e,1,t),Oe(e,t))}function he(e,t,n){if(e.tag===3)Ra(e,e,n);else for(;t!==null;){if(t.tag===3){Ra(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(Wt===null||!Wt.has(r))){e=Bn(n,e),e=Tu(t,e,1),t=Ot(t,e,1),e=_e(),t!==null&&(Lr(t,1,e),Oe(t,e));break}}t=t.return}}function M1(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=_e(),e.pingedLanes|=e.suspendedLanes&n,we===e&&(be&n)===n&&(ke===4||ke===3&&(be&130023424)===be&&500>xe()-mo?nn(e,0):yo|=n),Oe(e,t)}function Qu(e,t){t===0&&(e.mode&1?(t=Xr,Xr<<=1,!(Xr&130023424)&&(Xr=4194304)):t=1);var n=_e();e=kt(e,t),e!==null&&(Lr(e,t,n),Oe(e,n))}function D1(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Qu(e,n)}function R1(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(_(314))}r!==null&&r.delete(t),Qu(e,n)}var Gu;Gu=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Fe.current)Re=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return Re=!1,S1(e,t,n);Re=!!(e.flags&131072)}else Re=!1,ue&&t.flags&1048576&&Jc(t,Il,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;xl(e,t),e=t.pendingProps;var i=Fn(t,Ne.current);_n(t,n),i=uo(null,t,r,e,i,n);var s=po();return t.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Ae(r)?(s=!0,El(t)):s=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,io(t),i.updater=Jl,t.stateNode=i,i._reactInternals=t,gs(t,r,e,n),t=vs(null,t,r,!0,s,n)):(t.tag=0,ue&&s&&Js(t),Ie(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(xl(e,t),e=t.pendingProps,i=r._init,r=i(r._payload),t.type=r,i=t.tag=A1(r),e=tt(r,e),i){case 0:t=ms(null,t,r,e,n);break e;case 1:t=za(null,t,r,e,n);break e;case 11:t=Ca(null,t,r,e,n);break e;case 14:t=ba(null,t,r,tt(r.type,e),n);break e}throw Error(_(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:tt(r,i),ms(e,t,r,i,n);case 1:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:tt(r,i),za(e,t,r,i,n);case 3:e:{if(Iu(t),e===null)throw Error(_(387));r=t.pendingProps,s=t.memoizedState,i=s.element,lu(e,t),Ml(t,r,null,n);var o=t.memoizedState;if(r=o.element,s.isDehydrated)if(s={element:r,isDehydrated:!1,cache:o.cache,pendingSuspenseBoundaries:o.pendingSuspenseBoundaries,transitions:o.transitions},t.updateQueue.baseState=s,t.memoizedState=s,t.flags&256){i=Bn(Error(_(423)),t),t=Ta(e,t,r,n,i);break e}else if(r!==i){i=Bn(Error(_(424)),t),t=Ta(e,t,r,n,i);break e}else for(Ve=At(t.stateNode.containerInfo.firstChild),He=t,ue=!0,rt=null,n=nu(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(An(),r===i){t=jt(e,t,n);break e}Ie(e,t,r,n)}t=t.child}return t;case 5:return iu(t),e===null&&fs(t),r=t.type,i=t.pendingProps,s=e!==null?e.memoizedProps:null,o=i.children,as(r,i)?o=null:s!==null&&as(r,s)&&(t.flags|=32),Nu(e,t),Ie(e,t,o,n),t.child;case 6:return e===null&&fs(t),null;case 13:return _u(e,t,n);case 4:return so(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=On(t,null,r,n):Ie(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:tt(r,i),Ca(e,t,r,i,n);case 7:return Ie(e,t,t.pendingProps,n),t.child;case 8:return Ie(e,t,t.pendingProps.children,n),t.child;case 12:return Ie(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,s=t.memoizedProps,o=i.value,oe(_l,r._currentValue),r._currentValue=o,s!==null)if(st(s.value,o)){if(s.children===i.children&&!Fe.current){t=jt(e,t,n);break e}}else for(s=t.child,s!==null&&(s.return=t);s!==null;){var a=s.dependencies;if(a!==null){o=s.child;for(var c=a.firstContext;c!==null;){if(c.context===r){if(s.tag===1){c=yt(-1,n&-n),c.tag=2;var u=s.updateQueue;if(u!==null){u=u.shared;var x=u.pending;x===null?c.next=c:(c.next=x.next,x.next=c),u.pending=c}}s.lanes|=n,c=s.alternate,c!==null&&(c.lanes|=n),hs(s.return,n,t),a.lanes|=n;break}c=c.next}}else if(s.tag===10)o=s.type===t.type?null:s.child;else if(s.tag===18){if(o=s.return,o===null)throw Error(_(341));o.lanes|=n,a=o.alternate,a!==null&&(a.lanes|=n),hs(o,n,t),o=s.sibling}else o=s.child;if(o!==null)o.return=s;else for(o=s;o!==null;){if(o===t){o=null;break}if(s=o.sibling,s!==null){s.return=o.return,o=s;break}o=o.return}s=o}Ie(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,_n(t,n),i=Je(i),r=r(i),t.flags|=1,Ie(e,t,r,n),t.child;case 14:return r=t.type,i=tt(r,t.pendingProps),i=tt(r.type,i),ba(e,t,r,i,n);case 15:return Pu(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:tt(r,i),xl(e,t),t.tag=1,Ae(r)?(e=!0,El(t)):e=!1,_n(t,n),bu(t,r,i),gs(t,r,i,n),vs(null,t,r,!0,e,n);case 19:return Lu(e,t,n);case 22:return Eu(e,t,n)}throw Error(_(156,t.tag))};function Xu(e,t){return wc(e,t)}function F1(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Ye(e,t,n,r){return new F1(e,t,n,r)}function wo(e){return e=e.prototype,!(!e||!e.isReactComponent)}function A1(e){if(typeof e=="function")return wo(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Ws)return 11;if(e===Bs)return 14}return 2}function Ut(e,t){var n=e.alternate;return n===null?(n=Ye(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function ml(e,t,n,r,i,s){var o=2;if(r=e,typeof e=="function")wo(e)&&(o=1);else if(typeof e=="string")o=5;else e:switch(e){case yn:return rn(n.children,i,s,t);case Os:o=8,i|=8;break;case Wi:return e=Ye(12,n,t,i|2),e.elementType=Wi,e.lanes=s,e;case Bi:return e=Ye(13,n,t,i),e.elementType=Bi,e.lanes=s,e;case Ui:return e=Ye(19,n,t,i),e.elementType=Ui,e.lanes=s,e;case ic:return ti(n,i,s,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case rc:o=10;break e;case lc:o=9;break e;case Ws:o=11;break e;case Bs:o=14;break e;case Pt:o=16,r=null;break e}throw Error(_(130,e==null?e:typeof e,""))}return t=Ye(o,n,t,i),t.elementType=e,t.type=r,t.lanes=s,t}function rn(e,t,n,r){return e=Ye(7,e,r,t),e.lanes=n,e}function ti(e,t,n,r){return e=Ye(22,e,r,t),e.elementType=ic,e.lanes=n,e.stateNode={isHidden:!1},e}function Di(e,t,n){return e=Ye(6,e,null,t),e.lanes=n,e}function Ri(e,t,n){return t=Ye(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function O1(e,t,n,r,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=gi(0),this.expirationTimes=gi(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=gi(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function So(e,t,n,r,i,s,o,a,c){return e=new O1(e,t,n,a,c),t===1?(t=1,s===!0&&(t|=8)):t=0,s=Ye(3,null,null,t),e.current=s,s.stateNode=e,s.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},io(s),e}function W1(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:gn,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function Yu(e){if(!e)return $t;e=e._reactInternals;e:{if(pn(e)!==e||e.tag!==1)throw Error(_(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(Ae(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(_(171))}if(e.tag===1){var n=e.type;if(Ae(n))return Yc(e,n,t)}return t}function Zu(e,t,n,r,i,s,o,a,c){return e=So(n,r,!0,e,i,s,o,a,c),e.context=Yu(null),n=e.current,r=_e(),i=Bt(n),s=yt(r,i),s.callback=t??null,Ot(n,s,i),e.current.lanes=i,Lr(e,i,r),Oe(e,r),e}function ni(e,t,n,r){var i=t.current,s=_e(),o=Bt(i);return n=Yu(n),t.context===null?t.context=n:t.pendingContext=n,t=yt(s,o),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=Ot(i,t,o),e!==null&&(it(e,i,o,s),pl(e,i,o)),o}function Ul(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function Fa(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function Co(e,t){Fa(e,t),(e=e.alternate)&&Fa(e,t)}function B1(){return null}var Ju=typeof reportError=="function"?reportError:function(e){console.error(e)};function bo(e){this._internalRoot=e}ri.prototype.render=bo.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(_(409));ni(e,t,null,null)};ri.prototype.unmount=bo.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;cn(function(){ni(null,e,null,null)}),t[vt]=null}};function ri(e){this._internalRoot=e}ri.prototype.unstable_scheduleHydration=function(e){if(e){var t=Ec();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Nt.length&&t!==0&&t<Nt[n].priority;n++);Nt.splice(n,0,e),n===0&&Ic(e)}};function zo(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function li(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function Aa(){}function U1(e,t,n,r,i){if(i){if(typeof r=="function"){var s=r;r=function(){var u=Ul(o);s.call(u)}}var o=Zu(t,r,e,0,null,!1,!1,"",Aa);return e._reactRootContainer=o,e[vt]=o.current,Sr(e.nodeType===8?e.parentNode:e),cn(),o}for(;i=e.lastChild;)e.removeChild(i);if(typeof r=="function"){var a=r;r=function(){var u=Ul(c);a.call(u)}}var c=So(e,0,!1,null,null,!1,!1,"",Aa);return e._reactRootContainer=c,e[vt]=c.current,Sr(e.nodeType===8?e.parentNode:e),cn(function(){ni(t,c,n,r)}),c}function ii(e,t,n,r,i){var s=n._reactRootContainer;if(s){var o=s;if(typeof i=="function"){var a=i;i=function(){var c=Ul(o);a.call(c)}}ni(t,o,e,i)}else o=U1(n,t,e,i,r);return Ul(o)}Tc=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=lr(t.pendingLanes);n!==0&&(Hs(t,n|1),Oe(t,xe()),!(ne&6)&&(Un=xe()+500,Gt()))}break;case 13:cn(function(){var r=kt(e,1);if(r!==null){var i=_e();it(r,e,1,i)}}),Co(e,1)}};$s=function(e){if(e.tag===13){var t=kt(e,134217728);if(t!==null){var n=_e();it(t,e,134217728,n)}Co(e,134217728)}};Pc=function(e){if(e.tag===13){var t=Bt(e),n=kt(e,t);if(n!==null){var r=_e();it(n,e,t,r)}Co(e,t)}};Ec=function(){return ie};Nc=function(e,t){var n=ie;try{return ie=e,t()}finally{ie=n}};Ji=function(e,t,n){switch(t){case"input":if($i(e,n),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var i=Xl(r);if(!i)throw Error(_(90));oc(r),$i(r,i)}}}break;case"textarea":cc(e,n);break;case"select":t=n.value,t!=null&&Pn(e,!!n.multiple,t,!1)}};gc=vo;yc=cn;var V1={usingClientEntryPoint:!1,Events:[Dr,jn,Xl,hc,xc,vo]},tr={findFiberByHostInstance:qt,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},H1={bundleType:tr.bundleType,version:tr.version,rendererPackageName:tr.rendererPackageName,rendererConfig:tr.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:wt.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=kc(e),e===null?null:e.stateNode},findFiberByHostInstance:tr.findFiberByHostInstance||B1,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var sl=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!sl.isDisabled&&sl.supportsFiber)try{$l=sl.inject(H1),ut=sl}catch{}}Ke.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=V1;Ke.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!zo(t))throw Error(_(200));return W1(e,t,null,n)};Ke.createRoot=function(e,t){if(!zo(e))throw Error(_(299));var n=!1,r="",i=Ju;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(i=t.onRecoverableError)),t=So(e,1,!1,null,null,n,!1,r,i),e[vt]=t.current,Sr(e.nodeType===8?e.parentNode:e),new bo(t)};Ke.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(_(188)):(e=Object.keys(e).join(","),Error(_(268,e)));return e=kc(t),e=e===null?null:e.stateNode,e};Ke.flushSync=function(e){return cn(e)};Ke.hydrate=function(e,t,n){if(!li(t))throw Error(_(200));return ii(null,e,t,!0,n)};Ke.hydrateRoot=function(e,t,n){if(!zo(e))throw Error(_(405));var r=n!=null&&n.hydratedSources||null,i=!1,s="",o=Ju;if(n!=null&&(n.unstable_strictMode===!0&&(i=!0),n.identifierPrefix!==void 0&&(s=n.identifierPrefix),n.onRecoverableError!==void 0&&(o=n.onRecoverableError)),t=Zu(t,null,e,1,n??null,i,!1,s,o),e[vt]=t.current,Sr(e),r)for(e=0;e<r.length;e++)n=r[e],i=n._getVersion,i=i(n._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[n,i]:t.mutableSourceEagerHydrationData.push(n,i);return new ri(t)};Ke.render=function(e,t,n){if(!li(t))throw Error(_(200));return ii(null,e,t,!1,n)};Ke.unmountComponentAtNode=function(e){if(!li(e))throw Error(_(40));return e._reactRootContainer?(cn(function(){ii(null,null,e,!1,function(){e._reactRootContainer=null,e[vt]=null})}),!0):!1};Ke.unstable_batchedUpdates=vo;Ke.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!li(n))throw Error(_(200));if(e==null||e._reactInternals===void 0)throw Error(_(38));return ii(e,t,n,!1,r)};Ke.version="18.3.1-next-f1338f8080-20240426";function qu(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(qu)}catch(e){console.error(e)}}qu(),qa.exports=Ke;var $1=qa.exports,Oa=$1;Ai.createRoot=Oa.createRoot,Ai.hydrateRoot=Oa.hydrateRoot;const ed=j.createContext(void 0),K1=({children:e})=>{const[t,n]=j.useState(!1),[r,i]=j.useState(!1),[s,o]=j.useState(!0),[a,c]=j.useState(()=>sessionStorage.getItem("sessionToken")),[u,x]=j.useState(()=>{const f=localStorage.getItem("theme");return f==="light"||f==="dark"?f:"dark"}),y=async()=>{try{const w=await(await fetch("/api/auth/status")).json();n(w.initialized),i(w.unlocked),w.unlocked||(c(null),sessionStorage.removeItem("sessionToken"))}catch(f){console.error("Failed to check auth status:",f)}finally{o(!1)}};j.useEffect(()=>{y()},[]),j.useEffect(()=>{document.documentElement.setAttribute("data-theme",u),localStorage.setItem("theme",u)},[u]);const g=()=>{x(f=>f==="dark"?"light":"dark")},k=async(f,w)=>{o(!0);try{const v=await fetch("/api/auth/initialize",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({password:f,hint:w})}),S=await v.json();return v.ok&&S.success?(c(S.token),sessionStorage.setItem("sessionToken",S.token),n(!0),i(!0),!0):!1}catch(v){return console.error("Failed to initialize vault:",v),!1}finally{o(!1)}},C=async f=>{o(!0);try{const w=await fetch("/api/auth/unlock",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({password:f})}),v=await w.json();return w.ok&&v.success?(c(v.token),sessionStorage.setItem("sessionToken",v.token),i(!0),!0):!1}catch(w){return console.error("Failed to unlock vault:",w),!1}finally{o(!1)}},m=async()=>{try{await fetch("/api/auth/lock",{method:"POST"})}catch(f){console.error("Failed to lock vault:",f)}finally{c(null),sessionStorage.removeItem("sessionToken"),i(!1)}},N=async()=>{try{return(await(await fetch("/api/auth/hint")).json()).hint||null}catch(f){return console.error("Failed to get hint:",f),null}},p=async(f,w={})=>{const v={...w.headers,Authorization:`Bearer ${a}`,"Content-Type":"application/json"},S=await fetch(f,{...w,headers:v});return S.status===401&&(c(null),sessionStorage.removeItem("sessionToken"),i(!1)),S},d=f=>{c(f),sessionStorage.setItem("sessionToken",f)};return l.jsx(ed.Provider,{value:{isInitialized:t,isAuthenticated:r,isLoading:s,sessionToken:a,theme:u,toggleTheme:g,checkStatus:y,initializeVault:k,unlockVault:C,lockVault:m,getHint:N,fetchWithAuth:p,updateSessionToken:d},children:e})},St=()=>{const e=j.useContext(ed);if(!e)throw new Error("useAuth must be used within an AuthProvider");return e};/**
41
41
  * @license lucide-react v0.378.0 - ISC
42
42
  *
43
43
  * This source code is licensed under the ISC license.
@@ -52,222 +52,240 @@ Error generating stack: `+s.message+`
52
52
  *
53
53
  * This source code is licensed under the ISC license.
54
54
  * See the LICENSE file in the root directory of this source tree.
55
- */const X1=C.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:i="",children:s,iconNode:o,...a},c)=>C.createElement("svg",{ref:c,...G1,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:td("lucide",i),...a},[...o.map(([d,x])=>C.createElement(d,x)),...Array.isArray(s)?s:[s]]));/**
55
+ */const X1=j.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:i="",children:s,iconNode:o,...a},c)=>j.createElement("svg",{ref:c,...G1,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:td("lucide",i),...a},[...o.map(([u,x])=>j.createElement(u,x)),...Array.isArray(s)?s:[s]]));/**
56
56
  * @license lucide-react v0.378.0 - ISC
57
57
  *
58
58
  * This source code is licensed under the ISC license.
59
59
  * See the LICENSE file in the root directory of this source tree.
60
- */const J=(e,t)=>{const n=C.forwardRef(({className:r,...i},s)=>C.createElement(X1,{ref:s,iconNode:t,className:td(`lucide-${Q1(e)}`,r),...i}));return n.displayName=`${e}`,n};/**
60
+ */const X=(e,t)=>{const n=j.forwardRef(({className:r,...i},s)=>j.createElement(X1,{ref:s,iconNode:t,className:td(`lucide-${Q1(e)}`,r),...i}));return n.displayName=`${e}`,n};/**
61
61
  * @license lucide-react v0.378.0 - ISC
62
62
  *
63
63
  * This source code is licensed under the ISC license.
64
64
  * See the LICENSE file in the root directory of this source tree.
65
- */const Y1=J("Activity",[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]]);/**
65
+ */const Y1=X("Activity",[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]]);/**
66
66
  * @license lucide-react v0.378.0 - ISC
67
67
  *
68
68
  * This source code is licensed under the ISC license.
69
69
  * See the LICENSE file in the root directory of this source tree.
70
- */const tr=J("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/**
70
+ */const xn=X("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/**
71
71
  * @license lucide-react v0.378.0 - ISC
72
72
  *
73
73
  * This source code is licensed under the ISC license.
74
74
  * See the LICENSE file in the root directory of this source tree.
75
- */const Fr=J("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
75
+ */const Fr=X("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
76
76
  * @license lucide-react v0.378.0 - ISC
77
77
  *
78
78
  * This source code is licensed under the ISC license.
79
79
  * See the LICENSE file in the root directory of this source tree.
80
- */const J1=J("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);/**
80
+ */const Z1=X("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);/**
81
81
  * @license lucide-react v0.378.0 - ISC
82
82
  *
83
83
  * This source code is licensed under the ISC license.
84
84
  * See the LICENSE file in the root directory of this source tree.
85
- */const nd=J("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/**
85
+ */const nd=X("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/**
86
86
  * @license lucide-react v0.378.0 - ISC
87
87
  *
88
88
  * This source code is licensed under the ISC license.
89
89
  * See the LICENSE file in the root directory of this source tree.
90
- */const Z1=J("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);/**
90
+ */const J1=X("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);/**
91
91
  * @license lucide-react v0.378.0 - ISC
92
92
  *
93
93
  * This source code is licensed under the ISC license.
94
94
  * See the LICENSE file in the root directory of this source tree.
95
- */const q1=J("CircleAlert",[["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"}]]);/**
95
+ */const q1=X("CircleAlert",[["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"}]]);/**
96
96
  * @license lucide-react v0.378.0 - ISC
97
97
  *
98
98
  * This source code is licensed under the ISC license.
99
99
  * See the LICENSE file in the root directory of this source tree.
100
- */const rd=J("CircleCheckBig",[["path",{d:"M22 11.08V12a10 10 0 1 1-5.93-9.14",key:"g774vq"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]]);/**
100
+ */const rd=X("CircleCheckBig",[["path",{d:"M22 11.08V12a10 10 0 1 1-5.93-9.14",key:"g774vq"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]]);/**
101
101
  * @license lucide-react v0.378.0 - ISC
102
102
  *
103
103
  * This source code is licensed under the ISC license.
104
104
  * See the LICENSE file in the root directory of this source tree.
105
- */const ld=J("CircleX",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]);/**
105
+ */const ef=X("CircleHelp",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);/**
106
106
  * @license lucide-react v0.378.0 - ISC
107
107
  *
108
108
  * This source code is licensed under the ISC license.
109
109
  * See the LICENSE file in the root directory of this source tree.
110
- */const ef=J("Clipboard",[["rect",{width:"8",height:"4",x:"8",y:"2",rx:"1",ry:"1",key:"tgr4d6"}],["path",{d:"M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2",key:"116196"}]]);/**
110
+ */const ld=X("CircleX",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]);/**
111
111
  * @license lucide-react v0.378.0 - ISC
112
112
  *
113
113
  * This source code is licensed under the ISC license.
114
114
  * See the LICENSE file in the root directory of this source tree.
115
- */const tf=J("Columns2",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M12 3v18",key:"108xh3"}]]);/**
115
+ */const tf=X("Clipboard",[["rect",{width:"8",height:"4",x:"8",y:"2",rx:"1",ry:"1",key:"tgr4d6"}],["path",{d:"M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2",key:"116196"}]]);/**
116
116
  * @license lucide-react v0.378.0 - ISC
117
117
  *
118
118
  * This source code is licensed under the ISC license.
119
119
  * See the LICENSE file in the root directory of this source tree.
120
- */const Zt=J("Copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);/**
120
+ */const nf=X("Columns2",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M12 3v18",key:"108xh3"}]]);/**
121
121
  * @license lucide-react v0.378.0 - ISC
122
122
  *
123
123
  * This source code is licensed under the ISC license.
124
124
  * See the LICENSE file in the root directory of this source tree.
125
- */const nf=J("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"}]]);/**
125
+ */const _t=X("Copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);/**
126
126
  * @license lucide-react v0.378.0 - ISC
127
127
  *
128
128
  * This source code is licensed under the ISC license.
129
129
  * See the LICENSE file in the root directory of this source tree.
130
- */const Bn=J("Download",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"7 10 12 15 17 10",key:"2ggqvy"}],["line",{x1:"12",x2:"12",y1:"15",y2:"3",key:"1vk2je"}]]);/**
130
+ */const rf=X("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"}]]);/**
131
131
  * @license lucide-react v0.378.0 - ISC
132
132
  *
133
133
  * This source code is licensed under the ISC license.
134
134
  * See the LICENSE file in the root directory of this source tree.
135
- */const zo=J("ExternalLink",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]);/**
135
+ */const Vn=X("Download",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"7 10 12 15 17 10",key:"2ggqvy"}],["line",{x1:"12",x2:"12",y1:"15",y2:"3",key:"1vk2je"}]]);/**
136
136
  * @license lucide-react v0.378.0 - ISC
137
137
  *
138
138
  * This source code is licensed under the ISC license.
139
139
  * See the LICENSE file in the root directory of this source tree.
140
- */const _n=J("EyeOff",[["path",{d:"M9.88 9.88a3 3 0 1 0 4.24 4.24",key:"1jxqfv"}],["path",{d:"M10.73 5.08A10.43 10.43 0 0 1 12 5c7 0 10 7 10 7a13.16 13.16 0 0 1-1.67 2.68",key:"9wicm4"}],["path",{d:"M6.61 6.61A13.526 13.526 0 0 0 2 12s3 7 10 7a9.74 9.74 0 0 0 5.39-1.61",key:"1jreej"}],["line",{x1:"2",x2:"22",y1:"2",y2:"22",key:"a6p6uj"}]]);/**
140
+ */const si=X("ExternalLink",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]);/**
141
141
  * @license lucide-react v0.378.0 - ISC
142
142
  *
143
143
  * This source code is licensed under the ISC license.
144
144
  * See the LICENSE file in the root directory of this source tree.
145
- */const Ln=J("Eye",[["path",{d:"M2 12s3-7 10-7 10 7 10 7-3 7-10 7-10-7-10-7Z",key:"rwhkz3"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/**
145
+ */const Mn=X("EyeOff",[["path",{d:"M9.88 9.88a3 3 0 1 0 4.24 4.24",key:"1jxqfv"}],["path",{d:"M10.73 5.08A10.43 10.43 0 0 1 12 5c7 0 10 7 10 7a13.16 13.16 0 0 1-1.67 2.68",key:"9wicm4"}],["path",{d:"M6.61 6.61A13.526 13.526 0 0 0 2 12s3 7 10 7a9.74 9.74 0 0 0 5.39-1.61",key:"1jreej"}],["line",{x1:"2",x2:"22",y1:"2",y2:"22",key:"a6p6uj"}]]);/**
146
146
  * @license lucide-react v0.378.0 - ISC
147
147
  *
148
148
  * This source code is licensed under the ISC license.
149
149
  * See the LICENSE file in the root directory of this source tree.
150
- */const Vl=J("Globe",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]]);/**
150
+ */const Dn=X("Eye",[["path",{d:"M2 12s3-7 10-7 10 7 10 7-3 7-10 7-10-7-10-7Z",key:"rwhkz3"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/**
151
151
  * @license lucide-react v0.378.0 - ISC
152
152
  *
153
153
  * This source code is licensed under the ISC license.
154
154
  * See the LICENSE file in the root directory of this source tree.
155
- */const rf=J("Info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);/**
155
+ */const Vl=X("Globe",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]]);/**
156
156
  * @license lucide-react v0.378.0 - ISC
157
157
  *
158
158
  * This source code is licensed under the ISC license.
159
159
  * See the LICENSE file in the root directory of this source tree.
160
- */const lf=J("KeyRound",[["path",{d:"M2 18v3c0 .6.4 1 1 1h4v-3h3v-3h2l1.4-1.4a6.5 6.5 0 1 0-4-4Z",key:"167ctg"}],["circle",{cx:"16.5",cy:"7.5",r:".5",fill:"currentColor",key:"w0ekpg"}]]);/**
160
+ */const lf=X("Info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);/**
161
161
  * @license lucide-react v0.378.0 - ISC
162
162
  *
163
163
  * This source code is licensed under the ISC license.
164
164
  * See the LICENSE file in the root directory of this source tree.
165
- */const id=J("Key",[["circle",{cx:"7.5",cy:"15.5",r:"5.5",key:"yqb3hr"}],["path",{d:"m21 2-9.6 9.6",key:"1j0ho8"}],["path",{d:"m15.5 7.5 3 3L22 7l-3-3",key:"1rn1fs"}]]);/**
165
+ */const sf=X("KeyRound",[["path",{d:"M2 18v3c0 .6.4 1 1 1h4v-3h3v-3h2l1.4-1.4a6.5 6.5 0 1 0-4-4Z",key:"167ctg"}],["circle",{cx:"16.5",cy:"7.5",r:".5",fill:"currentColor",key:"w0ekpg"}]]);/**
166
166
  * @license lucide-react v0.378.0 - ISC
167
167
  *
168
168
  * This source code is licensed under the ISC license.
169
169
  * See the LICENSE file in the root directory of this source tree.
170
- */const sf=J("LayoutGrid",[["rect",{width:"7",height:"7",x:"3",y:"3",rx:"1",key:"1g98yp"}],["rect",{width:"7",height:"7",x:"14",y:"3",rx:"1",key:"6d4xhi"}],["rect",{width:"7",height:"7",x:"14",y:"14",rx:"1",key:"nxv5o0"}],["rect",{width:"7",height:"7",x:"3",y:"14",rx:"1",key:"1bb6yr"}]]);/**
170
+ */const id=X("Key",[["circle",{cx:"7.5",cy:"15.5",r:"5.5",key:"yqb3hr"}],["path",{d:"m21 2-9.6 9.6",key:"1j0ho8"}],["path",{d:"m15.5 7.5 3 3L22 7l-3-3",key:"1rn1fs"}]]);/**
171
171
  * @license lucide-react v0.378.0 - ISC
172
172
  *
173
173
  * This source code is licensed under the ISC license.
174
174
  * See the LICENSE file in the root directory of this source tree.
175
- */const sd=J("List",[["line",{x1:"8",x2:"21",y1:"6",y2:"6",key:"7ey8pc"}],["line",{x1:"8",x2:"21",y1:"12",y2:"12",key:"rjfblc"}],["line",{x1:"8",x2:"21",y1:"18",y2:"18",key:"c3b1m8"}],["line",{x1:"3",x2:"3.01",y1:"6",y2:"6",key:"1g7gq3"}],["line",{x1:"3",x2:"3.01",y1:"12",y2:"12",key:"1pjlvk"}],["line",{x1:"3",x2:"3.01",y1:"18",y2:"18",key:"28t2mc"}]]);/**
175
+ */const of=X("LayoutGrid",[["rect",{width:"7",height:"7",x:"3",y:"3",rx:"1",key:"1g98yp"}],["rect",{width:"7",height:"7",x:"14",y:"3",rx:"1",key:"6d4xhi"}],["rect",{width:"7",height:"7",x:"14",y:"14",rx:"1",key:"nxv5o0"}],["rect",{width:"7",height:"7",x:"3",y:"14",rx:"1",key:"1bb6yr"}]]);/**
176
176
  * @license lucide-react v0.378.0 - ISC
177
177
  *
178
178
  * This source code is licensed under the ISC license.
179
179
  * See the LICENSE file in the root directory of this source tree.
180
- */const of=J("LogOut",[["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}],["polyline",{points:"16 17 21 12 16 7",key:"1gabdz"}],["line",{x1:"21",x2:"9",y1:"12",y2:"12",key:"1uyos4"}]]);/**
180
+ */const sd=X("List",[["line",{x1:"8",x2:"21",y1:"6",y2:"6",key:"7ey8pc"}],["line",{x1:"8",x2:"21",y1:"12",y2:"12",key:"rjfblc"}],["line",{x1:"8",x2:"21",y1:"18",y2:"18",key:"c3b1m8"}],["line",{x1:"3",x2:"3.01",y1:"6",y2:"6",key:"1g7gq3"}],["line",{x1:"3",x2:"3.01",y1:"12",y2:"12",key:"1pjlvk"}],["line",{x1:"3",x2:"3.01",y1:"18",y2:"18",key:"28t2mc"}]]);/**
181
181
  * @license lucide-react v0.378.0 - ISC
182
182
  *
183
183
  * This source code is licensed under the ISC license.
184
184
  * See the LICENSE file in the root directory of this source tree.
185
- */const od=J("Moon",[["path",{d:"M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z",key:"a7tn18"}]]);/**
185
+ */const af=X("LogOut",[["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}],["polyline",{points:"16 17 21 12 16 7",key:"1gabdz"}],["line",{x1:"21",x2:"9",y1:"12",y2:"12",key:"1uyos4"}]]);/**
186
186
  * @license lucide-react v0.378.0 - ISC
187
187
  *
188
188
  * This source code is licensed under the ISC license.
189
189
  * See the LICENSE file in the root directory of this source tree.
190
- */const ad=J("Play",[["polygon",{points:"6 3 20 12 6 21 6 3",key:"1oa8hb"}]]);/**
190
+ */const od=X("Moon",[["path",{d:"M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z",key:"a7tn18"}]]);/**
191
191
  * @license lucide-react v0.378.0 - ISC
192
192
  *
193
193
  * This source code is licensed under the ISC license.
194
194
  * See the LICENSE file in the root directory of this source tree.
195
- */const To=J("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/**
195
+ */const ad=X("Play",[["polygon",{points:"6 3 20 12 6 21 6 3",key:"1oa8hb"}]]);/**
196
196
  * @license lucide-react v0.378.0 - ISC
197
197
  *
198
198
  * This source code is licensed under the ISC license.
199
199
  * See the LICENSE file in the root directory of this source tree.
200
- */const Ri=J("RefreshCw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]);/**
200
+ */const To=X("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/**
201
201
  * @license lucide-react v0.378.0 - ISC
202
202
  *
203
203
  * This source code is licensed under the ISC license.
204
204
  * See the LICENSE file in the root directory of this source tree.
205
- */const si=J("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/**
205
+ */const Fi=X("RefreshCw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]);/**
206
206
  * @license lucide-react v0.378.0 - ISC
207
207
  *
208
208
  * This source code is licensed under the ISC license.
209
209
  * See the LICENSE file in the root directory of this source tree.
210
- */const af=J("Settings",[["path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z",key:"1qme2f"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/**
210
+ */const oi=X("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/**
211
211
  * @license lucide-react v0.378.0 - ISC
212
212
  *
213
213
  * This source code is licensed under the ISC license.
214
214
  * See the LICENSE file in the root directory of this source tree.
215
- */const cd=J("ShieldAlert",[["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"}],["path",{d:"M12 8v4",key:"1got3b"}],["path",{d:"M12 16h.01",key:"1drbdi"}]]);/**
215
+ */const cf=X("Settings",[["path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z",key:"1qme2f"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/**
216
216
  * @license lucide-react v0.378.0 - ISC
217
217
  *
218
218
  * This source code is licensed under the ISC license.
219
219
  * See the LICENSE file in the root directory of this source tree.
220
- */const ud=J("ShieldCheck",[["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"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/**
220
+ */const cd=X("ShieldAlert",[["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"}],["path",{d:"M12 8v4",key:"1got3b"}],["path",{d:"M12 16h.01",key:"1drbdi"}]]);/**
221
221
  * @license lucide-react v0.378.0 - ISC
222
222
  *
223
223
  * This source code is licensed under the ISC license.
224
224
  * See the LICENSE file in the root directory of this source tree.
225
- */const dd=J("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"}]]);/**
225
+ */const ud=X("ShieldCheck",[["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"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/**
226
226
  * @license lucide-react v0.378.0 - ISC
227
227
  *
228
228
  * This source code is licensed under the ISC license.
229
229
  * See the LICENSE file in the root directory of this source tree.
230
- */const pd=J("SquarePen",[["path",{d:"M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7",key:"1m0v6g"}],["path",{d:"M18.375 2.625a2.121 2.121 0 1 1 3 3L12 15l-4 1 1-4Z",key:"1lpok0"}]]);/**
230
+ */const dd=X("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"}]]);/**
231
231
  * @license lucide-react v0.378.0 - ISC
232
232
  *
233
233
  * This source code is licensed under the ISC license.
234
234
  * See the LICENSE file in the root directory of this source tree.
235
- */const fd=J("Square",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]]);/**
235
+ */const pd=X("SquarePen",[["path",{d:"M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7",key:"1m0v6g"}],["path",{d:"M18.375 2.625a2.121 2.121 0 1 1 3 3L12 15l-4 1 1-4Z",key:"1lpok0"}]]);/**
236
236
  * @license lucide-react v0.378.0 - ISC
237
237
  *
238
238
  * This source code is licensed under the ISC license.
239
239
  * See the LICENSE file in the root directory of this source tree.
240
- */const Po=J("Star",[["polygon",{points:"12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2",key:"8f66p6"}]]);/**
240
+ */const fd=X("Square",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]]);/**
241
241
  * @license lucide-react v0.378.0 - ISC
242
242
  *
243
243
  * This source code is licensed under the ISC license.
244
244
  * See the LICENSE file in the root directory of this source tree.
245
- */const hd=J("Sun",[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]]);/**
245
+ */const Po=X("Star",[["polygon",{points:"12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2",key:"8f66p6"}]]);/**
246
246
  * @license lucide-react v0.378.0 - ISC
247
247
  *
248
248
  * This source code is licensed under the ISC license.
249
249
  * See the LICENSE file in the root directory of this source tree.
250
- */const un=J("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);/**
250
+ */const hd=X("Sun",[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]]);/**
251
251
  * @license lucide-react v0.378.0 - ISC
252
252
  *
253
253
  * This source code is licensed under the ISC license.
254
254
  * See the LICENSE file in the root directory of this source tree.
255
- */const cf=J("Upload",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"17 8 12 3 7 8",key:"t8dd8p"}],["line",{x1:"12",x2:"12",y1:"3",y2:"15",key:"widbto"}]]);/**
255
+ */const uf=X("Terminal",[["polyline",{points:"4 17 10 11 4 5",key:"akl6gq"}],["line",{x1:"12",x2:"20",y1:"19",y2:"19",key:"q2wloq"}]]);/**
256
256
  * @license lucide-react v0.378.0 - ISC
257
257
  *
258
258
  * This source code is licensed under the ISC license.
259
259
  * See the LICENSE file in the root directory of this source tree.
260
- */const $n=J("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),uf=()=>{const{isInitialized:e,initializeVault:t,unlockVault:n,getHint:r,theme:i,toggleTheme:s}=St(),[o,a]=C.useState(""),[c,d]=C.useState(""),[x,y]=C.useState(!1),[g,k]=C.useState(null),[S,m]=C.useState(!1),[N,p]=C.useState(null),[u,f]=C.useState(!1);Ut.useEffect(()=>{e&&r().then(w=>{w==="Mật khẩu mặc định là 180823"&&f(!0)})},[e]);const j=async w=>{if(w.preventDefault(),!!o){k(null),m(!0);try{let z=!1;if(e)z=await n(o);else{if(o.length<8){k("Mật khẩu Master phải từ 8 ký tự trở lên"),m(!1);return}z=await t(o,c)}z||k(e?"Mật khẩu Master không chính xác!":"Không thể khởi tạo vault!")}catch{k("Đã xảy ra lỗi hệ thống, vui lòng thử lại.")}finally{m(!1)}}},v=async()=>{const w=await r();p(w||"Không có gợi ý nào được thiết lập.")};return l.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",minHeight:"100vh",padding:"20px",position:"relative"},children:[l.jsx("button",{type:"button",className:"btn btn-secondary",onClick:s,style:{position:"absolute",top:"20px",right:"20px",borderRadius:"50%",width:"40px",height:"40px",padding:0,display:"flex",alignItems:"center",justifyContent:"center",zIndex:10},title:i==="dark"?"Chuyển sang chế độ sáng":"Chuyển sang chế độ tối",children:i==="dark"?l.jsx(hd,{size:18}):l.jsx(od,{size:18})}),l.jsxs("div",{className:"glass-panel animate-fade-in",style:{width:"100%",maxWidth:"450px",padding:"40px",display:"flex",flexDirection:"column",gap:"24px"},children:[l.jsxs("div",{style:{textAlign:"center",display:"flex",flexDirection:"column",alignItems:"center",gap:"12px"},children:[l.jsx("div",{style:{background:"var(--primary-gradient)",padding:"14px",borderRadius:"50%",display:"inline-flex",boxShadow:"var(--glow-accent)"},children:l.jsx(dd,{size:32,color:"#030712"})}),l.jsx("h2",{className:"gradient-text",style:{fontSize:"28px",fontWeight:700},children:"Account Manager"}),l.jsx("p",{style:{color:"var(--text-secondary)",fontSize:"14px"},children:e?"Nhập mật khẩu Master để giải mã dữ liệu của bạn":"Tạo mật khẩu Master để bắt đầu lưu trữ bảo mật"})]}),e&&u&&l.jsxs("div",{style:{background:"rgba(245, 158, 11, 0.08)",border:"1px solid rgba(245, 158, 11, 0.25)",color:"var(--text-accent)",padding:"12px 16px",borderRadius:"8px",fontSize:"13px",lineHeight:"1.5",display:"flex",flexDirection:"column",gap:"4px",textAlign:"left"},children:[l.jsx("div",{style:{fontWeight:600,display:"flex",alignItems:"center",gap:"6px"},children:l.jsxs("span",{children:["💡 Mật khẩu mặc định: ",l.jsx("strong",{children:"180823"})]})}),l.jsxs("span",{style:{color:"var(--text-secondary)",fontSize:"12px"},children:["Vui lòng sử dụng mật khẩu trên để đăng nhập lần đầu, sau đó đổi mật khẩu trong phần ",l.jsx("strong",{children:"Cài đặt"})," để bảo vệ dữ liệu."]})]}),l.jsxs("form",{onSubmit:j,style:{display:"flex",flexDirection:"column",gap:"20px"},children:[g&&l.jsx("div",{style:{background:"rgba(255, 75, 43, 0.1)",border:"1px solid rgba(255, 75, 43, 0.3)",color:"#ff6b6b",padding:"12px 16px",borderRadius:"8px",fontSize:"13px",textAlign:"center"},children:g}),l.jsxs("div",{className:"form-group",style:{position:"relative"},children:[l.jsx("label",{className:"form-label",htmlFor:"password",children:"Mật khẩu Master"}),l.jsxs("div",{style:{position:"relative",display:"flex",alignItems:"center"},children:[l.jsx("input",{id:"password",type:x?"text":"password",className:"form-input",placeholder:"Nhập mật khẩu chính...",value:o,onChange:w=>a(w.target.value),style:{paddingRight:"46px"},disabled:S,autoComplete:"current-password"}),l.jsx("button",{type:"button",onClick:()=>y(!x),style:{position:"absolute",right:"12px",background:"none",border:"none",color:"var(--text-secondary)",cursor:"pointer",display:"flex",alignItems:"center"},children:x?l.jsx(_n,{size:18}):l.jsx(Ln,{size:18})})]})]}),!e&&l.jsxs("div",{className:"form-group",children:[l.jsx("label",{className:"form-label",htmlFor:"hint",children:"Gợi ý mật khẩu (Tùy chọn)"}),l.jsx("input",{id:"hint",type:"text",className:"form-input",placeholder:"Nhập gợi ý gợi nhớ mật khẩu...",value:c,onChange:w=>d(w.target.value),disabled:S})]}),l.jsx("button",{type:"submit",className:"btn btn-primary",style:{width:"100%",padding:"14px",fontSize:"15px"},disabled:S,children:S?l.jsx("div",{className:"spinner",style:{width:"18px",height:"18px"}}):l.jsxs(l.Fragment,{children:[l.jsx(lf,{size:18}),e?"Mở khóa Vault":"Thiết lập Vault"]})})]}),e&&l.jsx("div",{style:{display:"flex",justifyContent:"center",marginTop:"8px"},children:N?l.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"6px",fontSize:"13px",color:"var(--text-accent)",background:"var(--bg-main)",padding:"8px 12px",borderRadius:"6px",border:"1px solid var(--border-color)"},children:[l.jsx(rf,{size:14}),l.jsxs("span",{children:["Gợi ý: ",l.jsx("strong",{children:N})]})]}):l.jsx("button",{type:"button",onClick:v,style:{background:"none",border:"none",color:"var(--text-muted)",fontSize:"13px",cursor:"pointer",textDecoration:"underline"},children:"Quên mật khẩu? Hiển thị gợi ý"})})]})]})},df=({search:e,setSearch:t,theme:n,toggleTheme:r,onSmartPasteOpen:i,onLockVault:s,onImportExportOpen:o})=>{const[a,c]=C.useState(!1),d=C.useRef(null);C.useEffect(()=>{const y=g=>{var k;(g.metaKey||g.ctrlKey)&&g.key.toLowerCase()==="k"&&(g.preventDefault(),(k=d.current)==null||k.focus())};return window.addEventListener("keydown",y),()=>window.removeEventListener("keydown",y)},[]);const x=typeof window<"u"&&/Mac|iPhone|iPod|iPad/i.test(navigator.userAgent||"");return l.jsxs("header",{className:"glass-panel",style:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"14px 20px",width:"100%",position:"sticky",top:"0",zIndex:100},children:[l.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"24px",flex:1,marginRight:"16px"},children:[l.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"10px",flexShrink:0},children:[l.jsx(ud,{size:28,style:{color:"var(--text-accent)"}}),l.jsx("h1",{className:"gradient-text",style:{fontSize:"22px",fontWeight:800},children:"Account Manager"})]}),l.jsxs("div",{style:{position:"relative",width:"100%",maxWidth:"320px",flexShrink:1},children:[l.jsx(si,{size:18,style:{position:"absolute",left:"12px",top:"50%",transform:"translateY(-50%)",color:"var(--text-muted)"}}),l.jsx("input",{ref:d,type:"text",className:"form-input",placeholder:"Tìm kiếm tài khoản, website...",value:e,onChange:y=>t(y.target.value),onFocus:()=>c(!0),onBlur:()=>c(!1),style:{paddingLeft:"38px",paddingRight:"60px",borderRadius:"24px",width:"100%",padding:"8px 16px 8px 38px"},"aria-label":"Tìm kiếm tài khoản và mật khẩu"}),!a&&!e&&l.jsxs("div",{style:{position:"absolute",right:"12px",top:"50%",transform:"translateY(-50%)",display:"flex",alignItems:"center",gap:"3px",padding:"2px 6px",borderRadius:"4px",background:"var(--btn-secondary-bg)",border:"1px solid var(--border-color)",fontSize:"10px",color:"var(--text-secondary)",pointerEvents:"none",userSelect:"none",fontFamily:"monospace"},children:[l.jsx("span",{children:x?"⌘":"Ctrl"}),l.jsx("span",{children:"+"}),l.jsx("span",{children:"K"})]})]})]}),l.jsxs("div",{style:{display:"flex",gap:"8px",alignItems:"center"},children:[l.jsx("button",{type:"button",className:"btn btn-secondary",onClick:r,style:{padding:"6px",borderRadius:"50%",width:"32px",height:"32px",display:"flex",alignItems:"center",justifyContent:"center"},title:n==="dark"?"Chuyển sang chế độ sáng":"Chuyển sang chế độ tối",children:n==="dark"?l.jsx(hd,{size:16}):l.jsx(od,{size:16})}),l.jsxs("button",{type:"button",className:"btn btn-secondary",onClick:o,style:{display:"flex",alignItems:"center",gap:"6px",padding:"7px 14px",fontSize:"13px"},children:[l.jsx(Bn,{size:16}),"Nhập / Xuất"]}),l.jsxs("button",{className:"btn btn-secondary",onClick:i,style:{padding:"7px 14px",fontSize:"13px"},children:[l.jsx(ef,{size:16}),"Dán nhanh"]}),l.jsxs("button",{className:"btn btn-secondary",onClick:s,style:{padding:"7px 14px",fontSize:"13px"},children:[l.jsx(of,{size:16}),"Khóa Vault"]})]})]})},oi=({name:e,size:t=16,className:n=""})=>{const r=e.toLowerCase();return r.includes("google")?l.jsxs("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"none",className:n,style:{display:"inline-block",verticalAlign:"middle"},children:[l.jsx("path",{d:"M22.56 12.25c0-.78-.07-1.53-.2-2.25H12v4.26h5.92c-.26 1.37-1.04 2.53-2.21 3.31v2.77h3.57c2.08-1.92 3.28-4.74 3.28-8.09z",fill:"#4285F4"}),l.jsx("path",{d:"M12 23c2.97 0 5.46-.98 7.28-2.66l-3.57-2.77c-.98.66-2.23 1.06-3.71 1.06-2.86 0-5.29-1.93-6.16-4.53H2.18v2.84C3.99 20.53 7.7 23 12 23z",fill:"#34A853"}),l.jsx("path",{d:"M5.84 14.09c-.22-.66-.35-1.36-.35-2.09s.13-1.43.35-2.09V7.06H2.18C1.43 8.55 1 10.22 1 12s.43 3.45 1.18 4.94l2.85-2.22.81-.63z",fill:"#FBBC05"}),l.jsx("path",{d:"M12 5.38c1.62 0 3.06.56 4.21 1.64l3.15-3.15C17.45 2.09 14.97 1 12 1 7.7 1 3.99 3.47 2.18 7.06l3.66 2.84c.87-2.6 3.3-4.53 6.16-4.53z",fill:"#EA4335"})]}):r.includes("facebook")?l.jsxs("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"none",className:n,style:{display:"inline-block",verticalAlign:"middle"},children:[l.jsx("circle",{cx:"12",cy:"12.073",r:"11.5",fill:"#FFFFFF"}),l.jsx("path",{d:"M24 12.073c0-6.627-5.373-12-12-12s-12 5.373-12 12c0 5.99 4.388 10.954 10.125 11.854v-8.385H7.078v-3.47h3.047V9.43c0-3.007 1.792-4.669 4.533-4.669 1.312 0 2.686.235 2.686.235v2.953H15.83c-1.491 0-1.956.925-1.956 1.874v2.25h3.328l-.532 3.47h-2.796v8.385C19.612 23.027 24 18.062 24 12.073z",fill:"#1877F2"})]}):r.includes("github")?l.jsx("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"currentColor",className:n,style:{display:"inline-block",verticalAlign:"middle",color:"var(--text-primary)"},children:l.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12 2C6.477 2 2 6.477 2 12c0 4.42 2.865 8.166 6.839 9.489.5.092.682-.217.682-.482 0-.237-.008-.866-.013-1.7-2.782.603-3.369-1.34-3.369-1.34-.454-1.156-1.11-1.464-1.11-1.464-.908-.62.069-.608.069-.608 1.003.07 1.531 1.03 1.531 1.03.892 1.529 2.341 1.087 2.91.831.092-.646.35-1.086.636-1.336-2.22-.253-4.555-1.11-4.555-4.943 0-1.091.39-1.984 1.029-2.683-.103-.253-.446-1.27.098-2.647 0 0 .84-.269 2.75 1.025A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.294 2.747-1.025 2.747-1.025.546 1.377.203 2.394.1 2.647.64.699 1.028 1.592 1.028 2.683 0 3.842-2.339 4.687-4.566 4.935.359.309.678.919.678 1.852 0 1.336-.012 2.415-.012 2.743 0 .267.18.579.688.481C19.137 20.162 22 16.418 22 12c0-5.523-4.477-10-10-10z"})}):r.includes("hotmail")||r.includes("outlook")||r.includes("microsoft")?l.jsxs("svg",{width:t,height:t,viewBox:"0 0 512 512",fill:"none",className:n,style:{display:"inline-block",verticalAlign:"middle"},children:[l.jsxs("defs",{children:[l.jsxs("linearGradient",{id:"outlook-svgid-1",gradientUnits:"userSpaceOnUse",x1:"315.5344",y1:"-877.4263",x2:"315.5344",y2:"-651.1933",gradientTransform:"matrix(1 0 0 1 0 1145.3334)",children:[l.jsx("stop",{offset:"0",stopColor:"#35B8F1"}),l.jsx("stop",{offset:"1",stopColor:"#28A8EA"})]}),l.jsxs("linearGradient",{id:"outlook-svgid-2",gradientUnits:"userSpaceOnUse",x1:"45.5066",y1:"-1037.3639",x2:"216.4467",y2:"-741.3027",gradientTransform:"matrix(1 0 0 1 0 1145.3334)",children:[l.jsx("stop",{offset:"0",stopColor:"#1784D9"}),l.jsx("stop",{offset:"0.5",stopColor:"#107AD5"}),l.jsx("stop",{offset:"1",stopColor:"#0A63C9"})]})]}),l.jsx("path",{fill:"#0A2767",d:"M512,267.91c0.03-4-2.04-7.73-5.45-9.82h-0.06l-0.21-0.12L328.86,152.95c-0.77-0.52-1.56-0.99-2.38-1.42 c-6.85-3.53-14.99-3.53-21.84,0c-0.82,0.43-1.62,0.9-2.38,1.42L124.84,257.96l-0.21,0.12c-5.42,3.37-7.08,10.5-3.71,15.92 c0.99,1.6,2.36,2.93,3.99,3.88L302.32,382.9c0.77,0.51,1.56,0.99,2.38,1.42c6.85,3.53,14.99,3.53,21.84,0 c0.82-0.43,1.61-0.9,2.38-1.42l177.41-105.02C509.88,275.82,512.04,272.01,512,267.91z"}),l.jsx("path",{fill:"#0364B8",d:"M145.53,197.79h116.43v106.72H145.53V197.79z M488.19,89.3V40.48c0.28-12.21-9.38-22.33-21.59-22.62H164.47 c-12.21,0.29-21.87,10.42-21.59,22.62V89.3l178.6,47.63L488.19,89.3z"}),l.jsx("path",{fill:"#0078D4",d:"M142.88,89.3h119.07v107.16H142.88V89.3z"}),l.jsx("path",{fill:"#28A8EA",d:"M381.02,89.3H261.95v107.16l119.07,107.16h107.16V196.47L381.02,89.3z"}),l.jsx("path",{fill:"#0078D4",d:"M261.95,196.47h119.07v107.16H261.95V196.47z"}),l.jsx("path",{fill:"#0364B8",d:"M261.95,303.63h119.07v107.16H261.95V303.63z"}),l.jsx("path",{fill:"#14447D",d:"M145.53,304.51h116.43v97.02H145.53V304.51z"}),l.jsx("path",{fill:"#0078D4",d:"M381.02,303.63h107.16v107.16H381.02V303.63z"}),l.jsx("path",{fill:"url(#outlook-svgid-1)",d:"M506.55,277.23l-0.23,0.12l-177.41,99.78c-0.77,0.48-1.56,0.93-2.38,1.33c-3.01,1.43-6.29,2.25-9.62,2.38 l-9.69-5.67c-0.82-0.41-1.61-0.87-2.38-1.37l-179.8-102.61h-0.08l-5.88-3.29V469.9c0.09,13.48,11.09,24.33,24.56,24.24h344.18 c0.2,0,0.38-0.1,0.6-0.1c2.85-0.18,5.65-0.77,8.33-1.74c1.16-0.49,2.28-1.07,3.35-1.74c0.8-0.45,2.17-1.44,2.17-1.44 c6.1-4.51,9.71-11.64,9.74-19.23V267.91C512,271.77,509.91,275.33,506.55,277.23z"}),l.jsx("path",{fill:"#0A2767",opacity:.5,d:"M502.47,267.11v12.38L316.96,407.22L124.9,271.28c0-0.07-0.05-0.12-0.12-0.12l0,0l-17.62-10.6v-8.93l7.26-0.12 l15.36,8.81l0.36,0.12l1.31,0.83c0,0,180.51,103,180.99,103.23l6.91,4.05c0.6-0.24,1.19-0.48,1.91-0.71 c0.36-0.24,179.2-100.85,179.2-100.85L502.47,267.11z"}),l.jsx("path",{fill:"#1490DF",d:"M506.55,277.23l-0.23,0.13l-177.41,99.78c-0.77,0.48-1.56,0.93-2.38,1.33c-6.89,3.37-14.95,3.37-21.84,0 c-0.82-0.4-1.61-0.85-2.38-1.33l-177.41-99.78l-0.21-0.13c-3.43-1.86-5.57-5.43-5.61-9.32V469.9c0.09,13.47,11.08,24.33,24.55,24.24 c0,0,0,0,0,0h343.83c13.47,0.09,24.47-10.77,24.55-24.24c0,0,0,0,0,0V267.91C512,271.77,509.91,275.33,506.55,277.23z"}),l.jsx("path",{fill:"#000000",opacity:.1,d:"M331.49,375.67l-2.66,1.49c-0.77,0.49-1.56,0.94-2.38,1.35c-2.93,1.44-6.11,2.28-9.36,2.48l67.5,79.82 l117.75,28.37c3.23-2.44,5.79-5.64,7.47-9.32L331.49,375.67z"}),l.jsx("path",{fill:"#000000",opacity:.05,d:"M343.52,368.9l-14.68,8.25c-0.77,0.49-1.56,0.94-2.38,1.35c-2.93,1.44-6.11,2.28-9.36,2.48l31.62,87.19 l153.66,20.97c6.05-4.54,9.62-11.67,9.62-19.24v-2.61L343.52,368.9z"}),l.jsx("path",{fill:"#28A8EA",d:"M143.96,494.14h343.46c5.29,0.03,10.44-1.64,14.7-4.76L307.2,375.2c-0.82-0.41-1.61-0.87-2.38-1.37 l-179.8-102.61h-0.08l-5.87-3.31v201.3C119.06,482.96,130.2,494.13,143.96,494.14C143.96,494.14,143.96,494.14,143.96,494.14z"}),l.jsx("path",{fill:"#000000",opacity:.1,d:"M285.77,134.94v253.98c-0.02,8.9-5.44,16.91-13.69,20.24c-2.56,1.1-5.31,1.67-8.1,1.67H119.07v-285.8h23.81 v-11.91h121.09C276.01,113.16,285.74,122.91,285.77,134.94z"}),l.jsx("path",{fill:"#000000",opacity:.2,d:"M273.86,146.85v253.98c0.03,2.88-0.58,5.72-1.79,8.33c-3.31,8.15-11.21,13.5-20,13.54h-133V125.02h133 c3.45-0.03,6.86,0.83,9.88,2.5C269.25,131.2,273.86,138.68,273.86,146.85z"}),l.jsx("path",{fill:"#000000",opacity:.2,d:"M273.86,146.85v230.16c-0.06,12.02-9.77,21.77-21.79,21.87h-133V125.02h133c3.45-0.03,6.86,0.83,9.88,2.5 C269.25,131.2,273.86,138.68,273.86,146.85z"}),l.jsx("path",{fill:"#000000",opacity:.2,d:"M261.95,146.85v230.16c-0.01,12.04-9.75,21.81-21.79,21.87H119.07V125.02h121.09 c12.04,0.01,21.8,9.77,21.79,21.81C261.95,146.84,261.95,146.84,261.95,146.85z"}),l.jsx("path",{fill:"url(#outlook-svgid-2)",d:"M21.83,125.02h218.3c12.05,0,21.83,9.77,21.83,21.83v218.3c0,12.05-9.77,21.83-21.83,21.83H21.83 C9.77,386.98,0,377.2,0,365.15v-218.3C0,134.8,9.77,125.02,21.83,125.02z"}),l.jsx("path",{fill:"#FFFFFF",d:"M68.22,216.56c5.38-11.46,14.06-21.05,24.93-27.54c12.04-6.89,25.75-10.33,39.61-9.93 c12.85-0.28,25.53,2.98,36.66,9.42c10.46,6.24,18.89,15.38,24.25,26.31c5.85,12.05,8.76,25.31,8.5,38.7 c0.28,13.99-2.71,27.86-8.75,40.48c-5.49,11.33-14.19,20.79-25,27.23c-11.56,6.64-24.71,9.98-38.03,9.67 c-13.13,0.32-26.09-2.98-37.47-9.53c-10.55-6.25-19.08-15.4-24.58-26.36c-5.88-11.87-8.83-24.99-8.6-38.23 C59.5,242.91,62.4,229.16,68.22,216.56z M94.79,281.22c2.87,7.25,7.73,13.53,14.03,18.12c6.41,4.48,14.09,6.79,21.91,6.6 c8.33,0.33,16.54-2.06,23.39-6.81c6.22-4.58,10.95-10.88,13.62-18.12c2.99-8.09,4.46-16.66,4.35-25.28c0.09-8.7-1.29-17.36-4.1-25.6 c-2.48-7.44-7.06-14-13.19-18.88c-6.68-4.97-14.86-7.5-23.18-7.14c-7.99-0.21-15.84,2.12-22.42,6.66 c-6.4,4.61-11.36,10.95-14.29,18.28c-6.5,16.79-6.54,35.4-0.1,52.21L94.79,281.22z"}),l.jsx("path",{fill:"#50D9FF",d:"M381.02,89.3h107.16v107.16H381.02V89.3z"})]}):r.includes("twitter")||r.includes(" x ")||r==="x"?l.jsx("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"currentColor",className:n,style:{display:"inline-block",verticalAlign:"middle",color:"var(--text-primary)"},children:l.jsx("path",{d:"M18.244 2.25h3.308l-7.227 8.26 8.502 11.24H16.17l-5.214-6.817L4.99 21.75H1.68l7.73-8.835L1.254 2.25H8.08l4.713 6.231zm-1.161 17.52h1.833L7.084 4.126H5.117z"})}):r.includes("threads")?l.jsx("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"currentColor",className:n,style:{display:"inline-block",verticalAlign:"middle",color:"var(--text-primary)"},children:l.jsx("path",{d:"M12.186 24h-.007c-3.581-.024-6.334-1.205-8.184-3.509C2.35 18.44 1.5 15.586 1.472 12.01v-.017c.03-3.579.879-6.43 2.525-8.482C5.845 1.205 8.6.024 12.18 0h.014c2.746.02 5.043.725 6.826 2.098 1.677 1.29 2.858 3.13 3.509 5.467l-2.04.569c-1.104-3.96-3.898-5.984-8.304-6.015-2.91.022-5.11.936-6.54 2.717C4.307 6.504 3.616 8.914 3.589 12c.027 3.086.718 5.496 2.057 7.164 1.43 1.783 3.631 2.698 6.54 2.717 2.623-.02 4.358-.631 5.8-2.045 1.647-1.613 1.618-3.593 1.09-4.798-.31-.71-.873-1.3-1.634-1.75-.192 1.352-.622 2.446-1.284 3.272-.886 1.102-2.14 1.704-3.73 1.79-1.202.065-2.361-.218-3.259-.801-1.063-.689-1.685-1.74-1.752-2.964-.065-1.19.408-2.285 1.33-3.082.88-.76 2.119-1.207 3.583-1.291a13.853 13.853 0 0 1 3.02.142c-.126-.742-.375-1.332-.75-1.757-.513-.586-1.308-.883-2.359-.89h-.029c-.844 0-1.992.232-2.721 1.32L7.734 7.847c.98-1.454 2.568-2.256 4.478-2.256h.044c3.194.02 5.097 1.975 5.287 5.388.108.046.216.094.321.142 1.49.7 2.58 1.761 3.154 3.07.797 1.82.871 4.79-1.548 7.158-1.85 1.81-4.094 2.628-7.277 2.65Zm1.003-11.69c-.242 0-.487.007-.739.021-1.836.103-2.98.946-2.916 2.143.067 1.256 1.452 1.839 2.784 1.767 1.224-.065 2.818-.543 3.086-3.71a10.5 10.5 0 0 0-2.215-.221z"})}):r.includes("apple")?l.jsx("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"currentColor",className:n,style:{display:"inline-block",verticalAlign:"middle",color:"var(--text-primary)"},children:l.jsx("path",{d:"M12.152 6.896c-.948 0-2.415-1.078-3.96-1.04-2.04.027-3.91 1.183-4.961 3.014-2.117 3.675-.546 9.103 1.519 12.09 1.013 1.454 2.208 3.09 3.792 3.039 1.52-.065 2.09-.987 3.935-.987 1.831 0 2.35.987 3.96.948 1.637-.026 2.676-1.48 3.676-2.948 1.156-1.688 1.636-3.325 1.662-3.415-.039-.013-3.182-1.221-3.22-4.857-.026-3.04 2.48-4.494 2.597-4.559-1.429-2.09-3.623-2.324-4.39-2.376-2-.156-3.675 1.09-4.61 1.09zM15.53 3.83c.843-1.012 1.4-2.427 1.245-3.83-1.207.052-2.662.805-3.532 1.818-.78.896-1.454 2.338-1.273 3.714 1.338.104 2.715-.688 3.559-1.701"})}):r.includes("aws")||r.includes("amazon")?l.jsx("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"#FF9900",className:n,style:{display:"inline-block",verticalAlign:"middle"},children:l.jsx("path",{d:"M6.763 10.036c0 .296.032.535.088.71.064.176.144.368.256.576.04.063.056.127.056.183 0 .08-.048.16-.152.24l-.503.335a.383.383 0 0 1-.208.072c-.08 0-.16-.04-.239-.112a2.47 2.47 0 0 1-.287-.375 6.18 6.18 0 0 1-.248-.471c-.622.734-1.405 1.101-2.347 1.101-.67 0-1.205-.191-1.596-.574-.391-.384-.59-.894-.59-1.533 0-.678.239-1.23.726-1.644.487-.415 1.133-.623 1.955-.623.272 0 .551.024.846.064.296.04.6.104.918.176v-.583c0-.607-.127-1.03-.375-1.277-.255-.248-.686-.367-1.3-.367-.28 0-.568.031-.863.103-.295.072-.583.16-.862.272a2.287 2.287 0 0 1-.28.104.488.488 0 0 1-.127.023c-.112 0-.168-.08-.168-.247v-.391c0-.128.016-.224.056-.28a.597.597 0 0 1 .224-.167c.279-.144.614-.264 1.005-.36a4.84 4.84 0 0 1 1.246-.151c.95 0 1.644.216 2.091.647.439.43.662 1.085.662 1.963v2.586zm-3.24 1.214c.263 0 .534-.048.822-.144.287-.096.543-.271.758-.51.128-.152.224-.32.272-.512.047-.191.08-.423.08-.694v-.335a6.66 6.66 0 0 0-.735-.136 6.02 6.02 0 0 0-.75-.048c-.535 0-.926.104-1.19.32-.263.215-.39.518-.39.917 0 .375.095.655.295.846.191.2.47.296.838.296zm6.41.862c-.144 0-.24-.024-.304-.08-.064-.048-.12-.16-.168-.311L7.586 5.55a1.398 1.398 0 0 1-.072-.32c0-.128.064-.2.191-.2h.783c.151 0 .255.025.31.08.065.048.113.16.16.312l1.342 5.284 1.245-5.284c.04-.16.088-.264.151-.312a.549.549 0 0 1 .32-.08h.638c.152 0 .256.025.32.08.063.048.12.16.151.312l1.261 5.348 1.381-5.348c.048-.16.104-.264.16-.312a.52.52 0 0 1 .311-.08h.743c.127 0 .2.065.2.2 0 .04-.009.08-.017.128a1.137 1.137 0 0 1-.056.2l-1.923 6.17c-.048.16-.104.263-.168.311a.51.51 0 0 1-.303.08h-.687c-.151 0-.255-.024-.32-.08-.063-.056-.119-.16-.15-.32l-1.238-5.148-1.23 5.14c-.04.16-.087.264-.15.32-.065.056-.177.08-.32.08zm10.256.215c-.415 0-.83-.048-1.229-.143-.399-.096-.71-.2-.918-.32-.128-.071-.215-.151-.247-.223a.563.563 0 0 1-.048-.224v-.407c0-.167.064-.247.183-.247.048 0 .096.008.144.024.048.016.12.048.2.08.271.12.566.215.878.279.319.064.63.096.95.096.502 0 .894-.088 1.165-.264a.86.86 0 0 0 .415-.758.777.777 0 0 0-.215-.559c-.144-.151-.416-.287-.807-.415l-1.157-.36c-.583-.183-1.014-.454-1.277-.813a1.902 1.902 0 0 1-.4-1.158c0-.335.073-.63.216-.886.144-.255.335-.479.575-.654.24-.184.51-.32.83-.415.32-.096.655-.136 1.006-.136.175 0 .359.008.535.032.183.024.35.056.518.088.16.04.312.08.455.127.144.048.256.096.336.144a.69.69 0 0 1 .24.2.43.43 0 0 1 .071.263v.375c0 .168-.064.256-.184.256a.83.83 0 0 1-.303-.096 3.652 3.652 0 0 0-1.532-.311c-.455 0-.815.071-1.062.223-.248.152-.375.383-.375.71 0 .224.08.416.24.567.159.152.454.304.877.44l1.134.358c.574.184.99.44 1.237.767.247.327.367.702.367 1.117 0 .343-.072.655-.207.926-.144.272-.336.511-.583.703-.248.2-.543.343-.886.447-.36.111-.734.167-1.142.167zM21.698 16.207c-2.626 1.94-6.442 2.969-9.722 2.969-4.598 0-8.74-1.7-11.87-4.526-.247-.223-.024-.527.272-.351 3.384 1.963 7.559 3.153 11.877 3.153 2.914 0 6.114-.607 9.06-1.852.439-.2.814.287.383.607zM22.792 14.961c-.336-.43-2.22-.207-3.074-.103-.255.032-.295-.192-.063-.36 1.5-1.053 3.967-.75 4.254-.399.287.36-.08 2.826-1.485 4.007-.215.184-.423.088-.327-.151.32-.79 1.03-2.57.695-2.994z"})}):r.includes("tidbcloud")||r.includes("tidb")?l.jsx("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"#00D2C4",className:n,style:{display:"inline-block",verticalAlign:"middle"},children:l.jsx("path",{d:"M12 0 1.609 6.001v11.998L11.999 24l10.393-6.001V6.001ZM8.535 17.999v-7.998L5.07 12V8L12 4l3.462 2-3.464 2.001v12Zm6.93 0v-7.997l3.464-2v7.997z"})}):r.includes("gmailworkspace")||r.includes("gmail")||r.includes("workspace")?l.jsxs("svg",{width:t,height:t,viewBox:"52 42 88 66",fill:"none",className:n,style:{display:"inline-block",verticalAlign:"middle"},children:[l.jsx("path",{fill:"#4285F4",d:"M58 108h14V74L52 59v43c0 3.32 2.69 6 6 6"}),l.jsx("path",{fill:"#34A853",d:"M120 108h14c3.32 0 6-2.69 6-6V59l-20 15"}),l.jsx("path",{fill:"#FBBC04",d:"M120 48v26l20-15v-8c0-7.42-8.47-11.65-14.4-7.2"}),l.jsx("path",{fill:"#EA4335",d:"M72 74V48l24 18 24-18v26L96 92"}),l.jsx("path",{fill:"#C5221F",d:"M52 51v8l20 15V48l-5.6-4.2c-5.94-4.45-14.4-.22-14.4 7.2"})]}):r.includes("vercel")?l.jsx("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"currentColor",className:n,style:{display:"inline-block",verticalAlign:"middle",color:"var(--text-primary)"},children:l.jsx("path",{d:"M24 22.525H0l12-21.05 12 21.05z"})}):r.includes("cloudinary")?l.jsx("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"#0078FF",className:n,style:{display:"inline-block",verticalAlign:"middle"},children:l.jsx("path",{d:"M24 14.8598c0 2.1729-1.3757 3.974-3.5903 4.6996l-.0995.0318V17.989c1.3777-.5805 2.1869-1.7275 2.1869-3.1291-.0072-2-1.6087-3.6288-3.6082-3.6699h-.5964l-.1432-.5686c-.7025-2.8996-3.2886-4.9489-6.2721-4.97a6.3915 6.3915 0 0 0-5.811 3.664l-.1828.3757-.4175.0437a4.4311 4.4311 0 0 0-3.3052 2.088c-1.2803 2.0856-.6274 4.8143 1.4583 6.0947v1.6897h-.01l-.149-.0675a5.9402 5.9402 0 0 1-3.3658-4.3494c-.5787-3.2291 1.57-6.3161 4.7991-6.8948a7.8766 7.8766 0 0 1 6.9839-4.149c3.4724.025 6.535 2.28 7.5901 5.5883 2.5789.3366 4.5138 2.5245 4.5327 5.1251zm-15.3176-1.322h.5647a.0656.0656 0 0 0 .0457-.1113L7.084 11.2158l-.0007-.0007a.0656.0656 0 0 0-.0927.0007L4.78 13.4265a.0656.0656 0 0 0 .0477.1113h.5566a.0656.0656 0 0 1 .0657.0656v5.0574c0 .6588.534 1.1928 1.1928 1.1928H9.247a.0656.0656 0 0 0 .0457-.1113l-.33-.33a1.1928 1.1928 0 0 1-.348-.839v-4.97a.0676.0676 0 0 1 .0676-.0655zm9.769 2.5466h.5667a.0655.0655 0 0 0 .0457-.1133l-2.2107-2.2087-.0015-.0015a.0636.0636 0 0 0-.0899.0015L14.551 15.971a.0657.0657 0 0 0 .0457.1133h.5567a.0656.0656 0 0 1 .0656.0656v2.5108c0 .6588.534 1.1928 1.1928 1.1928h2.6063a.0655.0655 0 0 0 .0457-.1113l-.33-.33a1.1928 1.1928 0 0 1-.348-.839V16.15a.0656.0656 0 0 1 .0657-.0656zm-4.8844-1.2743h.5646a.0656.0656 0 0 0 .0477-.1114l-2.2107-2.2027-.0006-.0006a.0656.0656 0 0 0-.0928.0006l-2.2087 2.2068a.0656.0656 0 0 0 .0457.1113h.5626a.0676.0676 0 0 1 .0657.0676v3.7791c0 .6588.534 1.1928 1.1928 1.1928h2.5983a.0656.0656 0 0 0 .0477-.1113l-.332-.33a1.193 1.193 0 0 1-.346-.839v-3.6956c0-.0366.0291-.0665.0657-.0676z"})}):r.includes("tiktok")?l.jsxs("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"none",className:n,style:{display:"inline-block",verticalAlign:"middle"},children:[l.jsx("circle",{cx:"12",cy:"12",r:"12",fill:"#000000"}),l.jsxs("g",{transform:"scale(0.7) translate(5.14, 5.14)",children:[l.jsx("path",{d:"M12.525.02c1.31-.02 2.61-.01 3.91-.02.08 1.53.63 3.09 1.75 4.17 1.12 1.11 2.7 1.62 4.24 1.79v4.03c-1.44-.05-2.89-.35-4.2-.97-.57-.26-1.1-.59-1.62-.93-.01 2.92.01 5.84-.02 8.75-.08 1.4-.54 2.79-1.35 3.94-1.31 1.92-3.58 3.17-5.91 3.21-1.43.08-2.86-.31-4.08-1.03-2.02-1.19-3.44-3.37-3.65-5.71-.02-.5-.03-1-.01-1.49.18-1.9 1.12-3.72 2.58-4.96 1.66-1.44 3.98-2.13 6.15-1.72.02 1.48-.04 2.96-.04 4.44-.99-.32-2.15-.23-3.02.37-.63.41-1.11 1.04-1.36 1.75-.21.51-.15 1.07-.14 1.61.24 1.64 1.82 3.02 3.5 2.87 1.12-.01 2.19-.66 2.77-1.61.19-.33.4-.67.41-1.06.1-1.79.06-3.57.07-5.36.01-4.03-.01-8.05.02-12.07z",fill:"#25F4EE",transform:"translate(-0.5, -0.5)"}),l.jsx("path",{d:"M12.525.02c1.31-.02 2.61-.01 3.91-.02.08 1.53.63 3.09 1.75 4.17 1.12 1.11 2.7 1.62 4.24 1.79v4.03c-1.44-.05-2.89-.35-4.2-.97-.57-.26-1.1-.59-1.62-.93-.01 2.92.01 5.84-.02 8.75-.08 1.4-.54 2.79-1.35 3.94-1.31 1.92-3.58 3.17-5.91 3.21-1.43.08-2.86-.31-4.08-1.03-2.02-1.19-3.44-3.37-3.65-5.71-.02-.5-.03-1-.01-1.49.18-1.9 1.12-3.72 2.58-4.96 1.66-1.44 3.98-2.13 6.15-1.72.02 1.48-.04 2.96-.04 4.44-.99-.32-2.15-.23-3.02.37-.63.41-1.11 1.04-1.36 1.75-.21.51-.15 1.07-.14 1.61.24 1.64 1.82 3.02 3.5 2.87 1.12-.01 2.19-.66 2.77-1.61.19-.33.4-.67.41-1.06.1-1.79.06-3.57.07-5.36.01-4.03-.01-8.05.02-12.07z",fill:"#FE094C",transform:"translate(0.5, 0.5)"}),l.jsx("path",{d:"M12.525.02c1.31-.02 2.61-.01 3.91-.02.08 1.53.63 3.09 1.75 4.17 1.12 1.11 2.7 1.62 4.24 1.79v4.03c-1.44-.05-2.89-.35-4.2-.97-.57-.26-1.1-.59-1.62-.93-.01 2.92.01 5.84-.02 8.75-.08 1.4-.54 2.79-1.35 3.94-1.31 1.92-3.58 3.17-5.91 3.21-1.43.08-2.86-.31-4.08-1.03-2.02-1.19-3.44-3.37-3.65-5.71-.02-.5-.03-1-.01-1.49.18-1.9 1.12-3.72 2.58-4.96 1.66-1.44 3.98-2.13 6.15-1.72.02 1.48-.04 2.96-.04 4.44-.99-.32-2.15-.23-3.02.37-.63.41-1.11 1.04-1.36 1.75-.21.51-.15 1.07-.14 1.61.24 1.64 1.82 3.02 3.5 2.87 1.12-.01 2.19-.66 2.77-1.61.19-.33.4-.67.41-1.06.1-1.79.06-3.57.07-5.36.01-4.03-.01-8.05.02-12.07z",fill:"#FFFFFF"})]})]}):r.includes("instagram")?l.jsxs("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"none",className:n,style:{display:"inline-block",verticalAlign:"middle"},children:[l.jsx("defs",{children:l.jsxs("linearGradient",{id:"instagram-gradient-new",x1:"0%",y1:"100%",x2:"100%",y2:"0%",children:[l.jsx("stop",{offset:"0%",stopColor:"#fdf497"}),l.jsx("stop",{offset:"5%",stopColor:"#fdf497"}),l.jsx("stop",{offset:"28%",stopColor:"#fd5949"}),l.jsx("stop",{offset:"75%",stopColor:"#d6249f"}),l.jsx("stop",{offset:"100%",stopColor:"#285AEB"})]})}),l.jsx("path",{d:"M12 0C8.74 0 8.333.015 7.053.072 5.775.132 4.905.333 4.14.63c-.789.306-1.459.717-2.126 1.384S.935 3.35.63 4.14C.333 4.905.131 5.775.072 7.053.012 8.333 0 8.74 0 12s.015 3.667.072 4.947c.06 1.277.261 2.148.558 2.913.306.788.717 1.459 1.384 2.126.667.666 1.336 1.079 2.126 1.384.766.296 1.636.499 2.913.558C8.333 23.988 8.74 24 12 24s3.667-.015 4.947-.072c1.277-.06 2.148-.262 2.913-.558.788-.306 1.459-.718 2.126-1.384.666-.667 1.079-1.335 1.384-2.126.296-.765.499-1.636.558-2.913.06-1.28.072-1.687.072-4.947s-.015-3.667-.072-4.947c-.06-1.277-.262-2.149-.558-2.913-.306-.789-.718-1.459-1.384-2.126C21.319 1.347 20.651.935 19.86.63c-.765-.297-1.636-.499-2.913-.558C15.667.012 15.26 0 12 0zm0 2.16c3.203 0 3.585.016 4.85.071 1.17.055 1.805.249 2.227.415.562.217.96.477 1.382.896.419.42.679.819.896 1.381.164.422.36 1.057.413 2.227.057 1.266.07 1.646.07 4.85s-.015 3.585-.074 4.85c-.061 1.17-.256 1.805-.421 2.227-.224.562-.479.96-.899 1.382-.419.419-.824.679-1.38.896-.42.164-1.065.36-2.235.413-1.274.057-1.649.07-4.859.07-3.211 0-3.586-.015-4.859-.074-1.171-.061-1.816-.256-2.236-.421-.569-.224-.96-.479-1.379-.899-.421-.419-.69-.824-.9-1.38-.165-.42-.359-1.065-.42-2.235-.045-1.26-.061-1.649-.061-4.844 0-3.196.016-3.586.061-4.861.061-1.17.255-1.814.42-2.234.21-.57.479-.96.9-1.381.419-.419.81-.689 1.379-.898.42-.166 1.051-.361 2.221-.421 1.275-.045 1.65-.06 4.859-.06l.045.03zm0 3.678c-3.405 0-6.162 2.76-6.162 6.162 0 3.405 2.76 6.162 6.162 6.162 3.405 0 6.162-2.76 6.162-6.162 0-3.405-2.76-6.162-6.162-6.162zM12 16c-2.21 0-4-1.79-4-4s1.79-4 4-4 4 1.79 4 4-1.79 4-4 4zm7.846-10.405c0 .795-.646 1.44-1.44 1.44-.795 0-1.44-.646-1.44-1.44 0-.794.646-1.439 1.44-1.439.793-.001 1.44.645 1.44 1.439z",fill:"url(#instagram-gradient-new)"})]}):r.includes("shopee")?l.jsx("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"#EE4D2D",className:n,style:{display:"inline-block",verticalAlign:"middle"},children:l.jsx("path",{d:"M15.9414 17.9633c.229-1.879-.981-3.077-4.1758-4.0969-1.548-.528-2.277-1.22-2.26-2.1719.065-1.056 1.048-1.825 2.352-1.85a5.2898 5.2898 0 0 1 2.8838.89c.116.072.197.06.263-.039.09-.145.315-.494.39-.62.051-.081.061-.187-.068-.281-.185-.1369-.704-.4149-.983-.5319a6.4697 6.4697 0 0 0-2.5118-.514c-1.909.008-3.4129 1.215-3.5389 2.826-.082 1.1629.494 2.1078 1.73 2.8278.262.152 1.6799.716 2.2438.892 1.774.552 2.695 1.5419 2.478 2.6969-.197 1.047-1.299 1.7239-2.818 1.7439-1.2039-.046-2.2878-.537-3.1278-1.19l-.141-.11c-.104-.08-.218-.075-.287.03-.05.077-.376.547-.458.67-.077.108-.035.168.045.234.35.293.817.613 1.134.775a6.7097 6.7097 0 0 0 2.8289.727 4.9048 4.9048 0 0 0 2.0759-.354c1.095-.465 1.8029-1.394 1.9449-2.554zM11.9986 1.4009c-2.068 0-3.7539 1.95-3.8329 4.3899h7.6657c-.08-2.44-1.765-4.3899-3.8328-4.3899zm7.8516 22.5981-.08.001-15.7843-.002c-1.074-.04-1.863-.91-1.971-1.991l-.01-.195L1.298 6.2858a.459.459 0 0 1 .45-.494h4.9748C6.8448 2.568 9.1607 0 11.9996 0c2.8388 0 5.1537 2.5689 5.2757 5.7898h4.9678a.459.459 0 0 1 .458.483l-.773 15.5883-.007.131c-.094 1.094-.979 1.9769-2.0709 2.0059z"})}):r.includes("telegram")?l.jsxs("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"none",className:n,style:{display:"inline-block",verticalAlign:"middle"},children:[l.jsx("circle",{cx:"12",cy:"12",r:"12",fill:"#2CA5E0"}),l.jsx("path",{d:"M5.4 11.6l12.7-4.9c.6-.2 1.1.1.9.8l-2.2 10.2c-.2.7-.6.9-1.2.5l-3.3-2.4-1.6 1.5c-.2.2-.3.3-.5.3l.2-3.4 6.2-5.6c.3-.2-.1-.4-.4-.2l-7.6 4.8-3.3-1c-.7-.2-.7-.7.1-.9z",fill:"#FFFFFF"})]}):r.includes("riot")||r.includes("valorant")||r.includes("league of legends")?l.jsx("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"#EB0029",className:n,style:{display:"inline-block",verticalAlign:"middle"},children:l.jsx("path",{d:"M13.458.86 0 7.093l3.353 12.761 2.552-.313-.701-8.024.838-.373 1.447 8.202 4.361-.535-.775-8.857.83-.37 1.591 9.025 4.412-.542-.849-9.708.84-.374 1.74 9.87L24 17.318V3.5Zm.316 19.356.222 1.256L24 23.14v-4.18l-10.22 1.256Z"})}):r.includes("vng")?l.jsxs("svg",{width:t,height:t,viewBox:"0 0 354.3 226.8",fill:"none",className:n,style:{display:"inline-block",verticalAlign:"middle"},children:[l.jsx("path",{d:"M37.9,103.7c1.3,4.7,2.7,9.3,4.2,14c0.5,1.7,0.5,2.4-1.2,3.4C26.5,129.5,13,142.1,0.5,155.8c-1,1.1-0.9,1.7,0.3,2.5c20,13.7,39.9,27.5,60,41.2c1.7,1.1,2.5,0.7,3.5-1.1c11.6-21,24.1-41.5,36.5-62.1c1.3-2.1,2.4-2.8,4.9-1.9c15.1,5.3,29.9,11.3,45.4,15.6c4,1.1,5.9-0.1,7-4.1c4.9-18.7,9.8-37.4,14.6-56.1c0.4-1.6,0.3-2.3-1.4-3C155.4,79.5,140,70.8,125.1,61c-1.3-0.8-2.2-0.8-3.4,0.3c-13.6,12.7-27.1,25.4-40.8,38C39.8,100.1,38.9,100.7,37.9,103.7",fill:"#EB5A26"}),l.jsx("path",{d:"M112.5,103.5c4-7.5,8-15,11.9-22.5c1.4-2.7,1-3.6-1.9-4.8c-26.6-11.2-53-22.7-79.6-33.8c-1.2-0.5-2.2-0.3-2.9,0.8C27.9,60,15.7,76.5,3.9,93.2c-0.6,0.9-0.5,1.7,0.3,2.3c21.8,15.5,43.6,30.9,65.6,46.2c0.8,0.5,1.7,0.5,2.5-0.2C85.5,129.3,98.7,116.3,112.5,103.5",fill:"#0E71BA"}),l.jsx("path",{d:"M211.7,137.9c-8.9,0-15.6-2.2-20.2-6.6c-4.6-4.4-6.9-11-6.9-19.8V64.6h17.9v45.5c0,9.3,4.4,13.9,13.3,13.9c8.9,0,13.3-4.6,13.3-13.9V64.6h17.9v46.9c0,8.8-2.3,15.4-6.9,19.8C225.8,135.7,219.5,137.9,211.7,137.9",fill:"#2C373E"}),l.jsx("path",{d:"M260.9,64.6h18.3c15.2,0,22.8,6.8,22.8,20.3v32.7c0,13.5-7.6,20.3-22.8,20.3h-18.3V64.6z M278.8,121.7c4.6,0,6.9-2.5,6.9-7.5V84.9c0-5-2.3-7.5-6.9-7.5h-0.1v44.3H278.8z",fill:"#2C373E"}),l.jsx("path",{d:"M328.7,103.7h18.5V120c0,12-6.5,18-19.6,18c-15,0-22.5-7.3-22.5-22v-31c0-14.7,7.5-22,22.5-22c14.9,0,22,6.9,21.3,20.8h-18.1c0-4.9-1-7.4-3.1-7.4c-3,0-4.5,2.9-4.5,8.6v31c0,5.7,1.5,8.6,4.5,8.6C326.6,113.6,328.4,110.3,328.7,103.7",fill:"#2C373E"})]}):r.includes("reddit")?l.jsx("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"#FF4500",className:n,style:{display:"inline-block",verticalAlign:"middle"},children:l.jsx("path",{d:"M12 0C5.373 0 0 5.373 0 12c0 3.314 1.343 6.314 3.515 8.485l-2.286 2.286C.775 23.225 1.097 24 1.738 24H12c6.627 0 12-5.373 12-12S18.627 0 12 0Zm4.388 3.199c1.104 0 1.999.895 1.999 1.999 0 1.105-.895 2-1.999 2-.946 0-1.739-.657-1.947-1.539v.002c-1.147.162-2.032 1.15-2.032 2.341v.007c1.776.067 3.4.567 4.686 1.363.473-.363 1.064-.58 1.707-.58 1.547 0 2.802 1.254 2.802 2.802 0 1.117-.655 2.081-1.601 2.531-.088 3.256-3.637 5.876-7.997 5.876-4.361 0-7.905-2.617-7.998-5.87-.954-.447-1.614-1.415-1.614-2.538 0-1.548 1.255-2.802 2.803-2.802.645 0 1.239.218 1.712.585 1.275-.79 2.881-1.291 4.64-1.365v-.01c0-1.663 1.263-3.034 2.88-3.207.188-.911.993-1.595 1.959-1.595Zm-8.085 8.376c-.784 0-1.459.78-1.506 1.797-.047 1.016.64 1.429 1.426 1.429.786 0 1.371-.369 1.418-1.385.047-1.017-.553-1.841-1.338-1.841Zm7.406 0c-.786 0-1.385.824-1.338 1.841.047 1.017.634 1.385 1.418 1.385.785 0 1.473-.413 1.426-1.429-.046-1.017-.721-1.797-1.506-1.797Zm-3.703 4.013c-.974 0-1.907.048-2.77.135-.147.015-.241.168-.183.305.483 1.154 1.622 1.964 2.953 1.964 1.33 0 2.47-.81 2.953-1.964.057-.137-.037-.29-.184-.305-.863-.087-1.795-.135-2.769-.135Z"})}):r.includes("steam")?l.jsx("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"#171A21",className:n,style:{display:"inline-block",verticalAlign:"middle"},children:l.jsx("path",{d:"M11.979 0C5.678 0 .511 4.86.022 11.037l6.432 2.658c.545-.371 1.203-.59 1.912-.59.063 0 .125.004.188.006l2.861-4.142V8.91c0-2.495 2.028-4.524 4.524-4.524 2.494 0 4.524 2.031 4.524 4.527s-2.03 4.525-4.524 4.525h-.105l-4.076 2.911c0 .052.004.105.004.159 0 1.875-1.515 3.396-3.39 3.396-1.635 0-3.016-1.173-3.331-2.727L.436 15.27C1.862 20.307 6.486 24 11.979 24c6.627 0 11.999-5.373 11.999-12S18.605 0 11.979 0zM7.54 18.21l-1.473-.61c.262.543.714.999 1.314 1.25 1.297.539 2.793-.076 3.332-1.375.263-.63.264-1.319.005-1.949s-.75-1.121-1.377-1.383c-.624-.26-1.29-.249-1.878-.03l1.523.63c.956.4 1.409 1.5 1.009 2.455-.397.957-1.497 1.41-2.454 1.012H7.54zm11.415-9.303c0-1.662-1.353-3.015-3.015-3.015-1.665 0-3.015 1.353-3.015 3.015 0 1.665 1.35 3.015 3.015 3.015 1.663 0 3.015-1.35 3.015-3.015zm-5.273-.005c0-1.252 1.013-2.266 2.265-2.266 1.249 0 2.266 1.014 2.266 2.266 0 1.251-1.017 2.265-2.266 2.265-1.253 0-2.265-1.014-2.265-2.265z"})}):r.includes("discord")?l.jsx("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"#5865F2",className:n,style:{display:"inline-block",verticalAlign:"middle"},children:l.jsx("path",{d:"M20.317 4.3698a19.7913 19.7913 0 00-4.8851-1.5152.0741.0741 0 00-.0785.0371c-.211.3753-.4447.8648-.6083 1.2495-1.8447-.2762-3.68-.2762-5.4868 0-.1636-.3933-.4058-.8742-.6177-1.2495a.077.077 0 00-.0785-.037 19.7363 19.7363 0 00-4.8852 1.515.0699.0699 0 00-.0321.0277C.5334 9.0458-.319 13.5799.0992 18.0578a.0824.0824 0 00.0312.0561c2.0528 1.5076 4.0413 2.4228 5.9929 3.0294a.0777.0777 0 00.0842-.0276c.4616-.6304.8731-1.2952 1.226-1.9942a.076.076 0 00-.0416-.1057c-.6528-.2476-1.2743-.5495-1.8722-.8923a.077.077 0 01-.0076-.1277c.1258-.0943.2517-.1923.3718-.2914a.0743.0743 0 01.0776-.0105c3.9278 1.7933 8.18 1.7933 12.0614 0a.0739.0739 0 01.0785.0095c.1202.099.246.1981.3728.2924a.077.077 0 01-.0066.1276 12.2986 12.2986 0 01-1.873.8914.0766.0766 0 00-.0407.1067c.3604.698.7719 1.3628 1.225 1.9932a.076.076 0 00.0842.0286c1.961-.6067 3.9495-1.5219 6.0023-3.0294a.077.077 0 00.0313-.0552c.5004-5.177-.8382-9.6739-3.5485-13.6604a.061.061 0 00-.0312-.0286zM8.02 15.3312c-1.1825 0-2.1569-1.0857-2.1569-2.419 0-1.3332.9555-2.4189 2.157-2.4189 1.2108 0 2.1757 1.0952 2.1568 2.419 0 1.3332-.9555 2.4189-2.1569 2.4189zm7.9748 0c-1.1825 0-2.1569-1.0857-2.1569-2.419 0-1.3332.9554-2.4189 2.1569-2.4189 1.2108 0 2.1757 1.0952 2.1568 2.419 0 1.3332-.946 2.4189-2.1568 2.4189Z"})}):l.jsx(dd,{size:t,className:n,style:{display:"inline-block",verticalAlign:"middle",color:"var(--text-accent)"}})},pf=({credentials:e,platforms:t,selectedPlatform:n,setSelectedPlatform:r,onlyFavorites:i,setOnlyFavorites:s,activeView:o,setActiveView:a})=>{const[c,d]=Ut.useState(!0);return l.jsx("aside",{className:"glass-panel scrollable",style:{padding:"20px",display:"flex",flexDirection:"column",gap:"20px",height:"100%",overflowY:"auto"},children:l.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"6px",flexGrow:1},children:[l.jsxs("button",{onClick:()=>{s(!1),r(null),a("vault")},style:{width:"100%",padding:"10px 14px",textAlign:"left",background:!i&&!n&&o==="vault"?"var(--bg-active-tab)":"transparent",border:"none",borderRadius:"8px",color:!i&&!n&&o==="vault"?"var(--text-accent)":"var(--text-primary)",fontWeight:!i&&!n&&o==="vault"?600:400,cursor:"pointer",transition:"var(--transition-smooth)"},children:["Tất cả tài khoản (",e.length,")"]}),l.jsxs("button",{onClick:()=>{s(!i),r(null),a("vault")},style:{width:"100%",padding:"10px 14px",textAlign:"left",background:i&&!n&&o==="vault"?"rgba(56, 239, 125, 0.1)":"transparent",border:"none",borderRadius:"8px",color:i&&!n&&o==="vault"?"var(--text-emerald)":"var(--text-primary)",fontWeight:i&&!n&&o==="vault"?600:400,cursor:"pointer",display:"flex",alignItems:"center",gap:"8px",transition:"var(--transition-smooth)"},children:[l.jsx(Po,{size:14,fill:i&&!n&&o==="vault"?"var(--text-emerald)":"none"}),"Yêu thích (",e.filter(x=>x.is_favorite).length,")"]}),l.jsxs("button",{onClick:()=>{a("proxy"),r(null),s(!1)},style:{width:"100%",padding:"10px 14px",textAlign:"left",background:o==="proxy"?"var(--bg-active-tab)":"transparent",border:"none",borderRadius:"8px",color:o==="proxy"?"var(--text-accent)":"var(--text-primary)",fontWeight:o==="proxy"?600:400,cursor:"pointer",display:"flex",alignItems:"center",gap:"8px",transition:"var(--transition-smooth)"},children:[l.jsx(Y1,{size:14,style:{color:o==="proxy"?"var(--text-accent)":"var(--text-secondary)"}}),"Kiểm tra Proxy"]}),l.jsxs("button",{onClick:()=>{a("proxy-list"),r(null),s(!1)},style:{width:"100%",padding:"10px 14px",textAlign:"left",background:o==="proxy-list"?"var(--bg-active-tab)":"transparent",border:"none",borderRadius:"8px",color:o==="proxy-list"?"var(--text-accent)":"var(--text-primary)",fontWeight:o==="proxy-list"?600:400,cursor:"pointer",display:"flex",alignItems:"center",gap:"8px",transition:"var(--transition-smooth)"},children:[l.jsx(sd,{size:14,style:{color:o==="proxy-list"?"var(--text-accent)":"var(--text-secondary)"}}),"Quản lý Proxy"]}),l.jsxs("button",{onClick:()=>d(!c),style:{display:"flex",justifyContent:"space-between",alignItems:"center",width:"100%",padding:"10px 14px",background:"transparent",border:"none",color:"var(--text-primary)",cursor:"pointer",textAlign:"left",fontWeight:500,transition:"var(--transition-smooth)",borderRadius:"8px",marginBottom:"4px"},onMouseEnter:x=>{x.currentTarget.style.background="rgba(255, 255, 255, 0.03)"},onMouseLeave:x=>{x.currentTarget.style.background="transparent"},children:[l.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"10px"},children:[l.jsx(Vl,{size:16,style:{color:"var(--text-secondary)"}}),l.jsx("span",{children:"Nền tảng"})]}),c?l.jsx(Fr,{size:14,style:{color:"var(--text-secondary)"}}):l.jsx(nd,{size:14,style:{color:"var(--text-secondary)"}})]}),c&&l.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"4px",paddingLeft:"8px"},children:[t.filter(x=>x.is_active).map(x=>{const y=e.filter(g=>g.platform_id===x.id).length;return l.jsxs("button",{onClick:()=>{r(x.id),s(!1),a("vault")},style:{width:"100%",padding:"8px 14px",textAlign:"left",background:n===x.id&&o==="vault"?"var(--bg-active-tab)":"transparent",border:"none",borderRadius:"8px",color:n===x.id&&o==="vault"?"var(--text-accent)":"var(--text-primary)",fontWeight:n===x.id&&o==="vault"?600:400,cursor:"pointer",display:"flex",justifyContent:"space-between",alignItems:"center",transition:"var(--transition-smooth)"},children:[l.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[l.jsx(oi,{name:x.icon,size:14}),l.jsx("span",{children:x.name})]}),l.jsx("span",{style:{fontSize:"11px",color:"var(--text-muted)"},children:y})]},x.id)}),t.filter(x=>x.is_active).length===0&&l.jsx("span",{style:{fontSize:"12px",color:"var(--text-muted)",paddingLeft:"14px",fontStyle:"italic"},children:"Không có nền tảng active"})]}),l.jsx("hr",{style:{border:"none",borderTop:"1px solid rgba(255,255,255,0.05)",marginTop:"auto",marginBottom:"8px"}}),l.jsxs("button",{onClick:()=>a("settings"),style:{width:"100%",padding:"10px 14px",textAlign:"left",background:o==="settings"?"var(--bg-active-tab)":"transparent",border:"none",borderRadius:"8px",color:o==="settings"?"var(--text-accent)":"var(--text-primary)",fontWeight:o==="settings"?600:400,cursor:"pointer",display:"flex",alignItems:"center",gap:"10px",transition:"var(--transition-smooth)"},children:[l.jsx(af,{size:16}),l.jsx("span",{children:"Cài đặt"})]})]})})},ff=({cred:e,platforms:t,totp:n,onToggleFavorite:r,onEdit:i,onDelete:s})=>{const[o,a]=C.useState(!1),[c,d]=C.useState(!1),[x,y]=C.useState(null),g=(w,z)=>{navigator.clipboard.writeText(w),y(z),setTimeout(()=>{y(null)},2e3)},k=e.platform_id?t.find(w=>w.id===e.platform_id):null,S=(n==null?void 0:n.remaining)??0,m=7,N=2*Math.PI*m,p=N*(1-S/30),u=S<=5,f=u?"#ef4444":"var(--text-emerald)",j=u?"#ef4444":"var(--text-secondary)",v=()=>{var z;(z=window.getSelection())!=null&&z.toString()||a(!o)};return l.jsxs("div",{className:"glass-panel animate-fade-in",onClick:v,style:{padding:"20px",display:"flex",flexDirection:"column",gap:o?"16px":"8px",cursor:"pointer"},children:[l.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[l.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[k&&l.jsx(oi,{name:k.icon,size:18}),l.jsxs("div",{style:{display:"flex",flexDirection:"column"},children:[l.jsx("h3",{style:{fontSize:"15px",fontWeight:600,color:"var(--text-primary)"},children:k?k.name:e.title||"Tài khoản"}),l.jsx("div",{style:{display:"flex",flexDirection:"column",gap:"2px",marginTop:"2px"},children:(e.email||!k&&e.title)&&l.jsxs("span",{style:{fontSize:"12px",color:"var(--text-secondary)"},children:["Email: ",e.email||e.title]})})]})]}),l.jsxs("div",{style:{display:"flex",gap:"8px",alignItems:"center"},children:[l.jsx("button",{onClick:w=>{w.stopPropagation(),r()},style:{background:"none",border:"none",color:e.is_favorite?"var(--text-emerald)":"var(--text-muted)",cursor:"pointer"},title:e.is_favorite?"Bỏ yêu thích":"Yêu thích",children:l.jsx(Po,{size:16,fill:e.is_favorite?"var(--text-emerald)":"none"})}),l.jsx("button",{onClick:w=>{w.stopPropagation(),i()},style:{background:"none",border:"none",color:"var(--text-secondary)",cursor:"pointer"},title:"Sửa tài khoản",children:l.jsx(pd,{size:16})}),l.jsx("button",{onClick:w=>{w.stopPropagation(),s()},style:{background:"none",border:"none",color:"#ff4b2b",cursor:"pointer"},title:"Xóa tài khoản",children:l.jsx(un,{size:16})}),l.jsx("button",{onClick:w=>{w.stopPropagation(),a(!o)},style:{background:"none",border:"none",color:"var(--text-secondary)",cursor:"pointer",display:"flex",alignItems:"center"},title:o?"Thu gọn":"Mở rộng",children:o?l.jsx(Z1,{size:16}):l.jsx(Fr,{size:16})})]})]}),(o||e.totp_secret)&&l.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"10px"},children:[o&&e.uid&&l.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[l.jsx("span",{style:{fontSize:"13px",color:"var(--text-secondary)"},children:"UID:"}),l.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"6px"},children:[l.jsx("span",{style:{fontSize:"13px",fontWeight:500,fontFamily:"monospace"},children:e.uid}),l.jsx("button",{className:"btn btn-secondary",style:{padding:"4px",borderRadius:"4px"},onClick:w=>{w.stopPropagation(),g(e.uid||"","uid")},title:"Sao chép UID",children:x==="uid"?l.jsx(tr,{size:12,style:{color:"var(--text-emerald)"}}):l.jsx(Zt,{size:12})})]})]}),o&&e.username&&l.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[l.jsx("span",{style:{fontSize:"13px",color:"var(--text-secondary)"},children:"Username:"}),l.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"6px"},children:[l.jsx("span",{style:{fontSize:"13px",fontWeight:500},children:e.username}),l.jsx("button",{className:"btn btn-secondary",style:{padding:"4px",borderRadius:"4px"},onClick:w=>{w.stopPropagation(),g(e.username,"username")},title:"Sao chép tài khoản",children:x==="username"?l.jsx(tr,{size:12,style:{color:"var(--text-emerald)"}}):l.jsx(Zt,{size:12})})]})]}),o&&e.password&&l.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[l.jsx("span",{style:{fontSize:"13px",color:"var(--text-secondary)"},children:"Mật khẩu:"}),l.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"6px"},children:[l.jsx("span",{style:{fontSize:"13px",fontFamily:"monospace"},children:c?e.password:"••••••••"}),l.jsx("button",{className:"btn btn-secondary",style:{padding:"4px",borderRadius:"4px"},onClick:w=>{w.stopPropagation(),d(!c)},title:c?"Ẩn mật khẩu":"Hiển thị mật khẩu",children:c?l.jsx(_n,{size:12}):l.jsx(Ln,{size:12})}),l.jsx("button",{className:"btn btn-secondary",style:{padding:"4px",borderRadius:"4px"},onClick:w=>{w.stopPropagation(),g(e.password,"password")},title:"Sao chép mật khẩu",children:x==="password"?l.jsx(tr,{size:12,style:{color:"var(--text-emerald)"}}):l.jsx(Zt,{size:12})})]})]}),e.totp_secret&&l.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginTop:"4px"},children:[l.jsx("span",{style:{fontSize:"13px",color:"var(--text-accent)",fontWeight:500},children:"Mã 2FA (OTP):"}),l.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[l.jsx("span",{className:"otp-display",style:{fontSize:"15px",padding:"4px 8px"},children:(n==null?void 0:n.token)||"------"}),l.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"6px",minWidth:"55px",justifyContent:"flex-start"},children:[l.jsxs("svg",{width:"18",height:"18",viewBox:"0 0 20 20",style:{transform:"rotate(-90deg)",flexShrink:0},children:[l.jsx("circle",{cx:"10",cy:"10",r:m,fill:"none",stroke:"var(--border-color)",strokeWidth:"2.5"}),S>0&&l.jsx("circle",{cx:"10",cy:"10",r:m,fill:"none",stroke:f,strokeWidth:"2.5",strokeDasharray:N,strokeDashoffset:p,style:{transition:"stroke-dashoffset 1s linear, stroke 0.3s"}})]}),l.jsxs("span",{style:{fontSize:"12px",fontWeight:600,color:j,minWidth:"22px"},children:[S,"s"]})]}),l.jsx("button",{className:"btn btn-secondary",style:{padding:"4px",borderRadius:"4px"},onClick:w=>{w.stopPropagation(),g((n==null?void 0:n.token)||"","otp")},title:"Sao chép mã OTP",children:x==="otp"?l.jsx(tr,{size:12,style:{color:"var(--text-emerald)"}}):l.jsx(Zt,{size:12})})]})]}),o&&e.url&&l.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[l.jsx("span",{style:{fontSize:"13px",color:"var(--text-secondary)"},children:"Link:"}),l.jsxs("a",{href:e.url.startsWith("http")?e.url:`https://${e.url}`,target:"_blank",rel:"noreferrer",onClick:w=>{w.stopPropagation()},style:{fontSize:"13px",color:"var(--text-accent)",display:"flex",alignItems:"center",gap:"4px",textDecoration:"none"},children:["Truy cập website",l.jsx(zo,{size:12})]})]})]}),o&&e.custom_fields&&e.custom_fields.length>0&&l.jsx("div",{style:{display:"flex",flexDirection:"column",gap:"6px",borderTop:"1px solid rgba(255,255,255,0.05)",paddingTop:"10px"},children:e.custom_fields.map((w,z)=>l.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[l.jsxs("span",{style:{fontSize:"12px",color:"var(--text-muted)"},children:[w.key,":"]}),l.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"6px"},children:[l.jsx("span",{style:{fontSize:"12px",fontWeight:500},children:w.value}),l.jsx("button",{className:"btn btn-secondary",style:{padding:"2px 4px",borderRadius:"3px"},onClick:T=>{T.stopPropagation(),g(w.value,`custom_${z}`)},title:`Sao chép ${w.key}`,children:x===`custom_${z}`?l.jsx(tr,{size:10,style:{color:"var(--text-emerald)"}}):l.jsx(Zt,{size:10})})]})]},z))}),o&&e.notes&&l.jsx("p",{style:{fontSize:"12px",color:"var(--text-muted)",borderTop:"1px solid rgba(255,255,255,0.05)",paddingTop:"10px",fontStyle:"italic"},children:e.notes})]})},hf=({cred:e,platforms:t,totp:n,visibleColumns:r,isSelected:i,onToggleSelect:s,onToggleFavorite:o,onEdit:a,onDelete:c})=>{const[d,x]=C.useState(!1),[y,g]=C.useState(!1),[k,S]=C.useState(!1),[m,N]=C.useState(null),[p,u]=C.useState(!1),f=(M,F)=>{navigator.clipboard.writeText(M),N(F),setTimeout(()=>N(null),2e3)},j=()=>{navigator.clipboard.writeText(e.id),u(!0),setTimeout(()=>u(!1),2e3)},v=M=>{if(!e.custom_fields)return"";const F=M.toLowerCase().trim(),H=e.custom_fields.find(K=>{const h=K.key.toLowerCase().trim();return F==="mail kp"?h==="mail kp"||h==="mailkp"||h==="email kp"||h==="emailkp"||h.includes("khôi phục")||h.includes("recovery"):F==="sđt"?h==="sđt"||h==="sdt"||h==="phone"||h==="sđt khôi phục"||h.includes("điện thoại")||h==="phone number":F==="backup code"?h==="backup code"||h==="backupcode"||h.includes("backup")||h.includes("mã dự phòng")||h.includes("mã cứu hộ")||h.includes("dự phòng"):F==="pass mail"?h==="pass mail"||h==="passmail"||h==="mật khẩu mail"||h==="mật khẩu email"||h==="pass email"||h==="passemail"||h.includes("mật khẩu email")||h.includes("pass mail"):h===F});return H?H.value:""},w=e.platform_id?t.find(M=>M.id===e.platform_id):null,z=(n==null?void 0:n.remaining)??0,T=7,D=2*Math.PI*T,L=D*(1-z/30),Z=z<=5,U=Z?"#ef4444":"var(--text-emerald)",P=Z?"#ef4444":"var(--text-secondary)",X=v("mail kp"),re=v("sđt"),A=v("backup code"),W=v("pass mail"),b=e.totp_secret;return l.jsxs("tr",{style:{background:i?"var(--bg-active-tab)":void 0,transition:"var(--transition-smooth)"},children:[l.jsx("td",{style:{width:"40px",textAlign:"center"},children:l.jsx("input",{type:"checkbox",checked:i,onChange:()=>s(e.id),style:{cursor:"pointer",accentColor:"var(--text-accent)"}})}),r.id&&l.jsx("td",{children:l.jsx("div",{style:{cursor:"pointer",display:"inline-flex",alignItems:"center",gap:"6px"},onClick:j,title:"Click để sao chép ID đầy đủ",children:p?l.jsx("span",{style:{fontSize:"12px",color:"var(--text-emerald)",fontWeight:500,fontFamily:"monospace"},children:"Đã sao chép!"}):l.jsx("span",{style:{fontSize:"12px",fontFamily:"monospace",color:"var(--text-secondary)"},children:e.id.substring(0,8)})})}),l.jsx("td",{children:l.jsx("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:w?l.jsxs(l.Fragment,{children:[l.jsx(oi,{name:w.icon,size:18}),l.jsx("span",{style:{fontSize:"13px"},children:w.name})]}):l.jsx("span",{style:{color:"var(--text-muted)",fontSize:"13px"},children:"—"})})}),l.jsx("td",{children:l.jsx("span",{style:{fontWeight:600},children:e.email||e.title||"—"})}),r.username&&l.jsx("td",{children:e.username?l.jsx("div",{style:{cursor:"pointer",display:"inline-flex",alignItems:"center",gap:"6px"},onClick:()=>f(e.username,"username"),title:"Click để sao chép Username",children:m==="username"?l.jsx("span",{style:{fontSize:"13px",color:"var(--text-emerald)",fontWeight:500},children:"Đã sao chép!"}):l.jsx("span",{style:{fontSize:"13px"},children:e.username})}):l.jsx("span",{style:{color:"var(--text-muted)",fontSize:"13px"},children:"—"})}),r.uid&&l.jsx("td",{children:e.uid?l.jsx("div",{style:{cursor:"pointer",display:"inline-flex",alignItems:"center",gap:"6px"},onClick:()=>f(e.uid||"","uid"),title:"Click để sao chép UID",children:m==="uid"?l.jsx("span",{style:{fontSize:"13px",color:"var(--text-emerald)",fontWeight:500},children:"Đã sao chép!"}):l.jsx("span",{style:{fontSize:"13px",fontFamily:"monospace"},children:e.uid})}):l.jsx("span",{style:{color:"var(--text-muted)",fontSize:"13px"},children:"—"})}),r.password&&l.jsx("td",{children:e.password?l.jsxs("div",{style:{display:"inline-flex",alignItems:"center",gap:"6px"},children:[l.jsx("span",{onClick:()=>f(e.password,"password"),style:{fontSize:"13px",fontFamily:"monospace",cursor:"pointer"},title:"Click để sao chép mật khẩu",children:m==="password"?l.jsx("span",{style:{color:"var(--text-emerald)",fontWeight:500,fontFamily:"var(--font-sans)"},children:"Đã sao chép!"}):d?e.password:"••••••••"}),l.jsx("button",{className:"btn btn-secondary",style:{padding:"3px",borderRadius:"4px"},onClick:()=>x(!d),title:d?"Ẩn mật khẩu":"Hiển thị mật khẩu",children:d?l.jsx(_n,{size:11}):l.jsx(Ln,{size:11})})]}):l.jsx("span",{style:{color:"var(--text-muted)",fontSize:"13px"},children:"—"})}),r.otp&&l.jsx("td",{children:e.totp_secret?l.jsx("div",{style:{display:"inline-flex",alignItems:"center",gap:"8px",cursor:"pointer"},onClick:()=>f((n==null?void 0:n.token)||"","otp"),title:"Click để sao chép OTP",children:m==="otp"?l.jsx("span",{style:{fontSize:"14px",color:"var(--text-emerald)",fontWeight:500},children:"Đã sao chép!"}):l.jsxs(l.Fragment,{children:[l.jsx("span",{style:{fontSize:"14px",fontWeight:"bold",color:"var(--text-accent)"},children:(n==null?void 0:n.token)||"------"}),l.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"4px"},children:[l.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 20 20",style:{transform:"rotate(-90deg)",flexShrink:0},children:[l.jsx("circle",{cx:"10",cy:"10",r:T,fill:"none",stroke:"var(--border-color)",strokeWidth:"2.5"}),z>0&&l.jsx("circle",{cx:"10",cy:"10",r:T,fill:"none",stroke:U,strokeWidth:"2.5",strokeDasharray:D,strokeDashoffset:L,style:{transition:"stroke-dashoffset 1s linear, stroke 0.3s"}})]}),l.jsxs("span",{style:{fontSize:"11px",fontWeight:600,color:P},children:[z,"s"]})]})]})}):l.jsx("span",{style:{color:"var(--text-muted)",fontSize:"13px"},children:"—"})}),r.mailKp&&l.jsx("td",{children:X?l.jsx("div",{style:{cursor:"pointer",display:"inline-flex",alignItems:"center",gap:"6px"},onClick:()=>f(X,"mailKp"),title:"Click để sao chép Mail KP",children:m==="mailKp"?l.jsx("span",{style:{fontSize:"13px",color:"var(--text-emerald)",fontWeight:500},children:"Đã sao chép!"}):l.jsx("span",{style:{fontSize:"13px"},children:X})}):l.jsx("span",{style:{color:"var(--text-muted)",fontSize:"13px"},children:"—"})}),r.phone&&l.jsx("td",{children:re?l.jsx("div",{style:{cursor:"pointer",display:"inline-flex",alignItems:"center",gap:"6px"},onClick:()=>f(re,"phone"),title:"Click để sao chép SĐT",children:m==="phone"?l.jsx("span",{style:{fontSize:"13px",color:"var(--text-emerald)",fontWeight:500},children:"Đã sao chép!"}):l.jsx("span",{style:{fontSize:"13px"},children:re})}):l.jsx("span",{style:{color:"var(--text-muted)",fontSize:"13px"},children:"—"})}),r.backupCode&&l.jsx("td",{children:A?l.jsx("div",{style:{cursor:"pointer",display:"inline-flex",alignItems:"center",gap:"6px"},onClick:()=>f(A,"backupCode"),title:"Click để sao chép Backup Code",children:m==="backupCode"?l.jsx("span",{style:{fontSize:"13px",color:"var(--text-emerald)",fontWeight:500},children:"Đã sao chép!"}):l.jsx("span",{style:{fontSize:"13px",fontFamily:"monospace"},children:A})}):l.jsx("span",{style:{color:"var(--text-muted)",fontSize:"13px"},children:"—"})}),r.passMail&&l.jsx("td",{children:W?l.jsxs("div",{style:{display:"inline-flex",alignItems:"center",gap:"6px"},children:[l.jsx("span",{onClick:()=>f(W,"passMail"),style:{fontSize:"13px",fontFamily:"monospace",cursor:"pointer"},title:"Click để sao chép Mật khẩu Email",children:m==="passMail"?l.jsx("span",{style:{color:"var(--text-emerald)",fontWeight:500,fontFamily:"var(--font-sans)"},children:"Đã sao chép!"}):k?W:"••••••••"}),l.jsx("button",{className:"btn btn-secondary",style:{padding:"3px",borderRadius:"4px"},onClick:M=>{M.stopPropagation(),S(!k)},title:k?"Ẩn mật khẩu":"Hiển thị mật khẩu",children:k?l.jsx(_n,{size:11}):l.jsx(Ln,{size:11})})]}):l.jsx("span",{style:{color:"var(--text-muted)",fontSize:"13px"},children:"—"})}),r.secretKey&&l.jsx("td",{children:b?l.jsxs("div",{style:{display:"inline-flex",alignItems:"center",gap:"6px"},children:[l.jsx("span",{onClick:()=>f(b,"secretKey"),style:{fontSize:"13px",fontFamily:"monospace",cursor:"pointer"},title:"Click để sao chép Secret Key",children:m==="secretKey"?l.jsx("span",{style:{color:"var(--text-emerald)",fontWeight:500,fontFamily:"var(--font-sans)"},children:"Đã sao chép!"}):y?b:"••••••••"}),l.jsx("button",{className:"btn btn-secondary",style:{padding:"3px",borderRadius:"4px"},onClick:()=>g(!y),title:y?"Ẩn Secret Key":"Hiển thị Secret Key",children:y?l.jsx(_n,{size:11}):l.jsx(Ln,{size:11})})]}):l.jsx("span",{style:{color:"var(--text-muted)",fontSize:"13px"},children:"—"})}),r.url&&l.jsx("td",{children:e.url?l.jsxs("a",{href:e.url.startsWith("http")?e.url:`https://${e.url}`,target:"_blank",rel:"noreferrer",style:{fontSize:"13px",color:"var(--text-accent)",display:"inline-flex",alignItems:"center",gap:"4px",textDecoration:"none"},children:["Link ",l.jsx(zo,{size:12})]}):l.jsx("span",{style:{color:"var(--text-muted)",fontSize:"13px"},children:"—"})}),l.jsx("td",{children:l.jsxs("div",{style:{display:"flex",gap:"8px",alignItems:"center"},children:[l.jsx("button",{onClick:()=>o(e),style:{background:"none",border:"none",color:e.is_favorite?"var(--text-emerald)":"var(--text-muted)",cursor:"pointer"},title:e.is_favorite?"Bỏ yêu thích":"Yêu thích",children:l.jsx(Po,{size:15,fill:e.is_favorite?"var(--text-emerald)":"none"})}),l.jsx("button",{onClick:()=>a(e),style:{background:"none",border:"none",color:"var(--text-secondary)",cursor:"pointer"},title:"Sửa tài khoản",children:l.jsx(pd,{size:15})}),l.jsx("button",{onClick:()=>c(e.id),style:{background:"none",border:"none",color:"#ff4b2b",cursor:"pointer"},title:"Xóa tài khoản",children:l.jsx(un,{size:15})})]})})]})},xf=Ut.memo(hf),gf=({credentials:e,platforms:t,totps:n,visibleColumns:r,selectedIds:i,onToggleSelect:s,onToggleSelectAll:o,onToggleFavorite:a,onEdit:c,onDelete:d})=>{const x=Ut.useRef(null),y=e.length>0&&i.size===e.length,g=i.size>0&&i.size<e.length;return Ut.useEffect(()=>{x.current&&(x.current.indeterminate=g)},[g]),l.jsx("div",{className:"table-container animate-fade-in",children:l.jsxs("table",{className:"enterprise-table",children:[l.jsx("thead",{children:l.jsxs("tr",{children:[l.jsx("th",{style:{width:"40px",textAlign:"center"},children:l.jsx("input",{ref:x,type:"checkbox",checked:y,onChange:o,style:{cursor:"pointer",accentColor:"var(--text-accent)"}})}),r.id&&l.jsx("th",{style:{minWidth:"90px"},children:"ID"}),l.jsx("th",{style:{minWidth:"120px"},children:"Nền tảng"}),l.jsx("th",{style:{minWidth:"140px"},children:"Email"}),r.username&&l.jsx("th",{style:{minWidth:"160px"},children:"Username"}),r.uid&&l.jsx("th",{style:{minWidth:"120px"},children:"UID"}),r.password&&l.jsx("th",{style:{minWidth:"140px"},children:"Mật khẩu"}),r.otp&&l.jsx("th",{style:{minWidth:"140px"},children:"Mã 2FA (OTP)"}),r.mailKp&&l.jsx("th",{style:{minWidth:"160px"},children:"Mail KP"}),r.phone&&l.jsx("th",{style:{minWidth:"110px"},children:"SĐT"}),r.backupCode&&l.jsx("th",{style:{minWidth:"160px"},children:"Backup Code"}),r.passMail&&l.jsx("th",{style:{minWidth:"140px"},children:"Pass Mail"}),r.secretKey&&l.jsx("th",{style:{minWidth:"160px"},children:"Secret Key"}),r.url&&l.jsx("th",{style:{minWidth:"90px"},children:"Liên kết"}),l.jsx("th",{style:{width:"100px",minWidth:"100px"},children:"Thao tác"})]})}),l.jsx("tbody",{children:e.map(k=>l.jsx(xf,{cred:k,platforms:t,totp:n[k.id],visibleColumns:r,isSelected:i.has(k.id),onToggleSelect:s,onToggleFavorite:a,onEdit:c,onDelete:d},k.id))})]})})},xd=({value:e,onChange:t,options:n,placeholder:r="Chọn...",disabled:i=!1,searchable:s=!0})=>{const[o,a]=C.useState(!1),[c,d]=C.useState(""),x=C.useRef(null),y=C.useRef(null),g=n.find(S=>S.value===e);C.useEffect(()=>{const S=m=>{x.current&&!x.current.contains(m.target)&&a(!1)};return document.addEventListener("mousedown",S),()=>document.removeEventListener("mousedown",S)},[]),C.useEffect(()=>{o&&s&&y.current&&(d(""),setTimeout(()=>{var S;(S=y.current)==null||S.focus()},50))},[o,s]);const k=n.filter(S=>S.label.toLowerCase().includes(c.toLowerCase()));return l.jsxs("div",{ref:x,style:{position:"relative",width:"100%"},children:[l.jsxs("button",{type:"button",onClick:()=>!i&&a(!o),className:"form-input",style:{display:"flex",alignItems:"center",justifyContent:"space-between",cursor:i?"not-allowed":"pointer",textAlign:"left",opacity:i?.6:1,paddingRight:"12px",width:"100%",background:"var(--bg-input)",borderColor:o?"var(--text-accent)":"var(--border-input)",boxShadow:o?"var(--glow-accent)":"none",transition:"var(--transition-smooth)",height:"42px",borderRadius:"8px"},disabled:i,children:[l.jsx("span",{style:{color:g?"var(--text-primary)":"var(--text-muted)"},children:g?g.label:r}),l.jsx(Fr,{size:16,style:{color:"var(--text-accent)",transform:o?"rotate(180deg)":"none",transition:"var(--transition-smooth)"}})]}),o&&l.jsxs("div",{className:"glass-panel",style:{position:"absolute",top:"calc(100% + 8px)",left:0,width:"100%",maxHeight:"300px",display:"flex",flexDirection:"column",zIndex:1e3,boxShadow:"0 15px 30px rgba(0, 0, 0, 0.4), var(--glow-accent)",background:"var(--bg-modal)",border:"1px solid var(--text-accent)",borderRadius:"12px",padding:"8px",overflow:"hidden"},children:[s&&n.length>5&&l.jsxs("div",{style:{position:"relative",marginBottom:"8px",flexShrink:0},children:[l.jsx(si,{size:14,style:{position:"absolute",left:"10px",top:"50%",transform:"translateY(-50%)",color:"var(--text-muted)"}}),l.jsx("input",{ref:y,type:"text",className:"form-input",placeholder:"Tìm kiếm nhanh...",value:c,onChange:S=>d(S.target.value),style:{width:"100%",padding:"6px 30px 6px 30px",fontSize:"13px",borderRadius:"6px",background:"rgba(0, 0, 0, 0.2)",height:"32px",borderColor:"var(--border-color)"}}),c&&l.jsx("button",{type:"button",onClick:()=>d(""),style:{position:"absolute",right:"10px",top:"50%",transform:"translateY(-50%)",background:"none",border:"none",color:"var(--text-muted)",cursor:"pointer",display:"flex",alignItems:"center",padding:0},children:l.jsx($n,{size:14})})]}),l.jsx("div",{className:"scrollable",style:{overflowY:"auto",display:"flex",flexDirection:"column",gap:"4px",flexGrow:1},children:k.length===0?l.jsx("div",{style:{padding:"12px",fontSize:"13px",color:"var(--text-muted)",textAlign:"center"},children:"Không tìm thấy kết quả"}):k.map(S=>{const m=S.value===e;return l.jsx("button",{type:"button",className:"dropdown-item",onClick:()=>{t(S.value),a(!1)},style:{display:"block",width:"100%",padding:"10px 12px",borderRadius:"8px",border:"none",background:m?"var(--bg-active-tab)":"transparent",color:m?"var(--text-accent)":"var(--text-primary)",fontWeight:m?600:400,cursor:"pointer",textAlign:"left",fontSize:"13px"},children:S.label},S.value)})})]})]})},yf={facebook:["Pass Mail","Mail KP","Pass Mail KP","SĐT","Cookie","Token","Backup Code"],tiktok:["Email","Pass Mail","SĐT","Cookie","Backup Code"],twitter:["Email","Pass Mail","Auth Token","Backup Code"],instagram:["Email","Pass Mail","Cookie","Backup Code"],google:["Mail KP","Pass Mail KP","SĐT","Pass Mail","Backup Code"],outlook:["Mail KP","SĐT","Client ID","Refresh Token","Pass Mail","Backup Code"],telegram:["API ID","API Hash","Session String"],discord:["Email","Token","Backup Code","Pass Mail"],reddit:["Email","Pass Mail","Cookie","Backup Code"]},mf=({isOpen:e,onClose:t,credential:n,onChange:r,onSave:i,platforms:s})=>{var S;if(!e)return null;const o=n.platform_id||"",a=yf[o]||[],c=(n.custom_fields||[]).filter(m=>!a.some(N=>N.toLowerCase().trim()===m.key.toLowerCase().trim())),d=(m,N)=>{const p=[...n.custom_fields||[]],u=p.findIndex(f=>f.key.toLowerCase().trim()===m.toLowerCase().trim());u>=0?p[u]={...p[u],value:N}:p.push({key:m,value:N}),r({...n,custom_fields:p})},x=m=>{var p;const N=(p=n.custom_fields)==null?void 0:p.find(u=>u.key.toLowerCase().trim()===m.toLowerCase().trim());return N?N.value:""},y=()=>{const m=[...n.custom_fields||[]];m.push({key:"",value:""}),r({...n,custom_fields:m})},g=(m,N,p)=>{const u=c[m],f=[...n.custom_fields||[]],j=f.findIndex(v=>v===u);j>=0&&(f[j]={...f[j],[N]:p},r({...n,custom_fields:f}))},k=m=>{const N=c[m],p=(n.custom_fields||[]).filter(u=>u!==N);r({...n,custom_fields:p})};return l.jsx("div",{style:{position:"fixed",top:0,left:0,right:0,bottom:0,background:"var(--modal-backdrop)",backdropFilter:"blur(8px)",display:"flex",alignItems:"center",justifyContent:"center",zIndex:100},children:l.jsxs("form",{onSubmit:i,className:"glass-panel animate-fade-in scrollable",style:{width:"100%",maxWidth:"620px",padding:"30px",display:"flex",flexDirection:"column",gap:"16px",maxHeight:"90vh",overflowY:"auto",background:"var(--bg-modal)"},children:[l.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[l.jsx("h3",{style:{fontSize:"18px",fontWeight:600},children:n.id?"Sửa tài khoản":"Thêm tài khoản mới"}),l.jsx("button",{type:"button",onClick:t,style:{background:"none",border:"none",color:"var(--text-secondary)",cursor:"pointer"},children:l.jsx($n,{size:20})})]}),l.jsxs("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:"16px"},children:[l.jsxs("div",{className:"form-group",children:[l.jsx("label",{className:"form-label",children:"Tên đăng nhập"}),l.jsx("input",{type:"text",className:"form-input",placeholder:"Nhập username...",value:n.username||"",onChange:m=>r({...n,username:m.target.value})})]}),l.jsxs("div",{className:"form-group",children:[l.jsx("label",{className:"form-label",children:"Email"}),l.jsx("input",{type:"text",className:"form-input",placeholder:"Nhập địa chỉ email...",value:n.email||"",onChange:m=>r({...n,email:m.target.value})})]}),l.jsxs("div",{className:"form-group",children:[l.jsx("label",{className:"form-label",children:"UID"}),l.jsx("input",{type:"text",className:"form-input",placeholder:"UID tài khoản...",value:n.uid||"",onChange:m=>r({...n,uid:m.target.value})})]}),l.jsxs("div",{className:"form-group",children:[l.jsx("label",{className:"form-label",children:"Mật khẩu"}),l.jsx("input",{type:"text",className:"form-input",placeholder:"Nhập mật khẩu...",value:n.password||"",onChange:m=>r({...n,password:m.target.value})})]})]}),l.jsxs("div",{className:"form-group",children:[l.jsx("label",{className:"form-label",children:"Đường dẫn Website"}),l.jsx("input",{type:"text",className:"form-input",placeholder:"https://example.com...",value:n.url||"",onChange:m=>r({...n,url:m.target.value})})]}),l.jsxs("div",{className:"form-group",children:[l.jsx("label",{className:"form-label",children:"Nền tảng (Platform)"}),l.jsx(xd,{value:n.platform_id||"",onChange:m=>r({...n,platform_id:m}),options:s.map(m=>({value:m.id,label:m.name})),placeholder:"Không chọn..."})]}),l.jsxs("div",{className:"form-group",children:[l.jsx("label",{className:"form-label",children:"Khóa bí mật 2FA (TOTP Secret Key)"}),l.jsx("input",{type:"text",className:"form-input",placeholder:"Nhập mã bí mật Base32 (ví dụ: JBSWY3DPEHPK3PXP)...",value:n.totp_secret||"",onChange:m=>r({...n,totp_secret:m.target.value})})]}),a.length>0&&l.jsxs("div",{className:"form-group",children:[l.jsxs("label",{className:"form-label",style:{fontWeight:600,color:"var(--text-accent)"},children:["Thông tin bổ sung (",(S=s.find(m=>m.id===o))==null?void 0:S.name,")"]}),l.jsx("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:"12px",background:"rgba(255, 255, 255, 0.02)",padding:"14px",borderRadius:"8px",border:"1px solid var(--border-color)"},children:a.map(m=>l.jsxs("div",{className:"form-group",style:{marginBottom:0},children:[l.jsx("label",{className:"form-label",style:{fontSize:"12px"},children:m}),l.jsx("input",{type:"text",className:"form-input",placeholder:`Nhập ${m.toLowerCase()}...`,value:x(m),onChange:N=>d(m,N.target.value)})]},m))})]}),l.jsxs("div",{className:"form-group",children:[l.jsxs("label",{className:"form-label",style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[l.jsx("span",{children:"Trường tùy chỉnh khác (Ví dụ: Mã PIN, Câu hỏi bảo mật...)"}),l.jsx("button",{type:"button",className:"btn btn-secondary",style:{padding:"2px 8px",fontSize:"11px"},onClick:y,children:"+ Thêm trường"})]}),c.map((m,N)=>l.jsxs("div",{className:"custom-field-row",children:[l.jsx("input",{type:"text",className:"form-input",placeholder:"Tên trường (ví dụ: PIN)",value:m.key,onChange:p=>g(N,"key",p.target.value)}),l.jsx("input",{type:"text",className:"form-input",placeholder:"Giá trị",value:m.value,onChange:p=>g(N,"value",p.target.value)}),l.jsx("button",{type:"button",className:"btn btn-danger",style:{padding:"10px"},onClick:()=>k(N),children:"X"})]},N))]}),l.jsxs("div",{className:"form-group",children:[l.jsx("label",{className:"form-label",children:"Ghi chú thêm"}),l.jsx("textarea",{className:"form-input",placeholder:"Nhập ghi chú hoặc mã backup giải cứu...",rows:3,value:n.notes||"",onChange:m=>r({...n,notes:m.target.value}),style:{resize:"vertical"}})]}),l.jsxs("div",{style:{display:"flex",gap:"12px",justifyContent:"flex-end",marginTop:"10px"},children:[l.jsx("button",{type:"button",className:"btn btn-secondary",onClick:t,children:"Hủy bỏ"}),l.jsx("button",{type:"submit",className:"btn btn-primary",children:"Lưu tài khoản"})]})]})})},vf=Ut.memo(({index:e,mapping:t,exampleValue:n,mappingOptions:r,onMappingChange:i,onRemove:s})=>l.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"4px",width:"150px",flexShrink:0},children:[l.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[l.jsxs("span",{style:{fontSize:"11px",color:"var(--text-secondary)",fontWeight:500},children:["Cột ",e+1]}),l.jsx("button",{type:"button",onClick:()=>s(e),style:{background:"none",border:"none",color:"var(--text-secondary)",cursor:"pointer",padding:"2px",display:"flex",alignItems:"center"},children:l.jsx($n,{size:14})})]}),l.jsx("select",{value:t,onChange:o=>i(e,o.target.value),className:"form-input",style:{padding:"8px 12px",fontSize:"13px",borderRadius:"8px",border:"1px solid var(--border-color)",background:"var(--bg-panel)",width:"100%"},children:r.map(o=>l.jsx("option",{value:o.value,children:o.label},o.value))}),l.jsxs("span",{style:{fontSize:"11px",color:"var(--text-muted)",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},title:n,children:["Ví dụ: ",n||"—"]})]})),Wa={facebook:"UID|Pass|2FA|Email|Pass_Email|MailKP|Pass_MailKP|Phone|Cookie|Token",tiktok:"Username|Pass|Email|Pass_Email|2FA|Phone|Cookie",twitter:"User|Pass|2FA|Backup Code|Mail|Pass Mail",instagram:"Username|Pass|Email|Pass_Email|2FA|Cookie",google:"Email|Pass|2FA|MailKP|Pass_MailKP|Phone",outlook:"Email|Pass|MailKP|Phone|Client_ID|Refresh_Token",telegram:"Phone|Pass_2FA|API_ID|API_Hash|Session_String",discord:"Username|Email|Pass|Token|2FA|Backup_Codes",reddit:"Username|Pass|Email|Pass_Email|Cookie"},kf=[{value:"skip",label:"❌ Bỏ qua cột này"},{value:"email",label:"📧 Email"},{value:"password",label:"🔑 Mật khẩu"},{value:"totp_secret",label:"🛡️ Mã 2FA (OTP)"},{value:"username",label:"👤 Tên đăng nhập"},{value:"uid",label:"🆔 UID tài khoản"},{value:"mail_kp",label:"📩 Mail khôi phục"},{value:"phone",label:"📞 Số điện thoại"},{value:"cookie",label:"🍪 Cookie"},{value:"token",label:"🔑 Access Token"},{value:"backup_code",label:"💾 Backup Code"},{value:"pass_mail",label:"🔑 Pass Mail"}],jf=({isOpen:e,onClose:t,text:n,onChange:r,onSubmit:i,platforms:s})=>{const[o,a]=C.useState(""),[c,d]=C.useState(["email"]),[x,y]=C.useState(!1);C.useEffect(()=>{const p=u=>{u.key==="Escape"&&t()};return e&&window.addEventListener("keydown",p),()=>{window.removeEventListener("keydown",p)}},[e,t]);const g=C.useCallback((p,u)=>{const f=[...c];f[p]=u,d(f),y(!0)},[c]),k=C.useCallback(p=>{d(u=>u.filter((f,j)=>j!==p)),y(!0)},[]),S=C.useCallback(()=>{d(p=>[...p,"skip"]),y(!0)},[]);C.useEffect(()=>{e&&(n||(y(!1),d(["email"])))},[e,n]),C.useEffect(()=>{if(x||!n)return;const p=n.split(`
261
- `).map(w=>w.trim()).filter(w=>w);if(p.length===0)return;const f=p[0].split("|").map(w=>w.trim()),j=f.length;let v=Array(j).fill("skip");if(o&&Wa[o]){const z=Wa[o].split("|").map(T=>T.trim().toLowerCase());f.forEach((T,D)=>{const L=z[D];if(!L){v[D]="skip";return}L==="backup code"||L==="backup_codes"||L==="backup_code"||L.includes("backup")?v[D]="backup_code":L==="pass mail"||L==="pass_mail"||L==="pass email"||L==="pass_email"?v[D]="pass_mail":L.includes("email")||L==="mail"?v[D]="email":L.includes("pass")||L==="pwd"?L.includes("khôi phục")||L.includes("recovery")||L.includes("kp")?v[D]="mail_kp":v[D]="password":L==="2fa"||L==="otp"||L==="totp"?v[D]="totp_secret":L==="uid"?v[D]="uid":L.includes("username")||L==="user"?v[D]="username":L==="sđt"||L==="sdt"||L.includes("phone")?v[D]="phone":L.includes("khôi phục")||L.includes("recovery")||L.includes("mail kp")||L.includes("mailkp")?v[D]="mail_kp":L==="cookie"?v[D]="cookie":L==="token"?v[D]="token":v[D]="skip"})}else f.forEach((w,z)=>{const T=w.toLowerCase();if(T.includes("@")&&!T.includes("khôi phục")&&!T.includes("recovery")&&!T.includes("kp"))v[z]="email";else if(z===1&&f[0]&&f[0].includes("@"))v[z]="password";else if(w.length>=16&&/^[A-Z2-7=]+$/i.test(w))v[z]="totp_secret";else if(T.includes("gmail.com")||T.includes("outlook.com")||T.includes("yahoo.com")){const D=f.slice(0,z).some(L=>L.includes("@"));v[z]=D?"mail_kp":"email"}else/^\d{9,11}$/.test(w)?v[z]="phone":/^\d{15,}$/.test(w)&&(v[z]="uid")});d(v)},[n,o,x]);const m=C.useMemo(()=>{const p=n.split(`
262
- `).map(u=>u.trim()).filter(u=>u);return p.length?p[0].split("|").map(u=>u.trim()):[]},[n]);if(!e)return null;const N=()=>{if(c.length===0){alert("Vui lòng nhập/dán chuỗi dữ liệu thô vào khung bên dưới.");return}const p=c.map(u=>u==="email"?"email":u==="password"?"pass":u==="totp_secret"?"2fa":u==="username"?"username":u==="uid"?"uid":u==="mail_kp"?"mail kp":u==="phone"?"sđt":u==="cookie"?"cookie":u==="token"?"token":u==="backup_code"?"backup code":u==="pass_mail"?"pass mail":"skip").join("|");i(o||void 0,p)};return l.jsx("div",{style:{position:"fixed",top:0,left:0,right:0,bottom:0,background:"var(--modal-backdrop)",backdropFilter:"blur(8px)",display:"flex",alignItems:"center",justifyContent:"center",zIndex:100},children:l.jsxs("div",{className:"glass-panel animate-fade-in",style:{width:"100%",maxWidth:"900px",maxHeight:"90vh",overflowY:"auto",padding:"30px",display:"flex",flexDirection:"column",gap:"18px",background:"var(--bg-modal)"},children:[l.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[l.jsx("h3",{style:{fontSize:"18px",fontWeight:600},children:"Dán nhanh chuỗi thô"}),l.jsx("button",{type:"button",onClick:t,style:{background:"none",border:"none",color:"var(--text-secondary)",cursor:"pointer"},children:l.jsx($n,{size:20})})]}),l.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"6px"},children:[l.jsx("label",{style:{fontSize:"13px",fontWeight:500,color:"var(--text-secondary)"},children:"Nền tảng tài khoản"}),l.jsx(xd,{value:o,onChange:p=>a(p),options:[{value:"",label:"Tự động nhận diện / Cơ bản"},...s.map(p=>({value:p.id,label:p.name}))],placeholder:"Tự động nhận diện / Cơ bản"})]}),l.jsx("textarea",{className:"form-input",placeholder:"Dán chuỗi vào đây (định dạng các cột phân tách bằng dấu '|')...",value:n,onChange:p=>r(p.target.value),style:{resize:"vertical",fontFamily:"monospace",minHeight:"200px",width:"100%"}}),l.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"10px",background:"rgba(255, 255, 255, 0.02)",padding:"16px",borderRadius:"12px",border:"1px solid var(--border-color)"},children:[l.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[l.jsxs("span",{style:{fontSize:"13px",fontWeight:600,color:"var(--text-accent)"},children:["Cấu hình các cột (",c.length," cột):"]}),l.jsxs("button",{type:"button",onClick:S,className:"btn btn-secondary",style:{padding:"6px 12px",fontSize:"12px",fontWeight:600,display:"flex",alignItems:"center",gap:"4px"},children:[l.jsx(To,{size:16})," Thêm cột"]})]}),c.length===0?l.jsx("p",{style:{fontSize:"13px",color:"var(--text-muted)",textAlign:"center"},children:'Chưa có cột nào được cấu hình. Sử dụng nút "+ Thêm cột" để thêm.'}):l.jsx("div",{style:{display:"flex",flexDirection:"row",flexWrap:"nowrap",gap:"12px",overflowX:"auto",padding:"8px 4px 12px 4px",width:"100%",scrollbarWidth:"thin"},children:c.map((p,u)=>{const f=m[u]||"";return l.jsx(vf,{index:u,mapping:p,exampleValue:f,mappingOptions:kf,onMappingChange:g,onRemove:k},u)})})]}),l.jsxs("div",{style:{display:"flex",gap:"12px",justifyContent:"flex-end",marginTop:"10px"},children:[l.jsx("button",{type:"button",className:"btn btn-secondary",onClick:t,children:"Hủy"}),l.jsx("button",{type:"button",className:"btn btn-primary",onClick:N,children:"Phân tích & Nhập"})]})]})})},wf=({isOpen:e,onClose:t,onImport:n,onExport:r})=>(C.useEffect(()=>{const i=s=>{s.key==="Escape"&&t()};return e&&window.addEventListener("keydown",i),()=>{window.removeEventListener("keydown",i)}},[e,t]),e?l.jsxs("div",{style:{position:"fixed",top:0,left:0,right:0,bottom:0,background:"var(--modal-backdrop)",backdropFilter:"blur(8px)",display:"flex",alignItems:"center",justifyContent:"center",zIndex:150},children:[l.jsx("div",{onClick:t,style:{position:"absolute",top:0,left:0,right:0,bottom:0,zIndex:-1}}),l.jsxs("div",{className:"glass-panel animate-fade-in",style:{width:"100%",maxWidth:"500px",padding:"24px",background:"var(--bg-modal)",display:"flex",flexDirection:"column",gap:"20px",boxShadow:"0 20px 25px -5px rgba(0, 0, 0, 0.4)"},children:[l.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[l.jsx("h3",{style:{fontSize:"16px",fontWeight:600,color:"var(--text-primary)"},children:"Nhập / Xuất dữ liệu"}),l.jsx("button",{type:"button",onClick:t,style:{background:"none",border:"none",color:"var(--text-secondary)",cursor:"pointer",display:"flex",alignItems:"center"},title:"Đóng",children:l.jsx($n,{size:18})})]}),l.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"10px"},children:[l.jsx("span",{style:{fontSize:"11px",fontWeight:600,color:"var(--text-secondary)",textTransform:"uppercase",letterSpacing:"0.05em"},children:"Nhập dữ liệu vào Vault"}),l.jsxs("label",{className:"btn btn-secondary",style:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:"10px",padding:"24px 16px",borderRadius:"8px",cursor:"pointer",border:"2px dashed var(--border-color)",background:"rgba(255, 255, 255, 0.01)",transition:"var(--transition-smooth)"},children:[l.jsx(cf,{size:24,style:{color:"var(--text-accent)"}}),l.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",gap:"4px"},children:[l.jsx("span",{style:{fontSize:"13px",fontWeight:600,color:"var(--text-primary)"},children:"Chọn tệp tin để nhập..."}),l.jsx("span",{style:{fontSize:"11px",color:"var(--text-muted)"},children:"Hỗ trợ tệp tin .TXT, .CSV, .JSON"})]}),l.jsx("input",{type:"file",accept:".csv,.json,.txt",onChange:i=>{n(i),t()},style:{display:"none"}})]})]}),l.jsx("hr",{style:{border:"none",borderTop:"1px solid var(--border-color)",margin:"4px 0"}}),l.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"10px"},children:[l.jsx("span",{style:{fontSize:"11px",fontWeight:600,color:"var(--text-secondary)",textTransform:"uppercase",letterSpacing:"0.05em"},children:"Xuất dữ liệu mã hóa"}),l.jsxs("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:"10px"},children:[l.jsxs("button",{type:"button",className:"btn btn-secondary",onClick:()=>{r("json"),t()},style:{display:"flex",flexDirection:"column",alignItems:"center",gap:"8px",padding:"16px 12px",borderRadius:"8px",cursor:"pointer",fontSize:"12px"},children:[l.jsx(Bn,{size:18,style:{color:"var(--text-emerald)"}}),l.jsx("span",{style:{fontWeight:600},children:"Xuất JSON"})]}),l.jsxs("button",{type:"button",className:"btn btn-secondary",onClick:()=>{r("csv"),t()},style:{display:"flex",flexDirection:"column",alignItems:"center",gap:"8px",padding:"16px 12px",borderRadius:"8px",cursor:"pointer",fontSize:"12px"},title:"Xuất định dạng email|pass|2FA|Mail KP|SĐT",children:[l.jsx(Bn,{size:18,style:{color:"var(--text-accent)"}}),l.jsx("span",{style:{fontWeight:600},children:"Xuất TXT (Gmail)"})]})]})]})]})]}):null),Sf=({currentPassword:e,setCurrentPassword:t,newPassword:n,setNewPassword:r,confirmNewPassword:i,setConfirmNewPassword:s,newHint:o,setNewHint:a,passwordError:c,passwordSuccess:d,isChangingPassword:x,onSubmit:y})=>l.jsxs("div",{className:"glass-panel",style:{padding:"30px",display:"flex",flexDirection:"column",gap:"20px"},children:[l.jsxs("div",{children:[l.jsx("h3",{style:{fontSize:"18px",fontWeight:600,marginBottom:"6px"},children:"Đổi Mật khẩu Master"}),l.jsx("p",{style:{fontSize:"13px",color:"var(--text-secondary)"},children:"Mật khẩu Master được sử dụng để mã hóa dữ liệu trong Vault. Việc thay đổi sẽ tự động giải mã và mã hóa lại tất cả tài khoản bằng khóa mới."})]}),l.jsxs("form",{onSubmit:y,style:{display:"flex",flexDirection:"column",gap:"16px"},children:[c&&l.jsx("div",{style:{padding:"12px 16px",borderRadius:"8px",background:"rgba(255, 75, 43, 0.1)",border:"1px solid rgba(255, 75, 43, 0.2)",color:"#ff4b2b",fontSize:"13px",fontWeight:500},children:c}),d&&l.jsx("div",{style:{padding:"12px 16px",borderRadius:"8px",background:"rgba(56, 239, 125, 0.1)",border:"1px solid rgba(56, 239, 125, 0.2)",color:"var(--text-emerald)",fontSize:"13px",fontWeight:500},children:d}),l.jsxs("div",{className:"form-group",style:{marginBottom:0},children:[l.jsx("label",{className:"form-label",children:"Mật khẩu Master hiện tại *"}),l.jsx("input",{type:"password",className:"form-input",required:!0,value:e,onChange:g=>t(g.target.value),placeholder:"Nhập mật khẩu hiện tại..."})]}),l.jsxs("div",{className:"form-group",style:{marginBottom:0},children:[l.jsx("label",{className:"form-label",children:"Mật khẩu Master mới *"}),l.jsx("input",{type:"password",className:"form-input",required:!0,value:n,onChange:g=>r(g.target.value),placeholder:"Ít nhất 8 ký tự..."})]}),l.jsxs("div",{className:"form-group",style:{marginBottom:0},children:[l.jsx("label",{className:"form-label",children:"Xác nhận mật khẩu Master mới *"}),l.jsx("input",{type:"password",className:"form-input",required:!0,value:i,onChange:g=>s(g.target.value),placeholder:"Nhập lại mật khẩu mới..."})]}),l.jsxs("div",{className:"form-group",style:{marginBottom:0},children:[l.jsx("label",{className:"form-label",children:"Gợi ý mật khẩu (Hint) - Không bắt buộc"}),l.jsx("input",{type:"text",className:"form-input",value:o,onChange:g=>a(g.target.value),placeholder:"Gợi ý giúp bạn nhớ lại mật khẩu..."})]}),l.jsx("button",{type:"submit",className:"btn btn-primary",disabled:x,style:{marginTop:"8px",alignSelf:"flex-start"},children:x?"Đang xử lý...":"Cập nhật mật khẩu Master"})]})]}),Cf=({vaultInfo:e,isLoadingVaultInfo:t,vaultInfoError:n})=>l.jsxs("div",{className:"glass-panel",style:{padding:"30px",display:"flex",flexDirection:"column",gap:"24px"},children:[l.jsxs("div",{children:[l.jsx("h3",{style:{fontSize:"18px",fontWeight:600,marginBottom:"6px"},children:"Thông số hệ thống & Lưu trữ"}),l.jsx("p",{style:{fontSize:"13px",color:"var(--text-secondary)"},children:"Thông tin chi tiết về cơ sở dữ liệu mã hóa và thuật toán mật mã của Vault."})]}),t?l.jsx("p",{style:{fontSize:"14px",color:"var(--text-secondary)"},children:"Đang tải thông tin hệ thống..."}):n?l.jsx("div",{style:{padding:"12px 16px",borderRadius:"8px",background:"rgba(255, 75, 43, 0.1)",border:"1px solid rgba(255, 75, 43, 0.2)",color:"#ff4b2b",fontSize:"13px"},children:n}):e?l.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"16px"},children:[l.jsxs("div",{style:{display:"grid",gridTemplateColumns:"220px 1fr",gap:"12px",alignItems:"center",borderBottom:"1px solid var(--border-color)",paddingBottom:"12px"},children:[l.jsx("span",{style:{fontSize:"14px",fontWeight:600,color:"var(--text-secondary)"},children:"Đường dẫn file dữ liệu:"}),l.jsx("code",{style:{fontSize:"13px",background:"var(--bg-input)",padding:"6px 10px",borderRadius:"4px",wordBreak:"break-all",color:"var(--text-accent)"},children:e.path})]}),l.jsxs("div",{style:{display:"grid",gridTemplateColumns:"220px 1fr",gap:"12px",alignItems:"center",borderBottom:"1px solid var(--border-color)",paddingBottom:"12px"},children:[l.jsx("span",{style:{fontSize:"14px",fontWeight:600,color:"var(--text-secondary)"},children:"Số lượng tài khoản:"}),l.jsxs("span",{style:{fontSize:"14px",fontWeight:500},children:[e.credentialsCount," mục"]})]}),l.jsxs("div",{style:{display:"grid",gridTemplateColumns:"220px 1fr",gap:"12px",alignItems:"center",borderBottom:"1px solid var(--border-color)",paddingBottom:"12px"},children:[l.jsx("span",{style:{fontSize:"14px",fontWeight:600,color:"var(--text-secondary)"},children:"Số lượng danh mục:"}),l.jsxs("span",{style:{fontSize:"14px",fontWeight:500},children:[e.categoriesCount," mục"]})]}),l.jsxs("div",{style:{display:"grid",gridTemplateColumns:"220px 1fr",gap:"12px",alignItems:"center",borderBottom:"1px solid var(--border-color)",paddingBottom:"12px"},children:[l.jsx("span",{style:{fontSize:"14px",fontWeight:600,color:"var(--text-secondary)"},children:"Thuật toán mã hóa:"}),l.jsx("span",{style:{fontSize:"14px",fontWeight:500},children:"AES-256-GCM (Authenticated Encryption)"})]}),l.jsxs("div",{style:{display:"grid",gridTemplateColumns:"220px 1fr",gap:"12px",alignItems:"center",paddingBottom:"12px"},children:[l.jsx("span",{style:{fontSize:"14px",fontWeight:600,color:"var(--text-secondary)"},children:"Hàm băm khóa (KDF):"}),l.jsx("span",{style:{fontSize:"14px",fontWeight:500},children:"PBKDF2 với HMAC-SHA256 (100.000 vòng lặp)"})]})]}):null]}),bf=({tailscaleStatus:e,isLoadingTailscale:t,tailscaleError:n,setTailscaleError:r,isSubmittingTailscale:i,isProvisioningCert:s,onInstall:o,onConnect:a,onDisconnect:c,onLogout:d,onProvisionCert:x})=>{const[y,g]=C.useState(""),[k,S]=C.useState(!0),[m,N]=C.useState(""),[p,u]=C.useState(!1),f=v=>{v.preventDefault(),a(y||void 0,k,m||void 0),g("")},j=()=>{a(void 0,k,void 0)};return l.jsxs("div",{className:"glass-panel animate-fade-in",style:{padding:"24px",display:"flex",flexDirection:"column",gap:"16px"},children:[l.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[l.jsx(ud,{size:20,style:{color:"var(--text-accent)"}}),l.jsx("h3",{style:{fontSize:"16px",fontWeight:600},children:"Tailscale VPN Client"})]}),l.jsx("p",{style:{fontSize:"13px",color:"var(--text-secondary)",marginTop:"-8px"},children:"Kết nối máy tính của bạn vào mạng lưới Tailnet riêng tư và bảo mật."}),t?l.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"10px"},children:[l.jsx("div",{style:{width:"18px",height:"18px",border:"2px solid var(--text-accent)",borderTopColor:"transparent",borderRadius:"50%",animation:"spin 1s linear infinite"}}),l.jsx("p",{style:{fontSize:"13px",color:"var(--text-secondary)"},children:"Đang truy vấn trạng thái..."})]}):e?l.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"16px"},children:[n&&l.jsxs("div",{style:{padding:"10px 14px",borderRadius:"8px",background:"rgba(255, 75, 43, 0.1)",border:"1px solid rgba(255, 75, 43, 0.2)",color:"#ff4b2b",fontSize:"13px",display:"flex",justifyContent:"space-between",alignItems:"center"},children:[l.jsx("span",{children:n}),l.jsx("button",{type:"button",onClick:()=>r(null),style:{background:"none",border:"none",color:"#ff4b2b",cursor:"pointer",fontWeight:"bold",fontSize:"14px"},children:"✕"})]}),l.jsxs("div",{className:"glass-panel",style:{padding:"16px",background:"rgba(255,255,255,0.01)",display:"flex",alignItems:"center",justifyContent:"space-between"},children:[l.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"12px"},children:[l.jsx("div",{style:{width:"10px",height:"10px",borderRadius:"50%",background:e.backendState==="Running"?"var(--text-emerald)":e.backendState==="Installing"?"var(--text-accent)":"var(--text-muted)",boxShadow:e.backendState==="Running"?"var(--glow-emerald)":e.backendState==="Installing"?"var(--glow-accent)":"none",animation:e.backendState==="Running"||e.backendState==="Installing"?"pulse-glow 2s infinite":"none"}}),l.jsxs("div",{children:[l.jsx("div",{style:{fontSize:"14px",fontWeight:600},children:e.backendState==="Running"?"Đã kết nối VPN":e.backendState==="NotInstalled"?"Chưa cài đặt Tailscale":e.backendState==="Installing"?"Đang cài đặt Tailscale...":"Đã ngắt kết nối"}),l.jsxs("div",{style:{fontSize:"11px",color:"var(--text-muted)"},children:["Trạng thái: ",e.backendState]})]})]}),l.jsx("div",{style:{display:"flex",gap:"8px"},children:e.backendState==="Running"?l.jsxs(l.Fragment,{children:[l.jsx("button",{type:"button",className:"btn btn-secondary",onClick:c,style:{padding:"6px 12px",fontSize:"13px"},children:"Ngắt kết nối"}),l.jsx("button",{type:"button",className:"btn btn-danger",onClick:d,style:{padding:"6px 12px",fontSize:"13px"},children:"Đăng xuất"})]}):e.backendState==="Installing"?l.jsx("div",{style:{fontSize:"12px",color:"var(--text-muted)",fontStyle:"italic"},children:"Đang tải và giải nén..."}):e.backendState==="NotInstalled"?l.jsx("button",{type:"button",className:"btn btn-primary",onClick:o,style:{padding:"6px 12px",fontSize:"13px"},children:"Tự động cài đặt (MSI)"}):l.jsx("button",{type:"button",className:"btn btn-emerald",style:{padding:"6px 12px",fontSize:"13px"},onClick:j,disabled:i,children:i?"Đang kết nối...":"Kết nối nhanh"})})]}),e.backendState==="Installing"&&l.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"10px",background:"rgba(255,255,255,0.02)",padding:"16px",borderRadius:"8px"},children:[l.jsxs("div",{style:{display:"flex",justifyContent:"space-between",fontSize:"13px"},children:[l.jsx("span",{style:{fontWeight:600,color:"var(--text-accent)"},children:e.installStatus||"Đang cài đặt..."}),l.jsxs("span",{children:[e.installProgress||0,"%"]})]}),l.jsx("div",{style:{width:"100%",height:"8px",background:"var(--bg-input)",borderRadius:"4px",overflow:"hidden"},children:l.jsx("div",{style:{width:`${e.installProgress||0}%`,height:"100%",background:"var(--text-accent)",transition:"width 0.3s ease"}})})]}),e.backendState==="NotInstalled"&&l.jsxs("div",{style:{padding:"16px",borderRadius:"8px",background:"rgba(217, 119, 6, 0.05)",border:"1px solid rgba(217, 119, 6, 0.15)",fontSize:"13px",lineHeight:"1.6"},children:[l.jsx("p",{style:{fontWeight:600,color:"var(--text-accent)",marginBottom:"8px"},children:"Chưa cài đặt Tailscale CLI trên thiết bị của bạn."}),l.jsxs("div",{style:{display:"flex",gap:"12px",marginBottom:"16px"},children:[l.jsx("button",{type:"button",className:"btn btn-primary",onClick:o,style:{padding:"8px 16px",fontSize:"13px"},children:"Tự động cài đặt ngầm (Windows)"}),l.jsx("a",{href:"https://tailscale.com/download/windows",target:"_blank",rel:"noreferrer",className:"btn btn-secondary",style:{padding:"8px 16px",fontSize:"13px",textDecoration:"none",display:"inline-flex",alignItems:"center"},children:"Tải thủ công từ trang chủ"})]}),l.jsxs("details",{style:{cursor:"pointer"},children:[l.jsx("summary",{style:{fontWeight:600,color:"var(--text-secondary)",fontSize:"12px"},children:"Hướng dẫn cấu hình thủ công"}),l.jsxs("ol",{style:{paddingLeft:"20px",display:"flex",flexDirection:"column",gap:"6px",marginTop:"8px",fontSize:"12px"},children:[l.jsx("li",{children:"Cài đặt ứng dụng Tailscale và đăng nhập vào tài khoản của bạn."}),l.jsxs("li",{children:["Sau khi cài đặt xong, bấm nút ",l.jsx("strong",{children:"Kiểm tra lại"})," phía trên để nhận diện CLI."]})]})]})]}),e.backendState==="Running"&&l.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"12px",background:"rgba(0,0,0,0.1)",padding:"16px",borderRadius:"8px",fontSize:"13px"},children:[l.jsxs("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:"16px"},children:[l.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"6px"},children:[l.jsxs("div",{children:[l.jsx("span",{style:{color:"var(--text-secondary)"},children:"Tên thiết bị:"})," ",l.jsx("strong",{children:e.deviceName})]}),l.jsxs("div",{children:[l.jsx("span",{style:{color:"var(--text-secondary)"},children:"Mạng Tailnet:"})," ",l.jsx("strong",{children:e.tailnet})]}),l.jsxs("div",{children:[l.jsx("span",{style:{color:"var(--text-secondary)"},children:"Peers hoạt động:"})," ",l.jsxs("strong",{children:[e.peersCount," thiết bị"]})]})]}),l.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"6px"},children:[l.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"6px"},children:[l.jsx("span",{style:{color:"var(--text-secondary)"},children:"IPv4:"}),l.jsx("code",{style:{background:"var(--bg-input)",padding:"2px 6px",borderRadius:"4px",color:"var(--text-accent)"},children:e.ip4})]}),e.ip6&&l.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"6px"},children:[l.jsx("span",{style:{color:"var(--text-secondary)"},children:"IPv6:"}),l.jsx("code",{style:{background:"var(--bg-input)",padding:"2px 6px",borderRadius:"4px",color:"var(--text-accent)",fontSize:"11px",wordBreak:"break-all"},children:e.ip6})]})]})]}),l.jsxs("div",{style:{borderTop:"1px solid rgba(255,255,255,0.05)",paddingTop:"12px",display:"flex",justifyContent:"space-between",alignItems:"center"},children:[l.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"2px"},children:[l.jsx("span",{style:{fontSize:"12px",fontWeight:600,color:"var(--text-secondary)"},children:"Chứng chỉ HTTPS (TLS)"}),l.jsx("span",{style:{fontSize:"11px",color:"var(--text-muted)"},children:e.hasCert?`✓ Đã cấp TLS cho domain: ${e.certDomain}`:"Chưa cấp SSL/TLS cho tên miền Tailscale của thiết bị này."})]}),l.jsx("button",{type:"button",className:"btn btn-secondary",style:{padding:"6px 12px",fontSize:"12px"},onClick:x,disabled:s,children:s?"Đang xử lý...":e.hasCert?"Cập nhật Cert":"Cấp SSL Cert"})]})]}),e.backendState!=="Running"&&e.backendState!=="NotInstalled"&&l.jsxs("form",{onSubmit:f,style:{display:"flex",flexDirection:"column",gap:"12px",background:"rgba(0,0,0,0.1)",padding:"16px",borderRadius:"8px"},children:[l.jsx("h4",{style:{fontSize:"13px",fontWeight:600,borderBottom:"1px solid var(--border-color)",paddingBottom:"6px"},children:"Cấu hình kết nối VPN nâng cao"}),l.jsxs("div",{className:"form-group",style:{marginBottom:0},children:[l.jsx("label",{className:"form-label",style:{fontSize:"12px"},children:"Auth Key (Đăng nhập tự động)"}),l.jsxs("div",{style:{position:"relative"},children:[l.jsx("input",{type:p?"text":"password",className:"form-input",placeholder:"tskey-auth-...",value:y,onChange:v=>g(v.target.value),style:{paddingRight:"40px",fontSize:"13px"}}),l.jsx("button",{type:"button",onClick:()=>u(!p),style:{position:"absolute",right:"10px",top:"50%",transform:"translateY(-50%)",background:"none",border:"none",color:"var(--text-secondary)",cursor:"pointer"},children:p?l.jsx(_n,{size:14}):l.jsx(Ln,{size:14})})]})]}),l.jsxs("div",{className:"form-group",style:{marginBottom:0},children:[l.jsx("label",{className:"form-label",style:{fontSize:"12px"},children:"Exit Node (IP hoặc tên thiết bị định tuyến)"}),l.jsx("input",{type:"text",className:"form-input",placeholder:"Ví dụ: 100.123.45.67",value:m,onChange:v=>N(v.target.value),style:{fontSize:"13px"}})]}),l.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"8px",marginTop:"4px"},children:[l.jsx("input",{type:"checkbox",id:"acceptDns",checked:k,onChange:v=>S(v.target.checked),style:{cursor:"pointer",width:"14px",height:"14px"}}),l.jsx("label",{htmlFor:"acceptDns",style:{fontSize:"12px",cursor:"pointer",userSelect:"none"},children:"Chấp nhận DNS cấu hình từ mạng Tailnet"})]}),l.jsx("button",{type:"submit",className:"btn btn-primary",style:{alignSelf:"flex-start",padding:"6px 16px",fontSize:"13px"},disabled:i,children:i?"Đang kết nối...":"Kết nối với cấu hình"})]})]}):null]})},zf=({tailscaleStatus:e,funnelStatus:t,isLoadingFunnel:n,isTogglingServe:r,isTogglingFunnel:i,onToggleServe:s,onToggleFunnel:o})=>{const a=(e==null?void 0:e.backendState)==="Running",c=(d,x)=>{navigator.clipboard.writeText(d),alert(x)};return l.jsxs("div",{className:"glass-panel animate-fade-in",style:{padding:"24px",display:"flex",flexDirection:"column",gap:"16px"},children:[l.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[l.jsx(zo,{size:20,style:{color:"var(--text-accent)"}}),l.jsx("h3",{style:{fontSize:"16px",fontWeight:600},children:"API Endpoints & Public Tunnels"})]}),l.jsx("p",{style:{fontSize:"13px",color:"var(--text-secondary)",marginTop:"-8px"},children:"Expose ứng dụng của bạn ra mạng nội bộ Tailscale hoặc internet công cộng bằng HTTPS Tunnel bảo mật."}),n?l.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"10px"},children:[l.jsx("div",{style:{width:"18px",height:"18px",border:"2px solid var(--text-accent)",borderTopColor:"transparent",borderRadius:"50%",animation:"spin 1s linear infinite"}}),l.jsx("p",{style:{fontSize:"13px",color:"var(--text-secondary)"},children:"Đang tải trạng thái đường truyền..."})]}):t?l.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"16px"},children:[l.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",background:"rgba(0,0,0,0.1)",padding:"12px 16px",borderRadius:"8px",fontSize:"13px"},children:[l.jsxs("div",{style:{display:"flex",gap:"12px",alignItems:"center"},children:[l.jsx("span",{style:{fontSize:"11px",background:"var(--bg-active-tab)",color:"var(--text-accent)",padding:"2px 6px",borderRadius:"4px",fontWeight:600},children:"Local"}),l.jsx("code",{children:"http://localhost:18823"})]}),l.jsx("button",{type:"button",className:"btn btn-secondary",style:{padding:"4px 8px",fontSize:"12px"},onClick:()=>c("http://localhost:18823","Đã copy Local URL!"),children:"Copy"})]}),l.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",background:"rgba(0,0,0,0.1)",padding:"12px 16px",borderRadius:"8px",fontSize:"13px"},children:[l.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"4px",flexGrow:1},children:[l.jsxs("div",{style:{display:"flex",gap:"12px",alignItems:"center"},children:[l.jsx("span",{style:{fontSize:"11px",background:"rgba(56, 239, 125, 0.1)",color:"var(--text-emerald)",padding:"2px 6px",borderRadius:"4px",fontWeight:600},children:"Tailscale"}),a?t.serveActive&&t.serveUrl?l.jsx("a",{href:t.serveUrl,target:"_blank",rel:"noreferrer",style:{color:"var(--text-accent)",textDecoration:"none",fontWeight:500},children:t.serveUrl}):l.jsx("span",{style:{color:"var(--text-muted)"},children:"Chưa kích hoạt HTTPS nội bộ"}):l.jsx("span",{style:{color:"var(--text-muted)"},children:"Yêu cầu kết nối VPN"})]}),l.jsx("span",{style:{fontSize:"11px",color:"var(--text-muted)"},children:"Cho phép truy cập HTTPS từ xa cho các máy trong mạng Tailscale."})]}),l.jsxs("div",{style:{display:"flex",gap:"8px",alignItems:"center"},children:[a&&t.serveActive&&l.jsx("button",{type:"button",className:"btn btn-secondary",style:{padding:"4px 8px",fontSize:"12px"},onClick:()=>c(t.serveUrl||"","Đã copy Tailscale HTTPS URL!"),children:"Copy"}),l.jsx("button",{type:"button",disabled:!a||r,onClick:()=>s(!t.serveActive),style:{width:"42px",height:"22px",borderRadius:"11px",background:a&&t.serveActive?"var(--text-accent)":"var(--text-muted)",position:"relative",border:"none",cursor:a?"pointer":"not-allowed",opacity:a?r?.6:1:.4,transition:"var(--transition-smooth)"},children:l.jsx("div",{style:{width:"16px",height:"16px",borderRadius:"50%",background:"#fff",position:"absolute",top:"3px",left:a&&t.serveActive?"23px":"3px",transition:"var(--transition-smooth)"}})})]})]}),l.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",background:"rgba(0,0,0,0.1)",padding:"12px 16px",borderRadius:"8px",fontSize:"13px"},children:[l.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"4px",flexGrow:1},children:[l.jsxs("div",{style:{display:"flex",gap:"12px",alignItems:"center"},children:[l.jsx("span",{style:{fontSize:"11px",background:"rgba(255, 65, 108, 0.1)",color:"#ff416c",padding:"2px 6px",borderRadius:"4px",fontWeight:600},children:"Tunnel"}),a?t.funnelActive&&t.funnelUrl?l.jsx("a",{href:t.funnelUrl,target:"_blank",rel:"noreferrer",style:{color:"var(--text-accent)",textDecoration:"none",fontWeight:500},children:t.funnelUrl}):l.jsx("span",{style:{color:"var(--text-muted)"},children:"Chưa kích hoạt Tunnel công cộng"}):l.jsx("span",{style:{color:"var(--text-muted)"},children:"Yêu cầu kết nối VPN"})]}),l.jsx("span",{style:{fontSize:"11px",color:"var(--text-muted)"},children:"Expose ứng dụng ra internet công cộng an toàn (mọi thiết bị đều vào được)."})]}),l.jsxs("div",{style:{display:"flex",gap:"8px",alignItems:"center"},children:[a&&t.funnelActive&&l.jsx("button",{type:"button",className:"btn btn-secondary",style:{padding:"4px 8px",fontSize:"12px"},onClick:()=>c(t.funnelUrl||"","Đã copy Public Tunnel URL!"),children:"Copy"}),l.jsx("button",{type:"button",disabled:!a||i,onClick:()=>o(!t.funnelActive),style:{width:"42px",height:"22px",borderRadius:"11px",background:a&&t.funnelActive?"#ff416c":"var(--text-muted)",position:"relative",border:"none",cursor:a?"pointer":"not-allowed",opacity:a?i?.6:1:.4,transition:"var(--transition-smooth)"},children:l.jsx("div",{style:{width:"16px",height:"16px",borderRadius:"50%",background:"#fff",position:"absolute",top:"3px",left:a&&t.funnelActive?"23px":"3px",transition:"var(--transition-smooth)"}})})]})]}),l.jsx("div",{style:{marginTop:"8px",padding:"12px 16px",borderRadius:"8px",background:"rgba(242, 139, 42, 0.03)",border:"1px solid rgba(242, 139, 42, 0.15)",fontSize:"12px",lineHeight:"1.6"},children:l.jsxs("details",{style:{cursor:"pointer"},children:[l.jsx("summary",{style:{fontWeight:600,color:"#f28b2a",display:"flex",alignItems:"center",gap:"6px"},children:"💡 Hướng dẫn cấu hình Cloudflare Tunnel (Không cần VPN/Tailscale)"}),l.jsxs("div",{style:{marginTop:"8px",display:"flex",flexDirection:"column",gap:"8px",color:"var(--text-secondary)"},children:[l.jsxs("p",{style:{margin:0},children:["Nếu bạn muốn truy cập ứng dụng công khai bằng tên miền riêng qua ",l.jsx("strong",{children:"Cloudflare Tunnel"})," để thay thế Tailscale (không sợ xung đột cổng và không cần cài VPN trên thiết bị khách):"]}),l.jsxs("ol",{style:{paddingLeft:"16px",margin:0,display:"flex",flexDirection:"column",gap:"4px"},children:[l.jsxs("li",{children:["Tải ",l.jsx("code",{children:"cloudflared.exe"})," và chạy ",l.jsx("code",{children:"cloudflared.exe tunnel login"})," để liên kết tên miền."]}),l.jsxs("li",{children:["Tạo tunnel và viết cấu hình ",l.jsx("code",{children:"config.yml"})," chuyển tiếp cổng ",l.jsx("code",{children:"18823"})," (HTTP)."]}),l.jsxs("li",{children:["Chạy ",l.jsx("code",{children:"cloudflared.exe service install"})," để tự khởi động chạy ngầm cùng Windows."]})]}),l.jsxs("p",{style:{margin:0,fontSize:"11px",fontStyle:"italic",color:"var(--text-muted)"},children:["Xem hướng dẫn cấu hình chi tiết tại tệp tin: ",l.jsx("code",{style:{color:"var(--text-accent)"},children:"docs/huong-dan-cloudflare-tunnel.md"})," trong thư mục mã nguồn."]})]})]})})]}):null]})},Tf=({apiKeys:e,isLoadingKeys:t,isCreatingKey:n,generatedKey:r,setGeneratedKey:i,onToggleKey:s,onDeleteKey:o,onCreateKey:a})=>{const[c,d]=C.useState(""),x=g=>{g.preventDefault(),c.trim()&&(a(c.trim()),d(""))},y=g=>{navigator.clipboard.writeText(g),alert("Đã copy API Key!")};return l.jsxs("div",{className:"glass-panel animate-fade-in",style:{padding:"24px",display:"flex",flexDirection:"column",gap:"16px"},children:[l.jsx("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:l.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[l.jsx(id,{size:20,style:{color:"var(--text-accent)"}}),l.jsx("h3",{style:{fontSize:"16px",fontWeight:600},children:"Quản lý API Keys"})]})}),l.jsx("p",{style:{fontSize:"13px",color:"var(--text-secondary)",marginTop:"-8px"},children:"Tạo mã khóa API (`pmkey_...`) để xác thực các ứng dụng bên thứ ba (như Chrome Extension) gọi đến API của Profile Manager."}),l.jsxs("form",{onSubmit:x,style:{display:"flex",gap:"10px",alignItems:"flex-end",background:"rgba(0,0,0,0.1)",padding:"16px",borderRadius:"8px"},children:[l.jsxs("div",{className:"form-group",style:{marginBottom:0,flexGrow:1},children:[l.jsx("label",{className:"form-label",style:{fontSize:"12px"},children:"Tên khóa gợi nhớ (Ví dụ: Extension Laptop, Script Python...)"}),l.jsx("input",{type:"text",className:"form-input",required:!0,placeholder:"Nhập tên thiết bị/ứng dụng sẽ dùng key...",value:c,onChange:g=>d(g.target.value),style:{fontSize:"13px"}})]}),l.jsx("button",{type:"submit",className:"btn btn-primary",style:{padding:"10px 20px",fontSize:"13px"},disabled:n,children:n?"Đang tạo...":"+ Tạo Key"})]}),r&&l.jsxs("div",{style:{padding:"16px",borderRadius:"8px",background:"rgba(56, 239, 125, 0.08)",border:"1px solid rgba(56, 239, 125, 0.2)",fontSize:"13px",display:"flex",flexDirection:"column",gap:"8px"},children:[l.jsx("div",{style:{fontWeight:600,color:"var(--text-emerald)"},children:"✓ Đã tạo API Key thành công!"}),l.jsx("p",{style:{fontSize:"12px",color:"var(--text-secondary)"},children:"Mã khóa này chỉ hiển thị **DUY NHẤT MỘT LẦN**. Hãy lưu lại một cách an toàn:"}),l.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"10px",marginTop:"4px"},children:[l.jsx("code",{style:{fontSize:"14px",background:"var(--bg-input)",padding:"6px 12px",borderRadius:"4px",color:"var(--text-emerald)",fontWeight:"bold",flexGrow:1,letterSpacing:"0.5px"},children:r}),l.jsx("button",{type:"button",className:"btn btn-emerald",style:{padding:"6px 12px",fontSize:"12px"},onClick:()=>y(r),children:"Copy Key"}),l.jsx("button",{type:"button",className:"btn btn-secondary",style:{padding:"6px 12px",fontSize:"12px"},onClick:()=>i(null),children:"Tôi đã lưu"})]})]}),t?l.jsx("p",{style:{fontSize:"13px",color:"var(--text-secondary)"},children:"Đang tải danh sách keys..."}):e.length===0?l.jsx("div",{style:{padding:"20px",textAlign:"center",border:"1px dashed var(--border-color)",borderRadius:"8px",color:"var(--text-muted)",fontSize:"13px"},children:"Chưa có API Key nào được tạo."}):l.jsx("div",{style:{display:"flex",flexDirection:"column",gap:"10px"},children:e.map(g=>l.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"12px 16px",background:"rgba(0,0,0,0.1)",borderRadius:"8px",fontSize:"13px"},children:[l.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"4px"},children:[l.jsx("div",{style:{fontWeight:600},children:g.name}),l.jsxs("div",{style:{fontSize:"11px",color:"var(--text-muted)"},children:["Prefix: ",l.jsxs("code",{children:[g.keyPrefix,"••••••••"]})," • Ngày tạo: ",new Date(g.createdAt).toLocaleDateString("vi-VN")]})]}),l.jsxs("div",{style:{display:"flex",gap:"12px",alignItems:"center"},children:[l.jsx("button",{type:"button",onClick:()=>s(g.id,g.enabled),style:{width:"38px",height:"20px",borderRadius:"10px",background:g.enabled?"var(--text-accent)":"var(--text-muted)",position:"relative",border:"none",cursor:"pointer",transition:"var(--transition-smooth)"},children:l.jsx("div",{style:{width:"14px",height:"14px",borderRadius:"50%",background:"#fff",position:"absolute",top:"3px",left:g.enabled?"21px":"3px",transition:"var(--transition-smooth)"}})}),l.jsx("button",{type:"button",className:"btn btn-danger",style:{padding:"6px 12px",fontSize:"12px"},onClick:()=>o(g.id),children:"Xóa"})]})]},g.id))})]})},Pf=({platforms:e,onTogglePlatform:t,onDeletePlatform:n})=>l.jsxs("div",{className:"glass-panel animate-fade-in",style:{padding:"30px",display:"flex",flexDirection:"column",gap:"20px",width:"100%"},children:[l.jsx("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:l.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[l.jsx(nf,{size:20,style:{color:"var(--text-accent)"}}),l.jsx("h3",{style:{fontSize:"18px",fontWeight:600},children:"Quản lý Nền tảng (Platforms)"})]})}),l.jsx("p",{style:{fontSize:"13px",color:"var(--text-secondary)",marginTop:"-8px"},children:"Kích hoạt các nền tảng mong muốn xuất hiện trên thanh bên."}),l.jsx("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(220px, 1fr))",gap:"16px"},children:e.map(r=>l.jsxs("div",{className:"glass-panel",style:{padding:"16px",display:"flex",flexDirection:"column",justifyContent:"space-between",gap:"12px",background:"var(--bg-card)",border:"1px solid var(--border-color)",borderRadius:"12px",transition:"var(--transition-smooth)"},children:[l.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between"},children:[l.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[l.jsx(oi,{name:r.icon,size:20}),l.jsx("span",{style:{fontWeight:600,fontSize:"14px"},children:r.name})]}),r.is_custom&&l.jsx("button",{type:"button",style:{background:"none",border:"none",color:"#ff4b2b",cursor:"pointer",padding:"2px"},onClick:()=>n(r.id),title:"Xóa nền tảng",children:l.jsx(un,{size:14})})]}),l.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",borderTop:"1px solid var(--border-color)",paddingTop:"10px"},children:[l.jsx("span",{style:{fontSize:"11px",color:"var(--text-secondary)"},children:r.is_custom?"Tùy chỉnh":"Mặc định"}),l.jsx("button",{type:"button",onClick:()=>t(r.id,r.is_active),style:{width:"38px",height:"20px",borderRadius:"10px",background:r.is_active?"var(--text-accent)":"var(--text-muted)",position:"relative",border:"none",cursor:"pointer",transition:"var(--transition-smooth)"},children:l.jsx("div",{style:{width:"14px",height:"14px",borderRadius:"50%",background:"#fff",position:"absolute",top:"3px",left:r.is_active?"21px":"3px",transition:"var(--transition-smooth)"}})})]})]},r.id))})]}),Ef=()=>{const{fetchWithAuth:e}=St(),[t,n]=C.useState(null),[r,i]=C.useState(!1),[s,o]=C.useState(null),[a,c]=C.useState(!1),[d,x]=C.useState(!1),[y,g]=C.useState(null),[k,S]=C.useState(!1),[m,N]=C.useState(!1),[p,u]=C.useState(!1),f=async()=>{i(!0),o(null);try{const U=await e("/api/tailscale/status");if(U.ok){const P=await U.json();n(P)}else{const P=await U.json();o(P.error||"Không thể lấy trạng thái Tailscale")}}catch(U){console.error("Failed to fetch Tailscale status:",U),o("Lỗi kết nối máy chủ")}finally{i(!1)}},j=async()=>{o(null);try{const U=await e("/api/tailscale/install",{method:"POST"});if(U.ok)f();else{const P=await U.json();o(P.error||"Yêu cầu cài đặt tự động thất bại")}}catch(U){console.error("Failed to trigger install:",U),o("Lỗi kết nối máy chủ")}},v=async()=>{x(!0),o(null);try{const U=await e("/api/tailscale/provision-cert",{method:"POST"}),P=await U.json();U.ok&&P.success?(alert(P.message),f()):o(P.error||P.message||"Lỗi cấp chứng chỉ")}catch(U){console.error("Failed to provision cert:",U),o("Lỗi kết nối máy chủ")}finally{x(!1)}},w=async(U,P=!0,X)=>{o(null),c(!0);try{const re=await e("/api/tailscale/connect",{method:"POST",body:JSON.stringify({authKey:U,acceptDns:P,exitNode:X})}),A=await re.json();re.ok?f():o(A.error||"Kết nối Tailscale thất bại")}catch(re){console.error("Failed to connect Tailscale:",re),o("Lỗi kết nối máy chủ")}finally{c(!1)}},z=async()=>{if(confirm("Bạn có chắc chắn muốn ngắt kết nối Tailscale không?")){o(null),i(!0);try{const U=await e("/api/tailscale/disconnect",{method:"POST"});if(U.ok)f();else{const P=await U.json();o(P.error||"Ngắt kết nối thất bại")}}catch(U){console.error("Failed to disconnect Tailscale:",U),o("Lỗi kết nối máy chủ")}finally{i(!1)}}},T=async()=>{if(confirm("Bạn có chắc chắn muốn đăng xuất tài khoản Tailscale khỏi thiết bị này không?")){o(null),i(!0);try{const U=await e("/api/tailscale/logout",{method:"POST"});if(U.ok)f();else{const P=await U.json();o(P.error||"Đăng xuất thất bại")}}catch(U){console.error("Failed to logout Tailscale:",U),o("Lỗi kết nối máy chủ")}finally{i(!1)}}},D=async()=>{S(!0);try{const U=await e("/api/tailscale/funnel-status");if(U.ok){const P=await U.json();g(P)}}catch(U){console.error("Failed to fetch funnel status:",U)}finally{S(!1)}},L=async U=>{N(!0),o(null);try{const P=await e("/api/tailscale/funnel/toggle",{method:"POST",body:JSON.stringify({active:U})});if(P.ok)D();else{const X=await P.json();o(X.error||"Failed to toggle funnel")}}catch(P){console.error("Failed to toggle funnel:",P),o("Lỗi kết nối máy chủ")}finally{N(!1)}},Z=async U=>{u(!0),o(null);try{const P=await e("/api/tailscale/serve/toggle",{method:"POST",body:JSON.stringify({active:U})});if(P.ok)D();else{const X=await P.json();o(X.error||"Failed to toggle serve")}}catch(P){console.error("Failed to toggle serve:",P),o("Lỗi kết nối máy chủ")}finally{u(!1)}};return C.useEffect(()=>{let U;return(t==null?void 0:t.backendState)==="Installing"&&(U=setInterval(()=>{f()},1500)),()=>clearInterval(U)},[t==null?void 0:t.backendState]),C.useEffect(()=>{f(),D()},[]),{tailscaleStatus:t,isLoadingTailscale:r,tailscaleError:s,setTailscaleError:o,isSubmittingTailscale:a,isProvisioningCert:d,funnelStatus:y,isLoadingFunnel:k,isTogglingFunnel:m,isTogglingServe:p,fetchTailscaleStatus:f,handleInstallTailscale:j,handleProvisionCert:v,handleTailscaleConnect:w,handleTailscaleDisconnect:z,handleTailscaleLogout:T,fetchFunnelStatus:D,handleToggleFunnel:L,handleToggleServe:Z}},Nf=()=>{const{fetchWithAuth:e}=St(),[t,n]=C.useState([]),[r,i]=C.useState(!1),[s,o]=C.useState(!1),[a,c]=C.useState(null),[d,x]=C.useState(null),y=async()=>{i(!0);try{const m=await e("/api/auth/api-keys");if(m.ok){const N=await m.json();n(N)}}catch(m){console.error("Failed to fetch API keys:",m)}finally{i(!1)}},g=async m=>{o(!0),x(null);try{const N=await e("/api/auth/api-keys",{method:"POST",body:JSON.stringify({name:m})}),p=await N.json();N.ok&&p.success?(c(p.key),y()):x(p.error||"Failed to create API key")}catch(N){console.error("Failed to create API key:",N),x("Lỗi kết nối máy chủ")}finally{o(!1)}},k=async(m,N)=>{try{(await e(`/api/auth/api-keys/${m}/toggle`,{method:"POST",body:JSON.stringify({enabled:!N})})).ok&&y()}catch(p){console.error("Failed to toggle API key:",p)}},S=async m=>{if(confirm("Bạn có chắc chắn muốn xóa API Key này không? Kết nối từ Chrome Extension của thiết bị tương ứng sẽ bị ngắt hoàn toàn."))try{(await e(`/api/auth/api-keys/${m}`,{method:"DELETE"})).ok&&y()}catch(N){console.error("Failed to delete API key:",N)}};return C.useEffect(()=>{y()},[]),{apiKeys:t,isLoadingKeys:r,isCreatingKey:s,generatedKey:a,setGeneratedKey:c,apiKeyError:d,setApiKeyError:x,fetchApiKeys:y,handleCreateApiKey:g,handleToggleApiKey:k,handleDeleteApiKey:S}},If=()=>{const{fetchWithAuth:e,updateSessionToken:t}=St(),[n,r]=C.useState(""),[i,s]=C.useState(""),[o,a]=C.useState(""),[c,d]=C.useState(""),[x,y]=C.useState(null),[g,k]=C.useState(null),[S,m]=C.useState(!1),[N,p]=C.useState(null),[u,f]=C.useState(!1),[j,v]=C.useState(null),w=async()=>{f(!0),v(null);try{const T=await e("/api/auth/vault-info"),D=T.headers.get("content-type");if(!D||!D.includes("application/json")){v("API không tồn tại hoặc Server chưa được khởi động lại");return}if(T.ok){const L=await T.json();p(L)}else{const L=await T.json();v(L.error||"Không thể tải thông tin Vault")}}catch(T){console.error("Failed to fetch vault info:",T),v("Lỗi kết nối máy chủ")}finally{f(!1)}},z=async T=>{if(T.preventDefault(),y(null),k(null),i.length<8){y("Mật khẩu mới phải từ 8 ký tự trở lên");return}if(i!==o){y("Mật khẩu xác nhận không khớp");return}m(!0);try{const D=await e("/api/auth/change-password",{method:"POST",body:JSON.stringify({currentPassword:n,newPassword:i,hint:c||void 0})}),L=D.headers.get("content-type");if(!L||!L.includes("application/json")){y("API không tồn tại hoặc Server chưa được khởi động lại");return}const Z=await D.json();D.ok&&Z.success?(k("Đổi mật khẩu Master thành công!"),t(Z.token),r(""),s(""),a(""),d("")):y(Z.error||"Có lỗi xảy ra khi đổi mật khẩu")}catch(D){console.error("Failed to change password:",D),y("Lỗi kết nối máy chủ")}finally{m(!1)}};return C.useEffect(()=>{w()},[]),{currentPassword:n,setCurrentPassword:r,newPassword:i,setNewPassword:s,confirmNewPassword:o,setConfirmNewPassword:a,newHint:c,setNewHint:d,passwordError:x,passwordSuccess:g,isChangingPassword:S,vaultInfo:N,isLoadingVaultInfo:u,vaultInfoError:j,fetchVaultInfo:w,handleChangePassword:z}},_f=({platforms:e,onTogglePlatform:t,onDeletePlatform:n})=>{const{tailscaleStatus:r,isLoadingTailscale:i,tailscaleError:s,setTailscaleError:o,isSubmittingTailscale:a,isProvisioningCert:c,funnelStatus:d,isLoadingFunnel:x,isTogglingFunnel:y,isTogglingServe:g,handleInstallTailscale:k,handleProvisionCert:S,handleTailscaleConnect:m,handleTailscaleDisconnect:N,handleTailscaleLogout:p,handleToggleFunnel:u,handleToggleServe:f}=Ef(),{apiKeys:j,isLoadingKeys:v,isCreatingKey:w,generatedKey:z,setGeneratedKey:T,handleCreateApiKey:D,handleToggleApiKey:L,handleDeleteApiKey:Z}=Nf(),{currentPassword:U,setCurrentPassword:P,newPassword:X,setNewPassword:re,confirmNewPassword:A,setConfirmNewPassword:W,newHint:b,setNewHint:M,passwordError:F,passwordSuccess:H,isChangingPassword:K,vaultInfo:h,isLoadingVaultInfo:E,vaultInfoError:V,handleChangePassword:$}=If();return l.jsxs("main",{style:{display:"flex",flexDirection:"column",gap:"24px"},className:"animate-fade-in",children:[l.jsx("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",borderBottom:"1px solid var(--border-color)",paddingBottom:"12px"},children:l.jsx("h2",{style:{fontSize:"18px",fontWeight:600},children:"Cài đặt hệ thống"})}),l.jsxs("div",{style:{display:"grid",gridTemplateColumns:"repeat(2, 1fr)",gap:"24px",width:"100%"},children:[l.jsx(Sf,{currentPassword:U,setCurrentPassword:P,newPassword:X,setNewPassword:re,confirmNewPassword:A,setConfirmNewPassword:W,newHint:b,setNewHint:M,passwordError:F,passwordSuccess:H,isChangingPassword:K,onSubmit:$}),l.jsx(Cf,{vaultInfo:h,isLoadingVaultInfo:E,vaultInfoError:V}),l.jsx(bf,{tailscaleStatus:r,isLoadingTailscale:i,tailscaleError:s,setTailscaleError:o,isSubmittingTailscale:a,isProvisioningCert:c,onInstall:k,onConnect:m,onDisconnect:N,onLogout:p,onProvisionCert:S}),l.jsx(zf,{tailscaleStatus:r,funnelStatus:d,isLoadingFunnel:x,isTogglingServe:g,isTogglingFunnel:y,onToggleServe:f,onToggleFunnel:u}),l.jsx(Tf,{apiKeys:j,isLoadingKeys:v,isCreatingKey:w,generatedKey:z,setGeneratedKey:T,onToggleKey:L,onDeleteKey:Z,onCreateKey:D})]}),l.jsx(Pf,{platforms:e,onTogglePlatform:t,onDeletePlatform:n})]})};function Lf(e){if(!e||e.length!==2)return"";const t=e.toUpperCase().split("").map(n=>127397+n.charCodeAt(0));return String.fromCodePoint(...t)}const Mf=()=>{const{fetchWithAuth:e}=St(),[t,n]=C.useState(""),[r,i]=C.useState(5e3),[s,o]=C.useState(10),[a,c]=C.useState([]),[d,x]=C.useState(!1),[y,g]=C.useState({current:0,total:0}),k=C.useRef(!1),[S,m]=C.useState(""),[N,p]=C.useState("all"),u=async()=>{if(!t.trim())return;const P=t.split(`
263
- `).map(A=>A.trim()).filter(A=>A.length>0);if(P.length===0)return;x(!0),k.current=!1,g({current:0,total:P.length}),c([]);const X=s,re=[];for(let A=0;A<P.length&&!k.current;A+=X){const W=P.slice(A,A+X);try{const b=await e("/api/proxy/check",{method:"POST",body:JSON.stringify({proxies:W,timeout:r,concurrency:X})});if(b.ok){const M=await b.json();M.success&&Array.isArray(M.results)&&(re.push(...M.results),c([...re]))}else{const M=W.map(F=>({proxy:F,host:"",port:0,status:"dead",error:`API Request Failed (HTTP ${b.status})`}));re.push(...M),c([...re])}}catch(b){const M=W.map(F=>({proxy:F,host:"",port:0,status:"dead",error:b.message||"Lỗi mạng API"}));re.push(...M),c([...re])}g(b=>({...b,current:Math.min(b.current+W.length,b.total)}))}x(!1)},f=()=>{k.current=!0,x(!1)},j=()=>{n(""),c([]),g({current:0,total:0})},v=a.filter(P=>P.status==="active").length,w=a.filter(P=>P.status==="dead").length,z=v>0?Math.round(a.filter(P=>P.status==="active").reduce((P,X)=>P+(X.latency||0),0)/v):0,T=a.filter(P=>{const X=P.proxy.toLowerCase().includes(S.toLowerCase())||P.ip&&P.ip.toLowerCase().includes(S.toLowerCase())||P.country&&P.country.toLowerCase().includes(S.toLowerCase());return N==="live"?X&&P.status==="active":N==="dead"?X&&P.status==="dead":X}),D=()=>{const P=a.filter(X=>X.status==="active").map(X=>X.proxy).join(`
260
+ */const un=X("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);/**
261
+ * @license lucide-react v0.378.0 - ISC
262
+ *
263
+ * This source code is licensed under the ISC license.
264
+ * See the LICENSE file in the root directory of this source tree.
265
+ */const df=X("Upload",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"17 8 12 3 7 8",key:"t8dd8p"}],["line",{x1:"12",x2:"12",y1:"3",y2:"15",key:"widbto"}]]);/**
266
+ * @license lucide-react v0.378.0 - ISC
267
+ *
268
+ * This source code is licensed under the ISC license.
269
+ * See the LICENSE file in the root directory of this source tree.
270
+ */const fn=X("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),pf=()=>{const{isInitialized:e,initializeVault:t,unlockVault:n,getHint:r,theme:i,toggleTheme:s}=St(),[o,a]=j.useState(""),[c,u]=j.useState(""),[x,y]=j.useState(!1),[g,k]=j.useState(null),[C,m]=j.useState(!1),[N,p]=j.useState(null),[d,f]=j.useState(!1);Vt.useEffect(()=>{e&&r().then(S=>{S==="Mật khẩu mặc định là 180823"&&f(!0)})},[e]);const w=async S=>{if(S.preventDefault(),!!o){k(null),m(!0);try{let z=!1;if(e)z=await n(o);else{if(o.length<8){k("Mật khẩu Master phải từ 8 ký tự trở lên"),m(!1);return}z=await t(o,c)}z||k(e?"Mật khẩu Master không chính xác!":"Không thể khởi tạo vault!")}catch{k("Đã xảy ra lỗi hệ thống, vui lòng thử lại.")}finally{m(!1)}}},v=async()=>{const S=await r();p(S||"Không có gợi ý nào được thiết lập.")};return l.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",minHeight:"100vh",padding:"20px",position:"relative"},children:[l.jsx("button",{type:"button",className:"btn btn-secondary",onClick:s,style:{position:"absolute",top:"20px",right:"20px",borderRadius:"50%",width:"40px",height:"40px",padding:0,display:"flex",alignItems:"center",justifyContent:"center",zIndex:10},title:i==="dark"?"Chuyển sang chế độ sáng":"Chuyển sang chế độ tối",children:i==="dark"?l.jsx(hd,{size:18}):l.jsx(od,{size:18})}),l.jsxs("div",{className:"glass-panel animate-fade-in",style:{width:"100%",maxWidth:"450px",padding:"40px",display:"flex",flexDirection:"column",gap:"24px"},children:[l.jsxs("div",{style:{textAlign:"center",display:"flex",flexDirection:"column",alignItems:"center",gap:"12px"},children:[l.jsx("div",{style:{background:"var(--primary-gradient)",padding:"14px",borderRadius:"50%",display:"inline-flex",boxShadow:"var(--glow-accent)"},children:l.jsx(dd,{size:32,color:"#030712"})}),l.jsx("h2",{className:"gradient-text",style:{fontSize:"28px",fontWeight:700},children:"Account Manager"}),l.jsx("p",{style:{color:"var(--text-secondary)",fontSize:"14px"},children:e?"Nhập mật khẩu Master để giải mã dữ liệu của bạn":"Tạo mật khẩu Master để bắt đầu lưu trữ bảo mật"})]}),e&&d&&l.jsxs("div",{style:{background:"rgba(245, 158, 11, 0.08)",border:"1px solid rgba(245, 158, 11, 0.25)",color:"var(--text-accent)",padding:"12px 16px",borderRadius:"8px",fontSize:"13px",lineHeight:"1.5",display:"flex",flexDirection:"column",gap:"4px",textAlign:"left"},children:[l.jsx("div",{style:{fontWeight:600,display:"flex",alignItems:"center",gap:"6px"},children:l.jsxs("span",{children:["💡 Mật khẩu mặc định: ",l.jsx("strong",{children:"180823"})]})}),l.jsxs("span",{style:{color:"var(--text-secondary)",fontSize:"12px"},children:["Vui lòng sử dụng mật khẩu trên để đăng nhập lần đầu, sau đó đổi mật khẩu trong phần ",l.jsx("strong",{children:"Cài đặt"})," để bảo vệ dữ liệu."]})]}),l.jsxs("form",{onSubmit:w,style:{display:"flex",flexDirection:"column",gap:"20px"},children:[g&&l.jsx("div",{style:{background:"rgba(255, 75, 43, 0.1)",border:"1px solid rgba(255, 75, 43, 0.3)",color:"#ff6b6b",padding:"12px 16px",borderRadius:"8px",fontSize:"13px",textAlign:"center"},children:g}),l.jsxs("div",{className:"form-group",style:{position:"relative"},children:[l.jsx("label",{className:"form-label",htmlFor:"password",children:"Mật khẩu Master"}),l.jsxs("div",{style:{position:"relative",display:"flex",alignItems:"center"},children:[l.jsx("input",{id:"password",type:x?"text":"password",className:"form-input",placeholder:"Nhập mật khẩu chính...",value:o,onChange:S=>a(S.target.value),style:{paddingRight:"46px"},disabled:C,autoComplete:"current-password"}),l.jsx("button",{type:"button",onClick:()=>y(!x),style:{position:"absolute",right:"12px",background:"none",border:"none",color:"var(--text-secondary)",cursor:"pointer",display:"flex",alignItems:"center"},children:x?l.jsx(Mn,{size:18}):l.jsx(Dn,{size:18})})]})]}),!e&&l.jsxs("div",{className:"form-group",children:[l.jsx("label",{className:"form-label",htmlFor:"hint",children:"Gợi ý mật khẩu (Tùy chọn)"}),l.jsx("input",{id:"hint",type:"text",className:"form-input",placeholder:"Nhập gợi ý gợi nhớ mật khẩu...",value:c,onChange:S=>u(S.target.value),disabled:C})]}),l.jsx("button",{type:"submit",className:"btn btn-primary",style:{width:"100%",padding:"14px",fontSize:"15px"},disabled:C,children:C?l.jsx("div",{className:"spinner",style:{width:"18px",height:"18px"}}):l.jsxs(l.Fragment,{children:[l.jsx(sf,{size:18}),e?"Mở khóa Vault":"Thiết lập Vault"]})})]}),e&&l.jsx("div",{style:{display:"flex",justifyContent:"center",marginTop:"8px"},children:N?l.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"6px",fontSize:"13px",color:"var(--text-accent)",background:"var(--bg-main)",padding:"8px 12px",borderRadius:"6px",border:"1px solid var(--border-color)"},children:[l.jsx(lf,{size:14}),l.jsxs("span",{children:["Gợi ý: ",l.jsx("strong",{children:N})]})]}):l.jsx("button",{type:"button",onClick:v,style:{background:"none",border:"none",color:"var(--text-muted)",fontSize:"13px",cursor:"pointer",textDecoration:"underline"},children:"Quên mật khẩu? Hiển thị gợi ý"})})]})]})},ff=({search:e,setSearch:t,theme:n,toggleTheme:r,onSmartPasteOpen:i,onLockVault:s,onImportExportOpen:o})=>{const[a,c]=j.useState(!1),u=j.useRef(null);j.useEffect(()=>{const y=g=>{var k;(g.metaKey||g.ctrlKey)&&g.key.toLowerCase()==="k"&&(g.preventDefault(),(k=u.current)==null||k.focus())};return window.addEventListener("keydown",y),()=>window.removeEventListener("keydown",y)},[]);const x=typeof window<"u"&&/Mac|iPhone|iPod|iPad/i.test(navigator.userAgent||"");return l.jsxs("header",{className:"glass-panel",style:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"14px 20px",width:"100%",position:"sticky",top:"0",zIndex:100},children:[l.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"24px",flex:1,marginRight:"16px"},children:[l.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"10px",flexShrink:0},children:[l.jsx(ud,{size:28,style:{color:"var(--text-accent)"}}),l.jsx("h1",{className:"gradient-text",style:{fontSize:"22px",fontWeight:800},children:"Account Manager"})]}),l.jsxs("div",{style:{position:"relative",width:"100%",maxWidth:"320px",flexShrink:1},children:[l.jsx(oi,{size:18,style:{position:"absolute",left:"12px",top:"50%",transform:"translateY(-50%)",color:"var(--text-muted)"}}),l.jsx("input",{ref:u,type:"text",className:"form-input",placeholder:"Tìm kiếm tài khoản, website...",value:e,onChange:y=>t(y.target.value),onFocus:()=>c(!0),onBlur:()=>c(!1),style:{paddingLeft:"38px",paddingRight:"60px",borderRadius:"24px",width:"100%",padding:"8px 16px 8px 38px"},"aria-label":"Tìm kiếm tài khoản và mật khẩu"}),!a&&!e&&l.jsxs("div",{style:{position:"absolute",right:"12px",top:"50%",transform:"translateY(-50%)",display:"flex",alignItems:"center",gap:"3px",padding:"2px 6px",borderRadius:"4px",background:"var(--btn-secondary-bg)",border:"1px solid var(--border-color)",fontSize:"10px",color:"var(--text-secondary)",pointerEvents:"none",userSelect:"none",fontFamily:"monospace"},children:[l.jsx("span",{children:x?"⌘":"Ctrl"}),l.jsx("span",{children:"+"}),l.jsx("span",{children:"K"})]})]})]}),l.jsxs("div",{style:{display:"flex",gap:"8px",alignItems:"center"},children:[l.jsx("button",{type:"button",className:"btn btn-secondary",onClick:r,style:{padding:"6px",borderRadius:"50%",width:"32px",height:"32px",display:"flex",alignItems:"center",justifyContent:"center"},title:n==="dark"?"Chuyển sang chế độ sáng":"Chuyển sang chế độ tối",children:n==="dark"?l.jsx(hd,{size:16}):l.jsx(od,{size:16})}),l.jsxs("button",{type:"button",className:"btn btn-secondary",onClick:o,style:{display:"flex",alignItems:"center",gap:"6px",padding:"7px 14px",fontSize:"13px"},children:[l.jsx(Vn,{size:16}),"Nhập / Xuất"]}),l.jsxs("button",{className:"btn btn-secondary",onClick:i,style:{padding:"7px 14px",fontSize:"13px"},children:[l.jsx(tf,{size:16}),"Dán nhanh"]}),l.jsxs("button",{className:"btn btn-secondary",onClick:s,style:{padding:"7px 14px",fontSize:"13px"},children:[l.jsx(af,{size:16}),"Khóa Vault"]})]})]})},ai=({name:e,size:t=16,className:n=""})=>{const r=e.toLowerCase();return r.includes("google")?l.jsxs("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"none",className:n,style:{display:"inline-block",verticalAlign:"middle"},children:[l.jsx("path",{d:"M22.56 12.25c0-.78-.07-1.53-.2-2.25H12v4.26h5.92c-.26 1.37-1.04 2.53-2.21 3.31v2.77h3.57c2.08-1.92 3.28-4.74 3.28-8.09z",fill:"#4285F4"}),l.jsx("path",{d:"M12 23c2.97 0 5.46-.98 7.28-2.66l-3.57-2.77c-.98.66-2.23 1.06-3.71 1.06-2.86 0-5.29-1.93-6.16-4.53H2.18v2.84C3.99 20.53 7.7 23 12 23z",fill:"#34A853"}),l.jsx("path",{d:"M5.84 14.09c-.22-.66-.35-1.36-.35-2.09s.13-1.43.35-2.09V7.06H2.18C1.43 8.55 1 10.22 1 12s.43 3.45 1.18 4.94l2.85-2.22.81-.63z",fill:"#FBBC05"}),l.jsx("path",{d:"M12 5.38c1.62 0 3.06.56 4.21 1.64l3.15-3.15C17.45 2.09 14.97 1 12 1 7.7 1 3.99 3.47 2.18 7.06l3.66 2.84c.87-2.6 3.3-4.53 6.16-4.53z",fill:"#EA4335"})]}):r.includes("facebook")?l.jsxs("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"none",className:n,style:{display:"inline-block",verticalAlign:"middle"},children:[l.jsx("circle",{cx:"12",cy:"12.073",r:"11.5",fill:"#FFFFFF"}),l.jsx("path",{d:"M24 12.073c0-6.627-5.373-12-12-12s-12 5.373-12 12c0 5.99 4.388 10.954 10.125 11.854v-8.385H7.078v-3.47h3.047V9.43c0-3.007 1.792-4.669 4.533-4.669 1.312 0 2.686.235 2.686.235v2.953H15.83c-1.491 0-1.956.925-1.956 1.874v2.25h3.328l-.532 3.47h-2.796v8.385C19.612 23.027 24 18.062 24 12.073z",fill:"#1877F2"})]}):r.includes("github")?l.jsx("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"currentColor",className:n,style:{display:"inline-block",verticalAlign:"middle",color:"var(--text-primary)"},children:l.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12 2C6.477 2 2 6.477 2 12c0 4.42 2.865 8.166 6.839 9.489.5.092.682-.217.682-.482 0-.237-.008-.866-.013-1.7-2.782.603-3.369-1.34-3.369-1.34-.454-1.156-1.11-1.464-1.11-1.464-.908-.62.069-.608.069-.608 1.003.07 1.531 1.03 1.531 1.03.892 1.529 2.341 1.087 2.91.831.092-.646.35-1.086.636-1.336-2.22-.253-4.555-1.11-4.555-4.943 0-1.091.39-1.984 1.029-2.683-.103-.253-.446-1.27.098-2.647 0 0 .84-.269 2.75 1.025A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.294 2.747-1.025 2.747-1.025.546 1.377.203 2.394.1 2.647.64.699 1.028 1.592 1.028 2.683 0 3.842-2.339 4.687-4.566 4.935.359.309.678.919.678 1.852 0 1.336-.012 2.415-.012 2.743 0 .267.18.579.688.481C19.137 20.162 22 16.418 22 12c0-5.523-4.477-10-10-10z"})}):r.includes("hotmail")||r.includes("outlook")||r.includes("microsoft")?l.jsxs("svg",{width:t,height:t,viewBox:"0 0 512 512",fill:"none",className:n,style:{display:"inline-block",verticalAlign:"middle"},children:[l.jsxs("defs",{children:[l.jsxs("linearGradient",{id:"outlook-svgid-1",gradientUnits:"userSpaceOnUse",x1:"315.5344",y1:"-877.4263",x2:"315.5344",y2:"-651.1933",gradientTransform:"matrix(1 0 0 1 0 1145.3334)",children:[l.jsx("stop",{offset:"0",stopColor:"#35B8F1"}),l.jsx("stop",{offset:"1",stopColor:"#28A8EA"})]}),l.jsxs("linearGradient",{id:"outlook-svgid-2",gradientUnits:"userSpaceOnUse",x1:"45.5066",y1:"-1037.3639",x2:"216.4467",y2:"-741.3027",gradientTransform:"matrix(1 0 0 1 0 1145.3334)",children:[l.jsx("stop",{offset:"0",stopColor:"#1784D9"}),l.jsx("stop",{offset:"0.5",stopColor:"#107AD5"}),l.jsx("stop",{offset:"1",stopColor:"#0A63C9"})]})]}),l.jsx("path",{fill:"#0A2767",d:"M512,267.91c0.03-4-2.04-7.73-5.45-9.82h-0.06l-0.21-0.12L328.86,152.95c-0.77-0.52-1.56-0.99-2.38-1.42 c-6.85-3.53-14.99-3.53-21.84,0c-0.82,0.43-1.62,0.9-2.38,1.42L124.84,257.96l-0.21,0.12c-5.42,3.37-7.08,10.5-3.71,15.92 c0.99,1.6,2.36,2.93,3.99,3.88L302.32,382.9c0.77,0.51,1.56,0.99,2.38,1.42c6.85,3.53,14.99,3.53,21.84,0 c0.82-0.43,1.61-0.9,2.38-1.42l177.41-105.02C509.88,275.82,512.04,272.01,512,267.91z"}),l.jsx("path",{fill:"#0364B8",d:"M145.53,197.79h116.43v106.72H145.53V197.79z M488.19,89.3V40.48c0.28-12.21-9.38-22.33-21.59-22.62H164.47 c-12.21,0.29-21.87,10.42-21.59,22.62V89.3l178.6,47.63L488.19,89.3z"}),l.jsx("path",{fill:"#0078D4",d:"M142.88,89.3h119.07v107.16H142.88V89.3z"}),l.jsx("path",{fill:"#28A8EA",d:"M381.02,89.3H261.95v107.16l119.07,107.16h107.16V196.47L381.02,89.3z"}),l.jsx("path",{fill:"#0078D4",d:"M261.95,196.47h119.07v107.16H261.95V196.47z"}),l.jsx("path",{fill:"#0364B8",d:"M261.95,303.63h119.07v107.16H261.95V303.63z"}),l.jsx("path",{fill:"#14447D",d:"M145.53,304.51h116.43v97.02H145.53V304.51z"}),l.jsx("path",{fill:"#0078D4",d:"M381.02,303.63h107.16v107.16H381.02V303.63z"}),l.jsx("path",{fill:"url(#outlook-svgid-1)",d:"M506.55,277.23l-0.23,0.12l-177.41,99.78c-0.77,0.48-1.56,0.93-2.38,1.33c-3.01,1.43-6.29,2.25-9.62,2.38 l-9.69-5.67c-0.82-0.41-1.61-0.87-2.38-1.37l-179.8-102.61h-0.08l-5.88-3.29V469.9c0.09,13.48,11.09,24.33,24.56,24.24h344.18 c0.2,0,0.38-0.1,0.6-0.1c2.85-0.18,5.65-0.77,8.33-1.74c1.16-0.49,2.28-1.07,3.35-1.74c0.8-0.45,2.17-1.44,2.17-1.44 c6.1-4.51,9.71-11.64,9.74-19.23V267.91C512,271.77,509.91,275.33,506.55,277.23z"}),l.jsx("path",{fill:"#0A2767",opacity:.5,d:"M502.47,267.11v12.38L316.96,407.22L124.9,271.28c0-0.07-0.05-0.12-0.12-0.12l0,0l-17.62-10.6v-8.93l7.26-0.12 l15.36,8.81l0.36,0.12l1.31,0.83c0,0,180.51,103,180.99,103.23l6.91,4.05c0.6-0.24,1.19-0.48,1.91-0.71 c0.36-0.24,179.2-100.85,179.2-100.85L502.47,267.11z"}),l.jsx("path",{fill:"#1490DF",d:"M506.55,277.23l-0.23,0.13l-177.41,99.78c-0.77,0.48-1.56,0.93-2.38,1.33c-6.89,3.37-14.95,3.37-21.84,0 c-0.82-0.4-1.61-0.85-2.38-1.33l-177.41-99.78l-0.21-0.13c-3.43-1.86-5.57-5.43-5.61-9.32V469.9c0.09,13.47,11.08,24.33,24.55,24.24 c0,0,0,0,0,0h343.83c13.47,0.09,24.47-10.77,24.55-24.24c0,0,0,0,0,0V267.91C512,271.77,509.91,275.33,506.55,277.23z"}),l.jsx("path",{fill:"#000000",opacity:.1,d:"M331.49,375.67l-2.66,1.49c-0.77,0.49-1.56,0.94-2.38,1.35c-2.93,1.44-6.11,2.28-9.36,2.48l67.5,79.82 l117.75,28.37c3.23-2.44,5.79-5.64,7.47-9.32L331.49,375.67z"}),l.jsx("path",{fill:"#000000",opacity:.05,d:"M343.52,368.9l-14.68,8.25c-0.77,0.49-1.56,0.94-2.38,1.35c-2.93,1.44-6.11,2.28-9.36,2.48l31.62,87.19 l153.66,20.97c6.05-4.54,9.62-11.67,9.62-19.24v-2.61L343.52,368.9z"}),l.jsx("path",{fill:"#28A8EA",d:"M143.96,494.14h343.46c5.29,0.03,10.44-1.64,14.7-4.76L307.2,375.2c-0.82-0.41-1.61-0.87-2.38-1.37 l-179.8-102.61h-0.08l-5.87-3.31v201.3C119.06,482.96,130.2,494.13,143.96,494.14C143.96,494.14,143.96,494.14,143.96,494.14z"}),l.jsx("path",{fill:"#000000",opacity:.1,d:"M285.77,134.94v253.98c-0.02,8.9-5.44,16.91-13.69,20.24c-2.56,1.1-5.31,1.67-8.1,1.67H119.07v-285.8h23.81 v-11.91h121.09C276.01,113.16,285.74,122.91,285.77,134.94z"}),l.jsx("path",{fill:"#000000",opacity:.2,d:"M273.86,146.85v253.98c0.03,2.88-0.58,5.72-1.79,8.33c-3.31,8.15-11.21,13.5-20,13.54h-133V125.02h133 c3.45-0.03,6.86,0.83,9.88,2.5C269.25,131.2,273.86,138.68,273.86,146.85z"}),l.jsx("path",{fill:"#000000",opacity:.2,d:"M273.86,146.85v230.16c-0.06,12.02-9.77,21.77-21.79,21.87h-133V125.02h133c3.45-0.03,6.86,0.83,9.88,2.5 C269.25,131.2,273.86,138.68,273.86,146.85z"}),l.jsx("path",{fill:"#000000",opacity:.2,d:"M261.95,146.85v230.16c-0.01,12.04-9.75,21.81-21.79,21.87H119.07V125.02h121.09 c12.04,0.01,21.8,9.77,21.79,21.81C261.95,146.84,261.95,146.84,261.95,146.85z"}),l.jsx("path",{fill:"url(#outlook-svgid-2)",d:"M21.83,125.02h218.3c12.05,0,21.83,9.77,21.83,21.83v218.3c0,12.05-9.77,21.83-21.83,21.83H21.83 C9.77,386.98,0,377.2,0,365.15v-218.3C0,134.8,9.77,125.02,21.83,125.02z"}),l.jsx("path",{fill:"#FFFFFF",d:"M68.22,216.56c5.38-11.46,14.06-21.05,24.93-27.54c12.04-6.89,25.75-10.33,39.61-9.93 c12.85-0.28,25.53,2.98,36.66,9.42c10.46,6.24,18.89,15.38,24.25,26.31c5.85,12.05,8.76,25.31,8.5,38.7 c0.28,13.99-2.71,27.86-8.75,40.48c-5.49,11.33-14.19,20.79-25,27.23c-11.56,6.64-24.71,9.98-38.03,9.67 c-13.13,0.32-26.09-2.98-37.47-9.53c-10.55-6.25-19.08-15.4-24.58-26.36c-5.88-11.87-8.83-24.99-8.6-38.23 C59.5,242.91,62.4,229.16,68.22,216.56z M94.79,281.22c2.87,7.25,7.73,13.53,14.03,18.12c6.41,4.48,14.09,6.79,21.91,6.6 c8.33,0.33,16.54-2.06,23.39-6.81c6.22-4.58,10.95-10.88,13.62-18.12c2.99-8.09,4.46-16.66,4.35-25.28c0.09-8.7-1.29-17.36-4.1-25.6 c-2.48-7.44-7.06-14-13.19-18.88c-6.68-4.97-14.86-7.5-23.18-7.14c-7.99-0.21-15.84,2.12-22.42,6.66 c-6.4,4.61-11.36,10.95-14.29,18.28c-6.5,16.79-6.54,35.4-0.1,52.21L94.79,281.22z"}),l.jsx("path",{fill:"#50D9FF",d:"M381.02,89.3h107.16v107.16H381.02V89.3z"})]}):r.includes("twitter")||r.includes(" x ")||r==="x"?l.jsx("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"currentColor",className:n,style:{display:"inline-block",verticalAlign:"middle",color:"var(--text-primary)"},children:l.jsx("path",{d:"M18.244 2.25h3.308l-7.227 8.26 8.502 11.24H16.17l-5.214-6.817L4.99 21.75H1.68l7.73-8.835L1.254 2.25H8.08l4.713 6.231zm-1.161 17.52h1.833L7.084 4.126H5.117z"})}):r.includes("threads")?l.jsx("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"currentColor",className:n,style:{display:"inline-block",verticalAlign:"middle",color:"var(--text-primary)"},children:l.jsx("path",{d:"M12.186 24h-.007c-3.581-.024-6.334-1.205-8.184-3.509C2.35 18.44 1.5 15.586 1.472 12.01v-.017c.03-3.579.879-6.43 2.525-8.482C5.845 1.205 8.6.024 12.18 0h.014c2.746.02 5.043.725 6.826 2.098 1.677 1.29 2.858 3.13 3.509 5.467l-2.04.569c-1.104-3.96-3.898-5.984-8.304-6.015-2.91.022-5.11.936-6.54 2.717C4.307 6.504 3.616 8.914 3.589 12c.027 3.086.718 5.496 2.057 7.164 1.43 1.783 3.631 2.698 6.54 2.717 2.623-.02 4.358-.631 5.8-2.045 1.647-1.613 1.618-3.593 1.09-4.798-.31-.71-.873-1.3-1.634-1.75-.192 1.352-.622 2.446-1.284 3.272-.886 1.102-2.14 1.704-3.73 1.79-1.202.065-2.361-.218-3.259-.801-1.063-.689-1.685-1.74-1.752-2.964-.065-1.19.408-2.285 1.33-3.082.88-.76 2.119-1.207 3.583-1.291a13.853 13.853 0 0 1 3.02.142c-.126-.742-.375-1.332-.75-1.757-.513-.586-1.308-.883-2.359-.89h-.029c-.844 0-1.992.232-2.721 1.32L7.734 7.847c.98-1.454 2.568-2.256 4.478-2.256h.044c3.194.02 5.097 1.975 5.287 5.388.108.046.216.094.321.142 1.49.7 2.58 1.761 3.154 3.07.797 1.82.871 4.79-1.548 7.158-1.85 1.81-4.094 2.628-7.277 2.65Zm1.003-11.69c-.242 0-.487.007-.739.021-1.836.103-2.98.946-2.916 2.143.067 1.256 1.452 1.839 2.784 1.767 1.224-.065 2.818-.543 3.086-3.71a10.5 10.5 0 0 0-2.215-.221z"})}):r.includes("apple")?l.jsx("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"currentColor",className:n,style:{display:"inline-block",verticalAlign:"middle",color:"var(--text-primary)"},children:l.jsx("path",{d:"M12.152 6.896c-.948 0-2.415-1.078-3.96-1.04-2.04.027-3.91 1.183-4.961 3.014-2.117 3.675-.546 9.103 1.519 12.09 1.013 1.454 2.208 3.09 3.792 3.039 1.52-.065 2.09-.987 3.935-.987 1.831 0 2.35.987 3.96.948 1.637-.026 2.676-1.48 3.676-2.948 1.156-1.688 1.636-3.325 1.662-3.415-.039-.013-3.182-1.221-3.22-4.857-.026-3.04 2.48-4.494 2.597-4.559-1.429-2.09-3.623-2.324-4.39-2.376-2-.156-3.675 1.09-4.61 1.09zM15.53 3.83c.843-1.012 1.4-2.427 1.245-3.83-1.207.052-2.662.805-3.532 1.818-.78.896-1.454 2.338-1.273 3.714 1.338.104 2.715-.688 3.559-1.701"})}):r.includes("aws")||r.includes("amazon")?l.jsx("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"#FF9900",className:n,style:{display:"inline-block",verticalAlign:"middle"},children:l.jsx("path",{d:"M6.763 10.036c0 .296.032.535.088.71.064.176.144.368.256.576.04.063.056.127.056.183 0 .08-.048.16-.152.24l-.503.335a.383.383 0 0 1-.208.072c-.08 0-.16-.04-.239-.112a2.47 2.47 0 0 1-.287-.375 6.18 6.18 0 0 1-.248-.471c-.622.734-1.405 1.101-2.347 1.101-.67 0-1.205-.191-1.596-.574-.391-.384-.59-.894-.59-1.533 0-.678.239-1.23.726-1.644.487-.415 1.133-.623 1.955-.623.272 0 .551.024.846.064.296.04.6.104.918.176v-.583c0-.607-.127-1.03-.375-1.277-.255-.248-.686-.367-1.3-.367-.28 0-.568.031-.863.103-.295.072-.583.16-.862.272a2.287 2.287 0 0 1-.28.104.488.488 0 0 1-.127.023c-.112 0-.168-.08-.168-.247v-.391c0-.128.016-.224.056-.28a.597.597 0 0 1 .224-.167c.279-.144.614-.264 1.005-.36a4.84 4.84 0 0 1 1.246-.151c.95 0 1.644.216 2.091.647.439.43.662 1.085.662 1.963v2.586zm-3.24 1.214c.263 0 .534-.048.822-.144.287-.096.543-.271.758-.51.128-.152.224-.32.272-.512.047-.191.08-.423.08-.694v-.335a6.66 6.66 0 0 0-.735-.136 6.02 6.02 0 0 0-.75-.048c-.535 0-.926.104-1.19.32-.263.215-.39.518-.39.917 0 .375.095.655.295.846.191.2.47.296.838.296zm6.41.862c-.144 0-.24-.024-.304-.08-.064-.048-.12-.16-.168-.311L7.586 5.55a1.398 1.398 0 0 1-.072-.32c0-.128.064-.2.191-.2h.783c.151 0 .255.025.31.08.065.048.113.16.16.312l1.342 5.284 1.245-5.284c.04-.16.088-.264.151-.312a.549.549 0 0 1 .32-.08h.638c.152 0 .256.025.32.08.063.048.12.16.151.312l1.261 5.348 1.381-5.348c.048-.16.104-.264.16-.312a.52.52 0 0 1 .311-.08h.743c.127 0 .2.065.2.2 0 .04-.009.08-.017.128a1.137 1.137 0 0 1-.056.2l-1.923 6.17c-.048.16-.104.263-.168.311a.51.51 0 0 1-.303.08h-.687c-.151 0-.255-.024-.32-.08-.063-.056-.119-.16-.15-.32l-1.238-5.148-1.23 5.14c-.04.16-.087.264-.15.32-.065.056-.177.08-.32.08zm10.256.215c-.415 0-.83-.048-1.229-.143-.399-.096-.71-.2-.918-.32-.128-.071-.215-.151-.247-.223a.563.563 0 0 1-.048-.224v-.407c0-.167.064-.247.183-.247.048 0 .096.008.144.024.048.016.12.048.2.08.271.12.566.215.878.279.319.064.63.096.95.096.502 0 .894-.088 1.165-.264a.86.86 0 0 0 .415-.758.777.777 0 0 0-.215-.559c-.144-.151-.416-.287-.807-.415l-1.157-.36c-.583-.183-1.014-.454-1.277-.813a1.902 1.902 0 0 1-.4-1.158c0-.335.073-.63.216-.886.144-.255.335-.479.575-.654.24-.184.51-.32.83-.415.32-.096.655-.136 1.006-.136.175 0 .359.008.535.032.183.024.35.056.518.088.16.04.312.08.455.127.144.048.256.096.336.144a.69.69 0 0 1 .24.2.43.43 0 0 1 .071.263v.375c0 .168-.064.256-.184.256a.83.83 0 0 1-.303-.096 3.652 3.652 0 0 0-1.532-.311c-.455 0-.815.071-1.062.223-.248.152-.375.383-.375.71 0 .224.08.416.24.567.159.152.454.304.877.44l1.134.358c.574.184.99.44 1.237.767.247.327.367.702.367 1.117 0 .343-.072.655-.207.926-.144.272-.336.511-.583.703-.248.2-.543.343-.886.447-.36.111-.734.167-1.142.167zM21.698 16.207c-2.626 1.94-6.442 2.969-9.722 2.969-4.598 0-8.74-1.7-11.87-4.526-.247-.223-.024-.527.272-.351 3.384 1.963 7.559 3.153 11.877 3.153 2.914 0 6.114-.607 9.06-1.852.439-.2.814.287.383.607zM22.792 14.961c-.336-.43-2.22-.207-3.074-.103-.255.032-.295-.192-.063-.36 1.5-1.053 3.967-.75 4.254-.399.287.36-.08 2.826-1.485 4.007-.215.184-.423.088-.327-.151.32-.79 1.03-2.57.695-2.994z"})}):r.includes("tidbcloud")||r.includes("tidb")?l.jsx("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"#00D2C4",className:n,style:{display:"inline-block",verticalAlign:"middle"},children:l.jsx("path",{d:"M12 0 1.609 6.001v11.998L11.999 24l10.393-6.001V6.001ZM8.535 17.999v-7.998L5.07 12V8L12 4l3.462 2-3.464 2.001v12Zm6.93 0v-7.997l3.464-2v7.997z"})}):r.includes("gmailworkspace")||r.includes("gmail")||r.includes("workspace")?l.jsxs("svg",{width:t,height:t,viewBox:"52 42 88 66",fill:"none",className:n,style:{display:"inline-block",verticalAlign:"middle"},children:[l.jsx("path",{fill:"#4285F4",d:"M58 108h14V74L52 59v43c0 3.32 2.69 6 6 6"}),l.jsx("path",{fill:"#34A853",d:"M120 108h14c3.32 0 6-2.69 6-6V59l-20 15"}),l.jsx("path",{fill:"#FBBC04",d:"M120 48v26l20-15v-8c0-7.42-8.47-11.65-14.4-7.2"}),l.jsx("path",{fill:"#EA4335",d:"M72 74V48l24 18 24-18v26L96 92"}),l.jsx("path",{fill:"#C5221F",d:"M52 51v8l20 15V48l-5.6-4.2c-5.94-4.45-14.4-.22-14.4 7.2"})]}):r.includes("vercel")?l.jsx("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"currentColor",className:n,style:{display:"inline-block",verticalAlign:"middle",color:"var(--text-primary)"},children:l.jsx("path",{d:"M24 22.525H0l12-21.05 12 21.05z"})}):r.includes("cloudinary")?l.jsx("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"#0078FF",className:n,style:{display:"inline-block",verticalAlign:"middle"},children:l.jsx("path",{d:"M24 14.8598c0 2.1729-1.3757 3.974-3.5903 4.6996l-.0995.0318V17.989c1.3777-.5805 2.1869-1.7275 2.1869-3.1291-.0072-2-1.6087-3.6288-3.6082-3.6699h-.5964l-.1432-.5686c-.7025-2.8996-3.2886-4.9489-6.2721-4.97a6.3915 6.3915 0 0 0-5.811 3.664l-.1828.3757-.4175.0437a4.4311 4.4311 0 0 0-3.3052 2.088c-1.2803 2.0856-.6274 4.8143 1.4583 6.0947v1.6897h-.01l-.149-.0675a5.9402 5.9402 0 0 1-3.3658-4.3494c-.5787-3.2291 1.57-6.3161 4.7991-6.8948a7.8766 7.8766 0 0 1 6.9839-4.149c3.4724.025 6.535 2.28 7.5901 5.5883 2.5789.3366 4.5138 2.5245 4.5327 5.1251zm-15.3176-1.322h.5647a.0656.0656 0 0 0 .0457-.1113L7.084 11.2158l-.0007-.0007a.0656.0656 0 0 0-.0927.0007L4.78 13.4265a.0656.0656 0 0 0 .0477.1113h.5566a.0656.0656 0 0 1 .0657.0656v5.0574c0 .6588.534 1.1928 1.1928 1.1928H9.247a.0656.0656 0 0 0 .0457-.1113l-.33-.33a1.1928 1.1928 0 0 1-.348-.839v-4.97a.0676.0676 0 0 1 .0676-.0655zm9.769 2.5466h.5667a.0655.0655 0 0 0 .0457-.1133l-2.2107-2.2087-.0015-.0015a.0636.0636 0 0 0-.0899.0015L14.551 15.971a.0657.0657 0 0 0 .0457.1133h.5567a.0656.0656 0 0 1 .0656.0656v2.5108c0 .6588.534 1.1928 1.1928 1.1928h2.6063a.0655.0655 0 0 0 .0457-.1113l-.33-.33a1.1928 1.1928 0 0 1-.348-.839V16.15a.0656.0656 0 0 1 .0657-.0656zm-4.8844-1.2743h.5646a.0656.0656 0 0 0 .0477-.1114l-2.2107-2.2027-.0006-.0006a.0656.0656 0 0 0-.0928.0006l-2.2087 2.2068a.0656.0656 0 0 0 .0457.1113h.5626a.0676.0676 0 0 1 .0657.0676v3.7791c0 .6588.534 1.1928 1.1928 1.1928h2.5983a.0656.0656 0 0 0 .0477-.1113l-.332-.33a1.193 1.193 0 0 1-.346-.839v-3.6956c0-.0366.0291-.0665.0657-.0676z"})}):r.includes("tiktok")?l.jsxs("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"none",className:n,style:{display:"inline-block",verticalAlign:"middle"},children:[l.jsx("circle",{cx:"12",cy:"12",r:"12",fill:"#000000"}),l.jsxs("g",{transform:"scale(0.7) translate(5.14, 5.14)",children:[l.jsx("path",{d:"M12.525.02c1.31-.02 2.61-.01 3.91-.02.08 1.53.63 3.09 1.75 4.17 1.12 1.11 2.7 1.62 4.24 1.79v4.03c-1.44-.05-2.89-.35-4.2-.97-.57-.26-1.1-.59-1.62-.93-.01 2.92.01 5.84-.02 8.75-.08 1.4-.54 2.79-1.35 3.94-1.31 1.92-3.58 3.17-5.91 3.21-1.43.08-2.86-.31-4.08-1.03-2.02-1.19-3.44-3.37-3.65-5.71-.02-.5-.03-1-.01-1.49.18-1.9 1.12-3.72 2.58-4.96 1.66-1.44 3.98-2.13 6.15-1.72.02 1.48-.04 2.96-.04 4.44-.99-.32-2.15-.23-3.02.37-.63.41-1.11 1.04-1.36 1.75-.21.51-.15 1.07-.14 1.61.24 1.64 1.82 3.02 3.5 2.87 1.12-.01 2.19-.66 2.77-1.61.19-.33.4-.67.41-1.06.1-1.79.06-3.57.07-5.36.01-4.03-.01-8.05.02-12.07z",fill:"#25F4EE",transform:"translate(-0.5, -0.5)"}),l.jsx("path",{d:"M12.525.02c1.31-.02 2.61-.01 3.91-.02.08 1.53.63 3.09 1.75 4.17 1.12 1.11 2.7 1.62 4.24 1.79v4.03c-1.44-.05-2.89-.35-4.2-.97-.57-.26-1.1-.59-1.62-.93-.01 2.92.01 5.84-.02 8.75-.08 1.4-.54 2.79-1.35 3.94-1.31 1.92-3.58 3.17-5.91 3.21-1.43.08-2.86-.31-4.08-1.03-2.02-1.19-3.44-3.37-3.65-5.71-.02-.5-.03-1-.01-1.49.18-1.9 1.12-3.72 2.58-4.96 1.66-1.44 3.98-2.13 6.15-1.72.02 1.48-.04 2.96-.04 4.44-.99-.32-2.15-.23-3.02.37-.63.41-1.11 1.04-1.36 1.75-.21.51-.15 1.07-.14 1.61.24 1.64 1.82 3.02 3.5 2.87 1.12-.01 2.19-.66 2.77-1.61.19-.33.4-.67.41-1.06.1-1.79.06-3.57.07-5.36.01-4.03-.01-8.05.02-12.07z",fill:"#FE094C",transform:"translate(0.5, 0.5)"}),l.jsx("path",{d:"M12.525.02c1.31-.02 2.61-.01 3.91-.02.08 1.53.63 3.09 1.75 4.17 1.12 1.11 2.7 1.62 4.24 1.79v4.03c-1.44-.05-2.89-.35-4.2-.97-.57-.26-1.1-.59-1.62-.93-.01 2.92.01 5.84-.02 8.75-.08 1.4-.54 2.79-1.35 3.94-1.31 1.92-3.58 3.17-5.91 3.21-1.43.08-2.86-.31-4.08-1.03-2.02-1.19-3.44-3.37-3.65-5.71-.02-.5-.03-1-.01-1.49.18-1.9 1.12-3.72 2.58-4.96 1.66-1.44 3.98-2.13 6.15-1.72.02 1.48-.04 2.96-.04 4.44-.99-.32-2.15-.23-3.02.37-.63.41-1.11 1.04-1.36 1.75-.21.51-.15 1.07-.14 1.61.24 1.64 1.82 3.02 3.5 2.87 1.12-.01 2.19-.66 2.77-1.61.19-.33.4-.67.41-1.06.1-1.79.06-3.57.07-5.36.01-4.03-.01-8.05.02-12.07z",fill:"#FFFFFF"})]})]}):r.includes("instagram")?l.jsxs("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"none",className:n,style:{display:"inline-block",verticalAlign:"middle"},children:[l.jsx("defs",{children:l.jsxs("linearGradient",{id:"instagram-gradient-new",x1:"0%",y1:"100%",x2:"100%",y2:"0%",children:[l.jsx("stop",{offset:"0%",stopColor:"#fdf497"}),l.jsx("stop",{offset:"5%",stopColor:"#fdf497"}),l.jsx("stop",{offset:"28%",stopColor:"#fd5949"}),l.jsx("stop",{offset:"75%",stopColor:"#d6249f"}),l.jsx("stop",{offset:"100%",stopColor:"#285AEB"})]})}),l.jsx("path",{d:"M12 0C8.74 0 8.333.015 7.053.072 5.775.132 4.905.333 4.14.63c-.789.306-1.459.717-2.126 1.384S.935 3.35.63 4.14C.333 4.905.131 5.775.072 7.053.012 8.333 0 8.74 0 12s.015 3.667.072 4.947c.06 1.277.261 2.148.558 2.913.306.788.717 1.459 1.384 2.126.667.666 1.336 1.079 2.126 1.384.766.296 1.636.499 2.913.558C8.333 23.988 8.74 24 12 24s3.667-.015 4.947-.072c1.277-.06 2.148-.262 2.913-.558.788-.306 1.459-.718 2.126-1.384.666-.667 1.079-1.335 1.384-2.126.296-.765.499-1.636.558-2.913.06-1.28.072-1.687.072-4.947s-.015-3.667-.072-4.947c-.06-1.277-.262-2.149-.558-2.913-.306-.789-.718-1.459-1.384-2.126C21.319 1.347 20.651.935 19.86.63c-.765-.297-1.636-.499-2.913-.558C15.667.012 15.26 0 12 0zm0 2.16c3.203 0 3.585.016 4.85.071 1.17.055 1.805.249 2.227.415.562.217.96.477 1.382.896.419.42.679.819.896 1.381.164.422.36 1.057.413 2.227.057 1.266.07 1.646.07 4.85s-.015 3.585-.074 4.85c-.061 1.17-.256 1.805-.421 2.227-.224.562-.479.96-.899 1.382-.419.419-.824.679-1.38.896-.42.164-1.065.36-2.235.413-1.274.057-1.649.07-4.859.07-3.211 0-3.586-.015-4.859-.074-1.171-.061-1.816-.256-2.236-.421-.569-.224-.96-.479-1.379-.899-.421-.419-.69-.824-.9-1.38-.165-.42-.359-1.065-.42-2.235-.045-1.26-.061-1.649-.061-4.844 0-3.196.016-3.586.061-4.861.061-1.17.255-1.814.42-2.234.21-.57.479-.96.9-1.381.419-.419.81-.689 1.379-.898.42-.166 1.051-.361 2.221-.421 1.275-.045 1.65-.06 4.859-.06l.045.03zm0 3.678c-3.405 0-6.162 2.76-6.162 6.162 0 3.405 2.76 6.162 6.162 6.162 3.405 0 6.162-2.76 6.162-6.162 0-3.405-2.76-6.162-6.162-6.162zM12 16c-2.21 0-4-1.79-4-4s1.79-4 4-4 4 1.79 4 4-1.79 4-4 4zm7.846-10.405c0 .795-.646 1.44-1.44 1.44-.795 0-1.44-.646-1.44-1.44 0-.794.646-1.439 1.44-1.439.793-.001 1.44.645 1.44 1.439z",fill:"url(#instagram-gradient-new)"})]}):r.includes("shopee")?l.jsx("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"#EE4D2D",className:n,style:{display:"inline-block",verticalAlign:"middle"},children:l.jsx("path",{d:"M15.9414 17.9633c.229-1.879-.981-3.077-4.1758-4.0969-1.548-.528-2.277-1.22-2.26-2.1719.065-1.056 1.048-1.825 2.352-1.85a5.2898 5.2898 0 0 1 2.8838.89c.116.072.197.06.263-.039.09-.145.315-.494.39-.62.051-.081.061-.187-.068-.281-.185-.1369-.704-.4149-.983-.5319a6.4697 6.4697 0 0 0-2.5118-.514c-1.909.008-3.4129 1.215-3.5389 2.826-.082 1.1629.494 2.1078 1.73 2.8278.262.152 1.6799.716 2.2438.892 1.774.552 2.695 1.5419 2.478 2.6969-.197 1.047-1.299 1.7239-2.818 1.7439-1.2039-.046-2.2878-.537-3.1278-1.19l-.141-.11c-.104-.08-.218-.075-.287.03-.05.077-.376.547-.458.67-.077.108-.035.168.045.234.35.293.817.613 1.134.775a6.7097 6.7097 0 0 0 2.8289.727 4.9048 4.9048 0 0 0 2.0759-.354c1.095-.465 1.8029-1.394 1.9449-2.554zM11.9986 1.4009c-2.068 0-3.7539 1.95-3.8329 4.3899h7.6657c-.08-2.44-1.765-4.3899-3.8328-4.3899zm7.8516 22.5981-.08.001-15.7843-.002c-1.074-.04-1.863-.91-1.971-1.991l-.01-.195L1.298 6.2858a.459.459 0 0 1 .45-.494h4.9748C6.8448 2.568 9.1607 0 11.9996 0c2.8388 0 5.1537 2.5689 5.2757 5.7898h4.9678a.459.459 0 0 1 .458.483l-.773 15.5883-.007.131c-.094 1.094-.979 1.9769-2.0709 2.0059z"})}):r.includes("telegram")?l.jsxs("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"none",className:n,style:{display:"inline-block",verticalAlign:"middle"},children:[l.jsx("circle",{cx:"12",cy:"12",r:"12",fill:"#2CA5E0"}),l.jsx("path",{d:"M5.4 11.6l12.7-4.9c.6-.2 1.1.1.9.8l-2.2 10.2c-.2.7-.6.9-1.2.5l-3.3-2.4-1.6 1.5c-.2.2-.3.3-.5.3l.2-3.4 6.2-5.6c.3-.2-.1-.4-.4-.2l-7.6 4.8-3.3-1c-.7-.2-.7-.7.1-.9z",fill:"#FFFFFF"})]}):r.includes("riot")||r.includes("valorant")||r.includes("league of legends")?l.jsx("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"#EB0029",className:n,style:{display:"inline-block",verticalAlign:"middle"},children:l.jsx("path",{d:"M13.458.86 0 7.093l3.353 12.761 2.552-.313-.701-8.024.838-.373 1.447 8.202 4.361-.535-.775-8.857.83-.37 1.591 9.025 4.412-.542-.849-9.708.84-.374 1.74 9.87L24 17.318V3.5Zm.316 19.356.222 1.256L24 23.14v-4.18l-10.22 1.256Z"})}):r.includes("vng")?l.jsxs("svg",{width:t,height:t,viewBox:"0 0 354.3 226.8",fill:"none",className:n,style:{display:"inline-block",verticalAlign:"middle"},children:[l.jsx("path",{d:"M37.9,103.7c1.3,4.7,2.7,9.3,4.2,14c0.5,1.7,0.5,2.4-1.2,3.4C26.5,129.5,13,142.1,0.5,155.8c-1,1.1-0.9,1.7,0.3,2.5c20,13.7,39.9,27.5,60,41.2c1.7,1.1,2.5,0.7,3.5-1.1c11.6-21,24.1-41.5,36.5-62.1c1.3-2.1,2.4-2.8,4.9-1.9c15.1,5.3,29.9,11.3,45.4,15.6c4,1.1,5.9-0.1,7-4.1c4.9-18.7,9.8-37.4,14.6-56.1c0.4-1.6,0.3-2.3-1.4-3C155.4,79.5,140,70.8,125.1,61c-1.3-0.8-2.2-0.8-3.4,0.3c-13.6,12.7-27.1,25.4-40.8,38C39.8,100.1,38.9,100.7,37.9,103.7",fill:"#EB5A26"}),l.jsx("path",{d:"M112.5,103.5c4-7.5,8-15,11.9-22.5c1.4-2.7,1-3.6-1.9-4.8c-26.6-11.2-53-22.7-79.6-33.8c-1.2-0.5-2.2-0.3-2.9,0.8C27.9,60,15.7,76.5,3.9,93.2c-0.6,0.9-0.5,1.7,0.3,2.3c21.8,15.5,43.6,30.9,65.6,46.2c0.8,0.5,1.7,0.5,2.5-0.2C85.5,129.3,98.7,116.3,112.5,103.5",fill:"#0E71BA"}),l.jsx("path",{d:"M211.7,137.9c-8.9,0-15.6-2.2-20.2-6.6c-4.6-4.4-6.9-11-6.9-19.8V64.6h17.9v45.5c0,9.3,4.4,13.9,13.3,13.9c8.9,0,13.3-4.6,13.3-13.9V64.6h17.9v46.9c0,8.8-2.3,15.4-6.9,19.8C225.8,135.7,219.5,137.9,211.7,137.9",fill:"#2C373E"}),l.jsx("path",{d:"M260.9,64.6h18.3c15.2,0,22.8,6.8,22.8,20.3v32.7c0,13.5-7.6,20.3-22.8,20.3h-18.3V64.6z M278.8,121.7c4.6,0,6.9-2.5,6.9-7.5V84.9c0-5-2.3-7.5-6.9-7.5h-0.1v44.3H278.8z",fill:"#2C373E"}),l.jsx("path",{d:"M328.7,103.7h18.5V120c0,12-6.5,18-19.6,18c-15,0-22.5-7.3-22.5-22v-31c0-14.7,7.5-22,22.5-22c14.9,0,22,6.9,21.3,20.8h-18.1c0-4.9-1-7.4-3.1-7.4c-3,0-4.5,2.9-4.5,8.6v31c0,5.7,1.5,8.6,4.5,8.6C326.6,113.6,328.4,110.3,328.7,103.7",fill:"#2C373E"})]}):r.includes("reddit")?l.jsx("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"#FF4500",className:n,style:{display:"inline-block",verticalAlign:"middle"},children:l.jsx("path",{d:"M12 0C5.373 0 0 5.373 0 12c0 3.314 1.343 6.314 3.515 8.485l-2.286 2.286C.775 23.225 1.097 24 1.738 24H12c6.627 0 12-5.373 12-12S18.627 0 12 0Zm4.388 3.199c1.104 0 1.999.895 1.999 1.999 0 1.105-.895 2-1.999 2-.946 0-1.739-.657-1.947-1.539v.002c-1.147.162-2.032 1.15-2.032 2.341v.007c1.776.067 3.4.567 4.686 1.363.473-.363 1.064-.58 1.707-.58 1.547 0 2.802 1.254 2.802 2.802 0 1.117-.655 2.081-1.601 2.531-.088 3.256-3.637 5.876-7.997 5.876-4.361 0-7.905-2.617-7.998-5.87-.954-.447-1.614-1.415-1.614-2.538 0-1.548 1.255-2.802 2.803-2.802.645 0 1.239.218 1.712.585 1.275-.79 2.881-1.291 4.64-1.365v-.01c0-1.663 1.263-3.034 2.88-3.207.188-.911.993-1.595 1.959-1.595Zm-8.085 8.376c-.784 0-1.459.78-1.506 1.797-.047 1.016.64 1.429 1.426 1.429.786 0 1.371-.369 1.418-1.385.047-1.017-.553-1.841-1.338-1.841Zm7.406 0c-.786 0-1.385.824-1.338 1.841.047 1.017.634 1.385 1.418 1.385.785 0 1.473-.413 1.426-1.429-.046-1.017-.721-1.797-1.506-1.797Zm-3.703 4.013c-.974 0-1.907.048-2.77.135-.147.015-.241.168-.183.305.483 1.154 1.622 1.964 2.953 1.964 1.33 0 2.47-.81 2.953-1.964.057-.137-.037-.29-.184-.305-.863-.087-1.795-.135-2.769-.135Z"})}):r.includes("steam")?l.jsx("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"#171A21",className:n,style:{display:"inline-block",verticalAlign:"middle"},children:l.jsx("path",{d:"M11.979 0C5.678 0 .511 4.86.022 11.037l6.432 2.658c.545-.371 1.203-.59 1.912-.59.063 0 .125.004.188.006l2.861-4.142V8.91c0-2.495 2.028-4.524 4.524-4.524 2.494 0 4.524 2.031 4.524 4.527s-2.03 4.525-4.524 4.525h-.105l-4.076 2.911c0 .052.004.105.004.159 0 1.875-1.515 3.396-3.39 3.396-1.635 0-3.016-1.173-3.331-2.727L.436 15.27C1.862 20.307 6.486 24 11.979 24c6.627 0 11.999-5.373 11.999-12S18.605 0 11.979 0zM7.54 18.21l-1.473-.61c.262.543.714.999 1.314 1.25 1.297.539 2.793-.076 3.332-1.375.263-.63.264-1.319.005-1.949s-.75-1.121-1.377-1.383c-.624-.26-1.29-.249-1.878-.03l1.523.63c.956.4 1.409 1.5 1.009 2.455-.397.957-1.497 1.41-2.454 1.012H7.54zm11.415-9.303c0-1.662-1.353-3.015-3.015-3.015-1.665 0-3.015 1.353-3.015 3.015 0 1.665 1.35 3.015 3.015 3.015 1.663 0 3.015-1.35 3.015-3.015zm-5.273-.005c0-1.252 1.013-2.266 2.265-2.266 1.249 0 2.266 1.014 2.266 2.266 0 1.251-1.017 2.265-2.266 2.265-1.253 0-2.265-1.014-2.265-2.265z"})}):r.includes("discord")?l.jsx("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"#5865F2",className:n,style:{display:"inline-block",verticalAlign:"middle"},children:l.jsx("path",{d:"M20.317 4.3698a19.7913 19.7913 0 00-4.8851-1.5152.0741.0741 0 00-.0785.0371c-.211.3753-.4447.8648-.6083 1.2495-1.8447-.2762-3.68-.2762-5.4868 0-.1636-.3933-.4058-.8742-.6177-1.2495a.077.077 0 00-.0785-.037 19.7363 19.7363 0 00-4.8852 1.515.0699.0699 0 00-.0321.0277C.5334 9.0458-.319 13.5799.0992 18.0578a.0824.0824 0 00.0312.0561c2.0528 1.5076 4.0413 2.4228 5.9929 3.0294a.0777.0777 0 00.0842-.0276c.4616-.6304.8731-1.2952 1.226-1.9942a.076.076 0 00-.0416-.1057c-.6528-.2476-1.2743-.5495-1.8722-.8923a.077.077 0 01-.0076-.1277c.1258-.0943.2517-.1923.3718-.2914a.0743.0743 0 01.0776-.0105c3.9278 1.7933 8.18 1.7933 12.0614 0a.0739.0739 0 01.0785.0095c.1202.099.246.1981.3728.2924a.077.077 0 01-.0066.1276 12.2986 12.2986 0 01-1.873.8914.0766.0766 0 00-.0407.1067c.3604.698.7719 1.3628 1.225 1.9932a.076.076 0 00.0842.0286c1.961-.6067 3.9495-1.5219 6.0023-3.0294a.077.077 0 00.0313-.0552c.5004-5.177-.8382-9.6739-3.5485-13.6604a.061.061 0 00-.0312-.0286zM8.02 15.3312c-1.1825 0-2.1569-1.0857-2.1569-2.419 0-1.3332.9555-2.4189 2.157-2.4189 1.2108 0 2.1757 1.0952 2.1568 2.419 0 1.3332-.9555 2.4189-2.1569 2.4189zm7.9748 0c-1.1825 0-2.1569-1.0857-2.1569-2.419 0-1.3332.9554-2.4189 2.1569-2.4189 1.2108 0 2.1757 1.0952 2.1568 2.419 0 1.3332-.946 2.4189-2.1568 2.4189Z"})}):l.jsx(dd,{size:t,className:n,style:{display:"inline-block",verticalAlign:"middle",color:"var(--text-accent)"}})},hf=({credentials:e,platforms:t,selectedPlatform:n,setSelectedPlatform:r,onlyFavorites:i,setOnlyFavorites:s,activeView:o,setActiveView:a})=>{const[c,u]=Vt.useState(!0);return l.jsx("aside",{className:"glass-panel scrollable",style:{padding:"20px",display:"flex",flexDirection:"column",gap:"20px",height:"100%",overflowY:"auto"},children:l.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"6px",flexGrow:1},children:[l.jsxs("button",{onClick:()=>{s(!1),r(null),a("vault")},style:{width:"100%",padding:"10px 14px",textAlign:"left",background:!i&&!n&&o==="vault"?"var(--bg-active-tab)":"transparent",border:"none",borderRadius:"8px",color:!i&&!n&&o==="vault"?"var(--text-accent)":"var(--text-primary)",fontWeight:!i&&!n&&o==="vault"?600:400,cursor:"pointer",transition:"var(--transition-smooth)"},children:["Tất cả tài khoản (",e.length,")"]}),l.jsxs("button",{onClick:()=>{s(!i),r(null),a("vault")},style:{width:"100%",padding:"10px 14px",textAlign:"left",background:i&&!n&&o==="vault"?"rgba(56, 239, 125, 0.1)":"transparent",border:"none",borderRadius:"8px",color:i&&!n&&o==="vault"?"var(--text-emerald)":"var(--text-primary)",fontWeight:i&&!n&&o==="vault"?600:400,cursor:"pointer",display:"flex",alignItems:"center",gap:"8px",transition:"var(--transition-smooth)"},children:[l.jsx(Po,{size:14,fill:i&&!n&&o==="vault"?"var(--text-emerald)":"none"}),"Yêu thích (",e.filter(x=>x.is_favorite).length,")"]}),l.jsxs("button",{onClick:()=>{a("proxy"),r(null),s(!1)},style:{width:"100%",padding:"10px 14px",textAlign:"left",background:o==="proxy"?"var(--bg-active-tab)":"transparent",border:"none",borderRadius:"8px",color:o==="proxy"?"var(--text-accent)":"var(--text-primary)",fontWeight:o==="proxy"?600:400,cursor:"pointer",display:"flex",alignItems:"center",gap:"8px",transition:"var(--transition-smooth)"},children:[l.jsx(Y1,{size:14,style:{color:o==="proxy"?"var(--text-accent)":"var(--text-secondary)"}}),"Kiểm tra Proxy"]}),l.jsxs("button",{onClick:()=>{a("proxy-list"),r(null),s(!1)},style:{width:"100%",padding:"10px 14px",textAlign:"left",background:o==="proxy-list"?"var(--bg-active-tab)":"transparent",border:"none",borderRadius:"8px",color:o==="proxy-list"?"var(--text-accent)":"var(--text-primary)",fontWeight:o==="proxy-list"?600:400,cursor:"pointer",display:"flex",alignItems:"center",gap:"8px",transition:"var(--transition-smooth)"},children:[l.jsx(sd,{size:14,style:{color:o==="proxy-list"?"var(--text-accent)":"var(--text-secondary)"}}),"Quản lý Proxy"]}),l.jsxs("button",{onClick:()=>u(!c),style:{display:"flex",justifyContent:"space-between",alignItems:"center",width:"100%",padding:"10px 14px",background:"transparent",border:"none",color:"var(--text-primary)",cursor:"pointer",textAlign:"left",fontWeight:500,transition:"var(--transition-smooth)",borderRadius:"8px",marginBottom:"4px"},onMouseEnter:x=>{x.currentTarget.style.background="rgba(255, 255, 255, 0.03)"},onMouseLeave:x=>{x.currentTarget.style.background="transparent"},children:[l.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"10px"},children:[l.jsx(Vl,{size:16,style:{color:"var(--text-secondary)"}}),l.jsx("span",{children:"Nền tảng"})]}),c?l.jsx(Fr,{size:14,style:{color:"var(--text-secondary)"}}):l.jsx(nd,{size:14,style:{color:"var(--text-secondary)"}})]}),c&&l.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"4px",paddingLeft:"8px"},children:[t.filter(x=>x.is_active).map(x=>{const y=e.filter(g=>g.platform_id===x.id).length;return l.jsxs("button",{onClick:()=>{r(x.id),s(!1),a("vault")},style:{width:"100%",padding:"8px 14px",textAlign:"left",background:n===x.id&&o==="vault"?"var(--bg-active-tab)":"transparent",border:"none",borderRadius:"8px",color:n===x.id&&o==="vault"?"var(--text-accent)":"var(--text-primary)",fontWeight:n===x.id&&o==="vault"?600:400,cursor:"pointer",display:"flex",justifyContent:"space-between",alignItems:"center",transition:"var(--transition-smooth)"},children:[l.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[l.jsx(ai,{name:x.icon,size:14}),l.jsx("span",{children:x.name})]}),l.jsx("span",{style:{fontSize:"11px",color:"var(--text-muted)"},children:y})]},x.id)}),t.filter(x=>x.is_active).length===0&&l.jsx("span",{style:{fontSize:"12px",color:"var(--text-muted)",paddingLeft:"14px",fontStyle:"italic"},children:"Không có nền tảng active"})]}),l.jsx("hr",{style:{border:"none",borderTop:"1px solid rgba(255,255,255,0.05)",marginTop:"auto",marginBottom:"8px"}}),l.jsxs("button",{onClick:()=>a("settings"),style:{width:"100%",padding:"10px 14px",textAlign:"left",background:o==="settings"?"var(--bg-active-tab)":"transparent",border:"none",borderRadius:"8px",color:o==="settings"?"var(--text-accent)":"var(--text-primary)",fontWeight:o==="settings"?600:400,cursor:"pointer",display:"flex",alignItems:"center",gap:"10px",transition:"var(--transition-smooth)"},children:[l.jsx(cf,{size:16}),l.jsx("span",{children:"Cài đặt"})]})]})})},xf=({cred:e,platforms:t,totp:n,onToggleFavorite:r,onEdit:i,onDelete:s})=>{const[o,a]=j.useState(!1),[c,u]=j.useState(!1),[x,y]=j.useState(null),g=(S,z)=>{navigator.clipboard.writeText(S),y(z),setTimeout(()=>{y(null)},2e3)},k=e.platform_id?t.find(S=>S.id===e.platform_id):null,C=(n==null?void 0:n.remaining)??0,m=7,N=2*Math.PI*m,p=N*(1-C/30),d=C<=5,f=d?"#ef4444":"var(--text-emerald)",w=d?"#ef4444":"var(--text-secondary)",v=()=>{var z;(z=window.getSelection())!=null&&z.toString()||a(!o)};return l.jsxs("div",{className:"glass-panel animate-fade-in",onClick:v,style:{padding:"20px",display:"flex",flexDirection:"column",gap:o?"16px":"8px",cursor:"pointer"},children:[l.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[l.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[k&&l.jsx(ai,{name:k.icon,size:18}),l.jsxs("div",{style:{display:"flex",flexDirection:"column"},children:[l.jsx("h3",{style:{fontSize:"15px",fontWeight:600,color:"var(--text-primary)"},children:k?k.name:e.title||"Tài khoản"}),l.jsx("div",{style:{display:"flex",flexDirection:"column",gap:"2px",marginTop:"2px"},children:(e.email||!k&&e.title)&&l.jsxs("span",{style:{fontSize:"12px",color:"var(--text-secondary)"},children:["Email: ",e.email||e.title]})})]})]}),l.jsxs("div",{style:{display:"flex",gap:"8px",alignItems:"center"},children:[l.jsx("button",{onClick:S=>{S.stopPropagation(),r()},style:{background:"none",border:"none",color:e.is_favorite?"var(--text-emerald)":"var(--text-muted)",cursor:"pointer"},title:e.is_favorite?"Bỏ yêu thích":"Yêu thích",children:l.jsx(Po,{size:16,fill:e.is_favorite?"var(--text-emerald)":"none"})}),l.jsx("button",{onClick:S=>{S.stopPropagation(),i()},style:{background:"none",border:"none",color:"var(--text-secondary)",cursor:"pointer"},title:"Sửa tài khoản",children:l.jsx(pd,{size:16})}),l.jsx("button",{onClick:S=>{S.stopPropagation(),s()},style:{background:"none",border:"none",color:"#ff4b2b",cursor:"pointer"},title:"Xóa tài khoản",children:l.jsx(un,{size:16})}),l.jsx("button",{onClick:S=>{S.stopPropagation(),a(!o)},style:{background:"none",border:"none",color:"var(--text-secondary)",cursor:"pointer",display:"flex",alignItems:"center"},title:o?"Thu gọn":"Mở rộng",children:o?l.jsx(J1,{size:16}):l.jsx(Fr,{size:16})})]})]}),(o||e.totp_secret)&&l.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"10px"},children:[o&&e.uid&&l.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[l.jsx("span",{style:{fontSize:"13px",color:"var(--text-secondary)"},children:"UID:"}),l.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"6px"},children:[l.jsx("span",{style:{fontSize:"13px",fontWeight:500,fontFamily:"monospace"},children:e.uid}),l.jsx("button",{className:"btn btn-secondary",style:{padding:"4px",borderRadius:"4px"},onClick:S=>{S.stopPropagation(),g(e.uid||"","uid")},title:"Sao chép UID",children:x==="uid"?l.jsx(xn,{size:12,style:{color:"var(--text-emerald)"}}):l.jsx(_t,{size:12})})]})]}),o&&e.username&&l.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[l.jsx("span",{style:{fontSize:"13px",color:"var(--text-secondary)"},children:"Username:"}),l.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"6px"},children:[l.jsx("span",{style:{fontSize:"13px",fontWeight:500},children:e.username}),l.jsx("button",{className:"btn btn-secondary",style:{padding:"4px",borderRadius:"4px"},onClick:S=>{S.stopPropagation(),g(e.username,"username")},title:"Sao chép tài khoản",children:x==="username"?l.jsx(xn,{size:12,style:{color:"var(--text-emerald)"}}):l.jsx(_t,{size:12})})]})]}),o&&e.password&&l.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[l.jsx("span",{style:{fontSize:"13px",color:"var(--text-secondary)"},children:"Mật khẩu:"}),l.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"6px"},children:[l.jsx("span",{style:{fontSize:"13px",fontFamily:"monospace"},children:c?e.password:"••••••••"}),l.jsx("button",{className:"btn btn-secondary",style:{padding:"4px",borderRadius:"4px"},onClick:S=>{S.stopPropagation(),u(!c)},title:c?"Ẩn mật khẩu":"Hiển thị mật khẩu",children:c?l.jsx(Mn,{size:12}):l.jsx(Dn,{size:12})}),l.jsx("button",{className:"btn btn-secondary",style:{padding:"4px",borderRadius:"4px"},onClick:S=>{S.stopPropagation(),g(e.password,"password")},title:"Sao chép mật khẩu",children:x==="password"?l.jsx(xn,{size:12,style:{color:"var(--text-emerald)"}}):l.jsx(_t,{size:12})})]})]}),e.totp_secret&&l.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginTop:"4px"},children:[l.jsx("span",{style:{fontSize:"13px",color:"var(--text-accent)",fontWeight:500},children:"Mã 2FA (OTP):"}),l.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[l.jsx("span",{className:"otp-display",style:{fontSize:"15px",padding:"4px 8px"},children:(n==null?void 0:n.token)||"------"}),l.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"6px",minWidth:"55px",justifyContent:"flex-start"},children:[l.jsxs("svg",{width:"18",height:"18",viewBox:"0 0 20 20",style:{transform:"rotate(-90deg)",flexShrink:0},children:[l.jsx("circle",{cx:"10",cy:"10",r:m,fill:"none",stroke:"var(--border-color)",strokeWidth:"2.5"}),C>0&&l.jsx("circle",{cx:"10",cy:"10",r:m,fill:"none",stroke:f,strokeWidth:"2.5",strokeDasharray:N,strokeDashoffset:p,style:{transition:"stroke-dashoffset 1s linear, stroke 0.3s"}})]}),l.jsxs("span",{style:{fontSize:"12px",fontWeight:600,color:w,minWidth:"22px"},children:[C,"s"]})]}),l.jsx("button",{className:"btn btn-secondary",style:{padding:"4px",borderRadius:"4px"},onClick:S=>{S.stopPropagation(),g((n==null?void 0:n.token)||"","otp")},title:"Sao chép mã OTP",children:x==="otp"?l.jsx(xn,{size:12,style:{color:"var(--text-emerald)"}}):l.jsx(_t,{size:12})})]})]}),o&&e.url&&l.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[l.jsx("span",{style:{fontSize:"13px",color:"var(--text-secondary)"},children:"Link:"}),l.jsxs("a",{href:e.url.startsWith("http")?e.url:`https://${e.url}`,target:"_blank",rel:"noreferrer",onClick:S=>{S.stopPropagation()},style:{fontSize:"13px",color:"var(--text-accent)",display:"flex",alignItems:"center",gap:"4px",textDecoration:"none"},children:["Truy cập website",l.jsx(si,{size:12})]})]})]}),o&&e.custom_fields&&e.custom_fields.length>0&&l.jsx("div",{style:{display:"flex",flexDirection:"column",gap:"6px",borderTop:"1px solid rgba(255,255,255,0.05)",paddingTop:"10px"},children:e.custom_fields.map((S,z)=>l.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[l.jsxs("span",{style:{fontSize:"12px",color:"var(--text-muted)"},children:[S.key,":"]}),l.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"6px"},children:[l.jsx("span",{style:{fontSize:"12px",fontWeight:500},children:S.value}),l.jsx("button",{className:"btn btn-secondary",style:{padding:"2px 4px",borderRadius:"3px"},onClick:T=>{T.stopPropagation(),g(S.value,`custom_${z}`)},title:`Sao chép ${S.key}`,children:x===`custom_${z}`?l.jsx(xn,{size:10,style:{color:"var(--text-emerald)"}}):l.jsx(_t,{size:10})})]})]},z))}),o&&e.notes&&l.jsx("p",{style:{fontSize:"12px",color:"var(--text-muted)",borderTop:"1px solid rgba(255,255,255,0.05)",paddingTop:"10px",fontStyle:"italic"},children:e.notes})]})},gf=({cred:e,platforms:t,totp:n,visibleColumns:r,isSelected:i,onToggleSelect:s,onToggleFavorite:o,onEdit:a,onDelete:c})=>{const[u,x]=j.useState(!1),[y,g]=j.useState(!1),[k,C]=j.useState(!1),[m,N]=j.useState(null),[p,d]=j.useState(!1),f=(M,F)=>{navigator.clipboard.writeText(M),N(F),setTimeout(()=>N(null),2e3)},w=()=>{navigator.clipboard.writeText(e.id),d(!0),setTimeout(()=>d(!1),2e3)},v=M=>{if(!e.custom_fields)return"";const F=M.toLowerCase().trim(),H=e.custom_fields.find(K=>{const h=K.key.toLowerCase().trim();return F==="mail kp"?h==="mail kp"||h==="mailkp"||h==="email kp"||h==="emailkp"||h.includes("khôi phục")||h.includes("recovery"):F==="sđt"?h==="sđt"||h==="sdt"||h==="phone"||h==="sđt khôi phục"||h.includes("điện thoại")||h==="phone number":F==="backup code"?h==="backup code"||h==="backupcode"||h.includes("backup")||h.includes("mã dự phòng")||h.includes("mã cứu hộ")||h.includes("dự phòng"):F==="pass mail"?h==="pass mail"||h==="passmail"||h==="mật khẩu mail"||h==="mật khẩu email"||h==="pass email"||h==="passemail"||h.includes("mật khẩu email")||h.includes("pass mail"):h===F});return H?H.value:""},S=e.platform_id?t.find(M=>M.id===e.platform_id):null,z=(n==null?void 0:n.remaining)??0,T=7,D=2*Math.PI*T,L=D*(1-z/30),J=z<=5,U=J?"#ef4444":"var(--text-emerald)",P=J?"#ef4444":"var(--text-secondary)",Y=v("mail kp"),re=v("sđt"),A=v("backup code"),W=v("pass mail"),b=e.totp_secret;return l.jsxs("tr",{style:{background:i?"var(--bg-active-tab)":void 0,transition:"var(--transition-smooth)"},children:[l.jsx("td",{style:{width:"40px",textAlign:"center"},children:l.jsx("input",{type:"checkbox",checked:i,onChange:()=>s(e.id),style:{cursor:"pointer",accentColor:"var(--text-accent)"}})}),r.id&&l.jsx("td",{children:l.jsx("div",{style:{cursor:"pointer",display:"inline-flex",alignItems:"center",gap:"6px"},onClick:w,title:"Click để sao chép ID đầy đủ",children:p?l.jsx("span",{style:{fontSize:"12px",color:"var(--text-emerald)",fontWeight:500,fontFamily:"monospace"},children:"Đã sao chép!"}):l.jsx("span",{style:{fontSize:"12px",fontFamily:"monospace",color:"var(--text-secondary)"},children:e.id.substring(0,8)})})}),l.jsx("td",{children:l.jsx("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:S?l.jsxs(l.Fragment,{children:[l.jsx(ai,{name:S.icon,size:18}),l.jsx("span",{style:{fontSize:"13px"},children:S.name})]}):l.jsx("span",{style:{color:"var(--text-muted)",fontSize:"13px"},children:"—"})})}),l.jsx("td",{children:l.jsx("span",{style:{fontWeight:600},children:e.email||e.title||"—"})}),r.username&&l.jsx("td",{children:e.username?l.jsx("div",{style:{cursor:"pointer",display:"inline-flex",alignItems:"center",gap:"6px"},onClick:()=>f(e.username,"username"),title:"Click để sao chép Username",children:m==="username"?l.jsx("span",{style:{fontSize:"13px",color:"var(--text-emerald)",fontWeight:500},children:"Đã sao chép!"}):l.jsx("span",{style:{fontSize:"13px"},children:e.username})}):l.jsx("span",{style:{color:"var(--text-muted)",fontSize:"13px"},children:"—"})}),r.uid&&l.jsx("td",{children:e.uid?l.jsx("div",{style:{cursor:"pointer",display:"inline-flex",alignItems:"center",gap:"6px"},onClick:()=>f(e.uid||"","uid"),title:"Click để sao chép UID",children:m==="uid"?l.jsx("span",{style:{fontSize:"13px",color:"var(--text-emerald)",fontWeight:500},children:"Đã sao chép!"}):l.jsx("span",{style:{fontSize:"13px",fontFamily:"monospace"},children:e.uid})}):l.jsx("span",{style:{color:"var(--text-muted)",fontSize:"13px"},children:"—"})}),r.password&&l.jsx("td",{children:e.password?l.jsxs("div",{style:{display:"inline-flex",alignItems:"center",gap:"6px"},children:[l.jsx("span",{onClick:()=>f(e.password,"password"),style:{fontSize:"13px",fontFamily:"monospace",cursor:"pointer"},title:"Click để sao chép mật khẩu",children:m==="password"?l.jsx("span",{style:{color:"var(--text-emerald)",fontWeight:500,fontFamily:"var(--font-sans)"},children:"Đã sao chép!"}):u?e.password:"••••••••"}),l.jsx("button",{className:"btn btn-secondary",style:{padding:"3px",borderRadius:"4px"},onClick:()=>x(!u),title:u?"Ẩn mật khẩu":"Hiển thị mật khẩu",children:u?l.jsx(Mn,{size:11}):l.jsx(Dn,{size:11})})]}):l.jsx("span",{style:{color:"var(--text-muted)",fontSize:"13px"},children:"—"})}),r.otp&&l.jsx("td",{children:e.totp_secret?l.jsx("div",{style:{display:"inline-flex",alignItems:"center",gap:"8px",cursor:"pointer"},onClick:()=>f((n==null?void 0:n.token)||"","otp"),title:"Click để sao chép OTP",children:m==="otp"?l.jsx("span",{style:{fontSize:"14px",color:"var(--text-emerald)",fontWeight:500},children:"Đã sao chép!"}):l.jsxs(l.Fragment,{children:[l.jsx("span",{style:{fontSize:"14px",fontWeight:"bold",color:"var(--text-accent)"},children:(n==null?void 0:n.token)||"------"}),l.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"4px"},children:[l.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 20 20",style:{transform:"rotate(-90deg)",flexShrink:0},children:[l.jsx("circle",{cx:"10",cy:"10",r:T,fill:"none",stroke:"var(--border-color)",strokeWidth:"2.5"}),z>0&&l.jsx("circle",{cx:"10",cy:"10",r:T,fill:"none",stroke:U,strokeWidth:"2.5",strokeDasharray:D,strokeDashoffset:L,style:{transition:"stroke-dashoffset 1s linear, stroke 0.3s"}})]}),l.jsxs("span",{style:{fontSize:"11px",fontWeight:600,color:P},children:[z,"s"]})]})]})}):l.jsx("span",{style:{color:"var(--text-muted)",fontSize:"13px"},children:"—"})}),r.mailKp&&l.jsx("td",{children:Y?l.jsx("div",{style:{cursor:"pointer",display:"inline-flex",alignItems:"center",gap:"6px"},onClick:()=>f(Y,"mailKp"),title:"Click để sao chép Mail KP",children:m==="mailKp"?l.jsx("span",{style:{fontSize:"13px",color:"var(--text-emerald)",fontWeight:500},children:"Đã sao chép!"}):l.jsx("span",{style:{fontSize:"13px"},children:Y})}):l.jsx("span",{style:{color:"var(--text-muted)",fontSize:"13px"},children:"—"})}),r.phone&&l.jsx("td",{children:re?l.jsx("div",{style:{cursor:"pointer",display:"inline-flex",alignItems:"center",gap:"6px"},onClick:()=>f(re,"phone"),title:"Click để sao chép SĐT",children:m==="phone"?l.jsx("span",{style:{fontSize:"13px",color:"var(--text-emerald)",fontWeight:500},children:"Đã sao chép!"}):l.jsx("span",{style:{fontSize:"13px"},children:re})}):l.jsx("span",{style:{color:"var(--text-muted)",fontSize:"13px"},children:"—"})}),r.backupCode&&l.jsx("td",{children:A?l.jsx("div",{style:{cursor:"pointer",display:"inline-flex",alignItems:"center",gap:"6px"},onClick:()=>f(A,"backupCode"),title:"Click để sao chép Backup Code",children:m==="backupCode"?l.jsx("span",{style:{fontSize:"13px",color:"var(--text-emerald)",fontWeight:500},children:"Đã sao chép!"}):l.jsx("span",{style:{fontSize:"13px",fontFamily:"monospace"},children:A})}):l.jsx("span",{style:{color:"var(--text-muted)",fontSize:"13px"},children:"—"})}),r.passMail&&l.jsx("td",{children:W?l.jsxs("div",{style:{display:"inline-flex",alignItems:"center",gap:"6px"},children:[l.jsx("span",{onClick:()=>f(W,"passMail"),style:{fontSize:"13px",fontFamily:"monospace",cursor:"pointer"},title:"Click để sao chép Mật khẩu Email",children:m==="passMail"?l.jsx("span",{style:{color:"var(--text-emerald)",fontWeight:500,fontFamily:"var(--font-sans)"},children:"Đã sao chép!"}):k?W:"••••••••"}),l.jsx("button",{className:"btn btn-secondary",style:{padding:"3px",borderRadius:"4px"},onClick:M=>{M.stopPropagation(),C(!k)},title:k?"Ẩn mật khẩu":"Hiển thị mật khẩu",children:k?l.jsx(Mn,{size:11}):l.jsx(Dn,{size:11})})]}):l.jsx("span",{style:{color:"var(--text-muted)",fontSize:"13px"},children:"—"})}),r.secretKey&&l.jsx("td",{children:b?l.jsxs("div",{style:{display:"inline-flex",alignItems:"center",gap:"6px"},children:[l.jsx("span",{onClick:()=>f(b,"secretKey"),style:{fontSize:"13px",fontFamily:"monospace",cursor:"pointer"},title:"Click để sao chép Secret Key",children:m==="secretKey"?l.jsx("span",{style:{color:"var(--text-emerald)",fontWeight:500,fontFamily:"var(--font-sans)"},children:"Đã sao chép!"}):y?b:"••••••••"}),l.jsx("button",{className:"btn btn-secondary",style:{padding:"3px",borderRadius:"4px"},onClick:()=>g(!y),title:y?"Ẩn Secret Key":"Hiển thị Secret Key",children:y?l.jsx(Mn,{size:11}):l.jsx(Dn,{size:11})})]}):l.jsx("span",{style:{color:"var(--text-muted)",fontSize:"13px"},children:"—"})}),r.url&&l.jsx("td",{children:e.url?l.jsxs("a",{href:e.url.startsWith("http")?e.url:`https://${e.url}`,target:"_blank",rel:"noreferrer",style:{fontSize:"13px",color:"var(--text-accent)",display:"inline-flex",alignItems:"center",gap:"4px",textDecoration:"none"},children:["Link ",l.jsx(si,{size:12})]}):l.jsx("span",{style:{color:"var(--text-muted)",fontSize:"13px"},children:"—"})}),l.jsx("td",{children:l.jsxs("div",{style:{display:"flex",gap:"8px",alignItems:"center"},children:[l.jsx("button",{onClick:()=>o(e),style:{background:"none",border:"none",color:e.is_favorite?"var(--text-emerald)":"var(--text-muted)",cursor:"pointer"},title:e.is_favorite?"Bỏ yêu thích":"Yêu thích",children:l.jsx(Po,{size:15,fill:e.is_favorite?"var(--text-emerald)":"none"})}),l.jsx("button",{onClick:()=>a(e),style:{background:"none",border:"none",color:"var(--text-secondary)",cursor:"pointer"},title:"Sửa tài khoản",children:l.jsx(pd,{size:15})}),l.jsx("button",{onClick:()=>c(e.id),style:{background:"none",border:"none",color:"#ff4b2b",cursor:"pointer"},title:"Xóa tài khoản",children:l.jsx(un,{size:15})})]})})]})},yf=Vt.memo(gf),mf=({credentials:e,platforms:t,totps:n,visibleColumns:r,selectedIds:i,onToggleSelect:s,onToggleSelectAll:o,onToggleFavorite:a,onEdit:c,onDelete:u})=>{const x=Vt.useRef(null),y=e.length>0&&i.size===e.length,g=i.size>0&&i.size<e.length;return Vt.useEffect(()=>{x.current&&(x.current.indeterminate=g)},[g]),l.jsx("div",{className:"table-container animate-fade-in",children:l.jsxs("table",{className:"enterprise-table",children:[l.jsx("thead",{children:l.jsxs("tr",{children:[l.jsx("th",{style:{width:"40px",textAlign:"center"},children:l.jsx("input",{ref:x,type:"checkbox",checked:y,onChange:o,style:{cursor:"pointer",accentColor:"var(--text-accent)"}})}),r.id&&l.jsx("th",{style:{minWidth:"90px"},children:"ID"}),l.jsx("th",{style:{minWidth:"120px"},children:"Nền tảng"}),l.jsx("th",{style:{minWidth:"140px"},children:"Email"}),r.username&&l.jsx("th",{style:{minWidth:"160px"},children:"Username"}),r.uid&&l.jsx("th",{style:{minWidth:"120px"},children:"UID"}),r.password&&l.jsx("th",{style:{minWidth:"140px"},children:"Mật khẩu"}),r.otp&&l.jsx("th",{style:{minWidth:"140px"},children:"Mã 2FA (OTP)"}),r.mailKp&&l.jsx("th",{style:{minWidth:"160px"},children:"Mail KP"}),r.phone&&l.jsx("th",{style:{minWidth:"110px"},children:"SĐT"}),r.backupCode&&l.jsx("th",{style:{minWidth:"160px"},children:"Backup Code"}),r.passMail&&l.jsx("th",{style:{minWidth:"140px"},children:"Pass Mail"}),r.secretKey&&l.jsx("th",{style:{minWidth:"160px"},children:"Secret Key"}),r.url&&l.jsx("th",{style:{minWidth:"90px"},children:"Liên kết"}),l.jsx("th",{style:{width:"100px",minWidth:"100px"},children:"Thao tác"})]})}),l.jsx("tbody",{children:e.map(k=>l.jsx(yf,{cred:k,platforms:t,totp:n[k.id],visibleColumns:r,isSelected:i.has(k.id),onToggleSelect:s,onToggleFavorite:a,onEdit:c,onDelete:u},k.id))})]})})},xd=({value:e,onChange:t,options:n,placeholder:r="Chọn...",disabled:i=!1,searchable:s=!0})=>{const[o,a]=j.useState(!1),[c,u]=j.useState(""),x=j.useRef(null),y=j.useRef(null),g=n.find(C=>C.value===e);j.useEffect(()=>{const C=m=>{x.current&&!x.current.contains(m.target)&&a(!1)};return document.addEventListener("mousedown",C),()=>document.removeEventListener("mousedown",C)},[]),j.useEffect(()=>{o&&s&&y.current&&(u(""),setTimeout(()=>{var C;(C=y.current)==null||C.focus()},50))},[o,s]);const k=n.filter(C=>C.label.toLowerCase().includes(c.toLowerCase()));return l.jsxs("div",{ref:x,style:{position:"relative",width:"100%"},children:[l.jsxs("button",{type:"button",onClick:()=>!i&&a(!o),className:"form-input",style:{display:"flex",alignItems:"center",justifyContent:"space-between",cursor:i?"not-allowed":"pointer",textAlign:"left",opacity:i?.6:1,paddingRight:"12px",width:"100%",background:"var(--bg-input)",borderColor:o?"var(--text-accent)":"var(--border-input)",boxShadow:o?"var(--glow-accent)":"none",transition:"var(--transition-smooth)",height:"42px",borderRadius:"8px"},disabled:i,children:[l.jsx("span",{style:{color:g?"var(--text-primary)":"var(--text-muted)"},children:g?g.label:r}),l.jsx(Fr,{size:16,style:{color:"var(--text-accent)",transform:o?"rotate(180deg)":"none",transition:"var(--transition-smooth)"}})]}),o&&l.jsxs("div",{className:"glass-panel",style:{position:"absolute",top:"calc(100% + 8px)",left:0,width:"100%",maxHeight:"300px",display:"flex",flexDirection:"column",zIndex:1e3,boxShadow:"0 15px 30px rgba(0, 0, 0, 0.4), var(--glow-accent)",background:"var(--bg-modal)",border:"1px solid var(--text-accent)",borderRadius:"12px",padding:"8px",overflow:"hidden"},children:[s&&n.length>5&&l.jsxs("div",{style:{position:"relative",marginBottom:"8px",flexShrink:0},children:[l.jsx(oi,{size:14,style:{position:"absolute",left:"10px",top:"50%",transform:"translateY(-50%)",color:"var(--text-muted)"}}),l.jsx("input",{ref:y,type:"text",className:"form-input",placeholder:"Tìm kiếm nhanh...",value:c,onChange:C=>u(C.target.value),style:{width:"100%",padding:"6px 30px 6px 30px",fontSize:"13px",borderRadius:"6px",background:"rgba(0, 0, 0, 0.2)",height:"32px",borderColor:"var(--border-color)"}}),c&&l.jsx("button",{type:"button",onClick:()=>u(""),style:{position:"absolute",right:"10px",top:"50%",transform:"translateY(-50%)",background:"none",border:"none",color:"var(--text-muted)",cursor:"pointer",display:"flex",alignItems:"center",padding:0},children:l.jsx(fn,{size:14})})]}),l.jsx("div",{className:"scrollable",style:{overflowY:"auto",display:"flex",flexDirection:"column",gap:"4px",flexGrow:1},children:k.length===0?l.jsx("div",{style:{padding:"12px",fontSize:"13px",color:"var(--text-muted)",textAlign:"center"},children:"Không tìm thấy kết quả"}):k.map(C=>{const m=C.value===e;return l.jsx("button",{type:"button",className:"dropdown-item",onClick:()=>{t(C.value),a(!1)},style:{display:"block",width:"100%",padding:"10px 12px",borderRadius:"8px",border:"none",background:m?"var(--bg-active-tab)":"transparent",color:m?"var(--text-accent)":"var(--text-primary)",fontWeight:m?600:400,cursor:"pointer",textAlign:"left",fontSize:"13px"},children:C.label},C.value)})})]})]})},vf={facebook:["Pass Mail","Mail KP","Pass Mail KP","SĐT","Cookie","Token","Backup Code"],tiktok:["Email","Pass Mail","SĐT","Cookie","Backup Code"],twitter:["Email","Pass Mail","Auth Token","Backup Code"],instagram:["Email","Pass Mail","Cookie","Backup Code"],google:["Mail KP","Pass Mail KP","SĐT","Pass Mail","Backup Code"],outlook:["Mail KP","SĐT","Client ID","Refresh Token","Pass Mail","Backup Code"],telegram:["API ID","API Hash","Session String"],discord:["Email","Token","Backup Code","Pass Mail"],reddit:["Email","Pass Mail","Cookie","Backup Code"]},kf=({isOpen:e,onClose:t,credential:n,onChange:r,onSave:i,platforms:s})=>{var C;if(!e)return null;const o=n.platform_id||"",a=vf[o]||[],c=(n.custom_fields||[]).filter(m=>!a.some(N=>N.toLowerCase().trim()===m.key.toLowerCase().trim())),u=(m,N)=>{const p=[...n.custom_fields||[]],d=p.findIndex(f=>f.key.toLowerCase().trim()===m.toLowerCase().trim());d>=0?p[d]={...p[d],value:N}:p.push({key:m,value:N}),r({...n,custom_fields:p})},x=m=>{var p;const N=(p=n.custom_fields)==null?void 0:p.find(d=>d.key.toLowerCase().trim()===m.toLowerCase().trim());return N?N.value:""},y=()=>{const m=[...n.custom_fields||[]];m.push({key:"",value:""}),r({...n,custom_fields:m})},g=(m,N,p)=>{const d=c[m],f=[...n.custom_fields||[]],w=f.findIndex(v=>v===d);w>=0&&(f[w]={...f[w],[N]:p},r({...n,custom_fields:f}))},k=m=>{const N=c[m],p=(n.custom_fields||[]).filter(d=>d!==N);r({...n,custom_fields:p})};return l.jsx("div",{style:{position:"fixed",top:0,left:0,right:0,bottom:0,background:"var(--modal-backdrop)",backdropFilter:"blur(8px)",display:"flex",alignItems:"center",justifyContent:"center",zIndex:100},children:l.jsxs("form",{onSubmit:i,className:"glass-panel animate-fade-in scrollable",style:{width:"100%",maxWidth:"620px",padding:"30px",display:"flex",flexDirection:"column",gap:"16px",maxHeight:"90vh",overflowY:"auto",background:"var(--bg-modal)"},children:[l.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[l.jsx("h3",{style:{fontSize:"18px",fontWeight:600},children:n.id?"Sửa tài khoản":"Thêm tài khoản mới"}),l.jsx("button",{type:"button",onClick:t,style:{background:"none",border:"none",color:"var(--text-secondary)",cursor:"pointer"},children:l.jsx(fn,{size:20})})]}),l.jsxs("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:"16px"},children:[l.jsxs("div",{className:"form-group",children:[l.jsx("label",{className:"form-label",children:"Tên đăng nhập"}),l.jsx("input",{type:"text",className:"form-input",placeholder:"Nhập username...",value:n.username||"",onChange:m=>r({...n,username:m.target.value})})]}),l.jsxs("div",{className:"form-group",children:[l.jsx("label",{className:"form-label",children:"Email"}),l.jsx("input",{type:"text",className:"form-input",placeholder:"Nhập địa chỉ email...",value:n.email||"",onChange:m=>r({...n,email:m.target.value})})]}),l.jsxs("div",{className:"form-group",children:[l.jsx("label",{className:"form-label",children:"UID"}),l.jsx("input",{type:"text",className:"form-input",placeholder:"UID tài khoản...",value:n.uid||"",onChange:m=>r({...n,uid:m.target.value})})]}),l.jsxs("div",{className:"form-group",children:[l.jsx("label",{className:"form-label",children:"Mật khẩu"}),l.jsx("input",{type:"text",className:"form-input",placeholder:"Nhập mật khẩu...",value:n.password||"",onChange:m=>r({...n,password:m.target.value})})]})]}),l.jsxs("div",{className:"form-group",children:[l.jsx("label",{className:"form-label",children:"Đường dẫn Website"}),l.jsx("input",{type:"text",className:"form-input",placeholder:"https://example.com...",value:n.url||"",onChange:m=>r({...n,url:m.target.value})})]}),l.jsxs("div",{className:"form-group",children:[l.jsx("label",{className:"form-label",children:"Nền tảng (Platform)"}),l.jsx(xd,{value:n.platform_id||"",onChange:m=>r({...n,platform_id:m}),options:s.map(m=>({value:m.id,label:m.name})),placeholder:"Không chọn..."})]}),l.jsxs("div",{className:"form-group",children:[l.jsx("label",{className:"form-label",children:"Khóa bí mật 2FA (TOTP Secret Key)"}),l.jsx("input",{type:"text",className:"form-input",placeholder:"Nhập mã bí mật Base32 (ví dụ: JBSWY3DPEHPK3PXP)...",value:n.totp_secret||"",onChange:m=>r({...n,totp_secret:m.target.value})})]}),a.length>0&&l.jsxs("div",{className:"form-group",children:[l.jsxs("label",{className:"form-label",style:{fontWeight:600,color:"var(--text-accent)"},children:["Thông tin bổ sung (",(C=s.find(m=>m.id===o))==null?void 0:C.name,")"]}),l.jsx("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:"12px",background:"rgba(255, 255, 255, 0.02)",padding:"14px",borderRadius:"8px",border:"1px solid var(--border-color)"},children:a.map(m=>l.jsxs("div",{className:"form-group",style:{marginBottom:0},children:[l.jsx("label",{className:"form-label",style:{fontSize:"12px"},children:m}),l.jsx("input",{type:"text",className:"form-input",placeholder:`Nhập ${m.toLowerCase()}...`,value:x(m),onChange:N=>u(m,N.target.value)})]},m))})]}),l.jsxs("div",{className:"form-group",children:[l.jsxs("label",{className:"form-label",style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[l.jsx("span",{children:"Trường tùy chỉnh khác (Ví dụ: Mã PIN, Câu hỏi bảo mật...)"}),l.jsx("button",{type:"button",className:"btn btn-secondary",style:{padding:"2px 8px",fontSize:"11px"},onClick:y,children:"+ Thêm trường"})]}),c.map((m,N)=>l.jsxs("div",{className:"custom-field-row",children:[l.jsx("input",{type:"text",className:"form-input",placeholder:"Tên trường (ví dụ: PIN)",value:m.key,onChange:p=>g(N,"key",p.target.value)}),l.jsx("input",{type:"text",className:"form-input",placeholder:"Giá trị",value:m.value,onChange:p=>g(N,"value",p.target.value)}),l.jsx("button",{type:"button",className:"btn btn-danger",style:{padding:"10px"},onClick:()=>k(N),children:"X"})]},N))]}),l.jsxs("div",{className:"form-group",children:[l.jsx("label",{className:"form-label",children:"Ghi chú thêm"}),l.jsx("textarea",{className:"form-input",placeholder:"Nhập ghi chú hoặc mã backup giải cứu...",rows:3,value:n.notes||"",onChange:m=>r({...n,notes:m.target.value}),style:{resize:"vertical"}})]}),l.jsxs("div",{style:{display:"flex",gap:"12px",justifyContent:"flex-end",marginTop:"10px"},children:[l.jsx("button",{type:"button",className:"btn btn-secondary",onClick:t,children:"Hủy bỏ"}),l.jsx("button",{type:"submit",className:"btn btn-primary",children:"Lưu tài khoản"})]})]})})},jf=Vt.memo(({index:e,mapping:t,exampleValue:n,mappingOptions:r,onMappingChange:i,onRemove:s})=>l.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"4px",width:"150px",flexShrink:0},children:[l.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[l.jsxs("span",{style:{fontSize:"11px",color:"var(--text-secondary)",fontWeight:500},children:["Cột ",e+1]}),l.jsx("button",{type:"button",onClick:()=>s(e),style:{background:"none",border:"none",color:"var(--text-secondary)",cursor:"pointer",padding:"2px",display:"flex",alignItems:"center"},children:l.jsx(fn,{size:14})})]}),l.jsx("select",{value:t,onChange:o=>i(e,o.target.value),className:"form-input",style:{padding:"8px 12px",fontSize:"13px",borderRadius:"8px",border:"1px solid var(--border-color)",background:"var(--bg-panel)",width:"100%"},children:r.map(o=>l.jsx("option",{value:o.value,children:o.label},o.value))}),l.jsxs("span",{style:{fontSize:"11px",color:"var(--text-muted)",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},title:n,children:["Ví dụ: ",n||"—"]})]})),Wa={facebook:"UID|Pass|2FA|Email|Pass_Email|MailKP|Pass_MailKP|Phone|Cookie|Token",tiktok:"Username|Pass|Email|Pass_Email|2FA|Phone|Cookie",twitter:"User|Pass|2FA|Backup Code|Mail|Pass Mail",instagram:"Username|Pass|Email|Pass_Email|2FA|Cookie",google:"Email|Pass|2FA|MailKP|Pass_MailKP|Phone",outlook:"Email|Pass|MailKP|Phone|Client_ID|Refresh_Token",telegram:"Phone|Pass_2FA|API_ID|API_Hash|Session_String",discord:"Username|Email|Pass|Token|2FA|Backup_Codes",reddit:"Username|Pass|Email|Pass_Email|Cookie"},wf=[{value:"skip",label:"❌ Bỏ qua cột này"},{value:"email",label:"📧 Email"},{value:"password",label:"🔑 Mật khẩu"},{value:"totp_secret",label:"🛡️ Mã 2FA (OTP)"},{value:"username",label:"👤 Tên đăng nhập"},{value:"uid",label:"🆔 UID tài khoản"},{value:"mail_kp",label:"📩 Mail khôi phục"},{value:"phone",label:"📞 Số điện thoại"},{value:"cookie",label:"🍪 Cookie"},{value:"token",label:"🔑 Access Token"},{value:"backup_code",label:"💾 Backup Code"},{value:"pass_mail",label:"🔑 Pass Mail"}],Sf=({isOpen:e,onClose:t,text:n,onChange:r,onSubmit:i,platforms:s})=>{const[o,a]=j.useState(""),[c,u]=j.useState(["email"]),[x,y]=j.useState(!1);j.useEffect(()=>{const p=d=>{d.key==="Escape"&&t()};return e&&window.addEventListener("keydown",p),()=>{window.removeEventListener("keydown",p)}},[e,t]);const g=j.useCallback((p,d)=>{const f=[...c];f[p]=d,u(f),y(!0)},[c]),k=j.useCallback(p=>{u(d=>d.filter((f,w)=>w!==p)),y(!0)},[]),C=j.useCallback(()=>{u(p=>[...p,"skip"]),y(!0)},[]);j.useEffect(()=>{e&&(n||(y(!1),u(["email"])))},[e,n]),j.useEffect(()=>{if(x||!n)return;const p=n.split(`
271
+ `).map(S=>S.trim()).filter(S=>S);if(p.length===0)return;const f=p[0].split("|").map(S=>S.trim()),w=f.length;let v=Array(w).fill("skip");if(o&&Wa[o]){const z=Wa[o].split("|").map(T=>T.trim().toLowerCase());f.forEach((T,D)=>{const L=z[D];if(!L){v[D]="skip";return}L==="backup code"||L==="backup_codes"||L==="backup_code"||L.includes("backup")?v[D]="backup_code":L==="pass mail"||L==="pass_mail"||L==="pass email"||L==="pass_email"?v[D]="pass_mail":L.includes("email")||L==="mail"?v[D]="email":L.includes("pass")||L==="pwd"?L.includes("khôi phục")||L.includes("recovery")||L.includes("kp")?v[D]="mail_kp":v[D]="password":L==="2fa"||L==="otp"||L==="totp"?v[D]="totp_secret":L==="uid"?v[D]="uid":L.includes("username")||L==="user"?v[D]="username":L==="sđt"||L==="sdt"||L.includes("phone")?v[D]="phone":L.includes("khôi phục")||L.includes("recovery")||L.includes("mail kp")||L.includes("mailkp")?v[D]="mail_kp":L==="cookie"?v[D]="cookie":L==="token"?v[D]="token":v[D]="skip"})}else f.forEach((S,z)=>{const T=S.toLowerCase();if(T.includes("@")&&!T.includes("khôi phục")&&!T.includes("recovery")&&!T.includes("kp"))v[z]="email";else if(z===1&&f[0]&&f[0].includes("@"))v[z]="password";else if(S.length>=16&&/^[A-Z2-7=]+$/i.test(S))v[z]="totp_secret";else if(T.includes("gmail.com")||T.includes("outlook.com")||T.includes("yahoo.com")){const D=f.slice(0,z).some(L=>L.includes("@"));v[z]=D?"mail_kp":"email"}else/^\d{9,11}$/.test(S)?v[z]="phone":/^\d{15,}$/.test(S)&&(v[z]="uid")});u(v)},[n,o,x]);const m=j.useMemo(()=>{const p=n.split(`
272
+ `).map(d=>d.trim()).filter(d=>d);return p.length?p[0].split("|").map(d=>d.trim()):[]},[n]);if(!e)return null;const N=()=>{if(c.length===0){alert("Vui lòng nhập/dán chuỗi dữ liệu thô vào khung bên dưới.");return}const p=c.map(d=>d==="email"?"email":d==="password"?"pass":d==="totp_secret"?"2fa":d==="username"?"username":d==="uid"?"uid":d==="mail_kp"?"mail kp":d==="phone"?"sđt":d==="cookie"?"cookie":d==="token"?"token":d==="backup_code"?"backup code":d==="pass_mail"?"pass mail":"skip").join("|");i(o||void 0,p)};return l.jsx("div",{style:{position:"fixed",top:0,left:0,right:0,bottom:0,background:"var(--modal-backdrop)",backdropFilter:"blur(8px)",display:"flex",alignItems:"center",justifyContent:"center",zIndex:100},children:l.jsxs("div",{className:"glass-panel animate-fade-in",style:{width:"100%",maxWidth:"900px",maxHeight:"90vh",overflowY:"auto",padding:"30px",display:"flex",flexDirection:"column",gap:"18px",background:"var(--bg-modal)"},children:[l.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[l.jsx("h3",{style:{fontSize:"18px",fontWeight:600},children:"Dán nhanh chuỗi thô"}),l.jsx("button",{type:"button",onClick:t,style:{background:"none",border:"none",color:"var(--text-secondary)",cursor:"pointer"},children:l.jsx(fn,{size:20})})]}),l.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"6px"},children:[l.jsx("label",{style:{fontSize:"13px",fontWeight:500,color:"var(--text-secondary)"},children:"Nền tảng tài khoản"}),l.jsx(xd,{value:o,onChange:p=>a(p),options:[{value:"",label:"Tự động nhận diện / Cơ bản"},...s.map(p=>({value:p.id,label:p.name}))],placeholder:"Tự động nhận diện / Cơ bản"})]}),l.jsx("textarea",{className:"form-input",placeholder:"Dán chuỗi vào đây (định dạng các cột phân tách bằng dấu '|')...",value:n,onChange:p=>r(p.target.value),style:{resize:"vertical",fontFamily:"monospace",minHeight:"200px",width:"100%"}}),l.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"10px",background:"rgba(255, 255, 255, 0.02)",padding:"16px",borderRadius:"12px",border:"1px solid var(--border-color)"},children:[l.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[l.jsxs("span",{style:{fontSize:"13px",fontWeight:600,color:"var(--text-accent)"},children:["Cấu hình các cột (",c.length," cột):"]}),l.jsxs("button",{type:"button",onClick:C,className:"btn btn-secondary",style:{padding:"6px 12px",fontSize:"12px",fontWeight:600,display:"flex",alignItems:"center",gap:"4px"},children:[l.jsx(To,{size:16})," Thêm cột"]})]}),c.length===0?l.jsx("p",{style:{fontSize:"13px",color:"var(--text-muted)",textAlign:"center"},children:'Chưa có cột nào được cấu hình. Sử dụng nút "+ Thêm cột" để thêm.'}):l.jsx("div",{style:{display:"flex",flexDirection:"row",flexWrap:"nowrap",gap:"12px",overflowX:"auto",padding:"8px 4px 12px 4px",width:"100%",scrollbarWidth:"thin"},children:c.map((p,d)=>{const f=m[d]||"";return l.jsx(jf,{index:d,mapping:p,exampleValue:f,mappingOptions:wf,onMappingChange:g,onRemove:k},d)})})]}),l.jsxs("div",{style:{display:"flex",gap:"12px",justifyContent:"flex-end",marginTop:"10px"},children:[l.jsx("button",{type:"button",className:"btn btn-secondary",onClick:t,children:"Hủy"}),l.jsx("button",{type:"button",className:"btn btn-primary",onClick:N,children:"Phân tích & Nhập"})]})]})})},Cf=({isOpen:e,onClose:t,onImport:n,onExport:r})=>(j.useEffect(()=>{const i=s=>{s.key==="Escape"&&t()};return e&&window.addEventListener("keydown",i),()=>{window.removeEventListener("keydown",i)}},[e,t]),e?l.jsxs("div",{style:{position:"fixed",top:0,left:0,right:0,bottom:0,background:"var(--modal-backdrop)",backdropFilter:"blur(8px)",display:"flex",alignItems:"center",justifyContent:"center",zIndex:150},children:[l.jsx("div",{onClick:t,style:{position:"absolute",top:0,left:0,right:0,bottom:0,zIndex:-1}}),l.jsxs("div",{className:"glass-panel animate-fade-in",style:{width:"100%",maxWidth:"500px",padding:"24px",background:"var(--bg-modal)",display:"flex",flexDirection:"column",gap:"20px",boxShadow:"0 20px 25px -5px rgba(0, 0, 0, 0.4)"},children:[l.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[l.jsx("h3",{style:{fontSize:"16px",fontWeight:600,color:"var(--text-primary)"},children:"Nhập / Xuất dữ liệu"}),l.jsx("button",{type:"button",onClick:t,style:{background:"none",border:"none",color:"var(--text-secondary)",cursor:"pointer",display:"flex",alignItems:"center"},title:"Đóng",children:l.jsx(fn,{size:18})})]}),l.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"10px"},children:[l.jsx("span",{style:{fontSize:"11px",fontWeight:600,color:"var(--text-secondary)",textTransform:"uppercase",letterSpacing:"0.05em"},children:"Nhập dữ liệu vào Vault"}),l.jsxs("label",{className:"btn btn-secondary",style:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:"10px",padding:"24px 16px",borderRadius:"8px",cursor:"pointer",border:"2px dashed var(--border-color)",background:"rgba(255, 255, 255, 0.01)",transition:"var(--transition-smooth)"},children:[l.jsx(df,{size:24,style:{color:"var(--text-accent)"}}),l.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",gap:"4px"},children:[l.jsx("span",{style:{fontSize:"13px",fontWeight:600,color:"var(--text-primary)"},children:"Chọn tệp tin để nhập..."}),l.jsx("span",{style:{fontSize:"11px",color:"var(--text-muted)"},children:"Hỗ trợ tệp tin .TXT, .CSV, .JSON"})]}),l.jsx("input",{type:"file",accept:".csv,.json,.txt",onChange:i=>{n(i),t()},style:{display:"none"}})]})]}),l.jsx("hr",{style:{border:"none",borderTop:"1px solid var(--border-color)",margin:"4px 0"}}),l.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"10px"},children:[l.jsx("span",{style:{fontSize:"11px",fontWeight:600,color:"var(--text-secondary)",textTransform:"uppercase",letterSpacing:"0.05em"},children:"Xuất dữ liệu mã hóa"}),l.jsxs("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:"10px"},children:[l.jsxs("button",{type:"button",className:"btn btn-secondary",onClick:()=>{r("json"),t()},style:{display:"flex",flexDirection:"column",alignItems:"center",gap:"8px",padding:"16px 12px",borderRadius:"8px",cursor:"pointer",fontSize:"12px"},children:[l.jsx(Vn,{size:18,style:{color:"var(--text-emerald)"}}),l.jsx("span",{style:{fontWeight:600},children:"Xuất JSON"})]}),l.jsxs("button",{type:"button",className:"btn btn-secondary",onClick:()=>{r("csv"),t()},style:{display:"flex",flexDirection:"column",alignItems:"center",gap:"8px",padding:"16px 12px",borderRadius:"8px",cursor:"pointer",fontSize:"12px"},title:"Xuất định dạng email|pass|2FA|Mail KP|SĐT",children:[l.jsx(Vn,{size:18,style:{color:"var(--text-accent)"}}),l.jsx("span",{style:{fontWeight:600},children:"Xuất TXT (Gmail)"})]})]})]})]})]}):null),bf=({currentPassword:e,setCurrentPassword:t,newPassword:n,setNewPassword:r,confirmNewPassword:i,setConfirmNewPassword:s,newHint:o,setNewHint:a,passwordError:c,passwordSuccess:u,isChangingPassword:x,onSubmit:y})=>l.jsxs("div",{className:"glass-panel",style:{padding:"30px",display:"flex",flexDirection:"column",gap:"20px"},children:[l.jsxs("div",{children:[l.jsx("h3",{style:{fontSize:"18px",fontWeight:600,marginBottom:"6px"},children:"Đổi Mật khẩu Master"}),l.jsx("p",{style:{fontSize:"13px",color:"var(--text-secondary)"},children:"Mật khẩu Master được sử dụng để mã hóa dữ liệu trong Vault. Việc thay đổi sẽ tự động giải mã và mã hóa lại tất cả tài khoản bằng khóa mới."})]}),l.jsxs("form",{onSubmit:y,style:{display:"flex",flexDirection:"column",gap:"16px"},children:[c&&l.jsx("div",{style:{padding:"12px 16px",borderRadius:"8px",background:"rgba(255, 75, 43, 0.1)",border:"1px solid rgba(255, 75, 43, 0.2)",color:"#ff4b2b",fontSize:"13px",fontWeight:500},children:c}),u&&l.jsx("div",{style:{padding:"12px 16px",borderRadius:"8px",background:"rgba(56, 239, 125, 0.1)",border:"1px solid rgba(56, 239, 125, 0.2)",color:"var(--text-emerald)",fontSize:"13px",fontWeight:500},children:u}),l.jsxs("div",{className:"form-group",style:{marginBottom:0},children:[l.jsx("label",{className:"form-label",children:"Mật khẩu Master hiện tại *"}),l.jsx("input",{type:"password",className:"form-input",required:!0,value:e,onChange:g=>t(g.target.value),placeholder:"Nhập mật khẩu hiện tại..."})]}),l.jsxs("div",{className:"form-group",style:{marginBottom:0},children:[l.jsx("label",{className:"form-label",children:"Mật khẩu Master mới *"}),l.jsx("input",{type:"password",className:"form-input",required:!0,value:n,onChange:g=>r(g.target.value),placeholder:"Ít nhất 8 ký tự..."})]}),l.jsxs("div",{className:"form-group",style:{marginBottom:0},children:[l.jsx("label",{className:"form-label",children:"Xác nhận mật khẩu Master mới *"}),l.jsx("input",{type:"password",className:"form-input",required:!0,value:i,onChange:g=>s(g.target.value),placeholder:"Nhập lại mật khẩu mới..."})]}),l.jsxs("div",{className:"form-group",style:{marginBottom:0},children:[l.jsx("label",{className:"form-label",children:"Gợi ý mật khẩu (Hint) - Không bắt buộc"}),l.jsx("input",{type:"text",className:"form-input",value:o,onChange:g=>a(g.target.value),placeholder:"Gợi ý giúp bạn nhớ lại mật khẩu..."})]}),l.jsx("button",{type:"submit",className:"btn btn-primary",disabled:x,style:{marginTop:"8px",alignSelf:"flex-start"},children:x?"Đang xử lý...":"Cập nhật mật khẩu Master"})]})]}),zf=({vaultInfo:e,isLoadingVaultInfo:t,vaultInfoError:n})=>l.jsxs("div",{className:"glass-panel",style:{padding:"30px",display:"flex",flexDirection:"column",gap:"24px"},children:[l.jsxs("div",{children:[l.jsx("h3",{style:{fontSize:"18px",fontWeight:600,marginBottom:"6px"},children:"Thông số hệ thống & Lưu trữ"}),l.jsx("p",{style:{fontSize:"13px",color:"var(--text-secondary)"},children:"Thông tin chi tiết về cơ sở dữ liệu mã hóa và thuật toán mật mã của Vault."})]}),t?l.jsx("p",{style:{fontSize:"14px",color:"var(--text-secondary)"},children:"Đang tải thông tin hệ thống..."}):n?l.jsx("div",{style:{padding:"12px 16px",borderRadius:"8px",background:"rgba(255, 75, 43, 0.1)",border:"1px solid rgba(255, 75, 43, 0.2)",color:"#ff4b2b",fontSize:"13px"},children:n}):e?l.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"16px"},children:[l.jsxs("div",{style:{display:"grid",gridTemplateColumns:"220px 1fr",gap:"12px",alignItems:"center",borderBottom:"1px solid var(--border-color)",paddingBottom:"12px"},children:[l.jsx("span",{style:{fontSize:"14px",fontWeight:600,color:"var(--text-secondary)"},children:"Đường dẫn file dữ liệu:"}),l.jsx("code",{style:{fontSize:"13px",background:"var(--bg-input)",padding:"6px 10px",borderRadius:"4px",wordBreak:"break-all",color:"var(--text-accent)"},children:e.path})]}),l.jsxs("div",{style:{display:"grid",gridTemplateColumns:"220px 1fr",gap:"12px",alignItems:"center",borderBottom:"1px solid var(--border-color)",paddingBottom:"12px"},children:[l.jsx("span",{style:{fontSize:"14px",fontWeight:600,color:"var(--text-secondary)"},children:"Số lượng tài khoản:"}),l.jsxs("span",{style:{fontSize:"14px",fontWeight:500},children:[e.credentialsCount," mục"]})]}),l.jsxs("div",{style:{display:"grid",gridTemplateColumns:"220px 1fr",gap:"12px",alignItems:"center",borderBottom:"1px solid var(--border-color)",paddingBottom:"12px"},children:[l.jsx("span",{style:{fontSize:"14px",fontWeight:600,color:"var(--text-secondary)"},children:"Số lượng danh mục:"}),l.jsxs("span",{style:{fontSize:"14px",fontWeight:500},children:[e.categoriesCount," mục"]})]}),l.jsxs("div",{style:{display:"grid",gridTemplateColumns:"220px 1fr",gap:"12px",alignItems:"center",borderBottom:"1px solid var(--border-color)",paddingBottom:"12px"},children:[l.jsx("span",{style:{fontSize:"14px",fontWeight:600,color:"var(--text-secondary)"},children:"Thuật toán mã hóa:"}),l.jsx("span",{style:{fontSize:"14px",fontWeight:500},children:"AES-256-GCM (Authenticated Encryption)"})]}),l.jsxs("div",{style:{display:"grid",gridTemplateColumns:"220px 1fr",gap:"12px",alignItems:"center",paddingBottom:"12px"},children:[l.jsx("span",{style:{fontSize:"14px",fontWeight:600,color:"var(--text-secondary)"},children:"Hàm băm khóa (KDF):"}),l.jsx("span",{style:{fontSize:"14px",fontWeight:500},children:"PBKDF2 với HMAC-SHA256 (100.000 vòng lặp)"})]})]}):null]}),Tf=({tailscaleStatus:e,isLoadingTailscale:t,tailscaleError:n,setTailscaleError:r,isSubmittingTailscale:i,isProvisioningCert:s,onInstall:o,onConnect:a,onDisconnect:c,onLogout:u,onProvisionCert:x})=>{const[y,g]=j.useState(""),[k,C]=j.useState(!0),[m,N]=j.useState(""),[p,d]=j.useState(!1),f=v=>{v.preventDefault(),a(y||void 0,k,m||void 0),g("")},w=()=>{a(void 0,k,void 0)};return l.jsxs("div",{className:"glass-panel animate-fade-in",style:{padding:"24px",display:"flex",flexDirection:"column",gap:"16px"},children:[l.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[l.jsx(ud,{size:20,style:{color:"var(--text-accent)"}}),l.jsx("h3",{style:{fontSize:"16px",fontWeight:600},children:"Tailscale VPN Client"})]}),l.jsx("p",{style:{fontSize:"13px",color:"var(--text-secondary)",marginTop:"-8px"},children:"Kết nối máy tính của bạn vào mạng lưới Tailnet riêng tư và bảo mật."}),t?l.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"10px"},children:[l.jsx("div",{style:{width:"18px",height:"18px",border:"2px solid var(--text-accent)",borderTopColor:"transparent",borderRadius:"50%",animation:"spin 1s linear infinite"}}),l.jsx("p",{style:{fontSize:"13px",color:"var(--text-secondary)"},children:"Đang truy vấn trạng thái..."})]}):e?l.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"16px"},children:[n&&l.jsxs("div",{style:{padding:"10px 14px",borderRadius:"8px",background:"rgba(255, 75, 43, 0.1)",border:"1px solid rgba(255, 75, 43, 0.2)",color:"#ff4b2b",fontSize:"13px",display:"flex",justifyContent:"space-between",alignItems:"center"},children:[l.jsx("span",{children:n}),l.jsx("button",{type:"button",onClick:()=>r(null),style:{background:"none",border:"none",color:"#ff4b2b",cursor:"pointer",fontWeight:"bold",fontSize:"14px"},children:"✕"})]}),l.jsxs("div",{className:"glass-panel",style:{padding:"16px",background:"rgba(255,255,255,0.01)",display:"flex",alignItems:"center",justifyContent:"space-between"},children:[l.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"12px"},children:[l.jsx("div",{style:{width:"10px",height:"10px",borderRadius:"50%",background:e.backendState==="Running"?"var(--text-emerald)":e.backendState==="Installing"?"var(--text-accent)":"var(--text-muted)",boxShadow:e.backendState==="Running"?"var(--glow-emerald)":e.backendState==="Installing"?"var(--glow-accent)":"none",animation:e.backendState==="Running"||e.backendState==="Installing"?"pulse-glow 2s infinite":"none"}}),l.jsxs("div",{children:[l.jsx("div",{style:{fontSize:"14px",fontWeight:600},children:e.backendState==="Running"?"Đã kết nối VPN":e.backendState==="NotInstalled"?"Chưa cài đặt Tailscale":e.backendState==="Installing"?"Đang cài đặt Tailscale...":"Đã ngắt kết nối"}),l.jsxs("div",{style:{fontSize:"11px",color:"var(--text-muted)"},children:["Trạng thái: ",e.backendState]})]})]}),l.jsx("div",{style:{display:"flex",gap:"8px"},children:e.backendState==="Running"?l.jsxs(l.Fragment,{children:[l.jsx("button",{type:"button",className:"btn btn-secondary",onClick:c,style:{padding:"6px 12px",fontSize:"13px"},children:"Ngắt kết nối"}),l.jsx("button",{type:"button",className:"btn btn-danger",onClick:u,style:{padding:"6px 12px",fontSize:"13px"},children:"Đăng xuất"})]}):e.backendState==="Installing"?l.jsx("div",{style:{fontSize:"12px",color:"var(--text-muted)",fontStyle:"italic"},children:"Đang tải và giải nén..."}):e.backendState==="NotInstalled"?l.jsx("button",{type:"button",className:"btn btn-primary",onClick:o,style:{padding:"6px 12px",fontSize:"13px"},children:"Tự động cài đặt (MSI)"}):l.jsx("button",{type:"button",className:"btn btn-emerald",style:{padding:"6px 12px",fontSize:"13px"},onClick:w,disabled:i,children:i?"Đang kết nối...":"Kết nối nhanh"})})]}),e.backendState==="Installing"&&l.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"10px",background:"rgba(255,255,255,0.02)",padding:"16px",borderRadius:"8px"},children:[l.jsxs("div",{style:{display:"flex",justifyContent:"space-between",fontSize:"13px"},children:[l.jsx("span",{style:{fontWeight:600,color:"var(--text-accent)"},children:e.installStatus||"Đang cài đặt..."}),l.jsxs("span",{children:[e.installProgress||0,"%"]})]}),l.jsx("div",{style:{width:"100%",height:"8px",background:"var(--bg-input)",borderRadius:"4px",overflow:"hidden"},children:l.jsx("div",{style:{width:`${e.installProgress||0}%`,height:"100%",background:"var(--text-accent)",transition:"width 0.3s ease"}})})]}),e.backendState==="NotInstalled"&&l.jsxs("div",{style:{padding:"16px",borderRadius:"8px",background:"rgba(217, 119, 6, 0.05)",border:"1px solid rgba(217, 119, 6, 0.15)",fontSize:"13px",lineHeight:"1.6"},children:[l.jsx("p",{style:{fontWeight:600,color:"var(--text-accent)",marginBottom:"8px"},children:"Chưa cài đặt Tailscale CLI trên thiết bị của bạn."}),l.jsxs("div",{style:{display:"flex",gap:"12px",marginBottom:"16px"},children:[l.jsx("button",{type:"button",className:"btn btn-primary",onClick:o,style:{padding:"8px 16px",fontSize:"13px"},children:"Tự động cài đặt ngầm (Windows)"}),l.jsx("a",{href:"https://tailscale.com/download/windows",target:"_blank",rel:"noreferrer",className:"btn btn-secondary",style:{padding:"8px 16px",fontSize:"13px",textDecoration:"none",display:"inline-flex",alignItems:"center"},children:"Tải thủ công từ trang chủ"})]}),l.jsxs("details",{style:{cursor:"pointer"},children:[l.jsx("summary",{style:{fontWeight:600,color:"var(--text-secondary)",fontSize:"12px"},children:"Hướng dẫn cấu hình thủ công"}),l.jsxs("ol",{style:{paddingLeft:"20px",display:"flex",flexDirection:"column",gap:"6px",marginTop:"8px",fontSize:"12px"},children:[l.jsx("li",{children:"Cài đặt ứng dụng Tailscale và đăng nhập vào tài khoản của bạn."}),l.jsxs("li",{children:["Sau khi cài đặt xong, bấm nút ",l.jsx("strong",{children:"Kiểm tra lại"})," phía trên để nhận diện CLI."]})]})]})]}),e.backendState==="Running"&&l.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"12px",background:"rgba(0,0,0,0.1)",padding:"16px",borderRadius:"8px",fontSize:"13px"},children:[l.jsxs("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:"16px"},children:[l.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"6px"},children:[l.jsxs("div",{children:[l.jsx("span",{style:{color:"var(--text-secondary)"},children:"Tên thiết bị:"})," ",l.jsx("strong",{children:e.deviceName})]}),l.jsxs("div",{children:[l.jsx("span",{style:{color:"var(--text-secondary)"},children:"Mạng Tailnet:"})," ",l.jsx("strong",{children:e.tailnet})]}),l.jsxs("div",{children:[l.jsx("span",{style:{color:"var(--text-secondary)"},children:"Peers hoạt động:"})," ",l.jsxs("strong",{children:[e.peersCount," thiết bị"]})]})]}),l.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"6px"},children:[l.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"6px"},children:[l.jsx("span",{style:{color:"var(--text-secondary)"},children:"IPv4:"}),l.jsx("code",{style:{background:"var(--bg-input)",padding:"2px 6px",borderRadius:"4px",color:"var(--text-accent)"},children:e.ip4})]}),e.ip6&&l.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"6px"},children:[l.jsx("span",{style:{color:"var(--text-secondary)"},children:"IPv6:"}),l.jsx("code",{style:{background:"var(--bg-input)",padding:"2px 6px",borderRadius:"4px",color:"var(--text-accent)",fontSize:"11px",wordBreak:"break-all"},children:e.ip6})]})]})]}),l.jsxs("div",{style:{borderTop:"1px solid rgba(255,255,255,0.05)",paddingTop:"12px",display:"flex",justifyContent:"space-between",alignItems:"center"},children:[l.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"2px"},children:[l.jsx("span",{style:{fontSize:"12px",fontWeight:600,color:"var(--text-secondary)"},children:"Chứng chỉ HTTPS (TLS)"}),l.jsx("span",{style:{fontSize:"11px",color:"var(--text-muted)"},children:e.hasCert?`✓ Đã cấp TLS cho domain: ${e.certDomain}`:"Chưa cấp SSL/TLS cho tên miền Tailscale của thiết bị này."})]}),l.jsx("button",{type:"button",className:"btn btn-secondary",style:{padding:"6px 12px",fontSize:"12px"},onClick:x,disabled:s,children:s?"Đang xử lý...":e.hasCert?"Cập nhật Cert":"Cấp SSL Cert"})]})]}),e.backendState!=="Running"&&e.backendState!=="NotInstalled"&&l.jsxs("form",{onSubmit:f,style:{display:"flex",flexDirection:"column",gap:"12px",background:"rgba(0,0,0,0.1)",padding:"16px",borderRadius:"8px"},children:[l.jsx("h4",{style:{fontSize:"13px",fontWeight:600,borderBottom:"1px solid var(--border-color)",paddingBottom:"6px"},children:"Cấu hình kết nối VPN nâng cao"}),l.jsxs("div",{className:"form-group",style:{marginBottom:0},children:[l.jsx("label",{className:"form-label",style:{fontSize:"12px"},children:"Auth Key (Đăng nhập tự động)"}),l.jsxs("div",{style:{position:"relative"},children:[l.jsx("input",{type:p?"text":"password",className:"form-input",placeholder:"tskey-auth-...",value:y,onChange:v=>g(v.target.value),style:{paddingRight:"40px",fontSize:"13px"}}),l.jsx("button",{type:"button",onClick:()=>d(!p),style:{position:"absolute",right:"10px",top:"50%",transform:"translateY(-50%)",background:"none",border:"none",color:"var(--text-secondary)",cursor:"pointer"},children:p?l.jsx(Mn,{size:14}):l.jsx(Dn,{size:14})})]})]}),l.jsxs("div",{className:"form-group",style:{marginBottom:0},children:[l.jsx("label",{className:"form-label",style:{fontSize:"12px"},children:"Exit Node (IP hoặc tên thiết bị định tuyến)"}),l.jsx("input",{type:"text",className:"form-input",placeholder:"Ví dụ: 100.123.45.67",value:m,onChange:v=>N(v.target.value),style:{fontSize:"13px"}})]}),l.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"8px",marginTop:"4px"},children:[l.jsx("input",{type:"checkbox",id:"acceptDns",checked:k,onChange:v=>C(v.target.checked),style:{cursor:"pointer",width:"14px",height:"14px"}}),l.jsx("label",{htmlFor:"acceptDns",style:{fontSize:"12px",cursor:"pointer",userSelect:"none"},children:"Chấp nhận DNS cấu hình từ mạng Tailnet"})]}),l.jsx("button",{type:"submit",className:"btn btn-primary",style:{alignSelf:"flex-start",padding:"6px 16px",fontSize:"13px"},disabled:i,children:i?"Đang kết nối...":"Kết nối với cấu hình"})]})]}):null]})},Pf=({isOpen:e,onClose:t})=>{const[n,r]=j.useState("cli"),[i,s]=j.useState(null);if(!e)return null;const o=(u,x)=>{navigator.clipboard.writeText(u),s(x),setTimeout(()=>s(null),2e3)},a={cliLogin:".\\cloudflared.exe tunnel login",cliCreate:".\\cloudflared.exe tunnel create my-tunnel",cliRoutePm:".\\cloudflared.exe tunnel route dns my-tunnel vault.domain.com",cliRoute9r:".\\cloudflared.exe tunnel route dns my-tunnel router.domain.com",cliInstall:".\\cloudflared.exe --config C:\\cloudflared\\config.yml service install",quickPm:"npx untun@latest tunnel 18823",quick9r:"npx untun@latest tunnel 20128"};return l.jsx("div",{style:{position:"fixed",top:0,left:0,right:0,bottom:0,background:"rgba(0, 0, 0, 0.75)",backdropFilter:"blur(8px)",display:"flex",alignItems:"center",justifyContent:"center",zIndex:1e3,padding:"20px",animation:"fadeIn 0.2s ease-out"},onClick:t,children:l.jsxs("div",{className:"glass-panel",style:{width:"100%",maxWidth:"800px",maxHeight:"90vh",background:"rgba(20, 20, 25, 0.95)",border:"1px solid rgba(242, 139, 42, 0.2)",boxShadow:"0 20px 40px rgba(0, 0, 0, 0.5), 0 0 30px rgba(242, 139, 42, 0.05)",borderRadius:"16px",display:"flex",flexDirection:"column",overflow:"hidden",animation:"scaleUp 0.3s cubic-bezier(0.34, 1.56, 0.64, 1)"},onClick:u=>u.stopPropagation(),children:[l.jsxs("div",{style:{padding:"20px 24px",borderBottom:"1px solid rgba(255, 255, 255, 0.05)",display:"flex",justifyContent:"space-between",alignItems:"center",background:"linear-gradient(90deg, rgba(242, 139, 42, 0.05) 0%, transparent 100%)"},children:[l.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"10px"},children:[l.jsx("div",{style:{background:"rgba(242, 139, 42, 0.1)",borderRadius:"8px",padding:"6px",color:"#f28b2a",display:"flex"},children:l.jsx(ef,{size:22})}),l.jsxs("div",{children:[l.jsx("h3",{style:{fontSize:"18px",fontWeight:700,color:"#f28b2a",margin:0},children:"Hướng dẫn cấu hình Cloudflare Tunnel"}),l.jsx("p",{style:{fontSize:"12px",color:"var(--text-muted)",margin:0,marginTop:"2px"},children:"Khởi chạy nhiều ứng dụng song song không lo xung đột kết nối"})]})]}),l.jsx("button",{onClick:t,style:{background:"rgba(255,255,255,0.03)",border:"none",borderRadius:"50%",width:"32px",height:"32px",display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer",color:"var(--text-secondary)",transition:"all 0.2s"},onMouseEnter:u=>u.currentTarget.style.background="rgba(255,255,255,0.08)",onMouseLeave:u=>u.currentTarget.style.background="rgba(255,255,255,0.03)",children:l.jsx(fn,{size:18})})]}),l.jsxs("div",{style:{display:"flex",background:"rgba(0, 0, 0, 0.2)",padding:"6px 24px",gap:"8px",borderBottom:"1px solid rgba(255, 255, 255, 0.03)"},children:[l.jsx("button",{onClick:()=>r("cli"),style:{padding:"8px 16px",fontSize:"13px",fontWeight:600,background:n==="cli"?"rgba(242, 139, 42, 0.1)":"transparent",border:"none",borderRadius:"6px",color:n==="cli"?"#f28b2a":"var(--text-secondary)",cursor:"pointer",transition:"all 0.2s"},children:"💡 Cách 1: Quản lý Cục bộ (Bỏ qua Thẻ tín dụng)"}),l.jsx("button",{onClick:()=>r("dashboard"),style:{padding:"8px 16px",fontSize:"13px",fontWeight:600,background:n==="dashboard"?"rgba(242, 139, 42, 0.1)":"transparent",border:"none",borderRadius:"6px",color:n==="dashboard"?"#f28b2a":"var(--text-secondary)",cursor:"pointer",transition:"all 0.2s"},children:"🌐 Cách 2: Dashboard Web (Yêu cầu Thẻ tín dụng)"}),l.jsx("button",{onClick:()=>r("quick"),style:{padding:"8px 16px",fontSize:"13px",fontWeight:600,background:n==="quick"?"rgba(242, 139, 42, 0.1)":"transparent",border:"none",borderRadius:"6px",color:n==="quick"?"#f28b2a":"var(--text-secondary)",cursor:"pointer",transition:"all 0.2s"},children:"⚡ Cách 3: Chạy thử nhanh (Tạm thời)"})]}),l.jsxs("div",{style:{padding:"24px",overflowY:"auto",flexGrow:1,fontSize:"13px",lineHeight:"1.6",color:"var(--text-secondary)"},children:[n==="cli"&&l.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"16px"},children:[l.jsxs("div",{style:{padding:"12px 16px",background:"rgba(242, 139, 42, 0.05)",border:"1px solid rgba(242, 139, 42, 0.15)",borderRadius:"8px",color:"#f28b2a"},children:[l.jsx("strong",{children:"Ưu điểm lớn nhất:"})," Cách này giúp bạn tạo đường truyền hoàn toàn qua dòng lệnh của máy tính, ",l.jsx("strong",{children:"không yêu cầu liên kết thẻ ngân hàng / PayPal"})," để kích hoạt tài khoản Zero Trust của Cloudflare."]}),l.jsxs("div",{children:[l.jsx("h4",{style:{fontWeight:700,color:"var(--text-primary)",margin:"0 0 8px 0",fontSize:"14px"},children:"Bước 1: Tải về bộ chạy cloudflared.exe"}),l.jsxs("p",{style:{margin:0},children:["Tải tệp tin chạy trực tiếp cho Windows 64-bit tại: "," ",l.jsxs("a",{href:"https://github.com/cloudflare/cloudflared/releases/latest/download/cloudflared-windows-amd64.exe",target:"_blank",rel:"noreferrer",style:{color:"#f28b2a",textDecoration:"none",fontWeight:600,display:"inline-flex",alignItems:"center",gap:"4px"},children:["cloudflared-windows-amd64.exe ",l.jsx(si,{size:12})]})]}),l.jsxs("p",{style:{margin:"4px 0 0 0",fontSize:"12px",color:"var(--text-muted)"},children:["Hãy đổi tên file vừa tải thành ",l.jsx("code",{children:"cloudflared.exe"})," và chuyển vào thư mục dễ quản lý (Ví dụ: ",l.jsx("code",{children:"C:\\cloudflared\\cloudflared.exe"}),")."]})]}),l.jsxs("div",{children:[l.jsx("h4",{style:{fontWeight:700,color:"var(--text-primary)",margin:"0 0 8px 0",fontSize:"14px"},children:"Bước 2: Đăng nhập liên kết tài khoản Cloudflare"}),l.jsx("p",{style:{margin:"0 0 6px 0"},children:"Mở PowerShell với quyền Admin, di chuyển vào thư mục lưu file và thực thi lệnh đăng nhập:"}),c(a.cliLogin,"cliLogin"),l.jsxs("p",{style:{margin:"6px 0 0 0",fontSize:"12px",color:"var(--text-muted)"},children:["Trình duyệt sẽ tự động mở lên. Bạn đăng nhập tài khoản Cloudflare thường và nhấp ",l.jsx("strong",{children:"Authorize"})," cho tên miền của bạn (ví dụ: ",l.jsx("code",{children:"domaincuaban.com"}),")."]})]}),l.jsxs("div",{children:[l.jsx("h4",{style:{fontWeight:700,color:"var(--text-primary)",margin:"0 0 8px 0",fontSize:"14px"},children:"Bước 3: Tạo một Tunnel mới"}),l.jsx("p",{style:{margin:"0 0 6px 0"},children:"Tạo đường truyền nội bộ riêng bằng lệnh:"}),c(a.cliCreate,"cliCreate"),l.jsxs("p",{style:{margin:"6px 0 0 0",fontSize:"12px",color:"var(--text-muted)"},children:["Hệ thống sẽ sinh ra một mã Tunnel ID (dạng chuỗi UUID ",l.jsx("code",{children:"xxxx-xxxx-..."}),"). Ghi nhớ mã này để điền vào file cấu hình."]})]}),l.jsxs("div",{children:[l.jsx("h4",{style:{fontWeight:700,color:"var(--text-primary)",margin:"0 0 8px 0",fontSize:"14px"},children:"Bước 4: Tạo tệp cấu hình config.yml định tuyến cổng"}),l.jsxs("p",{style:{margin:"0 0 6px 0"},children:["Tạo một file văn bản tên là ",l.jsx("code",{children:"config.yml"})," đặt cùng thư mục với file ",l.jsx("code",{children:"cloudflared.exe"})," (Ví dụ: ",l.jsx("code",{children:"C:\\cloudflared\\config.yml"}),") với cấu hình chuyển hướng cho cả 2 ứng dụng:"]}),l.jsx("pre",{style:{background:"rgba(0, 0, 0, 0.4)",padding:"12px 16px",borderRadius:"8px",border:"1px solid rgba(255,255,255,0.05)",fontSize:"12px",color:"#e2e8f0",overflowX:"auto",margin:0},children:`tunnel: <MÃ_ID_TUNNEL_CỦA_BẠN>
273
+ credentials-file: C:\\Users\\<TÊN_USER_MÁY_BẠN>\\.cloudflared\\<MÃ_ID_TUNNEL_CỦA_BẠN>.json
274
+
275
+ ingress:
276
+ - hostname: vault.domaincuaban.com
277
+ service: http://localhost:18823
278
+ - hostname: router.domaincuaban.com
279
+ service: http://localhost:20128
280
+ - service: http_status:404`})]}),l.jsxs("div",{children:[l.jsx("h4",{style:{fontWeight:700,color:"var(--text-primary)",margin:"0 0 8px 0",fontSize:"14px"},children:"Bước 5: Đăng ký bản ghi DNS trên Cloudflare"}),l.jsx("p",{style:{margin:"0 0 6px 0"},children:"Khai báo với Cloudflare để tự động trỏ các tên miền phụ về máy tính của bạn:"}),l.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"8px"},children:[c(a.cliRoutePm,"cliRoutePm"),c(a.cliRoute9r,"cliRoute9r")]})]}),l.jsxs("div",{children:[l.jsx("h4",{style:{fontWeight:700,color:"var(--text-primary)",margin:"0 0 8px 0",fontSize:"14px"},children:"Bước 6: Cài đặt dịch vụ chạy ngầm vĩnh viễn"}),l.jsx("p",{style:{margin:"0 0 6px 0"},children:"Để ứng dụng tự động chạy ngầm mỗi khi bật máy tính mà không cần mở PowerShell:"}),c(a.cliInstall,"cliInstall")]})]}),n==="dashboard"&&l.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"16px"},children:[l.jsxs("div",{style:{padding:"12px 16px",background:"rgba(255, 75, 43, 0.05)",border:"1px solid rgba(255, 75, 43, 0.15)",borderRadius:"8px",color:"#ff4b2b"},children:["⚠️ ",l.jsx("strong",{children:"Lưu ý:"})," Cách này yêu cầu tài khoản Cloudflare của bạn phải được kích hoạt gói Zero Trust (yêu cầu điền thẻ tín dụng Visa/Master hoặc liên kết PayPal lúc đăng ký, mặc dù tính năng hoàn toàn miễn phí)."]}),l.jsxs("div",{children:[l.jsx("h4",{style:{fontWeight:700,color:"var(--text-primary)",margin:"0 0 8px 0",fontSize:"14px"},children:"Bước 1: Tạo Tunnel trên trang web Cloudflare"}),l.jsxs("ol",{style:{paddingLeft:"16px",margin:0,display:"flex",flexDirection:"column",gap:"6px"},children:[l.jsxs("li",{children:["Truy cập vào trang quản trị Cloudflare → chọn mục ",l.jsx("strong",{children:"Zero Trust"})," ở cột bên trái."]}),l.jsxs("li",{children:["Chọn menu ",l.jsx("strong",{children:"Networks"})," → ",l.jsx("strong",{children:"Tunnels"})," (hoặc ",l.jsx("em",{children:"Access"})," → ",l.jsx("em",{children:"Tunnels"}),")."]}),l.jsxs("li",{children:["Nhấp nút ",l.jsx("strong",{children:"Add a tunnel"}),", chọn loại ",l.jsx("strong",{children:"Cloudflared"})," → Nhấn ",l.jsx("strong",{children:"Next"}),"."]}),l.jsxs("li",{children:["Đặt tên gợi nhớ cho Tunnel (Ví dụ: ",l.jsx("code",{children:"my-laptop-tunnel"}),") → Nhấn ",l.jsx("strong",{children:"Save tunnel"}),"."]})]})]}),l.jsxs("div",{children:[l.jsx("h4",{style:{fontWeight:700,color:"var(--text-primary)",margin:"0 0 8px 0",fontSize:"14px"},children:"Bước 2: Cài đặt và kích hoạt Connector trên Laptop"}),l.jsxs("ol",{style:{paddingLeft:"16px",margin:0,display:"flex",flexDirection:"column",gap:"6px"},children:[l.jsxs("li",{children:["Chọn hệ điều hành ",l.jsx("strong",{children:"Windows"})," và chọn kiến trúc phù hợp (thường là ",l.jsx("strong",{children:"64-bit"}),")."]}),l.jsx("li",{children:"Tải và chạy file cài đặt MSI của Cloudflare theo lệnh được hiển thị trên web."}),l.jsxs("li",{children:["Mở PowerShell với quyền Admin, dán lệnh đăng ký Service chạy ngầm chứa Token bảo mật do web cung cấp (Lệnh có dạng ",l.jsx("code",{children:"cloudflared.exe service install eyJh..."}),") để kết nối laptop với Cloudflare."]}),l.jsxs("li",{children:["Khi trạng thái hiển thị trên web chuyển sang màu xanh lá ",l.jsx("strong",{children:"Healthy"}),", bạn nhấn ",l.jsx("strong",{children:"Next"}),"."]})]})]}),l.jsxs("div",{children:[l.jsx("h4",{style:{fontWeight:700,color:"var(--text-primary)",margin:"0 0 8px 0",fontSize:"14px"},children:"Bước 3: Cấu hình định tuyến cổng (Quan trọng)"}),l.jsxs("p",{style:{margin:"0 0 8px 0"},children:["Tại mục cấu hình, chuyển sang tab ",l.jsx("strong",{children:"Public Hostname"})," (⚠️ Tuyệt đối không chọn tab ",l.jsx("em",{children:"Private Network"})," vì tab này yêu cầu cài đặt app VPN). Nhấp nút ",l.jsx("strong",{children:"Add a public hostname"})," để cấu hình:"]}),l.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"12px",background:"rgba(255,255,255,0.02)",padding:"16px",borderRadius:"8px"},children:[l.jsxs("div",{children:[l.jsx("strong",{style:{color:"var(--text-primary)"},children:"1. Cho Profile Manager:"}),l.jsxs("ul",{style:{margin:"4px 0 0 0",paddingLeft:"16px",display:"flex",flexDirection:"column",gap:"2px",fontSize:"12px"},children:[l.jsxs("li",{children:["Subdomain: ",l.jsx("code",{children:"vault"})]}),l.jsxs("li",{children:["Domain: Chọn tên miền của bạn (ví dụ: ",l.jsx("code",{children:"domaincuaban.com"}),")"]}),l.jsxs("li",{children:["Service Type: ",l.jsx("strong",{children:"HTTP"})," (⚠️ Không chọn HTTPS)"]}),l.jsxs("li",{children:["URL: ",l.jsx("code",{children:"localhost:18823"})]})]})]}),l.jsxs("div",{style:{borderTop:"1px solid rgba(255,255,255,0.05)",paddingTop:"10px"},children:[l.jsx("strong",{style:{color:"var(--text-primary)"},children:"2. Cho 9router:"}),l.jsxs("ul",{style:{margin:"4px 0 0 0",paddingLeft:"16px",display:"flex",flexDirection:"column",gap:"2px",fontSize:"12px"},children:[l.jsxs("li",{children:["Subdomain: ",l.jsx("code",{children:"router"})]}),l.jsxs("li",{children:["Domain: Chọn tên miền của bạn (ví dụ: ",l.jsx("code",{children:"domaincuaban.com"}),")"]}),l.jsxs("li",{children:["Service Type: ",l.jsx("strong",{children:"HTTP"})]}),l.jsxs("li",{children:["URL: ",l.jsx("code",{children:"localhost:20128"})," (hoặc cổng của 9router)"]})]})]})]})]})]}),n==="quick"&&l.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"16px"},children:[l.jsx("div",{style:{padding:"12px 16px",background:"rgba(255,255,255,0.02)",border:"1px solid rgba(255, 255, 255, 0.05)",borderRadius:"8px"},children:"Nếu bạn chỉ muốn thử nghiệm nhanh kết nối từ xa ra internet công cộng mà không muốn mua tên miền, không cần tài khoản Cloudflare, bạn có thể chạy dịch vụ chia sẻ nhanh tạm thời:"}),l.jsxs("div",{children:[l.jsx("h4",{style:{fontWeight:700,color:"var(--text-primary)",margin:"0 0 8px 0",fontSize:"14px"},children:"1. Chia sẻ Profile Manager (Cổng 18823)"}),l.jsx("p",{style:{margin:"0 0 6px 0"},children:"Chạy lệnh sau tại cửa sổ terminal trên Laptop của bạn:"}),c(a.quickPm,"quickPm")]}),l.jsxs("div",{children:[l.jsx("h4",{style:{fontWeight:700,color:"var(--text-primary)",margin:"0 0 8px 0",fontSize:"14px"},children:"2. Chia sẻ 9router (Cổng 20128)"}),l.jsx("p",{style:{margin:"0 0 6px 0"},children:"Chạy lệnh sau tại cửa sổ terminal khác trên Laptop:"}),c(a.quick9r,"quick9r")]}),l.jsxs("div",{style:{fontSize:"12px",color:"var(--text-muted)",background:"rgba(242, 139, 42, 0.05)",padding:"12px",borderRadius:"8px",borderLeft:"3px solid #f28b2a"},children:["💡 ",l.jsx("strong",{children:"Đặc điểm:"})," Lệnh trên sẽ sinh ra một đường dẫn ngẫu nhiên dạng ",l.jsx("code",{children:"https://xxxxx.trycloudflare.com"}),". Đường dẫn này sẽ tự động đóng lại khi bạn tắt cửa sổ CMD/PowerShell chứa lệnh này."]})]})]}),l.jsx("div",{style:{padding:"16px 24px",borderTop:"1px solid rgba(255, 255, 255, 0.05)",background:"rgba(0, 0, 0, 0.2)",display:"flex",justifyContent:"flex-end",gap:"12px"},children:l.jsx("button",{type:"button",className:"btn btn-secondary",onClick:t,style:{padding:"8px 20px",fontSize:"13px"},children:"Đóng lại"})})]})});function c(u,x){const y=i===x;return l.jsxs("div",{style:{display:"flex",alignItems:"center",background:"var(--bg-input)",border:"1px solid var(--border-color)",borderRadius:"6px",overflow:"hidden",fontSize:"12px",fontFamily:"monospace"},children:[l.jsx("div",{style:{padding:"6px",background:"rgba(255,255,255,0.02)",color:"#f28b2a",display:"flex",alignItems:"center",justifyContent:"center",borderRight:"1px solid var(--border-color)"},children:l.jsx(uf,{size:14})}),l.jsx("div",{style:{flexGrow:1,padding:"8px 12px",color:"#e2e8f0",whiteSpace:"nowrap",overflowX:"auto"},children:u}),l.jsx("button",{type:"button",onClick:()=>o(u,x),style:{background:"none",border:"none",color:y?"var(--text-emerald)":"var(--text-secondary)",cursor:"pointer",padding:"10px 14px",display:"flex",alignItems:"center",justifyContent:"center",transition:"color 0.2s",borderLeft:"1px solid var(--border-color)"},title:y?"Đã copy!":"Copy câu lệnh",children:y?l.jsx(xn,{size:14}):l.jsx(_t,{size:14})})]})}},Ef=({tailscaleStatus:e,funnelStatus:t,isLoadingFunnel:n,isTogglingServe:r,isTogglingFunnel:i,onToggleServe:s,onToggleFunnel:o})=>{const[a,c]=j.useState(!1),u=(e==null?void 0:e.backendState)==="Running",x=(y,g)=>{navigator.clipboard.writeText(y),alert(g)};return l.jsxs("div",{className:"glass-panel animate-fade-in",style:{padding:"24px",display:"flex",flexDirection:"column",gap:"16px"},children:[l.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[l.jsx(si,{size:20,style:{color:"var(--text-accent)"}}),l.jsx("h3",{style:{fontSize:"16px",fontWeight:600},children:"API Endpoints & Public Tunnels"})]}),l.jsx("p",{style:{fontSize:"13px",color:"var(--text-secondary)",marginTop:"-8px"},children:"Expose ứng dụng của bạn ra mạng nội bộ Tailscale hoặc internet công cộng bằng HTTPS Tunnel bảo mật."}),n?l.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"10px"},children:[l.jsx("div",{style:{width:"18px",height:"18px",border:"2px solid var(--text-accent)",borderTopColor:"transparent",borderRadius:"50%",animation:"spin 1s linear infinite"}}),l.jsx("p",{style:{fontSize:"13px",color:"var(--text-secondary)"},children:"Đang tải trạng thái đường truyền..."})]}):t?l.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"16px"},children:[l.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",background:"rgba(0,0,0,0.1)",padding:"12px 16px",borderRadius:"8px",fontSize:"13px"},children:[l.jsxs("div",{style:{display:"flex",gap:"12px",alignItems:"center"},children:[l.jsx("span",{style:{fontSize:"11px",background:"var(--bg-active-tab)",color:"var(--text-accent)",padding:"2px 6px",borderRadius:"4px",fontWeight:600},children:"Local"}),l.jsx("code",{children:"http://localhost:18823"})]}),l.jsx("button",{type:"button",className:"btn btn-secondary",style:{padding:"4px 8px",fontSize:"12px"},onClick:()=>x("http://localhost:18823","Đã copy Local URL!"),children:"Copy"})]}),l.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",background:"rgba(0,0,0,0.1)",padding:"12px 16px",borderRadius:"8px",fontSize:"13px"},children:[l.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"4px",flexGrow:1},children:[l.jsxs("div",{style:{display:"flex",gap:"12px",alignItems:"center"},children:[l.jsx("span",{style:{fontSize:"11px",background:"rgba(56, 239, 125, 0.1)",color:"var(--text-emerald)",padding:"2px 6px",borderRadius:"4px",fontWeight:600},children:"Tailscale"}),u?t.serveActive&&t.serveUrl?l.jsx("a",{href:t.serveUrl,target:"_blank",rel:"noreferrer",style:{color:"var(--text-accent)",textDecoration:"none",fontWeight:500},children:t.serveUrl}):l.jsx("span",{style:{color:"var(--text-muted)"},children:"Chưa kích hoạt HTTPS nội bộ"}):l.jsx("span",{style:{color:"var(--text-muted)"},children:"Yêu cầu kết nối VPN"})]}),l.jsx("span",{style:{fontSize:"11px",color:"var(--text-muted)"},children:"Cho phép truy cập HTTPS từ xa cho các máy trong mạng Tailscale."})]}),l.jsxs("div",{style:{display:"flex",gap:"8px",alignItems:"center"},children:[u&&t.serveActive&&l.jsx("button",{type:"button",className:"btn btn-secondary",style:{padding:"4px 8px",fontSize:"12px"},onClick:()=>x(t.serveUrl||"","Đã copy Tailscale HTTPS URL!"),children:"Copy"}),l.jsx("button",{type:"button",disabled:!u||r,onClick:()=>s(!t.serveActive),style:{width:"42px",height:"22px",borderRadius:"11px",background:u&&t.serveActive?"var(--text-accent)":"var(--text-muted)",position:"relative",border:"none",cursor:u?"pointer":"not-allowed",opacity:u?r?.6:1:.4,transition:"var(--transition-smooth)"},children:l.jsx("div",{style:{width:"16px",height:"16px",borderRadius:"50%",background:"#fff",position:"absolute",top:"3px",left:u&&t.serveActive?"23px":"3px",transition:"var(--transition-smooth)"}})})]})]}),l.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",background:"rgba(0,0,0,0.1)",padding:"12px 16px",borderRadius:"8px",fontSize:"13px"},children:[l.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"4px",flexGrow:1},children:[l.jsxs("div",{style:{display:"flex",gap:"12px",alignItems:"center"},children:[l.jsx("span",{style:{fontSize:"11px",background:"rgba(255, 65, 108, 0.1)",color:"#ff416c",padding:"2px 6px",borderRadius:"4px",fontWeight:600},children:"Tunnel"}),u?t.funnelActive&&t.funnelUrl?l.jsx("a",{href:t.funnelUrl,target:"_blank",rel:"noreferrer",style:{color:"var(--text-accent)",textDecoration:"none",fontWeight:500},children:t.funnelUrl}):l.jsx("span",{style:{color:"var(--text-muted)"},children:"Chưa kích hoạt Tunnel công cộng"}):l.jsx("span",{style:{color:"var(--text-muted)"},children:"Yêu cầu kết nối VPN"})]}),l.jsx("span",{style:{fontSize:"11px",color:"var(--text-muted)"},children:"Expose ứng dụng ra internet công cộng an toàn (mọi thiết bị đều vào được)."})]}),l.jsxs("div",{style:{display:"flex",gap:"8px",alignItems:"center"},children:[u&&t.funnelActive&&l.jsx("button",{type:"button",className:"btn btn-secondary",style:{padding:"4px 8px",fontSize:"12px"},onClick:()=>x(t.funnelUrl||"","Đã copy Public Tunnel URL!"),children:"Copy"}),l.jsx("button",{type:"button",disabled:!u||i,onClick:()=>o(!t.funnelActive),style:{width:"42px",height:"22px",borderRadius:"11px",background:u&&t.funnelActive?"#ff416c":"var(--text-muted)",position:"relative",border:"none",cursor:u?"pointer":"not-allowed",opacity:u?i?.6:1:.4,transition:"var(--transition-smooth)"},children:l.jsx("div",{style:{width:"16px",height:"16px",borderRadius:"50%",background:"#fff",position:"absolute",top:"3px",left:u&&t.funnelActive?"23px":"3px",transition:"var(--transition-smooth)"}})})]})]}),l.jsxs("div",{style:{marginTop:"12px",padding:"12px 16px",borderRadius:"8px",background:"rgba(242, 139, 42, 0.03)",border:"1px solid rgba(242, 139, 42, 0.15)",display:"flex",alignItems:"center",justifyContent:"space-between",fontSize:"13px"},children:[l.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[l.jsx("span",{style:{fontSize:"16px"},children:"💡"}),l.jsx("span",{style:{color:"var(--text-secondary)"},children:"Bạn muốn dùng tên miền riêng (Cloudflare) thay thế Tailscale?"})]}),l.jsx("button",{type:"button",className:"btn",onClick:()=>c(!0),style:{background:"rgba(242, 139, 42, 0.1)",border:"1px solid rgba(242, 139, 42, 0.2)",color:"#f28b2a",padding:"6px 12px",fontSize:"12px",fontWeight:600,cursor:"pointer",transition:"all 0.2s"},onMouseEnter:y=>{y.currentTarget.style.background="rgba(242, 139, 42, 0.2)"},onMouseLeave:y=>{y.currentTarget.style.background="rgba(242, 139, 42, 0.1)"},children:"Xem hướng dẫn cấu hình"})]}),l.jsx(Pf,{isOpen:a,onClose:()=>c(!1)})]}):null]})},Nf=({apiKeys:e,isLoadingKeys:t,isCreatingKey:n,generatedKey:r,setGeneratedKey:i,onToggleKey:s,onDeleteKey:o,onCreateKey:a})=>{const[c,u]=j.useState(""),x=g=>{g.preventDefault(),c.trim()&&(a(c.trim()),u(""))},y=g=>{navigator.clipboard.writeText(g),alert("Đã copy API Key!")};return l.jsxs("div",{className:"glass-panel animate-fade-in",style:{padding:"24px",display:"flex",flexDirection:"column",gap:"16px"},children:[l.jsx("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:l.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[l.jsx(id,{size:20,style:{color:"var(--text-accent)"}}),l.jsx("h3",{style:{fontSize:"16px",fontWeight:600},children:"Quản lý API Keys"})]})}),l.jsx("p",{style:{fontSize:"13px",color:"var(--text-secondary)",marginTop:"-8px"},children:"Tạo mã khóa API (`pmkey_...`) để xác thực các ứng dụng bên thứ ba (như Chrome Extension) gọi đến API của Profile Manager."}),l.jsxs("form",{onSubmit:x,style:{display:"flex",gap:"10px",alignItems:"flex-end",background:"rgba(0,0,0,0.1)",padding:"16px",borderRadius:"8px"},children:[l.jsxs("div",{className:"form-group",style:{marginBottom:0,flexGrow:1},children:[l.jsx("label",{className:"form-label",style:{fontSize:"12px"},children:"Tên khóa gợi nhớ (Ví dụ: Extension Laptop, Script Python...)"}),l.jsx("input",{type:"text",className:"form-input",required:!0,placeholder:"Nhập tên thiết bị/ứng dụng sẽ dùng key...",value:c,onChange:g=>u(g.target.value),style:{fontSize:"13px"}})]}),l.jsx("button",{type:"submit",className:"btn btn-primary",style:{padding:"10px 20px",fontSize:"13px"},disabled:n,children:n?"Đang tạo...":"+ Tạo Key"})]}),r&&l.jsxs("div",{style:{padding:"16px",borderRadius:"8px",background:"rgba(56, 239, 125, 0.08)",border:"1px solid rgba(56, 239, 125, 0.2)",fontSize:"13px",display:"flex",flexDirection:"column",gap:"8px"},children:[l.jsx("div",{style:{fontWeight:600,color:"var(--text-emerald)"},children:"✓ Đã tạo API Key thành công!"}),l.jsx("p",{style:{fontSize:"12px",color:"var(--text-secondary)"},children:"Mã khóa này chỉ hiển thị **DUY NHẤT MỘT LẦN**. Hãy lưu lại một cách an toàn:"}),l.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"10px",marginTop:"4px"},children:[l.jsx("code",{style:{fontSize:"14px",background:"var(--bg-input)",padding:"6px 12px",borderRadius:"4px",color:"var(--text-emerald)",fontWeight:"bold",flexGrow:1,letterSpacing:"0.5px"},children:r}),l.jsx("button",{type:"button",className:"btn btn-emerald",style:{padding:"6px 12px",fontSize:"12px"},onClick:()=>y(r),children:"Copy Key"}),l.jsx("button",{type:"button",className:"btn btn-secondary",style:{padding:"6px 12px",fontSize:"12px"},onClick:()=>i(null),children:"Tôi đã lưu"})]})]}),t?l.jsx("p",{style:{fontSize:"13px",color:"var(--text-secondary)"},children:"Đang tải danh sách keys..."}):e.length===0?l.jsx("div",{style:{padding:"20px",textAlign:"center",border:"1px dashed var(--border-color)",borderRadius:"8px",color:"var(--text-muted)",fontSize:"13px"},children:"Chưa có API Key nào được tạo."}):l.jsx("div",{style:{display:"flex",flexDirection:"column",gap:"10px"},children:e.map(g=>l.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"12px 16px",background:"rgba(0,0,0,0.1)",borderRadius:"8px",fontSize:"13px"},children:[l.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"4px"},children:[l.jsx("div",{style:{fontWeight:600},children:g.name}),l.jsxs("div",{style:{fontSize:"11px",color:"var(--text-muted)"},children:["Prefix: ",l.jsxs("code",{children:[g.keyPrefix,"••••••••"]})," • Ngày tạo: ",new Date(g.createdAt).toLocaleDateString("vi-VN")]})]}),l.jsxs("div",{style:{display:"flex",gap:"12px",alignItems:"center"},children:[l.jsx("button",{type:"button",onClick:()=>s(g.id,g.enabled),style:{width:"38px",height:"20px",borderRadius:"10px",background:g.enabled?"var(--text-accent)":"var(--text-muted)",position:"relative",border:"none",cursor:"pointer",transition:"var(--transition-smooth)"},children:l.jsx("div",{style:{width:"14px",height:"14px",borderRadius:"50%",background:"#fff",position:"absolute",top:"3px",left:g.enabled?"21px":"3px",transition:"var(--transition-smooth)"}})}),l.jsx("button",{type:"button",className:"btn btn-danger",style:{padding:"6px 12px",fontSize:"12px"},onClick:()=>o(g.id),children:"Xóa"})]})]},g.id))})]})},If=({platforms:e,onTogglePlatform:t,onDeletePlatform:n})=>l.jsxs("div",{className:"glass-panel animate-fade-in",style:{padding:"30px",display:"flex",flexDirection:"column",gap:"20px",width:"100%"},children:[l.jsx("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:l.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[l.jsx(rf,{size:20,style:{color:"var(--text-accent)"}}),l.jsx("h3",{style:{fontSize:"18px",fontWeight:600},children:"Quản lý Nền tảng (Platforms)"})]})}),l.jsx("p",{style:{fontSize:"13px",color:"var(--text-secondary)",marginTop:"-8px"},children:"Kích hoạt các nền tảng mong muốn xuất hiện trên thanh bên."}),l.jsx("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(220px, 1fr))",gap:"16px"},children:e.map(r=>l.jsxs("div",{className:"glass-panel",style:{padding:"16px",display:"flex",flexDirection:"column",justifyContent:"space-between",gap:"12px",background:"var(--bg-card)",border:"1px solid var(--border-color)",borderRadius:"12px",transition:"var(--transition-smooth)"},children:[l.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between"},children:[l.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[l.jsx(ai,{name:r.icon,size:20}),l.jsx("span",{style:{fontWeight:600,fontSize:"14px"},children:r.name})]}),r.is_custom&&l.jsx("button",{type:"button",style:{background:"none",border:"none",color:"#ff4b2b",cursor:"pointer",padding:"2px"},onClick:()=>n(r.id),title:"Xóa nền tảng",children:l.jsx(un,{size:14})})]}),l.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",borderTop:"1px solid var(--border-color)",paddingTop:"10px"},children:[l.jsx("span",{style:{fontSize:"11px",color:"var(--text-secondary)"},children:r.is_custom?"Tùy chỉnh":"Mặc định"}),l.jsx("button",{type:"button",onClick:()=>t(r.id,r.is_active),style:{width:"38px",height:"20px",borderRadius:"10px",background:r.is_active?"var(--text-accent)":"var(--text-muted)",position:"relative",border:"none",cursor:"pointer",transition:"var(--transition-smooth)"},children:l.jsx("div",{style:{width:"14px",height:"14px",borderRadius:"50%",background:"#fff",position:"absolute",top:"3px",left:r.is_active?"21px":"3px",transition:"var(--transition-smooth)"}})})]})]},r.id))})]}),_f=()=>{const{fetchWithAuth:e}=St(),[t,n]=j.useState(null),[r,i]=j.useState(!1),[s,o]=j.useState(null),[a,c]=j.useState(!1),[u,x]=j.useState(!1),[y,g]=j.useState(null),[k,C]=j.useState(!1),[m,N]=j.useState(!1),[p,d]=j.useState(!1),f=async()=>{i(!0),o(null);try{const U=await e("/api/tailscale/status");if(U.ok){const P=await U.json();n(P)}else{const P=await U.json();o(P.error||"Không thể lấy trạng thái Tailscale")}}catch(U){console.error("Failed to fetch Tailscale status:",U),o("Lỗi kết nối máy chủ")}finally{i(!1)}},w=async()=>{o(null);try{const U=await e("/api/tailscale/install",{method:"POST"});if(U.ok)f();else{const P=await U.json();o(P.error||"Yêu cầu cài đặt tự động thất bại")}}catch(U){console.error("Failed to trigger install:",U),o("Lỗi kết nối máy chủ")}},v=async()=>{x(!0),o(null);try{const U=await e("/api/tailscale/provision-cert",{method:"POST"}),P=await U.json();U.ok&&P.success?(alert(P.message),f()):o(P.error||P.message||"Lỗi cấp chứng chỉ")}catch(U){console.error("Failed to provision cert:",U),o("Lỗi kết nối máy chủ")}finally{x(!1)}},S=async(U,P=!0,Y)=>{o(null),c(!0);try{const re=await e("/api/tailscale/connect",{method:"POST",body:JSON.stringify({authKey:U,acceptDns:P,exitNode:Y})}),A=await re.json();re.ok?f():o(A.error||"Kết nối Tailscale thất bại")}catch(re){console.error("Failed to connect Tailscale:",re),o("Lỗi kết nối máy chủ")}finally{c(!1)}},z=async()=>{if(confirm("Bạn có chắc chắn muốn ngắt kết nối Tailscale không?")){o(null),i(!0);try{const U=await e("/api/tailscale/disconnect",{method:"POST"});if(U.ok)f();else{const P=await U.json();o(P.error||"Ngắt kết nối thất bại")}}catch(U){console.error("Failed to disconnect Tailscale:",U),o("Lỗi kết nối máy chủ")}finally{i(!1)}}},T=async()=>{if(confirm("Bạn có chắc chắn muốn đăng xuất tài khoản Tailscale khỏi thiết bị này không?")){o(null),i(!0);try{const U=await e("/api/tailscale/logout",{method:"POST"});if(U.ok)f();else{const P=await U.json();o(P.error||"Đăng xuất thất bại")}}catch(U){console.error("Failed to logout Tailscale:",U),o("Lỗi kết nối máy chủ")}finally{i(!1)}}},D=async()=>{C(!0);try{const U=await e("/api/tailscale/funnel-status");if(U.ok){const P=await U.json();g(P)}}catch(U){console.error("Failed to fetch funnel status:",U)}finally{C(!1)}},L=async U=>{N(!0),o(null);try{const P=await e("/api/tailscale/funnel/toggle",{method:"POST",body:JSON.stringify({active:U})});if(P.ok)D();else{const Y=await P.json();o(Y.error||"Failed to toggle funnel")}}catch(P){console.error("Failed to toggle funnel:",P),o("Lỗi kết nối máy chủ")}finally{N(!1)}},J=async U=>{d(!0),o(null);try{const P=await e("/api/tailscale/serve/toggle",{method:"POST",body:JSON.stringify({active:U})});if(P.ok)D();else{const Y=await P.json();o(Y.error||"Failed to toggle serve")}}catch(P){console.error("Failed to toggle serve:",P),o("Lỗi kết nối máy chủ")}finally{d(!1)}};return j.useEffect(()=>{let U;return(t==null?void 0:t.backendState)==="Installing"&&(U=setInterval(()=>{f()},1500)),()=>clearInterval(U)},[t==null?void 0:t.backendState]),j.useEffect(()=>{f(),D()},[]),{tailscaleStatus:t,isLoadingTailscale:r,tailscaleError:s,setTailscaleError:o,isSubmittingTailscale:a,isProvisioningCert:u,funnelStatus:y,isLoadingFunnel:k,isTogglingFunnel:m,isTogglingServe:p,fetchTailscaleStatus:f,handleInstallTailscale:w,handleProvisionCert:v,handleTailscaleConnect:S,handleTailscaleDisconnect:z,handleTailscaleLogout:T,fetchFunnelStatus:D,handleToggleFunnel:L,handleToggleServe:J}},Lf=()=>{const{fetchWithAuth:e}=St(),[t,n]=j.useState([]),[r,i]=j.useState(!1),[s,o]=j.useState(!1),[a,c]=j.useState(null),[u,x]=j.useState(null),y=async()=>{i(!0);try{const m=await e("/api/auth/api-keys");if(m.ok){const N=await m.json();n(N)}}catch(m){console.error("Failed to fetch API keys:",m)}finally{i(!1)}},g=async m=>{o(!0),x(null);try{const N=await e("/api/auth/api-keys",{method:"POST",body:JSON.stringify({name:m})}),p=await N.json();N.ok&&p.success?(c(p.key),y()):x(p.error||"Failed to create API key")}catch(N){console.error("Failed to create API key:",N),x("Lỗi kết nối máy chủ")}finally{o(!1)}},k=async(m,N)=>{try{(await e(`/api/auth/api-keys/${m}/toggle`,{method:"POST",body:JSON.stringify({enabled:!N})})).ok&&y()}catch(p){console.error("Failed to toggle API key:",p)}},C=async m=>{if(confirm("Bạn có chắc chắn muốn xóa API Key này không? Kết nối từ Chrome Extension của thiết bị tương ứng sẽ bị ngắt hoàn toàn."))try{(await e(`/api/auth/api-keys/${m}`,{method:"DELETE"})).ok&&y()}catch(N){console.error("Failed to delete API key:",N)}};return j.useEffect(()=>{y()},[]),{apiKeys:t,isLoadingKeys:r,isCreatingKey:s,generatedKey:a,setGeneratedKey:c,apiKeyError:u,setApiKeyError:x,fetchApiKeys:y,handleCreateApiKey:g,handleToggleApiKey:k,handleDeleteApiKey:C}},Mf=()=>{const{fetchWithAuth:e,updateSessionToken:t}=St(),[n,r]=j.useState(""),[i,s]=j.useState(""),[o,a]=j.useState(""),[c,u]=j.useState(""),[x,y]=j.useState(null),[g,k]=j.useState(null),[C,m]=j.useState(!1),[N,p]=j.useState(null),[d,f]=j.useState(!1),[w,v]=j.useState(null),S=async()=>{f(!0),v(null);try{const T=await e("/api/auth/vault-info"),D=T.headers.get("content-type");if(!D||!D.includes("application/json")){v("API không tồn tại hoặc Server chưa được khởi động lại");return}if(T.ok){const L=await T.json();p(L)}else{const L=await T.json();v(L.error||"Không thể tải thông tin Vault")}}catch(T){console.error("Failed to fetch vault info:",T),v("Lỗi kết nối máy chủ")}finally{f(!1)}},z=async T=>{if(T.preventDefault(),y(null),k(null),i.length<8){y("Mật khẩu mới phải từ 8 ký tự trở lên");return}if(i!==o){y("Mật khẩu xác nhận không khớp");return}m(!0);try{const D=await e("/api/auth/change-password",{method:"POST",body:JSON.stringify({currentPassword:n,newPassword:i,hint:c||void 0})}),L=D.headers.get("content-type");if(!L||!L.includes("application/json")){y("API không tồn tại hoặc Server chưa được khởi động lại");return}const J=await D.json();D.ok&&J.success?(k("Đổi mật khẩu Master thành công!"),t(J.token),r(""),s(""),a(""),u("")):y(J.error||"Có lỗi xảy ra khi đổi mật khẩu")}catch(D){console.error("Failed to change password:",D),y("Lỗi kết nối máy chủ")}finally{m(!1)}};return j.useEffect(()=>{S()},[]),{currentPassword:n,setCurrentPassword:r,newPassword:i,setNewPassword:s,confirmNewPassword:o,setConfirmNewPassword:a,newHint:c,setNewHint:u,passwordError:x,passwordSuccess:g,isChangingPassword:C,vaultInfo:N,isLoadingVaultInfo:d,vaultInfoError:w,fetchVaultInfo:S,handleChangePassword:z}},Df=({platforms:e,onTogglePlatform:t,onDeletePlatform:n})=>{const{tailscaleStatus:r,isLoadingTailscale:i,tailscaleError:s,setTailscaleError:o,isSubmittingTailscale:a,isProvisioningCert:c,funnelStatus:u,isLoadingFunnel:x,isTogglingFunnel:y,isTogglingServe:g,handleInstallTailscale:k,handleProvisionCert:C,handleTailscaleConnect:m,handleTailscaleDisconnect:N,handleTailscaleLogout:p,handleToggleFunnel:d,handleToggleServe:f}=_f(),{apiKeys:w,isLoadingKeys:v,isCreatingKey:S,generatedKey:z,setGeneratedKey:T,handleCreateApiKey:D,handleToggleApiKey:L,handleDeleteApiKey:J}=Lf(),{currentPassword:U,setCurrentPassword:P,newPassword:Y,setNewPassword:re,confirmNewPassword:A,setConfirmNewPassword:W,newHint:b,setNewHint:M,passwordError:F,passwordSuccess:H,isChangingPassword:K,vaultInfo:h,isLoadingVaultInfo:E,vaultInfoError:V,handleChangePassword:$}=Mf();return l.jsxs("main",{style:{display:"flex",flexDirection:"column",gap:"24px"},className:"animate-fade-in",children:[l.jsx("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",borderBottom:"1px solid var(--border-color)",paddingBottom:"12px"},children:l.jsx("h2",{style:{fontSize:"18px",fontWeight:600},children:"Cài đặt hệ thống"})}),l.jsxs("div",{style:{display:"grid",gridTemplateColumns:"repeat(2, 1fr)",gap:"24px",width:"100%"},children:[l.jsx(bf,{currentPassword:U,setCurrentPassword:P,newPassword:Y,setNewPassword:re,confirmNewPassword:A,setConfirmNewPassword:W,newHint:b,setNewHint:M,passwordError:F,passwordSuccess:H,isChangingPassword:K,onSubmit:$}),l.jsx(zf,{vaultInfo:h,isLoadingVaultInfo:E,vaultInfoError:V}),l.jsx(Tf,{tailscaleStatus:r,isLoadingTailscale:i,tailscaleError:s,setTailscaleError:o,isSubmittingTailscale:a,isProvisioningCert:c,onInstall:k,onConnect:m,onDisconnect:N,onLogout:p,onProvisionCert:C}),l.jsx(Ef,{tailscaleStatus:r,funnelStatus:u,isLoadingFunnel:x,isTogglingServe:g,isTogglingFunnel:y,onToggleServe:f,onToggleFunnel:d}),l.jsx(Nf,{apiKeys:w,isLoadingKeys:v,isCreatingKey:S,generatedKey:z,setGeneratedKey:T,onToggleKey:L,onDeleteKey:J,onCreateKey:D})]}),l.jsx(If,{platforms:e,onTogglePlatform:t,onDeletePlatform:n})]})};function Rf(e){if(!e||e.length!==2)return"";const t=e.toUpperCase().split("").map(n=>127397+n.charCodeAt(0));return String.fromCodePoint(...t)}const Ff=()=>{const{fetchWithAuth:e}=St(),[t,n]=j.useState(""),[r,i]=j.useState(5e3),[s,o]=j.useState(10),[a,c]=j.useState([]),[u,x]=j.useState(!1),[y,g]=j.useState({current:0,total:0}),k=j.useRef(!1),[C,m]=j.useState(""),[N,p]=j.useState("all"),d=async()=>{if(!t.trim())return;const P=t.split(`
281
+ `).map(A=>A.trim()).filter(A=>A.length>0);if(P.length===0)return;x(!0),k.current=!1,g({current:0,total:P.length}),c([]);const Y=s,re=[];for(let A=0;A<P.length&&!k.current;A+=Y){const W=P.slice(A,A+Y);try{const b=await e("/api/proxy/check",{method:"POST",body:JSON.stringify({proxies:W,timeout:r,concurrency:Y})});if(b.ok){const M=await b.json();M.success&&Array.isArray(M.results)&&(re.push(...M.results),c([...re]))}else{const M=W.map(F=>({proxy:F,host:"",port:0,status:"dead",error:`API Request Failed (HTTP ${b.status})`}));re.push(...M),c([...re])}}catch(b){const M=W.map(F=>({proxy:F,host:"",port:0,status:"dead",error:b.message||"Lỗi mạng API"}));re.push(...M),c([...re])}g(b=>({...b,current:Math.min(b.current+W.length,b.total)}))}x(!1)},f=()=>{k.current=!0,x(!1)},w=()=>{n(""),c([]),g({current:0,total:0})},v=a.filter(P=>P.status==="active").length,S=a.filter(P=>P.status==="dead").length,z=v>0?Math.round(a.filter(P=>P.status==="active").reduce((P,Y)=>P+(Y.latency||0),0)/v):0,T=a.filter(P=>{const Y=P.proxy.toLowerCase().includes(C.toLowerCase())||P.ip&&P.ip.toLowerCase().includes(C.toLowerCase())||P.country&&P.country.toLowerCase().includes(C.toLowerCase());return N==="live"?Y&&P.status==="active":N==="dead"?Y&&P.status==="dead":Y}),D=()=>{const P=a.filter(Y=>Y.status==="active").map(Y=>Y.proxy).join(`
264
282
  `);P?(navigator.clipboard.writeText(P),alert("Đã copy danh sách proxy hoạt động vào clipboard!")):alert("Không có proxy hoạt động nào để copy.")},L=()=>{const P=a.filter(W=>W.status==="active").map(W=>W.proxy).join(`
265
- `);if(!P){alert("Không có proxy hoạt động nào để tải xuống.");return}const X=new Blob([P],{type:"text/plain;charset=utf-8"}),re=URL.createObjectURL(X),A=document.createElement("a");A.href=re,A.download="live-proxies.txt",A.click(),URL.revokeObjectURL(re)},Z=(r-1e3)/14e3*100,U=(s-1)/49*100;return l.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"20px",width:"100%"},children:[l.jsxs("div",{children:[l.jsx("h2",{style:{fontSize:"20px",fontWeight:600,color:"var(--text-primary)"},children:"Kiểm tra Proxy"}),l.jsx("p",{style:{color:"var(--text-secondary)",fontSize:"14px",marginTop:"4px"},children:"Kiểm tra trạng thái hoạt động, độ trễ và vị trí địa lý của danh sách proxy HTTP/HTTPS."})]}),l.jsxs("div",{style:{display:"grid",gridTemplateColumns:"1.2fr 0.8fr",gap:"20px"},children:[l.jsxs("div",{className:"glass-panel",style:{padding:"20px",display:"flex",flexDirection:"column",gap:"16px"},children:[l.jsxs("div",{className:"form-group",children:[l.jsxs("label",{className:"form-label",style:{display:"flex",justifyContent:"space-between"},children:[l.jsx("span",{children:"Nhập danh sách Proxy (Mỗi dòng một proxy)"}),l.jsx("span",{style:{fontSize:"11px",color:"var(--text-muted)"},children:"Định dạng hỗ trợ: IP:Port hoặc IP:Port:User:Pass"})]}),l.jsx("textarea",{className:"form-input scrollable",placeholder:"Ví dụ:\r45.77.45.12:8080\r182.23.45.12:3128:admin:secret123",style:{height:"140px",fontFamily:"monospace",fontSize:"13px",resize:"vertical"},value:t,onChange:P=>n(P.target.value),disabled:d})]}),l.jsxs("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:"16px"},children:[l.jsxs("div",{className:"form-group",children:[l.jsxs("label",{className:"form-label",children:["Thời gian chờ (Timeout: ",r,"ms)"]}),l.jsx("input",{type:"range",min:"1000",max:"15000",step:"500",value:r,onChange:P=>i(parseInt(P.target.value)),disabled:d,className:"slider-custom slider-timeout",style:{width:"100%",background:`linear-gradient(to right, var(--text-emerald) 0%, var(--text-emerald) ${Z}%, var(--bg-input) ${Z}%, var(--bg-input) 100%)`}})]}),l.jsxs("div",{className:"form-group",children:[l.jsxs("label",{className:"form-label",children:["Số luồng song song (Concurrency: ",s,")"]}),l.jsx("input",{type:"range",min:"1",max:"50",step:"1",value:s,onChange:P=>o(parseInt(P.target.value)),disabled:d,className:"slider-custom slider-concurrency",style:{width:"100%",background:`linear-gradient(to right, var(--text-accent) 0%, var(--text-accent) ${U}%, var(--bg-input) ${U}%, var(--bg-input) 100%)`}})]})]}),l.jsxs("div",{style:{display:"flex",gap:"10px",marginTop:"4px"},children:[d?l.jsxs("button",{className:"btn btn-danger",onClick:f,style:{flexGrow:1,padding:"12px",background:"var(--btn-danger-bg, #ef4444)",color:"#fff"},children:[l.jsx(fd,{size:16}),"Dừng kiểm tra"]}):l.jsxs("button",{className:"btn btn-primary",onClick:u,disabled:!t.trim(),style:{flexGrow:1,padding:"12px"},children:[l.jsx(ad,{size:16}),"Bắt đầu kiểm tra"]}),l.jsx("button",{className:"btn btn-secondary",onClick:j,disabled:d||!t&&a.length===0,style:{padding:"12px"},title:"Xóa sạch",children:l.jsx(un,{size:16})})]})]}),l.jsxs("div",{className:"glass-panel",style:{padding:"20px",display:"flex",flexDirection:"column",gap:"18px",justifyContent:"center"},children:[l.jsx("h3",{style:{fontSize:"15px",fontWeight:600,color:"var(--text-secondary)"},children:"Thống kê"}),l.jsxs("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:"12px"},children:[l.jsxs("div",{style:{background:"var(--btn-secondary-bg)",padding:"12px",borderRadius:"8px",border:"1px solid var(--border-color)",textAlign:"center"},children:[l.jsx("div",{style:{fontSize:"12px",color:"var(--text-muted)"},children:"Tổng số"}),l.jsx("div",{style:{fontSize:"24px",fontWeight:700,marginTop:"4px",color:"var(--text-primary)"},children:y.total})]}),l.jsxs("div",{style:{background:"var(--btn-secondary-bg)",padding:"12px",borderRadius:"8px",border:"1px solid var(--border-color)",textAlign:"center"},children:[l.jsx("div",{style:{fontSize:"12px",color:"var(--text-emerald, #10b981)"},children:"LIVE (Hoạt động)"}),l.jsx("div",{style:{fontSize:"24px",fontWeight:700,marginTop:"4px",color:"var(--text-emerald, #10b981)"},children:v})]}),l.jsxs("div",{style:{background:"var(--btn-secondary-bg)",padding:"12px",borderRadius:"8px",border:"1px solid var(--border-color)",textAlign:"center"},children:[l.jsx("div",{style:{fontSize:"12px",color:"#ef4444"},children:"DEAD (Lỗi)"}),l.jsx("div",{style:{fontSize:"24px",fontWeight:700,marginTop:"4px",color:"#ef4444"},children:w})]}),l.jsxs("div",{style:{background:"var(--btn-secondary-bg)",padding:"12px",borderRadius:"8px",border:"1px solid var(--border-color)",textAlign:"center"},children:[l.jsx("div",{style:{fontSize:"12px",color:"var(--text-accent)"},children:"Độ trễ TB"}),l.jsxs("div",{style:{fontSize:"24px",fontWeight:700,marginTop:"4px",color:"var(--text-accent)"},children:[z," ",l.jsx("span",{style:{fontSize:"12px"},children:"ms"})]})]})]}),l.jsxs("div",{style:{marginTop:"8px"},children:[l.jsxs("div",{style:{display:"flex",justifyContent:"space-between",fontSize:"12px",color:"var(--text-secondary)",marginBottom:"6px"},children:[l.jsx("span",{children:"Tiến trình kiểm tra"}),l.jsxs("span",{children:[y.current," / ",y.total," (",y.total>0?Math.round(y.current/y.total*100):0,"%)"]})]}),l.jsx("div",{style:{width:"100%",height:"8px",background:"var(--bg-input)",borderRadius:"4px",overflow:"hidden",border:"1px solid var(--border-color)"},children:l.jsx("div",{style:{height:"100%",background:"var(--primary-gradient)",width:`${y.total>0?y.current/y.total*100:0}%`,transition:"width 0.3s ease"}})})]})]})]}),a.length>0&&l.jsxs("div",{className:"glass-panel",style:{padding:"20px",display:"flex",flexDirection:"column",gap:"16px"},children:[l.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",gap:"16px",flexWrap:"wrap"},children:[l.jsxs("div",{style:{display:"flex",gap:"8px"},children:[l.jsxs("button",{onClick:()=>p("all"),className:`btn ${N==="all"?"btn-primary":"btn-secondary"}`,style:{padding:"6px 12px",fontSize:"13px"},children:["Tất cả (",a.length,")"]}),l.jsxs("button",{onClick:()=>p("live"),className:`btn ${N==="live"?"btn-primary":"btn-secondary"}`,style:{padding:"6px 12px",fontSize:"13px",border:N==="live"?"none":"1px solid rgba(16, 185, 129, 0.2)"},children:["Hoạt động (",v,")"]}),l.jsxs("button",{onClick:()=>p("dead"),className:`btn ${N==="dead"?"btn-primary":"btn-secondary"}`,style:{padding:"6px 12px",fontSize:"13px",border:N==="dead"?"none":"1px solid rgba(239, 68, 68, 0.2)"},children:["Lỗi (",w,")"]})]}),l.jsxs("div",{style:{position:"relative",minWidth:"220px",flexGrow:1,maxWidth:"350px"},children:[l.jsx(si,{size:14,style:{position:"absolute",left:"12px",top:"50%",transform:"translateY(-50%)",color:"var(--text-muted)"}}),l.jsx("input",{type:"text",placeholder:"Tìm kiếm IP, vị trí...",className:"form-input",style:{paddingLeft:"34px",fontSize:"13px"},value:S,onChange:P=>m(P.target.value)})]}),l.jsxs("div",{style:{display:"flex",gap:"8px"},children:[l.jsxs("button",{className:"btn btn-secondary",onClick:D,disabled:v===0,style:{padding:"8px 12px",fontSize:"13px"},children:[l.jsx(Zt,{size:14}),"Copy Live"]}),l.jsxs("button",{className:"btn btn-secondary",onClick:L,disabled:v===0,style:{padding:"8px 12px",fontSize:"13px"},children:[l.jsx(Bn,{size:14}),"Tải file TXT"]})]})]}),l.jsx("div",{className:"scrollable",style:{overflowX:"auto",maxHeight:"400px"},children:l.jsxs("table",{style:{width:"100%",borderCollapse:"collapse",textAlign:"left",fontSize:"13px"},children:[l.jsx("thead",{children:l.jsxs("tr",{style:{borderBottom:"1px solid var(--border-color)",color:"var(--text-muted)"},children:[l.jsx("th",{style:{padding:"12px 8px",fontWeight:500},children:"Proxy"}),l.jsx("th",{style:{padding:"12px 8px",fontWeight:500,width:"110px"},children:"Trạng thái"}),l.jsx("th",{style:{padding:"12px 8px",fontWeight:500,width:"90px"},children:"Độ trễ"}),l.jsx("th",{style:{padding:"12px 8px",fontWeight:500,width:"130px"},children:"IP nhận"}),l.jsx("th",{style:{padding:"12px 8px",fontWeight:500,width:"150px"},children:"Quốc gia"}),l.jsx("th",{style:{padding:"12px 8px",fontWeight:500},children:"Chi tiết / Lỗi"})]})}),l.jsx("tbody",{children:T.map((P,X)=>l.jsxs("tr",{style:{borderBottom:"1px solid var(--border-color)",background:X%2===0?"var(--btn-secondary-bg)":"transparent"},children:[l.jsx("td",{style:{padding:"10px 8px",fontFamily:"monospace",color:"var(--text-secondary)"},children:P.proxy}),l.jsx("td",{style:{padding:"10px 8px"},children:P.status==="active"?l.jsxs("span",{style:{display:"inline-flex",alignItems:"center",gap:"4px",color:"var(--text-emerald, #10b981)",background:"rgba(16, 185, 129, 0.1)",padding:"3px 8px",borderRadius:"4px",fontSize:"11px",fontWeight:600},children:[l.jsx(rd,{size:10}),"LIVE"]}):l.jsxs("span",{style:{display:"inline-flex",alignItems:"center",gap:"4px",color:"#ef4444",background:"rgba(239, 68, 68, 0.1)",padding:"3px 8px",borderRadius:"4px",fontSize:"11px",fontWeight:600},children:[l.jsx(ld,{size:10}),"DEAD"]})}),l.jsx("td",{style:{padding:"10px 8px"},children:P.status==="active"&&P.latency?l.jsxs("span",{style:{color:P.latency<500?"var(--text-emerald, #10b981)":P.latency<1500?"var(--text-accent)":"#ef4444",fontWeight:600},children:[P.latency," ms"]}):l.jsx("span",{style:{color:"var(--text-muted)"},children:"-"})}),l.jsx("td",{style:{padding:"10px 8px",fontFamily:"monospace"},children:P.ip||"-"}),l.jsx("td",{style:{padding:"10px 8px"},children:P.status==="active"&&P.countryCode?l.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"6px"},children:[l.jsx("span",{style:{fontSize:"15px"},title:P.countryCode,children:Lf(P.countryCode)}),l.jsx("span",{style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",maxWidth:"110px"},children:P.country})]}):l.jsx("span",{style:{color:"var(--text-muted)"},children:"-"})}),l.jsx("td",{style:{padding:"10px 8px",color:P.status==="active"?"var(--text-muted)":"#f87171",fontSize:"12px"},children:P.status==="active"?l.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"4px"},children:[l.jsx(Vl,{size:11}),l.jsx("span",{style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",maxWidth:"200px"},children:P.isp})]}):l.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"4px"},children:[l.jsx(cd,{size:12}),l.jsx("span",{children:P.error})]})})]},X))})]})})]})]})};function Df(e,t){if(t<=7)return Array.from({length:t},(s,o)=>o+1);const n=[];n.push(1),e>3&&n.push("ellipsis");const r=Math.max(2,e-1),i=Math.min(t-1,e+1);for(let s=r;s<=i;s++)n.push(s);return e<t-2&&n.push("ellipsis"),t>1&&n.push(t),n}const Ns=({currentPage:e,totalPages:t,pageSize:n,totalItems:r,startIndex:i,endIndex:s,pageSizeOptions:o,onPageChange:a,onPageSizeChange:c})=>{if(r<=o[0])return null;const d=Df(e,t);return l.jsxs("div",{className:"pagination-footer animate-fade-in",children:[l.jsxs("div",{className:"pagination-info",style:{display:"flex",alignItems:"center",gap:"16px"},children:[l.jsxs("span",{children:["Hiển thị ",l.jsx("strong",{children:i}),"–",l.jsx("strong",{children:s})," / ",l.jsx("strong",{children:r})," mục"]}),l.jsxs("div",{className:"pagination-size-selector",children:[l.jsx("span",{className:"pagination-size-label",children:"Số lượng"}),l.jsx("select",{className:"pagination-select",value:n,onChange:x=>c(Number(x.target.value)),children:o.map(x=>l.jsx("option",{value:x,children:x},x))})]})]}),l.jsxs("div",{className:"pagination-nav",children:[l.jsx("button",{className:"pagination-btn pagination-arrow",onClick:()=>a(e-1),disabled:e<=1,title:"Trang trước",children:l.jsx(J1,{size:16})}),d.map((x,y)=>x==="ellipsis"?l.jsx("span",{className:"pagination-ellipsis",children:"…"},`ellipsis-${y}`):l.jsx("button",{className:`pagination-btn ${e===x?"active":""}`,onClick:()=>a(x),children:x},x)),l.jsx("button",{className:"pagination-btn pagination-arrow",onClick:()=>a(e+1),disabled:e>=t,title:"Trang tiếp",children:l.jsx(nd,{size:16})})]})]})},gd=[50,100,200,500,1e3],Rf="paginationPageSize",Ff=50;function Af(e){try{const t=localStorage.getItem(e);if(t){const n=Number(t);if(gd.includes(n))return n}}catch{}return Ff}function yd({items:e,storageKey:t=Rf}){const[n,r]=C.useState(()=>Af(t)),[i,s]=C.useState(1),o=e.length,a=Math.max(1,Math.ceil(o/n));C.useEffect(()=>{i>a&&s(a)},[a,i]),C.useEffect(()=>{s(1)},[o]);const c=S=>{r(S),s(1);try{localStorage.setItem(t,String(S))}catch{}},d=(i-1)*n,x=Math.min(d+n,o),y=C.useMemo(()=>e.slice(d,x),[e,d,x]),g=()=>{i<a&&s(i+1)},k=()=>{i>1&&s(i-1)};return{paginatedItems:y,currentPage:i,totalPages:a,pageSize:n,totalItems:o,startIndex:o===0?0:d+1,endIndex:x,pageSizeOptions:gd,setCurrentPage:s,setPageSize:c,goToNextPage:g,goToPrevPage:k}}const Ba=({label:e,value:t,options:n,onChange:r,width:i="150px",height:s="32px",hideAll:o=!1})=>{const[a,c]=C.useState(!1);return l.jsxs("div",{style:{position:"relative"},children:[l.jsxs("button",{onClick:()=>c(!a),className:"form-input",style:{display:"flex",alignItems:"center",justifyContent:"space-between",gap:"6px",width:i,padding:"4px 10px",fontSize:"12px",height:s,background:"var(--bg-input)",border:"1px solid var(--border-input)",borderRadius:"8px",color:"var(--text-primary)",cursor:"pointer",textAlign:"left"},children:[l.jsx("span",{style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:t==="all"?`${e} (Tất cả)`:t}),l.jsx(Fr,{size:10,style:{flexShrink:0,opacity:.7,transform:a?"rotate(180deg)":"none",transition:"transform 0.2s ease"}})]}),a&&l.jsxs(l.Fragment,{children:[l.jsx("div",{onClick:()=>c(!1),style:{position:"fixed",top:0,left:0,right:0,bottom:0,zIndex:999}}),l.jsxs("div",{className:"glass-panel scrollable",style:{position:"absolute",top:"calc(100% + 6px)",left:0,zIndex:1e3,padding:"6px",minWidth:i,maxWidth:"220px",maxHeight:"200px",overflowY:"auto",display:"flex",flexDirection:"column",gap:"4px",boxShadow:"var(--glow-accent)",background:"var(--bg-modal)",borderRadius:"8px"},children:[!o&&l.jsxs("button",{onClick:()=>{r("all"),c(!1)},style:{width:"100%",padding:"6px 10px",textAlign:"left",background:t==="all"?"var(--bg-active-tab)":"transparent",border:"none",borderRadius:"6px",color:t==="all"?"var(--text-accent)":"var(--text-primary)",fontSize:"12px",cursor:"pointer",transition:"var(--transition-smooth)"},onMouseEnter:d=>{t!=="all"&&(d.currentTarget.style.background="rgba(255, 255, 255, 0.05)")},onMouseLeave:d=>{t!=="all"&&(d.currentTarget.style.background="transparent")},children:[e," (Tất cả)"]}),n.map(d=>l.jsx("button",{onClick:()=>{r(d),c(!1)},style:{width:"100%",padding:"6px 10px",textAlign:"left",background:t===d?"var(--bg-active-tab)":"transparent",border:"none",borderRadius:"6px",color:t===d?"var(--text-accent)":"var(--text-primary)",fontSize:"12px",cursor:"pointer",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",transition:"var(--transition-smooth)"},onMouseEnter:x=>{t!==d&&(x.currentTarget.style.background="rgba(255, 255, 255, 0.05)")},onMouseLeave:x=>{t!==d&&(x.currentTarget.style.background="transparent")},children:d},d))]})]})]})};function Of(e){if(!e||e.length!==2)return"";const t=e.toUpperCase().split("").map(n=>127397+n.charCodeAt(0));return String.fromCodePoint(...t)}const Wf=()=>{const{fetchWithAuth:e}=St(),[t,n]=C.useState([]),[r,i]=C.useState(!0),[s,o]=C.useState(null),[a,c]=C.useState(!1),[d,x]=C.useState(""),[y,g]=C.useState(!1),[k,S]=C.useState(""),[m,N]=C.useState("all"),[p,u]=C.useState("all"),[f,j]=C.useState("all"),[v,w]=C.useState(new Set),[z,T]=C.useState(new Set),[D,L]=C.useState(!1),[Z,U]=C.useState({current:0,total:0}),P=Ut.useRef(!1),X=async()=>{i(!0),o(null);try{const I=await e("/api/proxy");if(I.ok){const G=await I.json();n(G)}else o("Không thể lấy danh sách proxy từ máy chủ.")}catch(I){o(I.message||"Lỗi mạng khi tải danh sách proxy.")}finally{i(!1)}};C.useEffect(()=>{X()},[]);const re=C.useMemo(()=>{const I=new Set;return t.forEach(G=>{G.country&&I.add(G.country)}),Array.from(I).sort()},[t]),A=C.useMemo(()=>{const I=new Set;return t.forEach(G=>{G.isp&&I.add(G.isp)}),Array.from(I).sort()},[t]),W=C.useMemo(()=>t.filter(I=>{const G=I.proxy.toLowerCase().includes(k.toLowerCase())||I.host.toLowerCase().includes(k.toLowerCase())||I.ip&&I.ip.toLowerCase().includes(k.toLowerCase())||I.country&&I.country.toLowerCase().includes(k.toLowerCase())||I.isp&&I.isp.toLowerCase().includes(k.toLowerCase()),R=m==="all"||m==="live"&&I.status==="active"||m==="dead"&&I.status==="dead",Y=p==="all"||I.country===p,ee=f==="all"||I.isp===f;return G&&R&&Y&&ee}),[t,k,m,p,f]),{paginatedItems:b,currentPage:M,totalPages:F,pageSize:H,totalItems:K,startIndex:h,endIndex:E,pageSizeOptions:V,setCurrentPage:$,setPageSize:Q}=yd({items:W,storageKey:"proxyPageSize"}),le=I=>{if(I.target.checked){const G=W.map(R=>R.id);w(new Set(G))}else w(new Set)},B=I=>{const G=new Set(v);G.has(I)?G.delete(I):G.add(I),w(G)},Se=async()=>{if(d.trim()){g(!0);try{const I=d.split(`
266
- `).map(R=>R.trim()).filter(R=>R.length>0),G=await e("/api/proxy",{method:"POST",body:JSON.stringify({proxies:I})});if(G.ok)x(""),c(!1),await X();else{const R=await G.json();alert(R.error||"Lỗi khi lưu danh sách proxy.")}}catch(I){alert(I.message||"Lỗi kết nối khi gửi dữ liệu.")}finally{g(!1)}}},se=async I=>{if(confirm("Bạn có chắc chắn muốn xóa proxy này?"))try{if((await e(`/api/proxy/${I}`,{method:"DELETE"})).ok){n(Y=>Y.filter(ee=>ee.id!==I));const R=new Set(v);R.delete(I),w(R)}else alert("Không thể xóa proxy.")}catch(G){console.error(G)}},te=async()=>{if(v.size!==0&&confirm(`Bạn có chắc chắn muốn xóa ${v.size} proxy đã chọn?`))try{(await e("/api/proxy/delete-batch",{method:"POST",body:JSON.stringify({ids:Array.from(v)})})).ok?(n(G=>G.filter(R=>!v.has(R.id))),w(new Set)):alert("Không thể xóa các proxy đã chọn.")}catch(I){console.error(I)}},Ar=async(I,G)=>{T(R=>new Set(R).add(I));try{const R=await e("/api/proxy/check",{method:"POST",body:JSON.stringify({proxies:[G],timeout:5e3})});if(R.ok){const Y=await R.json();if(Y.success&&Y.results&&Y.results.length>0){const ee=Y.results[0];n(ge=>ge.map(me=>me.id===I?{...me,status:ee.status,latency:ee.latency,ip:ee.ip,country:ee.country,countryCode:ee.countryCode,city:ee.city,isp:ee.isp,error:ee.error,last_checked:new Date().toISOString(),updated_at:new Date().toISOString()}:me))}}}catch(R){console.error(R)}finally{T(R=>{const Y=new Set(R);return Y.delete(I),Y})}},Or=async()=>{if(v.size===0)return;L(!0),P.current=!1;const I=Array.from(v);U({current:0,total:I.length});const G=I.map(Y=>{const ee=t.find(ge=>ge.id===Y);return{id:Y,proxyStr:(ee==null?void 0:ee.proxy)||""}}).filter(Y=>Y.proxyStr),R=5;for(let Y=0;Y<G.length&&!P.current;Y+=R){const ee=G.slice(Y,Y+R);T(ge=>{const me=new Set(ge);return ee.forEach(Gt=>me.add(Gt.id)),me});try{const ge=await e("/api/proxy/check",{method:"POST",body:JSON.stringify({proxies:ee.map(me=>me.proxyStr),timeout:5e3,concurrency:R})});if(ge.ok){const me=await ge.json();me.success&&Array.isArray(me.results)&&n(Gt=>{let Xt=[...Gt];return me.results.forEach(We=>{const bt=Xt.findIndex(Eo=>Eo.proxy===We.proxy);bt!==-1&&(Xt[bt]={...Xt[bt],status:We.status,latency:We.latency,ip:We.ip,country:We.country,countryCode:We.countryCode,city:We.city,isp:We.isp,error:We.error,last_checked:new Date().toISOString(),updated_at:new Date().toISOString()})}),Xt})}}catch(ge){console.error("Lỗi check bulk:",ge)}finally{T(ge=>{const me=new Set(ge);return ee.forEach(Gt=>me.delete(Gt.id)),me}),U(ge=>({...ge,current:Math.min(ge.current+ee.length,ge.total)}))}}L(!1)},Wr=()=>{P.current=!0,L(!1)},Br=()=>{if(v.size===0)return;const I=t.filter(G=>v.has(G.id)).map(G=>G.proxy).join(`
283
+ `);if(!P){alert("Không có proxy hoạt động nào để tải xuống.");return}const Y=new Blob([P],{type:"text/plain;charset=utf-8"}),re=URL.createObjectURL(Y),A=document.createElement("a");A.href=re,A.download="live-proxies.txt",A.click(),URL.revokeObjectURL(re)},J=(r-1e3)/14e3*100,U=(s-1)/49*100;return l.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"20px",width:"100%"},children:[l.jsxs("div",{children:[l.jsx("h2",{style:{fontSize:"20px",fontWeight:600,color:"var(--text-primary)"},children:"Kiểm tra Proxy"}),l.jsx("p",{style:{color:"var(--text-secondary)",fontSize:"14px",marginTop:"4px"},children:"Kiểm tra trạng thái hoạt động, độ trễ và vị trí địa lý của danh sách proxy HTTP/HTTPS."})]}),l.jsxs("div",{style:{display:"grid",gridTemplateColumns:"1.2fr 0.8fr",gap:"20px"},children:[l.jsxs("div",{className:"glass-panel",style:{padding:"20px",display:"flex",flexDirection:"column",gap:"16px"},children:[l.jsxs("div",{className:"form-group",children:[l.jsxs("label",{className:"form-label",style:{display:"flex",justifyContent:"space-between"},children:[l.jsx("span",{children:"Nhập danh sách Proxy (Mỗi dòng một proxy)"}),l.jsx("span",{style:{fontSize:"11px",color:"var(--text-muted)"},children:"Định dạng hỗ trợ: IP:Port hoặc IP:Port:User:Pass"})]}),l.jsx("textarea",{className:"form-input scrollable",placeholder:"Ví dụ:\r45.77.45.12:8080\r182.23.45.12:3128:admin:secret123",style:{height:"140px",fontFamily:"monospace",fontSize:"13px",resize:"vertical"},value:t,onChange:P=>n(P.target.value),disabled:u})]}),l.jsxs("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:"16px"},children:[l.jsxs("div",{className:"form-group",children:[l.jsxs("label",{className:"form-label",children:["Thời gian chờ (Timeout: ",r,"ms)"]}),l.jsx("input",{type:"range",min:"1000",max:"15000",step:"500",value:r,onChange:P=>i(parseInt(P.target.value)),disabled:u,className:"slider-custom slider-timeout",style:{width:"100%",background:`linear-gradient(to right, var(--text-emerald) 0%, var(--text-emerald) ${J}%, var(--bg-input) ${J}%, var(--bg-input) 100%)`}})]}),l.jsxs("div",{className:"form-group",children:[l.jsxs("label",{className:"form-label",children:["Số luồng song song (Concurrency: ",s,")"]}),l.jsx("input",{type:"range",min:"1",max:"50",step:"1",value:s,onChange:P=>o(parseInt(P.target.value)),disabled:u,className:"slider-custom slider-concurrency",style:{width:"100%",background:`linear-gradient(to right, var(--text-accent) 0%, var(--text-accent) ${U}%, var(--bg-input) ${U}%, var(--bg-input) 100%)`}})]})]}),l.jsxs("div",{style:{display:"flex",gap:"10px",marginTop:"4px"},children:[u?l.jsxs("button",{className:"btn btn-danger",onClick:f,style:{flexGrow:1,padding:"12px",background:"var(--btn-danger-bg, #ef4444)",color:"#fff"},children:[l.jsx(fd,{size:16}),"Dừng kiểm tra"]}):l.jsxs("button",{className:"btn btn-primary",onClick:d,disabled:!t.trim(),style:{flexGrow:1,padding:"12px"},children:[l.jsx(ad,{size:16}),"Bắt đầu kiểm tra"]}),l.jsx("button",{className:"btn btn-secondary",onClick:w,disabled:u||!t&&a.length===0,style:{padding:"12px"},title:"Xóa sạch",children:l.jsx(un,{size:16})})]})]}),l.jsxs("div",{className:"glass-panel",style:{padding:"20px",display:"flex",flexDirection:"column",gap:"18px",justifyContent:"center"},children:[l.jsx("h3",{style:{fontSize:"15px",fontWeight:600,color:"var(--text-secondary)"},children:"Thống kê"}),l.jsxs("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:"12px"},children:[l.jsxs("div",{style:{background:"var(--btn-secondary-bg)",padding:"12px",borderRadius:"8px",border:"1px solid var(--border-color)",textAlign:"center"},children:[l.jsx("div",{style:{fontSize:"12px",color:"var(--text-muted)"},children:"Tổng số"}),l.jsx("div",{style:{fontSize:"24px",fontWeight:700,marginTop:"4px",color:"var(--text-primary)"},children:y.total})]}),l.jsxs("div",{style:{background:"var(--btn-secondary-bg)",padding:"12px",borderRadius:"8px",border:"1px solid var(--border-color)",textAlign:"center"},children:[l.jsx("div",{style:{fontSize:"12px",color:"var(--text-emerald, #10b981)"},children:"LIVE (Hoạt động)"}),l.jsx("div",{style:{fontSize:"24px",fontWeight:700,marginTop:"4px",color:"var(--text-emerald, #10b981)"},children:v})]}),l.jsxs("div",{style:{background:"var(--btn-secondary-bg)",padding:"12px",borderRadius:"8px",border:"1px solid var(--border-color)",textAlign:"center"},children:[l.jsx("div",{style:{fontSize:"12px",color:"#ef4444"},children:"DEAD (Lỗi)"}),l.jsx("div",{style:{fontSize:"24px",fontWeight:700,marginTop:"4px",color:"#ef4444"},children:S})]}),l.jsxs("div",{style:{background:"var(--btn-secondary-bg)",padding:"12px",borderRadius:"8px",border:"1px solid var(--border-color)",textAlign:"center"},children:[l.jsx("div",{style:{fontSize:"12px",color:"var(--text-accent)"},children:"Độ trễ TB"}),l.jsxs("div",{style:{fontSize:"24px",fontWeight:700,marginTop:"4px",color:"var(--text-accent)"},children:[z," ",l.jsx("span",{style:{fontSize:"12px"},children:"ms"})]})]})]}),l.jsxs("div",{style:{marginTop:"8px"},children:[l.jsxs("div",{style:{display:"flex",justifyContent:"space-between",fontSize:"12px",color:"var(--text-secondary)",marginBottom:"6px"},children:[l.jsx("span",{children:"Tiến trình kiểm tra"}),l.jsxs("span",{children:[y.current," / ",y.total," (",y.total>0?Math.round(y.current/y.total*100):0,"%)"]})]}),l.jsx("div",{style:{width:"100%",height:"8px",background:"var(--bg-input)",borderRadius:"4px",overflow:"hidden",border:"1px solid var(--border-color)"},children:l.jsx("div",{style:{height:"100%",background:"var(--primary-gradient)",width:`${y.total>0?y.current/y.total*100:0}%`,transition:"width 0.3s ease"}})})]})]})]}),a.length>0&&l.jsxs("div",{className:"glass-panel",style:{padding:"20px",display:"flex",flexDirection:"column",gap:"16px"},children:[l.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",gap:"16px",flexWrap:"wrap"},children:[l.jsxs("div",{style:{display:"flex",gap:"8px"},children:[l.jsxs("button",{onClick:()=>p("all"),className:`btn ${N==="all"?"btn-primary":"btn-secondary"}`,style:{padding:"6px 12px",fontSize:"13px"},children:["Tất cả (",a.length,")"]}),l.jsxs("button",{onClick:()=>p("live"),className:`btn ${N==="live"?"btn-primary":"btn-secondary"}`,style:{padding:"6px 12px",fontSize:"13px",border:N==="live"?"none":"1px solid rgba(16, 185, 129, 0.2)"},children:["Hoạt động (",v,")"]}),l.jsxs("button",{onClick:()=>p("dead"),className:`btn ${N==="dead"?"btn-primary":"btn-secondary"}`,style:{padding:"6px 12px",fontSize:"13px",border:N==="dead"?"none":"1px solid rgba(239, 68, 68, 0.2)"},children:["Lỗi (",S,")"]})]}),l.jsxs("div",{style:{position:"relative",minWidth:"220px",flexGrow:1,maxWidth:"350px"},children:[l.jsx(oi,{size:14,style:{position:"absolute",left:"12px",top:"50%",transform:"translateY(-50%)",color:"var(--text-muted)"}}),l.jsx("input",{type:"text",placeholder:"Tìm kiếm IP, vị trí...",className:"form-input",style:{paddingLeft:"34px",fontSize:"13px"},value:C,onChange:P=>m(P.target.value)})]}),l.jsxs("div",{style:{display:"flex",gap:"8px"},children:[l.jsxs("button",{className:"btn btn-secondary",onClick:D,disabled:v===0,style:{padding:"8px 12px",fontSize:"13px"},children:[l.jsx(_t,{size:14}),"Copy Live"]}),l.jsxs("button",{className:"btn btn-secondary",onClick:L,disabled:v===0,style:{padding:"8px 12px",fontSize:"13px"},children:[l.jsx(Vn,{size:14}),"Tải file TXT"]})]})]}),l.jsx("div",{className:"scrollable",style:{overflowX:"auto",maxHeight:"400px"},children:l.jsxs("table",{style:{width:"100%",borderCollapse:"collapse",textAlign:"left",fontSize:"13px"},children:[l.jsx("thead",{children:l.jsxs("tr",{style:{borderBottom:"1px solid var(--border-color)",color:"var(--text-muted)"},children:[l.jsx("th",{style:{padding:"12px 8px",fontWeight:500},children:"Proxy"}),l.jsx("th",{style:{padding:"12px 8px",fontWeight:500,width:"110px"},children:"Trạng thái"}),l.jsx("th",{style:{padding:"12px 8px",fontWeight:500,width:"90px"},children:"Độ trễ"}),l.jsx("th",{style:{padding:"12px 8px",fontWeight:500,width:"130px"},children:"IP nhận"}),l.jsx("th",{style:{padding:"12px 8px",fontWeight:500,width:"150px"},children:"Quốc gia"}),l.jsx("th",{style:{padding:"12px 8px",fontWeight:500},children:"Chi tiết / Lỗi"})]})}),l.jsx("tbody",{children:T.map((P,Y)=>l.jsxs("tr",{style:{borderBottom:"1px solid var(--border-color)",background:Y%2===0?"var(--btn-secondary-bg)":"transparent"},children:[l.jsx("td",{style:{padding:"10px 8px",fontFamily:"monospace",color:"var(--text-secondary)"},children:P.proxy}),l.jsx("td",{style:{padding:"10px 8px"},children:P.status==="active"?l.jsxs("span",{style:{display:"inline-flex",alignItems:"center",gap:"4px",color:"var(--text-emerald, #10b981)",background:"rgba(16, 185, 129, 0.1)",padding:"3px 8px",borderRadius:"4px",fontSize:"11px",fontWeight:600},children:[l.jsx(rd,{size:10}),"LIVE"]}):l.jsxs("span",{style:{display:"inline-flex",alignItems:"center",gap:"4px",color:"#ef4444",background:"rgba(239, 68, 68, 0.1)",padding:"3px 8px",borderRadius:"4px",fontSize:"11px",fontWeight:600},children:[l.jsx(ld,{size:10}),"DEAD"]})}),l.jsx("td",{style:{padding:"10px 8px"},children:P.status==="active"&&P.latency?l.jsxs("span",{style:{color:P.latency<500?"var(--text-emerald, #10b981)":P.latency<1500?"var(--text-accent)":"#ef4444",fontWeight:600},children:[P.latency," ms"]}):l.jsx("span",{style:{color:"var(--text-muted)"},children:"-"})}),l.jsx("td",{style:{padding:"10px 8px",fontFamily:"monospace"},children:P.ip||"-"}),l.jsx("td",{style:{padding:"10px 8px"},children:P.status==="active"&&P.countryCode?l.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"6px"},children:[l.jsx("span",{style:{fontSize:"15px"},title:P.countryCode,children:Rf(P.countryCode)}),l.jsx("span",{style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",maxWidth:"110px"},children:P.country})]}):l.jsx("span",{style:{color:"var(--text-muted)"},children:"-"})}),l.jsx("td",{style:{padding:"10px 8px",color:P.status==="active"?"var(--text-muted)":"#f87171",fontSize:"12px"},children:P.status==="active"?l.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"4px"},children:[l.jsx(Vl,{size:11}),l.jsx("span",{style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",maxWidth:"200px"},children:P.isp})]}):l.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"4px"},children:[l.jsx(cd,{size:12}),l.jsx("span",{children:P.error})]})})]},Y))})]})})]})]})};function Af(e,t){if(t<=7)return Array.from({length:t},(s,o)=>o+1);const n=[];n.push(1),e>3&&n.push("ellipsis");const r=Math.max(2,e-1),i=Math.min(t-1,e+1);for(let s=r;s<=i;s++)n.push(s);return e<t-2&&n.push("ellipsis"),t>1&&n.push(t),n}const Is=({currentPage:e,totalPages:t,pageSize:n,totalItems:r,startIndex:i,endIndex:s,pageSizeOptions:o,onPageChange:a,onPageSizeChange:c})=>{if(r<=o[0])return null;const u=Af(e,t);return l.jsxs("div",{className:"pagination-footer animate-fade-in",children:[l.jsxs("div",{className:"pagination-info",style:{display:"flex",alignItems:"center",gap:"16px"},children:[l.jsxs("span",{children:["Hiển thị ",l.jsx("strong",{children:i}),"–",l.jsx("strong",{children:s})," / ",l.jsx("strong",{children:r})," mục"]}),l.jsxs("div",{className:"pagination-size-selector",children:[l.jsx("span",{className:"pagination-size-label",children:"Số lượng"}),l.jsx("select",{className:"pagination-select",value:n,onChange:x=>c(Number(x.target.value)),children:o.map(x=>l.jsx("option",{value:x,children:x},x))})]})]}),l.jsxs("div",{className:"pagination-nav",children:[l.jsx("button",{className:"pagination-btn pagination-arrow",onClick:()=>a(e-1),disabled:e<=1,title:"Trang trước",children:l.jsx(Z1,{size:16})}),u.map((x,y)=>x==="ellipsis"?l.jsx("span",{className:"pagination-ellipsis",children:"…"},`ellipsis-${y}`):l.jsx("button",{className:`pagination-btn ${e===x?"active":""}`,onClick:()=>a(x),children:x},x)),l.jsx("button",{className:"pagination-btn pagination-arrow",onClick:()=>a(e+1),disabled:e>=t,title:"Trang tiếp",children:l.jsx(nd,{size:16})})]})]})},gd=[50,100,200,500,1e3],Of="paginationPageSize",Wf=50;function Bf(e){try{const t=localStorage.getItem(e);if(t){const n=Number(t);if(gd.includes(n))return n}}catch{}return Wf}function yd({items:e,storageKey:t=Of}){const[n,r]=j.useState(()=>Bf(t)),[i,s]=j.useState(1),o=e.length,a=Math.max(1,Math.ceil(o/n));j.useEffect(()=>{i>a&&s(a)},[a,i]),j.useEffect(()=>{s(1)},[o]);const c=C=>{r(C),s(1);try{localStorage.setItem(t,String(C))}catch{}},u=(i-1)*n,x=Math.min(u+n,o),y=j.useMemo(()=>e.slice(u,x),[e,u,x]),g=()=>{i<a&&s(i+1)},k=()=>{i>1&&s(i-1)};return{paginatedItems:y,currentPage:i,totalPages:a,pageSize:n,totalItems:o,startIndex:o===0?0:u+1,endIndex:x,pageSizeOptions:gd,setCurrentPage:s,setPageSize:c,goToNextPage:g,goToPrevPage:k}}const Ba=({label:e,value:t,options:n,onChange:r,width:i="150px",height:s="32px",hideAll:o=!1})=>{const[a,c]=j.useState(!1);return l.jsxs("div",{style:{position:"relative"},children:[l.jsxs("button",{onClick:()=>c(!a),className:"form-input",style:{display:"flex",alignItems:"center",justifyContent:"space-between",gap:"6px",width:i,padding:"4px 10px",fontSize:"12px",height:s,background:"var(--bg-input)",border:"1px solid var(--border-input)",borderRadius:"8px",color:"var(--text-primary)",cursor:"pointer",textAlign:"left"},children:[l.jsx("span",{style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:t==="all"?`${e} (Tất cả)`:t}),l.jsx(Fr,{size:10,style:{flexShrink:0,opacity:.7,transform:a?"rotate(180deg)":"none",transition:"transform 0.2s ease"}})]}),a&&l.jsxs(l.Fragment,{children:[l.jsx("div",{onClick:()=>c(!1),style:{position:"fixed",top:0,left:0,right:0,bottom:0,zIndex:999}}),l.jsxs("div",{className:"glass-panel scrollable",style:{position:"absolute",top:"calc(100% + 6px)",left:0,zIndex:1e3,padding:"6px",minWidth:i,maxWidth:"220px",maxHeight:"200px",overflowY:"auto",display:"flex",flexDirection:"column",gap:"4px",boxShadow:"var(--glow-accent)",background:"var(--bg-modal)",borderRadius:"8px"},children:[!o&&l.jsxs("button",{onClick:()=>{r("all"),c(!1)},style:{width:"100%",padding:"6px 10px",textAlign:"left",background:t==="all"?"var(--bg-active-tab)":"transparent",border:"none",borderRadius:"6px",color:t==="all"?"var(--text-accent)":"var(--text-primary)",fontSize:"12px",cursor:"pointer",transition:"var(--transition-smooth)"},onMouseEnter:u=>{t!=="all"&&(u.currentTarget.style.background="rgba(255, 255, 255, 0.05)")},onMouseLeave:u=>{t!=="all"&&(u.currentTarget.style.background="transparent")},children:[e," (Tất cả)"]}),n.map(u=>l.jsx("button",{onClick:()=>{r(u),c(!1)},style:{width:"100%",padding:"6px 10px",textAlign:"left",background:t===u?"var(--bg-active-tab)":"transparent",border:"none",borderRadius:"6px",color:t===u?"var(--text-accent)":"var(--text-primary)",fontSize:"12px",cursor:"pointer",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",transition:"var(--transition-smooth)"},onMouseEnter:x=>{t!==u&&(x.currentTarget.style.background="rgba(255, 255, 255, 0.05)")},onMouseLeave:x=>{t!==u&&(x.currentTarget.style.background="transparent")},children:u},u))]})]})]})};function Uf(e){if(!e||e.length!==2)return"";const t=e.toUpperCase().split("").map(n=>127397+n.charCodeAt(0));return String.fromCodePoint(...t)}const Vf=()=>{const{fetchWithAuth:e}=St(),[t,n]=j.useState([]),[r,i]=j.useState(!0),[s,o]=j.useState(null),[a,c]=j.useState(!1),[u,x]=j.useState(""),[y,g]=j.useState(!1),[k,C]=j.useState(""),[m,N]=j.useState("all"),[p,d]=j.useState("all"),[f,w]=j.useState("all"),[v,S]=j.useState(new Set),[z,T]=j.useState(new Set),[D,L]=j.useState(!1),[J,U]=j.useState({current:0,total:0}),P=Vt.useRef(!1),Y=async()=>{i(!0),o(null);try{const I=await e("/api/proxy");if(I.ok){const G=await I.json();n(G)}else o("Không thể lấy danh sách proxy từ máy chủ.")}catch(I){o(I.message||"Lỗi mạng khi tải danh sách proxy.")}finally{i(!1)}};j.useEffect(()=>{Y()},[]);const re=j.useMemo(()=>{const I=new Set;return t.forEach(G=>{G.country&&I.add(G.country)}),Array.from(I).sort()},[t]),A=j.useMemo(()=>{const I=new Set;return t.forEach(G=>{G.isp&&I.add(G.isp)}),Array.from(I).sort()},[t]),W=j.useMemo(()=>t.filter(I=>{const G=I.proxy.toLowerCase().includes(k.toLowerCase())||I.host.toLowerCase().includes(k.toLowerCase())||I.ip&&I.ip.toLowerCase().includes(k.toLowerCase())||I.country&&I.country.toLowerCase().includes(k.toLowerCase())||I.isp&&I.isp.toLowerCase().includes(k.toLowerCase()),R=m==="all"||m==="live"&&I.status==="active"||m==="dead"&&I.status==="dead",Z=p==="all"||I.country===p,ee=f==="all"||I.isp===f;return G&&R&&Z&&ee}),[t,k,m,p,f]),{paginatedItems:b,currentPage:M,totalPages:F,pageSize:H,totalItems:K,startIndex:h,endIndex:E,pageSizeOptions:V,setCurrentPage:$,setPageSize:Q}=yd({items:W,storageKey:"proxyPageSize"}),le=I=>{if(I.target.checked){const G=W.map(R=>R.id);S(new Set(G))}else S(new Set)},B=I=>{const G=new Set(v);G.has(I)?G.delete(I):G.add(I),S(G)},Se=async()=>{if(u.trim()){g(!0);try{const I=u.split(`
284
+ `).map(R=>R.trim()).filter(R=>R.length>0),G=await e("/api/proxy",{method:"POST",body:JSON.stringify({proxies:I})});if(G.ok)x(""),c(!1),await Y();else{const R=await G.json();alert(R.error||"Lỗi khi lưu danh sách proxy.")}}catch(I){alert(I.message||"Lỗi kết nối khi gửi dữ liệu.")}finally{g(!1)}}},se=async I=>{if(confirm("Bạn có chắc chắn muốn xóa proxy này?"))try{if((await e(`/api/proxy/${I}`,{method:"DELETE"})).ok){n(Z=>Z.filter(ee=>ee.id!==I));const R=new Set(v);R.delete(I),S(R)}else alert("Không thể xóa proxy.")}catch(G){console.error(G)}},te=async()=>{if(v.size!==0&&confirm(`Bạn có chắc chắn muốn xóa ${v.size} proxy đã chọn?`))try{(await e("/api/proxy/delete-batch",{method:"POST",body:JSON.stringify({ids:Array.from(v)})})).ok?(n(G=>G.filter(R=>!v.has(R.id))),S(new Set)):alert("Không thể xóa các proxy đã chọn.")}catch(I){console.error(I)}},Ar=async(I,G)=>{T(R=>new Set(R).add(I));try{const R=await e("/api/proxy/check",{method:"POST",body:JSON.stringify({proxies:[G],timeout:5e3})});if(R.ok){const Z=await R.json();if(Z.success&&Z.results&&Z.results.length>0){const ee=Z.results[0];n(ge=>ge.map(me=>me.id===I?{...me,status:ee.status,latency:ee.latency,ip:ee.ip,country:ee.country,countryCode:ee.countryCode,city:ee.city,isp:ee.isp,error:ee.error,last_checked:new Date().toISOString(),updated_at:new Date().toISOString()}:me))}}}catch(R){console.error(R)}finally{T(R=>{const Z=new Set(R);return Z.delete(I),Z})}},Or=async()=>{if(v.size===0)return;L(!0),P.current=!1;const I=Array.from(v);U({current:0,total:I.length});const G=I.map(Z=>{const ee=t.find(ge=>ge.id===Z);return{id:Z,proxyStr:(ee==null?void 0:ee.proxy)||""}}).filter(Z=>Z.proxyStr),R=5;for(let Z=0;Z<G.length&&!P.current;Z+=R){const ee=G.slice(Z,Z+R);T(ge=>{const me=new Set(ge);return ee.forEach(Xt=>me.add(Xt.id)),me});try{const ge=await e("/api/proxy/check",{method:"POST",body:JSON.stringify({proxies:ee.map(me=>me.proxyStr),timeout:5e3,concurrency:R})});if(ge.ok){const me=await ge.json();me.success&&Array.isArray(me.results)&&n(Xt=>{let Yt=[...Xt];return me.results.forEach(We=>{const bt=Yt.findIndex(Eo=>Eo.proxy===We.proxy);bt!==-1&&(Yt[bt]={...Yt[bt],status:We.status,latency:We.latency,ip:We.ip,country:We.country,countryCode:We.countryCode,city:We.city,isp:We.isp,error:We.error,last_checked:new Date().toISOString(),updated_at:new Date().toISOString()})}),Yt})}}catch(ge){console.error("Lỗi check bulk:",ge)}finally{T(ge=>{const me=new Set(ge);return ee.forEach(Xt=>me.delete(Xt.id)),me}),U(ge=>({...ge,current:Math.min(ge.current+ee.length,ge.total)}))}}L(!1)},Wr=()=>{P.current=!0,L(!1)},Br=()=>{if(v.size===0)return;const I=t.filter(G=>v.has(G.id)).map(G=>G.proxy).join(`
267
285
  `);navigator.clipboard.writeText(I),alert(`Đã copy ${v.size} proxy vào clipboard!`)},Ur=()=>{const I=t.filter(G=>G.status==="active").map(G=>G.proxy).join(`
268
286
  `);I?(navigator.clipboard.writeText(I),alert("Đã copy danh sách proxy hoạt động vào clipboard!")):alert("Không có proxy hoạt động nào để copy.")},Vr=()=>{const I=t.filter(ee=>ee.status==="active").map(ee=>ee.proxy).join(`
269
- `);if(!I){alert("Không có proxy hoạt động nào để tải xuống.");return}const G=new Blob([I],{type:"text/plain;charset=utf-8"}),R=URL.createObjectURL(G),Y=document.createElement("a");Y.href=R,Y.download="live-proxies.txt",Y.click(),URL.revokeObjectURL(R)},Ct=t.length,pt=t.filter(I=>I.status==="active").length,ai=t.filter(I=>I.status==="dead").length;return l.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"20px",width:"100%",height:"100%",minHeight:0},children:[l.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"flex-start",gap:"16px"},children:[l.jsxs("div",{children:[l.jsx("h2",{style:{fontSize:"20px",fontWeight:600,color:"var(--text-primary)"},children:"Quản lý Proxy"}),l.jsx("p",{style:{color:"var(--text-secondary)",fontSize:"14px",marginTop:"4px"},children:"Lịch sử và danh sách proxy đã lưu trong cơ sở dữ liệu mã hóa."})]}),l.jsxs("button",{className:"btn btn-primary",onClick:()=>c(!a),style:{padding:"8px 14px",gap:"6px"},children:[l.jsx(To,{size:16}),a?"Đóng panel":"Thêm Proxy"]})]}),a&&l.jsxs("div",{className:"glass-panel animate-fade-in",style:{padding:"20px",display:"flex",flexDirection:"column",gap:"12px"},children:[l.jsxs("label",{className:"form-label",style:{display:"flex",justifyContent:"space-between",fontWeight:600},children:[l.jsx("span",{children:"Thêm nhanh Proxy (Mỗi dòng một proxy)"}),l.jsx("span",{style:{fontSize:"11px",color:"var(--text-muted)"},children:"Định dạng: IP:Port hoặc IP:Port:User:Pass"})]}),l.jsx("textarea",{className:"form-input scrollable",placeholder:"Ví dụ:\r103.112.44.1:8080\r202.12.33.22:3128:user:pass",style:{height:"120px",fontFamily:"monospace",fontSize:"13px",resize:"vertical"},value:d,onChange:I=>x(I.target.value),disabled:y}),l.jsxs("div",{style:{display:"flex",gap:"10px",justifyContent:"flex-end"},children:[l.jsx("button",{className:"btn btn-secondary",onClick:()=>c(!1),disabled:y,style:{padding:"8px 16px"},children:"Hủy"}),l.jsx("button",{className:"btn btn-primary",onClick:Se,disabled:y||!d.trim(),style:{padding:"8px 16px",minWidth:"100px"},children:y?"Đang lưu...":"Lưu vào database"})]})]}),D&&l.jsxs("div",{className:"glass-panel animate-fade-in",style:{padding:"16px",display:"flex",flexDirection:"column",gap:"10px"},children:[l.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[l.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"8px",fontSize:"14px",fontWeight:600},children:[l.jsx(Ri,{size:14,className:"animate-spin",style:{color:"var(--text-accent)"}}),l.jsx("span",{children:"Đang kiểm tra hàng loạt các proxy đã chọn..."})]}),l.jsxs("button",{className:"btn btn-danger",onClick:Wr,style:{padding:"4px 10px",fontSize:"12px",background:"rgba(239, 68, 68, 0.1)",border:"1px solid rgba(239, 68, 68, 0.3)",color:"#ef4444"},children:[l.jsx(fd,{size:12})," Dừng check"]})]}),l.jsxs("div",{style:{display:"flex",justifyContent:"space-between",fontSize:"12px",color:"var(--text-secondary)"},children:[l.jsx("span",{children:"Tiến trình"}),l.jsxs("span",{children:[Z.current," / ",Z.total," (",Math.round(Z.current/Z.total*100),"%)"]})]}),l.jsx("div",{style:{width:"100%",height:"6px",background:"var(--bg-input)",borderRadius:"3px",overflow:"hidden",border:"1px solid var(--border-color)"},children:l.jsx("div",{style:{height:"100%",background:"var(--primary-gradient)",width:`${Z.current/Z.total*100}%`,transition:"width 0.3s ease"}})})]}),l.jsxs("div",{className:"glass-panel",style:{padding:"20px",display:"flex",flexDirection:"column",gap:"16px",flexGrow:1,minHeight:0,overflow:"hidden"},children:[l.jsxs("div",{style:{display:"flex",flexWrap:"wrap",gap:"12px",justifyContent:"space-between",alignItems:"center"},children:[l.jsxs("div",{style:{display:"flex",flexWrap:"wrap",gap:"8px",alignItems:"center"},children:[l.jsxs("div",{style:{display:"flex",background:"var(--btn-secondary-bg)",borderRadius:"6px",padding:"2px",border:"1px solid var(--border-color)"},children:[l.jsxs("button",{onClick:()=>N("all"),style:{padding:"5px 12px",fontSize:"12px",border:"none",background:m==="all"?"var(--bg-active-tab)":"transparent",color:m==="all"?"var(--text-accent)":"var(--text-primary)",borderRadius:"4px",cursor:"pointer",fontWeight:m==="all"?600:400},children:["Tất cả (",Ct,")"]}),l.jsxs("button",{onClick:()=>N("live"),style:{padding:"5px 12px",fontSize:"12px",border:"none",background:m==="live"?"rgba(16, 185, 129, 0.15)":"transparent",color:m==="live"?"var(--text-emerald, #10b981)":"var(--text-primary)",borderRadius:"4px",cursor:"pointer",fontWeight:m==="live"?600:400},children:["LIVE (",pt,")"]}),l.jsxs("button",{onClick:()=>N("dead"),style:{padding:"5px 12px",fontSize:"12px",border:"none",background:m==="dead"?"rgba(239, 68, 68, 0.15)":"transparent",color:m==="dead"?"#ef4444":"var(--text-primary)",borderRadius:"4px",cursor:"pointer",fontWeight:m==="dead"?600:400},children:["DEAD (",ai,")"]})]}),l.jsx(Ba,{label:"Quốc gia",value:p,options:re,onChange:u}),l.jsx(Ba,{label:"Nhà mạng",value:f,options:A,onChange:j})]}),l.jsxs("div",{style:{position:"relative",minWidth:"200px",flexGrow:1,maxWidth:"280px"},children:[l.jsx(si,{size:14,style:{position:"absolute",left:"10px",top:"50%",transform:"translateY(-50%)",color:"var(--text-muted)"}}),l.jsx("input",{type:"text",placeholder:"Tìm kiếm proxy, IP, ISP...",className:"form-input",style:{paddingLeft:"32px",fontSize:"12px",height:"32px"},value:k,onChange:I=>S(I.target.value)})]}),l.jsxs("div",{style:{display:"flex",gap:"6px"},children:[v.size>0&&l.jsxs(l.Fragment,{children:[l.jsxs("button",{className:"btn btn-secondary",onClick:Or,disabled:D,style:{padding:"6px 10px",fontSize:"12px",gap:"4px"},title:"Check lại các mục đã chọn",children:[l.jsx(ad,{size:12})," Check"]}),l.jsxs("button",{className:"btn btn-secondary",onClick:Br,style:{padding:"6px 10px",fontSize:"12px",gap:"4px"},children:[l.jsx(Zt,{size:12})," Copy (",v.size,")"]}),l.jsxs("button",{className:"btn btn-danger",onClick:te,disabled:D,style:{padding:"6px 10px",fontSize:"12px",gap:"4px",background:"rgba(239, 68, 68, 0.1)",border:"1px solid rgba(239, 68, 68, 0.3)",color:"#ef4444"},children:[l.jsx(un,{size:12})," Xóa"]})]}),l.jsx("button",{className:"btn btn-secondary",onClick:Ur,disabled:pt===0,style:{padding:"6px 10px",fontSize:"12px",gap:"4px"},children:"Copy Live"}),l.jsx("button",{className:"btn btn-secondary",onClick:Vr,disabled:pt===0,style:{padding:"6px 10px",fontSize:"12px",gap:"4px"},children:"Tải TXT"})]})]}),r?l.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",flexGrow:1,height:"200px",color:"var(--text-secondary)"},children:[l.jsx(Ri,{size:24,className:"animate-spin"}),l.jsx("span",{style:{marginTop:"8px"},children:"Đang tải danh sách proxy..."})]}):s?l.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",flexGrow:1,height:"200px",color:"#ef4444",gap:"8px"},children:[l.jsx(q1,{size:24}),l.jsx("span",{children:s}),l.jsx("button",{className:"btn btn-secondary",onClick:X,style:{fontSize:"12px",padding:"6px 12px"},children:"Tải lại"})]}):W.length===0?l.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",flexGrow:1,height:"200px",color:"var(--text-muted)"},children:[l.jsx(Vl,{size:30,style:{opacity:.3}}),l.jsx("span",{style:{marginTop:"8px",fontSize:"14px"},children:"Không có proxy nào khớp với bộ lọc."})]}):l.jsx("div",{className:"scrollable",style:{overflow:"auto",flexGrow:1,minHeight:0},children:l.jsxs("table",{style:{width:"100%",borderCollapse:"collapse",textAlign:"left",fontSize:"13px"},children:[l.jsx("thead",{children:l.jsxs("tr",{style:{borderBottom:"1px solid rgba(255,255,255,0.08)",color:"var(--text-muted)"},children:[l.jsx("th",{style:{position:"sticky",top:0,zIndex:10,background:"var(--bg-modal)",padding:"10px 8px",width:"32px"},children:l.jsx("input",{type:"checkbox",style:{accentColor:"var(--text-accent)",cursor:"pointer"},checked:W.length>0&&v.size===W.length,onChange:le})}),l.jsx("th",{style:{position:"sticky",top:0,zIndex:10,background:"var(--bg-modal)",padding:"10px 8px",fontWeight:500},children:"Proxy"}),l.jsx("th",{style:{position:"sticky",top:0,zIndex:10,background:"var(--bg-modal)",padding:"10px 8px",fontWeight:500,width:"100px"},children:"Trạng thái"}),l.jsx("th",{style:{position:"sticky",top:0,zIndex:10,background:"var(--bg-modal)",padding:"10px 8px",fontWeight:500,width:"85px"},children:"Độ trễ"}),l.jsx("th",{style:{position:"sticky",top:0,zIndex:10,background:"var(--bg-modal)",padding:"10px 8px",fontWeight:500,width:"120px"},children:"IP nhận"}),l.jsx("th",{style:{position:"sticky",top:0,zIndex:10,background:"var(--bg-modal)",padding:"10px 8px",fontWeight:500,width:"140px"},children:"Quốc gia"}),l.jsx("th",{style:{position:"sticky",top:0,zIndex:10,background:"var(--bg-modal)",padding:"10px 8px",fontWeight:500,width:"160px"},children:"Nhà mạng / ISP"}),l.jsx("th",{style:{position:"sticky",top:0,zIndex:10,background:"var(--bg-modal)",padding:"10px 8px",fontWeight:500,width:"130px"},children:"Cập nhật"}),l.jsx("th",{style:{position:"sticky",top:0,zIndex:10,background:"var(--bg-modal)",padding:"10px 8px",fontWeight:500,width:"90px",textAlign:"center"},children:"Hành động"})]})}),l.jsx("tbody",{children:b.map((I,G)=>{const R=z.has(I.id);return l.jsxs("tr",{style:{borderBottom:"1px solid var(--border-color)",background:G%2===0?"var(--btn-secondary-bg)":"transparent",opacity:R?.7:1},children:[l.jsx("td",{style:{padding:"8px"},children:l.jsx("input",{type:"checkbox",style:{accentColor:"var(--text-accent)",cursor:"pointer"},checked:v.has(I.id),onChange:()=>B(I.id)})}),l.jsx("td",{style:{padding:"8px",fontFamily:"monospace",color:"var(--text-secondary)",wordBreak:"break-all"},children:I.proxy}),l.jsx("td",{style:{padding:"8px"},children:I.status==="active"?l.jsxs("span",{style:{display:"inline-flex",alignItems:"center",gap:"3px",color:"var(--text-emerald, #10b981)",background:"rgba(16, 185, 129, 0.1)",padding:"2px 6px",borderRadius:"4px",fontSize:"11px",fontWeight:600},children:[l.jsx(rd,{size:10}),"LIVE"]}):l.jsxs("span",{style:{display:"inline-flex",alignItems:"center",gap:"3px",color:"#ef4444",background:"rgba(239, 68, 68, 0.1)",padding:"2px 6px",borderRadius:"4px",fontSize:"11px",fontWeight:600},children:[l.jsx(ld,{size:10}),"DEAD"]})}),l.jsx("td",{style:{padding:"8px"},children:I.status==="active"&&I.latency?l.jsxs("span",{style:{color:I.latency<500?"var(--text-emerald, #10b981)":I.latency<1500?"var(--text-accent)":"#ef4444",fontWeight:600},children:[I.latency," ms"]}):l.jsx("span",{style:{color:"var(--text-muted)"},children:"-"})}),l.jsx("td",{style:{padding:"8px",fontFamily:"monospace"},children:I.ip||"-"}),l.jsx("td",{style:{padding:"8px"},children:I.status==="active"&&I.countryCode?l.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"4px"},children:[l.jsx("span",{style:{fontSize:"14px"},title:I.countryCode,children:Of(I.countryCode)}),l.jsx("span",{style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",maxWidth:"100px"},children:I.country})]}):l.jsx("span",{style:{color:"var(--text-muted)"},children:"-"})}),l.jsx("td",{style:{padding:"8px"},children:I.status==="active"?l.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"4px",color:"var(--text-muted)",fontSize:"12px"},children:[l.jsx(Vl,{size:11,style:{flexShrink:0}}),l.jsx("span",{style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",maxWidth:"140px"},title:I.isp,children:I.isp})]}):l.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"4px",color:"#f87171",fontSize:"11px"},title:I.error,children:[l.jsx(cd,{size:11,style:{flexShrink:0}}),l.jsx("span",{style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",maxWidth:"140px"},children:I.error})]})}),l.jsx("td",{style:{padding:"8px",fontSize:"11px",color:"var(--text-muted)"},children:I.last_checked?new Date(I.last_checked).toLocaleString("vi-VN",{hour:"2-digit",minute:"2-digit",second:"2-digit",day:"2-digit",month:"2-digit"}):"-"}),l.jsx("td",{style:{padding:"8px",textAlign:"center"},children:l.jsxs("div",{style:{display:"flex",gap:"4px",justifyContent:"center"},children:[l.jsx("button",{className:"btn btn-secondary",onClick:()=>Ar(I.id,I.proxy),disabled:R||D,style:{padding:"4px",minWidth:"auto",borderRadius:"4px"},title:"Kiểm tra lại",children:l.jsx(Ri,{size:12,className:R?"animate-spin":""})}),l.jsx("button",{className:"btn btn-secondary",onClick:()=>se(I.id),disabled:R||D,style:{padding:"4px",minWidth:"auto",borderRadius:"4px",color:"#ef4444"},title:"Xóa",children:l.jsx(un,{size:12})})]})})]},I.id)})})]})}),l.jsx(Ns,{currentPage:M,totalPages:F,pageSize:H,totalItems:K,startIndex:h,endIndex:E,pageSizeOptions:V,onPageChange:$,onPageSizeChange:Q})]})]})};function Bf(e){const t="ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",n=e.toUpperCase().replace(/=+$/,"").replace(/\s/g,""),r=new Uint8Array(Math.floor(n.length*5/8));let i=0,s=0,o=0;for(let a=0;a<n.length;a++){const c=n[a],d=t.indexOf(c);if(d===-1)throw new Error(`Invalid base32 character: ${c}`);i=i<<5|d,s+=5,s>=8&&(r[o++]=i>>>s-8&255,s-=8)}return r}async function Uf(e){const r=Math.floor(Date.now()/1e3),i=Math.floor(r/30),s=30-r%30;try{const o=Bf(e),a=new Uint8Array(8);let c=i;for(let m=7;m>=0;m--)a[m]=c&255,c=c>>>8;const d=await window.crypto.subtle.importKey("raw",o,{name:"HMAC",hash:{name:"SHA-1"}},!1,["sign"]),x=await window.crypto.subtle.sign("HMAC",d,a),y=new Uint8Array(x),g=y[y.length-1]&15;let S=(((y[g]&127)<<24|(y[g+1]&255)<<16|(y[g+2]&255)<<8|y[g+3]&255)%Math.pow(10,6)).toString();for(;S.length<6;)S="0"+S;return{token:S,remainingSeconds:s}}catch(o){return console.error("TOTP generation error:",o),{token:"------",remainingSeconds:0}}}const Vf=()=>{const{fetchWithAuth:e}=St(),[t,n]=C.useState([]),[r,i]=C.useState([]),[s,o]=C.useState({}),[a,c]=C.useState(""),[d,x]=C.useState(null),[y,g]=C.useState(!1),[k,S]=C.useState(!1),[m,N]=C.useState(null),[p,u]=C.useState(!1),[f,j]=C.useState(""),v=async()=>{try{const A=await e("/api/credentials/platforms");if(A.ok){const W=await A.json();Array.isArray(W)&&i(W)}}catch(A){console.error("Failed to fetch platforms:",A)}},w=async(A,W)=>{try{(await e(`/api/credentials/platforms/${A}/toggle`,{method:"PUT",body:JSON.stringify({is_active:!W})})).ok&&v()}catch(b){console.error("Failed to toggle platform:",b)}},z=async A=>{if(confirm("Bạn có chắc chắn muốn xóa nền tảng tùy chỉnh này không? Các tài khoản thuộc nền tảng này sẽ bị gỡ bỏ liên kết."))try{(await e(`/api/credentials/platforms/${A}`,{method:"DELETE"})).ok&&(v(),T())}catch(W){console.error("Failed to delete platform:",W)}},T=async()=>{try{const A=await e("/api/credentials");if(A.ok){const W=await A.json();Array.isArray(W)&&n(W)}await v()}catch(A){console.error("Failed to fetch vault data:",A)}};C.useEffect(()=>{T()},[]),C.useEffect(()=>{const A=async()=>{const b={};for(const M of t)if(M.totp_secret)try{const{token:F,remainingSeconds:H}=await Uf(M.totp_secret);b[M.id]={token:F,remaining:H}}catch{b[M.id]={token:"Error",remaining:0}}o(b)};A();const W=setInterval(A,1e3);return()=>clearInterval(W)},[t]);const D=async A=>{if(A.preventDefault(),!!m)try{const W=r.find(V=>V.id===m.platform_id),b=W?W.name:"",M=m.title||b||m.email||m.username||"Tài khoản",F={...m,title:M},H=!!m.id,K=H?`/api/credentials/${m.id}`:"/api/credentials";(await e(K,{method:H?"PUT":"POST",body:JSON.stringify(F)})).ok&&(S(!1),N(null),T())}catch(W){console.error("Failed to save credential:",W)}},L=async A=>{if(confirm("Bạn có chắc chắn muốn xóa tài khoản này không?"))try{(await e(`/api/credentials/${A}`,{method:"DELETE"})).ok&&T()}catch(W){console.error("Failed to delete credential:",W)}},Z=async A=>{try{(await e(`/api/credentials/${A.id}`,{method:"PUT",body:JSON.stringify({is_favorite:!A.is_favorite})})).ok&&T()}catch(W){console.error("Failed to toggle favorite:",W)}},U=async(A,W)=>{if(!f)return;const b=f.split(`
270
- `).map(H=>H.trim()).filter(H=>H),M=(H,K,h)=>{const E=H.split("|").map(B=>B.trim()),V=K.split("|").map(B=>B.trim().toLowerCase()),$={title:"",username:"",uid:"",password:"",totp_secret:"",url:"",custom_fields:[],notes:"Nhập nhanh từ chuỗi dán (định dạng tùy chỉnh)"},Q=r.find(B=>B.id===h);$.platform_id=h,$.title=Q?Q.name:"Tài khoản dán nhanh",h==="google"?$.url="google.com":h==="facebook"?$.url="facebook.com":h==="tiktok"?$.url="tiktok.com":h==="twitter"?$.url="x.com":h==="instagram"?$.url="instagram.com":h==="outlook"?$.url="outlook.live.com":h==="telegram"?$.url="telegram.org":h==="discord"?$.url="discord.com":h==="reddit"&&($.url="reddit.com");const le=(B,Se)=>{var se;Se&&((se=$.custom_fields)==null||se.push({key:B,value:Se}))};return V.forEach((B,Se)=>{const se=E[Se];if(!(!se||B==="skip"))if(B==="pass mail"||B==="pass_mail"||B==="pass email"||B==="pass_email"||B.includes("pass mail")||B.includes("pass email"))le("Pass Mail",se);else if(B==="backup code"||B==="backup_code"||B.includes("backup"))le("Backup Code",se);else if(B.includes("email")||B==="mail")$.email=se,$.username||($.username=se);else if(B.includes("pass")||B==="pwd")B.includes("khôi phục")||B.includes("recovery")||B.includes("kp")?le("Mail KP",se):$.password=se;else if(B==="2fa"||B==="otp"||B==="totp"||B.includes("secret")||B.includes("authenticator"))$.totp_secret=se;else if(B==="uid")$.uid=se;else if(B.includes("username")||B==="user")$.username=se;else if(B==="sđt"||B==="sdt"||B.includes("phone")||B.includes("điện thoại"))le("SĐT",se);else if(B.includes("khôi phục")||B.includes("recovery")||B.includes("mail kp")||B.includes("mailkp"))le("Mail KP",se);else if(B==="cookie")le("Cookie",se);else if(B==="token")le("Token",se);else if(B.includes("auth token"))le("Auth Token",se);else{const te=K.split("|")[Se]||`Trường ${Se+1}`;le(te,se)}}),$.title||($.title=$.email||$.username||"Tài khoản dán nhanh"),$},F=(H,K)=>{const h=H.split("|").map(Q=>Q.trim()),E={title:"",username:"",uid:"",password:"",totp_secret:"",url:"",custom_fields:[],notes:"Nhập nhanh từ chuỗi dán"},V=(Q,le)=>{var B;le&&((B=E.custom_fields)==null||B.push({key:Q,value:le}))},$=r.find(Q=>Q.id===K);if(E.platform_id=K,E.title=$?$.name:"Tài khoản dán nhanh",K==="google")E.url="google.com",h[0]&&(E.email=h[0],E.username=h[0]),h[1]&&(E.password=h[1]),h[2]&&(E.totp_secret=h[2]),h.length===5?(h[3]&&V("Mail KP",h[3]),h[4]&&V("SĐT",h[4])):(h[3]&&V("Mail KP",h[3]),h[4]&&V("Pass Mail KP",h[4]),h[5]&&V("SĐT",h[5]));else if(K==="facebook")E.url="facebook.com",h[0]&&(E.uid=h[0]),h[1]&&(E.password=h[1]),h[2]&&(E.totp_secret=h[2]),h[3]&&(E.email=h[3],E.username=h[3]),h[4]&&V("Pass Email",h[4]),h[5]&&V("Mail KP",h[5]),h[6]&&V("Pass Mail KP",h[6]),h[7]&&V("SĐT",h[7]),h[8]&&V("Cookie",h[8]),h[9]&&V("Token",h[9]);else if(K==="tiktok")E.url="tiktok.com",h[0]&&(E.username=h[0]),h[1]&&(E.password=h[1]),h[2]&&(E.email=h[2],V("Email",h[2])),h[3]&&V("Pass Email",h[3]),h[4]&&(E.totp_secret=h[4]),h[5]&&V("SĐT",h[5]),h[6]&&V("Cookie",h[6]);else if(K==="twitter")E.url="x.com",h[0]&&(E.username=h[0]),h[1]&&(E.password=h[1]),h[2]&&(E.email=h[2],V("Email",h[2])),h[3]&&V("Pass Email",h[3]),h[4]&&(E.totp_secret=h[4]),h[5]&&V("Auth Token",h[5]);else if(K==="instagram")E.url="instagram.com",h[0]&&(E.username=h[0]),h[1]&&(E.password=h[1]),h[2]&&(E.email=h[2],V("Email",h[2])),h[3]&&V("Pass Email",h[3]),h[4]&&(E.totp_secret=h[4]),h[5]&&V("Cookie",h[5]);else if(K==="outlook")E.url="outlook.live.com",h[0]&&(E.email=h[0],E.username=h[0]),h[1]&&(E.password=h[1]),h[2]&&V("Mail KP",h[2]),h[3]&&V("SĐT",h[3]),h[4]&&V("Client ID",h[4]),h[5]&&V("Refresh Token",h[5]);else if(K==="telegram")E.url="telegram.org",h[0]&&(E.username=h[0]),h[1]&&(E.password=h[1]),h[2]&&V("API ID",h[2]),h[3]&&V("API Hash",h[3]),h[4]&&V("Session String",h[4]);else if(K==="discord")E.url="discord.com",h[0]&&(E.username=h[0]),h[1]&&(E.email=h[1],V("Email",h[1])),h[2]&&(E.password=h[2]),h[3]&&V("Token",h[3]),h[4]&&(E.totp_secret=h[4]),h[5]&&V("Backup Codes",h[5]);else if(K==="reddit")E.url="reddit.com",h[0]&&(E.username=h[0]),h[1]&&(E.password=h[1]),h[2]&&(E.email=h[2],V("Email",h[2])),h[3]&&V("Pass Email",h[3]),h[4]&&V("Cookie",h[4]);else if(h.length===5){const Q=h[0],le=Q.toLowerCase().includes("gmail.com");E.title=le?"Gmail":"Tài khoản dán nhanh",E.url=le?"google.com":"",E.email=Q,E.username=Q,E.password=h[1],E.totp_secret=h[2],E.custom_fields=[{key:"Mail KP",value:h[3]},{key:"SĐT",value:h[4]}]}else h.length===4?(E.email=h[0],E.username=h[0],E.password=h[1],E.totp_secret=h[2],E.custom_fields=[{key:"Mail KP",value:h[3]}]):h.length===3?(E.email=h[0],E.username=h[0],E.password=h[1],E.totp_secret=h[2]):h.length===2?(E.username=h[0],E.password=h[1]):E.password=h[0];return E};if(b.length>1)try{let H=0;const K=b.map(async h=>{const E=W?M(h,W,A||""):F(h,A||"");(await e("/api/credentials",{method:"POST",body:JSON.stringify(E)})).ok&&H++});await Promise.all(K),alert(`Đã nhập thành công ${H} tài khoản!`),u(!1),j(""),T()}catch(H){console.error("Failed to bulk import:",H),alert("Lỗi nhập hàng loạt. Vui lòng kiểm tra lại định dạng.")}else{const H=W?M(b[0],W,A||""):F(b[0],A||"");N(H),u(!1),j(""),S(!0)}},P=async A=>{try{const b=await(await e("/api/credentials")).json();let M="",F="",H="";if(A==="json")M=JSON.stringify(b,null,2),F="application/json",H="credentials-export.json";else{const V=(Q,le)=>{if(!Q.custom_fields)return"";const B=le.toLowerCase().trim(),Se=Q.custom_fields.find(se=>{const te=se.key.toLowerCase().trim();return B==="mail kp"?te==="mail kp"||te==="mailkp"||te==="email kp"||te==="emailkp"||te.includes("khôi phục")||te.includes("recovery"):B==="sđt"?te==="sđt"||te==="sdt"||te==="phone"||te==="sđt khôi phục"||te.includes("điện thoại")||te==="phone number":B==="backup code"?te==="backup code"||te==="backupcode"||te.includes("backup")||te.includes("mã dự phòng")||te.includes("mã cứu hộ")||te.includes("dự phòng"):B==="pass mail"?te==="pass mail"||te==="passmail"||te==="mật khẩu mail"||te==="mật khẩu email"||te==="pass email"||te==="passemail"||te.includes("mật khẩu email")||te.includes("pass mail"):te===B});return Se?Se.value:""};M=b.map(Q=>{const le=V(Q,"mail kp"),B=V(Q,"sđt"),Se=V(Q,"backup code"),se=V(Q,"pass mail");return`${Q.username}|${Q.password}|${Q.totp_secret}|${le}|${B}|${Se}|${se}`}).join(`
271
- `),F="text/plain",H="credentials-export.txt"}const K=new Blob([M],{type:F}),h=URL.createObjectURL(K),E=document.createElement("a");E.href=h,E.download=H,E.click(),URL.revokeObjectURL(h)}catch(W){console.error("Failed to export:",W)}},X=async A=>{var M;const W=(M=A.target.files)==null?void 0:M[0];if(!W)return;const b=new FileReader;b.onload=async F=>{var H;try{const K=(H=F.target)==null?void 0:H.result;if(W.name.endsWith(".json")){const h=JSON.parse(K),E=Array.isArray(h)?h:[h];for(const V of E)await e("/api/credentials",{method:"POST",body:JSON.stringify(V)});alert(`Đã nhập thành công ${E.length} tài khoản!`),T()}else{const h=K.split(`
272
- `).map($=>$.trim()).filter($=>$);if(h.length===0)return;let E=0;if(h.some($=>$.includes("|"))){for(const $ of h){const Q=$.split("|").map(le=>le.trim());if(Q.length>=2){const le=Q[0],B=le.toLowerCase().includes("gmail.com");await e("/api/credentials",{method:"POST",body:JSON.stringify({title:B?"Gmail":"Tài khoản Nhập",username:le,password:Q[1]||"",totp_secret:Q[2]||"",custom_fields:[{key:"Mail KP",value:Q[3]||""},{key:"SĐT",value:Q[4]||""},{key:"Backup Code",value:Q[5]||""},{key:"Pass Mail",value:Q[6]||""}],url:B?"google.com":"",notes:"Nhập từ file định dạng email|pass|2FA|Mail KP|SĐT"})}),E++}}alert(`Đã nhập thành công ${E} tài khoản từ định dạng email|pass|2FA|Mail KP|SĐT!`)}else{if(h.length<=1)return;for(let $=1;$<h.length;$++){const Q=h[$].split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/).map(le=>le.replace(/^"|"$/g,"").trim());Q.length>=2&&(await e("/api/credentials",{method:"POST",body:JSON.stringify({title:Q[0]||"Tài khoản CSV",url:Q[3]||"",username:Q[1]||"",password:Q[2]||"",totp_secret:Q[4]||"",notes:Q[5]||""})}),E++)}alert(`Đã nhập thành công ${E} tài khoản từ file CSV!`)}T()}}catch{alert("Lỗi phân tích file. Vui lòng kiểm tra lại định dạng.")}},b.readAsText(W)},re=t.filter(A=>{const W=A.title.toLowerCase().includes(a.toLowerCase())||A.username.toLowerCase().includes(a.toLowerCase())||A.url.toLowerCase().includes(a.toLowerCase())||A.notes.toLowerCase().includes(a.toLowerCase()),b=y?A.is_favorite:!0,M=d?A.platform_id===d:!0;return W&&b&&M});return{credentials:t,platforms:r,totps:s,search:a,setSearch:c,selectedPlatform:d,setSelectedPlatform:x,onlyFavorites:y,setOnlyFavorites:g,filteredCredentials:re,isCredModalOpen:k,setIsCredModalOpen:S,currentCredential:m,setCurrentCredential:N,isSmartPasteOpen:p,setIsSmartPasteOpen:u,smartPasteText:f,setSmartPasteText:j,fetchData:T,fetchPlatforms:v,handleTogglePlatform:w,handleDeletePlatform:z,handleSaveCredential:D,handleDeleteCredential:L,handleToggleFavorite:Z,handleSmartPasteSubmit:U,handleExport:P,handleImport:X}},Hf=()=>{var G;const{lockVault:e,theme:t,toggleTheme:n,fetchWithAuth:r}=St(),[i,s]=C.useState("vault"),[o,a]=C.useState(()=>localStorage.getItem("viewMode")==="table"?"table":"card"),[c,d]=C.useState(!1),[x,y]=C.useState(window.innerWidth<768);C.useEffect(()=>{const R=()=>{y(window.innerWidth<768)};return window.addEventListener("resize",R),()=>window.removeEventListener("resize",R)},[]);const g=R=>{a(R),localStorage.setItem("viewMode",R)},[k,S]=C.useState(()=>{const R=localStorage.getItem("visibleColumns"),Y={id:!0,username:!0,uid:!0,password:!0,otp:!0,mailKp:!0,phone:!0,backupCode:!1,passMail:!1,secretKey:!0,url:!0};if(R)try{const ee=JSON.parse(R);return{...Y,...ee}}catch{return Y}return Y}),[m,N]=C.useState(!1),p=R=>{const Y={...k,[R]:!k[R]};S(Y),localStorage.setItem("visibleColumns",JSON.stringify(Y))},{credentials:u,platforms:f,totps:j,search:v,setSearch:w,selectedPlatform:z,setSelectedPlatform:T,onlyFavorites:D,setOnlyFavorites:L,filteredCredentials:Z,isCredModalOpen:U,setIsCredModalOpen:P,currentCredential:X,setCurrentCredential:re,isSmartPasteOpen:A,setIsSmartPasteOpen:W,smartPasteText:b,setSmartPasteText:M,fetchData:F,handleTogglePlatform:H,handleDeletePlatform:K,handleSaveCredential:h,handleDeleteCredential:E,handleToggleFavorite:V,handleSmartPasteSubmit:$,handleExport:Q,handleImport:le}=Vf(),{paginatedItems:B,currentPage:Se,totalPages:se,pageSize:te,totalItems:Ar,startIndex:Or,endIndex:Wr,pageSizeOptions:Br,setCurrentPage:Ur,setPageSize:Vr}=yd({items:Z}),[Ct,pt]=C.useState(new Set);C.useEffect(()=>{pt(new Set)},[z,D,v,Se]);const ai=async()=>{if(confirm(`Bạn có chắc chắn muốn xóa ${Ct.size} tài khoản đã chọn không?`))try{const R=Array.from(Ct).map(Y=>r(`/api/credentials/${Y}`,{method:"DELETE"}));await Promise.all(R),pt(new Set),F()}catch(R){console.error("Failed to delete selected credentials:",R)}},I=R=>{const Y=u.filter(bt=>Ct.has(bt.id));let ee="",ge="",me="";if(R==="json")ee=JSON.stringify(Y,null,2),ge="application/json",me="selected-credentials-export.json";else{const bt=(zt,ci)=>{if(!zt.custom_fields)return"";const Kn=ci.toLowerCase().trim(),No=zt.custom_fields.find(md=>{const Be=md.key.toLowerCase().trim();return Kn==="mail kp"?Be==="mail kp"||Be==="mailkp"||Be==="email kp"||Be==="emailkp"||Be.includes("khôi phục")||Be.includes("recovery"):Kn==="sđt"?Be==="sđt"||Be==="sdt"||Be==="phone"||Be==="sđt khôi phục"||Be.includes("điện thoại")||Be==="phone number":Be===Kn});return No?No.value:""};ee=Y.map(zt=>{const ci=bt(zt,"mail kp"),Kn=bt(zt,"sđt");return`${zt.username}|${zt.password}|${zt.totp_secret}|${ci}|${Kn}`}).join(`
273
- `),ge="text/plain",me="selected-credentials-export.txt"}const Gt=new Blob([ee],{type:ge}),Xt=URL.createObjectURL(Gt),We=document.createElement("a");We.href=Xt,We.download=me,We.click(),URL.revokeObjectURL(Xt)};return l.jsxs("div",{style:{display:"flex",flexDirection:"column",height:"100vh",padding:"12px",gap:"8px",overflow:"hidden"},children:[l.jsx(df,{search:v,setSearch:w,theme:t,toggleTheme:n,onImportExportOpen:()=>d(!0),onSmartPasteOpen:()=>W(!0),onLockVault:e}),l.jsxs("div",{style:{display:"grid",gridTemplateColumns:"260px 1fr",gap:"12px",flexGrow:1,overflow:"hidden"},children:[l.jsx(pf,{credentials:u,platforms:f,selectedPlatform:z,setSelectedPlatform:T,onlyFavorites:D,setOnlyFavorites:L,activeView:i,setActiveView:s}),l.jsx("div",{style:{height:"100%",overflow:"hidden",display:"flex",flexDirection:"column",minHeight:0},children:i==="settings"?l.jsx("div",{style:{height:"100%",overflowY:"auto",paddingTop:"8px"},children:l.jsx(_f,{platforms:f,onTogglePlatform:H,onDeletePlatform:K})}):i==="proxy"?l.jsx("div",{style:{height:"100%",overflowY:"auto",paddingTop:"8px"},children:l.jsx(Mf,{})}):i==="proxy-list"?l.jsx("div",{style:{height:"100%",overflow:"hidden",paddingTop:"8px",display:"flex",flexDirection:"column",minHeight:0},children:l.jsx(Wf,{})}):l.jsxs("main",{style:{display:"flex",flexDirection:"column",gap:"10px",height:"100%",overflow:"hidden",minHeight:0,paddingTop:"8px"},children:[l.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[l.jsxs("h2",{style:{fontSize:"18px",fontWeight:600},children:[z?`Nền tảng: ${(G=f.find(R=>R.id===z))==null?void 0:G.name}`:D?"Tài khoản yêu thích":"Tất cả tài khoản",l.jsxs("span",{style:{fontSize:"14px",color:"var(--text-muted)",marginLeft:"8px"},children:["(",Z.length," mục)"]})]}),l.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"12px"},children:[!x&&l.jsxs("div",{style:{display:"flex",background:"var(--btn-secondary-bg)",border:"1px solid var(--btn-secondary-border)",borderRadius:"8px",padding:"2px"},children:[l.jsx("button",{onClick:()=>g("card"),style:{background:o==="card"?"var(--primary-gradient)":"none",border:"none",color:o==="card"?"var(--btn-primary-text)":"var(--text-secondary)",padding:"6px 12px",borderRadius:"6px",cursor:"pointer",display:"flex",alignItems:"center",gap:"6px",transition:"var(--transition-smooth)"},title:"Dạng thẻ",children:l.jsx(sf,{size:16})}),l.jsx("button",{onClick:()=>g("table"),style:{background:o==="table"?"var(--primary-gradient)":"none",border:"none",color:o==="table"?"var(--btn-primary-text)":"var(--text-secondary)",padding:"6px 12px",borderRadius:"6px",cursor:"pointer",display:"flex",alignItems:"center",gap:"6px",transition:"var(--transition-smooth)"},title:"Dạng bảng",children:l.jsx(sd,{size:16})})]}),!x&&o==="table"&&l.jsxs("div",{style:{position:"relative"},children:[l.jsxs("button",{className:"btn btn-secondary",onClick:()=>N(!m),style:{display:"flex",alignItems:"center",gap:"8px",padding:"8px 16px",borderRadius:"8px"},title:"Hiển thị cột",children:[l.jsx(tf,{size:16}),"Cột",l.jsx(Fr,{size:14})]}),m&&l.jsxs(l.Fragment,{children:[l.jsx("div",{onClick:()=>N(!1),style:{position:"fixed",top:0,left:0,right:0,bottom:0,zIndex:999}}),l.jsxs("div",{className:"glass-panel",style:{position:"absolute",top:"calc(100% + 8px)",right:0,zIndex:1e3,padding:"12px",minWidth:"180px",display:"flex",flexDirection:"column",gap:"10px",boxShadow:"var(--glow-accent)",background:"var(--bg-modal)"},children:[l.jsx("div",{style:{fontSize:"11px",fontWeight:600,color:"var(--text-secondary)",marginBottom:"4px",textTransform:"uppercase",letterSpacing:"0.05em"},children:"Hiển thị cột"}),l.jsxs("label",{style:{display:"flex",alignItems:"center",gap:"10px",fontSize:"13px",cursor:"pointer",color:"var(--text-primary)"},children:[l.jsx("input",{type:"checkbox",checked:k.id,onChange:()=>p("id"),style:{cursor:"pointer",accentColor:"var(--text-accent)"}}),"ID tài khoản"]}),l.jsxs("label",{style:{display:"flex",alignItems:"center",gap:"10px",fontSize:"13px",cursor:"pointer",color:"var(--text-primary)"},children:[l.jsx("input",{type:"checkbox",checked:k.username,onChange:()=>p("username"),style:{cursor:"pointer",accentColor:"var(--text-accent)"}}),"Username"]}),l.jsxs("label",{style:{display:"flex",alignItems:"center",gap:"10px",fontSize:"13px",cursor:"pointer",color:"var(--text-primary)"},children:[l.jsx("input",{type:"checkbox",checked:k.uid,onChange:()=>p("uid"),style:{cursor:"pointer",accentColor:"var(--text-accent)"}}),"UID"]}),l.jsxs("label",{style:{display:"flex",alignItems:"center",gap:"10px",fontSize:"13px",cursor:"pointer",color:"var(--text-primary)"},children:[l.jsx("input",{type:"checkbox",checked:k.password,onChange:()=>p("password"),style:{cursor:"pointer",accentColor:"var(--text-accent)"}}),"Mật khẩu"]}),l.jsxs("label",{style:{display:"flex",alignItems:"center",gap:"10px",fontSize:"13px",cursor:"pointer",color:"var(--text-primary)"},children:[l.jsx("input",{type:"checkbox",checked:k.otp,onChange:()=>p("otp"),style:{cursor:"pointer",accentColor:"var(--text-accent)"}}),"Mã 2FA (OTP)"]}),l.jsxs("label",{style:{display:"flex",alignItems:"center",gap:"10px",fontSize:"13px",cursor:"pointer",color:"var(--text-primary)"},children:[l.jsx("input",{type:"checkbox",checked:k.mailKp,onChange:()=>p("mailKp"),style:{cursor:"pointer",accentColor:"var(--text-accent)"}}),"Mail KP"]}),l.jsxs("label",{style:{display:"flex",alignItems:"center",gap:"10px",fontSize:"13px",cursor:"pointer",color:"var(--text-primary)"},children:[l.jsx("input",{type:"checkbox",checked:k.phone,onChange:()=>p("phone"),style:{cursor:"pointer",accentColor:"var(--text-accent)"}}),"SĐT"]}),l.jsxs("label",{style:{display:"flex",alignItems:"center",gap:"10px",fontSize:"13px",cursor:"pointer",color:"var(--text-primary)"},children:[l.jsx("input",{type:"checkbox",checked:k.backupCode,onChange:()=>p("backupCode"),style:{cursor:"pointer",accentColor:"var(--text-accent)"}}),"Backup Code"]}),l.jsxs("label",{style:{display:"flex",alignItems:"center",gap:"10px",fontSize:"13px",cursor:"pointer",color:"var(--text-primary)"},children:[l.jsx("input",{type:"checkbox",checked:k.passMail,onChange:()=>p("passMail"),style:{cursor:"pointer",accentColor:"var(--text-accent)"}}),"Pass Mail"]}),l.jsxs("label",{style:{display:"flex",alignItems:"center",gap:"10px",fontSize:"13px",cursor:"pointer",color:"var(--text-primary)"},children:[l.jsx("input",{type:"checkbox",checked:k.secretKey,onChange:()=>p("secretKey"),style:{cursor:"pointer",accentColor:"var(--text-accent)"}}),"Secret Key"]}),l.jsxs("label",{style:{display:"flex",alignItems:"center",gap:"10px",fontSize:"13px",cursor:"pointer",color:"var(--text-primary)"},children:[l.jsx("input",{type:"checkbox",checked:k.url,onChange:()=>p("url"),style:{cursor:"pointer",accentColor:"var(--text-accent)"}}),"Liên kết"]})]})]})]}),l.jsxs("button",{className:"btn btn-primary",onClick:()=>{re({title:"",username:"",uid:"",password:"",totp_secret:"",url:"",custom_fields:[{key:"Mail KP",value:""},{key:"SĐT",value:""},{key:"Backup Code",value:""},{key:"Pass Mail",value:""}],notes:"",category_id:"",platform_id:z||"",is_favorite:!1}),P(!0)},children:[l.jsx(To,{size:16}),"Thêm tài khoản"]})]})]}),Z.length===0?l.jsxs("div",{className:"glass-panel",style:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",padding:"60px",gap:"12px",color:"var(--text-secondary)"},children:[l.jsx(id,{size:36,style:{color:"var(--text-muted)"}}),l.jsx("p",{children:"Chưa có tài khoản nào trong bộ lọc này."})]}):x||o==="card"?l.jsxs(l.Fragment,{children:[l.jsx("div",{className:"scrollable",style:{flexGrow:1,overflowY:"auto",display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(320px, 1fr))",gap:"16px",paddingRight:"4px",alignItems:"start"},children:B.map(R=>l.jsx(ff,{cred:R,platforms:f,totp:j[R.id],onToggleFavorite:()=>V(R),onEdit:()=>{re(R),P(!0)},onDelete:()=>E(R.id)},R.id))}),l.jsx(Ns,{currentPage:Se,totalPages:se,pageSize:te,totalItems:Ar,startIndex:Or,endIndex:Wr,pageSizeOptions:Br,onPageChange:Ur,onPageSizeChange:Vr})]}):l.jsxs("div",{className:"table-pagination-wrapper",children:[l.jsx(gf,{credentials:B,platforms:f,totps:j,visibleColumns:k,onToggleFavorite:V,onEdit:R=>{re(R),P(!0)},onDelete:E,selectedIds:Ct,onToggleSelect:R=>{pt(Y=>{const ee=new Set(Y);return ee.has(R)?ee.delete(R):ee.add(R),ee})},onToggleSelectAll:()=>{pt(R=>R.size===B.length?new Set:new Set(B.map(Y=>Y.id)))}}),l.jsx(Ns,{currentPage:Se,totalPages:se,pageSize:te,totalItems:Ar,startIndex:Or,endIndex:Wr,pageSizeOptions:Br,onPageChange:Ur,onPageSizeChange:Vr})]})]})})]}),Ct.size>0&&l.jsxs("div",{className:"glass-panel animate-slide-up",style:{position:"fixed",bottom:"24px",left:"50%",transform:"translateX(-50%)",zIndex:999,display:"flex",alignItems:"center",gap:"16px",padding:"10px 24px",boxShadow:"0 20px 40px rgba(0,0,0,0.5), var(--glow-accent)",background:"var(--bg-modal)",border:"1px solid var(--text-accent)",borderRadius:"30px"},children:[l.jsxs("span",{style:{fontSize:"14px",fontWeight:600,color:"var(--text-primary)"},children:["Đã chọn ",l.jsx("strong",{style:{color:"var(--text-accent)"},children:Ct.size})," tài khoản"]}),l.jsx("div",{style:{width:"1px",height:"20px",background:"var(--border-color)"}}),l.jsxs("button",{type:"button",className:"btn btn-secondary",onClick:()=>I("json"),style:{padding:"6px 12px",fontSize:"13px",borderRadius:"20px",display:"flex",alignItems:"center",gap:"6px"},children:[l.jsx(Bn,{size:14}),"Xuất JSON"]}),l.jsxs("button",{type:"button",className:"btn btn-secondary",onClick:()=>I("csv"),style:{padding:"6px 12px",fontSize:"13px",borderRadius:"20px",display:"flex",alignItems:"center",gap:"6px"},title:"Xuất định dạng email|pass|2FA|Mail KP|SĐT",children:[l.jsx(Bn,{size:14}),"Xuất TXT (Gmail)"]}),l.jsxs("button",{type:"button",className:"btn btn-danger",onClick:ai,style:{padding:"6px 12px",fontSize:"13px",borderRadius:"20px",display:"flex",alignItems:"center",gap:"6px"},children:[l.jsx(un,{size:14}),"Xóa đã chọn"]}),l.jsx("div",{style:{width:"1px",height:"20px",background:"var(--border-color)"}}),l.jsx("button",{type:"button",className:"btn btn-secondary",onClick:()=>pt(new Set),style:{padding:"6px",borderRadius:"50%",width:"28px",height:"28px",display:"flex",alignItems:"center",justifyContent:"center"},title:"Bỏ chọn tất cả",children:l.jsx($n,{size:14})})]}),l.jsx(mf,{isOpen:U,onClose:()=>{P(!1),re(null)},credential:X||{},onChange:re,onSave:h,platforms:f}),l.jsx(jf,{isOpen:A,onClose:()=>W(!1),text:b,onChange:M,onSubmit:$,platforms:f}),l.jsx(wf,{isOpen:c,onClose:()=>d(!1),onImport:le,onExport:Q})]})},$f=()=>{const{isAuthenticated:e,isLoading:t}=St();return t?l.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",minHeight:"100vh",gap:"16px",color:"var(--text-secondary)"},children:[l.jsx("div",{className:"spinner",style:{width:"40px",height:"40px"}}),l.jsx("p",{style:{fontSize:"15px",fontWeight:500,letterSpacing:"0.5px"},children:"Đang kết nối tới mã khóa bảo mật..."})]}):e?l.jsx(Hf,{}):l.jsx(uf,{})},Kf=()=>l.jsx(K1,{children:l.jsx($f,{})});Fi.createRoot(document.getElementById("root")).render(l.jsx(Ut.StrictMode,{children:l.jsx(Kf,{})}));
287
+ `);if(!I){alert("Không có proxy hoạt động nào để tải xuống.");return}const G=new Blob([I],{type:"text/plain;charset=utf-8"}),R=URL.createObjectURL(G),Z=document.createElement("a");Z.href=R,Z.download="live-proxies.txt",Z.click(),URL.revokeObjectURL(R)},Ct=t.length,pt=t.filter(I=>I.status==="active").length,ci=t.filter(I=>I.status==="dead").length;return l.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"20px",width:"100%",height:"100%",minHeight:0},children:[l.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"flex-start",gap:"16px"},children:[l.jsxs("div",{children:[l.jsx("h2",{style:{fontSize:"20px",fontWeight:600,color:"var(--text-primary)"},children:"Quản lý Proxy"}),l.jsx("p",{style:{color:"var(--text-secondary)",fontSize:"14px",marginTop:"4px"},children:"Lịch sử và danh sách proxy đã lưu trong cơ sở dữ liệu mã hóa."})]}),l.jsxs("button",{className:"btn btn-primary",onClick:()=>c(!a),style:{padding:"8px 14px",gap:"6px"},children:[l.jsx(To,{size:16}),a?"Đóng panel":"Thêm Proxy"]})]}),a&&l.jsxs("div",{className:"glass-panel animate-fade-in",style:{padding:"20px",display:"flex",flexDirection:"column",gap:"12px"},children:[l.jsxs("label",{className:"form-label",style:{display:"flex",justifyContent:"space-between",fontWeight:600},children:[l.jsx("span",{children:"Thêm nhanh Proxy (Mỗi dòng một proxy)"}),l.jsx("span",{style:{fontSize:"11px",color:"var(--text-muted)"},children:"Định dạng: IP:Port hoặc IP:Port:User:Pass"})]}),l.jsx("textarea",{className:"form-input scrollable",placeholder:"Ví dụ:\r103.112.44.1:8080\r202.12.33.22:3128:user:pass",style:{height:"120px",fontFamily:"monospace",fontSize:"13px",resize:"vertical"},value:u,onChange:I=>x(I.target.value),disabled:y}),l.jsxs("div",{style:{display:"flex",gap:"10px",justifyContent:"flex-end"},children:[l.jsx("button",{className:"btn btn-secondary",onClick:()=>c(!1),disabled:y,style:{padding:"8px 16px"},children:"Hủy"}),l.jsx("button",{className:"btn btn-primary",onClick:Se,disabled:y||!u.trim(),style:{padding:"8px 16px",minWidth:"100px"},children:y?"Đang lưu...":"Lưu vào database"})]})]}),D&&l.jsxs("div",{className:"glass-panel animate-fade-in",style:{padding:"16px",display:"flex",flexDirection:"column",gap:"10px"},children:[l.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[l.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"8px",fontSize:"14px",fontWeight:600},children:[l.jsx(Fi,{size:14,className:"animate-spin",style:{color:"var(--text-accent)"}}),l.jsx("span",{children:"Đang kiểm tra hàng loạt các proxy đã chọn..."})]}),l.jsxs("button",{className:"btn btn-danger",onClick:Wr,style:{padding:"4px 10px",fontSize:"12px",background:"rgba(239, 68, 68, 0.1)",border:"1px solid rgba(239, 68, 68, 0.3)",color:"#ef4444"},children:[l.jsx(fd,{size:12})," Dừng check"]})]}),l.jsxs("div",{style:{display:"flex",justifyContent:"space-between",fontSize:"12px",color:"var(--text-secondary)"},children:[l.jsx("span",{children:"Tiến trình"}),l.jsxs("span",{children:[J.current," / ",J.total," (",Math.round(J.current/J.total*100),"%)"]})]}),l.jsx("div",{style:{width:"100%",height:"6px",background:"var(--bg-input)",borderRadius:"3px",overflow:"hidden",border:"1px solid var(--border-color)"},children:l.jsx("div",{style:{height:"100%",background:"var(--primary-gradient)",width:`${J.current/J.total*100}%`,transition:"width 0.3s ease"}})})]}),l.jsxs("div",{className:"glass-panel",style:{padding:"20px",display:"flex",flexDirection:"column",gap:"16px",flexGrow:1,minHeight:0,overflow:"hidden"},children:[l.jsxs("div",{style:{display:"flex",flexWrap:"wrap",gap:"12px",justifyContent:"space-between",alignItems:"center"},children:[l.jsxs("div",{style:{display:"flex",flexWrap:"wrap",gap:"8px",alignItems:"center"},children:[l.jsxs("div",{style:{display:"flex",background:"var(--btn-secondary-bg)",borderRadius:"6px",padding:"2px",border:"1px solid var(--border-color)"},children:[l.jsxs("button",{onClick:()=>N("all"),style:{padding:"5px 12px",fontSize:"12px",border:"none",background:m==="all"?"var(--bg-active-tab)":"transparent",color:m==="all"?"var(--text-accent)":"var(--text-primary)",borderRadius:"4px",cursor:"pointer",fontWeight:m==="all"?600:400},children:["Tất cả (",Ct,")"]}),l.jsxs("button",{onClick:()=>N("live"),style:{padding:"5px 12px",fontSize:"12px",border:"none",background:m==="live"?"rgba(16, 185, 129, 0.15)":"transparent",color:m==="live"?"var(--text-emerald, #10b981)":"var(--text-primary)",borderRadius:"4px",cursor:"pointer",fontWeight:m==="live"?600:400},children:["LIVE (",pt,")"]}),l.jsxs("button",{onClick:()=>N("dead"),style:{padding:"5px 12px",fontSize:"12px",border:"none",background:m==="dead"?"rgba(239, 68, 68, 0.15)":"transparent",color:m==="dead"?"#ef4444":"var(--text-primary)",borderRadius:"4px",cursor:"pointer",fontWeight:m==="dead"?600:400},children:["DEAD (",ci,")"]})]}),l.jsx(Ba,{label:"Quốc gia",value:p,options:re,onChange:d}),l.jsx(Ba,{label:"Nhà mạng",value:f,options:A,onChange:w})]}),l.jsxs("div",{style:{position:"relative",minWidth:"200px",flexGrow:1,maxWidth:"280px"},children:[l.jsx(oi,{size:14,style:{position:"absolute",left:"10px",top:"50%",transform:"translateY(-50%)",color:"var(--text-muted)"}}),l.jsx("input",{type:"text",placeholder:"Tìm kiếm proxy, IP, ISP...",className:"form-input",style:{paddingLeft:"32px",fontSize:"12px",height:"32px"},value:k,onChange:I=>C(I.target.value)})]}),l.jsxs("div",{style:{display:"flex",gap:"6px"},children:[v.size>0&&l.jsxs(l.Fragment,{children:[l.jsxs("button",{className:"btn btn-secondary",onClick:Or,disabled:D,style:{padding:"6px 10px",fontSize:"12px",gap:"4px"},title:"Check lại các mục đã chọn",children:[l.jsx(ad,{size:12})," Check"]}),l.jsxs("button",{className:"btn btn-secondary",onClick:Br,style:{padding:"6px 10px",fontSize:"12px",gap:"4px"},children:[l.jsx(_t,{size:12})," Copy (",v.size,")"]}),l.jsxs("button",{className:"btn btn-danger",onClick:te,disabled:D,style:{padding:"6px 10px",fontSize:"12px",gap:"4px",background:"rgba(239, 68, 68, 0.1)",border:"1px solid rgba(239, 68, 68, 0.3)",color:"#ef4444"},children:[l.jsx(un,{size:12})," Xóa"]})]}),l.jsx("button",{className:"btn btn-secondary",onClick:Ur,disabled:pt===0,style:{padding:"6px 10px",fontSize:"12px",gap:"4px"},children:"Copy Live"}),l.jsx("button",{className:"btn btn-secondary",onClick:Vr,disabled:pt===0,style:{padding:"6px 10px",fontSize:"12px",gap:"4px"},children:"Tải TXT"})]})]}),r?l.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",flexGrow:1,height:"200px",color:"var(--text-secondary)"},children:[l.jsx(Fi,{size:24,className:"animate-spin"}),l.jsx("span",{style:{marginTop:"8px"},children:"Đang tải danh sách proxy..."})]}):s?l.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",flexGrow:1,height:"200px",color:"#ef4444",gap:"8px"},children:[l.jsx(q1,{size:24}),l.jsx("span",{children:s}),l.jsx("button",{className:"btn btn-secondary",onClick:Y,style:{fontSize:"12px",padding:"6px 12px"},children:"Tải lại"})]}):W.length===0?l.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",flexGrow:1,height:"200px",color:"var(--text-muted)"},children:[l.jsx(Vl,{size:30,style:{opacity:.3}}),l.jsx("span",{style:{marginTop:"8px",fontSize:"14px"},children:"Không có proxy nào khớp với bộ lọc."})]}):l.jsx("div",{className:"scrollable",style:{overflow:"auto",flexGrow:1,minHeight:0},children:l.jsxs("table",{style:{width:"100%",borderCollapse:"collapse",textAlign:"left",fontSize:"13px"},children:[l.jsx("thead",{children:l.jsxs("tr",{style:{borderBottom:"1px solid rgba(255,255,255,0.08)",color:"var(--text-muted)"},children:[l.jsx("th",{style:{position:"sticky",top:0,zIndex:10,background:"var(--bg-modal)",padding:"10px 8px",width:"32px"},children:l.jsx("input",{type:"checkbox",style:{accentColor:"var(--text-accent)",cursor:"pointer"},checked:W.length>0&&v.size===W.length,onChange:le})}),l.jsx("th",{style:{position:"sticky",top:0,zIndex:10,background:"var(--bg-modal)",padding:"10px 8px",fontWeight:500},children:"Proxy"}),l.jsx("th",{style:{position:"sticky",top:0,zIndex:10,background:"var(--bg-modal)",padding:"10px 8px",fontWeight:500,width:"100px"},children:"Trạng thái"}),l.jsx("th",{style:{position:"sticky",top:0,zIndex:10,background:"var(--bg-modal)",padding:"10px 8px",fontWeight:500,width:"85px"},children:"Độ trễ"}),l.jsx("th",{style:{position:"sticky",top:0,zIndex:10,background:"var(--bg-modal)",padding:"10px 8px",fontWeight:500,width:"120px"},children:"IP nhận"}),l.jsx("th",{style:{position:"sticky",top:0,zIndex:10,background:"var(--bg-modal)",padding:"10px 8px",fontWeight:500,width:"140px"},children:"Quốc gia"}),l.jsx("th",{style:{position:"sticky",top:0,zIndex:10,background:"var(--bg-modal)",padding:"10px 8px",fontWeight:500,width:"160px"},children:"Nhà mạng / ISP"}),l.jsx("th",{style:{position:"sticky",top:0,zIndex:10,background:"var(--bg-modal)",padding:"10px 8px",fontWeight:500,width:"130px"},children:"Cập nhật"}),l.jsx("th",{style:{position:"sticky",top:0,zIndex:10,background:"var(--bg-modal)",padding:"10px 8px",fontWeight:500,width:"90px",textAlign:"center"},children:"Hành động"})]})}),l.jsx("tbody",{children:b.map((I,G)=>{const R=z.has(I.id);return l.jsxs("tr",{style:{borderBottom:"1px solid var(--border-color)",background:G%2===0?"var(--btn-secondary-bg)":"transparent",opacity:R?.7:1},children:[l.jsx("td",{style:{padding:"8px"},children:l.jsx("input",{type:"checkbox",style:{accentColor:"var(--text-accent)",cursor:"pointer"},checked:v.has(I.id),onChange:()=>B(I.id)})}),l.jsx("td",{style:{padding:"8px",fontFamily:"monospace",color:"var(--text-secondary)",wordBreak:"break-all"},children:I.proxy}),l.jsx("td",{style:{padding:"8px"},children:I.status==="active"?l.jsxs("span",{style:{display:"inline-flex",alignItems:"center",gap:"3px",color:"var(--text-emerald, #10b981)",background:"rgba(16, 185, 129, 0.1)",padding:"2px 6px",borderRadius:"4px",fontSize:"11px",fontWeight:600},children:[l.jsx(rd,{size:10}),"LIVE"]}):l.jsxs("span",{style:{display:"inline-flex",alignItems:"center",gap:"3px",color:"#ef4444",background:"rgba(239, 68, 68, 0.1)",padding:"2px 6px",borderRadius:"4px",fontSize:"11px",fontWeight:600},children:[l.jsx(ld,{size:10}),"DEAD"]})}),l.jsx("td",{style:{padding:"8px"},children:I.status==="active"&&I.latency?l.jsxs("span",{style:{color:I.latency<500?"var(--text-emerald, #10b981)":I.latency<1500?"var(--text-accent)":"#ef4444",fontWeight:600},children:[I.latency," ms"]}):l.jsx("span",{style:{color:"var(--text-muted)"},children:"-"})}),l.jsx("td",{style:{padding:"8px",fontFamily:"monospace"},children:I.ip||"-"}),l.jsx("td",{style:{padding:"8px"},children:I.status==="active"&&I.countryCode?l.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"4px"},children:[l.jsx("span",{style:{fontSize:"14px"},title:I.countryCode,children:Uf(I.countryCode)}),l.jsx("span",{style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",maxWidth:"100px"},children:I.country})]}):l.jsx("span",{style:{color:"var(--text-muted)"},children:"-"})}),l.jsx("td",{style:{padding:"8px"},children:I.status==="active"?l.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"4px",color:"var(--text-muted)",fontSize:"12px"},children:[l.jsx(Vl,{size:11,style:{flexShrink:0}}),l.jsx("span",{style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",maxWidth:"140px"},title:I.isp,children:I.isp})]}):l.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"4px",color:"#f87171",fontSize:"11px"},title:I.error,children:[l.jsx(cd,{size:11,style:{flexShrink:0}}),l.jsx("span",{style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",maxWidth:"140px"},children:I.error})]})}),l.jsx("td",{style:{padding:"8px",fontSize:"11px",color:"var(--text-muted)"},children:I.last_checked?new Date(I.last_checked).toLocaleString("vi-VN",{hour:"2-digit",minute:"2-digit",second:"2-digit",day:"2-digit",month:"2-digit"}):"-"}),l.jsx("td",{style:{padding:"8px",textAlign:"center"},children:l.jsxs("div",{style:{display:"flex",gap:"4px",justifyContent:"center"},children:[l.jsx("button",{className:"btn btn-secondary",onClick:()=>Ar(I.id,I.proxy),disabled:R||D,style:{padding:"4px",minWidth:"auto",borderRadius:"4px"},title:"Kiểm tra lại",children:l.jsx(Fi,{size:12,className:R?"animate-spin":""})}),l.jsx("button",{className:"btn btn-secondary",onClick:()=>se(I.id),disabled:R||D,style:{padding:"4px",minWidth:"auto",borderRadius:"4px",color:"#ef4444"},title:"Xóa",children:l.jsx(un,{size:12})})]})})]},I.id)})})]})}),l.jsx(Is,{currentPage:M,totalPages:F,pageSize:H,totalItems:K,startIndex:h,endIndex:E,pageSizeOptions:V,onPageChange:$,onPageSizeChange:Q})]})]})};function Hf(e){const t="ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",n=e.toUpperCase().replace(/=+$/,"").replace(/\s/g,""),r=new Uint8Array(Math.floor(n.length*5/8));let i=0,s=0,o=0;for(let a=0;a<n.length;a++){const c=n[a],u=t.indexOf(c);if(u===-1)throw new Error(`Invalid base32 character: ${c}`);i=i<<5|u,s+=5,s>=8&&(r[o++]=i>>>s-8&255,s-=8)}return r}async function $f(e){const r=Math.floor(Date.now()/1e3),i=Math.floor(r/30),s=30-r%30;try{const o=Hf(e),a=new Uint8Array(8);let c=i;for(let m=7;m>=0;m--)a[m]=c&255,c=c>>>8;const u=await window.crypto.subtle.importKey("raw",o,{name:"HMAC",hash:{name:"SHA-1"}},!1,["sign"]),x=await window.crypto.subtle.sign("HMAC",u,a),y=new Uint8Array(x),g=y[y.length-1]&15;let C=(((y[g]&127)<<24|(y[g+1]&255)<<16|(y[g+2]&255)<<8|y[g+3]&255)%Math.pow(10,6)).toString();for(;C.length<6;)C="0"+C;return{token:C,remainingSeconds:s}}catch(o){return console.error("TOTP generation error:",o),{token:"------",remainingSeconds:0}}}const Kf=()=>{const{fetchWithAuth:e}=St(),[t,n]=j.useState([]),[r,i]=j.useState([]),[s,o]=j.useState({}),[a,c]=j.useState(""),[u,x]=j.useState(null),[y,g]=j.useState(!1),[k,C]=j.useState(!1),[m,N]=j.useState(null),[p,d]=j.useState(!1),[f,w]=j.useState(""),v=async()=>{try{const A=await e("/api/credentials/platforms");if(A.ok){const W=await A.json();Array.isArray(W)&&i(W)}}catch(A){console.error("Failed to fetch platforms:",A)}},S=async(A,W)=>{try{(await e(`/api/credentials/platforms/${A}/toggle`,{method:"PUT",body:JSON.stringify({is_active:!W})})).ok&&v()}catch(b){console.error("Failed to toggle platform:",b)}},z=async A=>{if(confirm("Bạn có chắc chắn muốn xóa nền tảng tùy chỉnh này không? Các tài khoản thuộc nền tảng này sẽ bị gỡ bỏ liên kết."))try{(await e(`/api/credentials/platforms/${A}`,{method:"DELETE"})).ok&&(v(),T())}catch(W){console.error("Failed to delete platform:",W)}},T=async()=>{try{const A=await e("/api/credentials");if(A.ok){const W=await A.json();Array.isArray(W)&&n(W)}await v()}catch(A){console.error("Failed to fetch vault data:",A)}};j.useEffect(()=>{T()},[]),j.useEffect(()=>{const A=async()=>{const b={};for(const M of t)if(M.totp_secret)try{const{token:F,remainingSeconds:H}=await $f(M.totp_secret);b[M.id]={token:F,remaining:H}}catch{b[M.id]={token:"Error",remaining:0}}o(b)};A();const W=setInterval(A,1e3);return()=>clearInterval(W)},[t]);const D=async A=>{if(A.preventDefault(),!!m)try{const W=r.find(V=>V.id===m.platform_id),b=W?W.name:"",M=m.title||b||m.email||m.username||"Tài khoản",F={...m,title:M},H=!!m.id,K=H?`/api/credentials/${m.id}`:"/api/credentials";(await e(K,{method:H?"PUT":"POST",body:JSON.stringify(F)})).ok&&(C(!1),N(null),T())}catch(W){console.error("Failed to save credential:",W)}},L=async A=>{if(confirm("Bạn có chắc chắn muốn xóa tài khoản này không?"))try{(await e(`/api/credentials/${A}`,{method:"DELETE"})).ok&&T()}catch(W){console.error("Failed to delete credential:",W)}},J=async A=>{try{(await e(`/api/credentials/${A.id}`,{method:"PUT",body:JSON.stringify({is_favorite:!A.is_favorite})})).ok&&T()}catch(W){console.error("Failed to toggle favorite:",W)}},U=async(A,W)=>{if(!f)return;const b=f.split(`
288
+ `).map(H=>H.trim()).filter(H=>H),M=(H,K,h)=>{const E=H.split("|").map(B=>B.trim()),V=K.split("|").map(B=>B.trim().toLowerCase()),$={title:"",username:"",uid:"",password:"",totp_secret:"",url:"",custom_fields:[],notes:"Nhập nhanh từ chuỗi dán (định dạng tùy chỉnh)"},Q=r.find(B=>B.id===h);$.platform_id=h,$.title=Q?Q.name:"Tài khoản dán nhanh",h==="google"?$.url="google.com":h==="facebook"?$.url="facebook.com":h==="tiktok"?$.url="tiktok.com":h==="twitter"?$.url="x.com":h==="instagram"?$.url="instagram.com":h==="outlook"?$.url="outlook.live.com":h==="telegram"?$.url="telegram.org":h==="discord"?$.url="discord.com":h==="reddit"&&($.url="reddit.com");const le=(B,Se)=>{var se;Se&&((se=$.custom_fields)==null||se.push({key:B,value:Se}))};return V.forEach((B,Se)=>{const se=E[Se];if(!(!se||B==="skip"))if(B==="pass mail"||B==="pass_mail"||B==="pass email"||B==="pass_email"||B.includes("pass mail")||B.includes("pass email"))le("Pass Mail",se);else if(B==="backup code"||B==="backup_code"||B.includes("backup"))le("Backup Code",se);else if(B.includes("email")||B==="mail")$.email=se,$.username||($.username=se);else if(B.includes("pass")||B==="pwd")B.includes("khôi phục")||B.includes("recovery")||B.includes("kp")?le("Mail KP",se):$.password=se;else if(B==="2fa"||B==="otp"||B==="totp"||B.includes("secret")||B.includes("authenticator"))$.totp_secret=se;else if(B==="uid")$.uid=se;else if(B.includes("username")||B==="user")$.username=se;else if(B==="sđt"||B==="sdt"||B.includes("phone")||B.includes("điện thoại"))le("SĐT",se);else if(B.includes("khôi phục")||B.includes("recovery")||B.includes("mail kp")||B.includes("mailkp"))le("Mail KP",se);else if(B==="cookie")le("Cookie",se);else if(B==="token")le("Token",se);else if(B.includes("auth token"))le("Auth Token",se);else{const te=K.split("|")[Se]||`Trường ${Se+1}`;le(te,se)}}),$.title||($.title=$.email||$.username||"Tài khoản dán nhanh"),$},F=(H,K)=>{const h=H.split("|").map(Q=>Q.trim()),E={title:"",username:"",uid:"",password:"",totp_secret:"",url:"",custom_fields:[],notes:"Nhập nhanh từ chuỗi dán"},V=(Q,le)=>{var B;le&&((B=E.custom_fields)==null||B.push({key:Q,value:le}))},$=r.find(Q=>Q.id===K);if(E.platform_id=K,E.title=$?$.name:"Tài khoản dán nhanh",K==="google")E.url="google.com",h[0]&&(E.email=h[0],E.username=h[0]),h[1]&&(E.password=h[1]),h[2]&&(E.totp_secret=h[2]),h.length===5?(h[3]&&V("Mail KP",h[3]),h[4]&&V("SĐT",h[4])):(h[3]&&V("Mail KP",h[3]),h[4]&&V("Pass Mail KP",h[4]),h[5]&&V("SĐT",h[5]));else if(K==="facebook")E.url="facebook.com",h[0]&&(E.uid=h[0]),h[1]&&(E.password=h[1]),h[2]&&(E.totp_secret=h[2]),h[3]&&(E.email=h[3],E.username=h[3]),h[4]&&V("Pass Email",h[4]),h[5]&&V("Mail KP",h[5]),h[6]&&V("Pass Mail KP",h[6]),h[7]&&V("SĐT",h[7]),h[8]&&V("Cookie",h[8]),h[9]&&V("Token",h[9]);else if(K==="tiktok")E.url="tiktok.com",h[0]&&(E.username=h[0]),h[1]&&(E.password=h[1]),h[2]&&(E.email=h[2],V("Email",h[2])),h[3]&&V("Pass Email",h[3]),h[4]&&(E.totp_secret=h[4]),h[5]&&V("SĐT",h[5]),h[6]&&V("Cookie",h[6]);else if(K==="twitter")E.url="x.com",h[0]&&(E.username=h[0]),h[1]&&(E.password=h[1]),h[2]&&(E.email=h[2],V("Email",h[2])),h[3]&&V("Pass Email",h[3]),h[4]&&(E.totp_secret=h[4]),h[5]&&V("Auth Token",h[5]);else if(K==="instagram")E.url="instagram.com",h[0]&&(E.username=h[0]),h[1]&&(E.password=h[1]),h[2]&&(E.email=h[2],V("Email",h[2])),h[3]&&V("Pass Email",h[3]),h[4]&&(E.totp_secret=h[4]),h[5]&&V("Cookie",h[5]);else if(K==="outlook")E.url="outlook.live.com",h[0]&&(E.email=h[0],E.username=h[0]),h[1]&&(E.password=h[1]),h[2]&&V("Mail KP",h[2]),h[3]&&V("SĐT",h[3]),h[4]&&V("Client ID",h[4]),h[5]&&V("Refresh Token",h[5]);else if(K==="telegram")E.url="telegram.org",h[0]&&(E.username=h[0]),h[1]&&(E.password=h[1]),h[2]&&V("API ID",h[2]),h[3]&&V("API Hash",h[3]),h[4]&&V("Session String",h[4]);else if(K==="discord")E.url="discord.com",h[0]&&(E.username=h[0]),h[1]&&(E.email=h[1],V("Email",h[1])),h[2]&&(E.password=h[2]),h[3]&&V("Token",h[3]),h[4]&&(E.totp_secret=h[4]),h[5]&&V("Backup Codes",h[5]);else if(K==="reddit")E.url="reddit.com",h[0]&&(E.username=h[0]),h[1]&&(E.password=h[1]),h[2]&&(E.email=h[2],V("Email",h[2])),h[3]&&V("Pass Email",h[3]),h[4]&&V("Cookie",h[4]);else if(h.length===5){const Q=h[0],le=Q.toLowerCase().includes("gmail.com");E.title=le?"Gmail":"Tài khoản dán nhanh",E.url=le?"google.com":"",E.email=Q,E.username=Q,E.password=h[1],E.totp_secret=h[2],E.custom_fields=[{key:"Mail KP",value:h[3]},{key:"SĐT",value:h[4]}]}else h.length===4?(E.email=h[0],E.username=h[0],E.password=h[1],E.totp_secret=h[2],E.custom_fields=[{key:"Mail KP",value:h[3]}]):h.length===3?(E.email=h[0],E.username=h[0],E.password=h[1],E.totp_secret=h[2]):h.length===2?(E.username=h[0],E.password=h[1]):E.password=h[0];return E};if(b.length>1)try{let H=0;const K=b.map(async h=>{const E=W?M(h,W,A||""):F(h,A||"");(await e("/api/credentials",{method:"POST",body:JSON.stringify(E)})).ok&&H++});await Promise.all(K),alert(`Đã nhập thành công ${H} tài khoản!`),d(!1),w(""),T()}catch(H){console.error("Failed to bulk import:",H),alert("Lỗi nhập hàng loạt. Vui lòng kiểm tra lại định dạng.")}else{const H=W?M(b[0],W,A||""):F(b[0],A||"");N(H),d(!1),w(""),C(!0)}},P=async A=>{try{const b=await(await e("/api/credentials")).json();let M="",F="",H="";if(A==="json")M=JSON.stringify(b,null,2),F="application/json",H="credentials-export.json";else{const V=(Q,le)=>{if(!Q.custom_fields)return"";const B=le.toLowerCase().trim(),Se=Q.custom_fields.find(se=>{const te=se.key.toLowerCase().trim();return B==="mail kp"?te==="mail kp"||te==="mailkp"||te==="email kp"||te==="emailkp"||te.includes("khôi phục")||te.includes("recovery"):B==="sđt"?te==="sđt"||te==="sdt"||te==="phone"||te==="sđt khôi phục"||te.includes("điện thoại")||te==="phone number":B==="backup code"?te==="backup code"||te==="backupcode"||te.includes("backup")||te.includes("mã dự phòng")||te.includes("mã cứu hộ")||te.includes("dự phòng"):B==="pass mail"?te==="pass mail"||te==="passmail"||te==="mật khẩu mail"||te==="mật khẩu email"||te==="pass email"||te==="passemail"||te.includes("mật khẩu email")||te.includes("pass mail"):te===B});return Se?Se.value:""};M=b.map(Q=>{const le=V(Q,"mail kp"),B=V(Q,"sđt"),Se=V(Q,"backup code"),se=V(Q,"pass mail");return`${Q.username}|${Q.password}|${Q.totp_secret}|${le}|${B}|${Se}|${se}`}).join(`
289
+ `),F="text/plain",H="credentials-export.txt"}const K=new Blob([M],{type:F}),h=URL.createObjectURL(K),E=document.createElement("a");E.href=h,E.download=H,E.click(),URL.revokeObjectURL(h)}catch(W){console.error("Failed to export:",W)}},Y=async A=>{var M;const W=(M=A.target.files)==null?void 0:M[0];if(!W)return;const b=new FileReader;b.onload=async F=>{var H;try{const K=(H=F.target)==null?void 0:H.result;if(W.name.endsWith(".json")){const h=JSON.parse(K),E=Array.isArray(h)?h:[h];for(const V of E)await e("/api/credentials",{method:"POST",body:JSON.stringify(V)});alert(`Đã nhập thành công ${E.length} tài khoản!`),T()}else{const h=K.split(`
290
+ `).map($=>$.trim()).filter($=>$);if(h.length===0)return;let E=0;if(h.some($=>$.includes("|"))){for(const $ of h){const Q=$.split("|").map(le=>le.trim());if(Q.length>=2){const le=Q[0],B=le.toLowerCase().includes("gmail.com");await e("/api/credentials",{method:"POST",body:JSON.stringify({title:B?"Gmail":"Tài khoản Nhập",username:le,password:Q[1]||"",totp_secret:Q[2]||"",custom_fields:[{key:"Mail KP",value:Q[3]||""},{key:"SĐT",value:Q[4]||""},{key:"Backup Code",value:Q[5]||""},{key:"Pass Mail",value:Q[6]||""}],url:B?"google.com":"",notes:"Nhập từ file định dạng email|pass|2FA|Mail KP|SĐT"})}),E++}}alert(`Đã nhập thành công ${E} tài khoản từ định dạng email|pass|2FA|Mail KP|SĐT!`)}else{if(h.length<=1)return;for(let $=1;$<h.length;$++){const Q=h[$].split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/).map(le=>le.replace(/^"|"$/g,"").trim());Q.length>=2&&(await e("/api/credentials",{method:"POST",body:JSON.stringify({title:Q[0]||"Tài khoản CSV",url:Q[3]||"",username:Q[1]||"",password:Q[2]||"",totp_secret:Q[4]||"",notes:Q[5]||""})}),E++)}alert(`Đã nhập thành công ${E} tài khoản từ file CSV!`)}T()}}catch{alert("Lỗi phân tích file. Vui lòng kiểm tra lại định dạng.")}},b.readAsText(W)},re=t.filter(A=>{const W=A.title.toLowerCase().includes(a.toLowerCase())||A.username.toLowerCase().includes(a.toLowerCase())||A.url.toLowerCase().includes(a.toLowerCase())||A.notes.toLowerCase().includes(a.toLowerCase()),b=y?A.is_favorite:!0,M=u?A.platform_id===u:!0;return W&&b&&M});return{credentials:t,platforms:r,totps:s,search:a,setSearch:c,selectedPlatform:u,setSelectedPlatform:x,onlyFavorites:y,setOnlyFavorites:g,filteredCredentials:re,isCredModalOpen:k,setIsCredModalOpen:C,currentCredential:m,setCurrentCredential:N,isSmartPasteOpen:p,setIsSmartPasteOpen:d,smartPasteText:f,setSmartPasteText:w,fetchData:T,fetchPlatforms:v,handleTogglePlatform:S,handleDeletePlatform:z,handleSaveCredential:D,handleDeleteCredential:L,handleToggleFavorite:J,handleSmartPasteSubmit:U,handleExport:P,handleImport:Y}},Qf=()=>{var G;const{lockVault:e,theme:t,toggleTheme:n,fetchWithAuth:r}=St(),[i,s]=j.useState("vault"),[o,a]=j.useState(()=>localStorage.getItem("viewMode")==="table"?"table":"card"),[c,u]=j.useState(!1),[x,y]=j.useState(window.innerWidth<768);j.useEffect(()=>{const R=()=>{y(window.innerWidth<768)};return window.addEventListener("resize",R),()=>window.removeEventListener("resize",R)},[]);const g=R=>{a(R),localStorage.setItem("viewMode",R)},[k,C]=j.useState(()=>{const R=localStorage.getItem("visibleColumns"),Z={id:!0,username:!0,uid:!0,password:!0,otp:!0,mailKp:!0,phone:!0,backupCode:!1,passMail:!1,secretKey:!0,url:!0};if(R)try{const ee=JSON.parse(R);return{...Z,...ee}}catch{return Z}return Z}),[m,N]=j.useState(!1),p=R=>{const Z={...k,[R]:!k[R]};C(Z),localStorage.setItem("visibleColumns",JSON.stringify(Z))},{credentials:d,platforms:f,totps:w,search:v,setSearch:S,selectedPlatform:z,setSelectedPlatform:T,onlyFavorites:D,setOnlyFavorites:L,filteredCredentials:J,isCredModalOpen:U,setIsCredModalOpen:P,currentCredential:Y,setCurrentCredential:re,isSmartPasteOpen:A,setIsSmartPasteOpen:W,smartPasteText:b,setSmartPasteText:M,fetchData:F,handleTogglePlatform:H,handleDeletePlatform:K,handleSaveCredential:h,handleDeleteCredential:E,handleToggleFavorite:V,handleSmartPasteSubmit:$,handleExport:Q,handleImport:le}=Kf(),{paginatedItems:B,currentPage:Se,totalPages:se,pageSize:te,totalItems:Ar,startIndex:Or,endIndex:Wr,pageSizeOptions:Br,setCurrentPage:Ur,setPageSize:Vr}=yd({items:J}),[Ct,pt]=j.useState(new Set);j.useEffect(()=>{pt(new Set)},[z,D,v,Se]);const ci=async()=>{if(confirm(`Bạn có chắc chắn muốn xóa ${Ct.size} tài khoản đã chọn không?`))try{const R=Array.from(Ct).map(Z=>r(`/api/credentials/${Z}`,{method:"DELETE"}));await Promise.all(R),pt(new Set),F()}catch(R){console.error("Failed to delete selected credentials:",R)}},I=R=>{const Z=d.filter(bt=>Ct.has(bt.id));let ee="",ge="",me="";if(R==="json")ee=JSON.stringify(Z,null,2),ge="application/json",me="selected-credentials-export.json";else{const bt=(zt,ui)=>{if(!zt.custom_fields)return"";const Qn=ui.toLowerCase().trim(),No=zt.custom_fields.find(md=>{const Be=md.key.toLowerCase().trim();return Qn==="mail kp"?Be==="mail kp"||Be==="mailkp"||Be==="email kp"||Be==="emailkp"||Be.includes("khôi phục")||Be.includes("recovery"):Qn==="sđt"?Be==="sđt"||Be==="sdt"||Be==="phone"||Be==="sđt khôi phục"||Be.includes("điện thoại")||Be==="phone number":Be===Qn});return No?No.value:""};ee=Z.map(zt=>{const ui=bt(zt,"mail kp"),Qn=bt(zt,"sđt");return`${zt.username}|${zt.password}|${zt.totp_secret}|${ui}|${Qn}`}).join(`
291
+ `),ge="text/plain",me="selected-credentials-export.txt"}const Xt=new Blob([ee],{type:ge}),Yt=URL.createObjectURL(Xt),We=document.createElement("a");We.href=Yt,We.download=me,We.click(),URL.revokeObjectURL(Yt)};return l.jsxs("div",{style:{display:"flex",flexDirection:"column",height:"100vh",padding:"12px",gap:"8px",overflow:"hidden"},children:[l.jsx(ff,{search:v,setSearch:S,theme:t,toggleTheme:n,onImportExportOpen:()=>u(!0),onSmartPasteOpen:()=>W(!0),onLockVault:e}),l.jsxs("div",{style:{display:"grid",gridTemplateColumns:"260px 1fr",gap:"12px",flexGrow:1,overflow:"hidden"},children:[l.jsx(hf,{credentials:d,platforms:f,selectedPlatform:z,setSelectedPlatform:T,onlyFavorites:D,setOnlyFavorites:L,activeView:i,setActiveView:s}),l.jsx("div",{style:{height:"100%",overflow:"hidden",display:"flex",flexDirection:"column",minHeight:0},children:i==="settings"?l.jsx("div",{style:{height:"100%",overflowY:"auto",paddingTop:"8px"},children:l.jsx(Df,{platforms:f,onTogglePlatform:H,onDeletePlatform:K})}):i==="proxy"?l.jsx("div",{style:{height:"100%",overflowY:"auto",paddingTop:"8px"},children:l.jsx(Ff,{})}):i==="proxy-list"?l.jsx("div",{style:{height:"100%",overflow:"hidden",paddingTop:"8px",display:"flex",flexDirection:"column",minHeight:0},children:l.jsx(Vf,{})}):l.jsxs("main",{style:{display:"flex",flexDirection:"column",gap:"10px",height:"100%",overflow:"hidden",minHeight:0,paddingTop:"8px"},children:[l.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[l.jsxs("h2",{style:{fontSize:"18px",fontWeight:600},children:[z?`Nền tảng: ${(G=f.find(R=>R.id===z))==null?void 0:G.name}`:D?"Tài khoản yêu thích":"Tất cả tài khoản",l.jsxs("span",{style:{fontSize:"14px",color:"var(--text-muted)",marginLeft:"8px"},children:["(",J.length," mục)"]})]}),l.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"12px"},children:[!x&&l.jsxs("div",{style:{display:"flex",background:"var(--btn-secondary-bg)",border:"1px solid var(--btn-secondary-border)",borderRadius:"8px",padding:"2px"},children:[l.jsx("button",{onClick:()=>g("card"),style:{background:o==="card"?"var(--primary-gradient)":"none",border:"none",color:o==="card"?"var(--btn-primary-text)":"var(--text-secondary)",padding:"6px 12px",borderRadius:"6px",cursor:"pointer",display:"flex",alignItems:"center",gap:"6px",transition:"var(--transition-smooth)"},title:"Dạng thẻ",children:l.jsx(of,{size:16})}),l.jsx("button",{onClick:()=>g("table"),style:{background:o==="table"?"var(--primary-gradient)":"none",border:"none",color:o==="table"?"var(--btn-primary-text)":"var(--text-secondary)",padding:"6px 12px",borderRadius:"6px",cursor:"pointer",display:"flex",alignItems:"center",gap:"6px",transition:"var(--transition-smooth)"},title:"Dạng bảng",children:l.jsx(sd,{size:16})})]}),!x&&o==="table"&&l.jsxs("div",{style:{position:"relative"},children:[l.jsxs("button",{className:"btn btn-secondary",onClick:()=>N(!m),style:{display:"flex",alignItems:"center",gap:"8px",padding:"8px 16px",borderRadius:"8px"},title:"Hiển thị cột",children:[l.jsx(nf,{size:16}),"Cột",l.jsx(Fr,{size:14})]}),m&&l.jsxs(l.Fragment,{children:[l.jsx("div",{onClick:()=>N(!1),style:{position:"fixed",top:0,left:0,right:0,bottom:0,zIndex:999}}),l.jsxs("div",{className:"glass-panel",style:{position:"absolute",top:"calc(100% + 8px)",right:0,zIndex:1e3,padding:"12px",minWidth:"180px",display:"flex",flexDirection:"column",gap:"10px",boxShadow:"var(--glow-accent)",background:"var(--bg-modal)"},children:[l.jsx("div",{style:{fontSize:"11px",fontWeight:600,color:"var(--text-secondary)",marginBottom:"4px",textTransform:"uppercase",letterSpacing:"0.05em"},children:"Hiển thị cột"}),l.jsxs("label",{style:{display:"flex",alignItems:"center",gap:"10px",fontSize:"13px",cursor:"pointer",color:"var(--text-primary)"},children:[l.jsx("input",{type:"checkbox",checked:k.id,onChange:()=>p("id"),style:{cursor:"pointer",accentColor:"var(--text-accent)"}}),"ID tài khoản"]}),l.jsxs("label",{style:{display:"flex",alignItems:"center",gap:"10px",fontSize:"13px",cursor:"pointer",color:"var(--text-primary)"},children:[l.jsx("input",{type:"checkbox",checked:k.username,onChange:()=>p("username"),style:{cursor:"pointer",accentColor:"var(--text-accent)"}}),"Username"]}),l.jsxs("label",{style:{display:"flex",alignItems:"center",gap:"10px",fontSize:"13px",cursor:"pointer",color:"var(--text-primary)"},children:[l.jsx("input",{type:"checkbox",checked:k.uid,onChange:()=>p("uid"),style:{cursor:"pointer",accentColor:"var(--text-accent)"}}),"UID"]}),l.jsxs("label",{style:{display:"flex",alignItems:"center",gap:"10px",fontSize:"13px",cursor:"pointer",color:"var(--text-primary)"},children:[l.jsx("input",{type:"checkbox",checked:k.password,onChange:()=>p("password"),style:{cursor:"pointer",accentColor:"var(--text-accent)"}}),"Mật khẩu"]}),l.jsxs("label",{style:{display:"flex",alignItems:"center",gap:"10px",fontSize:"13px",cursor:"pointer",color:"var(--text-primary)"},children:[l.jsx("input",{type:"checkbox",checked:k.otp,onChange:()=>p("otp"),style:{cursor:"pointer",accentColor:"var(--text-accent)"}}),"Mã 2FA (OTP)"]}),l.jsxs("label",{style:{display:"flex",alignItems:"center",gap:"10px",fontSize:"13px",cursor:"pointer",color:"var(--text-primary)"},children:[l.jsx("input",{type:"checkbox",checked:k.mailKp,onChange:()=>p("mailKp"),style:{cursor:"pointer",accentColor:"var(--text-accent)"}}),"Mail KP"]}),l.jsxs("label",{style:{display:"flex",alignItems:"center",gap:"10px",fontSize:"13px",cursor:"pointer",color:"var(--text-primary)"},children:[l.jsx("input",{type:"checkbox",checked:k.phone,onChange:()=>p("phone"),style:{cursor:"pointer",accentColor:"var(--text-accent)"}}),"SĐT"]}),l.jsxs("label",{style:{display:"flex",alignItems:"center",gap:"10px",fontSize:"13px",cursor:"pointer",color:"var(--text-primary)"},children:[l.jsx("input",{type:"checkbox",checked:k.backupCode,onChange:()=>p("backupCode"),style:{cursor:"pointer",accentColor:"var(--text-accent)"}}),"Backup Code"]}),l.jsxs("label",{style:{display:"flex",alignItems:"center",gap:"10px",fontSize:"13px",cursor:"pointer",color:"var(--text-primary)"},children:[l.jsx("input",{type:"checkbox",checked:k.passMail,onChange:()=>p("passMail"),style:{cursor:"pointer",accentColor:"var(--text-accent)"}}),"Pass Mail"]}),l.jsxs("label",{style:{display:"flex",alignItems:"center",gap:"10px",fontSize:"13px",cursor:"pointer",color:"var(--text-primary)"},children:[l.jsx("input",{type:"checkbox",checked:k.secretKey,onChange:()=>p("secretKey"),style:{cursor:"pointer",accentColor:"var(--text-accent)"}}),"Secret Key"]}),l.jsxs("label",{style:{display:"flex",alignItems:"center",gap:"10px",fontSize:"13px",cursor:"pointer",color:"var(--text-primary)"},children:[l.jsx("input",{type:"checkbox",checked:k.url,onChange:()=>p("url"),style:{cursor:"pointer",accentColor:"var(--text-accent)"}}),"Liên kết"]})]})]})]}),l.jsxs("button",{className:"btn btn-primary",onClick:()=>{re({title:"",username:"",uid:"",password:"",totp_secret:"",url:"",custom_fields:[{key:"Mail KP",value:""},{key:"SĐT",value:""},{key:"Backup Code",value:""},{key:"Pass Mail",value:""}],notes:"",category_id:"",platform_id:z||"",is_favorite:!1}),P(!0)},children:[l.jsx(To,{size:16}),"Thêm tài khoản"]})]})]}),J.length===0?l.jsxs("div",{className:"glass-panel",style:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",padding:"60px",gap:"12px",color:"var(--text-secondary)"},children:[l.jsx(id,{size:36,style:{color:"var(--text-muted)"}}),l.jsx("p",{children:"Chưa có tài khoản nào trong bộ lọc này."})]}):x||o==="card"?l.jsxs(l.Fragment,{children:[l.jsx("div",{className:"scrollable",style:{flexGrow:1,overflowY:"auto",display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(320px, 1fr))",gap:"16px",paddingRight:"4px",alignItems:"start"},children:B.map(R=>l.jsx(xf,{cred:R,platforms:f,totp:w[R.id],onToggleFavorite:()=>V(R),onEdit:()=>{re(R),P(!0)},onDelete:()=>E(R.id)},R.id))}),l.jsx(Is,{currentPage:Se,totalPages:se,pageSize:te,totalItems:Ar,startIndex:Or,endIndex:Wr,pageSizeOptions:Br,onPageChange:Ur,onPageSizeChange:Vr})]}):l.jsxs("div",{className:"table-pagination-wrapper",children:[l.jsx(mf,{credentials:B,platforms:f,totps:w,visibleColumns:k,onToggleFavorite:V,onEdit:R=>{re(R),P(!0)},onDelete:E,selectedIds:Ct,onToggleSelect:R=>{pt(Z=>{const ee=new Set(Z);return ee.has(R)?ee.delete(R):ee.add(R),ee})},onToggleSelectAll:()=>{pt(R=>R.size===B.length?new Set:new Set(B.map(Z=>Z.id)))}}),l.jsx(Is,{currentPage:Se,totalPages:se,pageSize:te,totalItems:Ar,startIndex:Or,endIndex:Wr,pageSizeOptions:Br,onPageChange:Ur,onPageSizeChange:Vr})]})]})})]}),Ct.size>0&&l.jsxs("div",{className:"glass-panel animate-slide-up",style:{position:"fixed",bottom:"24px",left:"50%",transform:"translateX(-50%)",zIndex:999,display:"flex",alignItems:"center",gap:"16px",padding:"10px 24px",boxShadow:"0 20px 40px rgba(0,0,0,0.5), var(--glow-accent)",background:"var(--bg-modal)",border:"1px solid var(--text-accent)",borderRadius:"30px"},children:[l.jsxs("span",{style:{fontSize:"14px",fontWeight:600,color:"var(--text-primary)"},children:["Đã chọn ",l.jsx("strong",{style:{color:"var(--text-accent)"},children:Ct.size})," tài khoản"]}),l.jsx("div",{style:{width:"1px",height:"20px",background:"var(--border-color)"}}),l.jsxs("button",{type:"button",className:"btn btn-secondary",onClick:()=>I("json"),style:{padding:"6px 12px",fontSize:"13px",borderRadius:"20px",display:"flex",alignItems:"center",gap:"6px"},children:[l.jsx(Vn,{size:14}),"Xuất JSON"]}),l.jsxs("button",{type:"button",className:"btn btn-secondary",onClick:()=>I("csv"),style:{padding:"6px 12px",fontSize:"13px",borderRadius:"20px",display:"flex",alignItems:"center",gap:"6px"},title:"Xuất định dạng email|pass|2FA|Mail KP|SĐT",children:[l.jsx(Vn,{size:14}),"Xuất TXT (Gmail)"]}),l.jsxs("button",{type:"button",className:"btn btn-danger",onClick:ci,style:{padding:"6px 12px",fontSize:"13px",borderRadius:"20px",display:"flex",alignItems:"center",gap:"6px"},children:[l.jsx(un,{size:14}),"Xóa đã chọn"]}),l.jsx("div",{style:{width:"1px",height:"20px",background:"var(--border-color)"}}),l.jsx("button",{type:"button",className:"btn btn-secondary",onClick:()=>pt(new Set),style:{padding:"6px",borderRadius:"50%",width:"28px",height:"28px",display:"flex",alignItems:"center",justifyContent:"center"},title:"Bỏ chọn tất cả",children:l.jsx(fn,{size:14})})]}),l.jsx(kf,{isOpen:U,onClose:()=>{P(!1),re(null)},credential:Y||{},onChange:re,onSave:h,platforms:f}),l.jsx(Sf,{isOpen:A,onClose:()=>W(!1),text:b,onChange:M,onSubmit:$,platforms:f}),l.jsx(Cf,{isOpen:c,onClose:()=>u(!1),onImport:le,onExport:Q})]})},Gf=()=>{const{isAuthenticated:e,isLoading:t}=St();return t?l.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",minHeight:"100vh",gap:"16px",color:"var(--text-secondary)"},children:[l.jsx("div",{className:"spinner",style:{width:"40px",height:"40px"}}),l.jsx("p",{style:{fontSize:"15px",fontWeight:500,letterSpacing:"0.5px"},children:"Đang kết nối tới mã khóa bảo mật..."})]}):e?l.jsx(Qf,{}):l.jsx(pf,{})},Xf=()=>l.jsx(K1,{children:l.jsx(Gf,{})});Ai.createRoot(document.getElementById("root")).render(l.jsx(Vt.StrictMode,{children:l.jsx(Xf,{})}));